diff --git a/csv/MapObj.csv b/csv/MapObj.csv index 0f4bc1b2..023a54d5 100644 --- a/csv/MapObj.csv +++ b/csv/MapObj.csv @@ -5764,26 +5764,26 @@ execute__Q210NrvUFOBase15UFOBaseNrvBreakCFP5Spine,UFOBase.o,MapObj.a,false execute__Q210NrvUFOBase14UFOBaseNrvMoveCFP5Spine,UFOBase.o,MapObj.a,false execute__Q210NrvUFOBase25UFOBaseNrvWaitForPlayerOnCFP5Spine,UFOBase.o,MapObj.a,false execute__Q210NrvUFOBase14UFOBaseNrvWaitCFP5Spine,UFOBase.o,MapObj.a,false -__ct__9UFOKinokoFPCc,UFOKinoko.o,MapObj.a,false -makeArchiveList__9UFOKinokoFP27NameObjArchiveListCollectorRC12JMapInfoIter,UFOKinoko.o,MapObj.a,false -init__9UFOKinokoFRC12JMapInfoIter,UFOKinoko.o,MapObj.a,false -control__9UFOKinokoFv,UFOKinoko.o,MapObj.a,false -initCaseUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo,UFOKinoko.o,MapObj.a,false -initCaseNoUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo,UFOKinoko.o,MapObj.a,false -startMove__9UFOKinokoFv,UFOKinoko.o,MapObj.a,false -exeMove__9UFOKinokoFv,UFOKinoko.o,MapObj.a,false -exeStop__9UFOKinokoFv,UFOKinoko.o,MapObj.a,false -__sinit_\UFOKinoko_cpp,UFOKinoko.o,MapObj.a,false -__ct__Q212NrvUFOKinoko12HostTypeWaitFv,UFOKinoko.o,MapObj.a,false -__ct__Q212NrvUFOKinoko12HostTypeMoveFv,UFOKinoko.o,MapObj.a,false -__ct__Q212NrvUFOKinoko12HostTypeStopFv,UFOKinoko.o,MapObj.a,false -execute__Q212NrvUFOKinoko12HostTypeStopCFP5Spine,UFOKinoko.o,MapObj.a,false -execute__Q212NrvUFOKinoko12HostTypeMoveCFP5Spine,UFOKinoko.o,MapObj.a,false -execute__Q212NrvUFOKinoko12HostTypeWaitCFP5Spine,UFOKinoko.o,MapObj.a,false -Functor<9UFOKinoko>__2MRFP9UFOKinokoM9UFOKinokoFPCvPv_v_Q22MR43FunctorV0M,UFOKinoko.o,MapObj.a,false -__cl__Q22MR43FunctorV0MCFv,UFOKinoko.o,MapObj.a,false -clone__Q22MR43FunctorV0MCFP7JKRHeap,UFOKinoko.o,MapObj.a,false -__dt__9UFOKinokoFv,UFOKinoko.o,MapObj.a,false +__ct__9UFOKinokoFPCc,UFOKinoko.o,MapObj.a,true +makeArchiveList__9UFOKinokoFP27NameObjArchiveListCollectorRC12JMapInfoIter,UFOKinoko.o,MapObj.a,true +init__9UFOKinokoFRC12JMapInfoIter,UFOKinoko.o,MapObj.a,true +control__9UFOKinokoFv,UFOKinoko.o,MapObj.a,true +initCaseUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo,UFOKinoko.o,MapObj.a,true +initCaseNoUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo,UFOKinoko.o,MapObj.a,true +startMove__9UFOKinokoFv,UFOKinoko.o,MapObj.a,true +exeMove__9UFOKinokoFv,UFOKinoko.o,MapObj.a,true +exeStop__9UFOKinokoFv,UFOKinoko.o,MapObj.a,true +__sinit_\UFOKinoko_cpp,UFOKinoko.o,MapObj.a,true +__ct__Q212NrvUFOKinoko12HostTypeWaitFv,UFOKinoko.o,MapObj.a,true +__ct__Q212NrvUFOKinoko12HostTypeMoveFv,UFOKinoko.o,MapObj.a,true +__ct__Q212NrvUFOKinoko12HostTypeStopFv,UFOKinoko.o,MapObj.a,true +execute__Q212NrvUFOKinoko12HostTypeStopCFP5Spine,UFOKinoko.o,MapObj.a,true +execute__Q212NrvUFOKinoko12HostTypeMoveCFP5Spine,UFOKinoko.o,MapObj.a,true +execute__Q212NrvUFOKinoko12HostTypeWaitCFP5Spine,UFOKinoko.o,MapObj.a,true +Functor<9UFOKinoko>__2MRFP9UFOKinokoM9UFOKinokoFPCvPv_v_Q22MR43FunctorV0M,UFOKinoko.o,MapObj.a,true +__cl__Q22MR43FunctorV0MCFv,UFOKinoko.o,MapObj.a,true +clone__Q22MR43FunctorV0MCFP7JKRHeap,UFOKinoko.o,MapObj.a,true +__dt__9UFOKinokoFv,UFOKinoko.o,MapObj.a,true __ct__11ValveSwitchFPCc,ValveSwitch.o,MapObj.a,false init__11ValveSwitchFRC12JMapInfoIter,ValveSwitch.o,MapObj.a,false initAfterPlacement__11ValveSwitchFv,ValveSwitch.o,MapObj.a,false diff --git a/data/Game.json b/data/Game.json index 8f0f56f1..9c6e523a 100644 --- a/data/Game.json +++ b/data/Game.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "Game", - "message": "8.499163867593385%", + "message": "8.533432373783253%", "color": "blue" } \ No newline at end of file diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index bea82df9..838cc765 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -12,7 +12,7 @@ | [Gravity](https://github.com/shibbo/Petari/blob/master/docs/lib/Gravity.md) | 56.286937028734464% | | [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 38.87044721069618% | | [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 12.97420756503816% | -| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 17.322073032480837% | +| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 17.508242415417737% | | [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 27.009618687736175% | | [NPC](https://github.com/shibbo/Petari/blob/master/docs/lib/NPC.md) | 0.7591369440774989% | | [NWC24](https://github.com/shibbo/Petari/blob/master/docs/lib/NWC24.md) | 0.0% | diff --git a/docs/lib/MapObj.md b/docs/lib/MapObj.md index 80e47574..16a3e12a 100644 --- a/docs/lib/MapObj.md +++ b/docs/lib/MapObj.md @@ -290,7 +290,7 @@ | Tsukidashikun.o | 0.0% | 0 / 27 | 0.0% | :x: | TypicalDoor.o | 0.0% | 0 / 28 | 0.0% | :x: | UFOBase.o | 0.0% | 0 / 26 | 0.0% | :x: -| UFOKinoko.o | 0.0% | 0 / 20 | 0.0% | :x: +| UFOKinoko.o | 100.0% | 20 / 20 | 100.0% | :white_check_mark: | ValveSwitch.o | 0.0% | 0 / 21 | 0.0% | :x: | WarpPod.o | 0.0% | 0 / 22 | 0.0% | :x: | WatchTowerRotateStep.o | 85.85131894484412% | 12 / 14 | 85.71428571428571% | :eight_pointed_black_star: @@ -7505,26 +7505,26 @@ # UFOKinoko.o | Symbol | Decompiled? | | ------------- | ------------- | -| __ct__9UFOKinokoFPCc | :x: | -| makeArchiveList__9UFOKinokoFP27NameObjArchiveListCollectorRC12JMapInfoIter | :x: | -| init__9UFOKinokoFRC12JMapInfoIter | :x: | -| control__9UFOKinokoFv | :x: | -| initCaseUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo | :x: | -| initCaseNoUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo | :x: | -| startMove__9UFOKinokoFv | :x: | -| exeMove__9UFOKinokoFv | :x: | -| exeStop__9UFOKinokoFv | :x: | -| __sinit_\UFOKinoko_cpp | :x: | -| __ct__Q212NrvUFOKinoko12HostTypeWaitFv | :x: | -| __ct__Q212NrvUFOKinoko12HostTypeMoveFv | :x: | -| __ct__Q212NrvUFOKinoko12HostTypeStopFv | :x: | -| execute__Q212NrvUFOKinoko12HostTypeStopCFP5Spine | :x: | -| execute__Q212NrvUFOKinoko12HostTypeMoveCFP5Spine | :x: | -| execute__Q212NrvUFOKinoko12HostTypeWaitCFP5Spine | :x: | -| Functor<9UFOKinoko>__2MRFP9UFOKinokoM9UFOKinokoFPCvPv_v_Q22MR43FunctorV0M<P9UFOKinoko,M9UFOKinokoFPCvPv_v> | :x: | -| __cl__Q22MR43FunctorV0M<P9UFOKinoko,M9UFOKinokoFPCvPv_v>CFv | :x: | -| clone__Q22MR43FunctorV0M<P9UFOKinoko,M9UFOKinokoFPCvPv_v>CFP7JKRHeap | :x: | -| __dt__9UFOKinokoFv | :x: | +| __ct__9UFOKinokoFPCc | :white_check_mark: | +| makeArchiveList__9UFOKinokoFP27NameObjArchiveListCollectorRC12JMapInfoIter | :white_check_mark: | +| init__9UFOKinokoFRC12JMapInfoIter | :white_check_mark: | +| control__9UFOKinokoFv | :white_check_mark: | +| initCaseUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo | :white_check_mark: | +| initCaseNoUseSwitchB__9UFOKinokoFRC19MapObjActorInitInfo | :white_check_mark: | +| startMove__9UFOKinokoFv | :white_check_mark: | +| exeMove__9UFOKinokoFv | :white_check_mark: | +| exeStop__9UFOKinokoFv | :white_check_mark: | +| __sinit_\UFOKinoko_cpp | :white_check_mark: | +| __ct__Q212NrvUFOKinoko12HostTypeWaitFv | :white_check_mark: | +| __ct__Q212NrvUFOKinoko12HostTypeMoveFv | :white_check_mark: | +| __ct__Q212NrvUFOKinoko12HostTypeStopFv | :white_check_mark: | +| execute__Q212NrvUFOKinoko12HostTypeStopCFP5Spine | :white_check_mark: | +| execute__Q212NrvUFOKinoko12HostTypeMoveCFP5Spine | :white_check_mark: | +| execute__Q212NrvUFOKinoko12HostTypeWaitCFP5Spine | :white_check_mark: | +| Functor<9UFOKinoko>__2MRFP9UFOKinokoM9UFOKinokoFPCvPv_v_Q22MR43FunctorV0M<P9UFOKinoko,M9UFOKinokoFPCvPv_v> | :white_check_mark: | +| __cl__Q22MR43FunctorV0M<P9UFOKinoko,M9UFOKinokoFPCvPv_v>CFv | :white_check_mark: | +| clone__Q22MR43FunctorV0M<P9UFOKinoko,M9UFOKinokoFPCvPv_v>CFP7JKRHeap | :white_check_mark: | +| __dt__9UFOKinokoFv | :white_check_mark: | # ValveSwitch.o diff --git a/include/Game/MapObj/UFOKinoko.h b/include/Game/MapObj/UFOKinoko.h new file mode 100644 index 00000000..55b68c30 --- /dev/null +++ b/include/Game/MapObj/UFOKinoko.h @@ -0,0 +1,30 @@ +#pragma once + +#include "Game/LiveActor/LiveActor.h" +#include "Game/MapObj/MapObjActor.h" +#include "Game/MapObj/MapObjActorInitInfo.h" +#include "Game/NameObj/NameObjArchiveListCollector.h" + +class UFOKinoko : public MapObjActor { +public: + UFOKinoko(const char *); + ~UFOKinoko(); + + virtual void init(const JMapInfoIter &); + virtual void control(); + virtual void initCaseUseSwitchB(const MapObjActorInitInfo &); + virtual void initCaseNoUseSwitchB(const MapObjActorInitInfo &); + + static void makeArchiveList(NameObjArchiveListCollector *, const JMapInfoIter &); + + void startMove(); + + void exeMove(); + void exeStop(); +}; + +namespace NrvUFOKinoko { + NERVE(HostTypeWait) + NERVE(HostTypeMove) + NERVE(HostTypeStop) +}; diff --git a/source/Game/MapObj/UFOKinoko.cpp b/source/Game/MapObj/UFOKinoko.cpp new file mode 100644 index 00000000..195309e0 --- /dev/null +++ b/source/Game/MapObj/UFOKinoko.cpp @@ -0,0 +1,111 @@ +#include "Game/MapObj/UFOKinoko.h" +#include "Game/MapObj/MapObjActor.h" +#include "Game/MapObj/MapObjActorInitInfo.h" +#include "Game/MapObj/StageEffectDataTable.h" + +UFOKinoko::UFOKinoko(const char *pName) : MapObjActor(pName) { + +} + +UFOKinoko::~UFOKinoko() { + +} + +void UFOKinoko::init(const JMapInfoIter &rIter) { + MapObjActor::init(rIter); + s32 argShadowType = -1; + MR::getMapPartsArgShadowType(&argShadowType, rIter); + bool hasShadow = !MR::isMapPartsShadowTypeNone(argShadowType); + MapObjActorInitInfo info; + info.setupHioNode("地形オブジェ"); + info.setupDefaultPos(); + info.setupConnectToScene(); + info.setupEffect(NULL); + info.setupSound(4); + info.setupGroupClipping(64); + info.setupSeAppear(); + info.setupRailMover(); + info.setupRotator(); + info.setupBaseMtxFollowTarget(); + info.setupNerve(&NrvUFOKinoko::HostTypeWait::sInstance); + if (hasShadow) { + info.setupShadow(NULL); + } + MapObjActorUtil::setupInitInfoColorChangeArg0(&info, rIter); + bool arg7 = true; + MR::getJMapInfoArg7NoInit(rIter, &arg7); + if (arg7) { + info.setupNouseLodCtrl(); + } + initialize(rIter, info); + MapObjActorUtil::startRotator(this); + if (MR::isDemoCast(this, NULL)) { + MR::FunctorV0M functor = MR::Functor(this, &UFOKinoko::startMove); + MR::tryRegisterDemoActionFunctor(this, functor, "UFOキノコ登場"); + } +} + +void UFOKinoko::control() { + MapObjActor::control(); + MR::StageEffect::tryStageEffectMoving(this, mObjectName); +} + +void UFOKinoko::initCaseUseSwitchB(const MapObjActorInitInfo &) { + MR::FunctorV0M functor = MR::Functor(this, &UFOKinoko::startMove); + MR::listenStageSwitchOnB(this, functor); +} + +void UFOKinoko::initCaseNoUseSwitchB(const MapObjActorInitInfo &) { + +} + +void UFOKinoko::startMove() { + if (mRailMover != NULL) { + MapObjActorUtil::startRailMover(this); + } + setNerve(&NrvUFOKinoko::HostTypeMove::sInstance); +} + +void UFOKinoko::makeArchiveList(NameObjArchiveListCollector *pArchiveList, const JMapInfoIter &rIter) { + bool arg7 = false; + MR::getJMapInfoArg7NoInit(rIter, &arg7); + if (arg7) { + pArchiveList->addArchive("UFOKinokoLow"); + } +} + +void UFOKinoko::exeMove() { + if (MR::isFirstStep(this)) { + MR::StageEffect::tryStageEffectStart(this, mObjectName); + MR::startSound(this, "SE_OJ_UFO_KINOKO_MOVE_ST", -1, -1); + } + MR::startLevelSound(this, "SE_OJ_LV_UFO_KINOKO_MOVE", -1, -1, -1); + if (mRailMover != NULL && !MapObjActorUtil::isRailMoverWorking(this)) { + setNerve(&NrvUFOKinoko::HostTypeStop::sInstance); + } +} + +void UFOKinoko::exeStop() { + if (MR::isFirstStep(this)) { + MR::startSound(this, "SE_OJ_UFO_KINOKO_MOVE_ED", -1, -1); + MR::StageEffect::tryStageEffectStop(this, mObjectName); + } +} + +namespace NrvUFOKinoko { + INIT_NERVE(HostTypeWait) + INIT_NERVE(HostTypeMove) + INIT_NERVE(HostTypeStop) + + void HostTypeWait::execute(Spine *pSpine) const { + + } + void HostTypeMove::execute(Spine *pSpine) const { + UFOKinoko* ufo = reinterpret_cast(pSpine->mExecutor); + ufo->exeMove(); + } + void HostTypeStop::execute(Spine *pSpine) const { + UFOKinoko* ufo = reinterpret_cast(pSpine->mExecutor); + ufo->exeStop(); + } +};