diff --git a/csv/MapObj.csv b/csv/MapObj.csv index 056977b0..2ce39195 100644 --- a/csv/MapObj.csv +++ b/csv/MapObj.csv @@ -1872,17 +1872,17 @@ __ct__Q217NrvFallDownBridge21FallDownBridgeNrvWaitFv,FallDownBridge.o,MapObj.a,f __ct__Q217NrvFallDownBridge22FallDownBridgeNrvQuakeFv,FallDownBridge.o,MapObj.a,false execute__Q217NrvFallDownBridge22FallDownBridgeNrvQuakeCFP5Spine,FallDownBridge.o,MapObj.a,false execute__Q217NrvFallDownBridge21FallDownBridgeNrvWaitCFP5Spine,FallDownBridge.o,MapObj.a,false -__ct__16FallingSmallRockFPCc,FallingSmallRock.o,MapObj.a,false -init__16FallingSmallRockFRC12JMapInfoIter,FallingSmallRock.o,MapObj.a,false -startClipped__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,false -endClipped__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,false -exeMove__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,false -__dt__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,false -__sinit_\FallingSmallRock_cpp,FallingSmallRock.o,MapObj.a,false -__ct__Q219NrvFallingSmallRock12HostTypeWaitFv,FallingSmallRock.o,MapObj.a,false -__ct__Q219NrvFallingSmallRock12HostTypeMoveFv,FallingSmallRock.o,MapObj.a,false -execute__Q219NrvFallingSmallRock12HostTypeMoveCFP5Spine,FallingSmallRock.o,MapObj.a,false -execute__Q219NrvFallingSmallRock12HostTypeWaitCFP5Spine,FallingSmallRock.o,MapObj.a,false +__ct__16FallingSmallRockFPCc,FallingSmallRock.o,MapObj.a,true +init__16FallingSmallRockFRC12JMapInfoIter,FallingSmallRock.o,MapObj.a,true +startClipped__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,true +endClipped__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,true +exeMove__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,true +__dt__16FallingSmallRockFv,FallingSmallRock.o,MapObj.a,true +__sinit_\FallingSmallRock_cpp,FallingSmallRock.o,MapObj.a,true +__ct__Q219NrvFallingSmallRock12HostTypeWaitFv,FallingSmallRock.o,MapObj.a,true +__ct__Q219NrvFallingSmallRock12HostTypeMoveFv,FallingSmallRock.o,MapObj.a,true +execute__Q219NrvFallingSmallRock12HostTypeMoveCFP5Spine,FallingSmallRock.o,MapObj.a,true +execute__Q219NrvFallingSmallRock12HostTypeWaitCFP5Spine,FallingSmallRock.o,MapObj.a,true __ct__16FallOutFieldDrawFPCc,FallOutFieldDraw.o,MapObj.a,false setUpFillScreen__16FallOutFieldDrawCFv,FallOutFieldDraw.o,MapObj.a,false setUpEdgeAndClearAlpha__16FallOutFieldDrawCFv,FallOutFieldDraw.o,MapObj.a,false diff --git a/data/Game.json b/data/Game.json index 08551896..c87840d0 100644 --- a/data/Game.json +++ b/data/Game.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "Game", - "message": "13.682%", + "message": "13.701%", "color": "blue" } \ No newline at end of file diff --git a/data/json/MapObj.json b/data/json/MapObj.json index f837f5f2..ad4fa4b1 100644 --- a/data/json/MapObj.json +++ b/data/json/MapObj.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "MapObj", - "message": "27.699%", + "message": "27.799%", "color": "tan" } \ No newline at end of file diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 94b56420..4c32b8bf 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) | 73.07927450580803% | | [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 42.01936376210235% | | [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 17.65918333240488% | -| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 27.69919603948039% | +| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 27.79904107167001% | | [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 32.076605977327375% | | [NPC](https://github.com/shibbo/Petari/blob/master/docs/lib/NPC.md) | 2.155878467635403% | | [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 24251ea9..76199d80 100644 --- a/docs/lib/MapObj.md +++ b/docs/lib/MapObj.md @@ -103,7 +103,7 @@ | [ElectricRailMoving.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ElectricRailMoving.md) | 0.0% | 0 / 44 | 0.0% | :x: | [ExterminationChecker.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ExterminationChecker.md) | 92.11822660098522% | 19 / 21 | 90.47619047619048% | :eight_pointed_black_star: | [FallDownBridge.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/FallDownBridge.md) | 0.0% | 0 / 11 | 0.0% | :x: -| [FallingSmallRock.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/FallingSmallRock.md) | 0.0% | 0 / 11 | 0.0% | :x: +| [FallingSmallRock.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/FallingSmallRock.md) | 100.0% | 11 / 11 | 100.0% | :white_check_mark: | [FallOutFieldDraw.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/FallOutFieldDraw.md) | 0.0% | 0 / 13 | 0.0% | :x: | [FireBar.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/FireBar.md) | 71.49877149877149% | 19 / 21 | 90.47619047619048% | :eight_pointed_black_star: | [FirePressure.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/FirePressure.md) | 100.0% | 7 / 7 | 100.0% | :white_check_mark: diff --git a/docs/lib/MapObj/FallingSmallRock.md b/docs/lib/MapObj/FallingSmallRock.md index cdca6306..4fbb68e7 100644 --- a/docs/lib/MapObj/FallingSmallRock.md +++ b/docs/lib/MapObj/FallingSmallRock.md @@ -5,18 +5,18 @@ | :white_check_mark: | Function is completed. -# 0 / 11 Completed -- (0.0%) +# 11 / 11 Completed -- (100.0%) # FallingSmallRock.o | Symbol | Decompiled? | | ------------- | ------------- | -| `__ct__16FallingSmallRockFPCc` | :x: | -| `init__16FallingSmallRockFRC12JMapInfoIter` | :x: | -| `startClipped__16FallingSmallRockFv` | :x: | -| `endClipped__16FallingSmallRockFv` | :x: | -| `exeMove__16FallingSmallRockFv` | :x: | -| `__dt__16FallingSmallRockFv` | :x: | -| `__sinit_\FallingSmallRock_cpp` | :x: | -| `__ct__Q219NrvFallingSmallRock12HostTypeWaitFv` | :x: | -| `__ct__Q219NrvFallingSmallRock12HostTypeMoveFv` | :x: | -| `execute__Q219NrvFallingSmallRock12HostTypeMoveCFP5Spine` | :x: | -| `execute__Q219NrvFallingSmallRock12HostTypeWaitCFP5Spine` | :x: | +| `__ct__16FallingSmallRockFPCc` | :white_check_mark: | +| `init__16FallingSmallRockFRC12JMapInfoIter` | :white_check_mark: | +| `startClipped__16FallingSmallRockFv` | :white_check_mark: | +| `endClipped__16FallingSmallRockFv` | :white_check_mark: | +| `exeMove__16FallingSmallRockFv` | :white_check_mark: | +| `__dt__16FallingSmallRockFv` | :white_check_mark: | +| `__sinit_\FallingSmallRock_cpp` | :white_check_mark: | +| `__ct__Q219NrvFallingSmallRock12HostTypeWaitFv` | :white_check_mark: | +| `__ct__Q219NrvFallingSmallRock12HostTypeMoveFv` | :white_check_mark: | +| `execute__Q219NrvFallingSmallRock12HostTypeMoveCFP5Spine` | :white_check_mark: | +| `execute__Q219NrvFallingSmallRock12HostTypeWaitCFP5Spine` | :white_check_mark: | diff --git a/include/Game/MapObj/FallingSmallRock.hpp b/include/Game/MapObj/FallingSmallRock.hpp new file mode 100644 index 00000000..c6b99fc6 --- /dev/null +++ b/include/Game/MapObj/FallingSmallRock.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "Game/LiveActor/LiveActor.hpp" + +class FallingSmallRock : public LiveActor { +public: + FallingSmallRock(const char *); + + virtual ~FallingSmallRock(); + virtual void init(const JMapInfoIter &); + virtual void startClipped(); + virtual void endClipped(); + + void exeMove(); + inline void exeWait(); +}; + +namespace NrvFallingSmallRock { + NERVE_DECL(HostTypeWait, FallingSmallRock, FallingSmallRock::exeWait); + NERVE_DECL(HostTypeMove, FallingSmallRock, FallingSmallRock::exeMove); +}; \ No newline at end of file diff --git a/source/Game/MapObj/FallingSmallRock.cpp b/source/Game/MapObj/FallingSmallRock.cpp new file mode 100644 index 00000000..b75d4a66 --- /dev/null +++ b/source/Game/MapObj/FallingSmallRock.cpp @@ -0,0 +1,58 @@ +#include "Game/MapObj/FallingSmallRock.hpp" + +FallingSmallRock::FallingSmallRock(const char *pName) : LiveActor(pName) { + +} + +void FallingSmallRock::init(const JMapInfoIter &rIter) { + MR::initDefaultPos(this, rIter); + initSound(4, false); + initBinder(10.0f, 800.0f, 0); + initEffectKeeper(0, "FallingSmallRock", false); + MR::needStageSwitchReadA(this, rIter); + MR::setClippingTypeSphere(this, 800.0f); + initNerve(&NrvFallingSmallRock::HostTypeWait::sInstance); + MR::connectToSceneMapObjMovement(this); + makeActorAppeared(); +} + +void FallingSmallRock::startClipped() { + LiveActor::startClipped(); + if (isNerve(&NrvFallingSmallRock::HostTypeMove::sInstance)) { + MR::deleteEffectAll(this); + } +} + +void FallingSmallRock::endClipped() { + LiveActor::endClipped(); + if (isNerve(&NrvFallingSmallRock::HostTypeMove::sInstance)) { + MR::emitEffect(this, "FallingSmallRock"); + } +} + +void FallingSmallRock::exeMove() { + if (MR::isFirstStep(this)) { + MR::emitEffect(this, "FallingSmallRock"); + } + + MR::startLevelSound(this, "SE_AT_LV_FALLING_ROCK", -1, -1, -1); + + if (MR::isBinded(this)) { + makeActorDead(); + } +} + +void FallingSmallRock::exeWait() { + if (MR::isOnSwitchA(this)) { + setNerve(&NrvFallingSmallRock::HostTypeMove::sInstance); + } +} + +FallingSmallRock::~FallingSmallRock() { + +} + +namespace NrvFallingSmallRock { + INIT_NERVE(HostTypeWait); + INIT_NERVE(HostTypeMove); +}; \ No newline at end of file