3#include <boost/variant/variant.hpp>
CellType
Definition: celltype.hpp:3
ActionType
Definition: event.hpp:49
EventType
Definition: event.hpp:31
boost::variant< ChangeFacingEvent, LobbyActionEvent, LoadGameStateEvent, LoadSoundCommandsEvent, StartActionEvent, StopActionEvent, MoveRelativeEvent, MoveAbsoluteEvent, SpawnEntityEvent, SelectItemEvent, UseItemEvent, UpdateLightSourcesEvent, DropItemEvent, TrapPlacementEvent, LoadIntroCutsceneEvent > EventData
Definition: event.hpp:343
std::ostream & operator<<(std::ostream &os, const EventType &type)
Definition: event.cpp:14
PlayerRole
Definition: event.hpp:82
GLboolean * data
Definition: glad.h:1600
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glad.h:1531
#define MAX_POINT_LIGHTS
Definition: constants.hpp:7
GamePhase
Definition: sharedgamestate.hpp:20
ChangeFacingEvent(EntityID entity_to_change_face, glm::vec3 facing)
Definition: event.hpp:66
EntityID entity_to_change_face
Definition: event.hpp:69
DEF_SERIALIZE(Archive &ar, const unsigned int version)
some velocity / movement information...
Definition: event.hpp:72
ChangeFacingEvent()
Definition: event.hpp:65
glm::vec3 facing
Definition: event.hpp:68
Definition: event.hpp:275
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:281
EntityID playerEID
Definition: event.hpp:279
DropItemEvent()
Definition: event.hpp:276
DropItemEvent(EntityID playerEID)
Definition: event.hpp:277
Definition: event.hpp:348
EntityID evt_source
who is attempting to trigger this event (if client -> server) or who is triggering this event (if ser...
Definition: event.hpp:355
Event()
Definition: event.hpp:349
Event(EntityID evt_source, EventType type, EventData data)
Definition: event.hpp:350
EventType type
The type of event. This actually might not be needed because I think boost::variant has a tag built i...
Definition: event.hpp:358
EventData data
All of the different kinds of event data that you might have. Depending on the value of type,...
Definition: event.hpp:361
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:363
Definition: config.hpp:12
Definition: event.hpp:115
SharedGameState state
Definition: event.hpp:120
LoadGameStateEvent()
Definition: event.hpp:117
LoadGameStateEvent(const SharedGameState &state)
Definition: event.hpp:118
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:122
Definition: event.hpp:303
LoadIntroCutsceneEvent()=default
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:318
EntityID pov_eid
Definition: event.hpp:314
std::array< boost::optional< SharedObject >, MAX_POINT_LIGHTS > lights
Definition: event.hpp:316
LoadIntroCutsceneEvent(const SharedGameState &state, EntityID pov_eid, EntityID dm_eid, const std::array< boost::optional< SharedObject >, MAX_POINT_LIGHTS > &lights)
Definition: event.hpp:306
EntityID dm_eid
Definition: event.hpp:315
SharedGameState state
Definition: event.hpp:313
Definition: event.hpp:130
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:137
LoadSoundCommandsEvent(const std::vector< SoundCommand > &commands)
Definition: event.hpp:133
std::vector< SoundCommand > commands
Definition: event.hpp:135
LoadSoundCommandsEvent()=default
Action action
Definition: event.hpp:104
Action
Definition: event.hpp:95
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:107
PlayerRole role
Definition: event.hpp:105
LobbyActionEvent(Action action, PlayerRole role)
Definition: event.hpp:101
LobbyActionEvent()
Definition: event.hpp:100
Definition: event.hpp:210
EntityID entity_to_move
Definition: event.hpp:214
MoveAbsoluteEvent(EntityID entity_to_move)
Definition: event.hpp:212
DEF_SERIALIZE(Archive &ar, const unsigned int version)
some velocity / movement information...
Definition: event.hpp:217
MoveAbsoluteEvent()
Definition: event.hpp:211
Definition: event.hpp:194
MoveRelativeEvent(EntityID entity_to_move, glm::vec3 movement)
Definition: event.hpp:196
EntityID entity_to_move
Definition: event.hpp:199
glm::vec3 movement
Definition: event.hpp:198
MoveRelativeEvent()
Definition: event.hpp:195
DEF_SERIALIZE(Archive &ar, const unsigned int version)
some velocity / movement information...
Definition: event.hpp:202
Definition: event.hpp:245
SelectItemEvent(EntityID playerEID, int itemNum)
Definition: event.hpp:247
EntityID playerEID
Definition: event.hpp:249
SelectItemEvent()
Definition: event.hpp:246
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:252
int itemNum
Definition: event.hpp:250
The SharedGameState is a representation of the ServerGameState instance maintained by the server and ...
Definition: sharedgamestate.hpp:167
Definition: event.hpp:225
SpawnEntityEvent(EntityID new_id, int entity_type)
Definition: event.hpp:227
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:237
int entity_type
What kind of entity to spawn.
Definition: event.hpp:232
SpawnEntityEvent()
Definition: event.hpp:226
EntityID new_id
Id of the new entity, if the server is sending this down. Ignored, if this is a client request.
Definition: event.hpp:230
Definition: event.hpp:145
ActionType action
Definition: event.hpp:151
glm::vec3 movement
Definition: event.hpp:150
StartActionEvent(EntityID entity_to_act, glm::vec3 movement, ActionType action)
Definition: event.hpp:147
StartActionEvent()
Definition: event.hpp:146
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:153
EntityID entity_to_act
Definition: event.hpp:149
Definition: event.hpp:178
ActionType action
Definition: event.hpp:184
StopActionEvent()
Definition: event.hpp:179
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:186
glm::vec3 movement
Definition: event.hpp:183
StopActionEvent(EntityID entity_to_act, glm::vec3 movement, ActionType action)
Definition: event.hpp:180
EntityID entity_to_act
Definition: event.hpp:182
Definition: event.hpp:161
TrapPlacementEvent()
Definition: event.hpp:162
bool place
Definition: event.hpp:168
bool hover
Definition: event.hpp:168
TrapPlacementEvent(EntityID entity_to_act, glm::vec3 world_pos, CellType cell, bool hover, bool place)
Definition: event.hpp:163
glm::vec3 world_pos
Definition: event.hpp:167
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:170
CellType cell
Definition: event.hpp:166
EntityID entity_to_act
Definition: event.hpp:165
Definition: event.hpp:288
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:292
bool is_cut
Definition: event.hpp:291
float intensity
Definition: event.hpp:290
EntityID eid
Definition: event.hpp:289
Definition: event.hpp:287
std::array< boost::optional< UpdatedLightSource >, MAX_POINT_LIGHTS > lightSources
Definition: event.hpp:296
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:298
Definition: event.hpp:261
EntityID playerEID
Definition: event.hpp:265
UseItemEvent()
Definition: event.hpp:262
UseItemEvent(EntityID playerEID)
Definition: event.hpp:263
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: event.hpp:267
uint32_t EntityID
Global Object ID (when the server or client references an object with a particular EntityID,...
Definition: typedefs.hpp:9