~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/ai/api/ai_execmode.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: ai_execmode.cpp 15060 2009-01-13 15:44:36Z smatz $ */
 
2
 
 
3
/** @file ai_execmode.cpp Implementation of AIExecMode. */
 
4
 
 
5
#include "ai_execmode.hpp"
 
6
#include "../../command_type.h"
 
7
 
 
8
bool AIExecMode::ModeProc(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs)
 
9
{
 
10
        /* In execution mode we only return 'true', telling the DoCommand it
 
11
         *  should continue with the real execution of the command. */
 
12
        return true;
 
13
}
 
14
 
 
15
AIExecMode::AIExecMode()
 
16
{
 
17
        this->last_mode     = this->GetDoCommandMode();
 
18
        this->last_instance = this->GetDoCommandModeInstance();
 
19
        this->SetDoCommandMode(&AIExecMode::ModeProc, this);
 
20
}
 
21
 
 
22
AIExecMode::~AIExecMode()
 
23
{
 
24
        assert(this->GetDoCommandModeInstance() == this);
 
25
        this->SetDoCommandMode(this->last_mode, this->last_instance);
 
26
}