Minor fixes

This commit is contained in:
PikalaxALT 2019-08-05 08:46:52 -04:00
parent a42e5c24e6
commit 329670e16e
2 changed files with 9 additions and 5 deletions

View file

@ -32,6 +32,10 @@
#define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0])) #define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0]))
// GameFreak used a macro called "NELEMS", as evidenced by
// AgbAssert calls.
#define NELEMS(arr) (sizeof(arr)/sizeof(*(arr)))
#define SWAP(a, b, temp) \ #define SWAP(a, b, temp) \
{ \ { \
temp = a; \ temp = a; \

View file

@ -76,7 +76,7 @@ static void sub_81CA850(void);
static void sub_81CA864(void); static void sub_81CA864(void);
static bool32 sub_81CA89C(void); static bool32 sub_81CA89C(void);
static void sub_81CA8B0(u8 taskId); static void sub_81CA8B0(u8 taskId);
static void titlescreen_0(void); static void sub_81CA92C(void);
static void sub_81CA994(void); static void sub_81CA994(void);
static void sub_81CA9C8(void); static void sub_81CA9C8(void);
static void sub_81CA9D8(void); static void sub_81CA9D8(void);
@ -497,7 +497,7 @@ static u32 sub_81C9A10(s32 state)
break; break;
} }
sub_81CA20C(); sub_81CA20C();
titlescreen_0(); sub_81CA92C();
return LT_INC_AND_CONTINUE; return LT_INC_AND_CONTINUE;
case 9: case 9:
if (sub_81CA324()) if (sub_81CA324())
@ -746,9 +746,9 @@ static u32 sub_81C9F28(s32 state)
static void sub_81C9FC4(void) static void sub_81C9FC4(void)
{ {
u32 i; s32 i;
for (i = 0; i < 2; i++) for (i = 0; i < NELEMS(gUnknown_086201C4); i++)
LoadCompressedSpriteSheet(&gUnknown_086201C4[i]); LoadCompressedSpriteSheet(&gUnknown_086201C4[i]);
Pokenav_AllocAndLoadPalettes(gUnknown_086201D4); Pokenav_AllocAndLoadPalettes(gUnknown_086201D4);
} }
@ -1210,7 +1210,7 @@ static void sub_81CA914(void)
ScanlineEffect_InitHBlankDmaTransfer(); ScanlineEffect_InitHBlankDmaTransfer();
} }
static void titlescreen_0(void) // almost definitely the wrong name static void sub_81CA92C(void)
{ {
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_OBJ | BLDCNT_EFFECT_LIGHTEN); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_OBJ | BLDCNT_EFFECT_LIGHTEN);
SetGpuReg(REG_OFFSET_BLDY, 0); SetGpuReg(REG_OFFSET_BLDY, 0);