moves include of global.hpp to the very beginning of attack_prediction...
...to silence some vc++ warnings adds support for upload_log again (i thought i checked everything but this must have been slipped through)
This commit is contained in:
parent
fbb1a96d60
commit
f0f3a5b873
4 changed files with 17 additions and 8 deletions
|
@ -15,12 +15,12 @@
|
|||
This code has lots of debugging. It is there for a reason: this
|
||||
code is kinda tricky. Do not remove it.
|
||||
*/
|
||||
#include "attack_prediction.hpp"
|
||||
|
||||
#include <cstring> // For memset
|
||||
#include <vector>
|
||||
|
||||
#include "global.hpp"
|
||||
#include "wassert.hpp"
|
||||
#include "attack_prediction.hpp"
|
||||
|
||||
// Compile with -O3 -DBENCHMARK for speed testing, -DCHECK for testing
|
||||
// correctness (run tools/wesnoth-attack-sim.c --check on output)
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
#ifndef ATTACK_PREDICTION_H_INCLUDED
|
||||
#define ATTACK_PREDICTION_H_INCLUDED
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <vector>
|
||||
#include "actions.hpp"
|
||||
|
||||
// This encapsulates all we need to know for this combat.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "playsingle_controller.hpp"
|
||||
|
||||
#include "ai_interface.hpp"
|
||||
#include "game_errors.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "intro.hpp"
|
||||
#include "marked-up_text.hpp"
|
||||
|
@ -126,6 +127,12 @@ LEVEL_RESULT playsingle_controller::play_scenario(const std::vector<config*>& st
|
|||
|
||||
LOG_NG << "entering try... " << (SDL_GetTicks() - ticks_) << "\n";
|
||||
try {
|
||||
// log before prestart events: they do weird things.
|
||||
if (first_human_team_ != -1) {
|
||||
log.start(gamestate_, teams_[first_human_team_], first_human_team_ + 1, units_,
|
||||
loading_game_ ? gamestate_.get_variable("turn_number") : "", status_.number_of_turns());
|
||||
}
|
||||
|
||||
fire_prestart(!loading_game_);
|
||||
init_gui();
|
||||
|
||||
|
@ -134,13 +141,17 @@ LEVEL_RESULT playsingle_controller::play_scenario(const std::vector<config*>& st
|
|||
fire_start(!loading_game_);
|
||||
gui_->recalculate_minimap();
|
||||
|
||||
bool replaying_ = (recorder.at_end() == false);
|
||||
replaying_ = (recorder.at_end() == false);
|
||||
|
||||
LOG_NG << "starting main loop\n" << (SDL_GetTicks() - ticks_) << "\n";
|
||||
for(; ; first_player_ = 0) {
|
||||
play_turn();
|
||||
} //end for loop
|
||||
|
||||
} catch(game::load_game_exception&) {
|
||||
// Loading a new game is effectively a quit.
|
||||
log.quit(status_.turn());
|
||||
throw;
|
||||
} catch(end_level_exception& end_level) {
|
||||
bool obs = team_manager_.is_observer();
|
||||
if (end_level.result == DEFEAT || end_level.result == VICTORY) {
|
||||
|
|
|
@ -677,10 +677,6 @@ SOURCE=.\src\font.hpp
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\game.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\game_config.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
Loading…
Add table
Reference in a new issue