|
| | MultiMesh (const HxStr &name) |
| | Construct an empty multi-mesh.
|
| virtual | ~MultiMesh () |
| virtual void | DumpText (Dbg &sink) |
| | Write the multi-mesh to the engine text sink.
|
| virtual void | Save (Stream &stream) |
| | Serialise the multi-mesh.
|
| virtual void | Replace (Object *pFrom, Object *pTo) |
| | Replace one object reference with another.
|
| virtual const HxStr & | ClassName () const |
| | Return the registered class name, "MultiMesh".
|
| virtual void | Copy (const Object *pSource, unsigned nFlags) |
| | Copy another multi-mesh over this one.
|
| virtual void | Load (Stream &stream) |
| | Load the multi-mesh.
|
| void | AcquireMeshRef () |
| | Take a reference on the instanced mesh.
|
| void | ReleaseMeshRef () |
| | Release the reference on the instanced mesh.
|
| std::list< Transform > & | GetTransforms () |
| | Report the instance transforms.
|
| Mesh * | GetMesh () const |
| | Report the mesh every instance draws.
|
| Transform & | GetTransform (int nIndex) |
| | Report one instance transform by position.
|
| void | RemoveTransform (int nIndex) |
| | Remove one instance by position.
|
| void | SetMesh (Mesh *pMesh) |
| | Replace the mesh every instance draws, moving this object's reference to the new mesh.
|
| | Drawable () |
| | Construct a visible drawable with no children.
|
| virtual | ~Drawable () |
| | Drop this object's references on its children.
|
| void | Draw () |
| | Draw this object followed by each of its children.
|
| Drawable * | Parent () |
| | Report the drawable that draws this one.
|
| void | AddDraw (Drawable *pDraw, Drawable *pBefore) |
| | Insert pDraw into mDraws in front of pBefore.
|
| void | AddDraw (Drawable *pDraw) |
| | Insert pDraw at the front of mDraws.
|
| void | RemoveDraw (Drawable *pDraw) |
| | Erase pDraw from mDraws.
|
| void | RemoveAllDraws () |
| | Empty mDraws, dropping this object's reference on every entry.
|
| void | MoveDraw (Drawable *pDraw, int nSteps) |
| | Move pDraw nSteps places later in mDraws, or earlier for a negative count.
|
| virtual void | SetShowing (int nShowing) |
| | Set whether this object draws at all.
|
| void | SetShowingRecursive (int nShowing) |
| | Set whether this object and every drawable beneath it in mDraws draw at all.
|
| virtual void | SetHighlight (int nHighlight) |
| | Set whether this object draws with its highlight treatment.
|
| int | GetHighlight () const |
| | Report the highlight flag.
|
| int | GetShowing () const |
| | Report the showing flag.
|
| std::list< Drawable * > & | GetDraws () |
| | Report the child list.
|
| | Object () |
| | Construct an unnamed object.
|
| | Object (const HxStr &name) |
| | Construct an object and register it under name.
|
| virtual | ~Object () |
| | Erase the registry entry and release the name buffer.
|
| void | SetName (const HxStr &name) |
| | Re-register this object under a different name.
|
| void | AddRef (Object *pReferrer) |
| | Register pReferrer as a store of a pointer to this object.
|
| void | RemoveRef (Object *pReferrer) |
| | Drop one registration made by AddRef().
|
Draws one mesh many times, once per recorded instance transform.
Its RTTI descriptor is at 0x008ef150. It has Rnd::Drawable as its one public base at offset
- The Drawable subobject is 0x14 bytes and the shared Rnd::Object subobject sits at +0x1c. The Object sub-vtable at 0x00823e70 pins the offset from outside by recording a this adjustment of -0x1c in every entry. The creator allocates 0x38 bytes, and the 0x1c of Rnd::Object accounts for the remainder exactly. The Object sub-vtable has eight entries and the Drawable sub-vtable at 0x00823eb8 has four, each followed by an all-zero terminator.
An instance is a bare Rnd::Transform of 0x40 bytes, and 0x50 is the size of the list node rather than of the record. The constructor at 0x004e8a98 gives the node pool an element size of 0x40 and then allocates a 0x50-byte node, which places the payload at node + 0x10 rather than at the node + 0x08 a four-byte payload would use. The reader at 0x004eb6a0 confirms the layout from the other side by building a 0x40-byte prototype whose four padding words it sets to 1.0 and then reading three floats into each of the four rows.
The hardware submission path belongs to Rnd::PsMultiMesh, and DrawShowing() below is the portable implementation it replaces.
| virtual int Rnd::MultiMesh::DrawShowing |
( |
| ) |
|
|
protectedvirtual |
Draw the mesh once per instance.
Rnd::Drawable vtable slot 3. Borrows the instanced mesh: the level of detail threshold and both transforms are saved, each instance transform is installed as the mesh's local transform in turn, and the mesh draws itself at each one. The saved state is then restored.
- Returns
- Non-zero, always, so the children are drawn as well.
- Ghidra address:
- NTSC-U/C: 0x004e83d0
- Ghidra address:
- PAL: 0x00526f08
Reimplemented from Rnd::Drawable.
Reimplemented in Rnd::PsMultiMesh.