mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-23 21:49:45 +00:00
commit
fca398ccfa
@ -2474,32 +2474,32 @@ __dt__15ItemAppearStoneFv,ItemAppearStone.o,MapObj.a,true
|
||||
__sinit_\ItemAppearStone_cpp,ItemAppearStone.o,MapObj.a,true
|
||||
__ct__Q218NrvItemAppearStone12HostTypeWaitFv,ItemAppearStone.o,MapObj.a,true
|
||||
execute__Q218NrvItemAppearStone12HostTypeWaitCFP5Spine,ItemAppearStone.o,MapObj.a,true
|
||||
__ct__9ItemBlockFPCc,ItemBlock.o,MapObj.a,false
|
||||
init__9ItemBlockFRC12JMapInfoIter,ItemBlock.o,MapObj.a,false
|
||||
startClipped__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
endClipped__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
checkKind__9ItemBlockFRC12JMapInfoIter,ItemBlock.o,MapObj.a,false
|
||||
__ct__9ItemBlockFPCc,ItemBlock.o,MapObj.a,true
|
||||
init__9ItemBlockFRC12JMapInfoIter,ItemBlock.o,MapObj.a,true
|
||||
startClipped__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
endClipped__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
checkKind__9ItemBlockFRC12JMapInfoIter,ItemBlock.o,MapObj.a,true
|
||||
initBlock__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
appear__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
kill__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
appear__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
kill__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
control__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
receiveMsgPlayerAttack__9ItemBlockFUlP9HitSensorP9HitSensor,ItemBlock.o,MapObj.a,false
|
||||
tryStartJumpPunch__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
exeWait__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
receiveMsgPlayerAttack__9ItemBlockFUlP9HitSensorP9HitSensor,ItemBlock.o,MapObj.a,true
|
||||
tryStartJumpPunch__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
exeWait__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
exeAppearItem__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
exeAppearItemSplash__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
decTimer__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
calcAnim__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
__dt__9ItemBlockFv,ItemBlock.o,MapObj.a,false
|
||||
__sinit_\ItemBlock_cpp,ItemBlock.o,MapObj.a,false
|
||||
__ct__Q212NrvItemBlock19ItemBlockNrvStandbyFv,ItemBlock.o,MapObj.a,false
|
||||
__ct__Q212NrvItemBlock16ItemBlockNrvWaitFv,ItemBlock.o,MapObj.a,false
|
||||
__ct__Q212NrvItemBlock22ItemBlockNrvAppearItemFv,ItemBlock.o,MapObj.a,false
|
||||
__ct__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashFv,ItemBlock.o,MapObj.a,false
|
||||
execute__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashCFP5Spine,ItemBlock.o,MapObj.a,false
|
||||
execute__Q212NrvItemBlock22ItemBlockNrvAppearItemCFP5Spine,ItemBlock.o,MapObj.a,false
|
||||
execute__Q212NrvItemBlock16ItemBlockNrvWaitCFP5Spine,ItemBlock.o,MapObj.a,false
|
||||
execute__Q212NrvItemBlock19ItemBlockNrvStandbyCFP5Spine,ItemBlock.o,MapObj.a,false
|
||||
exeAppearItemSplash__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
decTimer__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
calcAnim__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
__dt__9ItemBlockFv,ItemBlock.o,MapObj.a,true
|
||||
__sinit_\ItemBlock_cpp,ItemBlock.o,MapObj.a,true
|
||||
__ct__Q212NrvItemBlock19ItemBlockNrvStandbyFv,ItemBlock.o,MapObj.a,true
|
||||
__ct__Q212NrvItemBlock16ItemBlockNrvWaitFv,ItemBlock.o,MapObj.a,true
|
||||
__ct__Q212NrvItemBlock22ItemBlockNrvAppearItemFv,ItemBlock.o,MapObj.a,true
|
||||
__ct__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashFv,ItemBlock.o,MapObj.a,true
|
||||
execute__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashCFP5Spine,ItemBlock.o,MapObj.a,true
|
||||
execute__Q212NrvItemBlock22ItemBlockNrvAppearItemCFP5Spine,ItemBlock.o,MapObj.a,true
|
||||
execute__Q212NrvItemBlock16ItemBlockNrvWaitCFP5Spine,ItemBlock.o,MapObj.a,true
|
||||
execute__Q212NrvItemBlock19ItemBlockNrvStandbyCFP5Spine,ItemBlock.o,MapObj.a,true
|
||||
calcAndSetBaseMtx__13RotPartsModelFv,ItemBubble.o,MapObj.a,false
|
||||
__ct__10ItemBubbleFPCc,ItemBubble.o,MapObj.a,false
|
||||
init__10ItemBubbleFRC12JMapInfoIter,ItemBubble.o,MapObj.a,false
|
||||
|
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "Game",
|
||||
"message": "10.413%",
|
||||
"message": "10.48%",
|
||||
"color": "blue"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "MapObj",
|
||||
"message": "23.868%",
|
||||
"message": "24.231%",
|
||||
"color": "tan"
|
||||
}
|
@ -12,7 +12,7 @@
|
||||
| [Gravity](https://github.com/shibbo/Petari/blob/master/docs/lib/Gravity.md) | 56.816792337477075% |
|
||||
| [LiveActor](https://github.com/shibbo/Petari/blob/master/docs/lib/LiveActor.md) | 41.18026740433379% |
|
||||
| [Map](https://github.com/shibbo/Petari/blob/master/docs/lib/Map.md) | 16.35006406328338% |
|
||||
| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 23.868682981622275% |
|
||||
| [MapObj](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj.md) | 24.231661275728296% |
|
||||
| [NameObj](https://github.com/shibbo/Petari/blob/master/docs/lib/NameObj.md) | 30.427688079697695% |
|
||||
| [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% |
|
||||
|
@ -134,7 +134,7 @@
|
||||
| [InvisiblePolygonObjGCapture.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/InvisiblePolygonObjGCapture.md) | 0.0% | 0 / 3 | 0.0% | :x:
|
||||
| [IronCannonShell.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/IronCannonShell.md) | 0.0% | 0 / 27 | 0.0% | :x:
|
||||
| [ItemAppearStone.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ItemAppearStone.md) | 100.0% | 9 / 9 | 100.0% | :white_check_mark:
|
||||
| [ItemBlock.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ItemBlock.md) | 0.0% | 0 / 26 | 0.0% | :x:
|
||||
| [ItemBlock.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ItemBlock.md) | 74.88479262672811% | 23 / 26 | 88.46153846153845% | :eight_pointed_black_star:
|
||||
| [ItemBubble.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ItemBubble.md) | 0.0% | 0 / 18 | 0.0% | :x:
|
||||
| [JetTurtle.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/JetTurtle.md) | 0.0% | 0 / 55 | 0.0% | :x:
|
||||
| [JumpHole.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/JumpHole.md) | 0.0% | 0 / 21 | 0.0% | :x:
|
||||
@ -157,7 +157,7 @@
|
||||
| [LavaStrangeRock.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/LavaStrangeRock.md) | 0.0% | 0 / 10 | 0.0% | :x:
|
||||
| [LotusLeaf.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/LotusLeaf.md) | 0.0% | 0 / 16 | 0.0% | :x:
|
||||
| [MagicBell.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/MagicBell.md) | 40.23494860499266% | 11 / 15 | 73.33333333333333% | :eight_pointed_black_star:
|
||||
| [ManholeCover.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ManholeCover.md) | 0.0% | 0 / 13 | 0.0% | :x:
|
||||
| [ManholeCover.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/ManholeCover.md) | 20.96069868995633% | 1 / 13 | 7.6923076923076925% | :eight_pointed_black_star:
|
||||
| [MapObjActor.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/MapObjActor.md) | 61.95652173913043% | 58 / 59 | 98.30508474576271% | :eight_pointed_black_star:
|
||||
| [MapObjActorInitInfo.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/MapObjActorInitInfo.md) | 22.48062015503876% | 11 / 37 | 29.72972972972973% | :eight_pointed_black_star:
|
||||
| [MapObjConnector.o](https://github.com/shibbo/Petari/blob/master/docs/lib/MapObj/MapObjConnector.md) | 32.25806451612903% | 4 / 6 | 66.66666666666666% | :eight_pointed_black_star:
|
||||
|
@ -5,33 +5,33 @@
|
||||
| :white_check_mark: | Function is completed.
|
||||
|
||||
|
||||
# 0 / 26 Completed -- (0.0%)
|
||||
# 23 / 26 Completed -- (88.46153846153845%)
|
||||
# ItemBlock.o
|
||||
| Symbol | Decompiled? |
|
||||
| ------------- | ------------- |
|
||||
| `__ct__9ItemBlockFPCc` | :x: |
|
||||
| `init__9ItemBlockFRC12JMapInfoIter` | :x: |
|
||||
| `startClipped__9ItemBlockFv` | :x: |
|
||||
| `endClipped__9ItemBlockFv` | :x: |
|
||||
| `checkKind__9ItemBlockFRC12JMapInfoIter` | :x: |
|
||||
| `__ct__9ItemBlockFPCc` | :white_check_mark: |
|
||||
| `init__9ItemBlockFRC12JMapInfoIter` | :white_check_mark: |
|
||||
| `startClipped__9ItemBlockFv` | :white_check_mark: |
|
||||
| `endClipped__9ItemBlockFv` | :white_check_mark: |
|
||||
| `checkKind__9ItemBlockFRC12JMapInfoIter` | :white_check_mark: |
|
||||
| `initBlock__9ItemBlockFv` | :x: |
|
||||
| `appear__9ItemBlockFv` | :x: |
|
||||
| `kill__9ItemBlockFv` | :x: |
|
||||
| `appear__9ItemBlockFv` | :white_check_mark: |
|
||||
| `kill__9ItemBlockFv` | :white_check_mark: |
|
||||
| `control__9ItemBlockFv` | :x: |
|
||||
| `receiveMsgPlayerAttack__9ItemBlockFUlP9HitSensorP9HitSensor` | :x: |
|
||||
| `tryStartJumpPunch__9ItemBlockFv` | :x: |
|
||||
| `exeWait__9ItemBlockFv` | :x: |
|
||||
| `receiveMsgPlayerAttack__9ItemBlockFUlP9HitSensorP9HitSensor` | :white_check_mark: |
|
||||
| `tryStartJumpPunch__9ItemBlockFv` | :white_check_mark: |
|
||||
| `exeWait__9ItemBlockFv` | :white_check_mark: |
|
||||
| `exeAppearItem__9ItemBlockFv` | :x: |
|
||||
| `exeAppearItemSplash__9ItemBlockFv` | :x: |
|
||||
| `decTimer__9ItemBlockFv` | :x: |
|
||||
| `calcAnim__9ItemBlockFv` | :x: |
|
||||
| `__dt__9ItemBlockFv` | :x: |
|
||||
| `__sinit_\ItemBlock_cpp` | :x: |
|
||||
| `__ct__Q212NrvItemBlock19ItemBlockNrvStandbyFv` | :x: |
|
||||
| `__ct__Q212NrvItemBlock16ItemBlockNrvWaitFv` | :x: |
|
||||
| `__ct__Q212NrvItemBlock22ItemBlockNrvAppearItemFv` | :x: |
|
||||
| `__ct__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashFv` | :x: |
|
||||
| `execute__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashCFP5Spine` | :x: |
|
||||
| `execute__Q212NrvItemBlock22ItemBlockNrvAppearItemCFP5Spine` | :x: |
|
||||
| `execute__Q212NrvItemBlock16ItemBlockNrvWaitCFP5Spine` | :x: |
|
||||
| `execute__Q212NrvItemBlock19ItemBlockNrvStandbyCFP5Spine` | :x: |
|
||||
| `exeAppearItemSplash__9ItemBlockFv` | :white_check_mark: |
|
||||
| `decTimer__9ItemBlockFv` | :white_check_mark: |
|
||||
| `calcAnim__9ItemBlockFv` | :white_check_mark: |
|
||||
| `__dt__9ItemBlockFv` | :white_check_mark: |
|
||||
| `__sinit_\ItemBlock_cpp` | :white_check_mark: |
|
||||
| `__ct__Q212NrvItemBlock19ItemBlockNrvStandbyFv` | :white_check_mark: |
|
||||
| `__ct__Q212NrvItemBlock16ItemBlockNrvWaitFv` | :white_check_mark: |
|
||||
| `__ct__Q212NrvItemBlock22ItemBlockNrvAppearItemFv` | :white_check_mark: |
|
||||
| `__ct__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashFv` | :white_check_mark: |
|
||||
| `execute__Q212NrvItemBlock28ItemBlockNrvAppearItemSplashCFP5Spine` | :white_check_mark: |
|
||||
| `execute__Q212NrvItemBlock22ItemBlockNrvAppearItemCFP5Spine` | :white_check_mark: |
|
||||
| `execute__Q212NrvItemBlock16ItemBlockNrvWaitCFP5Spine` | :white_check_mark: |
|
||||
| `execute__Q212NrvItemBlock19ItemBlockNrvStandbyCFP5Spine` | :white_check_mark: |
|
||||
|
@ -5,11 +5,11 @@
|
||||
| :white_check_mark: | Function is completed.
|
||||
|
||||
|
||||
# 0 / 13 Completed -- (0.0%)
|
||||
# 1 / 13 Completed -- (7.6923076923076925%)
|
||||
# ManholeCover.o
|
||||
| Symbol | Decompiled? |
|
||||
| ------------- | ------------- |
|
||||
| `init__12ManholeCoverFRC12JMapInfoIter` | :x: |
|
||||
| `init__12ManholeCoverFRC12JMapInfoIter` | :white_check_mark: |
|
||||
| `receiveMsgPlayerAttack__12ManholeCoverFUlP9HitSensorP9HitSensor` | :x: |
|
||||
| `receiveOtherMsg__12ManholeCoverFUlP9HitSensorP9HitSensor` | :x: |
|
||||
| `exeOpen__12ManholeCoverFv` | :x: |
|
||||
|
40
include/Game/MapObj/ItemBlock.h
Normal file
40
include/Game/MapObj/ItemBlock.h
Normal file
@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Game/LiveActor/LiveActor.h"
|
||||
|
||||
class ItemBlock : public LiveActor {
|
||||
public:
|
||||
ItemBlock(const char *);
|
||||
|
||||
virtual ~ItemBlock();
|
||||
virtual void init(const JMapInfoIter &);
|
||||
virtual void calcAnim();
|
||||
virtual void appear();
|
||||
virtual void kill();
|
||||
virtual void startClipped();
|
||||
virtual void endClipped();
|
||||
virtual void control();
|
||||
virtual bool receiveMsgPlayerAttack(u32, HitSensor *, HitSensor *);
|
||||
|
||||
void checkKind(const JMapInfoIter &);
|
||||
void initBlock();
|
||||
bool tryStartJumpPunch();
|
||||
void exeWait();
|
||||
void exeAppearItem();
|
||||
void exeAppearItemSplash();
|
||||
void decTimer();
|
||||
|
||||
s32 mKind; // 0x8C
|
||||
s32 mTimer; // 0x90
|
||||
s32 mItemCount; // 0x94
|
||||
u8 _98; // 0x98
|
||||
bool mCalcShadowOneTime; // 0x99
|
||||
bool mNoCalcAnim; // 0x9A
|
||||
};
|
||||
|
||||
namespace NrvItemBlock {
|
||||
NERVE(ItemBlockNrvStandby);
|
||||
NERVE(ItemBlockNrvWait);
|
||||
NERVE(ItemBlockNrvAppearItem);
|
||||
NERVE(ItemBlockNrvAppearItemSplash);
|
||||
};
|
@ -36,6 +36,8 @@ namespace MR {
|
||||
|
||||
void onCalcShadow(LiveActor *, const char *);
|
||||
|
||||
void excludeCalcShadowToMyCollision(LiveActor *, const char *);
|
||||
|
||||
void validateShadow(LiveActor *, const char *);
|
||||
void validateShadowGroup(LiveActor *, const char *);
|
||||
void invalidateShadow(LiveActor *, const char *);
|
||||
|
@ -127,7 +127,7 @@ namespace MR {
|
||||
bool tryRumbleDefaultHit(const void *, s32);
|
||||
|
||||
void declareCoin(const NameObj *, s32);
|
||||
void getDeclareRemnantCoinCount(const NameObj *);
|
||||
s32 getDeclareRemnantCoinCount(const NameObj *);
|
||||
void hopCoin(const NameObj *, const TVec3f &, const TVec3f &);
|
||||
void appearCoinFix(const NameObj *, const TVec3f &, s32);
|
||||
|
||||
@ -136,6 +136,8 @@ namespace MR {
|
||||
|
||||
void appearCoinToVelocity(const NameObj *, const TVec3f &, const TVec3f &, s32);
|
||||
|
||||
void appearCoinCircle(const NameObj *, const TVec3f &, s32);
|
||||
|
||||
void declareStarPiece(const NameObj *, s32);
|
||||
s32 getDeclareRemnantStarPieceCount(const NameObj *);
|
||||
s32 getDeclareRemnantStarPieceCountNotExist(const NameObj *);
|
||||
|
BIN
prog.png
BIN
prog.png
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 31 KiB |
333
source/Game/MapObj/ItemBlock.cpp
Normal file
333
source/Game/MapObj/ItemBlock.cpp
Normal file
@ -0,0 +1,333 @@
|
||||
#include "Game/MapObj/ItemBlock.h"
|
||||
#include "Game/Util.h"
|
||||
#include "JSystem/JGeometry/TVec.h"
|
||||
|
||||
namespace NrvItemBlock {
|
||||
INIT_NERVE(ItemBlockNrvStandby);
|
||||
INIT_NERVE(ItemBlockNrvWait);
|
||||
INIT_NERVE(ItemBlockNrvAppearItem);
|
||||
INIT_NERVE(ItemBlockNrvAppearItemSplash);
|
||||
|
||||
void ItemBlockNrvAppearItemSplash::execute(Spine *pSpine) const {
|
||||
ItemBlock *block = reinterpret_cast<ItemBlock *>(pSpine->mExecutor);
|
||||
block->exeAppearItemSplash();
|
||||
}
|
||||
|
||||
void ItemBlockNrvAppearItem::execute(Spine *pSpine) const {
|
||||
ItemBlock *block = reinterpret_cast<ItemBlock *>(pSpine->mExecutor);
|
||||
block->exeAppearItem();
|
||||
}
|
||||
|
||||
void ItemBlockNrvWait::execute(Spine *pSpine) const {
|
||||
ItemBlock *block = reinterpret_cast<ItemBlock *>(pSpine->mExecutor);
|
||||
block->exeWait();
|
||||
}
|
||||
|
||||
void ItemBlockNrvStandby::execute(Spine *pSpine) const {
|
||||
ItemBlock *block = reinterpret_cast<ItemBlock *>(pSpine->mExecutor);
|
||||
if (MR::isFirstStep(block)) {
|
||||
MR::startBck(block, "Wait", nullptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
namespace {
|
||||
static Color8 hPointLight(0xFF, 0xE6, 0, 0xFF);
|
||||
};
|
||||
|
||||
ItemBlock::ItemBlock(const char *pName) : LiveActor(pName) {
|
||||
mKind = 0;
|
||||
mTimer = 0;
|
||||
mItemCount = 8;
|
||||
_98 = 0;
|
||||
mCalcShadowOneTime = false;
|
||||
}
|
||||
|
||||
void ItemBlock::init(const JMapInfoIter &rIter) {
|
||||
MR::initDefaultPos(this, rIter);
|
||||
checkKind(rIter);
|
||||
initBlock();
|
||||
MR::connectToSceneMapObjStrongLight(this);
|
||||
MR::useStageSwitchSleep(this, rIter);
|
||||
initEffectKeeper(1, "CoinBlock", false);
|
||||
initSound(4, false);
|
||||
initNerve(&NrvItemBlock::ItemBlockNrvStandby::sInstance);
|
||||
s32 arg = -1;
|
||||
MR::getJMapInfoArg4NoInit(rIter, &arg);
|
||||
MR::initShadowVolumeBox(this, TVec3f(150.0f, 150.0f, 150.0f));
|
||||
MR::setShadowVolumeStartDropOffset(this, 0, 77.0f);
|
||||
|
||||
if (arg != -1) {
|
||||
MR::setShadowDropLength(this, nullptr, arg);
|
||||
}
|
||||
|
||||
MR::onShadowVolumeCutDropLength(this, nullptr);
|
||||
MR::excludeCalcShadowToMyCollision(this, nullptr);
|
||||
|
||||
if (mCalcShadowOneTime) {
|
||||
MR::onCalcShadowOneTime(this, nullptr);
|
||||
} else {
|
||||
MR::onCalcShadow(this, nullptr);
|
||||
}
|
||||
|
||||
if (MR::isZeroGravity(this)) {
|
||||
TVec3f upVec;
|
||||
MR::calcUpVec(&upVec, this);
|
||||
MR::setShadowDropDirection(this, 0, -upVec);
|
||||
} else {
|
||||
MR::calcGravity(this);
|
||||
}
|
||||
|
||||
MR::offCalcGravity(this);
|
||||
MR::setGroupClipping(this, rIter, 16);
|
||||
MR::validateClipping(this);
|
||||
|
||||
appear();
|
||||
}
|
||||
|
||||
void ItemBlock::startClipped() {
|
||||
LiveActor::startClipped();
|
||||
MR::forceDeleteEffect(this, "Glow");
|
||||
}
|
||||
|
||||
void ItemBlock::endClipped() {
|
||||
LiveActor::endClipped();
|
||||
MR::emitEffect(this, "Glow");
|
||||
}
|
||||
|
||||
void ItemBlock::checkKind(const JMapInfoIter &rIter) {
|
||||
const char *name = nullptr;
|
||||
MR::getObjectName(&name, rIter);
|
||||
|
||||
if (MR::isEqualString(name, "ItemBlockSwitch")) {
|
||||
MR::needStageSwitchWriteDead(this, rIter);
|
||||
mKind = 5;
|
||||
} else if (MR::isEqualString(name, "TimerCoinBlock")) {
|
||||
mKind = 1;
|
||||
MR::declareCoin(this, 10);
|
||||
} else if (MR::isEqualString(name, "SplashCoinBlock")) {
|
||||
mKind = 2;
|
||||
MR::declareCoin(this, mItemCount);
|
||||
} else if (MR::isEqualString(name, "TimerPieceBlock")) {
|
||||
mKind = 3;
|
||||
MR::declareStarPiece(this, 20);
|
||||
} else if (MR::isEqualString(name, "SplashPieceBlock")) {
|
||||
mKind = 4;
|
||||
MR::declareStarPiece(this, mItemCount);
|
||||
}
|
||||
|
||||
s32 arg = -1;
|
||||
|
||||
if (mKind == 2 || mKind == 4) {
|
||||
arg = -1;
|
||||
MR::getJMapInfoArg0NoInit(rIter, &arg);
|
||||
|
||||
if (arg >= 0) {
|
||||
mItemCount = arg;
|
||||
} else {
|
||||
mItemCount = 8;
|
||||
}
|
||||
}
|
||||
|
||||
if (mKind == 1 || mKind == 3) {
|
||||
MR::getJMapInfoArg1NoInit(rIter, &arg);
|
||||
|
||||
if (arg == -1) {
|
||||
mTimer = 240;
|
||||
} else {
|
||||
mTimer = arg;
|
||||
}
|
||||
}
|
||||
|
||||
arg = -1;
|
||||
MR::getJMapInfoArg2NoInit(rIter, &arg);
|
||||
mCalcShadowOneTime = !(arg - 1);
|
||||
}
|
||||
|
||||
/*void ItemBlock::initBlock() {
|
||||
initHitSensor(1);
|
||||
|
||||
if (mKind >= 6 || mKind < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
initModelManagerWithAnm("CoinBlock", nullptr, false);
|
||||
TVec3f *mtx = new TVec3f(0.0f, 100.0f, 0.0f);
|
||||
MR::addHitSensorMtxMapObj(this, "body", 8, 100.0f, MR::getJointMtx(this, "CoinBlock"), *mtx);
|
||||
MR::initCollisionPartsAutoEqualScale(this, "CoinBlock", getSensor("body"), (MtxPtr)mtx);
|
||||
}*/
|
||||
|
||||
void ItemBlock::appear() {
|
||||
LiveActor::appear();
|
||||
initNerve(&NrvItemBlock::ItemBlockNrvStandby::sInstance);
|
||||
|
||||
if (mKind > 6 || mKind < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
MR::startBrk(this, "CoinBlock");
|
||||
}
|
||||
|
||||
void ItemBlock::kill() {
|
||||
MR::startSound(this, "SE_EM_EXPLODE_S", -1, -1);
|
||||
MR::emitEffect(this, "Break");
|
||||
LiveActor::kill();
|
||||
}
|
||||
|
||||
/*void ItemBlock::control() {
|
||||
TVec3f upVec;
|
||||
MR::calcUpVec(&upVec, this);
|
||||
MR::requestPointLight(this, TVec3f(upVec * 100.0f), hPointLight, 0.998646f, -1);
|
||||
}*/
|
||||
|
||||
bool ItemBlock::receiveMsgPlayerAttack(u32 msg, HitSensor *a1, HitSensor *a2) {
|
||||
if (MR::isMsgPlayerUpperPunch(msg) && MR::isPlayerExistDown(this, 0.0f, 0.25f) && tryStartJumpPunch()) {
|
||||
MR::sendArbitraryMsg(64, a1, a2);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ItemBlock::tryStartJumpPunch() {
|
||||
if (isNerve(&NrvItemBlock::ItemBlockNrvStandby::sInstance)) {
|
||||
if (mKind == 1 || mKind == 3) {
|
||||
MR::startBck(this, "Appear", nullptr);
|
||||
calcAnim();
|
||||
mNoCalcAnim = true;
|
||||
setNerve(&NrvItemBlock::ItemBlockNrvAppearItem::sInstance);
|
||||
} else if (mKind == 2 || (u32)(mKind - 4) <= 1) {
|
||||
setNerve(&NrvItemBlock::ItemBlockNrvAppearItemSplash::sInstance);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isNerve(&NrvItemBlock::ItemBlockNrvWait::sInstance)) {
|
||||
if (mKind == 1 || mKind == 3) {
|
||||
if (mKind == 1) {
|
||||
if (MR::getDeclareRemnantCoinCount(this) == 1) {
|
||||
mTimer = 0;
|
||||
}
|
||||
} else {
|
||||
if (!(MR::getDeclareRemnantStarPieceCountNotExist(this) - 11)) {
|
||||
mTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
MR::startBck(this, "Appear", nullptr);
|
||||
calcAnim();
|
||||
mNoCalcAnim = true;
|
||||
setNerve(&NrvItemBlock::ItemBlockNrvAppearItem::sInstance);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ItemBlock::exeWait() {
|
||||
if (MR::isFirstStep(this)) {
|
||||
MR::startBck(this, "Wait", nullptr);
|
||||
MR::invalidateClipping(this);
|
||||
}
|
||||
|
||||
decTimer();
|
||||
}
|
||||
|
||||
/*void ItemBlock::exeAppearItem() {
|
||||
if (MR::isFirstStep(this)) {
|
||||
if (!mTimer) {
|
||||
MR::forceDeleteEffect(this, "Glow");
|
||||
MR::startBck(this, "Bomb", nullptr);
|
||||
}
|
||||
|
||||
MR::invalidateClipping(this);
|
||||
}
|
||||
|
||||
if (MR::isStep(this, 1)) {
|
||||
TVec3f gravVec;
|
||||
TVec3f position(mPosition);
|
||||
MR::calcGravityVector(this, &gravVec, nullptr, 0);
|
||||
|
||||
position.subInline(mPosition, gravVec * 100.0f);
|
||||
|
||||
if (mKind == 2) {
|
||||
MR::startSystemSE("SE_SY_ITEM_APPEAR", -1, -1);
|
||||
}
|
||||
|
||||
if (mKind >= 1) {
|
||||
MR::hopCoin(this, position, -gravVec);
|
||||
}
|
||||
|
||||
if (mKind >= 4) {
|
||||
} else {
|
||||
if (mTimer || MR::getDeclareRemnantStarPieceCountNotExist(this) != 11) {
|
||||
MR::appearStarPieceToDirection(this, position, -gravVec, 11, 10.0f, 40.0f, false);
|
||||
} else {
|
||||
MR::hopStarPiece(this, position, -gravVec);
|
||||
}
|
||||
|
||||
MR::startSound(this, "SE_OJ_STAR_PIECE_BURST", -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
decTimer();
|
||||
|
||||
if (!MR::isBckStopped(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mTimer) {
|
||||
setNerve(&NrvItemBlock::ItemBlockNrvWait::sInstance);
|
||||
} else {
|
||||
kill();
|
||||
}
|
||||
}*/
|
||||
|
||||
void ItemBlock::exeAppearItemSplash() {
|
||||
if (MR::isFirstStep(this)) {
|
||||
MR::forceDeleteEffect(this, "Glow");
|
||||
MR::startBck(this, "Bomb", nullptr);
|
||||
}
|
||||
|
||||
if (!MR::isBckStopped(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mKind == 2) {
|
||||
if (mItemCount == 1) {
|
||||
MR::appearCoinPop(this, mPosition, 1);
|
||||
} else {
|
||||
MR::appearCoinCircle(this, mPosition, mItemCount);
|
||||
}
|
||||
} else if (mKind == 4) {
|
||||
MR::appearStarPiece(this, mPosition, mItemCount, 10.0f, 40.0f, false);
|
||||
MR::startSound(this, "SE_OJ_STAR_PIECE_BURST", -1, -1);
|
||||
} else if (mKind == 5) {
|
||||
MR::onSwitchDead(this);
|
||||
}
|
||||
|
||||
mTimer = 0;
|
||||
kill();
|
||||
}
|
||||
|
||||
void ItemBlock::decTimer() {
|
||||
--mTimer;
|
||||
if (mTimer > 0) {
|
||||
return;
|
||||
}
|
||||
mTimer = 0;
|
||||
}
|
||||
|
||||
void ItemBlock::calcAnim() {
|
||||
if (!mNoCalcAnim) {
|
||||
LiveActor::calcAnim();
|
||||
}
|
||||
mNoCalcAnim = false;
|
||||
}
|
||||
|
||||
ItemBlock::~ItemBlock() {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user