Merge pull request #551 from Lincoln-LM/memo-pad

Poketch Memo Pad (ov24) Decompilation
This commit is contained in:
red031000
2024-09-28 04:57:13 +01:00
committed by GitHub
33 changed files with 677 additions and 1304 deletions

View File

@@ -904,8 +904,8 @@ Overlay OVERLAY_24
{
##Memo Pad##
After OVERLAY_20
Object overlay_24_sinit.o
Object overlay_24.o
Object ov24_02254840.o
Object ov24_02254CA0.o
}
Overlay OVERLAY_25

View File

@@ -7960,9 +7960,9 @@
.extern ov20_022529A0
.extern ov20_022529B4
.extern ov20_02252B1C
.extern ov20_02252B28
.extern Poketch_PlaySoundEffect
.extern ov20_02252B48
.extern ov20_02252B68
.extern TouchScreen_GetTapState
.extern ov20_02252BB8
.extern ov20_02252C08
.extern ov20_02252C14
@@ -8030,6 +8030,20 @@
.extern ov21_02254B10
.extern ov21_02254B34
.extern ov21_02254B40
.extern ov24_02254854
.extern ov24_022548F4
.extern ov24_02254998
.extern ov24_022549AC
.extern ov24_022549F8
.extern ov24_02254C64
.extern ov24_02254D00
.extern ov24_02254DC8
.extern ov24_02254DDC
.extern ov24_02254EE0
.extern ov24_02254F28
.extern ov24_02254F40
.extern ov24_02255038
.extern ov24_02255050
.extern ov26_02254BD4
.extern ov26_02254C04
.extern ov26_02254C10

View File

@@ -28,9 +28,9 @@ void ov19_02252440(struct BgConfig * bgConfig)
GX_SetBankForSubOBJ(0x100);
GXS_SetOBJVRamModeChar(GX_OBJVRAMMODE_CHAR_1D_32K);
InitBgFromTemplate(bgConfig, GF_BG_LYR_SUB_0, &ov19_02252508, GF_BG_TYPE_TEXT);
GfGfxLoader_LoadCharData(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0010_NCGR_lz, bgConfig, GF_BG_LYR_SUB_0, 0, 0, TRUE, HEAP_ID_8);
GfGfxLoader_LoadScrnData(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0011_NSCR_lz, bgConfig, GF_BG_LYR_SUB_0, 0, 0, TRUE, HEAP_ID_8);
GfGfxLoader_GXLoadPal(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0012_NCLR, GF_PAL_LOCATION_SUB_BG, GF_PAL_SLOT_0_OFFSET, 0x20, HEAP_ID_8);
GfGfxLoader_LoadCharData(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0010_NCGR_lz, bgConfig, GF_BG_LYR_SUB_0, 0, 0, TRUE, HEAP_ID_POKETCH_APP);
GfGfxLoader_LoadScrnData(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0011_NSCR_lz, bgConfig, GF_BG_LYR_SUB_0, 0, 0, TRUE, HEAP_ID_POKETCH_APP);
GfGfxLoader_GXLoadPal(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0012_NCLR, GF_PAL_LOCATION_SUB_BG, GF_PAL_SLOT_0_OFFSET, 0x20, HEAP_ID_POKETCH_APP);
GXS_SetVisibleWnd(GX_WNDMASK_NONE);
GXS_SetVisiblePlane(GX_PLANEMASK_BG0);
}
@@ -38,7 +38,7 @@ void ov19_02252440(struct BgConfig * bgConfig)
void ov19_022524F4(struct BgConfig * bgConfig)
{
FreeBgTilemapBuffer(bgConfig, GF_BG_LYR_SUB_0);
DestroyHeap(HEAP_ID_8);
DestroyHeap(HEAP_ID_POKETCH_APP);
}
BOOL ov19_02252504(struct BgConfig * bgConfig)

View File

@@ -1004,8 +1004,8 @@ ov20_02252B1C: ; 0x02252B1C
.align 2, 0
thumb_func_end ov20_02252B1C
thumb_func_start ov20_02252B28
ov20_02252B28: ; 0x02252B28
thumb_func_start Poketch_PlaySoundEffect
Poketch_PlaySoundEffect: ; 0x02252B28
push {r4, lr}
add r4, r0, #0
bl ov20_02252440
@@ -1020,7 +1020,7 @@ ov20_02252B28: ; 0x02252B28
bl PlaySE
_02252B46:
pop {r4, pc}
thumb_func_end ov20_02252B28
thumb_func_end Poketch_PlaySoundEffect
thumb_func_start ov20_02252B48
ov20_02252B48: ; 0x02252B48
@@ -1040,8 +1040,8 @@ _02252B66:
pop {r4, pc}
thumb_func_end ov20_02252B48
thumb_func_start ov20_02252B68
ov20_02252B68: ; 0x02252B68
thumb_func_start TouchScreen_GetTapState
TouchScreen_GetTapState: ; 0x02252B68
push {r3, r4, r5, lr}
add r5, r0, #0
add r4, r1, #0
@@ -1085,7 +1085,7 @@ _02252BB0:
_02252BB4:
mov r0, #0
pop {r3, r4, r5, pc}
thumb_func_end ov20_02252B68
thumb_func_end TouchScreen_GetTapState
thumb_func_start ov20_02252BB8
ov20_02252BB8: ; 0x02252BB8

View File

@@ -26,7 +26,7 @@ static void ov21_02254840(void)
BOOL ov21_02254854(UnkStruct02254854 **param0, u32 param1, u32 param2, u32 param3)
{
UnkStruct02254854 *alloced = (UnkStruct02254854 *)AllocFromHeap(HEAP_ID_8, sizeof(UnkStruct02254854));
UnkStruct02254854 *alloced = (UnkStruct02254854 *)AllocFromHeap(HEAP_ID_POKETCH_APP, sizeof(UnkStruct02254854));
if (alloced != NULL)
{
if (ov21_0225489C(alloced, param1, param2, param3) && SysTask_CreateOnMainQueue((SysTaskFunc)ov21_02254930, (void *)alloced, 1))

View File

@@ -40,7 +40,7 @@ extern void ov11_02252DB4(u32 param0, u32 param1);
BOOL ov21_02254A6C(UnkStruct02254A6C *param0, void *param1)
{
UnkStruct02254A6C *strct = (UnkStruct02254A6C *)AllocFromHeap(HEAP_ID_8, 3 << 8);
UnkStruct02254A6C *strct = (UnkStruct02254A6C *)AllocFromHeap(HEAP_ID_POKETCH_APP, 3 << 8);
u32 sp4;
if (strct != NULL)
{

View File

@@ -1386,7 +1386,7 @@ ov22_02255268: ; 0x02255268
mov r1, #6
bl BgCommitTilemapBufferToVram
ldr r0, _022552A8 ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov22_02255084
pop {r3, r4, r5, pc}
@@ -1482,7 +1482,7 @@ _02255358:
cmp r0, #0
beq _0225537A
ldr r0, _0225537C ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldrb r1, [r5, #3]
ldr r0, [r4, #4]
bl ov22_02255544
@@ -1543,7 +1543,7 @@ _022553D8:
cmp r0, #0
beq _022553FA
ldr r0, _022553FC ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldrb r1, [r5, #3]
ldr r0, [r4, #4]
bl ov22_02255544
@@ -1599,7 +1599,7 @@ _0225543A:
mov r1, #6
bl BgCommitTilemapBufferToVram
ldr r0, _02255498 ; =0x00000666
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r6, #0
bl ov20_022538B0
_02255468:

View File

@@ -1293,7 +1293,7 @@ ov23_022551A4: ; 0x022551A4
add r4, r0, #0
ldrh r5, [r5]
ldr r0, _022551F8 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
lsl r3, r5, #2
ldr r0, _022551FC ; =ov23_02255FB9
ldr r2, _02255200 ; =ov23_02255FFC

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,78 @@
#ifndef POKEDIAMOND_OVERLAY_24_H
#define POKEDIAMOND_OVERLAY_24_H
typedef enum {
TOUCH_TYPE_ERASE = 0,
TOUCH_TYPE_DRAW = 1,
} TouchType;
typedef enum {
MEMO_PAD_PIXEL_TYPE_FILLED = 1,
MEMO_PAD_PIXEL_TYPE_EMPTY = 4,
} MemoPadPixelType;
typedef struct MemoPadDrawState
{
TouchType touchType;
u32 lastModifiedX;
u32 lastModifiedY;
u8 pixelData[78][75];
u16 padding;
u32 unk16E8;
} MemoPadDrawState;
typedef struct MemoPadDisplayHandler
{
MemoPadDrawState *drawState;
BgConfig *config;
u32 unk8;
u8 unkC[0x44];
u32 unk50;
u8 unk54[0x14];
u32 *unk68[2];
Window *window;
} MemoPadDisplayHandler;
typedef struct MemoPadAppHandler
{
u8 unk0;
u8 unk1;
u8 unk2;
u8 touchHeld;
u32 unk4;
MemoPadDrawState drawState;
MemoPadDisplayHandler *displayHandler;
u32 unk16F8;
u32 unk16FC;
} MemoPadAppHandler;
BOOL ov24_02254854(MemoPadAppHandler **appHandlerOut, s32 arg1, s32 arg2, s32 arg3);
BOOL ov24_0225489C(MemoPadAppHandler *appHandler, u32 arg1, u32 arg2, u32 arg3);
void ov24_022548F4(MemoPadAppHandler *appHandler);
void ov24_02254918(void *arg0, MemoPadAppHandler *appHandler);
void ov24_02254960(s32 arg0, s32 arg1, s32 arg2, MemoPadAppHandler *appHandler);
void ov24_02254990(MemoPadAppHandler *appHandler);
void ov24_02254998(MemoPadAppHandler *appHandler, u8 arg1);
BOOL ov24_022549AC(MemoPadAppHandler *appHandler);
BOOL ov24_022549F8(MemoPadAppHandler *appHandler);
BOOL ov24_02254A70(MemoPadAppHandler *appHandler);
BOOL ov24_02254AD4(MemoPadAppHandler *appHandler);
void ov24_02254B20(MemoPadAppHandler *appHandler, u32 arg1, u32 arg2, u32 arg3, u32 arg4);
BOOL ov24_02254C64(MemoPadAppHandler *appHandler);
BOOL ov24_02254CA0(MemoPadDisplayHandler **displayHandlerOut, MemoPadDrawState *drawState);
BOOL ov24_02254D00(MemoPadDisplayHandler *displayHandler);
void ov24_02254D48(MemoPadDisplayHandler *displayHandler);
void ov24_02254D8C(MemoPadDisplayHandler *displayHandler, u32 arg1);
BOOL ov24_02254DB0(MemoPadDisplayHandler *displayHandler, u8 arg1);
BOOL ov24_02254DBC(MemoPadDisplayHandler *displayHandler);
void ov24_02254DC8(void *arg0);
void ov24_02254DDC(void *arg0, void *arg1);
void ov24_02254EE0(u32 arg0, void *arg1);
void ov24_02254F28(s32 arg0, void *arg1);
void ov24_02254F40(u32 arg0, void *arg1);
void ov24_02255038(u32 arg0, void *arg1);
void ov24_02255050(u32 arg0, void *arg1);
void ov24_02255078(MemoPadDisplayHandler *displayHandler);
void ov24_022550D4(MemoPadDisplayHandler *displayHandler);
#endif //POKEDIAMOND_OVERLAY_24_H

View File

@@ -0,0 +1,254 @@
#include "global.h"
#include "bg_window.h"
#include "unk_0200CA44.h"
#include "gf_gfx_loader.h"
#include "overlay_24.h"
extern void Poketch_InitApp(void *func1, void *func2);
extern u32 ov20_02254130(void *arg0, u32 arg1, void *arg2, void *arg3, u32 arg4);
extern void ov20_02254198(u32 arg0);
extern void ov20_02252C14(u32 arg0, u32 arg1);
extern void ov20_022529A0(u32 arg0);
extern void ov20_0225298C(u32 arg0);
extern BOOL ov20_02252C08(u32 arg0);
extern BOOL TouchScreen_GetTapState(u32 *arg0, u32 *arg1);
static void ov24_02254840(void)
{
Poketch_InitApp(ov24_02254854, ov24_02254990);
}
#define NitroStaticInit ov24_02254840
#include "sinit.h"
BOOL ov24_02254854(MemoPadAppHandler **appHandlerOut, s32 arg1, s32 arg2, s32 arg3) {
MemoPadAppHandler *appHandler = AllocFromHeap(HEAP_ID_POKETCH_APP, sizeof(MemoPadAppHandler));
if (appHandler != NULL) {
if (ov24_0225489C(appHandler, arg1, arg2, arg3)) {
if (SysTask_CreateOnMainQueue((SysTaskFunc)ov24_02254918, appHandler, 1) != NULL) {
*appHandlerOut = appHandler;
return TRUE;
}
}
FreeToHeap(appHandler);
}
return FALSE;
}
BOOL ov24_0225489C(MemoPadAppHandler *appHandler, u32 arg1, u32 arg2, u32 arg3) {
static const u8 ov24_022550F8[] = {
0x18, 0x58, 0xB4, 0xCC, 0x68, 0xA8, 0xB4, 0xCC
};
appHandler->drawState.unk16E8 = arg3;
appHandler->drawState.touchType = TOUCH_TYPE_DRAW;
if (ov24_02254CA0(&(appHandler->displayHandler), &(appHandler->drawState))) {
appHandler->unk0 = 0;
appHandler->unk1 = 0;
appHandler->unk2 = 0;
appHandler->touchHeld = FALSE;
appHandler->unk16FC = ov20_02254130(ov24_022550F8, 2, ov24_02254960, appHandler, 8);
appHandler->unk16F8 = arg1;
return TRUE;
}
return FALSE;
}
void ov24_022548F4(MemoPadAppHandler *appHandler) {
ov20_02254198(appHandler->unk16FC);
ov24_02254D48(appHandler->displayHandler);
FreeToHeap(appHandler);
}
void ov24_02254918(void *arg0, MemoPadAppHandler *appHandler) {
static BOOL (*const ov24_02255100[3])(MemoPadAppHandler*) = {
ov24_022549AC, ov24_022549F8, ov24_02254C64
};
if (appHandler->unk0 < 3) {
ov20_02252C14(appHandler->unk16F8, appHandler->unk16FC);
if (ov24_02255100[appHandler->unk0](appHandler)) {
ov24_022548F4(appHandler);
sub_0200CAB4((s32)arg0);
ov20_022529A0(appHandler->unk16F8);
}
}
}
void ov24_02254960(s32 arg0, s32 arg1, s32 arg2, MemoPadAppHandler *appHandler) {
if (arg2 == 1) {
if (
(appHandler->drawState.touchType == TOUCH_TYPE_DRAW && arg0 == 0)
|| (appHandler->drawState.touchType == TOUCH_TYPE_ERASE && arg0 == 1)
) {
appHandler->drawState.touchType ^= 1;
ov24_02254D8C(appHandler->displayHandler, 1);
}
}
}
void ov24_02254990(MemoPadAppHandler *appHandler) {
appHandler->unk2 = 1;
}
void ov24_02254998(MemoPadAppHandler *appHandler, u8 arg1) {
if (appHandler->unk2 == 0) {
appHandler->unk0 = arg1;
}
else {
appHandler->unk0 = 2;
}
appHandler->unk1 = 0;
}
BOOL ov24_022549AC(MemoPadAppHandler *appHandler) {
switch (appHandler->unk1) {
case 0:
ov24_02254D8C(appHandler->displayHandler, 0);
appHandler->unk1++;
break;
case 1:
if (ov24_02254DB0(appHandler->displayHandler, 0)) {
ov20_0225298C(appHandler->unk16F8);
ov24_02254998(appHandler, 1);
}
break;
default:
break;
}
return FALSE;
}
BOOL ov24_022549F8(MemoPadAppHandler *appHandler) {
if (appHandler->unk2 != 0) {
ov24_02254998(appHandler, 2);
}
switch (appHandler->unk1) {
case 0:
if (ov20_02252C08(appHandler->unk16F8)) {
break;
}
if (appHandler->touchHeld) {
u32 x = appHandler->drawState.lastModifiedX;
u32 y = appHandler->drawState.lastModifiedY;
if (ov24_02254AD4(appHandler)) {
ov24_02254B20(appHandler, x, y, appHandler->drawState.lastModifiedX, appHandler->drawState.lastModifiedY);
} else {
appHandler->touchHeld = FALSE;
}
} else {
if (ov24_02254A70(appHandler)) {
ov24_02254D8C(appHandler->displayHandler, 3);
appHandler->touchHeld = TRUE;
}
}
break;
}
return FALSE;
}
BOOL ov24_02254A70(MemoPadAppHandler *appHandler) {
u32 x, y;
if (TouchScreen_GetTapState(&x, &y)) {
if (((x - 16) < 156) & ((y - 16) < 150)) {
x = (x - 16) >> 1;
y = (y - 16) >> 1;
if (appHandler->drawState.pixelData[x][y] != appHandler->drawState.touchType) {
appHandler->drawState.pixelData[x][y] = appHandler->drawState.touchType;
appHandler->drawState.lastModifiedX = x;
appHandler->drawState.lastModifiedY = y;
return TRUE;
}
}
}
return FALSE;
}
BOOL ov24_02254AD4(MemoPadAppHandler *appHandler) {
u32 x, y;
if (TouchScreen_GetTapState(&x, &y)) {
if (((x - 16) < 156) & ((y - 16) < 150)) {
x = (x - 16) >> 1;
y = (y - 16) >> 1;
appHandler->drawState.lastModifiedX = x;
appHandler->drawState.lastModifiedY = y;
return TRUE;
}
}
return FALSE;
}
void ov24_02254B20(MemoPadAppHandler *appHandler, u32 x0, u32 y0, u32 x1, u32 y1) {
if (y0 == y1 && x0 == x1) {
return;
}
u32 dx = x1 > x0 ? x1 - x0 : x0 - x1;
u32 dy = y1 > y0 ? y1 - y0 : y0 - y1;
s32 direction, offset;
fx32 f, g;
if (dx > dy) {
direction = (x1 > x0) ? 1 : -1;
if (dx != 0) {
f = ((y1 - y0) * 0x1000);
f /= (s32)dx;
} else {
f = 0;
}
g = (y0 << 12) + f;
x0 += direction;
while (x0 != x1) {
offset = g >> 12;
if ((x0 < 0x4e) && ((u32)offset < 0x4b)) {
if (appHandler->drawState.touchType != appHandler->drawState.pixelData[x0][offset]) {
appHandler->drawState.pixelData[x0][offset] = appHandler->drawState.touchType;
appHandler->drawState.lastModifiedX = x0;
appHandler->drawState.lastModifiedY = offset;
ov24_02254D8C(appHandler->displayHandler, 3);
}
}
x0 += direction;
g += f;
}
} else {
direction = (y1 > y0) ? 1 : -1;
if (dy != 0) {
f = ((x1 - x0) * 0x1000);
f /= (s32)dy;
} else {
f = 0;
}
g = (x0 << 12) + f;
y0 += direction;
while (y0 != y1) {
offset = g >> 12;
if ((y0 < 0x4b) && ((u32)offset < 0x4e)) {
if (appHandler->drawState.touchType != appHandler->drawState.pixelData[offset][y0]) {
appHandler->drawState.pixelData[offset][y0] = appHandler->drawState.touchType;
appHandler->drawState.lastModifiedX = offset;
appHandler->drawState.lastModifiedY = y0;
ov24_02254D8C(appHandler->displayHandler, 3);
}
}
y0 += direction;
g += f;
}
}
if ((y1 < 75) && (x1 < 78)) {
appHandler->drawState.lastModifiedX = x1;
appHandler->drawState.lastModifiedY = y1;
ov24_02254D8C(appHandler->displayHandler, 3);
}
}
BOOL ov24_02254C64(MemoPadAppHandler *appHandler) {
switch (appHandler->unk1) {
case 0:
ov24_02254D8C(appHandler->displayHandler, 5);
appHandler->unk1++;
break;
case 1:
if (ov24_02254DBC(appHandler->displayHandler)) {
return TRUE;
}
break;
}
return FALSE;
}

View File

@@ -0,0 +1,248 @@
#include "global.h"
#include "bg_window.h"
#include "unk_0200CA44.h"
#include "gf_gfx_loader.h"
#include "overlay_24.h"
#include "SPI_pm.h"
#include "constants/sndseq.h"
#include "graphic/poketch.naix"
extern BOOL sub_0208946C(u32 arg0, void *arg1, u32 arg2);
extern void sub_02089444(u32 arg0, void *arg1, u32 arg2);
extern void ov20_02252D7C(u32 arg0, u32 arg1);
extern void ov20_02253F28(u32 *arg0, u32 arg1);
extern void Poketch_PlaySoundEffect(u32 arg0);
extern void *ov20_022538A0(void *arg0);
extern void ov20_02253888(u32 *arg0, void *arg1);
extern BOOL ov20_022537B8(void *arg0);
extern BOOL ov20_02253794(void *arg0, u8 arg1);
extern void ov20_022537E0(const u32 *arg0, u32 arg1, void *arg2, void *arg3, void *arg4, u32 arg5, u32 arg6);
extern BOOL ov20_02253FBC(void *arg0, NarcId arg1, u32 arg2, u32 arg3, HeapID arg4);
extern u32 *ov20_02253E74(u32 arg0, void *arg1, void *arg2);
extern void ov20_02254014(void *arg0);
extern void ov20_02253F14(u32 arg0, void *arg1);
extern void ov20_022536F4(void *arg0, u32 arg1);
extern BgConfig *ov20_02252D34();
extern u32 ov20_02252D24();
BOOL ov24_02254CA0(MemoPadDisplayHandler **displayHandlerOut, MemoPadDrawState *drawState) {
MemoPadDisplayHandler *displayHandler = AllocFromHeap(HEAP_ID_POKETCH_APP, sizeof(MemoPadDisplayHandler));
if (displayHandler != NULL) {
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_MAIN));
ov20_022536F4(&(displayHandler->unk8), 0x10);
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_MAIN));
displayHandler->drawState = drawState;
displayHandler->config = ov20_02252D34();
displayHandler->unk50 = ov20_02252D24();
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_MAIN));
*displayHandlerOut = displayHandler;
return TRUE;
}
return FALSE;
}
BOOL ov24_02254D00(MemoPadDisplayHandler *displayHandler) {
static const WindowTemplate template = {
.bgId = GF_BG_LYR_SUB_3,
.left = 2,
.top = 2,
.width = 20,
.height = 19,
.palette = 0,
.baseTile = 12,
};
displayHandler->window = AllocWindows(HEAP_ID_POKETCH_APP, 1);
if (displayHandler->window != NULL) {
AddWindow(displayHandler->config, displayHandler->window, &template);
if (sub_0208946C(displayHandler->drawState->unk16E8, displayHandler->window->pixelBuffer, 0x2f80) == 0) {
FillWindowPixelBuffer(displayHandler->window, MEMO_PAD_PIXEL_TYPE_EMPTY);
}
return TRUE;
}
return FALSE;
}
void ov24_02254D48(MemoPadDisplayHandler *displayHandler) {
if (displayHandler != NULL) {
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_MAIN));
if (displayHandler->window != NULL) {
sub_02089444(displayHandler->drawState->unk16E8, displayHandler->window->pixelBuffer, 0x2f80);
RemoveWindow(displayHandler->window);
FreeToHeap(displayHandler->window);
}
FreeToHeap(displayHandler);
}
}
void ov24_02254D8C(MemoPadDisplayHandler *displayHandler, u32 arg1) {
// TODO: types
static const u32 ov24_0225516C[] = {
0x00, (u32)ov24_02254DDC, 0x00,
0x01, (u32)ov24_02254EE0, 0x00,
0x02, (u32)ov24_02254F28, 0x00,
0x03, (u32)ov24_02254F40, 0x00,
0x04, (u32)ov24_02255038, 0x00,
0x05, (u32)ov24_02255050, 0x00,
0x00, 0x00000000, 0x00,
};
ov20_022537E0(ov24_0225516C, arg1, displayHandler, displayHandler->drawState, &(displayHandler->unk8), 2, 8);
}
BOOL ov24_02254DB0(MemoPadDisplayHandler *displayHandler, u8 arg1) {
return ov20_02253794(&(displayHandler->unk8), arg1);
}
BOOL ov24_02254DBC(MemoPadDisplayHandler *displayHandler) {
return ov20_022537B8(&(displayHandler->unk8));
}
void ov24_02254DC8(void *arg0) {
ov20_02253888(&(((MemoPadDisplayHandler*)ov20_022538A0(arg0))->unk8), arg0);
}
void ov24_02254DDC(void *arg0, void *arg1) {
static const BgTemplate template_7000 = {
.x = 0,
.y = 0,
.bufferSize = 0,
.baseTile = 0,
.size = 1,
.colorMode = 0,
.screenBase = GX_BG_SCRBASE_0x7000,
.charBase = GX_BG_CHARBASE_0x00000,
.bgExtPltt = 0,
.priority = 2,
.areaOver = 0,
.dummy = 0,
.mosaic = 0,
};
static const BgTemplate template_7800 = {
.x = 0,
.y = 0,
.bufferSize = 0x800,
.baseTile = 0,
.size = 1,
.colorMode = 0,
.screenBase = GX_BG_SCRBASE_0x7800,
.charBase = GX_BG_CHARBASE_0x00000,
.bgExtPltt = 0,
.priority = 3,
.areaOver = 0,
.dummy = 0,
.mosaic = 0,
};
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_APP));
GXSDispCnt dispcnt;
MemoPadDisplayHandler *displayHandler = ov20_022538A0(arg1);
InitBgFromTemplate(displayHandler->config, GF_BG_LYR_SUB_2, &template_7000, 0);
InitBgFromTemplate(displayHandler->config, GF_BG_LYR_SUB_3, &template_7800, 0);
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_APP));
GfGfxLoader_LoadCharData(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0030_bin, displayHandler->config, GF_BG_LYR_SUB_2, 0, 0, TRUE, HEAP_ID_POKETCH_APP);
GfGfxLoader_LoadScrnData(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0031_NSCR, displayHandler->config, GF_BG_LYR_SUB_2, 0, 0, TRUE, HEAP_ID_POKETCH_APP);
ov20_02252D7C(0,0);
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_APP));
ov24_02254D00(displayHandler);
CopyWindowToVram(displayHandler->window);
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_APP));
ov24_02255078(displayHandler);
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_APP));
BgCommitTilemapBufferToVram(displayHandler->config, GF_BG_LYR_SUB_3);
dispcnt.raw = reg_GXS_DB_DISPCNT;
GXS_SetVisiblePlane(dispcnt.visiblePlane | GX_PLANEMASK_BG2 | GX_PLANEMASK_OBJ);
ov24_02254DC8(arg1);
GF_ASSERT(GF_heap_c_dummy_return_true(HEAP_ID_POKETCH_APP));
}
void ov24_02254EE0(u32 arg0, void *arg1) {
MemoPadDisplayHandler *displayHandler = ov20_022538A0(arg1);
if (displayHandler->drawState->touchType == TOUCH_TYPE_DRAW) {
ov20_02253F28(displayHandler->unk68[0], 0);
ov20_02253F28(displayHandler->unk68[1], 3);
} else {
ov20_02253F28(displayHandler->unk68[0], 1);
ov20_02253F28(displayHandler->unk68[1], 2);
}
Poketch_PlaySoundEffect(SEQ_SE_DP_POKETCH_003);
ov24_02254DC8(arg1);
}
void ov24_02254F28(s32 arg0, void *arg1) {
MemoPadDisplayHandler *displayHandler = ov20_022538A0(arg1);
CopyWindowPixelsToVram_TextMode(displayHandler->window);
ov24_02254DC8(arg1);
}
void ov24_02254F40(u32 arg0, void *arg1) {
MemoPadDisplayHandler *displayHandler = ov20_022538A0(arg1);
MemoPadDrawState *drawState = displayHandler->drawState;
if (drawState->touchType == TOUCH_TYPE_ERASE) {
s32 width, height;
width = height = 8;
s32 x = drawState->lastModifiedX * 2 - 4;
s32 y = drawState->lastModifiedY * 2 - 4;
if (x < 0) {
width += x;
x = 0;
}
if (y < 0) {
height += y;
y = 0;
}
FillWindowPixelRect(displayHandler->window, MEMO_PAD_PIXEL_TYPE_EMPTY, x, y, width, height);
s32 a = (x >> 3) + (y >> 3) * 0x14;
s32 e = ((x + width - 1) >> 3) - (x >> 3) + 1;
s32 b = ((y + height - 1) >> 3) - (y >> 3) + 1;
while (b--) {
GXS_LoadBG3Char((u8*)(displayHandler->window->pixelBuffer) + (a * 0x20), (a + 0xc) * 0x20, e * 0x20);
a += 0x14;
}
} else {
s32 height = 2;
s32 width = 2;
s32 x = drawState->lastModifiedX * 2;
s32 y = drawState->lastModifiedY * 2;
s32 a = (x >> 3) + ((y >> 3) * 0x14);
FillWindowPixelRect(displayHandler->window, MEMO_PAD_PIXEL_TYPE_FILLED, x, y, width, height);
GXS_LoadBG3Char((u8*)(displayHandler->window->pixelBuffer) + a * 0x20, (a + 0xc) * 0x20, 0x20);
}
ov24_02254DC8(arg1);
}
void ov24_02255038(u32 arg0, void *arg1) {
MemoPadDisplayHandler *displayHandler = ov20_022538A0(arg1);
CopyWindowPixelsToVram_TextMode(displayHandler->window);
ov24_02254DC8(arg1);
}
void ov24_02255050(u32 arg0, void *arg1) {
MemoPadDisplayHandler *displayHandler = ov20_022538A0(arg1);
ov24_022550D4(displayHandler);
FreeBgTilemapBuffer(displayHandler->config, GF_BG_LYR_SUB_2);
FreeBgTilemapBuffer(displayHandler->config, GF_BG_LYR_SUB_3);
ov24_02254DC8(arg1);
}
void ov24_02255078(MemoPadDisplayHandler *displayHandler) {
// TODO: types
static const u32 ov24_0225514C[2][4] = {
{
0xC0000, 0x38000, 0x2000000, 0x0
},
{
0xC0000, 0x88000, 0x2000003, 0x0
}
};
GfGfxLoader_LoadWholePalette(NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0032_bin, PM_LCD_BOTTOM, 0, 0, TRUE, HEAP_ID_POKETCH_APP);
if (ov20_02253FBC(&(displayHandler->unk54), NARC_GRAPHIC_POKETCH, NARC_poketch_narc_0033_NCER, NARC_poketch_narc_0034_NANR, HEAP_ID_POKETCH_APP)) {
for (s32 i = 0; i < 2; i++) {
displayHandler->unk68[i] = ov20_02253E74(displayHandler->unk50, &(ov24_0225514C[i]), &(displayHandler->unk54));
}
}
}
void ov24_022550D4(MemoPadDisplayHandler *displayHandler) {
for (u32 i = 0; i < 2; i++) {
ov20_02253F14(displayHandler->unk50, displayHandler->unk68[i]);
}
ov20_02254014(&(displayHandler->unk54));
}

View File

@@ -1,13 +0,0 @@
#include "global.h"
extern void Poketch_InitApp(void *func1, void *func2);
extern void ov24_02254854();
extern void ov24_02254990();
static void ov24_02254840(void)
{
Poketch_InitApp(ov24_02254854, ov24_02254990);
}
#define NitroStaticInit ov24_02254840
#include "sinit.h"

View File

@@ -392,7 +392,7 @@ _02254B04:
beq _02254B90
add r0, sp, #4
add r1, sp, #0
bl ov20_02252B68
bl TouchScreen_GetTapState
cmp r0, #0
beq _02254B90
ldr r1, [sp, #4]

View File

@@ -196,7 +196,7 @@ _0225499C:
add r1, r4, #0
add r0, #0x6c
add r1, #0x70
bl ov20_02252B68
bl TouchScreen_GetTapState
add r1, r4, #0
add r1, #0x68
strh r0, [r1]
@@ -1427,7 +1427,7 @@ ov27_022552D0: ; 0x022552D0
mov r1, #6
bl BgCommitTilemapBufferToVram
ldr r0, _02255338 ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r6, #0
bl ov27_02254BF4
add sp, #0x10

View File

@@ -296,7 +296,7 @@ _02254A64:
add r1, r4, #0
add r0, #0x54
add r1, #0x58
bl ov20_02252B68
bl TouchScreen_GetTapState
add r1, r4, #0
add r1, #0x50
strh r0, [r1]
@@ -2153,7 +2153,7 @@ _02255836:
add r1, r6, #0
bl ov28_02255318
ldr r0, _0225591C ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
add r0, #0x34
ldrb r0, [r0]

View File

@@ -208,7 +208,7 @@ _022549AA:
add r0, r4, #0
bl ov29_02254AA8
ldr r0, _02254A60 ; =0x00000668
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r4, #0x48]
mov r1, #2
bl ov29_02254CC0
@@ -271,7 +271,7 @@ _02254A3C:
cmp r0, #0
beq _02254A5A
ldr r0, _02254A60 ; =0x00000668
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r4, #0x48]
mov r1, #2
bl ov29_02254CC0

View File

@@ -621,7 +621,7 @@ ov30_02254CC4: ; 0x02254CC4
b _02254CF6
_02254CDE:
ldr r0, _02254D00 ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r4, #0x24]
mov r1, #1
bl ov20_02253F28

View File

@@ -611,7 +611,7 @@ ov31_02254CB8: ; 0x02254CB8
b _02254CEA
_02254CD2:
ldr r0, _02254CF4 ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r4, #0x24]
mov r1, #1
bl ov20_02253F28

View File

@@ -534,7 +534,7 @@ ov32_02254C08: ; 0x02254C08
bl ov20_022538A4
add r4, r0, #0
ldr r0, _02254C50 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r4]
cmp r0, #0
ldr r0, [r5, #0x24]

View File

@@ -228,14 +228,14 @@ _022549C4:
mov r1, #2
bl ov34_02254A98
ldr r0, _02254A20 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldrb r0, [r4, #1]
add r0, r0, #1
strb r0, [r4, #1]
b _02254A1A
_022549EE:
ldr r0, _02254A24 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254A1A
_022549F6:
ldr r0, [r4, #0x30]

View File

@@ -735,7 +735,7 @@ _02254DB6:
add r0, r4, #0
bl ov35_02254E58
ldr r0, _02254E54 ; =0x00000678
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov20_022538B0
pop {r4, r5, r6, pc}

View File

@@ -293,13 +293,13 @@ _02254A4C:
ldr r0, [r4, r0]
bl ov36_02254F0C
ldr r0, _02254BD8 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r0, #1
strb r0, [r4, #1]
b _02254AA6
_02254A82:
ldr r0, _02254BDC ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254AA6
_02254A8A:
add r0, r1, #0
@@ -311,7 +311,7 @@ _02254A8A:
mov r1, #5
bl ov36_02254F0C
ldr r0, _02254BD8 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r0, #3
strb r0, [r4, #1]
_02254AA6:
@@ -368,7 +368,7 @@ _02254AF4:
bne _02254B46
_02254B0C:
ldr r0, _02254BDC ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254B46
_02254B14:
add r0, r1, #0
@@ -390,7 +390,7 @@ _02254B14:
ldr r0, [r4, r0]
bl ov36_02254F0C
ldr r0, _02254BD8 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r0, #2
strb r0, [r4, #1]
_02254B46:
@@ -474,7 +474,7 @@ ov36_02254BE4: ; 0x02254BE4
add r4, r0, #0
add r0, sp, #4
add r1, sp, #0
bl ov20_02252B68
bl TouchScreen_GetTapState
cmp r0, #0
beq _02254C3E
ldr r1, [sp, #4]
@@ -530,7 +530,7 @@ ov36_02254C44: ; 0x02254C44
add r4, r0, #0
add r0, sp, #4
add r1, sp, #0
bl ov20_02252B68
bl TouchScreen_GetTapState
cmp r0, #0
beq _02254C8A
ldr r1, [sp, #4]
@@ -1537,7 +1537,7 @@ _022553CA:
cmp r0, #0
beq _022553E2
ldr r0, _022553E4 ; =0x0000066A
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov36_02254F48
_022553E2:

View File

@@ -569,7 +569,7 @@ ov37_02254C44: ; 0x02254C44
pop {r4, r5, r6, pc}
_02254C6C:
ldr r0, _02254D18 ; =0x00000675
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r4, #0x24]
mov r1, #0
bl ov20_02253F28
@@ -617,13 +617,13 @@ _02254C9E:
cmp r1, r0
ldr r0, _02254D24 ; =0x00000676
bge _02254CE0
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r0, #9
lsl r0, r0, #0x10
str r0, [r4, #0x3c]
b _02254D02
_02254CE0:
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r6]
cmp r0, #0
beq _02254CEE

View File

@@ -952,7 +952,7 @@ _02254F56:
ldr r0, [r0, #0x34]
bl ov20_02253F28
ldr r0, _02254F70 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov38_02254D70
pop {r3, r4, r5, pc}

View File

@@ -333,7 +333,7 @@ _02254AA8:
b _02254AC4
_02254ABE:
ldr r0, _02254B4C ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
_02254AC4:
mov r0, #0
add r4, #0x46
@@ -887,7 +887,7 @@ ov39_02254ECC: ; 0x02254ECC
add r0, r5, #0
bl ov20_022538A4
ldr r0, _02254EF4 ; =0x00000669
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r4, #0x24]
mov r1, #0xa
bl ov20_02253F28
@@ -929,7 +929,7 @@ ov39_02254F1C: ; 0x02254F1C
add r0, #0x32
ldrb r5, [r0]
ldr r0, _02254F5C ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
lsl r0, r5, #1
add r3, r7, r0
ldrh r0, [r3, #0x24]
@@ -961,7 +961,7 @@ ov39_02254F60: ; 0x02254F60
add r0, #0x33
ldrb r5, [r0]
ldr r0, _02254FA0 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
lsl r0, r5, #1
add r3, r7, r0
ldrh r0, [r3, #0x24]
@@ -1326,7 +1326,7 @@ _0225522C:
ldr r0, [r4, #0x6c]
lsl r1, r1, #2
ldr r0, [r0, r1]
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02255276
_02255240:
ldr r0, [r4, #0x2c]

View File

@@ -319,7 +319,7 @@ _02254A9A:
mov r0, #0
str r0, [r4, #0x1c]
ldr r0, _02254B4C ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254B46
_02254AB0:
cmp r1, #1
@@ -465,7 +465,7 @@ _02254BB2:
cmp r0, #0
bne _02254BC4
ldr r0, _02254C18 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254C12
_02254BC4:
add r0, r4, #0
@@ -1139,7 +1139,7 @@ ov40_022550C0: ; 0x022550C0
bl ov20_022538A4
add r4, r0, #0
ldr r0, _02255138 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r5, #0x34]
mov r1, #3
bl ov20_02253F28
@@ -1191,7 +1191,7 @@ ov40_0225513C: ; 0x0225513C
bl ov20_022538A4
add r4, r0, #0
ldr r0, _022551B4 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, [r5, #0x34]
mov r1, #2
bl ov20_02253F28
@@ -1299,7 +1299,7 @@ _0225521A:
mov r1, #1
bl ov20_02253F28
ldr r0, _02255304 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
ldr r0, _02255308 ; =0x00000126
bl ov20_02252B48
add r0, r4, #0

View File

@@ -501,11 +501,11 @@ _02254BBA:
mov r1, #5
bl ov41_022553A4
ldr r0, _02254D18 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254C32
_02254BEE:
ldr r0, _02254D18 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
bl ov41_0225504C
mov r3, #0
@@ -531,7 +531,7 @@ _02254BEE:
b _02254C32
_02254C2C:
ldr r0, _02254D1C ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
_02254C32:
mov r0, #0
pop {r4, pc}
@@ -714,11 +714,11 @@ _02254D6C:
b _02254E00
_02254D86:
ldr r0, _02254E04 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254E00
_02254D8E:
ldr r0, _02254E08 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
mov r1, #1
mov r2, #0
@@ -738,7 +738,7 @@ _02254D8E:
b _02254E00
_02254DC0:
ldr r0, _02254E08 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
mov r1, #0
mov r2, #1
@@ -796,7 +796,7 @@ _02254E20:
b _02254EAC
_02254E3A:
ldr r0, _02254EB0 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r1, #1
add r0, r4, #0
add r2, r1, #0
@@ -813,11 +813,11 @@ _02254E3A:
b _02254EAC
_02254E64:
ldr r0, _02254EB4 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254EAC
_02254E6C:
ldr r0, _02254EB0 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
mov r1, #0
mov r2, #1
@@ -875,11 +875,11 @@ _02254ECC:
b _02254F52
_02254EE6:
ldr r0, _02254F58 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _02254F52
_02254EEE:
ldr r0, _02254F5C ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
mov r1, #0
mov r2, #1
@@ -900,7 +900,7 @@ _02254EEE:
b _02254F52
_02254F20:
ldr r0, _02254F5C ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
mov r1, #0
mov r2, #1
@@ -953,7 +953,7 @@ _02254F74:
b _0225500A
_02254F8E:
ldr r0, _02255010 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r1, #0
add r0, r4, #0
add r2, r1, #0
@@ -971,11 +971,11 @@ _02254F8E:
b _0225500A
_02254FBA:
ldr r0, _02255014 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
b _0225500A
_02254FC2:
ldr r0, _02255010 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r4, #0
mov r1, #0
mov r2, #1
@@ -1859,7 +1859,7 @@ _02255670:
bl ov20_02253F28
_0225567E:
ldr r0, _0225568C ; =0x00000677
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r0, #0
add r4, #0xa4
str r0, [r4]

View File

@@ -399,7 +399,7 @@ _02254B40:
str r0, [r4, #0xc]
add r0, sp, #4
add r1, sp, #0
bl ov20_02252B68
bl TouchScreen_GetTapState
cmp r0, #0
beq _02254B68
ldr r0, [r4, #0x28]

View File

@@ -765,7 +765,7 @@ _02254DCE:
orr r0, r1
strb r0, [r2, #1]
ldr r0, _02254E74 ; =0x00000678
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov20_022538B0
pop {r3, r4, r5, pc}

View File

@@ -249,7 +249,7 @@ ov44_02254C14: ; 0x02254C14
bl ov20_022538A4
add r4, r0, #0
ldr r0, _02254C50 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
mov r0, #0
add r1, r0, #0
bl ov20_02252D7C

View File

@@ -213,7 +213,7 @@ _022549CA:
b _022549DA
_022549D4:
ldr r0, _022549E0 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
_022549DA:
mov r0, #0
pop {r3, r4, r5, pc}
@@ -993,7 +993,7 @@ ov47_02254F58: ; 0x02254F58
add r0, r4, #0
bl ov47_022550FC
ldr r0, _02254F98 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov47_02254E60
pop {r3, r4, r5, pc}
@@ -1026,7 +1026,7 @@ ov47_02254F9C: ; 0x02254F9C
add r0, r4, #0
bl ov47_02255184
ldr r0, _02254FE4 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov47_02254E60
pop {r3, r4, r5, pc}
@@ -1059,7 +1059,7 @@ ov47_02254FE8: ; 0x02254FE8
add r0, r4, #0
bl ov47_022551D8
ldr r0, _02255030 ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov47_02254E60
pop {r3, r4, r5, pc}
@@ -1092,7 +1092,7 @@ ov47_02255034: ; 0x02255034
add r0, r4, #0
bl ov47_02255250
ldr r0, _0225507C ; =0x0000066E
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov47_02254E60
pop {r3, r4, r5, pc}
@@ -1129,7 +1129,7 @@ ov47_02255080: ; 0x02255080
add r1, r6, #0
bl ov47_022552D8
ldr r0, _022550D4 ; =0x00000663
bl ov20_02252B28
bl Poketch_PlaySoundEffect
add r0, r5, #0
bl ov47_02254E60
pop {r4, r5, r6, pc}

View File

@@ -12,7 +12,8 @@ typedef enum HeapID {
HEAP_ID_2,
HEAP_ID_MAIN,
HEAP_ID_4,
HEAP_ID_8 = 8,
HEAP_ID_POKETCH_MAIN = 7,
HEAP_ID_POKETCH_APP,
HEAP_ID_FIELD = 11,
HEAP_ID_15 = 15,
HEAP_ID_32 = 32,