Skip to content

Commit

Permalink
Merge branch 'master' into unk_020183F0
Browse files Browse the repository at this point in the history
  • Loading branch information
PikalaxALT authored Oct 25, 2024
2 parents ab71f61 + 8a4dec2 commit b918c4a
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion asm/include/overlay_01_021E6880.inc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
.public PlayerAvatar_GetState
.public FieldSystem_GetPlayerAvatar
.public sub_0205CA38
.public sub_0205CB38
.public PlayerAvatar_CheckRunningShoesLock
.public sub_0205CF44
.public sub_0205CF60
.public sub_0205CFBC
Expand Down
4 changes: 2 additions & 2 deletions asm/include/overlay_27.inc
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
.public PlayerAvatar_GetState
.public PlayerSaveData_CheckRunningShoes
.public FieldSystem_GetPlayerAvatar
.public sub_0205CB38
.public sub_0205CB40
.public PlayerAvatar_CheckRunningShoesLock
.public PlayerAvatar_SetRunningShoesLock
.public MapObject_GetSpriteID
.public MapObject_GetScriptID
.public sub_0205F330
Expand Down
4 changes: 2 additions & 2 deletions asm/include/overlay_28.inc
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
.public PlayerAvatar_GetMapObject
.public PlayerAvatar_GetState
.public FieldSystem_GetPlayerAvatar
.public sub_0205CB38
.public sub_0205CB40
.public PlayerAvatar_CheckRunningShoesLock
.public PlayerAvatar_SetRunningShoesLock
.public MapObject_GetSpriteID
.public MapObject_GetScriptID
.public sub_0205F330
Expand Down
2 changes: 1 addition & 1 deletion asm/include/unk_02056D7C.inc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
.public sub_0205C6D4
.public PlayerAvatar_GetMapObject
.public FieldSystem_GetPlayerAvatar
.public sub_0205CB38
.public PlayerAvatar_CheckRunningShoesLock
.public sub_0205DE38
.public sub_0205DF0C
.public sub_0205DFC8
Expand Down
2 changes: 1 addition & 1 deletion asm/overlay_01_021E6880.s
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ ov01_021E6928: ; 0x021E6928
bl ov01_021E6880
add r0, r4, #0
bl FieldSystem_GetPlayerAvatar
bl sub_0205CB38
bl PlayerAvatar_CheckRunningShoesLock
cmp r0, #0
beq _021E694E
mov r0, #2
Expand Down
6 changes: 3 additions & 3 deletions asm/overlay_27.s
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ ov27_0225A48C: ; 0x0225A48C
ldr r0, [r5, #0x10]
bl FieldSystem_GetPlayerAvatar
add r6, r0, #0
bl sub_0205CB38
bl PlayerAvatar_CheckRunningShoesLock
add r4, r0, #0
mov r1, #1
eor r4, r1
Expand All @@ -613,7 +613,7 @@ ov27_0225A48C: ; 0x0225A48C
bl ov27_0225A468
add r0, r6, #0
add r1, r4, #0
bl sub_0205CB40
bl PlayerAvatar_SetRunningShoesLock
_0225A4B6:
pop {r4, r5, r6, pc}
thumb_func_end ov27_0225A48C
Expand All @@ -624,7 +624,7 @@ ov27_0225A4B8: ; 0x0225A4B8
add r4, r0, #0
ldr r0, [r4, #0x10]
bl FieldSystem_GetPlayerAvatar
bl sub_0205CB38
bl PlayerAvatar_CheckRunningShoesLock
add r1, r0, #0
add r0, r4, #0
bl ov27_0225A468
Expand Down
6 changes: 3 additions & 3 deletions asm/overlay_28.s
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ ov28_0225DA74: ; 0x0225DA74
bl ov28_0225DA1C
ldr r0, [r5, #0x18]
bl FieldSystem_GetPlayerAvatar
bl sub_0205CB38
bl PlayerAvatar_CheckRunningShoesLock
cmp r0, #0
bne _0225DB22
mov r0, #0x61
Expand Down Expand Up @@ -2642,7 +2642,7 @@ _0225E96C:
ldr r0, [r5, #0x18]
bl FieldSystem_GetPlayerAvatar
add r6, r0, #0
bl sub_0205CB38
bl PlayerAvatar_CheckRunningShoesLock
add r4, r0, #0
bne _0225E9B8
mov r0, #0x61
Expand Down Expand Up @@ -2671,7 +2671,7 @@ _0225E9D0:
mov r1, #1
add r0, r6, #0
eor r1, r4
bl sub_0205CB40
bl PlayerAvatar_SetRunningShoesLock
_0225E9DA:
pop {r4, r5, r6, pc}
.balign 4, 0
Expand Down
2 changes: 1 addition & 1 deletion asm/unk_02056D7C.s
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ _020572BC:
cmp r0, #0
beq _020572CE
bl FieldSystem_GetPlayerAvatar
bl sub_0205CB38
bl PlayerAvatar_CheckRunningShoesLock
cmp r0, #0
beq _020572CE
mov r4, #1
Expand Down
6 changes: 3 additions & 3 deletions include/field_player_avatar.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

typedef struct PlayerSaveData {
u16 hasRunningShoes;
u16 unk2;
u16 runningShoesLock;
u32 unk4;
} PlayerSaveData;

Expand Down Expand Up @@ -119,7 +119,7 @@ void sub_0205CAF4(PlayerAvatar *avatar);
BOOL sub_0205CB00(PlayerAvatar *avatar);
void sub_0205CB14(PlayerAvatar *avatar, BOOL unkA);
u32 sub_0205CB2C(PlayerAvatar *avatar);
u16 sub_0205CB38(PlayerAvatar *avatar);
void sub_0205CB40(PlayerAvatar *avatar, u16 unkA);
u16 PlayerAvatar_CheckRunningShoesLock(PlayerAvatar *avatar);
void PlayerAvatar_SetRunningShoesLock(PlayerAvatar *avatar, u16 lock);

#endif // POKEHEARTGOLD_PlayerAvatar_H
14 changes: 7 additions & 7 deletions src/field_player_avatar.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ void sub_0205C7B4(PlayerAvatar *avatar) {
}

void PlayerSaveData_Init(struct PlayerSaveData *playerSaveData) {
playerSaveData->hasRunningShoes = 0;
playerSaveData->unk2 = 0;
playerSaveData->unk4 = 0;
playerSaveData->hasRunningShoes = 0;
playerSaveData->runningShoesLock = 0;
playerSaveData->unk4 = 0;
}

BOOL PlayerSaveData_CheckRunningShoes(struct PlayerSaveData *playerSaveData) {
Expand Down Expand Up @@ -724,10 +724,10 @@ u32 sub_0205CB2C(PlayerAvatar *avatar) {
return sub_0205C73C(avatar, 128);
}

u16 sub_0205CB38(PlayerAvatar *avatar) {
return avatar->playerSaveData->unk2;
u16 PlayerAvatar_CheckRunningShoesLock(PlayerAvatar *avatar) {
return avatar->playerSaveData->runningShoesLock;
}

void sub_0205CB40(PlayerAvatar *avatar, u16 unkA) {
avatar->playerSaveData->unk2 = unkA;
void PlayerAvatar_SetRunningShoesLock(PlayerAvatar *avatar, u16 lock) {
avatar->playerSaveData->runningShoesLock = lock;
}

0 comments on commit b918c4a

Please sign in to comment.