fixed conflict

This commit is contained in:
uid68803 2004-01-03 01:35:19 +00:00
parent 7c88d2e990
commit b64ce25d05
6 changed files with 10 additions and 12 deletions

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View file

@ -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<theme::panel>& panels = theme_.panels();
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();
@ -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};

View file

@ -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;
}

View file

@ -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;

View file

@ -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