Merge branch 'reverts' of https://github.com/aaaaaa123456789/pokeemerald into reverts
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "constants/battle_ai.h"
|
||||
#include "constants/battle_move_effects.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#define AI_ACTION_DONE 0x0001
|
||||
#define AI_ACTION_FLEE 0x0002
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "constants/item_effects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
// this file's functions
|
||||
static bool8 HasSuperEffectiveMoveAgainstOpponents(bool8 noRng);
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/weather.h"
|
||||
|
||||
extern const struct SpriteTemplate gThoughtBubbleSpriteTemplate;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "trig.h"
|
||||
#include "util.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#define GET_UNOWN_LETTER(personality) (( \
|
||||
(((personality & 0x03000000) >> 24) << 6) \
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "sound.h"
|
||||
#include "task.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
// this file's functions
|
||||
static void sub_8158B98(u8 taskId);
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "task.h"
|
||||
#include "util.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
static EWRAM_DATA u8 sLinkSendTaskId = 0;
|
||||
static EWRAM_DATA u8 sLinkReceiveTaskId = 0;
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "graphics.h"
|
||||
#include "constants/battle_dome.h"
|
||||
#include "constants/frontier_util.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "frontier_util.h"
|
||||
#include "battle_tower.h"
|
||||
#include "random.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/battle_ai.h"
|
||||
#include "constants/battle_factory.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
@@ -208,7 +207,7 @@ static void InitFactoryChallenge(void)
|
||||
for (i = 0; i < 6; i++)
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i].monId = 0xFFFF;
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
gUnknown_03006298[i] = 0xFFFF;
|
||||
gFrontierTempParty[i] = 0xFFFF;
|
||||
|
||||
SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
|
||||
gTrainerBattleOpponent_A = 0;
|
||||
@@ -356,7 +355,7 @@ static void GenerateOpponentMons(void)
|
||||
|
||||
species[i] = gFacilityTrainerMons[monId].species;
|
||||
heldItems[i] = gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId];
|
||||
gUnknown_03006298[i] = monId;
|
||||
gFrontierTempParty[i] = monId;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -377,11 +376,11 @@ static void SetRentalsToOpponentParty(void)
|
||||
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gUnknown_03006298[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].monId = gFrontierTempParty[i];
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].ivs = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ATK_IV, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].personality = GetMonData(&gEnemyParty[i], MON_DATA_PERSONALITY, NULL);
|
||||
gSaveBlock2Ptr->frontier.rentalMons[i + 3].abilityNum = GetBoxMonData(&gEnemyParty[i].box, MON_DATA_ABILITY_NUM, NULL);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gUnknown_03006298[i]].itemTableId]);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleFrontierHeldItems[gFacilityTrainerMons[gFrontierTempParty[i]].itemTableId]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,7 +595,7 @@ static void GetOpponentMostCommonMonType(void)
|
||||
typesCount[i] = 0;
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u32 species = gFacilityTrainerMons[gUnknown_03006298[i]].species;
|
||||
u32 species = gFacilityTrainerMons[gFrontierTempParty[i]].species;
|
||||
|
||||
typesCount[gBaseStats[species].type1]++;
|
||||
if (gBaseStats[species].type1 != gBaseStats[species].type2)
|
||||
@@ -632,7 +631,7 @@ static void GetOpponentBattleStyle(void)
|
||||
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u16 monId = gUnknown_03006298[i];
|
||||
u16 monId = gFrontierTempParty[i];
|
||||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
u8 battleStyle = GetMoveBattleStyle(gFacilityTrainerMons[monId].moves[j]);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "sound.h"
|
||||
#include "party_menu.h"
|
||||
#include "m4a.h"
|
||||
#include "constants/species.h"
|
||||
#include "decompress.h"
|
||||
#include "data.h"
|
||||
#include "palette.h"
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "util.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "battle_message.h"
|
||||
#include "constants/species.h"
|
||||
#include "pokedex.h"
|
||||
#include "palette.h"
|
||||
#include "international_string_util.h"
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
#include "constants/party_menu.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "cable_club.h"
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/party_menu.h"
|
||||
#include "constants/battle_pike.h"
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
extern const struct MapLayout *const gMapLayouts[];
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "random.h"
|
||||
#include "battle_controllers.h"
|
||||
#include "battle_interface.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/battle_anim.h"
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/map_types.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/trainer_hill.h"
|
||||
|
||||
|
||||
+1
-2
@@ -17,7 +17,6 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
// This file's functions.
|
||||
@@ -421,7 +420,7 @@ static void GenerateOpponentMons(void)
|
||||
|
||||
species[i] = gFacilityTrainerMons[sRandMonSetId].species;
|
||||
heldItems[i] = gBattleFrontierHeldItems[gFacilityTrainerMons[sRandMonSetId].itemTableId];
|
||||
gUnknown_03006298[i] = sRandMonSetId;
|
||||
gFrontierTempParty[i] = sRandMonSetId;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
+17
-18
@@ -35,7 +35,6 @@
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/easy_chat.h"
|
||||
#include "constants/tv.h"
|
||||
|
||||
@@ -47,7 +46,7 @@ EWRAM_DATA const struct BattleFrontierTrainer *gFacilityTrainers = NULL;
|
||||
EWRAM_DATA const struct FacilityMon *gFacilityTrainerMons = NULL;
|
||||
|
||||
// IWRAM common
|
||||
u16 gUnknown_03006298[MAX_FRONTIER_PARTY_SIZE];
|
||||
u16 gFrontierTempParty[MAX_FRONTIER_PARTY_SIZE];
|
||||
|
||||
// This file's functions.
|
||||
static void InitTowerChallenge(void);
|
||||
@@ -1857,7 +1856,7 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
otID = T1_READ_32(gSaveBlock2Ptr->playerTrainerId);
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u16 monId = gUnknown_03006298[i];
|
||||
u16 monId = gFrontierTempParty[i];
|
||||
CreateMonWithEVSpreadNatureOTID(&gEnemyParty[firstMonId + i],
|
||||
gFacilityTrainerMons[monId].species,
|
||||
level,
|
||||
@@ -1885,7 +1884,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId)
|
||||
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u16 monId = gUnknown_03006298[i];
|
||||
u16 monId = gFrontierTempParty[i];
|
||||
CreateMonWithEVSpreadNatureOTID(&gEnemyParty[firstMonId + i],
|
||||
gFacilityTrainerMons[monId].species,
|
||||
level,
|
||||
@@ -2225,11 +2224,11 @@ static void GetApprenticeMultiPartnerParty(u16 trainerId)
|
||||
}
|
||||
}
|
||||
|
||||
gUnknown_03006298[0] = validSpecies[Random() % count];
|
||||
gFrontierTempParty[0] = validSpecies[Random() % count];
|
||||
do
|
||||
{
|
||||
gUnknown_03006298[1] = validSpecies[Random() % count];
|
||||
} while (gUnknown_03006298[0] == gUnknown_03006298[1]);
|
||||
gFrontierTempParty[1] = validSpecies[Random() % count];
|
||||
} while (gFrontierTempParty[0] == gFrontierTempParty[1]);
|
||||
}
|
||||
|
||||
static void GetRecordMixFriendMultiPartnerParty(u16 trainerId)
|
||||
@@ -2253,11 +2252,11 @@ static void GetRecordMixFriendMultiPartnerParty(u16 trainerId)
|
||||
}
|
||||
}
|
||||
|
||||
gUnknown_03006298[2] = validSpecies[Random() % count];
|
||||
gFrontierTempParty[2] = validSpecies[Random() % count];
|
||||
do
|
||||
{
|
||||
gUnknown_03006298[3] = validSpecies[Random() % count];
|
||||
} while (gUnknown_03006298[2] == gUnknown_03006298[3]);
|
||||
gFrontierTempParty[3] = validSpecies[Random() % count];
|
||||
} while (gFrontierTempParty[2] == gFrontierTempParty[3]);
|
||||
}
|
||||
|
||||
static void LoadMultiPartnerCandidatesData(void)
|
||||
@@ -2421,15 +2420,15 @@ static void sub_81646BC(u16 trainerId, u16 monId)
|
||||
}
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
{
|
||||
move = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gUnknown_03006298[gSpecialVar_0x8005 + 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gUnknown_03006298[gSpecialVar_0x8005 + 1]].species;
|
||||
move = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gFrontierTempParty[gSpecialVar_0x8005 + 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[gFrontierTempParty[gSpecialVar_0x8005 + 1]].species;
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 i;
|
||||
|
||||
move = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gUnknown_03006298[gSpecialVar_0x8005 - 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gUnknown_03006298[gSpecialVar_0x8005 - 1]].species;
|
||||
move = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gFrontierTempParty[gSpecialVar_0x8005 - 1]].moves[0];
|
||||
species = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].party[gFrontierTempParty[gSpecialVar_0x8005 - 1]].species;
|
||||
for (i = 0; i < PLAYER_NAME_LENGTH; i++)
|
||||
gStringVar3[i] = gSaveBlock2Ptr->apprentices[trainerId - TRAINER_RECORD_MIXING_APPRENTICE].playerName[i];
|
||||
gStringVar3[i] = EOS;
|
||||
@@ -2498,13 +2497,13 @@ static void ShowPartnerCandidateMessage(void)
|
||||
}
|
||||
else if (trainerId < TRAINER_RECORD_MIXING_APPRENTICE)
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gUnknown_03006298[2];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gUnknown_03006298[3];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gFrontierTempParty[2];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gFrontierTempParty[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gUnknown_03006298[0];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gUnknown_03006298[1];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[18] = gFrontierTempParty[0];
|
||||
gSaveBlock2Ptr->frontier.trainerIds[19] = gFrontierTempParty[1];
|
||||
}
|
||||
for (k = 0; k < 14; k++)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
#include "battle_message.h"
|
||||
#include "tv.h"
|
||||
|
||||
|
||||
@@ -536,6 +536,8 @@ void HandleAction_ThrowPokeblock(void)
|
||||
gBattleStruct->safariPkblThrowCounter++;
|
||||
if (gBattleStruct->safariEscapeFactor > 1)
|
||||
{
|
||||
// BUG: The safariEscapeFactor is unintetionally able to become 0 (but it can not become negative!). This causes the pokeblock throw glitch.
|
||||
// To fix that change the < in the if statement below to <=.
|
||||
if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]])
|
||||
gBattleStruct->safariEscapeFactor = 1;
|
||||
else
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "event_data.h"
|
||||
#include "field_message_box.h"
|
||||
#include "pokedex.h"
|
||||
#include "constants/species.h"
|
||||
#include "strings.h"
|
||||
|
||||
bool16 ScriptGetPokedexInfo(void)
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "constants/field_effects.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/metatile_labels.h"
|
||||
#include "fieldmap.h"
|
||||
#include "party_menu.h"
|
||||
|
||||
+23
-27
@@ -42,7 +42,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/tv.h"
|
||||
|
||||
// This file's functions.
|
||||
@@ -951,39 +950,39 @@ const struct SpriteTemplate sSpriteTemplates_ContestantsTurnBlinkEffect[CONTESTA
|
||||
|
||||
static const s8 gContestExcitementTable[CONTEST_CATEGORIES_COUNT][CONTEST_CATEGORIES_COUNT] =
|
||||
{
|
||||
[CONTEST_CATEGORY_COOL] = {
|
||||
[CONTEST_CATEGORY_COOL] = +1,
|
||||
[CONTEST_CATEGORY_BEAUTY] = 0,
|
||||
[CONTEST_CATEGORY_CUTE] = -1,
|
||||
[CONTEST_CATEGORY_SMART] = -1,
|
||||
[CONTEST_CATEGORY_COOL] = {
|
||||
[CONTEST_CATEGORY_COOL] = +1,
|
||||
[CONTEST_CATEGORY_BEAUTY] = 0,
|
||||
[CONTEST_CATEGORY_CUTE] = -1,
|
||||
[CONTEST_CATEGORY_SMART] = -1,
|
||||
[CONTEST_CATEGORY_TOUGH] = 0
|
||||
},
|
||||
[CONTEST_CATEGORY_BEAUTY] = {
|
||||
[CONTEST_CATEGORY_COOL] = 0,
|
||||
[CONTEST_CATEGORY_BEAUTY] = +1,
|
||||
[CONTEST_CATEGORY_CUTE] = 0,
|
||||
[CONTEST_CATEGORY_SMART] = -1,
|
||||
[CONTEST_CATEGORY_BEAUTY] = {
|
||||
[CONTEST_CATEGORY_COOL] = 0,
|
||||
[CONTEST_CATEGORY_BEAUTY] = +1,
|
||||
[CONTEST_CATEGORY_CUTE] = 0,
|
||||
[CONTEST_CATEGORY_SMART] = -1,
|
||||
[CONTEST_CATEGORY_TOUGH] = -1
|
||||
},
|
||||
[CONTEST_CATEGORY_CUTE] = {
|
||||
[CONTEST_CATEGORY_COOL] = -1,
|
||||
[CONTEST_CATEGORY_BEAUTY] = 0,
|
||||
[CONTEST_CATEGORY_CUTE] = +1,
|
||||
[CONTEST_CATEGORY_SMART] = 0,
|
||||
[CONTEST_CATEGORY_COOL] = -1,
|
||||
[CONTEST_CATEGORY_BEAUTY] = 0,
|
||||
[CONTEST_CATEGORY_CUTE] = +1,
|
||||
[CONTEST_CATEGORY_SMART] = 0,
|
||||
[CONTEST_CATEGORY_TOUGH] = -1
|
||||
},
|
||||
[CONTEST_CATEGORY_SMART] = {
|
||||
[CONTEST_CATEGORY_COOL] = -1,
|
||||
[CONTEST_CATEGORY_BEAUTY] = -1,
|
||||
[CONTEST_CATEGORY_CUTE] = 0,
|
||||
[CONTEST_CATEGORY_SMART] = +1,
|
||||
[CONTEST_CATEGORY_COOL] = -1,
|
||||
[CONTEST_CATEGORY_BEAUTY] = -1,
|
||||
[CONTEST_CATEGORY_CUTE] = 0,
|
||||
[CONTEST_CATEGORY_SMART] = +1,
|
||||
[CONTEST_CATEGORY_TOUGH] = 0
|
||||
},
|
||||
[CONTEST_CATEGORY_TOUGH] = {
|
||||
[CONTEST_CATEGORY_COOL] = 0,
|
||||
[CONTEST_CATEGORY_BEAUTY] = -1,
|
||||
[CONTEST_CATEGORY_CUTE] = -1,
|
||||
[CONTEST_CATEGORY_SMART] = 0,
|
||||
[CONTEST_CATEGORY_TOUGH] = {
|
||||
[CONTEST_CATEGORY_COOL] = 0,
|
||||
[CONTEST_CATEGORY_BEAUTY] = -1,
|
||||
[CONTEST_CATEGORY_CUTE] = -1,
|
||||
[CONTEST_CATEGORY_SMART] = 0,
|
||||
[CONTEST_CATEGORY_TOUGH] = +1
|
||||
}
|
||||
};
|
||||
@@ -999,8 +998,6 @@ void ResetLinkContestBoolean(void)
|
||||
|
||||
static void SetupContestGpuRegs(void)
|
||||
{
|
||||
u16 savedIme;
|
||||
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
@@ -6101,4 +6098,3 @@ void StripPlayerAndMonNamesForLinkContest(struct ContestPokemon *mon, s32 langua
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "pokedex.h"
|
||||
#include "event_data.h"
|
||||
#include "random.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "graphics.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/battle_ai.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#ifndef GUARD_DATA_BARD_MUSIC_POKEMON_H
|
||||
#define GUARD_DATA_BARD_MUSIC_POKEMON_H
|
||||
#include "constants/species.h"
|
||||
|
||||
const u16 gNumSpeciesNames = NUM_SPECIES;
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#define TRAINER_HILL_OTID 0x10000000
|
||||
|
||||
// NOTE: Each of these macros turn data into one byte. Therefore ranges for all arguments is 0-15
|
||||
// See struct TrHillDisplay for more info about each
|
||||
#define COORDS_XY(x,y) ((y<<4)|(x))
|
||||
#define TRAINER_DIRS(a, b) (((a-1)<<4)|(b-1))
|
||||
#define TRAINER_RANGE(a, b) ((a<<4)|(b))
|
||||
|
||||
static const struct TrHillTag sDataTagJPDefault = {
|
||||
.numTrainers = NUM_TRAINER_HILL_TRAINERS_JP,
|
||||
.unused1 = 1,
|
||||
@@ -187,11 +193,28 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = { 0x31, 0x35, 0x35, 0x3b, 0x26, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x3b, 0x3b, 0x8, 0x31, 0x2b, 0x2b, 0x3b, 0x34, 0x34, 0x2b, 0x2b, 0x34, 0x33, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x8, 0x31, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x8, 0x31, 0x2b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, 0x8, 0x31, 0x2b, 0x34, 0x34, 0x34, 0x2b, 0x34, 0x34, 0x3b, 0x2c, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x8, 0x31, 0x2b, 0x3b, 0x35, 0x3b, 0x2b, 0x3b, 0x35, 0x3b, 0x35, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x8, 0x31, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x8, 0x31, 0x34, 0x3b, 0x2b, 0x3b, 0x34, 0x3b, 0x2b, 0x35, 0x2b, 0x3b, 0x3b, 0x3f, 0x3b, 0x3b, 0x8, 0x31, 0x3b, 0x3b, 0x34, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x34, 0x3f, 0x3b, 0x3b, 0x3b, 0x3f, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 },
|
||||
.unk3A0 = { 0x381, 0x6fc1, 0x6341, 0x6041, 0x7f41, 0x4401, 0x5541, 0x5541, 0x11c1, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff },
|
||||
.coords = { 0x28, 0x78 },
|
||||
.direction = 0x1,
|
||||
.range = 0x23
|
||||
.metatileData = {
|
||||
0x31, 0x35, 0x35, 0x3b, 0x26, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x3b, 0x3b, 0x08,
|
||||
0x31, 0x2b, 0x2b, 0x3b, 0x34, 0x34, 0x2b, 0x2b, 0x34, 0x33, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x08,
|
||||
0x31, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08,
|
||||
0x31, 0x2b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, 0x08,
|
||||
0x31, 0x2b, 0x34, 0x34, 0x34, 0x2b, 0x34, 0x34, 0x3b, 0x2c, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08,
|
||||
0x31, 0x2b, 0x3b, 0x35, 0x3b, 0x2b, 0x3b, 0x35, 0x3b, 0x35, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08,
|
||||
0x31, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08,
|
||||
0x31, 0x34, 0x3b, 0x2b, 0x3b, 0x34, 0x3b, 0x2b, 0x35, 0x2b, 0x3b, 0x3b, 0x3f, 0x3b, 0x3b, 0x08,
|
||||
0x31, 0x3b, 0x3b, 0x34, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x34, 0x3f, 0x3b, 0x3b, 0x3b, 0x3f, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = { 0x0381, 0x6fc1, 0x6341, 0x6041, 0x7f41, 0x4401, 0x5541, 0x5541, 0x11c1, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff },
|
||||
.coords = { COORDS_XY(8,2), COORDS_XY(8,7) },
|
||||
.direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(2, 3)
|
||||
}
|
||||
},
|
||||
[1] = {
|
||||
@@ -372,11 +395,28 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = { 0x31, 0x3b, 0x35, 0x3b, 0x39, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x35, 0x3b, 0x8, 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x8, 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x8, 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x8, 0x3f, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3e, 0x3e, 0x2b, 0x3b, 0x8, 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2c, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x8, 0x31, 0x3f, 0x2b, 0x3b, 0x3b, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x8, 0x31, 0x3b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x2b, 0x3b, 0x8, 0x3f, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x8, 0x31, 0x3b, 0x3f, 0x3f, 0x3b, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x8, 0x31, 0x3f, 0x3f, 0x3f, 0x3b, 0x2b, 0x2b, 0x35, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x8, 0x31, 0x3f, 0x3f, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x8, 0x31, 0x3b, 0x3b, 0x3b, 0x3f, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8 },
|
||||
.unk3A0 = { 0x381, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x26c5, 0x2005, 0x3efd, 0x1, 0x6ff, 0x7ff, 0x7ff, 0xffff, 0xffff, 0xffff },
|
||||
.coords = { 0x67, 0xa7 },
|
||||
.direction = 0x1,
|
||||
.range = 0x33
|
||||
.metatileData = {
|
||||
0x31, 0x3b, 0x35, 0x3b, 0x39, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x35, 0x3b, 0x08,
|
||||
0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08,
|
||||
0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08,
|
||||
0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08,
|
||||
0x3f, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3e, 0x3e, 0x2b, 0x3b, 0x08,
|
||||
0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2c, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08,
|
||||
0x31, 0x3f, 0x2b, 0x3b, 0x3b, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08,
|
||||
0x31, 0x3b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x2b, 0x3b, 0x08,
|
||||
0x3f, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x08,
|
||||
0x31, 0x3b, 0x3f, 0x3f, 0x3b, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x08,
|
||||
0x31, 0x3f, 0x3f, 0x3f, 0x3b, 0x2b, 0x2b, 0x35, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08,
|
||||
0x31, 0x3f, 0x3f, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08,
|
||||
0x31, 0x3b, 0x3b, 0x3b, 0x3f, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = { 0x0381, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x26c5, 0x2005, 0x3efd, 0x1, 0x6ff, 0x7ff, 0x7ff, 0xffff, 0xffff, 0xffff },
|
||||
.coords = { COORDS_XY(7,6), COORDS_XY(7,10) },
|
||||
.direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(3, 3)
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -686,11 +726,28 @@ static const struct TrHillFloor sDataTagNormal_Floors[] =
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x35, 0x35, 0x26, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x26, 0x3A, 0x3B, 0x35, 0x3B, 0x8, 0x31, 0x3B, 0x2C, 0x2C, 0x2C, 0x2B, 0x24, 0x24, 0x24, 0x24, 0x2C, 0x3B, 0x3B, 0x2C, 0x3B, 0x8, 0x2D, 0x3B, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x35, 0x3B, 0x35, 0x35, 0x3B, 0x8, 0x33, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x2C, 0x2B, 0x3B, 0x8, 0x33, 0x35, 0x3B, 0x3B, 0x3B, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x8, 0x34, 0x2C, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x2B, 0x32, 0x30, 0x2C, 0x3B, 0x8, 0x31, 0x35, 0x3B, 0x3B, 0x35, 0x3B, 0x2C, 0x3B, 0x3B, 0x35, 0x2C, 0x3B, 0x3B, 0x35, 0x35, 0x8, 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x35, 0x3B, 0x2B, 0x32, 0x21, 0x30, 0x2C, 0x2C, 0x8, 0x31, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x2C, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x8, 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2B, 0x3B, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x8, 0x31, 0x35, 0x35, 0x35, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x2B, 0x3B, 0x35, 0x35, 0x8, 0x31, 0x2B, 0x2C, 0x2C, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x8, 0x31, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x8, 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x3B, 0x3B, 0x2C, 0x32, 0x30, 0x2C, 0x32, 0x30, 0x3B, 0x35, 0x8, 0x31, 0x3B, 0x3B, 0x3B, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x3FE5, 0x401, 0xBDED, 0x8425, 0xDFBD, 0x221, 0x7E7F, 0x941, 0x7F7D, 0x911, 0x7FF7, 0x4101, 0x79F9, 0x803, 0xFFFF},
|
||||
.coords = {27, 45},
|
||||
.direction = 0x21,
|
||||
.range = 0x21,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x35, 0x35, 0x26, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x26, 0x3A, 0x3B, 0x35, 0x3B, 0x08,
|
||||
0x31, 0x3B, 0x2C, 0x2C, 0x2C, 0x2B, 0x24, 0x24, 0x24, 0x24, 0x2C, 0x3B, 0x3B, 0x2C, 0x3B, 0x08,
|
||||
0x2D, 0x3B, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x35, 0x3B, 0x35, 0x35, 0x3B, 0x08,
|
||||
0x33, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x2C, 0x2B, 0x3B, 0x08,
|
||||
0x33, 0x35, 0x3B, 0x3B, 0x3B, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x08,
|
||||
0x34, 0x2C, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x2B, 0x32, 0x30, 0x2C, 0x3B, 0x08,
|
||||
0x31, 0x35, 0x3B, 0x3B, 0x35, 0x3B, 0x2C, 0x3B, 0x3B, 0x35, 0x2C, 0x3B, 0x3B, 0x35, 0x35, 0x08,
|
||||
0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x35, 0x3B, 0x2B, 0x32, 0x21, 0x30, 0x2C, 0x2C, 0x08,
|
||||
0x31, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x2C, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2B, 0x3B, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x08,
|
||||
0x31, 0x35, 0x35, 0x35, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x2B, 0x3B, 0x35, 0x35, 0x08,
|
||||
0x31, 0x2B, 0x2C, 0x2C, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08,
|
||||
0x31, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x31, 0x2C, 0x32, 0x30, 0x2B, 0x3B, 0x3B, 0x2C, 0x32, 0x30, 0x2C, 0x32, 0x30, 0x3B, 0x35, 0x08,
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x3FE5, 0x0401, 0xBDED, 0x8425, 0xDFBD, 0x0221, 0x7E7F, 0x0941, 0x7F7D, 0x0911, 0x7FF7, 0x4101, 0x79F9, 0x0803, 0xFFFF},
|
||||
.coords = {COORDS_XY(11,1), COORDS_XY(13,2)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(2, 1),
|
||||
}
|
||||
},
|
||||
[1] =
|
||||
@@ -991,11 +1048,28 @@ static const struct TrHillFloor sDataTagNormal_Floors[] =
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0xD1, 0xD5, 0xD5, 0xD5, 0xD9, 0xD9, 0x1B, 0x1C, 0x1D, 0xC5, 0xC6, 0xCE, 0xD5, 0xDB, 0xD5, 0x8, 0xD1, 0xCB, 0xC4, 0xC4, 0xDB, 0xDB, 0xC4, 0xC4, 0xC4, 0xCC, 0xCC, 0xCC, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xDB, 0x17, 0x17, 0x17, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xD5, 0x17, 0x17, 0x17, 0xD5, 0xD5, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0x17, 0x17, 0x1F, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xC4, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDB, 0xC4, 0xC4, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xC4, 0xC4, 0xDB, 0xC4, 0xC4, 0xC4, 0xDB, 0xCB, 0x8, 0xD1, 0xCB, 0xDB, 0xCB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0xDB, 0xD5, 0xD5, 0xD5, 0xCB, 0x8, 0xD1, 0xC4, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x8, 0xD1, 0xDB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x8, 0xD1, 0xDB, 0xDB, 0xC4, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xC4, 0xC4, 0xC4, 0xC4, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x73FB, 0x400B, 0x400B, 0x51EB, 0x538B, 0x51BB, 0x518B, 0x51EB, 0x518B, 0x51BB, 0x5003, 0x501F, 0x101F, 0x101F, 0xFFFF},
|
||||
.coords = {180, 233},
|
||||
.direction = 0x3,
|
||||
.range = 0x35,
|
||||
.metatileData = {
|
||||
0xD1, 0xD5, 0xD5, 0xD5, 0xD9, 0xD9, 0x1B, 0x1C, 0x1D, 0xC5, 0xC6, 0xCE, 0xD5, 0xDB, 0xD5, 0x08,
|
||||
0xD1, 0xCB, 0xC4, 0xC4, 0xDB, 0xDB, 0xC4, 0xC4, 0xC4, 0xCC, 0xCC, 0xCC, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xDB, 0x17, 0x17, 0x17, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xD5, 0x17, 0x17, 0x17, 0xD5, 0xD5, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0x17, 0x17, 0x1F, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xC4, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDB, 0xC4, 0xC4, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xC4, 0xC4, 0xDB, 0xC4, 0xC4, 0xC4, 0xDB, 0xCB, 0x08,
|
||||
0xD1, 0xCB, 0xDB, 0xCB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0xDB, 0xD5, 0xD5, 0xD5, 0xCB, 0x08,
|
||||
0xD1, 0xC4, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08,
|
||||
0xD1, 0xDB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08,
|
||||
0xD1, 0xDB, 0xDB, 0xC4, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xC4, 0xC4, 0xC4, 0xC4, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x73FB, 0x400B, 0x400B, 0x51EB, 0x538B, 0x51BB, 0x518B, 0x51EB, 0x518B, 0x51BB, 0x5003, 0x501F, 0x101F, 0x101F, 0xFFFF},
|
||||
.coords = {COORDS_XY(4,11), COORDS_XY(9,14)},
|
||||
.direction = TRAINER_DIRS(DIR_SOUTH, DIR_EAST),
|
||||
.range = TRAINER_RANGE(3, 5),
|
||||
}
|
||||
},
|
||||
[2] =
|
||||
@@ -1295,11 +1369,28 @@ static const struct TrHillFloor sDataTagNormal_Floors[] =
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x35, 0x35, 0x35, 0x26, 0x26, 0x13, 0x14, 0x15, 0x38, 0x26, 0x2E, 0x35, 0x35, 0x3B, 0x8, 0x69, 0x63, 0x64, 0x64, 0x64, 0x64, 0x71, 0x71, 0x71, 0x72, 0x64, 0x64, 0x64, 0x63, 0x73, 0x8, 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x8, 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x8, 0x69, 0x63, 0x43, 0x41, 0x40, 0x41, 0x42, 0x41, 0x41, 0x4A, 0x42, 0x41, 0x41, 0x63, 0x73, 0x8, 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x8, 0x69, 0x63, 0x41, 0x43, 0x4B, 0x43, 0x43, 0x41, 0x42, 0x42, 0x40, 0x41, 0x40, 0x63, 0x73, 0x8, 0x69, 0x63, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x8, 0x69, 0x63, 0x41, 0x40, 0x42, 0x42, 0x41, 0x41, 0x42, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x8, 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x8, 0x69, 0x63, 0x41, 0x42, 0x41, 0x43, 0x4B, 0x41, 0x41, 0x41, 0x40, 0x43, 0x41, 0x63, 0x73, 0x8, 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x8, 0x69, 0x63, 0x41, 0x40, 0x43, 0x41, 0x42, 0x42, 0x41, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x8, 0x69, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x64, 0x73, 0x8, 0x69, 0x43, 0x43, 0x41, 0x42, 0x42, 0x41, 0x43, 0x41, 0x41, 0x40, 0x42, 0x41, 0x42, 0x73, 0x8, 0x69, 0x42, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x42, 0x73, 0x8},
|
||||
.unk3A0 = {0x381, 0x7C3D, 0x4005, 0x4005, 0x4005, 0x4045, 0x4005, 0x4805, 0x4005, 0x4045, 0x4005, 0x4205, 0x4005, 0x4045, 0x1, 0x1},
|
||||
.coords = {37, 41},
|
||||
.direction = 0x23,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0x31, 0x35, 0x35, 0x35, 0x26, 0x26, 0x13, 0x14, 0x15, 0x38, 0x26, 0x2E, 0x35, 0x35, 0x3B, 0x08,
|
||||
0x69, 0x63, 0x64, 0x64, 0x64, 0x64, 0x71, 0x71, 0x71, 0x72, 0x64, 0x64, 0x64, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x43, 0x41, 0x40, 0x41, 0x42, 0x41, 0x41, 0x4A, 0x42, 0x41, 0x41, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x41, 0x43, 0x4B, 0x43, 0x43, 0x41, 0x42, 0x42, 0x40, 0x41, 0x40, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x41, 0x40, 0x42, 0x42, 0x41, 0x41, 0x42, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x41, 0x42, 0x41, 0x43, 0x4B, 0x41, 0x41, 0x41, 0x40, 0x43, 0x41, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08,
|
||||
0x69, 0x63, 0x41, 0x40, 0x43, 0x41, 0x42, 0x42, 0x41, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08,
|
||||
0x69, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x64, 0x73, 0x08,
|
||||
0x69, 0x43, 0x43, 0x41, 0x42, 0x42, 0x41, 0x43, 0x41, 0x41, 0x40, 0x42, 0x41, 0x42, 0x73, 0x08,
|
||||
0x69, 0x42, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x42, 0x73, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x7C3D, 0x4005, 0x4005, 0x4005, 0x4045, 0x4005, 0x4805, 0x4005, 0x4045, 0x4005, 0x4205, 0x4005, 0x4045, 0x1, 0x1},
|
||||
.coords = {COORDS_XY(5,2), COORDS_XY(9,2)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
[3] =
|
||||
@@ -1592,11 +1683,28 @@ static const struct TrHillFloor sDataTagNormal_Floors[] =
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x1F, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x24, 0x24, 0x24, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x8, 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x35, 0x35, 0x3B, 0x35, 0x35, 0x8, 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x8, 0x33, 0x17, 0x1F, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x34, 0x17, 0x2C, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x17, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x1F, 0x17, 0x17, 0x17, 0x17, 0x1F, 0x17, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x35, 0x1F, 0x17, 0x17, 0x1F, 0x17, 0x8, 0x34, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x3B, 0x3B, 0x2B, 0x17, 0x8, 0x17, 0x17, 0x17, 0x1F, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x2C, 0x17, 0x8, 0x1F, 0x17, 0x17, 0x2C, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x1F, 0x3B, 0x17, 0x8, 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x2B, 0x3B, 0x17, 0x8, 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x35, 0x35, 0x35, 0x2B, 0x17, 0x3B, 0x2C, 0x3B, 0x17, 0x8, 0x34, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x7C1, 0x8441, 0x8477, 0x8441, 0xA441, 0x401, 0x1, 0x8401, 0x8465, 0x445, 0x1441, 0x8449, 0x8449, 0x87C1, 0xFFFF},
|
||||
.coords = {71, 167},
|
||||
.direction = 0x1,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x1F, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x24, 0x24, 0x24, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x35, 0x35, 0x3B, 0x35, 0x35, 0x08,
|
||||
0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08,
|
||||
0x33, 0x17, 0x1F, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x34, 0x17, 0x2C, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x1F, 0x17, 0x17, 0x17, 0x17, 0x1F, 0x17, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x35, 0x1F, 0x17, 0x17, 0x1F, 0x17, 0x08,
|
||||
0x34, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x3B, 0x3B, 0x2B, 0x17, 0x08,
|
||||
0x17, 0x17, 0x17, 0x1F, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x2C, 0x17, 0x08,
|
||||
0x1F, 0x17, 0x17, 0x2C, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x1F, 0x3B, 0x17, 0x08,
|
||||
0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x2B, 0x3B, 0x17, 0x08,
|
||||
0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x35, 0x35, 0x35, 0x2B, 0x17, 0x3B, 0x2C, 0x3B, 0x17, 0x08,
|
||||
0x34, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x7C1, 0x8441, 0x8477, 0x8441, 0xA441, 0x0401, 0x1, 0x8401, 0x8465, 0x0445, 0x1441, 0x8449, 0x8449, 0x87C1, 0xFFFF},
|
||||
.coords = {COORDS_XY(7,4), COORDS_XY(7,10)},
|
||||
.direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -1896,11 +2004,28 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x40, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0x43, 0x43, 0x43, 0x43, 0x43, 0x40, 0x41, 0x41, 0x8, 0x40, 0xFB, 0x43, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x42, 0x42, 0x42, 0xFB, 0x41, 0x8, 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x43, 0x43, 0xFB, 0x40, 0x41, 0x8, 0x40, 0x41, 0x41, 0xFB, 0x43, 0x41, 0x42, 0x40, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x40, 0x41, 0x8, 0x40, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x40, 0x43, 0x43, 0x43, 0x41, 0x41, 0x40, 0x41, 0x8, 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x8, 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x8, 0x40, 0x41, 0x42, 0x41, 0xFE, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x8, 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x8, 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x8, 0x40, 0x42, 0x41, 0x43, 0x43, 0x43, 0x41, 0x40, 0x42, 0x42, 0x42, 0x42, 0x41, 0x40, 0x41, 0x8, 0x40, 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xFB, 0x41, 0x40, 0x41, 0x8, 0x40, 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x42, 0xFB, 0x40, 0x41, 0x8, 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x8, 0x40, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x8},
|
||||
.unk3A0 = {0x381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1},
|
||||
.coords = {133, 137},
|
||||
.direction = 0x23,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x40, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0x43, 0x43, 0x43, 0x43, 0x43, 0x40, 0x41, 0x41, 0x08,
|
||||
0x40, 0xFB, 0x43, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x42, 0x42, 0x42, 0xFB, 0x41, 0x08,
|
||||
0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x43, 0x43, 0xFB, 0x40, 0x41, 0x08,
|
||||
0x40, 0x41, 0x41, 0xFB, 0x43, 0x41, 0x42, 0x40, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x40, 0x43, 0x43, 0x43, 0x41, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x41, 0x42, 0x41, 0xFE, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x42, 0x41, 0x43, 0x43, 0x43, 0x41, 0x40, 0x42, 0x42, 0x42, 0x42, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xFB, 0x41, 0x40, 0x41, 0x08,
|
||||
0x40, 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x42, 0xFB, 0x40, 0x41, 0x08,
|
||||
0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x08,
|
||||
0x40, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1},
|
||||
.coords = {COORDS_XY(5,8), COORDS_XY(9,8)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
[1] =
|
||||
@@ -2219,11 +2344,28 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x91, 0x9B, 0x9C, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x8, 0x9C, 0x9B, 0x96, 0x40, 0xDB, 0xDB, 0x40, 0x96, 0x40, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x8, 0x91, 0x96, 0x40, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9C, 0x8, 0x91, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x9B, 0x8, 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x8, 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x8, 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x8, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x8, 0x91, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x8, 0x91, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9C, 0x8, 0x9C, 0x9B, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x8, 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9C, 0x96, 0x8, 0xD6, 0x96, 0x9C, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0xD6, 0x8, 0x9C, 0xD6, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0xD6, 0x9C, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF},
|
||||
.coords = {131, 139},
|
||||
.direction = 0x23,
|
||||
.range = 0x77,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x91, 0x9B, 0x9C, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x08,
|
||||
0x9C, 0x9B, 0x96, 0x40, 0xDB, 0xDB, 0x40, 0x96, 0x40, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x08,
|
||||
0x91, 0x96, 0x40, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9C, 0x08,
|
||||
0x91, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x9B, 0x08,
|
||||
0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08,
|
||||
0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08,
|
||||
0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08,
|
||||
0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x08,
|
||||
0x91, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x08,
|
||||
0x91, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9C, 0x08,
|
||||
0x9C, 0x9B, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0x96, 0x9B, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9C, 0x96, 0x08,
|
||||
0xD6, 0x96, 0x9C, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0xD6, 0x08,
|
||||
0x9C, 0xD6, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0xD6, 0x9C, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF},
|
||||
.coords = {COORDS_XY(3,8), COORDS_XY(11,8)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(7, 7),
|
||||
}
|
||||
},
|
||||
[2] =
|
||||
@@ -2523,11 +2665,28 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x1C, 0x1D, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x84, 0x84, 0x84, 0x9A, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x8, 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x8, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x8, 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x8, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x8, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x8, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x8, 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x8, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x8, 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x8, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x8, 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x8, 0x17, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0x17, 0xBB, 0xBB, 0x8},
|
||||
.unk3A0 = {0x381, 0x381, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1},
|
||||
.coords = {25, 30},
|
||||
.direction = 0x23,
|
||||
.range = 0x44,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x1C, 0x1D, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x84, 0x84, 0x84, 0x9A, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08,
|
||||
0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x08,
|
||||
0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08,
|
||||
0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08,
|
||||
0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08,
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08,
|
||||
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x08,
|
||||
0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08,
|
||||
0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08,
|
||||
0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08,
|
||||
0x17, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0x17, 0xBB, 0xBB, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x0381, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1},
|
||||
.coords = {COORDS_XY(9,1), COORDS_XY(14,1)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(4, 4),
|
||||
}
|
||||
},
|
||||
[3] =
|
||||
@@ -2818,11 +2977,28 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x5E, 0x41, 0x71, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x8, 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x45, 0x45, 0x45, 0x45, 0x45, 0x8, 0x65, 0x40, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x8, 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x42, 0x73, 0x41, 0x8, 0x69, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x43, 0x73, 0x43, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x8, 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x8, 0x65, 0x42, 0x73, 0x42, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x8, 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x8, 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x43, 0x6D, 0x41, 0x73, 0x43, 0x6D, 0x8, 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x8, 0x65, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x40, 0x73, 0x8, 0x6C, 0x73, 0x40, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x8, 0x69, 0x40, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x8, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x1, 0x2201, 0x1, 0x8881, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0xFFFF},
|
||||
.coords = {42, 46},
|
||||
.direction = 0x23,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x5E, 0x41, 0x71, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08,
|
||||
0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08,
|
||||
0x65, 0x40, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08,
|
||||
0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x42, 0x73, 0x41, 0x08,
|
||||
0x69, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x43, 0x73, 0x43, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x08,
|
||||
0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x08,
|
||||
0x65, 0x42, 0x73, 0x42, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x08,
|
||||
0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08,
|
||||
0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x43, 0x6D, 0x41, 0x73, 0x43, 0x6D, 0x08,
|
||||
0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x08,
|
||||
0x65, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x40, 0x73, 0x08,
|
||||
0x6C, 0x73, 0x40, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08,
|
||||
0x69, 0x40, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x08,
|
||||
0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x1, 0x2201, 0x1, 0x8881, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0xFFFF},
|
||||
.coords = {COORDS_XY(10,2), COORDS_XY(14,2)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -3127,11 +3303,28 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0xF1, 0xF5, 0xFB, 0xF5, 0xE6, 0xE6, 0x1B, 0x14, 0x15, 0xF8, 0xF9, 0xFA, 0xFB, 0xFB, 0xFB, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xF9, 0xE6, 0xEE, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0x9B, 0x9B, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0x9B, 0xDB, 0xDB, 0x9B, 0xEC, 0xFB, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xF5, 0x95, 0x95, 0xF5, 0xF5, 0xF5, 0xEB, 0xEC, 0xEB, 0xFB, 0xEB, 0x8, 0xED, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x8, 0xF4, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xF5, 0xFB, 0x8, 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0x8, 0xF1, 0xF5, 0xF5, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0x8, 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0x8, 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0x8, 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0x8, 0xF1, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x5E01, 0x50FF, 0x5083, 0x503B, 0x5FEB, 0xC02B, 0x5FEB, 0x5009, 0x57FD, 0x1005, 0x7FF5, 0x15, 0x7FF5, 0x1, 0xFFFF},
|
||||
.coords = {52, 55},
|
||||
.direction = 0x23,
|
||||
.range = 0x22,
|
||||
.metatileData = {
|
||||
0xF1, 0xF5, 0xFB, 0xF5, 0xE6, 0xE6, 0x1B, 0x14, 0x15, 0xF8, 0xF9, 0xFA, 0xFB, 0xFB, 0xFB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xF9, 0xE6, 0xEE, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0x9B, 0x9B, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0x9B, 0xDB, 0xDB, 0x9B, 0xEC, 0xFB, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xF5, 0x95, 0x95, 0xF5, 0xF5, 0xF5, 0xEB, 0xEC, 0xEB, 0xFB, 0xEB, 0x08,
|
||||
0xED, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08,
|
||||
0xF4, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xF5, 0xFB, 0x08,
|
||||
0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0x08,
|
||||
0xF1, 0xF5, 0xF5, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0x08,
|
||||
0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0x08,
|
||||
0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0x08,
|
||||
0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0x08,
|
||||
0xF1, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x5E01, 0x50FF, 0x5083, 0x503B, 0x5FEB, 0xC02B, 0x5FEB, 0x5009, 0x57FD, 0x1005, 0x7FF5, 0x15, 0x7FF5, 0x1, 0xFFFF},
|
||||
.coords = {COORDS_XY(4,3), COORDS_XY(7,3)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(2, 2),
|
||||
}
|
||||
},
|
||||
[1] =
|
||||
@@ -3431,11 +3624,28 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x2D, 0x3B, 0x3B, 0x3B, 0x35, 0x2C, 0x23, 0x24, 0x23, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x8, 0x94, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x9B, 0x8, 0x91, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x8, 0x8D, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8C, 0x8, 0x94, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x9B, 0x9B, 0x87, 0x9B, 0x8, 0x91, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x9B, 0x95, 0x8F, 0x9B, 0x8, 0x91, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x95, 0x97, 0x95, 0x97, 0x8C, 0x9B, 0x8C, 0x97, 0x95, 0x8, 0x91, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x87, 0x95, 0x87, 0x8C, 0x8, 0x8D, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8, 0x94, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x8, 0x91, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x95, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x9B, 0x8, 0x91, 0x8F, 0x95, 0x8F, 0x8B, 0x8F, 0x8C, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8, 0x91, 0x97, 0x8C, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8B, 0x97, 0x9B, 0x8, 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x8C, 0x9B, 0x9B, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x7C1, 0x8AA1, 0x209, 0x5557, 0xA281, 0x81, 0x5D6D, 0x2283, 0x89, 0xDD55, 0x20A1, 0xA81, 0x7D5D, 0x9, 0xFFFF},
|
||||
.coords = {105, 109},
|
||||
.direction = 0x23,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x2D, 0x3B, 0x3B, 0x3B, 0x35, 0x2C, 0x23, 0x24, 0x23, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x94, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x9B, 0x08,
|
||||
0x91, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x08,
|
||||
0x8D, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8C, 0x08,
|
||||
0x94, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x9B, 0x9B, 0x87, 0x9B, 0x08,
|
||||
0x91, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x9B, 0x95, 0x8F, 0x9B, 0x08,
|
||||
0x91, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x95, 0x97, 0x95, 0x97, 0x8C, 0x9B, 0x8C, 0x97, 0x95, 0x08,
|
||||
0x91, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x87, 0x95, 0x87, 0x8C, 0x08,
|
||||
0x8D, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x08,
|
||||
0x94, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x08,
|
||||
0x91, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x95, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x9B, 0x08,
|
||||
0x91, 0x8F, 0x95, 0x8F, 0x8B, 0x8F, 0x8C, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x08,
|
||||
0x91, 0x97, 0x8C, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8B, 0x97, 0x9B, 0x08,
|
||||
0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x8C, 0x9B, 0x9B, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x7C1, 0x8AA1, 0x0209, 0x5557, 0xA281, 0x81, 0x5D6D, 0x2283, 0x89, 0xDD55, 0x20A1, 0xA81, 0x7D5D, 0x9, 0xFFFF},
|
||||
.coords = {COORDS_XY(9,6), COORDS_XY(13,6)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
[2] =
|
||||
@@ -3735,11 +3945,28 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x8, 0x69, 0x46, 0x7A, 0x73, 0x73, 0x73, 0x79, 0x73, 0x73, 0x73, 0x7D, 0x73, 0x73, 0x73, 0x46, 0x8, 0x69, 0x46, 0x73, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x8, 0x69, 0x46, 0x73, 0x73, 0x7B, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x7A, 0x73, 0x73, 0x73, 0x46, 0x8, 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7A, 0x46, 0x8, 0x69, 0x46, 0x73, 0x73, 0x73, 0x73, 0x73, 0x7D, 0x7C, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x46, 0x8, 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x8, 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x8, 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x8, 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x8, 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x8, 0xF1, 0x46, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7A, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7C, 0x8, 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xFB, 0x8, 0x7C, 0xFB, 0x7B, 0xFB, 0x7A, 0xFB, 0x79, 0xFB, 0xB3, 0xFB, 0x7D, 0xFB, 0x7E, 0xFB, 0x7D, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x7FFB, 0x4003, 0x5FFF, 0x4003, 0x7FFB, 0x4003, 0x7EFF, 0x4443, 0x4443, 0x4443, 0x7EFF, 0x4001, 0x7FFD, 0x1, 0xFFFF},
|
||||
.coords = {150, 152},
|
||||
.direction = 0x23,
|
||||
.range = 0x11,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x08,
|
||||
0x69, 0x46, 0x7A, 0x73, 0x73, 0x73, 0x79, 0x73, 0x73, 0x73, 0x7D, 0x73, 0x73, 0x73, 0x46, 0x08,
|
||||
0x69, 0x46, 0x73, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08,
|
||||
0x69, 0x46, 0x73, 0x73, 0x7B, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x7A, 0x73, 0x73, 0x73, 0x46, 0x08,
|
||||
0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7A, 0x46, 0x08,
|
||||
0x69, 0x46, 0x73, 0x73, 0x73, 0x73, 0x73, 0x7D, 0x7C, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x46, 0x08,
|
||||
0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08,
|
||||
0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08,
|
||||
0xF1, 0x46, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7A, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7C, 0x08,
|
||||
0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xFB, 0x08,
|
||||
0x7C, 0xFB, 0x7B, 0xFB, 0x7A, 0xFB, 0x79, 0xFB, 0xB3, 0xFB, 0x7D, 0xFB, 0x7E, 0xFB, 0x7D, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x7FFB, 0x4003, 0x5FFF, 0x4003, 0x7FFB, 0x4003, 0x7EFF, 0x4443, 0x4443, 0x4443, 0x7EFF, 0x4001, 0x7FFD, 0x1, 0xFFFF},
|
||||
.coords = {COORDS_XY(6,9), COORDS_XY(8,9)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(1, 1),
|
||||
}
|
||||
},
|
||||
[3] =
|
||||
@@ -4029,11 +4256,28 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0xF1, 0xFB, 0xFB, 0xFB, 0xF9, 0xF9, 0x1B, 0x1C, 0x1D, 0xE5, 0xE6, 0xEE, 0xF5, 0xFB, 0xFB, 0x8, 0xED, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x8, 0xF4, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x8, 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x8, 0xF1, 0xEB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x8, 0xF1, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x8, 0xF1, 0xEB, 0xFB, 0xF5, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x8, 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0x8, 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0x8, 0xF1, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x8, 0xF1, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x3F9, 0xF041, 0x41, 0x7F5F, 0x4401, 0x4541, 0x5579, 0x5541, 0x555F, 0x5541, 0x5541, 0x557D, 0x1101, 0x1101, 0xFFFF},
|
||||
.coords = {40, 91},
|
||||
.direction = 0x21,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0xF1, 0xFB, 0xFB, 0xFB, 0xF9, 0xF9, 0x1B, 0x1C, 0x1D, 0xE5, 0xE6, 0xEE, 0xF5, 0xFB, 0xFB, 0x08,
|
||||
0xED, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08,
|
||||
0xF4, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08,
|
||||
0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08,
|
||||
0xF1, 0xEB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xF5, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08,
|
||||
0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0x08,
|
||||
0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0x08,
|
||||
0xF1, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08,
|
||||
0xF1, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x3F9, 0xF041, 0x41, 0x7F5F, 0x4401, 0x4541, 0x5579, 0x5541, 0x555F, 0x5541, 0x5541, 0x557D, 0x1101, 0x1101, 0xFFFF},
|
||||
.coords = {COORDS_XY(8,2), COORDS_XY(11,5)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -4345,11 +4589,28 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x31, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x8, 0x31, 0x3B, 0x8, 0x8, 0x8, 0x8, 0x8, 0x3B, 0x8, 0x8, 0x8, 0x8, 0x8, 0x3B, 0x3B, 0x8, 0x69, 0x73, 0x8, 0x4D, 0x4D, 0x4D, 0x4D, 0xD1, 0x4D, 0x4D, 0x4D, 0x4D, 0x8, 0x69, 0x73, 0x8, 0x40, 0x3B, 0x8, 0x55, 0x55, 0x55, 0x55, 0xD1, 0x55, 0x55, 0x55, 0x55, 0x8, 0x31, 0x41, 0x8, 0x69, 0x41, 0x8, 0xC5, 0xD9, 0xD9, 0xD9, 0x9A, 0xD9, 0xD9, 0xD9, 0xC6, 0x8, 0x41, 0x73, 0x8, 0x69, 0x3B, 0x8, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x8, 0x31, 0x73, 0x8, 0x69, 0x3B, 0x8, 0xCD, 0x9B, 0x73, 0x73, 0x44, 0x73, 0x73, 0x9B, 0xD5, 0x8, 0x31, 0x73, 0x8, 0x69, 0x3B, 0x8, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x8, 0x31, 0x73, 0x8, 0x69, 0x41, 0x8, 0xD1, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xDB, 0xDB, 0xDB, 0x8, 0x41, 0x73, 0x8, 0x40, 0x3B, 0x8, 0x8, 0xC7, 0xC7, 0xDB, 0xDB, 0xDB, 0xC7, 0xC7, 0x8, 0x8, 0x31, 0x41, 0x8, 0x69, 0x3B, 0x4D, 0x4D, 0x67, 0x67, 0xDB, 0xDB, 0xDB, 0x67, 0x67, 0x4D, 0x4D, 0x31, 0x73, 0x8, 0x69, 0x3B, 0x55, 0x55, 0xD7, 0xD7, 0xD1, 0xDB, 0xDB, 0xD7, 0xD7, 0x55, 0x55, 0x31, 0x73, 0x8, 0x69, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x73, 0x8, 0x69, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x201, 0x3EF9, 0x3EF9, 0x3EF9, 0x2009, 0x3019, 0x2009, 0x3019, 0x2009, 0x3019, 0x3019, 0x3C79, 0x1, 0x1, 0xFFFF},
|
||||
.coords = {116, 122},
|
||||
.direction = 0x23,
|
||||
.range = 0x55,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x31, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x3B, 0x08,
|
||||
0x69, 0x73, 0x08, 0x4D, 0x4D, 0x4D, 0x4D, 0xD1, 0x4D, 0x4D, 0x4D, 0x4D, 0x08, 0x69, 0x73, 0x08,
|
||||
0x40, 0x3B, 0x08, 0x55, 0x55, 0x55, 0x55, 0xD1, 0x55, 0x55, 0x55, 0x55, 0x08, 0x31, 0x41, 0x08,
|
||||
0x69, 0x41, 0x08, 0xC5, 0xD9, 0xD9, 0xD9, 0x9A, 0xD9, 0xD9, 0xD9, 0xC6, 0x08, 0x41, 0x73, 0x08,
|
||||
0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08,
|
||||
0x69, 0x3B, 0x08, 0xCD, 0x9B, 0x73, 0x73, 0x44, 0x73, 0x73, 0x9B, 0xD5, 0x08, 0x31, 0x73, 0x08,
|
||||
0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08,
|
||||
0x69, 0x41, 0x08, 0xD1, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xDB, 0xDB, 0xDB, 0x08, 0x41, 0x73, 0x08,
|
||||
0x40, 0x3B, 0x08, 0x08, 0xC7, 0xC7, 0xDB, 0xDB, 0xDB, 0xC7, 0xC7, 0x08, 0x08, 0x31, 0x41, 0x08,
|
||||
0x69, 0x3B, 0x4D, 0x4D, 0x67, 0x67, 0xDB, 0xDB, 0xDB, 0x67, 0x67, 0x4D, 0x4D, 0x31, 0x73, 0x08,
|
||||
0x69, 0x3B, 0x55, 0x55, 0xD7, 0xD7, 0xD1, 0xDB, 0xDB, 0xD7, 0xD7, 0x55, 0x55, 0x31, 0x73, 0x08,
|
||||
0x69, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x73, 0x08,
|
||||
0x69, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x0201, 0x3EF9, 0x3EF9, 0x3EF9, 0x2009, 0x3019, 0x2009, 0x3019, 0x2009, 0x3019, 0x3019, 0x3C79, 0x1, 0x1, 0xFFFF},
|
||||
.coords = {COORDS_XY(4,7), COORDS_XY(10,7)},
|
||||
.direction = TRAINER_DIRS(DIR_WEST, DIR_EAST),
|
||||
.range = TRAINER_RANGE(5, 5),
|
||||
}
|
||||
},
|
||||
[1] =
|
||||
@@ -4650,11 +4911,28 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x8, 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x8, 0x91, 0x46, 0x7D, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x8, 0x91, 0x46, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0xB3, 0x9B, 0x9B, 0x9B, 0x8, 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x9B, 0x8, 0x91, 0x46, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x8, 0x91, 0x46, 0x9B, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x8, 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x8, 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xB3, 0x8, 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x8, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x8, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0x8, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x8, 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8},
|
||||
.unk3A0 = {0x381, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF},
|
||||
.coords = {167, 231},
|
||||
.direction = 0x1,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x08,
|
||||
0x91, 0x46, 0x7D, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0xB3, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x9B, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08,
|
||||
0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x08,
|
||||
0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xB3, 0x08,
|
||||
0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08,
|
||||
0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08,
|
||||
0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0x08,
|
||||
0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08,
|
||||
0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF},
|
||||
.coords = {COORDS_XY(7,10), COORDS_XY(7,14)},
|
||||
.direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
[2] =
|
||||
@@ -4955,11 +5233,28 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0xD1, 0xDB, 0xDB, 0xDB, 0xD9, 0xD9, 0x1B, 0x14, 0x15, 0x98, 0x99, 0x9A, 0x9B, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xDB, 0xDB, 0xD5, 0xD5, 0xC3, 0xF9, 0x86, 0x8E, 0x95, 0x9B, 0x9B, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x8, 0xD1, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x8, 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCC, 0xFB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x8, 0xD1, 0xCC, 0xCC, 0xCC, 0xCC, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x8, 0xD1, 0xD5, 0xD5, 0xD5, 0xD5, 0xFB, 0xEC, 0xFB, 0xEC, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x8, 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xF5, 0xF5, 0xFB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x8, 0xD1, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x8, 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xDB, 0xDB, 0xCC, 0xCC, 0xCB, 0xFB, 0x8C, 0x8C, 0x8C, 0x9B, 0x9B, 0x9B, 0x9B, 0x8, 0xD1, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCC, 0xFB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x8},
|
||||
.unk3A0 = {0x381, 0x201, 0xEE1, 0x1EF1, 0x3EF9, 0x3EF9, 0x7E7D, 0x783D, 0x2BD, 0x783D, 0x7E7D, 0x3E79, 0x3EF9, 0x1EF1, 0xEE1, 0x201},
|
||||
.coords = {103, 167},
|
||||
.direction = 0x1,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0xD1, 0xDB, 0xDB, 0xDB, 0xD9, 0xD9, 0x1B, 0x14, 0x15, 0x98, 0x99, 0x9A, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xDB, 0xDB, 0xD5, 0xD5, 0xC3, 0xF9, 0x86, 0x8E, 0x95, 0x9B, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x08,
|
||||
0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCC, 0xFB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08,
|
||||
0xD1, 0xCC, 0xCC, 0xCC, 0xCC, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08,
|
||||
0xD1, 0xD5, 0xD5, 0xD5, 0xD5, 0xFB, 0xEC, 0xFB, 0xEC, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08,
|
||||
0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xF5, 0xF5, 0xFB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08,
|
||||
0xD1, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xDB, 0xDB, 0xCC, 0xCC, 0xCB, 0xFB, 0x8C, 0x8C, 0x8C, 0x9B, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
0xD1, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCC, 0xFB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x0201, 0xEE1, 0x1EF1, 0x3EF9, 0x3EF9, 0x7E7D, 0x783D, 0x2BD, 0x783D, 0x7E7D, 0x3E79, 0x3EF9, 0x1EF1, 0xEE1, 0x201},
|
||||
.coords = {COORDS_XY(7,6), COORDS_XY(7,10)},
|
||||
.direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
[3] =
|
||||
@@ -5252,11 +5547,32 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = {
|
||||
},
|
||||
},
|
||||
.display = {
|
||||
.data = {0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x8, 0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x8, 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x8, 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x8, 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x8, 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x8, 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x8, 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x8, 0x96, 0x9B, 0x9B, 0x9B, 0x9B, 0xD6, 0xD6, 0x96, 0xD6, 0xD6, 0xDB, 0x9B, 0x9B, 0x9B, 0x96, 0x8, 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x8, 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x8, 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x8, 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x8, 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x8, 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x8, 0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x8},
|
||||
.unk3A0 = {0x381, 0x101, 0x101, 0x6C1, 0x821, 0x16D1, 0x2829, 0x2009, 0x1, 0x2009, 0x2829, 0x16D1, 0x821, 0x6C1, 0x101, 0x101},
|
||||
.coords = {103, 167},
|
||||
.direction = 0x1,
|
||||
.range = 0x33,
|
||||
.metatileData = {
|
||||
0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08,
|
||||
0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x08,
|
||||
0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08,
|
||||
0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08,
|
||||
0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08,
|
||||
0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08,
|
||||
0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08,
|
||||
0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08,
|
||||
0x96, 0x9B, 0x9B, 0x9B, 0x9B, 0xD6, 0xD6, 0x96, 0xD6, 0xD6, 0xDB, 0x9B, 0x9B, 0x9B, 0x96, 0x08,
|
||||
0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08,
|
||||
0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08,
|
||||
0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08,
|
||||
0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08,
|
||||
0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08,
|
||||
0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08,
|
||||
0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x08,
|
||||
},
|
||||
.collisionData = {0x0381, 0x0101, 0x0101, 0x6C1, 0x0821, 0x16D1, 0x2829, 0x2009, 0x1, 0x2009, 0x2829, 0x16D1, 0x0821, 0x6C1, 0x0101, 0x101},
|
||||
.coords = {COORDS_XY(7,6), COORDS_XY(7,10)},
|
||||
.direction = TRAINER_DIRS(DIR_SOUTH, DIR_NORTH),
|
||||
.range = TRAINER_RANGE(3, 3),
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
#undef COORDS_XY
|
||||
#undef TRAINER_DIRS
|
||||
#undef TRAINER_RANGE
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "contest.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#define CONTEST_OPPONENT_JIMMY 0
|
||||
#define CONTEST_OPPONENT_EDITH 1
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include "constants/species.h"
|
||||
|
||||
const u16 gEasyChatGroup_Pokemon[] = {
|
||||
SPECIES_ABRA,
|
||||
SPECIES_ABSOL,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include "constants/species.h"
|
||||
|
||||
const u16 gEasyChatGroup_Pokemon2[] = {
|
||||
SPECIES_ABRA,
|
||||
SPECIES_AERODACTYL,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "constants/easy_chat.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
static const u16 sContestLadyMonGfxId[] =
|
||||
|
||||
@@ -26,12 +26,12 @@ const u8 gItemEffect_ParalyzeHeal[6] = {
|
||||
const u8 gItemEffect_FullRestore[7] = {
|
||||
[3] = ITEM3_STATUS_ALL,
|
||||
[4] = ITEM4_HEAL_HP,
|
||||
[6] = -1,
|
||||
[6] = ITEM6_HEAL_FULL,
|
||||
};
|
||||
|
||||
const u8 gItemEffect_MaxPotion[7] = {
|
||||
[4] = ITEM4_HEAL_HP,
|
||||
[6] = -1,
|
||||
[6] = ITEM6_HEAL_FULL,
|
||||
};
|
||||
|
||||
const u8 gItemEffect_HyperPotion[7] = {
|
||||
@@ -50,12 +50,12 @@ const u8 gItemEffect_FullHeal[6] = {
|
||||
|
||||
const u8 gItemEffect_Revive[7] = {
|
||||
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
|
||||
[6] = -2,
|
||||
[6] = ITEM6_HEAL_HALF,
|
||||
};
|
||||
|
||||
const u8 gItemEffect_MaxRevive[7] = {
|
||||
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
|
||||
[6] = -1,
|
||||
[6] = ITEM6_HEAL_FULL,
|
||||
};
|
||||
|
||||
const u8 gItemEffect_FreshWater[7] = {
|
||||
@@ -107,7 +107,7 @@ const u8 gItemEffect_HealPowder[9] = {
|
||||
const u8 gItemEffect_RevivalHerb[10] = {
|
||||
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
|
||||
[5] = ITEM5_FRIENDSHIP_ALL,
|
||||
[6] = -1,
|
||||
[6] = ITEM6_HEAL_FULL,
|
||||
[7] = -15,
|
||||
[8] = -15,
|
||||
[9] = -20,
|
||||
@@ -157,7 +157,7 @@ const u8 gItemEffect_BerryJuice[7] = {
|
||||
const u8 gItemEffect_SacredAsh[7] = {
|
||||
[0] = ITEM0_SACRED_ASH,
|
||||
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
|
||||
[6] = -1,
|
||||
[6] = ITEM6_HEAL_FULL,
|
||||
};
|
||||
|
||||
const u8 gItemEffect_HPUp[10] = {
|
||||
@@ -206,7 +206,7 @@ const u8 gItemEffect_RareCandy[10] = {
|
||||
[3] = ITEM3_LEVEL_UP,
|
||||
[4] = ITEM4_REVIVE | ITEM4_HEAL_HP,
|
||||
[5] = ITEM5_FRIENDSHIP_ALL,
|
||||
[6] = 0xFD,
|
||||
[6] = ITEM6_HEAL_LVL_UP,
|
||||
[7] = 5,
|
||||
[8] = 3,
|
||||
[9] = 2,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
// This table determines which TMs and HMs a species is capable of learning.
|
||||
// Each entry is a 64-bit bit array spread across two 32-bit values, with
|
||||
// each bit corresponding to a .
|
||||
// each bit corresponding to a TM or HM.
|
||||
const u32 gTMHMLearnsets[][2] =
|
||||
{
|
||||
[SPECIES_NONE] = TMHM_LEARNSET(0),
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
// this file's functions
|
||||
static void ClearDaycareMonMail(struct DayCareMail *mail);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "decompress.h"
|
||||
#include "pokemon.h"
|
||||
#include "text.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
EWRAM_DATA ALIGNED(4) u8 gDecompressionBuffer[0x4000] = {0};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ struct DigitPrinterAlloc
|
||||
};
|
||||
|
||||
// this file's functions
|
||||
static u8 GetFirstOamId(u8 oamCount);;
|
||||
static u8 GetFirstOamId(u8 oamCount);
|
||||
static void CopyWorkToOam(struct DigitPrinter *objWork);
|
||||
static void DrawNumObjsLeadingZeros(struct DigitPrinter *objWork, s32 num, bool32 sign);
|
||||
static void DrawNumObjsMinusInFront(struct DigitPrinter *objWork, s32 num, bool32 sign);
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "window.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct DodrioSubstruct_0160
|
||||
{
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "constants/lilycove_lady.h"
|
||||
#include "constants/mauville_old_man.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
#define EZCHAT_TASK_STATE 0
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "trainer_hill.h"
|
||||
#include "constants/easy_chat.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "trade.h"
|
||||
#include "util.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "constants/maps.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainer_types.h"
|
||||
|
||||
static EWRAM_DATA u8 gUnknown_0203734C = 0;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "trainer_hill.h"
|
||||
#include "constants/field_poison.h"
|
||||
#include "constants/party_menu.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
static bool32 IsMonValidSpecies(struct Pokemon *pokemon)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include "constants/script_menu.h"
|
||||
#include "constants/slot_machine.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/party_menu.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/frontier_util.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/game_stat.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "window.h"
|
||||
#include "credits.h"
|
||||
#include "bg.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/game_stat.h"
|
||||
#include "util.h"
|
||||
#include "string_util.h"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "intro.h"
|
||||
#include "graphics.h"
|
||||
#include "sound.h"
|
||||
#include "constants/species.h"
|
||||
#include "util.h"
|
||||
#include "title_screen.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
+7
-7
@@ -920,14 +920,14 @@ void BagMenu_ItemPrintCallback(u8 windowId, s32 itemIndex, u8 y)
|
||||
|
||||
if (gBagPositionStruct.pocket == BERRIES_POCKET)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BERRY_CAPACITY_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
offset = GetStringRightAlignXOffset(7, gStringVar4, 119);
|
||||
BagMenu_Print(windowId, 7, gStringVar4, offset, y, 0, 0, -1, 0);
|
||||
}
|
||||
else if (gBagPositionStruct.pocket != KEYITEMS_POCKET && ItemId_GetImportance(itemId) == FALSE)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BAG_ITEM_CAPACITY_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
offset = GetStringRightAlignXOffset(7, gStringVar4, 119);
|
||||
BagMenu_Print(windowId, 7, gStringVar4, offset, y, 0, 0, -1, 0);
|
||||
@@ -1134,7 +1134,7 @@ void sub_81ABC3C(u8 a)
|
||||
|
||||
void PrintItemDepositAmount(u8 windowId, s16 numDeposited)
|
||||
{
|
||||
u8 numDigits = (gBagPositionStruct.pocket == BERRIES_POCKET) ? 3 : 2;
|
||||
u8 numDigits = (gBagPositionStruct.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS;
|
||||
ConvertIntToDecimalStringN(gStringVar1, numDeposited, STR_CONV_MODE_LEADING_ZEROS, numDigits);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 0x28), 2, 0, 0);
|
||||
@@ -1142,7 +1142,7 @@ void PrintItemDepositAmount(u8 windowId, s16 numDeposited)
|
||||
|
||||
void PrintItemSoldAmount(int windowId, int numSold, int moneyEarned)
|
||||
{
|
||||
u8 numDigits = (gBagPositionStruct.pocket == BERRIES_POCKET) ? 3 : 2;
|
||||
u8 numDigits = (gBagPositionStruct.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS;
|
||||
ConvertIntToDecimalStringN(gStringVar1, numSold, STR_CONV_MODE_LEADING_ZEROS, numDigits);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, -1, 0);
|
||||
@@ -1762,7 +1762,7 @@ void BagMenu_TossItems(u8 taskId)
|
||||
s16* data = gTasks[taskId].data;
|
||||
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0));
|
||||
BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||
@@ -1805,7 +1805,7 @@ void BagMenu_ConfirmToss(u8 taskId)
|
||||
s16* data = gTasks[taskId].data;
|
||||
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0));
|
||||
BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||
@@ -2173,7 +2173,7 @@ static void BagMenu_TryDepositItem(u8 taskId)
|
||||
else if (AddPCItem(gSpecialVar_ItemId, tItemCount) == TRUE)
|
||||
{
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_DepositedVar2Var1s);
|
||||
BagMenu_Print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
|
||||
gTasks[taskId].func = Task_ActuallyToss;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "string_util.h"
|
||||
#include "task.h"
|
||||
#include "text.h"
|
||||
#include "constants/species.h"
|
||||
#include "save.h"
|
||||
#include "mystery_gift.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "pokemon.h"
|
||||
#include "constants/items.h"
|
||||
#include "random.h"
|
||||
#include "constants/species.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
|
||||
@@ -671,28 +671,17 @@ void FadeOutBody(struct MusicPlayerInfo *mplayInfo)
|
||||
s32 i;
|
||||
struct MusicPlayerTrack *track;
|
||||
u16 fadeOV;
|
||||
#ifdef NONMATCHING
|
||||
u16 mask;
|
||||
#else
|
||||
register u16 mask asm("r2");
|
||||
#endif // NONMATCHING
|
||||
|
||||
if (mplayInfo->fadeOI == 0)
|
||||
return;
|
||||
|
||||
mplayInfo->fadeOC--;
|
||||
mask = 0xFFFF;
|
||||
|
||||
if (mplayInfo->fadeOC != 0)
|
||||
if (--mplayInfo->fadeOC != 0)
|
||||
return;
|
||||
|
||||
mplayInfo->fadeOC = mplayInfo->fadeOI;
|
||||
|
||||
if (mplayInfo->fadeOV & FADE_IN)
|
||||
{
|
||||
mplayInfo->fadeOV += (4 << FADE_VOL_SHIFT);
|
||||
|
||||
if ((u16)(mplayInfo->fadeOV & mask) >= (64 << FADE_VOL_SHIFT))
|
||||
if ((u16)(mplayInfo->fadeOV += (4 << FADE_VOL_SHIFT)) >= (64 << FADE_VOL_SHIFT))
|
||||
{
|
||||
mplayInfo->fadeOV = (64 << FADE_VOL_SHIFT);
|
||||
mplayInfo->fadeOI = 0;
|
||||
@@ -700,9 +689,7 @@ void FadeOutBody(struct MusicPlayerInfo *mplayInfo)
|
||||
}
|
||||
else
|
||||
{
|
||||
mplayInfo->fadeOV -= (4 << FADE_VOL_SHIFT);
|
||||
|
||||
if ((s16)(mplayInfo->fadeOV & mask) <= 0)
|
||||
if ((s16)(mplayInfo->fadeOV -= (4 << FADE_VOL_SHIFT)) <= 0)
|
||||
{
|
||||
i = mplayInfo->trackCount;
|
||||
track = mplayInfo->tracks;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "gpu_regs.h"
|
||||
#include "bg.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "constants/species.h"
|
||||
#include "malloc.h"
|
||||
#include "easy_chat.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "constants/items.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "constants/species.h"
|
||||
#include "text.h"
|
||||
#include "international_string_util.h"
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "bg.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "decompress.h"
|
||||
#include "event_data.h"
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "constants/maps.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
struct MatchCallState
|
||||
|
||||
+25
-26
@@ -25,7 +25,6 @@
|
||||
#include "window.h"
|
||||
#include "constants/berry.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "gba/io_reg.h"
|
||||
|
||||
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
|
||||
@@ -320,7 +319,7 @@ void sub_81D1EC0(void)
|
||||
Free(sUnknown_0203CF4C);
|
||||
}
|
||||
|
||||
void sub_81D1ED4(struct ConditionGraph *a0)
|
||||
void InitConditionGraphData(struct ConditionGraph *graph)
|
||||
{
|
||||
u8 i, j;
|
||||
|
||||
@@ -328,22 +327,22 @@ void sub_81D1ED4(struct ConditionGraph *a0)
|
||||
{
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
a0->unk64[i][j].unk0 = 0;
|
||||
a0->unk64[i][j].unk2 = 0;
|
||||
graph->unk64[i][j].unk0 = 0;
|
||||
graph->unk64[i][j].unk2 = 0;
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
a0->unk0[i][j] = 0;
|
||||
a0->unk14[i][j].unk0 = 0x9B;
|
||||
a0->unk14[i][j].unk2 = 0x5B;
|
||||
graph->stat[i][j] = 0;
|
||||
graph->unk14[i][j].unk0 = 155;
|
||||
graph->unk14[i][j].unk2 = 91;
|
||||
}
|
||||
|
||||
a0->unk12C[j].unk0 = 0;
|
||||
a0->unk12C[j].unk2 = 0;
|
||||
graph->unk12C[j].unk0 = 0;
|
||||
graph->unk12C[j].unk2 = 0;
|
||||
}
|
||||
|
||||
a0->unk354 = 0;
|
||||
a0->unk352 = 0;
|
||||
graph->unk354 = 0;
|
||||
graph->unk352 = 0;
|
||||
}
|
||||
|
||||
void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2)
|
||||
@@ -351,7 +350,7 @@ void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 *
|
||||
u16 i, j;
|
||||
s32 r5, r6;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
for (i = 0; i < FLAVOR_COUNT; i++)
|
||||
{
|
||||
r5 = arg1[i].unk0 << 8;
|
||||
r6 = ((arg2[i].unk0 - arg1[i].unk0) << 8) / 10;
|
||||
@@ -388,25 +387,25 @@ bool32 TransitionConditionGraph(struct ConditionGraph *graph)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81D20AC(struct ConditionGraph *a0)
|
||||
void InitConditionGraphState(struct ConditionGraph *graph)
|
||||
{
|
||||
a0->unk355 = 0;
|
||||
graph->state = 0;
|
||||
}
|
||||
|
||||
bool8 sub_81D20BC(struct ConditionGraph *graph)
|
||||
bool8 SetupConditionGraphScanlineParams(struct ConditionGraph *graph)
|
||||
{
|
||||
struct ScanlineEffectParams params;
|
||||
|
||||
switch (graph->unk355)
|
||||
switch (graph->state)
|
||||
{
|
||||
case 0:
|
||||
ScanlineEffect_Clear();
|
||||
graph->unk355++;
|
||||
graph->state++;
|
||||
return TRUE;
|
||||
case 1:
|
||||
params = sConditionGraphScanline;
|
||||
ScanlineEffect_SetParams(params);
|
||||
graph->unk355++;
|
||||
graph->state++;
|
||||
return FALSE;
|
||||
default:
|
||||
return FALSE;
|
||||
@@ -432,7 +431,7 @@ void sub_81D2108(struct ConditionGraph *graph)
|
||||
graph->unk354 = 0;
|
||||
}
|
||||
|
||||
void sub_81D21DC(u8 bg)
|
||||
void SetConditionGraphIOWindows(u8 bg)
|
||||
{
|
||||
u32 flags;
|
||||
|
||||
@@ -1029,23 +1028,23 @@ void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *sheen, u16
|
||||
|
||||
if (partyId != numMons)
|
||||
{
|
||||
graph->unk0[id][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL);
|
||||
graph->unk0[id][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL);
|
||||
graph->unk0[id][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL);
|
||||
graph->unk0[id][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL);
|
||||
graph->unk0[id][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL);
|
||||
graph->stat[id][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL);
|
||||
graph->stat[id][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL);
|
||||
graph->stat[id][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL);
|
||||
graph->stat[id][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL);
|
||||
graph->stat[id][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL);
|
||||
|
||||
sheen[id] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 0xFF)
|
||||
? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u
|
||||
: 9;
|
||||
|
||||
sub_81D2754(graph->unk0[id], graph->unk14[id]);
|
||||
sub_81D2754(graph->stat[id], graph->unk14[id]);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < FLAVOR_COUNT; i++)
|
||||
{
|
||||
graph->unk0[id][i] = 0;
|
||||
graph->stat[id][i] = 0;
|
||||
graph->unk14[id][i].unk0 = 155;
|
||||
graph->unk14[id][i].unk2 = 91;
|
||||
}
|
||||
|
||||
@@ -968,6 +968,10 @@ bool8 MetatileBehavior_IsDiveable(u8 metatileBehavior)
|
||||
|
||||
bool8 MetatileBehavior_IsUnableToEmerge(u8 metatileBehavior)
|
||||
{
|
||||
// BUG: The player is unintentionally able to emerge on water doors.
|
||||
// Also the narrower underwater door in the underwater tileset has the wrong metatile behavior. This causes the dive glitch.
|
||||
// To fix that add || metatileBehavior == MB_WATER_DOOR to the if statement below and
|
||||
// change the metatile behavior of the narrower water door with porymaps tileset editor.
|
||||
if (metatileBehavior == MB_NO_SURFACING
|
||||
|| metatileBehavior == MB_SEAWEED_NO_SURFACING)
|
||||
return TRUE;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "new_game.h"
|
||||
#include "mevent.h"
|
||||
#include "constants/mevent.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "constants/species.h"
|
||||
#include "bg.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "palette.h"
|
||||
|
||||
+2
-2
@@ -390,7 +390,7 @@ void sub_811FAF8(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_811FBA4(void)
|
||||
bool8 MonMarkingsMenuHandleInput(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
@@ -564,7 +564,7 @@ static void sub_811FF7C(struct Sprite *sprite)
|
||||
sprite->pos1.y = (16 * sMenu->cursorPos) + sprite->data[0];
|
||||
}
|
||||
|
||||
struct Sprite *sub_811FF94(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
struct Sprite *CreateMonMarkingsSpriteWithPal(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
{
|
||||
if (!palette)
|
||||
palette = gUnknown_0859E65C;
|
||||
|
||||
+17
-16
@@ -1,3 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "gba/gba.h"
|
||||
#include "multiboot.h"
|
||||
|
||||
@@ -435,23 +436,23 @@ static int MultiBootHandShake(struct MultiBootParam *mp)
|
||||
#undef must_data
|
||||
}
|
||||
|
||||
static NOINLINE void MultiBootWaitCycles(u32 cycles)
|
||||
NAKED
|
||||
static void MultiBootWaitCycles(u32 cycles)
|
||||
{
|
||||
asm("mov r2, pc");
|
||||
asm("lsr r2, #24");
|
||||
asm("mov r1, #12");
|
||||
asm("cmp r2, #0x02");
|
||||
asm("beq MultiBootWaitCyclesLoop");
|
||||
|
||||
asm("mov r1, #13");
|
||||
asm("cmp r2, #0x08");
|
||||
asm("beq MultiBootWaitCyclesLoop");
|
||||
|
||||
asm("mov r1, #4");
|
||||
|
||||
asm("MultiBootWaitCyclesLoop:");
|
||||
asm("sub r0, r1");
|
||||
asm("bgt MultiBootWaitCyclesLoop");
|
||||
asm_unified("\
|
||||
mov r2, pc\n\
|
||||
lsrs r2, 24\n\
|
||||
movs r1, 12\n\
|
||||
cmp r2, 2\n\
|
||||
beq MultiBootWaitCyclesLoop\n\
|
||||
movs r1, 13\n\
|
||||
cmp r2, 8\n\
|
||||
beq MultiBootWaitCyclesLoop\n\
|
||||
movs r1, 4\n\
|
||||
MultiBootWaitCyclesLoop:\n\
|
||||
subs r0, r1\n\
|
||||
bgt MultiBootWaitCyclesLoop\n\
|
||||
bx lr\n");
|
||||
}
|
||||
|
||||
static void MultiBootWaitSendDone(void)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_size_record.h"
|
||||
#include "script.h"
|
||||
#include "constants/species.h"
|
||||
#include "strings.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
#include "constants/maps.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainer_hill.h"
|
||||
#include "constants/weather.h"
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
#include "constants/party_menu.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#define PARTY_PAL_SELECTED (1 << 0)
|
||||
#define PARTY_PAL_FAINTED (1 << 1)
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "trig.h"
|
||||
#include "util.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "window.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#define AREA_SCREEN_WIDTH 32
|
||||
#define AREA_SCREEN_HEIGHT 20
|
||||
|
||||
+11
-8
@@ -44,7 +44,6 @@
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
|
||||
struct SpeciesItem
|
||||
@@ -2837,9 +2836,9 @@ void CalculateMonStats(struct Pokemon *mon)
|
||||
newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10;
|
||||
}
|
||||
|
||||
gBattleScripting.field_23 = newMaxHP - oldMaxHP;
|
||||
if (gBattleScripting.field_23 == 0)
|
||||
gBattleScripting.field_23 = 1;
|
||||
gBattleScripting.levelUpHP = newMaxHP - oldMaxHP;
|
||||
if (gBattleScripting.levelUpHP == 0)
|
||||
gBattleScripting.levelUpHP = 1;
|
||||
|
||||
SetMonData(mon, MON_DATA_MAX_HP, &newMaxHP);
|
||||
|
||||
@@ -2861,6 +2860,8 @@ void CalculateMonStats(struct Pokemon *mon)
|
||||
if (currentHP == 0 && oldMaxHP == 0)
|
||||
currentHP = newMaxHP;
|
||||
else if (currentHP != 0)
|
||||
// BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch.
|
||||
// To fix that set currentHP = 1 if currentHP <= 0.
|
||||
currentHP += newMaxHP - oldMaxHP;
|
||||
else
|
||||
return;
|
||||
@@ -4911,19 +4912,21 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Get amount of HP to restore
|
||||
dataUnsigned = itemEffect[var_3C++];
|
||||
switch (dataUnsigned)
|
||||
{
|
||||
case 0xFF:
|
||||
case ITEM6_HEAL_FULL:
|
||||
dataUnsigned = GetMonData(mon, MON_DATA_MAX_HP, NULL) - GetMonData(mon, MON_DATA_HP, NULL);
|
||||
break;
|
||||
case 0xFE:
|
||||
case ITEM6_HEAL_HALF:
|
||||
dataUnsigned = GetMonData(mon, MON_DATA_MAX_HP, NULL) / 2;
|
||||
if (dataUnsigned == 0)
|
||||
dataUnsigned = 1;
|
||||
break;
|
||||
case 0xFD:
|
||||
dataUnsigned = gBattleScripting.field_23;
|
||||
case ITEM6_HEAL_LVL_UP:
|
||||
dataUnsigned = gBattleScripting.levelUpHP;
|
||||
break;
|
||||
}
|
||||
if (GetMonData(mon, MON_DATA_MAX_HP, NULL) != GetMonData(mon, MON_DATA_HP, NULL))
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "util.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct UnkAnimStruct
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "palette.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "sprite.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#define POKE_ICON_BASE_PAL_TAG 56000
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "pokemon_jump.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct PokemonJump1_MonInfo
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "pokemon_size_record.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#define DEFAULT_MAX_SIZE 0x8000 // was 0x8100 in Ruby/Sapphire
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct WallpaperTable
|
||||
{
|
||||
@@ -3184,7 +3183,7 @@ static void Cb_ShowMarkMenu(u8 taskId)
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 1:
|
||||
if (!sub_811FBA4())
|
||||
if (!MonMarkingsMenuHandleInput())
|
||||
{
|
||||
sub_811FAF8();
|
||||
ClearBottomWindow();
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
// Screen titles (upper left)
|
||||
#define PSS_LABEL_WINDOW_POKEMON_INFO_TITLE 0
|
||||
@@ -3977,7 +3976,7 @@ static void StopPokemonAnimations(void) // A subtle effect, this function stops
|
||||
|
||||
static void CreateMonMarkingsSprite(struct Pokemon *mon)
|
||||
{
|
||||
struct Sprite *sprite = sub_811FF94(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sSummaryMarkingsPalette);
|
||||
struct Sprite *sprite = CreateMonMarkingsSpriteWithPal(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sSummaryMarkingsPalette);
|
||||
|
||||
sMonSummaryScreen->markingsSprite = sprite;
|
||||
if (sprite != NULL)
|
||||
|
||||
+76
-78
@@ -14,8 +14,6 @@
|
||||
#define LOOPED_TASK_PRIMARY_ID(taskId) (taskId & 0xFFFF)
|
||||
#define LOOPED_TASK_SECONDARY_ID(taskId) (taskId >> 16)
|
||||
|
||||
#define SUBSTRUCT_COUNT 19
|
||||
|
||||
struct PokenavResources
|
||||
{
|
||||
u32 (*currentMenuCb1)(void);
|
||||
@@ -23,7 +21,7 @@ struct PokenavResources
|
||||
u16 mode;
|
||||
u16 conditionSearchId;
|
||||
bool32 hasAnyRibbons;
|
||||
void *field10[SUBSTRUCT_COUNT];
|
||||
void *substructPtrs[POKENAV_SUBSTRUCT_COUNT];
|
||||
};
|
||||
|
||||
struct PokenavCallbacks
|
||||
@@ -38,7 +36,7 @@ struct PokenavCallbacks
|
||||
};
|
||||
|
||||
static u32 GetCurrentMenuCB(void);
|
||||
static u32 sub_81C75D4(void);
|
||||
static u32 IsActiveMenuLoopTaskActive_(void);
|
||||
static bool32 SetActivePokenavMenu(u32 menuId);
|
||||
static bool32 AnyMonHasRibbon(void);
|
||||
static void InitPokenavResources(struct PokenavResources *a0);
|
||||
@@ -126,43 +124,43 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] =
|
||||
},
|
||||
[POKENAV_CONDITION_PARTY - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
.init = PokenavCallback_Init_7,
|
||||
.callback = sub_81CD070,
|
||||
.open = sub_81CDDD4,
|
||||
.createLoopTask = sub_81CDE2C,
|
||||
.isLoopTaskActive = sub_81CDE64,
|
||||
.free1 = sub_81CD1C0,
|
||||
.free2 = sub_81CECA0,
|
||||
.init = PokenavCallback_Init_PartyCondition,
|
||||
.callback = GetPartyConditionCallback,
|
||||
.open = OpenPartyConditionMenu,
|
||||
.createLoopTask = CreatePartyConditionLoopedTask,
|
||||
.isLoopTaskActive = IsPartyConditionLoopedTaskActive,
|
||||
.free1 = FreePartyConditionSubstruct1,
|
||||
.free2 = FreePartyConditionSubstruct2,
|
||||
},
|
||||
[POKENAV_CONDITION_SEARCH_RESULTS - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
.init = PokenavCallback_Init_8,
|
||||
.callback = sub_81CEFDC,
|
||||
.open = sub_81CF330,
|
||||
.createLoopTask = sub_81CF3A0,
|
||||
.isLoopTaskActive = sub_81CF3D0,
|
||||
.free1 = sub_81CEFF0,
|
||||
.free2 = sub_81CF3F8,
|
||||
.init = PokenavCallback_Init_ConditionSearch,
|
||||
.callback = GetConditionSearchResultsCallback,
|
||||
.open = OpenConditionSearchResults,
|
||||
.createLoopTask = CreateSearchResultsLoopedTask,
|
||||
.isLoopTaskActive = IsSearchResultLoopedTaskActive,
|
||||
.free1 = FreeSearchResultSubstruct1,
|
||||
.free2 = FreeSearchResultSubstruct2,
|
||||
},
|
||||
[POKENAV_MENU_9 - POKENAV_MENU_IDS_START] =
|
||||
[POKENAV_CONDITION_GRAPH_FROM_SEARCH - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
.init = PokenavCallback_Init_9,
|
||||
.callback = sub_81CD070,
|
||||
.open = sub_81CDDD4,
|
||||
.createLoopTask = sub_81CDE2C,
|
||||
.isLoopTaskActive = sub_81CDE64,
|
||||
.free1 = sub_81CD1C0,
|
||||
.free2 = sub_81CECA0,
|
||||
.init = PokenavCallback_Init_ConditionGraphFromSearch,
|
||||
.callback = GetPartyConditionCallback,
|
||||
.open = OpenPartyConditionMenu,
|
||||
.createLoopTask = CreatePartyConditionLoopedTask,
|
||||
.isLoopTaskActive = IsPartyConditionLoopedTaskActive,
|
||||
.free1 = FreePartyConditionSubstruct1,
|
||||
.free2 = FreePartyConditionSubstruct2,
|
||||
},
|
||||
[POKENAV_MENU_A - POKENAV_MENU_IDS_START] =
|
||||
[POKENAV_RETURN_CONDITION_SEARCH - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
.init = PokenavCallback_Init_10,
|
||||
.callback = sub_81CEFDC,
|
||||
.open = sub_81CF368,
|
||||
.createLoopTask = sub_81CF3A0,
|
||||
.isLoopTaskActive = sub_81CF3D0,
|
||||
.free1 = sub_81CEFF0,
|
||||
.free2 = sub_81CF3F8,
|
||||
.init = PokenavCallback_Init_ReturnToMonSearchList,
|
||||
.callback = GetConditionSearchResultsCallback,
|
||||
.open = OpenConditionSearchListFromGraph,
|
||||
.createLoopTask = CreateSearchResultsLoopedTask,
|
||||
.isLoopTaskActive = IsSearchResultLoopedTaskActive,
|
||||
.free1 = FreeSearchResultSubstruct1,
|
||||
.free2 = FreeSearchResultSubstruct2,
|
||||
},
|
||||
[POKENAV_MATCH_CALL - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
@@ -176,33 +174,33 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] =
|
||||
},
|
||||
[POKENAV_RIBBONS_MON_LIST - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
.init = PokenavCallback_Init_12,
|
||||
.callback = sub_81CFA34,
|
||||
.open = sub_81CFDD0,
|
||||
.createLoopTask = sub_81CFE40,
|
||||
.isLoopTaskActive = sub_81CFE70,
|
||||
.free1 = sub_81CFA48,
|
||||
.free2 = sub_81CFE98,
|
||||
.init = PokenavCallback_Init_MonRibbonList,
|
||||
.callback = GetRibbonsMonListCallback,
|
||||
.open = OpenRibbonsMonList,
|
||||
.createLoopTask = CreateRibbonsMonListLoopedTask,
|
||||
.isLoopTaskActive = IsRibbonsMonListLoopedTaskActive,
|
||||
.free1 = FreeRibbonsMonList1,
|
||||
.free2 = FreeRibbonsMonList2,
|
||||
},
|
||||
[POKENAV_MENU_D - POKENAV_MENU_IDS_START] =
|
||||
[POKENAV_RIBBONS_SUMMARY_SCREEN - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
.init = PokenavCallback_Init_13,
|
||||
.callback = sub_81D04A0,
|
||||
.open = sub_81D0978,
|
||||
.createLoopTask = sub_81D09B0,
|
||||
.isLoopTaskActive = sub_81D09E0,
|
||||
.free1 = sub_81D04B8,
|
||||
.free2 = sub_81D09F4,
|
||||
.init = PokenavCallback_Init_RibbonsSummaryMenu,
|
||||
.callback = GetRibbonsSummaryMenuCallback,
|
||||
.open = OpenRibbonsSummaryMenu,
|
||||
.createLoopTask = CreateRibbonsSummaryLoopedTask,
|
||||
.isLoopTaskActive = IsRibbonsSummaryLoopedTaskActive,
|
||||
.free1 = FreeRibbonsSummaryScreen1,
|
||||
.free2 = FreeRibbonsSummaryScreen2,
|
||||
},
|
||||
[POKENAV_MENU_E - POKENAV_MENU_IDS_START] =
|
||||
[POKENAV_RIBBONS_RETURN_TO_MON_LIST - POKENAV_MENU_IDS_START] =
|
||||
{
|
||||
.init = PokenavCallback_Init_14,
|
||||
.callback = sub_81CFA34,
|
||||
.open = sub_81CFE08,
|
||||
.createLoopTask = sub_81CFE40,
|
||||
.isLoopTaskActive = sub_81CFE70,
|
||||
.free1 = sub_81CFA48,
|
||||
.free2 = sub_81CFE98,
|
||||
.init = PokenavCallback_Init_RibbonsMonListFromSummary,
|
||||
.callback = GetRibbonsMonListCallback,
|
||||
.open = OpenRibbonsMonListFromRibbonsSummary,
|
||||
.createLoopTask = CreateRibbonsMonListLoopedTask,
|
||||
.isLoopTaskActive = IsRibbonsMonListLoopedTaskActive,
|
||||
.free1 = FreeRibbonsMonList1,
|
||||
.free2 = FreeRibbonsMonList2,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -368,24 +366,24 @@ static void FreePokenavResources(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SUBSTRUCT_COUNT; i++)
|
||||
for (i = 0; i < POKENAV_SUBSTRUCT_COUNT; i++)
|
||||
FreePokenavSubstruct(i);
|
||||
|
||||
FREE_AND_SET_NULL(gPokenavResources);
|
||||
InitKeys();
|
||||
}
|
||||
|
||||
static void InitPokenavResources(struct PokenavResources *a0)
|
||||
static void InitPokenavResources(struct PokenavResources *resources)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SUBSTRUCT_COUNT; i++)
|
||||
a0->field10[i] = NULL;
|
||||
for (i = 0; i < POKENAV_SUBSTRUCT_COUNT; i++)
|
||||
resources->substructPtrs[i] = NULL;
|
||||
|
||||
a0->mode = POKENAV_MODE_NORMAL;
|
||||
a0->currentMenuIndex = 0;
|
||||
a0->hasAnyRibbons = AnyMonHasRibbon();
|
||||
a0->currentMenuCb1 = NULL;
|
||||
resources->mode = POKENAV_MODE_NORMAL;
|
||||
resources->currentMenuIndex = 0;
|
||||
resources->hasAnyRibbons = AnyMonHasRibbon();
|
||||
resources->currentMenuCb1 = NULL;
|
||||
}
|
||||
|
||||
static bool32 AnyMonHasRibbon(void)
|
||||
@@ -453,12 +451,12 @@ static void Task_Pokenav(u8 taskId)
|
||||
tState = 4;
|
||||
break;
|
||||
case 2:
|
||||
if (sub_81C786C())
|
||||
if (IsActiveMenuLoopTaskActive())
|
||||
break;
|
||||
tState = 3;
|
||||
case 3:
|
||||
menuId = GetCurrentMenuCB();
|
||||
if (menuId == -1)
|
||||
if (menuId == POKENAV_MENU_FUNC_EXIT)
|
||||
{
|
||||
ShutdownPokenav();
|
||||
tState = 5;
|
||||
@@ -479,13 +477,13 @@ static void Task_Pokenav(u8 taskId)
|
||||
}
|
||||
else if (menuId != 0)
|
||||
{
|
||||
sub_81C7850(menuId);
|
||||
if (sub_81C786C())
|
||||
RunMainMenuLoopedTask(menuId);
|
||||
if (IsActiveMenuLoopTaskActive())
|
||||
tState = 2;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (!sub_81C75D4())
|
||||
if (!IsActiveMenuLoopTaskActive_())
|
||||
tState = 3;
|
||||
break;
|
||||
case 5:
|
||||
@@ -516,15 +514,15 @@ static bool32 SetActivePokenavMenu(u32 menuId)
|
||||
if (!PokenavMenuCallbacks[index].open())
|
||||
return FALSE;
|
||||
|
||||
sub_81C7834(PokenavMenuCallbacks[index].createLoopTask, PokenavMenuCallbacks[index].isLoopTaskActive);
|
||||
SetActiveMenuLoopTasks(PokenavMenuCallbacks[index].createLoopTask, PokenavMenuCallbacks[index].isLoopTaskActive);
|
||||
gPokenavResources->currentMenuCb1 = PokenavMenuCallbacks[index].callback;
|
||||
gPokenavResources->currentMenuIndex = index;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static u32 sub_81C75D4(void)
|
||||
static u32 IsActiveMenuLoopTaskActive_(void)
|
||||
{
|
||||
return sub_81C786C();
|
||||
return IsActiveMenuLoopTaskActive();
|
||||
}
|
||||
|
||||
static u32 GetCurrentMenuCB(void)
|
||||
@@ -549,19 +547,19 @@ void SetPokenavVBlankCallback(void)
|
||||
|
||||
void *AllocSubstruct(u32 index, u32 size)
|
||||
{
|
||||
gPokenavResources->field10[index] = Alloc(size);
|
||||
return gPokenavResources->field10[index];
|
||||
gPokenavResources->substructPtrs[index] = Alloc(size);
|
||||
return gPokenavResources->substructPtrs[index];
|
||||
}
|
||||
|
||||
void *GetSubstructPtr(u32 index)
|
||||
{
|
||||
return gPokenavResources->field10[index];
|
||||
return gPokenavResources->substructPtrs[index];
|
||||
}
|
||||
|
||||
void FreePokenavSubstruct(u32 index)
|
||||
{
|
||||
if (gPokenavResources->field10[index] != NULL)
|
||||
FREE_AND_SET_NULL(gPokenavResources->field10[index]);
|
||||
if (gPokenavResources->substructPtrs[index] != NULL)
|
||||
FREE_AND_SET_NULL(gPokenavResources->substructPtrs[index]);
|
||||
}
|
||||
|
||||
u32 GetPokenavMode(void)
|
||||
|
||||
+222
-223
@@ -12,105 +12,104 @@
|
||||
#include "strings.h"
|
||||
#include "text.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct PokenavSub11
|
||||
{
|
||||
u32 monPal[3][0x20];
|
||||
u8 fill[0x180];
|
||||
u32 monPicGfx[3][0x800];
|
||||
u8 unk6300;
|
||||
s16 unk6302;
|
||||
u32 (*unk6304)(struct PokenavSub11 *);
|
||||
u8 searchMode;
|
||||
s16 monIndex;
|
||||
u32 (*callback)(struct PokenavSub11 *);
|
||||
u8 fill2[0x6320 - 0x6308];
|
||||
u8 unk6320[3][24];
|
||||
u8 unk6368[3][64];
|
||||
struct ConditionGraph unk6428;
|
||||
u8 unk6780[3];
|
||||
u8 unk6783[3];
|
||||
s8 unk6786;
|
||||
u8 searchLocBuffer[3][24];
|
||||
u8 nameBuffer[3][64];
|
||||
struct ConditionGraph conditionData;
|
||||
u8 sheen[3];
|
||||
u8 monMarks[3];
|
||||
s8 mark;
|
||||
s8 unk6787;
|
||||
s8 unk6788;
|
||||
s8 unk6789;
|
||||
u8 unk678A;
|
||||
u8 state;
|
||||
};
|
||||
|
||||
void sub_81CD970(void);
|
||||
void InitPartyConditionListParameters(void);
|
||||
void sub_81CD9F8(void);
|
||||
u32 sub_81CD08C(struct PokenavSub11 *structPtr);
|
||||
u32 sub_81CD19C(struct PokenavSub11 *structPtr);
|
||||
u32 sub_81CD110(struct PokenavSub11 *structPtr);
|
||||
u8 sub_81CD1E4(struct PokenavSub11 *structPtr);
|
||||
u8 sub_81CD258(u8 arg0);
|
||||
void sub_81CD824(s16 arg0, u8 arg1);
|
||||
void sub_81CDA1C(s16 arg0, u8 arg1);
|
||||
void sub_81CDB98(s16 arg0, u8 arg1);
|
||||
u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr);
|
||||
u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr);
|
||||
u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr);
|
||||
u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr);
|
||||
u8 SwitchConditionSummaryIndex(u8 moveUp);
|
||||
void CopyMonNameGenderLocation(s16 id, u8 arg1);
|
||||
void GetMonConditionGraphData(s16 id, u8 arg1);
|
||||
void ConditionGraphDrawMonPic(s16 id, u8 arg1);
|
||||
|
||||
// code
|
||||
bool32 PokenavCallback_Init_7(void)
|
||||
bool32 PokenavCallback_Init_PartyCondition(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = AllocSubstruct(11, sizeof(struct PokenavSub11));
|
||||
struct PokenavSub11 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH, sizeof(struct PokenavSub11));
|
||||
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
sub_81D1ED4(&structPtr->unk6428);
|
||||
sub_81CD970();
|
||||
InitConditionGraphData(&structPtr->conditionData);
|
||||
InitPartyConditionListParameters();
|
||||
gKeyRepeatStartDelay = 20;
|
||||
structPtr->unk6304 = sub_81CD08C;
|
||||
structPtr->callback = HandlePartyConditionInput;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_9(void)
|
||||
bool32 PokenavCallback_Init_ConditionGraphFromSearch(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = AllocSubstruct(11, sizeof(struct PokenavSub11));
|
||||
struct PokenavSub11 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH, sizeof(struct PokenavSub11));
|
||||
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
sub_81D1ED4(&structPtr->unk6428);
|
||||
InitConditionGraphData(&structPtr->conditionData);
|
||||
sub_81CD9F8();
|
||||
gKeyRepeatStartDelay = 20;
|
||||
structPtr->unk6304 = sub_81CD08C;
|
||||
structPtr->callback = HandlePartyConditionInput;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_81CD070(void)
|
||||
u32 GetPartyConditionCallback(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
|
||||
return structPtr->unk6304(structPtr);
|
||||
return structPtr->callback(structPtr);
|
||||
}
|
||||
|
||||
u32 sub_81CD08C(struct PokenavSub11 *structPtr)
|
||||
u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr)
|
||||
{
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
u32 ret = sub_81CD1E4(structPtr);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
u32 ret = ConditionGraphHandleDpadInput(structPtr);
|
||||
|
||||
if (ret == 0)
|
||||
if (ret == PARTY_CONDITION_FUNC_NONE)
|
||||
{
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
structPtr->unk6304 = sub_81CD19C;
|
||||
ret = 2;
|
||||
structPtr->callback = GetConditionReturnCallback;
|
||||
ret = PARTY_CONDITION_FUNC_RETURN;
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
if (structPtr->unk6300 == 0)
|
||||
if (structPtr->searchMode == 0)
|
||||
{
|
||||
if (unkPtr->unk2 == unkPtr->unk0 - 1)
|
||||
if (monListPtr->currIndex == monListPtr->listCount - 1)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
structPtr->unk6304 = sub_81CD19C;
|
||||
ret = 2;
|
||||
structPtr->callback = GetConditionReturnCallback;
|
||||
ret = PARTY_CONDITION_FUNC_RETURN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
ret = 5;
|
||||
structPtr->unk6304 = sub_81CD110;
|
||||
ret = PARTY_CONDITION_FUNC_ADD_MARKINGS;
|
||||
structPtr->callback = ConditionMenu_OpenMarkingsMenu;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,204 +117,204 @@ u32 sub_81CD08C(struct PokenavSub11 *structPtr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 sub_81CD110(struct PokenavSub11 *structPtr)
|
||||
u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr)
|
||||
{
|
||||
struct PokenavSub18 *unkPtr;
|
||||
struct PokenavSub18 *monListPtr;
|
||||
u8 markings;
|
||||
u32 ret = 0, boxId, monId;
|
||||
u32 ret = PARTY_CONDITION_FUNC_NONE, boxId, monId;
|
||||
|
||||
if (!sub_811FBA4())
|
||||
if (!MonMarkingsMenuHandleInput())
|
||||
{
|
||||
structPtr->unk6783[structPtr->unk6786] = sub_81CEF14();
|
||||
unkPtr = GetSubstructPtr(18);
|
||||
boxId = unkPtr->unk4[unkPtr->unk2].boxId;
|
||||
monId = unkPtr->unk4[unkPtr->unk2].monId;
|
||||
markings = structPtr->unk6783[structPtr->unk6786];
|
||||
structPtr->monMarks[structPtr->mark] = GetMonMarkingsData();
|
||||
monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
boxId = monListPtr->monData[monListPtr->currIndex].boxId;
|
||||
monId = monListPtr->monData[monListPtr->currIndex].monId;
|
||||
markings = structPtr->monMarks[structPtr->mark];
|
||||
|
||||
if (boxId == TOTAL_BOXES_COUNT)
|
||||
SetMonData(&gPlayerParty[monId], MON_DATA_MARKINGS, &markings);
|
||||
else
|
||||
SetBoxMonDataAt(boxId, monId, MON_DATA_MARKINGS, &markings);
|
||||
|
||||
structPtr->unk6304 = sub_81CD08C;
|
||||
ret = 6;
|
||||
structPtr->callback = HandlePartyConditionInput;
|
||||
ret = PARTY_CONDITION_FUNC_CLOSE_MARKINGS;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 sub_81CD19C(struct PokenavSub11 *structPtr)
|
||||
u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr)
|
||||
{
|
||||
if (structPtr->unk6300 == 0)
|
||||
if (structPtr->searchMode == 0)
|
||||
return POKENAV_CONDITION_MENU;
|
||||
else
|
||||
return POKENAV_MENU_A;
|
||||
return POKENAV_RETURN_CONDITION_SEARCH;
|
||||
}
|
||||
|
||||
void sub_81CD1C0(void)
|
||||
void FreePartyConditionSubstruct1(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
if (structPtr->unk6300 == 0)
|
||||
FreePokenavSubstruct(18);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
if (structPtr->searchMode == 0)
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
FreePokenavSubstruct(11);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
}
|
||||
|
||||
u8 sub_81CD1E4(struct PokenavSub11 *structPtr)
|
||||
u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr)
|
||||
{
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
u8 ret = 0;
|
||||
|
||||
if (gMain.heldKeys & DPAD_UP)
|
||||
{
|
||||
if (structPtr->unk6300 == 0 || unkPtr->unk2 != 0)
|
||||
if (structPtr->searchMode == 0 || monListPtr->currIndex != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
ret = sub_81CD258(1);
|
||||
ret = SwitchConditionSummaryIndex(1);
|
||||
}
|
||||
}
|
||||
else if (gMain.heldKeys & DPAD_DOWN)
|
||||
{
|
||||
if (structPtr->unk6300 == 0 || unkPtr->unk2 < unkPtr->unk0 - 1)
|
||||
if (structPtr->searchMode == 0 || monListPtr->currIndex < monListPtr->listCount - 1)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
ret = sub_81CD258(0);
|
||||
ret = SwitchConditionSummaryIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 sub_81CD258(u8 arg0)
|
||||
u8 SwitchConditionSummaryIndex(u8 moveUp)
|
||||
{
|
||||
u16 r7;
|
||||
bool8 r6, r0;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
bool8 wasNotLastMon, isNotLastMon;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
r7 = (arg0) ? structPtr->unk6788 : structPtr->unk6787;
|
||||
sub_81D1F84(&structPtr->unk6428, structPtr->unk6428.unk14[structPtr->unk6786], structPtr->unk6428.unk14[r7]);
|
||||
r6 = (unkPtr->unk2 != ((sub_81CDD5C() != 0) ? unkPtr->unk0 : unkPtr->unk0 - 1));
|
||||
if (arg0)
|
||||
r7 = (moveUp) ? structPtr->unk6788 : structPtr->unk6787;
|
||||
sub_81D1F84(&structPtr->conditionData, structPtr->conditionData.unk14[structPtr->mark], structPtr->conditionData.unk14[r7]);
|
||||
wasNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1));
|
||||
if (moveUp)
|
||||
{
|
||||
structPtr->unk6788 = structPtr->unk6787;
|
||||
structPtr->unk6787 = structPtr->unk6786;
|
||||
structPtr->unk6786 = r7;
|
||||
structPtr->unk6787 = structPtr->mark;
|
||||
structPtr->mark = r7;
|
||||
structPtr->unk6789 = structPtr->unk6788;
|
||||
|
||||
unkPtr->unk2 = (unkPtr->unk2 == 0) ? unkPtr->unk0 - 1 : unkPtr->unk2 - 1;
|
||||
structPtr->unk6302 = (unkPtr->unk2 != 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1;
|
||||
monListPtr->currIndex = (monListPtr->currIndex == 0) ? monListPtr->listCount - 1 : monListPtr->currIndex - 1;
|
||||
structPtr->monIndex = (monListPtr->currIndex != 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
structPtr->unk6787 = structPtr->unk6788;
|
||||
structPtr->unk6788 = structPtr->unk6786;
|
||||
structPtr->unk6786 = r7;
|
||||
structPtr->unk6788 = structPtr->mark;
|
||||
structPtr->mark = r7;
|
||||
structPtr->unk6789 = structPtr->unk6787;
|
||||
|
||||
unkPtr->unk2 = (unkPtr->unk2 < unkPtr->unk0 - 1) ? unkPtr->unk2 + 1 : 0;
|
||||
structPtr->unk6302 = (unkPtr->unk2 < unkPtr->unk0 - 1) ? unkPtr->unk2 + 1 : 0;
|
||||
monListPtr->currIndex = (monListPtr->currIndex < monListPtr->listCount - 1) ? monListPtr->currIndex + 1 : 0;
|
||||
structPtr->monIndex = (monListPtr->currIndex < monListPtr->listCount - 1) ? monListPtr->currIndex + 1 : 0;
|
||||
}
|
||||
|
||||
r0 = (unkPtr->unk2 != ((sub_81CDD5C() != 0) ? unkPtr->unk0 : unkPtr->unk0 - 1));
|
||||
|
||||
if (!r6)
|
||||
return 3;
|
||||
else if (!r0)
|
||||
return 4;
|
||||
isNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1));
|
||||
|
||||
if (!wasNotLastMon)
|
||||
return PARTY_CONDITION_FUNC_NO_TRANSITION;
|
||||
else if (!isNotLastMon)
|
||||
return PARTY_CONDITION_FUNC_SLIDE_MON_OUT;
|
||||
else
|
||||
return 1;
|
||||
return PARTY_CONDITION_FUNC_SLIDE_MON_IN;
|
||||
}
|
||||
|
||||
bool32 sub_81CD3C4(void)
|
||||
bool32 LoadPartyConditionMenuGfx(void)
|
||||
{
|
||||
s32 var;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
switch (structPtr->unk678A)
|
||||
switch (structPtr->state)
|
||||
{
|
||||
case 0:
|
||||
sub_81CD824(unkPtr->unk2, 0);
|
||||
CopyMonNameGenderLocation(monListPtr->currIndex, 0);
|
||||
break;
|
||||
case 1:
|
||||
sub_81CDA1C(unkPtr->unk2, 0);
|
||||
GetMonConditionGraphData(monListPtr->currIndex, 0);
|
||||
break;
|
||||
case 2:
|
||||
sub_81CDB98(unkPtr->unk2, 0);
|
||||
ConditionGraphDrawMonPic(monListPtr->currIndex, 0);
|
||||
break;
|
||||
case 3:
|
||||
if (unkPtr->unk0 == 1)
|
||||
if (monListPtr->listCount == 1)
|
||||
{
|
||||
structPtr->unk6786 = 0;
|
||||
structPtr->mark = 0;
|
||||
structPtr->unk6787 = 0;
|
||||
structPtr->unk6788 = 0;
|
||||
structPtr->unk678A = 0;
|
||||
structPtr->state = 0;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
structPtr->unk6786 = 0;
|
||||
structPtr->mark = 0;
|
||||
structPtr->unk6787 = 1;
|
||||
structPtr->unk6788 = 2;
|
||||
}
|
||||
break;
|
||||
// These were probably ternaries just like cases 7-9, but couldn't match it any other way.
|
||||
case 4:
|
||||
var = unkPtr->unk2 + 1;
|
||||
if (var >= unkPtr->unk0)
|
||||
var = monListPtr->currIndex + 1;
|
||||
if (var >= monListPtr->listCount)
|
||||
var = 0;
|
||||
sub_81CD824(var, 1);
|
||||
CopyMonNameGenderLocation(var, 1);
|
||||
break;
|
||||
case 5:
|
||||
var = unkPtr->unk2 + 1;
|
||||
if (var >= unkPtr->unk0)
|
||||
var = monListPtr->currIndex + 1;
|
||||
if (var >= monListPtr->listCount)
|
||||
var = 0;
|
||||
sub_81CDA1C(var, 1);
|
||||
GetMonConditionGraphData(var, 1);
|
||||
break;
|
||||
case 6:
|
||||
var = unkPtr->unk2 + 1;
|
||||
if (var >= unkPtr->unk0)
|
||||
var = monListPtr->currIndex + 1;
|
||||
if (var >= monListPtr->listCount)
|
||||
var = 0;
|
||||
sub_81CDB98(var, 1);
|
||||
ConditionGraphDrawMonPic(var, 1);
|
||||
break;
|
||||
case 7:
|
||||
sub_81CD824((unkPtr->unk2 - 1 >= 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1, 2);
|
||||
CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
|
||||
break;
|
||||
case 8:
|
||||
sub_81CDA1C((unkPtr->unk2 - 1 >= 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1, 2);
|
||||
GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
|
||||
break;
|
||||
case 9:
|
||||
sub_81CDB98((unkPtr->unk2 - 1 >= 0) ? unkPtr->unk2 - 1 : unkPtr->unk0 - 1, 2);
|
||||
structPtr->unk678A = 0;
|
||||
ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
|
||||
structPtr->state = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
structPtr->unk678A++;
|
||||
structPtr->state++;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_81CD548(u8 arg0)
|
||||
bool32 SetConditionGraphData(u8 mode)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
|
||||
switch (arg0)
|
||||
switch (mode)
|
||||
{
|
||||
case 0:
|
||||
sub_81CD824(structPtr->unk6302, structPtr->unk6789);
|
||||
CopyMonNameGenderLocation(structPtr->monIndex, structPtr->unk6789);
|
||||
break;
|
||||
case 1:
|
||||
sub_81CDA1C(structPtr->unk6302, structPtr->unk6789);
|
||||
GetMonConditionGraphData(structPtr->monIndex, structPtr->unk6789);
|
||||
break;
|
||||
case 2:
|
||||
sub_81CDB98(structPtr->unk6302, structPtr->unk6789);
|
||||
ConditionGraphDrawMonPic(structPtr->monIndex, structPtr->unk6789);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u8 *sub_81CD5CC(u8 *dst, const u8 *src, s16 n)
|
||||
u8 *CopyStringLeftAlignedToConditionData(u8 *dst, const u8 *src, s16 n)
|
||||
{
|
||||
while (*src != EOS)
|
||||
*dst++ = *src++, n--;
|
||||
@@ -327,15 +326,15 @@ u8 *sub_81CD5CC(u8 *dst, const u8 *src, s16 n)
|
||||
return dst;
|
||||
}
|
||||
|
||||
u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3)
|
||||
u8 *CopyMonConditionNameGender(u8 *str, u16 id, bool8 arg3)
|
||||
{
|
||||
u16 boxId, monId, gender, species, level, lvlDigits;
|
||||
struct BoxPokemon *boxMon;
|
||||
u8 *txtPtr, *str_;
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
boxId = unkPtr->unk4[id].boxId;
|
||||
monId = unkPtr->unk4[id].monId;
|
||||
boxId = monListPtr->monData[id].boxId;
|
||||
monId = monListPtr->monData[id].monId;
|
||||
*(str++) = EXT_CTRL_CODE_BEGIN;
|
||||
*(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
|
||||
*(str++) = TEXT_COLOR_BLUE;
|
||||
@@ -418,115 +417,115 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3)
|
||||
return str_;
|
||||
}
|
||||
|
||||
void sub_81CD824(s16 arg0, u8 arg1)
|
||||
void CopyMonNameGenderLocation(s16 id, u8 arg1)
|
||||
{
|
||||
u16 boxId, i;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
if (arg0 != (sub_81CDD5C() != 0 ? unkPtr->unk0 : unkPtr->unk0 - 1))
|
||||
if (id != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1))
|
||||
{
|
||||
sub_81CD624(structPtr->unk6368[arg1], arg0, FALSE);
|
||||
boxId = unkPtr->unk4[arg0].boxId;
|
||||
structPtr->unk6320[arg1][0] = EXT_CTRL_CODE_BEGIN;
|
||||
structPtr->unk6320[arg1][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
|
||||
structPtr->unk6320[arg1][2] = TEXT_COLOR_BLUE;
|
||||
structPtr->unk6320[arg1][3] = TEXT_COLOR_TRANSPARENT;
|
||||
structPtr->unk6320[arg1][4] = TEXT_COLOR_LIGHT_BLUE;
|
||||
CopyMonConditionNameGender(structPtr->nameBuffer[arg1], id, FALSE);
|
||||
boxId = monListPtr->monData[id].boxId;
|
||||
structPtr->searchLocBuffer[arg1][0] = EXT_CTRL_CODE_BEGIN;
|
||||
structPtr->searchLocBuffer[arg1][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
|
||||
structPtr->searchLocBuffer[arg1][2] = TEXT_COLOR_BLUE;
|
||||
structPtr->searchLocBuffer[arg1][3] = TEXT_COLOR_TRANSPARENT;
|
||||
structPtr->searchLocBuffer[arg1][4] = TEXT_COLOR_LIGHT_BLUE;
|
||||
if (boxId == TOTAL_BOXES_COUNT)
|
||||
sub_81CD5CC(&structPtr->unk6320[arg1][5], gText_InParty, 8);
|
||||
CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], gText_InParty, 8);
|
||||
else
|
||||
sub_81CD5CC(&structPtr->unk6320[arg1][5], GetBoxNamePtr(boxId), 8);
|
||||
CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], GetBoxNamePtr(boxId), 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 12; i++)
|
||||
structPtr->unk6368[arg1][i] = CHAR_SPACE;
|
||||
structPtr->unk6368[arg1][i] = EOS;
|
||||
structPtr->nameBuffer[arg1][i] = CHAR_SPACE;
|
||||
structPtr->nameBuffer[arg1][i] = EOS;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
structPtr->unk6320[arg1][i] = CHAR_SPACE;
|
||||
structPtr->unk6320[arg1][i] = EOS;
|
||||
structPtr->searchLocBuffer[arg1][i] = CHAR_SPACE;
|
||||
structPtr->searchLocBuffer[arg1][i] = EOS;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81CD970(void)
|
||||
void InitPartyConditionListParameters(void)
|
||||
{
|
||||
u16 i, count;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub18 *unkPtr = AllocSubstruct(18, sizeof(struct PokenavSub18));
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
struct PokenavSub18 *monListPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18));
|
||||
|
||||
structPtr->unk6300 = 0;
|
||||
structPtr->searchMode = 0;
|
||||
for (i = 0, count = 0; i < CalculatePlayerPartyCount(); i++)
|
||||
{
|
||||
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
|
||||
{
|
||||
unkPtr->unk4[count].boxId = TOTAL_BOXES_COUNT;
|
||||
unkPtr->unk4[count].monId = i;
|
||||
unkPtr->unk4[count].data = 0;
|
||||
monListPtr->monData[count].boxId = TOTAL_BOXES_COUNT;
|
||||
monListPtr->monData[count].monId = i;
|
||||
monListPtr->monData[count].data = 0;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
unkPtr->unk4[count].boxId = 0;
|
||||
unkPtr->unk4[count].monId = 0;
|
||||
unkPtr->unk4[count].data = 0;
|
||||
unkPtr->unk2 = 0;
|
||||
unkPtr->unk0 = count + 1;
|
||||
structPtr->unk678A = 0;
|
||||
monListPtr->monData[count].boxId = 0;
|
||||
monListPtr->monData[count].monId = 0;
|
||||
monListPtr->monData[count].data = 0;
|
||||
monListPtr->currIndex = 0;
|
||||
monListPtr->listCount = count + 1;
|
||||
structPtr->state = 0;
|
||||
}
|
||||
|
||||
void sub_81CD9F8(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
structPtr->unk6300 = 1;
|
||||
structPtr->unk678A = 0;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
structPtr->searchMode = 1;
|
||||
structPtr->state = 0;
|
||||
}
|
||||
|
||||
void sub_81CDA1C(s16 arg0, u8 arg1)
|
||||
void GetMonConditionGraphData(s16 id, u8 arg1)
|
||||
{
|
||||
u16 boxId, monId, i;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
if (arg0 != (sub_81CDD5C() != 0 ? unkPtr->unk0 : unkPtr->unk0 - 1))
|
||||
if (id != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1))
|
||||
{
|
||||
boxId = unkPtr->unk4[arg0].boxId;
|
||||
monId = unkPtr->unk4[arg0].monId;
|
||||
structPtr->unk6428.unk0[arg1][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL);
|
||||
structPtr->unk6428.unk0[arg1][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL);
|
||||
structPtr->unk6428.unk0[arg1][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL);
|
||||
structPtr->unk6428.unk0[arg1][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL);
|
||||
structPtr->unk6428.unk0[arg1][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL);
|
||||
structPtr->unk6780[arg1] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 255)
|
||||
boxId = monListPtr->monData[id].boxId;
|
||||
monId = monListPtr->monData[id].monId;
|
||||
structPtr->conditionData.stat[arg1][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL);
|
||||
structPtr->conditionData.stat[arg1][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL);
|
||||
structPtr->conditionData.stat[arg1][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL);
|
||||
structPtr->conditionData.stat[arg1][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL);
|
||||
structPtr->conditionData.stat[arg1][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL);
|
||||
structPtr->sheen[arg1] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 255)
|
||||
? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u
|
||||
: 9;
|
||||
structPtr->unk6783[arg1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL);
|
||||
sub_81D2754(structPtr->unk6428.unk0[arg1], structPtr->unk6428.unk14[arg1]);
|
||||
structPtr->monMarks[arg1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL);
|
||||
sub_81D2754(structPtr->conditionData.stat[arg1], structPtr->conditionData.unk14[arg1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 5; i++)
|
||||
for (i = 0; i < FLAVOR_COUNT; i++)
|
||||
{
|
||||
structPtr->unk6428.unk0[arg1][i] = 0;
|
||||
structPtr->unk6428.unk14[arg1][i].unk0 = 155;
|
||||
structPtr->unk6428.unk14[arg1][i].unk2 = 91;
|
||||
structPtr->conditionData.stat[arg1][i] = 0;
|
||||
structPtr->conditionData.unk14[arg1][i].unk0 = 155;
|
||||
structPtr->conditionData.unk14[arg1][i].unk2 = 91;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81CDB98(s16 arg0, u8 arg1)
|
||||
void ConditionGraphDrawMonPic(s16 index, u8 arg1)
|
||||
{
|
||||
u16 boxId, monId, species;
|
||||
u32 personality, tid;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
|
||||
if (arg0 == (sub_81CDD5C() != 0 ? unkPtr->unk0 : unkPtr->unk0 - 1))
|
||||
if (index == (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1))
|
||||
return;
|
||||
|
||||
boxId = unkPtr->unk4[arg0].boxId;
|
||||
monId = unkPtr->unk4[arg0].monId;
|
||||
boxId = monListPtr->monData[index].boxId;
|
||||
monId = monListPtr->monData[index].monId;
|
||||
species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL);
|
||||
tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL);
|
||||
personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL);
|
||||
@@ -534,92 +533,92 @@ void sub_81CDB98(s16 arg0, u8 arg1)
|
||||
LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), structPtr->monPal[arg1]);
|
||||
}
|
||||
|
||||
u16 sub_81CDC50(void)
|
||||
u16 GetMonListCount(void)
|
||||
{
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
return unkPtr->unk0;
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
return monListPtr->listCount;
|
||||
}
|
||||
|
||||
u16 sub_81CDC60(void)
|
||||
u16 GetConditionGraphCurrentMonIndex(void)
|
||||
{
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
return unkPtr->unk2;
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
return monListPtr->currIndex;
|
||||
}
|
||||
|
||||
struct ConditionGraph *sub_81CDC70(void)
|
||||
struct ConditionGraph *GetConditionGraphDataPtr(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
return &structPtr->unk6428;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return &structPtr->conditionData;
|
||||
}
|
||||
|
||||
u8 sub_81CDC84(void)
|
||||
u8 GetMonMarkIndex(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
return structPtr->unk6786;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->mark;
|
||||
}
|
||||
|
||||
u8 sub_81CDC9C(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
return structPtr->unk6302;
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->monIndex;
|
||||
}
|
||||
|
||||
void *sub_81CDCB4(u8 id)
|
||||
void *GetConditionMonPicGfx(u8 id)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->monPicGfx[id];
|
||||
}
|
||||
|
||||
void *sub_81CDCD4(u8 id)
|
||||
void *GetConditionMonPal(u8 id)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->monPal[id];
|
||||
}
|
||||
|
||||
u8 sub_81CDCEC(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->unk6789;
|
||||
}
|
||||
|
||||
u8 *sub_81CDD04(u8 id)
|
||||
u8 *GetConditionMonNameBuffer(u8 id)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
return structPtr->unk6368[id];
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->nameBuffer[id];
|
||||
}
|
||||
|
||||
u8 *sub_81CDD24(u8 id)
|
||||
u8 *GetConditionMonLocationBuffer(u8 id)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
return structPtr->unk6320[id];
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->searchLocBuffer[id];
|
||||
}
|
||||
|
||||
u16 sub_81CDD48(void)
|
||||
u16 GetConditionMonDataBuffer(void)
|
||||
{
|
||||
struct PokenavSub18 *unkPtr = GetSubstructPtr(18);
|
||||
return unkPtr->unk4[unkPtr->unk2].data;
|
||||
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
return monListPtr->monData[monListPtr->currIndex].data;
|
||||
}
|
||||
|
||||
bool32 sub_81CDD5C(void)
|
||||
bool32 IsConditionMenuSearchMode(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
if (structPtr->unk6300 == 1)
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
if (structPtr->searchMode == 1)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u8 sub_81CDD7C(void)
|
||||
u8 TryGetMonMarkId(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
if (structPtr->unk6300 == 1)
|
||||
return structPtr->unk6783[structPtr->unk6786];
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
if (structPtr->searchMode == 1)
|
||||
return structPtr->monMarks[structPtr->mark];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_81CDDB0(void)
|
||||
u8 GetMonSheen(void)
|
||||
{
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(11);
|
||||
return structPtr->unk6780[structPtr->unk6786];
|
||||
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
|
||||
return structPtr->sheen[structPtr->mark];
|
||||
}
|
||||
|
||||
+295
-294
File diff suppressed because it is too large
Load Diff
+235
-222
@@ -10,67 +10,78 @@
|
||||
#include "international_string_util.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
enum
|
||||
{
|
||||
CONDITION_SEARCH_FUNC_NONE,
|
||||
CONDITION_SEARCH_FUNC_MOVE_UP,
|
||||
CONDITION_SEARCH_FUNC_MOVE_DOWN,
|
||||
CONDITION_SEARCH_FUNC_PAGE_UP,
|
||||
CONDITION_SEARCH_FUNC_PAGE_DOWN,
|
||||
CONDITION_SEARCH_FUNC_EXIT,
|
||||
CONDITION_SEARCH_FUNC_SELECT_MON,
|
||||
};
|
||||
|
||||
struct PokenavSub7
|
||||
{
|
||||
u32 (*unk0)(struct PokenavSub7 *);
|
||||
u32 (*callback)(struct PokenavSub7 *);
|
||||
u32 loopedTaskId;
|
||||
u8 fill1[4];
|
||||
s32 unkC;
|
||||
s32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
struct PokenavSub18 *unkPtr;
|
||||
s32 boxId;
|
||||
s32 monId;
|
||||
u32 conditionDataId;
|
||||
u32 returnFromGraph;
|
||||
u32 isPartyCondition;
|
||||
struct PokenavSub18 *monList;
|
||||
};
|
||||
|
||||
struct PokenavSub8
|
||||
{
|
||||
bool32 (*callback)(void);
|
||||
u32 ltid;
|
||||
u32 ltid; //looped task Id
|
||||
u16 winid;
|
||||
bool32 unkC;
|
||||
bool32 fromGraph;
|
||||
u8 buff[BG_SCREEN_SIZE];
|
||||
}; // size: 0x810
|
||||
|
||||
static u32 sub_81CF010(struct PokenavSub7 *structPtr);
|
||||
static u32 sub_81CF030(struct PokenavSub7 *structPtr);
|
||||
static u32 sub_81CF0B8(struct PokenavSub7 *structPtr);
|
||||
static u32 sub_81CF0B0(struct PokenavSub7 *structPtr);
|
||||
static u32 sub_81CF11C(s32 state);
|
||||
static u32 sub_81CF134(s32 state);
|
||||
static u32 sub_81CF1C4(s32 state);
|
||||
static u32 sub_81CF1D8(s32 state);
|
||||
static u32 HandleConditionSearchInput_WaitSetup(struct PokenavSub7 *structPtr);
|
||||
static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr);
|
||||
static u32 OpenConditionGraphFromSearchList(struct PokenavSub7 *structPtr);
|
||||
static u32 ReturnToConditionSearchList(struct PokenavSub7 *structPtr);
|
||||
static u32 GetConditionSearchLoopedTask(s32 state);
|
||||
static u32 BuildPartyMonSearchResults(s32 state);
|
||||
static u32 InitBoxMonSearchResults(s32 state);
|
||||
static u32 BuildBoxMonSearchResults(s32 state);
|
||||
static u32 sub_81CF278(s32 state);
|
||||
static u32 sub_81CF578(s32 state);
|
||||
static u32 sub_81CF5F0(s32 state);
|
||||
static u32 sub_81CF668(s32 state);
|
||||
static u32 sub_81CF6E0(s32 state);
|
||||
static u32 sub_81CF758(s32 state);
|
||||
static u32 sub_81CF798(s32 state);
|
||||
static u32 LoopedTask_MoveSearchListCursorUp(s32 state);
|
||||
static u32 LoopedTask_MoveSearchListCursorDown(s32 state);
|
||||
static u32 LoopedTask_MoveSearchListPageUp(s32 state);
|
||||
static u32 LoopedTask_MoveSearchListPageDown(s32 state);
|
||||
static u32 LoopedTask_ExitConditionSearchMenu(s32 state);
|
||||
static u32 LoopedTask_SelectSearchResult(s32 state);
|
||||
static void sub_81CF2C4(struct PokenavSub7 *structPtr, struct PokenavMonList *item);
|
||||
static bool32 sub_81CF3E4(void);
|
||||
static u32 sub_81CF418(s32 state);
|
||||
static void sub_81CF7C8(struct PokenavSub8 *);
|
||||
static void sub_81CF7F4(struct PokenavSub8 *);
|
||||
static void sub_81CF88C(void);
|
||||
static void sub_81CF8E4(struct PokenavMonList *, u8 *);
|
||||
static bool32 GetSearchResultCurrentLoopedTaskActive(void);
|
||||
static u32 LoopedTask_OpenConditionSearchResults(s32 state);
|
||||
static void AddSearchResultListMenuWindow(struct PokenavSub8 *);
|
||||
static void PrintSearchResultListMenuItems(struct PokenavSub8 *);
|
||||
static void InitConditionSearchListMenuTemplate(void);
|
||||
static void PrintSearchMonListItem(struct PokenavMonList *, u8 *);
|
||||
|
||||
static const u32 gUnknown_086233A0[] = {0x16, 0x17, 0x18, 0x21, 0x2F};
|
||||
static const u32 sSearchMonDataIds[] = {MON_DATA_COOL, MON_DATA_BEAUTY, MON_DATA_CUTE, MON_DATA_SMART, MON_DATA_TOUGH};
|
||||
|
||||
static const LoopedTask gUnknown_086233B4[] =
|
||||
static const LoopedTask sConditionSearchLoopedTaskFuncs[] =
|
||||
{
|
||||
sub_81CF134,
|
||||
sub_81CF1C4,
|
||||
sub_81CF1D8,
|
||||
BuildPartyMonSearchResults,
|
||||
InitBoxMonSearchResults,
|
||||
BuildBoxMonSearchResults,
|
||||
sub_81CF278
|
||||
};
|
||||
|
||||
static const u16 gUnknown_086233C4[] = INCBIN_U16("graphics/pokenav/condition_search2.gbapal");
|
||||
static const u32 gUnknown_086233E4[] = INCBIN_U32("graphics/pokenav/condition_search2.4bpp.lz");
|
||||
static const u32 gUnknown_086234AC[] = INCBIN_U32("graphics/pokenav/condition_search2.bin.lz");
|
||||
static const u16 sConditionSearchResultFramePal[] = INCBIN_U16("graphics/pokenav/condition_search2.gbapal");
|
||||
static const u32 sConditionSearchResultTiles[] = INCBIN_U32("graphics/pokenav/condition_search2.4bpp.lz");
|
||||
static const u32 sConditionSearchResultTilemap[] = INCBIN_U32("graphics/pokenav/condition_search2.bin.lz");
|
||||
static const u16 gUnknown_08623570[] = INCBIN_U16("graphics/pokenav/8623570.gbapal");
|
||||
|
||||
static const struct BgTemplate gUnknown_08623590[] =
|
||||
static const struct BgTemplate sConditionSearchResultBgTemplates[] =
|
||||
{
|
||||
{
|
||||
.bg = 1,
|
||||
@@ -91,18 +102,18 @@ static const struct BgTemplate gUnknown_08623590[] =
|
||||
}
|
||||
};
|
||||
|
||||
static const LoopedTask gUnknown_08623598[] =
|
||||
static const LoopedTask sSearchResultLoopTaskFuncs[] =
|
||||
{
|
||||
NULL,
|
||||
sub_81CF578,
|
||||
sub_81CF5F0,
|
||||
sub_81CF668,
|
||||
sub_81CF6E0,
|
||||
sub_81CF758,
|
||||
sub_81CF798
|
||||
[CONDITION_SEARCH_FUNC_NONE] = NULL,
|
||||
[CONDITION_SEARCH_FUNC_MOVE_UP] = LoopedTask_MoveSearchListCursorUp,
|
||||
[CONDITION_SEARCH_FUNC_MOVE_DOWN] = LoopedTask_MoveSearchListCursorDown,
|
||||
[CONDITION_SEARCH_FUNC_PAGE_UP] = LoopedTask_MoveSearchListPageUp,
|
||||
[CONDITION_SEARCH_FUNC_PAGE_DOWN] = LoopedTask_MoveSearchListPageDown,
|
||||
[CONDITION_SEARCH_FUNC_EXIT] = LoopedTask_ExitConditionSearchMenu,
|
||||
[CONDITION_SEARCH_FUNC_SELECT_MON] = LoopedTask_SelectSearchResult
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_086235B4 =
|
||||
static const struct WindowTemplate sSearchResultListMenuWindowTemplate =
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
@@ -117,138 +128,139 @@ static const u8 sText_MaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHIT
|
||||
static const u8 sText_FemaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sText_NoGenderSymbol[] = _("{UNK_SPACER}");
|
||||
|
||||
bool32 PokenavCallback_Init_8(void)
|
||||
bool32 PokenavCallback_Init_ConditionSearch(void)
|
||||
{
|
||||
struct PokenavSub7 *structPtr = AllocSubstruct(7, sizeof(struct PokenavSub7));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unkPtr = AllocSubstruct(18, sizeof(struct PokenavSub18));
|
||||
if (structPtr->unkPtr == NULL)
|
||||
structPtr->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18));
|
||||
if (structPtr->monList == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unk0 = sub_81CF010;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(sub_81CF11C, 1);
|
||||
structPtr->unk18 = 0;
|
||||
structPtr->unk14 = gUnknown_086233A0[GetSelectedConditionSearch()];
|
||||
structPtr->callback = HandleConditionSearchInput_WaitSetup;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(GetConditionSearchLoopedTask, 1);
|
||||
structPtr->returnFromGraph = 0;
|
||||
structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_10(void)
|
||||
// return to search results from condition graph
|
||||
bool32 PokenavCallback_Init_ReturnToMonSearchList(void)
|
||||
{
|
||||
struct PokenavSub7 *structPtr = AllocSubstruct(7, sizeof(struct PokenavSub7));
|
||||
struct PokenavSub7 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS, sizeof(struct PokenavSub7));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unkPtr = GetSubstructPtr(18);
|
||||
structPtr->unk0 = sub_81CF030;
|
||||
structPtr->unk18 = 1;
|
||||
structPtr->unk14 = gUnknown_086233A0[GetSelectedConditionSearch()];
|
||||
structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
structPtr->callback = HandleConditionSearchInput;
|
||||
structPtr->returnFromGraph = 1;
|
||||
structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_81CEFDC(void)
|
||||
u32 GetConditionSearchResultsCallback(void)
|
||||
{
|
||||
struct PokenavSub7 *structPtr = GetSubstructPtr(7);
|
||||
return structPtr->unk0(structPtr);
|
||||
struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return structPtr->callback(structPtr);
|
||||
}
|
||||
|
||||
void sub_81CEFF0(void)
|
||||
void FreeSearchResultSubstruct1(void)
|
||||
{
|
||||
struct PokenavSub7 *structPtr = GetSubstructPtr(7);
|
||||
if (structPtr->unk1C == 0)
|
||||
FreePokenavSubstruct(18);
|
||||
FreePokenavSubstruct(7);
|
||||
struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
if (structPtr->isPartyCondition == 0)
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
}
|
||||
|
||||
static bool32 sub_81CF010(struct PokenavSub7 *structPtr)
|
||||
static bool32 HandleConditionSearchInput_WaitSetup(struct PokenavSub7 *structPtr)
|
||||
{
|
||||
if (!IsLoopedTaskActive(structPtr->loopedTaskId))
|
||||
structPtr->unk0 = sub_81CF030;
|
||||
structPtr->callback = HandleConditionSearchInput;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static u32 sub_81CF030(struct PokenavSub7 *structPtr)
|
||||
static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr)
|
||||
{
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
return 1;
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
return 2;
|
||||
else if (gMain.newKeys & DPAD_LEFT)
|
||||
return 3;
|
||||
else if (gMain.newKeys & DPAD_RIGHT)
|
||||
return 4;
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
return CONDITION_SEARCH_FUNC_MOVE_UP;
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
return CONDITION_SEARCH_FUNC_MOVE_DOWN;
|
||||
else if (JOY_NEW(DPAD_LEFT))
|
||||
return CONDITION_SEARCH_FUNC_PAGE_UP;
|
||||
else if (JOY_NEW(DPAD_RIGHT))
|
||||
return CONDITION_SEARCH_FUNC_PAGE_DOWN;
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
structPtr->unk1C = 0;
|
||||
structPtr->unk0 = sub_81CF0B0;
|
||||
return 5;
|
||||
structPtr->isPartyCondition = 0;
|
||||
structPtr->callback = ReturnToConditionSearchList;
|
||||
return CONDITION_SEARCH_FUNC_EXIT;
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
structPtr->unkPtr->unk2 = GetSelectedMatchCall();
|
||||
structPtr->unk1C = 1;
|
||||
structPtr->unk0 = sub_81CF0B8;
|
||||
return 6;
|
||||
structPtr->monList->currIndex = GetSelectedPokenavListIndex();
|
||||
structPtr->isPartyCondition = 1;
|
||||
structPtr->callback = OpenConditionGraphFromSearchList;
|
||||
return CONDITION_SEARCH_FUNC_SELECT_MON;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
return CONDITION_SEARCH_FUNC_NONE;
|
||||
}
|
||||
|
||||
static u32 sub_81CF0B0(struct PokenavSub7 *structPtr)
|
||||
static u32 ReturnToConditionSearchList(struct PokenavSub7 *structPtr)
|
||||
{
|
||||
return POKENAV_CONDITION_SEARCH_MENU;
|
||||
}
|
||||
|
||||
static u32 sub_81CF0B8(struct PokenavSub7 *structPtr)
|
||||
static u32 OpenConditionGraphFromSearchList(struct PokenavSub7 *structPtr)
|
||||
{
|
||||
return POKENAV_MENU_9;
|
||||
return POKENAV_CONDITION_GRAPH_FROM_SEARCH;
|
||||
}
|
||||
|
||||
static u32 sub_81CF0C0(void)
|
||||
{
|
||||
struct PokenavSub7 *structPtr = GetSubstructPtr(7);
|
||||
return structPtr->unk18;
|
||||
struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return structPtr->returnFromGraph;
|
||||
}
|
||||
|
||||
static struct PokenavMonList * sub_81CF0D0(void)
|
||||
static struct PokenavMonList * GetSearchResultsMonDataList(void)
|
||||
{
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
return ptr->unkPtr->unk4;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return ptr->monList->monData;
|
||||
}
|
||||
|
||||
static u16 sub_81CF0E0(void)
|
||||
static u16 GetSearchResultsMonListCount(void)
|
||||
{
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
return ptr->unkPtr->unk0;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return ptr->monList->listCount;
|
||||
}
|
||||
|
||||
static s32 sub_81CF0F0(void)
|
||||
static s32 GetSearchResultsSelectedMonData(void)
|
||||
{
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
s32 i = GetSelectedMatchCall();
|
||||
return ptr->unkPtr->unk4[i].data;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
s32 i = GetSelectedPokenavListIndex();
|
||||
return ptr->monList->monData[i].data;
|
||||
}
|
||||
|
||||
static u16 sub_81CF10C(void)
|
||||
{
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
return ptr->unkPtr->unk2;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
return ptr->monList->currIndex;
|
||||
}
|
||||
|
||||
static u32 sub_81CF11C(s32 state)
|
||||
static u32 GetConditionSearchLoopedTask(s32 state)
|
||||
{
|
||||
return gUnknown_086233B4[state](state);
|
||||
return sConditionSearchLoopedTaskFuncs[state](state);
|
||||
}
|
||||
|
||||
static u32 sub_81CF134(s32 state)
|
||||
static u32 BuildPartyMonSearchResults(s32 state)
|
||||
{
|
||||
s32 i;
|
||||
struct PokenavMonList item;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
|
||||
ptr->unkPtr->unk0 = 0;
|
||||
ptr->unkPtr->unk2 = 0;
|
||||
ptr->monList->listCount = 0;
|
||||
ptr->monList->currIndex = 0;
|
||||
item.boxId = 14;
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
@@ -258,7 +270,7 @@ static u32 sub_81CF134(s32 state)
|
||||
if (!GetMonData(pokemon, MON_DATA_SANITY_IS_EGG))
|
||||
{
|
||||
item.monId = i;
|
||||
item.data = GetMonData(pokemon, ptr->unk14);
|
||||
item.data = GetMonData(pokemon, ptr->conditionDataId);
|
||||
sub_81CF2C4(ptr, &item);
|
||||
}
|
||||
}
|
||||
@@ -266,19 +278,19 @@ static u32 sub_81CF134(s32 state)
|
||||
return LT_INC_AND_CONTINUE;
|
||||
}
|
||||
|
||||
static u32 sub_81CF1C4(s32 state)
|
||||
static u32 InitBoxMonSearchResults(s32 state)
|
||||
{
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
ptr->unk10 = 0;
|
||||
ptr->unkC = 0;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
ptr->monId = 0;
|
||||
ptr->boxId = 0;
|
||||
return LT_INC_AND_CONTINUE;
|
||||
}
|
||||
|
||||
static u32 sub_81CF1D8(s32 state)
|
||||
static u32 BuildBoxMonSearchResults(s32 state)
|
||||
{
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
s32 boxId = ptr->unkC;
|
||||
s32 monId = ptr->unk10;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
s32 boxId = ptr->boxId;
|
||||
s32 monId = ptr->monId;
|
||||
s32 boxCount = 0;
|
||||
struct PokenavMonList item;
|
||||
|
||||
@@ -290,15 +302,15 @@ static u32 sub_81CF1D8(s32 state)
|
||||
{
|
||||
item.boxId = boxId;
|
||||
item.monId = monId;
|
||||
item.data = GetBoxMonDataAt(boxId, monId, ptr->unk14);
|
||||
item.data = GetBoxMonDataAt(boxId, monId, ptr->conditionDataId);
|
||||
sub_81CF2C4(ptr, &item);
|
||||
}
|
||||
boxCount++;
|
||||
monId++;
|
||||
if (boxCount > 14)
|
||||
{
|
||||
ptr->unkC = boxId;
|
||||
ptr->unk10 = monId;
|
||||
ptr->boxId = boxId;
|
||||
ptr->monId = monId;
|
||||
return LT_CONTINUE;
|
||||
}
|
||||
}
|
||||
@@ -311,108 +323,108 @@ static u32 sub_81CF1D8(s32 state)
|
||||
|
||||
static u32 sub_81CF278(s32 state)
|
||||
{
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(7);
|
||||
s32 r6 = ptr->unkPtr->unk0;
|
||||
s32 r4 = ptr->unkPtr->unk4[0].data;
|
||||
struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS);
|
||||
s32 r6 = ptr->monList->listCount;
|
||||
s32 r4 = ptr->monList->monData[0].data;
|
||||
s32 i;
|
||||
ptr->unkPtr->unk4[0].data = 1;
|
||||
ptr->monList->monData[0].data = 1;
|
||||
for (i = 1; i < r6; i++)
|
||||
{
|
||||
if (ptr->unkPtr->unk4[i].data == r4)
|
||||
if (ptr->monList->monData[i].data == r4)
|
||||
{
|
||||
ptr->unkPtr->unk4[i].data = ptr->unkPtr->unk4[i - 1].data;
|
||||
ptr->monList->monData[i].data = ptr->monList->monData[i - 1].data;
|
||||
}
|
||||
else
|
||||
{
|
||||
r4 = ptr->unkPtr->unk4[i].data;
|
||||
ptr->unkPtr->unk4[i].data = i + 1;
|
||||
r4 = ptr->monList->monData[i].data;
|
||||
ptr->monList->monData[i].data = i + 1;
|
||||
}
|
||||
}
|
||||
ptr->unk18 = 1;
|
||||
ptr->returnFromGraph = 1;
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static void sub_81CF2C4(struct PokenavSub7 *structPtr, struct PokenavMonList *item)
|
||||
{
|
||||
u32 left = 0;
|
||||
u32 right = structPtr->unkPtr->unk0;
|
||||
u32 right = structPtr->monList->listCount;
|
||||
u32 insertionIdx = left + (right - left) / 2;
|
||||
|
||||
while (right != insertionIdx)
|
||||
{
|
||||
if (item->data > structPtr->unkPtr->unk4[insertionIdx].data)
|
||||
if (item->data > structPtr->monList->monData[insertionIdx].data)
|
||||
right = insertionIdx;
|
||||
else
|
||||
left = insertionIdx + 1;
|
||||
insertionIdx = left + (right - left) / 2;
|
||||
}
|
||||
for (right = structPtr->unkPtr->unk0; right > insertionIdx; right--)
|
||||
structPtr->unkPtr->unk4[right] = structPtr->unkPtr->unk4[right - 1];
|
||||
structPtr->unkPtr->unk4[insertionIdx] = *item;
|
||||
structPtr->unkPtr->unk0++;
|
||||
for (right = structPtr->monList->listCount; right > insertionIdx; right--)
|
||||
structPtr->monList->monData[right] = structPtr->monList->monData[right - 1];
|
||||
structPtr->monList->monData[insertionIdx] = *item;
|
||||
structPtr->monList->listCount++;
|
||||
}
|
||||
|
||||
bool32 sub_81CF330(void)
|
||||
bool32 OpenConditionSearchResults(void)
|
||||
{
|
||||
struct PokenavSub8 * unk = AllocSubstruct(8, sizeof(struct PokenavSub8));
|
||||
if (unk == NULL)
|
||||
struct PokenavSub8 *searchList = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST, sizeof(struct PokenavSub8));
|
||||
if (searchList == NULL)
|
||||
return FALSE;
|
||||
unk->ltid = CreateLoopedTask(sub_81CF418, 1);
|
||||
unk->callback = sub_81CF3E4;
|
||||
unk->unkC = FALSE;
|
||||
searchList->ltid = CreateLoopedTask(LoopedTask_OpenConditionSearchResults, 1);
|
||||
searchList->callback = GetSearchResultCurrentLoopedTaskActive;
|
||||
searchList->fromGraph = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_81CF368(void)
|
||||
bool32 OpenConditionSearchListFromGraph(void)
|
||||
{
|
||||
struct PokenavSub8 * unk = AllocSubstruct(8, sizeof(struct PokenavSub8));
|
||||
if (unk == NULL)
|
||||
struct PokenavSub8 *searchList = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST, sizeof(struct PokenavSub8));
|
||||
if (searchList == NULL)
|
||||
return FALSE;
|
||||
unk->ltid = CreateLoopedTask(sub_81CF418, 1);
|
||||
unk->callback = sub_81CF3E4;
|
||||
unk->unkC = TRUE;
|
||||
searchList->ltid = CreateLoopedTask(LoopedTask_OpenConditionSearchResults, 1);
|
||||
searchList->callback = GetSearchResultCurrentLoopedTaskActive;
|
||||
searchList->fromGraph = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_81CF3A0(s32 idx)
|
||||
void CreateSearchResultsLoopedTask(s32 idx)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
unk->ltid = CreateLoopedTask(gUnknown_08623598[idx], 1);
|
||||
unk->callback = sub_81CF3E4;
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
searchList->ltid = CreateLoopedTask(sSearchResultLoopTaskFuncs[idx], 1);
|
||||
searchList->callback = GetSearchResultCurrentLoopedTaskActive;
|
||||
}
|
||||
|
||||
bool32 sub_81CF3D0(void)
|
||||
bool32 IsSearchResultLoopedTaskActive(void)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
return unk->callback();
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
return searchList->callback();
|
||||
}
|
||||
|
||||
bool32 sub_81CF3E4(void)
|
||||
bool32 GetSearchResultCurrentLoopedTaskActive(void)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
return IsLoopedTaskActive(unk->ltid);
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
return IsLoopedTaskActive(searchList->ltid);
|
||||
}
|
||||
|
||||
void sub_81CF3F8(void)
|
||||
void FreeSearchResultSubstruct2(void)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
sub_81C8234();
|
||||
RemoveWindow(unk->winid);
|
||||
FreePokenavSubstruct(8);
|
||||
RemoveWindow(searchList->winid);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
}
|
||||
|
||||
static u32 sub_81CF418(s32 state)
|
||||
static u32 LoopedTask_OpenConditionSearchResults(s32 state)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
InitBgTemplates(gUnknown_08623590, NELEMS(gUnknown_08623590));
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_086233E4, 0, 0, 0);
|
||||
SetBgTilemapBuffer(1, unk->buff);
|
||||
CopyToBgTilemapBuffer(1, gUnknown_086234AC, 0, 0);
|
||||
InitBgTemplates(sConditionSearchResultBgTemplates, NELEMS(sConditionSearchResultBgTemplates));
|
||||
DecompressAndCopyTileDataToVram(1, sConditionSearchResultTiles, 0, 0, 0);
|
||||
SetBgTilemapBuffer(1, searchList->buff);
|
||||
CopyToBgTilemapBuffer(1, sConditionSearchResultTilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_086233C4, 0x10, 0x20);
|
||||
CopyPaletteIntoBufferUnfaded(sConditionSearchResultFramePal, 0x10, 0x20);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
@@ -424,13 +436,13 @@ static u32 sub_81CF418(s32 state)
|
||||
case 2:
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623570, 0x20, 0x20);
|
||||
sub_81CF88C();
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623570, 0x20, 32);
|
||||
InitConditionSearchListMenuTemplate();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81C8224())
|
||||
return LT_PAUSE;
|
||||
sub_81CF7C8(unk);
|
||||
AddSearchResultListMenuWindow(searchList);
|
||||
PrintHelpBarText(HELPBAR_CONDITION_MON_LIST);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
@@ -441,28 +453,28 @@ static u32 sub_81CF418(s32 state)
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
HideBg(3);
|
||||
if (!unk->unkC)
|
||||
if (!searchList->fromGraph)
|
||||
{
|
||||
u8 r4 = GetSelectedConditionSearch() + POKENAV_MENUITEM_CONDITION_SEARCH_COOL;
|
||||
LoadLeftHeaderGfxForIndex(r4);
|
||||
sub_81C7FA0(r4, 1, 0);
|
||||
sub_81C7FA0(1, 1, 0);
|
||||
u8 searchGfxId = GetSelectedConditionSearch() + POKENAV_MENUITEM_CONDITION_SEARCH_COOL;
|
||||
LoadLeftHeaderGfxForIndex(searchGfxId);
|
||||
ShowLeftHeaderGfx(searchGfxId, 1, 0);
|
||||
ShowLeftHeaderGfx(POKENAV_GFX_CONDITION_MENU, 1, 0);
|
||||
}
|
||||
PokenavFadeScreen(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 5:
|
||||
if (IsPaletteFadeActive())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
if (AreLeftHeaderSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
break;
|
||||
}
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81CF578(s32 state)
|
||||
static u32 LoopedTask_MoveSearchListCursorUp(s32 state)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -479,11 +491,11 @@ static u32 sub_81CF578(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81CF7F4(unk);
|
||||
PrintSearchResultListMenuItems(searchList);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -493,9 +505,9 @@ static u32 sub_81CF578(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81CF5F0(s32 state)
|
||||
static u32 LoopedTask_MoveSearchListCursorDown(s32 state)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -512,11 +524,11 @@ static u32 sub_81CF5F0(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81CF7F4(unk);
|
||||
PrintSearchResultListMenuItems(searchList);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -526,9 +538,9 @@ static u32 sub_81CF5F0(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81CF668(s32 state)
|
||||
static u32 LoopedTask_MoveSearchListPageUp(s32 state)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -545,11 +557,11 @@ static u32 sub_81CF668(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81CF7F4(unk);
|
||||
PrintSearchResultListMenuItems(searchList);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -559,9 +571,9 @@ static u32 sub_81CF668(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81CF6E0(s32 state)
|
||||
static u32 LoopedTask_MoveSearchListPageDown(s32 state)
|
||||
{
|
||||
struct PokenavSub8 * unk = GetSubstructPtr(8);
|
||||
struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -578,11 +590,11 @@ static u32 sub_81CF6E0(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81CF7F4(unk);
|
||||
PrintSearchResultListMenuItems(searchList);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -592,27 +604,27 @@ static u32 sub_81CF6E0(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81CF758(s32 state)
|
||||
static u32 LoopedTask_ExitConditionSearchMenu(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
sub_81C78A0();
|
||||
SlideMenuHeaderDown();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsPaletteFadeActive())
|
||||
return LT_PAUSE;
|
||||
if (MainMenuLoopedTaskIsBusy())
|
||||
return LT_PAUSE;
|
||||
sub_81C7FDC();
|
||||
SetLeftHeaderSpritesInvisibility();
|
||||
break;
|
||||
}
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81CF798(s32 state)
|
||||
static u32 LoopedTask_SelectSearchResult(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@@ -628,46 +640,47 @@ static u32 sub_81CF798(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static void sub_81CF7C8(struct PokenavSub8 * ptr)
|
||||
static void AddSearchResultListMenuWindow(struct PokenavSub8 *searchList)
|
||||
{
|
||||
ptr->winid = AddWindow(&gUnknown_086235B4);
|
||||
PutWindowTilemap(ptr->winid);
|
||||
CopyWindowToVram(ptr->winid, 1);
|
||||
sub_81CF7F4(ptr);
|
||||
searchList->winid = AddWindow(&sSearchResultListMenuWindowTemplate);
|
||||
PutWindowTilemap(searchList->winid);
|
||||
CopyWindowToVram(searchList->winid, 1);
|
||||
PrintSearchResultListMenuItems(searchList);
|
||||
}
|
||||
|
||||
static void sub_81CF7F4(struct PokenavSub8 * ptr)
|
||||
static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList)
|
||||
{
|
||||
s32 r7 = sub_81CF0F0();
|
||||
s32 r7 = GetSearchResultsSelectedMonData();
|
||||
DynamicPlaceholderTextUtil_Reset();
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||
*gStringVar1 = EOS;
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberF700);
|
||||
AddTextPrinterParameterized(ptr->winid, 1, gStringVar2, 4, 1, 0xFF, NULL);
|
||||
AddTextPrinterParameterized(searchList->winid, 1, gStringVar2, 4, 1, 0xFF, NULL);
|
||||
ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
AddTextPrinterParameterized(ptr->winid, 1, gStringVar1, 34, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(ptr->winid, 2);
|
||||
AddTextPrinterParameterized(searchList->winid, 1, gStringVar1, 34, 1, 0xFF, NULL);
|
||||
CopyWindowToVram(searchList->winid, 2);
|
||||
}
|
||||
|
||||
static void sub_81CF88C(void)
|
||||
static void InitConditionSearchListMenuTemplate(void)
|
||||
{
|
||||
struct PokenavListTemplate template;
|
||||
template.list.monList = sub_81CF0D0();
|
||||
template.unk4 = sub_81CF0E0();
|
||||
|
||||
template.list.monList = GetSearchResultsMonDataList();
|
||||
template.count = GetSearchResultsMonListCount();
|
||||
template.unk8 = 4;
|
||||
template.unk6 = sub_81CF10C();
|
||||
template.unk9 = 13;
|
||||
template.unkA = 17;
|
||||
template.unkB = 1;
|
||||
template.unkC = 8;
|
||||
template.unkD = 2;
|
||||
template.unkE = 1;
|
||||
template.listFunc.unk10_1 = sub_81CF8E4;
|
||||
template.item_X = 13;
|
||||
template.windowWidth = 17;
|
||||
template.listTop = 1;
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 2;
|
||||
template.fontId = 1;
|
||||
template.listFunc.printMonFunc = PrintSearchMonListItem;
|
||||
template.unk14 = NULL;
|
||||
sub_81C81D4(&gUnknown_08623590[1], &template, 0);
|
||||
sub_81C81D4(&sConditionSearchResultBgTemplates[1], &template, 0);
|
||||
}
|
||||
|
||||
static void sub_81CF8E4(struct PokenavMonList * item, u8 * dest)
|
||||
static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest)
|
||||
{
|
||||
u8 gender;
|
||||
u8 level;
|
||||
|
||||
+73
-73
@@ -15,9 +15,9 @@
|
||||
|
||||
struct PokenavMainMenuResources
|
||||
{
|
||||
void (*unk0)(u32);
|
||||
u32 (*unk4)(void);
|
||||
u32 unk8;
|
||||
void (*loopTask)(u32);
|
||||
u32 (*isLoopTaskActiveFunc)(void);
|
||||
u32 unused;
|
||||
u32 currentTaskId;
|
||||
u32 helpBarWindowId;
|
||||
u32 palettes;
|
||||
@@ -47,8 +47,8 @@ static void SpriteCB_MoveLeftHeader(struct Sprite *sprite);
|
||||
static void InitPokenavMainMenuResources(void);
|
||||
static void InitHoennMapHeaderSprites(void);
|
||||
static void InitHelpBar(void);
|
||||
static u32 LoopedTask_ScrollMenuHeaderDown(s32 a0);
|
||||
static u32 LoopedTask_ScrollMenuHeaderUp(s32 a0);
|
||||
static u32 LoopedTask_SlideMenuHeaderUp(s32 a0);
|
||||
static u32 LoopedTask_SlideMenuHeaderDown(s32 a0);
|
||||
static void DrawHelpBar(u32 windowId);
|
||||
static void SpriteCB_SpinningPokenav(struct Sprite* sprite);
|
||||
static u32 LoopedTask_InitPokenavMenu(s32 a0);
|
||||
@@ -294,7 +294,7 @@ bool32 InitPokenavMainMenu(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr;
|
||||
|
||||
structPtr = AllocSubstruct(0, sizeof(struct PokenavMainMenuResources));
|
||||
structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU, sizeof(struct PokenavMainMenuResources));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
@@ -306,14 +306,14 @@ bool32 InitPokenavMainMenu(void)
|
||||
|
||||
u32 PokenavMainMenuLoopedTaskIsActive(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
return IsLoopedTaskActive(structPtr->currentTaskId);
|
||||
}
|
||||
|
||||
void ShutdownPokenav(void)
|
||||
{
|
||||
PlaySE(SE_POKENAV_OFF);
|
||||
sub_81CAADC();
|
||||
ResetBldCnt_();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ static u32 LoopedTask_InitPokenavMenu(s32 a0)
|
||||
ResetTempTileDataBuffers();
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 1:
|
||||
structPtr = GetSubstructPtr(0);
|
||||
structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
DecompressAndCopyTileDataToVram(0, &gPokenavHeader_Gfx, 0, 0, 0);
|
||||
SetBgTilemapBuffer(0, structPtr->tilemapBuffer);
|
||||
CopyToBgTilemapBuffer(0, &gPokenavHeader_Tilemap, 0, 0);
|
||||
@@ -371,46 +371,46 @@ static u32 LoopedTask_InitPokenavMenu(s32 a0)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81C7834(void *func1, void *func2) // Fix types later.
|
||||
void SetActiveMenuLoopTasks(void *createLoopTask, void *isLoopTaskActive) // Fix types later.
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
structPtr->unk0 = func1;
|
||||
structPtr->unk4 = func2;
|
||||
structPtr->unk8 = 0;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
structPtr->loopTask = createLoopTask;
|
||||
structPtr->isLoopTaskActiveFunc = isLoopTaskActive;
|
||||
structPtr->unused = 0;
|
||||
}
|
||||
|
||||
void sub_81C7850(u32 a0)
|
||||
void RunMainMenuLoopedTask(u32 a0)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
structPtr->unk8 = 0;
|
||||
structPtr->unk0(a0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
structPtr->unused = 0;
|
||||
structPtr->loopTask(a0);
|
||||
}
|
||||
|
||||
u32 sub_81C786C(void)
|
||||
u32 IsActiveMenuLoopTaskActive(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
return structPtr->unk4();
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
return structPtr->isLoopTaskActiveFunc();
|
||||
}
|
||||
|
||||
void sub_81C7880(void)
|
||||
void SlideMenuHeaderUp(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
structPtr->currentTaskId = CreateLoopedTask(LoopedTask_ScrollMenuHeaderDown, 4);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
structPtr->currentTaskId = CreateLoopedTask(LoopedTask_SlideMenuHeaderUp, 4);
|
||||
}
|
||||
|
||||
void sub_81C78A0(void)
|
||||
void SlideMenuHeaderDown(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
structPtr->currentTaskId = CreateLoopedTask(LoopedTask_ScrollMenuHeaderUp, 4);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
structPtr->currentTaskId = CreateLoopedTask(LoopedTask_SlideMenuHeaderDown, 4);
|
||||
}
|
||||
|
||||
bool32 MainMenuLoopedTaskIsBusy(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
return IsLoopedTaskActive(structPtr->currentTaskId);
|
||||
}
|
||||
|
||||
static u32 LoopedTask_ScrollMenuHeaderDown(s32 a0)
|
||||
static u32 LoopedTask_SlideMenuHeaderUp(s32 a0)
|
||||
{
|
||||
switch (a0)
|
||||
{
|
||||
@@ -431,7 +431,7 @@ static u32 LoopedTask_ScrollMenuHeaderDown(s32 a0)
|
||||
}
|
||||
}
|
||||
|
||||
static u32 LoopedTask_ScrollMenuHeaderUp(s32 a0)
|
||||
static u32 LoopedTask_SlideMenuHeaderDown(s32 a0)
|
||||
{
|
||||
if (ChangeBgY(0, 384, 2) <= 0)
|
||||
{
|
||||
@@ -466,35 +466,35 @@ void Pokenav_AllocAndLoadPalettes(const struct SpritePalette *palettes)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81C7990(u32 a0, u16 a1)
|
||||
void PokenavFillPalette(u32 palIndex, u16 fillValue)
|
||||
{
|
||||
CpuFill16(a1, gPlttBufferFaded + 0x100 + (a0 * 16), 16 * sizeof(u16));
|
||||
CpuFill16(fillValue, gPlttBufferFaded + 0x100 + (palIndex * 16), 16 * sizeof(u16));
|
||||
}
|
||||
|
||||
void sub_81C79BC(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *palette)
|
||||
void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a4, u16 *palette)
|
||||
{
|
||||
|
||||
if (a4 == 0)
|
||||
{
|
||||
CpuCopy16(a0, palette, a2 * 2);
|
||||
CpuCopy16(src, palette, size * 2);
|
||||
}
|
||||
else if (a4 >= a3)
|
||||
{
|
||||
CpuCopy16(a1, palette, a2 * 2);
|
||||
CpuCopy16(dest, palette, size * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
int r, g, b;
|
||||
int r1, g1, b1;
|
||||
while (a2--)
|
||||
while (size--)
|
||||
{
|
||||
r = GET_R(*a0);
|
||||
g = GET_G(*a0);
|
||||
b = GET_B(*a0);
|
||||
r = GET_R(*src);
|
||||
g = GET_G(*src);
|
||||
b = GET_B(*src);
|
||||
|
||||
r1 = ((((GET_R(*a1) << 8) - (r << 8)) / a3) * a4) >> 8;
|
||||
g1 = ((((GET_G(*a1) << 8) - (g << 8)) / a3) * a4) >> 8;
|
||||
b1 = ((((GET_B(*a1) << 8) - (b << 8)) / a3) * a4) >> 8;
|
||||
r1 = ((((GET_R(*dest) << 8) - (r << 8)) / a3) * a4) >> 8;
|
||||
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
|
||||
g = (g + g1) & 0x1F; //See above
|
||||
@@ -502,7 +502,7 @@ void sub_81C79BC(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *pale
|
||||
|
||||
*palette = RGB2(r, g, b); //See above comment
|
||||
|
||||
a0++, a1++;
|
||||
src++, dest++;
|
||||
palette++;
|
||||
}
|
||||
}
|
||||
@@ -510,7 +510,7 @@ void sub_81C79BC(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *pale
|
||||
|
||||
void PokenavFadeScreen(s32 fadeType)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
switch (fadeType)
|
||||
{
|
||||
@@ -549,7 +549,7 @@ void InitBgTemplates(const struct BgTemplate *templates, int count)
|
||||
|
||||
static void InitHelpBar(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
InitWindows(&sHelpBarWindowTemplate[0]);
|
||||
structPtr->helpBarWindowId = 0;
|
||||
@@ -560,7 +560,7 @@ static void InitHelpBar(void)
|
||||
|
||||
void PrintHelpBarText(u32 textId)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
DrawHelpBar(structPtr->helpBarWindowId);
|
||||
AddTextPrinterParameterized3(structPtr->helpBarWindowId, 1, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]);
|
||||
@@ -581,7 +581,7 @@ static void InitPokenavMainMenuResources(void)
|
||||
{
|
||||
s32 i;
|
||||
u8 spriteId;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSpinningPokenavSpriteSheet); i++)
|
||||
LoadCompressedSpriteSheet(&gSpinningPokenavSpriteSheet[i]);
|
||||
@@ -594,7 +594,7 @@ static void InitPokenavMainMenuResources(void)
|
||||
|
||||
static void CleanupPokenavMainMenuResources(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
DestroySprite(structPtr->spinningPokenav);
|
||||
FreeSpriteTilesByTag(0);
|
||||
@@ -609,7 +609,7 @@ static void SpriteCB_SpinningPokenav(struct Sprite *sprite)
|
||||
|
||||
struct Sprite *PauseSpinningPokenavSprite(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
structPtr->spinningPokenav->callback = SpriteCallbackDummy;
|
||||
return structPtr->spinningPokenav;
|
||||
@@ -617,7 +617,7 @@ struct Sprite *PauseSpinningPokenavSprite(void)
|
||||
|
||||
void ResumeSpinningPokenavSprite(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
structPtr->spinningPokenav->pos1.x = 220;
|
||||
structPtr->spinningPokenav->pos1.y = 12;
|
||||
@@ -630,7 +630,7 @@ void ResumeSpinningPokenavSprite(void)
|
||||
static void InitHoennMapHeaderSprites(void)
|
||||
{
|
||||
s32 i, spriteId;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
LoadCompressedSpriteSheet(&sPokenavHoennMapLeftHeaderSpriteSheet);
|
||||
AllocSpritePalette(1);
|
||||
@@ -659,9 +659,9 @@ void LoadLeftHeaderGfxForIndex(u32 menuGfxId)
|
||||
LoadLeftHeaderGfxForSubMenu(menuGfxId - POKENAV_GFX_SUBMENUS_START);
|
||||
}
|
||||
|
||||
void sub_81C7E14(u32 menuGfxId)
|
||||
void UpdateRegionMapRightHeaderTiles(u32 menuGfxId)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
if (menuGfxId == POKENAV_GFX_MAP_MENU_ZOOMED_OUT)
|
||||
structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + 32;
|
||||
@@ -677,7 +677,7 @@ static void LoadLeftHeaderGfxForMenu(u32 menuGfxId)
|
||||
if (menuGfxId >= POKENAV_GFX_SUBMENUS_START)
|
||||
return;
|
||||
|
||||
structPtr = GetSubstructPtr(0);
|
||||
structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
tag = sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].tag;
|
||||
size = GetDecompressedDataSize(sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].data);
|
||||
LoadPalette(&gPokenavLeftHeader_Pal[tag * 16], (IndexOfSpritePaletteTag(1) * 16) + 0x100, 0x20);
|
||||
@@ -705,33 +705,33 @@ static void LoadLeftHeaderGfxForSubMenu(u32 menuGfxId)
|
||||
RequestDma3Copy(&gDecompressionBuffer[0x1000], (void *)VRAM + 0x10800 + (GetSpriteTileStartByTag(2) * 32), size, 1);
|
||||
}
|
||||
|
||||
void sub_81C7FA0(u32 menuGfxId, bool32 arg1, bool32 arg2)
|
||||
void ShowLeftHeaderGfx(u32 menuGfxId, bool32 isMain, bool32 isOnRightSide)
|
||||
{
|
||||
u32 var;
|
||||
u32 tileTop;
|
||||
|
||||
if (!arg1)
|
||||
var = 0x30;
|
||||
if (!isMain)
|
||||
tileTop = 0x30;
|
||||
else
|
||||
var = 0x10;
|
||||
tileTop = 0x10;
|
||||
|
||||
if (menuGfxId < POKENAV_GFX_SUBMENUS_START)
|
||||
ShowLeftHeaderSprites(var, arg2);
|
||||
ShowLeftHeaderSprites(tileTop, isOnRightSide);
|
||||
else
|
||||
ShowLeftHeaderSubmenuSprites(var, arg2);
|
||||
ShowLeftHeaderSubmenuSprites(tileTop, isOnRightSide);
|
||||
}
|
||||
|
||||
void sub_81C7FC4(u32 arg0, bool32 arg1)
|
||||
void HideMainOrSubMenuLeftHeader(u32 id, bool32 onRightSide)
|
||||
{
|
||||
if (arg0 < 6)
|
||||
HideLeftHeaderSprites(arg1);
|
||||
if (id < POKENAV_GFX_PARTY_MENU)
|
||||
HideLeftHeaderSprites(onRightSide);
|
||||
else
|
||||
HideLeftHeaderSubmenuSprites(arg1);
|
||||
HideLeftHeaderSubmenuSprites(onRightSide);
|
||||
}
|
||||
|
||||
void sub_81C7FDC(void)
|
||||
void SetLeftHeaderSpritesInvisibility(void)
|
||||
{
|
||||
s32 i;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++)
|
||||
{
|
||||
@@ -740,9 +740,9 @@ void sub_81C7FDC(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_81C8010(void)
|
||||
bool32 AreLeftHeaderSpritesMoving(void)
|
||||
{
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
if (structPtr->leftHeaderSprites[0]->callback == SpriteCallbackDummy && structPtr->submenuLeftHeaderSprites[0]->callback == SpriteCallbackDummy)
|
||||
return FALSE;
|
||||
@@ -753,7 +753,7 @@ bool32 sub_81C8010(void)
|
||||
static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide)
|
||||
{
|
||||
s32 start, end, i;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
if (!isOnRightSide)
|
||||
start = -96, end = 32;
|
||||
@@ -770,7 +770,7 @@ static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide)
|
||||
static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide)
|
||||
{
|
||||
s32 start, end, i;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
if (!isOnRightSide)
|
||||
start = -96, end = 16;
|
||||
@@ -787,7 +787,7 @@ static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide)
|
||||
static void HideLeftHeaderSprites(bool32 isOnRightSide)
|
||||
{
|
||||
s32 start, end, i;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
if (!isOnRightSide)
|
||||
start = 32, end = -96;
|
||||
@@ -803,7 +803,7 @@ static void HideLeftHeaderSprites(bool32 isOnRightSide)
|
||||
static void HideLeftHeaderSubmenuSprites(bool32 isOnRightSide)
|
||||
{
|
||||
s32 start, end, i;
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0);
|
||||
struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU);
|
||||
|
||||
if (!isOnRightSide)
|
||||
start = 16, end = -96;
|
||||
|
||||
+24
-24
@@ -53,7 +53,7 @@ static const u8 sMatchCallOptionsHasCheckPage[] =
|
||||
|
||||
bool32 PokenavCallback_Init_MatchCall(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = AllocSubstruct(5, sizeof(struct Pokenav3Struct));
|
||||
struct Pokenav3Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN, sizeof(struct Pokenav3Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
@@ -66,13 +66,13 @@ bool32 PokenavCallback_Init_MatchCall(void)
|
||||
|
||||
u32 GetMatchCallCallback(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->callback(state);
|
||||
}
|
||||
|
||||
void FreeMatchCallSubstruct1(void)
|
||||
{
|
||||
FreePokenavSubstruct(5);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
}
|
||||
|
||||
static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state)
|
||||
@@ -92,7 +92,7 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state)
|
||||
{
|
||||
state->callback = CB2_HandleMatchCallOptionsInput;
|
||||
state->optionCursorPos = 0;
|
||||
selection = GetSelectedMatchCall();
|
||||
selection = GetSelectedPokenavListIndex();
|
||||
|
||||
if (!state->matchCallEntries[selection].isSpecialTrainer || MatchCall_HasCheckPage(state->matchCallEntries[selection].headerId))
|
||||
{
|
||||
@@ -205,7 +205,7 @@ static u32 CB2_HandleCallInput(struct Pokenav3Struct *state)
|
||||
static u32 sub_81CAD20(s32 taskState)
|
||||
{
|
||||
int i, j;
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -239,7 +239,7 @@ static u32 sub_81CAD20(s32 taskState)
|
||||
{
|
||||
state->matchCallEntries[state->numRegistered].headerId = state->headerId;
|
||||
state->matchCallEntries[state->numRegistered].isSpecialTrainer = FALSE;
|
||||
state->matchCallEntries[state->numRegistered].mapSec = sub_81CB0C8(j);
|
||||
state->matchCallEntries[state->numRegistered].mapSec = GetMatchTableMapSectionId(j);
|
||||
state->numRegistered++;
|
||||
}
|
||||
|
||||
@@ -266,31 +266,31 @@ bool32 IsRematchEntryRegistered(int rematchIndex)
|
||||
|
||||
int sub_81CAE28(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->unk10;
|
||||
}
|
||||
|
||||
int GetNumberRegistered(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->numRegistered;
|
||||
}
|
||||
|
||||
int sub_81CAE48(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->unkC;
|
||||
}
|
||||
|
||||
int unref_sub_81CAE58(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->numRegistered - state->unkC;
|
||||
}
|
||||
|
||||
int unref_sub_81CAE6C(int arg0)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
arg0 += state->unkC;
|
||||
if (arg0 >= state->numRegistered)
|
||||
return REMATCH_TABLE_ENTRIES;
|
||||
@@ -300,19 +300,19 @@ int unref_sub_81CAE6C(int arg0)
|
||||
|
||||
struct PokenavMatchCallEntries *sub_81CAE94(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->matchCallEntries;
|
||||
}
|
||||
|
||||
u16 GetMatchCallMapSec(int index)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->matchCallEntries[index].mapSec;
|
||||
}
|
||||
|
||||
bool32 ShouldDrawRematchPokeballIcon(int index)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
if (!state->matchCallEntries[index].isSpecialTrainer)
|
||||
index = state->matchCallEntries[index].headerId;
|
||||
else
|
||||
@@ -327,7 +327,7 @@ bool32 ShouldDrawRematchPokeballIcon(int index)
|
||||
int GetMatchCallTrainerPic(int index)
|
||||
{
|
||||
int headerId;
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
if (!state->matchCallEntries[index].isSpecialTrainer)
|
||||
{
|
||||
index = GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId);
|
||||
@@ -348,7 +348,7 @@ int GetMatchCallTrainerPic(int index)
|
||||
|
||||
const u8 *GetMatchCallMessageText(int index, u8 *arg1)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
*arg1 = 0;
|
||||
if (!Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType))
|
||||
return gText_CallCantBeMadeHere;
|
||||
@@ -364,7 +364,7 @@ const u8 *GetMatchCallMessageText(int index, u8 *arg1)
|
||||
const u8 *GetMatchCallFlavorText(int index, int checkPageEntry)
|
||||
{
|
||||
int rematchId;
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
if (state->matchCallEntries[index].isSpecialTrainer)
|
||||
{
|
||||
rematchId = MatchCall_GetRematchTableIdx(state->matchCallEntries[index].headerId);
|
||||
@@ -381,13 +381,13 @@ const u8 *GetMatchCallFlavorText(int index, int checkPageEntry)
|
||||
|
||||
u16 GetMatchCallOptionCursorPos(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
return state->optionCursorPos;
|
||||
}
|
||||
|
||||
u16 GetMatchCallOptionId(int optionId)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
if (state->maxOptionId < optionId)
|
||||
return MATCH_CALL_OPTION_COUNT;
|
||||
|
||||
@@ -422,7 +422,7 @@ void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries *matchCallEntry,
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_81CB0C8(int rematchIndex)
|
||||
u8 GetMatchTableMapSectionId(int rematchIndex)
|
||||
{
|
||||
int mapGroup = gRematchTable[rematchIndex].mapGroup;
|
||||
int mapNum = gRematchTable[rematchIndex].mapNum;
|
||||
@@ -431,7 +431,7 @@ u8 sub_81CB0C8(int rematchIndex)
|
||||
|
||||
int GetIndexDeltaOfNextCheckPageDown(int index)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
int count = 1;
|
||||
while (++index < state->numRegistered)
|
||||
{
|
||||
@@ -448,7 +448,7 @@ int GetIndexDeltaOfNextCheckPageDown(int index)
|
||||
|
||||
int GetIndexDeltaOfNextCheckPageUp(int index)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
int count = -1;
|
||||
while (--index >= 0)
|
||||
{
|
||||
@@ -488,8 +488,8 @@ bool32 unref_sub_81CB16C(void)
|
||||
|
||||
static bool32 sub_81CB1D0(void)
|
||||
{
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(5);
|
||||
int selection = GetSelectedMatchCall();
|
||||
struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN);
|
||||
int selection = GetSelectedPokenavListIndex();
|
||||
if (!state->matchCallEntries[selection].isSpecialTrainer)
|
||||
{
|
||||
if (GetMatchCallMapSec(selection) == gMapHeader.regionMapSectionId)
|
||||
|
||||
+72
-73
@@ -23,7 +23,6 @@
|
||||
#include "constants/game_stat.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct Pokenav4Struct
|
||||
{
|
||||
@@ -37,7 +36,7 @@ struct Pokenav4Struct
|
||||
u16 msgBoxWindowId;
|
||||
s16 unk16;
|
||||
u8 unused18;
|
||||
u8 unk19;
|
||||
u8 unused19;
|
||||
u16 unk1A;
|
||||
struct Sprite *optionsCursorSprite;
|
||||
struct Sprite *trainerPicSprite;
|
||||
@@ -51,9 +50,9 @@ struct Pokenav4Struct
|
||||
|
||||
static bool32 GetCurrentLoopedTaskActive(void);
|
||||
static u32 LoopedTask_OpenMatchCall(s32);
|
||||
static void sub_81CBBB8(void);
|
||||
static void InitMatchCallPokenavListMenuTemplate(void);
|
||||
static void sub_81CBC1C(void);
|
||||
static void sub_81CC2B4(void);
|
||||
static void RemoveMatchCallSprites(void);
|
||||
static void sub_81CC034(struct Pokenav4Struct *);
|
||||
static void DrawMatchCallLeftColumnWindows(struct Pokenav4Struct *);
|
||||
static void UpdateMatchCallInfoBox(struct Pokenav4Struct *);
|
||||
@@ -120,7 +119,7 @@ static const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/8622700.gbap
|
||||
static const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/pokeball_matchcall.gbapal");
|
||||
static const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/pokeball_matchcall.4bpp.lz");
|
||||
|
||||
const struct BgTemplate gUnknown_0862278C[3] =
|
||||
const struct BgTemplate sMatchCallBgTemplates[3] =
|
||||
{
|
||||
{
|
||||
.bg = 1,
|
||||
@@ -153,22 +152,22 @@ const struct BgTemplate gUnknown_0862278C[3] =
|
||||
|
||||
static const LoopedTask sMatchCallLoopTaskFuncs[] =
|
||||
{
|
||||
[POKENAV_MC_FUNC_NONE] = NULL,
|
||||
[POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown,
|
||||
[POKENAV_MC_FUNC_UP] = MatchCallListCursorUp,
|
||||
[POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown,
|
||||
[POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp,
|
||||
[POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry,
|
||||
[POKENAV_MC_FUNC_NONE] = NULL,
|
||||
[POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown,
|
||||
[POKENAV_MC_FUNC_UP] = MatchCallListCursorUp,
|
||||
[POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown,
|
||||
[POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp,
|
||||
[POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry,
|
||||
[POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR] = MoveMatchCallOptionsCursor,
|
||||
[POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection,
|
||||
[POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage,
|
||||
[POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage,
|
||||
[POKENAV_MC_FUNC_10] = sub_81CB888,
|
||||
[POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage,
|
||||
[POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp,
|
||||
[POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown,
|
||||
[POKENAV_MC_FUNC_EXIT_CHECK_PAGE] = ExitCheckPage,
|
||||
[POKENAV_MC_FUNC_EXIT] = ExitMatchCall
|
||||
[POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection,
|
||||
[POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage,
|
||||
[POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage,
|
||||
[POKENAV_MC_FUNC_10] = sub_81CB888,
|
||||
[POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage,
|
||||
[POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp,
|
||||
[POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown,
|
||||
[POKENAV_MC_FUNC_EXIT_CHECK_PAGE] = ExitCheckPage,
|
||||
[POKENAV_MC_FUNC_EXIT] = ExitMatchCall
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sMatchCallLocationWindowTemplate =
|
||||
@@ -276,11 +275,11 @@ static const struct SpriteTemplate sTrainerPicSpriteTemplate =
|
||||
|
||||
bool32 OpenMatchCall(void)
|
||||
{
|
||||
struct Pokenav4Struct *state = AllocSubstruct(6, sizeof(struct Pokenav4Struct));
|
||||
struct Pokenav4Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN, sizeof(struct Pokenav4Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
state->unk19 = 0;
|
||||
state->unused19 = 0;
|
||||
state->loopTaskId = CreateLoopedTask(LoopedTask_OpenMatchCall, 1);
|
||||
state->isTaskActiveCB = GetCurrentLoopedTaskActive;
|
||||
return TRUE;
|
||||
@@ -288,21 +287,21 @@ bool32 OpenMatchCall(void)
|
||||
|
||||
void CreateMatchCallLoopedTask(s32 index)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
state->loopTaskId = CreateLoopedTask(sMatchCallLoopTaskFuncs[index], 1);
|
||||
state->isTaskActiveCB = GetCurrentLoopedTaskActive;
|
||||
}
|
||||
|
||||
bool32 IsMatchCallLoopedTaskActive(void)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
return state->isTaskActiveCB();
|
||||
}
|
||||
|
||||
void FreeMatchCallSubstruct2(void)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
sub_81CC2B4();
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
RemoveMatchCallSprites();
|
||||
sub_81CBC1C();
|
||||
RemoveWindow(state->infoBoxWindowId);
|
||||
RemoveWindow(state->locWindowId);
|
||||
@@ -312,17 +311,17 @@ void FreeMatchCallSubstruct2(void)
|
||||
|
||||
static bool32 GetCurrentLoopedTaskActive(void)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
return IsLoopedTaskActive(state->loopTaskId);
|
||||
}
|
||||
|
||||
static u32 LoopedTask_OpenMatchCall(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
InitBgTemplates(gUnknown_0862278C, ARRAY_COUNT(gUnknown_0862278C));
|
||||
InitBgTemplates(sMatchCallBgTemplates, ARRAY_COUNT(sMatchCallBgTemplates));
|
||||
ChangeBgX(2, 0, 0);
|
||||
ChangeBgY(2, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(2, sMatchCallUI_Gfx, 0, 0, 0);
|
||||
@@ -355,7 +354,7 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState)
|
||||
if (FreeTempTileDataBuffersIfPossible() || !sub_81CAE28())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81CBBB8();
|
||||
InitMatchCallPokenavListMenuTemplate();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
if (sub_81C8224())
|
||||
@@ -375,11 +374,11 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState)
|
||||
ShowBg(1);
|
||||
sub_81CC214();
|
||||
LoadLeftHeaderGfxForIndex(3);
|
||||
sub_81C7FA0(3, 1, 0);
|
||||
ShowLeftHeaderGfx(POKENAV_GFX_MATCH_CALL_MENU, 1, 0);
|
||||
PokenavFadeScreen(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 7:
|
||||
if (IsPaletteFadeActive() || sub_81C8010())
|
||||
if (IsPaletteFadeActive() || AreLeftHeaderSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81CBC38(1);
|
||||
@@ -391,7 +390,7 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState)
|
||||
|
||||
u32 MatchCallListCursorDown(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -410,7 +409,7 @@ u32 MatchCallListCursorDown(s32 taskState)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
|
||||
PrintMatchCallLocation(state, 0);
|
||||
@@ -428,7 +427,7 @@ u32 MatchCallListCursorDown(s32 taskState)
|
||||
|
||||
u32 MatchCallListCursorUp(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -447,7 +446,7 @@ u32 MatchCallListCursorUp(s32 taskState)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
|
||||
PrintMatchCallLocation(state, 0);
|
||||
@@ -465,7 +464,7 @@ u32 MatchCallListCursorUp(s32 taskState)
|
||||
|
||||
u32 MatchCallListPageDown(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -484,7 +483,7 @@ u32 MatchCallListPageDown(s32 taskState)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
|
||||
PrintMatchCallLocation(state, 0);
|
||||
@@ -502,7 +501,7 @@ u32 MatchCallListPageDown(s32 taskState)
|
||||
|
||||
u32 MatchCallListPageUp(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -521,7 +520,7 @@ u32 MatchCallListPageUp(s32 taskState)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
|
||||
PrintMatchCallLocation(state, 0);
|
||||
@@ -539,7 +538,7 @@ u32 MatchCallListPageUp(s32 taskState)
|
||||
|
||||
u32 SelectMatchCallEntry(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -562,7 +561,7 @@ u32 MoveMatchCallOptionsCursor(s32 taskState)
|
||||
u16 cursorPos;
|
||||
|
||||
PlaySE(SE_SELECT);
|
||||
state = GetSubstructPtr(6);
|
||||
state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
cursorPos = GetMatchCallOptionCursorPos();
|
||||
UpdateCursorGfxPos(state, cursorPos);
|
||||
return LT_FINISH;
|
||||
@@ -570,7 +569,7 @@ u32 MoveMatchCallOptionsCursor(s32 taskState)
|
||||
|
||||
u32 CancelMatchCallSelection(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -589,7 +588,7 @@ u32 CancelMatchCallSelection(s32 taskState)
|
||||
|
||||
u32 DoMatchCallMessage(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -621,7 +620,7 @@ u32 DoMatchCallMessage(s32 taskState)
|
||||
|
||||
u32 DoTrainerCloseByMessage(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -647,7 +646,7 @@ u32 DoTrainerCloseByMessage(s32 taskState)
|
||||
|
||||
u32 sub_81CB888(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
u32 result = LT_INC_AND_PAUSE;
|
||||
|
||||
switch (taskState)
|
||||
@@ -711,7 +710,7 @@ u32 sub_81CB888(s32 taskState)
|
||||
|
||||
u32 ShowCheckPage(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -720,7 +719,7 @@ u32 ShowCheckPage(s32 taskState)
|
||||
UpdateWindowsToShowCheckPage(state);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8820() || IsDma3ManagerBusyWithBgCopy1(state))
|
||||
if (IsMatchCallListTaskActive() || IsDma3ManagerBusyWithBgCopy1(state))
|
||||
return LT_PAUSE;
|
||||
|
||||
PrintHelpBarText(HELPBAR_MC_CHECK_PAGE);
|
||||
@@ -730,7 +729,7 @@ u32 ShowCheckPage(s32 taskState)
|
||||
LoadCheckPageTrainerPic(state);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81C8820() || WaitForTrainerPic(state) || WaitForHelpBar())
|
||||
if (IsMatchCallListTaskActive() || WaitForTrainerPic(state) || WaitForHelpBar())
|
||||
return LT_PAUSE;
|
||||
break;
|
||||
}
|
||||
@@ -742,7 +741,7 @@ u32 ShowCheckPageDown(s32 taskState)
|
||||
{
|
||||
int topId;
|
||||
int delta;
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -769,7 +768,7 @@ u32 ShowCheckPageDown(s32 taskState)
|
||||
LoadCheckPageTrainerPic(state);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
if (sub_81C8820() || WaitForTrainerPic(state))
|
||||
if (IsMatchCallListTaskActive() || WaitForTrainerPic(state))
|
||||
return LT_PAUSE;
|
||||
break;
|
||||
}
|
||||
@@ -779,7 +778,7 @@ u32 ShowCheckPageDown(s32 taskState)
|
||||
|
||||
u32 ExitCheckPage(s32 taskState)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -788,7 +787,7 @@ u32 ExitCheckPage(s32 taskState)
|
||||
sub_81C87F0();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8820() || WaitForTrainerPic(state))
|
||||
if (IsMatchCallListTaskActive() || WaitForTrainerPic(state))
|
||||
return LT_PAUSE;
|
||||
|
||||
PrintHelpBarText(HELPBAR_MC_TRAINER_LIST);
|
||||
@@ -807,7 +806,7 @@ u32 ShowCheckPageUp(s32 taskState)
|
||||
{
|
||||
int topId;
|
||||
int delta;
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -834,7 +833,7 @@ u32 ShowCheckPageUp(s32 taskState)
|
||||
LoadCheckPageTrainerPic(state);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
if (sub_81C8820() || WaitForTrainerPic(state))
|
||||
if (IsMatchCallListTaskActive() || WaitForTrainerPic(state))
|
||||
return LT_PAUSE;
|
||||
break;
|
||||
}
|
||||
@@ -850,35 +849,35 @@ u32 ExitMatchCall(s32 taskState)
|
||||
PlaySE(SE_SELECT);
|
||||
sub_81CBC38(0);
|
||||
PokenavFadeScreen(0);
|
||||
sub_81C78A0();
|
||||
SlideMenuHeaderDown();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsPaletteFadeActive() || MainMenuLoopedTaskIsBusy())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81C7FDC();
|
||||
SetLeftHeaderSpritesInvisibility();
|
||||
break;
|
||||
}
|
||||
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static void sub_81CBBB8(void)
|
||||
static void InitMatchCallPokenavListMenuTemplate(void)
|
||||
{
|
||||
struct PokenavListTemplate template;
|
||||
template.list.matchCallEntries = sub_81CAE94();
|
||||
template.unk4 = GetNumberRegistered();
|
||||
template.count = GetNumberRegistered();
|
||||
template.unk8 = 4;
|
||||
template.unk6 = 0;
|
||||
template.unk9 = 13;
|
||||
template.unkA = 16;
|
||||
template.unkB = 1;
|
||||
template.unkC = 8;
|
||||
template.unkD = 3;
|
||||
template.unkE = 7;
|
||||
template.item_X = 13;
|
||||
template.windowWidth = 16;
|
||||
template.listTop = 1;
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 3;
|
||||
template.fontId = 7;
|
||||
template.listFunc.unk10_2 = BufferMatchCallNameAndDesc;
|
||||
template.unk14 = TryDrawRematchPokeballIcon;
|
||||
sub_81C81D4(&gUnknown_0862278C[2], &template, 2);
|
||||
sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2);
|
||||
CreateTask(sub_81CBC64, 7);
|
||||
}
|
||||
|
||||
@@ -903,7 +902,7 @@ static void sub_81CBC64(u8 taskId)
|
||||
taskData[0] += 4;
|
||||
taskData[0] &= 0x7F;
|
||||
taskData[1] = gSineTable[taskData[0]] >> 4;
|
||||
sub_81C79BC(gUnknown_08622720, gUnknown_08622720 + 0x10, 0x10, 0x10, taskData[1], gPlttBufferUnfaded + 0x50);
|
||||
PokenavCopyPalette(gUnknown_08622720, gUnknown_08622720 + 0x10, 0x10, 0x10, taskData[1], gPlttBufferUnfaded + 0x50);
|
||||
if (!gPaletteFade.active)
|
||||
CpuCopy32(gPlttBufferUnfaded + 0x50, gPlttBufferFaded + 0x50, 0x20);
|
||||
}
|
||||
@@ -1001,7 +1000,7 @@ static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1)
|
||||
{
|
||||
u8 mapName[32];
|
||||
int x;
|
||||
int index = GetSelectedMatchCall() + arg1;
|
||||
int index = GetSelectedPokenavListIndex() + arg1;
|
||||
int mapSec = GetMatchCallMapSec(index);
|
||||
if (mapSec != MAPSEC_NONE)
|
||||
GetMapName(mapName, mapSec, 0);
|
||||
@@ -1118,7 +1117,7 @@ static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *state)
|
||||
|
||||
static void PrintMatchCallMessage(struct Pokenav4Struct *state)
|
||||
{
|
||||
int index = GetSelectedMatchCall();
|
||||
int index = GetSelectedPokenavListIndex();
|
||||
const u8 *str = GetMatchCallMessageText(index, &state->unkF);
|
||||
u8 speed = GetPlayerTextSpeedDelay();
|
||||
AddTextPrinterParameterized(state->msgBoxWindowId, 1, str, 32, 1, speed, NULL);
|
||||
@@ -1152,7 +1151,7 @@ static void sub_81CC214(void)
|
||||
int i;
|
||||
u8 paletteNum;
|
||||
struct SpriteSheet spriteSheet;
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gUnknown_08622810); i++)
|
||||
LoadCompressedSpriteSheet(&gUnknown_08622810[i]);
|
||||
@@ -1169,9 +1168,9 @@ static void sub_81CC214(void)
|
||||
state->trainerPicSprite->invisible = TRUE;
|
||||
}
|
||||
|
||||
static void sub_81CC2B4(void)
|
||||
static void RemoveMatchCallSprites(void)
|
||||
{
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(6);
|
||||
struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN);
|
||||
if (state->optionsCursorSprite)
|
||||
DestroySprite(state->optionsCursorSprite);
|
||||
if (state->trainerPicSprite)
|
||||
@@ -1222,7 +1221,7 @@ static struct Sprite *CreateTrainerPicSprite(void)
|
||||
static void LoadCheckPageTrainerPic(struct Pokenav4Struct *state)
|
||||
{
|
||||
u16 cursor;
|
||||
int trainerPic = GetMatchCallTrainerPic(GetSelectedMatchCall());
|
||||
int trainerPic = GetMatchCallTrainerPic(GetSelectedPokenavListIndex());
|
||||
if (trainerPic >= 0)
|
||||
{
|
||||
DecompressPicFromTable(&gTrainerFrontPicTable[trainerPic], state->unk1828, SPECIES_NONE);
|
||||
|
||||
+215
-215
@@ -9,7 +9,7 @@
|
||||
|
||||
// TODO: This UI isnt just for match call, seems to be the general pokenav list UI
|
||||
|
||||
struct UnknownSubSubStruct_0203CF40 {
|
||||
struct PokenavListMenuWindow {
|
||||
u8 bg;
|
||||
u8 unk1;
|
||||
u8 unk2;
|
||||
@@ -38,14 +38,14 @@ struct MatchCallWindowState {
|
||||
|
||||
struct PokenavSub17Substruct
|
||||
{
|
||||
struct UnknownSubSubStruct_0203CF40 unk0;
|
||||
struct PokenavListMenuWindow listWindow;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
void * unk1C;
|
||||
s32 unk20;
|
||||
s32 unk24;
|
||||
u32 unk28;
|
||||
u32 loopedTaskId;
|
||||
s32 unk2C;
|
||||
u32 unk30;
|
||||
void (*unk34)(struct PokenavMatchCallEntries *, u8*);
|
||||
@@ -59,34 +59,34 @@ struct PokenavSub17Substruct
|
||||
// Generally at index 0x11 (17)
|
||||
struct PokenavSub17
|
||||
{
|
||||
struct PokenavSub17Substruct unk0;
|
||||
struct PokenavSub17Substruct list;
|
||||
u8 tilemapBuffer[0x800];
|
||||
struct MatchCallWindowState unk888;
|
||||
s32 unk89C;
|
||||
u32 unk8A0;
|
||||
u32 loopedTaskId;
|
||||
};
|
||||
|
||||
extern void sub_81DB620(u32 windowId, u32 a1, u32 a2, u32 a3, u32 a4);
|
||||
|
||||
void sub_81C82E4(struct PokenavSub17 *a0);
|
||||
bool32 sub_81C91AC(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3);
|
||||
void sub_81C9160(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1);
|
||||
void sub_81C82E4(struct PokenavSub17 *matchCall);
|
||||
bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3);
|
||||
void InitMatchCallWindowState(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1);
|
||||
void SpriteCB_MatchCallUpArrow(struct Sprite *sprite);
|
||||
void SpriteCB_MatchCallDownArrow(struct Sprite *sprite);
|
||||
void SpriteCB_MatchCallRightArrow(struct Sprite *sprite);
|
||||
void ToggleMatchCallArrows(struct PokenavSub17Substruct *a0, u32 a1);
|
||||
void sub_81C8FE0(struct PokenavSub17Substruct *a0);
|
||||
void sub_81C8EF8(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1);
|
||||
void DestroyMatchCallListArrows(struct PokenavSub17Substruct *a0);
|
||||
void CreateMatchCallArrowSprites(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1);
|
||||
void sub_81C8ED0(void);
|
||||
static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1, u32 a2);
|
||||
void PrintMatchCallFieldNames(struct PokenavSub17Substruct *a0, u32 a1);
|
||||
void sub_81C8D4C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1);
|
||||
void sub_81C8CB4(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1);
|
||||
void sub_81C8B70(struct UnknownSubSubStruct_0203CF40 *a0, s32 a1, s32 a2);
|
||||
void sub_81C8B70(struct PokenavListMenuWindow *a0, s32 a1, s32 a2);
|
||||
void sub_81C8568(s32 a0, struct PokenavSub17Substruct *a1);
|
||||
void sub_81C83AC(void * a0, u32 a1, u32 a2, u32 a3, u32 a4, struct PokenavSub17Substruct *a5);
|
||||
void sub_81C837C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1);
|
||||
void sub_81C835C(struct UnknownSubSubStruct_0203CF40 *a0);
|
||||
void sub_81C835C(struct PokenavListMenuWindow *a0);
|
||||
u32 LoopedTask_sub_81C8254(s32 state);
|
||||
bool32 sub_81C83E0(void);
|
||||
u32 LoopedTask_sub_81C83F0(s32 state);
|
||||
@@ -102,12 +102,12 @@ EWRAM_DATA u32 gUnknown_0203CF44 = 0;
|
||||
|
||||
bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = AllocSubstruct(17, sizeof(struct PokenavSub17));
|
||||
struct PokenavSub17 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_LIST, sizeof(struct PokenavSub17));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
sub_81C9160(&structPtr->unk888, arg1);
|
||||
if (!sub_81C91AC(&structPtr->unk0, arg0, arg1, arg2))
|
||||
InitMatchCallWindowState(&structPtr->unk888, arg1);
|
||||
if (!CopyPokenavListMenuTemplate(&structPtr->list, arg0, arg1, arg2))
|
||||
return FALSE;
|
||||
|
||||
CreateLoopedTask(LoopedTask_sub_81C8254, 6);
|
||||
@@ -123,10 +123,10 @@ void sub_81C8234(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr;
|
||||
|
||||
structPtr = GetSubstructPtr(17);
|
||||
sub_81C8FE0(&structPtr->unk0);
|
||||
RemoveWindow(structPtr->unk0.unk0.windowId);
|
||||
FreePokenavSubstruct(17);
|
||||
structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
DestroyMatchCallListArrows(&structPtr->list);
|
||||
RemoveWindow(structPtr->list.listWindow.windowId);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
}
|
||||
|
||||
u32 LoopedTask_sub_81C8254(s32 state)
|
||||
@@ -134,9 +134,9 @@ u32 LoopedTask_sub_81C8254(s32 state)
|
||||
struct PokenavSub17 *structPtr;
|
||||
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
return 2;
|
||||
return LT_PAUSE;
|
||||
|
||||
structPtr = GetSubstructPtr(17);
|
||||
structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@@ -144,10 +144,10 @@ u32 LoopedTask_sub_81C8254(s32 state)
|
||||
sub_81C82E4(structPtr);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
sub_81C835C(&structPtr->unk0.unk0);
|
||||
sub_81C835C(&structPtr->list.listWindow);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
sub_81C837C(&structPtr->unk888, &structPtr->unk0);
|
||||
sub_81C837C(&structPtr->unk888, &structPtr->list);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81C83E0())
|
||||
@@ -160,53 +160,53 @@ u32 LoopedTask_sub_81C8254(s32 state)
|
||||
return LT_INC_AND_CONTINUE;
|
||||
}
|
||||
case 4:
|
||||
sub_81C8EF8(&structPtr->unk888, &structPtr->unk0);
|
||||
CreateMatchCallArrowSprites(&structPtr->unk888, &structPtr->list);
|
||||
return LT_FINISH;
|
||||
default:
|
||||
return LT_FINISH;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81C82E4(struct PokenavSub17 *a0)
|
||||
void sub_81C82E4(struct PokenavSub17 *matchCall)
|
||||
{
|
||||
u16 tileNum = (a0->unk0.unk0.unk1 << 12) | a0->unk0.unk0.unk6;
|
||||
sub_8199DF0(a0->unk0.unk0.bg, PIXEL_FILL(1), a0->unk0.unk0.unk6, 1);
|
||||
sub_8199DF0(a0->unk0.unk0.bg, PIXEL_FILL(4), a0->unk0.unk0.unk6 + 1, 1);
|
||||
SetBgTilemapBuffer(a0->unk0.unk0.bg, a0->tilemapBuffer);
|
||||
FillBgTilemapBufferRect_Palette0(a0->unk0.unk0.bg, tileNum, 0, 0, 32, 32);
|
||||
ChangeBgY(a0->unk0.unk0.bg, 0, 0);
|
||||
ChangeBgX(a0->unk0.unk0.bg, 0, 0);
|
||||
ChangeBgY(a0->unk0.unk0.bg, a0->unk0.unk0.unk3 << 11, 2);
|
||||
CopyBgTilemapBufferToVram(a0->unk0.unk0.bg);
|
||||
u16 tileNum = (matchCall->list.listWindow.unk1 << 12) | matchCall->list.listWindow.unk6;
|
||||
sub_8199DF0(matchCall->list.listWindow.bg, PIXEL_FILL(1), matchCall->list.listWindow.unk6, 1);
|
||||
sub_8199DF0(matchCall->list.listWindow.bg, PIXEL_FILL(4), matchCall->list.listWindow.unk6 + 1, 1);
|
||||
SetBgTilemapBuffer(matchCall->list.listWindow.bg, matchCall->tilemapBuffer);
|
||||
FillBgTilemapBufferRect_Palette0(matchCall->list.listWindow.bg, tileNum, 0, 0, 32, 32);
|
||||
ChangeBgY(matchCall->list.listWindow.bg, 0, 0);
|
||||
ChangeBgX(matchCall->list.listWindow.bg, 0, 0);
|
||||
ChangeBgY(matchCall->list.listWindow.bg, matchCall->list.listWindow.unk3 << 11, 2);
|
||||
CopyBgTilemapBufferToVram(matchCall->list.listWindow.bg);
|
||||
}
|
||||
|
||||
void sub_81C835C(struct UnknownSubSubStruct_0203CF40 *a0)
|
||||
void sub_81C835C(struct PokenavListMenuWindow *listWindow)
|
||||
{
|
||||
FillWindowPixelBuffer(a0->windowId, PIXEL_FILL(1));
|
||||
PutWindowTilemap(a0->windowId);
|
||||
CopyWindowToVram(a0->windowId, 1);
|
||||
FillWindowPixelBuffer(listWindow->windowId, PIXEL_FILL(1));
|
||||
PutWindowTilemap(listWindow->windowId);
|
||||
CopyWindowToVram(listWindow->windowId, 1);
|
||||
}
|
||||
|
||||
void sub_81C837C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1)
|
||||
void sub_81C837C(struct MatchCallWindowState *state, struct PokenavSub17Substruct *a1)
|
||||
{
|
||||
s32 arg2 = a0->listLength - a0->windowTopIndex;
|
||||
if (arg2 > a0->visibleEntries)
|
||||
arg2 = a0->visibleEntries;
|
||||
s32 arg2 = state->listLength - state->windowTopIndex;
|
||||
if (arg2 > state->visibleEntries)
|
||||
arg2 = state->visibleEntries;
|
||||
|
||||
sub_81C83AC(a0->unk10, a0->windowTopIndex, arg2, a0->unkC, 0, a1);
|
||||
sub_81C83AC(state->unk10, state->windowTopIndex, arg2, state->unkC, 0, a1);
|
||||
}
|
||||
|
||||
void sub_81C83AC(void * a0, u32 a1, u32 a2, u32 a3, u32 a4, struct PokenavSub17Substruct *a5)
|
||||
void sub_81C83AC(void * a0, u32 a1, u32 a2, u32 a3, u32 a4, struct PokenavSub17Substruct *list)
|
||||
{
|
||||
if (a2 == 0)
|
||||
return;
|
||||
|
||||
a5->unk1C = a0 + a1 * a3;
|
||||
a5->unk18 = a3;
|
||||
a5->unk0.unkC = 0;
|
||||
a5->unk0.unkE = a2;
|
||||
a5->unk14 = a1;
|
||||
a5->unk10 = a4;
|
||||
list->unk1C = a0 + a1 * a3;
|
||||
list->unk18 = a3;
|
||||
list->listWindow.unkC = 0;
|
||||
list->listWindow.unkE = a2;
|
||||
list->unk14 = a1;
|
||||
list->unk10 = a4;
|
||||
CreateLoopedTask(LoopedTask_sub_81C83F0, 5);
|
||||
}
|
||||
|
||||
@@ -218,23 +218,23 @@ bool32 sub_81C83E0(void)
|
||||
u32 LoopedTask_sub_81C83F0(s32 state)
|
||||
{
|
||||
u32 v1;
|
||||
struct PokenavSub17Substruct *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17Substruct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
v1 = (structPtr->unk0.unkA + structPtr->unk0.unkC + structPtr->unk10) & 0xF;
|
||||
v1 = (structPtr->listWindow.unkA + structPtr->listWindow.unkC + structPtr->unk10) & 0xF;
|
||||
structPtr->unk34(structPtr->unk1C, structPtr->unkTextBuffer);
|
||||
if (structPtr->unk38 != NULL)
|
||||
structPtr->unk38(structPtr->unk0.windowId, structPtr->unk14, v1);
|
||||
structPtr->unk38(structPtr->listWindow.windowId, structPtr->unk14, v1);
|
||||
|
||||
AddTextPrinterParameterized(structPtr->unk0.windowId, structPtr->unk0.fontId, structPtr->unkTextBuffer, 8, (v1 << 4) + 1, 255, NULL);
|
||||
if (++structPtr->unk0.unkC >= structPtr->unk0.unkE)
|
||||
AddTextPrinterParameterized(structPtr->listWindow.windowId, structPtr->listWindow.fontId, structPtr->unkTextBuffer, 8, (v1 << 4) + 1, 255, NULL);
|
||||
if (++structPtr->listWindow.unkC >= structPtr->listWindow.unkE)
|
||||
{
|
||||
if (structPtr->unk38 != NULL)
|
||||
CopyWindowToVram(structPtr->unk0.windowId, 3);
|
||||
CopyWindowToVram(structPtr->listWindow.windowId, 3);
|
||||
else
|
||||
CopyWindowToVram(structPtr->unk0.windowId, 2);
|
||||
CopyWindowToVram(structPtr->listWindow.windowId, 2);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
else
|
||||
@@ -253,14 +253,14 @@ u32 LoopedTask_sub_81C83F0(s32 state)
|
||||
|
||||
bool32 ShouldShowUpArrow(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
|
||||
return (structPtr->unk888.windowTopIndex != 0);
|
||||
}
|
||||
|
||||
bool32 ShouldShowDownArrow(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
struct MatchCallWindowState *subPtr = &structPtr->unk888;
|
||||
|
||||
return (subPtr->windowTopIndex + subPtr->visibleEntries < subPtr->listLength);
|
||||
@@ -268,7 +268,7 @@ bool32 ShouldShowDownArrow(void)
|
||||
|
||||
void MatchCall_MoveWindow(s32 a0, bool32 a1)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
struct MatchCallWindowState *subPtr = &structPtr->unk888;
|
||||
|
||||
if (a0 < 0)
|
||||
@@ -276,7 +276,7 @@ void MatchCall_MoveWindow(s32 a0, bool32 a1)
|
||||
if (subPtr->windowTopIndex + a0 < 0)
|
||||
a0 = -1 * subPtr->windowTopIndex;
|
||||
if (a1)
|
||||
sub_81C83AC(subPtr->unk10, subPtr->windowTopIndex + a0, a0 * -1, subPtr->unkC, a0, &structPtr->unk0);
|
||||
sub_81C83AC(subPtr->unk10, subPtr->windowTopIndex + a0, a0 * -1, subPtr->unkC, a0, &structPtr->list);
|
||||
}
|
||||
else if (a1)
|
||||
{
|
||||
@@ -284,31 +284,31 @@ void MatchCall_MoveWindow(s32 a0, bool32 a1)
|
||||
if (temp + a0 >= subPtr->listLength)
|
||||
a0 = subPtr->listLength - temp;
|
||||
|
||||
sub_81C83AC(subPtr->unk10, gUnknown_0203CF44, a0, subPtr->unkC, subPtr->visibleEntries, &structPtr->unk0);
|
||||
sub_81C83AC(subPtr->unk10, gUnknown_0203CF44, a0, subPtr->unkC, subPtr->visibleEntries, &structPtr->list);
|
||||
}
|
||||
|
||||
sub_81C8568(a0, &structPtr->unk0);
|
||||
sub_81C8568(a0, &structPtr->list);
|
||||
subPtr->windowTopIndex += a0;
|
||||
}
|
||||
|
||||
void sub_81C8568(s32 a0, struct PokenavSub17Substruct *a1)
|
||||
void sub_81C8568(s32 a0, struct PokenavSub17Substruct *list)
|
||||
{
|
||||
a1->unk20 = GetBgY(a1->unk0.bg);
|
||||
a1->unk24 = a1->unk20 + (a0 << 12);
|
||||
list->unk20 = GetBgY(list->listWindow.bg);
|
||||
list->unk24 = list->unk20 + (a0 << 12);
|
||||
if (a0 > 0)
|
||||
a1->unk30 = 1;
|
||||
list->unk30 = 1;
|
||||
else
|
||||
a1->unk30 = 2;
|
||||
a1->unk2C = a0;
|
||||
a1->unk28 = CreateLoopedTask(LoopedTask_sub_81C85A0, 6);
|
||||
list->unk30 = 2;
|
||||
list->unk2C = a0;
|
||||
list->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C85A0, 6);
|
||||
}
|
||||
|
||||
u32 LoopedTask_sub_81C85A0(s32 state)
|
||||
{
|
||||
s32 y, v1;
|
||||
bool32 flag;
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17Substruct *subPtr = &structPtr->unk0;
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
struct PokenavSub17Substruct *subPtr = &structPtr->list;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@@ -318,8 +318,8 @@ u32 LoopedTask_sub_81C85A0(s32 state)
|
||||
return LT_PAUSE;
|
||||
case 1:
|
||||
flag = FALSE;
|
||||
y = GetBgY(subPtr->unk0.bg);
|
||||
v1 = ChangeBgY(subPtr->unk0.bg, 0x1000, subPtr->unk30);
|
||||
y = GetBgY(subPtr->listWindow.bg);
|
||||
v1 = ChangeBgY(subPtr->listWindow.bg, 0x1000, subPtr->unk30);
|
||||
if (subPtr->unk30 == 2)
|
||||
{
|
||||
if ((y > subPtr->unk24 || y <= subPtr->unk20) && v1 <= subPtr->unk24)
|
||||
@@ -333,8 +333,8 @@ u32 LoopedTask_sub_81C85A0(s32 state)
|
||||
|
||||
if (flag)
|
||||
{
|
||||
subPtr->unk0.unkA = (subPtr->unk0.unkA + subPtr->unk2C) & 0xF;
|
||||
ChangeBgY(subPtr->unk0.bg, subPtr->unk24, 0);
|
||||
subPtr->listWindow.unkA = (subPtr->listWindow.unkA + subPtr->unk2C) & 0xF;
|
||||
ChangeBgY(subPtr->listWindow.bg, subPtr->unk24, 0);
|
||||
return LT_FINISH;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
@@ -342,15 +342,15 @@ u32 LoopedTask_sub_81C85A0(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
bool32 sub_81C8630(void)
|
||||
bool32 IsMonListLoopedTaskActive(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
return IsLoopedTaskActive(structPtr->unk0.unk28);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
return IsLoopedTaskActive(structPtr->list.loopedTaskId);
|
||||
}
|
||||
|
||||
struct MatchCallWindowState *GetMatchCallWindowStruct(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
return &structPtr->unk888;
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ int MatchCall_PageDown(void)
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetSelectedMatchCall(void)
|
||||
u32 GetSelectedPokenavListIndex(void)
|
||||
{
|
||||
struct MatchCallWindowState *structPtr = GetMatchCallWindowStruct();
|
||||
|
||||
@@ -464,53 +464,53 @@ u32 GetMatchCallListTopIndex(void)
|
||||
|
||||
void sub_81C877C(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
structPtr->unk89C = 0;
|
||||
structPtr->unk8A0 = CreateLoopedTask(LoopedTask_sub_81C8870, 6);
|
||||
structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8870, 6);
|
||||
}
|
||||
|
||||
void PrintCheckPageInfo(s16 a0)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
structPtr->unk888.windowTopIndex += a0;
|
||||
structPtr->unk89C = 0;
|
||||
structPtr->unk8A0 = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6);
|
||||
structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6);
|
||||
}
|
||||
|
||||
void sub_81C87F0(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
structPtr->unk89C = 0;
|
||||
structPtr->unk8A0 = CreateLoopedTask(LoopedTask_sub_81C8A28, 6);
|
||||
structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8A28, 6);
|
||||
}
|
||||
|
||||
bool32 sub_81C8820(void)
|
||||
bool32 IsMatchCallListTaskActive(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
return IsLoopedTaskActive(structPtr->unk8A0);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
return IsLoopedTaskActive(structPtr->loopedTaskId);
|
||||
}
|
||||
|
||||
void sub_81C8838(void)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
struct MatchCallWindowState *subPtr = &structPtr->unk888;
|
||||
structPtr->unk0.unk38(structPtr->unk0.unk0.windowId, subPtr->windowTopIndex + subPtr->selectedIndexOffset, (structPtr->unk0.unk0.unkA + subPtr->selectedIndexOffset) & 0xF);
|
||||
CopyWindowToVram(structPtr->unk0.unk0.windowId, 1);
|
||||
structPtr->list.unk38(structPtr->list.listWindow.windowId, subPtr->windowTopIndex + subPtr->selectedIndexOffset, (structPtr->list.listWindow.unkA + subPtr->selectedIndexOffset) & 0xF);
|
||||
CopyWindowToVram(structPtr->list.listWindow.windowId, 1);
|
||||
}
|
||||
|
||||
// TODO:
|
||||
u32 LoopedTask_sub_81C8870(s32 state)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
ToggleMatchCallArrows(&structPtr->unk0, 1);
|
||||
ToggleMatchCallArrows(&structPtr->list, 1);
|
||||
// fall-through
|
||||
case 1:
|
||||
if (structPtr->unk89C != structPtr->unk888.selectedIndexOffset)
|
||||
sub_81C8B70(&structPtr->unk0.unk0, structPtr->unk89C, 1);
|
||||
sub_81C8B70(&structPtr->list.listWindow, structPtr->unk89C, 1);
|
||||
|
||||
structPtr->unk89C++;
|
||||
return LT_INC_AND_PAUSE;
|
||||
@@ -520,7 +520,7 @@ u32 LoopedTask_sub_81C8870(s32 state)
|
||||
if (structPtr->unk89C != structPtr->unk888.visibleEntries)
|
||||
return 6;
|
||||
if (structPtr->unk888.selectedIndexOffset != 0)
|
||||
sub_81C8B70(&structPtr->unk0.unk0, structPtr->unk89C, structPtr->unk888.selectedIndexOffset);
|
||||
sub_81C8B70(&structPtr->list.listWindow, structPtr->unk89C, structPtr->unk888.selectedIndexOffset);
|
||||
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
@@ -537,7 +537,7 @@ u32 LoopedTask_sub_81C8870(s32 state)
|
||||
}
|
||||
return LT_PAUSE;
|
||||
case 4:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
|
||||
structPtr->unk888.selectedIndexOffset = 0;
|
||||
@@ -548,35 +548,35 @@ u32 LoopedTask_sub_81C8870(s32 state)
|
||||
|
||||
u32 LoopedTask_PrintCheckPageInfo(s32 state)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
return LT_PAUSE;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
sub_81C8CB4(&structPtr->unk888, &structPtr->unk0);
|
||||
sub_81C8CB4(&structPtr->unk888, &structPtr->list);
|
||||
break;
|
||||
case 1:
|
||||
PrintMatchCallFieldNames(&structPtr->unk0, 0);
|
||||
PrintMatchCallFieldNames(&structPtr->list, 0);
|
||||
break;
|
||||
case 2:
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_STRATEGY);
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_STRATEGY);
|
||||
break;
|
||||
case 3:
|
||||
PrintMatchCallFieldNames(&structPtr->unk0, 1);
|
||||
PrintMatchCallFieldNames(&structPtr->list, 1);
|
||||
break;
|
||||
case 4:
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_POKEMON);
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_POKEMON);
|
||||
break;
|
||||
case 5:
|
||||
PrintMatchCallFieldNames(&structPtr->unk0, 2);
|
||||
PrintMatchCallFieldNames(&structPtr->list, 2);
|
||||
break;
|
||||
case 6:
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_INTRO_1);
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_INTRO_1);
|
||||
break;
|
||||
case 7:
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_INTRO_2);
|
||||
PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_INTRO_2);
|
||||
break;
|
||||
default:
|
||||
return LT_FINISH;
|
||||
@@ -594,9 +594,9 @@ u32 LoopedTask_sub_81C8A28(s32 state)
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
return LT_PAUSE;
|
||||
|
||||
structPtr = GetSubstructPtr(17);
|
||||
structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
subPtr888 = &structPtr->unk888;
|
||||
subPtr0 = &structPtr->unk0;
|
||||
subPtr0 = &structPtr->list;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
@@ -607,7 +607,7 @@ u32 LoopedTask_sub_81C8A28(s32 state)
|
||||
ptr = &structPtr->unk89C;
|
||||
if (++(*ptr) < structPtr->unk888.visibleEntries)
|
||||
{
|
||||
sub_81C8B70(&subPtr0->unk0, *ptr, 1);
|
||||
sub_81C8B70(&subPtr0->listWindow, *ptr, 1);
|
||||
return LT_PAUSE;
|
||||
}
|
||||
|
||||
@@ -618,7 +618,7 @@ u32 LoopedTask_sub_81C8A28(s32 state)
|
||||
{
|
||||
s32 r4 = subPtr888->windowTopIndex;
|
||||
r5 = -r4;
|
||||
sub_81C8B70(&subPtr0->unk0, r5, r4);
|
||||
sub_81C8B70(&subPtr0->listWindow, r5, r4);
|
||||
subPtr888->selectedIndexOffset = r4;
|
||||
*ptr = r5;
|
||||
return LT_INC_AND_PAUSE;
|
||||
@@ -630,7 +630,7 @@ u32 LoopedTask_sub_81C8A28(s32 state)
|
||||
{
|
||||
s32 r4 = subPtr888->windowTopIndex + subPtr888->visibleEntries - subPtr888->listLength;
|
||||
r5 = -r4;
|
||||
sub_81C8B70(&subPtr0->unk0, r5, r4);
|
||||
sub_81C8B70(&subPtr0->listWindow, r5, r4);
|
||||
subPtr888->selectedIndexOffset = r4;
|
||||
*ptr = r5;
|
||||
return LT_INC_AND_PAUSE;
|
||||
@@ -641,14 +641,14 @@ u32 LoopedTask_sub_81C8A28(s32 state)
|
||||
MatchCall_MoveWindow(structPtr->unk89C, FALSE);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (!sub_81C8630())
|
||||
if (!IsMonListLoopedTaskActive())
|
||||
{
|
||||
structPtr->unk89C = 0;
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
case 4:
|
||||
sub_81C83AC(subPtr888->unk10, subPtr888->windowTopIndex + structPtr->unk89C, 1, subPtr888->unkC, structPtr->unk89C, &structPtr->unk0);
|
||||
sub_81C83AC(subPtr888->unk10, subPtr888->windowTopIndex + structPtr->unk89C, 1, subPtr888->unkC, structPtr->unk89C, &structPtr->list);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 5:
|
||||
if (sub_81C83E0())
|
||||
@@ -664,16 +664,16 @@ u32 LoopedTask_sub_81C8A28(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
void sub_81C8B70(struct UnknownSubSubStruct_0203CF40 *a0, s32 a1, s32 a2)
|
||||
void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2)
|
||||
{
|
||||
u8 *v1 = (u8*)GetWindowAttribute(a0->windowId, WINDOW_TILE_DATA);
|
||||
u32 v2 = a0->unk4 * 64;
|
||||
u8 *v1 = (u8*)GetWindowAttribute(listWindow->windowId, WINDOW_TILE_DATA);
|
||||
u32 v2 = listWindow->unk4 * 64;
|
||||
|
||||
a1 = (a0->unkA + a1) & 0xF;
|
||||
a1 = (listWindow->unkA + a1) & 0xF;
|
||||
if (a1 + a2 <= 16)
|
||||
{
|
||||
CpuFastFill8(PIXEL_FILL(1), v1 + a1 * v2, a2 * v2);
|
||||
CopyWindowToVram(a0->windowId, 2);
|
||||
CopyWindowToVram(listWindow->windowId, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -682,63 +682,63 @@ void sub_81C8B70(struct UnknownSubSubStruct_0203CF40 *a0, s32 a1, s32 a2)
|
||||
|
||||
CpuFastFill8(PIXEL_FILL(1), v1 + a1 * v2, v3 * v2);
|
||||
CpuFastFill8(PIXEL_FILL(1), v1, v4 * v2);
|
||||
CopyWindowToVram(a0->windowId, 2);
|
||||
CopyWindowToVram(listWindow->windowId, 2);
|
||||
}
|
||||
|
||||
for (a2--; a2 != -1; a1 = (a1 + 1) & 0xF, a2--)
|
||||
ClearRematchPokeballIcon(a0->windowId, a1);
|
||||
ClearRematchPokeballIcon(listWindow->windowId, a1);
|
||||
|
||||
CopyWindowToVram(a0->windowId, 1);
|
||||
CopyWindowToVram(listWindow->windowId, 1);
|
||||
}
|
||||
|
||||
void sub_81C8C64(struct UnknownSubSubStruct_0203CF40 *a0, u32 a1)
|
||||
void sub_81C8C64(struct PokenavListMenuWindow *listWindow, u32 a1)
|
||||
{
|
||||
u16 var;
|
||||
u16 *v1 = (u16*)GetBgTilemapBuffer(GetWindowAttribute(a0->windowId, WINDOW_BG));
|
||||
v1 += ((a0->unkA << 6) + a0->unk2) - 1;
|
||||
u16 *v1 = (u16*)GetBgTilemapBuffer(GetWindowAttribute(listWindow->windowId, WINDOW_BG));
|
||||
v1 += ((listWindow->unkA << 6) + listWindow->unk2) - 1;
|
||||
|
||||
if (a1 != 0)
|
||||
var = (a0->unk1 << 12) | (a0->unk6 + 1);
|
||||
var = (listWindow->unk1 << 12) | (listWindow->unk6 + 1);
|
||||
else
|
||||
var = (a0->unk1 << 12) | (a0->unk6);
|
||||
var = (listWindow->unk1 << 12) | (listWindow->unk6);
|
||||
|
||||
v1[0] = var;
|
||||
v1[0x20] = var;
|
||||
}
|
||||
|
||||
void sub_81C8CB4(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1)
|
||||
void sub_81C8CB4(struct MatchCallWindowState *state, struct PokenavSub17Substruct *list)
|
||||
{
|
||||
u8 colors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_RED};
|
||||
|
||||
a1->unk34(a0->unk10 + a0->unkC * a0->windowTopIndex, a1->unkTextBuffer);
|
||||
a1->unk38(a1->unk0.windowId, a0->windowTopIndex, a1->unk0.unkA);
|
||||
FillWindowPixelRect(a1->unk0.windowId, PIXEL_FILL(4), 0, a1->unk0.unkA * 16, a1->unk0.unk4 * 8, 16);
|
||||
AddTextPrinterParameterized3(a1->unk0.windowId, a1->unk0.fontId, 8, (a1->unk0.unkA * 16) + 1, colors, TEXT_SPEED_FF, a1->unkTextBuffer);
|
||||
sub_81C8C64(&a1->unk0, 1);
|
||||
CopyWindowRectToVram(a1->unk0.windowId, 3, 0, a1->unk0.unkA * 2, a1->unk0.unk4, 2);
|
||||
list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer);
|
||||
list->unk38(list->listWindow.windowId, state->windowTopIndex, list->listWindow.unkA);
|
||||
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16);
|
||||
AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SPEED_FF, list->unkTextBuffer);
|
||||
sub_81C8C64(&list->listWindow, 1);
|
||||
CopyWindowRectToVram(list->listWindow.windowId, 3, 0, list->listWindow.unkA * 2, list->listWindow.unk4, 2);
|
||||
}
|
||||
|
||||
void sub_81C8D4C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1)
|
||||
void sub_81C8D4C(struct MatchCallWindowState *state, struct PokenavSub17Substruct *list)
|
||||
{
|
||||
a1->unk34(a0->unk10 + a0->unkC * a0->windowTopIndex, a1->unkTextBuffer);
|
||||
FillWindowPixelRect(a1->unk0.windowId, PIXEL_FILL(1), 0, a1->unk0.unkA * 16, a1->unk0.unk4 * 8, 16);
|
||||
AddTextPrinterParameterized(a1->unk0.windowId, a1->unk0.fontId, a1->unkTextBuffer, 8, a1->unk0.unkA * 16 + 1, TEXT_SPEED_FF, NULL);
|
||||
sub_81C8C64(&a1->unk0, 0);
|
||||
CopyWindowToVram(a1->unk0.windowId, 3);
|
||||
list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer);
|
||||
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16);
|
||||
AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->unkTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SPEED_FF, NULL);
|
||||
sub_81C8C64(&list->listWindow, 0);
|
||||
CopyWindowToVram(list->listWindow.windowId, 3);
|
||||
}
|
||||
|
||||
void PrintMatchCallFieldNames(struct PokenavSub17Substruct *a0, u32 fieldId)
|
||||
void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId)
|
||||
{
|
||||
const u8 *fieldNames[] = {gText_PokenavMatchCall_Strategy, gText_PokenavMatchCall_TrainerPokemon, gText_PokenavMatchCall_SelfIntroduction};
|
||||
u8 colors[3] = {TEXT_COLOR_WHITE, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED};
|
||||
u32 top = (a0->unk0.unkA + 1 + (fieldId * 2)) & 0xF;
|
||||
u32 top = (list->listWindow.unkA + 1 + (fieldId * 2)) & 0xF;
|
||||
|
||||
FillWindowPixelRect(a0->unk0.windowId, PIXEL_FILL(1), 0, top << 4, a0->unk0.unk4, 16);
|
||||
AddTextPrinterParameterized3(a0->unk0.windowId, 7, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]);
|
||||
CopyWindowRectToVram(a0->unk0.windowId, 2, 0, top << 1, a0->unk0.unk4, 2);
|
||||
FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16);
|
||||
AddTextPrinterParameterized3(list->listWindow.windowId, 7, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]);
|
||||
CopyWindowRectToVram(list->listWindow.windowId, 2, 0, top << 1, list->listWindow.unk4, 2);
|
||||
}
|
||||
|
||||
static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1, u32 checkPageEntry)
|
||||
static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *list, u32 checkPageEntry)
|
||||
{
|
||||
// lines 1, 3, and 5 are the field names printed by PrintMatchCallFieldNames
|
||||
static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] =
|
||||
@@ -749,14 +749,14 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok
|
||||
[CHECK_PAGE_INTRO_2] = 7
|
||||
};
|
||||
|
||||
u32 r6 = (a1->unk0.unkA + lineOffsets[checkPageEntry]) & 0xF;
|
||||
u32 r6 = (list->listWindow.unkA + lineOffsets[checkPageEntry]) & 0xF;
|
||||
const u8 *str = GetMatchCallFlavorText(a0->windowTopIndex, checkPageEntry);
|
||||
|
||||
if (str != NULL)
|
||||
{
|
||||
sub_81DB620(a1->unk0.windowId, 1, r6 * 2, a1->unk0.unk4 - 1, 2);
|
||||
AddTextPrinterParameterized(a1->unk0.windowId, 7, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowRectToVram(a1->unk0.windowId, 2, 0, r6 * 2, a1->unk0.unk4, 2);
|
||||
sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2);
|
||||
AddTextPrinterParameterized(list->listWindow.windowId, 7, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowRectToVram(list->listWindow.windowId, 2, 0, r6 * 2, list->listWindow.unk4, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -839,57 +839,57 @@ void sub_81C8ED0(void)
|
||||
Pokenav_AllocAndLoadPalettes(sMatchcallArrowPalettes);
|
||||
}
|
||||
|
||||
void sub_81C8EF8(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1)
|
||||
void CreateMatchCallArrowSprites(struct MatchCallWindowState *windowState, struct PokenavSub17Substruct *list)
|
||||
{
|
||||
u32 spriteId;
|
||||
s16 x;
|
||||
|
||||
spriteId = CreateSprite(&sMatchCallRightArrowSprite, a1->unk0.unk2 * 8 + 3, (a1->unk0.unk3 + 1) * 8, 7);
|
||||
a1->rightArrow = &gSprites[spriteId];
|
||||
spriteId = CreateSprite(&sMatchCallRightArrowSprite, list->listWindow.unk2 * 8 + 3, (list->listWindow.unk3 + 1) * 8, 7);
|
||||
list->rightArrow = &gSprites[spriteId];
|
||||
|
||||
x = a1->unk0.unk2 * 8 + (a1->unk0.unk4 - 1) * 4;
|
||||
spriteId = CreateSprite(&sMatchCallUpDownArrowSprite, x, a1->unk0.unk3 * 8 + a0->visibleEntries * 16, 7);
|
||||
a1->downArrow = &gSprites[spriteId];
|
||||
a1->downArrow->oam.tileNum += 2;
|
||||
a1->downArrow->callback = SpriteCB_MatchCallDownArrow;
|
||||
x = list->listWindow.unk2 * 8 + (list->listWindow.unk4 - 1) * 4;
|
||||
spriteId = CreateSprite(&sMatchCallUpDownArrowSprite, x, list->listWindow.unk3 * 8 + windowState->visibleEntries * 16, 7);
|
||||
list->downArrow = &gSprites[spriteId];
|
||||
list->downArrow->oam.tileNum += 2;
|
||||
list->downArrow->callback = SpriteCB_MatchCallDownArrow;
|
||||
|
||||
spriteId = CreateSprite(&sMatchCallUpDownArrowSprite, x, a1->unk0.unk3 * 8, 7);
|
||||
a1->upArrow = &gSprites[spriteId];
|
||||
a1->upArrow->oam.tileNum += 4;
|
||||
a1->upArrow->callback = SpriteCB_MatchCallUpArrow;
|
||||
spriteId = CreateSprite(&sMatchCallUpDownArrowSprite, x, list->listWindow.unk3 * 8, 7);
|
||||
list->upArrow = &gSprites[spriteId];
|
||||
list->upArrow->oam.tileNum += 4;
|
||||
list->upArrow->callback = SpriteCB_MatchCallUpArrow;
|
||||
}
|
||||
|
||||
void sub_81C8FE0(struct PokenavSub17Substruct *a0)
|
||||
void DestroyMatchCallListArrows(struct PokenavSub17Substruct *list)
|
||||
{
|
||||
DestroySprite(a0->rightArrow);
|
||||
DestroySprite(a0->upArrow);
|
||||
DestroySprite(a0->downArrow);
|
||||
DestroySprite(list->rightArrow);
|
||||
DestroySprite(list->upArrow);
|
||||
DestroySprite(list->downArrow);
|
||||
FreeSpriteTilesByTag(0xA);
|
||||
FreeSpritePaletteByTag(0x14);
|
||||
}
|
||||
|
||||
void ToggleMatchCallArrows(struct PokenavSub17Substruct *a0, bool32 shouldHide)
|
||||
void ToggleMatchCallArrows(struct PokenavSub17Substruct *list, bool32 shouldHide)
|
||||
{
|
||||
if (shouldHide)
|
||||
{
|
||||
a0->rightArrow->callback = SpriteCallbackDummy;
|
||||
a0->upArrow->callback = SpriteCallbackDummy;
|
||||
a0->downArrow->callback = SpriteCallbackDummy;
|
||||
list->rightArrow->callback = SpriteCallbackDummy;
|
||||
list->upArrow->callback = SpriteCallbackDummy;
|
||||
list->downArrow->callback = SpriteCallbackDummy;
|
||||
}
|
||||
else
|
||||
{
|
||||
a0->rightArrow->callback = SpriteCB_MatchCallRightArrow;
|
||||
a0->upArrow->callback = SpriteCB_MatchCallUpArrow;
|
||||
a0->downArrow->callback = SpriteCB_MatchCallDownArrow;
|
||||
list->rightArrow->callback = SpriteCB_MatchCallRightArrow;
|
||||
list->upArrow->callback = SpriteCB_MatchCallUpArrow;
|
||||
list->downArrow->callback = SpriteCB_MatchCallDownArrow;
|
||||
}
|
||||
a0->rightArrow->invisible = shouldHide;
|
||||
a0->upArrow->invisible = shouldHide;
|
||||
a0->downArrow->invisible = shouldHide;
|
||||
list->rightArrow->invisible = shouldHide;
|
||||
list->upArrow->invisible = shouldHide;
|
||||
list->downArrow->invisible = shouldHide;
|
||||
}
|
||||
|
||||
void SpriteCB_MatchCallRightArrow(struct Sprite *sprite)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
sprite->pos2.y = structPtr->unk888.selectedIndexOffset << 4;
|
||||
}
|
||||
|
||||
@@ -931,68 +931,68 @@ void SpriteCB_MatchCallUpArrow(struct Sprite *sprite)
|
||||
|
||||
void ToggleMatchCallVerticalArrows(bool32 shouldHide)
|
||||
{
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(17);
|
||||
structPtr->unk0.upArrow->data[7] = shouldHide;
|
||||
structPtr->unk0.downArrow->data[7] = shouldHide;
|
||||
struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST);
|
||||
structPtr->list.upArrow->data[7] = shouldHide;
|
||||
structPtr->list.downArrow->data[7] = shouldHide;
|
||||
}
|
||||
|
||||
void sub_81C9160(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1)
|
||||
void InitMatchCallWindowState(struct MatchCallWindowState *dst, struct PokenavListTemplate *template)
|
||||
{
|
||||
a0->unk10 = a1->list.matchCallEntries;
|
||||
a0->windowTopIndex = a1->unk6;
|
||||
a0->listLength = a1->unk4;
|
||||
a0->unkC = a1->unk8;
|
||||
a0->visibleEntries = a1->unkC;
|
||||
if (a0->visibleEntries >= a0->listLength)
|
||||
dst->unk10 = template->list.matchCallEntries;
|
||||
dst->windowTopIndex = template->unk6;
|
||||
dst->listLength = template->count;
|
||||
dst->unkC = template->unk8;
|
||||
dst->visibleEntries = template->maxShowed;
|
||||
if (dst->visibleEntries >= dst->listLength)
|
||||
{
|
||||
a0->windowTopIndex = 0;
|
||||
a0->unk4 = 0;
|
||||
a0->selectedIndexOffset = a1->unk6;
|
||||
dst->windowTopIndex = 0;
|
||||
dst->unk4 = 0;
|
||||
dst->selectedIndexOffset = template->unk6;
|
||||
}
|
||||
else
|
||||
{
|
||||
a0->unk4 = a0->listLength - a0->visibleEntries;
|
||||
if (a0->windowTopIndex + a0->visibleEntries > a0->listLength)
|
||||
dst->unk4 = dst->listLength - dst->visibleEntries;
|
||||
if (dst->windowTopIndex + dst->visibleEntries > dst->listLength)
|
||||
{
|
||||
a0->selectedIndexOffset = a0->windowTopIndex + a0->visibleEntries - a0->listLength;
|
||||
a0->windowTopIndex = a1->unk6 - a0->selectedIndexOffset;
|
||||
dst->selectedIndexOffset = dst->windowTopIndex + dst->visibleEntries - dst->listLength;
|
||||
dst->windowTopIndex = template->unk6 - dst->selectedIndexOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
a0->selectedIndexOffset = 0;
|
||||
dst->selectedIndexOffset = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_81C91AC(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3)
|
||||
bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 a3)
|
||||
{
|
||||
struct WindowTemplate window;
|
||||
|
||||
a0->unk0.bg = a1->bg;
|
||||
a0->unk0.unk6 = a3;
|
||||
a0->unk34 = a2->listFunc.unk10_2;
|
||||
a0->unk38 = a2->unk14;
|
||||
a0->unk0.unk1 = a2->unkD;
|
||||
a0->unk0.unk2 = a2->unk9;
|
||||
a0->unk0.unk3 = a2->unkB;
|
||||
a0->unk0.unk4 = a2->unkA;
|
||||
a0->unk0.fontId = a2->unkE;
|
||||
dest->listWindow.bg = bgTemplate->bg;
|
||||
dest->listWindow.unk6 = a3;
|
||||
dest->unk34 = template->listFunc.unk10_2;
|
||||
dest->unk38 = template->unk14;
|
||||
dest->listWindow.unk1 = template->fillValue;
|
||||
dest->listWindow.unk2 = template->item_X;
|
||||
dest->listWindow.unk3 = template->listTop;
|
||||
dest->listWindow.unk4 = template->windowWidth;
|
||||
dest->listWindow.fontId = template->fontId;
|
||||
|
||||
window.bg = a1->bg;
|
||||
window.tilemapLeft = a2->unk9;
|
||||
window.bg = bgTemplate->bg;
|
||||
window.tilemapLeft = template->item_X;
|
||||
window.tilemapTop = 0;
|
||||
window.width = a2->unkA;
|
||||
window.width = template->windowWidth;
|
||||
window.height = 32;
|
||||
window.paletteNum = a2->unkD;
|
||||
window.paletteNum = template->fillValue;
|
||||
window.baseBlock = a3 + 2;
|
||||
|
||||
a0->unk0.windowId = AddWindow(&window);
|
||||
if (a0->unk0.windowId == 0xFF)
|
||||
dest->listWindow.windowId = AddWindow(&window);
|
||||
if (dest->listWindow.windowId == 0xFF)
|
||||
return FALSE;
|
||||
|
||||
a0->unk0.unkA = 0;
|
||||
a0->rightArrow = NULL;
|
||||
a0->upArrow = NULL;
|
||||
a0->downArrow = NULL;
|
||||
dest->listWindow.unkA = 0;
|
||||
dest->rightArrow = NULL;
|
||||
dest->upArrow = NULL;
|
||||
dest->downArrow = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -32,53 +32,53 @@ static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*);
|
||||
static void SetMenuInputHandler(struct Pokenav1Struct *state);
|
||||
|
||||
// Number of entries - 1 for that menu type
|
||||
static const u8 sLastCursorPositions[] =
|
||||
static const u8 sLastCursorPositions[] =
|
||||
{
|
||||
[POKENAV_MENU_TYPE_DEFAULT] = 2,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC] = 3,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = 4,
|
||||
[POKENAV_MENU_TYPE_CONDITION] = 2,
|
||||
[POKENAV_MENU_TYPE_DEFAULT] = 2,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC] = 3,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = 4,
|
||||
[POKENAV_MENU_TYPE_CONDITION] = 2,
|
||||
[POKENAV_MENU_TYPE_CONDITION_SEARCH] = 5
|
||||
};
|
||||
|
||||
static const u8 sMenuItems[][6] =
|
||||
{
|
||||
[POKENAV_MENU_TYPE_DEFAULT] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
[POKENAV_MENU_TYPE_DEFAULT] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
[2 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
POKENAV_MENUITEM_MATCH_CALL,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
POKENAV_MENUITEM_MATCH_CALL,
|
||||
[3 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
POKENAV_MENUITEM_MATCH_CALL,
|
||||
POKENAV_MENUITEM_RIBBONS,
|
||||
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] =
|
||||
{
|
||||
POKENAV_MENUITEM_MAP,
|
||||
POKENAV_MENUITEM_CONDITION,
|
||||
POKENAV_MENUITEM_MATCH_CALL,
|
||||
POKENAV_MENUITEM_RIBBONS,
|
||||
[4 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_CONDITION] =
|
||||
{
|
||||
POKENAV_MENUITEM_CONDITION_PARTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH,
|
||||
POKENAV_MENUITEM_CONDITION_CANCEL,
|
||||
[POKENAV_MENU_TYPE_CONDITION] =
|
||||
{
|
||||
POKENAV_MENUITEM_CONDITION_PARTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH,
|
||||
POKENAV_MENUITEM_CONDITION_CANCEL,
|
||||
[3 ... 5] = POKENAV_MENUITEM_SWITCH_OFF
|
||||
},
|
||||
[POKENAV_MENU_TYPE_CONDITION_SEARCH] =
|
||||
{
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_COOL,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_BEAUTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CUTE,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_SMART,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_TOUGH,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL
|
||||
[POKENAV_MENU_TYPE_CONDITION_SEARCH] =
|
||||
{
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_COOL,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_BEAUTY,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CUTE,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_SMART,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_TOUGH,
|
||||
POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL
|
||||
},
|
||||
};
|
||||
|
||||
@@ -87,24 +87,24 @@ static u8 GetPokenavMainMenuType(void)
|
||||
u8 menuType = POKENAV_MENU_TYPE_DEFAULT;
|
||||
|
||||
if (FlagGet(FLAG_ADDED_MATCH_CALL_TO_POKENAV))
|
||||
{
|
||||
{
|
||||
menuType = POKENAV_MENU_TYPE_UNLOCK_MC;
|
||||
|
||||
if (FlagGet(FLAG_SYS_RIBBON_GET))
|
||||
menuType = POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS;
|
||||
}
|
||||
|
||||
|
||||
return menuType;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_MainMenuCursorOnMap(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 0;
|
||||
state->cursorPos = POKENAV_MENUITEM_MAP;
|
||||
state->currMenuItem = POKENAV_MENUITEM_MAP;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
SetMenuInputHandler(state);
|
||||
@@ -113,12 +113,12 @@ bool32 PokenavCallback_Init_MainMenuCursorOnMap(void)
|
||||
|
||||
bool32 PokenavCallback_Init_MainMenuCursorOnMatchCall(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 2;
|
||||
state->cursorPos = POKENAV_MENUITEM_MATCH_CALL;
|
||||
state->currMenuItem = POKENAV_MENUITEM_MATCH_CALL;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
SetMenuInputHandler(state);
|
||||
@@ -127,12 +127,12 @@ bool32 PokenavCallback_Init_MainMenuCursorOnMatchCall(void)
|
||||
|
||||
bool32 PokenavCallback_Init_MainMenuCursorOnRibbons(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
|
||||
state->menuType = GetPokenavMainMenuType();
|
||||
state->cursorPos = 3;
|
||||
state->cursorPos = POKENAV_MENUITEM_RIBBONS;
|
||||
state->currMenuItem = POKENAV_MENUITEM_RIBBONS;
|
||||
SetMenuInputHandler(state);
|
||||
return TRUE;
|
||||
@@ -140,12 +140,12 @@ bool32 PokenavCallback_Init_MainMenuCursorOnRibbons(void)
|
||||
|
||||
bool32 PokenavCallback_Init_ConditionMenu(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
|
||||
state->menuType = POKENAV_MENU_TYPE_CONDITION;
|
||||
state->cursorPos = 0;
|
||||
state->cursorPos = 0; //party
|
||||
state->currMenuItem = POKENAV_MENUITEM_CONDITION_PARTY;
|
||||
state->helpBarIndex = HELPBAR_NONE;
|
||||
SetMenuInputHandler(state);
|
||||
@@ -154,10 +154,10 @@ bool32 PokenavCallback_Init_ConditionMenu(void)
|
||||
|
||||
bool32 PokenavCallback_Init_ConditionSearchMenu(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
|
||||
struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
|
||||
state->menuType = POKENAV_MENU_TYPE_CONDITION_SEARCH;
|
||||
state->cursorPos = GetSelectedConditionSearch();
|
||||
state->currMenuItem = state->cursorPos + POKENAV_MENUITEM_CONDITION_SEARCH_COOL;
|
||||
@@ -202,13 +202,13 @@ static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*)
|
||||
|
||||
u32 GetMenuHandlerCallback(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER);
|
||||
return state->callback(state);
|
||||
}
|
||||
|
||||
void FreeMenuHandlerSubstruct1(void)
|
||||
{
|
||||
FreePokenavSubstruct(1);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER);
|
||||
}
|
||||
|
||||
static u32 HandleMainMenuInput(struct Pokenav1Struct *state)
|
||||
@@ -247,12 +247,12 @@ static u32 HandleMainMenuInput(struct Pokenav1Struct *state)
|
||||
return POKENAV_MENU_FUNC_NO_RIBBON_WINNERS;
|
||||
}
|
||||
case POKENAV_MENUITEM_SWITCH_OFF:
|
||||
return -1;
|
||||
return POKENAV_MENU_FUNC_EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
return -1;
|
||||
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
return POKENAV_MENU_FUNC_EXIT;
|
||||
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
@@ -262,7 +262,7 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
if (sMenuItems[state->menuType][state->cursorPos] == POKENAV_MENUITEM_MATCH_CALL)
|
||||
@@ -277,13 +277,13 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state)
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_FAILURE);
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u32 menuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
@@ -342,7 +342,7 @@ static u32 HandleConditionMenuInput(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
switch (sMenuItems[state->menuType][state->cursorPos])
|
||||
@@ -386,7 +386,7 @@ static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u8 menuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
@@ -488,26 +488,26 @@ static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state)
|
||||
|
||||
int GetPokenavMenuType(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER);
|
||||
return state->menuType;
|
||||
}
|
||||
|
||||
// Position of cursor relative to number of current menu options
|
||||
int GetPokenavCursorPos(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER);
|
||||
return state->cursorPos;
|
||||
}
|
||||
|
||||
// ID of menu item the cursor is currently on
|
||||
int GetCurrentMenuItemId(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER);
|
||||
return state->currMenuItem;
|
||||
}
|
||||
|
||||
u16 GetHelpBarTextId(void)
|
||||
{
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(1);
|
||||
struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER);
|
||||
return state->helpBarIndex;
|
||||
}
|
||||
|
||||
+265
-263
File diff suppressed because it is too large
Load Diff
+29
-29
@@ -170,11 +170,11 @@ static const struct SpriteTemplate sCityZoomTextSpriteTemplate =
|
||||
|
||||
u32 PokenavCallback_Init_RegionMap(void)
|
||||
{
|
||||
struct Pokenav5Struct *state = AllocSubstruct(3, sizeof(struct Pokenav5Struct));
|
||||
struct Pokenav5Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_STATE, sizeof(struct Pokenav5Struct));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
if (!AllocSubstruct(16, sizeof(struct RegionMap)))
|
||||
if (!AllocSubstruct(POKENAV_SUBSTRUCT_REGION_MAP, sizeof(struct RegionMap)))
|
||||
return FALSE;
|
||||
|
||||
state->zoomDisabled = IsEventIslandMapSecId(gMapHeader.regionMapSectionId);
|
||||
@@ -189,13 +189,13 @@ u32 PokenavCallback_Init_RegionMap(void)
|
||||
void FreeRegionMapSubstruct1(void)
|
||||
{
|
||||
gSaveBlock2Ptr->regionMapZoom = IsRegionMapZoomed();
|
||||
FreePokenavSubstruct(16);
|
||||
FreePokenavSubstruct(3);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_REGION_MAP);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_STATE);
|
||||
}
|
||||
|
||||
u32 GetRegionMapCallback(void)
|
||||
{
|
||||
struct Pokenav5Struct *state = GetSubstructPtr(3);
|
||||
struct Pokenav5Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_STATE);
|
||||
return state->callback(state);
|
||||
}
|
||||
|
||||
@@ -235,13 +235,13 @@ static u32 GetExitRegionMapMenuId(struct Pokenav5Struct *state)
|
||||
|
||||
bool32 GetZoomDisabled(void)
|
||||
{
|
||||
struct Pokenav5Struct *state = GetSubstructPtr(3);
|
||||
struct Pokenav5Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_STATE);
|
||||
return state->zoomDisabled;
|
||||
}
|
||||
|
||||
bool32 OpenPokenavRegionMap(void)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = AllocSubstruct(4, sizeof(struct Pokenav5Struct_2));
|
||||
struct Pokenav5Struct_2 *state = AllocSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM, sizeof(struct Pokenav5Struct_2));
|
||||
if (!state)
|
||||
return FALSE;
|
||||
|
||||
@@ -252,25 +252,25 @@ bool32 OpenPokenavRegionMap(void)
|
||||
|
||||
void CreateRegionMapLoopedTask(s32 index)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
state->loopTaskId = CreateLoopedTask(sRegionMapLoopTaskFuncs[index], 1);
|
||||
state->isTaskActiveCB = GetCurrentLoopedTaskActive;
|
||||
}
|
||||
|
||||
bool32 IsRegionMapLoopedTaskActive(void)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
return state->isTaskActiveCB();
|
||||
}
|
||||
|
||||
void FreeRegionMapSubstruct2(void)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
FreeRegionMapIconResources();
|
||||
FreeCityZoomViewGfx();
|
||||
RemoveWindow(state->infoWindowId);
|
||||
FreePokenavSubstruct(16);
|
||||
FreePokenavSubstruct(4);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_REGION_MAP);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
SetPokenavVBlankCallback();
|
||||
SetBgMode(0);
|
||||
}
|
||||
@@ -285,7 +285,7 @@ static void VBlankCB_RegionMap(void)
|
||||
|
||||
static bool32 GetCurrentLoopedTaskActive(void)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
return IsLoopedTaskActive(state->loopTaskId);
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState)
|
||||
{
|
||||
int menuGfxId;
|
||||
struct RegionMap *regionMap;
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -311,7 +311,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState)
|
||||
HideBg(3);
|
||||
SetBgMode(1);
|
||||
InitBgTemplates(sRegionMapBgTemplates, ARRAY_COUNT(sRegionMapBgTemplates) - 1);
|
||||
regionMap = GetSubstructPtr(16);
|
||||
regionMap = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP);
|
||||
InitRegionMapData(regionMap, &sRegionMapBgTemplates[1], ShouldOpenRegionMapZoomed());
|
||||
LoadCityZoomViewGfx();
|
||||
return LT_INC_AND_PAUSE;
|
||||
@@ -361,11 +361,11 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState)
|
||||
menuGfxId = POKENAV_GFX_MAP_MENU_ZOOMED_IN;
|
||||
|
||||
LoadLeftHeaderGfxForIndex(menuGfxId);
|
||||
sub_81C7FA0(menuGfxId, 1, 1);
|
||||
ShowLeftHeaderGfx(menuGfxId, 1, 1);
|
||||
PokenavFadeScreen(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 7:
|
||||
if (IsPaletteFadeActive() || sub_81C8010())
|
||||
if (IsPaletteFadeActive() || AreLeftHeaderSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
return LT_INC_AND_CONTINUE;
|
||||
default:
|
||||
@@ -375,7 +375,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState)
|
||||
|
||||
static u32 LoopedTask_UpdateInfoAfterCursorMove(s32 taskState)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -409,7 +409,7 @@ static u32 LoopedTask_RegionMapZoomOut(s32 taskState)
|
||||
if (WaitForHelpBar())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81C7E14(POKENAV_GFX_MAP_MENU_ZOOMED_OUT);
|
||||
UpdateRegionMapRightHeaderTiles(POKENAV_GFX_MAP_MENU_ZOOMED_OUT);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ static u32 LoopedTask_RegionMapZoomOut(s32 taskState)
|
||||
|
||||
static u32 LoopedTask_RegionMapZoomIn(s32 taskState)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
switch (taskState)
|
||||
{
|
||||
case 0:
|
||||
@@ -442,7 +442,7 @@ static u32 LoopedTask_RegionMapZoomIn(s32 taskState)
|
||||
if (WaitForHelpBar())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81C7E14(POKENAV_GFX_MAP_MENU_ZOOMED_IN);
|
||||
UpdateRegionMapRightHeaderTiles(POKENAV_GFX_MAP_MENU_ZOOMED_IN);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -461,8 +461,8 @@ static u32 LoopedTask_ExitRegionMap(s32 taskState)
|
||||
if (IsPaletteFadeActive())
|
||||
return LT_PAUSE;
|
||||
|
||||
sub_81C7FDC();
|
||||
sub_81C78A0();
|
||||
SetLeftHeaderSpritesInvisibility();
|
||||
SlideMenuHeaderDown();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 2:
|
||||
if (MainMenuLoopedTaskIsBusy())
|
||||
@@ -490,7 +490,7 @@ static void LoadCityZoomViewGfx(void)
|
||||
static void FreeCityZoomViewGfx(void)
|
||||
{
|
||||
int i;
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
FreeSpriteTilesByTag(6);
|
||||
FreeSpritePaletteByTag(11);
|
||||
for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++)
|
||||
@@ -527,7 +527,7 @@ static bool32 TryFreeTempTileDataBuffers(void)
|
||||
|
||||
static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state)
|
||||
{
|
||||
struct RegionMap *regionMap = GetSubstructPtr(16);
|
||||
struct RegionMap *regionMap = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP);
|
||||
switch (regionMap->mapSecType)
|
||||
{
|
||||
case MAPSECTYPE_CITY_CANFLY:
|
||||
@@ -619,7 +619,7 @@ static bool32 IsDecompressCityMapsActive(void)
|
||||
|
||||
static u32 LoopedTask_DecompressCityMaps(s32 taskState)
|
||||
{
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
if (taskState < NUM_CITY_MAPS)
|
||||
{
|
||||
LZ77UnCompWram(sPokenavCityMaps[taskState].tilemap, state->cityZoomPics[taskState]);
|
||||
@@ -662,7 +662,7 @@ static void CreateCityZoomTextSprites(void)
|
||||
int i;
|
||||
int y;
|
||||
struct Sprite *sprite;
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
|
||||
// When not zoomed in the text is still created but its pushed off screen
|
||||
if (!IsRegionMapZoomed())
|
||||
@@ -722,7 +722,7 @@ static void SpriteCB_CityZoomText(struct Sprite *sprite)
|
||||
static void UpdateCityZoomTextPosition(void)
|
||||
{
|
||||
int i;
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
int y = 132 - (GetBgY(1) >> 8);
|
||||
for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++)
|
||||
state->cityZoomTextSprites[i]->pos1.y = y;
|
||||
@@ -731,7 +731,7 @@ static void UpdateCityZoomTextPosition(void)
|
||||
static void SetCityZoomTextInvisibility(bool32 invisible)
|
||||
{
|
||||
int i;
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(4);
|
||||
struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM);
|
||||
for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++)
|
||||
state->cityZoomTextSprites[i]->invisible = invisible;
|
||||
}
|
||||
|
||||
+220
-206
@@ -8,16 +8,28 @@
|
||||
#include "international_string_util.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
enum
|
||||
{
|
||||
RIBBONS_MON_LIST_FUNC_NONE,
|
||||
RIBBONS_MON_LIST_FUNC_MOVE_UP,
|
||||
RIBBONS_MON_LIST_FUNC_MOVE_DOWN,
|
||||
RIBBONS_MON_LIST_FUNC_PAGE_UP,
|
||||
RIBBONS_MON_LIST_FUNC_PAGE_DOWN,
|
||||
RIBBONS_MON_LIST_FUNC_EXIT,
|
||||
RIBBONS_MON_LIST_FUNC_OPEN_RIBBONS_SUMMARY
|
||||
};
|
||||
|
||||
|
||||
struct PokenavSub9
|
||||
{
|
||||
u32 (*unk0)(struct PokenavSub9*);
|
||||
u32 (*callback)(struct PokenavSub9*);
|
||||
u32 loopedTaskId;
|
||||
u16 winid;
|
||||
s32 unkC;
|
||||
s32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
struct PokenavSub18 *unk1C;
|
||||
s32 boxId;
|
||||
s32 monId;
|
||||
u32 changeBgs;
|
||||
u32 saveMonList;
|
||||
struct PokenavSub18 *monList;
|
||||
};
|
||||
|
||||
struct PokenavSub10
|
||||
@@ -25,46 +37,46 @@ struct PokenavSub10
|
||||
bool32 (*callback)(void);
|
||||
u32 ltid;
|
||||
u16 winid;
|
||||
bool32 unkC;
|
||||
bool32 fromSummary;
|
||||
u8 buff[BG_SCREEN_SIZE];
|
||||
};
|
||||
|
||||
static u32 sub_81CFA68(struct PokenavSub9 *structPtr);
|
||||
static u32 sub_81CFA88(struct PokenavSub9 *structPtr);
|
||||
static u32 sub_81CFB08(struct PokenavSub9 *structPtr);
|
||||
static u32 HandleRibbonsMonListInput_WaitListInit(struct PokenavSub9 *structPtr);
|
||||
static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr);
|
||||
static u32 RibbonsMonMenu_ReturnToMainMenu(struct PokenavSub9 *structPtr);
|
||||
static u32 sub_81CFB10(struct PokenavSub9 *structPtr);
|
||||
static u32 sub_81CFB8C(s32 state);
|
||||
static u32 sub_81CFC2C(s32 state);
|
||||
static u32 sub_81CFC40(s32 state);
|
||||
static u32 sub_81CFB74(s32 state);
|
||||
static u32 BuildPartyMonRibbonList(s32 state);
|
||||
static u32 InitBoxMonRibbonList(s32 state);
|
||||
static u32 BuildBoxMonRibbonList(s32 state);
|
||||
static u32 GetMonRibbonListLoopTaskFunc(s32 state);
|
||||
static void sub_81CFCEC(struct PokenavSub9 *structPtr, struct PokenavMonList *item);
|
||||
static u32 sub_81CFEB8(s32 state);
|
||||
static bool32 sub_81CFE84(void);
|
||||
static u32 sub_81CFFFC(s32 state);
|
||||
static u32 sub_81D0074(s32 state);
|
||||
static u32 sub_81D00EC(s32 state);
|
||||
static u32 sub_81D0164(s32 state);
|
||||
static u32 sub_81D01DC(s32 state);
|
||||
static u32 sub_81D021C(s32 state);
|
||||
static u32 LoopedTask_OpenRibbonsMonList(s32 state);
|
||||
static bool32 GetRibbonsMonCurrentLoopedTaskActive(void);
|
||||
static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state);
|
||||
static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state);
|
||||
static u32 LoopedTask_RibbonsListMovePageUp(s32 state);
|
||||
static u32 LoopedTask_RibbonsListMovePageDown(s32 state);
|
||||
static u32 LoopedTask_RibbonsListReturnToMainMenu(s32 state);
|
||||
static u32 LoopedTask_RibbonsListOpenSummary(s32 state);
|
||||
static void sub_81D02B0(s32 windowId, s32 val1, s32 val2);
|
||||
static void sub_81D024C(struct PokenavSub10 *ptr);
|
||||
static void AddRibbonsMonListWindow(struct PokenavSub10 *ptr);
|
||||
static void sub_81D0288(struct PokenavSub10 *ptr);
|
||||
static void sub_81D0304(void);
|
||||
static void InitMonRibbonPokenavListMenuTemplate(void);
|
||||
static void BufferRibbonMonInfoText(struct PokenavMonList *, u8 *);
|
||||
|
||||
static const LoopedTask gUnknown_086235D8[] =
|
||||
static const LoopedTask sMonRibbonListLoopTaskFuncs[] =
|
||||
{
|
||||
sub_81CFB8C,
|
||||
sub_81CFC2C,
|
||||
sub_81CFC40
|
||||
BuildPartyMonRibbonList,
|
||||
InitBoxMonRibbonList,
|
||||
BuildBoxMonRibbonList
|
||||
};
|
||||
|
||||
static const u16 gUnknown_086235E4[] = INCBIN_U16("graphics/pokenav/ui_ribbons.gbapal");
|
||||
static const u32 gUnknown_08623604[] = INCBIN_U32("graphics/pokenav/ui_ribbons.4bpp.lz");
|
||||
static const u32 gUnknown_086236CC[] = INCBIN_U32("graphics/pokenav/ui_ribbons.bin.lz");
|
||||
static const u16 sMonRibbonListFramePal[] = INCBIN_U16("graphics/pokenav/ui_ribbons.gbapal");
|
||||
static const u32 sMonRibbonListFrameTiles[] = INCBIN_U32("graphics/pokenav/ui_ribbons.4bpp.lz");
|
||||
static const u32 sMonRibbonListFrameTilemap[] = INCBIN_U32("graphics/pokenav/ui_ribbons.bin.lz");
|
||||
static const u16 gUnknown_08623790[] = INCBIN_U16("graphics/pokenav/8623790.gbapal");
|
||||
|
||||
static const struct BgTemplate gUnknown_086237B0[] =
|
||||
static const struct BgTemplate sMonRibbonListBgTemplates[] =
|
||||
{
|
||||
{
|
||||
.bg = 1,
|
||||
@@ -85,18 +97,18 @@ static const struct BgTemplate gUnknown_086237B0[] =
|
||||
}
|
||||
};
|
||||
|
||||
static const LoopedTask gUnknown_086237B8[] =
|
||||
static const LoopedTask sRibbonsMonMenuLoopTaskFuncs[] =
|
||||
{
|
||||
NULL,
|
||||
sub_81CFFFC,
|
||||
sub_81D0074,
|
||||
sub_81D00EC,
|
||||
sub_81D0164,
|
||||
sub_81D01DC,
|
||||
sub_81D021C
|
||||
[RIBBONS_MON_LIST_FUNC_NONE] = NULL,
|
||||
[RIBBONS_MON_LIST_FUNC_MOVE_UP] = LoopedTask_RibbonsListMoveCursorUp,
|
||||
[RIBBONS_MON_LIST_FUNC_MOVE_DOWN] = LoopedTask_RibbonsListMoveCursorDown,
|
||||
[RIBBONS_MON_LIST_FUNC_PAGE_UP] = LoopedTask_RibbonsListMovePageUp,
|
||||
[RIBBONS_MON_LIST_FUNC_PAGE_DOWN] = LoopedTask_RibbonsListMovePageDown,
|
||||
[RIBBONS_MON_LIST_FUNC_EXIT] = LoopedTask_RibbonsListReturnToMainMenu,
|
||||
[RIBBONS_MON_LIST_FUNC_OPEN_RIBBONS_SUMMARY] = LoopedTask_RibbonsListOpenSummary
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_086237D4 =
|
||||
static const struct WindowTemplate sRibbonsMonListWindowTemplate =
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
@@ -111,135 +123,136 @@ static const u8 sText_MaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHIT
|
||||
static const u8 sText_FemaleSymbol[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sText_NoGenderSymbol[] = _("{UNK_SPACER}");
|
||||
|
||||
bool32 PokenavCallback_Init_12(void)
|
||||
bool32 PokenavCallback_Init_MonRibbonList(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = AllocSubstruct(9, sizeof(struct PokenavSub9));
|
||||
struct PokenavSub9 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST, sizeof(struct PokenavSub9));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unk1C = AllocSubstruct(18, sizeof(struct PokenavSub18));
|
||||
if (structPtr->unk1C == NULL)
|
||||
structPtr->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18));
|
||||
if (structPtr->monList == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unk0 = sub_81CFA68;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(sub_81CFB74, 1);
|
||||
structPtr->unk14 = 0;
|
||||
structPtr->callback = HandleRibbonsMonListInput_WaitListInit;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(GetMonRibbonListLoopTaskFunc, 1);
|
||||
structPtr->changeBgs = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 PokenavCallback_Init_14(void)
|
||||
bool32 PokenavCallback_Init_RibbonsMonListFromSummary(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = AllocSubstruct(9, sizeof(struct PokenavSub9));
|
||||
struct PokenavSub9 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST, sizeof(struct PokenavSub9));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->unk1C = GetSubstructPtr(18);
|
||||
structPtr->unk0 = sub_81CFA88;
|
||||
structPtr->unk14 = 1;
|
||||
structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
structPtr->callback = HandleRibbonsMonListInput;
|
||||
structPtr->changeBgs = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_81CFA34(void)
|
||||
u32 GetRibbonsMonListCallback(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(9);
|
||||
return structPtr->unk0(structPtr);
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return structPtr->callback(structPtr);
|
||||
}
|
||||
|
||||
void sub_81CFA48(void)
|
||||
void FreeRibbonsMonList1(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(9);
|
||||
if (!structPtr->unk18)
|
||||
FreePokenavSubstruct(18);
|
||||
FreePokenavSubstruct(9);
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
if (!structPtr->saveMonList)
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
}
|
||||
|
||||
static u32 sub_81CFA68(struct PokenavSub9 *structPtr)
|
||||
static u32 HandleRibbonsMonListInput_WaitListInit(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
if (!IsLoopedTaskActive(structPtr->loopedTaskId))
|
||||
structPtr->unk0 = sub_81CFA88;
|
||||
structPtr->callback = HandleRibbonsMonListInput;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sub_81CFA88(struct PokenavSub9 *structPtr)
|
||||
static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
return 1;
|
||||
if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
return 2;
|
||||
if (gMain.newKeys & DPAD_LEFT)
|
||||
return 3;
|
||||
if (gMain.newKeys & DPAD_RIGHT)
|
||||
return 4;
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
return RIBBONS_MON_LIST_FUNC_MOVE_UP;
|
||||
if (JOY_REPEAT(DPAD_DOWN))
|
||||
return RIBBONS_MON_LIST_FUNC_MOVE_DOWN;
|
||||
if (JOY_NEW(DPAD_LEFT))
|
||||
return RIBBONS_MON_LIST_FUNC_PAGE_UP;
|
||||
if (JOY_NEW(DPAD_RIGHT))
|
||||
return RIBBONS_MON_LIST_FUNC_PAGE_DOWN;
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
structPtr->unk18 = 0;
|
||||
structPtr->unk0 = sub_81CFB08;
|
||||
return 5;
|
||||
structPtr->saveMonList = 0;
|
||||
structPtr->callback = RibbonsMonMenu_ReturnToMainMenu;
|
||||
return RIBBONS_MON_LIST_FUNC_EXIT;
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
structPtr->unk1C->unk2 = GetSelectedMatchCall();
|
||||
structPtr->unk18 = 1;
|
||||
structPtr->unk0 = sub_81CFB10;
|
||||
return 6;
|
||||
structPtr->monList->currIndex = GetSelectedPokenavListIndex();
|
||||
structPtr->saveMonList = 1;
|
||||
structPtr->callback = sub_81CFB10;
|
||||
return RIBBONS_MON_LIST_FUNC_OPEN_RIBBONS_SUMMARY;
|
||||
}
|
||||
return 0;
|
||||
return RIBBONS_MON_LIST_FUNC_NONE;
|
||||
}
|
||||
|
||||
static u32 sub_81CFB08(struct PokenavSub9 *structPtr)
|
||||
static u32 RibbonsMonMenu_ReturnToMainMenu(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
return POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS;
|
||||
}
|
||||
|
||||
static u32 sub_81CFB10(struct PokenavSub9 *structPtr)
|
||||
{
|
||||
return POKENAV_MENU_D;
|
||||
return POKENAV_RIBBONS_SUMMARY_SCREEN;
|
||||
}
|
||||
|
||||
static u32 sub_81CFB18(void)
|
||||
static u32 UpdateMonListBgs(void)
|
||||
{
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(9);
|
||||
return structPtr->unk14;
|
||||
struct PokenavSub9 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return structPtr->changeBgs;
|
||||
}
|
||||
|
||||
static struct PokenavMonList * sub_81CFB28(void)
|
||||
static struct PokenavMonList *GetMonRibbonMonListData(void)
|
||||
{
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(9);
|
||||
return ptr->unk1C->unk4;
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return ptr->monList->monData;
|
||||
}
|
||||
|
||||
static s32 sub_81CFB38(void)
|
||||
static s32 GetRibbonsMonListCount(void)
|
||||
{
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(9);
|
||||
return ptr->unk1C->unk0;
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return ptr->monList->listCount;
|
||||
}
|
||||
|
||||
static s32 sub_81CFB48(void)
|
||||
//unused
|
||||
static s32 GetMonRibbonSelectedMonData(void)
|
||||
{
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(9);
|
||||
s32 idx = GetSelectedMatchCall();
|
||||
return ptr->unk1C->unk4[idx].data;
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
s32 idx = GetSelectedPokenavListIndex();
|
||||
return ptr->monList->monData[idx].data;
|
||||
}
|
||||
|
||||
static s32 sub_81CFB64(void)
|
||||
static s32 GetRibbonListMenuCurrIndex(void)
|
||||
{
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(9);
|
||||
return ptr->unk1C->unk2;
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
return ptr->monList->currIndex;
|
||||
}
|
||||
|
||||
static u32 sub_81CFB74(s32 state)
|
||||
static u32 GetMonRibbonListLoopTaskFunc(s32 state)
|
||||
{
|
||||
return gUnknown_086235D8[state](state);
|
||||
return sMonRibbonListLoopTaskFuncs[state](state);
|
||||
}
|
||||
|
||||
static u32 sub_81CFB8C(s32 state)
|
||||
static u32 BuildPartyMonRibbonList(s32 state)
|
||||
{
|
||||
s32 i;
|
||||
struct PokenavMonList item;
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(9);
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
|
||||
ptr->unk1C->unk0 = 0;
|
||||
ptr->unk1C->unk2 = 0;
|
||||
ptr->monList->listCount = 0;
|
||||
ptr->monList->currIndex = 0;
|
||||
item.boxId = TOTAL_BOXES_COUNT;
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
@@ -261,19 +274,19 @@ static u32 sub_81CFB8C(s32 state)
|
||||
return LT_INC_AND_CONTINUE;
|
||||
}
|
||||
|
||||
static u32 sub_81CFC2C(s32 state)
|
||||
static u32 InitBoxMonRibbonList(s32 state)
|
||||
{
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(9);
|
||||
ptr->unk10 = 0;
|
||||
ptr->unkC = 0;
|
||||
struct PokenavSub9 *ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
ptr->monId = 0;
|
||||
ptr->boxId = 0;
|
||||
return LT_INC_AND_CONTINUE;
|
||||
}
|
||||
|
||||
static u32 sub_81CFC40(s32 state)
|
||||
static u32 BuildBoxMonRibbonList(s32 state)
|
||||
{
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(9);
|
||||
s32 boxId = ptr->unkC;
|
||||
s32 monId = ptr->unk10;
|
||||
struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST);
|
||||
s32 boxId = ptr->boxId;
|
||||
s32 monId = ptr->monId;
|
||||
s32 boxCount = 0;
|
||||
struct PokenavMonList item;
|
||||
|
||||
@@ -296,8 +309,8 @@ static u32 sub_81CFC40(s32 state)
|
||||
monId++;
|
||||
if (boxCount > TOTAL_BOXES_COUNT)
|
||||
{
|
||||
ptr->unkC = boxId;
|
||||
ptr->unk10 = monId;
|
||||
ptr->boxId = boxId;
|
||||
ptr->monId = monId;
|
||||
return LT_CONTINUE;
|
||||
}
|
||||
}
|
||||
@@ -305,37 +318,38 @@ static u32 sub_81CFC40(s32 state)
|
||||
boxId++;
|
||||
}
|
||||
|
||||
ptr->unk14 = 1;
|
||||
ptr->changeBgs = 1;
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static void sub_81CFCEC(struct PokenavSub9 *structPtr, struct PokenavMonList *item)
|
||||
{
|
||||
u32 left = 0;
|
||||
u32 right = structPtr->unk1C->unk0;
|
||||
u32 right = structPtr->monList->listCount;
|
||||
u32 insertionIdx = left + (right - left) / 2;
|
||||
|
||||
while (right != insertionIdx)
|
||||
{
|
||||
if (item->data > structPtr->unk1C->unk4[insertionIdx].data)
|
||||
if (item->data > structPtr->monList->monData[insertionIdx].data)
|
||||
right = insertionIdx;
|
||||
else
|
||||
left = insertionIdx + 1;
|
||||
insertionIdx = left + (right - left) / 2;
|
||||
}
|
||||
for (right = structPtr->unk1C->unk0; right > insertionIdx; right--)
|
||||
structPtr->unk1C->unk4[right] = structPtr->unk1C->unk4[right - 1];
|
||||
structPtr->unk1C->unk4[insertionIdx] = *item;
|
||||
structPtr->unk1C->unk0++;
|
||||
for (right = structPtr->monList->listCount; right > insertionIdx; right--)
|
||||
structPtr->monList->monData[right] = structPtr->monList->monData[right - 1];
|
||||
structPtr->monList->monData[insertionIdx] = *item;
|
||||
structPtr->monList->listCount++;
|
||||
}
|
||||
|
||||
static bool32 sub_81CFD58(void)
|
||||
//unused
|
||||
static bool32 Unused_PlayerHasRibbonsMon(void)
|
||||
{
|
||||
s32 i, j;
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
struct Pokemon * mon = &gPlayerParty[i];
|
||||
struct Pokemon *mon = &gPlayerParty[i];
|
||||
if (!GetMonData(mon, MON_DATA_SANITY_HAS_SPECIES))
|
||||
continue;
|
||||
if (GetMonData(mon, MON_DATA_SANITY_IS_EGG))
|
||||
@@ -358,72 +372,72 @@ static bool32 sub_81CFD58(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_81CFDD0(void)
|
||||
bool32 OpenRibbonsMonList(void)
|
||||
{
|
||||
struct PokenavSub10 * ptr = AllocSubstruct(10, sizeof(struct PokenavSub10));
|
||||
struct PokenavSub10 *ptr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU, sizeof(struct PokenavSub10));
|
||||
if (ptr == NULL)
|
||||
return FALSE;
|
||||
ptr->ltid = CreateLoopedTask(sub_81CFEB8, 1);
|
||||
ptr->callback = sub_81CFE84;
|
||||
ptr->unkC = FALSE;
|
||||
ptr->ltid = CreateLoopedTask(LoopedTask_OpenRibbonsMonList, 1);
|
||||
ptr->callback = GetRibbonsMonCurrentLoopedTaskActive;
|
||||
ptr->fromSummary = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool32 sub_81CFE08(void)
|
||||
bool32 OpenRibbonsMonListFromRibbonsSummary(void)
|
||||
{
|
||||
struct PokenavSub10 * ptr = AllocSubstruct(10, sizeof(struct PokenavSub10));
|
||||
if (ptr == NULL)
|
||||
struct PokenavSub10 *monMenu = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU, sizeof(struct PokenavSub10));
|
||||
if (monMenu == NULL)
|
||||
return FALSE;
|
||||
ptr->ltid = CreateLoopedTask(sub_81CFEB8, 1);
|
||||
ptr->callback = sub_81CFE84;
|
||||
ptr->unkC = TRUE;
|
||||
monMenu->ltid = CreateLoopedTask(LoopedTask_OpenRibbonsMonList, 1);
|
||||
monMenu->callback = GetRibbonsMonCurrentLoopedTaskActive;
|
||||
monMenu->fromSummary = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_81CFE40(s32 idx)
|
||||
void CreateRibbonsMonListLoopedTask(s32 idx)
|
||||
{
|
||||
struct PokenavSub10 * ptr = GetSubstructPtr(10);
|
||||
ptr->ltid = CreateLoopedTask(gUnknown_086237B8[idx], 1);
|
||||
ptr->callback = sub_81CFE84;
|
||||
struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
monMenu->ltid = CreateLoopedTask(sRibbonsMonMenuLoopTaskFuncs[idx], 1);
|
||||
monMenu->callback = GetRibbonsMonCurrentLoopedTaskActive;
|
||||
}
|
||||
|
||||
bool32 sub_81CFE70(void)
|
||||
bool32 IsRibbonsMonListLoopedTaskActive(void)
|
||||
{
|
||||
struct PokenavSub10 * ptr = GetSubstructPtr(10);
|
||||
return ptr->callback();
|
||||
struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
return monMenu->callback();
|
||||
}
|
||||
|
||||
bool32 sub_81CFE84(void)
|
||||
bool32 GetRibbonsMonCurrentLoopedTaskActive(void)
|
||||
{
|
||||
struct PokenavSub10 * ptr = GetSubstructPtr(10);
|
||||
struct PokenavSub10 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
return IsLoopedTaskActive(ptr->ltid);
|
||||
}
|
||||
|
||||
void sub_81CFE98(void)
|
||||
void FreeRibbonsMonList2(void)
|
||||
{
|
||||
struct PokenavSub10 * ptr = GetSubstructPtr(10);
|
||||
struct PokenavSub10 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
sub_81C8234();
|
||||
RemoveWindow(ptr->winid);
|
||||
FreePokenavSubstruct(10);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
}
|
||||
|
||||
static u32 sub_81CFEB8(s32 state)
|
||||
static u32 LoopedTask_OpenRibbonsMonList(s32 state)
|
||||
{
|
||||
struct PokenavSub10 * unk = GetSubstructPtr(10);
|
||||
struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
InitBgTemplates(gUnknown_086237B0, NELEMS(gUnknown_086237B0));
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_08623604, 0, 0, 0);
|
||||
SetBgTilemapBuffer(1, unk->buff);
|
||||
CopyToBgTilemapBuffer(1, gUnknown_086236CC, 0, 0);
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_086235E4, 0x10, 0x20);
|
||||
InitBgTemplates(sMonRibbonListBgTemplates, NELEMS(sMonRibbonListBgTemplates));
|
||||
DecompressAndCopyTileDataToVram(1, sMonRibbonListFrameTiles, 0, 0, 0);
|
||||
SetBgTilemapBuffer(1, monMenu->buff);
|
||||
CopyToBgTilemapBuffer(1, sMonRibbonListFrameTilemap, 0, 0);
|
||||
CopyPaletteIntoBufferUnfaded(sMonRibbonListFramePal, 0x10, 0x20);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
if (!sub_81CFB18())
|
||||
if (!UpdateMonListBgs())
|
||||
return LT_PAUSE;
|
||||
ChangeBgX(1, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
@@ -433,12 +447,12 @@ static u32 sub_81CFEB8(s32 state)
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return LT_PAUSE;
|
||||
CopyPaletteIntoBufferUnfaded(gUnknown_08623790, 0x20, 0x20);
|
||||
sub_81D0304();
|
||||
InitMonRibbonPokenavListMenuTemplate();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (sub_81C8224())
|
||||
return LT_PAUSE;
|
||||
sub_81D024C(unk);
|
||||
AddRibbonsMonListWindow(monMenu);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 4:
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
@@ -447,25 +461,25 @@ static u32 sub_81CFEB8(s32 state)
|
||||
HideBg(3);
|
||||
PrintHelpBarText(HELPBAR_RIBBONS_MON_LIST);
|
||||
PokenavFadeScreen(1);
|
||||
if (!unk->unkC)
|
||||
if (!monMenu->fromSummary)
|
||||
{
|
||||
LoadLeftHeaderGfxForIndex(2);
|
||||
sub_81C7FA0(2, 1, 0);
|
||||
LoadLeftHeaderGfxForIndex(POKENAV_GFX_RIBBONS_MENU);
|
||||
ShowLeftHeaderGfx(POKENAV_GFX_RIBBONS_MENU, 1, 0);
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 5:
|
||||
if (IsPaletteFadeActive())
|
||||
return LT_PAUSE;
|
||||
if (sub_81C8010())
|
||||
if (AreLeftHeaderSpritesMoving())
|
||||
return LT_PAUSE;
|
||||
break;
|
||||
}
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81CFFFC(s32 state)
|
||||
static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state)
|
||||
{
|
||||
struct PokenavSub10 * unk = GetSubstructPtr(10);
|
||||
struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -482,11 +496,11 @@ static u32 sub_81CFFFC(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81D0288(unk);
|
||||
sub_81D0288(monMenu);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -496,9 +510,9 @@ static u32 sub_81CFFFC(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81D0074(s32 state)
|
||||
static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state)
|
||||
{
|
||||
struct PokenavSub10 * unk = GetSubstructPtr(10);
|
||||
struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -515,11 +529,11 @@ static u32 sub_81D0074(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81D0288(unk);
|
||||
sub_81D0288(monMenu);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -529,9 +543,9 @@ static u32 sub_81D0074(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81D00EC(s32 state)
|
||||
static u32 LoopedTask_RibbonsListMovePageUp(s32 state)
|
||||
{
|
||||
struct PokenavSub10 * unk = GetSubstructPtr(10);
|
||||
struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -548,11 +562,11 @@ static u32 sub_81D00EC(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81D0288(unk);
|
||||
sub_81D0288(monMenu);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -562,9 +576,9 @@ static u32 sub_81D00EC(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81D0164(s32 state)
|
||||
static u32 LoopedTask_RibbonsListMovePageDown(s32 state)
|
||||
{
|
||||
struct PokenavSub10 * unk = GetSubstructPtr(10);
|
||||
struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -581,11 +595,11 @@ static u32 sub_81D0164(s32 state)
|
||||
}
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (sub_81C8630())
|
||||
if (IsMonListLoopedTaskActive())
|
||||
return LT_PAUSE;
|
||||
// fallthrough
|
||||
case 2:
|
||||
sub_81D0288(unk);
|
||||
sub_81D0288(monMenu);
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 3:
|
||||
if (IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -595,27 +609,27 @@ static u32 sub_81D0164(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81D01DC(s32 state)
|
||||
static u32 LoopedTask_RibbonsListReturnToMainMenu(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
PlaySE(SE_SELECT);
|
||||
PokenavFadeScreen(0);
|
||||
sub_81C78A0();
|
||||
SlideMenuHeaderDown();
|
||||
return LT_INC_AND_PAUSE;
|
||||
case 1:
|
||||
if (IsPaletteFadeActive())
|
||||
return LT_PAUSE;
|
||||
if (MainMenuLoopedTaskIsBusy())
|
||||
return LT_PAUSE;
|
||||
sub_81C7FDC();
|
||||
SetLeftHeaderSpritesInvisibility();
|
||||
break;
|
||||
}
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static u32 sub_81D021C(s32 state)
|
||||
static u32 LoopedTask_RibbonsListOpenSummary(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@@ -631,23 +645,23 @@ static u32 sub_81D021C(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static void sub_81D024C(struct PokenavSub10 * ptr)
|
||||
static void AddRibbonsMonListWindow(struct PokenavSub10 *monMenu)
|
||||
{
|
||||
s32 r2;
|
||||
ptr->winid = AddWindow(&gUnknown_086237D4);
|
||||
PutWindowTilemap(ptr->winid);
|
||||
r2 = sub_81CFB38();
|
||||
sub_81D02B0(ptr->winid, 0, r2);
|
||||
CopyWindowToVram(ptr->winid, 1);
|
||||
sub_81D0288(ptr);
|
||||
monMenu->winid = AddWindow(&sRibbonsMonListWindowTemplate);
|
||||
PutWindowTilemap(monMenu->winid);
|
||||
r2 = GetRibbonsMonListCount();
|
||||
sub_81D02B0(monMenu->winid, 0, r2);
|
||||
CopyWindowToVram(monMenu->winid, 1);
|
||||
sub_81D0288(monMenu);
|
||||
}
|
||||
|
||||
static void sub_81D0288(struct PokenavSub10 * ptr)
|
||||
static void sub_81D0288(struct PokenavSub10 *monMenu)
|
||||
{
|
||||
s32 r4 = GetSelectedMatchCall();
|
||||
s32 r2 = sub_81CFB38();
|
||||
sub_81D02B0(ptr->winid, r4 + 1, r2);
|
||||
CopyWindowToVram(ptr->winid, 2);
|
||||
s32 r4 = GetSelectedPokenavListIndex();
|
||||
s32 r2 = GetRibbonsMonListCount();
|
||||
sub_81D02B0(monMenu->winid, r4 + 1, r2);
|
||||
CopyWindowToVram(monMenu->winid, 2);
|
||||
}
|
||||
|
||||
static void sub_81D02B0(s32 windowId, s32 val1, s32 val2)
|
||||
@@ -663,22 +677,22 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2)
|
||||
AddTextPrinterParameterized(windowId, 1, strbuf, x, 1, 0xFF, NULL);
|
||||
}
|
||||
|
||||
static void sub_81D0304(void)
|
||||
static void InitMonRibbonPokenavListMenuTemplate(void)
|
||||
{
|
||||
struct PokenavListTemplate template;
|
||||
template.list.monList = sub_81CFB28();
|
||||
template.unk4 = sub_81CFB38();
|
||||
template.list.monList = GetMonRibbonMonListData();
|
||||
template.count = GetRibbonsMonListCount();
|
||||
template.unk8 = 4;
|
||||
template.unk6 = sub_81CFB64();
|
||||
template.unk9 = 13;
|
||||
template.unkA = 17;
|
||||
template.unkB = 1;
|
||||
template.unkC = 8;
|
||||
template.unkD = 2;
|
||||
template.unkE = 1;
|
||||
template.listFunc.unk10_1 = BufferRibbonMonInfoText;
|
||||
template.unk6 = GetRibbonListMenuCurrIndex();
|
||||
template.item_X = 13;
|
||||
template.windowWidth = 17;
|
||||
template.listTop = 1;
|
||||
template.maxShowed = 8;
|
||||
template.fillValue = 2;
|
||||
template.fontId = 1;
|
||||
template.listFunc.printMonFunc = BufferRibbonMonInfoText;
|
||||
template.unk14 = NULL;
|
||||
sub_81C81D4(&gUnknown_086237B0[1], &template, 0);
|
||||
sub_81C81D4(&sMonRibbonListBgTemplates[1], &template, 0);
|
||||
}
|
||||
|
||||
// Buffers the "Nickname gender/level" text for the ribbon mon list
|
||||
|
||||
+186
-176
@@ -13,28 +13,38 @@
|
||||
#include "window.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
enum
|
||||
{
|
||||
RIBBONS_SUMMARY_FUNC_NONE,
|
||||
RIBBONS_SUMMARY_FUNC_MOVED_CURSOR,
|
||||
RIBBONS_SUMMARY_FUNC_SELECT_RIBBON,
|
||||
RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE,
|
||||
RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL,
|
||||
RIBBONS_SUMMARY_FUNC_EXIT,
|
||||
};
|
||||
|
||||
struct PokenavSub13
|
||||
{
|
||||
u8 filler0[0x8];
|
||||
struct PokenavSub18 *field_8;
|
||||
struct PokenavSub18 *monList;
|
||||
u16 field_C;
|
||||
u16 field_E;
|
||||
u16 field_10;
|
||||
u16 field_12;
|
||||
u32 field_14[25];
|
||||
u32 field_78[8];
|
||||
u32 (*field_98)(struct PokenavSub13 *structPtr);
|
||||
u32 (*callback)(struct PokenavSub13 *structPtr);
|
||||
};
|
||||
|
||||
struct PokenavSub14
|
||||
{
|
||||
u32 (*field_0)(void);
|
||||
u32 (*callback)(void);
|
||||
u32 loopedTaskId;
|
||||
u16 field_8;
|
||||
u16 field_A;
|
||||
u16 field_C;
|
||||
u16 nameWindowId;
|
||||
u16 ribbonCountWindowId;
|
||||
u16 listIdxWindowId;
|
||||
u16 field_E;
|
||||
u16 field_10;
|
||||
u16 monSpriteId;
|
||||
struct Sprite *field_14;
|
||||
u32 filler;
|
||||
u8 tilemapBuffers[2][BG_SCREEN_SIZE];
|
||||
@@ -43,48 +53,48 @@ struct PokenavSub14
|
||||
static u32 gUnknown_030012C0;
|
||||
static u32 gUnknown_030012C4;
|
||||
|
||||
void sub_81D0E84(struct PokenavSub14 *structPtr);
|
||||
void sub_81D0FF0(struct PokenavSub14 *structPtr);
|
||||
void sub_81D10D0(struct PokenavSub14 *structPtr);
|
||||
void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr);
|
||||
void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr);
|
||||
void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr);
|
||||
void sub_81D1500(struct PokenavSub14 *structPtr);
|
||||
void sub_81D0EFC(struct PokenavSub14 *structPtr);
|
||||
void sub_81D1148(struct PokenavSub14 *structPtr);
|
||||
void sub_81D10A4(struct PokenavSub14 *structPtr);
|
||||
void sub_81D1178(struct PokenavSub14 *structPtr);
|
||||
void ResetSpritesAndDrawRibbonsMonFrontPic(struct PokenavSub14 *structPtr);
|
||||
void AddRibbonListIndexWindow(struct PokenavSub14 *structPtr);
|
||||
void DestroyRibbonsMonFrontPic(struct PokenavSub14 *structPtr);
|
||||
void sub_81D11D8(struct PokenavSub14 *structPtr);
|
||||
void sub_81D11FC(struct PokenavSub14 *structPtr);
|
||||
void sub_81D0E60(struct PokenavSub14 *structPtr);
|
||||
void AddRibbonCountWindow(struct PokenavSub14 *structPtr);
|
||||
void sub_81D1448(struct PokenavSub14 *structPtr);
|
||||
void sub_81D13FC(struct PokenavSub14 *structPtr);
|
||||
void sub_81D0FCC(struct PokenavSub14 *structPtr);
|
||||
void AddRibbonSummaryMonNameWindow(struct PokenavSub14 *structPtr);
|
||||
void sub_81D12D8(struct PokenavSub14 *structPtr);
|
||||
bool32 sub_81D1524(struct PokenavSub14 *structPtr);
|
||||
bool32 sub_81D1234(struct PokenavSub14 *structPtr);
|
||||
void sub_81D0814(struct PokenavSub13 *structPtr);
|
||||
u32 sub_81D0548(struct PokenavSub13 *structPtr);
|
||||
u32 sub_81D04C4(struct PokenavSub13 *structPtr);
|
||||
u32 sub_81D05D4(struct PokenavSub13 *structPtr);
|
||||
u32 HandleExpandedRibbonInput(struct PokenavSub13 *structPtr);
|
||||
u32 RibbonsSummaryHandleInput(struct PokenavSub13 *structPtr);
|
||||
u32 ReturnToRibbonsListFromSummary(struct PokenavSub13 *structPtr);
|
||||
bool32 sub_81D05DC(struct PokenavSub13 *structPtr);
|
||||
bool32 sub_81D0688(struct PokenavSub13 *structPtr);
|
||||
bool32 sub_81D0664(struct PokenavSub13 *structPtr);
|
||||
bool32 sub_81D061C(struct PokenavSub13 *structPtr);
|
||||
bool32 sub_81D0688(struct PokenavSub13 *structPtr);
|
||||
bool32 sub_81D0A58(void);
|
||||
u32 sub_81D06C4(void);
|
||||
u32 sub_81D06D4(void);
|
||||
u16 sub_81D1184(s32 unused0, s32 unused1);
|
||||
bool32 GetCurrentLoopedTaskActive(void);
|
||||
u32 GetRibbonsSummaryCurrentIndex(void);
|
||||
u32 GetRibbonsSummaryMonListCount(void);
|
||||
u16 DrawRibbonsMonFrontPic(s32 unused0, s32 unused1);
|
||||
void sub_81D1258(struct Sprite *sprite, s32 arg1, s32 arg2, s32 arg3);
|
||||
void sub_81D1284(struct Sprite *sprite);
|
||||
void sub_81D1350(void);
|
||||
void sub_81D13BC(u16 *dst, u32 id);
|
||||
void sub_81D1370(u32 arg0, u32 id);
|
||||
void sub_81D1538(struct Sprite *sprite);
|
||||
u32 sub_81D0A6C(s32 state);
|
||||
u32 sub_81D0C84(s32 state);
|
||||
u32 sub_81D0D2C(s32 state);
|
||||
u32 sub_81D0D8C(s32 state);
|
||||
u32 sub_81D0E00(s32 state);
|
||||
u32 sub_81D0C54(s32 state);
|
||||
u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state);
|
||||
u32 LoopedTask_UpdateRibbonsSummaryInfo(s32 state);
|
||||
u32 LoopedTask_ExpandSelectedRibbon(s32 state);
|
||||
u32 LoopedTask_MoveRibbonsCursorExpanded(s32 state);
|
||||
u32 LoopedTask_ShrinkExpandedRibbon(s32 state);
|
||||
u32 LoopedTask_ExitRibbonsSummaryMenu(s32 state);
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -147,95 +157,95 @@ static const struct BgTemplate gUnknown_08624B98[] =
|
||||
}
|
||||
};
|
||||
|
||||
static const LoopedTask gUnknown_08624BA0[] =
|
||||
static const LoopedTask sRibbonsSummaryMenuLoopTaskFuncs[] =
|
||||
{
|
||||
NULL,
|
||||
sub_81D0C84,
|
||||
sub_81D0D2C,
|
||||
sub_81D0D8C,
|
||||
sub_81D0E00,
|
||||
sub_81D0C54
|
||||
[RIBBONS_SUMMARY_FUNC_NONE] = NULL,
|
||||
[RIBBONS_SUMMARY_FUNC_MOVED_CURSOR] = LoopedTask_UpdateRibbonsSummaryInfo,
|
||||
[RIBBONS_SUMMARY_FUNC_SELECT_RIBBON] = LoopedTask_ExpandSelectedRibbon,
|
||||
[RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE] = LoopedTask_MoveRibbonsCursorExpanded,
|
||||
[RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL] = LoopedTask_ShrinkExpandedRibbon,
|
||||
[RIBBONS_SUMMARY_FUNC_EXIT] = LoopedTask_ExitRibbonsSummaryMenu
|
||||
};
|
||||
|
||||
// code
|
||||
bool32 PokenavCallback_Init_13(void)
|
||||
bool32 PokenavCallback_Init_RibbonsSummaryMenu(void)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = AllocSubstruct(13, sizeof(struct PokenavSub13));
|
||||
struct PokenavSub13 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST, sizeof(struct PokenavSub13));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->field_8 = GetSubstructPtr(18);
|
||||
if (structPtr->field_8 == NULL)
|
||||
structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
|
||||
if (structPtr->monList == NULL)
|
||||
return FALSE;
|
||||
|
||||
sub_81D0814(structPtr);
|
||||
structPtr->field_98 = sub_81D04C4;
|
||||
structPtr->callback = RibbonsSummaryHandleInput;
|
||||
gKeyRepeatContinueDelay = 3;
|
||||
gKeyRepeatStartDelay = 10;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_81D04A0(void)
|
||||
u32 GetRibbonsSummaryMenuCallback(void)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
return structPtr->field_98(structPtr);
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
return structPtr->callback(structPtr);
|
||||
}
|
||||
|
||||
void sub_81D04B8(void)
|
||||
void FreeRibbonsSummaryScreen1(void)
|
||||
{
|
||||
FreePokenavSubstruct(13);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
}
|
||||
|
||||
u32 sub_81D04C4(struct PokenavSub13 *structPtr)
|
||||
u32 RibbonsSummaryHandleInput(struct PokenavSub13 *structPtr)
|
||||
{
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP && structPtr->field_8->unk2 != 0)
|
||||
if (JOY_REPEAT(DPAD_UP) && structPtr->monList->currIndex != 0)
|
||||
{
|
||||
structPtr->field_8->unk2--;
|
||||
structPtr->monList->currIndex--;
|
||||
structPtr->field_C = 0;
|
||||
sub_81D0814(structPtr);
|
||||
return 1;
|
||||
return RIBBONS_SUMMARY_FUNC_MOVED_CURSOR;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN && structPtr->field_8->unk2 < structPtr->field_8->unk0 - 1)
|
||||
if (JOY_REPEAT(DPAD_DOWN) && structPtr->monList->currIndex < structPtr->monList->listCount - 1)
|
||||
{
|
||||
structPtr->field_8->unk2++;
|
||||
structPtr->monList->currIndex++;
|
||||
structPtr->field_C = 0;
|
||||
sub_81D0814(structPtr);
|
||||
return 1;
|
||||
return RIBBONS_SUMMARY_FUNC_MOVED_CURSOR;
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
structPtr->field_98 = sub_81D0548;
|
||||
return 2;
|
||||
structPtr->callback = HandleExpandedRibbonInput;
|
||||
return RIBBONS_SUMMARY_FUNC_SELECT_RIBBON;
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
structPtr->field_98 = sub_81D05D4;
|
||||
return 5;
|
||||
structPtr->callback = ReturnToRibbonsListFromSummary;
|
||||
return RIBBONS_SUMMARY_FUNC_EXIT;
|
||||
}
|
||||
return 0;
|
||||
return RIBBONS_SUMMARY_FUNC_NONE;
|
||||
}
|
||||
|
||||
u32 sub_81D0548(struct PokenavSub13 *structPtr)
|
||||
u32 HandleExpandedRibbonInput(struct PokenavSub13 *structPtr)
|
||||
{
|
||||
if (gMain.newAndRepeatedKeys & DPAD_UP && sub_81D05DC(structPtr))
|
||||
return 3;
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN && sub_81D061C(structPtr))
|
||||
return 3;
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_LEFT && sub_81D0664(structPtr))
|
||||
return 3;
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT && sub_81D0688(structPtr))
|
||||
return 3;
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_REPEAT(DPAD_UP) && sub_81D05DC(structPtr))
|
||||
return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE;
|
||||
if (JOY_REPEAT(DPAD_DOWN) && sub_81D061C(structPtr))
|
||||
return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE;
|
||||
if (JOY_REPEAT(DPAD_LEFT) && sub_81D0664(structPtr))
|
||||
return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE;
|
||||
if (JOY_REPEAT(DPAD_RIGHT) && sub_81D0688(structPtr))
|
||||
return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE;
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
structPtr->field_98 = sub_81D04C4;
|
||||
return 4;
|
||||
structPtr->callback = RibbonsSummaryHandleInput;
|
||||
return RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL;
|
||||
}
|
||||
return 0;
|
||||
return RIBBONS_SUMMARY_FUNC_NONE;
|
||||
}
|
||||
|
||||
u32 sub_81D05D4(struct PokenavSub13 *structPtr)
|
||||
u32 ReturnToRibbonsListFromSummary(struct PokenavSub13 *structPtr)
|
||||
{
|
||||
return POKENAV_MENU_E;
|
||||
return POKENAV_RIBBONS_RETURN_TO_MON_LIST;
|
||||
}
|
||||
|
||||
bool32 sub_81D05DC(struct PokenavSub13 *structPtr)
|
||||
@@ -320,23 +330,23 @@ bool32 sub_81D0688(struct PokenavSub13 *structPtr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u32 sub_81D06C4(void)
|
||||
u32 GetRibbonsSummaryCurrentIndex(void)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
return structPtr->field_8->unk2;
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
return structPtr->monList->currIndex;
|
||||
}
|
||||
|
||||
u32 sub_81D06D4(void)
|
||||
u32 GetRibbonsSummaryMonListCount(void)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
return structPtr->field_8->unk0;
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
return structPtr->monList->listCount;
|
||||
}
|
||||
|
||||
static void GetCurrMonInfo1(u8 *nick, u8 *level, u8 *gender)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
struct PokenavSub18 *mons = structPtr->field_8;
|
||||
struct PokenavMonList *monInfo = &mons->unk4[mons->unk2];
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
struct PokenavSub18 *mons = structPtr->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
{
|
||||
@@ -357,9 +367,9 @@ static void GetCurrMonInfo1(u8 *nick, u8 *level, u8 *gender)
|
||||
|
||||
static void GetCurrMonInfo2(u16 *species, u32 *personality, u32 *otId)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
struct PokenavSub18 *mons = structPtr->field_8;
|
||||
struct PokenavMonList *monInfo = &mons->unk4[mons->unk2];
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
struct PokenavSub18 *mons = structPtr->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
{
|
||||
@@ -379,9 +389,9 @@ static void GetCurrMonInfo2(u16 *species, u32 *personality, u32 *otId)
|
||||
|
||||
static u32 GetCurrMonRibbonCount(void)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
struct PokenavSub18 *mons = structPtr->field_8;
|
||||
struct PokenavMonList *monInfo = &mons->unk4[mons->unk2];
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
struct PokenavSub18 *mons = structPtr->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
return GetMonData(&gPlayerParty[monInfo->monId], MON_DATA_RIBBON_COUNT);
|
||||
@@ -393,8 +403,8 @@ void sub_81D0814(struct PokenavSub13 *structPtr)
|
||||
{
|
||||
u32 ribbons;
|
||||
s32 i, j;
|
||||
struct PokenavSub18 *mons = structPtr->field_8;
|
||||
struct PokenavMonList *monInfo = &mons->unk4[mons->unk2];
|
||||
struct PokenavSub18 *mons = structPtr->monList;
|
||||
struct PokenavMonList *monInfo = &mons->monData[mons->currIndex];
|
||||
|
||||
if (monInfo->boxId == TOTAL_BOXES_COUNT)
|
||||
ribbons = GetMonData(&gPlayerParty[monInfo->monId], MON_DATA_RIBBONS);
|
||||
@@ -433,27 +443,27 @@ void sub_81D0814(struct PokenavSub13 *structPtr)
|
||||
|
||||
u32 *sub_81D0914(u32 *arg0)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
*arg0 = structPtr->field_10;
|
||||
return structPtr->field_14;
|
||||
}
|
||||
|
||||
u32 *sub_81D092C(u32 *arg0)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
*arg0 = structPtr->field_12;
|
||||
return structPtr->field_78;
|
||||
}
|
||||
|
||||
u16 sub_81D0944(void)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
return structPtr->field_C;
|
||||
}
|
||||
|
||||
u32 sub_81D0954(void)
|
||||
{
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(13);
|
||||
struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST);
|
||||
int var = structPtr->field_C;
|
||||
if (var <= 24)
|
||||
return structPtr->field_14[var];
|
||||
@@ -461,38 +471,38 @@ u32 sub_81D0954(void)
|
||||
return structPtr->field_78[var - 27];
|
||||
}
|
||||
|
||||
bool32 sub_81D0978(void)
|
||||
bool32 OpenRibbonsSummaryMenu(void)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = AllocSubstruct(14, sizeof(struct PokenavSub14));
|
||||
struct PokenavSub14 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU, sizeof(struct PokenavSub14));
|
||||
if (structPtr == NULL)
|
||||
return FALSE;
|
||||
|
||||
structPtr->loopedTaskId = CreateLoopedTask(sub_81D0A6C, 1);
|
||||
structPtr->field_0 = sub_81D0A58;
|
||||
structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_OpenRibbonsSummaryMenu, 1);
|
||||
structPtr->callback = GetCurrentLoopedTaskActive;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_81D09B0(s32 id)
|
||||
void CreateRibbonsSummaryLoopedTask(s32 id)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
structPtr->loopedTaskId = CreateLoopedTask(gUnknown_08624BA0[id], 1);
|
||||
structPtr->field_0 = sub_81D0A58;
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
structPtr->loopedTaskId = CreateLoopedTask(sRibbonsSummaryMenuLoopTaskFuncs[id], 1);
|
||||
structPtr->callback = GetCurrentLoopedTaskActive;
|
||||
}
|
||||
|
||||
u32 sub_81D09E0(void)
|
||||
u32 IsRibbonsSummaryLoopedTaskActive(void)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
return structPtr->field_0();
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
return structPtr->callback();
|
||||
}
|
||||
|
||||
void sub_81D09F4(void)
|
||||
void FreeRibbonsSummaryScreen2(void)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
RemoveWindow(structPtr->field_A);
|
||||
RemoveWindow(structPtr->field_8);
|
||||
RemoveWindow(structPtr->field_C);
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
RemoveWindow(structPtr->ribbonCountWindowId);
|
||||
RemoveWindow(structPtr->nameWindowId);
|
||||
RemoveWindow(structPtr->listIdxWindowId);
|
||||
RemoveWindow(structPtr->field_E);
|
||||
sub_81D1178(structPtr);
|
||||
DestroyRibbonsMonFrontPic(structPtr);
|
||||
FreeSpriteTilesByTag(9);
|
||||
FreeSpritePaletteByTag(0xF);
|
||||
FreeSpritePaletteByTag(0x10);
|
||||
@@ -501,18 +511,18 @@ void sub_81D09F4(void)
|
||||
FreeSpritePaletteByTag(0x13);
|
||||
FreeSpriteOamMatrix(structPtr->field_14);
|
||||
DestroySprite(structPtr->field_14);
|
||||
FreePokenavSubstruct(14);
|
||||
FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
}
|
||||
|
||||
bool32 sub_81D0A58(void)
|
||||
bool32 GetCurrentLoopedTaskActive(void)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
return IsLoopedTaskActive(structPtr->loopedTaskId);
|
||||
}
|
||||
|
||||
u32 sub_81D0A6C(s32 state)
|
||||
u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -539,21 +549,21 @@ u32 sub_81D0A6C(s32 state)
|
||||
case 2:
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_81D0E60(structPtr);
|
||||
AddRibbonCountWindow(structPtr);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
case 3:
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_81D0FCC(structPtr);
|
||||
AddRibbonSummaryMonNameWindow(structPtr);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
case 4:
|
||||
if (!FreeTempTileDataBuffersIfPossible())
|
||||
{
|
||||
sub_81D10A4(structPtr);
|
||||
AddRibbonListIndexWindow(structPtr);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
@@ -567,7 +577,7 @@ u32 sub_81D0A6C(s32 state)
|
||||
case 6:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
sub_81D1148(structPtr);
|
||||
ResetSpritesAndDrawRibbonsMonFrontPic(structPtr);
|
||||
return LT_INC_AND_CONTINUE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
@@ -598,7 +608,7 @@ u32 sub_81D0A6C(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
u32 sub_81D0C54(s32 state)
|
||||
u32 LoopedTask_ExitRibbonsSummaryMenu(s32 state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@@ -614,9 +624,9 @@ u32 sub_81D0C54(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
u32 sub_81D0C84(s32 state)
|
||||
u32 LoopedTask_UpdateRibbonsSummaryInfo(s32 state)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -626,7 +636,7 @@ u32 sub_81D0C84(s32 state)
|
||||
case 1:
|
||||
if (!sub_81D1234(structPtr))
|
||||
{
|
||||
sub_81D0FF0(structPtr);
|
||||
PrintRibbbonsSummaryMonInfo(structPtr);
|
||||
return LT_INC_AND_CONTINUE;
|
||||
}
|
||||
return LT_PAUSE;
|
||||
@@ -634,10 +644,10 @@ u32 sub_81D0C84(s32 state)
|
||||
sub_81D12D8(structPtr);
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 3:
|
||||
sub_81D10D0(structPtr);
|
||||
PrintRibbonsMonListIndex(structPtr);
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 4:
|
||||
sub_81D0E84(structPtr);
|
||||
PrintCurrentMonRibbonCount(structPtr);
|
||||
return LT_INC_AND_CONTINUE;
|
||||
case 5:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
@@ -654,9 +664,9 @@ u32 sub_81D0C84(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
u32 sub_81D0D2C(s32 state)
|
||||
u32 LoopedTask_ExpandSelectedRibbon(s32 state)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -678,9 +688,9 @@ u32 sub_81D0D2C(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
u32 sub_81D0D8C(s32 state)
|
||||
u32 LoopedTask_MoveRibbonsCursorExpanded(s32 state)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -708,9 +718,9 @@ u32 sub_81D0D8C(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
u32 sub_81D0E00(s32 state)
|
||||
u32 LoopedTask_ShrinkExpandedRibbon(s32 state)
|
||||
{
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(14);
|
||||
struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU);
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
@@ -720,7 +730,7 @@ u32 sub_81D0E00(s32 state)
|
||||
case 1:
|
||||
if (!sub_81D1524(structPtr))
|
||||
{
|
||||
sub_81D0E84(structPtr);
|
||||
PrintCurrentMonRibbonCount(structPtr);
|
||||
PrintHelpBarText(HELPBAR_RIBBONS_LIST);
|
||||
return LT_INC_AND_PAUSE;
|
||||
}
|
||||
@@ -732,7 +742,7 @@ u32 sub_81D0E00(s32 state)
|
||||
return LT_FINISH;
|
||||
}
|
||||
|
||||
static const struct WindowTemplate gUnknown_08624BB8 =
|
||||
static const struct WindowTemplate sRibbonCountWindowTemplate =
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 12,
|
||||
@@ -743,14 +753,14 @@ static const struct WindowTemplate gUnknown_08624BB8 =
|
||||
.baseBlock = 0x14,
|
||||
};
|
||||
|
||||
void sub_81D0E60(struct PokenavSub14 *structPtr)
|
||||
void AddRibbonCountWindow(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
structPtr->field_A = AddWindow(&gUnknown_08624BB8);
|
||||
PutWindowTilemap(structPtr->field_A);
|
||||
sub_81D0E84(structPtr);
|
||||
structPtr->ribbonCountWindowId = AddWindow(&sRibbonCountWindowTemplate);
|
||||
PutWindowTilemap(structPtr->ribbonCountWindowId);
|
||||
PrintCurrentMonRibbonCount(structPtr);
|
||||
}
|
||||
|
||||
void sub_81D0E84(struct PokenavSub14 *structPtr)
|
||||
void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
u8 color[] = {TEXT_COLOR_RED, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY};
|
||||
|
||||
@@ -758,9 +768,9 @@ void sub_81D0E84(struct PokenavSub14 *structPtr)
|
||||
DynamicPlaceholderTextUtil_Reset();
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1);
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700);
|
||||
FillWindowPixelBuffer(structPtr->field_A, PIXEL_FILL(4));
|
||||
AddTextPrinterParameterized3(structPtr->field_A, 1, 0, 1, color, -1, gStringVar4);
|
||||
CopyWindowToVram(structPtr->field_A, 2);
|
||||
FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4));
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, 1, color, -1, gStringVar4);
|
||||
CopyWindowToVram(structPtr->ribbonCountWindowId, 2);
|
||||
}
|
||||
|
||||
void sub_81D0EFC(struct PokenavSub14 *structPtr)
|
||||
@@ -769,11 +779,11 @@ void sub_81D0EFC(struct PokenavSub14 *structPtr)
|
||||
u32 ribbonId = sub_81D0954();
|
||||
u8 color[] = {TEXT_COLOR_RED, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY};
|
||||
|
||||
FillWindowPixelBuffer(structPtr->field_A, PIXEL_FILL(4));
|
||||
FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4));
|
||||
if (ribbonId < 25)
|
||||
{
|
||||
for (i = 0; i < 2; i++)
|
||||
AddTextPrinterParameterized3(structPtr->field_A, 1, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]);
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -783,13 +793,13 @@ void sub_81D0EFC(struct PokenavSub14 *structPtr)
|
||||
|
||||
ribbonId--;
|
||||
for (i = 0; i < 2; i++)
|
||||
AddTextPrinterParameterized3(structPtr->field_A, 1, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]);
|
||||
AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]);
|
||||
}
|
||||
|
||||
CopyWindowToVram(structPtr->field_A, 2);
|
||||
CopyWindowToVram(structPtr->ribbonCountWindowId, 2);
|
||||
}
|
||||
|
||||
static const struct WindowTemplate gUnknown_08624BC4 =
|
||||
static const struct WindowTemplate sRibbonSummaryMonNameWindowTemplate =
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 14,
|
||||
@@ -800,23 +810,23 @@ static const struct WindowTemplate gUnknown_08624BC4 =
|
||||
.baseBlock = 0x54,
|
||||
};
|
||||
|
||||
void sub_81D0FCC(struct PokenavSub14 *structPtr)
|
||||
void AddRibbonSummaryMonNameWindow(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
structPtr->field_8 = AddWindow(&gUnknown_08624BC4);
|
||||
PutWindowTilemap(structPtr->field_8);
|
||||
sub_81D0FF0(structPtr);
|
||||
structPtr->nameWindowId = AddWindow(&sRibbonSummaryMonNameWindowTemplate);
|
||||
PutWindowTilemap(structPtr->nameWindowId);
|
||||
PrintRibbbonsSummaryMonInfo(structPtr);
|
||||
}
|
||||
|
||||
static const u8 sMaleIconString[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sFemaleIconString[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
|
||||
static const u8 sGenderlessIconString[] = _("{UNK_SPACER}");
|
||||
|
||||
void sub_81D0FF0(struct PokenavSub14 *structPtr)
|
||||
void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
const u8 *genderTxt;
|
||||
u8 *txtPtr;
|
||||
u8 level, gender;
|
||||
u16 windowId = structPtr->field_8;
|
||||
u16 windowId = structPtr->nameWindowId;
|
||||
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
GetCurrMonInfo1(gStringVar3, &level, &gender);
|
||||
@@ -843,7 +853,7 @@ void sub_81D0FF0(struct PokenavSub14 *structPtr)
|
||||
CopyWindowToVram(windowId, 2);
|
||||
}
|
||||
|
||||
static const struct WindowTemplate gUnknown_08624BE8[] =
|
||||
static const struct WindowTemplate sRibbonMonListIndexWindowTemplate[] =
|
||||
{
|
||||
{
|
||||
.bg = 2,
|
||||
@@ -857,46 +867,46 @@ static const struct WindowTemplate gUnknown_08624BE8[] =
|
||||
{},
|
||||
};
|
||||
|
||||
void sub_81D10A4(struct PokenavSub14 *structPtr)
|
||||
void AddRibbonListIndexWindow(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
structPtr->field_C = AddWindow(gUnknown_08624BE8);
|
||||
FillWindowPixelBuffer(structPtr->field_C, PIXEL_FILL(1));
|
||||
PutWindowTilemap(structPtr->field_C);
|
||||
sub_81D10D0(structPtr);
|
||||
structPtr->listIdxWindowId = AddWindow(sRibbonMonListIndexWindowTemplate);
|
||||
FillWindowPixelBuffer(structPtr->listIdxWindowId, PIXEL_FILL(1));
|
||||
PutWindowTilemap(structPtr->listIdxWindowId);
|
||||
PrintRibbonsMonListIndex(structPtr);
|
||||
}
|
||||
|
||||
void sub_81D10D0(struct PokenavSub14 *structPtr)
|
||||
void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
s32 x;
|
||||
u8 *txtPtr;
|
||||
u32 id = sub_81D06C4() + 1;
|
||||
u32 count = sub_81D06D4();
|
||||
u32 id = GetRibbonsSummaryCurrentIndex() + 1;
|
||||
u32 count = GetRibbonsSummaryMonListCount();
|
||||
|
||||
txtPtr = ConvertIntToDecimalStringN(gStringVar1, id, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
*(txtPtr++) = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
x = GetStringCenterAlignXOffset(1, gStringVar1, 56);
|
||||
AddTextPrinterParameterized(structPtr->field_C, 1, gStringVar1, x, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(structPtr->field_C, 2);
|
||||
AddTextPrinterParameterized(structPtr->listIdxWindowId, 1, gStringVar1, x, 1, TEXT_SPEED_FF, NULL);
|
||||
CopyWindowToVram(structPtr->listIdxWindowId, 2);
|
||||
}
|
||||
|
||||
void sub_81D1148(struct PokenavSub14 *structPtr)
|
||||
void ResetSpritesAndDrawRibbonsMonFrontPic(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
u16 species;
|
||||
u32 personality, otId;
|
||||
|
||||
GetCurrMonInfo2(&species, &personality, &otId);
|
||||
ResetAllPicSprites();
|
||||
structPtr->field_10 = sub_81D1184(40, 104);
|
||||
sub_81C7990(15, 0);
|
||||
structPtr->monSpriteId = DrawRibbonsMonFrontPic(40, 104);
|
||||
PokenavFillPalette(15, 0);
|
||||
}
|
||||
|
||||
void sub_81D1178(struct PokenavSub14 *structPtr)
|
||||
void DestroyRibbonsMonFrontPic(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
FreeAndDestroyMonPicSprite(structPtr->field_10);
|
||||
FreeAndDestroyMonPicSprite(structPtr->monSpriteId);
|
||||
}
|
||||
|
||||
u16 sub_81D1184(s32 unused0, s32 unused1)
|
||||
u16 DrawRibbonsMonFrontPic(s32 unused0, s32 unused1)
|
||||
{
|
||||
u16 species, spriteId;
|
||||
u32 personality, otId;
|
||||
@@ -909,19 +919,19 @@ u16 sub_81D1184(s32 unused0, s32 unused1)
|
||||
|
||||
void sub_81D11D8(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
sub_81D1258(&gSprites[structPtr->field_10], 40, -32, 6);
|
||||
sub_81D1258(&gSprites[structPtr->monSpriteId], 40, -32, 6);
|
||||
}
|
||||
|
||||
void sub_81D11FC(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
FreeAndDestroyMonPicSprite(structPtr->field_10);
|
||||
structPtr->field_10 = sub_81D1184(-32, 104);
|
||||
sub_81D1258(&gSprites[structPtr->field_10], -32, 40, 6);
|
||||
FreeAndDestroyMonPicSprite(structPtr->monSpriteId);
|
||||
structPtr->monSpriteId = DrawRibbonsMonFrontPic(-32, 104);
|
||||
sub_81D1258(&gSprites[structPtr->monSpriteId], -32, 40, 6);
|
||||
}
|
||||
|
||||
bool32 sub_81D1234(struct PokenavSub14 *structPtr)
|
||||
{
|
||||
return (gSprites[structPtr->field_10].callback != SpriteCallbackDummy);
|
||||
return (gSprites[structPtr->monSpriteId].callback != SpriteCallbackDummy);
|
||||
}
|
||||
|
||||
void sub_81D1258(struct Sprite *sprite, s32 arg1, s32 arg2, s32 arg3)
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "decompress.h"
|
||||
#include "sound.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "random.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "text.h"
|
||||
#include "item.h"
|
||||
#include "task.h"
|
||||
#include "constants/species.h"
|
||||
#include "save.h"
|
||||
#include "load_save.h"
|
||||
#include "pokemon.h"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "battle_controllers.h"
|
||||
#include "link.h"
|
||||
#include "sprite.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "battle_interface.h"
|
||||
#include "battle_anim.h"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "random.h"
|
||||
#include "roamer.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "constants/coins.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/roulette.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
#define BALLS_PER_ROUND 6
|
||||
|
||||
@@ -100,16 +100,16 @@ void ScanlineEffect_InitHBlankDmaTransfer(void)
|
||||
|
||||
static void CopyValue16Bit(void)
|
||||
{
|
||||
u16 *dest = (u16 *)gScanlineEffect.dmaDest;
|
||||
u16 *src = (u16 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer];
|
||||
vu16 *dest = (vu16 *)gScanlineEffect.dmaDest;
|
||||
vu16 *src = (vu16 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer];
|
||||
|
||||
*dest = *src;
|
||||
}
|
||||
|
||||
static void CopyValue32Bit(void)
|
||||
{
|
||||
u32 *dest = (u32 *)gScanlineEffect.dmaDest;
|
||||
u32 *src = (u32 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer];
|
||||
vu32 *dest = (vu32 *)gScanlineEffect.dmaDest;
|
||||
vu32 *src = (vu32 *)&gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer];
|
||||
|
||||
*dest = *src;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "string_util.h"
|
||||
#include "tv.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/tv.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/secret_bases.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/tv.h"
|
||||
|
||||
|
||||
+3
-3
@@ -984,7 +984,7 @@ static void Task_BuyHowManyDialogueInit(u8 taskId)
|
||||
u16 maxQuantity;
|
||||
|
||||
DrawStdFrameWithCustomTileAndPalette(3, FALSE, 1, 13);
|
||||
ConvertIntToDecimalStringN(gStringVar1, quantityInBag, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
ConvertIntToDecimalStringN(gStringVar1, quantityInBag, STR_CONV_MODE_RIGHT_ALIGN, MAX_ITEM_DIGITS + 1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_InBagVar1);
|
||||
BuyMenuPrint(3, gStringVar4, 0, 1, 0, 0);
|
||||
tItemCount = 1;
|
||||
@@ -1026,7 +1026,7 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
|
||||
ClearWindowTilemap(3);
|
||||
PutWindowTilemap(1);
|
||||
CopyItemName(tItemId, gStringVar1);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, BAG_ITEM_CAPACITY_DIGITS);
|
||||
ConvertIntToDecimalStringN(gStringVar3, gShopDataPtr->totalCost, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
BuyMenuDisplayMessage(taskId, gText_Var1AndYouWantedVar2, BuyMenuConfirmPurchase);
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
|
||||
|
||||
FillWindowPixelBuffer(4, PIXEL_FILL(1));
|
||||
PrintMoneyAmount(4, 38, 1, gShopDataPtr->totalCost, TEXT_SPEED_FF);
|
||||
ConvertIntToDecimalStringN(gStringVar1, tItemCount, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
ConvertIntToDecimalStringN(gStringVar1, tItemCount, STR_CONV_MODE_LEADING_ZEROS, BAG_ITEM_CAPACITY_DIGITS);
|
||||
StringExpandPlaceholders(gStringVar4, gText_xVar1);
|
||||
BuyMenuPrint(4, gStringVar4, 0, 1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "trig.h"
|
||||
#include "window.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
#define STARTER_MON_COUNT 3
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/union_room.h"
|
||||
|
||||
|
||||
+9
-10
@@ -29,7 +29,6 @@
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/easy_chat.h"
|
||||
#include "constants/trainer_hill.h"
|
||||
@@ -672,17 +671,17 @@ bool32 LoadTrainerHillFloorObjectEventScripts(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static u32 sub_81D5F58(u8 floorId, u32 bit, u32 arg2, u32 arg3)
|
||||
static u16 GetMetatileForFloor(u8 floorId, u32 x, u32 y, u32 stride) // stride is always 16
|
||||
{
|
||||
u8 var0;
|
||||
u16 var1;
|
||||
u16 var2;
|
||||
bool8 impassable;
|
||||
u16 metatile;
|
||||
u16 elevation;
|
||||
|
||||
var0 = (sHillData->floors[floorId].display.unk3A0[arg2] >> (15 - bit)) & 1;
|
||||
var1 = sHillData->floors[floorId].display.data[arg2 * arg3 + bit] + 0x200;
|
||||
var2 = 0x3000;
|
||||
impassable = (sHillData->floors[floorId].display.collisionData[y] >> (15 - x) & 1);
|
||||
metatile = sHillData->floors[floorId].display.metatileData[stride * y + x] + 0x200;
|
||||
elevation = 0x3000;
|
||||
|
||||
return (((var0 << 10) & 0xc00) | var2) | (var1 & 0x3ff);
|
||||
return (((impassable << 10) & METATILE_COLLISION_MASK) | elevation) | (metatile & METATILE_ID_MASK);
|
||||
}
|
||||
|
||||
void GenerateTrainerHillFloorLayout(u16 *mapArg)
|
||||
@@ -722,7 +721,7 @@ void GenerateTrainerHillFloorLayout(u16 *mapArg)
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
for (j = 0; j < 16; j++)
|
||||
dst[j] = sub_81D5F58(mapId, j, i, 0x10);
|
||||
dst[j] = GetMetatileForFloor(mapId, j, i, 0x10);
|
||||
dst += 31;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "sprite.h"
|
||||
#include "window.h"
|
||||
#include "malloc.h"
|
||||
#include "constants/species.h"
|
||||
#include "palette.h"
|
||||
#include "decompress.h"
|
||||
#include "trainer_pokemon_sprites.h"
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/script_menu.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/tv.h"
|
||||
|
||||
// Static type declarations
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user