Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
event.hpp File Reference
#include <boost/variant/variant.hpp>
#include <iostream>
#include "shared/utilities/typedefs.hpp"
#include "shared/utilities/serialize.hpp"
#include "shared/utilities/serialize_macro.hpp"
#include "shared/game/sharedgamestate.hpp"
#include "shared/game/celltype.hpp"
#include "shared/audio/soundcommand.hpp"
#include "shared/utilities/constants.hpp"

Go to the source code of this file.

Data Structures

struct  ChangeFacingEvent
 
struct  LobbyActionEvent
 
struct  LoadGameStateEvent
 
struct  LoadSoundCommandsEvent
 
struct  StartActionEvent
 
struct  TrapPlacementEvent
 
struct  StopActionEvent
 
struct  MoveRelativeEvent
 
struct  MoveAbsoluteEvent
 
struct  SpawnEntityEvent
 
struct  SelectItemEvent
 
struct  UseItemEvent
 
struct  DropItemEvent
 
struct  UpdateLightSourcesEvent
 
struct  UpdateLightSourcesEvent::UpdatedLightSource
 
struct  LoadIntroCutsceneEvent
 
struct  Event
 

Typedefs

using EventData = boost::variant< ChangeFacingEvent, LobbyActionEvent, LoadGameStateEvent, LoadSoundCommandsEvent, StartActionEvent, StopActionEvent, MoveRelativeEvent, MoveAbsoluteEvent, SpawnEntityEvent, SelectItemEvent, UseItemEvent, UpdateLightSourcesEvent, DropItemEvent, TrapPlacementEvent, LoadIntroCutsceneEvent >
 

Enumerations

enum class  EventType {
  ChangeFacing , LobbyAction , LoadGameState , LoadSoundCommands ,
  StartAction , StopAction , MoveRelative , MoveAbsolute ,
  SpawnEntity , SelectItem , UseItem , DropItem ,
  UpdateLightSources , TrapPlacement , LoadIntroCutscene
}
 
enum class  ActionType { MoveCam , Jump , Sprint , Zoom }
 
enum class  PlayerRole { Player , DungeonMaster , Unknown }
 

Functions

std::ostream & operator<< (std::ostream &os, const EventType &type)
 
std::ostream & operator<< (std::ostream &os, const Event &evt)
 

Typedef Documentation

◆ EventData

All of the different kinds of events in a tagged union, so we can easily pull out the actual data for a specific Event

Enumeration Type Documentation

◆ ActionType

enum class ActionType
strong
Enumerator
MoveCam 
Jump 
Sprint 
Zoom 

◆ EventType

enum class EventType
strong

Tag for the different kind of events there are

Enumerator
ChangeFacing 
LobbyAction 
LoadGameState 
LoadSoundCommands 
StartAction 
StopAction 
MoveRelative 
MoveAbsolute 
SpawnEntity 
SelectItem 
UseItem 
DropItem 
UpdateLightSources 
TrapPlacement 
LoadIntroCutscene 

◆ PlayerRole

enum class PlayerRole
strong

Enum representing a player's desired role (as selected with the radio buttons in the client lobby screen (in GUIState::Lobby)

Enumerator
Player 
DungeonMaster 
Unknown 

Function Documentation

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream &  os,
const Event evt 
)

Allow us to std::cout an Event

TODO: actually output the data for the EventData

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  os,
const EventType type 
)

Override << so we can std::cout << EventType_var;