through sub_80E8B58; secret base ewram

This commit is contained in:
PikalaxALT 2017-10-23 18:56:18 -04:00
parent eb49cfcab2
commit 0dfd0f8c0e
3 changed files with 26 additions and 44 deletions

View File

@ -5,41 +5,6 @@
.text
thumb_func_start ResetSecretBases
ResetSecretBases: @ 80E8B28
push {r4,r5,lr}
movs r4, 0
ldr r5, =gSaveBlock1Ptr
_080E8B2E:
lsls r1, r4, 2
adds r1, r4
lsls r1, 5
ldr r0, =0x00001a9c
adds r1, r0
ldr r0, [r5]
adds r0, r1
bl sub_80E8AF0
adds r0, r4, 0x1
lsls r0, 16
lsrs r4, r0, 16
cmp r4, 0x13
bls _080E8B2E
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end ResetSecretBases
thumb_func_start sub_80E8B58
sub_80E8B58: @ 80E8B58
ldr r0, =gUnknown_0203A01C
ldr r1, =gSpecialVar_0x8004
ldrh r1, [r1]
strb r1, [r0]
bx lr
.pool
thumb_func_end sub_80E8B58
thumb_func_start sub_80E8B6C
sub_80E8B6C: @ 80E8B6C
push {r4,lr}

View File

@ -1,14 +1,24 @@
// Includes
#include "global.h"
#include "list_menu.h"
#include "decoration.h"
#include "decoration_inventory.h"
#include "text.h"
#include "event_data.h"
#include "secret_base.h"
// Static type declarations
struct SecretBaseListMenuBuffer {
struct ListMenuItem items[11];
u8 names[11][32];
};
// Static RAM declarations
EWRAM_DATA u8 gUnknown_0203A01C = 0;
EWRAM_DATA u8 gUnknown_0203A01D = 0;
EWRAM_DATA struct SecretBaseListMenuBuffer *gUnknown_0203A020 = NULL;
// Static ROM declarations
@ -23,6 +33,21 @@ void sub_80E8AF0(struct SecretBaseRecord *sbr)
}
}
void ResetSecretBases(void)
{
u16 i;
for (i = 0; i < 20; i ++)
{
sub_80E8AF0(&gSaveBlock1Ptr->secretBases[i]);
}
}
void sub_80E8B58(void)
{
gUnknown_0203A01C = gSpecialVar_0x8004;
}
// .rodata
// .text

View File

@ -1044,15 +1044,7 @@ gUnknown_0203A014: @ 203A014
gUnknown_0203A018: @ 203A018
.space 0x4
gUnknown_0203A01C: @ 203A01C
.space 0x1
gUnknown_0203A01D: @ 203A01D
.space 0x3
gUnknown_0203A020: @ 203A020
.space 0x4
.include "src/secret_base.o"
.include "src/tv.o"
gUnknown_0203A034: @ 203A034