Debian Codegraph @

engine/include/commands.h

raw
1 // ____ _ __
2 // / __ )____ _____ | | / /___ ___________
3 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
4 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
5 // /_____/\____/____/ |__/|__/\__,_/_/ /____/
6 //
7 // A futuristic real-time strategy game.
8 // This file is part of Bos Wars.
9 //
10 /**@name commands.h - The commands header file. */
11 //
12 // (c) Copyright 1998-2007 by Lutz Sammer and Jimmy Salmon
13 //
14 // This program is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; only version 2 of the License.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 // 02111-1307, USA.
27
28 #ifndef __COMMANDS_H__
29 #define __COMMANDS_H__
30
31 //@{
32
33 #include "unit.h"
34
35 /*----------------------------------------------------------------------------
36 -- Declarations
37 ----------------------------------------------------------------------------*/
38
39 class CUnitType;
40
41 /*----------------------------------------------------------------------------
42 -- Functions
43 ----------------------------------------------------------------------------*/
44
45 /*
46 ** The send command functions sends a command, if needed over the
47 ** Network, this is only for user commands. Automatic reactions which
48 ** are on all computers equal, should use the functions without Send.
49 */
50
51 /// Send stop command
52 extern void SendCommandStopUnit(CUnit *unit);
53 /// Send stand ground command
54 extern void SendCommandStandGround(CUnit *unit, int flush);
55 /// Send follow command
56 extern void SendCommandFollow(CUnit *unit, CUnit *dest,
57 int flush);
58 /// Send move command
59 extern void SendCommandMove(CUnit *unit, int x, int y, int flush);
60 /// Send repair command
61 extern void SendCommandRepair(CUnit *unit, int x, int y,
62 CUnit *dest, int flush);
63 /// Send auto repair command
64 extern void SendCommandAutoRepair(CUnit *unit, int on);
65 /// Send attack command
66 extern void SendCommandAttack(CUnit *unit, int x, int y,
67 CUnit *dest, int flush);
68 /// Send attack ground command
69 extern void SendCommandAttackGround(CUnit *unit, int x, int y,
70 int flush);
71 /// Send patrol command
72 extern void SendCommandPatrol(CUnit *unit, int x, int y, int flush);
73 /// Send board command
74 extern void SendCommandBoard(CUnit *unit, int x, int y,
75 CUnit *dest, int flush);
76 /// Send unload command
77 extern void SendCommandUnload(CUnit *unit, int x, int y,
78 CUnit *what, int flush);
79 /// Send build building command
80 extern void SendCommandBuildBuilding(CUnit *unit, int x, int y,
81 CUnitType *what, int flush);
82 /// Send cancel building command
83 extern void SendCommandDismiss(CUnit *unit);
84 /// Send harvest command
85 extern void SendCommandResource(CUnit *unit, CUnit *dest,
86 int flush);
87 /// Send train command
88 extern void SendCommandTrainUnit(CUnit *unit,
89 CUnitType *what, int flush);
90 /// Send cancel training command
91 extern void SendCommandCancelTraining(CUnit *unit, int slot,
92 const CUnitType *type);
93 /// Send spell cast command
94 extern void SendCommandSpellCast(CUnit *unit, int x, int y,
95 CUnit *dest, int spellid, int flush);
96 /// Send auto spell cast command
97 extern void SendCommandAutoSpellCast(CUnit *unit, int spellid,
98 int on);
99 /// Send diplomacy command
100 extern void SendCommandDiplomacy(int player, int state, int opponent);
101 /// Send shared vision command
102 extern void SendCommandSharedVision(int player, bool state, int opponent);
103
104 /// Parse a command (from network).
105 extern void ParseCommand(unsigned char type, UnitRef unum, unsigned short x,
106 unsigned short y, UnitRef dest);
107 /// Parse an extended command (from network).
108 extern void ParseExtendedCommand(unsigned char type, int status,
109 unsigned char arg1, unsigned short arg2, unsigned short arg3,
110 unsigned short arg4);
111
112 //@}
113
114 #endif // !__COMMANDS_H__