|
resonance 1.0.1
|
Avatar an appearance stores apart from its username. More...
#include <freqappearancedetail.h>


Public Member Functions | |
| FreqAppearanceDetail () | |
| Start with an empty part list and a fresh view named by the FreQ maker asset manager. | |
| FreqAppearanceDetail (const FreqAppearanceDetail &other) | |
| Build a fresh avatar and copy another one's parts in. | |
| ~FreqAppearanceDetail () | |
| Discard every part and delete the view. | |
| void | save (OBStream &stream) |
| Write the avatar to a stream. | |
| void | load (IBStream &stream) |
| Append the parts save() wrote. | |
| void | clear () |
| Delete every part, empty the view, and reset the placement state. | |
| void | copyFrom (const FreqAppearanceDetail &other) |
| Append a copy of each of another avatar's parts, in the other view's draw order. | |
| std::list< FreqPart * > & | parts () |
| Report the parts the avatar is built from. | |
| void | pack (FreqPart::Packed *pOut, int *pCount) |
| Pack every part into consecutive 8-byte records. | |
| void | unpack (const FreqPart::Packed *pRecords, int nCount) |
| Append parts unpacked from consecutive 8-byte records. | |
| void | ensureCursorMesh () |
| Create the preview mesh if there is none, hanging it from mView, and clear three placement words. | |
| void | resetCursor () |
| Hide the preview mesh at the origin with no material and return the placement state to its unset values. | |
| void | selectTemplate (const HxStr &name) |
| Start placing a new part of one template. | |
| void | placeCursor () |
| Place the previewed part, or stop editing the selected one. | |
| void | nudgeCursor (int nStepX, int nStepZ) |
| Move the cursor one unit, moving the preview mesh or the selected part along with it. | |
| FreqPart * | selectPart (int nIndex) |
| Start editing one part, retaining a copy to revert to. | |
| void | deletePart (int nIndex) |
| Reset the placement state and delete one part. | |
| void | revertSelection () |
| Restore the selected part's colour, mirroring, draw position, and placement from the copy selectPart() retained, and drop the selection. | |
| void | randomize () |
| Give each part that may be randomised a random change. | |
| void | recentrePart (int nIndex) |
| Move one part and the cursor to the origin and bring the part to the front. | |
| void | sendBackward () |
| Move the previewed or selected mesh one step earlier in the draw order. | |
| void | bringForward () |
| Move the previewed or selected mesh one step later in the draw order. | |
| int | drawIndexOf (FreqPart *pPart) |
| Report where a part's mesh sits in the view's draw order. | |
| void | toggleMirror () |
| Mirror the previewed or selected part. | |
| void | setColor (const Color &color, const Vector2 &palettePosition) |
| Record the current colour and apply it to the previewed or selected part. | |
| void | attachTo (Rnd::View *pParent) |
| Hang mView from a parent view. | |
| void | detachFrom (Rnd::View *pParent) |
| Unhang mView from a parent view. | |
| Public Member Functions inherited from FreqMakerCursor | |
| FreqMakerCursor () | |
| Start with no template selected, an unset scale, and the FreQ maker default colour. | |
| ~FreqMakerCursor () | |
| Delete the preview mesh. | |
| void | deselect () |
| Forget the selected part without restoring it. | |
Public Attributes | |
| Rnd::View * | mView |
| The avatar view the constructor allocates, 0x120 bytes. | |
Additional Inherited Members | |
| Protected Attributes inherited from FreqMakerCursor | |
| int | mCursorX |
| int | mCursorZ |
| unsigned char | mColorAlignment [0x8] |
| Color | mColor |
| FreqPart * | mSelected |
| unsigned char | mBackupAlignment [0xc] |
| FreqPart | mSelectedBackup |
| int | mSelectedDrawIndex |
| FreqPartTemplate * | mTemplate |
| int | mPlacing |
| float | mScaleX |
| float | mScaleZ |
| int | mScaleStepX |
| int | mScaleStepZ |
| int | mCursorMirrored |
| Vector2 | mPalettePosition |
| Rnd::Mesh * | mCursorMesh |
Avatar an appearance stores apart from its username.
The class is not polymorphic and emits no RTTI descriptor, so no accessor and no vtable names it. Nor does the lever of last resort reach it. FreqAppearance's copy constructor takes its 0xb0 bytes from the untagged allocator at 0x004a81e0, which passes no class name, and the two tagged allocations inside its own constructor are billed to stl_list and to Rnd::View. The title here is inferred from its one owner and from the diagnostic literal Freq= that FreqAppearance::Print writes where this object would appear.
The object is 0xb0 bytes. FreqMakerCursor is its non-virtual base at +0x00 through +0x9f, the part list is at +0xa0, and the view every part mesh hangs from is at +0xa4. Besides FreqAppearance, MetFreqMakerCanvasScreen edits the avatar through this class.
The translation unit spans 0x00249b48 to 0x0024f798.
No identifier here is attested by the image, so every member takes the required style rather than the CamelCase the classes around it use. That divergence is deliberate.
| FreqAppearanceDetail::FreqAppearanceDetail | ( | ) |
Start with an empty part list and a fresh view named by the FreQ maker asset manager.
| FreqAppearanceDetail::FreqAppearanceDetail | ( | const FreqAppearanceDetail & | other | ) |
Build a fresh avatar and copy another one's parts in.
The image has no caller.
| other | The avatar to copy. |
| FreqAppearanceDetail::~FreqAppearanceDetail | ( | ) |
Discard every part and delete the view.
The destructor is not virtual. FreqAppearance's own destructor releases this object through a direct call rather than through a table.
| void FreqAppearanceDetail::save | ( | OBStream & | stream | ) |
Write the avatar to a stream.
The part count comes first. Each part follows as its template name (a length word and the bytes), its palette x and y, its mirrored flag as one byte, and its placement x and z.
| stream | The stream to write to. |
| void FreqAppearanceDetail::load | ( | IBStream & | stream | ) |
Append the parts save() wrote.
Each part is rebuilt from its template name as unpack() rebuilds a packed part. The name is also looked up in Rnd::TheManager as a texture, and that result is discarded.
| stream | The stream to read from. |
| void FreqAppearanceDetail::clear | ( | ) |
Delete every part, empty the view, and reset the placement state.
The destructor runs this before releasing the view, and FreqAppearance::operator=() runs it before copying the source in. The name is inferred from those two uses.
| void FreqAppearanceDetail::copyFrom | ( | const FreqAppearanceDetail & | other | ) |
Append a copy of each of another avatar's parts, in the other view's draw order.
The other avatar's parts are first indexed by mesh in a local std::map, and each drawable of the other view other than its preview mesh is then looked up and copied. The routine does not clear first, so FreqAppearance::operator=() pairs it with clear(). The name is inferred from that pairing.
| other | The avatar to copy. |
|
inline |
Report the parts the avatar is built from.
Defined in the header. The out-of-line copy is called by FreqAppearance::RenderBurnTextures() and by the routine at 0x00262270.
| void FreqAppearanceDetail::pack | ( | FreqPart::Packed * | pOut, |
| int * | pCount ) |
Pack every part into consecutive 8-byte records.
The part list is also counted a second time and that count is discarded. FreqAppearance::Pack() is the one caller.
| pOut | The first record to write. |
| pCount | Receives the number of parts written. |
| void FreqAppearanceDetail::unpack | ( | const FreqPart::Packed * | pRecords, |
| int | nCount ) |
Append parts unpacked from consecutive 8-byte records.
For each record the body allocates a FreqPart, unpacks it, clones a mesh for it with the template's material and scale, places the mesh at the part's position raised to a height of 0.1, hangs it from mView, mirrors it when the part is mirrored, colours the part from the palette, records the scale steps, appends the part, and resets the placement state. FreqAppearance::Unpack() is the one caller.
| pRecords | The first record to read. |
| nCount | The number of records. |
| void FreqAppearanceDetail::ensureCursorMesh | ( | ) |
Create the preview mesh if there is none, hanging it from mView, and clear three placement words.
The title is inferred.
| void FreqAppearanceDetail::resetCursor | ( | ) |
Hide the preview mesh at the origin with no material and return the placement state to its unset values.
unpack() expands the same body. The title is inferred.
| void FreqAppearanceDetail::selectTemplate | ( | const HxStr & | name | ) |
Start placing a new part of one template.
The placement state is reset, and with fewer than 16 parts the named template is shown on the preview mesh with its material, scale, and the current colour, and the preview mesh is moved to the end of the view's lists. The title is inferred.
| name | The template name. |
| void FreqAppearanceDetail::placeCursor | ( | ) |
Place the previewed part, or stop editing the selected one.
While placing, a copy of the preview mesh becomes a new part at the cursor, drawn just before the preview mesh, with the current colour and mirroring, and the placement state is reset. While editing, the selection is dropped and placing resumes. The title is inferred.
| void FreqAppearanceDetail::nudgeCursor | ( | int | nStepX, |
| int | nStepZ ) |
Move the cursor one unit, moving the preview mesh or the selected part along with it.
Each axis moves only while the part's edges stay inside -55 to 55, and a part of category 1 does not rise above zero. Nothing moves while placing with 16 parts. The title is inferred.
| nStepX | -1, 0, or 1 along x. |
| nStepZ | -1, 0, or 1 along z. |
| FreqPart * FreqAppearanceDetail::selectPart | ( | int | nIndex | ) |
Start editing one part, retaining a copy to revert to.
The title is inferred.
| nIndex | The part's position in the part list. |
| void FreqAppearanceDetail::deletePart | ( | int | nIndex | ) |
Reset the placement state and delete one part.
The title is inferred.
| nIndex | The part's position in the part list. An index outside the list deletes nothing. |
| void FreqAppearanceDetail::revertSelection | ( | ) |
Restore the selected part's colour, mirroring, draw position, and placement from the copy selectPart() retained, and drop the selection.
The title is inferred.
| void FreqAppearanceDetail::randomize | ( | ) |
Give each part that may be randomised a random change.
With a chance of a third a part takes a random palette colour, and with another third a random template of its category, unless the category is 1, 2, or 8. The title is inferred.
| void FreqAppearanceDetail::recentrePart | ( | int | nIndex | ) |
Move one part and the cursor to the origin and bring the part to the front.
The title is inferred.
| nIndex | The part's position in the part list. |
| void FreqAppearanceDetail::sendBackward | ( | ) |
Move the previewed or selected mesh one step earlier in the draw order.
The title is inferred.
| void FreqAppearanceDetail::bringForward | ( | ) |
Move the previewed or selected mesh one step later in the draw order.
The title is inferred.
| int FreqAppearanceDetail::drawIndexOf | ( | FreqPart * | pPart | ) |
Report where a part's mesh sits in the view's draw order.
revertSelection() and selectPart() expand the same body. The out-of-line copy has no caller. The title is inferred.
| pPart | The part. |
| void FreqAppearanceDetail::toggleMirror | ( | ) |
Mirror the previewed or selected part.
The title is inferred.
Record the current colour and apply it to the previewed or selected part.
The title is inferred.
| color | The colour. |
| palettePosition | The palette position the colour came from. |
| void FreqAppearanceDetail::attachTo | ( | Rnd::View * | pParent | ) |
Hang mView from a parent view.
The title is inferred.
| pParent | The parent view. |
| void FreqAppearanceDetail::detachFrom | ( | Rnd::View * | pParent | ) |
Unhang mView from a parent view.
The title is inferred.
| pParent | The parent view. |
| Rnd::View* FreqAppearanceDetail::mView |
The avatar view the constructor allocates, 0x120 bytes.
+0xa4
Public because FreqAppearance::AttachToBurnSlot() reads it directly, and the image has no accessor for it.