SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
DemoCastGroupHolder.cpp
1#include "Game/Demo/DemoCastGroupHolder.hpp"
2
3DemoCastGroupHolder::DemoCastGroupHolder() : NameObjGroup("デモ関係者グループ保持", 0x20) {
4
5}
6
7bool DemoCastGroupHolder::tryRegisterDemoActor(LiveActor *pActor, const JMapInfoIter &rIter, const JMapIdInfo &rInfo) const {
8 for (s32 i = 0; i < mObjectCount; i++) {
9 bool ret = reinterpret_cast<DemoCastGroup*>(mObjects[i])->tryRegisterDemoActor(pActor, rIter, rInfo);
10
11 if (ret) {
12 return true;
13 }
14 }
15
16 return false;
17}
18
19bool DemoCastGroupHolder::tryRegisterDemoActor(LiveActor *pActor, const char *pName, const JMapInfoIter &rIter) const {
20 for (s32 i = 0; i < mObjectCount; i++) {
21 bool ret = reinterpret_cast<DemoCastGroup*>(mObjects[i])->tryRegisterDemoActor(pActor, pName, rIter);
22
23 if (ret) {
24 return true;
25 }
26 }
27
28 return false;
29}
30
31DemoCastGroup* DemoCastGroupHolder::getCastGroup(int index) const {
32 return reinterpret_cast<DemoCastGroup*>(mObjects[index]);
33}
34
35DemoCastGroup* DemoCastGroupHolder::findCastGroup(const char *pName) const {
36 for (s32 i = 0; i < mObjectCount; i++) {
37 NameObj* obj = mObjects[i];
38 if (MR::isName(mObjects[i], pName)) {
39 return reinterpret_cast<DemoCastGroup*>(obj);
40 }
41 }
42
43 return 0;
44}
45
46DemoCastGroupHolder::~DemoCastGroupHolder() {
47
48}
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
Class that can contain multiple NameObj instances stored in a group.
The most basic form of an object.
Definition NameObj.hpp:11