18 #ifndef INCLUDED_MESSAGETYPES 19 #define INCLUDED_MESSAGETYPES 34 #define DEFAULT_MESSAGE_IMPL(name) \ 35 virtual int GetType() const { return MT_##name; } \ 36 virtual const char* GetScriptHandlerName() const { return "On" #name; } \ 37 virtual const char* GetScriptGlobalHandlerName() const { return "OnGlobal" #name; } \ 38 virtual JS::Value ToJSVal(const ScriptInterface& scriptInterface) const; \ 39 static CMessage* FromJSVal(const ScriptInterface&, JS::HandleValue val); 67 turnLength(turnLength)
84 turnLength(turnLength)
100 turnLength(turnLength)
116 turnLength(turnLength)
132 deltaSimTime(deltaSimTime), offset(offset), deltaRealTime(deltaRealTime)
155 collector(collector), frustum(frustum), culling(culling)
181 progressed(progressed), total(total), progress(progress)
252 entity(entity), from(from), to(to)
274 entity(entity), inWorld(inWorld), x(x), z(z), a(a)
294 entity(entity), inWorld(inWorld), pos0(pos0), pos1(pos1)
311 entity(entity), newTerritory(newTerritory)
366 i0(i0), j0(j0), i1(i1), j1(j1)
370 int32_t i0, j0, i1,
j1;
382 player(player), ent(ent), oldVisibility(oldVisibility), newVisibility(newVisibility)
460 : tag(tag), added(added), removed(removed)
464 :
CMessage(), tag(other.tag), added(other.added), removed(other.removed)
485 ticket(ticket), path(path)
503 component(component),
504 valueNames(valueNames)
539 component(component),
540 valueNames(valueNames)
558 entity(entity), oldRange(oldRange), newRange(newRange)
576 entity(entity), player(player), add(add)
621 #endif // INCLUDED_MESSAGETYPES
A simple fixed-point number class.
Definition: Fixed.h:119
bool inWorld
Definition: MessageTypes.h:299
int * progress
Definition: MessageTypes.h:187
entity_id_t entity
Definition: MessageTypes.h:580
Generic per-turn update message, for things that don't care much about ordering.
Definition: MessageTypes.h:61
Definition: MessageTypes.h:44
This is sent immediately after a new entity's components have all been created and initialised...
Definition: MessageTypes.h:213
std::vector< entity_id_t > entities
Definition: MessageTypes.h:508
Definition: ICmpPathfinder.h:36
const CFrustum & frustum
Definition: MessageTypes.h:160
std::wstring component
Definition: MessageTypes.h:545
Sent by CCmpUnitMotion during Update if an event happened that might interest other components...
Definition: MessageTypes.h:322
Sent when ObstructionManager's view of the shape of the world has changed (changing the TILE_OUTOFBOU...
Definition: MessageTypes.h:410
CMessageRangeUpdate(u32 tag, const std::vector< entity_id_t > &added, const std::vector< entity_id_t > &removed)
Definition: MessageTypes.h:459
entity_id_t entity
Definition: MessageTypes.h:243
Sent by CCmpVision when an entity's vision range changes.
Definition: MessageTypes.h:552
player_id_t player
Definition: MessageTypes.h:526
Returned path.
Definition: Pathfinding.h:66
static int ProgressiveLoad()
Definition: main.cpp:296
fixed turnLength
Definition: MessageTypes.h:104
CVector3D pos0
Definition: MessageTypes.h:300
Sent when then obstruction of an entity has changed in a manner that changes 'block movement' propert...
Definition: MessageTypes.h:396
bool * progressed
Definition: MessageTypes.h:185
std::vector< entity_id_t > removed
Definition: MessageTypes.h:446
Sent by CCmpVision when an entity's vision sharing changes.
Definition: MessageTypes.h:570
Add renderable objects to the scene collector.
Definition: MessageTypes.h:149
bool add
Definition: MessageTypes.h:582
Sent when terrain (texture or elevation) has been changed.
Definition: MessageTypes.h:360
Sent by CCmpRangeManager at most once per turn, when an active range query has had matching units ent...
Definition: MessageTypes.h:437
Definition: Vector3D.h:30
fixed turnLength
Definition: MessageTypes.h:71
Sent when water height has been changed.
Definition: MessageTypes.h:347
Definition: MessageTypes.h:615
Definition: ShaderDefines.cpp:30
Update phase for non-formation-controller unit movement.
Definition: MessageTypes.h:94
int32_t j1
Definition: MessageTypes.h:370
entity_angle_t a
Definition: MessageTypes.h:281
entity_id_t entity
Definition: MessageTypes.h:256
float deltaSimTime
Elapsed simulation time since previous interpolate, in seconds.
Definition: MessageTypes.h:138
Sent by atlas if the playercolor has been changed.
Definition: MessageTypes.h:516
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
std::vector< std::wstring > valueNames
Definition: MessageTypes.h:510
float deltaRealTime
Elapsed real time since previous interpolate, in seconds.
Definition: MessageTypes.h:142
This interface accepts renderable objects.
Definition: Scene.h:89
T Interpolate(const T &a, const T &b, float t)
Definition: MathUtil.h:26
UpdateType updateType
Definition: MessageTypes.h:341
entity_pos_t oldRange
Definition: MessageTypes.h:563
uint32_t u32
Definition: types.h:39
int oldVisibility
Definition: MessageTypes.h:388
Final update phase, after all other updates.
Definition: MessageTypes.h:110
CStrW name
Definition: MessageTypes.h:612
CVector3D pos1
Definition: MessageTypes.h:301
bool culling
Definition: MessageTypes.h:161
u32 tag
Definition: MessageTypes.h:444
player_id_t player
Definition: MessageTypes.h:544
This is sent immediately before a destroyed entity is flushed and really destroyed.
Definition: MessageTypes.h:233
entity_id_t ent
Definition: MessageTypes.h:387
player_id_t from
Definition: MessageTypes.h:257
Definition: MessageTypes.h:246
Broadcast after the entire simulation state has been deserialized.
Definition: MessageTypes.h:198
Definition: MessageTypes.h:328
Sent when an entity pings the minimap.
Definition: MessageTypes.h:588
Definition: MessageTypes.h:329
player_id_t to
Definition: MessageTypes.h:258
Sent by aura manager when a value of a certain entity's component is changed.
Definition: MessageTypes.h:496
Sent by CCmpPosition whenever anything has changed that will affect the return value of GetInterpolat...
Definition: MessageTypes.h:288
Sent, at most once per turn, when the visibility of an entity changed.
Definition: MessageTypes.h:376
static const std::array< const char *, UpdateType::LENGTH > UpdateTypeStr
Definition: MessageTypes.h:335
float offset
Range [0, 1] (inclusive); fractional time of current frame between previous/next simulation turns...
Definition: MessageTypes.h:140
std::vector< std::wstring > valueNames
Definition: MessageTypes.h:546
entity_id_t entity
Definition: MessageTypes.h:298
Sent by CCmpPosition whenever anything has changed that will affect the return value of GetPosition2D...
Definition: MessageTypes.h:268
CMessageRangeUpdate(u32 tag)
Definition: MessageTypes.h:456
CMessageRangeUpdate(const CMessageRangeUpdate &other)
Definition: MessageTypes.h:463
int * total
Definition: MessageTypes.h:186
entity_id_t entity
Definition: MessageTypes.h:223
u32 ticket
Definition: MessageTypes.h:489
WaypointPath path
Definition: MessageTypes.h:490
player_id_t player
Definition: MessageTypes.h:386
entity_pos_t newRange
Definition: MessageTypes.h:564
entity_id_t entity
Definition: MessageTypes.h:278
Sent by aura and tech managers when a value of a certain template's component is changed.
Definition: MessageTypes.h:532
Definition: MessageTypes.h:305
CMessageMotionUpdate(UpdateType ut)
Definition: MessageTypes.h:337
UpdateType
Definition: MessageTypes.h:327
Handle progressive loading of resources.
Definition: MessageTypes.h:175
Sent by CCmpPathfinder after async path requests.
Definition: MessageTypes.h:479
SceneCollector & collector
Definition: MessageTypes.h:159
player_id_t newTerritory
Definition: MessageTypes.h:316
Definition: MessageTypes.h:331
#define DEFAULT_MESSAGE_IMPL(name)
Definition: MessageTypes.h:34
Definition: MessageTypes.h:330
CMessageRangeUpdate & operator=(const CMessageRangeUpdate &other)
Definition: MessageTypes.h:467
Sent when territory assignments have changed.
Definition: MessageTypes.h:423
Prepare for rendering a new frame (set up model positions etc).
Definition: MessageTypes.h:126
int newVisibility
Definition: MessageTypes.h:389
fixed turnLength
Definition: MessageTypes.h:120
Cinematics events.
Definition: MessageTypes.h:602
u32 entity_id_t
Entity ID type.
Definition: Entity.h:23
bool inWorld
Definition: MessageTypes.h:279
std::wstring component
Definition: MessageTypes.h:509
player_id_t player
Definition: MessageTypes.h:581
entity_pos_t z
Definition: MessageTypes.h:280
entity_id_t entity
Definition: MessageTypes.h:562
entity_id_t entity
Definition: MessageTypes.h:315
std::vector< entity_id_t > added
Definition: MessageTypes.h:445