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

Arrow mesh that appears in the local view of up to four players for a limited time. More...

#include <tnlarrow.h>

Public Member Functions

 TnlArrow (int nIndex)
 Resolve "arrow<nIndex>.mesh" with every slot hidden.
 ~TnlArrow ()
 Hide the arrow from every slot.
void Show (TnlPlayer *pPlayer, float flExpireFrame)
 Show the arrow in the local view of one player until a frame.
void Hide (int nSlot)
 Take the arrow out of the view of one slot.
void SetFrame (float flFrame)
 Hide the arrow from every slot whose expiry frame is before flFrame.

Static Public Attributes

static constexpr int kSlotCount = 4
 Number of player slots the arrow can be shown to.

Detailed Description

Arrow mesh that appears in the local view of up to four players for a limited time.

The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from the one object it drives, "arrow<n>.mesh".

The same mesh is drawn by the view of each player slot it is shown to, until the frame recorded for that slot passes.

AppTunnel allocates these in a loop, 0x24 bytes each, with the loop index as nIndex.

Constructor & Destructor Documentation

◆ TnlArrow()

TnlArrow::TnlArrow ( int nIndex)
explicit

Resolve "arrow<nIndex>.mesh" with every slot hidden.

Parameters
nIndexThe arrow.
Ghidra address:
NTSC-U/C: 0x0043ff10
Ghidra address:
PAL: 0x0047ca40

◆ ~TnlArrow()

TnlArrow::~TnlArrow ( )

Hide the arrow from every slot.

Ghidra address:
NTSC-U/C: 0x00456e20
Ghidra address:
PAL: 0x00494350

Member Function Documentation

◆ Show()

void TnlArrow::Show ( TnlPlayer * pPlayer,
float flExpireFrame )

Show the arrow in the local view of one player until a frame.

The slot is the player number less 1. A slot that already shows the arrow is hidden first. AppTunnel's message handler inlines this at 0x004495e8, and the out-of-line copy has no caller.

Parameters
pPlayerThe player.
flExpireFrameThe frame after which the slot hides.
Ghidra address:
NTSC-U/C: 0x00456e90
Ghidra address:
PAL: 0x004943c0

◆ Hide()

void TnlArrow::Hide ( int nSlot)

Take the arrow out of the view of one slot.

A slot the arrow is not shown to is unchanged. The expiry frame of the slot is not reset.

Parameters
nSlotThe player slot, from 0.
Ghidra address:
NTSC-U/C: 0x00456f20
Ghidra address:
PAL: 0x00494450

◆ SetFrame()

void TnlArrow::SetFrame ( float flFrame)

Hide the arrow from every slot whose expiry frame is before flFrame.

The expiry frame of such a slot returns to 1e9.

Parameters
flFrameThe current frame.
Ghidra address:
NTSC-U/C: 0x00456f68
Ghidra address:
PAL: 0x00494498

Member Data Documentation

◆ kSlotCount

int TnlArrow::kSlotCount = 4
staticconstexpr

Number of player slots the arrow can be shown to.


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