SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
DemoCastGroup.cpp
1#include "Game/Demo/DemoCastGroup.hpp"
2
3DemoCastGroup::DemoCastGroup(const char *pName) : NameObj(pName) {
4 mInfo = 0;
5 mGroup = 0;
6}
7
8bool DemoCastGroup::tryRegisterDemoActor(LiveActor *pActor, const JMapInfoIter &rIter, const JMapIdInfo &rInfo) {
9 bool isNotSame = !(*mInfo == rInfo);
10
11 if (isNotSame) {
12 return false;
13 }
14
15 registerDemoActor(pActor, rIter);
16 return true;
17}
18
19bool DemoCastGroup::tryRegisterDemoActor(LiveActor *pActor, const char *pName, const JMapInfoIter &rIter) {
20 if (!MR::isEqualString(mName, pName)) {
21 return false;
22 }
23
24 registerDemoActor(pActor, rIter);
25 return true;
26}
27
28void DemoCastGroup::registerDemoActor(LiveActor *pActor, const JMapInfoIter & /* unused */) {
29 mGroup->registerActor(pActor);
30}
31
32DemoCastGroup::~DemoCastGroup() {
33
34}
35
37 setName(MR::getDemoName(rIter));
38 mGroup = new LiveActorGroup("関連者保持", 0xC0);
39 mGroup->initWithoutIter();
40 mInfo = new JMapIdInfo(MR::getDemoGroupLinkID(rIter), rIter);
41}
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
The most basic form of an object.
Definition NameObj.hpp:11
void setName(const char *pName)
Sets the NameObj's mName.
Definition NameObj.cpp:48
void initWithoutIter()
Initializes a NameObj without a JMapInfoIter instance.
Definition NameObj.cpp:41
const char * mName
A string to identify the NameObj.
Definition NameObj.hpp:38