CurrentMapIsSecretBase

This commit is contained in:
PikalaxALT 2017-10-24 22:10:35 -04:00
parent 82ac40e619
commit e094e3db9b
2 changed files with 15 additions and 36 deletions

View file

@ -5,42 +5,6 @@
.text
thumb_func_start sub_80E91F8
sub_80E91F8: @ 80E91F8
push {lr}
ldr r0, =sub_80E916C
movs r1, 0
bl CreateTask
movs r0, 0x1
movs r1, 0
bl fade_screen
pop {r0}
bx r0
.pool
thumb_func_end sub_80E91F8
thumb_func_start CurrentMapIsSecretBase
CurrentMapIsSecretBase: @ 80E9214
push {lr}
ldr r0, =gSaveBlock1Ptr
ldr r1, [r0]
movs r0, 0x4
ldrsb r0, [r1, r0]
cmp r0, 0x19
bne _080E9230
ldrb r0, [r1, 0x5]
cmp r0, 0x17
bhi _080E9230
movs r0, 0x1
b _080E9232
.pool
_080E9230:
movs r0, 0
_080E9232:
pop {r1}
bx r1
thumb_func_end CurrentMapIsSecretBase
thumb_func_start sub_80E9238
sub_80E9238: @ 80E9238
push {r4-r7,lr}

View file

@ -347,3 +347,18 @@ void sub_80E916C(u8 taskId)
DestroyTask(taskId);
}
}
void sub_80E91F8(void)
{
CreateTask(sub_80E916C, 0);
fade_screen(1, 0);
}
bool8 CurrentMapIsSecretBase(void)
{
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP_SECRET_BASE_RED_CAVE1 && (u8)gSaveBlock1Ptr->location.mapNum <= MAP_ID_SECRET_BASE_SHRUB4)
{
return TRUE;
}
return FALSE;
}