diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-12 23:17:03 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-12 23:17:03 -0400 |
commit | 1258970db69f686b4a33cd00d9a77ce414f7d225 (patch) | |
tree | 68b915955feb2e8028539830131b20ea0b71aa7c | |
parent | 32f6422d2fc5ba5153869316ced65cd2f4370d9d (diff) |
data/decoration.s, 1
-rwxr-xr-x | data/decoration.s | 43 | ||||
-rwxr-xr-x | include/decoration.h | 12 | ||||
-rwxr-xr-x | include/menu.h | 6 | ||||
-rwxr-xr-x | src/decoration.c | 40 |
4 files changed, 53 insertions, 48 deletions
diff --git a/data/decoration.s b/data/decoration.s index 82874f504..b3b5df071 100755 --- a/data/decoration.s +++ b/data/decoration.s @@ -3,49 +3,6 @@ .section .rodata - .align 2 -gUnknown_083EC5E4:: @ 83EC5E4 - .4byte SecretBaseText_Desk - .4byte SecretBaseText_Chair - .4byte SecretBaseText_Plant - .4byte SecretBaseText_Ornament - .4byte SecretBaseText_Mat - .4byte SecretBaseText_Poster - .4byte SecretBaseText_Doll - .4byte SecretBaseText_Cushion - - .align 2 -gUnknown_083EC604:: @ 83EC604 - .4byte SecretBaseText_Decorate, sub_80FF160 - .4byte SecretBaseText_PutAway, sub_8100A0C - .4byte SecretBaseText_Toss, sub_8101700 - .4byte gUnknownText_Exit, gpu_pal_decompress_alloc_tag_and_upload - - .align 2 -gUnknown_083EC624:: @ 83EC624 - .4byte SecretBaseText_PutOutDecor - .4byte SecretBaseText_StoreChosenDecor - .4byte SecretBaseText_ThrowAwayDecor - .4byte gMenuText_GoBackToPrev - - .align 2 -gUnknown_083EC634:: @ 83EC634 - .4byte sub_80FF5BC - .4byte sub_80FF058 - .4byte sub_81017A0 - .4byte sub_80FF058 - .4byte sub_81017A0 - .4byte sub_80FF058 - .4byte sub_8109D04 - .4byte sub_80FF058 - - .align 2 -gUnknown_083EC654:: @ 83EC654 - .2byte 0x6318, 0x739C, 0x7FFF - -gUnknown_083EC65A:: @ 83EC65A - .string "{PALETTE 13}{STR_VAR_1}$" - Unknown_3EC660: @ 83EC660 .byte 0, 1, 2, 3 diff --git a/include/decoration.h b/include/decoration.h index 13346a564..6e68bd1c8 100755 --- a/include/decoration.h +++ b/include/decoration.h @@ -240,8 +240,8 @@ extern struct UnkStruct_020391B4 gUnknown_020391B4[16]; extern const u16 gUnknown_083EC654[3]; extern const struct DecorationInventory gDecorationInventories[]; -extern const u8 *gUnknown_083EC5E4[]; -extern const u8 *gUnknown_083EC624[]; +extern const u8 *const gUnknown_083EC5E4[]; +extern const u8 *const gUnknown_083EC624[]; extern u8 gUnknown_020388F7[]; extern const struct MenuAction2 gUnknown_083EC604[]; extern const struct MenuAction3 gUnknown_083EC634[]; @@ -326,4 +326,12 @@ void sub_81016F4(void); void sub_8101824(u8); void sub_8109A30(u8); +void sub_80FF160(u8); +void sub_80FF5BC(u8); +void sub_80FF058(u8); +void sub_8100A0C(u8); +void sub_8101700(u8); +void sub_81017A0(u8); +void sub_8109D04(u8); + #endif // GUARD_DECORATION_H diff --git a/include/menu.h b/include/menu.h index ef9a88b74..98d7afcc3 100755 --- a/include/menu.h +++ b/include/menu.h @@ -12,13 +12,13 @@ struct MenuAction struct MenuAction2 { const u8 *text; - u8 (*func)(u8); + void (*func)(u8); }; struct MenuAction3 { - u8 (*func1)(u8); - u8 (*func2)(u8); + void (*func1)(u8); + void (*func2)(u8); }; void CloseMenu(void); diff --git a/src/decoration.c b/src/decoration.c index 5d6c835ff..74f606fd9 100755 --- a/src/decoration.c +++ b/src/decoration.c @@ -29,6 +29,9 @@ .tiles = _tiles\ } +#define MENUACTION2(_text, _func) {.text = _text, .func = _func} +#define MENUACTION3(_func1, _func2) {.func1 = _func1, .func2 = _func2} + const u8 DecorDesc_SMALL_DESK[] = _( "A small desk built\n" "for one."); @@ -1373,6 +1376,43 @@ const struct Decoration gDecorations[] = { DECORATION(DECOR_REGISTEEL_DOLL, _("REGISTEEL DOLL"), 4, 5, 6, 10000, DecorDesc_REGISTEEL_DOLL, DecorGfx_REGISTEEL_DOLL) }; +const u8 *const gUnknown_083EC5E4[] = { + SecretBaseText_Desk, + SecretBaseText_Chair, + SecretBaseText_Plant, + SecretBaseText_Ornament, + SecretBaseText_Mat, + SecretBaseText_Poster, + SecretBaseText_Doll, + SecretBaseText_Cushion +}; + +const struct MenuAction2 gUnknown_083EC604[] = { + MENUACTION2(SecretBaseText_Decorate, sub_80FF160), + MENUACTION2(SecretBaseText_PutAway, sub_8100A0C), + MENUACTION2(SecretBaseText_Toss, sub_8101700), + MENUACTION2(gUnknownText_Exit, gpu_pal_decompress_alloc_tag_and_upload) +}; + +const u8 *const gUnknown_083EC624[] = { + SecretBaseText_PutOutDecor, + SecretBaseText_StoreChosenDecor, + SecretBaseText_ThrowAwayDecor, + gMenuText_GoBackToPrev +}; + +const struct MenuAction3 gUnknown_083EC634[] = { + MENUACTION3(sub_80FF5BC, sub_80FF058), + MENUACTION3(sub_81017A0, sub_80FF058), + MENUACTION3(sub_81017A0, sub_80FF058), + MENUACTION3(sub_8109D04, sub_80FF058) +}; + +const u16 gUnknown_083EC654[] = {0x6318, 0x739C, 0x7FFF}; +const u8 gUnknown_083EC65A[] = _("{PALETTE 13}{STR_VAR_1}"); + +// text + extern u8 gUnknown_0815F399[]; void sub_80FE1DC(void) |