sub_812EEB0

This commit is contained in:
scnorton
2019-04-09 18:23:34 -04:00
parent fb423f957d
commit 789e598c92
7 changed files with 75 additions and 76 deletions
+5
View File
@@ -147,3 +147,8 @@
.2byte MAP_\map_name
.space 2
.endm
.macro window_template bg, top, left, height, width, palno, baseBlock
.byte \bg, \top, \left, \height, \width, \palno
.2byte \baseBlock
.endm
-71
View File
@@ -5,77 +5,6 @@
.text
thumb_func_start sub_812EEB0
sub_812EEB0: @ 812EEB0
push {r4-r6,lr}
sub sp, 0x14
ldr r0, _0812EF38 @ =gUnknown_8415D2C
ldr r1, _0812EF3C @ =gUnknown_8415D48
movs r5, 0x1
str r5, [sp]
movs r2, 0
movs r3, 0
bl sub_810F650
ldr r1, _0812EF40 @ =gUnknown_8462EB4
ldr r4, _0812EF44 @ =sOakSpeechResources
ldr r0, [r4]
ldrh r0, [r0, 0x12]
lsls r0, 2
adds r0, r1
ldr r0, [r0]
bl AddWindow
ldr r1, [r4]
movs r6, 0
strh r0, [r1, 0x14]
lsls r0, 24
lsrs r0, 24
bl PutWindowTilemap
ldr r0, [r4]
ldrb r0, [r0, 0x14]
movs r1, 0
bl FillWindowPixelBuffer
ldr r0, [r4]
ldrb r0, [r0, 0x14]
str r5, [sp]
str r5, [sp, 0x4]
ldr r1, _0812EF48 @ =gUnknown_8462EE8
str r1, [sp, 0x8]
str r6, [sp, 0xC]
ldr r1, _0812EF4C @ =gUnknown_81C582D
str r1, [sp, 0x10]
movs r1, 0x2
movs r2, 0x2
movs r3, 0
bl AddTextPrinterParametrized2
ldr r0, [r4]
ldrb r0, [r0, 0x14]
movs r1, 0x3
bl CopyWindowToVram
movs r1, 0xC0
lsls r1, 6
movs r0, 0x5
str r0, [sp]
movs r0, 0x10
str r0, [sp, 0x4]
movs r0, 0x1
movs r2, 0x1
movs r3, 0x3
bl FillBgTilemapBufferRect_Palette0
movs r0, 0x1
bl CopyBgTilemapBufferToVram
add sp, 0x14
pop {r4-r6}
pop {r0}
bx r0
.align 2, 0
_0812EF38: .4byte gUnknown_8415D2C
_0812EF3C: .4byte gUnknown_8415D48
_0812EF40: .4byte gUnknown_8462EB4
_0812EF44: .4byte sOakSpeechResources
_0812EF48: .4byte gUnknown_8462EE8
_0812EF4C: .4byte gUnknown_81C582D
thumb_func_end sub_812EEB0
thumb_func_start sub_812EF50
sub_812EF50: @ 812EF50
push {r4-r7,lr}
+8 -2
View File
@@ -587,11 +587,17 @@ gUnknown_8415CE8:: @ 8415CE8
.incbin "baserom.gba", 0x415CE8, 0x44
gUnknown_8415D2C:: @ 8415D2C
.incbin "baserom.gba", 0x415D2C, 0x1C
.string "CONTROLS$"
.align 2
gUnknown_8415D38:: @ 8415D2C
.string "{KEYGFX_DPAD_UP_DOWN} {KEYGFX_A_BUTTON}$"
.align 2
gUnknown_8415D48:: @ 8415D48
.incbin "baserom.gba", 0x415D48, 0x8
.string "{KEYGFX_A_BUTTON}NEXT$"
.align 2
gUnknown_8415D50:: @ 8415D50
.incbin "baserom.gba", 0x415D50, 0x10
+37 -2
View File
@@ -1,3 +1,6 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
@@ -42,10 +45,42 @@ gUnknown_84623EC:: @ 84623EC
.incbin "baserom.gba", 0x4623EC, 0xA6C
gUnknown_8462E58:: @ 8462E58
.incbin "baserom.gba", 0x462E58, 0x5C
.incbin "baserom.gba", 0x462E58, 0xC
gUnknown_8462E64:: @ 8462E64
window_template 0x00, 0x00, 0x07, 0x1e, 0x04, 0x0f, 0x0001
gUnknown_8462E6C:: @ 8462E6C
window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000
gUnknown_8462E74:: @ 8462E74
window_template 0x00, 0x06, 0x03, 0x18, 0x06, 0x0f, 0x0001
gUnknown_8462E7C:: @ 8462E7C
window_template 0x00, 0x06, 0x0a, 0x18, 0x04, 0x0f, 0x0092
gUnknown_8462E84:: @ 8462E84
window_template 0x00, 0x06, 0x0f, 0x18, 0x04, 0x0f, 0x00f3
gUnknown_8462E8C:: @ 8462E8C
window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000
gUnknown_8462E94:: @ 8462E94
window_template 0x00, 0x06, 0x03, 0x18, 0x04, 0x0f, 0x0001
gUnknown_8462E9C:: @ 8462E9C
window_template 0x00, 0x06, 0x08, 0x18, 0x04, 0x0f, 0x0062
gUnknown_8462EA4:: @ 8462EA4
window_template 0x00, 0x06, 0x0d, 0x18, 0x06, 0x0f, 0x00c3
gUnknown_8462EAC:: @ 8462EAC
window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000
gUnknown_8462EB4:: @ 8462EB4
.incbin "baserom.gba", 0x462EB4, 0xC
.4byte gUnknown_8462E64
.4byte gUnknown_8462E74
.4byte gUnknown_8462E94
gUnknown_8462EC0:: @ 8462EC0
.incbin "baserom.gba", 0x462EC0, 0x8
+2
View File
@@ -705,4 +705,6 @@ extern const u8 gFameCheckerFlavorTextOriginObjectName_Giovanni3[];
extern const u8 gFameCheckerFlavorTextOriginObjectName_Giovanni4[];
extern const u8 gFameCheckerFlavorTextOriginObjectName_Giovanni5[];
extern const u8 gUnknown_81C582D[];
#endif //GUARD_EVENT_SCRIPTS_H
+1
View File
@@ -39,5 +39,6 @@ void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3);
void sub_810F4D8(u8 windowId, bool32 someBool);
void *sub_80F68F0(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
void sub_810F558(u8, u8, u8, u8, u16);
void sub_810F650(const u8 *, const u8 *, u8, u32, u8);
#endif // GUARD_MENU_H
+22 -1
View File
@@ -14,12 +14,16 @@
#include "new_menu_helpers.h"
#include "pokemon_3.h"
#include "sound.h"
#include "event_scripts.h"
#include "scanline_effect.h"
#include "constants/species.h"
struct OakSpeechResources
{
u8 filler_0000[0x1F];
u8 filler_0000[0x12];
u16 unk_0012;
u16 unk_0014;
u8 filler_0016[9];
u8 unk_001F;
u8 filler_0020[0x1800];
u8 bg2TilemapBuffer[0x400];
@@ -33,6 +37,9 @@ void sub_812EB58(u8 taskId);
void sub_812EEB0(void);
void sub_812F0B0(u8 taskId);
extern const u8 gUnknown_8415D2C[];
extern const u8 gUnknown_8415D48[];
const u8 gUnknown_845FD54[][5] = {
[SPECIES_BULBASAUR - 1] = {0x16, 0x1b, 0x30, 0x16, 0x29},
[SPECIES_IVYSAUR - 1] = {0x14, 0x1b, 0x30, 0x15, 0x2a},
@@ -453,6 +460,8 @@ ALIGNED(4) const u16 gUnknown_8460568[] = INCBIN_U16("data/oak_speech/unk_846056
const u32 gUnknown_84605E8[] = INCBIN_U32("data/oak_speech/unk_84605E8.4bpp.lz");
extern const struct BgTemplate gUnknown_8462E58[3];
extern const struct WindowTemplate *const gUnknown_8462EB4[3];
extern const struct TextColor gUnknown_8462EE8;
void sub_812E944(u8 a0, u8 a1, u8 a2, u8 a3, u8 a4, u8 a5)
{
@@ -648,3 +657,15 @@ void sub_812EB58(u8 taskId)
gMain.state++;
}
void sub_812EEB0(void)
{
sub_810F650(gUnknown_8415D2C, gUnknown_8415D48, 0, 0, 1);
sOakSpeechResources->unk_0014 = AddWindow(gUnknown_8462EB4[sOakSpeechResources->unk_0012]);
PutWindowTilemap(sOakSpeechResources->unk_0014);
FillWindowPixelBuffer(sOakSpeechResources->unk_0014, 0x00);
AddTextPrinterParametrized2(sOakSpeechResources->unk_0014, 2, 2, 0, 1, 1, &gUnknown_8462EE8, 0, gUnknown_81C582D);
CopyWindowToVram(sOakSpeechResources->unk_0014, 3);
FillBgTilemapBufferRect_Palette0(1, 0x3000, 1, 3, 5, 16);
CopyBgTilemapBufferToVram(1);
}