From 252e00368903293735e050f5278c20eb21021b7f Mon Sep 17 00:00:00 2001 From: Reonu Date: Mon, 26 Apr 2021 00:04:56 +0100 Subject: [PATCH] fix water, add missing credits, fix being able to jump before you're supposed to --- levels/bob/texscroll.inc.c | 18 ++++++++++++++---- src/game/hud.c | 6 +++++- src/game/mario.c | 6 +++--- src/game/mario_actions_stationary.c | 4 +++- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/levels/bob/texscroll.inc.c b/levels/bob/texscroll.inc.c index 6ab4be5c..5ed19d5e 100644 --- a/levels/bob/texscroll.inc.c +++ b/levels/bob/texscroll.inc.c @@ -77,8 +77,18 @@ void scroll_bob_dl_Water_mesh_layer_5_vtx_0() { currentY += deltaY; } +void epicscroll() { + Gfx *mat = segmented_to_virtual(mat_bob_dl_epicWater_layer5); + shift_s_down(mat, 13, PACK_TILESIZE(0, 1)); + shift_t_down(mat, 13, PACK_TILESIZE(0, 1)); + shift_s(mat, 21, PACK_TILESIZE(0, 1)); + shift_t(mat, 21, PACK_TILESIZE(0, 1)); +}; + + void scroll_bob() { - scroll_bob_dl_LavaPuddle_mesh_layer_1_vtx_0(); - scroll_bob_dl_LavaPuddle_mesh_layer_1_vtx_3(); - scroll_bob_dl_Water_mesh_layer_5_vtx_0(); -} + scroll_bob_dl_LavaPuddle_mesh_layer_1_vtx_0(); + scroll_bob_dl_LavaPuddle_mesh_layer_1_vtx_3(); + //scroll_bob_dl_Water_mesh_layer_5_vtx_0(); + epicscroll(); +} \ No newline at end of file diff --git a/src/game/hud.c b/src/game/hud.c index dc38d3ea..dd501581 100644 --- a/src/game/hud.c +++ b/src/game/hud.c @@ -297,7 +297,7 @@ void render_credits(void) { if (gMarioState->creditsTimer > 0 && gMarioState->creditsTimer < 90 ) { print_text(10, 220, "HACK BY REONU"); } - if (gMarioState->creditsTimer >= 90 && gMarioState->creditsTimer < 750 ) { + if (gMarioState->creditsTimer >= 90 && gMarioState->creditsTimer < 840 ) { print_text(10, 220, "SPECIAL THANKS TO:"); } if (gMarioState->creditsTimer >= 90 && gMarioState->creditsTimer < 180 ) { @@ -332,6 +332,10 @@ void render_credits(void) { print_text(10, 180, "AXOLLYON"); print_text(10, 160, "PLAYTESTING"); } + if (gMarioState->creditsTimer >= 750 && gMarioState->creditsTimer < 840 ) { + print_text(10, 200, "THECOZIES"); + print_text(10, 180, "EPIC WATER EFFECT"); + } gMarioState->creditsTimer++; } diff --git a/src/game/mario.c b/src/game/mario.c index 8d892e80..f322537c 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -34,7 +34,7 @@ #include "rumble_init.h" #include "include/seq_ids.h" -//#define DEBUG +#define DEBUG u32 unused80339F10; s8 filler80339F1C[20]; @@ -1319,7 +1319,7 @@ void update_mario_button_inputs(struct MarioState *m) { m->showMovesetTimer = 90; m->showMoveset = 0; } - m->creditsTimer = 750; + m->creditsTimer = 840; } if (m->debugMode == 1) { if (m->controller->buttonPressed & R_JPAD) { @@ -1814,7 +1814,7 @@ void func_sh_8025574C(void) { s32 execute_mario_action(UNUSED struct Object *o) { s32 inLoop = TRUE; - if ((gMarioState->numStars == 0) && (gMarioState->creditsTimer < 810)) { + if ((gMarioState->numStars == 0) && (gMarioState->creditsTimer < 840)) { render_credits(); } if ((gMarioState->action & ACT_FLAG_SWIMMING) && (gMarioState->pos[1] < -2700)) { diff --git a/src/game/mario_actions_stationary.c b/src/game/mario_actions_stationary.c index ff4ae9ef..62f6f28e 100644 --- a/src/game/mario_actions_stationary.c +++ b/src/game/mario_actions_stationary.c @@ -856,7 +856,9 @@ s32 check_common_landing_cancels(struct MarioState *m, u32 action) { if (m->input & INPUT_A_PRESSED) { if (!action) { - return set_jump_from_landing(m); + if (m->canJump || m->unlockEverything) { + return set_jump_from_landing(m); + } } else { return set_jumping_action(m, action, 0); }