Address review comments

This commit is contained in:
Mateusz Naściszewski 2024-09-18 16:59:25 +02:00
parent 842729f665
commit 676504f0ab
No known key found for this signature in database
GPG Key ID: 6A6067123E4CAF6E
10 changed files with 54 additions and 54 deletions

View File

@ -56,7 +56,7 @@ _0800DD60:
b _0800DE28
_0800DD64:
mov r0, r8
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
movs r4, 0
ldr r0, [r5, 0x8]
movs r1, 0x7
@ -633,7 +633,7 @@ _0800E1D2:
adds r4, 0x55
ldrb r4, [r4]
str r4, [sp, 0x4]
bl AxResInitUnorientedFile_800543C
bl AxResInitUnorientedFile
b _0800E200
_0800E1E4:
adds r0, r5, 0

View File

@ -439,7 +439,7 @@ _0800FD08:
str r4, [sp, 0x8]
adds r0, r3, 0
movs r3, 0
bl AxResInitFile_80053AC
bl AxResInitFile
b _0800FD32
.align 2, 0
_0800FD1C: .4byte gUnknown_203B0E4
@ -758,7 +758,7 @@ _0800FF60:
str r2, [sp, 0x8]
movs r2, 0
movs r3, 0
bl AxResInitFile_80053AC
bl AxResInitFile
ldr r2, [r4]
ldr r1, _0800FFD4
adds r0, r2, r1
@ -948,7 +948,7 @@ sub_80100C0:
str r1, [sp, 0x8]
adds r1, r2, 0
movs r2, 0
bl AxResInitFile_80053AC
bl AxResInitFile
bl sub_8011168
ldr r0, [r4]
ldr r2, _080101E8
@ -1053,7 +1053,7 @@ _0801018A:
str r2, [sp, 0x8]
movs r2, 0
movs r3, 0
bl AxResInitFile_80053AC
bl AxResInitFile
add sp, 0x18
pop {r3-r5}
mov r8, r3
@ -1318,7 +1318,7 @@ _080103B0:
movs r2, 0x1
str r2, [sp, 0x8]
movs r2, 0
bl AxResInitFile_80053AC
bl AxResInitFile
movs r7, 0
cmp r7, r4
bge _08010448
@ -1458,7 +1458,7 @@ _080104E6:
str r6, [sp, 0x8]
adds r0, r3, 0
movs r3, 0
bl AxResInitFile_80053AC
bl AxResInitFile
ldr r1, _08010508
lsls r0, r5, 2
adds r0, r1
@ -1490,7 +1490,7 @@ _0801050E:
str r2, [sp, 0x8]
movs r2, 0
movs r3, 0
bl AxResInitFile_80053AC
bl AxResInitFile
ldr r2, [r4]
ldr r4, _08010588
adds r3, r2, r4
@ -2148,7 +2148,7 @@ sub_8010A88:
ldr r5, [r1]
ldr r3, _08010B64
adds r0, r3
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
mov r0, r9
cmp r0, 0
beq _08010AF6
@ -2194,7 +2194,7 @@ _08010B04:
adds r5, r4, 0
adds r5, 0x8
adds r0, r5, 0
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
mov r2, r9
cmp r2, 0
beq _08010B40

View File

@ -29,7 +29,7 @@ sub_8010F28:
mov r8, r1
ldr r4, _0801108C
adds r0, r4
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
ldr r3, [r6]
adds r4, r3, r4
ldr r7, _08011090
@ -74,7 +74,7 @@ _08010F98:
beq _08010FD8
adds r4, 0x14
adds r0, r4, 0
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
movs r2, 0x4
ldrsh r1, [r5, r2]
mov r3, r9
@ -114,7 +114,7 @@ _08010FEC:
cmp r0, 0
beq _08011062
adds r0, r1, r6
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
ldr r0, _080110A8
ldrh r0, [r0]
movs r2, 0x80
@ -557,7 +557,7 @@ _0801132E:
movs r3, 0x1
str r3, [sp, 0x8]
movs r3, 0
bl AxResInitFile_80053AC
bl AxResInitFile
_08011370:
adds r6, 0x3C
adds r5, 0x3C

View File

@ -4677,7 +4677,7 @@ _0806C6A8:
ldr r4, [sp, 0x38]
str r4, [sp, 0x8]
adds r0, r5, 0
bl AxResInitFile_80053AC
bl AxResInitFile
mov r10, r5
b _0806C704
_0806C6D6:
@ -4699,7 +4699,7 @@ _0806C6D6:
str r1, [sp, 0x8]
adds r0, r4, 0
adds r1, r5, 0
bl AxResInitFile_80053AC
bl AxResInitFile
mov r10, r4
_0806C704:
mov r2, r9
@ -4749,12 +4749,12 @@ _0806C73C:
cmp r0, 0
beq _0806C76A
mov r0, r10
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
mov r0, r10
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
_0806C76A:
mov r0, r10
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
b _0806C7E2
.align 2, 0
_0806C774: .4byte 0x000001a5
@ -4780,9 +4780,9 @@ _0806C784:
cmp r0, 0
bne _0806C7BC
mov r0, r10
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
mov r0, r10
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
b _0806C7DC
.align 2, 0
_0806C7B4: .4byte 0x0000066c
@ -4803,10 +4803,10 @@ _0806C7C8:
cmp r0, 0x1
ble _0806C7DC
mov r0, r10
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
_0806C7DC:
mov r0, r10
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
_0806C7E2:
ldr r1, [r6, 0xC]
ldr r0, [r6, 0x14]

View File

@ -1429,7 +1429,7 @@ _080A7016:
str r0, [sp, 0x8]
adds r0, r4, 0
adds r1, r5, 0
bl AxResInit_80053D0
bl AxResInit
_080A7038:
add sp, 0xC
pop {r4-r7}
@ -1772,7 +1772,7 @@ sub_80A72B8:
movs r0, 0
strh r0, [r1]
adds r0, r6, 0
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
b _080A7304
_080A72D2:
adds r5, r6, 0
@ -1795,7 +1795,7 @@ _080A72EE:
adds r0, r7, r1
strh r0, [r5]
adds r0, r6, 0
bl RunAxAnimationFrame_80054BC
bl RunAxAnimationFrame
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0xFF

View File

@ -1095,8 +1095,8 @@ _08008624:
_0800862C: .4byte gUnknown_80B86A4
thumb_func_end GetCharacter
thumb_func_start HexdigitValue
HexdigitValue:
thumb_func_start HexDigitValue
HexDigitValue:
push {lr}
lsls r0, 24
lsrs r1, r0, 24
@ -1124,7 +1124,7 @@ _08008658:
_0800865C:
pop {r1}
bx r1
thumb_func_end HexdigitValue
thumb_func_end HexDigitValue
thumb_func_start xxx_get_next_char_from_string
xxx_get_next_char_from_string:
@ -1136,10 +1136,10 @@ xxx_get_next_char_from_string:
bne _08008696
adds r5, 0x1
ldrb r0, [r5]
bl HexdigitValue
bl HexDigitValue
adds r4, r0, 0
ldrb r0, [r5, 0x1]
bl HexdigitValue
bl HexDigitValue
lsls r4, 4
adds r4, r0
ldrb r0, [r5]

View File

@ -84,9 +84,9 @@ void sub_8004E8C(unkStruct_2039DB0 *);
void sub_8005180(void);
void sub_8005304(void);
void sub_800533C(ax_pose **, UnkSpriteMem **, axdata1 *, u16 *, bool8);
void AxResInitFile_80053AC(EntitySpriteInfo *, OpenedFile *, u32, u32, u32, u32, bool8);
void AxResInit_80053D0(EntitySpriteInfo *, Dungeon_ax *, u32, u32, u32, u32, bool8);
void AxResInitUnorientedFile_800543C(EntitySpriteInfo *, OpenedFile *, u32, u32, u32, bool8);
void RunAxAnimationFrame_80054BC(struct axPokemon *);
void AxResInitFile(EntitySpriteInfo *, OpenedFile *, u32, u32, u32, u32, bool8);
void AxResInit(EntitySpriteInfo *, Dungeon_ax *, u32, u32, u32, u32, bool8);
void AxResInitUnorientedFile(EntitySpriteInfo *, OpenedFile *, u32, u32, u32, bool8);
void RunAxAnimationFrame(struct axPokemon *);
#endif // GUARD_SPRITE_H

View File

@ -40,7 +40,7 @@ void DoAxFrame_800558C(struct axPokemon *a0, s32 spriteX, s32 spriteY, u32 a3, u
return;
if (a0->axdata.sub1.poseId < 0)
RunAxAnimationFrame_80054BC(a0);
RunAxAnimationFrame(a0);
if (!(a0->axdata.flags >> 15))
return;

View File

@ -69,9 +69,9 @@ void sub_806CCB4(Entity *entity, u8 a1)
sVar1 = entity->unk68;
if (info->waitingStruct.waitingStatus != STATUS_DECOY && !flag)
AxResInitFile_80053AC(&entity->spriteInfo, entity->sprite, entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
AxResInitFile(&entity->spriteInfo, entity->sprite, entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
else
AxResInitFile_80053AC(&entity->spriteInfo, GetSpriteData(MONSTER_DECOY), entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
AxResInitFile(&entity->spriteInfo, GetSpriteData(MONSTER_DECOY), entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
entity->unk6E = 0;
}

View File

@ -5,11 +5,11 @@
static EWRAM_DATA u16 sOAMSpriteCount = {0}; // 2025670 Written to but never read
#ifndef NONMATCHING
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite_8004EA8 is done
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite is done
#endif
static EWRAM_DATA s16 sUnknown_2025672[8] = {0};
#ifndef NONMATCHING
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite_8004EA8 is done
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite is done
#endif
static EWRAM_DATA s16 sUnknown_2025682[9] = {0};
static EWRAM_DATA Position sUnknown_2025694 = {0};
@ -30,11 +30,11 @@ static EWRAM_DATA_2 unkStruct_20266B0 *sUnknown_203B074 = {0};
extern void nullsub_3(s32, s32);
#ifndef NONMATCHING
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite_8004EA8 is done
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite is done
#endif
static void RegisterSpriteParts_80052BC(UnkSpriteMem *);
static void AxResInitUnoriented_800545C(EntitySpriteInfo *, Dungeon_ax *, u32, u32, u32, bool8);
static void AxResInitUnoriented(EntitySpriteInfo *, Dungeon_ax *, u32, u32, u32, bool8);
void InitSprites(void)
{
@ -156,7 +156,7 @@ void sub_8004E8C(unkStruct_2039DB0 *a0)
// https://decomp.me/scratch/VYqKb
// spriteMasks is a u16[6]
#ifdef NONMATCHING
static void AddAxSprite_8004EA8(ax_pose *a0, axdata1 *a1, UnkSpriteMem *a2, u16 *spriteMasks)
static void AddAxSprite(ax_pose *a0, axdata1 *a1, UnkSpriteMem *a2, u16 *spriteMasks)
{
// size: 0xC
struct UnkStackFor8004EA8
@ -258,7 +258,7 @@ static void AddAxSprite_8004EA8(ax_pose *a0, axdata1 *a1, UnkSpriteMem *a2, u16
}
#else
NAKED
static void AddAxSprite_8004EA8(ax_pose *a0, axdata1 *a1, UnkSpriteMem *a2, u16 *spriteMasks)
static void AddAxSprite(ax_pose *a0, axdata1 *a1, UnkSpriteMem *a2, u16 *spriteMasks)
{
asm_unified(
"push {r4-r7,lr}\n"
@ -829,7 +829,7 @@ static void RegisterSpriteParts_80052BC(UnkSpriteMem *a0)
}
}
#else
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite_8004EA8 is done
UNUSED // TODO: Remove the "UNUSED" attribute after AddAxSprite is done
NAKED
static void RegisterSpriteParts_80052BC(UnkSpriteMem *a0)
{
@ -897,16 +897,16 @@ void sub_800533C(ax_pose **a0, UnkSpriteMem **a1, axdata1 *a2, u16 *spriteMasks,
if (a4 != 0 && r4->sprite > -1)
mem = a1[r4->sprite];
AddAxSprite_8004EA8(r4, a2, mem, spriteMasks);
AddAxSprite(r4, a2, mem, spriteMasks);
}
}
void AxResInitFile_80053AC(EntitySpriteInfo *a0, OpenedFile *a1, u32 a2, u32 a3, u32 a4, u32 spriteAnimIndex, bool8 a6)
void AxResInitFile(EntitySpriteInfo *a0, OpenedFile *a1, u32 a2, u32 a3, u32 a4, u32 spriteAnimIndex, bool8 a6)
{
AxResInit_80053D0(a0, (Dungeon_ax *)a1->data, a2, a3, a4, spriteAnimIndex, a6);
AxResInit(a0, (Dungeon_ax *)a1->data, a2, a3, a4, spriteAnimIndex, a6);
}
void AxResInit_80053D0(EntitySpriteInfo *a0, Dungeon_ax *a1, u32 a2, u32 direction, u32 a4, u32 spriteAnimIndex, bool8 a6)
void AxResInit(EntitySpriteInfo *a0, Dungeon_ax *a1, u32 a2, u32 direction, u32 a4, u32 spriteAnimIndex, bool8 a6)
{
a0->unk0 = 0x8000;
if (a6)
@ -929,12 +929,12 @@ void AxResInit_80053D0(EntitySpriteInfo *a0, Dungeon_ax *a1, u32 a2, u32 directi
a0->unk30 = a1->unk10;
}
void AxResInitUnorientedFile_800543C(EntitySpriteInfo *a0, OpenedFile *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5)
void AxResInitUnorientedFile(EntitySpriteInfo *a0, OpenedFile *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5)
{
AxResInitUnoriented_800545C(a0, (Dungeon_ax *)a1->data, a2, a3, spriteAnimIndex, a5);
AxResInitUnoriented(a0, (Dungeon_ax *)a1->data, a2, a3, spriteAnimIndex, a5);
}
static void AxResInitUnoriented_800545C(EntitySpriteInfo *a0, Dungeon_ax *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5)
static void AxResInitUnoriented(EntitySpriteInfo *a0, Dungeon_ax *a1, u32 a2, u32 a3, u32 spriteAnimIndex, bool8 a5)
{
a0->unk0 = 0x8000;
if (a5)
@ -964,7 +964,7 @@ static inline s16 check_flag_for_80054BC(u16 flags) {
}
void RunAxAnimationFrame_80054BC(struct axPokemon *a0)
void RunAxAnimationFrame(struct axPokemon *a0)
{
ax_anim *aData;