through sub_8111070

This commit is contained in:
PikalaxALT
2018-10-11 12:36:39 -04:00
parent 1e65583712
commit b8054bbe5b
7 changed files with 140 additions and 216 deletions
-142
View File
@@ -5,148 +5,6 @@
.text
thumb_func_start sub_8111000
sub_8111000: @ 8111000
push {lr}
movs r0, 0x4
bl stdpal_get
movs r1, 0xF0
movs r2, 0x20
bl LoadPalette
movs r0, 0x2
bl sub_81109CC
bl sub_807DF64
ldr r2, _08111034 @ =gUnknown_203AE94
movs r0, 0
str r0, [r2]
ldrb r1, [r2]
subs r0, 0x10
ands r0, r1
movs r1, 0x2
orrs r0, r1
strb r0, [r2]
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_08111034: .4byte gUnknown_203AE94
thumb_func_end sub_8111000
thumb_func_start sub_8111038
sub_8111038: @ 8111038
push {lr}
movs r0, 0x4
bl stdpal_get
movs r1, 0xF0
movs r2, 0x20
bl LoadPalette
movs r0, 0x2
bl sub_81109CC
bl sub_807DF7C
ldr r2, _0811106C @ =gUnknown_203AE94
movs r0, 0
str r0, [r2]
ldrb r1, [r2]
subs r0, 0x10
ands r0, r1
movs r1, 0x2
orrs r0, r1
strb r0, [r2]
movs r0, 0x1
pop {r1}
bx r1
.align 2, 0
_0811106C: .4byte gUnknown_203AE94
thumb_func_end sub_8111038
thumb_func_start sub_8111070
sub_8111070: @ 8111070
push {r4-r7,lr}
sub sp, 0x14
lsls r0, 24
lsrs r7, r0, 24
movs r5, 0
_0811107A:
lsls r4, r5, 3
ldr r0, _0811111C @ =gUnknown_845661C
adds r4, r0
adds r0, r4, 0
bl AddWindow
ldr r6, _08111120 @ =gUnknown_203ADFE
adds r1, r5, r6
strb r0, [r1]
ldrb r0, [r1]
ldrb r1, [r4, 0x3]
lsls r1, 3
str r1, [sp]
ldrb r1, [r4, 0x4]
lsls r1, 3
str r1, [sp, 0x4]
movs r1, 0xF
movs r2, 0
movs r3, 0
bl FillWindowPixelRect
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0x2
bls _0811107A
ldr r5, _08111124 @ =gStringVar4
ldr r1, _08111128 @ =gUnknown_841A155
adds r0, r5, 0
bl StringExpandPlaceholders
cmp r7, 0
beq _081110D2
ldr r4, _0811112C @ =gStringVar1
adds r0, r4, 0
adds r1, r7, 0
movs r2, 0
movs r3, 0x1
bl ConvertIntToDecimalStringN
adds r0, r5, 0
adds r1, r4, 0
bl StringAppend
_081110D2:
ldrb r0, [r6]
movs r1, 0x1
str r1, [sp]
movs r1, 0x2
str r1, [sp, 0x4]
ldr r1, _08111130 @ =gUnknown_8456634
str r1, [sp, 0x8]
movs r1, 0
str r1, [sp, 0xC]
str r5, [sp, 0x10]
movs r1, 0x2
movs r2, 0x2
movs r3, 0x2
bl AddTextPrinterParametrized2
ldrb r0, [r6]
bl PutWindowTilemap
ldrb r0, [r6, 0x1]
bl PutWindowTilemap
ldrb r0, [r6]
movs r1, 0x2
bl CopyWindowToVram
ldrb r0, [r6, 0x2]
movs r1, 0x2
bl CopyWindowToVram
ldrb r0, [r6, 0x1]
movs r1, 0x3
bl CopyWindowToVram
add sp, 0x14
pop {r4-r7}
pop {r0}
bx r0
.align 2, 0
_0811111C: .4byte gUnknown_845661C
_08111120: .4byte gUnknown_203ADFE
_08111124: .4byte gStringVar4
_08111128: .4byte gUnknown_841A155
_0811112C: .4byte gStringVar1
_08111130: .4byte gUnknown_8456634
thumb_func_end sub_8111070
thumb_func_start sub_8111134
sub_8111134: @ 8111134
push {r4,lr}
+4 -73
View File
@@ -2089,7 +2089,7 @@ gUnknown_8419F54:: @ 8419F54
.incbin "baserom.gba", 0x419F54, 0x201
gUnknown_841A155:: @ 841A155
.incbin "baserom.gba", 0x41A155, 0x1A
.string "Previously on your quest$"
gUnknown_841A16F:: @ 841A16F
.incbin "baserom.gba", 0x41A16F, 0x24
@@ -3386,78 +3386,9 @@ gUnknown_8454003:: @ 8454003
gUnknown_8456618:: @ 8456618
.incbin "baserom.gba", 0x456618, 0x4
gUnknown_845661C:: @ 845661C
.incbin "baserom.gba", 0x45661C, 0x18
gUnknown_8456634:: @ 8456634
.incbin "baserom.gba", 0x456634, 0x4
gUnknown_8456638:: @ 8456638
.incbin "baserom.gba", 0x456638, 0x60
gUnknown_8456698:: @ 8456698
.incbin "baserom.gba", 0x456698, 0x4
gUnknown_845669C:: @ 845669C
.incbin "baserom.gba", 0x45669C, 0x8
gUnknown_84566A4:: @ 84566A4
.incbin "baserom.gba", 0x4566A4, 0x4
gUnknown_84566A8:: @ 84566A8
.incbin "baserom.gba", 0x4566A8, 0x280
gUnknown_8456928:: @ 8456928
.incbin "baserom.gba", 0x456928, 0x8
gUnknown_8456930:: @ 8456930
.incbin "baserom.gba", 0x456930, 0x4
gUnknown_8456934:: @ 8456934
.incbin "baserom.gba", 0x456934, 0x4
gUnknown_8456938:: @ 8456938
.incbin "baserom.gba", 0x456938, 0x8
gUnknown_8456940:: @ 8456940
.incbin "baserom.gba", 0x456940, 0x8
gUnknown_8456948:: @ 8456948
.incbin "baserom.gba", 0x456948, 0xAC
gUnknown_84569F4:: @ 84569F4
.incbin "baserom.gba", 0x4569F4, 0xAC
gUnknown_8456AA0:: @ 8456AA0
.incbin "baserom.gba", 0x456AA0, 0x2C
gUnknown_8456ACC:: @ 8456ACC
.incbin "baserom.gba", 0x456ACC, 0xC
gUnknown_8456AD8:: @ 8456AD8
.incbin "baserom.gba", 0x456AD8, 0xC
gUnknown_8456AE4:: @ 8456AE4
.incbin "baserom.gba", 0x456AE4, 0xC
gUnknown_8456AF0:: @ 8456AF0
.incbin "baserom.gba", 0x456AF0, 0xCC
gUnknown_8456BBC:: @ 8456BBC
.incbin "baserom.gba", 0x456BBC, 0x28
gUnknown_8456BE4:: @ 8456BE4
.incbin "baserom.gba", 0x456BE4, 0x33
gUnknown_8456C17:: @ 8456C17
.incbin "baserom.gba", 0x456C17, 0x9
gUnknown_8456C20:: @ 8456C20
.incbin "baserom.gba", 0x456C20, 0x30
gUnknown_8456C50:: @ 8456C50
.incbin "baserom.gba", 0x456C50, 0x24
@ quest_log.o
@ link_rfu_3.o
.section .rodata.8456C74
gUnknown_8456C74:: @ 8456C74
.incbin "baserom.gba", 0x456C74, 0x5C
+68
View File
@@ -0,0 +1,68 @@
.section .rodata
.align 2, 0
gUnknown_8456638:: @ 8456638
.incbin "baserom.gba", 0x456638, 0x60
gUnknown_8456698:: @ 8456698
.incbin "baserom.gba", 0x456698, 0x4
gUnknown_845669C:: @ 845669C
.incbin "baserom.gba", 0x45669C, 0x8
gUnknown_84566A4:: @ 84566A4
.incbin "baserom.gba", 0x4566A4, 0x4
gUnknown_84566A8:: @ 84566A8
.incbin "baserom.gba", 0x4566A8, 0x280
gUnknown_8456928:: @ 8456928
.incbin "baserom.gba", 0x456928, 0x8
gUnknown_8456930:: @ 8456930
.incbin "baserom.gba", 0x456930, 0x4
gUnknown_8456934:: @ 8456934
.incbin "baserom.gba", 0x456934, 0x4
gUnknown_8456938:: @ 8456938
.incbin "baserom.gba", 0x456938, 0x8
gUnknown_8456940:: @ 8456940
.incbin "baserom.gba", 0x456940, 0x8
gUnknown_8456948:: @ 8456948
.incbin "baserom.gba", 0x456948, 0xAC
gUnknown_84569F4:: @ 84569F4
.incbin "baserom.gba", 0x4569F4, 0xAC
gUnknown_8456AA0:: @ 8456AA0
.incbin "baserom.gba", 0x456AA0, 0x2C
gUnknown_8456ACC:: @ 8456ACC
.incbin "baserom.gba", 0x456ACC, 0xC
gUnknown_8456AD8:: @ 8456AD8
.incbin "baserom.gba", 0x456AD8, 0xC
gUnknown_8456AE4:: @ 8456AE4
.incbin "baserom.gba", 0x456AE4, 0xC
gUnknown_8456AF0:: @ 8456AF0
.incbin "baserom.gba", 0x456AF0, 0xCC
gUnknown_8456BBC:: @ 8456BBC
.incbin "baserom.gba", 0x456BBC, 0x28
gUnknown_8456BE4:: @ 8456BE4
.incbin "baserom.gba", 0x456BE4, 0x33
gUnknown_8456C17:: @ 8456C17
.incbin "baserom.gba", 0x456C17, 0x9
gUnknown_8456C20:: @ 8456C20
.incbin "baserom.gba", 0x456C20, 0x30
gUnknown_8456C50:: @ 8456C50
.incbin "baserom.gba", 0x456C50, 0x24
+2
View File
@@ -8,5 +8,7 @@ void sp13F_fall_to_last_warp(void);
void sub_80AF848(void);
void sub_80AF87C(void);
void sub_807DF64(void);
void sub_807DF7C(void);
#endif // GUARD_FIELD_FADETRANSITION_H
+1 -1
View File
@@ -32,7 +32,7 @@ void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirs
s8 ProcessMenuInputNoWrap_(void);
void do_scheduled_bg_tilemap_copies_to_vram(void);
void clear_scheduled_bg_copies_to_vram(void);
void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, s8 speed, const u8 *str);
void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3);
#endif // GUARD_MENU_H
+3
View File
@@ -370,6 +370,9 @@ SECTIONS {
data/data.o(.rodata);
src/battle_ai_script_commands.o(.rodata);
data/data_84827AC.o(.rodata);
src/quest_log.o(.rodata);
data/quest_log.o(.rodata);
data/data_84827AC.o(.rodata.8456C74);
src/menews_jisan.o(.rodata);
data/data_84827AC.o(.rodata.8468C98);
src/m4a_tables.o(.rodata);
+62
View File
@@ -1,9 +1,15 @@
#include "global.h"
#include "main.h"
#include "task.h"
#include "palette.h"
#include "menu.h"
#include "window.h"
#include "text_window.h"
#include "event_data.h"
#include "string_util.h"
#include "script.h"
#include "overworld.h"
#include "field_fadetransition.h"
#include "wild_encounter.h"
#include "help_system.h"
#include "quest_log.h"
@@ -28,6 +34,7 @@ EWRAM_DATA u8 gUnknown_203ADF8 = 0;
EWRAM_DATA u8 gUnknown_203ADF9 = 0;
EWRAM_DATA u8 gUnknown_203ADFA = 0;
EWRAM_DATA u16 gUnknown_203ADFC = 0;
EWRAM_DATA u8 gUnknown_203ADFE[3];
EWRAM_DATA void * gUnknown_203AE04 = NULL;
EWRAM_DATA void * gUnknown_203AE08 = NULL;
EWRAM_DATA void * gUnknown_203AE0C[32] = {NULL};
@@ -61,6 +68,15 @@ void * sub_8113BF4(void *);
void * sub_8113D48(void *, struct UnkStruct_203AE98 *);
void * sub_8113CC8(void *, struct UnkStruct_203AE98 *);
extern const u8 gUnknown_841A155[];
const struct WindowTemplate gUnknown_845661C[3] = {
{ 0, 0, 0, 30, 2, 15, 0x0e9 },
{ 0, 0, 18, 30, 2, 15, 0x0ad },
{ 0, 0, 14, 30, 6, 15, 0x14c }
};
const struct TextColor gUnknown_8456634 = {15, 1, 12};
void sub_8110840(void * a0)
{
@@ -529,3 +545,49 @@ void sub_8110FCC(void)
sub_8112940(1, gUnknown_203AE98, 0x100);
sub_8111150(gUnknown_203ADF8);
}
bool8 sub_8111000(void)
{
LoadPalette(stdpal_get(4), 0xF0, 0x20);
sub_81109CC(2);
sub_807DF64();
gUnknown_203AE94 = (struct UnkStruct_203AE94){};
gUnknown_203AE94.unk_0_0 = 2;
return 1;
}
bool8 sub_8111038(void)
{
LoadPalette(stdpal_get(4), 0xF0, 0x20);
sub_81109CC(2);
sub_807DF7C();
gUnknown_203AE94 = (struct UnkStruct_203AE94){};
gUnknown_203AE94.unk_0_0 = 2;
return 1;
}
void sub_8111070(u8 a0)
{
u8 i;
for (i = 0; i < 3; i++)
{
gUnknown_203ADFE[i] = AddWindow(&gUnknown_845661C[i]);
FillWindowPixelRect(gUnknown_203ADFE[i], 15, 0, 0, gUnknown_845661C[i].width * 8, gUnknown_845661C[i].height * 8);
}
StringExpandPlaceholders(gStringVar4, gUnknown_841A155);
if (a0)
{
ConvertIntToDecimalStringN(gStringVar1, a0, STR_CONV_MODE_LEFT_ALIGN, 1);
StringAppend(gStringVar4, gStringVar1);
}
AddTextPrinterParametrized2(gUnknown_203ADFE[0], 2, 2, 2, 1, 2, &gUnknown_8456634, 0, gStringVar4);
PutWindowTilemap(gUnknown_203ADFE[0]);
PutWindowTilemap(gUnknown_203ADFE[1]);
CopyWindowToVram(gUnknown_203ADFE[0], 2);
CopyWindowToVram(gUnknown_203ADFE[2], 2);
CopyWindowToVram(gUnknown_203ADFE[1], 3);
}