diff options
Diffstat (limited to 'include')
-rw-r--r--[-rwxr-xr-x] | include/battle.h | 0 | ||||
-rw-r--r-- | include/battle_setup.h | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | include/decoration.h | 0 | ||||
-rw-r--r-- | include/global.h | 5 | ||||
-rw-r--r--[-rwxr-xr-x] | include/graphics.h | 112 | ||||
-rw-r--r-- | include/item.h | 18 | ||||
-rw-r--r-- | include/item_menu.h | 12 | ||||
-rw-r--r-- | include/item_use.h | 25 | ||||
-rw-r--r-- | include/items.h | 3 | ||||
-rw-r--r-- | include/link.h | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | include/menu.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/menu_helpers.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/pokeblock.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/pokemon.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/pokenav.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/region_map.h | 0 | ||||
-rw-r--r-- | include/script.h | 14 | ||||
-rw-r--r-- | include/script_menu.h | 2 | ||||
-rw-r--r-- | include/songs.h | 10 | ||||
-rw-r--r--[-rwxr-xr-x] | include/strings.h | 2 | ||||
-rw-r--r-- | include/text.h | 5 | ||||
-rw-r--r--[-rwxr-xr-x] | include/use_pokeblock.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/vars.h | 0 |
23 files changed, 175 insertions, 36 deletions
diff --git a/include/battle.h b/include/battle.h index d4cb53689..d4cb53689 100755..100644 --- a/include/battle.h +++ b/include/battle.h diff --git a/include/battle_setup.h b/include/battle_setup.h index e88aefe6d..c8c463f6d 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -87,7 +87,7 @@ bool32 battle_exit_is_player_defeat(u32 a1); //void sub_80822BC(void); //void TrainerBattleLoadArgs(const struct TrainerBattleSpec *specs, u8 *data); //void battle_80801F0(void); -u8 *TrainerBattleConfigure(u8 *data); +u8 *TrainerBattleConfigure(const u8 *data); void TrainerWantsBattle(u8, u8 *); bool32 GetTrainerFlagFromScriptPointer(u8 *data); //void sub_8082524(void); diff --git a/include/decoration.h b/include/decoration.h index 0863b4338..0863b4338 100755..100644 --- a/include/decoration.h +++ b/include/decoration.h diff --git a/include/global.h b/include/global.h index 0f5bcde6d..4d20ea4fc 100644 --- a/include/global.h +++ b/include/global.h @@ -115,11 +115,6 @@ enum BAG_KEYITEMS }; -struct TextStruct -{ - const u8 *text; -}; - struct Coords16 { s16 x; diff --git a/include/graphics.h b/include/graphics.h index 36b11fd0a..fb9781147 100755..100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2435,12 +2435,118 @@ extern const u8 gMonFrontPic_UnownQuestionMark[]; extern const u8 gMonBackPic_UnownQuestionMark[]; extern const u8 gMonIcon_UnownQuestionMark[]; -// src/pokeblock.c +// data/graphics.s +extern const u8 gBagMaleTiles[]; +extern const u8 gBagFemaleTiles[]; +extern const u8 gBagPalette[]; +extern const u8 gBagScreen_Gfx[]; +extern const u8 gBagScreenMale_Pal[]; +extern const u8 gBagScreenFemale_Pal[]; +extern const u16 gUnknown_08E77004[]; +extern const u8 gBuyMenuFrame_Gfx[]; +extern const u8 gMenuMoneyPal[]; +extern const u8 gBuyMenuFrame_Tilemap[]; +extern const u8 gMenuMoneyGfx[]; extern const u8 gMenuPokeblock_Gfx[]; -extern const u8 gMenuPokeblock_Tilemap[]; extern const u8 gMenuPokeblock_Pal[]; - extern const u8 gMenuPokeblockDevice_Gfx[]; extern const u8 gMenuPokeblockDevice_Pal[]; +extern const u8 gMenuPokeblock_Tilemap[]; + +extern const u8 gBerryCheck_Gfx[]; +extern const u8 gBerryCheck_Pal[]; +extern const u8 gUnknown_08E788E4[]; +extern const u8 gUnknown_08E78A84[]; +extern const u8 gBerryCheckCircle_Gfx[]; + +// data/graphics/berries/graphics.inc +extern const u8 gBerryPic_Cheri[]; +extern const u8 gBerryPic_Oran[]; +extern const u8 gBerryPic_Pecha[]; +extern const u8 gBerryPic_Rawst[]; +extern const u8 gBerryPic_Aspear[]; +extern const u8 gBerryPic_Leppa[]; +extern const u8 gBerryPic_Chesto[]; +extern const u8 gBerryPic_Persim[]; +extern const u8 gBerryPic_Lum[]; +extern const u8 gBerryPic_Sitrus[]; +extern const u8 gBerryPic_Figy[]; +extern const u8 gBerryPic_Wiki[]; +extern const u8 gBerryPic_Mago[]; +extern const u8 gBerryPic_Aguav[]; +extern const u8 gBerryPic_Iapapa[]; +extern const u8 gBerryPic_Razz[]; +extern const u8 gBerryPic_Bluk[]; +extern const u8 gBerryPic_Nanab[]; +extern const u8 gBerryPic_Wepear[]; +extern const u8 gBerryPic_Pinap[]; +extern const u8 gBerryPic_Pomeg[]; +extern const u8 gBerryPic_Kelpsy[]; +extern const u8 gBerryPic_Qualot[]; +extern const u8 gBerryPic_Hondew[]; +extern const u8 gBerryPic_Grepa[]; +extern const u8 gBerryPic_Tamato[]; +extern const u8 gBerryPic_Cornn[]; +extern const u8 gBerryPic_Magost[]; +extern const u8 gBerryPic_Rabuta[]; +extern const u8 gBerryPic_Nomel[]; +extern const u8 gBerryPic_Spelon[]; +extern const u8 gBerryPic_Pamtre[]; +extern const u8 gBerryPic_Watmel[]; +extern const u8 gBerryPic_Durin[]; +extern const u8 gBerryPic_Belue[]; +extern const u8 gBerryPic_Liechi[]; +extern const u8 gBerryPic_Ganlon[]; +extern const u8 gBerryPic_Salac[]; +extern const u8 gBerryPic_Petaya[]; +extern const u8 gBerryPic_Apicot[]; +extern const u8 gBerryPic_Lansat[]; +extern const u8 gBerryPic_Starf[]; +extern const u8 gBerryPic_Enigma[]; +extern const u8 gBerryPalette_Cheri[]; +extern const u8 gBerryPalette_Oran[]; +extern const u8 gBerryPalette_Pecha[]; +extern const u8 gBerryPalette_Rawst[]; +extern const u8 gBerryPalette_Aspear[]; +extern const u8 gBerryPalette_Leppa[]; +extern const u8 gBerryPalette_Chesto[]; +extern const u8 gBerryPalette_Persim[]; +extern const u8 gBerryPalette_Lum[]; +extern const u8 gBerryPalette_Sitrus[]; +extern const u8 gBerryPalette_Figy[]; +extern const u8 gBerryPalette_Wiki[]; +extern const u8 gBerryPalette_Mago[]; +extern const u8 gBerryPalette_Aguav[]; +extern const u8 gBerryPalette_Iapapa[]; +extern const u8 gBerryPalette_Razz[]; +extern const u8 gBerryPalette_Bluk[]; +extern const u8 gBerryPalette_Nanab[]; +extern const u8 gBerryPalette_Wepear[]; +extern const u8 gBerryPalette_Pinap[]; +extern const u8 gBerryPalette_Pomeg[]; +extern const u8 gBerryPalette_Kelpsy[]; +extern const u8 gBerryPalette_Qualot[]; +extern const u8 gBerryPalette_Hondew[]; +extern const u8 gBerryPalette_Grepa[]; +extern const u8 gBerryPalette_Tamato[]; +extern const u8 gBerryPalette_Cornn[]; +extern const u8 gBerryPalette_Magost[]; +extern const u8 gBerryPalette_Rabuta[]; +extern const u8 gBerryPalette_Nomel[]; +extern const u8 gBerryPalette_Spelon[]; +extern const u8 gBerryPalette_Pamtre[]; +extern const u8 gBerryPalette_Watmel[]; +extern const u8 gBerryPalette_Durin[]; +extern const u8 gBerryPalette_Belue[]; +extern const u8 gBerryPalette_Liechi[]; +extern const u8 gBerryPalette_Ganlon[]; +extern const u8 gBerryPalette_Salac[]; +extern const u8 gBerryPalette_Petaya[]; +extern const u8 gBerryPalette_Apicot[]; +extern const u8 gBerryPalette_Lansat[]; +extern const u8 gBerryPalette_Starf[]; +extern const u8 gBerryPalette_Enigma[]; + +extern const u8 gUnknown_08E96EC8[]; #endif // GUARD_GRAPHICS_H diff --git a/include/item.h b/include/item.h index 47af11940..8f6cc883b 100644 --- a/include/item.h +++ b/include/item.h @@ -11,7 +11,7 @@ struct Item u16 price; u8 holdEffect; u8 holdEffectParam; - u8 *description; + const u8 *description; u8 importance; u8 unk19; u8 pocket; @@ -22,6 +22,16 @@ struct Item u8 secondaryId; }; +struct BagPocket +{ + struct ItemSlot *itemSlots; + u8 capacity; +}; + +#define NUM_BAG_POCKETS 5 + +extern const struct BagPocket gBagPockets[NUM_BAG_POCKETS]; + void CopyItemName(u16 itemId, u8 *string); bool8 IsBagPocketNonEmpty(u8 pocket); bool8 CheckBagHasItem(u16 itemId, u16 count); @@ -35,13 +45,13 @@ bool8 CheckPCHasItem(u16 itemId, u16 count); bool8 AddPCItem(u16 itemId, u16 count); void RemovePCItem(u8 index, u16 count); void SwapRegisteredBike(void); -struct Item *ItemId_GetItem(u16 itemId); +const struct Item *ItemId_GetItem(u16 itemId); u16 ItemId_GetId(u16 itemId); u16 ItemId_GetPrice(u16 itemId); u8 ItemId_GetHoldEffect(u16 itemId); u8 ItemId_GetHoldEffectParam(u16 itemId); -u8 *ItemId_GetDescription(u16 itemId); -bool8 ItemId_CopyDescription(u8 *a, u32 itemId, u32 c); +const u8 *ItemId_GetDescription(u16 itemId); +bool32 ItemId_CopyDescription(u8 *a, u32 itemId, u32 c); u8 ItemId_GetImportance(u16 itemId); u8 ItemId_GetUnknownValue(u16 itemId); u8 ItemId_GetPocket(u16 itemId); diff --git a/include/item_menu.h b/include/item_menu.h index 301836ac8..6950ed0ff 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -3,12 +3,12 @@ #include "string_util.h" -void sub_80A3684(void); +void ResetBagScrollPositions(void); void ClearBag(void); void sub_80A3E0C(void); -void sub_80A3FA0(u16 *, u32, u32, u32, u32, u32); +void sub_80A3FA0(u16 *a, u8 b, u8 c, u8 d, u8 e, u16 f); void sub_80A4164(u8 *, u16, enum StringConvertMode, u8); -void sub_80A418C(u16, enum StringConvertMode, int, int, int); +void sub_80A418C(u16 a, enum StringConvertMode b, u8 c, u8 d, u8 e); void sub_80A53F8(void); void HandleItemMenuPaletteFade(u8); void sub_80A5B40(void); @@ -19,11 +19,11 @@ void sub_80A5D04(void); void sub_80A6300(void); void sub_80A68CC(); void sub_80A6A30(void); -int sub_80A6D1C(void); +bool32 sub_80A6D1C(void); void sub_80A6DCC(void); void sub_80A7094(u8); -u8 sub_80A7D8C(u8 berry, int i, int i1); +u8 CreateBerrySprite(u8, s16, s16); void sub_80A7DD4(void); -u8 sub_80A7E5C(u8); +u8 sub_80A7E5C(s16); #endif // GUARD_ITEM_MENU_H diff --git a/include/item_use.h b/include/item_use.h index 61a3b4f7a..1558f7691 100644 --- a/include/item_use.h +++ b/include/item_use.h @@ -3,28 +3,51 @@ extern u16 gScriptItemId; +void ItemUseOutOfBattle_Mail(u8); +void ItemUseOutOfBattle_Bike(u8); void ItemUseOnFieldCB_Bike(u8); +void ItemUseOutOfBattle_Rod(u8); void ItemUseOnFieldCB_Rod(u8); +void ItemUseOutOfBattle_Itemfinder(u8); void ItemUseOnFieldCB_Itemfinder(u8); void RunItemfinderResults(u8); void ExitItemfinder(u8); -bool8 ItemfinderCheckForHiddenItems(struct MapEvents *events, u8 taskId); +bool8 ItemfinderCheckForHiddenItems(struct MapEvents *, u8); void sub_80C9720(u8); void sub_80C9838(u8, s16, s16); u8 GetPlayerDirectionTowardsHiddenItem(s16, s16); void SetPlayerDirectionTowardsItem(u8); void DisplayItemRespondingMessageAndExitItemfinder(u8); void RotatePlayerAndExitItemfinder(u8); +void ItemUseOutOfBattle_PokeblockCase(u8); +void ItemUseOutOfBattle_CoinCase(u8); +void ItemUseOutOfBattle_SSTicket(u8); void sub_80C9D00(u8); +void ItemUseOutOfBattle_WailmerPail(u8); void sub_80C9D74(u8); +void ItemUseOutOfBattle_Medicine(u8); +void ItemUseOutOfBattle_SacredAsh(u8); +void ItemUseOutOfBattle_PPRecovery(u8); +void ItemUseOutOfBattle_PPUp(u8); +void ItemUseOutOfBattle_RareCandy(u8); void ItemUseOutOfBattle_TMHM(u8); void sub_80C9EE4(u8); void sub_80C9F10(u8); void sub_80C9F80(u8); void sub_80C9FC0(u8); +void ItemUseOutOfBattle_Repel(u8); +void ItemUseOutOfBattle_BlackWhiteFlute(u8); void task08_080A1C44(u8); u8 sub_80CA1C8(void); +void ItemUseOutOfBattle_EscapeRope(u8); void ItemUseOutOfBattle_EvolutionStone(u8); +void ItemUseInBattle_PokeBall(u8); +void ItemUseInBattle_StatIncrease(u8); +void ItemUseInBattle_Medicine(u8); +void ItemUseInBattle_PPRecovery(u8); +void ItemUseInBattle_Escape(u8); +void ItemUseOutOfBattle_EnigmaBerry(u8); +void ItemUseInBattle_EnigmaBerry(u8); void ItemUseOutOfBattle_CannotUse(u8); #endif // GUARD_ITEM_USE_H diff --git a/include/items.h b/include/items.h index f3c506b43..69515f18e 100644 --- a/include/items.h +++ b/include/items.h @@ -1,7 +1,8 @@ #ifndef GUARD_ITEMS_H #define GUARD_ITEMS_H -enum { +enum +{ ITEM_NONE, // 0x000 ITEM_MASTER_BALL, // 0x001 ITEM_ULTRA_BALL, // 0x002 diff --git a/include/link.h b/include/link.h index f80f2bc58..367add625 100644 --- a/include/link.h +++ b/include/link.h @@ -144,6 +144,7 @@ extern u8 deUnkValue2; extern struct LinkPlayer gLinkPlayers[]; extern u16 word_3002910[]; extern bool8 gReceivedRemoteLinkPlayers; +extern bool8 gLinkOpen; void Task_DestroySelf(u8); void sub_8007270(u8); diff --git a/include/menu.h b/include/menu.h index 9b48ab79b..9b48ab79b 100755..100644 --- a/include/menu.h +++ b/include/menu.h diff --git a/include/menu_helpers.h b/include/menu_helpers.h index 993d698bd..993d698bd 100755..100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h diff --git a/include/pokeblock.h b/include/pokeblock.h index 0d8e965e4..0d8e965e4 100755..100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h diff --git a/include/pokemon.h b/include/pokemon.h index c69fb87e0..c69fb87e0 100755..100644 --- a/include/pokemon.h +++ b/include/pokemon.h diff --git a/include/pokenav.h b/include/pokenav.h index 70cc4135f..70cc4135f 100755..100644 --- a/include/pokenav.h +++ b/include/pokenav.h diff --git a/include/region_map.h b/include/region_map.h index 6dfa4dcf0..6dfa4dcf0 100755..100644 --- a/include/region_map.h +++ b/include/region_map.h diff --git a/include/script.h b/include/script.h index 5577fcb01..e35ec7608 100644 --- a/include/script.h +++ b/include/script.h @@ -12,8 +12,8 @@ struct ScriptContext u8 mode; u8 comparisonResult; u8 (*nativePtr)(void); - u8 *scriptPtr; - u8 *stack[20]; + const u8 *scriptPtr; + const u8 *stack[20]; ScrCmdFunc *cmdTable; ScrCmdFunc *cmdTableEnd; u32 data[4]; @@ -22,12 +22,12 @@ struct ScriptContext #define ScriptReadByte(ctx) (*(ctx->scriptPtr++)) void InitScriptContext(struct ScriptContext *ctx, void *cmdTable, void *cmdTableEnd); -u8 SetupBytecodeScript(struct ScriptContext *ctx, void *ptr); +u8 SetupBytecodeScript(struct ScriptContext *ctx, const u8 *ptr); void SetupNativeScript(struct ScriptContext *ctx, void *ptr); void StopScript(struct ScriptContext *ctx); u8 RunScript(struct ScriptContext *ctx); -u8 ScriptPush(struct ScriptContext *ctx, u8 *ptr); -u8 *ScriptPop(struct ScriptContext *ctx); +u8 ScriptPush(struct ScriptContext *ctx, const u8 *ptr); +const u8 *ScriptPop(struct ScriptContext *ctx); void ScriptJump(struct ScriptContext *ctx, u8 *ptr); void ScriptCall(struct ScriptContext *ctx, u8 *ptr); void ScriptReturn(struct ScriptContext *ctx); @@ -38,10 +38,10 @@ void ScriptContext2_Disable(void); bool8 ScriptContext2_IsEnabled(void); void ScriptContext1_Init(void); bool8 ScriptContext2_RunScript(void); -void ScriptContext1_SetupScript(u8 *ptr); +void ScriptContext1_SetupScript(const u8 *ptr); void ScriptContext1_Stop(void); void EnableBothScriptContexts(void); -void ScriptContext2_RunNewScript(u8 *ptr); +void ScriptContext2_RunNewScript(const u8 *ptr); u8 *mapheader_get_tagged_pointer(u8 tag); void mapheader_run_script_by_tag(u8 tag); u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag); diff --git a/include/script_menu.h b/include/script_menu.h index 458aad13d..cc5c442ec 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -7,7 +7,7 @@ struct MultichoiceListStruct u8 count; }; -extern const struct TextStruct gUnknown_083CE048[]; +extern const u8 *const gUnknown_083CE048[]; bool8 sub_80B5054(u8 left, u8 top, u8 var3, u8 var4); bool8 sub_80B50B0(u8 left, u8 top, u8 var3, u8 var4, u8 var5); diff --git a/include/songs.h b/include/songs.h index a813cc785..8cf7ee5e9 100644 --- a/include/songs.h +++ b/include/songs.h @@ -94,11 +94,11 @@ enum SE_T_KAMI2, SE_ELEBETA, /*0x5A*/ SE_HINSI, - SE_EXPMAX, - SE_TAMAKORO, - SE_TAMAKORO_E, - SE_BASABASA, - SE_REGI, + /*0x5B*/ SE_EXPMAX, + /*0x5C*/ SE_TAMAKORO, + /*0x5D*/ SE_TAMAKORO_E, + /*0x5E*/ SE_BASABASA, + /*0x5F*/ SE_REGI, SE_C_GAJI, SE_C_MAKU_U, SE_C_MAKU_D, diff --git a/include/strings.h b/include/strings.h index 89a78e478..fe9cfc6ba 100755..100644 --- a/include/strings.h +++ b/include/strings.h @@ -188,7 +188,7 @@ extern const u8 OtherText_TheField[]; extern const u8 OtherText_TheField2[]; extern const u8 OtherText_ThePC[]; -extern const struct TextStruct gUnknown_0840E740[]; +extern const u8 *const gUnknown_0840E740[7]; extern const u8 gOtherText_ReturnTo[]; extern const u8 gOtherText_WhatWillYouDo2[]; diff --git a/include/text.h b/include/text.h index cf413644b..99987d2c3 100644 --- a/include/text.h +++ b/include/text.h @@ -9,8 +9,9 @@ #define CHAR_ELLIPSIS 0xB0 #define CHAR_MALE 0xB5 #define CHAR_FEMALE 0xB6 -#define CHAR_COMMA 0xB8 #define CHAR_CURRENCY 0xB7 +#define CHAR_COMMA 0xB8 +#define CHAR_MULT_SIGN 0xB9 #define CHAR_SLASH 0xBA #define CHAR_A 0xBB #define CHAR_B 0xBC @@ -65,6 +66,8 @@ #define CHAR_y 0xED #define CHAR_z 0xEE #define CHAR_COLON 0xF0 +#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog +#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog #define EXT_CTRL_CODE_BEGIN 0xFC // extended control code #define PLACEHOLDER_BEGIN 0xFD // string placeholder #define CHAR_NEWLINE 0xFE diff --git a/include/use_pokeblock.h b/include/use_pokeblock.h index 978476d89..978476d89 100755..100644 --- a/include/use_pokeblock.h +++ b/include/use_pokeblock.h diff --git a/include/vars.h b/include/vars.h index e08f344d4..e08f344d4 100755..100644 --- a/include/vars.h +++ b/include/vars.h |