diff options
-rw-r--r-- | asm/secret_base.s | 31 | ||||
-rwxr-xr-x | src/secret_base_80bb4ac.c | 10 |
2 files changed, 10 insertions, 31 deletions
diff --git a/asm/secret_base.s b/asm/secret_base.s index 88a4cb311..89197e2d3 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -6,37 +6,6 @@ .section .text_b - thumb_func_start sub_80BBB50 -sub_80BBB50: @ 80BBB50 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _080BBB88 @ =gPlayerAvatar - ldrb r1, [r0, 0x5] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, _080BBB8C @ =gMapObjects - adds r0, r1 - movs r1, 0x2 - bl FieldObjectTurn - bl sub_807D770 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080BBB80 - bl EnableBothScriptContexts - adds r0, r4, 0 - bl DestroyTask -_080BBB80: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080BBB88: .4byte gPlayerAvatar -_080BBB8C: .4byte gMapObjects - thumb_func_end sub_80BBB50 - thumb_func_start sub_80BBB90 sub_80BBB90: @ 80BBB90 push {r4,lr} diff --git a/src/secret_base_80bb4ac.c b/src/secret_base_80bb4ac.c index b5790ef4d..617b35202 100755 --- a/src/secret_base_80bb4ac.c +++ b/src/secret_base_80bb4ac.c @@ -2,6 +2,7 @@ #include "event_data.h" #include "rom4.h" #include "asm.h" +#include "script.h" #include "vars.h" #include "text.h" #include "field_player_avatar.h" @@ -22,6 +23,7 @@ extern const struct { } gUnknown_083D1358[7]; extern const u8 gUnknown_083D1374[48]; extern void *gUnknown_0300485C; +extern u8 sub_807D770(void); void sub_80BB4AC(struct SecretBaseRecord *record) { // 080bb4ac @@ -241,3 +243,11 @@ u8 sub_80BBB24(void) { return 0; return 1; } + +void sub_80BBB50(u8 taskid) { + FieldObjectTurn(&(gMapObjects[gPlayerAvatar.mapObjectId]), 2); + if (sub_807D770() == 1) { + EnableBothScriptContexts(); + DestroyTask(taskid); + } +} |