diff options
-rwxr-xr-x[-rw-r--r--] | asm/decoration.s | 138 | ||||
-rwxr-xr-x | src/decoration.c | 42 |
2 files changed, 42 insertions, 138 deletions
diff --git a/asm/decoration.s b/asm/decoration.s index 8d814f563..b0934aa86 100644..100755 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -8,144 +8,6 @@ .equiv ewram_1f000, 0x0201f000 - thumb_func_start sub_80FEC94 -sub_80FEC94: @ 80FEC94 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0 - movs r1, 0 - movs r2, 0xE - movs r3, 0x13 - bl MenuDrawTextWindow - adds r0, r4, 0 - movs r1, 0 - bl sub_80FEABC - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80FEC94 - - thumb_func_start sub_80FECB8 -sub_80FECB8: @ 80FECB8 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0xF - movs r1, 0 - movs r2, 0x1D - movs r3, 0x3 - bl MenuDrawTextWindow - adds r0, r4, 0 - movs r1, 0x10 - movs r2, 0x1 - movs r3, 0xFF - bl sub_80FE470 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80FECB8 - - thumb_func_start sub_80FECE0 -sub_80FECE0: @ 80FECE0 - push {lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r0, 24 - ldr r2, _080FED14 @ =gDecorations - ldr r1, _080FED18 @ =gUnknown_020388D0 - ldr r1, [r1] - adds r1, r0 - ldrb r0, [r1] - lsls r0, 5 - adds r2, 0x18 - adds r0, r2 - ldr r0, [r0] - movs r1, 0x30 - str r1, [sp] - movs r1, 0x1 - str r1, [sp, 0x4] - movs r1, 0x80 - movs r2, 0x68 - movs r3, 0x68 - bl sub_8072AB0 - add sp, 0x8 - pop {r0} - bx r0 - .align 2, 0 -_080FED14: .4byte gDecorations -_080FED18: .4byte gUnknown_020388D0 - thumb_func_end sub_80FECE0 - - thumb_func_start sub_80FED1C -sub_80FED1C: @ 80FED1C - push {lr} - movs r0, 0xF - movs r1, 0 - movs r2, 0x1D - movs r3, 0x3 - bl MenuZeroFillWindowRect - movs r0, 0xF - movs r1, 0xC - movs r2, 0x1D - movs r3, 0x13 - bl MenuZeroFillWindowRect - pop {r0} - bx r0 - thumb_func_end sub_80FED1C - - thumb_func_start sub_80FED3C -sub_80FED3C: @ 80FED3C - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - bl LoadScrollIndicatorPalette - ldr r1, _080FED5C @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _080FED60 @ =sub_80FE868 - str r1, [r0] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080FED5C: .4byte gTasks -_080FED60: .4byte sub_80FE868 - thumb_func_end sub_80FED3C - - thumb_func_start sub_80FED64 -sub_80FED64: @ 80FED64 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - movs r1, 0 - ldr r3, _080FED7C @ =gUnknown_020388D6 -_080FED6E: - adds r0, r1, r3 - ldrb r0, [r0] - cmp r0, r2 - bne _080FED80 - movs r0, 0x1 - b _080FED8C - .align 2, 0 -_080FED7C: .4byte gUnknown_020388D6 -_080FED80: - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0xF - bls _080FED6E - movs r0, 0 -_080FED8C: - pop {r1} - bx r1 - thumb_func_end sub_80FED64 - thumb_func_start sub_80FED90 sub_80FED90: @ 80FED90 push {r4-r7,lr} diff --git a/src/decoration.c b/src/decoration.c index 59f15e088..8d64ceea6 100755 --- a/src/decoration.c +++ b/src/decoration.c @@ -405,3 +405,45 @@ void sub_80FEABC(u8 taskId, u8 dummy1) } } } + +void sub_80FEC94(u8 taskId) +{ + MenuDrawTextWindow(0, 0, 14, 19); + sub_80FEABC(taskId, 0); +} + +void sub_80FECB8(u8 decoCat) +{ + MenuDrawTextWindow(15, 0, 29, 3); + sub_80FE470(decoCat, 16, 1, 0xff); +} + +void sub_80FECE0(u8 taskId) +{ + sub_8072AB0(gDecorations[gUnknown_020388D0[taskId]].description, 0x80, 0x68, 0x68, 0x30, 0x1); +} + +void sub_80FED1C(void) +{ + MenuZeroFillWindowRect(15, 0, 29, 3); + MenuZeroFillWindowRect(15, 12, 29, 19); +} + +void sub_80FED3C(u8 taskId) +{ + LoadScrollIndicatorPalette(); + gTasks[taskId].func = sub_80FE868; +} + +bool8 sub_80FED64(u8 a0) +{ + u8 i; + for (i=0; i<16; i++) + { + if (gUnknown_020388D6[i] == a0) + { + return TRUE; + } + } + return FALSE; +} |