00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __COMMANDS_H__
00031 #define __COMMANDS_H__
00032
00034
00035 #include "unit.h"
00036
00037
00038
00039
00040
00041 class CFile;
00042 class CUnitType;
00043 class CUpgrade;
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00057 extern void SendCommandStopUnit(CUnit &unit);
00059 extern void SendCommandStandGround(CUnit &unit, int flush);
00061 extern void SendCommandFollow(CUnit &unit, CUnit &dest, int flush);
00063 extern void SendCommandMove(CUnit &unit, const Vec2i &pos, int flush);
00065 extern void SendCommandRepair(CUnit &unit, const Vec2i &pos, CUnit *dest, int flush);
00067 extern void SendCommandAutoRepair(CUnit &unit, int on);
00069 extern void SendCommandAttack(CUnit &unit, const Vec2i &pos, CUnit *dest, int flush);
00071 extern void SendCommandAttackGround(CUnit &unit, const Vec2i &pos, int flush);
00073 extern void SendCommandPatrol(CUnit &unit, const Vec2i &pos, int flush);
00075 extern void SendCommandBoard(CUnit &unit, CUnit &dest, int flush);
00077 extern void SendCommandUnload(CUnit &unit, const Vec2i &pos, CUnit *what, int flush);
00079 extern void SendCommandBuildBuilding(CUnit &unit, const Vec2i &pos, CUnitType &what, int flush);
00081 extern void SendCommandDismiss(CUnit &unit);
00083 extern void SendCommandResourceLoc(CUnit &unit, const Vec2i &pos, int flush);
00085 extern void SendCommandResource(CUnit &unit, CUnit &dest, int flush);
00087 extern void SendCommandReturnGoods(CUnit &unit, CUnit *dest, int flush);
00089 extern void SendCommandTrainUnit(CUnit &unit, CUnitType &what, int flush);
00091 extern void SendCommandCancelTraining(CUnit &unit, int slot, const CUnitType *type);
00093 extern void SendCommandUpgradeTo(CUnit &unit, CUnitType &what, int flush);
00095 extern void SendCommandCancelUpgradeTo(CUnit &unit);
00097 extern void SendCommandResearch(CUnit &unit, CUpgrade *what, int flush);
00099 extern void SendCommandCancelResearch(CUnit &unit);
00101 extern void SendCommandSpellCast(CUnit &unit, const Vec2i &pos, CUnit *dest, int spellid, int flush);
00103 extern void SendCommandAutoSpellCast(CUnit &unit, int spellid, int on);
00105 extern void SendCommandSetResource(int player, int resource, int value);
00107 extern void SendCommandDiplomacy(int player, int state, int opponent);
00109 extern void SendCommandSharedVision(int player, bool state, int opponent);
00110
00112 extern void ParseCommand(unsigned char type, UnitRef unum, unsigned short x,
00113 unsigned short y, UnitRef dest);
00115 extern void ParseExtendedCommand(unsigned char type, int status,
00116 unsigned char arg1, unsigned short arg2, unsigned short arg3,
00117 unsigned short arg4);
00118
00120
00121 #endif // !__COMMANDS_H__