ai_execmode.cpp

Go to the documentation of this file.
00001 /* $Id: ai_execmode.cpp 15060 2009-01-13 15:44:36Z smatz $ */
00002 
00005 #include "ai_execmode.hpp"
00006 #include "../../command_type.h"
00007 
00008 bool AIExecMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs)
00009 {
00010   /* In execution mode we only return 'true', telling the DoCommand it
00011    *  should continue with the real execution of the command. */
00012   return true;
00013 }
00014 
00015 AIExecMode::AIExecMode()
00016 {
00017   this->last_mode     = this->GetDoCommandMode();
00018   this->last_instance = this->GetDoCommandModeInstance();
00019   this->SetDoCommandMode(&AIExecMode::ModeProc, this);
00020 }
00021 
00022 AIExecMode::~AIExecMode()
00023 {
00024   assert(this->GetDoCommandModeInstance() == this);
00025   this->SetDoCommandMode(this->last_mode, this->last_instance);
00026 }

Generated on Fri Jul 31 22:33:12 2009 for OpenTTD by  doxygen 1.5.6