misc. cleanup and documentation

some interaction and navi ID cleanup, documenting rumble and vibration states, and documenting movie demo states
This commit is contained in:
HeartPiece 2024-04-18 00:34:19 +10:00
parent ddf3606072
commit 93de21fd1e
79 changed files with 917 additions and 763 deletions

View File

@ -85,22 +85,22 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/texCaster.cpp">texCaster.cpp</a> | 16071 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCaveInfo.cpp">gameCaveInfo.cpp</a> | 16103 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_CaveResult.cpp">singleGS_CaveResult.cpp</a> | 19624 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemCave.cpp">itemCave.cpp</a> | 20160 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pathfinder.cpp">pathfinder.cpp</a> | 20316 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/dynCreature.cpp">dynCreature.cpp</a> | 21624 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameDynamics.cpp">gameDynamics.cpp</a> | 24672 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPikihead.cpp">itemPikihead.cpp</a> | 26219 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCPlate.cpp">gameCPlate.cpp</a> | 26452 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/vsCardMgr.cpp">vsCardMgr.cpp</a> | 30623 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_MainGame.cpp">singleGS_MainGame.cpp</a> | 31763 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemBridge.cpp">itemBridge.cpp</a> | 32134 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameDynamics.cpp">gameDynamics.cpp</a> | 24672 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCPlate.cpp">gameCPlate.cpp</a> | 26452 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPikihead.cpp">itemPikihead.cpp</a> | 26530 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/vsCardMgr.cpp">vsCardMgr.cpp</a> | 30652 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_MainGame.cpp">singleGS_MainGame.cpp</a> | 31879 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemBridge.cpp">itemBridge.cpp</a> | 32134 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemGate.cpp">itemGate.cpp</a> | 32754 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gamePlayDataMemCard.cpp">gamePlayDataMemCard.cpp</a> | 36009 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 36191 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/routeMgr.cpp">routeMgr.cpp</a> | 39098 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 36225 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/routeMgr.cpp">routeMgr.cpp</a> | 39098 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameGeneratorCache.cpp">gameGeneratorCache.cpp</a> | 40204 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/collinfo.cpp">collinfo.cpp</a> | 43410 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/mapMgr.cpp">mapMgr.cpp</a> | 43418 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiMgr.cpp">pikiMgr.cpp</a> | 47880 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/mapMgr.cpp">mapMgr.cpp</a> | 43418 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiMgr.cpp">pikiMgr.cpp</a> | 47897 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiFormation.cpp">aiFormation.cpp</a> | 52263 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/cellPyramid.cpp">cellPyramid.cpp</a> | 52507 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_CaveGame.cpp">singleGS_CaveGame.cpp</a> | 52628 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi_demoCheck.cpp">navi_demoCheck.cpp</a> | 57635 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemWeed.cpp">itemWeed.cpp</a> | 62058 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletState.cpp">pelletState.cpp</a> | 62915 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_CaveGame.cpp">singleGS_CaveGame.cpp</a> | 52763 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi_demoCheck.cpp">navi_demoCheck.cpp</a> | 57727 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemWeed.cpp">itemWeed.cpp</a> | 62058 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletState.cpp">pelletState.cpp</a> | 62948 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemUjamushi.cpp">itemUjamushi.cpp</a> | 63548 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/fakePiki.cpp">fakePiki.cpp</a> | 65612 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gamePlayData.cpp">gamePlayData.cpp</a> | 66045 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPlant.cpp">itemPlant.cpp</a> | 73150 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSection.cpp">baseGameSection.cpp</a> | 91018 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiPrimitives.cpp">aiPrimitives.cpp</a> | 116997 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletMgr.cpp">pelletMgr.cpp</a> | 142637 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi.cpp">navi.cpp</a> | 150933 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiState.cpp">pikiState.cpp</a> | 153107 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_Zukan.cpp">singleGS_Zukan.cpp</a> | 161342 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameMapParts.cpp">gameMapParts.cpp</a> | 168069 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/naviState.cpp">naviState.cpp</a> | 180513 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSection.cpp">baseGameSection.cpp</a> | 91759 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiPrimitives.cpp">aiPrimitives.cpp</a> | 116997 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletMgr.cpp">pelletMgr.cpp</a> | 142649 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi.cpp">navi.cpp</a> | 151166 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiState.cpp">pikiState.cpp</a> | 153257 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_Zukan.cpp">singleGS_Zukan.cpp</a> | 161342 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameMapParts.cpp">gameMapParts.cpp</a> | 168069 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/naviState.cpp">naviState.cpp</a> | 181111 |
### <section id="plugProjectKonoU">plugProjectKonoU</section>
| File | Size (bytes) | File | Size (bytes) |
@ -113,11 +113,11 @@
| ---- | ---- | ---- | ---- |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/tamagoMushi.cpp">tamagoMushi.cpp</a> | 14174 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/panModokiState.cpp">panModokiState.cpp</a> | 21666 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/scrollList.cpp">scrollList.cpp</a> | 25920 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/dayEndCount.cpp">dayEndCount.cpp</a> | 26683 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/tyre.cpp">tyre.cpp</a> | 26721 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/hurryUp2D.cpp">hurryUp2D.cpp</a> | 27140 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/tyre.cpp">tyre.cpp</a> | 26766 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/hurryUp2D.cpp">hurryUp2D.cpp</a> | 27140 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/miulin.cpp">miulin.cpp</a> | 34326 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/jigumo.cpp">jigumo.cpp</a> | 41080 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/shijimiChou.cpp">shijimiChou.cpp</a> | 43374 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/kingChappyState.cpp">kingChappyState.cpp</a> | 50458 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/panModoki.cpp">panModoki.cpp</a> | 53592 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/umiMushi.cpp">umiMushi.cpp</a> | 58736 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/kingChappy.cpp">kingChappy.cpp</a> | 64598 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/hiScore2D.cpp">hiScore2D.cpp</a> | 103201 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/shijimiChou.cpp">shijimiChou.cpp</a> | 43374 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/kingChappyState.cpp">kingChappyState.cpp</a> | 50783 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/panModoki.cpp">panModoki.cpp</a> | 53671 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/umiMushi.cpp">umiMushi.cpp</a> | 58736 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/kingChappy.cpp">kingChappy.cpp</a> | 64646 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/hiScore2D.cpp">hiScore2D.cpp</a> | 103201 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/blackMan.cpp">blackMan.cpp</a> | 121077 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/zukan2D.cpp">zukan2D.cpp</a> | 133600 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/challengeResult2D.cpp">challengeResult2D.cpp</a> | 147116 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/challengeSelect2D.cpp">challengeSelect2D.cpp</a> | 185530 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/vsSelect2D.cpp">vsSelect2D.cpp</a> | 200915 | | |
@ -127,7 +127,7 @@
| ---- | ---- | ---- | ---- |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ContRumble.cpp">ContRumble.cpp</a> | 6767 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/nslibmath.cpp">nslibmath.cpp</a> | 7010 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TyreShadow.cpp">TyreShadow.cpp</a> | 7255 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UmimushiShadow.cpp">UmimushiShadow.cpp</a> | 7603 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeJointMgr.cpp">SnakeJointMgr.cpp</a> | 7850 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaChappy.cpp">KumaChappy.cpp</a> | 10284 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeJointMgr.cpp">SnakeJointMgr.cpp</a> | 7850 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaChappy.cpp">KumaChappy.cpp</a> | 10312 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeWholeShadow.cpp">SnakeWholeShadow.cpp</a> | 11927 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeCrowShadow.cpp">SnakeCrowShadow.cpp</a> | 12091 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Kabuto.cpp">Kabuto.cpp</a> | 12217 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BabyState.cpp">BabyState.cpp</a> | 12813 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Kogane.cpp">Kogane.cpp</a> | 14476 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/RandMapMgr.cpp">RandMapMgr.cpp</a> | 15150 |
@ -135,23 +135,23 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/JointShadowBase.cpp">JointShadowBase.cpp</a> | 18222 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Rock.cpp">Rock.cpp</a> | 19428 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ImomushiState.cpp">ImomushiState.cpp</a> | 19552 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Imomushi.cpp">Imomushi.cpp</a> | 19690 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UjiaState.cpp">UjiaState.cpp</a> | 20986 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ElecHiba.cpp">ElecHiba.cpp</a> | 21757 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/QueenState.cpp">QueenState.cpp</a> | 22414 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Ujia.cpp">Ujia.cpp</a> | 22569 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/QueenState.cpp">QueenState.cpp</a> | 22553 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Ujia.cpp">Ujia.cpp</a> | 22569 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudai.cpp">MiniHoudai.cpp</a> | 22751 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Ujib.cpp">Ujib.cpp</a> | 23086 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Queen.cpp">Queen.cpp</a> | 23215 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BigTreasureShadow.cpp">BigTreasureShadow.cpp</a> | 25204 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Tobi.cpp">Tobi.cpp</a> | 25388 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UjibState.cpp">UjibState.cpp</a> | 25546 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Armor.cpp">Armor.cpp</a> | 25974 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ArmorState.cpp">ArmorState.cpp</a> | 26469 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TobiState.cpp">TobiState.cpp</a> | 27052 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SaraiState.cpp">SaraiState.cpp</a> | 27154 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Armor.cpp">Armor.cpp</a> | 25974 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ArmorState.cpp">ArmorState.cpp</a> | 26549 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TobiState.cpp">TobiState.cpp</a> | 27052 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SaraiState.cpp">SaraiState.cpp</a> | 27182 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MarState.cpp">MarState.cpp</a> | 28183 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/FrogState.cpp">FrogState.cpp</a> | 30812 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeCrowState.cpp">SnakeCrowState.cpp</a> | 31586 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/playCamera.cpp">playCamera.cpp</a> | 32659 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/HanachirashiState.cpp">HanachirashiState.cpp</a> | 32796 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KabutoState.cpp">KabutoState.cpp</a> | 32917 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TankState.cpp">TankState.cpp</a> | 32992 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BombSaraiState.cpp">BombSaraiState.cpp</a> | 36288 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeCrowState.cpp">SnakeCrowState.cpp</a> | 32062 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/HanachirashiState.cpp">HanachirashiState.cpp</a> | 32796 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KabutoState.cpp">KabutoState.cpp</a> | 32917 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TankState.cpp">TankState.cpp</a> | 32992 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/playCamera.cpp">playCamera.cpp</a> | 33624 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BombSaraiState.cpp">BombSaraiState.cpp</a> | 36432 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/RandMapScore.cpp">RandMapScore.cpp</a> | 37034 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/DangoMushi.cpp">DangoMushi.cpp</a> | 37045 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Mar.cpp">Mar.cpp</a> | 38856 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Hanachirashi.cpp">Hanachirashi.cpp</a> | 39533 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeCrow.cpp">SnakeCrow.cpp</a> | 39684 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/DangoMushiState.cpp">DangoMushiState.cpp</a> | 41808 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ShadowCylinder.cpp">ShadowCylinder.cpp</a> | 41966 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/OniKurage.cpp">OniKurage.cpp</a> | 45177 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/HoudaiShotGun.cpp">HoudaiShotGun.cpp</a> | 48280 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeWhole.cpp">SnakeWhole.cpp</a> | 49307 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudaiShotGun.cpp">MiniHoudaiShotGun.cpp</a> | 49809 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaKochappyState.cpp">KumaKochappyState.cpp</a> | 50166 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudaiState.cpp">MiniHoudaiState.cpp</a> | 52093 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/RandMapUnit.cpp">RandMapUnit.cpp</a> | 62215 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeCrow.cpp">SnakeCrow.cpp</a> | 39743 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ShadowCylinder.cpp">ShadowCylinder.cpp</a> | 41966 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/DangoMushiState.cpp">DangoMushiState.cpp</a> | 42594 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/OniKurage.cpp">OniKurage.cpp</a> | 45296 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/HoudaiShotGun.cpp">HoudaiShotGun.cpp</a> | 48308 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeWhole.cpp">SnakeWhole.cpp</a> | 49307 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudaiShotGun.cpp">MiniHoudaiShotGun.cpp</a> | 49866 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaKochappyState.cpp">KumaKochappyState.cpp</a> | 50166 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudaiState.cpp">MiniHoudaiState.cpp</a> | 52142 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/RandMapUnit.cpp">RandMapUnit.cpp</a> | 62215 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/RandEnemyUnit.cpp">RandEnemyUnit.cpp</a> | 75559 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BigTreasureAttack.cpp">BigTreasureAttack.cpp</a> | 77490 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaChappyState.cpp">KumaChappyState.cpp</a> | 89894 | | |
@ -195,7 +195,7 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/sysShape.cpp">sysShape.cpp</a> | 15109 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/sysShapeModel.cpp">sysShapeModel.cpp</a> | 16166 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectSystem.cpp">JSTObjectSystem.cpp</a> | 17997 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/titleSection.cpp">titleSection.cpp</a> | 19575 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectActor.cpp">JSTObjectActor.cpp</a> | 19718 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/resourceMgr.cpp">resourceMgr.cpp</a> | 21536 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/matMath.cpp">matMath.cpp</a> | 26224 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/moviePlayer.cpp">moviePlayer.cpp</a> | 30673 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/matMath.cpp">matMath.cpp</a> | 26224 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/moviePlayer.cpp">moviePlayer.cpp</a> | 31151 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/memoryCard.cpp">memoryCard.cpp</a> | 32567 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/windowMessage.cpp">windowMessage.cpp</a> | 37900 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/bootSection.cpp">bootSection.cpp</a> | 38359 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/system.cpp">system.cpp</a> | 38660 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/movieMessage.cpp">movieMessage.cpp</a> | 48193 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/screenMgr.cpp">screenMgr.cpp</a> | 50710 |
@ -210,7 +210,7 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_TrackMap.cpp">PSMainSide_TrackMap.cpp</a> | 17101 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_BossMgr.cpp">PSMainSide_BossMgr.cpp</a> | 17562 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_DirectorMgr.cpp">PSMainSide_DirectorMgr.cpp</a> | 28567 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_Demo.cpp">PSMainSide_Demo.cpp</a> | 30399 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_Se.cpp">PSMainSide_Se.cpp</a> | 44024 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_Scene.cpp">PSMainSide_Scene.cpp</a> | 49476 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_Director.cpp">PSMainSide_Director.cpp</a> | 57485 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_ObjSound.cpp">PSMainSide_ObjSound.cpp</a> | 86560 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_Director.cpp">PSMainSide_Director.cpp</a> | 57480 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_ObjSound.cpp">PSMainSide_ObjSound.cpp</a> | 86560 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/utilityU/PSMainSide_Factory.cpp">PSMainSide_Factory.cpp</a> | 94042 | | |

View File

@ -87,10 +87,9 @@ struct Camera : public CullFrustum {
f32 getFar();
Vector3f getLookAtPosition();
f32 getNear();
void setFixNearFar(bool, f32, f32);
void setFixNearFar(bool isFixed, f32 nearZ, f32 farZ);
void setProjection();
void update();
// void updatePlanes();
void updateSoundCamera(f32);
inline bool isRunning() { return (mJstObject && mJstObject->isRunning()); }

View File

@ -11,11 +11,106 @@
struct Viewport;
namespace Game {
struct CameraArg;
struct Navi;
enum DemoCameraType {
CAMDEMO_NearLow = 0,
CAMDEMO_Test = 1, // never used but has code
};
enum CamNaviID {
CAMNAVI_Olimar = 0,
CAMNAVI_Louie = 1,
CAMNAVI_Both = 2,
};
enum CamSelAngle {
CAMANGLE_Behind = 0, // low angle (behind navi)
CAMANGLE_Overhead = 1, // high angle (overhead)
};
enum CamZoomLevel {
CAMZOOM_Near = 0, // fully zoomed in
CAMZOOM_Mid = 1, // middle zoom
CAMZOOM_Far = 2, // fully zoomed out
};
enum CameraFlags {
CAMFLAGS_ChangeZoomLevel = 0x1, // i.e. R has been pressed
CAMFLAGS_ChangeSelAngle = 0x2, // i.e. Z has been pressed
CAMFLAGS_CenterBehind = 0x4, // i.e. L has been pressed
CAMFLAGS_SmoothFollow = 0x8, // i.e. L is being held
CAMFLAGS_StartZoomCam = 0x10, // start zoom cam (held R/starting demo)
CAMFLAGS_InZoomCam = 0x20, // continue zoom cam (holding R/in demo)
CAMFLAGS_EndZoomCam = 0x40, // end zoom cam (stopped holding R/ended demo)
};
enum CamChangePlayer {
CAMCHANGE_None = 0,
CAMCHANGE_IsChanging = 1,
};
// StrengthSpeedDuration
enum VibrationType {
//////// Strength LIGHT ////////
// Speed SLOW
VIBTYPE_LightSlowShort = 0, // duration short (light, slow)
VIBTYPE_LightSlowMid = 1, // duration mid (light, slow)
VIBTYPE_LightSlowLong = 2, // duration long (light, slow)
// Speed MID
VIBTYPE_LightMidShort = 3, // duration short (light, mid)
VIBTYPE_LightMidMid = 4, // duration mid (light, mid)
VIBTYPE_LightMidLong = 5, // duration long (light, mid)
// Speed FAST
VIBTYPE_LightFastShort = 6, // duration short (light, fast)
VIBTYPE_LightFastMid = 7, // duration mid (light, fast)
VIBTYPE_LightFastLong = 8, // duration long (light, fast)
VIBTYPE_LIGHT = VIBTYPE_LightFastLong, // cutoff for light vibration
//////// Strength MID ////////
// Speed SLOW
VIBTYPE_MidSlowShort = 9, // duration short (mid, slow)
VIBTYPE_MidSlowMid = 10, // duration mid (mid, slow)
VIBTYPE_MidSlowLong = 11, // duration long (mid, slow)
// Speed MID
VIBTYPE_MidMidShort = 12, // duration short (mid, mid)
VIBTYPE_MidMidMid = 13, // duration mid (mid, mid)
VIBTYPE_MidMidLong = 14, // duration long (mid, mid)
// Speed FAST
VIBTYPE_MidFastShort = 15, // duration short (mid, fast)
VIBTYPE_MidFastMid = 16, // duration mid (mid, fast)
VIBTYPE_MidFastLong = 17, // duration long (mid, fast)
VIBTYPE_MID = VIBTYPE_MidFastLong, // cutoff for light vibration
//////// Strength HARD ////////
// Speed SLOW
VIBTYPE_HardSlowShort = 18, // duration short (hard, slow)
VIBTYPE_HardSlowMid = 19, // duration mid (hard, slow)
VIBTYPE_HardSlowLong = 20, // duration long (hard, slow)
// Speed MID
VIBTYPE_HardMidShort = 21, // duration short (hard, mid)
VIBTYPE_HardMidMid = 22, // duration mid (hard, mid)
VIBTYPE_HardMidLong = 23, // duration long (hard, mid)
// Speed FAST
VIBTYPE_HardFastShort = 24, // duration short (hard, fast)
VIBTYPE_HardFastMid = 25, // duration mid (hard, fast)
VIBTYPE_HardFastLong = 26, // duration long (hard, fast)
VIBTYPE_HARD = VIBTYPE_HardFastLong, // cutoff for light vibration
// special set vibration parameters
VIBTYPE_Crash = 27, // 'crash' effects (rocks hitting the ground, crawbster falling/crashing, empress crashing)
VIBTYPE_Boom = 28, // for mum flicks and groink deaths?
VIBTYPE_NaviDamage = 29, // just for navis taking damage
};
struct CameraArg {
u32 state;
u32 mState; // _00
};
struct CameraData {
@ -247,7 +342,7 @@ struct PlayCamera : public LookAtCamera {
void setCameraAngle(f32 angle);
void getCameraData(CameraData& data);
void setCameraData(CameraData& data);
void changePlayerMode(bool updateDir);
void changePlayerMode(bool doCenterCameraBehind);
void noUpdate();
bool isVibration();
void startVibration(int type, f32 strength);
@ -262,12 +357,12 @@ struct PlayCamera : public LookAtCamera {
void setSmoothThetaSpeed();
void changeTargetTheta();
void changeTargetAtPosition();
void updateParms(int flag);
void updateParms(int flags);
void updateVibration(int id);
void otherVibFinished(int id);
bool isModCameraFinished();
void setCollisionCameraTargetPhi(int);
f32 getCollisionCameraTargetPhi(f32, f32);
void setCollisionCameraTargetPhi(int flags);
f32 getCollisionCameraTargetPhi(f32 angle, f32 dist);
// _00 = VTBL
// _00-_198 = LookAtCamera
@ -292,15 +387,15 @@ struct PlayCamera : public LookAtCamera {
f32 mHoldRTimer; // _1E0
Vector3f mGoalPosition; // _1E4
bool mVibrateEnabled[3]; // _1F0
f32 mVibrateSpeedParm[3]; // _1F4, vibration azimuth short speed?
f32 mVibrateSpeed[3]; // _1F4
f32 mVibrateRollAngle[3]; // _200
f32 mVibrateAngle[3]; // _20C
f32 mVibrateTimer[3]; // _218
f32 mVibrateTimeParm[3]; // _224, vibration azimuth short time?
f32 mVibrateScaleParm[3]; // _230
f32 mVibrateAzimuthParm[3]; // _23C, vibration azimuth short vib?
u8 mCanInput; // _248
u8 _249; // _249
f32 mVibrateDuration[3]; // _224
f32 mVibrateScale[3]; // _230
f32 mVibrateStrength[3]; // _23C
bool mCanInput; // _248
bool mIsCollisionCamActive; // _249
CameraParms* mCameraParms; // _24C
VibrationParms* mVibrationParms; // _250
};
@ -311,8 +406,7 @@ struct PlayCamera : public LookAtCamera {
struct CameraMgr : public CNode {
CameraMgr();
virtual ~CameraMgr() {}; // _08
// virtual void _10() = 0; // _10
virtual ~CameraMgr() { } // _08
void loadResource();
void setViewport(Viewport* vp, int id);
@ -325,11 +419,11 @@ struct CameraMgr : public CNode {
void controllerUnLock(int camID);
void startDemoCamera(int camID, int type);
void finishDemoCamera(int camID);
void changePlayerMode(int state, IDelegate1<CameraArg*>* delegate);
void changePlayerMode(int naviID, IDelegate1<CameraArg*>* delegate);
bool isChangePlayer();
void setZukanCamera(LookAtCamera* cam);
bool isCameraUpdateOn();
bool isStartAndEnd(int* data, int type);
bool isStartAndEnd(int* data, int camID);
bool isVibrationStart(int type, int camID);
void readCameraParms(char* path);
void readParameter(Stream& stream);

View File

@ -288,10 +288,10 @@ struct InteractFlyCollision : public Interaction {
// Whistle
struct InteractFue : public Interaction {
inline InteractFue(Creature* parent, u8 a, u8 b)
inline InteractFue(Creature* parent, bool doCombineParties, bool isNewToParty)
: Interaction(parent)
, _08(a)
, _09(b)
, mDoCombineParties(doCombineParties)
, mIsNewToParty(isNewToParty)
{
}
@ -301,8 +301,8 @@ struct InteractFue : public Interaction {
// _00 = VTBL
// _04 = Creature*
bool _08; // _08
bool _09; // _09
bool mDoCombineParties; // _08, always false unless whistling another captain that has pikmin
bool mIsNewToParty; // _09, always true unless we're swapping between captains in a two-captain party
};
struct InteractFueFuki : public Interaction {

View File

@ -56,10 +56,20 @@ namespace P2JST {
struct ObjectSystem;
}
enum MovieDemoState {
DEMOSTATE_Inactive = 0,
DEMOSTATE_Fadeout = 1,
DEMOSTATE_Loading = 2,
DEMOSTATE_LoadComplete = 3,
DEMOSTATE_Starting = 4,
DEMOSTATE_Playing = 5,
DEMOSTATE_Finishing = 6, // skipped or completed and fading back into gameplay
};
enum MoviePlayerFlags {
MVP_IsActive = 0x1,
MVP_IsFinished = 0x2,
MVP_Unk32 = 0x80000000,
MVP_DoSkip = 0x80000000,
};
enum MoviePlayerDrawFlags {
@ -256,11 +266,14 @@ struct MoviePlayer : public JKRDisposer {
inline void setFlag(u32 flag) { mFlags.typeView |= flag; }
inline void resetFlag(u32 flag) { mFlags.typeView &= ~flag; }
inline bool isFlag(u32 flag) const { return mFlags.typeView & flag; }
inline bool isDrawLoad() { return mDemoState == 2 || mDemoState == 3 || mDemoState == 4; }
inline bool isDrawLoad()
{
return mDemoState == DEMOSTATE_Loading || mDemoState == DEMOSTATE_LoadComplete || mDemoState == DEMOSTATE_Starting;
}
// _00 = VTBL
// _00-_18 = JKRDisposer
int mDemoState; // _18
int mDemoState; // _18, see MovieDemoState enum
DvdThreadCommand mThreadCommand; // _1C
u8 mIsPaused; // _88
Vector3f mCameraPosition; // _8C

View File

@ -26,12 +26,10 @@
struct Controller;
enum NaviIndex {
NAVIID_Olimar = 0,
NAVIID_Louie = 1,
NAVIID_President = 2,
NAVIID_Captain1 = NAVIID_Olimar, // 0, always olimar
NAVIID_Captain2 = NAVIID_Louie, // 1, louie or president
NAVIID_Olimar = 0,
NAVIID_Louie = 1, // or president
NAVIID_Multiplayer = 2,
NAVIID_Both = 2,
};
enum AliveOrimaType {

View File

@ -377,13 +377,12 @@ struct NaviFlickState : public NaviState {
};
struct NaviFollowArg : public StateArg {
inline NaviFollowArg(bool p1)
: _00(p1)
inline NaviFollowArg(bool isNewToParty)
: mIsNewToParty(isNewToParty)
{
}
bool _00; // _00
bool _01; // _01
bool mIsNewToParty; // _00, true if whistled/bumped into, false if just swapped control from or coming out of plucking state
};
struct NaviFollowState : public NaviState {

View File

@ -39,11 +39,12 @@ struct PikiState;
struct PikiParms;
typedef enum EPikiKind {
FirstPikmin = 0,
Blue = 0,
Red = 1,
Yellow = 2,
LastOnyon = 2,
AllPikminCalcs = -1, // used for gameStat calcs
FirstPikmin = 0,
Blue = 0,
Red = 1,
Yellow = 2,
LastOnyon = 2,
OnyonCount,
Purple = 3,
White = 4,

View File

@ -23,9 +23,9 @@ struct PikiContainer;
struct PikiMgr : public MonoObjectMgr<Piki> {
enum PikiSpawnMode {
PSM_Normal,
PSM_Force,
PSM_Replace,
PSM_Normal, // checks if we've hit 100 cap by active pikis or sprouts before spawning (wild pikis, out of onyons, etc)
PSM_Force, // does no checks, just spawns (plucking sprouts)
PSM_Replace, // checks if we can spawn normally; if not, removes 'extra' wild bulbmin (when entering the next cave floor)
};
PikiMgr();

View File

@ -90,7 +90,7 @@ struct SingleGameSection : public BaseGameSection {
void updateMainMapScreen();
void drawCaveScreen();
void drawMainMapScreen();
void setDispMemberNavi(og::Screen::DataNavi&, int);
void setDispMemberNavi(og::Screen::DataNavi& data, int naviID);
int calcOtakaraLevel(f32&);
inline void setCurrState(StateType* state) { mCurrentState = state; }

View File

@ -13,6 +13,29 @@ struct Controller;
namespace Game {
struct Navi;
enum RumbleType {
// 0-7 are pre-programmed, variable intensity + duration
RUMBLETYPE_PluckPiki = 0, // 11 points, 1 big peak, 2 small peaks, duration 0.46s
RUMBLETYPE_NaviDamage = 1, // 19 points, 2 big peaks, 3 small peaks, duration 0.92s
RUMBLETYPE_Nudge = 2, // 7 points, gradual drop, duration 0.3s; also used for grabbing pikis
RUMBLETYPE_Whistle = 3, // 12 points, low continuous rumble, duration 1.5s; also for bulblax roar lol
RUMBLETYPE_Unused4 = 4, // 4 points, 1 big peak, duration 0.2s; unused
RUMBLETYPE_BigTreasureStart = 5, // 16 points, 5 dropping peaks, duration 2.6s
RUMBLETYPE_HoudaiStart = 6, // 16 points, 2 big broad peaks, duration 7.6s
RUMBLETYPE_HoudaiDeath = 7, // 24 points, long low rumble with 1 big peak halfway, duration 7.03s
// 8-16 are calculated on the fly, set intensity
RUMBLETYPE_Fixed8 = 8, // no data, manual parm calc
RUMBLETYPE_Fixed9 = 9, // no data, manual parm calc
RUMBLETYPE_Fixed10 = 10, // no data, manual parm calc
RUMBLETYPE_Fixed11 = 11, // no data, manual parm calc
RUMBLETYPE_Fixed12 = 12, // no data, manual parm calc
RUMBLETYPE_Fixed13 = 13, // no data, manual parm calc
RUMBLETYPE_Fixed14 = 14, // no data, manual parm calc
RUMBLETYPE_Fixed15 = 15, // no data, manual parm calc
RUMBLETYPE_Fixed16 = 16, // no data, manual parm calc
};
enum RumbleID {
RUMBLEID_Navi0 = 0,
RUMBLEID_Navi1 = 1,

View File

@ -67,7 +67,9 @@ struct JUTGamePad : public JKRDisposer {
PRESS_LEFT = (PRESS_DPAD_LEFT | ANALOG_LEFT),
PRESS_RIGHT = (PRESS_DPAD_RIGHT | ANALOG_RIGHT),
PRESS_DOWN = (PRESS_DPAD_DOWN | ANALOG_DOWN),
PRESS_UP = (PRESS_DPAD_UP | ANALOG_UP)
PRESS_UP = (PRESS_DPAD_UP | ANALOG_UP),
PRESS_ABXYLRZ = (PRESS_A | PRESS_B | PRESS_X | PRESS_Y | PRESS_L | PRESS_R | PRESS_Z),
};
struct CButton {

View File

@ -29,8 +29,8 @@ struct DataNavi {
f32 mNaviLifeRatio; // _00
u32 mFollowPikis; // _04
u32 mNextThrowPiki; // _08
u32 mDope1Count; // _0C
u32 mDope0Count; // _10
u32 mDope1Count; // _0C, bitter sprays
u32 mDope0Count; // _10, spicy sprays
u8 mActiveNaviID; // _14
};

View File

@ -170,8 +170,8 @@ void ActFree::collisionCallback(Game::Piki* p, Game::CollEvent& event)
}
// Assuming the Navi touched us, rumble and call to squad (eventually)
Game::rumbleMgr->startRumble(2, navi->mNaviIndex);
Game::InteractFue fue(event.mCollidingCreature, 0, 1);
Game::rumbleMgr->startRumble(Game::RUMBLETYPE_Nudge, navi->mNaviIndex);
Game::InteractFue fue(event.mCollidingCreature, false, true); // don't combine parties, is new to party
p->stimulate(fue);
}

View File

@ -375,9 +375,9 @@ void BaseGameSection::doDraw(Graphics& gfx)
captureRadarmap(gfx);
if (gameSystem->paused()) {
if (cameraMgr) {
cameraMgr->controllerLock(2);
cameraMgr->controllerLock(CAMNAVI_Both);
cameraMgr->update();
cameraMgr->controllerUnLock(2);
cameraMgr->controllerUnLock(CAMNAVI_Both);
}
} else if (cameraMgr) {
@ -567,10 +567,10 @@ void BaseGameSection::initViewports(Graphics& gfx)
shadowMgr->setViewport(gfx.getViewport(0), 0);
shadowMgr->setViewport(gfx.getViewport(1), 1);
cameraMgr->setViewport(gfx.getViewport(0), 0);
cameraMgr->setViewport(gfx.getViewport(1), 1);
cameraMgr->setViewport(gfx.getViewport(0), CAMNAVI_Olimar);
cameraMgr->setViewport(gfx.getViewport(1), CAMNAVI_Louie);
cameraMgr->init(0);
cameraMgr->init(CAMNAVI_Olimar);
mTreasureZoomCamera = new ZoomCamera;
mTreasureGetViewport = new Viewport;
mTreasureGetViewport->mVpId = 2;
@ -919,7 +919,7 @@ void BaseGameSection::initGenerators()
return;
}
if (!gameSystem->isMultiplayerMode() && !olimarAlive) {
InteractFue callNavi(olimar, 0, 1);
InteractFue callNavi(olimar, false, true); // don't combine parties, is new to party
louie->stimulate(callNavi);
}
break;
@ -990,12 +990,12 @@ void BaseGameSection::saveToGeneratorCache(CourseInfo* courseinfo)
void BaseGameSection::pmTogglePlayer()
{
if (mPrevNaviIdx == 0) {
setPlayerMode(1);
if (mPrevNaviIdx == NAVIID_Olimar) {
setPlayerMode(NAVIID_Louie);
moviePlayer->mViewport = sys->mGfx->getViewport(1);
moviePlayer->mActingCamera = mLouieCamera;
} else if (mPrevNaviIdx == 1) {
setPlayerMode(0);
} else if (mPrevNaviIdx == NAVIID_Louie) {
setPlayerMode(NAVIID_Olimar);
moviePlayer->mViewport = sys->mGfx->getViewport(0);
moviePlayer->mActingCamera = mOlimarCamera;
}
@ -1032,7 +1032,7 @@ void BaseGameSection::setPlayerMode(int mode)
Matrixf* viewMtx = mLouieCamera->getViewMatrix(false);
PSMTXCopy((PSQuaternion*)viewMtx, (PSQuaternion*)&mOlimarCamera->mCurViewMatrix);
mOlimarCamera->update();
cameraMgr->changePlayerMode(0, cameraMgrCallback);
cameraMgr->changePlayerMode(NAVIID_Olimar, cameraMgrCallback);
if (mPlayerMode == 1) {
Graphics* gfx = sys->mGfx;
gfx->getViewport(0)->setCamera(mOlimarCamera);
@ -1063,18 +1063,18 @@ void BaseGameSection::setPlayerMode(int mode)
PSMTXCopy((PSQuaternion*)viewMtx, (PSQuaternion*)&mLouieCamera->mCurViewMatrix);
mLouieCamera->update();
cameraMgr->changePlayerMode(1, cameraMgrCallback);
cameraMgr->changePlayerMode(NAVIID_Louie, cameraMgrCallback);
Viewport* louieViewport = sys->mGfx->getViewport(1);
sys->mGfx->mCurrentViewport = louieViewport;
mLightMgr->updatePosition(sys->mGfx->mCurrentViewport);
break;
}
case NAVIID_President: {
case NAVIID_Multiplayer: {
mSecondViewportHeight = 0.5f;
mSplit = 0.0f;
mSplitter->split2(0.5f);
cameraMgr->changePlayerMode(2, cameraMgrCallback);
cameraMgr->changePlayerMode(NAVIID_Multiplayer, cameraMgrCallback);
break;
}
}
@ -1105,10 +1105,10 @@ void BaseGameSection::onCameraBlendFinished(CameraArg* arg)
* @note Address: 0x8014DD20
* @note Size: 0x68
*/
void BaseGameSection::setFixNearFar(bool b, f32 near, f32 far)
void BaseGameSection::setFixNearFar(bool isFixed, f32 near, f32 far)
{
mOlimarCamera->setFixNearFar(b, near, far);
mLouieCamera->setFixNearFar(b, near, far);
mOlimarCamera->setFixNearFar(isFixed, near, far);
mLouieCamera->setFixNearFar(isFixed, near, far);
}
/**
@ -1119,62 +1119,62 @@ void BaseGameSection::setCamController()
{
Navi* navis[2];
navis[0] = naviMgr->getAt(NAVIID_Olimar);
navis[1] = naviMgr->getAt(NAVIID_Louie);
navis[NAVIID_Olimar] = naviMgr->getAt(NAVIID_Olimar);
navis[NAVIID_Louie] = naviMgr->getAt(NAVIID_Louie);
switch (mPrevNaviIdx) {
case 0: {
PlayCamera* olimarCam = mOlimarCamera;
navis[0]->mCamera = olimarCam;
navis[0]->mCamera2 = olimarCam;
Controller* olimarController = mControllerP1;
navis[0]->mController1 = olimarController;
navis[0]->mController2 = olimarController;
navis[1]->disableController();
moviePlayer->mTargetNavi = navis[0];
case NAVIID_Olimar: {
PlayCamera* olimarCam = mOlimarCamera;
navis[NAVIID_Olimar]->mCamera = olimarCam;
navis[NAVIID_Olimar]->mCamera2 = olimarCam;
Controller* olimarController = mControllerP1;
navis[NAVIID_Olimar]->mController1 = olimarController;
navis[NAVIID_Olimar]->mController2 = olimarController;
navis[NAVIID_Louie]->disableController();
moviePlayer->mTargetNavi = navis[NAVIID_Olimar];
moviePlayer->mViewport = sys->mGfx->getViewport(0);
moviePlayer->mActingCamera = mOlimarCamera;
if (!gameSystem->isMultiplayerMode()) {
PSSetCurCameraNo(0);
PSSetCurCameraNo(NAVIID_Olimar);
PSPlayerChangeToOrimer();
}
break;
}
case 1: {
navis[0]->disableController();
PlayCamera* louieCam = mLouieCamera;
navis[1]->mCamera = louieCam;
navis[1]->mCamera2 = louieCam;
Controller* louieController = mControllerP1;
navis[1]->mController1 = louieController;
navis[1]->mController2 = louieController;
moviePlayer->mTargetNavi = navis[1];
moviePlayer->mViewport = sys->mGfx->getViewport(1);
moviePlayer->mActingCamera = mLouieCamera;
case NAVIID_Louie: {
navis[NAVIID_Olimar]->disableController();
PlayCamera* louieCam = mLouieCamera;
navis[NAVIID_Louie]->mCamera = louieCam;
navis[NAVIID_Louie]->mCamera2 = louieCam;
Controller* louieController = mControllerP1;
navis[NAVIID_Louie]->mController1 = louieController;
navis[NAVIID_Louie]->mController2 = louieController;
moviePlayer->mTargetNavi = navis[NAVIID_Louie];
moviePlayer->mViewport = sys->mGfx->getViewport(1);
moviePlayer->mActingCamera = mLouieCamera;
if (!gameSystem->isMultiplayerMode()) {
PSSetCurCameraNo(1);
PSSetCurCameraNo(NAVIID_Louie);
PSPlayerChangeToLugie();
}
break;
}
case 2: {
PlayCamera* olimarCam = mOlimarCamera;
navis[0]->mCamera = olimarCam;
navis[0]->mCamera2 = olimarCam;
Controller* olimarController = mControllerP1;
navis[0]->mController1 = olimarController;
navis[0]->mController2 = olimarController;
PlayCamera* louieCam = mLouieCamera;
navis[1]->mCamera = louieCam;
navis[1]->mCamera2 = louieCam;
Controller* louieController = mControllerP2;
navis[1]->mController1 = louieController;
navis[1]->mController2 = louieController;
case NAVIID_Multiplayer: {
PlayCamera* olimarCam = mOlimarCamera;
navis[NAVIID_Olimar]->mCamera = olimarCam;
navis[NAVIID_Olimar]->mCamera2 = olimarCam;
Controller* olimarController = mControllerP1;
navis[NAVIID_Olimar]->mController1 = olimarController;
navis[NAVIID_Olimar]->mController2 = olimarController;
PlayCamera* louieCam = mLouieCamera;
navis[NAVIID_Louie]->mCamera = louieCam;
navis[NAVIID_Louie]->mCamera2 = louieCam;
Controller* louieController = mControllerP2;
navis[NAVIID_Louie]->mController1 = louieController;
navis[NAVIID_Louie]->mController2 = louieController;
moviePlayer->mTargetNavi = navis[0];
moviePlayer->mTargetNavi = navis[NAVIID_Olimar];
moviePlayer->mActingCamera = mOlimarCamera;
if (gameSystem->isStoryMode()) {
PSSetCurCameraNo(0);
PSSetCurCameraNo(NAVIID_Olimar);
}
break;
}
@ -1209,13 +1209,13 @@ void BaseGameSection::setDefaultPSSceneInfo(PSGame::SceneInfo& sceneInfo)
P2ASSERTLINE(3197, mOlimarCamera);
P2ASSERTLINE(3198, mLouieCamera);
sceneInfo.mCameras = 2;
sceneInfo.mCam1Position[0] = mOlimarCamera->getSoundPositionPtr();
sceneInfo.mCam2Position[0] = mOlimarCamera->getSoundPositionPtr();
sceneInfo.mCameraMtx[0] = mOlimarCamera->getSoundMatrixPtr();
sceneInfo.mCam1Position[1] = mLouieCamera->getSoundPositionPtr();
sceneInfo.mCam2Position[1] = mLouieCamera->getSoundPositionPtr();
sceneInfo.mCameraMtx[1] = mLouieCamera->getSoundMatrixPtr();
sceneInfo.mCameras = 2;
sceneInfo.mCam1Position[NAVIID_Olimar] = mOlimarCamera->getSoundPositionPtr();
sceneInfo.mCam2Position[NAVIID_Olimar] = mOlimarCamera->getSoundPositionPtr();
sceneInfo.mCameraMtx[NAVIID_Olimar] = mOlimarCamera->getSoundMatrixPtr();
sceneInfo.mCam1Position[NAVIID_Louie] = mLouieCamera->getSoundPositionPtr();
sceneInfo.mCam2Position[NAVIID_Louie] = mLouieCamera->getSoundPositionPtr();
sceneInfo.mCameraMtx[NAVIID_Louie] = mLouieCamera->getSoundMatrixPtr();
BoundBox box;
mapMgr->getBoundBox(box);
@ -1376,7 +1376,7 @@ void BaseGameSection::drawParticle(Graphics& gfx, int viewport)
port->setProjection();
port->setViewport();
if (!gameSystem->isMultiplayerMode() && mPrevNaviIdx != 2) {
if (!gameSystem->isMultiplayerMode() && mPrevNaviIdx != NAVIID_Multiplayer) {
mLightMgr->mFogMgr->off(gfx);
particleMgr->draw(port, 0);
mLightMgr->mFogMgr->set(gfx);
@ -1683,13 +1683,14 @@ void BaseGameSection::initBlendCamera()
*/
void BaseGameSection::updateBlendCamera()
{
if (mPrevNaviIdx == 0) {
if (mPrevNaviIdx == NAVIID_Olimar) {
mBlendFactor -= sys->mDeltaTime / 0.2f;
if (mBlendFactor < 0.0f) {
mBlendFactor = 0.0f;
mIsBlendCameraActive = false;
mSplitter->split2(1.0f);
}
} else {
mBlendFactor += sys->mDeltaTime / 0.2f;
if (mBlendFactor > 1.0f) {
@ -1783,23 +1784,23 @@ void BaseGameSection::endSplit()
*/
void BaseGameSection::updateSplitter()
{
if (mSplit == 0.0f && moviePlayer->mDemoState == 0 && gameSystem->isFlag(GAMESYS_IsGameWorldActive)) {
if (mSplit == 0.0f && moviePlayer->mDemoState == DEMOSTATE_Inactive && gameSystem->isFlag(GAMESYS_IsGameWorldActive)) {
return;
}
mSecondViewportHeight += mSplit * sys->mDeltaTime;
int id = mPrevNaviIdx;
if (id == 2 && mSecondViewportHeight <= 0.5f) {
if (id == NAVIID_Multiplayer && mSecondViewportHeight <= 0.5f) {
mSecondViewportHeight = 0.5f;
mSplit = 0.0f;
mSetSplit = true;
setCamController();
} else if (id == 0 && mSecondViewportHeight >= 1.0f) {
} else if (id == NAVIID_Olimar && mSecondViewportHeight >= 1.0f) {
mSecondViewportHeight = 1.0f;
mSplit = 0.0f;
mSetSplit = false;
setCamController();
} else if (id == 1 && mSecondViewportHeight <= 0.0f) {
} else if (id == NAVIID_Louie && mSecondViewportHeight <= 0.0f) {
mSecondViewportHeight = 0.0f;
mSplit = 0.0f;
setCamController();
@ -2512,13 +2513,13 @@ void BaseGameSection::setupFloatMemory()
initGenerators();
itemMgr->initDependency();
cameraMgr->init(0);
cameraMgr->init(CAMNAVI_Olimar);
f32 angle = _aiConstants->mCameraAngle.mData * DEG2RAD * PI;
angle = roundAng(angle + mapMgr->getMapRotation());
mapMgr->getMapRotation();
cameraMgr->setCameraAngle(angle, 2);
cameraMgr->controllerUnLock(2);
cameraMgr->setCameraAngle(angle, CAMNAVI_Both);
cameraMgr->controllerUnLock(CAMNAVI_Both);
sys->heapStatusEnd("setupFloatMemory");
pikiMgr->setupSoundViewerAndBas();

View File

@ -193,7 +193,7 @@ void AABBWaterBox::doEntry()
if (gameSystem->isStoryMode()) {
BaseGameSection* section = gameSystem->getSection();
if (section->mPrevNaviIdx == NAVIID_President) {
if (section->mPrevNaviIdx == NAVIID_Multiplayer) {
if (gameSystem) {
gameSystem->setDrawBuffer(4);
Mtx copyMatrix;

View File

@ -101,8 +101,8 @@ void GameSystem::startFrame()
cellMgr->initFrame();
collisionUpdateMgr->update();
if (!paused() && !mIsFrozen && !isFlag(GAMESYS_DisablePause) && !paused_soft() && (!moviePlayer || moviePlayer->mDemoState == 0)
&& (int)gameSystem->mTimeMgr->mDayCount != 0) {
if (!paused() && !mIsFrozen && !isFlag(GAMESYS_DisablePause) && !paused_soft()
&& (!moviePlayer || moviePlayer->mDemoState == DEMOSTATE_Inactive) && (int)gameSystem->mTimeMgr->mDayCount != 0) {
mTimeMgr->update();
}
}

View File

@ -248,11 +248,11 @@ bool InteractFue::actNavi(Game::Navi* navi)
}
if (navi->getStateID() != NSID_Follow) {
NaviFollowArg followArg(_09);
NaviFollowArg followArg(mIsNewToParty);
navi->transit(NSID_Follow, &followArg);
Navi* otherNavi = naviMgr->getAt(1 - navi->mNaviIndex);
InteractFue fue(otherNavi, true, true);
InteractFue fue(otherNavi, true, true); // DO combine parties, is new to party
Iterator<Creature> cellIt((Container<Creature>*)navi->mCPlateMgr);

View File

@ -100,7 +100,7 @@ bool InteractFue::actPiki(Game::Piki* piki)
piki->mFsm->transit(piki, PIKISTATE_Holein, &holeInArg);
return false;
}
} else if (!(moviePlayer->mDemoState || (u32)pikiKind - 1 > Red && pikiKind != Blue)) {
} else if (!(moviePlayer->mDemoState != DEMOSTATE_Inactive || (u32)pikiKind - 1 > Red && pikiKind != Blue)) {
piki->setZikatu(false);
GameStat::zikatuPikis.dec(piki->getKind());
if (!playData->isDemoFlag(DEMO_Meet_Red_Pikmin) && (piki->getKind() == Red)) {
@ -186,12 +186,12 @@ bool InteractFue::actPiki(Game::Piki* piki)
}
if (!currState->dead() && callable) {
if (actionID != PikiAI::ACT_Formation || (actionID == PikiAI::ACT_Formation && currState->mId == PIKISTATE_Emotion)
|| (_08 && piki->mNavi != mCreature && actionID == 0)) {
Navi* vsNavi = (Navi*)mCreature;
|| (mDoCombineParties && piki->mNavi != mCreature && actionID == PikiAI::ACT_Formation)) {
Navi* whistlingNavi = (Navi*)mCreature;
if (gameSystem->isVersusMode()) {
int pikiColor = piki->getKind();
if ((pikiColor == Red && vsNavi->mNaviIndex == NAVIID_Louie)
|| (pikiColor == Blue && vsNavi->mNaviIndex == NAVIID_Olimar)) {
if ((pikiColor == Red && whistlingNavi->mNaviIndex == NAVIID_Louie)
|| (pikiColor == Blue && whistlingNavi->mNaviIndex == NAVIID_Olimar)) {
return false;
}
}

View File

@ -242,7 +242,7 @@ void WaitState::init(Item* item, StateArg* arg)
*/
void WaitState::exec(Item* item)
{
if (!moviePlayer || moviePlayer->mDemoState == MoviePlayer::MOVIEPLAY_SUCCESS) {
if (!moviePlayer || moviePlayer->mDemoState == DEMOSTATE_Inactive) {
mTimer -= sys->mDeltaTime;
}
@ -651,9 +651,9 @@ void Item::doAI()
if (_1E4 > 0.0f) {
_1E4 -= sys->mDeltaTime;
if (_1E4 <= 0.0f) {
PikiMgr::mBirthMode = 1;
PikiMgr::mBirthMode = PikiMgr::PSM_Force;
Piki* piki = pikiMgr->birth();
PikiMgr::mBirthMode = 0;
PikiMgr::mBirthMode = PikiMgr::PSM_Normal;
if (piki) {
piki->init(nullptr);
piki->changeShape(mColor);
@ -871,9 +871,9 @@ bool Item::interactFue(InteractFue& whistle)
}
}
PikiMgr::mBirthMode = 1;
PikiMgr::mBirthMode = PikiMgr::PSM_Force;
Piki* piki = pikiMgr->birth();
PikiMgr::mBirthMode = 0;
PikiMgr::mBirthMode = PikiMgr::PSM_Normal;
if (piki) {
P2ASSERTLINE(701, whistle.mCreature->isNavi());
@ -1110,14 +1110,16 @@ void Mgr::onCreateModel(SysShape::Model* model)
Item* Mgr::birth()
{
switch (PikiMgr::mBirthMode) {
case 0:
case PikiMgr::PSM_Normal: // don't make a sprout if we're at or over 100 pikmin on the field
if (pikiMgr->mActiveCount + mMonoObjectMgr.mActiveCount >= 100) {
return nullptr;
}
break;
case 1:
case PikiMgr::PSM_Force: // just make the damn sprout
break;
case 2:
case PikiMgr::PSM_Replace: // we should not be entering a cave floor and immediately making a sprout lol
JUT_PANICLINE(834, "‚±‚ę‚Í‚ ‚肦‚Č‚˘‚ć\n"); // 'this is impossible' lol
break;
}

View File

@ -2575,7 +2575,7 @@ ItemHole::Item* Navi::checkHole()
if (!ItemHole::mgr) {
return nullptr;
}
if (moviePlayer->mDemoState != 0) {
if (moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return nullptr;
}
if (getStateID() != NSID_Walk) {
@ -2606,7 +2606,7 @@ ItemCave::Item* Navi::checkCave()
if (!ItemCave::mgr) {
return nullptr;
}
if (moviePlayer->mDemoState != 0) {
if (moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return nullptr;
}
if (getStateID() != NSID_Walk) {
@ -2636,7 +2636,7 @@ ItemBigFountain::Item* Navi::checkBigFountain()
if (!ItemBigFountain::mgr) {
return nullptr;
}
if (moviePlayer->mDemoState != 0) {
if (moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return nullptr;
}
if (getStateID() != NSID_Walk) {
@ -2667,7 +2667,7 @@ Onyon* Navi::checkOnyon()
if (!gameSystem->isStoryMode()) {
return nullptr;
}
if (moviePlayer->mDemoState != 0) {
if (moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return nullptr;
}
if (!ItemOnyon::mgr) {
@ -3231,7 +3231,7 @@ void Navi::callPikis()
last = piki;
if (piki && piki != this) {
InteractFue act(this, false, true);
InteractFue act(this, false, true); // don't combine parties, is new to party
piki->stimulate(act);
}
}
@ -3377,7 +3377,7 @@ void Navi::callPikis()
*/
bool Navi::invincible()
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return true;
}
if (mInvincibleTimer) {
@ -3416,8 +3416,8 @@ void Navi::startDamage(f32 damage)
mFsm->transit(this, NSID_Damaged, &arg);
mHealth -= damage;
mSoundObj->startSound(PSSE_PL_ORIMA_DAMAGE, 0);
cameraMgr->startVibration(29, mNaviIndex);
rumbleMgr->startRumble(1, mNaviIndex);
cameraMgr->startVibration(VIBTYPE_NaviDamage, mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_NaviDamage, mNaviIndex);
mEffectsObj->createOrimadamage_(mEffectsObj->mHeadMtx->mMatrix.mtxView);
PSM::DamageDirector* director = PSMGetDamageD();
if (director) {
@ -3583,7 +3583,7 @@ void Navi::startDamage(f32 damage)
*/
void Navi::addDamage(f32 damage, bool flag)
{
if ((moviePlayer && moviePlayer->mDemoState != 0) || !gameSystem->isFlag(GAMESYS_IsGameWorldActive)) {
if ((moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) || !gameSystem->isFlag(GAMESYS_IsGameWorldActive)) {
return;
}
@ -3595,8 +3595,8 @@ void Navi::addDamage(f32 damage, bool flag)
mHealth -= damage;
if (flag) {
mSoundObj->startSound(PSSE_PL_ORIMA_DAMAGE, 0);
cameraMgr->startVibration(29, mNaviIndex);
rumbleMgr->startRumble(1, mNaviIndex);
cameraMgr->startVibration(VIBTYPE_NaviDamage, mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_NaviDamage, mNaviIndex);
mEffectsObj->createOrimadamage_(mEffectsObj->mHeadMtx->mMatrix.mtxView);
PSM::DamageDirector* director = PSMGetDamageD();
if (director) {
@ -4913,7 +4913,7 @@ void Navi::makeCStick(bool disable)
stickPos.x = 0.0f;
stickPos.z = stickPos.x;
if (mController1 && moviePlayer->mDemoState == 0) {
if (mController1 && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
stickPos.x = -mController1->getSubStickX();
stickPos.z = mController1->getSubStickY();
}

View File

@ -130,7 +130,7 @@ Navi* NaviMgr::birth()
navi->mSoundObj->init(navi->mNaviIndex);
// Use president sounds for navi ID 1
if (playData->isStoryFlag(STORY_DebtPaid) && navi->mNaviIndex == NAVIID_Captain2) {
if (playData->isStoryFlag(STORY_DebtPaid) && navi->mNaviIndex == NAVIID_Louie) {
navi->mSoundObj->setShacho();
}
}
@ -149,8 +149,8 @@ Navi* NaviMgr::birth()
*/
Navi* NaviMgr::getActiveNavi()
{
Navi* navi1 = getAt(NAVIID_Captain1);
Navi* navi2 = getAt(NAVIID_Captain2);
Navi* navi1 = getAt(NAVIID_Olimar);
Navi* navi2 = getAt(NAVIID_Louie);
if (!navi1 && !navi2) {
return nullptr;
}
@ -337,8 +337,8 @@ Navi* NaviMgr::getAliveOrima(int type)
// both captains alive
if (mDeadNavis == 0) {
Navi* olimar = getAt(NAVIID_Captain1);
Navi* louie = getAt(NAVIID_Captain2); // or president
Navi* olimar = getAt(NAVIID_Olimar);
Navi* louie = getAt(NAVIID_Louie); // or president
Navi* activeNavi;
Navi* inactiveNavi;
@ -417,9 +417,9 @@ void NaviMgr::doEntry()
if (vs) {
Navi* navi = &mArray[i];
if ((int)navi->mNaviIndex == NAVIID_Captain2 && pikiMgr->mFlags[0] & 1) {
if ((int)navi->mNaviIndex == NAVIID_Louie && pikiMgr->mFlags[0] & 1) {
navi->mLod.resetFlag(AILOD_IsVisVP0);
} else if ((int)navi->mNaviIndex == NAVIID_Captain1 && pikiMgr->mFlags[0] & 2) {
} else if ((int)navi->mNaviIndex == NAVIID_Olimar && pikiMgr->mFlags[0] & 2) {
navi->mLod.resetFlag(AILOD_IsVisVP1);
}
}

View File

@ -404,7 +404,7 @@ void NaviWalkState::exec(Navi* navi)
return;
}
if (moviePlayer->mDemoState == 0) {
if (moviePlayer->mDemoState == DEMOSTATE_Inactive) {
if (navi->mStickCount) {
transit(navi, NSID_Stuck, nullptr);
return;
@ -468,26 +468,26 @@ void NaviWalkState::exec(Navi* navi)
mDismissTimer = 0;
}
if (!gameSystem->paused_soft() && moviePlayer->mDemoState == 0 && !gameSystem->isMultiplayerMode()
if (!gameSystem->paused_soft() && moviePlayer->mDemoState == DEMOSTATE_Inactive && !gameSystem->isMultiplayerMode()
&& navi->mController1->isButtonDown(JUTGamePad::PRESS_Y) && playData->isDemoFlag(DEMO_Unlock_Captain_Switch)) {
Navi* currNavi = naviMgr->getAt(GET_OTHER_NAVI(navi));
int currID = currNavi->getStateID();
Navi* otherNavi = naviMgr->getAt(GET_OTHER_NAVI(navi));
int otherNaviID = otherNavi->getStateID();
if (currNavi->isAlive() && currID != NSID_Nuku && currID != NSID_NukuAdjust && currID != NSID_Punch) {
if (otherNavi->isAlive() && otherNaviID != NSID_Nuku && otherNaviID != NSID_NukuAdjust && otherNaviID != NSID_Punch) {
gameSystem->mSection->pmTogglePlayer();
playChangeVoice(currNavi);
playChangeVoice(otherNavi);
if (currNavi->getStateID() == NSID_Follow) {
InteractFue whistle(currNavi, 0, 0);
if (otherNavi->getStateID() == NSID_Follow) {
InteractFue whistle(otherNavi, false, false); // don't combine parties, is NOT new to party
navi->stimulate(whistle);
}
currNavi->getStateID(); // commented out code probably.
otherNavi->getStateID(); // commented out code probably.
if (currNavi->mCurrentState->needYChangeMotion()) {
currNavi->mFsm->transit(currNavi, NSID_Change, nullptr);
if (otherNavi->mCurrentState->needYChangeMotion()) {
otherNavi->mFsm->transit(otherNavi, NSID_Change, nullptr);
}
}
}
@ -508,7 +508,7 @@ void NaviWalkState::cleanup(Navi* navi) { }
void NaviWalkState::collisionCallback(Navi* navi, CollEvent& event)
{
Creature* collider = event.mCollidingCreature;
if (moviePlayer->mDemoState == 0 && collider->mObjectTypeID == OBJTYPE_Honey) {
if (moviePlayer->mDemoState == DEMOSTATE_Inactive && collider->mObjectTypeID == OBJTYPE_Honey) {
ItemHoney::Item* drop = static_cast<ItemHoney::Item*>(collider);
if (drop->mHoneyType != HONEY_Y && drop->absorbable()) {
NaviAbsorbArg absorbArg(drop);
@ -516,8 +516,8 @@ void NaviWalkState::collisionCallback(Navi* navi, CollEvent& event)
}
}
if (moviePlayer->mDemoState == 0 && gameSystem->isVersusMode() && collider->isTeki() && !collider->mCaptureMatrix && collider->isAlive()
&& static_cast<EnemyBase*>(collider)->getEnemyTypeID() == EnemyTypeID::EnemyID_Bomb && navi->mController1) {
if (moviePlayer->mDemoState == DEMOSTATE_Inactive && gameSystem->isVersusMode() && collider->isTeki() && !collider->mCaptureMatrix
&& collider->isAlive() && static_cast<EnemyBase*>(collider)->getEnemyTypeID() == EnemyTypeID::EnemyID_Bomb && navi->mController1) {
f32 x = -navi->mController1->getMainStickX(); // idk why this is negative lol.
f32 y = navi->mController1->getMainStickY();
@ -857,8 +857,8 @@ void NaviWalkState::initAI_animation(Navi* navi)
}
int naviIdx = navi->mNaviIndex;
if (naviIdx == NAVIID_Captain2 && gameSystem->isStoryMode() && playData->isStoryFlag(STORY_DebtPaid)) {
naviIdx++;
if (naviIdx == NAVIID_Louie && gameSystem->isStoryMode() && playData->isStoryFlag(STORY_DebtPaid)) {
naviIdx++; // president!
}
switch (animIdx) {
@ -1260,7 +1260,7 @@ void NaviChangeState::cleanup(Navi* navi) { }
void NaviFollowState::init(Navi* navi, StateArg* stateArg)
{
NaviFollowArg* followArg = static_cast<NaviFollowArg*>(stateArg);
if (followArg && followArg->_00) {
if (followArg && followArg->mIsNewToParty) {
navi->startMotion(IPikiAnims::KIZUKU, IPikiAnims::KIZUKU, navi, nullptr);
_14 = 0;
if (navi->mNaviIndex == NAVIID_Olimar) {
@ -1336,7 +1336,7 @@ void NaviFollowState::onKeyEvent(Navi* navi, SysShape::KeyEvent const& event)
*/
void NaviFollowState::exec(Navi* navi)
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return;
}
if (navi->mController1) {
@ -2830,9 +2830,9 @@ void NaviNukuState::init(Navi* navi, StateArg* stateArg)
*/
void NaviNukuState::exec(Navi* navi)
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
if (mIsFollower) {
NaviFollowArg followArg(false);
NaviFollowArg followArg(false); // not new to party
transit(navi, NSID_Follow, &followArg);
return;
}
@ -2843,7 +2843,7 @@ void NaviNukuState::exec(Navi* navi)
navi->mVelocity = 0.0f;
if (!navi->assertMotion(mAnimID)) {
if (mIsFollower != 0) {
NaviFollowArg followArg(false);
NaviFollowArg followArg(false); // not new to party
transit(navi, NSID_Follow, &followArg);
} else {
transit(navi, NSID_Walk, nullptr);
@ -2890,7 +2890,7 @@ void NaviNukuState::onKeyEvent(Navi* navi, SysShape::KeyEvent const& key)
if (mIsFollower || !navi->procActionButton()) {
mIsActive = false;
if (mIsFollower) {
NaviFollowArg arg(0);
NaviFollowArg arg(false); // not new to party
transit(navi, NSID_Follow, &arg);
} else {
transit(navi, NSID_Walk, nullptr);
@ -2899,7 +2899,7 @@ void NaviNukuState::onKeyEvent(Navi* navi, SysShape::KeyEvent const& key)
}
} else {
if (mIsFollower) {
NaviFollowArg arg(0);
NaviFollowArg arg(false); // not new to party
transit(navi, NSID_Follow, &arg);
} else {
transit(navi, NSID_Walk, nullptr);
@ -3135,7 +3135,7 @@ void NaviNukuAdjustState::collisionCallback(Navi* navi, CollEvent& collEvent)
*/
void NaviNukuAdjustState::exec(Navi* navi)
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
if (_48) {
transit(navi, NSID_Follow, nullptr);
} else {
@ -3176,9 +3176,9 @@ void NaviNukuAdjustState::exec(Navi* navi)
f32 angle = angDist(newFaceDir, navi->mFaceDir);
if (absF(angle) < (PI / 10) && dist < 2.0f && absY < 10.0f) {
navi->mFaceDir = newFaceDir;
PikiMgr::mBirthMode = 1;
PikiMgr::mBirthMode = PikiMgr::PSM_Force;
Piki* piki = pikiMgr->birth();
PikiMgr::mBirthMode = 0;
PikiMgr::mBirthMode = PikiMgr::PSM_Normal;
if (!piki) {
if (_48) {
transit(navi, NSID_Follow, nullptr);
@ -4525,7 +4525,7 @@ void NaviFallMeckState::bounceCallback(Navi* navi, Sys::Triangle*)
navi->addDamage(0.0f, true);
transit(navi, NSID_KokeDamage, &arg);
} else {
rumbleMgr->startRumble(2, navi->mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_Nudge, navi->mNaviIndex);
transit(navi, NSID_Walk, nullptr);
}
}
@ -4634,7 +4634,7 @@ void NaviKokeDamageState::init(Navi* navi, StateArg* stateArg)
}
navi->startMotion(IPikiAnims::JKOKE, IPikiAnims::JKOKE, navi, nullptr);
rumbleMgr->startRumble(1, navi->mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_NaviDamage, navi->mNaviIndex);
mState = 0;
}
@ -4644,7 +4644,7 @@ void NaviKokeDamageState::init(Navi* navi, StateArg* stateArg)
*/
void NaviKokeDamageState::exec(Navi* navi)
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
transit(navi, NSID_Walk, nullptr);
} else if (gameSystem && !gameSystem->isFlag(GAMESYS_IsGameWorldActive)) {
transit(navi, NSID_Walk, nullptr);
@ -4829,8 +4829,8 @@ void NaviContainerState::init(Navi* navi, StateArg* stateArg)
disp.mContena1.mNewInPartyNum = GameStat::formationPikis.getCount(navi->mNaviIndex, White);
disp.mContena1.mMaxPikiField = 100;
disp.mContena1.mInParty2 = GameStat::formationPikis.getTotal(navi->mNaviIndex);
disp.mContena1.mOnMapMinusWild = GameStat::getMapPikmins(-1) - GameStat::getZikatuPikmins(-1);
disp.mContena1.mMaxPikiMinusWild = 100 - GameStat::getZikatuPikmins(-1);
disp.mContena1.mOnMapMinusWild = GameStat::getMapPikmins(AllPikminCalcs) - GameStat::getZikatuPikmins(AllPikminCalcs);
disp.mContena1.mMaxPikiMinusWild = 100 - GameStat::getZikatuPikmins(AllPikminCalcs);
disp.mContena2.mOnyonID = Purple;
max = playData->mPikiContainer.getColorSum(Purple) - mOnyon->mPurplesToWithdraw;
@ -4842,8 +4842,8 @@ void NaviContainerState::init(Navi* navi, StateArg* stateArg)
disp.mContena2.mNewInPartyNum = GameStat::formationPikis.getCount(navi->mNaviIndex, Purple);
disp.mContena2.mMaxPikiField = 100;
disp.mContena2.mInParty2 = GameStat::formationPikis.getTotal(navi->mNaviIndex);
disp.mContena2.mOnMapMinusWild = GameStat::getMapPikmins(-1) - GameStat::getZikatuPikmins(-1);
disp.mContena2.mMaxPikiMinusWild = 100 - GameStat::getZikatuPikmins(-1);
disp.mContena2.mOnMapMinusWild = GameStat::getMapPikmins(AllPikminCalcs) - GameStat::getZikatuPikmins(AllPikminCalcs);
disp.mContena2.mMaxPikiMinusWild = 100 - GameStat::getZikatuPikmins(AllPikminCalcs);
disp.mHasWhite = playData->hasContainer(White);
disp.mHasPurple = playData->hasContainer(Purple);
@ -4862,8 +4862,8 @@ void NaviContainerState::init(Navi* navi, StateArg* stateArg)
disp.mNewInPartyNum = GameStat::formationPikis.getCount(navi->mNaviIndex, type);
disp.mMaxPikiField = 100;
disp.mInParty2 = GameStat::formationPikis.getTotal(navi->mNaviIndex);
disp.mOnMapMinusWild = GameStat::getMapPikmins(-1) - GameStat::getZikatuPikmins(-1);
disp.mMaxPikiMinusWild = 100 - GameStat::getZikatuPikmins(-1);
disp.mOnMapMinusWild = GameStat::getMapPikmins(AllPikminCalcs) - GameStat::getZikatuPikmins(AllPikminCalcs);
disp.mMaxPikiMinusWild = 100 - GameStat::getZikatuPikmins(AllPikminCalcs);
mIsScreenOpen = Screen::gGame2DMgr->open_Contena(disp);
}
@ -5017,7 +5017,7 @@ void NaviAbsorbState::init(Navi* navi, StateArg* stateArg)
Vector3f dropPosition = mDrop->getPosition();
navi->turnTo(dropPosition);
cameraMgr->controllerLock(navi->mNaviIndex);
cameraMgr->startDemoCamera(navi->mNaviIndex, 0);
cameraMgr->startDemoCamera(navi->mNaviIndex, CAMDEMO_NearLow);
}
/**
@ -5192,7 +5192,7 @@ void NaviGatherState::init(Navi* navi, StateArg* stateArg)
navi->enableMotionBlend();
navi->mWhistle->start();
if (!_10) {
rumbleMgr->startRumble(3, navi->mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_Whistle, navi->mNaviIndex);
}
efx::TNaviEffect* effect = navi->mEffectsObj;
f32 rad = navi->mWhistle->mRadius;
@ -5321,7 +5321,7 @@ void NaviThrowWaitState::init(Navi* navi, StateArg* stateArg)
_20 = false;
_1C = 0;
if (mHeldPiki) {
rumbleMgr->startRumble(2, mNavi->mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_Nudge, mNavi->mNaviIndex);
mHeldPiki->mFsm->transit(mHeldPiki, PIKISTATE_Hanged, 0);
_20 = true;
}
@ -5769,7 +5769,7 @@ void NaviThrowWaitState::lockHangPiki(Navi* navi)
*/
void NaviThrowWaitState::exec(Navi* navi)
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
transit(navi, NSID_Walk, nullptr);
return;
}
@ -5805,7 +5805,7 @@ void NaviThrowWaitState::exec(Navi* navi)
navi->enableMotionBlend();
mHeldPiki = mNextPiki;
mNextPiki = nullptr;
rumbleMgr->startRumble(2, mNavi->mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_Nudge, mNavi->mNaviIndex);
mHeldPiki->mFsm->transit(mHeldPiki, PIKISTATE_Hanged, 0);
_20 = true;
} else {
@ -6830,7 +6830,7 @@ void NaviPelletState::exec(Navi* navi)
return;
}
if (navi->mController1 && moviePlayer->mDemoState == 0) {
if (navi->mController1 && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
if (!gameSystem->paused_soft() && !gameSystem->isMultiplayerMode() && navi->mController1
&& navi->mController1->isButtonDown(JUTGamePad::PRESS_Y) && playData->isDemoFlag(DEMO_Unlock_Captain_Switch)) {

View File

@ -43,11 +43,12 @@ namespace Game {
*/
bool Navi::demoCheck()
{
// no cutscenes outside story mode + no cutscenes while changing player?
if (!gameSystem->isStoryMode() || cameraMgr->isChangePlayer()) {
return false;
}
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return false;
}

View File

@ -382,7 +382,7 @@ bool InteractSuckDone::actOnyon(Onyon* item)
Vector3f position = item->getPosition();
efx::Arg arg(position);
podFX.create(&arg);
if (moviePlayer && moviePlayer->mDemoState == 0) {
if (moviePlayer && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
Vector3f pos = item->getPosition();
int money = pellet->mConfig->mParams.mMoney.mData;
@ -403,7 +403,7 @@ bool InteractSuckDone::actOnyon(Onyon* item)
efx::TUfoPodGepu ufoFX(jnt->getWorldMatrix());
ufoFX.create(nullptr);
if (moviePlayer && moviePlayer->mDemoState == 0) {
if (moviePlayer && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
Vector3f pos = item->getPosition();
const f32 theta = item->getFaceDir();
@ -1290,7 +1290,7 @@ void Onyon::makeTrMatrix()
Vector3f angle(0.0f, mFaceDir, 0.0f);
mBaseTrMatrix.makeTR(mPosition, angle);
updateCollTree();
if (gameSystem->paused() || moviePlayer->mDemoState != 0) {
if (gameSystem->paused() || moviePlayer->mDemoState != DEMOSTATE_Inactive) {
return;
}

View File

@ -906,7 +906,7 @@ void Pellet::onInit(CreatureInitArg* initArg)
}
if (static_cast<PelletInitArg*>(initArg)->mAdjustWeightForSquad) {
mMinCarriers = GameStat::getMapPikmins(-1);
mMinCarriers = GameStat::getMapPikmins(AllPikminCalcs);
int minPikis = mConfig->mParams.mMin.mData;
if (mMinCarriers > minPikis) {
mMinCarriers = minPikis;

View File

@ -82,7 +82,7 @@ void PelletGoalWaitState::init(Pellet* pelt, StateArg* arg)
*/
void PelletGoalWaitState::exec(Pellet* pelt)
{
if (moviePlayer && moviePlayer->mDemoState == 0) {
if (moviePlayer && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
PelletGoalStateArg arg(mObj);
transit(pelt, PELSTATE_Goal, &arg);
}
@ -471,7 +471,7 @@ void PelletGoalState::exec(Pellet* pelt)
pelt->mAnimSpeed = sys->mDeltaTime * 60.0f;
}
if (mInDemo && !mDidSuikomi && moviePlayer && moviePlayer->mDemoState == 5) {
if (mInDemo && !mDidSuikomi && moviePlayer && moviePlayer->mDemoState == DEMOSTATE_Playing) {
if (((int)mOnyon->mObjectTypeID == OBJTYPE_Onyon || (int)mOnyon->mObjectTypeID == OBJTYPE_Ufo)) { // maybe getOnyon inline?
static_cast<Onyon*>(mOnyon)->efxSuikomi();
mDidSuikomi = true;

View File

@ -272,7 +272,7 @@ void Piki::update()
int stateID = getStateID();
int pikiType = getKind();
if (stateID != PIKISTATE_WaterHanged && stateID != PIKISTATE_Drown && !mCurrentState->dead() && pikiType != Blue
&& pikiType != Bulbmin && moviePlayer->mDemoState == 0 && mSimVelocity.y <= 0.1f) {
&& pikiType != Bulbmin && moviePlayer->mDemoState == DEMOSTATE_Inactive && mSimVelocity.y <= 0.1f) {
mFsm->transit(this, PIKISTATE_Drown, nullptr);
mEffectsObj->mHeight = mWaterBox->getSeaHeightPtr();
}
@ -477,7 +477,7 @@ void Piki::inWaterCallback(WaterBox* wbox)
int pikiType = getKind();
if (stateID != PIKISTATE_WaterHanged && stateID != PIKISTATE_Drown && !mCurrentState->dead() && pikiType != Blue
&& pikiType != Bulbmin) {
if (moviePlayer->mDemoState == 0 && mSimVelocity.y <= 0.1f) {
if (moviePlayer->mDemoState == DEMOSTATE_Inactive && mSimVelocity.y <= 0.1f) {
mFsm->transit(this, PIKISTATE_Drown, nullptr);
} else {
return;

View File

@ -32,7 +32,7 @@ u8 Piki::sGraspSituationOptimise = 1;
*/
int Piki::graspSituation_Fast(Game::Creature** outTarget)
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
*outTarget = nullptr;
if (!isZikatu() || playData->isDemoFlag(DEMO_Reunite_Captains)) {
return PikiAI::ACT_NULL;
@ -282,7 +282,7 @@ int Piki::graspSituation_Fast(Game::Creature** outTarget)
*/
int Piki::graspSituation(Game::Creature** outTarget)
{
if (moviePlayer && moviePlayer->mDemoState != 0) {
if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
*outTarget = nullptr;
return PikiAI::ACT_NULL;
}

View File

@ -662,7 +662,7 @@ void PikiMgr::doAnimation()
}
}
if (mDopedPikis > 0 && gameSystem && gameSystem->isFlag(GAMESYS_IsGameWorldActive) && moviePlayer->mDemoState == 0) {
if (mDopedPikis > 0 && gameSystem && gameSystem->isFlag(GAMESYS_IsGameWorldActive) && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
PSSystem::spSysIF->playSystemSe(PSSE_SY_PK_UNDER_DOPING, 0);
}
sys->mTimers->_stop("doaPIKI");

View File

@ -1319,7 +1319,7 @@ void PikiNukareState::onKeyEvent(Piki* piki, SysShape::KeyEvent const& keyEvent)
{
switch (keyEvent.mType) {
case KEYEVENT_2:
rumbleMgr->startRumble(0, (int)mNavi->mNaviIndex);
rumbleMgr->startRumble(RUMBLETYPE_PluckPiki, (int)mNavi->mNaviIndex);
Vector3f position = piki->getPosition();
piki->setFPFlag(FPFLAGS_Unk5);
@ -2859,8 +2859,8 @@ void PikiHipDropState::collisionCallback(Piki* piki, CollEvent& collEvent)
if (!collEvent.mCollidingCreature->isPiki()) {
Vector3f position = piki->getPosition();
efx::createSimpleBlackDrop(position);
rumbleMgr->startRumble(11, position, RUMBLEID_Both);
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
if (!collEvent.mCollidingCreature->isTeki()) {
piki->startSound(PSSE_PK_SE_DOSUN, false);
@ -3113,8 +3113,8 @@ void PikiHipDropState::dosin(Piki* piki)
{
Vector3f position = piki->getPosition();
efx::createSimpleBlackDrop(position);
rumbleMgr->startRumble(11, position, RUMBLEID_Both);
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
piki->startSound(PSSE_PK_SE_DOSUN, false);
_14 = 2;
_10 = 0.3f;
@ -3199,9 +3199,9 @@ bool PikiFallMeckState::becomePikihead(Piki* piki)
if (GameStat::mePikis >= 99) {
return false;
} else {
PikiMgr::mBirthMode = 1;
PikiMgr::mBirthMode = PikiMgr::PSM_Force;
ItemPikihead::Item* sprout = static_cast<ItemPikihead::Item*>(ItemPikihead::mgr->birth());
PikiMgr::mBirthMode = 0;
PikiMgr::mBirthMode = PikiMgr::PSM_Normal;
Vector3f pikiPos = piki->getPosition();
pikiPos.y = mapMgr->getMinY(pikiPos);

View File

@ -69,7 +69,7 @@ void CaveState::init(SingleGameSection* game, StateArg* arg)
Navi* olimar = naviMgr->getAt(NAVIID_Olimar);
Navi* louie = naviMgr->getAt(NAVIID_Louie);
if (olimar->isAlive() && louie->isAlive()) {
InteractFue act(olimar, false, true);
InteractFue act(olimar, false, true); // don't combine parties, is new to party
louie->stimulate(act);
}
@ -163,14 +163,14 @@ void CaveState::exec(SingleGameSection* game)
// check pikmin extinction cutscene
if (!(moviePlayer->isFlag(MVP_IsActive))) {
if (GameStat::getMapPikmins(-1) == 0) {
if (GameStat::getMapPikmins(AllPikminCalcs) == 0) {
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
MoviePlayArg moviearg("s05_pikminzero", nullptr, game->mMovieFinishCallback, 0);
Navi* navi = naviMgr->getActiveNavi();
if (!navi) {
int id = 1;
if (gameSystem->mSection->mPrevNaviIdx == 0) {
id = 0;
int id = NAVIID_Louie;
if (gameSystem->mSection->mPrevNaviIdx == NAVIID_Olimar) {
id = NAVIID_Olimar;
}
navi = naviMgr->getAt(id);
}
@ -186,7 +186,7 @@ void CaveState::exec(SingleGameSection* game)
check_SMenu(game);
// check muting parts of music when lots of pikmin die (does this actually happen in caves?)
PSM::PikminNumberDirector* psm = PSMGetPikminNumD();
if (GameStat::getMapPikmins_exclude_Me(-1) < 10 && deathMgr->mSoundDeathCount > 0) {
if (GameStat::getMapPikmins_exclude_Me(AllPikminCalcs) < 10 && deathMgr->mSoundDeathCount > 0) {
if (psm) {
psm->directOn();
}
@ -234,7 +234,7 @@ void CaveState::check_SMenu(SingleGameSection* game)
case 4:
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
gameSystem->setMoviePause(false, "sm-giveup");
if (moviePlayer->mDemoState != 0)
if (moviePlayer->mDemoState != DEMOSTATE_Inactive)
return;
MoviePlayArg arg("s12_cv_giveup", nullptr, game->mMovieFinishCallback, 0);
arg.mDelegateStart = game->mMovieStartCallback;
@ -263,7 +263,7 @@ void CaveState::check_SMenu(SingleGameSection* game)
return;
case -1:
// Conditions to open pause menu
if (!(gameSystem->isFlag(GAMESYS_DisablePause)) && moviePlayer->mDemoState == 0 && !gameSystem->paused()
if (!(gameSystem->isFlag(GAMESYS_DisablePause)) && moviePlayer->mDemoState == DEMOSTATE_Inactive && !gameSystem->paused()
&& game->mControllerP1->mButton.mButtonDown & Controller::PRESS_START) {
og::Screen::DispMemberSMenuAll disp;
game->setDispMemberSMenu(disp);

View File

@ -128,7 +128,7 @@ void DayEndState::exec(SingleGameSection* game)
int id = 0;
if (navi) {
id = navi->mNaviIndex;
if (id == NAVIID_Captain2 && playData->isStoryFlag(STORY_DebtPaid)) {
if (id == NAVIID_Louie && playData->isStoryFlag(STORY_DebtPaid)) {
id++;
}
}
@ -306,7 +306,7 @@ void DayEndState::draw(SingleGameSection* game, Graphics& gfx) { game->BaseGameS
void DayEndState::cleanup(SingleGameSection* game)
{
playData->setPikminCounts_Today();
GameStat::getMapPikmins(-1);
GameStat::getMapPikmins(AllPikminCalcs);
int alivePikis = GameStat::alivePikis;
int mePikis = GameStat::mePikis;
gameSystem->setPause(false, "dayend;cln", 3);

View File

@ -429,13 +429,13 @@ void GameState::exec(SingleGameSection* game)
game->updateMainMapScreen();
// Check starting the "you appear lost" cutscene timer
if (GameStat::getMapPikmins(-1) >= 15 && moviePlayer->mDemoState == 0 && !playData->isDemoFlag(DEMO_You_Appear_Lost)
&& playData->hasBootContainer(Red)) {
if (GameStat::getMapPikmins(AllPikminCalcs) >= 15 && moviePlayer->mDemoState == DEMOSTATE_Inactive
&& !playData->isDemoFlag(DEMO_You_Appear_Lost) && playData->hasBootContainer(Red)) {
playData->setDemoFlag(DEMO_You_Appear_Lost);
game->enableTimer(180.0f, DEMOTIMER_YouAppearLost);
}
if (moviePlayer->mDemoState == 0 && needRepayDemo()) {
if (moviePlayer->mDemoState == DEMOSTATE_Inactive && needRepayDemo()) {
startRepayDemo();
}
@ -508,7 +508,7 @@ void GameState::exec(SingleGameSection* game)
break;
default:
// Check open pause menu
if (!gameSystem->isFlag(GAMESYS_DisablePause) && moviePlayer->mDemoState == 0 && !gameSystem->paused()
if (!gameSystem->isFlag(GAMESYS_DisablePause) && moviePlayer->mDemoState == DEMOSTATE_Inactive && !gameSystem->paused()
&& game->mControllerP1->getButtonDown() & Controller::PRESS_START) {
og::Screen::DispMemberSMenuAll disp;
game->setDispMemberSMenu(disp);
@ -529,8 +529,8 @@ void GameState::exec(SingleGameSection* game)
}
// Check need pikmin extinction to occur
if (!mIsPostExtinct && moviePlayer->mDemoState == 0) {
if (GameStat::getAllPikmins(-1) - GameStat::getZikatuPikmins(-1) == 0 && playData->hasBootContainer(Red)) {
if (!mIsPostExtinct && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
if (GameStat::getAllPikmins(AllPikminCalcs) - GameStat::getZikatuPikmins(AllPikminCalcs) == 0 && playData->hasBootContainer(Red)) {
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
MoviePlayArg moviePlayArg("s05_pikminzero", nullptr, game->mMovieFinishCallback, 0);
Navi* navi = naviMgr->getActiveNavi();
@ -549,7 +549,7 @@ void GameState::exec(SingleGameSection* game)
}
PSM::PikminNumberDirector* director = PSMGetPikminNumD();
int pikis = GameStat::getMapPikmins_exclude_Me(-1);
int pikis = GameStat::getMapPikmins_exclude_Me(AllPikminCalcs);
if (pikis < 10 && DeathMgr::mSoundDeathCount > 0) {
if (director) {
director->directOn();

View File

@ -302,7 +302,7 @@ bool SingleGameSection::doUpdate()
mFsm->exec(this);
if (!gameSystem->mIsFrozen && !gameSystem->paused()) {
if (mTimerEnabled && !moviePlayer->mDemoState && gameSystem->isFlag(GAMESYS_IsGameWorldActive)) {
if (mTimerEnabled && moviePlayer->mDemoState == DEMOSTATE_Inactive && gameSystem->isFlag(GAMESYS_IsGameWorldActive)) {
mTimer -= sys->mDeltaTime;
if (mTimer < 0.0f) {
@ -696,7 +696,7 @@ void SingleGameSection::openCaveInMenu(ItemCave::Item* cave, int naviID)
disp.mCaveOtakaraNum = cave->getCaveOtakaraNum();
disp.mCaveOtakaraMax = cave->getCaveOtakaraMax();
disp.mPayedDebt = playData->mStoryFlags & STORY_DebtPaid;
disp.mPikisField = GameStat::getMapPikmins(-1) - GameStat::getZikatuPikmins(-1);
disp.mPikisField = GameStat::getMapPikmins(AllPikminCalcs) - GameStat::getZikatuPikmins(AllPikminCalcs);
int pikis = 0;
Iterator<Piki> iterator(pikiMgr);
@ -740,7 +740,7 @@ void SingleGameSection::openCaveMoreMenu(ItemHole::Item* hole, Controller* input
int pikis = GameStat::mePikis;
if (pikis > 0) {
disp.mPikiInDanger = true;
if (pikis == GameStat::getMapPikmins(-1)) {
if (pikis == GameStat::getMapPikmins(AllPikminCalcs)) {
disp.mCantProceed = true;
} else {
disp.mCantProceed = false;
@ -778,7 +778,7 @@ void SingleGameSection::openKanketuMenu(ItemBigFountain::Item* geyser, Controlle
int pikis = GameStat::mePikis;
if (pikis > 0) {
disp.mPikiInDanger = true;
if (pikis == GameStat::getMapPikmins(-1)) {
if (pikis == GameStat::getMapPikmins(AllPikminCalcs)) {
disp.mCantProceed = true;
} else {
disp.mCantProceed = false;
@ -1043,12 +1043,12 @@ void SingleGameSection::setDispMemberSMenu(og::Screen::DispMemberSMenuAll& disp)
* @note Address: N/A
* @note Size: 0xE0
*/
void SingleGameSection::setDispMemberNavi(og::Screen::DataNavi& data, int id)
void SingleGameSection::setDispMemberNavi(og::Screen::DataNavi& data, int naviID)
{
data.mFollowPikis = GameStat::formationPikis.mCounter[id];
data.mDope1Count = playData->getDopeCount(1);
data.mDope0Count = playData->getDopeCount(0);
Navi* navi = naviMgr->getAt(id);
data.mFollowPikis = GameStat::formationPikis.mCounter[naviID];
data.mDope1Count = playData->getDopeCount(SPRAY_TYPE_BITTER);
data.mDope0Count = playData->getDopeCount(SPRAY_TYPE_SPICY);
Navi* navi = naviMgr->getAt(naviID);
data.mNaviLifeRatio = navi->getLifeRatio();
data.mNextThrowPiki = navi->ogGetNextThrowPiki();
}
@ -1112,8 +1112,8 @@ void SingleGameSection::updateMainMapScreen()
disp.mHasRadar = playData->mOlimarData[0].hasItem(OlimarData::ODII_PrototypeDetector);
disp.mIsNotDay1 = gameSystem->mTimeMgr->mDayCount;
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(-1) - GameStat::getZikatuPikmins(-1);
disp.mDataGame.mTotalPikminCount = GameStat::getAllPikmins(-1) - GameStat::getZikatuPikmins(-1);
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(AllPikminCalcs) - GameStat::getZikatuPikmins(AllPikminCalcs);
disp.mDataGame.mTotalPikminCount = GameStat::getAllPikmins(AllPikminCalcs) - GameStat::getZikatuPikmins(AllPikminCalcs);
disp.mDataGame.mDayNum = gameSystem->mTimeMgr->mDayCount + 1;
disp.mDataGame.mSunGaugeRatio = gameSystem->mTimeMgr->getSunGaugeRatio();
disp.mDataGame.mPokoCount = playData->mPokoCount;
@ -1133,14 +1133,16 @@ void SingleGameSection::updateMainMapScreen()
disp.mUnlockedBitter = false;
}
if (Screen::gGame2DMgr->is_GameGround() && !moviePlayer->mDemoState && bitter && !playData->isDemoFlag(DEMO_BITTER_ENABLED)) {
if (Screen::gGame2DMgr->is_GameGround() && moviePlayer->mDemoState == DEMOSTATE_Inactive && bitter
&& !playData->isDemoFlag(DEMO_BITTER_ENABLED)) {
playData->setDemoFlag(DEMO_BITTER_ENABLED);
disp.mHasBitter = true;
} else {
disp.mHasBitter = false;
}
if (Screen::gGame2DMgr->is_GameGround() && !moviePlayer->mDemoState && spicy && !playData->isDemoFlag(DEMO_SPICY_ENABLED)) {
if (Screen::gGame2DMgr->is_GameGround() && moviePlayer->mDemoState == DEMOSTATE_Inactive && spicy
&& !playData->isDemoFlag(DEMO_SPICY_ENABLED)) {
playData->setDemoFlag(DEMO_SPICY_ENABLED);
disp.mHasSpicy = true;
} else {
@ -1152,28 +1154,28 @@ void SingleGameSection::updateMainMapScreen()
}
Navi* navi = naviMgr->getActiveNavi();
int id = 2;
int id = NAVIID_Multiplayer;
if (navi) {
id = navi->mNaviIndex;
}
setDispMemberNavi(disp.mOlimarData, 0);
setDispMemberNavi(disp.mOlimarData, NAVIID_Olimar);
if (id == 0) {
disp.mOlimarData.mActiveNaviID = 1;
disp.mLouieData.mActiveNaviID = 0;
} else if (id == 1) {
disp.mOlimarData.mActiveNaviID = 0;
disp.mLouieData.mActiveNaviID = 1;
} else if (mPrevNaviIdx == 0) {
disp.mOlimarData.mActiveNaviID = 0;
disp.mLouieData.mActiveNaviID = 1;
if (id == NAVIID_Olimar) {
disp.mOlimarData.mActiveNaviID = TRUE;
disp.mLouieData.mActiveNaviID = FALSE;
} else if (id == NAVIID_Louie) {
disp.mOlimarData.mActiveNaviID = FALSE;
disp.mLouieData.mActiveNaviID = TRUE;
} else if (mPrevNaviIdx == NAVIID_Olimar) {
disp.mOlimarData.mActiveNaviID = FALSE;
disp.mLouieData.mActiveNaviID = TRUE;
} else {
disp.mOlimarData.mActiveNaviID = 1;
disp.mLouieData.mActiveNaviID = 0;
disp.mOlimarData.mActiveNaviID = TRUE;
disp.mLouieData.mActiveNaviID = FALSE;
}
setDispMemberNavi(disp.mLouieData, 1);
setDispMemberNavi(disp.mLouieData, NAVIID_Louie);
Screen::gGame2DMgr->setDispMember(&disp);
}
@ -1214,7 +1216,7 @@ void SingleGameSection::updateCaveScreen()
disp.mRadarEnabled = mTreasureRadarActive;
disp.mAllTreasureGotten = flag;
if (Screen::gGame2DMgr->is_GameCave() && moviePlayer->mDemoState == 0) {
if (Screen::gGame2DMgr->is_GameCave() && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
disp.mAppearRadar = false;
if (!playData->isDemoFlag(DEMO_RADAR_ENABLED) && playData->mOlimarData[0].hasItem(OlimarData::ODII_PrototypeDetector)) {
playData->setDemoFlag(DEMO_RADAR_ENABLED);
@ -1232,8 +1234,8 @@ void SingleGameSection::updateCaveScreen()
disp.mIsBitterUnlocked = playData->isDemoFlag(DEMO_First_Bitter_Spray_Made);
disp.mIsSpicyUnlocked = playData->isDemoFlag(DEMO_First_Spicy_Spray_Made);
disp.mIsFinalFloor = (static_cast<RoomMapMgr*>(mapMgr)->mCaveInfo->getFloorMax() == disp.mDataGame.mFloorNum);
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(-1);
disp.mDataGame.mTotalPikminCount = GameStat::getAllPikmins(-1);
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(AllPikminCalcs);
disp.mDataGame.mTotalPikminCount = GameStat::getAllPikmins(AllPikminCalcs);
disp.mDataGame.mDayNum = gameSystem->mTimeMgr->mDayCount + 1;
disp.mDataGame.mSunGaugeRatio = gameSystem->mTimeMgr->getSunGaugeRatio();
@ -1244,28 +1246,28 @@ void SingleGameSection::updateCaveScreen()
}
Navi* navi = naviMgr->getActiveNavi();
int id = 2;
int id = NAVIID_Multiplayer;
if (navi) {
id = navi->mNaviIndex;
}
setDispMemberNavi(disp.mOlimarData, 0);
setDispMemberNavi(disp.mOlimarData, NAVIID_Olimar);
if (id == 0) {
disp.mOlimarData.mActiveNaviID = 1;
disp.mLouieData.mActiveNaviID = 0;
} else if (id == 1) {
disp.mOlimarData.mActiveNaviID = 0;
disp.mLouieData.mActiveNaviID = 1;
} else if (mPrevNaviIdx == 0) {
disp.mOlimarData.mActiveNaviID = 0;
disp.mLouieData.mActiveNaviID = 1;
if (id == NAVIID_Olimar) {
disp.mOlimarData.mActiveNaviID = TRUE;
disp.mLouieData.mActiveNaviID = FALSE;
} else if (id == NAVIID_Louie) {
disp.mOlimarData.mActiveNaviID = FALSE;
disp.mLouieData.mActiveNaviID = TRUE;
} else if (mPrevNaviIdx == NAVIID_Olimar) {
disp.mOlimarData.mActiveNaviID = FALSE;
disp.mLouieData.mActiveNaviID = TRUE;
} else {
disp.mOlimarData.mActiveNaviID = 1;
disp.mLouieData.mActiveNaviID = 0;
disp.mOlimarData.mActiveNaviID = TRUE;
disp.mLouieData.mActiveNaviID = FALSE;
}
setDispMemberNavi(disp.mLouieData, 1);
setDispMemberNavi(disp.mLouieData, NAVIID_Louie);
Screen::gGame2DMgr->setDispMember(&disp);
}

View File

@ -527,8 +527,8 @@ void VsGame::CardMgr::SlotMachine::start()
f32 scoreCount0 = mCardMgr->mSection->mYellowScore[mPlayerIndex];
f32 scoreCount1 = mCardMgr->mSection->mYellowScore[1 - mPlayerIndex];
pikminCounts[0] = GameStat::getMapPikmins(1);
pikminCounts[1] = GameStat::getMapPikmins(0);
pikminCounts[NAVIID_Olimar] = GameStat::getMapPikmins(Red);
pikminCounts[NAVIID_Louie] = GameStat::getMapPikmins(Blue);
if (pikminCounts[mPlayerIndex] < 4) {
selector.mValues[PIKMIN_5] = 200;

View File

@ -5,6 +5,7 @@
#include "Game/Entities/ItemHole.h"
#include "Game/Entities/PelletItem.h"
#include "Game/MapMgr.h"
#include "Game/AIConstants.h"
#include "Game/gameStat.h"
#include "Game/Data.h"
#include "Game/mapParts.h"
@ -257,7 +258,7 @@ void GameState::exec(VsGameSection* section)
} else {
PSM::PikminNumberDirector* pikiDirector = PSMGetPikminNumD();
if (GameStat::getMapPikmins_exclude_Me(-1) < 10 && DeathMgr::mSoundDeathCount > 0) {
if (GameStat::getMapPikmins_exclude_Me(AllPikminCalcs) < 10 && DeathMgr::mSoundDeathCount > 0) {
if (pikiDirector) {
pikiDirector->directOn();
}
@ -283,7 +284,8 @@ void GameState::exec(VsGameSection* section)
if (!gameSystem->paused() && section->mTimeLimit > 0.0f && isFlag(VSGS_Unk3) && !section->mMenuFlags
&& gameSystem->isFlag(GAMESYS_IsGameWorldActive) && !gameSystem->paused_soft()
&& !moviePlayer->mDemoState) { // check game is in a state where timer should go down (not paused/menu/CS/etc)
&& moviePlayer->mDemoState
== DEMOSTATE_Inactive) { // check game is in a state where timer should go down (not paused/menu/CS/etc)
section->mTimeLimit -= sys->mDeltaTime * 0.5f;
if (section->mTimeLimit <= 0.0f && !(isFlag(VSGS_Unk4))) {
@ -441,7 +443,7 @@ void GameState::checkSMenu(VsGameSection* section)
transit(section, VGS_Title, &titleArg);
return;
}
if (moviePlayer->mDemoState == 0 && !isFlag(VSGS_Unk2)) {
if (moviePlayer->mDemoState == DEMOSTATE_Inactive && !isFlag(VSGS_Unk2)) {
gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
MoviePlayArg movieArgs("s12_cv_giveup", 0x0, section->mMovieFinishCallback, 0);
movieArgs.mDelegateStart = section->mMovieStartCallback;
@ -463,7 +465,7 @@ void GameState::checkSMenu(VsGameSection* section)
return;
}
if (moviePlayer->mDemoState == 0 && !gameSystem->paused_soft()) {
if (moviePlayer->mDemoState == DEMOSTATE_Inactive && !gameSystem->paused_soft()) {
if (section->mControllerP1->isButtonDown(JUTGamePad::PRESS_START)) {
og::Screen::DispMemberSMenuAll sMenu;
int versus = 2;
@ -501,7 +503,7 @@ void GameState::checkSMenu(VsGameSection* section)
*/
void GameState::pre2dDraw(Graphics& gfx, VsGameSection* section)
{
if (gameSystem->isVersusMode() && !mFlags.typeView && !moviePlayer->mDemoState) {
if (gameSystem->isVersusMode() && !mFlags.typeView && moviePlayer->mDemoState == DEMOSTATE_Inactive) {
section->mCardMgr->draw(gfx);
}
}
@ -930,41 +932,41 @@ void GameState::update_GameChallenge(VsGameSection* section)
Navi* olimar = naviMgr->getAt(NAVIID_Olimar);
disp.mOlimarData.mFollowPikis = GameStat::formationPikis.mCounter[NAVIID_Olimar];
disp.mOlimarData.mNextThrowPiki = olimar->ogGetNextThrowPiki();
disp.mOlimarData.mDope1Count = playData->getDopeCount(1);
disp.mOlimarData.mDope0Count = playData->getDopeCount(0);
disp.mOlimarData.mDope1Count = playData->getDopeCount(SPRAY_TYPE_BITTER);
disp.mOlimarData.mDope0Count = playData->getDopeCount(SPRAY_TYPE_SPICY);
disp.mOlimarData.mNaviLifeRatio = olimar->getLifeRatio();
Navi* louie = naviMgr->getAt(NAVIID_Louie);
disp.mLouieData.mFollowPikis = GameStat::formationPikis.mCounter[NAVIID_Louie];
disp.mLouieData.mNextThrowPiki = louie->ogGetNextThrowPiki();
disp.mLouieData.mDope1Count = playData->getDopeCount(1);
disp.mLouieData.mDope0Count = playData->getDopeCount(0);
disp.mLouieData.mDope1Count = playData->getDopeCount(SPRAY_TYPE_BITTER);
disp.mLouieData.mDope0Count = playData->getDopeCount(SPRAY_TYPE_SPICY);
disp.mLouieData.mNaviLifeRatio = louie->getLifeRatio();
Navi* activeNavi = naviMgr->getActiveNavi();
int check = 2;
int id = NAVIID_Multiplayer;
if (activeNavi) {
check = activeNavi->mNaviIndex;
id = activeNavi->mNaviIndex;
}
if (check == 0) {
disp.mOlimarData.mActiveNaviID = 1;
disp.mLouieData.mActiveNaviID = 0;
if (id == NAVIID_Olimar) {
disp.mOlimarData.mActiveNaviID = TRUE;
disp.mLouieData.mActiveNaviID = FALSE;
} else if (check == 1) {
disp.mOlimarData.mActiveNaviID = 0;
disp.mLouieData.mActiveNaviID = 1;
} else if (id == NAVIID_Louie) {
disp.mOlimarData.mActiveNaviID = FALSE;
disp.mLouieData.mActiveNaviID = TRUE;
} else if (section->mPrevNaviIdx == 0) {
disp.mOlimarData.mActiveNaviID = 0;
disp.mLouieData.mActiveNaviID = 1;
} else if (section->mPrevNaviIdx == NAVIID_Olimar) {
disp.mOlimarData.mActiveNaviID = FALSE;
disp.mLouieData.mActiveNaviID = TRUE;
} else {
disp.mOlimarData.mActiveNaviID = 1;
disp.mLouieData.mActiveNaviID = 0;
disp.mOlimarData.mActiveNaviID = TRUE;
disp.mLouieData.mActiveNaviID = FALSE;
}
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(-1);
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(AllPikminCalcs);
Screen::gGame2DMgr->setDispMember(&disp);
return;
}
@ -981,19 +983,19 @@ void GameState::update_GameChallenge(VsGameSection* section)
Navi* olimar = naviMgr->getAt(NAVIID_Olimar);
disp.mOlimarData.mFollowPikis = GameStat::formationPikis.mCounter[NAVIID_Olimar];
disp.mOlimarData.mNextThrowPiki = olimar->ogGetNextThrowPiki();
disp.mOlimarData.mDope1Count = olimar->getDopeCount(1);
disp.mOlimarData.mDope0Count = olimar->getDopeCount(0);
disp.mOlimarData.mDope1Count = olimar->getDopeCount(SPRAY_TYPE_BITTER);
disp.mOlimarData.mDope0Count = olimar->getDopeCount(SPRAY_TYPE_SPICY);
disp.mOlimarData.mNaviLifeRatio = olimar->getLifeRatio();
Navi* louie = naviMgr->getAt(NAVIID_Louie);
disp.mLouieData.mFollowPikis = GameStat::formationPikis.mCounter[NAVIID_Louie];
disp.mLouieData.mNextThrowPiki = louie->ogGetNextThrowPiki();
disp.mLouieData.mDope1Count = louie->getDopeCount(1);
disp.mLouieData.mDope0Count = louie->getDopeCount(0);
disp.mLouieData.mDope1Count = louie->getDopeCount(SPRAY_TYPE_BITTER);
disp.mLouieData.mDope0Count = louie->getDopeCount(SPRAY_TYPE_SPICY);
disp.mLouieData.mNaviLifeRatio = louie->getLifeRatio();
disp.mRedPikminCount = GameStat::getMapPikmins(1);
disp.mBluePikminCount = GameStat::getMapPikmins(0);
disp.mRedPikminCount = GameStat::getMapPikmins(Red);
disp.mBluePikminCount = GameStat::getMapPikmins(Blue);
disp.mFlags[2] = section->mGhostIconTimers[0] > 0.0f;
disp.mFlags[3] = section->mGhostIconTimers[1] > 0.0f;
@ -1035,20 +1037,20 @@ void GameState::update_GameChallenge(VsGameSection* section)
disp.mTimeLimit = section->mTimeLimit;
disp.mDeadPiki = section->mDeadPikiCount;
Navi* olimar = naviMgr->getAt(0);
Navi* olimar = naviMgr->getAt(NAVIID_Olimar);
disp.mOlimarData.mFollowPikis = GameStat::formationPikis.mCounter[0];
disp.mOlimarData.mNextThrowPiki = olimar->ogGetNextThrowPiki();
disp.mOlimarData.mDope1Count = playData->getDopeCount(1);
disp.mOlimarData.mDope0Count = playData->getDopeCount(0);
disp.mOlimarData.mDope1Count = playData->getDopeCount(SPRAY_TYPE_BITTER);
disp.mOlimarData.mDope0Count = playData->getDopeCount(SPRAY_TYPE_SPICY);
disp.mOlimarData.mNaviLifeRatio = olimar->getLifeRatio();
Navi* louie = naviMgr->getAt(1);
Navi* louie = naviMgr->getAt(NAVIID_Louie);
disp.mLouieData.mFollowPikis = GameStat::formationPikis.mCounter[1];
disp.mLouieData.mNextThrowPiki = louie->ogGetNextThrowPiki();
disp.mLouieData.mDope1Count = playData->getDopeCount(1);
disp.mLouieData.mDope0Count = playData->getDopeCount(0);
disp.mLouieData.mDope1Count = playData->getDopeCount(SPRAY_TYPE_BITTER);
disp.mLouieData.mDope0Count = playData->getDopeCount(SPRAY_TYPE_SPICY);
disp.mLouieData.mNaviLifeRatio = louie->getLifeRatio();
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(-1);
disp.mDataGame.mMapPikminCount = GameStat::getMapPikmins(AllPikminCalcs);
Screen::gGame2DMgr->setDispMember(&disp);
}

View File

@ -241,8 +241,8 @@ bool VsGameSection::doUpdate()
mFsm->exec(this);
if (gameSystem->isVersusMode()) {
int redPikmins = GameStat::getMapPikmins(1) - (mOlimarHandicap - 3);
int bluePikmins = GameStat::getMapPikmins(0) - (mLouieHandicap - 3);
int redPikmins = GameStat::getMapPikmins(Red) - (mOlimarHandicap - 3);
int bluePikmins = GameStat::getMapPikmins(Blue) - (mLouieHandicap - 3);
if (redPikmins < 0) {
redPikmins = 1;
}
@ -491,7 +491,7 @@ void VsGameSection::openCaveMoreMenu(ItemHole::Item* hole, Controller* controlle
int mePikis = GameStat::mePikis;
if (mePikis > 0) {
cave.mPikiInDanger = true;
int map_pikis = GameStat::getMapPikmins(-1);
int map_pikis = GameStat::getMapPikmins(AllPikminCalcs);
if (mePikis == map_pikis) {
cave.mCantProceed = true;
} else {
@ -527,7 +527,7 @@ void VsGameSection::openKanketuMenu(ItemBigFountain::Item* fountain, Controller*
int mePikis = GameStat::mePikis;
if (mePikis > 0) {
cave.mPikiInDanger = true;
int map_pikis = GameStat::getMapPikmins(-1);
int map_pikis = GameStat::getMapPikmins(AllPikminCalcs);
if (mePikis == map_pikis) {
cave.mCantProceed = true;
} else {

View File

@ -97,13 +97,13 @@ void StateWalk::exec(EnemyBase* enemy)
case KEYEVENT_3:
Vector3f position = wraith->getPosition();
if (wraith->getCurrAnimIndex() == WRAITHANIM_Walk) {
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(8, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, position, RUMBLEID_Both);
}
if (wraith->getCurrAnimIndex() == WRAITHANIM_Run) {
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(8, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, position, RUMBLEID_Both);
}
break;
}
@ -158,15 +158,15 @@ void StateDead::exec(EnemyBase* enemy)
case KEYEVENT_2:
case KEYEVENT_3:
case KEYEVENT_4:
cameraMgr->startVibration(12, position, 2);
rumbleMgr->startRumble(14, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
break;
case KEYEVENT_5:
wraith->deadEffect();
break;
case KEYEVENT_END:
cameraMgr->startVibration(17, position, 2);
rumbleMgr->startRumble(15, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
wraith->kill(nullptr);
break;
}
@ -227,8 +227,8 @@ void StateFreeze::exec(EnemyBase* enemy)
if (wraith->mCurAnim->mIsPlaying) {
if ((u32)wraith->mCurAnim->mType == KEYEVENT_2) {
Vector3f position = wraith->getPosition();
cameraMgr->startVibration(12, position, 2);
rumbleMgr->startRumble(14, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
f32 faceDir = wraith->getFaceDir();
position.x += 32.0f * sinf(faceDir) - 4.0f * cosf(faceDir);
@ -312,8 +312,8 @@ void StateBend::exec(EnemyBase* enemy)
if ((u32)wraith->mCurAnim->mType == KEYEVENT_2) {
wraith->bendEffect();
Vector3f position = wraith->getPosition();
cameraMgr->startVibration(12, position, 2);
rumbleMgr->startRumble(14, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} else if ((u32)wraith->mCurAnim->mType == KEYEVENT_END) {
wraith->collisionStOff();
@ -388,8 +388,8 @@ void StateEscape::exec(EnemyBase* enemy)
case KEYEVENT_3:
case KEYEVENT_4:
position = wraith->getPosition();
cameraMgr->startVibration(17, position, 2);
rumbleMgr->startRumble(16, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed16, position, RUMBLEID_Both);
f32 faceDir = wraith->getFaceDir();
position.x += -22.0f * sinf(faceDir) - 30.0f * cosf(faceDir);
@ -399,8 +399,8 @@ void StateEscape::exec(EnemyBase* enemy)
case KEYEVENT_5:
position = wraith->getPosition();
cameraMgr->startVibration(17, position, 2);
rumbleMgr->startRumble(16, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed16, position, RUMBLEID_Both);
break;
case KEYEVENT_END:
@ -441,8 +441,8 @@ void StateFall::exec(EnemyBase* enemy)
if ((u32)enemy->mCurAnim->mType == KEYEVENT_2) {
OBJ(enemy)->appearFanfare();
Vector3f position = enemy->getPosition();
cameraMgr->startVibration(17, position, 2);
rumbleMgr->startRumble(14, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} else if ((u32)enemy->mCurAnim->mType == KEYEVENT_END) {
if (OBJ(enemy)->isFallEnd()) {

View File

@ -134,8 +134,8 @@ void StateBomb::exec(EnemyBase* enemy)
OBJ(enemy)->bombEffInWater();
}
cameraMgr->startVibration(12, effectPos, 2);
rumbleMgr->startRumble(15, effectPos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidMidShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, effectPos, RUMBLEID_Both);
Vector3f position = enemy->getPosition();
Parms* parms = CG_PARMS(enemy);

View File

@ -140,7 +140,7 @@ void StateAppear::exec(EnemyBase* enemy)
enemy->startMotion();
Vector3f pos = enemy->getPosition();
rumbleMgr->startRumble(8, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
FakePiki* target = OBJ(enemy)->getNearestPikiOrNavi(360.0f, terrRad);
enemy->mTargetCreature = target;
@ -269,8 +269,8 @@ void StateDead::exec(EnemyBase* enemy)
if (enemy->mCurAnim->mType == KEYEVENT_2) {
OBJ(enemy)->boundEffect();
Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(0, pos, 2);
rumbleMgr->startRumble(8, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
}
if (enemy->mCurAnim->mType == KEYEVENT_END) {
@ -586,8 +586,8 @@ void StateFlick::init(EnemyBase* enemy, StateArg* stateArg)
}
Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(0, pos, 2);
rumbleMgr->startRumble(8, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
}
/**

View File

@ -2609,8 +2609,8 @@ void Obj::footMtxCalc(Mtx mtx, Vector3f* pos, f32* p1)
*p1 *= 0.7f;
if (*p1 < 0.1f) {
if (*p1 != 0.0f) {
cameraMgr->startVibration(6, *pos, 2);
rumbleMgr->startRumble(11, *pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, *pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, *pos, RUMBLEID_Both);
}
*p1 = 0.0f;

View File

@ -762,8 +762,8 @@ void StateDead::init(EnemyBase* enemy, StateArg* stateArg)
OBJ(enemy)->createEffect(Obj::KingEfx_Dead);
Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(12, pos, 2);
rumbleMgr->startRumble(13, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidMidShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, pos, RUMBLEID_Both);
enemy->disableEvent(0, EB_Cullable);
}
@ -783,8 +783,8 @@ void StateDead::exec(EnemyBase* enemy)
case KEYEVENT_2:
OBJ(enemy)->createBounceEffect();
Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(3, pos, 2);
rumbleMgr->startRumble(11, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightMidShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
break;
case KEYEVENT_END:
@ -847,8 +847,8 @@ void StateFlick::exec(EnemyBase* enemy)
sand.create(&argScale);
}
cameraMgr->startVibration(3, pos, 2);
rumbleMgr->startRumble(11, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightMidShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
PSM::EnemyBoss* soundObj = static_cast<PSM::EnemyBoss*>(enemy->mSoundObj);
PSM::checkBoss(soundObj);
@ -1604,8 +1604,8 @@ void StateWarCry::exec(EnemyBase* enemy)
OBJ(enemy)->requestTransit(KINGCHAPPY_Appear);
OBJ(enemy)->requestTransit(KINGCHAPPY_WarCry);
Vector3f rumblePos = enemy->getPosition();
cameraMgr->startVibration(26, rumblePos, 2);
rumbleMgr->startRumble(3, rumblePos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_HardFastLong, rumblePos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Whistle, rumblePos, RUMBLEID_Both);
break;
case KEYEVENT_4:
@ -1878,8 +1878,8 @@ void StateHide::init(EnemyBase* enemy, StateArg* stateArg)
enemy->hardConstraintOn();
Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(6, pos, 2);
rumbleMgr->startRumble(13, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, pos, RUMBLEID_Both);
}
/**
@ -2045,8 +2045,8 @@ void StateAppear::init(EnemyBase* enemy, StateArg* stateArg)
OBJ(enemy)->createEffect(Obj::KingEfx_Drool);
enemy->createEfxHamon();
cameraMgr->startVibration(15, pos, 2);
rumbleMgr->startRumble(12, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, pos, RUMBLEID_Both);
PSM::EnemyBoss* soundObj = static_cast<PSM::EnemyBoss*>(enemy->mSoundObj);
PSM::checkBoss(soundObj);
@ -2084,8 +2084,8 @@ void StateAppear::exec(EnemyBase* enemy)
case KEYEVENT_4:
OBJ(enemy)->createBounceEffect();
Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(6, pos, 2);
rumbleMgr->startRumble(11, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
break;
case KEYEVENT_END:

View File

@ -326,13 +326,13 @@ void StateAttacking::exec(EnemyBase* enemy)
enemy->mFlickTimer = 0.0f;
effectPos = Vector3f(-20.0f, 0.0f, 31.0f);
OBJ(enemy)->attackEffect(effectPos);
rumbleMgr->startRumble(12, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, pos, RUMBLEID_Both);
break;
case KEYEVENT_3:
effectPos = Vector3f(11.0f, 0.0f, 56.0f);
OBJ(enemy)->attackEffect(effectPos);
rumbleMgr->startRumble(12, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, pos, RUMBLEID_Both);
break;
case KEYEVENT_END:

View File

@ -577,8 +577,8 @@ void Obj::bounceCallback(Sys::Triangle* triangle)
*/
void Obj::damageRumble()
{
cameraMgr->startVibration(3, mPosition, 2);
rumbleMgr->startRumble(11, mPosition, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightMidShort, mPosition, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, mPosition, RUMBLEID_Both);
}
/**
@ -2169,13 +2169,13 @@ Obj::Obj()
* @note Address: 0x80353C00
* @note Size: 0x34
*/
void Obj::appearRumble() { rumbleMgr->startRumble(11, mPosition, RUMBLEID_Both); }
void Obj::appearRumble() { rumbleMgr->startRumble(RUMBLETYPE_Fixed11, mPosition, RUMBLEID_Both); }
/**
* @note Address: 0x80353C34
* @note Size: 0x34
*/
void Obj::hideRumble() { rumbleMgr->startRumble(10, mPosition, RUMBLEID_Both); }
void Obj::hideRumble() { rumbleMgr->startRumble(RUMBLETYPE_Fixed10, mPosition, RUMBLEID_Both); }
/**
* @note Address: 0x80353C68

View File

@ -591,8 +591,8 @@ void Obj::collisionStOff()
*/
void Obj::flick()
{
cameraMgr->startVibration(15, mPosition, 2);
rumbleMgr->startRumble(13, mPosition, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastShort, mPosition, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, mPosition, RUMBLEID_Both);
Iterator<Piki> iterPiki(pikiMgr);
CI_LOOP(iterPiki)

View File

@ -429,8 +429,8 @@ void StateFlick::init(EnemyBase* enemy, StateArg* stateArg)
if (enemy->getEnemyTypeID() == EnemyTypeID::EnemyID_UmiMushi) {
Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(9, pos, 2);
rumbleMgr->startRumble(13, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, pos, RUMBLEID_Both);
PSM::EnemyBoss* soundObj = static_cast<PSM::EnemyBoss*>(enemy->mSoundObj); // get sound object
PSM::checkBoss(soundObj); // make sure we have sound object
@ -529,7 +529,7 @@ void StateAttack::exec(EnemyBase* enemy)
OBJ(enemy)->attackEffect();
if (enemy->getEnemyTypeID() == EnemyTypeID::EnemyID_UmiMushi) {
Vector3f pos = enemy->getPosition();
rumbleMgr->startRumble(12, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, pos, RUMBLEID_Both);
}
break;

View File

@ -53,7 +53,7 @@ void StateDead::exec(EnemyBase* enemy)
u32 animType = armor->mCurAnim->mType;
if (animType == KEYEVENT_2) {
Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(9, armorPos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, armorPos, RUMBLEID_Both);
} else if (animType == KEYEVENT_END) {
armor->kill(nullptr);
}
@ -125,7 +125,7 @@ void StateAppear::init(EnemyBase* enemy, StateArg* stateArg)
armor->createAppearEffect();
Vector3f pos = armor->getPosition();
rumbleMgr->startRumble(10, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, pos, RUMBLEID_Both);
}
/**
@ -139,7 +139,7 @@ void StateAppear::exec(EnemyBase* enemy)
u32 animType = armor->mCurAnim->mType;
if (animType == KEYEVENT_2) {
Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(9, armorPos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, armorPos, RUMBLEID_Both);
} else if (animType == KEYEVENT_END) {
if (armor->mHealth <= 0.0f) {
transit(armor, ARMOR_Dead, nullptr);
@ -181,7 +181,7 @@ void StateDive::exec(EnemyBase* enemy)
u32 animType = armor->mCurAnim->mType;
if (animType == KEYEVENT_2) {
Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(10, armorPos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, armorPos, RUMBLEID_Both);
} else if (animType == KEYEVENT_END) {
transit(armor, ARMOR_Stay, nullptr);
}
@ -935,7 +935,7 @@ void StateAttack2::exec(EnemyBase* enemy)
EnemyFunc::attackNavi(armor, attackRadius, attackAngle, attackDamage, nullptr, nullptr);
Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(9, armorPos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, armorPos, RUMBLEID_Both);
} else if (armor->mCurAnim->mType == KEYEVENT_END) {
if (armor->mHealth <= 0.0f) {

View File

@ -805,8 +805,8 @@ void Obj::createOnGroundEffect(int footIdx, WaterBox* wbox)
}
PSStartSoundVec(PSSE_EN_BIGFOOT_WALK, (Vec*)&mJointPositions[footIdx][3]);
cameraMgr->startVibration(6, effectPos, 2);
rumbleMgr->startRumble(14, effectPos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, effectPos, RUMBLEID_Both);
}
/**

View File

@ -40,8 +40,8 @@ void StateDead::init(EnemyBase* enemy, StateArg* stateArg)
bigfoot->startMotion(BIGFOOTANIM_Dead, nullptr);
Vector3f position = bigfoot->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(10, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, position, RUMBLEID_Both);
}
/**
@ -160,8 +160,8 @@ void StateLand::exec(EnemyBase* enemy)
}
Vector3f position = bigfoot->getPosition();
cameraMgr->startVibration(15, position, 2);
rumbleMgr->startRumble(15, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
} else if ((u32)bigfoot->mCurAnim->mType == KEYEVENT_END) {
if (bigfoot->mHealth <= 0.0f) {

View File

@ -1751,8 +1751,8 @@ void Obj::createOnGroundEffect(int footIdx, WaterBox* wbox)
}
PSStartSoundVec(PSSE_EN_BIGTAKARA_WALK, (Vec*)&mJointPositions[footIdx][3]);
cameraMgr->startVibration(6, effectPos, 2);
rumbleMgr->startRumble(14, effectPos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, effectPos, RUMBLEID_Both);
}
/**

View File

@ -98,8 +98,8 @@ void StateDead::exec(EnemyBase* enemy)
titan->finishDeadBubbleLegEffect(2);
titan->finishDeadBubbleMouthEffect();
Vector3f position = titan->getPosition();
cameraMgr->startVibration(21, position, 2);
rumbleMgr->startRumble(12, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_HardMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, position, RUMBLEID_Both);
} else if ((u32)titan->mCurAnim->mType == KEYEVENT_11) {
titan->createDeadBombLegEffect(3);
@ -244,8 +244,8 @@ void StateLand::exec(EnemyBase* enemy)
} else if ((u32)titan->mCurAnim->mType == KEYEVENT_9) {
Vector3f position = titan->getPosition();
cameraMgr->startVibration(2, position, 2);
rumbleMgr->startRumble(5, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightSlowLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_BigTreasureStart, position, RUMBLEID_Both);
Parms* parms = CG_PARMS(titan);
EnemyFunc::flickStickPikmin(titan, parms->mGeneral.mShakeChance.mValue, parms->mGeneral.mShakeKnockback.mValue,
parms->mGeneral.mShakeDamage.mValue, -1000.0, nullptr);

View File

@ -73,8 +73,8 @@ void StateDead::exec(EnemyBase* enemy)
} else if (sarai->mCurAnim->mType == KEYEVENT_7) {
Vector3f pos = sarai->getPosition();
cameraMgr->startVibration(0, pos, 2);
rumbleMgr->startRumble(11, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
sarai->createDownEffect(0.9f);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) {
@ -104,7 +104,7 @@ void StateDamage::init(EnemyBase* enemy, StateArg* stateArg)
sarai->startMotion(BOMBSARAIANIM_Struggle, nullptr);
Vector3f pos = sarai->getPosition();
rumbleMgr->startRumble(8, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
}
/**
@ -129,7 +129,7 @@ void StateDamage::exec(EnemyBase* enemy)
sarai->createDownEffect(0.8f);
Vector3f pos = sarai->getPosition();
rumbleMgr->startRumble(8, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) {
if (sarai->mHealth <= 0.0f) {
@ -1207,8 +1207,8 @@ void StateFall::init(EnemyBase* enemy, StateArg* stateArg)
sarai->startMotion(BOMBSARAIANIM_Fall, nullptr);
Vector3f pos = sarai->getPosition();
cameraMgr->startVibration(0, pos, 2);
rumbleMgr->startRumble(11, pos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
}
/**
@ -1250,7 +1250,7 @@ void StateFall::exec(EnemyBase* enemy)
} else if (sarai->mCurAnim->mType == KEYEVENT_8) {
Vector3f pos = sarai->getPosition();
rumbleMgr->startRumble(11, pos, RUMBLEID_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
sarai->createDownEffect(0.9f);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) {

View File

@ -73,7 +73,7 @@ void CameraMgr::init(int state)
mCameraVibrateState[i] = 0;
PlayCamera* cam = mCameraObjList[i];
if (cam) {
if (mCurrPlayerMode == 0) {
if (mCurrPlayerMode == CAMNAVI_Olimar) {
cam->setCameraParms(mCameraParms[0]);
} else {
cam->setCameraParms(mCameraParms[1]);
@ -90,11 +90,11 @@ void CameraMgr::init(int state)
* @note Address: 0x80252038
* @note Size: 0x94
*/
void CameraMgr::setCameraAngle(f32 angle, int id)
void CameraMgr::setCameraAngle(f32 angle, int camID)
{
int test[2];
if (isStartAndEnd(test, id)) {
for (int i = test[0]; i < test[1]; i++) {
int naviIDs[2];
if (isStartAndEnd(naviIDs, camID)) {
for (int i = naviIDs[0]; i < naviIDs[1]; i++) {
PlayCamera* cam = mCameraObjList[i];
if (cam) {
cam->setCameraAngle(angle);
@ -135,7 +135,7 @@ void CameraMgr::update()
}
if (mDelegate && (mCameraObjList[0]->mChangePlayerState | mCameraObjList[1]->mChangePlayerState) == 0) {
CameraArg arg;
arg.state = mCurrPlayerMode;
arg.mState = mCurrPlayerMode;
mDelegate->invoke(&arg);
mDelegate = nullptr;
}
@ -151,9 +151,9 @@ void CameraMgr::startVibration(int type, Vector3f& pos, int camID)
if (mZukanCamera) {
mZukanCamera->startVibration(type);
} else {
int test[2];
if (isStartAndEnd(test, camID)) {
for (int i = test[0]; i < test[1]; i++) {
int naviIDs[2];
if (isStartAndEnd(naviIDs, camID)) {
for (int i = naviIDs[0]; i < naviIDs[1]; i++) {
if (mViewportList[i]->viewable() && isVibrationStart(type, i)) {
Vector3f naviPos = mCameraObjList[i]->mTargetObj->getPosition();
f32 min = pos.distance(naviPos);
@ -176,9 +176,9 @@ void CameraMgr::startVibration(int type, int camID)
if (mZukanCamera) {
mZukanCamera->startVibration(type);
} else {
int test[2];
if (isStartAndEnd(test, camID)) {
for (int i = test[0]; i < test[1]; i++) {
int naviIDs[2];
if (isStartAndEnd(naviIDs, camID)) {
for (int i = naviIDs[0]; i < naviIDs[1]; i++) {
if (mViewportList[i]->viewable() && isVibrationStart(type, i)) {
mCameraObjList[i]->startVibration(type, 1.0f);
}
@ -193,9 +193,9 @@ void CameraMgr::startVibration(int type, int camID)
*/
void CameraMgr::controllerLock(int camID)
{
int test[2];
if (isStartAndEnd(test, camID)) {
for (int i = test[0]; i < test[1]; i++) {
int naviIDs[2];
if (isStartAndEnd(naviIDs, camID)) {
for (int i = naviIDs[0]; i < naviIDs[1]; i++) {
mCameraObjList[i]->mCanInput = false;
}
}
@ -207,9 +207,9 @@ void CameraMgr::controllerLock(int camID)
*/
void CameraMgr::controllerUnLock(int camID)
{
int test[2];
if (isStartAndEnd(test, camID)) {
for (int i = test[0]; i < test[1]; i++) {
int naviIDs[2];
if (isStartAndEnd(naviIDs, camID)) {
for (int i = naviIDs[0]; i < naviIDs[1]; i++) {
mCameraObjList[i]->mCanInput = true;
}
}
@ -221,9 +221,9 @@ void CameraMgr::controllerUnLock(int camID)
*/
void CameraMgr::startDemoCamera(int camID, int type)
{
int test[2];
if (isStartAndEnd(test, camID)) {
for (int i = test[0]; i < test[1]; i++) {
int naviIDs[2];
if (isStartAndEnd(naviIDs, camID)) {
for (int i = naviIDs[0]; i < naviIDs[1]; i++) {
mCameraObjList[i]->startDemoCamera(type);
}
}
@ -235,9 +235,9 @@ void CameraMgr::startDemoCamera(int camID, int type)
*/
void CameraMgr::finishDemoCamera(int camID)
{
int test[2];
if (isStartAndEnd(test, camID)) {
for (int i = test[0]; i < test[1]; i++) {
int naviIDs[2];
if (isStartAndEnd(naviIDs, camID)) {
for (int i = naviIDs[0]; i < naviIDs[1]; i++) {
mCameraObjList[i]->finishDemoCamera();
}
}
@ -247,41 +247,41 @@ void CameraMgr::finishDemoCamera(int camID)
* @note Address: 0x80252658
* @note Size: 0x160
*/
void CameraMgr::changePlayerMode(int state, IDelegate1<Game::CameraArg*>* delegate)
void CameraMgr::changePlayerMode(int naviID, IDelegate1<Game::CameraArg*>* delegate)
{
bool flag = false;
switch (state) {
case 0: {
if (mCurrPlayerMode == 1) {
switch (naviID) {
case NAVIID_Olimar: {
if (mCurrPlayerMode == NAVIID_Louie) {
CameraData data;
mCameraObjList[1]->getCameraData(data);
mCameraObjList[0]->setCameraData(data);
mCameraObjList[NAVIID_Louie]->getCameraData(data);
mCameraObjList[NAVIID_Olimar]->setCameraData(data);
flag = true;
}
mCameraObjList[0]->setCameraParms(mCameraParms[0]);
mCameraObjList[0]->changePlayerMode(flag);
mCameraObjList[NAVIID_Olimar]->setCameraParms(mCameraParms[0]);
mCameraObjList[NAVIID_Olimar]->changePlayerMode(flag);
break;
}
case 1: {
if (mCurrPlayerMode == 0) {
case NAVIID_Louie: {
if (mCurrPlayerMode == NAVIID_Olimar) {
CameraData data;
mCameraObjList[0]->getCameraData(data);
mCameraObjList[1]->setCameraData(data);
mCameraObjList[NAVIID_Olimar]->getCameraData(data);
mCameraObjList[NAVIID_Louie]->setCameraData(data);
flag = true;
}
mCameraObjList[1]->setCameraParms(mCameraParms[0]);
mCameraObjList[1]->changePlayerMode(flag);
mCameraObjList[NAVIID_Louie]->setCameraParms(mCameraParms[0]);
mCameraObjList[NAVIID_Louie]->changePlayerMode(flag);
break;
}
case 2: {
mCameraObjList[0]->setCameraParms(mCameraParms[1]);
mCameraObjList[0]->changePlayerMode(false);
mCameraObjList[1]->setCameraParms(mCameraParms[1]);
mCameraObjList[1]->changePlayerMode(false);
case NAVIID_Multiplayer: {
mCameraObjList[NAVIID_Olimar]->setCameraParms(mCameraParms[1]);
mCameraObjList[NAVIID_Olimar]->changePlayerMode(false);
mCameraObjList[NAVIID_Louie]->setCameraParms(mCameraParms[1]);
mCameraObjList[NAVIID_Louie]->changePlayerMode(false);
break;
}
}
mCurrPlayerMode = state;
mCurrPlayerMode = naviID;
mDelegate = delegate;
}
@ -335,21 +335,21 @@ bool CameraMgr::isCameraUpdateOn()
* @note Address: 0x80252890
* @note Size: 0x68
*/
bool CameraMgr::isStartAndEnd(int* data, int type)
bool CameraMgr::isStartAndEnd(int* naviIDs, int type)
{
if (type == 2) {
data[0] = 0;
data[1] = 2;
if (type == CAMNAVI_Both) { // both navi cameras
naviIDs[0] = 0;
naviIDs[1] = 2;
return true;
}
if (type == 0) {
data[0] = 0;
data[1] = 1;
if (type == CAMNAVI_Olimar) { // just olimar
naviIDs[0] = 0;
naviIDs[1] = 1;
return true;
}
if (type == 1) {
data[0] = 1;
data[1] = 2;
if (type == CAMNAVI_Louie) { // just louie/president
naviIDs[0] = 1;
naviIDs[1] = 2;
return true;
}
return false;

View File

@ -700,8 +700,8 @@ void Obj::createOnGroundEffect(int footIdx, WaterBox* wbox)
}
PSStartSoundVec(PSSE_EN_SPIDER_WALK, (Vec*)&mJointPositions[footIdx][3]);
cameraMgr->startVibration(6, effectPos, 2);
rumbleMgr->startRumble(14, effectPos, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightFastShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, effectPos, RUMBLEID_Both);
}
/**

View File

@ -41,8 +41,8 @@ void StateDead::init(EnemyBase* enemy, StateArg* stateArg)
damagumo->startMotion(DAMAGUMOANIM_Dead, nullptr);
Vector3f position = damagumo->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(10, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, position, RUMBLEID_Both);
}
/**
@ -159,8 +159,8 @@ void StateLand::exec(EnemyBase* enemy)
}
Vector3f position = damagumo->getPosition();
cameraMgr->startVibration(15, position, 2);
rumbleMgr->startRumble(15, position, RUMBLEID_Both);
cameraMgr->startVibration(VIBTYPE_MidFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
} else if ((u32)damagumo->mCurAnim->mType == KEYEVENT_3) {
damagumo->createOnGroundEffect(3, damagumo->mWaterBox);

View File

@ -56,7 +56,7 @@ void StateDead::exec(EnemyBase* enemy)
if (crab->getMotionFrame() > 50.0f) {
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(6, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, crabPos, CAMNAVI_Both);
}
if (crab->mCurAnim->mIsPlaying) {
@ -69,8 +69,8 @@ void StateDead::exec(EnemyBase* enemy)
} else if (crab->mCurAnim->mType == KEYEVENT_3) {
crab->createDeadBombEffect();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(26, crabPos, 2);
rumbleMgr->startRumble(14, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_HardFastLong, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_END) {
crab->kill(nullptr);
}
@ -174,16 +174,16 @@ void StateAppear::exec(EnemyBase* enemy)
} else if (crab->mCurAnim->mType == KEYEVENT_2) {
crab->createAppearSmokeEffect();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(27, crabPos, 2);
rumbleMgr->startRumble(15, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_Crash, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_3) {
crab->setBossAppearBGM();
} else if (crab->mCurAnim->mType == KEYEVENT_4) {
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(15, crabPos, 2);
rumbleMgr->startRumble(11, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_MidFastShort, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_END) {
Creature* target = crab->getSearchedTarget();
@ -882,8 +882,8 @@ void StateMove::exec(EnemyBase* enemy)
} else if (crab->mCurAnim->mType == KEYEVENT_2) {
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(3, crabPos, 2);
rumbleMgr->startRumble(11, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_END) {
transit(crab, crab->mNextState, nullptr);
@ -1456,7 +1456,7 @@ void StateAttack::exec(EnemyBase* enemy)
if (crab->mIsRolling) {
crab->rollingMove();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(25, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_HardFastMid, crabPos, CAMNAVI_Both);
crab->getJAIObject()->startSound(PSSE_EN_DANGO_ROLL_GROUND, 0);
} else {
crab->mTargetVelocity = Vector3f(0.0f);
@ -1473,8 +1473,8 @@ void StateAttack::exec(EnemyBase* enemy)
crab->startBossAttackLoopBGM();
crab->createEnemyBounceEffect();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(15, crabPos, 2);
rumbleMgr->startRumble(14, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_MidFastShort, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_4) {
if (!crab->mIsRolling) {
@ -1492,8 +1492,8 @@ void StateAttack::exec(EnemyBase* enemy)
} else if (crab->mCurAnim->mType == KEYEVENT_5) {
crab->createEnemyBounceEffect();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(25, crabPos, 2);
rumbleMgr->startRumble(14, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_HardFastMid, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_END) {
transit(crab, crab->mNextState, nullptr);
@ -1533,8 +1533,8 @@ void StateTurn::init(EnemyBase* enemy, StateArg* stateArg)
crab->createCrashEnemy();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(27, crabPos, 2);
rumbleMgr->startRumble(15, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_Crash, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, crabPos, RUMBLEID_Both);
}
/**
@ -1561,8 +1561,8 @@ void StateTurn::exec(EnemyBase* enemy)
} else if (crab->mCurAnim->mType == KEYEVENT_2) {
crab->createEnemyBounceEffect();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(21, crabPos, 2);
rumbleMgr->startRumble(14, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_HardMidShort, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_NULL) {
if (crab->isEvent(0, EB_Invulnerable)) {
@ -1575,14 +1575,14 @@ void StateTurn::exec(EnemyBase* enemy)
crab->enableEvent(0, EB_Invulnerable);
crab->setBodyCollision(true);
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(15, crabPos, 2);
rumbleMgr->startRumble(11, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_MidFastShort, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_4) {
crab->createBodyTurnEffect();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(25, crabPos, 2);
rumbleMgr->startRumble(14, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_HardFastMid, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_END) {
transit(crab, crab->mNextState, nullptr);
@ -1631,8 +1631,8 @@ void StateRecover::exec(EnemyBase* enemy)
} else if (crab->mCurAnim->mType == KEYEVENT_2) {
crab->createEnemyBounceEffect();
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(15, crabPos, 2);
rumbleMgr->startRumble(11, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_MidFastShort, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, crabPos, RUMBLEID_Both);
crab->startBossFlickBGM();
} else if (crab->mCurAnim->mType == KEYEVENT_END) {
@ -1676,8 +1676,8 @@ void StateFlick::exec(EnemyBase* enemy)
crab->createWallBreakEffect();
crab->getJAIObject()->startSound(PSSE_EN_DANGO_ARM_GROUND, 0);
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(25, crabPos, 2);
rumbleMgr->startRumble(14, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_HardFastMid, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, crabPos, RUMBLEID_Both);
transit(crab, DANGOMUSHI_Wait, (DangoStateArg*)("blend"));
return;
}
@ -1695,8 +1695,8 @@ void StateFlick::exec(EnemyBase* enemy)
} else if (crab->mCurAnim->mType == KEYEVENT_3) {
crab->mIsArmSwinging = false;
Vector3f crabPos = crab->getPosition();
cameraMgr->startVibration(15, crabPos, 2);
rumbleMgr->startRumble(11, crabPos, 2);
cameraMgr->startVibration(VIBTYPE_MidFastShort, crabPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, crabPos, RUMBLEID_Both);
} else if (crab->mCurAnim->mType == KEYEVENT_END) {
transit(crab, DANGOMUSHI_Wait, nullptr);

View File

@ -388,8 +388,8 @@ void Obj::pressOnGround()
createDropEffect(fxPos, getDownSmokeScale());
}
cameraMgr->startVibration(6, fxPos, 2);
rumbleMgr->startRumble(14, fxPos, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, fxPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, fxPos, RUMBLEID_Both);
if (mWaterBox) {
getJAIObject()->startSound(PSSE_EN_FROG_WATERLAND, 0);
@ -437,8 +437,8 @@ void Obj::createDownEffect(f32 scale)
createDropEffect(fxPos, scale);
}
cameraMgr->startVibration(0, mPosition, 2);
rumbleMgr->startRumble(11, mPosition, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, mPosition, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, mPosition, RUMBLEID_Both);
}
/**

View File

@ -129,8 +129,8 @@ void Obj::flickAttackBomb()
efx.create(nullptr);
Vector3f pos = mPosition;
cameraMgr->startVibration(28, pos, 2);
rumbleMgr->startRumble(11, pos, 2);
cameraMgr->startVibration(VIBTYPE_Boom, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
}
/**
@ -185,8 +185,8 @@ void Obj::createSmokeEffect()
if (id == ChappyBase::CHAPPYANIM_WaitAct2) {
pos -= Vector3f(sinf(mFaceDir) * 60.0f, 0.0f, cosf(mFaceDir) * 60.0f);
cameraMgr->startVibration(3, pos, 2);
rumbleMgr->startRumble(11, pos, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
} else if (id == ChappyBase::CHAPPYANIM_Sleep) {
setAtari(true);
@ -198,7 +198,7 @@ void Obj::createSmokeEffect()
parms = static_cast<ChappyBase::Parms*>(mParms);
EnemyFunc::flickNearbyNavi(this, parms->mGeneral.mPrivateRadius.mValue, parms->mGeneral.mShakeKnockback.mValue,
parms->mGeneral.mShakeDamage.mValue, FLICK_BACKWARD_ANGLE, nullptr);
rumbleMgr->startRumble(10, pos, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, pos, RUMBLEID_Both);
} else {
return;

View File

@ -143,7 +143,7 @@ bool HoudaiShotGunNode::update()
PSStartSoundVec(PSSE_EN_HOUDAI_IMPACT, (Vec*)&mPosition);
}
rumbleMgr->startRumble(11, effectPos, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, effectPos, RUMBLEID_Both);
} else {
Vector3f houdaiPos = mOwner->getPosition();

View File

@ -42,7 +42,7 @@ void StateDead::init(EnemyBase* enemy, StateArg* stateArg)
houdai->finishSteamEffect();
Vector3f position = houdai->getPosition();
rumbleMgr->startRumble(7, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_HoudaiDeath, position, RUMBLEID_Both);
}
/**
@ -58,7 +58,7 @@ void StateDead::exec(EnemyBase* enemy)
houdai->createDeadBombEffect();
Vector3f position = houdai->getPosition();
cameraMgr->startVibration(21, position, 2);
cameraMgr->startVibration(VIBTYPE_HardMidShort, position, CAMNAVI_Both);
houdai->kill(nullptr);
}
}
@ -136,8 +136,8 @@ void StateLand::init(EnemyBase* enemy, StateArg* stateArg)
shadowMgr->addJointShadow(houdai);
Vector3f position = houdai->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(6, position, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_HoudaiStart, position, RUMBLEID_Both);
}
/**
@ -165,8 +165,8 @@ void StateLand::exec(EnemyBase* enemy)
shadowMgr->addJointShadow(houdai);
Vector3f position = houdai->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(6, position, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_HoudaiStart, position, RUMBLEID_Both);
}
}

View File

@ -461,7 +461,7 @@ void Obj::startEnemyRumble()
Vector3f vec(mtx->mMatrix.structView.tx, mtx->mMatrix.structView.ty, mtx->mMatrix.structView.tz);
vec.y = mPosition.y;
rumbleMgr->startRumble(11, vec, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, vec, RUMBLEID_Both);
createBounceEffect(vec, 0.75f);
}

View File

@ -78,7 +78,7 @@ void StateDead::exec(EnemyBase* enemy)
kurage->getJAIObject()->startSound(PSSE_EN_KURAGE_HARETSU, 0);
Vector3f position = kurage->getPosition();
rumbleMgr->startRumble(9, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, position, RUMBLEID_Both);
} else if ((u32)kurage->mCurAnim->mType == KEYEVENT_END) {
kurage->kill(nullptr);
@ -442,8 +442,8 @@ void StateLand::init(EnemyBase* enemy, StateArg* stateArg)
kurage->createDownEffect();
Vector3f position = kurage->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(9, position, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, position, RUMBLEID_Both);
}
/**
@ -592,7 +592,7 @@ void StateFlyFlick::exec(EnemyBase* enemy)
parms->mGeneral.mShakeDamage.mValue, -1000.0, nullptr);
kurage->mFlickTimer = 0.0f;
Vector3f position = kurage->getPosition();
rumbleMgr->startRumble(9, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, position, RUMBLEID_Both);
} else if ((u32)kurage->mCurAnim->mType == KEYEVENT_END) {
int nextFlyingState = kurage->getFlyingNextState();
@ -644,7 +644,7 @@ void StateGroundFlick::exec(EnemyBase* enemy)
if (kurage->mCurAnim->mIsPlaying) {
if ((u32)kurage->mCurAnim->mType == KEYEVENT_2) {
Vector3f position = kurage->getPosition();
rumbleMgr->startRumble(9, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, position, RUMBLEID_Both);
} else if ((u32)kurage->mCurAnim->mType == KEYEVENT_3) {
Parms* parms1 = CG_PARMS(kurage);

View File

@ -146,7 +146,7 @@ void Obj::startEnemyRumble()
Matrixf* worldMat = mModel->getJoint("ago")->getWorldMatrix();
Vector3f pos = Vector3f(worldMat->mMatrix.mtxView[0][3], worldMat->mMatrix.mtxView[1][3], worldMat->mMatrix.mtxView[2][3]);
pos.y = mPosition.y;
rumbleMgr->startRumble(8, pos, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
createBounceEffect(pos, 0.4f);
}

View File

@ -127,8 +127,8 @@ bool MiniHoudaiShotGunNode::update()
PSStartSoundVec(PSSE_PK_SE_BOMB, (Vec*)&mPosition);
if (_18) {
cameraMgr->startVibration(15, effectPos, 2);
rumbleMgr->startRumble(14, effectPos, 2);
cameraMgr->startVibration(VIBTYPE_MidFastShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, effectPos, RUMBLEID_Both);
}
result = true;

View File

@ -58,8 +58,8 @@ void StateDead::exec(EnemyBase* enemy)
mini->getJAIObject()->startSound(PSSE_EN_MINIHOU_BOMB, 0);
Vector3f pos = mini->getPosition();
cameraMgr->startVibration(28, pos, 2);
rumbleMgr->startRumble(11, pos, 2);
cameraMgr->startVibration(VIBTYPE_Boom, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
} else if (mini->mCurAnim->mType == KEYEVENT_3) {
mini->createDownEffect(0.75f);

View File

@ -1292,8 +1292,8 @@ void Obj::updateCollPartOffset()
mSuckedNavis[i]->mSoundObj->startSound(PSSE_EN_ONIKURAGE_GET_ORIMA, 0);
}
Vector3f pos = getPosition();
cameraMgr->startVibration(2, pos, 2);
rumbleMgr->startRumble(10, pos, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowLong, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, pos, RUMBLEID_Both);
}
}
}
@ -1815,8 +1815,8 @@ void Obj::escapeCheckNavi()
} else {
createFlickNaviEffect();
Vector3f pos = getPosition();
cameraMgr->startVibration(0, pos, 2);
rumbleMgr->startRumble(10, pos, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, pos, RUMBLEID_Both);
mSuckedNavis[i]->mSoundObj->startSound(PSSE_EN_ONIKURAGE_VOMIT, 0);
}
mSuckedNavis[i] = nullptr;

View File

@ -84,8 +84,8 @@ void StateDead::exec(EnemyBase* enemy)
kurage->getJAIObject()->startSound(PSSE_EN_ONIKURAGE_HARETSU, 0);
Vector3f position = kurage->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(10, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed10, position, RUMBLEID_Both);
} else if ((u32)kurage->mCurAnim->mType == KEYEVENT_END) {
kurage->kill(nullptr);
@ -513,8 +513,8 @@ void StateLand::init(EnemyBase* enemy, StateArg* stateArg)
kurage->createDownEffect();
Vector3f position = kurage->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(9, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed9, position, RUMBLEID_Both);
}
/**
@ -663,7 +663,7 @@ void StateFlyFlick::exec(EnemyBase* enemy)
parms->mGeneral.mShakeDamage.mValue, -1000.0, nullptr);
kurage->mFlickTimer = 0.0f;
Vector3f position = kurage->getPosition();
rumbleMgr->startRumble(12, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, position, RUMBLEID_Both);
} else if ((u32)kurage->mCurAnim->mType == KEYEVENT_END) {
int nextFlyingState = kurage->getFlyingNextState();
@ -719,7 +719,7 @@ void StateGroundFlick::exec(EnemyBase* enemy)
if (kurage->mCurAnim->mIsPlaying) {
if ((u32)kurage->mCurAnim->mType == KEYEVENT_2) {
Vector3f position = kurage->getPosition();
rumbleMgr->startRumble(12, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, position, RUMBLEID_Both);
} else if ((u32)kurage->mCurAnim->mType == KEYEVENT_3) {
Parms* parms1 = CG_PARMS(kurage);

View File

@ -46,8 +46,8 @@ void StateDead::exec(EnemyBase* enemy)
if (queen->mCurAnim->mIsPlaying != 0) {
if ((u32)queen->mCurAnim->mType == KEYEVENT_2) {
Vector3f position = queen->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(14, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} else if ((u32)queen->mCurAnim->mType == KEYEVENT_END) {
queen->releaseJointShadow();
queen->kill(nullptr);
@ -362,7 +362,7 @@ void StateRolling::exec(EnemyBase* enemy)
queen->mWaitTimer += sys->mDeltaTime;
Vector3f camPos = queen->getPosition();
cameraMgr->startVibration(15, camPos, 2);
cameraMgr->startVibration(VIBTYPE_MidFastShort, camPos, CAMNAVI_Both);
} else {
queen->mTargetVelocity = Vector3f(0.0f);
@ -406,8 +406,8 @@ void StateRolling::exec(EnemyBase* enemy)
queen->createCrashFallRock();
Vector3f anotherPos = queen->getPosition();
cameraMgr->startVibration(27, anotherPos, 2);
rumbleMgr->startRumble(15, anotherPos, 2);
cameraMgr->startVibration(VIBTYPE_Crash, anotherPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, anotherPos, RUMBLEID_Both);
}
queen->mIsRolling = false;
queen->mNextState = QUEEN_Rolling;

View File

@ -196,8 +196,8 @@ void StateFall::cleanup(EnemyBase* enemy)
rock->finishFallEffect();
Vector3f position = rock->getPosition();
cameraMgr->startVibration(27, position, 2);
rumbleMgr->startRumble(14, position, 2);
cameraMgr->startVibration(VIBTYPE_Crash, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
}
/**
@ -248,7 +248,7 @@ void StateMove::cleanup(EnemyBase* enemy)
rock->finishRollingWaterEffect();
Vector3f position = rock->getPosition();
rumbleMgr->startRumble(14, position, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
}
/**

View File

@ -104,7 +104,7 @@ void StateFall::exec(EnemyBase* enemy)
if (sarai->mCurAnim->mIsPlaying) {
if (sarai->mCurAnim->mType == KEYEVENT_2) {
sarai->createDownEffect();
rumbleMgr->startRumble(11, pos, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) {
if (sarai->mHealth <= 0.0f) {
transit(sarai, SARAI_Dead, nullptr);

View File

@ -1727,8 +1727,8 @@ void Obj::createDownHeadEffect(f32 scale)
fxPos.y -= 15.0f;
createBounceEffect(fxPos, scale);
cameraMgr->startVibration(3, fxPos, 2);
rumbleMgr->startRumble(8, fxPos, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, fxPos, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, fxPos, RUMBLEID_Both);
}
/**

View File

@ -47,8 +47,8 @@ void StateDead::init(EnemyBase* enemy, StateArg* stateArg)
snagret->createDeadStartEffect();
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(13, position, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, position, RUMBLEID_Both);
}
/**
@ -69,16 +69,16 @@ void StateDead::exec(EnemyBase* enemy)
snagret->throwupItem();
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(11, position, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_4) {
snagret->createDownHeadEffect(0.5f);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_5) {
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(8, position, 2);
rumbleMgr->startRumble(13, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_END) {
snagret->kill(nullptr);
@ -232,8 +232,8 @@ void StateAppear1::init(EnemyBase* enemy, StateArg* stateArg)
snagret->createAppearEffect(0);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(15, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
}
/**
@ -300,8 +300,8 @@ void StateAppear2::init(EnemyBase* enemy, StateArg* stateArg)
snagret->createAppearEffect(1);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(8, position, 2);
rumbleMgr->startRumble(12, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, position, RUMBLEID_Both);
}
/**
@ -322,13 +322,13 @@ void StateAppear2::exec(EnemyBase* enemy)
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_4) {
snagret->createAppearEffect(2);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(11, position, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_5) {
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(11, position, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_END) {
snagret->setAttackPosition();
@ -382,8 +382,8 @@ void StateDisappear::init(EnemyBase* enemy, StateArg* stateArg)
enemy->mTargetVelocity = Vector3f(0.0f);
enemy->setEmotionCaution();
enemy->startMotion(SNAKECROWANIM_Dive, nullptr);
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(14, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
}
/**

View File

@ -49,8 +49,8 @@ void StateDead::init(EnemyBase* enemy, StateArg* stateArg)
snagret->createDeadStartEffect();
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(0, position, 2);
rumbleMgr->startRumble(13, position, 2);
cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, position, RUMBLEID_Both);
}
/**
@ -69,19 +69,19 @@ void StateDead::exec(EnemyBase* enemy)
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_3) {
snagret->createWalkSmokeEffect(0.9f);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(11, position, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_4) {
snagret->createWalkSmokeEffect(0.75f);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(11, position, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_5) {
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(8, position, 2);
rumbleMgr->startRumble(13, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed13, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_END) {
snagret->kill(nullptr);
@ -238,8 +238,8 @@ void StateAppear1::init(EnemyBase* enemy, StateArg* stateArg)
snagret->createAppearEffect(0);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(15, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
}
/**
@ -259,15 +259,15 @@ void StateAppear1::exec(EnemyBase* enemy)
snagret->startBossAttackBGM();
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(14, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_4) {
snagret->disableEvent(0, EB_NoInterrupt);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(14, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_END) {
snagret->setAttackPosition();
@ -293,8 +293,8 @@ void StateAppear1::exec(EnemyBase* enemy)
}
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(8, position, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed8, position, RUMBLEID_Both);
}
}
@ -330,8 +330,8 @@ void StateAppear2::init(EnemyBase* enemy, StateArg* stateArg)
snagret->createAppearEffect(1);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(8, position, 2);
rumbleMgr->startRumble(12, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed12, position, RUMBLEID_Both);
}
/**
@ -353,22 +353,22 @@ void StateAppear2::exec(EnemyBase* enemy)
snagret->createAppearEffect(2);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(11, position, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_5) {
snagret->enableEvent(0, EB_NoInterrupt);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(3, position, 2);
rumbleMgr->startRumble(11, position, 2);
cameraMgr->startVibration(VIBTYPE_LightMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_6) {
snagret->disableEvent(0, EB_NoInterrupt);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(14, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_END) {
snagret->setAttackPosition();
@ -456,8 +456,8 @@ void StateDisappear::exec(EnemyBase* enemy)
efx::THebiAphd_dive diveFx;
diveFx.create(&fxArg);
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(15, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_5) {
snagret->mIsUnderground = true;
@ -608,8 +608,8 @@ void StateWalk::exec(EnemyBase* enemy)
snagret->createWalkSmokeEffect(0.75f);
Vector3f position = snagret->getPosition();
cameraMgr->startVibration(6, position, 2);
rumbleMgr->startRumble(14, position, 2);
cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} else if ((u32)snagret->mCurAnim->mType == KEYEVENT_END) {
if (snagret->mNextState == SNAKEWHOLE_Attack && snagret->getStickHeadPikmin() != 0) {

View File

@ -13,12 +13,12 @@ namespace Game {
*/
PlayCamera::PlayCamera(Navi* target)
{
mTargetObj = target;
mChangePlayerState = 0;
mCameraZoomLevel = 1;
mCameraSelAngle = 0;
mCanInput = true;
_249 = false;
mTargetObj = target;
mChangePlayerState = CAMCHANGE_None;
mCameraZoomLevel = CAMZOOM_Mid;
mCameraSelAngle = CAMANGLE_Behind;
mCanInput = true;
mIsCollisionCamActive = false;
mGoalTargetDistance = 100.0f;
mCurrTargetDistance = 100.0f;
@ -42,14 +42,14 @@ PlayCamera::PlayCamera(Navi* target)
mHoldRTimer = 0.0f;
for (int i = 0; i < 3; i++) {
mVibrateEnabled[i] = false;
mVibrateAzimuthParm[i] = 0.0f;
mVibrateScaleParm[i] = 0.0f;
mVibrateTimeParm[i] = 0.0f;
mVibrateTimer[i] = 0.0f;
mVibrateAngle[i] = 0.0f;
mVibrateRollAngle[i] = 0.0f;
mVibrateSpeedParm[i] = 0.0f;
mVibrateEnabled[i] = false;
mVibrateStrength[i] = 0.0f;
mVibrateScale[i] = 0.0f;
mVibrateDuration[i] = 0.0f;
mVibrateTimer[i] = 0.0f;
mVibrateAngle[i] = 0.0f;
mVibrateRollAngle[i] = 0.0f;
mVibrateSpeed[i] = 0.0f;
}
mCameraParms = nullptr;
@ -79,9 +79,9 @@ void PlayCamera::init()
P2ASSERTLINE(121, mCameraParms);
P2ASSERTLINE(122, mVibrationParms);
mCanInput = true;
mChangePlayerState = 0;
mCameraZoomLevel = 1; // (default to medium zoom)
mCameraSelAngle = 0;
mChangePlayerState = CAMCHANGE_None;
mCameraZoomLevel = CAMZOOM_Mid; // (default to medium zoom)
mCameraSelAngle = CAMANGLE_Behind;
setTargetParms();
changeTargetAtPosition();
mCurrTargetDistance = mGoalTargetDistance;
@ -147,12 +147,12 @@ void PlayCamera::setCameraData(CameraData& data)
* @note Address: 0x8023F790
* @note Size: 0x80
*/
void PlayCamera::changePlayerMode(bool updateDir)
void PlayCamera::changePlayerMode(bool doCenterCameraBehind)
{
mChangePlayerState = 1;
mChangePlayerState = CAMCHANGE_IsChanging;
setTargetParms();
changeTargetAtPosition();
if (updateDir) {
if (doCenterCameraBehind) {
setTargetThetaToWhistle();
} else {
mCameraAngleTarget = mCameraAngleCurrent;
@ -168,7 +168,7 @@ void PlayCamera::changePlayerMode(bool updateDir)
*/
bool PlayCamera::isSpecialCamera()
{
if (mTargetObj->mController1 && mCanInput && !mChangePlayerState && mHoldRTimer >= 1.0f) {
if (mTargetObj->mController1 && mCanInput && (mChangePlayerState == CAMCHANGE_None) && mHoldRTimer >= 1.0f) {
return true;
}
return false;
@ -180,26 +180,26 @@ bool PlayCamera::isSpecialCamera()
*/
void PlayCamera::doUpdate()
{
u32 state = updateCameraMode();
if (state & 0x10) {
u32 flags = updateCameraMode();
if (flags & CAMFLAGS_StartZoomCam) {
startZoomCamera();
}
if (state & 0x40) {
if (flags & CAMFLAGS_EndZoomCam) {
finishDemoCamera();
}
if (state & 3) {
startGameCamera(state);
if (flags & (CAMFLAGS_ChangeZoomLevel | CAMFLAGS_ChangeSelAngle)) {
startGameCamera(flags);
}
if (state & 4) {
if (flags & CAMFLAGS_CenterBehind) {
setFollowTime();
}
if (state & 8) {
if (flags & CAMFLAGS_SmoothFollow) {
setSmoothThetaSpeed();
}
changeTargetTheta();
changeTargetAtPosition();
setCollisionCameraTargetPhi(state);
updateParms(state);
setCollisionCameraTargetPhi(flags);
updateParms(flags);
for (int i = 0; i < 3; i++) {
if (mVibrateEnabled[i]) {
updateVibration(i);
@ -257,57 +257,67 @@ bool PlayCamera::isVibration()
* @note Address: 0x8023FAE4
* @note Size: 0x208
*/
void PlayCamera::startVibration(int type, f32 strength)
void PlayCamera::startVibration(int type, f32 scale)
{
if (type == 0x1d) {
mVibrateEnabled[0] = true;
mVibrateTimer[0] = 0.0f;
mVibrateScaleParm[0] = strength;
mVibrateAzimuthParm[0] = mVibrationParms->mAzimuthShortVib;
mVibrateSpeedParm[0] = mVibrationParms->mAzimuthShortSpeed;
mVibrateTimeParm[0] = mVibrationParms->mAzimuthShortTime;
if (type == VIBTYPE_NaviDamage) {
mVibrateEnabled[0] = true;
mVibrateTimer[0] = 0.0f;
mVibrateScale[0] = scale;
mVibrateStrength[0] = mVibrationParms->mAzimuthShortVib;
mVibrateSpeed[0] = mVibrationParms->mAzimuthShortSpeed;
mVibrateDuration[0] = mVibrationParms->mAzimuthShortTime;
otherVibFinished(0);
} else if (type == 0x1c) {
mVibrateEnabled[2] = true;
mVibrateTimer[2] = 0.0f;
mVibrateScaleParm[2] = strength;
mVibrateAzimuthParm[2] = mVibrationParms->mZoomShortVib;
mVibrateSpeedParm[2] = mVibrationParms->mZoomShortSpeed;
mVibrateTimeParm[2] = mVibrationParms->mZoomShortTime;
return;
}
if (type == VIBTYPE_Boom) {
mVibrateEnabled[2] = true;
mVibrateTimer[2] = 0.0f;
mVibrateScale[2] = scale;
mVibrateStrength[2] = mVibrationParms->mZoomShortVib;
mVibrateSpeed[2] = mVibrationParms->mZoomShortSpeed;
mVibrateDuration[2] = mVibrationParms->mZoomShortTime;
otherVibFinished(2);
return;
}
mVibrateEnabled[1] = true;
mVibrateTimer[1] = 0.0f;
mVibrateScale[1] = scale;
otherVibFinished(1);
if (type == VIBTYPE_Crash) {
mVibrateStrength[1] = mVibrationParms->mElevationHardVib2;
mVibrateSpeed[1] = mVibrationParms->mElevationHardSpeed;
mVibrateDuration[1] = mVibrationParms->mElevationHardTime;
return;
}
// strength
if (type <= VIBTYPE_LIGHT) {
mVibrateStrength[1] = mVibrationParms->mElevationLightVib;
} else if (type <= VIBTYPE_MID) {
mVibrateStrength[1] = mVibrationParms->mElevationMiddleVib;
} else { // VIBTYPE_HARD
mVibrateStrength[1] = mVibrationParms->mElevationHardVib;
}
// speed
int speedType = (type / 3) % 3;
if (speedType == 0) { // slow
mVibrateSpeed[1] = mVibrationParms->mElevationSlowSpeed;
} else if (speedType == 1) { // middle
mVibrateSpeed[1] = mVibrationParms->mElevationMiddleSpeed;
} else { // fast
mVibrateSpeed[1] = mVibrationParms->mElevationFastSpeed;
}
// duration
if (type % 3 == 0) {
mVibrateDuration[1] = mVibrationParms->mElevationShortTime;
} else if (type % 3 == 1) {
mVibrateDuration[1] = mVibrationParms->mElevationMiddleTime;
} else {
mVibrateEnabled[1] = true;
mVibrateTimer[1] = 0.0f;
mVibrateScaleParm[1] = strength;
otherVibFinished(1);
if (type == 0x1b) {
mVibrateAzimuthParm[1] = mVibrationParms->mElevationHardVib2;
mVibrateSpeedParm[1] = mVibrationParms->mElevationHardSpeed;
mVibrateTimeParm[1] = mVibrationParms->mElevationHardTime;
} else {
if (type <= 8) {
mVibrateAzimuthParm[1] = mVibrationParms->mElevationLightVib;
} else if (type <= 17) {
mVibrateAzimuthParm[1] = mVibrationParms->mElevationMiddleVib;
} else {
mVibrateAzimuthParm[1] = mVibrationParms->mElevationHardVib;
}
int flag = (type / 3) % 3;
if (flag == 0) {
mVibrateSpeedParm[1] = mVibrationParms->mElevationSlowSpeed;
} else if (flag == 1) {
mVibrateSpeedParm[1] = mVibrationParms->mElevationMiddleSpeed;
} else {
mVibrateSpeedParm[1] = mVibrationParms->mElevationFastSpeed;
}
if (type % 3 == 0) {
mVibrateTimeParm[1] = mVibrationParms->mElevationShortTime;
} else if (type % 3 == 1) {
mVibrateTimeParm[1] = mVibrationParms->mElevationMiddleTime;
} else {
mVibrateTimeParm[1] = mVibrationParms->mElevationLongTime;
}
}
mVibrateDuration[1] = mVibrationParms->mElevationLongTime;
}
}
@ -318,7 +328,7 @@ void PlayCamera::startVibration(int type, f32 strength)
void PlayCamera::startDemoCamera(int type)
{
switch (type) {
case 1:
case CAMDEMO_Test:
mGoalTargetDistance = mCameraParms->mZoomDist;
mGoalVerticalAngle = mCameraParms->mZoomAngle.mValue * DEG2RAD;
mGoalFOV = mCameraParms->mZoomFOV;
@ -354,44 +364,44 @@ void PlayCamera::finishDemoCamera() { setTargetParms(); }
u32 PlayCamera::updateCameraMode()
{
Controller* pad = mTargetObj->mController1;
u32 ret = 0;
u32 flags = 0;
if (pad && mCanInput) {
if (!mChangePlayerState) {
if (mChangePlayerState == CAMCHANGE_None) {
if (pad->getButton() & Controller::PRESS_R) {
if (mHoldRTimer < 1.0f) {
mHoldRTimer += sys->mDeltaTime;
if (mHoldRTimer >= 1.0f) {
ret |= 0x30;
flags |= (CAMFLAGS_StartZoomCam | CAMFLAGS_InZoomCam);
}
} else {
ret |= 0x20;
flags |= CAMFLAGS_InZoomCam;
}
} else {
if (mHoldRTimer >= 1.0f) {
ret |= 0x40;
flags |= CAMFLAGS_EndZoomCam;
}
mHoldRTimer = 0.0f;
}
if (!(ret & 0x20)) {
if (!(flags & CAMFLAGS_InZoomCam)) {
if (pad->getButtonDown() & Controller::PRESS_R) {
ret |= 1;
flags |= CAMFLAGS_ChangeZoomLevel;
}
if (pad->getButtonDown() & Controller::PRESS_Z) {
ret |= 2;
flags |= CAMFLAGS_ChangeSelAngle;
}
}
if (pad->getButtonDown() & Controller::PRESS_L) {
ret |= 4;
flags |= CAMFLAGS_CenterBehind;
} else {
if (pad->mButton.mAnalogL > 0.1f) {
ret |= 8;
flags |= CAMFLAGS_SmoothFollow;
}
}
}
}
return ret;
return flags;
}
/**
@ -417,15 +427,15 @@ void PlayCamera::startZoomCamera()
*/
void PlayCamera::startGameCamera(int flag)
{
if (flag & 1) {
if (flag & CAMFLAGS_ChangeZoomLevel) {
mCameraZoomLevel++;
if (mCameraZoomLevel > 2) {
mCameraZoomLevel = 0;
if (mCameraZoomLevel > CAMZOOM_Far) { // only 3 zoom levels and they cycle
mCameraZoomLevel = CAMZOOM_Near;
}
}
if (flag & 2) {
mCameraSelAngle = mCameraSelAngle ^ 1;
_249 = 0;
if (flag & CAMFLAGS_ChangeSelAngle) {
mCameraSelAngle = mCameraSelAngle ^ 1;
mIsCollisionCamActive = false;
}
PSSystem::spSysIF->playSystemSe(PSSE_SY_CAMERAVIEW_CHANGE, 0);
setTargetParms();
@ -439,9 +449,9 @@ void PlayCamera::setTargetParms()
{
mHoldRTimer = 0.0f;
switch (mCameraSelAngle) {
case 0: {
case CAMANGLE_Behind: {
switch (mCameraZoomLevel) {
case 0: // low zoom low angle
case CAMZOOM_Near: // low zoom low angle
mGoalTargetDistance = mCameraParms->mNearLowDist;
mGoalVerticalAngle = mCameraParms->mNearLowAngle.mValue * DEG2RAD;
mGoalFOV = mCameraParms->mNearLowFOV;
@ -451,7 +461,7 @@ void PlayCamera::setTargetParms()
mDetachedWeight = mCameraParms->mNearLowWeight;
mDetachedParm = mCameraParms->mNearLowDetached;
break;
case 1: // medium zoom low angle
case CAMZOOM_Mid: // medium zoom low angle
mGoalTargetDistance = mCameraParms->mMidLowDist;
mGoalVerticalAngle = mCameraParms->mMidLowAngle.mValue * DEG2RAD;
mGoalFOV = mCameraParms->mMidLowFOV;
@ -461,7 +471,7 @@ void PlayCamera::setTargetParms()
mDetachedWeight = mCameraParms->mMidLowWeight;
mDetachedParm = mCameraParms->mMidLowDetached;
break;
case 2: // far zoom low angle
case CAMZOOM_Far: // far zoom low angle
mGoalTargetDistance = mCameraParms->mFarLowDist;
mGoalVerticalAngle = mCameraParms->mFarLowAngle.mValue * DEG2RAD;
mGoalFOV = mCameraParms->mFarLowFOV;
@ -474,9 +484,9 @@ void PlayCamera::setTargetParms()
}
break;
}
case 1: {
case CAMANGLE_Overhead: {
switch (mCameraZoomLevel) {
case 0: // low zoom high angle
case CAMZOOM_Near: // low zoom high angle
mGoalTargetDistance = mCameraParms->mNearHighDist;
mGoalVerticalAngle = mCameraParms->mNearHighAngle.mValue * DEG2RAD;
mGoalFOV = mCameraParms->mNearHighFOV;
@ -486,7 +496,7 @@ void PlayCamera::setTargetParms()
mDetachedWeight = mCameraParms->mNearHighWeight;
mDetachedParm = mCameraParms->mNearHighDetached;
break;
case 1: // medium zoom high angle
case CAMZOOM_Mid: // medium zoom high angle
mGoalTargetDistance = mCameraParms->mMidHighDist;
mGoalVerticalAngle = mCameraParms->mMidHighAngle.mValue * DEG2RAD;
mGoalFOV = mCameraParms->mMidHighFOV;
@ -496,7 +506,7 @@ void PlayCamera::setTargetParms()
mDetachedWeight = mCameraParms->mMidHighWeight;
mDetachedParm = mCameraParms->mMidHighDetached;
break;
case 2: // far zoom high angle
case CAMZOOM_Far: // far zoom high angle
mGoalTargetDistance = mCameraParms->mFarHighDist;
mGoalVerticalAngle = mCameraParms->mFarHighAngle.mValue * DEG2RAD;
mGoalFOV = mCameraParms->mFarHighFOV;
@ -520,7 +530,7 @@ void PlayCamera::setTargetThetaToWhistle()
{
Vector3f pos = mTargetObj->getPosition();
NaviWhistle* whistle = mTargetObj->mWhistle;
mCameraAngleTarget = JMath::atanTable_.atan2_(pos.x - whistle->mPosition.x, pos.z - whistle->mPosition.z);
mCameraAngleTarget = JMAAtan2Radian(pos.x - whistle->mPosition.x, pos.z - whistle->mPosition.z);
}
/**
@ -607,7 +617,7 @@ void PlayCamera::updateParms(int flag)
mViewAngle = (mViewAngle * invrate) + (mGoalFOV * rate);
mProjectionNear = (mProjectionNear * invrate) + (mNearZPlane * rate);
mProjectionFar = (mProjectionFar * invrate) + (mFarZPlane * rate);
if (flag & 0x20) {
if (flag & CAMFLAGS_InZoomCam) {
rate = 0.175f;
invrate = 0.825f;
}
@ -727,29 +737,27 @@ lbl_8024096C:
*/
void PlayCamera::updateVibration(int id)
{
f32* vibrateTimer = &mVibrateTimer[id];
f32 newSpeed = mVibrateSpeedParm[id] * sys->mDeltaTime;
f32 test2 = 1.0f;
f32* vibrateTimer = &mVibrateTimer[id];
f32 newSpeed = mVibrateSpeed[id] * sys->mDeltaTime;
f32 packetStrength = 1.0f;
mVibrateAngle[id] += newSpeed;
mVibrateTimer[id] += sys->mDeltaTime;
if (mVibrateAngle[id] > TAU) {
mVibrateAngle[id] -= TAU;
}
// f32 test = mVibrateTimer[id];
if (mVibrateTimer[id] > mVibrateTimeParm[id]) {
test2 -= (mVibrateTimer[id] - mVibrateTimeParm[id]) / 0.5f;
if (test2 < 0.0f) {
if (mVibrateTimer[id] > mVibrateDuration[id]) {
packetStrength -= (mVibrateTimer[id] - mVibrateDuration[id]) / 0.5f;
if (packetStrength < 0.0f) {
mVibrateEnabled[id] = false;
mVibrateAngle[id] = 0.0f;
mVibrateTimer[id] = 0.0f;
test2 = 0.0f;
packetStrength = 0.0f;
}
}
f32 angle = mVibrateAngle[id];
mVibrateRollAngle[id] = (test2 * mVibrateScaleParm[id]) * mVibrateAzimuthParm[id] * sinf(angle);
mVibrateRollAngle[id] = (packetStrength * mVibrateScale[id]) * mVibrateStrength[id] * sinf(angle);
}
/**
@ -771,7 +779,7 @@ void PlayCamera::otherVibFinished(int id)
*/
bool PlayCamera::isModCameraFinished()
{
if (mChangePlayerState == 1) {
if (mChangePlayerState == CAMCHANGE_IsChanging) {
f32 anglein = mCameraAngleTarget;
f32 angleout = mCameraAngleCurrent;
if (anglein >= angleout) {
@ -786,7 +794,7 @@ bool PlayCamera::isModCameraFinished()
if (absVal(anglediff) < 0.1f && absVal(mGoalTargetDistance - mCurrTargetDistance) < 10.0f
&& absVal(mGoalVerticalAngle - mCurrVerticalAngle) < 0.1f && absVal(mGoalFOV - mViewAngle) < 1.0f) {
if (mGoalPosition.distance(mLookAtPosition) < 50.0f) {
mChangePlayerState = 0;
mChangePlayerState = CAMCHANGE_None;
return true;
}
}
@ -800,25 +808,26 @@ bool PlayCamera::isModCameraFinished()
*/
void PlayCamera::setCollisionCameraTargetPhi(int flag)
{
if (flag & 0x20) {
if (flag & CAMFLAGS_InZoomCam) {
mGoalVerticalAngle = getCollisionCameraTargetPhi(mCameraParms->mZoomAngle(), mCameraParms->mZoomDist());
return;
}
if (mCameraSelAngle) {
// collision camera only active in behind cam
if (mCameraSelAngle != CAMANGLE_Behind) {
return;
}
if (_249) {
if (mIsCollisionCamActive) {
f32 phi;
switch (mCameraZoomLevel) {
case 0:
case CAMZOOM_Near:
phi = getCollisionCameraTargetPhi(mCameraParms->mNearLowAngle(), mCameraParms->mCollRadius());
break;
case 1:
case CAMZOOM_Mid:
phi = getCollisionCameraTargetPhi(mCameraParms->mMidLowAngle(), mCameraParms->mCollRadius());
break;
case 2:
case CAMZOOM_Far:
phi = getCollisionCameraTargetPhi(mCameraParms->mFarLowAngle(), mCameraParms->mCollRadius());
break;
default:
@ -840,8 +849,9 @@ void PlayCamera::setCollisionCameraTargetPhi(int flag)
return;
}
// if we're in behind cam and our vertical angle has settled, activate collision cam
if (absVal(mCurrVerticalAngle - mGoalVerticalAngle) < 0.1f) {
_249 = 1;
mIsCollisionCamActive = true;
}
/*
stwu r1, -0x10(r1)

View File

@ -344,7 +344,7 @@ void Obj::flickAttackBomb()
downSmokeEffect.create(&argLand);
}
rumbleMgr->startRumble(11, effectPos, 2);
rumbleMgr->startRumble(RUMBLETYPE_Fixed11, effectPos, RUMBLEID_Both);
}
/**

View File

@ -62,11 +62,11 @@ void ObjectSpecialActor::update()
} else if (mCommands[i] <= 200) {
switch (mCommands[i]) {
case 101:
cameraMgr->startDemoCamera(2, 0);
cameraMgr->startDemoCamera(CAMNAVI_Both, CAMDEMO_NearLow);
break;
case 102:
cameraMgr->finishDemoCamera(2);
cameraMgr->finishDemoCamera(CAMNAVI_Both);
break;
}

View File

@ -51,7 +51,7 @@ MoviePlayer::MoviePlayer()
mNaviID = 0;
mCameraName = nullptr;
mStreamID = 0;
mDemoState = 0;
mDemoState = DEMOSTATE_Inactive;
mObjectSystem = nullptr;
mDemoPSM = nullptr;
mTextControl = nullptr;
@ -162,7 +162,7 @@ u8 MoviePlayer::play(MovieConfig* config, MoviePlayArg& arg, bool flag)
}
mAltNavi = mTargetNavi;
mAltCamera = mActingCamera;
cameraMgr->controllerLock(2);
cameraMgr->controllerLock(CAMNAVI_Both);
config->dump();
mCurrentConfig = config;
mNaviID = arg.mNaviID;
@ -198,7 +198,7 @@ u8 MoviePlayer::play(MovieConfig* config, MoviePlayArg& arg, bool flag)
resetFlag(MVP_IsFinished);
setFlag(MVP_IsActive);
resetFlag(MVP_Unk32);
resetFlag(MVP_DoSkip);
mDelegate1 = arg.mDelegateEnd;
mDelegate2 = arg.mDelegateStart;
mCameraName = arg.mPelletName;
@ -214,10 +214,10 @@ u8 MoviePlayer::play(MovieConfig* config, MoviePlayArg& arg, bool flag)
gameSystem->startFadeout(0.5f);
mFadeTimer = 0.5f;
}
mDemoState = 1;
mDemoState = DEMOSTATE_Fadeout;
} else {
sys->dvdLoadUseCallBack(&mThreadCommand, mDelegate3);
mDemoState = 2;
mDemoState = DEMOSTATE_Loading;
mFadeTimer = 0.0f;
}
return MOVIEPLAY_SUCCESS;
@ -501,9 +501,10 @@ bool MoviePlayer::parse(bool flag)
bool MoviePlayer::update(Controller* input1, Controller* input2)
{
switch (mDemoState) {
case 0:
case DEMOSTATE_Inactive:
return false;
case 1:
case DEMOSTATE_Fadeout:
if (mFadeTimer > 0.0f) {
mFadeTimer -= sys->mDeltaTime;
if (mFadeTimer <= 0.0f) {
@ -511,11 +512,12 @@ bool MoviePlayer::update(Controller* input1, Controller* input2)
}
} else {
sys->dvdLoadUseCallBack(&mThreadCommand, mDelegate3);
mDemoState = 2;
mDemoState = DEMOSTATE_Loading;
gameSystem->startFadeblack();
}
return true;
case 2:
case DEMOSTATE_Loading:
if (mFadeTimer > 0.0f) {
mFadeTimer -= sys->mDeltaTime;
}
@ -535,27 +537,31 @@ bool MoviePlayer::update(Controller* input1, Controller* input2)
}
start(nullptr);
setPauseAndDraw(mCurrentConfig);
mDemoState = 5;
mDemoState = DEMOSTATE_Playing;
u16 flag = mCurrentConfig->mDrawType;
if (flag & 4 || flag & 2) {
gameSystem->startFadein(0.5f);
} else {
gameSystem->startFadewhite();
}
mDemoState = 3;
mDemoState = DEMOSTATE_LoadComplete;
return true;
}
return true;
case 3:
mDemoState = 4;
case DEMOSTATE_LoadComplete:
mDemoState = DEMOSTATE_Starting;
break;
case 4:
mDemoState = 5;
case DEMOSTATE_Starting:
mDemoState = DEMOSTATE_Playing;
break;
case 5:
case DEMOSTATE_Playing:
gameSystem->paused();
break;
case 6:
case DEMOSTATE_Finishing:
if (mObjectSystem) {
mObjectSystem->entry();
}
@ -614,19 +620,19 @@ bool MoviePlayer::update(Controller* input1, Controller* input2)
}
return false;
}
if (mDemoState == 2 || mDemoState == 1) {
if (mDemoState == DEMOSTATE_Loading || mDemoState == DEMOSTATE_Fadeout) {
PSMCancelToPauseOffMainBgm();
}
} else if (mFadeTimer <= 0.0f) {
mDemoState = 0;
mDemoState = DEMOSTATE_Inactive;
}
return true;
}
if (isFlag(MVP_IsActive)) {
if ((input1->getButton() & 0xf70) || (input2 && (input2->getButton() & 0xf70))) {
mFlags.typeView |= 0x80000000;
if ((input1->getButton() & Controller::PRESS_ABXYLRZ) || (input2 && (input2->getButton() & Controller::PRESS_ABXYLRZ))) {
setFlag(MVP_DoSkip);
}
if ((int)mStudioControl->mSuspend <= 0) {
@ -648,8 +654,8 @@ bool MoviePlayer::update(Controller* input1, Controller* input2)
}
}
if (!mStudioControl->forward(1)) {
if (mDemoState != 6) {
mDemoState = 6;
if (mDemoState != DEMOSTATE_Finishing) {
mDemoState = DEMOSTATE_Finishing;
mFadeTimer = 2.0f;
mCanFinish = false;
gameSystem->setPause(true, nullptr, 3);
@ -665,8 +671,9 @@ bool MoviePlayer::update(Controller* input1, Controller* input2)
mTextControl->update(input1, input2);
}
}
if (mDemoState == 5 && mFlags.isSet(0x80000000) && !mStudioControl->mSuspend) {
if ((input1->getButtonDown() & 0xf70) || (input2 && (input2->getButton() & 0xf70)) && mCurrentConfig->isSkippable()) {
if (mDemoState == DEMOSTATE_Playing && mFlags.isSet(MVP_DoSkip) && !mStudioControl->mSuspend) {
if ((input1->getButtonDown() & Controller::PRESS_ABXYLRZ)
|| (input2 && (input2->getButton() & Controller::PRESS_ABXYLRZ)) && mCurrentConfig->isSkippable()) {
skip();
} else if ((input1->getButtonDown() & Controller::PRESS_START)
|| (input2 && (input2->getButtonDown() & Controller::PRESS_START)) && !mCurrentConfig->isNeverSkippable()) {
@ -716,7 +723,7 @@ bool MoviePlayer::stop()
if (isFlag(MVP_IsActive)) {
clearPauseAndDraw();
resetFlag(MVP_IsActive);
resetFlag(MVP_Unk32);
resetFlag(MVP_DoSkip);
if (mObjectSystem) {
mObjectSystem->stop();
mObjectSystem->destroyObjectAll();
@ -1156,7 +1163,7 @@ void MoviePlayer::drawLoading(Graphics& gfx)
void MoviePlayer::skip()
{
setFlag(MVP_IsFinished);
mDemoState = 6;
mDemoState = DEMOSTATE_Finishing;
mFadeTimer = 2.0f;
mCanFinish = false;
gameSystem->startFadeout(1.0f);

View File

@ -978,8 +978,8 @@ f32 ActorDirector_Scaled::getNearestDistance()
bool is1P = PSSystem::SingletonBase<PSM::ObjCalcBase>::getInstance()->is1PGame();
f32 minDist = 100000.0f;
if (!is1P) {
Game::Navi* olimar = Game::naviMgr->getAt(NAVIID_Captain1);
Game::Navi* louie = Game::naviMgr->getAt(NAVIID_Captain2);
Game::Navi* olimar = Game::naviMgr->getAt(NAVIID_Olimar);
Game::Navi* louie = Game::naviMgr->getAt(NAVIID_Louie);
P2ASSERTBOOLLINE(394, olimar && louie);
Vector3f oPos = olimar->getPosition();