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 ScriptRequest& rq) const; \
39 static CMessage* FromJSVal(const ScriptRequest&, JS::HandleValue val);
T Interpolate(const T &a, const T &b, float t)
Definition: MathUtil.h:26
#define DEFAULT_MESSAGE_IMPL(name)
Definition: MessageTypes.h:34
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
A simple fixed-point number class.
Definition: Fixed.h:120
Cinematics events.
Definition: MessageTypes.h:588
CStrW name
Definition: MessageTypes.h:597
Definition: MessageTypes.h:601
This is sent immediately after a new entity's components have all been created and initialised.
Definition: MessageTypes.h:214
entity_id_t entity
Definition: MessageTypes.h:223
Broadcast after the entire simulation state has been deserialized.
Definition: MessageTypes.h:199
This is sent immediately before a destroyed entity is flushed and really destroyed.
Definition: MessageTypes.h:234
entity_id_t entity
Definition: MessageTypes.h:243
Prepare for rendering a new frame (set up model positions etc).
Definition: MessageTypes.h:127
float deltaRealTime
Elapsed real time since previous interpolate, in seconds.
Definition: MessageTypes.h:142
float deltaSimTime
Elapsed simulation time since previous interpolate, in seconds.
Definition: MessageTypes.h:138
float offset
Range [0, 1] (inclusive); fractional time of current frame between previous/next simulation turns.
Definition: MessageTypes.h:140
Sent by CCmpPosition whenever anything has changed that will affect the return value of GetInterpolat...
Definition: MessageTypes.h:289
entity_id_t entity
Definition: MessageTypes.h:298
CVector3D pos0
Definition: MessageTypes.h:300
CVector3D pos1
Definition: MessageTypes.h:301
bool inWorld
Definition: MessageTypes.h:299
Sent when an entity pings the minimap.
Definition: MessageTypes.h:574
Sent by CCmpUnitMotion during Update if an event happened that might interest other components.
Definition: MessageTypes.h:308
CMessageMotionUpdate(UpdateType ut)
Definition: MessageTypes.h:322
UpdateType updateType
Definition: MessageTypes.h:326
UpdateType
Definition: MessageTypes.h:312
@ LENGTH
Definition: MessageTypes.h:317
@ LIKELY_FAILURE
Definition: MessageTypes.h:314
@ VERY_OBSTRUCTED
Definition: MessageTypes.h:316
@ LIKELY_SUCCESS
Definition: MessageTypes.h:313
@ OBSTRUCTED
Definition: MessageTypes.h:315
static const std::array< const char *, UpdateType::LENGTH > UpdateTypeStr
Definition: MessageTypes.h:320
Sent when then obstruction of an entity has changed in a manner that changes 'block movement' propert...
Definition: MessageTypes.h:382
Sent when ObstructionManager's view of the shape of the world has changed (changing the TILE_OUTOFBOU...
Definition: MessageTypes.h:396
Definition: MessageTypes.h:247
player_id_t to
Definition: MessageTypes.h:258
entity_id_t entity
Definition: MessageTypes.h:256
player_id_t from
Definition: MessageTypes.h:257
Sent by CCmpPathfinder after async path requests.
Definition: MessageTypes.h:465
WaypointPath path
Definition: MessageTypes.h:475
u32 ticket
Definition: MessageTypes.h:474
Sent by atlas if the playercolor has been changed.
Definition: MessageTypes.h:502
player_id_t player
Definition: MessageTypes.h:511
Sent by CCmpPosition whenever anything has changed that will affect the return value of GetPosition2D...
Definition: MessageTypes.h:269
bool inWorld
Definition: MessageTypes.h:279
entity_id_t entity
Definition: MessageTypes.h:278
entity_pos_t x
Definition: MessageTypes.h:280
entity_angle_t a
Definition: MessageTypes.h:281
entity_pos_t z
Definition: MessageTypes.h:280
Handle progressive loading of resources.
Definition: MessageTypes.h:176
int * progress
Definition: MessageTypes.h:187
bool * progressed
Definition: MessageTypes.h:185
int * total
Definition: MessageTypes.h:186
Sent by CCmpRangeManager at most once per turn, when an active range query has had matching units ent...
Definition: MessageTypes.h:423
CMessageRangeUpdate(u32 tag)
Definition: MessageTypes.h:441
CMessageRangeUpdate & operator=(const CMessageRangeUpdate &other)
Definition: MessageTypes.h:452
std::vector< entity_id_t > removed
Definition: MessageTypes.h:431
CMessageRangeUpdate(const CMessageRangeUpdate &other)
Definition: MessageTypes.h:448
std::vector< entity_id_t > added
Definition: MessageTypes.h:430
CMessageRangeUpdate(u32 tag, const std::vector< entity_id_t > &added, const std::vector< entity_id_t > &removed)
Definition: MessageTypes.h:444
u32 tag
Definition: MessageTypes.h:429
Add renderable objects to the scene collector.
Definition: MessageTypes.h:150
bool culling
Definition: MessageTypes.h:161
SceneCollector & collector
Definition: MessageTypes.h:159
const CFrustum & frustum
Definition: MessageTypes.h:160
Sent by aura and tech managers when a value of a certain template's component is changed.
Definition: MessageTypes.h:518
std::vector< std::wstring > valueNames
Definition: MessageTypes.h:531
std::wstring component
Definition: MessageTypes.h:530
player_id_t player
Definition: MessageTypes.h:529
Sent when terrain (texture or elevation) has been changed.
Definition: MessageTypes.h:346
int32_t i1
Definition: MessageTypes.h:355
int32_t j0
Definition: MessageTypes.h:355
int32_t i0
Definition: MessageTypes.h:355
int32_t j1
Definition: MessageTypes.h:355
Sent when territory assignments have changed.
Definition: MessageTypes.h:409
Definition: MessageTypes.h:45
Final update phase, after all other updates.
Definition: MessageTypes.h:111
fixed turnLength
Definition: MessageTypes.h:120
Update phase for non-formation-controller unit movement.
Definition: MessageTypes.h:95
fixed turnLength
Definition: MessageTypes.h:104
Generic per-turn update message, for things that don't care much about ordering.
Definition: MessageTypes.h:62
fixed turnLength
Definition: MessageTypes.h:71
Sent by aura manager when a value of a certain entity's component is changed.
Definition: MessageTypes.h:482
std::vector< entity_id_t > entities
Definition: MessageTypes.h:493
std::vector< std::wstring > valueNames
Definition: MessageTypes.h:495
std::wstring component
Definition: MessageTypes.h:494
Sent, at most once per turn, when the visibility of an entity changed.
Definition: MessageTypes.h:362
int oldVisibility
Definition: MessageTypes.h:373
player_id_t player
Definition: MessageTypes.h:371
entity_id_t ent
Definition: MessageTypes.h:372
int newVisibility
Definition: MessageTypes.h:374
Sent by CCmpVision when an entity's vision range changes.
Definition: MessageTypes.h:538
entity_pos_t oldRange
Definition: MessageTypes.h:548
entity_pos_t newRange
Definition: MessageTypes.h:549
entity_id_t entity
Definition: MessageTypes.h:547
Sent by CCmpVision when an entity's vision sharing changes.
Definition: MessageTypes.h:556
player_id_t player
Definition: MessageTypes.h:566
entity_id_t entity
Definition: MessageTypes.h:565
bool add
Definition: MessageTypes.h:567
Sent when water height has been changed.
Definition: MessageTypes.h:333
Definition: Vector3D.h:31
This interface accepts renderable objects.
Definition: Scene.h:90
static int ProgressiveLoad()
Definition: main.cpp:303
Definition: ShaderDefines.cpp:31
u32 entity_id_t
Entity ID type.
Definition: Entity.h:29
Definition: ICmpPathfinder.h:37
Returned path.
Definition: Pathfinding.h:67
uint32_t u32
Definition: types.h:39