diff --git a/Source/ObjectEngine/NPC/NPC_Utility.s b/Source/ObjectEngine/NPC/NPC_Utility.s index 9b7871e..4d83189 100644 --- a/Source/ObjectEngine/NPC/NPC_Utility.s +++ b/Source/ObjectEngine/NPC/NPC_Utility.s @@ -139,7 +139,6 @@ mr r4, r30 bl isJMapEntryProgressComplete b .BranchFunc_Return - .BranchFunc_Case_8: .BranchFunc_Case_9: @@ -1178,6 +1177,7 @@ b .Penguin_RegisterGlobals_Return .GLE ADDRESS .MINI_COMET_CONNECTOR + #====== PenguinCoach ====== .GLE ADDRESS init__12PenguinCoachFRC12JMapInfoIter +0x18C #Can't reuse the Bob-omb Buddy 'cause different registers diff --git a/Source/ObjectEngine/RestartArea.s b/Source/ObjectEngine/RestartArea.s index 6cbafb3..a12c409 100644 --- a/Source/ObjectEngine/RestartArea.s +++ b/Source/ObjectEngine/RestartArea.s @@ -107,6 +107,11 @@ lbz r3, 0x1C(r31) cmpwi r3, 0 beq .RestartArea_Movement_Return +#WHY DOES THIS NEED TO BE HERE???? +bl isScenarioSelecting__2MRFv +cmpwi r3, 0 +bne .RestartArea_Movement_Return + bl getPlayerPos__2MRFv mr r4, r3 mr r3, r31 diff --git a/Source/ObjectEngine/SceneChangeArea.s b/Source/ObjectEngine/SceneChangeArea.s index 4c3eb15..b73370e 100644 --- a/Source/ObjectEngine/SceneChangeArea.s +++ b/Source/ObjectEngine/SceneChangeArea.s @@ -84,7 +84,7 @@ mtlr r0 addi r1, r1, 0x10 blr - +.GLE PRINTADDRESS SceneChangeArea_Movement: stwu r1, -0x40(r1) mflr r0 diff --git a/Source/ObjectEngine/StaffRollDemoObj.s b/Source/ObjectEngine/StaffRollDemoObj.s index 31df77c..e9a51ce 100644 --- a/Source/ObjectEngine/StaffRollDemoObj.s +++ b/Source/ObjectEngine/StaffRollDemoObj.s @@ -148,7 +148,8 @@ addi r4, r13, .StaffRollDemoObj_NrvRun_sInstance - STATIC_R13 bl setNerve__9LiveActorFPC5Nerve mr r3, r31 -bl startStarPointerModeEnding__2MRFPv +#bl startStarPointerModeEnding__2MRFPv +nop lwz r0, 0x14(r1) lwz r31, 0x0C(r1) diff --git a/Source/SceneEngine/GameScene.s b/Source/SceneEngine/GameScene.s index e59c622..50f6dbc 100644 --- a/Source/SceneEngine/GameScene.s +++ b/Source/SceneEngine/GameScene.s @@ -169,7 +169,8 @@ addi r3, r3, AllCompleteMessage@l li r4, 1 bl .MR_GetGameSetting cmpwi r3, 0 -beq .NoWC24 +nop #beq .NoWC24 + li r3, 0x98 # WiiMessageBoardEmailSender bl createSceneObj__2MRFi @@ -470,8 +471,8 @@ blr .requestGalaxyMove_Ex: -bl .GetSceneStartID -bl setRestartMarioNo__2MRFRC10JMapIdInfo +# bl .GetSceneStartID +# bl setRestartMarioNo__2MRFRC10JMapIdInfo addi r11, r1, 0x20 b .requestGalaxyMove_Ex_Return @@ -515,7 +516,7 @@ b .requestGalaxyMove_Ex .GLE ENDADDRESS .GLE ADDRESS init__18ScenePlayingResultFv +0x64 -bl .GetSceneStartID +#bl .GetSceneStartID .GLE ENDADDRESS diff --git a/Source/SceneEngine/SavePoints.s b/Source/SceneEngine/SavePoints.s index af01fdb..3f78a6f 100644 --- a/Source/SceneEngine/SavePoints.s +++ b/Source/SceneEngine/SavePoints.s @@ -220,4 +220,9 @@ b GameDataWorldMapStorage_Extension_Return EntireLevelFlag: .string "EntireLevelFlag" AUTO +.GLE ENDADDRESS + +.GLE ADDRESS isView120StarsEnding__8UserFileCFv +li r3, 1 +blr .GLE ENDADDRESS \ No newline at end of file diff --git a/Source/SceneEngine/SceneUtility.s b/Source/SceneEngine/SceneUtility.s index fbc05a1..7a8770a 100644 --- a/Source/SceneEngine/SceneUtility.s +++ b/Source/SceneEngine/SceneUtility.s @@ -32,11 +32,14 @@ bl getStageDataHolder__2MRFv mr r4, r31 bl getStageDataHolderFromZoneId__15StageDataHolderFi +cmpwi r3, 0 +beq .StageDataHolder_GetListJMapInfo_Return + addi r4, r3, 0xF8 mr r5, r30 bl findJmpInfoFromArray__15StageDataHolderCFPCQ22MR26AssignableArray<8JMapInfo>PCc #Returns 0 if BCSV is not found - +.StageDataHolder_GetListJMapInfo_Return: lwz r31, 0x0C(r1) lwz r30, 0x08(r1) lwz r0, 0x14(r1) @@ -45,7 +48,8 @@ addi r1, r1, 0x10 blr - +.GLE PRINTMESSAGE == GLE::RequestMoveStageFromJMapInfo == +.GLE PRINTADDRESS #Note for Aurum or someone with symbol map access, address 0x8004C860 is the wrong function. It should be "getValue_Ul___8JMapInfoCFiPCcPl_Cb" .MR_RequestMoveStageFromJMapInfo: #Reads a BCSV Entry and warps the player there @@ -154,6 +158,8 @@ mtlr r0 addi r1, r1, 0x60 blr +.GLE PRINTMESSAGE == GLE::RequestMoveStage == +.GLE PRINTADDRESS .MR_RequestMoveStage: #Makes the game start the level change process #r3 = Destination Stage Name @@ -174,6 +180,7 @@ mr r30, r4 mr r29, r5 mr r28, r6 mr r24, r8 +li r23, 0 #Always check for changing players mr r3, r7 @@ -193,9 +200,7 @@ bne .MR_RequestMoveStage_NotScenarioSelect #specifically to the ScenarioSelect of the galaxy #2022-02-22: Oh wow you somehow listened before I even put this on github -mr r3, r31 -bl requestChangeScenarioSelect__20GameSequenceFunctionFPCc -b .MR_RequestMoveStage_Return +li r23, 1 .MR_RequestMoveStage_NotScenarioSelect: @@ -218,6 +223,25 @@ addi r3, r1, 0x0C mr r4, r28 bl __ct__10JMapIdInfoFll +addi r3, r1, 0x0C +bl setRestartMarioNo__2MRFRC10JMapIdInfo + +lwz r3, sInstance__29SingletonHolder_10GameSystem_ - STATIC_R13(r13) +lwz r3, 0x24(r3) +addi r3, r3, 0x8C +lwz r3, 0x88(r3) +addi r4, r1, 0x0C +bl __as__10JMapIdInfoFRC10JMapIdInfo + +cmpwi r23, 0 +beq .MR_RequestMoveStage_NoPleaseDont + +mr r3, r31 +bl requestChangeScenarioSelect__20GameSequenceFunctionFPCc +b .MR_RequestMoveStage_Return + +.MR_RequestMoveStage_NoPleaseDont: + #Make corrections for hidden/seeker stars li r23, -1 @@ -619,6 +643,9 @@ lwz r3, 0x08(r1) cmpwi r3, -1 bne .CheckNotDefault +#do not save the default if it has already been saved +cmpwi r27, -1 +bne .CheckNotDefault mr r27, r28 #Save the default .CheckNotDefault: @@ -1990,7 +2017,8 @@ nop .ResetForGameOver: bl forceCloseSystemWipeFade__2MRFv -bl resetPlayResultInStageHolder__2MRFv +#THIS IS NO LONGER NEEDED due to the Restart Syncing that MoveStage does. +#bl resetPlayResultInStageHolder__2MRFv lis r3, PlayerLeft_Setting@ha addi r3, r3, PlayerLeft_Setting@l diff --git a/Source/_Symbols_NTSC-J.s b/Source/_Symbols_NTSC-J.s index d7bfe2e..8123608 100644 --- a/Source/_Symbols_NTSC-J.s +++ b/Source/_Symbols_NTSC-J.s @@ -541,4 +541,5 @@ .set sub_804B4C90, 0x804B4C90 .set sub_8013A180, 0x8013A180 .set hasFaceShipEvent__2MRFv, 0x804D8320 +.set cInitializeStartIdInfo__23_unnamed_SceneUtil_cpp_, 0x80727EB0 .GLE REGION END diff --git a/Source/_Symbols_NTSC-K.s b/Source/_Symbols_NTSC-K.s index e7a3f59..94a826e 100644 --- a/Source/_Symbols_NTSC-K.s +++ b/Source/_Symbols_NTSC-K.s @@ -541,4 +541,5 @@ .set sub_804B4C90, 0x804B4D00 .set sub_8013A180, 0x8013A180 .set hasFaceShipEvent__2MRFv, 0x804D83B0 +.set cInitializeStartIdInfo__23_unnamed_SceneUtil_cpp_, 0x8073B3F0 .GLE REGION END diff --git a/Source/_Symbols_NTSC-U.s b/Source/_Symbols_NTSC-U.s index 94f6729..ecbd2c0 100644 --- a/Source/_Symbols_NTSC-U.s +++ b/Source/_Symbols_NTSC-U.s @@ -766,9 +766,7 @@ .set sub_804B4C90, 0x804B4C90 .set sub_8013A180, 0x8013A180 .set hasFaceShipEvent__2MRFv, 0x804D8320 - - - +.set cInitializeStartIdInfo__23_unnamed_SceneUtil_cpp_, 0x807286F0 .GLE REGION END \ No newline at end of file diff --git a/Source/_Symbols_NTSC-W.s b/Source/_Symbols_NTSC-W.s index 85a88b0..4a87b0d 100644 --- a/Source/_Symbols_NTSC-W.s +++ b/Source/_Symbols_NTSC-W.s @@ -541,4 +541,5 @@ .set sub_804B4C90, 0x804B4D00 .set sub_8013A180, 0x8013A180 .set hasFaceShipEvent__2MRFv, 0x804D83B0 +.set cInitializeStartIdInfo__23_unnamed_SceneUtil_cpp_, 0x8073C830 .GLE REGION END diff --git a/Source/_Symbols_PAL.s b/Source/_Symbols_PAL.s index 7c1641c..2fc9897 100644 --- a/Source/_Symbols_PAL.s +++ b/Source/_Symbols_PAL.s @@ -541,4 +541,5 @@ .set sub_804B4C90, 0x804B4C90 .set sub_8013A180, 0x8013A180 .set hasFaceShipEvent__2MRFv, 0x804D8320 +.set cInitializeStartIdInfo__23_unnamed_SceneUtil_cpp_, 0x8072DDF0 .GLE REGION END