wavelength 1.0.0
Loading...
Searching...
No Matches
UIManager::Callback Class Reference

Callback that keeps a shared .rnd file from replacing loaded objects. More...

#include <uimanager.h>

Inheritance diagram for UIManager::Callback:
Collaboration diagram for UIManager::Callback:

Public Member Functions

 Callback (DataArray *pConfig)
 Construct a callback.
 ~Callback () override
 Destroy the callback.
int ShouldLoad (RndObject *pExisting, const char *pszName, const char *pszClass) override
 Create an object only when no object of the name exists.
void Report ()
 Report the objects the loads skipped without permission.
Public Member Functions inherited from RndLoader::Callback
virtual void SetObjectCount (int nObjects)
 Receive the number of objects of the file before the first is created.

Detailed Description

Callback that keeps a shared .rnd file from replacing loaded objects.

The RTTI records the class as deriving from RndLoader::Callback. The object is 0x1c bytes. Init() creates one while it loads the shared files of the shared_rnd_files list. An object that already exists is skipped, and one missing from allowed_rnd_merges is recorded for Report().

Constructor & Destructor Documentation

◆ Callback()

UIManager::Callback::Callback ( DataArray * pConfig)
explicit

Construct a callback.

Parameters
pConfigThe ui section of the configuration, which must list allowed_rnd_merges.
Ghidra address:
NTSC-U/C: 0x0020c9e0
Ghidra address:
PAL: 0x002157e0

◆ ~Callback()

UIManager::Callback::~Callback ( )
inlineoverridevirtual

Destroy the callback.

Ghidra address:
NTSC-U/C: 0x0037b950
Ghidra address:
PAL: 0x003ea080

Reimplemented from RndLoader::Callback.

Member Function Documentation

◆ ShouldLoad()

int UIManager::Callback::ShouldLoad ( RndObject * pExisting,
const char * pszName,
const char * pszClass )
overridevirtual

Create an object only when no object of the name exists.

A name that exists and that allowed_rnd_merges does not list is recorded.

Parameters
pExistingThe loaded object with the same name, or null.
pszNameThe object name.
pszClassThe class name. The routine ignores it.
Returns
1 when no object of the name exists, otherwise 0.
Ghidra address:
NTSC-U/C: 0x0020ca58
Ghidra address:
PAL: 0x00215858

Implements RndLoader::Callback.

◆ Report()

void UIManager::Callback::Report ( )

Report the objects the loads skipped without permission.

Ghidra address:
NTSC-U/C: 0x0020cb00
Ghidra address:
PAL: 0x00215900

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