summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bard_music.c4
-rwxr-xr-xsrc/battle_anim_effects_3.c1
-rw-r--r--src/battle_anim_flying.c1
-rw-r--r--src/battle_anim_mons.c7
-rw-r--r--src/battle_anim_normal.c2
-rwxr-xr-xsrc/battle_anim_throw.c2
-rw-r--r--src/battle_anim_water.c2
-rw-r--r--src/battle_controller_link_opponent.c1
-rw-r--r--src/battle_controller_opponent.c1
-rw-r--r--src/battle_controller_recorded_opponent.c1
-rw-r--r--src/battle_controller_safari.c2
-rw-r--r--src/battle_interface.c1
-rw-r--r--src/battle_main.c2
-rw-r--r--src/berry_blender.c2
-rwxr-xr-xsrc/berry_crush.c6
-rw-r--r--src/cable_club.c3
-rw-r--r--src/contest.c1
-rw-r--r--src/credits.c4
-rw-r--r--src/data/bard_music/bard_sounds.h46
-rwxr-xr-xsrc/data/easy_chat/easy_chat_groups.h88
-rw-r--r--src/data/items.h1277
-rw-r--r--src/data/party_menu.h116
-rw-r--r--src/decompress.c6
-rw-r--r--src/decoration.c2
-rw-r--r--src/diploma.c2
-rw-r--r--src/easy_chat.c1
-rwxr-xr-xsrc/ereader_screen.c1
-rw-r--r--src/event_object_movement.c72
-rw-r--r--src/evolution_scene.c1
-rwxr-xr-xsrc/faraway_island.c1
-rw-r--r--src/field_effect.c62
-rwxr-xr-xsrc/field_effect_helpers.c36
-rw-r--r--src/fieldmap.c2
-rw-r--r--src/fldeff_cut.c1
-rw-r--r--src/fldeff_escalator.c2
-rw-r--r--src/frontier_util.c4
-rw-r--r--src/image_processing_effects.c208
-rw-r--r--src/intro.c3
-rw-r--r--src/item.c4
-rwxr-xr-xsrc/item_menu.c7
-rwxr-xr-xsrc/item_use.c31
-rw-r--r--src/librfu_rfu.c1
-rw-r--r--src/mail.c10
-rw-r--r--src/main_menu.c4
-rw-r--r--src/match_call.c1
-rw-r--r--src/mauville_old_man.c1
-rw-r--r--src/mevent_server.c4
-rw-r--r--src/minigame_countdown.c1
-rw-r--r--src/overworld.c1
-rw-r--r--src/palette.c46
-rwxr-xr-xsrc/party_menu.c8
-rw-r--r--src/player_pc.c5
-rw-r--r--src/pokeblock_feed.c1
-rw-r--r--src/pokedex.c7
-rwxr-xr-xsrc/pokedex_area_screen.c1
-rw-r--r--src/pokemon.c5
-rw-r--r--src/pokemon_icon.c2
-rw-r--r--src/pokemon_storage_system.c2
-rw-r--r--src/pokenav_conditions_3.c2
-rw-r--r--src/pokenav_main_menu.c2
-rw-r--r--src/pokenav_menu_handler_2.c2
-rw-r--r--src/pokenav_ribbons_1.c2
-rw-r--r--src/record_mixing.c1
-rw-r--r--src/region_map.c2
-rw-r--r--src/save_failed_screen.c4
-rw-r--r--src/script.c2
-rw-r--r--src/secret_base.c2
-rwxr-xr-xsrc/shop.c1
-rw-r--r--src/starter_choose.c1
-rw-r--r--src/tv.c5
70 files changed, 870 insertions, 1272 deletions
diff --git a/src/bard_music.c b/src/bard_music.c
index 6c2578071..1a61c25ff 100644
--- a/src/bard_music.c
+++ b/src/bard_music.c
@@ -25,8 +25,8 @@ const struct BardSound *GetWordSounds(u16 word)
{
return gBardSound_InvalidWord;
}
- category = word >> 9;
- subword = word & 0x1ff;
+ category = EC_GROUP(word);
+ subword = EC_INDEX(word);
switch (category)
{
case EC_GROUP_POKEMON:
diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c
index 9e50a8477..f73a2dee7 100755
--- a/src/battle_anim_effects_3.c
+++ b/src/battle_anim_effects_3.c
@@ -4947,7 +4947,6 @@ static void AnimTask_OdorSleuthMovementWaitFinish(u8 taskId)
static void MoveOdorSleuthClone(struct Sprite *sprite)
{
- int zero = 0;
if (++sprite->data[1] > 1)
{
sprite->data[1] = 0;
diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c
index f8d47f4ec..7d96fed8c 100644
--- a/src/battle_anim_flying.c
+++ b/src/battle_anim_flying.c
@@ -708,7 +708,6 @@ static void sub_810E520(struct Sprite *sprite)
}
}
data->unk0_0d = 0;
- data->unk2;
}
data->unk0_1 = 0;
break;
diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c
index d626e1604..0c3d4ea47 100644
--- a/src/battle_anim_mons.c
+++ b/src/battle_anim_mons.c
@@ -16,13 +16,6 @@
#include "util.h"
#include "constants/battle_anim.h"
-#define GET_UNOWN_LETTER(personality) (( \
- (((personality & 0x03000000) >> 24) << 6) \
- | (((personality & 0x00030000) >> 16) << 4) \
- | (((personality & 0x00000300) >> 8) << 2) \
- | (((personality & 0x00000003) >> 0) << 0) \
-) % 28)
-
#define IS_DOUBLE_BATTLE() ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
extern const struct OamData gOamData_AffineNormal_ObjNormal_64x64;
diff --git a/src/battle_anim_normal.c b/src/battle_anim_normal.c
index f7df9a4a9..e32ff3151 100644
--- a/src/battle_anim_normal.c
+++ b/src/battle_anim_normal.c
@@ -564,8 +564,6 @@ static void AnimTask_BlendColorCycleExcludeLoop(u8 taskId)
// See AnimTask_BlendColorCycle. Same, but selects palette by ANIM_TAG_*
void AnimTask_BlendColorCycleByTag(u8 taskId)
{
- u8 paletteIndex;
-
gTasks[taskId].tPalTag = gBattleAnimArgs[0];
gTasks[taskId].tDelay = gBattleAnimArgs[1];
gTasks[taskId].tNumBlends = gBattleAnimArgs[2];
diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c
index fef301326..0da766036 100755
--- a/src/battle_anim_throw.c
+++ b/src/battle_anim_throw.c
@@ -1551,8 +1551,6 @@ static void SpriteCB_Ball_Block_Step(struct Sprite *sprite)
static void LoadBallParticleGfx(u8 ballId)
{
- u8 taskId;
-
if (GetSpriteTileStartByTag(sBallParticleSpriteSheets[ballId].tag) == 0xFFFF)
{
LoadCompressedSpriteSheetUsingHeap(&sBallParticleSpriteSheets[ballId]);
diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c
index 2bb90e585..f157102b0 100644
--- a/src/battle_anim_water.c
+++ b/src/battle_anim_water.c
@@ -881,8 +881,6 @@ static void AnimTask_CreateSurfWave_Step1(u8 taskId)
u16 rgbBuffer;
u16 *BGptrX = &gBattle_BG1_X;
u16 *BGptrY = &gBattle_BG1_Y;
- u32 palOffset;
- u16 palNum;
*BGptrX += gTasks[taskId].data[0];
*BGptrY += gTasks[taskId].data[1];
diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c
index 269b4c1b4..718fe30c9 100644
--- a/src/battle_controller_link_opponent.c
+++ b/src/battle_controller_link_opponent.c
@@ -1693,7 +1693,6 @@ static void LinkOpponentHandleIntroSlide(void)
static void LinkOpponentHandleIntroTrainerBallThrow(void)
{
- u8 paletteNum;
u8 taskId;
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c
index 2f1153612..d241d335f 100644
--- a/src/battle_controller_opponent.c
+++ b/src/battle_controller_opponent.c
@@ -1858,7 +1858,6 @@ static void OpponentHandleIntroSlide(void)
static void OpponentHandleIntroTrainerBallThrow(void)
{
- u8 paletteNum;
u8 taskId;
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c
index 895ca6b39..23269dbad 100644
--- a/src/battle_controller_recorded_opponent.c
+++ b/src/battle_controller_recorded_opponent.c
@@ -1633,7 +1633,6 @@ static void RecordedOpponentHandleIntroSlide(void)
static void RecordedOpponentHandleIntroTrainerBallThrow(void)
{
- u8 paletteNum;
u8 taskId;
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c
index b5a8b1bb6..b357c689f 100644
--- a/src/battle_controller_safari.c
+++ b/src/battle_controller_safari.c
@@ -470,8 +470,6 @@ static void SafariHandleChooseMove(void)
static void SafariHandleChooseItem(void)
{
- s32 i;
-
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gBattlerControllerFuncs[gActiveBattler] = SafariOpenPokeblockCase;
gBattlerInMenuId = gActiveBattler;
diff --git a/src/battle_interface.c b/src/battle_interface.c
index adbef019d..df123630c 100644
--- a/src/battle_interface.c
+++ b/src/battle_interface.c
@@ -1897,7 +1897,6 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
{
u8 nickname[POKEMON_NAME_LENGTH + 1];
void *ptr;
- const u8 *genderTxt;
u32 windowId, spriteTileNum;
u8 *windowTileData;
u16 species;
diff --git a/src/battle_main.c b/src/battle_main.c
index 7e8966597..940fab8ff 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -2722,7 +2722,7 @@ void SpriteCB_FaintOpponentMon(struct Sprite *sprite)
if (species == SPECIES_UNOWN)
{
u32 personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_PERSONALITY);
- u16 unownForm = ((((personalityValue & 0x3000000) >> 18) | ((personalityValue & 0x30000) >> 12) | ((personalityValue & 0x300) >> 6) | (personalityValue & 3)) % 0x1C);
+ u16 unownForm = GET_UNOWN_LETTER(personalityValue);
u16 unownSpecies;
if (unownForm == 0)
diff --git a/src/berry_blender.c b/src/berry_blender.c
index 573affbd5..08a25c58a 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -2390,7 +2390,7 @@ static s16 Debug_GetGameTimeStage(void)
static void CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *pokeblock, u8 numPlayers, u8 *flavors, u16 maxRPM)
{
s32 i, j;
- s32 multiuseVar, var2;
+ s32 multiuseVar;
u8 numNegatives;
for (i = 0; i < FLAVOR_COUNT + 1; i++)
diff --git a/src/berry_crush.c b/src/berry_crush.c
index 90bc7150d..84e2e2eba 100755
--- a/src/berry_crush.c
+++ b/src/berry_crush.c
@@ -877,7 +877,7 @@ void StartBerryCrush(MainCallback callback)
static void GetBerryFromBag(void)
{
if (gSpecialVar_ItemId < FIRST_BERRY_INDEX || gSpecialVar_ItemId > LAST_BERRY_INDEX + 1)
- gSpecialVar_ItemId = ITEM_CHERI_BERRY;
+ gSpecialVar_ItemId = FIRST_BERRY_INDEX;
else
RemoveBagItem(gSpecialVar_ItemId, 1);
@@ -1573,7 +1573,6 @@ static void Task_ShowBerryCrushRankings(u8 taskId)
u8 i = 0, j, xPos, yPos;
u32 score = 0;
s16 *data = gTasks[taskId].data;
- u8 *str;
switch (data[0])
{
@@ -1714,8 +1713,7 @@ void sub_8022588(struct BerryCrushGame *r5)
void sub_8022600(struct BerryCrushGame *r6)
{
- u8 r7, r2;
- u8 *r4;
+ u8 r7;
for (r7 = 0; r7 < r6->unk9; ++r7)
{
diff --git a/src/cable_club.c b/src/cable_club.c
index 64bc9187a..cd0baefcd 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -128,8 +128,6 @@ static void UpdateLinkPlayerCountDisplay(u8 taskId, u8 numPlayers)
static u32 ExchangeDataAndGetLinkupStatus(u8 minPlayers, u8 maxPlayers)
{
- int playerCount;
-
switch (GetLinkPlayerDataExchangeStatusTimed(minPlayers, maxPlayers))
{
case EXCHANGE_COMPLETE:
@@ -511,7 +509,6 @@ static void FinishLinkup(u16 *linkupStatus, u32 taskId)
static void Task_LinkupAwaitTrainerCardData(u8 taskId)
{
u8 index;
- struct TrainerCard *trainerCards;
if (CheckLinkErrored(taskId) == TRUE)
return;
diff --git a/src/contest.c b/src/contest.c
index 40a0eac66..e7c420448 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -4422,7 +4422,6 @@ static void CalculateAppealMoveImpact(u8 contestant)
u16 move;
u8 effect;
u8 rnd;
- bool8 canUseTurn;
s32 i;
eContestantStatus[contestant].appeal = 0;
diff --git a/src/credits.c b/src/credits.c
index 41d1c1686..a9beb319c 100644
--- a/src/credits.c
+++ b/src/credits.c
@@ -1158,7 +1158,7 @@ static void CB2_RunCreditsSequence(void)
static void sub_8175548(void)
{
ResetBgsAndClearDma3BusyFlags(0);
- InitBgsFromTemplates(0, sBackgroundTemplates, 1);
+ InitBgsFromTemplates(0, sBackgroundTemplates, ARRAY_COUNT(sBackgroundTemplates));
SetBgTilemapBuffer(0, AllocZeroed(BG_SCREEN_SIZE));
LoadPalette(gUnknown_085E56F0, 0x80, 0x40);
InitWindows(sWindowTemplates);
@@ -1305,8 +1305,6 @@ static void sub_8175808(u8 taskIdA)
static void c2_080C9BFC(u8 taskIdA)
{
- u16 backup;
-
SetVBlankCallback(NULL);
if (sub_8176AB0(gTasks[taskIdA].data[TDA_7], taskIdA))
diff --git a/src/data/bard_music/bard_sounds.h b/src/data/bard_music/bard_sounds.h
index 4a0911726..1ec1f0d97 100644
--- a/src/data/bard_music/bard_sounds.h
+++ b/src/data/bard_music/bard_sounds.h
@@ -24,29 +24,29 @@
#include "events.h"
#include "trendysaying.h"
-const struct BardSound (*const gBardSoundsTable[])[6] = {
- NULL,
- gBardSounds_Trainer,
- gBardSounds_Status,
- gBardSounds_Battle,
- gBardSounds_Greetings,
- gBardSounds_People,
- gBardSounds_Voices,
- gBardSounds_Speech,
- gBardSounds_Endings,
- gBardSounds_Feelings,
- gBardSounds_Conditions,
- gBardSounds_Actions,
- gBardSounds_Lifestyle,
- gBardSounds_Hobbies,
- gBardSounds_Time,
- gBardSounds_Misc,
- gBardSounds_Adjectives,
- gBardSounds_Events,
- NULL,
- NULL,
- gBardSounds_TrendySaying,
- NULL
+const struct BardSound (*const gBardSoundsTable[EC_NUM_GROUPS])[6] = {
+ [EC_GROUP_POKEMON] = NULL, // Handled by gBardSounds_Pokemon
+ [EC_GROUP_TRAINER] = gBardSounds_Trainer,
+ [EC_GROUP_STATUS] = gBardSounds_Status,
+ [EC_GROUP_BATTLE] = gBardSounds_Battle,
+ [EC_GROUP_GREETINGS] = gBardSounds_Greetings,
+ [EC_GROUP_PEOPLE] = gBardSounds_People,
+ [EC_GROUP_VOICES] = gBardSounds_Voices,
+ [EC_GROUP_SPEECH] = gBardSounds_Speech,
+ [EC_GROUP_ENDINGS] = gBardSounds_Endings,
+ [EC_GROUP_FEELINGS] = gBardSounds_Feelings,
+ [EC_GROUP_CONDITIONS] = gBardSounds_Conditions,
+ [EC_GROUP_ACTIONS] = gBardSounds_Actions,
+ [EC_GROUP_LIFESTYLE] = gBardSounds_Lifestyle,
+ [EC_GROUP_HOBBIES] = gBardSounds_Hobbies,
+ [EC_GROUP_TIME] = gBardSounds_Time,
+ [EC_GROUP_MISC] = gBardSounds_Misc,
+ [EC_GROUP_ADJECTIVES] = gBardSounds_Adjectives,
+ [EC_GROUP_EVENTS] = gBardSounds_Events,
+ [EC_GROUP_MOVE_1] = NULL, // Handled by gBardSounds_Moves
+ [EC_GROUP_MOVE_2] = NULL, // Handled by gBardSounds_Moves
+ [EC_GROUP_TRENDY_SAYING] = gBardSounds_TrendySaying,
+ [EC_GROUP_POKEMON_2] = NULL // Handled by gBardSounds_Pokemon
};
#endif //GUARD_BARD_SOUNDS_TABLE_H
diff --git a/src/data/easy_chat/easy_chat_groups.h b/src/data/easy_chat/easy_chat_groups.h
index df114d980..a89f228fe 100755
--- a/src/data/easy_chat/easy_chat_groups.h
+++ b/src/data/easy_chat/easy_chat_groups.h
@@ -26,112 +26,112 @@
const struct EasyChatGroup gEasyChatGroups[] = {
{
.wordData = {.valueList = gEasyChatGroup_Pokemon},
- .numWords = 202,
- .numEnabledWords = 202,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Pokemon),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Pokemon),
},
{
.wordData = {.words = gEasyChatGroup_Trainer},
- .numWords = 27,
- .numEnabledWords = 21,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Trainer),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Trainer) - 6, // Excludes Red, Green, Flame, Gold, Leaf, and Silver
},
{
.wordData = {.words = gEasyChatGroup_Status},
- .numWords = 109,
- .numEnabledWords = 109,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Status),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Status),
},
{
.wordData = {.words = gEasyChatGroup_Battle},
- .numWords = 63,
- .numEnabledWords = 63,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Battle),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Battle),
},
{
.wordData = {.words = gEasyChatGroup_Greetings},
- .numWords = 42,
- .numEnabledWords = 42,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Greetings),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Greetings),
},
{
.wordData = {.words = gEasyChatGroup_People},
- .numWords = 75,
- .numEnabledWords = 75,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_People),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_People),
},
{
.wordData = {.words = gEasyChatGroup_Voices},
- .numWords = 63,
- .numEnabledWords = 63,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Voices),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Voices),
},
{
.wordData = {.words = gEasyChatGroup_Speech},
- .numWords = 60,
- .numEnabledWords = 60,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Speech),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Speech),
},
{
.wordData = {.words = gEasyChatGroup_Endings},
- .numWords = 69,
- .numEnabledWords = 69,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Endings),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Endings),
},
{
.wordData = {.words = gEasyChatGroup_Feelings},
- .numWords = 69,
- .numEnabledWords = 69,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Feelings),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Feelings),
},
{
.wordData = {.words = gEasyChatGroup_Conditions},
- .numWords = 69,
- .numEnabledWords = 69,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Conditions),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Conditions),
},
{
.wordData = {.words = gEasyChatGroup_Actions},
- .numWords = 78,
- .numEnabledWords = 78,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Actions),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Actions),
},
{
.wordData = {.words = gEasyChatGroup_Lifestyle},
- .numWords = 45,
- .numEnabledWords = 45,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Lifestyle),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Lifestyle),
},
{
.wordData = {.words = gEasyChatGroup_Hobbies},
- .numWords = 54,
- .numEnabledWords = 54,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Hobbies),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Hobbies),
},
{
.wordData = {.words = gEasyChatGroup_Time},
- .numWords = 45,
- .numEnabledWords = 45,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Time),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Time),
},
{
.wordData = {.words = gEasyChatGroup_Misc},
- .numWords = 42,
- .numEnabledWords = 42,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Misc),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Misc),
},
{
.wordData = {.words = gEasyChatGroup_Adjectives},
- .numWords = 36,
- .numEnabledWords = 36,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Adjectives),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Adjectives),
},
{
.wordData = {.words = gEasyChatGroup_Events},
- .numWords = 29,
- .numEnabledWords = 29,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Events),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Events),
},
{
.wordData = {.valueList = gEasyChatGroup_Move1},
- .numWords = 154,
- .numEnabledWords = 154,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Move1),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Move1),
},
{
.wordData = {.valueList = gEasyChatGroup_Move2},
- .numWords = 200,
- .numEnabledWords = 200,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Move2),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Move2),
},
{
.wordData = {.words = gEasyChatGroup_TrendySaying},
- .numWords = 33,
- .numEnabledWords = 33,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_TrendySaying),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_TrendySaying),
},
{
.wordData = {.valueList = gEasyChatGroup_Pokemon2},
- .numWords = 251,
- .numEnabledWords = 251,
+ .numWords = ARRAY_COUNT(gEasyChatGroup_Pokemon2),
+ .numEnabledWords = ARRAY_COUNT(gEasyChatGroup_Pokemon2),
},
};
diff --git a/src/data/items.h b/src/data/items.h
index 30beb5352..443c45f1a 100644
--- a/src/data/items.h
+++ b/src/data/items.h
@@ -7,9 +7,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Pokeballs
@@ -21,10 +20,10 @@ const struct Item gItems[] =
.price = 0,
.description = sMasterBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 0,
- .battleUsage = 2,
+ .type = ITEM_MASTER_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 0,
+ .secondaryId = ITEM_MASTER_BALL - FIRST_BALL,
},
[ITEM_ULTRA_BALL] =
@@ -34,10 +33,10 @@ const struct Item gItems[] =
.price = 1200,
.description = sUltraBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 1,
- .battleUsage = 2,
+ .type = ITEM_ULTRA_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 1,
+ .secondaryId = ITEM_ULTRA_BALL - FIRST_BALL,
},
[ITEM_GREAT_BALL] =
@@ -47,10 +46,10 @@ const struct Item gItems[] =
.price = 600,
.description = sGreatBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 2,
- .battleUsage = 2,
+ .type = ITEM_GREAT_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 2,
+ .secondaryId = ITEM_GREAT_BALL - FIRST_BALL,
},
[ITEM_POKE_BALL] =
@@ -60,10 +59,10 @@ const struct Item gItems[] =
.price = 200,
.description = sPokeBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 3,
- .battleUsage = 2,
+ .type = ITEM_POKE_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 3,
+ .secondaryId = ITEM_POKE_BALL - FIRST_BALL,
},
[ITEM_SAFARI_BALL] =
@@ -73,10 +72,10 @@ const struct Item gItems[] =
.price = 0,
.description = sSafariBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 4,
- .battleUsage = 2,
+ .type = ITEM_SAFARI_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 4,
+ .secondaryId = ITEM_SAFARI_BALL - FIRST_BALL,
},
[ITEM_NET_BALL] =
@@ -86,10 +85,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sNetBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 5,
- .battleUsage = 2,
+ .type = ITEM_NET_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 5,
+ .secondaryId = ITEM_NET_BALL - FIRST_BALL,
},
[ITEM_DIVE_BALL] =
@@ -99,10 +98,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sDiveBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 6,
- .battleUsage = 2,
+ .type = ITEM_DIVE_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 6,
+ .secondaryId = ITEM_DIVE_BALL - FIRST_BALL,
},
[ITEM_NEST_BALL] =
@@ -112,10 +111,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sNestBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 7,
- .battleUsage = 2,
+ .type = ITEM_NEST_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 7,
+ .secondaryId = ITEM_NEST_BALL - FIRST_BALL,
},
[ITEM_REPEAT_BALL] =
@@ -125,10 +124,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sRepeatBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 8,
- .battleUsage = 2,
+ .type = ITEM_REPEAT_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 8,
+ .secondaryId = ITEM_REPEAT_BALL - FIRST_BALL,
},
[ITEM_TIMER_BALL] =
@@ -138,10 +137,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sTimerBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 9,
- .battleUsage = 2,
+ .type = ITEM_TIMER_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 9,
+ .secondaryId = ITEM_TIMER_BALL - FIRST_BALL,
},
[ITEM_LUXURY_BALL] =
@@ -151,10 +150,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sLuxuryBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 10,
- .battleUsage = 2,
+ .type = ITEM_LUXURY_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 10,
+ .secondaryId = ITEM_LUXURY_BALL - FIRST_BALL,
},
[ITEM_PREMIER_BALL] =
@@ -164,10 +163,10 @@ const struct Item gItems[] =
.price = 200,
.description = sPremierBallDesc,
.pocket = POCKET_POKE_BALLS,
- .type = 11,
- .battleUsage = 2,
+ .type = ITEM_PREMIER_BALL - FIRST_BALL,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_PokeBall,
- .secondaryId = 11,
+ .secondaryId = ITEM_PREMIER_BALL - FIRST_BALL,
},
// Medicine
@@ -180,11 +179,10 @@ const struct Item gItems[] =
.holdEffectParam = 20,
.description = sPotionDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_ANTIDOTE] =
@@ -194,11 +192,10 @@ const struct Item gItems[] =
.price = 100,
.description = sAntidoteDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_BURN_HEAL] =
@@ -208,11 +205,10 @@ const struct Item gItems[] =
.price = 250,
.description = sBurnHealDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_ICE_HEAL] =
@@ -222,11 +218,10 @@ const struct Item gItems[] =
.price = 250,
.description = sIceHealDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_AWAKENING] =
@@ -236,11 +231,10 @@ const struct Item gItems[] =
.price = 250,
.description = sAwakeningDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_PARALYZE_HEAL] =
@@ -250,11 +244,10 @@ const struct Item gItems[] =
.price = 200,
.description = sParalyzeHealDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_FULL_RESTORE] =
@@ -265,11 +258,10 @@ const struct Item gItems[] =
.holdEffectParam = 255,
.description = sFullRestoreDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_MAX_POTION] =
@@ -280,11 +272,10 @@ const struct Item gItems[] =
.holdEffectParam = 255,
.description = sMaxPotionDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_HYPER_POTION] =
@@ -295,11 +286,10 @@ const struct Item gItems[] =
.holdEffectParam = 200,
.description = sHyperPotionDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_SUPER_POTION] =
@@ -310,11 +300,10 @@ const struct Item gItems[] =
.holdEffectParam = 50,
.description = sSuperPotionDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_FULL_HEAL] =
@@ -324,11 +313,10 @@ const struct Item gItems[] =
.price = 600,
.description = sFullHealDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_REVIVE] =
@@ -338,11 +326,10 @@ const struct Item gItems[] =
.price = 1500,
.description = sReviveDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_MAX_REVIVE] =
@@ -352,11 +339,10 @@ const struct Item gItems[] =
.price = 4000,
.description = sMaxReviveDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_FRESH_WATER] =
@@ -367,11 +353,10 @@ const struct Item gItems[] =
.holdEffectParam = 50,
.description = sFreshWaterDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_SODA_POP] =
@@ -382,11 +367,10 @@ const struct Item gItems[] =
.holdEffectParam = 60,
.description = sSodaPopDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_LEMONADE] =
@@ -397,11 +381,10 @@ const struct Item gItems[] =
.holdEffectParam = 80,
.description = sLemonadeDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_MOOMOO_MILK] =
@@ -412,11 +395,10 @@ const struct Item gItems[] =
.holdEffectParam = 100,
.description = sMoomooMilkDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_ENERGY_POWDER] =
@@ -426,11 +408,10 @@ const struct Item gItems[] =
.price = 500,
.description = sEnergyPowderDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_ENERGY_ROOT] =
@@ -440,11 +421,10 @@ const struct Item gItems[] =
.price = 800,
.description = sEnergyRootDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_HEAL_POWDER] =
@@ -454,11 +434,10 @@ const struct Item gItems[] =
.price = 450,
.description = sHealPowderDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_REVIVAL_HERB] =
@@ -468,11 +447,10 @@ const struct Item gItems[] =
.price = 2800,
.description = sRevivalHerbDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_ETHER] =
@@ -483,11 +461,10 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sEtherDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_PPRecovery,
- .secondaryId = 0,
},
[ITEM_MAX_ETHER] =
@@ -498,11 +475,10 @@ const struct Item gItems[] =
.holdEffectParam = 255,
.description = sMaxEtherDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_PPRecovery,
- .secondaryId = 0,
},
[ITEM_ELIXIR] =
@@ -513,11 +489,10 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sElixirDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_PPRecovery,
- .secondaryId = 0,
},
[ITEM_MAX_ELIXIR] =
@@ -528,11 +503,10 @@ const struct Item gItems[] =
.holdEffectParam = 255,
.description = sMaxElixirDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_PPRecovery,
- .secondaryId = 0,
},
[ITEM_LAVA_COOKIE] =
@@ -542,11 +516,10 @@ const struct Item gItems[] =
.price = 200,
.description = sLavaCookieDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_BLUE_FLUTE] =
@@ -556,11 +529,10 @@ const struct Item gItems[] =
.price = 100,
.description = sBlueFluteDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_YELLOW_FLUTE] =
@@ -570,11 +542,10 @@ const struct Item gItems[] =
.price = 200,
.description = sYellowFluteDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_RED_FLUTE] =
@@ -584,11 +555,10 @@ const struct Item gItems[] =
.price = 300,
.description = sRedFluteDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_BLACK_FLUTE] =
@@ -599,9 +569,8 @@ const struct Item gItems[] =
.holdEffectParam = 50,
.description = sBlackFluteDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_BlackWhiteFlute,
- .secondaryId = 0,
},
[ITEM_WHITE_FLUTE] =
@@ -612,9 +581,8 @@ const struct Item gItems[] =
.holdEffectParam = 150,
.description = sWhiteFluteDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_BlackWhiteFlute,
- .secondaryId = 0,
},
[ITEM_BERRY_JUICE] =
@@ -626,11 +594,10 @@ const struct Item gItems[] =
.holdEffectParam = 20,
.description = sBerryJuiceDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_SACRED_ASH] =
@@ -640,9 +607,8 @@ const struct Item gItems[] =
.price = 200,
.description = sSacredAshDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_SacredAsh,
- .secondaryId = 0,
},
// Collectibles
@@ -654,9 +620,8 @@ const struct Item gItems[] =
.price = 20,
.description = sShoalSaltDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SHOAL_SHELL] =
@@ -666,9 +631,8 @@ const struct Item gItems[] =
.price = 20,
.description = sShoalShellDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_RED_SHARD] =
@@ -678,9 +642,8 @@ const struct Item gItems[] =
.price = 200,
.description = sRedShardDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BLUE_SHARD] =
@@ -690,9 +653,8 @@ const struct Item gItems[] =
.price = 200,
.description = sBlueShardDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_YELLOW_SHARD] =
@@ -702,9 +664,8 @@ const struct Item gItems[] =
.price = 200,
.description = sYellowShardDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_GREEN_SHARD] =
@@ -714,9 +675,8 @@ const struct Item gItems[] =
.price = 200,
.description = sGreenShardDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_034] =
@@ -726,9 +686,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_035] =
@@ -738,9 +697,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_036] =
@@ -750,9 +708,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_037] =
@@ -762,9 +719,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_038] =
@@ -774,9 +730,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_039] =
@@ -786,9 +741,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_03A] =
@@ -798,9 +752,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_03B] =
@@ -810,9 +763,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_03C] =
@@ -822,9 +774,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_03D] =
@@ -834,9 +785,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_03E] =
@@ -846,9 +796,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Vitamins
@@ -860,9 +809,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sHPUpDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_PROTEIN] =
@@ -872,9 +820,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sProteinDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_IRON] =
@@ -884,9 +831,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sIronDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_CARBOS] =
@@ -896,9 +842,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sCarbosDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_CALCIUM] =
@@ -908,9 +853,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sCalciumDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_RARE_CANDY] =
@@ -920,9 +864,8 @@ const struct Item gItems[] =
.price = 4800,
.description = sRareCandyDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_RareCandy,
- .secondaryId = 0,
},
[ITEM_PP_UP] =
@@ -932,9 +875,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sPPUpDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PPUp,
- .secondaryId = 0,
},
[ITEM_ZINC] =
@@ -944,9 +886,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sZincDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_PP_MAX] =
@@ -956,9 +897,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sPPMaxDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PPUp,
- .secondaryId = 0,
},
[ITEM_048] =
@@ -968,9 +908,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Battle items
@@ -982,11 +921,10 @@ const struct Item gItems[] =
.price = 700,
.description = sGuardSpecDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_StatIncrease,
- .secondaryId = 0,
},
[ITEM_DIRE_HIT] =
@@ -996,11 +934,10 @@ const struct Item gItems[] =
.price = 650,
.description = sDireHitDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_StatIncrease,
- .secondaryId = 0,
},
[ITEM_X_ATTACK] =
@@ -1010,11 +947,10 @@ const struct Item gItems[] =
.price = 500,
.description = sXAttackDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_StatIncrease,
- .secondaryId = 0,
},
[ITEM_X_DEFEND] =
@@ -1024,11 +960,10 @@ const struct Item gItems[] =
.price = 550,
.description = sXDefendDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_StatIncrease,
- .secondaryId = 0,
},
[ITEM_X_SPEED] =
@@ -1038,11 +973,10 @@ const struct Item gItems[] =
.price = 350,
.description = sXSpeedDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_StatIncrease,
- .secondaryId = 0,
},
[ITEM_X_ACCURACY] =
@@ -1052,11 +986,10 @@ const struct Item gItems[] =
.price = 950,
.description = sXAccuracyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_StatIncrease,
- .secondaryId = 0,
},
[ITEM_X_SPECIAL] =
@@ -1066,11 +999,10 @@ const struct Item gItems[] =
.price = 350,
.description = sXSpecialDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_StatIncrease,
- .secondaryId = 0,
},
[ITEM_POKE_DOLL] =
@@ -1080,11 +1012,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sPokeDollDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_Escape,
- .secondaryId = 0,
},
[ITEM_FLUFFY_TAIL] =
@@ -1094,11 +1025,10 @@ const struct Item gItems[] =
.price = 1000,
.description = sFluffyTailDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 2,
+ .battleUsage = ITEM_B_USE_OTHER,
.battleUseFunc = ItemUseInBattle_Escape,
- .secondaryId = 0,
},
[ITEM_052] =
@@ -1108,9 +1038,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Field items
@@ -1123,9 +1052,8 @@ const struct Item gItems[] =
.holdEffectParam = 200,
.description = sSuperRepelDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Repel,
- .secondaryId = 0,
},
[ITEM_MAX_REPEL] =
@@ -1136,9 +1064,8 @@ const struct Item gItems[] =
.holdEffectParam = 250,
.description = sMaxRepelDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Repel,
- .secondaryId = 0,
},
[ITEM_ESCAPE_ROPE] =
@@ -1148,9 +1075,8 @@ const struct Item gItems[] =
.price = 550,
.description = sEscapeRopeDesc,
.pocket = POCKET_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_EscapeRope,
- .secondaryId = 0,
},
[ITEM_REPEL] =
@@ -1161,9 +1087,8 @@ const struct Item gItems[] =
.holdEffectParam = 100,
.description = sRepelDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Repel,
- .secondaryId = 0,
},
[ITEM_057] =
@@ -1173,9 +1098,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_058] =
@@ -1185,9 +1109,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_059] =
@@ -1197,9 +1120,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_05A] =
@@ -1209,9 +1131,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_05B] =
@@ -1221,9 +1142,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_05C] =
@@ -1233,9 +1153,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Evolution stones
@@ -1247,9 +1166,8 @@ const struct Item gItems[] =
.price = 2100,
.description = sSunStoneDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
- .secondaryId = 0,
},
[ITEM_MOON_STONE] =
@@ -1259,9 +1177,8 @@ const struct Item gItems[] =
.price = 0,
.description = sMoonStoneDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
- .secondaryId = 0,
},
[ITEM_FIRE_STONE] =
@@ -1271,9 +1188,8 @@ const struct Item gItems[] =
.price = 2100,
.description = sFireStoneDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
- .secondaryId = 0,
},
[ITEM_THUNDER_STONE] =
@@ -1283,9 +1199,8 @@ const struct Item gItems[] =
.price = 2100,
.description = sThunderStoneDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
- .secondaryId = 0,
},
[ITEM_WATER_STONE] =
@@ -1295,9 +1210,8 @@ const struct Item gItems[] =
.price = 2100,
.description = sWaterStoneDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
- .secondaryId = 0,
},
[ITEM_LEAF_STONE] =
@@ -1307,9 +1221,8 @@ const struct Item gItems[] =
.price = 2100,
.description = sLeafStoneDesc,
.pocket = POCKET_ITEMS,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
- .secondaryId = 0,
},
[ITEM_063] =
@@ -1319,9 +1232,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_064] =
@@ -1331,9 +1243,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_065] =
@@ -1343,9 +1254,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_066] =
@@ -1355,9 +1265,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Valuable items
@@ -1369,9 +1278,8 @@ const struct Item gItems[] =
.price = 500,
.description = sTinyMushroomDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BIG_MUSHROOM] =
@@ -1381,9 +1289,8 @@ const struct Item gItems[] =
.price = 5000,
.description = sBigMushroomDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_069] =
@@ -1393,9 +1300,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_PEARL] =
@@ -1405,9 +1311,8 @@ const struct Item gItems[] =
.price = 1400,
.description = sPearlDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BIG_PEARL] =
@@ -1417,9 +1322,8 @@ const struct Item gItems[] =
.price = 7500,
.description = sBigPearlDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_STARDUST] =
@@ -1429,9 +1333,8 @@ const struct Item gItems[] =
.price = 2000,
.description = sStardustDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_STAR_PIECE] =
@@ -1441,9 +1344,8 @@ const struct Item gItems[] =
.price = 9800,
.description = sStarPieceDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_NUGGET] =
@@ -1453,9 +1355,8 @@ const struct Item gItems[] =
.price = 10000,
.description = sNuggetDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_HEART_SCALE] =
@@ -1465,9 +1366,8 @@ const struct Item gItems[] =
.price = 100,
.description = sHeartScaleDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_070] =
@@ -1477,9 +1377,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_071] =
@@ -1489,9 +1388,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_072] =
@@ -1501,9 +1399,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_073] =
@@ -1513,9 +1410,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_074] =
@@ -1525,9 +1421,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_075] =
@@ -1537,9 +1432,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_076] =
@@ -1549,9 +1443,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_077] =
@@ -1561,9 +1454,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_078] =
@@ -1573,9 +1465,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Mail
@@ -1586,9 +1477,9 @@ const struct Item gItems[] =
.price = 50,
.description = sOrangeMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 0,
+ .secondaryId = ITEM_ORANGE_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_HARBOR_MAIL] =
@@ -1598,9 +1489,9 @@ const struct Item gItems[] =
.price = 50,
.description = sHarborMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 1,
+ .secondaryId = ITEM_HARBOR_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_GLITTER_MAIL] =
@@ -1610,9 +1501,9 @@ const struct Item gItems[] =
.price = 50,
.description = sGlitterMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 2,
+ .secondaryId = ITEM_GLITTER_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_MECH_MAIL] =
@@ -1622,9 +1513,9 @@ const struct Item gItems[] =
.price = 50,
.description = sMechMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 3,
+ .secondaryId = ITEM_MECH_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_WOOD_MAIL] =
@@ -1634,9 +1525,9 @@ const struct Item gItems[] =
.price = 50,
.description = sWoodMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 4,
+ .secondaryId = ITEM_WOOD_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_WAVE_MAIL] =
@@ -1646,9 +1537,9 @@ const struct Item gItems[] =
.price = 50,
.description = sWaveMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 5,
+ .secondaryId = ITEM_WAVE_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_BEAD_MAIL] =
@@ -1658,9 +1549,9 @@ const struct Item gItems[] =
.price = 50,
.description = sBeadMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 6,
+ .secondaryId = ITEM_BEAD_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_SHADOW_MAIL] =
@@ -1670,9 +1561,9 @@ const struct Item gItems[] =
.price = 50,
.description = sShadowMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 7,
+ .secondaryId = ITEM_SHADOW_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_TROPIC_MAIL] =
@@ -1682,9 +1573,9 @@ const struct Item gItems[] =
.price = 50,
.description = sTropicMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 8,
+ .secondaryId = ITEM_TROPIC_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_DREAM_MAIL] =
@@ -1694,9 +1585,9 @@ const struct Item gItems[] =
.price = 50,
.description = sDreamMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 9,
+ .secondaryId = ITEM_DREAM_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_FAB_MAIL] =
@@ -1706,9 +1597,9 @@ const struct Item gItems[] =
.price = 50,
.description = sFabMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 10,
+ .secondaryId = ITEM_FAB_MAIL - FIRST_MAIL_INDEX,
},
[ITEM_RETRO_MAIL] =
@@ -1718,9 +1609,9 @@ const struct Item gItems[] =
.price = 0,
.description = sRetroMailDesc,
.pocket = POCKET_ITEMS,
- .type = 0,
+ .type = ITEM_USE_MAIL,
.fieldUseFunc = ItemUseOutOfBattle_Mail,
- .secondaryId = 11,
+ .secondaryId = ITEM_RETRO_MAIL - FIRST_MAIL_INDEX,
},
// Berries
@@ -1733,11 +1624,10 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_PAR,
.description = sCheriBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_CHESTO_BERRY] =
@@ -1748,11 +1638,10 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_SLP,
.description = sChestoBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_PECHA_BERRY] =
@@ -1763,11 +1652,10 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_PSN,
.description = sPechaBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_RAWST_BERRY] =
@@ -1778,11 +1666,10 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_BRN,
.description = sRawstBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_ASPEAR_BERRY] =
@@ -1793,11 +1680,10 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_FRZ,
.description = sAspearBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_LEPPA_BERRY] =
@@ -1809,11 +1695,10 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sLeppaBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_PPRecovery,
- .secondaryId = 0,
},
[ITEM_ORAN_BERRY] =
@@ -1825,11 +1710,10 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sOranBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_PERSIM_BERRY] =
@@ -1840,11 +1724,10 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_CONFUSION,
.description = sPersimBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_LUM_BERRY] =
@@ -1855,11 +1738,10 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_STATUS,
.description = sLumBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_SITRUS_BERRY] =
@@ -1871,11 +1753,10 @@ const struct Item gItems[] =
.holdEffectParam = 30,
.description = sSitrusBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_Medicine,
- .secondaryId = 0,
},
[ITEM_FIGY_BERRY] =
@@ -1887,9 +1768,8 @@ const struct Item gItems[] =
.holdEffectParam = 8,
.description = sFigyBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_WIKI_BERRY] =
@@ -1901,9 +1781,8 @@ const struct Item gItems[] =
.holdEffectParam = 8,
.description = sWikiBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MAGO_BERRY] =
@@ -1915,9 +1794,8 @@ const struct Item gItems[] =
.holdEffectParam = 8,
.description = sMagoBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_AGUAV_BERRY] =
@@ -1929,9 +1807,8 @@ const struct Item gItems[] =
.holdEffectParam = 8,
.description = sAguavBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_IAPAPA_BERRY] =
@@ -1943,9 +1820,8 @@ const struct Item gItems[] =
.holdEffectParam = 8,
.description = sIapapaBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_RAZZ_BERRY] =
@@ -1955,9 +1831,8 @@ const struct Item gItems[] =
.price = 20,
.description = sRazzBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BLUK_BERRY] =
@@ -1967,9 +1842,8 @@ const struct Item gItems[] =
.price = 20,
.description = sBlukBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_NANAB_BERRY] =
@@ -1979,9 +1853,8 @@ const struct Item gItems[] =
.price = 20,
.description = sNanabBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_WEPEAR_BERRY] =
@@ -1991,9 +1864,8 @@ const struct Item gItems[] =
.price = 20,
.description = sWepearBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_PINAP_BERRY] =
@@ -2003,9 +1875,8 @@ const struct Item gItems[] =
.price = 20,
.description = sPinapBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_POMEG_BERRY] =
@@ -2015,9 +1886,8 @@ const struct Item gItems[] =
.price = 20,
.description = sPomegBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
- .secondaryId = 0,
},
[ITEM_KELPSY_BERRY] =
@@ -2027,9 +1897,8 @@ const struct Item gItems[] =
.price = 20,
.description = sKelpsyBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
- .secondaryId = 0,
},
[ITEM_QUALOT_BERRY] =
@@ -2039,9 +1908,8 @@ const struct Item gItems[] =
.price = 20,
.description = sQualotBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
- .secondaryId = 0,
},
[ITEM_HONDEW_BERRY] =
@@ -2051,9 +1919,8 @@ const struct Item gItems[] =
.price = 20,
.description = sHondewBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
- .secondaryId = 0,
},
[ITEM_GREPA_BERRY] =
@@ -2063,9 +1930,8 @@ const struct Item gItems[] =
.price = 20,
.description = sGrepaBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
- .secondaryId = 0,
},
[ITEM_TAMATO_BERRY] =
@@ -2075,9 +1941,8 @@ const struct Item gItems[] =
.price = 20,
.description = sTamatoBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
- .secondaryId = 0,
},
[ITEM_CORNN_BERRY] =
@@ -2087,9 +1952,8 @@ const struct Item gItems[] =
.price = 20,
.description = sCornnBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MAGOST_BERRY] =
@@ -2099,9 +1963,8 @@ const struct Item gItems[] =
.price = 20,
.description = sMagostBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_RABUTA_BERRY] =
@@ -2111,9 +1974,8 @@ const struct Item gItems[] =
.price = 20,
.description = sRabutaBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_NOMEL_BERRY] =
@@ -2123,9 +1985,8 @@ const struct Item gItems[] =
.price = 20,
.description = sNomelBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SPELON_BERRY] =
@@ -2135,9 +1996,8 @@ const struct Item gItems[] =
.price = 20,
.description = sSpelonBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_PAMTRE_BERRY] =
@@ -2147,9 +2007,8 @@ const struct Item gItems[] =
.price = 20,
.description = sPamtreBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_WATMEL_BERRY] =
@@ -2159,9 +2018,8 @@ const struct Item gItems[] =
.price = 20,
.description = sWatmelBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_DURIN_BERRY] =
@@ -2171,9 +2029,8 @@ const struct Item gItems[] =
.price = 20,
.description = sDurinBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BELUE_BERRY] =
@@ -2183,9 +2040,8 @@ const struct Item gItems[] =
.price = 20,
.description = sBelueBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LIECHI_BERRY] =
@@ -2197,9 +2053,8 @@ const struct Item gItems[] =
.holdEffectParam = 4,
.description = sLiechiBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_GANLON_BERRY] =
@@ -2211,9 +2066,8 @@ const struct Item gItems[] =
.holdEffectParam = 4,
.description = sGanlonBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SALAC_BERRY] =
@@ -2225,9 +2079,8 @@ const struct Item gItems[] =
.holdEffectParam = 4,
.description = sSalacBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_PETAYA_BERRY] =
@@ -2239,9 +2092,8 @@ const struct Item gItems[] =
.holdEffectParam = 4,
.description = sPetayaBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_APICOT_BERRY] =
@@ -2253,9 +2105,8 @@ const struct Item gItems[] =
.holdEffectParam = 4,
.description = sApicotBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LANSAT_BERRY] =
@@ -2267,9 +2118,8 @@ const struct Item gItems[] =
.holdEffectParam = 4,
.description = sLansatBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_STARF_BERRY] =
@@ -2281,9 +2131,8 @@ const struct Item gItems[] =
.holdEffectParam = 4,
.description = sStarfBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_ENIGMA_BERRY] =
@@ -2293,11 +2142,10 @@ const struct Item gItems[] =
.price = 20,
.description = sEnigmaBerryDesc,
.pocket = POCKET_BERRIES,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU, // Type handled by ItemUseOutOfBattle_EnigmaBerry
.fieldUseFunc = ItemUseOutOfBattle_EnigmaBerry,
- .battleUsage = 1,
+ .battleUsage = ITEM_B_USE_MEDICINE,
.battleUseFunc = ItemUseInBattle_EnigmaBerry,
- .secondaryId = 0,
},
[ITEM_0B0] =
@@ -2307,9 +2155,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0B1] =
@@ -2319,9 +2166,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0B2] =
@@ -2331,9 +2177,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Hold items
@@ -2347,9 +2192,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sBrightPowderDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_WHITE_HERB] =
@@ -2360,9 +2204,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_RESTORE_STATS,
.description = sWhiteHerbDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MACHO_BRACE] =
@@ -2373,9 +2216,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_MACHO_BRACE,
.description = sMachoBraceDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_EXP_SHARE] =
@@ -2386,9 +2228,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_EXP_SHARE,
.description = sExpShareDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_QUICK_CLAW] =
@@ -2400,9 +2241,8 @@ const struct Item gItems[] =
.holdEffectParam = 20,
.description = sQuickClawDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SOOTHE_BELL] =
@@ -2413,9 +2253,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_HAPPINESS_UP,
.description = sSootheBellDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MENTAL_HERB] =
@@ -2426,9 +2265,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CURE_ATTRACT,
.description = sMentalHerbDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_CHOICE_BAND] =
@@ -2439,9 +2277,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CHOICE_BAND,
.description = sChoiceBandDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_KINGS_ROCK] =
@@ -2453,9 +2290,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sKingsRockDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SILVER_POWDER] =
@@ -2467,9 +2303,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sSilverPowderDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_AMULET_COIN] =
@@ -2481,9 +2316,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sAmuletCoinDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_CLEANSE_TAG] =
@@ -2494,9 +2328,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_REPEL,
.description = sCleanseTagDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SOUL_DEW] =
@@ -2507,9 +2340,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_SOUL_DEW,
.description = sSoulDewDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_DEEP_SEA_TOOTH] =
@@ -2520,9 +2352,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_DEEP_SEA_TOOTH,
.description = sDeepSeaToothDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_DEEP_SEA_SCALE] =
@@ -2533,9 +2364,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_DEEP_SEA_SCALE,
.description = sDeepSeaScaleDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SMOKE_BALL] =
@@ -2546,9 +2376,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_CAN_ALWAYS_RUN,
.description = sSmokeBallDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_EVERSTONE] =
@@ -2559,9 +2388,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_PREVENT_EVOLVE,
.description = sEverstoneDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_FOCUS_BAND] =
@@ -2573,9 +2401,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sFocusBandDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LUCKY_EGG] =
@@ -2586,9 +2413,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_LUCKY_EGG,
.description = sLuckyEggDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SCOPE_LENS] =
@@ -2599,9 +2425,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_SCOPE_LENS,
.description = sScopeLensDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_METAL_COAT] =
@@ -2613,9 +2438,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sMetalCoatDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LEFTOVERS] =
@@ -2627,9 +2451,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sLeftoversDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_DRAGON_SCALE] =
@@ -2641,9 +2464,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sDragonScaleDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LIGHT_BALL] =
@@ -2654,9 +2476,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_LIGHT_BALL,
.description = sLightBallDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SOFT_SAND] =
@@ -2668,9 +2489,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sSoftSandDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_HARD_STONE] =
@@ -2682,9 +2502,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sHardStoneDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MIRACLE_SEED] =
@@ -2696,9 +2515,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sMiracleSeedDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BLACK_GLASSES] =
@@ -2710,9 +2528,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sBlackGlassesDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BLACK_BELT] =
@@ -2724,9 +2541,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sBlackBeltDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MAGNET] =
@@ -2738,9 +2554,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sMagnetDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MYSTIC_WATER] =
@@ -2752,9 +2567,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sMysticWaterDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SHARP_BEAK] =
@@ -2766,9 +2580,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sSharpBeakDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_POISON_BARB] =
@@ -2780,9 +2593,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sPoisonBarbDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_NEVER_MELT_ICE] =
@@ -2794,9 +2606,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sNeverMeltIceDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SPELL_TAG] =
@@ -2808,9 +2619,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sSpellTagDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_TWISTED_SPOON] =
@@ -2822,9 +2632,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sTwistedSpoonDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_CHARCOAL] =
@@ -2836,9 +2645,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sCharcoalDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_DRAGON_FANG] =
@@ -2850,9 +2658,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sDragonFangDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SILK_SCARF] =
@@ -2864,9 +2671,8 @@ const struct Item gItems[] =
.holdEffectParam = 10,
.description = sSilkScarfDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_UP_GRADE] =
@@ -2877,9 +2683,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_UP_GRADE,
.description = sUpGradeDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SHELL_BELL] =
@@ -2891,9 +2696,8 @@ const struct Item gItems[] =
.holdEffectParam = 8,
.description = sShellBellDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SEA_INCENSE] =
@@ -2905,9 +2709,8 @@ const struct Item gItems[] =
.holdEffectParam = 5,
.description = sSeaIncenseDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LAX_INCENSE] =
@@ -2919,9 +2722,8 @@ const struct Item gItems[] =
.holdEffectParam = 5,
.description = sLaxIncenseDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LUCKY_PUNCH] =
@@ -2932,9 +2734,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_LUCKY_PUNCH,
.description = sLuckyPunchDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_METAL_POWDER] =
@@ -2945,9 +2746,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_METAL_POWDER,
.description = sMetalPowderDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_THICK_CLUB] =
@@ -2958,9 +2758,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_THICK_CLUB,
.description = sThickClubDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_STICK] =
@@ -2971,9 +2770,8 @@ const struct Item gItems[] =
.holdEffect = HOLD_EFFECT_STICK,
.description = sStickDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E2] =
@@ -2983,9 +2781,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E3] =
@@ -2995,9 +2792,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E4] =
@@ -3007,9 +2803,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E5] =
@@ -3019,9 +2814,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E6] =
@@ -3031,9 +2825,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E7] =
@@ -3043,9 +2836,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E8] =
@@ -3055,9 +2847,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0E9] =
@@ -3067,9 +2858,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0EA] =
@@ -3079,9 +2869,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0EB] =
@@ -3091,9 +2880,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0EC] =
@@ -3103,9 +2891,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0ED] =
@@ -3115,9 +2902,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0EE] =
@@ -3127,9 +2913,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0EF] =
@@ -3139,9 +2924,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F0] =
@@ -3151,9 +2935,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F1] =
@@ -3163,9 +2946,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F2] =
@@ -3175,9 +2957,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F3] =
@@ -3187,9 +2968,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F4] =
@@ -3199,9 +2979,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F5] =
@@ -3211,9 +2990,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F6] =
@@ -3223,9 +3001,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F7] =
@@ -3235,9 +3012,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F8] =
@@ -3247,9 +3023,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0F9] =
@@ -3259,9 +3034,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0FA] =
@@ -3271,9 +3045,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0FB] =
@@ -3283,9 +3056,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0FC] =
@@ -3295,9 +3067,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_0FD] =
@@ -3307,9 +3078,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_RED_SCARF] =
@@ -3319,9 +3089,8 @@ const struct Item gItems[] =
.price = 100,
.description = sRedScarfDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BLUE_SCARF] =
@@ -3331,9 +3100,8 @@ const struct Item gItems[] =
.price = 100,
.description = sBlueScarfDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_PINK_SCARF] =
@@ -3343,9 +3111,8 @@ const struct Item gItems[] =
.price = 100,
.description = sPinkScarfDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_GREEN_SCARF] =
@@ -3355,9 +3122,8 @@ const struct Item gItems[] =
.price = 100,
.description = sGreenScarfDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_YELLOW_SCARF] =
@@ -3367,9 +3133,8 @@ const struct Item gItems[] =
.price = 100,
.description = sYellowScarfDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Key items
@@ -3383,9 +3148,9 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike,
- .secondaryId = 0,
+ .secondaryId = MACH_BIKE,
},
[ITEM_COIN_CASE] =
@@ -3396,9 +3161,8 @@ const struct Item gItems[] =
.description = sCoinCaseDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CoinCase,
- .secondaryId = 0,
},
[ITEM_ITEMFINDER] =
@@ -3410,9 +3174,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Itemfinder,
- .secondaryId = 0,
},
[ITEM_OLD_ROD] =
@@ -3424,7 +3187,7 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
.secondaryId = OLD_ROD,
},
@@ -3438,7 +3201,7 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
.secondaryId = GOOD_ROD,
},
@@ -3452,7 +3215,7 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Rod,
.secondaryId = SUPER_ROD,
},
@@ -3465,9 +3228,8 @@ const struct Item gItems[] =
.description = sSSTicketDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_CONTEST_PASS] =
@@ -3478,9 +3240,8 @@ const struct Item gItems[] =
.description = sContestPassDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_10B] =
@@ -3490,9 +3251,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_WAILMER_PAIL] =
@@ -3503,9 +3263,8 @@ const struct Item gItems[] =
.description = sWailmerPailDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_WailmerPail,
- .secondaryId = 0,
},
[ITEM_DEVON_GOODS] =
@@ -3516,9 +3275,8 @@ const struct Item gItems[] =
.description = sDevonGoodsDesc,
.importance = 2,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SOOT_SACK] =
@@ -3529,9 +3287,8 @@ const struct Item gItems[] =
.description = sSootSackDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BASEMENT_KEY] =
@@ -3542,9 +3299,8 @@ const struct Item gItems[] =
.description = sBasementKeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_ACRO_BIKE] =
@@ -3556,9 +3312,9 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_Bike,
- .secondaryId = 1,
+ .secondaryId = ACRO_BIKE,
},
[ITEM_POKEBLOCK_CASE] =
@@ -3570,9 +3326,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 3,
+ .type = ITEM_USE_PBLOCK_CASE,
.fieldUseFunc = ItemUseOutOfBattle_PokeblockCase,
- .secondaryId = 0,
},
[ITEM_LETTER] =
@@ -3583,9 +3338,8 @@ const struct Item gItems[] =
.description = sLetterDesc,
.importance = 2,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_EON_TICKET] =
@@ -3596,7 +3350,7 @@ const struct Item gItems[] =
.description = sEonTicketDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
.secondaryId = 1,
},
@@ -3609,9 +3363,8 @@ const struct Item gItems[] =
.description = sRedOrbDesc,
.importance = 2,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BLUE_ORB] =
@@ -3622,9 +3375,8 @@ const struct Item gItems[] =
.description = sBlueOrbDesc,
.importance = 2,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SCANNER] =
@@ -3635,9 +3387,8 @@ const struct Item gItems[] =
.description = sScannerDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_GO_GOGGLES] =
@@ -3648,9 +3399,8 @@ const struct Item gItems[] =
.description = sGoGogglesDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_METEORITE] =
@@ -3661,9 +3411,8 @@ const struct Item gItems[] =
.description = sMeteoriteDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_ROOM_1_KEY] =
@@ -3674,9 +3423,8 @@ const struct Item gItems[] =
.description = sRoom1KeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_ROOM_2_KEY] =
@@ -3687,9 +3435,8 @@ const struct Item gItems[] =
.description = sRoom2KeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_ROOM_4_KEY] =
@@ -3700,9 +3447,8 @@ const struct Item gItems[] =
.description = sRoom4KeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_ROOM_6_KEY] =
@@ -3713,9 +3459,8 @@ const struct Item gItems[] =
.description = sRoom6KeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_STORAGE_KEY] =
@@ -3726,9 +3471,8 @@ const struct Item gItems[] =
.description = sStorageKeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_ROOT_FOSSIL] =
@@ -3739,9 +3483,8 @@ const struct Item gItems[] =
.description = sRootFossilDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_CLAW_FOSSIL] =
@@ -3752,9 +3495,8 @@ const struct Item gItems[] =
.description = sClawFossilDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_DEVON_SCOPE] =
@@ -3765,9 +3507,8 @@ const struct Item gItems[] =
.description = sDevonScopeDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// TMs/HMs
@@ -3779,9 +3520,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM01Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM02_DRAGON_CLAW] =
@@ -3791,9 +3531,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM02Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM03_WATER_PULSE] =
@@ -3803,9 +3542,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM03Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM04_CALM_MIND] =
@@ -3815,9 +3553,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM04Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM05_ROAR] =
@@ -3827,9 +3564,8 @@ const struct Item gItems[] =
.price = 1000,
.description = sTM05Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM06_TOXIC] =
@@ -3839,9 +3575,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM06Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM07_HAIL] =
@@ -3851,9 +3586,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM07Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM08_BULK_UP] =
@@ -3863,9 +3597,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM08Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM09_BULLET_SEED] =
@@ -3875,9 +3608,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM09Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM10_HIDDEN_POWER] =
@@ -3887,9 +3619,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM10Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM11_SUNNY_DAY] =
@@ -3899,9 +3630,8 @@ const struct Item gItems[] =
.price = 2000,
.description = sTM11Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM12_TAUNT] =
@@ -3911,9 +3641,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM12Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM13_ICE_BEAM] =
@@ -3923,9 +3652,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM13Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM14_BLIZZARD] =
@@ -3935,9 +3663,8 @@ const struct Item gItems[] =
.price = 5500,
.description = sTM14Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM15_HYPER_BEAM] =
@@ -3947,9 +3674,8 @@ const struct Item gItems[] =
.price = 7500,
.description = sTM15Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM16_LIGHT_SCREEN] =
@@ -3959,9 +3685,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM16Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM17_PROTECT] =
@@ -3971,9 +3696,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM17Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM18_RAIN_DANCE] =
@@ -3983,9 +3707,8 @@ const struct Item gItems[] =
.price = 2000,
.description = sTM18Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM19_GIGA_DRAIN] =
@@ -3995,9 +3718,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM19Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM20_SAFEGUARD] =
@@ -4007,9 +3729,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM20Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM21_FRUSTRATION] =
@@ -4019,9 +3740,8 @@ const struct Item gItems[] =
.price = 1000,
.description = sTM21Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM22_SOLARBEAM] =
@@ -4031,9 +3751,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM22Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM23_IRON_TAIL] =
@@ -4043,9 +3762,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM23Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM24_THUNDERBOLT] =
@@ -4055,9 +3773,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM24Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM25_THUNDER] =
@@ -4067,9 +3784,8 @@ const struct Item gItems[] =
.price = 5500,
.description = sTM25Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM26_EARTHQUAKE] =
@@ -4079,9 +3795,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM26Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM27_RETURN] =
@@ -4091,9 +3806,8 @@ const struct Item gItems[] =
.price = 1000,
.description = sTM27Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM28_DIG] =
@@ -4103,9 +3817,8 @@ const struct Item gItems[] =
.price = 2000,
.description = sTM28Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM29_PSYCHIC] =
@@ -4115,9 +3828,8 @@ const struct Item gItems[] =
.price = 2000,
.description = sTM29Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM30_SHADOW_BALL] =
@@ -4127,9 +3839,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM30Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM31_BRICK_BREAK] =
@@ -4139,9 +3850,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM31Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM32_DOUBLE_TEAM] =
@@ -4151,9 +3861,8 @@ const struct Item gItems[] =
.price = 2000,
.description = sTM32Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM33_REFLECT] =
@@ -4163,9 +3872,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM33Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM34_SHOCK_WAVE] =
@@ -4175,9 +3883,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM34Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM35_FLAMETHROWER] =
@@ -4187,9 +3894,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM35Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM36_SLUDGE_BOMB] =
@@ -4199,9 +3905,8 @@ const struct Item gItems[] =
.price = 1000,
.description = sTM36Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM37_SANDSTORM] =
@@ -4211,9 +3916,8 @@ const struct Item gItems[] =
.price = 2000,
.description = sTM37Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM38_FIRE_BLAST] =
@@ -4223,9 +3927,8 @@ const struct Item gItems[] =
.price = 5500,
.description = sTM38Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM39_ROCK_TOMB] =
@@ -4235,9 +3938,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM39Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM40_AERIAL_ACE] =
@@ -4247,9 +3949,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM40Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM41_TORMENT] =
@@ -4259,9 +3960,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM41Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM42_FACADE] =
@@ -4271,9 +3971,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM42Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM43_SECRET_POWER] =
@@ -4283,9 +3982,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM43Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM44_REST] =
@@ -4295,9 +3993,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM44Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM45_ATTRACT] =
@@ -4307,9 +4004,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM45Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM46_THIEF] =
@@ -4319,9 +4015,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM46Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM47_STEEL_WING] =
@@ -4331,9 +4026,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM47Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM48_SKILL_SWAP] =
@@ -4343,9 +4037,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM48Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM49_SNATCH] =
@@ -4355,9 +4048,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM49Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_TM50_OVERHEAT] =
@@ -4367,9 +4059,8 @@ const struct Item gItems[] =
.price = 3000,
.description = sTM50Desc,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM01_CUT] =
@@ -4380,9 +4071,8 @@ const struct Item gItems[] =
.description = sHM01Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM02_FLY] =
@@ -4393,9 +4083,8 @@ const struct Item gItems[] =
.description = sHM02Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM03_SURF] =
@@ -4406,9 +4095,8 @@ const struct Item gItems[] =
.description = sHM03Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM04_STRENGTH] =
@@ -4419,9 +4107,8 @@ const struct Item gItems[] =
.description = sHM04Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM05_FLASH] =
@@ -4432,9 +4119,8 @@ const struct Item gItems[] =
.description = sHM05Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM06_ROCK_SMASH] =
@@ -4445,9 +4131,8 @@ const struct Item gItems[] =
.description = sHM06Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM07_WATERFALL] =
@@ -4458,9 +4143,8 @@ const struct Item gItems[] =
.description = sHM07Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_HM08_DIVE] =
@@ -4471,9 +4155,8 @@ const struct Item gItems[] =
.description = sHM08Desc,
.importance = 1,
.pocket = POCKET_TM_HM,
- .type = 1,
+ .type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_TMHM,
- .secondaryId = 0,
},
[ITEM_15B] =
@@ -4483,9 +4166,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_15C] =
@@ -4495,9 +4177,8 @@ const struct Item gItems[] =
.price = 0,
.description = sDummyDesc,
.pocket = POCKET_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// FireRed/LeafGreen key items
@@ -4510,9 +4191,8 @@ const struct Item gItems[] =
.description = sOaksParcelDesc,
.importance = 2,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_POKE_FLUTE] =
@@ -4523,9 +4203,8 @@ const struct Item gItems[] =
.description = sPokeFluteDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SECRET_KEY] =
@@ -4536,9 +4215,8 @@ const struct Item gItems[] =
.description = sSecretKeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BIKE_VOUCHER] =
@@ -4549,9 +4227,8 @@ const struct Item gItems[] =
.description = sBikeVoucherDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_GOLD_TEETH] =
@@ -4562,9 +4239,8 @@ const struct Item gItems[] =
.description = sGoldTeethDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_OLD_AMBER] =
@@ -4575,9 +4251,8 @@ const struct Item gItems[] =
.description = sOldAmberDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_CARD_KEY] =
@@ -4588,9 +4263,8 @@ const struct Item gItems[] =
.description = sCardKeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_LIFT_KEY] =
@@ -4601,9 +4275,8 @@ const struct Item gItems[] =
.description = sLiftKeyDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_HELIX_FOSSIL] =
@@ -4614,9 +4287,8 @@ const struct Item gItems[] =
.description = sHelixFossilDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_DOME_FOSSIL] =
@@ -4627,9 +4299,8 @@ const struct Item gItems[] =
.description = sDomeFossilDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SILPH_SCOPE] =
@@ -4640,9 +4311,8 @@ const struct Item gItems[] =
.description = sSilphScopeDesc,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BICYCLE] =
@@ -4654,9 +4324,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_TOWN_MAP] =
@@ -4668,9 +4337,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_VS_SEEKER] =
@@ -4682,9 +4350,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_FAME_CHECKER] =
@@ -4696,9 +4363,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_TM_CASE] =
@@ -4710,9 +4376,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_BERRY_POUCH] =
@@ -4724,9 +4389,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_TEACHY_TV] =
@@ -4738,9 +4402,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 2,
+ .type = ITEM_USE_FIELD,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_TRI_PASS] =
@@ -4752,9 +4415,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_RAINBOW_PASS] =
@@ -4766,9 +4428,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_TEA] =
@@ -4780,9 +4441,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_MYSTIC_TICKET] =
@@ -4794,9 +4454,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_AURORA_TICKET] =
@@ -4808,9 +4467,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_POWDER_JAR] =
@@ -4822,9 +4480,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_PowderJar,
- .secondaryId = 0,
},
[ITEM_RUBY] =
@@ -4836,9 +4493,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_SAPPHIRE] =
@@ -4850,9 +4506,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
// Emerald-specific key items
@@ -4866,9 +4521,8 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
[ITEM_OLD_SEA_MAP] =
@@ -4880,8 +4534,7 @@ const struct Item gItems[] =
.importance = 1,
.unk19 = 1,
.pocket = POCKET_KEY_ITEMS,
- .type = 4,
+ .type = ITEM_USE_BAG_MENU,
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
- .secondaryId = 0,
},
};
diff --git a/src/data/party_menu.h b/src/data/party_menu.h
index 3c3a3e1ce..daf3f4f6c 100644
--- a/src/data/party_menu.h
+++ b/src/data/party_menu.h
@@ -1194,62 +1194,62 @@ static const u8 *const sUnused_StatStrings[] =
static const u16 sTMHMMoves[] =
{
- MOVE_FOCUS_PUNCH,
- MOVE_DRAGON_CLAW,
- MOVE_WATER_PULSE,
- MOVE_CALM_MIND,
- MOVE_ROAR,
- MOVE_TOXIC,
- MOVE_HAIL,
- MOVE_BULK_UP,
- MOVE_BULLET_SEED,
- MOVE_HIDDEN_POWER,
- MOVE_SUNNY_DAY,
- MOVE_TAUNT,
- MOVE_ICE_BEAM,
- MOVE_BLIZZARD,
- MOVE_HYPER_BEAM,
- MOVE_LIGHT_SCREEN,
- MOVE_PROTECT,
- MOVE_RAIN_DANCE,
- MOVE_GIGA_DRAIN,
- MOVE_SAFEGUARD,
- MOVE_FRUSTRATION,
- MOVE_SOLAR_BEAM,
- MOVE_IRON_TAIL,
- MOVE_THUNDERBOLT,
- MOVE_THUNDER,
- MOVE_EARTHQUAKE,
- MOVE_RETURN,
- MOVE_DIG,
- MOVE_PSYCHIC,
- MOVE_SHADOW_BALL,
- MOVE_BRICK_BREAK,
- MOVE_DOUBLE_TEAM,
- MOVE_REFLECT,
- MOVE_SHOCK_WAVE,
- MOVE_FLAMETHROWER,
- MOVE_SLUDGE_BOMB,
- MOVE_SANDSTORM,
- MOVE_FIRE_BLAST,
- MOVE_ROCK_TOMB,
- MOVE_AERIAL_ACE,
- MOVE_TORMENT,
- MOVE_FACADE,
- MOVE_SECRET_POWER,
- MOVE_REST,
- MOVE_ATTRACT,
- MOVE_THIEF,
- MOVE_STEEL_WING,
- MOVE_SKILL_SWAP,
- MOVE_SNATCH,
- MOVE_OVERHEAT,
- MOVE_CUT,
- MOVE_FLY,
- MOVE_SURF,
- MOVE_STRENGTH,
- MOVE_FLASH,
- MOVE_ROCK_SMASH,
- MOVE_WATERFALL,
- MOVE_DIVE,
+ [ITEM_TM01 - ITEM_TM01] = MOVE_FOCUS_PUNCH,
+ [ITEM_TM02 - ITEM_TM01] = MOVE_DRAGON_CLAW,
+ [ITEM_TM03 - ITEM_TM01] = MOVE_WATER_PULSE,
+ [ITEM_TM04 - ITEM_TM01] = MOVE_CALM_MIND,
+ [ITEM_TM05 - ITEM_TM01] = MOVE_ROAR,
+ [ITEM_TM06 - ITEM_TM01] = MOVE_TOXIC,
+ [ITEM_TM07 - ITEM_TM01] = MOVE_HAIL,
+ [ITEM_TM08 - ITEM_TM01] = MOVE_BULK_UP,
+ [ITEM_TM09 - ITEM_TM01] = MOVE_BULLET_SEED,
+ [ITEM_TM10 - ITEM_TM01] = MOVE_HIDDEN_POWER,
+ [ITEM_TM11 - ITEM_TM01] = MOVE_SUNNY_DAY,
+ [ITEM_TM12 - ITEM_TM01] = MOVE_TAUNT,
+ [ITEM_TM13 - ITEM_TM01] = MOVE_ICE_BEAM,
+ [ITEM_TM14 - ITEM_TM01] = MOVE_BLIZZARD,
+ [ITEM_TM15 - ITEM_TM01] = MOVE_HYPER_BEAM,
+ [ITEM_TM16 - ITEM_TM01] = MOVE_LIGHT_SCREEN,
+ [ITEM_TM17 - ITEM_TM01] = MOVE_PROTECT,
+ [ITEM_TM18 - ITEM_TM01] = MOVE_RAIN_DANCE,
+ [ITEM_TM19 - ITEM_TM01] = MOVE_GIGA_DRAIN,
+ [ITEM_TM20 - ITEM_TM01] = MOVE_SAFEGUARD,
+ [ITEM_TM21 - ITEM_TM01] = MOVE_FRUSTRATION,
+ [ITEM_TM22 - ITEM_TM01] = MOVE_SOLAR_BEAM,
+ [ITEM_TM23 - ITEM_TM01] = MOVE_IRON_TAIL,
+ [ITEM_TM24 - ITEM_TM01] = MOVE_THUNDERBOLT,
+ [ITEM_TM25 - ITEM_TM01] = MOVE_THUNDER,
+ [ITEM_TM26 - ITEM_TM01] = MOVE_EARTHQUAKE,
+ [ITEM_TM27 - ITEM_TM01] = MOVE_RETURN,
+ [ITEM_TM28 - ITEM_TM01] = MOVE_DIG,
+ [ITEM_TM29 - ITEM_TM01] = MOVE_PSYCHIC,
+ [ITEM_TM30 - ITEM_TM01] = MOVE_SHADOW_BALL,
+ [ITEM_TM31 - ITEM_TM01] = MOVE_BRICK_BREAK,
+ [ITEM_TM32 - ITEM_TM01] = MOVE_DOUBLE_TEAM,
+ [ITEM_TM33 - ITEM_TM01] = MOVE_REFLECT,
+ [ITEM_TM34 - ITEM_TM01] = MOVE_SHOCK_WAVE,
+ [ITEM_TM35 - ITEM_TM01] = MOVE_FLAMETHROWER,
+ [ITEM_TM36 - ITEM_TM01] = MOVE_SLUDGE_BOMB,
+ [ITEM_TM37 - ITEM_TM01] = MOVE_SANDSTORM,
+ [ITEM_TM38 - ITEM_TM01] = MOVE_FIRE_BLAST,
+ [ITEM_TM39 - ITEM_TM01] = MOVE_ROCK_TOMB,
+ [ITEM_TM40 - ITEM_TM01] = MOVE_AERIAL_ACE,
+ [ITEM_TM41 - ITEM_TM01] = MOVE_TORMENT,
+ [ITEM_TM42 - ITEM_TM01] = MOVE_FACADE,
+ [ITEM_TM43 - ITEM_TM01] = MOVE_SECRET_POWER,
+ [ITEM_TM44 - ITEM_TM01] = MOVE_REST,
+ [ITEM_TM45 - ITEM_TM01] = MOVE_ATTRACT,
+ [ITEM_TM46 - ITEM_TM01] = MOVE_THIEF,
+ [ITEM_TM47 - ITEM_TM01] = MOVE_STEEL_WING,
+ [ITEM_TM48 - ITEM_TM01] = MOVE_SKILL_SWAP,
+ [ITEM_TM49 - ITEM_TM01] = MOVE_SNATCH,
+ [ITEM_TM50 - ITEM_TM01] = MOVE_OVERHEAT,
+ [ITEM_HM01 - ITEM_TM01] = MOVE_CUT,
+ [ITEM_HM02 - ITEM_TM01] = MOVE_FLY,
+ [ITEM_HM03 - ITEM_TM01] = MOVE_SURF,
+ [ITEM_HM04 - ITEM_TM01] = MOVE_STRENGTH,
+ [ITEM_HM05 - ITEM_TM01] = MOVE_FLASH,
+ [ITEM_HM06 - ITEM_TM01] = MOVE_ROCK_SMASH,
+ [ITEM_HM07 - ITEM_TM01] = MOVE_WATERFALL,
+ [ITEM_HM08 - ITEM_TM01] = MOVE_DIVE,
};
diff --git a/src/decompress.c b/src/decompress.c
index 007753303..335699449 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -86,7 +86,7 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32
{
if (species == SPECIES_UNOWN)
{
- u16 i = (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 3)) % 0x1C;
+ u16 i = GET_UNOWN_LETTER(personality);
// The other Unowns are separate from Unown A.
if (i == 0)
@@ -308,7 +308,7 @@ void LoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s
{
if (species == SPECIES_UNOWN)
{
- u16 i = (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 3)) % 0x1C;
+ u16 i = GET_UNOWN_LETTER(personality);
// The other Unowns are separate from Unown A.
if (i == 0)
@@ -366,7 +366,7 @@ void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src
{
if (species == SPECIES_UNOWN)
{
- u16 i = (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 3)) % 0x1C;
+ u16 i = GET_UNOWN_LETTER(personality);
// The other Unowns are separate from Unown A.
if (i == 0)
diff --git a/src/decoration.c b/src/decoration.c
index b97ab4321..484398aba 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -113,7 +113,7 @@ EWRAM_DATA static u16 sDecorationsCursorPos = 0;
EWRAM_DATA static u16 sDecorationsScrollOffset = 0;
EWRAM_DATA u8 gCurDecorationIndex = 0;
EWRAM_DATA static u8 sCurDecorationCategory = DECORCAT_DESK;
-EWRAM_DATA static u32 filler_0203a174[2] = {};
+EWRAM_DATA static u32 sFiller[2] = {};
EWRAM_DATA static struct DecorationPCContext sDecorationContext = {};
EWRAM_DATA static u8 sDecorMenuWindowIds[WINDOW_COUNT] = {};
EWRAM_DATA static struct DecorationItemsMenu *sDecorationItemsMenu = NULL;
diff --git a/src/diploma.c b/src/diploma.c
index f243d09f9..8f04bb9ad 100644
--- a/src/diploma.c
+++ b/src/diploma.c
@@ -168,7 +168,7 @@ static const struct BgTemplate sDiplomaBgTemplates[2] =
static void InitDiplomaBg(void)
{
ResetBgsAndClearDma3BusyFlags(0);
- InitBgsFromTemplates(0, sDiplomaBgTemplates, 2);
+ InitBgsFromTemplates(0, sDiplomaBgTemplates, ARRAY_COUNT(sDiplomaBgTemplates));
SetBgTilemapBuffer(1, sDiplomaTilemapPtr);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
ShowBg(0);
diff --git a/src/easy_chat.c b/src/easy_chat.c
index 2590eea1a..6bb77bc84 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -4073,7 +4073,6 @@ static void sub_811D864(u8 arg0, u8 arg1)
{
int i, j;
u16 easyChatWord;
- u8 *str;
int y;
int var0;
diff --git a/src/ereader_screen.c b/src/ereader_screen.c
index 3f2cf3217..d27605c1d 100755
--- a/src/ereader_screen.c
+++ b/src/ereader_screen.c
@@ -211,7 +211,6 @@ static u32 sub_81D4EE4(u8 *arg0, u16 *arg1)
void task_add_00_ereader(void)
{
- int value;
struct Unk81D5014 *data;
u8 taskId = CreateTask(sub_81D5084, 0);
data = (struct Unk81D5014 *)gTasks[taskId].data;
diff --git a/src/event_object_movement.c b/src/event_object_movement.c
index 12ef4acdc..d9c06eb10 100644
--- a/src/event_object_movement.c
+++ b/src/event_object_movement.c
@@ -87,7 +87,7 @@ static void GetGroundEffectFlags_Puddle(struct ObjectEvent*, u32*);
static void GetGroundEffectFlags_Ripple(struct ObjectEvent*, u32*);
static void GetGroundEffectFlags_Seaweed(struct ObjectEvent*, u32*);
static void GetGroundEffectFlags_JumpLanding(struct ObjectEvent*, u32*);
-static u8 ObjectEventCheckForReflectiveSurface(struct ObjectEvent*);
+static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent*);
static u8 GetReflectionTypeByMetatileBehavior(u32);
static void InitObjectPriorityByZCoord(struct Sprite *sprite, u8 z);
static void ObjectEventUpdateSubpriority(struct ObjectEvent*, struct Sprite*);
@@ -130,7 +130,6 @@ static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId,
static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *);
static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8);
static void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
-static void UpdateObjectEventSpriteSubpriorityAndVisibility(struct Sprite *);
static void InitSpriteForFigure8Anim(struct Sprite *sprite);
static bool8 AnimateSpriteInFigure8(struct Sprite *sprite);
static void UpdateObjectEventSprite(struct Sprite *);
@@ -7514,21 +7513,23 @@ static void ObjectEventUpdateMetatileBehaviors(struct ObjectEvent *objEvent)
static void GetGroundEffectFlags_Reflection(struct ObjectEvent *objEvent, u32 *flags)
{
- u32 reflectionFlags[2] = { GROUND_EFFECT_FLAG_REFLECTION, GROUND_EFFECT_FLAG_ICE_REFLECTION };
- u8 type = ObjectEventCheckForReflectiveSurface(objEvent);
+ u32 reflectionFlags[NUM_REFLECTION_TYPES - 1] = {
+ [REFL_TYPE_ICE - 1] = GROUND_EFFECT_FLAG_ICE_REFLECTION,
+ [REFL_TYPE_WATER - 1] = GROUND_EFFECT_FLAG_WATER_REFLECTION
+ };
+ u8 reflType = ObjectEventGetNearbyReflectionType(objEvent);
- if (type)
+ if (reflType)
{
- if (!objEvent->hasReflection)
+ if (objEvent->hasReflection == 0)
{
- objEvent->hasReflection = 0;
- objEvent->hasReflection = 1;
- *flags |= reflectionFlags[type - 1];
+ objEvent->hasReflection++;
+ *flags |= reflectionFlags[reflType - 1];
}
}
else
{
- objEvent->hasReflection = 0;
+ objEvent->hasReflection = FALSE;
}
}
@@ -7701,26 +7702,24 @@ static void GetGroundEffectFlags_JumpLanding(struct ObjectEvent *objEvent, u32 *
}
}
-static u8 ObjectEventCheckForReflectiveSurface(struct ObjectEvent *objEvent)
+#define RETURN_REFLECTION_TYPE_AT(x, y) \
+ b = MapGridGetMetatileBehaviorAt(x, y); \
+ result = GetReflectionTypeByMetatileBehavior(b); \
+ if (result != REFL_TYPE_NONE) \
+ return result;
+
+static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent *objEvent)
{
const struct ObjectEventGraphicsInfo *info = GetObjectEventGraphicsInfo(objEvent->graphicsId);
// ceil div by tile width?
s16 width = (info->width + 8) >> 4;
s16 height = (info->height + 8) >> 4;
- s16 i;
- s16 j;
- u8 result;
- u8 b;
- s16 one;
-
-#define RETURN_REFLECTION_TYPE_AT(x, y) \
- b = MapGridGetMetatileBehaviorAt(x, y); \
- result = GetReflectionTypeByMetatileBehavior(b); \
- if (result != 0) \
- return result;
+ s16 i, j;
+ u8 result, b; // used by RETURN_REFLECTION_TYPE_AT
+ s16 one = 1;
- for (i = 0, one = 1; i < height; i++)
+ for (i = 0; i < height; i++)
{
RETURN_REFLECTION_TYPE_AT(objEvent->currentCoords.x, objEvent->currentCoords.y + one + i)
RETURN_REFLECTION_TYPE_AT(objEvent->previousCoords.x, objEvent->previousCoords.y + one + i)
@@ -7732,19 +7731,20 @@ static u8 ObjectEventCheckForReflectiveSurface(struct ObjectEvent *objEvent)
RETURN_REFLECTION_TYPE_AT(objEvent->previousCoords.x - j, objEvent->previousCoords.y + one + i)
}
}
- return 0;
+
+ return REFL_TYPE_NONE;
+}
#undef RETURN_REFLECTION_TYPE_AT
-}
static u8 GetReflectionTypeByMetatileBehavior(u32 behavior)
{
if (MetatileBehavior_IsIce(behavior))
- return 1;
+ return REFL_TYPE_ICE;
else if (MetatileBehavior_IsReflective(behavior))
- return 2;
+ return REFL_TYPE_WATER;
else
- return 0;
+ return REFL_TYPE_NONE;
}
u8 GetLedgeJumpDirection(s16 x, s16 y, u8 z)
@@ -7945,12 +7945,12 @@ void GroundEffect_StepOnLongGrass(struct ObjectEvent *objEvent, struct Sprite *s
void GroundEffect_WaterReflection(struct ObjectEvent *objEvent, struct Sprite *sprite)
{
- SetUpReflection(objEvent, sprite, 0);
+ SetUpReflection(objEvent, sprite, FALSE);
}
void GroundEffect_IceReflection(struct ObjectEvent *objEvent, struct Sprite *sprite)
{
- SetUpReflection(objEvent, sprite, 1);
+ SetUpReflection(objEvent, sprite, TRUE);
}
void GroundEffect_FlowingWater(struct ObjectEvent *objEvent, struct Sprite *sprite)
@@ -8117,8 +8117,8 @@ static void (*const sGroundEffectFuncs[])(struct ObjectEvent *objEvent, struct S
GroundEffect_StepOnTallGrass, // GROUND_EFFECT_FLAG_TALL_GRASS_ON_MOVE
GroundEffect_SpawnOnLongGrass, // GROUND_EFFECT_FLAG_LONG_GRASS_ON_SPAWN
GroundEffect_StepOnLongGrass, // GROUND_EFFECT_FLAG_LONG_GRASS_ON_MOVE
- GroundEffect_WaterReflection, // GROUND_EFFECT_FLAG_ICE_REFLECTION
- GroundEffect_IceReflection, // GROUND_EFFECT_FLAG_REFLECTION
+ GroundEffect_WaterReflection, // GROUND_EFFECT_FLAG_WATER_REFLECTION
+ GroundEffect_IceReflection, // GROUND_EFFECT_FLAG_ICE_REFLECTION
GroundEffect_FlowingWater, // GROUND_EFFECT_FLAG_SHALLOW_FLOWING_WATER
GroundEffect_SandTracks, // GROUND_EFFECT_FLAG_SAND
GroundEffect_DeepSandTracks, // GROUND_EFFECT_FLAG_DEEP_SAND
@@ -8649,14 +8649,14 @@ static void DestroyObjectEventSprites(void)
}
}
-static int GetObjectEventSpriteId(u8 var) // this should return a u8, because all that call this shifts to u8, but it wont match because it doesnt shift u8 at the end.
+static int GetObjectEventSpriteId(u8 objectEventId) // this should return a u8, because all that call this shifts to u8, but it wont match because it doesnt shift u8 at the end.
{
int i;
for (i = 0; i < MAX_SPRITES; i++)
{
struct Sprite *sprite = &gSprites[i];
- if(sprite->inUse && sprite->callback == UpdateObjectEventSprite && (u8)sprite->data[0] == var)
+ if (sprite->inUse && sprite->callback == UpdateObjectEventSprite && (u8)sprite->data[0] == objectEventId)
return i;
}
return MAX_SPRITES;
@@ -8788,9 +8788,9 @@ static void UpdateObjectEventSpritePosition(struct Sprite *sprite)
}
}
-bool32 IsObjectEventSpriteAnimating(u8 var)
+bool32 IsObjectEventSpriteAnimating(u8 objectEventId)
{
- u8 spriteId = GetObjectEventSpriteId(var);
+ u8 spriteId = GetObjectEventSpriteId(objectEventId);
if (spriteId == MAX_SPRITES)
return FALSE;
diff --git a/src/evolution_scene.c b/src/evolution_scene.c
index d41bc5970..a8de8a555 100644
--- a/src/evolution_scene.c
+++ b/src/evolution_scene.c
@@ -60,7 +60,6 @@ static void CB2_TradeEvolutionSceneUpdate(void);
static void EvoDummyFunc(void);
static void VBlankCB_EvolutionScene(void);
static void VBlankCB_TradeEvolutionScene(void);
-static void sub_81150D8(void);
static void sub_8140134(void);
static void EvoScene_DoMonAnimation(u8 monSpriteId, u16 speciesId);
static bool32 EvoScene_IsMonAnimFinished(u8 monSpriteId);
diff --git a/src/faraway_island.c b/src/faraway_island.c
index e3d8444c9..bc0814652 100755
--- a/src/faraway_island.c
+++ b/src/faraway_island.c
@@ -372,7 +372,6 @@ void SetMewAboveGrass(void)
{
s16 x;
s16 y;
- u8 spriteId;
struct ObjectEvent *mew = &gObjectEvents[GetMewObjectEventId()];
mew->invisible = FALSE;
diff --git a/src/field_effect.c b/src/field_effect.c
index 5a18557eb..b1837c514 100644
--- a/src/field_effect.c
+++ b/src/field_effect.c
@@ -934,43 +934,43 @@ void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId)
// r, g, b are between 0 and 16
void MultiplyInvertedPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b)
{
- int curRed;
- int curGreen;
- int curBlue;
- u16 outPal;
-
- outPal = gPlttBufferUnfaded[i];
- curRed = outPal & 0x1f;
- curGreen = (outPal & (0x1f << 5)) >> 5;
- curBlue = (outPal & (0x1f << 10)) >> 10;
- curRed += (((0x1f - curRed) * r) >> 4);
- curGreen += (((0x1f - curGreen) * g) >> 4);
- curBlue += (((0x1f - curBlue) * b) >> 4);
- outPal = curRed;
- outPal |= curGreen << 5;
- outPal |= curBlue << 10;
- gPlttBufferFaded[i] = outPal;
+ int curRed, curGreen, curBlue;
+ u16 color = gPlttBufferUnfaded[i];
+
+ curRed = (color & RGB_RED);
+ curGreen = (color & RGB_GREEN) >> 5;
+ curBlue = (color & RGB_BLUE) >> 10;
+
+ curRed += (((0x1F - curRed) * r) >> 4);
+ curGreen += (((0x1F - curGreen) * g) >> 4);
+ curBlue += (((0x1F - curBlue) * b) >> 4);
+
+ color = curRed;
+ color |= (curGreen << 5);
+ color |= (curBlue << 10);
+
+ gPlttBufferFaded[i] = color;
}
// r, g, b are between 0 and 16
void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b)
{
- int curRed;
- int curGreen;
- int curBlue;
- u16 outPal;
-
- outPal = gPlttBufferUnfaded[i];
- curRed = outPal & 0x1f;
- curGreen = (outPal & (0x1f << 5)) >> 5;
- curBlue = (outPal & (0x1f << 10)) >> 10;
- curRed -= ((curRed * r) >> 4);
+ int curRed, curGreen, curBlue;
+ u16 color = gPlttBufferUnfaded[i];
+
+ curRed = (color & RGB_RED);
+ curGreen = (color & RGB_GREEN) >> 5;
+ curBlue = (color & RGB_BLUE) >> 10;
+
+ curRed -= ((curRed * r) >> 4);
curGreen -= ((curGreen * g) >> 4);
- curBlue -= ((curBlue * b) >> 4);
- outPal = curRed;
- outPal |= curGreen << 5;
- outPal |= curBlue << 10;
- gPlttBufferFaded[i] = outPal;
+ curBlue -= ((curBlue * b) >> 4);
+
+ color = curRed;
+ color |= curGreen << 5;
+ color |= curBlue << 10;
+
+ gPlttBufferFaded[i] = color;
}
// Task data for Task_PokecenterHeal and Task_HallOfFameRecord
diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c
index 2322232b8..67102a83b 100755
--- a/src/field_effect_helpers.c
+++ b/src/field_effect_helpers.c
@@ -32,6 +32,11 @@ static void CreateBobbingEffect(struct ObjectEvent *, struct Sprite *, struct Sp
static void sub_8155850(struct Sprite *);
static u32 ShowDisguiseFieldEffect(u8, u8, u8);
+#define sReflectionObjEventId data[0]
+#define sReflectionObjEventLocalId data[1]
+#define sReflectionVerticalOffset data[2]
+#define sIsStillReflection data[7]
+
void SetUpReflection(struct ObjectEvent *objectEvent, struct Sprite *sprite, bool8 stillReflection)
{
struct Sprite *reflectionSprite;
@@ -46,9 +51,9 @@ void SetUpReflection(struct ObjectEvent *objectEvent, struct Sprite *sprite, boo
reflectionSprite->affineAnims = gDummySpriteAffineAnimTable;
reflectionSprite->affineAnimBeginning = TRUE;
reflectionSprite->subspriteMode = SUBSPRITES_OFF;
- reflectionSprite->data[0] = sprite->data[0];
- reflectionSprite->data[1] = objectEvent->localId;
- reflectionSprite->data[7] = stillReflection;
+ reflectionSprite->sReflectionObjEventId = sprite->data[0];
+ reflectionSprite->sReflectionObjEventLocalId = objectEvent->localId;
+ reflectionSprite->sIsStillReflection = stillReflection;
LoadObjectReflectionPalette(objectEvent, reflectionSprite);
if (!stillReflection)
@@ -60,19 +65,19 @@ static s16 GetReflectionVerticalOffset(struct ObjectEvent *objectEvent)
return GetObjectEventGraphicsInfo(objectEvent->graphicsId)->height - 2;
}
-static void LoadObjectReflectionPalette(struct ObjectEvent *objectEvent, struct Sprite *sprite)
+static void LoadObjectReflectionPalette(struct ObjectEvent *objectEvent, struct Sprite *reflectionSprite)
{
u8 bridgeType;
u16 bridgeReflectionVerticalOffsets[] = { 12, 28, 44 };
- sprite->data[2] = 0;
+ reflectionSprite->sReflectionVerticalOffset = 0;
if (!GetObjectEventGraphicsInfo(objectEvent->graphicsId)->disableReflectionPaletteLoad && ((bridgeType = MetatileBehavior_GetBridgeType(objectEvent->previousMetatileBehavior)) || (bridgeType = MetatileBehavior_GetBridgeType(objectEvent->currentMetatileBehavior))))
{
- sprite->data[2] = bridgeReflectionVerticalOffsets[bridgeType - 1];
- LoadObjectHighBridgeReflectionPalette(objectEvent, sprite->oam.paletteNum);
+ reflectionSprite->sReflectionVerticalOffset = bridgeReflectionVerticalOffsets[bridgeType - 1];
+ LoadObjectHighBridgeReflectionPalette(objectEvent, reflectionSprite->oam.paletteNum);
}
else
{
- LoadObjectRegularReflectionPalette(objectEvent, sprite->oam.paletteNum);
+ LoadObjectRegularReflectionPalette(objectEvent, reflectionSprite->oam.paletteNum);
}
}
@@ -118,9 +123,9 @@ static void UpdateObjectReflectionSprite(struct Sprite *reflectionSprite)
struct ObjectEvent *objectEvent;
struct Sprite *mainSprite;
- objectEvent = &gObjectEvents[reflectionSprite->data[0]];
+ objectEvent = &gObjectEvents[reflectionSprite->sReflectionObjEventId];
mainSprite = &gSprites[objectEvent->spriteId];
- if (!objectEvent->active || !objectEvent->hasReflection || objectEvent->localId != reflectionSprite->data[1])
+ if (!objectEvent->active || !objectEvent->hasReflection || objectEvent->localId != reflectionSprite->sReflectionObjEventLocalId)
{
reflectionSprite->inUse = FALSE;
}
@@ -135,8 +140,7 @@ static void UpdateObjectReflectionSprite(struct Sprite *reflectionSprite)
reflectionSprite->subspriteTableNum = mainSprite->subspriteTableNum;
reflectionSprite->invisible = mainSprite->invisible;
reflectionSprite->pos1.x = mainSprite->pos1.x;
- // reflectionSprite->data[2] holds an additional vertical offset, used by the high bridges on Route 120
- reflectionSprite->pos1.y = mainSprite->pos1.y + GetReflectionVerticalOffset(objectEvent) + reflectionSprite->data[2];
+ reflectionSprite->pos1.y = mainSprite->pos1.y + GetReflectionVerticalOffset(objectEvent) + reflectionSprite->sReflectionVerticalOffset;
reflectionSprite->centerToCornerVecX = mainSprite->centerToCornerVecX;
reflectionSprite->centerToCornerVecY = mainSprite->centerToCornerVecY;
reflectionSprite->pos2.x = mainSprite->pos2.x;
@@ -146,8 +150,7 @@ static void UpdateObjectReflectionSprite(struct Sprite *reflectionSprite)
if (objectEvent->hideReflection == TRUE)
reflectionSprite->invisible = TRUE;
- // Check if the reflection is not still.
- if (reflectionSprite->data[7] == FALSE)
+ if (reflectionSprite->sIsStillReflection == FALSE)
{
// Sets the reflection sprite's rot/scale matrix to the appropriate
// matrix based on whether or not the main sprite is horizontally flipped.
@@ -159,6 +162,11 @@ static void UpdateObjectReflectionSprite(struct Sprite *reflectionSprite)
}
}
+#undef sReflectionObjEventId
+#undef sReflectionObjEventLocalId
+#undef sReflectionVerticalOffset
+#undef sIsStillReflection
+
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
u8 CreateWarpArrowSprite(void)
diff --git a/src/fieldmap.c b/src/fieldmap.c
index 296c4edf2..2961d2f49 100644
--- a/src/fieldmap.c
+++ b/src/fieldmap.c
@@ -28,7 +28,7 @@ EWRAM_DATA static u16 gBackupMapData[MAX_MAP_DATA_SIZE] = {0};
EWRAM_DATA struct MapHeader gMapHeader = {0};
EWRAM_DATA struct Camera gCamera = {0};
EWRAM_DATA static struct ConnectionFlags gMapConnectionFlags = {0};
-EWRAM_DATA static u32 sFiller_02037344 = 0; // without this, the next file won't align properly
+EWRAM_DATA static u32 sFiller = 0; // without this, the next file won't align properly
struct BackupMapLayout gBackupMapLayout;
diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c
index 0458f7621..446633a53 100644
--- a/src/fldeff_cut.c
+++ b/src/fldeff_cut.c
@@ -62,7 +62,6 @@ static void HandleLongGrassOnHyper(u8, s16, s16);
static u8 sCutSquareSide;
static u8 sTileCountFromPlayer_X;
static u8 sTileCountFromPlayer_Y;
-static u32 sUnused;
static bool8 sHyperCutTiles[CUT_HYPER_AREA];
// EWRAM variables
diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c
index 7a96eaa82..733dca722 100644
--- a/src/fldeff_escalator.c
+++ b/src/fldeff_escalator.c
@@ -10,8 +10,6 @@ static EWRAM_DATA u8 sEscalatorAnim_TaskId = 0;
static void SetEscalatorMetatile(u8 taskId, const s16 *metatileIds, u16 metatileMasks);
static void Task_DrawEscalator(u8 taskId);
-static void Task_DrawTeleporterHousing(u8 taskId);
-static void Task_DrawTeleporterCable(u8 taskId);
#define ESCALATOR_STAGES 3
#define LAST_ESCALATOR_STAGE (ESCALATOR_STAGES - 1)
diff --git a/src/frontier_util.c b/src/frontier_util.c
index db5f86aef..095c750a6 100644
--- a/src/frontier_util.c
+++ b/src/frontier_util.c
@@ -1513,9 +1513,9 @@ static void ShowLinkContestResultsWindow(void)
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Smart, x, 89, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Tough, x, 105, TEXT_SPEED_FF, NULL);
- for (i = 0; i < 5; i++)
+ for (i = 0; i < CONTEST_CATEGORIES_COUNT; i++)
{
- for (j = 0; j < 4; j++)
+ for (j = 0; j < CONTESTANT_COUNT; j++)
{
ConvertIntToDecimalStringN(gStringVar4, gSaveBlock2Ptr->contestLinkResults[i][j], STR_CONV_MODE_RIGHT_ALIGN, 4);
AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SPEED_FF, NULL);
diff --git a/src/image_processing_effects.c b/src/image_processing_effects.c
index cbd8b9b37..224de6fe1 100644
--- a/src/image_processing_effects.c
+++ b/src/image_processing_effects.c
@@ -129,11 +129,11 @@ static void ApplyImageEffect_RedChannelGrayscale(u8 delta)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
// Gets the grayscale value, based on the pixel's red channel.
// Also adds a delta to skew lighter or darker.
- u8 grayValue = (31 & *pixel);
+ u8 grayValue = (*pixel & RGB_RED);
grayValue += delta;
if (grayValue > 31)
grayValue = 31;
@@ -154,9 +154,9 @@ static void ApplyImageEffect_RedChannelGrayscaleHighlight(u8 highlight)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
- u8 grayValue = (31 & *pixel);
+ u8 grayValue = (*pixel & RGB_RED);
if (grayValue > 31 - highlight)
grayValue = 31 - (highlight >> 1);
@@ -183,7 +183,7 @@ static void ApplyImageEffect_Grayscale(void)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
*pixel = ConvertColorToGrayscale(pixel);
}
}
@@ -203,7 +203,7 @@ static void ApplyImageEffect_Blur(void)
pixel += gCanvasWidth;
while (j < gCanvasRowEnd - 1)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
*pixel = QuantizePixel_Blur(&prevPixel, pixel, pixel + gCanvasWidth);
prevPixel = *pixel;
@@ -225,7 +225,7 @@ static void ApplyImageEffect_PersonalityColor(u8 personality)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
*pixel = QuantizePixel_PersonalityColor(pixel, personality);
}
}
@@ -241,7 +241,7 @@ static void ApplyImageEffect_BlackAndWhite(void)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
*pixel = QuantizePixel_BlackAndWhite(pixel);
}
}
@@ -293,7 +293,7 @@ static void ApplyImageEffect_Invert(void)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
*pixel = QuantizePixel_Invert(pixel);
}
}
@@ -311,7 +311,7 @@ static void ApplyImageEffect_Shimmer(void)
{
for (j = 0; j < 64; j++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
*pixel = QuantizePixel_Invert(pixel);
}
}
@@ -321,30 +321,30 @@ static void ApplyImageEffect_Shimmer(void)
{
pixel = &gCanvasPixels[j];
prevPixel = *pixel;
- *pixel = 0x8000;
+ *pixel = RGB_ALPHA;
for (i = 1, pixel += 64; i < 63; i++, pixel += 64)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
*pixel = QuantizePixel_BlurHard(&prevPixel, pixel, pixel + 64);
prevPixel = *pixel;
}
}
- *pixel = 0x8000;
+ *pixel = RGB_ALPHA;
pixel = &gCanvasPixels[j];
prevPixel = *pixel;
- *pixel = 0x8000;
+ *pixel = RGB_ALPHA;
for (i = 1, pixel += 64; i < 63; i++, pixel += 64)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
*pixel = QuantizePixel_BlurHard(&prevPixel, pixel, pixel + 64);
prevPixel = *pixel;
}
}
- *pixel = 0x8000;
+ *pixel = RGB_ALPHA;
}
// Finally, invert colors back to the original color space.
@@ -355,7 +355,7 @@ static void ApplyImageEffect_Shimmer(void)
{
for (j = 0; j < 64; j++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
*pixel = QuantizePixel_Invert(pixel);
}
}
@@ -372,7 +372,7 @@ static void ApplyImageEffect_BlurRight(void)
u16 prevPixel = *pixel;
for (i = 1, pixel++; i < gCanvasColumnEnd - 1; i++, pixel++)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
*pixel = QuantizePixel_MotionBlur(&prevPixel, pixel);
prevPixel = *pixel;
@@ -392,7 +392,7 @@ static void ApplyImageEffect_BlurDown(void)
u16 prevPixel = *pixel;
for (j = 1, pixel += gCanvasWidth; j < gCanvasRowEnd - 1; j++, pixel += gCanvasWidth)
{
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
*pixel = QuantizePixel_MotionBlur(&prevPixel, pixel);
prevPixel = *pixel;
@@ -447,11 +447,11 @@ static void AddPointillismPoints(u16 arg0)
{
u16 *pixel = &gCanvasPixels[points[i].row * 64] + points[i].column;
- if (!(0x8000 & *pixel))
+ if (!IS_ALPHA(*pixel))
{
- u16 red = (*pixel) & 0x1F;
- u16 green = (*pixel >> 5) & 0x1F;
- u16 blue = (*pixel >> 10) & 0x1F;
+ u16 red = GET_R(*pixel);
+ u16 green = GET_G(*pixel);
+ u16 blue = GET_B(*pixel);
switch (colorType)
{
@@ -501,9 +501,9 @@ static void AddPointillismPoints(u16 arg0)
static u16 ConvertColorToGrayscale(u16 *color)
{
s32 clr = *color;
- s32 r = clr & 0x1F;
- s32 g = (clr >> 5) & 0x1F;
- s32 b = (clr >> 10) & 0x1F;
+ s32 r = GET_R(clr);
+ s32 g = GET_G(clr);
+ s32 b = GET_B(clr);
s32 gray = (r * Q_8_8(0.3) + g * Q_8_8(0.59) + b * Q_8_8(0.1133)) >> 8;
return RGB2(gray, gray, gray);
}
@@ -512,9 +512,9 @@ static u16 ConvertColorToGrayscale(u16 *color)
// Everything else is white.
static u16 QuantizePixel_PersonalityColor(u16 *color, u8 personality)
{
- u16 red = *color & 0x1F;
- u16 green = (*color >> 5) & 0x1F;
- u16 blue = (*color >> 10) & 0x1F;
+ u16 red = GET_R(*color);
+ u16 green = GET_G(*color);
+ u16 blue = GET_B(*color);
if (red < 17 && green < 17 && blue < 17)
return GetColorFromPersonality(personality);
@@ -526,9 +526,9 @@ static u16 QuantizePixel_PersonalityColor(u16 *color, u8 personality)
// the mon's personality value, return a color.
static u16 GetColorFromPersonality(u8 personality)
{
- u16 red = 0;
+ u16 red = 0;
u16 green = 0;
- u16 blue = 0;
+ u16 blue = 0;
u8 strength = (personality / 6) % 3;
u8 colorType = personality % 6;
@@ -577,9 +577,9 @@ static u16 GetColorFromPersonality(u8 personality)
static u16 QuantizePixel_BlackAndWhite(u16 *color)
{
- u16 red = *color & 0x1F;
- u16 green = (*color >> 5) & 0x1F;
- u16 blue = (*color >> 10) & 0x1F;
+ u16 red = GET_R(*color);
+ u16 green = GET_G(*color);
+ u16 blue = GET_B(*color);
if (red < 17 && green < 17 && blue < 17)
return RGB_BLACK;
@@ -591,9 +591,9 @@ static u16 QuantizePixel_BlackOutline(u16 *pixelA, u16 *pixelB)
{
if (*pixelA != RGB_BLACK)
{
- if (*pixelA & 0x8000)
- return 0x8000;
- if (*pixelB & 0x8000)
+ if (IS_ALPHA(*pixelA))
+ return RGB_ALPHA;
+ if (IS_ALPHA(*pixelB))
return RGB_BLACK;
return *pixelA;
@@ -604,13 +604,13 @@ static u16 QuantizePixel_BlackOutline(u16 *pixelA, u16 *pixelB)
static u16 QuantizePixel_Invert(u16 *color)
{
- u16 red = *color & 0x1F;
- u16 green = (*color >> 5) & 0x1F;
- u16 blue = (*color >> 10) & 0x1F;
+ u16 red = GET_R(*color);
+ u16 green = GET_G(*color);
+ u16 blue = GET_B(*color);
- red = 31 - red;
+ red = 31 - red;
green = 31 - green;
- blue = 31 - blue;
+ blue = 31 - blue;
return RGB2(red, green, blue);
}
@@ -626,12 +626,12 @@ static u16 QuantizePixel_MotionBlur(u16 *prevPixel, u16 *curPixel)
if (*prevPixel == *curPixel)
return *curPixel;
- pixelChannels[0][0] = (*prevPixel >> 0) & 0x1F;
- pixelChannels[0][1] = (*prevPixel >> 5) & 0x1F;
- pixelChannels[0][2] = (*prevPixel >> 10) & 0x1F;
- pixelChannels[1][0] = (*curPixel >> 0) & 0x1F;
- pixelChannels[1][1] = (*curPixel >> 5) & 0x1F;
- pixelChannels[1][2] = (*curPixel >> 10) & 0x1F;
+ pixelChannels[0][0] = GET_R(*prevPixel);
+ pixelChannels[0][1] = GET_G(*prevPixel);
+ pixelChannels[0][2] = GET_B(*prevPixel);
+ pixelChannels[1][0] = GET_R(*curPixel);
+ pixelChannels[1][1] = GET_G(*curPixel);
+ pixelChannels[1][2] = GET_B(*curPixel);
// Don't blur light colors.
if (pixelChannels[0][0] > 25 && pixelChannels[0][1] > 25 && pixelChannels[0][2] > 25)
@@ -667,9 +667,9 @@ static u16 QuantizePixel_MotionBlur(u16 *prevPixel, u16 *curPixel)
largestDiff = diffs[0];
}
- red = (pixelChannels[1][0] * (31 - largestDiff / 2)) / 31;
+ red = (pixelChannels[1][0] * (31 - largestDiff / 2)) / 31;
green = (pixelChannels[1][1] * (31 - largestDiff / 2)) / 31;
- blue = (pixelChannels[1][2] * (31 - largestDiff / 2)) / 31;
+ blue = (pixelChannels[1][2] * (31 - largestDiff / 2)) / 31;
return RGB2(red, green, blue);
}
@@ -684,13 +684,13 @@ static u16 QuantizePixel_Blur(u16 *prevPixel, u16 *curPixel, u16 *nextPixel)
if (*prevPixel == *curPixel && *nextPixel == *curPixel)
return *curPixel;
- red = (*curPixel >> 0) & 0x1F;
- green = (*curPixel >> 5) & 0x1F;
- blue = (*curPixel >> 10) & 0x1F;
+ red = GET_R(*curPixel);
+ green = GET_G(*curPixel);
+ blue = GET_B(*curPixel);
- prevAvg = (((*prevPixel >> 0) & 0x1F) + ((*prevPixel >> 5) & 0x1F) + ((*prevPixel >> 10) & 0x1F)) / 3;
- curAvg = (((*curPixel >> 0) & 0x1F) + ((*curPixel >> 5) & 0x1F) + ((*curPixel >> 10) & 0x1F)) / 3;
- nextAvg = (((*nextPixel >> 0) & 0x1F) + ((*nextPixel >> 5) & 0x1F) + ((*nextPixel >> 10) & 0x1F)) / 3;
+ prevAvg = (GET_R(*prevPixel) + GET_G(*prevPixel) + GET_B(*prevPixel)) / 3;
+ curAvg = (GET_R(*curPixel) + GET_G(*curPixel) + GET_B(*curPixel)) / 3;
+ nextAvg = (GET_R(*nextPixel) + GET_G(*nextPixel) + GET_B(*nextPixel)) / 3;
if (prevAvg == curAvg && nextAvg == curAvg)
return *curPixel;
@@ -728,14 +728,14 @@ static u16 QuantizePixel_BlurHard(u16 *prevPixel, u16 *curPixel, u16 *nextPixel)
if (*prevPixel == *curPixel && *nextPixel == *curPixel)
return *curPixel;
- red = (*curPixel >> 0) & 0x1F;
- green = (*curPixel >> 5) & 0x1F;
- blue = (*curPixel >> 10) & 0x1F;
-
- prevAvg = (((*prevPixel >> 0) & 0x1F) + ((*prevPixel >> 5) & 0x1F) + ((*prevPixel >> 10) & 0x1F)) / 3;
- curAvg = (((*curPixel >> 0) & 0x1F) + ((*curPixel >> 5) & 0x1F) + ((*curPixel >> 10) & 0x1F)) / 3;
- nextAvg = (((*nextPixel >> 0) & 0x1F) + ((*nextPixel >> 5) & 0x1F) + ((*nextPixel >> 10) & 0x1F)) / 3;
-
+ red = GET_R(*curPixel);
+ green = GET_G(*curPixel);
+ blue = GET_B(*curPixel);
+
+ prevAvg = (GET_R(*prevPixel) + GET_G(*prevPixel) + GET_B(*prevPixel)) / 3;
+ curAvg = (GET_R(*curPixel) + GET_G(*curPixel) + GET_B(*curPixel)) / 3;
+ nextAvg = (GET_R(*nextPixel) + GET_G(*nextPixel) + GET_B(*nextPixel)) / 3;
+
if (prevAvg == curAvg && nextAvg == curAvg)
return *curPixel;
@@ -851,37 +851,37 @@ void ApplyImageProcessingQuantization(struct ImageProcessingContext *context)
static void SetPresetPalette_PrimaryColors(void)
{
- gCanvasPalette[0] = RGB2(0, 0, 0);
- gCanvasPalette[1] = RGB2(6, 6, 6);
- gCanvasPalette[2] = RGB2(29, 29, 29);
- gCanvasPalette[3] = RGB2(11, 11, 11);
- gCanvasPalette[4] = RGB2(29, 6, 6);
- gCanvasPalette[5] = RGB2(6, 29, 6);
- gCanvasPalette[6] = RGB2(6, 6, 29);
- gCanvasPalette[7] = RGB2(29, 29, 6);
- gCanvasPalette[8] = RGB2(29, 6, 29);
- gCanvasPalette[9] = RGB2(6, 29, 29);
- gCanvasPalette[10] = RGB2(29, 11, 6);
- gCanvasPalette[11] = RGB2(11, 29, 6);
- gCanvasPalette[12] = RGB2(6, 11, 29);
- gCanvasPalette[13] = RGB2(29, 6, 11);
- gCanvasPalette[14] = RGB2(6, 29, 11);
- gCanvasPalette[15] = RGB2(11, 6, 29);
+ gCanvasPalette[0] = RGB_BLACK;
+ gCanvasPalette[1] = RGB(6, 6, 6);
+ gCanvasPalette[2] = RGB(29, 29, 29);
+ gCanvasPalette[3] = RGB(11, 11, 11);
+ gCanvasPalette[4] = RGB(29, 6, 6);
+ gCanvasPalette[5] = RGB(6, 29, 6);
+ gCanvasPalette[6] = RGB(6, 6, 29);
+ gCanvasPalette[7] = RGB(29, 29, 6);
+ gCanvasPalette[8] = RGB(29, 6, 29);
+ gCanvasPalette[9] = RGB(6, 29, 29);
+ gCanvasPalette[10] = RGB(29, 11, 6);
+ gCanvasPalette[11] = RGB(11, 29, 6);
+ gCanvasPalette[12] = RGB(6, 11, 29);
+ gCanvasPalette[13] = RGB(29, 6, 11);
+ gCanvasPalette[14] = RGB(6, 29, 11);
+ gCanvasPalette[15] = RGB(11, 6, 29);
}
static void SetPresetPalette_BlackAndWhite(void)
{
- gCanvasPalette[0] = RGB2(0, 0, 0);
- gCanvasPalette[1] = RGB2(0, 0, 0);
- gCanvasPalette[2] = RGB2(31, 31, 31);
+ gCanvasPalette[0] = RGB_BLACK;
+ gCanvasPalette[1] = RGB_BLACK;
+ gCanvasPalette[2] = RGB_WHITE;
}
static void SetPresetPalette_GrayscaleSmall(void)
{
u8 i;
- gCanvasPalette[0] = RGB2(0, 0, 0);
- gCanvasPalette[1] = RGB2(0, 0, 0);
+ gCanvasPalette[0] = RGB_BLACK;
+ gCanvasPalette[1] = RGB_BLACK;
for (i = 0; i < 14; i++)
gCanvasPalette[i + 2] = RGB2(2 * (i + 2), 2 * (i + 2), 2 * (i + 2));
}
@@ -890,7 +890,7 @@ static void SetPresetPalette_Grayscale(void)
{
u8 i;
- gCanvasPalette[0] = RGB2(0, 0, 0);
+ gCanvasPalette[0] = RGB_BLACK;
for (i = 0; i < 32; i++)
gCanvasPalette[i + 1] = RGB2(i, i, i);
}
@@ -914,7 +914,7 @@ static void QuantizePalette_Standard(bool8 useLimitedPalette)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (*pixel & 0x8000)
+ if (IS_ALPHA(*pixel))
{
*pixel = gCanvasPaletteStart;
}
@@ -982,7 +982,7 @@ static void QuantizePalette_BlackAndWhite(void)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (*pixel & 0x8000)
+ if (IS_ALPHA(*pixel))
{
*pixel = gCanvasPaletteStart;
}
@@ -1013,7 +1013,7 @@ static void QuantizePalette_GrayscaleSmall(void)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (*pixel & 0x8000)
+ if (IS_ALPHA(*pixel))
*pixel = gCanvasPaletteStart;
else
*pixel = QuantizePixel_GrayscaleSmall(pixel) + gCanvasPaletteStart;
@@ -1031,7 +1031,7 @@ static void QuantizePalette_Grayscale(void)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (*pixel & 0x8000)
+ if (IS_ALPHA(*pixel))
*pixel = gCanvasPaletteStart;
else
*pixel = QuantizePixel_Grayscale(pixel) + gCanvasPaletteStart;
@@ -1049,7 +1049,7 @@ static void QuantizePalette_PrimaryColors(void)
u16 *pixel = &pixelRow[gCanvasColumnStart];
for (i = 0; i < gCanvasColumnEnd; i++, pixel++)
{
- if (*pixel & 0x8000)
+ if (IS_ALPHA(*pixel))
*pixel = gCanvasPaletteStart;
else
*pixel = QuantizePixel_PrimaryColors(pixel) + gCanvasPaletteStart;
@@ -1060,9 +1060,9 @@ static void QuantizePalette_PrimaryColors(void)
// Quantizes the pixel's color channels to nearest multiple of 4, and clamps to [6, 30].
static u16 QuantizePixel_Standard(u16 *pixel)
{
- u16 red = *pixel & 0x1F;
- u16 green = (*pixel >> 5) & 0x1F;
- u16 blue = (*pixel >> 10) & 0x1F;
+ u16 red = GET_R(*pixel);
+ u16 green = GET_G(*pixel);
+ u16 blue = GET_B(*pixel);
// Quantize color channels to muliples of 4, rounding up.
if (red & 3)
@@ -1091,10 +1091,10 @@ static u16 QuantizePixel_Standard(u16 *pixel)
static u16 QuantizePixel_PrimaryColors(u16* color)
{
- u16 red = *color & 0x1F;
- u16 green = (*color >> 5) & 0x1F;
- u16 blue = (*color >> 10) & 0x1F;
-
+ u16 red = GET_R(*color);
+ u16 green = GET_G(*color);
+ u16 blue = GET_B(*color);
+
if (red < 12 && green < 11 && blue < 11)
return 1;
@@ -1206,9 +1206,9 @@ static u16 QuantizePixel_PrimaryColors(u16* color)
static u16 QuantizePixel_GrayscaleSmall(u16 *color)
{
- u16 red = *color & 0x1F;
- u16 green = (*color >> 5) & 0x1F;
- u16 blue = (*color >> 10) & 0x1F;
+ u16 red = GET_R(*color);
+ u16 green = GET_G(*color);
+ u16 blue = GET_B(*color);
u16 average = ((red + green + blue) / 3) & 0x1E;
if (average == 0)
return 1;
@@ -1218,9 +1218,9 @@ static u16 QuantizePixel_GrayscaleSmall(u16 *color)
static u16 QuantizePixel_Grayscale(u16 *color)
{
- u16 red = *color & 0x1F;
- u16 green = (*color >> 5) & 0x1F;
- u16 blue = (*color >> 10) & 0x1F;
+ u16 red = GET_R(*color);
+ u16 green = GET_G(*color);
+ u16 blue = GET_B(*color);
u16 average = (red + green + blue) / 3;
return average + 1;
}
diff --git a/src/intro.c b/src/intro.c
index 7dab2ad46..7c92913b6 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -986,8 +986,6 @@ static void SerialCB_CopyrightScreen(void)
static u8 SetUpCopyrightScreen(void)
{
- u16 ime;
-
switch (gMain.state)
{
case 0:
@@ -1302,7 +1300,6 @@ static void Task_IntroStartBikeRide(u8 taskId)
static void Task_IntroHandleBikeAndFlygonMovement(u8 taskId)
{
- s16 a;
u16 offset;
if (gIntroFrameCounter == 1856)
diff --git a/src/item.c b/src/item.c
index 0b6366048..91d2f1a0a 100644
--- a/src/item.c
+++ b/src/item.c
@@ -102,8 +102,8 @@ void CopyItemNameHandlePlural(u16 itemId, u8 *dst, u32 quantity)
}
else
{
- if (itemId >= ITEM_CHERI_BERRY && itemId <= ITEM_ENIGMA_BERRY)
- GetBerryCountString(dst, gBerries[itemId - ITEM_CHERI_BERRY].name, quantity);
+ if (itemId >= FIRST_BERRY_INDEX && itemId <= LAST_BERRY_INDEX)
+ GetBerryCountString(dst, gBerries[itemId - FIRST_BERRY_INDEX].name, quantity);
else
StringCopy(dst, ItemId_GetName(itemId));
}
diff --git a/src/item_menu.c b/src/item_menu.c
index 931cba2bf..6d30038d0 100755
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -627,7 +627,6 @@ void CB2_Bag(void)
bool8 SetupBagMenu(void)
{
- u32 index;
u8 taskId;
switch (gMain.state)
@@ -742,7 +741,7 @@ void BagMenu_InitBGs(void)
ResetVramOamAndBgCntRegs();
memset(gBagMenu->tilemapBuffer, 0, 0x800);
ResetBgsAndClearDma3BusyFlags(0);
- InitBgsFromTemplates(0, sBgTemplates_ItemMenu, 3);
+ InitBgsFromTemplates(0, sBgTemplates_ItemMenu, ARRAY_COUNT(sBgTemplates_ItemMenu));
SetBgTilemapBuffer(2, gBagMenu->tilemapBuffer);
ResetAllBgsCoordinates();
ScheduleBgCopyTilemapToVram(2);
@@ -865,7 +864,7 @@ void GetItemName(s8 *dest, u16 itemId)
}
break;
case BERRIES_POCKET:
- ConvertIntToDecimalStringN(gStringVar1, itemId - ITEM_CHERI_BERRY + 1, STR_CONV_MODE_LEADING_ZEROS, 2);
+ ConvertIntToDecimalStringN(gStringVar1, itemId - FIRST_BERRY_INDEX + 1, STR_CONV_MODE_LEADING_ZEROS, 2);
CopyItemName(itemId, gStringVar2);
StringExpandPlaceholders(dest, gText_NumberVar1Clear7Var2);
break;
@@ -1721,7 +1720,7 @@ void ItemMenu_UseOutOfBattle(u8 taskId)
if (ItemId_GetFieldFunc(gSpecialVar_ItemId))
{
BagMenu_RemoveSomeWindow();
- if (CalculatePlayerPartyCount() == 0 && ItemId_GetType(gSpecialVar_ItemId) == 1)
+ if (CalculatePlayerPartyCount() == 0 && ItemId_GetType(gSpecialVar_ItemId) == ITEM_USE_PARTY_MENU)
BagMenu_PrintThereIsNoPokemon(taskId);
else
{
diff --git a/src/item_use.c b/src/item_use.c
index df6a35bc9..af0ca9ee5 100755
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -77,13 +77,13 @@ EWRAM_DATA static void(*sItemUseOnFieldCB)(u8 taskId) = NULL;
// Below is set TRUE by UseRegisteredKeyItemOnField
#define tUsingRegisteredKeyItem data[3]
-// .rodata
-
+// UB here if an item with type ITEM_USE_MAIL or ITEM_USE_BAG_MENU uses SetUpItemUseCallback
+// Never occurs in vanilla, but can occur with improperly created items
static const MainCallback sItemUseCallbacks[] =
{
- CB2_ShowPartyMenuForItemUse,
- CB2_ReturnToField,
- NULL,
+ [ITEM_USE_PARTY_MENU - 1] = CB2_ShowPartyMenuForItemUse,
+ [ITEM_USE_FIELD - 1] = CB2_ReturnToField,
+ [ITEM_USE_PBLOCK_CASE - 1] = NULL,
};
static const u8 sClockwiseDirections[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST};
@@ -94,13 +94,12 @@ static const struct YesNoFuncTable sUseTMHMYesNoFuncTable =
.noFunc = BagMenu_InitListsMenu,
};
-// .text
-
+#define tEnigmaBerryType data[4]
static void SetUpItemUseCallback(u8 taskId)
{
u8 type;
if (gSpecialVar_ItemId == ITEM_ENIGMA_BERRY)
- type = gTasks[taskId].data[4] - 1;
+ type = gTasks[taskId].tEnigmaBerryType - 1;
else
type = ItemId_GetType(gSpecialVar_ItemId) - 1;
if (!InBattlePyramid())
@@ -218,9 +217,9 @@ void ItemUseOutOfBattle_Bike(u8 taskId)
static void ItemUseOnFieldCB_Bike(u8 taskId)
{
- if (!ItemId_GetSecondaryId(gSpecialVar_ItemId))
+ if (ItemId_GetSecondaryId(gSpecialVar_ItemId) == MACH_BIKE)
GetOnOffBike(PLAYER_AVATAR_FLAG_MACH_BIKE);
- else
+ else // ACRO_BIKE
GetOnOffBike(PLAYER_AVATAR_FLAG_ACRO_BIKE);
ScriptUnfreezeObjectEvents();
ScriptContext2_Disable();
@@ -1065,28 +1064,28 @@ void ItemUseOutOfBattle_EnigmaBerry(u8 taskId)
case ITEM_EFFECT_SPDEF_EV:
case ITEM_EFFECT_SPEED_EV:
case ITEM_EFFECT_DEF_EV:
- gTasks[taskId].data[4] = 1;
+ gTasks[taskId].tEnigmaBerryType = ITEM_USE_PARTY_MENU;
ItemUseOutOfBattle_Medicine(taskId);
break;
case ITEM_EFFECT_SACRED_ASH:
- gTasks[taskId].data[4] = 1;
+ gTasks[taskId].tEnigmaBerryType = ITEM_USE_PARTY_MENU;
ItemUseOutOfBattle_SacredAsh(taskId);
break;
case ITEM_EFFECT_RAISE_LEVEL:
- gTasks[taskId].data[4] = 1;
+ gTasks[taskId].tEnigmaBerryType = ITEM_USE_PARTY_MENU;
ItemUseOutOfBattle_RareCandy(taskId);
break;
case ITEM_EFFECT_PP_UP:
case ITEM_EFFECT_PP_MAX:
- gTasks[taskId].data[4] = 1;
+ gTasks[taskId].tEnigmaBerryType = ITEM_USE_PARTY_MENU;
ItemUseOutOfBattle_PPUp(taskId);
break;
case ITEM_EFFECT_HEAL_PP:
- gTasks[taskId].data[4] = 1;
+ gTasks[taskId].tEnigmaBerryType = ITEM_USE_PARTY_MENU;
ItemUseOutOfBattle_PPRecovery(taskId);
break;
default:
- gTasks[taskId].data[4] = 4;
+ gTasks[taskId].tEnigmaBerryType = ITEM_USE_BAG_MENU;
ItemUseOutOfBattle_CannotUse(taskId);
break;
}
diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c
index fe1d10834..7cb9b1bd6 100644
--- a/src/librfu_rfu.c
+++ b/src/librfu_rfu.c
@@ -1724,7 +1724,6 @@ static void rfu_constructSendLLFrame(void)
u32 pakcketSize, currSize;
u8 i;
u8 *llf_p;
- struct RfuSlotStatusNI *slotStatusNI;
if (gRfuLinkStatus->parentChild != MODE_NEUTRAL
&& gRfuLinkStatus->sendSlotNIFlag | gRfuLinkStatus->recvSlotNIFlag | gRfuLinkStatus->sendSlotUNIFlag)
diff --git a/src/mail.c b/src/mail.c
index 04464f06b..71e98b42a 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -125,7 +125,7 @@ static void CB2_ExitMailReadFreeVars(void);
// .rodata
-static const struct BgTemplate sUnknown_0859F290[] = {
+static const struct BgTemplate sBgTemplates[] = {
{
.bg = 0,
.charBaseIndex = 2,
@@ -254,7 +254,7 @@ void ReadMail(struct MailStruct *mail, void (*callback)(void), bool8 flag)
sMailRead->parserMultiple = ConvertEasyChatWordsToString;
if (IS_ITEM_MAIL(mail->itemId))
{
- sMailRead->mailType = mail->itemId - ITEM_ORANGE_MAIL;
+ sMailRead->mailType = mail->itemId - FIRST_MAIL_INDEX;
}
else
{
@@ -279,10 +279,10 @@ void ReadMail(struct MailStruct *mail, void (*callback)(void), bool8 flag)
default:
sMailRead->animsActive = 0;
break;
- case ITEM_BEAD_MAIL - ITEM_ORANGE_MAIL:
+ case ITEM_BEAD_MAIL - FIRST_MAIL_INDEX:
sMailRead->animsActive = 1;
break;
- case ITEM_DREAM_MAIL - ITEM_ORANGE_MAIL:
+ case ITEM_DREAM_MAIL - FIRST_MAIL_INDEX:
sMailRead->animsActive = 2;
break;
}
@@ -336,7 +336,7 @@ static bool8 MailReadBuildGraphics(void)
break;
case 6:
ResetBgsAndClearDma3BusyFlags(0);
- InitBgsFromTemplates(0, sUnknown_0859F290, 3);
+ InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates));
SetBgTilemapBuffer(1, sMailRead->bg1TilemapBuffer);
SetBgTilemapBuffer(2, sMailRead->bg2TilemapBuffer);
break;
diff --git a/src/main_menu.c b/src/main_menu.c
index 2c27b673a..74af96da8 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -1799,7 +1799,7 @@ static void CB2_NewGameBirchSpeech_ReturnFromNamingScreen(void)
ResetBgsAndClearDma3BusyFlags(0);
SetGpuReg(REG_OFFSET_DISPCNT, 0);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
- InitBgsFromTemplates(0, sMainMenuBgTemplates, 2);
+ InitBgsFromTemplates(0, sMainMenuBgTemplates, ARRAY_COUNT(sMainMenuBgTemplates));
InitBgFromTemplate(&sBirchBgTemplate);
SetVBlankCallback(NULL);
SetGpuReg(REG_OFFSET_BG2CNT, 0);
@@ -2097,7 +2097,7 @@ static void NewGameBirchSpeech_ShowGenderMenu(void)
{
DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3);
FillWindowPixelBuffer(1, PIXEL_FILL(1));
- PrintMenuTable(1, 2, sMenuActions_Gender);
+ PrintMenuTable(1, ARRAY_COUNT(sMenuActions_Gender), sMenuActions_Gender);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
PutWindowTilemap(1);
CopyWindowToVram(1, 3);
diff --git a/src/match_call.c b/src/match_call.c
index 723562ade..7e8d0c38a 100644
--- a/src/match_call.c
+++ b/src/match_call.c
@@ -1494,7 +1494,6 @@ static const struct MatchCallText *GetGeneralMatchCallText(int matchCallId, u8 *
int count;
u32 topic, id;
u16 rand;
- u16 var3;
rand = Random();
if (!(rand & 1))
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c
index af68c6116..c97ee94f3 100644
--- a/src/mauville_old_man.c
+++ b/src/mauville_old_man.c
@@ -1324,7 +1324,6 @@ static void PrintStoryList(void)
{
s32 i;
s32 width = GetStringWidth(1, gText_Exit, 0);
- u8 tileWidth;
for (i = 0; i < NUM_STORYTELLER_TALES; i++)
{
s32 curWidth;
diff --git a/src/mevent_server.c b/src/mevent_server.c
index 0d3afea30..2e7b3d89a 100644
--- a/src/mevent_server.c
+++ b/src/mevent_server.c
@@ -288,8 +288,8 @@ static u32 (*const func_tbl[])(struct mevent_srv_common *) = {
static u32 mevent_srv_exec_common(struct mevent_srv_common * svr)
{
u32 response;
- AGB_ASSERT(svr->mainseqno < NELEMS(func_tbl));
+ AGB_ASSERT(svr->mainseqno < ARRAY_COUNT(func_tbl));
response = func_tbl[svr->mainseqno](svr);
- AGB_ASSERT(svr->mainseqno < NELEMS(func_tbl));
+ AGB_ASSERT(svr->mainseqno < ARRAY_COUNT(func_tbl));
return response;
}
diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c
index cd5710d44..d2f7d3ea8 100644
--- a/src/minigame_countdown.c
+++ b/src/minigame_countdown.c
@@ -14,7 +14,6 @@ static void sub_802E83C(u8 taskId);
static void sub_802E8C8(u8 taskId);
static void sub_802EA50(u8 taskId);
static void sub_802EAB0(u8 taskId);
-static void sub_802EB98(u8 taskId);
static void Task_MinigameCountdown(u8 taskId);
static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId);
static bool32 IsStartGraphicAnimRunning(u8 spriteId);
diff --git a/src/overworld.c b/src/overworld.c
index 72aa17929..cbfc70898 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -174,7 +174,6 @@ static u8 sPlayerTradingStates[MAX_LINK_PLAYERS];
static u16 (*sPlayerKeyInterceptCallback)(u32);
static bool8 sUnknown_03000E18;
static u8 sRfuKeepAliveTimer;
-static u32 sUnusedVar;
// IWRAM common
u16 *gBGTilemapBuffers1;
diff --git a/src/palette.c b/src/palette.c
index 320e11ecc..ece753d21 100644
--- a/src/palette.c
+++ b/src/palette.c
@@ -60,7 +60,7 @@ ALIGNED(4) EWRAM_DATA u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE] = {0};
ALIGNED(4) EWRAM_DATA u16 gPlttBufferFaded[PLTT_BUFFER_SIZE] = {0};
EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0};
EWRAM_DATA struct PaletteFadeControl gPaletteFade = {0};
-static EWRAM_DATA u32 gFiller_2037FE0 = 0;
+static EWRAM_DATA u32 sFiller = 0;
static EWRAM_DATA u32 sPlttBufferTransferPending = 0;
EWRAM_DATA u8 gPaletteDecompressionBuffer[PLTT_DECOMP_BUFFER_SIZE] = {0};
@@ -624,7 +624,7 @@ static u8 UpdateFastPaletteFade(void)
if (b < b0)
b = b0;
- gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
+ gPlttBufferFaded[i] = RGB(r, g, b);
}
break;
case FAST_FADE_OUT_TO_WHITE:
@@ -642,7 +642,7 @@ static u8 UpdateFastPaletteFade(void)
if (b > 31)
b = 31;
- gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
+ gPlttBufferFaded[i] = RGB(r, g, b);
}
break;
case FAST_FADE_IN_FROM_BLACK:
@@ -668,7 +668,7 @@ static u8 UpdateFastPaletteFade(void)
if (b > b0)
b = b0;
- gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
+ gPlttBufferFaded[i] = RGB(r, g, b);
}
break;
case FAST_FADE_OUT_TO_BLACK:
@@ -686,7 +686,7 @@ static u8 UpdateFastPaletteFade(void)
if (b < 0)
b = 0;
- gPlttBufferFaded[i] = r | (g << 5) | (b << 10);
+ gPlttBufferFaded[i] = RGB(r, g, b);
}
}
@@ -856,13 +856,13 @@ void TintPalette_GrayScale(u16 *palette, u16 count)
for (i = 0; i < count; i++)
{
- r = (*palette >> 0) & 0x1F;
- g = (*palette >> 5) & 0x1F;
- b = (*palette >> 10) & 0x1F;
+ r = GET_R(*palette);
+ g = GET_G(*palette);
+ b = GET_B(*palette);
gray = (r * Q_8_8(0.3) + g * Q_8_8(0.59) + b * Q_8_8(0.1133)) >> 8;
- *palette++ = (gray << 10) | (gray << 5) | (gray << 0);
+ *palette++ = RGB2(gray, gray, gray);
}
}
@@ -873,18 +873,18 @@ void TintPalette_GrayScale2(u16 *palette, u16 count)
for (i = 0; i < count; i++)
{
- r = (*palette >> 0) & 0x1F;
- g = (*palette >> 5) & 0x1F;
- b = (*palette >> 10) & 0x1F;
+ r = GET_R(*palette);
+ g = GET_G(*palette);
+ b = GET_B(*palette);
gray = (r * Q_8_8(0.3) + g * Q_8_8(0.59) + b * Q_8_8(0.1133)) >> 8;
- if (gray > 0x1F)
- gray = 0x1F;
+ if (gray > 31)
+ gray = 31;
gray = sRoundedDownGrayscaleMap[gray];
- *palette++ = (gray << 10) | (gray << 5) | (gray << 0);
+ *palette++ = RGB2(gray, gray, gray);
}
}
@@ -895,9 +895,9 @@ void TintPalette_SepiaTone(u16 *palette, u16 count)
for (i = 0; i < count; i++)
{
- r = (*palette >> 0) & 0x1F;
- g = (*palette >> 5) & 0x1F;
- b = (*palette >> 10) & 0x1F;
+ r = GET_R(*palette);
+ g = GET_G(*palette);
+ b = GET_B(*palette);
gray = (r * Q_8_8(0.3) + g * Q_8_8(0.59) + b * Q_8_8(0.1133)) >> 8;
@@ -908,7 +908,7 @@ void TintPalette_SepiaTone(u16 *palette, u16 count)
if (r > 31)
r = 31;
- *palette++ = (b << 10) | (g << 5) | (r << 0);
+ *palette++ = RGB2(r, g, b);
}
}
@@ -919,9 +919,9 @@ void TintPalette_CustomTone(u16 *palette, u16 count, u16 rTone, u16 gTone, u16 b
for (i = 0; i < count; i++)
{
- r = (*palette >> 0) & 0x1F;
- g = (*palette >> 5) & 0x1F;
- b = (*palette >> 10) & 0x1F;
+ r = GET_R(*palette);
+ g = GET_G(*palette);
+ b = GET_B(*palette);
gray = (r * Q_8_8(0.3) + g * Q_8_8(0.59) + b * Q_8_8(0.1133)) >> 8;
@@ -936,7 +936,7 @@ void TintPalette_CustomTone(u16 *palette, u16 count, u16 rTone, u16 gTone, u16 b
if (b > 31)
b = 31;
- *palette++ = (b << 10) | (g << 5) | (r << 0);
+ *palette++ = RGB2(r, g, b);
}
}
diff --git a/src/party_menu.c b/src/party_menu.c
index 74a23cc93..256558985 100755
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -151,7 +151,7 @@ static EWRAM_DATA u16 *sSlot1TilemapBuffer = 0; // for switching party slots
static EWRAM_DATA u16 *sSlot2TilemapBuffer = 0; //
EWRAM_DATA u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE] = {0};
static EWRAM_DATA u16 sPartyMenuItemId = 0;
-static EWRAM_DATA u16 sUnused_0203CEFE = 0;
+static EWRAM_DATA u16 sUnused = 0;
EWRAM_DATA u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on
// IWRAM common
@@ -1961,9 +1961,9 @@ static u8 CanMonLearnTMTutor(struct Pokemon *mon, u16 item, u8 tutor)
if (GetMonData(mon, MON_DATA_IS_EGG))
return CANNOT_LEARN_MOVE_IS_EGG;
- if (item >= ITEM_TM01_FOCUS_PUNCH)
+ if (item >= ITEM_TM01)
{
- if (!CanMonLearnTMHM(mon, item - ITEM_TM01_FOCUS_PUNCH))
+ if (!CanMonLearnTMHM(mon, item - ITEM_TM01))
return CANNOT_LEARN_MOVE;
else
move = ItemIdToBattleMoveId(item);
@@ -4612,7 +4612,7 @@ void ItemUseCB_PPUp(u8 taskId, TaskFunc task)
u16 ItemIdToBattleMoveId(u16 item)
{
- u16 tmNumber = item - ITEM_TM01_FOCUS_PUNCH;
+ u16 tmNumber = item - ITEM_TM01;
return sTMHMMoves[tmNumber];
}
diff --git a/src/player_pc.c b/src/player_pc.c
index 928aac706..1f293a195 100644
--- a/src/player_pc.c
+++ b/src/player_pc.c
@@ -443,7 +443,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
windowTemplate.width = GetMaxWidthInMenuTable(gPCText_ItemPCOptionsText, 4);
data[4] = AddWindow(&windowTemplate);
SetStandardWindowBorderStyle(data[4], 0);
- PrintMenuTable(data[4], 4, gPCText_ItemPCOptionsText);
+ PrintMenuTable(data[4], ARRAY_COUNT(gPCText_ItemPCOptionsText), gPCText_ItemPCOptionsText);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[4], 4, var);
ScheduleBgCopyTilemapToVram(0);
ItemStorageMenuPrint(gPCText_OptionDescList[var]);
@@ -686,7 +686,7 @@ static void Mailbox_ReturnToPlayerPC(u8 taskId)
static void Mailbox_PrintMailOptions(u8 taskId)
{
u8 r4 = sub_81D1C84(2);
- PrintMenuTable(r4, 4, gMailboxMailOptions);
+ PrintMenuTable(r4, ARRAY_COUNT(gMailboxMailOptions), gMailboxMailOptions);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(r4, 4, 0);
ScheduleBgCopyTilemapToVram(0);
gTasks[taskId].func = Mailbox_MailOptionsProcessInput;
@@ -1058,7 +1058,6 @@ static void ItemStorage_ProcessWithdrawTossInput(u8 taskId)
s16 *data;
bool32 toss;
u32 i, x;
- u8 windowId;
const u8* text;
data = gTasks[taskId].data;
diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c
index 32db6c717..a930523ce 100644
--- a/src/pokeblock_feed.c
+++ b/src/pokeblock_feed.c
@@ -61,7 +61,6 @@ static void HandleInitWindows(void);
static void LaunchPokeblockFeedTask(void);
static void SetPokeblockSpritePal(u8 pokeblockCaseId);
static void sub_817A5CC(void);
-static void sub_8148108(u8 spriteId, bool8 a1);
static void DoPokeblockCaseThrowEffect(u8 spriteId, bool8 arg1);
static void PrepareMonToMoveToPokeblock(u8 spriteId);
static void Task_HandleMonAtePokeblock(u8 taskId);
diff --git a/src/pokedex.c b/src/pokedex.c
index 6aa347994..c0236020e 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -1373,7 +1373,7 @@ static const struct SearchOptionText sDexSearchColorOptions[] =
{},
};
-static const struct SearchOptionText sDexSearchTypeOptions[] =
+static const struct SearchOptionText sDexSearchTypeOptions[NUMBER_OF_MON_TYPES + 1] = // + 2 for "None" and terminator, - 1 for Mystery
{
{gText_DexEmptyString, gText_DexSearchTypeNone},
{gText_DexEmptyString, gTypeNames[TYPE_NORMAL]},
@@ -1407,7 +1407,7 @@ static const u8 sOrderOptions[] =
ORDER_SMALLEST,
};
-static const u8 sDexSearchTypeIds[] =
+static const u8 sDexSearchTypeIds[NUMBER_OF_MON_TYPES] =
{
TYPE_NONE,
TYPE_NORMAL,
@@ -1587,9 +1587,6 @@ static void ResetPokedexView(struct PokedexView *pokedexView)
void CB2_OpenPokedex(void)
{
- u8 *addr;
- u32 size;
-
switch (gMain.state)
{
case 0:
diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c
index 7a3b38dc2..b63b00290 100755
--- a/src/pokedex_area_screen.c
+++ b/src/pokedex_area_screen.c
@@ -489,7 +489,6 @@ static bool8 MonListHasMon(const struct WildPokemonInfo *info, u16 species, u16
static void BuildAreaGlowTilemap(void)
{
u16 i, y, x, j;
- u16 val;
for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaGlowTilemap); i++)
sPokedexAreaScreen->areaGlowTilemap[i] = 0;
diff --git a/src/pokemon.c b/src/pokemon.c
index 5829bbd0a..3a2e88aae 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -2304,14 +2304,14 @@ void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level,
{
u32 personality;
- if ((u8)(unownLetter - 1) < 28)
+ if ((u8)(unownLetter - 1) < NUM_UNOWN_FORMS)
{
u16 actualLetter;
do
{
personality = Random32();
- actualLetter = ((((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 28);
+ actualLetter = GET_UNOWN_LETTER(personality);
}
while (nature != GetNatureFromPersonality(personality)
|| gender != GetGenderFromSpeciesAndPersonality(species, personality)
@@ -4658,7 +4658,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
u32 var_28 = 0;
u16 heldItem;
u8 r10;
- u32 r4;
u32 r5;
s8 r2;
u16 evCount;
diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c
index b85a29151..065b8e22e 100644
--- a/src/pokemon_icon.c
+++ b/src/pokemon_icon.c
@@ -1099,7 +1099,7 @@ u16 GetUnownLetterByPersonality(u32 personality)
if (!personality)
return 0;
else
- return (((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 0x1C;
+ return GET_UNOWN_LETTER(personality);
}
u16 sub_80D2E84(u16 species)
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c
index 4be1cf729..50fc04372 100644
--- a/src/pokemon_storage_system.c
+++ b/src/pokemon_storage_system.c
@@ -8389,7 +8389,7 @@ static u8 sub_80D0894(void)
static void sub_80D08CC(void)
{
- s32 i, j, r8, r9;
+ s32 i, j;
s32 rowCount, columnCount;
u8 boxId;
u8 monArrayId;
diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c
index d02d844d0..2a1dda1fa 100644
--- a/src/pokenav_conditions_3.c
+++ b/src/pokenav_conditions_3.c
@@ -419,7 +419,7 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state)
switch (state)
{
case 0:
- InitBgTemplates(sConditionSearchResultBgTemplates, NELEMS(sConditionSearchResultBgTemplates));
+ InitBgTemplates(sConditionSearchResultBgTemplates, ARRAY_COUNT(sConditionSearchResultBgTemplates));
DecompressAndCopyTileDataToVram(1, sConditionSearchResultTiles, 0, 0, 0);
SetBgTilemapBuffer(1, searchList->buff);
CopyToBgTilemapBuffer(1, sConditionSearchResultTilemap, 0, 0);
diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c
index 009cf783f..21bddf1cd 100644
--- a/src/pokenav_main_menu.c
+++ b/src/pokenav_main_menu.c
@@ -496,7 +496,7 @@ void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a
g1 = ((((GET_G(*dest) << 8) - (g << 8)) / a3) * a4) >> 8;
b1 = ((((GET_B(*dest) << 8) - (b << 8)) / a3) * a4) >> 8;
- r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match; I have to assign the value of ((r + r1) & 0x1F) to r1
+ r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match; I have to assign the value of ((r + r1) & 0x1F) to r
g = (g + g1) & 0x1F; //See above
b = (b + b1) & 0x1F; //See above
diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c
index 3fcd41dc9..eea8131a9 100644
--- a/src/pokenav_menu_handler_2.c
+++ b/src/pokenav_menu_handler_2.c
@@ -750,7 +750,7 @@ static void LoadPokenavOptionPalettes(void)
{
s32 i;
- for (i = 0; i < NELEMS(sPokenavOptionsSpriteSheets); i++)
+ for (i = 0; i < ARRAY_COUNT(sPokenavOptionsSpriteSheets); i++)
LoadCompressedSpriteSheet(&sPokenavOptionsSpriteSheets[i]);
Pokenav_AllocAndLoadPalettes(sPokenavOptionsSpritePalettes);
}
diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c
index 9c171dd45..397e1e749 100644
--- a/src/pokenav_ribbons_1.c
+++ b/src/pokenav_ribbons_1.c
@@ -427,7 +427,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state)
switch (state)
{
case 0:
- InitBgTemplates(sMonRibbonListBgTemplates, NELEMS(sMonRibbonListBgTemplates));
+ InitBgTemplates(sMonRibbonListBgTemplates, ARRAY_COUNT(sMonRibbonListBgTemplates));
DecompressAndCopyTileDataToVram(1, sMonRibbonListFrameTiles, 0, 0, 0);
SetBgTilemapBuffer(1, monMenu->buff);
CopyToBgTilemapBuffer(1, sMonRibbonListFrameTilemap, 0, 0);
diff --git a/src/record_mixing.c b/src/record_mixing.c
index 898459c0a..2028cc647 100644
--- a/src/record_mixing.c
+++ b/src/record_mixing.c
@@ -94,7 +94,6 @@ static void *sApprenticesSave;
static void *sBattleTowerSave_Duplicate;
static u32 sRecordStructSize;
static u8 gUnknown_03001160;
-static u32 filler_03001164;
static struct PlayerHallRecords *gUnknown_03001168[3];
static EWRAM_DATA struct RecordMixingDayCareMail gUnknown_02039F9C = {0};
diff --git a/src/region_map.c b/src/region_map.c
index c2a5b4e9c..22b925a6f 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -1677,7 +1677,7 @@ void CB2_OpenFlyMap(void)
break;
case 1:
ResetBgsAndClearDma3BusyFlags(0);
- InitBgsFromTemplates(1, sFlyMapBgTemplates, 3);
+ InitBgsFromTemplates(1, sFlyMapBgTemplates, ARRAY_COUNT(sFlyMapBgTemplates));
gMain.state++;
break;
case 2:
diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c
index 9bf0e7ed4..50ceeb74e 100644
--- a/src/save_failed_screen.c
+++ b/src/save_failed_screen.c
@@ -62,7 +62,7 @@ static const struct OamData sClockOamData =
.affineParam = 0
};
-static const struct BgTemplate gUnknown_085EFD88[3] =
+static const struct BgTemplate sBgTemplates[3] =
{
{
.bg = 0,
@@ -212,7 +212,7 @@ static void CB2_SaveFailedScreen(void)
LZ77UnCompVram(gBirchGrassTilemap, (void *)(BG_SCREEN_ADDR(15)));
LZ77UnCompVram(sSaveFailedClockGfx, (void *)(VRAM + 0x10020));
ResetBgsAndClearDma3BusyFlags(0);
- InitBgsFromTemplates(0, gUnknown_085EFD88, 3);
+ InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates));
SetBgTilemapBuffer(0, (void *)&gDecompressionBuffer[0x2000]);
CpuFill32(0, &gDecompressionBuffer[0x2000], 0x800);
LoadBgTiles(0, gTextWindowFrame1_Gfx, 0x120, 0x214);
diff --git a/src/script.c b/src/script.c
index 9ba1a7429..e6557aa75 100644
--- a/src/script.c
+++ b/src/script.c
@@ -11,9 +11,7 @@ extern const u8* gUnknown_020375C0;
// ewram bss
static u8 sScriptContext1Status;
-static u32 sUnusedVariable1;
static struct ScriptContext sScriptContext1;
-static u32 sUnusedVariable2;
static struct ScriptContext sScriptContext2;
static bool8 sScriptContext2Enabled;
diff --git a/src/secret_base.c b/src/secret_base.c
index 8e0929593..d49eef277 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -996,7 +996,7 @@ static void ShowRegistryMenuActions(u8 taskId)
template.width = GetMaxWidthInMenuTable(sRegistryMenuActions, 2);
data[7] = AddWindow(&template);
SetStandardWindowBorderStyle(data[7], 0);
- PrintMenuTable(data[7], 2, sRegistryMenuActions);
+ PrintMenuTable(data[7], ARRAY_COUNT(sRegistryMenuActions), sRegistryMenuActions);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[7], 2, 0);
ScheduleBgCopyTilemapToVram(0);
gTasks[taskId].func = HandleRegistryMenuActionsInput;
diff --git a/src/shop.c b/src/shop.c
index 44ab0885c..a447982fc 100755
--- a/src/shop.c
+++ b/src/shop.c
@@ -489,7 +489,6 @@ static void BuyMenuFreeMemory(void)
static void BuyMenuBuildListMenuTemplate(void)
{
u16 i;
- u16 itemCount;
gUnknown_02039F74 = Alloc((gMartInfo.itemCount + 1) * sizeof(*gUnknown_02039F74));
gUnknown_02039F78 = Alloc((gMartInfo.itemCount + 1) * sizeof(*gUnknown_02039F78));
diff --git a/src/starter_choose.c b/src/starter_choose.c
index 771db961e..f7ffcfc2c 100644
--- a/src/starter_choose.c
+++ b/src/starter_choose.c
@@ -378,7 +378,6 @@ static void VblankCB_StarterChoose(void)
void CB2_ChooseStarter(void)
{
- u16 savedIme;
u8 taskId;
u8 spriteId;
diff --git a/src/tv.c b/src/tv.c
index a0266928b..effd3e4b2 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -2085,7 +2085,6 @@ static void sub_80EDE98(TVShow *show)
u16 k;
u8 n;
u8 deco;
- u8 x;
for (i = 0; i < DECOR_MAX_SECRET_BASE; i ++)
{
@@ -4095,7 +4094,6 @@ static void sub_80F0E58(PokeNews *dest[16], PokeNews *src[16])
static bool8 sub_80F0E84(PokeNews *dest, PokeNews *src, s8 slot)
{
u8 i;
- u8 kind;
if (src->kind == POKENEWS_NONE)
{
@@ -6602,7 +6600,6 @@ static void DoTVShowSpotTheCuties(void)
{
TVShow *show;
u8 state;
- u32 playerId;
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
gSpecialVar_Result = FALSE;
@@ -6707,7 +6704,6 @@ static void DoTVShowPokemonNewsBattleFrontier(void)
{
TVShow *show;
u8 state;
- u32 playerId;
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
gSpecialVar_Result = FALSE;
@@ -6856,7 +6852,6 @@ static void DoTVShowWhatsNo1InHoennToday(void)
{
TVShow *show;
u8 state;
- u32 playerId;
show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
gSpecialVar_Result = FALSE;