wavelength 1.0.0
Loading...
Searching...
No Matches
TriggerEvent Class Reference

The triggers that wait on one kind of event. More...

#include <triggerevent.h>

Public Types

enum  Type {
  kTypeBeat = 0 , kTypeTime = 1 , kTypeComponentSelect = 2 , kTypeComponentSelectStart = 3 ,
  kTypeComponentFocus = 4 , kTypeScreenChange = 5 , kTypeButton = 6 , kTypeBegin = 7 ,
  kTypeEnd = 8 , kTypeStageComplete = 9 , kTypeScore = 10 , kTypeHit = 11 ,
  kTypeMiss = 12 , kTypePass = 13 , kTypeGem = 14 , kTypeNewBar = 15 ,
  kTypePhraseEnd = 16 , kTypePhraseCapture = 17 , kTypePhraseMiss = 18 , kTypeNewTrack = 19 ,
  kTypePowerupCapture = 20 , kTypePowerupDeploy = 21 , kTypeNewLeader = 22 , kTypeHealth = 23 ,
  kTypeDyingChange = 24 , kTypeBossJourney = 25 , kTypeLyric = 26 , kTypePathUnlocked = 27 ,
  kNumTypes = 28
}
 Kinds of event, in the order of the names a trigger file and the debug list use. More...

Public Member Functions

void Fire ()
 Run every handler of the event.
void Clear ()
 Delete every handler and empty the list.
void AddHandler (DataArray *pTrigger)
 Build a handler from an entry of a trigger file and append it.

Static Public Member Functions

static int FindType (DataArray *pArray, int nNode)
 Find the kind of event a node of a trigger file names.

Detailed Description

The triggers that wait on one kind of event.

TriggerMgr includes one per Type, indexed by the type. The object is the 8-byte list of its handlers, each built from one entry of a trigger file and owned by the event.

Member Enumeration Documentation

◆ Type

Kinds of event, in the order of the names a trigger file and the debug list use.

Enumerator
kTypeBeat 

beat, a note of the background music.

kTypeTime 

time, a new frame of the clocks.

kTypeComponentSelect 

component_select.

kTypeComponentSelectStart 

component_select_start.

kTypeComponentFocus 

component_focus.

kTypeScreenChange 

screen_change.

kTypeButton 

button.

kTypeBegin 

begin.

kTypeEnd 

end.

kTypeStageComplete 

stage_complete.

kTypeScore 

score.

kTypeHit 

hit.

kTypeMiss 

miss.

kTypePass 

pass. The shipped build never fires it.

kTypeGem 

gem.

kTypeNewBar 

new_bar.

kTypePhraseEnd 

phrase_end.

kTypePhraseCapture 

phrase_capture.

kTypePhraseMiss 

phrase_miss.

kTypeNewTrack 

new_track.

kTypePowerupCapture 

powerup_capture. The shipped build never fires it.

kTypePowerupDeploy 

powerup_deploy. The shipped build never fires it.

kTypeNewLeader 

new_leader. The shipped build never fires it.

kTypeHealth 

health.

kTypeDyingChange 

dying_change.

kTypeBossJourney 

boss_journey.

kTypeLyric 

lyric.

kTypePathUnlocked 

path_unlocked.

kNumTypes 

The number of kinds, and the unrecognised result.

Member Function Documentation

◆ FindType()

int TriggerEvent::FindType ( DataArray * pArray,
int nNode )
static

Find the kind of event a node of a trigger file names.

An unrecognised name produces a warning with the file and the line of the array.

Parameters
pArrayThe array.
nNodeThe node with the name.
Returns
One of Type, kNumTypes for an unrecognised name.
Ghidra address:
NTSC-U/C: 0x001ff540
Ghidra address:
PAL: 0x002082e0

◆ Fire()

void TriggerEvent::Fire ( )

Run every handler of the event.

Each handler tests its conditions and starts its actions.

Ghidra address:
NTSC-U/C: 0x001ff3c0
Ghidra address:
PAL: 0x00208160

◆ Clear()

void TriggerEvent::Clear ( )

Delete every handler and empty the list.

Ghidra address:
NTSC-U/C: 0x001ff420
Ghidra address:
PAL: 0x002081c0

◆ AddHandler()

void TriggerEvent::AddHandler ( DataArray * pTrigger)

Build a handler from an entry of a trigger file and append it.

Parameters
pTriggerThe entry. Node 0 names the event.
Ghidra address:
NTSC-U/C: 0x001ff490
Ghidra address:
PAL: 0x00208230

The documentation for this class was generated from the following file: