mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
MapObj: Implement MoonBasementBreakParts (#991)
This commit is contained in:
parent
03cdbfb91f
commit
df90d09c87
|
|
@ -76017,40 +76017,40 @@ MapObj/MoonBasementBreakParts.o:
|
|||
- offset: 0x2be9a0
|
||||
size: 120
|
||||
label: _ZN22MoonBasementBreakPartsC2EPKc
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x2bea18
|
||||
size: 132
|
||||
label: _ZN22MoonBasementBreakPartsC1EPKc
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x2bea9c
|
||||
size: 112
|
||||
label: _ZN22MoonBasementBreakParts4initERKN2al13ActorInitInfoE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x2beb0c
|
||||
size: 44
|
||||
label: _ZN22MoonBasementBreakParts6appearEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x2beb38
|
||||
size: 52
|
||||
label: _ZN22MoonBasementBreakParts4killEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x2beb6c
|
||||
size: 60
|
||||
label: _ZN22MoonBasementBreakParts7exeWaitEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x2beba8
|
||||
size: 52
|
||||
label: _ZN22MoonBasementBreakParts8exeBreakEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x2bebdc
|
||||
size: 64
|
||||
label: _ZNK12_GLOBAL__N_129MoonBasementBreakPartsNrvWait7executeEPN2al11NerveKeeperE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
guess: true
|
||||
- offset: 0x2bec1c
|
||||
size: 56
|
||||
label: _ZNK12_GLOBAL__N_130MoonBasementBreakPartsNrvBreak7executeEPN2al11NerveKeeperE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
guess: true
|
||||
MapObj/MoonBasementClimaxWatcher.o:
|
||||
'.text':
|
||||
|
|
@ -134821,7 +134821,7 @@ Scene/ProjectActorFactory.o:
|
|||
- offset: 0x4b98d0
|
||||
size: 52
|
||||
label: _ZN2al19createActorFunctionI22MoonBasementBreakPartsEEPNS_9LiveActorEPKc
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x4b9904
|
||||
size: 52
|
||||
|
|
|
|||
41
src/MapObj/MoonBasementBreakParts.cpp
Normal file
41
src/MapObj/MoonBasementBreakParts.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include "MapObj/MoonBasementBreakParts.h"
|
||||
|
||||
#include "Library/LiveActor/ActorActionFunction.h"
|
||||
#include "Library/LiveActor/ActorInitUtil.h"
|
||||
#include "Library/Nerve/NerveSetupUtil.h"
|
||||
#include "Library/Nerve/NerveUtil.h"
|
||||
|
||||
namespace {
|
||||
NERVE_IMPL(MoonBasementBreakParts, Wait)
|
||||
NERVE_IMPL(MoonBasementBreakParts, Break)
|
||||
|
||||
NERVES_MAKE_NOSTRUCT(MoonBasementBreakParts, Wait, Break)
|
||||
} // namespace
|
||||
|
||||
MoonBasementBreakParts::MoonBasementBreakParts(const char* actorName) : al::LiveActor(actorName) {}
|
||||
|
||||
void MoonBasementBreakParts::init(const al::ActorInitInfo& info) {
|
||||
al::initActorWithArchiveName(this, info, "MoonWorldBasementBreakParts000", nullptr);
|
||||
al::initNerve(this, &Wait, 0);
|
||||
makeActorAlive();
|
||||
}
|
||||
|
||||
void MoonBasementBreakParts::appear() {
|
||||
al::setNerve(this, &Wait);
|
||||
al::LiveActor::appear();
|
||||
}
|
||||
|
||||
void MoonBasementBreakParts::kill() {
|
||||
al::startAction(this, "Break");
|
||||
al::setNerve(this, &Break);
|
||||
}
|
||||
|
||||
void MoonBasementBreakParts::exeWait() {
|
||||
if (al::isFirstStep(this))
|
||||
al::startAction(this, "Wait");
|
||||
}
|
||||
|
||||
void MoonBasementBreakParts::exeBreak() {
|
||||
if (al::isActionEnd(this))
|
||||
al::LiveActor::kill();
|
||||
}
|
||||
17
src/MapObj/MoonBasementBreakParts.h
Normal file
17
src/MapObj/MoonBasementBreakParts.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
#include "Library/LiveActor/LiveActor.h"
|
||||
|
||||
class MoonBasementBreakParts : public al::LiveActor {
|
||||
public:
|
||||
MoonBasementBreakParts(const char* actorName);
|
||||
|
||||
void init(const al::ActorInitInfo& info) override;
|
||||
void appear() override;
|
||||
void kill() override;
|
||||
|
||||
void exeWait();
|
||||
void exeBreak();
|
||||
};
|
||||
|
||||
static_assert(sizeof(MoonBasementBreakParts) == 0x108);
|
||||
|
|
@ -85,6 +85,7 @@
|
|||
#include "MapObj/KoopaShip.h"
|
||||
#include "MapObj/LavaPan.h"
|
||||
#include "MapObj/MeganeMapParts.h"
|
||||
#include "MapObj/MoonBasementBreakParts.h"
|
||||
#include "MapObj/MoonBasementSlideObj.h"
|
||||
#include "MapObj/MoonWorldCaptureParadeLift.h"
|
||||
#include "MapObj/PeachWorldTree.h"
|
||||
|
|
@ -403,7 +404,7 @@ const al::NameToCreator<al::ActorCreatorFunction> sProjectActorFactoryEntries[]
|
|||
{"MeganeKeyMoveMapParts", nullptr},
|
||||
{"MeganeMapParts", al::createActorFunction<MeganeMapParts>},
|
||||
{"Mirror", nullptr},
|
||||
{"MoonBasementBreakParts", nullptr},
|
||||
{"MoonBasementBreakParts", al::createActorFunction<MoonBasementBreakParts>},
|
||||
{"MoonBasementClimaxWatcher", nullptr},
|
||||
{"MoonBasementFallObj", nullptr},
|
||||
{"MoonBasementFinalGate", nullptr},
|
||||
|
|
|
|||
Loading…
Reference in a new issue