(svn r11677) -Codechange: move price and command related types/functions to their respective places.

This commit is contained in:
rubidium
2007-12-21 21:50:46 +00:00
parent 65754b8d12
commit 9e9cfe6e59
89 changed files with 425 additions and 414 deletions

View File

@@ -3,7 +3,7 @@
#include "../stdafx.h"
#include "../openttd.h"
#include "../variables.h"
#include "../command.h"
#include "../command_func.h"
#include "../network/network.h"
#include "../helpers.hpp"
#include "ai.h"
@@ -45,7 +45,7 @@ static void AI_DequeueCommands(PlayerID player)
* Needed for SP; we need to delay DoCommand with 1 tick, because else events
* will make infinite loops (AIScript).
*/
static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCallback* callback)
static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uint32 p2, uint32 procc, CommandCallback* callback)
{
AICommand *com;
@@ -81,7 +81,7 @@ static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uin
/**
* Executes a raw DoCommand for the AI.
*/
CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc, CommandCallback* callback)
CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint32 procc, CommandCallback* callback)
{
PlayerID old_lp;
CommandCost res;
@@ -104,10 +104,6 @@ CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, u
/* Restore _cmd_text */
_cmd_text = tmp_cmdtext;
/* If we did a DC_EXEC, and the command did not return an error, execute it
* over the network */
if (flags & DC_NO_WATER) procc |= CMD_NO_WATER;
/* NetworkSend_Command needs _local_player to be set correctly, so
* adjust it, and put it back right after the function */
old_lp = _local_player;
@@ -134,7 +130,7 @@ CommandCost AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, u
}
CommandCost AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc)
CommandCost AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint32 procc)
{
return AI_DoCommandCc(tile, p1, p2, flags, procc, NULL);
}

View File

@@ -6,7 +6,7 @@
#include "../functions.h"
#include "../network/network.h"
#include "../player.h"
#include "../command.h"
#include "../command_type.h"
/* How DoCommands look like for an AI */
struct AICommand {
@@ -14,7 +14,7 @@ struct AICommand {
uint32 p1;
uint32 p2;
uint32 procc;
CommandCallback* callback;
CommandCallback *callback;
char *text;
uint uid;

View File

@@ -15,12 +15,11 @@
#include "../../tunnel_map.h"
#include "../../vehicle.h"
#include "../../engine.h"
#include "../../command.h"
#include "../../command_func.h"
#include "../../town.h"
#include "../../industry.h"
#include "../../station.h"
#include "../../pathfind.h"
#include "../../economy.h"
#include "../../airport.h"
#include "../../depot.h"
#include "../../variables.h"

View File

@@ -7,7 +7,7 @@
#include "../../map.h"
#include "../../road_map.h"
#include "../../vehicle.h"
#include "../../command.h"
#include "../../command_func.h"
#include "trolly.h"
#include "../../engine.h"
#include "../../station.h"

View File

@@ -6,7 +6,7 @@
#include "../../debug.h"
#include "../../functions.h"
#include "../../map.h"
#include "../../command.h"
#include "../../command_func.h"
#include "trolly.h"
#include "../../depot.h"
#include "../../tunnel_map.h"

View File

@@ -25,7 +25,7 @@
#include "../../station_map.h"
#include "table/strings.h"
#include "../../map.h"
#include "../../command.h"
#include "../../command_func.h"
#include "trolly.h"
#include "../../town.h"
#include "../../industry.h"