fixed conflict
This commit is contained in:
parent
7c88d2e990
commit
b64ce25d05
6 changed files with 10 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
||||||
[map_generator]
|
[map_generator]
|
||||||
name=default
|
name=default
|
||||||
width=60
|
map_width=60
|
||||||
height=60
|
map_height=60
|
||||||
iterations=1000
|
iterations=1000
|
||||||
hill_size=10
|
hill_size=10
|
||||||
max_lakes=40
|
max_lakes=40
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 71 KiB |
|
@ -449,12 +449,12 @@ void display::redraw_everything()
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void draw_panel(SDL_Surface* target, const theme::panel& panel)
|
void draw_panel(display& disp, const theme::panel& panel)
|
||||||
{
|
{
|
||||||
log_scope("draw panel");
|
log_scope("draw panel");
|
||||||
scoped_sdl_surface surf(image::get_image(panel.image(),image::UNSCALED));
|
scoped_sdl_surface surf(image::get_image(panel.image(),image::UNSCALED));
|
||||||
|
|
||||||
const SDL_Rect screen = { 0, 0, target->w, target->h };
|
const SDL_Rect screen = disp.screen_area();
|
||||||
SDL_Rect& loc = panel.location(screen);
|
SDL_Rect& loc = panel.location(screen);
|
||||||
if(surf->w != loc.w || surf->h != loc.h) {
|
if(surf->w != loc.w || surf->h != loc.h) {
|
||||||
surf.assign(scale_surface(surf.get(),loc.w,loc.h));
|
surf.assign(scale_surface(surf.get(),loc.w,loc.h));
|
||||||
|
@ -462,7 +462,7 @@ void draw_panel(SDL_Surface* target, const theme::panel& panel)
|
||||||
|
|
||||||
std::cerr << "drawing panel " << loc.x << "," << loc.y << "," << loc.w << "," << loc.h << "\n";
|
std::cerr << "drawing panel " << loc.x << "," << loc.y << "," << loc.w << "," << loc.h << "\n";
|
||||||
|
|
||||||
SDL_BlitSurface(surf.get(),NULL,target,&loc);
|
disp.blit_surface(loc.x,loc.y,surf);
|
||||||
update_rect(loc);
|
update_rect(loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ void display::draw(bool update,bool force)
|
||||||
|
|
||||||
const std::vector<theme::panel>& panels = theme_.panels();
|
const std::vector<theme::panel>& panels = theme_.panels();
|
||||||
for(std::vector<theme::panel>::const_iterator p = panels.begin(); p != panels.end(); ++p) {
|
for(std::vector<theme::panel>::const_iterator p = panels.begin(); p != panels.end(); ++p) {
|
||||||
draw_panel(screen,*p);
|
draw_panel(*this,*p);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<theme::label>& labels = theme_.labels();
|
const std::vector<theme::label>& labels = theme_.labels();
|
||||||
|
@ -713,7 +713,6 @@ void display::draw_game_status(int x, int y)
|
||||||
|
|
||||||
void display::draw_report(reports::TYPE report_num)
|
void display::draw_report(reports::TYPE report_num)
|
||||||
{
|
{
|
||||||
log_scope("draw_report");
|
|
||||||
if(!team_valid())
|
if(!team_valid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ SDL_Surface* get_image(const std::string& filename,TYPE type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pixel_format != NULL) {
|
if(pixel_format != NULL) {
|
||||||
SDL_Surface* const conv = SDL_ConvertSurface(surf,pixel_format,SDL_SWSURFACE);
|
SDL_Surface* const conv = SDL_DisplayFormat(surf);
|
||||||
SDL_FreeSurface(surf);
|
SDL_FreeSurface(surf);
|
||||||
surf = conv;
|
surf = conv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -655,11 +655,11 @@ default_map_generator::default_map_generator(const config& game_config)
|
||||||
if(cfg != NULL) {
|
if(cfg != NULL) {
|
||||||
cfg_ = cfg;
|
cfg_ = cfg;
|
||||||
|
|
||||||
const int width = ::atoi((*cfg)["width"].c_str());
|
const int width = ::atoi((*cfg)["map_width"].c_str());
|
||||||
if(width > 0)
|
if(width > 0)
|
||||||
width_ = width;
|
width_ = width;
|
||||||
|
|
||||||
const int height = ::atoi((*cfg)["height"].c_str());
|
const int height = ::atoi((*cfg)["map_height"].c_str());
|
||||||
if(height > 0)
|
if(height > 0)
|
||||||
height_ = height;
|
height_ = height;
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,6 @@ LEVEL_RESULT play_level(game_data& gameinfo, config& game_config,
|
||||||
display::WARP);
|
display::WARP);
|
||||||
|
|
||||||
bool replaying = (recorder.at_end() == false);
|
bool replaying = (recorder.at_end() == false);
|
||||||
std::cerr << "replaying: ???" << (replaying ? "yes" : "no") << "\n";
|
|
||||||
|
|
||||||
//if a team is specified whose turn it is, it means we're loading a game
|
//if a team is specified whose turn it is, it means we're loading a game
|
||||||
//instead of starting a fresh one
|
//instead of starting a fresh one
|
||||||
|
|
Loading…
Add table
Reference in a new issue