diff --git a/data/terrain_generator.cfg b/data/terrain_generator.cfg index d97b7b9c2e3..9cfb658ada0 100644 --- a/data/terrain_generator.cfg +++ b/data/terrain_generator.cfg @@ -1,7 +1,7 @@ [map_generator] name=default -width=60 -height=60 +map_width=60 +map_height=60 iterations=1000 hill_size=10 max_lakes=40 diff --git a/images/misc/rightside.png b/images/misc/rightside.png index 4c278105b57..7a11b1ac4b0 100644 Binary files a/images/misc/rightside.png and b/images/misc/rightside.png differ diff --git a/src/display.cpp b/src/display.cpp index 66dd214d7dc..8452aea6a79 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -449,12 +449,12 @@ void display::redraw_everything() namespace { -void draw_panel(SDL_Surface* target, const theme::panel& panel) +void draw_panel(display& disp, const theme::panel& panel) { log_scope("draw panel"); 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); if(surf->w != loc.w || surf->h != 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"; - SDL_BlitSurface(surf.get(),NULL,target,&loc); + disp.blit_surface(loc.x,loc.y,surf); update_rect(loc); } @@ -499,7 +499,7 @@ void display::draw(bool update,bool force) const std::vector& panels = theme_.panels(); for(std::vector::const_iterator p = panels.begin(); p != panels.end(); ++p) { - draw_panel(screen,*p); + draw_panel(*this,*p); } const std::vector& labels = theme_.labels(); @@ -713,7 +713,6 @@ void display::draw_game_status(int x, int y) void display::draw_report(reports::TYPE report_num) { - log_scope("draw_report"); if(!team_valid()) return; @@ -1741,7 +1740,7 @@ void display::blit_surface(int x, int y, SDL_Surface* surface) if(srcw <= 0 || srch <= 0 || srcx >= surface->w || srcy >= surface->h) return; -/* //look at why SDL_BlitSurface doesn't always handle transperancy for us. +/* //look at why SDL_BlitSurface doesn't always handle transperancy for us. SDL_Rect src_rect = {srcx, srcy, srcw, srch}; SDL_Rect dst_rect = {x, y, srcw, srch}; diff --git a/src/image.cpp b/src/image.cpp index 196ffd26896..7b92a842032 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -229,7 +229,7 @@ SDL_Surface* get_image(const std::string& filename,TYPE type) } 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); surf = conv; } diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 90df8cf28ec..571ad4a82a3 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -655,11 +655,11 @@ default_map_generator::default_map_generator(const config& game_config) if(cfg != NULL) { cfg_ = cfg; - const int width = ::atoi((*cfg)["width"].c_str()); + const int width = ::atoi((*cfg)["map_width"].c_str()); if(width > 0) width_ = width; - const int height = ::atoi((*cfg)["height"].c_str()); + const int height = ::atoi((*cfg)["map_height"].c_str()); if(height > 0) height_ = height; diff --git a/src/playlevel.cpp b/src/playlevel.cpp index bbe52ef94d0..89c6543f8b5 100644 --- a/src/playlevel.cpp +++ b/src/playlevel.cpp @@ -171,7 +171,6 @@ LEVEL_RESULT play_level(game_data& gameinfo, config& game_config, display::WARP); 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 //instead of starting a fresh one