mirror of
https://github.com/s4Ys369/CHEATERex.git
synced 2025-01-22 07:32:10 -05:00
1fb1c264e1
-Updated READMEs -Request from my brother -More patches included in `/enhancements`
55 lines
2.3 KiB
Diff
55 lines
2.3 KiB
Diff
diff --git a/levels/ending/script.c b/levels/ending/script.c
|
|
index ad3d738..9574424 100644
|
|
--- a/levels/ending/script.c
|
|
+++ b/levels/ending/script.c
|
|
@@ -16,6 +16,8 @@
|
|
#include "make_const_nonconst.h"
|
|
#include "levels/ending/header.h"
|
|
|
|
+#include "levels/intro/header.h"
|
|
+
|
|
const LevelScript level_ending_entry[] = {
|
|
/*0*/ INIT_LEVEL(),
|
|
/*1*/ LOAD_MIO0(/*seg*/ 0x07, _ending_segment_7SegmentRomStart, _ending_segment_7SegmentRomEnd),
|
|
@@ -31,7 +33,9 @@ const LevelScript level_ending_entry[] = {
|
|
/*12*/ TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 75, /*color*/ 0x00, 0x00, 0x00),
|
|
/*14*/ SLEEP(/*frames*/ 120),
|
|
/*15*/ CALL(/*arg*/ 0, /*func*/ lvl_play_the_end_screen_sound),
|
|
- // L1:
|
|
- /*17*/ SLEEP(/*frames*/ 1),
|
|
- /*18*/ JUMP(level_ending_entry + 17),
|
|
+ // The following lines were added/altered to allow the player to reset
|
|
+ /*17*/ CALL_LOOP(/*arg*/ 0, /*func*/ credits_end_wait_for_reset),
|
|
+ /*18*/ TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 75, /*color*/ 0x00, 0x00, 0x00),
|
|
+ /*19*/ SLEEP(/*frames*/ 120),
|
|
+ /*20*/ EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_intro_entry_1),
|
|
};
|
|
diff --git a/src/game/level_update.c b/src/game/level_update.c
|
|
index 5ecc48d..7f3d6f0 100644
|
|
--- a/src/game/level_update.c
|
|
+++ b/src/game/level_update.c
|
|
@@ -1318,3 +1318,11 @@ s32 lvl_play_the_end_screen_sound(UNUSED s16 arg0, UNUSED s32 arg1) {
|
|
play_sound(SOUND_MENU_THANK_YOU_PLAYING_MY_GAME, gDefaultSoundArgs);
|
|
return 1;
|
|
}
|
|
+
|
|
+// Added so the player can reset the game at the end screen
|
|
+ s32 credits_end_wait_for_reset() {
|
|
+ if (gPlayer1Controller->buttonPressed & START_BUTTON) {
|
|
+ return 1;
|
|
+ }
|
|
+ }
|
|
+
|
|
\ No newline at end of file
|
|
diff --git a/src/game/level_update.h b/src/game/level_update.h
|
|
index ecf9c3a..443f8e0 100644
|
|
--- a/src/game/level_update.h
|
|
+++ b/src/game/level_update.h
|
|
@@ -127,6 +127,7 @@ s32 lvl_init_or_update(s16 initOrUpdate, UNUSED s32 unused);
|
|
s32 lvl_init_from_save_file(UNUSED s16 arg0, s32 levelNum);
|
|
s32 lvl_set_current_level(UNUSED s16 arg0, s32 levelNum);
|
|
s32 lvl_play_the_end_screen_sound(UNUSED s16 arg0, UNUSED s32 arg1);
|
|
+s32 credits_end_wait_for_reset();
|
|
void basic_update(UNUSED s16 *arg);
|
|
|
|
#endif // LEVEL_UPDATE_H
|