removed unnecessary diagnostics
This commit is contained in:
parent
8dfb52ed88
commit
307f9e8518
6 changed files with 13 additions and 9 deletions
|
@ -438,7 +438,7 @@ The main cage where they keep most of the mermen is in the south-east!"
|
||||||
[/message]
|
[/message]
|
||||||
[/event]
|
[/event]
|
||||||
|
|
||||||
{OBJ_TRIDENT_STORM 26 35}
|
{OBJ_TRIDENT_STORM 26 35 bop_stormtrident}
|
||||||
|
|
||||||
[item]
|
[item]
|
||||||
x=29
|
x=29
|
||||||
|
|
|
@ -100,7 +100,7 @@ Defeat:
|
||||||
[/target]
|
[/target]
|
||||||
[/side]
|
[/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
|
#if the player dares attack Li'sar's escort, they are pounced on by
|
||||||
#many Royal Guards
|
#many Royal Guards
|
||||||
|
|
|
@ -902,8 +902,10 @@ void check_victory(std::map<gamemap::location,unit>& units,
|
||||||
std::vector<int> seen_leaders;
|
std::vector<int> seen_leaders;
|
||||||
for(std::map<gamemap::location,unit>::const_iterator i = units.begin();
|
for(std::map<gamemap::location,unit>::const_iterator i = units.begin();
|
||||||
i != units.end(); ++i) {
|
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());
|
seen_leaders.push_back(i->second.side());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//clear villages for teams that have no leader
|
//clear villages for teams that have no leader
|
||||||
|
|
|
@ -126,7 +126,10 @@ LEVEL_RESULT play_level(game_data& gameinfo, config& game_config,
|
||||||
place_sides_in_preferred_locations(map,unit_cfg);
|
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) {
|
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") {
|
if(first_human_team == -1 && (**ui)["controller"] == "human") {
|
||||||
first_human_team = ui - unit_cfg.begin();
|
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"];
|
const std::string& has_loc = (**ui)["x"];
|
||||||
gamemap::location start_pos(**ui);
|
gamemap::location start_pos(**ui);
|
||||||
|
|
||||||
if(has_loc.empty())
|
if(has_loc.empty()) {
|
||||||
start_pos = map.starting_position(new_unit.side());
|
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) {
|
if(!start_pos.valid() && new_unit.side() == 1) {
|
||||||
throw gamestatus::load_game_failed("No starting position for side 1");
|
throw gamestatus::load_game_failed("No starting position for side 1");
|
||||||
|
|
|
@ -226,6 +226,7 @@ bool theme::set_resolution(const SDL_Rect& screen)
|
||||||
for(i = resolutions.begin(); i != resolutions.end(); ++i) {
|
for(i = resolutions.begin(); i != resolutions.end(); ++i) {
|
||||||
const int width = atoi((**i)["width"].c_str());
|
const int width = atoi((**i)["width"].c_str());
|
||||||
const int height = atoi((**i)["height"].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) {
|
if(screen.w >= width && screen.h >= height) {
|
||||||
std::cerr << "loading theme: " << width << "," << height << "\n";
|
std::cerr << "loading theme: " << width << "," << height << "\n";
|
||||||
current = i;
|
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";
|
std::cerr << "ERROR: No valid resolution found\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,9 +112,7 @@ void menu::change_item(int pos1, int pos2,std::string str)
|
||||||
|
|
||||||
size_t menu::max_items_onscreen() const
|
size_t menu::max_items_onscreen() const
|
||||||
{
|
{
|
||||||
std::cerr << "calculating max items on screen...\n";
|
|
||||||
if(max_items_ != -1) {
|
if(max_items_ != -1) {
|
||||||
std::cerr << "cached: " << max_items_ << "\n";
|
|
||||||
return size_t(max_items_);
|
return size_t(max_items_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,8 +132,6 @@ size_t menu::max_items_onscreen() const
|
||||||
if(sum > max_height && n > 1)
|
if(sum > max_height && n > 1)
|
||||||
--n;
|
--n;
|
||||||
|
|
||||||
std::cerr << "returning max items: " << n << " (" << sum << ")\n";
|
|
||||||
|
|
||||||
return max_items_ = n;
|
return max_items_ = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue