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/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/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/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/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/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/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> | 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/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/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/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/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/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> | 62915 | | <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/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/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/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> | 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/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> | 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/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> | 180513 | | <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> ### <section id="plugProjectKonoU">plugProjectKonoU</section>
| File | Size (bytes) | File | Size (bytes) | | 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/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/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/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/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> | 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/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> | 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/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/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/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 | | | | <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/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/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/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/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 | | <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/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/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/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/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/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/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/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> | 27154 | | <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/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/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/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/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/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/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/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/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/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/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/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> | 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/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> | 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/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> | 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/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/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 | | | | <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/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/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/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/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/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 | | <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_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_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_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 | | | | <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(); f32 getFar();
Vector3f getLookAtPosition(); Vector3f getLookAtPosition();
f32 getNear(); f32 getNear();
void setFixNearFar(bool, f32, f32); void setFixNearFar(bool isFixed, f32 nearZ, f32 farZ);
void setProjection(); void setProjection();
void update(); void update();
// void updatePlanes();
void updateSoundCamera(f32); void updateSoundCamera(f32);
inline bool isRunning() { return (mJstObject && mJstObject->isRunning()); } inline bool isRunning() { return (mJstObject && mJstObject->isRunning()); }

View File

@ -11,11 +11,106 @@
struct Viewport; struct Viewport;
namespace Game { namespace Game {
struct CameraArg;
struct Navi; 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 { struct CameraArg {
u32 state; u32 mState; // _00
}; };
struct CameraData { struct CameraData {
@ -247,7 +342,7 @@ struct PlayCamera : public LookAtCamera {
void setCameraAngle(f32 angle); void setCameraAngle(f32 angle);
void getCameraData(CameraData& data); void getCameraData(CameraData& data);
void setCameraData(CameraData& data); void setCameraData(CameraData& data);
void changePlayerMode(bool updateDir); void changePlayerMode(bool doCenterCameraBehind);
void noUpdate(); void noUpdate();
bool isVibration(); bool isVibration();
void startVibration(int type, f32 strength); void startVibration(int type, f32 strength);
@ -262,12 +357,12 @@ struct PlayCamera : public LookAtCamera {
void setSmoothThetaSpeed(); void setSmoothThetaSpeed();
void changeTargetTheta(); void changeTargetTheta();
void changeTargetAtPosition(); void changeTargetAtPosition();
void updateParms(int flag); void updateParms(int flags);
void updateVibration(int id); void updateVibration(int id);
void otherVibFinished(int id); void otherVibFinished(int id);
bool isModCameraFinished(); bool isModCameraFinished();
void setCollisionCameraTargetPhi(int); void setCollisionCameraTargetPhi(int flags);
f32 getCollisionCameraTargetPhi(f32, f32); f32 getCollisionCameraTargetPhi(f32 angle, f32 dist);
// _00 = VTBL // _00 = VTBL
// _00-_198 = LookAtCamera // _00-_198 = LookAtCamera
@ -292,15 +387,15 @@ struct PlayCamera : public LookAtCamera {
f32 mHoldRTimer; // _1E0 f32 mHoldRTimer; // _1E0
Vector3f mGoalPosition; // _1E4 Vector3f mGoalPosition; // _1E4
bool mVibrateEnabled[3]; // _1F0 bool mVibrateEnabled[3]; // _1F0
f32 mVibrateSpeedParm[3]; // _1F4, vibration azimuth short speed? f32 mVibrateSpeed[3]; // _1F4
f32 mVibrateRollAngle[3]; // _200 f32 mVibrateRollAngle[3]; // _200
f32 mVibrateAngle[3]; // _20C f32 mVibrateAngle[3]; // _20C
f32 mVibrateTimer[3]; // _218 f32 mVibrateTimer[3]; // _218
f32 mVibrateTimeParm[3]; // _224, vibration azimuth short time? f32 mVibrateDuration[3]; // _224
f32 mVibrateScaleParm[3]; // _230 f32 mVibrateScale[3]; // _230
f32 mVibrateAzimuthParm[3]; // _23C, vibration azimuth short vib? f32 mVibrateStrength[3]; // _23C
u8 mCanInput; // _248 bool mCanInput; // _248
u8 _249; // _249 bool mIsCollisionCamActive; // _249
CameraParms* mCameraParms; // _24C CameraParms* mCameraParms; // _24C
VibrationParms* mVibrationParms; // _250 VibrationParms* mVibrationParms; // _250
}; };
@ -311,8 +406,7 @@ struct PlayCamera : public LookAtCamera {
struct CameraMgr : public CNode { struct CameraMgr : public CNode {
CameraMgr(); CameraMgr();
virtual ~CameraMgr() {}; // _08 virtual ~CameraMgr() { } // _08
// virtual void _10() = 0; // _10
void loadResource(); void loadResource();
void setViewport(Viewport* vp, int id); void setViewport(Viewport* vp, int id);
@ -325,11 +419,11 @@ struct CameraMgr : public CNode {
void controllerUnLock(int camID); void controllerUnLock(int camID);
void startDemoCamera(int camID, int type); void startDemoCamera(int camID, int type);
void finishDemoCamera(int camID); void finishDemoCamera(int camID);
void changePlayerMode(int state, IDelegate1<CameraArg*>* delegate); void changePlayerMode(int naviID, IDelegate1<CameraArg*>* delegate);
bool isChangePlayer(); bool isChangePlayer();
void setZukanCamera(LookAtCamera* cam); void setZukanCamera(LookAtCamera* cam);
bool isCameraUpdateOn(); bool isCameraUpdateOn();
bool isStartAndEnd(int* data, int type); bool isStartAndEnd(int* data, int camID);
bool isVibrationStart(int type, int camID); bool isVibrationStart(int type, int camID);
void readCameraParms(char* path); void readCameraParms(char* path);
void readParameter(Stream& stream); void readParameter(Stream& stream);

View File

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

View File

@ -56,10 +56,20 @@ namespace P2JST {
struct ObjectSystem; 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 { enum MoviePlayerFlags {
MVP_IsActive = 0x1, MVP_IsActive = 0x1,
MVP_IsFinished = 0x2, MVP_IsFinished = 0x2,
MVP_Unk32 = 0x80000000, MVP_DoSkip = 0x80000000,
}; };
enum MoviePlayerDrawFlags { enum MoviePlayerDrawFlags {
@ -256,11 +266,14 @@ struct MoviePlayer : public JKRDisposer {
inline void setFlag(u32 flag) { mFlags.typeView |= flag; } inline void setFlag(u32 flag) { mFlags.typeView |= flag; }
inline void resetFlag(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 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 = VTBL
// _00-_18 = JKRDisposer // _00-_18 = JKRDisposer
int mDemoState; // _18 int mDemoState; // _18, see MovieDemoState enum
DvdThreadCommand mThreadCommand; // _1C DvdThreadCommand mThreadCommand; // _1C
u8 mIsPaused; // _88 u8 mIsPaused; // _88
Vector3f mCameraPosition; // _8C Vector3f mCameraPosition; // _8C

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,29 @@ struct Controller;
namespace Game { namespace Game {
struct Navi; 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 { enum RumbleID {
RUMBLEID_Navi0 = 0, RUMBLEID_Navi0 = 0,
RUMBLEID_Navi1 = 1, RUMBLEID_Navi1 = 1,

View File

@ -67,7 +67,9 @@ struct JUTGamePad : public JKRDisposer {
PRESS_LEFT = (PRESS_DPAD_LEFT | ANALOG_LEFT), PRESS_LEFT = (PRESS_DPAD_LEFT | ANALOG_LEFT),
PRESS_RIGHT = (PRESS_DPAD_RIGHT | ANALOG_RIGHT), PRESS_RIGHT = (PRESS_DPAD_RIGHT | ANALOG_RIGHT),
PRESS_DOWN = (PRESS_DPAD_DOWN | ANALOG_DOWN), 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 { struct CButton {

View File

@ -29,8 +29,8 @@ struct DataNavi {
f32 mNaviLifeRatio; // _00 f32 mNaviLifeRatio; // _00
u32 mFollowPikis; // _04 u32 mFollowPikis; // _04
u32 mNextThrowPiki; // _08 u32 mNextThrowPiki; // _08
u32 mDope1Count; // _0C u32 mDope1Count; // _0C, bitter sprays
u32 mDope0Count; // _10 u32 mDope0Count; // _10, spicy sprays
u8 mActiveNaviID; // _14 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) // Assuming the Navi touched us, rumble and call to squad (eventually)
Game::rumbleMgr->startRumble(2, navi->mNaviIndex); Game::rumbleMgr->startRumble(Game::RUMBLETYPE_Nudge, navi->mNaviIndex);
Game::InteractFue fue(event.mCollidingCreature, 0, 1); Game::InteractFue fue(event.mCollidingCreature, false, true); // don't combine parties, is new to party
p->stimulate(fue); p->stimulate(fue);
} }

View File

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

View File

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

View File

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

View File

@ -248,11 +248,11 @@ bool InteractFue::actNavi(Game::Navi* navi)
} }
if (navi->getStateID() != NSID_Follow) { if (navi->getStateID() != NSID_Follow) {
NaviFollowArg followArg(_09); NaviFollowArg followArg(mIsNewToParty);
navi->transit(NSID_Follow, &followArg); navi->transit(NSID_Follow, &followArg);
Navi* otherNavi = naviMgr->getAt(1 - navi->mNaviIndex); 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); 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); piki->mFsm->transit(piki, PIKISTATE_Holein, &holeInArg);
return false; 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); piki->setZikatu(false);
GameStat::zikatuPikis.dec(piki->getKind()); GameStat::zikatuPikis.dec(piki->getKind());
if (!playData->isDemoFlag(DEMO_Meet_Red_Pikmin) && (piki->getKind() == Red)) { 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 (!currState->dead() && callable) {
if (actionID != PikiAI::ACT_Formation || (actionID == PikiAI::ACT_Formation && currState->mId == PIKISTATE_Emotion) if (actionID != PikiAI::ACT_Formation || (actionID == PikiAI::ACT_Formation && currState->mId == PIKISTATE_Emotion)
|| (_08 && piki->mNavi != mCreature && actionID == 0)) { || (mDoCombineParties && piki->mNavi != mCreature && actionID == PikiAI::ACT_Formation)) {
Navi* vsNavi = (Navi*)mCreature; Navi* whistlingNavi = (Navi*)mCreature;
if (gameSystem->isVersusMode()) { if (gameSystem->isVersusMode()) {
int pikiColor = piki->getKind(); int pikiColor = piki->getKind();
if ((pikiColor == Red && vsNavi->mNaviIndex == NAVIID_Louie) if ((pikiColor == Red && whistlingNavi->mNaviIndex == NAVIID_Louie)
|| (pikiColor == Blue && vsNavi->mNaviIndex == NAVIID_Olimar)) { || (pikiColor == Blue && whistlingNavi->mNaviIndex == NAVIID_Olimar)) {
return false; return false;
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -272,7 +272,7 @@ void Piki::update()
int stateID = getStateID(); int stateID = getStateID();
int pikiType = getKind(); int pikiType = getKind();
if (stateID != PIKISTATE_WaterHanged && stateID != PIKISTATE_Drown && !mCurrentState->dead() && pikiType != Blue 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); mFsm->transit(this, PIKISTATE_Drown, nullptr);
mEffectsObj->mHeight = mWaterBox->getSeaHeightPtr(); mEffectsObj->mHeight = mWaterBox->getSeaHeightPtr();
} }
@ -477,7 +477,7 @@ void Piki::inWaterCallback(WaterBox* wbox)
int pikiType = getKind(); int pikiType = getKind();
if (stateID != PIKISTATE_WaterHanged && stateID != PIKISTATE_Drown && !mCurrentState->dead() && pikiType != Blue if (stateID != PIKISTATE_WaterHanged && stateID != PIKISTATE_Drown && !mCurrentState->dead() && pikiType != Blue
&& pikiType != Bulbmin) { && 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); mFsm->transit(this, PIKISTATE_Drown, nullptr);
} else { } else {
return; return;

View File

@ -32,7 +32,7 @@ u8 Piki::sGraspSituationOptimise = 1;
*/ */
int Piki::graspSituation_Fast(Game::Creature** outTarget) int Piki::graspSituation_Fast(Game::Creature** outTarget)
{ {
if (moviePlayer && moviePlayer->mDemoState != 0) { if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
*outTarget = nullptr; *outTarget = nullptr;
if (!isZikatu() || playData->isDemoFlag(DEMO_Reunite_Captains)) { if (!isZikatu() || playData->isDemoFlag(DEMO_Reunite_Captains)) {
return PikiAI::ACT_NULL; return PikiAI::ACT_NULL;
@ -282,7 +282,7 @@ int Piki::graspSituation_Fast(Game::Creature** outTarget)
*/ */
int Piki::graspSituation(Game::Creature** outTarget) int Piki::graspSituation(Game::Creature** outTarget)
{ {
if (moviePlayer && moviePlayer->mDemoState != 0) { if (moviePlayer && moviePlayer->mDemoState != DEMOSTATE_Inactive) {
*outTarget = nullptr; *outTarget = nullptr;
return PikiAI::ACT_NULL; 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); PSSystem::spSysIF->playSystemSe(PSSE_SY_PK_UNDER_DOPING, 0);
} }
sys->mTimers->_stop("doaPIKI"); sys->mTimers->_stop("doaPIKI");

View File

@ -1319,7 +1319,7 @@ void PikiNukareState::onKeyEvent(Piki* piki, SysShape::KeyEvent const& keyEvent)
{ {
switch (keyEvent.mType) { switch (keyEvent.mType) {
case KEYEVENT_2: case KEYEVENT_2:
rumbleMgr->startRumble(0, (int)mNavi->mNaviIndex); rumbleMgr->startRumble(RUMBLETYPE_PluckPiki, (int)mNavi->mNaviIndex);
Vector3f position = piki->getPosition(); Vector3f position = piki->getPosition();
piki->setFPFlag(FPFLAGS_Unk5); piki->setFPFlag(FPFLAGS_Unk5);
@ -2859,8 +2859,8 @@ void PikiHipDropState::collisionCallback(Piki* piki, CollEvent& collEvent)
if (!collEvent.mCollidingCreature->isPiki()) { if (!collEvent.mCollidingCreature->isPiki()) {
Vector3f position = piki->getPosition(); Vector3f position = piki->getPosition();
efx::createSimpleBlackDrop(position); efx::createSimpleBlackDrop(position);
rumbleMgr->startRumble(11, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
cameraMgr->startVibration(6, position, 2); cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
if (!collEvent.mCollidingCreature->isTeki()) { if (!collEvent.mCollidingCreature->isTeki()) {
piki->startSound(PSSE_PK_SE_DOSUN, false); piki->startSound(PSSE_PK_SE_DOSUN, false);
@ -3113,8 +3113,8 @@ void PikiHipDropState::dosin(Piki* piki)
{ {
Vector3f position = piki->getPosition(); Vector3f position = piki->getPosition();
efx::createSimpleBlackDrop(position); efx::createSimpleBlackDrop(position);
rumbleMgr->startRumble(11, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, position, RUMBLEID_Both);
cameraMgr->startVibration(6, position, 2); cameraMgr->startVibration(VIBTYPE_LightFastShort, position, CAMNAVI_Both);
piki->startSound(PSSE_PK_SE_DOSUN, false); piki->startSound(PSSE_PK_SE_DOSUN, false);
_14 = 2; _14 = 2;
_10 = 0.3f; _10 = 0.3f;
@ -3199,9 +3199,9 @@ bool PikiFallMeckState::becomePikihead(Piki* piki)
if (GameStat::mePikis >= 99) { if (GameStat::mePikis >= 99) {
return false; return false;
} else { } else {
PikiMgr::mBirthMode = 1; PikiMgr::mBirthMode = PikiMgr::PSM_Force;
ItemPikihead::Item* sprout = static_cast<ItemPikihead::Item*>(ItemPikihead::mgr->birth()); ItemPikihead::Item* sprout = static_cast<ItemPikihead::Item*>(ItemPikihead::mgr->birth());
PikiMgr::mBirthMode = 0; PikiMgr::mBirthMode = PikiMgr::PSM_Normal;
Vector3f pikiPos = piki->getPosition(); Vector3f pikiPos = piki->getPosition();
pikiPos.y = mapMgr->getMinY(pikiPos); 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* olimar = naviMgr->getAt(NAVIID_Olimar);
Navi* louie = naviMgr->getAt(NAVIID_Louie); Navi* louie = naviMgr->getAt(NAVIID_Louie);
if (olimar->isAlive() && louie->isAlive()) { 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); louie->stimulate(act);
} }
@ -163,14 +163,14 @@ void CaveState::exec(SingleGameSection* game)
// check pikmin extinction cutscene // check pikmin extinction cutscene
if (!(moviePlayer->isFlag(MVP_IsActive))) { if (!(moviePlayer->isFlag(MVP_IsActive))) {
if (GameStat::getMapPikmins(-1) == 0) { if (GameStat::getMapPikmins(AllPikminCalcs) == 0) {
gameSystem->resetFlag(GAMESYS_IsGameWorldActive); gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
MoviePlayArg moviearg("s05_pikminzero", nullptr, game->mMovieFinishCallback, 0); MoviePlayArg moviearg("s05_pikminzero", nullptr, game->mMovieFinishCallback, 0);
Navi* navi = naviMgr->getActiveNavi(); Navi* navi = naviMgr->getActiveNavi();
if (!navi) { if (!navi) {
int id = 1; int id = NAVIID_Louie;
if (gameSystem->mSection->mPrevNaviIdx == 0) { if (gameSystem->mSection->mPrevNaviIdx == NAVIID_Olimar) {
id = 0; id = NAVIID_Olimar;
} }
navi = naviMgr->getAt(id); navi = naviMgr->getAt(id);
} }
@ -186,7 +186,7 @@ void CaveState::exec(SingleGameSection* game)
check_SMenu(game); check_SMenu(game);
// check muting parts of music when lots of pikmin die (does this actually happen in caves?) // check muting parts of music when lots of pikmin die (does this actually happen in caves?)
PSM::PikminNumberDirector* psm = PSMGetPikminNumD(); 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) { if (psm) {
psm->directOn(); psm->directOn();
} }
@ -234,7 +234,7 @@ void CaveState::check_SMenu(SingleGameSection* game)
case 4: case 4:
gameSystem->resetFlag(GAMESYS_IsGameWorldActive); gameSystem->resetFlag(GAMESYS_IsGameWorldActive);
gameSystem->setMoviePause(false, "sm-giveup"); gameSystem->setMoviePause(false, "sm-giveup");
if (moviePlayer->mDemoState != 0) if (moviePlayer->mDemoState != DEMOSTATE_Inactive)
return; return;
MoviePlayArg arg("s12_cv_giveup", nullptr, game->mMovieFinishCallback, 0); MoviePlayArg arg("s12_cv_giveup", nullptr, game->mMovieFinishCallback, 0);
arg.mDelegateStart = game->mMovieStartCallback; arg.mDelegateStart = game->mMovieStartCallback;
@ -263,7 +263,7 @@ void CaveState::check_SMenu(SingleGameSection* game)
return; return;
case -1: case -1:
// Conditions to open pause menu // 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) { && game->mControllerP1->mButton.mButtonDown & Controller::PRESS_START) {
og::Screen::DispMemberSMenuAll disp; og::Screen::DispMemberSMenuAll disp;
game->setDispMemberSMenu(disp); game->setDispMemberSMenu(disp);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -140,7 +140,7 @@ void StateAppear::exec(EnemyBase* enemy)
enemy->startMotion(); enemy->startMotion();
Vector3f pos = enemy->getPosition(); 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); FakePiki* target = OBJ(enemy)->getNearestPikiOrNavi(360.0f, terrRad);
enemy->mTargetCreature = target; enemy->mTargetCreature = target;
@ -269,8 +269,8 @@ void StateDead::exec(EnemyBase* enemy)
if (enemy->mCurAnim->mType == KEYEVENT_2) { if (enemy->mCurAnim->mType == KEYEVENT_2) {
OBJ(enemy)->boundEffect(); OBJ(enemy)->boundEffect();
Vector3f pos = enemy->getPosition(); Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(0, pos, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(8, pos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
} }
if (enemy->mCurAnim->mType == KEYEVENT_END) { if (enemy->mCurAnim->mType == KEYEVENT_END) {
@ -586,8 +586,8 @@ void StateFlick::init(EnemyBase* enemy, StateArg* stateArg)
} }
Vector3f pos = enemy->getPosition(); Vector3f pos = enemy->getPosition();
cameraMgr->startVibration(0, pos, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(8, pos, RUMBLEID_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; *p1 *= 0.7f;
if (*p1 < 0.1f) { if (*p1 < 0.1f) {
if (*p1 != 0.0f) { if (*p1 != 0.0f) {
cameraMgr->startVibration(6, *pos, 2); cameraMgr->startVibration(VIBTYPE_LightFastShort, *pos, CAMNAVI_Both);
rumbleMgr->startRumble(11, *pos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, *pos, RUMBLEID_Both);
} }
*p1 = 0.0f; *p1 = 0.0f;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -53,7 +53,7 @@ void StateDead::exec(EnemyBase* enemy)
u32 animType = armor->mCurAnim->mType; u32 animType = armor->mCurAnim->mType;
if (animType == KEYEVENT_2) { if (animType == KEYEVENT_2) {
Vector3f armorPos = armor->getPosition(); Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(9, armorPos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed9, armorPos, RUMBLEID_Both);
} else if (animType == KEYEVENT_END) { } else if (animType == KEYEVENT_END) {
armor->kill(nullptr); armor->kill(nullptr);
} }
@ -125,7 +125,7 @@ void StateAppear::init(EnemyBase* enemy, StateArg* stateArg)
armor->createAppearEffect(); armor->createAppearEffect();
Vector3f pos = armor->getPosition(); 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; u32 animType = armor->mCurAnim->mType;
if (animType == KEYEVENT_2) { if (animType == KEYEVENT_2) {
Vector3f armorPos = armor->getPosition(); Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(9, armorPos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed9, armorPos, RUMBLEID_Both);
} else if (animType == KEYEVENT_END) { } else if (animType == KEYEVENT_END) {
if (armor->mHealth <= 0.0f) { if (armor->mHealth <= 0.0f) {
transit(armor, ARMOR_Dead, nullptr); transit(armor, ARMOR_Dead, nullptr);
@ -181,7 +181,7 @@ void StateDive::exec(EnemyBase* enemy)
u32 animType = armor->mCurAnim->mType; u32 animType = armor->mCurAnim->mType;
if (animType == KEYEVENT_2) { if (animType == KEYEVENT_2) {
Vector3f armorPos = armor->getPosition(); Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(10, armorPos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed10, armorPos, RUMBLEID_Both);
} else if (animType == KEYEVENT_END) { } else if (animType == KEYEVENT_END) {
transit(armor, ARMOR_Stay, nullptr); transit(armor, ARMOR_Stay, nullptr);
} }
@ -935,7 +935,7 @@ void StateAttack2::exec(EnemyBase* enemy)
EnemyFunc::attackNavi(armor, attackRadius, attackAngle, attackDamage, nullptr, nullptr); EnemyFunc::attackNavi(armor, attackRadius, attackAngle, attackDamage, nullptr, nullptr);
Vector3f armorPos = armor->getPosition(); Vector3f armorPos = armor->getPosition();
rumbleMgr->startRumble(9, armorPos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed9, armorPos, RUMBLEID_Both);
} else if (armor->mCurAnim->mType == KEYEVENT_END) { } else if (armor->mCurAnim->mType == KEYEVENT_END) {
if (armor->mHealth <= 0.0f) { 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]); PSStartSoundVec(PSSE_EN_BIGFOOT_WALK, (Vec*)&mJointPositions[footIdx][3]);
cameraMgr->startVibration(6, effectPos, 2); cameraMgr->startVibration(VIBTYPE_LightFastShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(14, effectPos, RUMBLEID_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); bigfoot->startMotion(BIGFOOTANIM_Dead, nullptr);
Vector3f position = bigfoot->getPosition(); Vector3f position = bigfoot->getPosition();
cameraMgr->startVibration(0, position, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(10, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed10, position, RUMBLEID_Both);
} }
/** /**
@ -160,8 +160,8 @@ void StateLand::exec(EnemyBase* enemy)
} }
Vector3f position = bigfoot->getPosition(); Vector3f position = bigfoot->getPosition();
cameraMgr->startVibration(15, position, 2); cameraMgr->startVibration(VIBTYPE_MidFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(15, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
} else if ((u32)bigfoot->mCurAnim->mType == KEYEVENT_END) { } else if ((u32)bigfoot->mCurAnim->mType == KEYEVENT_END) {
if (bigfoot->mHealth <= 0.0f) { 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]); PSStartSoundVec(PSSE_EN_BIGTAKARA_WALK, (Vec*)&mJointPositions[footIdx][3]);
cameraMgr->startVibration(6, effectPos, 2); cameraMgr->startVibration(VIBTYPE_LightFastShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(14, effectPos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed14, effectPos, RUMBLEID_Both);
} }
/** /**

View File

@ -98,8 +98,8 @@ void StateDead::exec(EnemyBase* enemy)
titan->finishDeadBubbleLegEffect(2); titan->finishDeadBubbleLegEffect(2);
titan->finishDeadBubbleMouthEffect(); titan->finishDeadBubbleMouthEffect();
Vector3f position = titan->getPosition(); Vector3f position = titan->getPosition();
cameraMgr->startVibration(21, position, 2); cameraMgr->startVibration(VIBTYPE_HardMidShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(12, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed12, position, RUMBLEID_Both);
} else if ((u32)titan->mCurAnim->mType == KEYEVENT_11) { } else if ((u32)titan->mCurAnim->mType == KEYEVENT_11) {
titan->createDeadBombLegEffect(3); titan->createDeadBombLegEffect(3);
@ -244,8 +244,8 @@ void StateLand::exec(EnemyBase* enemy)
} else if ((u32)titan->mCurAnim->mType == KEYEVENT_9) { } else if ((u32)titan->mCurAnim->mType == KEYEVENT_9) {
Vector3f position = titan->getPosition(); Vector3f position = titan->getPosition();
cameraMgr->startVibration(2, position, 2); cameraMgr->startVibration(VIBTYPE_LightSlowLong, position, CAMNAVI_Both);
rumbleMgr->startRumble(5, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_BigTreasureStart, position, RUMBLEID_Both);
Parms* parms = CG_PARMS(titan); Parms* parms = CG_PARMS(titan);
EnemyFunc::flickStickPikmin(titan, parms->mGeneral.mShakeChance.mValue, parms->mGeneral.mShakeKnockback.mValue, EnemyFunc::flickStickPikmin(titan, parms->mGeneral.mShakeChance.mValue, parms->mGeneral.mShakeKnockback.mValue,
parms->mGeneral.mShakeDamage.mValue, -1000.0, nullptr); 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) { } else if (sarai->mCurAnim->mType == KEYEVENT_7) {
Vector3f pos = sarai->getPosition(); Vector3f pos = sarai->getPosition();
cameraMgr->startVibration(0, pos, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(11, pos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
sarai->createDownEffect(0.9f); sarai->createDownEffect(0.9f);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) { } else if (sarai->mCurAnim->mType == KEYEVENT_END) {
@ -104,7 +104,7 @@ void StateDamage::init(EnemyBase* enemy, StateArg* stateArg)
sarai->startMotion(BOMBSARAIANIM_Struggle, nullptr); sarai->startMotion(BOMBSARAIANIM_Struggle, nullptr);
Vector3f pos = sarai->getPosition(); 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); sarai->createDownEffect(0.8f);
Vector3f pos = sarai->getPosition(); Vector3f pos = sarai->getPosition();
rumbleMgr->startRumble(8, pos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed8, pos, RUMBLEID_Both);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) { } else if (sarai->mCurAnim->mType == KEYEVENT_END) {
if (sarai->mHealth <= 0.0f) { if (sarai->mHealth <= 0.0f) {
@ -1207,8 +1207,8 @@ void StateFall::init(EnemyBase* enemy, StateArg* stateArg)
sarai->startMotion(BOMBSARAIANIM_Fall, nullptr); sarai->startMotion(BOMBSARAIANIM_Fall, nullptr);
Vector3f pos = sarai->getPosition(); Vector3f pos = sarai->getPosition();
cameraMgr->startVibration(0, pos, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, pos, CAMNAVI_Both);
rumbleMgr->startRumble(11, pos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
} }
/** /**
@ -1250,7 +1250,7 @@ void StateFall::exec(EnemyBase* enemy)
} else if (sarai->mCurAnim->mType == KEYEVENT_8) { } else if (sarai->mCurAnim->mType == KEYEVENT_8) {
Vector3f pos = sarai->getPosition(); Vector3f pos = sarai->getPosition();
rumbleMgr->startRumble(11, pos, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
sarai->createDownEffect(0.9f); sarai->createDownEffect(0.9f);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) { } else if (sarai->mCurAnim->mType == KEYEVENT_END) {

View File

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

View File

@ -700,8 +700,8 @@ void Obj::createOnGroundEffect(int footIdx, WaterBox* wbox)
} }
PSStartSoundVec(PSSE_EN_SPIDER_WALK, (Vec*)&mJointPositions[footIdx][3]); PSStartSoundVec(PSSE_EN_SPIDER_WALK, (Vec*)&mJointPositions[footIdx][3]);
cameraMgr->startVibration(6, effectPos, 2); cameraMgr->startVibration(VIBTYPE_LightFastShort, effectPos, CAMNAVI_Both);
rumbleMgr->startRumble(14, effectPos, RUMBLEID_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); damagumo->startMotion(DAMAGUMOANIM_Dead, nullptr);
Vector3f position = damagumo->getPosition(); Vector3f position = damagumo->getPosition();
cameraMgr->startVibration(0, position, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(10, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed10, position, RUMBLEID_Both);
} }
/** /**
@ -159,8 +159,8 @@ void StateLand::exec(EnemyBase* enemy)
} }
Vector3f position = damagumo->getPosition(); Vector3f position = damagumo->getPosition();
cameraMgr->startVibration(15, position, 2); cameraMgr->startVibration(VIBTYPE_MidFastShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(15, position, RUMBLEID_Both); rumbleMgr->startRumble(RUMBLETYPE_Fixed15, position, RUMBLEID_Both);
} else if ((u32)damagumo->mCurAnim->mType == KEYEVENT_3) { } else if ((u32)damagumo->mCurAnim->mType == KEYEVENT_3) {
damagumo->createOnGroundEffect(3, damagumo->mWaterBox); damagumo->createOnGroundEffect(3, damagumo->mWaterBox);

View File

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

View File

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

View File

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

View File

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

View File

@ -42,7 +42,7 @@ void StateDead::init(EnemyBase* enemy, StateArg* stateArg)
houdai->finishSteamEffect(); houdai->finishSteamEffect();
Vector3f position = houdai->getPosition(); 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(); houdai->createDeadBombEffect();
Vector3f position = houdai->getPosition(); Vector3f position = houdai->getPosition();
cameraMgr->startVibration(21, position, 2); cameraMgr->startVibration(VIBTYPE_HardMidShort, position, CAMNAVI_Both);
houdai->kill(nullptr); houdai->kill(nullptr);
} }
} }
@ -136,8 +136,8 @@ void StateLand::init(EnemyBase* enemy, StateArg* stateArg)
shadowMgr->addJointShadow(houdai); shadowMgr->addJointShadow(houdai);
Vector3f position = houdai->getPosition(); Vector3f position = houdai->getPosition();
cameraMgr->startVibration(0, position, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(6, position, 2); rumbleMgr->startRumble(RUMBLETYPE_HoudaiStart, position, RUMBLEID_Both);
} }
/** /**
@ -165,8 +165,8 @@ void StateLand::exec(EnemyBase* enemy)
shadowMgr->addJointShadow(houdai); shadowMgr->addJointShadow(houdai);
Vector3f position = houdai->getPosition(); Vector3f position = houdai->getPosition();
cameraMgr->startVibration(0, position, 2); cameraMgr->startVibration(VIBTYPE_LightSlowShort, position, CAMNAVI_Both);
rumbleMgr->startRumble(6, position, 2); 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); Vector3f vec(mtx->mMatrix.structView.tx, mtx->mMatrix.structView.ty, mtx->mMatrix.structView.tz);
vec.y = mPosition.y; vec.y = mPosition.y;
rumbleMgr->startRumble(11, vec, 2); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, vec, RUMBLEID_Both);
createBounceEffect(vec, 0.75f); createBounceEffect(vec, 0.75f);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -196,8 +196,8 @@ void StateFall::cleanup(EnemyBase* enemy)
rock->finishFallEffect(); rock->finishFallEffect();
Vector3f position = rock->getPosition(); Vector3f position = rock->getPosition();
cameraMgr->startVibration(27, position, 2); cameraMgr->startVibration(VIBTYPE_Crash, position, CAMNAVI_Both);
rumbleMgr->startRumble(14, position, 2); rumbleMgr->startRumble(RUMBLETYPE_Fixed14, position, RUMBLEID_Both);
} }
/** /**
@ -248,7 +248,7 @@ void StateMove::cleanup(EnemyBase* enemy)
rock->finishRollingWaterEffect(); rock->finishRollingWaterEffect();
Vector3f position = rock->getPosition(); 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->mIsPlaying) {
if (sarai->mCurAnim->mType == KEYEVENT_2) { if (sarai->mCurAnim->mType == KEYEVENT_2) {
sarai->createDownEffect(); sarai->createDownEffect();
rumbleMgr->startRumble(11, pos, 2); rumbleMgr->startRumble(RUMBLETYPE_Fixed11, pos, RUMBLEID_Both);
} else if (sarai->mCurAnim->mType == KEYEVENT_END) { } else if (sarai->mCurAnim->mType == KEYEVENT_END) {
if (sarai->mHealth <= 0.0f) { if (sarai->mHealth <= 0.0f) {
transit(sarai, SARAI_Dead, nullptr); transit(sarai, SARAI_Dead, nullptr);

View File

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

View File

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

View File

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

View File

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

View File

@ -344,7 +344,7 @@ void Obj::flickAttackBomb()
downSmokeEffect.create(&argLand); 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) { } else if (mCommands[i] <= 200) {
switch (mCommands[i]) { switch (mCommands[i]) {
case 101: case 101:
cameraMgr->startDemoCamera(2, 0); cameraMgr->startDemoCamera(CAMNAVI_Both, CAMDEMO_NearLow);
break; break;
case 102: case 102:
cameraMgr->finishDemoCamera(2); cameraMgr->finishDemoCamera(CAMNAVI_Both);
break; break;
} }

View File

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

View File

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