resonance 1.0.1
Loading...
Searching...
No Matches
Rnd::TunnelEvent Class Reference

One drawable scheduled at a frame of a Rnd::Tunnel. More...

#include <tunnelevent.h>

Collaboration diagram for Rnd::TunnelEvent:

Public Member Functions

 TunnelEvent ()
 Construct an event with every member unset.
 TunnelEvent (Drawable *pObject, float flFrame, int nId, int nUser)
 Construct an event.
void Save (Stream &stream) const
 Write the event.
void Load (Stream &stream)
 Read the event.
void Replace (Object *pFrom, Object *pTo, Object *pReferrer)
 Replace the drawable when it is pFrom, moving the reference held on behalf of pReferrer.

Public Attributes

Drawable * mObject
float mFrame
int mId
int mUser

Detailed Description

One drawable scheduled at a frame of a Rnd::Tunnel.

The record is not polymorphic and has no RTTI, and the image retains no title for it. The name is inferred from the routines of Rnd::Tunnel that keep a list of these ordered by frame.

The record is 0x10 bytes, the value of a 0x18-byte list node. The loader at 0x0046de48 settles the type of mObject, because it resolves the stored name through dynamic_cast to Rnd::Drawable.

An inline member that draws the event through a filter has an out-of-line copy at 0x004776f8 and no caller. While mUser is set and a filter object is passed, it runs slot 2 of the filter with its second argument and mUser and draws mObject through Rnd::Drawable::Draw() only when the slot reports non-zero. Otherwise it draws mObject at once. The filter's class is not recovered, because no call site passes one, so the member is not declared.

Constructor & Destructor Documentation

◆ TunnelEvent() [1/2]

Rnd::TunnelEvent::TunnelEvent ( )
inline

Construct an event with every member unset.

The loader grows the list through resize() before it fills each value, which needs this constructor.

◆ TunnelEvent() [2/2]

Rnd::TunnelEvent::TunnelEvent ( Drawable * pObject,
float flFrame,
int nId,
int nUser )
inline

Construct an event.

Inline, with one out-of-line emission.

Parameters
pObjectThe drawable.
flFrameThe frame the event is ordered by.
nIdThe identifier the lookups match on.
nUserThe key a filtered draw passes to its filter.
Ghidra address:
NTSC-U/C: 0x00477618
Ghidra address:
PAL: 0x004b5290

Member Function Documentation

◆ Save()

void Rnd::TunnelEvent::Save ( Stream & stream) const

Write the event.

The drawable is written by name, followed by mFrame, mId, and mUser.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x0046dd40
Ghidra address:
PAL: 0x004ab880

◆ Load()

void Rnd::TunnelEvent::Load ( Stream & stream)

Read the event.

mUser is cleared first and read only from a Rnd::Tunnel stream revision of 32 or later. No reference is taken on the drawable.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x0046de48
Ghidra address:
PAL: 0x004ab988

◆ Replace()

void Rnd::TunnelEvent::Replace ( Object * pFrom,
Object * pTo,
Object * pReferrer )

Replace the drawable when it is pFrom, moving the reference held on behalf of pReferrer.

Parameters
pFromThe object being replaced.
pToThe replacement, which must be a Rnd::Drawable or null.
pReferrerThe object the reference is held on behalf of.
Ghidra address:
NTSC-U/C: 0x00477630
Ghidra address:
PAL: 0x004b52a8

Member Data Documentation

◆ mObject

Drawable* Rnd::TunnelEvent::mObject

The drawable, referenced by the owning tunnel. +0x00

◆ mFrame

float Rnd::TunnelEvent::mFrame

The frame the list is ordered by. +0x04

◆ mId

int Rnd::TunnelEvent::mId

The identifier the lookups match on. +0x08

◆ mUser

int Rnd::TunnelEvent::mUser

The key the filtered draw at 0x004776f8 passes to its filter. +0x0c


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