resonance 1.0.1
Loading...
Searching...
No Matches
AnimHelper Class Reference

One run of an animation between two frames, played against a running time. More...

#include <animhelper.h>

Public Member Functions

 AnimHelper ()
 Start idle with no animation.
void SetAnim (Rnd::Animatable *pAnim)
 Attach the animation and rewind it to frame 0.
void Play (float flFrom, float flTo)
 Arm a run between two frames.
int Update (float flTime)
 Advance a run in progress.

Detailed Description

One run of an animation between two frames, played against a running time.

The class is not polymorphic and emits no RTTI. Its name comes from the debugging symbols of the North American demo release. The demo's constructor and SetAnim() have the same instructions as this class's. HudPoints and several of the tunnel's components embed it by value.

Play() records the two frames in the animation's own numbering and arms the run. Each Update() then advances the animation one frame per unit of time from the first frame, and parks it on the last frame once the run passes it.

Constructor & Destructor Documentation

◆ AnimHelper()

AnimHelper::AnimHelper ( )

Start idle with no animation.

Ghidra address:
NTSC-U/C: 0x00411a18
Ghidra address:
PAL: 0x0044b4e0

Member Function Documentation

◆ SetAnim()

void AnimHelper::SetAnim ( Rnd::Animatable * pAnim)

Attach the animation and rewind it to frame 0.

Parameters
pAnimThe animation to play.
Ghidra address:
NTSC-U/C: 0x00411a30
Ghidra address:
PAL: 0x0044b4f8

◆ Play()

void AnimHelper::Play ( float flFrom,
float flTo )

Arm a run between two frames.

Each frame is mapped back through the animation's filters first. The run starts at the next Update().

Parameters
flFromThe first frame.
flToThe last frame.
Ghidra address:
NTSC-U/C: 0x00411a58
Ghidra address:
PAL: 0x0044b520

◆ Update()

int AnimHelper::Update ( float flTime)

Advance a run in progress.

Parameters
flTimeThe current time. The first call after Play() records it as the start.
Returns
1 while the run continues, and 0 when idle or once the run has finished.
Ghidra address:
NTSC-U/C: 0x00411ab8
Ghidra address:
PAL: 0x0044b580

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