From 394c0f5546aa152012f0c812d1e6cf0a696bfe86 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Mon, 15 Apr 2019 17:51:11 -0500 Subject: [PATCH 1/8] Start decompiling pokenav_unk_4.c --- asm/pokenav_unk_4.s | 93 --------------------------------------------- include/pokenav.h | 7 +++- ld_script.txt | 1 + src/pokenav.c | 15 +++----- src/pokenav_unk_4.c | 67 ++++++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+), 103 deletions(-) create mode 100755 src/pokenav_unk_4.c diff --git a/asm/pokenav_unk_4.s b/asm/pokenav_unk_4.s index cc3c17b42..51dc5eebb 100644 --- a/asm/pokenav_unk_4.s +++ b/asm/pokenav_unk_4.s @@ -5,99 +5,6 @@ @ File centered around AllocSubstruct(6) - thumb_func_start sub_81CB260 -sub_81CB260: @ 81CB260 - push {r4,lr} - ldr r1, =0x00002048 - movs r0, 0x6 - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CB294 - movs r0, 0 - strb r0, [r4, 0x19] - ldr r0, =sub_81CB324 - movs r1, 0x1 - bl CreateLoopedTask - str r0, [r4, 0x4] - ldr r0, =sub_81CB310 - str r0, [r4] - movs r0, 0x1 - b _081CB296 - .pool -_081CB294: - movs r0, 0 -_081CB296: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CB260 - - thumb_func_start sub_81CB29C -sub_81CB29C: @ 81CB29C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - ldr r0, =gUnknown_08622798 - lsls r4, 2 - adds r4, r0 - ldr r0, [r4] - movs r1, 0x1 - bl CreateLoopedTask - str r0, [r5, 0x4] - ldr r0, =sub_81CB310 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CB29C - - thumb_func_start sub_81CB2CC -sub_81CB2CC: @ 81CB2CC - push {lr} - movs r0, 0x6 - bl GetSubstructPtr - ldr r0, [r0] - bl _call_via_r0 - pop {r1} - bx r1 - thumb_func_end sub_81CB2CC - - thumb_func_start sub_81CB2E0 -sub_81CB2E0: @ 81CB2E0 - push {r4,lr} - movs r0, 0x6 - bl GetSubstructPtr - adds r4, r0, 0 - bl sub_81CC2B4 - bl sub_81CBC1C - ldrb r0, [r4, 0x12] - bl RemoveWindow - ldrb r0, [r4, 0x10] - bl RemoveWindow - ldrb r0, [r4, 0x14] - bl RemoveWindow - movs r0, 0x6 - bl FreePokenavSubstruct - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CB2E0 - - thumb_func_start sub_81CB310 -sub_81CB310: @ 81CB310 - push {lr} - movs r0, 0x6 - bl GetSubstructPtr - ldr r0, [r0, 0x4] - bl IsLoopedTaskActive - pop {r1} - bx r1 - thumb_func_end sub_81CB310 - thumb_func_start sub_81CB324 sub_81CB324: @ 81CB324 push {r4,r5,lr} diff --git a/include/pokenav.h b/include/pokenav.h index fb2644e83..bf075694e 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -87,7 +87,7 @@ int sub_81C9894(void); const u8 *sub_81CAF78(int index, u8 *arg1); // pokenav_unk_2.c -u32 sub_81C99D4(void); +void sub_81C99D4(void); void sub_81CAADC(void); // pokenav_unk_3.c @@ -115,4 +115,9 @@ int sub_81CB0C8(int rematchIndex); int sub_81CB0E4(int index); bool32 sub_81CAE08(int); +// pokenav_unk_4.c +u32 sub_81CB260(void); +u32 sub_81CB2CC(void); +void sub_81CB2E0(void); + #endif //GUARD_POKENAV_H diff --git a/ld_script.txt b/ld_script.txt index 9ed1e9b1c..9c45dd3d0 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -306,6 +306,7 @@ SECTIONS { src/pokenav_unk_1.o(.text); asm/pokenav_unk_2.o(.text); src/pokenav_unk_3.o(.text); + src/pokenav_unk_4.o(.text); asm/pokenav_unk_4.o(.text); asm/pokenav_unk_5.o(.text); asm/pokenav_unk_6.o(.text); diff --git a/src/pokenav.c b/src/pokenav.c index 734d37c46..fde79682b 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -34,7 +34,7 @@ struct UnknownPokenavCallbackStruct u32 (*unkC)(void); u32 (*unk10)(void); void (*unk14)(void); - u32 (*unk18)(void); + void (*unk18)(void); }; extern u32 sub_81C9924(void); @@ -47,42 +47,39 @@ extern u32 sub_81CC5F4(void); extern u32 sub_81CC62C(void); extern u32 sub_81CC65C(void); extern void sub_81CC524(void); -extern u32 sub_81CC670(void); +extern void sub_81CC670(void); extern u32 sub_81CCFD8(void); extern u32 sub_81CD070(void); extern u32 sub_81CDDD4(void); extern u32 sub_81CDE2C(void); extern u32 sub_81CDE64(void); extern void sub_81CD1C0(void); -extern u32 sub_81CECA0(void); +extern void sub_81CECA0(void); extern u32 sub_81CEF3C(void); extern u32 sub_81CEFDC(void); extern u32 sub_81CF330(void); extern u32 sub_81CF3A0(void); extern u32 sub_81CF3D0(void); extern void sub_81CEFF0(void); -extern u32 sub_81CF3F8(void); +extern void sub_81CF3F8(void); extern u32 sub_81CD024(void); extern u32 sub_81CEF98(void); extern u32 sub_81CF368(void); -extern u32 sub_81CB260(void); extern u32 sub_81CB29C(void); -extern u32 sub_81CB2CC(void); -extern u32 sub_81CB2E0(void); extern u32 sub_81CF9BC(void); extern u32 sub_81CFA34(void); extern u32 sub_81CFDD0(void); extern u32 sub_81CFE40(void); extern u32 sub_81CFE70(void); extern void sub_81CFA48(void); -extern u32 sub_81CFE98(void); +extern void sub_81CFE98(void); extern u32 sub_81D0450(void); extern u32 sub_81D04A0(void); extern u32 sub_81D0978(void); extern u32 sub_81D09B0(void); extern u32 sub_81D09E0(void); extern void sub_81D04B8(void); -extern u32 sub_81D09F4(void); +extern void sub_81D09F4(void); extern u32 sub_81CFA04(void); extern u32 sub_81CFE08(void); diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c new file mode 100755 index 000000000..c07794126 --- /dev/null +++ b/src/pokenav_unk_4.c @@ -0,0 +1,67 @@ +#include "global.h" +#include "pokenav.h" +#include "window.h" + +struct Pokenav4Struct +{ + u32 (*unk0)(void); + u32 unk4; + u8 filler8[0x8]; + u8 unk10; + u8 filler11[0x1]; + u8 unk12; + u8 filler13[0x1]; + u8 unk14; + u8 filler15[0x4]; + u8 unk19; + u8 filler1A[0x202E]; +}; + +static bool32 sub_81CB310(void); +u32 sub_81CB324(int); +void sub_81CBC1C(void); +void sub_81CC2B4(void); + +extern const LoopedTask gUnknown_08622798[]; + +bool32 sub_81CB260(void) +{ + struct Pokenav4Struct *state = AllocSubstruct(6, sizeof(struct Pokenav4Struct)); + if (!state) + return FALSE; + + state->unk19 = 0; + state->unk4 = CreateLoopedTask(sub_81CB324, 1); + state->unk0 = sub_81CB310; + return TRUE; +} + +void sub_81CB29C(int index) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + state->unk4 = CreateLoopedTask(gUnknown_08622798[index], 1); + state->unk0 = sub_81CB310; +} + +u32 sub_81CB2CC(void) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + return state->unk0(); +} + +void sub_81CB2E0(void) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + sub_81CC2B4(); + sub_81CBC1C(); + RemoveWindow(state->unk12); + RemoveWindow(state->unk10); + RemoveWindow(state->unk14); + FreePokenavSubstruct(6); +} + +static bool32 sub_81CB310(void) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + return IsLoopedTaskActive(state->unk4); +} From c7954e12129c3f8b99fa7b002b84a59da654354e Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Mon, 15 Apr 2019 19:24:32 -0500 Subject: [PATCH 2/8] Decompile pokenav_unk_4.c through sub_81CB678() --- asm/pokenav_unk_4.s | 477 ------------------------------------ include/pokenav.h | 14 ++ src/pokenav_match_call_ui.c | 8 +- src/pokenav_unk_4.c | 248 ++++++++++++++++++- 4 files changed, 264 insertions(+), 483 deletions(-) diff --git a/asm/pokenav_unk_4.s b/asm/pokenav_unk_4.s index 51dc5eebb..b47370b6b 100644 --- a/asm/pokenav_unk_4.s +++ b/asm/pokenav_unk_4.s @@ -5,483 +5,6 @@ @ File centered around AllocSubstruct(6) - thumb_func_start sub_81CB324 -sub_81CB324: @ 81CB324 - push {r4,r5,lr} - sub sp, 0x8 - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x7 - bls _081CB338 - b _081CB504 -_081CB338: - lsls r0, r4, 2 - ldr r1, =_081CB348 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CB348: - .4byte _081CB368 - .4byte _081CB3D4 - .4byte _081CB424 - .4byte _081CB468 - .4byte _081CB482 - .4byte _081CB494 - .4byte _081CB4A6 - .4byte _081CB4EA -_081CB368: - ldr r0, =gUnknown_0862278C - movs r1, 0x3 - bl InitBgTemplates - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x2 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - ldr r1, =gUnknown_08622530 - movs r0, 0 - str r0, [sp] - movs r0, 0x2 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r0, =0x00001024 - adds r1, r5, r0 - movs r0, 0x2 - bl SetBgTilemapBuffer - ldr r1, =gUnknown_086225D4 - movs r0, 0x2 - movs r2, 0 - movs r3, 0 - bl CopyToBgTilemapBuffer - movs r0, 0x2 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_08622510 - movs r1, 0x20 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - movs r0, 0x2 - b _081CB418 - .pool -_081CB3D4: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - cmp r0, 0 - beq _081CB3E0 - b _081CB4FA -_081CB3E0: - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - movs r3, 0x1 - bl sub_8199DF0 - adds r1, r5, 0 - adds r1, 0x24 - movs r0, 0x1 - bl SetBgTilemapBuffer - movs r1, 0x80 - lsls r1, 5 - movs r0, 0x20 - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - ldr r0, =gUnknown_086226E0 - movs r1, 0x10 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - movs r0, 0x1 -_081CB418: - bl CopyBgTilemapBufferToVram - movs r0, 0 - b _081CB506 - .pool -_081CB424: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _081CB4FA - adds r0, r5, 0 - bl sub_81CC034 - ldr r1, =gUnknown_08622760 - str r4, [sp] - movs r0, 0x3 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldr r0, =gUnknown_08622700 - movs r1, 0x30 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - ldr r0, =gUnknown_08622720 - movs r1, 0x50 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - movs r0, 0 - b _081CB506 - .pool -_081CB468: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - cmp r0, 0 - bne _081CB4FA - bl sub_81CAE28 - cmp r0, 0 - beq _081CB4FA - bl sub_81CBBB8 - movs r0, 0 - b _081CB506 -_081CB482: - bl sub_81C8224 - cmp r0, 0 - bne _081CB4FA - adds r0, r5, 0 - bl sub_81CBD78 - movs r0, 0 - b _081CB506 -_081CB494: - adds r0, r5, 0 - bl sub_81CBDC0 - adds r0, r5, 0 - movs r1, 0 - bl sub_81CBEF8 - movs r0, 0 - b _081CB506 -_081CB4A6: - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x2 - bl ShowBg - movs r0, 0x3 - bl ShowBg - movs r0, 0x1 - bl ShowBg - bl sub_81CC214 - movs r0, 0x3 - bl LoadLeftHeaderGfxForIndex - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_81C7FA0 - movs r0, 0x1 - bl sub_81C7AC0 - movs r0, 0 - b _081CB506 -_081CB4EA: - bl IsPaletteFadeActive - cmp r0, 0 - bne _081CB4FA - bl sub_81C8010 - cmp r0, 0 - beq _081CB4FE -_081CB4FA: - movs r0, 0x2 - b _081CB506 -_081CB4FE: - movs r0, 0x1 - bl sub_81CBC38 -_081CB504: - movs r0, 0x4 -_081CB506: - add sp, 0x8 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB324 - - thumb_func_start sub_81CB510 -sub_81CB510: @ 81CB510 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CB55E - cmp r4, 0x1 - bgt _081CB52A - cmp r4, 0 - beq _081CB534 - b _081CB580 -_081CB52A: - cmp r4, 0x2 - beq _081CB566 - cmp r4, 0x3 - beq _081CB572 - b _081CB580 -_081CB534: - bl MatchCall_MoveCursorDown - cmp r0, 0x1 - beq _081CB54C - cmp r0, 0x1 - bgt _081CB546 - cmp r0, 0 - beq _081CB580 - b _081CB56E -_081CB546: - cmp r0, 0x2 - beq _081CB556 - b _081CB56E -_081CB54C: - movs r0, 0x5 - bl PlaySE - movs r0, 0x7 - b _081CB582 -_081CB556: - movs r0, 0x5 - bl PlaySE - b _081CB56E -_081CB55E: - bl sub_81C8630 - cmp r0, 0 - bne _081CB57C -_081CB566: - adds r0, r5, 0 - movs r1, 0 - bl sub_81CBEF8 -_081CB56E: - movs r0, 0 - b _081CB582 -_081CB572: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - beq _081CB580 -_081CB57C: - movs r0, 0x2 - b _081CB582 -_081CB580: - movs r0, 0x4 -_081CB582: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB510 - - thumb_func_start sub_81CB588 -sub_81CB588: @ 81CB588 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CB5D6 - cmp r4, 0x1 - bgt _081CB5A2 - cmp r4, 0 - beq _081CB5AC - b _081CB5F8 -_081CB5A2: - cmp r4, 0x2 - beq _081CB5DE - cmp r4, 0x3 - beq _081CB5EA - b _081CB5F8 -_081CB5AC: - bl MatchCall_MoveCursorUp - cmp r0, 0x1 - beq _081CB5C4 - cmp r0, 0x1 - bgt _081CB5BE - cmp r0, 0 - beq _081CB5F8 - b _081CB5E6 -_081CB5BE: - cmp r0, 0x2 - beq _081CB5CE - b _081CB5E6 -_081CB5C4: - movs r0, 0x5 - bl PlaySE - movs r0, 0x7 - b _081CB5FA -_081CB5CE: - movs r0, 0x5 - bl PlaySE - b _081CB5E6 -_081CB5D6: - bl sub_81C8630 - cmp r0, 0 - bne _081CB5F4 -_081CB5DE: - adds r0, r5, 0 - movs r1, 0 - bl sub_81CBEF8 -_081CB5E6: - movs r0, 0 - b _081CB5FA -_081CB5EA: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - beq _081CB5F8 -_081CB5F4: - movs r0, 0x2 - b _081CB5FA -_081CB5F8: - movs r0, 0x4 -_081CB5FA: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB588 - - thumb_func_start sub_81CB600 -sub_81CB600: @ 81CB600 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CB64E - cmp r4, 0x1 - bgt _081CB61A - cmp r4, 0 - beq _081CB624 - b _081CB670 -_081CB61A: - cmp r4, 0x2 - beq _081CB656 - cmp r4, 0x3 - beq _081CB662 - b _081CB670 -_081CB624: - bl MatchCall_PageDown - cmp r0, 0x1 - beq _081CB63C - cmp r0, 0x1 - bgt _081CB636 - cmp r0, 0 - beq _081CB670 - b _081CB65E -_081CB636: - cmp r0, 0x2 - beq _081CB646 - b _081CB65E -_081CB63C: - movs r0, 0x5 - bl PlaySE - movs r0, 0x7 - b _081CB672 -_081CB646: - movs r0, 0x5 - bl PlaySE - b _081CB65E -_081CB64E: - bl sub_81C8630 - cmp r0, 0 - bne _081CB66C -_081CB656: - adds r0, r5, 0 - movs r1, 0 - bl sub_81CBEF8 -_081CB65E: - movs r0, 0 - b _081CB672 -_081CB662: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - beq _081CB670 -_081CB66C: - movs r0, 0x2 - b _081CB672 -_081CB670: - movs r0, 0x4 -_081CB672: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB600 - - thumb_func_start sub_81CB678 -sub_81CB678: @ 81CB678 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CB6C6 - cmp r4, 0x1 - bgt _081CB692 - cmp r4, 0 - beq _081CB69C - b _081CB6E8 -_081CB692: - cmp r4, 0x2 - beq _081CB6CE - cmp r4, 0x3 - beq _081CB6DA - b _081CB6E8 -_081CB69C: - bl MatchCall_PageUp - cmp r0, 0x1 - beq _081CB6B4 - cmp r0, 0x1 - bgt _081CB6AE - cmp r0, 0 - beq _081CB6E8 - b _081CB6D6 -_081CB6AE: - cmp r0, 0x2 - beq _081CB6BE - b _081CB6D6 -_081CB6B4: - movs r0, 0x5 - bl PlaySE - movs r0, 0x7 - b _081CB6EA -_081CB6BE: - movs r0, 0x5 - bl PlaySE - b _081CB6D6 -_081CB6C6: - bl sub_81C8630 - cmp r0, 0 - bne _081CB6E4 -_081CB6CE: - adds r0, r5, 0 - movs r1, 0 - bl sub_81CBEF8 -_081CB6D6: - movs r0, 0 - b _081CB6EA -_081CB6DA: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - beq _081CB6E8 -_081CB6E4: - movs r0, 0x2 - b _081CB6EA -_081CB6E8: - movs r0, 0x4 -_081CB6EA: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB678 - thumb_func_start sub_81CB6F0 sub_81CB6F0: @ 81CB6F0 push {r4,r5,lr} diff --git a/include/pokenav.h b/include/pokenav.h index bf075694e..b740297c3 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -1,6 +1,8 @@ #ifndef GUARD_POKENAV_H #define GUARD_POKENAV_H +#include "bg.h" + typedef u32 (*LoopedTask)(int state); // Return values of LoopedTask functions. @@ -56,6 +58,12 @@ bool32 CanViewRibbonsMenu(void); // pokenav_match_call_ui.c u32 GetSelectedMatchCall(void); +bool32 sub_81C8224(void); +int MatchCall_MoveCursorUp(void); +int MatchCall_MoveCursorDown(void); +int MatchCall_PageDown(void); +int MatchCall_PageUp(void); +bool32 sub_81C8630(void); // pokenav_match_call_data.c bool32 sub_81D17E8(u32 idx); @@ -74,6 +82,12 @@ bool32 InitPokenavMainMenu(void); void CopyPaletteIntoBufferUnfaded(const u16 *palette, u32 bufferOffset, u32 size); void sub_81C7850(u32 a0); u32 sub_81C786C(void); +void LoadLeftHeaderGfxForIndex(u32 arg0); +void sub_81C7FA0(u32 arg0, bool32 arg1, bool32 arg2); +void sub_81C7AC0(int a0); +bool32 sub_81C8010(void); +void InitBgTemplates(const struct BgTemplate *templates, int count); +bool32 IsPaletteFadeActive(void); // pokenav_unk_1.c bool32 sub_81C9298(void); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 8134fc00e..72449c7c0 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -505,7 +505,7 @@ struct MatchCallWindowState *GetMatchCallWindowStruct(void) return &structPtr->unk888; } -u32 MatchCall_MoveCursorUp(void) +int MatchCall_MoveCursorUp(void) { struct MatchCallWindowState *structPtr; structPtr = GetMatchCallWindowStruct(); @@ -529,7 +529,7 @@ u32 MatchCall_MoveCursorUp(void) } } -u32 MatchCall_MoveCursorDown(void) +int MatchCall_MoveCursorDown(void) { struct MatchCallWindowState *structPtr; structPtr = GetMatchCallWindowStruct(); @@ -554,7 +554,7 @@ u32 MatchCall_MoveCursorDown(void) return 2; } -u32 MatchCall_PageUp(void) +int MatchCall_PageUp(void) { struct MatchCallWindowState *structPtr; s32 scroll; @@ -580,7 +580,7 @@ u32 MatchCall_PageUp(void) } } -u32 MatchCall_PageDown(void) +int MatchCall_PageDown(void) { struct MatchCallWindowState *structPtr; structPtr = GetMatchCallWindowStruct(); diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index c07794126..9a90090ac 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -1,6 +1,10 @@ #include "global.h" +#include "bg.h" +#include "menu.h" #include "pokenav.h" +#include "sound.h" #include "window.h" +#include "constants/songs.h" struct Pokenav4Struct { @@ -14,15 +18,34 @@ struct Pokenav4Struct u8 unk14; u8 filler15[0x4]; u8 unk19; - u8 filler1A[0x202E]; + u8 filler1A[0xA]; + u8 unk24[0x800]; + u8 unk824[0x800]; + u8 unk1024[0x800]; + u8 unk1824[0x824]; }; static bool32 sub_81CB310(void); -u32 sub_81CB324(int); +static u32 sub_81CB324(int); void sub_81CBC1C(void); void sub_81CC2B4(void); +void sub_81CC034(struct Pokenav4Struct *); +void sub_81CBBB8(void); +void sub_81CBD78(struct Pokenav4Struct *); +void sub_81CBDC0(struct Pokenav4Struct *); +void sub_81CBEF8(struct Pokenav4Struct *, int); +void sub_81CC214(void); +void sub_81CBC38(int); extern const LoopedTask gUnknown_08622798[]; +extern const struct BgTemplate gUnknown_0862278C[3]; +extern const u16 gUnknown_08622510[]; +extern const u32 gUnknown_08622530[]; +extern const u32 gUnknown_08622760[]; +extern const u16 gUnknown_08622700[]; +extern const u16 gUnknown_08622720[]; +extern const u8 gUnknown_086225D4[]; +extern const u16 gUnknown_086226E0[]; bool32 sub_81CB260(void) { @@ -65,3 +88,224 @@ static bool32 sub_81CB310(void) struct Pokenav4Struct *state = GetSubstructPtr(6); return IsLoopedTaskActive(state->unk4); } + +static u32 sub_81CB324(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + InitBgTemplates(gUnknown_0862278C, ARRAY_COUNT(gUnknown_0862278C)); + ChangeBgX(2, 0, 0); + ChangeBgY(2, 0, 0); + decompress_and_copy_tile_data_to_vram(2, gUnknown_08622530, 0, 0, 0); + SetBgTilemapBuffer(2, state->unk1024); + CopyToBgTilemapBuffer(2, gUnknown_086225D4, 0, 0); + CopyBgTilemapBufferToVram(2); + CopyPaletteIntoBufferUnfaded(gUnknown_08622510, 0x20, 0x20); + CopyBgTilemapBufferToVram(2); + return 0; + case 1: + if (free_temp_tile_data_buffers_if_possible()) + return 2; + + sub_8199DF0(1, 0, 0, 1); + SetBgTilemapBuffer(1, state->unk24); + FillBgTilemapBufferRect_Palette0(1, 0x1000, 0, 0, 32, 20); + CopyPaletteIntoBufferUnfaded(gUnknown_086226E0, 0x10, 0x20); + CopyBgTilemapBufferToVram(1); + return 0; + case 2: + if (free_temp_tile_data_buffers_if_possible()) + return 2; + + sub_81CC034(state); + decompress_and_copy_tile_data_to_vram(3, gUnknown_08622760, 0, 0, 0); + CopyPaletteIntoBufferUnfaded(gUnknown_08622700, 0x30, 0x20); + CopyPaletteIntoBufferUnfaded(gUnknown_08622720, 0x50, 0x20); + return 0; + case 3: + if (free_temp_tile_data_buffers_if_possible() || !sub_81CAE28()) + return 2; + + sub_81CBBB8(); + return 0; + case 4: + if (sub_81C8224()) + return 2; + + sub_81CBD78(state); + return 0; + case 5: + sub_81CBDC0(state); + sub_81CBEF8(state, 0); + return 0; + case 6: + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + ShowBg(2); + ShowBg(3); + ShowBg(1); + sub_81CC214(); + LoadLeftHeaderGfxForIndex(3); + sub_81C7FA0(3, 1, 0); + sub_81C7AC0(1); + return 0; + case 7: + if (IsPaletteFadeActive() || sub_81C8010()) + return 2; + + sub_81CBC38(1); + return 4; + default: + return 4; + } +} + +u32 sub_81CB510(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + switch (MatchCall_MoveCursorDown()) + { + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return 7; + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return 0; + } + break; + case 1: + if (sub_81C8630()) + return 2; + + sub_81CBEF8(state, 0); + return 0; + case 2: + sub_81CBEF8(state, 0); + return 0; + case 3: + if (IsDma3ManagerBusyWithBgCopy()) + return 2; + break; + } + return 4; +} + +u32 sub_81CB588(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + switch (MatchCall_MoveCursorUp()) + { + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return 7; + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return 0; + } + break; + case 1: + if (sub_81C8630()) + return 2; + + sub_81CBEF8(state, 0); + return 0; + case 2: + sub_81CBEF8(state, 0); + return 0; + case 3: + if (IsDma3ManagerBusyWithBgCopy()) + return 2; + break; + } + return 4; +} + +u32 sub_81CB600(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + switch (MatchCall_PageDown()) + { + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return 7; + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return 0; + } + break; + case 1: + if (sub_81C8630()) + return 2; + + sub_81CBEF8(state, 0); + return 0; + case 2: + sub_81CBEF8(state, 0); + return 0; + case 3: + if (IsDma3ManagerBusyWithBgCopy()) + return 2; + break; + } + return 4; +} + +u32 sub_81CB678(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + switch (MatchCall_PageUp()) + { + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return 7; + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return 0; + } + break; + case 1: + if (sub_81C8630()) + return 2; + + sub_81CBEF8(state, 0); + return 0; + case 2: + sub_81CBEF8(state, 0); + return 0; + case 3: + if (IsDma3ManagerBusyWithBgCopy()) + return 2; + break; + } + return 4; +} From f9f5f34b0c52b02e6b342ecdbccb2692d1c75521 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 16 Apr 2019 11:00:13 -0500 Subject: [PATCH 3/8] Finish decompiling pokenav_unk_4.c --- asm/pokenav_unk_4.s | 1777 ----------------------------------- include/match_call.h | 2 + include/pokenav.h | 38 +- include/strings.h | 4 + ld_script.txt | 1 - src/match_call.c | 2 +- src/pokenav.c | 15 +- src/pokenav_main_menu.c | 2 +- src/pokenav_match_call_ui.c | 19 +- src/pokenav_unk_3.c | 9 +- src/pokenav_unk_4.c | 844 ++++++++++++++++- 11 files changed, 884 insertions(+), 1829 deletions(-) delete mode 100644 asm/pokenav_unk_4.s diff --git a/asm/pokenav_unk_4.s b/asm/pokenav_unk_4.s deleted file mode 100644 index b47370b6b..000000000 --- a/asm/pokenav_unk_4.s +++ /dev/null @@ -1,1777 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - -@ File centered around AllocSubstruct(6) - - thumb_func_start sub_81CB6F0 -sub_81CB6F0: @ 81CB6F0 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0 - beq _081CB706 - cmp r4, 0x1 - beq _081CB71C - b _081CB72A -_081CB706: - movs r0, 0x5 - bl PlaySE - adds r0, r5, 0 - bl sub_81CBF60 - movs r0, 0x7 - bl sub_81C7BA4 - movs r0, 0 - b _081CB72C -_081CB71C: - adds r0, r5, 0 - bl sub_81CBFC4 - cmp r0, 0 - beq _081CB72A - movs r0, 0x2 - b _081CB72C -_081CB72A: - movs r0, 0x4 -_081CB72C: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB6F0 - - thumb_func_start sub_81CB734 -sub_81CB734: @ 81CB734 - push {r4,lr} - movs r0, 0x5 - bl PlaySE - movs r0, 0x6 - bl GetSubstructPtr - adds r4, r0, 0 - bl sub_81CB01C - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl sub_81CC344 - movs r0, 0x4 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CB734 - - thumb_func_start sub_81CB75C -sub_81CB75C: @ 81CB75C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0 - beq _081CB772 - cmp r4, 0x1 - beq _081CB788 - b _081CB796 -_081CB772: - movs r0, 0x5 - bl PlaySE - adds r0, r5, 0 - bl sub_81CBFF0 - movs r0, 0x6 - bl sub_81C7BA4 - movs r0, 0 - b _081CB798 -_081CB788: - adds r0, r5, 0 - bl sub_81CC004 - cmp r0, 0 - beq _081CB796 - movs r0, 0x2 - b _081CB798 -_081CB796: - movs r0, 0x4 -_081CB798: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB75C - - thumb_func_start sub_81CB7A0 -sub_81CB7A0: @ 81CB7A0 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CB7D4 - cmp r4, 0x1 - bgt _081CB7BA - cmp r4, 0 - beq _081CB7C4 - b _081CB81A -_081CB7BA: - cmp r4, 0x2 - beq _081CB7F8 - cmp r4, 0x3 - beq _081CB80C - b _081CB81A -_081CB7C4: - movs r0, 0x1 - bl ToggleMatchCallVerticalArrows - adds r0, r5, 0 - bl sub_81CC058 - movs r0, 0 - b _081CB81C -_081CB7D4: - adds r0, r5, 0 - bl sub_81CC0D0 - adds r4, r0, 0 - cmp r4, 0 - bne _081CB816 - adds r0, r5, 0 - bl sub_81CC0E0 - ldr r0, =0x00000107 - bl PlaySE - strb r4, [r5, 0xE] - movs r0, 0 - b _081CB81C - .pool -_081CB7F8: - adds r0, r5, 0 - bl sub_81CC104 - cmp r0, 0 - bne _081CB816 - adds r0, r5, 0 - bl sub_81CC158 - movs r0, 0 - b _081CB81C -_081CB80C: - adds r0, r5, 0 - bl sub_81CC194 - cmp r0, 0 - beq _081CB81A -_081CB816: - movs r0, 0x2 - b _081CB81C -_081CB81A: - movs r0, 0x4 -_081CB81C: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB7A0 - - thumb_func_start sub_81CB824 -sub_81CB824: @ 81CB824 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CB85E - cmp r4, 0x1 - bgt _081CB83E - cmp r4, 0 - beq _081CB844 - b _081CB880 -_081CB83E: - cmp r4, 0x2 - beq _081CB872 - b _081CB880 -_081CB844: - movs r0, 0x5 - bl PlaySE - adds r0, r5, 0 - bl sub_81CC09C - movs r0, 0x1 - bl ToggleMatchCallVerticalArrows - movs r0, 0x1 - strb r0, [r5, 0xE] - movs r0, 0 - b _081CB882 -_081CB85E: - adds r0, r5, 0 - bl sub_81CC0D0 - cmp r0, 0 - bne _081CB87C - adds r0, r5, 0 - bl sub_81CC11C - movs r0, 0 - b _081CB882 -_081CB872: - adds r0, r5, 0 - bl sub_81CC140 - cmp r0, 0 - beq _081CB880 -_081CB87C: - movs r0, 0x2 - b _081CB882 -_081CB880: - movs r0, 0x4 -_081CB882: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB824 - - thumb_func_start sub_81CB888 -sub_81CB888: @ 81CB888 - push {r4-r6,lr} - adds r5, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r4, r0, 0 - movs r6, 0 - cmp r5, 0x6 - bhi _081CB934 - lsls r0, r5, 2 - ldr r1, =_081CB8A8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CB8A8: - .4byte _081CB8C4 - .4byte _081CB8DA - .4byte _081CB8E2 - .4byte _081CB8F0 - .4byte _081CB8F8 - .4byte _081CB90C - .4byte _081CB922 -_081CB8C4: - ldrb r0, [r4, 0xE] - cmp r0, 0 - bne _081CB8D2 - movs r0, 0x84 - lsls r0, 1 - bl PlaySE -_081CB8D2: - movs r0, 0x5 - bl PlaySE - b _081CB934 -_081CB8DA: - adds r0, r4, 0 - bl sub_81CC1DC - b _081CB934 -_081CB8E2: - adds r0, r4, 0 - bl sub_81CC204 - cmp r0, 0 - beq _081CB934 -_081CB8EC: - movs r6, 0x2 - b _081CB934 -_081CB8F0: - adds r0, r4, 0 - bl sub_81CBFF0 - b _081CB934 -_081CB8F8: - adds r0, r4, 0 - bl sub_81CC004 - cmp r0, 0 - beq _081CB904 - movs r6, 0x2 -_081CB904: - movs r0, 0x6 - bl sub_81C7BA4 - b _081CB934 -_081CB90C: - bl IsDma3ManagerBusyWithBgCopy_ - cmp r0, 0 - bne _081CB8EC - ldrb r0, [r4, 0xF] - cmp r0, 0 - beq _081CB92C - bl sub_81C8838 - movs r6, 0x1 - b _081CB934 -_081CB922: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _081CB8EC -_081CB92C: - movs r0, 0 - bl ToggleMatchCallVerticalArrows - movs r6, 0x4 -_081CB934: - adds r0, r6, 0 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_81CB888 - - thumb_func_start sub_81CB93C -sub_81CB93C: @ 81CB93C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CB974 - cmp r4, 0x1 - bgt _081CB956 - cmp r4, 0 - beq _081CB960 - b _081CB9BE -_081CB956: - cmp r4, 0x2 - beq _081CB990 - cmp r4, 0x3 - beq _081CB9A0 - b _081CB9BE -_081CB960: - movs r0, 0x5 - bl PlaySE - bl sub_81C877C - adds r0, r5, 0 - bl sub_81CC014 - movs r0, 0 - b _081CB9C0 -_081CB974: - bl sub_81C8820 - cmp r0, 0 - bne _081CB9BA - adds r0, r5, 0 - bl sub_81CC004 - cmp r0, 0 - bne _081CB9BA - movs r0, 0x8 - bl sub_81C7BA4 - movs r0, 0 - b _081CB9C0 -_081CB990: - movs r0, 0 - bl sub_81C87AC - adds r0, r5, 0 - bl sub_81CC39C - movs r0, 0 - b _081CB9C0 -_081CB9A0: - bl sub_81C8820 - cmp r0, 0 - bne _081CB9BA - adds r0, r5, 0 - bl sub_81CC42C - cmp r0, 0 - bne _081CB9BA - bl IsDma3ManagerBusyWithBgCopy_ - cmp r0, 0 - beq _081CB9BE -_081CB9BA: - movs r0, 0x2 - b _081CB9C0 -_081CB9BE: - movs r0, 0x4 -_081CB9C0: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB93C - - thumb_func_start sub_81CB9C8 -sub_81CB9C8: @ 81CB9C8 - push {r4,r5,lr} - adds r5, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r4, r0, 0 - cmp r5, 0x4 - bhi _081CBA60 - lsls r0, r5, 2 - ldr r1, =_081CB9E8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CB9E8: - .4byte _081CB9FC - .4byte _081CBA1C - .4byte _081CBA34 - .4byte _081CBA40 - .4byte _081CBA4A -_081CB9FC: - bl GetMatchCallListTopIndex - bl sub_81CB0E4 - adds r5, r0, 0 - cmp r5, 0 - beq _081CBA60 - movs r0, 0x5 - bl PlaySE - strh r5, [r4, 0x16] - adds r0, r4, 0 - bl sub_81CC420 - movs r0, 0 - b _081CBA62 -_081CBA1C: - adds r0, r4, 0 - bl sub_81CC42C - cmp r0, 0 - bne _081CBA5C - movs r0, 0x16 - ldrsh r1, [r4, r0] - adds r0, r4, 0 - bl sub_81CBEF8 - movs r0, 0 - b _081CBA62 -_081CBA34: - movs r1, 0x16 - ldrsh r0, [r4, r1] - bl sub_81C87AC - movs r0, 0 - b _081CBA62 -_081CBA40: - adds r0, r4, 0 - bl sub_81CC39C - movs r0, 0 - b _081CBA62 -_081CBA4A: - bl sub_81C8820 - cmp r0, 0 - bne _081CBA5C - adds r0, r4, 0 - bl sub_81CC42C - cmp r0, 0 - beq _081CBA60 -_081CBA5C: - movs r0, 0x2 - b _081CBA62 -_081CBA60: - movs r0, 0x4 -_081CBA62: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CB9C8 - - thumb_func_start sub_81CBA68 -sub_81CBA68: @ 81CBA68 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CBA9C - cmp r4, 0x1 - bgt _081CBA82 - cmp r4, 0 - beq _081CBA88 - b _081CBACC -_081CBA82: - cmp r4, 0x2 - beq _081CBABE - b _081CBACC -_081CBA88: - movs r0, 0x5 - bl PlaySE - adds r0, r5, 0 - bl sub_81CC420 - bl sub_81C87F0 - movs r0, 0 - b _081CBACE -_081CBA9C: - bl sub_81C8820 - cmp r0, 0 - bne _081CBAC8 - adds r0, r5, 0 - bl sub_81CC42C - cmp r0, 0 - bne _081CBAC8 - movs r0, 0x6 - bl sub_81C7BA4 - adds r0, r5, 0 - bl sub_81CBDC0 - movs r0, 0 - b _081CBACE -_081CBABE: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - beq _081CBACC -_081CBAC8: - movs r0, 0x2 - b _081CBACE -_081CBACC: - movs r0, 0x4 -_081CBACE: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CBA68 - - thumb_func_start sub_81CBAD4 -sub_81CBAD4: @ 81CBAD4 - push {r4,r5,lr} - adds r5, r0, 0 - movs r0, 0x6 - bl GetSubstructPtr - adds r4, r0, 0 - cmp r5, 0x4 - bhi _081CBB6C - lsls r0, r5, 2 - ldr r1, =_081CBAF4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CBAF4: - .4byte _081CBB08 - .4byte _081CBB28 - .4byte _081CBB40 - .4byte _081CBB4C - .4byte _081CBB56 -_081CBB08: - bl GetMatchCallListTopIndex - bl sub_81CB128 - adds r5, r0, 0 - cmp r5, 0 - beq _081CBB6C - movs r0, 0x5 - bl PlaySE - strh r5, [r4, 0x16] - adds r0, r4, 0 - bl sub_81CC420 - movs r0, 0 - b _081CBB6E -_081CBB28: - adds r0, r4, 0 - bl sub_81CC42C - cmp r0, 0 - bne _081CBB68 - movs r0, 0x16 - ldrsh r1, [r4, r0] - adds r0, r4, 0 - bl sub_81CBEF8 - movs r0, 0 - b _081CBB6E -_081CBB40: - movs r1, 0x16 - ldrsh r0, [r4, r1] - bl sub_81C87AC - movs r0, 0 - b _081CBB6E -_081CBB4C: - adds r0, r4, 0 - bl sub_81CC39C - movs r0, 0 - b _081CBB6E -_081CBB56: - bl sub_81C8820 - cmp r0, 0 - bne _081CBB68 - adds r0, r4, 0 - bl sub_81CC42C - cmp r0, 0 - beq _081CBB6C -_081CBB68: - movs r0, 0x2 - b _081CBB6E -_081CBB6C: - movs r0, 0x4 -_081CBB6E: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CBAD4 - - thumb_func_start sub_81CBB74 -sub_81CBB74: @ 81CBB74 - push {lr} - cmp r0, 0 - beq _081CBB80 - cmp r0, 0x1 - beq _081CBB9A - b _081CBBB2 -_081CBB80: - movs r0, 0x5 - bl PlaySE - movs r0, 0 - bl sub_81CBC38 - movs r0, 0 - bl sub_81C7AC0 - bl sub_81C78A0 - movs r0, 0 - b _081CBBB4 -_081CBB9A: - bl IsPaletteFadeActive - cmp r0, 0 - bne _081CBBAA - bl MainMenuLoopedTaskIsBusy - cmp r0, 0 - beq _081CBBAE -_081CBBAA: - movs r0, 0x2 - b _081CBBB4 -_081CBBAE: - bl sub_81C7FDC -_081CBBB2: - movs r0, 0x4 -_081CBBB4: - pop {r1} - bx r1 - thumb_func_end sub_81CBB74 - - thumb_func_start sub_81CBBB8 -sub_81CBBB8: @ 81CBBB8 - push {lr} - sub sp, 0x18 - bl sub_81CAE94 - str r0, [sp] - bl sub_81CAE38 - mov r1, sp - movs r2, 0 - strh r0, [r1, 0x4] - movs r0, 0x4 - strb r0, [r1, 0x8] - mov r0, sp - strh r2, [r0, 0x6] - movs r0, 0xD - strb r0, [r1, 0x9] - movs r0, 0x10 - strb r0, [r1, 0xA] - movs r0, 0x1 - strb r0, [r1, 0xB] - movs r0, 0x8 - strb r0, [r1, 0xC] - movs r0, 0x3 - strb r0, [r1, 0xD] - movs r0, 0x7 - strb r0, [r1, 0xE] - ldr r0, =sub_81CB050 - str r0, [sp, 0x10] - ldr r0, =sub_81CBCEC - str r0, [sp, 0x14] - ldr r0, =gUnknown_08622794 - movs r2, 0x2 - bl sub_81C81D4 - ldr r0, =sub_81CBC64 - movs r1, 0x7 - bl CreateTask - add sp, 0x18 - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBBB8 - - thumb_func_start sub_81CBC1C -sub_81CBC1C: @ 81CBC1C - push {lr} - bl sub_81C8234 - ldr r0, =sub_81CBC64 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r0, 24 - bl DestroyTask - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBC1C - - thumb_func_start sub_81CBC38 -sub_81CBC38: @ 81CBC38 - push {r4,lr} - adds r4, r0, 0 - ldr r0, =sub_81CBC64 - bl FindTaskIdByFunc - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xFF - beq _081CBC56 - ldr r1, =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r1 - strh r4, [r0, 0x26] -_081CBC56: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBC38 - - thumb_func_start sub_81CBC64 -sub_81CBC64: @ 81CBC64 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTasks + 0x8 - adds r2, r1, r0 - movs r1, 0x1E - ldrsh r0, [r2, r1] - cmp r0, 0 - beq _081CBCC8 - ldrh r0, [r2] - adds r0, 0x4 - movs r1, 0x7F - ands r0, r1 - strh r0, [r2] - ldr r1, =gSineTable - movs r3, 0 - ldrsh r0, [r2, r3] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - lsls r0, 16 - asrs r0, 20 - strh r0, [r2, 0x2] - ldr r0, =gUnknown_08622720 - adds r1, r0, 0 - adds r1, 0x20 - movs r3, 0x2 - ldrsh r2, [r2, r3] - str r2, [sp] - ldr r4, =gPlttBufferUnfaded + 0xA0 - str r4, [sp, 0x4] - movs r2, 0x10 - movs r3, 0x10 - bl sub_81C79BC - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _081CBCC8 - ldr r1, =gPlttBufferFaded + 0xA0 - ldr r2, =0x04000008 - adds r0, r4, 0 - bl CpuSet -_081CBCC8: - add sp, 0x8 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBC64 - - thumb_func_start sub_81CBCEC -sub_81CBCEC: @ 81CBCEC - push {r4-r6,lr} - adds r5, r1, 0 - adds r4, r2, 0 - lsls r0, 24 - lsrs r0, 24 - movs r1, 0 - bl GetWindowAttribute - lsls r0, 24 - lsrs r0, 24 - bl GetBgTilemapBuffer - adds r6, r0, 0 - lsls r4, 7 - adds r4, 0x3A - adds r6, r4 - adds r0, r5, 0 - bl sub_81CAEBC - cmp r0, 0 - beq _081CBD30 - movs r1, 0xA0 - lsls r1, 7 - adds r0, r1, 0 - strh r0, [r6] - adds r1, r6, 0 - adds r1, 0x40 - ldr r2, =0x00005001 - adds r0, r2, 0 - strh r0, [r1] - b _081CBD3C - .pool -_081CBD30: - ldr r0, =0x00005002 - adds r1, r0, 0 - strh r1, [r6] - adds r0, r6, 0 - adds r0, 0x40 - strh r1, [r0] -_081CBD3C: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBCEC - - thumb_func_start sub_81CBD48 -sub_81CBD48: @ 81CBD48 - push {r4,lr} - adds r4, r1, 0 - lsls r0, 24 - lsrs r0, 24 - movs r1, 0 - bl GetWindowAttribute - lsls r0, 24 - lsrs r0, 24 - bl GetBgTilemapBuffer - lsls r4, 7 - adds r4, 0x3A - adds r0, r4 - ldr r2, =0x00005002 - adds r1, r2, 0 - strh r1, [r0] - adds r0, 0x40 - strh r1, [r0] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBD48 - - thumb_func_start sub_81CBD78 -sub_81CBD78: @ 81CBD78 - push {r4,lr} - adds r4, r0, 0 - ldr r0, =gUnknown_086227D8 - bl AddWindow - strh r0, [r4, 0x10] - ldr r0, =gUnknown_086227E0 - bl AddWindow - strh r0, [r4, 0x12] - ldrb r0, [r4, 0x10] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x10] - bl PutWindowTilemap - ldrb r0, [r4, 0x12] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x12] - bl PutWindowTilemap - ldrb r0, [r4, 0x10] - movs r1, 0x1 - bl CopyWindowToVram - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBD78 - - thumb_func_start sub_81CBDC0 -sub_81CBDC0: @ 81CBDC0 - push {r4,lr} - adds r4, r0, 0 - ldrb r0, [r4, 0x12] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrh r0, [r4, 0x12] - bl sub_81CBDF4 - ldrh r0, [r4, 0x12] - bl sub_81CBE0C - ldrh r0, [r4, 0x12] - bl sub_81CBE38 - ldrh r0, [r4, 0x12] - bl sub_81CBE50 - ldrb r0, [r4, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CBDC0 - - thumb_func_start sub_81CBDF4 -sub_81CBDF4: @ 81CBDF4 - push {lr} - lsls r0, 16 - lsrs r0, 16 - ldr r1, =gText_NumberRegistered - movs r2, 0 - bl sub_81CBE88 - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBDF4 - - thumb_func_start sub_81CBE0C -sub_81CBE0C: @ 81CBE0C - push {r4,lr} - sub sp, 0x4 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - bl sub_81CAE38 - adds r1, r0, 0 - mov r0, sp - movs r2, 0 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - adds r0, r4, 0 - mov r1, sp - movs r2, 0x1 - bl sub_81CBEB4 - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CBE0C - - thumb_func_start sub_81CBE38 -sub_81CBE38: @ 81CBE38 - push {lr} - lsls r0, 16 - lsrs r0, 16 - ldr r1, =gText_NumberOfBattles - movs r2, 0x2 - bl sub_81CBE88 - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBE38 - - thumb_func_start sub_81CBE50 -sub_81CBE50: @ 81CBE50 - push {r4,lr} - sub sp, 0x8 - lsls r0, 16 - lsrs r4, r0, 16 - movs r0, 0x9 - bl GetGameStat - adds r1, r0, 0 - ldr r0, =0x0001869f - cmp r1, r0 - ble _081CBE68 - adds r1, r0, 0 -_081CBE68: - mov r0, sp - movs r2, 0 - movs r3, 0x5 - bl ConvertIntToDecimalStringN - adds r0, r4, 0 - mov r1, sp - movs r2, 0x3 - bl sub_81CBEB4 - add sp, 0x8 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBE50 - - thumb_func_start sub_81CBE88 -sub_81CBE88: @ 81CBE88 - push {lr} - sub sp, 0xC - adds r3, r1, 0 - lsls r2, 4 - adds r2, 0x1 - lsls r0, 24 - lsrs r0, 24 - lsls r2, 24 - lsrs r2, 24 - str r2, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x7 - adds r2, r3, 0 - movs r3, 0x2 - bl AddTextPrinterParameterized - add sp, 0xC - pop {r0} - bx r0 - thumb_func_end sub_81CBE88 - - thumb_func_start sub_81CBEB4 -sub_81CBEB4: @ 81CBEB4 - push {r4-r6,lr} - sub sp, 0xC - adds r5, r0, 0 - adds r6, r1, 0 - adds r4, r2, 0 - lsls r5, 16 - lsrs r5, 16 - movs r0, 0x7 - movs r2, 0x56 - bl GetStringRightAlignXOffset - adds r3, r0, 0 - lsls r4, 4 - adds r4, 0x1 - lsls r5, 24 - lsrs r5, 24 - lsls r3, 24 - lsrs r3, 24 - lsls r4, 24 - lsrs r4, 24 - str r4, [sp] - movs r0, 0xFF - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r5, 0 - movs r1, 0x7 - adds r2, r6, 0 - bl AddTextPrinterParameterized - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_81CBEB4 - - thumb_func_start sub_81CBEF8 -sub_81CBEF8: @ 81CBEF8 - push {r4,r5,lr} - sub sp, 0x2C - adds r5, r0, 0 - adds r4, r1, 0 - bl GetSelectedMatchCall - adds r0, r4 - bl sub_81CAEA4 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0xD5 - beq _081CBF1C - add r0, sp, 0xC - movs r2, 0 - bl GetMapName - b _081CBF24 -_081CBF1C: - ldr r1, =gText_Unknown - add r0, sp, 0xC - bl StringCopy -_081CBF24: - movs r0, 0x7 - add r1, sp, 0xC - movs r2, 0x58 - bl GetStringCenterAlignXOffset - adds r4, r0, 0 - ldrb r0, [r5, 0x10] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r5, 0x10] - lsls r4, 24 - lsrs r4, 24 - movs r1, 0x1 - str r1, [sp] - movs r1, 0 - str r1, [sp, 0x4] - str r1, [sp, 0x8] - movs r1, 0x7 - add r2, sp, 0xC - adds r3, r4, 0 - bl AddTextPrinterParameterized - add sp, 0x2C - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBEF8 - - thumb_func_start sub_81CBF60 -sub_81CBF60: @ 81CBF60 - push {r4-r6,lr} - sub sp, 0xC - adds r5, r0, 0 - ldrb r0, [r5, 0x12] - movs r1, 0x11 - bl FillWindowPixelBuffer - movs r4, 0 - movs r6, 0x80 - lsls r6, 17 - b _081CBF9C -_081CBF76: - ldrb r0, [r5, 0x12] - ldr r2, =gUnknown_086227E8 - lsls r1, 2 - adds r1, r2 - ldr r2, [r1] - lsrs r1, r6, 24 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x7 - movs r3, 0x10 - bl AddTextPrinterParameterized - movs r0, 0x80 - lsls r0, 21 - adds r6, r0 - adds r4, 0x1 -_081CBF9C: - cmp r4, 0x2 - bhi _081CBFAE - adds r0, r4, 0 - bl sub_81CB02C - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0x3 - bne _081CBF76 -_081CBFAE: - ldrb r0, [r5, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CBF60 - - thumb_func_start sub_81CBFC4 -sub_81CBFC4: @ 81CBFC4 - push {r4,lr} - adds r4, r0, 0 - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - beq _081CBFD6 - movs r0, 0x1 - b _081CBFE8 -_081CBFD6: - bl sub_81CB01C - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl sub_81CC2F0 - movs r0, 0 -_081CBFE8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CBFC4 - - thumb_func_start sub_81CBFF0 -sub_81CBFF0: @ 81CBFF0 - push {r4,lr} - adds r4, r0, 0 - bl sub_81CC330 - adds r0, r4, 0 - bl sub_81CBDC0 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CBFF0 - - thumb_func_start sub_81CC004 -sub_81CC004: @ 81CC004 - push {lr} - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - thumb_func_end sub_81CC004 - - thumb_func_start sub_81CC014 -sub_81CC014: @ 81CC014 - push {r4,lr} - adds r4, r0, 0 - bl sub_81CC330 - ldrb r0, [r4, 0x12] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x12] - movs r1, 0x2 - bl CopyWindowToVram - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CC014 - - thumb_func_start sub_81CC034 -sub_81CC034: @ 81CC034 - push {r4,lr} - adds r4, r0, 0 - ldr r0, =gUnknown_08622808 - bl AddWindow - strh r0, [r4, 0x14] - ldrh r0, [r4, 0x14] - movs r1, 0x1 - movs r2, 0x4 - bl sub_8197184 - bl sub_81C7B40 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC034 - - thumb_func_start sub_81CC058 -sub_81CC058: @ 81CC058 - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x14] - movs r1, 0x1 - movs r2, 0x4 - bl sub_8197184 - ldrh r0, [r4, 0x14] - movs r1, 0x1 - movs r2, 0x4 - bl sub_81971C4 - ldrb r0, [r4, 0x14] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x14] - bl PutWindowTilemap - ldrb r0, [r4, 0x14] - movs r1, 0x3 - bl CopyWindowToVram - bl PauseSpinningPokenavSprite - movs r2, 0 - movs r1, 0x18 - strh r1, [r0, 0x20] - movs r1, 0x70 - strh r1, [r0, 0x22] - strh r2, [r0, 0x26] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CC058 - - thumb_func_start sub_81CC09C -sub_81CC09C: @ 81CC09C - push {r4,lr} - adds r4, r0, 0 - ldrb r0, [r4, 0x14] - movs r1, 0x1 - movs r2, 0x40 - bl LoadUserWindowBorderGfx - ldrb r0, [r4, 0x14] - movs r1, 0x1 - movs r2, 0x4 - bl DrawTextBorderOuter - ldrb r0, [r4, 0x14] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x14] - bl PutWindowTilemap - ldrb r0, [r4, 0x14] - movs r1, 0x3 - bl CopyWindowToVram - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CC09C - - thumb_func_start sub_81CC0D0 -sub_81CC0D0: @ 81CC0D0 - push {lr} - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - thumb_func_end sub_81CC0D0 - - thumb_func_start sub_81CC0E0 -sub_81CC0E0: @ 81CC0E0 - push {lr} - sub sp, 0xC - ldrb r0, [r0, 0x14] - ldr r2, =gUnknown_086227F4 - movs r1, 0x1 - str r1, [sp] - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0x20 - bl AddTextPrinterParameterized - add sp, 0xC - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC0E0 - - thumb_func_start sub_81CC104 -sub_81CC104: @ 81CC104 - push {r4,lr} - adds r4, r0, 0 - bl RunTextPrinters - ldrb r0, [r4, 0x14] - bl IsTextPrinterActive - lsls r0, 16 - lsrs r0, 16 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CC104 - - thumb_func_start sub_81CC11C -sub_81CC11C: @ 81CC11C - push {lr} - sub sp, 0xC - ldrb r0, [r0, 0x14] - ldr r2, =gText_TrainerCloseBy - movs r1, 0x1 - str r1, [sp] - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized - add sp, 0xC - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC11C - - thumb_func_start sub_81CC140 -sub_81CC140: @ 81CC140 - push {r4,lr} - adds r4, r0, 0 - bl RunTextPrinters - ldrb r0, [r4, 0x14] - bl IsTextPrinterActive - lsls r0, 16 - lsrs r0, 16 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CC140 - - thumb_func_start sub_81CC158 -sub_81CC158: @ 81CC158 - push {r4,r5,lr} - sub sp, 0xC - adds r4, r0, 0 - bl GetSelectedMatchCall - adds r1, r4, 0 - adds r1, 0xF - bl sub_81CAF78 - adds r5, r0, 0 - bl GetPlayerTextSpeedDelay - lsls r0, 24 - lsrs r0, 24 - ldrb r2, [r4, 0x14] - movs r1, 0x1 - str r1, [sp] - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r2, 0 - adds r2, r5, 0 - movs r3, 0x20 - bl AddTextPrinterParameterized - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_81CC158 - - thumb_func_start sub_81CC194 -sub_81CC194: @ 81CC194 - push {r4,lr} - adds r4, r0, 0 - ldr r0, =gMain - ldrh r1, [r0, 0x2C] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _081CC1B8 - ldr r0, =gTextFlags - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] - b _081CC1C4 - .pool -_081CC1B8: - ldr r2, =gTextFlags - ldrb r1, [r2] - movs r0, 0x2 - negs r0, r0 - ands r0, r1 - strb r0, [r2] -_081CC1C4: - bl RunTextPrinters - ldrb r0, [r4, 0x14] - bl IsTextPrinterActive - lsls r0, 16 - lsrs r0, 16 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CC194 - - thumb_func_start sub_81CC1DC -sub_81CC1DC: @ 81CC1DC - push {lr} - sub sp, 0x8 - bl ResumeSpinningPokenavSprite - movs r0, 0x20 - str r0, [sp] - movs r0, 0x14 - str r0, [sp, 0x4] - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0x1 - bl CopyBgTilemapBufferToVram - add sp, 0x8 - pop {r0} - bx r0 - thumb_func_end sub_81CC1DC - - thumb_func_start sub_81CC204 -sub_81CC204: @ 81CC204 - push {lr} - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - thumb_func_end sub_81CC204 - - thumb_func_start sub_81CC214 -sub_81CC214: @ 81CC214 - push {r4-r6,lr} - sub sp, 0x8 - movs r0, 0x6 - bl GetSubstructPtr - adds r6, r0, 0 - movs r5, 0 - ldr r4, =gUnknown_08622810 -_081CC224: - adds r0, r4, 0 - bl LoadCompressedSpriteSheet - adds r4, 0x8 - adds r5, 0x1 - cmp r5, 0 - beq _081CC224 - ldr r0, =gUnknown_08622818 - bl Pokenav_AllocAndLoadPalettes - movs r0, 0 - str r0, [r6, 0x1C] - ldr r1, =0x00001828 - adds r0, r6, r1 - str r0, [sp] - ldr r1, =0xffff0000 - ldr r0, [sp, 0x4] - ands r0, r1 - movs r1, 0x80 - lsls r1, 4 - orrs r0, r1 - ldr r1, =0x0000ffff - ands r0, r1 - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [sp, 0x4] - mov r0, sp - bl LoadSpriteSheet - ldr r2, =0x00001824 - adds r1, r6, r2 - lsls r0, 16 - lsrs r0, 11 - ldr r2, =0x06010000 - adds r0, r2 - str r0, [r1] - movs r0, 0xD - bl AllocSpritePalette - lsls r0, 24 - lsrs r0, 20 - movs r1, 0x80 - lsls r1, 1 - adds r0, r1 - strh r0, [r6, 0x1A] - bl sub_81CC370 - str r0, [r6, 0x20] - adds r0, 0x3E - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC214 - - thumb_func_start sub_81CC2B4 -sub_81CC2B4: @ 81CC2B4 - push {r4,lr} - movs r0, 0x6 - bl GetSubstructPtr - adds r4, r0, 0 - ldr r0, [r4, 0x1C] - cmp r0, 0 - beq _081CC2C8 - bl DestroySprite -_081CC2C8: - ldr r0, [r4, 0x20] - cmp r0, 0 - beq _081CC2D2 - bl DestroySprite -_081CC2D2: - movs r0, 0x8 - bl FreeSpriteTilesByTag - movs r0, 0x7 - bl FreeSpriteTilesByTag - movs r0, 0xC - bl FreeSpritePaletteByTag - movs r0, 0xD - bl FreeSpritePaletteByTag - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CC2B4 - - thumb_func_start sub_81CC2F0 -sub_81CC2F0: @ 81CC2F0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldr r0, [r4, 0x1C] - cmp r0, 0 - bne _081CC320 - ldr r0, =gUnknown_08622830 - movs r1, 0x4 - movs r2, 0x50 - movs r3, 0x5 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - ldr r0, =gSprites - adds r1, r0 - str r1, [r4, 0x1C] - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_81CC344 -_081CC320: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC2F0 - - thumb_func_start sub_81CC330 -sub_81CC330: @ 81CC330 - push {r4,lr} - adds r4, r0, 0 - ldr r0, [r4, 0x1C] - bl DestroySprite - movs r0, 0 - str r0, [r4, 0x1C] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CC330 - - thumb_func_start sub_81CC344 -sub_81CC344: @ 81CC344 - ldr r0, [r0, 0x1C] - lsls r1, 4 - strh r1, [r0, 0x26] - bx lr - thumb_func_end sub_81CC344 - - thumb_func_start sub_81CC34C -sub_81CC34C: @ 81CC34C - push {lr} - adds r2, r0, 0 - ldrh r0, [r2, 0x2E] - adds r0, 0x1 - strh r0, [r2, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x3 - ble _081CC36C - movs r0, 0 - strh r0, [r2, 0x2E] - ldrh r0, [r2, 0x24] - adds r0, 0x1 - movs r1, 0x7 - ands r0, r1 - strh r0, [r2, 0x24] -_081CC36C: - pop {r0} - bx r0 - thumb_func_end sub_81CC34C - - thumb_func_start sub_81CC370 -sub_81CC370: @ 81CC370 - push {lr} - ldr r0, =gUnknown_08622850 - movs r1, 0x2C - movs r2, 0x68 - movs r3, 0x6 - bl CreateSprite - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CC370 - - thumb_func_start sub_81CC39C -sub_81CC39C: @ 81CC39C - push {r4-r7,lr} - adds r7, r0, 0 - bl GetSelectedMatchCall - bl sub_81CAF04 - cmp r0, 0 - blt _081CC400 - lsls r4, r0, 3 - ldr r0, =gTrainerFrontPicTable - adds r0, r4, r0 - ldr r1, =0x00001828 - adds r5, r7, r1 - adds r1, r5, 0 - movs r2, 0 - bl DecompressPicFromTable - ldr r0, =gTrainerFrontPicPaletteTable - adds r4, r0 - ldr r0, [r4] - ldr r1, =0x00002028 - adds r6, r7, r1 - adds r1, r6, 0 - bl LZ77UnCompWram - ldr r1, =0x00001824 - adds r0, r7, r1 - ldr r1, [r0] - movs r2, 0x80 - lsls r2, 4 - adds r0, r5, 0 - movs r3, 0x1 - bl RequestDma3Copy - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - ldrh r1, [r7, 0x1A] - adds r0, r6, 0 - movs r2, 0x20 - bl LoadPalette - ldr r1, [r7, 0x20] - movs r0, 0 - strh r0, [r1, 0x2E] - ldr r0, [r7, 0x20] - strh r4, [r0, 0x3C] - ldr r1, [r7, 0x20] - ldr r0, =sub_81CC440 - str r0, [r1, 0x1C] -_081CC400: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC39C - - thumb_func_start sub_81CC420 -sub_81CC420: @ 81CC420 - ldr r1, [r0, 0x20] - ldr r0, =sub_81CC4A4 - str r0, [r1, 0x1C] - bx lr - .pool - thumb_func_end sub_81CC420 - - thumb_func_start sub_81CC42C -sub_81CC42C: @ 81CC42C - ldr r0, [r0, 0x20] - ldr r1, [r0, 0x1C] - ldr r0, =SpriteCallbackDummy - eors r1, r0 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - bx lr - .pool - thumb_func_end sub_81CC42C - - thumb_func_start sub_81CC440 -sub_81CC440: @ 81CC440 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _081CC452 - cmp r0, 0x1 - beq _081CC484 - b _081CC498 -_081CC452: - movs r1, 0x3C - ldrsh r0, [r4, r1] - bl CheckForSpaceForDma3Request - lsls r0, 16 - asrs r0, 16 - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - beq _081CC498 - ldr r0, =0x0000ffb0 - strh r0, [r4, 0x24] - adds r2, r4, 0 - adds r2, 0x3E - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - b _081CC498 - .pool -_081CC484: - ldrh r0, [r4, 0x24] - adds r0, 0x8 - strh r0, [r4, 0x24] - lsls r0, 16 - cmp r0, 0 - blt _081CC498 - movs r0, 0 - strh r0, [r4, 0x24] - ldr r0, =SpriteCallbackDummy - str r0, [r4, 0x1C] -_081CC498: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC440 - - thumb_func_start sub_81CC4A4 -sub_81CC4A4: @ 81CC4A4 - push {lr} - adds r3, r0, 0 - ldrh r0, [r3, 0x24] - subs r0, 0x8 - strh r0, [r3, 0x24] - lsls r0, 16 - asrs r0, 16 - movs r1, 0x50 - negs r1, r1 - cmp r0, r1 - bgt _081CC4CA - adds r2, r3, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - ldr r0, =SpriteCallbackDummy - str r0, [r3, 0x1C] -_081CC4CA: - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC4A4 - - .align 2, 0 @ Don't pad with nop. diff --git a/include/match_call.h b/include/match_call.h index 014b20eb4..52eab63ec 100644 --- a/include/match_call.h +++ b/include/match_call.h @@ -17,5 +17,7 @@ bool32 IsMatchCallTaskActive(void); void StartMatchCallFromScript(u8 *message); void sub_8197080(u8 *destStr); bool32 SelectMatchCallMessage(int, u8 *); +void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId); +void sub_81971C4(u32 windowId, u32 tileOffset, u32 paletteId); #endif //GUARD_MATCH_CALL_H diff --git a/include/pokenav.h b/include/pokenav.h index b740297c3..443ab11d5 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -57,6 +57,21 @@ u32 GetPokenavMode(void); bool32 CanViewRibbonsMenu(void); // pokenav_match_call_ui.c +struct MatchCallListTemplate +{ + u32 unk0; + u16 unk4; + u16 unk6; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u8 unkC; + u8 unkD; + u8 unkE; + void (*unk10)(u32, u8 *a1); + void (*unk14)(u16 a0, u32 a1, u32 a2); +}; u32 GetSelectedMatchCall(void); bool32 sub_81C8224(void); int MatchCall_MoveCursorUp(void); @@ -64,6 +79,15 @@ int MatchCall_MoveCursorDown(void); int MatchCall_PageDown(void); int MatchCall_PageUp(void); bool32 sub_81C8630(void); +void ToggleMatchCallVerticalArrows(bool32 shouldHide); +void sub_81C8838(void); +void sub_81C877C(void); +bool32 sub_81C8820(void); +void sub_81C87AC(s16 a0); +u32 GetMatchCallListTopIndex(void); +void sub_81C87F0(void); +bool32 sub_81C81D4(const struct BgTemplate *arg0, struct MatchCallListTemplate *arg1, s32 arg2); +void sub_81C8234(void); // pokenav_match_call_data.c bool32 sub_81D17E8(u32 idx); @@ -88,6 +112,15 @@ void sub_81C7AC0(int a0); bool32 sub_81C8010(void); void InitBgTemplates(const struct BgTemplate *templates, int count); bool32 IsPaletteFadeActive(void); +void sub_81C7BA4(u32 helpBarIndex); +bool32 IsDma3ManagerBusyWithBgCopy_(void); +void sub_81C78A0(void); +bool32 MainMenuLoopedTaskIsBusy(void); +void sub_81C7FDC(void); +void sub_81C79BC(const u16 *a0, const u16 *a1, u32 a2, u32 a3, u32 a4, u16 *a5); +void sub_81C7B40(void); +struct Sprite *PauseSpinningPokenavSprite(void); +void ResumeSpinningPokenavSprite(void); // pokenav_unk_1.c bool32 sub_81C9298(void); @@ -124,14 +157,17 @@ int sub_81CAF04(int index); const u8 *sub_81CAFD8(int index, int textType); u16 sub_81CB01C(void); u16 sub_81CB02C(int arg0); -void sub_81CB050(struct Pokenav3Struct_Unk1C *arg0, u8 *str); +void sub_81CB050(u32 arg0, u8 *str); int sub_81CB0C8(int rematchIndex); int sub_81CB0E4(int index); bool32 sub_81CAE08(int); +int sub_81CB128(int index); // pokenav_unk_4.c u32 sub_81CB260(void); +void sub_81CB29C(int index); u32 sub_81CB2CC(void); void sub_81CB2E0(void); +void sub_81CBD48(u16 windowId, u32 a1); #endif //GUARD_POKENAV_H diff --git a/include/strings.h b/include/strings.h index 5de5b8e1d..964c46ef2 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2710,5 +2710,9 @@ extern const u8 gText_Exit2[]; // Pokenav Match Call extern const u8 gText_CallCantBeMadeHere[]; +extern const u8 gText_NumberRegistered[]; +extern const u8 gText_NumberOfBattles[]; +extern const u8 gText_Unknown[]; +extern const u8 gText_TrainerCloseBy[]; #endif // GUARD_STRINGS_H diff --git a/ld_script.txt b/ld_script.txt index 9c45dd3d0..68d7cb19e 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -307,7 +307,6 @@ SECTIONS { asm/pokenav_unk_2.o(.text); src/pokenav_unk_3.o(.text); src/pokenav_unk_4.o(.text); - asm/pokenav_unk_4.o(.text); asm/pokenav_unk_5.o(.text); asm/pokenav_unk_6.o(.text); asm/pokenav_unk_7.o(.text); diff --git a/src/match_call.c b/src/match_call.c index 1f5324f02..6221affe1 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -2002,7 +2002,7 @@ void sub_8197080(u8 *destStr) Free(buffer); } -void sub_8197184(u8 windowId, u32 destOffset, u32 paletteId) +void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); LoadBgTiles(bg, sUnknown_0860EA6C, 0x100, destOffset); diff --git a/src/pokenav.c b/src/pokenav.c index fde79682b..5556dbc42 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -31,7 +31,7 @@ struct UnknownPokenavCallbackStruct bool32 (*unk0)(void); u32 (*unk4)(void); u32 (*unk8)(void); - u32 (*unkC)(void); + void (*unkC)(int); u32 (*unk10)(void); void (*unk14)(void); void (*unk18)(void); @@ -39,44 +39,43 @@ struct UnknownPokenavCallbackStruct extern u32 sub_81C9924(void); extern u32 sub_81C99C0(void); -extern u32 sub_81C9990(void); +extern void sub_81C9990(int); extern u32 sub_81C9940(void); extern u32 sub_81CC4D4(void); extern u32 sub_81CC554(void); extern u32 sub_81CC5F4(void); -extern u32 sub_81CC62C(void); +extern void sub_81CC62C(int); extern u32 sub_81CC65C(void); extern void sub_81CC524(void); extern void sub_81CC670(void); extern u32 sub_81CCFD8(void); extern u32 sub_81CD070(void); extern u32 sub_81CDDD4(void); -extern u32 sub_81CDE2C(void); +extern void sub_81CDE2C(int); extern u32 sub_81CDE64(void); extern void sub_81CD1C0(void); extern void sub_81CECA0(void); extern u32 sub_81CEF3C(void); extern u32 sub_81CEFDC(void); extern u32 sub_81CF330(void); -extern u32 sub_81CF3A0(void); +extern void sub_81CF3A0(int); extern u32 sub_81CF3D0(void); extern void sub_81CEFF0(void); extern void sub_81CF3F8(void); extern u32 sub_81CD024(void); extern u32 sub_81CEF98(void); extern u32 sub_81CF368(void); -extern u32 sub_81CB29C(void); extern u32 sub_81CF9BC(void); extern u32 sub_81CFA34(void); extern u32 sub_81CFDD0(void); -extern u32 sub_81CFE40(void); +extern void sub_81CFE40(int); extern u32 sub_81CFE70(void); extern void sub_81CFA48(void); extern void sub_81CFE98(void); extern u32 sub_81D0450(void); extern u32 sub_81D04A0(void); extern u32 sub_81D0978(void); -extern u32 sub_81D09B0(void); +extern void sub_81D09B0(int); extern u32 sub_81D09E0(void); extern void sub_81D04B8(void); extern void sub_81D09F4(void); diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index e133e01fe..94dab60bb 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -502,7 +502,7 @@ void sub_81C7990(u32 a0, u16 a1) } NAKED -void sub_81C79BC(u16 *a0, u16 *a1, u32 a2, u32 a3, u32 a4, u32 a5) +void sub_81C79BC(const u16 *a0, const u16 *a1, u32 a2, u32 a3, u32 a4, u16 *a5) { asm(".syntax unified\n\ push {r4-r7,lr}\n\ diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 72449c7c0..795b4d599 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -64,23 +64,6 @@ struct UnknownSubStruct_81C81D4 u32 unk8A0; }; -struct MatchCallListTemplate -{ - u32 unk0; - u16 unk4; - u16 unk6; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; - u8 unkD; - u8 unkE; - void (*unk10)(u32, u8 *a1); - void (*unk14)(u16 a0, u32 a1, u32 a2); -}; - -extern void sub_81CBD48(u16 windowId, u32 a1); extern void sub_81DB620(u32 windowId, u32 a1, u32 a2, u32 a3, u32 a4); void sub_81C82E4(struct UnknownSubStruct_81C81D4 *a0); @@ -648,7 +631,7 @@ void sub_81C877C(void) structPtr->unk8A0 = CreateLoopedTask(LoopedTask_sub_81C8870, 6); } -void sub_81C87AC(u16 a0) +void sub_81C87AC(s16 a0) { u16 temp; struct UnknownSubStruct_81C81D4 *structPtr; diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c index 2c5110143..c6705a352 100755 --- a/src/pokenav_unk_3.c +++ b/src/pokenav_unk_3.c @@ -382,13 +382,14 @@ u16 sub_81CB02C(int arg0) return state->unk4[arg0]; } -void sub_81CB050(struct Pokenav3Struct_Unk1C *arg0, u8 *str) +void sub_81CB050(u32 arg0, u8 *str) { + struct Pokenav3Struct_Unk1C *var0 = (struct Pokenav3Struct_Unk1C *)arg0; const u8 *trainerName; const u8 *className; - if (!arg0->unk0) + if (!var0->unk0) { - int index = GetTrainerIdxByRematchIdx(arg0->unk2); + int index = GetTrainerIdxByRematchIdx(var0->unk2); const struct Trainer *trainer = &gTrainers[index]; int class = trainer->trainerClass; className = gTrainerClassNames[class]; @@ -396,7 +397,7 @@ void sub_81CB050(struct Pokenav3Struct_Unk1C *arg0, u8 *str) } else { - sub_81D1A78(arg0->unk2, &className, &trainerName); + sub_81D1A78(var0->unk2, &className, &trainerName); } if (className && trainerName) diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index 9a90090ac..38a531bec 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -1,41 +1,98 @@ #include "global.h" #include "bg.h" +#include "data.h" +#include "decompress.h" +#include "dma3.h" +#include "international_string_util.h" +#include "main.h" +#include "match_call.h" #include "menu.h" +#include "overworld.h" +#include "palette.h" #include "pokenav.h" +#include "region_map.h" #include "sound.h" +#include "sprite.h" +#include "string_util.h" +#include "strings.h" +#include "task.h" +#include "text.h" +#include "text_window.h" +#include "trig.h" #include "window.h" +#include "constants/game_stat.h" +#include "constants/region_map_sections.h" #include "constants/songs.h" +#include "constants/species.h" struct Pokenav4Struct { u32 (*unk0)(void); u32 unk4; - u8 filler8[0x8]; - u8 unk10; - u8 filler11[0x1]; - u8 unk12; - u8 filler13[0x1]; - u8 unk14; - u8 filler15[0x4]; + u8 filler8[0x6]; + u8 unkE; + u8 unkF; + u16 unk10; + u16 unk12; + u16 unk14; + s16 unk16; + u8 unused18; u8 unk19; - u8 filler1A[0xA]; + u16 unk1A; + struct Sprite *unk1C; + struct Sprite *unk20; u8 unk24[0x800]; u8 unk824[0x800]; u8 unk1024[0x800]; - u8 unk1824[0x824]; + u8 *unk1824; + u8 unk1828[0x800]; + u8 unk2028[0x20]; }; static bool32 sub_81CB310(void); static u32 sub_81CB324(int); -void sub_81CBC1C(void); -void sub_81CC2B4(void); -void sub_81CC034(struct Pokenav4Struct *); -void sub_81CBBB8(void); -void sub_81CBD78(struct Pokenav4Struct *); -void sub_81CBDC0(struct Pokenav4Struct *); -void sub_81CBEF8(struct Pokenav4Struct *, int); -void sub_81CC214(void); -void sub_81CBC38(int); +static void sub_81CBBB8(void); +static void sub_81CBC1C(void); +static void sub_81CC2B4(void); +static void sub_81CC034(struct Pokenav4Struct *); +static void sub_81CBD78(struct Pokenav4Struct *); +static void sub_81CBDC0(struct Pokenav4Struct *); +static void sub_81CBEF8(struct Pokenav4Struct *, int); +static void sub_81CC214(void); +static void sub_81CBC38(int); +static void sub_81CBF60(struct Pokenav4Struct *); +static bool32 sub_81CBFC4(struct Pokenav4Struct *); +static void sub_81CC344(struct Pokenav4Struct *, int); +static bool32 sub_81CC004(struct Pokenav4Struct *); +static void sub_81CBFF0(struct Pokenav4Struct *); +static void sub_81CC058(struct Pokenav4Struct *); +static bool32 sub_81CC0D0(struct Pokenav4Struct *); +static void sub_81CC0E0(struct Pokenav4Struct *); +static bool32 sub_81CC104(struct Pokenav4Struct *); +static void sub_81CC158(struct Pokenav4Struct *); +static bool32 sub_81CC194(struct Pokenav4Struct *); +static void sub_81CC09C(struct Pokenav4Struct *); +static void sub_81CC11C(struct Pokenav4Struct *); +static bool32 sub_81CC140(struct Pokenav4Struct *); +static void sub_81CC1DC(struct Pokenav4Struct *); +static bool32 sub_81CC204(struct Pokenav4Struct *); +static void sub_81CC014(struct Pokenav4Struct *); +static void sub_81CC39C(struct Pokenav4Struct *); +static bool32 sub_81CC42C(struct Pokenav4Struct *); +static void sub_81CC420(struct Pokenav4Struct *); +static void sub_81CBC64(u8 taskId); +static void sub_81CBCEC(u16 windowId, u32, u32); +static void sub_81CBDF4(u16 windowId); +static void sub_81CBE0C(u16 windowId); +static void sub_81CBE38(u16 windowId); +static void sub_81CBE50(u16 windowId); +static void sub_81CBE88(u16 windowId, const u8 *str, int top); +static void sub_81CBEB4(u16 windowId, const u8 *str, int top); +static void sub_81CC2F0(struct Pokenav4Struct *, int); +static void sub_81CC330(struct Pokenav4Struct *); +static struct Sprite *sub_81CC370(void); +static void sub_81CC440(struct Sprite *sprite); +static void sub_81CC4A4(struct Sprite *sprite); extern const LoopedTask gUnknown_08622798[]; extern const struct BgTemplate gUnknown_0862278C[3]; @@ -46,6 +103,16 @@ extern const u16 gUnknown_08622700[]; extern const u16 gUnknown_08622720[]; extern const u8 gUnknown_086225D4[]; extern const u16 gUnknown_086226E0[]; +extern const struct BgTemplate gUnknown_08622794; +extern const struct WindowTemplate gUnknown_086227D8; +extern const struct WindowTemplate gUnknown_086227E0; +extern const u8 *const gUnknown_086227E8[]; +extern const struct WindowTemplate gUnknown_08622808; +extern const u8 gUnknown_086227F4[]; +extern const struct CompressedSpriteSheet gUnknown_08622810[1]; +extern const struct SpritePalette gUnknown_08622818[]; +extern const struct SpriteTemplate gUnknown_08622830; +extern const struct SpriteTemplate gUnknown_08622850; bool32 sub_81CB260(void) { @@ -309,3 +376,744 @@ u32 sub_81CB678(int taskState) } return 4; } + +u32 sub_81CB6F0(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81CBF60(state); + sub_81C7BA4(7); + return 0; + case 1: + if (sub_81CBFC4(state)) + return 2; + break; + } + + return 4; +} + +u32 sub_81CB734(int taskState) +{ + struct Pokenav4Struct *state; + u16 var0; + + PlaySE(SE_SELECT); + state = GetSubstructPtr(6); + var0 = sub_81CB01C(); + sub_81CC344(state, var0); + return 4; +} + +u32 sub_81CB75C(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81CBFF0(state); + sub_81C7BA4(6); + return 0; + case 1: + if (sub_81CC004(state)) + return 2; + break; + } + + return 4; +} + +u32 sub_81CB7A0(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + ToggleMatchCallVerticalArrows(TRUE); + sub_81CC058(state); + return 0; + case 1: + if (sub_81CC0D0(state)) + return 2; + + sub_81CC0E0(state); + PlaySE(SE_TOREEYE); + state->unkE = 0; + return 0; + case 2: + if (sub_81CC104(state)) + return 2; + + sub_81CC158(state); + return 0; + case 3: + if (sub_81CC194(state)) + return 2; + break; + } + + return 4; +} + +u32 sub_81CB824(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81CC09C(state); + ToggleMatchCallVerticalArrows(TRUE); + state->unkE = 1; + return 0; + case 1: + if (sub_81CC0D0(state)) + return 2; + + sub_81CC11C(state); + return 0; + case 2: + if (sub_81CC140(state)) + return 2; + break; + } + + return 4; +} + +u32 sub_81CB888(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + u32 result = 0; + + switch (taskState) + { + case 0: + if (!state->unkE) + PlaySE(SE_TOREOFF); + + PlaySE(SE_SELECT); + break; + case 1: + sub_81CC1DC(state); + break; + case 2: + if (sub_81CC204(state)) + result = 2; + break; + case 3: + sub_81CBFF0(state); + break; + case 4: + if (sub_81CC004(state)) + result = 2; + + sub_81C7BA4(6); + break; + case 5: + if (IsDma3ManagerBusyWithBgCopy_()) + { + result = 2; + } + else + { + if (state->unkF) + { + sub_81C8838(); + result = 1; + } + else + { + ToggleMatchCallVerticalArrows(FALSE); + result = 4; + } + } + break; + case 6: + if (IsDma3ManagerBusyWithBgCopy()) + { + result = 2; + } + else + { + ToggleMatchCallVerticalArrows(FALSE); + result = 4; + } + break; + } + + return result; +} + +u32 sub_81CB93C(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81C877C(); + sub_81CC014(state); + return 0; + case 1: + if (sub_81C8820() || sub_81CC004(state)) + return 2; + + sub_81C7BA4(8); + return 0; + case 2: + sub_81C87AC(0); + sub_81CC39C(state); + return 0; + case 3: + if (sub_81C8820() || sub_81CC42C(state) || IsDma3ManagerBusyWithBgCopy_()) + return 2; + break; + } + + return 4; +} + +u32 sub_81CB9C8(int taskState) +{ + int index; + int var0; + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + index = GetMatchCallListTopIndex(); + var0 = sub_81CB0E4(index); + if (var0) + { + PlaySE(SE_SELECT); + state->unk16 = var0; + sub_81CC420(state); + return 0; + } + break; + case 1: + if (sub_81CC42C(state)) + return 2; + + sub_81CBEF8(state, state->unk16); + return 0; + case 2: + sub_81C87AC(state->unk16); + return 0; + case 3: + sub_81CC39C(state); + return 0; + case 4: + if (sub_81C8820() || sub_81CC42C(state)) + return 2; + break; + } + + return 4; +} + +u32 sub_81CBA68(int taskState) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81CC420(state); + sub_81C87F0(); + return 0; + case 1: + if (sub_81C8820() || sub_81CC42C(state)) + return 2; + + sub_81C7BA4(6); + sub_81CBDC0(state); + return 0; + case 2: + if (IsDma3ManagerBusyWithBgCopy()) + return 2; + break; + } + + return 4; +} + +u32 sub_81CBAD4(int taskState) +{ + int index; + int var0; + struct Pokenav4Struct *state = GetSubstructPtr(6); + switch (taskState) + { + case 0: + index = GetMatchCallListTopIndex(); + var0 = sub_81CB128(index); + if (var0) + { + PlaySE(SE_SELECT); + state->unk16 = var0; + sub_81CC420(state); + return 0; + } + break; + case 1: + if (sub_81CC42C(state)) + return 2; + + sub_81CBEF8(state, state->unk16); + return 0; + case 2: + sub_81C87AC(state->unk16); + return 0; + case 3: + sub_81CC39C(state); + return 0; + case 4: + if (sub_81C8820() || sub_81CC42C(state)) + return 2; + break; + } + + return 4; +} + +u32 sub_81CBB74(int taskState) +{ + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81CBC38(0); + sub_81C7AC0(0); + sub_81C78A0(); + return 0; + case 1: + if (IsPaletteFadeActive() || MainMenuLoopedTaskIsBusy()) + return 2; + + sub_81C7FDC(); + break; + } + + return 4; +} + +static void sub_81CBBB8(void) +{ + struct MatchCallListTemplate template; + template.unk0 = (u32)sub_81CAE94(); + template.unk4 = sub_81CAE38(); + template.unk8 = 4; + template.unk6 = 0; + template.unk9 = 13; + template.unkA = 16; + template.unkB = 1; + template.unkC = 8; + template.unkD = 3; + template.unkE = 7; + template.unk10 = sub_81CB050; + template.unk14 = sub_81CBCEC; + sub_81C81D4(&gUnknown_08622794, &template, 2); + CreateTask(sub_81CBC64, 7); +} + +static void sub_81CBC1C(void) +{ + sub_81C8234(); + DestroyTask(FindTaskIdByFunc(sub_81CBC64)); +} + +static void sub_81CBC38(int arg0) +{ + u8 taskId = FindTaskIdByFunc(sub_81CBC64); + if (taskId != 0xFF) + gTasks[taskId].data[15] = arg0; +} + +static void sub_81CBC64(u8 taskId) +{ + s16 *taskData = gTasks[taskId].data; + if (taskData[15]) + { + taskData[0] += 4; + taskData[0] &= 0x7F; + taskData[1] = gSineTable[taskData[0]] >> 4; + sub_81C79BC(gUnknown_08622720, gUnknown_08622720 + 0x10, 0x10, 0x10, taskData[1], gPlttBufferUnfaded + 0x50); + if (!gPaletteFade.active) + CpuCopy32(gPlttBufferUnfaded + 0x50, gPlttBufferFaded + 0x50, 0x20); + } +} + +static void sub_81CBCEC(u16 windowId, u32 arg1, u32 arg2) +{ + u8 bg = GetWindowAttribute(windowId, WINDOW_BG); + u16 *tilemap = GetBgTilemapBuffer(bg); + tilemap += arg2 * 0x40 + 0x1D; + if (sub_81CAEBC(arg1)) + { + tilemap[0] = 0x5000; + tilemap[0x20] = 0x5001; + } + else + { + tilemap[0] = 0x5002; + tilemap[0x20] = 0x5002; + } +} + +void sub_81CBD48(u16 windowId, u32 arg0) +{ + u8 bg = GetWindowAttribute(windowId, WINDOW_BG); + u16 *tilemap = GetBgTilemapBuffer(bg); + tilemap += arg0 * 0x40 + 0x1D; + tilemap[0] = 0x5002; + tilemap[0x20] = 0x5002; +} + +static void sub_81CBD78(struct Pokenav4Struct *state) +{ + state->unk10 = AddWindow(&gUnknown_086227D8); + state->unk12 = AddWindow(&gUnknown_086227E0); + FillWindowPixelBuffer(state->unk10, PIXEL_FILL(1)); + PutWindowTilemap(state->unk10); + FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); + PutWindowTilemap(state->unk12); + CopyWindowToVram(state->unk10, 1); +} + +static void sub_81CBDC0(struct Pokenav4Struct *state) +{ + FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); + sub_81CBDF4(state->unk12); + sub_81CBE0C(state->unk12); + sub_81CBE38(state->unk12); + sub_81CBE50(state->unk12); + CopyWindowToVram(state->unk12, 2); +} + +static void sub_81CBDF4(u16 windowId) +{ + sub_81CBE88(windowId, gText_NumberRegistered, 0); +} + +static void sub_81CBE0C(u16 windowId) +{ + u8 str[3]; + ConvertIntToDecimalStringN(str, sub_81CAE38(), STR_CONV_MODE_LEFT_ALIGN, 3); + sub_81CBEB4(windowId, str, 1); +} + +static void sub_81CBE38(u16 windowId) +{ + sub_81CBE88(windowId, gText_NumberOfBattles, 2); +} + +static void sub_81CBE50(u16 windowId) +{ + u8 str[5]; + int numTrainerBattles = GetGameStat(GAME_STAT_TRAINER_BATTLES); + if (numTrainerBattles > 99999) + numTrainerBattles = 99999; + + ConvertIntToDecimalStringN(str, numTrainerBattles, STR_CONV_MODE_LEFT_ALIGN, 5); + sub_81CBEB4(windowId, str, 3); +} + +static void sub_81CBE88(u16 windowId, const u8 *str, int top) +{ + int y = top * 16 + 1; + AddTextPrinterParameterized(windowId, 7, str, 2, y, TEXT_SPEED_FF, NULL); +} + +static void sub_81CBEB4(u16 windowId, const u8 *str, int top) +{ + int x = GetStringRightAlignXOffset(7, str, 86); + int y = top * 16 + 1; + AddTextPrinterParameterized(windowId, 7, str, x, y, TEXT_SPEED_FF, NULL); +} + +static void sub_81CBEF8(struct Pokenav4Struct *state, int arg1) +{ + u8 mapName[32]; + int x; + int index = GetSelectedMatchCall() + arg1; + int regionMapSection = sub_81CAEA4(index); + if (regionMapSection != MAPSEC_NONE) + GetMapName(mapName, regionMapSection, 0); + else + StringCopy(mapName, gText_Unknown); + + x = GetStringCenterAlignXOffset(7, mapName, 88); + FillWindowPixelBuffer(state->unk10, PIXEL_FILL(1)); + AddTextPrinterParameterized(state->unk10, 7, mapName, x, 1, 0, NULL); +} + +static void sub_81CBF60(struct Pokenav4Struct *state) +{ + u32 i; + + FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); + for (i = 0; i < 3; i++) + { + int messageId = sub_81CB02C(i); + if (messageId == 3) + break; + + AddTextPrinterParameterized(state->unk12, 7, gUnknown_086227E8[messageId], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); + } + + CopyWindowToVram(state->unk12, 2); +} + +static bool32 sub_81CBFC4(struct Pokenav4Struct *state) +{ + if (!IsDma3ManagerBusyWithBgCopy()) + { + sub_81CC2F0(state, sub_81CB01C()); + return FALSE; + } + + return TRUE; +} + +static void sub_81CBFF0(struct Pokenav4Struct *state) +{ + sub_81CC330(state); + sub_81CBDC0(state); +} + +static bool32 sub_81CC004(struct Pokenav4Struct *state) +{ + return IsDma3ManagerBusyWithBgCopy(); +} + +static void sub_81CC014(struct Pokenav4Struct *state) +{ + sub_81CC330(state); + FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); + CopyWindowToVram(state->unk12, 2); +} + +static void sub_81CC034(struct Pokenav4Struct *state) +{ + state->unk14 = AddWindow(&gUnknown_08622808); + sub_8197184(state->unk14, 1, 4); + sub_81C7B40(); +} + +static void sub_81CC058(struct Pokenav4Struct *state) +{ + struct Sprite *sprite; + sub_8197184(state->unk14, 1, 4); + sub_81971C4(state->unk14, 1, 4); + FillWindowPixelBuffer(state->unk14, PIXEL_FILL(1)); + PutWindowTilemap(state->unk14); + CopyWindowToVram(state->unk14, 3); + sprite = PauseSpinningPokenavSprite(); + sprite->pos1.x = 24; + sprite->pos1.y = 112; + sprite->pos2.y = 0; +} + +static void sub_81CC09C(struct Pokenav4Struct *state) +{ + LoadUserWindowBorderGfx(state->unk14, 1, 0x40); + DrawTextBorderOuter(state->unk14, 1, 4); + FillWindowPixelBuffer(state->unk14, PIXEL_FILL(1)); + PutWindowTilemap(state->unk14); + CopyWindowToVram(state->unk14, 3); +} + +static bool32 sub_81CC0D0(struct Pokenav4Struct *state) +{ + return IsDma3ManagerBusyWithBgCopy(); +} + +static void sub_81CC0E0(struct Pokenav4Struct *state) +{ + AddTextPrinterParameterized(state->unk14, 1, gUnknown_086227F4, 32, 1, 1, NULL); +} + +static bool32 sub_81CC104(struct Pokenav4Struct *state) +{ + RunTextPrinters(); + return IsTextPrinterActive(state->unk14); +} + +static void sub_81CC11C(struct Pokenav4Struct *state) +{ + AddTextPrinterParameterized(state->unk14, 1, gText_TrainerCloseBy, 0, 1, 1, NULL); +} + +static bool32 sub_81CC140(struct Pokenav4Struct *state) +{ + RunTextPrinters(); + return IsTextPrinterActive(state->unk14); +} + +static void sub_81CC158(struct Pokenav4Struct *state) +{ + int index = GetSelectedMatchCall(); + const u8 *str = sub_81CAF78(index, &state->unkF); + u8 speed = GetPlayerTextSpeedDelay(); + AddTextPrinterParameterized(state->unk14, 1, str, 32, 1, speed, NULL); +} + +static bool32 sub_81CC194(struct Pokenav4Struct *state) +{ + if (gMain.heldKeys & A_BUTTON) + gTextFlags.canABSpeedUpPrint = 1; + else + gTextFlags.canABSpeedUpPrint = 0; + + RunTextPrinters(); + return IsTextPrinterActive(state->unk14); +} + +static void sub_81CC1DC(struct Pokenav4Struct *state) +{ + ResumeSpinningPokenavSprite(); + FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); + CopyBgTilemapBufferToVram(1); +} + +static bool32 sub_81CC204(struct Pokenav4Struct *state) +{ + return IsDma3ManagerBusyWithBgCopy(); +} + +static void sub_81CC214(void) +{ + int i; + u8 paletteNum; + struct SpriteSheet spriteSheet; + struct Pokenav4Struct *state = GetSubstructPtr(6); + + for (i = 0; i < ARRAY_COUNT(gUnknown_08622810); i++) + LoadCompressedSpriteSheet(&gUnknown_08622810[i]); + + Pokenav_AllocAndLoadPalettes(gUnknown_08622818); + state->unk1C = NULL; + spriteSheet.data = state->unk1828; + spriteSheet.size = 0x800; + spriteSheet.tag = 8; + state->unk1824 = (u8 *)OBJ_VRAM0 + LoadSpriteSheet(&spriteSheet) * 0x20; + paletteNum = AllocSpritePalette(13); + state->unk1A = 0x100 + paletteNum * 0x10; + state->unk20 = sub_81CC370(); + state->unk20->invisible = 1; +} + +static void sub_81CC2B4(void) +{ + struct Pokenav4Struct *state = GetSubstructPtr(6); + if (state->unk1C) + DestroySprite(state->unk1C); + if (state->unk20) + DestroySprite(state->unk20); + + FreeSpriteTilesByTag(8); + FreeSpriteTilesByTag(7); + FreeSpritePaletteByTag(12); + FreeSpritePaletteByTag(13); +} + +static void sub_81CC2F0(struct Pokenav4Struct *state, int top) +{ + if (!state->unk1C) + { + u8 spriteId = CreateSprite(&gUnknown_08622830, 4, 80, 5); + state->unk1C = &gSprites[spriteId]; + sub_81CC344(state, top); + } +} + +static void sub_81CC330(struct Pokenav4Struct *state) +{ + DestroySprite(state->unk1C); + state->unk1C = NULL; +} + +static void sub_81CC344(struct Pokenav4Struct *state, int top) +{ + state->unk1C->pos2.y = top * 16; +} + +void sub_81CC34C(struct Sprite *sprite) +{ + if (++sprite->data[0] > 3) + { + sprite->data[0] = 0; + sprite->pos2.x = (sprite->pos2.x + 1) & 0x7; + } +} + +static struct Sprite *sub_81CC370(void) +{ + u8 spriteId = CreateSprite(&gUnknown_08622850, 44, 104, 6); + return &gSprites[spriteId]; +} + +static void sub_81CC39C(struct Pokenav4Struct *state) +{ + u16 cursor; + int trainerId = sub_81CAF04(GetSelectedMatchCall()); + if (trainerId >= 0) + { + DecompressPicFromTable(&gTrainerFrontPicTable[trainerId], state->unk1828, SPECIES_NONE); + LZ77UnCompWram(gTrainerFrontPicPaletteTable[trainerId].data, state->unk2028); + cursor = RequestDma3Copy(state->unk1828, state->unk1824, 0x800, 1); + LoadPalette(state->unk2028, state->unk1A, 0x20); + state->unk20->data[0] = 0; + state->unk20->data[7] = cursor; + state->unk20->callback = sub_81CC440; + } +} + +static void sub_81CC420(struct Pokenav4Struct *state) +{ + state->unk20->callback = sub_81CC4A4; +} + +static bool32 sub_81CC42C(struct Pokenav4Struct *state) +{ + return state->unk20->callback != SpriteCallbackDummy; +} + +static void sub_81CC440(struct Sprite *sprite) +{ + switch (sprite->data[0]) + { + case 0: + if (CheckForSpaceForDma3Request(sprite->data[7]) != -1) + { + sprite->pos2.x = -80; + sprite->invisible = 0; + sprite->data[0]++; + } + break; + case 1: + sprite->pos2.x += 8; + if (sprite->pos2.x >= 0) + { + sprite->pos2.x = 0; + sprite->callback = SpriteCallbackDummy; + } + break; + } +} + +static void sub_81CC4A4(struct Sprite *sprite) +{ + sprite->pos2.x -= 8; + if (sprite->pos2.x <= -80) + { + sprite->invisible = 1; + sprite->callback = SpriteCallbackDummy; + } +} From b4e1375bb612f22ab44d3ec9b50ec8b4fe6d2bc9 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 14 Apr 2019 17:20:26 +0200 Subject: [PATCH 4/8] Document pokemon item effects --- include/constants/item_effects.h | 79 ++++ include/constants/items.h | 2 +- src/battle_ai_switch_items.c | 38 +- src/data/pokemon/item_effects.h | 704 +++++++++++++++++++++---------- src/item_use.c | 65 +-- src/party_menu.c | 177 ++++---- src/pokemon.c | 80 ++-- 7 files changed, 737 insertions(+), 408 deletions(-) create mode 100644 include/constants/item_effects.h diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h new file mode 100644 index 000000000..a5bb77035 --- /dev/null +++ b/include/constants/item_effects.h @@ -0,0 +1,79 @@ +#ifndef GUARD_CONSTANTS_ITEM_EFFECTS_H +#define GUARD_CONSTANTS_ITEM_EFFECTS_H + +// field 0 masks +#define ITEM0_X_ATTACK 0x0F +#define ITEM0_HIGH_CRIT 0x30 // For Dire Hit, works the same way as move Focus Energy. +#define ITEM0_SACRED_ASH 0x40 +#define ITEM0_INFATUATION 0x80 + +// field 1 masks +#define ITEM1_X_SPEED 0x0F +#define ITEM1_X_DEFEND 0xF0 + +// field 2 masks +#define ITEM2_X_SPATK 0x0F +#define ITEM2_X_ACCURACY 0xF0 + +// field 3 masks +#define ITEM3_CONFUSION 0x1 +#define ITEM3_PARALYSIS 0x2 +#define ITEM3_FREEZE 0x4 +#define ITEM3_BURN 0x8 +#define ITEM3_POISON 0x10 +#define ITEM3_SLEEP 0x20 +#define ITEM3_LEVEL_UP 0x40 +#define ITEM3_MIST 0x80 // For Guard Specs, works the same way as move Mist. + +#define ITEM3_STATUS_ALL (ITEM3_CONFUSION | ITEM3_PARALYSIS | ITEM3_FREEZE | ITEM3_BURN | ITEM3_POISON | ITEM3_SLEEP) + +// field 4 masks +#define ITEM4_EV_HP 0x1 +#define ITEM4_EV_ATK 0x2 +#define ITEM4_HEAL_HP 0x4 +#define ITEM4_HEAL_PP_ALL 0x8 +#define ITEM4_HEAL_PP_ONE 0x10 +#define ITEM4_PP_UP 0x20 +#define ITEM4_REVIVE 0x40 +#define ITEM4_EVO_STONE 0x80 + +// field 5 masks +#define ITEM5_EV_DEF 0x1 +#define ITEM5_EV_SPEED 0x2 +#define ITEM5_EV_SPDEF 0x4 +#define ITEM5_EV_SPATK 0x8 +#define ITEM5_PP_MAX 0x10 +#define ITEM5_FRIENDSHIP_LOW 0x20 +#define ITEM5_FRIENDSHIP_MID 0x40 +#define ITEM5_FRIENDSHIP_HIGH 0x80 + +#define ITEM5_FRIENDSHIP_ALL (ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID | ITEM5_FRIENDSHIP_HIGH) + +// fields 6 and onwards are item-specific arguments + +// Used for GetItemEffectType. +#define ITEM_EFFECT_X_ITEM 0 +#define ITEM_EFFECT_RAISE_LEVEL 1 +#define ITEM_EFFECT_HEAL_HP 2 +#define ITEM_EFFECT_CURE_POISON 3 +#define ITEM_EFFECT_CURE_SLEEP 4 +#define ITEM_EFFECT_CURE_BURN 5 +#define ITEM_EFFECT_CURE_FREEZE 6 +#define ITEM_EFFECT_CURE_PARALYSIS 7 +#define ITEM_EFFECT_CURE_CONFUSION 8 +#define ITEM_EFFECT_CURE_INFATUATION 9 +#define ITEM_EFFECT_SACRED_ASH 10 +#define ITEM_EFFECT_CURE_ALL_STATUS 11 +#define ITEM_EFFECT_ATK_EV 12 +#define ITEM_EFFECT_HP_EV 13 +#define ITEM_EFFECT_SPATK_EV 14 +#define ITEM_EFFECT_SPDEF_EV 15 +#define ITEM_EFFECT_SPEED_EV 16 +#define ITEM_EFFECT_DEF_EV 17 +#define ITEM_EFFECT_EVO_STONE 18 +#define ITEM_EFFECT_PP_UP 19 +#define ITEM_EFFECT_PP_MAX 20 +#define ITEM_EFFECT_HEAL_PP 21 +#define ITEM_EFFECT_NONE 22 + +#endif // GUARD_CONSTANTS_ITEM_EFFECTS_H diff --git a/include/constants/items.h b/include/constants/items.h index 294499c8b..3a894f8ff 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -473,6 +473,6 @@ #define NUM_HIDDEN_MACHINES 8 // Check if the item is one that can be used on a Pokemon. -#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) +#define ITEM_HAS_EFFECT(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) #endif // GUARD_CONSTANTS_ITEMS_H diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 2d67fda99..de798eee3 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -6,6 +6,7 @@ #include "random.h" #include "util.h" #include "constants/abilities.h" +#include "constants/item_effects.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/species.h" @@ -778,18 +779,17 @@ u8 GetMostSuitableMonToSwitchInto(void) return bestMonId; } -// TODO: use PokemonItemEffect struct instead of u8 once it's documented. static u8 GetAI_ItemType(u8 itemId, const u8 *itemEffect) // NOTE: should take u16 as item Id argument { if (itemId == ITEM_FULL_RESTORE) return AI_ITEM_FULL_RESTORE; - else if (itemEffect[4] & 4) + else if (itemEffect[4] & ITEM4_HEAL_HP) return AI_ITEM_HEAL_HP; - else if (itemEffect[3] & 0x3F) + else if (itemEffect[3] & ITEM3_STATUS_ALL) return AI_ITEM_CURE_CONDITION; - else if (itemEffect[0] & 0x3F || itemEffect[1] != 0 || itemEffect[2] != 0) + else if (itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK) || itemEffect[1] != 0 || itemEffect[2] != 0) return AI_ITEM_X_STAT; - else if (itemEffect[3] & 0x80) + else if (itemEffect[3] & ITEM3_MIST) return AI_ITEM_GUARD_SPECS; else return AI_ITEM_NOT_RECOGNIZABLE; @@ -832,13 +832,13 @@ static bool8 ShouldUseItem(void) item = gBattleResources->battleHistory->trainerItems[i]; if (item == ITEM_NONE) continue; - if (gItemEffectTable[item - 13] == NULL) + if (gItemEffectTable[item - ITEM_POTION] == NULL) continue; if (item == ITEM_ENIGMA_BERRY) itemEffects = gSaveBlock1Ptr->enigmaBerry.itemEffect; else - itemEffects = gItemEffectTable[item - 13]; + itemEffects = gItemEffectTable[item - ITEM_POTION]; *(gBattleStruct->AI_itemType + gActiveBattler / 2) = GetAI_ItemType(item, itemEffects); @@ -862,32 +862,32 @@ static bool8 ShouldUseItem(void) break; case AI_ITEM_CURE_CONDITION: *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) = 0; - if (itemEffects[3] & 0x20 && gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP) + if (itemEffects[3] & ITEM3_SLEEP && gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP) { *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20; shouldUse = TRUE; } - if (itemEffects[3] & 0x10 && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)) + if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)) { *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x10; shouldUse = TRUE; } - if (itemEffects[3] & 0x8 && gBattleMons[gActiveBattler].status1 & STATUS1_BURN) + if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN) { *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8; shouldUse = TRUE; } - if (itemEffects[3] & 0x4 && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE) + if (itemEffects[3] & ITEM3_FREEZE && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE) { *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x4; shouldUse = TRUE; } - if (itemEffects[3] & 0x2 && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS) + if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS) { *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x2; shouldUse = TRUE; } - if (itemEffects[3] & 0x1 && gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION) + if (itemEffects[3] & ITEM3_CONFUSION && gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION) { *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x1; shouldUse = TRUE; @@ -897,17 +897,17 @@ static bool8 ShouldUseItem(void) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) = 0; if (gDisableStructs[gActiveBattler].isFirstTurn == 0) break; - if (itemEffects[0] & 0xF) + if (itemEffects[0] & ITEM0_X_ATTACK) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x1; - if (itemEffects[1] & 0xF0) + if (itemEffects[1] & ITEM1_X_DEFEND) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x2; - if (itemEffects[1] & 0xF) + if (itemEffects[1] & ITEM1_X_SPEED) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x4; - if (itemEffects[2] & 0xF) + if (itemEffects[2] & ITEM2_X_SPATK) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8; - if (itemEffects[2] & 0xF0) + if (itemEffects[2] & ITEM2_X_ACCURACY) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20; - if (itemEffects[0] & 0x30) + if (itemEffects[0] & ITEM0_HIGH_CRIT) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x80; shouldUse = TRUE; break; diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 9f5720a66..1697a1e7e 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -1,236 +1,476 @@ -const u8 gItemEffect_Potion[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 20}; -const u8 gItemEffect_Antidote[] = {0x00, 0x00, 0x00, 0x10, 0x00, 0x00}; -const u8 gItemEffect_BurnHeal[] = {0x00, 0x00, 0x00, 0x08, 0x00, 0x00}; -const u8 gItemEffect_IceHeal[] = {0x00, 0x00, 0x00, 0x04, 0x00, 0x00}; -const u8 gItemEffect_Awakening[] = {0x00, 0x00, 0x00, 0x20, 0x00, 0x00}; -const u8 gItemEffect_ParalyzeHeal[] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00}; -const u8 gItemEffect_FullRestore[] = {0x00, 0x00, 0x00, 0x3f, 0x04, 0x00, 0xff}; -const u8 gItemEffect_MaxPotion[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xff}; -const u8 gItemEffect_HyperPotion[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 200}; -const u8 gItemEffect_SuperPotion[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 50}; -const u8 gItemEffect_FullHeal[] = {0x00, 0x00, 0x00, 0x3f, 0x00, 0x00}; -const u8 gItemEffect_Revive[] = {0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0xfe}; -const u8 gItemEffect_MaxRevive[] = {0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0xff}; -const u8 gItemEffect_FreshWater[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 50}; -const u8 gItemEffect_SodaPop[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 60}; -const u8 gItemEffect_Lemonade[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 80}; -const u8 gItemEffect_MoomooMilk[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 100}; -const u8 gItemEffect_EnergyPowder[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0xe0, 50, 0xfb, 0xfb, 0xf6}; -const u8 gItemEffect_EnergyRoot[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0xe0, 200, 0xf6, 0xf6, 0xf1}; -const u8 gItemEffect_HealPowder[] = {0x00, 0x00, 0x00, 0x3f, 0x00, 0xe0, 0xfb, 0xfb, 0xf6}; -const u8 gItemEffect_RevivalHerb[] = {0x00, 0x00, 0x00, 0x00, 0x44, 0xe0, 0xff, 0xf1, 0xf1, 0xec}; -const u8 gItemEffect_Ether[] = {0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x0a}; -const u8 gItemEffect_MaxEther[] = {0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7f}; -const u8 gItemEffect_Elixir[] = {0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0a}; -const u8 gItemEffect_MaxElixir[] = {0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7f}; -const u8 gItemEffect_LavaCookie[] = {0x00, 0x00, 0x00, 0x3f, 0x00, 0x00}; -const u8 gItemEffect_BlueFlute[] = {0x00, 0x00, 0x00, 0x20, 0x00, 0x00}; -const u8 gItemEffect_YellowFlute[] = {0x00, 0x00, 0x00, 0x01, 0x00, 0x00}; -const u8 gItemEffect_RedFlute[] = {0x80, 0x00, 0x00, 0x00, 0x00, 0x00}; -const u8 gItemEffect_BerryJuice[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 20}; -const u8 gItemEffect_SacredAsh[] = {0x40, 0x00, 0x00, 0x00, 0x44, 0x00, 0xff}; -const u8 gItemEffect_HPUp[] = {0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x0a, 0x05, 0x03, 0x02}; -const u8 gItemEffect_Protein[] = {0x00, 0x00, 0x00, 0x00, 0x02, 0xe0, 0x0a, 0x05, 0x03, 0x02}; -const u8 gItemEffect_Iron[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x0a, 0x05, 0x03, 0x02}; -const u8 gItemEffect_Carbos[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0a, 0x05, 0x03, 0x02}; -const u8 gItemEffect_Calcium[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x0a, 0x05, 0x03, 0x02}; -const u8 gItemEffect_RareCandy[] = {0x00, 0x00, 0x00, 0x40, 0x44, 0xe0, 253, 0x05, 0x03, 0x02}; -const u8 gItemEffect_PPUp[] = {0x00, 0x00, 0x00, 0x00, 0x20, 0xe0, 0x05, 0x03, 0x02}; -const u8 gItemEffect_Zinc[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0a, 0x05, 0x03, 0x02}; -const u8 gItemEffect_PPMax[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x05, 0x03, 0x02}; -const u8 gItemEffect_GuardSpec[] = {0x00, 0x00, 0x00, 0x80, 0x00, 0x60, 0x01, 0x01}; -const u8 gItemEffect_DireHit[] = {0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x01, 0x01}; -const u8 gItemEffect_XAttack[] = {0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x01, 0x01}; -const u8 gItemEffect_XDefend[] = {0x00, 0x10, 0x00, 0x00, 0x00, 0x60, 0x01, 0x01}; -const u8 gItemEffect_XSpeed[] = {0x00, 0x01, 0x00, 0x00, 0x00, 0x60, 0x01, 0x01}; -const u8 gItemEffect_XAccuracy[] = {0x00, 0x00, 0x10, 0x00, 0x00, 0x60, 0x01, 0x01}; -const u8 gItemEffect_XSpecial[] = {0x00, 0x00, 0x01, 0x00, 0x00, 0x60, 0x01, 0x01}; -const u8 gItemEffect_SunStone[] = {0x00, 0x00, 0x00, 0x00, 0x80, 0x00}; -const u8 gItemEffect_MoonStone[] = {0x00, 0x00, 0x00, 0x00, 0x80, 0x00}; -const u8 gItemEffect_FireStone[] = {0x00, 0x00, 0x00, 0x00, 0x80, 0x00}; -const u8 gItemEffect_ThunderStone[] = {0x00, 0x00, 0x00, 0x00, 0x80, 0x00}; -const u8 gItemEffect_WaterStone[] = {0x00, 0x00, 0x00, 0x00, 0x80, 0x00}; -const u8 gItemEffect_LeafStone[] = {0x00, 0x00, 0x00, 0x00, 0x80, 0x00}; -const u8 gItemEffect_CheriBerry[] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00}; -const u8 gItemEffect_ChestoBerry[] = {0x00, 0x00, 0x00, 0x20, 0x00, 0x00}; -const u8 gItemEffect_PechaBerry[] = {0x00, 0x00, 0x00, 0x10, 0x00, 0x00}; -const u8 gItemEffect_RawstBerry[] = {0x00, 0x00, 0x00, 0x08, 0x00, 0x00}; -const u8 gItemEffect_AspearBerry[] = {0x00, 0x00, 0x00, 0x04, 0x00, 0x00}; -const u8 gItemEffect_LeppaBerry[] = {0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x0a}; -const u8 gItemEffect_OranBerry[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 10}; -const u8 gItemEffect_PersimBerry[] = {0x00, 0x00, 0x00, 0x01, 0x00, 0x00}; -const u8 gItemEffect_LumBerry[] = {0x00, 0x00, 0x00, 0x3f, 0x00, 0x00}; -const u8 gItemEffect_SitrusBerry[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 30}; -const u8 gItemEffect_PomegBerry[] = {0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0xf6, 0x0a, 0x05, 0x02}; -const u8 gItemEffect_KelpsyBerry[] = {0x00, 0x00, 0x00, 0x00, 0x02, 0xe0, 0xf6, 0x0a, 0x05, 0x02}; -const u8 gItemEffect_QualotBerry[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0xf6, 0x0a, 0x05, 0x02}; -const u8 gItemEffect_HondrewBerry[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xf6, 0x0a, 0x05, 0x02}; -const u8 gItemEffect_GrepaBerry[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0xf6, 0x0a, 0x05, 0x02}; -const u8 gItemEffect_TamatoBerry[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0xf6, 0x0a, 0x05, 0x02}; +const u8 gItemEffect_Potion[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 20, +}; + +const u8 gItemEffect_Antidote[6] = { + [3] = ITEM3_POISON, +}; + +const u8 gItemEffect_BurnHeal[6] = { + [3] = ITEM3_BURN, +}; + +const u8 gItemEffect_IceHeal[6] = { + [3] = ITEM3_FREEZE, +}; + +const u8 gItemEffect_Awakening[6] = { + [3] = ITEM3_SLEEP, +}; + +const u8 gItemEffect_ParalyzeHeal[6] = { + [3] = ITEM3_PARALYSIS, +}; + +const u8 gItemEffect_FullRestore[7] = { + [3] = ITEM3_STATUS_ALL, + [4] = ITEM4_HEAL_HP, + [6] = -1, +}; + +const u8 gItemEffect_MaxPotion[7] = { + [4] = ITEM4_HEAL_HP, + [6] = -1, +}; + +const u8 gItemEffect_HyperPotion[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 200, +}; + +const u8 gItemEffect_SuperPotion[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 50, +}; + +const u8 gItemEffect_FullHeal[6] = { + [3] = ITEM3_STATUS_ALL, +}; + +const u8 gItemEffect_Revive[7] = { + [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, + [6] = -2, +}; + +const u8 gItemEffect_MaxRevive[7] = { + [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, + [6] = -1, +}; + +const u8 gItemEffect_FreshWater[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 50, +}; + +const u8 gItemEffect_SodaPop[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 60, +}; + +const u8 gItemEffect_Lemonade[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 80, +}; + +const u8 gItemEffect_MoomooMilk[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 100, +}; + +const u8 gItemEffect_EnergyPowder[10] = { + [4] = ITEM4_HEAL_HP, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = 50, + [7] = -5, + [8] = -5, + [9] = -10, +}; + +const u8 gItemEffect_EnergyRoot[10] = { + [4] = ITEM4_HEAL_HP, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = 200, + [7] = -10, + [8] = -10, + [9] = -15, +}; + +const u8 gItemEffect_HealPowder[9] = { + [3] = ITEM3_STATUS_ALL, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = -5, + [7] = -5, + [8] = -10, +}; + +const u8 gItemEffect_RevivalHerb[10] = { + [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = -1, + [7] = -15, + [8] = -15, + [9] = -20, +}; + +const u8 gItemEffect_Ether[7] = { + [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, + [6] = 10, +}; + +const u8 gItemEffect_MaxEther[7] = { + [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, + [6] = 0x7F, +}; + +const u8 gItemEffect_Elixir[7] = { + [4] = ITEM4_HEAL_PP_ALL, + [6] = 10, +}; + +const u8 gItemEffect_MaxElixir[7] = { + [4] = ITEM4_HEAL_PP_ALL, + [6] = 0x7F, +}; + +const u8 gItemEffect_LavaCookie[6] = { + [3] = ITEM3_STATUS_ALL, +}; + +const u8 gItemEffect_BlueFlute[6] = { + [3] = ITEM3_SLEEP, +}; + +const u8 gItemEffect_YellowFlute[6] = { + [3] = ITEM3_CONFUSION, +}; + +const u8 gItemEffect_RedFlute[6] = { + [0] = ITEM0_INFATUATION, +}; + +const u8 gItemEffect_BerryJuice[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 20, +}; + +const u8 gItemEffect_SacredAsh[7] = { + [0] = ITEM0_SACRED_ASH, + [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, + [6] = -1, +}; + +const u8 gItemEffect_HPUp[10] = { + [4] = ITEM4_EV_HP, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = 10, + [7] = 5, + [8] = 3, + [9] = 2, +}; + +const u8 gItemEffect_Protein[10] = { + [4] = ITEM4_EV_ATK, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = 10, + [7] = 5, + [8] = 3, + [9] = 2, +}; + +const u8 gItemEffect_Iron[10] = { + [5] = ITEM5_EV_DEF | ITEM5_FRIENDSHIP_ALL, + [6] = 10, + [7] = 5, + [8] = 3, + [9] = 2, +}; + +const u8 gItemEffect_Carbos[10] = { + [5] = ITEM5_EV_SPEED | ITEM5_FRIENDSHIP_ALL, + [6] = 10, + [7] = 5, + [8] = 3, + [9] = 2, +}; + +const u8 gItemEffect_Calcium[10] = { + [5] = ITEM5_EV_SPATK | ITEM5_FRIENDSHIP_ALL, + [6] = 10, + [7] = 5, + [8] = 3, + [9] = 2, +}; + +const u8 gItemEffect_RareCandy[10] = { + [3] = ITEM3_LEVEL_UP, + [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = 0xFD, + [7] = 5, + [8] = 3, + [9] = 2, +}; + +const u8 gItemEffect_PPUp[9] = { + [4] = ITEM4_PP_UP, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = 5, + [7] = 3, + [8] = 2, +}; + +const u8 gItemEffect_Zinc[10] = { + [5] = ITEM5_EV_SPDEF | ITEM5_FRIENDSHIP_ALL, + [6] = 10, + [7] = 5, + [8] = 3, + [9] = 2, +}; + +const u8 gItemEffect_PPMax[9] = { + [5] = ITEM5_PP_MAX | ITEM5_FRIENDSHIP_ALL, + [6] = 5, + [7] = 3, + [8] = 2, +}; + +const u8 gItemEffect_GuardSpec[8] = { + [3] = ITEM3_MIST, + [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, + [6] = 1, + [7] = 1, +}; + +const u8 gItemEffect_DireHit[8] = { + [0] = 2 << 4, + [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, + [6] = 1, + [7] = 1, +}; + +const u8 gItemEffect_XAttack[8] = { + [0] = 1, + [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, + [6] = 1, + [7] = 1, +}; + +const u8 gItemEffect_XDefend[8] = { + [1] = 1 << 4, + [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, + [6] = 1, + [7] = 1, +}; + +const u8 gItemEffect_XSpeed[8] = { + [1] = 1, + [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, + [6] = 1, + [7] = 1, +}; + +const u8 gItemEffect_XAccuracy[8] = { + [2] = 1 << 4, + [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, + [6] = 1, + [7] = 1, +}; + +const u8 gItemEffect_XSpecial[8] = { + [2] = 1, + [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, + [6] = 1, + [7] = 1, +}; + +const u8 gItemEffect_SunStone[6] = { + [4] = ITEM4_EVO_STONE, +}; + +const u8 gItemEffect_MoonStone[6] = { + [4] = ITEM4_EVO_STONE, +}; + +const u8 gItemEffect_FireStone[6] = { + [4] = ITEM4_EVO_STONE, +}; + +const u8 gItemEffect_ThunderStone[6] = { + [4] = ITEM4_EVO_STONE, +}; + +const u8 gItemEffect_WaterStone[6] = { + [4] = ITEM4_EVO_STONE, +}; + +const u8 gItemEffect_LeafStone[6] = { + [4] = ITEM4_EVO_STONE, +}; + +const u8 gItemEffect_CheriBerry[6] = { + [3] = ITEM3_PARALYSIS, +}; + +const u8 gItemEffect_ChestoBerry[6] = { + [3] = ITEM3_SLEEP, +}; + +const u8 gItemEffect_PechaBerry[6] = { + [3] = ITEM3_POISON, +}; + +const u8 gItemEffect_RawstBerry[6] = { + [3] = ITEM3_BURN, +}; + +const u8 gItemEffect_AspearBerry[6] = { + [3] = ITEM3_FREEZE, +}; + +const u8 gItemEffect_LeppaBerry[7] = { + [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, + [6] = 10, +}; + +const u8 gItemEffect_OranBerry[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 10, +}; + +const u8 gItemEffect_PersimBerry[6] = { + [3] = ITEM3_CONFUSION, +}; + +const u8 gItemEffect_LumBerry[6] = { + [3] = ITEM3_STATUS_ALL, +}; + +const u8 gItemEffect_SitrusBerry[7] = { + [4] = ITEM4_HEAL_HP, + [6] = 30, +}; + +const u8 gItemEffect_PomegBerry[10] = { + [4] = ITEM4_EV_HP, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = -10, + [7] = 10, + [8] = 5, + [9] = 2, +}; + +const u8 gItemEffect_KelpsyBerry[10] = { + [4] = ITEM4_EV_ATK, + [5] = ITEM5_FRIENDSHIP_ALL, + [6] = -10, + [7] = 10, + [8] = 5, + [9] = 2, +}; + +const u8 gItemEffect_QualotBerry[10] = { + [5] = ITEM5_EV_DEF | ITEM5_FRIENDSHIP_ALL, + [6] = -10, + [7] = 10, + [8] = 5, + [9] = 2, +}; + +const u8 gItemEffect_HondrewBerry[10] = { + [5] = ITEM5_EV_SPATK | ITEM5_FRIENDSHIP_ALL, + [6] = -10, + [7] = 10, + [8] = 5, + [9] = 2, +}; + +const u8 gItemEffect_GrepaBerry[10] = { + [5] = ITEM5_EV_SPDEF | ITEM5_FRIENDSHIP_ALL, + [6] = -10, + [7] = 10, + [8] = 5, + [9] = 2, +}; + +const u8 gItemEffect_TamatoBerry[10] = { + [5] = ITEM5_EV_SPEED | ITEM5_FRIENDSHIP_ALL, + [6] = -10, + [7] = 10, + [8] = 5, + [9] = 2, +}; const u8 *const gItemEffectTable[] = { - gItemEffect_Potion, - gItemEffect_Antidote, - gItemEffect_BurnHeal, - gItemEffect_IceHeal, - gItemEffect_Awakening, - gItemEffect_ParalyzeHeal, - gItemEffect_FullRestore, - gItemEffect_MaxPotion, - gItemEffect_HyperPotion, - gItemEffect_SuperPotion, - gItemEffect_FullHeal, - gItemEffect_Revive, - gItemEffect_MaxRevive, - gItemEffect_FreshWater, - gItemEffect_SodaPop, - gItemEffect_Lemonade, - gItemEffect_MoomooMilk, - gItemEffect_EnergyPowder, - gItemEffect_EnergyRoot, - gItemEffect_HealPowder, - gItemEffect_RevivalHerb, - gItemEffect_Ether, - gItemEffect_MaxEther, - gItemEffect_Elixir, - gItemEffect_MaxElixir, - gItemEffect_LavaCookie, - gItemEffect_BlueFlute, - gItemEffect_YellowFlute, - gItemEffect_RedFlute, - NULL, - NULL, - gItemEffect_BerryJuice, - gItemEffect_SacredAsh, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - gItemEffect_HPUp, - gItemEffect_Protein, - gItemEffect_Iron, - gItemEffect_Carbos, - gItemEffect_Calcium, - gItemEffect_RareCandy, - gItemEffect_PPUp, - gItemEffect_Zinc, - gItemEffect_PPMax, - NULL, - gItemEffect_GuardSpec, - gItemEffect_DireHit, - gItemEffect_XAttack, - gItemEffect_XDefend, - gItemEffect_XSpeed, - gItemEffect_XAccuracy, - gItemEffect_XSpecial, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - gItemEffect_SunStone, - gItemEffect_MoonStone, - gItemEffect_FireStone, - gItemEffect_ThunderStone, - gItemEffect_WaterStone, - gItemEffect_LeafStone, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - gItemEffect_CheriBerry, - gItemEffect_ChestoBerry, - gItemEffect_PechaBerry, - gItemEffect_RawstBerry, - gItemEffect_AspearBerry, - gItemEffect_LeppaBerry, - gItemEffect_OranBerry, - gItemEffect_PersimBerry, - gItemEffect_LumBerry, - gItemEffect_SitrusBerry, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - gItemEffect_PomegBerry, - gItemEffect_KelpsyBerry, - gItemEffect_QualotBerry, - gItemEffect_HondrewBerry, - gItemEffect_GrepaBerry, - gItemEffect_TamatoBerry, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL + [ITEM_POTION - ITEM_POTION] = gItemEffect_Potion, + [ITEM_ANTIDOTE - ITEM_POTION] = gItemEffect_Antidote, + [ITEM_BURN_HEAL - ITEM_POTION] = gItemEffect_BurnHeal, + [ITEM_ICE_HEAL - ITEM_POTION] = gItemEffect_IceHeal, + [ITEM_AWAKENING - ITEM_POTION] = gItemEffect_Awakening, + [ITEM_PARALYZE_HEAL - ITEM_POTION] = gItemEffect_ParalyzeHeal, + [ITEM_FULL_RESTORE - ITEM_POTION] = gItemEffect_FullRestore, + [ITEM_MAX_POTION - ITEM_POTION] = gItemEffect_MaxPotion, + [ITEM_HYPER_POTION - ITEM_POTION] = gItemEffect_HyperPotion, + [ITEM_SUPER_POTION - ITEM_POTION] = gItemEffect_SuperPotion, + [ITEM_FULL_HEAL - ITEM_POTION] = gItemEffect_FullHeal, + [ITEM_REVIVE - ITEM_POTION] = gItemEffect_Revive, + [ITEM_MAX_REVIVE - ITEM_POTION] = gItemEffect_MaxRevive, + [ITEM_FRESH_WATER - ITEM_POTION] = gItemEffect_FreshWater, + [ITEM_SODA_POP - ITEM_POTION] = gItemEffect_SodaPop, + [ITEM_LEMONADE - ITEM_POTION] = gItemEffect_Lemonade, + [ITEM_MOOMOO_MILK - ITEM_POTION] = gItemEffect_MoomooMilk, + [ITEM_ENERGY_POWDER - ITEM_POTION] = gItemEffect_EnergyPowder, + [ITEM_ENERGY_ROOT - ITEM_POTION] = gItemEffect_EnergyRoot, + [ITEM_HEAL_POWDER - ITEM_POTION] = gItemEffect_HealPowder, + [ITEM_REVIVAL_HERB - ITEM_POTION] = gItemEffect_RevivalHerb, + [ITEM_ETHER - ITEM_POTION] = gItemEffect_Ether, + [ITEM_MAX_ETHER - ITEM_POTION] = gItemEffect_MaxEther, + [ITEM_ELIXIR - ITEM_POTION] = gItemEffect_Elixir, + [ITEM_MAX_ELIXIR - ITEM_POTION] = gItemEffect_MaxElixir, + [ITEM_LAVA_COOKIE - ITEM_POTION] = gItemEffect_LavaCookie, + [ITEM_BLUE_FLUTE - ITEM_POTION] = gItemEffect_BlueFlute, + [ITEM_YELLOW_FLUTE - ITEM_POTION] = gItemEffect_YellowFlute, + [ITEM_RED_FLUTE - ITEM_POTION] = gItemEffect_RedFlute, + [ITEM_BERRY_JUICE - ITEM_POTION] = gItemEffect_BerryJuice, + [ITEM_SACRED_ASH - ITEM_POTION] = gItemEffect_SacredAsh, + [ITEM_HP_UP - ITEM_POTION] = gItemEffect_HPUp, + [ITEM_PROTEIN - ITEM_POTION] = gItemEffect_Protein, + [ITEM_IRON - ITEM_POTION] = gItemEffect_Iron, + [ITEM_CARBOS - ITEM_POTION] = gItemEffect_Carbos, + [ITEM_CALCIUM - ITEM_POTION] = gItemEffect_Calcium, + [ITEM_RARE_CANDY - ITEM_POTION] = gItemEffect_RareCandy, + [ITEM_PP_UP - ITEM_POTION] = gItemEffect_PPUp, + [ITEM_ZINC - ITEM_POTION] = gItemEffect_Zinc, + [ITEM_PP_MAX - ITEM_POTION] = gItemEffect_PPMax, + [ITEM_GUARD_SPEC - ITEM_POTION] = gItemEffect_GuardSpec, + [ITEM_DIRE_HIT - ITEM_POTION] = gItemEffect_DireHit, + [ITEM_X_ATTACK - ITEM_POTION] = gItemEffect_XAttack, + [ITEM_X_DEFEND - ITEM_POTION] = gItemEffect_XDefend, + [ITEM_X_SPEED - ITEM_POTION] = gItemEffect_XSpeed, + [ITEM_X_ACCURACY - ITEM_POTION] = gItemEffect_XAccuracy, + [ITEM_X_SPECIAL - ITEM_POTION] = gItemEffect_XSpecial, + [ITEM_SUN_STONE - ITEM_POTION] = gItemEffect_SunStone, + [ITEM_MOON_STONE - ITEM_POTION] = gItemEffect_MoonStone, + [ITEM_FIRE_STONE - ITEM_POTION] = gItemEffect_FireStone, + [ITEM_THUNDER_STONE - ITEM_POTION] = gItemEffect_ThunderStone, + [ITEM_WATER_STONE - ITEM_POTION] = gItemEffect_WaterStone, + [ITEM_LEAF_STONE - ITEM_POTION] = gItemEffect_LeafStone, + [ITEM_CHERI_BERRY - ITEM_POTION] = gItemEffect_CheriBerry, + [ITEM_CHESTO_BERRY - ITEM_POTION] = gItemEffect_ChestoBerry, + [ITEM_PECHA_BERRY - ITEM_POTION] = gItemEffect_PechaBerry, + [ITEM_RAWST_BERRY - ITEM_POTION] = gItemEffect_RawstBerry, + [ITEM_ASPEAR_BERRY - ITEM_POTION] = gItemEffect_AspearBerry, + [ITEM_LEPPA_BERRY - ITEM_POTION] = gItemEffect_LeppaBerry, + [ITEM_ORAN_BERRY - ITEM_POTION] = gItemEffect_OranBerry, + [ITEM_PERSIM_BERRY - ITEM_POTION] = gItemEffect_PersimBerry, + [ITEM_LUM_BERRY - ITEM_POTION] = gItemEffect_LumBerry, + [ITEM_SITRUS_BERRY - ITEM_POTION] = gItemEffect_SitrusBerry, + [ITEM_POMEG_BERRY - ITEM_POTION] = gItemEffect_PomegBerry, + [ITEM_KELPSY_BERRY - ITEM_POTION] = gItemEffect_KelpsyBerry, + [ITEM_QUALOT_BERRY - ITEM_POTION] = gItemEffect_QualotBerry, + [ITEM_HONDEW_BERRY - ITEM_POTION] = gItemEffect_HondrewBerry, + [ITEM_GREPA_BERRY - ITEM_POTION] = gItemEffect_GrepaBerry, + [ITEM_TAMATO_BERRY - ITEM_POTION] = gItemEffect_TamatoBerry, + [LAST_BERRY_INDEX - ITEM_POTION] = NULL }; diff --git a/src/item_use.c b/src/item_use.c index 8e28d48fd..97aceb7ad 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -37,6 +37,7 @@ #include "constants/bg_event_constants.h" #include "constants/event_objects.h" #include "constants/flags.h" +#include "constants/item_effects.h" #include "constants/items.h" #include "constants/songs.h" #include "constants/vars.h" @@ -389,7 +390,7 @@ bool8 sub_80FD6D4(const struct MapEvents *events, s16 x, s16 y) bool8 sub_80FD730(struct MapConnection *connection, int x, int y) { - + u16 localX, localY; u32 localOffset; s32 localLength; @@ -1026,44 +1027,45 @@ void ItemUseInBattle_Escape(u8 taskId) void ItemUseOutOfBattle_EnigmaBerry(u8 taskId) { - switch (GetItemEffectType(gSpecialVar_ItemId) - 1) + switch (GetItemEffectType(gSpecialVar_ItemId)) { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: + case ITEM_EFFECT_HEAL_HP: + case ITEM_EFFECT_CURE_POISON: + case ITEM_EFFECT_CURE_SLEEP: + case ITEM_EFFECT_CURE_BURN: + case ITEM_EFFECT_CURE_FREEZE: + case ITEM_EFFECT_CURE_PARALYSIS: + case ITEM_EFFECT_CURE_ALL_STATUS: + case ITEM_EFFECT_ATK_EV: + case ITEM_EFFECT_HP_EV: + case ITEM_EFFECT_SPATK_EV: + case ITEM_EFFECT_SPDEF_EV: + case ITEM_EFFECT_SPEED_EV: + case ITEM_EFFECT_DEF_EV: gTasks[taskId].data[4] = 1; ItemUseOutOfBattle_Medicine(taskId); break; - case 9: + case ITEM_EFFECT_SACRED_ASH: gTasks[taskId].data[4] = 1; ItemUseOutOfBattle_SacredAsh(taskId); break; - case 0: + case ITEM_EFFECT_RAISE_LEVEL: gTasks[taskId].data[4] = 1; ItemUseOutOfBattle_RareCandy(taskId); break; - case 18: - case 19: + case ITEM_EFFECT_PP_UP: + case ITEM_EFFECT_PP_MAX: gTasks[taskId].data[4] = 1; ItemUseOutOfBattle_PPUp(taskId); break; - case 20: + case ITEM_EFFECT_HEAL_PP: gTasks[taskId].data[4] = 1; ItemUseOutOfBattle_PPRecovery(taskId); break; default: gTasks[taskId].data[4] = 4; ItemUseOutOfBattle_CannotUse(taskId); + break; } } @@ -1071,25 +1073,26 @@ void ItemUseInBattle_EnigmaBerry(u8 taskId) { switch (GetItemEffectType(gSpecialVar_ItemId)) { - case 0: + case ITEM_EFFECT_X_ITEM: ItemUseInBattle_StatIncrease(taskId); break; - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 11: + case ITEM_EFFECT_HEAL_HP: + case ITEM_EFFECT_CURE_POISON: + case ITEM_EFFECT_CURE_SLEEP: + case ITEM_EFFECT_CURE_BURN: + case ITEM_EFFECT_CURE_FREEZE: + case ITEM_EFFECT_CURE_PARALYSIS: + case ITEM_EFFECT_CURE_ALL_STATUS: + case ITEM_EFFECT_CURE_CONFUSION: + case ITEM_EFFECT_CURE_INFATUATION: ItemUseInBattle_Medicine(taskId); break; - case 21: + case ITEM_EFFECT_HEAL_PP: ItemUseInBattle_PPRecovery(taskId); break; default: ItemUseOutOfBattle_CannotUse(taskId); + break; } } diff --git a/src/party_menu.c b/src/party_menu.c index 9be69c026..d13dc1e97 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -68,6 +68,7 @@ #include "constants/easy_chat.h" #include "constants/field_effects.h" #include "constants/flags.h" +#include "constants/item_effects.h" #include "constants/items.h" #include "constants/maps.h" #include "constants/moves.h" @@ -298,8 +299,8 @@ static u8 sub_81B8984(void); static void sub_81B6280(u8); static void c2_815ABFC(void); static void sub_81B672C(u8); -static u16 sub_81B691C(struct Pokemon*, u8); -static void option_menu_get_string(u8, u8*); +static u16 ItemEffectToMonEv(struct Pokemon*, u8); +static void ItemEffectToStatString(u8, u8*); static void sub_81B6BB4(u8); static void ether_effect_related_2(u8); static void ether_effect_related(u8); @@ -5230,7 +5231,7 @@ void sub_81B617C(void) doubleBattleStatus = 0; } - if (GetItemEffectType(gSpecialVar_ItemId) == 10) + if (GetItemEffectType(gSpecialVar_ItemId) == ITEM_EFFECT_SACRED_ASH) { gUnknown_0203CEC8.unk9 = 0; for (i = 0; i < PARTY_SIZE; i++) @@ -5284,7 +5285,7 @@ static bool8 IsHPRecoveryItem(u16 item) else effect = gItemEffectTable[item - ITEM_POTION]; - if ((effect[4] & 4) != 0) + if (effect[4] & ITEM4_HEAL_HP) return TRUE; else return FALSE; @@ -5294,59 +5295,59 @@ static void GetMedicineItemEffectMessage(u16 item) { switch (GetItemEffectType(item)) { - case 3: + case ITEM_EFFECT_CURE_POISON: StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfPoison); break; - case 4: + case ITEM_EFFECT_CURE_SLEEP: StringExpandPlaceholders(gStringVar4, gText_PkmnWokeUp2); break; - case 5: + case ITEM_EFFECT_CURE_BURN: StringExpandPlaceholders(gStringVar4, gText_PkmnBurnHealed); break; - case 6: + case ITEM_EFFECT_CURE_FREEZE: StringExpandPlaceholders(gStringVar4, gText_PkmnThawedOut); break; - case 7: + case ITEM_EFFECT_CURE_PARALYSIS: StringExpandPlaceholders(gStringVar4, gText_PkmnCuredOfParalysis); break; - case 8: + case ITEM_EFFECT_CURE_CONFUSION: StringExpandPlaceholders(gStringVar4, gText_PkmnSnappedOutOfConfusion); break; - case 9: + case ITEM_EFFECT_CURE_INFATUATION: StringExpandPlaceholders(gStringVar4, gText_PkmnGotOverInfatuation); break; - case 11: + case ITEM_EFFECT_CURE_ALL_STATUS: StringExpandPlaceholders(gStringVar4, gText_PkmnBecameHealthy); break; - case 13: + case ITEM_EFFECT_HP_EV: StringCopy(gStringVar2, gText_HP3); StringExpandPlaceholders(gStringVar4, gText_PkmnBaseVar2StatIncreased); break; - case 12: + case ITEM_EFFECT_ATK_EV: StringCopy(gStringVar2, gText_Attack3); StringExpandPlaceholders(gStringVar4, gText_PkmnBaseVar2StatIncreased); break; - case 17: + case ITEM_EFFECT_DEF_EV: StringCopy(gStringVar2, gText_Defense3); StringExpandPlaceholders(gStringVar4, gText_PkmnBaseVar2StatIncreased); break; - case 16: + case ITEM_EFFECT_SPEED_EV: StringCopy(gStringVar2, gText_Speed2); StringExpandPlaceholders(gStringVar4, gText_PkmnBaseVar2StatIncreased); break; - case 14: + case ITEM_EFFECT_SPATK_EV: StringCopy(gStringVar2, gText_SpAtk3); StringExpandPlaceholders(gStringVar4, gText_PkmnBaseVar2StatIncreased); break; - case 15: + case ITEM_EFFECT_SPDEF_EV: StringCopy(gStringVar2, gText_SpDef3); StringExpandPlaceholders(gStringVar4, gText_PkmnBaseVar2StatIncreased); break; - case 19: - case 20: + case ITEM_EFFECT_PP_UP: + case ITEM_EFFECT_PP_MAX: StringExpandPlaceholders(gStringVar4, gText_MovesPPIncreased); break; - case 21: + case ITEM_EFFECT_HEAL_PP: StringExpandPlaceholders(gStringVar4, gText_PPWasRestored); break; default: @@ -5357,12 +5358,12 @@ static void GetMedicineItemEffectMessage(u16 item) static bool8 UsingHPEVItemOnShedinja(struct Pokemon *mon, u16 item) { - if (GetItemEffectType(item) == 13 && GetMonData(mon, MON_DATA_SPECIES) == SPECIES_SHEDINJA) + if (GetItemEffectType(item) == ITEM_EFFECT_HP_EV && GetMonData(mon, MON_DATA_SPECIES) == SPECIES_SHEDINJA) return FALSE; return TRUE; } -static bool8 IsBlueYellowRedFlute(u16 item) +static bool8 IsItemFlute(u16 item) { if (item == ITEM_BLUE_FLUTE || item == ITEM_RED_FLUTE || item == ITEM_YELLOW_FLUTE) return TRUE; @@ -5409,7 +5410,7 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task) goto iTriedHonestlyIDid; } gUnknown_0203CEE8 = 1; - if (IsBlueYellowRedFlute(item) == FALSE) + if (IsItemFlute(item) == FALSE) { PlaySE(SE_KAIFUKU); if (gUnknown_0203CEC8.unkB != 14) @@ -5466,10 +5467,10 @@ void sub_81B67C8(u8 taskId, TaskFunc task) u16 item = gSpecialVar_ItemId; u8 effectType = GetItemEffectType(item); u16 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP); - u16 relevantEV = sub_81B691C(mon, effectType); + u16 relevantEV = ItemEffectToMonEv(mon, effectType); bool8 cannotUseEffect = ExecuteTableBasedItemEffect__(gUnknown_0203CEC8.unk9, item, 0); u16 newFriendship = GetMonData(mon, MON_DATA_FRIENDSHIP); - u16 newRelevantEV = sub_81B691C(mon, effectType); + u16 newRelevantEV = ItemEffectToMonEv(mon, effectType); if (cannotUseEffect || (friendship == newFriendship && relevantEV == newRelevantEV)) { @@ -5485,7 +5486,7 @@ void sub_81B67C8(u8 taskId, TaskFunc task) PlaySE(SE_KAIFUKU); RemoveBagItem(item, 1); GetMonNickname(mon, gStringVar1); - option_menu_get_string(effectType, gStringVar2); + ItemEffectToStatString(effectType, gStringVar2); if (friendship != newFriendship) { if (relevantEV != newRelevantEV) @@ -5503,48 +5504,48 @@ void sub_81B67C8(u8 taskId, TaskFunc task) } } -static u16 sub_81B691C(struct Pokemon *mon, u8 effectType) +static u16 ItemEffectToMonEv(struct Pokemon *mon, u8 effectType) { switch (effectType) { - case 13: + case ITEM_EFFECT_HP_EV: if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_SHEDINJA) return GetMonData(mon, MON_DATA_HP_EV); break; - case 12: + case ITEM_EFFECT_ATK_EV: return GetMonData(mon, MON_DATA_ATK_EV); - case 17: + case ITEM_EFFECT_DEF_EV: return GetMonData(mon, MON_DATA_DEF_EV); - case 16: + case ITEM_EFFECT_SPEED_EV: return GetMonData(mon, MON_DATA_SPEED_EV); - case 14: + case ITEM_EFFECT_SPATK_EV: return GetMonData(mon, MON_DATA_SPATK_EV); - case 15: + case ITEM_EFFECT_SPDEF_EV: return GetMonData(mon, MON_DATA_SPDEF_EV); } return 0; } -static void option_menu_get_string(u8 effectType, u8 *dest) +static void ItemEffectToStatString(u8 effectType, u8 *dest) { switch (effectType) { - case 13: + case ITEM_EFFECT_HP_EV: StringCopy(dest, gText_HP3); break; - case 12: + case ITEM_EFFECT_ATK_EV: StringCopy(dest, gText_Attack3); break; - case 17: + case ITEM_EFFECT_DEF_EV: StringCopy(dest, gText_Defense3); break; - case 16: + case ITEM_EFFECT_SPEED_EV: StringCopy(dest, gText_Speed2); break; - case 14: + case ITEM_EFFECT_SPATK_EV: StringCopy(dest, gText_SpAtk3); break; - case 15: + case ITEM_EFFECT_SPDEF_EV: StringCopy(dest, gText_SpDef3); break; } @@ -5598,7 +5599,7 @@ void dp05_ether(u8 taskId, TaskFunc task) else effect = gItemEffectTable[item - ITEM_POTION]; - if ((effect[4] & 0x10) == 0) + if (!(effect[4] & ITEM4_HEAL_PP_ONE)) { gUnknown_0203CEC8.unkE = 0; ether_effect_related(taskId); @@ -6221,8 +6222,8 @@ u8 GetItemEffectType(u16 item) const u8 *itemEffect; u32 statusCure; - if (!IS_POKEMON_ITEM(item)) - return 22; + if (!ITEM_HAS_EFFECT(item)) + return ITEM_EFFECT_NONE; // Read the item's effect properties. if (item == ITEM_ENIGMA_BERRY) @@ -6230,58 +6231,58 @@ u8 GetItemEffectType(u16 item) else itemEffect = gItemEffectTable[item - ITEM_POTION]; - if ((itemEffect[0] & 0x3F) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & 0x80)) - return 0; - else if (itemEffect[0] & 0x40) - return 10; - else if (itemEffect[3] & 0x40) - return 1; + if ((itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK)) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & ITEM3_MIST)) + return ITEM_EFFECT_X_ITEM; + else if (itemEffect[0] & ITEM0_SACRED_ASH) + return ITEM_EFFECT_SACRED_ASH; + else if (itemEffect[3] & ITEM3_LEVEL_UP) + return ITEM_EFFECT_RAISE_LEVEL; - statusCure = itemEffect[3] & 0x3F; + statusCure = itemEffect[3] & ITEM3_STATUS_ALL; if (statusCure || (itemEffect[0] >> 7)) { - if (statusCure == 0x20) - return 4; - else if (statusCure == 0x10) - return 3; - else if (statusCure == 0x8) - return 5; - else if (statusCure == 0x4) - return 6; - else if (statusCure == 0x2) - return 7; - else if (statusCure == 0x1) - return 8; + if (statusCure == ITEM3_SLEEP) + return ITEM_EFFECT_CURE_SLEEP; + else if (statusCure == ITEM3_POISON) + return ITEM_EFFECT_CURE_POISON; + else if (statusCure == ITEM3_BURN) + return ITEM_EFFECT_CURE_BURN; + else if (statusCure == ITEM3_FREEZE) + return ITEM_EFFECT_CURE_FREEZE; + else if (statusCure == ITEM3_PARALYSIS) + return ITEM_EFFECT_CURE_PARALYSIS; + else if (statusCure == ITEM3_CONFUSION) + return ITEM_EFFECT_CURE_CONFUSION; else if (itemEffect[0] >> 7 && !statusCure) - return 9; + return ITEM_EFFECT_CURE_INFATUATION; else - return 11; + return ITEM_EFFECT_CURE_ALL_STATUS; } - if (itemEffect[4] & 0x44) - return 2; - else if (itemEffect[4] & 0x2) - return 12; - else if (itemEffect[4] & 0x1) - return 13; - else if (itemEffect[5] & 0x8) - return 14; - else if (itemEffect[5] & 0x4) - return 15; - else if (itemEffect[5] & 0x2) - return 16; - else if (itemEffect[5] & 0x1) - return 17; - else if (itemEffect[4] & 0x80) - return 18; - else if (itemEffect[4] & 0x20) - return 19; - else if (itemEffect[5] & 0x10) - return 20; - else if (itemEffect[4] & 0x18) - return 21; + if (itemEffect[4] & (ITEM4_REVIVE | ITEM4_HEAL_HP)) + return ITEM_EFFECT_HEAL_HP; + else if (itemEffect[4] & ITEM4_EV_ATK) + return ITEM_EFFECT_ATK_EV; + else if (itemEffect[4] & ITEM4_EV_HP) + return ITEM_EFFECT_HP_EV; + else if (itemEffect[5] & ITEM5_EV_SPATK) + return ITEM_EFFECT_SPATK_EV; + else if (itemEffect[5] & ITEM5_EV_SPDEF) + return ITEM_EFFECT_SPDEF_EV; + else if (itemEffect[5] & ITEM5_EV_SPEED) + return ITEM_EFFECT_SPEED_EV; + else if (itemEffect[5] & ITEM5_EV_DEF) + return ITEM_EFFECT_DEF_EV; + else if (itemEffect[4] & ITEM4_EVO_STONE) + return ITEM_EFFECT_EVO_STONE; + else if (itemEffect[4] & ITEM4_PP_UP) + return ITEM_EFFECT_PP_UP; + else if (itemEffect[5] & ITEM5_PP_MAX) + return ITEM_EFFECT_PP_MAX; + else if (itemEffect[4] & (ITEM4_HEAL_PP_ALL | ITEM4_HEAL_PP_ONE)) + return ITEM_EFFECT_HEAL_PP; else - return 22; + return ITEM_EFFECT_NONE; } static void sub_81B7E4C(u8 taskId) diff --git a/src/pokemon.c b/src/pokemon.c index 9c6afe0b8..fc9a0843f 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -39,6 +39,7 @@ #include "constants/battle_frontier.h" #include "constants/battle_move_effects.h" #include "constants/hold_effects.h" +#include "constants/item_effects.h" #include "constants/items.h" #include "constants/layouts.h" #include "constants/moves.h" @@ -4664,9 +4665,9 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov battlerId = MAX_BATTLERS_COUNT; } - if (!IS_POKEMON_ITEM(item)) + if (!ITEM_HAS_EFFECT(item)) return TRUE; - if (gItemEffectTable[item - 13] == NULL && item != ITEM_ENIGMA_BERRY) + if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY) return TRUE; if (item == ITEM_ENIGMA_BERRY) @@ -4678,82 +4679,82 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } else { - itemEffect = gItemEffectTable[item - 13]; + itemEffect = gItemEffectTable[item - ITEM_POTION]; } for (cmdIndex = 0; cmdIndex < 6; cmdIndex++) { switch (cmdIndex) { - // status healing effects + // infatuation heal, x attack, sacred ash and dire hit case 0: - if ((itemEffect[cmdIndex] & 0x80) - && gMain.inBattle && battlerId != 4 && (gBattleMons[battlerId].status2 & STATUS2_INFATUATION)) + if ((itemEffect[cmdIndex] & ITEM0_INFATUATION) + && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && (gBattleMons[battlerId].status2 & STATUS2_INFATUATION)) { gBattleMons[battlerId].status2 &= ~STATUS2_INFATUATION; retVal = FALSE; } - if ((itemEffect[cmdIndex] & 0x30) + if ((itemEffect[cmdIndex] & ITEM0_HIGH_CRIT) && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) { gBattleMons[gActiveBattler].status2 |= STATUS2_FOCUS_ENERGY; retVal = FALSE; } - if ((itemEffect[cmdIndex] & 0xF) + if ((itemEffect[cmdIndex] & ITEM0_X_ATTACK) && gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12) { - gBattleMons[gActiveBattler].statStages[STAT_ATK] += itemEffect[cmdIndex] & 0xF; + gBattleMons[gActiveBattler].statStages[STAT_ATK] += itemEffect[cmdIndex] & ITEM0_X_ATTACK; if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > 12) gBattleMons[gActiveBattler].statStages[STAT_ATK] = 12; retVal = FALSE; } break; - // in-battle stat boosting effects? + // in-battle stat boosting effects case 1: - if ((itemEffect[cmdIndex] & 0xF0) + if ((itemEffect[cmdIndex] & ITEM1_X_DEFEND) && gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12) { - gBattleMons[gActiveBattler].statStages[STAT_DEF] += (itemEffect[cmdIndex] & 0xF0) >> 4; + gBattleMons[gActiveBattler].statStages[STAT_DEF] += (itemEffect[cmdIndex] & ITEM1_X_DEFEND) >> 4; if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > 12) gBattleMons[gActiveBattler].statStages[STAT_DEF] = 12; retVal = FALSE; } - if ((itemEffect[cmdIndex] & 0xF) + if ((itemEffect[cmdIndex] & ITEM1_X_SPEED) && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12) { - gBattleMons[gActiveBattler].statStages[STAT_SPEED] += itemEffect[cmdIndex] & 0xF; + gBattleMons[gActiveBattler].statStages[STAT_SPEED] += itemEffect[cmdIndex] & ITEM1_X_SPEED; if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > 12) gBattleMons[gActiveBattler].statStages[STAT_SPEED] = 12; retVal = FALSE; } break; - // more stat boosting effects? + // more stat boosting effects case 2: - if ((itemEffect[cmdIndex] & 0xF0) + if ((itemEffect[cmdIndex] & ITEM2_X_ACCURACY) && gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12) { - gBattleMons[gActiveBattler].statStages[STAT_ACC] += (itemEffect[cmdIndex] & 0xF0) >> 4; + gBattleMons[gActiveBattler].statStages[STAT_ACC] += (itemEffect[cmdIndex] & ITEM2_X_ACCURACY) >> 4; if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > 12) gBattleMons[gActiveBattler].statStages[STAT_ACC] = 12; retVal = FALSE; } - if ((itemEffect[cmdIndex] & 0xF) + if ((itemEffect[cmdIndex] & ITEM2_X_SPATK) && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12) { - gBattleMons[gActiveBattler].statStages[STAT_SPATK] += itemEffect[cmdIndex] & 0xF; + gBattleMons[gActiveBattler].statStages[STAT_SPATK] += itemEffect[cmdIndex] & ITEM2_X_SPATK; if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > 12) gBattleMons[gActiveBattler].statStages[STAT_SPATK] = 12; retVal = FALSE; } break; case 3: - if ((itemEffect[cmdIndex] & 0x80) + if ((itemEffect[cmdIndex] & ITEM3_MIST) && gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer == 0) { gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer = 5; retVal = FALSE; } - if ((itemEffect[cmdIndex] & 0x40) // raise level + if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; @@ -4761,23 +4762,23 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov CalculateMonStats(mon); retVal = FALSE; } - if ((itemEffect[cmdIndex] & 0x20) + if ((itemEffect[cmdIndex] & ITEM3_SLEEP) && HealStatusConditions(mon, partyIndex, 7, battlerId) == 0) { if (battlerId != 4) gBattleMons[battlerId].status2 &= ~STATUS2_NIGHTMARE; retVal = FALSE; } - if ((itemEffect[cmdIndex] & 0x10) && HealStatusConditions(mon, partyIndex, STATUS1_PSN_ANY | STATUS1_TOXIC_COUNTER, battlerId) == 0) + if ((itemEffect[cmdIndex] & ITEM3_POISON) && HealStatusConditions(mon, partyIndex, STATUS1_PSN_ANY | STATUS1_TOXIC_COUNTER, battlerId) == 0) retVal = FALSE; - if ((itemEffect[cmdIndex] & 8) && HealStatusConditions(mon, partyIndex, STATUS1_BURN, battlerId) == 0) + if ((itemEffect[cmdIndex] & ITEM3_BURN) && HealStatusConditions(mon, partyIndex, STATUS1_BURN, battlerId) == 0) retVal = FALSE; - if ((itemEffect[cmdIndex] & 4) && HealStatusConditions(mon, partyIndex, STATUS1_FREEZE, battlerId) == 0) + if ((itemEffect[cmdIndex] & ITEM3_FREEZE) && HealStatusConditions(mon, partyIndex, STATUS1_FREEZE, battlerId) == 0) retVal = FALSE; - if ((itemEffect[cmdIndex] & 2) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battlerId) == 0) + if ((itemEffect[cmdIndex] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battlerId) == 0) retVal = FALSE; - if ((itemEffect[cmdIndex] & 1) // heal confusion - && gMain.inBattle && battlerId != 4 && (gBattleMons[battlerId].status2 & STATUS2_CONFUSION)) + if ((itemEffect[cmdIndex] & ITEM3_CONFUSION) // heal confusion + && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && (gBattleMons[battlerId].status2 & STATUS2_CONFUSION)) { gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; retVal = FALSE; @@ -4786,9 +4787,9 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov // EV, HP, and PP raising effects case 4: r10 = itemEffect[cmdIndex]; - if (r10 & 0x20) + if (r10 & ITEM4_PP_UP) { - r10 &= ~0x20; + r10 &= ~ITEM4_PP_UP; dataUnsigned = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2); var_38 = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); if (dataUnsigned <= 2 && var_38 > 4) @@ -4811,6 +4812,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov { case 0: case 1: + // ev raise evCount = GetMonEVCount(mon); r5 = itemEffect[var_3C]; dataSigned = GetMonData(mon, sGetMonDataEVConstants[var_38], NULL); @@ -4849,7 +4851,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; break; case 2: - // revive? + // revive if (r10 & 0x10) { if (GetMonData(mon, MON_DATA_HP, NULL) != 0) @@ -4930,6 +4932,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov r10 &= 0xEF; break; case 3: + // Heal pp in all moves. if (!(r10 & 2)) { for (r5 = 0; (signed)(r5) < (signed)(4); r5++) @@ -4949,7 +4952,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } SetMonData(mon, MON_DATA_PP1 + r5, &dataUnsigned); if (gMain.inBattle - && battlerId != 4 && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) + && battlerId != MAX_BATTLERS_COUNT && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) && !(gDisableStructs[battlerId].mimickedMoves & gBitTable[r5])) gBattleMons[battlerId].pp[r5] = dataUnsigned; retVal = FALSE; @@ -4957,6 +4960,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } var_3C++; } + // Heal pp in one move. else { u16 moveId; @@ -4981,6 +4985,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } } break; + // Evolution stone case 7: { u16 targetSpecies = GetEvolutionTargetSpecies(mon, 2, item); @@ -4998,6 +5003,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov r10 >>= 1; } break; + // EV and friendship case 5: r10 = itemEffect[cmdIndex]; var_38 = 0; @@ -5180,7 +5186,7 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) offset = 6; - temp = gItemEffectTable[itemId - 13]; + temp = gItemEffectTable[itemId - ITEM_POTION]; if (!temp && itemId != ITEM_ENIGMA_BERRY) return 0; @@ -5205,8 +5211,8 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) break; case 4: val = itemEffect[4]; - if (val & 0x20) - val &= 0xDF; + if (val & ITEM4_PP_UP) + val &= ~(ITEM4_PP_UP); j = 0; while (val) { @@ -5304,7 +5310,7 @@ u8 *sub_806CF78(u16 itemId) } else { - itemEffect = gItemEffectTable[itemId - 13]; + itemEffect = gItemEffectTable[itemId - ITEM_POTION]; } gPotentialItemEffectBattler = gBattlerInMenuId; @@ -5327,7 +5333,7 @@ u8 *sub_806CF78(u16 itemId) } } - if (itemEffect[3] & 0x80) + if (itemEffect[3] & ITEM3_MIST) { gBattlerAttacker = gBattlerInMenuId; BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnShroudedInMist); From 912b87564f6bf50c3e61315dcf715c463b0c4b9f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 15 Apr 2019 12:05:10 +0200 Subject: [PATCH 5/8] Compact item data, make descriptions easier to read --- src/data/items.h | 2684 ++++------------------------- src/data/text/item_descriptions.h | 1871 ++++++++++++++++---- 2 files changed, 1925 insertions(+), 2630 deletions(-) diff --git a/src/data/items.h b/src/data/items.h index 7d7caa289..4d262e683 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -5,16 +5,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -25,14 +19,9 @@ const struct Item gItems[] = .name = _("MASTER BALL"), .itemId = ITEM_MASTER_BALL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMasterBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMasterBallDesc, .pocket = POCKET_POKE_BALLS, .type = 0, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 0, @@ -43,14 +32,9 @@ const struct Item gItems[] = .name = _("ULTRA BALL"), .itemId = ITEM_ULTRA_BALL, .price = 1200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gUltraBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sUltraBallDesc, .pocket = POCKET_POKE_BALLS, .type = 1, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 1, @@ -61,14 +45,9 @@ const struct Item gItems[] = .name = _("GREAT BALL"), .itemId = ITEM_GREAT_BALL, .price = 600, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGreatBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sGreatBallDesc, .pocket = POCKET_POKE_BALLS, .type = 2, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 2, @@ -79,14 +58,9 @@ const struct Item gItems[] = .name = _("POKé BALL"), .itemId = ITEM_POKE_BALL, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPokeBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPokeBallDesc, .pocket = POCKET_POKE_BALLS, .type = 3, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 3, @@ -97,14 +71,9 @@ const struct Item gItems[] = .name = _("SAFARI BALL"), .itemId = ITEM_SAFARI_BALL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSafariBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSafariBallDesc, .pocket = POCKET_POKE_BALLS, .type = 4, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 4, @@ -115,14 +84,9 @@ const struct Item gItems[] = .name = _("NET BALL"), .itemId = ITEM_NET_BALL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gNetBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sNetBallDesc, .pocket = POCKET_POKE_BALLS, .type = 5, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 5, @@ -133,14 +97,9 @@ const struct Item gItems[] = .name = _("DIVE BALL"), .itemId = ITEM_DIVE_BALL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDiveBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDiveBallDesc, .pocket = POCKET_POKE_BALLS, .type = 6, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 6, @@ -151,14 +110,9 @@ const struct Item gItems[] = .name = _("NEST BALL"), .itemId = ITEM_NEST_BALL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gNestBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sNestBallDesc, .pocket = POCKET_POKE_BALLS, .type = 7, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 7, @@ -169,14 +123,9 @@ const struct Item gItems[] = .name = _("REPEAT BALL"), .itemId = ITEM_REPEAT_BALL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRepeatBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRepeatBallDesc, .pocket = POCKET_POKE_BALLS, .type = 8, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 8, @@ -187,14 +136,9 @@ const struct Item gItems[] = .name = _("TIMER BALL"), .itemId = ITEM_TIMER_BALL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTimerBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTimerBallDesc, .pocket = POCKET_POKE_BALLS, .type = 9, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 9, @@ -205,14 +149,9 @@ const struct Item gItems[] = .name = _("LUXURY BALL"), .itemId = ITEM_LUXURY_BALL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gLuxuryBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLuxuryBallDesc, .pocket = POCKET_POKE_BALLS, .type = 10, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 10, @@ -223,14 +162,9 @@ const struct Item gItems[] = .name = _("PREMIER BALL"), .itemId = ITEM_PREMIER_BALL, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPremierBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPremierBallDesc, .pocket = POCKET_POKE_BALLS, .type = 11, - .fieldUseFunc = NULL, .battleUsage = 2, .battleUseFunc = ItemUseInBattle_PokeBall, .secondaryId = 11, @@ -243,11 +177,8 @@ const struct Item gItems[] = .name = _("POTION"), .itemId = ITEM_POTION, .price = 300, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 20, - .description = gPotionItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPotionDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -261,11 +192,7 @@ const struct Item gItems[] = .name = _("ANTIDOTE"), .itemId = ITEM_ANTIDOTE, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gAntidoteItemDescription, - .importance = 0, - .unk19 = 0, + .description = sAntidoteDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -279,11 +206,7 @@ const struct Item gItems[] = .name = _("BURN HEAL"), .itemId = ITEM_BURN_HEAL, .price = 250, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBurnHealItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBurnHealDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -297,11 +220,7 @@ const struct Item gItems[] = .name = _("ICE HEAL"), .itemId = ITEM_ICE_HEAL, .price = 250, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gIceHealItemDescription, - .importance = 0, - .unk19 = 0, + .description = sIceHealDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -315,11 +234,7 @@ const struct Item gItems[] = .name = _("AWAKENING"), .itemId = ITEM_AWAKENING, .price = 250, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gAwakeningItemDescription, - .importance = 0, - .unk19 = 0, + .description = sAwakeningDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -333,11 +248,7 @@ const struct Item gItems[] = .name = _("PARLYZ HEAL"), .itemId = ITEM_PARALYZE_HEAL, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gParalyzeHealItemDescription, - .importance = 0, - .unk19 = 0, + .description = sParalyzeHealDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -351,11 +262,8 @@ const struct Item gItems[] = .name = _("FULL RESTORE"), .itemId = ITEM_FULL_RESTORE, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 255, - .description = gFullRestoreItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFullRestoreDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -369,11 +277,8 @@ const struct Item gItems[] = .name = _("MAX POTION"), .itemId = ITEM_MAX_POTION, .price = 2500, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 255, - .description = gMaxPotionItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMaxPotionDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -387,11 +292,8 @@ const struct Item gItems[] = .name = _("HYPER POTION"), .itemId = ITEM_HYPER_POTION, .price = 1200, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 200, - .description = gHyperPotionItemDescription, - .importance = 0, - .unk19 = 0, + .description = sHyperPotionDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -405,11 +307,8 @@ const struct Item gItems[] = .name = _("SUPER POTION"), .itemId = ITEM_SUPER_POTION, .price = 700, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 50, - .description = gSuperPotionItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSuperPotionDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -423,11 +322,7 @@ const struct Item gItems[] = .name = _("FULL HEAL"), .itemId = ITEM_FULL_HEAL, .price = 600, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gFullHealItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFullHealDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -441,11 +336,7 @@ const struct Item gItems[] = .name = _("REVIVE"), .itemId = ITEM_REVIVE, .price = 1500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gReviveItemDescription, - .importance = 0, - .unk19 = 0, + .description = sReviveDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -459,11 +350,7 @@ const struct Item gItems[] = .name = _("MAX REVIVE"), .itemId = ITEM_MAX_REVIVE, .price = 4000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMaxReviveItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMaxReviveDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -477,11 +364,8 @@ const struct Item gItems[] = .name = _("FRESH WATER"), .itemId = ITEM_FRESH_WATER, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 50, - .description = gFreshWaterItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFreshWaterDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -495,11 +379,8 @@ const struct Item gItems[] = .name = _("SODA POP"), .itemId = ITEM_SODA_POP, .price = 300, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 60, - .description = gSodaPopItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSodaPopDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -513,11 +394,8 @@ const struct Item gItems[] = .name = _("LEMONADE"), .itemId = ITEM_LEMONADE, .price = 350, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 80, - .description = gLemonadeItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLemonadeDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -531,11 +409,8 @@ const struct Item gItems[] = .name = _("MOOMOO MILK"), .itemId = ITEM_MOOMOO_MILK, .price = 500, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 100, - .description = gMoomooMilkItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMoomooMilkDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -549,11 +424,7 @@ const struct Item gItems[] = .name = _("ENERGYPOWDER"), .itemId = ITEM_ENERGY_POWDER, .price = 500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gEnergyPowderItemDescription, - .importance = 0, - .unk19 = 0, + .description = sEnergyPowderDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -567,11 +438,7 @@ const struct Item gItems[] = .name = _("ENERGY ROOT"), .itemId = ITEM_ENERGY_ROOT, .price = 800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gEnergyRootItemDescription, - .importance = 0, - .unk19 = 0, + .description = sEnergyRootDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -585,11 +452,7 @@ const struct Item gItems[] = .name = _("HEAL POWDER"), .itemId = ITEM_HEAL_POWDER, .price = 450, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHealPowderItemDescription, - .importance = 0, - .unk19 = 0, + .description = sHealPowderDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -603,11 +466,7 @@ const struct Item gItems[] = .name = _("REVIVAL HERB"), .itemId = ITEM_REVIVAL_HERB, .price = 2800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRevivalHerbItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRevivalHerbDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -621,11 +480,8 @@ const struct Item gItems[] = .name = _("ETHER"), .itemId = ITEM_ETHER, .price = 1200, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 10, - .description = gEtherItemDescription, - .importance = 0, - .unk19 = 0, + .description = sEtherDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, @@ -639,11 +495,8 @@ const struct Item gItems[] = .name = _("MAX ETHER"), .itemId = ITEM_MAX_ETHER, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 255, - .description = gMaxEtherItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMaxEtherDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, @@ -657,11 +510,8 @@ const struct Item gItems[] = .name = _("ELIXIR"), .itemId = ITEM_ELIXIR, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 10, - .description = gElixirItemDescription, - .importance = 0, - .unk19 = 0, + .description = sElixirDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, @@ -675,11 +525,8 @@ const struct Item gItems[] = .name = _("MAX ELIXIR"), .itemId = ITEM_MAX_ELIXIR, .price = 4500, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 255, - .description = gMaxElixirItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMaxElixirDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, @@ -693,11 +540,7 @@ const struct Item gItems[] = .name = _("LAVA COOKIE"), .itemId = ITEM_LAVA_COOKIE, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gLavaCookieItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLavaCookieDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -711,11 +554,7 @@ const struct Item gItems[] = .name = _("BLUE FLUTE"), .itemId = ITEM_BLUE_FLUTE, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBlueFluteItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBlueFluteDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -729,11 +568,7 @@ const struct Item gItems[] = .name = _("YELLOW FLUTE"), .itemId = ITEM_YELLOW_FLUTE, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gYellowFluteItemDescription, - .importance = 0, - .unk19 = 0, + .description = sYellowFluteDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -747,11 +582,7 @@ const struct Item gItems[] = .name = _("RED FLUTE"), .itemId = ITEM_RED_FLUTE, .price = 300, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRedFluteItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRedFluteDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -765,16 +596,11 @@ const struct Item gItems[] = .name = _("BLACK FLUTE"), .itemId = ITEM_BLACK_FLUTE, .price = 400, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 50, - .description = gBlackFluteItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBlackFluteDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_BlackWhiteFlute, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -783,16 +609,11 @@ const struct Item gItems[] = .name = _("WHITE FLUTE"), .itemId = ITEM_WHITE_FLUTE, .price = 500, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 150, - .description = gWhiteFluteItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWhiteFluteDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_BlackWhiteFlute, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -803,9 +624,7 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_RESTORE_HP, .holdEffectParam = 20, - .description = gBerryJuiceItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBerryJuiceDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -819,16 +638,10 @@ const struct Item gItems[] = .name = _("SACRED ASH"), .itemId = ITEM_SACRED_ASH, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSacredAshItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSacredAshDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_SacredAsh, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -839,16 +652,10 @@ const struct Item gItems[] = .name = _("SHOAL SALT"), .itemId = ITEM_SHOAL_SALT, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gShoalSaltItemDescription, - .importance = 0, - .unk19 = 0, + .description = sShoalSaltDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -857,16 +664,10 @@ const struct Item gItems[] = .name = _("SHOAL SHELL"), .itemId = ITEM_SHOAL_SHELL, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gShoalShellItemDescription, - .importance = 0, - .unk19 = 0, + .description = sShoalShellDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -875,16 +676,10 @@ const struct Item gItems[] = .name = _("RED SHARD"), .itemId = ITEM_RED_SHARD, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRedShardItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRedShardDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -893,16 +688,10 @@ const struct Item gItems[] = .name = _("BLUE SHARD"), .itemId = ITEM_BLUE_SHARD, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBlueShardItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBlueShardDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -911,16 +700,10 @@ const struct Item gItems[] = .name = _("YELLOW SHARD"), .itemId = ITEM_YELLOW_SHARD, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gYellowShardItemDescription, - .importance = 0, - .unk19 = 0, + .description = sYellowShardDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -929,16 +712,10 @@ const struct Item gItems[] = .name = _("GREEN SHARD"), .itemId = ITEM_GREEN_SHARD, .price = 200, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGreenShardItemDescription, - .importance = 0, - .unk19 = 0, + .description = sGreenShardDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -947,16 +724,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -965,16 +736,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -983,16 +748,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1001,16 +760,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1019,16 +772,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1037,16 +784,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1055,16 +796,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1073,16 +808,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1091,16 +820,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1109,16 +832,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1127,16 +844,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1147,16 +858,10 @@ const struct Item gItems[] = .name = _("HP UP"), .itemId = ITEM_HP_UP, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHPUpItemDescription, - .importance = 0, - .unk19 = 0, + .description = sHPUpDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1165,16 +870,10 @@ const struct Item gItems[] = .name = _("PROTEIN"), .itemId = ITEM_PROTEIN, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gProteinItemDescription, - .importance = 0, - .unk19 = 0, + .description = sProteinDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1183,16 +882,10 @@ const struct Item gItems[] = .name = _("IRON"), .itemId = ITEM_IRON, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gIronItemDescription, - .importance = 0, - .unk19 = 0, + .description = sIronDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1201,16 +894,10 @@ const struct Item gItems[] = .name = _("CARBOS"), .itemId = ITEM_CARBOS, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gCarbosItemDescription, - .importance = 0, - .unk19 = 0, + .description = sCarbosDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1219,16 +906,10 @@ const struct Item gItems[] = .name = _("CALCIUM"), .itemId = ITEM_CALCIUM, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gCalciumItemDescription, - .importance = 0, - .unk19 = 0, + .description = sCalciumDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1237,16 +918,10 @@ const struct Item gItems[] = .name = _("RARE CANDY"), .itemId = ITEM_RARE_CANDY, .price = 4800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRareCandyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRareCandyDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_RareCandy, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1255,16 +930,10 @@ const struct Item gItems[] = .name = _("PP UP"), .itemId = ITEM_PP_UP, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPPUpItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPPUpDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_PPUp, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1273,16 +942,10 @@ const struct Item gItems[] = .name = _("ZINC"), .itemId = ITEM_ZINC, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gZincItemDescription, - .importance = 0, - .unk19 = 0, + .description = sZincDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1291,16 +954,10 @@ const struct Item gItems[] = .name = _("PP MAX"), .itemId = ITEM_PP_MAX, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPPMaxItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPPMaxDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_PPUp, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1309,16 +966,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1329,11 +980,7 @@ const struct Item gItems[] = .name = _("GUARD SPEC."), .itemId = ITEM_GUARD_SPEC, .price = 700, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGuardSpecItemDescription, - .importance = 0, - .unk19 = 0, + .description = sGuardSpecDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1347,11 +994,7 @@ const struct Item gItems[] = .name = _("DIRE HIT"), .itemId = ITEM_DIRE_HIT, .price = 650, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDireHitItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDireHitDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1365,11 +1008,7 @@ const struct Item gItems[] = .name = _("X ATTACK"), .itemId = ITEM_X_ATTACK, .price = 500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gXAttackItemDescription, - .importance = 0, - .unk19 = 0, + .description = sXAttackDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1383,11 +1022,7 @@ const struct Item gItems[] = .name = _("X DEFEND"), .itemId = ITEM_X_DEFEND, .price = 550, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gXDefendItemDescription, - .importance = 0, - .unk19 = 0, + .description = sXDefendDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1401,11 +1036,7 @@ const struct Item gItems[] = .name = _("X SPEED"), .itemId = ITEM_X_SPEED, .price = 350, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gXSpeedItemDescription, - .importance = 0, - .unk19 = 0, + .description = sXSpeedDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1419,11 +1050,7 @@ const struct Item gItems[] = .name = _("X ACCURACY"), .itemId = ITEM_X_ACCURACY, .price = 950, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gXAccuracyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sXAccuracyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1437,11 +1064,7 @@ const struct Item gItems[] = .name = _("X SPECIAL"), .itemId = ITEM_X_SPECIAL, .price = 350, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gXSpecialItemDescription, - .importance = 0, - .unk19 = 0, + .description = sXSpecialDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1455,11 +1078,7 @@ const struct Item gItems[] = .name = _("POKé DOLL"), .itemId = ITEM_POKE_DOLL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPokeDollItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPokeDollDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1473,11 +1092,7 @@ const struct Item gItems[] = .name = _("FLUFFY TAIL"), .itemId = ITEM_FLUFFY_TAIL, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gFluffyTailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFluffyTailDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -1491,16 +1106,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1511,16 +1120,11 @@ const struct Item gItems[] = .name = _("SUPER REPEL"), .itemId = ITEM_SUPER_REPEL, .price = 500, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 200, - .description = gSuperRepelItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSuperRepelDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_Repel, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1529,16 +1133,11 @@ const struct Item gItems[] = .name = _("MAX REPEL"), .itemId = ITEM_MAX_REPEL, .price = 700, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 250, - .description = gMaxRepelItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMaxRepelDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_Repel, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1547,16 +1146,10 @@ const struct Item gItems[] = .name = _("ESCAPE ROPE"), .itemId = ITEM_ESCAPE_ROPE, .price = 550, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gEscapeRopeItemDescription, - .importance = 0, - .unk19 = 0, + .description = sEscapeRopeDesc, .pocket = POCKET_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_EscapeRope, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1565,16 +1158,11 @@ const struct Item gItems[] = .name = _("REPEL"), .itemId = ITEM_REPEL, .price = 350, - .holdEffect = HOLD_EFFECT_NONE, .holdEffectParam = 100, - .description = gRepelItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRepelDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_Repel, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1583,16 +1171,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1601,16 +1183,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1619,16 +1195,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1637,16 +1207,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1655,16 +1219,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1673,16 +1231,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1693,16 +1245,10 @@ const struct Item gItems[] = .name = _("SUN STONE"), .itemId = ITEM_SUN_STONE, .price = 2100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSunStoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSunStoneDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1711,16 +1257,10 @@ const struct Item gItems[] = .name = _("MOON STONE"), .itemId = ITEM_MOON_STONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMoonStoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMoonStoneDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1729,16 +1269,10 @@ const struct Item gItems[] = .name = _("FIRE STONE"), .itemId = ITEM_FIRE_STONE, .price = 2100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gFireStoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFireStoneDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1747,16 +1281,10 @@ const struct Item gItems[] = .name = _("THUNDERSTONE"), .itemId = ITEM_THUNDER_STONE, .price = 2100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gThunderStoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sThunderStoneDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1765,16 +1293,10 @@ const struct Item gItems[] = .name = _("WATER STONE"), .itemId = ITEM_WATER_STONE, .price = 2100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gWaterStoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWaterStoneDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1783,16 +1305,10 @@ const struct Item gItems[] = .name = _("LEAF STONE"), .itemId = ITEM_LEAF_STONE, .price = 2100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gLeafStoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLeafStoneDesc, .pocket = POCKET_ITEMS, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1801,16 +1317,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1819,16 +1329,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1837,16 +1341,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1855,16 +1353,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1875,16 +1367,10 @@ const struct Item gItems[] = .name = _("TINYMUSHROOM"), .itemId = ITEM_TINY_MUSHROOM, .price = 500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTinyMushroomItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTinyMushroomDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1893,16 +1379,10 @@ const struct Item gItems[] = .name = _("BIG MUSHROOM"), .itemId = ITEM_BIG_MUSHROOM, .price = 5000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBigMushroomItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBigMushroomDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1911,16 +1391,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1929,16 +1403,10 @@ const struct Item gItems[] = .name = _("PEARL"), .itemId = ITEM_PEARL, .price = 1400, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPearlItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPearlDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1947,16 +1415,10 @@ const struct Item gItems[] = .name = _("BIG PEARL"), .itemId = ITEM_BIG_PEARL, .price = 7500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBigPearlItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBigPearlDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1965,16 +1427,10 @@ const struct Item gItems[] = .name = _("STARDUST"), .itemId = ITEM_STARDUST, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gStardustItemDescription, - .importance = 0, - .unk19 = 0, + .description = sStardustDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -1983,16 +1439,10 @@ const struct Item gItems[] = .name = _("STAR PIECE"), .itemId = ITEM_STAR_PIECE, .price = 9800, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gStarPieceItemDescription, - .importance = 0, - .unk19 = 0, + .description = sStarPieceDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2001,16 +1451,10 @@ const struct Item gItems[] = .name = _("NUGGET"), .itemId = ITEM_NUGGET, .price = 10000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gNuggetItemDescription, - .importance = 0, - .unk19 = 0, + .description = sNuggetDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2019,16 +1463,10 @@ const struct Item gItems[] = .name = _("HEART SCALE"), .itemId = ITEM_HEART_SCALE, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHeartScaleItemDescription, - .importance = 0, - .unk19 = 0, + .description = sHeartScaleDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2037,16 +1475,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2055,16 +1487,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2073,16 +1499,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2091,16 +1511,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2109,16 +1523,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2127,16 +1535,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2145,16 +1547,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2163,16 +1559,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2181,16 +1571,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2200,16 +1584,10 @@ const struct Item gItems[] = .name = _("ORANGE MAIL"), .itemId = ITEM_ORANGE_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gOrangeMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sOrangeMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2218,16 +1596,10 @@ const struct Item gItems[] = .name = _("HARBOR MAIL"), .itemId = ITEM_HARBOR_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHarborMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sHarborMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 1, }, @@ -2236,16 +1608,10 @@ const struct Item gItems[] = .name = _("GLITTER MAIL"), .itemId = ITEM_GLITTER_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGlitterMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sGlitterMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 2, }, @@ -2254,16 +1620,10 @@ const struct Item gItems[] = .name = _("MECH MAIL"), .itemId = ITEM_MECH_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMechMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMechMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 3, }, @@ -2272,16 +1632,10 @@ const struct Item gItems[] = .name = _("WOOD MAIL"), .itemId = ITEM_WOOD_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gWoodMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWoodMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 4, }, @@ -2290,16 +1644,10 @@ const struct Item gItems[] = .name = _("WAVE MAIL"), .itemId = ITEM_WAVE_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gWaveMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWaveMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 5, }, @@ -2308,16 +1656,10 @@ const struct Item gItems[] = .name = _("BEAD MAIL"), .itemId = ITEM_BEAD_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBeadMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBeadMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 6, }, @@ -2326,16 +1668,10 @@ const struct Item gItems[] = .name = _("SHADOW MAIL"), .itemId = ITEM_SHADOW_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gShadowMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sShadowMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 7, }, @@ -2344,16 +1680,10 @@ const struct Item gItems[] = .name = _("TROPIC MAIL"), .itemId = ITEM_TROPIC_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTropicMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTropicMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 8, }, @@ -2362,16 +1692,10 @@ const struct Item gItems[] = .name = _("DREAM MAIL"), .itemId = ITEM_DREAM_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDreamMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDreamMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 9, }, @@ -2380,16 +1704,10 @@ const struct Item gItems[] = .name = _("FAB MAIL"), .itemId = ITEM_FAB_MAIL, .price = 50, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gFabMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFabMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 10, }, @@ -2398,16 +1716,10 @@ const struct Item gItems[] = .name = _("RETRO MAIL"), .itemId = ITEM_RETRO_MAIL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRetroMailItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRetroMailDesc, .pocket = POCKET_ITEMS, .type = 0, .fieldUseFunc = ItemUseOutOfBattle_Mail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 11, }, @@ -2419,10 +1731,7 @@ const struct Item gItems[] = .itemId = ITEM_CHERI_BERRY, .price = 20, .holdEffect = HOLD_EFFECT_CURE_PAR, - .holdEffectParam = 0, - .description = gCheriBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sCheriBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2437,10 +1746,7 @@ const struct Item gItems[] = .itemId = ITEM_CHESTO_BERRY, .price = 20, .holdEffect = HOLD_EFFECT_CURE_SLP, - .holdEffectParam = 0, - .description = gChestoBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sChestoBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2455,10 +1761,7 @@ const struct Item gItems[] = .itemId = ITEM_PECHA_BERRY, .price = 20, .holdEffect = HOLD_EFFECT_CURE_PSN, - .holdEffectParam = 0, - .description = gPechaBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPechaBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2473,10 +1776,7 @@ const struct Item gItems[] = .itemId = ITEM_RAWST_BERRY, .price = 20, .holdEffect = HOLD_EFFECT_CURE_BRN, - .holdEffectParam = 0, - .description = gRawstBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRawstBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2491,10 +1791,7 @@ const struct Item gItems[] = .itemId = ITEM_ASPEAR_BERRY, .price = 20, .holdEffect = HOLD_EFFECT_CURE_FRZ, - .holdEffectParam = 0, - .description = gAspearBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sAspearBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2510,9 +1807,7 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_RESTORE_PP, .holdEffectParam = 10, - .description = gLeppaBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLeppaBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_PPRecovery, @@ -2528,9 +1823,7 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_RESTORE_HP, .holdEffectParam = 10, - .description = gOranBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sOranBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2545,10 +1838,7 @@ const struct Item gItems[] = .itemId = ITEM_PERSIM_BERRY, .price = 20, .holdEffect = HOLD_EFFECT_CURE_CONFUSION, - .holdEffectParam = 0, - .description = gPersimBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPersimBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -2563,10 +1853,7 @@ const struct Item gItems[] = .itemId = ITEM_LUM_BERRY, .price = 20, .holdEffect = HOLD_EFFECT_CURE_STATUS, - .holdEffectParam = 0, - .description = gLumBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLumBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2582,9 +1869,7 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_RESTORE_HP, .holdEffectParam = 30, - .description = gSitrusBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSitrusBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_Medicine, @@ -2600,14 +1885,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_CONFUSE_SPICY, .holdEffectParam = 8, - .description = gFigyBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFigyBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2618,14 +1899,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_CONFUSE_DRY, .holdEffectParam = 8, - .description = gWikiBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWikiBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2636,14 +1913,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_CONFUSE_SWEET, .holdEffectParam = 8, - .description = gMagoBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMagoBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2654,14 +1927,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_CONFUSE_BITTER, .holdEffectParam = 8, - .description = gAguavBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sAguavBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2672,14 +1941,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_CONFUSE_SOUR, .holdEffectParam = 8, - .description = gIapapaBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sIapapaBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2688,16 +1953,10 @@ const struct Item gItems[] = .name = _("RAZZ BERRY"), .itemId = ITEM_RAZZ_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRazzBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRazzBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2706,16 +1965,10 @@ const struct Item gItems[] = .name = _("BLUK BERRY"), .itemId = ITEM_BLUK_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBlukBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBlukBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2724,16 +1977,10 @@ const struct Item gItems[] = .name = _("NANAB BERRY"), .itemId = ITEM_NANAB_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gNanabBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sNanabBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2742,16 +1989,10 @@ const struct Item gItems[] = .name = _("WEPEAR BERRY"), .itemId = ITEM_WEPEAR_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gWepearBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWepearBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2760,16 +2001,10 @@ const struct Item gItems[] = .name = _("PINAP BERRY"), .itemId = ITEM_PINAP_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPinapBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPinapBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2778,16 +2013,10 @@ const struct Item gItems[] = .name = _("POMEG BERRY"), .itemId = ITEM_POMEG_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPomegBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPomegBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_ReduceEV, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2796,16 +2025,10 @@ const struct Item gItems[] = .name = _("KELPSY BERRY"), .itemId = ITEM_KELPSY_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gKelpsyBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sKelpsyBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_ReduceEV, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2814,16 +2037,10 @@ const struct Item gItems[] = .name = _("QUALOT BERRY"), .itemId = ITEM_QUALOT_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gQualotBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sQualotBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_ReduceEV, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2832,16 +2049,10 @@ const struct Item gItems[] = .name = _("HONDEW BERRY"), .itemId = ITEM_HONDEW_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHondewBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sHondewBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_ReduceEV, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2850,16 +2061,10 @@ const struct Item gItems[] = .name = _("GREPA BERRY"), .itemId = ITEM_GREPA_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGrepaBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sGrepaBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_ReduceEV, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2868,16 +2073,10 @@ const struct Item gItems[] = .name = _("TAMATO BERRY"), .itemId = ITEM_TAMATO_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTamatoBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTamatoBerryDesc, .pocket = POCKET_BERRIES, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_ReduceEV, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2886,16 +2085,10 @@ const struct Item gItems[] = .name = _("CORNN BERRY"), .itemId = ITEM_CORNN_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gCornnBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sCornnBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2904,16 +2097,10 @@ const struct Item gItems[] = .name = _("MAGOST BERRY"), .itemId = ITEM_MAGOST_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMagostBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMagostBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2922,16 +2109,10 @@ const struct Item gItems[] = .name = _("RABUTA BERRY"), .itemId = ITEM_RABUTA_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRabutaBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRabutaBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2940,16 +2121,10 @@ const struct Item gItems[] = .name = _("NOMEL BERRY"), .itemId = ITEM_NOMEL_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gNomelBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sNomelBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2958,16 +2133,10 @@ const struct Item gItems[] = .name = _("SPELON BERRY"), .itemId = ITEM_SPELON_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSpelonBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSpelonBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2976,16 +2145,10 @@ const struct Item gItems[] = .name = _("PAMTRE BERRY"), .itemId = ITEM_PAMTRE_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPamtreBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPamtreBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -2994,16 +2157,10 @@ const struct Item gItems[] = .name = _("WATMEL BERRY"), .itemId = ITEM_WATMEL_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gWatmelBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWatmelBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3012,16 +2169,10 @@ const struct Item gItems[] = .name = _("DURIN BERRY"), .itemId = ITEM_DURIN_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDurinBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDurinBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3030,16 +2181,10 @@ const struct Item gItems[] = .name = _("BELUE BERRY"), .itemId = ITEM_BELUE_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBelueBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBelueBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3050,14 +2195,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_ATTACK_UP, .holdEffectParam = 4, - .description = gLiechiBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLiechiBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3068,14 +2209,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_DEFENSE_UP, .holdEffectParam = 4, - .description = gGanlonBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sGanlonBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3086,14 +2223,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_SPEED_UP, .holdEffectParam = 4, - .description = gSalacBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSalacBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3104,14 +2237,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_SP_ATTACK_UP, .holdEffectParam = 4, - .description = gPetayaBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPetayaBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3122,14 +2251,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_SP_DEFENSE_UP, .holdEffectParam = 4, - .description = gApicotBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sApicotBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3140,14 +2265,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_CRITICAL_UP, .holdEffectParam = 4, - .description = gLansatBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLansatBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3158,14 +2279,10 @@ const struct Item gItems[] = .price = 20, .holdEffect = HOLD_EFFECT_RANDOM_STAT_UP, .holdEffectParam = 4, - .description = gStarfBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sStarfBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3174,11 +2291,7 @@ const struct Item gItems[] = .name = _("ENIGMA BERRY"), .itemId = ITEM_ENIGMA_BERRY, .price = 20, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gEnigmaBerryItemDescription, - .importance = 0, - .unk19 = 0, + .description = sEnigmaBerryDesc, .pocket = POCKET_BERRIES, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_EnigmaBerry, @@ -3192,16 +2305,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3210,16 +2317,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3228,16 +2329,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3250,14 +2345,10 @@ const struct Item gItems[] = .price = 10, .holdEffect = HOLD_EFFECT_EVASION_UP, .holdEffectParam = 10, - .description = gBrightPowderItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBrightPowderDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3267,15 +2358,10 @@ const struct Item gItems[] = .itemId = ITEM_WHITE_HERB, .price = 100, .holdEffect = HOLD_EFFECT_RESTORE_STATS, - .holdEffectParam = 0, - .description = gWhiteHerbItemDescription, - .importance = 0, - .unk19 = 0, + .description = sWhiteHerbDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3285,15 +2371,10 @@ const struct Item gItems[] = .itemId = ITEM_MACHO_BRACE, .price = 3000, .holdEffect = HOLD_EFFECT_MACHO_BRACE, - .holdEffectParam = 0, - .description = gMachoBraceItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMachoBraceDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3303,15 +2384,10 @@ const struct Item gItems[] = .itemId = ITEM_EXP_SHARE, .price = 3000, .holdEffect = HOLD_EFFECT_EXP_SHARE, - .holdEffectParam = 0, - .description = gExpShareItemDescription, - .importance = 0, - .unk19 = 0, + .description = sExpShareDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3322,14 +2398,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_QUICK_CLAW, .holdEffectParam = 20, - .description = gQuickClawItemDescription, - .importance = 0, - .unk19 = 0, + .description = sQuickClawDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3339,15 +2411,10 @@ const struct Item gItems[] = .itemId = ITEM_SOOTHE_BELL, .price = 100, .holdEffect = HOLD_EFFECT_HAPPINESS_UP, - .holdEffectParam = 0, - .description = gSootheBellItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSootheBellDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3357,15 +2424,10 @@ const struct Item gItems[] = .itemId = ITEM_MENTAL_HERB, .price = 100, .holdEffect = HOLD_EFFECT_CURE_ATTRACT, - .holdEffectParam = 0, - .description = gMentalHerbItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMentalHerbDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3375,15 +2437,10 @@ const struct Item gItems[] = .itemId = ITEM_CHOICE_BAND, .price = 100, .holdEffect = HOLD_EFFECT_CHOICE_BAND, - .holdEffectParam = 0, - .description = gChoiceBandItemDescription, - .importance = 0, - .unk19 = 0, + .description = sChoiceBandDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3394,14 +2451,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_FLINCH, .holdEffectParam = 10, - .description = gKingsRockItemDescription, - .importance = 0, - .unk19 = 0, + .description = sKingsRockDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3412,14 +2465,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_BUG_POWER, .holdEffectParam = 10, - .description = gSilverPowderItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSilverPowderDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3430,14 +2479,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_DOUBLE_PRIZE, .holdEffectParam = 10, - .description = gAmuletCoinItemDescription, - .importance = 0, - .unk19 = 0, + .description = sAmuletCoinDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3447,15 +2492,10 @@ const struct Item gItems[] = .itemId = ITEM_CLEANSE_TAG, .price = 200, .holdEffect = HOLD_EFFECT_REPEL, - .holdEffectParam = 0, - .description = gCleanseTagItemDescription, - .importance = 0, - .unk19 = 0, + .description = sCleanseTagDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3465,15 +2505,10 @@ const struct Item gItems[] = .itemId = ITEM_SOUL_DEW, .price = 200, .holdEffect = HOLD_EFFECT_SOUL_DEW, - .holdEffectParam = 0, - .description = gSoulDewItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSoulDewDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3483,15 +2518,10 @@ const struct Item gItems[] = .itemId = ITEM_DEEP_SEA_TOOTH, .price = 200, .holdEffect = HOLD_EFFECT_DEEP_SEA_TOOTH, - .holdEffectParam = 0, - .description = gDeepSeaToothItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDeepSeaToothDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3501,15 +2531,10 @@ const struct Item gItems[] = .itemId = ITEM_DEEP_SEA_SCALE, .price = 200, .holdEffect = HOLD_EFFECT_DEEP_SEA_SCALE, - .holdEffectParam = 0, - .description = gDeepSeaScaleItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDeepSeaScaleDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3519,15 +2544,10 @@ const struct Item gItems[] = .itemId = ITEM_SMOKE_BALL, .price = 200, .holdEffect = HOLD_EFFECT_CAN_ALWAYS_RUN, - .holdEffectParam = 0, - .description = gSmokeBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSmokeBallDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3537,15 +2557,10 @@ const struct Item gItems[] = .itemId = ITEM_EVERSTONE, .price = 200, .holdEffect = HOLD_EFFECT_PREVENT_EVOLVE, - .holdEffectParam = 0, - .description = gEverstoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sEverstoneDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3556,14 +2571,10 @@ const struct Item gItems[] = .price = 200, .holdEffect = HOLD_EFFECT_FOCUS_BAND, .holdEffectParam = 10, - .description = gFocusBandItemDescription, - .importance = 0, - .unk19 = 0, + .description = sFocusBandDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3573,15 +2584,10 @@ const struct Item gItems[] = .itemId = ITEM_LUCKY_EGG, .price = 200, .holdEffect = HOLD_EFFECT_LUCKY_EGG, - .holdEffectParam = 0, - .description = gLuckyEggItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLuckyEggDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3591,15 +2597,10 @@ const struct Item gItems[] = .itemId = ITEM_SCOPE_LENS, .price = 200, .holdEffect = HOLD_EFFECT_SCOPE_LENS, - .holdEffectParam = 0, - .description = gScopeLensItemDescription, - .importance = 0, - .unk19 = 0, + .description = sScopeLensDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3610,14 +2611,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_STEEL_POWER, .holdEffectParam = 10, - .description = gMetalCoatItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMetalCoatDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3628,14 +2625,10 @@ const struct Item gItems[] = .price = 200, .holdEffect = HOLD_EFFECT_LEFTOVERS, .holdEffectParam = 10, - .description = gLeftoversItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLeftoversDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3646,14 +2639,10 @@ const struct Item gItems[] = .price = 2100, .holdEffect = HOLD_EFFECT_DRAGON_SCALE, .holdEffectParam = 10, - .description = gDragonScaleItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDragonScaleDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3663,15 +2652,10 @@ const struct Item gItems[] = .itemId = ITEM_LIGHT_BALL, .price = 100, .holdEffect = HOLD_EFFECT_LIGHT_BALL, - .holdEffectParam = 0, - .description = gLightBallItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLightBallDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3682,14 +2666,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_GROUND_POWER, .holdEffectParam = 10, - .description = gSoftSandItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSoftSandDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3700,14 +2680,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_ROCK_POWER, .holdEffectParam = 10, - .description = gHardStoneItemDescription, - .importance = 0, - .unk19 = 0, + .description = sHardStoneDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3718,14 +2694,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_GRASS_POWER, .holdEffectParam = 10, - .description = gMiracleSeedItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMiracleSeedDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3736,14 +2708,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_DARK_POWER, .holdEffectParam = 10, - .description = gBlackGlassesItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBlackGlassesDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3754,14 +2722,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_FIGHTING_POWER, .holdEffectParam = 10, - .description = gBlackBeltItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBlackBeltDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3772,14 +2736,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_ELECTRIC_POWER, .holdEffectParam = 10, - .description = gMagnetItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMagnetDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3790,14 +2750,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_WATER_POWER, .holdEffectParam = 10, - .description = gMysticWaterItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMysticWaterDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3808,14 +2764,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_FLYING_POWER, .holdEffectParam = 10, - .description = gSharpBeakItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSharpBeakDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3826,14 +2778,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_POISON_POWER, .holdEffectParam = 10, - .description = gPoisonBarbItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPoisonBarbDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3844,14 +2792,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_ICE_POWER, .holdEffectParam = 10, - .description = gNeverMeltIceItemDescription, - .importance = 0, - .unk19 = 0, + .description = sNeverMeltIceDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3862,14 +2806,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_GHOST_POWER, .holdEffectParam = 10, - .description = gSpellTagItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSpellTagDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3880,14 +2820,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_PSYCHIC_POWER, .holdEffectParam = 10, - .description = gTwistedSpoonItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTwistedSpoonDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3898,14 +2834,10 @@ const struct Item gItems[] = .price = 9800, .holdEffect = HOLD_EFFECT_FIRE_POWER, .holdEffectParam = 10, - .description = gCharcoalItemDescription, - .importance = 0, - .unk19 = 0, + .description = sCharcoalDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3916,14 +2848,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_DRAGON_POWER, .holdEffectParam = 10, - .description = gDragonFangItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDragonFangDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3934,14 +2862,10 @@ const struct Item gItems[] = .price = 100, .holdEffect = HOLD_EFFECT_NORMAL_POWER, .holdEffectParam = 10, - .description = gSilkScarfItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSilkScarfDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3951,15 +2875,10 @@ const struct Item gItems[] = .itemId = ITEM_UP_GRADE, .price = 2100, .holdEffect = HOLD_EFFECT_UP_GRADE, - .holdEffectParam = 0, - .description = gUpGradeItemDescription, - .importance = 0, - .unk19 = 0, + .description = sUpGradeDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3970,14 +2889,10 @@ const struct Item gItems[] = .price = 200, .holdEffect = HOLD_EFFECT_SHELL_BELL, .holdEffectParam = 8, - .description = gShellBellItemDescription, - .importance = 0, - .unk19 = 0, + .description = sShellBellDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -3988,14 +2903,10 @@ const struct Item gItems[] = .price = 9600, .holdEffect = HOLD_EFFECT_WATER_POWER, .holdEffectParam = 5, - .description = gSeaIncenseItemDescription, - .importance = 0, - .unk19 = 0, + .description = sSeaIncenseDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4006,14 +2917,10 @@ const struct Item gItems[] = .price = 9600, .holdEffect = HOLD_EFFECT_EVASION_UP, .holdEffectParam = 5, - .description = gLaxIncenseItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLaxIncenseDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4023,15 +2930,10 @@ const struct Item gItems[] = .itemId = ITEM_LUCKY_PUNCH, .price = 10, .holdEffect = HOLD_EFFECT_LUCKY_PUNCH, - .holdEffectParam = 0, - .description = gLuckyPunchItemDescription, - .importance = 0, - .unk19 = 0, + .description = sLuckyPunchDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4041,15 +2943,10 @@ const struct Item gItems[] = .itemId = ITEM_METAL_POWDER, .price = 10, .holdEffect = HOLD_EFFECT_METAL_POWDER, - .holdEffectParam = 0, - .description = gMetalPowderItemDescription, - .importance = 0, - .unk19 = 0, + .description = sMetalPowderDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4059,15 +2956,10 @@ const struct Item gItems[] = .itemId = ITEM_THICK_CLUB, .price = 500, .holdEffect = HOLD_EFFECT_THICK_CLUB, - .holdEffectParam = 0, - .description = gThickClubItemDescription, - .importance = 0, - .unk19 = 0, + .description = sThickClubDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4077,15 +2969,10 @@ const struct Item gItems[] = .itemId = ITEM_STICK, .price = 200, .holdEffect = HOLD_EFFECT_STICK, - .holdEffectParam = 0, - .description = gStickItemDescription, - .importance = 0, - .unk19 = 0, + .description = sStickDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4094,16 +2981,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4112,16 +2993,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4130,16 +3005,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4148,16 +3017,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4166,16 +3029,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4184,16 +3041,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4202,16 +3053,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4220,16 +3065,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4238,16 +3077,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4256,16 +3089,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4274,16 +3101,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4292,16 +3113,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4310,16 +3125,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4328,16 +3137,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4346,16 +3149,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4364,16 +3161,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4382,16 +3173,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4400,16 +3185,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4418,16 +3197,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4436,16 +3209,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4454,16 +3221,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4472,16 +3233,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4490,16 +3245,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4508,16 +3257,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4526,16 +3269,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4544,16 +3281,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4562,16 +3293,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4580,16 +3305,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4598,16 +3317,10 @@ const struct Item gItems[] = .name = _("RED SCARF"), .itemId = ITEM_RED_SCARF, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRedScarfItemDescription, - .importance = 0, - .unk19 = 0, + .description = sRedScarfDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4616,16 +3329,10 @@ const struct Item gItems[] = .name = _("BLUE SCARF"), .itemId = ITEM_BLUE_SCARF, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBlueScarfItemDescription, - .importance = 0, - .unk19 = 0, + .description = sBlueScarfDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4634,16 +3341,10 @@ const struct Item gItems[] = .name = _("PINK SCARF"), .itemId = ITEM_PINK_SCARF, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPinkScarfItemDescription, - .importance = 0, - .unk19 = 0, + .description = sPinkScarfDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4652,16 +3353,10 @@ const struct Item gItems[] = .name = _("GREEN SCARF"), .itemId = ITEM_GREEN_SCARF, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGreenScarfItemDescription, - .importance = 0, - .unk19 = 0, + .description = sGreenScarfDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4670,16 +3365,10 @@ const struct Item gItems[] = .name = _("YELLOW SCARF"), .itemId = ITEM_YELLOW_SCARF, .price = 100, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gYellowScarfItemDescription, - .importance = 0, - .unk19 = 0, + .description = sYellowScarfDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4690,16 +3379,12 @@ const struct Item gItems[] = .name = _("MACH BIKE"), .itemId = ITEM_MACH_BIKE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMachBikeItemDescription, + .description = sMachBikeDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_Bike, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4708,16 +3393,11 @@ const struct Item gItems[] = .name = _("COIN CASE"), .itemId = ITEM_COIN_CASE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gCoinCaseItemDescription, + .description = sCoinCaseDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CoinCase, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4726,16 +3406,12 @@ const struct Item gItems[] = .name = _("ITEMFINDER"), .itemId = ITEM_ITEMFINDER, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gItemfinderItemDescription, + .description = sItemfinderDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_Itemfinder, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4744,16 +3420,12 @@ const struct Item gItems[] = .name = _("OLD ROD"), .itemId = ITEM_OLD_ROD, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gOldRodItemDescription, + .description = sOldRodDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_Rod, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4762,16 +3434,12 @@ const struct Item gItems[] = .name = _("GOOD ROD"), .itemId = ITEM_GOOD_ROD, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGoodRodItemDescription, + .description = sGoodRodDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_Rod, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 1, }, @@ -4780,16 +3448,12 @@ const struct Item gItems[] = .name = _("SUPER ROD"), .itemId = ITEM_SUPER_ROD, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSuperRodItemDescription, + .description = sSuperRodDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_Rod, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 2, }, @@ -4798,16 +3462,11 @@ const struct Item gItems[] = .name = _("S.S. TICKET"), .itemId = ITEM_SS_TICKET, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSSTicketItemDescription, + .description = sSSTicketDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4816,16 +3475,11 @@ const struct Item gItems[] = .name = _("CONTEST PASS"), .itemId = ITEM_CONTEST_PASS, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gContestPassItemDescription, + .description = sContestPassDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4834,16 +3488,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4852,16 +3500,11 @@ const struct Item gItems[] = .name = _("WAILMER PAIL"), .itemId = ITEM_WAILMER_PAIL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gWailmerPailItemDescription, + .description = sWailmerPailDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_WailmerPail, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4870,16 +3513,11 @@ const struct Item gItems[] = .name = _("DEVON GOODS"), .itemId = ITEM_DEVON_GOODS, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDevonGoodsItemDescription, + .description = sDevonGoodsDesc, .importance = 2, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4888,16 +3526,11 @@ const struct Item gItems[] = .name = _("SOOT SACK"), .itemId = ITEM_SOOT_SACK, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSootSackItemDescription, + .description = sSootSackDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4906,16 +3539,11 @@ const struct Item gItems[] = .name = _("BASEMENT KEY"), .itemId = ITEM_BASEMENT_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBasementKeyItemDescription, + .description = sBasementKeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4924,16 +3552,12 @@ const struct Item gItems[] = .name = _("ACRO BIKE"), .itemId = ITEM_ACRO_BIKE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gAcroBikeItemDescription, + .description = sAcroBikeDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_Bike, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 1, }, @@ -4942,16 +3566,12 @@ const struct Item gItems[] = .name = _("{POKEBLOCK} CASE"), .itemId = ITEM_POKEBLOCK_CASE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPokeblockCaseItemDescription, + .description = sPokeblockCaseDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 3, .fieldUseFunc = ItemUseOutOfBattle_PokeblockCase, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4960,16 +3580,11 @@ const struct Item gItems[] = .name = _("LETTER"), .itemId = ITEM_LETTER, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gLetterItemDescription, + .description = sLetterDesc, .importance = 2, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -4978,16 +3593,11 @@ const struct Item gItems[] = .name = _("EON TICKET"), .itemId = ITEM_EON_TICKET, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gEonTicketItemDescription, + .description = sEonTicketDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 1, }, @@ -4996,16 +3606,11 @@ const struct Item gItems[] = .name = _("RED ORB"), .itemId = ITEM_RED_ORB, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRedOrbItemDescription, + .description = sRedOrbDesc, .importance = 2, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5014,16 +3619,11 @@ const struct Item gItems[] = .name = _("BLUE ORB"), .itemId = ITEM_BLUE_ORB, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBlueOrbItemDescription, + .description = sBlueOrbDesc, .importance = 2, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5032,16 +3632,11 @@ const struct Item gItems[] = .name = _("SCANNER"), .itemId = ITEM_SCANNER, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gScannerItemDescription, + .description = sScannerDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5050,16 +3645,11 @@ const struct Item gItems[] = .name = _("GO-GOGGLES"), .itemId = ITEM_GO_GOGGLES, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGoGogglesItemDescription, + .description = sGoGogglesDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5068,16 +3658,11 @@ const struct Item gItems[] = .name = _("METEORITE"), .itemId = ITEM_METEORITE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMeteoriteItemDescription, + .description = sMeteoriteDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5086,16 +3671,11 @@ const struct Item gItems[] = .name = _("RM. 1 KEY"), .itemId = ITEM_ROOM_1_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRoom1KeyItemDescription, + .description = sRoom1KeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5104,16 +3684,11 @@ const struct Item gItems[] = .name = _("RM. 2 KEY"), .itemId = ITEM_ROOM_2_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRoom2KeyItemDescription, + .description = sRoom2KeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5122,16 +3697,11 @@ const struct Item gItems[] = .name = _("RM. 4 KEY"), .itemId = ITEM_ROOM_4_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRoom4KeyItemDescription, + .description = sRoom4KeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5140,16 +3710,11 @@ const struct Item gItems[] = .name = _("RM. 6 KEY"), .itemId = ITEM_ROOM_6_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRoom6KeyItemDescription, + .description = sRoom6KeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5158,16 +3723,11 @@ const struct Item gItems[] = .name = _("STORAGE KEY"), .itemId = ITEM_STORAGE_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gStorageKeyItemDescription, + .description = sStorageKeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5176,16 +3736,11 @@ const struct Item gItems[] = .name = _("ROOT FOSSIL"), .itemId = ITEM_ROOT_FOSSIL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRootFossilItemDescription, + .description = sRootFossilDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5194,16 +3749,11 @@ const struct Item gItems[] = .name = _("CLAW FOSSIL"), .itemId = ITEM_CLAW_FOSSIL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gClawFossilItemDescription, + .description = sClawFossilDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5212,16 +3762,11 @@ const struct Item gItems[] = .name = _("DEVON SCOPE"), .itemId = ITEM_DEVON_SCOPE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDevonScopeItemDescription, + .description = sDevonScopeDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5232,16 +3777,10 @@ const struct Item gItems[] = .name = _("TM01"), .itemId = ITEM_TM01_FOCUS_PUNCH, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM01ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM01Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5250,16 +3789,10 @@ const struct Item gItems[] = .name = _("TM02"), .itemId = ITEM_TM02_DRAGON_CLAW, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM02ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM02Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5268,16 +3801,10 @@ const struct Item gItems[] = .name = _("TM03"), .itemId = ITEM_TM03_WATER_PULSE, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM03ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM03Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5286,16 +3813,10 @@ const struct Item gItems[] = .name = _("TM04"), .itemId = ITEM_TM04_CALM_MIND, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM04ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM04Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5304,16 +3825,10 @@ const struct Item gItems[] = .name = _("TM05"), .itemId = ITEM_TM05_ROAR, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM05ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM05Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5322,16 +3837,10 @@ const struct Item gItems[] = .name = _("TM06"), .itemId = ITEM_TM06_TOXIC, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM06ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM06Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5340,16 +3849,10 @@ const struct Item gItems[] = .name = _("TM07"), .itemId = ITEM_TM07_HAIL, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM07ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM07Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5358,16 +3861,10 @@ const struct Item gItems[] = .name = _("TM08"), .itemId = ITEM_TM08_BULK_UP, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM08ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM08Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5376,16 +3873,10 @@ const struct Item gItems[] = .name = _("TM09"), .itemId = ITEM_TM09_BULLET_SEED, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM09ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM09Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5394,16 +3885,10 @@ const struct Item gItems[] = .name = _("TM10"), .itemId = ITEM_TM10_HIDDEN_POWER, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM10ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM10Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5412,16 +3897,10 @@ const struct Item gItems[] = .name = _("TM11"), .itemId = ITEM_TM11_SUNNY_DAY, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM11ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM11Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5430,16 +3909,10 @@ const struct Item gItems[] = .name = _("TM12"), .itemId = ITEM_TM12_TAUNT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM12ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM12Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5448,16 +3921,10 @@ const struct Item gItems[] = .name = _("TM13"), .itemId = ITEM_TM13_ICE_BEAM, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM13ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM13Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5466,16 +3933,10 @@ const struct Item gItems[] = .name = _("TM14"), .itemId = ITEM_TM14_BLIZZARD, .price = 5500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM14ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM14Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5484,16 +3945,10 @@ const struct Item gItems[] = .name = _("TM15"), .itemId = ITEM_TM15_HYPER_BEAM, .price = 7500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM15ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM15Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5502,16 +3957,10 @@ const struct Item gItems[] = .name = _("TM16"), .itemId = ITEM_TM16_LIGHT_SCREEN, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM16ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM16Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5520,16 +3969,10 @@ const struct Item gItems[] = .name = _("TM17"), .itemId = ITEM_TM17_PROTECT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM17ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM17Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5538,16 +3981,10 @@ const struct Item gItems[] = .name = _("TM18"), .itemId = ITEM_TM18_RAIN_DANCE, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM18ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM18Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5556,16 +3993,10 @@ const struct Item gItems[] = .name = _("TM19"), .itemId = ITEM_TM19_GIGA_DRAIN, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM19ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM19Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5574,16 +4005,10 @@ const struct Item gItems[] = .name = _("TM20"), .itemId = ITEM_TM20_SAFEGUARD, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM20ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM20Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5592,16 +4017,10 @@ const struct Item gItems[] = .name = _("TM21"), .itemId = ITEM_TM21_FRUSTRATION, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM21ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM21Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5610,16 +4029,10 @@ const struct Item gItems[] = .name = _("TM22"), .itemId = ITEM_TM22_SOLARBEAM, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM22ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM22Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5628,16 +4041,10 @@ const struct Item gItems[] = .name = _("TM23"), .itemId = ITEM_TM23_IRON_TAIL, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM23ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM23Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5646,16 +4053,10 @@ const struct Item gItems[] = .name = _("TM24"), .itemId = ITEM_TM24_THUNDERBOLT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM24ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM24Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5664,16 +4065,10 @@ const struct Item gItems[] = .name = _("TM25"), .itemId = ITEM_TM25_THUNDER, .price = 5500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM25ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM25Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5682,16 +4077,10 @@ const struct Item gItems[] = .name = _("TM26"), .itemId = ITEM_TM26_EARTHQUAKE, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM26ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM26Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5700,16 +4089,10 @@ const struct Item gItems[] = .name = _("TM27"), .itemId = ITEM_TM27_RETURN, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM27ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM27Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5718,16 +4101,10 @@ const struct Item gItems[] = .name = _("TM28"), .itemId = ITEM_TM28_DIG, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM28ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM28Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5736,16 +4113,10 @@ const struct Item gItems[] = .name = _("TM29"), .itemId = ITEM_TM29_PSYCHIC, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM29ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM29Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5754,16 +4125,10 @@ const struct Item gItems[] = .name = _("TM30"), .itemId = ITEM_TM30_SHADOW_BALL, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM30ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM30Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5772,16 +4137,10 @@ const struct Item gItems[] = .name = _("TM31"), .itemId = ITEM_TM31_BRICK_BREAK, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM31ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM31Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5790,16 +4149,10 @@ const struct Item gItems[] = .name = _("TM32"), .itemId = ITEM_TM32_DOUBLE_TEAM, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM32ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM32Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5808,16 +4161,10 @@ const struct Item gItems[] = .name = _("TM33"), .itemId = ITEM_TM33_REFLECT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM33ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM33Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5826,16 +4173,10 @@ const struct Item gItems[] = .name = _("TM34"), .itemId = ITEM_TM34_SHOCK_WAVE, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM34ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM34Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5844,16 +4185,10 @@ const struct Item gItems[] = .name = _("TM35"), .itemId = ITEM_TM35_FLAMETHROWER, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM35ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM35Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5862,16 +4197,10 @@ const struct Item gItems[] = .name = _("TM36"), .itemId = ITEM_TM36_SLUDGE_BOMB, .price = 1000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM36ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM36Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5880,16 +4209,10 @@ const struct Item gItems[] = .name = _("TM37"), .itemId = ITEM_TM37_SANDSTORM, .price = 2000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM37ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM37Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5898,16 +4221,10 @@ const struct Item gItems[] = .name = _("TM38"), .itemId = ITEM_TM38_FIRE_BLAST, .price = 5500, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM38ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM38Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5916,16 +4233,10 @@ const struct Item gItems[] = .name = _("TM39"), .itemId = ITEM_TM39_ROCK_TOMB, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM39ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM39Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5934,16 +4245,10 @@ const struct Item gItems[] = .name = _("TM40"), .itemId = ITEM_TM40_AERIAL_ACE, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM40ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM40Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5952,16 +4257,10 @@ const struct Item gItems[] = .name = _("TM41"), .itemId = ITEM_TM41_TORMENT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM41ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM41Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5970,16 +4269,10 @@ const struct Item gItems[] = .name = _("TM42"), .itemId = ITEM_TM42_FACADE, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM42ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM42Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -5988,16 +4281,10 @@ const struct Item gItems[] = .name = _("TM43"), .itemId = ITEM_TM43_SECRET_POWER, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM43ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM43Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6006,16 +4293,10 @@ const struct Item gItems[] = .name = _("TM44"), .itemId = ITEM_TM44_REST, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM44ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM44Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6024,16 +4305,10 @@ const struct Item gItems[] = .name = _("TM45"), .itemId = ITEM_TM45_ATTRACT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM45ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM45Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6042,16 +4317,10 @@ const struct Item gItems[] = .name = _("TM46"), .itemId = ITEM_TM46_THIEF, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM46ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM46Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6060,16 +4329,10 @@ const struct Item gItems[] = .name = _("TM47"), .itemId = ITEM_TM47_STEEL_WING, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM47ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM47Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6078,16 +4341,10 @@ const struct Item gItems[] = .name = _("TM48"), .itemId = ITEM_TM48_SKILL_SWAP, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM48ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM48Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6096,16 +4353,10 @@ const struct Item gItems[] = .name = _("TM49"), .itemId = ITEM_TM49_SNATCH, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM49ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM49Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6114,16 +4365,10 @@ const struct Item gItems[] = .name = _("TM50"), .itemId = ITEM_TM50_OVERHEAT, .price = 3000, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTM50ItemDescription, - .importance = 0, - .unk19 = 0, + .description = sTM50Desc, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6132,16 +4377,11 @@ const struct Item gItems[] = .name = _("HM01"), .itemId = ITEM_HM01_CUT, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM01ItemDescription, + .description = sHM01Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6150,16 +4390,11 @@ const struct Item gItems[] = .name = _("HM02"), .itemId = ITEM_HM02_FLY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM02ItemDescription, + .description = sHM02Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6168,16 +4403,11 @@ const struct Item gItems[] = .name = _("HM03"), .itemId = ITEM_HM03_SURF, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM03ItemDescription, + .description = sHM03Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6186,16 +4416,11 @@ const struct Item gItems[] = .name = _("HM04"), .itemId = ITEM_HM04_STRENGTH, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM04ItemDescription, + .description = sHM04Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6204,16 +4429,11 @@ const struct Item gItems[] = .name = _("HM05"), .itemId = ITEM_HM05_FLASH, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM05ItemDescription, + .description = sHM05Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6222,16 +4442,11 @@ const struct Item gItems[] = .name = _("HM06"), .itemId = ITEM_HM06_ROCK_SMASH, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM06ItemDescription, + .description = sHM06Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6240,16 +4455,11 @@ const struct Item gItems[] = .name = _("HM07"), .itemId = ITEM_HM07_WATERFALL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM07ItemDescription, + .description = sHM07Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6258,16 +4468,11 @@ const struct Item gItems[] = .name = _("HM08"), .itemId = ITEM_HM08_DIVE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHM08ItemDescription, + .description = sHM08Desc, .importance = 1, - .unk19 = 0, .pocket = POCKET_TM_HM, .type = 1, .fieldUseFunc = ItemUseOutOfBattle_TMHM, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6276,16 +4481,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6294,16 +4493,10 @@ const struct Item gItems[] = .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDummyItemDescription, - .importance = 0, - .unk19 = 0, + .description = sDummyDesc, .pocket = POCKET_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6314,16 +4507,11 @@ const struct Item gItems[] = .name = _("OAK'S PARCEL"), .itemId = ITEM_OAKS_PARCEL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gOaksParcelItemDescription, + .description = sOaksParcelDesc, .importance = 2, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6332,16 +4520,11 @@ const struct Item gItems[] = .name = _("POKé FLUTE"), .itemId = ITEM_POKE_FLUTE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPokeFluteItemDescription, + .description = sPokeFluteDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6350,16 +4533,11 @@ const struct Item gItems[] = .name = _("SECRET KEY"), .itemId = ITEM_SECRET_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSecretKeyItemDescription, + .description = sSecretKeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6368,16 +4546,11 @@ const struct Item gItems[] = .name = _("BIKE VOUCHER"), .itemId = ITEM_BIKE_VOUCHER, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBikeVoucherItemDescription, + .description = sBikeVoucherDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6386,16 +4559,11 @@ const struct Item gItems[] = .name = _("GOLD TEETH"), .itemId = ITEM_GOLD_TEETH, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gGoldTeethItemDescription, + .description = sGoldTeethDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6404,16 +4572,11 @@ const struct Item gItems[] = .name = _("OLD AMBER"), .itemId = ITEM_OLD_AMBER, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gOldAmberItemDescription, + .description = sOldAmberDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6422,16 +4585,11 @@ const struct Item gItems[] = .name = _("CARD KEY"), .itemId = ITEM_CARD_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gCardKeyItemDescription, + .description = sCardKeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6440,16 +4598,11 @@ const struct Item gItems[] = .name = _("LIFT KEY"), .itemId = ITEM_LIFT_KEY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gLiftKeyItemDescription, + .description = sLiftKeyDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6458,16 +4611,11 @@ const struct Item gItems[] = .name = _("HELIX FOSSIL"), .itemId = ITEM_HELIX_FOSSIL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gHelixFossilItemDescription, + .description = sHelixFossilDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6476,16 +4624,11 @@ const struct Item gItems[] = .name = _("DOME FOSSIL"), .itemId = ITEM_DOME_FOSSIL, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gDomeFossilItemDescription, + .description = sDomeFossilDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6494,16 +4637,11 @@ const struct Item gItems[] = .name = _("SILPH SCOPE"), .itemId = ITEM_SILPH_SCOPE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSilphScopeItemDescription, + .description = sSilphScopeDesc, .importance = 1, - .unk19 = 0, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6512,16 +4650,12 @@ const struct Item gItems[] = .name = _("BICYCLE"), .itemId = ITEM_BICYCLE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBicycleItemDescription, + .description = sBicycleDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6530,16 +4664,12 @@ const struct Item gItems[] = .name = _("TOWN MAP"), .itemId = ITEM_TOWN_MAP, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTownMapItemDescription, + .description = sTownMapDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6548,16 +4678,12 @@ const struct Item gItems[] = .name = _("VS SEEKER"), .itemId = ITEM_VS_SEEKER, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gVSSeekerItemDescription, + .description = sVSSeekerDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6566,16 +4692,12 @@ const struct Item gItems[] = .name = _("FAME CHECKER"), .itemId = ITEM_FAME_CHECKER, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gFameCheckerItemDescription, + .description = sFameCheckerDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6584,16 +4706,12 @@ const struct Item gItems[] = .name = _("TM CASE"), .itemId = ITEM_TM_CASE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTMCaseItemDescription, + .description = sTMCaseDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6602,16 +4720,12 @@ const struct Item gItems[] = .name = _("BERRY POUCH"), .itemId = ITEM_BERRY_POUCH, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gBerryPouchItemDescription, + .description = sBerryPouchDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6620,16 +4734,12 @@ const struct Item gItems[] = .name = _("TEACHY TV"), .itemId = ITEM_TEACHY_TV, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTeachyTVItemDescription, + .description = sTeachyTVDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 2, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6638,16 +4748,12 @@ const struct Item gItems[] = .name = _("TRI-PASS"), .itemId = ITEM_TRI_PASS, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTriPassItemDescription, + .description = sTriPassDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6656,16 +4762,12 @@ const struct Item gItems[] = .name = _("RAINBOW PASS"), .itemId = ITEM_RAINBOW_PASS, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRainbowPassItemDescription, + .description = sRainbowPassDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6674,16 +4776,12 @@ const struct Item gItems[] = .name = _("TEA"), .itemId = ITEM_TEA, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gTeaItemDescription, + .description = sTeaDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6692,16 +4790,12 @@ const struct Item gItems[] = .name = _("MYSTICTICKET"), .itemId = ITEM_MYSTIC_TICKET, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMysticTicketItemDescription, + .description = sMysticTicketDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6710,16 +4804,12 @@ const struct Item gItems[] = .name = _("AURORATICKET"), .itemId = ITEM_AURORA_TICKET, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gAuroraTicketItemDescription, + .description = sAuroraTicketDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6728,16 +4818,12 @@ const struct Item gItems[] = .name = _("POWDER JAR"), .itemId = ITEM_POWDER_JAR, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gPowderJarItemDescription, + .description = sPowderJarDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_PowderJar, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6746,16 +4832,12 @@ const struct Item gItems[] = .name = _("RUBY"), .itemId = ITEM_RUBY, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gRubyItemDescription, + .description = sRubyDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6764,16 +4846,12 @@ const struct Item gItems[] = .name = _("SAPPHIRE"), .itemId = ITEM_SAPPHIRE, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gSapphireItemDescription, + .description = sSapphireDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6784,16 +4862,12 @@ const struct Item gItems[] = .name = _("MAGMA EMBLEM"), .itemId = ITEM_MAGMA_EMBLEM, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gMagmaEmblemItemDescription, + .description = sMagmaEmblemDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, @@ -6802,16 +4876,12 @@ const struct Item gItems[] = .name = _("OLD SEA MAP"), .itemId = ITEM_OLD_SEA_MAP, .price = 0, - .holdEffect = HOLD_EFFECT_NONE, - .holdEffectParam = 0, - .description = gOldSeaMapItemDescription, + .description = sOldSeaMapDesc, .importance = 1, .unk19 = 1, .pocket = POCKET_KEY_ITEMS, .type = 4, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, - .battleUsage = 0, - .battleUseFunc = NULL, .secondaryId = 0, }, }; diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index 1f048e440..5f79efc57 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -1,326 +1,1551 @@ -const u8 gDummyItemDescription[] = _("?????"); -// Pokeballs -const u8 gMasterBallItemDescription[] = _("The best BALL that\ncatches a POKéMON\nwithout fail."); -const u8 gUltraBallItemDescription[] = _("A better BALL with\na higher catch rate\nthan a GREAT BALL."); -const u8 gGreatBallItemDescription[] = _("A good BALL with a\nhigher catch rate\nthan a POKé BALL."); -const u8 gPokeBallItemDescription[] = _("A tool used for\ncatching wild\nPOKéMON."); -const u8 gSafariBallItemDescription[] = _("A special BALL that\nis used only in the\nSAFARI ZONE."); -const u8 gNetBallItemDescription[] = _("A BALL that works\nwell on WATER- and\nBUG-type POKéMON."); -const u8 gDiveBallItemDescription[] = _("A BALL that works\nbetter on POKéMON\non the ocean floor."); -const u8 gNestBallItemDescription[] = _("A BALL that works\nbetter on weaker\nPOKéMON."); -const u8 gRepeatBallItemDescription[] = _("A BALL that works\nbetter on POKéMON\ncaught before."); -const u8 gTimerBallItemDescription[] = _("A BALL that gains\npower in battles\ntaking many turns."); -const u8 gLuxuryBallItemDescription[] = _("A cozy BALL that\nmakes POKéMON\nmore friendly."); -const u8 gPremierBallItemDescription[] = _("A rare BALL made\nin commemoration\nof some event."); -// Medicine -const u8 gPotionItemDescription[] = _("Restores the HP of\na POKéMON by\n20 points."); -const u8 gAntidoteItemDescription[] = _("Heals a poisoned\nPOKéMON."); -const u8 gBurnHealItemDescription[] = _("Heals POKéMON\nof a burn."); -const u8 gIceHealItemDescription[] = _("Defrosts a frozen\nPOKéMON."); -const u8 gAwakeningItemDescription[] = _("Awakens a sleeping\nPOKéMON."); -const u8 gParalyzeHealItemDescription[] = _("Heals a paralyzed\nPOKéMON."); -const u8 gFullRestoreItemDescription[] = _("Fully restores the\nHP and status of a\nPOKéMON."); -const u8 gMaxPotionItemDescription[] = _("Fully restores the\nHP of a POKéMON."); -const u8 gHyperPotionItemDescription[] = _("Restores the HP of\na POKéMON by\n200 points."); -const u8 gSuperPotionItemDescription[] = _("Restores the HP of\na POKéMON by\n50 points."); -const u8 gFullHealItemDescription[] = _("Heals all the\nstatus problems of\none POKéMON."); -const u8 gReviveItemDescription[] = _("Revives a fainted\nPOKéMON with half\nits HP."); -const u8 gMaxReviveItemDescription[] = _("Revives a fainted\nPOKéMON with all\nits HP."); -const u8 gFreshWaterItemDescription[] = _("A mineral water\nthat restores HP\nby 50 points."); -const u8 gSodaPopItemDescription[] = _("A fizzy soda drink\nthat restores HP\nby 60 points."); -const u8 gLemonadeItemDescription[] = _("A very sweet drink\nthat restores HP\nby 80 points."); -const u8 gMoomooMilkItemDescription[] = _("A nutritious milk\nthat restores HP\nby 100 points."); -const u8 gEnergyPowderItemDescription[] = _("A bitter powder\nthat restores HP\nby 50 points."); -const u8 gEnergyRootItemDescription[] = _("A bitter root\nthat restores HP\nby 200 points."); -const u8 gHealPowderItemDescription[] = _("A bitter powder\nthat heals all\nstatus problems."); -const u8 gRevivalHerbItemDescription[] = _("A very bitter herb\nthat revives a\nfainted POKéMON."); -const u8 gEtherItemDescription[] = _("Restores the PP\nof a selected move\nby 10."); -const u8 gMaxEtherItemDescription[] = _("Fully restores the\nPP of a selected\nmove."); -const u8 gElixirItemDescription[] = _("Restores the PP\nof all moves by 10."); -const u8 gMaxElixirItemDescription[] = _("Fully restores the\nPP of a POKéMON's\nmoves."); -const u8 gLavaCookieItemDescription[] = _("A local specialty\nthat heals all\nstatus problems."); -const u8 gBlueFluteItemDescription[] = _("A glass flute that\nawakens sleeping\nPOKéMON."); -const u8 gYellowFluteItemDescription[] = _("A glass flute that\nsnaps POKéMON\nout of confusion."); -const u8 gRedFluteItemDescription[] = _("A glass flute that\nsnaps POKéMON\nout of attraction."); -const u8 gBlackFluteItemDescription[] = _("A glass flute that\nkeeps away wild\nPOKéMON."); -const u8 gWhiteFluteItemDescription[] = _("A glass flute that\nlures wild POKéMON."); -const u8 gBerryJuiceItemDescription[] = _("A 100% pure juice\nthat restores HP\nby 20 points."); -const u8 gSacredAshItemDescription[] = _("Fully revives and\nrestores all\nfainted POKéMON."); -// Collectibles -const u8 gShoalSaltItemDescription[] = _("Salt obtained from\ndeep inside the\nSHOAL CAVE."); -const u8 gShoalShellItemDescription[] = _("A seashell found\ndeep inside the\nSHOAL CAVE."); -const u8 gRedShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply."); -const u8 gBlueShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply."); -const u8 gYellowShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply."); -const u8 gGreenShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply."); -// Vitamins -const u8 gHPUpItemDescription[] = _("Raises the base HP\nof one POKéMON."); -const u8 gProteinItemDescription[] = _("Raises the base\nATTACK stat of one\nPOKéMON."); -const u8 gIronItemDescription[] = _("Raises the base\nDEFENSE stat of\none POKéMON."); -const u8 gCarbosItemDescription[] = _("Raises the base\nSPEED stat of one\nPOKéMON."); -const u8 gCalciumItemDescription[] = _("Raises the base\nSP. ATK stat of one\nPOKéMON."); -const u8 gRareCandyItemDescription[] = _("Raises the level\nof a POKéMON by\none."); -const u8 gPPUpItemDescription[] = _("Raises the maximum\nPP of a selected\nmove."); -const u8 gZincItemDescription[] = _("Raises the base\nSP. DEF stat of one\nPOKéMON."); -const u8 gPPMaxItemDescription[] = _("Raises the PP of a\nmove to its maximum\npoints."); -// Battle items -const u8 gGuardSpecItemDescription[] = _("Prevents stat\nreduction when\nused in battle."); -const u8 gDireHitItemDescription[] = _("Raises the\ncritical-hit ratio\nduring one battle."); -const u8 gXAttackItemDescription[] = _("Raises the stat\nATTACK during one\nbattle."); -const u8 gXDefendItemDescription[] = _("Raises the stat\nDEFENSE during one\nbattle."); -const u8 gXSpeedItemDescription[] = _("Raises the stat\nSPEED during one\nbattle."); -const u8 gXAccuracyItemDescription[] = _("Raises accuracy\nof attack moves\nduring one battle."); -const u8 gXSpecialItemDescription[] = _("Raises the stat\nSP. ATK during one\nbattle."); -const u8 gPokeDollItemDescription[] = _("Use to flee from\nany battle with\na wild POKéMON."); -const u8 gFluffyTailItemDescription[] = _("Use to flee from\nany battle with\na wild POKéMON."); -// Field items -const u8 gSuperRepelItemDescription[] = _("Repels weak wild\nPOKéMON for 200\nsteps."); -const u8 gMaxRepelItemDescription[] = _("Repels weak wild\nPOKéMON for 250\nsteps."); -const u8 gEscapeRopeItemDescription[] = _("Use to escape\ninstantly from a\ncave or a dungeon."); -const u8 gRepelItemDescription[] = _("Repels weak wild\nPOKéMON for 100\nsteps."); -// Evolution stones -const u8 gSunStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve."); -const u8 gMoonStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve."); -const u8 gFireStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve."); -const u8 gThunderStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve."); -const u8 gWaterStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve."); -const u8 gLeafStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve."); -// Valuable items -const u8 gTinyMushroomItemDescription[] = _("A plain mushroom\nthat would sell\nat a cheap price."); -const u8 gBigMushroomItemDescription[] = _("A rare mushroom\nthat would sell at a\nhigh price."); -const u8 gPearlItemDescription[] = _("A pretty pearl\nthat would sell at a\ncheap price."); -const u8 gBigPearlItemDescription[] = _("A lovely large pearl\nthat would sell at a\nhigh price."); -const u8 gStardustItemDescription[] = _("Beautiful red sand.\nCan be sold at a\nhigh price."); -const u8 gStarPieceItemDescription[] = _("A red gem shard.\nIt would sell for a\nvery high price."); -const u8 gNuggetItemDescription[] = _("A nugget of pure\ngold. Can be sold at\na high price."); -const u8 gHeartScaleItemDescription[] = _("A lovely scale.\nIt is coveted by\ncollectors."); -// Mail -const u8 gOrangeMailItemDescription[] = _("A ZIGZAGOON-print\nMAIL to be held by\na POKéMON."); -const u8 gHarborMailItemDescription[] = _("A WINGULL-print\nMAIL to be held by\na POKéMON."); -const u8 gGlitterMailItemDescription[] = _("A PIKACHU-print\nMAIL to be held by\na POKéMON."); -const u8 gMechMailItemDescription[] = _("A MAGNEMITE-print\nMAIL to be held by\na POKéMON."); -const u8 gWoodMailItemDescription[] = _("A SLAKOTH-print\nMAIL to be held by\na POKéMON."); -const u8 gWaveMailItemDescription[] = _("A WAILMER-print\nMAIL to be held by\na POKéMON."); -const u8 gBeadMailItemDescription[] = _("MAIL featuring a\nsketch of the\nholding POKéMON."); -const u8 gShadowMailItemDescription[] = _("A DUSKULL-print\nMAIL to be held by\na POKéMON."); -const u8 gTropicMailItemDescription[] = _("A BELLOSSOM-print\nMAIL to be held by\na POKéMON."); -const u8 gDreamMailItemDescription[] = _("MAIL featuring a\nsketch of the\nholding POKéMON."); -const u8 gFabMailItemDescription[] = _("A gorgeous-print\nMAIL to be held\nby a POKéMON."); -const u8 gRetroMailItemDescription[] = _("MAIL featuring the\ndrawings of three\nPOKéMON."); -// Berries -const u8 gCheriBerryItemDescription[] = _("A hold item that\nheals paralysis\nin battle."); -const u8 gChestoBerryItemDescription[] = _("A hold item that\nawakens POKéMON\nin battle."); -const u8 gPechaBerryItemDescription[] = _("A hold item that\nheals poisoning\nin battle."); -const u8 gRawstBerryItemDescription[] = _("A hold item that\nheals a burn in\nbattle."); -const u8 gAspearBerryItemDescription[] = _("A hold item that\ndefrosts POKéMON\nin battle."); -const u8 gLeppaBerryItemDescription[] = _("A hold item that\nrestores 10 PP in\nbattle."); -const u8 gOranBerryItemDescription[] = _("A hold item that\nrestores 10 HP in\nbattle."); -const u8 gPersimBerryItemDescription[] = _("A hold item that\nheals confusion\nin battle."); -const u8 gLumBerryItemDescription[] = _("A hold item that\nheals any status\nproblem in battle."); -const u8 gSitrusBerryItemDescription[] = _("A hold item that\nrestores 30 HP in\nbattle."); -const u8 gFigyBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse."); -const u8 gWikiBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse."); -const u8 gMagoBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse."); -const u8 gAguavBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse."); -const u8 gIapapaBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse."); -const u8 gRazzBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow RAZZ."); -const u8 gBlukBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow BLUK."); -const u8 gNanabBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow NANAB."); -const u8 gWepearBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow WEPEAR."); -const u8 gPinapBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow PINAP."); -const u8 gPomegBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase HP."); -const u8 gKelpsyBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase ATTACK."); -const u8 gQualotBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase DEFENSE."); -const u8 gHondewBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase SP. ATK."); -const u8 gGrepaBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase SP. DEF."); -const u8 gTamatoBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase SPEED."); -const u8 gCornnBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow CORNN."); -const u8 gMagostBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow MAGOST."); -const u8 gRabutaBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow RABUTA."); -const u8 gNomelBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow NOMEL."); -const u8 gSpelonBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow SPELON."); -const u8 gPamtreBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow PAMTRE."); -const u8 gWatmelBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow WATMEL."); -const u8 gDurinBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow DURIN."); -const u8 gBelueBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow BELUE."); -const u8 gLiechiBerryItemDescription[] = _("A hold item that\nraises ATTACK in\na pinch."); -const u8 gGanlonBerryItemDescription[] = _("A hold item that\nraises DEFENSE in\na pinch."); -const u8 gSalacBerryItemDescription[] = _("A hold item that\nraises SPEED in\na pinch."); -const u8 gPetayaBerryItemDescription[] = _("A hold item that\nraises SP. ATK in\na pinch."); -const u8 gApicotBerryItemDescription[] = _("A hold item that\nraises SP. DEF in\na pinch."); -const u8 gLansatBerryItemDescription[] = _("A hold item that\nups the critical-\nhit rate in a pinch."); -const u8 gStarfBerryItemDescription[] = _("A hold item that\nsharply boosts a\nstat in a pinch."); -const u8 gEnigmaBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow a mystery."); -// Hold items -const u8 gBrightPowderItemDescription[] = _("A hold item that\ncasts a glare to\nreduce accuracy."); -const u8 gWhiteHerbItemDescription[] = _("A hold item that\nrestores any\nlowered stat."); -const u8 gMachoBraceItemDescription[] = _("A hold item that\npromotes growth,\nbut reduces SPEED."); -const u8 gExpShareItemDescription[] = _("A hold item that\ngets EXP. points\nfrom battles."); -const u8 gQuickClawItemDescription[] = _("A hold item that\noccasionally allows\nthe first strike."); -const u8 gSootheBellItemDescription[] = _("A hold item that\ncalms spirits and\nfosters friendship."); -const u8 gMentalHerbItemDescription[] = _("A hold item that\nsnaps POKéMON out\nof infatuation."); -const u8 gChoiceBandItemDescription[] = _("Raises a move's\npower, but permits\nonly that move."); -const u8 gKingsRockItemDescription[] = _("A hold item that\nmay cause flinching\nwhen the foe is hit."); -const u8 gSilverPowderItemDescription[] = _("A hold item that\nraises the power of\nBUG-type moves."); -const u8 gAmuletCoinItemDescription[] = _("Doubles money in\nbattle if the\nholder takes part."); -const u8 gCleanseTagItemDescription[] = _("A hold item that\nhelps repel wild\nPOKéMON."); -const u8 gSoulDewItemDescription[] = _("Hold item: raises\nSP. ATK & SP. DEF of\nLATIOS & LATIAS."); -const u8 gDeepSeaToothItemDescription[] = _("A hold item that\nraises the SP. ATK\nof CLAMPERL."); -const u8 gDeepSeaScaleItemDescription[] = _("A hold item that\nraises the SP. DEF\nof CLAMPERL."); -const u8 gSmokeBallItemDescription[] = _("A hold item that\nassures fleeing\nfrom wild POKéMON."); -const u8 gEverstoneItemDescription[] = _("A wondrous hold\nitem that prevents\nevolution."); -const u8 gFocusBandItemDescription[] = _("A hold item that\noccasionally\nprevents fainting."); -const u8 gLuckyEggItemDescription[] = _("A hold item that\nboosts EXP. points\nearned in battle."); -const u8 gScopeLensItemDescription[] = _("A hold item that\nimproves the\ncritical-hit rate."); -const u8 gMetalCoatItemDescription[] = _("A hold item that\nraises the power of\nSTEEL-type moves."); -const u8 gLeftoversItemDescription[] = _("A hold item that\ngradually restores\nHP in battle."); -const u8 gDragonScaleItemDescription[] = _("A strange scale\nheld by DRAGON-\ntype POKéMON."); -const u8 gLightBallItemDescription[] = _("A hold item that\nraises the SP. ATK\nof PIKACHU."); -const u8 gSoftSandItemDescription[] = _("A hold item that\nraises the power of\nGROUND-type moves."); -const u8 gHardStoneItemDescription[] = _("A hold item that\nraises the power of\nROCK-type moves."); -const u8 gMiracleSeedItemDescription[] = _("A hold item that\nraises the power of\nGRASS-type moves."); -const u8 gBlackGlassesItemDescription[] = _("A hold item that\nraises the power of\nDARK-type moves."); -const u8 gBlackBeltItemDescription[] = _("A hold item that\nboosts FIGHTING-\ntype moves."); -const u8 gMagnetItemDescription[] = _("A hold item that\nboosts ELECTRIC-\ntype moves."); -const u8 gMysticWaterItemDescription[] = _("A hold item that\nraises the power of\nWATER-type moves."); -const u8 gSharpBeakItemDescription[] = _("A hold item that\nraises the power of\nFLYING-type moves."); -const u8 gPoisonBarbItemDescription[] = _("A hold item that\nraises the power of\nPOISON-type moves."); -const u8 gNeverMeltIceItemDescription[] = _("A hold item that\nraises the power of\nICE-type moves."); -const u8 gSpellTagItemDescription[] = _("A hold item that\nraises the power of\nGHOST-type moves."); -const u8 gTwistedSpoonItemDescription[] = _("A hold item that\nboosts PSYCHIC-\ntype moves."); -const u8 gCharcoalItemDescription[] = _("A hold item that\nraises the power of\nFIRE-type moves."); -const u8 gDragonFangItemDescription[] = _("A hold item that\nraises the power of\nDRAGON-type moves."); -const u8 gSilkScarfItemDescription[] = _("A hold item that\nraises the power of\nNORMAL-type moves."); -const u8 gUpGradeItemDescription[] = _("A peculiar box made\nby SILPH CO."); -const u8 gShellBellItemDescription[] = _("A hold item that\nrestores HP upon\nstriking the foe."); -const u8 gSeaIncenseItemDescription[] = _("A hold item that\nslightly boosts\nWATER-type moves."); -const u8 gLaxIncenseItemDescription[] = _("A hold item that\nslightly lowers the\nfoe's accuracy."); -const u8 gLuckyPunchItemDescription[] = _("A hold item that\nraises CHANSEY's\ncritical-hit rate."); -const u8 gMetalPowderItemDescription[] = _("A hold item that\nraises DITTO's\nDEFENSE."); -const u8 gThickClubItemDescription[] = _("A hold item that \nraises CUBONE or\nMAROWAK's ATTACK."); -const u8 gStickItemDescription[] = _("A hold item that\nraises FARFETCH'D's\ncritical-hit ratio."); -const u8 gRedScarfItemDescription[] = _("A hold item that\nraises COOL in\nCONTESTS."); -const u8 gBlueScarfItemDescription[] = _("A hold item that\nraises BEAUTY in\nCONTESTS."); -const u8 gPinkScarfItemDescription[] = _("A hold item that\nraises CUTE in\nCONTESTS."); -const u8 gGreenScarfItemDescription[] = _("A hold item that\nraises SMART in\nCONTESTS."); -const u8 gYellowScarfItemDescription[] = _("A hold item that\nraises TOUGH in\nCONTESTS."); -// Key items -const u8 gMachBikeItemDescription[] = _("A folding bicycle\nthat doubles your\nspeed or better."); -const u8 gCoinCaseItemDescription[] = _("A case that holds\nup to 9,999 COINS."); -const u8 gItemfinderItemDescription[] = _("A device that\nsignals an invisible\nitem by sound."); -const u8 gOldRodItemDescription[] = _("Use by any body of\nwater to fish for\nwild POKéMON."); -const u8 gGoodRodItemDescription[] = _("A decent fishing\nrod for catching\nwild POKéMON."); -const u8 gSuperRodItemDescription[] = _("The best fishing\nrod for catching\nwild POKéMON."); -const u8 gSSTicketItemDescription[] = _("The ticket required\nfor sailing on a\nferry."); -const u8 gContestPassItemDescription[] = _("The pass required\nfor entering\nPOKéMON CONTESTS."); -const u8 gWailmerPailItemDescription[] = _("A tool used for\nwatering BERRIES\nand plants."); -const u8 gDevonGoodsItemDescription[] = _("A package that\ncontains DEVON's\nmachine parts."); -const u8 gSootSackItemDescription[] = _("A sack used to\ngather and hold\nvolcanic ash."); -const u8 gBasementKeyItemDescription[] = _("The key for NEW\nMAUVILLE beneath\nMAUVILLE CITY."); -const u8 gAcroBikeItemDescription[] = _("A folding bicycle\ncapable of jumps\nand wheelies."); -const u8 gPokeblockCaseItemDescription[] = _("A case for holding\n{POKEBLOCK}S made with\na BERRY BLENDER."); -const u8 gLetterItemDescription[] = _("A letter to STEVEN\nfrom the PRESIDENT\nof the DEVON CORP."); -const u8 gEonTicketItemDescription[] = _("The ticket for a\nferry to a distant\nsouthern island."); -const u8 gRedOrbItemDescription[] = _("A red, glowing orb\nsaid to contain an\nancient power."); -const u8 gBlueOrbItemDescription[] = _("A blue, glowing orb\nsaid to contain an\nancient power."); -const u8 gScannerItemDescription[] = _("A device found\ninside the\nABANDONED SHIP."); -const u8 gGoGogglesItemDescription[] = _("Nifty goggles that\nprotect eyes from\ndesert sandstorms."); -const u8 gMeteoriteItemDescription[] = _("A meteorite found\nat METEOR FALLS."); -const u8 gRoom1KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP."); -const u8 gRoom2KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP."); -const u8 gRoom4KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP."); -const u8 gRoom6KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP."); -const u8 gStorageKeyItemDescription[] = _("The key to the\nstorage inside the\nABANDONED SHIP."); -const u8 gRootFossilItemDescription[] = _("A fossil of an\nancient, seafloor-\ndwelling POKéMON."); -const u8 gClawFossilItemDescription[] = _("A fossil of an\nancient, seafloor-\ndwelling POKéMON."); -const u8 gDevonScopeItemDescription[] = _("A device by DEVON\nthat signals any\nunseeable POKéMON."); -// TMs/HMs -const u8 gTM01ItemDescription[] = _("Powerful, but makes\nthe user flinch if\nhit by the foe."); -const u8 gTM02ItemDescription[] = _("Hooks and slashes\nthe foe with long,\nsharp claws."); -const u8 gTM03ItemDescription[] = _("Generates an\nultrasonic wave\nthat may confuse."); -const u8 gTM04ItemDescription[] = _("Raises SP. ATK and\nSP. DEF by focusing\nthe mind."); -const u8 gTM05ItemDescription[] = _("A savage roar that\nmakes the foe flee \nto end the battle."); -const u8 gTM06ItemDescription[] = _("Poisons the foe\nwith a toxin that\ngradually worsens."); -const u8 gTM07ItemDescription[] = _("Creates a hailstorm\nthat damages all\ntypes except ICE."); -const u8 gTM08ItemDescription[] = _("Bulks up the body\nto boost both\nATTACK & DEFENSE."); -const u8 gTM09ItemDescription[] = _("Shoots 2 to 5 seeds\nin a row to strike\nthe foe."); -const u8 gTM10ItemDescription[] = _("The attack power\nvaries among\ndifferent POKéMON."); -const u8 gTM11ItemDescription[] = _("Raises the power of\nFIRE-type moves\nfor 5 turns."); -const u8 gTM12ItemDescription[] = _("Enrages the foe so\nit can only use\nattack moves."); -const u8 gTM13ItemDescription[] = _("Fires an icy cold\nbeam that may\nfreeze the foe."); -const u8 gTM14ItemDescription[] = _("A brutal snow-and-\nwind attack that\nmay freeze the foe."); -const u8 gTM15ItemDescription[] = _("Powerful, but needs\nrecharging the\nnext turn."); -const u8 gTM16ItemDescription[] = _("Creates a wall of\nlight that lowers\nSP. ATK damage."); -const u8 gTM17ItemDescription[] = _("Negates all damage,\nbut may fail if used\nin succession."); -const u8 gTM18ItemDescription[] = _("Raises the power of\nWATER-type moves\nfor 5 turns."); -const u8 gTM19ItemDescription[] = _("Recovers half the\nHP of the damage \nthis move inflicts."); -const u8 gTM20ItemDescription[] = _("Prevents status\nabnormality with a\nmystical power."); -const u8 gTM21ItemDescription[] = _("The less the user\nlikes you, the more\npowerful this move."); -const u8 gTM22ItemDescription[] = _("Absorbs sunlight in\nthe 1st turn, then\nattacks next turn."); -const u8 gTM23ItemDescription[] = _("Slams the foe with\na hard tail. It may\nlower DEFENSE."); -const u8 gTM24ItemDescription[] = _("A powerful electric\nattack that may\ncause paralysis."); -const u8 gTM25ItemDescription[] = _("Strikes the foe\nwith a thunderbolt.\nIt may paralyze."); -const u8 gTM26ItemDescription[] = _("Causes a quake\nthat has no effect\non flying foes."); -const u8 gTM27ItemDescription[] = _("The more the user\nlikes you, the more\npowerful this move."); -const u8 gTM28ItemDescription[] = _("Digs underground\nthe 1st turn, then\nstrikes next turn."); -const u8 gTM29ItemDescription[] = _("A powerful psychic\nattack that may\nlower SP. DEF."); -const u8 gTM30ItemDescription[] = _("Hurls a dark lump\nat the foe. It may\nlower SP. DEF."); -const u8 gTM31ItemDescription[] = _("Destroys barriers\nlike LIGHT SCREEN\nand causes damage."); -const u8 gTM32ItemDescription[] = _("Creates illusory\ncopies to enhance\nelusiveness."); -const u8 gTM33ItemDescription[] = _("Creates a wall of\nlight that weakens\nphysical attacks."); -const u8 gTM34ItemDescription[] = _("Zaps the foe with a\njolt of electricity\nthat never misses."); -const u8 gTM35ItemDescription[] = _("Looses a stream of\nfire that may burn\nthe foe."); -const u8 gTM36ItemDescription[] = _("Hurls sludge at the\nfoe. It may poison\nthe foe."); -const u8 gTM37ItemDescription[] = _("Causes a sandstorm\nthat hits the foe\nover several turns."); -const u8 gTM38ItemDescription[] = _("A powerful fire\nattack that may\nburn the foe."); -const u8 gTM39ItemDescription[] = _("Stops the foe from\nmoving with rocks.\nMay lower SPEED."); -const u8 gTM40ItemDescription[] = _("An extremely fast\nattack that can't\nbe avoided."); -const u8 gTM41ItemDescription[] = _("Prevents the foe\nfrom using the same\nmove in a row."); -const u8 gTM42ItemDescription[] = _("Raises ATTACK when\npoisoned, burned,\nor paralyzed."); -const u8 gTM43ItemDescription[] = _("Adds an effect to\nattack depending\non the location."); -const u8 gTM44ItemDescription[] = _("The user sleeps for\n2 turns to restore\nhealth and status."); -const u8 gTM45ItemDescription[] = _("Makes it tough to\nattack a foe of the\nopposite gender."); -const u8 gTM46ItemDescription[] = _("While attacking,\nit may steal the\nfoe's held item."); -const u8 gTM47ItemDescription[] = _("Spreads hard-\nedged wings and\nslams into the foe."); -const u8 gTM48ItemDescription[] = _("Switches abilities\nwith the foe on the\nturn this is used."); -const u8 gTM49ItemDescription[] = _("Steals the effects\nof the move the foe\nis trying to use."); -const u8 gTM50ItemDescription[] = _("Enables full-power\nattack, but sharply\nlowers SP. ATK."); +static const u8 sDummyDesc[] = _( + "?????"); + +// Pokeballs +static const u8 sMasterBallDesc[] = _( + "The best BALL that\n" + "catches a POKéMON\n" + "without fail."); + +static const u8 sUltraBallDesc[] = _( + "A better BALL with\n" + "a higher catch rate\n" + "than a GREAT BALL."); + +static const u8 sGreatBallDesc[] = _( + "A good BALL with a\n" + "higher catch rate\n" + "than a POKé BALL."); + +static const u8 sPokeBallDesc[] = _( + "A tool used for\n" + "catching wild\n" + "POKéMON."); + +static const u8 sSafariBallDesc[] = _( + "A special BALL that\n" + "is used only in the\n" + "SAFARI ZONE."); + +static const u8 sNetBallDesc[] = _( + "A BALL that works\n" + "well on WATER- and\n" + "BUG-type POKéMON."); + +static const u8 sDiveBallDesc[] = _( + "A BALL that works\n" + "better on POKéMON\n" + "on the ocean floor."); + +static const u8 sNestBallDesc[] = _( + "A BALL that works\n" + "better on weaker\n" + "POKéMON."); + +static const u8 sRepeatBallDesc[] = _( + "A BALL that works\n" + "better on POKéMON\n" + "caught before."); + +static const u8 sTimerBallDesc[] = _( + "A BALL that gains\n" + "power in battles\n" + "taking many turns."); + +static const u8 sLuxuryBallDesc[] = _( + "A cozy BALL that\n" + "makes POKéMON\n" + "more friendly."); + +static const u8 sPremierBallDesc[] = _( + "A rare BALL made\n" + "in commemoration\n" + "of some event."); + +// Medicine +static const u8 sPotionDesc[] = _( + "Restores the HP of\n" + "a POKéMON by\n" + "20 points."); + +static const u8 sAntidoteDesc[] = _( + "Heals a poisoned\n" + "POKéMON."); + +static const u8 sBurnHealDesc[] = _( + "Heals POKéMON\n" + "of a burn."); + +static const u8 sIceHealDesc[] = _( + "Defrosts a frozen\n" + "POKéMON."); + +static const u8 sAwakeningDesc[] = _( + "Awakens a sleeping\n" + "POKéMON."); + +static const u8 sParalyzeHealDesc[] = _( + "Heals a paralyzed\n" + "POKéMON."); + +static const u8 sFullRestoreDesc[] = _( + "Fully restores the\n" + "HP and status of a\n" + "POKéMON."); + +static const u8 sMaxPotionDesc[] = _( + "Fully restores the\n" + "HP of a POKéMON."); + +static const u8 sHyperPotionDesc[] = _( + "Restores the HP of\n" + "a POKéMON by\n" + "200 points."); + +static const u8 sSuperPotionDesc[] = _( + "Restores the HP of\n" + "a POKéMON by\n" + "50 points."); + +static const u8 sFullHealDesc[] = _( + "Heals all the\n" + "status problems of\n" + "one POKéMON."); + +static const u8 sReviveDesc[] = _( + "Revives a fainted\n" + "POKéMON with half\n" + "its HP."); + +static const u8 sMaxReviveDesc[] = _( + "Revives a fainted\n" + "POKéMON with all\n" + "its HP."); + +static const u8 sFreshWaterDesc[] = _( + "A mineral water\n" + "that restores HP\n" + "by 50 points."); + +static const u8 sSodaPopDesc[] = _( + "A fizzy soda drink\n" + "that restores HP\n" + "by 60 points."); + +static const u8 sLemonadeDesc[] = _( + "A very sweet drink\n" + "that restores HP\n" + "by 80 points."); + +static const u8 sMoomooMilkDesc[] = _( + "A nutritious milk\n" + "that restores HP\n" + "by 100 points."); + +static const u8 sEnergyPowderDesc[] = _( + "A bitter powder\n" + "that restores HP\n" + "by 50 points."); + +static const u8 sEnergyRootDesc[] = _( + "A bitter root\n" + "that restores HP\n" + "by 200 points."); + +static const u8 sHealPowderDesc[] = _( + "A bitter powder\n" + "that heals all\n" + "status problems."); + +static const u8 sRevivalHerbDesc[] = _( + "A very bitter herb\n" + "that revives a\n" + "fainted POKéMON."); + +static const u8 sEtherDesc[] = _( + "Restores the PP\n" + "of a selected move\n" + "by 10."); + +static const u8 sMaxEtherDesc[] = _( + "Fully restores the\n" + "PP of a selected\n" + "move."); + +static const u8 sElixirDesc[] = _( + "Restores the PP\n" + "of all moves by 10."); + +static const u8 sMaxElixirDesc[] = _( + "Fully restores the\n" + "PP of a POKéMON's\n" + "moves."); + +static const u8 sLavaCookieDesc[] = _( + "A local specialty\n" + "that heals all\n" + "status problems."); + +static const u8 sBlueFluteDesc[] = _( + "A glass flute that\n" + "awakens sleeping\n" + "POKéMON."); + +static const u8 sYellowFluteDesc[] = _( + "A glass flute that\n" + "snaps POKéMON\n" + "out of confusion."); + +static const u8 sRedFluteDesc[] = _( + "A glass flute that\n" + "snaps POKéMON\n" + "out of attraction."); + +static const u8 sBlackFluteDesc[] = _( + "A glass flute that\n" + "keeps away wild\n" + "POKéMON."); + +static const u8 sWhiteFluteDesc[] = _( + "A glass flute that\n" + "lures wild POKéMON."); + +static const u8 sBerryJuiceDesc[] = _( + "A 100% pure juice\n" + "that restores HP\n" + "by 20 points."); + +static const u8 sSacredAshDesc[] = _( + "Fully revives and\n" + "restores all\n" + "fainted POKéMON."); + +// Collectibles +static const u8 sShoalSaltDesc[] = _( + "Salt obtained from\n" + "deep inside the\n" + "SHOAL CAVE."); + +static const u8 sShoalShellDesc[] = _( + "A seashell found\n" + "deep inside the\n" + "SHOAL CAVE."); + +static const u8 sRedShardDesc[] = _( + "A shard from an\n" + "ancient item. Can\n" + "be sold cheaply."); + +static const u8 sBlueShardDesc[] = _( + "A shard from an\n" + "ancient item. Can\n" + "be sold cheaply."); + +static const u8 sYellowShardDesc[] = _( + "A shard from an\n" + "ancient item. Can\n" + "be sold cheaply."); + +static const u8 sGreenShardDesc[] = _( + "A shard from an\n" + "ancient item. Can\n" + "be sold cheaply."); + +// Vitamins +static const u8 sHPUpDesc[] = _( + "Raises the base HP\n" + "of one POKéMON."); + +static const u8 sProteinDesc[] = _( + "Raises the base\n" + "ATTACK stat of one\n" + "POKéMON."); + +static const u8 sIronDesc[] = _( + "Raises the base\n" + "DEFENSE stat of\n" + "one POKéMON."); + +static const u8 sCarbosDesc[] = _( + "Raises the base\n" + "SPEED stat of one\n" + "POKéMON."); + +static const u8 sCalciumDesc[] = _( + "Raises the base\n" + "SP. ATK stat of one\n" + "POKéMON."); + +static const u8 sRareCandyDesc[] = _( + "Raises the level\n" + "of a POKéMON by\n" + "one."); + +static const u8 sPPUpDesc[] = _( + "Raises the maximum\n" + "PP of a selected\n" + "move."); + +static const u8 sZincDesc[] = _( + "Raises the base\n" + "SP. DEF stat of one\n" + "POKéMON."); + +static const u8 sPPMaxDesc[] = _( + "Raises the PP of a\n" + "move to its maximum\n" + "points."); + +// Battle items +static const u8 sGuardSpecDesc[] = _( + "Prevents stat\n" + "reduction when\n" + "used in battle."); + +static const u8 sDireHitDesc[] = _( + "Raises the\n" + "critical-hit ratio\n" + "during one battle."); + +static const u8 sXAttackDesc[] = _( + "Raises the stat\n" + "ATTACK during one\n" + "battle."); + +static const u8 sXDefendDesc[] = _( + "Raises the stat\n" + "DEFENSE during one\n" + "battle."); + +static const u8 sXSpeedDesc[] = _( + "Raises the stat\n" + "SPEED during one\n" + "battle."); + +static const u8 sXAccuracyDesc[] = _( + "Raises accuracy\n" + "of attack moves\n" + "during one battle."); + +static const u8 sXSpecialDesc[] = _( + "Raises the stat\n" + "SP. ATK during one\n" + "battle."); + +static const u8 sPokeDollDesc[] = _( + "Use to flee from\n" + "any battle with\n" + "a wild POKéMON."); + +static const u8 sFluffyTailDesc[] = _( + "Use to flee from\n" + "any battle with\n" + "a wild POKéMON."); + +// Field items +static const u8 sSuperRepelDesc[] = _( + "Repels weak wild\n" + "POKéMON for 200\n" + "steps."); + +static const u8 sMaxRepelDesc[] = _( + "Repels weak wild\n" + "POKéMON for 250\n" + "steps."); + +static const u8 sEscapeRopeDesc[] = _( + "Use to escape\n" + "instantly from a\n" + "cave or a dungeon."); + +static const u8 sRepelDesc[] = _( + "Repels weak wild\n" + "POKéMON for 100\n" + "steps."); + +// Evolution stones +static const u8 sSunStoneDesc[] = _( + "Makes certain\n" + "species of POKéMON\n" + "evolve."); + +static const u8 sMoonStoneDesc[] = _( + "Makes certain\n" + "species of POKéMON\n" + "evolve."); + +static const u8 sFireStoneDesc[] = _( + "Makes certain\n" + "species of POKéMON\n" + "evolve."); + +static const u8 sThunderStoneDesc[] = _( + "Makes certain\n" + "species of POKéMON\n" + "evolve."); + +static const u8 sWaterStoneDesc[] = _( + "Makes certain\n" + "species of POKéMON\n" + "evolve."); + +static const u8 sLeafStoneDesc[] = _( + "Makes certain\n" + "species of POKéMON\n" + "evolve."); + +// Valuable items +static const u8 sTinyMushroomDesc[] = _( + "A plain mushroom\n" + "that would sell\n" + "at a cheap price."); + +static const u8 sBigMushroomDesc[] = _( + "A rare mushroom\n" + "that would sell at a\n" + "high price."); + +static const u8 sPearlDesc[] = _( + "A pretty pearl\n" + "that would sell at a\n" + "cheap price."); + +static const u8 sBigPearlDesc[] = _( + "A lovely large pearl\n" + "that would sell at a\n" + "high price."); + +static const u8 sStardustDesc[] = _( + "Beautiful red sand.\n" + "Can be sold at a\n" + "high price."); + +static const u8 sStarPieceDesc[] = _( + "A red gem shard.\n" + "It would sell for a\n" + "very high price."); + +static const u8 sNuggetDesc[] = _( + "A nugget of pure\n" + "gold. Can be sold at\n" + "a high price."); + +static const u8 sHeartScaleDesc[] = _( + "A lovely scale.\n" + "It is coveted by\n" + "collectors."); + +// Mail +static const u8 sOrangeMailDesc[] = _( + "A ZIGZAGOON-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sHarborMailDesc[] = _( + "A WINGULL-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sGlitterMailDesc[] = _( + "A PIKACHU-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sMechMailDesc[] = _( + "A MAGNEMITE-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sWoodMailDesc[] = _( + "A SLAKOTH-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sWaveMailDesc[] = _( + "A WAILMER-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sBeadMailDesc[] = _( + "MAIL featuring a\n" + "sketch of the\n" + "holding POKéMON."); + +static const u8 sShadowMailDesc[] = _( + "A DUSKULL-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sTropicMailDesc[] = _( + "A BELLOSSOM-print\n" + "MAIL to be held by\n" + "a POKéMON."); + +static const u8 sDreamMailDesc[] = _( + "MAIL featuring a\n" + "sketch of the\n" + "holding POKéMON."); + +static const u8 sFabMailDesc[] = _( + "A gorgeous-print\n" + "MAIL to be held\n" + "by a POKéMON."); + +static const u8 sRetroMailDesc[] = _( + "MAIL featuring the\n" + "drawings of three\n" + "POKéMON."); + +// Berries +static const u8 sCheriBerryDesc[] = _( + "A hold item that\n" + "heals paralysis\n" + "in battle."); + +static const u8 sChestoBerryDesc[] = _( + "A hold item that\n" + "awakens POKéMON\n" + "in battle."); + +static const u8 sPechaBerryDesc[] = _( + "A hold item that\n" + "heals poisoning\n" + "in battle."); + +static const u8 sRawstBerryDesc[] = _( + "A hold item that\n" + "heals a burn in\n" + "battle."); + +static const u8 sAspearBerryDesc[] = _( + "A hold item that\n" + "defrosts POKéMON\n" + "in battle."); + +static const u8 sLeppaBerryDesc[] = _( + "A hold item that\n" + "restores 10 PP in\n" + "battle."); + +static const u8 sOranBerryDesc[] = _( + "A hold item that\n" + "restores 10 HP in\n" + "battle."); + +static const u8 sPersimBerryDesc[] = _( + "A hold item that\n" + "heals confusion\n" + "in battle."); + +static const u8 sLumBerryDesc[] = _( + "A hold item that\n" + "heals any status\n" + "problem in battle."); + +static const u8 sSitrusBerryDesc[] = _( + "A hold item that\n" + "restores 30 HP in\n" + "battle."); + +static const u8 sFigyBerryDesc[] = _( + "A hold item that\n" + "restores HP but\n" + "may confuse."); + +static const u8 sWikiBerryDesc[] = _( + "A hold item that\n" + "restores HP but\n" + "may confuse."); + +static const u8 sMagoBerryDesc[] = _( + "A hold item that\n" + "restores HP but\n" + "may confuse."); + +static const u8 sAguavBerryDesc[] = _( + "A hold item that\n" + "restores HP but\n" + "may confuse."); + +static const u8 sIapapaBerryDesc[] = _( + "A hold item that\n" + "restores HP but\n" + "may confuse."); + +static const u8 sRazzBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow RAZZ."); + +static const u8 sBlukBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow BLUK."); + +static const u8 sNanabBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow NANAB."); + +static const u8 sWepearBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow WEPEAR."); + +static const u8 sPinapBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow PINAP."); + +static const u8 sPomegBerryDesc[] = _( + "Makes a POKéMON\n" + "friendly but lowers\n" + "base HP."); + +static const u8 sKelpsyBerryDesc[] = _( + "Makes a POKéMON\n" + "friendly but lowers\n" + "base ATTACK."); + +static const u8 sQualotBerryDesc[] = _( + "Makes a POKéMON\n" + "friendly but lowers\n" + "base DEFENSE."); + +static const u8 sHondewBerryDesc[] = _( + "Makes a POKéMON\n" + "friendly but lowers\n" + "base SP. ATK."); + +static const u8 sGrepaBerryDesc[] = _( + "Makes a POKéMON\n" + "friendly but lowers\n" + "base SP. DEF."); + +static const u8 sTamatoBerryDesc[] = _( + "Makes a POKéMON\n" + "friendly but lowers\n" + "base SPEED."); + +static const u8 sCornnBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow CORNN."); + +static const u8 sMagostBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow MAGOST."); + +static const u8 sRabutaBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow RABUTA."); + +static const u8 sNomelBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow NOMEL."); + +static const u8 sSpelonBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow SPELON."); + +static const u8 sPamtreBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow PAMTRE."); + +static const u8 sWatmelBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow WATMEL."); + +static const u8 sDurinBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow DURIN."); + +static const u8 sBelueBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow BELUE."); + +static const u8 sLiechiBerryDesc[] = _( + "A hold item that\n" + "raises ATTACK in\n" + "a pinch."); + +static const u8 sGanlonBerryDesc[] = _( + "A hold item that\n" + "raises DEFENSE in\n" + "a pinch."); + +static const u8 sSalacBerryDesc[] = _( + "A hold item that\n" + "raises SPEED in\n" + "a pinch."); + +static const u8 sPetayaBerryDesc[] = _( + "A hold item that\n" + "raises SP. ATK in\n" + "a pinch."); + +static const u8 sApicotBerryDesc[] = _( + "A hold item that\n" + "raises SP. DEF in\n" + "a pinch."); + +static const u8 sLansatBerryDesc[] = _( + "A hold item that\n" + "ups the critical-\n" + "hit rate in a pinch."); + +static const u8 sStarfBerryDesc[] = _( + "A hold item that\n" + "sharply boosts a\n" + "stat in a pinch."); + +static const u8 sEnigmaBerryDesc[] = _( + "{POKEBLOCK} ingredient.\n" + "Plant in loamy soil\n" + "to grow a mystery."); + +// Hold items +static const u8 sBrightPowderDesc[] = _( + "A hold item that\n" + "casts a glare to\n" + "reduce accuracy."); + +static const u8 sWhiteHerbDesc[] = _( + "A hold item that\n" + "restores any\n" + "lowered stat."); + +static const u8 sMachoBraceDesc[] = _( + "A hold item that\n" + "promotes growth,\n" + "but reduces SPEED."); + +static const u8 sExpShareDesc[] = _( + "A hold item that\n" + "gets EXP. points\n" + "from battles."); + +static const u8 sQuickClawDesc[] = _( + "A hold item that\n" + "occasionally allows\n" + "the first strike."); + +static const u8 sSootheBellDesc[] = _( + "A hold item that\n" + "calms spirits and\n" + "fosters friendship."); + +static const u8 sMentalHerbDesc[] = _( + "A hold item that\n" + "snaps POKéMON out\n" + "of infatuation."); + +static const u8 sChoiceBandDesc[] = _( + "Raises a move's\n" + "power, but permits\n" + "only that move."); + +static const u8 sKingsRockDesc[] = _( + "A hold item that\n" + "may cause flinching\n" + "when the foe is hit."); + +static const u8 sSilverPowderDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "BUG-type moves."); + +static const u8 sAmuletCoinDesc[] = _( + "Doubles money in\n" + "battle if the\n" + "holder takes part."); + +static const u8 sCleanseTagDesc[] = _( + "A hold item that\n" + "helps repel wild\n" + "POKéMON."); + +static const u8 sSoulDewDesc[] = _( + "Hold item: raises\n" + "SP. ATK & SP. DEF of\n" + "LATIOS & LATIAS."); + +static const u8 sDeepSeaToothDesc[] = _( + "A hold item that\n" + "raises the SP. ATK\n" + "of CLAMPERL."); + +static const u8 sDeepSeaScaleDesc[] = _( + "A hold item that\n" + "raises the SP. DEF\n" + "of CLAMPERL."); + +static const u8 sSmokeBallDesc[] = _( + "A hold item that\n" + "assures fleeing\n" + "from wild POKéMON."); + +static const u8 sEverstoneDesc[] = _( + "A wondrous hold\n" + "item that prevents\n" + "evolution."); + +static const u8 sFocusBandDesc[] = _( + "A hold item that\n" + "occasionally\n" + "prevents fainting."); + +static const u8 sLuckyEggDesc[] = _( + "A hold item that\n" + "boosts EXP. points\n" + "earned in battle."); + +static const u8 sScopeLensDesc[] = _( + "A hold item that\n" + "improves the\n" + "critical-hit rate."); + +static const u8 sMetalCoatDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "STEEL-type moves."); + +static const u8 sLeftoversDesc[] = _( + "A hold item that\n" + "gradually restores\n" + "HP in battle."); + +static const u8 sDragonScaleDesc[] = _( + "A strange scale\n" + "held by DRAGON-\n" + "type POKéMON."); + +static const u8 sLightBallDesc[] = _( + "A hold item that\n" + "raises the SP. ATK\n" + "of PIKACHU."); + +static const u8 sSoftSandDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "GROUND-type moves."); + +static const u8 sHardStoneDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "ROCK-type moves."); + +static const u8 sMiracleSeedDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "GRASS-type moves."); + +static const u8 sBlackGlassesDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "DARK-type moves."); + +static const u8 sBlackBeltDesc[] = _( + "A hold item that\n" + "boosts FIGHTING-\n" + "type moves."); + +static const u8 sMagnetDesc[] = _( + "A hold item that\n" + "boosts ELECTRIC-\n" + "type moves."); + +static const u8 sMysticWaterDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "WATER-type moves."); + +static const u8 sSharpBeakDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "FLYING-type moves."); + +static const u8 sPoisonBarbDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "POISON-type moves."); + +static const u8 sNeverMeltIceDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "ICE-type moves."); + +static const u8 sSpellTagDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "GHOST-type moves."); + +static const u8 sTwistedSpoonDesc[] = _( + "A hold item that\n" + "boosts PSYCHIC-\n" + "type moves."); + +static const u8 sCharcoalDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "FIRE-type moves."); + +static const u8 sDragonFangDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "DRAGON-type moves."); + +static const u8 sSilkScarfDesc[] = _( + "A hold item that\n" + "raises the power of\n" + "NORMAL-type moves."); + +static const u8 sUpGradeDesc[] = _( + "A peculiar box made\n" + "by SILPH CO."); + +static const u8 sShellBellDesc[] = _( + "A hold item that\n" + "restores HP upon\n" + "striking the foe."); + +static const u8 sSeaIncenseDesc[] = _( + "A hold item that\n" + "slightly boosts\n" + "WATER-type moves."); + +static const u8 sLaxIncenseDesc[] = _( + "A hold item that\n" + "slightly lowers the\n" + "foe's accuracy."); + +static const u8 sLuckyPunchDesc[] = _( + "A hold item that\n" + "raises CHANSEY's\n" + "critical-hit rate."); + +static const u8 sMetalPowderDesc[] = _( + "A hold item that\n" + "raises DITTO's\n" + "DEFENSE."); + +static const u8 sThickClubDesc[] = _( + "A hold item that \n" + "raises CUBONE or\n" + "MAROWAK's ATTACK."); + +static const u8 sStickDesc[] = _( + "A hold item that\n" + "raises FARFETCH'D's\n" + "critical-hit ratio."); + +static const u8 sRedScarfDesc[] = _( + "A hold item that\n" + "raises COOL in\n" + "CONTESTS."); + +static const u8 sBlueScarfDesc[] = _( + "A hold item that\n" + "raises BEAUTY in\n" + "CONTESTS."); + +static const u8 sPinkScarfDesc[] = _( + "A hold item that\n" + "raises CUTE in\n" + "CONTESTS."); + +static const u8 sGreenScarfDesc[] = _( + "A hold item that\n" + "raises SMART in\n" + "CONTESTS."); + +static const u8 sYellowScarfDesc[] = _( + "A hold item that\n" + "raises TOUGH in\n" + "CONTESTS."); + +// Key items +static const u8 sMachBikeDesc[] = _( + "A folding bicycle\n" + "that doubles your\n" + "speed or better."); + +static const u8 sCoinCaseDesc[] = _( + "A case that holds\n" + "up to 9,999 COINS."); + +static const u8 sItemfinderDesc[] = _( + "A device that\n" + "signals an invisible\n" + "item by sound."); + +static const u8 sOldRodDesc[] = _( + "Use by any body of\n" + "water to fish for\n" + "wild POKéMON."); + +static const u8 sGoodRodDesc[] = _( + "A decent fishing\n" + "rod for catching\n" + "wild POKéMON."); + +static const u8 sSuperRodDesc[] = _( + "The best fishing\n" + "rod for catching\n" + "wild POKéMON."); + +static const u8 sSSTicketDesc[] = _( + "The ticket required\n" + "for sailing on a\n" + "ferry."); + +static const u8 sContestPassDesc[] = _( + "The pass required\n" + "for entering\n" + "POKéMON CONTESTS."); + +static const u8 sWailmerPailDesc[] = _( + "A tool used for\n" + "watering BERRIES\n" + "and plants."); + +static const u8 sDevonGoodsDesc[] = _( + "A package that\n" + "contains DEVON's\n" + "machine parts."); + +static const u8 sSootSackDesc[] = _( + "A sack used to\n" + "gather and hold\n" + "volcanic ash."); + +static const u8 sBasementKeyDesc[] = _( + "The key for NEW\n" + "MAUVILLE beneath\n" + "MAUVILLE CITY."); + +static const u8 sAcroBikeDesc[] = _( + "A folding bicycle\n" + "capable of jumps\n" + "and wheelies."); + +static const u8 sPokeblockCaseDesc[] = _( + "A case for holding\n" + "{POKEBLOCK}S made with\n" + "a BERRY BLENDER."); + +static const u8 sLetterDesc[] = _( + "A letter to STEVEN\n" + "from the PRESIDENT\n" + "of the DEVON CORP."); + +static const u8 sEonTicketDesc[] = _( + "The ticket for a\n" + "ferry to a distant\n" + "southern island."); + +static const u8 sRedOrbDesc[] = _( + "A red, glowing orb\n" + "said to contain an\n" + "ancient power."); + +static const u8 sBlueOrbDesc[] = _( + "A blue, glowing orb\n" + "said to contain an\n" + "ancient power."); + +static const u8 sScannerDesc[] = _( + "A device found\n" + "inside the\n" + "ABANDONED SHIP."); + +static const u8 sGoGogglesDesc[] = _( + "Nifty goggles that\n" + "protect eyes from\n" + "desert sandstorms."); + +static const u8 sMeteoriteDesc[] = _( + "A meteorite found\n" + "at METEOR FALLS."); + +static const u8 sRoom1KeyDesc[] = _( + "A key that opens a\n" + "door inside the\n" + "ABANDONED SHIP."); + +static const u8 sRoom2KeyDesc[] = _( + "A key that opens a\n" + "door inside the\n" + "ABANDONED SHIP."); + +static const u8 sRoom4KeyDesc[] = _( + "A key that opens a\n" + "door inside the\n" + "ABANDONED SHIP."); + +static const u8 sRoom6KeyDesc[] = _( + "A key that opens a\n" + "door inside the\n" + "ABANDONED SHIP."); + +static const u8 sStorageKeyDesc[] = _( + "The key to the\n" + "storage inside the\n" + "ABANDONED SHIP."); + +static const u8 sRootFossilDesc[] = _( + "A fossil of an\n" + "ancient, seafloor-\n" + "dwelling POKéMON."); + +static const u8 sClawFossilDesc[] = _( + "A fossil of an\n" + "ancient, seafloor-\n" + "dwelling POKéMON."); + +static const u8 sDevonScopeDesc[] = _( + "A device by DEVON\n" + "that signals any\n" + "unseeable POKéMON."); + +// TMs/HMs +static const u8 sTM01Desc[] = _( + "Powerful, but makes\n" + "the user flinch if\n" + "hit by the foe."); + +static const u8 sTM02Desc[] = _( + "Hooks and slashes\n" + "the foe with long,\n" + "sharp claws."); + +static const u8 sTM03Desc[] = _( + "Generates an\n" + "ultrasonic wave\n" + "that may confuse."); + +static const u8 sTM04Desc[] = _( + "Raises SP. ATK and\n" + "SP. DEF by focusing\n" + "the mind."); + +static const u8 sTM05Desc[] = _( + "A savage roar that\n" + "makes the foe flee \n" + "to end the battle."); + +static const u8 sTM06Desc[] = _( + "Poisons the foe\n" + "with a toxin that\n" + "gradually worsens."); + +static const u8 sTM07Desc[] = _( + "Creates a hailstorm\n" + "that damages all\n" + "types except ICE."); + +static const u8 sTM08Desc[] = _( + "Bulks up the body\n" + "to boost both\n" + "ATTACK & DEFENSE."); + +static const u8 sTM09Desc[] = _( + "Shoots 2 to 5 seeds\n" + "in a row to strike\n" + "the foe."); + +static const u8 sTM10Desc[] = _( + "The attack power\n" + "varies among\n" + "different POKéMON."); + +static const u8 sTM11Desc[] = _( + "Raises the power of\n" + "FIRE-type moves\n" + "for 5 turns."); + +static const u8 sTM12Desc[] = _( + "Enrages the foe so\n" + "it can only use\n" + "attack moves."); + +static const u8 sTM13Desc[] = _( + "Fires an icy cold\n" + "beam that may\n" + "freeze the foe."); + +static const u8 sTM14Desc[] = _( + "A brutal snow-and-\n" + "wind attack that\n" + "may freeze the foe."); + +static const u8 sTM15Desc[] = _( + "Powerful, but needs\n" + "recharging the\n" + "next turn."); + +static const u8 sTM16Desc[] = _( + "Creates a wall of\n" + "light that lowers\n" + "SP. ATK damage."); + +static const u8 sTM17Desc[] = _( + "Negates all damage,\n" + "but may fail if used\n" + "in succession."); + +static const u8 sTM18Desc[] = _( + "Raises the power of\n" + "WATER-type moves\n" + "for 5 turns."); + +static const u8 sTM19Desc[] = _( + "Recovers half the\n" + "HP of the damage \n" + "this move inflicts."); + +static const u8 sTM20Desc[] = _( + "Prevents status\n" + "abnormality with a\n" + "mystical power."); + +static const u8 sTM21Desc[] = _( + "The less the user\n" + "likes you, the more\n" + "powerful this move."); + +static const u8 sTM22Desc[] = _( + "Absorbs sunlight in\n" + "the 1st turn, then\n" + "attacks next turn."); + +static const u8 sTM23Desc[] = _( + "Slams the foe with\n" + "a hard tail. It may\n" + "lower DEFENSE."); + +static const u8 sTM24Desc[] = _( + "A powerful electric\n" + "attack that may\n" + "cause paralysis."); + +static const u8 sTM25Desc[] = _( + "Strikes the foe\n" + "with a thunderbolt.\n" + "It may paralyze."); + +static const u8 sTM26Desc[] = _( + "Causes a quake\n" + "that has no effect\n" + "on flying foes."); + +static const u8 sTM27Desc[] = _( + "The more the user\n" + "likes you, the more\n" + "powerful this move."); + +static const u8 sTM28Desc[] = _( + "Digs underground\n" + "the 1st turn, then\n" + "strikes next turn."); + +static const u8 sTM29Desc[] = _( + "A powerful psychic\n" + "attack that may\n" + "lower SP. DEF."); + +static const u8 sTM30Desc[] = _( + "Hurls a dark lump\n" + "at the foe. It may\n" + "lower SP. DEF."); + +static const u8 sTM31Desc[] = _( + "Destroys barriers\n" + "like LIGHT SCREEN\n" + "and causes damage."); + +static const u8 sTM32Desc[] = _( + "Creates illusory\n" + "copies to enhance\n" + "elusiveness."); + +static const u8 sTM33Desc[] = _( + "Creates a wall of\n" + "light that weakens\n" + "physical attacks."); + +static const u8 sTM34Desc[] = _( + "Zaps the foe with a\n" + "jolt of electricity\n" + "that never misses."); + +static const u8 sTM35Desc[] = _( + "Looses a stream of\n" + "fire that may burn\n" + "the foe."); + +static const u8 sTM36Desc[] = _( + "Hurls sludge at the\n" + "foe. It may poison\n" + "the foe."); + +static const u8 sTM37Desc[] = _( + "Causes a sandstorm\n" + "that hits the foe\n" + "over several turns."); + +static const u8 sTM38Desc[] = _( + "A powerful fire\n" + "attack that may\n" + "burn the foe."); + +static const u8 sTM39Desc[] = _( + "Stops the foe from\n" + "moving with rocks.\n" + "May lower SPEED."); + +static const u8 sTM40Desc[] = _( + "An extremely fast\n" + "attack that can't\n" + "be avoided."); + +static const u8 sTM41Desc[] = _( + "Prevents the foe\n" + "from using the same\n" + "move in a row."); + +static const u8 sTM42Desc[] = _( + "Raises ATTACK when\n" + "poisoned, burned,\n" + "or paralyzed."); + +static const u8 sTM43Desc[] = _( + "Adds an effect to\n" + "attack depending\n" + "on the location."); + +static const u8 sTM44Desc[] = _( + "The user sleeps for\n" + "2 turns to restore\n" + "health and status."); + +static const u8 sTM45Desc[] = _( + "Makes it tough to\n" + "attack a foe of the\n" + "opposite gender."); + +static const u8 sTM46Desc[] = _( + "While attacking,\n" + "it may steal the\n" + "foe's held item."); + +static const u8 sTM47Desc[] = _( + "Spreads hard-\n" + "edged wings and\n" + "slams into the foe."); + +static const u8 sTM48Desc[] = _( + "Switches abilities\n" + "with the foe on the\n" + "turn this is used."); + +static const u8 sTM49Desc[] = _( + "Steals the effects\n" + "of the move the foe\n" + "is trying to use."); + +static const u8 sTM50Desc[] = _( + "Enables full-power\n" + "attack, but sharply\n" + "lowers SP. ATK."); + + +static const u8 sHM01Desc[] = _( + "Attacks the foe\n" + "with sharp blades\n" + "or claws."); + +static const u8 sHM02Desc[] = _( + "Flies up on the\n" + "first turn, then\n" + "attacks next turn."); + +static const u8 sHM03Desc[] = _( + "Creates a huge\n" + "wave, then crashes\n" + "it down on the foe."); + +static const u8 sHM04Desc[] = _( + "Builds enormous\n" + "power, then slams\n" + "the foe."); + +static const u8 sHM05Desc[] = _( + "Looses a powerful\n" + "blast of light that\n" + "reduces accuracy."); + +static const u8 sHM06Desc[] = _( + "A rock-crushingly\n" + "tough attack that\n" + "may lower DEFENSE."); + +static const u8 sHM07Desc[] = _( + "Attacks the foe\n" + "with enough power\n" + "to climb waterfalls."); + +static const u8 sHM08Desc[] = _( + "Dives underwater\n" + "the 1st turn, then\n" + "attacks next turn."); -const u8 gHM01ItemDescription[] = _("Attacks the foe\nwith sharp blades\nor claws."); -const u8 gHM02ItemDescription[] = _("Flies up on the\nfirst turn, then\nattacks next turn."); -const u8 gHM03ItemDescription[] = _("Creates a huge\nwave, then crashes\nit down on the foe."); -const u8 gHM04ItemDescription[] = _("Builds enormous\npower, then slams\nthe foe."); -const u8 gHM05ItemDescription[] = _("Looses a powerful\nblast of light that\nreduces accuracy."); -const u8 gHM06ItemDescription[] = _("A rock-crushingly\ntough attack that\nmay lower DEFENSE."); -const u8 gHM07ItemDescription[] = _("Attacks the foe\nwith enough power\nto climb waterfalls."); -const u8 gHM08ItemDescription[] = _("Dives underwater\nthe 1st turn, then\nattacks next turn."); // FireRed/LeafGreen key items -const u8 gOaksParcelItemDescription[] = _("A parcel for PROF.\nOAK from a POKéMON\nMART's clerk."); -const u8 gPokeFluteItemDescription[] = _("A sweet-sounding\nflute that awakens\nPOKéMON."); -const u8 gSecretKeyItemDescription[] = _("The key to the\nCINNABAR ISLAND\nGYM's entrance."); -const u8 gBikeVoucherItemDescription[] = _("A voucher for\nobtaining a bicycle\nfrom the BIKE SHOP."); -const u8 gGoldTeethItemDescription[] = _("Gold dentures lost\nby the SAFARI\nZONE's WARDEN."); -const u8 gOldAmberItemDescription[] = _("A stone containing\nthe genes of an\nancient POKéMON."); -const u8 gCardKeyItemDescription[] = _("A card-type door\nkey used in SILPH\nCO's office."); -const u8 gLiftKeyItemDescription[] = _("An elevator key\nused in TEAM\nROCKET's HIDEOUT."); -const u8 gHelixFossilItemDescription[] = _("A piece of an\nancient marine\nPOKéMON's seashell."); -const u8 gDomeFossilItemDescription[] = _("A piece of an\nancient marine\nPOKéMON's shell."); -const u8 gSilphScopeItemDescription[] = _("SILPH CO's scope\nmakes unseeable\nPOKéMON visible."); -const u8 gBicycleItemDescription[] = _("A folding bicycle\nthat is faster than\nthe RUNNING SHOES."); -const u8 gTownMapItemDescription[] = _("Can be viewed\nanytime. Shows your\npresent location."); -const u8 gVSSeekerItemDescription[] = _("A rechargeable unit\nthat flags battle-\nready TRAINERS."); -const u8 gFameCheckerItemDescription[] = _("Stores information\non famous people\nfor instant recall."); -const u8 gTMCaseItemDescription[] = _("A convenient case \nthat holds TMs and\nHMs."); -const u8 gBerryPouchItemDescription[] = _("A convenient\ncontainer that\nholds BERRIES."); -const u8 gTeachyTVItemDescription[] = _("A TV set tuned to\nan advice program\nfor TRAINERS."); -const u8 gTriPassItemDescription[] = _("A pass for ferries\nbetween ONE, TWO,\nand THREE ISLAND."); -const u8 gRainbowPassItemDescription[] = _("For ferries serving\nVERMILION and the\nSEVII ISLANDS."); -const u8 gTeaItemDescription[] = _("A thirst-quenching\ntea prepared by an\nold lady."); -const u8 gMysticTicketItemDescription[] = _("A ticket required\nto board the ship\nto NAVEL ROCK."); -const u8 gAuroraTicketItemDescription[] = _("A ticket required\nto board the ship\nto BIRTH ISLAND."); -const u8 gPowderJarItemDescription[] = _("Stores BERRY\nPOWDER made using\na BERRY CRUSHER."); -const u8 gRubyItemDescription[] = _("An exquisite, red-\nglowing gem that\nsymbolizes passion."); -const u8 gSapphireItemDescription[] = _("A brilliant blue gem\nthat symbolizes\nhonesty."); +static const u8 sOaksParcelDesc[] = _( + "A parcel for PROF.\n" + "OAK from a POKéMON\n" + "MART's clerk."); + +static const u8 sPokeFluteDesc[] = _( + "A sweet-sounding\n" + "flute that awakens\n" + "POKéMON."); + +static const u8 sSecretKeyDesc[] = _( + "The key to the\n" + "CINNABAR ISLAND\n" + "GYM's entrance."); + +static const u8 sBikeVoucherDesc[] = _( + "A voucher for\n" + "obtaining a bicycle\n" + "from the BIKE SHOP."); + +static const u8 sGoldTeethDesc[] = _( + "Gold dentures lost\n" + "by the SAFARI\n" + "ZONE's WARDEN."); + +static const u8 sOldAmberDesc[] = _( + "A stone containing\n" + "the genes of an\n" + "ancient POKéMON."); + +static const u8 sCardKeyDesc[] = _( + "A card-type door\n" + "key used in SILPH\n" + "CO's office."); + +static const u8 sLiftKeyDesc[] = _( + "An elevator key\n" + "used in TEAM\n" + "ROCKET's HIDEOUT."); + +static const u8 sHelixFossilDesc[] = _( + "A piece of an\n" + "ancient marine\n" + "POKéMON's seashell."); + +static const u8 sDomeFossilDesc[] = _( + "A piece of an\n" + "ancient marine\n" + "POKéMON's shell."); + +static const u8 sSilphScopeDesc[] = _( + "SILPH CO's scope\n" + "makes unseeable\n" + "POKéMON visible."); + +static const u8 sBicycleDesc[] = _( + "A folding bicycle\n" + "that is faster than\n" + "the RUNNING SHOES."); + +static const u8 sTownMapDesc[] = _( + "Can be viewed\n" + "anytime. Shows your\n" + "present location."); + +static const u8 sVSSeekerDesc[] = _( + "A rechargeable unit\n" + "that flags battle-\n" + "ready TRAINERS."); + +static const u8 sFameCheckerDesc[] = _( + "Stores information\n" + "on famous people\n" + "for instant recall."); + +static const u8 sTMCaseDesc[] = _( + "A convenient case \n" + "that holds TMs and\n" + "HMs."); + +static const u8 sBerryPouchDesc[] = _( + "A convenient\n" + "container that\n" + "holds BERRIES."); + +static const u8 sTeachyTVDesc[] = _( + "A TV set tuned to\n" + "an advice program\n" + "for TRAINERS."); + +static const u8 sTriPassDesc[] = _( + "A pass for ferries\n" + "between ONE, TWO,\n" + "and THREE ISLAND."); + +static const u8 sRainbowPassDesc[] = _( + "For ferries serving\n" + "VERMILION and the\n" + "SEVII ISLANDS."); + +static const u8 sTeaDesc[] = _( + "A thirst-quenching\n" + "tea prepared by an\n" + "old lady."); + +static const u8 sMysticTicketDesc[] = _( + "A ticket required\n" + "to board the ship\n" + "to NAVEL ROCK."); + +static const u8 sAuroraTicketDesc[] = _( + "A ticket required\n" + "to board the ship\n" + "to BIRTH ISLAND."); + +static const u8 sPowderJarDesc[] = _( + "Stores BERRY\n" + "POWDER made using\n" + "a BERRY CRUSHER."); + +static const u8 sRubyDesc[] = _( + "An exquisite, red-\n" + "glowing gem that\n" + "symbolizes passion."); + +static const u8 sSapphireDesc[] = _( + "A brilliant blue gem\n" + "that symbolizes\n" + "honesty."); + // Emerald-specific key items -const u8 gMagmaEmblemItemDescription[] = _("A medal-like item in\nthe same shape as\nTEAM MAGMA's mark."); -const u8 gOldSeaMapItemDescription[] = _("A faded sea chart\nthat shows the way\nto a certain island."); +static const u8 sMagmaEmblemDesc[] = _( + "A medal-like item in\n" + "the same shape as\n" + "TEAM MAGMA's mark."); + +static const u8 sOldSeaMapDesc[] = _( + "A faded sea chart\n" + "that shows the way\n" + "to a certain island."); From 9915a3fd7f1a366671b53117792aa440f1d87336 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 16 Apr 2019 14:18:01 -0500 Subject: [PATCH 6/8] Decompile pokenav_unk_5.c --- asm/pokenav_unk_5.s | 1396 ------------------------------------------ include/pokenav.h | 15 +- include/region_map.h | 6 +- ld_script.txt | 2 +- src/pokenav.c | 25 +- src/pokenav_unk_4.c | 2 +- src/pokenav_unk_5.c | 636 +++++++++++++++++++ src/region_map.c | 2 +- 8 files changed, 667 insertions(+), 1417 deletions(-) delete mode 100644 asm/pokenav_unk_5.s create mode 100755 src/pokenav_unk_5.c diff --git a/asm/pokenav_unk_5.s b/asm/pokenav_unk_5.s deleted file mode 100644 index add5fb189..000000000 --- a/asm/pokenav_unk_5.s +++ /dev/null @@ -1,1396 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - -@ File centered around AllocSubstruct(3) - - thumb_func_start sub_81CC4D4 -sub_81CC4D4: @ 81CC4D4 - push {r4,lr} - movs r0, 0x3 - movs r1, 0x14 - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CC4F0 - ldr r1, =0x00000884 - movs r0, 0x10 - bl AllocSubstruct - cmp r0, 0 - bne _081CC4F8 -_081CC4F0: - movs r0, 0 - b _081CC51A - .pool -_081CC4F8: - ldr r0, =gMapHeader - ldrb r0, [r0, 0x14] - bl sub_8124668 - str r0, [r4, 0xC] - cmp r0, 0 - bne _081CC514 - ldr r0, =sub_81CC568 - b _081CC516 - .pool -_081CC514: - ldr r0, =sub_81CC5B4 -_081CC516: - str r0, [r4, 0x10] - movs r0, 0x1 -_081CC51A: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CC4D4 - - thumb_func_start sub_81CC524 -sub_81CC524: @ 81CC524 - push {lr} - bl sub_8124658 - ldr r1, =gSaveBlock2Ptr - ldr r3, [r1] - movs r1, 0x1 - ands r1, r0 - lsls r1, 3 - ldrb r2, [r3, 0x15] - movs r0, 0x9 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0x15] - movs r0, 0x10 - bl FreePokenavSubstruct - movs r0, 0x3 - bl FreePokenavSubstruct - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC524 - - thumb_func_start sub_81CC554 -sub_81CC554: @ 81CC554 - push {lr} - movs r0, 0x3 - bl GetSubstructPtr - ldr r1, [r0, 0x10] - bl _call_via_r1 - pop {r1} - bx r1 - thumb_func_end sub_81CC554 - - thumb_func_start sub_81CC568 -sub_81CC568: @ 81CC568 - push {r4,lr} - adds r4, r0, 0 - bl sub_81230AC - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - beq _081CC58C - cmp r0, 0x4 - bgt _081CC582 - cmp r0, 0x3 - beq _081CC588 - b _081CC5AC -_081CC582: - cmp r0, 0x5 - beq _081CC59E - b _081CC5AC -_081CC588: - movs r0, 0x1 - b _081CC5AE -_081CC58C: - bl sub_8124658 - lsls r0, 24 - cmp r0, 0 - bne _081CC59A - movs r0, 0x3 - b _081CC5AE -_081CC59A: - movs r0, 0x2 - b _081CC5AE -_081CC59E: - ldr r0, =sub_81CC5DC - str r0, [r4, 0x10] - movs r0, 0x4 - b _081CC5AE - .pool -_081CC5AC: - movs r0, 0 -_081CC5AE: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CC568 - - thumb_func_start sub_81CC5B4 -sub_81CC5B4: @ 81CC5B4 - push {lr} - adds r2, r0, 0 - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - bne _081CC5CC - movs r0, 0 - b _081CC5D2 - .pool -_081CC5CC: - ldr r0, =sub_81CC5DC - str r0, [r2, 0x10] - movs r0, 0x4 -_081CC5D2: - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CC5B4 - - thumb_func_start sub_81CC5DC -sub_81CC5DC: @ 81CC5DC - ldr r0, =0x000186a1 - bx lr - .pool - thumb_func_end sub_81CC5DC - - thumb_func_start sub_81CC5E4 -sub_81CC5E4: @ 81CC5E4 - push {lr} - movs r0, 0x3 - bl GetSubstructPtr - ldr r0, [r0, 0xC] - pop {r1} - bx r1 - thumb_func_end sub_81CC5E4 - - thumb_func_start sub_81CC5F4 -sub_81CC5F4: @ 81CC5F4 - push {r4,lr} - ldr r1, =0x00001948 - movs r0, 0x4 - bl AllocSubstruct - adds r4, r0, 0 - cmp r4, 0 - beq _081CC624 - ldr r0, =sub_81CC6F4 - movs r1, 0x1 - bl CreateLoopedTask - str r0, [r4, 0x4] - ldr r0, =sub_81CC6BC - str r0, [r4] - movs r0, 0x1 - b _081CC626 - .pool -_081CC624: - movs r0, 0 -_081CC626: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CC5F4 - - thumb_func_start sub_81CC62C -sub_81CC62C: @ 81CC62C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x4 - bl GetSubstructPtr - adds r5, r0, 0 - ldr r0, =gUnknown_086230E4 - lsls r4, 2 - adds r4, r0 - ldr r0, [r4] - movs r1, 0x1 - bl CreateLoopedTask - str r0, [r5, 0x4] - ldr r0, =sub_81CC6BC - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC62C - - thumb_func_start sub_81CC65C -sub_81CC65C: @ 81CC65C - push {lr} - movs r0, 0x4 - bl GetSubstructPtr - ldr r0, [r0] - bl _call_via_r0 - pop {r1} - bx r1 - thumb_func_end sub_81CC65C - - thumb_func_start sub_81CC670 -sub_81CC670: @ 81CC670 - push {r4,lr} - movs r0, 0x4 - bl GetSubstructPtr - adds r4, r0, 0 - bl FreeRegionMapIconResources - bl sub_81CC9EC - ldrb r0, [r4, 0x8] - bl RemoveWindow - movs r0, 0x10 - bl FreePokenavSubstruct - movs r0, 0x4 - bl FreePokenavSubstruct - bl SetPokenavVBlankCallback - movs r0, 0 - bl SetBgMode - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CC670 - - thumb_func_start sub_81CC6A4 -sub_81CC6A4: @ 81CC6A4 - push {lr} - bl TransferPlttBuffer - bl LoadOam - bl ProcessSpriteCopyRequests - bl UpdateRegionMapVideoRegs - pop {r0} - bx r0 - thumb_func_end sub_81CC6A4 - - thumb_func_start sub_81CC6BC -sub_81CC6BC: @ 81CC6BC - push {lr} - movs r0, 0x4 - bl GetSubstructPtr - ldr r0, [r0, 0x4] - bl IsLoopedTaskActive - pop {r1} - bx r1 - thumb_func_end sub_81CC6BC - - thumb_func_start sub_81CC6D0 -sub_81CC6D0: @ 81CC6D0 - push {lr} - bl sub_81CC5E4 - cmp r0, 0 - bne _081CC6EC - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - ldrb r0, [r0, 0x15] - lsrs r0, 3 - movs r1, 0x1 - ands r0, r1 - b _081CC6EE - .pool -_081CC6EC: - movs r0, 0 -_081CC6EE: - pop {r1} - bx r1 - thumb_func_end sub_81CC6D0 - - thumb_func_start sub_81CC6F4 -sub_81CC6F4: @ 81CC6F4 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x4 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x7 - bls _081CC706 - b _081CC83E -_081CC706: - lsls r0, r4, 2 - ldr r1, =_081CC714 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CC714: - .4byte _081CC734 - .4byte _081CC784 - .4byte _081CC7B6 - .4byte _081CC7BE - .4byte _081CC7CE - .4byte _081CC7E2 - .4byte _081CC804 - .4byte _081CC82A -_081CC734: - movs r0, 0 - bl SetVBlankCallback_ - movs r0, 0x1 - bl HideBg - movs r0, 0x2 - bl HideBg - movs r0, 0x3 - bl HideBg - movs r0, 0x1 - bl SetBgMode - ldr r4, =gUnknown_086230D8 - adds r0, r4, 0 - movs r1, 0x2 - bl InitBgTemplates - movs r0, 0x10 - bl GetSubstructPtr - adds r5, r0, 0 - adds r4, 0x4 - bl sub_81CC6D0 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8122CF8 - bl sub_81CC9C0 -_081CC77C: - movs r0, 0 - b _081CC840 - .pool -_081CC784: - bl sub_8122DB0 - lsls r0, 24 - cmp r0, 0 - bne _081CC83A - bl sub_81CC5E4 - cmp r0, 0 - bne _081CC7AC - movs r0, 0x4 - movs r1, 0x9 - bl CreateRegionMapPlayerIcon - movs r0, 0x5 - movs r1, 0xA - bl CreateRegionMapCursor - bl sub_812454C - b _081CC77C -_081CC7AC: - movs r0, 0 - movs r1, 0x6 - bl sub_8123030 - b _081CC77C -_081CC7B6: - bl sub_81CCD10 -_081CC7BA: - movs r0, 0x1 - b _081CC840 -_081CC7BE: - bl sub_81CCD24 - cmp r0, 0 - bne _081CC83A - adds r0, r5, 0 - bl sub_81CCA1C - b _081CC7BA -_081CC7CE: - bl sub_81CCAFC - cmp r0, 0 - bne _081CC83A - adds r0, r5, 0 - bl sub_81CCB0C - bl sub_81C7B40 - b _081CC77C -_081CC7E2: - adds r0, r5, 0 - bl sub_81CCC4C - cmp r0, 0 - bne _081CC83A - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl ShowBg - ldr r0, =sub_81CC6A4 - bl SetVBlankCallback_ - b _081CC77C - .pool -_081CC804: - bl sub_81CC6D0 - lsls r0, 24 - movs r4, 0x5 - cmp r0, 0 - bne _081CC812 - movs r4, 0x4 -_081CC812: - adds r0, r4, 0 - bl LoadLeftHeaderGfxForIndex - adds r0, r4, 0 - movs r1, 0x1 - movs r2, 0x1 - bl sub_81C7FA0 - movs r0, 0x1 - bl sub_81C7AC0 - b _081CC77C -_081CC82A: - bl IsPaletteFadeActive - cmp r0, 0 - bne _081CC83A - bl sub_81C8010 - cmp r0, 0 - beq _081CC7BA -_081CC83A: - movs r0, 0x2 - b _081CC840 -_081CC83E: - movs r0, 0x4 -_081CC840: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CC6F4 - - thumb_func_start sub_81CC848 -sub_81CC848: @ 81CC848 - push {r4,lr} - adds r4, r0, 0 - movs r0, 0x4 - bl GetSubstructPtr - cmp r4, 0 - beq _081CC85C - cmp r4, 0x1 - beq _081CC864 - b _081CC870 -_081CC85C: - bl sub_81CCB0C - movs r0, 0 - b _081CC872 -_081CC864: - bl sub_81CCC4C - cmp r0, 0 - beq _081CC870 - movs r0, 0x2 - b _081CC872 -_081CC870: - movs r0, 0x4 -_081CC872: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81CC848 - - thumb_func_start sub_81CC878 -sub_81CC878: @ 81CC878 - push {lr} - cmp r0, 0x1 - beq _081CC8A2 - cmp r0, 0x1 - bgt _081CC888 - cmp r0, 0 - beq _081CC88E - b _081CC8D0 -_081CC888: - cmp r0, 0x2 - beq _081CC8BE - b _081CC8D0 -_081CC88E: - movs r0, 0x5 - bl PlaySE - movs r0, 0 - bl sub_81CCC5C - bl sub_8123418 - movs r0, 0 - b _081CC8D2 -_081CC8A2: - bl sub_8123514 - lsls r0, 24 - cmp r0, 0 - bne _081CC8C6 - bl sub_81CCC88 - cmp r0, 0 - bne _081CC8C6 - movs r0, 0x1 - bl sub_81C7BA4 - movs r0, 0 - b _081CC8D2 -_081CC8BE: - bl IsDma3ManagerBusyWithBgCopy_ - cmp r0, 0 - beq _081CC8CA -_081CC8C6: - movs r0, 0x2 - b _081CC8D2 -_081CC8CA: - movs r0, 0x4 - bl sub_81C7E14 -_081CC8D0: - movs r0, 0x4 -_081CC8D2: - pop {r1} - bx r1 - thumb_func_end sub_81CC878 - - thumb_func_start sub_81CC8D8 -sub_81CC8D8: @ 81CC8D8 - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x4 - bl GetSubstructPtr - adds r5, r0, 0 - cmp r4, 0x1 - beq _081CC90C - cmp r4, 0x1 - bgt _081CC8F2 - cmp r4, 0 - beq _081CC8FC - b _081CC952 -_081CC8F2: - cmp r4, 0x2 - beq _081CC924 - cmp r4, 0x3 - beq _081CC940 - b _081CC952 -_081CC8FC: - movs r0, 0x5 - bl PlaySE - adds r0, r5, 0 - bl sub_81CCB0C - movs r0, 0 - b _081CC954 -_081CC90C: - adds r0, r5, 0 - bl sub_81CCC4C - cmp r0, 0 - bne _081CC948 - movs r0, 0x1 - bl sub_81CCC5C - bl sub_8123418 - movs r0, 0 - b _081CC954 -_081CC924: - bl sub_8123514 - lsls r0, 24 - cmp r0, 0 - bne _081CC948 - bl sub_81CCC88 - cmp r0, 0 - bne _081CC948 - movs r0, 0x2 - bl sub_81C7BA4 - movs r0, 0 - b _081CC954 -_081CC940: - bl IsDma3ManagerBusyWithBgCopy_ - cmp r0, 0 - beq _081CC94C -_081CC948: - movs r0, 0x2 - b _081CC954 -_081CC94C: - movs r0, 0x5 - bl sub_81C7E14 -_081CC952: - movs r0, 0x4 -_081CC954: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81CC8D8 - - thumb_func_start sub_81CC95C -sub_81CC95C: @ 81CC95C - push {lr} - cmp r0, 0x1 - beq _081CC982 - cmp r0, 0x1 - bgt _081CC96C - cmp r0, 0 - beq _081CC972 - b _081CC9B8 -_081CC96C: - cmp r0, 0x2 - beq _081CC996 - b _081CC9B8 -_081CC972: - movs r0, 0x5 - bl PlaySE - movs r0, 0 - bl sub_81C7AC0 - movs r0, 0 - b _081CC9BA -_081CC982: - bl IsPaletteFadeActive - cmp r0, 0 - bne _081CC99E - bl sub_81C7FDC - bl sub_81C78A0 - movs r0, 0 - b _081CC9BA -_081CC996: - bl MainMenuLoopedTaskIsBusy - cmp r0, 0 - beq _081CC9A2 -_081CC99E: - movs r0, 0x2 - b _081CC9BA -_081CC9A2: - movs r0, 0x1 - bl HideBg - movs r0, 0x2 - bl HideBg - movs r0, 0x3 - bl HideBg - movs r0, 0 - b _081CC9BA -_081CC9B8: - movs r0, 0x4 -_081CC9BA: - pop {r1} - bx r1 - thumb_func_end sub_81CC95C - - thumb_func_start sub_81CC9C0 -sub_81CC9C0: @ 81CC9C0 - push {r4,r5,lr} - movs r5, 0 - ldr r4, =gUnknown_086230F8 -_081CC9C6: - adds r0, r4, 0 - bl LoadCompressedSpriteSheet - adds r4, 0x8 - adds r5, 0x1 - cmp r5, 0 - beq _081CC9C6 - ldr r0, =gUnknown_08623100 - bl Pokenav_AllocAndLoadPalettes - bl sub_81CCE58 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CC9C0 - - thumb_func_start sub_81CC9EC -sub_81CC9EC: @ 81CC9EC - push {r4,r5,lr} - movs r0, 0x4 - bl GetSubstructPtr - adds r4, r0, 0 - movs r0, 0x6 - bl FreeSpriteTilesByTag - movs r0, 0xB - bl FreeSpritePaletteByTag - adds r5, r4, 0 - adds r5, 0xC - movs r4, 0x2 -_081CCA08: - ldm r5!, {r0} - bl DestroySprite - subs r4, 0x1 - cmp r4, 0 - bge _081CCA08 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_81CC9EC - - thumb_func_start sub_81CCA1C -sub_81CCA1C: @ 81CCA1C - push {r4,r5,lr} - sub sp, 0x8 - adds r5, r0, 0 - movs r0, 0x1 - movs r1, 0 - movs r2, 0x40 - movs r3, 0x1 - bl sub_8199DF0 - movs r0, 0x1 - movs r1, 0x11 - movs r2, 0x41 - movs r3, 0x1 - bl sub_8199DF0 - add r1, sp, 0x4 - movs r2, 0x82 - lsls r2, 5 - adds r0, r2, 0 - strh r0, [r1] - adds r4, r5, 0 - adds r4, 0x18 - ldr r2, =0x01000400 - adds r0, r1, 0 - adds r1, r4, 0 - bl CpuSet - movs r0, 0x1 - adds r1, r4, 0 - bl SetBgTilemapBuffer - ldr r0, =gUnknown_08623110 - bl AddWindow - movs r4, 0 - strh r0, [r5, 0x8] - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x42 - movs r2, 0x40 - bl LoadUserWindowBorderGfx_ - ldrb r0, [r5, 0x8] - movs r1, 0x42 - movs r2, 0x4 - bl DrawTextBorderOuter - ldr r1, =gUnknown_08622888 - str r4, [sp] - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram - ldrb r0, [r5, 0x8] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r5, 0x8] - bl PutWindowTilemap - ldrb r0, [r5, 0x8] - movs r1, 0x3 - bl CopyWindowToVram - ldr r0, =gUnknown_08622868 - movs r1, 0x10 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - ldr r0, =gHoennMapZoomIcons_Pal - movs r1, 0x30 - movs r2, 0x20 - bl CopyPaletteIntoBufferUnfaded - bl sub_8124658 - lsls r0, 24 - cmp r0, 0 - bne _081CCAE0 - ldr r1, =0xffffa000 - movs r0, 0x1 - movs r2, 0 - bl ChangeBgY - b _081CCAEA - .pool -_081CCAE0: - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY -_081CCAEA: - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - add sp, 0x8 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_81CCA1C - - thumb_func_start sub_81CCAFC -sub_81CCAFC: @ 81CCAFC - push {lr} - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - thumb_func_end sub_81CCAFC - - thumb_func_start sub_81CCB0C -sub_81CCB0C: @ 81CCB0C - push {r4,r5,lr} - sub sp, 0xC - adds r4, r0, 0 - movs r0, 0x10 - bl GetSubstructPtr - adds r5, r0, 0 - ldrb r0, [r5, 0x2] - cmp r0, 0x4 - bls _081CCB22 - b _081CCC40 -_081CCB22: - lsls r0, 2 - ldr r1, =_081CCB30 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081CCB30: - .4byte _081CCC1C - .4byte _081CCBDC - .4byte _081CCB44 - .4byte _081CCB8E - .4byte _081CCBDC -_081CCB44: - ldrb r0, [r4, 0x8] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x8] - movs r1, 0x2 - str r1, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0xC - bl PutWindowRectTilemap - ldrb r0, [r4, 0x8] - adds r2, r5, 0x4 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x7 - movs r3, 0 - bl AddTextPrinterParameterized - ldrh r1, [r5] - ldrb r2, [r5, 0x3] - adds r0, r4, 0 - bl sub_81CCD70 - ldrb r0, [r4, 0x8] - movs r1, 0x3 - bl CopyWindowToVram - movs r0, 0 - bl sub_81CCFA4 - b _081CCC40 -_081CCB8E: - ldrb r0, [r4, 0x8] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x8] - movs r1, 0x2 - str r1, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0xC - bl PutWindowRectTilemap - ldrb r0, [r4, 0x8] - adds r2, r5, 0x4 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x7 - movs r3, 0 - bl AddTextPrinterParameterized - ldr r1, =0x00001041 - movs r0, 0xC - str r0, [sp] - movs r0, 0xB - str r0, [sp, 0x4] - movs r0, 0x11 - str r0, [sp, 0x8] - movs r0, 0x1 - movs r2, 0x11 - movs r3, 0x6 - bl FillBgTilemapBufferRect - b _081CCC0C - .pool -_081CCBDC: - ldrb r0, [r4, 0x8] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x8] - bl PutWindowTilemap - ldrb r0, [r4, 0x8] - adds r2, r5, 0x4 - movs r1, 0x1 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x7 - movs r3, 0 - bl AddTextPrinterParameterized - ldrh r1, [r5] - ldrb r2, [r5, 0x3] - adds r0, r4, 0 - bl sub_81CCDE8 -_081CCC0C: - ldrb r0, [r4, 0x8] - movs r1, 0x3 - bl CopyWindowToVram - movs r0, 0x1 - bl sub_81CCFA4 - b _081CCC40 -_081CCC1C: - ldr r1, =0x00001041 - movs r0, 0xC - str r0, [sp] - movs r0, 0xD - str r0, [sp, 0x4] - movs r0, 0x11 - str r0, [sp, 0x8] - movs r0, 0x1 - movs r2, 0x11 - movs r3, 0x4 - bl FillBgTilemapBufferRect - movs r0, 0x1 - bl CopyBgTilemapBufferToVram - movs r0, 0x1 - bl sub_81CCFA4 -_081CCC40: - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CCB0C - - thumb_func_start sub_81CCC4C -sub_81CCC4C: @ 81CCC4C - push {lr} - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - thumb_func_end sub_81CCC4C - - thumb_func_start sub_81CCC5C -sub_81CCC5C: @ 81CCC5C - push {r4,lr} - adds r4, r0, 0 - ldr r0, =sub_81CCC9C - movs r1, 0x3 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - strh r4, [r1, 0x8] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CCC5C - - thumb_func_start sub_81CCC88 -sub_81CCC88: @ 81CCC88 - push {lr} - ldr r0, =sub_81CCC9C - bl FuncIsActiveTask - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CCC88 - - thumb_func_start sub_81CCC9C -sub_81CCC9C: @ 81CCC9C - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r5, r4, 0 - ldr r1, =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - movs r1, 0x8 - ldrsh r0, [r0, r1] - cmp r0, 0 - beq _081CCCE0 - movs r1, 0x90 - lsls r1, 3 - movs r0, 0x1 - movs r2, 0x1 - bl ChangeBgY - cmp r0, 0 - blt _081CCCD6 - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - adds r0, r4, 0 - bl DestroyTask -_081CCCD6: - bl sub_81CCF78 - b _081CCD04 - .pool -_081CCCE0: - movs r1, 0x90 - lsls r1, 3 - movs r0, 0x1 - movs r2, 0x2 - bl ChangeBgY - ldr r1, =0xffffa000 - cmp r0, r1 - bgt _081CCD00 - movs r0, 0x1 - movs r2, 0 - bl ChangeBgY - adds r0, r5, 0 - bl DestroyTask -_081CCD00: - bl sub_81CCF78 -_081CCD04: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CCC9C - - thumb_func_start sub_81CCD10 -sub_81CCD10: @ 81CCD10 - push {lr} - ldr r0, =sub_81CCD34 - movs r1, 0x1 - bl CreateLoopedTask - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CCD10 - - thumb_func_start sub_81CCD24 -sub_81CCD24: @ 81CCD24 - push {lr} - ldr r0, =sub_81CCD34 - bl FuncIsActiveLoopedTask - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CCD24 - - thumb_func_start sub_81CCD34 -sub_81CCD34: @ 81CCD34 - push {r4,lr} - adds r4, r0, 0 - movs r0, 0x4 - bl GetSubstructPtr - adds r2, r0, 0 - cmp r4, 0x15 - ble _081CCD48 - movs r0, 0x4 - b _081CCD62 -_081CCD48: - ldr r0, =gUnknown_08623118 - lsls r1, r4, 3 - adds r0, 0x4 - adds r1, r0 - ldr r0, [r1] - movs r1, 0xC8 - muls r1, r4 - ldr r3, =0x00000818 - adds r1, r3 - adds r1, r2, r1 - bl LZ77UnCompWram - movs r0, 0x1 -_081CCD62: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81CCD34 - - thumb_func_start sub_81CCD70 -sub_81CCD70: @ 81CCD70 - push {r4-r6,lr} - sub sp, 0x8 - adds r6, r0, 0 - adds r3, r1, 0 - movs r4, 0 - ldr r0, =gUnknown_08623118 - ldrh r1, [r0] - adds r5, r0, 0 - cmp r1, r3 - bne _081CCD8A - ldrh r0, [r5, 0x2] - cmp r0, r2 - beq _081CCDA0 -_081CCD8A: - adds r4, 0x1 - cmp r4, 0x15 - bgt _081CCDA0 - lsls r0, r4, 3 - adds r1, r0, r5 - ldrh r0, [r1] - cmp r0, r3 - bne _081CCD8A - ldrh r0, [r1, 0x2] - cmp r0, r2 - bne _081CCD8A -_081CCDA0: - cmp r4, 0x16 - beq _081CCDD4 - ldr r1, =0x00001041 - movs r0, 0xC - str r0, [sp] - movs r0, 0xB - str r0, [sp, 0x4] - movs r0, 0x1 - movs r2, 0x11 - movs r3, 0x6 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0xC8 - adds r1, r4, 0 - muls r1, r0 - ldr r0, =0x00000818 - adds r1, r0 - adds r1, r6, r1 - movs r0, 0xA - str r0, [sp] - str r0, [sp, 0x4] - movs r0, 0x1 - movs r2, 0x12 - movs r3, 0x6 - bl CopyToBgTilemapBufferRect -_081CCDD4: - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CCD70 - - thumb_func_start sub_81CCDE8 -sub_81CCDE8: @ 81CCDE8 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0xC - mov r9, r0 - movs r5, 0 - ldr r6, =gStringVar1 - movs r4, 0x88 - lsls r4, 21 - lsls r1, 24 - mov r8, r1 - lsls r7, r2, 24 - b _081CCE34 - .pool -_081CCE08: - adds r0, r6, 0 - movs r2, 0 - movs r3, 0xC - bl StringCopyPadded - mov r1, r9 - ldrb r0, [r1, 0x8] - lsrs r1, r4, 24 - str r1, [sp] - movs r1, 0xFF - str r1, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - movs r1, 0x7 - adds r2, r6, 0 - movs r3, 0 - bl AddTextPrinterParameterized - movs r0, 0x80 - lsls r0, 21 - adds r4, r0 - adds r5, 0x1 -_081CCE34: - lsls r2, r5, 24 - lsrs r2, 24 - mov r1, r8 - lsrs r0, r1, 24 - lsrs r1, r7, 24 - bl GetLandmarkName - adds r1, r0, 0 - cmp r1, 0 - bne _081CCE08 - add sp, 0xC - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_81CCDE8 - - thumb_func_start sub_81CCE58 -sub_81CCE58: @ 81CCE58 - push {r4-r7,lr} - mov r7, r8 - push {r7} - movs r0, 0x4 - bl GetSubstructPtr - adds r4, r0, 0 - bl sub_8124658 - lsls r0, 24 - movs r2, 0x84 - cmp r0, 0 - bne _081CCE74 - movs r2, 0xE4 -_081CCE74: - movs r5, 0 - lsls r7, r2, 16 - adds r4, 0xC - mov r8, r4 - movs r6, 0x98 - lsls r6, 16 -_081CCE80: - asrs r1, r6, 16 - ldr r0, =gUnknown_086231D0 - asrs r2, r7, 16 - movs r3, 0x8 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - ldr r0, =gSprites - adds r2, r0 - movs r0, 0 - strh r0, [r2, 0x2E] - lsls r4, r5, 2 - strh r4, [r2, 0x30] - ldrh r3, [r2, 0x4] - lsls r1, r3, 22 - lsrs r0, r1, 22 - adds r1, r0, 0 - strh r0, [r2, 0x32] - movs r0, 0x96 - strh r0, [r2, 0x34] - strh r4, [r2, 0x36] - adds r1, r4 - ldr r4, =0x000003ff - adds r0, r4, 0 - ands r1, r0 - ldr r4, =0xfffffc00 - adds r0, r4, 0 - ands r3, r0 - orrs r3, r1 - strh r3, [r2, 0x4] - mov r0, r8 - adds r0, 0x4 - mov r8, r0 - subs r0, 0x4 - stm r0!, {r2} - movs r4, 0x80 - lsls r4, 14 - adds r6, r4 - adds r5, 0x1 - cmp r5, 0x2 - ble _081CCE80 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81CCE58 - - thumb_func_start sub_81CCEF4 -sub_81CCEF4: @ 81CCEF4 - push {r4,r5,lr} - adds r3, r0, 0 - ldrh r0, [r3, 0x34] - movs r1, 0x34 - ldrsh r4, [r3, r1] - cmp r4, 0 - beq _081CCF06 - subs r0, 0x1 - b _081CCF6E -_081CCF06: - ldrh r0, [r3, 0x2E] - adds r0, 0x1 - strh r0, [r3, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0xB - ble _081CCF16 - strh r4, [r3, 0x2E] -_081CCF16: - ldrh r0, [r3, 0x30] - adds r0, 0x1 - strh r0, [r3, 0x30] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x3C - ble _081CCF26 - strh r4, [r3, 0x30] -_081CCF26: - ldrh r5, [r3, 0x30] - ldrh r2, [r3, 0x32] - adds r1, r5, r2 - ldr r2, =0x000003ff - adds r0, r2, 0 - ands r1, r0 - ldrh r2, [r3, 0x4] - ldr r0, =0xfffffc00 - ands r0, r2 - orrs r0, r1 - strh r0, [r3, 0x4] - ldrh r1, [r3, 0x38] - movs r2, 0x38 - ldrsh r0, [r3, r2] - cmp r0, 0x3 - bgt _081CCF5C - movs r2, 0x2E - ldrsh r0, [r3, r2] - cmp r0, 0 - bne _081CCF70 - adds r0, r1, 0x1 - strh r0, [r3, 0x38] - b _081CCF6C - .pool -_081CCF5C: - lsls r0, r5, 16 - asrs r0, 16 - movs r2, 0x36 - ldrsh r1, [r3, r2] - cmp r0, r1 - bne _081CCF70 - strh r4, [r3, 0x38] - strh r4, [r3, 0x2E] -_081CCF6C: - movs r0, 0x78 -_081CCF6E: - strh r0, [r3, 0x34] -_081CCF70: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_81CCEF4 - - thumb_func_start sub_81CCF78 -sub_81CCF78: @ 81CCF78 - push {r4,lr} - movs r0, 0x4 - bl GetSubstructPtr - adds r4, r0, 0 - movs r0, 0x1 - bl GetBgY - asrs r0, 8 - movs r1, 0x84 - subs r1, r0 - adds r4, 0xC - movs r2, 0x2 -_081CCF92: - ldm r4!, {r0} - strh r1, [r0, 0x22] - subs r2, 0x1 - cmp r2, 0 - bge _081CCF92 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81CCF78 - - thumb_func_start sub_81CCFA4 -sub_81CCFA4: @ 81CCFA4 - push {r4-r6,lr} - adds r4, r0, 0 - movs r0, 0x4 - bl GetSubstructPtr - movs r1, 0x1 - ands r4, r1 - lsls r5, r4, 2 - movs r6, 0x5 - negs r6, r6 - adds r4, r0, 0 - adds r4, 0xC - movs r3, 0x2 -_081CCFBE: - ldm r4!, {r0} - adds r0, 0x3E - ldrb r2, [r0] - adds r1, r6, 0 - ands r1, r2 - orrs r1, r5 - strb r1, [r0] - subs r3, 0x1 - cmp r3, 0 - bge _081CCFBE - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_81CCFA4 - - .align 2, 0 @ Don't pad with nop. diff --git a/include/pokenav.h b/include/pokenav.h index 443ab11d5..0d46f04f3 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -2,6 +2,7 @@ #define GUARD_POKENAV_H #include "bg.h" +#include "main.h" typedef u32 (*LoopedTask)(int state); @@ -55,6 +56,8 @@ bool32 IsLoopedTaskActive(u32 taskId); void SetPokenavMode(u16 mode); u32 GetPokenavMode(void); bool32 CanViewRibbonsMenu(void); +void SetPokenavVBlankCallback(void); +void SetVBlankCallback_(IntrCallback callback); // pokenav_match_call_ui.c struct MatchCallListTemplate @@ -121,6 +124,7 @@ void sub_81C79BC(const u16 *a0, const u16 *a1, u32 a2, u32 a3, u32 a4, u16 *a5); void sub_81C7B40(void); struct Sprite *PauseSpinningPokenavSprite(void); void ResumeSpinningPokenavSprite(void); +void sub_81C7E14(u32 arg0); // pokenav_unk_1.c bool32 sub_81C9298(void); @@ -164,10 +168,19 @@ bool32 sub_81CAE08(int); int sub_81CB128(int index); // pokenav_unk_4.c -u32 sub_81CB260(void); +bool32 sub_81CB260(void); void sub_81CB29C(int index); u32 sub_81CB2CC(void); void sub_81CB2E0(void); void sub_81CBD48(u16 windowId, u32 a1); +// pokenav_unk_5.c +u32 sub_81CC4D4(void); +void sub_81CC524(void); +u32 sub_81CC554(void); +bool32 sub_81CC5F4(void); +void sub_81CC62C(int); +u32 sub_81CC65C(void); +void sub_81CC670(void); + #endif //GUARD_POKENAV_H diff --git a/include/region_map.h b/include/region_map.h index ed1c1a201..798e6f56d 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -90,7 +90,7 @@ struct RegionMapLocation // Exported RAM declarations // Exported ROM declarations -void sub_8122CF8(struct RegionMap *regionMap, struct BgTemplate *template, bool8 zoomed); +void sub_8122CF8(struct RegionMap *regionMap, const struct BgTemplate *template, bool8 zoomed); bool8 sub_8122DB0(void); void UpdateRegionMapVideoRegs(void); void InitRegionMap(struct RegionMap *regionMap, u8 argument); @@ -108,6 +108,10 @@ u16 CorrectSpecialMapSecId(u16 mapSecId); void sub_8122D88(struct RegionMap *regionMap); void PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(s16 x, s16 y); void MCB2_FlyMap(void); +bool8 sub_8124658(void); +void sub_812454C(void); +void sub_8123030(u16 a0, u32 a1); +void sub_8123418(void); extern const struct RegionMapLocation gRegionMapEntries[]; diff --git a/ld_script.txt b/ld_script.txt index 68d7cb19e..f210e83ca 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -307,7 +307,7 @@ SECTIONS { asm/pokenav_unk_2.o(.text); src/pokenav_unk_3.o(.text); src/pokenav_unk_4.o(.text); - asm/pokenav_unk_5.o(.text); + src/pokenav_unk_5.o(.text); asm/pokenav_unk_6.o(.text); asm/pokenav_unk_7.o(.text); asm/pokenav_unk_8.o(.text); diff --git a/src/pokenav.c b/src/pokenav.c index 5556dbc42..be3826bed 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -30,57 +30,50 @@ struct UnknownPokenavCallbackStruct { bool32 (*unk0)(void); u32 (*unk4)(void); - u32 (*unk8)(void); + bool32 (*unk8)(void); void (*unkC)(int); u32 (*unk10)(void); void (*unk14)(void); void (*unk18)(void); }; -extern u32 sub_81C9924(void); +extern bool32 sub_81C9924(void); extern u32 sub_81C99C0(void); extern void sub_81C9990(int); -extern u32 sub_81C9940(void); -extern u32 sub_81CC4D4(void); -extern u32 sub_81CC554(void); -extern u32 sub_81CC5F4(void); -extern void sub_81CC62C(int); -extern u32 sub_81CC65C(void); -extern void sub_81CC524(void); -extern void sub_81CC670(void); +extern bool32 sub_81C9940(void); extern u32 sub_81CCFD8(void); extern u32 sub_81CD070(void); -extern u32 sub_81CDDD4(void); +extern bool32 sub_81CDDD4(void); extern void sub_81CDE2C(int); extern u32 sub_81CDE64(void); extern void sub_81CD1C0(void); extern void sub_81CECA0(void); extern u32 sub_81CEF3C(void); extern u32 sub_81CEFDC(void); -extern u32 sub_81CF330(void); +extern bool32 sub_81CF330(void); extern void sub_81CF3A0(int); extern u32 sub_81CF3D0(void); extern void sub_81CEFF0(void); extern void sub_81CF3F8(void); extern u32 sub_81CD024(void); extern u32 sub_81CEF98(void); -extern u32 sub_81CF368(void); +extern bool32 sub_81CF368(void); extern u32 sub_81CF9BC(void); extern u32 sub_81CFA34(void); -extern u32 sub_81CFDD0(void); +extern bool32 sub_81CFDD0(void); extern void sub_81CFE40(int); extern u32 sub_81CFE70(void); extern void sub_81CFA48(void); extern void sub_81CFE98(void); extern u32 sub_81D0450(void); extern u32 sub_81D04A0(void); -extern u32 sub_81D0978(void); +extern bool32 sub_81D0978(void); extern void sub_81D09B0(int); extern u32 sub_81D09E0(void); extern void sub_81D04B8(void); extern void sub_81D09F4(void); extern u32 sub_81CFA04(void); -extern u32 sub_81CFE08(void); +extern bool32 sub_81CFE08(void); static bool32 SetActivePokenavMenu(u32 menuId); static bool32 AnyMonHasRibbon(void); diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index 38a531bec..6fa76daf2 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -27,7 +27,7 @@ struct Pokenav4Struct { - u32 (*unk0)(void); + bool32 (*unk0)(void); u32 unk4; u8 filler8[0x6]; u8 unkE; diff --git a/src/pokenav_unk_5.c b/src/pokenav_unk_5.c new file mode 100755 index 000000000..eccc200d5 --- /dev/null +++ b/src/pokenav_unk_5.c @@ -0,0 +1,636 @@ +#include "global.h" +#include "bg.h" +#include "decompress.h" +#include "landmark.h" +#include "main.h" +#include "menu.h" +#include "palette.h" +#include "pokenav.h" +#include "region_map.h" +#include "sound.h" +#include "sprite.h" +#include "string_util.h" +#include "task.h" +#include "text_window.h" +#include "window.h" +#include "constants/songs.h" + +struct Pokenav5Struct +{ + u8 filler0[0xC]; + bool32 unkC; + u32 (*unk10)(struct Pokenav5Struct *); +}; + +struct Pokenav5Struct_2 +{ + bool32 (*unk0)(void); + u32 unk4; + u16 unk8; + struct Sprite *cityFeatureTextSprites[3]; + u8 unk18[0x800]; + u8 cityZoomPics[22][0xC8]; +}; + +struct CityZoomPic +{ + u16 mapSecId; + u16 unk2; + const u32 *data; +}; + +static u32 sub_81CC568(struct Pokenav5Struct *); +static u32 sub_81CC5B4(struct Pokenav5Struct *); +static u32 sub_81CC5DC(struct Pokenav5Struct *); +static u32 sub_81CC6F4(int); +static u32 sub_81CCD34(int); +static bool32 sub_81CC6BC(void); +static void sub_81CC9EC(void); +static void sub_81CC9C0(void); +static void sub_81CCD10(void); +static bool32 sub_81CCD24(void); +static void sub_81CCA1C(struct Pokenav5Struct_2 *); +static bool32 sub_81CCAFC(void); +static void sub_81CCB0C(struct Pokenav5Struct_2 *); +static bool32 sub_81CCC4C(struct Pokenav5Struct_2 *); +static void sub_81CCC5C(int); +static bool32 sub_81CCC88(void); +static void sub_81CCE58(void); +static void sub_81CCD70(struct Pokenav5Struct_2 *, int, int); +static void sub_81CCDE8(struct Pokenav5Struct_2 *, int, int); +static void sub_81CCFA4(int); +static void sub_81CCC9C(u8 taskId); +static void sub_81CCF78(void); + +extern const LoopedTask gUnknown_086230E4[]; +extern const struct BgTemplate gUnknown_086230D8[2]; +extern const struct CompressedSpriteSheet gUnknown_086230F8[1]; +extern const struct SpritePalette gUnknown_08623100[]; +extern const struct WindowTemplate gUnknown_08623110; +extern const u32 gUnknown_08622888[]; +extern const u16 gUnknown_08622868[]; +extern const u16 gHoennMapZoomIcons_Pal[]; +extern const struct CityZoomPic gUnknown_08623118[22]; +extern const struct SpriteTemplate gUnknown_086231D0; + +u32 sub_81CC4D4(void) +{ + struct Pokenav5Struct *state = AllocSubstruct(3, sizeof(struct Pokenav5Struct)); + if (!state) + return FALSE; + + if (!AllocSubstruct(16, sizeof(struct RegionMap))) + return FALSE; + + state->unkC = sub_8124668(gMapHeader.regionMapSectionId); + if (!state->unkC) + state->unk10 = sub_81CC568; + else + state->unk10 = sub_81CC5B4; + + return TRUE; +} + +void sub_81CC524(void) +{ + gSaveBlock2Ptr->regionMapZoom = sub_8124658(); + FreePokenavSubstruct(16); + FreePokenavSubstruct(3); +} + +u32 sub_81CC554(void) +{ + struct Pokenav5Struct *state = GetSubstructPtr(3); + state->unk10(state); +} + +static u32 sub_81CC568(struct Pokenav5Struct *state) +{ + switch (sub_81230AC()) + { + case 3: + return 1; + case 4: + if (!sub_8124658()) + return 3; + return 2; + case 5: + state->unk10 = sub_81CC5DC; + return 4; + } + + return 0; +} + +static u32 sub_81CC5B4(struct Pokenav5Struct *state) +{ + if (gMain.newKeys & B_BUTTON) + { + state->unk10 = sub_81CC5DC; + return 4; + } + + return 0; +} + +static u32 sub_81CC5DC(struct Pokenav5Struct *state) +{ + return POKENAV_MENU_1; +} + +bool32 sub_81CC5E4(void) +{ + struct Pokenav5Struct *state = GetSubstructPtr(3); + return state->unkC; +} + +bool32 sub_81CC5F4(void) +{ + struct Pokenav5Struct_2 *state = AllocSubstruct(4, sizeof(struct Pokenav5Struct_2)); + if (!state) + return FALSE; + + state->unk4 = CreateLoopedTask(sub_81CC6F4, 1); + state->unk0 = sub_81CC6BC; + return TRUE; +} + +void sub_81CC62C(int index) +{ + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + state->unk4 = CreateLoopedTask(gUnknown_086230E4[index], 1); + state->unk0 = sub_81CC6BC; +} + +u32 sub_81CC65C(void) +{ + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + return state->unk0(); +} + +void sub_81CC670(void) +{ + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + FreeRegionMapIconResources(); + sub_81CC9EC(); + RemoveWindow(state->unk8); + FreePokenavSubstruct(16); + FreePokenavSubstruct(4); + SetPokenavVBlankCallback(); + SetBgMode(0); +} + +static void sub_81CC6A4(void) +{ + TransferPlttBuffer(); + LoadOam(); + ProcessSpriteCopyRequests(); + UpdateRegionMapVideoRegs(); +} + +static bool32 sub_81CC6BC(void) +{ + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + return IsLoopedTaskActive(state->unk4); +} + +static bool8 sub_81CC6D0(void) +{ + if (sub_81CC5E4()) + return FALSE; + + return gSaveBlock2Ptr->regionMapZoom == 1; +} + +static u32 sub_81CC6F4(int taskState) +{ + int var0; + struct RegionMap *regionMap; + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + switch (taskState) + { + case 0: + SetVBlankCallback_(NULL); + HideBg(1); + HideBg(2); + HideBg(3); + SetBgMode(1); + InitBgTemplates(gUnknown_086230D8, ARRAY_COUNT(gUnknown_086230D8)); + regionMap = GetSubstructPtr(16); + sub_8122CF8(regionMap, &gUnknown_086230D8[1], sub_81CC6D0()); + sub_81CC9C0(); + return 0; + case 1: + if (sub_8122DB0()) + return 2; + + if (!sub_81CC5E4()) + { + CreateRegionMapPlayerIcon(4, 9); + CreateRegionMapCursor(5, 10); + sub_812454C(); + } + else + { + sub_8123030(0, 6); + } + return 0; + case 2: + sub_81CCD10(); + return 1; + case 3: + if (sub_81CCD24()) + return 2; + + sub_81CCA1C(state); + return 1; + case 4: + if (sub_81CCAFC()) + return 2; + + sub_81CCB0C(state); + sub_81C7B40(); + return 0; + case 5: + if (sub_81CCC4C(state)) + return 2; + + ShowBg(1); + ShowBg(2); + SetVBlankCallback_(sub_81CC6A4); + return 0; + case 6: + if (!sub_81CC6D0()) + var0 = 4; + else + var0 = 5; + + LoadLeftHeaderGfxForIndex(var0); + sub_81C7FA0(var0, 1, 1); + sub_81C7AC0(1); + return 0; + case 7: + if (IsPaletteFadeActive() || sub_81C8010()) + return 2; + return 1; + default: + return 4; + } +} + +u32 sub_81CC848(int taskState) +{ + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + switch (taskState) + { + case 0: + sub_81CCB0C(state); + return 0; + case 1: + if (sub_81CCC4C(state)) + return 2; + break; + } + + return 4; +} + +u32 sub_81CC878(int taskState) +{ + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81CCC5C(0); + sub_8123418(); + return 0; + case 1: + if (sub_8123514() || sub_81CCC88()) + return 2; + + sub_81C7BA4(1); + return 0; + case 2: + if (IsDma3ManagerBusyWithBgCopy_()) + return 2; + + sub_81C7E14(4); + break; + } + + return 4; +} + +u32 sub_81CC8D8(int taskState) +{ + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81CCB0C(state); + return 0; + case 1: + if (sub_81CCC4C(state)) + return 2; + + sub_81CCC5C(1); + sub_8123418(); + return 0; + case 2: + if (sub_8123514() || sub_81CCC88()) + return 2; + + sub_81C7BA4(2); + return 0; + case 3: + if (IsDma3ManagerBusyWithBgCopy_()) + return 2; + + sub_81C7E14(5); + break; + } + + return 4; +} + +u32 sub_81CC95C(int taskState) +{ + switch (taskState) + { + case 0: + PlaySE(SE_SELECT); + sub_81C7AC0(0); + return 0; + case 1: + if (IsPaletteFadeActive()) + return 2; + + sub_81C7FDC(); + sub_81C78A0(); + return 0; + case 2: + if (MainMenuLoopedTaskIsBusy()) + return 2; + + HideBg(1); + HideBg(2); + HideBg(3); + return 0; + } + + return 4; +} + +static void sub_81CC9C0(void) +{ + int i; + for (i = 0; i < ARRAY_COUNT(gUnknown_086230F8); i++) + LoadCompressedSpriteSheet(&gUnknown_086230F8[i]); + + Pokenav_AllocAndLoadPalettes(gUnknown_08623100); + sub_81CCE58(); +} + +static void sub_81CC9EC(void) +{ + int i; + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + FreeSpriteTilesByTag(6); + FreeSpritePaletteByTag(11); + for (i = 0; i < 3; i++) + DestroySprite(state->cityFeatureTextSprites[i]); +} + +static void sub_81CCA1C(struct Pokenav5Struct_2 *state) +{ + sub_8199DF0(1, PIXEL_FILL(0), 0x40, 1); + sub_8199DF0(1, PIXEL_FILL(1), 0x41, 1); + CpuFill16(0x1040, state->unk18, 0x800); + SetBgTilemapBuffer(1, state->unk18); + state->unk8 = AddWindow(&gUnknown_08623110); + LoadUserWindowBorderGfx_(state->unk8, 0x42, 0x40); + DrawTextBorderOuter(state->unk8, 0x42, 4); + decompress_and_copy_tile_data_to_vram(1, gUnknown_08622888, 0, 0, 0); + FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); + PutWindowTilemap(state->unk8); + CopyWindowToVram(state->unk8, 3); + CopyPaletteIntoBufferUnfaded(gUnknown_08622868, 0x10, 0x20); + CopyPaletteIntoBufferUnfaded(gHoennMapZoomIcons_Pal, 0x30, 0x20); + if (!sub_8124658()) + ChangeBgY(1, -0x6000, 0); + else + ChangeBgY(1, 0, 0); + + ChangeBgX(1, 0, 0); +} + +static bool32 sub_81CCAFC(void) +{ + return free_temp_tile_data_buffers_if_possible(); +} + +static void sub_81CCB0C(struct Pokenav5Struct_2 *state) +{ + struct RegionMap *regionMap = GetSubstructPtr(16); + switch (regionMap->iconDrawType) + { + case MAPSECTYPE_CITY_CANFLY: + FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); + PutWindowRectTilemap(state->unk8, 0, 0, 12, 2); + AddTextPrinterParameterized(state->unk8, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + sub_81CCD70(state, regionMap->mapSecId, regionMap->posWithinMapSec); + CopyWindowToVram(state->unk8, 3); + sub_81CCFA4(0); + break; + case MAPSECTYPE_CITY_CANTFLY: + FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); + PutWindowRectTilemap(state->unk8, 0, 0, 12, 2); + AddTextPrinterParameterized(state->unk8, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17); + CopyWindowToVram(state->unk8, 3); + sub_81CCFA4(1); + break; + case MAPSECTYPE_PLAIN: + case MAPSECTYPE_BATTLE_FRONTIER: + FillWindowPixelBuffer(state->unk8, PIXEL_FILL(1)); + PutWindowTilemap(state->unk8); + AddTextPrinterParameterized(state->unk8, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + sub_81CCDE8(state, regionMap->mapSecId, regionMap->posWithinMapSec); + CopyWindowToVram(state->unk8, 3); + sub_81CCFA4(1); + break; + case MAPSECTYPE_NONE: + FillBgTilemapBufferRect(1, 0x1041, 17, 4, 12, 13, 17); + CopyBgTilemapBufferToVram(1); + sub_81CCFA4(1); + break; + } +} + +static bool32 sub_81CCC4C(struct Pokenav5Struct_2 *state) +{ + return IsDma3ManagerBusyWithBgCopy(); +} + +static void sub_81CCC5C(int arg0) +{ + u8 taskId = CreateTask(sub_81CCC9C, 3); + gTasks[taskId].data[0] = arg0; +} + +static bool32 sub_81CCC88(void) +{ + return FuncIsActiveTask(sub_81CCC9C); +} + +static void sub_81CCC9C(u8 taskId) +{ + if (gTasks[taskId].data[0]) + { + if (ChangeBgY(1, 0x480, 1) >= 0) + { + ChangeBgY(1, 0, 0); + DestroyTask(taskId); + } + + sub_81CCF78(); + } + else + { + if (ChangeBgY(1, 0x480, 2) <= -0x6000) + { + ChangeBgY(1, -0x6000, 0); + DestroyTask(taskId); + } + + sub_81CCF78(); + } +} + +static void sub_81CCD10(void) +{ + CreateLoopedTask(sub_81CCD34, 1); +} + +static bool32 sub_81CCD24(void) +{ + return FuncIsActiveLoopedTask(sub_81CCD34); +} + +static u32 sub_81CCD34(int taskState) +{ + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + if (taskState < (int)ARRAY_COUNT(gUnknown_08623118)) + { + LZ77UnCompWram(gUnknown_08623118[taskState].data, state->cityZoomPics[taskState]); + return 1; + } + + return 4; +} + +static void sub_81CCD70(struct Pokenav5Struct_2 *state, int mapSecId, int pos) +{ + int i; + for (i = 0; i < (int)ARRAY_COUNT(gUnknown_08623118) && (gUnknown_08623118[i].mapSecId != mapSecId || gUnknown_08623118[i].unk2 != pos); i++) + ; + + if (i == ARRAY_COUNT(gUnknown_08623118)) + return; + + FillBgTilemapBufferRect_Palette0(1, 0x1041, 17, 6, 12, 11); + CopyToBgTilemapBufferRect(1, state->cityZoomPics[i], 18, 6, 10, 10); +} + +static void sub_81CCDE8(struct Pokenav5Struct_2 *state, int mapSecId, int pos) +{ + int i = 0; + while (1) + { + const u8 *landmarkName = GetLandmarkName(mapSecId, pos, i); + if (!landmarkName) + break; + + StringCopyPadded(gStringVar1, landmarkName, CHAR_SPACE, 12); + AddTextPrinterParameterized(state->unk8, 7, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL); + i++; + } +} + +static void sub_81CCE58(void) +{ + int i; + int y; + struct Sprite *sprite; + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + + if (!sub_8124658()) + y = 228; + else + y = 132; + + for (i = 0; i < 3; i++) + { + u8 spriteId = CreateSprite(&gUnknown_086231D0, 152 + i * 32, y, 8); + sprite = &gSprites[spriteId]; + sprite->data[0] = 0; + sprite->data[1] = i * 4; + sprite->data[2] = sprite->oam.tileNum; + sprite->data[3] = 150; + sprite->data[4] = i * 4; + sprite->oam.tileNum += i * 4; + state->cityFeatureTextSprites[i] = sprite; + } +} + +void sub_81CCEF4(struct Sprite *sprite) +{ + if (sprite->data[3]) + { + sprite->data[3]--; + return; + } + + if (++sprite->data[0] > 11) + sprite->data[0] = 0; + + if (++sprite->data[1] > 60) + sprite->data[1] = 0; + + sprite->oam.tileNum = sprite->data[2] + sprite->data[1]; + if (sprite->data[5] < 4) + { + if (sprite->data[0] == 0) + { + sprite->data[5]++; + sprite->data[3] = 120; + } + } + else + { + if (sprite->data[1] == sprite->data[4]) + { + sprite->data[5] = 0; + sprite->data[0] = 0; + sprite->data[3] = 120; + } + } +} + +static void sub_81CCF78(void) +{ + int i; + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + int y = 132 - (GetBgY(1) >> 8); + for (i = 0; i < 3; i++) + state->cityFeatureTextSprites[i]->pos1.y = y; +} + +static void sub_81CCFA4(int invisible) +{ + int i; + struct Pokenav5Struct_2 *state = GetSubstructPtr(4); + for (i = 0; i < 3; i++) + state->cityFeatureTextSprites[i]->invisible = invisible; +} diff --git a/src/region_map.c b/src/region_map.c index 90017a4ad..a98964e5c 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -493,7 +493,7 @@ void InitRegionMap(struct RegionMap *regionMap, bool8 zoomed) while (sub_8122DB0()); } -void sub_8122CF8(struct RegionMap *regionMap, struct BgTemplate *template, bool8 zoomed) +void sub_8122CF8(struct RegionMap *regionMap, const struct BgTemplate *template, bool8 zoomed) { gRegionMap = regionMap; gRegionMap->initStep = 0; From 90e555d23eaf92ae5132c76d420e3d8e0a5d2d16 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 16 Apr 2019 16:11:59 -0500 Subject: [PATCH 7/8] Match sub_81A1224 --- src/apprentice.c | 183 ++--------------------------------------------- 1 file changed, 4 insertions(+), 179 deletions(-) diff --git a/src/apprentice.c b/src/apprentice.c index ac2bba48f..4ad295e1a 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -2013,28 +2013,27 @@ static void sub_81A1218(void) sub_81AAC28(); } -#ifdef NONMATCHING static void sub_81A1224(void) { - u8 count; u8 i, j; + u8 count; if (PLAYER_APPRENTICE.field_B1_1 < 3) return; - count = 0; - for (j = 0; j < 9 && PLAYER_APPRENTICE.field_B8[j].unk0_0; count++, j++) + for (count = 0, j = 0; j < 9 && PLAYER_APPRENTICE.field_B8[j].unk0_0; count++, j++) ; for (i = 0; i < count && i < PLAYER_APPRENTICE.field_B1_1 - 3; i++) { + do {} while(0); if (PLAYER_APPRENTICE.field_B8[i].unk0_0 == 1 && PLAYER_APPRENTICE.field_B8[i].unk0_3 && PLAYER_APPRENTICE.field_B8[i].unk2 == gSpecialVar_0x8005) { PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk0_3 = 0; PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk2 = gSpecialVar_0x8005; - gSpecialVar_Result = i; + gSpecialVar_Result = 0; return; } } @@ -2043,180 +2042,6 @@ static void sub_81A1224(void) PLAYER_APPRENTICE.field_B8[PLAYER_APPRENTICE.field_B1_1 - 3].unk2 = gSpecialVar_0x8005; gSpecialVar_Result = 1; } -#else -NAKED -static void sub_81A1224(void) -{ - asm_unified("\n\ - push {r4-r7,lr}\n\ - mov r7, r9\n\ - mov r6, r8\n\ - push {r6,r7}\n\ - ldr r1, =gSaveBlock2Ptr\n\ - ldr r3, [r1]\n\ - adds r0, r3, 0\n\ - adds r0, 0xB1\n\ - ldrb r0, [r0]\n\ - lsls r0, 26\n\ - lsrs r0, 28\n\ - adds r7, r1, 0\n\ - cmp r0, 0x2\n\ - bhi _081A1242\n\ - b _081A1362\n\ -_081A1242:\n\ - movs r5, 0\n\ - movs r2, 0\n\ - adds r0, r3, 0\n\ - adds r0, 0xB8\n\ - ldrb r0, [r0]\n\ - lsls r0, 30\n\ - ldr r1, =gSpecialVar_0x8005\n\ - mov r12, r1\n\ - ldr r1, =gSpecialVar_Result\n\ - mov r8, r1\n\ - cmp r0, 0\n\ - beq _081A127C\n\ - adds r3, r7, 0\n\ -_081A125C:\n\ - adds r0, r5, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r2, 0x8\n\ - bhi _081A127C\n\ - ldr r0, [r3]\n\ - lsls r1, r2, 2\n\ - adds r0, r1\n\ - adds r0, 0xB8\n\ - ldrb r0, [r0]\n\ - lsls r0, 30\n\ - cmp r0, 0\n\ - bne _081A125C\n\ -_081A127C:\n\ - movs r4, 0\n\ - cmp r4, r5\n\ - bcs _081A1322\n\ - ldr r0, [r7]\n\ - adds r0, 0xB1\n\ - ldrb r0, [r0]\n\ - lsls r0, 26\n\ - lsrs r0, 28\n\ - subs r0, 0x3\n\ - cmp r4, r0\n\ - bge _081A1322\n\ - adds r6, r7, 0\n\ - mov r9, r4\n\ -_081A1296:\n\ - ldr r3, [r6]\n\ - lsls r0, r4, 2\n\ - adds r2, r3, r0\n\ - adds r0, r2, 0\n\ - adds r0, 0xB8\n\ - ldrb r1, [r0]\n\ - lsls r0, r1, 30\n\ - lsrs r0, 30\n\ - cmp r0, 0x1\n\ - bne _081A1308\n\ - lsrs r0, r1, 6\n\ - cmp r0, 0\n\ - beq _081A1308\n\ - adds r0, r2, 0\n\ - adds r0, 0xBA\n\ - ldrh r0, [r0]\n\ - mov r2, r12\n\ - ldrh r2, [r2]\n\ - cmp r0, r2\n\ - bne _081A1308\n\ - adds r0, r3, 0\n\ - adds r0, 0xB1\n\ - ldrb r0, [r0]\n\ - lsls r0, 26\n\ - lsrs r0, 28\n\ - subs r0, 0x3\n\ - lsls r0, 2\n\ - adds r0, r3, r0\n\ - adds r0, 0xB8\n\ - ldrb r2, [r0]\n\ - movs r1, 0x3F\n\ - ands r1, r2\n\ - strb r1, [r0]\n\ - ldr r1, [r6]\n\ - adds r0, r1, 0\n\ - adds r0, 0xB1\n\ - ldrb r0, [r0]\n\ - lsls r0, 26\n\ - lsrs r0, 28\n\ - subs r0, 0x3\n\ - lsls r0, 2\n\ - adds r1, r0\n\ - mov r2, r12\n\ - ldrh r0, [r2]\n\ - adds r1, 0xBA\n\ - strh r0, [r1]\n\ - mov r1, r9\n\ - mov r0, r8\n\ - strh r1, [r0]\n\ - b _081A1362\n\ - .pool\n\ -_081A1308:\n\ - adds r0, r4, 0x1\n\ - lsls r0, 24\n\ - lsrs r4, r0, 24\n\ - cmp r4, r5\n\ - bcs _081A1322\n\ - ldr r0, [r6]\n\ - adds r0, 0xB1\n\ - ldrb r0, [r0]\n\ - lsls r0, 26\n\ - lsrs r0, 28\n\ - subs r0, 0x3\n\ - cmp r4, r0\n\ - blt _081A1296\n\ -_081A1322:\n\ - ldr r2, [r7]\n\ - adds r0, r2, 0\n\ - adds r0, 0xB1\n\ - ldrb r0, [r0]\n\ - lsls r0, 26\n\ - lsrs r0, 28\n\ - subs r0, 0x3\n\ - lsls r0, 2\n\ - adds r2, r0\n\ - adds r2, 0xB8\n\ - ldrb r1, [r2]\n\ - movs r0, 0x3F\n\ - ands r0, r1\n\ - movs r1, 0x40\n\ - orrs r0, r1\n\ - strb r0, [r2]\n\ - ldr r1, [r7]\n\ - adds r0, r1, 0\n\ - adds r0, 0xB1\n\ - ldrb r0, [r0]\n\ - lsls r0, 26\n\ - lsrs r0, 28\n\ - subs r0, 0x3\n\ - lsls r0, 2\n\ - adds r1, r0\n\ - mov r2, r12\n\ - ldrh r0, [r2]\n\ - adds r1, 0xBA\n\ - strh r0, [r1]\n\ - movs r0, 0x1\n\ - mov r1, r8\n\ - strh r0, [r1]\n\ -_081A1362:\n\ - pop {r3,r4}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ -"); -} -#endif // NONMATCHING static void sub_81A1370(void) { From b8d5c5fb7680b270848f4b919ece5e5c7ad257fa Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 16 Apr 2019 18:15:03 -0500 Subject: [PATCH 8/8] Match sub_81D199C --- src/pokenav_match_call_data.c | 135 ++++------------------------------ 1 file changed, 14 insertions(+), 121 deletions(-) diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 02c39f98a..70fa42541 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -1119,8 +1119,6 @@ static void sub_81D1920(const match_call_text_data_t *sub0, u8 *dest) StringExpandPlaceholders(dest, sub0[i].text); } -#ifdef NONMATCHING -// There's some weird upmerge going on that I cannot replicate at this time. static void sub_81D199C(const match_call_text_data_t *sub0, u16 idx, u8 *dest) { u32 i; @@ -1128,7 +1126,7 @@ static void sub_81D199C(const match_call_text_data_t *sub0, u16 idx, u8 *dest) { if (sub0[i].flag == 0xfffe) break; - if (sub0[i].flag == 0xffff && !FlagGet(sub0[i].flag)) + if (sub0[i].flag != 0xffff && !FlagGet(sub0[i].flag)) break; } if (sub0[i].flag != 0xfffe) @@ -1141,127 +1139,22 @@ static void sub_81D199C(const match_call_text_data_t *sub0, u16 idx, u8 *dest) } else { - if (!FlagGet(FLAG_SYS_GAME_CLEAR)) - ; - else if (gSaveBlock1Ptr->trainerRematches[idx]) - i += 2; - else if (CountBattledRematchTeams(idx) >= 2) - i += 3; - else - i++; + if (FlagGet(FLAG_SYS_GAME_CLEAR)) + { + do + { + if (gSaveBlock1Ptr->trainerRematches[idx]) + i += 2; + else if (CountBattledRematchTeams(idx) >= 2) + i += 3; + else + i++; + } while (0); + } + StringExpandPlaceholders(dest, sub0[i].text); } } -#else -static NAKED void sub_81D199C(const match_call_text_data_t *sub0, u16 idx, u8 *dest) -{ - asm_unified("\tpush {r4-r7,lr}\n" - "\tmov r7, r10\n" - "\tmov r6, r9\n" - "\tmov r5, r8\n" - "\tpush {r5-r7}\n" - "\tadds r6, r0, 0\n" - "\tmov r10, r2\n" - "\tlsls r1, 16\n" - "\tlsrs r7, r1, 16\n" - "\tmovs r5, 0\n" - "\tldr r0, [r6]\n" - "\tcmp r0, 0\n" - "\tbeq _081D19E6\n" - "\tldrh r0, [r6, 0x4]\n" - "\tldr r1, =0x0000fffe\n" - "\tcmp r0, r1\n" - "\tbeq _081D1A24\n" - "\tldr r0, =0x0000ffff\n" - "\tmov r9, r0\n" - "\tmov r8, r1\n" - "\tadds r4, r6, 0\n" - "_081D19C6:\n" - "\tldrh r0, [r4, 0x4]\n" - "\tcmp r0, r9\n" - "\tbeq _081D19D6\n" - "\tbl FlagGet\n" - "\tlsls r0, 24\n" - "\tcmp r0, 0\n" - "\tbeq _081D19E6\n" - "_081D19D6:\n" - "\tadds r4, 0x8\n" - "\tadds r5, 0x1\n" - "\tldr r0, [r4]\n" - "\tcmp r0, 0\n" - "\tbeq _081D19E6\n" - "\tldrh r0, [r4, 0x4]\n" - "\tcmp r0, r8\n" - "\tbne _081D19C6\n" - "_081D19E6:\n" - "\tlsls r0, r5, 3\n" - "\tadds r0, r6\n" - "\tldrh r1, [r0, 0x4]\n" - "\tldr r0, =0x0000fffe\n" - "\tcmp r1, r0\n" - "\tbeq _081D1A24\n" - "\tcmp r5, 0\n" - "\tbeq _081D19F8\n" - "\tsubs r5, 0x1\n" - "_081D19F8:\n" - "\tlsls r0, r5, 3\n" - "\tadds r4, r0, r6\n" - "\tldrh r1, [r4, 0x6]\n" - "\tldr r0, =0x0000ffff\n" - "\tcmp r1, r0\n" - "\tbeq _081D1A0A\n" - "\tadds r0, r1, 0\n" - "\tbl FlagSet\n" - "_081D1A0A:\n" - "\tldr r1, [r4]\n" - "\tmov r0, r10\n" - "\tbl StringExpandPlaceholders\n" - "\tb _081D1A5C\n" - "\t.pool\n" - "_081D1A1C:\n" - "\tadds r5, 0x2\n" - "\tb _081D1A50\n" - "_081D1A20:\n" - "\tadds r5, 0x3\n" - "\tb _081D1A50\n" - "_081D1A24:\n" - "\tldr r0, =0x00000864\n" - "\tbl FlagGet\n" - "\tlsls r0, 24\n" - "\tcmp r0, 0\n" - "\tbeq _081D1A50\n" - "\tldr r0, =gSaveBlock1Ptr\n" - "\tldr r0, [r0]\n" - "\tldr r1, =0x000009ca\n" - "\tadds r0, r1\n" - "\tadds r0, r7\n" - "\tldrb r0, [r0]\n" - "\tcmp r0, 0\n" - "\tbne _081D1A1C\n" - "\tadds r0, r7, 0\n" - "\tbl CountBattledRematchTeams\n" - "\tlsls r0, 16\n" - "\tlsrs r0, 16\n" - "\tcmp r0, 0x1\n" - "\tbhi _081D1A20\n" - "\tadds r5, 0x1\n" - "_081D1A50:\n" - "\tlsls r0, r5, 3\n" - "\tadds r0, r6\n" - "\tldr r1, [r0]\n" - "\tmov r0, r10\n" - "\tbl StringExpandPlaceholders\n" - "_081D1A5C:\n" - "\tpop {r3-r5}\n" - "\tmov r8, r3\n" - "\tmov r9, r4\n" - "\tmov r10, r5\n" - "\tpop {r4-r7}\n" - "\tpop {r0}\n" - "\tbx r0\n" - "\t.pool"); -} -#endif void sub_81D1A78(u32 idx, const u8 **desc, const u8 **name) {