removed unnecessary diagnostics

This commit is contained in:
uid68803 2004-01-12 19:37:48 +00:00
parent 8dfb52ed88
commit 307f9e8518
6 changed files with 13 additions and 9 deletions

View file

@ -438,7 +438,7 @@ The main cage where they keep most of the mermen is in the south-east!"
[/message]
[/event]
{OBJ_TRIDENT_STORM 26 35}
{OBJ_TRIDENT_STORM 26 35 bop_stormtrident}
[item]
x=29

View file

@ -100,7 +100,7 @@ Defeat:
[/target]
[/side]
{OBJ_TRIDENT_STORM 16 17}
{OBJ_TRIDENT_STORM 16 17 ford_trident}
#if the player dares attack Li'sar's escort, they are pounced on by
#many Royal Guards

View file

@ -902,8 +902,10 @@ void check_victory(std::map<gamemap::location,unit>& units,
std::vector<int> seen_leaders;
for(std::map<gamemap::location,unit>::const_iterator i = units.begin();
i != units.end(); ++i) {
if(i->second.can_recruit())
if(i->second.can_recruit()) {
std::cerr << "seen leader for side " << i->second.side() << "\n";
seen_leaders.push_back(i->second.side());
}
}
//clear villages for teams that have no leader

View file

@ -126,7 +126,10 @@ LEVEL_RESULT play_level(game_data& gameinfo, config& game_config,
place_sides_in_preferred_locations(map,unit_cfg);
}
std::cerr << "initializing teams..." << unit_cfg.size() << "\n";;
for(config::child_list::const_iterator ui = unit_cfg.begin(); ui != unit_cfg.end(); ++ui) {
std::cerr << "initializing team...\n";
if(first_human_team == -1 && (**ui)["controller"] == "human") {
first_human_team = ui - unit_cfg.begin();
@ -164,8 +167,10 @@ LEVEL_RESULT play_level(game_data& gameinfo, config& game_config,
const std::string& has_loc = (**ui)["x"];
gamemap::location start_pos(**ui);
if(has_loc.empty())
if(has_loc.empty()) {
start_pos = map.starting_position(new_unit.side());
std::cerr << "initializing side '" << (**ui)["side"] << "' at " << start_pos.x << "," << start_pos.y << "\n";
}
if(!start_pos.valid() && new_unit.side() == 1) {
throw gamestatus::load_game_failed("No starting position for side 1");

View file

@ -226,6 +226,7 @@ bool theme::set_resolution(const SDL_Rect& screen)
for(i = resolutions.begin(); i != resolutions.end(); ++i) {
const int width = atoi((**i)["width"].c_str());
const int height = atoi((**i)["height"].c_str());
std::cerr << "comparing resolution " << screen.w << "," << screen.h << " to " << width << "," << height << "\n";
if(screen.w >= width && screen.h >= height) {
std::cerr << "loading theme: " << width << "," << height << "\n";
current = i;
@ -240,7 +241,7 @@ bool theme::set_resolution(const SDL_Rect& screen)
}
}
if(current == resolutions.end()) {
if(!resolutions.empty() && current == resolutions.end()) {
std::cerr << "ERROR: No valid resolution found\n";
return false;
}

View file

@ -112,9 +112,7 @@ void menu::change_item(int pos1, int pos2,std::string str)
size_t menu::max_items_onscreen() const
{
std::cerr << "calculating max items on screen...\n";
if(max_items_ != -1) {
std::cerr << "cached: " << max_items_ << "\n";
return size_t(max_items_);
}
@ -134,8 +132,6 @@ size_t menu::max_items_onscreen() const
if(sum > max_height && n > 1)
--n;
std::cerr << "returning max items: " << n << " (" << sum << ")\n";
return max_items_ = n;
}