Skip to content

Commit

Permalink
Decomped IsSpecialStoryAlly
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousRandomPerson committed Nov 23, 2024
1 parent 098e58a commit 6e05dfc
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 36 deletions.
13 changes: 0 additions & 13 deletions asm/overlay_29_022F7388.s
Original file line number Diff line number Diff line change
Expand Up @@ -5975,16 +5975,3 @@ ov29_022FBAB4: ; 0x022FBAB4
#endif
bx lr
arm_func_end ov29_022FBAB4

arm_func_start IsSpecialStoryAlly
IsSpecialStoryAlly: ; 0x022FBAD0
ldrb r0, [r0, #0x48]
cmp r0, #0xd9
blo _022FBAE8
cmp r0, #0xe4
movlo r0, #1
bxlo lr
_022FBAE8:
mov r0, #0
bx lr
arm_func_end IsSpecialStoryAlly
9 changes: 9 additions & 0 deletions include/joined_at_checks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef PMDSKY_JOINED_AT_CHECKS_H
#define PMDSKY_JOINED_AT_CHECKS_H

#include "dungeon_mode.h"

bool8 IsSpecialStoryAlly(struct monster *pokemon_info);
bool8 IsExperienceLocked(struct monster *pokemon_info);

#endif //PMDSKY_JOINED_AT_CHECKS_H
8 changes: 0 additions & 8 deletions include/overlay_29_022FBAF0.h

This file was deleted.

2 changes: 1 addition & 1 deletion main.lsf
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Overlay OVY_29
Object asm/overlay_29_022F62CC.o
Object src/overlay_29_022F7364.o
Object asm/overlay_29_022F7388.o
Object src/overlay_29_022FBAF0.o
Object src/joined_at_checks.o
Object asm/overlay_29_022FBB1C.o
Object src/overlay_29_022FC99C.o
Object asm/overlay_29_022FC9C0.o
Expand Down
20 changes: 20 additions & 0 deletions src/joined_at_checks.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "joined_at_checks.h"

bool8 IsSpecialStoryAlly(struct monster *pokemon_info)
{
if (pokemon_info->joined_at >= DUNGEON_JOINED_AT_BIDOOF && pokemon_info->joined_at < DUNGEON_DUMMY_0xE4)
return TRUE;

return FALSE;
}

bool8 IsExperienceLocked(struct monster *pokemon_info)
{
if (pokemon_info->joined_at == DUNGEON_CLIENT)
return TRUE;

if (IsSpecialStoryAlly(pokemon_info))
return TRUE;

return FALSE;
}
14 changes: 0 additions & 14 deletions src/overlay_29_022FBAF0.c

This file was deleted.

0 comments on commit 6e05dfc

Please sign in to comment.