mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
sub_811A7E4
This commit is contained in:
parent
01d6114da2
commit
46068c0a6f
@ -5,67 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_811A7E4
|
||||
sub_811A7E4: @ 811A7E4
|
||||
push {lr}
|
||||
bl UpdatePaletteFade
|
||||
ldr r0, =gMain
|
||||
movs r1, 0x87
|
||||
lsls r1, 3
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0811A804
|
||||
cmp r0, 0x1
|
||||
beq _0811A80E
|
||||
b _0811A840
|
||||
.pool
|
||||
_0811A804:
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
bl fade_screen
|
||||
b _0811A840
|
||||
_0811A80E:
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0811A84E
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00003b58
|
||||
adds r0, r1
|
||||
ldr r1, =0x0000ffff
|
||||
strh r1, [r0, 0x16]
|
||||
bl overworld_free_bg_tilemaps
|
||||
bl sub_811A8F0
|
||||
b _0811A84E
|
||||
.pool
|
||||
_0811A840:
|
||||
ldr r1, =gMain
|
||||
movs r0, 0x87
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
ldrb r0, [r1]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1]
|
||||
_0811A84E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_811A7E4
|
||||
|
||||
thumb_func_start sub_811A858
|
||||
sub_811A858: @ 811A858
|
||||
push {lr}
|
||||
ldr r0, =sub_811A7E4
|
||||
bl SetMainCallback2
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_811A858
|
||||
|
||||
thumb_func_start sub_811A868
|
||||
sub_811A868: @ 811A868
|
||||
push {lr}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "task.h"
|
||||
#include "main.h"
|
||||
#include "link.h"
|
||||
#include "field_weather.h"
|
||||
#include "window.h"
|
||||
#include "palette.h"
|
||||
#include "event_data.h"
|
||||
@ -26,18 +27,19 @@ static void sub_811A2C0(u8);
|
||||
static void sub_811A278(void);
|
||||
static bool8 sub_811A428(u8);
|
||||
static void sub_811A2FC(u8);
|
||||
/*static*/ u16 sub_811AAAC(void);
|
||||
/*static*/ bool32 sub_811A88C(u16);
|
||||
/*static*/ void sub_811C158(u16);
|
||||
/*static*/ bool8 sub_811C170(void);
|
||||
/*static*/ void sub_811A8A4(u16);
|
||||
/*static*/ void sub_811A4D0(MainCallback);
|
||||
bool8 sub_811F28C(void);
|
||||
/*static*/ bool32 sub_811A88C(u16);
|
||||
/*static*/ void sub_811A8A4(u16);
|
||||
void sub_811A8F0(void);
|
||||
bool8 sub_811A95C(u8, u32, u8);
|
||||
void sub_811AA90(void);
|
||||
/*static*/ u16 sub_811AAAC(void);
|
||||
bool8 sub_811BF8C(void);
|
||||
bool8 sub_811BFA4(void);
|
||||
void sub_811C13C(void);
|
||||
void sub_811AA90(void);
|
||||
/*static*/ void sub_811C158(u16);
|
||||
/*static*/ bool8 sub_811C170(void);
|
||||
bool8 sub_811F28C(void);
|
||||
void sub_811F2B8(void);
|
||||
|
||||
// Static ROM declarations
|
||||
@ -304,3 +306,30 @@ void easy_chat_input_maybe(void)
|
||||
sub_811A20C(gSpecialVar_0x8004, words, sub_80861B0, sizeParam);
|
||||
}
|
||||
|
||||
static void sub_811A7E4(void)
|
||||
{
|
||||
LilycoveLady *lilycoveLady;
|
||||
|
||||
UpdatePaletteFade();
|
||||
switch (gMain.state)
|
||||
{
|
||||
case 0:
|
||||
fade_screen(1, 0);
|
||||
break;
|
||||
case 1:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
lilycoveLady = &gSaveBlock1Ptr->lilycoveLady;
|
||||
lilycoveLady->quiz.unk_016[0] = -1;
|
||||
overworld_free_bg_tilemaps();
|
||||
sub_811A8F0();
|
||||
}
|
||||
return;
|
||||
}
|
||||
gMain.state ++;
|
||||
}
|
||||
|
||||
void sub_811A858(void)
|
||||
{
|
||||
SetMainCallback2(sub_811A7E4);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user