Skip to content

Commit

Permalink
name boost mode setup func, figure out which line bugs the intro on sdl
Browse files Browse the repository at this point in the history
  • Loading branch information
freshollie committed Nov 12, 2024
1 parent 0156922 commit 3ccdaf4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/game/boost_effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
void sub_801561C(void);
void sub_8015750(void);
void GetPreviousPlayerPos(Vec2_32 *pos, u8 pastFrameDelta);
void sub_801583C(void);
void CreateBoostEffectTasks(void);
void sub_8015790(void);
void sub_80156D0(void);

Expand Down
4 changes: 2 additions & 2 deletions include/gba/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
#define OAM_ENTRY_COUNT 128
#if PORTABLE
// NOTE: Used in gba/types.h, so they have to be defined before the #include
#define DISPLAY_WIDTH 426
#define DISPLAY_HEIGHT 240
#define DISPLAY_WIDTH 240
#define DISPLAY_HEIGHT 160

//#include "gba/types.h"
// TODO: Fix #define OAM_SIZE (OAM_ENTRY_COUNT*sizeof(OamData))
Expand Down
2 changes: 1 addition & 1 deletion src/game/boost_effect.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static inline void sub_8015B64_inline(AnimId anim, u16 palId)
}
}

void sub_801583C(void)
void CreateBoostEffectTasks(void)
{
Sprite *s;
u8 i;
Expand Down
8 changes: 6 additions & 2 deletions src/game/stage/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ static void Task_IntroControllerMain(void)
}
CreateStageUI();
TaskDestroy(gCurTask);
sub_801583C();
CreateBoostEffectTasks();
}
}

Expand All @@ -597,7 +597,7 @@ NONMATCH("asm/non_matching/game/stage/intro/Task_802F9F8.inc", void Task_802F9F8
s32 frameCounter = controller->counter;
u8 i;

// gDispCnt &= ~(DISPCNT_WIN0_ON | DISPCNT_WIN1_ON | DISPCNT_OBJWIN_ON);
gDispCnt &= ~(DISPCNT_WIN0_ON | DISPCNT_WIN1_ON | DISPCNT_OBJWIN_ON);

if ((unsigned)frameCounter >= 150) {
frameCounter -= 150;
Expand Down Expand Up @@ -678,7 +678,11 @@ NONMATCH("asm/non_matching/game/stage/intro/Task_802F9F8.inc", void Task_802F9F8
UpdateScreenFade(fade);

gWinRegs[WINREG_WININ] = (WININ_WIN0_ALL | WININ_WIN1_ALL);
// This line is needed on all platforms but ATM it just makes the background black on
// SDL so we can't see the intro triangles. We need to figure that out and re-enable
#if PLATFORM_GBA
gWinRegs[WINREG_WINOUT] = (WINOUT_WIN01_OBJ | WINOUT_WINOBJ_OBJ);
#endif
}

if (gCurrentLevel == LEVEL_INDEX(ZONE_FINAL, ACT_TRUE_AREA_53)) {
Expand Down
2 changes: 1 addition & 1 deletion src/game/stage/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -5323,7 +5323,7 @@ void Player_80279F8(Player *p)
p->heldInput = DPAD_RIGHT;
p->speedGroundX = Q(10.0);
p->charState = CHARSTATE_WALK_A;
sub_801583C();
CreateBoostEffectTasks();

PLAYERFN_SET(Player_8027B98);

Expand Down

0 comments on commit 3ccdaf4

Please sign in to comment.