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

One placed part of a FreQ avatar. More...

#include <freqpart.h>

Collaboration diagram for FreqPart:

Classes

struct  Packed
 Eight-byte transfer form of a part that Pack() writes and Unpack() reads. More...

Public Member Functions

 FreqPart ()
 Construct a part with no template, run through Reset().
 FreqPart (FreqPartTemplate *pTemplate)
 Construct a part of one template at the origin.
 FreqPart (const FreqPart &other)
 Copy another part through operator=().
 ~FreqPart ()
 Delete the mesh.
void operator= (const FreqPart &other)
 Copy another part, cloning a fresh mesh from the other part's mesh.
Rnd::Mesh * GetMesh () const
 Report the mesh.
void SetMesh (Rnd::Mesh *pMesh)
 Replace the mesh, deleting the one this part had.
Color * GetColor ()
 Report the colour the mesh is drawn in.
void SetColor (const Color &color)
 Record a colour and apply it to the mesh.
void Reset ()
 Clear every member without deleting the mesh.
void Pack (Packed *pOut)
 Write the transfer form.
void Unpack (const Packed &packed)
 Read the transfer form.

Public Attributes

FreqPartTemplate * mTemplate
 The template this part is an instance of.
Vector3 mPosition
 The placement.
int mMirrored
 Non-zero when the part is mirrored.
Vector2 mPalettePosition
 The palette position the colour is taken from, (-1, -1) while unset.

Detailed Description

One placed part of a FreQ avatar.

The class is not polymorphic and emits no RTTI descriptor, and no literal in the image identifies it, so the name is inferred from its one owner. FreqAppearanceDetail stores a std::list of pointers to these, and each part pairs a FreQ maker part template with a placement, a palette position, a mesh cloned for it, and the colour that mesh is drawn in. The destructor takes an __in_chrg argument and the allocation that FreqAppearanceDetail makes is 0x40 bytes.

The translation unit spans 0x00174de8 to 0x001773c0. Besides the members below, it has template library emissions at 0x00174f28, 0x00175100, 0x001761f8, 0x00176790, 0x00176bb8, 0x00176cc0, 0x00176dc8, and 0x001772f8.

Constructor & Destructor Documentation

◆ FreqPart() [1/3]

FreqPart::FreqPart ( )

Construct a part with no template, run through Reset().

Ghidra address:
NTSC-U/C: 0x00176f38
Ghidra address:
PAL: 0x001799b0

◆ FreqPart() [2/3]

FreqPart::FreqPart ( FreqPartTemplate * pTemplate)
explicit

Construct a part of one template at the origin.

Parameters
pTemplateThe template the part is an instance of.
Ghidra address:
NTSC-U/C: 0x00176ed0
Ghidra address:
PAL: 0x00179948

◆ FreqPart() [3/3]

FreqPart::FreqPart ( const FreqPart & other)

Copy another part through operator=().

Parameters
otherThe part to copy.
Ghidra address:
NTSC-U/C: 0x00176f78
Ghidra address:
PAL: 0x001799f0

◆ ~FreqPart()

FreqPart::~FreqPart ( )

Delete the mesh.

Ghidra address:
NTSC-U/C: 0x00176fd0
Ghidra address:
PAL: 0x00179a48

Member Function Documentation

◆ operator=()

void FreqPart::operator= ( const FreqPart & other)

Copy another part, cloning a fresh mesh from the other part's mesh.

The template, the placement, the mirrored flag, and the colour are copied first. The mesh this part has is deleted, a new one is cloned through the FreQ maker asset manager under a generated name, the other part's mesh is copied into it, the colour is applied to it, and the palette position is copied last. The routine returns nothing.

Parameters
otherThe part to copy.
Ghidra address:
NTSC-U/C: 0x00174de8
Ghidra address:
PAL: 0x00177818

◆ GetMesh()

Rnd::Mesh * FreqPart::GetMesh ( ) const
inline

Report the mesh.

Defined in the header. The out-of-line copy is called by FreqAppearanceDetail.

Returns
The mesh, or null.
Ghidra address:
NTSC-U/C: 0x001770f8
Ghidra address:
PAL: 0x00179b70

◆ SetMesh()

void FreqPart::SetMesh ( Rnd::Mesh * pMesh)

Replace the mesh, deleting the one this part had.

Parameters
pMeshThe new mesh.
Ghidra address:
NTSC-U/C: 0x00177100
Ghidra address:
PAL: 0x00179b78

◆ GetColor()

Color * FreqPart::GetColor ( )
inline

Report the colour the mesh is drawn in.

Defined in the header. The out-of-line copy is called by FreqAppearance::RenderBurnTextures() and FreqAppearanceDetail.

Returns
The colour.
Ghidra address:
NTSC-U/C: 0x00177158
Ghidra address:
PAL: 0x00179bd0

◆ SetColor()

void FreqPart::SetColor ( const Color & color)

Record a colour and apply it to the mesh.

A part whose template does not take a colour records opaque black in its place.

Parameters
colorThe colour.
Ghidra address:
NTSC-U/C: 0x00177160
Ghidra address:
PAL: 0x00179bd8

◆ Reset()

void FreqPart::Reset ( )

Clear every member without deleting the mesh.

The palette position becomes (-1, -1) and the colour becomes g_freqMakerDefaultColor.

Ghidra address:
NTSC-U/C: 0x001771b8
Ghidra address:
PAL: 0x00179c30

◆ Pack()

void FreqPart::Pack ( Packed * pOut)

Write the transfer form.

The palette position is clamped to the unit range, stored back, and scaled to a byte.

Parameters
pOutThe record to write.
Ghidra address:
NTSC-U/C: 0x001771f8
Ghidra address:
PAL: 0x00179c70

◆ Unpack()

void FreqPart::Unpack ( const Packed & packed)

Read the transfer form.

The template is looked up through the FreQ maker asset manager by the absolute identifier, and a negative identifier marks the part mirrored. The placement y is cleared.

Parameters
packedThe record to read.
Ghidra address:
NTSC-U/C: 0x00177038
Ghidra address:
PAL: 0x00179ab0

Member Data Documentation

◆ mTemplate

FreqPartTemplate* FreqPart::mTemplate

The template this part is an instance of.

+0x00

Public because FreqAppearanceDetail::unpack() reads it directly, and the image has no accessor.

◆ mPosition

Vector3 FreqPart::mPosition

The placement.

+0x10

Public because FreqAppearanceDetail::unpack() raises it and copies it into the mesh directly, and the image has no accessor.

◆ mMirrored

int FreqPart::mMirrored

Non-zero when the part is mirrored.

+0x20

Public because FreqAppearanceDetail::unpack() reads it directly, and the image has no accessor.

◆ mPalettePosition

Vector2 FreqPart::mPalettePosition

The palette position the colour is taken from, (-1, -1) while unset.

+0x24

Public because FreqAppearanceDetail::unpack() reads it directly, and the image has no accessor.


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