diagnostics
This commit is contained in:
parent
9c92bed05e
commit
56491034f8
3 changed files with 14 additions and 2 deletions
|
@ -511,6 +511,10 @@ void display::draw(bool update,bool force)
|
|||
b->draw();
|
||||
}
|
||||
|
||||
//invalidate the reports so they are redrawn
|
||||
std::cerr << "invalidating reports...\n";
|
||||
std::fill(reports_,reports_+sizeof(reports_)/sizeof(*reports_),reports::report());
|
||||
invalidateGameStatus_ = true;
|
||||
panelsDrawn_ = true;
|
||||
}
|
||||
|
||||
|
@ -723,8 +727,10 @@ void display::draw_report(reports::TYPE report_num)
|
|||
const SDL_Rect& new_rect = item->location(screen_area());
|
||||
|
||||
//report and its location is unchanged since last time. Do nothing.
|
||||
if(rect == new_rect && reports_[report_num] == report)
|
||||
if(rect == new_rect && reports_[report_num] == report) {
|
||||
std::cerr << "report unchanged\n";
|
||||
return;
|
||||
}
|
||||
|
||||
reports_[report_num] = report;
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "font.hpp"
|
||||
#include "game_config.hpp"
|
||||
#include "language.hpp"
|
||||
#include "log.hpp"
|
||||
#include "tooltips.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
|
@ -209,6 +210,7 @@ SDL_Rect draw_text_line(display* gui, const SDL_Rect& area, int size,
|
|||
SDL_Rect src = dest;
|
||||
src.x = 0;
|
||||
src.y = 0;
|
||||
log_scope("blit text");
|
||||
SDL_BlitSurface(surface,&src,gui->video().getSurface(),&dest);
|
||||
}
|
||||
|
||||
|
@ -225,6 +227,8 @@ SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
|
|||
int x, int y, SDL_Surface* bg, bool use_tooltips,
|
||||
MARKUP use_markup)
|
||||
{
|
||||
log_scope("draw_text");
|
||||
std::cerr << "draw text: '" << txt << "'\n";
|
||||
//make sure there's always at least a space, so we can ensure
|
||||
//that we can return a rectangle for height
|
||||
static const std::string blank_text(" ");
|
||||
|
|
|
@ -240,8 +240,10 @@ bool theme::set_resolution(const SDL_Rect& screen)
|
|||
}
|
||||
}
|
||||
|
||||
if(current == resolutions.end())
|
||||
if(current == resolutions.end()) {
|
||||
std::cerr << "ERROR: No valid resolution found\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
panels_.clear();
|
||||
labels_.clear();
|
||||
|
|
Loading…
Add table
Reference in a new issue