File: EventClient.cpp

package info (click to toggle)
spring 0.81.2.1%2Bdfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,496 kB
  • ctags: 37,096
  • sloc: cpp: 238,659; ansic: 13,784; java: 12,175; awk: 3,428; python: 1,159; xml: 738; perl: 405; sh: 297; makefile: 267; pascal: 228; objc: 192
file content (144 lines) | stat: -rw-r--r-- 6,173 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#include "StdAfx.h"
// EventClient.cpp: implementation of the CEventClient class.
//
//////////////////////////////////////////////////////////////////////

#include "EventClient.h"
using std::string;

/******************************************************************************/
/******************************************************************************/

CEventClient::CEventClient(const string& _name, int _order, bool _synced)
: name(_name),
  order(_order),
  synced(_synced)
{
}


CEventClient::~CEventClient()
{
}


/******************************************************************************/
/******************************************************************************/
//
//  Synced
//

void CEventClient::GamePreload() { return; }
void CEventClient::GameStart() { return; }
void CEventClient::GameOver() { return; }
void CEventClient::TeamDied(int teamID) { return; }
void CEventClient::TeamChanged(int teamID) { return; }
void CEventClient::PlayerChanged(int playerID) { return; }
void CEventClient::PlayerRemoved(int playerID, int reason) { return; }

void CEventClient::UnitCreated(const CUnit* unit, const CUnit* builder) { return; }
void CEventClient::UnitFinished(const CUnit* unit) { return; }
void CEventClient::UnitFromFactory(const CUnit* unit, const CUnit* factory,
                                   bool userOrders) { return; }
void CEventClient::UnitDestroyed(const CUnit* unit, const CUnit* attacker) { return; }
void CEventClient::UnitTaken(const CUnit* unit, int newTeam) { return; }
void CEventClient::UnitGiven(const CUnit* unit, int oldTeam) { return; }

void CEventClient::UnitIdle(const CUnit* unit) { return; }
void CEventClient::UnitCommand(const CUnit* unit, const Command& command) { return; }
void CEventClient::UnitCmdDone(const CUnit* unit, int cmdType, int cmdTag) { return; }
void CEventClient::UnitDamaged(const CUnit* unit, const CUnit* attacker,
                               float damage, int weaponID, bool paralyzer) { return; }
void CEventClient::UnitExperience(const CUnit* unit, float oldExperience) { return; }

void CEventClient::UnitSeismicPing(const CUnit* unit, int allyTeam,
                             const float3& pos, float strength) { return; }
void CEventClient::UnitEnteredRadar(const CUnit* unit, int allyTeam) { return; }
void CEventClient::UnitEnteredLos(const CUnit* unit, int allyTeam) { return; }
void CEventClient::UnitLeftRadar(const CUnit* unit, int allyTeam) { return; }
void CEventClient::UnitLeftLos(const CUnit* unit, int allyTeam) { return; }

void CEventClient::UnitEnteredWater(const CUnit* unit) { return; }
void CEventClient::UnitEnteredAir(const CUnit* unit) { return; }
void CEventClient::UnitLeftWater(const CUnit* unit) { return; }
void CEventClient::UnitLeftAir(const CUnit* unit) { return; }

void CEventClient::UnitLoaded(const CUnit* unit, const CUnit* transport) { return; }
void CEventClient::UnitUnloaded(const CUnit* unit, const CUnit* transport) { return; }

void CEventClient::UnitCloaked(const CUnit* unit) { return; }
void CEventClient::UnitDecloaked(const CUnit* unit) { return; }

void CEventClient::UnitMoveFailed(const CUnit* unit) { return; }

void CEventClient::FeatureCreated(const CFeature* feature) { return; }
void CEventClient::FeatureDestroyed(const CFeature* feature) { return; }

void CEventClient::ProjectileCreated(const CProjectile* proj) { return; }
void CEventClient::ProjectileDestroyed(const CProjectile* proj) { return; }

void CEventClient::StockpileChanged(const CUnit* unit,
                                    const CWeapon* weapon, int oldCount) { return; }

bool CEventClient::Explosion(int weaponID, const float3& pos, const CUnit* owner)
{
  return false;
}


/******************************************************************************/
/******************************************************************************/
//
//  Unsynced
//

void CEventClient::Update() { return; }

void CEventClient::ViewResize() { return; }

bool CEventClient::DefaultCommand(const CUnit* unit, const CFeature* feature, int& cmd)
{
  return false;
}

void CEventClient::DrawGenesis() { return; }
void CEventClient::DrawWorld() { return; }
void CEventClient::DrawWorldPreUnit() { return; }
void CEventClient::DrawWorldShadow() { return; }
void CEventClient::DrawWorldReflection() { return; }
void CEventClient::DrawWorldRefraction() { return; }
void CEventClient::DrawScreenEffects() { return; }
void CEventClient::DrawScreen() { return; }
void CEventClient::DrawInMiniMap() { return; }

// from LuaUI
bool CEventClient::KeyPress(unsigned short key, bool isRepeat) { return false; }
bool CEventClient::KeyRelease(unsigned short key) { return false; }
bool CEventClient::MouseMove(int x, int y, int dx, int dy, int button) { return false; }
bool CEventClient::MousePress(int x, int y, int button) { return false; }
int  CEventClient::MouseRelease(int x, int y, int button) { return -1; } // FIXME - bool / void?
bool CEventClient::MouseWheel(bool up, float value) { return false; }
bool CEventClient::JoystickEvent(const std::string& event, int val1, int val2) { return false; }
bool CEventClient::IsAbove(int x, int y) { return false; }
string CEventClient::GetTooltip(int x, int y) { return ""; }

bool CEventClient::CommandNotify(const Command& cmd) { return false; }

bool CEventClient::AddConsoleLine(const string& msg, const CLogSubsystem& subsystem) { return false; }

bool CEventClient::GroupChanged(int groupID) { return false; }

bool CEventClient::GameSetup(const string& state, bool& ready,
                             const map<int, string>& playerStates) { return false; }

string CEventClient::WorldTooltip(const CUnit* unit,
                                 const CFeature* feature,
                                 const float3* groundPos) { return false; }

bool CEventClient::MapDrawCmd(int playerID, int type,
                        const float3* pos0,
                        const float3* pos1,
                        const string* label) { return false; }

/******************************************************************************/
/******************************************************************************/