mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
Merge 46f086cf01 into b30105638f
This commit is contained in:
commit
292444f34b
|
|
@ -32826,63 +32826,63 @@ Enemy/JangoCapStateTalkDemo.o:
|
|||
label:
|
||||
- _ZN21JangoCapStateTalkDemoC1EPN2al9LiveActorERKNS0_13ActorInitInfoE
|
||||
- _ZN21JangoCapStateTalkDemoC2EPN2al9LiveActorERKNS0_13ActorInitInfoE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12fdd8
|
||||
size: 100
|
||||
label: _ZN21JangoCapStateTalkDemo4initEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12fe3c
|
||||
size: 16
|
||||
label: _ZN21JangoCapStateTalkDemo6appearEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12fe4c
|
||||
size: 180
|
||||
label: _ZN21JangoCapStateTalkDemo12receiveEventEPKN2al18EventFlowEventDataE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12ff00
|
||||
size: 8
|
||||
label: _ZThn32_N21JangoCapStateTalkDemo12receiveEventEPKN2al18EventFlowEventDataE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12ff08
|
||||
size: 80
|
||||
label: _ZN21JangoCapStateTalkDemo14exeRequestDemoEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12ff58
|
||||
size: 8
|
||||
label: _ZN21JangoCapStateTalkDemo10exeWipeOutEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12ff60
|
||||
size: 80
|
||||
label: _ZN21JangoCapStateTalkDemo11exeWipeWaitEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12ffb0
|
||||
size: 8
|
||||
label: _ZN21JangoCapStateTalkDemo9exeWipeInEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
- offset: 0x12ffb8
|
||||
size: 36
|
||||
label: _ZN21JangoCapStateTalkDemoD0Ev
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x12ffdc
|
||||
size: 12
|
||||
label: _ZNK12_GLOBAL__N_131JangoCapStateTalkDemoNrvWipeOut7executeEPN2al11NerveKeeperE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
guess: true
|
||||
- offset: 0x12ffe8
|
||||
size: 80
|
||||
label: _ZNK12_GLOBAL__N_135JangoCapStateTalkDemoNrvRequestDemo7executeEPN2al11NerveKeeperE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
guess: true
|
||||
- offset: 0x130038
|
||||
size: 84
|
||||
label: _ZNK12_GLOBAL__N_132JangoCapStateTalkDemoNrvWipeWait7executeEPN2al11NerveKeeperE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
guess: true
|
||||
- offset: 0x13008c
|
||||
size: 12
|
||||
label: _ZNK12_GLOBAL__N_130JangoCapStateTalkDemoNrvWipeIn7executeEPN2al11NerveKeeperE
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
guess: true
|
||||
Enemy/JangoDirector.o:
|
||||
'.text':
|
||||
|
|
|
|||
79
src/Enemy/JangoCapStateTalkDemo.cpp
Normal file
79
src/Enemy/JangoCapStateTalkDemo.cpp
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
#include "Enemy/JangoCapStateTalkDemo.h"
|
||||
|
||||
#include "Library/Event/EventFlowFunction.h"
|
||||
#include "Library/Event/EventFlowUtil.h"
|
||||
#include "Library/LiveActor/LiveActor.h"
|
||||
#include "Library/Nerve/NerveSetupUtil.h"
|
||||
#include "Library/Nerve/NerveUtil.h"
|
||||
#include "Library/Placement/PlacementFunction.h"
|
||||
#include "Library/Stage/StageSwitchUtil.h"
|
||||
|
||||
#include "Util/NpcEventFlowUtil.h"
|
||||
#include "Util/PlayerDemoUtil.h"
|
||||
|
||||
namespace {
|
||||
NERVE_IMPL(JangoCapStateTalkDemo, RequestDemo)
|
||||
NERVE_IMPL(JangoCapStateTalkDemo, WipeOut)
|
||||
NERVE_IMPL(JangoCapStateTalkDemo, WipeWait)
|
||||
NERVE_IMPL(JangoCapStateTalkDemo, WipeIn)
|
||||
|
||||
NERVES_MAKE_NOSTRUCT(JangoCapStateTalkDemo, RequestDemo, WipeOut, WipeWait, WipeIn);
|
||||
} // namespace
|
||||
|
||||
JangoCapStateTalkDemo::JangoCapStateTalkDemo(al::LiveActor* actor,
|
||||
const al::ActorInitInfo& initInfo)
|
||||
: al::ActorStateBase("ジャンゴ帽子会話デモ", actor), mInitInfo(initInfo) {}
|
||||
|
||||
void JangoCapStateTalkDemo::init() {
|
||||
initNerve(&RequestDemo, 0);
|
||||
mEventFlowExecutor = rs::initEventFlow(mActor, mInitInfo, "Jango", nullptr);
|
||||
al::initEventReceiver(mEventFlowExecutor, this);
|
||||
al::tryGetLinksQT(&mDemoPlayerQuat, &mDemoPlayerTrans, mInitInfo, "TalkDemoPlayerPos");
|
||||
}
|
||||
|
||||
void JangoCapStateTalkDemo::appear() {
|
||||
al::NerveStateBase::appear();
|
||||
al::setNerve(this, &RequestDemo);
|
||||
}
|
||||
|
||||
bool JangoCapStateTalkDemo::receiveEvent(const al::EventFlowEventData* event) {
|
||||
al::LiveActor* actor = mActor;
|
||||
const al::EventFlowEventData* eventData = event;
|
||||
|
||||
if (al::isEventName(eventData, "WipeOutEnd")) {
|
||||
rs::replaceDemoPlayer(actor, mDemoPlayerTrans, mDemoPlayerQuat);
|
||||
al::setNerve(this, &WipeWait);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (al::isEventName(eventData, "WipeInEnd")) {
|
||||
rs::endEventCutSceneDemo(actor);
|
||||
al::tryOnStageSwitch(actor, "CapGetOn");
|
||||
kill();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void JangoCapStateTalkDemo::exeRequestDemo() {
|
||||
if (rs::tryStartEventCutSceneDemo(mActor)) {
|
||||
rs::startEventFlow(mEventFlowExecutor, "WipeOut");
|
||||
al::setNerve(this, &WipeOut);
|
||||
}
|
||||
}
|
||||
|
||||
void JangoCapStateTalkDemo::exeWipeOut() {
|
||||
rs::updateEventFlow(mEventFlowExecutor);
|
||||
}
|
||||
|
||||
void JangoCapStateTalkDemo::exeWipeWait() {
|
||||
if (al::isGreaterEqualStep(this, 60)) {
|
||||
rs::startEventFlow(mEventFlowExecutor, "WipeIn");
|
||||
al::setNerve(this, &WipeIn);
|
||||
}
|
||||
}
|
||||
|
||||
void JangoCapStateTalkDemo::exeWipeIn() {
|
||||
rs::updateEventFlow(mEventFlowExecutor);
|
||||
}
|
||||
36
src/Enemy/JangoCapStateTalkDemo.h
Normal file
36
src/Enemy/JangoCapStateTalkDemo.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
|
||||
#include <math/seadQuat.h>
|
||||
#include <math/seadVector.h>
|
||||
|
||||
#include "Library/Event/IEventFlowEventReceiver.h"
|
||||
#include "Library/Nerve/NerveStateBase.h"
|
||||
|
||||
namespace al {
|
||||
struct ActorInitInfo;
|
||||
class EventFlowEventData;
|
||||
class EventFlowExecutor;
|
||||
class LiveActor;
|
||||
} // namespace al
|
||||
|
||||
class JangoCapStateTalkDemo : public al::ActorStateBase, public al::IEventFlowEventReceiver {
|
||||
public:
|
||||
JangoCapStateTalkDemo(al::LiveActor* actor, const al::ActorInitInfo& initInfo);
|
||||
|
||||
void init() override;
|
||||
void appear() override;
|
||||
bool receiveEvent(const al::EventFlowEventData* event) override;
|
||||
|
||||
void exeRequestDemo();
|
||||
void exeWipeOut();
|
||||
void exeWipeWait();
|
||||
void exeWipeIn();
|
||||
|
||||
private:
|
||||
al::EventFlowExecutor* mEventFlowExecutor = nullptr;
|
||||
const al::ActorInitInfo& mInitInfo;
|
||||
sead::Vector3f mDemoPlayerTrans = sead::Vector3f::zero;
|
||||
sead::Quatf mDemoPlayerQuat = sead::Quatf::unit;
|
||||
};
|
||||
|
||||
static_assert(sizeof(JangoCapStateTalkDemo) == 0x58);
|
||||
|
|
@ -16,6 +16,8 @@ al::EventFlowExecutor* initEventFlowSuffix(al::LiveActor*, const al::ActorInitIn
|
|||
const char*, const char*);
|
||||
void startEventFlow(al::EventFlowExecutor*, const char*);
|
||||
bool updateEventFlow(al::EventFlowExecutor*);
|
||||
bool tryStartEventCutSceneDemo(al::LiveActor*);
|
||||
void endEventCutSceneDemo(al::LiveActor*);
|
||||
void initEventMessageTagDataHolder(al::EventFlowExecutor*, const al::MessageTagDataHolder*);
|
||||
void initEventCameraObject(al::EventFlowExecutor* flowExecutor, const al::ActorInitInfo& initInfo,
|
||||
const char* name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue