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

Enable policy of a game, which ties each track to the tracks that must be owned first. More...

#include <gameenablemgr.h>

Inheritance diagram for GameEnableMgr:
Collaboration diagram for GameEnableMgr:

Public Member Functions

 GameEnableMgr (int nConfigCode, int nTrackCount, Gamer *pGamer, int nReleaseWhenMet)
 Build the policy with requirement lists read from a configuration code.
 GameEnableMgr (int nTrackCount, Gamer *pGamer, int nReleaseWhenMet)
 Build the policy with empty requirement lists, which enable every track.
virtual void SetBarOwner (int nTrack, int nBar, Player *pPlayer)
 Record a new owner and act on every track whose state it changes.
virtual void ForceEnabled (int nTrack, int nBar, int nUntilBar)
 Leave one track free of its requirements until a bar, or release them for good.
virtual void ForceDisable (int nTrack)
 Stop one track from ever being enabled.
virtual int QueryBar (int nTrack, int nBar)
 Report whether one bar of one track may be caught.
Public Member Functions inherited from EnableMgr
virtual ~EnableMgr ()

Static Public Member Functions

static GameEnableMgr * CreateReleasing (int nConfigCode, int nTrackCount, Gamer *pGamer)
 Build the solo game policy, which releases a track's requirements once met.
static GameEnableMgr * CreateInvalidating (int nConfigCode, int nTrackCount, Gamer *pGamer)
 Build a policy from a configuration code that invalidates bars instead of releasing.
static GameEnableMgr * CreateUnrestricted (int nTrackCount, Gamer *pGamer)
 Build the policy of a game with several players, which enables every track.

Detailed Description

Enable policy of a game, which ties each track to the tracks that must be owned first.

Its RTTI descriptor is at 0x008efc00. It derives publicly from EnableMgr at offset 0. Its type function is at 0x00105208 and its table at 0x007ccbc0. The object is 0x30 bytes, and the destructor at 0x00104ca0 is implicitly declared.

A track is enabled for a bar when every track in its requirement list has an owner at that bar, and never when the list holds -1. The requirement lists come from a configuration code, one one-based track list per track. When a track's state changes, the policy either releases the track's requirements for good or invalidates the bar for the track's receivers.

Constructor & Destructor Documentation

◆ GameEnableMgr() [1/2]

GameEnableMgr::GameEnableMgr ( int nConfigCode,
int nTrackCount,
Gamer * pGamer,
int nReleaseWhenMet )

Build the policy with requirement lists read from a configuration code.

Parameters
nConfigCodeThe configuration code of the requirement lists.
nTrackCountThe level's track count.
pGamerThe participant whose tracks the policy governs.
nReleaseWhenMetNon-zero to release a track's requirements once its state changes.
Ghidra address:
NTSC-U/C: 0x001011c8
Ghidra address:
PAL: 0x001011c8

◆ GameEnableMgr() [2/2]

GameEnableMgr::GameEnableMgr ( int nTrackCount,
Gamer * pGamer,
int nReleaseWhenMet )

Build the policy with empty requirement lists, which enable every track.

Parameters
nTrackCountThe level's track count.
pGamerThe participant whose tracks the policy governs.
nReleaseWhenMetNon-zero to release a track's requirements once its state changes.
Ghidra address:
NTSC-U/C: 0x00101588
Ghidra address:
PAL: 0x00101588

Member Function Documentation

◆ CreateReleasing()

GameEnableMgr * GameEnableMgr::CreateReleasing ( int nConfigCode,
int nTrackCount,
Gamer * pGamer )
static

Build the solo game policy, which releases a track's requirements once met.

Gamer::CreateEnableMgr() calls it with configuration code 0x387, and the routine at 0x001167e0 with code 0x386. The title is inferred.

Parameters
nConfigCodeThe configuration code of the requirement lists.
nTrackCountThe level's track count.
pGamerThe participant.
Returns
The new policy.
Ghidra address:
NTSC-U/C: 0x00105280
Ghidra address:
PAL: 0x00105280

◆ CreateInvalidating()

GameEnableMgr * GameEnableMgr::CreateInvalidating ( int nConfigCode,
int nTrackCount,
Gamer * pGamer )
static

Build a policy from a configuration code that invalidates bars instead of releasing.

The image has no caller. The title is inferred.

Parameters
nConfigCodeThe configuration code of the requirement lists.
nTrackCountThe level's track count.
pGamerThe participant.
Returns
The new policy.
Ghidra address:
NTSC-U/C: 0x00105308
Ghidra address:
PAL: 0x00105308

◆ CreateUnrestricted()

GameEnableMgr * GameEnableMgr::CreateUnrestricted ( int nTrackCount,
Gamer * pGamer )
static

Build the policy of a game with several players, which enables every track.

The title is inferred.

Parameters
nTrackCountThe level's track count.
pGamerThe participant.
Returns
The new policy.
Ghidra address:
NTSC-U/C: 0x00105390
Ghidra address:
PAL: 0x00105390

◆ SetBarOwner()

virtual void GameEnableMgr::SetBarOwner ( int nTrack,
int nBar,
Player * pPlayer )
virtual

Record a new owner and act on every track whose state it changes.

Parameters
nTrackThe track.
nBarThe bar.
pPlayerThe new owner, or the null player.
Ghidra address:
NTSC-U/C: 0x00101d70
Ghidra address:
PAL: 0x00101d70

Implements EnableMgr.

◆ ForceEnabled()

virtual void GameEnableMgr::ForceEnabled ( int nTrack,
int nBar,
int nUntilBar )
virtual

Leave one track free of its requirements until a bar, or release them for good.

A bar before the current one releases the requirements. Either way the track's receivers are told the whole level is invalid.

Parameters
nTrackThe track.
nBarThe current bar.
nUntilBarThe first bar the requirements apply to again.
Ghidra address:
NTSC-U/C: 0x00101c68
Ghidra address:
PAL: 0x00101c68

Reimplemented from EnableMgr.

◆ ForceDisable()

virtual void GameEnableMgr::ForceDisable ( int nTrack)
virtual

Stop one track from ever being enabled.

Replaces the track's requirement list with the single entry -1.

Parameters
nTrackThe track.
Ghidra address:
NTSC-U/C: 0x00101bb0
Ghidra address:
PAL: 0x00101bb0

Reimplemented from EnableMgr.

◆ QueryBar()

virtual int GameEnableMgr::QueryBar ( int nTrack,
int nBar )
virtual

Report whether one bar of one track may be caught.

A bar before the track's free-until bar may always be caught. Otherwise the bar is mapped through PlayMap::MapBar() and the requirements are tested against the owners there.

Parameters
nTrackThe track.
nBarThe bar.
Returns
Non-zero when the bar may be caught.
Ghidra address:
NTSC-U/C: 0x00105408
Ghidra address:
PAL: 0x00105408

Implements EnableMgr.


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