mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
This commit is contained in:
parent
fa43887003
commit
110fc94cb5
1
ai/ai.h
1
ai/ai.h
|
@ -4,6 +4,7 @@
|
||||||
#include "../functions.h"
|
#include "../functions.h"
|
||||||
#include "../network.h"
|
#include "../network.h"
|
||||||
#include "../player.h"
|
#include "../player.h"
|
||||||
|
#include "../command.h"
|
||||||
|
|
||||||
/* How DoCommands look like for an AI */
|
/* How DoCommands look like for an AI */
|
||||||
typedef struct AICommand {
|
typedef struct AICommand {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef CALLBACK_TABLE_H
|
#ifndef CALLBACK_TABLE_H
|
||||||
#define CALLBACK_TABLE_H
|
#define CALLBACK_TABLE_H
|
||||||
|
|
||||||
#include "functions.h"
|
#include "command.h"
|
||||||
|
|
||||||
extern CommandCallback *_callback_table[];
|
extern CommandCallback *_callback_table[];
|
||||||
extern const int _callback_table_count;
|
extern const int _callback_table_count;
|
||||||
|
|
|
@ -195,7 +195,14 @@ static inline bool CmdFailed(int32 res)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* command.c */
|
/* command.c */
|
||||||
|
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
||||||
int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
|
int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc);
|
||||||
|
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd);
|
||||||
|
|
||||||
|
#ifdef ENABLE_NETWORK
|
||||||
|
|
||||||
|
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback);
|
||||||
|
#endif /* ENABLE_NETWORK */
|
||||||
|
|
||||||
extern const char* _cmd_text; // Text, which gets sent with a command
|
extern const char* _cmd_text; // Text, which gets sent with a command
|
||||||
|
|
||||||
|
|
|
@ -132,9 +132,6 @@ bool CheckBridge_Stuff(byte bridge_type, uint bridge_len);
|
||||||
uint32 GetBridgeLength(TileIndex begin, TileIndex end);
|
uint32 GetBridgeLength(TileIndex begin, TileIndex end);
|
||||||
int CalcBridgeLenCostFactor(int x);
|
int CalcBridgeLenCostFactor(int x);
|
||||||
|
|
||||||
typedef void CommandCallback(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
|
||||||
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, uint32 cmd);
|
|
||||||
|
|
||||||
/* network.c */
|
/* network.c */
|
||||||
void NetworkUDPClose(void);
|
void NetworkUDPClose(void);
|
||||||
void NetworkStartUp(void);
|
void NetworkStartUp(void);
|
||||||
|
@ -145,8 +142,6 @@ bool NetworkServerStart(void);
|
||||||
bool NetworkClientConnectGame(const char* host, unsigned short port);
|
bool NetworkClientConnectGame(const char* host, unsigned short port);
|
||||||
void NetworkReboot(void);
|
void NetworkReboot(void);
|
||||||
void NetworkDisconnect(void);
|
void NetworkDisconnect(void);
|
||||||
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback);
|
|
||||||
|
|
||||||
/* misc_cmd.c */
|
/* misc_cmd.c */
|
||||||
void PlaceTreesRandomly(void);
|
void PlaceTreesRandomly(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue