Mix-in for an object that can be hit-tested, and that tests a list of other collideables.
More...
#include <rndcollideable.h>
|
| static int | sRev |
| | The format version Save() writes and Load() accepts.
|
| static constexpr int | kCopyChildLists = 0x200 |
| | The bit of the Copy() flags that copies the child lists of the mix-ins.
|
Mix-in for an object that can be hit-tested, and that tests a list of other collideables.
The RTTI includes the class name and records RndObject as a virtual base. Every entry of mCollides registers this object as a referrer through RndObject::AddRef().
◆ RndCollideable()
| RndCollideable::RndCollideable |
( |
| ) |
|
|
inline |
Construct a collideable without children.
The constructor has no out-of-line copy.
◆ ~RndCollideable()
| RndCollideable::~RndCollideable |
( |
| ) |
|
|
override |
Drop the references on the children.
- Ghidra address:
- NTSC-U/C: 0x0037fb80
- Ghidra address:
- PAL: 0x003ee298
◆ Collide() [1/2]
| virtual void RndCollideable::Collide |
( |
const Segment & | segment, |
|
|
std::list< Collision > & | collisions ) |
|
virtual |
Test a segment against the collideable and add what it strikes to a list.
The base body tests the children.
- Parameters
-
| segment | The segment. |
| collisions | The list to add to. |
- Ghidra address:
- NTSC-U/C: 0x002224c8
- Ghidra address:
- PAL: 0x0022b298
Reimplemented in RndArena, RndCam, RndLine, RndMesh, and RndText.
◆ Collide() [2/2]
| virtual void RndCollideable::Collide |
( |
const Vector2 & | point, |
|
|
std::list< Collision > & | collisions ) |
|
virtual |
Test a screen point against the collideable and add what it strikes to a list.
The base body tests the children.
- Parameters
-
| point | The screen point. |
| collisions | The list to add to. |
- Ghidra address:
- NTSC-U/C: 0x00222568
- Ghidra address:
- PAL: 0x0022b338
Reimplemented in RndArena, RndCam, RndLine, RndMesh, and RndText.
◆ DumpText()
| void RndCollideable::DumpText |
( |
PrnStream & | stream | ) |
|
|
overridevirtual |
Write a description of the collideable.
Nothing is written unless the dump level of the stream is above 0.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x002221d8
- Ghidra address:
- PAL: 0x0022afa8
Reimplemented from RndObject.
Reimplemented in RndLine, RndMesh, RndText, and RndView.
◆ Save()
| void RndCollideable::Save |
( |
BinStream & | stream | ) |
|
|
overridevirtual |
Write the names of the children.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x00222248
- Ghidra address:
- PAL: 0x0022b018
Implements RndObject.
Reimplemented in RndLine, RndMesh, RndText, and RndView.
◆ Replace()
Replace a child with another object.
A replacement that is not a collideable, or null, removes the child.
- Parameters
-
| pFrom | The object being replaced. |
| pTo | The replacement, or null. |
- Ghidra address:
- NTSC-U/C: 0x00222020
- Ghidra address:
- PAL: 0x0022adf0
Implements RndObject.
Reimplemented in RndLine, RndMesh, RndText, and RndView.
◆ Copy()
| void RndCollideable::Copy |
( |
const RndObject * | pSource, |
|
|
int | nFlags ) |
|
overridevirtual |
Copy the children when the flags request them.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x00222430
- Ghidra address:
- PAL: 0x0022b200
Implements RndObject.
Reimplemented in RndLine, RndMesh, RndText, and RndView.
◆ Load()
| void RndCollideable::Load |
( |
BinStream & | stream | ) |
|
|
overridevirtual |
◆ Parent()
Find the collideable whose children include this one.
- Returns
- The parent, or null.
- Ghidra address:
- NTSC-U/C: 0x00221f58
- Ghidra address:
- PAL: 0x0022ad28
◆ AddCollide()
Append a child.
A collideable already among the children is not added again.
- Parameters
-
- Returns
- Whether the child was added.
- Ghidra address:
- NTSC-U/C: 0x00222608
- Ghidra address:
- PAL: 0x0022b3d8
◆ RemoveCollide()
Remove a child.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x00222700
- Ghidra address:
- PAL: 0x0022b4d0
◆ CollectChildren()
Append every collision descendant of a collideable, depth first, each before its descendants.
Each unit that uses the inline routine emits a copy. The first address is the copy of RndManager, and the second the copy of UIList.
- Parameters
-
| objects | The list to append to. |
| pCollideable | The collideable to start from, or null. |
- Ghidra address:
- NTSC-U/C: 0x00237fb0
- Ghidra address:
- PAL: 0x00240b30
- Ghidra address:
- NTSC-U/C: 0x00205530
- Ghidra address:
- PAL: 0x0020e2e8
◆ ReleaseCollideRefs()
| void RndCollideable::ReleaseCollideRefs |
( |
| ) |
|
|
protected |
Drop the reference on every child without emptying the list.
The name is inferred.
- Ghidra address:
- NTSC-U/C: 0x002222a0
- Ghidra address:
- PAL: 0x0022b070
◆ AcquireCollideRefs()
| void RndCollideable::AcquireCollideRefs |
( |
| ) |
|
|
protected |
Take a reference on every child.
The name is inferred.
- Ghidra address:
- NTSC-U/C: 0x00222328
- Ghidra address:
- PAL: 0x0022b0f8
◆ sRev
The format version Save() writes and Load() accepts.
- Ghidra address:
- NTSC-U/C: 0x003b0998
- Ghidra address:
- PAL: 0x0042f830
The documentation for this class was generated from the following file: