summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalax1@gmail.com>2017-05-16 14:41:54 -0400
committerPikalaxALT <pikalax1@gmail.com>2017-05-16 14:41:54 -0400
commit81c06ecc1412f96d8da5a4597c96a814d4613620 (patch)
tree3e8fe61a08b20452846be785bb4f52408a78812a
parent59023fb934d7f7e193cae719ec1f587ad7eaa93e (diff)
sub_80BBB50
-rw-r--r--asm/secret_base.s31
-rwxr-xr-xsrc/secret_base_80bb4ac.c10
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);
+ }
+}