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

One kind of part the FreQ maker offers, shared by every FreqPart placed from it. More...

#include <freqparttemplate.h>

Collaboration diagram for FreqPartTemplate:

Public Member Functions

 FreqPartTemplate (const HxStr &name, Rnd::Mat *pMaterial, int nScaleX, int nScaleZ)
 Record a part texture's name, material, and bitmap size.
 ~FreqPartTemplate ()
 Release the name.

Public Attributes

int mId
 The identifier GetPart() indexes by, the template's position in the asset file.
HxStr mName
 The name FindPart() looks the template up by, the part texture's name.
Rnd::Mat * mMaterial
 The material a mesh of this kind is drawn with.
int mColorable
 Non-zero when a part of this kind takes a colour.
int mRandomizable
 Non-zero when FreqAppearanceDetail::randomize() may change a part of this kind.
int mCategory
 The category the template is listed under, 1 through 11, or 0 for none.
int mScaleX
 The texture's bitmap width, which scales a mesh of this kind in 1/128 units.
int mScaleZ
 The texture's bitmap height, which scales a mesh of this kind in 1/128 units.

Detailed Description

One kind of part the FreQ maker offers, shared by every FreqPart placed from it.

The class is not polymorphic and emits no RTTI descriptor, and no literal in the image identifies it, so the name is inferred. The object is 0x24 bytes, which the allocation in MetFreqMakerAssetManager::RegisterPart() fixes. That routine builds one template for each part texture of the FreQ maker asset file, and MetFreqMakerAssetManager keeps them in a vector indexed by identifier, in a map by name, and in one list for each category.

The constructor and the destructor are emitted in the translation unit that begins at 0x00255790, beside template library code, although every caller is in MetFreqMakerAssetManager's unit.

Every member is public, because MetFreqMakerAssetManager, FreqPart, and FreqAppearanceDetail read and write them directly and the image has no accessor.

Constructor & Destructor Documentation

◆ FreqPartTemplate()

FreqPartTemplate::FreqPartTemplate ( const HxStr & name,
Rnd::Mat * pMaterial,
int nScaleX,
int nScaleZ )

Record a part texture's name, material, and bitmap size.

The identifier starts at -1 and the colour, randomisation, and category words at 0.

Parameters
nameThe name of the part texture.
pMaterialThe material built over the texture.
nScaleXThe texture's bitmap width.
nScaleZThe texture's bitmap height.
Ghidra address:
NTSC-U/C: 0x002576c0
Ghidra address:
PAL: 0x0026cde0

◆ ~FreqPartTemplate()

FreqPartTemplate::~FreqPartTemplate ( )

Release the name.

The destructor is not virtual. MetFreqMakerAssetManager::ReleaseParts() deletes templates through its deleting form.

Ghidra address:
NTSC-U/C: 0x00257730
Ghidra address:
PAL: 0x0026ce50

Member Data Documentation

◆ mId

int FreqPartTemplate::mId

The identifier GetPart() indexes by, the template's position in the asset file.

FreqPart transfers only its low half. +0x00

◆ mName

HxStr FreqPartTemplate::mName

The name FindPart() looks the template up by, the part texture's name.

+0x04

◆ mMaterial

Rnd::Mat* FreqPartTemplate::mMaterial

The material a mesh of this kind is drawn with.

+0x0c

◆ mColorable

int FreqPartTemplate::mColorable

Non-zero when a part of this kind takes a colour.

+0x10

◆ mRandomizable

int FreqPartTemplate::mRandomizable

Non-zero when FreqAppearanceDetail::randomize() may change a part of this kind.

+0x14

◆ mCategory

int FreqPartTemplate::mCategory

The category the template is listed under, 1 through 11, or 0 for none.

+0x18

FreqAppearanceDetail::nudgeCursor() also writes it.

◆ mScaleX

int FreqPartTemplate::mScaleX

The texture's bitmap width, which scales a mesh of this kind in 1/128 units.

+0x1c

◆ mScaleZ

int FreqPartTemplate::mScaleZ

The texture's bitmap height, which scales a mesh of this kind in 1/128 units.

+0x20


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