diff --git a/.clang-format b/.clang-format index ebd606a699..d9baf49156 100644 --- a/.clang-format +++ b/.clang-format @@ -5,12 +5,11 @@ LineEnding: LF ColumnLimit: 0 AlignAfterOpenBracket: DontAlign -AlignConsecutiveAssignments: - Enabled: true -AlignConsecutiveBitFields: - Enabled: true +AlignConsecutiveAssignments: None +AlignConsecutiveBitFields: None AlignConsecutiveDeclarations: None AlignConsecutiveMacros: Consecutive +AlignEscapedNewlines: LeftWithLastLine AlignTrailingComments: true AlignArrayOfStructures: Left diff --git a/include/bag_types_def.h b/include/bag_types_def.h index 03ca50d71e..98f2e6c0e9 100644 --- a/include/bag_types_def.h +++ b/include/bag_types_def.h @@ -20,10 +20,10 @@ typedef enum RegisterItemResult { // Enum for argument "code" to GetItemUseErrorMessage typedef enum ItemUseError { - ITEMUSEERROR_OKAY = 0, // no error + ITEMUSEERROR_OKAY = 0, // no error ITEMUSEERROR_NODISMOUNT = 1, // can't get off bike ITEMUSEERROR_NOFOLLOWER = 2, // have a companion - ITEMUSEERROR_NOTNOW = 3, // you're a member of team rocket + ITEMUSEERROR_NOTNOW = 3, // you're a member of team rocket ITEMUSEERROR_OAKSWORDS = -1u, } ItemUseError; @@ -58,7 +58,7 @@ typedef struct BagViewPocket { typedef struct ItemCheckUseData { u32 mapId; int playerState; - u16 haveFollower : 1; + u16 haveFollower : 1; u16 haveRocketCostume : 1; u16 facingTile; u16 standingTile; diff --git a/include/battle/battle.h b/include/battle/battle.h index 85e4e6a631..af11684c17 100644 --- a/include/battle/battle.h +++ b/include/battle/battle.h @@ -56,34 +56,34 @@ typedef struct FieldConditionData { } FieldConditionData; typedef struct SideConditionData { - u32 reflectBattler : 2; - u32 reflectTurns : 3; - u32 lightScreenBattler : 2; - u32 lightScreenTurns : 3; - u32 mistBattler : 2; - u32 mistTurns : 3; - u32 safeguardBattler : 2; - u32 safeguardTurns : 3; - u32 followMeFlag : 1; - u32 battlerIdFollowMe : 2; + u32 reflectBattler : 2; + u32 reflectTurns : 3; + u32 lightScreenBattler : 2; + u32 lightScreenTurns : 3; + u32 mistBattler : 2; + u32 mistTurns : 3; + u32 safeguardBattler : 2; + u32 safeguardTurns : 3; + u32 followMeFlag : 1; + u32 battlerIdFollowMe : 2; u32 battlerBitKnockedOffItem : 6; - u32 unk0_1D : 3; - u32 spikesLayers : 2; - u32 toxicSpikesLayers : 2; - u32 unk4_4 : 28; + u32 unk0_1D : 3; + u32 spikesLayers : 2; + u32 toxicSpikesLayers : 2; + u32 unk4_4 : 28; } SideConditionData; typedef struct TurnData { - u32 struggleFlag : 1; - u32 unk0_1 : 1; - u32 protectFlag : 1; + u32 struggleFlag : 1; + u32 unk0_1 : 1; + u32 protectFlag : 1; u32 helpingHandFlag : 1; - u32 magicCoatFlag : 1; - u32 snatchFlag : 1; - u32 roostFlag : 1; - u32 runFlag : 2; // 1 - Fled using item, 2 - Fled using ability - u32 endureFlag : 1; - u32 unk0_A : 22; + u32 magicCoatFlag : 1; + u32 snatchFlag : 1; + u32 roostFlag : 1; + u32 runFlag : 2; // 1 - Fled using item, 2 - Fled using ability + u32 endureFlag : 1; + u32 unk0_A : 22; int physicalDamage[4]; int battlerIdPhysicalDamage; int battlerBitPhysicalDamage; @@ -96,14 +96,14 @@ typedef struct TurnData { } TurnData; typedef struct SelfTurnData { - u32 ignorePressure : 1; + u32 ignorePressure : 1; u32 lightningRodFlag : 1; - u32 stormDrainFlag : 1; - u32 moldBreakerFlag : 1; - u32 trickRoomFlag : 1; - u32 endureItemFlag : 1; - u32 rolloutCount : 3; - u32 unk0_9 : 23; + u32 stormDrainFlag : 1; + u32 moldBreakerFlag : 1; + u32 trickRoomFlag : 1; + u32 endureItemFlag : 1; + u32 rolloutCount : 3; + u32 unk0_9 : 23; int physicalDamage; int battlerIdPhysicalAttacker; int specialDamage; @@ -145,49 +145,49 @@ typedef struct TrainerAIData { } TrainerAIData; typedef struct MoveFailFlags { - u32 paralysis : 1; - u32 noEffect : 1; - u32 imprison : 1; + u32 paralysis : 1; + u32 noEffect : 1; + u32 imprison : 1; u32 infatuation : 1; - u32 disabled : 1; - u32 unk0_5 : 1; - u32 flinch : 1; - u32 confusion : 1; - u32 gravity : 1; - u32 healBlock : 1; - u32 unused : 21; + u32 disabled : 1; + u32 unk0_5 : 1; + u32 flinch : 1; + u32 confusion : 1; + u32 gravity : 1; + u32 healBlock : 1; + u32 unused : 21; } MoveFailFlags; typedef struct UnkBattlemonSub { - u32 disabledTurns : 3; - u32 encoredTurns : 3; - u32 isCharged : 2; - u32 tauntTurns : 3; + u32 disabledTurns : 3; + u32 encoredTurns : 3; + u32 isCharged : 2; + u32 tauntTurns : 3; u32 protectSuccessTurns : 2; - u32 perishSongTurns : 2; - u32 rolloutCount : 3; - u32 furyCutterCount : 3; - u32 stockpileCount : 3; - u32 stockpileDefCount : 3; + u32 perishSongTurns : 2; + u32 rolloutCount : 3; + u32 furyCutterCount : 3; + u32 stockpileCount : 3; + u32 stockpileDefCount : 3; u32 stockpileSpDefCount : 3; - u32 truantFlag : 1; - u32 flashFire : 1; - u32 battlerIdLockOn : 2; - u32 mimicedMoveIndex : 4; - u32 battlerIdBinding : 2; - u32 battlerIdMeanLook : 2; - u32 lastResortCount : 3; - u32 magnetRiseTurns : 3; - u32 healBlockTurns : 3; - u32 embargoFlag : 3; - u32 knockOffFlag : 1; // unclear whether true mean knocked off or not knocked - // off based on current information on its usage - u32 metronomeTurns : 4; // refers to the item, not the move - u32 micleBerryFlag : 1; + u32 truantFlag : 1; + u32 flashFire : 1; + u32 battlerIdLockOn : 2; + u32 mimicedMoveIndex : 4; + u32 battlerIdBinding : 2; + u32 battlerIdMeanLook : 2; + u32 lastResortCount : 3; + u32 magnetRiseTurns : 3; + u32 healBlockTurns : 3; + u32 embargoFlag : 3; + u32 knockOffFlag : 1; // unclear whether true mean knocked off or not knocked + // off based on current information on its usage + u32 metronomeTurns : 4; // refers to the item, not the move + u32 micleBerryFlag : 1; u32 custapBerryFlag : 1; - u32 quickClawFlag : 1; - u32 meFirstFlag : 1; - u32 unk4_2F : 1; // unused + u32 quickClawFlag : 1; + u32 meFirstFlag : 1; + u32 unk4_2F : 1; // unused int rechargeCount; int fakeOutCount; int slowStartTurns; @@ -212,34 +212,34 @@ typedef struct BattleMon { u16 spAtk; u16 spDef; u16 moves[MAX_MON_MOVES]; - u32 hpIV : 5; - u32 atkIV : 5; - u32 defIV : 5; - u32 speedIV : 5; - u32 spAtkIV : 5; - u32 spDefIV : 5; - u32 isEgg : 1; + u32 hpIV : 5; + u32 atkIV : 5; + u32 defIV : 5; + u32 speedIV : 5; + u32 spAtkIV : 5; + u32 spDefIV : 5; + u32 isEgg : 1; u32 hasNickname : 1; s8 statChanges[NUM_BATTLE_STATS]; int weight; u8 type1; u8 type2; - u8 form : 5; - u8 shiny : 1; + u8 form : 5; + u8 shiny : 1; u8 unk26_6 : 2; u8 ability; - u32 sendOutFlag : 1; - u32 intimidateFlag : 1; - u32 traceFlag : 1; - u32 downloadFlag : 1; + u32 sendOutFlag : 1; + u32 intimidateFlag : 1; + u32 traceFlag : 1; + u32 downloadFlag : 1; u32 anticipationFlag : 1; - u32 forewarnFlag : 1; - u32 slowStartFlag : 1; - u32 slowStartEnded : 1; - u32 friskFlag : 1; - u32 moldBreakerFlag : 1; - u32 pressureFlag : 1; - u32 unk28_B : 21; + u32 forewarnFlag : 1; + u32 slowStartFlag : 1; + u32 slowStartEnded : 1; + u32 friskFlag : 1; + u32 moldBreakerFlag : 1; + u32 pressureFlag : 1; + u32 unk28_B : 21; u8 movePPCur[MAX_MON_MOVES]; u8 movePP[MAX_MON_MOVES]; u8 level; @@ -257,7 +257,7 @@ typedef struct BattleMon { u16 unk76; u8 unk78; u8 msgFlag; - u8 gender : 4; + u8 gender : 4; u8 metGender : 4; u8 ball; u32 moveEffectFlags; @@ -433,7 +433,7 @@ typedef struct BattleContext { u8 unk_314C[4]; int battlersOnField; u32 battleContinueFlag : 1; - u32 unused : 31; + u32 unused : 31; } BattleContext; typedef struct BattleSystem BattleSystem; @@ -583,10 +583,10 @@ struct BattleSystem { u8 unk23FC; u8 unk23FD; u8 unk23FE; - u8 unk240F_0 : 1; - u8 unk240F_1 : 1; - u8 unk240E_F : 1; - u8 criticalHpMusic : 2; + u8 unk240F_0 : 1; + u8 unk240F_1 : 1; + u8 unk240E_F : 1; + u8 criticalHpMusic : 2; u8 criticalHpMusicDelay : 3; Terrain terrain; int unk2404; @@ -617,10 +617,10 @@ struct BattleSystem { u16 unk245C[4]; int unk2464[4]; u32 isRecordingPaused : 1; - u32 unk2474_1 : 1; - u32 unk2474_2 : 1; - u32 unk2474_3 : 1; - u32 unk2474_4 : 28; + u32 unk2474_1 : 1; + u32 unk2474_2 : 1; + u32 unk2474_3 : 1; + u32 unk2474_4 : 28; u32 unk2478; SysTask *unk247C; u8 chatotVoiceParam[4]; @@ -657,8 +657,8 @@ typedef struct { // double battle typedef struct TargetPokemon { u8 selectedMon; - u8 gender : 2; - u8 hide : 1; + u8 gender : 2; + u8 hide : 1; u8 unused1_3 : 5; u8 status; u8 unused3; diff --git a/include/bg_window.h b/include/bg_window.h index a9565a1535..bbaf665625 100644 --- a/include/bg_window.h +++ b/include/bg_window.h @@ -73,14 +73,14 @@ typedef struct Window { u8 width; u8 height; u8 paletteNum; - u16 baseTile : 15; + u16 baseTile : 15; u16 colorMode : 1; void *pixelBuffer; } Window; enum GFScreen { SCREEN_MAIN = 0, - SCREEN_SUB = 1, + SCREEN_SUB = 1, }; enum GFBppMode { @@ -100,16 +100,16 @@ enum GFPalLoadLocation { }; enum GFPalSlotOffset { - GF_PAL_SLOT_0_OFFSET = 0x00, - GF_PAL_SLOT_1_OFFSET = 0x20, - GF_PAL_SLOT_2_OFFSET = 0x40, - GF_PAL_SLOT_3_OFFSET = 0x60, - GF_PAL_SLOT_4_OFFSET = 0x80, - GF_PAL_SLOT_5_OFFSET = 0xA0, - GF_PAL_SLOT_6_OFFSET = 0xC0, - GF_PAL_SLOT_7_OFFSET = 0xE0, - GF_PAL_SLOT_8_OFFSET = 0x100, - GF_PAL_SLOT_9_OFFSET = 0x120, + GF_PAL_SLOT_0_OFFSET = 0x00, + GF_PAL_SLOT_1_OFFSET = 0x20, + GF_PAL_SLOT_2_OFFSET = 0x40, + GF_PAL_SLOT_3_OFFSET = 0x60, + GF_PAL_SLOT_4_OFFSET = 0x80, + GF_PAL_SLOT_5_OFFSET = 0xA0, + GF_PAL_SLOT_6_OFFSET = 0xC0, + GF_PAL_SLOT_7_OFFSET = 0xE0, + GF_PAL_SLOT_8_OFFSET = 0x100, + GF_PAL_SLOT_9_OFFSET = 0x120, GF_PAL_SLOT_10_OFFSET = 0x140, GF_PAL_SLOT_11_OFFSET = 0x160, GF_PAL_SLOT_12_OFFSET = 0x180, @@ -142,17 +142,17 @@ enum GFBgScreenSize { }; enum GFBgBufferSize { - GF_BG_BUF_SIZE_128x128_4BPP = 128 * 128 / 32, - GF_BG_BUF_SIZE_256x256_4BPP = 256 * 256 / 32, - GF_BG_BUF_SIZE_256x512_4BPP = 256 * 512 / 32, - GF_BG_BUF_SIZE_512x256_4BPP = 512 * 256 / 32, - GF_BG_BUF_SIZE_512x512_4BPP = 512 * 512 / 32, + GF_BG_BUF_SIZE_128x128_4BPP = 128 * 128 / 32, + GF_BG_BUF_SIZE_256x256_4BPP = 256 * 256 / 32, + GF_BG_BUF_SIZE_256x512_4BPP = 256 * 512 / 32, + GF_BG_BUF_SIZE_512x256_4BPP = 512 * 256 / 32, + GF_BG_BUF_SIZE_512x512_4BPP = 512 * 512 / 32, GF_BG_BUF_SIZE_1024x1024_4BPP = 1024 * 1024 / 32, - GF_BG_BUF_SIZE_128x128_8BPP = 128 * 128 / 64, - GF_BG_BUF_SIZE_256x256_8BPP = 256 * 256 / 64, - GF_BG_BUF_SIZE_256x512_8BPP = 256 * 512 / 64, - GF_BG_BUF_SIZE_512x256_8BPP = 512 * 256 / 64, - GF_BG_BUF_SIZE_512x512_8BPP = 512 * 512 / 64, + GF_BG_BUF_SIZE_128x128_8BPP = 128 * 128 / 64, + GF_BG_BUF_SIZE_256x256_8BPP = 256 * 256 / 64, + GF_BG_BUF_SIZE_256x512_8BPP = 256 * 512 / 64, + GF_BG_BUF_SIZE_512x256_8BPP = 512 * 256 / 64, + GF_BG_BUF_SIZE_512x512_8BPP = 512 * 512 / 64, GF_BG_BUF_SIZE_1024x1024_8BPP = 1024 * 1024 / 64, }; diff --git a/include/bug_contest_internal.h b/include/bug_contest_internal.h index 8762a396e4..9a900b08f9 100644 --- a/include/bug_contest_internal.h +++ b/include/bug_contest_internal.h @@ -43,9 +43,9 @@ typedef struct BugContest { u8 lead_mon_idx; // Slot number of the Pokemon you battled with u8 party_cur_num; // Size of the party pre-contest u8 day_of_week; // Used to choose NPCs and encounters - u8 caught_poke : 1; // If you've caught a Pokemon in the contest + u8 caught_poke : 1; // If you've caught a Pokemon in the contest u8 national_dex : 1; // Used to choose NPCs and encounters - u8 placement : 6; // 0: First, 1: Second, 2: Third, 3: Consolation + u8 placement : 6; // 0: First, 1: Second, 2: Third, 3: Consolation u16 sport_balls; // Set to 20, decremented on use u16 prize; // Item ID u32 elapsed_time; // Used to determine when the contest ends diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 94079bcebb..9c883eacb4 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -435,129 +435,129 @@ #ifndef PM_ASM typedef enum { - EGG = 0, - EVENT = 0, - HATCHED = 0, - PAL_PARK = 0, - TALL_GRASS = 2, + EGG = 0, + EVENT = 0, + HATCHED = 0, + PAL_PARK = 0, + TALL_GRASS = 2, DIALGA_GAME_EVENT = 4, PALKIA_GAME_EVENT = 4, - CAVE = 5, - HALL_OF_ORIGIN = 5, - SURFING = 7, - FISHING = 7, - BUILDING = 9, - SAFARI_ZONE = 10, - STARTER = 12, - FOSSIL = 12, - GIFT_EEVEE = 12 + CAVE = 5, + HALL_OF_ORIGIN = 5, + SURFING = 7, + FISHING = 7, + BUILDING = 9, + SAFARI_ZONE = 10, + STARTER = 12, + FOSSIL = 12, + GIFT_EEVEE = 12 } EncounterType; typedef int OriginLanguage; typedef enum { - ARCEUS_NORMAL = 0, - ARCEUS_FIST = 1, - ARCEUS_SKY = 2, - ARCEUS_TOXIC = 3, - ARCEUS_EARTH = 4, - ARCEUS_STONE = 5, - ARCEUS_INSECT = 6, - ARCEUS_SPOOKY = 7, - ARCEUS_IRON = 8, - ARCEUS_MYSTERY = 9, - ARCEUS_FLAME = 10, - ARCEUS_SPLASH = 11, - ARCEUS_MEADOW = 12, - ARCEUS_ZAP = 13, - ARCEUS_MIND = 14, - ARCEUS_ICICLE = 15, - ARCEUS_DRACO = 16, - ARCEUS_DREAD = 17, + ARCEUS_NORMAL = 0, + ARCEUS_FIST = 1, + ARCEUS_SKY = 2, + ARCEUS_TOXIC = 3, + ARCEUS_EARTH = 4, + ARCEUS_STONE = 5, + ARCEUS_INSECT = 6, + ARCEUS_SPOOKY = 7, + ARCEUS_IRON = 8, + ARCEUS_MYSTERY = 9, + ARCEUS_FLAME = 10, + ARCEUS_SPLASH = 11, + ARCEUS_MEADOW = 12, + ARCEUS_ZAP = 13, + ARCEUS_MIND = 14, + ARCEUS_ICICLE = 15, + ARCEUS_DRACO = 16, + ARCEUS_DREAD = 17, ARCEUS_FORM_MAX = 18, - BURMY_PLANT = 0, - BURMY_SANDY = 1, - BURMY_TRASH = 2, + BURMY_PLANT = 0, + BURMY_SANDY = 1, + BURMY_TRASH = 2, BURMY_FORM_MAX = 3, - WORMADAM_PLANT = 0, - WORMADAM_SANDY = 1, - WORMADAM_TRASH = 2, + WORMADAM_PLANT = 0, + WORMADAM_SANDY = 1, + WORMADAM_TRASH = 2, WORMADAM_FORM_MAX = 3, - DEOXYS_NORMAL = 0, - DEOXYS_ATTACK = 1, - DEOXYS_DEFENSE = 2, - DEOXYS_SPEED = 3, + DEOXYS_NORMAL = 0, + DEOXYS_ATTACK = 1, + DEOXYS_DEFENSE = 2, + DEOXYS_SPEED = 3, DEOXYS_FORM_MAX = 4, - GIRATINA_ALTERED = 0, - GIRATINA_ORIGIN = 1, + GIRATINA_ALTERED = 0, + GIRATINA_ORIGIN = 1, GIRATINA_FORM_MAX = 2, - ROTOM_NORMAL = 0, - ROTOM_HEAT = 1, - ROTOM_WASH = 2, - ROTOM_FROST = 3, - ROTOM_FAN = 4, - ROTOM_MOW = 5, + ROTOM_NORMAL = 0, + ROTOM_HEAT = 1, + ROTOM_WASH = 2, + ROTOM_FROST = 3, + ROTOM_FAN = 4, + ROTOM_MOW = 5, ROTOM_FORM_MAX = 6, - SHELLOS_WEST = 0, - SHELLOS_EAST = 1, + SHELLOS_WEST = 0, + SHELLOS_EAST = 1, SHELLOS_FORM_MAX = 2, - GASTRODON_WEST = 0, - GASTRODON_EAST = 1, + GASTRODON_WEST = 0, + GASTRODON_EAST = 1, GASTRODON_FORM_MAX = 2, - CASTFORM_NORMAL = 0, - CASTFORM_SUNNY = 1, - CASTFORM_RAINY = 2, - CASTFORM_SNOWY = 3, + CASTFORM_NORMAL = 0, + CASTFORM_SUNNY = 1, + CASTFORM_RAINY = 2, + CASTFORM_SNOWY = 3, CASTFORM_FORM_MAX = 4, - CHERRIM_CLOUDY = 0, - CHERRIM_SUNNY = 1, + CHERRIM_CLOUDY = 0, + CHERRIM_SUNNY = 1, CHERRIM_FORM_MAX = 2, - UNOWN_A = 0, - UNOWN_B = 1, - UNOWN_C = 2, - UNOWN_D = 3, - UNOWN_E = 4, - UNOWN_F = 5, - UNOWN_G = 6, - UNOWN_H = 7, - UNOWN_I = 8, - UNOWN_J = 9, - UNOWN_K = 10, - UNOWN_L = 11, - UNOWN_M = 12, - UNOWN_N = 13, - UNOWN_O = 14, - UNOWN_P = 15, - UNOWN_Q = 16, - UNOWN_R = 17, - UNOWN_S = 18, - UNOWN_T = 19, - UNOWN_U = 20, - UNOWN_V = 21, - UNOWN_W = 22, - UNOWN_X = 23, - UNOWN_Y = 24, - UNOWN_Z = 25, + UNOWN_A = 0, + UNOWN_B = 1, + UNOWN_C = 2, + UNOWN_D = 3, + UNOWN_E = 4, + UNOWN_F = 5, + UNOWN_G = 6, + UNOWN_H = 7, + UNOWN_I = 8, + UNOWN_J = 9, + UNOWN_K = 10, + UNOWN_L = 11, + UNOWN_M = 12, + UNOWN_N = 13, + UNOWN_O = 14, + UNOWN_P = 15, + UNOWN_Q = 16, + UNOWN_R = 17, + UNOWN_S = 18, + UNOWN_T = 19, + UNOWN_U = 20, + UNOWN_V = 21, + UNOWN_W = 22, + UNOWN_X = 23, + UNOWN_Y = 24, + UNOWN_Z = 25, UNOWN_EXCLAMATION_MARK = 26, - UNOWN_QUESTION_MARK = 27, - UNOWN_FORM_MAX = 28, + UNOWN_QUESTION_MARK = 27, + UNOWN_FORM_MAX = 28, - PICHU_NORMAL = 0, + PICHU_NORMAL = 0, PICHU_SPIKY_EAR = 1, - PICHU_FORM_MAX = 2, + PICHU_FORM_MAX = 2, EGG_STANDARD = 0, - EGG_MANAPHY = 1, + EGG_MANAPHY = 1, EGG_FORM_MAX = 2, } AlternateForms; diff --git a/include/credits/data.h b/include/credits/data.h index c58c51cf2f..8d931152ca 100644 --- a/include/credits/data.h +++ b/include/credits/data.h @@ -49,21 +49,21 @@ typedef struct { } Cutscene; static const WindowTemplate ov76_021E6E98 = { - .bgId = 0x05, - .left = 0x03, - .top = 0x00, - .width = 0x18, - .height = 0x18, - .palette = 0x0F, + .bgId = 0x05, + .left = 0x03, + .top = 0x00, + .width = 0x18, + .height = 0x18, + .palette = 0x0F, .baseTile = 0x0001, }; static const ObjCharTransferTemplate sObjCharTransferTemplate = { 0x28, 0, 0, HEAP_ID_CREDITS }; static const GraphicsModes ov76_021E6EB0 = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; @@ -80,112 +80,112 @@ static const ScrnFileIds ov76_021E6EE8 = { }; static const BgTemplate ov76_021E6F50 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xd800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const BgTemplate ov76_021E6F6C = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe800, - .charBase = GX_BG_CHARBASE_0x08000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x08000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const BgTemplate ov76_021E6F88 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const BgTemplate ov76_021E6FA4 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xd800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const BgTemplate ov76_021E6F18 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const BgTemplate ov76_021E6F34 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const GraphicsBanks sCreditsGraphicsBanks = { - .bg = GX_VRAM_BG_128_B, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_128_C, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_128_A, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_16_I, + .bg = GX_VRAM_BG_128_B, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_128_C, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_128_A, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_16_I, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE, + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE, }; static const PageTiming sPageTimings[NUM_CREDIT_PAGES] = { diff --git a/include/field_system.h b/include/field_system.h index 39708d0df8..7f5c77f062 100644 --- a/include/field_system.h +++ b/include/field_system.h @@ -212,10 +212,10 @@ extern const OVY_MGR_TEMPLATE gApplication_NewGameFieldsys; extern const OVY_MGR_TEMPLATE gApplication_ContinueFieldsys; static inline void InitLocation(Location *location, int mapId, int warpId, int x, int y, int direction) { - location->mapId = mapId; - location->warpId = warpId; - location->x = x; - location->y = y; + location->mapId = mapId; + location->warpId = warpId; + location->x = x; + location->y = y; location->direction = direction; } diff --git a/include/filesystem_files_def.h b/include/filesystem_files_def.h index 62eec7b60e..d78acc1f12 100644 --- a/include/filesystem_files_def.h +++ b/include/filesystem_files_def.h @@ -4,273 +4,273 @@ #include typedef enum NarcId { - NARC_a_0_0_0 = 0, - NARC_a_0_0_1 = 1, - NARC_poketool_personal_personal = 2, - NARC_poketool_personal_growtbl = 3, - NARC_poketool_pokegra_pokegra = 4, - NARC_poketool_pokegra_height = 5, - NARC_a_0_0_6 = 6, - NARC_a_0_0_7 = 7, - NARC_a_0_0_8 = 8, - NARC_a_0_0_9 = 9, - NARC_a_0_1_0 = 10, - NARC_poketool_waza_waza_tbl = 11, - NARC_fielddata_script_scr_seq = 12, - NARC_a_0_1_3 = 13, - NARC_a_0_1_4 = 14, - NARC_a_0_1_5 = 15, - NARC_graphic_font = 16, - NARC_itemtool_itemdata_item_data = 17, - NARC_itemtool_itemdata_item_icon = 18, - NARC_a_0_1_9 = 19, - NARC_poketool_icongra_poke_icon = 20, - NARC_graphic_plist_gra = 21, - NARC_a_0_2_2 = 22, - NARC_a_0_2_3 = 23, - NARC_a_0_2_4 = 24, - NARC_a_0_2_5 = 25, - NARC_a_0_2_6 = 26, - NARC_msgdata_msg = 27, - NARC_a_0_2_8 = 28, - NARC_a_0_2_9 = 29, - NARC_a_0_3_0 = 30, - NARC_data_namein = 31, - NARC_fielddata_eventdata_zone_event = 32, - NARC_poketool_personal_wotbl = 33, - NARC_poketool_personal_evo = 34, - NARC_a_0_3_5 = 35, - NARC_a_0_3_6 = 36, - NARC_fielddata_encountdata_g_enc_data = 37, - NARC_a_0_3_8 = 38, - NARC_a_0_3_9 = 39, - NARC_a_0_4_0 = 40, - NARC_fielddata_mapmatrix_map_matrix = 41, - NARC_a_0_4_2 = 42, - NARC_a_0_4_3 = 43, - NARC_a_0_4_4 = 44, - NARC_a_0_4_5 = 45, - NARC_demo_title_titledemo = 46, - NARC_a_0_4_7 = 47, - NARC_a_0_4_8 = 48, - NARC_a_0_4_9 = 49, - NARC_a_0_5_0 = 50, - NARC_a_0_5_1 = 51, - NARC_a_0_5_2 = 52, - NARC_a_0_5_3 = 53, - NARC_a_0_5_4 = 54, - NARC_poketool_trainer_trdata = 55, - NARC_poketool_trainer_trpoke = 56, - NARC_poketool_trmsg_trtbl = 57, - NARC_a_0_5_8 = 58, - NARC_a_0_5_9 = 59, - NARC_a_0_6_0 = 60, - NARC_a_0_6_1 = 61, - NARC_a_0_6_2 = 62, - NARC_a_0_6_3 = 63, - NARC_a_0_6_4 = 64, - NARC_a_0_6_5 = 65, - NARC_a_0_6_6 = 66, - NARC_a_0_6_7 = 67, - NARC_a_0_6_8 = 68, - NARC_a_0_6_9 = 69, - NARC_a_0_7_0 = 70, - NARC_a_0_7_1 = 71, - NARC_a_0_7_2 = 72, - NARC_a_0_7_3 = 73, - NARC_application_zukanlist_zukan_data_zukan_data = 74, - NARC_a_0_7_5 = 75, - NARC_a_0_7_6 = 76, - NARC_a_0_7_7 = 77, - NARC_a_0_7_8 = 78, - NARC_a_0_7_9 = 79, - NARC_a_0_8_0 = 80, - NARC_data_mmodel_mmodel = 81, + NARC_a_0_0_0 = 0, + NARC_a_0_0_1 = 1, + NARC_poketool_personal_personal = 2, + NARC_poketool_personal_growtbl = 3, + NARC_poketool_pokegra_pokegra = 4, + NARC_poketool_pokegra_height = 5, + NARC_a_0_0_6 = 6, + NARC_a_0_0_7 = 7, + NARC_a_0_0_8 = 8, + NARC_a_0_0_9 = 9, + NARC_a_0_1_0 = 10, + NARC_poketool_waza_waza_tbl = 11, + NARC_fielddata_script_scr_seq = 12, + NARC_a_0_1_3 = 13, + NARC_a_0_1_4 = 14, + NARC_a_0_1_5 = 15, + NARC_graphic_font = 16, + NARC_itemtool_itemdata_item_data = 17, + NARC_itemtool_itemdata_item_icon = 18, + NARC_a_0_1_9 = 19, + NARC_poketool_icongra_poke_icon = 20, + NARC_graphic_plist_gra = 21, + NARC_a_0_2_2 = 22, + NARC_a_0_2_3 = 23, + NARC_a_0_2_4 = 24, + NARC_a_0_2_5 = 25, + NARC_a_0_2_6 = 26, + NARC_msgdata_msg = 27, + NARC_a_0_2_8 = 28, + NARC_a_0_2_9 = 29, + NARC_a_0_3_0 = 30, + NARC_data_namein = 31, + NARC_fielddata_eventdata_zone_event = 32, + NARC_poketool_personal_wotbl = 33, + NARC_poketool_personal_evo = 34, + NARC_a_0_3_5 = 35, + NARC_a_0_3_6 = 36, + NARC_fielddata_encountdata_g_enc_data = 37, + NARC_a_0_3_8 = 38, + NARC_a_0_3_9 = 39, + NARC_a_0_4_0 = 40, + NARC_fielddata_mapmatrix_map_matrix = 41, + NARC_a_0_4_2 = 42, + NARC_a_0_4_3 = 43, + NARC_a_0_4_4 = 44, + NARC_a_0_4_5 = 45, + NARC_demo_title_titledemo = 46, + NARC_a_0_4_7 = 47, + NARC_a_0_4_8 = 48, + NARC_a_0_4_9 = 49, + NARC_a_0_5_0 = 50, + NARC_a_0_5_1 = 51, + NARC_a_0_5_2 = 52, + NARC_a_0_5_3 = 53, + NARC_a_0_5_4 = 54, + NARC_poketool_trainer_trdata = 55, + NARC_poketool_trainer_trpoke = 56, + NARC_poketool_trmsg_trtbl = 57, + NARC_a_0_5_8 = 58, + NARC_a_0_5_9 = 59, + NARC_a_0_6_0 = 60, + NARC_a_0_6_1 = 61, + NARC_a_0_6_2 = 62, + NARC_a_0_6_3 = 63, + NARC_a_0_6_4 = 64, + NARC_a_0_6_5 = 65, + NARC_a_0_6_6 = 66, + NARC_a_0_6_7 = 67, + NARC_a_0_6_8 = 68, + NARC_a_0_6_9 = 69, + NARC_a_0_7_0 = 70, + NARC_a_0_7_1 = 71, + NARC_a_0_7_2 = 72, + NARC_a_0_7_3 = 73, + NARC_application_zukanlist_zukan_data_zukan_data = 74, + NARC_a_0_7_5 = 75, + NARC_a_0_7_6 = 76, + NARC_a_0_7_7 = 77, + NARC_a_0_7_8 = 78, + NARC_a_0_7_9 = 79, + NARC_a_0_8_0 = 80, + NARC_data_mmodel_mmodel = 81, NARC_application_choose_starter_choose_starter_main_res = 82, - NARC_a_0_8_3 = 83, - NARC_application_record_record = 84, - NARC_a_0_8_5 = 85, - NARC_a_0_8_6 = 86, - NARC_a_0_8_7 = 87, - NARC_a_0_8_8 = 88, - NARC_a_0_8_9 = 89, - NARC_a_0_9_0 = 90, - NARC_a_0_9_1 = 91, - NARC_a_0_9_2 = 92, - NARC_application_choose_starter_choose_starter_sub_res = 93, - NARC_a_0_9_4 = 94, - NARC_a_0_9_5 = 95, - NARC_a_0_9_6 = 96, - NARC_a_0_9_7 = 97, - NARC_a_0_9_8 = 98, - NARC_a_0_9_9 = 99, - NARC_a_1_0_0 = 100, - NARC_a_1_0_1 = 101, - NARC_a_1_0_2 = 102, - NARC_a_1_0_3 = 103, - NARC_a_1_0_4 = 104, - NARC_a_1_0_5 = 105, - NARC_a_1_0_6 = 106, - NARC_a_1_0_7 = 107, - NARC_a_1_0_8 = 108, - NARC_a_1_0_9 = 109, - NARC_a_1_1_0 = 110, - NARC_a_1_1_1 = 111, - NARC_a_1_1_2 = 112, - NARC_a_1_1_3 = 113, - NARC_poketool_pokegra_otherpoke = 114, - NARC_a_1_1_5 = 115, - NARC_a_1_1_6 = 116, - NARC_poketool_pokegra_height_o = 117, - NARC_a_1_1_8 = 118, - NARC_a_1_1_9 = 119, - NARC_demo_intro_intro = 120, - NARC_a_1_2_1 = 121, - NARC_a_1_2_2 = 122, - NARC_a_1_2_3 = 123, - NARC_a_1_2_4 = 124, - NARC_arc_ppark = 125, - NARC_a_1_2_6 = 126, - NARC_a_1_2_7 = 127, - NARC_a_1_2_8 = 128, - NARC_a_1_2_9 = 129, - NARC_a_1_3_0 = 130, - NARC_poketool_trmsg_trtblofs = 131, - NARC_a_1_3_2 = 132, - NARC_a_1_3_3 = 133, - NARC_a_1_3_4 = 134, - NARC_a_1_3_5 = 135, - NARC_fielddata_encountdata_s_enc_data = 136, - NARC_a_1_3_7 = 137, - NARC_poketool_johtozukan = 138, - NARC_a_1_3_9 = 139, - NARC_a_1_4_0 = 140, - NARC_fielddata_tsurepoke_tp_param = 141, - NARC_a_1_4_2 = 142, - NARC_a_1_4_3 = 143, - NARC_a_1_4_4 = 144, - NARC_a_1_4_5 = 145, - NARC_a_1_4_6 = 146, - NARC_a_1_4_7 = 147, - NARC_a_1_4_8 = 148, - NARC_a_1_4_9 = 149, - NARC_a_1_5_0 = 150, - NARC_a_1_5_1 = 151, - NARC_system_touch_subwindow = 152, - NARC_a_1_5_3 = 153, - NARC_a_1_5_4 = 154, - NARC_a_1_5_5 = 155, - NARC_a_1_5_6 = 156, - NARC_a_1_5_7 = 157, - NARC_a_1_5_8 = 158, - NARC_a_1_5_9 = 159, - NARC_a_1_6_0 = 160, - NARC_poketool_pokezukan = 161, - NARC_a_1_6_2 = 162, - NARC_data_gs_areawindow = 163, - NARC_a_1_6_4 = 164, - NARC_data_sbox_gra = 165, - NARC_a_1_6_6 = 166, - NARC_a_1_6_7 = 167, - NARC_a_1_6_8 = 168, - NARC_poketool_personal_performance = 169, - NARC_a_1_7_0 = 170, - NARC_a_1_7_1 = 171, - NARC_application_annon_puzzle_gra = 172, - NARC_a_1_7_3 = 173, - NARC_demo_legend = 174, - NARC_data_resdat = 175, - NARC_a_1_7_6 = 176, - NARC_a_1_7_7 = 177, - NARC_a_1_7_8 = 178, - NARC_a_1_7_9 = 179, - NARC_a_1_8_0 = 180, - NARC_a_1_8_1 = 181, - NARC_a_1_8_2 = 182, - NARC_a_1_8_3 = 183, - NARC_a_1_8_4 = 184, - NARC_application_custom_ball_edit_gs_cb_data = 185, - NARC_a_1_8_6 = 186, - NARC_a_1_8_7 = 187, - NARC_a_1_8_8 = 188, - NARC_a_1_8_9 = 189, - NARC_a_1_9_0 = 190, - NARC_a_1_9_1 = 191, - NARC_a_1_9_2 = 192, - NARC_a_1_9_3 = 193, - NARC_pbr_pokegra = 194, - NARC_pbr_otherpoke = 195, - NARC_pbr_dp_height = 196, - NARC_pbr_dp_height_o = 197, - NARC_a_1_9_6 = 198, - NARC_a_1_9_7 = 199, - NARC_a_1_9_8 = 200, - NARC_a_1_9_9 = 201, - NARC_a_2_0_0 = 202, - NARC_a_2_0_1 = 203, - NARC_a_2_0_2 = 204, - NARC_a_2_0_3 = 205, - NARC_a_2_0_4 = 206, - NARC_a_2_0_5 = 207, - NARC_a_2_0_6 = 208, - NARC_a_2_0_7 = 209, - NARC_a_2_0_8 = 210, - NARC_a_2_0_9 = 211, - NARC_a_2_1_0 = 212, - NARC_a_2_1_1 = 213, - NARC_resource_eng_pms_aikotoba_pms_aikotoba = 214, - NARC_a_2_1_3 = 215, - NARC_application_zukanlist_zukan_data_zukan_data_gira = 216, - NARC_a_2_1_5 = 217, - NARC_a_2_1_6 = 218, - NARC_a_2_1_7 = 219, - NARC_a_2_1_8 = 220, - NARC_a_2_1_9 = 221, - NARC_a_2_2_0 = 222, - NARC_a_2_2_1 = 223, - NARC_a_2_2_2 = 224, - NARC_a_2_2_3 = 225, - NARC_a_2_2_4 = 226, - NARC_a_2_2_5 = 227, - NARC_a_2_2_6 = 228, - NARC_a_2_2_7 = 229, - NARC_a_2_2_8 = 230, - NARC_fielddata_sodateya_kowaza_list = 231, - NARC_a_2_3_0 = 232, - NARC_a_2_3_1 = 233, - NARC_a_2_3_2 = 234, - NARC_a_2_3_3 = 235, - NARC_a_2_3_4 = 236, - NARC_a_2_3_5 = 237, - NARC_a_2_3_6 = 238, - NARC_a_2_3_7 = 239, - NARC_a_2_3_8 = 240, - NARC_a_2_3_9 = 241, - NARC_a_2_4_0 = 242, - NARC_a_2_4_1 = 243, - NARC_a_2_4_2 = 244, - NARC_a_2_4_3 = 245, - NARC_a_2_4_4 = 246, - NARC_a_2_4_5 = 247, - NARC_a_2_4_6 = 248, - NARC_a_2_4_7 = 249, - NARC_a_2_4_8 = 250, - NARC_a_2_4_9 = 251, - NARC_a_2_5_0 = 252, - NARC_a_2_5_1 = 253, - NARC_arc_headbutt = 254, - NARC_a_2_5_3 = 255, - NARC_data_photo_data = 256, - NARC_a_2_5_5 = 257, - NARC_a_2_5_6 = 258, - NARC_a_2_5_7 = 259, - NARC_a_2_5_8 = 260, - NARC_a_2_5_9 = 261, - NARC_application_guinness = 262, - NARC_graphic_camera_viewfinder = 263, - NARC_demo_opening_gs_opening = 264, - NARC_a_2_6_3 = 265, - NARC_application_voltorb_flip = 266, + NARC_a_0_8_3 = 83, + NARC_application_record_record = 84, + NARC_a_0_8_5 = 85, + NARC_a_0_8_6 = 86, + NARC_a_0_8_7 = 87, + NARC_a_0_8_8 = 88, + NARC_a_0_8_9 = 89, + NARC_a_0_9_0 = 90, + NARC_a_0_9_1 = 91, + NARC_a_0_9_2 = 92, + NARC_application_choose_starter_choose_starter_sub_res = 93, + NARC_a_0_9_4 = 94, + NARC_a_0_9_5 = 95, + NARC_a_0_9_6 = 96, + NARC_a_0_9_7 = 97, + NARC_a_0_9_8 = 98, + NARC_a_0_9_9 = 99, + NARC_a_1_0_0 = 100, + NARC_a_1_0_1 = 101, + NARC_a_1_0_2 = 102, + NARC_a_1_0_3 = 103, + NARC_a_1_0_4 = 104, + NARC_a_1_0_5 = 105, + NARC_a_1_0_6 = 106, + NARC_a_1_0_7 = 107, + NARC_a_1_0_8 = 108, + NARC_a_1_0_9 = 109, + NARC_a_1_1_0 = 110, + NARC_a_1_1_1 = 111, + NARC_a_1_1_2 = 112, + NARC_a_1_1_3 = 113, + NARC_poketool_pokegra_otherpoke = 114, + NARC_a_1_1_5 = 115, + NARC_a_1_1_6 = 116, + NARC_poketool_pokegra_height_o = 117, + NARC_a_1_1_8 = 118, + NARC_a_1_1_9 = 119, + NARC_demo_intro_intro = 120, + NARC_a_1_2_1 = 121, + NARC_a_1_2_2 = 122, + NARC_a_1_2_3 = 123, + NARC_a_1_2_4 = 124, + NARC_arc_ppark = 125, + NARC_a_1_2_6 = 126, + NARC_a_1_2_7 = 127, + NARC_a_1_2_8 = 128, + NARC_a_1_2_9 = 129, + NARC_a_1_3_0 = 130, + NARC_poketool_trmsg_trtblofs = 131, + NARC_a_1_3_2 = 132, + NARC_a_1_3_3 = 133, + NARC_a_1_3_4 = 134, + NARC_a_1_3_5 = 135, + NARC_fielddata_encountdata_s_enc_data = 136, + NARC_a_1_3_7 = 137, + NARC_poketool_johtozukan = 138, + NARC_a_1_3_9 = 139, + NARC_a_1_4_0 = 140, + NARC_fielddata_tsurepoke_tp_param = 141, + NARC_a_1_4_2 = 142, + NARC_a_1_4_3 = 143, + NARC_a_1_4_4 = 144, + NARC_a_1_4_5 = 145, + NARC_a_1_4_6 = 146, + NARC_a_1_4_7 = 147, + NARC_a_1_4_8 = 148, + NARC_a_1_4_9 = 149, + NARC_a_1_5_0 = 150, + NARC_a_1_5_1 = 151, + NARC_system_touch_subwindow = 152, + NARC_a_1_5_3 = 153, + NARC_a_1_5_4 = 154, + NARC_a_1_5_5 = 155, + NARC_a_1_5_6 = 156, + NARC_a_1_5_7 = 157, + NARC_a_1_5_8 = 158, + NARC_a_1_5_9 = 159, + NARC_a_1_6_0 = 160, + NARC_poketool_pokezukan = 161, + NARC_a_1_6_2 = 162, + NARC_data_gs_areawindow = 163, + NARC_a_1_6_4 = 164, + NARC_data_sbox_gra = 165, + NARC_a_1_6_6 = 166, + NARC_a_1_6_7 = 167, + NARC_a_1_6_8 = 168, + NARC_poketool_personal_performance = 169, + NARC_a_1_7_0 = 170, + NARC_a_1_7_1 = 171, + NARC_application_annon_puzzle_gra = 172, + NARC_a_1_7_3 = 173, + NARC_demo_legend = 174, + NARC_data_resdat = 175, + NARC_a_1_7_6 = 176, + NARC_a_1_7_7 = 177, + NARC_a_1_7_8 = 178, + NARC_a_1_7_9 = 179, + NARC_a_1_8_0 = 180, + NARC_a_1_8_1 = 181, + NARC_a_1_8_2 = 182, + NARC_a_1_8_3 = 183, + NARC_a_1_8_4 = 184, + NARC_application_custom_ball_edit_gs_cb_data = 185, + NARC_a_1_8_6 = 186, + NARC_a_1_8_7 = 187, + NARC_a_1_8_8 = 188, + NARC_a_1_8_9 = 189, + NARC_a_1_9_0 = 190, + NARC_a_1_9_1 = 191, + NARC_a_1_9_2 = 192, + NARC_a_1_9_3 = 193, + NARC_pbr_pokegra = 194, + NARC_pbr_otherpoke = 195, + NARC_pbr_dp_height = 196, + NARC_pbr_dp_height_o = 197, + NARC_a_1_9_6 = 198, + NARC_a_1_9_7 = 199, + NARC_a_1_9_8 = 200, + NARC_a_1_9_9 = 201, + NARC_a_2_0_0 = 202, + NARC_a_2_0_1 = 203, + NARC_a_2_0_2 = 204, + NARC_a_2_0_3 = 205, + NARC_a_2_0_4 = 206, + NARC_a_2_0_5 = 207, + NARC_a_2_0_6 = 208, + NARC_a_2_0_7 = 209, + NARC_a_2_0_8 = 210, + NARC_a_2_0_9 = 211, + NARC_a_2_1_0 = 212, + NARC_a_2_1_1 = 213, + NARC_resource_eng_pms_aikotoba_pms_aikotoba = 214, + NARC_a_2_1_3 = 215, + NARC_application_zukanlist_zukan_data_zukan_data_gira = 216, + NARC_a_2_1_5 = 217, + NARC_a_2_1_6 = 218, + NARC_a_2_1_7 = 219, + NARC_a_2_1_8 = 220, + NARC_a_2_1_9 = 221, + NARC_a_2_2_0 = 222, + NARC_a_2_2_1 = 223, + NARC_a_2_2_2 = 224, + NARC_a_2_2_3 = 225, + NARC_a_2_2_4 = 226, + NARC_a_2_2_5 = 227, + NARC_a_2_2_6 = 228, + NARC_a_2_2_7 = 229, + NARC_a_2_2_8 = 230, + NARC_fielddata_sodateya_kowaza_list = 231, + NARC_a_2_3_0 = 232, + NARC_a_2_3_1 = 233, + NARC_a_2_3_2 = 234, + NARC_a_2_3_3 = 235, + NARC_a_2_3_4 = 236, + NARC_a_2_3_5 = 237, + NARC_a_2_3_6 = 238, + NARC_a_2_3_7 = 239, + NARC_a_2_3_8 = 240, + NARC_a_2_3_9 = 241, + NARC_a_2_4_0 = 242, + NARC_a_2_4_1 = 243, + NARC_a_2_4_2 = 244, + NARC_a_2_4_3 = 245, + NARC_a_2_4_4 = 246, + NARC_a_2_4_5 = 247, + NARC_a_2_4_6 = 248, + NARC_a_2_4_7 = 249, + NARC_a_2_4_8 = 250, + NARC_a_2_4_9 = 251, + NARC_a_2_5_0 = 252, + NARC_a_2_5_1 = 253, + NARC_arc_headbutt = 254, + NARC_a_2_5_3 = 255, + NARC_data_photo_data = 256, + NARC_a_2_5_5 = 257, + NARC_a_2_5_6 = 258, + NARC_a_2_5_7 = 259, + NARC_a_2_5_8 = 260, + NARC_a_2_5_9 = 261, + NARC_application_guinness = 262, + NARC_graphic_camera_viewfinder = 263, + NARC_demo_opening_gs_opening = 264, + NARC_a_2_6_3 = 265, + NARC_application_voltorb_flip = 266, } NarcId; #ifdef _IN_FILESYSTEM_C diff --git a/include/font_types_def.h b/include/font_types_def.h index aeb25d6c10..36fed6ea75 100644 --- a/include/font_types_def.h +++ b/include/font_types_def.h @@ -54,7 +54,7 @@ typedef struct TextPrinter { u8 active; u8 state; u8 textSpeedBottom : 7; // x29 - u8 textSpeedTop : 1; + u8 textSpeedTop : 1; u8 delayCounter; u8 scrollDistance; u8 id; diff --git a/include/gf_gfx_planes.h b/include/gf_gfx_planes.h index df03d5e1fc..aad3878670 100644 --- a/include/gf_gfx_planes.h +++ b/include/gf_gfx_planes.h @@ -17,20 +17,20 @@ typedef enum GFBgLayer { GF_BG_LYR_SUB_1, GF_BG_LYR_SUB_2, GF_BG_LYR_SUB_3, - GF_BG_LYR_MAIN_CNT = 4, - GF_BG_LYR_SUB_CNT = 4, + GF_BG_LYR_MAIN_CNT = 4, + GF_BG_LYR_SUB_CNT = 4, GF_BG_LYR_MAIN_FIRST = GF_BG_LYR_MAIN_0, - GF_BG_LYR_SUB_FIRST = GF_BG_LYR_SUB_0, - GF_BG_LYR_MAX = 8, + GF_BG_LYR_SUB_FIRST = GF_BG_LYR_SUB_0, + GF_BG_LYR_MAX = 8, GF_BG_LYR_MAIN_0_F = 1 << (GF_BG_LYR_MAIN_0 - GF_BG_LYR_MAIN_FIRST), GF_BG_LYR_MAIN_1_F = 1 << (GF_BG_LYR_MAIN_1 - GF_BG_LYR_MAIN_FIRST), GF_BG_LYR_MAIN_2_F = 1 << (GF_BG_LYR_MAIN_2 - GF_BG_LYR_MAIN_FIRST), GF_BG_LYR_MAIN_3_F = 1 << (GF_BG_LYR_MAIN_3 - GF_BG_LYR_MAIN_FIRST), - GF_BG_LYR_SUB_0_F = 1 << (GF_BG_LYR_SUB_0 - GF_BG_LYR_SUB_FIRST), - GF_BG_LYR_SUB_1_F = 1 << (GF_BG_LYR_SUB_1 - GF_BG_LYR_SUB_FIRST), - GF_BG_LYR_SUB_2_F = 1 << (GF_BG_LYR_SUB_2 - GF_BG_LYR_SUB_FIRST), - GF_BG_LYR_SUB_3_F = 1 << (GF_BG_LYR_SUB_3 - GF_BG_LYR_SUB_FIRST), + GF_BG_LYR_SUB_0_F = 1 << (GF_BG_LYR_SUB_0 - GF_BG_LYR_SUB_FIRST), + GF_BG_LYR_SUB_1_F = 1 << (GF_BG_LYR_SUB_1 - GF_BG_LYR_SUB_FIRST), + GF_BG_LYR_SUB_2_F = 1 << (GF_BG_LYR_SUB_2 - GF_BG_LYR_SUB_FIRST), + GF_BG_LYR_SUB_3_F = 1 << (GF_BG_LYR_SUB_3 - GF_BG_LYR_SUB_FIRST), GF_BG_LYR_UNALLOC = 0xFF, } GFBgLayer; diff --git a/include/heap.h b/include/heap.h index 93d2ebc617..0bc09e079d 100644 --- a/include/heap.h +++ b/include/heap.h @@ -17,29 +17,29 @@ typedef enum HeapID { HEAP_ID_10, HEAP_ID_FIELD, HEAP_ID_PARTY_MENU, - HEAP_ID_NAMING_SCREEN = 18, - HEAP_ID_20 = 20, - HEAP_ID_26 = 26, - HEAP_ID_TITLE_SCREEN = 30, - HEAP_ID_32 = 32, - HEAP_ID_OPTIONS_APP = 38, - HEAP_ID_OV55 = 40, - HEAP_ID_CHOOSE_STARTER = 46, + HEAP_ID_NAMING_SCREEN = 18, + HEAP_ID_20 = 20, + HEAP_ID_26 = 26, + HEAP_ID_TITLE_SCREEN = 30, + HEAP_ID_32 = 32, + HEAP_ID_OPTIONS_APP = 38, + HEAP_ID_OV55 = 40, + HEAP_ID_CHOOSE_STARTER = 46, HEAP_ID_REGISTER_HALL_OF_FAME = 62, - HEAP_ID_EVOLUTION = 71, - HEAP_ID_CREDITS = 73, - HEAP_ID_INTRO_MOVIE = 74, - HEAP_ID_OV36 = 75, - HEAP_ID_OAKS_SPEECH = 80, - HEAP_ID_CERTIFICATES = 82, - HEAP_ID_89 = 89, - HEAP_ID_ALPH_PUZZLE = 97, - HEAP_ID_MIC_TEST = 98, - HEAP_ID_GAME_BOARD = 110, - HEAP_ID_BERRY_POTS = 130, - HEAP_ID_BERRY_POTS_APP = 131, - HEAP_ID_RANKINGS_APP = 158, - HEAP_ID_VOLTORB_FLIP = 160, + HEAP_ID_EVOLUTION = 71, + HEAP_ID_CREDITS = 73, + HEAP_ID_INTRO_MOVIE = 74, + HEAP_ID_OV36 = 75, + HEAP_ID_OAKS_SPEECH = 80, + HEAP_ID_CERTIFICATES = 82, + HEAP_ID_89 = 89, + HEAP_ID_ALPH_PUZZLE = 97, + HEAP_ID_MIC_TEST = 98, + HEAP_ID_GAME_BOARD = 110, + HEAP_ID_BERRY_POTS = 130, + HEAP_ID_BERRY_POTS_APP = 131, + HEAP_ID_RANKINGS_APP = 158, + HEAP_ID_VOLTORB_FLIP = 160, HEAP_ID_MAX, } HeapID; diff --git a/include/item.h b/include/item.h index 2f539ec5ca..33c0a7ecc7 100644 --- a/include/item.h +++ b/include/item.h @@ -20,39 +20,39 @@ typedef struct ItemSlot { * party member. */ typedef struct ItemPartyParam { - u8 slp_heal : 1; - u8 psn_heal : 1; - u8 brn_heal : 1; - u8 frz_heal : 1; - u8 prz_heal : 1; - u8 cfs_heal : 1; - u8 inf_heal : 1; - u8 guard_spec : 1; - u8 revive : 1; - u8 revive_all : 1; - u8 level_up : 1; - u8 evolve : 1; - u8 atk_stages : 4; - u8 def_stages : 4; - u8 spatk_stages : 4; - u8 spdef_stages : 4; - u8 speed_stages : 4; - u8 accuracy_stages : 4; - u8 critrate_stages : 2; - u8 pp_up : 1; - u8 pp_max : 1; - u8 pp_restore : 1; - u8 pp_restore_all : 1; - u8 hp_restore : 1; - u8 hp_ev_up : 1; - u8 atk_ev_up : 1; - u8 def_ev_up : 1; - u8 speed_ev_up : 1; - u8 spatk_ev_up : 1; - u8 spdef_ev_up : 1; - u8 friendship_mod_lo : 1; + u8 slp_heal : 1; + u8 psn_heal : 1; + u8 brn_heal : 1; + u8 frz_heal : 1; + u8 prz_heal : 1; + u8 cfs_heal : 1; + u8 inf_heal : 1; + u8 guard_spec : 1; + u8 revive : 1; + u8 revive_all : 1; + u8 level_up : 1; + u8 evolve : 1; + u8 atk_stages : 4; + u8 def_stages : 4; + u8 spatk_stages : 4; + u8 spdef_stages : 4; + u8 speed_stages : 4; + u8 accuracy_stages : 4; + u8 critrate_stages : 2; + u8 pp_up : 1; + u8 pp_max : 1; + u8 pp_restore : 1; + u8 pp_restore_all : 1; + u8 hp_restore : 1; + u8 hp_ev_up : 1; + u8 atk_ev_up : 1; + u8 def_ev_up : 1; + u8 speed_ev_up : 1; + u8 spatk_ev_up : 1; + u8 spdef_ev_up : 1; + u8 friendship_mod_lo : 1; u8 friendship_mod_med : 1; - u8 friendship_mod_hi : 1; + u8 friendship_mod_hi : 1; s8 hp_ev_up_param; s8 atk_ev_up_param; s8 def_ev_up_param; @@ -79,10 +79,10 @@ typedef struct ItemData { u8 flingPower; u8 naturalGiftPower; u16 naturalGiftType : 5; - u16 prevent_toss : 1; - u16 selectable : 1; - u16 fieldPocket : 4; - u16 battlePocket : 5; + u16 prevent_toss : 1; + u16 selectable : 1; + u16 fieldPocket : 4; + u16 battlePocket : 5; u8 fieldUseFunc; u8 battleUseFunc; u8 partyUse; diff --git a/include/launch_application.h b/include/launch_application.h index f88da417cc..802839673f 100644 --- a/include/launch_application.h +++ b/include/launch_application.h @@ -83,15 +83,15 @@ typedef struct UnkStruct_0203E8C8 { static inline void InitUnkStructScrCmd408(UnkOv67Args *data, u16 a1, u16 a2, ScriptContext *ctx) { MI_CpuClear8(data, sizeof(UnkOv67Args)); - data->unk_4 = a1; - data->unk_6 = a2; + data->unk_4 = a1; + data->unk_6 = a2; data->saveData = ctx->fieldSystem->saveData; } static inline PCBoxArgs *PCBoxAppData_New(ScriptContext *ctx) { - PCBoxArgs *ret = AllocFromHeap(HEAP_ID_FIELD, sizeof(PCBoxArgs)); - ret->saveData = ctx->fieldSystem->saveData; - ret->unk8 = ScriptReadByte(ctx); + PCBoxArgs *ret = AllocFromHeap(HEAP_ID_FIELD, sizeof(PCBoxArgs)); + ret->saveData = ctx->fieldSystem->saveData; + ret->unk8 = ScriptReadByte(ctx); ret->menuInputStatePtr = &ctx->fieldSystem->menuInputState; return ret; } diff --git a/include/library/spl_emitter.h b/include/library/spl_emitter.h index 71010936e4..03ba43183f 100644 --- a/include/library/spl_emitter.h +++ b/include/library/spl_emitter.h @@ -10,12 +10,12 @@ typedef struct SPLEmitterFlag { union { u32 all; struct { - u32 terminate : 1; + u32 terminate : 1; u32 stop_generate : 1; - u32 stop_calc : 1; - u32 stop_draw : 1; - u32 started : 1; - u32 reserved0 : 27; + u32 stop_calc : 1; + u32 stop_draw : 1; + u32 started : 1; + u32 reserved0 : 27; }; }; } SPLEmitterFlag; @@ -48,10 +48,10 @@ typedef struct SPLEmitter { fx16 chld_tex_s; fx16 chld_tex_t; struct { - u32 gen_intvl : 8; - u32 base_alp : 8; + u32 gen_intvl : 8; + u32 base_alp : 8; u32 calc_cycle : 3; - u32 reserved : 13; + u32 reserved : 13; } etc; VecFx16 cross_to_axis_1; VecFx16 cross_to_axis_2; diff --git a/include/library/spl_manager.h b/include/library/spl_manager.h index d29d1e266d..130d49ffdb 100644 --- a/include/library/spl_manager.h +++ b/include/library/spl_manager.h @@ -18,12 +18,12 @@ typedef struct SPLManager { u16 max_emtr_num; u16 max_ptcl_num; struct { - u32 min : 6; - u32 max : 6; - u32 current : 6; - u32 fix : 6; + u32 min : 6; + u32 max : 6; + u32 current : 6; + u32 fix : 6; u32 drawOrder : 1; - u32 reserved : 7; + u32 reserved : 7; } polygonID; s32 misc_flag; struct { diff --git a/include/library/spl_particle.h b/include/library/spl_particle.h index c853770bdf..757681a95e 100644 --- a/include/library/spl_particle.h +++ b/include/library/spl_particle.h @@ -16,12 +16,12 @@ typedef struct SPLParticle { u16 life_rate_diff_loop; u16 life_rate_diff_noloop; struct { - u16 tex_no : 8; + u16 tex_no : 8; u16 life_rate_offset : 8; } etc; struct { - u16 base_alp : 5; - u16 anm_alp : 5; + u16 base_alp : 5; + u16 anm_alp : 5; u16 current_polygonID : 6; } alp; fx32 base_scl; diff --git a/include/library/spl_resource.h b/include/library/spl_resource.h index 125a6f0936..ad1165abd8 100644 --- a/include/library/spl_resource.h +++ b/include/library/spl_resource.h @@ -8,31 +8,31 @@ typedef union { u32 all; struct { - u32 init_pos_type : 4; - u32 draw_type : 2; - u32 circle_axis : 2; - u32 use_scl_anm : 1; - u32 use_clr_anm : 1; - u32 use_alp_anm : 1; - u32 use_tex_anm : 1; - u32 use_rtt_anm : 1; - u32 use_init_rtt_rndm : 1; - u32 self_dest : 1; - u32 follow_emtr : 1; - u32 use_chld : 1; - u32 pol_rot_axis : 2; - u32 pol_baseplane : 1; - u32 ptcl_random_loop_anm : 1; - u32 draw_child_first : 1; - u32 draw_parent : 1; - u32 camera_offset : 1; - u32 use_fld_grvt : 1; - u32 use_fld_rndm : 1; - u32 use_fld_mgnt : 1; - u32 use_fld_spin : 1; - u32 use_fld_scfld : 1; - u32 use_fld_cngc : 1; - u32 polygonID_fixed : 1; + u32 init_pos_type : 4; + u32 draw_type : 2; + u32 circle_axis : 2; + u32 use_scl_anm : 1; + u32 use_clr_anm : 1; + u32 use_alp_anm : 1; + u32 use_tex_anm : 1; + u32 use_rtt_anm : 1; + u32 use_init_rtt_rndm : 1; + u32 self_dest : 1; + u32 follow_emtr : 1; + u32 use_chld : 1; + u32 pol_rot_axis : 2; + u32 pol_baseplane : 1; + u32 ptcl_random_loop_anm : 1; + u32 draw_child_first : 1; + u32 draw_parent : 1; + u32 camera_offset : 1; + u32 use_fld_grvt : 1; + u32 use_fld_rndm : 1; + u32 use_fld_mgnt : 1; + u32 use_fld_spin : 1; + u32 use_fld_scfld : 1; + u32 use_fld_cngc : 1; + u32 polygonID_fixed : 1; u32 child_polygonID_fixed : 1; }; } SPLResBaseFlag; @@ -40,7 +40,7 @@ typedef union { typedef union { u16 all; struct { - u16 in : 8; + u16 in : 8; u16 out : 8; }; } SPLResInOut; @@ -48,9 +48,9 @@ typedef union { typedef union { u32 all; struct { - u32 in : 8; - u32 peak : 8; - u32 out : 8; + u32 in : 8; + u32 peak : 8; + u32 out : 8; u32 reserved : 8; }; } SPLResInPeakOut; @@ -75,31 +75,31 @@ typedef struct SPLResBase { u16 emtr_life; u16 ptcl_life; struct { - u32 base_scl : 8; - u32 ptcl_life : 8; + u32 base_scl : 8; + u32 ptcl_life : 8; u32 init_vel_mag : 8; - u32 reserved0 : 8; + u32 reserved0 : 8; } rndm; struct { - u32 gen_intvl : 8; - u32 base_alp : 8; - u32 air_resist : 8; - u32 tex_no : 8; - u32 loop_frame : 8; - u32 dbb_scale : 16; + u32 gen_intvl : 8; + u32 base_alp : 8; + u32 air_resist : 8; + u32 tex_no : 8; + u32 loop_frame : 8; + u32 dbb_scale : 16; u32 tex_repeat_num_s : 2; u32 tex_repeat_num_t : 2; - u32 scl_anm_direct : 3; - u32 dpol_center : 1; - u32 reverse_tex_s : 1; - u32 reverse_tex_t : 1; - u32 offset_pos : 3; - u32 reserved1 : 27; + u32 scl_anm_direct : 3; + u32 dpol_center : 1; + u32 reverse_tex_s : 1; + u32 reverse_tex_t : 1; + u32 offset_pos : 3; + u32 reserved1 : 27; } etc; fx16 offset_x; fx16 offset_y; struct { - u32 flag : 8; + u32 flag : 8; u32 reserved : 24; } usr; } SPLResBase; @@ -110,7 +110,7 @@ typedef struct SPLResSclAnm { fx16 scl_e; SPLResInOut in_out; struct { - u16 loop : 1; + u16 loop : 1; u16 reserved : 15; } etc; u16 reserved0; @@ -121,10 +121,10 @@ typedef struct SPLResClrAnm { GXRgb clr_e; SPLResInPeakOut in_peak_out; struct { - u16 use_rndm : 1; - u16 loop : 1; + u16 use_rndm : 1; + u16 loop : 1; u16 interpolation : 1; - u16 reserved0 : 13; + u16 reserved0 : 13; } etc; u16 reserved0; } SPLResClrAnm; @@ -133,15 +133,15 @@ typedef struct SPLResAlpAnm { union { u16 all; struct { - u16 s : 5; - u16 n : 5; - u16 e : 5; + u16 s : 5; + u16 n : 5; + u16 e : 5; u16 reserved0 : 1; }; } alp; struct { - u16 flick : 8; - u16 loop : 1; + u16 flick : 8; + u16 loop : 1; u16 reserved0 : 7; } etc; SPLResInOut in_out; @@ -151,10 +151,10 @@ typedef struct SPLResAlpAnm { typedef struct SPLResTexAnm { u8 tex_no[SPL_MAX_TEX_PTN_NUM]; struct { - u32 use_num : 8; - u32 diff : 8; - u32 use_rndm : 1; - u32 loop : 1; + u32 use_num : 8; + u32 diff : 8; + u32 use_rndm : 1; + u32 loop : 1; u32 reserved0 : 14; } etc; } SPLResTexAnm; @@ -162,16 +162,16 @@ typedef struct SPLResTexAnm { typedef union { u16 all; struct { - u16 affect_fld : 1; - u16 use_scl_anm : 1; - u16 use_alp_anm : 1; - u16 rtt_type : 2; - u16 follow_emtr : 1; - u16 use_chld_clr : 1; - u16 draw_type : 2; - u16 pol_rot_axis : 2; + u16 affect_fld : 1; + u16 use_scl_anm : 1; + u16 use_alp_anm : 1; + u16 rtt_type : 2; + u16 follow_emtr : 1; + u16 use_chld_clr : 1; + u16 draw_type : 2; + u16 pol_rot_axis : 2; u16 pol_baseplane : 1; - u16 reserved0 : 4; + u16 reserved0 : 4; }; } SPLResChldFlag; @@ -186,16 +186,16 @@ typedef struct SPLResChld { } ratio; GXRgb clr; struct { - u32 gen_num : 8; - u32 gen_start : 8; - u32 gen_intvl : 8; - u32 tex_no : 8; + u32 gen_num : 8; + u32 gen_start : 8; + u32 gen_intvl : 8; + u32 tex_no : 8; u32 tex_repeat_num_s : 2; u32 tex_repeat_num_t : 2; - u32 reverse_tex_s : 1; - u32 reverse_tex_t : 1; - u32 dpol_center : 1; - u32 reserved0 : 25; + u32 reverse_tex_s : 1; + u32 reverse_tex_t : 1; + u32 dpol_center : 1; + u32 reserved0 : 25; } etc; } SPLResChld; diff --git a/include/library/spl_texture.h b/include/library/spl_texture.h index db7302bea6..9621433af1 100644 --- a/include/library/spl_texture.h +++ b/include/library/spl_texture.h @@ -4,15 +4,15 @@ typedef union { u32 all; struct { - u32 fmt : 4; - u32 s : 4; - u32 t : 4; - u32 rep : 2; - u32 flp : 2; - u32 plt0 : 1; - u32 overlaped : 1; + u32 fmt : 4; + u32 s : 4; + u32 t : 4; + u32 rep : 2; + u32 flp : 2; + u32 plt0 : 1; + u32 overlaped : 1; u32 sharedTexNo : 8; - u32 reserved0 : 6; + u32 reserved0 : 6; }; } SPLTexParam; diff --git a/include/list_menu.h b/include/list_menu.h index 197480135f..23786f1390 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -43,26 +43,26 @@ typedef struct ListMenuTemplate { /*0x14*/ u8 header_X; /*0x15*/ u8 item_X; /*0x16*/ u8 cursor_X; - /*0x17*/ u8 upText_Y : 4; - u8 cursorPal : 4; - /*0x18*/ u8 fillValue : 4; - u8 cursorShadowPal : 4; + /*0x17*/ u8 upText_Y : 4; + u8 cursorPal : 4; + /*0x18*/ u8 fillValue : 4; + u8 cursorShadowPal : 4; /*0x1A*/ u16 lettersSpacing : 3; - u16 itemVerticalPadding : 4; - u16 scrollMultiple : 2; - u16 fontId : 6; - u16 cursorKind : 1; + u16 itemVerticalPadding : 4; + u16 scrollMultiple : 2; + u16 fontId : 6; + u16 cursorKind : 1; /*0x1C*/ u32 unk_1C; } ListMenuTemplate; typedef struct ListMenu { /*0x00*/ ListMenuTemplate template; // ListMenuOverride from gen 3 - /*0x20*/ u8 cursorPal : 4; - u8 fillValue : 4; + /*0x20*/ u8 cursorPal : 4; + u8 fillValue : 4; /*0x21*/ u8 cursorShadowPal : 4; - u8 unk_21_4 : 4; - /*0x22*/ u8 lettersSpacing : 6; + u8 unk_21_4 : 4; + /*0x22*/ u8 lettersSpacing : 6; /*0x23*/ u8 unk_23; /*0x24*/ u8 fontId : 7; u8 overrideEnabled : 1; diff --git a/include/list_menu_2d.h b/include/list_menu_2d.h index 23415fe8f4..5a3865d589 100644 --- a/include/list_menu_2d.h +++ b/include/list_menu_2d.h @@ -10,7 +10,7 @@ struct ListMenu2DTemplate { u8 fontId; u8 itemsWide; u8 itemsHigh; - u8 yTop : 4; + u8 yTop : 4; u8 cursorType : 2; u8 enableWrap : 2; }; diff --git a/include/map_header.h b/include/map_header.h index 6b8b36ed30..ad3c1e808e 100644 --- a/include/map_header.h +++ b/include/map_header.h @@ -13,8 +13,8 @@ typedef struct MapHeader { u8 wild_encounter_bank; // fielddata/encountdata/[gs]_enc_data.naix u8 area_data_bank; // fielddata/areadata/area_data.naix u16 move_model_bank : 4; // fielddata/mm_list/move_model_list.naix - u16 world_map_x : 6; - u16 world_map_y : 6; + u16 world_map_x : 6; + u16 world_map_y : 6; u16 matrix_id; // fielddata/mapmatrix/map_matrix.naix u16 scripts_bank; // fielddata/script/scr_seq_release.naix u16 script_header_bank; // fielddata/script/scr_seq_release.naix @@ -22,22 +22,22 @@ typedef struct MapHeader { u16 day_music_id; // data/sound/gs_sound_data.sdat u16 night_music_id; // data/sound/gs_sound_data.sdat u16 events_bank; // fielddata/eventdata/zone_event_release.naix - u16 mapsec : 8; - u16 area_icon : 4; - u16 unk_12_C : 4; - u32 is_kanto : 1; - u32 weather : 7; - u32 location_type : 4; - u32 camera_type : 6; - u32 follow_mode : 2; - u32 battle_bg : 5; - u32 bike_allowed : 1; - u32 unk_14_1A : 1; // unused running flag? + u16 mapsec : 8; + u16 area_icon : 4; + u16 unk_12_C : 4; + u32 is_kanto : 1; + u32 weather : 7; + u32 location_type : 4; + u32 camera_type : 6; + u32 follow_mode : 2; + u32 battle_bg : 5; + u32 bike_allowed : 1; + u32 unk_14_1A : 1; // unused running flag? u32 escape_rope_allowed : 1; - u32 fly_allowed : 1; - u32 unk_14_1D : 1; - u32 unk_14_1E : 1; - u32 unk_14_1F : 1; + u32 fly_allowed : 1; + u32 unk_14_1D : 1; + u32 unk_14_1E : 1; + u32 unk_14_1F : 1; } MAP_HEADER; u8 MapHeader_GetAreaDataBank(u32 map_no); diff --git a/include/map_object.h b/include/map_object.h index cd2283c424..0b16f980fc 100644 --- a/include/map_object.h +++ b/include/map_object.h @@ -115,39 +115,39 @@ typedef struct UnkLMOCallbackStruct2 { } UnkLMOCallbackStruct2; typedef enum MapObjectFlagBits { - MAPOBJECTFLAG_NONE = 0, - MAPOBJECTFLAG_ACTIVE = (1 << 0), + MAPOBJECTFLAG_NONE = 0, + MAPOBJECTFLAG_ACTIVE = (1 << 0), MAPOBJECTFLAG_SINGLE_MOVEMENT = (1 << 1), - MAPOBJECTFLAG_UNK2 = (1 << 2), - MAPOBJECTFLAG_UNK3 = (1 << 3), - MAPOBJECTFLAG_UNK4 = (1 << 4), - MAPOBJECTFLAG_UNK5 = (1 << 5), + MAPOBJECTFLAG_UNK2 = (1 << 2), + MAPOBJECTFLAG_UNK3 = (1 << 3), + MAPOBJECTFLAG_UNK4 = (1 << 4), + MAPOBJECTFLAG_UNK5 = (1 << 5), MAPOBJECTFLAG_MOVEMENT_PAUSED = (1 << 6), - MAPOBJECTFLAG_UNK7 = (1 << 7), - MAPOBJECTFLAG_UNK8 = (1 << 8), - MAPOBJECTFLAG_VISIBLE = (1 << 9), - MAPOBJECTFLAG_KEEP = (1 << 10), - MAPOBJECTFLAG_UNK11 = (1 << 11), - MAPOBJECTFLAG_UNK12 = (1 << 12), - MAPOBJECTFLAG_UNK13 = (1 << 13), - MAPOBJECTFLAG_UNK14 = (1 << 14), - MAPOBJECTFLAG_UNK15 = (1 << 15), - MAPOBJECTFLAG_UNK16 = (1 << 16), - MAPOBJECTFLAG_UNK17 = (1 << 17), - MAPOBJECTFLAG_UNK18 = (1 << 18), - MAPOBJECTFLAG_UNK19 = (1 << 19), - MAPOBJECTFLAG_UNK20 = (1 << 20), - MAPOBJECTFLAG_UNK21 = (1 << 21), - MAPOBJECTFLAG_UNK22 = (1 << 22), - MAPOBJECTFLAG_IGNORE_HEIGHTS = (1 << 23), - MAPOBJECTFLAG_UNK24 = (1 << 24), - MAPOBJECTFLAG_UNK25 = (1 << 25), - MAPOBJECTFLAG_UNK26 = (1 << 26), - MAPOBJECTFLAG_UNK27 = (1 << 27), - MAPOBJECTFLAG_UNK28 = (1 << 28), - MAPOBJECTFLAG_UNK29 = (1 << 29), - MAPOBJECTFLAG_UNK30 = (1 << 30), - MAPOBJECTFLAG_UNK31 = (1 << 31), + MAPOBJECTFLAG_UNK7 = (1 << 7), + MAPOBJECTFLAG_UNK8 = (1 << 8), + MAPOBJECTFLAG_VISIBLE = (1 << 9), + MAPOBJECTFLAG_KEEP = (1 << 10), + MAPOBJECTFLAG_UNK11 = (1 << 11), + MAPOBJECTFLAG_UNK12 = (1 << 12), + MAPOBJECTFLAG_UNK13 = (1 << 13), + MAPOBJECTFLAG_UNK14 = (1 << 14), + MAPOBJECTFLAG_UNK15 = (1 << 15), + MAPOBJECTFLAG_UNK16 = (1 << 16), + MAPOBJECTFLAG_UNK17 = (1 << 17), + MAPOBJECTFLAG_UNK18 = (1 << 18), + MAPOBJECTFLAG_UNK19 = (1 << 19), + MAPOBJECTFLAG_UNK20 = (1 << 20), + MAPOBJECTFLAG_UNK21 = (1 << 21), + MAPOBJECTFLAG_UNK22 = (1 << 22), + MAPOBJECTFLAG_IGNORE_HEIGHTS = (1 << 23), + MAPOBJECTFLAG_UNK24 = (1 << 24), + MAPOBJECTFLAG_UNK25 = (1 << 25), + MAPOBJECTFLAG_UNK26 = (1 << 26), + MAPOBJECTFLAG_UNK27 = (1 << 27), + MAPOBJECTFLAG_UNK28 = (1 << 28), + MAPOBJECTFLAG_UNK29 = (1 << 29), + MAPOBJECTFLAG_UNK30 = (1 << 30), + MAPOBJECTFLAG_UNK31 = (1 << 31), } MapObjectFlagBits; // this may be the same as above, I don't know @@ -172,8 +172,8 @@ typedef struct MapObjectInitArgs { typedef struct ObjectEventGraphicsInfo { u16 spriteId; u16 mapModelId; - u16 unk4_0 : 5; // Unknown actual size - u16 unk4_5 : 5; + u16 unk4_0 : 5; // Unknown actual size + u16 unk4_5 : 5; u16 unk4_10 : 6; // Unknown actual size } ObjectEventGraphicsInfo; diff --git a/include/mystery_gift.h b/include/mystery_gift.h index 70eaf5ab38..71bf3b4e2e 100644 --- a/include/mystery_gift.h +++ b/include/mystery_gift.h @@ -58,9 +58,9 @@ typedef union { typedef struct UnkWonderCardSubstruct_104 { u16 name[36]; - u32 version; // 88 - u16 id; // 8C - u8 unique : 1; // 8E + u32 version; // 88 + u16 id; // 8C + u8 unique : 1; // 8E u8 unk8E_1 : 1; u8 unk8E_2 : 1; u8 unk8E_3 : 1; @@ -71,7 +71,7 @@ typedef struct UnkWonderCardSubstruct_104 { typedef struct { u16 tag; - u16 flag : 2; + u16 flag : 2; u16 dummy : 14; MysteryGiftData data; } MysteryGift; diff --git a/include/options.h b/include/options.h index cb8ce4fb36..b5ac9b9867 100644 --- a/include/options.h +++ b/include/options.h @@ -5,13 +5,13 @@ #include "save.h" typedef struct Options { - u16 textSpeed : 4; + u16 textSpeed : 4; u16 soundMethod : 2; u16 battleStyle : 1; u16 battleScene : 1; - u16 buttonMode : 2; - u16 frame : 5; - u16 dummy : 1; + u16 buttonMode : 2; + u16 frame : 5; + u16 dummy : 1; } Options; Options *Options_New(HeapID heapId); diff --git a/include/overlay_trainer_card.h b/include/overlay_trainer_card.h index 78d38a5af0..8ad2463027 100644 --- a/include/overlay_trainer_card.h +++ b/include/overlay_trainer_card.h @@ -21,7 +21,7 @@ typedef struct TrainerCardAppArgs { typedef struct { u8 unk0[4]; - u8 unk4a : 4; + u8 unk4a : 4; u8 signatureExists : 1; u8 unk5[0x63]; u8 signature[0x600]; diff --git a/include/palette.h b/include/palette.h index ecc45060e9..ddac18ab78 100644 --- a/include/palette.h +++ b/include/palette.h @@ -46,9 +46,9 @@ typedef enum PaletteSelector { } PaletteSelector; typedef struct RgbColor { - u16 r : 5; - u16 g : 5; - u16 b : 5; + u16 r : 5; + u16 g : 5; + u16 b : 5; u16 dummy : 1; } RgbColor; @@ -56,14 +56,14 @@ typedef struct RgbColor { typedef struct SelectedPaletteData { u16 opaqueBit; - u16 wait : 6; - u16 cur : 5; - u16 end : 5; - u16 nextRGB : 15; - u16 sign : 1; // 0 - increase, 1 - decrease - u16 step : 4; + u16 wait : 6; + u16 cur : 5; + u16 end : 5; + u16 nextRGB : 15; + u16 sign : 1; // 0 - increase, 1 - decrease + u16 step : 4; u16 waitStep : 6; - u16 unk6_10 : 6; + u16 unk6_10 : 6; } SelectedPaletteData; typedef struct PaletteBuffer { @@ -78,7 +78,7 @@ typedef struct PaletteData { u16 selectedFlag : 2; u16 selectedBuffer : PLTTBUF_MAX; u16 transparentBit : PLTTBUF_MAX; - u16 callbackFlag : 1; + u16 callbackFlag : 1; u16 autoTransparent : 1; u8 forceExit; u8 unused[3]; diff --git a/include/party_menu.h b/include/party_menu.h index caef2f11e5..9c3aadb3a4 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -139,7 +139,7 @@ typedef enum PartyMonContextMenuItem { PARTY_MON_CONTEXT_MENU_FIELD_MOVES_BEGIN = PARTY_MON_CONTEXT_MENU_CUT, PARTY_MON_CONTEXT_MENU_FIELD_MOVES_COUNT = PARTY_MON_CONTEXT_MENU_MAX - PARTY_MON_CONTEXT_MENU_FIELD_MOVES_BEGIN, - PARTY_MON_CONTEXT_MENU_NUM_STRINGS = PARTY_MON_CONTEXT_MENU_CUT + MAX_MON_MOVES, + PARTY_MON_CONTEXT_MENU_NUM_STRINGS = PARTY_MON_CONTEXT_MENU_CUT + MAX_MON_MOVES, } PartyMonContextMenuItem; typedef enum PartyMenuActionReturn { @@ -272,8 +272,8 @@ typedef struct UnkTemplatePartyMenuContextMenu_0207E590 { u8 unk_08; u8 unk_09; u8 numItems; - u8 unk_0B_0 : 4; - u8 unk_0B_4 : 2; + u8 unk_0B_0 : 4; + u8 unk_0B_4 : 2; u8 scrollEnabled : 2; } PartyMenuContextMenu; @@ -345,7 +345,7 @@ typedef struct PartyMenuContextButtonAnimData { PartyMenuContextMenu *template; u8 numItems; u8 selection; - u8 autoAnimTimer : 4; + u8 autoAnimTimer : 4; u8 buttonAnimState : 4; u8 state; int followUpState; @@ -353,16 +353,16 @@ typedef struct PartyMenuContextButtonAnimData { } PartyMenuContextButtonAnimData; typedef struct PartyMenuMonsDrawState { - String *nickname; // 828 - u16 species; // 82C - u16 hp; // 82E - u16 maxHp; // 830 - u16 level; // 832 - u16 heldItem; // 834 - u16 status : 12; // 836 + String *nickname; // 828 + u16 species; // 82C + u16 hp; // 82E + u16 maxHp; // 830 + u16 level; // 832 + u16 heldItem; // 834 + u16 status : 12; // 836 u16 dontPrintGenderSymbol : 1; - u16 gender : 2; - u16 isContestCompatible : 1; + u16 gender : 2; + u16 isContestCompatible : 1; u8 isEgg; // 838 u8 form; // 839 u16 capsule; // 83A @@ -424,8 +424,8 @@ struct PartyMenu { u8 unk_C61; u8 afterTextPrinterState; u8 softboiledDonorSlot : 6; - u8 secondCursorActive : 1; - u8 cancelDisabled : 1; + u8 secondCursorActive : 1; + u8 cancelDisabled : 1; u8 textPrinterId; u8 partyMonIndex; // 0xc65 u8 unk_C66; diff --git a/include/photo_album.h b/include/photo_album.h index 9e14217c79..f1e83065f7 100644 --- a/include/photo_album.h +++ b/include/photo_album.h @@ -9,7 +9,7 @@ typedef struct PhotoMon { u16 species; u8 form; - u8 shiny : 1; + u8 shiny : 1; u8 gender : 1; } PhotoMon; diff --git a/include/player_data.h b/include/player_data.h index 64d9a8ddbd..6a8bf9dec5 100644 --- a/include/player_data.h +++ b/include/player_data.h @@ -19,7 +19,7 @@ typedef struct PlayerProfile { u8 avatar; u8 version; u8 gameClear : 1; - u8 natDex : 1; + u8 natDex : 1; u8 dummy; u8 kantoBadges; } PlayerProfile; diff --git a/include/pokemon_types_def.h b/include/pokemon_types_def.h index b94ae9cacf..74f9ec2914 100644 --- a/include/pokemon_types_def.h +++ b/include/pokemon_types_def.h @@ -16,13 +16,13 @@ typedef struct BaseStats { /* 0x06 */ u8 types[2]; /* 0x08 */ u8 catchRate; /* 0x09 */ u8 expYield; - /* 0x0A */ u16 hp_yield : 2; - u16 atk_yield : 2; - u16 def_yield : 2; - u16 speed_yield : 2; + /* 0x0A */ u16 hp_yield : 2; + u16 atk_yield : 2; + u16 def_yield : 2; + u16 speed_yield : 2; /* 0x0B */ u16 spatk_yield : 2; - u16 spdef_yield : 2; - u16 padding_B_4 : 4; + u16 spdef_yield : 2; + u16 padding_B_4 : 4; /* 0x0C */ u16 item1; /* 0x0E */ u16 item2; /* 0x10 */ u8 genderRatio; @@ -33,7 +33,7 @@ typedef struct BaseStats { /* 0x16 */ u8 abilities[2]; /* 0x18 */ u8 greatMarshRate; /* 0x19 */ u8 color : 7; - u8 flip : 1; + u8 flip : 1; u8 padding_1A[2]; /* 0x1C */ u32 tmhm_1; /* 0x20 */ u32 tmhm_2; @@ -81,7 +81,7 @@ typedef struct { /* 0x14 */ u32 ribbonFlags; // cool, ... /* 0x18 */ u8 fatefulEncounter : 1, gender : 2, alternateForm : 5; /* 0x19 */ u8 HGSS_shinyLeaves : 6; - /* 0x19 */ u8 unk_19_6 : 2; + /* 0x19 */ u8 unk_19_6 : 2; /* 0x1A */ u16 Unused; /* 0x1C */ u16 Platinum_EggLocation; /* 0x1E */ u16 Platinum_MetLocation; @@ -104,7 +104,7 @@ typedef struct { /* 0x1A */ u8 pokerus; /* 0x1B */ u8 pokeball; /* 0x1C */ u8 metLevel : 7; - u8 metGender : 1; + u8 metGender : 1; /* 0x1D */ u8 encounterType; /* 0x1E */ u8 HGSS_Pokeball; /* 0x1F */ s8 mood; @@ -120,10 +120,10 @@ typedef union { typedef struct BoxPokemon { /* 0x000 */ u32 pid; /* 0x004 */ u16 party_lock : 1; - u16 box_lock : 1; - u16 checksum_fail : 1; - u16 Unused : 13; // Might be used for validity checks - /* 0x006 */ u16 checksum; // Stored checksum of pokemon + u16 box_lock : 1; + u16 checksum_fail : 1; + u16 Unused : 13; // Might be used for validity checks + /* 0x006 */ u16 checksum; // Stored checksum of pokemon /* 0x008 */ PokemonDataBlock substructs[4]; } BoxPokemon; @@ -131,7 +131,7 @@ union MailPatternData { u16 raw; struct { u16 icon : 12; - u16 pal : 4; + u16 pal : 4; }; }; @@ -179,8 +179,8 @@ typedef struct { struct UnkPokemonStruct_02072A98 { /* 0x00 */ u32 pid; /* 0x04 */ u16 party_lock : 1; - u16 box_lock : 1; - u16 checksum_fail : 1; + u16 box_lock : 1; + u16 checksum_fail : 1; /* 0x06 */ u16 species; /* 0x08 */ u16 heldItem; /* 0x0C */ u32 otID; @@ -196,17 +196,17 @@ struct UnkPokemonStruct_02072A98 { /* 0x1C */ u16 moves[MAX_MON_MOVES]; /* 0x24 */ u8 movePP[MAX_MON_MOVES]; /* 0x28 */ u8 movePpUps[MAX_MON_MOVES]; - /* 0x2C */ u32 hpIV : 5; - u32 atkIV : 5; - u32 defIV : 5; - u32 spdIV : 5; - u32 spatkIV : 5; - u32 spdefIV : 5; - u32 isEgg : 1; - u32 isNicknamed : 1; + /* 0x2C */ u32 hpIV : 5; + u32 atkIV : 5; + u32 defIV : 5; + u32 spdIV : 5; + u32 spatkIV : 5; + u32 spdefIV : 5; + u32 isEgg : 1; + u32 isNicknamed : 1; /* 0x30 */ u8 fatefulEncounter : 1; - u8 gender : 2; - u8 alternateForm : 5; + u8 gender : 2; + u8 alternateForm : 5; /* 0x32 */ u16 nickname[POKEMON_NAME_LENGTH + 1]; /* 0x48 */ u16 otTrainerName[PLAYER_NAME_LENGTH + 1]; /* 0x58 */ u8 pokeball; @@ -294,9 +294,9 @@ struct PokeathlonBasePerformance { }; struct TodayPerformanceStat { - u16 base : 3; - u16 hi : 3; - u16 lo : 3; + u16 base : 3; + u16 hi : 3; + u16 lo : 3; u16 dummy : 7; s16 dailyMod; }; diff --git a/include/pokepic.h b/include/pokepic.h index a48dde19cd..3787d6b250 100644 --- a/include/pokepic.h +++ b/include/pokepic.h @@ -97,33 +97,33 @@ typedef struct PokepicDrawParam { u8 fadeDelayCounter; u8 fadeDelayLength; u32 fadeTargetColor; - u32 diffuseR : 5; - u32 diffuseG : 5; - u32 diffuseB : 5; - u32 ambientR : 5; - u32 ambientG : 5; - u32 ambientB : 5; + u32 diffuseR : 5; + u32 diffuseG : 5; + u32 diffuseB : 5; + u32 ambientR : 5; + u32 ambientG : 5; + u32 ambientB : 5; u32 filler_2C_30 : 2; - u32 hasVanished : 1; - u32 visible : 1; - u32 alpha : 5; - u32 unk_30_07 : 1; - u32 unk_30_08 : 1; - u32 hflip : 1; - u32 vflip : 1; - u32 dontDraw : 1; - u32 fadeActive : 1; - u32 mosaic : 4; + u32 hasVanished : 1; + u32 visible : 1; + u32 alpha : 5; + u32 unk_30_07 : 1; + u32 unk_30_08 : 1; + u32 hflip : 1; + u32 vflip : 1; + u32 dontDraw : 1; + u32 fadeActive : 1; + u32 mosaic : 4; u32 filler_30_11 : 15; } PokepicDrawParam; typedef struct PokepicShadow { - u16 palSlot : 2; + u16 palSlot : 2; u16 shouldAdjustX : 1; u16 shouldAdjustY : 1; - u16 isAffine : 1; - u16 size : 2; - u16 filler_0_7 : 9; + u16 isAffine : 1; + u16 size : 2; + u16 filler_0_7 : 9; s8 height; u8 filler_3[1]; s16 x; @@ -137,11 +137,11 @@ struct Pokepic; typedef void (*PokepicCallback)(struct Pokepic *, PokepicDrawParam *); typedef struct Pokepic { - u32 active : 1; - u32 polygonId : 6; + u32 active : 1; + u32 polygonId : 6; u32 needReloadChar : 1; u32 needReloadPltt : 1; - u32 filler_00_09 : 23; + u32 filler_00_09 : 23; PokepicTemplate template; PokepicTemplate templateBak; PokepicDrawParam drawParam; diff --git a/include/render_text.h b/include/render_text.h index 9c7d63ce72..55c15a2006 100644 --- a/include/render_text.h +++ b/include/render_text.h @@ -5,26 +5,26 @@ #include "touchscreen.h" typedef struct TextFlags { - u8 canABSpeedUpPrint : 1; - u8 useAlternateDownArrow : 1; - u8 autoScroll : 1; - u8 forceMidTextSpeed : 1; - u8 canTouchSpeedUpPrint : 1; - u8 autoScrollCanSpeedUp : 1; - u8 hasSpedUpInput : 1; - u8 hasContinuedInput : 1; + u8 canABSpeedUpPrint : 1; + u8 useAlternateDownArrow : 1; + u8 autoScroll : 1; + u8 forceMidTextSpeed : 1; + u8 canTouchSpeedUpPrint : 1; + u8 autoScrollCanSpeedUp : 1; + u8 hasSpedUpInput : 1; + u8 hasContinuedInput : 1; u8 touchIsSpeedingUpPrint : 1; - u8 touchHitboxActive : 1; + u8 touchHitboxActive : 1; } TextFlags; typedef struct TextPrinterSubStruct { - u8 fontId : 4; // 0x14 + u8 fontId : 4; // 0x14 u8 hasPrintBeenSpedUp : 1; - u8 unk : 3; - u8 downArrowDelay : 5; - u8 downArrowYPosIdx : 2; - u8 hasFontIdBeenSet : 1; - u8 autoScrollDelay : 8; + u8 unk : 3; + u8 downArrowDelay : 5; + u8 downArrowYPosIdx : 2; + u8 hasFontIdBeenSet : 1; + u8 autoScrollDelay : 8; } TextPrinterSubStruct; // Argument to TextFlags_SetAutoScrollParam diff --git a/include/roamer.h b/include/roamer.h index 9d32063ddc..8786d581e1 100644 --- a/include/roamer.h +++ b/include/roamer.h @@ -7,13 +7,13 @@ enum RoamerDataParam { ROAMER_DATA_MET_LOCATION = 1, - ROAMER_DATA_IVS = 2, - ROAMER_DATA_PERSONALITY = 3, - ROAMER_DATA_SPECIES = 4, - ROAMER_DATA_HP = 5, - ROAMER_DATA_LEVEL = 6, - ROAMER_DATA_STATUS = 7, - ROAMER_DATA_ACTIVE = 8, + ROAMER_DATA_IVS = 2, + ROAMER_DATA_PERSONALITY = 3, + ROAMER_DATA_SPECIES = 4, + ROAMER_DATA_HP = 5, + ROAMER_DATA_LEVEL = 6, + ROAMER_DATA_STATUS = 7, + ROAMER_DATA_ACTIVE = 8, }; typedef struct Roamer { // todo: this appears to be used for swarms as well diff --git a/include/save_follow_mon.h b/include/save_follow_mon.h index b558376bc2..e550816c03 100644 --- a/include/save_follow_mon.h +++ b/include/save_follow_mon.h @@ -5,7 +5,7 @@ typedef struct SaveFollowMon { u32 mapNo; - s32 unused : 2; + s32 unused : 2; s32 inhibitFlag : 1; } SaveFollowMon; diff --git a/include/save_link_ruleset.h b/include/save_link_ruleset.h index dab95e07a0..373d124b71 100644 --- a/include/save_link_ruleset.h +++ b/include/save_link_ruleset.h @@ -33,11 +33,11 @@ typedef struct LinkBattleRuleset { u8 maxLevel; // max level for a single mon s8 heightLimit; // if positive: minimum mon height; if negative, absolute value is maximum mon height s8 weightLimit; // if positive: minimum mon weight; if negative, absolute value is maximum mon weight - u8 evolvedPokemon : 1; // if true, can only use unevolved pokemon - u8 ubersClause : 1; // if true, cannot use legendaries + u8 evolvedPokemon : 1; // if true, can only use unevolved pokemon + u8 ubersClause : 1; // if true, cannot use legendaries u8 speciesDupeClause : 1; // if true, can't have two Pokemon of the same species - u8 itemDupeClause : 1; // if true, can't have two Pokemon holding the same item - u8 dragonRageClause : 1; // if true, fixed-damage moves like SonicBoom and Dragon Rage will always fail + u8 itemDupeClause : 1; // if true, can't have two Pokemon holding the same item + u8 dragonRageClause : 1; // if true, fixed-damage moves like SonicBoom and Dragon Rage will always fail } LinkBattleRuleset; typedef struct Save_LinkBattleRuleset { diff --git a/include/save_misc_data.h b/include/save_misc_data.h index a4f3ff3431..c1a6429373 100644 --- a/include/save_misc_data.h +++ b/include/save_misc_data.h @@ -46,10 +46,10 @@ typedef struct SAVE_MISC_DATA { u8 unk_0280[8]; // 3 chunks of size (4, 2, 2) u8 filler_0288[0x10]; u16 favoriteMonSpecies; - u8 favoriteMonForm : 7; + u8 favoriteMonForm : 7; u8 favoriteMonIsEgg : 1; u8 extraChunksExist : 1; - u8 unk_029B_1 : 4; + u8 unk_029B_1 : 4; u8 filer_029C[4]; MailMessage battleGreetingEC; u32 unk_02A8[2][5]; diff --git a/include/save_pokegear.h b/include/save_pokegear.h index eeb0a56b6f..2adc363876 100644 --- a/include/save_pokegear.h +++ b/include/save_pokegear.h @@ -61,12 +61,12 @@ typedef struct SavePokegear { u8 unk_1; u8 unk_2; u8 unk_3; - u32 unk_4_0 : 9; - u32 unk_4_9 : 9; - u32 unk_4_18 : 7; + u32 unk_4_0 : 9; + u32 unk_4_9 : 9; + u32 unk_4_18 : 7; u32 registeredCards : 2; - u32 unk_4_27 : 2; - u32 unk_4_29 : 3; + u32 unk_4_27 : 2; + u32 unk_4_29 : 3; UnkPokegearSub8List unk_8; MomsSavings momsSavings; // 4B8 PhoneContact phoneContacts[NUM_PHONE_CONTACTS]; // 60C diff --git a/include/save_trainer_house.h b/include/save_trainer_house.h index ea79798cad..246beead62 100644 --- a/include/save_trainer_house.h +++ b/include/save_trainer_house.h @@ -24,20 +24,20 @@ typedef struct TrainerHouseTrainer { typedef struct TrainerHouseMon { u16 species : 11; - u16 form : 5; + u16 form : 5; u16 item; u16 moves[MAX_MON_MOVES]; u32 otid; u32 pid; union { struct { - u32 hpIv : 5; - u32 atkIv : 5; - u32 defIv : 5; - u32 spdIv : 5; + u32 hpIv : 5; + u32 atkIv : 5; + u32 defIv : 5; + u32 spdIv : 5; u32 spAtkIv : 5; u32 spDefIv : 5; - u32 dummy : 2; + u32 dummy : 2; }; u32 ivsWord; }; diff --git a/include/scrcmd_9.h b/include/scrcmd_9.h index 4dc81d60e1..0fa8dd939c 100644 --- a/include/scrcmd_9.h +++ b/include/scrcmd_9.h @@ -6,20 +6,20 @@ typedef struct UnkStruct_0204B470 { u16 species : 11; - u16 form : 5; + u16 form : 5; u16 item; u16 moves[4]; u32 otId; u32 pid; union { struct { - u32 hpIv : 5; - u32 atkIv : 5; - u32 defIv : 5; - u32 spdIv : 5; + u32 hpIv : 5; + u32 atkIv : 5; + u32 defIv : 5; + u32 spdIv : 5; u32 spAtkIv : 5; u32 spDefIv : 5; - u32 dummy : 2; + u32 dummy : 2; }; u32 ivsWord; }; diff --git a/include/touchscreen.h b/include/touchscreen.h index c0de514e25..207c28a56e 100644 --- a/include/touchscreen.h +++ b/include/touchscreen.h @@ -36,17 +36,17 @@ int TouchscreenHitbox_FindHitboxAtPoint(const TouchscreenHitbox *hitbox, u32 x, BOOL TouchscreenHitbox_PointIsIn(const TouchscreenHitbox *hitbox, u32 x, u32 y); static inline void TouchscreenHitbox_SetRect(TouchscreenHitbox *hitbox, int top, int left, int height, int width) { - hitbox->rect.top = top; - hitbox->rect.left = left; + hitbox->rect.top = top; + hitbox->rect.left = left; hitbox->rect.bottom = hitbox->rect.top + height; - hitbox->rect.right = hitbox->rect.left + width; + hitbox->rect.right = hitbox->rect.left + width; } static inline void TouchscreenHitbox_SetCircle(TouchscreenHitbox *hitbox, int x, int y, int r) { hitbox->circle.sentinel = TOUCHSCREEN_CIRCLE_SENTINEL; - hitbox->circle.x = x; - hitbox->circle.y = y; - hitbox->circle.r = r; + hitbox->circle.x = x; + hitbox->circle.y = y; + hitbox->circle.r = r; } #endif // POKEHEARTGOLD_TOUCHSCREEN_H diff --git a/include/touchscreen_list_menu.h b/include/touchscreen_list_menu.h index d90e9fa3cd..b5bfa87baa 100644 --- a/include/touchscreen_list_menu.h +++ b/include/touchscreen_list_menu.h @@ -9,7 +9,7 @@ typedef struct TouchscreenListMenuTemplate { u8 wrapAround : 1; - u8 centered : 7; + u8 centered : 7; u8 xOffset; u8 bgId; u8 plttOffset; @@ -49,7 +49,7 @@ struct TouchscreenListMenu { u8 cursorPos; u8 animActive; u8 width; - u8 silent : 1; + u8 silent : 1; u8 isTouch : 7; u8 x; u8 y; diff --git a/include/trainer_house.h b/include/trainer_house.h index e680618a5d..7f6452712f 100644 --- a/include/trainer_house.h +++ b/include/trainer_house.h @@ -5,7 +5,7 @@ typedef struct THOUSE_MON { u16 species : 11; // 0 - u16 form : 5; + u16 form : 5; u16 item; // 2 u16 moves[4]; // 4 u32 otId; // C diff --git a/include/unk_0200A090.h b/include/unk_0200A090.h index 15eae9d944..c25ed8e096 100644 --- a/include/unk_0200A090.h +++ b/include/unk_0200A090.h @@ -38,7 +38,7 @@ typedef enum GF_GraphicsResourceType { GF_GFX_RES_TYPE_ANIM = 3, GF_GFX_RES_TYPE_MCEL = 4, GF_GFX_RES_TYPE_MANM = 5, - GF_GFX_RES_TYPE_MAX = 6, + GF_GFX_RES_TYPE_MAX = 6, } GfGfxResType; typedef struct GF_2DGfxResObj { diff --git a/include/voltorb_flip/voltorb_flip_input.h b/include/voltorb_flip/voltorb_flip_input.h index 0321e033b1..fe14038fb7 100644 --- a/include/voltorb_flip/voltorb_flip_input.h +++ b/include/voltorb_flip/voltorb_flip_input.h @@ -9,12 +9,12 @@ typedef struct Ov122_021E8CFC { void *unk8; u8 unkC; u8 unkD; - u8 unkEx : 4; - u8 unkEy : 4; - u8 memoOpen : 1; + u8 unkEx : 4; + u8 unkEy : 4; + u8 memoOpen : 1; u8 memoFocused : 1; - u8 unkFz : 1; - u8 unkFp : 5; + u8 unkFz : 1; + u8 unkFp : 5; } Ov122_021E8CFC; typedef void (*Ov122UnkCB)(struct Ov122_021E8CFC *a0, int a1, int a2); diff --git a/include/voltorb_flip/voltorb_flip_workflow.h b/include/voltorb_flip/voltorb_flip_workflow.h index 569165a694..46e38f088b 100644 --- a/include/voltorb_flip/voltorb_flip_workflow.h +++ b/include/voltorb_flip/voltorb_flip_workflow.h @@ -23,7 +23,7 @@ typedef enum Workflow { WORKFLOW_UNK_16, WORKFLOW_TERMINATE = 65534, - WORKFLOW_NONE = 65535, + WORKFLOW_NONE = 65535, } Workflow; typedef BOOL (*VoltorbFlipTask)(struct WorkflowEngine *a0, VoltorbFlipAppWork *a1); diff --git a/include/yes_no_prompt.h b/include/yes_no_prompt.h index 23e6e73f34..7838bb764a 100644 --- a/include/yes_no_prompt.h +++ b/include/yes_no_prompt.h @@ -22,7 +22,7 @@ typedef struct YesNoPromptTemplate { u32 plttSlot; u8 x; u8 y; - u8 ignoreTouchFlag : 4; + u8 ignoreTouchFlag : 4; u8 initialCursorPos : 4; u8 shapeParam; } YesNoPromptTemplate; @@ -56,12 +56,12 @@ typedef struct YesNoPrompt { u8 y; u8 width; u8 height; - u8 inTouchMode : 1; - u8 unused_74_1 : 1; + u8 inTouchMode : 1; + u8 unused_74_1 : 1; u8 confirmSelectionTimer : 6; u8 cursorPos; - u8 result : 4; - u8 ignoreTouch : 4; + u8 result : 4; + u8 ignoreTouch : 4; u8 buttonsAreInit : 4; u8 lastTouchEvent : 4; } YesNoPrompt; diff --git a/src/alph_puzzle.c b/src/alph_puzzle.c index 37cc7b2058..700ca7c441 100644 --- a/src/alph_puzzle.c +++ b/src/alph_puzzle.c @@ -131,8 +131,8 @@ typedef struct AlphPuzzleData { } AlphPuzzleData; typedef struct AlphPuzzleInitTileData { - u8 index : 5; - u8 rotation : 2; + u8 index : 5; + u8 rotation : 2; u8 isImmovable : 1; } AlphPuzzleInitTileData; @@ -586,7 +586,7 @@ BOOL AlphPuzzle_Init(OVY_MANAGER *man, int *state) { AlphPuzzleData *data = OverlayManager_CreateAndGetData(man, sizeof(AlphPuzzleData), HEAP_ID_ALPH_PUZZLE); MI_CpuFill8(data, 0, sizeof(AlphPuzzleData)); data->heapId = HEAP_ID_ALPH_PUZZLE; - data->args = OverlayManager_GetArgs(man); + data->args = OverlayManager_GetArgs(man); sub_02004EC4(74, 0, 0); AlphPuzzle_InitTextOptionsAndPuzzleIndex(data); (*state)++; @@ -661,10 +661,10 @@ static void AlphPuzzle_ScreenOff(void) { static void AlphPuzzle_InitTextOptionsAndPuzzleIndex(AlphPuzzleData *data) { data->menuInputState = MenuInputStateMgr_GetState(data->args->menuInputStatePtr); - Options *options = Save_PlayerData_GetOptionsAddr(data->args->saveData); + Options *options = Save_PlayerData_GetOptionsAddr(data->args->saveData); data->textFrameDelay = Options_GetTextFrameDelay(options); - data->frame = Options_GetFrame(options); - data->puzzleIndex = data->args->puzzle; + data->frame = Options_GetFrame(options); + data->puzzleIndex = data->args->puzzle; } static void AlphPuzzle_Finish(AlphPuzzleData *data) { @@ -803,11 +803,11 @@ static int AlphPuzzleMainSeq_PickupTile_impl(AlphPuzzleData *data) { return ALPH_PUZZLE_STATE_ROTATE_TILE; } if (data->sceneTimer++ >= 2) { - data->sceneTimer = 0; + data->sceneTimer = 0; data->tileHoverPixelX = (data->selectedTile->x * 32) + 64; data->tileHoverPixelY = (data->selectedTile->y * 32) + 32; - data->tileHoverTileX = data->selectedTile->x; - data->tileHoverTileY = data->selectedTile->y; + data->tileHoverTileX = data->selectedTile->x; + data->tileHoverTileY = data->selectedTile->y; AlphPuzzle_ClearOrSetBgTilesAtCoords(data, data->selectedTile->x, data->selectedTile->y, 3); return ALPH_PUZZLE_STATE_HOLDING_TILE; } @@ -947,7 +947,7 @@ static int AlphPuzzleMainSeq_RotateTile_impl(AlphPuzzleData *data) { break; case 1: { u16 rotationOffset = (data->sceneTimer++) * 0x800; - u16 rotation = data->selectedTile->rotation * 0x4000 + rotationOffset; + u16 rotation = data->selectedTile->rotation * 0x4000 + rotationOffset; Sprite_SetRotation(data->selectedTile->sprite, rotation); if (data->sceneTimer >= 8) { data->subState++; @@ -960,7 +960,7 @@ static int AlphPuzzleMainSeq_RotateTile_impl(AlphPuzzleData *data) { AlphPuzzle_UpdateSelectedTile(data, -1, FALSE); data->sceneTimer = 0; - data->subState = 0; + data->subState = 0; if (AlphPuzzle_CheckComplete(data)) { return ALPH_PUZZLE_STATE_CLEAR; @@ -1015,8 +1015,8 @@ static int AlphPuzzleMainSeq_Clear_impl(AlphPuzzleData *data) { } break; default: - data->subState = 0; - data->sceneTimer = 0; + data->subState = 0; + data->sceneTimer = 0; data->puzzleSolved = 1; return ALPH_PUZZLE_STATE_FADE_OUT; } @@ -1050,12 +1050,12 @@ static void AlphPuzzle_InitTileData(AlphPuzzleData *data) { for (x = 0; x < ALPH_PUZZLE_TILES_WIDE; x++) { u32 pos = y * ALPH_PUZZLE_TILES_WIDE + x; if ((*puzzle)[pos].index != 0 && (*puzzle)[pos].index <= 16) { - tile = &data->tileGrid[(*puzzle)[pos].index - 1]; - tile->x = x; - tile->y = y; - tile->rotation = (*puzzle)[pos].rotation; + tile = &data->tileGrid[(*puzzle)[pos].index - 1]; + tile->x = x; + tile->y = y; + tile->rotation = (*puzzle)[pos].rotation; tile->isImmovable = (*puzzle)[pos].isImmovable; - tile->sprite = NULL; + tile->sprite = NULL; } } } @@ -1119,7 +1119,7 @@ static void AlphPuzzle_FreeBackgroundBuffers(AlphPuzzleData *data) { } static void AlphPuzzle_LoadBackgroundGraphics(AlphPuzzleData *data) { - NARC *narc = NARC_New(NARC_application_annon_puzzle_gra, data->heapId); + NARC *narc = NARC_New(NARC_application_annon_puzzle_gra, data->heapId); data->palette = PaletteData_Init(data->heapId); PaletteData_AllocBuffers(data->palette, PLTTBUF_MAIN_BG, 256, data->heapId); @@ -1159,9 +1159,9 @@ static void AlphPuzzle_FreeBackgroundGraphics(AlphPuzzleData *data) { static void AlphPuzzle_InitText(AlphPuzzleData *data) { FontID_Alloc(4, data->heapId); - data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0002_bin, data->heapId); + data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0002_bin, data->heapId); data->messageFormat = MessageFormat_New_Custom(6, 16, data->heapId); - data->unk30 = String_New(0x80, data->heapId); + data->unk30 = String_New(0x80, data->heapId); data->quitText = NewString_ReadMsgData(data->msgData, msg_0002_00000); @@ -1246,7 +1246,7 @@ static void AlphPuzzle_CreateSprites(AlphPuzzleData *data) { Sprite_SetOamMode(data->sprites[ALPH_SPRITE_INDEX_PREV_CURSOR], GX_OAM_MODE_XLU); sub_0200E248(data->spriteRenderer, data->spriteGfxHandler, NARC_application_annon_puzzle_gra, data->puzzleIndex + NARC_puzzle_gra_puzzle_gra_00000004_NCGR, 0, 1); for (i = 0; i < 16; i++) { - u8 index = i + ALPH_SPRITE_INDEX_TILE_00; + u8 index = i + ALPH_SPRITE_INDEX_TILE_00; data->sprites[index] = SpriteRenderer_CreateSprite(data->spriteRenderer, data->spriteGfxHandler, &sSpriteTemplates[ALPH_SPRITE_INDEX_TILE_00]); Sprite_SetVisibleFlag(data->sprites[index], 1); Sprite_SetAnimCtrlSeq(data->sprites[index], i); @@ -1336,15 +1336,15 @@ static void AlphPuzzle_UpdateHoverGraphicOnBg(AlphPuzzleData *data, u8 x, u8 y) static void AlphPuzzle_Quit_CreateYesNoPrompt(AlphPuzzleData *data) { YesNoPromptTemplate unkStruct; MI_CpuFill8(&unkStruct, 0, sizeof(YesNoPromptTemplate)); - unkStruct.bgConfig = data->bgConfig; - unkStruct.tileStart = 31; - unkStruct.plttSlot = 6; - unkStruct.bgId = 0; - unkStruct.x = 25; - unkStruct.y = 10; - unkStruct.ignoreTouchFlag = data->menuInputState; + unkStruct.bgConfig = data->bgConfig; + unkStruct.tileStart = 31; + unkStruct.plttSlot = 6; + unkStruct.bgId = 0; + unkStruct.x = 25; + unkStruct.y = 10; + unkStruct.ignoreTouchFlag = data->menuInputState; unkStruct.initialCursorPos = 1; - unkStruct.shapeParam = 0; + unkStruct.shapeParam = 0; YesNoPrompt_InitFromTemplateWithPalette(data->yesNoPrompt, &unkStruct, data->palette); } @@ -1375,9 +1375,9 @@ void AlphPuzzle_SetSpritePosition_HandleRotation(AlphPuzzleTile *tile, s16 x, s1 void AlphPuzzle_PlaceTileInGrid(AlphPuzzleData *data, s16 tileIndex, u8 x, u8 y, u8 rotation) { AlphPuzzleTile *tile = &data->tileGrid[tileIndex]; - tile->x = x; - tile->y = y; - tile->rotation = rotation; + tile->x = x; + tile->y = y; + tile->rotation = rotation; AlphPuzzle_SetSpritePosition_HandleRotation(tile, x * 32 + 48, y * 32 + 16); Sprite_SetRotation(tile->sprite, (rotation % 4u) * 0x4000); } @@ -1385,7 +1385,7 @@ void AlphPuzzle_PlaceTileInGrid(AlphPuzzleData *data, s16 tileIndex, u8 x, u8 y, static void AlphPuzzle_UpdateSelectedTile(AlphPuzzleData *data, u8 tileIndex, BOOL isSelecting) { if (isSelecting) { data->selectedTileIndex = tileIndex; - data->selectedTile = &data->tileGrid[data->selectedTileIndex]; + data->selectedTile = &data->tileGrid[data->selectedTileIndex]; Sprite_SetDrawPriority(data->selectedTile->sprite, 0); Sprite_AddPositionXY(data->selectedTile->sprite, -2, -2); Sprite_SetVisibleFlag(data->sprites[ALPH_SPRITE_INDEX_PREV_CURSOR], 1); @@ -1396,9 +1396,9 @@ static void AlphPuzzle_UpdateSelectedTile(AlphPuzzleData *data, u8 tileIndex, BO AlphPuzzle_PlaceTileInGrid(data, data->selectedTileIndex, data->selectedTile->x, data->selectedTile->y, data->selectedTile->rotation); Sprite_SetVisibleFlag(data->sprites[ALPH_SPRITE_INDEX_PREV_CURSOR], 0); AlphPuzzle_ToggleDropCursorSprite(data, 0); - data->tileHoverTileX = 0; - data->tileHoverTileY = 0; - data->selectedTile = NULL; + data->tileHoverTileX = 0; + data->tileHoverTileY = 0; + data->selectedTile = NULL; data->selectedTileIndex = 0; } } diff --git a/src/application/view_photo.c b/src/application/view_photo.c index 5d809519ae..cfb820d247 100644 --- a/src/application/view_photo.c +++ b/src/application/view_photo.c @@ -69,19 +69,19 @@ static void ViewPhotoSysTask_PrintTextOnWindows(ViewPhotoSysTaskData *viewPhoto) static u8 Photo_CountValidMons(Photo *a0); static const WindowTemplate ov19_0225A04E[2] = { - { .bgId = GF_BG_LYR_SUB_1, - .left = 24, - .top = 21, - .width = 8, - .height = 2, - .palette = 1, + { .bgId = GF_BG_LYR_SUB_1, + .left = 24, + .top = 21, + .width = 8, + .height = 2, + .palette = 1, .baseTile = 0x1F0 }, - { .bgId = GF_BG_LYR_SUB_1, - .left = 1, - .top = 8, - .width = 28, - .height = 8, - .palette = 10, + { .bgId = GF_BG_LYR_SUB_1, + .left = 1, + .top = 8, + .width = 28, + .height = 8, + .palette = 10, .baseTile = 0x110 } }; @@ -135,11 +135,11 @@ static const u8 _0225A03C[3] = { 9, 1, 4 }; SysTask *FieldSystem_CreateViewPhotoTask(FieldSystem *fieldSystem) { ViewPhotoSysTaskData *viewPhoto = AllocFromHeap(HEAP_ID_FIELD, sizeof(ViewPhotoSysTaskData)); MI_CpuClear8(viewPhoto, sizeof(ViewPhotoSysTaskData)); - viewPhoto->heapId = HEAP_ID_FIELD; - viewPhoto->fieldSystem = fieldSystem; - viewPhoto->bgConfig = fieldSystem->bgConfig; - viewPhoto->saveData = fieldSystem->saveData; - viewPhoto->parent = fieldSystem->viewPhotoTask; + viewPhoto->heapId = HEAP_ID_FIELD; + viewPhoto->fieldSystem = fieldSystem; + viewPhoto->bgConfig = fieldSystem->bgConfig; + viewPhoto->saveData = fieldSystem->saveData; + viewPhoto->parent = fieldSystem->viewPhotoTask; viewPhoto->menuInputState = MenuInputStateMgr_GetState(&fieldSystem->menuInputState); FieldViewPhoto_GetAlbumScrollParam(viewPhoto->parent, &viewPhoto->scrollData); return SysTask_CreateOnMainQueue(SysTask_ViewPhoto, viewPhoto, 1); @@ -258,18 +258,18 @@ static void ViewPhotoSysTask_InitBgLayers(ViewPhotoSysTaskData *viewPhoto) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x7800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(viewPhoto->bgConfig, GF_BG_LYR_SUB_1, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(viewPhoto->bgConfig, GF_BG_LYR_SUB_1); @@ -277,18 +277,18 @@ static void ViewPhotoSysTask_InitBgLayers(ViewPhotoSysTaskData *viewPhoto) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x7000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(viewPhoto->bgConfig, GF_BG_LYR_SUB_2, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(viewPhoto->bgConfig, GF_BG_LYR_SUB_2); @@ -296,18 +296,18 @@ static void ViewPhotoSysTask_InitBgLayers(ViewPhotoSysTaskData *viewPhoto) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_256, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_256, .screenBase = GX_BG_SCRBASE_0x6800, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(viewPhoto->bgConfig, GF_BG_LYR_SUB_3, &bgTemplate, GF_BG_TYPE_256x16PLTT); BgClearTilemapBufferAndCommit(viewPhoto->bgConfig, GF_BG_LYR_SUB_3); @@ -336,7 +336,7 @@ static void ViewPhotoSysTask_LoadBgGraphics(ViewPhotoSysTaskData *viewPhoto) { NNSG2dCharacterData *pCharData; u8 r3; ncgrFile = GfGfxLoader_GetCharDataFromOpenNarc(narc, 5, FALSE, &pCharData, viewPhoto->heapId); - r3 = viewPhoto->scrollData.photo->iconId + 1; + r3 = viewPhoto->scrollData.photo->iconId + 1; BG_LoadCharTilesData(viewPhoto->bgConfig, GF_BG_LYR_SUB_3, pCharData->pRawData + ((25 * r3 + 64) * 64), 0x640, 1); FreeToHeap(ncgrFile); NARC_Delete(narc); @@ -347,10 +347,10 @@ static void ViewPhotoSysTask_UnloadBgGraphics(ViewPhotoSysTaskData *viewPhoto) { static void ViewPhotoSysTask_InitMessages(ViewPhotoSysTaskData *viewPhoto) { FontID_Alloc(4, viewPhoto->heapId); - viewPhoto->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0000_bin, viewPhoto->heapId); + viewPhoto->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0000_bin, viewPhoto->heapId); viewPhoto->msgFormat = MessageFormat_New_Custom(6, 22, viewPhoto->heapId); - viewPhoto->strBuf = String_New(128, viewPhoto->heapId); - viewPhoto->exitMsg = NewString_ReadMsgData(viewPhoto->msgData, 0); + viewPhoto->strBuf = String_New(128, viewPhoto->heapId); + viewPhoto->exitMsg = NewString_ReadMsgData(viewPhoto->msgData, 0); for (int i = 0; i < 2; ++i) { viewPhoto->photoDescStringTemplates[i] = NewString_ReadMsgData(viewPhoto->msgData, 10 + i); } diff --git a/src/application/view_rankings.c b/src/application/view_rankings.c index 7779f438f8..d55a3936b2 100644 --- a/src/application/view_rankings.c +++ b/src/application/view_rankings.c @@ -151,99 +151,99 @@ typedef struct ViewRankingsCursorPositionParam { static const ViewRankingsCursorPositionParam sCursorPositionParams[] = { { - .x = 128, - .y = 64, + .x = 128, + .y = 64, .anim = 7, }, { - .x = 128, - .y = 80, + .x = 128, + .y = 80, .anim = 7, }, { - .x = 128, - .y = 96, + .x = 128, + .y = 96, .anim = 7, }, { - .x = 128, - .y = 112, + .x = 128, + .y = 112, .anim = 7, }, { - .x = 128, - .y = 128, + .x = 128, + .y = 128, .anim = 7, }, { - .x = 128, - .y = 144, + .x = 128, + .y = 144, .anim = 7, }, { - .x = 224, - .y = 176, + .x = 224, + .y = 176, .anim = 2, }, }; static const RecordPageParam sRecordPageParam_BattleTower[] = { { - .max = 9999, + .max = 9999, .numDigits = 4, - .msgId = msg_0421_00044, + .msgId = msg_0421_00044, }, { - .max = 9999, + .max = 9999, .numDigits = 4, - .msgId = msg_0421_00044, + .msgId = msg_0421_00044, }, { - .max = 9999, + .max = 9999, .numDigits = 4, - .msgId = msg_0421_00044, + .msgId = msg_0421_00044, }, { - .max = 9999, + .max = 9999, .numDigits = 4, - .msgId = msg_0421_00044, + .msgId = msg_0421_00044, }, { - .max = 9999, + .max = 9999, .numDigits = 4, - .msgId = msg_0421_00044, + .msgId = msg_0421_00044, }, { - .max = 7, + .max = 7, .numDigits = 1, - .msgId = msg_0421_00045, + .msgId = msg_0421_00045, }, }; static const RecordPageParam sRecordPageParam_Pokemon[] = { // mons fainted { - .max = 999999, + .max = 999999, .numDigits = 6, - .msgId = msg_0421_00047, + .msgId = msg_0421_00047, }, // mons caught { - .max = 999999, + .max = 999999, .numDigits = 6, - .msgId = msg_0421_00047, + .msgId = msg_0421_00047, }, // eggs hatched { - .max = 999999, + .max = 999999, .numDigits = 6, - .msgId = msg_0421_00046, + .msgId = msg_0421_00046, }, // fishing landed { - .max = 999999, + .max = 999999, .numDigits = 6, - .msgId = msg_0421_00047, + .msgId = msg_0421_00047, }, }; @@ -388,7 +388,7 @@ static void ViewRankingsApp_Init_Internal(OVY_MANAGER *man, int *pState) { ViewRankings_LoadSpriteGraphics(data, HEAP_ID_RANKINGS_APP); ViewRankings_CreateSpriteResourcesHeader(data); data->yesNoPrompt = YesNoPrompt_Create(HEAP_ID_RANKINGS_APP); - data->frame = Options_GetFrame(Save_PlayerData_GetOptionsAddr(args->saveData)); + data->frame = Options_GetFrame(Save_PlayerData_GetOptionsAddr(args->saveData)); Main_SetVBlankIntrCB(VBlankCB_ViewRankings, data->bgConfig); data->mainState = 0; ResetAllTextPrinters(); @@ -399,12 +399,12 @@ static void ViewRankingsApp_Init_Internal(OVY_MANAGER *man, int *pState) { ViewRankings_CreateSprites(data); GfGfx_EngineATogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); ViewRankings_CreateTouchscreenHitboxes(data, HEAP_ID_RANKINGS_APP); - data->state = 1; + data->state = 1; data->saveRankings = Save_Rankings_Get(args->saveData); - data->page = args->page_scroll % 3; - data->scope = args->page_scroll / 3; - data->pageLength = RankingsViewSys_GetNumRecordsPerPage(data->page); - data->pageOffset = RankingsViewSys_GetFirstRecordIndexOnPage(data->page); + data->page = args->page_scroll % 3; + data->scope = args->page_scroll / 3; + data->pageLength = RankingsViewSys_GetNumRecordsPerPage(data->page); + data->pageOffset = RankingsViewSys_GetFirstRecordIndexOnPage(data->page); ViewRankingsApp_GetRankingsFromSave(data, args->saveData); data->recordIdx = args->cursorPos; if (data->recordIdx >= data->pageLength) { @@ -440,7 +440,7 @@ static BOOL ViewRankingsApp_Main_Internal(ViewRankingsAppData *appData) { break; case VIEW_RANKINGS_APP_STATE_DO_DELETE_RECORD: appData->recordToDelete->active = FALSE; - appData->state = VIEW_RANKINGS_APP_STATE_REDRAW; + appData->state = VIEW_RANKINGS_APP_STATE_REDRAW; break; } return FALSE; @@ -495,16 +495,16 @@ static BOOL ViewRankings_WaitButtonOrTouch(ViewRankingsAppData *appData) { static void ViewRankings_SetGfxBanks(void) { GraphicsBanks graphicsBanks = { - .bg = GX_VRAM_BG_128_A, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_128_C, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_64_E, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_16_I, + .bg = GX_VRAM_BG_128_A, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_128_C, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_64_E, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_16_I, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_0_B, - .texpltt = GX_VRAM_TEXPLTT_01_FG, + .tex = GX_VRAM_TEX_0_B, + .texpltt = GX_VRAM_TEXPLTT_01_FG, }; GfGfx_SetBanks(&graphicsBanks); } @@ -515,9 +515,9 @@ static void ViewRankings_InitBgLayers(BgConfig *bgConfig) { { GraphicsModes graphicsModes = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D }; SetBothScreensModesAndDisable(&graphicsModes); @@ -572,8 +572,8 @@ static void ViewRankings_InitObjCharTransfer(void) { ObjCharTransferTemplate template = { .maxTasks = 10, .sizeMain = 0x10000, - .sizeSub = 0x4000, - .heapId = HEAP_ID_RANKINGS_APP + .sizeSub = 0x4000, + .heapId = HEAP_ID_RANKINGS_APP }; ObjCharTransfer_Init(&template); ObjPlttTransfer_Init(1, HEAP_ID_RANKINGS_APP); @@ -644,13 +644,13 @@ static void ViewRankings_DestroySprites(ViewRankingsAppData *appData) { static void setSpriteTemplate(SpriteTemplate *spriteTemplate, ViewRankingsAppData *appData) { spriteTemplate->spriteList = appData->spriteList; - spriteTemplate->header = &appData->spriteResourcesHeader; + spriteTemplate->header = &appData->spriteResourcesHeader; spriteTemplate->position.z = 0; SetVecFx32(spriteTemplate->scale, FX32_ONE, FX32_ONE, FX32_ONE); - spriteTemplate->rotation = 0; - spriteTemplate->priority = 0; + spriteTemplate->rotation = 0; + spriteTemplate->priority = 0; spriteTemplate->whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; - spriteTemplate->heapId = HEAP_ID_RANKINGS_APP; + spriteTemplate->heapId = HEAP_ID_RANKINGS_APP; } static void ViewRankings_CreateSprites(ViewRankingsAppData *appData) { @@ -660,7 +660,7 @@ static void ViewRankings_CreateSprites(ViewRankingsAppData *appData) { spriteTemplate.position.x = FX32_CONST(224); spriteTemplate.position.y = FX32_CONST(176); - sprite = Sprite_CreateAffine(&spriteTemplate); + sprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sprite, TRUE); Sprite_SetAnimCtrlSeq(sprite, 2); Sprite_SetPriority(sprite, 1); @@ -669,7 +669,7 @@ static void ViewRankings_CreateSprites(ViewRankingsAppData *appData) { spriteTemplate.position.x = FX32_CONST(16); spriteTemplate.position.y = FX32_CONST(96); - sprite = Sprite_CreateAffine(&spriteTemplate); + sprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sprite, TRUE); Sprite_SetAnimCtrlSeq(sprite, 3); Sprite_SetVisibleFlag(sprite, TRUE); @@ -677,7 +677,7 @@ static void ViewRankings_CreateSprites(ViewRankingsAppData *appData) { spriteTemplate.position.x = FX32_CONST(240); spriteTemplate.position.y = FX32_CONST(96); - sprite = Sprite_CreateAffine(&spriteTemplate); + sprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sprite, TRUE); Sprite_SetAnimCtrlSeq(sprite, 5); Sprite_SetVisibleFlag(sprite, TRUE); @@ -685,7 +685,7 @@ static void ViewRankings_CreateSprites(ViewRankingsAppData *appData) { spriteTemplate.position.x = FX32_CONST(224); spriteTemplate.position.y = FX32_CONST(176); - sprite = Sprite_CreateAffine(&spriteTemplate); + sprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sprite, TRUE); Sprite_SetAnimCtrlSeq(sprite, 0); Sprite_SetVisibleFlag(sprite, TRUE); @@ -693,7 +693,7 @@ static void ViewRankings_CreateSprites(ViewRankingsAppData *appData) { spriteTemplate.position.x = FX32_CONST(64); spriteTemplate.position.y = FX32_CONST(176); - sprite = Sprite_CreateAffine(&spriteTemplate); + sprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sprite, TRUE); Sprite_SetAnimCtrlSeq(sprite, 8); Sprite_SetVisibleFlag(sprite, TRUE); @@ -865,9 +865,9 @@ static void ViewRankings_TrySetCursorPosition(ViewRankingsAppData *appData, int static void ViewRankings_DrawCursor(ViewRankingsAppData *appData) { VecFx32 pos = {}; - u8 idx = appData->cursorPos; - pos.x = sCursorPositionParams[idx].x * FX32_ONE; - pos.y = sCursorPositionParams[idx].y * FX32_ONE; + u8 idx = appData->cursorPos; + pos.x = sCursorPositionParams[idx].x * FX32_ONE; + pos.y = sCursorPositionParams[idx].y * FX32_ONE; Sprite_SetMatrix(appData->sprites[VIEW_RANKINGS_APP_SPRITE_CURSOR], &pos); Sprite_SetAnimCtrlSeq(appData->sprites[VIEW_RANKINGS_APP_SPRITE_CURSOR], sCursorPositionParams[idx].anim); } @@ -934,35 +934,35 @@ static void ViewRankingsApp_GetRankingsFromSave(ViewRankingsAppData *appData, Sa appData->pages[0] = Save_GetPlayerViewRankingPage(saveData, appData->page, HEAP_ID_RANKINGS_APP); for (i = 0; i < appData->pageLength; ++i) { appData->pages[1 + i] = Save_GetReceivedViewRankingPage(appData->saveRankings, appData->pageOffset + appData->scope * RANKINGS_COUNT + i, HEAP_ID_RANKINGS_APP); - cnt = 0; - inserted = FALSE; - ptr = appData->pages[1 + i]; + cnt = 0; + inserted = FALSE; + ptr = appData->pages[1 + i]; if (ptr->count == 0) { appData->records[i].entries[0].pageEntry = &appData->pages[0]->entries[i]; - appData->records[i].entries[0].active = TRUE; + appData->records[i].entries[0].active = TRUE; appData->records[i].entries[0].friendIdx = 0xFF; - appData->records[i].count = 1; + appData->records[i].count = 1; } else { for (j = 0; j < ptr->count; ++j) { if (!inserted && appData->pages[0]->entries[i].stat >= ptr->entries[j].stat) { appData->records[i].entries[cnt].pageEntry = &appData->pages[0]->entries[i]; - appData->records[i].entries[cnt].active = TRUE; + appData->records[i].entries[cnt].active = TRUE; appData->records[i].entries[cnt].friendIdx = 0xFF; ++cnt; appData->records[i].entries[cnt].pageEntry = &ptr->entries[j]; - appData->records[i].entries[cnt].active = TRUE; + appData->records[i].entries[cnt].active = TRUE; appData->records[i].entries[cnt].friendIdx = j; - inserted = TRUE; + inserted = TRUE; } else { appData->records[i].entries[cnt].pageEntry = &ptr->entries[j]; - appData->records[i].entries[cnt].active = TRUE; + appData->records[i].entries[cnt].active = TRUE; appData->records[i].entries[cnt].friendIdx = j; } ++cnt; } if (!inserted) { appData->records[i].entries[cnt].pageEntry = &appData->pages[0]->entries[i]; - appData->records[i].entries[cnt].active = TRUE; + appData->records[i].entries[cnt].active = TRUE; appData->records[i].entries[cnt].friendIdx = 0xFF; } appData->records[i].count = ptr->count + 1; @@ -971,11 +971,11 @@ static void ViewRankingsApp_GetRankingsFromSave(ViewRankingsAppData *appData, Sa } static void ViewRankings_CreateStrings(ViewRankingsAppData *appData) { - appData->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0421_bin, HEAP_ID_RANKINGS_APP); - appData->msgFormat = MessageFormat_New_Custom(2, 76, HEAP_ID_RANKINGS_APP); - appData->formatedStrBuf = String_New(76, HEAP_ID_RANKINGS_APP); + appData->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0421_bin, HEAP_ID_RANKINGS_APP); + appData->msgFormat = MessageFormat_New_Custom(2, 76, HEAP_ID_RANKINGS_APP); + appData->formatedStrBuf = String_New(76, HEAP_ID_RANKINGS_APP); appData->playerNameString = NewString_ReadMsgData(appData->msgData, msg_0421_00043); - appData->rankingString = NewString_ReadMsgData(appData->msgData, msg_0421_00042); + appData->rankingString = NewString_ReadMsgData(appData->msgData, msg_0421_00042); for (int i = 0; i < VIEW_RANKINGS_MISC_STRING_MAX; ++i) { appData->miscStrings[i] = NewString_ReadMsgData(appData->msgData, msg_0421_00044 + i); } @@ -1001,15 +1001,15 @@ static void ViewRankings_PrintRecords(ViewRankingsAppData *appData) { int prev; int cur; - pRecord = &appData->records[appData->recordIdx]; + pRecord = &appData->records[appData->recordIdx]; pageParam = &sRecordPageParams[appData->page][appData->recordIdx]; FillWindowPixelBuffer(&appData->windows[VIEW_RANKINGS_APP_WINDOW_RECORDS], 0); FillWindowPixelBuffer(&appData->windows[VIEW_RANKINGS_APP_WINDOW_RANKING], 0); - ranking = 1; - y = 0; - prev = 0; - i = 0; + ranking = 1; + y = 0; + prev = 0; + i = 0; appData->numRecords = 0; for (; i < pRecord->count; ++i) { if (pRecord->entries[i].active != 0) { @@ -1030,7 +1030,7 @@ static void ViewRankings_PrintRecords(ViewRankingsAppData *appData) { AddTextPrinterParameterizedWithColor(&appData->windows[VIEW_RANKINGS_APP_WINDOW_RECORDS], 0, appData->formatedStrBuf, 160 - FontID_String_GetWidth(0, appData->formatedStrBuf, 0), 16 * y, TEXT_SPEED_NOTRANSFER, MAKE_TEXT_COLOR(1, 2, 0), NULL); appData->recordEntryIdxs[y] = i; - prev = cur; + prev = cur; if (++y >= 6) { break; } @@ -1068,7 +1068,7 @@ static void ViewRankings_PrintDeleteXsRecordAreYouSure(ViewRankingsAppData *appD String *string; entryIdx = appData->recordEntryIdxs[appData->cursorPos]; - page = &appData->records[appData->recordIdx]; + page = &appData->records[appData->recordIdx]; DrawFrameAndWindow2(&appData->windows[VIEW_RANKINGS_APP_WINDOW_SELECT_RECORD_TO_DELETE], TRUE, 0x1, 12); FillWindowPixelBuffer(&appData->windows[VIEW_RANKINGS_APP_WINDOW_SELECT_RECORD_TO_DELETE], 0xFF); BufferString(appData->msgFormat, 0, page->entries[entryIdx].pageEntry->playerName, 2, 1, 2); @@ -1095,8 +1095,8 @@ static void ViewRankings_PrintRecordStatHeaderText(ViewRankingsAppData *appData) int msgNo; FillWindowPixelBuffer(&appData->windows[VIEW_RANKINGS_APP_WINDOW_HEADER], 0); - msgNo = (appData->page == 0 ? msg_0421_00053 : msg_0421_00065) + appData->recordIdx * 2; - string = NewString_ReadMsgData(appData->msgData, msgNo); + msgNo = (appData->page == 0 ? msg_0421_00053 : msg_0421_00065) + appData->recordIdx * 2; + string = NewString_ReadMsgData(appData->msgData, msgNo); string2 = NewString_ReadMsgData(appData->msgData, msgNo + 1); AddTextPrinterParameterizedWithColor(&appData->windows[VIEW_RANKINGS_APP_WINDOW_HEADER], 0, string, 0, 0, TEXT_SPEED_NOTRANSFER, MAKE_TEXT_COLOR(1, 2, 0), NULL); AddTextPrinterParameterizedWithColor(&appData->windows[VIEW_RANKINGS_APP_WINDOW_HEADER], 0, string2, 0, 16, TEXT_SPEED_NOTRANSFER, MAKE_TEXT_COLOR(1, 2, 0), NULL); @@ -1126,12 +1126,12 @@ static void ViewRankings_AskConfirmDeleteRecord(ViewRankingsAppData *appData) { PlaySE(SEQ_SE_DP_CUSTOM06); } else { MI_CpuClear8(&template, sizeof(YesNoPromptTemplate)); - template.bgConfig = appData->bgConfig; - template.bgId = GF_BG_LYR_MAIN_0; + template.bgConfig = appData->bgConfig; + template.bgId = GF_BG_LYR_MAIN_0; template.tileStart = 0x08F; - template.plttSlot = 13; - template.x = 25; - template.y = 6; + template.plttSlot = 13; + template.x = 25; + template.y = 6; YesNoPrompt_InitFromTemplate(appData->yesNoPrompt, &template); ViewRankings_PrintDeleteXsRecordAreYouSure(appData); dimAllMainBgsExceptLyr0(); diff --git a/src/ascii_util.c b/src/ascii_util.c index ea6b03ed06..780159f955 100644 --- a/src/ascii_util.c +++ b/src/ascii_util.c @@ -29,7 +29,7 @@ s32 Ascii_StrToL(const s8 *str) { s32 length = Ascii_StrLen(str); s32 i; s32 pow10 = 1; - s32 num = 0; + s32 num = 0; // Traverse from right to left for (i = length - 1; i >= 0; i--) { diff --git a/src/bag.c b/src/bag.c index 3308365b2b..32073c4ee1 100644 --- a/src/bag.c +++ b/src/bag.c @@ -48,10 +48,10 @@ RegisterItemResult Bag_TryRegisterItem(Bag *bag, u16 itemId) { if (bag->registeredItems[0] == ITEM_NONE) { bag->registeredItems[0] = itemId; - result = REG_ITEM_SLOT1; + result = REG_ITEM_SLOT1; } else if (bag->registeredItems[1] == ITEM_NONE) { bag->registeredItems[1] = itemId; - result = REG_ITEM_SLOT2; + result = REG_ITEM_SLOT2; } return result; } @@ -74,35 +74,35 @@ static u32 Bag_GetItemPocket(Bag *bag, u16 itemId, ItemSlot **itemSlots, u32 *co switch (pocket) { case POCKET_KEY_ITEMS: *itemSlots = bag->keyItems; - *countPtr = NUM_BAG_KEY_ITEMS; + *countPtr = NUM_BAG_KEY_ITEMS; break; case POCKET_ITEMS: *itemSlots = bag->items; - *countPtr = NUM_BAG_ITEMS; + *countPtr = NUM_BAG_ITEMS; break; case POCKET_BERRIES: *itemSlots = bag->berries; - *countPtr = NUM_BAG_BERRIES; + *countPtr = NUM_BAG_BERRIES; break; case POCKET_MEDICINE: *itemSlots = bag->medicine; - *countPtr = NUM_BAG_MEDICINE; + *countPtr = NUM_BAG_MEDICINE; break; case POCKET_BALLS: *itemSlots = bag->balls; - *countPtr = NUM_BAG_BALLS; + *countPtr = NUM_BAG_BALLS; break; case POCKET_BATTLE_ITEMS: *itemSlots = bag->battleItems; - *countPtr = NUM_BAG_BATTLE_ITEMS; + *countPtr = NUM_BAG_BATTLE_ITEMS; break; case POCKET_MAIL: *itemSlots = bag->mail; - *countPtr = NUM_BAG_MAIL; + *countPtr = NUM_BAG_MAIL; break; case POCKET_TMHMS: *itemSlots = bag->TMsHMs; - *countPtr = NUM_BAG_TMS_HMS; + *countPtr = NUM_BAG_TMS_HMS; break; } return pocket; @@ -277,8 +277,8 @@ u16 Pocket_GetQuantity(ItemSlot *slots, u32 count, u16 itemId) { static void SwapItemSlots(ItemSlot *a, ItemSlot *b) { ItemSlot c = *a; - *a = *b; - *b = c; + *a = *b; + *b = c; } static void PocketCompaction(ItemSlot *slots, u32 count) { @@ -391,7 +391,7 @@ BagCursor *BagCursor_New(HeapID heapId) { void BagCursor_Field_PocketGetPosition(BagCursor *cursor, u32 pocket, u8 *position, u8 *scroll) { *position = cursor->field.position[pocket]; - *scroll = cursor->field.scroll[pocket]; + *scroll = cursor->field.scroll[pocket]; } u16 BagCursor_Field_GetPocket(BagCursor *cursor) { @@ -400,7 +400,7 @@ u16 BagCursor_Field_GetPocket(BagCursor *cursor) { void BagCursor_Field_PocketSetPosition(BagCursor *cursor, u32 pocket, u8 position, u8 scroll) { cursor->field.position[pocket] = position; - cursor->field.scroll[pocket] = scroll; + cursor->field.scroll[pocket] = scroll; } void BagCursor_Field_SetPocket(BagCursor *cursor, u16 pocket) { @@ -409,7 +409,7 @@ void BagCursor_Field_SetPocket(BagCursor *cursor, u16 pocket) { void BagCursor_Battle_PocketGetPosition(BagCursor *cursor, u32 pocket, u8 *position, u8 *scroll) { *position = cursor->battle.position[pocket]; - *scroll = cursor->battle.scroll[pocket]; + *scroll = cursor->battle.scroll[pocket]; } u16 BagCursor_Battle_GetLastUsedItem(BagCursor *cursor) { @@ -426,7 +426,7 @@ u16 BagCursor_Battle_GetPocket(BagCursor *cursor) { void BagCursor_Battle_PocketSetPosition(BagCursor *cursor, u32 pocket, u8 position, u8 scroll) { cursor->battle.position[pocket] = position; - cursor->battle.scroll[pocket] = scroll; + cursor->battle.scroll[pocket] = scroll; } void BagCursor_Battle_Init(BagCursor *cursor) { @@ -437,7 +437,7 @@ void BagCursor_Battle_Init(BagCursor *cursor) { } void BagCursor_Battle_SetLastUsedItem(BagCursor *cursor, u16 itemId, u16 pocket) { - cursor->battle.lastUsedItem = itemId; + cursor->battle.lastUsedItem = itemId; cursor->battle.lastUsedPocket = pocket; } diff --git a/src/bag_view.c b/src/bag_view.c index 9e921a29b1..a20e5f8ca9 100644 --- a/src/bag_view.c +++ b/src/bag_view.c @@ -41,10 +41,10 @@ void sub_02077894(BagView *bagView, u8 a1) { void sub_0207789C(BagView *bagView, SaveData *save, u8 a2, BagCursor *cursor, MenuInputStateMgr *menuInputStateMgr) { sub_02077894(bagView, a2); - bagView->saveData = save; + bagView->saveData = save; bagView->menuInputStateMgr = menuInputStateMgr; - bagView->cursor = cursor; - bagView->itemId = ITEM_NONE; + bagView->cursor = cursor; + bagView->itemId = ITEM_NONE; } void BagView_SetItem(BagView *bagView, ItemSlot *slots, u8 pocketId, u8 position) { @@ -53,7 +53,7 @@ void BagView_SetItem(BagView *bagView, ItemSlot *slots, u8 pocketId, u8 position // However, this variable is unused. // This bug was introduced in HGSS. #pragma unused(position) - bagView->pockets[pocketId].slots = slots; + bagView->pockets[pocketId].slots = slots; bagView->pockets[pocketId].pocketId = pocketId; } @@ -118,7 +118,7 @@ static u32 GetNumBattlePoints(SaveData *saveData) { } BOOL TryFormatRegisteredKeyItemUseMessage(SaveData *saveData, String *dest, u16 itemId, HeapID heapId) { - MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0010_bin, heapId); + MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0010_bin, heapId); MessageFormat *messageFormat = MessageFormat_New(heapId); String *string; @@ -174,9 +174,9 @@ void GetItemUseErrorMessage(PlayerProfile *playerProfile, String *dest, u16 item break; default: // {PLAYER}! This isn't the time to use that! - msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0040_bin, heapId); + msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0040_bin, heapId); MessageFormat *messageFormat = MessageFormat_New(heapId); - String *src = NewString_ReadMsgData(msgData, msg_0040_00037); + String *src = NewString_ReadMsgData(msgData, msg_0040_00037); BufferPlayersName(messageFormat, 0, playerProfile); StringExpandPlaceholders(messageFormat, dest, src); String_Delete(src); diff --git a/src/battle/battle_022378C0.c b/src/battle/battle_022378C0.c index c3179e78ca..9eccec08c8 100644 --- a/src/battle/battle_022378C0.c +++ b/src/battle/battle_022378C0.c @@ -145,9 +145,9 @@ BOOL Battle_Run(OVY_MANAGER *man, int *state) { if (evolutionSpecies) { CreateHeap(HEAP_ID_3, HEAP_ID_EVOLUTION, 0x30000); - mon = Party_GetMonByIndex(setup->party[BATTLER_PLAYER], selectedMonIndex); + mon = Party_GetMonByIndex(setup->party[BATTLER_PLAYER], selectedMonIndex); setup->evolutionTaskData = sub_02075A7C(setup->party[BATTLER_PLAYER], mon, evolutionSpecies, setup->options, setup->unk_164, setup->pokedex, setup->bag, setup->gameStats, evolutionCondition, 3, HEAP_ID_EVOLUTION); - *state = BSTATE_EVOLUTION_MAIN; + *state = BSTATE_EVOLUTION_MAIN; } else { *state = BSTATE_EXIT; } @@ -206,7 +206,7 @@ void ov12_02237BB8(BattleSystem *bsys) { ov12_0223BBF0(bsys, 0); - int size = sub_02026E9C(); + int size = sub_02026E9C(); void *data = GetSubBgPlttAddr(); MIi_CpuClear16(0, data, size); diff --git a/src/battle/battle_command.c b/src/battle/battle_command.c index a787fc146a..d613f43293 100644 --- a/src/battle/battle_command.c +++ b/src/battle/battle_command.c @@ -487,7 +487,7 @@ BOOL BtlCmd_TrainerSlideIn(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - u32 side = BattleScriptReadWord(ctx); + u32 side = BattleScriptReadWord(ctx); u32 index = BattleScriptReadWord(ctx); switch (side) { @@ -866,7 +866,7 @@ BOOL BtlCmd_PlayMoveAnimationOnMons(BattleSystem *bsys, BattleContext *ctx) { u16 move; BattleScriptIncrementPointer(ctx, 1); - u32 battler = BattleScriptReadWord(ctx); + u32 battler = BattleScriptReadWord(ctx); u32 attackerSide = BattleScriptReadWord(ctx); u32 defenderSide = BattleScriptReadWord(ctx); @@ -1000,7 +1000,7 @@ BOOL BtlCmd_WaitButtonABTime(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_PlaySound(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - u32 side = BattleScriptReadWord(ctx); + u32 side = BattleScriptReadWord(ctx); u32 sound = BattleScriptReadWord(ctx); BattleController_EmitPlaySE(bsys, ctx, sound, GetBattlerIDBySide(bsys, ctx, side)); @@ -1012,9 +1012,9 @@ BOOL BtlCmd_CompareVarToValue(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); u32 opcode = BattleScriptReadWord(ctx); - u32 varId = BattleScriptReadWord(ctx); - int cmp = BattleScriptReadWord(ctx); - u32 adrs = BattleScriptReadWord(ctx); + u32 varId = BattleScriptReadWord(ctx); + int cmp = BattleScriptReadWord(ctx); + u32 adrs = BattleScriptReadWord(ctx); int *var = BattleScriptGetVarPointer(bsys, ctx, varId); @@ -1067,10 +1067,10 @@ BOOL BtlCmd_CompareMonDataToValue(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); u32 opcode = BattleScriptReadWord(ctx); - u32 side = BattleScriptReadWord(ctx); - u32 varId = BattleScriptReadWord(ctx); - int cmp = BattleScriptReadWord(ctx); - u32 adrs = BattleScriptReadWord(ctx); + u32 side = BattleScriptReadWord(ctx); + u32 varId = BattleScriptReadWord(ctx); + int cmp = BattleScriptReadWord(ctx); + u32 adrs = BattleScriptReadWord(ctx); int var = GetBattlerVar(ctx, GetBattlerIDBySide(bsys, ctx, side), varId, NULL); @@ -1183,7 +1183,7 @@ BOOL BtlCmd_CalcCrit(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_CalcExpGain(BattleSystem *bsys, BattleContext *ctx) { int adrs; - u32 battleType = BattleSystem_GetBattleType(bsys); + u32 battleType = BattleSystem_GetBattleType(bsys); OpponentData *opponentData = BattleSystem_GetOpponentData(bsys, ctx->battlerIdFainted); BattleScriptIncrementPointer(ctx, 1); @@ -1191,7 +1191,7 @@ BOOL BtlCmd_CalcExpGain(BattleSystem *bsys, BattleContext *ctx) { adrs = BattleScriptReadWord(ctx); if ((opponentData->unk195 & 1) && !(battleType & (BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_PAL_PARK))) { - int expMonsCnt = 0; + int expMonsCnt = 0; int expShareMonsCnt = 0; u16 totalExp; u16 itemNo; @@ -1240,9 +1240,9 @@ BOOL BtlCmd_StartGetExpTask(BattleSystem *bsys, BattleContext *ctx) { ctx->getterWork = AllocFromHeap(HEAP_ID_BATTLE, sizeof(GetterWork)); - ctx->getterWork->bsys = bsys; - ctx->getterWork->ctx = ctx; - ctx->getterWork->state = 0; + ctx->getterWork->bsys = bsys; + ctx->getterWork->ctx = ctx; + ctx->getterWork->state = 0; ctx->getterWork->unk30[6] = 0; SysTask_CreateOnMainQueue(Task_GetExp, ctx->getterWork, 0); @@ -1311,7 +1311,7 @@ BOOL BtlCmd_WaitMonSelection(BattleSystem *bsys, BattleContext *ctx) { int battlerId; int maxBattlers = BattleSystem_GetMaxBattlers(bsys); - int switchCnt = 0; + int switchCnt = 0; for (battlerId = 0; battlerId < maxBattlers; battlerId++) { if (ctx->unk_13C[battlerId] & 1) { @@ -1367,7 +1367,7 @@ BOOL BtlCmd_SwitchAndUpdateMon(BattleSystem *bsys, BattleContext *ctx) { ctx->unk_13C[battlerId] &= ~1; ctx->switchInFlag &= (MaskOfFlagNo(battlerId) ^ ~0); ctx->selectedMonIndex[battlerId] = ctx->unk_21A0[battlerId]; - ctx->unk_21A0[battlerId] = 6; + ctx->unk_21A0[battlerId] = 6; BattleSystem_GetBattleMon(bsys, ctx, battlerId, ctx->selectedMonIndex[battlerId]); ov12_02256F78(bsys, ctx, battlerId, ctx->selectedMonIndex[battlerId]); @@ -1405,9 +1405,9 @@ BOOL BtlCmd_StartCatchMonTask(BattleSystem *bsys, BattleContext *ctx) { int unkA = BattleScriptReadWord(ctx); - ctx->getterWork = (GetterWork *)AllocFromHeap(HEAP_ID_BATTLE, sizeof(GetterWork)); - ctx->getterWork->bsys = bsys; - ctx->getterWork->ctx = ctx; + ctx->getterWork = (GetterWork *)AllocFromHeap(HEAP_ID_BATTLE, sizeof(GetterWork)); + ctx->getterWork->bsys = bsys; + ctx->getterWork->ctx = ctx; ctx->getterWork->state = 0; ctx->getterWork->unk24 = unkA; ctx->getterWork->unk2C = ItemToBallId(ctx->itemTemp); @@ -1430,7 +1430,7 @@ BOOL BtlCmd_WaitCatchMonTask(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_SetMultiHit(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int cnt = BattleScriptReadWord(ctx); + int cnt = BattleScriptReadWord(ctx); int checkMultiHit = BattleScriptReadWord(ctx); if (ctx->multiHitCountTemp == 0) { @@ -1443,9 +1443,9 @@ BOOL BtlCmd_SetMultiHit(BattleSystem *bsys, BattleContext *ctx) { cnt = (BattleSystem_Random(bsys) & 3) + 2; } } - ctx->multiHitCount = cnt; + ctx->multiHitCount = cnt; ctx->multiHitCountTemp = cnt; - ctx->checkMultiHit = checkMultiHit; + ctx->checkMultiHit = checkMultiHit; } return FALSE; @@ -1455,8 +1455,8 @@ BOOL BtlCmd_UpdateVar(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int opcode = BattleScriptReadWord(ctx); - int varId = BattleScriptReadWord(ctx); - int val = BattleScriptReadWord(ctx); + int varId = BattleScriptReadWord(ctx); + int val = BattleScriptReadWord(ctx); int *var = BattleScriptGetVarPointer(bsys, ctx, varId); @@ -1487,7 +1487,7 @@ BOOL BtlCmd_UpdateVar(BattleSystem *bsys, BattleContext *ctx) { break; case OPCODE_RIGHT_SHIFT: { u32 uvar = *var; - *var = uvar >> val; + *var = uvar >> val; break; } case OPCODE_FLAG_INDEX: @@ -1531,20 +1531,20 @@ BOOL BtlCmd_ChangeStatStage(BattleSystem *bsys, BattleContext *ctx) { ctx->battleStatus &= ~BATTLE_STATUS_FAIL_STAT_STAGE_CHANGE; if (ctx->statChangeParam >= 46) { - stat = ctx->statChangeParam - 46; - change = -2; + stat = ctx->statChangeParam - 46; + change = -2; ctx->tempData = 13; } else if (ctx->statChangeParam >= 39) { - stat = ctx->statChangeParam - 39; - change = 2; + stat = ctx->statChangeParam - 39; + change = 2; ctx->tempData = 12; } else if (ctx->statChangeParam >= 22) { - stat = ctx->statChangeParam - 22; - change = -1; + stat = ctx->statChangeParam - 22; + change = -1; ctx->tempData = 13; } else { - stat = ctx->statChangeParam - 15; - change = 1; + stat = ctx->statChangeParam - 15; + change = 1; ctx->tempData = 12; } @@ -1554,28 +1554,28 @@ BOOL BtlCmd_ChangeStatStage(BattleSystem *bsys, BattleContext *ctx) { if (ctx->statChangeType == 3 || ctx->statChangeType == 2) { BattleScriptIncrementPointer(ctx, unkB); } else { - ctx->buffMsg.id = msg_0197_00142; //{0}'s {1} won't go any higher! - ctx->buffMsg.tag = TAG_NICKNAME_STAT; + ctx->buffMsg.id = msg_0197_00142; //{0}'s {1} won't go any higher! + ctx->buffMsg.tag = TAG_NICKNAME_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = stat + 1; BattleScriptIncrementPointer(ctx, unkA); } } else { if (ctx->statChangeType == 3) { - ctx->buffMsg.id = msg_0197_00622; //{0}'s {1} raised its {2} - ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_STAT; + ctx->buffMsg.id = msg_0197_00622; //{0}'s {1} raised its {2} + ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = ctx->battleMons[ctx->battlerIdStatChange].ability; ctx->buffMsg.param[2] = stat + 1; } else if (ctx->statChangeType == 5) { - ctx->buffMsg.id = msg_0197_00756; // The {1} raised {0}'s {2} - ctx->buffMsg.tag = TAG_NICKNAME_ITEM_STAT; + ctx->buffMsg.id = msg_0197_00756; // The {1} raised {0}'s {2} + ctx->buffMsg.tag = TAG_NICKNAME_ITEM_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = ctx->itemTemp; ctx->buffMsg.param[2] = stat + 1; } else { - ctx->buffMsg.id = (change == 1) ? msg_0197_00750 : msg_0197_00753; //{0}'s {1} (sharply) rose! - ctx->buffMsg.tag = TAG_NICKNAME_STAT; + ctx->buffMsg.id = (change == 1) ? msg_0197_00750 : msg_0197_00753; //{0}'s {1} (sharply) rose! + ctx->buffMsg.tag = TAG_NICKNAME_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = stat + 1; } @@ -1589,36 +1589,36 @@ BOOL BtlCmd_ChangeStatStage(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battlerIdAttacker != ctx->battlerIdStatChange) { // Mist if (ctx->fieldSideConditionData[BattleSystem_GetFieldSide(bsys, ctx->battlerIdStatChange)].mistTurns) { - ctx->buffMsg.id = msg_0197_00273; // {0} is protected by Mist! - ctx->buffMsg.tag = TAG_NICKNAME; + ctx->buffMsg.id = msg_0197_00273; // {0} is protected by Mist! + ctx->buffMsg.tag = TAG_NICKNAME; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); - unkD = 1; + unkD = 1; } else if (CheckBattlerAbilityIfNotIgnored(ctx, ctx->battlerIdAttacker, ctx->battlerIdStatChange, ABILITY_CLEAR_BODY) == TRUE || CheckBattlerAbilityIfNotIgnored(ctx, ctx->battlerIdAttacker, ctx->battlerIdStatChange, ABILITY_WHITE_SMOKE) == TRUE) { if (ctx->statChangeType == 3) { - ctx->buffMsg.id = msg_0197_00727; //{0}'s {1} suppressed {2}'s {3} - ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_NICKNAME_ABILITY; + ctx->buffMsg.id = msg_0197_00727; //{0}'s {1} suppressed {2}'s {3} + ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_NICKNAME_ABILITY; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = ctx->battleMons[ctx->battlerIdStatChange].ability; ctx->buffMsg.param[2] = CreateNicknameTag(ctx, ctx->battlerIdAttacker); ctx->buffMsg.param[3] = ctx->battleMons[ctx->battlerIdAttacker].ability; } else { - ctx->buffMsg.id = msg_0197_00669; //{0}'s {1} prevents stat loss! - ctx->buffMsg.tag = TAG_NICKNAME_ABILITY; + ctx->buffMsg.id = msg_0197_00669; //{0}'s {1} prevents stat loss! + ctx->buffMsg.tag = TAG_NICKNAME_ABILITY; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = ctx->battleMons[ctx->battlerIdStatChange].ability; } unkD = TRUE; } else if ((CheckBattlerAbilityIfNotIgnored(ctx, ctx->battlerIdAttacker, ctx->battlerIdStatChange, ABILITY_KEEN_EYE) == TRUE && (1 + stat) == 6) || (CheckBattlerAbilityIfNotIgnored(ctx, ctx->battlerIdAttacker, ctx->battlerIdStatChange, ABILITY_HYPER_CUTTER) == TRUE && (1 + stat) == 1)) { if (ctx->statChangeType == 3) { - ctx->buffMsg.id = msg_0197_00727; //{0}'s {1} suppressed {2}'s {3} - ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_NICKNAME_ABILITY; + ctx->buffMsg.id = msg_0197_00727; //{0}'s {1} suppressed {2}'s {3} + ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_NICKNAME_ABILITY; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = ctx->battleMons[ctx->battlerIdStatChange].ability; ctx->buffMsg.param[2] = CreateNicknameTag(ctx, ctx->battlerIdAttacker); ctx->buffMsg.param[3] = ctx->battleMons[ctx->battlerIdAttacker].ability; } else { - ctx->buffMsg.id = msg_0197_00704; //{0}'s {1} prvents {2} loss! - ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_STAT; + ctx->buffMsg.id = msg_0197_00704; //{0}'s {1} prvents {2} loss! + ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = ctx->battleMons[ctx->battlerIdStatChange].ability; ctx->buffMsg.param[2] = stat + 1; @@ -1630,8 +1630,8 @@ BOOL BtlCmd_ChangeStatStage(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, unkB); return FALSE; } else { - ctx->buffMsg.id = msg_0197_00145; //{0}'s {1} won't go lower! - ctx->buffMsg.tag = TAG_NICKNAME_STAT; + ctx->buffMsg.id = msg_0197_00145; //{0}'s {1} won't go lower! + ctx->buffMsg.tag = TAG_NICKNAME_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = stat + 1; BattleScriptIncrementPointer(ctx, unkA); @@ -1648,8 +1648,8 @@ BOOL BtlCmd_ChangeStatStage(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, unkB); return FALSE; } else { - ctx->buffMsg.id = msg_0197_00145; //{0}'s {1} won't go lower! - ctx->buffMsg.tag = TAG_NICKNAME_STAT; + ctx->buffMsg.id = msg_0197_00145; //{0}'s {1} won't go lower! + ctx->buffMsg.tag = TAG_NICKNAME_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = stat + 1; BattleScriptIncrementPointer(ctx, unkA); @@ -1668,15 +1668,15 @@ BOOL BtlCmd_ChangeStatStage(BattleSystem *bsys, BattleContext *ctx) { } } if (ctx->statChangeType == 3) { - ctx->buffMsg.id = msg_0197_00662; //{0}'s {1} cuts {2}'s {3} - ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_NICKNAME_STAT; + ctx->buffMsg.id = msg_0197_00662; //{0}'s {1} cuts {2}'s {3} + ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_NICKNAME_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdAttacker); ctx->buffMsg.param[1] = ctx->battleMons[ctx->battlerIdAttacker].ability; ctx->buffMsg.param[2] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[3] = stat + 1; } else { - ctx->buffMsg.id = (change == -1) ? msg_0197_00762 : msg_0197_00765; //{0}'s {1} (harsly) fell! - ctx->buffMsg.tag = TAG_NICKNAME_STAT; + ctx->buffMsg.id = (change == -1) ? msg_0197_00762 : msg_0197_00765; //{0}'s {1} (harsly) fell! + ctx->buffMsg.tag = TAG_NICKNAME_STAT; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdStatChange); ctx->buffMsg.param[1] = stat + 1; } @@ -1695,12 +1695,12 @@ void BattlerSetAbility(BattleContext *ctx, u8 a1, u8 a2); BOOL BtlCmd_UpdateMonData(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int opcode = BattleScriptReadWord(ctx); - int side = BattleScriptReadWord(ctx); - int varId = BattleScriptReadWord(ctx); - int val = BattleScriptReadWord(ctx); + int opcode = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int varId = BattleScriptReadWord(ctx); + int val = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); - int var = GetBattlerVar(ctx, battlerId, varId, NULL); + int var = GetBattlerVar(ctx, battlerId, varId, NULL); switch (opcode) { case 7: @@ -1729,7 +1729,7 @@ BOOL BtlCmd_UpdateMonData(BattleSystem *bsys, BattleContext *ctx) { break; case 15: { u32 uvar = var; - var = uvar >> val; + var = uvar >> val; break; } case 16: @@ -1769,7 +1769,7 @@ BOOL BtlCmd_ClearVolatileStatus(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int side = BattleScriptReadWord(ctx); - int var = BattleScriptReadWord(ctx); + int var = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); @@ -1781,8 +1781,8 @@ BOOL BtlCmd_ClearVolatileStatus(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_ToggleVanish(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); - int unkA = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int unkA = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitToggleVanish(bsys, battlerId, unkA); @@ -1795,10 +1795,10 @@ BOOL BtlCmd_CheckAbility(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int unkA = BattleScriptReadWord(ctx); - int side = BattleScriptReadWord(ctx); + int unkA = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int ability = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); if (side == BATTLER_CATEGORY_ALL) { int maxBattlers = BattleSystem_GetMaxBattlers(bsys); @@ -1848,8 +1848,8 @@ BOOL BtlCmd_UpdateVar2(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int opcode = BattleScriptReadWord(ctx); - int varId = BattleScriptReadWord(ctx); - int valId = BattleScriptReadWord(ctx); + int varId = BattleScriptReadWord(ctx); + int valId = BattleScriptReadWord(ctx); int *var = BattleScriptGetVarPointer(bsys, ctx, varId); int *val = BattleScriptGetVarPointer(bsys, ctx, valId); @@ -1881,7 +1881,7 @@ BOOL BtlCmd_UpdateVar2(BattleSystem *bsys, BattleContext *ctx) { break; case 15: { u32 uvar = *var; - *var = uvar >> *val; + *var = uvar >> *val; break; } case 16: @@ -1914,13 +1914,13 @@ BOOL BtlCmd_UpdateMonDataFromVar(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int opcode = BattleScriptReadWord(ctx); - int side = BattleScriptReadWord(ctx); - int varId = BattleScriptReadWord(ctx); - int valId = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int varId = BattleScriptReadWord(ctx); + int valId = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); - int var = GetBattlerVar(ctx, battlerId, varId, NULL); + int var = GetBattlerVar(ctx, battlerId, varId, NULL); int *val = BattleScriptGetVarPointer(bsys, ctx, valId); switch (opcode) { @@ -1950,7 +1950,7 @@ BOOL BtlCmd_UpdateMonDataFromVar(BattleSystem *bsys, BattleContext *ctx) { break; case 15: { u32 uvar = var; - var = uvar >> *val; + var = uvar >> *val; break; } case 16: @@ -2007,7 +2007,7 @@ BOOL BtlCmd_CallFromVar(BattleSystem *bsys, BattleContext *ctx) { } BOOL BtlCmd_SetMirrorMove(BattleSystem *bsys, BattleContext *ctx) { - int move = 0; + int move = 0; int battleType = BattleSystem_GetBattleType(bsys); BattleScriptIncrementPointer(ctx, 1); @@ -2025,7 +2025,7 @@ BOOL BtlCmd_SetMirrorMove(BattleSystem *bsys, BattleContext *ctx) { if (move && IsMoveEncored(ctx, move) == TRUE) { ctx->battleStatus &= ~BATTLE_STATUS_NO_ATTACK_MESSAGE; ctx->battleStatus &= ~BATTLE_STATUS_MOVE_ANIMATIONS_OFF; - ctx->moveNoCur = move; + ctx->moveNoCur = move; ctx->battlerIdTarget = ov12_022506D4(bsys, ctx, ctx->battlerIdAttacker, move, 1, 0); if (ctx->battlerIdTarget == BATTLER_NONE) { ctx->commandNext = CONTROLLER_COMMAND_39; @@ -2077,7 +2077,7 @@ BOOL BtlCmd_UnlockMoveChoice(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_SetHealthbarStatus(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int status = BattleScriptReadWord(ctx); BattleController_EmitHealthbarStatus(bsys, GetBattlerIDBySide(bsys, ctx, side), status); @@ -2089,7 +2089,7 @@ BOOL BtlCmd_PrintTrainerMessage(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int side = BattleScriptReadWord(ctx); - int msg = BattleScriptReadWord(ctx); + int msg = BattleScriptReadWord(ctx); BattleController_EmitPrintTrainerMessage(bsys, GetBattlerIDBySide(bsys, ctx, side), msg); @@ -2115,27 +2115,27 @@ u32 CalcPrizeMoney(BattleSystem *bsys, BattleContext *ctx, int trainerIndex) { default: case 0: { TRPOKE_NOITEM_DFLTMOVES *pokeDef = (TRPOKE_NOITEM_DFLTMOVES *)trPoke; - level = pokeDef[trainer.data.npoke - 1].level; + level = pokeDef[trainer.data.npoke - 1].level; break; } case 1: { TRPOKE_NOITEM_CUSTMOVES *pokeCust = (TRPOKE_NOITEM_CUSTMOVES *)trPoke; - level = pokeCust[trainer.data.npoke - 1].level; + level = pokeCust[trainer.data.npoke - 1].level; break; } case 2: { TRPOKE_ITEM_DFLTMOVES *pokeItem = (TRPOKE_ITEM_DFLTMOVES *)trPoke; - level = pokeItem[trainer.data.npoke - 1].level; + level = pokeItem[trainer.data.npoke - 1].level; break; } case 3: { TRPOKE_ITEM_CUSTMOVES *pokeCustItem = (TRPOKE_ITEM_CUSTMOVES *)trPoke; - level = pokeCustItem[trainer.data.npoke - 1].level; + level = pokeCustItem[trainer.data.npoke - 1].level; break; } } - i = 0; + i = 0; trainerClass = trainer.data.trainerClass; do { @@ -2200,7 +2200,7 @@ BOOL BtlCmd_PayPrizeMoney(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_PlayBattleAnimation(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int status = BattleScriptReadWord(ctx); if (BattleSystem_AreBattleAnimationsOn(bsys) == TRUE || status == 15 || status == 16 || status == 25 || status == 26) { @@ -2216,8 +2216,8 @@ BOOL BtlCmd_PlayBattleAnimation(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_PlayBattleAnimationOnMons(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int sideA = BattleScriptReadWord(ctx); - int sideB = BattleScriptReadWord(ctx); + int sideA = BattleScriptReadWord(ctx); + int sideB = BattleScriptReadWord(ctx); int status = BattleScriptReadWord(ctx); if (BattleSystem_AreBattleAnimationsOn(bsys) == TRUE || status == 15 || status == 16 || status == 26 || status == 25) { @@ -2234,11 +2234,11 @@ BOOL BtlCmd_PlayBattleAnimationOnMons(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_PlayBattleAnimationFromVar(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int status = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); - int *data = BattleScriptGetVarPointer(bsys, ctx, status); + int *data = BattleScriptGetVarPointer(bsys, ctx, status); if (BattleSystem_AreBattleAnimationsOn(bsys) == TRUE || status == 15 || status == 16 || *data == 25 || *data == 26) { if (CheckStatusEffectsSubstitute(ctx, battlerId, *data) == TRUE) { @@ -2345,7 +2345,7 @@ BOOL BtlCmd_TryConversion(BattleSystem *bsys, BattleContext *ctx) { } while (GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_1, NULL) == moveType || GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_2, NULL) == moveType); ctx->battleMons[ctx->battlerIdAttacker].type1 = moveType; ctx->battleMons[ctx->battlerIdAttacker].type2 = moveType; - ctx->msgTemp = moveType; + ctx->msgTemp = moveType; } return FALSE; @@ -2355,9 +2355,9 @@ BOOL BtlCmd_CompareVarToVar(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int opcode = BattleScriptReadWord(ctx); - int varNo = BattleScriptReadWord(ctx); - int cmpNo = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int varNo = BattleScriptReadWord(ctx); + int cmpNo = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); u32 *var = BattleScriptGetVarPointer(bsys, ctx, varNo); u32 *cmp = BattleScriptGetVarPointer(bsys, ctx, cmpNo); @@ -2411,12 +2411,12 @@ BOOL BtlCmd_CompareMonDataToVar(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int opcode = BattleScriptReadWord(ctx); - int side = BattleScriptReadWord(ctx); - int varNo = BattleScriptReadWord(ctx); - int cmpNo = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int varNo = BattleScriptReadWord(ctx); + int cmpNo = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); - u32 var = GetBattlerVar(ctx, GetBattlerIDBySide(bsys, ctx, side), varNo, NULL); + u32 var = GetBattlerVar(ctx, GetBattlerIDBySide(bsys, ctx, side), varNo, NULL); u32 *cmp = BattleScriptGetVarPointer(bsys, ctx, cmpNo); switch (opcode) { @@ -2490,12 +2490,12 @@ BOOL BtlCmd_TryLightScreen(BattleSystem *bsys, BattleContext *ctx) { ctx->moveStatusFlag |= 64; } else { ctx->fieldSideConditionFlags[unkA] |= SIDE_CONDITION_LIGHT_SCREEN; - ctx->fieldSideConditionData[unkA].lightScreenTurns = 5; + ctx->fieldSideConditionData[unkA].lightScreenTurns = 5; ctx->fieldSideConditionData[unkA].lightScreenBattler = ctx->battlerIdAttacker; if (GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker) == HOLD_EFFECT_EXTEND_SCREENS) { ctx->fieldSideConditionData[unkA].lightScreenTurns += GetHeldItemModifier(ctx, ctx->battlerIdAttacker, 0); } - ctx->buffMsg.tag = TAG_MOVE_SIDE; + ctx->buffMsg.tag = TAG_MOVE_SIDE; ctx->buffMsg.param[0] = ctx->moveNoCur; ctx->buffMsg.param[1] = ctx->battlerIdAttacker; if (GetMonsHitCount(bsys, ctx, 1, ctx->battlerIdAttacker) == 2) { @@ -2519,12 +2519,12 @@ BOOL BtlCmd_TryReflect(BattleSystem *bsys, BattleContext *ctx) { ctx->moveStatusFlag |= 64; } else { ctx->fieldSideConditionFlags[unkA] |= SIDE_CONDITION_REFLECT; - ctx->fieldSideConditionData[unkA].reflectTurns = 5; + ctx->fieldSideConditionData[unkA].reflectTurns = 5; ctx->fieldSideConditionData[unkA].reflectBattler = ctx->battlerIdAttacker; if (GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker) == HOLD_EFFECT_EXTEND_SCREENS) { ctx->fieldSideConditionData[unkA].reflectTurns += GetHeldItemModifier(ctx, ctx->battlerIdAttacker, 0); } - ctx->buffMsg.tag = TAG_MOVE_SIDE; + ctx->buffMsg.tag = TAG_MOVE_SIDE; ctx->buffMsg.param[0] = ctx->moveNoCur; ctx->buffMsg.param[1] = ctx->battlerIdAttacker; if (GetMonsHitCount(bsys, ctx, 1, ctx->battlerIdAttacker) == 2) { @@ -2548,7 +2548,7 @@ BOOL BtlCmd_TryMist(BattleSystem *bsys, BattleContext *ctx) { ctx->moveStatusFlag |= 64; } else { ctx->fieldSideConditionFlags[unkA] |= SIDE_CONDITION_MIST; - ctx->fieldSideConditionData[unkA].mistTurns = 5; + ctx->fieldSideConditionData[unkA].mistTurns = 5; ctx->fieldSideConditionData[unkA].mistBattler = ctx->battlerIdAttacker; } return FALSE; @@ -2614,10 +2614,10 @@ BOOL BtlCmd_DivideVarByValue(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_DivideVarByVar(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int varNo = BattleScriptReadWord(ctx); + int varNo = BattleScriptReadWord(ctx); int denomNo = BattleScriptReadWord(ctx); - int *data = BattleScriptGetVarPointer(bsys, ctx, varNo); + int *data = BattleScriptGetVarPointer(bsys, ctx, varNo); int *denom = BattleScriptGetVarPointer(bsys, ctx, denomNo); int sign; @@ -2645,7 +2645,7 @@ BOOL BtlCmd_TryMimic(BattleSystem *bsys, BattleContext *ctx) { if ((!CheckLegalMimicMove(ctx->moveNoBattlerPrev[ctx->battlerIdTarget])) || (ctx->battleMons[ctx->battlerIdAttacker].status2 & STATUS2_TRANSFORM) || (ctx->battleMons[ctx->battlerIdTarget].status2 & STATUS2_SUBSTITUTE) || ctx->moveNoBattlerPrev[ctx->battlerIdTarget] == 0) { BattleScriptIncrementPointer(ctx, adrs); } else { - int moveIndex = 0; + int moveIndex = 0; int mimicIndex = -1; for (moveIndex = 0; moveIndex < MAX_MON_MOVES; moveIndex++) { @@ -2658,7 +2658,7 @@ BOOL BtlCmd_TryMimic(BattleSystem *bsys, BattleContext *ctx) { } if (moveIndex == MAX_MON_MOVES) { - ctx->moveTemp = ctx->moveNoBattlerPrev[ctx->battlerIdTarget]; + ctx->moveTemp = ctx->moveNoBattlerPrev[ctx->battlerIdTarget]; ctx->battleMons[ctx->battlerIdAttacker].moves[mimicIndex] = ctx->moveTemp; if (ctx->trainerAIData.moveData[ctx->moveTemp].pp < 5) { ctx->battleMons[ctx->battlerIdAttacker].movePPCur[mimicIndex] = ctx->trainerAIData.moveData[ctx->moveTemp].pp; @@ -2717,8 +2717,8 @@ BOOL BtlCmd_TryDisable(BattleSystem *bsys, BattleContext *ctx) { int disabledMoveIndex = BattleMon_GetMoveIndex(&ctx->battleMons[ctx->battlerIdTarget], ctx->moveNoBattlerPrev[ctx->battlerIdTarget]); if ((ctx->battleMons[ctx->battlerIdTarget].unk88.disabledMove == 0) && disabledMoveIndex != 4 && ctx->battleMons[ctx->battlerIdTarget].movePPCur[disabledMoveIndex] && ctx->moveNoBattlerPrev[ctx->battlerIdTarget]) { - ctx->moveTemp = ctx->moveNoBattlerPrev[ctx->battlerIdTarget]; - ctx->battleMons[ctx->battlerIdTarget].unk88.disabledMove = ctx->moveTemp; + ctx->moveTemp = ctx->moveNoBattlerPrev[ctx->battlerIdTarget]; + ctx->battleMons[ctx->battlerIdTarget].unk88.disabledMove = ctx->moveTemp; ctx->battleMons[ctx->battlerIdTarget].unk88.disabledTurns = BattleSystem_Random(bsys) % 4 + 3; } else { BattleScriptIncrementPointer(ctx, adrs); @@ -2801,10 +2801,10 @@ BOOL BtlCmd_TryEncore(BattleSystem *bsys, BattleContext *ctx) { } if (ctx->battleMons[ctx->battlerIdTarget].unk88.encoredMove == 0 && encoredMoveIndex != MAX_MON_MOVES && ctx->battleMons[ctx->battlerIdTarget].movePPCur[encoredMoveIndex] && ctx->moveNoBattlerPrev[ctx->battlerIdTarget]) { - ctx->moveTemp = ctx->moveNoBattlerPrev[ctx->battlerIdTarget]; - ctx->battleMons[ctx->battlerIdTarget].unk88.encoredMove = ctx->moveTemp; + ctx->moveTemp = ctx->moveNoBattlerPrev[ctx->battlerIdTarget]; + ctx->battleMons[ctx->battlerIdTarget].unk88.encoredMove = ctx->moveTemp; ctx->battleMons[ctx->battlerIdTarget].unk88.encoredMoveIndex = encoredMoveIndex; - ctx->battleMons[ctx->battlerIdTarget].unk88.encoredTurns = BattleSystem_Random(bsys) % 5 + 3; + ctx->battleMons[ctx->battlerIdTarget].unk88.encoredTurns = BattleSystem_Random(bsys) % 5 + 3; } else { ctx->moveStatusFlag |= 64; BattleScriptIncrementPointer(ctx, adrs); @@ -2838,7 +2838,7 @@ BOOL BtlCmd_TryConversion2(BattleSystem *bsys, BattleContext *ctx) { if (typeMove == moveType && val <= 5 && GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_1, NULL) != typeMon && GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_2, NULL) != typeMon) { ctx->battleMons[ctx->battlerIdAttacker].type1 = typeMon; ctx->battleMons[ctx->battlerIdAttacker].type2 = typeMon; - ctx->msgTemp = typeMon; + ctx->msgTemp = typeMon; return FALSE; } } @@ -2848,7 +2848,7 @@ BOOL BtlCmd_TryConversion2(BattleSystem *bsys, BattleContext *ctx) { if (typeMove == moveType && val <= 5 && GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_1, NULL) != typeMon && GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_2, NULL) != typeMon) { ctx->battleMons[ctx->battlerIdAttacker].type1 = typeMon; ctx->battleMons[ctx->battlerIdAttacker].type2 = typeMon; - ctx->msgTemp = typeMon; + ctx->msgTemp = typeMon; return FALSE; } i++; @@ -2881,7 +2881,7 @@ BOOL BtlCmd_TrySketch(BattleSystem *bsys, BattleContext *ctx) { } } if (moveIndex == MAX_MON_MOVES) { - ctx->battleMons[ctx->battlerIdAttacker].moves[sketchIndex] = ctx->moveNoSketch[ctx->battlerIdTarget]; + ctx->battleMons[ctx->battlerIdAttacker].moves[sketchIndex] = ctx->moveNoSketch[ctx->battlerIdTarget]; ctx->battleMons[ctx->battlerIdAttacker].movePPCur[sketchIndex] = ctx->trainerAIData.moveData[ctx->moveNoSketch[ctx->battlerIdTarget]].pp; BattleController_EmitBattleMonToPartyMonCopy(bsys, ctx, ctx->battlerIdAttacker); ctx->moveTemp = ctx->moveNoSketch[ctx->battlerIdTarget]; @@ -2962,7 +2962,7 @@ BOOL BtlCmd_TrySpite(BattleSystem *bsys, BattleContext *ctx) { ppLoss = ctx->battleMons[ctx->battlerIdTarget].movePPCur[moveIndex]; } ctx->moveTemp = ctx->moveNoBattlerPrev[ctx->battlerIdTarget]; - ctx->msgTemp = ppLoss; + ctx->msgTemp = ppLoss; ctx->battleMons[ctx->battlerIdTarget].movePPCur[moveIndex] -= ppLoss; CopyBattleMonToPartyMon(bsys, ctx, ctx->battlerIdTarget); } @@ -3030,7 +3030,7 @@ BOOL BtlCmd_TryStealItem(BattleSystem *bsys, BattleContext *ctx) { int adrs2 = BattleScriptReadWord(ctx); u32 battleType = BattleSystem_GetBattleType(bsys); - int fieldSide = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); + int fieldSide = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); if (BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker) && !(battleType & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER))) { BattleScriptIncrementPointer(ctx, adrs1); @@ -3075,13 +3075,13 @@ BOOL BtlCmd_TryProtection(BattleSystem *bsys, BattleContext *ctx) { if (sProtectSuccessChance[ctx->battleMons[ctx->battlerIdAttacker].unk88.protectSuccessTurns] >= (u32)BattleSystem_Random(bsys) && flag) { if (ctx->trainerAIData.moveData[ctx->moveNoCur].effect == MOVE_EFFECT_PROTECT) { ctx->turnData[ctx->battlerIdAttacker].protectFlag = TRUE; - ctx->buffMsg.id = msg_0197_00282; + ctx->buffMsg.id = msg_0197_00282; } if (ctx->trainerAIData.moveData[ctx->moveNoCur].effect == MOVE_EFFECT_SURVIVE_WITH_1_HP) { ctx->turnData[ctx->battlerIdAttacker].endureFlag = TRUE; - ctx->buffMsg.id = msg_0197_00442; + ctx->buffMsg.id = msg_0197_00442; } - ctx->buffMsg.tag = TAG_NICKNAME; + ctx->buffMsg.tag = TAG_NICKNAME; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdAttacker); if (ctx->battleMons[ctx->battlerIdAttacker].unk88.protectSuccessTurns < NELEMS(sProtectSuccessChance) - 1) { @@ -3106,7 +3106,7 @@ BOOL BtlCmd_TrySubstitute(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdAttacker].hp <= subHp) { BattleScriptIncrementPointer(ctx, adrs); } else { - ctx->hpCalc = -subHp; + ctx->hpCalc = -subHp; ctx->battleMons[ctx->battlerIdAttacker].unk88.substituteHp = subHp; ctx->battleMons[ctx->battlerIdAttacker].status2 &= ~STATUS2_BIND; } @@ -3130,28 +3130,28 @@ BOOL BtlCmd_TryWhirlwind(BattleSystem *bsys, BattleContext *ctx) { int index0, indexEnd, monIndex, maxRand; int monIndexA, monIndexB; - party = BattleSystem_GetParty(bsys, ctx->battlerIdTarget); + party = BattleSystem_GetParty(bsys, ctx->battlerIdTarget); partySize = BattleSystem_GetPartySize(bsys, ctx->battlerIdTarget); if (battleType & BATTLE_TYPE_MULTI || battleType & BATTLE_TYPE_TAG && BattleSystem_GetFieldSide(bsys, ctx->battlerIdTarget)) { - index0 = 0; - indexEnd = partySize; - maxRand = partySize; - cntMax = 1; + index0 = 0; + indexEnd = partySize; + maxRand = partySize; + cntMax = 1; monIndexA = ctx->selectedMonIndex[ctx->battlerIdTarget]; monIndexB = ctx->selectedMonIndex[ctx->battlerIdTarget]; } else if (battleType & BATTLE_TYPE_DOUBLES) { - index0 = 0; - indexEnd = partySize; - maxRand = partySize; - cntMax = 2; + index0 = 0; + indexEnd = partySize; + maxRand = partySize; + cntMax = 2; monIndexA = ctx->selectedMonIndex[ctx->battlerIdTarget]; monIndexB = ctx->selectedMonIndex[BattleSystem_GetBattlerIdPartner(bsys, ctx->battlerIdTarget)]; } else { - index0 = 0; - indexEnd = partySize; - maxRand = partySize; - cntMax = 1; + index0 = 0; + indexEnd = partySize; + maxRand = partySize; + cntMax = 1; monIndexA = ctx->selectedMonIndex[ctx->battlerIdTarget]; monIndexB = ctx->selectedMonIndex[ctx->battlerIdTarget]; } @@ -3196,33 +3196,33 @@ BOOL BtlCmd_Transform(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); ctx->battleMons[ctx->battlerIdAttacker].status2 |= STATUS2_TRANSFORM; - ctx->battleMons[ctx->battlerIdAttacker].unk88.disabledMove = 0; - ctx->battleMons[ctx->battlerIdAttacker].unk88.disabledTurns = 0; + ctx->battleMons[ctx->battlerIdAttacker].unk88.disabledMove = 0; + ctx->battleMons[ctx->battlerIdAttacker].unk88.disabledTurns = 0; ctx->battleMons[ctx->battlerIdAttacker].unk88.transformPersonality = ctx->battleMons[ctx->battlerIdTarget].personality; - ctx->battleMons[ctx->battlerIdAttacker].unk88.transformGender = ctx->battleMons[ctx->battlerIdTarget].gender; - ctx->battleMons[ctx->battlerIdAttacker].unk88.mimicedMoveIndex = 0; - ctx->battleMons[ctx->battlerIdAttacker].unk88.lastResortCount = 0; + ctx->battleMons[ctx->battlerIdAttacker].unk88.transformGender = ctx->battleMons[ctx->battlerIdTarget].gender; + ctx->battleMons[ctx->battlerIdAttacker].unk88.mimicedMoveIndex = 0; + ctx->battleMons[ctx->battlerIdAttacker].unk88.lastResortCount = 0; - src = (u8 *)&ctx->battleMons[ctx->battlerIdAttacker]; + src = (u8 *)&ctx->battleMons[ctx->battlerIdAttacker]; dest = (u8 *)&ctx->battleMons[ctx->battlerIdTarget]; for (i = 0; i < 40; i++) { src[i] = dest[i]; } - ctx->battleMons[ctx->battlerIdAttacker].sendOutFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].intimidateFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].traceFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].downloadFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].anticipationFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].forewarnFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].friskFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].moldBreakerFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].pressureFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].unk88.truantFlag = ctx->totalTurns & 1; + ctx->battleMons[ctx->battlerIdAttacker].sendOutFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].intimidateFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].traceFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].downloadFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].anticipationFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].forewarnFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].friskFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].moldBreakerFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].pressureFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].unk88.truantFlag = ctx->totalTurns & 1; ctx->battleMons[ctx->battlerIdAttacker].unk88.slowStartTurns = ctx->totalTurns + 1; - ctx->battleMons[ctx->battlerIdAttacker].slowStartFlag = 0; - ctx->battleMons[ctx->battlerIdAttacker].slowStartEnded = 0; + ctx->battleMons[ctx->battlerIdAttacker].slowStartFlag = 0; + ctx->battleMons[ctx->battlerIdAttacker].slowStartEnded = 0; for (i = 0; (int)i < MAX_MON_MOVES; i++) { if (ctx->trainerAIData.moveData[ctx->battleMons[ctx->battlerIdAttacker].moves[i]].pp < 5) { @@ -3256,8 +3256,8 @@ BOOL BtlCmd_TrySpikes(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_CheckSpikes(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); int fieldSide = BattleSystem_GetFieldSide(bsys, battlerId); @@ -3275,7 +3275,7 @@ BOOL BtlCmd_TryPerishSong(BattleSystem *bsys, BattleContext *ctx) { int battlerId; BattleScriptIncrementPointer(ctx, 1); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int maxBattlers = BattleSystem_GetMaxBattlers(bsys); ctx->calcTemp = maxBattlers; @@ -3310,8 +3310,8 @@ BOOL BtlCmd_GetTurnOrderBySpeed(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_GoToIfValidMon(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - u32 varId = BattleScriptReadWord(ctx); - u32 adrs = BattleScriptReadWord(ctx); + u32 varId = BattleScriptReadWord(ctx); + u32 adrs = BattleScriptReadWord(ctx); u32 *battlerId = BattleScriptGetVarPointer(bsys, ctx, varId); if (*battlerId < BattleSystem_GetMaxBattlers(bsys)) { @@ -3327,7 +3327,7 @@ BOOL BtlCmd_EndOfTurnWeatherEffect(BattleSystem *bsys, BattleContext *ctx) { u32 battlerId = GetBattlerIDBySide(bsys, ctx, BattleScriptReadWord(ctx)); ctx->tempData = 0; - ctx->hpCalc = 0; + ctx->hpCalc = 0; u32 type1 = GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_1, NULL); u32 type2 = GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_2, NULL); @@ -3336,7 +3336,7 @@ BOOL BtlCmd_EndOfTurnWeatherEffect(BattleSystem *bsys, BattleContext *ctx) { if (ctx->fieldCondition & FIELD_CONDITION_SANDSTORM_ALL) { if (type1 != TYPE_ROCK && type2 != TYPE_ROCK && type1 != TYPE_STEEL && type2 != TYPE_STEEL && type1 != TYPE_GROUND && type2 != TYPE_GROUND && ctx->battleMons[battlerId].hp && GetBattlerAbility(ctx, battlerId) != ABILITY_SAND_VEIL && !(ctx->battleMons[battlerId].moveEffectFlags & 0x40080)) { ctx->moveTemp = MOVE_SANDSTORM; - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 16); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 16); } } if (ctx->fieldCondition & FIELD_CONDITION_SUN_ALL) { @@ -3357,7 +3357,7 @@ BOOL BtlCmd_EndOfTurnWeatherEffect(BattleSystem *bsys, BattleContext *ctx) { } } else if (type1 != TYPE_ICE && type2 != TYPE_ICE && GetBattlerAbility(ctx, battlerId) != ABILITY_SNOW_CLOAK) { ctx->moveTemp = MOVE_HAIL; - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 16); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 16); } } } @@ -3453,7 +3453,7 @@ BOOL BtlCmd_TryAttract(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_TrySafeguard(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int fieldSide = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); if (ctx->fieldSideConditionFlags[fieldSide] & SIDE_CONDITION_SAFEGUARD) { @@ -3461,11 +3461,11 @@ BOOL BtlCmd_TrySafeguard(BattleSystem *bsys, BattleContext *ctx) { ctx->moveStatusFlag |= 64; } else { ctx->fieldSideConditionFlags[fieldSide] |= SIDE_CONDITION_SAFEGUARD; - ctx->fieldSideConditionData[fieldSide].safeguardTurns = 5; + ctx->fieldSideConditionData[fieldSide].safeguardTurns = 5; ctx->fieldSideConditionData[fieldSide].safeguardBattler = ctx->battlerIdAttacker; - ctx->buffMsg.tag = TAG_NONE_SIDE; - ctx->buffMsg.param[0] = ctx->battlerIdAttacker; - ctx->buffMsg.id = msg_0197_00198; + ctx->buffMsg.tag = TAG_NONE_SIDE; + ctx->buffMsg.param[0] = ctx->battlerIdAttacker; + ctx->buffMsg.id = msg_0197_00198; } return FALSE; @@ -3549,7 +3549,7 @@ BOOL BtlCmd_RapidSpin(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdAttacker].status2 & STATUS2_BIND) { ctx->battleMons[ctx->battlerIdAttacker].status2 &= ~STATUS2_BIND; ctx->battlerIdTemp = ctx->battleMons[ctx->battlerIdAttacker].unk88.battlerIdBinding; - ctx->moveTemp = ctx->battleMons[ctx->battlerIdAttacker].unk88.bindingMove; + ctx->moveTemp = ctx->battleMons[ctx->battlerIdAttacker].unk88.bindingMove; BattleScriptGotoSubscript(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BREAK_BIND_EFFECT); return FALSE; } @@ -3567,7 +3567,7 @@ BOOL BtlCmd_RapidSpin(BattleSystem *bsys, BattleContext *ctx) { if (ctx->fieldSideConditionData[side].spikesLayers) { ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_SPIKES; ctx->fieldSideConditionData[side].spikesLayers = 0; - ctx->moveTemp = MOVE_SPIKES; + ctx->moveTemp = MOVE_SPIKES; BattleScriptGotoSubscript(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BLOW_AWAY_HAZARDS); return FALSE; } @@ -3576,7 +3576,7 @@ BOOL BtlCmd_RapidSpin(BattleSystem *bsys, BattleContext *ctx) { if (ctx->fieldSideConditionData[side].toxicSpikesLayers) { ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_TOXIC_SPIKES; ctx->fieldSideConditionData[side].toxicSpikesLayers = 0; - ctx->moveTemp = MOVE_TOXIC_SPIKES; + ctx->moveTemp = MOVE_TOXIC_SPIKES; BattleScriptGotoSubscript(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BLOW_AWAY_HAZARDS); return FALSE; } @@ -3612,10 +3612,10 @@ BOOL BtlCmd_CalcHiddenPowerParams(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); ctx->movePower = ((ctx->battleMons[ctx->battlerIdAttacker].hpIV & 2) >> 1) | (ctx->battleMons[ctx->battlerIdAttacker].atkIV & 2) | ((ctx->battleMons[ctx->battlerIdAttacker].defIV & 2) << 1) | ((ctx->battleMons[ctx->battlerIdAttacker].speedIV & 2) << 2) | ((ctx->battleMons[ctx->battlerIdAttacker].spAtkIV & 2) << 3) | ((ctx->battleMons[ctx->battlerIdAttacker].spDefIV & 2) << 4); - ctx->moveType = (ctx->battleMons[ctx->battlerIdAttacker].hpIV & 1) | ((ctx->battleMons[ctx->battlerIdAttacker].atkIV & 1) << 1) | ((ctx->battleMons[ctx->battlerIdAttacker].defIV & 1) << 2) | ((ctx->battleMons[ctx->battlerIdAttacker].speedIV & 1) << 3) | ((ctx->battleMons[ctx->battlerIdAttacker].spAtkIV & 1) << 4) | ((ctx->battleMons[ctx->battlerIdAttacker].spDefIV & 1) << 5); + ctx->moveType = (ctx->battleMons[ctx->battlerIdAttacker].hpIV & 1) | ((ctx->battleMons[ctx->battlerIdAttacker].atkIV & 1) << 1) | ((ctx->battleMons[ctx->battlerIdAttacker].defIV & 1) << 2) | ((ctx->battleMons[ctx->battlerIdAttacker].speedIV & 1) << 3) | ((ctx->battleMons[ctx->battlerIdAttacker].spAtkIV & 1) << 4) | ((ctx->battleMons[ctx->battlerIdAttacker].spDefIV & 1) << 5); ctx->movePower = ctx->movePower * 40 / 63 + 30; - ctx->moveType = ctx->moveType * 15 / 63 + 1; + ctx->moveType = ctx->moveType * 15 / 63 + 1; if (ctx->moveType >= TYPE_MYSTERY) { ctx->moveType++; @@ -3646,11 +3646,11 @@ BOOL BtlCmd_TryFutureSight(BattleSystem *bsys, BattleContext *ctx) { if (ctx->fieldConditionData.futureSightTurns[ctx->battlerIdTarget] == 0) { int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdTarget); ctx->fieldSideConditionFlags[side] |= SIDE_CONDITION_FUTURE_SIGHT; - ctx->fieldConditionData.futureSightTurns[ctx->battlerIdTarget] = 3; - ctx->fieldConditionData.futureSightMoveNo[ctx->battlerIdTarget] = ctx->moveNoCur; + ctx->fieldConditionData.futureSightTurns[ctx->battlerIdTarget] = 3; + ctx->fieldConditionData.futureSightMoveNo[ctx->battlerIdTarget] = ctx->moveNoCur; ctx->fieldConditionData.battlerIdFutureSight[ctx->battlerIdTarget] = ctx->battlerIdAttacker; - int damage = CalcMoveDamage(bsys, ctx, ctx->moveNoCur, ctx->fieldSideConditionFlags[side], ctx->fieldCondition, 0, 0, ctx->battlerIdAttacker, ctx->battlerIdTarget, 1) * -1; - ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget] = ApplyDamageRange(bsys, ctx, damage); + int damage = CalcMoveDamage(bsys, ctx, ctx->moveNoCur, ctx->fieldSideConditionFlags[side], ctx->fieldCondition, 0, 0, ctx->battlerIdAttacker, ctx->battlerIdTarget, 1) * -1; + ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget] = ApplyDamageRange(bsys, ctx, damage); if (ctx->turnData[ctx->battlerIdAttacker].helpingHandFlag) { ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget] = ctx->fieldConditionData.futureSightDamage[ctx->battlerIdTarget] * 15 / 10; } @@ -3665,13 +3665,13 @@ BOOL BtlCmd_CheckMoveHit(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int sideAttacker = BattleScriptReadWord(ctx); - int sideTarget = BattleScriptReadWord(ctx); - int move = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int sideTarget = BattleScriptReadWord(ctx); + int move = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int battlerIdAttacker = GetBattlerIDBySide(bsys, ctx, sideAttacker); - int battlerIdTarget = GetBattlerIDBySide(bsys, ctx, sideTarget); - int moveMsgNo = GetMoveMessageNo(ctx, move); + int battlerIdTarget = GetBattlerIDBySide(bsys, ctx, sideTarget); + int moveMsgNo = GetMoveMessageNo(ctx, move); BattleSystem_CheckMoveHitEffect(bsys, ctx, battlerIdAttacker, battlerIdTarget, moveMsgNo); @@ -3706,8 +3706,8 @@ BOOL BtlCmd_BeatUp(BattleSystem *bsys, BattleContext *ctx) { if (ctx->multiHitCountTemp == 0) { ctx->multiHitCountTemp = 2; - ctx->checkMultiHit = 253; - ctx->beatUpCount = 0; + ctx->checkMultiHit = 253; + ctx->beatUpCount = 0; while (TRUE) { mon = BattleSystem_GetPartyMon(bsys, ctx->battlerIdAttacker, ctx->beatUpCount); @@ -3722,10 +3722,10 @@ BOOL BtlCmd_BeatUp(BattleSystem *bsys, BattleContext *ctx) { } } - mon = BattleSystem_GetPartyMon(bsys, ctx->battlerIdAttacker, ctx->beatUpCount); + mon = BattleSystem_GetPartyMon(bsys, ctx->battlerIdAttacker, ctx->beatUpCount); species = GetMonData(mon, MON_DATA_SPECIES, 0); - form = GetMonData(mon, MON_DATA_FORM, 0); - level = GetMonData(mon, MON_DATA_LEVEL, 0); + form = GetMonData(mon, MON_DATA_FORM, 0); + level = GetMonData(mon, MON_DATA_LEVEL, 0); ctx->damage = GetMonBaseStat_HandleAlternateForm(species, form, BASE_ATK); ctx->damage *= ctx->trainerAIData.moveData[ctx->moveNoCur].power; @@ -3740,8 +3740,8 @@ BOOL BtlCmd_BeatUp(BattleSystem *bsys, BattleContext *ctx) { ctx->damage = ApplyDamageRange(bsys, ctx, ctx->damage); ctx->damage *= -1; - ctx->buffMsg.id = msg_0197_00481; - ctx->buffMsg.tag = TAG_NICKNAME; + ctx->buffMsg.id = msg_0197_00481; + ctx->buffMsg.tag = TAG_NICKNAME; ctx->buffMsg.param[0] = (ctx->battlerIdAttacker | (ctx->beatUpCount << 8)); ctx->beatUpCount++; @@ -3773,8 +3773,8 @@ BOOL BtlCmd_BeatUp(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_FollowMe(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); - ctx->fieldSideConditionData[side].followMeFlag = TRUE; + int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); + ctx->fieldSideConditionData[side].followMeFlag = TRUE; ctx->fieldSideConditionData[side].battlerIdFollowMe = ctx->battlerIdAttacker; return FALSE; @@ -3785,13 +3785,13 @@ BOOL BtlCmd_TryHelpingHand(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); u32 battleType = BattleSystem_GetBattleType(bsys); if (battleType & BATTLE_TYPE_DOUBLES) { battlerId = GetBattlerIDBySide(bsys, ctx, 16); if ((ctx->switchInFlag & MaskOfFlagNo(battlerId)) == 0 && ctx->playerActions[battlerId].command != CONTROLLER_COMMAND_40 && ctx->battleMons[battlerId].hp && !ctx->turnData[ctx->battlerIdAttacker].helpingHandFlag && !ctx->turnData[battlerId].helpingHandFlag) { - ctx->battlerIdTemp = battlerId; + ctx->battlerIdTemp = battlerId; ctx->turnData[battlerId].helpingHandFlag = TRUE; } else { BattleScriptIncrementPointer(ctx, adrs); @@ -3809,9 +3809,9 @@ BOOL BtlCmd_TrySwapItems(BattleSystem *bsys, BattleContext *ctx) { int adrsA = BattleScriptReadWord(ctx); int adrsB = BattleScriptReadWord(ctx); - u32 battleType = BattleSystem_GetBattleType(bsys); + u32 battleType = BattleSystem_GetBattleType(bsys); int sideAttacker = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); - int sideTarget = BattleSystem_GetFieldSide(bsys, ctx->battlerIdTarget); + int sideTarget = BattleSystem_GetFieldSide(bsys, ctx->battlerIdTarget); if (BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker) && (battleType & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER)) == 0) { BattleScriptIncrementPointer(ctx, adrsA); @@ -3834,7 +3834,7 @@ BOOL BtlCmd_TryWish(BattleSystem *bsys, BattleContext *ctx) { if (ctx->fieldConditionData.wishTurns[ctx->battlerIdAttacker]) { BattleScriptIncrementPointer(ctx, adrs); } else { - ctx->fieldConditionData.wishTurns[ctx->battlerIdAttacker] = 2; + ctx->fieldConditionData.wishTurns[ctx->battlerIdAttacker] = 2; ctx->fieldConditionData.wishTarget[ctx->battlerIdAttacker] = ctx->selectedMonIndex[ctx->battlerIdAttacker]; } @@ -3853,7 +3853,7 @@ BOOL BtlCmd_TryAssist(BattleSystem *bsys, BattleContext *ctx) { unkA = BattleScriptReadWord(ctx); moveCnt = 0; - monCnt = BattleSystem_GetPartySize(bsys, ctx->battlerIdAttacker); + monCnt = BattleSystem_GetPartySize(bsys, ctx->battlerIdAttacker); for (i = 0; i < monCnt; i++) { if (i != ctx->selectedMonIndex[ctx->battlerIdAttacker]) { @@ -3900,10 +3900,10 @@ BOOL BtlCmd_TrySetMagicCoat(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_MagicCoat(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); - int battlerId = ctx->battlerIdAttacker; + int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); + int battlerId = ctx->battlerIdAttacker; ctx->battlerIdMagicCoat = battlerId; - ctx->battlerIdAttacker = ctx->battlerIdTarget; + ctx->battlerIdAttacker = ctx->battlerIdTarget; if (ctx->fieldSideConditionData[side].followMeFlag && ctx->battleMons[ctx->fieldSideConditionData[side].battlerIdFollowMe].hp) { ctx->battlerIdTarget = ctx->fieldSideConditionData[side].battlerIdFollowMe; @@ -3944,7 +3944,7 @@ BOOL BtlCmd_TryBreakScreens(BattleSystem *bsys, BattleContext *ctx) { if ((ctx->fieldSideConditionFlags[side] & SIDE_CONDITION_REFLECT) || (ctx->fieldSideConditionFlags[side] & SIDE_CONDITION_LIGHT_SCREEN)) { ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_REFLECT; ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_LIGHT_SCREEN; - ctx->fieldSideConditionData[side].reflectTurns = 0; + ctx->fieldSideConditionData[side].reflectTurns = 0; ctx->fieldSideConditionData[side].lightScreenTurns = 0; } else { BattleScriptIncrementPointer(ctx, adrs); @@ -3972,17 +3972,17 @@ BOOL BtlCmd_TryKnockOff(BattleSystem *bsys, BattleContext *ctx) { int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdTarget); if (ctx->battleMons[ctx->battlerIdTarget].item && CheckBattlerAbilityIfNotIgnored(ctx, ctx->battlerIdAttacker, ctx->battlerIdTarget, ABILITY_STICKY_HOLD) == TRUE) { - ctx->buffMsg.id = msg_0197_00714; - ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_MOVE; + ctx->buffMsg.id = msg_0197_00714; + ctx->buffMsg.tag = TAG_NICKNAME_ABILITY_MOVE; ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdTarget); ctx->buffMsg.param[1] = ctx->battleMons[ctx->battlerIdTarget].ability; ctx->buffMsg.param[2] = ctx->moveNoCur; } else if (ctx->battleMons[ctx->battlerIdTarget].item) { - ctx->buffMsg.id = msg_0197_00552; - ctx->buffMsg.tag = TAG_NICKNAME_NICKNAME_ITEM; - ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdAttacker); - ctx->buffMsg.param[1] = CreateNicknameTag(ctx, ctx->battlerIdTarget); - ctx->buffMsg.param[2] = ctx->battleMons[ctx->battlerIdTarget].item; + ctx->buffMsg.id = msg_0197_00552; + ctx->buffMsg.tag = TAG_NICKNAME_NICKNAME_ITEM; + ctx->buffMsg.param[0] = CreateNicknameTag(ctx, ctx->battlerIdAttacker); + ctx->buffMsg.param[1] = CreateNicknameTag(ctx, ctx->battlerIdTarget); + ctx->buffMsg.param[2] = ctx->battleMons[ctx->battlerIdTarget].item; ctx->battleMons[ctx->battlerIdTarget].item = 0; ctx->fieldSideConditionData[side].battlerBitKnockedOffItem |= MaskOfFlagNo(ctx->selectedMonIndex[ctx->battlerIdTarget]); } else { @@ -4021,7 +4021,7 @@ BOOL BtlCmd_TryImprison(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdAttacker].moveEffectFlags & MOVE_EFFECT_FLAG_IMPRISON_USER) { BattleScriptIncrementPointer(ctx, adrs); } else { - side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); + side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); maxBattlers = BattleSystem_GetMaxBattlers(bsys); for (battlerId = 0; battlerId < maxBattlers; battlerId++) { if (side != BattleSystem_GetFieldSide(bsys, battlerId)) { @@ -4060,9 +4060,9 @@ BOOL BtlCmd_TryGrudge(BattleSystem *bsys, BattleContext *ctx) { BattleSystem_GetFieldSide(bsys, ctx->battlerIdTarget); if (ctx->battleMons[ctx->battlerIdFainted].moveEffectFlags & MOVE_EFFECT_FLAG_GRUDGE && BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker) != BattleSystem_GetFieldSide(bsys, ctx->battlerIdFainted) && ctx->battleMons[ctx->battlerIdAttacker].hp && ctx->moveNoTemp != MOVE_STRUGGLE) { - pos = ctx->movePos[ctx->battlerIdAttacker]; + pos = ctx->movePos[ctx->battlerIdAttacker]; ctx->battleMons[ctx->battlerIdAttacker].movePPCur[pos] = 0; - ctx->moveTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[pos]; + ctx->moveTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[pos]; CopyBattleMonToPartyMon(bsys, ctx, ctx->battlerIdAttacker); } else { BattleScriptIncrementPointer(ctx, adrs); @@ -4100,7 +4100,7 @@ extern u16 sLowKickDamageTable[6][2]; BOOL BtlCmd_CalcWeightBasedPower(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int cnt = 0; + int cnt = 0; int weight = ctx->battleMons[ctx->battlerIdTarget].weight; do { @@ -4150,7 +4150,7 @@ BOOL BtlCmd_TryPursuit(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - adrs = BattleScriptReadWord(ctx); + adrs = BattleScriptReadWord(ctx); maxBattlers = BattleSystem_GetMaxBattlers(bsys); for (battlerId = 0; battlerId < maxBattlers; battlerId++) { @@ -4168,11 +4168,11 @@ BOOL BtlCmd_TryPursuit(BattleSystem *bsys, BattleContext *ctx) { ctx->battleMons[battlerId].movePPCur[moveIndex]--; } ov12_02252D14(bsys, ctx); - ctx->battlerIdAttacker = battlerId; - ctx->battlerIdTarget = ctx->battlerIdSwitch; - ctx->unk_2158 = 20; - ctx->moveNoCur = moveNo; - ctx->moveNoBattlerPrev[battlerId] = moveNo; + ctx->battlerIdAttacker = battlerId; + ctx->battlerIdTarget = ctx->battlerIdSwitch; + ctx->unk_2158 = 20; + ctx->moveNoCur = moveNo; + ctx->moveNoBattlerPrev[battlerId] = moveNo; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_40; CopyBattleMonToPartyMon(bsys, ctx, battlerId); break; @@ -4210,7 +4210,7 @@ BOOL BtlCmd_IfTurnFlag(BattleSystem *bsys, BattleContext *ctx) { int side = BattleScriptReadWord(ctx); int flag = BattleScriptReadWord(ctx); - int val = BattleScriptReadWord(ctx); + int val = BattleScriptReadWord(ctx); int adrs = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); @@ -4265,7 +4265,7 @@ BOOL BtlCmd_SetTurnFlag(BattleSystem *bsys, BattleContext *ctx) { int side = BattleScriptReadWord(ctx); int flag = BattleScriptReadWord(ctx); - int val = BattleScriptReadWord(ctx); + int val = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); @@ -4388,9 +4388,9 @@ BOOL BtlCmd_TryMeFirst(BattleSystem *bsys, BattleContext *ctx) { } if (ctx->playerActions[ctx->battlerIdTarget].command != CONTROLLER_COMMAND_40 && ctx->turnData[ctx->battlerIdTarget].struggleFlag == 0 && CheckLegalMeFirstMove(ctx, move) == TRUE && ctx->trainerAIData.moveData[move].power) { - ctx->battleMons[ctx->battlerIdAttacker].unk88.meFirstFlag = TRUE; + ctx->battleMons[ctx->battlerIdAttacker].unk88.meFirstFlag = TRUE; ctx->battleMons[ctx->battlerIdAttacker].unk88.meFirstCount = ctx->meFirstTotal; - ctx->moveTemp = move; + ctx->moveTemp = move; } else { BattleScriptIncrementPointer(ctx, adrs); } @@ -4595,13 +4595,13 @@ BOOL BtlCmd_CheckToxicSpikes(BattleSystem *bsys, BattleContext *ctx) { int fieldSide = BattleSystem_GetFieldSide(bsys, battlerId); if (ctx->fieldSideConditionData[fieldSide].toxicSpikesLayers) { - ctx->calcTemp = ctx->fieldSideConditionData[fieldSide].toxicSpikesLayers; - ctx->statChangeType = 6; + ctx->calcTemp = ctx->fieldSideConditionData[fieldSide].toxicSpikesLayers; + ctx->statChangeType = 6; ctx->battlerIdStatChange = battlerId; if (GetBattlerVar(ctx, ctx->battlerIdSwitch, BMON_DATA_TYPE_1, NULL) == TYPE_POISON || GetBattlerVar(ctx, ctx->battlerIdSwitch, BMON_DATA_TYPE_2, NULL) == TYPE_POISON) { ctx->fieldSideConditionFlags[fieldSide] &= ~(1 << 10); ctx->fieldSideConditionData[fieldSide].toxicSpikesLayers = 0; - ctx->calcTemp = 0; + ctx->calcTemp = 0; } } else { BattleScriptIncrementPointer(ctx, adrs); @@ -4614,10 +4614,10 @@ BOOL BtlCmd_CheckIgnorableAbility(BattleSystem *bsys, BattleContext *ctx) { int battlerId; BattleScriptIncrementPointer(ctx, 1); - int flag = BattleScriptReadWord(ctx); - int side = BattleScriptReadWord(ctx); + int flag = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int ability = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); if (side == 0) { int index; @@ -4658,7 +4658,7 @@ BOOL BtlCmd_IfSameSide(BattleSystem *bsys, BattleContext *ctx) { int sideA = BattleScriptReadWord(ctx); int sideB = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int battlerIdA = GetBattlerIDBySide(bsys, ctx, sideA); int battlerIdB = GetBattlerIDBySide(bsys, ctx, sideB); @@ -4684,9 +4684,9 @@ BOOL BtlCmd_GenerateEndOfBattleItem(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); for (i = 0; i < BattleSystem_GetPartySize(bsys, 0); i++) { - mon = BattleSystem_GetPartyMon(bsys, 0, i); + mon = BattleSystem_GetPartyMon(bsys, 0, i); species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0); - item = GetMonData(mon, MON_DATA_HELD_ITEM, 0); + item = GetMonData(mon, MON_DATA_HELD_ITEM, 0); ability = GetMonData(mon, MON_DATA_ABILITY, 0); if (ability == ABILITY_PICKUP && species != SPECIES_NONE @@ -4712,8 +4712,8 @@ BOOL BtlCmd_GenerateEndOfBattleItem(BattleSystem *bsys, BattleContext *ctx) { && species != SPECIES_NONE && species != SPECIES_EGG && item == ITEM_NONE) { - j = 0; - k = 10; + j = 0; + k = 10; lvl = GetMonData(mon, MON_DATA_LEVEL, 0); while (lvl > k) { j++; @@ -4743,8 +4743,8 @@ BOOL BtlCmd_TrickRoom(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_IfMovedThisTurn(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); if (ov12_0225561C(ctx, battlerId) == TRUE) { @@ -4757,10 +4757,10 @@ BOOL BtlCmd_IfMovedThisTurn(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_CheckItemHoldEffect(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int flag = BattleScriptReadWord(ctx); - int side = BattleScriptReadWord(ctx); + int flag = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int itemEffect = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); @@ -4778,12 +4778,12 @@ BOOL BtlCmd_CheckItemHoldEffect(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_GetItemHoldEffect(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); - int varId = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int varId = BattleScriptReadWord(ctx); int *holdEffect = BattleScriptGetVarPointer(bsys, ctx, varId); - int battlerId = GetBattlerIDBySide(bsys, ctx, side); + int battlerId = GetBattlerIDBySide(bsys, ctx, side); - u16 item = GetBattlerHeldItem(ctx, battlerId); + u16 item = GetBattlerHeldItem(ctx, battlerId); *holdEffect = GetItemVar(ctx, item, ITEM_VAR_HOLD_EFFECT); return FALSE; @@ -4792,11 +4792,11 @@ BOOL BtlCmd_GetItemHoldEffect(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_GetItemEffectParam(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int varId = BattleScriptReadWord(ctx); - int *var = BattleScriptGetVarPointer(bsys, ctx, varId); - u16 item = GetBattlerHeldItem(ctx, GetBattlerIDBySide(bsys, ctx, side)); - *var = GetItemVar(ctx, item, ITEM_VAR_MODIFIER); + int *var = BattleScriptGetVarPointer(bsys, ctx, varId); + u16 item = GetBattlerHeldItem(ctx, GetBattlerIDBySide(bsys, ctx, side)); + *var = GetItemVar(ctx, item, ITEM_VAR_MODIFIER); return FALSE; } @@ -4822,7 +4822,7 @@ BOOL BtlCmd_TryCamouflage(BattleSystem *bsys, BattleContext *ctx) { if (GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_1, NULL) != type && GetBattlerVar(ctx, ctx->battlerIdAttacker, BMON_DATA_TYPE_2, NULL) != type) { ctx->battleMons[ctx->battlerIdAttacker].type1 = type; ctx->battleMons[ctx->battlerIdAttacker].type2 = type; - ctx->msgTemp = type; + ctx->msgTemp = type; } else { BattleScriptIncrementPointer(ctx, adrs); } @@ -4861,12 +4861,12 @@ BOOL BtlCmd_GetTerrainSecondaryEffect(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_CalcNaturalGiftParams(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int adrs = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int power = GetNaturalGiftPower(ctx, ctx->battlerIdAttacker); if (power) { ctx->movePower = power; - ctx->moveType = GetNaturalGiftType(ctx, ctx->battlerIdAttacker); + ctx->moveType = GetNaturalGiftType(ctx, ctx->battlerIdAttacker); } else { BattleScriptIncrementPointer(ctx, adrs); } @@ -4916,7 +4916,7 @@ BOOL BtlCmd_WaitYesNoResult(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int adrsYes = BattleScriptReadWord(ctx); - int adrsNo = BattleScriptReadWord(ctx); + int adrsNo = BattleScriptReadWord(ctx); if (selection == 255) { BattleScriptIncrementPointer(ctx, adrsNo); @@ -4978,8 +4978,8 @@ BOOL BtlCmd_CheckStealthRock(BattleSystem *bsys, BattleContext *ctx) { int battlerId = GetBattlerIDBySide(bsys, ctx, side); int fieldSide = BattleSystem_GetFieldSide(bsys, battlerId); - int type1 = GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_1, NULL); - int type2 = GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_2, NULL); + int type1 = GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_1, NULL); + int type2 = GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_2, NULL); if (ctx->fieldSideConditionFlags[fieldSide] & 128 && ctx->battleMons[battlerId].hp) { switch (CalculateTypeEffectiveness(TYPE_ROCK, type1, type2)) { @@ -5086,7 +5086,7 @@ BOOL BtlCmd_GetCurrentMoveData(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_SetMosaic(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int param = BattleScriptReadWord(ctx); int delay = BattleScriptReadWord(ctx); @@ -5100,7 +5100,7 @@ BOOL BtlCmd_SetMosaic(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_ChangeForm(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitChangeForm(bsys, battlerId); @@ -5116,7 +5116,7 @@ BOOL BtlCmd_SetBattleBackground(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_UseBagItem(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleSystem_RecoverStatus(bsys, battlerId, ctx->selectedMonIndex[battlerId], 0, ctx->itemTemp); @@ -5127,8 +5127,8 @@ BOOL BtlCmd_UseBagItem(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_TryEscape(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); - int adrs = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int adrs = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); if (BattleTryRun(bsys, ctx, battlerId)) { @@ -5141,7 +5141,7 @@ BOOL BtlCmd_TryEscape(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_ShowBattleStartPartyGauge(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitInitStartBallGauge(bsys, battlerId); @@ -5152,7 +5152,7 @@ BOOL BtlCmd_ShowBattleStartPartyGauge(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_HideBattleStartPartyGauge(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitDeleteStartBallGauge(bsys, battlerId); @@ -5163,7 +5163,7 @@ BOOL BtlCmd_HideBattleStartPartyGauge(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_ShowPartyGauge(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitInitBallGauge(bsys, battlerId); @@ -5174,7 +5174,7 @@ BOOL BtlCmd_ShowPartyGauge(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_HidePartyGauge(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitDeleteBallGauge(bsys, battlerId); @@ -5203,7 +5203,7 @@ BOOL BtlCmd_IncrementGameStat(BattleSystem *bsys, BattleContext *ctx) { int side = BattleScriptReadWord(ctx); int flag = BattleScriptReadWord(ctx); - int id = BattleScriptReadWord(ctx); + int id = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); @@ -5215,7 +5215,7 @@ BOOL BtlCmd_IncrementGameStat(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_RestoreSprite(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); ov12_02263F8C(bsys, ctx, battlerId); @@ -5314,10 +5314,10 @@ BOOL BtlCmd_CheckWhiteout(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int side = BattleScriptReadWord(ctx); - adrs = BattleScriptReadWord(ctx); + adrs = BattleScriptReadWord(ctx); int battleType = BattleSystem_GetBattleType(bsys); - battlerId = GetBattlerIDBySide(bsys, ctx, side); + battlerId = GetBattlerIDBySide(bsys, ctx, side); if (battleType & BATTLE_TYPE_MULTI || (battleType & BATTLE_TYPE_TAG && BattleSystem_GetFieldSide(bsys, battlerId))) { Party *party1 = BattleSystem_GetParty(bsys, battlerId); @@ -5396,7 +5396,7 @@ BOOL BtlCmd_BoostRandomStatBy2(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_RemoveItem(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); ctx->recycleItem[battlerId] = ctx->battleMons[battlerId].item; @@ -5414,7 +5414,7 @@ BOOL BtlCmd_TryRecycle(BattleSystem *bsys, BattleContext *ctx) { int adrs = BattleScriptReadWord(ctx); if (ctx->recycleItem[ctx->battlerIdAttacker]) { - ctx->itemTemp = ctx->recycleItem[ctx->battlerIdAttacker]; + ctx->itemTemp = ctx->recycleItem[ctx->battlerIdAttacker]; ctx->recycleItem[ctx->battlerIdAttacker] = 0; } else { BattleScriptIncrementPointer(ctx, adrs); @@ -5465,8 +5465,8 @@ BOOL BtlCmd_CheckHoldOnWith1HP(BattleSystem *bsys, BattleContext *ctx) { int side = BattleScriptReadWord(ctx); - int battlerId = GetBattlerIDBySide(bsys, ctx, side); - int itemEffect = GetBattlerHeldItemEffect(ctx, battlerId); + int battlerId = GetBattlerIDBySide(bsys, ctx, side); + int itemEffect = GetBattlerHeldItemEffect(ctx, battlerId); int activationChance = GetHeldItemModifier(ctx, battlerId, 0); if (itemEffect == HOLD_EFFECT_MAYBE_ENDURE && (BattleSystem_Random(bsys) % 100) < activationChance) { @@ -5493,8 +5493,8 @@ BOOL BtlCmd_TryRestoreStatusOnSwitch(BattleSystem *bsys, BattleContext *ctx) { int battlerId = GetBattlerIDBySide(bsys, ctx, side); if (ctx->battleMons[battlerId].hp && ctx->selectedMonIndex[battlerId] != 6) { Pokemon *mon = BattleSystem_GetPartyMon(bsys, battlerId, ctx->selectedMonIndex[battlerId]); - int ability = GetMonData(mon, MON_DATA_ABILITY, NULL); - int status = GetMonData(mon, MON_DATA_STATUS, NULL); + int ability = GetMonData(mon, MON_DATA_ABILITY, NULL); + int status = GetMonData(mon, MON_DATA_STATUS, NULL); if (ctx->battleMons[battlerId].ability != ABILITY_NATURAL_CURE && !CheckStatusHealSwitch(ctx, ability, status)) { BattleScriptIncrementPointer(ctx, adrs); } @@ -5537,7 +5537,7 @@ BOOL BtlCmd_CheckIgnoreWeather(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_SetRandomTarget(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); ctx->battlerIdTarget = Battler_GetRandomOpposingBattlerId(bsys, ctx, battlerId); @@ -5560,7 +5560,7 @@ BOOL BtlCmd_CheckItemHoldEffectOnUTurn(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_RefreshSprite(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitSwapToSubstituteSprite(bsys, ctx, battlerId); @@ -5571,7 +5571,7 @@ BOOL BtlCmd_RefreshSprite(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_PlayMoveHitSound(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitPlayMoveSE(bsys, ctx, battlerId); @@ -5582,8 +5582,8 @@ BOOL BtlCmd_PlayMoveHitSound(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_PlayBGM(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); - int song = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); + int song = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleController_EmitPlaySong(bsys, battlerId, song); @@ -5645,8 +5645,8 @@ BOOL BtlCmd_LoadArchivedMonData(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); int species = BattleScriptReadWord(ctx); - int form = BattleScriptReadWord(ctx); - int stat = BattleScriptReadWord(ctx); + int form = BattleScriptReadWord(ctx); + int stat = BattleScriptReadWord(ctx); int *formPtr = BattleScriptGetVarPointer(bsys, ctx, form); @@ -5658,7 +5658,7 @@ BOOL BtlCmd_LoadArchivedMonData(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_RefreshMonData(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); BattleSystem_ReloadMonData(bsys, ctx, battlerId, ctx->selectedMonIndex[battlerId]); @@ -5669,7 +5669,7 @@ BOOL BtlCmd_RefreshMonData(BattleSystem *bsys, BattleContext *ctx) { BOOL BtlCmd_222(BattleSystem *bsys, BattleContext *ctx) { BattleScriptIncrementPointer(ctx, 1); - int side = BattleScriptReadWord(ctx); + int side = BattleScriptReadWord(ctx); int msgIndex = BattleScriptReadWord(ctx); int battlerId = GetBattlerIDBySide(bsys, ctx, side); @@ -5934,15 +5934,15 @@ static void Task_GetExp(SysTask *task, void *inData) { u16 item; int itemEffect; - msgLoader = BattleSystem_GetMessageData(data->bsys); + msgLoader = BattleSystem_GetMessageData(data->bsys); battleType = BattleSystem_GetBattleType(data->bsys); - side = (data->ctx->battlerIdFainted >> 1) & 1; // Get side of fainted mon (left or right) + side = (data->ctx->battlerIdFainted >> 1) & 1; // Get side of fainted mon (left or right) expBattler = 0; // Figure out which mon we're working on for (slot = data->unk30[6]; slot < BattleSystem_GetPartySize(data->bsys, expBattler); slot++) { - mon = BattleSystem_GetPartyMon(data->bsys, expBattler, slot); - item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); + mon = BattleSystem_GetPartyMon(data->bsys, expBattler, slot); + item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); itemEffect = GetItemAttr(item, ITEM_VAR_HOLD_EFFECT, HEAP_ID_BATTLE); if (itemEffect == HOLD_EFFECT_EXP_SHARE || (data->ctx->unk_A4[side] & MaskOfFlagNo(slot))) { @@ -5960,7 +5960,7 @@ static void Task_GetExp(SysTask *task, void *inData) { switch (data->state) { case STATE_GET_EXP_START: - item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); + item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); itemEffect = GetItemAttr(item, ITEM_VAR_HOLD_EFFECT, HEAP_ID_BATTLE); // Declare victory if all wild mons have been defeated @@ -5976,7 +5976,7 @@ static void Task_GetExp(SysTask *task, void *inData) { } u32 totalExp = 0; - msg.id = msg_0197_00001; // "{0} gained {1} Exp. Points!" + msg.id = msg_0197_00001; // "{0} gained {1} Exp. Points!" if (GetMonData(mon, MON_DATA_HP, NULL) && GetMonData(mon, MON_DATA_LEVEL, NULL) != 100) { if (data->ctx->unk_A4[side] & MaskOfFlagNo(slot)) { @@ -6005,7 +6005,7 @@ static void Task_GetExp(SysTask *task, void *inData) { msg.id = msg_0197_00002; // "{0} gained a boosted {1} Exp. Points!" } - u32 newExp = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); + u32 newExp = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); data->unk30[3] = newExp - GetMonBaseExperienceAtCurrentLevel(mon); newExp += totalExp; @@ -6021,9 +6021,9 @@ static void Task_GetExp(SysTask *task, void *inData) { } if (totalExp) { - msg.tag = TAG_NICKNAME_NUM; - msg.param[0] = expBattler | (slot << 8); - msg.param[1] = totalExp; + msg.tag = TAG_NICKNAME_NUM; + msg.param[0] = expBattler | (slot << 8); + msg.param[1] = totalExp; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); data->unk30[1] = 7; data->state++; @@ -6079,10 +6079,10 @@ static void Task_GetExp(SysTask *task, void *inData) { case STATE_GET_EXP_WAIT_LEVEL_UP_EFFECT: if (Link_QueueNotEmpty(data->ctx)) { TempStatsStruct stats = ov12_0226C354; - int level = GetMonData(mon, MON_DATA_LEVEL, NULL); + int level = GetMonData(mon, MON_DATA_LEVEL, NULL); // Cache the stats from the previous level for later data->ctx->prevLevelStats = AllocFromHeap(HEAP_ID_BATTLE, sizeof(PokemonStats)); - PokemonStats *oldStats = data->ctx->prevLevelStats; + PokemonStats *oldStats = data->ctx->prevLevelStats; for (i = 0; i < NUM_STATS; i++) { oldStats->stats[i] = GetMonData(mon, stats.stats[i], NULL); } @@ -6098,18 +6098,18 @@ static void Task_GetExp(SysTask *task, void *inData) { data->ctx->levelUpMons |= MaskOfFlagNo(slot); ov12_02263A1C(data->bsys, data->ctx, expBattler); - msg.id = msg_0197_00003; // "{0} grew to Lv. {1}!" - msg.tag = TAG_NICKNAME_NUM; - msg.param[0] = expBattler | (slot << 8); - msg.param[1] = level; + msg.id = msg_0197_00003; // "{0} grew to Lv. {1}!" + msg.tag = TAG_NICKNAME_NUM; + msg.param[0] = expBattler | (slot << 8); + msg.param[1] = level; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); - data->state = STATE_GET_EXP_WAIT_LEVEL_UP_MESSAGE_PRINT; + data->state = STATE_GET_EXP_WAIT_LEVEL_UP_MESSAGE_PRINT; } break; case STATE_GET_EXP_WAIT_LEVEL_UP_MESSAGE_PRINT: if (TextPrinterCheckActive(data->unk30[0]) == 0) { - data->state = STATE_GET_EXP_LEVEL_UP_SUMMARY_LOAD_ICON; + data->state = STATE_GET_EXP_LEVEL_UP_SUMMARY_LOAD_ICON; data->unk30[2] = 0; } break; @@ -6124,8 +6124,8 @@ static void Task_GetExp(SysTask *task, void *inData) { break; case STATE_GET_EXP_LEVEL_UP_SUMMARY_INIT: { - BgConfig *bgConfig = BattleSystem_GetBgConfig(data->bsys); - Window *window = BattleSystem_GetWindow(data->bsys, 1); + BgConfig *bgConfig = BattleSystem_GetBgConfig(data->bsys); + Window *window = BattleSystem_GetWindow(data->bsys, 1); PaletteData *palette = BattleSystem_GetPaletteData(data->bsys); G2_SetBG0Priority(2); @@ -6144,22 +6144,22 @@ static void Task_GetExp(SysTask *task, void *inData) { break; } case STATE_GET_EXP_LEVEL_UP_SUMMARY_PRINT_DIFF: { - TempStatsStruct stats = ov12_0226C36C; + TempStatsStruct stats = ov12_0226C36C; TempStatsStruct monData = ov12_0226C384; - Window *window = BattleSystem_GetWindow(data->bsys, 1); + Window *window = BattleSystem_GetWindow(data->bsys, 1); PokemonStats *oldStats = data->ctx->prevLevelStats; for (i = 0; i < NUM_STATS; i++) { - msg.id = msg_0197_00947; // stat name - msg.tag = TAG_STAT; + msg.id = msg_0197_00947; // stat name + msg.tag = TAG_STAT; msg.param[0] = stats.stats[i]; ov12_0223C4E8(data->bsys, window, msgLoader, &msg, 0, 16 * i, 0, 0, 0); - msg.id = msg_0197_00948; // "+{0}" - msg.tag = TAG_NUMBERS; - msg.param[0] = GetMonData(mon, monData.stats[i], NULL) - oldStats->stats[i]; + msg.id = msg_0197_00948; // "+{0}" + msg.tag = TAG_NUMBERS; + msg.param[0] = GetMonData(mon, monData.stats[i], NULL) - oldStats->stats[i]; msg.numDigits = 2; ov12_0223C4E8(data->bsys, window, msgLoader, &msg, 80, 16 * i, 0, 0, 0); @@ -6170,14 +6170,14 @@ static void Task_GetExp(SysTask *task, void *inData) { } case STATE_GET_EXP_LEVEL_UP_SUMMARY_PRINT_TRUE: { TempStatsStruct monData = ov12_0226C33C; - Window *window = BattleSystem_GetWindow(data->bsys, 1); + Window *window = BattleSystem_GetWindow(data->bsys, 1); FillWindowPixelRect(window, 0xF, 80, 0, 36, 96); // clear out the diff section (keep the printed stat names) for (i = 0; i < NUM_STATS; i++) { - msg.id = msg_0197_00949; // just a number - msg.tag = TAG_NUMBERS; - msg.param[0] = GetMonData(mon, monData.stats[i], NULL); + msg.id = msg_0197_00949; // just a number + msg.tag = TAG_NUMBERS; + msg.param[0] = GetMonData(mon, monData.stats[i], NULL); msg.numDigits = 3; ov12_0223C4E8(data->bsys, window, msgLoader, &msg, 72, 16 * i, 0x2, 36, 0); @@ -6227,37 +6227,37 @@ static void Task_GetExp(SysTask *task, void *inData) { break; case 0xFFFF: data->unk30[4] = move; - data->state = STATE_GET_EXP_WANTS_TO_LEARN_MOVE_PRINT; + data->state = STATE_GET_EXP_WANTS_TO_LEARN_MOVE_PRINT; break; default: if (data->ctx->selectedMonIndex[expBattler] == slot) { BattleSystem_ReloadMonData(data->bsys, data->ctx, expBattler, data->ctx->selectedMonIndex[expBattler]); } - msg.id = msg_0197_00004; // "{0} learned {1}!" - msg.tag = TAG_NICKNAME_MOVE; - msg.param[0] = expBattler | (slot << 8); - msg.param[1] = move; + msg.id = msg_0197_00004; // "{0} learned {1}!" + msg.tag = TAG_NICKNAME_MOVE; + msg.param[0] = expBattler | (slot << 8); + msg.param[1] = move; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); - data->state = STATE_GET_EXP_LEARNED_MOVE_WAIT; + data->state = STATE_GET_EXP_LEARNED_MOVE_WAIT; break; } break; } case STATE_GET_EXP_WANTS_TO_LEARN_MOVE_PRINT: - msg.id = msg_0197_01178; // "{0} wants to learn the move {1}." - msg.tag = TAG_NICKNAME_MOVE; - msg.param[0] = expBattler | (slot << 8); - msg.param[1] = data->unk30[4]; + msg.id = msg_0197_01178; // "{0} wants to learn the move {1}." + msg.tag = TAG_NICKNAME_MOVE; + msg.param[0] = expBattler | (slot << 8); + msg.param[1] = data->unk30[4]; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); data->state++; break; case STATE_GET_EXP_CANT_LEARN_MORE_MOVES_PRINT: - msg.id = msg_0197_01179; // "But {0} can't learn more than four moves." - msg.tag = TAG_NICKNAME; - msg.param[0] = expBattler | (slot << 8); + msg.id = msg_0197_01179; // "But {0} can't learn more than four moves." + msg.tag = TAG_NICKNAME; + msg.param[0] = expBattler | (slot << 8); data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); data->state++; break; @@ -6284,10 +6284,10 @@ static void Task_GetExp(SysTask *task, void *inData) { if (BattleBuffer_GetNext(data->ctx, expBattler) == 0xFF) { // TODO: could use a const data->state = STATE_GET_EXP_MAKE_IT_FORGET_CANCELLED; } else { - msg.id = msg_0197_01183; // "Which move should be forgotten?" - msg.tag = TAG_NONE; + msg.id = msg_0197_01183; // "Which move should be forgotten?" + msg.tag = TAG_NONE; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); - data->state = STATE_GET_EXP_MAKE_IT_FORGET_WAIT; + data->state = STATE_GET_EXP_MAKE_IT_FORGET_WAIT; } } break; @@ -6304,13 +6304,13 @@ static void Task_GetExp(SysTask *task, void *inData) { data->state = STATE_GET_EXP_MAKE_IT_FORGET_CANCELLED; } else if (BattleBuffer_GetNext(data->ctx, expBattler)) { data->unk30[5] = data->ctx->battleBuffer[expBattler][0] - 1; - data->state = STATE_GET_EXP_ONE_TWO_POOF; + data->state = STATE_GET_EXP_ONE_TWO_POOF; } break; case STATE_GET_EXP_MAKE_IT_FORGET_CANCELLED: - msg.id = msg_0197_01184; // "Well, then..." - msg.tag = TAG_NONE; + msg.id = msg_0197_01184; // "Well, then..." + msg.tag = TAG_NONE; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); data->state++; break; @@ -6326,12 +6326,12 @@ static void Task_GetExp(SysTask *task, void *inData) { if (BattleBuffer_GetNext(data->ctx, expBattler) == 0xFF) { data->state = STATE_GET_EXP_WANTS_TO_LEARN_MOVE_PRINT; } else { - msg.id = msg_0197_01188; // "{0} did not learn {1}." - msg.tag = TAG_NICKNAME_MOVE; - msg.param[0] = expBattler | (slot << 8); - msg.param[1] = data->unk30[4]; + msg.id = msg_0197_01188; // "{0} did not learn {1}." + msg.tag = TAG_NICKNAME_MOVE; + msg.param[0] = expBattler | (slot << 8); + msg.param[1] = data->unk30[4]; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); - data->state = 35; + data->state = 35; } } break; @@ -6344,33 +6344,33 @@ static void Task_GetExp(SysTask *task, void *inData) { break; case STATE_GET_EXP_ONE_TWO_POOF: - msg.id = msg_0197_01189; // "1, 2, and... ... Poof!" - msg.tag = 0; + msg.id = msg_0197_01189; // "1, 2, and... ... Poof!" + msg.tag = 0; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); data->state++; break; case STATE_GET_EXP_FORGOT_HOW_TO_USE: - msg.id = msg_0197_01190; // "{0} forgot how to use {1}." - msg.tag = TAG_NICKNAME_MOVE; - msg.param[0] = expBattler | (slot << 8); - msg.param[1] = GetMonData(mon, MON_DATA_MOVE1 + data->unk30[5], NULL); + msg.id = msg_0197_01190; // "{0} forgot how to use {1}." + msg.tag = TAG_NICKNAME_MOVE; + msg.param[0] = expBattler | (slot << 8); + msg.param[1] = GetMonData(mon, MON_DATA_MOVE1 + data->unk30[5], NULL); data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); data->state++; break; case STATE_GET_EXP_AND_DOTDOTDOT: - msg.id = msg_0197_01191; // "And..." - msg.tag = TAG_NONE; + msg.id = msg_0197_01191; // "And..." + msg.tag = TAG_NONE; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); data->state++; break; case STATE_GET_EXP_LEARNED_MOVE: - msg.id = msg_0197_01192; // "{0} learned {1}!" - msg.tag = TAG_NICKNAME_MOVE; - msg.param[0] = expBattler | (slot << 8); - msg.param[1] = data->unk30[4]; + msg.id = msg_0197_01192; // "{0} learned {1}!" + msg.tag = TAG_NICKNAME_MOVE; + msg.param[0] = expBattler | (slot << 8); + msg.param[1] = data->unk30[4]; data->unk30[0] = BattleSystem_PrintBattleMessage(data->bsys, msgLoader, &msg, BattleSystem_GetTextFrameDelay(data->bsys)); i = 0; @@ -6394,7 +6394,7 @@ static void Task_GetExp(SysTask *task, void *inData) { case STATE_GET_EXP_CHECK_DONE: data->ctx->unk_A4[side] &= (MaskOfFlagNo(slot) ^ 0xFFFFFFFF); // this mon is done data->unk30[6] = slot + 1; - data->state = STATE_GET_EXP_START; // go back to the top and get the next mon + data->state = STATE_GET_EXP_START; // go back to the top and get the next mon break; case STATE_GET_EXP_DONE: diff --git a/src/battle/battle_controller_player.c b/src/battle/battle_controller_player.c index c9e38f501b..57ff5c8525 100644 --- a/src/battle/battle_controller_player.c +++ b/src/battle/battle_controller_player.c @@ -94,52 +94,52 @@ static void ov12_0224E384(BattleSystem *bsys, BattleContext *ctx); static void ov12_0224E414(BattleSystem *bsys, BattleContext *ctx); static const ControllerFunction sPlayerBattleCommands[CONTROLLER_COMMAND_MAX] = { - [CONTROLLER_COMMAND_GET_BATTLE_MON] = BattleControllerPlayer_GetBattleMon, - [CONTROLLER_COMMAND_START_ENCOUNTER] = BattleControllerPlayer_StartEncounter, - [CONTROLLER_COMMAND_TRAINER_MESSAGE] = BattleControllerPlayer_TrainerMessage, - [CONTROLLER_COMMAND_SEND_OUT] = BattleControllerPlayer_PokemonAppear, - [CONTROLLER_COMMAND_SELECTION_SCREEN_INIT] = BattleControllerPlayer_SelectionScreenInit, - [CONTROLLER_COMMAND_SELECTION_SCREEN_INPUT] = BattleControllerPlayer_SelectionScreenInput, - [CONTROLLER_COMMAND_CALC_EXECUTION_ORDER] = BattleControllerPlayer_CalcExecutionOrder, - [CONTROLLER_COMMAND_BEFORE_TURN] = BattleControllerPlayer_BeforeTurn, - [CONTROLLER_COMMAND_8] = ov12_02249460, - [CONTROLLER_COMMAND_UPDATE_FIELD_CONDITION] = BattleControllerPlayer_UpdateFieldCondition, - [CONTROLLER_COMMAND_UPDATE_MON_CONDITION] = BattleControllerPlayer_UpdateMonCondition, + [CONTROLLER_COMMAND_GET_BATTLE_MON] = BattleControllerPlayer_GetBattleMon, + [CONTROLLER_COMMAND_START_ENCOUNTER] = BattleControllerPlayer_StartEncounter, + [CONTROLLER_COMMAND_TRAINER_MESSAGE] = BattleControllerPlayer_TrainerMessage, + [CONTROLLER_COMMAND_SEND_OUT] = BattleControllerPlayer_PokemonAppear, + [CONTROLLER_COMMAND_SELECTION_SCREEN_INIT] = BattleControllerPlayer_SelectionScreenInit, + [CONTROLLER_COMMAND_SELECTION_SCREEN_INPUT] = BattleControllerPlayer_SelectionScreenInput, + [CONTROLLER_COMMAND_CALC_EXECUTION_ORDER] = BattleControllerPlayer_CalcExecutionOrder, + [CONTROLLER_COMMAND_BEFORE_TURN] = BattleControllerPlayer_BeforeTurn, + [CONTROLLER_COMMAND_8] = ov12_02249460, + [CONTROLLER_COMMAND_UPDATE_FIELD_CONDITION] = BattleControllerPlayer_UpdateFieldCondition, + [CONTROLLER_COMMAND_UPDATE_MON_CONDITION] = BattleControllerPlayer_UpdateMonCondition, [CONTROLLER_COMMAND_UPDATE_FIELD_CONDITION_EXTRA] = BattleControllerPlayer_UpdateFieldConditionExtra, - [CONTROLLER_COMMAND_TURN_END] = BattleControllerPlayer_TurnEnd, - [CONTROLLER_COMMAND_FIGHT_INPUT] = BattleControllerPlayer_FightInput, - [CONTROLLER_COMMAND_ITEM_INPUT] = BattleControllerPlayer_ItemInput, - [CONTROLLER_COMMAND_POKEMON_INPUT] = BattleControllerPlayer_PokemonInput, - [CONTROLLER_COMMAND_RUN_INPUT] = BattleControllerPlayer_RunInput, - [CONTROLLER_COMMAND_SAFARI_THROW_BALL] = BattleControllerPlayer_SafariThrowBall, - [CONTROLLER_COMMAND_SAFARI_THROW_MUD] = BattleControllerPlayer_SafariThrowMud, - [CONTROLLER_COMMAND_SAFARI_RUN] = BattleControllerPlayer_SafariRun, - [CONTROLLER_COMMAND_SAFARI_WATCHING] = BattleControllerPlayer_SafariWatching, + [CONTROLLER_COMMAND_TURN_END] = BattleControllerPlayer_TurnEnd, + [CONTROLLER_COMMAND_FIGHT_INPUT] = BattleControllerPlayer_FightInput, + [CONTROLLER_COMMAND_ITEM_INPUT] = BattleControllerPlayer_ItemInput, + [CONTROLLER_COMMAND_POKEMON_INPUT] = BattleControllerPlayer_PokemonInput, + [CONTROLLER_COMMAND_RUN_INPUT] = BattleControllerPlayer_RunInput, + [CONTROLLER_COMMAND_SAFARI_THROW_BALL] = BattleControllerPlayer_SafariThrowBall, + [CONTROLLER_COMMAND_SAFARI_THROW_MUD] = BattleControllerPlayer_SafariThrowMud, + [CONTROLLER_COMMAND_SAFARI_RUN] = BattleControllerPlayer_SafariRun, + [CONTROLLER_COMMAND_SAFARI_WATCHING] = BattleControllerPlayer_SafariWatching, [CONTROLLER_COMMAND_CATCHING_CONSTEST_THROW_BALL] = BattleControllerPlayer_CatchingContestThrowBall, - [CONTROLLER_COMMAND_RUN_SCRIPT] = BattleControllerPlayer_RunScript, - [CONTROLLER_COMMAND_23] = ov12_0224C38C, - [CONTROLLER_COMMAND_24] = ov12_0224C4D8, - [CONTROLLER_COMMAND_25] = ov12_0224C5C8, - [CONTROLLER_COMMAND_26] = ov12_0224C5F8, - [CONTROLLER_COMMAND_27] = ov12_0224C678, - [CONTROLLER_COMMAND_HP_CALC] = BattleControllerPlayer_HpCalc, - [CONTROLLER_COMMAND_29] = ov12_0224CAA4, - [CONTROLLER_COMMAND_30] = ov12_0224CC84, - [CONTROLLER_COMMAND_31] = ov12_0224CC88, - [CONTROLLER_COMMAND_32] = ov12_0224CF14, - [CONTROLLER_COMMAND_33] = ov12_0224CF10, - [CONTROLLER_COMMAND_34] = ov12_0224D014, - [CONTROLLER_COMMAND_35] = ov12_0224D03C, - [CONTROLLER_COMMAND_36] = ov12_0224D1DC, - [CONTROLLER_COMMAND_37] = ov12_0224D224, - [CONTROLLER_COMMAND_38] = ov12_0224D238, - [CONTROLLER_COMMAND_39] = ov12_0224D23C, - [CONTROLLER_COMMAND_40] = ov12_0224D368, - [CONTROLLER_COMMAND_41] = ov12_0224D448, - [CONTROLLER_COMMAND_42] = ov12_0224D464, - [CONTROLLER_COMMAND_43] = ov12_0224D4F0, - [CONTROLLER_COMMAND_44] = ov12_0224D504, - [CONTROLLER_COMMAND_45] = ov12_0224D53C + [CONTROLLER_COMMAND_RUN_SCRIPT] = BattleControllerPlayer_RunScript, + [CONTROLLER_COMMAND_23] = ov12_0224C38C, + [CONTROLLER_COMMAND_24] = ov12_0224C4D8, + [CONTROLLER_COMMAND_25] = ov12_0224C5C8, + [CONTROLLER_COMMAND_26] = ov12_0224C5F8, + [CONTROLLER_COMMAND_27] = ov12_0224C678, + [CONTROLLER_COMMAND_HP_CALC] = BattleControllerPlayer_HpCalc, + [CONTROLLER_COMMAND_29] = ov12_0224CAA4, + [CONTROLLER_COMMAND_30] = ov12_0224CC84, + [CONTROLLER_COMMAND_31] = ov12_0224CC88, + [CONTROLLER_COMMAND_32] = ov12_0224CF14, + [CONTROLLER_COMMAND_33] = ov12_0224CF10, + [CONTROLLER_COMMAND_34] = ov12_0224D014, + [CONTROLLER_COMMAND_35] = ov12_0224D03C, + [CONTROLLER_COMMAND_36] = ov12_0224D1DC, + [CONTROLLER_COMMAND_37] = ov12_0224D224, + [CONTROLLER_COMMAND_38] = ov12_0224D238, + [CONTROLLER_COMMAND_39] = ov12_0224D23C, + [CONTROLLER_COMMAND_40] = ov12_0224D368, + [CONTROLLER_COMMAND_41] = ov12_0224D448, + [CONTROLLER_COMMAND_42] = ov12_0224D464, + [CONTROLLER_COMMAND_43] = ov12_0224D4F0, + [CONTROLLER_COMMAND_44] = ov12_0224D504, + [CONTROLLER_COMMAND_45] = ov12_0224D53C }; BattleContext *BattleContext_New(BattleSystem *bsys) { @@ -187,20 +187,20 @@ static void BattleControllerPlayer_GetBattleMon(BattleSystem *bsys, BattleContex BattleSystem_GetBattleMon(bsys, ctx, battlerId, ctx->selectedMonIndex[battlerId]); } - ctx->hpTemp = ctx->battleMons[1].hp; + ctx->hpTemp = ctx->battleMons[1].hp; ctx->command = CONTROLLER_COMMAND_START_ENCOUNTER; } static void BattleControllerPlayer_StartEncounter(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_START_ENCOUNTER); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_TRAINER_MESSAGE; } static void BattleControllerPlayer_TrainerMessage(BattleSystem *bsys, BattleContext *ctx) { if (CheckTrainerMessage(bsys, ctx)) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_TRAINER_MESSAGE); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_SEND_OUT; } else { ctx->command = CONTROLLER_COMMAND_SEND_OUT; @@ -215,7 +215,7 @@ static void BattleControllerPlayer_PokemonAppear(BattleSystem *bsys, BattleConte if (script) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else { SortMonsBySpeed(bsys, ctx); ov12_0223C0C4(bsys); @@ -228,9 +228,9 @@ static void BattleControllerPlayer_SelectionScreenInit(BattleSystem *bsys, Battl int maxBattlers = BattleSystem_GetMaxBattlers(bsys); for (battlerId = 0; battlerId < maxBattlers; battlerId++) { - ctx->unk_0[battlerId] = 0; + ctx->unk_0[battlerId] = 0; ctx->battleMons[battlerId].moveEffectFlagsTemp = ctx->battleMons[battlerId].moveEffectFlags; - ctx->unk_314C[battlerId] = 0; + ctx->unk_314C[battlerId] = 0; } ov12_0223BB64(bsys, 0); @@ -268,7 +268,7 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt BattleMessage msg; battlersMax = BattleSystem_GetMaxBattlers(bsys); - battleType = BattleSystem_GetBattleType(bsys); + battleType = BattleSystem_GetBattleType(bsys); var = 0; @@ -279,12 +279,12 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt break; } if (ctx->switchInFlag & MaskOfFlagNo(battlerId)) { - ctx->unk_0[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_40; break; } else if (Battler_CanSelectAction(ctx, battlerId) == 0) { - ctx->turnData[battlerId].unk0_1 = 1; - ctx->unk_0[battlerId] = SSI_STATE_13; + ctx->turnData[battlerId].unk0_1 = 1; + ctx->unk_0[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_FIGHT_INPUT; break; } @@ -328,41 +328,41 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt if (battleType & BATTLE_TYPE_PAL_PARK) { switch (BattleBuffer_GetNext(ctx, battlerId)) { case 1: - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_4[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_4[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_SAFARI_THROW_BALL; break; case 4: - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_4[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_4[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_RUN_INPUT; break; } } else if (battleType & BATTLE_TYPE_SAFARI) { switch (BattleBuffer_GetNext(ctx, battlerId)) { case 1: - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_4[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_4[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_SAFARI_THROW_BALL; break; case 2: - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_4[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_4[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_SAFARI_THROW_MUD; break; case 3: - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_4[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_4[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_SAFARI_RUN; break; case 4: - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_4[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_4[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_RUN_INPUT; break; case 5: - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_0[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_0[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_SAFARI_WATCHING; break; } @@ -383,8 +383,8 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt ctx->unk_4[battlerId] = SSI_STATE_NO_MOVES; } } else if (ctx->battleMons[battlerId].unk88.encoredMove) { - ctx->movePos[battlerId] = ctx->battleMons[battlerId].unk88.encoredMoveIndex; - ctx->unk_30B4[battlerId] = ctx->battleMons[battlerId].unk88.encoredMove; + ctx->movePos[battlerId] = ctx->battleMons[battlerId].unk88.encoredMoveIndex; + ctx->unk_30B4[battlerId] = ctx->battleMons[battlerId].unk88.encoredMove; ctx->playerActions[battlerId].unk8 = 0; if (BattleSystem_GetBattleSpecial(bsys) & BATTLE_SPECIAL_RECORDING) { @@ -401,32 +401,32 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt break; case BATTLE_INPUT_ITEM: if (BattleSystem_GetBattleType(bsys) & BATTLE_TYPE_BUG_CONTEST) { - ctx->unk_0[battlerId] = SSI_STATE_END; - ctx->unk_4[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_END; + ctx->unk_4[battlerId] = SSI_STATE_13; ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_CATCHING_CONSTEST_THROW_BALL; } else if (BattleSystem_GetBattleType(bsys) & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER)) { - msg.id = msg_0197_00593; // Items can't be used here + msg.id = msg_0197_00593; // Items can't be used here msg.tag = TAG_NONE; ov12_022639B8(bsys, battlerId, msg); ctx->unk_0[battlerId] = SSI_STATE_15; ctx->unk_4[battlerId] = SSI_STATE_SELECT_COMMAND_INIT; } else { ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_ITEM_INPUT; - ctx->unk_0[battlerId] = 7; + ctx->unk_0[battlerId] = 7; } break; case BATTLE_INPUT_POKEMON: ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_POKEMON_INPUT; - ctx->unk_0[battlerId] = SSI_STATE_9; + ctx->unk_0[battlerId] = SSI_STATE_9; break; case BATTLE_INPUT_RUN: ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_RUN_INPUT; - ctx->unk_0[battlerId] = SSI_STATE_11; + ctx->unk_0[battlerId] = SSI_STATE_11; break; case BATTLE_INPUT_CANCEL: if (battleType & BATTLE_TYPE_LINK) { ov12_02263CCC(bsys, battlerId); - ctx->unk_0[battlerId] = SSI_STATE_SELECT_COMMAND_INIT; + ctx->unk_0[battlerId] = SSI_STATE_SELECT_COMMAND_INIT; ctx->unk_0[BattleSystem_GetBattlerIdPartner(bsys, battlerId)] = 0; } else if ((battleType & BATTLE_TYPE_DOUBLES) && (battlerId == BATTLER_PLAYER2)) { ov12_02263CCC(bsys, battlerId); @@ -448,7 +448,7 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt } else if (BattleBuffer_GetNext(ctx, battlerId)) { if ((ctx->battleBuffer[battlerId][0] - 1) == BATTLE_INPUT_RUN) { ctx->playerActions[battlerId].command = CONTROLLER_COMMAND_RUN_INPUT; - ctx->unk_0[battlerId] = SSI_STATE_11; + ctx->unk_0[battlerId] = SSI_STATE_11; break; } else if (ov12_02251A28(bsys, ctx, battlerId, ctx->battleBuffer[battlerId][0] - 1, &msg) == 0) { if (BattleSystem_GetBattleSpecial(bsys) & BATTLE_SPECIAL_RECORDING) { @@ -461,9 +461,9 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt } } else { ctx->playerActions[battlerId].unk8 = ctx->battleBuffer[battlerId][0]; - ctx->movePos[battlerId] = ctx->battleBuffer[battlerId][0] - 1; - ctx->unk_30B4[battlerId] = ctx->battleMons[battlerId].moves[ctx->movePos[battlerId]]; - ctx->unk_0[battlerId] = SSI_STATE_5; + ctx->movePos[battlerId] = ctx->battleBuffer[battlerId][0] - 1; + ctx->unk_30B4[battlerId] = ctx->battleMons[battlerId].moves[ctx->movePos[battlerId]]; + ctx->unk_0[battlerId] = SSI_STATE_5; ctx->unk_314C[battlerId] |= 0x2; } } @@ -484,7 +484,7 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt ctx->unk_0[battlerId] = SSI_STATE_3; } else if (BattleBuffer_GetNext(ctx, battlerId)) { ctx->playerActions[battlerId].unk4 = ctx->battleBuffer[battlerId][0] - 1; - ctx->unk_0[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_13; ctx->unk_314C[battlerId] |= 0x4; } @@ -498,9 +498,9 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt } else if (BattleBuffer_GetNext(ctx, battlerId)) { u32 *unkPtr; - unkPtr = (u32 *)&ctx->battleBuffer[battlerId][0]; + unkPtr = (u32 *)&ctx->battleBuffer[battlerId][0]; ctx->playerActions[battlerId].unk8 = unkPtr[0]; - ctx->unk_0[battlerId] = SSI_STATE_13; + ctx->unk_0[battlerId] = SSI_STATE_13; } break; case SSI_STATE_9: // switching..? @@ -528,8 +528,8 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt ctx->unk_0[battlerId] = SSI_STATE_SELECT_COMMAND_INIT; } else if (BattleBuffer_GetNext(ctx, battlerId)) { ctx->playerActions[battlerId].unk8 = ctx->battleBuffer[battlerId][0] - 1; - ctx->unk_21A0[battlerId] = ctx->battleBuffer[battlerId][0] - 1; - ctx->unk_0[battlerId] = SSI_STATE_13; + ctx->unk_21A0[battlerId] = ctx->battleBuffer[battlerId][0] - 1; + ctx->unk_0[battlerId] = SSI_STATE_13; } break; case SSI_STATE_11: // Flee after a mon fainted..? @@ -542,7 +542,7 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt BattleController_TryEmitExitRecording(bsys, BattleSystem_GetBattleContext(bsys)); } else { msg.tag = TAG_NONE; - msg.id = msg_0197_00793; // There's no running from a Trainer battle! + msg.id = msg_0197_00793; // There's no running from a Trainer battle! ov12_022639B8(bsys, battlerId, msg); ctx->unk_0[battlerId] = SSI_STATE_15; ctx->unk_4[battlerId] = SSI_STATE_SELECT_COMMAND_INIT; @@ -603,8 +603,8 @@ static void BattleControllerPlayer_SelectionScreenInput(BattleSystem *bsys, Batt } break; case SSI_STATE_NO_MOVES: - msg.tag = TAG_NICKNAME; - msg.id = msg_0197_00608; // Spheal has no moves left! + msg.tag = TAG_NICKNAME; + msg.id = msg_0197_00608; // Spheal has no moves left! msg.param[0] = CreateNicknameTag(ctx, battlerId); ov12_022639B8(bsys, battlerId, msg); ctx->unk_0[battlerId] = SSI_STATE_15; @@ -640,7 +640,7 @@ static void BattleControllerPlayer_CalcExecutionOrder(BattleSystem *bsys, Battle u32 flag; maxBattlers = BattleSystem_GetMaxBattlers(bsys); - battleType = BattleSystem_GetBattleType(bsys); + battleType = BattleSystem_GetBattleType(bsys); turn = 0; @@ -659,16 +659,16 @@ static void BattleControllerPlayer_CalcExecutionOrder(BattleSystem *bsys, Battle } else { if (ctx->playerActions[BATTLER_PLAYER].inputSelection == BATTLE_INPUT_RUN) { battlerId = BATTLER_PLAYER; - turn = 5; + turn = 5; } if (ctx->playerActions[BATTLER_PLAYER2].inputSelection == BATTLE_INPUT_RUN) { battlerId = BATTLER_PLAYER2; - turn = 5; + turn = 5; } } if (turn == 5) { ctx->executionOrder[0] = battlerId; - turn = 1; + turn = 1; for (i = 0; i < maxBattlers; i++) { if (i != battlerId) { ctx->executionOrder[turn] = i; @@ -742,7 +742,7 @@ static void BattleControllerPlayer_BeforeTurn(BattleSystem *bsys, BattleContext ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_TIGHTEN_FOCUS); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -765,7 +765,7 @@ static void BattleControllerPlayer_BeforeTurn(BattleSystem *bsys, BattleContext break; case BT_STATE_END: ctx->stateBeforeTurn = BT_STATE_FOCUS_PUNCH; - flag = 2; + flag = 2; break; } } while (flag == 0); @@ -795,7 +795,7 @@ static void ov12_02249460(BattleSystem *bsys, BattleContext *ctx) { if (ctx->executionIndex == maxBattlers) { ctx->executionIndex = 0; - ctx->command = CONTROLLER_COMMAND_UPDATE_FIELD_CONDITION; + ctx->command = CONTROLLER_COMMAND_UPDATE_FIELD_CONDITION; } else { ctx->command = ctx->playerActions[ctx->executionOrder[ctx->executionIndex]].command; } @@ -843,10 +843,10 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_REFLECT; ctx->moveTemp = MOVE_REFLECT; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_EFFECT_END); - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->battlerIdTemp = ov12_02257E98(bsys, ctx, side); - flag = 1; + flag = 1; } } ctx->fieldConditionUpdateData++; @@ -867,10 +867,10 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_LIGHT_SCREEN; ctx->moveTemp = MOVE_LIGHT_SCREEN; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_EFFECT_END); - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->battlerIdTemp = ov12_02257E98(bsys, ctx, side); - flag = 1; + flag = 1; } } ctx->fieldConditionUpdateData++; @@ -891,10 +891,10 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_MIST; ctx->moveTemp = MOVE_MIST; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_EFFECT_END); - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->battlerIdTemp = ov12_02257E98(bsys, ctx, side); - flag = 1; + flag = 1; } } ctx->fieldConditionUpdateData++; @@ -915,10 +915,10 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt ctx->fieldSideConditionFlags[side] &= ~SIDE_CONDITION_SAFEGUARD; ctx->battlerIdTemp = ctx->fieldSideConditionData[side].safeguardBattler; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_SAFEGUARD_END); - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->battlerIdTemp = ov12_02257E98(bsys, ctx, side); - flag = 1; + flag = 1; } } ctx->fieldConditionUpdateData++; @@ -938,10 +938,10 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt ctx->fieldSideConditionFlags[side] -= 1 << SIDE_CONDITION_TAILWIND_SHIFT; if ((ctx->fieldSideConditionFlags[side] & SIDE_CONDITION_TAILWIND) == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_TAILWIND_END); - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->battlerIdTemp = ov12_02257E98(bsys, ctx, side); - flag = 1; + flag = 1; } } ctx->fieldConditionUpdateData++; @@ -961,10 +961,10 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt ctx->fieldSideConditionFlags[side] -= 1 << SIDE_CONDITION_LUCKY_CHANT_SHIFT; if ((ctx->fieldSideConditionFlags[side] & SIDE_CONDITION_LUCKY_CHANT) == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_LUCKY_CHANT_END); - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->battlerIdTemp = ov12_02257E98(bsys, ctx, side); - flag = 1; + flag = 1; } } ctx->fieldConditionUpdateData++; @@ -982,15 +982,15 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt side = ctx->turnOrder[ctx->fieldConditionUpdateData]; if (ctx->fieldConditionData.wishTurns[side]) { if (--ctx->fieldConditionData.wishTurns[side] == 0 && ctx->battleMons[side].hp != 0) { - ctx->battlerIdTemp = side; - ctx->buffMsg.tag = TAG_NICKNAME; - ctx->buffMsg.id = msg_0197_00533; // Spheal's wish came true! + ctx->battlerIdTemp = side; + ctx->buffMsg.tag = TAG_NICKNAME; + ctx->buffMsg.id = msg_0197_00533; // Spheal's wish came true! ctx->buffMsg.param[0] = side | (ctx->fieldConditionData.wishTarget[side] << 8); - ctx->hpCalc = DamageDivide(ctx->battleMons[side].maxHp, 2); + ctx->hpCalc = DamageDivide(ctx->battleMons[side].maxHp, 2); ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WISH_HEAL); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->fieldConditionUpdateData++; @@ -1006,108 +1006,108 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt case UFC_STATE_RAIN: if (ctx->fieldCondition & FIELD_CONDITION_RAIN_ALL) { if (ctx->fieldCondition & FIELD_CONDITION_RAIN_PERMANENT) { - ctx->buffMsg.id = msg_0197_00801; // Rain continues to fall. + ctx->buffMsg.id = msg_0197_00801; // Rain continues to fall. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else if (--ctx->fieldConditionData.weatherTurns == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_RAINING_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else { - ctx->buffMsg.id = msg_0197_00801; // Rain continues to fall. + ctx->buffMsg.id = msg_0197_00801; // Rain continues to fall. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } ctx->tempData = 19; - flag = 1; + flag = 1; } ctx->stateFieldConditionUpdate++; break; case UFC_STATE_SANDSTORM: if (ctx->fieldCondition & FIELD_CONDITION_SANDSTORM_ALL) { if (ctx->fieldCondition & FIELD_CONDITION_SANDSTORM_PERMANENT) { - ctx->buffMsg.id = msg_0197_00805; // The sandstorm rages. + ctx->buffMsg.id = msg_0197_00805; // The sandstorm rages. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else if (--ctx->fieldConditionData.weatherTurns == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_SANDSTORM_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else { - ctx->buffMsg.id = msg_0197_00805; // The sandstorm rages. + ctx->buffMsg.id = msg_0197_00805; // The sandstorm rages. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } ctx->tempData = 21; - flag = 1; + flag = 1; } ctx->stateFieldConditionUpdate++; break; case UFC_STATE_SUN: if (ctx->fieldCondition & FIELD_CONDITION_SUN_ALL) { if (ctx->fieldCondition & FIELD_CONDITION_SUN_PERMANENT) { - ctx->buffMsg.id = msg_0197_00808; // The sunlight is strong. + ctx->buffMsg.id = msg_0197_00808; // The sunlight is strong. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else if (--ctx->fieldConditionData.weatherTurns == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_SUNNY_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else { - ctx->buffMsg.id = msg_0197_00808; // The sunlight is strong. + ctx->buffMsg.id = msg_0197_00808; // The sunlight is strong. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } ctx->tempData = 22; - flag = 1; + flag = 1; } ctx->stateFieldConditionUpdate++; break; case UFC_STATE_HAIL: if (ctx->fieldCondition & FIELD_CONDITION_HAIL_ALL) { if (ctx->fieldCondition & FIELD_CONDITION_HAIL_PERMANENT) { - ctx->buffMsg.id = msg_0197_00811; // Hail continues to fall. + ctx->buffMsg.id = msg_0197_00811; // Hail continues to fall. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else if (--ctx->fieldConditionData.weatherTurns == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_HAILING_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } else { - ctx->buffMsg.id = msg_0197_00811; // Hail continues to fall. + ctx->buffMsg.id = msg_0197_00811; // Hail continues to fall. ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } ctx->tempData = 20; - flag = 1; + flag = 1; } ctx->stateFieldConditionUpdate++; break; case UFC_STATE_FOG: if (ctx->fieldCondition & FIELD_CONDITION_FOG) { - ctx->buffMsg.id = msg_0197_00813; // The fog is deep... + ctx->buffMsg.id = msg_0197_00813; // The fog is deep... ctx->buffMsg.tag = TAG_NONE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WEATHER_CONTINUES); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->tempData = 18; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->tempData = 18; + flag = 1; } ctx->stateFieldConditionUpdate++; break; @@ -1117,8 +1117,8 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt if ((ctx->fieldCondition & FIELD_CONDITION_GRAVITY) == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_GRAVITY_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateFieldConditionUpdate++; @@ -1135,7 +1135,7 @@ static void BattleControllerPlayer_UpdateFieldCondition(BattleSystem *bsys, Batt if (flag == 2) { ctx->stateFieldConditionUpdate = 0; - ctx->command = CONTROLLER_COMMAND_UPDATE_MON_CONDITION; + ctx->command = CONTROLLER_COMMAND_UPDATE_MON_CONDITION; } } @@ -1206,8 +1206,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_INGRAIN_HEAL); } ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1218,13 +1218,13 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_CANNOT_HEAL); } else { ctx->battlerIdTemp = battlerId; - ctx->moveTemp = MOVE_AQUA_RING; - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, 16); + ctx->moveTemp = MOVE_AQUA_RING; + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, 16); ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_AQUA_RING_HEAL); } ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1249,29 +1249,29 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle case UMC_STATE_LEECH_SEED: if ((ctx->battleMons[battlerId].moveEffectFlags & MOVE_EFFECT_FLAG_LEECH_SEED) && ctx->battleMons[ctx->battleMons[battlerId].moveEffectFlags & MOVE_EFFECT_FLAG_LEECH_SEED_BATTLER].hp != 0 && GetBattlerAbility(ctx, battlerId) != ABILITY_MAGIC_GUARD && ctx->battleMons[battlerId].hp != 0) { ctx->battlerIdLeechSeedRecv = ctx->battleMons[battlerId].moveEffectFlags & MOVE_EFFECT_FLAG_LEECH_SEED_BATTLER; - ctx->battlerIdLeechSeeded = battlerId; + ctx->battlerIdLeechSeeded = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_LEECH_SEED_EFFECT); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; case UMC_STATE_POISON: if ((ctx->battleMons[battlerId].status & STATUS_POISON) && ctx->battleMons[battlerId].hp != 0) { ctx->battlerIdTemp = battlerId; - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 8); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 8); ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_POISON_DAMAGE); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; case UMC_STATE_BAD_POISON: if ((ctx->battleMons[battlerId].status & STATUS_BAD_POISON) && ctx->battleMons[battlerId].hp != 0) { ctx->battlerIdTemp = battlerId; - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, 16); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, 16); if ((ctx->battleMons[battlerId].status & STATUS_POISON_COUNT) != STATUS_POISON_COUNT) { ctx->battleMons[battlerId].status += 1 << STATUS_POISON_COUNT_SHIFT; } @@ -1279,8 +1279,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->hpCalc *= -1; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_POISON_DAMAGE); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1289,8 +1289,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BURN_DAMAGE); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1300,8 +1300,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_NIGHTMARE_EFFECT); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } else { ctx->battleMons[battlerId].status2 &= ~STATUS2_NIGHTMARE; } @@ -1313,8 +1313,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_CURSE_DAMAGE); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1327,11 +1327,11 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle } else { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BIND_END); } - ctx->moveTemp = ctx->battleMons[battlerId].unk88.bindingMove; + ctx->moveTemp = ctx->battleMons[battlerId].unk88.bindingMove; ctx->battlerIdTemp = battlerId; - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1342,9 +1342,9 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BAD_DREAMS); ctx->battleStatus |= BATTLE_STATUS_NO_BLINK; ctx->battlerIdTemp = battlerId; - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1356,7 +1356,7 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerIdSleep; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WAKE_UP); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; break; } } @@ -1379,8 +1379,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, i); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } if (flag != 2) { ctx->stateUpdateMonCondition++; @@ -1395,8 +1395,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdStatChange = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_THRASH_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1415,11 +1415,11 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battleMons[battlerId].unk88.disabledTurns--; } else { ctx->battleMons[battlerId].unk88.disabledMove = 0; - ctx->battlerIdTemp = battlerId; + ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_DISABLE_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1438,11 +1438,11 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battleMons[battlerId].unk88.encoredTurns--; } else { ctx->battleMons[battlerId].unk88.encoredMove = 0; - ctx->battlerIdTemp = battlerId; + ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_ENCORE_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1468,8 +1468,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_TAUNT_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1480,8 +1480,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MAGNET_RISE_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1492,8 +1492,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_HEAL_BLOCK_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1504,8 +1504,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_EMBARGO_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1515,11 +1515,11 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battleMons[battlerId].moveEffectFlags -= 1 << MOVE_EFFECT_FLAG_YAWN_SHIFT; if ((ctx->battleMons[battlerId].moveEffectFlags & MOVE_EFFECT_FLAG_YAWN) == 0) { ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 4; + ctx->statChangeType = 4; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_FALL_ASLEEP); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } } ctx->stateUpdateMonCondition++; @@ -1531,8 +1531,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->stateUpdateMonCondition++; break; @@ -1554,8 +1554,8 @@ static void BattleControllerPlayer_UpdateMonCondition(BattleSystem *bsys, Battle } } ctx->stateUpdateMonCondition = 0; - ctx->updateMonConditionData = 0; - ctx->command = CONTROLLER_COMMAND_UPDATE_FIELD_CONDITION_EXTRA; + ctx->updateMonConditionData = 0; + ctx->command = CONTROLLER_COMMAND_UPDATE_FIELD_CONDITION_EXTRA; } typedef enum UpdateFieldConditionExtraState { @@ -1589,17 +1589,17 @@ static void BattleControllerPlayer_UpdateFieldConditionExtra(BattleSystem *bsys, if (ctx->fieldConditionData.futureSightTurns[battlerId]) { if (!(--ctx->fieldConditionData.futureSightTurns[battlerId]) && ctx->battleMons[battlerId].hp != 0) { ctx->fieldSideConditionFlags[BattleSystem_GetFieldSide(bsys, battlerId)] &= ~SIDE_CONDITION_FUTURE_SIGHT; - ctx->buffMsg.id = msg_0197_00475; // Seadra took the Doom Desire attack! - ctx->buffMsg.tag = TAG_NICKNAME_MOVE; - ctx->buffMsg.param[0] = CreateNicknameTag(ctx, battlerId); - ctx->buffMsg.param[1] = ctx->fieldConditionData.futureSightMoveNo[battlerId]; - ctx->battlerIdTemp = battlerId; + ctx->buffMsg.id = msg_0197_00475; // Seadra took the Doom Desire attack! + ctx->buffMsg.tag = TAG_NICKNAME_MOVE; + ctx->buffMsg.param[0] = CreateNicknameTag(ctx, battlerId); + ctx->buffMsg.param[1] = ctx->fieldConditionData.futureSightMoveNo[battlerId]; + ctx->battlerIdTemp = battlerId; ctx->battlerIdLeechSeedRecv = ctx->fieldConditionData.battlerIdFutureSight[battlerId]; - ctx->moveTemp = ctx->fieldConditionData.futureSightMoveNo[battlerId]; - ctx->hpCalc = ctx->fieldConditionData.futureSightDamage[battlerId]; + ctx->moveTemp = ctx->fieldConditionData.futureSightMoveNo[battlerId]; + ctx->hpCalc = ctx->fieldConditionData.futureSightDamage[battlerId]; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 121); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -1618,7 +1618,7 @@ static void BattleControllerPlayer_UpdateFieldConditionExtra(BattleSystem *bsys, if (ctx->battleMons[battlerId].unk88.perishSongTurns == 0) { ctx->battleMons[battlerId].moveEffectFlags &= ~MOVE_EFFECT_FLAG_PERISH_SONG; ctx->msgTemp = ctx->battleMons[battlerId].unk88.perishSongTurns; - ctx->hpCalc = ctx->battleMons[battlerId].hp * -1; + ctx->hpCalc = ctx->battleMons[battlerId].hp * -1; ctx->battleStatus |= BATTLE_STATUS_NO_BLINK; } else { ctx->msgTemp = ctx->battleMons[battlerId].unk88.perishSongTurns; @@ -1627,7 +1627,7 @@ static void BattleControllerPlayer_UpdateFieldConditionExtra(BattleSystem *bsys, ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 102); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -1639,7 +1639,7 @@ static void BattleControllerPlayer_UpdateFieldConditionExtra(BattleSystem *bsys, if (!(ctx->fieldCondition & FIELD_CONDITION_TRICK_ROOM)) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 251); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -1650,8 +1650,8 @@ static void BattleControllerPlayer_UpdateFieldConditionExtra(BattleSystem *bsys, break; } ctx->stateUpdateFieldConditionExtra = 0; - ctx->updateFieldConditionExtraData = 0; - ctx->command = CONTROLLER_COMMAND_TURN_END; + ctx->updateFieldConditionExtraData = 0; + ctx->command = CONTROLLER_COMMAND_TURN_END; } static void BattleControllerPlayer_TurnEnd(BattleSystem *bsys, BattleContext *ctx) { @@ -1682,26 +1682,26 @@ static void BattleControllerPlayer_FightInput(BattleSystem *bsys, BattleContext if (ctx->turnData[ctx->battlerIdAttacker].struggleFlag) { ctx->moveNoTemp = MOVE_STRUGGLE; - flag = 1; + flag = 1; } else if (ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMove && ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMove == ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMoveIndex]) { ctx->moveNoTemp = ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMove; - flag = 1; + flag = 1; } else if (ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMove && ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMove != ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMoveIndex]) { - ctx->moveNoTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMoveIndex]; - ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMove = 0; + ctx->moveNoTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMoveIndex]; + ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMove = 0; ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredMoveIndex = 0; - ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredTurns = 0; - flag = 1; + ctx->battleMons[ctx->battlerIdAttacker].unk88.encoredTurns = 0; + flag = 1; } else if (!Battler_CanSelectAction(ctx, ctx->battlerIdAttacker)) { ctx->moveNoTemp = ctx->moveNoLockedInto[ctx->battlerIdAttacker]; } else if (ctx->unk_30B4[ctx->battlerIdAttacker] != ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->movePos[ctx->battlerIdAttacker]]) { ctx->moveNoTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->movePos[ctx->battlerIdAttacker]]; - flag = 1; + flag = 1; } else { ctx->moveNoTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->movePos[ctx->battlerIdAttacker]]; } - ctx->moveNoCur = ctx->moveNoTemp; - ctx->command = CONTROLLER_COMMAND_23; + ctx->moveNoCur = ctx->moveNoTemp; + ctx->command = CONTROLLER_COMMAND_23; ctx->battlerIdTarget = ov12_022506D4(bsys, ctx, ctx->battlerIdAttacker, ctx->moveNoTemp, flag, 0); BattleController_EmitBlankMessage(bsys); } @@ -1710,8 +1710,8 @@ static void BattleControllerPlayer_ItemInput(BattleSystem *bsys, BattleContext * BattleItem *item; int script; ctx->battlerIdAttacker = ctx->executionOrder[ctx->executionIndex]; - ctx->battlerIdTarget = Battler_GetRandomOpposingBattlerId(bsys, ctx, ctx->battlerIdAttacker); - item = (BattleItem *)&ctx->playerActions[ctx->battlerIdAttacker].unk8; + ctx->battlerIdTarget = Battler_GetRandomOpposingBattlerId(bsys, ctx, ctx->battlerIdAttacker); + item = (BattleItem *)&ctx->playerActions[ctx->battlerIdAttacker].unk8; if (BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker)) { switch (ctx->trainerAIData.useItem[ctx->battlerIdAttacker >> 1]) { @@ -1731,7 +1731,7 @@ static void BattleControllerPlayer_ItemInput(BattleSystem *bsys, BattleContext * break; case 3: ctx->msgTemp = ctx->trainerAIData.unk9F[ctx->battlerIdAttacker >> 1]; - script = BATTLE_SUBSCRIPT_USE_STAT_BOOSTER; + script = BATTLE_SUBSCRIPT_USE_STAT_BOOSTER; break; case 4: script = BATTLE_SUBSCRIPT_USE_GUARD_SPEC; @@ -1761,7 +1761,7 @@ static void BattleControllerPlayer_ItemInput(BattleSystem *bsys, BattleContext * } ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_40; ctx->moveStatusFlag |= MOVE_STATUS_NO_MORE_WORK; } @@ -1769,10 +1769,10 @@ static void BattleControllerPlayer_ItemInput(BattleSystem *bsys, BattleContext * static void BattleControllerPlayer_PokemonInput(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 9); ctx->battlerIdAttacker = ctx->executionOrder[ctx->executionIndex]; - ctx->battlerIdSwitch = ctx->battlerIdAttacker; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->commandNext = CONTROLLER_COMMAND_41; - ctx->tempData = 0; + ctx->battlerIdSwitch = ctx->battlerIdAttacker; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = CONTROLLER_COMMAND_41; + ctx->tempData = 0; ctx->moveStatusFlag |= MOVE_STATUS_NO_MORE_WORK; } @@ -1783,24 +1783,24 @@ static void BattleControllerPlayer_RunInput(BattleSystem *bsys, BattleContext *c if (ctx->battleMons[ctx->battlerIdAttacker].status2 & (STATUS2_BIND | STATUS2_MEAN_LOOK)) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 286); ctx->scriptSeqNo = 0; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_40; } else { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 230); ctx->scriptSeqNo = 0; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_44; } } else { if (BattleTryRun(bsys, ctx, ctx->battlerIdAttacker)) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 3); ctx->scriptSeqNo = 0; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_44; } else { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 8); ctx->scriptSeqNo = 0; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_40; } } @@ -1811,11 +1811,11 @@ static void BattleControllerPlayer_SafariThrowBall(BattleSystem *bsys, BattleCon ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 275); ctx->battlerIdAttacker = BATTLER_PLAYER; - ctx->battlerIdTarget = BATTLER_ENEMY; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->commandNext = CONTROLLER_COMMAND_40; - ctx->itemTemp = ITEM_SAFARI_BALL; - cnt = BattleSystem_GetSafariBallCount(bsys) - 1; + ctx->battlerIdTarget = BATTLER_ENEMY; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = CONTROLLER_COMMAND_40; + ctx->itemTemp = ITEM_SAFARI_BALL; + cnt = BattleSystem_GetSafariBallCount(bsys) - 1; BattleSystem_SetSafariBallCount(bsys, cnt); ov12_02263A1C(bsys, ctx, BATTLER_PLAYER); } @@ -1823,10 +1823,10 @@ static void BattleControllerPlayer_SafariThrowBall(BattleSystem *bsys, BattleCon static void BattleControllerPlayer_SafariThrowMud(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 227); ctx->battlerIdAttacker = 0; - ctx->battlerIdTarget = 1; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->commandNext = CONTROLLER_COMMAND_40; - ctx->tempData = BattleSystem_Random(bsys) % 10; + ctx->battlerIdTarget = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = CONTROLLER_COMMAND_40; + ctx->tempData = BattleSystem_Random(bsys) % 10; if (ctx->safariRunAttempts > 0) { ctx->safariRunAttempts--; } @@ -1841,10 +1841,10 @@ static void BattleControllerPlayer_SafariThrowMud(BattleSystem *bsys, BattleCont static void BattleControllerPlayer_SafariRun(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 228); ctx->battlerIdAttacker = 0; - ctx->battlerIdTarget = 1; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->commandNext = CONTROLLER_COMMAND_40; - ctx->tempData = BattleSystem_Random(bsys) % 10; + ctx->battlerIdTarget = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = CONTROLLER_COMMAND_40; + ctx->tempData = BattleSystem_Random(bsys) % 10; if (ctx->unk_311C < 12) { ctx->unk_311C++; } @@ -1856,9 +1856,9 @@ static void BattleControllerPlayer_SafariRun(BattleSystem *bsys, BattleContext * static void BattleControllerPlayer_SafariWatching(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_SAFARI_ESCAPE); ctx->battlerIdAttacker = 0; - ctx->battlerIdTarget = 1; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->commandNext = CONTROLLER_COMMAND_40; + ctx->battlerIdTarget = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = CONTROLLER_COMMAND_40; } static void BattleControllerPlayer_CatchingContestThrowBall(BattleSystem *bsys, BattleContext *ctx) { @@ -1866,11 +1866,11 @@ static void BattleControllerPlayer_CatchingContestThrowBall(BattleSystem *bsys, ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_THROW_POKEBALL); ctx->battlerIdAttacker = BATTLER_PLAYER; - ctx->battlerIdTarget = BATTLER_ENEMY; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->commandNext = CONTROLLER_COMMAND_40; - ctx->itemTemp = ITEM_SPORT_BALL; - cnt = BattleSystem_GetSafariBallCount(bsys) - 1; + ctx->battlerIdTarget = BATTLER_ENEMY; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = CONTROLLER_COMMAND_40; + ctx->itemTemp = ITEM_SPORT_BALL; + cnt = BattleSystem_GetSafariBallCount(bsys) - 1; BattleSystem_SetSafariBallCount(bsys, cnt); ctx->moveStatusFlag |= MOVE_STATUS_NO_MORE_WORK; } @@ -1882,7 +1882,7 @@ static u32 TryDisobedience(BattleSystem *bsys, BattleContext *ctx, int *script) PlayerProfile *profile; battleType = BattleSystem_GetBattleType(bsys); - profile = BattleSystem_GetPlayerProfile(bsys, 0); + profile = BattleSystem_GetPlayerProfile(bsys, 0); if (battleType & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER)) { return 0; @@ -1964,9 +1964,9 @@ static u32 TryDisobedience(BattleSystem *bsys, BattleContext *ctx, int *script) } while (MaskOfFlagNo(struggleRnd) & rnd); ctx->movePos[ctx->battlerIdAttacker] = struggleRnd; - ctx->moveNoTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->movePos[ctx->battlerIdAttacker]]; - ctx->moveNoCur = ctx->moveNoTemp; - ctx->battlerIdTarget = ov12_022506D4(bsys, ctx, ctx->battlerIdAttacker, ctx->moveNoTemp, 1, 0); + ctx->moveNoTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[ctx->movePos[ctx->battlerIdAttacker]]; + ctx->moveNoCur = ctx->moveNoTemp; + ctx->battlerIdTarget = ov12_022506D4(bsys, ctx, ctx->battlerIdAttacker, ctx->moveNoTemp, 1, 0); if (ctx->battlerIdTarget == BATTLER_NONE) { ctx->playerActions[ctx->battlerIdAttacker].unk4 = Battler_GetRandomOpposingBattlerId(bsys, ctx, ctx->battlerIdAttacker); @@ -1981,7 +1981,7 @@ static u32 TryDisobedience(BattleSystem *bsys, BattleContext *ctx, int *script) } level = ctx->battleMons[ctx->battlerIdAttacker].level - level; - rnd = BattleSystem_Random(bsys) & 0xFF; + rnd = BattleSystem_Random(bsys) & 0xFF; // take a nap if (rnd < level && !(ctx->battleMons[ctx->battlerIdAttacker].status & STATUS_ALL) && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_VITAL_SPIRIT && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_INSOMNIA && !(ctx->fieldCondition & FIELD_CONDITION_UPROAR)) { @@ -1994,9 +1994,9 @@ static u32 TryDisobedience(BattleSystem *bsys, BattleContext *ctx, int *script) // hitting itself if (rnd < level) { ctx->battlerIdTarget = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - ctx->hpCalc = CalcMoveDamage(bsys, ctx, MOVE_POUND, 0, 0, 40, 0, ctx->battlerIdAttacker, ctx->battlerIdAttacker, 1); - ctx->hpCalc = ApplyDamageRange(bsys, ctx, ctx->hpCalc); + ctx->battlerIdTemp = ctx->battlerIdTarget; + ctx->hpCalc = CalcMoveDamage(bsys, ctx, MOVE_POUND, 0, 0, 40, 0, ctx->battlerIdAttacker, ctx->battlerIdAttacker, 1); + ctx->hpCalc = ApplyDamageRange(bsys, ctx, ctx->hpCalc); ctx->hpCalc *= -1; *script = BATTLE_SUBSCRIPT_DISOBEY_HIT_SELF; ctx->battleStatus |= 2; @@ -2066,15 +2066,15 @@ BOOL ov12_0224B1FC(BattleSystem *bsys, BattleContext *ctx) { } static BOOL ov12_0224B398(BattleSystem *bsys, BattleContext *ctx) { - BOOL ret = FALSE; + BOOL ret = FALSE; BOOL quickChargeFlag = FALSE; // only for solar beam this gen if ((ctx->battlerIdTarget == BATTLER_NONE && !BattleCtx_IsIdenticalToCurrentMove(ctx, ctx->moveNoCur)) || (ctx->battlerIdTarget == BATTLER_NONE && BattleCtx_IsIdenticalToCurrentMove(ctx, ctx->moveNoCur) == TRUE && (ctx->battleMons[ctx->battlerIdAttacker].status2 & STATUS2_LOCKED_INTO_MOVE || ctx->battleStatus & BATTLE_STATUS_CHARGE_MOVE_HIT))) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_NO_TARGET); ctx->commandNext = CONTROLLER_COMMAND_39; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = TRUE; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = TRUE; } if (!CheckAbilityActive(bsys, ctx, CHECK_ABILITY_ALL_HP, 0, ABILITY_CLOUD_NINE) && !CheckAbilityActive(bsys, ctx, CHECK_ABILITY_ALL_HP, 0, ABILITY_AIR_LOCK) && ctx->trainerAIData.moveData[ctx->moveNoCur].effect == MOVE_EFFECT_151 && ctx->fieldCondition & FIELD_CONDITION_SUN_ALL) { @@ -2100,7 +2100,7 @@ static BOOL ov12_0224B498(BattleSystem *bsys, BattleContext *ctx) { static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { int effect = ctx->trainerAIData.moveData[ctx->moveNoCur].effect; - int ret = 0; + int ret = 0; do { switch (ctx->unk_50) { @@ -2115,8 +2115,8 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { ctx->battlerIdTemp = ctx->battlerIdAttacker; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WAKE_UP); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } else if ((ctx->moveNoCur != MOVE_SLEEP_TALK && ctx->moveNoTemp == MOVE_SLEEP_TALK) == 0) { int sleepCounterDecrease; @@ -2134,16 +2134,16 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdAttacker].status & STATUS_SLEEP) { if (ctx->moveNoCur != MOVE_SNORE && ctx->moveNoTemp != MOVE_SLEEP_TALK) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_SLEEPING); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 2; + ret = 2; } } else { ctx->battlerIdTemp = ctx->battlerIdAttacker; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_WAKE_UP); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } } } @@ -2154,16 +2154,16 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (BattleSystem_Random(bsys) % 5 != 0) { if (effect != MOVE_EFFECT_THAW_AND_BURN_HIT && effect != MOVE_EFFECT_RECOIL_BURN_HIT) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_FROZEN); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } } else { ctx->battlerIdTemp = ctx->battlerIdAttacker; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_THAW_OUT); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } } ctx->unk_50++; @@ -2171,9 +2171,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { case 3: if (CheckTruant(ctx, ctx->battlerIdAttacker) == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_LOAFING_AROUND); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2181,9 +2181,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdAttacker].status2 & STATUS2_RECHARGE) { ctx->battleMons[ctx->battlerIdAttacker].status2 &= ~STATUS2_RECHARGE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_RECHARGING); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2192,9 +2192,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { ctx->battleMons[ctx->battlerIdAttacker].status2 &= ~STATUS2_FLINCH; ctx->moveFail[ctx->battlerIdAttacker].flinch = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_FLINCHED); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2202,9 +2202,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdAttacker].unk88.disabledMove == ctx->moveNoTemp) { ctx->moveFail[ctx->battlerIdAttacker].disabled = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_IS_DISABLED); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2212,9 +2212,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdAttacker].unk88.tauntTurns && ctx->trainerAIData.moveData[ctx->moveNoCur].power == 0) { ctx->moveFail[ctx->battlerIdAttacker].unk0_5 = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_FAIL_TAUNTED); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2222,9 +2222,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (BattleContext_CheckMoveImprisoned(bsys, ctx, ctx->battlerIdAttacker, ctx->moveNoCur)) { ctx->moveFail[ctx->battlerIdAttacker].imprison = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_IS_IMPRISONED); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2232,9 +2232,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (BattleContext_CheckMoveUnuseableInGravity(bsys, ctx, ctx->battlerIdAttacker, ctx->moveNoCur)) { ctx->moveFail[ctx->battlerIdAttacker].gravity = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_FAIL_GRAVITY); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2242,9 +2242,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (BattleContext_CheckMoveHealBlocked(bsys, ctx, ctx->battlerIdAttacker, ctx->moveNoCur)) { ctx->moveFail[ctx->battlerIdAttacker].healBlock = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_IS_HEAL_BLOCKED); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } ctx->unk_50++; break; @@ -2256,25 +2256,25 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (BattleSystem_Random(bsys) & 1) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_CONFUSED); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } else { ctx->moveFail[ctx->battlerIdAttacker].confusion = TRUE; - ctx->battlerIdTarget = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - ctx->hpCalc = CalcMoveDamage(bsys, ctx, MOVE_STRUGGLE, 0, 0, 40, 0, ctx->battlerIdAttacker, ctx->battlerIdAttacker, 1); - ctx->hpCalc = ApplyDamageRange(bsys, ctx, ctx->hpCalc); + ctx->battlerIdTarget = ctx->battlerIdAttacker; + ctx->battlerIdTemp = ctx->battlerIdTarget; + ctx->hpCalc = CalcMoveDamage(bsys, ctx, MOVE_STRUGGLE, 0, 0, 40, 0, ctx->battlerIdAttacker, ctx->battlerIdAttacker, 1); + ctx->hpCalc = ApplyDamageRange(bsys, ctx, ctx->hpCalc); ctx->hpCalc *= -1; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_HURT_SELF_IN_CONFUSION); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_34; - ret = 1; + ret = 1; } } else { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_SNAP_OUT_OF_CONFUSION); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } } break; @@ -2283,9 +2283,9 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (BattleSystem_Random(bsys) % 4 == 0) { ctx->moveFail[ctx->battlerIdAttacker].paralysis = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_FULLY_PARALYZED); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } } ctx->unk_50++; @@ -2296,14 +2296,14 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (BattleSystem_Random(bsys) & 1) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_INFATUATED); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } else { ctx->moveFail[ctx->battlerIdAttacker].infatuation = TRUE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_IMMOBILIZED_BY_LOVE); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; - ret = 1; + ret = 1; } } ctx->unk_50++; @@ -2321,16 +2321,16 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[ctx->battlerIdTarget].hp == 0) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BIDE_NO_TARGET); ctx->commandNext = CONTROLLER_COMMAND_39; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; break; } } } ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BIDE_END); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } break; case 15: @@ -2338,15 +2338,15 @@ static BOOL ov12_0224B528(BattleSystem *bsys, BattleContext *ctx) { if (effect == MOVE_EFFECT_THAW_AND_BURN_HIT || effect == MOVE_EFFECT_RECOIL_BURN_HIT) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_DEFROSTED_BY_MOVE); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = 2; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = 2; } } ctx->unk_50++; break; case 16: ctx->unk_50 = 0; - ret = 3; + ret = 3; break; } } while (ret == 0); @@ -2372,7 +2372,7 @@ static BOOL ov12_0224BC2C(BattleSystem *bsys, BattleContext *ctx) { if ((script && !(ctx->moveStatusFlag & MOVE_STATUS_DID_NOT_HIT)) || script == BATTLE_SUBSCRIPT_BLOCKED_BY_SOUNDPROOF) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->moveStatusFlag |= MOVE_STATUS_NO_MORE_WORK; ret = 1; } @@ -2380,7 +2380,7 @@ static BOOL ov12_0224BC2C(BattleSystem *bsys, BattleContext *ctx) { break; case 1: ctx->unk_54 = 0; - ret = 2; + ret = 2; break; } } while (ret == 0); @@ -2391,7 +2391,7 @@ static BOOL ov12_0224BC2C(BattleSystem *bsys, BattleContext *ctx) { static BOOL ov12_0224BCA4(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_CHECK_QUICK_CLAW); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return TRUE; } @@ -2433,9 +2433,9 @@ static BOOL BattleSystem_CheckMoveHit(BattleSystem *bsys, BattleContext *ctx, in moveType = ctx->trainerAIData.moveData[move].type; } - moveCategory = ctx->trainerAIData.moveData[move].category; + moveCategory = ctx->trainerAIData.moveData[move].category; attackerAccuracy = ctx->battleMons[battlerIdAttacker].statChanges[STAT_ACC] - 6; - targetEvasion = 6 - ctx->battleMons[battlerIdTarget].statChanges[STAT_EVASION]; + targetEvasion = 6 - ctx->battleMons[battlerIdTarget].statChanges[STAT_EVASION]; if (GetBattlerAbility(ctx, battlerIdAttacker) == ABILITY_SIMPLE) { attackerAccuracy *= 2; @@ -2515,14 +2515,14 @@ static BOOL BattleSystem_CheckMoveHit(BattleSystem *bsys, BattleContext *ctx, in hitChance = hitChance * 50 / 100; } - item = GetBattlerHeldItemEffect(ctx, battlerIdTarget); + item = GetBattlerHeldItemEffect(ctx, battlerIdTarget); itemMod = GetHeldItemModifier(ctx, battlerIdTarget, 0); if (item == HOLD_EFFECT_ACC_REDUCE) { hitChance = hitChance * (100 - itemMod) / 100; } - item = GetBattlerHeldItemEffect(ctx, battlerIdAttacker); + item = GetBattlerHeldItemEffect(ctx, battlerIdAttacker); itemMod = GetHeldItemModifier(ctx, battlerIdAttacker, 0); if (item == HOLD_EFFECT_ACCURACY_UP) { @@ -2535,7 +2535,7 @@ static BOOL BattleSystem_CheckMoveHit(BattleSystem *bsys, BattleContext *ctx, in if (ctx->battleMons[battlerIdAttacker].unk88.micleBerryFlag) { ctx->battleMons[battlerIdAttacker].unk88.micleBerryFlag = 0; - hitChance = hitChance * 120 / 100; + hitChance = hitChance * 120 / 100; } if (ctx->fieldCondition & FIELD_CONDITION_GRAVITY) { @@ -2603,13 +2603,13 @@ static BOOL ov12_0224C204(BattleSystem *bsys, BattleContext *ctx) { if (!(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && ctx->turnData[ctx->battlerIdTarget].magicCoatFlag && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 4)) { ctx->turnData[ctx->battlerIdTarget].magicCoatFlag = 0; - ctx->moveNoProtect[ctx->battlerIdAttacker] = 0; - ctx->moveNoBattlerPrev[ctx->battlerIdAttacker] = ctx->moveNoTemp; - ctx->moveNoPrev = ctx->moveNoTemp; + ctx->moveNoProtect[ctx->battlerIdAttacker] = 0; + ctx->moveNoBattlerPrev[ctx->battlerIdAttacker] = ctx->moveNoTemp; + ctx->moveNoPrev = ctx->moveNoTemp; ctx->battleStatus |= BATTLE_STATUS_NO_MOVE_SET; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MAGIC_COAT); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; CheckIgnorePressure(ctx, ctx->battlerIdTarget, ctx->battlerIdAttacker); return TRUE; } @@ -2617,17 +2617,17 @@ static BOOL ov12_0224C204(BattleSystem *bsys, BattleContext *ctx) { for (i = 0; i < maxBattlers; i++) { battlerId = ctx->turnOrder[i]; if (!(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && ctx->turnData[battlerId].snatchFlag && ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 8) { - ctx->battlerIdTemp = battlerId; + ctx->battlerIdTemp = battlerId; ctx->turnData[battlerId].snatchFlag = 0; if (!(ctx->battleStatus & BATTLE_STATUS_NO_MOVE_SET)) { - ctx->moveNoProtect[ctx->battlerIdAttacker] = 0; + ctx->moveNoProtect[ctx->battlerIdAttacker] = 0; ctx->moveNoBattlerPrev[ctx->battlerIdAttacker] = ctx->moveNoTemp; - ctx->moveNoPrev = ctx->moveNoTemp; + ctx->moveNoPrev = ctx->moveNoTemp; ctx->battleStatus |= BATTLE_STATUS_NO_MOVE_SET; } ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_SNATCH); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; CheckIgnorePressure(ctx, battlerId, ctx->battlerIdAttacker); return TRUE; } @@ -2639,7 +2639,7 @@ static BOOL ov12_0224C204(BattleSystem *bsys, BattleContext *ctx) { static void BattleControllerPlayer_RunScript(BattleSystem *bsys, BattleContext *ctx) { if (RunBattleScript(bsys, ctx) == TRUE) { ctx->scriptSeqNo = 0; - ctx->command = ctx->commandNext; + ctx->command = ctx->commandNext; } } @@ -2708,7 +2708,7 @@ static void ov12_0224C38C(BattleSystem *bsys, BattleContext *ctx) { } else { ctx->battleStatus2 |= BATTLE_STATUS2_MOVE_SUCCEEDED; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_0, ctx->moveNoCur); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_24; ov12_02252E30(bsys, ctx); } @@ -2765,7 +2765,7 @@ static void ov12_0224C5C8(BattleSystem *bsys, BattleContext *ctx) { if (ov12_022503EC(bsys, ctx, &script) == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_26; } else { ctx->command = CONTROLLER_COMMAND_26; @@ -2777,7 +2777,7 @@ static void ov12_0224C5F8(BattleSystem *bsys, BattleContext *ctx) { ctx->command = CONTROLLER_COMMAND_35; } else if (ctx->moveStatusFlag & MOVE_STATUS_NO_PP) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_NO_PP); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_39; } else if (ctx->unk_2180 && (ctx->moveStatusFlag & MOVE_STATUS_MISSED)) { ctx->moveStatusFlag &= ~MOVE_STATUS_MISSED; @@ -2785,7 +2785,7 @@ static void ov12_0224C5F8(BattleSystem *bsys, BattleContext *ctx) { ctx->command = CONTROLLER_COMMAND_29; } else if (ctx->moveStatusFlag & MOVE_STATUS_DID_NOT_HIT) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MISSED); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_34; } else { ctx->command = CONTROLLER_COMMAND_27; @@ -2794,7 +2794,7 @@ static void ov12_0224C5F8(BattleSystem *bsys, BattleContext *ctx) { static void ov12_0224C678(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_USE_MOVE); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_HP_CALC; } @@ -2806,7 +2806,7 @@ static void BattleControllerPlayer_HpCalc(BattleSystem *bsys, BattleContext *ctx ctx->damage = ctx->battleMons[ctx->battlerIdTarget].maxHp * -1; } if (ctx->damage != 0) { - item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdTarget); + item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdTarget); itemMod = GetHeldItemModifier(ctx, ctx->battlerIdTarget, 0); GF_ASSERT(ctx->damage < 0); @@ -2821,7 +2821,7 @@ static void BattleControllerPlayer_HpCalc(BattleSystem *bsys, BattleContext *ctx if (ctx->battleMons[ctx->battlerIdTarget].unk88.substituteHp + ctx->damage <= 0) { ctx->selfTurnData[ctx->battlerIdAttacker].shellBellDamage += ctx->battleMons[ctx->battlerIdTarget].unk88.substituteHp * -1; ctx->battleMons[ctx->battlerIdTarget].status2 &= ~STATUS2_SUBSTITUTE; - ctx->hitDamage = ctx->battleMons[ctx->battlerIdTarget].unk88.substituteHp * -1; + ctx->hitDamage = ctx->battleMons[ctx->battlerIdTarget].unk88.substituteHp * -1; ctx->battleMons[ctx->battlerIdTarget].unk88.substituteHp = 0; } else { ctx->selfTurnData[ctx->battlerIdAttacker].shellBellDamage += ctx->damage; @@ -2831,7 +2831,7 @@ static void BattleControllerPlayer_HpCalc(BattleSystem *bsys, BattleContext *ctx ctx->selfTurnData[ctx->battlerIdTarget].unk14 |= 8; ctx->battlerIdTemp = ctx->battlerIdTarget; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_HIT_SUBSTITUTE); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_29; } else { // False Swipe @@ -2867,15 +2867,15 @@ static void BattleControllerPlayer_HpCalc(BattleSystem *bsys, BattleContext *ctx if (ctx->trainerAIData.moveData[ctx->moveNoCur].category == CATEGORY_PHYSICAL) { ctx->turnData[ctx->battlerIdTarget].physicalDamage[ctx->battlerIdAttacker] = ctx->damage; - ctx->turnData[ctx->battlerIdTarget].battlerIdPhysicalDamage = ctx->battlerIdAttacker; + ctx->turnData[ctx->battlerIdTarget].battlerIdPhysicalDamage = ctx->battlerIdAttacker; ctx->turnData[ctx->battlerIdTarget].battlerBitPhysicalDamage |= MaskOfFlagNo(ctx->battlerIdAttacker); - ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage = ctx->damage; + ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage = ctx->damage; ctx->selfTurnData[ctx->battlerIdTarget].battlerIdPhysicalAttacker = ctx->battlerIdAttacker; } else if (ctx->trainerAIData.moveData[ctx->moveNoCur].category == CATEGORY_SPECIAL) { ctx->turnData[ctx->battlerIdTarget].specialDamage[ctx->battlerIdAttacker] = ctx->damage; - ctx->turnData[ctx->battlerIdTarget].battlerIdSpecialDamage = ctx->battlerIdAttacker; + ctx->turnData[ctx->battlerIdTarget].battlerIdSpecialDamage = ctx->battlerIdAttacker; ctx->turnData[ctx->battlerIdTarget].battlerBitSpecialDamage |= MaskOfFlagNo(ctx->battlerIdAttacker); - ctx->selfTurnData[ctx->battlerIdTarget].specialDamage = ctx->damage; + ctx->selfTurnData[ctx->battlerIdTarget].specialDamage = ctx->damage; ctx->selfTurnData[ctx->battlerIdTarget].battlerIdSpecialAttacker = ctx->battlerIdAttacker; } @@ -2887,10 +2887,10 @@ static void BattleControllerPlayer_HpCalc(BattleSystem *bsys, BattleContext *ctx ctx->turnData[ctx->battlerIdTarget].unk34 = ctx->damage; ctx->turnData[ctx->battlerIdTarget].unk38 = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - ctx->hpCalc = ctx->damage; + ctx->battlerIdTemp = ctx->battlerIdTarget; + ctx->hpCalc = ctx->damage; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_UPDATE_HP); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_29; ctx->battleStatus |= BATTLE_STATUS_MOVE_SUCCESSFUL; } @@ -2922,7 +2922,7 @@ static void ov12_0224CAA4(BattleSystem *bsys, BattleContext *ctx) { if (ov12_02250490(bsys, ctx, &script) == TRUE && !(ctx->moveStatusFlag & MOVE_STATUS_DID_NOT_HIT)) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -2931,7 +2931,7 @@ static void ov12_0224CAA4(BattleSystem *bsys, BattleContext *ctx) { ctx->unk_3C++; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_CHECK_SHAYMIN_FORM); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; case 4: ctx->unk_3C++; @@ -2946,7 +2946,7 @@ static void ov12_0224CAA4(BattleSystem *bsys, BattleContext *ctx) { if (CheckAbilityEffectOnHit(bsys, ctx, &script) == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -2976,7 +2976,7 @@ static void ov12_0224CAA4(BattleSystem *bsys, BattleContext *ctx) { if (ov12_02250490(bsys, ctx, &script) == TRUE && !(ctx->moveStatusFlag & MOVE_STATUS_DID_NOT_HIT)) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -2985,7 +2985,7 @@ static void ov12_0224CAA4(BattleSystem *bsys, BattleContext *ctx) { ctx->unk_3C++; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_CHECK_SHAYMIN_FORM); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; case 3: ctx->unk_3C++; @@ -3000,7 +3000,7 @@ static void ov12_0224CAA4(BattleSystem *bsys, BattleContext *ctx) { if (CheckAbilityEffectOnHit(bsys, ctx, &script) == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -3021,7 +3021,7 @@ static void ov12_0224CAA4(BattleSystem *bsys, BattleContext *ctx) { break; } } - ctx->unk_3C = 0; + ctx->unk_3C = 0; ctx->command = CONTROLLER_COMMAND_31; } @@ -3038,9 +3038,9 @@ void ov12_0224CC88(BattleSystem *bsys, BattleContext *ctx) { ctx->battleMons[ctx->unk_44].moveEffectFlagsTemp &= ~MOVE_EFFECT_FLAG_HIDE_SUBSTITUTE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_VANISH_OFF); ctx->battlerIdTemp = ctx->unk_44; - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->unk_44++; if (flag) { @@ -3063,7 +3063,7 @@ void ov12_0224CC88(BattleSystem *bsys, BattleContext *ctx) { if (script) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -3089,7 +3089,7 @@ void ov12_0224CC88(BattleSystem *bsys, BattleContext *ctx) { if (CheckItemEffectOnHit(bsys, ctx, &script) == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -3118,7 +3118,7 @@ void ov12_0224CC88(BattleSystem *bsys, BattleContext *ctx) { ctx->battlerIdTemp = ctx->battlerIdTarget; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_THAW_OUT); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } } @@ -3139,8 +3139,8 @@ void ov12_0224CC88(BattleSystem *bsys, BattleContext *ctx) { ctx->battlerIdTemp = battlerId; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; break; } } @@ -3154,8 +3154,8 @@ void ov12_0224CC88(BattleSystem *bsys, BattleContext *ctx) { break; } - ctx->unk_40 = 0; - ctx->unk_44 = 0; + ctx->unk_40 = 0; + ctx->unk_44 = 0; ctx->command = CONTROLLER_COMMAND_32; } @@ -3171,12 +3171,12 @@ static void ov12_0224CF14(BattleSystem *bsys, BattleContext *ctx) { ctx->battleStatus &= ~BATTLE_STATUS_MOVE_ANIMATIONS_OFF; ctx->unk_2184 = ctx->checkMultiHit; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_0, ctx->moveNoCur); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_24; } else { ctx->msgTemp = ctx->multiHitCountTemp; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_HIT_X_TIMES); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_34; } } else { @@ -3186,7 +3186,7 @@ static void ov12_0224CF14(BattleSystem *bsys, BattleContext *ctx) { ctx->msgTemp = ctx->multiHitCountTemp - ctx->multiHitCount; } ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_HIT_X_TIMES); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_34; } BattleController_EmitBlankMessage(bsys); @@ -3206,7 +3206,7 @@ static void ov12_0224D014(BattleSystem *bsys, BattleContext *ctx) { static void ov12_0224D03C(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleStatus2 & BATTLE_STATUS2_MAGIC_COAT) { ctx->battleStatus2 &= ~BATTLE_STATUS2_MAGIC_COAT; - ctx->battlerIdTarget = ctx->battlerIdAttacker; + ctx->battlerIdTarget = ctx->battlerIdAttacker; ctx->battlerIdAttacker = ctx->battlerIdMagicCoat; } @@ -3215,9 +3215,9 @@ static void ov12_0224D03C(BattleSystem *bsys, BattleContext *ctx) { if (ctx->trainerAIData.moveData[ctx->moveNoCur].range == RANGE_ADJACENT_OPPONENTS && !(ctx->battleStatus & BATTLE_STATUS_CHECK_LOOP_ONLY_ONCE) && ctx->unk_217E < BattleSystem_GetMaxBattlers(bsys)) { ctx->unk_2184 = 13; int battlerId; - int maxBattlers = BattleSystem_GetMaxBattlers(bsys); + int maxBattlers = BattleSystem_GetMaxBattlers(bsys); OpponentData *opponent = BattleSystem_GetOpponentData(bsys, ctx->battlerIdAttacker); - u8 flag = ov12_02261258(opponent); + u8 flag = ov12_02261258(opponent); do { battlerId = ctx->turnOrder[ctx->unk_217E++]; @@ -3226,7 +3226,7 @@ static void ov12_0224D03C(BattleSystem *bsys, BattleContext *ctx) { if (((flag & 1) && !(ov12_02261258(opponent) & 1)) || (!(flag & 1) && ov12_02261258(opponent) & 1)) { ov12_02252D14(bsys, ctx); ctx->battlerIdTarget = battlerId; - ctx->command = CONTROLLER_COMMAND_23; + ctx->command = CONTROLLER_COMMAND_23; break; } } @@ -3245,7 +3245,7 @@ static void ov12_0224D03C(BattleSystem *bsys, BattleContext *ctx) { if (battlerId != ctx->battlerIdAttacker) { ov12_02252D14(bsys, ctx); ctx->battlerIdTarget = battlerId; - ctx->command = CONTROLLER_COMMAND_23; + ctx->command = CONTROLLER_COMMAND_23; break; } } @@ -3262,7 +3262,7 @@ static void ov12_0224D1DC(BattleSystem *bsys, BattleContext *ctx) { ctx->battlerIdFainted = LowestFlagNo((ctx->battleStatus & BATTLE_STATUS_SELFDESTRUCTED) >> BATTLE_STATUS_SELFDESTRUCTED_SHIFT); ctx->battleStatus &= ~BATTLE_STATUS_SELFDESTRUCTED; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_AFTER_SELFDESTRUCT); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_37; } else { ctx->command = CONTROLLER_COMMAND_37; @@ -3293,10 +3293,10 @@ static void ov12_0224D23C(BattleSystem *bsys, BattleContext *ctx) { if (!(ctx->battleStatus & BATTLE_STATUS_NO_MOVE_SET)) { if (ctx->battleStatus2 & BATTLE_STATUS2_DISPLAY_ATTACK_MESSAGE) { ctx->moveNoProtect[ctx->battlerIdAttacker] = ctx->moveNoCur; - ctx->moveNoPrev = ctx->moveNoTemp; + ctx->moveNoPrev = ctx->moveNoTemp; } else { ctx->moveNoProtect[ctx->battlerIdAttacker] = 0; - ctx->moveNoPrev = 0; + ctx->moveNoPrev = 0; } if (ctx->battleStatus2 & BATTLE_STATUS2_MOVE_SUCCEEDED) { ctx->moveNoBattlerPrev[ctx->battlerIdAttacker] = ctx->moveNoTemp; @@ -3336,7 +3336,7 @@ static void ov12_0224D368(BattleSystem *bsys, BattleContext *ctx) { if (script) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return; } if (ov12_0224E130(bsys, ctx) == TRUE) { @@ -3371,14 +3371,14 @@ static void ov12_0224D464(BattleSystem *bsys, BattleContext *ctx) { ctx->command = CONTROLLER_COMMAND_44; } else if (BattleSystem_GetBattleOutcomeFlags(bsys) == BATTLE_RESULT_LOSE || BattleSystem_GetBattleOutcomeFlags(bsys) == BATTLE_RESULT_DRAW) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BATTLE_LOST); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_44; } else if (BattleSystem_GetBattleOutcomeFlags(bsys) == BATTLE_OUTCOME_WIN) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_BATTLE_WON); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_44; } else if (BattleSystem_GetBattleOutcomeFlags(bsys) == BATTLE_RESULT_CAPTURED_MON) { - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = CONTROLLER_COMMAND_44; } else if (BattleSystem_GetBattleOutcomeFlags(bsys) == BATTLE_RESULT_PLAYER_FLED) { ctx->command = CONTROLLER_COMMAND_44; @@ -3415,8 +3415,8 @@ static void ov12_0224D53C(BattleSystem *bsys, BattleContext *ctx) { static BOOL ov12_0224D540(BattleSystem *bsys, BattleContext *ctx) { u8 flag = FALSE; int battlerId; - int maxBattlers = BattleSystem_GetMaxBattlers(bsys); - u32 battleType = BattleSystem_GetBattleType(bsys); + int maxBattlers = BattleSystem_GetMaxBattlers(bsys); + u32 battleType = BattleSystem_GetBattleType(bsys); ControllerCommand cmd = ctx->command; for (battlerId = 0; battlerId < maxBattlers; battlerId++) { @@ -3425,7 +3425,7 @@ static BOOL ov12_0224D540(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[battlerId].hp != 0 || ctx->battleMons[battlerId ^ 2].hp != 0 || !(battlerId & 2)) { if (ctx->battleMons[battlerId].hp == 0) { int i; - int hp = 0; + int hp = 0; Party *party = BattleSystem_GetParty(bsys, battlerId); BattleSystem_GetOpponentData(bsys, battlerId); // called but unused @@ -3444,14 +3444,14 @@ static BOOL ov12_0224D540(BattleSystem *bsys, BattleContext *ctx) { ctx->selectedMonIndex[battlerId] = 6; } else { ctx->commandNext = cmd; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->unk_13C[battlerId] |= 1; } } } } else if (ctx->battleMons[battlerId].hp == 0) { int i; - int hp = 0; + int hp = 0; Party *party = BattleSystem_GetParty(bsys, battlerId); BattleSystem_GetOpponentData(bsys, battlerId); @@ -3467,7 +3467,7 @@ static BOOL ov12_0224D540(BattleSystem *bsys, BattleContext *ctx) { ctx->selectedMonIndex[battlerId] = 6; } else { ctx->commandNext = cmd; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->unk_13C[battlerId] |= 1; } } @@ -3493,14 +3493,14 @@ static BOOL ov12_0224D540(BattleSystem *bsys, BattleContext *ctx) { static BOOL ov12_0224D7EC(BattleSystem *bsys, BattleContext *ctx) { int battlerId; - int maxBattlers = BattleSystem_GetMaxBattlers(bsys); - u32 battleType = BattleSystem_GetBattleType(bsys); + int maxBattlers = BattleSystem_GetMaxBattlers(bsys); + u32 battleType = BattleSystem_GetBattleType(bsys); u8 battleOutcome = 0; for (battlerId = 0; battlerId < maxBattlers; battlerId++) { if ((battleType == (BATTLE_TYPE_AI | BATTLE_TYPE_MULTI | BATTLE_TYPE_DOUBLES) || battleType == (BATTLE_TYPE_AI | BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLES | BATTLE_TYPE_MULTI)) && BattleSystem_GetFieldSide(bsys, battlerId) == 0) { if (ov12_0223AB0C(bsys, battlerId) == 2 && ctx->battleMons[battlerId].hp == 0) { - int hp = 0; + int hp = 0; Party *party = BattleSystem_GetParty(bsys, battlerId); BattleSystem_GetOpponentData(bsys, battlerId); @@ -3518,9 +3518,9 @@ static BOOL ov12_0224D7EC(BattleSystem *bsys, BattleContext *ctx) { } else if ((battleType & BATTLE_TYPE_MULTI) || ((battleType & BATTLE_TYPE_TAG) && BattleSystem_GetFieldSide(bsys, battlerId))) { if (ctx->battleMons[battlerId].hp == 0) { int i; - int hp = 0; - Party *party = BattleSystem_GetParty(bsys, battlerId); - Party *partnerParty = BattleSystem_GetParty(bsys, BattleSystem_GetBattlerIdPartner(bsys, battlerId)); + int hp = 0; + Party *party = BattleSystem_GetParty(bsys, battlerId); + Party *partnerParty = BattleSystem_GetParty(bsys, BattleSystem_GetBattlerIdPartner(bsys, battlerId)); OpponentData *opponent = BattleSystem_GetOpponentData(bsys, battlerId); for (i = 0; i < Party_GetCount(party); i++) { @@ -3547,8 +3547,8 @@ static BOOL ov12_0224D7EC(BattleSystem *bsys, BattleContext *ctx) { } } else { if (ctx->battleMons[battlerId].hp == 0) { - int hp = 0; - Party *party = BattleSystem_GetParty(bsys, battlerId); + int hp = 0; + Party *party = BattleSystem_GetParty(bsys, battlerId); OpponentData *opponent = BattleSystem_GetOpponentData(bsys, battlerId); for (int i = 0; i < Party_GetCount(party); i++) { @@ -3650,12 +3650,12 @@ static void ov12_0224DC0C(BattleSystem *bsys, BattleContext *ctx) { ctx->unk_218C[battlerId] = 0; } - ctx->moveNoHit[ctx->battlerIdAttacker] = 0; + ctx->moveNoHit[ctx->battlerIdAttacker] = 0; ctx->conversion2Move[ctx->battlerIdAttacker] = 0; } static BOOL TryFaintMon(BattleContext *ctx, ControllerCommand commandNext, ControllerCommand command, int flag) { - int turn = 0; + int turn = 0; int faintedFlag = MaskOfFlagNo(ctx->turnOrder[turn]) << BATTLE_STATUS_FAINTED_SHIFT; if (ctx->battleStatus & BATTLE_STATUS_FAINTED) { @@ -3671,8 +3671,8 @@ static BOOL TryFaintMon(BattleContext *ctx, ControllerCommand commandNext, Contr } else { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_FAINT_CHECK_DESTINY_BOND); } - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ctx->commandNext = commandNext; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->commandNext = commandNext; ctx->playerActions[ctx->battlerIdFainted].command = CONTROLLER_COMMAND_40; return TRUE; } else { @@ -3692,7 +3692,7 @@ static BOOL ov12_0224DD18(BattleContext *ctx, ControllerCommand commandNext, Con ctx->battleStatus2 &= flag ^ 0xFFFFFFFF; ctx->battlerIdFainted = LowestFlagNo(flag >> BATTLE_STATUS2_EXP_GAIN_SHIFT); ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_GRANT_EXP); - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; ctx->commandNext = commandNext; return TRUE; } else { @@ -3717,7 +3717,7 @@ static void ov12_0224DD74(BattleSystem *bsys, BattleContext *ctx) { flag = ctx->trainerAIData.moveData[ctx->moveNoTemp].unkB; if (flag & 0x10 && !(ctx->battleStatus & BATTLE_STATUS_NO_MOVE_SET) && ctx->battlerIdTarget != BATTLER_NONE && ctx->battleStatus2 & BATTLE_STATUS2_DISPLAY_ATTACK_MESSAGE) { - ctx->moveNoCopied[ctx->battlerIdTarget] = ctx->moveNoTemp; + ctx->moveNoCopied[ctx->battlerIdTarget] = ctx->moveNoTemp; ctx->moveNoCopiedHit[ctx->battlerIdTarget][ctx->battlerIdAttacker] = ctx->moveNoTemp; } @@ -3731,15 +3731,15 @@ static void ov12_0224DD74(BattleSystem *bsys, BattleContext *ctx) { if (!(ctx->battleStatus & BATTLE_STATUS_NO_MOVE_SET)) { if (ctx->battleStatus2 & BATTLE_STATUS2_DISPLAY_ATTACK_MESSAGE) { - ctx->moveNoHit[ctx->battlerIdTarget] = ctx->moveNoCur; + ctx->moveNoHit[ctx->battlerIdTarget] = ctx->moveNoCur; ctx->moveNoHitBattler[ctx->battlerIdTarget] = ctx->battlerIdAttacker; - ctx->moveNoHitType[ctx->battlerIdTarget] = moveType; - ctx->moveNoPrev = ctx->moveNoTemp; + ctx->moveNoHitType[ctx->battlerIdTarget] = moveType; + ctx->moveNoPrev = ctx->moveNoTemp; } else { - ctx->moveNoHit[ctx->battlerIdTarget] = 0; + ctx->moveNoHit[ctx->battlerIdTarget] = 0; ctx->moveNoHitBattler[ctx->battlerIdTarget] = BATTLER_NONE; - ctx->moveNoHitType[ctx->battlerIdTarget] = 0; - ctx->moveNoPrev = 0; + ctx->moveNoHitType[ctx->battlerIdTarget] = 0; + ctx->moveNoPrev = 0; } if (ctx->battleStatus2 & BATTLE_STATUS2_MOVE_SUCCEEDED && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL)) { @@ -3750,20 +3750,20 @@ static void ov12_0224DD74(BattleSystem *bsys, BattleContext *ctx) { case RANGE_OPPONENT_SIDE: case RANGE_ALLY: case RANGE_SINGLE_TARGET_USER_SIDE: - ctx->conversion2Move[ctx->battlerIdTarget] = 0; + ctx->conversion2Move[ctx->battlerIdTarget] = 0; ctx->conversion2BattlerId[ctx->battlerIdTarget] = BATTLER_NONE; - ctx->conversion2Type[ctx->battlerIdTarget] = 0; + ctx->conversion2Type[ctx->battlerIdTarget] = 0; break; default: - ctx->conversion2Move[ctx->battlerIdTarget] = ctx->moveNoCur; + ctx->conversion2Move[ctx->battlerIdTarget] = ctx->moveNoCur; ctx->conversion2BattlerId[ctx->battlerIdTarget] = ctx->battlerIdAttacker; - ctx->conversion2Type[ctx->battlerIdTarget] = moveType; + ctx->conversion2Type[ctx->battlerIdTarget] = moveType; break; } } else { - ctx->conversion2Move[ctx->battlerIdTarget] = 0; + ctx->conversion2Move[ctx->battlerIdTarget] = 0; ctx->conversion2BattlerId[ctx->battlerIdTarget] = BATTLER_NONE; - ctx->conversion2Type[ctx->battlerIdTarget] = 0; + ctx->conversion2Type[ctx->battlerIdTarget] = 0; } } } @@ -3772,7 +3772,7 @@ static void ov12_0224DD74(BattleSystem *bsys, BattleContext *ctx) { static BOOL ov12_0224DF7C(BattleSystem *bsys, BattleContext *ctx) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_CRITICAL_HIT); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return TRUE; } @@ -3793,7 +3793,7 @@ static BOOL ov12_0224DF98(BattleSystem *bsys, BattleContext *ctx) { if (ret == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_MOVE_FOLLOWUP_MESSAGE); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } return ret; } @@ -3814,16 +3814,16 @@ static BOOL TryBuildRage(BattleSystem *bsys, BattleContext *ctx) { ctx->battleMons[ctx->battlerIdTarget].statChanges[STAT_ATK]++; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_RAGE_IS_BUILDING); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = TRUE; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = TRUE; } return ret; } static BOOL TryItemFlinch(BattleSystem *bsys, BattleContext *ctx) { - BOOL ret = FALSE; - int item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker); + BOOL ret = FALSE; + int item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker); int itemMod = GetHeldItemModifier(ctx, ctx->battlerIdAttacker, 0); if (ctx->battlerIdTarget != BATTLER_NONE @@ -3834,11 +3834,11 @@ static BOOL TryItemFlinch(BattleSystem *bsys, BattleContext *ctx) { && ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & (1 << 5) && ctx->battleMons[ctx->battlerIdTarget].hp != 0) { ctx->battlerIdStatChange = ctx->battlerIdTarget; - ctx->statChangeType = 2; + ctx->statChangeType = 2; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_FLINCH_MON); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = TRUE; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = TRUE; } return ret; @@ -3851,9 +3851,9 @@ static BOOL ov12_0224E130(BattleSystem *bsys, BattleContext *ctx) { ctx->battleMons[ctx->unk_5C].moveEffectFlagsTemp &= ~MOVE_EFFECT_FLAG_HIDE_SUBSTITUTE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_VANISH_OFF); ctx->battlerIdTemp = ctx->unk_5C; - ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = TRUE; + ctx->commandNext = ctx->command; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = TRUE; } ctx->unk_5C++; if (ret == TRUE) { @@ -3870,8 +3870,8 @@ static BOOL ov12_0224E1BC(BattleSystem *bsys, BattleContext *ctx) { int flag = 0; int maxBattlers = BattleSystem_GetMaxBattlers(bsys); - int item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker); - int itemMod = GetHeldItemModifier(ctx, ctx->battlerIdAttacker, 0); + int item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker); + int itemMod = GetHeldItemModifier(ctx, ctx->battlerIdAttacker, 0); if (TryFaintMon(ctx, ctx->command, ctx->command, 1) == TRUE) { return TRUE; @@ -3895,12 +3895,12 @@ static BOOL ov12_0224E1BC(BattleSystem *bsys, BattleContext *ctx) { && ctx->battleMons[ctx->battlerIdAttacker].hp < ctx->battleMons[ctx->battlerIdAttacker].maxHp && ctx->battleMons[ctx->battlerIdAttacker].hp != 0) { - ctx->hpCalc = DamageDivide(ctx->selfTurnData[ctx->battlerIdAttacker].shellBellDamage * -1, itemMod); + ctx->hpCalc = DamageDivide(ctx->selfTurnData[ctx->battlerIdAttacker].shellBellDamage * -1, itemMod); ctx->battlerIdTemp = ctx->battlerIdAttacker; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_RESTORE_A_LITTLE_HP); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->unk_30++; break; @@ -3912,19 +3912,19 @@ static BOOL ov12_0224E1BC(BattleSystem *bsys, BattleContext *ctx) { && ctx->trainerAIData.moveData[ctx->moveNoCur].category != CATEGORY_STATUS && ctx->battleMons[ctx->battlerIdAttacker].hp != 0) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 10); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 10); ctx->battlerIdTemp = ctx->battlerIdAttacker; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, BATTLE_SUBSCRIPT_LOSE_HP_FROM_ITEM); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - flag = 1; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + flag = 1; } ctx->unk_30++; break; case 3: ctx->unk_30 = 0; ctx->unk_34 = 0; - flag = 2; + flag = 2; break; } } while (flag == 0); diff --git a/src/battle/battle_cursor.c b/src/battle/battle_cursor.c index 9a52e01e9f..2f9b45163a 100644 --- a/src/battle/battle_cursor.c +++ b/src/battle/battle_cursor.c @@ -23,16 +23,16 @@ void BattleCursor_FreeResources(SpriteGfxHandler *gfxHandler, u32 character, u32 } static const UnkTemplate_0200D748 ov12_0226EBA0 = { - .x = 0, - .y = 0, - .z = 0, - .animation = 0, + .x = 0, + .y = 0, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DSUB, - .resIdList = { 0, 0, 0, 0, -1, -1 }, - .bgPriority = 0, - .vramTransfer = 0 + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DSUB, + .resIdList = { 0, 0, 0, 0, -1, -1 }, + .bgPriority = 0, + .vramTransfer = 0 }; BattleCursor *BattleCursor_New(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, HeapID heapId, u32 character, u32 pal, u32 cell, u32 animation, u32 a7, u32 a8) { @@ -40,13 +40,13 @@ BattleCursor *BattleCursor_New(SpriteRenderer *renderer, SpriteGfxHandler *gfxHa UnkTemplate_0200D748 unkStruct; int i; - unkStruct = ov12_0226EBA0; - unkStruct.resIdList[0] = character; - unkStruct.resIdList[1] = pal; - unkStruct.resIdList[2] = cell; - unkStruct.resIdList[3] = animation; + unkStruct = ov12_0226EBA0; + unkStruct.resIdList[0] = character; + unkStruct.resIdList[1] = pal; + unkStruct.resIdList[2] = cell; + unkStruct.resIdList[3] = animation; unkStruct.spritePriority = a7; - unkStruct.bgPriority = a8; + unkStruct.bgPriority = a8; cursor = AllocFromHeap(heapId, sizeof(BattleCursor)); MI_CpuFill8(cursor, 0, sizeof(BattleCursor)); diff --git a/src/battle/battle_finger.c b/src/battle/battle_finger.c index 9eae30e6a7..0f1dd3b578 100644 --- a/src/battle/battle_finger.c +++ b/src/battle/battle_finger.c @@ -25,28 +25,28 @@ void BattleFinger_FreeResources(SpriteGfxHandler *gfxHandler, u32 character, u32 } static const UnkTemplate_0200D748 ov12_0226EBD4 = { - .x = 0, - .y = 0, - .z = 0, - .animation = 0, + .x = 0, + .y = 0, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DSUB, - .resIdList = { 0, 0, 0, 0, -1, -1 }, - .bgPriority = 0, - .vramTransfer = 0 + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DSUB, + .resIdList = { 0, 0, 0, 0, -1, -1 }, + .bgPriority = 0, + .vramTransfer = 0 }; BattleFinger *BattleFinger_New(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, HeapID heapId, u32 character, u32 pal, u32 cell, u32 animation, u32 spritePriority, u32 bgPriority) { BattleFinger *finger; UnkTemplate_0200D748 unkStruct = ov12_0226EBD4; - unkStruct.resIdList[0] = character; - unkStruct.resIdList[1] = pal; - unkStruct.resIdList[2] = cell; - unkStruct.resIdList[3] = animation; + unkStruct.resIdList[0] = character; + unkStruct.resIdList[1] = pal; + unkStruct.resIdList[2] = cell; + unkStruct.resIdList[3] = animation; unkStruct.spritePriority = spritePriority; - unkStruct.bgPriority = bgPriority; + unkStruct.bgPriority = bgPriority; finger = AllocFromHeap(heapId, sizeof(BattleFinger)); MI_CpuFill8(finger, 0, sizeof(BattleFinger)); @@ -55,7 +55,7 @@ BattleFinger *BattleFinger_New(SpriteRenderer *renderer, SpriteGfxHandler *gfxHa UnkImageStruct_SetSpriteVisibleFlag(finger->unk0, 0); finger->unk14 = 0xC0000; - finger->task = SysTask_CreateOnMainQueue(BattleFinger_Update, finger, 0x3e7); + finger->task = SysTask_CreateOnMainQueue(BattleFinger_Update, finger, 0x3e7); return finger; } @@ -69,8 +69,8 @@ void BattleFinger_Delete(BattleFinger *finger) { void ov12_0226BCFC(BattleFinger *finger, int x, int y, fx32 a3) { ov12_0226BEB8(finger); - finger->x = x; - finger->y = y; + finger->x = x; + finger->y = y; finger->unk14 = a3; UnkImageStruct_SetSpritePositionXY_CustomScreenYOffset(finger->unk0, x, y, a3); UnkImageStruct_SetSpriteVisibleFlag(finger->unk0, TRUE); @@ -118,7 +118,7 @@ static void BattleFinger_Update(SysTask *task, void *data) { finger->angle -= 18000; if (finger->touchRequest == TRUE) { finger->touchAnimationFlag = TRUE; - finger->touchRequest = FALSE; + finger->touchRequest = FALSE; } } @@ -167,8 +167,8 @@ static void BattleFinger_Update(SysTask *task, void *data) { } static void ov12_0226BEB8(BattleFinger *finger) { - finger->angle = 0; - finger->touchAnimationFlag = FALSE; + finger->angle = 0; + finger->touchAnimationFlag = FALSE; finger->touchAnimationState = 0; finger->touchAnimationDelay = 0; } diff --git a/src/battle/battle_hp_bar.c b/src/battle/battle_hp_bar.c index 1b8e091df7..0ecf4271d5 100644 --- a/src/battle/battle_hp_bar.c +++ b/src/battle/battle_hp_bar.c @@ -288,162 +288,162 @@ static void ov12_02265DA0(BattleHpBar *hpBar); static void ov12_02265DC4(SysTask *task, void *data); static const UnkTemplate_0200D748 sSpriteTemplate_HpBarSinglePlayer = { - .x = 0xC0, - .y = 0x74, - .z = 0, - .animation = 0, + .x = 0xC0, + .y = 0x74, + .z = 0, + .animation = 0, .spritePriority = 0x17, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xBF, - 20006, - 0xBE, - 0xBD, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xBF, + 20006, + 0xBE, + 0xBD, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; static const UnkTemplate_0200D748 sSpriteTemplate_HpBarSingleEnemy = { - .x = 0x3A, - .y = 0x24, - .z = 0, - .animation = 0, + .x = 0x3A, + .y = 0x24, + .z = 0, + .animation = 0, .spritePriority = 0x18, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xBC, - 20006, - 0xBB, - 0xBA, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xBC, + 20006, + 0xBB, + 0xBA, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; static const UnkTemplate_0200D748 sSpriteTemplate_HpBarDoublePlayerLHS = { - .x = 0xC0, - .y = 0x67, - .z = 0, - .animation = 0, + .x = 0xC0, + .y = 0x67, + .z = 0, + .animation = 0, .spritePriority = 0x1C, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xC8, - 20006, - 0xC7, - 0xC6, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xC8, + 20006, + 0xC7, + 0xC6, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; static const UnkTemplate_0200D748 sSpriteTemplate_HpBarDoubleEnemyLHS = { - .x = 0x40, - .y = 0x10, - .z = 0, - .animation = 0, + .x = 0x40, + .y = 0x10, + .z = 0, + .animation = 0, .spritePriority = 0x19, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xC2, - 20006, - 0xC1, - 0xC0, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xC2, + 20006, + 0xC1, + 0xC0, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; static const UnkTemplate_0200D748 sSpriteTemplate_HpBarDoublePlayerRHS = { - .x = 0xC6, - .y = 0x84, - .z = 0, - .animation = 0, + .x = 0xC6, + .y = 0x84, + .z = 0, + .animation = 0, .spritePriority = 0x1A, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xCB, - 20006, - 0xCA, - 0xC9, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xCB, + 20006, + 0xCA, + 0xC9, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; static const UnkTemplate_0200D748 sSpriteTemplate_HpBarDoubleEnemyRHS = { - .x = 0x3A, - .y = 0x2D, - .z = 0, - .animation = 0, + .x = 0x3A, + .y = 0x2D, + .z = 0, + .animation = 0, .spritePriority = 0x1B, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xC5, - 20006, - 0xC4, - 0xC3, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xC5, + 20006, + 0xC4, + 0xC3, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; static const UnkTemplate_0200D748 sSpriteTemplate_Arrow = { - .x = 0, - .y = 0, - .z = 0, - .animation = 0, + .x = 0, + .y = 0, + .z = 0, + .animation = 0, .spritePriority = 0x11, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xB9, - 20006, - 0xB8, - 0xB7, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xB9, + 20006, + 0xB8, + 0xB7, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; static const UnkTemplate_0200D748 sSpriteTemplate_HpBarSafariOrPark = { - .x = 0xC0, - .y = 0x74, - .z = 0, - .animation = 0, + .x = 0xC0, + .y = 0x74, + .z = 0, + .animation = 0, .spritePriority = 0x17, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { - 0xFD, - 20008, - 0xFE, - 0xFF, - -1, - -1, - }, - .bgPriority = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { + 0xFD, + 20008, + 0xFE, + 0xFF, + -1, + -1, + }, + .bgPriority = 0, .vramTransfer = 0 }; @@ -603,8 +603,8 @@ static void ov12_02264B4C(BattleHpBar *hpBar) { static void ov12_02264B60(BattleHpBar *hpBar) { const UnkTemplate_0200D748 *tmplate = BattleHpBar_Util_GetHpBoxSpriteTemplate(hpBar->type); - SpriteRenderer *renderer = BattleSystem_GetSpriteRenderer(hpBar->bsys); - SpriteGfxHandler *gfxHandler = BattleSystem_GetGfxHandler(hpBar->bsys); + SpriteRenderer *renderer = BattleSystem_GetSpriteRenderer(hpBar->bsys); + SpriteGfxHandler *gfxHandler = BattleSystem_GetGfxHandler(hpBar->bsys); SpriteGfxHandler_UnloadCharObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CHAR]); SpriteGfxHandler_UnloadCellObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CELL]); SpriteGfxHandler_UnloadAnimObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_ANIM]); @@ -613,7 +613,7 @@ static void ov12_02264B60(BattleHpBar *hpBar) { static void ov12_02264B94(BattleHpBar *hpBar) { const UnkTemplate_0200D748 *tmplate = BattleHpBar_Util_GetArrowSpriteTemplate(hpBar->type); if (tmplate != NULL) { - SpriteRenderer *renderer = BattleSystem_GetSpriteRenderer(hpBar->bsys); + SpriteRenderer *renderer = BattleSystem_GetSpriteRenderer(hpBar->bsys); SpriteGfxHandler *gfxHandler = BattleSystem_GetGfxHandler(hpBar->bsys); SpriteGfxHandler_UnloadCharObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CHAR]); SpriteGfxHandler_UnloadCellObjById(gfxHandler, tmplate->resIdList[GF_GFX_RES_TYPE_CELL]); @@ -631,9 +631,9 @@ void BattleHpBar_LoadResources(BattleHpBar *hpBar) { narc = NARC_New(NARC_a_0_0_8, HEAP_ID_BATTLE); - renderer = BattleSystem_GetSpriteRenderer(hpBar->bsys); + renderer = BattleSystem_GetSpriteRenderer(hpBar->bsys); gfxHandler = BattleSystem_GetGfxHandler(hpBar->bsys); - plttData = BattleSystem_GetPaletteData(hpBar->bsys); + plttData = BattleSystem_GetPaletteData(hpBar->bsys); tmplate = BattleHpBar_Util_GetHpBoxSpriteTemplate(hpBar->type); @@ -737,7 +737,7 @@ void ov12_02264C84(BattleHpBar *hpBar) { case HP_BAR_TYPE_DOUBLE_PLAYER_RHS: hpBar->unk_4F_3 ^= 1; vramBaseAddr = G2_GetOBJCharPtr(); - imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); + imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); if (hpBar->unk_4F_3 == 1) { src = BattleHpBar_Util_GetComponentRawGraphic(70); MI_CpuCopy16(src, (void *)((u32)vramBaseAddr + ov12_0226D3A8[hpBar->type].offset + 0x20 + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), 0x20); @@ -1166,13 +1166,13 @@ static void ov12_0226516C(BattleHpBar *hpBar) { BoxPokemon *boxMon; MessageFormat *msgFormat; - bgConfig = BattleSystem_GetBgConfig(hpBar->bsys); - msgData = BattleSystem_GetMessageData(hpBar->bsys); + bgConfig = BattleSystem_GetBgConfig(hpBar->bsys); + msgData = BattleSystem_GetMessageData(hpBar->bsys); msgFormat = BattleSystem_GetMessageFormat(hpBar->bsys); - string = String_New(22, HEAP_ID_BATTLE); - string2 = NewString_ReadMsgData(msgData, msg_0197_00964); + string = String_New(22, HEAP_ID_BATTLE); + string2 = NewString_ReadMsgData(msgData, msg_0197_00964); - mon = BattleSystem_GetPartyMon(hpBar->bsys, hpBar->battlerId, hpBar->monId); + mon = BattleSystem_GetPartyMon(hpBar->bsys, hpBar->battlerId, hpBar->monId); boxMon = Mon_GetBoxMon(mon); BufferBoxMonNickname(msgFormat, 0, boxMon); StringExpandPlaceholders(msgFormat, string, string2); @@ -1186,9 +1186,9 @@ static void ov12_0226516C(BattleHpBar *hpBar) { u8 *pixelBuffer; u8 *pixelBuffer2; - vramAddr = G2_GetOBJCharPtr(); - imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - pixelBuffer = srcBuf; + vramAddr = G2_GetOBJCharPtr(); + imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); + pixelBuffer = srcBuf; pixelBuffer2 = srcBuf + 0x100; MI_CpuCopy16(pixelBuffer, (void *)((u32)vramAddr + ov12_0226D680[hpBar->type][0].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D680[hpBar->type][0].size); @@ -1214,10 +1214,10 @@ static void ov12_022652D0(BattleHpBar *hpBar) { r0 = 76; r4 = 64; } - const u8 *sp0 = BattleHpBar_Util_GetComponentRawGraphic(r0); - const u8 *r7 = BattleHpBar_Util_GetComponentRawGraphic(r4); + const u8 *sp0 = BattleHpBar_Util_GetComponentRawGraphic(r0); + const u8 *r7 = BattleHpBar_Util_GetComponentRawGraphic(r4); NNSG2dImageProxy *imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - void *vramAddr = G2_GetOBJCharPtr(); + void *vramAddr = G2_GetOBJCharPtr(); MI_CpuCopy16(r7, (void *)((u32)vramAddr + ov12_0226D4B0[hpBar->type][0].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D4B0[hpBar->type][0].size); MI_CpuCopy16(sp0, (void *)((u32)vramAddr + ov12_0226D4B0[hpBar->type][1].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D4B0[hpBar->type][1].size); } @@ -1229,7 +1229,7 @@ static void ov12_02265354(BattleHpBar *hpBar) { MI_CpuFill8(r4, 0xFF, 0x60); sub_0200CEB0(BattleSystem_GetLevelNumPrinter(hpBar->bsys), hpBar->level, 3, PRINTING_MODE_LEFT_ALIGN, (void *)r4); NNSG2dImageProxy *imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - void *vramAddr = G2_GetOBJCharPtr(); + void *vramAddr = G2_GetOBJCharPtr(); MI_CpuCopy16((void *)((u32)vramAddr + ov12_0226D420[hpBar->type][0].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), r7, ov12_0226D420[hpBar->type][0].size); MI_CpuCopy16((void *)((u32)vramAddr + ov12_0226D420[hpBar->type][1].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), r7 + 0x60, ov12_0226D420[hpBar->type][1].size); k = 0; @@ -1254,7 +1254,7 @@ static void ov12_02265474(BattleHpBar *hpBar, u32 num) { MI_CpuFill8(r4, 0xFF, 0x60); sub_0200CEB0(BattleSystem_GetHpNumPrinter(hpBar->bsys), num, 3, PRINTING_MODE_RIGHT_ALIGN, (void *)r4); NNSG2dImageProxy *imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - void *vramAddr = G2_GetOBJCharPtr(); + void *vramAddr = G2_GetOBJCharPtr(); MI_CpuCopy16(r4, (void *)((u32)vramAddr + ov12_0226D450[hpBar->type][0].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D450[hpBar->type][0].size); MI_CpuCopy16(r4 + ov12_0226D450[hpBar->type][0].size, (void *)((u32)vramAddr + ov12_0226D450[hpBar->type][1].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D450[hpBar->type][1].size); @@ -1266,7 +1266,7 @@ static void ov12_02265500(BattleHpBar *hpBar) { MI_CpuFill8(r4, 0xFF, 0x60); sub_0200CEB0(BattleSystem_GetHpNumPrinter(hpBar->bsys), hpBar->maxHp, 3, PRINTING_MODE_LEFT_ALIGN, (void *)r4); NNSG2dImageProxy *imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - void *vramAddr = G2_GetOBJCharPtr(); + void *vramAddr = G2_GetOBJCharPtr(); MI_CpuCopy16(r4, (void *)((u32)vramAddr + ov12_0226D3F0[hpBar->type].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D3F0[hpBar->type].size); FreeToHeap(r4); @@ -1280,15 +1280,15 @@ static void ov12_02265560(BattleHpBar *hpBar) { r4 = BattleHpBar_Util_GetComponentRawGraphic(38); } NNSG2dImageProxy *imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - void *vramAddr = G2_GetOBJCharPtr(); + void *vramAddr = G2_GetOBJCharPtr(); MI_CpuCopy16(r4, (void *)((u32)vramAddr + ov12_0226D3C0[hpBar->type].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D3C0[hpBar->type].size); } static void ov12_022655B0(BattleHpBar *hpBar, int a1) { - const u8 *r4 = BattleHpBar_Util_GetComponentRawGraphic(a1); + const u8 *r4 = BattleHpBar_Util_GetComponentRawGraphic(a1); NNSG2dImageProxy *imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - void *vramAddr = G2_GetOBJCharPtr(); + void *vramAddr = G2_GetOBJCharPtr(); MI_CpuCopy16(r4, (void *)((u32)vramAddr + ov12_0226D390[hpBar->type].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D390[hpBar->type].size); } @@ -1302,7 +1302,7 @@ static void BattleHpBar_PrintSafariOrParkBallsString(BattleHpBar *hpBar, u32 fla String *string; bgConfig = BattleSystem_GetBgConfig(hpBar->bsys); - msgData = BattleSystem_GetMessageData(hpBar->bsys); + msgData = BattleSystem_GetMessageData(hpBar->bsys); if (flag & 0x400) { string = NewString_ReadMsgData(msgData, msg_0197_00950); // SAFARI BALLS @@ -1320,8 +1320,8 @@ static void BattleHpBar_PrintSafariOrParkBallsString(BattleHpBar *hpBar, u32 fla vramAddr = G2_GetOBJCharPtr(); imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - ptr1 = windowBuf; - ptr2 = windowBuf + 0x1A0; + ptr1 = windowBuf; + ptr2 = windowBuf + 0x1A0; MI_CpuCopy16(ptr1, (void *)((u32)vramAddr + ov12_0226D370[0].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D370[0].size); MI_CpuCopy16(ptr2, (void *)((u32)vramAddr + ov12_0226D370[1].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D370[1].size); MI_CpuCopy16(ptr1 + ov12_0226D370[0].size, (void *)((u32)vramAddr + ov12_0226D370[2].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D370[2].size); @@ -1342,8 +1342,8 @@ static void BattleHpBar_PrintNumRemainingSafariOrParkBalls(BattleHpBar *hpBar, u String *string; String *string2; - bgConfig = BattleSystem_GetBgConfig(hpBar->bsys); - msgData = BattleSystem_GetMessageData(hpBar->bsys); + bgConfig = BattleSystem_GetBgConfig(hpBar->bsys); + msgData = BattleSystem_GetMessageData(hpBar->bsys); msgFormat = BattleSystem_GetMessageFormat(hpBar->bsys); string = String_New(30, HEAP_ID_BATTLE); @@ -1365,8 +1365,8 @@ static void BattleHpBar_PrintNumRemainingSafariOrParkBalls(BattleHpBar *hpBar, u vramAddr = G2_GetOBJCharPtr(); imgProxy = Sprite_GetImageProxy(hpBar->boxObj->sprite); - ptr1 = windowBuf; - ptr2 = windowBuf + 0x1A0; + ptr1 = windowBuf; + ptr2 = windowBuf + 0x1A0; MI_CpuCopy16(ptr1, (void *)((u32)vramAddr + ov12_0226D380[0].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D380[0].size); MI_CpuCopy16(ptr2, (void *)((u32)vramAddr + ov12_0226D380[1].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D380[1].size); MI_CpuCopy16(ptr1 + ov12_0226D380[0].size, (void *)((u32)vramAddr + ov12_0226D380[2].offset + imgProxy->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]), ov12_0226D380[2].size); @@ -1430,7 +1430,7 @@ static void ov12_02265878(BattleHpBar *hpBar, u8 isExp) { tmp = 20; break; } - src = BattleHpBar_Util_GetComponentRawGraphic(tmp); + src = BattleHpBar_Util_GetComponentRawGraphic(tmp); sizeTop = ov12_0226D480[hpBar->type][0].size / 32; for (i = 0; i < 6; ++i) { if (i < sizeTop) { @@ -1500,7 +1500,7 @@ static int BattleHpBar_CalculatePixelsChangeFrame(s32 maxHp, s32 curHp, s32 delt ret = *pHpCalc >> 8; if (ret >= nowHp) { *pHpCalc = nowHp << 8; - ret = nowHp; + ret = nowHp; } } else { *pHpCalc -= hpPerPixel; @@ -1510,7 +1510,7 @@ static int BattleHpBar_CalculatePixelsChangeFrame(s32 maxHp, s32 curHp, s32 delt } if (ret <= nowHp) { *pHpCalc = nowHp << 8; - ret = nowHp; + ret = nowHp; } } } else { @@ -1555,7 +1555,7 @@ static u8 BattleHpBar_Util_MakeHpBarPixelBuffer(s32 maxHp, s32 hp, s32 deltaHp, ret = curPixels; if (curPixels == 0 && targetHp > 0) { pixelBuf[0] = 1; - ret = 1; + ret = 1; } else { for (i = 0; i < tilesWide; ++i) { if (curPixels >= 8) { @@ -1583,7 +1583,7 @@ static u32 BattleHpBar_Util_GetPixelsToGain(s32 exp, s32 gainedExp, s32 maxExp, } else if (targetExp > maxExp) { targetExp = maxExp; } - curPixels = exp * pixelsWide / maxExp; + curPixels = exp * pixelsWide / maxExp; targetPixels = targetExp * pixelsWide / maxExp; return abs(curPixels - targetPixels); } @@ -1677,17 +1677,17 @@ typedef struct BattleHpBarExpBarFullFlashEffectTaskData { } BattleHpBarExpBarFullFlashEffectTaskData; SysTask *BattleHpBar_BeginExpBarFullFlashEffect(BattleHpBar *hpBar, u8 *a1) { - *a1 = 0; + *a1 = 0; BattleHpBarExpBarFullFlashEffectTaskData *taskData = AllocFromHeap(HEAP_ID_BATTLE, sizeof(BattleHpBarExpBarFullFlashEffectTaskData)); MI_CpuFill8(taskData, 0, sizeof(BattleHpBarExpBarFullFlashEffectTaskData)); - taskData->hpBar = hpBar; + taskData->hpBar = hpBar; taskData->pDoneFlag = a1; return SysTask_CreateOnMainQueue(Task_ExpBarFullFlash, taskData, 1000); } static void Task_ExpBarFullFlash(SysTask *task, void *data) { BattleHpBarExpBarFullFlashEffectTaskData *taskData = data; - SpriteGfxHandler *gfxHandler = BattleSystem_GetGfxHandler(taskData->hpBar->bsys); + SpriteGfxHandler *gfxHandler = BattleSystem_GetGfxHandler(taskData->hpBar->bsys); int plttNum; PaletteData *plttData = BattleSystem_GetPaletteData(taskData->hpBar->bsys); @@ -1732,7 +1732,7 @@ void ov12_02265D74(BattleHpBar *hpBar) { static void ov12_02265D78(BattleHpBar *hpBar) { if (hpBar->sysTask == NULL) { - hpBar->unk54 = 0; + hpBar->unk54 = 0; hpBar->sysTask = SysTask_CreateOnMainQueue(ov12_02265DC4, hpBar, 1010); } } diff --git a/src/battle/battle_setup.c b/src/battle/battle_setup.c index 57018b7250..da82b2e53a 100644 --- a/src/battle/battle_setup.c +++ b/src/battle/battle_setup.c @@ -40,36 +40,36 @@ BattleSetup *BattleSetup_New(HeapID heapId, u32 battleTypeFlags) { int i; BattleSetup *setup = AllocFromHeap(heapId, sizeof(BattleSetup)); MI_CpuClear8(setup, sizeof(BattleSetup)); - setup->battleType = battleTypeFlags; - setup->battleSpecial = 0; - setup->winFlag = 0; - setup->battleBg = BATTLE_BG_GENERAL; - setup->terrain = TERRAIN_MAX; - setup->mapSection = 0; - setup->timeOfDay = RTC_TIMEOFDAY_MORN; + setup->battleType = battleTypeFlags; + setup->battleSpecial = 0; + setup->winFlag = 0; + setup->battleBg = BATTLE_BG_GENERAL; + setup->terrain = TERRAIN_MAX; + setup->mapSection = 0; + setup->timeOfDay = RTC_TIMEOFDAY_MORN; setup->evolutionLocation = 0; - setup->unk_164 = 1; - setup->metBill = TRUE; - setup->weatherType = 0; + setup->unk_164 = 1; + setup->metBill = TRUE; + setup->weatherType = 0; for (i = 0; i < BATTLER_MAX; ++i) { setup->trainerId[i] = 0; MI_CpuClear32(&setup->trainer[i], sizeof(Trainer)); - setup->party[i] = SaveArray_Party_Alloc(heapId); + setup->party[i] = SaveArray_Party_Alloc(heapId); setup->profile[i] = PlayerProfile_New(heapId); - setup->chatot[i] = Chatot_New(heapId); - setup->unk1CC[i] = 0xFF; + setup->chatot[i] = Chatot_New(heapId); + setup->unk1CC[i] = 0xFF; } - setup->bag = Save_Bag_New(heapId); - setup->pokedex = Pokedex_New(heapId); - setup->options = Options_New(heapId); - setup->unk_134 = sub_02067A60(heapId); - setup->bagCursor = NULL; - setup->unk1B8 = NULL; - setup->safariBalls = 0; - setup->wifiHistory = NULL; - setup->gameStats = NULL; + setup->bag = Save_Bag_New(heapId); + setup->pokedex = Pokedex_New(heapId); + setup->options = Options_New(heapId); + setup->unk_134 = sub_02067A60(heapId); + setup->bagCursor = NULL; + setup->unk1B8 = NULL; + setup->safariBalls = 0; + setup->wifiHistory = NULL; + setup->gameStats = NULL; setup->fixedDamaageMovesBanned = FALSE; - setup->bugContestMon = AllocMonZeroed(heapId); + setup->bugContestMon = AllocMonZeroed(heapId); setup->unk_19C = RngSeedFromRTC(); @@ -104,9 +104,9 @@ BattleSetup *BattleSetup_New_PalPark(HeapID heapId, int balls) { BattleSetup *BattleSetup_New_Tutorial(HeapID heapId, FieldSystem *fieldSystem) { PlayerProfile *profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - Options *options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - BattleSetup *setup = BattleSetup_New(heapId, BATTLE_TYPE_TUTORIAL); - setup->saveData = fieldSystem->saveData; + Options *options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + BattleSetup *setup = BattleSetup_New(heapId, BATTLE_TYPE_TUTORIAL); + setup->saveData = fieldSystem->saveData; { MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0445_bin, heapId); { @@ -131,11 +131,11 @@ BattleSetup *BattleSetup_New_Tutorial(HeapID heapId, FieldSystem *fieldSystem) { FreeToHeap(pokemon); } setup->unk1CC[BATTLER_PLAYER] = 0; - setup->storagePC = SaveArray_PCStorage_Get(fieldSystem->saveData); - setup->bagCursor = fieldSystem->bagCursor; - setup->unk1B8 = NULL; - setup->gameStats = Save_GameStats_Get(fieldSystem->saveData); - setup->mapNumber = fieldSystem->location->mapId; + setup->storagePC = SaveArray_PCStorage_Get(fieldSystem->saveData); + setup->bagCursor = fieldSystem->bagCursor; + setup->unk1B8 = NULL; + setup->gameStats = Save_GameStats_Get(fieldSystem->saveData); + setup->mapNumber = fieldSystem->location->mapId; BattleSetup_SetAllySideBattlersToPlayer(setup); return setup; } @@ -197,12 +197,12 @@ void sub_02051D18(BattleSetup *setup, FieldSystem *fieldSystem, SaveData *saveDa BattleBg battle_bg; profile = Save_PlayerData_GetProfileAddr(saveData); - party = SaveArray_Party_Get(saveData); - bag = Save_Bag_Get(saveData); + party = SaveArray_Party_Get(saveData); + bag = Save_Bag_Get(saveData); pokedex = Save_Pokedex_Get(saveData); - chatot = Save_Chatot_Get(saveData); + chatot = Save_Chatot_Get(saveData); options = Save_PlayerData_GetOptionsAddr(saveData); - local = Save_LocalFieldData_Get(saveData); + local = Save_LocalFieldData_Get(saveData); if (fieldSystem != NULL) { forceNite = FALSE; @@ -219,8 +219,8 @@ void sub_02051D18(BattleSetup *setup, FieldSystem *fieldSystem, SaveData *saveDa setup->unk1CC[BATTLER_PLAYER] = Save_GetPartyLeadAlive(saveData); } } else { - setup->battleBg = MapHeader_GetBattleBg(mapno); - setup->terrain = TERRAIN_BUILDING; + setup->battleBg = MapHeader_GetBattleBg(mapno); + setup->terrain = TERRAIN_BUILDING; setup->timeOfDay = GF_RTC_GetTimeOfDayByHour(Save_SysInfo_RTC_Get(saveData)->time.hour); } BattleSetup_SetProfile(setup, profile, BATTLER_PLAYER); @@ -234,24 +234,24 @@ void sub_02051D18(BattleSetup *setup, FieldSystem *fieldSystem, SaveData *saveDa Pokedex_Copy(pokedex, setup->pokedex); Options_Copy(options, setup->options); BattleSetup_SetChatotVoiceClip(setup, chatot, BATTLER_PLAYER); - setup->storagePC = SaveArray_PCStorage_Get(saveData); - setup->mapSection = MapHeader_GetMapSec(mapno); + setup->storagePC = SaveArray_PCStorage_Get(saveData); + setup->mapSection = MapHeader_GetMapSec(mapno); setup->evolutionLocation = MapHeader_GetMapEvolutionMethod(mapno); - setup->unk_164 = sub_02088288(saveData); - setup->metBill = CheckMetBill(Save_VarsFlags_Get(saveData)); + setup->unk_164 = sub_02088288(saveData); + setup->metBill = CheckMetBill(Save_VarsFlags_Get(saveData)); if (MomSavingsBalanceAction(SaveData_GetMomsSavingsAddr(saveData), MOMS_BALANCE_GET, 0) < 999999) { setup->momsSavingsActive = Save_VarsFlags_MomsSavingsFlagCheck(Save_VarsFlags_Get(saveData)); } else { setup->momsSavingsActive = FALSE; } setup->weatherType = LocalFieldData_GetWeatherType(local); - setup->bagCursor = bagCursor; - setup->unk1B8 = arg5; + setup->bagCursor = bagCursor; + setup->unk1B8 = arg5; setup->wifiHistory = Save_WiFiHistory_Get(saveData); - setup->gameStats = Save_GameStats_Get(saveData); - setup->palPad = Save_PalPad_Get(saveData); - setup->mapNumber = mapno; - setup->saveData = saveData; + setup->gameStats = Save_GameStats_Get(saveData); + setup->palPad = Save_PalPad_Get(saveData); + setup->mapNumber = mapno; + setup->saveData = saveData; } void BattleSetup_InitFromFieldSystem(BattleSetup *setup, FieldSystem *fieldSystem) { @@ -268,14 +268,14 @@ void BattleSetup_InitForFixedLevelFacility(BattleSetup *setup, FieldSystem *fiel Options *options; profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - party = SaveArray_Party_Get(fieldSystem->saveData); - bag = Save_Bag_Get(fieldSystem->saveData); + party = SaveArray_Party_Get(fieldSystem->saveData); + bag = Save_Bag_Get(fieldSystem->saveData); pokedex = Save_Pokedex_Get(fieldSystem->saveData); - chatot = Save_Chatot_Get(fieldSystem->saveData); + chatot = Save_Chatot_Get(fieldSystem->saveData); options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); setup->battleBg = BATTLE_BG_BUILDING_1; - setup->terrain = TERRAIN_BUILDING; + setup->terrain = TERRAIN_BUILDING; BattleSetup_SetProfile(setup, profile, BATTLER_PLAYER); Pokemon *pokemon = AllocMonZeroed(HEAP_ID_FIELD); @@ -295,15 +295,15 @@ void BattleSetup_InitForFixedLevelFacility(BattleSetup *setup, FieldSystem *fiel Pokedex_Copy(pokedex, setup->pokedex); Options_Copy(options, setup->options); BattleSetup_SetChatotVoiceClip(setup, chatot, BATTLER_PLAYER); - setup->storagePC = SaveArray_PCStorage_Get(fieldSystem->saveData); - setup->timeOfDay = Field_GetTimeOfDay(fieldSystem); - setup->bagCursor = fieldSystem->bagCursor; - setup->unk1B8 = fieldSystem->unkB0; + setup->storagePC = SaveArray_PCStorage_Get(fieldSystem->saveData); + setup->timeOfDay = Field_GetTimeOfDay(fieldSystem); + setup->bagCursor = fieldSystem->bagCursor; + setup->unk1B8 = fieldSystem->unkB0; setup->wifiHistory = Save_WiFiHistory_Get(fieldSystem->saveData); - setup->gameStats = Save_GameStats_Get(fieldSystem->saveData); - setup->palPad = Save_PalPad_Get(fieldSystem->saveData); - setup->mapNumber = fieldSystem->location->mapId; - setup->saveData = fieldSystem->saveData; + setup->gameStats = Save_GameStats_Get(fieldSystem->saveData); + setup->palPad = Save_PalPad_Get(fieldSystem->saveData); + setup->mapNumber = fieldSystem->location->mapId; + setup->saveData = fieldSystem->saveData; BattleSetup_SetAllySideBattlersToPlayer(setup); } @@ -316,14 +316,14 @@ void sub_020520B0(BattleSetup *setup, FieldSystem *fieldSystem, Party *party, u8 void *ruleset; profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - bag = Save_Bag_Get(fieldSystem->saveData); + bag = Save_Bag_Get(fieldSystem->saveData); pokedex = Save_Pokedex_Get(fieldSystem->saveData); - chatot = Save_Chatot_Get(fieldSystem->saveData); + chatot = Save_Chatot_Get(fieldSystem->saveData); options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); ruleset = fieldSystem->linkBattleRuleset; setup->battleBg = BATTLE_BG_BUILDING_1; - setup->terrain = TERRAIN_BUILDING; + setup->terrain = TERRAIN_BUILDING; BattleSetup_SetProfile(setup, profile, BATTLER_PLAYER); if (partySlots == NULL) { @@ -366,19 +366,19 @@ void sub_020520B0(BattleSetup *setup, FieldSystem *fieldSystem, Party *party, u8 Pokedex_Copy(pokedex, setup->pokedex); Options_Copy(options, setup->options); BattleSetup_SetChatotVoiceClip(setup, chatot, BATTLER_PLAYER); - setup->storagePC = SaveArray_PCStorage_Get(fieldSystem->saveData); - setup->timeOfDay = Field_GetTimeOfDay(fieldSystem); - setup->bagCursor = fieldSystem->bagCursor; - setup->unk1B8 = fieldSystem->unkB0; + setup->storagePC = SaveArray_PCStorage_Get(fieldSystem->saveData); + setup->timeOfDay = Field_GetTimeOfDay(fieldSystem); + setup->bagCursor = fieldSystem->bagCursor; + setup->unk1B8 = fieldSystem->unkB0; setup->wifiHistory = Save_WiFiHistory_Get(fieldSystem->saveData); - setup->gameStats = Save_GameStats_Get(fieldSystem->saveData); - setup->mapNumber = fieldSystem->location->mapId; - setup->palPad = Save_PalPad_Get(fieldSystem->saveData); - setup->saveData = fieldSystem->saveData; + setup->gameStats = Save_GameStats_Get(fieldSystem->saveData); + setup->mapNumber = fieldSystem->location->mapId; + setup->palPad = Save_PalPad_Get(fieldSystem->saveData); + setup->saveData = fieldSystem->saveData; if (sub_0203401C(sub_0203993C())) { - int avatar = PlayerProfile_GetAvatar(profile); - int gender = PlayerProfile_GetTrainerGender(profile); + int avatar = PlayerProfile_GetAvatar(profile); + int gender = PlayerProfile_GetTrainerGender(profile); setup->trainer[BATTLER_PLAYER].data.trainerClass = GetUnionRoomAvatarAttrBySprite(gender, avatar, 1); CopyU16StringArray(setup->trainer[BATTLER_PLAYER].name, PlayerProfile_GetNamePtr(setup->profile[BATTLER_PLAYER])); setup->trainer[BATTLER_PLAYER2] = setup->trainer[BATTLER_PLAYER]; @@ -393,11 +393,11 @@ void sub_020522F0(BattleSetup *setup, FieldSystem *fieldSystem, void *partySlots static void sub_0205230C(FieldSystem *fieldSystem, PlayerProfile *profile1, PlayerProfile *profile2) { SaveVarsFlags *vars_flags = Save_VarsFlags_Get(fieldSystem->saveData); - MomsSavings *savings = SaveData_GetMomsSavingsAddr(fieldSystem->saveData); + MomsSavings *savings = SaveData_GetMomsSavingsAddr(fieldSystem->saveData); if (Save_VarsFlags_MomsSavingsFlagCheck(vars_flags)) { - u32 money2 = PlayerProfile_GetMoney(profile2); - int delta = (int)(money2 - PlayerProfile_GetMoney(profile1)) / 4; + u32 money2 = PlayerProfile_GetMoney(profile2); + int delta = (int)(money2 - PlayerProfile_GetMoney(profile1)) / 4; u32 savingsBalance = MomSavingsBalanceAction(savings, MOMS_BALANCE_GET, 0); u32 balanceResult; if (delta > 0) { @@ -424,8 +424,8 @@ void sub_0205239C(BattleSetup *setup, FieldSystem *fieldSystem) { u16 *balls_ptr; profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - party = SaveArray_Party_Get(fieldSystem->saveData); - bag = Save_Bag_Get(fieldSystem->saveData); + party = SaveArray_Party_Get(fieldSystem->saveData); + bag = Save_Bag_Get(fieldSystem->saveData); pokedex = Save_Pokedex_Get(fieldSystem->saveData); sub_0205230C(fieldSystem, profile, setup->profile[BATTLER_PLAYER]); @@ -434,7 +434,7 @@ void sub_0205239C(BattleSetup *setup, FieldSystem *fieldSystem) { Save_Bag_Copy(setup->bag, bag); Pokedex_Copy(setup->pokedex, pokedex); - balls_ptr = NULL; + balls_ptr = NULL; vars_flags = Save_VarsFlags_Get(fieldSystem->saveData); if (Save_VarsFlags_CheckSafariSysFlag(vars_flags)) { balls_ptr = LocalFieldData_GetSafariBallsCounter(Save_LocalFieldData_Get(fieldSystem->saveData)); @@ -453,37 +453,37 @@ void sub_02052444(BattleSetup *setup, FieldSystem *fieldSystem) { Pokedex *pokedex; profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - party = SaveArray_Party_Get(fieldSystem->saveData); - bag = Save_Bag_Get(fieldSystem->saveData); + party = SaveArray_Party_Get(fieldSystem->saveData); + bag = Save_Bag_Get(fieldSystem->saveData); pokedex = Save_Pokedex_Get(fieldSystem->saveData); Pokedex_Copy(setup->pokedex, pokedex); } static const Terrain _020FC4C0[] = { - [BATTLE_BG_GENERAL] = TERRAIN_PLAIN, - [BATTLE_BG_OCEAN] = TERRAIN_WATER, - [BATTLE_BG_CITY] = TERRAIN_BUILDING, - [BATTLE_BG_FOREST] = TERRAIN_GRASS, - [BATTLE_BG_MOUNTAIN] = TERRAIN_MOUNTAIN, - [BATTLE_BG_SNOW] = TERRAIN_SNOW, - [BATTLE_BG_BUILDING_1] = TERRAIN_BUILDING, - [BATTLE_BG_BUILDING_2] = TERRAIN_BUILDING, - [BATTLE_BG_BUILDING_3] = TERRAIN_BUILDING, - [BATTLE_BG_CAVE_1] = TERRAIN_CAVE, - [BATTLE_BG_CAVE_2] = TERRAIN_CAVE, - [BATTLE_BG_CAVE_3] = TERRAIN_CAVE, - [BATTLE_BG_WILL] = TERRAIN_WILL, - [BATTLE_BG_KOGA] = TERRAIN_KOGA, - [BATTLE_BG_BRUNO] = TERRAIN_BRUNO, - [BATTLE_BG_KAREN] = TERRAIN_KAREN, - [BATTLE_BG_LANCE] = TERRAIN_LANCE, + [BATTLE_BG_GENERAL] = TERRAIN_PLAIN, + [BATTLE_BG_OCEAN] = TERRAIN_WATER, + [BATTLE_BG_CITY] = TERRAIN_BUILDING, + [BATTLE_BG_FOREST] = TERRAIN_GRASS, + [BATTLE_BG_MOUNTAIN] = TERRAIN_MOUNTAIN, + [BATTLE_BG_SNOW] = TERRAIN_SNOW, + [BATTLE_BG_BUILDING_1] = TERRAIN_BUILDING, + [BATTLE_BG_BUILDING_2] = TERRAIN_BUILDING, + [BATTLE_BG_BUILDING_3] = TERRAIN_BUILDING, + [BATTLE_BG_CAVE_1] = TERRAIN_CAVE, + [BATTLE_BG_CAVE_2] = TERRAIN_CAVE, + [BATTLE_BG_CAVE_3] = TERRAIN_CAVE, + [BATTLE_BG_WILL] = TERRAIN_WILL, + [BATTLE_BG_KOGA] = TERRAIN_KOGA, + [BATTLE_BG_BRUNO] = TERRAIN_BRUNO, + [BATTLE_BG_KAREN] = TERRAIN_KAREN, + [BATTLE_BG_LANCE] = TERRAIN_LANCE, [BATTLE_BG_DISTORTION_WORLD] = TERRAIN_DISTORTION_WORLD, - [BATTLE_BG_BATTLE_TOWER] = TERRAIN_BATTLE_TOWER, - [BATTLE_BG_BATTLE_FACTORY] = TERRAIN_BATTLE_FACTORY, - [BATTLE_BG_BATTLE_ARCADE] = TERRAIN_BATTLE_ARCADE, - [BATTLE_BG_BATTLE_CASTLE] = TERRAIN_BATTLE_CASTLE, - [BATTLE_BG_BATTLE_HALL] = TERRAIN_BATTLE_HALL, + [BATTLE_BG_BATTLE_TOWER] = TERRAIN_BATTLE_TOWER, + [BATTLE_BG_BATTLE_FACTORY] = TERRAIN_BATTLE_FACTORY, + [BATTLE_BG_BATTLE_ARCADE] = TERRAIN_BATTLE_ARCADE, + [BATTLE_BG_BATTLE_CASTLE] = TERRAIN_BATTLE_CASTLE, + [BATTLE_BG_BATTLE_HALL] = TERRAIN_BATTLE_HALL, }; static Terrain FieldSystem_GetTerrainFromStandingTile(FieldSystem *fieldSystem, BattleBg battleBg) { @@ -520,7 +520,7 @@ static Terrain FieldSystem_GetTerrainFromStandingTile(FieldSystem *fieldSystem, static void sub_02052504(BattleSetup *setup, FieldSystem *fieldSystem) { PlayerSaveData *player = LocalFieldData_GetPlayer(Save_LocalFieldData_Get(fieldSystem->saveData)); - setup->battleBg = MapHeader_GetBattleBg(fieldSystem->location->mapId); + setup->battleBg = MapHeader_GetBattleBg(fieldSystem->location->mapId); if (player->unk4 == 2) { setup->battleBg = BATTLE_BG_OCEAN; diff --git a/src/battle/battle_system.c b/src/battle/battle_system.c index 6d70a2a90f..574a7969cc 100644 --- a/src/battle/battle_system.c +++ b/src/battle/battle_system.c @@ -300,7 +300,7 @@ int BattleSystem_GetLocation(BattleSystem *bsys) { int BattleSystem_GetBattlerIdPartner(BattleSystem *bsys, int battlerId) { int battlerIdPartner; int maxBattlers = BattleSystem_GetMaxBattlers(bsys); - u32 battleType = BattleSystem_GetBattleType(bsys); + u32 battleType = BattleSystem_GetBattleType(bsys); if (!(battleType & BATTLE_TYPE_DOUBLES)) { return battlerId; @@ -318,7 +318,7 @@ int BattleSystem_GetBattlerIdPartner(BattleSystem *bsys, int battlerId) { int ov12_0223ABB8(BattleSystem *bsys, int battlerId, int side) { int battlerIdOpponent; int maxBattlers = BattleSystem_GetMaxBattlers(bsys); - u32 battleType = BattleSystem_GetBattleType(bsys); + u32 battleType = BattleSystem_GetBattleType(bsys); if (!(battleType & BATTLE_TYPE_DOUBLES)) { return battlerId ^ 1; @@ -350,7 +350,7 @@ BOOL BattleSystem_RecoverStatus(BattleSystem *bsys, int battlerId, int selectedM } else { index2 = index1; } - mon = BattleSystem_GetPartyMon(bsys, battlerId, selectedMonIndex); + mon = BattleSystem_GetPartyMon(bsys, battlerId, selectedMonIndex); friendship = 0; if (GetItemAttr(item, ITEMATTR_SLP_HEAL, HEAP_ID_BATTLE)) { @@ -714,7 +714,7 @@ u16 BattleSystem_CheckEvolution(BattleSetup *setup, int *selectedMonIndex, int * } } if (*selectedMonIndex < PARTY_SIZE) { - mon = Party_GetMonByIndex(setup->party[0], *selectedMonIndex); + mon = Party_GetMonByIndex(setup->party[0], *selectedMonIndex); species = GetMonEvolution(setup->party[0], mon, EVOCTX_LEVELUP, setup->evolutionLocation, evolutionCondition); if (species) { return species; @@ -792,7 +792,7 @@ void BattleSystem_TryChangeForm(BattleSystem *bsys) { } for (i = 0; i < BattleSystem_GetPartySize(bsys, BATTLER_PLAYER); i++) { - mon = BattleSystem_GetPartyMon(bsys, BATTLER_PLAYER, i); + mon = BattleSystem_GetPartyMon(bsys, BATTLER_PLAYER, i); species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); if (species == SPECIES_BURMY && bsys->unk2418[BATTLER_PLAYER] & MaskOfFlagNo(i)) { switch (BattleSystem_GetTerrainId(bsys)) { @@ -856,7 +856,7 @@ void BattleSystem_SetBackground(BattleSystem *bsys) { src = (u32 *)PaletteData_GetUnfadedBuf(bsys->palette, PLTTBUF_MAIN_BG); MIi_CpuCopy32(src, dst, 0x200); - vram = (u8 *)0x6400000; + vram = (u8 *)0x6400000; image = Sprite_GetImageProxy(bsys->unk17C[1].unk0->sprite); vram += image->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]; @@ -883,7 +883,7 @@ void BattleSystem_SetBackground(BattleSystem *bsys) { } } - vram = (u8 *)0x6400000; + vram = (u8 *)0x6400000; image = Sprite_GetImageProxy(bsys->unk17C[0].unk0->sprite); vram += image->vramLocation.baseAddrOfVram[NNS_G2D_VRAM_TYPE_2DMAIN]; @@ -1040,7 +1040,7 @@ void BattleSystem_HpBar_Init(BattleSystem *bsys) { BattleHpBar *hpBar; for (i = 0; i < bsys->maxBattlers; i++) { - hpBar = OpponentData_GetHpBar(bsys->opponentData[i]); + hpBar = OpponentData_GetHpBar(bsys->opponentData[i]); hpBar->bsys = bsys; hpBar->type = BattleHpBar_Util_GetBarTypeFromBattlerSide(ov12_02261258(bsys->opponentData[i]), BattleSystem_GetBattleType(bsys)); BattleHpBar_LoadResources(hpBar); @@ -1179,7 +1179,7 @@ void ov12_0223BF14(BattleSystem *bsys, u16 size, u8 *buffer) { while (size) { battlerId = ov12_0223BFB0(buffer, &index, &size); - byte = ov12_0223BFB0(buffer, &index, &size); + byte = ov12_0223BFB0(buffer, &index, &size); for (i = 0; i < byte; i++) { sub_02030260(battlerId, bsys->unk2454[battlerId] + i, ov12_0223BFB0(buffer, &index, &size)); } @@ -1318,7 +1318,7 @@ u32 CalcMoneyLoss(Party *party, PlayerProfile *profile) { if (badgeCount > 8) { badgeCount = 8; } - u32 loss = Party_GetMaxLevel(party) * 4 * sBadgePenalty[badgeCount]; + u32 loss = Party_GetMaxLevel(party) * 4 * sBadgePenalty[badgeCount]; u32 money = PlayerProfile_GetMoney(profile); if (loss > money) { @@ -1329,7 +1329,7 @@ u32 CalcMoneyLoss(Party *party, PlayerProfile *profile) { } void BattleSystem_SetPokedexSeen(BattleSystem *bsys, int battlerId) { - u32 flag = ov12_02261258(bsys->opponentData[battlerId]); + u32 flag = ov12_02261258(bsys->opponentData[battlerId]); Pokemon *mon = BattleSystem_GetPartyMon(bsys, battlerId, ov12_022581D4(bsys, bsys->ctx, 2, battlerId)); if (!(bsys->battleType & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER))) { @@ -1347,7 +1347,7 @@ void BattleSystem_SetPokedexCaught(BattleSystem *bsys, int battlerId) { if (!(bsys->battleType & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER)) && (flag & 1)) { int selectedMonIndex = ov12_022581D4(bsys, bsys->ctx, 2, battlerId); - Pokemon *mon = BattleSystem_GetPartyMon(bsys, battlerId, selectedMonIndex); + Pokemon *mon = BattleSystem_GetPartyMon(bsys, battlerId, selectedMonIndex); Pokedex_SetMonCaughtFlag(bsys->pokedex, mon); } } @@ -1403,7 +1403,7 @@ u8 BattleSystem_PrintTrainerMessage(BattleSystem *bsys, int trainerId, int battl } data = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, msgId, HEAP_ID_BATTLE); - msg = NewString_ReadMsgData(data, stringId); + msg = NewString_ReadMsgData(data, stringId); FillWindowPixelBuffer(window, 0xFF); String_Copy(bsys->msgBuffer, msg); index = AddTextPrinterParameterized(window, 1, bsys->msgBuffer, 0, 0, delay, ov12_0223CF14); diff --git a/src/battle/overlay_12_0224E4FC.c b/src/battle/overlay_12_0224E4FC.c index 5d799d3063..493c8b06da 100644 --- a/src/battle/overlay_12_0224E4FC.c +++ b/src/battle/overlay_12_0224E4FC.c @@ -47,26 +47,26 @@ void BattleSystem_GetBattleMon(BattleSystem *bsys, BattleContext *ctx, int battl struct PokedexData *dexData; ctx->battleMons[battlerId].species = GetMonData(mon, MON_DATA_SPECIES, NULL); - ctx->battleMons[battlerId].atk = GetMonData(mon, MON_DATA_ATK, NULL); - ctx->battleMons[battlerId].def = GetMonData(mon, MON_DATA_DEF, NULL); - ctx->battleMons[battlerId].speed = GetMonData(mon, MON_DATA_SPEED, NULL); - ctx->battleMons[battlerId].spAtk = GetMonData(mon, MON_DATA_SPATK, NULL); - ctx->battleMons[battlerId].spDef = GetMonData(mon, MON_DATA_SPDEF, NULL); + ctx->battleMons[battlerId].atk = GetMonData(mon, MON_DATA_ATK, NULL); + ctx->battleMons[battlerId].def = GetMonData(mon, MON_DATA_DEF, NULL); + ctx->battleMons[battlerId].speed = GetMonData(mon, MON_DATA_SPEED, NULL); + ctx->battleMons[battlerId].spAtk = GetMonData(mon, MON_DATA_SPATK, NULL); + ctx->battleMons[battlerId].spDef = GetMonData(mon, MON_DATA_SPDEF, NULL); for (i = 0; i < 4; i++) { - ctx->battleMons[battlerId].moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); + ctx->battleMons[battlerId].moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); ctx->battleMons[battlerId].movePPCur[i] = GetMonData(mon, MON_DATA_MOVE1PP + i, NULL); - ctx->battleMons[battlerId].movePP[i] = GetMonData(mon, MON_DATA_MOVE1PPUP + i, NULL); + ctx->battleMons[battlerId].movePP[i] = GetMonData(mon, MON_DATA_MOVE1PPUP + i, NULL); } - ctx->battleMons[battlerId].hpIV = GetMonData(mon, MON_DATA_HP_IV, NULL); - ctx->battleMons[battlerId].atkIV = GetMonData(mon, MON_DATA_ATK_IV, NULL); - ctx->battleMons[battlerId].defIV = GetMonData(mon, MON_DATA_DEF_IV, NULL); + ctx->battleMons[battlerId].hpIV = GetMonData(mon, MON_DATA_HP_IV, NULL); + ctx->battleMons[battlerId].atkIV = GetMonData(mon, MON_DATA_ATK_IV, NULL); + ctx->battleMons[battlerId].defIV = GetMonData(mon, MON_DATA_DEF_IV, NULL); ctx->battleMons[battlerId].speedIV = GetMonData(mon, MON_DATA_SPEED_IV, NULL); ctx->battleMons[battlerId].spAtkIV = GetMonData(mon, MON_DATA_SPATK_IV, NULL); ctx->battleMons[battlerId].spDefIV = GetMonData(mon, MON_DATA_SPDEF_IV, NULL); - ctx->battleMons[battlerId].isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); + ctx->battleMons[battlerId].isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); ctx->battleMons[battlerId].hasNickname = GetMonData(mon, MON_DATA_HAS_NICKNAME, NULL); if (!(ctx->battleStatus & BATTLE_STATUS_BATON_PASS)) { @@ -75,32 +75,32 @@ void BattleSystem_GetBattleMon(BattleSystem *bsys, BattleContext *ctx, int battl } } - ctx->battleMons[battlerId].sendOutFlag = 0; - ctx->battleMons[battlerId].intimidateFlag = 0; - ctx->battleMons[battlerId].traceFlag = 0; - ctx->battleMons[battlerId].downloadFlag = 0; + ctx->battleMons[battlerId].sendOutFlag = 0; + ctx->battleMons[battlerId].intimidateFlag = 0; + ctx->battleMons[battlerId].traceFlag = 0; + ctx->battleMons[battlerId].downloadFlag = 0; ctx->battleMons[battlerId].anticipationFlag = 0; - ctx->battleMons[battlerId].forewarnFlag = 0; - ctx->battleMons[battlerId].slowStartFlag = 0; - ctx->battleMons[battlerId].slowStartEnded = 0; - ctx->battleMons[battlerId].friskFlag = 0; - ctx->battleMons[battlerId].moldBreakerFlag = 0; - ctx->battleMons[battlerId].pressureFlag = 0; + ctx->battleMons[battlerId].forewarnFlag = 0; + ctx->battleMons[battlerId].slowStartFlag = 0; + ctx->battleMons[battlerId].slowStartEnded = 0; + ctx->battleMons[battlerId].friskFlag = 0; + ctx->battleMons[battlerId].moldBreakerFlag = 0; + ctx->battleMons[battlerId].pressureFlag = 0; ctx->battleMons[battlerId].type1 = GetMonData(mon, MON_DATA_TYPE_1, NULL); ctx->battleMons[battlerId].type2 = GetMonData(mon, MON_DATA_TYPE_2, NULL); ctx->battleMons[battlerId].gender = GetMonGender(mon); - ctx->battleMons[battlerId].shiny = MonIsShiny(mon); + ctx->battleMons[battlerId].shiny = MonIsShiny(mon); if (BattleSystem_GetBattleType(bsys) & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_PAL_PARK)) { // No abilities battle ctx->battleMons[battlerId].ability = 0; - ctx->battleMons[battlerId].status = 0; - ctx->battleMons[battlerId].item = 0; + ctx->battleMons[battlerId].status = 0; + ctx->battleMons[battlerId].item = 0; } else { ctx->battleMons[battlerId].ability = GetMonData(mon, MON_DATA_ABILITY, NULL); - ctx->battleMons[battlerId].status = GetMonData(mon, MON_DATA_STATUS, NULL); - ctx->battleMons[battlerId].item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); + ctx->battleMons[battlerId].status = GetMonData(mon, MON_DATA_STATUS, NULL); + ctx->battleMons[battlerId].item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); } if ((BattleSystem_GetBattleType(bsys) & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_PAL_PARK)) && !BattleSystem_GetFieldSide(bsys, battlerId)) { @@ -109,16 +109,16 @@ void BattleSystem_GetBattleMon(BattleSystem *bsys, BattleContext *ctx, int battl ctx->battleMons[battlerId].form = GetMonData(mon, MON_DATA_FORM, NULL); } - ctx->battleMons[battlerId].level = GetMonData(mon, MON_DATA_LEVEL, NULL); + ctx->battleMons[battlerId].level = GetMonData(mon, MON_DATA_LEVEL, NULL); ctx->battleMons[battlerId].friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - ctx->battleMons[battlerId].hp = GetMonData(mon, MON_DATA_HP, NULL); + ctx->battleMons[battlerId].hp = GetMonData(mon, MON_DATA_HP, NULL); ctx->battleMons[battlerId].maxHp = GetMonData(mon, MON_DATA_MAXHP, NULL); - ctx->battleMons[battlerId].exp = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); + ctx->battleMons[battlerId].exp = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); ctx->battleMons[battlerId].personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); - ctx->battleMons[battlerId].otid = GetMonData(mon, MON_DATA_OTID, NULL); - ctx->battleMons[battlerId].metGender = GetMonData(mon, MON_DATA_MET_GENDER, NULL); + ctx->battleMons[battlerId].otid = GetMonData(mon, MON_DATA_OTID, NULL); + ctx->battleMons[battlerId].metGender = GetMonData(mon, MON_DATA_MET_GENDER, NULL); ctx->battleMons[battlerId].ball = BattleSystem_GetMonBall(bsys, mon); @@ -134,13 +134,13 @@ void BattleSystem_GetBattleMon(BattleSystem *bsys, BattleContext *ctx, int battl GetMonData(mon, MON_DATA_NICKNAME_FLAT, ctx->battleMons[battlerId].nickname); GetMonData(mon, MON_DATA_OT_NAME, ctx->battleMons[battlerId].otName); - ctx->battleMons[battlerId].unk78 = 0; + ctx->battleMons[battlerId].unk78 = 0; ctx->battleMons[battlerId].msgFlag = 0; side = BattleSystem_GetFieldSide(bsys, battlerId); if (ctx->fieldSideConditionData[side].battlerBitKnockedOffItem & MaskOfFlagNo(ctx->selectedMonIndex[battlerId])) { - ctx->battleMons[battlerId].item = 0; + ctx->battleMons[battlerId].item = 0; ctx->battleMons[battlerId].unk88.knockOffFlag = FALSE; } else if (ctx->battleMons[battlerId].item) { ctx->battleMons[battlerId].unk88.knockOffFlag = TRUE; @@ -151,22 +151,22 @@ void BattleSystem_ReloadMonData(BattleSystem *bsys, BattleContext *ctx, int batt Pokemon *mon = BattleSystem_GetPartyMon(bsys, battlerId, monIndex); int i; - ctx->battleMons[battlerId].atk = GetMonData(mon, MON_DATA_ATK, NULL); - ctx->battleMons[battlerId].def = GetMonData(mon, MON_DATA_DEF, NULL); - ctx->battleMons[battlerId].speed = GetMonData(mon, MON_DATA_SPEED, NULL); - ctx->battleMons[battlerId].spAtk = GetMonData(mon, MON_DATA_SPATK, NULL); - ctx->battleMons[battlerId].spDef = GetMonData(mon, MON_DATA_SPDEF, NULL); - ctx->battleMons[battlerId].level = GetMonData(mon, MON_DATA_LEVEL, NULL); + ctx->battleMons[battlerId].atk = GetMonData(mon, MON_DATA_ATK, NULL); + ctx->battleMons[battlerId].def = GetMonData(mon, MON_DATA_DEF, NULL); + ctx->battleMons[battlerId].speed = GetMonData(mon, MON_DATA_SPEED, NULL); + ctx->battleMons[battlerId].spAtk = GetMonData(mon, MON_DATA_SPATK, NULL); + ctx->battleMons[battlerId].spDef = GetMonData(mon, MON_DATA_SPDEF, NULL); + ctx->battleMons[battlerId].level = GetMonData(mon, MON_DATA_LEVEL, NULL); ctx->battleMons[battlerId].friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - ctx->battleMons[battlerId].hp = GetMonData(mon, MON_DATA_HP, NULL); - ctx->battleMons[battlerId].maxHp = GetMonData(mon, MON_DATA_MAXHP, NULL); + ctx->battleMons[battlerId].hp = GetMonData(mon, MON_DATA_HP, NULL); + ctx->battleMons[battlerId].maxHp = GetMonData(mon, MON_DATA_MAXHP, NULL); if (!(ctx->battleMons[battlerId].status2 & STATUS2_TRANSFORM)) { for (i = 0; i < 4; i++) { if (!(ctx->battleMons[battlerId].unk88.mimicedMoveIndex & MaskOfFlagNo(i))) { - ctx->battleMons[battlerId].moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); + ctx->battleMons[battlerId].moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); ctx->battleMons[battlerId].movePPCur[i] = GetMonData(mon, MON_DATA_MOVE1PP + i, NULL); - ctx->battleMons[battlerId].movePP[i] = GetMonData(mon, MON_DATA_MOVE1PPUP + i, NULL); + ctx->battleMons[battlerId].movePP[i] = GetMonData(mon, MON_DATA_MOVE1PPUP + i, NULL); } } ctx->battleMons[battlerId].exp = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); @@ -177,7 +177,7 @@ void ReadBattleScriptFromNarc(BattleContext *ctx, NarcId narcId, int fileId) { GF_ASSERT(GetNarcMemberSizeByIdPair(narcId, fileId) < 1600); ctx->scriptNarcId = narcId; ctx->scriptFileId = fileId; - ctx->scriptSeqNo = 0; + ctx->scriptSeqNo = 0; ReadWholeNarcMemberByIdPair(&ctx->battleScriptBuffer, narcId, fileId); } @@ -191,7 +191,7 @@ void ov12_0224EBDC(BattleContext *ctx, NarcId narcId, int fileId) { ctx->unk_B8++; ctx->scriptNarcId = narcId; ctx->scriptFileId = fileId; - ctx->scriptSeqNo = 0; + ctx->scriptSeqNo = 0; ReadWholeNarcMemberByIdPair(&ctx->battleScriptBuffer, narcId, fileId); } @@ -485,11 +485,11 @@ int GetBattlerVar(BattleContext *ctx, int battlerId, u32 id, void *data) { } void SetBattlerVar(BattleContext *ctx, int battlerId, u32 id, void *data) { - u32 *data32 = (u32 *)data; - u16 *data16 = (u16 *)data; - s16 *datas16 = (s16 *)data; - u8 *data8 = (u8 *)data; - s8 *datas8 = (s8 *)data; + u32 *data32 = (u32 *)data; + u16 *data16 = (u16 *)data; + s16 *datas16 = (s16 *)data; + u8 *data8 = (u8 *)data; + s8 *datas8 = (s8 *)data; BattleMon *mon = &ctx->battleMons[battlerId]; switch (id) { @@ -515,7 +515,7 @@ void SetBattlerVar(BattleContext *ctx, int battlerId, u32 id, void *data) { case BMON_DATA_MOVE2: case BMON_DATA_MOVE3: case BMON_DATA_MOVE4: { - int index = id - BMON_DATA_MOVE1; + int index = id - BMON_DATA_MOVE1; mon->moves[index] = *data16; } break; case BMON_DATA_HP_IV: @@ -550,7 +550,7 @@ void SetBattlerVar(BattleContext *ctx, int battlerId, u32 id, void *data) { case BMON_DATA_STAT_CHANGE_SPDEF: case BMON_DATA_STAT_CHANGE_ACC: case BMON_DATA_STAT_CHANGE_EVASION: { - int index = id - BMON_DATA_STAT_CHANGE_HP; + int index = id - BMON_DATA_STAT_CHANGE_HP; mon->statChanges[index] = *datas8; } break; case BMON_DATA_ABILITY: @@ -572,14 +572,14 @@ void SetBattlerVar(BattleContext *ctx, int battlerId, u32 id, void *data) { case BMON_DATA_CUR_PP_2: case BMON_DATA_CUR_PP_3: case BMON_DATA_CUR_PP_4: { - int index = id - BMON_DATA_CUR_PP_1; + int index = id - BMON_DATA_CUR_PP_1; mon->movePPCur[index] = *data8; } break; case BMON_DATA_PP_UPS_1: case BMON_DATA_PP_UPS_2: case BMON_DATA_PP_UPS_3: case BMON_DATA_PP_UPS_4: { - int index = id - BMON_DATA_PP_UPS_1; + int index = id - BMON_DATA_PP_UPS_1; mon->movePP[index] = *data8; } break; case BMON_DATA_MAX_PP_1: @@ -966,8 +966,8 @@ u8 CheckSortSpeed(BattleSystem *bsys, BattleContext *ctx, int battlerId1, int ba u8 extra1; u8 heldItem2; u8 extra2; - s8 movePriority1 = 0; - s8 movePriority2 = 0; + s8 movePriority1 = 0; + s8 movePriority2 = 0; u8 boostedPriority1 = 0; u8 boostedPriority2 = 0; u8 loweredPriority1 = 0; @@ -993,9 +993,9 @@ u8 CheckSortSpeed(BattleSystem *bsys, BattleContext *ctx, int battlerId1, int ba ability2 = GetBattlerAbility(ctx, battlerId2); heldItem1 = GetBattlerHeldItemEffect(ctx, battlerId1); - extra1 = GetHeldItemModifier(ctx, battlerId1, 0); + extra1 = GetHeldItemModifier(ctx, battlerId1, 0); heldItem2 = GetBattlerHeldItemEffect(ctx, battlerId2); - extra2 = GetHeldItemModifier(ctx, battlerId2, 0); + extra2 = GetHeldItemModifier(ctx, battlerId2, 0); speedStatChange1 = ctx->battleMons[battlerId1].statChanges[3]; speedStatChange2 = ctx->battleMons[battlerId2].statChanges[3]; @@ -1157,8 +1157,8 @@ u8 CheckSortSpeed(BattleSystem *bsys, BattleContext *ctx, int battlerId1, int ba ctx->effectiveSpeed[battlerId2] = speed2; if (!flag) { - action1 = ctx->playerActions[battlerId1].inputSelection; - action2 = ctx->playerActions[battlerId2].inputSelection; + action1 = ctx->playerActions[battlerId1].inputSelection; + action2 = ctx->playerActions[battlerId2].inputSelection; movePos1 = ctx->movePos[battlerId1]; movePos2 = ctx->movePos[battlerId2]; if (action1 == 1) { // fight button @@ -1238,7 +1238,7 @@ void BattleSystem_ClearExperienceEarnFlags(BattleContext *ctx, int battlerId) { } void BattleSystem_SetExperienceEarnFlags(BattleSystem *bsys, BattleContext *ctx, int battlerId) { - int i = 0; + int i = 0; u32 battleType = BattleSystem_GetBattleType(bsys); while (i <= 2) { @@ -1256,7 +1256,7 @@ BOOL ov12_022503EC(BattleSystem *bsys, BattleContext *ctx, int *out) { BOOL ret = FALSE; if (ctx->unk_2170 & (1 << 29)) { - *out = GetMoveStatusChangeScript(ctx, 1, ctx->unk_2170); + *out = GetMoveStatusChangeScript(ctx, 1, ctx->unk_2170); ctx->unk_2170 = 0; if (!(ctx->moveStatusFlag & MOVE_STATUS_FAIL)) { ret = TRUE; @@ -1277,25 +1277,25 @@ BOOL ov12_02250490(BattleSystem *bsys, BattleContext *ctx, int *out) { u16 effectChance; if (ctx->unk_2174 & (1 << 29)) { - *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); + *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); ctx->unk_2174 = 0; if (!(ctx->moveStatusFlag & MOVE_STATUS_FAIL)) { ret = TRUE; } } else if (ctx->unk_2174 & (1 << 24)) { - *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); + *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); ctx->unk_2174 = 0; if (!BattlerCheckSubstitute(ctx, ctx->battlerIdStatChange) && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL)) { ret = TRUE; } } else if (ctx->unk_2174 & (1 << 25)) { - *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); + *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); ctx->unk_2174 = 0; if (ctx->battleMons[ctx->battlerIdStatChange].hp && !BattlerCheckSubstitute(ctx, ctx->battlerIdStatChange) && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL)) { ret = TRUE; } } else if (ctx->unk_2174 & (1 << 28)) { - *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); + *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); ctx->unk_2174 = 0; if (ctx->battleMons[ctx->battlerIdStatChange].hp) { ret = TRUE; @@ -1313,7 +1313,7 @@ BOOL ov12_02250490(BattleSystem *bsys, BattleContext *ctx, int *out) { if ((BattleSystem_Random(bsys) % 100) < effectChance) { ctx->battleStatus |= BATTLE_STATUS_SECONDARY_EFFECT; } - *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); + *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); ctx->unk_2174 = 0; if (!ctx->battleMons[ctx->battlerIdStatChange].hp) { @@ -1332,7 +1332,7 @@ BOOL ov12_02250490(BattleSystem *bsys, BattleContext *ctx, int *out) { GF_ASSERT(effectChance); if ((BattleSystem_Random(bsys) % 100) < effectChance) { - *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); + *out = GetMoveStatusChangeScript(ctx, 2, ctx->unk_2174); ctx->unk_2174 = 0; if (ctx->battleMons[ctx->battlerIdStatChange].hp && !BattlerCheckSubstitute(ctx, ctx->battlerIdStatChange) && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL)) { @@ -1340,7 +1340,7 @@ BOOL ov12_02250490(BattleSystem *bsys, BattleContext *ctx, int *out) { } } } else if (ctx->unk_2178) { - *out = GetMoveStatusChangeScript(ctx, 3, ctx->unk_2178); + *out = GetMoveStatusChangeScript(ctx, 3, ctx->unk_2178); ctx->unk_2178 = 0; if (ctx->battleMons[ctx->battlerIdStatChange].hp) { @@ -1363,9 +1363,9 @@ int ov12_022506D4(BattleSystem *bsys, BattleContext *ctx, int battlerIdAttacker, if (moveRange == RANGE_ADJACENT_OPPONENTS) { int battlerId; - int maxBattlers = BattleSystem_GetMaxBattlers(bsys); + int maxBattlers = BattleSystem_GetMaxBattlers(bsys); OpponentData *opponent = BattleSystem_GetOpponentData(bsys, battlerIdAttacker); - u8 flag = ov12_02261258(opponent); + u8 flag = ov12_02261258(opponent); for (ctx->unk_217E = 0; ctx->unk_217E < maxBattlers; ctx->unk_217E++) { battlerId = ctx->turnOrder[ctx->unk_217E]; @@ -1436,7 +1436,7 @@ int ov12_022506D4(BattleSystem *bsys, BattleContext *ctx, int battlerIdAttacker, } } else if (moveRange == RANGE_RANDOM_OPPONENT || a4 == 1) { int battleType = BattleSystem_GetBattleType(bsys); - int side = BattleSystem_GetFieldSide(bsys, battlerIdAttacker) ^ 1; + int side = BattleSystem_GetFieldSide(bsys, battlerIdAttacker) ^ 1; int battlerIdOpponents[2]; battlerIdOpponents[0] = ov12_0223ABB8(bsys, battlerIdAttacker, 0); battlerIdOpponents[1] = ov12_0223ABB8(bsys, battlerIdAttacker, 2); @@ -1446,7 +1446,7 @@ int ov12_022506D4(BattleSystem *bsys, BattleContext *ctx, int battlerIdAttacker, battlerIdTarget = ctx->fieldSideConditionData[side].battlerIdFollowMe; } else if (ctx->battleMons[battlerIdOpponents[0]].hp && ctx->battleMons[battlerIdOpponents[1]].hp) { // This looks like targeting for Outrage in double battles - side = BattleSystem_Random(bsys) & 1; + side = BattleSystem_Random(bsys) & 1; battlerIdTarget = battlerIdOpponents[side]; } else if (ctx->battleMons[battlerIdOpponents[0]].hp) { battlerIdTarget = battlerIdOpponents[0]; @@ -1457,7 +1457,7 @@ int ov12_022506D4(BattleSystem *bsys, BattleContext *ctx, int battlerIdAttacker, battlerIdTarget = battlerIdAttacker ^ 1; } } else { - int side = BattleSystem_GetFieldSide(bsys, battlerIdAttacker) ^ 1; + int side = BattleSystem_GetFieldSide(bsys, battlerIdAttacker) ^ 1; int battlerIdTargetTemp = ctx->playerActions[battlerIdAttacker].unk4; BattleSystem_GetMaxBattlers(bsys); @@ -1513,7 +1513,7 @@ void ov12_02250A18(BattleSystem *bsys, BattleContext *ctx, int battlerIdAttacker } if (battlerIdTarget != ctx->battlerIdTarget) { ctx->selfTurnData[battlerIdTarget].lightningRodFlag = TRUE; - ctx->battlerIdTarget = battlerIdTarget; + ctx->battlerIdTarget = battlerIdTarget; } } else if (moveType == TYPE_WATER && (ctx->trainerAIData.moveData[moveNo].range == RANGE_SINGLE_TARGET || ctx->trainerAIData.moveData[moveNo].range == RANGE_RANDOM_OPPONENT) && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && CheckAbilityActive(bsys, ctx, CHECK_ABILITY_ALL_HP_NOT_USER, battlerIdAttacker, ABILITY_STORM_DRAIN)) { for (battlerId = 0; battlerId < maxBattlers; battlerId++) { @@ -1524,7 +1524,7 @@ void ov12_02250A18(BattleSystem *bsys, BattleContext *ctx, int battlerIdAttacker } if (battlerIdTarget != ctx->battlerIdTarget) { ctx->selfTurnData[battlerIdTarget].stormDrainFlag = TRUE; - ctx->battlerIdTarget = battlerIdTarget; + ctx->battlerIdTarget = battlerIdTarget; } } } @@ -1536,16 +1536,16 @@ BOOL ov12_02250BBC(BattleSystem *bsys, BattleContext *ctx) { ctx->selfTurnData[ctx->battlerIdTarget].lightningRodFlag = FALSE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 180); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = TRUE; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = TRUE; } if (!(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && ctx->selfTurnData[ctx->battlerIdTarget].stormDrainFlag) { ctx->selfTurnData[ctx->battlerIdTarget].stormDrainFlag = FALSE; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 180); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; - ret = TRUE; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ret = TRUE; } return ret; @@ -1569,7 +1569,7 @@ void UnlockBattlerOutOfCurrentMove(BattleSystem *bsys, BattleContext *ctx, int b ctx->battleMons[battlerId].status2 &= ~STATUS2_LOCKED_INTO_MOVE; ctx->battleMons[battlerId].status2 &= ~STATUS2_BIDE; ctx->battleMons[battlerId].moveEffectFlags &= 0xDFFBFF3F; - ctx->battleMons[battlerId].unk88.rolloutCount = 0; + ctx->battleMons[battlerId].unk88.rolloutCount = 0; ctx->battleMons[battlerId].unk88.furyCutterCount = 0; } @@ -1608,7 +1608,7 @@ BOOL CheckTrainerMessage(BattleSystem *bsys, BattleContext *ctx) { } trainerIndex = BattleSystem_GetTrainerIndex(bsys, 1); - state = 0; + state = 0; do { switch (state) { @@ -1635,7 +1635,7 @@ BOOL CheckTrainerMessage(BattleSystem *bsys, BattleContext *ctx) { Party *party; Pokemon *mon; - party = BattleSystem_GetParty(bsys, 1); + party = BattleSystem_GetParty(bsys, 1); aliveMons = 0; for (i = 0; i < Party_GetCount(party); i++) { @@ -1659,7 +1659,7 @@ BOOL CheckTrainerMessage(BattleSystem *bsys, BattleContext *ctx) { Party *party; Pokemon *mon; - party = BattleSystem_GetParty(bsys, 1); + party = BattleSystem_GetParty(bsys, 1); aliveMons = 0; for (i = 0; i < Party_GetCount(party); i++) { @@ -1690,14 +1690,14 @@ void BattleContext_Init(BattleContext *ctx) { int battlerId; // related to damage calculation - ctx->damage = 0; + ctx->damage = 0; ctx->criticalMultiplier = 1; - ctx->criticalCnt = 0; - ctx->movePower = 0; - ctx->unk_2158 = 10; - ctx->moveType = 0; - ctx->unk_2164 = 0; - ctx->moveStatusFlag = 0; + ctx->criticalCnt = 0; + ctx->movePower = 0; + ctx->unk_2158 = 10; + ctx->moveType = 0; + ctx->unk_2164 = 0; + ctx->moveStatusFlag = 0; ctx->battlerIdFainted = 0xFF; @@ -1707,31 +1707,31 @@ void BattleContext_Init(BattleContext *ctx) { ctx->unk_2178 = 0; // related to stat changes - ctx->statChangeType = 0; - ctx->statChangeParam = 0; + ctx->statChangeType = 0; + ctx->statChangeParam = 0; ctx->battlerIdStatChange = 0xFF; // related to multi hit moves - ctx->multiHitCount = 0; + ctx->multiHitCount = 0; ctx->multiHitCountTemp = 0; - ctx->unk_217E = 0; - ctx->unk_2180 = 0; - ctx->unk_38 = 0; - ctx->unk_2184 = 0; - ctx->checkMultiHit = 0; + ctx->unk_217E = 0; + ctx->unk_2180 = 0; + ctx->unk_38 = 0; + ctx->unk_2184 = 0; + ctx->checkMultiHit = 0; // unidentified states for different state machines - ctx->stateFieldConditionUpdate = 0; - ctx->stateUpdateMonCondition = 0; + ctx->stateFieldConditionUpdate = 0; + ctx->stateUpdateMonCondition = 0; ctx->stateUpdateFieldConditionExtra = 0; - ctx->stateBeforeTurn = 0; - ctx->unk_30 = 0; - ctx->unk_3C = 0; - ctx->unk_40 = 0; - ctx->unk_48 = 0; - ctx->unk_4C = 0; - ctx->unk_50 = 0; - ctx->unk_54 = 0; + ctx->stateBeforeTurn = 0; + ctx->unk_30 = 0; + ctx->unk_3C = 0; + ctx->unk_40 = 0; + ctx->unk_48 = 0; + ctx->unk_4C = 0; + ctx->unk_50 = 0; + ctx->unk_54 = 0; ctx->battleStatus &= 0xFF800000; ctx->battleStatus2 &= 0xFFFFFEA1; @@ -1749,8 +1749,8 @@ void ov12_02251038(BattleSystem *bsys, BattleContext *ctx) { for (int battlerId = 0; battlerId < 4; battlerId++) { ctx->moveNoHitBattler[battlerId] = 0xFF; - ctx->unk_21A0[battlerId] = 6; - ctx->unk_310C[battlerId] = BattleSystem_Random(bsys); + ctx->unk_21A0[battlerId] = 6; + ctx->unk_310C[battlerId] = BattleSystem_Random(bsys); } ctx->prizeMoneyValue = 1; @@ -1764,7 +1764,7 @@ void ov12_02251038(BattleSystem *bsys, BattleContext *ctx) { ctx->switchInFlag |= MaskOfFlagNo(3); } - ctx->unk_311C = 6; + ctx->unk_311C = 6; ctx->safariRunAttempts = 6; } @@ -1788,7 +1788,7 @@ void InitSwitchWork(BattleSystem *bsys, BattleContext *ctx, int battlerId) { ctx->battleMons[i].unk88.battlerIdLockOn = 0; } } - ctx->battleMons[battlerId].status2 = 0; + ctx->battleMons[battlerId].status2 = 0; ctx->battleMons[battlerId].moveEffectFlags = 0; } else { // baton pass ctx->battleMons[battlerId].status2 &= STATUS2_BATON_PASSABLE; @@ -1816,39 +1816,39 @@ void InitSwitchWork(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleStatus & BATTLE_STATUS_BATON_PASS) { - ctx->battleMons[battlerId].unk88.substituteHp = unkStruct.substituteHp; - ctx->battleMons[battlerId].unk88.battlerIdLockOn = unkStruct.battlerIdLockOn; - ctx->battleMons[battlerId].unk88.perishSongTurns = unkStruct.perishSongTurns; + ctx->battleMons[battlerId].unk88.substituteHp = unkStruct.substituteHp; + ctx->battleMons[battlerId].unk88.battlerIdLockOn = unkStruct.battlerIdLockOn; + ctx->battleMons[battlerId].unk88.perishSongTurns = unkStruct.perishSongTurns; ctx->battleMons[battlerId].unk88.battlerIdMeanLook = unkStruct.battlerIdMeanLook; - ctx->battleMons[battlerId].unk88.magnetRiseTurns = unkStruct.magnetRiseTurns; - ctx->battleMons[battlerId].unk88.embargoFlag = unkStruct.embargoFlag; - ctx->battleMons[battlerId].unk88.healBlockTurns = unkStruct.healBlockTurns; + ctx->battleMons[battlerId].unk88.magnetRiseTurns = unkStruct.magnetRiseTurns; + ctx->battleMons[battlerId].unk88.embargoFlag = unkStruct.embargoFlag; + ctx->battleMons[battlerId].unk88.healBlockTurns = unkStruct.healBlockTurns; } - ctx->battleMons[battlerId].unk88.fakeOutCount = ctx->totalTurns + 1; + ctx->battleMons[battlerId].unk88.fakeOutCount = ctx->totalTurns + 1; ctx->battleMons[battlerId].unk88.slowStartTurns = ctx->totalTurns + 1; - ctx->battleMons[battlerId].unk88.truantFlag = (ctx->totalTurns + 1) & 1; - - ctx->moveNoProtect[battlerId] = 0; - ctx->moveNoHit[battlerId] = 0; - ctx->moveNoHitBattler[battlerId] = 0xFF; - ctx->moveNoHitType[battlerId] = 0; - ctx->moveNoBattlerPrev[battlerId] = 0; - ctx->moveNoCopied[battlerId] = 0; - ctx->moveNoCopiedHit[battlerId][0] = 0; - ctx->moveNoCopiedHit[battlerId][1] = 0; - ctx->moveNoCopiedHit[battlerId][2] = 0; - ctx->moveNoCopiedHit[battlerId][3] = 0; - ctx->moveNoSketch[battlerId] = 0; - ctx->conversion2Move[battlerId] = 0; + ctx->battleMons[battlerId].unk88.truantFlag = (ctx->totalTurns + 1) & 1; + + ctx->moveNoProtect[battlerId] = 0; + ctx->moveNoHit[battlerId] = 0; + ctx->moveNoHitBattler[battlerId] = 0xFF; + ctx->moveNoHitType[battlerId] = 0; + ctx->moveNoBattlerPrev[battlerId] = 0; + ctx->moveNoCopied[battlerId] = 0; + ctx->moveNoCopiedHit[battlerId][0] = 0; + ctx->moveNoCopiedHit[battlerId][1] = 0; + ctx->moveNoCopiedHit[battlerId][2] = 0; + ctx->moveNoCopiedHit[battlerId][3] = 0; + ctx->moveNoSketch[battlerId] = 0; + ctx->conversion2Move[battlerId] = 0; ctx->conversion2BattlerId[battlerId] = 0; - ctx->conversion2Type[battlerId] = 0; - ctx->moveNoMetronome[battlerId] = 0; + ctx->conversion2Type[battlerId] = 0; + ctx->moveNoMetronome[battlerId] = 0; ctx->fieldCondition &= (MaskOfFlagNo(battlerId) << 8) ^ 0xFFFFFFFF; //?? if (ctx->battleMons[battlerId].moveEffectFlags & MOVE_EFFECT_FLAG_POWER_TRICK) { - i = ctx->battleMons[battlerId].atk; + i = ctx->battleMons[battlerId].atk; ctx->battleMons[battlerId].atk = ctx->battleMons[battlerId].def; ctx->battleMons[battlerId].def = i; } @@ -1876,7 +1876,7 @@ void InitFaintedWork(BattleSystem *bsys, BattleContext *ctx, int battlerId) { ctx->battleMons[battlerId].statChanges[stat] = 6; } - ctx->battleMons[battlerId].status2 = 0; + ctx->battleMons[battlerId].status2 = 0; ctx->battleMons[battlerId].moveEffectFlags = 0; for (i = 0; i < maxBattlers; i++) { @@ -1901,25 +1901,25 @@ void InitFaintedWork(BattleSystem *bsys, BattleContext *ctx, int battlerId) { data[i] = 0; } - ctx->battleMons[battlerId].unk88.fakeOutCount = ctx->totalTurns + 1; + ctx->battleMons[battlerId].unk88.fakeOutCount = ctx->totalTurns + 1; ctx->battleMons[battlerId].unk88.slowStartTurns = ctx->totalTurns + 1; - ctx->battleMons[battlerId].unk88.truantFlag = (ctx->totalTurns + 1) & 1; - - ctx->moveNoProtect[battlerId] = 0; - ctx->moveNoHit[battlerId] = 0; - ctx->moveNoHitBattler[battlerId] = 0xFF; - ctx->moveNoHitType[battlerId] = 0; - ctx->moveNoBattlerPrev[battlerId] = 0; - ctx->moveNoCopied[battlerId] = 0; - ctx->moveNoCopiedHit[battlerId][0] = 0; - ctx->moveNoCopiedHit[battlerId][1] = 0; - ctx->moveNoCopiedHit[battlerId][2] = 0; - ctx->moveNoCopiedHit[battlerId][3] = 0; - ctx->moveNoSketch[battlerId] = 0; - ctx->conversion2Move[battlerId] = 0; + ctx->battleMons[battlerId].unk88.truantFlag = (ctx->totalTurns + 1) & 1; + + ctx->moveNoProtect[battlerId] = 0; + ctx->moveNoHit[battlerId] = 0; + ctx->moveNoHitBattler[battlerId] = 0xFF; + ctx->moveNoHitType[battlerId] = 0; + ctx->moveNoBattlerPrev[battlerId] = 0; + ctx->moveNoCopied[battlerId] = 0; + ctx->moveNoCopiedHit[battlerId][0] = 0; + ctx->moveNoCopiedHit[battlerId][1] = 0; + ctx->moveNoCopiedHit[battlerId][2] = 0; + ctx->moveNoCopiedHit[battlerId][3] = 0; + ctx->moveNoSketch[battlerId] = 0; + ctx->conversion2Move[battlerId] = 0; ctx->conversion2BattlerId[battlerId] = 0; - ctx->conversion2Type[battlerId] = 0; - ctx->moveNoMetronome[battlerId] = 0; + ctx->conversion2Type[battlerId] = 0; + ctx->moveNoMetronome[battlerId] = 0; ctx->fieldCondition &= (MaskOfFlagNo(battlerId) << 8) ^ 0xFFFFFFFF; //?? @@ -2009,51 +2009,51 @@ BOOL ov12_02251A28(BattleSystem *bsys, BattleContext *ctx, int battlerId, int mo BOOL ret = TRUE; if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_DISABLED) & MaskOfFlagNo(movePos)) { - msg->tag = TAG_NICKNAME_MOVE; - msg->id = msg_0197_00609; + msg->tag = TAG_NICKNAME_MOVE; + msg->id = msg_0197_00609; msg->param[0] = CreateNicknameTag(ctx, battlerId); msg->param[1] = ctx->battleMons[battlerId].moves[movePos]; - ret = FALSE; + ret = FALSE; } else if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_TORMENT) & MaskOfFlagNo(movePos)) { - msg->tag = TAG_NICKNAME; - msg->id = msg_0197_00612; + msg->tag = TAG_NICKNAME; + msg->id = msg_0197_00612; msg->param[0] = CreateNicknameTag(ctx, battlerId); - ret = FALSE; + ret = FALSE; } else if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_TAUNT) & MaskOfFlagNo(movePos)) { - msg->tag = TAG_NICKNAME_MOVE; - msg->id = msg_0197_00613; + msg->tag = TAG_NICKNAME_MOVE; + msg->id = msg_0197_00613; msg->param[0] = CreateNicknameTag(ctx, battlerId); msg->param[1] = ctx->battleMons[battlerId].moves[movePos]; - ret = FALSE; + ret = FALSE; } else if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_IMPRISON) & MaskOfFlagNo(movePos)) { - msg->tag = TAG_NICKNAME_MOVE; - msg->id = msg_0197_00616; + msg->tag = TAG_NICKNAME_MOVE; + msg->id = msg_0197_00616; msg->param[0] = CreateNicknameTag(ctx, battlerId); msg->param[1] = ctx->battleMons[battlerId].moves[movePos]; - ret = FALSE; + ret = FALSE; } else if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_GRAVITY) & MaskOfFlagNo(movePos)) { - msg->tag = TAG_NICKNAME_MOVE; - msg->id = msg_0197_01001; + msg->tag = TAG_NICKNAME_MOVE; + msg->id = msg_0197_01001; msg->param[0] = CreateNicknameTag(ctx, battlerId); msg->param[1] = ctx->battleMons[battlerId].moves[movePos]; - ret = FALSE; + ret = FALSE; } else if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_HEAL_BLOCK) & MaskOfFlagNo(movePos)) { - msg->tag = TAG_NICKNAME_MOVE_MOVE; - msg->id = msg_0197_01057; + msg->tag = TAG_NICKNAME_MOVE_MOVE; + msg->id = msg_0197_01057; msg->param[0] = CreateNicknameTag(ctx, battlerId); msg->param[1] = MOVE_HEAL_BLOCK; msg->param[2] = ctx->battleMons[battlerId].moves[movePos]; - ret = FALSE; + ret = FALSE; } else if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_CHOICED) & MaskOfFlagNo(movePos)) { - msg->tag = TAG_ITEM_MOVE; - msg->id = msg_0197_00911; + msg->tag = TAG_ITEM_MOVE; + msg->id = msg_0197_00911; msg->param[0] = ctx->battleMons[battlerId].item; msg->param[1] = ctx->battleMons[battlerId].unk88.moveNoChoice; - ret = FALSE; + ret = FALSE; } else if (StruggleCheck(bsys, ctx, battlerId, 0, STRUGGLE_CHECK_NO_PP) & MaskOfFlagNo(movePos)) { msg->tag = TAG_NONE; - msg->id = msg_0197_00823; - ret = FALSE; + msg->id = msg_0197_00823; + ret = FALSE; } return ret; @@ -2240,10 +2240,10 @@ int ov12_02251D28(BattleSystem *bsys, BattleContext *ctx, int moveNo, int moveTy return damage; } - itemAttacker = GetBattlerHeldItemEffect(ctx, battlerIdAttacker); + itemAttacker = GetBattlerHeldItemEffect(ctx, battlerIdAttacker); extraAttacker = GetHeldItemModifier(ctx, battlerIdAttacker, 0); - itemTarget = GetBattlerHeldItemEffect(ctx, battlerIdTarget); - extraTarget = GetHeldItemModifier(ctx, battlerIdTarget, 0); + itemTarget = GetBattlerHeldItemEffect(ctx, battlerIdTarget); + extraTarget = GetHeldItemModifier(ctx, battlerIdTarget, 0); if (GetBattlerAbility(ctx, battlerIdAttacker) == ABILITY_NORMALIZE) { moveType = TYPE_NORMAL; @@ -2421,7 +2421,7 @@ BOOL ov12_02252218(BattleContext *ctx, int battlerId) { u8 GetMonsHitCount(BattleSystem *bsys, BattleContext *ctx, u32 flag, int battlerId) { int i; - u8 cnt = 0; + u8 cnt = 0; int maxBattlers = BattleSystem_GetMaxBattlers(bsys); switch (flag) { @@ -2562,18 +2562,18 @@ BOOL GetTypeEffectivnessData(BattleSystem *bsys, int index, u8 *typeMove, u8 *ty if (index >= NELEMS(sTypeEffectiveness)) { index = BattleSystem_Random(bsys) % NELEMS(sTypeEffectiveness); - ret = FALSE; + ret = FALSE; } *typeMove = sTypeEffectiveness[index][0]; - *typeMon = sTypeEffectiveness[index][1]; - *eff = sTypeEffectiveness[index][2]; + *typeMon = sTypeEffectiveness[index][1]; + *eff = sTypeEffectiveness[index][2]; return ret; } int CalculateTypeEffectiveness(u8 typeMove, u8 typeMon1, u8 typeMon2) { - int i = 0; + int i = 0; int damage = 40; do { @@ -2673,25 +2673,25 @@ BOOL CanSwitchMon(BattleSystem *bsys, BattleContext *ctx, int battlerId) { int monIndex2; u32 battleType; - cnt = 0; - ret = FALSE; + cnt = 0; + ret = FALSE; battleType = BattleSystem_GetBattleType(bsys); - party = BattleSystem_GetParty(bsys, battlerId); - partySize = BattleSystem_GetPartySize(bsys, battlerId); + party = BattleSystem_GetParty(bsys, battlerId); + partySize = BattleSystem_GetPartySize(bsys, battlerId); if ((battleType & BATTLE_TYPE_MULTI) || ((battleType & BATTLE_TYPE_TAG) && (ov12_0223AB0C(bsys, battlerId) & 1))) { - start = 0; - cntMax = 1; + start = 0; + cntMax = 1; monIndex1 = ctx->selectedMonIndex[battlerId]; monIndex2 = ctx->selectedMonIndex[battlerId]; } else if (battleType & BATTLE_TYPE_DOUBLES) { - start = 0; - cntMax = 1; + start = 0; + cntMax = 1; monIndex1 = ctx->selectedMonIndex[battlerId]; monIndex2 = ctx->selectedMonIndex[BattleSystem_GetBattlerIdPartner(bsys, battlerId)]; } else { - start = 0; - cntMax = 1; + start = 0; + cntMax = 1; monIndex1 = ctx->selectedMonIndex[battlerId]; monIndex2 = ctx->selectedMonIndex[battlerId]; } @@ -2720,13 +2720,13 @@ BOOL CantEscape(BattleSystem *bsys, BattleContext *ctx, int battlerId, BattleMes u32 battleType; battleType = BattleSystem_GetBattleType(bsys); - item = GetBattlerHeldItemEffect(ctx, battlerId); + item = GetBattlerHeldItemEffect(ctx, battlerId); if (item == HOLD_EFFECT_FLEE || (battleType & BATTLE_TYPE_NO_EXP) || GetBattlerAbility(ctx, battlerId) == ABILITY_RUN_AWAY) { return FALSE; } - side = BattleSystem_GetFieldSide(bsys, battlerId); + side = BattleSystem_GetFieldSide(bsys, battlerId); maxBattlers = BattleSystem_GetMaxBattlers(bsys); battlerIdAbility = CheckAbilityActive(bsys, ctx, CHECK_ABILITY_ALL_HP_NOT_USER, battlerId, ABILITY_SHADOW_TAG); @@ -2734,8 +2734,8 @@ BOOL CantEscape(BattleSystem *bsys, BattleContext *ctx, int battlerId, BattleMes if (msg == NULL) { return TRUE; } - msg->tag = TAG_NICKNAME_ABILITY; - msg->id = msg_0197_00039; + msg->tag = TAG_NICKNAME_ABILITY; + msg->id = msg_0197_00039; msg->param[0] = CreateNicknameTag(ctx, battlerIdAbility); msg->param[1] = ABILITY_SHADOW_TAG; return TRUE; @@ -2748,8 +2748,8 @@ BOOL CantEscape(BattleSystem *bsys, BattleContext *ctx, int battlerId, BattleMes if (msg == NULL) { return TRUE; } - msg->tag = TAG_NICKNAME_ABILITY; - msg->id = msg_0197_00039; + msg->tag = TAG_NICKNAME_ABILITY; + msg->id = msg_0197_00039; msg->param[0] = CreateNicknameTag(ctx, battlerIdAbility); msg->param[1] = ABILITY_ARENA_TRAP; return TRUE; @@ -2758,8 +2758,8 @@ BOOL CantEscape(BattleSystem *bsys, BattleContext *ctx, int battlerId, BattleMes if (msg == NULL) { return TRUE; } - msg->tag = TAG_NICKNAME_ABILITY; - msg->id = msg_0197_00039; + msg->tag = TAG_NICKNAME_ABILITY; + msg->id = msg_0197_00039; msg->param[0] = CreateNicknameTag(ctx, battlerIdAbility); msg->param[1] = ABILITY_ARENA_TRAP; return TRUE; @@ -2771,8 +2771,8 @@ BOOL CantEscape(BattleSystem *bsys, BattleContext *ctx, int battlerId, BattleMes if (msg == NULL) { return TRUE; } - msg->tag = TAG_NICKNAME_ABILITY; - msg->id = msg_0197_00039; + msg->tag = TAG_NICKNAME_ABILITY; + msg->id = msg_0197_00039; msg->param[0] = CreateNicknameTag(ctx, battlerIdAbility); msg->param[1] = ABILITY_MAGNET_PULL; return TRUE; @@ -2783,7 +2783,7 @@ BOOL CantEscape(BattleSystem *bsys, BattleContext *ctx, int battlerId, BattleMes return TRUE; } msg->tag = TAG_NONE; - msg->id = msg_0197_00794; + msg->id = msg_0197_00794; return TRUE; } @@ -2797,17 +2797,17 @@ BOOL BattleTryRun(BattleSystem *bsys, BattleContext *ctx, int battlerId) { u32 battleType; battleType = BattleSystem_GetBattleType(bsys); - item = GetBattlerHeldItemEffect(ctx, battlerId); - ret = FALSE; + item = GetBattlerHeldItemEffect(ctx, battlerId); + ret = FALSE; if (item == HOLD_EFFECT_FLEE) { ctx->turnData[battlerId].runFlag = 1; - ret = TRUE; + ret = TRUE; } else if (battleType & BATTLE_TYPE_NO_EXP) { ret = TRUE; } else if (GetBattlerAbility(ctx, battlerId) == ABILITY_RUN_AWAY) { ctx->turnData[battlerId].runFlag = 2; - ret = TRUE; + ret = TRUE; } else { if (ctx->battleMons[battlerId].speed < ctx->battleMons[battlerId ^ 1].speed) { run = ctx->battleMons[battlerId].speed * 128 / ctx->battleMons[battlerId ^ 1].speed + ctx->runAttempts * 30; @@ -2844,9 +2844,9 @@ BOOL BattleContext_CheckMoveImprisoned(BattleSystem *bsys, BattleContext *ctx, i BOOL ret; int i; - ret = FALSE; + ret = FALSE; maxBattlers = BattleSystem_GetMaxBattlers(bsys); - side = BattleSystem_GetFieldSide(bsys, battlerId); + side = BattleSystem_GetFieldSide(bsys, battlerId); for (battlerIdCur = 0; battlerIdCur < maxBattlers; battlerIdCur++) { if ((side != BattleSystem_GetFieldSide(bsys, battlerIdCur)) && (ctx->battleMons[battlerIdCur].moveEffectFlags & MOVE_EFFECT_FLAG_IMPRISON_USER)) { @@ -2882,7 +2882,7 @@ BOOL CheckMoveEffectOnField(BattleSystem *bsys, BattleContext *ctx, int moveEffe } void ov12_02252D14(BattleSystem *bsys, BattleContext *ctx) { - ctx->moveStatusFlag = 0; + ctx->moveStatusFlag = 0; ctx->criticalMultiplier = 1; ctx->battleStatus &= (0x100000 ^ 0xFFFFFFFF); } @@ -3029,12 +3029,12 @@ int BattleContext_CheckMoveImmunityFromAbility(BattleContext *ctx, int battlerId if (CheckBattlerAbilityIfNotIgnored(ctx, battlerIdAttacker, battlerIdTarget, ABILITY_VOLT_ABSORB) == TRUE && moveType == TYPE_ELECTRIC && battlerIdAttacker != battlerIdTarget) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerIdTarget].maxHp, 4); - script = BATTLE_SUBSCRIPT_ABILITY_RESTORES_HP; + script = BATTLE_SUBSCRIPT_ABILITY_RESTORES_HP; } if (CheckBattlerAbilityIfNotIgnored(ctx, battlerIdAttacker, battlerIdTarget, ABILITY_WATER_ABSORB) == TRUE && moveType == TYPE_WATER && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && ctx->trainerAIData.moveData[ctx->moveNoCur].power) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerIdTarget].maxHp, 4); - script = BATTLE_SUBSCRIPT_ABILITY_RESTORES_HP; + script = BATTLE_SUBSCRIPT_ABILITY_RESTORES_HP; } int moveNoCur = ctx->moveNoCur; if (CheckBattlerAbilityIfNotIgnored(ctx, battlerIdAttacker, battlerIdTarget, ABILITY_FLASH_FIRE) == TRUE && moveType == TYPE_FIRE && !(ctx->battleMons[battlerIdTarget].status & STATUS_FREEZE) && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN)) { @@ -3055,7 +3055,7 @@ int BattleContext_CheckMoveImmunityFromAbility(BattleContext *ctx, int battlerId } if (CheckBattlerAbilityIfNotIgnored(ctx, battlerIdAttacker, battlerIdTarget, ABILITY_DRY_SKIN) == TRUE && moveType == TYPE_WATER && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && ctx->trainerAIData.moveData[ctx->moveNoCur].power) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerIdTarget].maxHp, 4); - script = BATTLE_SUBSCRIPT_ABILITY_RESTORES_HP; + script = BATTLE_SUBSCRIPT_ABILITY_RESTORES_HP; } return script; @@ -3068,11 +3068,11 @@ BOOL ov12_02253068(BattleSystem *bsys, BattleContext *ctx, int battlerId) { switch (GetBattlerAbility(ctx, battlerId)) { case ABILITY_SPEED_BOOST: if (ctx->battleMons[battlerId].hp && ctx->battleMons[battlerId].statChanges[3] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE && ctx->battleMons[battlerId].unk88.fakeOutCount != ctx->totalTurns + 1) { - ctx->statChangeParam = 17; - ctx->statChangeType = 3; + ctx->statChangeParam = 17; + ctx->statChangeType = 3; ctx->battlerIdStatChange = battlerId; - script = BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE; - ret = TRUE; + script = BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE; + ret = TRUE; } break; case ABILITY_SHED_SKIN: @@ -3089,8 +3089,8 @@ BOOL ov12_02253068(BattleSystem *bsys, BattleContext *ctx, int battlerId) { ctx->msgTemp = 4; } ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_ABILITY_RESTORE_STATUS; - ret = TRUE; + script = BATTLE_SUBSCRIPT_ABILITY_RESTORE_STATUS; + ret = TRUE; } break; default: @@ -3100,7 +3100,7 @@ BOOL ov12_02253068(BattleSystem *bsys, BattleContext *ctx, int battlerId) { if (ret == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } return ret; @@ -3137,7 +3137,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { int maxBattlers = BattleSystem_GetMaxBattlers(bsys); script = BATTLE_SUBSCRIPT_NONE; - flag = FALSE; + flag = FALSE; do { switch (ctx->sendOutState) { @@ -3148,30 +3148,30 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { case 2: case 3: script = BATTLE_SUBSCRIPT_OVERWORLD_RAIN; - flag = TRUE; + flag = TRUE; break; case 4: case 5: case 6: script = BATTLE_SUBSCRIPT_OVERWORLD_HAIL; - flag = TRUE; + flag = TRUE; break; case 7: script = BATTLE_SUBSCRIPT_OVERWORLD_SAND; - flag = TRUE; + flag = TRUE; break; case 9: case 10: script = BATTLE_SUBSCRIPT_OVERWORLD_FOG; - flag = TRUE; + flag = TRUE; break; case 1001: script = BATTLE_SUBSCRIPT_OVERWORLD_SUN; - flag = TRUE; + flag = TRUE; break; case 1002: script = BATTLE_SUBSCRIPT_OVERWORLD_TRICK_ROOM; - flag = TRUE; + flag = TRUE; break; default: break; @@ -3188,15 +3188,15 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { int battlerIdTargetL; for (i = 0; i < maxBattlers; i++) { - battlerId = ctx->turnOrder[i]; - battlerIdTargetR = ov12_0223ABB8(bsys, battlerId, 0); - battlerIdTargetL = ov12_0223ABB8(bsys, battlerId, 2); + battlerId = ctx->turnOrder[i]; + battlerIdTargetR = ov12_0223ABB8(bsys, battlerId, 0); + battlerIdTargetL = ov12_0223ABB8(bsys, battlerId, 2); ctx->battlerIdLeechSeeded = ov12_022585B8(bsys, ctx, battlerIdTargetR, battlerIdTargetL); if (!ctx->battleMons[battlerId].traceFlag && ctx->battlerIdLeechSeeded != 0xFF && ctx->battleMons[battlerId].hp && ctx->battleMons[battlerId].item != ITEM_GRISEOUS_ORB && ctx->battleMons[ctx->battlerIdLeechSeeded].hp && GetBattlerAbility(ctx, battlerId) == ABILITY_TRACE) { ctx->battleMons[battlerId].traceFlag = TRUE; - ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_TRACE; - flag = TRUE; + ctx->battlerIdTemp = battlerId; + script = BATTLE_SUBSCRIPT_TRACE; + flag = TRUE; break; } } @@ -3214,28 +3214,28 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { ctx->battleMons[battlerId].sendOutFlag = TRUE; if (!(ctx->fieldCondition & FIELD_CONDITION_RAIN_PERMANENT)) { script = BATTLE_SUBSCRIPT_DRIZZLE; - flag = TRUE; + flag = TRUE; } break; case ABILITY_SAND_STREAM: ctx->battleMons[battlerId].sendOutFlag = TRUE; if (!(ctx->fieldCondition & FIELD_CONDITION_SANDSTORM_PERMANENT)) { script = BATTLE_SUBSCRIPT_SAND_STREAM; - flag = TRUE; + flag = TRUE; } break; case ABILITY_DROUGHT: ctx->battleMons[battlerId].sendOutFlag = TRUE; if (!(ctx->fieldCondition & FIELD_CONDITION_SUN_PERMANENT)) { script = BATTLE_SUBSCRIPT_DROUGHT; - flag = TRUE; + flag = TRUE; } break; case ABILITY_SNOW_WARNING: ctx->battleMons[battlerId].sendOutFlag = TRUE; if (!(ctx->fieldCondition & FIELD_CONDITION_HAIL_PERMANENT)) { script = BATTLE_SUBSCRIPT_SNOW_WARNING; - flag = TRUE; + flag = TRUE; } break; } @@ -3254,9 +3254,9 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { battlerId = ctx->turnOrder[i]; if (!ctx->battleMons[battlerId].intimidateFlag && ctx->battleMons[battlerId].hp && GetBattlerAbility(ctx, battlerId) == ABILITY_INTIMIDATE) { ctx->battleMons[battlerId].intimidateFlag = TRUE; - ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_INTIMIDATE; - flag = TRUE; + ctx->battlerIdTemp = battlerId; + script = BATTLE_SUBSCRIPT_INTIMIDATE; + flag = TRUE; break; } } @@ -3269,7 +3269,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { battlerId = ctx->turnOrder[i]; if (!ctx->battleMons[battlerId].downloadFlag && ctx->battleMons[battlerId].hp && GetBattlerAbility(ctx, battlerId) == ABILITY_DOWNLOAD) { int battlerIdCheck; - int def = 0; + int def = 0; int spdef = 0; for (battlerIdCheck = 0; battlerIdCheck < maxBattlers; battlerIdCheck++) { @@ -3285,10 +3285,10 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { } else { ctx->statChangeParam = 0xF; } - ctx->statChangeType = 3; + ctx->statChangeType = 3; ctx->battlerIdStatChange = battlerId; - script = BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE; - flag = TRUE; + script = BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE; + flag = TRUE; break; } } @@ -3311,7 +3311,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { for (index = 0; index < MAX_MON_MOVES; index++) { moveNo = ctx->battleMons[battlerIdCheck].moves[index]; if (moveNo) { - moveStatus = 0; + moveStatus = 0; ctx->damage = ov12_02251D28(bsys, ctx, moveNo, 0, battlerIdCheck, battlerId, ctx->damage, &moveStatus); if (!(moveStatus & MOVE_STATUS_NO_EFFECT) && !ov12_0225865C(ctx, moveNo) && ((moveStatus & MOVE_STATUS_SUPER_EFFECTIVE) || (ctx->trainerAIData.moveData[moveNo].effect == MOVE_EFFECT_ONE_HIT_KO && ctx->battleMons[battlerId].level <= ctx->battleMons[battlerIdCheck].level))) { flag = TRUE; @@ -3326,7 +3326,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { } if (flag == TRUE) { ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_ANTICIPATION; + script = BATTLE_SUBSCRIPT_ANTICIPATION; } break; } @@ -3348,20 +3348,20 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { u32 powerTemp; powerTemp = 0; - hp = 0; + hp = 0; for (battlerIdCheck = 0; battlerIdCheck < maxBattlers; battlerIdCheck++) { if (BattleSystem_GetFieldSide(bsys, battlerId) != BattleSystem_GetFieldSide(bsys, battlerIdCheck) && ctx->battleMons[battlerIdCheck].hp) { hp += ctx->battleMons[battlerIdCheck].hp; for (index = 0; index < MAX_MON_MOVES; index++) { moveNo = ctx->battleMons[battlerIdCheck].moves[index]; - power = ctx->trainerAIData.moveData[moveNo].power; + power = ctx->trainerAIData.moveData[moveNo].power; switch (power) { case 1: switch (ctx->trainerAIData.moveData[moveNo].effect) { case MOVE_EFFECT_ONE_HIT_KO: if (powerTemp < 150 || (powerTemp == 150 && (BattleSystem_Random(bsys) & 1))) { - powerTemp = 150; + powerTemp = 150; ctx->moveTemp = moveNo; } break; @@ -3369,13 +3369,13 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { case MOVE_EFFECT_MIRROR_COAT: case MOVE_EFFECT_METAL_BURST: if (powerTemp < 120 || ((powerTemp == 120) && (BattleSystem_Random(bsys) & 1))) { - powerTemp = 120; + powerTemp = 120; ctx->moveTemp = moveNo; } break; default: if (powerTemp < 80 || ((powerTemp == 80) && (BattleSystem_Random(bsys) & 1))) { - powerTemp = 80; + powerTemp = 80; ctx->moveTemp = moveNo; } break; @@ -3383,7 +3383,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { break; default: if (powerTemp < power || ((powerTemp == power) && (BattleSystem_Random(bsys) & 1))) { - powerTemp = power; + powerTemp = power; ctx->moveTemp = moveNo; } break; @@ -3393,15 +3393,15 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { } if (powerTemp) { ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_FOREWARN; - flag = TRUE; + script = BATTLE_SUBSCRIPT_FOREWARN; + flag = TRUE; } else if (hp) { - j = Battler_GetRandomOpposingBattlerId(bsys, ctx, battlerId); - index = GetBattlerLearnedMoveCount(bsys, ctx, j); - ctx->moveTemp = ctx->battleMons[j].moves[BattleSystem_Random(bsys) % index]; + j = Battler_GetRandomOpposingBattlerId(bsys, ctx, battlerId); + index = GetBattlerLearnedMoveCount(bsys, ctx, j); + ctx->moveTemp = ctx->battleMons[j].moves[BattleSystem_Random(bsys) % index]; ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_FOREWARN; - flag = TRUE; + script = BATTLE_SUBSCRIPT_FOREWARN; + flag = TRUE; } break; } @@ -3423,22 +3423,22 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { if (ctx->battleMons[battlerIdTargets[0]].hp && ctx->battleMons[battlerIdTargets[0]].item && ctx->battleMons[battlerIdTargets[1]].hp && ctx->battleMons[battlerIdTargets[1]].item) { ctx->itemTemp = ctx->battleMons[battlerIdTargets[BattleSystem_Random(bsys) & 1]].item; - flag = TRUE; + flag = TRUE; } else if (ctx->battleMons[battlerIdTargets[0]].hp && ctx->battleMons[battlerIdTargets[0]].item) { ctx->itemTemp = ctx->battleMons[battlerIdTargets[0]].item; - flag = TRUE; + flag = TRUE; } else if (ctx->battleMons[battlerIdTargets[1]].hp && ctx->battleMons[battlerIdTargets[1]].item) { ctx->itemTemp = ctx->battleMons[battlerIdTargets[1]].item; - flag = TRUE; + flag = TRUE; } } else if (ctx->battleMons[battlerId ^ 1].hp && ctx->battleMons[battlerId ^ 1].item) { ctx->itemTemp = ctx->battleMons[battlerId ^ 1].item; - flag = TRUE; + flag = TRUE; } } if (flag == TRUE) { ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_FRISK; + script = BATTLE_SUBSCRIPT_FRISK; break; } } @@ -3451,16 +3451,16 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { battlerId = ctx->turnOrder[i]; if (!ctx->battleMons[battlerId].slowStartFlag && ctx->battleMons[battlerId].hp && GetBattlerAbility(ctx, battlerId) == ABILITY_SLOW_START && ctx->totalTurns <= ctx->battleMons[battlerId].unk88.slowStartTurns) { ctx->battleMons[battlerId].slowStartFlag = TRUE; - ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_SLOW_START; - flag = TRUE; + ctx->battlerIdTemp = battlerId; + script = BATTLE_SUBSCRIPT_SLOW_START; + flag = TRUE; break; } if (!ctx->battleMons[battlerId].slowStartEnded && ctx->battleMons[battlerId].hp && GetBattlerAbility(ctx, battlerId) == ABILITY_SLOW_START && (ctx->totalTurns - ctx->battleMons[battlerId].unk88.slowStartTurns) == 5) { ctx->battleMons[battlerId].slowStartEnded = TRUE; - ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_SLOW_START_END; - flag = TRUE; + ctx->battlerIdTemp = battlerId; + script = BATTLE_SUBSCRIPT_SLOW_START_END; + flag = TRUE; break; } } @@ -3473,9 +3473,9 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { battlerId = ctx->turnOrder[i]; if (!ctx->battleMons[battlerId].moldBreakerFlag && ctx->battleMons[battlerId].hp && GetBattlerAbility(ctx, battlerId) == ABILITY_MOLD_BREAKER) { ctx->battleMons[battlerId].moldBreakerFlag = TRUE; - ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_MOLD_BREAKER; - flag = TRUE; + ctx->battlerIdTemp = battlerId; + script = BATTLE_SUBSCRIPT_MOLD_BREAKER; + flag = TRUE; break; } } @@ -3488,9 +3488,9 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { battlerId = ctx->turnOrder[i]; if (!ctx->battleMons[battlerId].pressureFlag && ctx->battleMons[battlerId].hp && GetBattlerAbility(ctx, battlerId) == ABILITY_PRESSURE) { ctx->battleMons[battlerId].pressureFlag = TRUE; - ctx->battlerIdTemp = battlerId; - script = BATTLE_SUBSCRIPT_PRESSURE; - flag = TRUE; + ctx->battlerIdTemp = battlerId; + script = BATTLE_SUBSCRIPT_PRESSURE; + flag = TRUE; break; } } @@ -3519,7 +3519,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { battlerId = ctx->turnOrder[i]; if (CheckStatusHealAbility(bsys, ctx, battlerId, 1) == TRUE) { script = BATTLE_SUBSCRIPT_ABILITY_FORBIDS_STATUS; - flag = TRUE; + flag = TRUE; break; } } @@ -3532,7 +3532,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { battlerId = ctx->turnOrder[i]; if (CheckUseHeldItem(bsys, ctx, battlerId, (u32 *)&script) == TRUE) { ctx->battlerIdTemp = battlerId; - flag = TRUE; + flag = TRUE; break; } } @@ -3542,7 +3542,7 @@ int TryAbilityOnEntry(BattleSystem *bsys, BattleContext *ctx) { break; case 15: // end ctx->sendOutState = 0; - flag = 2; + flag = 2; break; } } while (!flag); @@ -3561,8 +3561,8 @@ int Battler_GetRandomOpposingBattlerId(BattleSystem *bsys, BattleContext *ctx, i if (battleType & BATTLE_TYPE_DOUBLES) { battlerIdTargets[0] = ov12_0223ABB8(bsys, battlerId, 0); battlerIdTargets[1] = ov12_0223ABB8(bsys, battlerId, 2); - i = BattleSystem_Random(bsys) & 1; - battlerIdTarget = battlerIdTargets[i]; + i = BattleSystem_Random(bsys) & 1; + battlerIdTarget = battlerIdTargets[i]; if (!ctx->battleMons[battlerIdTarget].hp) { battlerIdTarget = battlerIdTargets[i ^ 1]; } @@ -3587,11 +3587,11 @@ BOOL CheckAbilityEffectOnHit(BattleSystem *bsys, BattleContext *ctx, int *script switch (GetBattlerAbility(ctx, ctx->battlerIdTarget)) { case ABILITY_STATIC: if (ctx->battleMons[ctx->battlerIdAttacker].hp && !ctx->battleMons[ctx->battlerIdAttacker].status && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1) && (BattleSystem_Random(bsys) % 10 < 3)) { - ctx->statChangeType = 3; + ctx->statChangeType = 3; ctx->battlerIdStatChange = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - *script = BATTLE_SUBSCRIPT_PARALYZE; - ret = TRUE; + ctx->battlerIdTemp = ctx->battlerIdTarget; + *script = BATTLE_SUBSCRIPT_PARALYZE; + ret = TRUE; } break; case ABILITY_COLOR_CHANGE: { @@ -3606,18 +3606,18 @@ BOOL CheckAbilityEffectOnHit(BattleSystem *bsys, BattleContext *ctx, int *script } if (ctx->battleMons[ctx->battlerIdTarget].hp && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && ctx->moveNoCur != MOVE_STRUGGLE && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && ctx->trainerAIData.moveData[ctx->moveNoCur].power && GetBattlerVar(ctx, ctx->battlerIdTarget, BMON_DATA_TYPE_1, NULL) != moveType && GetBattlerVar(ctx, ctx->battlerIdTarget, BMON_DATA_TYPE_2, NULL) != moveType) { - *script = BATTLE_SUBSCRIPT_COLOR_CHANGE; + *script = BATTLE_SUBSCRIPT_COLOR_CHANGE; ctx->msgTemp = moveType; - ret = TRUE; + ret = TRUE; } break; } case ABILITY_ROUGH_SKIN: if (ctx->battleMons[ctx->battlerIdAttacker].hp && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_MAGIC_GUARD && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1)) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 8); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 8); ctx->battlerIdTemp = ctx->battlerIdAttacker; - *script = BATTLE_SUBSCRIPT_ROUGH_SKIN; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_ROUGH_SKIN; + ret = TRUE; } break; case ABILITY_EFFECT_SPORE: @@ -3634,45 +3634,45 @@ BOOL CheckAbilityEffectOnHit(BattleSystem *bsys, BattleContext *ctx, int *script *script = BATTLE_SUBSCRIPT_FALL_ASLEEP; break; } - ctx->statChangeType = 3; + ctx->statChangeType = 3; ctx->battlerIdStatChange = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - ret = TRUE; + ctx->battlerIdTemp = ctx->battlerIdTarget; + ret = TRUE; } break; case ABILITY_POISON_POINT: if (ctx->battleMons[ctx->battlerIdAttacker].hp && !ctx->battleMons[ctx->battlerIdAttacker].status && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1) && (BattleSystem_Random(bsys) % 10 < 3)) { - ctx->statChangeType = 3; + ctx->statChangeType = 3; ctx->battlerIdStatChange = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - *script = BATTLE_SUBSCRIPT_POISON; - ret = TRUE; + ctx->battlerIdTemp = ctx->battlerIdTarget; + *script = BATTLE_SUBSCRIPT_POISON; + ret = TRUE; } break; case ABILITY_FLAME_BODY: if (ctx->battleMons[ctx->battlerIdAttacker].hp && !ctx->battleMons[ctx->battlerIdAttacker].status && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1) && ((BattleSystem_Random(bsys) % 10) < 3)) { - ctx->statChangeType = 3; + ctx->statChangeType = 3; ctx->battlerIdStatChange = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - *script = BATTLE_SUBSCRIPT_BURN; - ret = TRUE; + ctx->battlerIdTemp = ctx->battlerIdTarget; + *script = BATTLE_SUBSCRIPT_BURN; + ret = TRUE; } break; case ABILITY_CUTE_CHARM: if (ctx->battleMons[ctx->battlerIdAttacker].hp && !(ctx->battleMons[ctx->battlerIdAttacker].status2 & STATUS2_ATTRACT) && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && !(ctx->battleStatus & BATTLE_STATUS_CHARGE_TURN) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1) && ctx->battleMons[ctx->battlerIdTarget].hp && ((BattleSystem_Random(bsys) % 10) < 3)) { - ctx->statChangeType = 3; + ctx->statChangeType = 3; ctx->battlerIdStatChange = ctx->battlerIdAttacker; - ctx->battlerIdTemp = ctx->battlerIdTarget; - *script = BATTLE_SUBSCRIPT_INFATUATE; - ret = TRUE; + ctx->battlerIdTemp = ctx->battlerIdTarget; + *script = BATTLE_SUBSCRIPT_INFATUATE; + ret = TRUE; } break; case ABILITY_AFTERMATH: if (ctx->battlerIdTarget == ctx->battlerIdFainted && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_MAGIC_GUARD && !CheckAbilityActive(bsys, ctx, CHECK_ABILITY_ALL_HP, 0, ABILITY_DAMP) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && ctx->battleMons[ctx->battlerIdAttacker].hp && !(ctx->moveStatusFlag & MOVE_STATUS_FAIL) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1)) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 4); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 4); ctx->battlerIdTemp = ctx->battlerIdAttacker; - *script = BATTLE_SUBSCRIPT_AFTERMATH; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_AFTERMATH; + ret = TRUE; } break; default: @@ -3688,44 +3688,44 @@ BOOL CheckStatusHealAbility(BattleSystem *bsys, BattleContext *ctx, int battlerI case ABILITY_IMMUNITY: if (ctx->battleMons[battlerId].status & STATUS_POISON_ALL) { ctx->msgTemp = 1; - ret = TRUE; + ret = TRUE; } break; case ABILITY_OWN_TEMPO: if (ctx->battleMons[battlerId].status2 & STATUS2_CONFUSION) { ctx->msgTemp = 5; - ret = TRUE; + ret = TRUE; } break; case ABILITY_LIMBER: if (ctx->battleMons[battlerId].status & STATUS_PARALYSIS) { ctx->msgTemp = 3; - ret = TRUE; + ret = TRUE; } break; case ABILITY_INSOMNIA: case ABILITY_VITAL_SPIRIT: if (ctx->battleMons[battlerId].status & STATUS_SLEEP) { ctx->msgTemp = 0; - ret = TRUE; + ret = TRUE; } break; case ABILITY_WATER_VEIL: if (ctx->battleMons[battlerId].status & STATUS_BURN) { ctx->msgTemp = 2; - ret = TRUE; + ret = TRUE; } break; case ABILITY_MAGMA_ARMOR: if (ctx->battleMons[battlerId].status & STATUS_FREEZE) { ctx->msgTemp = 4; - ret = TRUE; + ret = TRUE; } break; case ABILITY_OBLIVIOUS: if (ctx->battleMons[battlerId].status2 & STATUS2_ATTRACT) { ctx->msgTemp = 6; - ret = TRUE; + ret = TRUE; } break; case ABILITY_UNBURDEN: @@ -3737,11 +3737,11 @@ BOOL CheckStatusHealAbility(BattleSystem *bsys, BattleContext *ctx, int battlerI } if (ret == TRUE) { ctx->battlerIdTemp = battlerId; - ctx->abilityTemp = GetBattlerAbility(ctx, battlerId); + ctx->abilityTemp = GetBattlerAbility(ctx, battlerId); if (!flag) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, 221); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } } @@ -3784,17 +3784,17 @@ BOOL CheckStatusHealSwitch(BattleContext *ctx, int ability, int status) { } BOOL TrySyncronizeStatus(BattleSystem *bsys, BattleContext *ctx, ControllerCommand command) { - BOOL ret = FALSE; + BOOL ret = FALSE; int script = BATTLE_SUBSCRIPT_NONE; if (ctx->battlerIdTarget != BATTLER_NONE && GetBattlerAbility(ctx, ctx->battlerIdTarget) == ABILITY_SYNCHRONIZE && ctx->battlerIdTarget == ctx->battlerIdStatChange && (ctx->battleStatus & BATTLE_STATUS_SYNCRONIZE)) { - ctx->battlerIdTemp = ctx->battlerIdTarget; + ctx->battlerIdTemp = ctx->battlerIdTarget; ctx->battlerIdStatChange = ctx->battlerIdAttacker; - ret = TRUE; + ret = TRUE; } else if (GetBattlerAbility(ctx, ctx->battlerIdAttacker) == ABILITY_SYNCHRONIZE && ctx->battlerIdAttacker == ctx->battlerIdStatChange && (ctx->battleStatus & BATTLE_STATUS_SYNCRONIZE)) { - ctx->battlerIdTemp = ctx->battlerIdAttacker; + ctx->battlerIdTemp = ctx->battlerIdAttacker; ctx->battlerIdStatChange = ctx->battlerIdTarget; - ret = TRUE; + ret = TRUE; } if (ret == TRUE) { @@ -3809,7 +3809,7 @@ BOOL TrySyncronizeStatus(BattleSystem *bsys, BattleContext *ctx, ControllerComma ctx->statChangeType = 3; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return ret; } } @@ -3818,26 +3818,26 @@ BOOL TrySyncronizeStatus(BattleSystem *bsys, BattleContext *ctx, ControllerComma if (ret == TRUE) { ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return ret; } if (ctx->battlerIdTarget != BATTLER_NONE && GetBattlerHeldItemEffect(ctx, ctx->battlerIdTarget) == HOLD_EFFECT_RECIPROCATE_INFAT && ctx->battlerIdTarget == ctx->battlerIdStatChange && (ctx->selfTurnData[ctx->battlerIdTarget].unk14 & 4)) { - ctx->battlerIdTemp = ctx->battlerIdTarget; + ctx->battlerIdTemp = ctx->battlerIdTarget; ctx->battlerIdStatChange = ctx->battlerIdAttacker; - ret = TRUE; + ret = TRUE; } else if (GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker) == HOLD_EFFECT_RECIPROCATE_INFAT && ctx->battlerIdAttacker == ctx->battlerIdStatChange && (ctx->selfTurnData[ctx->battlerIdAttacker].unk14 & 4)) { - ctx->battlerIdTemp = ctx->battlerIdAttacker; + ctx->battlerIdTemp = ctx->battlerIdAttacker; ctx->battlerIdStatChange = ctx->battlerIdTarget; - ret = TRUE; + ret = TRUE; } if (ret == TRUE) { - script = BATTLE_SUBSCRIPT_INFATUATE; + script = BATTLE_SUBSCRIPT_INFATUATE; ctx->statChangeType = 5; ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; return ret; } @@ -3850,7 +3850,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { int item; int boost; - item = GetBattlerHeldItemEffect(ctx, battlerId); + item = GetBattlerHeldItemEffect(ctx, battlerId); boost = GetHeldItemModifier(ctx, battlerId, 0); if (ctx->battleMons[battlerId].hp) { @@ -3858,45 +3858,45 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { case HOLD_EFFECT_HP_RESTORE: // oran berry, berry juice if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { ctx->hpCalc = boost; - script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; + ret = TRUE; } break; case HOLD_EFFECT_HP_PCT_RESTORE: // sitrus berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * boost, 100); - script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; + ret = TRUE; } break; case HOLD_EFFECT_PRZ_RESTORE: // cheri berry if (ctx->battleMons[battlerId].status & STATUS_PARALYSIS) { script = BATTLE_SUBSCRIPT_HELD_ITEM_PRZ_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_SLP_RESTORE: // chesto berry if (ctx->battleMons[battlerId].status & STATUS_SLEEP) { script = BATTLE_SUBSCRIPT_HELD_ITEM_SLP_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_PSN_RESTORE: // pecha berry if (ctx->battleMons[battlerId].status & STATUS_POISON_ALL) { script = BATTLE_SUBSCRIPT_HELD_ITEM_PSN_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_BRN_RESTORE: // rawst berry if (ctx->battleMons[battlerId].status & STATUS_BURN) { script = BATTLE_SUBSCRIPT_HELD_ITEM_BRN_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_FRZ_RESTORE: // aspear berry if (ctx->battleMons[battlerId].status & STATUS_FREEZE) { script = BATTLE_SUBSCRIPT_HELD_ITEM_FRZ_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_PP_RESTORE: // leppa berry @@ -3911,15 +3911,15 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { BattleMon_AddVar(&ctx->battleMons[battlerId], BMON_DATA_CUR_PP_1 + index, boost); CopyBattleMonToPartyMon(bsys, ctx, battlerId); ctx->moveTemp = ctx->battleMons[battlerId].moves[index]; - script = BATTLE_SUBSCRIPT_HELD_ITEM_PP_RESTORE; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_PP_RESTORE; + ret = TRUE; } break; } case HOLD_EFFECT_CONFUSE_RESTORE: // persim berry if (ctx->battleMons[battlerId].status2 & STATUS2_CONFUSION) { script = BATTLE_SUBSCRIPT_HELD_ITEM_CNF_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_STATUS_RESTORE: // lum berry @@ -3950,7 +3950,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case HOLD_EFFECT_HP_RESTORE_SPICY: // figy berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 0; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_SPICY) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -3962,7 +3962,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case HOLD_EFFECT_HP_RESTORE_DRY: // wiki berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 1; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_DRY) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -3974,7 +3974,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case HOLD_EFFECT_HP_RESTORE_SWEET: // mago berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 2; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_SWEET) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -3986,7 +3986,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case HOLD_EFFECT_HP_RESTORE_BITTER: // aguav berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 3; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_BITTER) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -3998,7 +3998,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case HOLD_EFFECT_HP_RESTORE_SOUR: // iappapa berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 4; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_SOUR) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4014,8 +4014,8 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[1] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 1; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_DEF_UP: // ganlon berry @@ -4024,8 +4024,8 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[2] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 2; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_SPEED_UP: // salac berry @@ -4034,8 +4034,8 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[3] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 3; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_SPATK_UP: // petaya berry @@ -4044,8 +4044,8 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[4] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 4; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_SPDEF_UP: // apicot berry @@ -4054,8 +4054,8 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[5] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 5; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_CRITRATE_UP: // apicot berry @@ -4064,7 +4064,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && !(ctx->battleMons[battlerId].status2 & STATUS2_FOCUS_ENERGY)) { script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_CRIT; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_RANDOM_UP: // starf berry @@ -4083,8 +4083,8 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { stat = BattleSystem_Random(bsys) % 5; } while (ctx->battleMons[battlerId].statChanges[1 + stat] == BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE); ctx->msgTemp = stat + 1; - script = BATTLE_SUBSCRIPT_HELD_ITEM_SHARPLY_RAISE_STAT; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_SHARPLY_RAISE_STAT; + ret = TRUE; } } break; @@ -4094,7 +4094,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { for (stat = 0; stat < 8; stat++) { if (ctx->battleMons[battlerId].statChanges[stat] < 6) { ctx->battleMons[battlerId].statChanges[stat] = 6; - ret = TRUE; + ret = TRUE; } } if (ret == TRUE) { @@ -4105,8 +4105,8 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { case HOLD_EFFECT_HEAL_INFATUATION: // mental herb if (ctx->battleMons[battlerId].status2 & STATUS2_ATTRACT) { ctx->msgTemp = 6; - script = BATTLE_SUBSCRIPT_HELD_ITEM_HEAL_INFATUATION; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_HEAL_INFATUATION; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_ACC_UP: // micle berry @@ -4115,7 +4115,7 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ctx->battleMons[battlerId].hp <= (ctx->battleMons[battlerId].maxHp / boost)) { script = BATTLE_SUBSCRIPT_HELD_ITEM_TEMP_ACC_UP; - ret = TRUE; + ret = TRUE; } break; default: @@ -4123,10 +4123,10 @@ BOOL TryUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } if (ret == TRUE) { ctx->battlerIdTemp = battlerId; - ctx->itemTemp = GetBattlerHeldItem(ctx, battlerId); + ctx->itemTemp = GetBattlerHeldItem(ctx, battlerId); ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } } return ret; @@ -4145,21 +4145,21 @@ BOOL CheckItemGradualHPRestore(BattleSystem *bsys, BattleContext *ctx, int battl case HOLD_EFFECT_HP_RESTORE_GRADUAL: // leftovers if (ctx->battleMons[battlerId].hp < ctx->battleMons[battlerId].maxHp) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, 16); - script = BATTLE_SUBSCRIPT_RESTORE_A_LITTLE_HP; - ret = TRUE; + script = BATTLE_SUBSCRIPT_RESTORE_A_LITTLE_HP; + ret = TRUE; } break; case HOLD_EFFECT_HP_RESTORE_PSN_TYPE: // black sludge if (GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_1, NULL) == TYPE_POISON || GetBattlerVar(ctx, battlerId, BMON_DATA_TYPE_2, NULL) == TYPE_POISON) { if (ctx->battleMons[battlerId].hp < ctx->battleMons[battlerId].maxHp) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, 16); - script = BATTLE_SUBSCRIPT_RESTORE_A_LITTLE_HP; - ret = TRUE; + script = BATTLE_SUBSCRIPT_RESTORE_A_LITTLE_HP; + ret = TRUE; } } else if (GetBattlerAbility(ctx, battlerId) != ABILITY_MAGIC_GUARD) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, 8); - script = BATTLE_SUBSCRIPT_LOSE_HP_FROM_ITEM_WITH_MESSAGE; - ret = TRUE; + script = BATTLE_SUBSCRIPT_LOSE_HP_FROM_ITEM_WITH_MESSAGE; + ret = TRUE; } break; default: @@ -4167,10 +4167,10 @@ BOOL CheckItemGradualHPRestore(BattleSystem *bsys, BattleContext *ctx, int battl } if (ret == TRUE) { ctx->battlerIdTemp = battlerId; - ctx->itemTemp = GetBattlerHeldItem(ctx, battlerId); + ctx->itemTemp = GetBattlerHeldItem(ctx, battlerId); ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } } return ret; @@ -4181,7 +4181,7 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 int item; int boost; - item = GetBattlerHeldItemEffect(ctx, battlerId); + item = GetBattlerHeldItemEffect(ctx, battlerId); boost = GetHeldItemModifier(ctx, battlerId, 0); if (ctx->battleMons[battlerId].hp) { @@ -4189,45 +4189,45 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 case HOLD_EFFECT_HP_RESTORE: // oran berry, berry juice if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { ctx->hpCalc = boost; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; + ret = TRUE; } break; case HOLD_EFFECT_HP_PCT_RESTORE: // sitrus berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * boost, 100); - *script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; + ret = TRUE; } break; case HOLD_EFFECT_PRZ_RESTORE: // cheri berry if (ctx->battleMons[battlerId].status & STATUS_PARALYSIS) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_PRZ_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_SLP_RESTORE: // chesto berry if (ctx->battleMons[battlerId].status & STATUS_SLEEP) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_SLP_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_PSN_RESTORE: // pecha berry if (ctx->battleMons[battlerId].status & STATUS_POISON_ALL) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_PSN_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_BRN_RESTORE: // rawst berry if (ctx->battleMons[battlerId].status & STATUS_BURN) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_BRN_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_FRZ_RESTORE: // aspear berry if (ctx->battleMons[battlerId].status & STATUS_FREEZE) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_FRZ_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_PP_RESTORE: // leppa berry @@ -4242,15 +4242,15 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 BattleMon_AddVar(&ctx->battleMons[battlerId], BMON_DATA_CUR_PP_1 + index, boost); CopyBattleMonToPartyMon(bsys, ctx, battlerId); ctx->moveTemp = ctx->battleMons[battlerId].moves[index]; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_PP_RESTORE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_PP_RESTORE; + ret = TRUE; } break; } case HOLD_EFFECT_CONFUSE_RESTORE: // persim berry if (ctx->battleMons[battlerId].status2 & STATUS2_CONFUSION) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_CNF_RESTORE; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_STATUS_RESTORE: // lum berry @@ -4285,7 +4285,7 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 for (stat = 0; stat < 8; stat++) { if (ctx->battleMons[battlerId].statChanges[stat] < 6) { ctx->battleMons[battlerId].statChanges[stat] = 6; - ret = TRUE; + ret = TRUE; } } if (ret == TRUE) { @@ -4296,8 +4296,8 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 case HOLD_EFFECT_HEAL_INFATUATION: // mental herb if (ctx->battleMons[battlerId].status2 & STATUS2_ATTRACT) { ctx->msgTemp = 6; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_HEAL_INFATUATION; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_HEAL_INFATUATION; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_ACC_UP: // micle berry @@ -4306,12 +4306,12 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 } if (ctx->battleMons[battlerId].hp <= (ctx->battleMons[battlerId].maxHp / boost)) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_TEMP_ACC_UP; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_HP_RESTORE_SPICY: // figy berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 0; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_SPICY) == -1) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4323,7 +4323,7 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 break; case HOLD_EFFECT_HP_RESTORE_DRY: // wiki berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 1; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_DRY) == -1) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4335,7 +4335,7 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 break; case HOLD_EFFECT_HP_RESTORE_SWEET: // mago berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 2; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_SWEET) == -1) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4347,7 +4347,7 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 break; case HOLD_EFFECT_HP_RESTORE_BITTER: // aguav berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 3; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_BITTER) == -1) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4359,7 +4359,7 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 break; case HOLD_EFFECT_HP_RESTORE_SOUR: // iappapa berry if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / 2) { - ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); + ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp, boost); ctx->msgTemp = 4; if (GetFlavorPreferenceFromPID(ctx->battleMons[battlerId].personality, FLAVOR_SOUR) == -1) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4375,8 +4375,8 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[1] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 1; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_DEF_UP: // ganlon berry @@ -4385,8 +4385,8 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[2] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 2; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_SPEED_UP: // salac berry @@ -4395,8 +4395,8 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[3] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 3; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_SPATK_UP: // petaya berry @@ -4405,8 +4405,8 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[4] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 4; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_SPDEF_UP: // apicot berry @@ -4415,8 +4415,8 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && ctx->battleMons[battlerId].statChanges[5] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 5; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_CRITRATE_UP: // apicot berry @@ -4425,7 +4425,7 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 } if (ctx->battleMons[battlerId].hp <= ctx->battleMons[battlerId].maxHp / boost && !(ctx->battleMons[battlerId].status2 & STATUS2_FOCUS_ENERGY)) { *script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_CRIT; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_PINCH_RANDOM_UP: // starf berry @@ -4444,8 +4444,8 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 stat = BattleSystem_Random(bsys) % 5; } while (ctx->battleMons[battlerId].statChanges[1 + stat] == BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE); ctx->msgTemp = stat + 1; - *script = BATTLE_SUBSCRIPT_HELD_ITEM_SHARPLY_RAISE_STAT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_SHARPLY_RAISE_STAT; + ret = TRUE; } } break; @@ -4463,28 +4463,28 @@ BOOL CheckUseHeldItem(BattleSystem *bsys, BattleContext *ctx, int battlerId, u32 BOOL TryHeldItemNegativeEffect(BattleSystem *bsys, BattleContext *ctx, int battlerId) { BOOL ret = FALSE; int script; - int item = GetBattlerHeldItemEffect(ctx, battlerId); + int item = GetBattlerHeldItemEffect(ctx, battlerId); int boost = GetHeldItemModifier(ctx, battlerId, 0); if (ctx->battleMons[battlerId].hp) { switch (item) { case HOLD_EFFECT_PSN_USER: // toxic orb ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 5; - script = BATTLE_SUBSCRIPT_BADLY_POISON; - ret = TRUE; + ctx->statChangeType = 5; + script = BATTLE_SUBSCRIPT_BADLY_POISON; + ret = TRUE; break; case HOLD_EFFECT_BRN_USER: // flame orb ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 5; - script = BATTLE_SUBSCRIPT_BURN; - ret = TRUE; + ctx->statChangeType = 5; + script = BATTLE_SUBSCRIPT_BURN; + ret = TRUE; break; case HOLD_EFFECT_DMG_USER_CONTACT_XFR: // sticky barb if (GetBattlerAbility(ctx, battlerId) != ABILITY_MAGIC_GUARD) { ctx->hpCalc = DamageDivide(ctx->battleMons[battlerId].maxHp * -1, boost); - script = BATTLE_SUBSCRIPT_LOSE_HP_FROM_ITEM_WITH_MESSAGE; - ret = TRUE; + script = BATTLE_SUBSCRIPT_LOSE_HP_FROM_ITEM_WITH_MESSAGE; + ret = TRUE; } break; default: @@ -4492,10 +4492,10 @@ BOOL TryHeldItemNegativeEffect(BattleSystem *bsys, BattleContext *ctx, int battl } if (ret == TRUE) { ctx->battlerIdTemp = battlerId; - ctx->itemTemp = GetBattlerHeldItem(ctx, battlerId); + ctx->itemTemp = GetBattlerHeldItem(ctx, battlerId); ReadBattleScriptFromNarc(ctx, NARC_a_0_0_1, script); ctx->commandNext = ctx->command; - ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; + ctx->command = CONTROLLER_COMMAND_RUN_SCRIPT; } } return ret; @@ -4529,38 +4529,38 @@ BOOL CheckItemEffectOnHit(BattleSystem *bsys, BattleContext *ctx, int *script) { return ret; } - item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdTarget); + item = GetBattlerHeldItemEffect(ctx, ctx->battlerIdTarget); boost = GetHeldItemModifier(ctx, ctx->battlerIdTarget, 0); - side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); + side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); switch (item) { case HOLD_EFFECT_DMG_USER_CONTACT_XFR: // sticky barb if (ctx->battleMons[ctx->battlerIdAttacker].hp && !(ctx->battleMons[ctx->battlerIdAttacker].item) && !(ctx->fieldSideConditionData[side].battlerBitKnockedOffItem & MaskOfFlagNo(ctx->selectedMonIndex[ctx->battlerIdAttacker])) && ctx->moveNoCur != MOVE_KNOCK_OFF && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1)) { *script = BATTLE_SUBSCRIPT_TRANSFER_STICKY_BARB; - ret = TRUE; + ret = TRUE; } break; case HOLD_EFFECT_RECOIL_PHYSICAL: // jacoba berry if (ctx->battleMons[ctx->battlerIdAttacker].hp && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_MAGIC_GUARD && !(ctx->battleStatus2 & BATTLE_STATUS2_UTURN) && ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage) { ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, boost); - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RECOIL_WHEN_HIT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RECOIL_WHEN_HIT; + ret = TRUE; } break; case HOLD_EFFECT_RECOIL_SPECIAL: // rowap berry if (ctx->battleMons[ctx->battlerIdAttacker].hp && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_MAGIC_GUARD && ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) { ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, boost); - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RECOIL_WHEN_HIT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RECOIL_WHEN_HIT; + ret = TRUE; } break; case HOLD_EFFECT_HP_RESTORE_SE: // enigma berry if (ctx->battleMons[ctx->battlerIdTarget].hp && (ctx->moveStatusFlag & MOVE_STATUS_SUPER_EFFECTIVE)) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp, boost); - *script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp, boost); + *script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; ctx->battlerIdTemp = ctx->battlerIdTarget; - ctx->itemTemp = ctx->battleMons[ctx->battlerIdTarget].item; - ret = TRUE; + ctx->itemTemp = ctx->battleMons[ctx->battlerIdTarget].item; + ret = TRUE; } break; default: @@ -4648,10 +4648,10 @@ BOOL BattlerCanSwitch(BattleSystem *bsys, BattleContext *ctx, int battlerId) { } BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) { - BOOL ret = FALSE; + BOOL ret = FALSE; int script = BATTLE_SUBSCRIPT_NONE; - int item = GetHeldItemStealBerryEffect(ctx, battlerId); - int mod = GetHeldItemModifier(ctx, battlerId, 1); + int item = GetHeldItemStealBerryEffect(ctx, battlerId); + int mod = GetHeldItemModifier(ctx, battlerId, 1); if (BattlerCheckSubstitute(ctx, ctx->battlerIdTarget) == TRUE) { return FALSE; @@ -4661,14 +4661,14 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) case STEAL_EFFECT_RESTORE_HP: // oran berry if (ctx->battleMons[ctx->battlerIdAttacker].hp != ctx->battleMons[ctx->battlerIdAttacker].maxHp) { ctx->hpCalc = mod; - script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; } ret = TRUE; break; case STEAL_EFFECT_RESTORE_HP_PRCT: // sitrus berry if (ctx->battleMons[ctx->battlerIdAttacker].hp != ctx->battleMons[ctx->battlerIdAttacker].maxHp) { ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * mod, 100); - script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_HP_RESTORE; } ret = TRUE; break; @@ -4712,7 +4712,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) if (ctx->battleMons[ctx->battlerIdAttacker].moves[index]) { ppCalc = GetMoveMaxPP(ctx->battleMons[ctx->battlerIdAttacker].moves[index], ctx->battleMons[ctx->battlerIdAttacker].movePP[index]) - ctx->battleMons[ctx->battlerIdAttacker].movePPCur[index]; if (ppCalc > max) { - max = ppCalc; + max = ppCalc; maxIndex = index; } } @@ -4721,8 +4721,8 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) BattleMon_AddVar(&ctx->battleMons[ctx->battlerIdAttacker], BMON_DATA_CUR_PP_1 + maxIndex, mod); CopyBattleMonToPartyMon(bsys, ctx, ctx->battlerIdAttacker); ctx->moveTemp = ctx->battleMons[ctx->battlerIdAttacker].moves[maxIndex]; - script = BATTLE_SUBSCRIPT_HELD_ITEM_PP_RESTORE; - ret = TRUE; + script = BATTLE_SUBSCRIPT_HELD_ITEM_PP_RESTORE; + ret = TRUE; break; } case STEAL_EFFECT_CURE_CONFUSION: // persim berry @@ -4759,7 +4759,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) break; case STEAL_EFFECT_RESTORE_SPICY: // figy berry if (ctx->battleMons[ctx->battlerIdAttacker].hp != ctx->battleMons[ctx->battlerIdAttacker].maxHp) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); ctx->msgTemp = 0; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdAttacker].personality, FLAVOR_SPICY) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4771,7 +4771,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) break; case STEAL_EFFECT_RESTORE_DRY: // wiki berry if (ctx->battleMons[ctx->battlerIdAttacker].hp != ctx->battleMons[ctx->battlerIdAttacker].maxHp) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); ctx->msgTemp = 1; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdAttacker].personality, FLAVOR_DRY) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4783,7 +4783,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) break; case STEAL_EFFECT_RESTORE_SWEET: // mago berry if (ctx->battleMons[ctx->battlerIdAttacker].hp != ctx->battleMons[ctx->battlerIdAttacker].maxHp) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); ctx->msgTemp = 2; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdAttacker].personality, FLAVOR_SWEET) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4795,7 +4795,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) break; case STEAL_EFFECT_RESTORE_BITTER: // aguav berry if (ctx->battleMons[ctx->battlerIdAttacker].hp != ctx->battleMons[ctx->battlerIdAttacker].maxHp) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); ctx->msgTemp = 3; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdAttacker].personality, FLAVOR_BITTER) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4807,7 +4807,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) break; case STEAL_EFFECT_RESTORE_SOUR: // iappapa berry if (ctx->battleMons[ctx->battlerIdAttacker].hp != ctx->battleMons[ctx->battlerIdAttacker].maxHp) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp, mod); ctx->msgTemp = 4; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdAttacker].personality, FLAVOR_SOUR) == -1) { script = BATTLE_SUBSCRIPT_HELD_ITEM_DISLIKE_FLAVOR; @@ -4820,35 +4820,35 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) case STEAL_EFFECT_ATK_UP: // liechi berry if (ctx->battleMons[ctx->battlerIdAttacker].statChanges[1] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 1; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; } ret = TRUE; break; case STEAL_EFFECT_DEF_UP: // ganlon berry if (ctx->battleMons[ctx->battlerIdAttacker].statChanges[2] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 2; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; } ret = TRUE; break; case STEAL_EFFECT_SPEED_UP: // salac berry if (ctx->battleMons[ctx->battlerIdAttacker].statChanges[3] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 3; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; } ret = TRUE; break; case STEAL_EFFECT_SPATK_UP: // petaya berry if (ctx->battleMons[ctx->battlerIdAttacker].statChanges[4] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 4; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; } ret = TRUE; break; case STEAL_EFFECT_SPDEF_UP: // apicot berry if (ctx->battleMons[ctx->battlerIdAttacker].statChanges[5] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { ctx->msgTemp = 5; - script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; + script = BATTLE_SUBSCRIPT_HELD_ITEM_RAISE_STAT; } ret = TRUE; break; @@ -4865,7 +4865,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) stat = BattleSystem_Random(bsys) % 5; } while (ctx->battleMons[ctx->battlerIdAttacker].statChanges[1 + stat] == BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE); ctx->msgTemp = stat + 1; - script = BATTLE_SUBSCRIPT_HELD_ITEM_SHARPLY_RAISE_STAT; + script = BATTLE_SUBSCRIPT_HELD_ITEM_SHARPLY_RAISE_STAT; } ret = TRUE; break; @@ -4878,7 +4878,7 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) break; case STEAL_EFFECT_ACC_UP: // micle berry script = BATTLE_SUBSCRIPT_HELD_ITEM_TEMP_ACC_UP; - ret = TRUE; + ret = TRUE; break; default: if (ItemIdIsBerry(ctx->battleMons[battlerId].item) == TRUE) { @@ -4901,10 +4901,10 @@ BOOL TryEatOpponentBerry(BattleSystem *bsys, BattleContext *ctx, int battlerId) BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { int item = GetHeldItemFlingEffect(ctx, battlerId); - int mod = GetHeldItemModifier(ctx, battlerId, 2); + int mod = GetHeldItemModifier(ctx, battlerId, 2); - ctx->movePower = GetHeldItemFlingPower(ctx, battlerId); - ctx->flingScript = 0; + ctx->movePower = GetHeldItemFlingPower(ctx, battlerId); + ctx->flingScript = 0; ctx->statChangeType = 0; if (!ctx->movePower) { @@ -4913,11 +4913,11 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { switch (item) { case STEAL_EFFECT_RESTORE_HP: // oran berry - ctx->flingData = mod; + ctx->flingData = mod; ctx->flingScript = 198; break; case STEAL_EFFECT_RESTORE_HP_PRCT: // sitrus berry - ctx->flingData = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp * mod, 100); + ctx->flingData = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp * mod, 100); ctx->flingScript = 198; break; case STEAL_EFFECT_CURE_PARALYSIS: // cheri berry @@ -4955,7 +4955,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { if (ctx->battleMons[ctx->battlerIdTarget].moves[index]) { ppCalc = GetMoveMaxPP(ctx->battleMons[ctx->battlerIdTarget].moves[index], ctx->battleMons[ctx->battlerIdTarget].movePP[index]) - ctx->battleMons[ctx->battlerIdTarget].movePPCur[index]; if (ppCalc > max) { - max = ppCalc; + max = ppCalc; maxIndex = index; } } @@ -4963,7 +4963,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { if (max) { BattleMon_AddVar(&ctx->battleMons[ctx->battlerIdTarget], BMON_DATA_CUR_PP_1 + maxIndex, mod); CopyBattleMonToPartyMon(bsys, ctx, ctx->battlerIdTarget); - ctx->moveTemp = ctx->battleMons[ctx->battlerIdTarget].moves[maxIndex]; + ctx->moveTemp = ctx->battleMons[ctx->battlerIdTarget].moves[maxIndex]; ctx->flingScript = 204; } break; @@ -5000,7 +5000,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case STEAL_EFFECT_RESTORE_SPICY: // figy berry ctx->flingData = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp, mod); - ctx->msgTemp = 0; + ctx->msgTemp = 0; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdTarget].personality, FLAVOR_SPICY) == -1) { ctx->flingScript = 207; } else { @@ -5009,7 +5009,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case STEAL_EFFECT_RESTORE_DRY: // wiki berry ctx->flingData = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp, mod); - ctx->msgTemp = 1; + ctx->msgTemp = 1; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdTarget].personality, FLAVOR_DRY) == -1) { ctx->flingScript = 207; } else { @@ -5018,7 +5018,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case STEAL_EFFECT_RESTORE_SWEET: // mago berry ctx->flingData = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp, mod); - ctx->msgTemp = 2; + ctx->msgTemp = 2; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdTarget].personality, FLAVOR_SWEET) == -1) { ctx->flingScript = 207; } else { @@ -5027,7 +5027,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case STEAL_EFFECT_RESTORE_BITTER: // aguav berry ctx->flingData = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp, mod); - ctx->msgTemp = 3; + ctx->msgTemp = 3; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdTarget].personality, FLAVOR_BITTER) == -1) { ctx->flingScript = 207; } else { @@ -5036,7 +5036,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { break; case STEAL_EFFECT_RESTORE_SOUR: // iappapa berry ctx->flingData = DamageDivide(ctx->battleMons[ctx->battlerIdTarget].maxHp, mod); - ctx->msgTemp = 4; + ctx->msgTemp = 4; if (GetFlavorPreferenceFromPID(ctx->battleMons[ctx->battlerIdTarget].personality, FLAVOR_SOUR) == -1) { ctx->flingScript = 207; } else { @@ -5049,68 +5049,68 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { for (stat = 0; stat < 8; stat++) { if (ctx->battleMons[ctx->battlerIdTarget].statChanges[stat] < 6) { ctx->battleMons[ctx->battlerIdTarget].statChanges[stat] = 6; - ctx->flingScript = 211; + ctx->flingScript = 211; } } } break; case STEAL_EFFECT_CURE_INFATUATION: // mental herb if (ctx->battleMons[ctx->battlerIdTarget].status2 & STATUS2_ATTRACT) { - ctx->msgTemp = 6; + ctx->msgTemp = 6; ctx->flingScript = 212; } break; case STEAL_EFFECT_FLINCH: // kings rock, razor fang ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 2; - ctx->flingScript = 14; + ctx->statChangeType = 2; + ctx->flingScript = 14; break; case STEAL_EFFECT_PARALYZE: // light ball ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 2; - ctx->flingScript = 31; + ctx->statChangeType = 2; + ctx->flingScript = 31; break; case STEAL_EFFECT_POISON: // poison barb ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 2; - ctx->flingScript = 22; + ctx->statChangeType = 2; + ctx->flingScript = 22; break; case STEAL_EFFECT_BAD_POISON: // toxic orb ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 2; - ctx->flingScript = 47; + ctx->statChangeType = 2; + ctx->flingScript = 47; break; case STEAL_EFFECT_BURN: // flame orb ctx->battlerIdStatChange = battlerId; - ctx->statChangeType = 2; - ctx->flingScript = 25; + ctx->statChangeType = 2; + ctx->flingScript = 25; break; case STEAL_EFFECT_ATK_UP: // liechi berry if (ctx->battleMons[ctx->battlerIdTarget].statChanges[1] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { - ctx->msgTemp = 1; + ctx->msgTemp = 1; ctx->flingScript = 208; } break; case STEAL_EFFECT_DEF_UP: // ganlon berry if (ctx->battleMons[ctx->battlerIdTarget].statChanges[2] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { - ctx->msgTemp = 2; + ctx->msgTemp = 2; ctx->flingScript = 208; } break; case STEAL_EFFECT_SPEED_UP: // salac berry if (ctx->battleMons[ctx->battlerIdTarget].statChanges[3] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { - ctx->msgTemp = 3; + ctx->msgTemp = 3; ctx->flingScript = 208; } break; case STEAL_EFFECT_SPATK_UP: // petaya berry if (ctx->battleMons[ctx->battlerIdTarget].statChanges[4] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { - ctx->msgTemp = 4; + ctx->msgTemp = 4; ctx->flingScript = 208; } break; case STEAL_EFFECT_SPDEF_UP: // apicot berry if (ctx->battleMons[ctx->battlerIdTarget].statChanges[5] < BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE) { - ctx->msgTemp = 5; + ctx->msgTemp = 5; ctx->flingScript = 208; } break; @@ -5126,7 +5126,7 @@ BOOL TryFling(BattleSystem *bsys, BattleContext *ctx, int battlerId) { do { stat = BattleSystem_Random(bsys) % 5; } while (ctx->battleMons[ctx->battlerIdTarget].statChanges[1 + stat] == BATTLE_SUBSCRIPT_UPDATE_STAT_STAGE); - ctx->msgTemp = stat + 1; + ctx->msgTemp = stat + 1; ctx->flingScript = 210; } break; @@ -5165,7 +5165,7 @@ void ov12_022565E0(BattleSystem *bsys, BattleContext *ctx) { } } else { ctx->battleMons[ctx->battlerIdAttacker].unk88.metronomeTurns = 0; - ctx->moveNoMetronome[ctx->battlerIdAttacker] = ctx->moveNoTemp; + ctx->moveNoMetronome[ctx->battlerIdAttacker] = ctx->moveNoTemp; } } } else { @@ -5222,8 +5222,8 @@ BOOL Battler_CanSelectAction(BattleContext *ctx, int battlerId) { void ov12_022567D4(BattleSystem *bsys, BattleContext *ctx, Pokemon *mon) { PlayerProfile *profile = BattleSystem_GetPlayerProfile(bsys, BATTLER_PLAYER); - int location = BattleSystem_GetLocation(bsys); - int terrain = BattleSystem_GetTerrainId(bsys); + int location = BattleSystem_GetLocation(bsys); + int terrain = BattleSystem_GetTerrainId(bsys); int ballId; if (BattleSystem_GetBattleType(bsys) & BATTLE_TYPE_PAL_PARK) { @@ -5251,9 +5251,9 @@ BOOL BattlerCheckSubstitute(BattleContext *ctx, int battlerId) { BOOL ov12_02256854(BattleSystem *bsys, BattleContext *ctx) { PlayerProfile *profile = BattleSystem_GetPlayerProfile(bsys, BATTLER_PLAYER); - u32 trainerId = PlayerProfile_GetTrainerID(profile); - u32 gender = PlayerProfile_GetTrainerGender(profile); - const u16 *name = PlayerProfile_GetNamePtr(profile); + u32 trainerId = PlayerProfile_GetTrainerID(profile); + u32 gender = PlayerProfile_GetTrainerGender(profile); + const u16 *name = PlayerProfile_GetNamePtr(profile); if (trainerId == ctx->battleMons[ctx->battlerIdAttacker].otid && gender == ctx->battleMons[ctx->battlerIdAttacker].metGender && !StringNotEqualN(name, &ctx->battleMons[ctx->battlerIdAttacker].otName[0], PLAYER_NAME_LENGTH)) { return TRUE; @@ -5264,9 +5264,9 @@ BOOL ov12_02256854(BattleSystem *bsys, BattleContext *ctx) { BOOL ov12_022568B0(BattleSystem *bsys, Pokemon *mon) { PlayerProfile *profile = BattleSystem_GetPlayerProfile(bsys, BATTLER_PLAYER); - u32 trainerId = PlayerProfile_GetTrainerID(profile); - u32 gender = PlayerProfile_GetTrainerGender(profile); - const u16 *name = PlayerProfile_GetNamePtr(profile); + u32 trainerId = PlayerProfile_GetTrainerID(profile); + u32 gender = PlayerProfile_GetTrainerGender(profile); + const u16 *name = PlayerProfile_GetNamePtr(profile); u16 otName[8]; GetMonData(mon, MON_DATA_OT_NAME, otName); @@ -5290,38 +5290,38 @@ BOOL Battler_CheckWeatherFormChange(BattleSystem *bsys, BattleContext *ctx, int if (!(ctx->fieldCondition & FIELD_CONDITION_WEATHER_CASTFORM) && ctx->battleMons[ctx->battlerIdTemp].type1 != TYPE_NORMAL && ctx->battleMons[ctx->battlerIdTemp].type2 != TYPE_NORMAL) { ctx->battleMons[ctx->battlerIdTemp].type1 = TYPE_NORMAL; ctx->battleMons[ctx->battlerIdTemp].type2 = TYPE_NORMAL; - ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_NORMAL; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_NORMAL; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } else if ((ctx->fieldCondition & FIELD_CONDITION_SUN_ALL) && ctx->battleMons[ctx->battlerIdTemp].type1 != TYPE_FIRE && ctx->battleMons[ctx->battlerIdTemp].type2 != TYPE_FIRE) { ctx->battleMons[ctx->battlerIdTemp].type1 = TYPE_FIRE; ctx->battleMons[ctx->battlerIdTemp].type2 = TYPE_FIRE; - ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_SUNNY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_SUNNY; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } else if ((ctx->fieldCondition & FIELD_CONDITION_RAIN_ALL) && ctx->battleMons[ctx->battlerIdTemp].type1 != TYPE_WATER && ctx->battleMons[ctx->battlerIdTemp].type2 != TYPE_WATER) { ctx->battleMons[ctx->battlerIdTemp].type1 = TYPE_WATER; ctx->battleMons[ctx->battlerIdTemp].type2 = TYPE_WATER; - ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_RAINY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_RAINY; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } else if ((ctx->fieldCondition & FIELD_CONDITION_HAIL_ALL) && ctx->battleMons[ctx->battlerIdTemp].type1 != TYPE_ICE && ctx->battleMons[ctx->battlerIdTemp].type2 != TYPE_ICE) { ctx->battleMons[ctx->battlerIdTemp].type1 = TYPE_ICE; ctx->battleMons[ctx->battlerIdTemp].type2 = TYPE_ICE; - ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_SNOWY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_SNOWY; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } } else if (ctx->battleMons[ctx->battlerIdTemp].type1 != TYPE_NORMAL && ctx->battleMons[ctx->battlerIdTemp].type2 != TYPE_NORMAL) { ctx->battleMons[ctx->battlerIdTemp].type1 = TYPE_NORMAL; ctx->battleMons[ctx->battlerIdTemp].type2 = TYPE_NORMAL; - ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_NORMAL; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + ctx->battleMons[ctx->battlerIdTemp].form = (u8)CASTFORM_NORMAL; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } } @@ -5329,29 +5329,29 @@ BOOL Battler_CheckWeatherFormChange(BattleSystem *bsys, BattleContext *ctx, int if (!CheckAbilityActive(bsys, ctx, CHECK_ABILITY_ALL_HP, 0, ABILITY_CLOUD_NINE) && !CheckAbilityActive(bsys, ctx, CHECK_ABILITY_ALL_HP, 0, ABILITY_AIR_LOCK)) { if (!(ctx->fieldCondition & FIELD_CONDITION_WEATHER_CASTFORM) && ctx->battleMons[ctx->battlerIdTemp].form == (u8)CHERRIM_SUNNY) { ctx->battleMons[ctx->battlerIdTemp].form = (u8)CHERRIM_CLOUDY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } else if ((ctx->fieldCondition & FIELD_CONDITION_SUN_ALL) && ctx->battleMons[ctx->battlerIdTemp].form == (u8)CHERRIM_CLOUDY) { ctx->battleMons[ctx->battlerIdTemp].form = (u8)CHERRIM_SUNNY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } else if ((ctx->fieldCondition & FIELD_CONDITION_RAIN_ALL) && ctx->battleMons[ctx->battlerIdTemp].form == (u8)CHERRIM_SUNNY) { ctx->battleMons[ctx->battlerIdTemp].form = (u8)CHERRIM_CLOUDY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } else if ((ctx->fieldCondition & FIELD_CONDITION_HAIL_ALL) && ctx->battleMons[ctx->battlerIdTemp].form == (u8)CHERRIM_SUNNY) { ctx->battleMons[ctx->battlerIdTemp].form = (u8)CHERRIM_CLOUDY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } } else if (ctx->battleMons[ctx->battlerIdTemp].form == (u8)CHERRIM_SUNNY) { ctx->battleMons[ctx->battlerIdTemp].form = (u8)CHERRIM_CLOUDY; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } } @@ -5359,8 +5359,8 @@ BOOL Battler_CheckWeatherFormChange(BattleSystem *bsys, BattleContext *ctx, int form = GetArceusTypeByHeldItemEffect(GetItemAttr(ctx->battleMons[ctx->battlerIdTemp].item, ITEMATTR_HOLD_EFFECT, HEAP_ID_BATTLE)); if (ctx->battleMons[ctx->battlerIdTemp].form != form) { ctx->battleMons[ctx->battlerIdTemp].form = form; - *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_FORM_CHANGE; + ret = TRUE; break; } } @@ -5384,22 +5384,22 @@ BOOL Battler_CheckWeatherFormChange(BattleSystem *bsys, BattleContext *ctx, int dat = (u8)GIRATINA_ALTERED; SetMonData(mon2, MON_DATA_FORM, &dat); Mon_UpdateGiratinaForm(mon2); - ctx->battleMons[ctx->battlerIdTemp].atk = GetMonData(mon2, MON_DATA_ATK, NULL); - ctx->battleMons[ctx->battlerIdTemp].def = GetMonData(mon2, MON_DATA_DEF, NULL); - ctx->battleMons[ctx->battlerIdTemp].speed = GetMonData(mon2, MON_DATA_SPEED, NULL); - ctx->battleMons[ctx->battlerIdTemp].spAtk = GetMonData(mon2, MON_DATA_SPATK, NULL); - ctx->battleMons[ctx->battlerIdTemp].spDef = GetMonData(mon2, MON_DATA_SPDEF, NULL); + ctx->battleMons[ctx->battlerIdTemp].atk = GetMonData(mon2, MON_DATA_ATK, NULL); + ctx->battleMons[ctx->battlerIdTemp].def = GetMonData(mon2, MON_DATA_DEF, NULL); + ctx->battleMons[ctx->battlerIdTemp].speed = GetMonData(mon2, MON_DATA_SPEED, NULL); + ctx->battleMons[ctx->battlerIdTemp].spAtk = GetMonData(mon2, MON_DATA_SPATK, NULL); + ctx->battleMons[ctx->battlerIdTemp].spDef = GetMonData(mon2, MON_DATA_SPDEF, NULL); ctx->battleMons[ctx->battlerIdTemp].ability = GetMonData(mon2, MON_DATA_ABILITY, NULL); - ctx->battleMons[ctx->battlerIdTemp].form = GIRATINA_ALTERED; + ctx->battleMons[ctx->battlerIdTemp].form = GIRATINA_ALTERED; ctx->battleStatus2 |= BATTLE_STATUS2_FORM_CHANGE; BattleController_EmitBattleMonToPartyMonCopy(bsys, ctx, ctx->battlerIdTemp); FreeToHeap(mon2); *script = BATTLE_SUBSCRIPT_FORM_CHANGE; - ret = TRUE; + ret = TRUE; break; } else { *script = BATTLE_SUBSCRIPT_GIRATINA_FORM_CHANGE; - ret = TRUE; + ret = TRUE; break; } } @@ -5444,8 +5444,8 @@ void ov12_02256F78(BattleSystem *bsys, BattleContext *ctx, int battlerId, u8 sel } } - dat = ctx->unk_312C[battlerId][flag]; - ctx->unk_312C[battlerId][flag] = ctx->unk_312C[battlerId][index]; + dat = ctx->unk_312C[battlerId][flag]; + ctx->unk_312C[battlerId][flag] = ctx->unk_312C[battlerId][index]; ctx->unk_312C[battlerId][index] = dat; } @@ -5535,7 +5535,7 @@ static const u16 sPunchingMoves[] = { int CalcMoveDamage(BattleSystem *bsys, BattleContext *ctx, u32 moveNo, u32 sideCondition, u32 fieldCondition, u16 power, u8 type, u8 battlerIdAttacker, u8 battlerIdTarget, u8 crit) { int i; - s32 dmg = 0; + s32 dmg = 0; s32 dmg2 = 0; u8 moveType; u8 moveCategory; @@ -5556,39 +5556,39 @@ int CalcMoveDamage(BattleSystem *bsys, BattleContext *ctx, u32 moveNo, u32 sideC GF_ASSERT(crit == 1 || crit > 1); - monAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_ATK, NULL); - monDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_DEF, NULL); - monSpAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_SPATK, NULL); - monSpDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_SPDEF, NULL); - statChangeAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_STAT_CHANGE_ATK, NULL) - 6; - statChangeDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_STAT_CHANGE_DEF, NULL) - 6; - statChangeSpAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_STAT_CHANGE_SPATK, NULL) - 6; - statChangeSpDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_STAT_CHANGE_SPDEF, NULL) - 6; - level = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_LEVEL, NULL); + monAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_ATK, NULL); + monDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_DEF, NULL); + monSpAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_SPATK, NULL); + monSpDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_SPDEF, NULL); + statChangeAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_STAT_CHANGE_ATK, NULL) - 6; + statChangeDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_STAT_CHANGE_DEF, NULL) - 6; + statChangeSpAtk = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_STAT_CHANGE_SPATK, NULL) - 6; + statChangeSpDef = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_STAT_CHANGE_SPDEF, NULL) - 6; + level = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_LEVEL, NULL); calcAttacker.species = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_SPECIES, NULL); - calcTarget.species = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_SPECIES, NULL); - calcAttacker.hp = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_HP, NULL); - calcTarget.hp = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_HP, NULL); - calcAttacker.maxHp = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_MAXHP, NULL); - calcTarget.maxHp = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_MAXHP, NULL); - calcAttacker.status = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_STATUS, NULL); - calcTarget.status = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_STATUS, NULL); + calcTarget.species = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_SPECIES, NULL); + calcAttacker.hp = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_HP, NULL); + calcTarget.hp = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_HP, NULL); + calcAttacker.maxHp = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_MAXHP, NULL); + calcTarget.maxHp = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_MAXHP, NULL); + calcAttacker.status = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_STATUS, NULL); + calcTarget.status = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_STATUS, NULL); calcAttacker.ability = GetBattlerAbility(ctx, battlerIdAttacker); - calcTarget.ability = GetBattlerAbility(ctx, battlerIdTarget); - calcAttacker.gender = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_GENDER, NULL); - calcTarget.gender = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_GENDER, NULL); - calcAttacker.type1 = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_TYPE_1, NULL); - calcTarget.type1 = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_TYPE_1, NULL); - calcAttacker.type2 = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_TYPE_2, NULL); - calcTarget.type2 = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_TYPE_2, NULL); - - item = GetBattlerHeldItem(ctx, battlerIdAttacker); + calcTarget.ability = GetBattlerAbility(ctx, battlerIdTarget); + calcAttacker.gender = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_GENDER, NULL); + calcTarget.gender = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_GENDER, NULL); + calcAttacker.type1 = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_TYPE_1, NULL); + calcTarget.type1 = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_TYPE_1, NULL); + calcAttacker.type2 = GetBattlerVar(ctx, battlerIdAttacker, BMON_DATA_TYPE_2, NULL); + calcTarget.type2 = GetBattlerVar(ctx, battlerIdTarget, BMON_DATA_TYPE_2, NULL); + + item = GetBattlerHeldItem(ctx, battlerIdAttacker); calcAttacker.item = GetItemVar(ctx, item, ITEM_VAR_HOLD_EFFECT); - calcAttacker.mod = GetItemVar(ctx, item, ITEM_VAR_MODIFIER); + calcAttacker.mod = GetItemVar(ctx, item, ITEM_VAR_MODIFIER); - item = GetBattlerHeldItem(ctx, battlerIdTarget); + item = GetBattlerHeldItem(ctx, battlerIdTarget); calcTarget.item = GetItemVar(ctx, item, ITEM_VAR_HOLD_EFFECT); - calcTarget.mod = GetItemVar(ctx, item, ITEM_VAR_MODIFIER); + calcTarget.mod = GetItemVar(ctx, item, ITEM_VAR_MODIFIER); battleType = BattleSystem_GetBattleType(bsys); @@ -5784,11 +5784,11 @@ int CalcMoveDamage(BattleSystem *bsys, BattleContext *ctx, u32 moveNo, u32 sideC } if (CheckBattlerAbilityIfNotIgnored(ctx, battlerIdAttacker, battlerIdTarget, ABILITY_UNAWARE) == TRUE) { - statChangeAtk = 0; + statChangeAtk = 0; statChangeSpAtk = 0; } if (calcAttacker.ability == ABILITY_UNAWARE) { - statChangeDef = 0; + statChangeDef = 0; statChangeSpDef = 0; } @@ -5969,11 +5969,11 @@ u32 TryCriticalHit(BattleSystem *bsys, BattleContext *ctx, int battlerIdAttacker int ret = 1; int ability; - item = GetItemVar(ctx, GetBattlerHeldItem(ctx, battlerIdAttacker), ITEM_VAR_HOLD_EFFECT); - species = ctx->battleMons[battlerIdAttacker].species; - status2 = ctx->battleMons[battlerIdAttacker].status2; + item = GetItemVar(ctx, GetBattlerHeldItem(ctx, battlerIdAttacker), ITEM_VAR_HOLD_EFFECT); + species = ctx->battleMons[battlerIdAttacker].species; + status2 = ctx->battleMons[battlerIdAttacker].status2; moveEffect = ctx->battleMons[battlerIdTarget].moveEffectFlags; - ability = ctx->battleMons[battlerIdAttacker].ability; + ability = ctx->battleMons[battlerIdAttacker].ability; critUp = (((status2 & STATUS2_FOCUS_ENERGY) != 0) * 2) + (item == HOLD_EFFECT_CRITRATE_UP) + critCnt + (ability == ABILITY_SUPER_LUCK) + 2 * ((item == HOLD_EFFECT_CHANSEY_CRITRATE_UP) && (species == SPECIES_CHANSEY)) + 2 * ((item == HOLD_EFFECT_FARFETCHD_CRITRATE_UP) && (species == SPECIES_FARFETCHD)); @@ -6101,7 +6101,7 @@ BOOL CheckLegalMeFirstMove(BattleContext *ctx, u16 moveNo) { s32 GetItemVar(BattleContext *ctx, u16 itemNo, u16 var) { ItemData *itemData; u32 index = GetItemIndexMapping(itemNo, 0); - itemData = GetItemDataPtrFromArray(ctx->trainerAIData.itemData, index); + itemData = GetItemDataPtrFromArray(ctx->trainerAIData.itemData, index); return GetItemAttr_PreloadedItemData(itemData, var); } @@ -6168,36 +6168,36 @@ BOOL CheckStatusEffectsSubstitute(BattleContext *ctx, int battlerId, int status) } BOOL CheckItemEffectOnUTurn(BattleSystem *bsys, BattleContext *ctx, int *script) { - BOOL ret = FALSE; + BOOL ret = FALSE; int itemAttacker = GetBattlerHeldItemEffect(ctx, ctx->battlerIdAttacker); - int modAttacker = GetHeldItemModifier(ctx, ctx->battlerIdAttacker, 0); - int itemTarget = GetBattlerHeldItemEffect(ctx, ctx->battlerIdTarget); - int modTarget = GetHeldItemModifier(ctx, ctx->battlerIdTarget, 0); - int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); + int modAttacker = GetHeldItemModifier(ctx, ctx->battlerIdAttacker, 0); + int itemTarget = GetBattlerHeldItemEffect(ctx, ctx->battlerIdTarget); + int modTarget = GetHeldItemModifier(ctx, ctx->battlerIdTarget, 0); + int side = BattleSystem_GetFieldSide(bsys, ctx->battlerIdAttacker); if (itemAttacker == HOLD_EFFECT_HP_RESTORE_ON_DMG && (ctx->battleStatus & BATTLE_STATUS_MOVE_SUCCESSFUL) && (ctx->selfTurnData[ctx->battlerIdAttacker].shellBellDamage) && (ctx->battlerIdAttacker != ctx->battlerIdTarget) && (ctx->battleMons[ctx->battlerIdAttacker].hp < ctx->battleMons[ctx->battlerIdAttacker].maxHp) && ctx->battleMons[ctx->battlerIdAttacker].hp) { - ctx->hpCalc = DamageDivide(ctx->selfTurnData[ctx->battlerIdAttacker].shellBellDamage * -1, modAttacker); + ctx->hpCalc = DamageDivide(ctx->selfTurnData[ctx->battlerIdAttacker].shellBellDamage * -1, modAttacker); ctx->battlerIdTemp = ctx->battlerIdAttacker; - *script = BATTLE_SUBSCRIPT_RESTORE_A_LITTLE_HP; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_RESTORE_A_LITTLE_HP; + ret = TRUE; } if (itemAttacker == HOLD_EFFECT_HP_DRAIN_ON_ATK && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_MAGIC_GUARD && (ctx->battleStatus & BATTLE_STATUS_MOVE_SUCCESSFUL) && ctx->trainerAIData.moveData[ctx->moveNoCur].category != CATEGORY_STATUS && ctx->battleMons[ctx->battlerIdAttacker].hp) { - ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 10); + ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, 10); ctx->battlerIdTemp = ctx->battlerIdAttacker; - *script = BATTLE_SUBSCRIPT_LOSE_HP_FROM_ITEM; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_LOSE_HP_FROM_ITEM; + ret = TRUE; } if (itemTarget == HOLD_EFFECT_RECOIL_PHYSICAL && ctx->battleMons[ctx->battlerIdAttacker].hp && GetBattlerAbility(ctx, ctx->battlerIdAttacker) != ABILITY_MAGIC_GUARD && ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage) { ctx->hpCalc = DamageDivide(ctx->battleMons[ctx->battlerIdAttacker].maxHp * -1, modTarget); - *script = BATTLE_SUBSCRIPT_HELD_ITEM_RECOIL_WHEN_HIT; - ret = TRUE; + *script = BATTLE_SUBSCRIPT_HELD_ITEM_RECOIL_WHEN_HIT; + ret = TRUE; } if (itemTarget == HOLD_EFFECT_DMG_USER_CONTACT_XFR && ctx->battleMons[ctx->battlerIdAttacker].hp && !ctx->battleMons[ctx->battlerIdAttacker].item && !(ctx->fieldSideConditionData[side].battlerBitKnockedOffItem & MaskOfFlagNo(ctx->selectedMonIndex[ctx->battlerIdAttacker])) && (ctx->selfTurnData[ctx->battlerIdTarget].physicalDamage || ctx->selfTurnData[ctx->battlerIdTarget].specialDamage) && (ctx->trainerAIData.moveData[ctx->moveNoCur].unkB & 1)) { *script = BATTLE_SUBSCRIPT_TRANSFER_STICKY_BARB; - ret = TRUE; + ret = TRUE; } return ret; @@ -6429,9 +6429,9 @@ static const int sMoveStatusChangeScripts[145] = { }; static int GetMoveStatusChangeScript(BattleContext *ctx, int statChangeType, u32 flag) { - ctx->statChangeType = statChangeType; + ctx->statChangeType = statChangeType; ctx->statChangeParam = flag & (0x7FFFFF); - ctx->statChangeFlag = flag & (0xFF800000); + ctx->statChangeFlag = flag & (0xFF800000); if (flag & (1 << 30)) { ctx->battlerIdStatChange = ctx->battlerIdAttacker; diff --git a/src/battle/overlay_12_0226BEC4.c b/src/battle/overlay_12_0226BEC4.c index 40dee3db3a..81f9ad9a6d 100644 --- a/src/battle/overlay_12_0226BEC4.c +++ b/src/battle/overlay_12_0226BEC4.c @@ -26,13 +26,13 @@ void ov12_0226BEF0(SysTask *task) { static void ov12_0226BF04(SysTask *task, void *_data) { UnkBattleStruct_0226BEC4 *data = _data; - u32 *unkPtr = ov12_0223A900(data->bsys); + u32 *unkPtr = ov12_0223A900(data->bsys); switch (data->state) { case 0: GF_ASSERT(unkPtr != NULL); { - NARC *bgHandleNarc = NARC_New(NARC_a_0_0_7, HEAP_ID_BATTLE); + NARC *bgHandleNarc = NARC_New(NARC_a_0_0_7, HEAP_ID_BATTLE); NARC *objHandleNarc = NARC_New(NARC_a_0_0_8, HEAP_ID_BATTLE); ov12_02266508(bgHandleNarc, objHandleNarc, unkPtr, 18, FALSE, NULL); NARC_Delete(bgHandleNarc); diff --git a/src/battle/trainer_ai.c b/src/battle/trainer_ai.c index d6c4d62869..74afa68122 100644 --- a/src/battle/trainer_ai.c +++ b/src/battle/trainer_ai.c @@ -52,7 +52,7 @@ u8 ov10_0221BEF4(BattleSystem *bsys, u8 battlerId) { if (!(ctx->trainerAIData.unk10 & 0x10)) { ctx->trainerAIData.battlerIdAttacker = battlerId; - ctx->trainerAIData.battlerIdTarget = Battler_GetRandomOpposingBattlerId(bsys, ctx, battlerId); + ctx->trainerAIData.battlerIdTarget = Battler_GetRandomOpposingBattlerId(bsys, ctx, battlerId); ov10_0221BE20(bsys, ctx, ctx->trainerAIData.battlerIdAttacker, 15); } diff --git a/src/battle_arcade_game_board.c b/src/battle_arcade_game_board.c index 108c7d7c37..11cfc72a1e 100644 --- a/src/battle_arcade_game_board.c +++ b/src/battle_arcade_game_board.c @@ -105,41 +105,41 @@ BOOL BattleArcadeGameBoard_InitOverlay(OVY_MANAGER *man, int *state) { work = OverlayManager_CreateAndGetData(man, sizeof(GAME_BOARD_WORK), HEAP_ID_GAME_BOARD); memset(work, 0, sizeof(GAME_BOARD_WORK)); - work->bgConfig = BgConfig_Alloc(HEAP_ID_GAME_BOARD); - work->man = man; - args = (GAME_BOARD_ARGS *)OverlayManager_GetArgs(man); - work->saveData = args->saveData; - work->arcadeSaveData = sub_02030E88(work->saveData); + work->bgConfig = BgConfig_Alloc(HEAP_ID_GAME_BOARD); + work->man = man; + args = (GAME_BOARD_ARGS *)OverlayManager_GetArgs(man); + work->saveData = args->saveData; + work->arcadeSaveData = sub_02030E88(work->saveData); work->arcadeScoreSaveData = sub_02030FA0(work->saveData); - work->type = args->type; - work->unk2A = args->unk1E; - work->winStreak = args->winStreak; - work->multiWinStreak = args->multiWinStreak; - work->unk12 = args->bpGain; - work->returnWork = &args->returnWork; - work->options = Save_PlayerData_GetOptionsAddr(work->saveData); - work->playerParty = args->playerParty; - work->opponentParty = args->opponentParty; - work->unkE = 0xff; - work->frontierSaveData = Save_Frontier_GetStatic(work->saveData); - work->weather = args->weather; - work->cursorSpeed = args->cursorSpeed; - work->unk20 = args->unk10; - work->unk24 = args->unk14; - work->unk18 = 900; - work->randomFlag = args->randomFlag; + work->type = args->type; + work->unk2A = args->unk1E; + work->winStreak = args->winStreak; + work->multiWinStreak = args->multiWinStreak; + work->unk12 = args->bpGain; + work->returnWork = &args->returnWork; + work->options = Save_PlayerData_GetOptionsAddr(work->saveData); + work->playerParty = args->playerParty; + work->opponentParty = args->opponentParty; + work->unkE = 0xff; + work->frontierSaveData = Save_Frontier_GetStatic(work->saveData); + work->weather = args->weather; + work->cursorSpeed = args->cursorSpeed; + work->unk20 = args->unk10; + work->unk24 = args->unk14; + work->unk18 = 900; + work->randomFlag = args->randomFlag; for (i = 0; i < 32; i++) { work->unk44[i] = 32; } work->boardHeight = 4; - work->boardWidth = 4; - work->boardArea = 16; + work->boardWidth = 4; + work->boardArea = 16; work->multiCursorPos = 0; - *work->unk24 = BattleArcade_Random(work); + *work->unk24 = BattleArcade_Random(work); work->cursorPosStart = LCRandom() % 16; BattleArcadeGameBoard_InitObjects(work); @@ -148,7 +148,7 @@ BOOL BattleArcadeGameBoard_InitOverlay(OVY_MANAGER *man, int *state) { sub_02096910(work); } - *state = 0; + *state = 0; s_0223FA20[0] = 0; s_0223FA20[1] = 0; @@ -313,7 +313,7 @@ static BOOL BattleArcadeGameBoard_MoveCursor(GAME_BOARD_WORK *work) { int i; switch (work->substate) { case 0: - work->wait = 0; + work->wait = 0; work->cursorPos = work->cursorPosStart; BattleArcadeGameBoard_SetCursorPos(work, work->cursorPos); work->substate = 1; @@ -321,7 +321,7 @@ static BOOL BattleArcadeGameBoard_MoveCursor(GAME_BOARD_WORK *work) { case 1: work->wait++; if (work->wait >= 10) { - work->wait = 0; + work->wait = 0; work->substate = 2; } break; @@ -334,7 +334,7 @@ static BOOL BattleArcadeGameBoard_MoveCursor(GAME_BOARD_WORK *work) { } ov84_0223EB08(work, GF_BG_LYR_MAIN_3); PlaySE(SEQ_SE_DP_WIN_OPEN2); - work->wait = 24; + work->wait = 24; work->substate = 3; break; case 3: @@ -348,7 +348,7 @@ static BOOL BattleArcadeGameBoard_MoveCursor(GAME_BOARD_WORK *work) { } } PlaySE(SEQ_SE_DP_WIN_OPEN2); - work->wait = 24; + work->wait = 24; work->substate = 4; break; case 4: @@ -362,7 +362,7 @@ static BOOL BattleArcadeGameBoard_MoveCursor(GAME_BOARD_WORK *work) { } } PlaySE(SEQ_SE_DP_WIN_OPEN2); - work->wait = 24; + work->wait = 24; work->substate = 5; break; case 5: @@ -399,7 +399,7 @@ static BOOL BattleArcadeGameBoard_MoveCursor(GAME_BOARD_WORK *work) { break; case 7: BattleArcadeGameBoard_StopCursor(work, work->cursorPos); - work->wait = 30; + work->wait = 30; work->substate = 8; break; case 8: @@ -563,9 +563,9 @@ static void BattleArcadeGameBoard_InitObjects(GAME_BOARD_WORK *work) { ov84_0223E934(work); work->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0425_bin, HEAP_ID_GAME_BOARD); - work->msgFmt = MessageFormat_New(HEAP_ID_GAME_BOARD); - work->unk70 = String_New(600, HEAP_ID_GAME_BOARD); - work->unk74 = String_New(600, HEAP_ID_GAME_BOARD); + work->msgFmt = MessageFormat_New(HEAP_ID_GAME_BOARD); + work->unk70 = String_New(600, HEAP_ID_GAME_BOARD); + work->unk74 = String_New(600, HEAP_ID_GAME_BOARD); for (i = 0; i < 2; i++) { work->unk78[i] = String_New(32, HEAP_ID_GAME_BOARD); @@ -585,10 +585,10 @@ static void BattleArcadeGameBoard_InitObjects(GAME_BOARD_WORK *work) { max = BattleArcade_GetMonCount(work->type, 1); if (BattleArcade_MultiplayerCheck(work->type) == FALSE) { - yOffset = 46; + yOffset = 46; yOffset2 = 50; } else { - yOffset = 22; + yOffset = 22; yOffset2 = 26; } @@ -736,7 +736,7 @@ static void ov84_0223EB78(GAME_BOARD_WORK *work, GFBgLayer layer) { static void BattleArcadeGameBoard_SetState(GAME_BOARD_WORK *work, int *state, int a2) { work->substate = 0; - *state = a2; + *state = a2; } extern u8 ov84_0223F913[8][2]; @@ -830,7 +830,7 @@ static void ov84_0223ED00(GAME_BOARD_WORK *work, u16 type) { void ov84_0223ED34(int a0, int size, void *data, void *_work) { int i, offset; GAME_BOARD_WORK *work = _work; - const u16 *recv = data; + const u16 *recv = data; work->unkF++; @@ -894,7 +894,7 @@ void ov84_0223EDA8(int a0, int size, void *data, void *_work) { work->unkE = work->multiSelectPos + work->boardArea; } } else { - work->unkE = recv[2]; + work->unkE = recv[2]; *work->unk24 = recv[3]; } } @@ -906,7 +906,7 @@ static void ov84_0223EDF8(GAME_BOARD_WORK *work, u16 type) { void ov84_0223EE08(int a0, int size, void *data, void *_work) { GAME_BOARD_WORK *work = _work; - const u16 *recv = data; + const u16 *recv = data; if (sub_0203769C() == a0) { return; @@ -918,8 +918,8 @@ void ov84_0223EE08(int a0, int size, void *data, void *_work) { static void BattleArcadeGameBoard_StopCursor(GAME_BOARD_WORK *work, u8 type) { int i; - u8 offset = work->boardArea; - u8 pos = ov84_0223EC88(offset, type); + u8 offset = work->boardArea; + u8 pos = ov84_0223EC88(offset, type); u8 panelId = work->unk34[pos]; *work->unk20 = panelId; @@ -1086,9 +1086,9 @@ static void ov84_0223F094(GAME_BOARD_WORK *work) { u8 rand, color; for (i = 0; i < 16; i++) { - color = ov84_0223F178(work, work->unk11); + color = ov84_0223F178(work, work->unk11); offset = 0; - range = work->unk30[color]; + range = work->unk30[color]; if (color == 0) { offset = 0; @@ -1113,7 +1113,7 @@ static void ov84_0223F094(GAME_BOARD_WORK *work) { if (cnt >= 50) { GF_ASSERT(FALSE); work->unk34[i] = 0; - cnt = 0; + cnt = 0; break; } @@ -1145,7 +1145,7 @@ static u8 ov84_0223F178(GAME_BOARD_WORK *work, u8 a1) { u8 cnt, i; u16 rand; - cnt = 0; + cnt = 0; rand = LCRandom() % 100; for (i = 0; i < 4; i++) { @@ -1167,7 +1167,7 @@ static void ov84_0223F1BC(GAME_BOARD_WORK *work) { u8 partyCount, opponentPartyCount, i; Pokemon *mon; - partyCount = BattleArcade_GetMonCount(work->type, 1); + partyCount = BattleArcade_GetMonCount(work->type, 1); opponentPartyCount = BattleArcade_GetOpponentMonCount(work->type, 1); for (i = 0; i < partyCount; i++) { @@ -1251,16 +1251,16 @@ static Sprite *ov84_0223F374(GAME_BOARD_SUB_3E8 *work, u32 chara, u32 pal, u32 c { SpriteTemplate template; template.spriteList = work->spriteList; - template.header = &resourceHeader; + template.header = &resourceHeader; template.position.x = 0; template.position.y = 0; template.position.z = 0; - template.scale.x = 1 * FX32_ONE; - template.scale.y = 1 * FX32_ONE; - template.scale.z = 1 * FX32_ONE; - template.rotation = 0; - template.priority = prio; - template.heapId = HEAP_ID_GAME_BOARD; + template.scale.x = 1 * FX32_ONE; + template.scale.y = 1 * FX32_ONE; + template.scale.z = 1 * FX32_ONE; + template.rotation = 0; + template.priority = prio; + template.heapId = HEAP_ID_GAME_BOARD; if (display == 0) { template.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; @@ -1340,14 +1340,14 @@ static void ov84_0223F5E4(GAME_BOARD_SUB_3E8 *work, Party *playerParty, Party *o for (i = 0; i < 4; i++) { if (i == 3) { if (type == FALSE) { - playerMon = Party_GetMonByIndex(playerParty, 0); + playerMon = Party_GetMonByIndex(playerParty, 0); opponentMon = Party_GetMonByIndex(opponentParty, 0); } else { - playerMon = Party_GetMonByIndex(playerParty, i); + playerMon = Party_GetMonByIndex(playerParty, i); opponentMon = Party_GetMonByIndex(opponentParty, i); } } else { - playerMon = Party_GetMonByIndex(playerParty, i); + playerMon = Party_GetMonByIndex(playerParty, i); opponentMon = Party_GetMonByIndex(opponentParty, i); } @@ -1379,8 +1379,8 @@ static BATTLE_ARCADE_OBJECT *BattleArcadeObject_Create(GAME_BOARD_SUB_3E8 *work, obj->sprite = ov84_0223F374(work, chara, pal, cell, anim, priority, bgPrio, display); - obj->x0 = x; - obj->y0 = y; + obj->x0 = x; + obj->y0 = y; obj->display = display; vec.x = x * FX32_ONE; @@ -1407,7 +1407,7 @@ static void BattleArcadeObj_SetVisible(BATTLE_ARCADE_OBJECT *obj, int flag) { static void BattleArcadeObj_SetPos(BATTLE_ARCADE_OBJECT *obj, u16 x, u16 y) { VecFx32 vec; - vec = *Sprite_GetMatrixPtr(obj->sprite); + vec = *Sprite_GetMatrixPtr(obj->sprite); vec.x = x * FX32_ONE; vec.y = y * FX32_ONE; diff --git a/src/battle_regulation.c b/src/battle_regulation.c index dc84262832..d822469d7e 100644 --- a/src/battle_regulation.c +++ b/src/battle_regulation.c @@ -100,7 +100,7 @@ BattleRegulationComplianceMessage LinkBattleRuleset_GetPartySelectionComplianceM } for (i = 0; i < PARTY_SIZE; ++i) { - species[i] = SPECIES_NONE; + species[i] = SPECIES_NONE; heldItems[i] = ITEM_NONE; if (selectedOrder[i] != 0) { ++numMons; @@ -117,7 +117,7 @@ BattleRegulationComplianceMessage LinkBattleRuleset_GetPartySelectionComplianceM if (!LinkBattleRuleset_CheckDexBasedRules(ruleset, mon, pokedex)) { return BTL_REG_COMPLIANCE_FAIL_SPECIAL_CONSTRAINTS; } - species[i] = GetMonData(mon, MON_DATA_SPECIES, NULL); + species[i] = GetMonData(mon, MON_DATA_SPECIES, NULL); heldItems[i] = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); totalLevel += GetMonData(mon, MON_DATA_LEVEL, NULL); } @@ -211,13 +211,13 @@ int sub_02074CD0(LinkBattleRuleset *ruleset, Party *party, PokedexData *pokedex) int numLegalMons; int numBannedMons; - partyCount = Party_GetCount(party); + partyCount = Party_GetCount(party); numLegalMons = partyCount; MI_CpuClear8(sp30, sizeof(sp30)); for (i = 0; i < partyCount; ++i) { - mon = Party_GetMonByIndex(party, i); + mon = Party_GetMonByIndex(party, i); species[i] = GetMonData(mon, MON_DATA_SPECIES, NULL); - levels[i] = GetMonData(mon, MON_DATA_LEVEL, NULL); + levels[i] = GetMonData(mon, MON_DATA_LEVEL, NULL); if (!LinkBattleRuleset_CheckDexBasedRules(ruleset, mon, pokedex)) { species[i] = SPECIES_NONE; --numLegalMons; diff --git a/src/berry_pots_app.c b/src/berry_pots_app.c index 2900067dc7..854427b1e9 100644 --- a/src/berry_pots_app.c +++ b/src/berry_pots_app.c @@ -226,9 +226,9 @@ static const BgTemplate ov17_02203E4C = { static const OamManagerParam ov17_02203E68 = { 0, 128, 0, 32, 0, 128, 0, 32 }; static const u8 sMenu_Fertilize_Plant_Exit[] = { msg_0248_00004, msg_0248_00003, msg_0248_00001 }; -static const u8 sMenu_Plant_Exit[] = { msg_0248_00003, msg_0248_00001 }; -static const u8 sMenu_Water_Exit[] = { msg_0248_00002, msg_0248_00001 }; -static const u8 sMenu_Take_Exit[] = { msg_0248_00005, msg_0248_00001 }; +static const u8 sMenu_Plant_Exit[] = { msg_0248_00003, msg_0248_00001 }; +static const u8 sMenu_Water_Exit[] = { msg_0248_00002, msg_0248_00001 }; +static const u8 sMenu_Take_Exit[] = { msg_0248_00005, msg_0248_00001 }; static const struct UnkStruct_ov17_02203E88 ov17_02203E88[4] = { { NELEMS(sMenu_Fertilize_Plant_Exit), sMenu_Fertilize_Plant_Exit }, @@ -237,7 +237,7 @@ static const struct UnkStruct_ov17_02203E88 ov17_02203E88[4] = { { NELEMS(sMenu_Take_Exit), sMenu_Take_Exit }, }; static const UnkStruct_0200D2B4 ov17_02203EA8 = { 0, 27, 96, 0, 5, 13, 0, NNS_G2D_VRAM_TYPE_2DMAIN, 1, 0, 0, 0 }; -static const GraphicsBanks ov17_02203ED0 = { +static const GraphicsBanks ov17_02203ED0 = { GX_VRAM_BG_128_A, GX_VRAM_BGEXTPLTT_NONE, GX_VRAM_SUB_BG_128_C, @@ -284,7 +284,7 @@ BOOL BerryPotsApp_Initialize(OVY_MANAGER *manager, int *state) { data = OverlayManager_CreateAndGetData(manager, sizeof(BerryPotsAppData), HEAP_ID_BERRY_POTS_APP); MI_CpuFill8(data, 0, sizeof(BerryPotsAppData)); data->heapId = HEAP_ID_BERRY_POTS_APP; - data->args = OverlayManager_GetArgs(manager); + data->args = OverlayManager_GetArgs(manager); BerryPotsApp_InitData(data); (*state)++; @@ -356,16 +356,16 @@ BOOL BerryPotsApp_Exit(OVY_MANAGER *manager, int *state) { } static void BerryPotsApp_InitData(BerryPotsAppData *data) { - data->fieldMenuState = MenuInputStateMgr_GetState(data->args->unk4->menuInputPtr); - Options *options = Save_PlayerData_GetOptionsAddr(data->args->unk4->savedata); - data->textFrameDelay = Options_GetTextFrameDelay(options); - data->frame = Options_GetFrame(options); - data->bag = Save_Bag_Get(data->args->unk4->savedata); - data->stats = Save_GameStats_Get(data->args->unk4->savedata); + data->fieldMenuState = MenuInputStateMgr_GetState(data->args->unk4->menuInputPtr); + Options *options = Save_PlayerData_GetOptionsAddr(data->args->unk4->savedata); + data->textFrameDelay = Options_GetTextFrameDelay(options); + data->frame = Options_GetFrame(options); + data->bag = Save_Bag_Get(data->args->unk4->savedata); + data->stats = Save_GameStats_Get(data->args->unk4->savedata); data->berryGrowthProperties = ov16_022014A0(data->heapId); - data->berryPots = Save_BerryPots_Get(data->args->unk4->savedata); - data->berryDatetime = Save_BerryPotRTC_Get(data->args->unk4->savedata); - data->unk7C = (data->args->unk14 != 0) ? data->args->unk15 : 0; + data->berryPots = Save_BerryPots_Get(data->args->unk4->savedata); + data->berryDatetime = Save_BerryPotRTC_Get(data->args->unk4->savedata); + data->unk7C = (data->args->unk14 != 0) ? data->args->unk15 : 0; ov17_022023B0(data); data->totalBerryQuantity = GetTotalBerryQuantity(data->bag, data->heapId); data->totalMulchQuantity = GetTotalMulchQuantity(data->bag, data->heapId); @@ -468,7 +468,7 @@ static u32 ov17_02201F18(BerryPotsAppData *data) { return 2; } - data->args->unk15 = data->unk7C; + data->args->unk15 = data->unk7C; data->args->itemId = 0xFFFF; if (unk == 0) { @@ -518,9 +518,9 @@ static u32 ov17_02201FE8(BerryPotsAppData *data) { ov17_02202944(data, BERRY_POTS_APP_022036FC_ACTION_1, 4, 0); return 8; } else { - data->args->unk15 = data->unk7C; + data->args->unk15 = data->unk7C; data->args->itemId = 0xFFFF; - data->args->unk14 = 2; + data->args->unk14 = 2; return 1; } } @@ -727,7 +727,7 @@ static void ov17_022023B0(BerryPotsAppData *data) { } static u32 ov17_02202440(BerryPotsAppData *data) { - u8 unk14 = data->args->unk14; + u8 unk14 = data->args->unk14; data->args->unk14 = 0; if (unk14 == 0) { @@ -860,8 +860,8 @@ static BOOL ov17_022025B8(BerryPotsAppData *data) { case 3: if (data->runningTasks == 0) { data->waitFrames = 0; - data->unk80 = data->unk81; - data->unk81 = 0xFF; + data->unk80 = data->unk81; + data->unk81 = 0xFF; Sprite_SetAnimActiveFlag(data->sprites[1], TRUE); data->state72 = 2; } @@ -872,7 +872,7 @@ static BOOL ov17_022025B8(BerryPotsAppData *data) { Sprite_SetVisibleFlag(data->sprites[2], FALSE); Sprite_SetAnimActiveFlag(data->sprites[1], FALSE); data->waitFrames = 0; - data->state72 = 0; + data->state72 = 0; return TRUE; } break; @@ -885,7 +885,7 @@ static BOOL ov17_0220279C(BerryPotsAppData *data) { switch (data->state72) { case 0: ov17_02203460(data, data->unk7C); - data->unk7E = data->unk20[data->unk7C].quantityOrYieldMaybe; + data->unk7E = data->unk20[data->unk7C].quantityOrYieldMaybe; data->waitFrames = 0; data->state72++; break; @@ -906,7 +906,7 @@ static BOOL ov17_0220279C(BerryPotsAppData *data) { } data->waitFrames = 0; - data->state72 = 0; + data->state72 = 0; return TRUE; } @@ -965,10 +965,10 @@ static void ov17_022029C8(BerryPotsAppData *data, u32 a1) { TouchscreenListMenuHeader header; MI_CpuFill8(&header, 0, sizeof(TouchscreenListMenuHeader)); - header.template = sMenuTemplate; + header.template = sMenuTemplate; header.listMenuItems = data->listMenuItems[a1]; - header.bgConfig = data->bgConfig; - header.numWindows = ov17_02203E88[a1].numButtons; + header.bgConfig = data->bgConfig; + header.numWindows = ov17_02203E88[a1].numButtons; data->menu = TouchscreenListMenu_Create(data->menuSpawner, &header, (u8)data->fieldMenuState, 0xf, 16 - (header.numWindows * 3), 0xe, 0); } @@ -1008,7 +1008,7 @@ void ov17_02202A84(BerryPotsAppData *data, int index) { break; default: unkStruct.resourceSet = index + 1; - unkStruct.animSeqNo = sub->growthStage - 3; + unkStruct.animSeqNo = sub->growthStage - 3; break; } @@ -1129,10 +1129,10 @@ void BerryPotsApp_FreeNarc(BerryPotsAppData *data) { static void BerryPotsApp_SetupText(BerryPotsAppData *data) { FontID_Alloc(4, data->heapId); - data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0248_bin, data->heapId); - data->msgFmt = MessageFormat_New_Custom(16, 16, data->heapId); + data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0248_bin, data->heapId); + data->msgFmt = MessageFormat_New_Custom(16, 16, data->heapId); data->currentStatusString = String_New(128, data->heapId); - data->cancelString = NewString_ReadMsgData(data->msgData, msg_0248_00000); + data->cancelString = NewString_ReadMsgData(data->msgData, msg_0248_00000); for (int i = 0; i < (int)NELEMS(data->statusStrings); i++) { data->statusStrings[i] = NewString_ReadMsgData(data->msgData, msg_0248_00006 + i); @@ -1173,7 +1173,7 @@ static void BerryPotsApp_FreeWindows(BerryPotsAppData *data) { static void BerryPotsApp_SetupListMenuItems(BerryPotsAppData *data) { for (int i = 0; i < (int)NELEMS(data->listMenuItems); i++) { const struct UnkStruct_ov17_02203E88 *unk = &ov17_02203E88[i]; - data->listMenuItems[i] = ListMenuItems_New(unk->numButtons, data->heapId); + data->listMenuItems[i] = ListMenuItems_New(unk->numButtons, data->heapId); for (int j = 0; j < (int)unk->numButtons; j++) { ListMenuItems_AppendFromMsgData(data->listMenuItems[i], data->msgData, unk->msgId[j], j); } @@ -1203,7 +1203,7 @@ static void BerryPotsApp_SetupSpriteRendererAndGfxHandler(BerryPotsAppData *data data->itemIconNarc = NARC_New(NARC_itemtool_itemdata_item_icon, data->heapId); SpriteResourceCountsListUnion counts = ov17_02203DAC; - data->spriteGfxHandler2 = SpriteRenderer_CreateGfxHandler(data->spriteRenderer); + data->spriteGfxHandler2 = SpriteRenderer_CreateGfxHandler(data->spriteRenderer); SpriteRenderer_Init2DGfxResManagersFromCountsArray(data->spriteRenderer, data->spriteGfxHandler2, &counts); sub_0200E2B4(data->spriteGfxHandler2, sub_0200E2B0(data->spriteGfxHandler1)); @@ -1256,14 +1256,14 @@ static void BerryPotsApp_SetupSprites(BerryPotsAppData *data) { Sprite_SetAnimActiveFlag(data->sprites[2], FALSE); for (int i = 0; i < (int)NELEMS(data->unk20); i++) { - u8 spriteIndex = i + 3; + u8 spriteIndex = i + 3; data->sprites[spriteIndex] = SpriteRenderer_CreateSprite(data->spriteRenderer, data->spriteGfxHandler1, &ov17_02203EF8[3]); Sprite_SetPositionXY(data->sprites[spriteIndex], i * 27 + 27, 99); Sprite_SetAnimCtrlCurrentFrame(data->sprites[spriteIndex], data->unk20[i].soilState); Sprite_SetVisibleFlag(data->sprites[spriteIndex], TRUE); Sprite_SetAnimActiveFlag(data->sprites[spriteIndex], FALSE); - spriteIndex = i + 7; + spriteIndex = i + 7; data->sprites[spriteIndex] = SpriteRenderer_CreateSprite(data->spriteRenderer, data->spriteGfxHandler1, &ov17_02203EF8[4]); Sprite_SetPositionXY(data->sprites[spriteIndex], i * 27 + 27, 88); Sprite_SetVisibleFlag(data->sprites[spriteIndex], FALSE); @@ -1300,14 +1300,14 @@ UnkImageStruct *ov17_022034C8(BerryPotsAppData *data, s16 x, s16 y, u8 unused) { UnkTemplate_0200D748 template; MI_CpuFill8(&template, 0, sizeof(UnkTemplate_0200D748)); - template.x = x; - template.y = y; - template.z = 0; - template.animation = 0; - template.bgPriority = 2; - template.pal = 0; - template.vramTransfer = 0; - template.vram = NNS_G2D_VRAM_TYPE_2DMAIN; + template.x = x; + template.y = y; + template.z = 0; + template.animation = 0; + template.bgPriority = 2; + template.pal = 0; + template.vramTransfer = 0; + template.vram = NNS_G2D_VRAM_TYPE_2DMAIN; template.resIdList[GF_GFX_RES_TYPE_CHAR] = 4000; template.resIdList[GF_GFX_RES_TYPE_PLTT] = 4000; template.resIdList[GF_GFX_RES_TYPE_CELL] = 4000; diff --git a/src/berry_pots_app_tasks.c b/src/berry_pots_app_tasks.c index baa97e3e8f..0ef38aa664 100644 --- a/src/berry_pots_app_tasks.c +++ b/src/berry_pots_app_tasks.c @@ -31,12 +31,12 @@ void ov17_0220351C(BerryPotsAppData *data) { args->data = data; args->unk6 = data->unk80; args->unk7 = data->unk81; - s8 diff = data->unk81 - data->unk80; + s8 diff = data->unk81 - data->unk80; if (diff > 0) { args->sign = 1; } else { args->sign = -1; - diff = -diff; + diff = -diff; } args->unk8 = (diff *= 27) / 4; @@ -83,7 +83,7 @@ void ov17_02203638(BerryPotsAppData *data) { SysTaskArgs_ov17_02203674 *args = AllocFromHeap(data->heapId, sizeof(SysTaskArgs_ov17_02203674)); MI_CpuFill8(args, 0, sizeof(SysTaskArgs_ov17_02203674)); - args->data = data; + args->data = data; args->potIndex = data->unk7C; SysTask_CreateOnMainQueue((SysTaskFunc)ov17_02203674, args, 0); @@ -178,15 +178,15 @@ void ov17_0220387C(BerryPotsAppData *data) { data->unk20[i].unkC = data->unk20[i].growthStage; data->unk20[i].unkD = data->unk20[i].soilState; - data->unk20[i].berryId = BerryPots_GetPotBerryId(data->berryPots, i); - data->unk20[i].growthStage = BerryPots_GetPotGrowthStage(data->berryPots, i); - data->unk20[i].unk2 = ov16_022015EC(data->berryPots, i); - data->unk20[i].moisture = BerryPots_GetPotMoisture(data->berryPots, i); - data->unk20[i].mulch = BerryPots_GetPotMulch(data->berryPots, i); + data->unk20[i].berryId = BerryPots_GetPotBerryId(data->berryPots, i); + data->unk20[i].growthStage = BerryPots_GetPotGrowthStage(data->berryPots, i); + data->unk20[i].unk2 = ov16_022015EC(data->berryPots, i); + data->unk20[i].moisture = BerryPots_GetPotMoisture(data->berryPots, i); + data->unk20[i].mulch = BerryPots_GetPotMulch(data->berryPots, i); data->unk20[i].quantityOrYieldMaybe = ov16_02201668(data->berryPots, i); - data->unk20[i].unk6 = ov16_022015F8(data->berryPots, i); - data->unk20[i].unk8 = ov16_02201604(data->berryPots, i); - data->unk20[i].soilState = BerryPots_GetSoilState(data->berryPots, i); + data->unk20[i].unk6 = ov16_022015F8(data->berryPots, i); + data->unk20[i].unk8 = ov16_02201604(data->berryPots, i); + data->unk20[i].soilState = BerryPots_GetSoilState(data->berryPots, i); } } @@ -216,7 +216,7 @@ static void ov17_02203928(BerryPotsAppData *data) { SysTaskArgs_ov17_022039A0 *args = AllocFromHeap(data->heapId, sizeof(SysTaskArgs_ov17_022039A0)); MI_CpuFill8(args, 0, sizeof(SysTaskArgs_ov17_022039A0)); - args->data = data; + args->data = data; args->potIndex = i; SysTask_CreateOnMainQueue((SysTaskFunc)ov17_022039A0, args, 0); data->runningTasks++; @@ -254,7 +254,7 @@ static void ov17_022039A0(SysTask *task, SysTaskArgs_ov17_022039A0 *args) { u32 ov17_02203A34(BerryPotsAppData *data) { BOOL flag = FALSE; - u32 r0 = ov17_02203B68(data, &flag); + u32 r0 = ov17_02203B68(data, &flag); if (!flag) { r0 = ov17_02203AD4(data); } @@ -263,7 +263,7 @@ u32 ov17_02203A34(BerryPotsAppData *data) { BOOL ov17_02203A54(BerryPotsAppData *data) { BOOL flag = FALSE; - BOOL ret = ov17_02203C20(data, &flag); + BOOL ret = ov17_02203C20(data, &flag); if (!flag) { ret = ov17_02203B88(data); } @@ -316,10 +316,10 @@ static u32 ov17_02203AD4(BerryPotsAppData *data) { if (newKeys & PAD_KEY_LEFT) { data->unk7C = (data->unk7C + (MAX_BERRY_POT - 1)) % MAX_BERRY_POT; - flag = TRUE; + flag = TRUE; } else if (newKeys & PAD_KEY_RIGHT) { data->unk7C = (data->unk7C + 1) % MAX_BERRY_POT; - flag = TRUE; + flag = TRUE; } if (flag) { @@ -335,7 +335,7 @@ static u32 ov17_02203B68(BerryPotsAppData *data, BOOL *a1) { return 2; } - *a1 = TRUE; + *a1 = TRUE; data->fieldMenuState = MENU_INPUT_STATE_TOUCH; return ov17_02203A74(data, unk); } @@ -353,10 +353,10 @@ static BOOL ov17_02203B88(BerryPotsAppData *data) { if (gSystem.newKeys & PAD_KEY_LEFT) { data->unk7C = (data->unk7C + (MAX_BERRY_POT - 1)) % MAX_BERRY_POT; - unk = TRUE; + unk = TRUE; } else if (gSystem.newKeys & PAD_KEY_RIGHT) { data->unk7C = (data->unk7C + 1) % MAX_BERRY_POT; - unk = TRUE; + unk = TRUE; } if (unk) { @@ -379,10 +379,10 @@ static BOOL ov17_02203C20(BerryPotsAppData *data, BOOL *a1) { return FALSE; } - *a1 = TRUE; + *a1 = TRUE; data->fieldMenuState = MENU_INPUT_STATE_TOUCH; - data->unk7C = unk; - data->unk81 = data->unk7C; + data->unk7C = unk; + data->unk81 = data->unk7C; Sprite_SetAnimActiveFlag(data->sprites[1], FALSE); ov17_022028B8(data); @@ -393,13 +393,13 @@ static int ov17_02203C78(BerryPotsAppData *data) { TouchscreenHitbox touchHitbox; for (int i = 0, xOffsetMaybe = 16; i < MAX_BERRY_POT; xOffsetMaybe += 28, i++) { - touchHitbox.rect.left = xOffsetMaybe; + touchHitbox.rect.left = xOffsetMaybe; touchHitbox.rect.right = touchHitbox.rect.left + 22; if (data->unk20[i].growthStage < BERRY_POT_GROWTH_STAGE_GROWING) { - touchHitbox.rect.top = 88; + touchHitbox.rect.top = 88; touchHitbox.rect.bottom = touchHitbox.rect.top + 24; } else { - touchHitbox.rect.top = 72; + touchHitbox.rect.top = 72; touchHitbox.rect.bottom = touchHitbox.rect.top + 32; } diff --git a/src/bg_window.c b/src/bg_window.c index 4ed517b065..b63f2358db 100644 --- a/src/bg_window.c +++ b/src/bg_window.c @@ -45,11 +45,11 @@ static void Bg_SetAffineScale(Background *bg, enum BgPosAdjustOp op, int value); static void ApplyFlipFlagsToTile(BgConfig *bgConfig, u8 flags, u8 *tile); static const u8 sTilemapWidthByBufferSize[] = { - [GF_BG_SCR_SIZE_128x128] = 0x10, - [GF_BG_SCR_SIZE_256x256] = 0x20, - [GF_BG_SCR_SIZE_256x512] = 0x20, - [GF_BG_SCR_SIZE_512x256] = 0x20, - [GF_BG_SCR_SIZE_512x512] = 0x20, + [GF_BG_SCR_SIZE_128x128] = 0x10, + [GF_BG_SCR_SIZE_256x256] = 0x20, + [GF_BG_SCR_SIZE_256x512] = 0x20, + [GF_BG_SCR_SIZE_512x256] = 0x20, + [GF_BG_SCR_SIZE_512x512] = 0x20, [GF_BG_SCR_SIZE_1024x1024] = 0x20, }; @@ -94,8 +94,8 @@ static void (*const sClearWindowTilemapFuncs[GF_BG_TYPE_MAX])(Window *window) = BgConfig *BgConfig_Alloc(HeapID heapId) { BgConfig *ret = AllocFromHeap(heapId, sizeof(BgConfig)); memset(ret, 0, sizeof(BgConfig)); - ret->heapId = heapId; - ret->scrollScheduled = 0; // redundant to above memset + ret->heapId = heapId; + ret->scrollScheduled = 0; // redundant to above memset ret->bufferTransferScheduled = 0; // redundant to above memset return ret; } @@ -230,10 +230,10 @@ void InitBgFromTemplateEx(BgConfig *bgConfig, u8 bgId, const BgTemplate *templat } bgConfig->bgs[bgId].rotation = 0; - bgConfig->bgs[bgId].xScale = FX32_ONE; - bgConfig->bgs[bgId].yScale = FX32_ONE; - bgConfig->bgs[bgId].centerX = 0; - bgConfig->bgs[bgId].centerY = 0; + bgConfig->bgs[bgId].xScale = FX32_ONE; + bgConfig->bgs[bgId].yScale = FX32_ONE; + bgConfig->bgs[bgId].centerX = 0; + bgConfig->bgs[bgId].centerY = 0; if (template->bufferSize != 0) { bgConfig->bgs[bgId].tilemapBuffer = AllocFromHeap(bgConfig->heapId, template->bufferSize); @@ -241,15 +241,15 @@ void InitBgFromTemplateEx(BgConfig *bgConfig, u8 bgId, const BgTemplate *templat MI_CpuClear16(bgConfig->bgs[bgId].tilemapBuffer, template->bufferSize); bgConfig->bgs[bgId].bufferSize = template->bufferSize; - bgConfig->bgs[bgId].baseTile = template->baseTile; + bgConfig->bgs[bgId].baseTile = template->baseTile; } else { bgConfig->bgs[bgId].tilemapBuffer = NULL; - bgConfig->bgs[bgId].bufferSize = 0; - bgConfig->bgs[bgId].baseTile = 0; + bgConfig->bgs[bgId].bufferSize = 0; + bgConfig->bgs[bgId].baseTile = 0; } - bgConfig->bgs[bgId].size = template->size; - bgConfig->bgs[bgId].mode = bgType; + bgConfig->bgs[bgId].size = template->size; + bgConfig->bgs[bgId].mode = bgType; bgConfig->bgs[bgId].colorMode = template->colorMode; if (bgType == GF_BG_TYPE_TEXT && template->colorMode == GX_BG_COLORMODE_16) { @@ -277,7 +277,7 @@ void SetBgControlParam(BgConfig *config, u8 bgId, enum GFBgCntSet attr, u8 value } } else if (attr == GF_BG_CNT_SET_SCREEN_SIZE) { config->bgs[bgId].mode = value; - screenSize = TranslateGFBgModePairToGXScreenSize((enum GFBgScreenSize)config->bgs[bgId].size, (enum GFBgType)value); + screenSize = TranslateGFBgModePairToGXScreenSize((enum GFBgScreenSize)config->bgs[bgId].size, (enum GFBgType)value); if (value == GF_BG_TYPE_TEXT && config->bgs[bgId].colorMode == GX_BG_COLORMODE_16) { config->bgs[bgId].tileSize = 0x20; } else { @@ -562,27 +562,27 @@ static u8 TranslateGFBgModePairToGXScreenSize(enum GFBgScreenSize size, enum GFB static void GetBgScreenDimensions(u32 screenSize, u8 *widthPtr, u8 *heightPtr) { switch (screenSize) { case GF_BG_SCR_SIZE_128x128: - *widthPtr = 0x10; + *widthPtr = 0x10; *heightPtr = 0x10; break; case GF_BG_SCR_SIZE_256x256: - *widthPtr = 0x20; + *widthPtr = 0x20; *heightPtr = 0x20; break; case GF_BG_SCR_SIZE_256x512: - *widthPtr = 0x20; + *widthPtr = 0x20; *heightPtr = 0x40; break; case GF_BG_SCR_SIZE_512x256: - *widthPtr = 0x40; + *widthPtr = 0x40; *heightPtr = 0x20; break; case GF_BG_SCR_SIZE_512x512: - *widthPtr = 0x40; + *widthPtr = 0x40; *heightPtr = 0x40; break; case GF_BG_SCR_SIZE_1024x1024: - *widthPtr = 0x80; + *widthPtr = 0x80; *heightPtr = 0x80; break; } @@ -798,7 +798,7 @@ void BgCopyOrUncompressTilemapBufferRangeToVram(BgConfig *bgConfig, u8 bgId, con } u32 uncompSize = MI_GetUncompressedSize(buffer); - void *ptr = AllocFromHeapAtEnd(bgConfig->heapId, uncompSize); + void *ptr = AllocFromHeapAtEnd(bgConfig->heapId, uncompSize); CopyOrUncompressTilemapData(buffer, ptr, bufferSize); LoadBgVramScr(bgId, ptr, baseTile * 2, uncompSize); FreeToHeap(ptr); @@ -852,7 +852,7 @@ void BG_LoadCharTilesData(BgConfig *bgConfig, u8 bgId, const void *data, u32 siz static void BG_LoadCharPixelData(BgConfig *bgConfig, u8 bgId, const void *buffer, u32 size, u32 offset) { if (size == 0) { - u32 uncompressedSize = MI_GetUncompressedSize(buffer); + u32 uncompressedSize = MI_GetUncompressedSize(buffer); void *uncompressedBuffer = AllocFromHeapAtEnd(bgConfig->heapId, uncompressedSize); CopyOrUncompressTilemapData(buffer, uncompressedBuffer, size); LoadBgVramChar(bgId, uncompressedBuffer, offset, uncompressedSize); @@ -903,9 +903,9 @@ void BG_ClearCharDataRange(u8 bgId, u32 size, u32 offset, HeapID heapId) { void BG_FillCharDataRange(BgConfig *bgConfig, GFBgLayer bgId, u32 fillValue, u32 ntiles, u32 offset) { void *buffer; - u32 size = ntiles * bgConfig->bgs[bgId].tileSize; + u32 size = ntiles * bgConfig->bgs[bgId].tileSize; u32 value = fillValue; - buffer = AllocFromHeapAtEnd(bgConfig->heapId, size); + buffer = AllocFromHeapAtEnd(bgConfig->heapId, size); if (bgConfig->bgs[bgId].tileSize == TILE_SIZE_4BPP) { value = (value << 12) | (value << 8) | (value << 4) | (value << 0); @@ -991,9 +991,9 @@ static u16 GetTileMapIndexFromCoords(u8 x, u8 y, u8 size, u8 mode) { } static u16 GetSrcTileMapIndexFromCoords(u8 x, u8 y, u8 width, u8 height) { - u8 coordType = 0; - u16 tilemapIndex = 0; - s16 adjustedWidth = width - 32; + u8 coordType = 0; + u16 tilemapIndex = 0; + s16 adjustedWidth = width - 32; s16 adjustedHeight = height - 32; if (x / 32) { @@ -1225,7 +1225,7 @@ void BgTilemapRectChangePalette(BgConfig *bgConfig, u8 bgId, u8 x, u8 y, u8 widt if (j >= screenWidth) { break; } - u16 pos = GetTileMapIndexFromCoords(j, i, bgConfig->bgs[bgId].size, bgConfig->bgs[bgId].mode); + u16 pos = GetTileMapIndexFromCoords(j, i, bgConfig->bgs[bgId].size, bgConfig->bgs[bgId].mode); tilemapBuffer[pos] = (tilemapBuffer[pos] & 0xFFF) | (palette << 12); } } @@ -1406,29 +1406,29 @@ void BlitBitmapRect4Bit(const Bitmap *src, const Bitmap *dest, u16 srcX, u16 src } else { yEnd = height + srcY; } - multiplierSrcY = ConvertPixelsToTiles(src->width); + multiplierSrcY = ConvertPixelsToTiles(src->width); multiplierDestY = ConvertPixelsToTiles(dest->width); if (colorKey == 0xFFFF) { for (loopSrcY = srcY, loopDestY = destY; loopSrcY < yEnd; loopSrcY++, loopDestY++) { for (loopSrcX = srcX, loopDestX = destX; loopSrcX < xEnd; loopSrcX++, loopDestX++) { - pixelsSrc = GetPixelAddressFromBlit4bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); + pixelsSrc = GetPixelAddressFromBlit4bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); pixelsDest = GetPixelAddressFromBlit4bpp(dest->pixels, loopDestX, loopDestY, multiplierDestY); - toOrr = (*pixelsSrc >> ((loopSrcX & 1) * 4)) & 0xF; - toShift = (loopDestX & 1) * 4; + toOrr = (*pixelsSrc >> ((loopSrcX & 1) * 4)) & 0xF; + toShift = (loopDestX & 1) * 4; *pixelsDest = ((toOrr << toShift) | (*pixelsDest & (0xF0 >> toShift))); } } } else { for (loopSrcY = srcY, loopDestY = destY; loopSrcY < yEnd; loopSrcY++, loopDestY++) { for (loopSrcX = srcX, loopDestX = destX; loopSrcX < xEnd; loopSrcX++, loopDestX++) { - pixelsSrc = GetPixelAddressFromBlit4bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); + pixelsSrc = GetPixelAddressFromBlit4bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); pixelsDest = GetPixelAddressFromBlit4bpp(dest->pixels, loopDestX, loopDestY, multiplierDestY); toOrr = (*pixelsSrc >> ((loopSrcX & 1) * 4)) & 0xF; if (toOrr != colorKey) { - toShift = (loopDestX & 1) * 4; + toShift = (loopDestX & 1) * 4; *pixelsDest = (u8)((toOrr << toShift) | (*pixelsDest & (0xF0 >> toShift))); } } @@ -1453,13 +1453,13 @@ static void BlitBitmapRect8Bit(const Bitmap *src, const Bitmap *dest, u16 srcX, } else { yEnd = height + srcY; } - multiplierSrcY = ConvertPixelsToTiles(src->width); + multiplierSrcY = ConvertPixelsToTiles(src->width); multiplierDestY = ConvertPixelsToTiles(dest->width); if (colorKey == 0xFFFF) { for (loopSrcY = srcY, loopDestY = destY; loopSrcY < yEnd; loopSrcY++, loopDestY++) { for (loopSrcX = srcX, loopDestX = destX; loopSrcX < xEnd; loopSrcX++, loopDestX++) { - pixelsSrc = GetPixelAddressFromBlit8bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); + pixelsSrc = GetPixelAddressFromBlit8bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); pixelsDest = GetPixelAddressFromBlit8bpp(dest->pixels, loopDestX, loopDestY, multiplierDestY); *pixelsDest = *pixelsSrc; @@ -1468,7 +1468,7 @@ static void BlitBitmapRect8Bit(const Bitmap *src, const Bitmap *dest, u16 srcX, } else { for (loopSrcY = srcY, loopDestY = destY; loopSrcY < yEnd; loopSrcY++, loopDestY++) { for (loopSrcX = srcX, loopDestX = destX; loopSrcX < xEnd; loopSrcX++, loopDestX++) { - pixelsSrc = GetPixelAddressFromBlit8bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); + pixelsSrc = GetPixelAddressFromBlit8bpp(src->pixels, loopSrcX, loopSrcY, multiplierSrcY); pixelsDest = GetPixelAddressFromBlit8bpp(dest->pixels, loopDestX, loopDestY, multiplierDestY); if (*pixelsSrc != colorKey) { @@ -1523,7 +1523,7 @@ static void FillBitmapRect8bit(const Bitmap *surface, u16 x, u16 y, u16 width, u for (int i = y; i < yEnd; i++) { for (int j = x; j < xEnd; j++) { u8 *pixels = GetPixelAddressFromBlit8bpp(surface->pixels, j, i, blitWidth); - *pixels = fillValue; + *pixels = fillValue; } } } @@ -1537,16 +1537,16 @@ Window *AllocWindows(HeapID heapId, s32 num) { } void InitWindow(Window *window) { - window->bgConfig = NULL; - window->bgId = GF_BG_LYR_UNALLOC; + window->bgConfig = NULL; + window->bgId = GF_BG_LYR_UNALLOC; window->tilemapLeft = 0; - window->tilemapTop = 0; - window->width = 0; - window->height = 0; - window->paletteNum = 0; - window->baseTile = 0; + window->tilemapTop = 0; + window->width = 0; + window->height = 0; + window->paletteNum = 0; + window->baseTile = 0; window->pixelBuffer = NULL; - window->colorMode = GF_BG_CLR_4BPP; + window->colorMode = GF_BG_CLR_4BPP; } BOOL WindowIsInUse(const Window *window) { @@ -1567,16 +1567,16 @@ void AddWindowParameterized(BgConfig *bgConfig, Window *window, u8 bgId, u8 x, u if (buffer == NULL) { return; } - window->bgConfig = bgConfig; - window->bgId = bgId; + window->bgConfig = bgConfig; + window->bgId = bgId; window->tilemapLeft = x; - window->tilemapTop = y; - window->width = width; - window->height = height; - window->paletteNum = paletteNum; - window->baseTile = baseTile; + window->tilemapTop = y; + window->width = width; + window->height = height; + window->paletteNum = paletteNum; + window->baseTile = baseTile; window->pixelBuffer = buffer; - window->colorMode = bgConfig->bgs[bgId].colorMode == GX_BG_COLORMODE_16 ? GF_BG_CLR_4BPP : GF_BG_CLR_8BPP; + window->colorMode = bgConfig->bgs[bgId].colorMode == GX_BG_COLORMODE_16 ? GF_BG_CLR_4BPP : GF_BG_CLR_8BPP; } void AddTextWindowTopLeftCorner(BgConfig *bgConfig, Window *window, u8 width, u8 height, u16 baseTile, u8 paletteNum) { @@ -1588,12 +1588,12 @@ void AddTextWindowTopLeftCorner(BgConfig *bgConfig, Window *window, u8 width, u8 memset(ptr, paletteNum, size); // could cause a data protection abort if below is true if (ptr != NULL) { - window->bgConfig = bgConfig; - window->width = width; - window->height = height; - window->baseTile = baseTile; + window->bgConfig = bgConfig; + window->width = width; + window->height = height; + window->baseTile = baseTile; window->pixelBuffer = ptr; - window->colorMode = GF_BG_CLR_4BPP; + window->colorMode = GF_BG_CLR_4BPP; } } @@ -1604,14 +1604,14 @@ void AddWindow(BgConfig *bgConfig, Window *window, const WindowTemplate *templat void RemoveWindow(Window *window) { FreeToHeap(window->pixelBuffer); - window->bgConfig = NULL; - window->bgId = GF_BG_LYR_UNALLOC; + window->bgConfig = NULL; + window->bgId = GF_BG_LYR_UNALLOC; window->tilemapLeft = 0; - window->tilemapTop = 0; - window->width = 0; - window->height = 0; - window->paletteNum = 0; - window->baseTile = 0; + window->tilemapTop = 0; + window->width = 0; + window->height = 0; + window->paletteNum = 0; + window->baseTile = 0; window->pixelBuffer = NULL; } @@ -1659,8 +1659,8 @@ static void PutWindowTilemap_TextMode(Window *window) { return; } - tile = window->baseTile; - tilemapRight = window->tilemapLeft + window->width; + tile = window->baseTile; + tilemapRight = window->tilemapLeft + window->width; tilemapBottom = window->tilemapTop + window->height; for (i = window->tilemapTop; i < tilemapBottom; i++) { @@ -1685,7 +1685,7 @@ static void PutWindowTilemap_AffineMode(Window *window) { tilemapWidth = sTilemapWidthByBufferSize[window->bgConfig->bgs[window->bgId].size]; tilemap = window->bgConfig->bgs[window->bgId].tilemapBuffer + window->tilemapTop * tilemapWidth + window->tilemapLeft; - tile = window->baseTile; + tile = window->baseTile; for (i = 0; i < window->height; i++) { for (j = 0; j < window->width; j++) { @@ -1703,8 +1703,8 @@ static void ClearWindowTilemapText(Window *window) { if (window->bgConfig->bgs[window->bgId].tilemapBuffer == NULL) { return; } - tilemap = window->bgConfig->bgs[window->bgId].tilemapBuffer; - tilemapRight = window->tilemapLeft + window->width; + tilemap = window->bgConfig->bgs[window->bgId].tilemapBuffer; + tilemapRight = window->tilemapLeft + window->width; tilemapBottom = window->tilemapTop + window->height; for (i = window->tilemapTop; i < tilemapBottom; i++) { for (j = window->tilemapLeft; j < tilemapRight; j++) { @@ -1723,7 +1723,7 @@ static void ClearWindowTilemapAffine(Window *window) { } tilemapWidth = sTilemapWidthByBufferSize[window->bgConfig->bgs[window->bgId].size]; - tilemap = window->bgConfig->bgs[window->bgId].tilemapBuffer + window->tilemapTop * tilemapWidth + window->tilemapLeft; + tilemap = window->bgConfig->bgs[window->bgId].tilemapBuffer + window->tilemapTop * tilemapWidth + window->tilemapLeft; for (i = 0; i < window->height; i++) { for (j = 0; j < window->width; j++) { tilemap[j] = 0; @@ -1808,11 +1808,11 @@ void BlitBitmapRect(Window *window, void *src, u16 srcX, u16 srcY, u16 srcWidth, Bitmap bmpSrc, bmpDest; bmpSrc.pixels = src; - bmpSrc.width = srcWidth; + bmpSrc.width = srcWidth; bmpSrc.height = srcHeight; bmpDest.pixels = window->pixelBuffer; - bmpDest.width = window->width * 8; + bmpDest.width = window->width * 8; bmpDest.height = window->height * 8; if (window->bgConfig->bgs[window->bgId].colorMode == GF_BG_CLR_4BPP) { @@ -1826,7 +1826,7 @@ void FillWindowPixelRect(Window *window, u8 fillValue, u16 x, u16 y, u16 width, Bitmap bmp; bmp.pixels = window->pixelBuffer; - bmp.width = window->width * 8; + bmp.width = window->width * 8; bmp.height = window->height * 8; if (window->bgConfig->bgs[window->bgId].colorMode == GF_BG_CLR_4BPP) { @@ -1848,7 +1848,7 @@ void FillWindowPixelRect(Window *window, u8 fillValue, u16 x, u16 y, u16 width, \ src = glyphPixels + (srcY / 8 * 64) + (srcX / 8 * 32); \ if (srcY == 0) { \ - destI = destY + srcY; \ + destI = destY + srcY; \ tableBit = table & 0xFF; \ } else { \ destI = destY + srcY; \ @@ -1863,14 +1863,14 @@ void FillWindowPixelRect(Window *window, u8 fillValue, u16 x, u16 y, u16 width, pixelData = *(u32 *)src; \ tableFlag = (tableBit >> srcI) & 1; \ for (srcJ = 0, destJ = destX + srcX; srcJ < srcWidth; srcJ++, destJ++) { \ - dest = GetPixelAddressFromBlit4bpp(windowPixels, destJ, destI, destWidth); \ + dest = GetPixelAddressFromBlit4bpp(windowPixels, destJ, destI, destWidth); \ toOrr = (pixelData >> (srcJ * 4)) & 0xF; \ if (toOrr != 0) { \ - bits = (destJ & 1) * 4; \ + bits = (destJ & 1) * 4; \ toOrr = (toOrr << bits) | (*dest & (0xF0 >> bits)); \ *dest = toOrr; \ if (tableFlag) { \ - dest = GetPixelAddressFromBlit4bpp(windowPixels, destJ, destI + 1, destWidth); \ + dest = GetPixelAddressFromBlit4bpp(windowPixels, destJ, destI + 1, destWidth); \ *dest = toOrr; \ } \ } \ @@ -1896,7 +1896,7 @@ void FillWindowPixelRect(Window *window, u8 fillValue, u16 x, u16 y, u16 width, \ src = glyphPixels + (srcY / 8 * 128) + (srcX / 8 * 64); \ if (srcY == 0) { \ - destI = destY + srcY; \ + destI = destY + srcY; \ tableBit = table & 0xFF; \ } else { \ destI = destY + srcY; \ @@ -1911,12 +1911,12 @@ void FillWindowPixelRect(Window *window, u8 fillValue, u16 x, u16 y, u16 width, pixelData = (u8 *)src; \ tableFlag = (tableBit >> srcI) & 1; \ for (srcJ = 0, destJ = destX + srcX; srcJ < srcWidth; srcJ++, destJ++) { \ - dest = GetPixelAddressFromBlit8bpp(windowPixels, destJ, destI, destWidth); \ + dest = GetPixelAddressFromBlit8bpp(windowPixels, destJ, destI, destWidth); \ toOrr = pixelData[srcJ]; \ if (toOrr != 0) { \ *dest = toOrr; \ if (tableFlag) { \ - dest = GetPixelAddressFromBlit8bpp(windowPixels, destJ, destI + 1, destWidth); \ + dest = GetPixelAddressFromBlit8bpp(windowPixels, destJ, destI + 1, destWidth); \ *dest = toOrr; \ } \ } \ @@ -1937,8 +1937,8 @@ void CopyGlyphToWindow(Window *window, u8 *glyphPixels, u16 srcWidth, u16 srcHei u8 glyphSizeParam; windowPixels = (u8 *)window->pixelBuffer; - destWidth = (u16)(window->width * 8); - destHeight = (u16)(window->height * 8); + destWidth = (u16)(window->width * 8); + destHeight = (u16)(window->height * 8); // Don't overflow the window if (destWidth - destX < srcWidth) { @@ -2030,9 +2030,9 @@ static void ScrollWindow4bpp(Window *window, u8 direction, u8 y, u8 fillValue) { int i, j; pixelBuffer = window->pixelBuffer; - fillWord = (fillValue << 24) | (fillValue << 16) | (fillValue << 8) | (fillValue << 0); - size = window->height * window->width * TILE_SIZE_4BPP; - width = window->width; + fillWord = (fillValue << 24) | (fillValue << 16) | (fillValue << 8) | (fillValue << 0); + size = window->height * window->width * TILE_SIZE_4BPP; + width = window->width; switch (direction) { case 0: // up @@ -2080,9 +2080,9 @@ static void ScrollWindow8bpp(Window *window, u8 direction, u8 y, u8 fillValue) { int i, j; pixelBuffer = window->pixelBuffer; - fillWord = (fillValue << 24) | (fillValue << 16) | (fillValue << 8) | (fillValue << 0); - size = window->height * window->width * TILE_SIZE_8BPP; - width = window->width; + fillWord = (fillValue << 24) | (fillValue << 16) | (fillValue << 8) | (fillValue << 0); + size = window->height * window->width * TILE_SIZE_8BPP; + width = window->width; switch (direction) { case 0: // up @@ -2179,7 +2179,7 @@ void SetWindowPaletteNum(Window *window, u8 paletteNum) { void DoScheduledBgGpuUpdates(BgConfig *bgConfig) { BgConfig_HandleScheduledScrolls(bgConfig); BgConfig_HandleScheduledBufferTransfers(bgConfig); - bgConfig->scrollScheduled = 0; + bgConfig->scrollScheduled = 0; bgConfig->bufferTransferScheduled = 0; } @@ -2310,16 +2310,16 @@ BOOL DoesPixelAtScreenXYMatchPtrVal(BgConfig *bgConfig, u8 bgId, u8 x, u8 y, u16 } tilemapIdx = GetTileMapIndexFromCoords(x >> 3, y >> 3, bgConfig->bgs[bgId].size, bgConfig->bgs[bgId].mode); - bgCharPtr = BgGetCharPtr(bgId); - xPixOffs = x & 7; - yPixOffs = y & 7; + bgCharPtr = BgGetCharPtr(bgId); + xPixOffs = x & 7; + yPixOffs = y & 7; if (bgConfig->bgs[bgId].colorMode == GX_BG_COLORMODE_16) { u16 *tilemapBuffer = bgConfig->bgs[bgId].tilemapBuffer; - u8 *tile = AllocFromHeapAtEnd(bgConfig->heapId, 0x40); + u8 *tile = AllocFromHeapAtEnd(bgConfig->heapId, 0x40); bgCharPtr += (tilemapBuffer[tilemapIdx] & 0x3FF) * TILE_SIZE_4BPP; for (i = 0; i < TILE_SIZE_4BPP; i++) { - tile[i * 2] = bgCharPtr[i] & 0xF; + tile[i * 2] = bgCharPtr[i] & 0xF; tile[i * 2 + 1] = bgCharPtr[i] >> 4; } ApplyFlipFlagsToTile(bgConfig, (tilemapBuffer[tilemapIdx] >> 10) & 3, tile); @@ -2331,7 +2331,7 @@ BOOL DoesPixelAtScreenXYMatchPtrVal(BgConfig *bgConfig, u8 bgId, u8 x, u8 y, u16 } else { if (bgConfig->bgs[bgId].mode != GF_BG_TYPE_AFFINE) { u16 *tilemapBuffer = bgConfig->bgs[bgId].tilemapBuffer; - u8 *tile = AllocFromHeapAtEnd(bgConfig->heapId, 0x40); + u8 *tile = AllocFromHeapAtEnd(bgConfig->heapId, 0x40); memcpy(tile, bgCharPtr + (tilemapBuffer[tilemapIdx] & 0x3FF) * TILE_SIZE_8BPP, TILE_SIZE_8BPP); ApplyFlipFlagsToTile(bgConfig, (tilemapBuffer[tilemapIdx] >> 10) & 3, tile); diff --git a/src/blackout.c b/src/blackout.c index 9b98351dc3..8cda2de27f 100644 --- a/src/blackout.c +++ b/src/blackout.c @@ -27,48 +27,48 @@ static BOOL Task_ShowPrintedBlackoutMessage(TaskManager *taskManager); static void Blackout_PrintMessage(BlackoutScreenEnvironment *environment, s32 msgNo, u8 x, u8 y); static const struct GraphicsBanks sBlackoutGraphicsBanks = { - .bg = GX_VRAM_BG_128_B, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_128_C, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_64_E, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_16_I, + .bg = GX_VRAM_BG_128_B, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_128_C, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_64_E, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_16_I, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_0_A, - .texpltt = GX_VRAM_TEXPLTT_01_FG, + .tex = GX_VRAM_TEX_0_A, + .texpltt = GX_VRAM_TEXPLTT_01_FG, }; static const struct GraphicsModes sBlackoutGraphicsModes = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const BgTemplate sBlackoutBgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE }; static const WindowTemplate sBlackoutWindowTemplate = { - .bgId = GF_BG_LYR_MAIN_3, - .left = 4, - .top = 5, - .width = 25, - .height = 15, - .palette = 13, + .bgId = GF_BG_LYR_MAIN_3, + .left = 4, + .top = 5, + .width = 25, + .height = 15, + .palette = 13, .baseTile = 0x01 }; @@ -85,16 +85,16 @@ static void Blackout_DrawMessage(FieldSystem *fieldSystem, TaskManager *taskMana GF_ASSERT(env != NULL); memset(env, 0, sizeof(BlackoutScreenEnvironment)); - env->state = 0; + env->state = 0; env->fieldSystem = fieldSystem; - env->bgConfig = BgConfig_Alloc(HEAP_ID_FIELD); + env->bgConfig = BgConfig_Alloc(HEAP_ID_FIELD); sub_0200FBF4(PM_LCD_TOP, RGB_WHITE); // are RGBs correct here? sub_0200FBF4(PM_LCD_BOTTOM, RGB_WHITE); sub_0200FBDC(0); // PM_LCD_TOP? sub_0200FBDC(1); // PM_LCD_TOP? Blackout_InitDisplays(env->bgConfig); env->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0203_bin, HEAP_ID_FIELD); - env->msgFmt = MessageFormat_New(HEAP_ID_FIELD); + env->msgFmt = MessageFormat_New(HEAP_ID_FIELD); AddWindow(env->bgConfig, &env->window, &sBlackoutWindowTemplate); @@ -166,7 +166,7 @@ static void Blackout_PrintMessage(BlackoutScreenEnvironment *environment, s32 ms StringExpandPlaceholders(environment->msgFmt, finStr, tmpStr); u32 width = FontID_String_GetWidthMultiline(0, finStr, 0); - x = (environment->window.width * 8 - width); + x = (environment->window.width * 8 - width); x /= 2; x -= 4; @@ -188,7 +188,7 @@ enum { BOOL Task_Blackout(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); LocalFieldData *localFieldData; Location deathWarp; u16 deathSpawn; @@ -196,7 +196,7 @@ BOOL Task_Blackout(TaskManager *taskManager) { switch (*state) { case STATE_BLACKOUT_TASK_INIT: localFieldData = Save_LocalFieldData_Get(fieldSystem->saveData); - deathSpawn = LocalFieldData_GetBlackoutSpawn(localFieldData); + deathSpawn = LocalFieldData_GetBlackoutSpawn(localFieldData); GetDeathWarpData(deathSpawn, &deathWarp); GetSpecialSpawnWarpData(deathSpawn, LocalFieldData_GetSpecialSpawnWarpPtr(localFieldData)); sub_020537A8(taskManager, &deathWarp); diff --git a/src/brightness.c b/src/brightness.c index 92b4589239..f44cbf43a4 100644 --- a/src/brightness.c +++ b/src/brightness.c @@ -24,7 +24,7 @@ void DoBrightnessTransitionStep(BrightnessData *brightness) { } } else { brightness->currentBrightness = brightness->targetBrightness; - transitionFinished = TRUE; + transitionFinished = TRUE; } if (brightness->screenMask & SCREEN_MASK_MAIN) { @@ -41,13 +41,13 @@ void DoBrightnessTransitionStep(BrightnessData *brightness) { void InitBrightnessTransition(BrightnessData *brightnessData, u16 stepCount, s16 targetBrightness, s16 startBrightness, GXBlendPlaneMask surfaceMask, u32 screenMask) { GF_ASSERT(!brightnessData->transitionActive); - brightnessData->transitionActive = TRUE; - brightnessData->surfaceMask = (GXBlendPlaneMask)(u8)surfaceMask; - brightnessData->screenMask = (u8)screenMask; - brightnessData->stepCount = stepCount; - brightnessData->targetBrightness = targetBrightness; + brightnessData->transitionActive = TRUE; + brightnessData->surfaceMask = (GXBlendPlaneMask)(u8)surfaceMask; + brightnessData->screenMask = (u8)screenMask; + brightnessData->stepCount = stepCount; + brightnessData->targetBrightness = targetBrightness; brightnessData->currentBrightness = startBrightness; - brightnessData->brightnessDiff = startBrightness - targetBrightness; + brightnessData->brightnessDiff = startBrightness - targetBrightness; if (brightnessData->brightnessDiff > 0) { brightnessData->transitionDirection = -1; @@ -56,9 +56,9 @@ void InitBrightnessTransition(BrightnessData *brightnessData, u16 stepCount, s16 brightnessData->brightnessDiff *= -1; } - brightnessData->stepSizeInteger = brightnessData->brightnessDiff / stepCount; + brightnessData->stepSizeInteger = brightnessData->brightnessDiff / stepCount; brightnessData->stepSizeFractional = brightnessData->brightnessDiff % stepCount; - brightnessData->fractionalCount = 0; + brightnessData->fractionalCount = 0; } void StartBrightnessTransition(u16 stepCount, s16 targetBrightness, s16 startBrightness, GXBlendPlaneMask surfaceMask, u32 screenMask) { @@ -92,7 +92,7 @@ void ScreenBrightnessData_InitAll(void) { MI_CpuFill8(&sSubScreenBrightnessData, 0, sizeof(BrightnessData)); sMainScreenBrightnessData.transitionActive = FALSE; - sSubScreenBrightnessData.transitionActive = FALSE; + sSubScreenBrightnessData.transitionActive = FALSE; } void InitScreenBrightnessData(u32 screenMask) { @@ -136,6 +136,6 @@ BOOL IsBrightnessTransitionActive(u32 screenMask) { } void UpdateMainScreenBrightnessSurface(GXBlendPlaneMask mask1, GXBlendPlaneMask mask2) { - GXBlendPlaneMask mask = (GXBlendPlaneMask)(mask1 | mask2 << 8); + GXBlendPlaneMask mask = (GXBlendPlaneMask)(mask1 | mask2 << 8); sMainScreenBrightnessData.surfaceMask = mask; } diff --git a/src/camera.c b/src/camera.c index 843febc469..40d3de0e0d 100644 --- a/src/camera.c +++ b/src/camera.c @@ -18,7 +18,7 @@ extern void Camera_OffsetLookAtPosAndTarget(const VecFx32 *delta, Camera *camera extern fx16 CalcAngleBetweenVecs(VecFx32 *a, VecFx32 *b); static void Camera_CalcLookAtPosFromTargetAndAngle(Camera *camera) { - u16 negx = -camera->angle.x; + u16 negx = -camera->angle.x; camera->lookAt.camPos.x = FX_Mul(FX_Mul(FX_SinIdx(camera->angle.y), camera->distance), FX_CosIdx(camera->angle.x)); camera->lookAt.camPos.z = FX_Mul(FX_Mul(FX_CosIdx(camera->angle.y), camera->distance), FX_CosIdx(camera->angle.x)); camera->lookAt.camPos.y = FX_Mul(FX_SinIdx(negx), camera->distance); @@ -26,7 +26,7 @@ static void Camera_CalcLookAtPosFromTargetAndAngle(Camera *camera) { } static void Camera_CalcLookAtTargetFromPosAndAngle(Camera *camera) { - u16 negx = -camera->angle.x; + u16 negx = -camera->angle.x; camera->lookAt.camTarget.x = -FX_Mul(FX_Mul(FX_SinIdx(camera->angle.y), camera->distance), FX_CosIdx(camera->angle.x)); camera->lookAt.camTarget.z = -FX_Mul(FX_Mul(FX_CosIdx(camera->angle.y), camera->distance), FX_CosIdx(camera->angle.x)); camera->lookAt.camTarget.y = -FX_Mul(FX_SinIdx(negx), camera->distance); @@ -34,20 +34,20 @@ static void Camera_CalcLookAtTargetFromPosAndAngle(Camera *camera) { } static void Camera_InitInternal(u16 perspectiveAngle, Camera *camera) { - camera->perspectiveAngle = perspectiveAngle; + camera->perspectiveAngle = perspectiveAngle; camera->perspective.fovySin = FX_SinIdx(perspectiveAngle); camera->perspective.fovyCos = FX_CosIdx(perspectiveAngle); - camera->perspective.aspect = FX32_CONST(1.33333333); // 4x3 - camera->perspective.near = FX32_CONST(150); - camera->perspective.far = FX32_CONST(900); - camera->lookAt.camUp.x = 0; - camera->lookAt.camUp.y = FX32_ONE; - camera->lookAt.camUp.z = 0; - camera->curTarget = NULL; - camera->enableOffsetX = FALSE; - camera->enableOffsetY = FALSE; - camera->enableOffsetZ = FALSE; - camera->history = NULL; + camera->perspective.aspect = FX32_CONST(1.33333333); // 4x3 + camera->perspective.near = FX32_CONST(150); + camera->perspective.far = FX32_CONST(900); + camera->lookAt.camUp.x = 0; + camera->lookAt.camUp.y = FX32_ONE; + camera->lookAt.camUp.z = 0; + camera->curTarget = NULL; + camera->enableOffsetX = FALSE; + camera->enableOffsetY = FALSE; + camera->enableOffsetZ = FALSE; + camera->history = NULL; } static void Camera_VecResetCoordsIfOffsetComponentNotEnabled(Camera *camera, VecFx32 *vec) { @@ -68,7 +68,7 @@ static void Camera_GetVecFromSomeRingBufferMaybe(Camera *camera, const VecFx32 * } else if (camera->history->unk24 == FALSE) { *vecDest = *vecDefault; } else { - s32 *idxPtr = &camera->history->readIdx; + s32 *idxPtr = &camera->history->readIdx; s32 *idx2Ptr = &camera->history->writeIdx; if (!camera->history->overrideEnabled) { *vecDest = *vecDefault; @@ -78,9 +78,9 @@ static void Camera_GetVecFromSomeRingBufferMaybe(Camera *camera, const VecFx32 * } else { *vecDest = camera->history->vecs[camera->history->readIdx]; } - *idxPtr = (*idxPtr + 1) % camera->history->count; + *idxPtr = (*idxPtr + 1) % camera->history->count; camera->history->vecs[*idx2Ptr] = *vecDefault; - *idx2Ptr = (*idx2Ptr + 1) % camera->history->count; + *idx2Ptr = (*idx2Ptr + 1) % camera->history->count; if (!camera->history->enableUpdateX) { vecDest->x = vecDefault->x; } @@ -99,20 +99,20 @@ void Camera_History_New(s32 count, s32 initialWriteIdx, s32 updateEnableFlags, H } GF_ASSERT(initialWriteIdx + 1 <= count); CameraHistory *history = AllocFromHeap(heapId, sizeof(CameraHistory)); - history->vecs = AllocFromHeap(heapId, sizeof(VecFx32) * count); + history->vecs = AllocFromHeap(heapId, sizeof(VecFx32) * count); for (s32 i = 0; i < count; i++) { history->vecs[i].x = 0; history->vecs[i].y = 0; history->vecs[i].z = 0; } - history->count = count; - history->readIdx = 0; - history->writeIdx = initialWriteIdx; - history->writeIdxInit = initialWriteIdx; + history->count = count; + history->readIdx = 0; + history->writeIdx = initialWriteIdx; + history->writeIdxInit = initialWriteIdx; history->overrideEnabled = FALSE; - history->enableUpdateX = FALSE; - history->enableUpdateY = FALSE; - history->enableUpdateZ = FALSE; + history->enableUpdateX = FALSE; + history->enableUpdateY = FALSE; + history->enableUpdateZ = FALSE; if (updateEnableFlags & CAMERA_UPDATE_ENABLE_X) { history->enableUpdateX = TRUE; } @@ -122,7 +122,7 @@ void Camera_History_New(s32 count, s32 initialWriteIdx, s32 updateEnableFlags, H if (updateEnableFlags & CAMERA_UPDATE_ENABLE_Z) { history->enableUpdateZ = TRUE; } - history->unk24 = TRUE; + history->unk24 = TRUE; camera->history = history; } @@ -175,15 +175,15 @@ void Camera_SetLookAtCamUp(VecFx32 *camUp, Camera *camera) { } void Camera_SetFixedTarget(VecFx32 *target, Camera *camera) { - camera->curTarget = target; - camera->lastTarget = *target; + camera->curTarget = target; + camera->lastTarget = *target; camera->enableOffsetX = TRUE; camera->enableOffsetY = TRUE; camera->enableOffsetZ = TRUE; } void Camera_ClearFixedTarget(Camera *camera) { - camera->curTarget = NULL; + camera->curTarget = NULL; camera->enableOffsetX = FALSE; camera->enableOffsetY = FALSE; camera->enableOffsetZ = FALSE; @@ -191,22 +191,22 @@ void Camera_ClearFixedTarget(Camera *camera) { void Camera_SetPerspectiveClippingPlane(fx32 near, fx32 far, Camera *camera) { camera->perspective.near = near; - camera->perspective.far = far, + camera->perspective.far = far, Camera_ApplyPerspectiveType(camera->perspectiveType, camera); } void Camera_Init_FromTargetDistanceAndAngle(VecFx32 *target, fx32 distance, const CameraAngle *angle, u16 perspectiveAngle, u8 perspectiveType, BOOL setReference, Camera *camera) { Camera_InitInternal(perspectiveAngle, camera); camera->lookAt.camTarget = *target; - camera->distance = distance; - camera->angle = *angle; + camera->distance = distance; + camera->angle = *angle; Camera_CalcLookAtPosFromTargetAndAngle(camera); Camera_ApplyPerspectiveType(perspectiveType, camera); if (!setReference) { return; } - camera->curTarget = target; - camera->lastTarget = *target; + camera->curTarget = target; + camera->lastTarget = *target; camera->enableOffsetX = TRUE; camera->enableOffsetY = TRUE; camera->enableOffsetZ = TRUE; @@ -215,8 +215,8 @@ void Camera_Init_FromTargetDistanceAndAngle(VecFx32 *target, fx32 distance, cons void Camera_Init_FromPosDistanceAndAngle(VecFx32 *pos, fx32 distance, CameraAngle *angle, u16 perspectiveAngle, u8 perspectiveType, Camera *camera) { Camera_InitInternal(perspectiveAngle, camera); camera->lookAt.camPos = *pos; - camera->distance = distance; - camera->angle = *angle; + camera->distance = distance; + camera->angle = *angle; Camera_CalcLookAtTargetFromPosAndAngle(camera); Camera_ApplyPerspectiveType(perspectiveType, camera); } @@ -226,28 +226,28 @@ void Camera_Init_FromTargetAndPos(const VecFx32 *target, const VecFx32 *pos, u16 Camera_InitInternal(perspectiveAngle, camera); camera->lookAt.camTarget = *target; - camera->lookAt.camPos = *pos; + camera->lookAt.camPos = *pos; VEC_Subtract(pos, target, &vec_from_pos_to_target); camera->distance = VEC_Mag(&vec_from_pos_to_target); - VecFx32 sp24 = { 0, 0, 0 }; // unused - VecFx32 sp18 = { 0, 0, 0 }; // unused - VecFx32 sp0C = { 0, 0, 0 }; + VecFx32 sp24 = { 0, 0, 0 }; // unused + VecFx32 sp18 = { 0, 0, 0 }; // unused + VecFx32 sp0C = { 0, 0, 0 }; VecFx32 sp00; - sp00.x = 0; - sp00.y = 0; - sp00.z = FX32_ONE; - sp0C = vec_from_pos_to_target; - sp0C.y = 0; + sp00.x = 0; + sp00.y = 0; + sp00.z = FX32_ONE; + sp0C = vec_from_pos_to_target; + sp0C.y = 0; camera->angle.y = CalcAngleBetweenVecs(&sp00, &sp0C); - sp00.x = FX32_ONE; - sp00.y = 0; - sp00.z = 0; - sp0C.x = vec_from_pos_to_target.z; - sp0C.z = vec_from_pos_to_target.y; - sp0C.y = 0; + sp00.x = FX32_ONE; + sp00.y = 0; + sp00.z = 0; + sp0C.x = vec_from_pos_to_target.z; + sp0C.z = vec_from_pos_to_target.y; + sp0C.y = 0; camera->angle.x = CalcAngleBetweenVecs(&sp00, &sp0C); camera->angle.z = 0; @@ -256,8 +256,8 @@ void Camera_Init_FromTargetAndPos(const VecFx32 *target, const VecFx32 *pos, u16 if (!setReference) { return; } - camera->curTarget = target; - camera->lastTarget = *target; + camera->curTarget = target; + camera->lastTarget = *target; camera->enableOffsetX = TRUE; camera->enableOffsetY = TRUE; camera->enableOffsetZ = TRUE; @@ -267,18 +267,18 @@ void Camera_ApplyPerspectiveType(u8 perspectiveType, Camera *camera) { if (perspectiveType == CAMERA_PERSPECTIVE_TYPE_PERSPECTIVE) { NNS_G3dGlbPerspective(camera->perspective.fovySin, camera->perspective.fovyCos, camera->perspective.aspect, camera->perspective.near, camera->perspective.far); camera->perspectiveType = CAMERA_PERSPECTIVE_TYPE_PERSPECTIVE; - gG3dDepthBufferingMode = GX_BUFFERMODE_Z; + gG3dDepthBufferingMode = GX_BUFFERMODE_Z; } else { fx32 y = FX_Mul(FX_Div(camera->perspective.fovySin, camera->perspective.fovyCos), camera->distance); fx32 x = FX_Mul(y, camera->perspective.aspect); NNS_G3dGlbOrtho(y, -y, -x, x, camera->perspective.near, camera->perspective.far); camera->perspectiveType = CAMERA_PERSPECTIVE_TYPE_ORTHOGRAPHIC; - gG3dDepthBufferingMode = GX_BUFFERMODE_Z; + gG3dDepthBufferingMode = GX_BUFFERMODE_Z; } } void Camera_SetPerspectiveAngle(u16 perspectiveAngle, Camera *camera) { - camera->perspectiveAngle = perspectiveAngle; + camera->perspectiveAngle = perspectiveAngle; camera->perspective.fovySin = FX_SinIdx(camera->perspectiveAngle); camera->perspective.fovyCos = FX_CosIdx(camera->perspectiveAngle); Camera_ApplyPerspectiveType(camera->perspectiveType, camera); diff --git a/src/camera_translation.c b/src/camera_translation.c index ab48feb56f..be0feab64d 100644 --- a/src/camera_translation.c +++ b/src/camera_translation.c @@ -38,11 +38,11 @@ void SetCameraTranslationPath(GFCameraTranslationWrapper *wrapper, struct Camera if (!wrapper->active && duration != 0) { wrapper->active = TRUE; wrapper->target = *template; - angle = getBoundCameraAngle(wrapper); - target = getBoundCameraTarget(wrapper); - bindTarget = Camera_GetCurrentTarget(wrapper->camera); + angle = getBoundCameraAngle(wrapper); + target = getBoundCameraTarget(wrapper); + bindTarget = Camera_GetCurrentTarget(wrapper->camera); - wrapper->init.angleX = angle.x; + wrapper->init.angleX = angle.x; wrapper->init.perspectiveAngle = Camera_GetPerspectiveAngle(wrapper->camera); if (bindTarget != NULL) { VEC_Subtract(&target, bindTarget, &wrapper->init.position); @@ -52,9 +52,9 @@ void SetCameraTranslationPath(GFCameraTranslationWrapper *wrapper, struct Camera wrapper->init.position.z = 0; } wrapper->init.distance = Camera_GetDistance(wrapper->camera); - wrapper->duration = duration; - wrapper->step = 0; - wrapper->task = SysTask_CreateOnMainQueue((SysTaskFunc)sysTask_MoveCameraAlongTrack, wrapper, 0); + wrapper->duration = duration; + wrapper->step = 0; + wrapper->task = SysTask_CreateOnMainQueue((SysTaskFunc)sysTask_MoveCameraAlongTrack, wrapper, 0); } } @@ -84,9 +84,9 @@ static void resetWrapper(GFCameraTranslationWrapper *wrapper) { wrapper->task = NULL; } wrapper->duration = 0; - wrapper->step = 0; - wrapper->mode = 0; - wrapper->active = FALSE; + wrapper->step = 0; + wrapper->mode = 0; + wrapper->active = FALSE; } static void stepCamera(Camera *camera, struct CameraTranslationPathTemplate *first, struct CameraTranslationPathTemplate *last, u8 step, u8 duration) { @@ -101,10 +101,10 @@ static void stepAngleX(Camera *camera, const u16 *first, const u16 *last, u8 ste u16 diff; int scaled; if (*last >= *first) { - diff = *last - *first; + diff = *last - *first; scaled = (diff * step) / duration; } else { - diff = *first - *last; + diff = *first - *last; scaled = -((diff * step) / duration); } cameraAngle.x = *first + scaled; @@ -112,16 +112,16 @@ static void stepAngleX(Camera *camera, const u16 *first, const u16 *last, u8 ste } static void stepDistance(Camera *camera, const fx32 *first, const fx32 *last, u8 step, u8 duration) { - fx32 diff = *last - *first; + fx32 diff = *last - *first; int scaled = (diff * step) / duration; - fx32 new = *first + scaled; + fx32 new = *first + scaled; Camera_SetDistance(new, camera); } static void stepPerspective(Camera *camera, const u16 *first, const u16 *last, u8 step, u8 duration) { - int diff = *last - *first; + int diff = *last - *first; int scaled = (diff * step) / duration; - int new = *first + scaled; + int new = *first + scaled; Camera_SetPerspectiveAngle(new, camera); } diff --git a/src/certificates_app.c b/src/certificates_app.c index 5743cad27f..f27f385032 100644 --- a/src/certificates_app.c +++ b/src/certificates_app.c @@ -45,28 +45,28 @@ typedef struct CertificatesApp_Data { } CertificatesApp_Data; // size: 0x5c static const WindowTemplate ov78_021E67D8 = { - .bgId = 0, - .left = 0, - .top = 0, - .width = 32, - .height = 24, - .palette = 2, + .bgId = 0, + .left = 0, + .top = 0, + .width = 32, + .height = 24, + .palette = 2, .baseTile = 0x0001, }; static const GraphicsModes ov78_021E67E0 = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const OamCharTransferParam sOamTransferParam = { - .maxTasks = 0, - .sizeMain = 0x20000, - .sizeSub = 0x4000, + .maxTasks = 0, + .sizeMain = 0x20000, + .sizeSub = 0x4000, .charModeMain = GX_OBJVRAMMODE_CHAR_1D_32K, - .charModeSub = GX_OBJVRAMMODE_CHAR_1D_32K, + .charModeSub = GX_OBJVRAMMODE_CHAR_1D_32K, }; static const SpriteResourceCountsListUnion sSpriteResourceCounts = { @@ -79,81 +79,81 @@ static const SpriteResourceCountsListUnion sSpriteResourceCounts = { }; static const BgTemplate ov78_021E681C = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const OamManagerParam sOamManagerParam = { - .fromOBJmain = 0, - .numOBJmain = 128, + .fromOBJmain = 0, + .numOBJmain = 128, .fromAffineMain = 0, - .numAffineMain = 32, - .fromOBJsub = 0, - .numOBJsub = 128, - .fromAffineSub = 0, - .numAffineSub = 32, + .numAffineMain = 32, + .fromOBJsub = 0, + .numOBJsub = 128, + .fromAffineSub = 0, + .numAffineSub = 32, }; static const GraphicsBanks ov78_021E6858 = { - .bg = GX_VRAM_BG_128_B, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_128_C, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_128_A, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_16_I, + .bg = GX_VRAM_BG_128_B, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_128_C, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_128_A, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_16_I, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE, + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE, }; static const UnkTemplate_0200D748 ov78_021E68B4 = { - .x = 0, - .y = 0, - .z = 0, - .animation = 0, + .x = 0, + .y = 0, + .z = 0, + .animation = 0, .spritePriority = 1, - .pal = 3, - .vram = NNS_G2D_VRAM_TYPE_2DBOTH, - .resIdList = { 2, 2, 2, 2, 0, 0 }, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 3, + .vram = NNS_G2D_VRAM_TYPE_2DBOTH, + .resIdList = { 2, 2, 2, 2, 0, 0 }, + .bgPriority = 0, + .vramTransfer = 0, }; static const UnkTemplate_0200D748 ov78_021E6880 = { - .x = 0, - .y = 0, - .z = 0, - .animation = 0, + .x = 0, + .y = 0, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0xFFFF, - .vram = NNS_G2D_VRAM_TYPE_2DBOTH, - .resIdList = {}, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 0xFFFF, + .vram = NNS_G2D_VRAM_TYPE_2DBOTH, + .resIdList = {}, + .bgPriority = 0, + .vramTransfer = 0, }; static const UnkTemplate_0200D748 ov78_021E68E8 = { - .x = 0, - .y = 0, - .z = 0, - .animation = 0, + .x = 0, + .y = 0, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 2, - .vram = NNS_G2D_VRAM_TYPE_2DBOTH, - .resIdList = { 1, 1, 1, 1, 0, 0 }, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 2, + .vram = NNS_G2D_VRAM_TYPE_2DBOTH, + .resIdList = { 1, 1, 1, 1, 0, 0 }, + .bgPriority = 0, + .vramTransfer = 0, }; static s16 ov78_021E6920[3][2] = { @@ -199,11 +199,11 @@ BOOL Certificates_Init(OVY_MANAGER *manager, int *state) { Party *party = SaveArray_Party_Get(args->saveData); - data->heapId = HEAP_ID_CERTIFICATES; - data->savedata = args->saveData; + data->heapId = HEAP_ID_CERTIFICATES; + data->savedata = args->saveData; data->certificateId = args->certificateId; - data->profile = Save_PlayerData_GetProfileAddr(data->savedata); - data->frontPokemon = Party_GetMonByIndex(party, slot); + data->profile = Save_PlayerData_GetProfileAddr(data->savedata); + data->frontPokemon = Party_GetMonByIndex(party, slot); sub_0200FBF4(0, 0); sub_0200FBF4(1, 0); @@ -234,7 +234,7 @@ BOOL Certificates_Init(OVY_MANAGER *manager, int *state) { BOOL Certificates_Main(OVY_MANAGER *manager, int *state) { CertificatesApp_Data *data = OverlayManager_GetData(manager); - BOOL ret = FALSE; + BOOL ret = FALSE; switch (*state) { case CERTIFICATES_EXECSTATE_SETUP: @@ -259,7 +259,7 @@ BOOL Certificates_Main(OVY_MANAGER *manager, int *state) { } data->waitFrames = 0; - *state = CERTIFICATES_EXECSTATE_WAIT_ONE_SECOND; + *state = CERTIFICATES_EXECSTATE_WAIT_ONE_SECOND; break; case CERTIFICATES_EXECSTATE_WAIT_ONE_SECOND: if (data->waitFrames < 60) { @@ -296,7 +296,7 @@ BOOL Certificates_Main(OVY_MANAGER *manager, int *state) { BOOL Certificates_Exit(OVY_MANAGER *manager, int *state) { CertificatesApp_Data *data = OverlayManager_GetData(manager); - HeapID heapId = data->heapId; + HeapID heapId = data->heapId; if (data->certificateId == CERTIFICATE_SHINY_LEAVES) { CertificatesApp_FreeSpriteRenderer(data); @@ -342,44 +342,44 @@ static void CertificatesApp_SetupBgConfig(CertificatesApp_Data *data) { BgTemplate template = ov78_021E681C; template.screenBase = GX_BG_SCRBASE_0x0000; - template.charBase = GX_BG_CHARBASE_0x10000; + template.charBase = GX_BG_CHARBASE_0x10000; template.bufferSize = 0x1000; - template.size = GX_BG_SCRSIZE_TEXT_256x512; + template.size = GX_BG_SCRSIZE_TEXT_256x512; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_MAIN_0, &template, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_0); template.screenBase = GX_BG_SCRBASE_0x1000; - template.charBase = GX_BG_CHARBASE_0x08000; + template.charBase = GX_BG_CHARBASE_0x08000; template.bufferSize = 0x1000; - template.size = GX_BG_SCRSIZE_TEXT_256x512; + template.size = GX_BG_SCRSIZE_TEXT_256x512; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_MAIN_1, &template, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_1); template.screenBase = GX_BG_SCRBASE_0x2000; - template.charBase = GX_BG_CHARBASE_0x04000; + template.charBase = GX_BG_CHARBASE_0x04000; template.bufferSize = 0x800; - template.size = 1; + template.size = 1; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_MAIN_3, &template, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_3); template.screenBase = GX_BG_SCRBASE_0x0000; - template.charBase = GX_BG_CHARBASE_0x10000; + template.charBase = GX_BG_CHARBASE_0x10000; template.bufferSize = 0x1000; - template.size = GX_BG_SCRSIZE_TEXT_256x512; + template.size = GX_BG_SCRSIZE_TEXT_256x512; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_SUB_0, &template, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_0); template.screenBase = GX_BG_SCRBASE_0x1000; - template.charBase = GX_BG_CHARBASE_0x08000; + template.charBase = GX_BG_CHARBASE_0x08000; template.bufferSize = 0x1000; - template.size = GX_BG_SCRSIZE_TEXT_256x512; + template.size = GX_BG_SCRSIZE_TEXT_256x512; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_SUB_1, &template, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_1); template.screenBase = GX_BG_SCRBASE_0x2000; - template.charBase = GX_BG_CHARBASE_0x04000; + template.charBase = GX_BG_CHARBASE_0x04000; template.bufferSize = 0x800; - template.size = GX_BG_SCRSIZE_TEXT_512x256; + template.size = GX_BG_SCRSIZE_TEXT_512x256; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_SUB_3, &template, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_3); @@ -419,7 +419,7 @@ static void CertificatesApp_SetupWindowsAndText(CertificatesApp_Data *data) { ResetAllTextPrinters(); data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0004_bin, data->heapId); - data->msgFmt = MessageFormat_New(data->heapId); + data->msgFmt = MessageFormat_New(data->heapId); template.bgId = GF_BG_LYR_MAIN_0; AddWindow(data->bgConfig, &data->window1, &template); @@ -463,23 +463,23 @@ static void ov78_021E5EA4(CertificatesApp_Data *data) { u32 nclrFileNum2; if (data->certificateId == CERTIFICATE_JOHTO_DEX) { - nscrFileNum = 15; - ncgrFileNum = 3; - nclrFileNum = 9; + nscrFileNum = 15; + ncgrFileNum = 3; + nclrFileNum = 9; nscrFileNum2 = 12; ncgrFileNum2 = 0; nclrFileNum2 = 6; } else if (data->certificateId == CERTIFICATE_NATIONAL_DEX) { - nscrFileNum = 16; - ncgrFileNum = 4; - nclrFileNum = 10; + nscrFileNum = 16; + ncgrFileNum = 4; + nclrFileNum = 10; nscrFileNum2 = 13; ncgrFileNum2 = 1; nclrFileNum2 = 7; } else { // CERTIFICATE_SHINY_LEAVES - nscrFileNum = 17; - ncgrFileNum = 5; - nclrFileNum = 11; + nscrFileNum = 17; + ncgrFileNum = 5; + nclrFileNum = 11; nscrFileNum2 = 14; ncgrFileNum2 = 2; nclrFileNum2 = 8; @@ -565,10 +565,10 @@ static void ov78_021E6068(CertificatesApp_Data *data) { static UnkImageStruct *ov78_021E61C4(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, s16 x, s16 y, u8 animation, u8 spritePriority) { UnkTemplate_0200D748 template = ov78_021E6880; - template.x = x; - template.y = y; - template.spritePriority = spritePriority; - template.animation = animation; + template.x = x; + template.y = y; + template.spritePriority = spritePriority; + template.animation = animation; UnkImageStruct *unk = SpriteRenderer_LoadResourcesAndCreateSprite_CustomBottomScreenOffset(renderer, gfxHandler, &template, FX32_CONST(GX_LCD_SIZE_Y)); UnkImageStruct_SetSpriteAnimActiveFlag(unk, FALSE); @@ -577,27 +577,27 @@ static UnkImageStruct *ov78_021E61C4(SpriteRenderer *renderer, SpriteGfxHandler static UnkImageStruct *ov78_021E6214(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, s16 x, s16 y) { UnkTemplate_0200D748 template = ov78_021E68B4; - template.x = x; - template.y = y; + template.x = x; + template.y = y; return SpriteRenderer_LoadResourcesAndCreateSprite_CustomBottomScreenOffset(renderer, gfxHandler, &template, FX32_CONST(GX_LCD_SIZE_Y)); } static UnkImageStruct *ov78_021E6250(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, s16 x, s16 y) { UnkTemplate_0200D748 template = ov78_021E68E8; - template.x = x; - template.y = y; + template.x = x; + template.y = y; return SpriteRenderer_LoadResourcesAndCreateSprite_CustomBottomScreenOffset(renderer, gfxHandler, &template, FX32_CONST(GX_LCD_SIZE_Y)); } static void CertificatesApp_SetupSpriteRenderer(CertificatesApp_Data *data) { - data->spriteRenderer = SpriteRenderer_Create(data->heapId); + data->spriteRenderer = SpriteRenderer_Create(data->heapId); data->spriteGfxHandler = SpriteRenderer_CreateGfxHandler(data->spriteRenderer); - OamManagerParam oamManagerParam = sOamManagerParam; + OamManagerParam oamManagerParam = sOamManagerParam; OamCharTransferParam oamTransferParam = sOamTransferParam; - oamTransferParam.maxTasks = 0x20; + oamTransferParam.maxTasks = 0x20; SpriteRenderer_CreateOamCharPlttManagers(data->spriteRenderer, &oamManagerParam, &oamTransferParam, 0x20); SpriteRenderer_CreateSpriteList(data->spriteRenderer, data->spriteGfxHandler, 0x20); @@ -612,7 +612,7 @@ static void CertificatesApp_SetupSpriteRenderer(CertificatesApp_Data *data) { } static void CertificatesApp_FreeSpriteRenderer(CertificatesApp_Data *data) { - SpriteRenderer *renderer = data->spriteRenderer; + SpriteRenderer *renderer = data->spriteRenderer; SpriteGfxHandler *gfxHandler = data->spriteGfxHandler; for (int i = 0; i < (int)NELEMS(data->unk4C); i++) { @@ -625,7 +625,7 @@ static void CertificatesApp_FreeSpriteRenderer(CertificatesApp_Data *data) { } static void ov78_021E636C(CertificatesApp_Data *data) { - SpriteRenderer *renderer = data->spriteRenderer; + SpriteRenderer *renderer = data->spriteRenderer; SpriteGfxHandler *gfxHandler = data->spriteGfxHandler; { @@ -687,12 +687,12 @@ static void ov78_021E656C(Sprite *sprite, void *unkBuffer, u32 unkBufferSize, u3 void ov78_021E65BC(Sprite *sprite, s32 narcMemberNum, u8 a2, HeapID heapId) { thunk_Set2dSpriteVisibleFlag(sprite, FALSE); - NARC *narc = NARC_New(NARC_data_mmodel_mmodel, heapId); + NARC *narc = NARC_New(NARC_data_mmodel_mmodel, heapId); NNSG3dResFileHeader *header = NARC_AllocAndReadWholeMember(narc, narcMemberNum, heapId); - NNSG3dResTex *tex = NNS_G3dGetTex(header); + NNSG3dResTex *tex = NNS_G3dGetTex(header); const void *address = NNS_G3dGetTexData(tex); - void *buffer = AllocFromHeapAtEnd(heapId, 0x200); + void *buffer = AllocFromHeapAtEnd(heapId, 0x200); sub_020145B4(address + (a2 * 0x200), 4, 0, 0, 4, 4, buffer); ov78_021E656C(sprite, buffer, 0x200, 0); FreeToHeap(buffer); @@ -737,17 +737,17 @@ static u32 ov78_021E6688(int species, int form, int gender) { static void ov78_021E66D4(Sprite *sprite, Pokemon *pokemon, HeapID heapId, u32 a3) { u32 species = GetMonData(pokemon, MON_DATA_SPECIES, NULL); - u32 form = GetMonData(pokemon, MON_DATA_FORM, NULL); - u32 gender = GetMonGender(pokemon); - BOOL shiny = MonIsShiny(pokemon); + u32 form = GetMonData(pokemon, MON_DATA_FORM, NULL); + u32 gender = GetMonGender(pokemon); + BOOL shiny = MonIsShiny(pokemon); u32 bufferSize, unk; if (a3 != 0) { bufferSize = 0x800; - unk = 8; + unk = 8; } else { bufferSize = 0x200; - unk = 4; + unk = 4; } NARC *narc = NARC_New(NARC_data_mmodel_mmodel, heapId); @@ -756,11 +756,11 @@ static void ov78_021E66D4(Sprite *sprite, Pokemon *pokemon, HeapID heapId, u32 a form = 0; } - u32 member = ov78_021E6688(species, (u16)form, gender); + u32 member = ov78_021E6688(species, (u16)form, gender); NNSG3dResFileHeader *header = NARC_AllocAndReadWholeMember(narc, member, heapId); - NNSG3dResTex *tex = NNS_G3dGetTex(header); - void *address = (void *)tex + tex->texInfo.ofsTex; - void *buffer = AllocFromHeapAtEnd(heapId, bufferSize); + NNSG3dResTex *tex = NNS_G3dGetTex(header); + void *address = (void *)tex + tex->texInfo.ofsTex; + void *buffer = AllocFromHeapAtEnd(heapId, bufferSize); sub_020145B4(address + (bufferSize * 2), unk, 0, 0, unk, unk, buffer); ov78_021E656C(sprite, buffer, bufferSize, 0); FreeToHeap(buffer); diff --git a/src/choose_starter.c b/src/choose_starter.c index 53eb8c1096..5e90379d33 100644 --- a/src/choose_starter.c +++ b/src/choose_starter.c @@ -21,12 +21,12 @@ static BOOL CreateStarter(TaskManager *taskManager); void LaunchStarterChoiceScene(FieldSystem *fieldSystem) { struct ChooseStarterTaskData *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct ChooseStarterTaskData)); - env->state = 0; + env->state = 0; TaskManager_Call(fieldSystem->taskman, CreateStarter, env); } static BOOL CreateStarter(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct ChooseStarterTaskData *env = TaskManager_GetEnvironment(taskManager); int i; u32 mapsec; @@ -49,11 +49,11 @@ static BOOL CreateStarter(TaskManager *taskManager) { }; mapsec = MapHeader_GetMapSec(fieldSystem->location->mapId); // sp14 - env->args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct ChooseStarterArgs)); + env->args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct ChooseStarterArgs)); env->args->cursorPos = 0; - env->args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + env->args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); for (i = 0; i < (int)NELEMS(species); i++) { - Pokemon *mon = &env->args->starters[i]; + Pokemon *mon = &env->args->starters[i]; PlayerProfile *profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); ZeroMonData(mon); CreateMon(mon, species[i], 5, 32, FALSE, 0, OT_ID_PLAYER_ID, 0); @@ -75,8 +75,8 @@ static BOOL CreateStarter(TaskManager *taskManager) { env->state = 3; break; case 3: { - Pokedex *pokedex = Save_Pokedex_Get(fieldSystem->saveData); - party = SaveArray_Party_Get(fieldSystem->saveData); + Pokedex *pokedex = Save_Pokedex_Get(fieldSystem->saveData); + party = SaveArray_Party_Get(fieldSystem->saveData); Pokemon *myChoice = &env->args->starters[env->args->cursorPos]; if (Party_AddMon(party, myChoice)) { UpdatePokedexWithReceivedSpecies(fieldSystem->saveData, myChoice); diff --git a/src/choose_starter_app.c b/src/choose_starter_app.c index 7c05dd2112..f7a4a84e48 100644 --- a/src/choose_starter_app.c +++ b/src/choose_starter_app.c @@ -32,51 +32,51 @@ #include "unk_02026E30.h" enum ChooseStarterInput { - CHOOSE_STARTER_INPUT_NONE = 0, - CHOOSE_STARTER_INPUT_CYCLE_CLOCKWISE = 1, + CHOOSE_STARTER_INPUT_NONE = 0, + CHOOSE_STARTER_INPUT_CYCLE_CLOCKWISE = 1, CHOOSE_STARTER_INPUT_CYCLE_COUNTERCLOCKWISE = 2, - CHOOSE_STARTER_INPUT_CONTINUE_LEFT = 3, - CHOOSE_STARTER_INPUT_CONTINUE_RIGHT = 4, - CHOOSE_STARTER_INPUT_SELECT_BALL_INIT = 5, - CHOOSE_STARTER_INPUT_CHOSE_STARTER = 6, - CHOOSE_STARTER_INPUT_CONFIRM_CHOICE = 7, - CHOOSE_STARTER_INPUT_BACKED_OUT = 8, + CHOOSE_STARTER_INPUT_CONTINUE_LEFT = 3, + CHOOSE_STARTER_INPUT_CONTINUE_RIGHT = 4, + CHOOSE_STARTER_INPUT_SELECT_BALL_INIT = 5, + CHOOSE_STARTER_INPUT_CHOSE_STARTER = 6, + CHOOSE_STARTER_INPUT_CONFIRM_CHOICE = 7, + CHOOSE_STARTER_INPUT_BACKED_OUT = 8, }; enum ChooseStarterAppState { - CHOOSE_STARTER_STATE_INIT = 0, - CHOOSE_STARTER_STATE_WAIT_FADE_IN = 1, - CHOOSE_STARTER_STATE_START_INIT_MSG = 2, - CHOOSE_STARTER_STATE_CONFIRM_MSG = 3, - CHOOSE_STARTER_STATE_WAIT_INIT_MSG = 4, - CHOOSE_STARTER_STATE_HANDLE_INPUT = 5, - CHOOSE_STARTER_STATE_ROTATE_MACHINE = 6, - CHOOSE_STARTER_STATE_ZOOM_IN = 7, - CHOOSE_STARTER_STATE_WAIT_ZOOM_IN = 8, - CHOOSE_STARTER_STATE_BACK_OUT = 9, + CHOOSE_STARTER_STATE_INIT = 0, + CHOOSE_STARTER_STATE_WAIT_FADE_IN = 1, + CHOOSE_STARTER_STATE_START_INIT_MSG = 2, + CHOOSE_STARTER_STATE_CONFIRM_MSG = 3, + CHOOSE_STARTER_STATE_WAIT_INIT_MSG = 4, + CHOOSE_STARTER_STATE_HANDLE_INPUT = 5, + CHOOSE_STARTER_STATE_ROTATE_MACHINE = 6, + CHOOSE_STARTER_STATE_ZOOM_IN = 7, + CHOOSE_STARTER_STATE_WAIT_ZOOM_IN = 8, + CHOOSE_STARTER_STATE_BACK_OUT = 9, CHOOSE_STARTER_STATE_ZOOM_AND_FADE_OUT = 10, - CHOOSE_STARTER_STATE_WAIT_FADE_OUT = 11, - CHOOSE_STARTER_STATE_WAIT_AND_EXIT = 12, + CHOOSE_STARTER_STATE_WAIT_FADE_OUT = 11, + CHOOSE_STARTER_STATE_WAIT_AND_EXIT = 12, }; #define WOBBLE_STATE_NORMAL 0 #define WOBBLE_STATE_PAUSE 2 enum ChooseStarter3dResNum { - CS_3DRES_BALL_EF = 0, - CS_3DRES_TABLETOP = 1, + CS_3DRES_BALL_EF = 0, + CS_3DRES_TABLETOP = 1, CS_3DRES_TURNTABLE = 2, - CS_3DRES_BALLS = 3, + CS_3DRES_BALLS = 3, CS_3DRES_MAX }; enum ChooseStarterModel { CS_MODEL_TT_BALL_EF = 0, - CS_MODEL_TABLETOP = 1, - CS_MODEL_TURNTABLE = 2, - CS_MODEL_BALL1 = 3, - CS_MODEL_BALL2 = 4, - CS_MODEL_BALL3 = 5, + CS_MODEL_TABLETOP = 1, + CS_MODEL_TURNTABLE = 2, + CS_MODEL_BALL1 = 3, + CS_MODEL_BALL2 = 4, + CS_MODEL_BALL3 = 5, CS_MODEL_MAX }; @@ -84,9 +84,9 @@ enum ChooseStarterAnim { CS_ANIM_BALL1_ROCK = 0, CS_ANIM_BALL2_ROCK = 1, CS_ANIM_BALL3_ROCK = 2, - CS_ANIM_BALL_OPEN = 3, + CS_ANIM_BALL_OPEN = 3, CS_ANIM_TT_BALL_EF = 4, - CS_ANIM_TURNTABLE = 5, // material anim + CS_ANIM_TURNTABLE = 5, // material anim CS_ANIM_MAX }; @@ -258,7 +258,7 @@ BOOL ChooseStarter_Init(OVY_MANAGER *ovy, int *state_p) { MI_CpuClear8(work, sizeof(struct ChooseStarterAppWork)); work->heapId = HEAP_ID_CHOOSE_STARTER; GF_ExpHeap_FndInitAllocator(&work->allocator, HEAP_ID_CHOOSE_STARTER, 0x20); - args = OverlayManager_GetArgs(ovy); + args = OverlayManager_GetArgs(ovy); work->frame = Options_GetFrame(args->options); for (i = 0; i < 3; i++) { work->choices[i] = &args->starters[i]; @@ -274,9 +274,9 @@ BOOL ChooseStarter_Init(OVY_MANAGER *ovy, int *state_p) { { struct GraphicsModes bgModeSet; - bgModeSet.dispMode = GX_DISPMODE_GRAPHICS; - bgModeSet.bgMode = GX_BGMODE_0; - bgModeSet.subMode = GX_BGMODE_1; + bgModeSet.dispMode = GX_DISPMODE_GRAPHICS; + bgModeSet.bgMode = GX_BGMODE_0; + bgModeSet.subMode = GX_BGMODE_1; bgModeSet._2d3dMode = GX_BG0_AS_3D; SetBothScreensModesAndDisable(&bgModeSet); @@ -293,7 +293,7 @@ BOOL ChooseStarter_Init(OVY_MANAGER *ovy, int *state_p) { loadBgGraphics(work->bgConfig, work->heapId); createObjResMans(work); initObjRenderers(work); - work->camera = Camera_New(work->heapId); + work->camera = Camera_New(work->heapId); work->cameraTranslation = CreateCameraTranslationWrapper(work->heapId, work->camera); initCameraPosition(work); initBallModelPositions(work); @@ -312,7 +312,7 @@ static const int sSpecies[] = { BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { struct ChooseStarterAppWork *work = OverlayManager_GetData(ovy); - int cameraPathSel = CAMERA_PATH_NULL; + int cameraPathSel = CAMERA_PATH_NULL; int input; switch (*state) { case CHOOSE_STARTER_STATE_INIT: @@ -350,7 +350,7 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { } String_Delete(work->strbuf); work->strbuf = NULL; - *state = CHOOSE_STARTER_STATE_HANDLE_INPUT; + *state = CHOOSE_STARTER_STATE_HANDLE_INPUT; break; case CHOOSE_STARTER_STATE_HANDLE_INPUT: if (!IsCameraTranslationFinished(work->cameraTranslation)) { @@ -383,13 +383,13 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { case CHOOSE_STARTER_INPUT_CYCLE_CLOCKWISE: case CHOOSE_STARTER_INPUT_CONTINUE_LEFT: work->rotationSpeed = FX16_CONST(-0.5); - *state = CHOOSE_STARTER_STATE_ROTATE_MACHINE; + *state = CHOOSE_STARTER_STATE_ROTATE_MACHINE; PlaySE_SetPitch(0x607, -0x200); break; case CHOOSE_STARTER_INPUT_CYCLE_COUNTERCLOCKWISE: case CHOOSE_STARTER_INPUT_CONTINUE_RIGHT: work->rotationSpeed = FX16_CONST(0.5); - *state = CHOOSE_STARTER_STATE_ROTATE_MACHINE; + *state = CHOOSE_STARTER_STATE_ROTATE_MACHINE; PlaySE_SetPitch(0x607, -0x200); break; case CHOOSE_STARTER_INPUT_CONFIRM_CHOICE: @@ -402,7 +402,7 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { addAnmObjToRenderObj(&work->_3dObjRender[work->curSelection + 3], &work->_3dObjAnm[CS_ANIM_BALL_OPEN]); addAnmObjToRenderObj(&work->_3dObjRender[CS_MODEL_TT_BALL_EF], &work->_3dObjAnm[CS_ANIM_TT_BALL_EF]); work->_3dObjRender[CS_MODEL_TT_BALL_EF].active = TRUE; - *state = CHOOSE_STARTER_STATE_ZOOM_AND_FADE_OUT; + *state = CHOOSE_STARTER_STATE_ZOOM_AND_FADE_OUT; break; case CHOOSE_STARTER_INPUT_BACKED_OUT: if (work->state == SELECT_STATE_CONFIRM) { @@ -412,7 +412,7 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { GfGfx_EngineATogglePlanes(GX_PLANEMASK_BG2, GF_PLANE_TOGGLE_OFF); setAllMonSpritesInvisible(&work->monSpriteData); work->state = SELECT_STATE_NULL; - *state = CHOOSE_STARTER_STATE_BACK_OUT; + *state = CHOOSE_STARTER_STATE_BACK_OUT; } break; } @@ -434,7 +434,7 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { } setAllButSelectedMonSpritesInvisible(work); work->state = SELECT_STATE_INSPECT; - *state = CHOOSE_STARTER_STATE_HANDLE_INPUT; + *state = CHOOSE_STARTER_STATE_HANDLE_INPUT; break; case CHOOSE_STARTER_STATE_ZOOM_IN: if (!yRotateSelectedBall(work, BALL_Y_ANGLE_OUT, BALL_Y_ANGLE_IN)) { @@ -450,7 +450,7 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { break; } work->state = SELECT_STATE_CONFIRM; - *state = CHOOSE_STARTER_STATE_CONFIRM_MSG; + *state = CHOOSE_STARTER_STATE_CONFIRM_MSG; break; case CHOOSE_STARTER_STATE_BACK_OUT: if (!yRotateSelectedBall(work, BALL_Y_ANGLE_IN, BALL_Y_ANGLE_OUT)) { @@ -465,10 +465,10 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { { struct CameraTranslationPathTemplate template; - template.angleX = CAM_ANGLE_X_OUT; + template.angleX = CAM_ANGLE_X_OUT; template.perspectiveAngle = CAM_PERSP_OUT; - template.position = CAM_POSITION_OUT; - template.distance = CAM_DISTANCE_OUT; + template.position = CAM_POSITION_OUT; + template.distance = CAM_DISTANCE_OUT; SetCameraTranslationPath(work->cameraTranslation, &template, 8); } @@ -494,17 +494,17 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { if (cameraPathSel != CAMERA_PATH_NULL) { if (cameraPathSel == CAMERA_PATH_OUT) { - template.angleX = CAM_ANGLE_X_OUT; + template.angleX = CAM_ANGLE_X_OUT; template.perspectiveAngle = CAM_PERSP_OUT; - template.position = CAM_POSITION_OUT; - template.distance = CAM_DISTANCE_OUT; - work->ballWobbleState = BALL_ROCK_AMPLITUDE_BOTH; + template.position = CAM_POSITION_OUT; + template.distance = CAM_DISTANCE_OUT; + work->ballWobbleState = BALL_ROCK_AMPLITUDE_BOTH; } else { - template.angleX = CAM_ANGLE_X_IN; + template.angleX = CAM_ANGLE_X_IN; template.perspectiveAngle = CAM_PERSP_IN; - template.position = CAM_POSITION_IN; - template.distance = CAM_DISTANCE_IN; - work->ballWobbleState = BALL_ROCK_AMPLITUDE_SMALL; + template.position = CAM_POSITION_IN; + template.distance = CAM_DISTANCE_IN; + work->ballWobbleState = BALL_ROCK_AMPLITUDE_SMALL; } SetCameraTranslationPath(work->cameraTranslation, &template, 8); } @@ -537,7 +537,7 @@ BOOL ChooseStarter_Main(OVY_MANAGER *ovy, int *state) { BOOL ChooseStarter_Exit(OVY_MANAGER *ovy, int *state) { struct ChooseStarterAppWork *work = OverlayManager_GetData(ovy); - struct ChooseStarterArgs *args = OverlayManager_GetArgs(ovy); + struct ChooseStarterArgs *args = OverlayManager_GetArgs(ovy); TextFlags_SetCanABSpeedUpPrint(FALSE); TextFlags_SetAutoScrollParam(AUTO_SCROLL_OFF); @@ -765,11 +765,11 @@ static void initCameraPosition(struct ChooseStarterAppWork *work) { static void createObjResMans(struct ChooseStarterAppWork *work) { struct StarterChooseMonSpriteData *pMonSpriteData = &work->monSpriteData; - pMonSpriteData->spriteList = G2dRenderer_Init(3, &pMonSpriteData->g2dRender, work->heapId); - pMonSpriteData->charResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_CHAR, work->heapId); - pMonSpriteData->plttResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_PLTT, work->heapId); - pMonSpriteData->cellResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_CELL, work->heapId); - pMonSpriteData->animResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_ANIM, work->heapId); + pMonSpriteData->spriteList = G2dRenderer_Init(3, &pMonSpriteData->g2dRender, work->heapId); + pMonSpriteData->charResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_CHAR, work->heapId); + pMonSpriteData->plttResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_PLTT, work->heapId); + pMonSpriteData->cellResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_CELL, work->heapId); + pMonSpriteData->animResMan = Create2DGfxResObjMan(3, GF_GFX_RES_TYPE_ANIM, work->heapId); GfGfx_EngineBTogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); } @@ -793,11 +793,11 @@ static void initObjRenderers(struct ChooseStarterAppWork *work) { init3dModelRender(&work->_3dObjRender[i + CS_MODEL_BALL1], &work->_3dObjRes[CS_3DRES_BALLS]); } work->_3dObjRender[CS_MODEL_TT_BALL_EF].active = FALSE; - work->_3dObjRender[CS_MODEL_TURNTABLE].active = TRUE; - work->_3dObjRender[CS_MODEL_TABLETOP].active = TRUE; - work->_3dObjRender[CS_MODEL_BALL1].active = TRUE; - work->_3dObjRender[CS_MODEL_BALL2].active = TRUE; - work->_3dObjRender[CS_MODEL_BALL3].active = TRUE; + work->_3dObjRender[CS_MODEL_TURNTABLE].active = TRUE; + work->_3dObjRender[CS_MODEL_TABLETOP].active = TRUE; + work->_3dObjRender[CS_MODEL_BALL1].active = TRUE; + work->_3dObjRender[CS_MODEL_BALL2].active = TRUE; + work->_3dObjRender[CS_MODEL_BALL3].active = TRUE; loadAnmFromNarc(NARC_choose_starter_main_res_07_tt_turntable_NSBTA, work->heapId, &work->allocator, &work->_3dObjRes[CS_3DRES_TURNTABLE], &work->_3dObjAnm[CS_ANIM_TURNTABLE]); loadAnmFromNarc(NARC_choose_starter_main_res_06_ball_rock_NSBCA, work->heapId, &work->allocator, &work->_3dObjRes[CS_3DRES_BALLS], &work->_3dObjAnm[CS_ANIM_BALL1_ROCK]); loadAnmFromNarc(NARC_choose_starter_main_res_06_ball_rock_NSBCA, work->heapId, &work->allocator, &work->_3dObjRes[CS_3DRES_BALLS], &work->_3dObjAnm[CS_ANIM_BALL2_ROCK]); @@ -829,8 +829,8 @@ static void freeAll3dResHeader(struct ChooseStarterAppWork *work) { static void load3dModelResourceFromNarc(struct ChooseStarter3dRes *res, int fileId, HeapID heapId) { res->header = GfGfxLoader_LoadFromNarc(NARC_application_choose_starter_choose_starter_main_res, fileId, FALSE, heapId, FALSE); res->mdlSet = NNS_G3dGetMdlSet(res->header); - res->mdl = NNS_G3dGetMdlByIdx(res->mdlSet, 0); - res->tex = NNS_G3dGetTex(res->header); + res->mdl = NNS_G3dGetMdlByIdx(res->mdlSet, 0); + res->tex = NNS_G3dGetTex(res->header); GF3dRender_AllocAndLoadTexResources(res->tex); } @@ -842,7 +842,7 @@ static void init3dModelRender(struct ChooseStarterRnd *rnd, struct ChooseStarter static void loadAnmFromNarc(int fileId, HeapID heapId, NNSFndAllocator *allocator, struct ChooseStarter3dRes *res, struct ChooseStarterAnm *anm) { void *pAnm; anm->hdr = GfGfxLoader_LoadFromNarc(NARC_application_choose_starter_choose_starter_main_res, fileId, FALSE, heapId, FALSE); - pAnm = NNS_G3dGetAnmByIdx(anm->hdr, 0); + pAnm = NNS_G3dGetAnmByIdx(anm->hdr, 0); anm->obj = NNS_G3dAllocAnmObj(allocator, pAnm, res->mdl); NNS_G3dAnmObjInit(anm->obj, pAnm, res->mdl, res->tex); } @@ -856,7 +856,7 @@ static void removeAnmObjFromRenderObj(struct ChooseStarterRnd *rnd, struct Choos } static BOOL advance3dAnmFrameAndCheckFinished(struct ChooseStarterAnm *anm) { - BOOL ret = FALSE; + BOOL ret = FALSE; fx32 frame = anm->obj->frame + FX32_ONE; if (frame != NNS_G3dAnmObjGetNumFrame(anm->obj)) { @@ -933,7 +933,7 @@ static void initBallModelPositions(struct ChooseStarterAppWork *work) { int i; u16 trigIdx; u8 ballIdx = work->curSelection; - int angle = 0; + int angle = 0; for (i = 0; i < 3; i++) { trigIdx = angle / 3; // 0, 120, 240 degrees @@ -945,7 +945,7 @@ static void initBallModelPositions(struct ChooseStarterAppWork *work) { rendererScaleVecSet(&work->_3dObjRender[ballIdx + 3], FX32_ONE, FX32_ONE, FX32_ONE); work->_3dObjRender[ballIdx + CS_MODEL_BALL1].yRotAngle = trigIdx; work->_3dObjRender[ballIdx + CS_MODEL_BALL1].xRotAngle = 0; - ballIdx = (ballIdx + 1) % 3; + ballIdx = (ballIdx + 1) % 3; angle += 0x10000; // 360 degrees } } @@ -1008,7 +1008,7 @@ static void reinitBallModelPosInDirection(struct ChooseStarterAppWork *work, int } static void makeAndDrawWindows(struct ChooseStarterAppWork *work) { - work->winTop = AllocWindows(work->heapId, 1); + work->winTop = AllocWindows(work->heapId, 1); work->winBottom = AllocWindows(work->heapId, 1); AddWindowParameterized(work->bgConfig, work->winTop, 4, 2, 19, 27, 4, 2, 0x01F); AddWindowParameterized(work->bgConfig, work->winBottom, 1, 1, 19, 29, 4, 2, 0x01F); @@ -1084,7 +1084,7 @@ static int getInput(struct ChooseStarterAppWork *work) { } else { // This counts as the "nav" input. work->state = SELECT_STATE_INSPECT; - ret = CHOOSE_STARTER_INPUT_SELECT_BALL_INIT; + ret = CHOOSE_STARTER_INPUT_SELECT_BALL_INIT; } } else if (gSystem.newKeys & PAD_BUTTON_B) { // B button declines the selection @@ -1129,7 +1129,7 @@ static int getInput(struct ChooseStarterAppWork *work) { } else { if (num == work->curSelection) { work->state = SELECT_STATE_INSPECT; - ret = CHOOSE_STARTER_INPUT_SELECT_BALL_INIT; + ret = CHOOSE_STARTER_INPUT_SELECT_BALL_INIT; } else { ret = getRotateDirection(num, work->curSelection, work->ballWobbleState); } @@ -1202,8 +1202,8 @@ static void loadOneMonObj(GF_2DGfxResMan *charResMan, GF_2DGfxResMan *plttResMan sub_0200B00C(plttResObj); charProxy = sub_0200AF00(charResObj); plttProxy = GF_PlttResObj_GetPlttProxy(plttResObj, charProxy); - imageloc = NNS_G2dGetImageLocation(charProxy, NNS_G2D_VRAM_TYPE_2DSUB); - plttloc = NNS_G2dGetImagePaletteLocation(plttProxy, NNS_G2D_VRAM_TYPE_2DSUB); + imageloc = NNS_G2dGetImageLocation(charProxy, NNS_G2D_VRAM_TYPE_2DSUB); + plttloc = NNS_G2dGetImagePaletteLocation(plttProxy, NNS_G2D_VRAM_TYPE_2DSUB); DC_FlushRange(charData, 0xC80); GXS_LoadOBJ(charData, imageloc, 0xC80); DC_FlushRange(plttData, 0x20); @@ -1215,20 +1215,20 @@ static void createOneMonRender(struct StarterChooseMonSpriteData *pMonSpriteData struct SpriteTemplate template; CreateSpriteResourcesHeader(&header, idx, idx, idx, idx, -1, -1, FALSE, 0, pMonSpriteData->charResMan, pMonSpriteData->plttResMan, pMonSpriteData->cellResMan, pMonSpriteData->animResMan, NULL, NULL); - template.spriteList = pMonSpriteData->spriteList; - template.header = &header; - template.position.x = 0; - template.position.y = 0; - template.position.z = 0; - template.scale.x = FX32_ONE; - template.scale.y = FX32_ONE; - template.scale.z = FX32_ONE; - template.rotation = 0; - template.whichScreen = NNS_G2D_VRAM_TYPE_2DSUB; - template.priority = 0; - template.heapId = heapId; - template.position.x = 128 * FX32_ONE; - template.position.y = 288 * FX32_ONE; + template.spriteList = pMonSpriteData->spriteList; + template.header = &header; + template.position.x = 0; + template.position.y = 0; + template.position.z = 0; + template.scale.x = FX32_ONE; + template.scale.y = FX32_ONE; + template.scale.z = FX32_ONE; + template.rotation = 0; + template.whichScreen = NNS_G2D_VRAM_TYPE_2DSUB; + template.priority = 0; + template.heapId = heapId; + template.position.x = 128 * FX32_ONE; + template.position.y = 288 * FX32_ONE; pMonSpriteData->sprites[idx] = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(pMonSpriteData->sprites[idx], FALSE); Sprite_SetAnimCtrlSeq(pMonSpriteData->sprites[idx], 0); @@ -1255,7 +1255,7 @@ static BOOL yRotateSelectedBall(struct ChooseStarterAppWork *work, fx32 from, fx work->ballTransStep++; angle = calcBallTranslationArcStep(&from, &to, work->ballTransStep, CAM_MOVE_STEP_MAX); { - VecFx32 translVec = { 0, 14 * FX32_ONE, 32 * FX32_ONE }; + VecFx32 translVec = { 0, 14 * FX32_ONE, 32 * FX32_ONE }; VecFx32 subtrahend = { 0, 14 * FX32_ONE, 32 * FX32_ONE }; subtrahend.y += FX32_CONST(13.453); VEC_Subtract(&translVec, &subtrahend, &translVec); @@ -1277,10 +1277,10 @@ static u16 calcBallTranslationArcStep(const fx32 *from, const fx32 *to, int step u16 ret; int addend; if (*to >= *from) { - ret = *to - *from; + ret = *to - *from; addend = (ret * step) / max; } else { - ret = *from - *to; + ret = *from - *to; addend = -((ret * step) / max); } return *from + addend; diff --git a/src/communication_error.c b/src/communication_error.c index 74c8582408..82dc86ec9d 100644 --- a/src/communication_error.c +++ b/src/communication_error.c @@ -19,48 +19,48 @@ #include "unk_02037C94.h" static const GraphicsBanks sCommunicationErrorGraphicsBanks = { - .bg = GX_VRAM_BG_256_AB, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_NONE, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_NONE, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_NONE, + .bg = GX_VRAM_BG_256_AB, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_NONE, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_NONE, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_NONE, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE, + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE, }; static const struct GraphicsModes sCommunicationErrorGraphicsModes = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const BgTemplate sCommunicationErrorBgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x18000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x18000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const WindowTemplate sCommunicationErrorWindowTemplate = { - .bgId = GF_BG_LYR_MAIN_0, - .left = 3, - .top = 3, - .width = 26, - .height = 18, - .palette = 1, + .bgId = GF_BG_LYR_MAIN_0, + .left = 3, + .top = 3, + .width = 26, + .height = 18, + .palette = 1, .baseTile = 0x23, }; @@ -163,8 +163,8 @@ void ShowCommunicationError(HeapID heapId, u32 error, u32 errorCode) { BG_SetMaskColor(GF_BG_LYR_SUB_0, GX_RGB(1, 1, 27)); MsgData *errorMessageData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0041_bin, heapId); - String *errorMessageStr = String_New(384, heapId); - String *tmpStr = String_New(384, heapId); + String *errorMessageStr = String_New(384, heapId); + String *tmpStr = String_New(384, heapId); ResetAllTextPrinters(); MessageFormat *messageFormat = MessageFormat_New(heapId); diff --git a/src/credits/credits.c b/src/credits/credits.c index 4dbe2b42c4..0548c7d3c0 100644 --- a/src/credits/credits.c +++ b/src/credits/credits.c @@ -225,8 +225,8 @@ BOOL Credits_Init(OVY_MANAGER *man, int *state) { GX_SetVisiblePlane(0); GXS_SetVisiblePlane(0); SetGXBanks(); - work->args = OverlayManager_GetArgs(man); - work->skipCredits = FALSE; + work->args = OverlayManager_GetArgs(man); + work->skipCredits = FALSE; gSystem.screensFlipped = TRUE; GfGfx_SwapDisplay(); CreateOamAndObjResMgrs(work); @@ -243,7 +243,7 @@ BOOL Credits_Init(OVY_MANAGER *man, int *state) { InitBgLayers(work); InitSprites(work); work->pageWork.msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, 0x1b8, HEAP_ID_CREDITS); - work->pageWork.string = String_New(256, HEAP_ID_CREDITS); + work->pageWork.string = String_New(256, HEAP_ID_CREDITS); DisplayWindow(work); SetPageSysTasks(work); @@ -440,8 +440,8 @@ static void FreeBG(CreditsAppWork *work) { } static void LoadBgGraphics(CreditsAppWork *work) { - ScrnFileIds temp1 = ov76_021E6EE8; - ScrnFileIds temp2 = ov76_021E6F00; + ScrnFileIds temp1 = ov76_021E6EE8; + ScrnFileIds temp2 = ov76_021E6F00; BgConfig *bgConfig = work->bgConfig; GfGfxLoader_LoadCharData(NARC_a_2_6_3, 5, bgConfig, GF_BG_LYR_MAIN_3, 0, 0, TRUE, HEAP_ID_CREDITS); @@ -479,7 +479,7 @@ static void CreateOamAndObjResMgrs(CreditsAppWork *work) { OamManager_Create(0, 0x80, 0, 0x20, 0, 0x80, 0, 0x20, HEAP_ID_CREDITS); work->spriteList = G2dRenderer_Init(0x28, &work->g2dRender, HEAP_ID_CREDITS); - temp2 = ov76_021E6E88[3]; + temp2 = ov76_021E6E88[3]; u8 *ptr = (u8 *)&temp2; for (u8 i = GF_GFX_RES_TYPE_CHAR; i < GF_GFX_RES_TYPE_ANIM + 1; i++) { @@ -502,11 +502,11 @@ static void ov76_021E6170(CreditsAppWork *work) { work->gf2dGfxResObj[GF_GFX_RES_TYPE_PLTT] = AddPlttResObjFromNarc(work->gf2dGfxResMan[GF_GFX_RES_TYPE_PLTT], NARC_a_2_6_3, 0, FALSE, 1, NNS_G2D_VRAM_TYPE_2DBOTH, 7, HEAP_ID_CREDITS); work->gf2dGfxResObj[GF_GFX_RES_TYPE_CELL] = AddCellOrAnimResObjFromNarc(work->gf2dGfxResMan[GF_GFX_RES_TYPE_CELL], NARC_a_2_6_3, 2, TRUE, 1, GF_GFX_RES_TYPE_CELL, HEAP_ID_CREDITS); work->gf2dGfxResObj[GF_GFX_RES_TYPE_ANIM] = AddCellOrAnimResObjFromNarc(work->gf2dGfxResMan[GF_GFX_RES_TYPE_ANIM], NARC_a_2_6_3, 3, TRUE, 1, GF_GFX_RES_TYPE_ANIM, HEAP_ID_CREDITS); - work->cutsceneWork.narc = NARC_New(NARC_a_2_6_3, HEAP_ID_CREDITS); + work->cutsceneWork.narc = NARC_New(NARC_a_2_6_3, HEAP_ID_CREDITS); CutsceneWork *cutsceneWork = &work->cutsceneWork; - NARC **narc = &cutsceneWork->narc; - cutsceneWork->gender = work->args->gender; + NARC **narc = &cutsceneWork->narc; + cutsceneWork->gender = work->args->gender; for (u8 i = 0; i < UNIQUE_SPRITES_PER_CUTSCENE; i++) { work->cutsceneRsrs[i].charResObj = AddCharResObjFromOpenNarc(work->gf2dGfxResMan[GF_GFX_RES_TYPE_CHAR], *narc, 20, TRUE, i + 2, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_CREDITS); @@ -547,15 +547,15 @@ static void InitSprites(CreditsAppWork *work) { // Dancing Pokémon that start on top screen for (u8 i = 0; i < MONS_PER_SCREEN; i++) { if (i < MONS_PER_SCREEN / 2) { - yIdx = i; + yIdx = i; tmpl.position.x = 16 * FX32_ONE; } else { - yIdx = i - 3; + yIdx = i - 3; tmpl.position.x = 240 * FX32_ONE; } tmpl.position.y = (yIdx * 80 + 16) * FX32_ONE; - tmpl.priority = 1; + tmpl.priority = 1; ptr->pokemon[i] = Sprite_CreateAffine(&tmpl); GF_ASSERT(ptr->pokemon[i] != NULL); Sprite_SetAnimActiveFlag(ptr->pokemon[i], TRUE); @@ -573,22 +573,22 @@ static void InitSprites(CreditsAppWork *work) { // Dancing Pokémon that start on bottom screen for (u8 i = 0; i < MONS_PER_SCREEN; i++) { if (i < MONS_PER_SCREEN / 2) { - yIdx = i; + yIdx = i; tmpl.position.x = 16 * FX32_ONE; ; } else { - yIdx = i - 3; + yIdx = i - 3; tmpl.position.x = 240 * FX32_ONE; } - tmpl.position.y = (yIdx * 80 + 272) * FX32_ONE; - tmpl.priority = 1; - u8 idx = i + MONS_PER_SCREEN; + tmpl.position.y = (yIdx * 80 + 272) * FX32_ONE; + tmpl.priority = 1; + u8 idx = i + MONS_PER_SCREEN; ptr->pokemon[idx] = Sprite_CreateAffine(&tmpl); Sprite_SetAnimActiveFlag(ptr->pokemon[idx], TRUE); Sprite_SetVisibleFlag(ptr->pokemon[idx], TRUE); Sprite_SetAnimCtrlSeq(ptr->pokemon[idx], 6); - tmpl.priority = 0; + tmpl.priority = 0; ptr->cloud[idx] = Sprite_CreateAffine(&tmpl); Sprite_SetAnimActiveFlag(ptr->cloud[idx], TRUE); Sprite_SetVisibleFlag(ptr->cloud[idx], FALSE); @@ -604,50 +604,50 @@ static void InitDancingSpriteResources(int idx, CreditsAppWork *work, int sprtRe CreateSpriteResourcesHeader( header, idx, idx, idx, idx, -1, -1, FALSE, sprtResPriority, work->gf2dGfxResMan[GF_GFX_RES_TYPE_CHAR], work->gf2dGfxResMan[GF_GFX_RES_TYPE_PLTT], work->gf2dGfxResMan[GF_GFX_RES_TYPE_CELL], work->gf2dGfxResMan[GF_GFX_RES_TYPE_ANIM], NULL, NULL); - tmpl->spriteList = work->spriteList; - tmpl->header = header; - tmpl->position.x = 0; - tmpl->position.y = 0; - tmpl->position.z = 0; - tmpl->scale.x = FX32_ONE; - tmpl->scale.y = FX32_ONE; - tmpl->scale.z = FX32_ONE; - tmpl->rotation = 0; - tmpl->priority = 0; + tmpl->spriteList = work->spriteList; + tmpl->header = header; + tmpl->position.x = 0; + tmpl->position.y = 0; + tmpl->position.z = 0; + tmpl->scale.x = FX32_ONE; + tmpl->scale.y = FX32_ONE; + tmpl->scale.z = FX32_ONE; + tmpl->rotation = 0; + tmpl->priority = 0; tmpl->whichScreen = whichScreen; - tmpl->heapId = HEAP_ID_CREDITS; + tmpl->heapId = HEAP_ID_CREDITS; } static void InitCutsceneSpriteResources(u8 idx, CreditsAppWork *work, u8 sprtResPriority, NNS_G2D_VRAM_TYPE whichScreen, SpriteTemplate *tmpl, SpriteResourcesHeader *header) { CutsceneSpriteGfx *ptr = &work->cutsceneWork.spriteGfx[idx]; - header->charData = NULL; - header->plttProxy = ptr->plttProxy; - header->imageProxy = ptr->imageProxy; - header->cellData = ptr->cellDataBank; - header->cellAnim = ptr->animDataBank; + header->charData = NULL; + header->plttProxy = ptr->plttProxy; + header->imageProxy = ptr->imageProxy; + header->cellData = ptr->cellDataBank; + header->cellAnim = ptr->animDataBank; header->multiCellData = NULL; header->multiCellAnim = NULL; - header->flag = 0; - header->priority = sprtResPriority; - - tmpl->spriteList = work->spriteList; - tmpl->header = header; - tmpl->position.x = 0; - tmpl->position.y = 0; - tmpl->position.z = 0; - tmpl->scale.x = FX32_ONE; - tmpl->scale.y = FX32_ONE; - tmpl->scale.z = FX32_ONE; - tmpl->rotation = 0; - tmpl->priority = 0; + header->flag = 0; + header->priority = sprtResPriority; + + tmpl->spriteList = work->spriteList; + tmpl->header = header; + tmpl->position.x = 0; + tmpl->position.y = 0; + tmpl->position.z = 0; + tmpl->scale.x = FX32_ONE; + tmpl->scale.y = FX32_ONE; + tmpl->scale.z = FX32_ONE; + tmpl->rotation = 0; + tmpl->priority = 0; tmpl->whichScreen = whichScreen; - tmpl->heapId = HEAP_ID_CREDITS; + tmpl->heapId = HEAP_ID_CREDITS; } static void SetPageSysTasks(CreditsAppWork *work) { - PageWork *ptr = &work->pageWork; - ptr->pageDisplayWork.sysTask = SysTask_CreateOnVBlankQueue(TogglePageDisplayCB, &ptr->pageDisplayWork, 0); + PageWork *ptr = &work->pageWork; + ptr->pageDisplayWork.sysTask = SysTask_CreateOnVBlankQueue(TogglePageDisplayCB, &ptr->pageDisplayWork, 0); work->pageWork.scrFlipWork.sysTask = SysTask_CreateOnVBlankQueue(FlipScreensCB, &work->pageWork.scrFlipWork, 1); } @@ -665,8 +665,8 @@ static void HandlePageDisplay(CreditsAppWork *work) { PageWork *ptr; PageDisplayWork *ptr18; - ptr = &work->pageWork; - ptr18 = &ptr->pageDisplayWork; + ptr = &work->pageWork; + ptr18 = &ptr->pageDisplayWork; newPageFrame = FALSE; if (ptr->pageState.page < NUM_CREDIT_PAGES) { @@ -708,7 +708,7 @@ static void HandlePageDisplay(CreditsAppWork *work) { } static void HandleSceneTransition(CreditsAppWork *work) { - SceneWork *ptr = &work->sceneWork; + SceneWork *ptr = &work->sceneWork; BOOL transitionFrame = FALSE; if (ptr->transition.sceneIdx >= NUM_SCENES - 1) { @@ -736,7 +736,7 @@ static void HandleSceneTransition(CreditsAppWork *work) { // After 1 frame, switch out the background and dancing Pokémon if (++ptr->transition.timer >= 1) { ptr->transition.sceneIdxDup = (ptr->transition.sceneIdxDup + 1) % NUM_SCENES; - u8 idx = ptr->transition.sceneIdxDup; + u8 idx = ptr->transition.sceneIdxDup; for (u8 i = 0; i < TOTAL_DANCING_MONS; i++) { Sprite_SetAnimCtrlSeq(ptr->pokemon[i], sPokemonSpriteSeqNos[idx]); } @@ -813,7 +813,7 @@ static void ActivateSprite(Sprite *sprite) { // Marks the scene transition for the SysTask callback. static void ov76_021E68C8(CreditsAppWork *work) { - ScreenFlipWork *ptr = &work->pageWork.scrFlipWork; + ScreenFlipWork *ptr = &work->pageWork.scrFlipWork; ptr->transitionFrame = TRUE; ptr->count++; } @@ -844,10 +844,10 @@ static void ov76_021E6944(PageDisplayWork *pageDisplay, BgConfig *bgConfig, BOOL G2S_SetWnd0InsidePlane(30, TRUE); G2S_SetWnd1InsidePlane(30, TRUE); G2S_SetWndOutsidePlane(28, TRUE); - pageDisplay->unk0 = 0; + pageDisplay->unk0 = 0; pageDisplay->rendering = TRUE; - pageDisplay->hidden = hidden; - pageDisplay->bgConfig = bgConfig; + pageDisplay->hidden = hidden; + pageDisplay->bgConfig = bgConfig; GfGfx_EngineBTogglePlanes(GX_PLANEMASK_BG1, GF_PLANE_TOGGLE_ON); } @@ -869,9 +869,9 @@ static void TogglePageDisplayCB(SysTask *task, void *taskData) { pageDisplay->unk0++; if (pageDisplay->hidden == FALSE) { temp2 = 0xff; - temp = (1 - pageDisplay->unk0) * temp2; + temp = (1 - pageDisplay->unk0) * temp2; } else { - temp = 0; + temp = 0; temp2 = (1 - pageDisplay->unk0) * 0xff; } @@ -911,8 +911,8 @@ static void LoadPage(PageWork *ptr) { if (cur_lines_page == nextPage) { do { int msgno = sCreditMsgLines[ptr->pageState.line].msgno; - u8 xPos = sCreditMsgLines[ptr->pageState.line].x; - u8 yPos = sCreditMsgLines[ptr->pageState.line].y; + u8 xPos = sCreditMsgLines[ptr->pageState.line].x; + u8 yPos = sCreditMsgLines[ptr->pageState.line].y; ReadMsgDataIntoString(ptr->msgData, msgno, ptr->string); AddTextPrinterParameterizedWithColor(&ptr->window, 0, ptr->string, xPos, yPos, TEXT_SPEED_NOTRANSFER, MAKE_TEXT_COLOR(1, 2, 0), NULL); if (++ptr->pageState.line >= NELEMS(sCreditMsgLines)) { @@ -927,13 +927,13 @@ static void LoadPage(PageWork *ptr) { static void LoadCutsceneSpriteResources(CreditsAppWork *work) { CutsceneWork *cutsceneWork = &work->cutsceneWork; for (u8 i = 0; i < UNIQUE_SPRITES_PER_CUTSCENE; i++) { - GF_2DGfxResObj *charResObj = work->cutsceneRsrs[i].charResObj; - GF_2DGfxResObj *plttResObj = work->cutsceneRsrs[i].plttResObj; - NNSG2dImageProxy *imageProxy = sub_0200AF00(charResObj); + GF_2DGfxResObj *charResObj = work->cutsceneRsrs[i].charResObj; + GF_2DGfxResObj *plttResObj = work->cutsceneRsrs[i].plttResObj; + NNSG2dImageProxy *imageProxy = sub_0200AF00(charResObj); NNSG2dImagePaletteProxy *plttProxy = GF_PlttResObj_GetPlttProxy(plttResObj, imageProxy); cutsceneWork->spriteGfx[i].imageProxy = imageProxy; - cutsceneWork->spriteGfx[i].plttProxy = plttProxy; + cutsceneWork->spriteGfx[i].plttProxy = plttProxy; cutsceneWork->spriteGfx[i].charOffset = NNS_G2dGetImageLocation(imageProxy, NNS_G2D_VRAM_TYPE_2DMAIN); cutsceneWork->spriteGfx[i].plttOffset = NNS_G2dGetImagePaletteLocation(plttProxy, NNS_G2D_VRAM_TYPE_2DMAIN); } @@ -997,18 +997,18 @@ static void CreateCutsceneSprite(CreditsAppWork *work, const CutsceneSpriteParam SpriteTemplate tmpl; InitCutsceneSpriteResources(spriteParam->spriteIdx, work, 3, NNS_G2D_VRAM_TYPE_2DMAIN, &tmpl, &header); - CutsceneSprites *sprites = &work->cutsceneWork.sprites; - int idx = sprites->count; + CutsceneSprites *sprites = &work->cutsceneWork.sprites; + int idx = sprites->count; CutsceneSprite *cutsceneSprite = &sprites->sprite[idx]; - cutsceneSprite->unk0 = 1; - cutsceneSprite->unk2 = spriteParam->unk0; + cutsceneSprite->unk0 = 1; + cutsceneSprite->unk2 = spriteParam->unk0; // Render on non-primary display screen tmpl.position.x = spriteParam->xPos * FX32_ONE; tmpl.position.y = (spriteParam->yPos + 256) * FX32_ONE; - tmpl.priority = 1; + tmpl.priority = 1; - Sprite *sprite = Sprite_CreateAffine(&tmpl); + Sprite *sprite = Sprite_CreateAffine(&tmpl); cutsceneSprite->sprite = sprite; GF_ASSERT(sprite != NULL); @@ -1022,7 +1022,7 @@ static void CreateCutsceneSprite(CreditsAppWork *work, const CutsceneSpriteParam // Initialize sprites for the current cutscene. static void InitCutsceneSprites(CreditsAppWork *work) { CutsceneWork *cutsceneWork = &work->cutsceneWork; - u8 idx = cutsceneWork->cutsceneIdx; + u8 idx = cutsceneWork->cutsceneIdx; if (idx >= 16) { return; @@ -1049,7 +1049,7 @@ static void InitCutsceneSprites(CreditsAppWork *work) { static void FreeCutsceneSprites(CreditsAppWork *work) { u8 i; CutsceneWork *cutsceneWork = &work->cutsceneWork; - CutsceneSprites *sprites = &cutsceneWork->sprites; + CutsceneSprites *sprites = &cutsceneWork->sprites; for (i = 0; i < 16; i++) { if (sprites->sprite[i].unk0 != 0) { diff --git a/src/data/map_headers.h b/src/data/map_headers.h index 64861b2bab..b462268bc1 100644 --- a/src/data/map_headers.h +++ b/src/data/map_headers.h @@ -15,16202 +15,16202 @@ static const MAP_HEADER sMapHeaders[] = { [MAP_EVERYWHERE] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 0, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_DUMMY, - .night_music_id = SEQ_DUMMY, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 6, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_FOREST, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 0, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_DUMMY, + .night_music_id = SEQ_DUMMY, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 6, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_FOREST, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_NOTHING] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 0, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_DUMMY, - .night_music_id = SEQ_DUMMY, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 6, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 0, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_FOREST, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 0, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_DUMMY, + .night_music_id = SEQ_DUMMY, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 6, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 0, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_FOREST, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_UNION] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0074_UNION_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0957_UNION_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0726_UNION_hdr_bin, - .msg_bank = NARC_msg_msg_0738_UNION_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_001_UNION_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 6, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0074_UNION_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0957_UNION_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0726_UNION_hdr_bin, + .msg_bank = NARC_msg_msg_0738_UNION_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_001_UNION_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 6, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_UG] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 0, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 6, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 6, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_FOREST, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 0, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 6, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 6, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_FOREST, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_DIRECT2] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0075_DIRECT2_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0137_DIRECT2_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0397_DIRECT2_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_002_DIRECT2_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 6, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0075_DIRECT2_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0137_DIRECT2_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0397_DIRECT2_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_002_DIRECT2_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 6, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_DIRECT4] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0076_DIRECT4_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0138_DIRECT4_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0398_DIRECT4_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_003_DIRECT4_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 6, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0076_DIRECT4_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0138_DIRECT4_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0398_DIRECT4_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_003_DIRECT4_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 6, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D17R1101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 88, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0067_D17R1101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0022_D17R1101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0283_D17R1101_hdr_bin, - .msg_bank = NARC_msg_msg_0059_D17R1101_bin, - .day_music_id = SEQ_SILENCE_FIELD, - .night_music_id = SEQ_SILENCE_FIELD, - .events_bank = NARC_zone_event_004_D17R1101_bin, - .mapsec = MAPSEC_BELLCHIME_TRAIL, - .area_icon = 1, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 88, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0067_D17R1101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0022_D17R1101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0283_D17R1101_hdr_bin, + .msg_bank = NARC_msg_msg_0059_D17R1101_bin, + .day_music_id = SEQ_SILENCE_FIELD, + .night_music_id = SEQ_SILENCE_FIELD, + .events_bank = NARC_zone_event_004_D17R1101_bin, + .mapsec = MAPSEC_BELLCHIME_TRAIL, + .area_icon = 1, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D18R0101] = { .wild_encounter_bank = ENCDATA_D18R0101, - .area_data_bank = 78, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0025_D18R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0023_D18R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0284_D18R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0060_D18R0101_bin, - .day_music_id = SEQ_GS_TO_YAKETA, - .night_music_id = SEQ_GS_TO_YAKETA, - .events_bank = NARC_zone_event_005_D18R0101_bin, - .mapsec = MAPSEC_BURNED_TOWER, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 78, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0025_D18R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0023_D18R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0284_D18R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0060_D18R0101_bin, + .day_music_id = SEQ_GS_TO_YAKETA, + .night_music_id = SEQ_GS_TO_YAKETA, + .events_bank = NARC_zone_event_005_D18R0101_bin, + .mapsec = MAPSEC_BURNED_TOWER, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 3, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 3, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 3, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 3, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R01] = { .wild_encounter_bank = ENCDATA_R01, - .area_data_bank = 18, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0168_R01_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0413_R01_hdr_bin, - .msg_bank = NARC_msg_msg_0319_R01_bin, - .day_music_id = SEQ_GS_R_17_01, - .night_music_id = SEQ_GS_R_17_01, - .events_bank = NARC_zone_event_006_R01_bin, - .mapsec = MAPSEC_ROUTE_1, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 18, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0168_R01_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0413_R01_hdr_bin, + .msg_bank = NARC_msg_msg_0319_R01_bin, + .day_music_id = SEQ_GS_R_17_01, + .night_music_id = SEQ_GS_R_17_01, + .events_bank = NARC_zone_event_006_R01_bin, + .mapsec = MAPSEC_ROUTE_1, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R02] = { .wild_encounter_bank = ENCDATA_R02, - .area_data_bank = 10, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0169_R02_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0414_R02_hdr_bin, - .msg_bank = NARC_msg_msg_0320_R02_bin, - .day_music_id = SEQ_GS_R_9_03, - .night_music_id = SEQ_GS_R_9_03, - .events_bank = NARC_zone_event_007_R02_bin, - .mapsec = MAPSEC_ROUTE_2, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 10, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0169_R02_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0414_R02_hdr_bin, + .msg_bank = NARC_msg_msg_0320_R02_bin, + .day_music_id = SEQ_GS_R_9_03, + .night_music_id = SEQ_GS_R_9_03, + .events_bank = NARC_zone_event_007_R02_bin, + .mapsec = MAPSEC_ROUTE_2, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R03] = { .wild_encounter_bank = ENCDATA_R03, - .area_data_bank = 17, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0175_R03_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0420_R03_hdr_bin, - .msg_bank = NARC_msg_msg_0326_R03_bin, - .day_music_id = SEQ_GS_R_16_03, - .night_music_id = SEQ_GS_R_16_03, - .events_bank = NARC_zone_event_008_R03_bin, - .mapsec = MAPSEC_ROUTE_3, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 17, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0175_R03_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0420_R03_hdr_bin, + .msg_bank = NARC_msg_msg_0326_R03_bin, + .day_music_id = SEQ_GS_R_16_03, + .night_music_id = SEQ_GS_R_16_03, + .events_bank = NARC_zone_event_008_R03_bin, + .mapsec = MAPSEC_ROUTE_3, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R04] = { .wild_encounter_bank = ENCDATA_R04, - .area_data_bank = 13, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0178_R04_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0423_R04_hdr_bin, - .msg_bank = NARC_msg_msg_0328_R04_bin, - .day_music_id = SEQ_GS_R_12_03, - .night_music_id = SEQ_GS_R_12_03, - .events_bank = NARC_zone_event_009_R04_bin, - .mapsec = MAPSEC_ROUTE_4, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 13, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0178_R04_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0423_R04_hdr_bin, + .msg_bank = NARC_msg_msg_0328_R04_bin, + .day_music_id = SEQ_GS_R_12_03, + .night_music_id = SEQ_GS_R_12_03, + .events_bank = NARC_zone_event_009_R04_bin, + .mapsec = MAPSEC_ROUTE_4, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R05] = { .wild_encounter_bank = ENCDATA_R05, - .area_data_bank = 13, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0179_R05_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0424_R05_hdr_bin, - .msg_bank = NARC_msg_msg_0329_R05_bin, - .day_music_id = SEQ_GS_R_12_03, - .night_music_id = SEQ_GS_R_12_03, - .events_bank = NARC_zone_event_010_R05_bin, - .mapsec = MAPSEC_ROUTE_5, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 13, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0179_R05_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0424_R05_hdr_bin, + .msg_bank = NARC_msg_msg_0329_R05_bin, + .day_music_id = SEQ_GS_R_12_03, + .night_music_id = SEQ_GS_R_12_03, + .events_bank = NARC_zone_event_010_R05_bin, + .mapsec = MAPSEC_ROUTE_5, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R06] = { .wild_encounter_bank = ENCDATA_R06, - .area_data_bank = 11, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0184_R06_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0429_R06_hdr_bin, - .msg_bank = NARC_msg_msg_0334_R06_bin, - .day_music_id = SEQ_GS_R_10_03, - .night_music_id = SEQ_GS_R_10_03, - .events_bank = NARC_zone_event_011_R06_bin, - .mapsec = MAPSEC_ROUTE_6, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 11, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0184_R06_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0429_R06_hdr_bin, + .msg_bank = NARC_msg_msg_0334_R06_bin, + .day_music_id = SEQ_GS_R_10_03, + .night_music_id = SEQ_GS_R_10_03, + .events_bank = NARC_zone_event_011_R06_bin, + .mapsec = MAPSEC_ROUTE_6, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R07] = { .wild_encounter_bank = ENCDATA_R07, - .area_data_bank = 15, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0186_R07_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0431_R07_hdr_bin, - .msg_bank = NARC_msg_msg_0336_R07_bin, - .day_music_id = SEQ_GS_R_14_03, - .night_music_id = SEQ_GS_R_14_03, - .events_bank = NARC_zone_event_012_R07_bin, - .mapsec = MAPSEC_ROUTE_7, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 15, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0186_R07_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0431_R07_hdr_bin, + .msg_bank = NARC_msg_msg_0336_R07_bin, + .day_music_id = SEQ_GS_R_14_03, + .night_music_id = SEQ_GS_R_14_03, + .events_bank = NARC_zone_event_012_R07_bin, + .mapsec = MAPSEC_ROUTE_7, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R08] = { .wild_encounter_bank = ENCDATA_R08, - .area_data_bank = 14, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0188_R08_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0433_R08_hdr_bin, - .msg_bank = NARC_msg_msg_0338_R08_bin, - .day_music_id = SEQ_GS_R_13_03, - .night_music_id = SEQ_GS_R_13_03, - .events_bank = NARC_zone_event_013_R08_bin, - .mapsec = MAPSEC_ROUTE_8, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 14, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0188_R08_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0433_R08_hdr_bin, + .msg_bank = NARC_msg_msg_0338_R08_bin, + .day_music_id = SEQ_GS_R_13_03, + .night_music_id = SEQ_GS_R_13_03, + .events_bank = NARC_zone_event_013_R08_bin, + .mapsec = MAPSEC_ROUTE_8, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R09] = { .wild_encounter_bank = ENCDATA_R09, - .area_data_bank = 13, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0190_R09_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0435_R09_hdr_bin, - .msg_bank = NARC_msg_msg_0340_R09_bin, - .day_music_id = SEQ_GS_R_12_03, - .night_music_id = SEQ_GS_R_12_03, - .events_bank = NARC_zone_event_014_R09_bin, - .mapsec = MAPSEC_ROUTE_9, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 13, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0190_R09_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0435_R09_hdr_bin, + .msg_bank = NARC_msg_msg_0340_R09_bin, + .day_music_id = SEQ_GS_R_12_03, + .night_music_id = SEQ_GS_R_12_03, + .events_bank = NARC_zone_event_014_R09_bin, + .mapsec = MAPSEC_ROUTE_9, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R10] = { .wild_encounter_bank = ENCDATA_R10, - .area_data_bank = 13, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0191_R10_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0436_R10_hdr_bin, - .msg_bank = NARC_msg_msg_0341_R10_bin, - .day_music_id = SEQ_GS_R_12_03, - .night_music_id = SEQ_GS_R_12_03, - .events_bank = NARC_zone_event_015_R10_bin, - .mapsec = MAPSEC_ROUTE_10, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 13, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0191_R10_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0436_R10_hdr_bin, + .msg_bank = NARC_msg_msg_0341_R10_bin, + .day_music_id = SEQ_GS_R_12_03, + .night_music_id = SEQ_GS_R_12_03, + .events_bank = NARC_zone_event_015_R10_bin, + .mapsec = MAPSEC_ROUTE_10, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R11] = { .wild_encounter_bank = ENCDATA_R11, - .area_data_bank = 11, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0197_R11_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0442_R11_hdr_bin, - .msg_bank = NARC_msg_msg_0346_R11_bin, - .day_music_id = SEQ_GS_R_10_11, - .night_music_id = SEQ_GS_R_10_11, - .events_bank = NARC_zone_event_016_R11_bin, - .mapsec = MAPSEC_ROUTE_11, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 11, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0197_R11_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0442_R11_hdr_bin, + .msg_bank = NARC_msg_msg_0346_R11_bin, + .day_music_id = SEQ_GS_R_10_11, + .night_music_id = SEQ_GS_R_10_11, + .events_bank = NARC_zone_event_016_R11_bin, + .mapsec = MAPSEC_ROUTE_11, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R12] = { .wild_encounter_bank = ENCDATA_R12, - .area_data_bank = 14, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0199_R12_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0444_R12_hdr_bin, - .msg_bank = NARC_msg_msg_0348_R12_bin, - .day_music_id = SEQ_GS_R_13_11, - .night_music_id = SEQ_GS_R_13_11, - .events_bank = NARC_zone_event_017_R12_bin, - .mapsec = MAPSEC_ROUTE_12, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 14, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0199_R12_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0444_R12_hdr_bin, + .msg_bank = NARC_msg_msg_0348_R12_bin, + .day_music_id = SEQ_GS_R_13_11, + .night_music_id = SEQ_GS_R_13_11, + .events_bank = NARC_zone_event_017_R12_bin, + .mapsec = MAPSEC_ROUTE_12, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R13] = { .wild_encounter_bank = ENCDATA_R13, - .area_data_bank = 14, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0201_R13_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0446_R13_hdr_bin, - .msg_bank = NARC_msg_msg_0350_R13_bin, - .day_music_id = SEQ_GS_R_13_11, - .night_music_id = SEQ_GS_R_13_11, - .events_bank = NARC_zone_event_018_R13_bin, - .mapsec = MAPSEC_ROUTE_13, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 14, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0201_R13_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0446_R13_hdr_bin, + .msg_bank = NARC_msg_msg_0350_R13_bin, + .day_music_id = SEQ_GS_R_13_11, + .night_music_id = SEQ_GS_R_13_11, + .events_bank = NARC_zone_event_018_R13_bin, + .mapsec = MAPSEC_ROUTE_13, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R14] = { .wild_encounter_bank = ENCDATA_R14, - .area_data_bank = 14, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0202_R14_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0447_R14_hdr_bin, - .msg_bank = NARC_msg_msg_0351_R14_bin, - .day_music_id = SEQ_GS_R_13_11, - .night_music_id = SEQ_GS_R_13_11, - .events_bank = NARC_zone_event_019_R14_bin, - .mapsec = MAPSEC_ROUTE_14, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 14, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0202_R14_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0447_R14_hdr_bin, + .msg_bank = NARC_msg_msg_0351_R14_bin, + .day_music_id = SEQ_GS_R_13_11, + .night_music_id = SEQ_GS_R_13_11, + .events_bank = NARC_zone_event_019_R14_bin, + .mapsec = MAPSEC_ROUTE_14, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R15] = { .wild_encounter_bank = ENCDATA_R15, - .area_data_bank = 14, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0203_R15_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0448_R15_hdr_bin, - .msg_bank = NARC_msg_msg_0352_R15_bin, - .day_music_id = SEQ_GS_R_13_11, - .night_music_id = SEQ_GS_R_13_11, - .events_bank = NARC_zone_event_020_R15_bin, - .mapsec = MAPSEC_ROUTE_15, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 14, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0203_R15_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0448_R15_hdr_bin, + .msg_bank = NARC_msg_msg_0352_R15_bin, + .day_music_id = SEQ_GS_R_13_11, + .night_music_id = SEQ_GS_R_13_11, + .events_bank = NARC_zone_event_020_R15_bin, + .mapsec = MAPSEC_ROUTE_15, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R16] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 16, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0205_R16_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0450_R16_hdr_bin, - .msg_bank = NARC_msg_msg_0354_R16_bin, - .day_music_id = SEQ_GS_R_15_03, - .night_music_id = SEQ_GS_R_15_03, - .events_bank = NARC_zone_event_021_R16_bin, - .mapsec = MAPSEC_ROUTE_16, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 16, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0205_R16_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0450_R16_hdr_bin, + .msg_bank = NARC_msg_msg_0354_R16_bin, + .day_music_id = SEQ_GS_R_15_03, + .night_music_id = SEQ_GS_R_15_03, + .events_bank = NARC_zone_event_021_R16_bin, + .mapsec = MAPSEC_ROUTE_16, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R17] = { .wild_encounter_bank = ENCDATA_R17, - .area_data_bank = 16, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0209_R17_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0454_R17_hdr_bin, - .msg_bank = NARC_msg_msg_0357_R17_bin, - .day_music_id = SEQ_PL_BICYCLE, - .night_music_id = SEQ_PL_BICYCLE, - .events_bank = NARC_zone_event_022_R17_bin, - .mapsec = MAPSEC_ROUTE_17, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 16, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0209_R17_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0454_R17_hdr_bin, + .msg_bank = NARC_msg_msg_0357_R17_bin, + .day_music_id = SEQ_PL_BICYCLE, + .night_music_id = SEQ_PL_BICYCLE, + .events_bank = NARC_zone_event_022_R17_bin, + .mapsec = MAPSEC_ROUTE_17, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R18] = { .wild_encounter_bank = ENCDATA_R18, - .area_data_bank = 16, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0210_R18_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0455_R18_hdr_bin, - .msg_bank = NARC_msg_msg_0358_R18_bin, - .day_music_id = SEQ_GS_R_15_03, - .night_music_id = SEQ_GS_R_15_03, - .events_bank = NARC_zone_event_023_R18_bin, - .mapsec = MAPSEC_ROUTE_18, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 16, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0210_R18_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0455_R18_hdr_bin, + .msg_bank = NARC_msg_msg_0358_R18_bin, + .day_music_id = SEQ_GS_R_15_03, + .night_music_id = SEQ_GS_R_15_03, + .events_bank = NARC_zone_event_023_R18_bin, + .mapsec = MAPSEC_ROUTE_18, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R22] = { .wild_encounter_bank = ENCDATA_R22, - .area_data_bank = 10, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0212_R22_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0457_R22_hdr_bin, - .msg_bank = NARC_msg_msg_0360_R22_bin, - .day_music_id = SEQ_GS_R_9_03, - .night_music_id = SEQ_GS_R_9_03, - .events_bank = NARC_zone_event_024_R22_bin, - .mapsec = MAPSEC_ROUTE_22, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 10, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0212_R22_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0457_R22_hdr_bin, + .msg_bank = NARC_msg_msg_0360_R22_bin, + .day_music_id = SEQ_GS_R_9_03, + .night_music_id = SEQ_GS_R_9_03, + .events_bank = NARC_zone_event_024_R22_bin, + .mapsec = MAPSEC_ROUTE_22, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R24] = { .wild_encounter_bank = ENCDATA_R24, - .area_data_bank = 13, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0215_R24_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0460_R24_hdr_bin, - .msg_bank = NARC_msg_msg_0362_R24_bin, - .day_music_id = SEQ_GS_R_12_24, - .night_music_id = SEQ_GS_R_12_24, - .events_bank = NARC_zone_event_025_R24_bin, - .mapsec = MAPSEC_ROUTE_24, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 13, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0215_R24_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0460_R24_hdr_bin, + .msg_bank = NARC_msg_msg_0362_R24_bin, + .day_music_id = SEQ_GS_R_12_24, + .night_music_id = SEQ_GS_R_12_24, + .events_bank = NARC_zone_event_025_R24_bin, + .mapsec = MAPSEC_ROUTE_24, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R25] = { .wild_encounter_bank = ENCDATA_R25, - .area_data_bank = 13, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0216_R25_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0461_R25_hdr_bin, - .msg_bank = NARC_msg_msg_0363_R25_bin, - .day_music_id = SEQ_GS_R_12_24, - .night_music_id = SEQ_GS_R_12_24, - .events_bank = NARC_zone_event_026_R25_bin, - .mapsec = MAPSEC_ROUTE_25, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 13, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0216_R25_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0461_R25_hdr_bin, + .msg_bank = NARC_msg_msg_0363_R25_bin, + .day_music_id = SEQ_GS_R_12_24, + .night_music_id = SEQ_GS_R_12_24, + .events_bank = NARC_zone_event_026_R25_bin, + .mapsec = MAPSEC_ROUTE_25, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R26] = { .wild_encounter_bank = ENCDATA_R26, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0218_R26_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0463_R26_hdr_bin, - .msg_bank = NARC_msg_msg_0365_R26_bin, - .day_music_id = SEQ_GS_R_1_26, - .night_music_id = SEQ_GS_R_1_26, - .events_bank = NARC_zone_event_027_R26_bin, - .mapsec = MAPSEC_ROUTE_26, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0218_R26_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0463_R26_hdr_bin, + .msg_bank = NARC_msg_msg_0365_R26_bin, + .day_music_id = SEQ_GS_R_1_26, + .night_music_id = SEQ_GS_R_1_26, + .events_bank = NARC_zone_event_027_R26_bin, + .mapsec = MAPSEC_ROUTE_26, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R27] = { .wild_encounter_bank = ENCDATA_R27, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0221_R27_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0466_R27_hdr_bin, - .msg_bank = NARC_msg_msg_0369_R27_bin, - .day_music_id = SEQ_GS_R_1_26, - .night_music_id = SEQ_GS_R_1_26, - .events_bank = NARC_zone_event_028_R27_bin, - .mapsec = MAPSEC_ROUTE_27, - .area_icon = 3, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0221_R27_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0466_R27_hdr_bin, + .msg_bank = NARC_msg_msg_0369_R27_bin, + .day_music_id = SEQ_GS_R_1_26, + .night_music_id = SEQ_GS_R_1_26, + .events_bank = NARC_zone_event_028_R27_bin, + .mapsec = MAPSEC_ROUTE_27, + .area_icon = 3, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R28] = { .wild_encounter_bank = ENCDATA_R28, - .area_data_bank = 10, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0223_R28_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0468_R28_hdr_bin, - .msg_bank = NARC_msg_msg_0371_R28_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_029_R28_bin, - .mapsec = MAPSEC_ROUTE_28, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 10, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0223_R28_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0468_R28_hdr_bin, + .msg_bank = NARC_msg_msg_0371_R28_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_029_R28_bin, + .mapsec = MAPSEC_ROUTE_28, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R29] = { .wild_encounter_bank = ENCDATA_R29, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0225_R29_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0470_R29_hdr_bin, - .msg_bank = NARC_msg_msg_0373_R29_bin, - .day_music_id = SEQ_GS_R_1_29, - .night_music_id = SEQ_GS_R_1_29, - .events_bank = NARC_zone_event_030_R29_bin, - .mapsec = MAPSEC_ROUTE_29, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0225_R29_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0470_R29_hdr_bin, + .msg_bank = NARC_msg_msg_0373_R29_bin, + .day_music_id = SEQ_GS_R_1_29, + .night_music_id = SEQ_GS_R_1_29, + .events_bank = NARC_zone_event_030_R29_bin, + .mapsec = MAPSEC_ROUTE_29, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R30] = { .wild_encounter_bank = ENCDATA_R30, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0227_R30_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0472_R30_hdr_bin, - .msg_bank = NARC_msg_msg_0375_R30_bin, - .day_music_id = SEQ_GS_R_1_30, - .night_music_id = SEQ_GS_R_1_30, - .events_bank = NARC_zone_event_031_R30_bin, - .mapsec = MAPSEC_ROUTE_30, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0227_R30_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0472_R30_hdr_bin, + .msg_bank = NARC_msg_msg_0375_R30_bin, + .day_music_id = SEQ_GS_R_1_30, + .night_music_id = SEQ_GS_R_1_30, + .events_bank = NARC_zone_event_031_R30_bin, + .mapsec = MAPSEC_ROUTE_30, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R31] = { .wild_encounter_bank = ENCDATA_R31, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0230_R31_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0475_R31_hdr_bin, - .msg_bank = NARC_msg_msg_0378_R31_bin, - .day_music_id = SEQ_GS_R_1_30, - .night_music_id = SEQ_GS_R_1_30, - .events_bank = NARC_zone_event_032_R31_bin, - .mapsec = MAPSEC_ROUTE_31, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0230_R31_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0475_R31_hdr_bin, + .msg_bank = NARC_msg_msg_0378_R31_bin, + .day_music_id = SEQ_GS_R_1_30, + .night_music_id = SEQ_GS_R_1_30, + .events_bank = NARC_zone_event_032_R31_bin, + .mapsec = MAPSEC_ROUTE_31, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R32] = { .wild_encounter_bank = ENCDATA_R32, - .area_data_bank = 3, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0232_R32_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0477_R32_hdr_bin, - .msg_bank = NARC_msg_msg_0380_R32_bin, - .day_music_id = SEQ_GS_R_2_30, - .night_music_id = SEQ_GS_R_2_30, - .events_bank = NARC_zone_event_033_R32_bin, - .mapsec = MAPSEC_ROUTE_32, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 3, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0232_R32_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0477_R32_hdr_bin, + .msg_bank = NARC_msg_msg_0380_R32_bin, + .day_music_id = SEQ_GS_R_2_30, + .night_music_id = SEQ_GS_R_2_30, + .events_bank = NARC_zone_event_033_R32_bin, + .mapsec = MAPSEC_ROUTE_32, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R33] = { .wild_encounter_bank = ENCDATA_R33, - .area_data_bank = 4, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0236_R33_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0481_R33_hdr_bin, - .msg_bank = NARC_msg_msg_0383_R33_bin, - .day_music_id = SEQ_GS_R_3_30, - .night_music_id = SEQ_GS_R_3_30, - .events_bank = NARC_zone_event_034_R33_bin, - .mapsec = MAPSEC_ROUTE_33, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 1, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 4, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0236_R33_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0481_R33_hdr_bin, + .msg_bank = NARC_msg_msg_0383_R33_bin, + .day_music_id = SEQ_GS_R_3_30, + .night_music_id = SEQ_GS_R_3_30, + .events_bank = NARC_zone_event_034_R33_bin, + .mapsec = MAPSEC_ROUTE_33, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 1, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R34] = { .wild_encounter_bank = ENCDATA_R34, - .area_data_bank = 5, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0237_R34_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0482_R34_hdr_bin, - .msg_bank = NARC_msg_msg_0384_R34_bin, - .day_music_id = SEQ_GS_R_4_34, - .night_music_id = SEQ_GS_R_4_34, - .events_bank = NARC_zone_event_035_R34_bin, - .mapsec = MAPSEC_ROUTE_34, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 5, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0237_R34_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0482_R34_hdr_bin, + .msg_bank = NARC_msg_msg_0384_R34_bin, + .day_music_id = SEQ_GS_R_4_34, + .night_music_id = SEQ_GS_R_4_34, + .events_bank = NARC_zone_event_035_R34_bin, + .mapsec = MAPSEC_ROUTE_34, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R35] = { .wild_encounter_bank = ENCDATA_R35, - .area_data_bank = 6, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0240_R35_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0485_R35_hdr_bin, - .msg_bank = NARC_msg_msg_0387_R35_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_036_R35_bin, - .mapsec = MAPSEC_ROUTE_35, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 6, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0240_R35_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0485_R35_hdr_bin, + .msg_bank = NARC_msg_msg_0387_R35_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_036_R35_bin, + .mapsec = MAPSEC_ROUTE_35, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R36] = { .wild_encounter_bank = ENCDATA_R36, - .area_data_bank = 6, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0243_R36_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0488_R36_hdr_bin, - .msg_bank = NARC_msg_msg_0390_R36_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_037_R36_bin, - .mapsec = MAPSEC_ROUTE_36, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 6, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0243_R36_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0488_R36_hdr_bin, + .msg_bank = NARC_msg_msg_0390_R36_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_037_R36_bin, + .mapsec = MAPSEC_ROUTE_36, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R37] = { .wild_encounter_bank = ENCDATA_R37, - .area_data_bank = 6, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0246_R37_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0491_R37_hdr_bin, - .msg_bank = NARC_msg_msg_0393_R37_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_038_R37_bin, - .mapsec = MAPSEC_ROUTE_37, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 6, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0246_R37_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0491_R37_hdr_bin, + .msg_bank = NARC_msg_msg_0393_R37_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_038_R37_bin, + .mapsec = MAPSEC_ROUTE_37, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R38] = { .wild_encounter_bank = ENCDATA_R38, - .area_data_bank = 7, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0247_R38_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0492_R38_hdr_bin, - .msg_bank = NARC_msg_msg_0394_R38_bin, - .day_music_id = SEQ_GS_R_6_38, - .night_music_id = SEQ_GS_R_6_38, - .events_bank = NARC_zone_event_039_R38_bin, - .mapsec = MAPSEC_ROUTE_38, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 7, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0247_R38_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0492_R38_hdr_bin, + .msg_bank = NARC_msg_msg_0394_R38_bin, + .day_music_id = SEQ_GS_R_6_38, + .night_music_id = SEQ_GS_R_6_38, + .events_bank = NARC_zone_event_039_R38_bin, + .mapsec = MAPSEC_ROUTE_38, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R39] = { .wild_encounter_bank = ENCDATA_R39, - .area_data_bank = 7, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0249_R39_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0494_R39_hdr_bin, - .msg_bank = NARC_msg_msg_0396_R39_bin, - .day_music_id = SEQ_GS_R_6_38, - .night_music_id = SEQ_GS_R_6_38, - .events_bank = NARC_zone_event_040_R39_bin, - .mapsec = MAPSEC_ROUTE_39, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 7, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0249_R39_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0494_R39_hdr_bin, + .msg_bank = NARC_msg_msg_0396_R39_bin, + .day_music_id = SEQ_GS_R_6_38, + .night_music_id = SEQ_GS_R_6_38, + .events_bank = NARC_zone_event_040_R39_bin, + .mapsec = MAPSEC_ROUTE_39, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R42] = { .wild_encounter_bank = ENCDATA_R42, - .area_data_bank = 8, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0252_R42_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0497_R42_hdr_bin, - .msg_bank = NARC_msg_msg_0399_R42_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_041_R42_bin, - .mapsec = MAPSEC_ROUTE_42, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 8, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0252_R42_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0497_R42_hdr_bin, + .msg_bank = NARC_msg_msg_0399_R42_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_041_R42_bin, + .mapsec = MAPSEC_ROUTE_42, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R43] = { .wild_encounter_bank = ENCDATA_R43, - .area_data_bank = 8, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0254_R43_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0499_R43_hdr_bin, - .msg_bank = NARC_msg_msg_0401_R43_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_042_R43_bin, - .mapsec = MAPSEC_ROUTE_43, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 8, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0254_R43_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0499_R43_hdr_bin, + .msg_bank = NARC_msg_msg_0401_R43_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_042_R43_bin, + .mapsec = MAPSEC_ROUTE_43, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R44] = { .wild_encounter_bank = ENCDATA_R44, - .area_data_bank = 8, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0257_R44_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0502_R44_hdr_bin, - .msg_bank = NARC_msg_msg_0404_R44_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_043_R44_bin, - .mapsec = MAPSEC_ROUTE_44, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 8, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0257_R44_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0502_R44_hdr_bin, + .msg_bank = NARC_msg_msg_0404_R44_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_043_R44_bin, + .mapsec = MAPSEC_ROUTE_44, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R45] = { .wild_encounter_bank = ENCDATA_R45, - .area_data_bank = 9, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0258_R45_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0503_R45_hdr_bin, - .msg_bank = NARC_msg_msg_0405_R45_bin, - .day_music_id = SEQ_GS_R_8_34, - .night_music_id = SEQ_GS_R_8_34, - .events_bank = NARC_zone_event_044_R45_bin, - .mapsec = MAPSEC_ROUTE_45, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 9, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0258_R45_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0503_R45_hdr_bin, + .msg_bank = NARC_msg_msg_0405_R45_bin, + .day_music_id = SEQ_GS_R_8_34, + .night_music_id = SEQ_GS_R_8_34, + .events_bank = NARC_zone_event_044_R45_bin, + .mapsec = MAPSEC_ROUTE_45, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R46] = { .wild_encounter_bank = ENCDATA_R46, - .area_data_bank = 9, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0259_R46_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0504_R46_hdr_bin, - .msg_bank = NARC_msg_msg_0406_R46_bin, - .day_music_id = SEQ_GS_R_8_34, - .night_music_id = SEQ_GS_R_8_34, - .events_bank = NARC_zone_event_045_R46_bin, - .mapsec = MAPSEC_ROUTE_46, - .area_icon = 3, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 9, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0259_R46_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0504_R46_hdr_bin, + .msg_bank = NARC_msg_msg_0406_R46_bin, + .day_music_id = SEQ_GS_R_8_34, + .night_music_id = SEQ_GS_R_8_34, + .events_bank = NARC_zone_event_045_R46_bin, + .mapsec = MAPSEC_ROUTE_46, + .area_icon = 3, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T01] = { .wild_encounter_bank = ENCDATA_T01, - .area_data_bank = 18, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0735_T01_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0508_T01_hdr_bin, - .msg_bank = NARC_msg_msg_0446_T01_bin, - .day_music_id = SEQ_GS_T_MASARA, - .night_music_id = SEQ_GS_T_MASARA, - .events_bank = NARC_zone_event_046_T01_bin, - .mapsec = MAPSEC_PALLET_TOWN, - .area_icon = 2, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 18, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0735_T01_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0508_T01_hdr_bin, + .msg_bank = NARC_msg_msg_0446_T01_bin, + .day_music_id = SEQ_GS_T_MASARA, + .night_music_id = SEQ_GS_T_MASARA, + .events_bank = NARC_zone_event_046_T01_bin, + .mapsec = MAPSEC_PALLET_TOWN, + .area_icon = 2, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T02] = { .wild_encounter_bank = ENCDATA_T02, - .area_data_bank = 10, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0741_T02_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0514_T02_hdr_bin, - .msg_bank = NARC_msg_msg_0452_T02_bin, - .day_music_id = SEQ_GS_C_TOKIWA, - .night_music_id = SEQ_GS_C_TOKIWA, - .events_bank = NARC_zone_event_047_T02_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 1, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 10, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0741_T02_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0514_T02_hdr_bin, + .msg_bank = NARC_msg_msg_0452_T02_bin, + .day_music_id = SEQ_GS_C_TOKIWA, + .night_music_id = SEQ_GS_C_TOKIWA, + .events_bank = NARC_zone_event_047_T02_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 1, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T03] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 17, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0750_T03_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0523_T03_hdr_bin, - .msg_bank = NARC_msg_msg_0460_T03_bin, - .day_music_id = SEQ_GS_C_NIBI, - .night_music_id = SEQ_GS_C_NIBI, - .events_bank = NARC_zone_event_048_T03_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 1, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 17, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0750_T03_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0523_T03_hdr_bin, + .msg_bank = NARC_msg_msg_0460_T03_bin, + .day_music_id = SEQ_GS_C_NIBI, + .night_music_id = SEQ_GS_C_NIBI, + .events_bank = NARC_zone_event_048_T03_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 1, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04] = { .wild_encounter_bank = ENCDATA_T04, - .area_data_bank = 13, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0758_T04_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0531_T04_hdr_bin, - .msg_bank = NARC_msg_msg_0467_T04_bin, - .day_music_id = SEQ_GS_C_HANADA, - .night_music_id = SEQ_GS_C_HANADA, - .events_bank = NARC_zone_event_049_T04_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 1, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 13, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0758_T04_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0531_T04_hdr_bin, + .msg_bank = NARC_msg_msg_0467_T04_bin, + .day_music_id = SEQ_GS_C_HANADA, + .night_music_id = SEQ_GS_C_HANADA, + .events_bank = NARC_zone_event_049_T04_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 1, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 14, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0767_T05_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0540_T05_hdr_bin, - .msg_bank = NARC_msg_msg_0475_T05_bin, - .day_music_id = SEQ_GS_T_CHION, - .night_music_id = SEQ_GS_T_CHION, - .events_bank = NARC_zone_event_050_T05_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 2, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 14, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0767_T05_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0540_T05_hdr_bin, + .msg_bank = NARC_msg_msg_0475_T05_bin, + .day_music_id = SEQ_GS_T_CHION, + .night_music_id = SEQ_GS_T_CHION, + .events_bank = NARC_zone_event_050_T05_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 2, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06] = { .wild_encounter_bank = ENCDATA_T06, - .area_data_bank = 11, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0776_T06_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0549_T06_hdr_bin, - .msg_bank = NARC_msg_msg_0483_T06_bin, - .day_music_id = SEQ_GS_C_KUCHIBA, - .night_music_id = SEQ_GS_C_KUCHIBA, - .events_bank = NARC_zone_event_051_T06_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 1, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 11, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0776_T06_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0549_T06_hdr_bin, + .msg_bank = NARC_msg_msg_0483_T06_bin, + .day_music_id = SEQ_GS_C_KUCHIBA, + .night_music_id = SEQ_GS_C_KUCHIBA, + .events_bank = NARC_zone_event_051_T06_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 1, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07] = { .wild_encounter_bank = ENCDATA_T07, - .area_data_bank = 15, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0785_T07_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0558_T07_hdr_bin, - .msg_bank = NARC_msg_msg_0491_T07_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_052_T07_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 1, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 15, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0785_T07_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0558_T07_hdr_bin, + .msg_bank = NARC_msg_msg_0491_T07_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_052_T07_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 1, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T08] = { .wild_encounter_bank = ENCDATA_T08, - .area_data_bank = 16, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0807_T08_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0580_T08_hdr_bin, - .msg_bank = NARC_msg_msg_0512_T08_bin, - .day_music_id = SEQ_GS_C_SEKICHIKU, - .night_music_id = SEQ_GS_C_SEKICHIKU, - .events_bank = NARC_zone_event_053_T08_bin, - .mapsec = MAPSEC_FUCHSIA_CITY, - .area_icon = 1, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 16, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0807_T08_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0580_T08_hdr_bin, + .msg_bank = NARC_msg_msg_0512_T08_bin, + .day_music_id = SEQ_GS_C_SEKICHIKU, + .night_music_id = SEQ_GS_C_SEKICHIKU, + .events_bank = NARC_zone_event_053_T08_bin, + .mapsec = MAPSEC_FUCHSIA_CITY, + .area_icon = 1, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T09] = { .wild_encounter_bank = ENCDATA_T09, - .area_data_bank = 18, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0815_T09_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0588_T09_hdr_bin, - .msg_bank = NARC_msg_msg_0519_T09_bin, - .day_music_id = SEQ_GS_T_GUREN, - .night_music_id = SEQ_GS_T_GUREN, - .events_bank = NARC_zone_event_054_T09_bin, - .mapsec = MAPSEC_CINNABAR_ISLAND, - .area_icon = 2, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 18, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0815_T09_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0588_T09_hdr_bin, + .msg_bank = NARC_msg_msg_0519_T09_bin, + .day_music_id = SEQ_GS_T_GUREN, + .night_music_id = SEQ_GS_T_GUREN, + .events_bank = NARC_zone_event_054_T09_bin, + .mapsec = MAPSEC_CINNABAR_ISLAND, + .area_icon = 2, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T10] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 10, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0818_T10_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0591_T10_hdr_bin, - .msg_bank = NARC_msg_msg_0521_T10_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_055_T10_bin, - .mapsec = MAPSEC_INDIGO_PLATEAU, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 10, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0818_T10_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0591_T10_hdr_bin, + .msg_bank = NARC_msg_msg_0521_T10_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_055_T10_bin, + .mapsec = MAPSEC_INDIGO_PLATEAU, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 12, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0827_T11_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0600_T11_hdr_bin, - .msg_bank = NARC_msg_msg_0529_T11_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_056_T11_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 1, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 12, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0827_T11_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0600_T11_hdr_bin, + .msg_bank = NARC_msg_msg_0529_T11_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_056_T11_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 1, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20] = { .wild_encounter_bank = ENCDATA_T20, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0842_T20_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0615_T20_hdr_bin, - .msg_bank = NARC_msg_msg_0542_T20_bin, - .day_music_id = SEQ_GS_T_WAKABA, - .night_music_id = SEQ_GS_T_WAKABA, - .events_bank = NARC_zone_event_057_T20_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 2, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0842_T20_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0615_T20_hdr_bin, + .msg_bank = NARC_msg_msg_0542_T20_bin, + .day_music_id = SEQ_GS_T_WAKABA, + .night_music_id = SEQ_GS_T_WAKABA, + .events_bank = NARC_zone_event_057_T20_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 2, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0100_T20R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0843_T20R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0616_T20R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0543_T20R0101_bin, - .day_music_id = SEQ_GS_UTSUGI_RABO, - .night_music_id = SEQ_GS_UTSUGI_RABO, - .events_bank = NARC_zone_event_058_T20R0101_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 9, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0100_T20R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0843_T20R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0616_T20R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0543_T20R0101_bin, + .day_music_id = SEQ_GS_UTSUGI_RABO, + .night_music_id = SEQ_GS_UTSUGI_RABO, + .events_bank = NARC_zone_event_058_T20R0101_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 9, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0101_T20R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0844_T20R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0617_T20R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0544_T20R0102_bin, - .day_music_id = SEQ_GS_T_WAKABA, - .night_music_id = SEQ_GS_T_WAKABA, - .events_bank = NARC_zone_event_059_T20R0102_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 9, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0101_T20R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0844_T20R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0617_T20R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0544_T20R0102_bin, + .day_music_id = SEQ_GS_T_WAKABA, + .night_music_id = SEQ_GS_T_WAKABA, + .events_bank = NARC_zone_event_059_T20R0102_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 9, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0071_T20R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0845_T20R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0618_T20R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0545_T20R0201_bin, - .day_music_id = SEQ_GS_T_WAKABA, - .night_music_id = SEQ_GS_T_WAKABA, - .events_bank = NARC_zone_event_060_T20R0201_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 9, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0071_T20R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0845_T20R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0618_T20R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0545_T20R0201_bin, + .day_music_id = SEQ_GS_T_WAKABA, + .night_music_id = SEQ_GS_T_WAKABA, + .events_bank = NARC_zone_event_060_T20R0201_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 9, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0072_T20R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0846_T20R0202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0619_T20R0202_hdr_bin, - .msg_bank = NARC_msg_msg_0546_T20R0202_bin, - .day_music_id = SEQ_GS_T_WAKABA, - .night_music_id = SEQ_GS_T_WAKABA, - .events_bank = NARC_zone_event_061_T20R0202_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 9, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0072_T20R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0846_T20R0202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0619_T20R0202_hdr_bin, + .msg_bank = NARC_msg_msg_0546_T20R0202_bin, + .day_music_id = SEQ_GS_T_WAKABA, + .night_music_id = SEQ_GS_T_WAKABA, + .events_bank = NARC_zone_event_061_T20R0202_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 9, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0847_T20R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0620_T20R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0547_T20R0301_bin, - .day_music_id = SEQ_GS_T_WAKABA, - .night_music_id = SEQ_GS_T_WAKABA, - .events_bank = NARC_zone_event_062_T20R0301_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 9, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0847_T20R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0620_T20R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0547_T20R0301_bin, + .day_music_id = SEQ_GS_T_WAKABA, + .night_music_id = SEQ_GS_T_WAKABA, + .events_bank = NARC_zone_event_062_T20R0301_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 9, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0071_T20R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0848_T20R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0621_T20R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0548_T20R0401_bin, - .day_music_id = SEQ_GS_T_WAKABA, - .night_music_id = SEQ_GS_T_WAKABA, - .events_bank = NARC_zone_event_063_T20R0401_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 9, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0071_T20R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0848_T20R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0621_T20R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0548_T20R0401_bin, + .day_music_id = SEQ_GS_T_WAKABA, + .night_music_id = SEQ_GS_T_WAKABA, + .events_bank = NARC_zone_event_063_T20R0401_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 9, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T21] = { .wild_encounter_bank = ENCDATA_T21, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0850_T21_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0623_T21_hdr_bin, - .msg_bank = NARC_msg_msg_0550_T21_bin, - .day_music_id = SEQ_GS_C_YOSHINO, - .night_music_id = SEQ_GS_C_YOSHINO, - .events_bank = NARC_zone_event_064_T21_bin, - .mapsec = MAPSEC_CHERRYGROVE_CITY, - .area_icon = 1, - .unk_12_C = 1, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0850_T21_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0623_T21_hdr_bin, + .msg_bank = NARC_msg_msg_0550_T21_bin, + .day_music_id = SEQ_GS_C_YOSHINO, + .night_music_id = SEQ_GS_C_YOSHINO, + .events_bank = NARC_zone_event_064_T21_bin, + .mapsec = MAPSEC_CHERRYGROVE_CITY, + .area_icon = 1, + .unk_12_C = 1, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T21FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0851_T21FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0624_T21FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0551_T21FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_065_T21FS0101_bin, - .mapsec = MAPSEC_CHERRYGROVE_CITY, - .area_icon = 9, - .unk_12_C = 1, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0851_T21FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0624_T21FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0551_T21FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_065_T21FS0101_bin, + .mapsec = MAPSEC_CHERRYGROVE_CITY, + .area_icon = 9, + .unk_12_C = 1, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T21PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0852_T21PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0625_T21PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0552_T21PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_066_T21PC0101_bin, - .mapsec = MAPSEC_CHERRYGROVE_CITY, - .area_icon = 9, - .unk_12_C = 1, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0852_T21PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0625_T21PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0552_T21PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_066_T21PC0101_bin, + .mapsec = MAPSEC_CHERRYGROVE_CITY, + .area_icon = 9, + .unk_12_C = 1, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T21R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0854_T21R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0627_T21R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0553_T21R0301_bin, - .day_music_id = SEQ_GS_C_YOSHINO, - .night_music_id = SEQ_GS_C_YOSHINO, - .events_bank = NARC_zone_event_067_T21R0301_bin, - .mapsec = MAPSEC_CHERRYGROVE_CITY, - .area_icon = 9, - .unk_12_C = 1, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0854_T21R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0627_T21R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0553_T21R0301_bin, + .day_music_id = SEQ_GS_C_YOSHINO, + .night_music_id = SEQ_GS_C_YOSHINO, + .events_bank = NARC_zone_event_067_T21R0301_bin, + .mapsec = MAPSEC_CHERRYGROVE_CITY, + .area_icon = 9, + .unk_12_C = 1, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T21R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0855_T21R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0628_T21R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0554_T21R0401_bin, - .day_music_id = SEQ_GS_C_YOSHINO, - .night_music_id = SEQ_GS_C_YOSHINO, - .events_bank = NARC_zone_event_068_T21R0401_bin, - .mapsec = MAPSEC_CHERRYGROVE_CITY, - .area_icon = 9, - .unk_12_C = 1, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0855_T21R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0628_T21R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0554_T21R0401_bin, + .day_music_id = SEQ_GS_C_YOSHINO, + .night_music_id = SEQ_GS_C_YOSHINO, + .events_bank = NARC_zone_event_068_T21R0401_bin, + .mapsec = MAPSEC_CHERRYGROVE_CITY, + .area_icon = 9, + .unk_12_C = 1, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T21R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0856_T21R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0629_T21R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0555_T21R0501_bin, - .day_music_id = SEQ_GS_C_YOSHINO, - .night_music_id = SEQ_GS_C_YOSHINO, - .events_bank = NARC_zone_event_069_T21R0501_bin, - .mapsec = MAPSEC_CHERRYGROVE_CITY, - .area_icon = 9, - .unk_12_C = 1, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0856_T21R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0629_T21R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0555_T21R0501_bin, + .day_music_id = SEQ_GS_C_YOSHINO, + .night_music_id = SEQ_GS_C_YOSHINO, + .events_bank = NARC_zone_event_069_T21R0501_bin, + .mapsec = MAPSEC_CHERRYGROVE_CITY, + .area_icon = 9, + .unk_12_C = 1, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22] = { .wild_encounter_bank = ENCDATA_T22, - .area_data_bank = 3, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0857_T22_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0630_T22_hdr_bin, - .msg_bank = NARC_msg_msg_0556_T22_bin, - .day_music_id = SEQ_GS_C_KIKYOU, - .night_music_id = SEQ_GS_C_KIKYOU, - .events_bank = NARC_zone_event_070_T22_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 1, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 3, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0857_T22_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0630_T22_hdr_bin, + .msg_bank = NARC_msg_msg_0556_T22_bin, + .day_music_id = SEQ_GS_C_KIKYOU, + .night_music_id = SEQ_GS_C_KIKYOU, + .events_bank = NARC_zone_event_070_T22_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 1, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 4, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0866_T23_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0639_T23_hdr_bin, - .msg_bank = NARC_msg_msg_0564_T23_bin, - .day_music_id = SEQ_GS_T_HIWADA, - .night_music_id = SEQ_GS_T_HIWADA, - .events_bank = NARC_zone_event_071_T23_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 2, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 4, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0866_T23_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0639_T23_hdr_bin, + .msg_bank = NARC_msg_msg_0564_T23_bin, + .day_music_id = SEQ_GS_T_HIWADA, + .night_music_id = SEQ_GS_T_HIWADA, + .events_bank = NARC_zone_event_071_T23_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 2, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24] = { .wild_encounter_bank = ENCDATA_T24, - .area_data_bank = 7, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0875_T24_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0648_T24_hdr_bin, - .msg_bank = NARC_msg_msg_0572_T24_bin, - .day_music_id = SEQ_GS_C_TANBA, - .night_music_id = SEQ_GS_C_TANBA, - .events_bank = NARC_zone_event_072_T24_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 1, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 7, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0875_T24_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0648_T24_hdr_bin, + .msg_bank = NARC_msg_msg_0572_T24_bin, + .day_music_id = SEQ_GS_C_TANBA, + .night_music_id = SEQ_GS_C_TANBA, + .events_bank = NARC_zone_event_072_T24_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 1, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 5, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0885_T25_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0658_T25_hdr_bin, - .msg_bank = NARC_msg_msg_0581_T25_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_073_T25_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 1, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 5, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0885_T25_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0658_T25_hdr_bin, + .msg_bank = NARC_msg_msg_0581_T25_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_073_T25_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 1, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26] = { .wild_encounter_bank = ENCDATA_T26, - .area_data_bank = 7, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0911_T26_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0684_T26_hdr_bin, - .msg_bank = NARC_msg_msg_0604_T26_bin, - .day_music_id = SEQ_GS_C_ASAGI, - .night_music_id = SEQ_GS_C_ASAGI, - .events_bank = NARC_zone_event_074_T26_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 1, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 7, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0911_T26_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0684_T26_hdr_bin, + .msg_bank = NARC_msg_msg_0604_T26_bin, + .day_music_id = SEQ_GS_C_ASAGI, + .night_music_id = SEQ_GS_C_ASAGI, + .events_bank = NARC_zone_event_074_T26_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 1, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27] = { .wild_encounter_bank = ENCDATA_T27, - .area_data_bank = 6, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0920_T27_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0693_T27_hdr_bin, - .msg_bank = NARC_msg_msg_0612_T27_bin, - .day_music_id = SEQ_GS_C_ENJU, - .night_music_id = SEQ_GS_C_ENJU, - .events_bank = NARC_zone_event_075_T27_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 1, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 6, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0920_T27_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0693_T27_hdr_bin, + .msg_bank = NARC_msg_msg_0612_T27_bin, + .day_music_id = SEQ_GS_C_ENJU, + .night_music_id = SEQ_GS_C_ENJU, + .events_bank = NARC_zone_event_075_T27_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 1, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0921_T27FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0694_T27FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0613_T27FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_076_T27FS0101_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0921_T27FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0694_T27FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0613_T27FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_076_T27FS0101_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 31, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0090_T27GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0922_T27GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0695_T27GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0614_T27GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_077_T27GYM0101_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 31, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0090_T27GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0922_T27GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0695_T27GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0614_T27GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_077_T27GYM0101_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T27PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0923_T27PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0696_T27PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0615_T27PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_078_T27PC0101_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0923_T27PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0696_T27PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0615_T27PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_078_T27PC0101_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_ENJU, - .night_music_id = SEQ_GS_C_ENJU, - .events_bank = NARC_zone_event_079_T27R0101_bin, - .mapsec = MAPSEC_JUBILIFE_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_ENJU, + .night_music_id = SEQ_GS_C_ENJU, + .events_bank = NARC_zone_event_079_T27R0101_bin, + .mapsec = MAPSEC_JUBILIFE_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0068_T27R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0926_T27R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0699_T27R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0616_T27R0201_bin, - .day_music_id = SEQ_GS_C_ENJU, - .night_music_id = SEQ_GS_C_ENJU, - .events_bank = NARC_zone_event_080_T27R0201_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0068_T27R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0926_T27R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0699_T27R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0616_T27R0201_bin, + .day_music_id = SEQ_GS_C_ENJU, + .night_music_id = SEQ_GS_C_ENJU, + .events_bank = NARC_zone_event_080_T27R0201_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0801] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0929_T27R0801_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0702_T27R0801_hdr_bin, - .msg_bank = NARC_msg_msg_0619_T27R0801_bin, - .day_music_id = SEQ_GS_C_ENJU, - .night_music_id = SEQ_GS_C_ENJU, - .events_bank = NARC_zone_event_081_T27R0801_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0929_T27R0801_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0702_T27R0801_hdr_bin, + .msg_bank = NARC_msg_msg_0619_T27R0801_bin, + .day_music_id = SEQ_GS_C_ENJU, + .night_music_id = SEQ_GS_C_ENJU, + .events_bank = NARC_zone_event_081_T27R0801_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0927_T27R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0700_T27R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0617_T27R0401_bin, - .day_music_id = SEQ_GS_C_ENJU, - .night_music_id = SEQ_GS_C_ENJU, - .events_bank = NARC_zone_event_082_T27R0401_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0927_T27R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0700_T27R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0617_T27R0401_bin, + .day_music_id = SEQ_GS_C_ENJU, + .night_music_id = SEQ_GS_C_ENJU, + .events_bank = NARC_zone_event_082_T27R0401_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0126_T27R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0928_T27R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0701_T27R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0618_T27R0501_bin, - .day_music_id = SEQ_GS_KABURENJOU, - .night_music_id = SEQ_GS_KABURENJOU, - .events_bank = NARC_zone_event_083_T27R0501_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 15, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0126_T27R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0928_T27R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0701_T27R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0618_T27R0501_bin, + .day_music_id = SEQ_GS_KABURENJOU, + .night_music_id = SEQ_GS_KABURENJOU, + .events_bank = NARC_zone_event_083_T27R0501_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 15, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T28] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 8, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0930_T28_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0703_T28_hdr_bin, - .msg_bank = NARC_msg_msg_0620_T28_bin, - .day_music_id = SEQ_GS_T_CHOUJI, - .night_music_id = SEQ_GS_T_CHOUJI, - .events_bank = NARC_zone_event_084_T28_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 2, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 8, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0930_T28_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0703_T28_hdr_bin, + .msg_bank = NARC_msg_msg_0620_T28_bin, + .day_music_id = SEQ_GS_T_CHOUJI, + .night_music_id = SEQ_GS_T_CHOUJI, + .events_bank = NARC_zone_event_084_T28_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 2, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T29] = { .wild_encounter_bank = ENCDATA_T29, - .area_data_bank = 8, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0938_T29_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0711_T29_hdr_bin, - .msg_bank = NARC_msg_msg_0626_T29_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_085_T29_bin, - .mapsec = MAPSEC_LAKE_OF_RAGE, - .area_icon = 8, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 1, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 8, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0938_T29_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0711_T29_hdr_bin, + .msg_bank = NARC_msg_msg_0626_T29_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_085_T29_bin, + .mapsec = MAPSEC_LAKE_OF_RAGE, + .area_icon = 8, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 1, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T30] = { .wild_encounter_bank = ENCDATA_T30, - .area_data_bank = 9, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0941_T30_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0714_T30_hdr_bin, - .msg_bank = NARC_msg_msg_0629_T30_bin, - .day_music_id = SEQ_GS_C_FUSUBE, - .night_music_id = SEQ_GS_C_FUSUBE, - .events_bank = NARC_zone_event_086_T30_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 1, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 9, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0941_T30_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0714_T30_hdr_bin, + .msg_bank = NARC_msg_msg_0629_T30_bin, + .day_music_id = SEQ_GS_C_FUSUBE, + .night_music_id = SEQ_GS_C_FUSUBE, + .events_bank = NARC_zone_event_086_T30_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 1, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T31] = { .wild_encounter_bank = ENCDATA_T31, - .area_data_bank = 10, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0949_T31_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0722_T31_hdr_bin, - .msg_bank = NARC_msg_msg_0636_T31_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_087_T31_bin, - .mapsec = MAPSEC_MT_SILVER, - .area_icon = 3, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 10, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0949_T31_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0722_T31_hdr_bin, + .msg_bank = NARC_msg_msg_0636_T31_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_087_T31_bin, + .mapsec = MAPSEC_MT_SILVER, + .area_icon = 3, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_W19] = { .wild_encounter_bank = ENCDATA_W19, - .area_data_bank = 18, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0958_W19_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0727_W19_hdr_bin, - .msg_bank = NARC_msg_msg_0740_W19_bin, - .day_music_id = SEQ_GS_R_15_03, - .night_music_id = SEQ_GS_R_15_03, - .events_bank = NARC_zone_event_088_W19_bin, - .mapsec = MAPSEC_ROUTE_19, - .area_icon = 6, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 18, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0958_W19_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0727_W19_hdr_bin, + .msg_bank = NARC_msg_msg_0740_W19_bin, + .day_music_id = SEQ_GS_R_15_03, + .night_music_id = SEQ_GS_R_15_03, + .events_bank = NARC_zone_event_088_W19_bin, + .mapsec = MAPSEC_ROUTE_19, + .area_icon = 6, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_W20] = { .wild_encounter_bank = ENCDATA_W20, - .area_data_bank = 18, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0960_W20_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0729_W20_hdr_bin, - .msg_bank = NARC_msg_msg_0742_W20_bin, - .day_music_id = SEQ_GS_R_15_03, - .night_music_id = SEQ_GS_R_15_03, - .events_bank = NARC_zone_event_089_W20_bin, - .mapsec = MAPSEC_ROUTE_20, - .area_icon = 6, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_OCEAN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 18, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0960_W20_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0729_W20_hdr_bin, + .msg_bank = NARC_msg_msg_0742_W20_bin, + .day_music_id = SEQ_GS_R_15_03, + .night_music_id = SEQ_GS_R_15_03, + .events_bank = NARC_zone_event_089_W20_bin, + .mapsec = MAPSEC_ROUTE_20, + .area_icon = 6, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_OCEAN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_W21] = { .wild_encounter_bank = ENCDATA_W21, - .area_data_bank = 18, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0961_W21_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0730_W21_hdr_bin, - .msg_bank = NARC_msg_msg_0743_W21_bin, - .day_music_id = SEQ_GS_R_17_03, - .night_music_id = SEQ_GS_R_17_03, - .events_bank = NARC_zone_event_090_W21_bin, - .mapsec = MAPSEC_ROUTE_21, - .area_icon = 6, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_OCEAN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 18, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0961_W21_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0730_W21_hdr_bin, + .msg_bank = NARC_msg_msg_0743_W21_bin, + .day_music_id = SEQ_GS_R_17_03, + .night_music_id = SEQ_GS_R_17_03, + .events_bank = NARC_zone_event_090_W21_bin, + .mapsec = MAPSEC_ROUTE_21, + .area_icon = 6, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_OCEAN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_W40] = { .wild_encounter_bank = ENCDATA_W40, - .area_data_bank = 7, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0962_W40_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0731_W40_hdr_bin, - .msg_bank = NARC_msg_msg_0744_W40_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_091_W40_bin, - .mapsec = MAPSEC_ROUTE_40, - .area_icon = 6, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_OCEAN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 7, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0962_W40_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0731_W40_hdr_bin, + .msg_bank = NARC_msg_msg_0744_W40_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_091_W40_bin, + .mapsec = MAPSEC_ROUTE_40, + .area_icon = 6, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_OCEAN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_W41] = { .wild_encounter_bank = ENCDATA_W41, - .area_data_bank = 7, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0964_W41_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0733_W41_hdr_bin, - .msg_bank = NARC_msg_msg_0746_W41_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_092_W41_bin, - .mapsec = MAPSEC_ROUTE_41, - .area_icon = 6, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_OCEAN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 7, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0964_W41_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0733_W41_hdr_bin, + .msg_bank = NARC_msg_msg_0746_W41_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_092_W41_bin, + .mapsec = MAPSEC_ROUTE_41, + .area_icon = 6, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_OCEAN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D22R0101] = { .wild_encounter_bank = ENCDATA_D22R0101, - .area_data_bank = 71, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0027_D22R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0025_D22R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0286_D22R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0062_D22R0101_bin, - .day_music_id = SEQ_GS_D_KOUEN, - .night_music_id = SEQ_GS_D_KOUEN, - .events_bank = NARC_zone_event_093_D22R0101_bin, - .mapsec = MAPSEC_NATIONAL_PARK, - .area_icon = 7, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 71, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0027_D22R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0025_D22R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0286_D22R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0062_D22R0101_bin, + .day_music_id = SEQ_GS_D_KOUEN, + .night_music_id = SEQ_GS_D_KOUEN, + .events_bank = NARC_zone_event_093_D22R0101_bin, + .mapsec = MAPSEC_NATIONAL_PARK, + .area_icon = 7, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R31R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0231_R31R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0476_R31R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0379_R31R0101_bin, - .day_music_id = SEQ_GS_R_1_30, - .night_music_id = SEQ_GS_R_1_30, - .events_bank = NARC_zone_event_094_R31R0101_bin, - .mapsec = MAPSEC_ROUTE_31, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0231_R31R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0476_R31R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0379_R31R0101_bin, + .day_music_id = SEQ_GS_R_1_30, + .night_music_id = SEQ_GS_R_1_30, + .events_bank = NARC_zone_event_094_R31R0101_bin, + .mapsec = MAPSEC_ROUTE_31, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R32R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0235_R32R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0480_R32R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0382_R32R0101_bin, - .day_music_id = SEQ_GS_R_2_30, - .night_music_id = SEQ_GS_R_2_30, - .events_bank = NARC_zone_event_095_R32R0101_bin, - .mapsec = MAPSEC_ROUTE_32, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0235_R32R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0480_R32R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0382_R32R0101_bin, + .day_music_id = SEQ_GS_R_2_30, + .night_music_id = SEQ_GS_R_2_30, + .events_bank = NARC_zone_event_095_R32R0101_bin, + .mapsec = MAPSEC_ROUTE_32, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D25R0101] = { .wild_encounter_bank = ENCDATA_D25R0101, - .area_data_bank = 87, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0042_D25R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0056_D25R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0317_D25R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0087_D25R0101_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_096_D25R0101_bin, - .mapsec = MAPSEC_UNION_CAVE, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 87, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0042_D25R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0056_D25R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0317_D25R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0087_D25R0101_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_096_D25R0101_bin, + .mapsec = MAPSEC_UNION_CAVE, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0872_T23R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0645_T23R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0569_T23R0101_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_097_T23R0101_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0872_T23R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0645_T23R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0569_T23R0101_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_097_T23R0101_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R35R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0241_R35R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0486_R35R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0388_R35R0101_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_098_R35R0101_bin, - .mapsec = MAPSEC_ROUTE_35, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0241_R35R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0486_R35R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0388_R35R0101_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_098_R35R0101_bin, + .mapsec = MAPSEC_ROUTE_35, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R35R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0196_R35R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0242_R35R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0487_R35R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0389_R35R0201_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_099_R35R0201_bin, - .mapsec = MAPSEC_ROUTE_35, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0196_R35R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0242_R35R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0487_R35R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0389_R35R0201_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_099_R35R0201_bin, + .mapsec = MAPSEC_ROUTE_35, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R36R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0244_R36R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0489_R36R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0391_R36R0101_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_100_R36R0101_bin, - .mapsec = MAPSEC_ROUTE_36, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0244_R36R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0489_R36R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0391_R36R0101_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_100_R36R0101_bin, + .mapsec = MAPSEC_ROUTE_36, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R36R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0245_R36R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0490_R36R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0392_R36R0201_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_101_R36R0201_bin, - .mapsec = MAPSEC_ROUTE_36, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0245_R36R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0490_R36R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0392_R36R0201_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_101_R36R0201_bin, + .mapsec = MAPSEC_ROUTE_36, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_102_T27R0601_bin, - .mapsec = MAPSEC_JUBILIFE_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_102_T27R0601_bin, + .mapsec = MAPSEC_JUBILIFE_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D01R0101] = { .wild_encounter_bank = ENCDATA_D01R0101, - .area_data_bank = 82, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0002_D01R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0005_D01R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0266_D01R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0047_D01R0101_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_103_D01R0101_bin, - .mapsec = MAPSEC_DIGLETTS_CAVE, - .area_icon = 4, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 82, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0002_D01R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0005_D01R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0266_D01R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0047_D01R0101_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_103_D01R0101_bin, + .mapsec = MAPSEC_DIGLETTS_CAVE, + .area_icon = 4, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D02R0101] = { .wild_encounter_bank = ENCDATA_D02R0101, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0003_D02R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0007_D02R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0268_D02R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0049_D02R0101_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_104_D02R0101_bin, - .mapsec = MAPSEC_MT_MOON, - .area_icon = 4, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0003_D02R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0007_D02R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0268_D02R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0049_D02R0101_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_104_D02R0101_bin, + .mapsec = MAPSEC_MT_MOON, + .area_icon = 4, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D05R0101] = { .wild_encounter_bank = ENCDATA_D05R0101, - .area_data_bank = 83, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0006_D05R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_105_D05R0101_bin, - .mapsec = MAPSEC_ROCK_TUNNEL, - .area_icon = 4, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 83, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0006_D05R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_105_D05R0101_bin, + .mapsec = MAPSEC_ROCK_TUNNEL, + .area_icon = 4, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D10R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0008_D10R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0012_D10R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0273_D10R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0052_D10R0101_bin, - .day_music_id = SEQ_GS_SAFARI_FIELD, - .night_music_id = SEQ_GS_SAFARI_FIELD, - .events_bank = NARC_zone_event_106_D10R0101_bin, - .mapsec = MAPSEC_PAL_PARK, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0008_D10R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0012_D10R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0273_D10R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0052_D10R0101_bin, + .day_music_id = SEQ_GS_SAFARI_FIELD, + .night_music_id = SEQ_GS_SAFARI_FIELD, + .events_bank = NARC_zone_event_106_D10R0101_bin, + .mapsec = MAPSEC_PAL_PARK, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D15R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0012_D15R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0016_D15R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0277_D15R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0054_D15R0101_bin, - .day_music_id = SEQ_GS_TO_MADATSUBOMI1, - .night_music_id = SEQ_GS_TO_MADATSUBOMI1, - .events_bank = NARC_zone_event_107_D15R0101_bin, - .mapsec = MAPSEC_SPROUT_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0012_D15R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0016_D15R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0277_D15R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0054_D15R0101_bin, + .day_music_id = SEQ_GS_TO_MADATSUBOMI1, + .night_music_id = SEQ_GS_TO_MADATSUBOMI1, + .events_bank = NARC_zone_event_107_D15R0101_bin, + .mapsec = MAPSEC_SPROUT_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0015_D17R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0019_D17R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0280_D17R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0057_D17R0101_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_108_D17R0101_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0015_D17R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0019_D17R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0280_D17R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0057_D17R0101_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_108_D17R0101_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D23R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 36, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0028_D23R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0029_D23R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0290_D23R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0065_D23R0101_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_109_D23R0101_bin, - .mapsec = MAPSEC_RADIO_TOWER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 36, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0028_D23R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0029_D23R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0290_D23R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0065_D23R0101_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_109_D23R0101_bin, + .mapsec = MAPSEC_RADIO_TOWER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0101] = { .wild_encounter_bank = ENCDATA_D24R0101, - .area_data_bank = 20, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0037_D24R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0298_D24R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0072_D24R0101_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_110_D24R0101_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_MOUNTAIN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 20, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0037_D24R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0298_D24R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0072_D24R0101_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_110_D24R0101_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_MOUNTAIN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D26R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 84, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0045_D26R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0059_D26R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0320_D26R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0090_D26R0101_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_111_D26R0101_bin, - .mapsec = MAPSEC_SLOWPOKE_WELL, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 84, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0045_D26R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0059_D26R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0320_D26R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0090_D26R0101_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_111_D26R0101_bin, + .mapsec = MAPSEC_SLOWPOKE_WELL, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 47, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0047_D27R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0062_D27R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0323_D27R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0093_D27R0101_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_112_D27R0101_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 47, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0047_D27R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0062_D27R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0323_D27R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0093_D27R0101_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_112_D27R0101_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D35R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0138_D35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0088_D35R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0349_D35R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0111_D35R0101_bin, - .day_music_id = SEQ_GS_T_CHOUJI, - .night_music_id = SEQ_GS_T_CHOUJI, - .events_bank = NARC_zone_event_113_D35R0101_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0138_D35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0088_D35R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0349_D35R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0111_D35R0101_bin, + .day_music_id = SEQ_GS_T_CHOUJI, + .night_music_id = SEQ_GS_T_CHOUJI, + .events_bank = NARC_zone_event_113_D35R0101_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D36R0101] = { .wild_encounter_bank = ENCDATA_D36R0101, - .area_data_bank = 74, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0056_D36R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0092_D36R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0353_D36R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0115_D36R0101_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_114_D36R0101_bin, - .mapsec = MAPSEC_ILEX_FOREST, - .area_icon = 5, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_FOREST, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 74, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0056_D36R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0092_D36R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0353_D36R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0115_D36R0101_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_114_D36R0101_bin, + .mapsec = MAPSEC_ILEX_FOREST, + .area_icon = 5, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_FOREST, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D37R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0057_D37R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0093_D37R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0354_D37R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0116_D37R0101_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_115_D37R0101_bin, - .mapsec = MAPSEC_GOLDENROD_TUNNEL, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0057_D37R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0093_D37R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0354_D37R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0116_D37R0101_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_115_D37R0101_bin, + .mapsec = MAPSEC_GOLDENROD_TUNNEL, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D38R0101] = { .wild_encounter_bank = ENCDATA_D38R0101, - .area_data_bank = 79, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0062_D38R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_116_D38R0101_bin, - .mapsec = MAPSEC_MT_MORTAR, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 79, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0062_D38R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_116_D38R0101_bin, + .mapsec = MAPSEC_MT_MORTAR, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D39R0101] = { .wild_encounter_bank = ENCDATA_D39R0101, - .area_data_bank = 76, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0132_D39R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0099_D39R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0360_D39R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0122_D39R0101_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_117_D39R0101_bin, - .mapsec = MAPSEC_ICE_PATH, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 76, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0132_D39R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0099_D39R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0360_D39R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0122_D39R0101_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_117_D39R0101_bin, + .mapsec = MAPSEC_ICE_PATH, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D40R0101] = { .wild_encounter_bank = ENCDATA_D40R0101, - .area_data_bank = 85, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0141_D40R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_118_D40R0101_bin, - .mapsec = MAPSEC_WHIRL_ISLANDS, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 85, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0141_D40R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_118_D40R0101_bin, + .mapsec = MAPSEC_WHIRL_ISLANDS, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0101] = { .wild_encounter_bank = ENCDATA_D41R0101, - .area_data_bank = 80, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0265_D41R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0105_D41R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0366_D41R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_119_D41R0101_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 80, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0265_D41R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0105_D41R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0366_D41R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_119_D41R0101_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D42R0101] = { .wild_encounter_bank = ENCDATA_D42R0101, - .area_data_bank = 87, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0098_D42R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0108_D42R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0369_D42R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0127_D42R0101_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_120_D42R0101_bin, - .mapsec = MAPSEC_DARK_CAVE, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 87, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0098_D42R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0108_D42R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0369_D42R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0127_D42R0101_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_120_D42R0101_bin, + .mapsec = MAPSEC_DARK_CAVE, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D43R0101] = { .wild_encounter_bank = ENCDATA_D43R0101, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0161_D43R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHAMPROAD, - .night_music_id = SEQ_GS_D_CHAMPROAD, - .events_bank = NARC_zone_event_121_D43R0101_bin, - .mapsec = MAPSEC_VICTORY_ROAD_JK, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0161_D43R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHAMPROAD, + .night_music_id = SEQ_GS_D_CHAMPROAD, + .events_bank = NARC_zone_event_121_D43R0101_bin, + .mapsec = MAPSEC_VICTORY_ROAD_JK, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D44R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 86, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0145_D44R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_RYUUNOANA, - .night_music_id = SEQ_GS_RYUUNOANA, - .events_bank = NARC_zone_event_122_D44R0101_bin, - .mapsec = MAPSEC_DRAGONS_DEN, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 86, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0145_D44R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_RYUUNOANA, + .night_music_id = SEQ_GS_RYUUNOANA, + .events_bank = NARC_zone_event_122_D44R0101_bin, + .mapsec = MAPSEC_DRAGONS_DEN, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D45R0101] = { .wild_encounter_bank = ENCDATA_D45R0101, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 23, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0151_D45R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0113_D45R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0374_D45R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_123_D45R0101_bin, - .mapsec = MAPSEC_TOHJO_FALLS, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 23, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0151_D45R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0113_D45R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0374_D45R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_123_D45R0101_bin, + .mapsec = MAPSEC_TOHJO_FALLS, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R30R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0228_R30R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0473_R30R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0376_R30R0101_bin, - .day_music_id = SEQ_GS_R_1_30, - .night_music_id = SEQ_GS_R_1_30, - .events_bank = NARC_zone_event_124_R30R0101_bin, - .mapsec = MAPSEC_ROUTE_30, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0228_R30R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0473_R30R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0376_R30R0101_bin, + .day_music_id = SEQ_GS_R_1_30, + .night_music_id = SEQ_GS_R_1_30, + .events_bank = NARC_zone_event_124_R30R0101_bin, + .mapsec = MAPSEC_ROUTE_30, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0074_UNION_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_125_T27PC0102_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0074_UNION_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_125_T27PC0102_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27PC0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0075_DIRECT2_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_126_T27PC0103_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0075_DIRECT2_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_126_T27PC0103_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27PC0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0076_DIRECT4_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0076_DIRECT4_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27PC0105] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0924_T27PC0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0697_T27PC0105_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_127_T27PC0105_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0924_T27PC0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0697_T27PC0105_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_127_T27PC0105_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R42R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0253_R42R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0498_R42R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0400_R42R0101_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_128_R42R0101_bin, - .mapsec = MAPSEC_ROUTE_42, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0253_R42R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0498_R42R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0400_R42R0101_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_128_R42R0101_bin, + .mapsec = MAPSEC_ROUTE_42, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T28R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0937_T28R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0710_T28R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0625_T28R0201_bin, - .day_music_id = SEQ_GS_T_CHOUJI, - .night_music_id = SEQ_GS_T_CHOUJI, - .events_bank = NARC_zone_event_129_T28R0201_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0937_T28R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0710_T28R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0625_T28R0201_bin, + .day_music_id = SEQ_GS_T_CHOUJI, + .night_music_id = SEQ_GS_T_CHOUJI, + .events_bank = NARC_zone_event_129_T28R0201_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R29R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 19, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0226_R29R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0471_R29R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0374_R29R0101_bin, - .day_music_id = SEQ_GS_R_1_29, - .night_music_id = SEQ_GS_R_1_29, - .events_bank = NARC_zone_event_130_R29R0101_bin, - .mapsec = MAPSEC_ROUTE_29, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 19, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0226_R29R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0471_R29R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0374_R29R0101_bin, + .day_music_id = SEQ_GS_R_1_29, + .night_music_id = SEQ_GS_R_1_29, + .events_bank = NARC_zone_event_130_R29R0101_bin, + .mapsec = MAPSEC_ROUTE_29, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 28, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0087_T22GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0859_T22GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0632_T22GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0558_T22GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_131_T22GYM0101_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 1, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 28, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0087_T22GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0859_T22GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0632_T22GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0558_T22GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_131_T22GYM0101_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 1, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T23GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 29, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0088_T23GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0868_T23GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0641_T23GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0566_T23GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_132_T23GYM0101_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 29, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0088_T23GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0868_T23GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0641_T23GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0566_T23GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_132_T23GYM0101_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T25GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 30, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0089_T25GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0886_T25GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0659_T25GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0582_T25GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_133_T25GYM0101_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 2, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 30, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0089_T25GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0886_T25GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0659_T25GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0582_T25GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_133_T25GYM0101_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 2, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T26GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 32, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0091_T26GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0913_T26GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0686_T26GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0606_T26GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_134_T26GYM0101_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 32, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0091_T26GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0913_T26GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0686_T26GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0606_T26GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_134_T26GYM0101_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T24GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 33, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0092_T24GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0877_T24GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0650_T24GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0574_T24GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_135_T24GYM0101_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_2, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 33, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0092_T24GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0877_T24GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0650_T24GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0574_T24GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_135_T24GYM0101_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_2, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T28GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 34, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0229_T28GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0932_T28GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0705_T28GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0622_T28GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_136_T28GYM0101_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_2, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 34, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0229_T28GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0932_T28GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0705_T28GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0622_T28GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_136_T28GYM0101_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_2, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T30GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 35, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0094_T30GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0943_T30GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0716_T30GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0631_T30GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_137_T30GYM0101_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 35, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0094_T30GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0943_T30GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0716_T30GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0631_T30GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_137_T30GYM0101_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_R43R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0255_R43R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0500_R43R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0402_R43R0101_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_138_R43R0101_bin, - .mapsec = MAPSEC_ROUTE_43, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0255_R43R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0500_R43R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0402_R43R0101_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_138_R43R0101_bin, + .mapsec = MAPSEC_ROUTE_43, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R30R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0103_R30R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0229_R30R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0474_R30R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0377_R30R0201_bin, - .day_music_id = SEQ_GS_R_1_30, - .night_music_id = SEQ_GS_R_1_30, - .events_bank = NARC_zone_event_139_R30R0201_bin, - .mapsec = MAPSEC_ROUTE_30, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0103_R30R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0229_R30R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0474_R30R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0377_R30R0201_bin, + .day_music_id = SEQ_GS_R_1_30, + .night_music_id = SEQ_GS_R_1_30, + .events_bank = NARC_zone_event_139_R30R0201_bin, + .mapsec = MAPSEC_ROUTE_30, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T21PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0853_T21PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0626_T21PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_140_T21PC0102_bin, - .mapsec = MAPSEC_CHERRYGROVE_CITY, - .area_icon = 9, - .unk_12_C = 1, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0853_T21PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0626_T21PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_140_T21PC0102_bin, + .mapsec = MAPSEC_CHERRYGROVE_CITY, + .area_icon = 9, + .unk_12_C = 1, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D03R0101] = { .wild_encounter_bank = ENCDATA_D03R0101, - .area_data_bank = 73, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0078_D03R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_141_D03R0101_bin, - .mapsec = MAPSEC_CERULEAN_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 73, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0078_D03R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_141_D03R0101_bin, + .mapsec = MAPSEC_CERULEAN_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D11R0101] = { .wild_encounter_bank = ENCDATA_D11R0101, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 35, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0081_D11R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_142_D11R0101_bin, - .mapsec = MAPSEC_SEAFOAM_ISLANDS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 35, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0081_D11R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_142_D11R0101_bin, + .mapsec = MAPSEC_SEAFOAM_ISLANDS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D46R0101] = { .wild_encounter_bank = ENCDATA_D46R0101, - .area_data_bank = 103, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0086_D46R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0115_D46R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0376_D46R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0132_D46R0101_bin, - .day_music_id = SEQ_GS_D_TOKIWANOMORI3, - .night_music_id = SEQ_GS_D_TOKIWANOMORI3, - .events_bank = NARC_zone_event_143_D46R0101_bin, - .mapsec = MAPSEC_VIRIDIAN_FOREST, - .area_icon = 5, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_FOREST, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 103, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0086_D46R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0115_D46R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0376_D46R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0132_D46R0101_bin, + .day_music_id = SEQ_GS_D_TOKIWANOMORI3, + .night_music_id = SEQ_GS_D_TOKIWANOMORI3, + .events_bank = NARC_zone_event_143_D46R0101_bin, + .mapsec = MAPSEC_VIRIDIAN_FOREST, + .area_icon = 5, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_FOREST, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R09R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_NIBI, - .night_music_id = SEQ_GS_C_NIBI, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_POWER_PLANT, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_NIBI, + .night_music_id = SEQ_GS_C_NIBI, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_POWER_PLANT, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22R0701] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0865_T22R0701_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0638_T22R0701_hdr_bin, - .msg_bank = NARC_msg_msg_0563_T22R0701_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_144_T22R0701_bin, - .mapsec = MAPSEC_ROUTE_36, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0865_T22R0701_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0638_T22R0701_hdr_bin, + .msg_bank = NARC_msg_msg_0563_T22R0701_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_144_T22R0701_bin, + .mapsec = MAPSEC_ROUTE_36, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D22R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0028_D22R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0289_D22R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0064_D22R0201_bin, - .day_music_id = SEQ_GS_PT_ENTR, - .night_music_id = SEQ_GS_PT_ENTR, - .events_bank = NARC_zone_event_145_D22R0201_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0028_D22R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0289_D22R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0064_D22R0201_bin, + .day_music_id = SEQ_GS_PT_ENTR, + .night_music_id = SEQ_GS_PT_ENTR, + .events_bank = NARC_zone_event_145_D22R0201_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R47] = { .wild_encounter_bank = ENCDATA_R47, - .area_data_bank = 19, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0260_R47_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0505_R47_hdr_bin, - .msg_bank = NARC_msg_msg_0407_R47_bin, - .day_music_id = SEQ_GS_SAFARI_ROAD, - .night_music_id = SEQ_GS_SAFARI_ROAD, - .events_bank = NARC_zone_event_146_R47_bin, - .mapsec = MAPSEC_ROUTE_47, - .area_icon = 3, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_MOUNTAIN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 19, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0260_R47_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0505_R47_hdr_bin, + .msg_bank = NARC_msg_msg_0407_R47_bin, + .day_music_id = SEQ_GS_SAFARI_ROAD, + .night_music_id = SEQ_GS_SAFARI_ROAD, + .events_bank = NARC_zone_event_146_R47_bin, + .mapsec = MAPSEC_ROUTE_47, + .area_icon = 3, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_MOUNTAIN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R48] = { .wild_encounter_bank = ENCDATA_R48, - .area_data_bank = 19, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0261_R48_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0506_R48_hdr_bin, - .msg_bank = NARC_msg_msg_0408_R48_bin, - .day_music_id = SEQ_GS_SAFARI_ROAD, - .night_music_id = SEQ_GS_SAFARI_ROAD, - .events_bank = NARC_zone_event_147_R48_bin, - .mapsec = MAPSEC_ROUTE_48, - .area_icon = 3, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_MOUNTAIN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 19, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0261_R48_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0506_R48_hdr_bin, + .msg_bank = NARC_msg_msg_0408_R48_bin, + .day_music_id = SEQ_GS_SAFARI_ROAD, + .night_music_id = SEQ_GS_SAFARI_ROAD, + .events_bank = NARC_zone_event_147_R48_bin, + .mapsec = MAPSEC_ROUTE_48, + .area_icon = 3, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_MOUNTAIN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D25R0102] = { .wild_encounter_bank = ENCDATA_D25R0102, - .area_data_bank = 87, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0043_D25R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0057_D25R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0318_D25R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0088_D25R0102_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_148_D25R0102_bin, - .mapsec = MAPSEC_UNION_CAVE, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 87, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0043_D25R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0057_D25R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0318_D25R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0088_D25R0102_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_148_D25R0102_bin, + .mapsec = MAPSEC_UNION_CAVE, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D25R0103] = { .wild_encounter_bank = ENCDATA_D25R0103, - .area_data_bank = 87, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0044_D25R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0058_D25R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0319_D25R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0089_D25R0103_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_149_D25R0103_bin, - .mapsec = MAPSEC_UNION_CAVE, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 87, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0044_D25R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0058_D25R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0319_D25R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0089_D25R0103_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_149_D25R0103_bin, + .mapsec = MAPSEC_UNION_CAVE, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D15R0102] = { .wild_encounter_bank = ENCDATA_D15R0102, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0013_D15R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0017_D15R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0278_D15R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0055_D15R0102_bin, - .day_music_id = SEQ_GS_TO_MADATSUBOMI1, - .night_music_id = SEQ_GS_TO_MADATSUBOMI1, - .events_bank = NARC_zone_event_150_D15R0102_bin, - .mapsec = MAPSEC_SPROUT_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0013_D15R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0017_D15R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0278_D15R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0055_D15R0102_bin, + .day_music_id = SEQ_GS_TO_MADATSUBOMI1, + .night_music_id = SEQ_GS_TO_MADATSUBOMI1, + .events_bank = NARC_zone_event_150_D15R0102_bin, + .mapsec = MAPSEC_SPROUT_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D15R0103] = { .wild_encounter_bank = ENCDATA_D15R0103, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0014_D15R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0018_D15R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0279_D15R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0056_D15R0103_bin, - .day_music_id = SEQ_GS_TO_MADATSUBOMI1, - .night_music_id = SEQ_GS_TO_MADATSUBOMI1, - .events_bank = NARC_zone_event_151_D15R0103_bin, - .mapsec = MAPSEC_SPROUT_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0014_D15R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0018_D15R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0279_D15R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0056_D15R0103_bin, + .day_music_id = SEQ_GS_TO_MADATSUBOMI1, + .night_music_id = SEQ_GS_TO_MADATSUBOMI1, + .events_bank = NARC_zone_event_151_D15R0103_bin, + .mapsec = MAPSEC_SPROUT_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0858_T22FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0631_T22FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0557_T22FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_152_T22FS0101_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0858_T22FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0631_T22FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0557_T22FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_152_T22FS0101_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0860_T22PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0633_T22PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0559_T22PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_153_T22PC0101_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0860_T22PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0633_T22PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0559_T22PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_153_T22PC0101_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0102_T22R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0862_T22R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0635_T22R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0560_T22R0301_bin, - .day_music_id = SEQ_GS_C_KIKYOU, - .night_music_id = SEQ_GS_C_KIKYOU, - .events_bank = NARC_zone_event_154_T22R0301_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0102_T22R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0862_T22R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0635_T22R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0560_T22R0301_bin, + .day_music_id = SEQ_GS_C_KIKYOU, + .night_music_id = SEQ_GS_C_KIKYOU, + .events_bank = NARC_zone_event_154_T22R0301_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0863_T22R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0636_T22R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0561_T22R0401_bin, - .day_music_id = SEQ_GS_C_KIKYOU, - .night_music_id = SEQ_GS_C_KIKYOU, - .events_bank = NARC_zone_event_155_T22R0401_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0863_T22R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0636_T22R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0561_T22R0401_bin, + .day_music_id = SEQ_GS_C_KIKYOU, + .night_music_id = SEQ_GS_C_KIKYOU, + .events_bank = NARC_zone_event_155_T22R0401_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_YOSHINO, - .night_music_id = SEQ_GS_C_YOSHINO, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_JUBILIFE_CITY, - .area_icon = 0, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_YOSHINO, + .night_music_id = SEQ_GS_C_YOSHINO, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_JUBILIFE_CITY, + .area_icon = 0, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0864_T22R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0637_T22R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0562_T22R0601_bin, - .day_music_id = SEQ_GS_C_KIKYOU, - .night_music_id = SEQ_GS_C_KIKYOU, - .events_bank = NARC_zone_event_156_T22R0601_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0864_T22R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0637_T22R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0562_T22R0601_bin, + .day_music_id = SEQ_GS_C_KIKYOU, + .night_music_id = SEQ_GS_C_KIKYOU, + .events_bank = NARC_zone_event_156_T22R0601_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0125_T23R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0873_T23R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0646_T23R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0570_T23R0201_bin, - .day_music_id = SEQ_GS_T_HIWADA, - .night_music_id = SEQ_GS_T_HIWADA, - .events_bank = NARC_zone_event_157_T23R0201_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0125_T23R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0873_T23R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0646_T23R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0570_T23R0201_bin, + .day_music_id = SEQ_GS_T_HIWADA, + .night_music_id = SEQ_GS_T_HIWADA, + .events_bank = NARC_zone_event_157_T23R0201_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0127_T23R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0874_T23R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0647_T23R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0571_T23R0501_bin, - .day_music_id = SEQ_GS_T_HIWADA, - .night_music_id = SEQ_GS_T_HIWADA, - .events_bank = NARC_zone_event_158_T23R0501_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0127_T23R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0874_T23R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0647_T23R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0571_T23R0501_bin, + .day_music_id = SEQ_GS_T_HIWADA, + .night_music_id = SEQ_GS_T_HIWADA, + .events_bank = NARC_zone_event_158_T23R0501_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0867_T23FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0640_T23FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0565_T23FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_159_T23FS0101_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0867_T23FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0640_T23FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0565_T23FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_159_T23FS0101_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0870_T23PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0643_T23PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0568_T23PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_160_T23PC0101_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0870_T23PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0643_T23PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0568_T23PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_160_T23PC0101_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T22PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0861_T22PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0634_T22PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_161_T22PC0102_bin, - .mapsec = MAPSEC_VIOLET_CITY, - .area_icon = 9, - .unk_12_C = 2, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0861_T22PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0634_T22PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_161_T22PC0102_bin, + .mapsec = MAPSEC_VIOLET_CITY, + .area_icon = 9, + .unk_12_C = 2, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0871_T23PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0644_T23PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_162_T23PC0102_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0871_T23PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0644_T23PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_162_T23PC0102_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R32PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0233_R32PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0478_R32PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0381_R32PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_163_R32PC0101_bin, - .mapsec = MAPSEC_ROUTE_32, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0233_R32PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0478_R32PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0381_R32PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_163_R32PC0101_bin, + .mapsec = MAPSEC_ROUTE_32, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R32PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0234_R32PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0479_R32PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_164_R32PC0102_bin, - .mapsec = MAPSEC_ROUTE_32, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0234_R32PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0479_R32PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_164_R32PC0102_bin, + .mapsec = MAPSEC_ROUTE_32, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R34R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0239_R34R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0484_R34R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0386_R34R0201_bin, - .day_music_id = SEQ_GS_R_4_34, - .night_music_id = SEQ_GS_R_4_34, - .events_bank = NARC_zone_event_165_R34R0201_bin, - .mapsec = MAPSEC_ROUTE_34, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0239_R34R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0484_R34R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0386_R34R0201_bin, + .day_music_id = SEQ_GS_R_4_34, + .night_music_id = SEQ_GS_R_4_34, + .events_bank = NARC_zone_event_165_R34R0201_bin, + .mapsec = MAPSEC_ROUTE_34, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R38R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0248_R38R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0493_R38R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0395_R38R0101_bin, - .day_music_id = SEQ_GS_R_6_38, - .night_music_id = SEQ_GS_R_6_38, - .events_bank = NARC_zone_event_166_R38R0101_bin, - .mapsec = MAPSEC_ROUTE_38, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0248_R38R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0493_R38R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0395_R38R0101_bin, + .day_music_id = SEQ_GS_R_6_38, + .night_music_id = SEQ_GS_R_6_38, + .events_bank = NARC_zone_event_166_R38R0101_bin, + .mapsec = MAPSEC_ROUTE_38, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D47R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 2, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0227_D47R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0119_D47R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0380_D47R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0135_D47R0101_bin, - .day_music_id = SEQ_GS_SAFARI_HOUSE, - .night_music_id = SEQ_GS_SAFARI_HOUSE, - .events_bank = NARC_zone_event_167_D47R0101_bin, - .mapsec = MAPSEC_SAFARI_ZONE_GATE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 2, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0227_D47R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0119_D47R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0380_D47R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0135_D47R0101_bin, + .day_music_id = SEQ_GS_SAFARI_HOUSE, + .night_music_id = SEQ_GS_SAFARI_HOUSE, + .events_bank = NARC_zone_event_167_D47R0101_bin, + .mapsec = MAPSEC_SAFARI_ZONE_GATE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D47] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 19, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0116_D47_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0377_D47_hdr_bin, - .msg_bank = NARC_msg_msg_0133_D47_bin, - .day_music_id = SEQ_GS_SAFARI_HOUSE, - .night_music_id = SEQ_GS_SAFARI_HOUSE, - .events_bank = NARC_zone_event_168_D47_bin, - .mapsec = MAPSEC_SAFARI_ZONE_GATE, - .area_icon = 3, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 19, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0116_D47_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0377_D47_hdr_bin, + .msg_bank = NARC_msg_msg_0133_D47_bin, + .day_music_id = SEQ_GS_SAFARI_HOUSE, + .night_music_id = SEQ_GS_SAFARI_HOUSE, + .events_bank = NARC_zone_event_168_D47_bin, + .mapsec = MAPSEC_SAFARI_ZONE_GATE, + .area_icon = 3, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_ENJU, - .night_music_id = SEQ_GS_C_ENJU, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_JUBILIFE_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_ENJU, + .night_music_id = SEQ_GS_C_ENJU, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_JUBILIFE_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D42R0102] = { .wild_encounter_bank = ENCDATA_D42R0102, - .area_data_bank = 87, - .move_model_bank = 15, - .world_map_x = 17, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0099_D42R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_169_D42R0102_bin, - .mapsec = MAPSEC_DARK_CAVE, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 87, + .move_model_bank = 15, + .world_map_x = 17, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0099_D42R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_169_D42R0102_bin, + .mapsec = MAPSEC_DARK_CAVE, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D26R0102] = { .wild_encounter_bank = ENCDATA_D26R0102, - .area_data_bank = 84, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0046_D26R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0060_D26R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0321_D26R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0091_D26R0102_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_170_D26R0102_bin, - .mapsec = MAPSEC_SLOWPOKE_WELL, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 84, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0046_D26R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0060_D26R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0321_D26R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0091_D26R0102_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_170_D26R0102_bin, + .mapsec = MAPSEC_SLOWPOKE_WELL, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D43R0102] = { .wild_encounter_bank = ENCDATA_D43R0102, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0162_D43R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0109_D43R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0370_D43R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHAMPROAD, - .night_music_id = SEQ_GS_D_CHAMPROAD, - .events_bank = NARC_zone_event_171_D43R0102_bin, - .mapsec = MAPSEC_VICTORY_ROAD_JK, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0162_D43R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0109_D43R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0370_D43R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHAMPROAD, + .night_music_id = SEQ_GS_D_CHAMPROAD, + .events_bank = NARC_zone_event_171_D43R0102_bin, + .mapsec = MAPSEC_VICTORY_ROAD_JK, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D43R0103] = { .wild_encounter_bank = ENCDATA_D43R0103, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0163_D43R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0110_D43R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0371_D43R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0128_D43R0103_bin, - .day_music_id = SEQ_GS_D_CHAMPROAD, - .night_music_id = SEQ_GS_D_CHAMPROAD, - .events_bank = NARC_zone_event_172_D43R0103_bin, - .mapsec = MAPSEC_VICTORY_ROAD_JK, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0163_D43R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0110_D43R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0371_D43R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0128_D43R0103_bin, + .day_music_id = SEQ_GS_D_CHAMPROAD, + .night_music_id = SEQ_GS_D_CHAMPROAD, + .events_bank = NARC_zone_event_172_D43R0103_bin, + .mapsec = MAPSEC_VICTORY_ROAD_JK, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T23GYM0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 29, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0105_T23GYM0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0869_T23GYM0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0642_T23GYM0102_hdr_bin, - .msg_bank = NARC_msg_msg_0567_T23GYM0102_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_173_T23GYM0102_bin, - .mapsec = MAPSEC_AZALEA_TOWN, - .area_icon = 9, - .unk_12_C = 3, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 5, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 29, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0105_T23GYM0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0869_T23GYM0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0642_T23GYM0102_hdr_bin, + .msg_bank = NARC_msg_msg_0567_T23GYM0102_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_173_T23GYM0102_bin, + .mapsec = MAPSEC_AZALEA_TOWN, + .area_icon = 9, + .unk_12_C = 3, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 5, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D26R0103] = { .wild_encounter_bank = ENCDATA_D26R0103, - .area_data_bank = 84, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0106_D26R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0061_D26R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0322_D26R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0092_D26R0103_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_174_D26R0103_bin, - .mapsec = MAPSEC_SLOWPOKE_WELL, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 84, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0106_D26R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0061_D26R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0322_D26R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0092_D26R0103_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_174_D26R0103_bin, + .mapsec = MAPSEC_SLOWPOKE_WELL, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0107_T25R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0890_T25R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0663_T25R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0584_T25R0201_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_175_T25R0201_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0107_T25R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0890_T25R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0663_T25R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0584_T25R0201_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_175_T25R0201_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0109_T25R1101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0906_T25R1101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0679_T25R1101_hdr_bin, - .msg_bank = NARC_msg_msg_0599_T25R1101_bin, - .day_music_id = SEQ_GS_GAME, - .night_music_id = SEQ_GS_GAME, - .events_bank = NARC_zone_event_176_T25R1101_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0109_T25R1101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0906_T25R1101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0679_T25R1101_hdr_bin, + .msg_bank = NARC_msg_msg_0599_T25R1101_bin, + .day_music_id = SEQ_GS_GAME, + .night_music_id = SEQ_GS_GAME, + .events_bank = NARC_zone_event_176_T25R1101_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0108_T25R0601_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0896_T25R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0669_T25R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0589_T25R0601_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_177_T25R0601_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0108_T25R0601_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0896_T25R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0669_T25R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0589_T25R0601_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_177_T25R0601_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0887_T25PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0660_T25PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0583_T25PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_178_T25PC0101_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0887_T25PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0660_T25PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0583_T25PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_178_T25PC0101_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D23R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 36, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0029_D23R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0030_D23R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0291_D23R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0066_D23R0102_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_179_D23R0102_bin, - .mapsec = MAPSEC_RADIO_TOWER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 36, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0029_D23R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0030_D23R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0291_D23R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0066_D23R0102_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_179_D23R0102_bin, + .mapsec = MAPSEC_RADIO_TOWER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D23R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 36, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0030_D23R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0031_D23R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0292_D23R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0067_D23R0103_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_180_D23R0103_bin, - .mapsec = MAPSEC_RADIO_TOWER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 36, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0030_D23R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0031_D23R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0292_D23R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0067_D23R0103_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_180_D23R0103_bin, + .mapsec = MAPSEC_RADIO_TOWER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D23R0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 36, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0031_D23R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0032_D23R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0293_D23R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0068_D23R0104_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_181_D23R0104_bin, - .mapsec = MAPSEC_RADIO_TOWER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 36, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0031_D23R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0032_D23R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0293_D23R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0068_D23R0104_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_181_D23R0104_bin, + .mapsec = MAPSEC_RADIO_TOWER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D23R0105] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 36, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0032_D23R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0033_D23R0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0294_D23R0105_hdr_bin, - .msg_bank = NARC_msg_msg_0069_D23R0105_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_182_D23R0105_bin, - .mapsec = MAPSEC_RADIO_TOWER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 36, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0032_D23R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0033_D23R0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0294_D23R0105_hdr_bin, + .msg_bank = NARC_msg_msg_0069_D23R0105_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_182_D23R0105_bin, + .mapsec = MAPSEC_RADIO_TOWER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D23R0106] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 36, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0110_D23R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0034_D23R0106_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0295_D23R0106_hdr_bin, - .msg_bank = NARC_msg_msg_0070_D23R0106_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_183_D23R0106_bin, - .mapsec = MAPSEC_RADIO_TOWER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 36, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0110_D23R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0034_D23R0106_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0295_D23R0106_hdr_bin, + .msg_bank = NARC_msg_msg_0070_D23R0106_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_183_D23R0106_bin, + .mapsec = MAPSEC_RADIO_TOWER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1001] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0113_T25R1001_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0899_T25R1001_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0672_T25R1001_hdr_bin, - .msg_bank = NARC_msg_msg_0592_T25R1001_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_184_T25R1001_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0113_T25R1001_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0899_T25R1001_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0672_T25R1001_hdr_bin, + .msg_bank = NARC_msg_msg_0592_T25R1001_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_184_T25R1001_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1002] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0114_T25R1002_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0900_T25R1002_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0673_T25R1002_hdr_bin, - .msg_bank = NARC_msg_msg_0593_T25R1002_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_185_T25R1002_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0114_T25R1002_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0900_T25R1002_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0673_T25R1002_hdr_bin, + .msg_bank = NARC_msg_msg_0593_T25R1002_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_185_T25R1002_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1003] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0115_T25R1003_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0901_T25R1003_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0674_T25R1003_hdr_bin, - .msg_bank = NARC_msg_msg_0594_T25R1003_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_186_T25R1003_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0115_T25R1003_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0901_T25R1003_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0674_T25R1003_hdr_bin, + .msg_bank = NARC_msg_msg_0594_T25R1003_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_186_T25R1003_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1004] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0116_T25R1004_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0902_T25R1004_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0675_T25R1004_hdr_bin, - .msg_bank = NARC_msg_msg_0595_T25R1004_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_187_T25R1004_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0116_T25R1004_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0902_T25R1004_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0675_T25R1004_hdr_bin, + .msg_bank = NARC_msg_msg_0595_T25R1004_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_187_T25R1004_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1005] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0117_T25R1005_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0903_T25R1005_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0676_T25R1005_hdr_bin, - .msg_bank = NARC_msg_msg_0596_T25R1005_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_188_T25R1005_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0117_T25R1005_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0903_T25R1005_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0676_T25R1005_hdr_bin, + .msg_bank = NARC_msg_msg_0596_T25R1005_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_188_T25R1005_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1006] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0118_T25R1006_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0904_T25R1006_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0677_T25R1006_hdr_bin, - .msg_bank = NARC_msg_msg_0597_T25R1006_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_189_T25R1006_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0118_T25R1006_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0904_T25R1006_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0677_T25R1006_hdr_bin, + .msg_bank = NARC_msg_msg_0597_T25R1006_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_189_T25R1006_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 48, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0111_T25R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0893_T25R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0666_T25R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0587_T25R0501_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_190_T25R0501_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 48, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0111_T25R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0893_T25R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0666_T25R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0587_T25R0501_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_190_T25R0501_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0502] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 48, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0112_T25R0502_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0894_T25R0502_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0667_T25R0502_hdr_bin, - .msg_bank = NARC_msg_msg_0588_T25R0502_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_191_T25R0502_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 48, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0112_T25R0502_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0894_T25R0502_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0667_T25R0502_hdr_bin, + .msg_bank = NARC_msg_msg_0588_T25R0502_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_191_T25R0502_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D37R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0058_D37R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0094_D37R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0355_D37R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0117_D37R0102_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_192_D37R0102_bin, - .mapsec = MAPSEC_GOLDENROD_TUNNEL, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0058_D37R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0094_D37R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0355_D37R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0117_D37R0102_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_192_D37R0102_bin, + .mapsec = MAPSEC_GOLDENROD_TUNNEL, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D37R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0059_D37R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0095_D37R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0356_D37R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0118_D37R0103_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_193_D37R0103_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0059_D37R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0095_D37R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0356_D37R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0118_D37R0103_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_193_D37R0103_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D37R0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0060_D37R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0096_D37R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0357_D37R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0119_D37R0104_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_194_D37R0104_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0060_D37R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0096_D37R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0357_D37R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0119_D37R0104_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_194_D37R0104_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D37R0105] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 62, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0061_D37R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0097_D37R0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0358_D37R0105_hdr_bin, - .msg_bank = NARC_msg_msg_0120_D37R0105_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_195_D37R0105_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 62, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0061_D37R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0097_D37R0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0358_D37R0105_hdr_bin, + .msg_bank = NARC_msg_msg_0120_D37R0105_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_195_D37R0105_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0892_T25R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0665_T25R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0586_T25R0401_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_196_T25R0401_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0892_T25R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0665_T25R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0586_T25R0401_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_196_T25R0401_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0891_T25R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0664_T25R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0585_T25R0301_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_197_T25R0301_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0891_T25R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0664_T25R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0585_T25R0301_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_197_T25R0301_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0801] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0897_T25R0801_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0670_T25R0801_hdr_bin, - .msg_bank = NARC_msg_msg_0590_T25R0801_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_198_T25R0801_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0897_T25R0801_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0670_T25R0801_hdr_bin, + .msg_bank = NARC_msg_msg_0590_T25R0801_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_198_T25R0801_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0901] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0140_T25R0901_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0898_T25R0901_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0671_T25R0901_hdr_bin, - .msg_bank = NARC_msg_msg_0591_T25R0901_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_199_T25R0901_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0140_T25R0901_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0898_T25R0901_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0671_T25R0901_hdr_bin, + .msg_bank = NARC_msg_msg_0591_T25R0901_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_199_T25R0901_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 45, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0237_T25R1201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0907_T25R1201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0680_T25R1201_hdr_bin, - .msg_bank = NARC_msg_msg_0600_T25R1201_bin, - .day_music_id = SEQ_GS_WIFITOWER, - .night_music_id = SEQ_GS_WIFITOWER, - .events_bank = NARC_zone_event_200_T25R1201_bin, - .mapsec = MAPSEC_GLOBAL_TERMINAL, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 45, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0237_T25R1201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0907_T25R1201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0680_T25R1201_hdr_bin, + .msg_bank = NARC_msg_msg_0600_T25R1201_bin, + .day_music_id = SEQ_GS_WIFITOWER, + .night_music_id = SEQ_GS_WIFITOWER, + .events_bank = NARC_zone_event_200_T25R1201_bin, + .mapsec = MAPSEC_GLOBAL_TERMINAL, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0119_T25R1301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0119_T25R1301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1302] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0120_T25R1302_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0120_T25R1302_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1303] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0121_T25R1303_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0121_T25R1303_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1304] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0122_T25R1304_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0122_T25R1304_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1305] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0123_T25R1305_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0123_T25R1305_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1306] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0124_T25R1306_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0124_T25R1306_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R39R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0128_R39R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0250_R39R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0495_R39R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0397_R39R0101_bin, - .day_music_id = SEQ_GS_R_6_38, - .night_music_id = SEQ_GS_R_6_38, - .events_bank = NARC_zone_event_201_R39R0101_bin, - .mapsec = MAPSEC_ROUTE_39, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0128_R39R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0250_R39R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0495_R39R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0397_R39R0101_bin, + .day_music_id = SEQ_GS_R_6_38, + .night_music_id = SEQ_GS_R_6_38, + .events_bank = NARC_zone_event_201_R39R0101_bin, + .mapsec = MAPSEC_ROUTE_39, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R39R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0129_R39R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0251_R39R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0496_R39R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0398_R39R0201_bin, - .day_music_id = SEQ_GS_R_6_38, - .night_music_id = SEQ_GS_R_6_38, - .events_bank = NARC_zone_event_202_R39R0201_bin, - .mapsec = MAPSEC_ROUTE_39, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0129_R39R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0251_R39R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0496_R39R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0398_R39R0201_bin, + .day_music_id = SEQ_GS_R_6_38, + .night_music_id = SEQ_GS_R_6_38, + .events_bank = NARC_zone_event_202_R39R0201_bin, + .mapsec = MAPSEC_ROUTE_39, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T27R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0130_T27R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_ENJU, - .night_music_id = SEQ_GS_C_ENJU, - .events_bank = NARC_zone_event_203_T27R0202_bin, - .mapsec = MAPSEC_ECRUTEAK_CITY, - .area_icon = 9, - .unk_12_C = 7, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0130_T27R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_ENJU, + .night_music_id = SEQ_GS_C_ENJU, + .events_bank = NARC_zone_event_203_T27R0202_bin, + .mapsec = MAPSEC_ECRUTEAK_CITY, + .area_icon = 9, + .unk_12_C = 7, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D18R0102] = { .wild_encounter_bank = ENCDATA_D18R0102, - .area_data_bank = 78, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0026_D18R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0024_D18R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0285_D18R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0061_D18R0102_bin, - .day_music_id = SEQ_GS_TO_YAKETA, - .night_music_id = SEQ_GS_TO_YAKETA, - .events_bank = NARC_zone_event_204_D18R0102_bin, - .mapsec = MAPSEC_BURNED_TOWER, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 78, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0026_D18R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0024_D18R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0285_D18R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0061_D18R0102_bin, + .day_music_id = SEQ_GS_TO_YAKETA, + .night_music_id = SEQ_GS_TO_YAKETA, + .events_bank = NARC_zone_event_204_D18R0102_bin, + .mapsec = MAPSEC_BURNED_TOWER, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0888_T25PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0661_T25PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_205_T25PC0102_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0888_T25PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0661_T25PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_205_T25PC0102_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 47, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0048_D27R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_206_D27R0102_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 47, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0048_D27R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_206_D27R0102_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 74, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0049_D27R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0063_D27R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0324_D27R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_207_D27R0103_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 3, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 74, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0049_D27R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0063_D27R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0324_D27R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_207_D27R0103_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 3, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 47, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0050_D27R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_208_D27R0104_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 47, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0050_D27R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_208_D27R0104_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0105] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 47, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0051_D27R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0064_D27R0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0325_D27R0105_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_209_D27R0105_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 47, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0051_D27R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0064_D27R0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0325_D27R0105_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_209_D27R0105_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0106] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 47, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0052_D27R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0065_D27R0106_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0326_D27R0106_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_210_D27R0106_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 47, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0052_D27R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0065_D27R0106_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0326_D27R0106_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_210_D27R0106_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0107] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 89, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0131_D27R0107_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0066_D27R0107_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0327_D27R0107_hdr_bin, - .msg_bank = NARC_msg_msg_0094_D27R0107_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_211_D27R0107_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 89, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0131_D27R0107_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0066_D27R0107_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0327_D27R0107_hdr_bin, + .msg_bank = NARC_msg_msg_0094_D27R0107_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_211_D27R0107_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0914_T26PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0687_T26PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0607_T26PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_212_T26PC0101_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0914_T26PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0687_T26PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0607_T26PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_212_T26PC0101_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0912_T26FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0685_T26FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0605_T26FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_213_T26FS0101_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0912_T26FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0685_T26FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0605_T26FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_213_T26FS0101_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0916_T26R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0689_T26R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0608_T26R0301_bin, - .day_music_id = SEQ_GS_C_ASAGI, - .night_music_id = SEQ_GS_C_ASAGI, - .events_bank = NARC_zone_event_214_T26R0301_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0916_T26R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0689_T26R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0608_T26R0301_bin, + .day_music_id = SEQ_GS_C_ASAGI, + .night_music_id = SEQ_GS_C_ASAGI, + .events_bank = NARC_zone_event_214_T26R0301_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0917_T26R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0690_T26R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0609_T26R0501_bin, - .day_music_id = SEQ_GS_C_ASAGI, - .night_music_id = SEQ_GS_C_ASAGI, - .events_bank = NARC_zone_event_215_T26R0501_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0917_T26R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0690_T26R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0609_T26R0501_bin, + .day_music_id = SEQ_GS_C_ASAGI, + .night_music_id = SEQ_GS_C_ASAGI, + .events_bank = NARC_zone_event_215_T26R0501_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0918_T26R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0691_T26R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0610_T26R0601_bin, - .day_music_id = SEQ_GS_C_ASAGI, - .night_music_id = SEQ_GS_C_ASAGI, - .events_bank = NARC_zone_event_216_T26R0601_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0918_T26R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0691_T26R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0610_T26R0601_bin, + .day_music_id = SEQ_GS_C_ASAGI, + .night_music_id = SEQ_GS_C_ASAGI, + .events_bank = NARC_zone_event_216_T26R0601_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26R0701] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0136_T26R0701_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0919_T26R0701_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0692_T26R0701_hdr_bin, - .msg_bank = NARC_msg_msg_0611_T26R0701_bin, - .day_music_id = SEQ_GS_C_ASAGI, - .night_music_id = SEQ_GS_C_ASAGI, - .events_bank = NARC_zone_event_217_T26R0701_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0136_T26R0701_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0919_T26R0701_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0692_T26R0701_hdr_bin, + .msg_bank = NARC_msg_msg_0611_T26R0701_bin, + .day_music_id = SEQ_GS_C_ASAGI, + .night_music_id = SEQ_GS_C_ASAGI, + .events_bank = NARC_zone_event_217_T26R0701_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0880_T24R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0653_T24R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0576_T24R0201_bin, - .day_music_id = SEQ_GS_C_TANBA, - .night_music_id = SEQ_GS_C_TANBA, - .events_bank = NARC_zone_event_218_T24R0201_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0880_T24R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0653_T24R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0576_T24R0201_bin, + .day_music_id = SEQ_GS_C_TANBA, + .night_music_id = SEQ_GS_C_TANBA, + .events_bank = NARC_zone_event_218_T24R0201_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0139_T24R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0881_T24R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0654_T24R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0577_T24R0501_bin, - .day_music_id = SEQ_GS_C_TANBA, - .night_music_id = SEQ_GS_C_TANBA, - .events_bank = NARC_zone_event_219_T24R0501_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0139_T24R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0881_T24R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0654_T24R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0577_T24R0501_bin, + .day_music_id = SEQ_GS_C_TANBA, + .night_music_id = SEQ_GS_C_TANBA, + .events_bank = NARC_zone_event_219_T24R0501_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0882_T24R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0655_T24R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0578_T24R0601_bin, - .day_music_id = SEQ_GS_C_TANBA, - .night_music_id = SEQ_GS_C_TANBA, - .events_bank = NARC_zone_event_220_T24R0601_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0882_T24R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0655_T24R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0578_T24R0601_bin, + .day_music_id = SEQ_GS_C_TANBA, + .night_music_id = SEQ_GS_C_TANBA, + .events_bank = NARC_zone_event_220_T24R0601_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24R0701] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0883_T24R0701_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0656_T24R0701_hdr_bin, - .msg_bank = NARC_msg_msg_0579_T24R0701_bin, - .day_music_id = SEQ_GS_C_TANBA, - .night_music_id = SEQ_GS_C_TANBA, - .events_bank = NARC_zone_event_221_T24R0701_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0883_T24R0701_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0656_T24R0701_hdr_bin, + .msg_bank = NARC_msg_msg_0579_T24R0701_bin, + .day_music_id = SEQ_GS_C_TANBA, + .night_music_id = SEQ_GS_C_TANBA, + .events_bank = NARC_zone_event_221_T24R0701_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0878_T24PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0651_T24PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0575_T24PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_222_T24PC0101_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0878_T24PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0651_T24PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0575_T24PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_222_T24PC0101_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D39R0102] = { .wild_encounter_bank = ENCDATA_D39R0102, - .area_data_bank = 76, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0133_D39R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0100_D39R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0361_D39R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_223_D39R0102_bin, - .mapsec = MAPSEC_ICE_PATH, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 76, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0133_D39R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0100_D39R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0361_D39R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_223_D39R0102_bin, + .mapsec = MAPSEC_ICE_PATH, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D39R0103] = { .wild_encounter_bank = ENCDATA_D39R0103, - .area_data_bank = 76, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0134_D39R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0101_D39R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0362_D39R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0123_D39R0103_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_224_D39R0103_bin, - .mapsec = MAPSEC_ICE_PATH, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 76, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0134_D39R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0101_D39R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0362_D39R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0123_D39R0103_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_224_D39R0103_bin, + .mapsec = MAPSEC_ICE_PATH, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D39R0104] = { .wild_encounter_bank = ENCDATA_D39R0104, - .area_data_bank = 76, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0135_D39R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_225_D39R0104_bin, - .mapsec = MAPSEC_ICE_PATH, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 76, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0135_D39R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_225_D39R0104_bin, + .mapsec = MAPSEC_ICE_PATH, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0137_P01R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0152_P01R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0402_P01R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0255_P01R0101_bin, - .day_music_id = SEQ_GS_C_ASAGI, - .night_music_id = SEQ_GS_C_ASAGI, - .events_bank = NARC_zone_event_226_P01R0101_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0137_P01R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0152_P01R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0402_P01R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0255_P01R0101_bin, + .day_music_id = SEQ_GS_C_ASAGI, + .night_music_id = SEQ_GS_C_ASAGI, + .events_bank = NARC_zone_event_226_P01R0101_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0879_T24PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0652_T24PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_227_T24PC0102_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0879_T24PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0652_T24PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_227_T24PC0102_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D40R0102] = { .wild_encounter_bank = ENCDATA_D40R0102, - .area_data_bank = 85, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0142_D40R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0102_D40R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0363_D40R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_228_D40R0102_bin, - .mapsec = MAPSEC_WHIRL_ISLANDS, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 85, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0142_D40R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0102_D40R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0363_D40R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_228_D40R0102_bin, + .mapsec = MAPSEC_WHIRL_ISLANDS, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D40R0104] = { .wild_encounter_bank = ENCDATA_D40R0104, - .area_data_bank = 85, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0143_D40R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0103_D40R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0364_D40R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0124_D40R0104_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_229_D40R0104_bin, - .mapsec = MAPSEC_WHIRL_ISLANDS, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 85, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0143_D40R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0103_D40R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0364_D40R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0124_D40R0104_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_229_D40R0104_bin, + .mapsec = MAPSEC_WHIRL_ISLANDS, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D40R0107] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 98, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0144_D40R0107_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0104_D40R0107_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0365_D40R0107_hdr_bin, - .msg_bank = NARC_msg_msg_0125_D40R0107_bin, - .day_music_id = SEQ_SILENCE_FIELD, - .night_music_id = SEQ_SILENCE_FIELD, - .events_bank = NARC_zone_event_230_D40R0107_bin, - .mapsec = MAPSEC_WHIRL_ISLANDS, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 12, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 98, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0144_D40R0107_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0104_D40R0107_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0365_D40R0107_hdr_bin, + .msg_bank = NARC_msg_msg_0125_D40R0107_bin, + .day_music_id = SEQ_SILENCE_FIELD, + .night_music_id = SEQ_SILENCE_FIELD, + .events_bank = NARC_zone_event_230_D40R0107_bin, + .mapsec = MAPSEC_WHIRL_ISLANDS, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 12, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_R43R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0256_R43R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0501_R43R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0403_R43R0201_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_231_R43R0201_bin, - .mapsec = MAPSEC_ROUTE_43, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0256_R43R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0501_R43R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0403_R43R0201_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_231_R43R0201_bin, + .mapsec = MAPSEC_ROUTE_43, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T28PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0935_T28PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0708_T28PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0624_T28PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_232_T28PC0101_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0935_T28PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0708_T28PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0624_T28PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_232_T28PC0101_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D35R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 64, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0053_D35R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0089_D35R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0350_D35R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0112_D35R0102_bin, - .day_music_id = SEQ_GS_D_AJITO, - .night_music_id = SEQ_GS_D_AJITO, - .events_bank = NARC_zone_event_233_D35R0102_bin, - .mapsec = MAPSEC_TEAM_ROCKET_HQ, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 64, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0053_D35R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0089_D35R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0350_D35R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0112_D35R0102_bin, + .day_music_id = SEQ_GS_D_AJITO, + .night_music_id = SEQ_GS_D_AJITO, + .events_bank = NARC_zone_event_233_D35R0102_bin, + .mapsec = MAPSEC_TEAM_ROCKET_HQ, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D35R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 64, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0054_D35R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0090_D35R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0351_D35R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0113_D35R0103_bin, - .day_music_id = SEQ_GS_D_AJITO, - .night_music_id = SEQ_GS_D_AJITO, - .events_bank = NARC_zone_event_234_D35R0103_bin, - .mapsec = MAPSEC_TEAM_ROCKET_HQ, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 64, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0054_D35R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0090_D35R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0351_D35R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0113_D35R0103_bin, + .day_music_id = SEQ_GS_D_AJITO, + .night_music_id = SEQ_GS_D_AJITO, + .events_bank = NARC_zone_event_234_D35R0103_bin, + .mapsec = MAPSEC_TEAM_ROCKET_HQ, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D35R0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 64, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0055_D35R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0091_D35R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0352_D35R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0114_D35R0104_bin, - .day_music_id = SEQ_GS_D_AJITO, - .night_music_id = SEQ_GS_D_AJITO, - .events_bank = NARC_zone_event_235_D35R0104_bin, - .mapsec = MAPSEC_TEAM_ROCKET_HQ, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 64, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0055_D35R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0091_D35R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0352_D35R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0114_D35R0104_bin, + .day_music_id = SEQ_GS_D_AJITO, + .night_music_id = SEQ_GS_D_AJITO, + .events_bank = NARC_zone_event_235_D35R0104_bin, + .mapsec = MAPSEC_TEAM_ROCKET_HQ, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D38R0102] = { .wild_encounter_bank = ENCDATA_D38R0102, - .area_data_bank = 79, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0063_D38R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_236_D38R0102_bin, - .mapsec = MAPSEC_MT_MORTAR, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 79, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0063_D38R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_236_D38R0102_bin, + .mapsec = MAPSEC_MT_MORTAR, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D38R0103] = { .wild_encounter_bank = ENCDATA_D38R0103, - .area_data_bank = 79, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0064_D38R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_237_D38R0103_bin, - .mapsec = MAPSEC_MT_MORTAR, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 79, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0064_D38R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_237_D38R0103_bin, + .mapsec = MAPSEC_MT_MORTAR, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D38R0104] = { .wild_encounter_bank = ENCDATA_D38R0104, - .area_data_bank = 79, - .move_model_bank = 15, - .world_map_x = 14, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0065_D38R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0098_D38R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0359_D38R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0121_D38R0104_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_238_D38R0104_bin, - .mapsec = MAPSEC_MT_MORTAR, - .area_icon = 4, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 79, + .move_model_bank = 15, + .world_map_x = 14, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0065_D38R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0098_D38R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0359_D38R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0121_D38R0104_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_238_D38R0104_bin, + .mapsec = MAPSEC_MT_MORTAR, + .area_icon = 4, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D44R0102] = { .wild_encounter_bank = ENCDATA_D44R0102, - .area_data_bank = 86, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0146_D44R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0111_D44R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0372_D44R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0129_D44R0102_bin, - .day_music_id = SEQ_GS_RYUUNOANA, - .night_music_id = SEQ_GS_RYUUNOANA, - .events_bank = NARC_zone_event_239_D44R0102_bin, - .mapsec = MAPSEC_DRAGONS_DEN, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 86, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0146_D44R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0111_D44R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0372_D44R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0129_D44R0102_bin, + .day_music_id = SEQ_GS_RYUUNOANA, + .night_music_id = SEQ_GS_RYUUNOANA, + .events_bank = NARC_zone_event_239_D44R0102_bin, + .mapsec = MAPSEC_DRAGONS_DEN, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 2, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 2, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_C11PC0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_FIGHT_AREA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_FIGHT_AREA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D31] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_BATTLE_PARK, - .area_icon = 2, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_BATTLE_PARK, + .area_icon = 2, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D31R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_BATTLE_PARK, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_BATTLE_PARK, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D31R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 56, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0232_D31R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0069_D31R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0330_D31R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0096_D31R0201_bin, - .day_music_id = SEQ_GS_BATTLETOWER2, - .night_music_id = SEQ_GS_BATTLETOWER2, - .events_bank = NARC_zone_event_240_D31R0201_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 16, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 56, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0232_D31R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0069_D31R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0330_D31R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0096_D31R0201_bin, + .day_music_id = SEQ_GS_BATTLETOWER2, + .night_music_id = SEQ_GS_BATTLETOWER2, + .events_bank = NARC_zone_event_240_D31R0201_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 16, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D31R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0070_D31R0202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0331_D31R0202_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER2, - .night_music_id = SEQ_GS_BATTLETOWER2, - .events_bank = NARC_zone_event_241_D31R0202_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0070_D31R0202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0331_D31R0202_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER2, + .night_music_id = SEQ_GS_BATTLETOWER2, + .events_bank = NARC_zone_event_241_D31R0202_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D31R0203] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D31R0204] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D31R0205] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D31R0206] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 2, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 2, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D31R0207] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 38, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0263_D31R0207_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0075_D31R0207_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0336_D31R0207_hdr_bin, - .msg_bank = NARC_msg_msg_0099_D31R0207_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_242_D31R0207_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 38, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0263_D31R0207_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0075_D31R0207_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0336_D31R0207_hdr_bin, + .msg_bank = NARC_msg_msg_0099_D31R0207_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_242_D31R0207_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 92, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0230_D32_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0076_D32_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0337_D32_hdr_bin, - .msg_bank = NARC_msg_msg_0100_D32_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_243_D32_bin, - .mapsec = MAPSEC_BATTLE_FRONTIER, - .area_icon = 1, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 8, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 92, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0230_D32_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0076_D32_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0337_D32_hdr_bin, + .msg_bank = NARC_msg_msg_0100_D32_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_243_D32_bin, + .mapsec = MAPSEC_BATTLE_FRONTIER, + .area_icon = 1, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 8, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 46, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0231_D32R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0080_D32R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0341_D32R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0103_D32R0101_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_244_D32R0101_bin, - .mapsec = MAPSEC_BATTLE_FRONTIER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 46, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0231_D32R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0080_D32R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0341_D32R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0103_D32R0101_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_244_D32R0101_bin, + .mapsec = MAPSEC_BATTLE_FRONTIER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 56, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0232_D31R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0083_D32R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0344_D32R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_BATTLETOWER2, - .night_music_id = SEQ_GS_BATTLETOWER2, - .events_bank = NARC_zone_event_245_D32R0201_bin, - .mapsec = MAPSEC_BATTLE_TOWER, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 56, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0232_D31R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0083_D32R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0344_D32R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_BATTLETOWER2, + .night_music_id = SEQ_GS_BATTLETOWER2, + .events_bank = NARC_zone_event_245_D32R0201_bin, + .mapsec = MAPSEC_BATTLE_TOWER, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 57, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0233_D32R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0084_D32R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0345_D32R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0107_D32R0301_bin, - .day_music_id = SEQ_GS_BF_FACTORY, - .night_music_id = SEQ_GS_BF_FACTORY, - .events_bank = NARC_zone_event_246_D32R0301_bin, - .mapsec = MAPSEC_BATTLE_FACTORY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 16, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = FALSE, + .area_data_bank = 57, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0233_D32R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0084_D32R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0345_D32R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0107_D32R0301_bin, + .day_music_id = SEQ_GS_BF_FACTORY, + .night_music_id = SEQ_GS_BF_FACTORY, + .events_bank = NARC_zone_event_246_D32R0301_bin, + .mapsec = MAPSEC_BATTLE_FACTORY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 16, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = FALSE, }, [MAP_D32R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 58, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0234_D32R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0085_D32R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0346_D32R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0108_D32R0401_bin, - .day_music_id = SEQ_GS_BF_STAGE, - .night_music_id = SEQ_GS_BF_STAGE, - .events_bank = NARC_zone_event_247_D32R0401_bin, - .mapsec = MAPSEC_BATTLE_HALL, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 16, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = FALSE, + .area_data_bank = 58, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0234_D32R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0085_D32R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0346_D32R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0108_D32R0401_bin, + .day_music_id = SEQ_GS_BF_STAGE, + .night_music_id = SEQ_GS_BF_STAGE, + .events_bank = NARC_zone_event_247_D32R0401_bin, + .mapsec = MAPSEC_BATTLE_HALL, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 16, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = FALSE, }, [MAP_D32R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 59, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0235_D32R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0086_D32R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0347_D32R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0109_D32R0501_bin, - .day_music_id = SEQ_GS_BF_CASTLE, - .night_music_id = SEQ_GS_BF_CASTLE, - .events_bank = NARC_zone_event_248_D32R0501_bin, - .mapsec = MAPSEC_BATTLE_CASTLE, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 16, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = FALSE, + .area_data_bank = 59, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0235_D32R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0086_D32R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0347_D32R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0109_D32R0501_bin, + .day_music_id = SEQ_GS_BF_CASTLE, + .night_music_id = SEQ_GS_BF_CASTLE, + .events_bank = NARC_zone_event_248_D32R0501_bin, + .mapsec = MAPSEC_BATTLE_CASTLE, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 16, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = FALSE, }, [MAP_D32R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 60, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0236_D32R0601_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0087_D32R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0348_D32R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0110_D32R0601_bin, - .day_music_id = SEQ_GS_BF_ROULETTE, - .night_music_id = SEQ_GS_BF_ROULETTE, - .events_bank = NARC_zone_event_249_D32R0601_bin, - .mapsec = MAPSEC_BATTLE_ARCADE, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 13, - .location_type = 4, - .camera_type = 16, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = FALSE, + .area_data_bank = 60, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0236_D32R0601_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0087_D32R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0348_D32R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0110_D32R0601_bin, + .day_music_id = SEQ_GS_BF_ROULETTE, + .night_music_id = SEQ_GS_BF_ROULETTE, + .events_bank = NARC_zone_event_249_D32R0601_bin, + .mapsec = MAPSEC_BATTLE_ARCADE, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 13, + .location_type = 4, + .camera_type = 16, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = FALSE, }, [MAP_D48R0101] = { .wild_encounter_bank = ENCDATA_D48R0101, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0152_D48R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0121_D48R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0382_D48R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0136_D48R0101_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_250_D48R0101_bin, - .mapsec = MAPSEC_CLIFF_EDGE_GATE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0152_D48R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0121_D48R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0382_D48R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0136_D48R0101_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_250_D48R0101_bin, + .mapsec = MAPSEC_CLIFF_EDGE_GATE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 90, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0153_D49_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0122_D49_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0383_D49_hdr_bin, - .msg_bank = NARC_msg_msg_0137_D49_bin, - .day_music_id = SEQ_GS_R_5_34, - .night_music_id = SEQ_GS_R_5_34, - .events_bank = NARC_zone_event_251_D49_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 1, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 90, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0153_D49_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0122_D49_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0383_D49_hdr_bin, + .msg_bank = NARC_msg_msg_0137_D49_bin, + .day_music_id = SEQ_GS_R_5_34, + .night_music_id = SEQ_GS_R_5_34, + .events_bank = NARC_zone_event_251_D49_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 1, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 37, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0154_D49R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0123_D49R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0384_D49R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0138_D49R0101_bin, - .day_music_id = SEQ_GS_PT_ENTR, - .night_music_id = SEQ_GS_PT_ENTR, - .events_bank = NARC_zone_event_252_D49R0101_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_2, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 37, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0154_D49R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0123_D49R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0384_D49R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0138_D49R0101_bin, + .day_music_id = SEQ_GS_PT_ENTR, + .night_music_id = SEQ_GS_PT_ENTR, + .events_bank = NARC_zone_event_252_D49R0101_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_2, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 37, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0155_D49R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0124_D49R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0385_D49R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0139_D49R0102_bin, - .day_music_id = SEQ_GS_PT_ENTR, - .night_music_id = SEQ_GS_PT_ENTR, - .events_bank = NARC_zone_event_253_D49R0102_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 7, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 37, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0155_D49R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0124_D49R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0385_D49R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0139_D49R0102_bin, + .day_music_id = SEQ_GS_PT_ENTR, + .night_music_id = SEQ_GS_PT_ENTR, + .events_bank = NARC_zone_event_253_D49R0102_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 7, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 37, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0156_D49R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_PT_ENTR, - .night_music_id = SEQ_GS_PT_ENTR, - .events_bank = NARC_zone_event_254_D49R0103_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 37, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0156_D49R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_PT_ENTR, + .night_music_id = SEQ_GS_PT_ENTR, + .events_bank = NARC_zone_event_254_D49R0103_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49R0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 37, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0157_D49R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0125_D49R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0386_D49R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0140_D49R0104_bin, - .day_music_id = SEQ_GS_PT_ENTR, - .night_music_id = SEQ_GS_PT_ENTR, - .events_bank = NARC_zone_event_255_D49R0104_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 37, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0157_D49R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0125_D49R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0386_D49R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0140_D49R0104_bin, + .day_music_id = SEQ_GS_PT_ENTR, + .night_music_id = SEQ_GS_PT_ENTR, + .events_bank = NARC_zone_event_255_D49R0104_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49R0105] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 37, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0158_D49R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0126_D49R0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0387_D49R0105_hdr_bin, - .msg_bank = NARC_msg_msg_0141_D49R0105_bin, - .day_music_id = SEQ_GS_PT_ENTR, - .night_music_id = SEQ_GS_PT_ENTR, - .events_bank = NARC_zone_event_256_D49R0105_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 37, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0158_D49R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0126_D49R0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0387_D49R0105_hdr_bin, + .msg_bank = NARC_msg_msg_0141_D49R0105_bin, + .day_music_id = SEQ_GS_PT_ENTR, + .night_music_id = SEQ_GS_PT_ENTR, + .events_bank = NARC_zone_event_256_D49R0105_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49R0106] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 37, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0159_D49R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0127_D49R0106_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0388_D49R0106_hdr_bin, - .msg_bank = NARC_msg_msg_0142_D49R0106_bin, - .day_music_id = SEQ_GS_PT_ENTR, - .night_music_id = SEQ_GS_PT_ENTR, - .events_bank = NARC_zone_event_257_D49R0106_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 37, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0159_D49R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0127_D49R0106_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0388_D49R0106_hdr_bin, + .msg_bank = NARC_msg_msg_0142_D49R0106_bin, + .day_music_id = SEQ_GS_PT_ENTR, + .night_music_id = SEQ_GS_PT_ENTR, + .events_bank = NARC_zone_event_257_D49R0106_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D49R0107] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 37, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0160_D49R0107_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0128_D49R0107_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0389_D49R0107_hdr_bin, - .msg_bank = NARC_msg_msg_0143_D49R0107_bin, - .day_music_id = SEQ_GS_PT_END_FIELD, - .night_music_id = SEQ_GS_PT_END_FIELD, - .events_bank = NARC_zone_event_258_D49R0107_bin, - .mapsec = MAPSEC_POKEATHLON_DOME, - .area_icon = 9, - .unk_12_C = 13, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 37, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0160_D49R0107_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0128_D49R0107_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0389_D49R0107_hdr_bin, + .msg_bank = NARC_msg_msg_0143_D49R0107_bin, + .day_music_id = SEQ_GS_PT_END_FIELD, + .night_music_id = SEQ_GS_PT_END_FIELD, + .events_bank = NARC_zone_event_258_D49R0107_bin, + .mapsec = MAPSEC_POKEATHLON_DOME, + .area_icon = 9, + .unk_12_C = 13, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D44R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0149_D44R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0112_D44R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0373_D44R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0130_D44R0103_bin, - .day_music_id = SEQ_GS_RYUUNOANA, - .night_music_id = SEQ_GS_RYUUNOANA, - .events_bank = NARC_zone_event_259_D44R0103_bin, - .mapsec = MAPSEC_DRAGONS_DEN, - .area_icon = 9, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0149_D44R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0112_D44R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0373_D44R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0130_D44R0103_bin, + .day_music_id = SEQ_GS_RYUUNOANA, + .night_music_id = SEQ_GS_RYUUNOANA, + .events_bank = NARC_zone_event_259_D44R0103_bin, + .mapsec = MAPSEC_DRAGONS_DEN, + .area_icon = 9, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T30R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0946_T30R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0719_T30R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0633_T30R0201_bin, - .day_music_id = SEQ_GS_C_FUSUBE, - .night_music_id = SEQ_GS_C_FUSUBE, - .events_bank = NARC_zone_event_260_T30R0201_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0946_T30R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0719_T30R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0633_T30R0201_bin, + .day_music_id = SEQ_GS_C_FUSUBE, + .night_music_id = SEQ_GS_C_FUSUBE, + .events_bank = NARC_zone_event_260_T30R0201_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T30R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0947_T30R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0720_T30R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0634_T30R0301_bin, - .day_music_id = SEQ_GS_C_FUSUBE, - .night_music_id = SEQ_GS_C_FUSUBE, - .events_bank = NARC_zone_event_261_T30R0301_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0947_T30R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0720_T30R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0634_T30R0301_bin, + .day_music_id = SEQ_GS_C_FUSUBE, + .night_music_id = SEQ_GS_C_FUSUBE, + .events_bank = NARC_zone_event_261_T30R0301_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T30R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0948_T30R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0721_T30R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0635_T30R0601_bin, - .day_music_id = SEQ_GS_C_FUSUBE, - .night_music_id = SEQ_GS_C_FUSUBE, - .events_bank = NARC_zone_event_262_T30R0601_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0948_T30R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0721_T30R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0635_T30R0601_bin, + .day_music_id = SEQ_GS_C_FUSUBE, + .night_music_id = SEQ_GS_C_FUSUBE, + .events_bank = NARC_zone_event_262_T30R0601_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T30FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0942_T30FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0715_T30FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0630_T30FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_263_T30FS0101_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0942_T30FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0715_T30FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0630_T30FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_263_T30FS0101_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T30PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0944_T30PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0717_T30PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0632_T30PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_264_T30PC0101_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0944_T30PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0717_T30PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0632_T30PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_264_T30PC0101_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T29R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 15, - .world_map_y = 1, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0939_T29R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0712_T29R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0627_T29R0101_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_265_T29R0101_bin, - .mapsec = MAPSEC_LAKE_OF_RAGE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 15, + .world_map_y = 1, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0939_T29R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0712_T29R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0627_T29R0101_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_265_T29R0101_bin, + .mapsec = MAPSEC_LAKE_OF_RAGE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T29R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 2, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0940_T29R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0713_T29R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0628_T29R0201_bin, - .day_music_id = SEQ_GS_R_7_42, - .night_music_id = SEQ_GS_R_7_42, - .events_bank = NARC_zone_event_266_T29R0201_bin, - .mapsec = MAPSEC_LAKE_OF_RAGE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 2, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0940_T29R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0713_T29R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0628_T29R0201_bin, + .day_music_id = SEQ_GS_R_7_42, + .night_music_id = SEQ_GS_R_7_42, + .events_bank = NARC_zone_event_266_T29R0201_bin, + .mapsec = MAPSEC_LAKE_OF_RAGE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R26R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0219_R26R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0464_R26R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0366_R26R0101_bin, - .day_music_id = SEQ_GS_R_1_26, - .night_music_id = SEQ_GS_R_1_26, - .events_bank = NARC_zone_event_267_R26R0101_bin, - .mapsec = MAPSEC_ROUTE_26, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0219_R26R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0464_R26R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0366_R26R0101_bin, + .day_music_id = SEQ_GS_R_1_26, + .night_music_id = SEQ_GS_R_1_26, + .events_bank = NARC_zone_event_267_R26R0101_bin, + .mapsec = MAPSEC_ROUTE_26, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R26R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0147_R26R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0220_R26R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0465_R26R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0367_R26R0201_bin, - .day_music_id = SEQ_GS_R_1_26, - .night_music_id = SEQ_GS_R_1_26, - .events_bank = NARC_zone_event_268_R26R0201_bin, - .mapsec = MAPSEC_ROUTE_26, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0147_R26R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0220_R26R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0465_R26R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0367_R26R0201_bin, + .day_music_id = SEQ_GS_R_1_26, + .night_music_id = SEQ_GS_R_1_26, + .events_bank = NARC_zone_event_268_R26R0201_bin, + .mapsec = MAPSEC_ROUTE_26, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D45R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 23, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0164_D45R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0114_D45R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0375_D45R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0131_D45R0102_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_269_D45R0102_bin, - .mapsec = MAPSEC_TOHJO_FALLS, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 23, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0164_D45R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0114_D45R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0375_D45R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0131_D45R0102_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_269_D45R0102_bin, + .mapsec = MAPSEC_TOHJO_FALLS, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_R22R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0150_R22R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0213_R22R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0458_R22R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0361_R22R0101_bin, - .day_music_id = SEQ_GS_R_1_26, - .night_music_id = SEQ_GS_R_1_26, - .events_bank = NARC_zone_event_270_R22R0101_bin, - .mapsec = MAPSEC_ROUTE_26, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0150_R22R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0213_R22R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0458_R22R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0361_R22R0101_bin, + .day_music_id = SEQ_GS_R_1_26, + .night_music_id = SEQ_GS_R_1_26, + .events_bank = NARC_zone_event_270_R22R0101_bin, + .mapsec = MAPSEC_ROUTE_26, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T10R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0148_T10R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0819_T10R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0592_T10R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0522_T10R0101_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_271_T10R0101_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0148_T10R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0819_T10R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0592_T10R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0522_T10R0101_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_271_T10R0101_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T10R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 41, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0165_T10R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0820_T10R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0593_T10R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0523_T10R0201_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_272_T10R0201_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_WILL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 41, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0165_T10R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0820_T10R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0593_T10R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0523_T10R0201_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_272_T10R0201_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_WILL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T10R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 41, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0166_T10R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0821_T10R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0594_T10R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0524_T10R0301_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_273_T10R0301_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_KOGA, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 41, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0166_T10R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0821_T10R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0594_T10R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0524_T10R0301_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_273_T10R0301_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_KOGA, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T10R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 41, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0167_T10R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0822_T10R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0595_T10R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0525_T10R0401_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_274_T10R0401_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BRUNO, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 41, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0167_T10R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0822_T10R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0595_T10R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0525_T10R0401_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_274_T10R0401_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BRUNO, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T10R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 41, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0168_T10R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0823_T10R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0596_T10R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0526_T10R0501_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_275_T10R0501_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_KAREN, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 41, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0168_T10R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0823_T10R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0596_T10R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0526_T10R0501_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_275_T10R0501_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_KAREN, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T10R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 65, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0169_T10R0601_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0824_T10R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0597_T10R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0527_T10R0601_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_276_T10R0601_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_LANCE, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 65, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0169_T10R0601_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0824_T10R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0597_T10R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0527_T10R0601_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_276_T10R0601_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_LANCE, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T10R0701] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 65, - .move_model_bank = 15, - .world_map_x = 28, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0170_T10R0701_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0825_T10R0701_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0598_T10R0701_hdr_bin, - .msg_bank = NARC_msg_msg_0528_T10R0701_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_277_T10R0701_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 65, + .move_model_bank = 15, + .world_map_x = 28, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0170_T10R0701_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0825_T10R0701_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0598_T10R0701_hdr_bin, + .msg_bank = NARC_msg_msg_0528_T10R0701_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_277_T10R0701_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_P01R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0171_P01R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0156_P01R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0406_P01R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0259_P01R0301_bin, - .day_music_id = SEQ_GS_KOUSOKUSEN, - .night_music_id = SEQ_GS_KOUSOKUSEN, - .events_bank = NARC_zone_event_278_P01R0301_bin, - .mapsec = MAPSEC_SS_AQUA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0171_P01R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0156_P01R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0406_P01R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0259_P01R0301_bin, + .day_music_id = SEQ_GS_KOUSOKUSEN, + .night_music_id = SEQ_GS_KOUSOKUSEN, + .events_bank = NARC_zone_event_278_P01R0301_bin, + .mapsec = MAPSEC_SS_AQUA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0302] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0172_P01R0302_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0157_P01R0302_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0407_P01R0302_hdr_bin, - .msg_bank = NARC_msg_msg_0260_P01R0302_bin, - .day_music_id = SEQ_GS_KOUSOKUSEN, - .night_music_id = SEQ_GS_KOUSOKUSEN, - .events_bank = NARC_zone_event_279_P01R0302_bin, - .mapsec = MAPSEC_SS_AQUA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0172_P01R0302_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0157_P01R0302_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0407_P01R0302_hdr_bin, + .msg_bank = NARC_msg_msg_0260_P01R0302_bin, + .day_music_id = SEQ_GS_KOUSOKUSEN, + .night_music_id = SEQ_GS_KOUSOKUSEN, + .events_bank = NARC_zone_event_279_P01R0302_bin, + .mapsec = MAPSEC_SS_AQUA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0303] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0173_P01R0303_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0158_P01R0303_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0408_P01R0303_hdr_bin, - .msg_bank = NARC_msg_msg_0261_P01R0303_bin, - .day_music_id = SEQ_GS_KOUSOKUSEN, - .night_music_id = SEQ_GS_KOUSOKUSEN, - .events_bank = NARC_zone_event_280_P01R0303_bin, - .mapsec = MAPSEC_SS_AQUA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0173_P01R0303_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0158_P01R0303_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0408_P01R0303_hdr_bin, + .msg_bank = NARC_msg_msg_0261_P01R0303_bin, + .day_music_id = SEQ_GS_KOUSOKUSEN, + .night_music_id = SEQ_GS_KOUSOKUSEN, + .events_bank = NARC_zone_event_280_P01R0303_bin, + .mapsec = MAPSEC_SS_AQUA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0304] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0174_P01R0304_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0159_P01R0304_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0409_P01R0304_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_KOUSOKUSEN, - .night_music_id = SEQ_GS_KOUSOKUSEN, - .events_bank = NARC_zone_event_281_P01R0304_bin, - .mapsec = MAPSEC_SS_AQUA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0174_P01R0304_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0159_P01R0304_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0409_P01R0304_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_KOUSOKUSEN, + .night_music_id = SEQ_GS_KOUSOKUSEN, + .events_bank = NARC_zone_event_281_P01R0304_bin, + .mapsec = MAPSEC_SS_AQUA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0305] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0175_P01R0305_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0160_P01R0305_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0410_P01R0305_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_KOUSOKUSEN, - .night_music_id = SEQ_GS_KOUSOKUSEN, - .events_bank = NARC_zone_event_282_P01R0305_bin, - .mapsec = MAPSEC_SS_AQUA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0175_P01R0305_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0160_P01R0305_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0410_P01R0305_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_KOUSOKUSEN, + .night_music_id = SEQ_GS_KOUSOKUSEN, + .events_bank = NARC_zone_event_282_P01R0305_bin, + .mapsec = MAPSEC_SS_AQUA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0039_D24R0202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0300_D24R0202_hdr_bin, - .msg_bank = NARC_msg_msg_0074_D24R0202_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_283_D24R0202_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0039_D24R0202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0300_D24R0202_hdr_bin, + .msg_bank = NARC_msg_msg_0074_D24R0202_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_283_D24R0202_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0203] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0035_D24R0203_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0040_D24R0203_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0301_D24R0203_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_284_D24R0203_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0035_D24R0203_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0040_D24R0203_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0301_D24R0203_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_284_D24R0203_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0204] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0041_D24R0204_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0302_D24R0204_hdr_bin, - .msg_bank = NARC_msg_msg_0075_D24R0204_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_285_D24R0204_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0041_D24R0204_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0302_D24R0204_hdr_bin, + .msg_bank = NARC_msg_msg_0075_D24R0204_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_285_D24R0204_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0205] = { .wild_encounter_bank = ENCDATA_D24R0205, - .area_data_bank = 105, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0037_D24R0205_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0042_D24R0205_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0303_D24R0205_hdr_bin, - .msg_bank = NARC_msg_msg_0076_D24R0205_bin, - .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .events_bank = NARC_zone_event_286_D24R0205_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 105, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0037_D24R0205_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0042_D24R0205_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0303_D24R0205_hdr_bin, + .msg_bank = NARC_msg_msg_0076_D24R0205_bin, + .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .events_bank = NARC_zone_event_286_D24R0205_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0206] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0043_D24R0206_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0304_D24R0206_hdr_bin, - .msg_bank = NARC_msg_msg_0077_D24R0206_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_287_D24R0206_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0043_D24R0206_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0304_D24R0206_hdr_bin, + .msg_bank = NARC_msg_msg_0077_D24R0206_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_287_D24R0206_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0207] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0039_D24R0207_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0044_D24R0207_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0305_D24R0207_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_288_D24R0207_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0039_D24R0207_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0044_D24R0207_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0305_D24R0207_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_288_D24R0207_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0208] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0045_D24R0208_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0306_D24R0208_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_289_D24R0208_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0034_D24R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0045_D24R0208_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0306_D24R0208_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_289_D24R0208_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0209] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0041_D24R0209_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0046_D24R0209_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0307_D24R0209_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_290_D24R0209_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0041_D24R0209_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0046_D24R0209_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0307_D24R0209_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_290_D24R0209_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0210] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0180_D24R0210_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0047_D24R0210_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0308_D24R0210_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_291_D24R0210_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0180_D24R0210_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0047_D24R0210_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0308_D24R0210_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_291_D24R0210_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 61, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0273_D24R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0038_D24R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0299_D24R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0073_D24R0102_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_292_D24R0102_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 61, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0273_D24R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0038_D24R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0299_D24R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0073_D24R0102_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_292_D24R0102_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R27R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 23, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0222_R27R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0467_R27R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0370_R27R0101_bin, - .day_music_id = SEQ_GS_R_1_26, - .night_music_id = SEQ_GS_R_1_26, - .events_bank = NARC_zone_event_293_R27R0101_bin, - .mapsec = MAPSEC_ROUTE_27, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 23, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0222_R27R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0467_R27R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0370_R27R0101_bin, + .day_music_id = SEQ_GS_R_1_26, + .night_music_id = SEQ_GS_R_1_26, + .events_bank = NARC_zone_event_293_R27R0101_bin, + .mapsec = MAPSEC_ROUTE_27, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0211] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 105, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0181_D24R0211_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0048_D24R0211_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0309_D24R0211_hdr_bin, - .msg_bank = NARC_msg_msg_0079_D24R0211_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_294_D24R0211_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 105, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0181_D24R0211_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0048_D24R0211_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0309_D24R0211_hdr_bin, + .msg_bank = NARC_msg_msg_0079_D24R0211_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_294_D24R0211_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0212] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0049_D24R0212_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0310_D24R0212_hdr_bin, - .msg_bank = NARC_msg_msg_0080_D24R0212_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_295_D24R0212_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0049_D24R0212_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0310_D24R0212_hdr_bin, + .msg_bank = NARC_msg_msg_0080_D24R0212_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_295_D24R0212_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0213] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0050_D24R0213_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0311_D24R0213_hdr_bin, - .msg_bank = NARC_msg_msg_0081_D24R0213_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_296_D24R0213_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0050_D24R0213_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0311_D24R0213_hdr_bin, + .msg_bank = NARC_msg_msg_0081_D24R0213_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_296_D24R0213_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0214] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0051_D24R0214_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0312_D24R0214_hdr_bin, - .msg_bank = NARC_msg_msg_0082_D24R0214_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_297_D24R0214_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0051_D24R0214_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0312_D24R0214_hdr_bin, + .msg_bank = NARC_msg_msg_0082_D24R0214_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_297_D24R0214_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0215] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 72, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0052_D24R0215_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0313_D24R0215_hdr_bin, - .msg_bank = NARC_msg_msg_0083_D24R0215_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_298_D24R0215_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 72, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0182_D24R0212_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0052_D24R0215_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0313_D24R0215_hdr_bin, + .msg_bank = NARC_msg_msg_0083_D24R0215_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_298_D24R0215_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0306] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0176_P01R0306_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0161_P01R0306_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0411_P01R0306_hdr_bin, - .msg_bank = NARC_msg_msg_0262_P01R0306_bin, - .day_music_id = SEQ_GS_KOUSOKUSEN, - .night_music_id = SEQ_GS_KOUSOKUSEN, - .events_bank = NARC_zone_event_299_P01R0306_bin, - .mapsec = MAPSEC_SS_AQUA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0176_P01R0306_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0161_P01R0306_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0411_P01R0306_hdr_bin, + .msg_bank = NARC_msg_msg_0262_P01R0306_bin, + .day_music_id = SEQ_GS_KOUSOKUSEN, + .night_music_id = SEQ_GS_KOUSOKUSEN, + .events_bank = NARC_zone_event_299_P01R0306_bin, + .mapsec = MAPSEC_SS_AQUA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0307] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0177_P01R0307_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0162_P01R0307_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0412_P01R0307_hdr_bin, - .msg_bank = NARC_msg_msg_0263_P01R0307_bin, - .day_music_id = SEQ_GS_KOUSOKUSEN, - .night_music_id = SEQ_GS_KOUSOKUSEN, - .events_bank = NARC_zone_event_300_P01R0307_bin, - .mapsec = MAPSEC_SS_AQUA, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0177_P01R0307_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0162_P01R0307_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0412_P01R0307_hdr_bin, + .msg_bank = NARC_msg_msg_0263_P01R0307_bin, + .day_music_id = SEQ_GS_KOUSOKUSEN, + .night_music_id = SEQ_GS_KOUSOKUSEN, + .events_bank = NARC_zone_event_300_P01R0307_bin, + .mapsec = MAPSEC_SS_AQUA, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 94, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0178_P01R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0153_P01R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0403_P01R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0256_P01R0102_bin, - .day_music_id = SEQ_GS_C_ASAGI, - .night_music_id = SEQ_GS_C_ASAGI, - .events_bank = NARC_zone_event_301_P01R0102_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 1, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 94, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0178_P01R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0153_P01R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0403_P01R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0256_P01R0102_bin, + .day_music_id = SEQ_GS_C_ASAGI, + .night_music_id = SEQ_GS_C_ASAGI, + .events_bank = NARC_zone_event_301_P01R0102_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 1, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R34R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0179_R34R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0238_R34R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0483_R34R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0385_R34R0101_bin, - .day_music_id = SEQ_GS_R_4_34, - .night_music_id = SEQ_GS_R_4_34, - .events_bank = NARC_zone_event_302_R34R0101_bin, - .mapsec = MAPSEC_ROUTE_34, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0179_R34R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0238_R34R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0483_R34R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0385_R34R0101_bin, + .day_music_id = SEQ_GS_R_4_34, + .night_music_id = SEQ_GS_R_4_34, + .events_bank = NARC_zone_event_302_R34R0101_bin, + .mapsec = MAPSEC_ROUTE_34, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0102] = { .wild_encounter_bank = ENCDATA_D17R0102, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0016_D17R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_303_D17R0102_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0016_D17R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_303_D17R0102_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0103] = { .wild_encounter_bank = ENCDATA_D17R0103, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0017_D17R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_304_D17R0103_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0017_D17R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_304_D17R0103_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0104] = { .wild_encounter_bank = ENCDATA_D17R0104, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0018_D17R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_305_D17R0104_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0018_D17R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_305_D17R0104_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0105] = { .wild_encounter_bank = ENCDATA_D17R0105, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0019_D17R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_306_D17R0105_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0019_D17R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_306_D17R0105_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0106] = { .wild_encounter_bank = ENCDATA_D17R0106, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0020_D17R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_307_D17R0106_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0020_D17R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_307_D17R0106_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0107] = { .wild_encounter_bank = ENCDATA_D17R0107, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0021_D17R0107_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0020_D17R0107_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0281_D17R0107_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_308_D17R0107_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0021_D17R0107_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0020_D17R0107_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0281_D17R0107_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_308_D17R0107_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0108] = { .wild_encounter_bank = ENCDATA_D17R0108, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0022_D17R0108_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_309_D17R0108_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0022_D17R0108_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_309_D17R0108_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0109] = { .wild_encounter_bank = ENCDATA_D17R0109, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0023_D17R0109_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_310_D17R0109_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0023_D17R0109_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_310_D17R0109_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D17R0110] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 91, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0024_D17R0110_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0021_D17R0110_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0282_D17R0110_hdr_bin, - .msg_bank = NARC_msg_msg_0058_D17R0110_bin, - .day_music_id = SEQ_SILENCE_FIELD, - .night_music_id = SEQ_SILENCE_FIELD, - .events_bank = NARC_zone_event_311_D17R0110_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 13, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 91, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0024_D17R0110_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0021_D17R0110_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0282_D17R0110_hdr_bin, + .msg_bank = NARC_msg_msg_0058_D17R0110_bin, + .day_music_id = SEQ_SILENCE_FIELD, + .night_music_id = SEQ_SILENCE_FIELD, + .events_bank = NARC_zone_event_311_D17R0110_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 13, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D17R0112] = { .wild_encounter_bank = ENCDATA_D17R0112, - .area_data_bank = 77, - .move_model_bank = 15, - .world_map_x = 12, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0183_D17R0112_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_SUZU, - .night_music_id = SEQ_GS_TO_SUZU, - .events_bank = NARC_zone_event_312_D17R0112_bin, - .mapsec = MAPSEC_BELL_TOWER, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 77, + .move_model_bank = 15, + .world_map_x = 12, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0183_D17R0112_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_SUZU, + .night_music_id = SEQ_GS_TO_SUZU, + .events_bank = NARC_zone_event_312_D17R0112_bin, + .mapsec = MAPSEC_BELL_TOWER, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D50R0101] = { .wild_encounter_bank = ENCDATA_D50R0101, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 4, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0184_D50R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0129_D50R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0390_D50R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0144_D50R0101_bin, - .day_music_id = SEQ_GS_SAFARI_ROAD, - .night_music_id = SEQ_GS_SAFARI_ROAD, - .events_bank = NARC_zone_event_313_D50R0101_bin, - .mapsec = MAPSEC_CLIFF_CAVE, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 4, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0184_D50R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0129_D50R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0390_D50R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0144_D50R0101_bin, + .day_music_id = SEQ_GS_SAFARI_ROAD, + .night_music_id = SEQ_GS_SAFARI_ROAD, + .events_bank = NARC_zone_event_313_D50R0101_bin, + .mapsec = MAPSEC_CLIFF_CAVE, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_SAF01] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0197_SAF01_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0197_SAF01_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF02] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0198_SAF02_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0198_SAF02_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF03] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0199_SAF03_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0199_SAF03_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF04] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0200_SAF04_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0200_SAF04_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF05] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0201_SAF05_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0201_SAF05_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF06] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0202_SAF06_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0202_SAF06_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF07] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0203_SAF07_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0203_SAF07_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF08] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0204_SAF08_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0204_SAF08_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF09] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0205_SAF09_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0205_SAF09_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF10] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0206_SAF10_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0206_SAF10_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF11] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0207_SAF11_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0207_SAF11_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF12] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0208_SAF12_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0208_SAF12_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF13] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0209_SAF13_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0209_SAF13_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_SAF14] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0210_SAF14_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 7, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0210_SAF14_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 7, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D47R0102] = { .wild_encounter_bank = ENCDATA_D47R0102, - .area_data_bank = 75, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0212_D47R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0120_D47R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0381_D47R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_SAFARI_FIELD, - .night_music_id = SEQ_GS_SAFARI_FIELD, - .events_bank = NARC_zone_event_314_D47R0102_bin, - .mapsec = MAPSEC_SAFARI_ZONE, - .area_icon = 9, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 75, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0212_D47R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0120_D47R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0381_D47R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_SAFARI_FIELD, + .night_music_id = SEQ_GS_SAFARI_FIELD, + .events_bank = NARC_zone_event_314_D47R0102_bin, + .mapsec = MAPSEC_SAFARI_ZONE, + .area_icon = 9, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T06PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0779_T06PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0552_T06PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0486_T06PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_315_T06PC0101_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0779_T06PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0552_T06PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0486_T06PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_315_T06PC0101_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0780_T06PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0553_T06PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_316_T06PC0102_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0780_T06PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0553_T06PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_316_T06PC0102_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0777_T06FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0550_T06FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0484_T06FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_317_T06FS0101_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0777_T06FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0550_T06FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0484_T06FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_317_T06FS0101_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0781_T06R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0554_T06R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0487_T06R0101_bin, - .day_music_id = SEQ_GS_C_KUCHIBA, - .night_music_id = SEQ_GS_C_KUCHIBA, - .events_bank = NARC_zone_event_318_T06R0101_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0781_T06R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0554_T06R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0487_T06R0101_bin, + .day_music_id = SEQ_GS_C_KUCHIBA, + .night_music_id = SEQ_GS_C_KUCHIBA, + .events_bank = NARC_zone_event_318_T06R0101_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0185_T06R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0782_T06R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0555_T06R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0488_T06R0301_bin, - .day_music_id = SEQ_GS_C_KUCHIBA, - .night_music_id = SEQ_GS_C_KUCHIBA, - .events_bank = NARC_zone_event_319_T06R0301_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0185_T06R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0782_T06R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0555_T06R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0488_T06R0301_bin, + .day_music_id = SEQ_GS_C_KUCHIBA, + .night_music_id = SEQ_GS_C_KUCHIBA, + .events_bank = NARC_zone_event_319_T06R0301_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0783_T06R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0556_T06R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0489_T06R0401_bin, - .day_music_id = SEQ_GS_C_KUCHIBA, - .night_music_id = SEQ_GS_C_KUCHIBA, - .events_bank = NARC_zone_event_320_T06R0401_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0783_T06R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0556_T06R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0489_T06R0401_bin, + .day_music_id = SEQ_GS_C_KUCHIBA, + .night_music_id = SEQ_GS_C_KUCHIBA, + .events_bank = NARC_zone_event_320_T06R0401_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0784_T06R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0557_T06R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0490_T06R0601_bin, - .day_music_id = SEQ_GS_C_KUCHIBA, - .night_music_id = SEQ_GS_C_KUCHIBA, - .events_bank = NARC_zone_event_321_T06R0601_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0784_T06R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0557_T06R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0490_T06R0601_bin, + .day_music_id = SEQ_GS_C_KUCHIBA, + .night_music_id = SEQ_GS_C_KUCHIBA, + .events_bank = NARC_zone_event_321_T06R0601_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T06GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 49, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0255_T06GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0778_T06GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0551_T06GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0485_T06GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_322_T06GYM0101_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 9, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 49, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0255_T06GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0778_T06GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0551_T06GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0485_T06GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_322_T06GYM0101_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 9, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_W40R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0963_W40R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0732_W40R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0745_W40R0101_bin, - .day_music_id = SEQ_GS_R_6_34, - .night_music_id = SEQ_GS_R_6_34, - .events_bank = NARC_zone_event_323_W40R0101_bin, - .mapsec = MAPSEC_ROUTE_40, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0963_W40R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0732_W40R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0745_W40R0101_bin, + .day_music_id = SEQ_GS_R_6_34, + .night_music_id = SEQ_GS_R_6_34, + .events_bank = NARC_zone_event_323_W40R0101_bin, + .mapsec = MAPSEC_ROUTE_40, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T26PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 8, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0915_T26PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0688_T26PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_324_T26PC0102_bin, - .mapsec = MAPSEC_OLIVINE_CITY, - .area_icon = 9, - .unk_12_C = 6, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 8, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0915_T26PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0688_T26PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_324_T26PC0102_bin, + .mapsec = MAPSEC_OLIVINE_CITY, + .area_icon = 9, + .unk_12_C = 6, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T28PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0936_T28PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0709_T28PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_325_T28PC0102_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0936_T28PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0709_T28PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_325_T28PC0102_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T30PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0945_T30PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0718_T30PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_326_T30PC0102_bin, - .mapsec = MAPSEC_BLACKTHORN_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0945_T30PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0718_T30PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_326_T30PC0102_bin, + .mapsec = MAPSEC_BLACKTHORN_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0215_T07R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0789_T07R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0562_T07R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0494_T07R0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_327_T07R0101_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0215_T07R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0789_T07R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0562_T07R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0494_T07R0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_327_T07R0101_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0216_T07R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0790_T07R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0563_T07R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0495_T07R0102_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_328_T07R0102_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0216_T07R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0790_T07R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0563_T07R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0495_T07R0102_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_328_T07R0102_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0217_T07R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0791_T07R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0564_T07R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0496_T07R0103_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_329_T07R0103_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0217_T07R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0791_T07R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0564_T07R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0496_T07R0103_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_329_T07R0103_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0218_T07R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0792_T07R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0565_T07R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0497_T07R0104_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_330_T07R0104_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0218_T07R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0792_T07R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0565_T07R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0497_T07R0104_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_330_T07R0104_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0105] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0219_T07R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0793_T07R0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0566_T07R0105_hdr_bin, - .msg_bank = NARC_msg_msg_0498_T07R0105_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_331_T07R0105_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0219_T07R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0793_T07R0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0566_T07R0105_hdr_bin, + .msg_bank = NARC_msg_msg_0498_T07R0105_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_331_T07R0105_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0106] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0220_T07R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0794_T07R0106_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0567_T07R0106_hdr_bin, - .msg_bank = NARC_msg_msg_0499_T07R0106_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_332_T07R0106_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0220_T07R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0794_T07R0106_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0567_T07R0106_hdr_bin, + .msg_bank = NARC_msg_msg_0499_T07R0106_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_332_T07R0106_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0221_T07R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0796_T07R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0569_T07R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0501_T07R0201_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_333_T07R0201_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0221_T07R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0796_T07R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0569_T07R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0501_T07R0201_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_333_T07R0201_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0222_T07R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0797_T07R0202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0570_T07R0202_hdr_bin, - .msg_bank = NARC_msg_msg_0502_T07R0202_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_334_T07R0202_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0222_T07R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0797_T07R0202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0570_T07R0202_hdr_bin, + .msg_bank = NARC_msg_msg_0502_T07R0202_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_334_T07R0202_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0203] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0223_T07R0203_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0798_T07R0203_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0571_T07R0203_hdr_bin, - .msg_bank = NARC_msg_msg_0503_T07R0203_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_335_T07R0203_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0223_T07R0203_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0798_T07R0203_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0571_T07R0203_hdr_bin, + .msg_bank = NARC_msg_msg_0503_T07R0203_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_335_T07R0203_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0204] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 95, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0224_T07R0204_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0799_T07R0204_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0572_T07R0204_hdr_bin, - .msg_bank = NARC_msg_msg_0504_T07R0204_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_336_T07R0204_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 3, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 95, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0224_T07R0204_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0799_T07R0204_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0572_T07R0204_hdr_bin, + .msg_bank = NARC_msg_msg_0504_T07R0204_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_336_T07R0204_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 3, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0205] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0225_T07R0205_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0800_T07R0205_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0573_T07R0205_hdr_bin, - .msg_bank = NARC_msg_msg_0505_T07R0205_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_337_T07R0205_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0225_T07R0205_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0800_T07R0205_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0573_T07R0205_hdr_bin, + .msg_bank = NARC_msg_msg_0505_T07R0205_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_337_T07R0205_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0213_T07R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0803_T07R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0576_T07R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0508_T07R0401_bin, - .day_music_id = SEQ_GS_GAME, - .night_music_id = SEQ_GS_GAME, - .events_bank = NARC_zone_event_338_T07R0401_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0213_T07R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0803_T07R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0576_T07R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0508_T07R0401_bin, + .day_music_id = SEQ_GS_GAME, + .night_music_id = SEQ_GS_GAME, + .events_bank = NARC_zone_event_338_T07R0401_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0214_T07R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0804_T07R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0577_T07R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0509_T07R0501_bin, - .day_music_id = SEQ_GS_GAME, - .night_music_id = SEQ_GS_GAME, - .events_bank = NARC_zone_event_339_T07R0501_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0214_T07R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0804_T07R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0577_T07R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0509_T07R0501_bin, + .day_music_id = SEQ_GS_GAME, + .night_music_id = SEQ_GS_GAME, + .events_bank = NARC_zone_event_339_T07R0501_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0701] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0226_T07R0701_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0805_T07R0701_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0578_T07R0701_hdr_bin, - .msg_bank = NARC_msg_msg_0510_T07R0701_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_340_T07R0701_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0226_T07R0701_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0805_T07R0701_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0578_T07R0701_hdr_bin, + .msg_bank = NARC_msg_msg_0510_T07R0701_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_340_T07R0701_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T20R0402] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 21, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0072_T20R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0849_T20R0402_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0622_T20R0402_hdr_bin, - .msg_bank = NARC_msg_msg_0549_T20R0402_bin, - .day_music_id = SEQ_GS_T_WAKABA, - .night_music_id = SEQ_GS_T_WAKABA, - .events_bank = NARC_zone_event_341_T20R0402_bin, - .mapsec = MAPSEC_NEW_BARK_TOWN, - .area_icon = 9, - .unk_12_C = 0, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 21, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0072_T20R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0849_T20R0402_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0622_T20R0402_hdr_bin, + .msg_bank = NARC_msg_msg_0549_T20R0402_bin, + .day_music_id = SEQ_GS_T_WAKABA, + .night_music_id = SEQ_GS_T_WAKABA, + .events_bank = NARC_zone_event_341_T20R0402_bin, + .mapsec = MAPSEC_NEW_BARK_TOWN, + .area_icon = 9, + .unk_12_C = 0, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T24R0801] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 5, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0884_T24R0801_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0657_T24R0801_hdr_bin, - .msg_bank = NARC_msg_msg_0580_T24R0801_bin, - .day_music_id = SEQ_GS_C_TANBA, - .night_music_id = SEQ_GS_C_TANBA, - .events_bank = NARC_zone_event_342_T24R0801_bin, - .mapsec = MAPSEC_CIANWOOD_CITY, - .area_icon = 9, - .unk_12_C = 4, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 5, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0095_T28R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0884_T24R0801_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0657_T24R0801_hdr_bin, + .msg_bank = NARC_msg_msg_0580_T24R0801_bin, + .day_music_id = SEQ_GS_C_TANBA, + .night_music_id = SEQ_GS_C_TANBA, + .events_bank = NARC_zone_event_342_T24R0801_bin, + .mapsec = MAPSEC_CIANWOOD_CITY, + .area_icon = 9, + .unk_12_C = 4, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0186_P01R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0154_P01R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0404_P01R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0257_P01R0103_bin, - .day_music_id = SEQ_GS_C_KUCHIBA, - .night_music_id = SEQ_GS_C_KUCHIBA, - .events_bank = NARC_zone_event_343_P01R0103_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0186_P01R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0154_P01R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0404_P01R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0257_P01R0103_bin, + .day_music_id = SEQ_GS_C_KUCHIBA, + .night_music_id = SEQ_GS_C_KUCHIBA, + .events_bank = NARC_zone_event_343_P01R0103_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_P01R0104] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 94, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0211_P01R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0155_P01R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0405_P01R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0258_P01R0104_bin, - .day_music_id = SEQ_GS_C_KUCHIBA, - .night_music_id = SEQ_GS_C_KUCHIBA, - .events_bank = NARC_zone_event_344_P01R0104_bin, - .mapsec = MAPSEC_VERMILION_CITY, - .area_icon = 1, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 94, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0211_P01R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0155_P01R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0405_P01R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0258_P01R0104_bin, + .day_music_id = SEQ_GS_C_KUCHIBA, + .night_music_id = SEQ_GS_C_KUCHIBA, + .events_bank = NARC_zone_event_344_P01R0104_bin, + .mapsec = MAPSEC_VERMILION_CITY, + .area_icon = 1, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R10R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 14, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0194_R10R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0439_R10R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0343_R10R0101_bin, - .day_music_id = SEQ_GS_R_13_03, - .night_music_id = SEQ_GS_R_13_03, - .events_bank = NARC_zone_event_345_R10R0101_bin, - .mapsec = MAPSEC_ROUTE_10, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_MOUNTAIN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 14, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0194_R10R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0439_R10R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0343_R10R0101_bin, + .day_music_id = SEQ_GS_R_13_03, + .night_music_id = SEQ_GS_R_13_03, + .events_bank = NARC_zone_event_345_R10R0101_bin, + .mapsec = MAPSEC_ROUTE_10, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_MOUNTAIN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R06R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0185_R06R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0430_R06R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0335_R06R0201_bin, - .day_music_id = SEQ_GS_R_10_03, - .night_music_id = SEQ_GS_R_10_03, - .events_bank = NARC_zone_event_346_R06R0201_bin, - .mapsec = MAPSEC_ROUTE_6, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0185_R06R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0430_R06R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0335_R06R0201_bin, + .day_music_id = SEQ_GS_R_10_03, + .night_music_id = SEQ_GS_R_10_03, + .events_bank = NARC_zone_event_346_R06R0201_bin, + .mapsec = MAPSEC_ROUTE_6, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R08R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 42, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0189_R08R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0434_R08R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0339_R08R0201_bin, - .day_music_id = SEQ_GS_R_13_03, - .night_music_id = SEQ_GS_R_13_03, - .events_bank = NARC_zone_event_347_R08R0201_bin, - .mapsec = MAPSEC_ROUTE_8, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 42, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0189_R08R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0434_R08R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0339_R08R0201_bin, + .day_music_id = SEQ_GS_R_13_03, + .night_music_id = SEQ_GS_R_13_03, + .events_bank = NARC_zone_event_347_R08R0201_bin, + .mapsec = MAPSEC_ROUTE_8, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R05R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0182_R05R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0427_R05R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0332_R05R0301_bin, - .day_music_id = SEQ_GS_R_12_03, - .night_music_id = SEQ_GS_R_12_03, - .events_bank = NARC_zone_event_348_R05R0301_bin, - .mapsec = MAPSEC_ROUTE_5, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0182_R05R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0427_R05R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0332_R05R0301_bin, + .day_music_id = SEQ_GS_R_12_03, + .night_music_id = SEQ_GS_R_12_03, + .events_bank = NARC_zone_event_348_R05R0301_bin, + .mapsec = MAPSEC_ROUTE_5, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R15R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 39, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0204_R15R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0449_R15R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0353_R15R0101_bin, - .day_music_id = SEQ_GS_R_13_11, - .night_music_id = SEQ_GS_R_13_11, - .events_bank = NARC_zone_event_349_R15R0101_bin, - .mapsec = MAPSEC_ROUTE_15, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 39, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0204_R15R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0449_R15R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0353_R15R0101_bin, + .day_music_id = SEQ_GS_R_13_11, + .night_music_id = SEQ_GS_R_13_11, + .events_bank = NARC_zone_event_349_R15R0101_bin, + .mapsec = MAPSEC_ROUTE_15, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0787_T07PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0560_T07PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0493_T07PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_350_T07PC0101_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0787_T07PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0560_T07PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0493_T07PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_350_T07PC0101_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0788_T07PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0561_T07PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_351_T07PC0102_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0788_T07PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0561_T07PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_351_T07PC0102_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 52, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0258_T07GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0786_T07GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0559_T07GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0492_T07GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_352_T07GYM0101_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 52, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0258_T07GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0786_T07GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0559_T07GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0492_T07GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_352_T07GYM0101_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T28GYM0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 34, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0228_T28GYM0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_353_T28GYM0102_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_2, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 34, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0228_T28GYM0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_353_T28GYM0102_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_2, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T28GYM0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 34, - .move_model_bank = 15, - .world_map_x = 16, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0093_T28GYM0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0934_T28GYM0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0707_T28GYM0103_hdr_bin, - .msg_bank = NARC_msg_msg_0623_T28GYM0103_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_354_T28GYM0103_bin, - .mapsec = MAPSEC_MAHOGANY_TOWN, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_2, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 34, + .move_model_bank = 15, + .world_map_x = 16, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0093_T28GYM0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0934_T28GYM0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0707_T28GYM0103_hdr_bin, + .msg_bank = NARC_msg_msg_0623_T28GYM0103_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_354_T28GYM0103_bin, + .mapsec = MAPSEC_MAHOGANY_TOWN, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_2, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T11R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 41, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0192_T11R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0832_T11R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0605_T11R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0533_T11R0101_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_355_T11R0101_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 41, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0192_T11R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0832_T11R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0605_T11R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0533_T11R0101_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_355_T11R0101_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 41, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0833_T11R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0606_T11R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0534_T11R0501_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_356_T11R0501_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 41, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0833_T11R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0606_T11R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0534_T11R0501_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_356_T11R0501_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 48, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0187_T11R0601_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0834_T11R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0607_T11R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0535_T11R0601_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_357_T11R0601_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 48, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0187_T11R0601_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0834_T11R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0607_T11R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0535_T11R0601_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_357_T11R0601_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0602] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 48, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0188_T11R0602_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0835_T11R0602_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0608_T11R0602_hdr_bin, - .msg_bank = NARC_msg_msg_0536_T11R0602_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_358_T11R0602_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 48, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0188_T11R0602_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0835_T11R0602_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0608_T11R0602_hdr_bin, + .msg_bank = NARC_msg_msg_0536_T11R0602_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_358_T11R0602_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0701] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0189_T11R0701_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0837_T11R0701_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0610_T11R0701_hdr_bin, - .msg_bank = NARC_msg_msg_0537_T11R0701_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_359_T11R0701_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0189_T11R0701_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0837_T11R0701_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0610_T11R0701_hdr_bin, + .msg_bank = NARC_msg_msg_0537_T11R0701_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_359_T11R0701_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0702] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0241_T11R0702_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0838_T11R0702_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0611_T11R0702_hdr_bin, - .msg_bank = NARC_msg_msg_0538_T11R0702_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_360_T11R0702_bin, - .mapsec = MAPSEC_ROTOMS_ROOM, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0241_T11R0702_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0838_T11R0702_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0611_T11R0702_hdr_bin, + .msg_bank = NARC_msg_msg_0538_T11R0702_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_360_T11R0702_bin, + .mapsec = MAPSEC_ROTOMS_ROOM, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0801] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0190_T11R0801_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0840_T11R0801_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0613_T11R0801_hdr_bin, - .msg_bank = NARC_msg_msg_0540_T11R0801_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_361_T11R0801_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0190_T11R0801_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0840_T11R0801_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0613_T11R0801_hdr_bin, + .msg_bank = NARC_msg_msg_0540_T11R0801_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_361_T11R0801_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0802] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0191_T11R0802_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0841_T11R0802_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0614_T11R0802_hdr_bin, - .msg_bank = NARC_msg_msg_0541_T11R0802_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_362_T11R0802_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0191_T11R0802_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0841_T11R0802_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0614_T11R0802_hdr_bin, + .msg_bank = NARC_msg_msg_0541_T11R0802_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_362_T11R0802_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0901] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0830_T11PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0603_T11PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0532_T11PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_363_T11PC0101_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0830_T11PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0603_T11PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0532_T11PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_363_T11PC0101_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0831_T11PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0604_T11PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_364_T11PC0102_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0831_T11PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0604_T11PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_364_T11PC0102_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 41, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0828_T11FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0601_T11FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0530_T11FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_365_T11FS0101_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 41, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0828_T11FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0601_T11FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0530_T11FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_365_T11FS0101_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 50, - .move_model_bank = 15, - .world_map_x = 41, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0256_T11GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0829_T11GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0602_T11GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0531_T11GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_366_T11GYM0101_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 50, + .move_model_bank = 15, + .world_map_x = 41, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0256_T11GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0829_T11GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0602_T11GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0531_T11GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_366_T11GYM0101_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D32R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 93, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0240_D32R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0081_D32R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0342_D32R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0104_D32R0102_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_367_D32R0102_bin, - .mapsec = MAPSEC_FRONTIER_ACCESS, - .area_icon = 1, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 8, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CITY, - .bike_allowed = TRUE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 93, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0240_D32R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0081_D32R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0342_D32R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0104_D32R0102_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_367_D32R0102_bin, + .mapsec = MAPSEC_FRONTIER_ACCESS, + .area_icon = 1, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 8, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CITY, + .bike_allowed = TRUE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 45, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0238_T25R1202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0908_T25R1202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0681_T25R1202_hdr_bin, - .msg_bank = NARC_msg_msg_0601_T25R1202_bin, - .day_music_id = SEQ_GS_WIFITOWER, - .night_music_id = SEQ_GS_WIFITOWER, - .events_bank = NARC_zone_event_368_T25R1202_bin, - .mapsec = MAPSEC_GLOBAL_TERMINAL, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 45, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0238_T25R1202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0908_T25R1202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0681_T25R1202_hdr_bin, + .msg_bank = NARC_msg_msg_0601_T25R1202_bin, + .day_music_id = SEQ_GS_WIFITOWER, + .night_music_id = SEQ_GS_WIFITOWER, + .events_bank = NARC_zone_event_368_T25R1202_bin, + .mapsec = MAPSEC_GLOBAL_TERMINAL, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1203] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 45, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0239_T25R1203_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0909_T25R1203_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0682_T25R1203_hdr_bin, - .msg_bank = NARC_msg_msg_0602_T25R1203_bin, - .day_music_id = SEQ_GS_WIFITOWER, - .night_music_id = SEQ_GS_WIFITOWER, - .events_bank = NARC_zone_event_369_T25R1203_bin, - .mapsec = MAPSEC_GLOBAL_TERMINAL, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 45, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0239_T25R1203_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0909_T25R1203_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0682_T25R1203_hdr_bin, + .msg_bank = NARC_msg_msg_0602_T25R1203_bin, + .day_music_id = SEQ_GS_WIFITOWER, + .night_music_id = SEQ_GS_WIFITOWER, + .events_bank = NARC_zone_event_369_T25R1203_bin, + .mapsec = MAPSEC_GLOBAL_TERMINAL, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R02R0101] = { .wild_encounter_bank = ENCDATA_R02R0101, - .area_data_bank = 17, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0170_R02R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0415_R02R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0321_R02R0101_bin, - .day_music_id = SEQ_GS_R_16_03, - .night_music_id = SEQ_GS_R_16_03, - .events_bank = NARC_zone_event_370_R02R0101_bin, - .mapsec = MAPSEC_ROUTE_2, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 17, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0170_R02R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0415_R02R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0321_R02R0101_bin, + .day_music_id = SEQ_GS_R_16_03, + .night_music_id = SEQ_GS_R_16_03, + .events_bank = NARC_zone_event_370_R02R0101_bin, + .mapsec = MAPSEC_ROUTE_2, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R16R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0206_R16R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0451_R16R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0355_R16R0101_bin, - .day_music_id = SEQ_GS_R_14_03, - .night_music_id = SEQ_GS_R_14_03, - .events_bank = NARC_zone_event_371_R16R0101_bin, - .mapsec = MAPSEC_ROUTE_16, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0206_R16R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0451_R16R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0355_R16R0101_bin, + .day_music_id = SEQ_GS_R_14_03, + .night_music_id = SEQ_GS_R_14_03, + .events_bank = NARC_zone_event_371_R16R0101_bin, + .mapsec = MAPSEC_ROUTE_16, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_W20R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 16, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_17_03, - .night_music_id = SEQ_GS_R_17_03, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_ROUTE_20, - .area_icon = 6, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 16, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_17_03, + .night_music_id = SEQ_GS_R_17_03, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_ROUTE_20, + .area_icon = 6, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R02R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0171_R02R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0416_R02R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0322_R02R0201_bin, - .day_music_id = SEQ_GS_R_16_03, - .night_music_id = SEQ_GS_R_16_03, - .events_bank = NARC_zone_event_372_R02R0201_bin, - .mapsec = MAPSEC_ROUTE_2, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0171_R02R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0416_R02R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0322_R02R0201_bin, + .day_music_id = SEQ_GS_R_16_03, + .night_music_id = SEQ_GS_R_16_03, + .events_bank = NARC_zone_event_372_R02R0201_bin, + .mapsec = MAPSEC_ROUTE_2, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R02R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0172_R02R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0417_R02R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0323_R02R0301_bin, - .day_music_id = SEQ_GS_R_16_03, - .night_music_id = SEQ_GS_R_16_03, - .events_bank = NARC_zone_event_373_R02R0301_bin, - .mapsec = MAPSEC_ROUTE_2, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0172_R02R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0417_R02R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0323_R02R0301_bin, + .day_music_id = SEQ_GS_R_16_03, + .night_music_id = SEQ_GS_R_16_03, + .events_bank = NARC_zone_event_373_R02R0301_bin, + .mapsec = MAPSEC_ROUTE_2, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R02R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0173_R02R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0418_R02R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0324_R02R0401_bin, - .day_music_id = SEQ_GS_R_16_03, - .night_music_id = SEQ_GS_R_16_03, - .events_bank = NARC_zone_event_374_R02R0401_bin, - .mapsec = MAPSEC_ROUTE_2, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0173_R02R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0418_R02R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0324_R02R0401_bin, + .day_music_id = SEQ_GS_R_16_03, + .night_music_id = SEQ_GS_R_16_03, + .events_bank = NARC_zone_event_374_R02R0401_bin, + .mapsec = MAPSEC_ROUTE_2, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R02R0501] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0174_R02R0501_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0419_R02R0501_hdr_bin, - .msg_bank = NARC_msg_msg_0325_R02R0501_bin, - .day_music_id = SEQ_GS_R_16_03, - .night_music_id = SEQ_GS_R_16_03, - .events_bank = NARC_zone_event_375_R02R0501_bin, - .mapsec = MAPSEC_ROUTE_2, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0174_R02R0501_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0419_R02R0501_hdr_bin, + .msg_bank = NARC_msg_msg_0325_R02R0501_bin, + .day_music_id = SEQ_GS_R_16_03, + .night_music_id = SEQ_GS_R_16_03, + .events_bank = NARC_zone_event_375_R02R0501_bin, + .mapsec = MAPSEC_ROUTE_2, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R16R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0207_R16R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0452_R16R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0356_R16R0201_bin, - .day_music_id = SEQ_GS_R_14_03, - .night_music_id = SEQ_GS_R_14_03, - .events_bank = NARC_zone_event_376_R16R0201_bin, - .mapsec = MAPSEC_ROUTE_16, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0207_R16R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0452_R16R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0356_R16R0201_bin, + .day_music_id = SEQ_GS_R_14_03, + .night_music_id = SEQ_GS_R_14_03, + .events_bank = NARC_zone_event_376_R16R0201_bin, + .mapsec = MAPSEC_ROUTE_16, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R16R0301] = { .wild_encounter_bank = ENCDATA_R16R0301, - .area_data_bank = 15, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0208_R16R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0453_R16R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_14_03, - .night_music_id = SEQ_GS_R_14_03, - .events_bank = NARC_zone_event_377_R16R0301_bin, - .mapsec = MAPSEC_ROUTE_16, - .area_icon = 3, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 15, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0208_R16R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0453_R16R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_14_03, + .night_music_id = SEQ_GS_R_14_03, + .events_bank = NARC_zone_event_377_R16R0301_bin, + .mapsec = MAPSEC_ROUTE_16, + .area_icon = 3, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R18R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0211_R18R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0456_R18R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0359_R18R0101_bin, - .day_music_id = SEQ_GS_R_15_03, - .night_music_id = SEQ_GS_R_15_03, - .events_bank = NARC_zone_event_378_R18R0101_bin, - .mapsec = MAPSEC_ROUTE_18, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0211_R18R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0456_R18R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0359_R18R0101_bin, + .day_music_id = SEQ_GS_R_15_03, + .night_music_id = SEQ_GS_R_15_03, + .events_bank = NARC_zone_event_378_R18R0101_bin, + .mapsec = MAPSEC_ROUTE_18, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_W19R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 14, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0959_W19R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0728_W19R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0741_W19R0101_bin, - .day_music_id = SEQ_GS_R_15_03, - .night_music_id = SEQ_GS_R_15_03, - .events_bank = NARC_zone_event_379_W19R0101_bin, - .mapsec = MAPSEC_ROUTE_19, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 14, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0959_W19R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0728_W19R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0741_W19R0101_bin, + .day_music_id = SEQ_GS_R_15_03, + .night_music_id = SEQ_GS_R_15_03, + .events_bank = NARC_zone_event_379_W19R0101_bin, + .mapsec = MAPSEC_ROUTE_19, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R11R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 43, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0198_R11R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0443_R11R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0347_R11R0101_bin, - .day_music_id = SEQ_GS_R_10_11, - .night_music_id = SEQ_GS_R_10_11, - .events_bank = NARC_zone_event_380_R11R0101_bin, - .mapsec = MAPSEC_ROUTE_11, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 43, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0198_R11R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0443_R11R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0347_R11R0101_bin, + .day_music_id = SEQ_GS_R_10_11, + .night_music_id = SEQ_GS_R_10_11, + .events_bank = NARC_zone_event_380_R11R0101_bin, + .mapsec = MAPSEC_ROUTE_11, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0759_T04FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0532_T04FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0468_T04FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_381_T04FS0101_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0759_T04FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0532_T04FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0468_T04FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_381_T04FS0101_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 51, - .move_model_bank = 15, - .world_map_x = 41, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0257_T04GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0760_T04GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0533_T04GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0469_T04GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_382_T04GYM0101_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 51, + .move_model_bank = 15, + .world_map_x = 41, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0257_T04GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0760_T04GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0533_T04GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0469_T04GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_382_T04GYM0101_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T04PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0761_T04PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0534_T04PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0470_T04PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_383_T04PC0101_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0761_T04PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0534_T04PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0470_T04PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_383_T04PC0101_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0763_T04R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0536_T04R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0471_T04R0101_bin, - .day_music_id = SEQ_GS_C_HANADA, - .night_music_id = SEQ_GS_C_HANADA, - .events_bank = NARC_zone_event_384_T04R0101_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0763_T04R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0536_T04R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0471_T04R0101_bin, + .day_music_id = SEQ_GS_C_HANADA, + .night_music_id = SEQ_GS_C_HANADA, + .events_bank = NARC_zone_event_384_T04R0101_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 41, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0764_T04R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0537_T04R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0472_T04R0201_bin, - .day_music_id = SEQ_GS_C_HANADA, - .night_music_id = SEQ_GS_C_HANADA, - .events_bank = NARC_zone_event_385_T04R0201_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 41, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0764_T04R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0537_T04R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0472_T04R0201_bin, + .day_music_id = SEQ_GS_C_HANADA, + .night_music_id = SEQ_GS_C_HANADA, + .events_bank = NARC_zone_event_385_T04R0201_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0765_T04R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0538_T04R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0473_T04R0301_bin, - .day_music_id = SEQ_GS_C_HANADA, - .night_music_id = SEQ_GS_C_HANADA, - .events_bank = NARC_zone_event_386_T04R0301_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0765_T04R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0538_T04R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0473_T04R0301_bin, + .day_music_id = SEQ_GS_C_HANADA, + .night_music_id = SEQ_GS_C_HANADA, + .events_bank = NARC_zone_event_386_T04R0301_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0274_T04R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0766_T04R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0539_T04R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0474_T04R0401_bin, - .day_music_id = SEQ_GS_C_HANADA, - .night_music_id = SEQ_GS_C_HANADA, - .events_bank = NARC_zone_event_387_T04R0401_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0274_T04R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0766_T04R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0539_T04R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0474_T04R0401_bin, + .day_music_id = SEQ_GS_C_HANADA, + .night_music_id = SEQ_GS_C_HANADA, + .events_bank = NARC_zone_event_387_T04R0401_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0768_T05FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0541_T05FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0476_T05FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_388_T05FS0101_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0768_T05FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0541_T05FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0476_T05FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_388_T05FS0101_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0769_T05PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0542_T05PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0477_T05PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_389_T05PC0101_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0769_T05PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0542_T05PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0477_T05PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_389_T05PC0101_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0193_T05R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0771_T05R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0544_T05R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0478_T05R0201_bin, - .day_music_id = SEQ_GS_T_CHION, - .night_music_id = SEQ_GS_T_CHION, - .events_bank = NARC_zone_event_390_T05R0201_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0193_T05R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0771_T05R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0544_T05R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0478_T05R0201_bin, + .day_music_id = SEQ_GS_T_CHION, + .night_music_id = SEQ_GS_T_CHION, + .events_bank = NARC_zone_event_390_T05R0201_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0772_T05R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0545_T05R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0479_T05R0301_bin, - .day_music_id = SEQ_GS_T_CHION, - .night_music_id = SEQ_GS_T_CHION, - .events_bank = NARC_zone_event_391_T05R0301_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0772_T05R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0545_T05R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0479_T05R0301_bin, + .day_music_id = SEQ_GS_T_CHION, + .night_music_id = SEQ_GS_T_CHION, + .events_bank = NARC_zone_event_391_T05R0301_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0140_T25R0901_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0773_T05R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0546_T05R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0480_T05R0401_bin, - .day_music_id = SEQ_GS_T_CHION, - .night_music_id = SEQ_GS_T_CHION, - .events_bank = NARC_zone_event_392_T05R0401_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0140_T25R0901_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0773_T05R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0546_T05R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0480_T05R0401_bin, + .day_music_id = SEQ_GS_T_CHION, + .night_music_id = SEQ_GS_T_CHION, + .events_bank = NARC_zone_event_392_T05R0401_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 40, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0194_T05R0601_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0774_T05R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0547_T05R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0481_T05R0601_bin, - .day_music_id = SEQ_GS_T_CHION, - .night_music_id = SEQ_GS_T_CHION, - .events_bank = NARC_zone_event_393_T05R0601_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 40, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0194_T05R0601_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0774_T05R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0547_T05R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0481_T05R0601_bin, + .day_music_id = SEQ_GS_T_CHION, + .night_music_id = SEQ_GS_T_CHION, + .events_bank = NARC_zone_event_393_T05R0601_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05R0701] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 39, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0195_T05R0701_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0775_T05R0701_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0548_T05R0701_hdr_bin, - .msg_bank = NARC_msg_msg_0482_T05R0701_bin, - .day_music_id = SEQ_GS_T_CHION, - .night_music_id = SEQ_GS_T_CHION, - .events_bank = NARC_zone_event_394_T05R0701_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 39, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0195_T05R0701_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0775_T05R0701_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0548_T05R0701_hdr_bin, + .msg_bank = NARC_msg_msg_0482_T05R0701_bin, + .day_music_id = SEQ_GS_T_CHION, + .night_music_id = SEQ_GS_T_CHION, + .events_bank = NARC_zone_event_394_T05R0701_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R25R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 43, - .world_map_y = 1, - .matrix_id = NARC_map_matrix_map_matrix_0254_R25R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0217_R25R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0462_R25R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0364_R25R0101_bin, - .day_music_id = SEQ_GS_R_12_24, - .night_music_id = SEQ_GS_R_12_24, - .events_bank = NARC_zone_event_395_R25R0101_bin, - .mapsec = MAPSEC_ROUTE_25, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 43, + .world_map_y = 1, + .matrix_id = NARC_map_matrix_map_matrix_0254_R25R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0217_R25R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0462_R25R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0364_R25R0101_bin, + .day_music_id = SEQ_GS_R_12_24, + .night_music_id = SEQ_GS_R_12_24, + .events_bank = NARC_zone_event_395_R25R0101_bin, + .mapsec = MAPSEC_ROUTE_25, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R1007] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0905_T25R1007_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0678_T25R1007_hdr_bin, - .msg_bank = NARC_msg_msg_0598_T25R1007_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_396_T25R1007_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0905_T25R1007_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0678_T25R1007_hdr_bin, + .msg_bank = NARC_msg_msg_0598_T25R1007_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_396_T25R1007_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0107] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0795_T07R0107_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0568_T07R0107_hdr_bin, - .msg_bank = NARC_msg_msg_0500_T07R0107_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_397_T07R0107_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0795_T07R0107_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0568_T07R0107_hdr_bin, + .msg_bank = NARC_msg_msg_0500_T07R0107_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_397_T07R0107_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0206] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0801_T07R0206_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0574_T07R0206_hdr_bin, - .msg_bank = NARC_msg_msg_0506_T07R0206_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_398_T07R0206_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0801_T07R0206_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0574_T07R0206_hdr_bin, + .msg_bank = NARC_msg_msg_0506_T07R0206_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_398_T07R0206_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07R0207] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0802_T07R0207_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0575_T07R0207_hdr_bin, - .msg_bank = NARC_msg_msg_0507_T07R0207_bin, - .day_music_id = SEQ_GS_C_TAMAMUSHI, - .night_music_id = SEQ_GS_C_TAMAMUSHI, - .events_bank = NARC_zone_event_399_T07R0207_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0802_T07R0207_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0575_T07R0207_hdr_bin, + .msg_bank = NARC_msg_msg_0507_T07R0207_bin, + .day_music_id = SEQ_GS_C_TAMAMUSHI, + .night_music_id = SEQ_GS_C_TAMAMUSHI, + .events_bank = NARC_zone_event_399_T07R0207_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0703] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0839_T11R0703_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0612_T11R0703_hdr_bin, - .msg_bank = NARC_msg_msg_0539_T11R0703_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_400_T11R0703_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0839_T11R0703_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0612_T11R0703_hdr_bin, + .msg_bank = NARC_msg_msg_0539_T11R0703_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_400_T11R0703_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D27R0108] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 9, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0067_D27R0108_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0328_D27R0108_hdr_bin, - .msg_bank = NARC_msg_msg_0095_D27R0108_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_401_D27R0108_bin, - .mapsec = MAPSEC_LIGHTHOUSE, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 9, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0067_D27R0108_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0328_D27R0108_hdr_bin, + .msg_bank = NARC_msg_msg_0095_D27R0108_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_401_D27R0108_bin, + .mapsec = MAPSEC_LIGHTHOUSE, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D23R0107] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0035_D23R0107_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0296_D23R0107_hdr_bin, - .msg_bank = NARC_msg_msg_0071_D23R0107_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_402_D23R0107_bin, - .mapsec = MAPSEC_RADIO_TOWER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0262_D31R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0035_D23R0107_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0296_D23R0107_hdr_bin, + .msg_bank = NARC_msg_msg_0071_D23R0107_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_402_D23R0107_bin, + .mapsec = MAPSEC_RADIO_TOWER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D02R0102] = { .wild_encounter_bank = ENCDATA_D02R0102, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0004_D02R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0008_D02R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0269_D02R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_403_D02R0102_bin, - .mapsec = MAPSEC_MT_MOON, - .area_icon = 4, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0004_D02R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0008_D02R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0269_D02R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_403_D02R0102_bin, + .mapsec = MAPSEC_MT_MOON, + .area_icon = 4, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D02R0103] = { .wild_encounter_bank = ENCDATA_D02R0103, - .area_data_bank = 97, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0005_D02R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0009_D02R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0270_D02R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0050_D02R0103_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_404_D02R0103_bin, - .mapsec = MAPSEC_MT_MOON, - .area_icon = 4, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 97, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0005_D02R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0009_D02R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0270_D02R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0050_D02R0103_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_404_D02R0103_bin, + .mapsec = MAPSEC_MT_MOON, + .area_icon = 4, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D03R0102] = { .wild_encounter_bank = ENCDATA_D03R0102, - .area_data_bank = 73, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0079_D03R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_405_D03R0102_bin, - .mapsec = MAPSEC_CERULEAN_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 73, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0079_D03R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_405_D03R0102_bin, + .mapsec = MAPSEC_CERULEAN_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D03R0103] = { .wild_encounter_bank = ENCDATA_D03R0103, - .area_data_bank = 73, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0080_D03R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0011_D03R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0272_D03R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_406_D03R0103_bin, - .mapsec = MAPSEC_CERULEAN_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 73, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0080_D03R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0011_D03R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0272_D03R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_406_D03R0103_bin, + .mapsec = MAPSEC_CERULEAN_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D05R0102] = { .wild_encounter_bank = ENCDATA_D05R0102, - .area_data_bank = 83, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0007_D05R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_407_D05R0102_bin, - .mapsec = MAPSEC_ROCK_TUNNEL, - .area_icon = 4, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 11, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 83, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0007_D05R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_407_D05R0102_bin, + .mapsec = MAPSEC_ROCK_TUNNEL, + .area_icon = 4, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 11, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D11R0102] = { .wild_encounter_bank = ENCDATA_D11R0102, - .area_data_bank = 104, - .move_model_bank = 15, - .world_map_x = 35, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0082_D11R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0013_D11R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0274_D11R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_408_D11R0102_bin, - .mapsec = MAPSEC_SEAFOAM_ISLANDS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 104, + .move_model_bank = 15, + .world_map_x = 35, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0082_D11R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0013_D11R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0274_D11R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_408_D11R0102_bin, + .mapsec = MAPSEC_SEAFOAM_ISLANDS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D11R0103] = { .wild_encounter_bank = ENCDATA_D11R0103, - .area_data_bank = 104, - .move_model_bank = 15, - .world_map_x = 35, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0083_D11R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_409_D11R0103_bin, - .mapsec = MAPSEC_SEAFOAM_ISLANDS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 104, + .move_model_bank = 15, + .world_map_x = 35, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0083_D11R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_409_D11R0103_bin, + .mapsec = MAPSEC_SEAFOAM_ISLANDS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D11R0104] = { .wild_encounter_bank = ENCDATA_D11R0104, - .area_data_bank = 104, - .move_model_bank = 15, - .world_map_x = 35, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0084_D11R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_410_D11R0104_bin, - .mapsec = MAPSEC_SEAFOAM_ISLANDS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 104, + .move_model_bank = 15, + .world_map_x = 35, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0084_D11R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_410_D11R0104_bin, + .mapsec = MAPSEC_SEAFOAM_ISLANDS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D11R0105] = { .wild_encounter_bank = ENCDATA_D11R0105, - .area_data_bank = 104, - .move_model_bank = 15, - .world_map_x = 35, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0085_D11R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0014_D11R0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0275_D11R0105_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_411_D11R0105_bin, - .mapsec = MAPSEC_SEAFOAM_ISLANDS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 104, + .move_model_bank = 15, + .world_map_x = 35, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0085_D11R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0014_D11R0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0275_D11R0105_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_411_D11R0105_bin, + .mapsec = MAPSEC_SEAFOAM_ISLANDS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D11R0106] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 81, - .move_model_bank = 15, - .world_map_x = 35, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0264_D11R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0015_D11R0106_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0276_D11R0106_hdr_bin, - .msg_bank = NARC_msg_msg_0053_D11R0106_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_412_D11R0106_bin, - .mapsec = MAPSEC_SEAFOAM_ISLANDS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 81, + .move_model_bank = 15, + .world_map_x = 35, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0264_D11R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0015_D11R0106_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0276_D11R0106_hdr_bin, + .msg_bank = NARC_msg_msg_0053_D11R0106_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_412_D11R0106_bin, + .mapsec = MAPSEC_SEAFOAM_ISLANDS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D11R0107] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 70, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0264_D11R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOORINONUKE, - .night_music_id = SEQ_GS_D_KOORINONUKE, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_SEAFOAM_ISLANDS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = TRUE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, + .area_data_bank = 70, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0264_D11R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOORINONUKE, + .night_music_id = SEQ_GS_D_KOORINONUKE, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_SEAFOAM_ISLANDS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = TRUE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0102] = { .wild_encounter_bank = ENCDATA_D41R0102, - .area_data_bank = 96, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0266_D41R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_413_D41R0102_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_SNOW, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 96, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0266_D41R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_413_D41R0102_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_SNOW, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0103] = { .wild_encounter_bank = ENCDATA_D41R0103, - .area_data_bank = 102, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0267_D41R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_414_D41R0103_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_MOUNTAIN, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 102, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0267_D41R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_414_D41R0103_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_MOUNTAIN, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0104] = { .wild_encounter_bank = ENCDATA_D41R0104, - .area_data_bank = 80, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0268_D41R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_415_D41R0104_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 80, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0268_D41R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_415_D41R0104_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0105] = { .wild_encounter_bank = ENCDATA_D41R0105, - .area_data_bank = 80, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0269_D41R0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0106_D41R0105_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0367_D41R0105_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_416_D41R0105_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_2, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 80, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0269_D41R0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0106_D41R0105_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0367_D41R0105_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_416_D41R0105_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_2, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0106] = { .wild_encounter_bank = ENCDATA_D41R0106, - .area_data_bank = 80, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0270_D41R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_417_D41R0106_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 80, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0270_D41R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_417_D41R0106_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0107] = { .wild_encounter_bank = ENCDATA_D41R0107, - .area_data_bank = 80, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0271_D41R0107_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_TO_TOUDAI, - .night_music_id = SEQ_GS_TO_TOUDAI, - .events_bank = NARC_zone_event_418_D41R0107_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 80, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0271_D41R0107_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_TO_TOUDAI, + .night_music_id = SEQ_GS_TO_TOUDAI, + .events_bank = NARC_zone_event_418_D41R0107_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D41R0108] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 96, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0272_D41R0108_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0107_D41R0108_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0368_D41R0108_hdr_bin, - .msg_bank = NARC_msg_msg_0126_D41R0108_bin, - .day_music_id = SEQ_SILENCE_FIELD, - .night_music_id = SEQ_SILENCE_FIELD, - .events_bank = NARC_zone_event_419_D41R0108_bin, - .mapsec = MAPSEC_MT_SILVER_CAVE, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 5, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_SNOW, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 96, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0272_D41R0108_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0107_D41R0108_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0368_D41R0108_hdr_bin, + .msg_bank = NARC_msg_msg_0126_D41R0108_bin, + .day_music_id = SEQ_SILENCE_FIELD, + .night_music_id = SEQ_SILENCE_FIELD, + .events_bank = NARC_zone_event_419_D41R0108_bin, + .mapsec = MAPSEC_MT_SILVER_CAVE, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 5, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_SNOW, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R10PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0192_R10PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0437_R10PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0342_R10PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_420_R10PC0101_bin, - .mapsec = MAPSEC_ROUTE_10, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0192_R10PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0437_R10PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0342_R10PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_420_R10PC0101_bin, + .mapsec = MAPSEC_ROUTE_10, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R10R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0251_R10R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0195_R10R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0440_R10R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0344_R10R0201_bin, - .day_music_id = SEQ_GS_C_NIBI, - .night_music_id = SEQ_GS_C_NIBI, - .events_bank = NARC_zone_event_421_R10R0201_bin, - .mapsec = MAPSEC_POWER_PLANT, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0251_R10R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0195_R10R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0440_R10R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0344_R10R0201_bin, + .day_music_id = SEQ_GS_C_NIBI, + .night_music_id = SEQ_GS_C_NIBI, + .events_bank = NARC_zone_event_421_R10R0201_bin, + .mapsec = MAPSEC_POWER_PLANT, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R05R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0252_R05R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_R_12_03, - .night_music_id = SEQ_GS_R_12_03, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_ROUTE_5, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0252_R05R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_R_12_03, + .night_music_id = SEQ_GS_R_12_03, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_ROUTE_5, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R05R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0253_R05R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0180_R05R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0425_R05R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0330_R05R0201_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_422_R05R0201_bin, - .mapsec = MAPSEC_ROUTE_5, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0253_R05R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0180_R05R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0425_R05R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0330_R05R0201_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_422_R05R0201_bin, + .mapsec = MAPSEC_ROUTE_5, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R06R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0253_R05R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_423_R06R0101_bin, - .mapsec = MAPSEC_ROUTE_6, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0253_R05R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_423_R06R0101_bin, + .mapsec = MAPSEC_ROUTE_6, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T03R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 2, - .matrix_id = NARC_map_matrix_map_matrix_0242_T03R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0755_T03R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0528_T03R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0464_T03R0101_bin, - .day_music_id = SEQ_GS_C_NIBI, - .night_music_id = SEQ_GS_C_NIBI, - .events_bank = NARC_zone_event_424_T03R0101_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 2, + .matrix_id = NARC_map_matrix_map_matrix_0242_T03R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0755_T03R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0528_T03R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0464_T03R0101_bin, + .day_music_id = SEQ_GS_C_NIBI, + .night_music_id = SEQ_GS_C_NIBI, + .events_bank = NARC_zone_event_424_T03R0101_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T03R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0756_T03R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0529_T03R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0465_T03R0201_bin, - .day_music_id = SEQ_GS_C_NIBI, - .night_music_id = SEQ_GS_C_NIBI, - .events_bank = NARC_zone_event_425_T03R0201_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0756_T03R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0529_T03R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0465_T03R0201_bin, + .day_music_id = SEQ_GS_C_NIBI, + .night_music_id = SEQ_GS_C_NIBI, + .events_bank = NARC_zone_event_425_T03R0201_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T03GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 54, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 2, - .matrix_id = NARC_map_matrix_map_matrix_0260_T03GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0752_T03GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0525_T03GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0462_T03GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_426_T03GYM0101_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 54, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 2, + .matrix_id = NARC_map_matrix_map_matrix_0260_T03GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0752_T03GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0525_T03GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0462_T03GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_426_T03GYM0101_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T03FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 33, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0751_T03FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0524_T03FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0461_T03FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_427_T03FS0101_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 33, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0751_T03FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0524_T03FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0461_T03FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_427_T03FS0101_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T03PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0753_T03PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0526_T03PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0463_T03PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_428_T03PC0101_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0753_T03PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0526_T03PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0463_T03PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_428_T03PC0101_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T03PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0754_T03PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0527_T03PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_429_T03PC0102_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0754_T03PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0527_T03PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_429_T03PC0102_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T03R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 33, - .world_map_y = 2, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0757_T03R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0530_T03R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0466_T03R0601_bin, - .day_music_id = SEQ_GS_C_NIBI, - .night_music_id = SEQ_GS_C_NIBI, - .events_bank = NARC_zone_event_430_T03R0601_bin, - .mapsec = MAPSEC_PEWTER_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 33, + .world_map_y = 2, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0757_T03R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0530_T03R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0466_T03R0601_bin, + .day_music_id = SEQ_GS_C_NIBI, + .night_music_id = SEQ_GS_C_NIBI, + .events_bank = NARC_zone_event_430_T03R0601_bin, + .mapsec = MAPSEC_PEWTER_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T08FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0808_T08FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0581_T08FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0513_T08FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_431_T08FS0101_bin, - .mapsec = MAPSEC_FUCHSIA_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0808_T08FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0581_T08FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0513_T08FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_431_T08FS0101_bin, + .mapsec = MAPSEC_FUCHSIA_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T08R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0243_T08R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0812_T08R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0585_T08R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0516_T08R0201_bin, - .day_music_id = SEQ_GS_C_SEKICHIKU, - .night_music_id = SEQ_GS_C_SEKICHIKU, - .events_bank = NARC_zone_event_432_T08R0201_bin, - .mapsec = MAPSEC_PAL_PARK, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0243_T08R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0812_T08R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0585_T08R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0516_T08R0201_bin, + .day_music_id = SEQ_GS_C_SEKICHIKU, + .night_music_id = SEQ_GS_C_SEKICHIKU, + .events_bank = NARC_zone_event_432_T08R0201_bin, + .mapsec = MAPSEC_PAL_PARK, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T08GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 53, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0259_T08GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0809_T08GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0582_T08GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0514_T08GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_433_T08GYM0101_bin, - .mapsec = MAPSEC_FUCHSIA_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 14, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 53, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0259_T08GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0809_T08GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0582_T08GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0514_T08GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_433_T08GYM0101_bin, + .mapsec = MAPSEC_FUCHSIA_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 14, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T08R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0813_T08R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0586_T08R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0517_T08R0401_bin, - .day_music_id = SEQ_GS_C_SEKICHIKU, - .night_music_id = SEQ_GS_C_SEKICHIKU, - .events_bank = NARC_zone_event_434_T08R0401_bin, - .mapsec = MAPSEC_FUCHSIA_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0813_T08R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0586_T08R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0517_T08R0401_bin, + .day_music_id = SEQ_GS_C_SEKICHIKU, + .night_music_id = SEQ_GS_C_SEKICHIKU, + .events_bank = NARC_zone_event_434_T08R0401_bin, + .mapsec = MAPSEC_FUCHSIA_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T08PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0810_T08PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0583_T08PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0515_T08PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_435_T08PC0101_bin, - .mapsec = MAPSEC_FUCHSIA_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0810_T08PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0583_T08PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0515_T08PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_435_T08PC0101_bin, + .mapsec = MAPSEC_FUCHSIA_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T08R0601] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0814_T08R0601_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0587_T08R0601_hdr_bin, - .msg_bank = NARC_msg_msg_0518_T08R0601_bin, - .day_music_id = SEQ_GS_C_SEKICHIKU, - .night_music_id = SEQ_GS_C_SEKICHIKU, - .events_bank = NARC_zone_event_436_T08R0601_bin, - .mapsec = MAPSEC_FUCHSIA_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0814_T08R0601_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0587_T08R0601_hdr_bin, + .msg_bank = NARC_msg_msg_0518_T08R0601_bin, + .day_music_id = SEQ_GS_C_SEKICHIKU, + .night_music_id = SEQ_GS_C_SEKICHIKU, + .events_bank = NARC_zone_event_436_T08R0601_bin, + .mapsec = MAPSEC_FUCHSIA_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R10PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0193_R10PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0438_R10PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_437_R10PC0102_bin, - .mapsec = MAPSEC_ROUTE_10, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0193_R10PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0438_R10PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_437_R10PC0102_bin, + .mapsec = MAPSEC_ROUTE_10, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T08PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 37, - .world_map_y = 13, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0811_T08PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0584_T08PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_438_T08PC0102_bin, - .mapsec = MAPSEC_FUCHSIA_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 37, + .world_map_y = 13, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0811_T08PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0584_T08PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_438_T08PC0102_bin, + .mapsec = MAPSEC_FUCHSIA_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D40R0106] = { .wild_encounter_bank = ENCDATA_D40R0106, - .area_data_bank = 98, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0275_D40R0106_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_439_D40R0106_bin, - .mapsec = MAPSEC_WHIRL_ISLANDS, - .area_icon = 4, - .unk_12_C = 11, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 10, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_3, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, + .area_data_bank = 98, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0275_D40R0106_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_439_D40R0106_bin, + .mapsec = MAPSEC_WHIRL_ISLANDS, + .area_icon = 4, + .unk_12_C = 11, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 10, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_3, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D22R0102] = { .wild_encounter_bank = ENCDATA_D22R0102, - .area_data_bank = 71, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0027_D22R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0026_D22R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0287_D22R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0063_D22R0102_bin, - .day_music_id = SEQ_GS_TAIKAI, - .night_music_id = SEQ_GS_TAIKAI, - .events_bank = NARC_zone_event_440_D22R0102_bin, - .mapsec = MAPSEC_NATIONAL_PARK, - .area_icon = 7, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 71, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0027_D22R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0026_D22R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0287_D22R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0063_D22R0102_bin, + .day_music_id = SEQ_GS_TAIKAI, + .night_music_id = SEQ_GS_TAIKAI, + .events_bank = NARC_zone_event_440_D22R0102_bin, + .mapsec = MAPSEC_NATIONAL_PARK, + .area_icon = 7, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D22R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 71, - .move_model_bank = 15, - .world_map_x = 11, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0027_D22R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_D_KOUEN, - .night_music_id = SEQ_GS_D_KOUEN, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_NATIONAL_PARK, - .area_icon = 7, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 1, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 71, + .move_model_bank = 15, + .world_map_x = 11, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0027_D22R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_D_KOUEN, + .night_music_id = SEQ_GS_D_KOUEN, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_NATIONAL_PARK, + .area_icon = 7, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 1, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_R10R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0276_R10R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0196_R10R0202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0441_R10R0202_hdr_bin, - .msg_bank = NARC_msg_msg_0345_R10R0202_bin, - .day_music_id = SEQ_GS_C_NIBI, - .night_music_id = SEQ_GS_C_NIBI, - .events_bank = NARC_zone_event_441_R10R0202_bin, - .mapsec = MAPSEC_POWER_PLANT, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0276_R10R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0196_R10R0202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0441_R10R0202_hdr_bin, + .msg_bank = NARC_msg_msg_0345_R10R0202_bin, + .day_music_id = SEQ_GS_C_NIBI, + .night_music_id = SEQ_GS_C_NIBI, + .events_bank = NARC_zone_event_441_R10R0202_bin, + .mapsec = MAPSEC_POWER_PLANT, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0216] = { .wild_encounter_bank = ENCDATA_D24R0216, - .area_data_bank = 105, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0037_D24R0205_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0053_D24R0216_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0314_D24R0216_hdr_bin, - .msg_bank = NARC_msg_msg_0084_D24R0216_bin, - .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .events_bank = NARC_zone_event_442_D24R0216_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 105, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0037_D24R0205_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0053_D24R0216_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0314_D24R0216_hdr_bin, + .msg_bank = NARC_msg_msg_0084_D24R0216_bin, + .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .events_bank = NARC_zone_event_442_D24R0216_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0217] = { .wild_encounter_bank = ENCDATA_D24R0217, - .area_data_bank = 105, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0181_D24R0211_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0054_D24R0217_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0315_D24R0217_hdr_bin, - .msg_bank = NARC_msg_msg_0085_D24R0217_bin, - .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .events_bank = NARC_zone_event_443_D24R0217_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 105, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0181_D24R0211_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0054_D24R0217_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0315_D24R0217_hdr_bin, + .msg_bank = NARC_msg_msg_0085_D24R0217_bin, + .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .events_bank = NARC_zone_event_443_D24R0217_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D24R0218] = { .wild_encounter_bank = ENCDATA_D24R0218, - .area_data_bank = 105, - .move_model_bank = 15, - .world_map_x = 13, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0037_D24R0205_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0055_D24R0218_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0316_D24R0218_hdr_bin, - .msg_bank = NARC_msg_msg_0086_D24R0218_bin, - .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, - .events_bank = NARC_zone_event_444_D24R0218_bin, - .mapsec = MAPSEC_RUINS_OF_ALPH, - .area_icon = 4, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_BUILDING_3, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 105, + .move_model_bank = 15, + .world_map_x = 13, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0037_D24R0205_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0055_D24R0218_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0316_D24R0218_hdr_bin, + .msg_bank = NARC_msg_msg_0086_D24R0218_bin, + .day_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .night_music_id = SEQ_GS_D_UNKNOWN_ISEKI, + .events_bank = NARC_zone_event_444_D24R0218_bin, + .mapsec = MAPSEC_RUINS_OF_ALPH, + .area_icon = 4, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_BUILDING_3, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R07R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 39, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0187_R07R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0432_R07R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0337_R07R0101_bin, - .day_music_id = SEQ_GS_R_14_03, - .night_music_id = SEQ_GS_R_14_03, - .events_bank = NARC_zone_event_445_R07R0101_bin, - .mapsec = MAPSEC_ROUTE_7, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 39, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0070_R31R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0187_R07R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0432_R07R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0337_R07R0101_bin, + .day_music_id = SEQ_GS_R_14_03, + .night_music_id = SEQ_GS_R_14_03, + .events_bank = NARC_zone_event_445_R07R0101_bin, + .mapsec = MAPSEC_ROUTE_7, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T05PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0770_T05PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0543_T05PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_446_T05PC0102_bin, - .mapsec = MAPSEC_LAVENDER_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0770_T05PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0543_T05PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_446_T05PC0102_bin, + .mapsec = MAPSEC_LAVENDER_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T04PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 4, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0762_T04PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0535_T04PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_447_T04PC0102_bin, - .mapsec = MAPSEC_CERULEAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 4, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0762_T04PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0535_T04PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_447_T04PC0102_bin, + .mapsec = MAPSEC_CERULEAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T02GYM0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 55, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0261_T02GYM0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0743_T02GYM0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0516_T02GYM0101_hdr_bin, - .msg_bank = NARC_msg_msg_0454_T02GYM0101_bin, - .day_music_id = SEQ_GS_GYM, - .night_music_id = SEQ_GS_GYM, - .events_bank = NARC_zone_event_448_T02GYM0101_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 55, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0261_T02GYM0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0743_T02GYM0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0516_T02GYM0101_hdr_bin, + .msg_bank = NARC_msg_msg_0454_T02GYM0101_bin, + .day_music_id = SEQ_GS_GYM, + .night_music_id = SEQ_GS_GYM, + .events_bank = NARC_zone_event_448_T02GYM0101_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T02R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0746_T02R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0519_T02R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0456_T02R0201_bin, - .day_music_id = SEQ_GS_C_TOKIWA, - .night_music_id = SEQ_GS_C_TOKIWA, - .events_bank = NARC_zone_event_449_T02R0201_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0096_T21R0401_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0746_T02R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0519_T02R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0456_T02R0201_bin, + .day_music_id = SEQ_GS_C_TOKIWA, + .night_music_id = SEQ_GS_C_TOKIWA, + .events_bank = NARC_zone_event_449_T02R0201_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T02R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0244_T02R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0747_T02R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0520_T02R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0457_T02R0301_bin, - .day_music_id = SEQ_GS_C_TOKIWA, - .night_music_id = SEQ_GS_C_TOKIWA, - .events_bank = NARC_zone_event_450_T02R0301_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0244_T02R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0747_T02R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0520_T02R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0457_T02R0301_bin, + .day_music_id = SEQ_GS_C_TOKIWA, + .night_music_id = SEQ_GS_C_TOKIWA, + .events_bank = NARC_zone_event_450_T02R0301_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T02R0302] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0245_T02R0302_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0748_T02R0302_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0521_T02R0302_hdr_bin, - .msg_bank = NARC_msg_msg_0458_T02R0302_bin, - .day_music_id = SEQ_GS_C_TOKIWA, - .night_music_id = SEQ_GS_C_TOKIWA, - .events_bank = NARC_zone_event_451_T02R0302_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0245_T02R0302_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0748_T02R0302_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0521_T02R0302_hdr_bin, + .msg_bank = NARC_msg_msg_0458_T02R0302_bin, + .day_music_id = SEQ_GS_C_TOKIWA, + .night_music_id = SEQ_GS_C_TOKIWA, + .events_bank = NARC_zone_event_451_T02R0302_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T02FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0742_T02FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0515_T02FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0453_T02FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_452_T02FS0101_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0742_T02FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0515_T02FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0453_T02FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_452_T02FS0101_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T02PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0744_T02PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0517_T02PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0455_T02PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_453_T02PC0101_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0744_T02PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0517_T02PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0455_T02PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_453_T02PC0101_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T02PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0745_T02PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0518_T02PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_454_T02PC0102_bin, - .mapsec = MAPSEC_VIRIDIAN_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0745_T02PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0518_T02PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_454_T02PC0102_bin, + .mapsec = MAPSEC_VIRIDIAN_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T01R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0246_T01R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0736_T01R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0509_T01R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0447_T01R0101_bin, - .day_music_id = SEQ_GS_T_MASARA, - .night_music_id = SEQ_GS_T_MASARA, - .events_bank = NARC_zone_event_455_T01R0101_bin, - .mapsec = MAPSEC_PALLET_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0246_T01R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0736_T01R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0509_T01R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0447_T01R0101_bin, + .day_music_id = SEQ_GS_T_MASARA, + .night_music_id = SEQ_GS_T_MASARA, + .events_bank = NARC_zone_event_455_T01R0101_bin, + .mapsec = MAPSEC_PALLET_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T01R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0248_T01R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0738_T01R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0511_T01R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0449_T01R0201_bin, - .day_music_id = SEQ_GS_T_MASARA, - .night_music_id = SEQ_GS_T_MASARA, - .events_bank = NARC_zone_event_456_T01R0201_bin, - .mapsec = MAPSEC_PALLET_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0248_T01R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0738_T01R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0511_T01R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0449_T01R0201_bin, + .day_music_id = SEQ_GS_T_MASARA, + .night_music_id = SEQ_GS_T_MASARA, + .events_bank = NARC_zone_event_456_T01R0201_bin, + .mapsec = MAPSEC_PALLET_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T01R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0250_T01R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0740_T01R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0513_T01R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0451_T01R0301_bin, - .day_music_id = SEQ_GS_T_MASARA, - .night_music_id = SEQ_GS_T_MASARA, - .events_bank = NARC_zone_event_457_T01R0301_bin, - .mapsec = MAPSEC_PALLET_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0250_T01R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0740_T01R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0513_T01R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0451_T01R0301_bin, + .day_music_id = SEQ_GS_T_MASARA, + .night_music_id = SEQ_GS_T_MASARA, + .events_bank = NARC_zone_event_457_T01R0301_bin, + .mapsec = MAPSEC_PALLET_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T01R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0247_T01R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0737_T01R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0510_T01R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0448_T01R0102_bin, - .day_music_id = SEQ_GS_T_MASARA, - .night_music_id = SEQ_GS_T_MASARA, - .events_bank = NARC_zone_event_458_T01R0102_bin, - .mapsec = MAPSEC_PALLET_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0247_T01R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0737_T01R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0510_T01R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0448_T01R0102_bin, + .day_music_id = SEQ_GS_T_MASARA, + .night_music_id = SEQ_GS_T_MASARA, + .events_bank = NARC_zone_event_458_T01R0102_bin, + .mapsec = MAPSEC_PALLET_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T01R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 43, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0249_T01R0202_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0739_T01R0202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0512_T01R0202_hdr_bin, - .msg_bank = NARC_msg_msg_0450_T01R0202_bin, - .day_music_id = SEQ_GS_T_MASARA, - .night_music_id = SEQ_GS_T_MASARA, - .events_bank = NARC_zone_event_459_T01R0202_bin, - .mapsec = MAPSEC_PALLET_TOWN, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 43, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0249_T01R0202_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0739_T01R0202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0512_T01R0202_hdr_bin, + .msg_bank = NARC_msg_msg_0450_T01R0202_bin, + .day_music_id = SEQ_GS_T_MASARA, + .night_music_id = SEQ_GS_T_MASARA, + .events_bank = NARC_zone_event_459_T01R0202_bin, + .mapsec = MAPSEC_PALLET_TOWN, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T09PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0816_T09PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0589_T09PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0520_T09PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_460_T09PC0101_bin, - .mapsec = MAPSEC_CINNABAR_ISLAND, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0816_T09PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0589_T09PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0520_T09PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_460_T09PC0101_bin, + .mapsec = MAPSEC_CINNABAR_ISLAND, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T09PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 15, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0817_T09PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0590_T09PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_461_T09PC0102_bin, - .mapsec = MAPSEC_CINNABAR_ISLAND, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 15, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0817_T09PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0590_T09PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_461_T09PC0102_bin, + .mapsec = MAPSEC_CINNABAR_ISLAND, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R28R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 26, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0224_R28R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0469_R28R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0372_R28R0101_bin, - .day_music_id = SEQ_GS_CHAMPROAD, - .night_music_id = SEQ_GS_CHAMPROAD, - .events_bank = NARC_zone_event_462_R28R0101_bin, - .mapsec = MAPSEC_ROUTE_28, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 26, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0224_R28R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0469_R28R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0372_R28R0101_bin, + .day_music_id = SEQ_GS_CHAMPROAD, + .night_music_id = SEQ_GS_CHAMPROAD, + .events_bank = NARC_zone_event_462_R28R0101_bin, + .mapsec = MAPSEC_ROUTE_28, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R03PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0176_R03PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0421_R03PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0327_R03PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_463_R03PC0101_bin, - .mapsec = MAPSEC_ROUTE_3, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0176_R03PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0421_R03PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0327_R03PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_463_R03PC0101_bin, + .mapsec = MAPSEC_ROUTE_3, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R03PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0177_R03PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0422_R03PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_464_R03PC0102_bin, - .mapsec = MAPSEC_ROUTE_3, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0177_R03PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0422_R03PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_464_R03PC0102_bin, + .mapsec = MAPSEC_ROUTE_3, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D02R0104] = { .wild_encounter_bank = ENCDATA_D02R0104, - .area_data_bank = 97, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0281_D02R0104_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0010_D02R0104_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0271_D02R0104_hdr_bin, - .msg_bank = NARC_msg_msg_0051_D02R0104_bin, - .day_music_id = SEQ_GS_OTSUKIMI_EVENT, - .night_music_id = SEQ_GS_OTSUKIMI_EVENT, - .events_bank = NARC_zone_event_465_D02R0104_bin, - .mapsec = MAPSEC_MT_MOON, - .area_icon = 4, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = TRUE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 97, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0281_D02R0104_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0010_D02R0104_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0271_D02R0104_hdr_bin, + .msg_bank = NARC_msg_msg_0051_D02R0104_bin, + .day_music_id = SEQ_GS_OTSUKIMI_EVENT, + .night_music_id = SEQ_GS_OTSUKIMI_EVENT, + .events_bank = NARC_zone_event_465_D02R0104_bin, + .mapsec = MAPSEC_MT_MOON, + .area_icon = 4, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = TRUE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T31PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0950_T31PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0723_T31PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0637_T31PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_466_T31PC0101_bin, - .mapsec = MAPSEC_MT_SILVER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0950_T31PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0723_T31PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0637_T31PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_466_T31PC0101_bin, + .mapsec = MAPSEC_MT_SILVER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T31PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 25, - .world_map_y = 8, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0951_T31PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0724_T31PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_467_T31PC0102_bin, - .mapsec = MAPSEC_MT_SILVER, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 25, + .world_map_y = 8, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0951_T31PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0724_T31PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_467_T31PC0102_bin, + .mapsec = MAPSEC_MT_SILVER, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_HIROBA] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 45, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0280_HIROBA_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0147_HIROBA_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0400_HIROBA_hdr_bin, - .msg_bank = NARC_msg_msg_0212_HIROBA_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_468_HIROBA_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 45, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0280_HIROBA_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0147_HIROBA_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0400_HIROBA_hdr_bin, + .msg_bank = NARC_msg_msg_0212_HIROBA_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_468_HIROBA_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_R05R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0183_R05R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0428_R05R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0333_R05R0401_bin, - .day_music_id = SEQ_GS_R_12_03, - .night_music_id = SEQ_GS_R_12_03, - .events_bank = NARC_zone_event_469_R05R0401_bin, - .mapsec = MAPSEC_ROUTE_5, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0183_R05R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0428_R05R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0333_R05R0401_bin, + .day_music_id = SEQ_GS_R_12_03, + .night_music_id = SEQ_GS_R_12_03, + .events_bank = NARC_zone_event_469_R05R0401_bin, + .mapsec = MAPSEC_ROUTE_5, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D02FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 36, - .world_map_y = 3, - .matrix_id = NARC_map_matrix_map_matrix_0139_T24R0501_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0006_D02FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0267_D02FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0048_D02FS0101_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_470_D02FS0101_bin, - .mapsec = MAPSEC_MT_MOON, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 36, + .world_map_y = 3, + .matrix_id = NARC_map_matrix_map_matrix_0139_T24R0501_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0006_D02FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0267_D02FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0048_D02FS0101_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_470_D02FS0101_bin, + .mapsec = MAPSEC_MT_MOON, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25R0503] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 48, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 10, - .matrix_id = NARC_map_matrix_map_matrix_0282_T25R0503_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0895_T25R0503_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0668_T25R0503_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_KOGANE, - .night_music_id = SEQ_GS_C_KOGANE, - .events_bank = NARC_zone_event_471_T25R0503_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 48, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 10, + .matrix_id = NARC_map_matrix_map_matrix_0282_T25R0503_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0895_T25R0503_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0668_T25R0503_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_KOGANE, + .night_music_id = SEQ_GS_C_KOGANE, + .events_bank = NARC_zone_event_471_T25R0503_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T11R0603] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 48, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 6, - .matrix_id = NARC_map_matrix_map_matrix_0283_T11R0603_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0836_T11R0603_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0609_T11R0603_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_C_YAMABUKI, - .night_music_id = SEQ_GS_C_YAMABUKI, - .events_bank = NARC_zone_event_472_T11R0603_bin, - .mapsec = MAPSEC_SAFFRON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 48, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 6, + .matrix_id = NARC_map_matrix_map_matrix_0283_T11R0603_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0836_T11R0603_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0609_T11R0603_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_C_YAMABUKI, + .night_music_id = SEQ_GS_C_YAMABUKI, + .events_bank = NARC_zone_event_472_T11R0603_bin, + .mapsec = MAPSEC_SAFFRON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D51R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 100, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 1, - .matrix_id = NARC_map_matrix_map_matrix_0277_D51R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0130_D51R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0391_D51R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0145_D51R0101_bin, - .day_music_id = SEQ_GS_D_SHINTO, - .night_music_id = SEQ_GS_D_SHINTO, - .events_bank = NARC_zone_event_473_D51R0101_bin, - .mapsec = MAPSEC_SINJOH_RUINS, - .area_icon = 3, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 5, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_GENERAL, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 100, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 1, + .matrix_id = NARC_map_matrix_map_matrix_0277_D51R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0130_D51R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0391_D51R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0145_D51R0101_bin, + .day_music_id = SEQ_GS_D_SHINTO, + .night_music_id = SEQ_GS_D_SHINTO, + .events_bank = NARC_zone_event_473_D51R0101_bin, + .mapsec = MAPSEC_SINJOH_RUINS, + .area_icon = 3, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 5, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_GENERAL, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D51R0201] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 101, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 1, - .matrix_id = NARC_map_matrix_map_matrix_0278_D51R0201_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0131_D51R0201_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0392_D51R0201_hdr_bin, - .msg_bank = NARC_msg_msg_0146_D51R0201_bin, - .day_music_id = SEQ_GS_D_SHINTO, - .night_music_id = SEQ_GS_D_SHINTO, - .events_bank = NARC_zone_event_474_D51R0201_bin, - .mapsec = MAPSEC_SINJOH_RUINS, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_ALLOW, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 101, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 1, + .matrix_id = NARC_map_matrix_map_matrix_0278_D51R0201_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0131_D51R0201_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0392_D51R0201_hdr_bin, + .msg_bank = NARC_msg_msg_0146_D51R0201_bin, + .day_music_id = SEQ_GS_D_SHINTO, + .night_music_id = SEQ_GS_D_SHINTO, + .events_bank = NARC_zone_event_474_D51R0201_bin, + .mapsec = MAPSEC_SINJOH_RUINS, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_ALLOW, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_D51R0301] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 42, - .move_model_bank = 15, - .world_map_x = 20, - .world_map_y = 1, - .matrix_id = NARC_map_matrix_map_matrix_0287_D51R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0132_D51R0301_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0393_D51R0301_hdr_bin, - .msg_bank = NARC_msg_msg_0147_D51R0301_bin, - .day_music_id = SEQ_GS_D_SHINTO, - .night_music_id = SEQ_GS_D_SHINTO, - .events_bank = NARC_zone_event_475_D51R0301_bin, - .mapsec = MAPSEC_SINJOH_RUINS, - .area_icon = 9, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .area_data_bank = 42, + .move_model_bank = 15, + .world_map_x = 20, + .world_map_y = 1, + .matrix_id = NARC_map_matrix_map_matrix_0287_D51R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0132_D51R0301_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0393_D51R0301_hdr_bin, + .msg_bank = NARC_msg_msg_0147_D51R0301_bin, + .day_music_id = SEQ_GS_D_SHINTO, + .night_music_id = SEQ_GS_D_SHINTO, + .events_bank = NARC_zone_event_475_D51R0301_bin, + .mapsec = MAPSEC_SINJOH_RUINS, + .area_icon = 9, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D52R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 99, - .move_model_bank = 15, - .world_map_x = 2, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0279_D52R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0133_D52R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0394_D52R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0148_D52R0101_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_476_D52R0101_bin, - .mapsec = MAPSEC_EMBEDDED_TOWER, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 99, + .move_model_bank = 15, + .world_map_x = 2, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0279_D52R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0133_D52R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0394_D52R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0148_D52R0101_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_476_D52R0101_bin, + .mapsec = MAPSEC_EMBEDDED_TOWER, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D52R0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 99, - .move_model_bank = 15, - .world_map_x = 2, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0284_D52R0102_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0134_D52R0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0395_D52R0102_hdr_bin, - .msg_bank = NARC_msg_msg_0149_D52R0102_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_477_D52R0102_bin, - .mapsec = MAPSEC_EMBEDDED_TOWER, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 99, + .move_model_bank = 15, + .world_map_x = 2, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0284_D52R0102_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0134_D52R0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0395_D52R0102_hdr_bin, + .msg_bank = NARC_msg_msg_0149_D52R0102_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_477_D52R0102_bin, + .mapsec = MAPSEC_EMBEDDED_TOWER, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_D52R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 99, - .move_model_bank = 15, - .world_map_x = 2, - .world_map_y = 12, - .matrix_id = NARC_map_matrix_map_matrix_0285_D52R0103_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0135_D52R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0396_D52R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0150_D52R0103_bin, - .day_music_id = SEQ_GS_D_CHIKATSUURO, - .night_music_id = SEQ_GS_D_CHIKATSUURO, - .events_bank = NARC_zone_event_478_D52R0103_bin, - .mapsec = MAPSEC_EMBEDDED_TOWER, - .area_icon = 4, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 3, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_CAVE_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, + .area_data_bank = 99, + .move_model_bank = 15, + .world_map_x = 2, + .world_map_y = 12, + .matrix_id = NARC_map_matrix_map_matrix_0285_D52R0103_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0135_D52R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0396_D52R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0150_D52R0103_bin, + .day_music_id = SEQ_GS_D_CHIKATSUURO, + .night_music_id = SEQ_GS_D_CHIKATSUURO, + .events_bank = NARC_zone_event_478_D52R0103_bin, + .mapsec = MAPSEC_EMBEDDED_TOWER, + .area_icon = 4, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 3, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_CAVE_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, .escape_rope_allowed = TRUE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = FALSE, - .unk_14_1F = TRUE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = FALSE, + .unk_14_1F = TRUE, }, [MAP_T02R0401] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 63, - .move_model_bank = 15, - .world_map_x = 32, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0749_T02R0401_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0522_T02R0401_hdr_bin, - .msg_bank = NARC_msg_msg_0459_T02R0401_bin, - .day_music_id = SEQ_GS_C_TOKIWA, - .night_music_id = SEQ_GS_C_TOKIWA, - .events_bank = NARC_zone_event_479_T02R0401_bin, - .mapsec = MAPSEC_ROUTE_1, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 63, + .move_model_bank = 15, + .world_map_x = 32, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0069_R35R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0749_T02R0401_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0522_T02R0401_hdr_bin, + .msg_bank = NARC_msg_msg_0459_T02R0401_bin, + .day_music_id = SEQ_GS_C_TOKIWA, + .night_music_id = SEQ_GS_C_TOKIWA, + .events_bank = NARC_zone_event_479_T02R0401_bin, + .mapsec = MAPSEC_ROUTE_1, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0078_D32PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0339_D32PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0102_D32PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_480_D32PC0101_bin, - .mapsec = MAPSEC_FRONTIER_ACCESS, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0078_D32PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0339_D32PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0102_D32PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_480_D32PC0101_bin, + .mapsec = MAPSEC_FRONTIER_ACCESS, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0079_D32PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0340_D32PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_481_D32PC0102_bin, - .mapsec = MAPSEC_FRONTIER_ACCESS, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0079_D32PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0340_D32PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_481_D32PC0102_bin, + .mapsec = MAPSEC_FRONTIER_ACCESS, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32FS0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 27, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0077_D32FS0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0338_D32FS0101_hdr_bin, - .msg_bank = NARC_msg_msg_0101_D32FS0101_bin, - .day_music_id = SEQ_GS_FS, - .night_music_id = SEQ_GS_FS, - .events_bank = NARC_zone_event_482_D32FS0101_bin, - .mapsec = MAPSEC_FRONTIER_ACCESS, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 27, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0104_T21FS0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0077_D32FS0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0338_D32FS0101_hdr_bin, + .msg_bank = NARC_msg_msg_0101_D32FS0101_bin, + .day_music_id = SEQ_GS_FS, + .night_music_id = SEQ_GS_FS, + .events_bank = NARC_zone_event_482_D32FS0101_bin, + .mapsec = MAPSEC_FRONTIER_ACCESS, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D32R0103] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 7, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0082_D32R0103_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0343_D32R0103_hdr_bin, - .msg_bank = NARC_msg_msg_0105_D32R0103_bin, - .day_music_id = SEQ_GS_BATTLETOWER, - .night_music_id = SEQ_GS_BATTLETOWER, - .events_bank = NARC_zone_event_483_D32R0103_bin, - .mapsec = MAPSEC_FRONTIER_ACCESS, - .area_icon = 9, - .unk_12_C = 9, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 7, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0097_T21R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0082_D32R0103_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0343_D32R0103_hdr_bin, + .msg_bank = NARC_msg_msg_0105_D32R0103_bin, + .day_music_id = SEQ_GS_BATTLETOWER, + .night_music_id = SEQ_GS_BATTLETOWER, + .events_bank = NARC_zone_event_483_D32R0103_bin, + .mapsec = MAPSEC_FRONTIER_ACCESS, + .area_icon = 9, + .unk_12_C = 9, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R05R0202] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 44, - .move_model_bank = 15, - .world_map_x = 40, - .world_map_y = 5, - .matrix_id = NARC_map_matrix_map_matrix_0252_R05R0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0181_R05R0202_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0426_R05R0202_hdr_bin, - .msg_bank = NARC_msg_msg_0331_R05R0202_bin, - .day_music_id = SEQ_GS_D_IWAYAMA, - .night_music_id = SEQ_GS_D_IWAYAMA, - .events_bank = NARC_zone_event_484_R05R0202_bin, - .mapsec = MAPSEC_ROUTE_5, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = TRUE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 44, + .move_model_bank = 15, + .world_map_x = 40, + .world_map_y = 5, + .matrix_id = NARC_map_matrix_map_matrix_0252_R05R0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0181_R05R0202_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0426_R05R0202_hdr_bin, + .msg_bank = NARC_msg_msg_0331_R05R0202_bin, + .day_music_id = SEQ_GS_D_IWAYAMA, + .night_music_id = SEQ_GS_D_IWAYAMA, + .events_bank = NARC_zone_event_484_R05R0202_bin, + .mapsec = MAPSEC_ROUTE_5, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = TRUE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R12R0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 25, - .move_model_bank = 15, - .world_map_x = 44, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0200_R12R0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0445_R12R0101_hdr_bin, - .msg_bank = NARC_msg_msg_0349_R12R0101_bin, - .day_music_id = SEQ_GS_R_13_11, - .night_music_id = SEQ_GS_R_13_11, - .events_bank = NARC_zone_event_485_R12R0101_bin, - .mapsec = MAPSEC_ROUTE_12, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 25, + .move_model_bank = 15, + .world_map_x = 44, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0066_T20R0301_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0200_R12R0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0445_R12R0101_hdr_bin, + .msg_bank = NARC_msg_msg_0349_R12R0101_bin, + .day_music_id = SEQ_GS_R_13_11, + .night_music_id = SEQ_GS_R_13_11, + .events_bank = NARC_zone_event_485_R12R0101_bin, + .mapsec = MAPSEC_ROUTE_12, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D47PC0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 2, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0117_D47PC0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0378_D47PC0101_hdr_bin, - .msg_bank = NARC_msg_msg_0134_D47PC0101_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_486_D47PC0101_bin, - .mapsec = MAPSEC_SAFARI_ZONE_GATE, - .area_icon = 9, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 2, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0073_T21PC0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0117_D47PC0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0378_D47PC0101_hdr_bin, + .msg_bank = NARC_msg_msg_0134_D47PC0101_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_486_D47PC0101_bin, + .mapsec = MAPSEC_SAFARI_ZONE_GATE, + .area_icon = 9, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_D47PC0102] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 2, - .world_map_y = 9, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0118_D47PC0102_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0379_D47PC0102_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_487_D47PC0102_bin, - .mapsec = MAPSEC_SAFARI_ZONE_GATE, - .area_icon = 9, - .unk_12_C = 8, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 2, + .world_map_y = 9, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0118_D47PC0102_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0379_D47PC0102_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_487_D47PC0102_bin, + .mapsec = MAPSEC_SAFARI_ZONE_GATE, + .area_icon = 9, + .unk_12_C = 8, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T25SP0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 66, - .move_model_bank = 15, - .world_map_x = 10, - .world_map_y = 11, - .matrix_id = NARC_map_matrix_map_matrix_0286_T25SP0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0910_T25SP0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0683_T25SP0101_hdr_bin, - .msg_bank = NARC_msg_msg_0603_T25SP0101_bin, - .day_music_id = SEQ_GS_GAME, - .night_music_id = SEQ_GS_GAME, - .events_bank = NARC_zone_event_488_T25SP0101_bin, - .mapsec = MAPSEC_GOLDENROD_CITY, - .area_icon = 9, - .unk_12_C = 5, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 66, + .move_model_bank = 15, + .world_map_x = 10, + .world_map_y = 11, + .matrix_id = NARC_map_matrix_map_matrix_0286_T25SP0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0910_T25SP0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0683_T25SP0101_hdr_bin, + .msg_bank = NARC_msg_msg_0603_T25SP0101_bin, + .day_music_id = SEQ_GS_GAME, + .night_music_id = SEQ_GS_GAME, + .events_bank = NARC_zone_event_488_T25SP0101_bin, + .mapsec = MAPSEC_GOLDENROD_CITY, + .area_icon = 9, + .unk_12_C = 5, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_T07SP0101] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 66, - .move_model_bank = 15, - .world_map_x = 38, - .world_map_y = 7, - .matrix_id = NARC_map_matrix_map_matrix_0286_T25SP0101_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0806_T07SP0101_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0579_T07SP0101_hdr_bin, - .msg_bank = NARC_msg_msg_0511_T07SP0101_bin, - .day_music_id = SEQ_GS_GAME, - .night_music_id = SEQ_GS_GAME, - .events_bank = NARC_zone_event_489_T07SP0101_bin, - .mapsec = MAPSEC_CELADON_CITY, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = TRUE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 66, + .move_model_bank = 15, + .world_map_x = 38, + .world_map_y = 7, + .matrix_id = NARC_map_matrix_map_matrix_0286_T25SP0101_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0806_T07SP0101_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0579_T07SP0101_hdr_bin, + .msg_bank = NARC_msg_msg_0511_T07SP0101_bin, + .day_music_id = SEQ_GS_GAME, + .night_music_id = SEQ_GS_GAME, + .events_bank = NARC_zone_event_489_T07SP0101_bin, + .mapsec = MAPSEC_CELADON_CITY, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = TRUE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, [MAP_R00] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 4, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_GAME, - .night_music_id = SEQ_GS_GAME, - .events_bank = NARC_zone_event_000_DUMMY_bin, - .mapsec = MAPSEC_MYSTERY_ZONE, - .area_icon = 6, - .unk_12_C = 10, - .is_kanto = FALSE, - .weather = 0, - .location_type = 2, - .camera_type = 0, - .follow_mode = MAP_FOLLOWMODE_PREVENT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = FALSE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = FALSE, - .unk_14_1E = FALSE, - .unk_14_1F = FALSE, + .area_data_bank = 4, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0139_EVERYWHERE_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0399_EVERYWHERE_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_GAME, + .night_music_id = SEQ_GS_GAME, + .events_bank = NARC_zone_event_000_DUMMY_bin, + .mapsec = MAPSEC_MYSTERY_ZONE, + .area_icon = 6, + .unk_12_C = 10, + .is_kanto = FALSE, + .weather = 0, + .location_type = 2, + .camera_type = 0, + .follow_mode = MAP_FOLLOWMODE_PREVENT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = FALSE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = FALSE, + .unk_14_1E = FALSE, + .unk_14_1F = FALSE, }, [MAP_T10R0801] = { .wild_encounter_bank = ENCDATA_NA, - .area_data_bank = 26, - .move_model_bank = 15, - .world_map_x = 0, - .world_map_y = 0, - .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, - .scripts_bank = NARC_scr_seq_scr_seq_0826_T10R0801_bin, - .script_header_bank = NARC_scr_seq_scr_seq_0599_T10R0801_hdr_bin, - .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, - .day_music_id = SEQ_GS_POKESEN, - .night_music_id = SEQ_GS_POKESEN, - .events_bank = NARC_zone_event_490_T10R0801_bin, - .mapsec = MAPSEC_POKEMON_LEAGUE, - .area_icon = 9, - .unk_12_C = 12, - .is_kanto = FALSE, - .weather = 0, - .location_type = 4, - .camera_type = 4, - .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, - .battle_bg = BATTLE_BG_BUILDING_1, - .bike_allowed = FALSE, - .unk_14_1A = TRUE, - .escape_rope_allowed = FALSE, - .fly_allowed = FALSE, - .unk_14_1D = TRUE, - .unk_14_1E = TRUE, - .unk_14_1F = TRUE, + .area_data_bank = 26, + .move_model_bank = 15, + .world_map_x = 0, + .world_map_y = 0, + .matrix_id = NARC_map_matrix_map_matrix_0077_T27PC0105_bin, + .scripts_bank = NARC_scr_seq_scr_seq_0826_T10R0801_bin, + .script_header_bank = NARC_scr_seq_scr_seq_0599_T10R0801_hdr_bin, + .msg_bank = NARC_msg_msg_0003_EVERYWHERE_bin, + .day_music_id = SEQ_GS_POKESEN, + .night_music_id = SEQ_GS_POKESEN, + .events_bank = NARC_zone_event_490_T10R0801_bin, + .mapsec = MAPSEC_POKEMON_LEAGUE, + .area_icon = 9, + .unk_12_C = 12, + .is_kanto = FALSE, + .weather = 0, + .location_type = 4, + .camera_type = 4, + .follow_mode = MAP_FOLLOWMODE_HEIGHT_RESTRICT, + .battle_bg = BATTLE_BG_BUILDING_1, + .bike_allowed = FALSE, + .unk_14_1A = TRUE, + .escape_rope_allowed = FALSE, + .fly_allowed = FALSE, + .unk_14_1D = TRUE, + .unk_14_1E = TRUE, + .unk_14_1F = TRUE, }, }; diff --git a/src/daycare.c b/src/daycare.c index 5622efe1fa..db1bed49a4 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -10,7 +10,7 @@ void Save_Daycare_Init(Daycare *daycare) { memset(daycare, 0, sizeof(Daycare)); ZeroBoxMonData(&daycare->mons[0].mon); ZeroBoxMonData(&daycare->mons[1].mon); - daycare->egg_pid = 0; + daycare->egg_pid = 0; daycare->egg_cycles = 0; } @@ -85,7 +85,7 @@ void DaycareMon_Extras_Init(DaycareMail *mail) { mail->nickname[i] = 0; } - mail->ot_name[0] = EOS; + mail->ot_name[0] = EOS; mail->nickname[0] = EOS; } diff --git a/src/dex_mon_measures.c b/src/dex_mon_measures.c index d5f6b8c13b..6cbc39091b 100644 --- a/src/dex_mon_measures.c +++ b/src/dex_mon_measures.c @@ -38,7 +38,7 @@ void PokedexData_LoadAll(struct PokedexData *zkn, int mode, HeapID heapId) { GF_ASSERT(zkn->height == NULL); GF_ASSERT(zkn->weight == NULL); - narc = NARC_New(GetPokedexDataNarcID(), heapId); + narc = NARC_New(GetPokedexDataNarcID(), heapId); zkn->height = ZknNarc_LoadHeight(narc, heapId); zkn->weight = ZknNarc_LoadWeight(narc, heapId); @@ -112,11 +112,11 @@ static void sub_020914E8(NARC *narc, u32 **a1, u32 **a2, HeapID heapId) { void SetDexBanksByGiratinaForm(int form) { if (form == 0) { - sDataNarcId = NARC_application_zukanlist_zukan_data_zukan_data_gira; + sDataNarcId = NARC_application_zukanlist_zukan_data_zukan_data_gira; sWeightMsgBank = NARC_msg_msg_0813_bin; sHeightMsgBank = NARC_msg_msg_0815_bin; } else { - sDataNarcId = NARC_application_zukanlist_zukan_data_zukan_data; + sDataNarcId = NARC_application_zukanlist_zukan_data_zukan_data; sWeightMsgBank = NARC_msg_msg_0812_bin; sHeightMsgBank = NARC_msg_msg_0814_bin; } diff --git a/src/easy_chat.c b/src/easy_chat.c index 4f0c8ab95f..542a7dc69b 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -67,18 +67,18 @@ static const u8 sLanguageToGreetingMap[6][2] = { // This is a leftover from Diamond that is linked // simply because the routines that use it are // present in source but dead-stripped at link time. -static const ecword_t sEasyChatHey[] = { EC_WORD_GREETINGS_HEY, EC_WORD_GREETINGS_HEY_2 }; -static const ecword_t sEasyChatHuh_[] = { EC_WORD_GREETINGS_HUH_, EC_WORD_GREETINGS_HUH__2 }; -static const ecword_t sEasyChatI[] = { EC_WORD_PEOPLE_I, EC_WORD_PEOPLE_I_2, EC_WORD_PEOPLE_I_3, EC_WORD_PEOPLE_I_4 }; -static const ecword_t sEasyChatKids[] = { EC_WORD_PEOPLE_KIDS, EC_WORD_PEOPLE_KIDS_2 }; -static const ecword_t sEasyChatNoWay[] = { EC_WORD_GREETINGS_NO_WAY, EC_WORD_FEELINGS_NO_WAY }; +static const ecword_t sEasyChatHey[] = { EC_WORD_GREETINGS_HEY, EC_WORD_GREETINGS_HEY_2 }; +static const ecword_t sEasyChatHuh_[] = { EC_WORD_GREETINGS_HUH_, EC_WORD_GREETINGS_HUH__2 }; +static const ecword_t sEasyChatI[] = { EC_WORD_PEOPLE_I, EC_WORD_PEOPLE_I_2, EC_WORD_PEOPLE_I_3, EC_WORD_PEOPLE_I_4 }; +static const ecword_t sEasyChatKids[] = { EC_WORD_PEOPLE_KIDS, EC_WORD_PEOPLE_KIDS_2 }; +static const ecword_t sEasyChatNoWay[] = { EC_WORD_GREETINGS_NO_WAY, EC_WORD_FEELINGS_NO_WAY }; static const ecword_t sEasyChatAnticipation[] = { EC_WORD_ABILITY(ABILITY_ANTICIPATION), EC_WORD_FEELINGS_ANTICIPATION }; -static const ecword_t sEasyChatYou[] = { EC_WORD_PEOPLE_YOU, EC_WORD_PEOPLE_YOU_2 }; -static const ecword_t sEasyChatSimple[] = { EC_WORD_ABILITY(ABILITY_SIMPLE), EC_WORD_FEELINGS_SIMPLE }; -static const ecword_t sEasyChatWelcome[] = { EC_WORD_GREETINGS_WELCOME, EC_WORD_GREETINGS_WELCOME_2 }; -static const ecword_t sEasyChatWow[] = { EC_WORD_GREETINGS_WOW, EC_WORD_GREETINGS_WOW_2 }; -static const ecword_t sEasyChatPsychic[] = { EC_WORD_MOVE(MOVE_PSYCHIC), EC_WORD_TYPE(TYPE_PSYCHIC) }; -static const ecword_t sEasyChatOk[] = { EC_WORD_GREETINGS_OK, EC_WORD_GREETINGS_OK_2 }; +static const ecword_t sEasyChatYou[] = { EC_WORD_PEOPLE_YOU, EC_WORD_PEOPLE_YOU_2 }; +static const ecword_t sEasyChatSimple[] = { EC_WORD_ABILITY(ABILITY_SIMPLE), EC_WORD_FEELINGS_SIMPLE }; +static const ecword_t sEasyChatWelcome[] = { EC_WORD_GREETINGS_WELCOME, EC_WORD_GREETINGS_WELCOME_2 }; +static const ecword_t sEasyChatWow[] = { EC_WORD_GREETINGS_WOW, EC_WORD_GREETINGS_WOW_2 }; +static const ecword_t sEasyChatPsychic[] = { EC_WORD_MOVE(MOVE_PSYCHIC), EC_WORD_TYPE(TYPE_PSYCHIC) }; +static const ecword_t sEasyChatOk[] = { EC_WORD_GREETINGS_OK, EC_WORD_GREETINGS_OK_2 }; typedef struct ECIdenticalPhrases { const ecword_t *data; @@ -104,7 +104,7 @@ EasyChatManager *EasyChatManager_New(HeapID heapId) { EasyChatManager *ret = AllocFromHeap(heapId, sizeof(EasyChatManager)); for (s32 i = 0; i < EC_GROUP_MAX; i++) { - ret->heapId = heapId; // inadvertently inside the loop + ret->heapId = heapId; // inadvertently inside the loop ret->msgData[i] = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, sNarcMsgBanks[i], heapId); } return ret; @@ -161,7 +161,7 @@ BOOL GetCategoryAndMsgNoByECWordIdx(u16 ecWord, u32 *category, u32 *msgNo) { count += sNarcMsgCounts[bank]; if (wordId < count) { *category = bank; - *msgNo = (wordId - (count - sNarcMsgCounts[bank])); + *msgNo = (wordId - (count - sNarcMsgCounts[bank])); return TRUE; } } @@ -177,7 +177,7 @@ void Save_EasyChat_Init(SaveEasyChat *saveEasyChat) { u32 i; saveEasyChat->greetings = 0; - saveEasyChat->trendy = 0; + saveEasyChat->trendy = 0; for (i = 0; i < NELEMS(sLanguageToGreetingMap); i++) { if (sLanguageToGreetingMap[i][0] == GAME_LANGUAGE) { Save_EasyChat_SetGreetingFlag(saveEasyChat, sLanguageToGreetingMap[i][1]); diff --git a/src/encounter.c b/src/encounter.c index 45684a768d..137967848e 100644 --- a/src/encounter.c +++ b/src/encounter.c @@ -59,7 +59,7 @@ static void sub_02051660(FieldSystem *fieldSystem, BattleSetup *setup); static BOOL Task_StartBattle(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); BattleSetup *battleSetup = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -82,13 +82,13 @@ static void CallTask_StartBattle(TaskManager *taskManager, BattleSetup *setup) { static Encounter *Encounter_New(BattleSetup *setup, s32 effect, s32 bgm, u32 *winFlag) { Encounter *encounter = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(Encounter)); - encounter->winFlag = winFlag; + encounter->winFlag = winFlag; if (winFlag != NULL) { *winFlag = BATTLE_OUTCOME_NONE; } encounter->effect = effect; - encounter->bgm = bgm; - encounter->setup = setup; + encounter->bgm = bgm; + encounter->setup = setup; return encounter; } @@ -113,8 +113,8 @@ static void sub_02050724(BattleSetup *setup, FieldSystem *fieldSystem) { static BOOL Task_StartEncounter(TaskManager *taskManager) { // todo: better name FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -190,8 +190,8 @@ static void sub_0205087C(s32 flag, FieldSystem *fieldSystem) { static BOOL Task_020508B8(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -224,8 +224,8 @@ static BOOL Task_020508B8(TaskManager *taskManager) { static BOOL Task_02050960(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -251,8 +251,8 @@ static BOOL Task_02050960(TaskManager *taskManager) { static BOOL Task_020509F0(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -294,14 +294,14 @@ void CallTask_020509F0(TaskManager *taskManager, BattleSetup *battleSetup, s32 e static WildEncounter *WildEncounter_New(BattleSetup *setup, s32 effect, s32 bgm, u32 *winFlag) { WildEncounter *encounter = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(WildEncounter)); - encounter->winFlag = winFlag; + encounter->winFlag = winFlag; if (winFlag != NULL) { *winFlag = BATTLE_OUTCOME_NONE; } encounter->effect = effect; - encounter->bgm = bgm; - encounter->setup = setup; - encounter->state = 0; + encounter->bgm = bgm; + encounter->setup = setup; + encounter->state = 0; return encounter; } @@ -312,8 +312,8 @@ static void WildEncounter_Delete(WildEncounter *encounter) { void sub_02050B08(FieldSystem *fieldSystem, BattleSetup *setup) { SaveVarsFlags *flags = Save_VarsFlags_Get(fieldSystem->saveData); - s32 effect = BattleSetup_GetWildTransitionEffect(setup); - s32 bgm = BattleSetup_GetWildBattleMusic(setup); + s32 effect = BattleSetup_GetWildTransitionEffect(setup); + s32 bgm = BattleSetup_GetWildBattleMusic(setup); if (Save_VarsFlags_CheckSafariSysFlag(flags)) { Encounter *encounter = Encounter_New(setup, effect, bgm, NULL); @@ -329,8 +329,8 @@ void sub_02050B08(FieldSystem *fieldSystem, BattleSetup *setup) { void FieldSystem_StartForcedWildBattle(FieldSystem *fieldSystem, TaskManager *taskManager, BattleSetup *setup) { SaveVarsFlags *flags = Save_VarsFlags_Get(fieldSystem->saveData); - s32 effect = BattleSetup_GetWildTransitionEffect(setup); - s32 bgm = BattleSetup_GetWildBattleMusic(setup); + s32 effect = BattleSetup_GetWildTransitionEffect(setup); + s32 bgm = BattleSetup_GetWildBattleMusic(setup); if (Save_VarsFlags_CheckSafariSysFlag(flags)) { Encounter *encounter = Encounter_New(setup, effect, bgm, NULL); @@ -398,9 +398,9 @@ static BOOL Task_WildEncounter(TaskManager *taskManager) { static BOOL Task_SafariEncounter(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); - u16 *safariBalls = LocalFieldData_GetSafariBallsCounter(Save_LocalFieldData_Get(fieldSystem->saveData)); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); + u16 *safariBalls = LocalFieldData_GetSafariBallsCounter(Save_LocalFieldData_Get(fieldSystem->saveData)); switch (*state) { case 0: @@ -458,7 +458,7 @@ static BOOL Task_SafariEncounter(TaskManager *taskManager) { } } else { PCStorage *pc = SaveArray_PCStorage_Get(fieldSystem->saveData); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); if (PCStorage_FindFirstBoxWithEmptySlot(pc) == NUM_BOXES && Party_GetCount(party) == PARTY_SIZE) { QueueScript(taskManager, std_safari_storage_out, NULL, NULL); } @@ -474,10 +474,10 @@ static BOOL Task_SafariEncounter(TaskManager *taskManager) { static BOOL Task_BugContestEncounter(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - BugContest *contest = FieldSystem_BugContest_Get(fieldSystem); - u32 *state = TaskManager_GetStatePtr(taskManager); - u16 *sportBall = BugContest_GetSportBallsAddr(contest); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + BugContest *contest = FieldSystem_BugContest_Get(fieldSystem); + u32 *state = TaskManager_GetStatePtr(taskManager); + u16 *sportBall = BugContest_GetSportBallsAddr(contest); switch (*state) { case 0: @@ -540,7 +540,7 @@ static BOOL Task_BugContestEncounter(TaskManager *taskManager) { void SetupAndStartWildBattle(TaskManager *taskManager, u16 species, u8 level, u32 *winFlag, BOOL canFlee, BOOL shiny) { BattleSetup *setup; FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_NONE); + setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_NONE); BattleSetup_InitFromFieldSystem(setup, fieldSystem); ov02_02247F30(fieldSystem, species, level, shiny, setup); @@ -556,7 +556,7 @@ void SetupAndStartWildBattle(TaskManager *taskManager, u16 species, u8 level, u3 void SetupAndStartFatefulWildBattle(TaskManager *taskManager, u16 species, u8 level, u32 *winFlag, BOOL canRun) { BattleSetup *setup; FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - setup = BattleSetup_New(HEAP_ID_FIELD, 0); + setup = BattleSetup_New(HEAP_ID_FIELD, 0); BattleSetup_InitFromFieldSystem(setup, fieldSystem); ov02_02247F30(fieldSystem, species, level, FALSE, setup); @@ -575,8 +575,8 @@ void SetupAndStartFatefulWildBattle(TaskManager *taskManager, u16 species, u8 le static BOOL Task_PalParkEncounter(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -630,7 +630,7 @@ void sub_020511F8(FieldSystem *fieldSystem, BattleSetup *setup) { void SetupAndStartFirstBattle(TaskManager *taskManager, u16 species, u8 level) { // leftover from DP, still used to setup a battle where items are not usable and the player cannot run FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - BattleSetup *setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_NONE); + BattleSetup *setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_NONE); BattleSetup_InitFromFieldSystem(setup, fieldSystem); ov02_02247F30(fieldSystem, species, level, FALSE, setup); @@ -643,9 +643,9 @@ void SetupAndStartFirstBattle(TaskManager *taskManager, u16 species, u8 level) { } static BOOL Task_TutorialBattle(TaskManager *taskManager) { - Encounter *encounter = TaskManager_GetEnvironment(taskManager); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -685,7 +685,7 @@ void SetupAndStartTutorialBattle(TaskManager *taskManager) { BattleSetup *setup; FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - setup = BattleSetup_New_Tutorial(HEAP_ID_FIELD, fieldSystem); + setup = BattleSetup_New_Tutorial(HEAP_ID_FIELD, fieldSystem); encounter = Encounter_New(setup, BattleSetup_GetWildTransitionEffect(setup), BattleSetup_GetWildBattleMusic(setup), NULL); TaskManager_Call(taskManager, Task_TutorialBattle, encounter); @@ -714,8 +714,8 @@ void SetupAndStartTrainerBattle(TaskManager *taskManager, u32 opponentTrainer1, setup = BattleSetup_New(HEAP_ID_FIELD, battleType); BattleSetup_InitFromFieldSystem(setup, fieldSystem); - setup->trainerId[BATTLER_ENEMY] = opponentTrainer1; - setup->trainerId[BATTLER_ENEMY2] = opponentTrainer2; + setup->trainerId[BATTLER_ENEMY] = opponentTrainer1; + setup->trainerId[BATTLER_ENEMY2] = opponentTrainer2; setup->trainerId[BATTLER_PLAYER2] = followerTrainerNum; EnemyTrainerSet_Init(setup, fieldSystem->saveData, heapId); @@ -773,15 +773,15 @@ void CallTask_02050960(TaskManager *taskManager, s32 target, s32 maxLevel, u32 f if (flag == 0) { setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER); - mode = 0; + mode = 0; } else if (flag == 1) { setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLES | BATTLE_TYPE_TRAINER); - mode = 7; + mode = 7; } else { setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_FRONTIER | BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLES | BATTLE_TYPE_TRAINER); // these don't seem right - setup->trainerId[BATTLER_ENEMY] = TRAINER_RIVAL_SILVER; + setup->trainerId[BATTLER_ENEMY] = TRAINER_RIVAL_SILVER; setup->trainerId[BATTLER_ENEMY2] = TRAINER_RIVAL_SILVER_2; EnemyTrainerSet_Init(setup, fieldSystem->saveData, HEAP_ID_FIELD); @@ -794,7 +794,7 @@ void CallTask_02050960(TaskManager *taskManager, s32 target, s32 maxLevel, u32 f setup->unk1B2 = mode; - encounter = Encounter_New(setup, BattleSetup_GetWildTransitionEffect(setup), BattleSetup_GetWildBattleMusic(setup), NULL); + encounter = Encounter_New(setup, BattleSetup_GetWildTransitionEffect(setup), BattleSetup_GetWildBattleMusic(setup), NULL); encounter->unkC = target; TaskManager_Call(taskManager, Task_02050960, encounter); @@ -802,8 +802,8 @@ void CallTask_02050960(TaskManager *taskManager, s32 target, s32 maxLevel, u32 f static BOOL sub_02051540(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Encounter *encounter = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + Encounter *encounter = TaskManager_GetEnvironment(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: @@ -853,7 +853,7 @@ void sub_020515FC(FieldSystem *fieldSystem, Party *party, s32 battleType) { static void sub_02051660(FieldSystem *fieldSystem, BattleSetup *setup) { Pokemon *mon; u32 battleType = setup->battleType; - u32 winFlag = setup->winFlag; + u32 winFlag = setup->winFlag; if (battleType & BATTLE_TYPE_LINK || battleType & BATTLE_TYPE_FRONTIER) { return; diff --git a/src/error_message_reset.c b/src/error_message_reset.c index 042d984eb7..f67f845b8e 100644 --- a/src/error_message_reset.c +++ b/src/error_message_reset.c @@ -24,53 +24,53 @@ #include "unk_02037C94.h" static const GraphicsBanks sErrorMessageBanksConfig = { - .bg = GX_VRAM_BG_256_AB, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_NONE, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_NONE, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_NONE, + .bg = GX_VRAM_BG_256_AB, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_NONE, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_NONE, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_NONE, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE, + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE, }; static const struct GraphicsModes sErrorMessageBgModeSet = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const BgTemplate sErrorMessageBgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x18000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x18000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const WindowTemplate sErrorMessageWindowTemplate = { - .bgId = GF_BG_LYR_MAIN_0, - .left = 3, - .top = 3, - .width = 26, - .height = 18, - .palette = 1, + .bgId = GF_BG_LYR_MAIN_0, + .left = 3, + .top = 3, + .width = 26, + .height = 18, + .palette = 1, .baseTile = 0x23, }; static const HEAP_PARAM sErrorMessageHeapParams = { - .size = 0x20000, + .size = 0x20000, .arena = OS_ARENA_MAIN, }; @@ -131,7 +131,7 @@ void PrintErrorMessageAndReset(void) { BG_SetMaskColor(GF_BG_LYR_SUB_0, RGB(1, 1, 27)); MsgData *error_msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0041_bin, HEAP_ID_DEFAULT); - String *error_str = String_New(384, HEAP_ID_DEFAULT); + String *error_str = String_New(384, HEAP_ID_DEFAULT); ResetAllTextPrinters(); diff --git a/src/field/headbutt.c b/src/field/headbutt.c index d1b48d7135..f9473b01b6 100644 --- a/src/field/headbutt.c +++ b/src/field/headbutt.c @@ -104,22 +104,22 @@ typedef struct TaskData_TryHeadbuttEncounter { void FieldSystem_TryHeadbuttEncounter(FieldSystem *fieldSystem, u16 *varPointer) { TaskData_TryHeadbuttEncounter *didHeadbuttStartBattle = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(didHeadbuttStartBattle)); - didHeadbuttStartBattle->resultPtr = varPointer; - *varPointer = FALSE; + didHeadbuttStartBattle->resultPtr = varPointer; + *varPointer = FALSE; TaskManager_Call(fieldSystem->taskman, Task_TryHeadbuttEncounter, didHeadbuttStartBattle); } static BOOL Task_TryHeadbuttEncounter(TaskManager *taskManager) { HeadbuttEncounterData *headbuttTable; - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); TaskData_TryHeadbuttEncounter *didHeadbuttStartBattle = TaskManager_GetEnvironment(taskManager); - headbuttTable = AllocAtEndAndReadWholeNarcMemberByIdPair(NARC_arc_headbutt, fieldSystem->location->mapId, HEAP_ID_FIELD); + headbuttTable = AllocAtEndAndReadWholeNarcMemberByIdPair(NARC_arc_headbutt, fieldSystem->location->mapId, HEAP_ID_FIELD); if (headbuttTable->numRegularTrees != 0 || headbuttTable->numSecretTrees != 0) { BattleSetup *setup; u32 x; u32 y; GetCoordsOfFacingTree(fieldSystem, &x, &y); - u32 trainerId = PlayerProfile_GetTrainerID(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); + u32 trainerId = PlayerProfile_GetTrainerID(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); enum TreeType treeType = (enum TreeType)Headbutt_GetTreeTypeFromTable(headbuttTable->numRegularTrees, headbuttTable->numSecretTrees, trainerId, x, y, headbuttTable->treeCoords); if (treeType == TREETYPE_NONE) { FreeToHeap(headbuttTable); @@ -157,7 +157,7 @@ static s8 Headbutt_GetTreeTypeFromTable(u16 numRegularTrees, u16 numSecretTrees, // Not all trees are headbuttable, this is determined by trainer ID u16 i; u16 numCoordsRegular = numRegularTrees * 6; - u16 numCoordsSecret = numSecretTrees * 6; + u16 numCoordsSecret = numSecretTrees * 6; for (i = 0; i < numCoordsRegular; i++) { if (x == treeCoords[i][0] && y == treeCoords[i][1]) { return Headbutt_GetTreeType_Regular(i / 6, numRegularTrees, trainerId); @@ -173,11 +173,11 @@ static s8 Headbutt_GetTreeTypeFromTable(u16 numRegularTrees, u16 numSecretTrees, } static s8 Headbutt_GetTreeType_Regular(u8 whichTree, u8 numTrees, u32 trainerId) { - s8 ret = TREETYPE_NONE; + s8 ret = TREETYPE_NONE; u8 trainerIdLastDigit = trainerId % 10; if (numTrees >= 5) { u8 column = whichTree % 5; - ret = sRareTreeLUT_5Plus[trainerIdLastDigit][column]; + ret = sRareTreeLUT_5Plus[trainerIdLastDigit][column]; } else if (numTrees == 4) { ret = sRareTreeLUT_4[trainerIdLastDigit][whichTree]; } else if (numTrees == 3) { @@ -198,10 +198,10 @@ static void GetCoordsOfFacingTree(FieldSystem *fieldSystem, u32 *x, u32 *y) { PlayerAvatar_GetCoordsInFront(fieldSystem->playerAvatar, &inFrontX, &inFrontY); if (FollowMon_IsActive(fieldSystem)) { LocalMapObject *object = FollowMon_GetMapObject(fieldSystem); - u32 followingMonX = MapObject_GetCurrentX(object); - u32 followingMonZ = MapObject_GetCurrentZ(object); + u32 followingMonX = MapObject_GetCurrentX(object); + u32 followingMonZ = MapObject_GetCurrentZ(object); if (inFrontX == followingMonX && inFrontY == followingMonZ) { - u8 dir = MapObject_GetFacingDirection(object); + u8 dir = MapObject_GetFacingDirection(object); inFrontX = GetDeltaXByFacingDirection(dir) + followingMonX; inFrontY = GetDeltaYByFacingDirection(dir) + followingMonZ; } @@ -216,10 +216,10 @@ static void GetCoordsOfFacingTree(FieldSystem *fieldSystem, u32 *x, u32 *y) { BOOL ScrCmd_795(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 x = ScriptGetVar(ctx); - u8 y = ScriptGetVar(ctx); - Window **moneyBox = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MONEY_BOX); - *moneyBox = ov01_021EED60(ctx->fieldSystem, x, y); + u8 x = ScriptGetVar(ctx); + u8 y = ScriptGetVar(ctx); + Window **moneyBox = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MONEY_BOX); + *moneyBox = ov01_021EED60(ctx->fieldSystem, x, y); return FALSE; } diff --git a/src/field/legend_cutscene_camera.c b/src/field/legend_cutscene_camera.c index 6364ae6ce6..5ff417e833 100644 --- a/src/field/legend_cutscene_camera.c +++ b/src/field/legend_cutscene_camera.c @@ -156,70 +156,70 @@ static BOOL Task_LugiaArrivesEffectCameraPan(TaskManager *taskman); static const Field3dObjectTaskTemplate sField3dObjectTaskTemplate_ClearBellCutscene = { .taskPriority = 3, - .dataSize = sizeof(ClearBellCutscene3dObjectTaskData), - .initFunc = Field3dObjectTaskInit_ClearBellCutscene, - .destroyFunc = Field3dObjectTaskDestroy_ClearBellCutscene, - .updateFunc = Field3dObjectTaskUpdate_ClearBellCutscene, - .renderFunc = Field3dObjectTaskRender_ClearBellCutscene, + .dataSize = sizeof(ClearBellCutscene3dObjectTaskData), + .initFunc = Field3dObjectTaskInit_ClearBellCutscene, + .destroyFunc = Field3dObjectTaskDestroy_ClearBellCutscene, + .updateFunc = Field3dObjectTaskUpdate_ClearBellCutscene, + .renderFunc = Field3dObjectTaskRender_ClearBellCutscene, }; static const CameraParam sCameraParam_HeartGold[] = { { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xF562 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xF562 }, .perspectiveType = 0, - .perspective = 0x5C1, + .perspective = 0x5C1, }, { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xF562 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xF562 }, .perspectiveType = 0, - .perspective = 0x5C1, + .perspective = 0x5C1, }, { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xF762 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xF762 }, .perspectiveType = 0, - .perspective = 0xCC1, + .perspective = 0xCC1, }, { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xFBA2 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xFBA2 }, .perspectiveType = 0, - .perspective = 0xCC1, + .perspective = 0xCC1, }, }; static const CameraParam sCameraParam_SoulSilver[] = { { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xDFE2 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xDFE2 }, .perspectiveType = 0, - .perspective = 0x5C1, + .perspective = 0x5C1, }, { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xDFE2 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xDFE2 }, .perspectiveType = 0, - .perspective = 0x5C1, + .perspective = 0x5C1, }, { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xDEF2 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xDEF2 }, .perspectiveType = 0, - .perspective = 0x5C1, + .perspective = 0x5C1, }, { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xDEF2 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xDEF2 }, .perspectiveType = 0, - .perspective = 0x5C1, + .perspective = 0x5C1, }, { - .distance = FX32_CONST(666.922119148625), - .angle = { .x = 0xDEF2 }, + .distance = FX32_CONST(666.922119148625), + .angle = { .x = 0xDEF2 }, .perspectiveType = 0, - .perspective = 0x5C1, + .perspective = 0x5C1, }, }; @@ -260,12 +260,12 @@ void LegendCutscene_BeginClearBellAnim(FieldSystem *fieldSystem) { ClearBellCutsceneCamera *cam; fieldSystem->unk4->legendCutsceneCamera = AllocFromHeapAtEnd(HEAP_ID_4, sizeof(ClearBellCutsceneCamera)); - cam = fieldSystem->unk4->legendCutsceneCamera; + cam = fieldSystem->unk4->legendCutsceneCamera; - cam->translation = CreateCameraTranslationWrapper(HEAP_ID_4, fieldSystem->camera); - cam->gameVersion = gGameVersion; - cam->lookAtTarget = Camera_GetLookAtCamTarget(fieldSystem->camera); - cam->lookAtPos = Camera_GetLookAtCamPos(fieldSystem->camera); + cam->translation = CreateCameraTranslationWrapper(HEAP_ID_4, fieldSystem->camera); + cam->gameVersion = gGameVersion; + cam->lookAtTarget = Camera_GetLookAtCamTarget(fieldSystem->camera); + cam->lookAtPos = Camera_GetLookAtCamPos(fieldSystem->camera); cam->field3dObjectTaskManager = fieldSystem->unk4->field3dObjectTaskManager; ClearBellCutscene_CreateField3dObjectTask(cam); } @@ -278,13 +278,13 @@ void LegendCutscene_EndClearBellAnim(FieldSystem *fieldSystem) { } void LegendCutscene_ClearBellRiseFromBag(FieldSystem *fieldSystem) { - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *draw3dTaskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); - draw3dTaskData->state = CLEAR_BELL_ANIM_STATE_RISE_BEGIN; + draw3dTaskData->state = CLEAR_BELL_ANIM_STATE_RISE_BEGIN; } void LegendCutscene_ClearBellShimmer(FieldSystem *fieldSystem, u8 shimmerClearBellOnly) { - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *draw3dTaskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); if (draw3dTaskData->state != CLEAR_BELL_ANIM_STATE_IDLE_LOOP) { GF_ASSERT(FALSE); @@ -301,14 +301,14 @@ void ov02_02250B30(FieldSystem *fieldSystem) { } static void startBellShimmer(FieldSystem *fieldSystem) { - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); - taskData->state = CLEAR_BELL_ANIM_STATE_SHIMMER_BEGIN; + taskData->state = CLEAR_BELL_ANIM_STATE_SHIMMER_BEGIN; } static BOOL Task_WaitShimmerEffectAndRestart(TaskManager *taskman) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); if (taskData->state == CLEAR_BELL_ANIM_STATE_IDLE_LOOP) { startBellShimmer(fieldSystem); @@ -320,7 +320,7 @@ static BOOL Task_WaitShimmerEffectAndRestart(TaskManager *taskman) { void LegendCutscene_LugiaEyeGlimmerEffect(FieldSystem *fieldSystem) { LegendCutsceneLugiaEyeGlimmerTaskData *eyeGlimmer = AllocFromHeapAtEnd(HEAP_ID_4, sizeof(LegendCutsceneLugiaEyeGlimmerTaskData)); - eyeGlimmer->eyeGlimmerDelayTimer = 0; + eyeGlimmer->eyeGlimmerDelayTimer = 0; loadEyeGlimmer3dModel(HEAP_ID_4, fieldSystem, eyeGlimmer); TaskManager_Call(fieldSystem->taskman, Task_LugiaEyeGlimmer, eyeGlimmer); } @@ -331,8 +331,8 @@ static void ClearBellCutscene_CreateField3dObjectTask(ClearBellCutsceneCamera *c static void Field3dObjectTaskInit_ClearBellCutscene(Field3dObjectTask *task, FieldSystem *fieldSystem, void *taskData) { ClearBellCutscene3dObjectTaskData *kimonoDanceObjData = (ClearBellCutscene3dObjectTaskData *)taskData; - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; - kimonoDanceObjData->gameVersion = cam->gameVersion; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + kimonoDanceObjData->gameVersion = cam->gameVersion; GF_ExpHeap_FndInitAllocator(&kimonoDanceObjData->allocator, HEAP_ID_4, 0x20); Field3dModel_LoadFromFilesystem(&kimonoDanceObjData->clearBellRisingModel, NARC_demo_legend, NARC_legend_legend_00000018_NSBMD, HEAP_ID_4); Field3dModel_LoadFromFilesystem(&kimonoDanceObjData->clearBellShimmerModel, NARC_demo_legend, NARC_legend_legend_00000025_NSBMD, HEAP_ID_4); @@ -371,7 +371,7 @@ static void Field3dObjectTaskInit_ClearBellCutscene(Field3dObjectTask *task, Fie Field3dObject_SetPosEx(&kimonoDanceObjData->cornerBellObjects[2], 0, 0, 0); Field3dObject_SetPosEx(&kimonoDanceObjData->cornerBellObjects[3], 0, 0, 0); kimonoDanceObjData->birdModelNum = 0x131; - kimonoDanceObjData->cameraParam = sCameraParam_SoulSilver; + kimonoDanceObjData->cameraParam = sCameraParam_SoulSilver; kimonoDanceObjData->cameraOffset = sCameraOffset_SoulSilver; } else { Field3dObject_SetPosEx(&kimonoDanceObjData->cornerBellObjects[0], pos.x + FX32_CONST(200), pos.y - FX32_CONST(73), pos.z + FX32_CONST(144)); @@ -379,7 +379,7 @@ static void Field3dObjectTaskInit_ClearBellCutscene(Field3dObjectTask *task, Fie Field3dObject_SetPosEx(&kimonoDanceObjData->cornerBellObjects[2], pos.x + FX32_CONST(200), pos.y - FX32_CONST(73), pos.z - FX32_CONST(270)); Field3dObject_SetPosEx(&kimonoDanceObjData->cornerBellObjects[3], pos.x - FX32_CONST(198), pos.y - FX32_CONST(73), pos.z - FX32_CONST(270)); kimonoDanceObjData->birdModelNum = 0x130; - kimonoDanceObjData->cameraParam = sCameraParam_HeartGold; + kimonoDanceObjData->cameraParam = sCameraParam_HeartGold; kimonoDanceObjData->cameraOffset = sCameraOffset_HeartGold; } kimonoDanceObjData->state = CLEAR_BELL_ANIM_STATE_NUL; @@ -523,7 +523,7 @@ static void unloadEyeGlimmer3dModel(LegendCutsceneLugiaEyeGlimmerTaskData *taskD static BOOL Task_LugiaEyeGlimmer(TaskManager *taskman) { LegendCutsceneLugiaEyeGlimmerTaskData *unk = (LegendCutsceneLugiaEyeGlimmerTaskData *)TaskManager_GetEnvironment(taskman); - u32 *pState = TaskManager_GetStatePtr(taskman); + u32 *pState = TaskManager_GetStatePtr(taskman); switch (*pState) { case LUGIA_EYE_GLIMMER_TASK_STATE_RUN: @@ -549,10 +549,10 @@ static BOOL Task_LugiaEyeGlimmer(TaskManager *taskman) { // Part of an unreferenced code path static BOOL ov02_02251320(TaskManager *taskman) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - u32 *pState = TaskManager_GetStatePtr(taskman); + u32 *pState = TaskManager_GetStatePtr(taskman); UnkStruct_FieldSysC0_SubC *renderObj; u8 i; - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *taskData = Field3dObjectTask_GetData(cam->draw3dTask); switch (*pState) { @@ -588,7 +588,7 @@ static BOOL ov02_02251320(TaskManager *taskman) { } void LegendCutscene_MoveCamera(FieldSystem *fieldSystem, u8 scene) { - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); GF_ASSERT(scene < 3); @@ -608,16 +608,16 @@ void LegendCutscene_MoveCamera(FieldSystem *fieldSystem, u8 scene) { void LegendCutscene_StartPanCameraTo(FieldSystem *fieldSystem, u8 destination) { int duration; - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); CameraTranslationPathTemplate template; int point = destination == 0 ? 0 : 3; - template.angleX = taskData->cameraParam[point].angle.x; + template.angleX = taskData->cameraParam[point].angle.x; template.perspectiveAngle = taskData->cameraParam[point].perspective; - template.position = taskData->cameraOffset[point]; - template.distance = taskData->cameraParam[point].distance; + template.position = taskData->cameraOffset[point]; + template.distance = taskData->cameraParam[point].distance; if (cam->gameVersion == VERSION_HEARTGOLD) { if (destination == 0) { duration = 200; @@ -639,7 +639,7 @@ void LegendCutscene_WaitCameraPan(FieldSystem *fieldSystem) { } static BOOL Task_WaitCameraPan(TaskManager *taskman) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; if (IsCameraTranslationFinished(cam->translation)) { Camera_GetLookAtCamTarget(fieldSystem->camera); @@ -653,7 +653,7 @@ static BOOL Task_WaitCameraPan(TaskManager *taskman) { void LegendCutscene_BirdFinalApproach(FieldSystem *fieldSystem) { BirdFinalApproachTaskData *taskData = AllocFromHeapAtEnd(HEAP_ID_4, sizeof(BirdFinalApproachTaskData)); - taskData->gameVersion = gGameVersion; + taskData->gameVersion = gGameVersion; TaskManager_Call(fieldSystem->taskman, Task_BirdFinalApproach, taskData); } @@ -663,20 +663,20 @@ static BOOL Task_BirdFinalApproach(TaskManager *taskman) { int flapSfx; int mapObjectId; LocalMapObject *mapObject; - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); BirdFinalApproachTaskData *taskData = (BirdFinalApproachTaskData *)TaskManager_GetEnvironment(taskman); - u32 *pState = TaskManager_GetStatePtr(taskman); + u32 *pState = TaskManager_GetStatePtr(taskman); if (taskData->gameVersion == VERSION_SOULSILVER) { - species = SPECIES_LUGIA; - mapObjectId = obj_D40R0107_lug_obj01; + species = SPECIES_LUGIA; + mapObjectId = obj_D40R0107_lug_obj01; firstFlapDelay = 18; - flapSfx = SEQ_SE_GS_RUGIA_HABATAKI; + flapSfx = SEQ_SE_GS_RUGIA_HABATAKI; } else { - species = SPECIES_HO_OH; - mapObjectId = obj_D17R0110_hou_obj01; + species = SPECIES_HO_OH; + mapObjectId = obj_D17R0110_hou_obj01; firstFlapDelay = 0; - flapSfx = SEQ_SE_GS_HOUOU_HABATAKI; + flapSfx = SEQ_SE_GS_HOUOU_HABATAKI; } mapObject = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, mapObjectId); @@ -721,7 +721,7 @@ static BOOL Task_BirdFinalApproach(TaskManager *taskman) { MapObject_SetPositionVector(mapObject, &pos); } MapObject_SetVisible(mapObject, FALSE); - taskData->delayTimer = 0; + taskData->delayTimer = 0; taskData->betweenFlapsDelayTimer = 0; ++(*pState); break; @@ -741,7 +741,7 @@ static BOOL Task_BirdFinalApproach(TaskManager *taskman) { taskData->yDelta -= FX32_ONE; if (taskData->yDelta <= 0) { taskData->yDelta = 0; - snapped = TRUE; + snapped = TRUE; } pos.y = taskData->yEnd + taskData->yDelta; MapObject_SetPositionVector(mapObject, &pos); @@ -764,7 +764,7 @@ static BOOL Task_BirdFinalApproach(TaskManager *taskman) { if (taskData->delayTimer >= 50) { Field3dObject_SetActiveFlag(&taskData->object, TRUE); PlayCry(species, 0); - taskData->animTimer = 0; + taskData->animTimer = 0; taskData->delayTimer = 0; ++(*pState); } @@ -808,8 +808,8 @@ void LegendCutscene_BeginWavesOrLeavesEffect(FieldSystem *fieldSystem) { } static void beginWavesEffect(FieldSystem *fieldSystem) { - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; - ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); ClearBellCutscene3dObjectTaskData_SoulSilver *wavesEffectData = &taskData->wavesEffect; Field3dModel_LoadFromFilesystem(&wavesEffectData->model, NARC_demo_legend, NARC_legend_legend_00000038_NSBMD, HEAP_ID_4); @@ -828,8 +828,8 @@ static void beginWavesEffect(FieldSystem *fieldSystem) { } static void beginLeavesEffect(FieldSystem *fieldSystem) { - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; - ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); ClearBellCutscene3dObjectTaskData_HeartGold *leavesEffectData = &taskData->leavesEffect; leavesEffectData->bgConfig = fieldSystem->bgConfig; @@ -852,14 +852,14 @@ static void beginLeavesEffect(FieldSystem *fieldSystem) { GfGfx_EngineATogglePlanes(GX_PLANEMASK_BG2, GF_PLANE_TOGGLE_ON); GfGfx_EngineATogglePlanes(GX_PLANEMASK_BG3, GF_PLANE_TOGGLE_ON); leavesEffectData->switchTilemapDelayTimer = 0; - leavesEffectData->tilemapIndex = 0; + leavesEffectData->tilemapIndex = 0; G2_SetBG2Priority(0); G2_SetBG3Priority(1); G2_SetBG0Priority(2); } void LegendCutscene_EndWavesOrLeavesEffect(FieldSystem *fieldSystem) { - ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + ClearBellCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; ClearBellCutscene3dObjectTaskData *taskData = (ClearBellCutscene3dObjectTaskData *)Field3dObjectTask_GetData(cam->draw3dTask); SysTask_Destroy(taskData->task); taskData->task = NULL; @@ -888,14 +888,14 @@ static void endLeavesEffect(ClearBellCutscene3dObjectTaskData *taskData) { } static void Task_WavesEffect(SysTask *task, void *taskData) { - ClearBellCutscene3dObjectTaskData *cutsceneData = (ClearBellCutscene3dObjectTaskData *)taskData; + ClearBellCutscene3dObjectTaskData *cutsceneData = (ClearBellCutscene3dObjectTaskData *)taskData; ClearBellCutscene3dObjectTaskData_SoulSilver *wavesEffectData = &cutsceneData->wavesEffect; modelAnimListAdvanceLooping(wavesEffectData->anims, 2); Field3dObject_Draw(&wavesEffectData->object); } static void Task_LeavesEffect(SysTask *task, void *taskData) { - ClearBellCutscene3dObjectTaskData *cutsceneData = (ClearBellCutscene3dObjectTaskData *)taskData; + ClearBellCutscene3dObjectTaskData *cutsceneData = (ClearBellCutscene3dObjectTaskData *)taskData; ClearBellCutscene3dObjectTaskData_HeartGold *leavesEffectData = &cutsceneData->leavesEffect; ++leavesEffectData->switchTilemapDelayTimer; @@ -925,20 +925,20 @@ void LegendCutscene_BeginLugiaArrivesEffect(FieldSystem *fieldSystem) { LugiaArrivesCutsceneCamera *cam; fieldSystem->unk4->legendCutsceneCamera = AllocFromHeapAtEnd(HEAP_ID_4, sizeof(LugiaArrivesCutsceneCamera)); - cam = fieldSystem->unk4->legendCutsceneCamera; + cam = fieldSystem->unk4->legendCutsceneCamera; cam->gameVersion = gGameVersion; if (cam->gameVersion == VERSION_HEARTGOLD) { GF_ASSERT(FALSE); return; } - cam->distance = Camera_GetDistance(fieldSystem->camera); - cam->angle = Camera_GetAngle(fieldSystem->camera); + cam->distance = Camera_GetDistance(fieldSystem->camera); + cam->angle = Camera_GetAngle(fieldSystem->camera); VecFx32 lookAtTarget = Camera_GetLookAtCamTarget(fieldSystem->camera); VEC_Subtract(&lookAtTarget, Camera_GetCurrentTarget(fieldSystem->camera), &cam->targetDistanceVec); - cam->perspectiveAngle = Camera_GetPerspectiveAngle(fieldSystem->camera); + cam->perspectiveAngle = Camera_GetPerspectiveAngle(fieldSystem->camera); cam->clippingPlaneNear = Camera_GetPerspectiveClippingPlaneNear(fieldSystem->camera); - cam->clippingPlaneFar = Camera_GetPerspectiveClippingPlaneFar(fieldSystem->camera); + cam->clippingPlaneFar = Camera_GetPerspectiveClippingPlaneFar(fieldSystem->camera); Camera_SetDistance(sCameraParam_SoulSilver[4].distance, fieldSystem->camera); Camera_SetAnglePos(&sCameraParam_SoulSilver[4].angle, fieldSystem->camera); @@ -962,18 +962,18 @@ void LegendCutscene_LugiaArrivesEffectCameraPan(FieldSystem *fieldSystem) { return; } - cam->translation = CreateCameraTranslationWrapper(HEAP_ID_4, fieldSystem->camera); - template.angleX = cam->angle.x; + cam->translation = CreateCameraTranslationWrapper(HEAP_ID_4, fieldSystem->camera); + template.angleX = cam->angle.x; template.perspectiveAngle = cam->perspectiveAngle; - template.position = cam->targetDistanceVec; - template.distance = cam->distance; + template.position = cam->targetDistanceVec; + template.distance = cam->distance; SetCameraTranslationPath(cam->translation, &template, 30); TaskManager_Call(fieldSystem->taskman, Task_LugiaArrivesEffectCameraPan, fieldSystem); } static BOOL Task_LugiaArrivesEffectCameraPan(TaskManager *taskman) { - FieldSystem *fieldSystem = (FieldSystem *)TaskManager_GetEnvironment(taskman); - LugiaArrivesCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; + FieldSystem *fieldSystem = (FieldSystem *)TaskManager_GetEnvironment(taskman); + LugiaArrivesCutsceneCamera *cam = fieldSystem->unk4->legendCutsceneCamera; GFCameraTranslationWrapper *trans = cam->translation; if (IsCameraTranslationFinished(trans)) { diff --git a/src/field/overlay_01_021E66E4.c b/src/field/overlay_01_021E66E4.c index dbc532f445..72762612e8 100644 --- a/src/field/overlay_01_021E66E4.c +++ b/src/field/overlay_01_021E66E4.c @@ -9,10 +9,10 @@ static void Task_Field3dObject_Render(SysTask *task, void *taskData); Field3dObjectTaskManager *Field3dObjectTaskManager_Create(struct FieldSystem *fieldSystem, HeapID heapId, int num) { Field3dObjectTaskManager *ret = AllocFromHeap(heapId, sizeof(Field3dObjectTaskManager)); - ret->fieldSystem = fieldSystem; - ret->heapId = heapId; - ret->max = num; - ret->tasks = AllocFromHeap(heapId, num * sizeof(Field3dObjectTask)); + ret->fieldSystem = fieldSystem; + ret->heapId = heapId; + ret->max = num; + ret->tasks = AllocFromHeap(heapId, num * sizeof(Field3dObjectTask)); MI_CpuClear32(ret->tasks, num * sizeof(Field3dObjectTask)); ret->taskQueue = (SysTaskQueue *)AllocFromHeap(heapId, SysTaskQueue_GetArenaSize(num)); ret->taskQueue = SysTaskQueue_PlacementNew(num, ret->taskQueue); @@ -55,10 +55,10 @@ Field3dObjectTask *Field3dObjectTaskManager_CreateTask(Field3dObjectTaskManager Field3dObjectTask *ret; for (ret = manager->tasks, i = 0; i < manager->max; ++ret, ++i) { if (ret->mainTask == NULL) { - ret->mainTask = SysTask_CreateOnMainQueue(Task_Field3dObject_Update, ret, template->taskPriority); + ret->mainTask = SysTask_CreateOnMainQueue(Task_Field3dObject_Update, ret, template->taskPriority); ret->g3dRenderTask = SysTaskQueue_InsertTask(manager->taskQueue, Task_Field3dObject_Render, ret, template->taskPriority); - ret->manager = manager; - ret->param = template; + ret->manager = manager; + ret->param = template; GF_ASSERT(ret->mainTask != NULL); GF_ASSERT(ret->g3dRenderTask != NULL); if (template->dataSize != 0) { diff --git a/src/field/overlay_01_021FFECC.c b/src/field/overlay_01_021FFECC.c index 5ff32bf4c3..6294a2bc27 100644 --- a/src/field/overlay_01_021FFECC.c +++ b/src/field/overlay_01_021FFECC.c @@ -15,14 +15,14 @@ static BOOL ov01_021FFFFC(void *a0, UnkOv01_021FFFCD *a1); static void ov01_0220001C(void *a0, UnkOv01_021FFFCD *a1); static void ov01_02200020(void *a0, UnkOv01_021FFFCD *a1); -static const int ov01_02209270[4] = { 0x64, 0x65, 0x66, 0x67 }; +static const int ov01_02209270[4] = { 0x64, 0x65, 0x66, 0x67 }; static const UnkOv01_02209280 ov01_02209280 = { 0x24, ov01_021FFFCC, ov01_021FFFFC, ov01_0220001C, ov01_02200020 }; UnkOv01_021FFECC *ov01_021FFECC(void *a0) { UnkOv01_021FFECC *ptr = ov01_021F1430(a0, sizeof(UnkOv01_021FFECC), 0, 0); - ptr->unk0 = a0; + ptr->unk0 = a0; ov01_021FFEF8(ptr); return ptr; } @@ -54,7 +54,7 @@ void ov01_021FFF5C(LocalMapObject *mapObject, int a1) { UnkOv01_021FFF5C temp2; FieldSystem *fieldSystem = ov01_021F146C(mapObject); - TaskManager *taskman = ov01_021F1468(fieldSystem); + TaskManager *taskman = ov01_021F1468(fieldSystem); int x = MapObject_GetCurrentX(mapObject); int z = MapObject_GetCurrentZ(mapObject); @@ -66,21 +66,21 @@ void ov01_021FFF5C(LocalMapObject *mapObject, int a1) { temp2.unk4 = fieldSystem; UnkOv01_021FFECC *val1 = ov01_021F1450(fieldSystem, 0xe); - temp2.unk8 = val1; - temp2.unkC = mapObject; - temp2.unk10 = ov01_021FFF50(val1, a1); + temp2.unk8 = val1; + temp2.unkC = mapObject; + temp2.unk10 = ov01_021FFF50(val1, a1); int val3 = MapObject_GetPriorityPlusValue(mapObject, 2); ov01_021F1620(fieldSystem, &ov01_02209280, &temp, 0, &temp2, val3); } static BOOL ov01_021FFFCC(void *a0, UnkOv01_021FFFCD *a1) { - UnkOv01_021FFFCC *ptr = sub_02068D98(a0); + UnkOv01_021FFFCC *ptr = sub_02068D98(a0); LocalMapObject *mapObject = ptr->unk0.unkC; - a1->unk10 = ptr->unk0; + a1->unk10 = ptr->unk0; a1->localMapObjectId = MapObject_GetID(mapObject); - a1->mapId = MapObject_GetMapID(mapObject); + a1->mapId = MapObject_GetMapID(mapObject); return TRUE; } diff --git a/src/field/overlay_01_apricorn_tree_anim.c b/src/field/overlay_01_apricorn_tree_anim.c index 80b48558ba..73a662a533 100644 --- a/src/field/overlay_01_apricorn_tree_anim.c +++ b/src/field/overlay_01_apricorn_tree_anim.c @@ -68,7 +68,7 @@ void FieldSystem_AnimApricornTree(FieldSystem *fieldSystem, LocalMapObject *tree AnimApricornTreeWork *env = AllocFromHeap(HEAP_ID_32, sizeof(AnimApricornTreeWork)); MI_CpuFill8(env, 0, sizeof(AnimApricornTreeWork)); env->state = 0; - env->tree = tree; + env->tree = tree; env->unk24 = a2; TaskManager_Call(fieldSystem->taskman, Task_AnimApricornTree, env); @@ -81,14 +81,14 @@ static BOOL Task_AnimApricornTree(TaskManager *taskman) { VecFx32 pos; int apricornType; - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); AnimApricornTreeWork *env = TaskManager_GetEnvironment(taskman); switch (env->state) { case 0: if (!sub_02055708(fieldSystem, env->tree)) { *env->unk24 = 0; - env->state = 10; + env->state = 10; break; } AnimPlayerShakeTreeWork *ptr = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(AnimPlayerShakeTreeWork)); @@ -100,7 +100,7 @@ static BOOL Task_AnimApricornTree(TaskManager *taskman) { sub_0205F328(env->tree, 1); env->treeWiggles = 0; env->wiggleTimer = TREE_WIGGLE_FRAMES; - env->state = 2; + env->state = 2; PlaySE(SEQ_SE_GS_KI_YURERU); break; case 2: @@ -116,17 +116,17 @@ static BOOL Task_AnimApricornTree(TaskManager *taskman) { if (sub_02055708(fieldSystem, env->tree)) { sub_02055760(fieldSystem, env->tree); *env->unk24 = 1; - env->state = 3; + env->state = 3; break; } *env->unk24 = 0; - env->state = 10; + env->state = 10; break; case 3: - direction = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); + direction = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); env->jumpDx = 0; env->jumpDz = 0; - env->unk18 = 0; + env->unk18 = 0; switch (direction) { case DIR_NORTH: env->jumpDz = FX32_ONE; @@ -227,9 +227,9 @@ static BOOL DoApricornJump(AnimApricornTreeWork *env) { } static BOOL Task_AnimPlayerShakeTree(TaskManager *taskman) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - LocalMapObject *playerObj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); - u32 *state_p = TaskManager_GetStatePtr(taskman); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + LocalMapObject *playerObj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); + u32 *state_p = TaskManager_GetStatePtr(taskman); AnimPlayerShakeTreeWork *env = TaskManager_GetEnvironment(taskman); switch (*state_p) { diff --git a/src/field/overlay_01_rock_smash_item.c b/src/field/overlay_01_rock_smash_item.c index 86412f9ef5..e54114f2ae 100644 --- a/src/field/overlay_01_rock_smash_item.c +++ b/src/field/overlay_01_rock_smash_item.c @@ -95,22 +95,22 @@ static int DrawRockSmashIdx(FieldSystem *fieldSystem); void FieldSystem_RockSmashItemCheck(FieldSystem *fieldSystem, int followMonKnowsHm, u16 *itemFound, u16 *item) { RockSmashItemCheckWork *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(RockSmashItemCheckWork)); - env->followMonKnowsHM = followMonKnowsHm != 0; - env->itemFound = itemFound; - env->item = item; - *env->itemFound = FALSE; - *env->item = ITEM_NONE; + env->followMonKnowsHM = followMonKnowsHm != 0; + env->itemFound = itemFound; + env->item = item; + *env->itemFound = FALSE; + *env->item = ITEM_NONE; TaskManager_Call(fieldSystem->taskman, Task_RockSmashItemCheck, env); } static BOOL Task_RockSmashItemCheck(TaskManager *taskman) { BattleSetup *setup; - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); RockSmashItemCheckWork *env = TaskManager_GetEnvironment(taskman); if (ov02_022470A0(fieldSystem, &setup)) { *env->itemFound = FALSE; - *env->item = ITEM_NONE; + *env->item = ITEM_NONE; FreeToHeap(env); FieldSystem_StartForcedWildBattle(fieldSystem, taskman, setup); return FALSE; @@ -122,7 +122,7 @@ static BOOL Task_RockSmashItemCheck(TaskManager *taskman) { } *env->itemFound = FALSE; - *env->item = ITEM_NONE; + *env->item = ITEM_NONE; FreeToHeap(env); return TRUE; } @@ -177,9 +177,9 @@ static BOOL CheckRockSmashItemDrop(FieldSystem *fieldSystem, RockSmashItemCheckW static BOOL Task_GetRockSmashItem(TaskManager *taskman) { LocalMapObject *obj; - u32 *state_p = TaskManager_GetStatePtr(taskman); + u32 *state_p = TaskManager_GetStatePtr(taskman); RockSmashItemCheckWork *env = TaskManager_GetEnvironment(taskman); - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); switch (*state_p) { case 0: @@ -218,12 +218,12 @@ static BOOL Task_GetRockSmashItem(TaskManager *taskman) { default: GF_ASSERT(FALSE); *env->itemFound = FALSE; - *env->item = ITEM_NONE; + *env->item = ITEM_NONE; FreeToHeap(env); return TRUE; } *env->itemFound = TRUE; - *env->item = item; + *env->item = item; FreeToHeap(env); return TRUE; } diff --git a/src/field/scrcmd_message.c b/src/field/scrcmd_message.c index fc5b81c850..a1ca04b2c9 100644 --- a/src/field/scrcmd_message.c +++ b/src/field/scrcmd_message.c @@ -49,7 +49,7 @@ BOOL ScrCmd_NonNPCMsg(ScriptContext *ctx) { } BOOL ScrCmd_GetStdMsgNaix(ScriptContext *ctx) { - u16 r5 = ScriptGetVar(ctx); + u16 r5 = ScriptGetVar(ctx); u16 *fileIdPtr = ScriptGetVarPointer(ctx); if (r5 >= NELEMS(ov01_022067C8)) { *fileIdPtr = 0; @@ -60,8 +60,8 @@ BOOL ScrCmd_GetStdMsgNaix(ScriptContext *ctx) { } BOOL ScrCmd_NonNpcMsgExtern(ScriptContext *ctx) { - u16 fileId = ScriptGetVar(ctx); - u16 messageNum = ScriptGetVar(ctx); + u16 fileId = ScriptGetVar(ctx); + u16 messageNum = ScriptGetVar(ctx); MsgData *messageData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, fileId, HEAP_ID_32); ovFieldMain_ShowMessageInField(ctx, messageData, messageNum); DestroyMsgData(messageData); @@ -69,8 +69,8 @@ BOOL ScrCmd_NonNpcMsgExtern(ScriptContext *ctx) { } BOOL ScrCmd_MsgboxExtern(ScriptContext *ctx) { - u16 fileId = ScriptGetVar(ctx); - u16 messageNum = ScriptGetVar(ctx); + u16 fileId = ScriptGetVar(ctx); + u16 messageNum = ScriptGetVar(ctx); MsgData *messageData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, fileId, HEAP_ID_32); ov01_021EF4DC(ctx, messageData, messageNum, TRUE, NULL); DestroyMsgData(messageData); @@ -80,25 +80,25 @@ BOOL ScrCmd_MsgboxExtern(ScriptContext *ctx) { BOOL ScrCmd_441(ScriptContext *ctx) { u16 messageBank = ScriptReadHalfword(ctx); - u16 messageNum = ScriptReadHalfword(ctx); - u16 word1 = ScriptReadHalfword(ctx); - u16 word2 = ScriptReadHalfword(ctx); + u16 messageNum = ScriptReadHalfword(ctx); + u16 word1 = ScriptReadHalfword(ctx); + u16 word2 = ScriptReadHalfword(ctx); ov01_021EF564(ctx, messageBank, messageNum, word1, (s16)word2, 0xFF); return FALSE; } BOOL ScrCmd_442(ScriptContext *ctx) { u16 messageBank = ScriptReadHalfword(ctx); - u16 messageNum = ScriptReadHalfword(ctx); - u16 word1 = ScriptReadHalfword(ctx); - u16 word2 = ScriptReadHalfword(ctx); + u16 messageNum = ScriptReadHalfword(ctx); + u16 word1 = ScriptReadHalfword(ctx); + u16 word2 = ScriptReadHalfword(ctx); ov01_021EF564(ctx, messageBank, messageNum, word1, (s16)word2, TRUE); SetupNativeScript(ctx, ov01_021EF348); return TRUE; } BOOL ScrCmd_443(ScriptContext *ctx) { - u8 r1 = ScriptReadByte(ctx); + u8 r1 = ScriptReadByte(ctx); void *r2 = ctx->fieldSystem->unkA0; if (r2 == NULL) { return FALSE; @@ -116,12 +116,12 @@ BOOL ScrCmd_443(ScriptContext *ctx) { } BOOL ScrCmd_444(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - u8 baseMessageNum = ScriptReadByte(ctx); - u16 numEligiblePokemon = ScriptGetVar(ctx); - u16 r2 = ScriptReadHalfword(ctx); - u8 r3 = ScriptReadByte(ctx); - u8 numLegendaryPokemonSeen = 0; + FieldSystem *fieldSystem = ctx->fieldSystem; + u8 baseMessageNum = ScriptReadByte(ctx); + u16 numEligiblePokemon = ScriptGetVar(ctx); + u16 r2 = ScriptReadHalfword(ctx); + u8 r3 = ScriptReadByte(ctx); + u8 numLegendaryPokemonSeen = 0; MessageFormat *messageFormat = sub_0204B538(fieldSystem->saveData, numEligiblePokemon, r2, r3, &numLegendaryPokemonSeen); ov01_021EF5C8(ctx, messageFormat, baseMessageNum + numLegendaryPokemonSeen, TRUE); MessageFormat_Delete(messageFormat); @@ -176,10 +176,10 @@ BOOL ScrCmd_NpcMsgVar(ScriptContext *ctx) { } BOOL ScrCmd_GenderMsgbox(ScriptContext *ctx) { - void *unused = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); - u8 messageNumMale = ScriptReadByte(ctx); + void *unused = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); + u8 messageNumMale = ScriptReadByte(ctx); u8 messageNumFemale = ScriptReadByte(ctx); - u32 gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem))); + u32 gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem))); if (gender != PLAYER_GENDER_MALE) { ov01_021EF4DC(ctx, ctx->msgdata, messageNumFemale, TRUE, NULL); } else { @@ -191,7 +191,7 @@ BOOL ScrCmd_GenderMsgbox(ScriptContext *ctx) { BOOL ScrCmd_455(ScriptContext *ctx) { LocalMapObject **objPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - u8 mapObjectType = MapObject_GetType(*objPtr); + u8 mapObjectType = MapObject_GetType(*objPtr); ov01_021EF4DC(ctx, ctx->msgdata, mapObjectType, TRUE, NULL); SetupNativeScript(ctx, ov01_021EF348); return TRUE; @@ -199,8 +199,8 @@ BOOL ScrCmd_455(ScriptContext *ctx) { void ov01_021EF4C4(struct UnkStruct_Ov01_021EF4C4 *unkStruct, ScriptContext *ctx) { unkStruct->textFrameDelay = ovFieldMain_GetTextFrameDelay(ctx); - unkStruct->unk1 = 0; - unkStruct->fontId = 1; + unkStruct->unk1 = 0; + unkStruct->fontId = 1; } void ov01_021EF4DC(ScriptContext *ctx, MsgData *messageData, u16 messageNum, u8 canABSpeedUp, struct UnkStruct_Ov01_021EF4C4 *unkStruct) { @@ -213,12 +213,12 @@ void ov01_021EF4DC(ScriptContext *ctx, MsgData *messageData, u16 messageNum, u8 u8 fontId; if (unkStruct == NULL) { textFrameDelay = ovFieldMain_GetTextFrameDelay(ctx); - unk1 = 0; - fontId = 1; + unk1 = 0; + fontId = 1; } else { textFrameDelay = unkStruct->textFrameDelay; - unk1 = unkStruct->unk1; - fontId = unkStruct->fontId; + unk1 = unkStruct->unk1; + fontId = unkStruct->fontId; } ov01_021EF758(&messageBox, fontId, textFrameDelay, canABSpeedUp, unk1); } @@ -257,20 +257,20 @@ static u32 ovFieldMain_GetTextFrameDelay(ScriptContext *ctx) { } static void ovFieldMain_GetMsgBoxParameters(FieldSystem *fieldSystem, MessageBox *messageBox) { - messageBox->message = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); - messageBox->buffer = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); - messageBox->messageFormat = *(MessageFormat **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - messageBox->window = (Window *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); - messageBox->unk10 = (u8 *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); + messageBox->message = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); + messageBox->buffer = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); + messageBox->messageFormat = *(MessageFormat **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + messageBox->window = (Window *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); + messageBox->unk10 = (u8 *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); messageBox->textPrinterNumPtr = (u8 *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); } static void ovFieldMain_GetMsgBoxParametersEx(FieldSystem *fieldSystem, MessageFormat *messageFormat, MessageBox *messageBox) { - messageBox->message = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); - messageBox->buffer = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); - messageBox->messageFormat = messageFormat; - messageBox->window = (Window *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); - messageBox->unk10 = (u8 *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); + messageBox->message = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); + messageBox->buffer = *(String **)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); + messageBox->messageFormat = messageFormat; + messageBox->window = (Window *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); + messageBox->unk10 = (u8 *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); messageBox->textPrinterNumPtr = (u8 *)FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); } diff --git a/src/field/scrcmd_moneybox.c b/src/field/scrcmd_moneybox.c index d8adccce5c..3e36580782 100644 --- a/src/field/scrcmd_moneybox.c +++ b/src/field/scrcmd_moneybox.c @@ -5,25 +5,25 @@ extern Window *FieldSystem_ShowMoneyBox(FieldSystem *, u8, u8); BOOL ScrCmd_ShowMoneyBox(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 xPos = ScriptGetVar(ctx); - u16 yPos = ScriptGetVar(ctx); + u16 xPos = ScriptGetVar(ctx); + u16 yPos = ScriptGetVar(ctx); Window **moneyBox = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MONEY_BOX); - *moneyBox = FieldSystem_ShowMoneyBox(ctx->fieldSystem, xPos, yPos); + *moneyBox = FieldSystem_ShowMoneyBox(ctx->fieldSystem, xPos, yPos); return FALSE; } BOOL ScrCmd_HideMoneyBox(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - Window **moneyBox = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MONEY_BOX); + Window **moneyBox = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MONEY_BOX); MoneyBoxSys_Delete(*moneyBox); return FALSE; } BOOL ScrCmd_UpdateMoneyBox(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - Window **moneyBox = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MONEY_BOX); + Window **moneyBox = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MONEY_BOX); MoneyBoxSys_Update(ctx->fieldSystem, *moneyBox); return FALSE; } diff --git a/src/field/scrcmd_pokemon_misc.c b/src/field/scrcmd_pokemon_misc.c index 6007aa4ae1..994b725fc8 100644 --- a/src/field/scrcmd_pokemon_misc.c +++ b/src/field/scrcmd_pokemon_misc.c @@ -126,12 +126,12 @@ BOOL ScrCmd_648(ScriptContext *ctx) { MsgData *msgdata; FieldSystem *fieldSystem = ctx->fieldSystem; - msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u32 unkA = ScriptGetVar(ctx); + msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u32 unkA = ScriptGetVar(ctx); u32 fileIndex = ScriptGetVar(ctx); - u16 unkC = ScriptReadHalfword(ctx); - u16 unkD = ScriptReadHalfword(ctx); - u16 unkE = ScriptReadHalfword(ctx); + u16 unkC = ScriptReadHalfword(ctx); + u16 unkD = ScriptReadHalfword(ctx); + u16 unkE = ScriptReadHalfword(ctx); ctx->data[0] = unkC; @@ -141,7 +141,7 @@ BOOL ScrCmd_648(ScriptContext *ctx) { window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW); - cursorPos = GetVarPointer(fieldSystem, unkD); + cursorPos = GetVarPointer(fieldSystem, unkD); itemsAbove = GetVarPointer(fieldSystem, unkE); unkPtr = ov01_02200D9C(fieldSystem, 20, 1, 0, 1, input, *msgfmt, window, msgdata, cursorPos, itemsAbove); @@ -186,7 +186,7 @@ static BOOL ov01_02200C6C(ScriptContext *ctx) { static void *ov01_02200C94(HeapID heapId, s32 fileId, int *unkPtr) { u32 size; void *data = GfGfxLoader_LoadFromNarc_GetSizeOut(NARC_application_zukanlist_zukan_data_zukan_data, fileId, FALSE, heapId, FALSE, &size); - *unkPtr = size / 2; + *unkPtr = size / 2; return data; } @@ -196,28 +196,28 @@ static void ov01_02200CB4(SCR_648_STRUCT *unkPtr, MsgData *msgdata) { static void ov01_02200CBC(FieldSystem *fieldSystem, SCR_648_STRUCT *unkPtr, u8 x, u8 y, u8 a4, u8 a5, u16 *input, MessageFormat *msgfmt, Window *window, MsgData *msgdata, u16 *cursorPos, u16 *itemsAbove) { int i; - unkPtr->msgdata = msgdata; - unkPtr->unk_207 = unkPtr->unk_207 & ~0x2; - unkPtr->msgfmt = msgfmt; + unkPtr->msgdata = msgdata; + unkPtr->unk_207 = unkPtr->unk_207 & ~0x2; + unkPtr->msgfmt = msgfmt; unkPtr->fieldSystem = fieldSystem; - unkPtr->input = input; - i = 0; - *unkPtr->input = 0; - unkPtr->cursorPos = cursorPos; - unkPtr->itemsAbove = itemsAbove; - unkPtr->unk_207 = unkPtr->unk_207 & ~1 | a5 & 1; - unkPtr->unk_206 = a4; - unkPtr->x = x; - unkPtr->y = y; - unkPtr->totalItems = 0; - unkPtr->window_18 = window; - unkPtr->unk_204 = 3; - unkPtr->unk_6F4 = a4; + unkPtr->input = input; + i = 0; + *unkPtr->input = 0; + unkPtr->cursorPos = cursorPos; + unkPtr->itemsAbove = itemsAbove; + unkPtr->unk_207 = unkPtr->unk_207 & ~1 | a5 & 1; + unkPtr->unk_206 = a4; + unkPtr->x = x; + unkPtr->y = y; + unkPtr->totalItems = 0; + unkPtr->window_18 = window; + unkPtr->unk_204 = 3; + unkPtr->unk_6F4 = a4; for (i = 0; i < 0x78; i++) { - unkPtr->items[i].text = NULL; + unkPtr->items[i].text = NULL; unkPtr->items[i].value = 0; - unkPtr->unk_604[i] = 0xff; + unkPtr->unk_604[i] = 0xff; } for (i = 0; i < 0x78; i++) { @@ -252,7 +252,7 @@ static void ov01_02200E00(SCR_648_STRUCT *unkPtr) { DrawFrameAndWindow1(&unkPtr->window_8, TRUE, 0x3D9, 11); ov01_02200F54(unkPtr); unkPtr->listMenu_23C = ListMenuInit(&unkPtr->listMenuTemplate, *unkPtr->cursorPos, *unkPtr->itemsAbove, HEAP_ID_4); - unkPtr->sysTask = SysTask_CreateOnMainQueue(ov01_022010CC, unkPtr, 0); + unkPtr->sysTask = SysTask_CreateOnMainQueue(ov01_022010CC, unkPtr, 0); } static void ov01_02200EC8(SCR_648_STRUCT *unkPtr, int strNo, u16 a2, u32 a3) { @@ -271,25 +271,25 @@ static void ov01_02200EC8(SCR_648_STRUCT *unkPtr, int strNo, u16 a2, u32 a3) { } static void ov01_02200F54(SCR_648_STRUCT *unkPtr) { - unkPtr->listMenuTemplate.items = unkPtr->items; - unkPtr->listMenuTemplate.moveCursorFunc = ov01_02201088; - unkPtr->listMenuTemplate.itemPrintFunc = ov01_02201064; - unkPtr->listMenuTemplate.window = &unkPtr->window_8; - unkPtr->listMenuTemplate.totalItems = unkPtr->totalItems; - unkPtr->listMenuTemplate.maxShowed = 8; - unkPtr->listMenuTemplate.header_X = 1; - unkPtr->listMenuTemplate.item_X = 12; - unkPtr->listMenuTemplate.cursor_X = 2; - unkPtr->listMenuTemplate.upText_Y = 1; - unkPtr->listMenuTemplate.cursorPal = 1; - unkPtr->listMenuTemplate.fillValue = 15; - unkPtr->listMenuTemplate.cursorShadowPal = 2; - unkPtr->listMenuTemplate.lettersSpacing = 0; + unkPtr->listMenuTemplate.items = unkPtr->items; + unkPtr->listMenuTemplate.moveCursorFunc = ov01_02201088; + unkPtr->listMenuTemplate.itemPrintFunc = ov01_02201064; + unkPtr->listMenuTemplate.window = &unkPtr->window_8; + unkPtr->listMenuTemplate.totalItems = unkPtr->totalItems; + unkPtr->listMenuTemplate.maxShowed = 8; + unkPtr->listMenuTemplate.header_X = 1; + unkPtr->listMenuTemplate.item_X = 12; + unkPtr->listMenuTemplate.cursor_X = 2; + unkPtr->listMenuTemplate.upText_Y = 1; + unkPtr->listMenuTemplate.cursorPal = 1; + unkPtr->listMenuTemplate.fillValue = 15; + unkPtr->listMenuTemplate.cursorShadowPal = 2; + unkPtr->listMenuTemplate.lettersSpacing = 0; unkPtr->listMenuTemplate.itemVerticalPadding = 0; - unkPtr->listMenuTemplate.scrollMultiple = 1; - unkPtr->listMenuTemplate.fontId = 0; - unkPtr->listMenuTemplate.cursorKind = 0; - unkPtr->listMenuTemplate.unk_1C = (u32)unkPtr; + unkPtr->listMenuTemplate.scrollMultiple = 1; + unkPtr->listMenuTemplate.fontId = 0; + unkPtr->listMenuTemplate.cursorKind = 0; + unkPtr->listMenuTemplate.unk_1C = (u32)unkPtr; } static void ov01_02201064(struct ListMenu *listMenu, s32 a1, u8 unused) { @@ -305,7 +305,7 @@ static void ov01_02201088(struct ListMenu *listMenu, s32 unused1, u8 unused2) { SCR_648_STRUCT *unkPtr = (SCR_648_STRUCT *)ListMenuGetTemplateField(listMenu, LISTMENUATTR_UNK_1C); ListMenuGetScrollAndRow(listMenu, &cursorPos, &itemsAbove); if (unkPtr->cursorPos != 0 && unkPtr->itemsAbove != 0) { - *unkPtr->cursorPos = cursorPos; + *unkPtr->cursorPos = cursorPos; *unkPtr->itemsAbove = itemsAbove; } } @@ -320,7 +320,7 @@ static void ov01_022010CC(SysTask *sysTask, void *work) { } if (IsPaletteFadeFinished()) { input = ListMenu_ProcessInput(unkPtr->listMenu_23C); - prev = unkPtr->unk_6F4; + prev = unkPtr->unk_6F4; ListMenuGetCurrentItemArrayId(unkPtr->listMenu_23C, &unkPtr->unk_6F4); if (prev != unkPtr->unk_6F4) { PlaySE(SEQ_SE_DP_SELECT); @@ -378,20 +378,20 @@ BOOL ScrCmd_StatJudge(ScriptContext *ctx) { u8 offset; u8 highestIvValue; FieldSystem *fieldSystem = ctx->fieldSystem; - u32 monIndex = ScriptGetVar(ctx); - u16 *ivTotal = ScriptGetVarPointer(ctx); - u16 *highestIvIndex = ScriptGetVarPointer(ctx); - u16 *highestIv = ScriptGetVarPointer(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), monIndex); - ivList[0] = GetMonData(mon, MON_DATA_HP_IV, 0); - ivList[1] = GetMonData(mon, MON_DATA_ATK_IV, 0); - ivList[2] = GetMonData(mon, MON_DATA_DEF_IV, 0); - ivList[3] = GetMonData(mon, MON_DATA_SPEED_IV, 0); - ivList[4] = GetMonData(mon, MON_DATA_SPATK_IV, 0); - ivList[5] = GetMonData(mon, MON_DATA_SPDEF_IV, 0); + u32 monIndex = ScriptGetVar(ctx); + u16 *ivTotal = ScriptGetVarPointer(ctx); + u16 *highestIvIndex = ScriptGetVarPointer(ctx); + u16 *highestIv = ScriptGetVarPointer(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), monIndex); + ivList[0] = GetMonData(mon, MON_DATA_HP_IV, 0); + ivList[1] = GetMonData(mon, MON_DATA_ATK_IV, 0); + ivList[2] = GetMonData(mon, MON_DATA_DEF_IV, 0); + ivList[3] = GetMonData(mon, MON_DATA_SPEED_IV, 0); + ivList[4] = GetMonData(mon, MON_DATA_SPATK_IV, 0); + ivList[5] = GetMonData(mon, MON_DATA_SPDEF_IV, 0); highestIvValue = 0; - *ivTotal = 0; + *ivTotal = 0; for (i = 0; i < 6; ++i) { *ivTotal += ivList[i]; @@ -400,19 +400,19 @@ BOOL ScrCmd_StatJudge(ScriptContext *ctx) { } } - offset = fieldSystem->judgeStatPosition; + offset = fieldSystem->judgeStatPosition; *highestIvIndex = offset; for (i = 0; i < 6; ++i) { if (highestIvValue == ivList[offset]) { - *highestIvIndex = offset; + *highestIvIndex = offset; fieldSystem->judgeStatPosition = (offset + 1) % 6; break; } offset = (offset + 1) % 6; } - *highestIv = highestIvValue; + *highestIv = highestIvValue; *highestIvIndex = sStatJudgeBestStatMsgIdxs[*highestIvIndex]; return FALSE; @@ -423,16 +423,16 @@ BOOL ScrCmd_CommSanitizeParty(ScriptContext *ctx) { u32 species, data; u32 heldItems[6]; Pokemon *mon; - int count = 0; + int count = 0; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *success = ScriptGetVarPointer(ctx); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); - partyCount = Party_GetCount(party); + u16 *success = ScriptGetVarPointer(ctx); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); + partyCount = Party_GetCount(party); *success = FALSE; for (i = 0; i < partyCount; i++) { - mon = Party_GetMonByIndex(party, i); + mon = Party_GetMonByIndex(party, i); heldItems[i] = GetMonData(mon, MON_DATA_HELD_ITEM, 0); if (heldItems[i] == ITEM_GRISEOUS_ORB) { count++; @@ -454,7 +454,7 @@ BOOL ScrCmd_CommSanitizeParty(ScriptContext *ctx) { } for (i = 0; i < partyCount; i++) { - mon = Party_GetMonByIndex(party, i); + mon = Party_GetMonByIndex(party, i); form = GetMonData(mon, MON_DATA_FORM, 0); if (form > 0) { species = GetMonData(mon, MON_DATA_SPECIES, 0); @@ -476,9 +476,9 @@ BOOL ScrCmd_CommSanitizeParty(ScriptContext *ctx) { BOOL ScrCmd_SetMonForm(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 index = ScriptGetVar(ctx); - u16 form = ScriptGetVar(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), index); + u16 index = ScriptGetVar(ctx); + u16 form = ScriptGetVar(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), index); SetMonData(mon, MON_DATA_FORM, &form); return FALSE; } @@ -489,19 +489,19 @@ BOOL ScrCmd_CountTranformedRotomsInParty(ScriptContext *ctx) { Pokemon *mon; Party *party; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *rotomCount = ScriptGetVarPointer(ctx); - u16 *firstIndex = ScriptGetVarPointer(ctx); + u16 *rotomCount = ScriptGetVarPointer(ctx); + u16 *firstIndex = ScriptGetVarPointer(ctx); - count = 0; + count = 0; *firstIndex = 255; - party = SaveArray_Party_Get(fieldSystem->saveData); + party = SaveArray_Party_Get(fieldSystem->saveData); partyCount = Party_GetCount(party); for (i = 0; i < partyCount; i++) { - mon = Party_GetMonByIndex(party, i); + mon = Party_GetMonByIndex(party, i); species = GetMonData(mon, MON_DATA_SPECIES, 0); - form = GetMonData(mon, MON_DATA_FORM, 0); - isEgg = GetMonData(mon, MON_DATA_IS_EGG, 0); + form = GetMonData(mon, MON_DATA_FORM, 0); + isEgg = GetMonData(mon, MON_DATA_IS_EGG, 0); if (species == SPECIES_ROTOM && form && !isEgg) { if (*firstIndex == 255) { *firstIndex = i; @@ -515,10 +515,10 @@ BOOL ScrCmd_CountTranformedRotomsInParty(ScriptContext *ctx) { BOOL ScrCmd_UpdateRotomForm(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - int rotomIndex = ScriptGetVar(ctx); - int defaultSlot = ScriptGetVar(ctx); + int rotomIndex = ScriptGetVar(ctx); + int defaultSlot = ScriptGetVar(ctx); ScriptGetVar(ctx); // unsused variable - u32 form = ScriptGetVar(ctx); + u32 form = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), rotomIndex); Mon_UpdateRotomForm(mon, form, defaultSlot); Pokedex_SetMonCaughtFlag(Save_Pokedex_Get(fieldSystem->saveData), mon); @@ -528,9 +528,9 @@ BOOL ScrCmd_UpdateRotomForm(ScriptContext *ctx) { BOOL ScrCmd_GetHiddenPowerType(ScriptContext *ctx) { s32 power, type; FieldSystem *fieldSystem = ctx->fieldSystem; - int partyIndex = ScriptGetVar(ctx); - u16 *typePtr = ScriptGetVarPointer(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), partyIndex); + int partyIndex = ScriptGetVar(ctx); + u16 *typePtr = ScriptGetVarPointer(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), partyIndex); u16 species = GetMonData(mon, MON_DATA_SPECIES, 0); @@ -564,10 +564,10 @@ BOOL ScrCmd_GetHiddenPowerType(ScriptContext *ctx) { } static void GetHiddenPowerPowerType(Pokemon *mon, s32 *power, s32 *type) { - int hpIv = GetMonData(mon, MON_DATA_HP_IV, 0); - int atkIv = GetMonData(mon, MON_DATA_ATK_IV, 0); - int defIv = GetMonData(mon, MON_DATA_DEF_IV, 0); - int spdIv = GetMonData(mon, MON_DATA_SPEED_IV, 0); + int hpIv = GetMonData(mon, MON_DATA_HP_IV, 0); + int atkIv = GetMonData(mon, MON_DATA_ATK_IV, 0); + int defIv = GetMonData(mon, MON_DATA_DEF_IV, 0); + int spdIv = GetMonData(mon, MON_DATA_SPEED_IV, 0); int spatkIv = GetMonData(mon, MON_DATA_SPATK_IV, 0); int spdefIv = GetMonData(mon, MON_DATA_SPDEF_IV, 0); if (power) { @@ -586,11 +586,11 @@ static void GetHiddenPowerPowerType(Pokemon *mon, s32 *power, s32 *type) { BOOL ScrCmd_SetFavoriteMon(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), 0); - SAVE_MISC_DATA *data = Save_Misc_Get(fieldSystem->saveData); - u32 species = GetMonData(mon, MON_DATA_SPECIES, 0); - u32 form = GetMonData(mon, MON_DATA_FORM, 0); - u32 isEgg = GetMonData(mon, MON_DATA_IS_EGG, 0); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), 0); + SAVE_MISC_DATA *data = Save_Misc_Get(fieldSystem->saveData); + u32 species = GetMonData(mon, MON_DATA_SPECIES, 0); + u32 form = GetMonData(mon, MON_DATA_FORM, 0); + u32 isEgg = GetMonData(mon, MON_DATA_IS_EGG, 0); SaveMisc_SetFavoriteMon(data, species, form, isEgg); return FALSE; } @@ -598,23 +598,23 @@ BOOL ScrCmd_SetFavoriteMon(ScriptContext *ctx) { BOOL ScrCmd_GetFavoriteMon(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; int sp, form, egg; - u16 *species = ScriptGetVarPointer(ctx); - u16 *formPtr = ScriptGetVarPointer(ctx); - u16 *isEgg = ScriptGetVarPointer(ctx); + u16 *species = ScriptGetVarPointer(ctx); + u16 *formPtr = ScriptGetVarPointer(ctx); + u16 *isEgg = ScriptGetVarPointer(ctx); SAVE_MISC_DATA *data = Save_Misc_Get(fieldSystem->saveData); SaveMisc_GetFavoriteMon(data, &sp, &form, &egg); *species = sp; *formPtr = form; - *isEgg = egg; + *isEgg = egg; return FALSE; } BOOL ScrCmd_GetPartyMonForm(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u32 index = ScriptGetVar(ctx); - u16 *form = ScriptGetVarPointer(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), index); - *form = GetMonData(mon, MON_DATA_FORM, 0); + u32 index = ScriptGetVar(ctx); + u16 *form = ScriptGetVarPointer(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), index); + *form = GetMonData(mon, MON_DATA_FORM, 0); return FALSE; } @@ -630,7 +630,7 @@ BOOL ScrCmd_699(ScriptContext *ctx) { unkVar = 0; - fieldSystem = ctx->fieldSystem; + fieldSystem = ctx->fieldSystem; mapObjectManager = fieldSystem->mapObjectManager; playerObj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); @@ -665,7 +665,7 @@ BOOL ScrCmd_700(ScriptContext *ctx) { LocalMapObject *playerObj; LocalMapObject *curObj; - fieldSystem = ctx->fieldSystem; + fieldSystem = ctx->fieldSystem; mapObjectManager = fieldSystem->mapObjectManager; playerObj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); @@ -756,7 +756,7 @@ static u32 ov01_02201B2C(u32 unkA) { // Related to Pokeathlon "Ball Sign"- whatever that is BOOL ScrCmd_724(ScriptContext *ctx) { - u8 unkVar = ScriptGetVar(ctx); + u8 unkVar = ScriptGetVar(ctx); u16 *unkPtrA = ScriptGetVarPointer(ctx); Pokeathlon_UnkSubStruct_B00 *unkPtrB = sub_0203199C(Save_Pokeathlon_Get(ctx->fieldSystem->saveData)); @@ -803,7 +803,7 @@ BOOL ScrCmd_724(ScriptContext *ctx) { BOOL ScrCmd_725(ScriptContext *ctx) { s32 val; - u8 unkA = ScriptReadByte(ctx); + u8 unkA = ScriptReadByte(ctx); u32 unkB = ScriptGetVar(ctx); Pokeathlon_UnkSubStruct_B00 *unkPtr = sub_020319F0(Save_Pokeathlon_Get(ctx->fieldSystem->saveData)); @@ -835,7 +835,7 @@ BOOL ScrCmd_726(ScriptContext *ctx) { // Related to Kurt BOOL ScrCmd_735(ScriptContext *ctx) { u16 *apricornQuantity = ScriptGetVarPointer(ctx); - *apricornQuantity = ApricornBox_GetKurtQuantity(Save_ApricornBox_Get(ctx->fieldSystem->saveData)); + *apricornQuantity = ApricornBox_GetKurtQuantity(Save_ApricornBox_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -847,7 +847,7 @@ BOOL ScrCmd_ClearKurtApricorn(ScriptContext *ctx) { // Related to Kurt BOOL ScrCmd_737(ScriptContext *ctx) { u16 *unkPtr = ScriptGetVarPointer(ctx); - *unkPtr = ApricornBox_GetKurtBall(Save_ApricornBox_Get(ctx->fieldSystem->saveData)); + *unkPtr = ApricornBox_GetKurtBall(Save_ApricornBox_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -855,8 +855,8 @@ BOOL ScrCmd_737(ScriptContext *ctx) { BOOL ScrCmd_GetTotalApricornCount(ScriptContext *ctx) { s32 i; u32 cnt; - u16 *unkPtr = ScriptGetVarPointer(ctx); - cnt = 0; + u16 *unkPtr = ScriptGetVarPointer(ctx); + cnt = 0; SaveApricornBox *apricornBox = Save_ApricornBox_Get(ctx->fieldSystem->saveData); for (i = 0; i < 7; i = i + 1) { cnt += ApricornBox_CountApricorn(apricornBox, i); @@ -868,7 +868,7 @@ BOOL ScrCmd_GetTotalApricornCount(ScriptContext *ctx) { // Related to Kurt- canceling BOOL ScrCmd_739(ScriptContext *ctx) { // todo: rename structs and find out stuff ApricornBoxArgs **args = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *args = ApricornBox_LaunchApp(ctx->fieldSystem, 2); + *args = ApricornBox_LaunchApp(ctx->fieldSystem, 2); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } @@ -876,9 +876,9 @@ BOOL ScrCmd_739(ScriptContext *ctx) { // todo: rename structs and find out stuff // Related to aprijuice stand- canceling BOOL ScrCmd_740(ScriptContext *ctx) { ApricornBoxArgs **args = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u32 unkVar = ScriptGetVar(ctx); - u16 *unkPtrB = ScriptGetVarPointer(ctx); - *args = sub_0203ED80(ctx->fieldSystem, unkVar, unkPtrB); + u32 unkVar = ScriptGetVar(ctx); + u16 *unkPtrB = ScriptGetVarPointer(ctx); + *args = sub_0203ED80(ctx->fieldSystem, unkVar, unkPtrB); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } @@ -896,11 +896,11 @@ BOOL ScrCmd_741(ScriptContext *ctx) { String *str; apricornBox = Save_ApricornBox_Get(ctx->fieldSystem->saveData); - msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - unkVar = ScriptGetVar(ctx); - unkPtrA = ScriptGetVarPointer(ctx); - price = ScriptGetVarPointer(ctx); - unkPtrC = ScriptGetVarPointer(ctx); + msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + unkVar = ScriptGetVar(ctx); + unkPtrA = ScriptGetVarPointer(ctx); + price = ScriptGetVarPointer(ctx); + unkPtrC = ScriptGetVarPointer(ctx); GF_RTC_CopyDate(&date); *unkPtrA = unkVar + 5; if (!sub_02031CEC(apricornBox, *unkPtrA, &unkOut)) { @@ -973,7 +973,7 @@ static LocalMapObject *ov01_02201F98(MapObjectManager *mapObjectManager, u8 unkA u32 size; spriteId = FollowMon_GetSpriteID(species, form, gender) << 1; - size = FollowMon_GetSizeParamBySpecies(species) * 3 + unkA; + size = FollowMon_GetSizeParamBySpecies(species) * 3 + unkA; mapObj = MapObject_CreateWithParams(mapObjectManager, x, y, DIR_SOUTH, size + 0x19f, 0, mapId, 0, 0, spriteId); @@ -1005,7 +1005,7 @@ BOOL ScrCmd_CheckSeenAllLetterUnown(ScriptContext *ctx) { u16 *allUnownSeen; allUnownSeen = ScriptGetVarPointer(ctx); - pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); + pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); unownForms = Pokedex_GetSeenFormNum_Unown(pokedex, 1); if (unownForms < 26) { @@ -1040,7 +1040,7 @@ BOOL ScrCmd_GiveTogepiEgg(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - party = SaveArray_Party_Get(fieldSystem->saveData); + party = SaveArray_Party_Get(fieldSystem->saveData); if (Party_GetCount(party) >= 6) { return FALSE; @@ -1079,7 +1079,7 @@ BOOL ScrCmd_GiveTogepiEgg(ScriptContext *ctx) { // unused BOOL ScrCmd_777(ScriptContext *ctx) { u32 partyIndex = ScriptGetVar(ctx); - u16 *unkPtr = ScriptGetVarPointer(ctx); + u16 *unkPtr = ScriptGetVarPointer(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIndex); @@ -1108,7 +1108,7 @@ BOOL ScrCmd_GiveSpikyEarPichu(ScriptContext *ctx) { fieldSystem = ctx->fieldSystem; profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - party = SaveArray_Party_Get(fieldSystem->saveData); + party = SaveArray_Party_Get(fieldSystem->saveData); if (Party_GetCount(party) >= 6) { return FALSE; } @@ -1146,7 +1146,7 @@ BOOL ScrCmd_GiveSpikyEarPichu(ScriptContext *ctx) { BOOL ScrCmd_PhotoAlbumIsFull(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *albumIsFull = ScriptGetVarPointer(ctx); + u16 *albumIsFull = ScriptGetVarPointer(ctx); *albumIsFull = (PhotoAlbum_GetNumSaved(Save_PhotoAlbum_Get(fieldSystem->saveData)) >= 36); @@ -1154,7 +1154,7 @@ BOOL ScrCmd_PhotoAlbumIsFull(ScriptContext *ctx) { } BOOL ScrCmd_RadioMusicIsPlaying(ScriptContext *ctx) { - u32 musicSeq = ScriptGetVar(ctx); + u32 musicSeq = ScriptGetVar(ctx); u16 *isPlaying = ScriptGetVarPointer(ctx); *isPlaying = (GetRadioMusicPlayingSeq() == musicSeq); @@ -1214,8 +1214,8 @@ static u32 SlotLuckiness(SaveData *saveData, u8 machineId, u8 city) { } BOOL ScrCmd_CasinoGame(ScriptContext *ctx) { - u8 machineId = ScriptReadByte(ctx); - u8 city = ScriptReadByte(ctx); // 1 = celadon; 0 = goldenrod + u8 machineId = ScriptReadByte(ctx); + u8 city = ScriptReadByte(ctx); // 1 = celadon; 0 = goldenrod VoltorbFlipArgs **args = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); *args = VoltorbFlip_LaunchApp(ctx->fieldSystem, SlotLuckiness(ctx->fieldSystem->saveData, machineId, city)); // this is messy, very very messy @@ -1225,7 +1225,7 @@ BOOL ScrCmd_CasinoGame(ScriptContext *ctx) { } BOOL ScrCmd_BufferPokeathlonCourseName(ScriptContext *ctx) { - u8 fieldNo = ScriptReadByte(ctx); + u8 fieldNo = ScriptReadByte(ctx); u32 courseId = ScriptGetVar(ctx); BufferPokeathlonCourseName(*(MessageFormat **)FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT), fieldNo, (u8)courseId); return FALSE; @@ -1248,7 +1248,7 @@ BOOL ScrCmd_812(ScriptContext *ctx) { } BOOL ScrCmd_GetBuenasPassword(ScriptContext *ctx) { - u16 *msgPtr = ScriptGetVarPointer(ctx); + u16 *msgPtr = ScriptGetVarPointer(ctx); u16 *unkPtr2 = ScriptGetVarPointer(ctx); u8 unkVar = Save_VarsFlags_GetBuenasPasswordSet(Save_VarsFlags_Get(ctx->fieldSystem->saveData)) % 30; @@ -1274,9 +1274,9 @@ static u32 MonGetShinyLeafCount(Pokemon *mon) { } BOOL ScrCmd_GetShinyLeafCount(ScriptContext *ctx) { - u32 monIndex = ScriptGetVar(ctx); + u32 monIndex = ScriptGetVar(ctx); u16 *shinyLeafCount = ScriptGetVarPointer(ctx); - *shinyLeafCount = MonGetShinyLeafCount(Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), monIndex)); + *shinyLeafCount = MonGetShinyLeafCount(Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), monIndex)); return FALSE; } @@ -1301,7 +1301,7 @@ BOOL ScrCmd_GetUniqueSealsQuantity(ScriptContext *ctx) { } BOOL ScrCmd_GetSealQuantity(ScriptContext *ctx) { - u32 sealId = ScriptGetVar(ctx); + u32 sealId = ScriptGetVar(ctx); u16 *sealQuantity = ScriptGetVarPointer(ctx); *sealQuantity = SealCase_CountSealOccurrenceAnywhere(Save_SealCase_Get(ctx->fieldSystem->saveData), sealId); @@ -1310,7 +1310,7 @@ BOOL ScrCmd_GetSealQuantity(ScriptContext *ctx) { } BOOL ScrCmd_GiveOrTakeSeal(ScriptContext *ctx) { - u32 sealId = ScriptGetVar(ctx); + u32 sealId = ScriptGetVar(ctx); u32 quantity = ScriptGetVar(ctx); GiveOrTakeSeal(Save_SealCase_Get(ctx->fieldSystem->saveData), sealId, quantity); @@ -1405,15 +1405,15 @@ BOOL ScrCmd_CheckKyogreGroudonInParty(ScriptContext *ctx) { u8 kyogreGroudonFlags = 0; - unkPtr = ScriptGetVarPointer(ctx); + unkPtr = ScriptGetVarPointer(ctx); playerParty = SaveArray_Party_Get(ctx->fieldSystem->saveData); - partyCount = Party_GetCount(playerParty); - unkVar = *(ctx->script_ptr); + partyCount = Party_GetCount(playerParty); + unkVar = *(ctx->script_ptr); for (c = 0; c < partyCount; c++) { Pokemon *mon = Party_GetMonByIndex(playerParty, c); - u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u8 gameVer = GetMonData(mon, MON_DATA_GAME_VERSION, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + u8 gameVer = GetMonData(mon, MON_DATA_GAME_VERSION, NULL); if (!GetMonData(mon, MON_DATA_IS_EGG, NULL) && !GetMonData(mon, MON_DATA_CHECKSUM_FAILED, NULL) && !GetMonData(mon, MON_DATA_EGG_MET_LOCATION, NULL)) { @@ -1452,7 +1452,7 @@ BOOL ScrCmd_SysSetSleepFlag(ScriptContext *ctx) { } BOOL ScrCmd_BugContestAction(ScriptContext *ctx) { - u8 unkVar1 = ScriptReadByte(ctx); + u8 unkVar1 = ScriptReadByte(ctx); u32 weekday = ScriptGetVar(ctx); FieldSystem *fieldSystem = ctx->fieldSystem; @@ -1471,7 +1471,7 @@ BOOL ScrCmd_BufferBugContestWinner(ScriptContext *ctx) { MessageFormat **msgfmt; BugContest *bugContest; - msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); bugContest = FieldSystem_BugContest_Get(ctx->fieldSystem); BugContest_BufferContestWinnerNames(bugContest, ctx->msgdata, *msgfmt, *ctx->script_ptr++); @@ -1486,14 +1486,14 @@ BOOL ScrCmd_JudgeBugContest(ScriptContext *ctx) { u16 *species; bugContest = FieldSystem_BugContest_Get(ctx->fieldSystem); - placement = ScriptGetVarPointer(ctx); - prize = ScriptGetVarPointer(ctx); - species = ScriptGetVarPointer(ctx); + placement = ScriptGetVarPointer(ctx); + prize = ScriptGetVarPointer(ctx); + species = ScriptGetVarPointer(ctx); BugContest_Judge(bugContest); *placement = bugContest->placement; - *prize = bugContest->prize; + *prize = bugContest->prize; if (bugContest->caught_poke == 0) { *species = 0; @@ -1509,13 +1509,13 @@ BOOL ScrCmd_BufferBugContestMonNick(ScriptContext *ctx) { BugContest *bugContest; u32 script_index; - msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); bugContest = FieldSystem_BugContest_Get(ctx->fieldSystem); script_index = ScriptReadByte(ctx); u16 *monNick = ScriptGetVarPointer(ctx); - *monNick = BugContest_BufferCaughtMonNick(bugContest, *msgfmt, script_index); + *monNick = BugContest_BufferCaughtMonNick(bugContest, *msgfmt, script_index); return FALSE; } @@ -1528,7 +1528,7 @@ BOOL ScrCmd_BugContestGetTimeLeft(ScriptContext *ctx) { msgfmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); script_index = ScriptReadByte(ctx); - timeLeft = 1; + timeLeft = 1; bugContest = FieldSystem_BugContest_Get(ctx->fieldSystem); @@ -1543,8 +1543,8 @@ BOOL ScrCmd_BugContestGetTimeLeft(ScriptContext *ctx) { BOOL ScrCmd_IsBugContestantRegistered(ScriptContext *ctx) { BugContest *bugContest = FieldSystem_BugContest_Get(ctx->fieldSystem); - u32 id = ScriptGetVar(ctx); - u16 *ptr = ScriptGetVarPointer(ctx); - *ptr = BugContest_ContestantIsRegistered(bugContest, id); + u32 id = ScriptGetVar(ctx); + u16 *ptr = ScriptGetVarPointer(ctx); + *ptr = BugContest_ContestantIsRegistered(bugContest, id); return FALSE; } diff --git a/src/field_move.c b/src/field_move.c index 0ecbc7bde3..02eaa3b166 100644 --- a/src/field_move.c +++ b/src/field_move.c @@ -127,8 +127,8 @@ void FieldSystem_MakeFieldMoveCheckData(FieldSystem *fieldSystem, FieldMoveCheck u32 standingTile, facingTile; checkData->fieldSystem = fieldSystem; - checkData->mapId = fieldSystem->location->mapId; - checkData->flag = 0; + checkData->mapId = fieldSystem->location->mapId; + checkData->flag = 0; FieldSystem_GetFacingObject(fieldSystem, &facingObject); checkData->facingObject = facingObject; @@ -145,8 +145,8 @@ void FieldSystem_MakeFieldMoveCheckData(FieldSystem *fieldSystem, FieldMoveCheck break; } } - x = GetPlayerXCoord(fieldSystem->playerAvatar); - z = GetPlayerZCoord(fieldSystem->playerAvatar); + x = GetPlayerXCoord(fieldSystem->playerAvatar); + z = GetPlayerZCoord(fieldSystem->playerAvatar); standingTile = GetMetatileBehaviorAt(fieldSystem, x, z); PlayerAvatar_GetCoordsInFront(fieldSystem->playerAvatar, &x, &z); @@ -174,9 +174,9 @@ void FieldSystem_MakeFieldMoveCheckData(FieldSystem *fieldSystem, FieldMoveCheck static FieldUseMoveEnv *PartyMenuEnv_create(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { FieldUseMoveEnv *ret = AllocFromHeap(HEAP_ID_32, sizeof(FieldUseMoveEnv)); - ret->magic = 0x19740205; - ret->facingObject = checkData->facingObject; - ret->useData = *useData; + ret->magic = 0x19740205; + ret->facingObject = checkData->facingObject; + ret->useData = *useData; return ret; } @@ -201,15 +201,15 @@ static u32 FieldMoveMenuCheck_Cut(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Cut(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *startMenu = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *useMoveEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *useMoveEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); startMenu->atexit_TaskFunc = Task_UseCutInField; - startMenu->atexit_TaskEnv = useMoveEnv; - startMenu->state = 12; + startMenu->atexit_TaskEnv = useMoveEnv; + startMenu->state = 12; } static BOOL Task_UseCutInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_cut, env->facingObject); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -246,11 +246,11 @@ static u32 FieldMoveMenuCheck_Fly(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Fly(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(useData->taskManager); - FlyTaskStruct *flyEnv = AllocFromHeap(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); - flyEnv->partySlot = useData->partySlot; - env->atexit_TaskEnv2 = flyEnv; - env->atexit_TaskEnv = PokegearTownMap_LaunchApp(fieldSystem, 0); + StartMenuTaskData *env = TaskManager_GetEnvironment(useData->taskManager); + FlyTaskStruct *flyEnv = AllocFromHeap(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); + flyEnv->partySlot = useData->partySlot; + env->atexit_TaskEnv2 = flyEnv; + env->atexit_TaskEnv = PokegearTownMap_LaunchApp(fieldSystem, 0); StartMenu_SetChildProcReturnTaskFunc(env, Task_UseFlyInField); } @@ -283,15 +283,15 @@ static u32 FieldMoveMenuCheck_Surf(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Surf(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseSurfInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseSurfInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_surf, NULL); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -319,15 +319,15 @@ static u32 FieldMoveMenuCheck_Strength(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Strength(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseStrengthInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseStrengthInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_strength, env->facingObject); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -351,15 +351,15 @@ static u32 FieldMoveMenuCheck_RockSmash(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_RockSmash(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseRockSmashInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseRockSmashInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_rock_smash, env->facingObject); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -386,15 +386,15 @@ static u32 FieldMoveMenuCheck_Waterfall(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Waterfall(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseWaterfallInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseWaterfallInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_waterfall, NULL); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -427,15 +427,15 @@ static u32 FieldMoveMenuCheck_RockClimb(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_RockClimb(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseRockClimbInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseRockClimbInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_rock_climb, NULL); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -461,15 +461,15 @@ static u32 FieldMoveMenuCheck_Flash(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Flash(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *retEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseFlashInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseFlashInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); if (CheckUseFlashInAlphChamber(fieldSystem)) { StartScriptFromMenu(taskManager, _EV_scr_seq_D24R0204_002 + 1, NULL); @@ -505,21 +505,21 @@ static u32 FieldMoveMenuCheck_Teleport(const FieldMoveCheckData *checkData) { } static void FieldMoveMenuUse_Teleport(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); sub_020505C0(fieldSystem); struct TeleportFieldEnv *retEnv = sub_020689A4(HEAP_ID_FIELD, useData->partySlot, fieldSystem->saveData); - FlyTaskStruct *retSub = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); - retEnv->flySub = retSub; - retSub->partySlot = useData->partySlot; - menuEnv->atexit_TaskFunc = Task_UseTeleportInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + FlyTaskStruct *retSub = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); + retEnv->flySub = retSub; + retSub->partySlot = useData->partySlot; + menuEnv->atexit_TaskFunc = Task_UseTeleportInField; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseTeleportInField(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - struct TeleportFieldEnv *env = TaskManager_GetEnvironment(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + struct TeleportFieldEnv *env = TaskManager_GetEnvironment(taskManager); struct FieldLongWarpTaskData *newEnv = CreateFieldTeleportTaskEnv(fieldSystem, env->mon, env->flySub->partySlot, HEAP_ID_4); FreeToHeap(env->flySub); FreeToHeap(env); @@ -547,21 +547,21 @@ static u32 FieldMoveMenuCheck_Dig(const FieldMoveCheckData *checkData) { } static void FieldMoveMenuUse_Dig(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); sub_020505C0(fieldSystem); struct TeleportFieldEnv *retEnv = sub_020689A4(HEAP_ID_FIELD, useData->partySlot, fieldSystem->saveData); - FlyTaskStruct *retSub = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); - retEnv->flySub = retSub; - retSub->partySlot = useData->partySlot; - menuEnv->atexit_TaskFunc = Task_UseDigInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + FlyTaskStruct *retSub = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); + retEnv->flySub = retSub; + retSub->partySlot = useData->partySlot; + menuEnv->atexit_TaskFunc = Task_UseDigInField; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static BOOL Task_UseDigInField(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - struct TeleportFieldEnv *env = TaskManager_GetEnvironment(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + struct TeleportFieldEnv *env = TaskManager_GetEnvironment(taskManager); struct FieldLongWarpTaskData *newEnv = CreateFieldDigTaskEnv(fieldSystem, env->mon, env->flySub->partySlot, HEAP_ID_FIELD); FreeToHeap(env->flySub); FreeToHeap(env); @@ -582,16 +582,16 @@ static u32 FieldMoveMenuCheck_SweetScent(const FieldMoveCheckData *checkData) { } static void FieldMoveMenuUse_SweetScent(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); - StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); + StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); struct TeleportFieldEnv *retEnv = sub_020689A4(HEAP_ID_FIELD, useData->partySlot, fieldSystem->saveData); - FlyTaskStruct *retSub = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); - retEnv->flySub = retSub; - retSub->partySlot = useData->partySlot; + FlyTaskStruct *retSub = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FlyTaskStruct)); + retEnv->flySub = retSub; + retSub->partySlot = useData->partySlot; sub_020505C0(fieldSystem); menuEnv->atexit_TaskFunc = Task_UseSweetScentInField; - menuEnv->atexit_TaskEnv = retEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = retEnv; + menuEnv->state = 12; } static u32 FieldMoveMenuCheck_Chatter(const FieldMoveCheckData *checkData) { @@ -603,17 +603,17 @@ static u32 FieldMoveMenuCheck_Chatter(const FieldMoveCheckData *checkData) { } static void FieldMoveMenuUse_Chatter(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(useData->taskManager); StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *partyEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *partyEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(fieldSystem); menuEnv->atexit_TaskFunc = Task_UseChatterInField; - menuEnv->atexit_TaskEnv = partyEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = partyEnv; + menuEnv->state = 12; } static BOOL Task_UseChatterInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_chatter, NULL); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -643,15 +643,15 @@ static u32 FieldMoveMenuCheck_Whirlpool(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Whirlpool(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *partyEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *partyEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseWhirlpoolInField; - menuEnv->atexit_TaskEnv = partyEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = partyEnv; + menuEnv->state = 12; } static BOOL Task_UseWhirlpoolInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_whirlpool, NULL); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -673,15 +673,15 @@ static u32 FieldMoveMenuCheck_Headbutt(const FieldMoveCheckData *checkData) { static void FieldMoveMenuUse_Headbutt(FieldMoveUseData *useData, const FieldMoveCheckData *checkData) { StartMenuTaskData *menuEnv = TaskManager_GetEnvironment(useData->taskManager); - FieldUseMoveEnv *partyEnv = PartyMenuEnv_create(useData, checkData); + FieldUseMoveEnv *partyEnv = PartyMenuEnv_create(useData, checkData); sub_020505C0(checkData->fieldSystem); menuEnv->atexit_TaskFunc = Task_UseHeadbuttInField; - menuEnv->atexit_TaskEnv = partyEnv; - menuEnv->state = 12; + menuEnv->atexit_TaskEnv = partyEnv; + menuEnv->state = 12; } static BOOL Task_UseHeadbuttInField(TaskManager *taskManager) { - FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); + FieldUseMoveEnv *env = TaskManager_GetEnvironment(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartScriptFromMenu(taskManager, std_menu_headbutt, env->facingObject); FieldMoveArgsSet(fieldSystem, env->useData.partySlot, 0, 0, 0); @@ -691,7 +691,7 @@ static BOOL Task_UseHeadbuttInField(TaskManager *taskManager) { static struct TeleportFieldEnv *sub_020689A4(HeapID heapId, u8 slotno, SaveData *saveData) { struct TeleportFieldEnv *ret = AllocFromHeapAtEnd(heapId, sizeof(struct TeleportFieldEnv)); - ret->mon = Party_GetMonByIndex(SaveArray_Party_Get(saveData), slotno); - ret->flySub = NULL; + ret->mon = Party_GetMonByIndex(SaveArray_Party_Get(saveData), slotno); + ret->flySub = NULL; return ret; } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index cb2f1dc08d..b27b4fdd36 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -155,7 +155,7 @@ PlayerAvatar *sub_0205C390(MapObjectManager *man, int x, int y, int direction, i PlayerAvatar *sub_0205C408(MapObjectManager *man, PlayerSaveData *playerSaveData, int gender) { PlayerAvatar *avatar = sub_0205C4E0(); - int state = sub_0205C7EC(playerSaveData); + int state = sub_0205C7EC(playerSaveData); sub_0205C500(avatar, state, gender, playerSaveData); LocalMapObject *mapObj = sub_0205C640(man); MapObject_SetSpriteID(mapObj, PlayerAvatar_GetSpriteByStateAndGender(state, gender)); @@ -174,8 +174,8 @@ void sub_0205C46C(PlayerAvatar *avatar) { MapObject_GetManager(mapObj); ov01_022008B4(avatar); if (PlayerAvatar_GetState(avatar) == PLAYER_STATE_SURFING) { - int x = GetPlayerXCoord(avatar); - int z = GetPlayerZCoord(avatar); + int x = GetPlayerXCoord(avatar); + int z = GetPlayerZCoord(avatar); int dir = PlayerAvatar_GetFacingDirection(avatar); sub_0205C78C(avatar, ov01_021FE7DC(mapObj, x, z, dir, 1)); } @@ -234,7 +234,7 @@ void CreatePlayerAvatarMapObject(PlayerAvatar *avatar, MapObjectManager *man, u3 } LocalMapObject *sub_0205C600(MapObjectManager *man) { - int y = 0; + int y = 0; LocalMapObject *mapObj = 0; while (MapObjectManager_GetNextObjectWithFlagFromIndex(man, &mapObj, &y, MAPOBJECTFLAG_ACTIVE)) { if (MapObject_GetMovement(mapObj) == TRUE) { @@ -377,7 +377,7 @@ void sub_0205C74C(PlayerAvatar *avatar) { } int sub_0205C758(PlayerAvatar *avatar, int unkB, int unkC) { - int var = avatar->unk24 + unkB; + int var = avatar->unk24 + unkB; avatar->unk24 = var; if (var > unkC) { avatar->unk24 = unkC; @@ -443,9 +443,9 @@ void sub_0205C7B4(PlayerAvatar *avatar) { } void PlayerSaveData_Init(struct PlayerSaveData *playerSaveData) { - playerSaveData->hasRunningShoes = 0; + playerSaveData->hasRunningShoes = 0; playerSaveData->runningShoesLock = 0; - playerSaveData->unk4 = 0; + playerSaveData->unk4 = 0; } BOOL PlayerSaveData_CheckRunningShoes(struct PlayerSaveData *playerSaveData) { diff --git a/src/field_roamer.c b/src/field_roamer.c index d1387cce8c..d4b6e7f838 100644 --- a/src/field_roamer.c +++ b/src/field_roamer.c @@ -174,7 +174,7 @@ void UpdatePlayerLocationHistoryIfAnyRoamersActive(RoamerSaveData *roamers, u32 void Save_CreateRoamerByID(SaveData *saveData, u8 idx) { PlayerProfile *profile; RoamerSaveData *roamerSave = Save_Roamers_Get(saveData); - Roamer *roamerStats = Roamers_GetRoamMonStats(roamerSave, idx); + Roamer *roamerStats = Roamers_GetRoamMonStats(roamerSave, idx); Pokemon *mon; u16 species; u8 level; @@ -182,19 +182,19 @@ void Save_CreateRoamerByID(SaveData *saveData, u8 idx) { switch (idx) { case ROAMER_RAIKOU: species = SPECIES_RAIKOU; - level = 40; + level = 40; break; case ROAMER_ENTEI: species = SPECIES_ENTEI; - level = 40; + level = 40; break; case ROAMER_LATIAS: species = SPECIES_LATIAS; - level = 35; + level = 35; break; case ROAMER_LATIOS: species = SPECIES_LATIOS; - level = 35; + level = 35; break; default: GF_ASSERT(0); @@ -205,7 +205,7 @@ void Save_CreateRoamerByID(SaveData *saveData, u8 idx) { SetRoamerData(roamerStats, ROAMER_DATA_LEVEL, level); profile = Save_PlayerData_GetProfileAddr(saveData); - mon = AllocMonZeroed((HeapID)4); + mon = AllocMonZeroed((HeapID)4); ZeroMonData(mon); CreateMon(mon, species, level, 32, FALSE, 0, OT_ID_PRESET, PlayerProfile_GetTrainerID_VisibleHalf(profile)); SetRoamerData(roamerStats, ROAMER_DATA_STATUS, 0); @@ -247,7 +247,7 @@ static void RoamerLocationSetRandom(RoamerSaveData *roamer, u8 roamer_idx, u32 l loc_min = ROAMER_LOC_KANTO_START; } do { - loc_cur_rand = (LCRandom() % loc_num) + loc_min; + loc_cur_rand = (LCRandom() % loc_num) + loc_min; roamer_test_loc = sRoamerLocations[loc_cur_rand]; } while (roamer_test_loc == last_loc || roamer_test_loc == roamer_cur_loc); ApplyRoamerLocation(roamer, roamer_idx, loc_cur_rand, roamer_test_loc); @@ -261,9 +261,9 @@ static void RoamerLocationUpdateEx(RoamerSaveData *roamer, u8 roamer_idx, u32 la const struct RoamerAdjacency *adj; roamer_last_loc = Roamer_GetLocation(roamer, roamer_idx); - adj = &sRoamerAdjacencyTable[roamer_last_loc]; + adj = &sRoamerAdjacencyTable[roamer_last_loc]; if (adj->count == 1) { - roamer_next_loc = adj->neighbors[0]; + roamer_next_loc = adj->neighbors[0]; roamer_next_mapno = sRoamerLocations[roamer_next_loc]; if (roamer_next_mapno == last_loc) { RoamerLocationSetRandom(roamer, roamer_idx, last_loc); @@ -272,8 +272,8 @@ static void RoamerLocationUpdateEx(RoamerSaveData *roamer, u8 roamer_idx, u32 la } } else { while (1) { - sel_idx = LCRandRange(adj->count); - roamer_next_loc = adj->neighbors[sel_idx]; + sel_idx = LCRandRange(adj->count); + roamer_next_loc = adj->neighbors[sel_idx]; roamer_next_mapno = sRoamerLocations[roamer_next_loc]; if (roamer_next_mapno != last_loc) { ApplyRoamerLocation(roamer, roamer_idx, roamer_next_loc, roamer_next_mapno); diff --git a/src/field_system.c b/src/field_system.c index 20b76bca9a..774ac09401 100644 --- a/src/field_system.c +++ b/src/field_system.c @@ -27,16 +27,16 @@ FS_EXTERN_OVERLAY(OVY_124); FS_EXTERN_OVERLAY(field); const OVY_MGR_TEMPLATE gApplication_NewGameFieldsys = { - .init = Field_NewGame_AppInit, - .exec = Field_AppExec, - .exit = Field_AppExit, + .init = Field_NewGame_AppInit, + .exec = Field_AppExec, + .exit = Field_AppExit, .ovy_id = FS_OVERLAY_ID_NONE }; const OVY_MGR_TEMPLATE gApplication_ContinueFieldsys = { - .init = Field_Continue_AppInit, - .exec = Field_AppExec, - .exit = Field_AppExit, + .init = Field_Continue_AppInit, + .exec = Field_AppExec, + .exit = Field_AppExit, .ovy_id = FS_OVERLAY_ID_NONE }; @@ -51,7 +51,7 @@ static BOOL FieldSystem_Main(FieldSystem *fieldSystem); BOOL Field_Continue_AppInit(OVY_MANAGER *man, int *unused) { FieldSystemInitWork *args = OverlayManager_GetArgs(man); - sFieldSysPtr = FieldSystem_New(man); + sFieldSysPtr = FieldSystem_New(man); if (args->unk4) { CallFieldTask_ContinueGame_CommError(sFieldSysPtr); @@ -93,7 +93,7 @@ void sub_0203DEF0(FieldSystem *fieldSystem) { HandleLoadOverlay(FS_OVERLAY_ID(field), OVY_LOAD_ASYNC); - fieldSystem->unk6C = FALSE; + fieldSystem->unk6C = FALSE; fieldSystem->unk0->unk8 = FALSE; fieldSystem->unk0->unk0 = OverlayManager_New(&ov01_02206378, fieldSystem, HEAP_ID_FIELD); } diff --git a/src/field_system_rtc_weather.c b/src/field_system_rtc_weather.c index 0a558e06e0..fdf484878f 100644 --- a/src/field_system_rtc_weather.c +++ b/src/field_system_rtc_weather.c @@ -28,7 +28,7 @@ u32 FieldSystem_GetWeather_HandleDiamondDust(FieldSystem *fieldSystem, u32 mapId SysInfo_RTC *sysinfo_rtc = Save_SysInfo_RTC_Get(fieldSystem->saveData); for (c = 0; c < NELEMS(DiamondDustDates); c++) { u8 month = DiamondDustDates[c].month; - u8 day = DiamondDustDates[c].day; + u8 day = DiamondDustDates[c].day; if ((sysinfo_rtc->date.month == month) && (sysinfo_rtc->date.day == day)) { if (!sub_02055670(fieldSystem)) { weatherType = MAP_WEATHER_DIAMOND_DUST; diff --git a/src/field_take_photo.c b/src/field_take_photo.c index 85a872cb05..13472bbd8c 100644 --- a/src/field_take_photo.c +++ b/src/field_take_photo.c @@ -120,7 +120,7 @@ typedef struct Coord2U16 { } Coord2U16; static const Coord2U16 sSoloPhotoMonCoordOffsets = { 1, -1 }; -static const Coord2U16 sPhotoMonCoordOffsets[] = { +static const Coord2U16 sPhotoMonCoordOffsets[] = { { 2, 0 }, { 1, -1 }, { -1, -1 }, @@ -130,31 +130,31 @@ static const Coord2U16 sPhotoMonCoordOffsets[] = { }; static PhotoCameraParam sCameraParam = { - .distance = FX32_CONST(666.922119140625), - .angle.x = 0xEE00, + .distance = FX32_CONST(666.922119140625), + .angle.x = 0xEE00, .perspectiveType = 0, - .perspective = 0x230, - .unk_10 = { - 0x96, - 0x384, - }, + .perspective = 0x230, + .unk_10 = { + 0x96, + 0x384, + }, .lookAt = { - FX32_CONST(16.3125), - 0, - FX32_CONST(-47), - }, + FX32_CONST(16.3125), + 0, + FX32_CONST(-47), + }, }; void FieldSystem_TakePhoto(FieldSystem *fieldSystem, u16 photo_id) { FieldTakePhoto *takePhoto = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldTakePhoto)); MI_CpuFill8(takePhoto, 0, sizeof(FieldTakePhoto)); - takePhoto->state = 0; + takePhoto->state = 0; takePhoto->positionMonDelayCounter = 0; - takePhoto->curMon = 0; - takePhoto->savedX = GetPlayerXCoord(fieldSystem->playerAvatar); - takePhoto->savedY = GetPlayerZCoord(fieldSystem->playerAvatar); - takePhoto->savedDirection = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); - takePhoto->savedMapId = fieldSystem->location->mapId; + takePhoto->curMon = 0; + takePhoto->savedX = GetPlayerXCoord(fieldSystem->playerAvatar); + takePhoto->savedY = GetPlayerZCoord(fieldSystem->playerAvatar); + takePhoto->savedDirection = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); + takePhoto->savedMapId = fieldSystem->location->mapId; if (FollowMon_IsActive(fieldSystem)) { LocalMapObject *followMonObj = FollowMon_GetMapObject(fieldSystem); MapObject_CopyPositionVector(followMonObj, &takePhoto->followMonPositionVecBak); @@ -172,17 +172,17 @@ void FieldSystem_TakePhoto(FieldSystem *fieldSystem, u16 photo_id) { void FieldSystem_ViewSavedPhotos(FieldSystem *fieldSystem) { FieldViewPhoto *photo = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldViewPhoto)); MI_CpuFill8(photo, 0, sizeof(FieldViewPhoto)); - photo->x = GetPlayerXCoord(fieldSystem->playerAvatar); - photo->y = GetPlayerZCoord(fieldSystem->playerAvatar); + photo->x = GetPlayerXCoord(fieldSystem->playerAvatar); + photo->y = GetPlayerZCoord(fieldSystem->playerAvatar); photo->savedDirection = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); - photo->savedMapId = fieldSystem->location->mapId; - photo->photoAlbum = Save_PhotoAlbum_Get(fieldSystem->saveData); + photo->savedMapId = fieldSystem->location->mapId; + photo->photoAlbum = Save_PhotoAlbum_Get(fieldSystem->saveData); TaskManager_Call(fieldSystem->taskman, FieldTask_ViewPhoto, photo); } void FieldViewPhoto_GetAlbumScrollParam(FieldViewPhoto *viewPhoto, PhotoAlbumScroll *scrollData) { - scrollData->photo = &viewPhoto->pPhoto; - scrollData->curPhoto = viewPhoto->whichPhoto; + scrollData->photo = &viewPhoto->pPhoto; + scrollData->curPhoto = viewPhoto->whichPhoto; scrollData->numPhotos = PhotoAlbum_GetNumSaved(viewPhoto->photoAlbum); } @@ -191,7 +191,7 @@ void FieldViewPhoto_SetPlayerInput(FieldViewPhoto *viewPhoto, ViewPhotoInputResp } static BOOL FieldTask_ViewPhoto(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); FieldViewPhoto *viewPhoto = (FieldViewPhoto *)TaskManager_GetEnvironment(taskManager); switch (viewPhoto->state) { @@ -238,9 +238,9 @@ static int ViewPhotoFieldTask_HandleAlbumSelection(FieldSystem *fieldSystem, Tas return VIEW_PHOTO_STATE_SELECT; } BOOL photoWasSelected; - PhotoAlbumArgs *args = photo->selectionFromAlbumApp; + PhotoAlbumArgs *args = photo->selectionFromAlbumApp; photo->photoWasSelected = photoWasSelected = args->photoWasSelected; - photo->whichPhoto = args->cursorPos; + photo->whichPhoto = args->cursorPos; FreeToHeap(photo->selectionFromAlbumApp); if (photoWasSelected == TRUE) { return VIEW_PHOTO_STATE_LOAD; @@ -253,12 +253,12 @@ static int ViewPhotoFieldTask_LoadPhotoAndBeginRender(FieldSystem *fieldSystem, FieldTakePhoto3 *taskData = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldTakePhoto3)); MI_CpuClear8(taskData, sizeof(FieldTakePhoto3)); PhotoAlbum_GetPhotoByIndex(viewPhoto->photoAlbum, &viewPhoto->pPhoto, viewPhoto->whichPhoto); - viewPhoto->numMons = viewPhoto->pPhoto.subjectSpriteId != 0 ? 2 : viewPhoto->pPhoto.numMons; - viewPhoto->input = VIEW_PHOTO_INPUT_NOTHING; - taskData->parent = viewPhoto; + viewPhoto->numMons = viewPhoto->pPhoto.subjectSpriteId != 0 ? 2 : viewPhoto->pPhoto.numMons; + viewPhoto->input = VIEW_PHOTO_INPUT_NOTHING; + taskData->parent = viewPhoto; viewPhoto->fieldSystemUnk70Bak = fieldSystem->unk70; - fieldSystem->unk70 = 5; - fieldSystem->viewPhotoTask = viewPhoto; + fieldSystem->unk70 = 5; + fieldSystem->viewPhotoTask = viewPhoto; TaskManager_Call(fieldSystem->taskman, FieldTask_DoViewPhoto, taskData); return VIEW_PHOTO_STATE_FADE_IN; } @@ -277,9 +277,9 @@ static int ViewPhotoFieldTask_Cleanup(FieldSystem *fieldSystem, TaskManager *tas ++viewPhoto->substate; break; case 1: - fieldSystem->unk70 = viewPhoto->fieldSystemUnk70Bak; + fieldSystem->unk70 = viewPhoto->fieldSystemUnk70Bak; fieldSystem->viewPhotoTask = NULL; - viewPhoto->substate = 0; + viewPhoto->substate = 0; switch (viewPhoto->input) { case 2: --viewPhoto->whichPhoto; @@ -346,9 +346,9 @@ static int ViewPhotoFieldTask_RestorePlayerOverworldPosition(FieldSystem *fieldS } static BOOL FieldTask_DoViewPhoto(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); FieldTakePhoto3 *taskData = (FieldTakePhoto3 *)TaskManager_GetEnvironment(taskManager); - Photo *photo = &taskData->parent->pPhoto; + Photo *photo = &taskData->parent->pPhoto; switch (taskData->state) { case FIELD_PHOTO_DO_VIEW_STATE_0: @@ -426,7 +426,7 @@ static BOOL FieldTask_DoViewPhoto(TaskManager *taskManager) { } case FIELD_PHOTO_DO_VIEW_STATE_6: taskData->parent->mapObjects[0] = createSpecialMapObject(fieldSystem->mapObjectManager, photo->subjectSpriteId, DIR_SOUTH, photo->x + 2, photo->y, obj_photo_subject); - taskData->state = FIELD_PHOTO_DO_VIEW_STATE_7; + taskData->state = FIELD_PHOTO_DO_VIEW_STATE_7; break; case FIELD_PHOTO_DO_VIEW_STATE_7: { VecFx32 facingVec; @@ -515,9 +515,9 @@ static void setCameraParam(Camera *camera) { static void Photo_InitFromArcData(Photo *photo, FieldSystem *fieldSystem, u8 iconId, int mapId, int x, int y, int a6, int a7, u16 a8, u16 subjectObjId) { int partySize; - SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); + SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); - Party *party = SaveArray_Party_Get(saveData); + Party *party = SaveArray_Party_Get(saveData); int i; Photo_Init(photo); @@ -528,23 +528,23 @@ static void Photo_InitFromArcData(Photo *photo, FieldSystem *fieldSystem, u8 ico partySize = Party_GetCount(party); CopyU16StringArray(photo->playerName, PlayerProfile_GetNamePtr(profile)); - photo->gender = PlayerProfile_GetTrainerGender(profile); + photo->gender = PlayerProfile_GetTrainerGender(profile); photo->avatarStateBak = PlayerAvatar_GetState(fieldSystem->playerAvatar); - photo->x = x; - photo->y = y; - photo->mapId = mapId; - photo->iconId = iconId; + photo->x = x; + photo->y = y; + photo->mapId = mapId; + photo->iconId = iconId; RTCTime time; GF_RTC_CopyTime(&time); photo->hour = time.hour; - photo->min = time.minute; + photo->min = time.minute; MI_CpuCopy8(&sCameraParam, &photo->unk_48, sizeof(PhotoCameraParam)); - photo->unk_40[0] = a6; - photo->unk_40[1] = a7; - photo->unk_46 = a8; + photo->unk_40[0] = a6; + photo->unk_40[1] = a7; + photo->unk_46 = a8; photo->subjectSpriteId = subjectObjId; - photo->numMons = photo->subjectSpriteId != 0 ? 1 : partySize; + photo->numMons = photo->subjectSpriteId != 0 ? 1 : partySize; Pokemon *leadMon = GetFirstAliveMonInParty_CrashIfNone(party); GetMonData(leadMon, MON_DATA_NICKNAME_FLAT, photo->leadMonNick); @@ -553,26 +553,26 @@ static void Photo_InitFromArcData(Photo *photo, FieldSystem *fieldSystem, u8 ico Pokemon *mon = Party_GetMonByIndex(party, i); if (GetMonData(mon, MON_DATA_IS_EGG, NULL)) { photo->party[i].species = SPECIES_NONE; - photo->party[i].form = 0; - photo->party[i].shiny = FALSE; - photo->party[i].gender = 0; + photo->party[i].form = 0; + photo->party[i].shiny = FALSE; + photo->party[i].gender = 0; } else { photo->party[i].species = GetMonData(mon, MON_DATA_SPECIES, NULL); - photo->party[i].form = GetMonData(mon, MON_DATA_FORM, NULL); - photo->party[i].shiny = MonIsShiny(mon); - photo->party[i].gender = GetMonData(mon, MON_DATA_GENDER, NULL); + photo->party[i].form = GetMonData(mon, MON_DATA_FORM, NULL); + photo->party[i].shiny = MonIsShiny(mon); + photo->party[i].gender = GetMonData(mon, MON_DATA_GENDER, NULL); } } } else { photo->party[0].species = GetMonData(leadMon, MON_DATA_SPECIES, NULL); - photo->party[0].form = GetMonData(leadMon, MON_DATA_FORM, NULL); - photo->party[0].shiny = MonIsShiny(leadMon); - photo->party[0].gender = GetMonData(leadMon, MON_DATA_GENDER, NULL); + photo->party[0].form = GetMonData(leadMon, MON_DATA_FORM, NULL); + photo->party[0].shiny = MonIsShiny(leadMon); + photo->party[0].gender = GetMonData(leadMon, MON_DATA_GENDER, NULL); for (i = 1; i < PARTY_SIZE; ++i) { photo->party[i].species = SPECIES_NONE; - photo->party[i].form = 0; - photo->party[i].shiny = FALSE; - photo->party[i].gender = 0; + photo->party[i].form = 0; + photo->party[i].shiny = FALSE; + photo->party[i].gender = 0; } } } @@ -582,7 +582,7 @@ static inline void FieldTakePhoto_SetLocationBuf(FieldTakePhoto *takePhoto, int } static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); FieldTakePhoto *takePhoto = (FieldTakePhoto *)TaskManager_GetEnvironment(taskManager); switch (takePhoto->state) { @@ -624,10 +624,10 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { MapObject_SetFacingVector(PlayerAvatar_GetMapObject(fieldSystem->playerAvatar), &facingVec); } if (takePhoto->pPhoto->subjectSpriteId) { - takePhoto->state = TAKE_PHOTO_STATE_NPC_PHOTO_PLACE_NPC; + takePhoto->state = TAKE_PHOTO_STATE_NPC_PHOTO_PLACE_NPC; takePhoto->numObjects = 2; } else { - takePhoto->state = TAKE_PHOTO_STATE_PARTY_PHOTO_PLACE_MON_ITER; + takePhoto->state = TAKE_PHOTO_STATE_PARTY_PHOTO_PLACE_MON_ITER; takePhoto->numObjects = takePhoto->pPhoto->numMons; } break; @@ -659,7 +659,7 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { takePhoto->positionMonDelayCounter = 0; if (takePhoto->curMon >= takePhoto->pPhoto->numMons) { takePhoto->shutterDelayCounter = 0; - takePhoto->state = TAKE_PHOTO_STATE_13; + takePhoto->state = TAKE_PHOTO_STATE_13; } else { takePhoto->state = TAKE_PHOTO_STATE_PARTY_PHOTO_PLACE_MON_ITER; } @@ -667,7 +667,7 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { break; case TAKE_PHOTO_STATE_NPC_PHOTO_PLACE_NPC: takePhoto->mapObjects[0] = createSpecialMapObject(fieldSystem->mapObjectManager, takePhoto->pPhoto->subjectSpriteId, DIR_SOUTH, takePhoto->pPhoto->x + 2, takePhoto->pPhoto->y, obj_photo_subject); - takePhoto->state = TAKE_PHOTO_STATE_NPC_PHOTO_ADJUST_NPC; + takePhoto->state = TAKE_PHOTO_STATE_NPC_PHOTO_ADJUST_NPC; break; case TAKE_PHOTO_STATE_NPC_PHOTO_ADJUST_NPC: if (takePhoto->positionMonDelayCounter++ > 4) { @@ -677,7 +677,7 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { MapObject_SetFacingVector(takePhoto->mapObjects[0], &facingVec); sub_0205F484(takePhoto->mapObjects[0]); takePhoto->positionMonDelayCounter = 0; - takePhoto->state = TAKE_PHOTO_STATE_NPC_PHOTO_PLACE_MON; + takePhoto->state = TAKE_PHOTO_STATE_NPC_PHOTO_PLACE_MON; } break; case TAKE_PHOTO_STATE_NPC_PHOTO_PLACE_MON: { @@ -706,8 +706,8 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { sub_0205F484(mapObject); } takePhoto->positionMonDelayCounter = 0; - takePhoto->shutterDelayCounter = 0; - takePhoto->state = TAKE_PHOTO_STATE_13; + takePhoto->shutterDelayCounter = 0; + takePhoto->state = TAKE_PHOTO_STATE_13; } break; case TAKE_PHOTO_STATE_13: @@ -720,7 +720,7 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { drawCameraGfx(fieldSystem->bgConfig, HEAP_ID_4); CallTask_FadeFromBlack(taskManager); takePhoto->shutterState = 0; - takePhoto->state = TAKE_PHOTO_STATE_SHUTTER; + takePhoto->state = TAKE_PHOTO_STATE_SHUTTER; break; case TAKE_PHOTO_STATE_SHUTTER: switch (takePhoto->shutterState) { @@ -742,14 +742,14 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { case TAKE_PHOTO_SHUTTER_STATE_EXPOSURE: if (IsPaletteFadeFinished()) { PhotoAlbum *photoAlbum = Save_PhotoAlbum_Get(FieldSystem_GetSaveData(fieldSystem)); - u8 photoIndex = PhotoAlbum_GetIndexOfFirstEmptySlot(photoAlbum); + u8 photoIndex = PhotoAlbum_GetIndexOfFirstEmptySlot(photoAlbum); RTCDate date; GF_RTC_CopyDate(&date); takePhoto->pPhoto->date = ((date.year & 0xFF) << 24) | ((date.month & 0xFF) << 16) | ((date.day & 0xFF) << 8) | date.week; RTCTime time; GF_RTC_CopyTime(&time); takePhoto->pPhoto->hour = time.hour; - takePhoto->pPhoto->min = time.minute; + takePhoto->pPhoto->min = time.minute; PhotoAlbum_SetPhotoAtIndex(photoAlbum, &takePhoto->photoBuf, photoIndex); ++takePhoto->shutterState; } @@ -821,10 +821,10 @@ static BOOL FieldTask_TakePhoto(TaskManager *taskManager) { } static void sub_0206B82C(PlayerAvatar *playerAvatar, u8 state, u8 gender) { - int spriteId = PlayerAvatar_GetSpriteByStateAndGender(state, gender); - LocalMapObject *mapObject = PlayerAvatar_GetMapObject(playerAvatar); + int spriteId = PlayerAvatar_GetSpriteByStateAndGender(state, gender); + LocalMapObject *mapObject = PlayerAvatar_GetMapObject(playerAvatar); MapObjectManager *mapObjectManager = MapObject_GetManager(mapObject); - int gfxId = MapObject_GetSpriteID(mapObject); + int gfxId = MapObject_GetSpriteID(mapObject); sub_0205E420(mapObject); ov01_021FA108(mapObjectManager, gfxId, mapObject); sub_0205E38C(mapObject, spriteId); diff --git a/src/field_use_item.c b/src/field_use_item.c index 07a392df9e..701d62d392 100644 --- a/src/field_use_item.c +++ b/src/field_use_item.c @@ -146,14 +146,14 @@ void ItemCheckUseData_Init(FieldSystem *fieldSystem, struct ItemCheckUseData *da int x, y; LocalMapObject *dummy; - dat->fieldSystem = fieldSystem; - dat->mapId = fieldSystem->location->mapId; - dat->haveFollower = Save_VarsFlags_CheckHaveFollower(Save_VarsFlags_Get(fieldSystem->saveData)); + dat->fieldSystem = fieldSystem; + dat->mapId = fieldSystem->location->mapId; + dat->haveFollower = Save_VarsFlags_CheckHaveFollower(Save_VarsFlags_Get(fieldSystem->saveData)); dat->haveRocketCostume = Save_VarsFlags_CheckRocketCostumeFlag(Save_VarsFlags_Get(fieldSystem->saveData)); - dat->playerState = PlayerAvatar_GetState(fieldSystem->playerAvatar); + dat->playerState = PlayerAvatar_GetState(fieldSystem->playerAvatar); - x = GetPlayerXCoord(fieldSystem->playerAvatar); - y = GetPlayerZCoord(fieldSystem->playerAvatar); + x = GetPlayerXCoord(fieldSystem->playerAvatar); + y = GetPlayerZCoord(fieldSystem->playerAvatar); dat->standingTile = GetMetatileBehaviorAt(fieldSystem, x, y); switch (PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar)) { @@ -178,11 +178,11 @@ void ItemCheckUseData_Init(FieldSystem *fieldSystem, struct ItemCheckUseData *da static struct AlphItemUseData *CreateAlphItemUseWork(int scriptNo, u16 var_8000, u16 var_8001, u16 var_8002, u16 var_8003) { struct AlphItemUseData *ret = AllocFromHeap((HeapID)32, sizeof(struct AlphItemUseData)); - ret->scriptNo = scriptNo; - ret->var_8000 = var_8000; - ret->var_8001 = var_8001; - ret->var_8002 = var_8002; - ret->var_8003 = var_8003; + ret->scriptNo = scriptNo; + ret->var_8000 = var_8000; + ret->var_8001 = var_8001; + ret->var_8002 = var_8002; + ret->var_8003 = var_8003; return ret; } @@ -190,17 +190,17 @@ static struct AlphItemUseData *CreateAlphItemUseWork(int scriptNo, u16 var_8000, static void ExitMenuAndJumpToAlphChamberReaction(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2, int scriptNo) { #pragma unused(dat2) FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); env->atexit_TaskFunc = Task_UseItemInAlphChamber; - env->atexit_TaskEnv = CreateAlphItemUseWork(scriptNo, data->itemId, 0, 0, 0); - env->state = 12; + env->atexit_TaskEnv = CreateAlphItemUseWork(scriptNo, data->itemId, 0, 0, 0); + env->state = 12; } static BOOL Task_UseItemInAlphChamber(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct AlphItemUseData *env = TaskManager_GetEnvironment(taskManager); - u32 *state_p = TaskManager_GetStatePtr(taskManager); + u32 *state_p = TaskManager_GetStatePtr(taskManager); LocalMapObject *sp0; switch (*state_p) { @@ -224,21 +224,21 @@ static BOOL Task_UseItemInAlphChamber(TaskManager *taskManager) { static void ItemMenuUseFunc_HealingItem(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { #pragma unused(dat2) FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - PartyMenuArgs *usedat = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + PartyMenuArgs *usedat = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); memset(usedat, 0, sizeof(PartyMenuArgs)); - usedat->party = SaveArray_Party_Get(fieldSystem->saveData); - usedat->bag = Save_Bag_Get(fieldSystem->saveData); - usedat->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - usedat->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - usedat->unk_10 = sub_020270C4(fieldSystem->saveData); + usedat->party = SaveArray_Party_Get(fieldSystem->saveData); + usedat->bag = Save_Bag_Get(fieldSystem->saveData); + usedat->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + usedat->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + usedat->unk_10 = sub_020270C4(fieldSystem->saveData); usedat->fieldMoveCheckData = &env->fieldMoveCheckData; - usedat->unk_25 = 0; - usedat->context = PARTY_MENU_CONTEXT_USE_ITEM; - usedat->fieldSystem = fieldSystem; - usedat->itemId = data->itemId; - usedat->partySlot = data->partySlot; - usedat->menuInputStatePtr = &fieldSystem->menuInputState; + usedat->unk_25 = 0; + usedat->context = PARTY_MENU_CONTEXT_USE_ITEM; + usedat->fieldSystem = fieldSystem; + usedat->itemId = data->itemId; + usedat->partySlot = data->partySlot; + usedat->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, usedat); env->atexit_TaskEnv = usedat; StartMenu_SetChildProcReturnTaskFunc(env, Task_StartMenu_HandleReturn_Pokemon); @@ -251,11 +251,11 @@ static enum ItemUseError ItemCheckUseFunc_Dummy(const struct ItemCheckUseData *d static void ItemMenuUseFunc_Bicycle(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { #pragma unused(dat2) FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); env->atexit_TaskFunc = Task_MountOrDismountBicycle; - env->atexit_TaskEnv = NULL; - env->state = 12; + env->atexit_TaskEnv = NULL; + env->state = 12; } static BOOL ItemFieldUseFunc_Bicycle(struct ItemFieldUseData *data) { @@ -266,7 +266,7 @@ static BOOL ItemFieldUseFunc_Bicycle(struct ItemFieldUseData *data) { static BOOL Task_MountOrDismountBicycle(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - u32 *state_p = TaskManager_GetStatePtr(taskManager); + u32 *state_p = TaskManager_GetStatePtr(taskManager); int r6; switch (*state_p) { @@ -347,21 +347,21 @@ static enum ItemUseError ItemCheckUseFunc_Bicycle(const struct ItemCheckUseData static void ItemMenuUseFunc_TMHM(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { #pragma unused(dat2) FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - PartyMenuArgs *usedat = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + PartyMenuArgs *usedat = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); memset(usedat, 0, sizeof(PartyMenuArgs)); - usedat->party = SaveArray_Party_Get(fieldSystem->saveData); - usedat->bag = Save_Bag_Get(fieldSystem->saveData); - usedat->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - usedat->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + usedat->party = SaveArray_Party_Get(fieldSystem->saveData); + usedat->bag = Save_Bag_Get(fieldSystem->saveData); + usedat->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + usedat->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); usedat->fieldMoveCheckData = &env->fieldMoveCheckData; - usedat->unk_25 = 0; - usedat->context = PARTY_MENU_CONTEXT_TM_HM; - usedat->fieldSystem = fieldSystem; - usedat->itemId = data->itemId; - usedat->partySlot = data->partySlot; - usedat->moveId = TMHMGetMove(data->itemId); - usedat->menuInputStatePtr = &fieldSystem->menuInputState; + usedat->unk_25 = 0; + usedat->context = PARTY_MENU_CONTEXT_TM_HM; + usedat->fieldSystem = fieldSystem; + usedat->itemId = data->itemId; + usedat->partySlot = data->partySlot; + usedat->moveId = TMHMGetMove(data->itemId); + usedat->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, usedat); env->atexit_TaskEnv = usedat; StartMenu_SetChildProcReturnTaskFunc(env, Task_StartMenu_HandleReturn_Pokemon); @@ -370,10 +370,10 @@ static void ItemMenuUseFunc_TMHM(struct ItemMenuUseData *data, const struct Item static void ItemMenuUseFunc_Mail(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { #pragma unused(dat2) FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - UseMailArgs *mailWork = UseMail_CreateArgs(fieldSystem, 3, ItemToMailId(data->itemId), HEAP_ID_FIELD); - env->atexit_TaskEnv2 = sub_0203D818(data->itemId, 3, 0); - env->atexit_TaskEnv = mailWork; + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + UseMailArgs *mailWork = UseMail_CreateArgs(fieldSystem, 3, ItemToMailId(data->itemId), HEAP_ID_FIELD); + env->atexit_TaskEnv2 = sub_0203D818(data->itemId, 3, 0); + env->atexit_TaskEnv = mailWork; StartMenu_SetChildProcReturnTaskFunc(env, Task_ReturnToMenuFromMail); } @@ -383,7 +383,7 @@ static enum ItemUseError ItemCheckUseFunc_Berry(const struct ItemCheckUseData *d static void ItemMenuUseFunc_Berry(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); ItemMenuUseFunc_HealingItem(data, dat2); } @@ -394,8 +394,8 @@ BOOL Leftover_CanPlantBerry(const struct ItemCheckUseData *data) { static void ItemMenuUseFunc_PalPad(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - env->atexit_TaskEnv = PalPad_LaunchApp(fieldSystem, fieldSystem->saveData, HEAP_ID_FIELD); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + env->atexit_TaskEnv = PalPad_LaunchApp(fieldSystem, fieldSystem->saveData, HEAP_ID_FIELD); StartMenu_SetChildProcReturnTaskFunc(env, Task_ReturnToMenuFromAppItem); } @@ -412,24 +412,24 @@ static void ItemMenuUseFunc_Honey(struct ItemMenuUseData *data, const struct Ite size_t size; void *honey_work; FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); - size = GetHoneySweetScentWorkSize(); + size = GetHoneySweetScentWorkSize(); honey_work = AllocFromHeapAtEnd(HEAP_ID_FIELD, size); memset(honey_work, 0, size); env->atexit_TaskFunc = Task_HoneyOrSweetScent; - env->atexit_TaskEnv = honey_work; - env->state = 12; + env->atexit_TaskEnv = honey_work; + env->state = 12; Bag_TakeItem(Save_Bag_Get(fieldSystem->saveData), data->itemId, 1, HEAP_ID_FIELD); } static void ItemMenuUseFunc_OldRod(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); env->atexit_TaskFunc = Task_OverworldFish; - env->atexit_TaskEnv = CreateFishingRodTaskEnv(fieldSystem, HEAP_ID_FIELD, 0); - env->state = 12; + env->atexit_TaskEnv = CreateFishingRodTaskEnv(fieldSystem, HEAP_ID_FIELD, 0); + env->state = 12; } static BOOL ItemFieldUseFunc_OldRod(struct ItemFieldUseData *data) { @@ -439,11 +439,11 @@ static BOOL ItemFieldUseFunc_OldRod(struct ItemFieldUseData *data) { static void ItemMenuUseFunc_GoodRod(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); env->atexit_TaskFunc = Task_OverworldFish; - env->atexit_TaskEnv = CreateFishingRodTaskEnv(fieldSystem, HEAP_ID_FIELD, 1); - env->state = 12; + env->atexit_TaskEnv = CreateFishingRodTaskEnv(fieldSystem, HEAP_ID_FIELD, 1); + env->state = 12; } static BOOL ItemFieldUseFunc_GoodRod(struct ItemFieldUseData *data) { @@ -453,11 +453,11 @@ static BOOL ItemFieldUseFunc_GoodRod(struct ItemFieldUseData *data) { static void ItemMenuUseFunc_SuperRod(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); env->atexit_TaskFunc = Task_OverworldFish; - env->atexit_TaskEnv = CreateFishingRodTaskEnv(fieldSystem, HEAP_ID_FIELD, 2); - env->state = 12; + env->atexit_TaskEnv = CreateFishingRodTaskEnv(fieldSystem, HEAP_ID_FIELD, 2); + env->state = 12; } static BOOL ItemFieldUseFunc_SuperRod(struct ItemFieldUseData *data) { @@ -485,15 +485,15 @@ static enum ItemUseError ItemCheckUseFunc_FishingRod(const struct ItemCheckUseDa static BOOL ItemFieldUseFunc_Generic(struct ItemFieldUseData *data) { struct RegisteredKeyItemUseMessagePrintTaskData *env = AllocFromHeap(HEAP_ID_FIELD, sizeof(struct RegisteredKeyItemUseMessagePrintTaskData)); - env->state = 0; - env->strbuf = String_New(128, HEAP_ID_FIELD); + env->state = 0; + env->strbuf = String_New(128, HEAP_ID_FIELD); TryFormatRegisteredKeyItemUseMessage(data->fieldSystem->saveData, env->strbuf, data->itemId, HEAP_ID_FIELD); FieldSystem_CreateTask(data->fieldSystem, Task_PrintRegisteredKeyItemUseMessage, env); return FALSE; } static BOOL Task_PrintRegisteredKeyItemUseMessage(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct RegisteredKeyItemUseMessagePrintTaskData *env = TaskManager_GetEnvironment(taskManager); Options *options; @@ -537,21 +537,21 @@ static void ItemMenuUseFunc_EvoStone(struct ItemMenuUseData *data, const struct ExitMenuAndJumpToAlphChamberReaction(data, dat2, _EV_scr_seq_D24R0206_002 + 1); return; } - env = TaskManager_GetEnvironment(data->taskManager); + env = TaskManager_GetEnvironment(data->taskManager); usedat = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); memset(usedat, 0, sizeof(PartyMenuArgs)); - usedat->party = SaveArray_Party_Get(fieldSystem->saveData); - usedat->bag = Save_Bag_Get(fieldSystem->saveData); - usedat->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - usedat->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - usedat->unk_10 = sub_020270C4(fieldSystem->saveData); + usedat->party = SaveArray_Party_Get(fieldSystem->saveData); + usedat->bag = Save_Bag_Get(fieldSystem->saveData); + usedat->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + usedat->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + usedat->unk_10 = sub_020270C4(fieldSystem->saveData); usedat->fieldMoveCheckData = &env->fieldMoveCheckData; - usedat->unk_25 = 0; - usedat->context = PARTY_MENU_CONTEXT_EVO_STONE; - usedat->itemId = data->itemId; - usedat->partySlot = data->partySlot; - usedat->fieldSystem = fieldSystem; - usedat->menuInputStatePtr = &fieldSystem->menuInputState; + usedat->unk_25 = 0; + usedat->context = PARTY_MENU_CONTEXT_EVO_STONE; + usedat->itemId = data->itemId; + usedat->partySlot = data->partySlot; + usedat->fieldSystem = fieldSystem; + usedat->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, usedat); env->atexit_TaskEnv = usedat; StartMenu_SetChildProcReturnTaskFunc(env, Task_StartMenu_HandleReturn_Pokemon); @@ -567,11 +567,11 @@ static void ItemMenuUseFunc_EscapeRope(struct ItemMenuUseData *data, const struc } fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - env = TaskManager_GetEnvironment(data->taskManager); + env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); env->atexit_TaskFunc = Task_JumpToFieldEscapeRope; - env->atexit_TaskEnv = NULL; - env->state = 12; + env->atexit_TaskEnv = NULL; + env->state = 12; Bag_TakeItem(Save_Bag_Get(fieldSystem->saveData), data->itemId, 1, HEAP_ID_FIELD); } @@ -598,8 +598,8 @@ static BOOL Task_JumpToFieldEscapeRope(TaskManager *taskManager) { static void ItemMenuUseFunc_ApricornBox(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - env->atexit_TaskEnv = ApricornBox_LaunchApp(fieldSystem, 1); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + env->atexit_TaskEnv = ApricornBox_LaunchApp(fieldSystem, 1); StartMenu_SetChildProcReturnTaskFunc(env, Task_ReturnToMenuFromAppItem); } @@ -614,8 +614,8 @@ static ApricornBoxArgs *_CreateApricornBoxWork(FieldSystem *fieldSystem) { static void ItemMenuUseFunc_BerryPots(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - env->atexit_TaskEnv = BerryPots_LaunchApp(fieldSystem); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + env->atexit_TaskEnv = BerryPots_LaunchApp(fieldSystem); StartMenu_SetChildProcReturnTaskFunc(env, Task_ReturnToMenuFromAppItem); } @@ -630,8 +630,8 @@ static struct BerryPotsArgs *_BerryPotsArgs_New(FieldSystem *fieldSystem) { static void ItemMenuUseFunc_UnownReport(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - env->atexit_TaskEnv = UnownReport_LaunchApp(fieldSystem); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + env->atexit_TaskEnv = UnownReport_LaunchApp(fieldSystem); StartMenu_SetChildProcReturnTaskFunc(env, Task_ReturnToMenuFromAppItem); } @@ -646,11 +646,11 @@ static UnownReportArgs *_CreateUnownReportWork(FieldSystem *fieldSystem) { static void ItemMenuUseFunc_DowsingMchn(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_020505C0(fieldSystem); env->atexit_TaskFunc = Task_ActivateDowsingMchnUI; - env->atexit_TaskEnv = NULL; - env->state = 12; + env->atexit_TaskEnv = NULL; + env->state = 12; } static BOOL ItemFieldUseFunc_DowsingMchn(struct ItemFieldUseData *data) { @@ -660,7 +660,7 @@ static BOOL ItemFieldUseFunc_DowsingMchn(struct ItemFieldUseData *data) { static BOOL Task_ActivateDowsingMchnUI(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - u32 *state_p = TaskManager_GetStatePtr(taskManager); + u32 *state_p = TaskManager_GetStatePtr(taskManager); switch (*state_p) { case 0: @@ -681,8 +681,8 @@ static BOOL Task_ActivateDowsingMchnUI(TaskManager *taskManager) { static BOOL ItemFieldUseFunc_GbSounds(struct ItemFieldUseData *data) { struct RegisteredKeyItemUseMessagePrintTaskData *env = AllocFromHeap(HEAP_ID_FIELD, sizeof(struct RegisteredKeyItemUseMessagePrintTaskData)); - env->state = 0; - MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0010_bin, HEAP_ID_FIELD); + env->state = 0; + MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0010_bin, HEAP_ID_FIELD); if (SoundSys_GetGBSoundsState() == TRUE) { env->strbuf = NewString_ReadMsgData(msgData, msg_0010_00105); } else { @@ -696,8 +696,8 @@ static BOOL ItemFieldUseFunc_GbSounds(struct ItemFieldUseData *data) { static void ItemMenuUseFunc_Gracidea(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); - env->atexit_TaskEnv = PartyMenu_LaunchApp_Gracidea(fieldSystem, HEAP_ID_FIELD, ITEM_GRACIDEA); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + env->atexit_TaskEnv = PartyMenu_LaunchApp_Gracidea(fieldSystem, HEAP_ID_FIELD, ITEM_GRACIDEA); StartMenu_SetChildProcReturnTaskFunc(env, Task_StartMenu_HandleReturn_Pokemon); } @@ -712,7 +712,7 @@ static PartyMenuArgs *_CreateGracideaWork(FieldSystem *fieldSystem) { static void ItemMenuUseFunc_VSRecorder(struct ItemMenuUseData *data, const struct ItemCheckUseData *dat2) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(data->taskManager); - StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); + StartMenuTaskData *env = TaskManager_GetEnvironment(data->taskManager); sub_0203F570(fieldSystem, fieldSystem->saveData); env->atexit_TaskEnv = NULL; StartMenu_SetChildProcReturnTaskFunc(env, Task_ReturnToMenuFromVSRecorder); @@ -782,7 +782,7 @@ int UseRegisteredItemButtonInField(FieldSystem *fieldSystem, u8 slot) { if (itemId == ITEM_DOWSING_MCHN && ov01_021F6B00(fieldSystem) == 4) { return 0; } - funcType = GetItemAttr(itemId, ITEMATTR_FIELDUSEFUNC, HEAP_ID_FIELD); + funcType = GetItemAttr(itemId, ITEMATTR_FIELDUSEFUNC, HEAP_ID_FIELD); checkUseFunc = GetItemFieldUseFunc(USE_ITEM_TASK_CHECK, funcType); fieldUseFunc = GetItemFieldUseFunc(USE_ITEM_TASK_FIELD, funcType); if (fieldUseFunc == NULL) { @@ -791,7 +791,7 @@ int UseRegisteredItemButtonInField(FieldSystem *fieldSystem, u8 slot) { data = AllocFromHeap(HEAP_ID_FIELD, sizeof(struct ItemFieldUseData)); memset(data, 0, sizeof(struct ItemFieldUseData)); data->fieldSystem = fieldSystem; - data->itemId = itemId; + data->itemId = itemId; ItemCheckUseData_Init(fieldSystem, &data->dat); result = FALSE; if (checkUseFunc == NULL) { @@ -814,14 +814,14 @@ int UseRegisteredItemButtonInField(FieldSystem *fieldSystem, u8 slot) { static void RegisteredItem_GoToPrintErrorTask(struct ItemFieldUseData *data, enum ItemUseError error) { struct RegisteredKeyItemUseMessagePrintTaskData *env = AllocFromHeap(HEAP_ID_FIELD, sizeof(struct RegisteredKeyItemUseMessagePrintTaskData)); - env->state = 0; - env->strbuf = String_New(128, HEAP_ID_FIELD); + env->state = 0; + env->strbuf = String_New(128, HEAP_ID_FIELD); GetItemUseErrorMessage(Save_PlayerData_GetProfileAddr(data->fieldSystem->saveData), env->strbuf, data->itemId, error, HEAP_ID_FIELD); FieldSystem_CreateTask(data->fieldSystem, Task_PrintRegisteredKeyItemUseMessage, env); } static BOOL Task_RegisteredItem_GoToApp(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct ItemFieldUseData *env = TaskManager_GetEnvironment(taskManager); switch (env->state) { @@ -872,7 +872,7 @@ static BOOL Task_RegisteredItem_GoToApp(TaskManager *taskManager) { } static void RegisteredItem_CreateGoToAppTask(struct ItemFieldUseData *data, FieldApplicationWorkCtor ctor, BOOL no_app) { - data->ctor = ctor; + data->ctor = ctor; data->no_app = no_app; FieldSystem_CreateTask(data->fieldSystem, Task_RegisteredItem_GoToApp, data); } diff --git a/src/field_warp_tasks.c b/src/field_warp_tasks.c index 8203b0bec9..202f61e65a 100644 --- a/src/field_warp_tasks.c +++ b/src/field_warp_tasks.c @@ -140,15 +140,15 @@ static void sub_02052F30(FieldSystem *fieldSystem) { static void sub_02052F94(FieldSystem *fieldSystem, Location *location) { LocalFieldData *localFieldData = Save_LocalFieldData_Get(fieldSystem->saveData); - Location *r2 = LocalFieldData_GetPreviousPosition(localFieldData); + Location *r2 = LocalFieldData_GetPreviousPosition(localFieldData); const WARP_EVENT *warp; if (location != NULL) { - *r2 = *fieldSystem->location; + *r2 = *fieldSystem->location; *fieldSystem->location = *location; } Field_InitMapEvents(fieldSystem, fieldSystem->location->mapId); if (fieldSystem->location->warpId != -1) { - warp = Field_GetWarpEventI(fieldSystem, fieldSystem->location->warpId); + warp = Field_GetWarpEventI(fieldSystem, fieldSystem->location->warpId); fieldSystem->location->x = warp->x; fieldSystem->location->y = warp->z; if (warp->anchor == 0x100) { @@ -163,7 +163,7 @@ void sub_02053018(FieldSystem *fieldSystem) { } void sub_02053038(FieldSystem *fieldSystem, BOOL isConnection) { - u32 mapId = fieldSystem->location->mapId; + u32 mapId = fieldSystem->location->mapId; LocalFieldData *localFieldData = Save_LocalFieldData_Get(fieldSystem->saveData); SaveVarsFlags *varsFlags; u16 weather; @@ -186,7 +186,7 @@ void sub_02053038(FieldSystem *fieldSystem, BOOL isConnection) { SetLakeOfRageWaterLevel(fieldSystem->mapMatrix, ShouldUseAlternateLakeOfRage(fieldSystem->saveData, mapId)); } varsFlags = Save_VarsFlags_Get(fieldSystem->saveData); - weather = FieldSystem_GetWeather_HandleDiamondDust(fieldSystem, mapId); + weather = FieldSystem_GetWeather_HandleDiamondDust(fieldSystem, mapId); if (sub_02066C74(varsFlags, 1) && mapId == MAP_T29) { weather = 0; } @@ -220,14 +220,14 @@ static void sub_0205316C(FieldSystem *fieldSystem) { u32 gender; struct PlayerSaveData *playerSaveData; if (fieldSystem->unkAC) { - gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); - playerSaveData = LocalFieldData_GetPlayer(Save_LocalFieldData_Get(fieldSystem->saveData)); + gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); + playerSaveData = LocalFieldData_GetPlayer(Save_LocalFieldData_Get(fieldSystem->saveData)); fieldSystem->playerAvatar = sub_0205C390(fieldSystem->mapObjectManager, fieldSystem->location->x, fieldSystem->location->y, fieldSystem->location->direction, playerSaveData->unk4, gender, 2, playerSaveData); } else { fieldSystem->mapObjectManager = MapObjectManager_Init(fieldSystem, 64, 5); - gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); - playerSaveData = LocalFieldData_GetPlayer(Save_LocalFieldData_Get(fieldSystem->saveData)); - fieldSystem->playerAvatar = sub_0205C390(fieldSystem->mapObjectManager, fieldSystem->location->x, fieldSystem->location->y, fieldSystem->location->direction, playerSaveData->unk4, gender, 2, playerSaveData); + gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); + playerSaveData = LocalFieldData_GetPlayer(Save_LocalFieldData_Get(fieldSystem->saveData)); + fieldSystem->playerAvatar = sub_0205C390(fieldSystem->mapObjectManager, fieldSystem->location->x, fieldSystem->location->y, fieldSystem->location->direction, playerSaveData->unk4, gender, 2, playerSaveData); FollowMon_InitMapObject(fieldSystem->mapObjectManager, fieldSystem->location->x, fieldSystem->location->y, fieldSystem->location->direction, fieldSystem->location->mapId); Field_InitMapObjectsFromZoneEventData(fieldSystem); sub_0205F55C(fieldSystem->mapObjectManager); @@ -251,8 +251,8 @@ static void sub_0205323C(FieldSystem *fieldSystem) { fieldSystem->mapObjectManager = MapObjectManager_Init(fieldSystem, 64, 5); FieldSystem_RestoreMapObjectsFromSave(fieldSystem); - playerSaveData = LocalFieldData_GetPlayer(Save_LocalFieldData_Get(fieldSystem->saveData)); - gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); + playerSaveData = LocalFieldData_GetPlayer(Save_LocalFieldData_Get(fieldSystem->saveData)); + gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); fieldSystem->playerAvatar = sub_0205C408(fieldSystem->mapObjectManager, playerSaveData, gender); FollowMon_ChangeMon(fieldSystem->mapObjectManager, fieldSystem->location->mapId); sub_0205F55C(fieldSystem->mapObjectManager); @@ -314,7 +314,7 @@ static BOOL _IsPlayerStandingInFrontOfUnionRoomReception(FieldSystem *fieldSyste } static void _SetDynamicWarpToUnionRoomExit(FieldSystem *fieldSystem) { - Location *dynamicWarp = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); + Location *dynamicWarp = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); SaveVarsFlags *varsFlags = Save_VarsFlags_Get(fieldSystem->saveData); // unused if (MapHeader_MapIsPokemonLeagueLobby(fieldSystem->location->mapId) == TRUE) { InitLocation(dynamicWarp, fieldSystem->location->mapId, -1, 4, 11, DIR_SOUTH); @@ -325,7 +325,7 @@ static void _SetDynamicWarpToUnionRoomExit(FieldSystem *fieldSystem) { static BOOL FieldTask_NewGame(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - u32 *state_p = TaskManager_GetStatePtr(taskManager); + u32 *state_p = TaskManager_GetStatePtr(taskManager); switch (*state_p) { case 0: @@ -396,10 +396,10 @@ TaskManager *CallFieldTask_ContinueGame_Normal(FieldSystem *fieldSystem) { } static BOOL FieldTask_ContinueGame_CommError(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct ErrorContinueEnv *env = TaskManager_GetEnvironment(taskManager); - SaveVarsFlags *varsFlags = Save_VarsFlags_Get(fieldSystem->saveData); - u32 *state_p = TaskManager_GetStatePtr(taskManager); + SaveVarsFlags *varsFlags = Save_VarsFlags_Get(fieldSystem->saveData); + u32 *state_p = TaskManager_GetStatePtr(taskManager); switch (*state_p) { case 0: @@ -450,7 +450,7 @@ TaskManager *CallFieldTask_ContinueGame_CommError(FieldSystem *fieldSystem) { return CallFieldTask_ContinueGame_Normal(fieldSystem); } } - env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct ErrorContinueEnv)); + env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct ErrorContinueEnv)); env->state = 0; InitLocation(&env->location, MAP_UNION, -1, 8, 14, DIR_NORTH); fieldSystem->unk70 = 2; @@ -458,7 +458,7 @@ TaskManager *CallFieldTask_ContinueGame_CommError(FieldSystem *fieldSystem) { } static BOOL sub_02053688(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053688 *env = TaskManager_GetEnvironment(taskManager); switch (env->unk0) { @@ -490,13 +490,13 @@ static BOOL sub_02053688(TaskManager *taskManager) { static void sub_02053710(TaskManager *taskManager, Location *location) { struct UnkTaskEnv_02053688 *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053688)); - env->unk0 = 0; - env->location = *location; + env->unk0 = 0; + env->location = *location; TaskManager_Call(taskManager, sub_02053688, env); } static BOOL sub_02053740(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct ErrorContinueEnv *env = TaskManager_GetEnvironment(taskManager); switch (env->state) { @@ -521,13 +521,13 @@ static BOOL sub_02053740(TaskManager *taskManager) { } void sub_020537A8(TaskManager *taskManager, const Location *location) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct ErrorContinueEnv *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct ErrorContinueEnv)); if (sub_0203DF7C(fieldSystem)) { GF_ASSERT(0); return; } - env->state = 0; + env->state = 0; env->location = *location; TaskManager_Call(taskManager, sub_02053740, env); } @@ -545,7 +545,7 @@ void sub_020537F0(TaskManager *taskManager, u32 mapId, int warpId, int x, int y, } static BOOL Task_ScriptWarp(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct ErrorContinueEnv *env = TaskManager_GetEnvironment(taskManager); switch (env->state) { @@ -576,7 +576,7 @@ static BOOL Task_ScriptWarp(TaskManager *taskManager) { void CallTask_ScriptWarp(TaskManager *taskManager, u32 mapId, int warpId, int x, int y, int direction) { struct ErrorContinueEnv *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct ErrorContinueEnv)); - env->state = 0; + env->state = 0; InitLocation(&env->location, mapId, warpId, x, y, direction); TaskManager_Call(taskManager, Task_ScriptWarp, env); } @@ -590,9 +590,9 @@ TaskManager *sub_020538C0(FieldSystem *fieldSystem, u32 mapId, int warpId, int x direction }; struct UnkTaskEnv_02053950 *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053950)); - env->unk0 = 0; - env->unk4 = 0; - env->location = location; + env->unk0 = 0; + env->unk4 = 0; + env->location = location; return FieldSystem_CreateTask(fieldSystem, sub_02053950, env); } @@ -605,16 +605,16 @@ void sub_02053908(TaskManager *taskManager, u32 mapId, int warpId, int x, int y, direction }; struct UnkTaskEnv_02053950 *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053950)); - env->unk0 = 0; - env->unk4 = NULL; - env->location = location; + env->unk0 = 0; + env->unk4 = NULL; + env->location = location; TaskManager_Jump(taskManager, sub_02053950, env); } static BOOL sub_02053950(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053950 *env = TaskManager_GetEnvironment(taskManager); - Location *location = &env->location; + Location *location = &env->location; switch (env->unk0) { case 0: FieldSystem_BeginFadeOutMusic(fieldSystem, location->mapId); @@ -666,7 +666,7 @@ static void sub_02053A14(TaskManager *taskManager) { } static BOOL sub_02053A2C(TaskManager *taskManager) { - u32 *state_p = TaskManager_GetStatePtr(taskManager); + u32 *state_p = TaskManager_GetStatePtr(taskManager); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); switch (*state_p) { case 0: @@ -690,7 +690,7 @@ static BOOL sub_02053A2C(TaskManager *taskManager) { } static void sub_02053AA0(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053950 *env = TaskManager_GetEnvironment(taskManager); if (!sub_0203DF7C(fieldSystem)) { GF_ASSERT(0); @@ -712,17 +712,17 @@ static BOOL sub_02053AE4(TaskManager *taskManager) { void sub_02053B04(TaskManager *taskManager, Location *location, int a2) { struct UnkTaskEnv_02053B3C *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053B3C)); - env->unk0 = 0; - env->unk4 = a2; - env->unk8 = NULL; - env->location = *location; + env->unk0 = 0; + env->unk4 = a2; + env->unk8 = NULL; + env->location = *location; TaskManager_Jump(taskManager, sub_02053B3C, env); } static BOOL sub_02053B3C(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053B3C *env = TaskManager_GetEnvironment(taskManager); - Location *location = &env->location; + Location *location = &env->location; switch (env->unk0) { case 0: @@ -783,8 +783,8 @@ static void sub_02053C24(TaskManager *taskManager) { } static BOOL sub_02053C3C(TaskManager *taskManager) { - u32 *state_p = TaskManager_GetStatePtr(taskManager); - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + u32 *state_p = TaskManager_GetStatePtr(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053B3C *env = TaskManager_GetEnvironment(taskManager); // unused switch (*state_p) { @@ -805,7 +805,7 @@ static BOOL sub_02053C3C(TaskManager *taskManager) { } static void sub_02053C90(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053B3C *env = TaskManager_GetEnvironment(taskManager); if (!sub_0203DF7C(fieldSystem)) { @@ -816,9 +816,9 @@ static void sub_02053C90(TaskManager *taskManager) { } static BOOL sub_02053CCC(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053CCC *env = TaskManager_GetEnvironment(taskManager); - Location *location = &env->location; + Location *location = &env->location; struct LocalMapObject *follow_mon_obj; switch (env->unk0) { @@ -895,10 +895,10 @@ TaskManager *sub_02053E08(FieldSystem *fieldSystem, u32 mapId, int warpId) { } static BOOL sub_02053E5C(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053E5C *env = TaskManager_GetEnvironment(taskManager); - u32 *state_p = TaskManager_GetStatePtr(taskManager); - Location *location = &env->location; + u32 *state_p = TaskManager_GetStatePtr(taskManager); + Location *location = &env->location; switch (*state_p) { case 0: @@ -937,7 +937,7 @@ static BOOL sub_02053E5C(TaskManager *taskManager) { } void sub_02053F14(FieldSystem *fieldSystem) { - Location *location = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); + Location *location = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); struct UnkTaskEnv_02053E5C *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053E5C)); MI_CpuClear8(env, sizeof(struct UnkTaskEnv_02053E5C)); env->location = *location; @@ -949,10 +949,10 @@ void sub_02053F14(FieldSystem *fieldSystem) { } static BOOL sub_02053F70(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053E5C *env = TaskManager_GetEnvironment(taskManager); - u32 *state_p = TaskManager_GetStatePtr(taskManager); - Location *location = &env->location; + u32 *state_p = TaskManager_GetStatePtr(taskManager); + Location *location = &env->location; switch (*state_p) { case 0: @@ -995,8 +995,8 @@ static BOOL sub_02053F70(TaskManager *taskManager) { } void sub_02054030(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Location *location = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + Location *location = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); struct UnkTaskEnv_02053E5C *env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053E5C)); MI_CpuClear8(env, sizeof(struct UnkTaskEnv_02053E5C)); _CopyPlayerPosToLocationWorkFacingSouth(location, fieldSystem); @@ -1008,7 +1008,7 @@ void sub_02054030(TaskManager *taskManager) { } static BOOL sub_020540A4(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); struct UnkTaskEnv_02053688 *env = TaskManager_GetEnvironment(taskManager); switch (env->unk0) { @@ -1043,7 +1043,7 @@ void sub_0205412C(TaskManager *taskManager, u32 mapId, int warpId, int x, int y, FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); _CopyPlayerPosToLocationWorkFacingSouth(LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)), fieldSystem); fieldSystem->unk70 = 3; - env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053688)); + env = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(struct UnkTaskEnv_02053688)); { Location location = { mapId, @@ -1052,7 +1052,7 @@ void sub_0205412C(TaskManager *taskManager, u32 mapId, int warpId, int x, int y, y, direction }; - env->unk0 = 0; + env->unk0 = 0; env->location = location; } TaskManager_Call(taskManager, sub_020540A4, env); @@ -1060,7 +1060,7 @@ void sub_0205412C(TaskManager *taskManager, u32 mapId, int warpId, int x, int y, void sub_02054190(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Location *location = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); - fieldSystem->unk70 = 0; + Location *location = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); + fieldSystem->unk70 = 0; sub_02053710(fieldSystem->taskman, location); } diff --git a/src/fieldmap.c b/src/fieldmap.c index 0c03699f13..0ec3748c13 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -71,25 +71,25 @@ void StartMapSceneScript(FieldSystem *fieldSystem, u16 script, LocalMapObject *l void FieldSystem_SetEngagedTrainer(FieldSystem *fieldSystem, LocalMapObject *obj, int a2, int a3, int a4, int trainerId, int encounterType, int idx) { ScriptEnvironment *env = TaskManager_GetEnvironment(fieldSystem->taskman); - EngagedTrainer *r0 = &env->engagedTrainers[idx]; - r0->unk0 = a2; - r0->unk4 = a3; - r0->unk8 = a4; - r0->trainerId = trainerId; - r0->encounterType = encounterType; - r0->overworldEvent = obj; + EngagedTrainer *r0 = &env->engagedTrainers[idx]; + r0->unk0 = a2; + r0->unk4 = a3; + r0->unk8 = a4; + r0->trainerId = trainerId; + r0->encounterType = encounterType; + r0->overworldEvent = obj; } void QueueScript(TaskManager *taskman, u16 script, LocalMapObject *lastInteracted, void *a3) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - ScriptEnvironment *env = ScriptEnvironment_New(); + ScriptEnvironment *env = ScriptEnvironment_New(); SetupScriptEngine(fieldSystem, env, script, lastInteracted, a3); TaskManager_Call(taskman, Task_RunScripts, env); } void StartScriptFromMenu(TaskManager *taskman, u16 script, LocalMapObject *lastInteracted) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - ScriptEnvironment *env = ScriptEnvironment_New(); + ScriptEnvironment *env = ScriptEnvironment_New(); SetupScriptEngine(fieldSystem, env, script, lastInteracted, NULL); TaskManager_Jump(taskman, Task_RunScripts, env); } @@ -99,16 +99,16 @@ BOOL Task_RunScripts(TaskManager *taskman) { FieldSystem *fieldSystem; ScriptEnvironment *env; - env = TaskManager_GetEnvironment(taskman); + env = TaskManager_GetEnvironment(taskman); fieldSystem = TaskManager_GetFieldSystem(taskman); switch (env->state) { case 0: - env->scriptContexts[0] = CreateScriptContext(fieldSystem, env->activeScriptNumber); + env->scriptContexts[0] = CreateScriptContext(fieldSystem, env->activeScriptNumber); env->activeScriptContextCount = 1; - env->msgfmt = MessageFormat_New_Custom(8, 64, HEAP_ID_FIELD); - env->stringBuffer0 = String_New(1024, HEAP_ID_FIELD); - env->stringBuffer1 = String_New(1024, HEAP_ID_FIELD); + env->msgfmt = MessageFormat_New_Custom(8, 64, HEAP_ID_FIELD); + env->stringBuffer0 = String_New(1024, HEAP_ID_FIELD); + env->stringBuffer1 = String_New(1024, HEAP_ID_FIELD); env->state++; // fallthrough case 1: @@ -159,11 +159,11 @@ void DestroyScriptContext(ScriptContext *ctx) { } void SetupScriptEngine(FieldSystem *fieldSystem, ScriptEnvironment *env, u16 script, LocalMapObject *lastInteracted, void *a4) { - u16 *varLastInteracted = FieldSysGetAttrAddrInternal(env, SCRIPTENV_SPECIAL_VAR_LAST_INTERACTED); - env->facingDirection = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); - env->lastInteracted = lastInteracted; + u16 *varLastInteracted = FieldSysGetAttrAddrInternal(env, SCRIPTENV_SPECIAL_VAR_LAST_INTERACTED); + env->facingDirection = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); + env->lastInteracted = lastInteracted; env->activeScriptNumber = script; - env->unk_34 = a4; + env->unk_34 = a4; if (lastInteracted != NULL) { *varLastInteracted = MapObject_GetID(lastInteracted); } @@ -185,7 +185,7 @@ void SetUpScriptContextForMap(FieldSystem *fieldSystem, ScriptContext *ctx, u16 u16 r6; ctx->fieldSystem = fieldSystem; - r6 = LoadScriptsAndMessagesByMapId(fieldSystem, ctx, scriptId); + r6 = LoadScriptsAndMessagesByMapId(fieldSystem, ctx, scriptId); SetupBytecodeScript(ctx, ctx->mapScripts); ScriptRunByIndex(ctx, r6); sub_0203FD68(ctx, fieldSystem->taskman); @@ -211,12 +211,12 @@ u16 LoadScriptsAndMessagesByMapId(FieldSystem *fieldSystem, ScriptContext *ctx, void LoadScriptsAndMessagesParameterized(FieldSystem *fieldSystem, ScriptContext *ctx, int scriptBank, u32 msgBank) { ctx->mapScripts = AllocAndReadWholeNarcMemberByIdPair(NARC_fielddata_script_scr_seq, scriptBank, HEAP_ID_FIELD); - ctx->msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, msgBank, HEAP_ID_FIELD); + ctx->msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, msgBank, HEAP_ID_FIELD); } void LoadScriptsAndMessagesForCurrentMap(FieldSystem *fieldSystem, ScriptContext *ctx) { ctx->mapScripts = LoadScriptsForCurrentMap(fieldSystem->location->mapId); - ctx->msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, GetCurrentMapMessageBank(fieldSystem->location->mapId), HEAP_ID_FIELD); + ctx->msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, GetCurrentMapMessageBank(fieldSystem->location->mapId), HEAP_ID_FIELD); } void *FieldSysGetAttrAddrInternal(ScriptEnvironment *environment, enum ScriptEnvField field) { @@ -401,7 +401,7 @@ void ClearTempFieldEventData(FieldSystem *fieldSystem) { u16 *vars; SaveVarsFlags *state = Save_VarsFlags_Get(fieldSystem->saveData); - flags = Save_VarsFlags_GetFlagAddr(state, MAPTEMP_FLAG_BASE); + flags = Save_VarsFlags_GetFlagAddr(state, MAPTEMP_FLAG_BASE); memset(flags, 0, NUM_MAPTEMP_FLAGS / 8); vars = Save_VarsFlags_GetVarAddr(state, TEMP_VAR_BASE); memset(vars, 0, NUM_TEMP_VARS * 2); @@ -411,7 +411,7 @@ void ClearDailyFlags(FieldSystem *fieldSystem) { u8 *flags; SaveVarsFlags *state = Save_VarsFlags_Get(fieldSystem->saveData); - flags = Save_VarsFlags_GetFlagAddr(state, DAILY_FLAG_BASE); + flags = Save_VarsFlags_GetFlagAddr(state, DAILY_FLAG_BASE); memset(flags, 0, NUM_DAILY_FLAGS / 8); } @@ -490,8 +490,8 @@ BOOL GetHiddenItemParams(ScriptEnvironment *env, u16 script) { var_8000 = FieldSysGetAttrAddrInternal(env, SCRIPTENV_SPECIAL_VAR_8000); var_8001 = FieldSysGetAttrAddrInternal(env, SCRIPTENV_SPECIAL_VAR_8001); var_8002 = FieldSysGetAttrAddrInternal(env, SCRIPTENV_SPECIAL_VAR_8002); - table = sHiddenItemParam; - idx = HiddenItemScriptNoToHiddenItemIdx(script); + table = sHiddenItemParam; + idx = HiddenItemScriptNoToHiddenItemIdx(script); for (i = 0; i < NELEMS(sHiddenItemParam); i++) { if (idx == table[i].index) { @@ -522,28 +522,28 @@ HiddenItemResponse *AllocAndFetchNearbyHiddenItems(FieldSystem *fieldSystem, Hea int top; int bottom; - j = 0; + j = 0; num_bgs = Field_GetNumBgEvents(fieldSystem); num_bgs++; ret = AllocFromHeap(heapId, num_bgs * sizeof(HiddenItemResponse)); if (num_bgs == 1) { ret[0].unk4 = 0xFF; - ret[0].x = -1; - ret[0].y = -1; + ret[0].x = -1; + ret[0].y = -1; return ret; } bgEvents = Field_GetBgEvents(fieldSystem); if (bgEvents == NULL) { ret[0].unk4 = 0xFF; - ret[0].x = -1; - ret[0].y = -1; + ret[0].x = -1; + ret[0].y = -1; return ret; } - x = GetPlayerXCoord(fieldSystem->playerAvatar); - y = GetPlayerZCoord(fieldSystem->playerAvatar); - left = x - 17; - right = x + 17; - top = y - 17; + x = GetPlayerXCoord(fieldSystem->playerAvatar); + y = GetPlayerZCoord(fieldSystem->playerAvatar); + left = x - 17; + right = x + 17; + top = y - 17; bottom = y + 17; if (left < 0) { left = 0; @@ -561,15 +561,15 @@ HiddenItemResponse *AllocAndFetchNearbyHiddenItems(FieldSystem *fieldSystem, Hea && bgEvents[i].z >= top && bgEvents[i].z <= bottom) { ret[j].unk4 = sub_02040578(bgEvents[i].scriptId); - ret[j].x = bgEvents[i].x - x; - ret[j].y = bgEvents[i].z - y; + ret[j].x = bgEvents[i].x - x; + ret[j].y = bgEvents[i].z - y; j++; } } } ret[j].unk4 = 0xFF; - ret[j].x = -1; - ret[j].y = -1; + ret[j].x = -1; + ret[j].y = -1; return ret; } diff --git a/src/filesystem.c b/src/filesystem.c index f4dd04fa55..3f8ccac82b 100644 --- a/src/filesystem.c +++ b/src/filesystem.c @@ -11,8 +11,8 @@ static void ReadFromNarcMemberByPathAndId(void *dest, const char *path, s32 file u32 gmif_start = 0; u32 chunk_size = 0; u32 file_start = 0; - u32 file_end = 0; - u16 num_files = 0; + u32 file_end = 0; + u16 num_files = 0; FS_InitFile(&file); FS_OpenFile(&file, path); @@ -49,9 +49,9 @@ static void *AllocAndReadFromNarcMemberByPathAndId(const char *path, s32 file_id u32 gmif_start = 0; u32 chunk_size = 0; u32 file_start = 0; - u32 file_end = 0; - u16 num_files = 0; - void *dest = NULL; + u32 file_end = 0; + u16 num_files = 0; + void *dest = NULL; FS_InitFile(&file); FS_OpenFile(&file, path); @@ -121,8 +121,8 @@ u32 GetNarcMemberSizeByIdPair(NarcId narc_id, s32 file_idx) { u32 btnf_start = 0; u32 gmif_start = 0; u32 file_start = 0; - u32 file_end = 0; - u16 num_files = 0; + u32 file_end = 0; + u16 num_files = 0; FS_InitFile(&file); FS_OpenFile(&file, sNarcFileList[narc_id]); diff --git a/src/follow_mon.c b/src/follow_mon.c index d6ad2e7093..e11a8ad291 100644 --- a/src/follow_mon.c +++ b/src/follow_mon.c @@ -1507,8 +1507,8 @@ static const u16 sFemaleFlagLUT[] = { LocalMapObject *FollowMon_InitMapObject(MapObjectManager *mapObjectManager, int x, int y, int direction, u32 mapNo) { FieldSystem *fieldSystem = MapObjectManager_GetFieldSystem(mapObjectManager); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); - int partyCount = Party_GetCount(party); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); + int partyCount = Party_GetCount(party); FollowMon_Clear(&fieldSystem->followMon); Save_FollowMon_SetUnused2bitField(0, Save_FollowMon_Get(fieldSystem->saveData)); @@ -1521,16 +1521,16 @@ LocalMapObject *FollowMon_InitMapObject(MapObjectManager *mapObjectManager, int } else { mon = GetFirstAliveMonInParty_CrashIfNone(party); } - int species = GetMonData(mon, MON_DATA_SPECIES, NULL); + int species = GetMonData(mon, MON_DATA_SPECIES, NULL); fieldSystem->followMon.mapObject = NULL; if (FollowMon_GetPermissionBySpeciesAndMap(species, mapNo)) { - int form = GetMonData(mon, MON_DATA_FORM, NULL); + int form = GetMonData(mon, MON_DATA_FORM, NULL); int gender = GetMonData(mon, MON_DATA_GENDER, NULL); // must be int to match, even though gender is u8 - int shiny = MonIsShiny(mon); + int shiny = MonIsShiny(mon); fieldSystem->followMon.mapObject = FollowMon_CreateMapObject(mapObjectManager, species, form, gender, direction, x, y, shiny); - fieldSystem->followMon.active = TRUE; + fieldSystem->followMon.active = TRUE; FieldSystem_SetFollowerPokeParam(fieldSystem, species, form, shiny, gender); FieldSystem_UnkSub108_Set(fieldSystem->unk108, mon, species, GetMonData(mon, MON_DATA_PERSONALITY, NULL)); @@ -1561,14 +1561,14 @@ LocalMapObject *FollowMon_InitMapObject(MapObjectManager *mapObjectManager, int void FollowMon_ChangeMon(MapObjectManager *mapObjectManager, u32 mapno) { FieldSystem *fieldSystem = MapObjectManager_GetFieldSystem(mapObjectManager); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); - int partyCount = Party_GetCount(party); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); + int partyCount = Party_GetCount(party); FollowMon_Clear(&fieldSystem->followMon); if (partyCount != 0) { Pokemon *mon = GetFirstAliveMonInParty_CrashIfNone(party); - int species = GetMonData(mon, MON_DATA_SPECIES, NULL); + int species = GetMonData(mon, MON_DATA_SPECIES, NULL); int form; u8 gender; int shiny; @@ -1583,11 +1583,11 @@ void FollowMon_ChangeMon(MapObjectManager *mapObjectManager, u32 mapno) { if (followPokeObj == NULL) { fieldSystem->followMon.unk15 = 1; } else { - form = GetMonData(mon, MON_DATA_FORM, NULL); - gender = GetMonGender(mon); - shiny = MonIsShiny(mon); + form = GetMonData(mon, MON_DATA_FORM, NULL); + gender = GetMonGender(mon); + shiny = MonIsShiny(mon); fieldSystem->followMon.mapObject = followPokeObj; - fieldSystem->followMon.active = TRUE; + fieldSystem->followMon.active = TRUE; FieldSystem_SetFollowerPokeParam(fieldSystem, species, form, shiny, gender); FollowMon_SetObjectParams(followPokeObj, species, form, shiny); @@ -1619,17 +1619,17 @@ void FollowMon_ChangeMon(MapObjectManager *mapObjectManager, u32 mapno) { followPokeObj = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, obj_partner_poke); if (followPokeObj != NULL) { - form = GetMonData(mon, MON_DATA_FORM, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); gender = GetMonGender(mon); - shiny = MonIsShiny(mon); + shiny = MonIsShiny(mon); FieldSystem_SetFollowerPokeParam(fieldSystem, species, form, shiny, gender); FollowMon_SetObjectParams(followPokeObj, species, form, shiny); MapObject_SetSpriteID(followPokeObj, FollowMon_GetSpriteID(species, form, gender)); fieldSystem->followMon.mapObject = followPokeObj; - fieldSystem->followMon.active = TRUE; - fieldSystem->followMon.unk15 = 1; + fieldSystem->followMon.active = TRUE; + fieldSystem->followMon.unk15 = 1; } } } @@ -1674,10 +1674,10 @@ void sub_02069DC8(LocalMapObject *mapObject, BOOL enableBit) { void sub_02069DEC(LocalMapObject *mapObject, BOOL enableBit) { int value = MapObject_GetParam(mapObject, 2); - u8 flag0 = value & 1; + u8 flag0 = value & 1; u32 flag1 = enableBit; u32 flag2 = value >> 2; - value = flag2 << 2; + value = flag2 << 2; value |= flag1 << 1; value |= flag0 << 0; MapObject_SetParam(mapObject, value, 2); @@ -1705,7 +1705,7 @@ void sub_02069E50(LocalMapObject *mapObject, u8 a1) { param = MapObject_GetParam(mapObject, 2); - b = param & 0x3FF; + b = param & 0x3FF; param = (a1 << 10) | (u8)b; MapObject_SetParam(mapObject, param, 2); @@ -1754,9 +1754,9 @@ void sub_02069F0C(LocalMapObject *mapObject, int species, u8 form, BOOL shiny, i void FieldSystem_SetFollowerPokeParam(FieldSystem *fieldSystem, int species, u8 form, BOOL shiny, u8 gender) { fieldSystem->followMon.species = species; - fieldSystem->followMon.shiny = shiny; - fieldSystem->followMon.form = form; - fieldSystem->followMon.gender = gender; + fieldSystem->followMon.shiny = shiny; + fieldSystem->followMon.form = form; + fieldSystem->followMon.gender = gender; } u8 FollowMon_GetSizeParamBySpecies(int species) { @@ -1838,18 +1838,18 @@ void sub_0206A054(FieldSystem *fieldSystem) { } static void FollowMon_Clear(FollowMon *followMon) { - followMon->active = FALSE; + followMon->active = FALSE; followMon->mapObject = NULL; - followMon->unk4 = 0; - followMon->unk1C = 0; - followMon->unk8 = 0; - followMon->unkC = 0; - followMon->unk15 = 0; + followMon->unk4 = 0; + followMon->unk1C = 0; + followMon->unk8 = 0; + followMon->unkC = 0; + followMon->unk15 = 0; } static void FollowMon_SetObjectShiny(LocalMapObject *mapObject, BOOL enable) { int param = MapObject_GetParam(mapObject, 2); - param = (u32)(param >> 1) << 1; // u32 needed to match + param = (u32)(param >> 1) << 1; // u32 needed to match if (enable) { param |= 1; } @@ -1879,7 +1879,7 @@ static BOOL FollowMon_DiglettPermissionCheck(int mapNo) { static void FollowMon_SetObjectForm(LocalMapObject *mapObject, int species, u8 form) { u8 data[4]; - int offset = SpeciesToOverworldModelIndexOffset(species); + int offset = SpeciesToOverworldModelIndexOffset(species); int formCount = OverworldModelLookupFormCount(species); if (formCount > 0) { @@ -1920,10 +1920,10 @@ FieldSystemUnk108 *FieldSystem_UnkSub108_Alloc(HeapID heapId) { ret = AllocFromHeap(heapId, sizeof(FieldSystemUnk108)); MI_CpuClear8(ret, sizeof(FieldSystemUnk108)); - ret->species = 0; - ret->personality = 0; + ret->species = 0; + ret->personality = 0; ret->isRegistered = FALSE; - ret->mon = 0; + ret->mon = 0; return ret; } @@ -1967,11 +1967,11 @@ s8 FieldSystem_UnkSub108_GetMonMood(FieldSystemUnk108 *unk) { void FieldSystem_UnkSub108_Set(FieldSystemUnk108 *a0, Pokemon *mon, u16 species, u32 personality) { s8 mood; if (species != SPECIES_NONE && (a0->isRegistered == FALSE || a0->species != species || a0->personality != personality)) { - a0->species = species; - a0->personality = personality; - mood = 0; + a0->species = species; + a0->personality = personality; + mood = 0; a0->isRegistered = TRUE; - a0->mon = mon; + a0->mon = mon; SetMonData(mon, MON_DATA_MOOD, &mood); } } diff --git a/src/font.c b/src/font.c index be6e5e2f07..37c9717e7c 100644 --- a/src/font.c +++ b/src/font.c @@ -42,8 +42,8 @@ void FontWork_Init(void) { sFontWork = &work; for (i = 0; i < FONT_NUM; i++) { - sFontWork->extraData[i] = NULL; - sFontWork->fontDataMan[i] = NULL; + sFontWork->extraData[i] = NULL; + sFontWork->fontDataMan[i] = NULL; sFontWork->fontDataRefCount[i] = 0; } SetFontsPointer(sFontInfos); @@ -51,7 +51,7 @@ void FontWork_Init(void) { void FontID_Alloc(FontID fontId, HeapID heapId) { if (sFontWork->fontDataMan[fontId] == NULL) { - sFontWork->fontDataMan[fontId] = FontData_New(NARC_graphic_font, sFontArcParam[fontId][0], FONTARC_MODE_LAZY, sFontArcParam[fontId][1], heapId); + sFontWork->fontDataMan[fontId] = FontData_New(NARC_graphic_font, sFontArcParam[fontId][0], FONTARC_MODE_LAZY, sFontArcParam[fontId][1], heapId); sFontWork->fontDataRefCount[fontId] = 1; } else { sFontWork->fontDataRefCount[fontId]++; @@ -110,7 +110,7 @@ RenderResult FontID_RenderText(int fontId, TextPrinter *printer) { sub = (struct TextPrinterSubStruct *)printer->subStructFields; if (!sub->hasFontIdBeenSet) { - sub->fontId = fontId; + sub->fontId = fontId; sub->hasFontIdBeenSet = TRUE; } return RenderText(printer); diff --git a/src/font_data.c b/src/font_data.c index 81f8cf3fc6..12db321c76 100644 --- a/src/font_data.c +++ b/src/font_data.c @@ -86,18 +86,18 @@ static void FontData_Init(struct FontData *fontData, NarcId narcId, int fileId, NARC_ReadFromAbsolutePos(fontData->narc, fontData->gmifOffset, sizeof(struct FontHeader), &fontData->header); fontData->isFixedWidthFont = isFixedWidth; if (isFixedWidth) { - fontData->glyphWidths = NULL; + fontData->glyphWidths = NULL; fontData->glyphWidthFunc = GetGlyphWidth_FixedWidth; } else { GF_ASSERT(fontData->header.widthDataStart != 0); - fontData->glyphWidths = AllocFromHeap(heapId, fontData->header.numGlyphs); + fontData->glyphWidths = AllocFromHeap(heapId, fontData->header.numGlyphs); fontData->glyphWidthFunc = GetGlyphWidth_VariableWidth; NARC_ReadFromAbsolutePos(fontData->narc, fontData->gmifOffset + fontData->header.widthDataStart, fontData->header.numGlyphs, fontData->glyphWidths); } GF_ASSERT(fontData->header.glyphWidth <= 2 && fontData->header.glyphHeight <= 2); fontData->glyphShape = (enum GlyphShape)_020F6324[fontData->header.glyphWidth - 1][fontData->header.glyphHeight - 1]; - fontData->glyphSize = 16 * fontData->header.glyphWidth * fontData->header.glyphHeight; - fontData->fileId = fileId; + fontData->glyphSize = 16 * fontData->header.glyphWidth * fontData->header.glyphHeight; + fontData->fileId = fileId; } } @@ -120,8 +120,8 @@ static void InitFontResources(struct FontData *fontData, int mode, HeapID heapId } static void InitFontResources_FromPreloaded(struct FontData *fontData, HeapID heapId) { - u32 size = fontData->glyphSize * fontData->header.numGlyphs; - fontData->narcReadBuf = AllocFromHeap(heapId, size); + u32 size = fontData->glyphSize * fontData->header.numGlyphs; + fontData->narcReadBuf = AllocFromHeap(heapId, size); fontData->uncompGlyphFunc = DecompressGlyphTiles_FromPreloaded; NARC_ReadFromMember(fontData->narc, fontData->fileId, fontData->header.headerSize, size, fontData->narcReadBuf); } @@ -157,7 +157,7 @@ void TryLoadGlyph(struct FontData *fontData, u16 glyphId, struct GlyphInfo *ret) } static void DecompressGlyphTiles_FromPreloaded(struct FontData *fontData, u16 glyphId, struct GlyphInfo *ret) { - u32 offset = glyphId * fontData->glyphSize; + u32 offset = glyphId * fontData->glyphSize; u8 *tileData = fontData->narcReadBuf; switch (fontData->glyphShape) { case GLYPHSHAPE_8x8: @@ -178,7 +178,7 @@ static void DecompressGlyphTiles_FromPreloaded(struct FontData *fontData, u16 gl DecompressGlyphTile(tileData + offset + 0x30, ret->data + 0x60); break; } - ret->width = fontData->glyphWidthFunc(fontData, glyphId); + ret->width = fontData->glyphWidthFunc(fontData, glyphId); ret->height = fontData->header.fixedHeight; } @@ -203,7 +203,7 @@ static void DecompressGlyphTiles_LazyFromNarc(struct FontData *fontData, u16 gly DecompressGlyphTile(fontData->glyphReadBuf + 0x30, ret->data + 0x60); break; } - ret->width = fontData->glyphWidthFunc(fontData, glyphId); + ret->width = fontData->glyphWidthFunc(fontData, glyphId); ret->height = fontData->header.fixedHeight; } diff --git a/src/frontier/frontier_cmd_arcade.c b/src/frontier/frontier_cmd_arcade.c index def07cb30d..dfc776a4e6 100644 --- a/src/frontier/frontier_cmd_arcade.c +++ b/src/frontier/frontier_cmd_arcade.c @@ -24,11 +24,11 @@ static void ov80_02233F40(SPLEmitter *emitter); static BOOL ov80_02234028(FrontierContext *ctx); BOOL FrtCmd_ArcadeAlloc(FrontierContext *ctx) { - u32 spC = FrontierScript_ReadVar(ctx); - u32 r4 = FrontierScript_ReadVar(ctx); - u32 sp10 = FrontierScript_ReadVar(ctx); - u32 r6 = FrontierScript_ReadVar(ctx); - u32 r7 = FrontierScript_ReadVar(ctx); + u32 spC = FrontierScript_ReadVar(ctx); + u32 r4 = FrontierScript_ReadVar(ctx); + u32 sp10 = FrontierScript_ReadVar(ctx); + u32 r6 = FrontierScript_ReadVar(ctx); + u32 r7 = FrontierScript_ReadVar(ctx); u16 *sp14 = FrontierScript_ReadVarPtr(ctx); FrontierLaunchParam *param = Frontier_GetLaunchParam(ctx->frontierSystem->unk0); @@ -38,7 +38,7 @@ BOOL FrtCmd_ArcadeAlloc(FrontierContext *ctx) { } BOOL FrtCmd_ArcadeInit(FrontierContext *ctx) { - u32 arg1 = FrontierScript_ReadVar(ctx); + u32 arg1 = FrontierScript_ReadVar(ctx); void *arg0 = Frontier_GetData(ctx->frontierSystem->unk0); BattleArcadeData_Init(arg0, arg1); return FALSE; @@ -53,8 +53,8 @@ extern OVY_MGR_TEMPLATE gOverlayTemplate_BattleArcadeGameBoard; BOOL FrtCmd_LaunchGameBoard(FrontierContext *ctx) { FrontierLaunchParam *param = Frontier_GetLaunchParam(ctx->frontierSystem->unk0); - ArcadeContext *data = Frontier_GetData(ctx->frontierSystem->unk0); - GAME_BOARD_ARGS *args = AllocFromHeap(HEAP_ID_FIELD, sizeof(GAME_BOARD_ARGS)); + ArcadeContext *data = Frontier_GetData(ctx->frontierSystem->unk0); + GAME_BOARD_ARGS *args = AllocFromHeap(HEAP_ID_FIELD, sizeof(GAME_BOARD_ARGS)); MI_CpuFill8(args, 0, sizeof(GAME_BOARD_ARGS)); args->saveData = param->saveData; GameBoardArgs_Set(args, data); @@ -69,7 +69,7 @@ BOOL FrtCmd_187(FrontierContext *ctx) { int i, index1, index2, partyCnt, data; ArcadeContext *arcadeData = Frontier_GetData(ctx->frontierSystem->unk0); - BattleSetup *setup = arcadeData->battleSetup; + BattleSetup *setup = arcadeData->battleSetup; arcadeData->bpGain = BattleArcade_GetWonBattlePoints(arcadeData, setup->party[0], arcadeData->battleSetup->party[2], setup->unk1B4); @@ -96,10 +96,10 @@ BOOL FrtCmd_187(FrontierContext *ctx) { if (arcadeData->unk13 == 0x11) { monCnt = BattleArcade_GetMonCount(arcadeData->type, 1); for (i = 0; i < monCnt; i++) { - mon = Party_GetMonByIndex(arcadeData->playerParty, i); - u32 level = GetMonData(mon, MON_DATA_LEVEL, 0); + mon = Party_GetMonByIndex(arcadeData->playerParty, i); + u32 level = GetMonData(mon, MON_DATA_LEVEL, 0); u32 species = GetMonData(mon, MON_DATA_SPECIES, 0); - u32 exp = GetMonExpBySpeciesAndLevel(species, level - 3); + u32 exp = GetMonExpBySpeciesAndLevel(species, level - 3); SetMonData(mon, MON_DATA_EXPERIENCE, &exp); CalcMonLevelAndStats(mon); } @@ -107,7 +107,7 @@ BOOL FrtCmd_187(FrontierContext *ctx) { partyCnt = Party_GetCount(arcadeData->playerParty); for (i = 0; i < partyCnt; i++) { - mon = Party_GetMonByIndex(arcadeData->playerParty, i); + mon = Party_GetMonByIndex(arcadeData->playerParty, i); data = arcadeData->savedHp[i]; SetMonData(mon, MON_DATA_MAXHP, &data); SetMonData(mon, MON_DATA_HP, &data); @@ -130,8 +130,8 @@ BOOL FrtCmd_187(FrontierContext *ctx) { BOOL FrtCmd_ArcadeStartBattle(FrontierContext *ctx) { FrontierLaunchParam *param = Frontier_GetLaunchParam(ctx->frontierSystem->unk0); - ArcadeContext *arcadeData = Frontier_GetData(ctx->frontierSystem->unk0); - BattleSetup *setup = BattleArcade_NewBattleSetup(arcadeData, param); + ArcadeContext *arcadeData = Frontier_GetData(ctx->frontierSystem->unk0); + BattleSetup *setup = BattleArcade_NewBattleSetup(arcadeData, param); arcadeData->battleSetup = setup; @@ -141,35 +141,35 @@ BOOL FrtCmd_ArcadeStartBattle(FrontierContext *ctx) { } static void GameBoardArgs_Set(GAME_BOARD_ARGS *args, ArcadeContext *data) { - args->type = data->type; + args->type = data->type; args->unk1E = ov80_02238498(data); - args->unk14 = &data->unk20; - args->unk10 = &data->unk13; + args->unk14 = &data->unk20; + args->unk10 = &data->unk13; args->bpGain = data->bpGain; - args->winStreak = data->winStreak; + args->winStreak = data->winStreak; args->multiWinStreak = data->multiWinStreak; - args->cursorSpeed = &data->cursorSpeed; - args->playerParty = data->playerParty; + args->cursorSpeed = &data->cursorSpeed; + args->playerParty = data->playerParty; args->opponentParty = data->opponentParty; - args->work = data; + args->work = data; - data->weather = 0; - args->weather = &data->weather; + data->weather = 0; + args->weather = &data->weather; args->randomFlag = data->randomFlag; data->randomFlag = 0; - data->unk1F = 0; + data->unk1F = 0; int partyCnt = Party_GetCount(data->playerParty); for (int i = 0; i < partyCnt; i++) { - Pokemon *mon = Party_GetMonByIndex(data->playerParty, i); - data->savedHp[i] = GetMonData(mon, MON_DATA_MAXHP, NULL); - data->savedAtk[i] = GetMonData(mon, MON_DATA_ATK, NULL); - data->savedDef[i] = GetMonData(mon, MON_DATA_DEF, NULL); - data->savedSpd[i] = GetMonData(mon, MON_DATA_SPEED, NULL); + Pokemon *mon = Party_GetMonByIndex(data->playerParty, i); + data->savedHp[i] = GetMonData(mon, MON_DATA_MAXHP, NULL); + data->savedAtk[i] = GetMonData(mon, MON_DATA_ATK, NULL); + data->savedDef[i] = GetMonData(mon, MON_DATA_DEF, NULL); + data->savedSpd[i] = GetMonData(mon, MON_DATA_SPEED, NULL); data->savedSpAtk[i] = GetMonData(mon, MON_DATA_SPATK, NULL); data->savedSpDef[i] = GetMonData(mon, MON_DATA_SPDEF, NULL); } @@ -199,13 +199,13 @@ BOOL FrtCmd_ArcadeAction(FrontierContext *ctx) { int i; PlayerProfile *profile; - u32 action = FrontierScript_ReadShort(ctx); - u8 var0 = FrontierScript_ReadVar(ctx); - u8 var1 = FrontierScript_ReadVar(ctx); - u16 *out = FrontierScript_ReadVarPtr(ctx); - ArcadeContext *arcadeCtx = Frontier_GetData(ctx->frontierSystem->unk0); + u32 action = FrontierScript_ReadShort(ctx); + u8 var0 = FrontierScript_ReadVar(ctx); + u8 var1 = FrontierScript_ReadVar(ctx); + u16 *out = FrontierScript_ReadVarPtr(ctx); + ArcadeContext *arcadeCtx = Frontier_GetData(ctx->frontierSystem->unk0); FrontierLaunchParam *param = Frontier_GetLaunchParam(ctx->frontierSystem->unk0); - FrontierMap *frontierMap = FrontierSystem_GetFrontierMap(ctx->frontierSystem); + FrontierMap *frontierMap = FrontierSystem_GetFrontierMap(ctx->frontierSystem); switch (action) { case 2: @@ -277,15 +277,15 @@ BOOL FrtCmd_ArcadeAction(FrontierContext *ctx) { if (arcadeCtx->unk13 == 0x1b) { VecFx32 playerMatrix; VecFx32 opponentMatrix; - u8 playerMonCnt = BattleArcade_GetMonCount(arcadeCtx->type, 1); + u8 playerMonCnt = BattleArcade_GetMonCount(arcadeCtx->type, 1); u8 opponentMonCnt = BattleArcade_GetOpponentMonCount(arcadeCtx->type, 1); for (i = 0; i < playerMonCnt; i++) { Sprite *playerSprite = arcadeCtx->unk30[i]->sprite; - playerMatrix = *(Sprite_GetMatrixPtr(playerSprite)); + playerMatrix = *(Sprite_GetMatrixPtr(playerSprite)); Sprite *opponentSprite = arcadeCtx->unk40[i]->sprite; - opponentMatrix = *(Sprite_GetMatrixPtr(opponentSprite)); + opponentMatrix = *(Sprite_GetMatrixPtr(opponentSprite)); Sprite_SetMatrix(playerSprite, &opponentMatrix); Sprite_SetMatrix(opponentSprite, &playerMatrix); @@ -319,7 +319,7 @@ BOOL FrtCmd_ArcadeAction(FrontierContext *ctx) { case 31: ov80_02234A74(arcadeCtx, frontierMap, var0); - u8 playerMonCnt = BattleArcade_GetMonCount(arcadeCtx->type, 1); + u8 playerMonCnt = BattleArcade_GetMonCount(arcadeCtx->type, 1); u8 opponentMonCnt = BattleArcade_GetOpponentMonCount(arcadeCtx->type, 1); if (var0 == 0) { @@ -389,7 +389,7 @@ BOOL FrtCmd_ArcadeAction(FrontierContext *ctx) { PaletteData_BlendPalette(frontierMap->paletteData, PLTTBUF_MAIN_OBJ, 0, 0x100, var0, 0); } else { UnkStruct_02239938 *unkStruct = ov80_02239938(ctx->frontierSystem->unk0, var1); - u32 palNo = ov42_02229248(unkStruct->unk4); + u32 palNo = ov42_02229248(unkStruct->unk4); PaletteData_BlendPalette(frontierMap->paletteData, PLTTBUF_MAIN_OBJ, palNo * 0x10, 0x10, var0, 0); } break; @@ -420,7 +420,7 @@ BOOL FrtCmd_ArcadeAction(FrontierContext *ctx) { ov80_022383C0(arcadeCtx); break; case 51: - *out = arcadeCtx->unk1E; + *out = arcadeCtx->unk1E; arcadeCtx->unk1E = 1; break; case 52: @@ -440,7 +440,7 @@ extern const VecFx32 ov80_0223BE6C; //{-1, 0, 0} static void ov80_02233F40(SPLEmitter *emitter) { VecFx16 axis; ArcadeContext *ctx = sub_02015504(); - const VecFx32 pos = ov80_0223BE6C; + const VecFx32 pos = ov80_0223BE6C; if (ctx->unkA7A == 1) { sub_02015538(emitter, &axis); @@ -454,7 +454,7 @@ BOOL FrtCmd_ArcadeGetBattleResult(FrontierContext *ctx) { u16 *var = FrontierScript_ReadVarPtr(ctx); ArcadeContext *arcadeCtx = Frontier_GetData(ctx->frontierSystem->unk0); - *var = arcadeCtx->battleWon; + *var = arcadeCtx->battleWon; return FALSE; } @@ -465,7 +465,7 @@ BOOL FrtCmd_ArcadeSendBuffer(FrontierContext *ctx) { u16 *ret = FrontierScript_ReadVarPtr(ctx); ArcadeContext *arcadeContxt = Frontier_GetData(ctx->frontierSystem->unk0); - *ret = ov80_02234E50(arcadeContxt, unk0, unk1); + *ret = ov80_02234E50(arcadeContxt, unk0, unk1); return TRUE; } @@ -490,8 +490,8 @@ static BOOL ov80_02234028(FrontierContext *ctx) { BOOL FrtCmd_ArcadePrintMsg(FrontierContext *ctx) { FrontierLaunchParam *param = Frontier_GetLaunchParam(ctx->frontierSystem->unk0); - u8 index = FrontierScript_ReadShort(ctx); - ArcadeContext *arcadeCtx = Frontier_GetData(ctx->frontierSystem->unk0); + u8 index = FrontierScript_ReadShort(ctx); + ArcadeContext *arcadeCtx = Frontier_GetData(ctx->frontierSystem->unk0); if (arcadeCtx == NULL) { return FALSE; @@ -510,10 +510,10 @@ BOOL FrtCmd_ArcadeSetEvent(FrontierContext *ctx) { } BOOL FrtCmd_198(FrontierContext *ctx) { - FrontierMap *map = FrontierSystem_GetFrontierMap(ctx->frontierSystem); - u32 var0 = FrontierScript_ReadVar(ctx); - u32 var1 = FrontierScript_ReadVar(ctx); - u32 var2 = FrontierScript_ReadVar(ctx); + FrontierMap *map = FrontierSystem_GetFrontierMap(ctx->frontierSystem); + u32 var0 = FrontierScript_ReadVar(ctx); + u32 var1 = FrontierScript_ReadVar(ctx); + u32 var2 = FrontierScript_ReadVar(ctx); ArcadeContext *arcadeCtx = Frontier_GetData(ctx->frontierSystem->unk0); ov80_02234D04(arcadeCtx, map, var0, var1, var2); return FALSE; diff --git a/src/game_clear.c b/src/game_clear.c index e9c4197bb1..2aee658703 100644 --- a/src/game_clear.c +++ b/src/game_clear.c @@ -52,39 +52,39 @@ typedef struct { } GameClearWork; static const GraphicsBanks sGameClearSaveBanksConfig = { - .bg = GX_VRAM_BG_128_B, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_128_C, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_64_E, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_16_I, + .bg = GX_VRAM_BG_128_B, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_128_C, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_64_E, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_16_I, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_0_A, - .texpltt = GX_VRAM_TEXPLTT_01_FG, + .tex = GX_VRAM_TEX_0_A, + .texpltt = GX_VRAM_TEXPLTT_01_FG, }; static const struct GraphicsModes sGameClearSaveBgModeSet = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const BgTemplate sGameClearSaveBgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static BOOL Task_GameClear(TaskManager *taskman); @@ -97,7 +97,7 @@ static void GameClearSave_Free(FieldSystem *fieldSystem, GameClearWork *env); BOOL sub_0205298C(TaskManager *taskman) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - u32 *state = TaskManager_GetStatePtr(taskman); + u32 *state = TaskManager_GetStatePtr(taskman); switch (*state) { case 0: @@ -155,8 +155,8 @@ static void AddHallOfFameEntry(FieldSystem *fieldSystem, BOOL gameCleared) { // the game and launches the credits. static BOOL Task_GameClear(TaskManager *taskman) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - GameClearWork *env = TaskManager_GetEnvironment(taskman); - u32 *state = TaskManager_GetStatePtr(taskman); + GameClearWork *env = TaskManager_GetEnvironment(taskman); + u32 *state = TaskManager_GetStatePtr(taskman); switch (*state) { case 0: @@ -269,19 +269,19 @@ void CallTask_GameClear(TaskManager *taskman, u16 vsTrainerRed) { PlayerProfile *profile; fieldSystem = TaskManager_GetFieldSystem(taskman); - env = AllocFromHeap(HEAP_ID_32, sizeof(GameClearWork)); - varsFlags = Save_VarsFlags_Get(fieldSystem->saveData); - profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); + env = AllocFromHeap(HEAP_ID_32, sizeof(GameClearWork)); + varsFlags = Save_VarsFlags_Get(fieldSystem->saveData); + profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); dynamicWarp = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); - spawnWarp = LocalFieldData_GetSpecialSpawnWarpPtr(Save_LocalFieldData_Get(fieldSystem->saveData)); + spawnWarp = LocalFieldData_GetSpecialSpawnWarpPtr(Save_LocalFieldData_Get(fieldSystem->saveData)); - env->gameCleared = CheckGameClearFlag(varsFlags); + env->gameCleared = CheckGameClearFlag(varsFlags); env->hofCongratsArgs.profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - env->hofCongratsArgs.party = SaveArray_Party_Get(fieldSystem->saveData); - env->hofCongratsArgs.igt = Save_PlayerData_GetIGTAddr(fieldSystem->saveData); - env->creditsArgs.gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); + env->hofCongratsArgs.party = SaveArray_Party_Get(fieldSystem->saveData); + env->hofCongratsArgs.igt = Save_PlayerData_GetIGTAddr(fieldSystem->saveData); + env->creditsArgs.gender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); env->creditsArgs.gameCleared = CheckGameClearFlag(varsFlags); - env->vsTrainerRed = vsTrainerRed; + env->vsTrainerRed = vsTrainerRed; if (!CheckGameClearFlag(varsFlags)) { FieldSystem_SetGameClearTime(fieldSystem); @@ -300,8 +300,8 @@ void CallTask_GameClear(TaskManager *taskman, u16 vsTrainerRed) { } static void GameClearSave_InitGraphics(FieldSystem *fieldSystem, GameClearWork *env) { - env->bgConfig = BgConfig_Alloc(HEAP_ID_FIELD); - env->windowText = NULL; + env->bgConfig = BgConfig_Alloc(HEAP_ID_FIELD); + env->windowText = NULL; env->waitingIcon = NULL; InitWindow(&env->window); GfGfx_SetBanks(&sGameClearSaveBanksConfig); @@ -316,10 +316,10 @@ static void GameClearSave_InitGraphics(FieldSystem *fieldSystem, GameClearWork * static void GameClearSave_PrintSaving(FieldSystem *fieldSystem, GameClearWork *env) { Options *options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - env->windowText = ReadMsgData_NewNarc_NewString(NARC_msgdata_msg, NARC_msg_msg_0040_bin, msg_0040_00015, HEAP_ID_32); + env->windowText = ReadMsgData_NewNarc_NewString(NARC_msgdata_msg, NARC_msg_msg_0040_bin, msg_0040_00015, HEAP_ID_32); sub_0205B514(env->bgConfig, &env->window, 3); sub_0205B564(&env->window, options); - env->printerId = sub_0205B5B4(&env->window, env->windowText, options, 1); + env->printerId = sub_0205B5B4(&env->window, env->windowText, options, 1); env->waitingIcon = WaitingIcon_New(&env->window, 0x000003e2); } @@ -346,7 +346,7 @@ static void GameClearSave_PrintSaveStatus(FieldSystem *fieldSystem, GameClearWor } DestroyMsgData(msgData); Options *options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - env->printerId = sub_0205B5B4(&env->window, env->windowText, options, 1); + env->printerId = sub_0205B5B4(&env->window, env->windowText, options, 1); } static void GameClearSave_Free(FieldSystem *fieldSystem, GameClearWork *env) { diff --git a/src/get_egg.c b/src/get_egg.c index 043c203ba1..6f82331bfb 100644 --- a/src/get_egg.c +++ b/src/get_egg.c @@ -91,9 +91,9 @@ static void DaycareMon_CopyFromPartySlot(Party *party, int partyIdx, DaycareMon Pokemon *partyMon; const u16 *playerNamePtr; - partyMon = Party_GetMonByIndex(party, partyIdx); - daycareMail = DaycareMon_GetExtras(daycareMon); - boxMon = DaycareMon_GetBoxMon(daycareMon); + partyMon = Party_GetMonByIndex(party, partyIdx); + daycareMail = DaycareMon_GetExtras(daycareMon); + boxMon = DaycareMon_GetBoxMon(daycareMon); playerNamePtr = PlayerProfile_GetNamePtr(Save_PlayerData_GetProfileAddr(saveData)); GetMonData(partyMon, MON_DATA_NICKNAME_FLAT, nickname); if (BoxMonIsHoldingMail(Mon_GetBoxMon(partyMon))) { @@ -121,8 +121,8 @@ static void Save_Daycare_Compaction(Daycare *daycare) { BoxPokemon *boxmon1; BoxPokemon *boxmon2; - mon1 = Save_Daycare_GetMonX(daycare, 0); - mon2 = Save_Daycare_GetMonX(daycare, 1); + mon1 = Save_Daycare_GetMonX(daycare, 0); + mon2 = Save_Daycare_GetMonX(daycare, 1); boxmon1 = DaycareMon_GetBoxMon(mon1); boxmon2 = DaycareMon_GetBoxMon(mon2); @@ -162,8 +162,8 @@ static int Save_Daycare_MoveMonToParty(Party *party, DaycareMon *daycareMon, Mes DaycareMail *daycareMail; u16 species; - mon = AllocMonZeroed(HEAP_ID_4); - boxMon = DaycareMon_GetBoxMon(daycareMon); + mon = AllocMonZeroed(HEAP_ID_4); + boxMon = DaycareMon_GetBoxMon(daycareMon); daycareMail = DaycareMon_GetExtras(daycareMon); BufferBoxMonNickname(msgFmt, 0, boxMon); @@ -200,7 +200,7 @@ static int GetDaycareUpdatedLevel(BoxPokemon *boxMon, u32 steps) { u32 exp; u32 level; - tmpMon = AllocMonZeroed(HEAP_ID_FIELD); + tmpMon = AllocMonZeroed(HEAP_ID_FIELD); boxmon_tmp = Mon_GetBoxMon(tmpMon); CopyBoxPokemonToBoxPokemon(boxMon, boxmon_tmp); exp = GetBoxMonData(boxmon_tmp, MON_DATA_EXPERIENCE, NULL); @@ -216,7 +216,7 @@ int DaycareMon_CalcLevelGrowth(DaycareMon *daycareMon) { u8 cur_level; u8 new_level; - boxMon = DaycareMon_GetBoxMon(daycareMon); + boxMon = DaycareMon_GetBoxMon(daycareMon); cur_level = CalcBoxMonLevel(boxMon); new_level = GetDaycareUpdatedLevel(boxMon, DaycareMon_GetSteps(daycareMon)); return new_level - cur_level; @@ -226,7 +226,7 @@ static u8 DaycareMon_BufferLevelGrowthAndNick(DaycareMon *daycareMon, MessageFor BoxPokemon *boxMon; int levelGrowth; - boxMon = DaycareMon_GetBoxMon(daycareMon); + boxMon = DaycareMon_GetBoxMon(daycareMon); levelGrowth = DaycareMon_CalcLevelGrowth(daycareMon); BufferIntegerAsString(msgFmt, 1, levelGrowth, 3, PRINTING_MODE_LEFT_ALIGN, TRUE); BufferBoxMonNickname(msgFmt, 0, boxMon); @@ -237,7 +237,7 @@ static u16 DaycareMon_BufferNickAndRetrievalPrice(DaycareMon *daycareMon, Messag BoxPokemon *boxMon; u16 levelGrowth; u16 price; - boxMon = DaycareMon_GetBoxMon(daycareMon); + boxMon = DaycareMon_GetBoxMon(daycareMon); levelGrowth = DaycareMon_CalcLevelGrowth(daycareMon); BufferBoxMonNickname(msgFmt, 0, boxMon); price = (levelGrowth + 1) * 100; @@ -274,7 +274,7 @@ static int Daycare_EverstoneCheck(Daycare *dayCare) { Daycare_GetBothBoxMonsPtr(dayCare, boxmons); num_everstones = 0; - everstone_idx = 0; + everstone_idx = 0; for (i = 0; i < 2; i++) { if (GetBoxMonData(boxmons[i], MON_DATA_HELD_ITEM, NULL) == ITEM_EVERSTONE) { everstone_idx = i; @@ -361,14 +361,14 @@ static void InheritIVs(Pokemon *egg, Daycare *dayCare) { } if (Daycare_TryGetForcedInheritedIV(dayCare, &sp5, &sp4)) { sp10[0] = sp5; - r6 = 1; + r6 = 1; _IVList_Remove(spA, sp5); sp7[0] = sp4; } else { r6 = 0; } for (i = r6; i < 3; i++) { - j = (LCRandom() % (6 - i)); + j = (LCRandom() % (6 - i)); sp10[i] = spA[j]; _IVList_Remove(spA, j); } @@ -418,7 +418,7 @@ static u8 LoadEggMoves(Pokemon *mon, u16 *dest) { kowaza_list = GfGfxLoader_LoadFromNarc(NARC_fielddata_sodateya_kowaza_list, 0, FALSE, HEAP_ID_4, TRUE); - n = 0; + n = 0; offset = 0; species = GetMonData(mon, MON_DATA_SPECIES, NULL); @@ -457,11 +457,11 @@ static void InheritMoves(Pokemon *egg, BoxPokemon *father, BoxPokemon *mother) { struct EggMoveSearch *search; search = AllocFromHeap(HEAP_ID_4, sizeof(struct EggMoveSearch)); - sp1C = 0; + sp1C = 0; MI_CpuClearFast(search, sizeof(struct EggMoveSearch)); - egg_species = GetMonData(egg, MON_DATA_SPECIES, NULL); - egg_form = GetMonData(egg, MON_DATA_FORM, NULL); + egg_species = GetMonData(egg, MON_DATA_SPECIES, NULL); + egg_form = GetMonData(egg, MON_DATA_FORM, NULL); learnset_size = Species_LoadLearnsetTable(egg_species, egg_form, search->baby_learnset); for (i = 0; i < MAX_MON_MOVES; i++) { search->dad_moves[i] = GetBoxMonData(father, MON_DATA_MOVE1 + i, NULL); @@ -598,7 +598,7 @@ static u16 Daycare_GetEggSpecies(Daycare *dayCare, u8 *gender_idx) { } } mother = parent_species[gender_idx[0]]; - pms = ReadFromPersonalPmsNarc(mother); + pms = ReadFromPersonalPmsNarc(mother); if (pms == SPECIES_NIDORAN_F) { if (Save_Daycare_GetEggPID(dayCare) & 0x8000) { pms = SPECIES_NIDORAN_M; @@ -617,7 +617,7 @@ static u16 Daycare_GetEggSpecies(Daycare *dayCare, u8 *gender_idx) { pms = SPECIES_PHIONE; } if (parent_species[gender_idx[1]] == SPECIES_DITTO && GetBoxMonGender(parents[gender_idx[0]]) != MON_FEMALE) { - swp = gender_idx[1]; + swp = gender_idx[1]; gender_idx[1] = gender_idx[0]; gender_idx[0] = swp; } @@ -652,9 +652,9 @@ void SetEggStats(Pokemon *mon, int species, u8 metLocation, PlayerProfile *profi SetMonData(mon, MON_DATA_NICKNAME_STRING, name); String_Delete(name); if (trainerMemoStrat == 4) { - otId = PlayerProfile_GetTrainerID(profile); + otId = PlayerProfile_GetTrainerID(profile); gender = PlayerProfile_GetTrainerGender(profile); - name = PlayerProfile_GetPlayerName_NewString(profile, HEAP_ID_32); + name = PlayerProfile_GetPlayerName_NewString(profile, HEAP_ID_32); SetMonData(mon, MON_DATA_OT_NAME_2, name); SetMonData(mon, MON_DATA_OTID, &otId); SetMonData(mon, MON_DATA_MET_GENDER, &gender); @@ -672,7 +672,7 @@ static void SetBreedEggStats(Pokemon *mon, u16 species, Daycare *dayCare, u32 ot int i; friendship = GetMonBaseStat(species, BASE_EGG_CYCLES); - pid = Save_Daycare_GetEggPID(dayCare); + pid = Save_Daycare_GetEggPID(dayCare); if (Save_Daycare_MasudaCheck(dayCare)) { if (!CalcShininessByOtIdAndPersonality(otId, pid)) { for (i = 0; i < 4; i++) { @@ -705,10 +705,10 @@ void GiveEggToPlayer(Daycare *dayCare, Party *party, PlayerProfile *profile) { u32 otId; u8 mom_form; - mon = AllocMonZeroed(HEAP_ID_4); - species = Daycare_GetEggSpecies(dayCare, gender_idx); - species = Daycare_BreedingIncenseCheck(species, dayCare); - otId = PlayerProfile_GetTrainerID(profile); + mon = AllocMonZeroed(HEAP_ID_4); + species = Daycare_GetEggSpecies(dayCare, gender_idx); + species = Daycare_BreedingIncenseCheck(species, dayCare); + otId = PlayerProfile_GetTrainerID(profile); mom_form = GetBoxMonData(Daycare_GetBoxMonI(dayCare, gender_idx[0]), MON_DATA_FORM, NULL); SetBreedEggStats(mon, species, dayCare, otId, mom_form); InheritIVs(mon, dayCare); @@ -761,9 +761,9 @@ static u8 ComputeCompatibilityBetweenBoxMons(BoxPokemon **parents) { u32 i; for (i = 0; i < 2; i++) { - species[i] = GetBoxMonData(parents[i], MON_DATA_SPECIES, NULL); - otIds[i] = GetBoxMonData(parents[i], MON_DATA_OTID, NULL); - genders[i] = GetGenderBySpeciesAndPersonality(species[i], GetBoxMonData(parents[i], MON_DATA_PERSONALITY, NULL)); + species[i] = GetBoxMonData(parents[i], MON_DATA_SPECIES, NULL); + otIds[i] = GetBoxMonData(parents[i], MON_DATA_OTID, NULL); + genders[i] = GetGenderBySpeciesAndPersonality(species[i], GetBoxMonData(parents[i], MON_DATA_PERSONALITY, NULL)); eggGroups[i][0] = GetMonBaseStat(species[i], BASE_EGG_GROUP_1); eggGroups[i][1] = GetMonBaseStat(species[i], BASE_EGG_GROUP_2); } @@ -939,7 +939,7 @@ void Save_Daycare_BufferMonStats(Daycare *dayCare, u32 nickname_idx, u32 level_i u16 species; daycareMon = Save_Daycare_GetMonX(dayCare, slot); - boxMon = Daycare_GetBoxMonI(dayCare, slot); + boxMon = Daycare_GetBoxMonI(dayCare, slot); BufferBoxMonNickname(msgFmt, nickname_idx, boxMon); level = GetDaycareUpdatedLevel(boxMon, DaycareMon_GetSteps(daycareMon)); @@ -961,8 +961,8 @@ u16 Save_Daycare_BufferTailMonNick(Daycare *dayCare, MessageFormat *msgFmt) { u16 species1; u16 species2; - boxMon1 = DaycareMon_GetBoxMon(Save_Daycare_GetMonX(dayCare, 0)); - boxMon2 = DaycareMon_GetBoxMon(Save_Daycare_GetMonX(dayCare, 1)); + boxMon1 = DaycareMon_GetBoxMon(Save_Daycare_GetMonX(dayCare, 0)); + boxMon2 = DaycareMon_GetBoxMon(Save_Daycare_GetMonX(dayCare, 1)); species1 = GetBoxMonData(boxMon1, MON_DATA_SPECIES, NULL); species2 = GetBoxMonData(boxMon2, MON_DATA_SPECIES, NULL); if (species2 == SPECIES_NONE) { @@ -1028,26 +1028,26 @@ static void sub_0206D038(Pokemon *mon, HeapID heapId) { u32 pid; Pokemon *tmpMon; - string = String_New(PLAYER_NAME_LENGTH + 1, heapId); - tmpMon = AllocMonZeroed(heapId); + string = String_New(PLAYER_NAME_LENGTH + 1, heapId); + tmpMon = AllocMonZeroed(heapId); species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); for (i = 0; i < MAX_MON_MOVES; i++) { moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); - pp[i] = GetMonData(mon, MON_DATA_MOVE1PP + i, NULL); + pp[i] = GetMonData(mon, MON_DATA_MOVE1PP + i, NULL); } pid = GetMonData(mon, MON_DATA_PERSONALITY, NULL); for (i = 0; i < NUM_STATS; i++) { ivs[i] = GetMonData(mon, MON_DATA_HP_IV + i, NULL); } language = GetMonData(mon, MON_DATA_GAME_LANGUAGE, NULL); - version = GetMonData(mon, MON_DATA_GAME_VERSION, NULL); + version = GetMonData(mon, MON_DATA_GAME_VERSION, NULL); markings = GetMonData(mon, MON_DATA_MARKINGS, NULL); - pokerus = GetMonData(mon, MON_DATA_POKERUS, NULL); - fateful = GetMonData(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL); + pokerus = GetMonData(mon, MON_DATA_POKERUS, NULL); + fateful = GetMonData(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL); GetMonData(mon, MON_DATA_OT_NAME_2, string); otGender = GetMonData(mon, MON_DATA_MET_GENDER, NULL); - otId = GetMonData(mon, MON_DATA_OTID, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); + otId = GetMonData(mon, MON_DATA_OTID, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (species == SPECIES_MANAPHY && GetMonData(mon, MON_DATA_EGG_MET_LOCATION, NULL) == sub_02017FE4(MAPSECTYPE_EXTERNAL, 1)) { if (CalcShininessByOtIdAndPersonality(otId, pid)) { do { @@ -1074,18 +1074,18 @@ static void sub_0206D038(Pokemon *mon, HeapID heapId) { SetMonData(tmpMon, MON_DATA_MET_GENDER, &otGender); SetMonData(tmpMon, MON_DATA_OTID, &otId); SetMonData(tmpMon, MON_DATA_FORM, &form); - metLoc = GetMonData(mon, MON_DATA_EGG_MET_LOCATION, NULL); - metYear = GetMonData(mon, MON_DATA_EGG_MET_YEAR, NULL); + metLoc = GetMonData(mon, MON_DATA_EGG_MET_LOCATION, NULL); + metYear = GetMonData(mon, MON_DATA_EGG_MET_YEAR, NULL); metMonth = GetMonData(mon, MON_DATA_EGG_MET_MONTH, NULL); - metDay = GetMonData(mon, MON_DATA_EGG_MET_DAY, NULL); + metDay = GetMonData(mon, MON_DATA_EGG_MET_DAY, NULL); SetMonData(tmpMon, MON_DATA_EGG_MET_LOCATION, &metLoc); SetMonData(tmpMon, MON_DATA_EGG_MET_YEAR, &metYear); SetMonData(tmpMon, MON_DATA_EGG_MET_MONTH, &metMonth); SetMonData(tmpMon, MON_DATA_EGG_MET_DAY, &metDay); - metLoc = GetMonData(mon, MON_DATA_MET_LOCATION, NULL); - metYear = GetMonData(mon, MON_DATA_MET_YEAR, NULL); + metLoc = GetMonData(mon, MON_DATA_MET_LOCATION, NULL); + metYear = GetMonData(mon, MON_DATA_MET_YEAR, NULL); metMonth = GetMonData(mon, MON_DATA_MET_MONTH, NULL); - metDay = GetMonData(mon, MON_DATA_MET_DAY, NULL); + metDay = GetMonData(mon, MON_DATA_MET_DAY, NULL); SetMonData(tmpMon, MON_DATA_MET_LOCATION, &metLoc); SetMonData(tmpMon, MON_DATA_MET_YEAR, &metYear); SetMonData(tmpMon, MON_DATA_MET_MONTH, &metMonth); @@ -1097,10 +1097,10 @@ static void sub_0206D038(Pokemon *mon, HeapID heapId) { void sub_0206D328(Pokemon *mon, HeapID heapId) { u16 nickname[POKEMON_NAME_LENGTH + 1]; - u8 isEgg = 70; + u8 isEgg = 70; u8 hasNickname = FALSE; - u8 pokeball = BALL_POKE; - u8 metLevel = 0; + u8 pokeball = BALL_POKE; + u8 metLevel = 0; sub_0206D038(mon, heapId); SetMonData(mon, MON_DATA_IS_EGG, &isEgg); GetSpeciesNameIntoArray(GetMonData(mon, MON_DATA_SPECIES, NULL), HEAP_ID_DEFAULT, nickname); @@ -1115,7 +1115,7 @@ static BOOL Daycare_TryGetForcedInheritedIV(Daycare *dayCare, u8 *a1, u8 *a2) { u8 sp8[2]; u8 i, n, r7; - n = 0; + n = 0; r7 = 0; for (i = 0; i < 2; i++) { if (PowerItemIdToInheritedIvIdx(GetBoxMonData(Daycare_GetBoxMonI(dayCare, i), MON_DATA_HELD_ITEM, NULL), &sp8[i])) { diff --git a/src/gf_3d_render.c b/src/gf_3d_render.c index 44df735952..709f5f3b28 100644 --- a/src/gf_3d_render.c +++ b/src/gf_3d_render.c @@ -18,7 +18,7 @@ static void getFirstMdlFromSet(NNSG3dResMdl **ppMdl, NNSG3dResFileHeader **ppHea } NNSG3dResMdlSet *mdlSet = NNS_G3dGetMdlSet(*ppHeader); - *ppMdl = NNS_G3dGetMdlByIdx(mdlSet, 0); + *ppMdl = NNS_G3dGetMdlByIdx(mdlSet, 0); } void GF3dRender_InitObjFromHeader(NNSG3dRenderObj *obj, NNSG3dResMdl **p_mdl, NNSG3dResFileHeader **p_header) { @@ -80,18 +80,18 @@ BOOL GF3dRender_AllocAndLoadTexResources(NNSG3dResTex *tex) { u32 texRequiredSize; u32 tex4x4RequiredSize; u32 plttRequiredSize; - BOOL hasTexVram = TRUE; + BOOL hasTexVram = TRUE; BOOL hasTex4x4Vram = TRUE; - BOOL hasPlttVram = TRUE; + BOOL hasPlttVram = TRUE; NNSGfdTexKey texKey; NNSGfdTexKey tex4x4Key; NNSGfdPlttKey plttKey; if (tex != NULL) { - texRequiredSize = NNS_G3dTexGetRequiredSize(tex); + texRequiredSize = NNS_G3dTexGetRequiredSize(tex); tex4x4RequiredSize = NNS_G3dTex4x4GetRequiredSize(tex); - plttRequiredSize = NNS_G3dPlttGetRequiredSize(tex); + plttRequiredSize = NNS_G3dPlttGetRequiredSize(tex); if (texRequiredSize != 0) { texKey = NNS_GfdAllocTexVram(texRequiredSize, FALSE, 0); diff --git a/src/gf_3d_vramman.c b/src/gf_3d_vramman.c index 6aa7e883d1..01b9e029c8 100644 --- a/src/gf_3d_vramman.c +++ b/src/gf_3d_vramman.c @@ -13,21 +13,21 @@ GF3DVramMan *GF_3DVramMan_Create(HeapID heapId, int texMode, int numTex, int plt GF3DVramMan *ret; u32 texWorkSz, pltWorkSz; - ret = AllocFromHeap(heapId, sizeof(GF3DVramMan)); + ret = AllocFromHeap(heapId, sizeof(GF3DVramMan)); ret->heapId = heapId; NNS_G3dInit(); G3X_InitMtxStack(); G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W); if (texMode == GF_3D_TEXALLOC_LNK) { - texWorkSz = NNS_GfdGetLnkTexVramManagerWorkSize(numTex * GF_3D_MEM_BLOCK_PER_TEX); + texWorkSz = NNS_GfdGetLnkTexVramManagerWorkSize(numTex * GF_3D_MEM_BLOCK_PER_TEX); ret->texWork = AllocFromHeap(ret->heapId, texWorkSz); GF_3DVramMan_InitLinkedListTexVramManager(numTex * GF_3D_TEX_SLOT_SIZE, 0, ret->texWork, texWorkSz, TRUE); } else { GF_3DVramMan_InitFrameTexVramManager(numTex, TRUE); } if (plttMode == GF_3D_PLTTALLOC_LNK) { - pltWorkSz = NNS_GfdGetLnkPlttVramManagerWorkSize(numPltt * GF_3D_MEM_BLOCK_PER_PLTT); + pltWorkSz = NNS_GfdGetLnkPlttVramManagerWorkSize(numPltt * GF_3D_MEM_BLOCK_PER_PLTT); ret->plttWork = AllocFromHeap(ret->heapId, pltWorkSz); GF_3DVramMan_InitLinkedListPlttVramManager(numPltt * GF_3D_PLTT_SLOT_SIZE, ret->plttWork, pltWorkSz, TRUE); } else { diff --git a/src/gf_gfx_loader.c b/src/gf_gfx_loader.c index f4bf8c4ee0..4b484f3aff 100644 --- a/src/gf_gfx_loader.c +++ b/src/gf_gfx_loader.c @@ -354,7 +354,7 @@ void bar() { #pragma require_prototypes on static u32 GfGfxLoader_LoadImageMappingInternal(void *data, int layout, u32 szByte, NNS_G2D_VRAM_TYPE type, u32 baseAddr, NNSG2dImageProxy *pImgProxy) { - u32 size = 0; + u32 size = 0; static void (*const _020F5950[])(const NNSG2dCharacterData *pSrcData, u32 baseAddr, NNS_G2D_VRAM_TYPE type, NNSG2dImageProxy *pImgProxy) = { NNS_G2dLoadImage1DMapping, NNS_G2dLoadImage2DMapping, diff --git a/src/gf_rtc.c b/src/gf_rtc.c index a0480b2d86..82987d4dc1 100644 --- a/src/gf_rtc.c +++ b/src/gf_rtc.c @@ -36,8 +36,8 @@ void GF_InitRTCWork(void) { RTC_Init(); memset(&sRTCWork, 0, sizeof(sRTCWork)); sRTCWork.getDateTimeSuccess = FALSE; - sRTCWork.getDateTimeLock = FALSE; - sRTCWork.getDateTimeSleep = 0; + sRTCWork.getDateTimeLock = FALSE; + sRTCWork.getDateTimeSleep = 0; GF_RTC_GetDateTime(&sRTCWork); GF_RTC_UnfreezeTimeInternal(&sRTCWork); } @@ -50,24 +50,24 @@ void GF_RTC_UpdateOnFrame(void) { } static void GF_RTC_GetDateTime_Callback(RTCResult result, void *arg) { - struct GFRtcWork *work = arg; + struct GFRtcWork *work = arg; work->getDateTimeErrorCode = result; GF_ASSERT(result == RTC_RESULT_SUCCESS); work->getDateTimeSuccess = TRUE; - work->date = work->date_async; - work->time = work->time_async; - work->getDateTimeLock = FALSE; + work->date = work->date_async; + work->time = work->time_async; + work->getDateTimeLock = FALSE; } static void GF_RTC_GetDateTime(struct GFRtcWork *work) { - work->getDateTimeLock = TRUE; + work->getDateTimeLock = TRUE; work->getDateTimeErrorCode = RTC_GetDateTimeAsync(&work->date_async, &work->time_async, GF_RTC_GetDateTime_Callback, work); GF_ASSERT(work->getDateTimeErrorCode == RTC_RESULT_SUCCESS); } static void GF_RTC_SetAndFreezeTimeInternal(struct GFRtcWork *work, s32 hour, s32 minute) { - work->frozenTimeState = 3; - work->frozenTime.hour = hour; + work->frozenTimeState = 3; + work->frozenTime.hour = hour; work->frozenTime.minute = minute; } diff --git a/src/gymmick_init.c b/src/gymmick_init.c index 994bb1fde5..b1f7706a15 100644 --- a/src/gymmick_init.c +++ b/src/gymmick_init.c @@ -19,16 +19,16 @@ typedef struct TrashCan { } TrashCan; static const TrashCan sTrashCans[NUM_TRASH_CANS] = { - [0] = { .numNeighbors = 2, .neighbors = { 1, 5, 0xFF, 0xFF } }, - [1] = { .numNeighbors = 3, .neighbors = { 0, 2, 6, 0xFF } }, - [2] = { .numNeighbors = 3, .neighbors = { 1, 3, 7, 0xFF } }, - [3] = { .numNeighbors = 3, .neighbors = { 2, 4, 8, 0xFF } }, - [4] = { .numNeighbors = 2, .neighbors = { 3, 9, 0xFF, 0xFF } }, - [5] = { .numNeighbors = 3, .neighbors = { 0, 6, 10, 0xFF } }, - [6] = { .numNeighbors = 4, .neighbors = { 1, 5, 7, 11 } }, - [7] = { .numNeighbors = 4, .neighbors = { 2, 6, 8, 12 } }, - [8] = { .numNeighbors = 4, .neighbors = { 3, 7, 9, 13 } }, - [9] = { .numNeighbors = 3, .neighbors = { 4, 8, 14, 0xFF } }, + [0] = { .numNeighbors = 2, .neighbors = { 1, 5, 0xFF, 0xFF } }, + [1] = { .numNeighbors = 3, .neighbors = { 0, 2, 6, 0xFF } }, + [2] = { .numNeighbors = 3, .neighbors = { 1, 3, 7, 0xFF } }, + [3] = { .numNeighbors = 3, .neighbors = { 2, 4, 8, 0xFF } }, + [4] = { .numNeighbors = 2, .neighbors = { 3, 9, 0xFF, 0xFF } }, + [5] = { .numNeighbors = 3, .neighbors = { 0, 6, 10, 0xFF } }, + [6] = { .numNeighbors = 4, .neighbors = { 1, 5, 7, 11 } }, + [7] = { .numNeighbors = 4, .neighbors = { 2, 6, 8, 12 } }, + [8] = { .numNeighbors = 4, .neighbors = { 3, 7, 9, 13 } }, + [9] = { .numNeighbors = 3, .neighbors = { 4, 8, 14, 0xFF } }, [10] = { .numNeighbors = 2, .neighbors = { 5, 11, 0xFF, 0xFF } }, [11] = { .numNeighbors = 3, .neighbors = { 6, 10, 12, 0xFF } }, [12] = { .numNeighbors = 3, .neighbors = { 7, 11, 13, 0xFF } }, @@ -61,8 +61,8 @@ void InitVermilionGym(FieldSystem *fieldSystem) { if (PlayerProfile_TestBadgeFlag(Save_PlayerData_GetProfileAddr(fieldSystem->saveData), BADGE_THUNDER)) { data->vermilion.switches[0] = 0; data->vermilion.switches[1] = 0; - data->vermilion.gates[0] = 1; - data->vermilion.gates[1] = 1; + data->vermilion.gates[0] = 1; + data->vermilion.gates[1] = 1; return; } @@ -72,12 +72,12 @@ void InitVermilionGym(FieldSystem *fieldSystem) { } void PlaceVermilionGymSwitches(FieldSystem *fieldSystem) { - Gymmick *gymmick = Save_GetGymmickPtr(FieldSystem_GetSaveData(fieldSystem)); - GymmickUnion *data = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_VERMILION); + Gymmick *gymmick = Save_GetGymmickPtr(FieldSystem_GetSaveData(fieldSystem)); + GymmickUnion *data = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_VERMILION); data->vermilion.switches[0] = LCRandom() % NUM_TRASH_CANS; - const TrashCan *trashCan = &sTrashCans[data->vermilion.switches[0]]; - u8 index = LCRandom() % trashCan->numNeighbors; + const TrashCan *trashCan = &sTrashCans[data->vermilion.switches[0]]; + u8 index = LCRandom() % trashCan->numNeighbors; data->vermilion.switches[1] = trashCan->neighbors[index]; } @@ -85,7 +85,7 @@ void InitVioletGym(FieldSystem *fieldSystem) { Gymmick *gymmick = Save_GetGymmickPtr(FieldSystem_GetSaveData(fieldSystem)); Save_Gymmick_Init(gymmick, GYMMICK_VIOLET); - GymmickUnion *data = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_VIOLET); + GymmickUnion *data = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_VIOLET); data->violet.liftState = 0; } @@ -93,12 +93,12 @@ void InitAzaleaGym(FieldSystem *fieldSystem) { Gymmick *gymmick = Save_GetGymmickPtr(FieldSystem_GetSaveData(fieldSystem)); Save_Gymmick_Init(gymmick, GYMMICK_AZALEA); - GymmickUnion *data = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_AZALEA); + GymmickUnion *data = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_AZALEA); data->azalea.spiders[0] = 0; data->azalea.spiders[1] = 1; data->azalea.spiders[2] = 2; data->azalea.spiders[3] = 7; - data->azalea.switches = 0; + data->azalea.switches = 0; } void InitBlackthornGym(FieldSystem *fieldSystem) { @@ -107,16 +107,16 @@ void InitBlackthornGym(FieldSystem *fieldSystem) { GymmickUnion *data = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_BLACKTHORN); - data->blackthorn.x[0] = 13; - data->blackthorn.z[0] = 75; + data->blackthorn.x[0] = 13; + data->blackthorn.z[0] = 75; data->blackthorn.rot[0] = 0; - data->blackthorn.x[1] = 9; - data->blackthorn.z[1] = 58; + data->blackthorn.x[1] = 9; + data->blackthorn.z[1] = 58; data->blackthorn.rot[1] = 1; - data->blackthorn.x[2] = 14; - data->blackthorn.z[2] = 32; + data->blackthorn.x[2] = 14; + data->blackthorn.z[2] = 32; data->blackthorn.rot[2] = 0; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index b2cbe19a76..c0f942c6fb 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -29,8 +29,8 @@ void Save_HOF_Init(HallOfFame *hof) { void Save_HOF_RecordParty(HallOfFame *hof, Party *party, RTCDate *date) { ASSERT_HALL_OF_FAME(hof); if (hof->num_total < 9999) { - HOFTEAM *team = &hof->parties[hof->next_record]; - int npokes = Party_GetCount(party); + HOFTEAM *team = &hof->parties[hof->next_record]; + int npokes = Party_GetCount(party); String *string = String_New(POKEMON_NAME_LENGTH + 1, HEAP_ID_DEFAULT); int i, j; @@ -38,17 +38,17 @@ void Save_HOF_RecordParty(HallOfFame *hof, Party *party, RTCDate *date) { for (i = 0, j = 0; i < npokes; i++) { Pokemon *mon = Party_GetMonByIndex(party, i); - BOOL lock = AcquireMonLock(mon); + BOOL lock = AcquireMonLock(mon); if (!GetMonData(mon, MON_DATA_IS_EGG, NULL)) { - team->party[j].species = GetMonData(mon, MON_DATA_SPECIES, NULL); - team->party[j].level = GetMonData(mon, MON_DATA_LEVEL, NULL); - team->party[j].form = GetMonData(mon, MON_DATA_FORM, NULL); + team->party[j].species = GetMonData(mon, MON_DATA_SPECIES, NULL); + team->party[j].level = GetMonData(mon, MON_DATA_LEVEL, NULL); + team->party[j].form = GetMonData(mon, MON_DATA_FORM, NULL); team->party[j].personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); - team->party[j].otid = GetMonData(mon, MON_DATA_OTID, NULL); - team->party[j].moves[0] = GetMonData(mon, MON_DATA_MOVE1, NULL); - team->party[j].moves[1] = GetMonData(mon, MON_DATA_MOVE2, NULL); - team->party[j].moves[2] = GetMonData(mon, MON_DATA_MOVE3, NULL); - team->party[j].moves[3] = GetMonData(mon, MON_DATA_MOVE4, NULL); + team->party[j].otid = GetMonData(mon, MON_DATA_OTID, NULL); + team->party[j].moves[0] = GetMonData(mon, MON_DATA_MOVE1, NULL); + team->party[j].moves[1] = GetMonData(mon, MON_DATA_MOVE2, NULL); + team->party[j].moves[2] = GetMonData(mon, MON_DATA_MOVE3, NULL); + team->party[j].moves[3] = GetMonData(mon, MON_DATA_MOVE4, NULL); if (string != NULL) { GetMonData(mon, MON_DATA_NICKNAME_STRING, string); CopyStringToU16Array(string, team->party[j].nickname, POKEMON_NAME_LENGTH + 1); @@ -56,15 +56,15 @@ void Save_HOF_RecordParty(HallOfFame *hof, Party *party, RTCDate *date) { CopyStringToU16Array(string, team->party[j].otname, PLAYER_NAME_LENGTH + 1); } else { team->party[j].nickname[0] = EOS; - team->party[j].otname[0] = EOS; + team->party[j].otname[0] = EOS; } j++; } ReleaseMonLock(mon, lock); } - team->year = date->year; + team->year = date->year; team->month = date->month; - team->day = date->day; + team->day = date->day; hof->next_record++; if (hof->next_record >= NUM_HOF_RECORDS) { hof->next_record = 0; @@ -114,13 +114,13 @@ void Save_HOF_GetMonStatsByIndexPair(HallOfFame *hallOfFame, int teamNum, int mo ASSERT_HALL_OF_FAME(hallOfFame); GF_ASSERT(teamNum < NUM_HOF_RECORDS); team = HallOfFame_SeekBack(hallOfFame, teamNum); - mon = &team->party[monNum]; + mon = &team->party[monNum]; - dest->species = mon->species; - dest->level = mon->level; + dest->species = mon->species; + dest->level = mon->level; dest->personality = mon->personality; - dest->otid = mon->otid; - dest->form = mon->form; + dest->otid = mon->otid; + dest->form = mon->form; CopyU16ArrayToString(dest->nickname, mon->nickname); CopyU16ArrayToString(dest->otname, mon->otname); for (i = 0; i < 4; i++) { @@ -132,9 +132,9 @@ void Save_HOF_GetClearDate(HallOfFame *hof, int num, RTCDate *dest) { HOFTEAM *party; ASSERT_HALL_OF_FAME(hof); GF_ASSERT(num < NUM_HOF_RECORDS); - party = HallOfFame_SeekBack(hof, num); - dest->year = party->year; + party = HallOfFame_SeekBack(hof, num); + dest->year = party->year; dest->month = party->month; - dest->day = party->day; - dest->week = RTC_WEEK_SUNDAY; + dest->day = party->day; + dest->week = RTC_WEEK_SUNDAY; } diff --git a/src/hatch_egg_task.c b/src/hatch_egg_task.c index 5a5427143d..8df88de949 100644 --- a/src/hatch_egg_task.c +++ b/src/hatch_egg_task.c @@ -26,9 +26,9 @@ typedef struct HatchEggTaskData { FS_EXTERN_OVERLAY(OVY_95); static const OVY_MGR_TEMPLATE sApplication_HatchEgg = { - .init = HatchEggApp_Init, - .exec = HatchEggApp_Main, - .exit = HatchEggApp_Exit, + .init = HatchEggApp_Init, + .exec = HatchEggApp_Main, + .exit = HatchEggApp_Exit, .ovy_id = FS_OVERLAY_ID(OVY_95), }; @@ -47,8 +47,8 @@ static BOOL Task_HatchEggInParty(TaskManager *taskManager) { break; case HATCHEGGTASKSTATE_UPDATE_MON_INFO: { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - Pokemon *pokemon = data->unkC.mon; - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); + Pokemon *pokemon = data->unkC.mon; + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); u32 mapsec = MapHeader_GetMapSec(fieldSystem->location->mapId); BOOL isEgg = FALSE; @@ -69,11 +69,11 @@ static BOOL Task_HatchEggInParty(TaskManager *taskManager) { case HATCHEGGTASKSTATE_OPEN_NAMING_SCREEN: { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - u32 species = GetMonData(data->unkC.mon, MON_DATA_SPECIES, NULL); - Options *options = Save_PlayerData_GetOptionsAddr(FieldSystem_GetSaveData(fieldSystem)); - data->namingScreenArgs = NamingScreen_CreateArgs(HEAP_ID_FIELD, NAME_SCREEN_POKEMON, species, POKEMON_NAME_LENGTH, options, NULL); + u32 species = GetMonData(data->unkC.mon, MON_DATA_SPECIES, NULL); + Options *options = Save_PlayerData_GetOptionsAddr(FieldSystem_GetSaveData(fieldSystem)); + data->namingScreenArgs = NamingScreen_CreateArgs(HEAP_ID_FIELD, NAME_SCREEN_POKEMON, species, POKEMON_NAME_LENGTH, options, NULL); data->namingScreenArgs->monGender = GetMonData(data->unkC.mon, MON_DATA_GENDER, NULL); - data->namingScreenArgs->monForm = GetMonData(data->unkC.mon, MON_DATA_FORM, NULL); + data->namingScreenArgs->monForm = GetMonData(data->unkC.mon, MON_DATA_FORM, NULL); CallApplicationAsTask(taskManager, &gOverlayTemplate_NamingScreen, data->namingScreenArgs); data->state++; diff --git a/src/heap.c b/src/heap.c index 53f28433b4..f10fc1329c 100644 --- a/src/heap.c +++ b/src/heap.c @@ -20,7 +20,7 @@ struct HeapInfo { typedef struct MemoryBlock { u8 filler_00[12]; - u32 heapId : 8; + u32 heapId : 8; u32 filler_0D : 24; } MemoryBlock; @@ -56,14 +56,14 @@ void InitHeapSystem(const HEAP_PARAM *templates, u32 nTemplates, u32 totalNumHea + totalNumHeaps, 4); sHeapInfo.parentHeapHandles = sHeapInfo.heapHandles + (unk_size + 1); - sHeapInfo.subHeapRawPtrs = (void **)(sHeapInfo.parentHeapHandles + unk_size); - sHeapInfo.numMemBlocks = (u16 *)(sHeapInfo.subHeapRawPtrs + unk_size); - sHeapInfo.heapIdxs = (u8 *)(sHeapInfo.numMemBlocks + totalNumHeaps); - sHeapInfo.totalNumHeaps = (u16)totalNumHeaps; - sHeapInfo.nTemplates = (u16)nTemplates; + sHeapInfo.subHeapRawPtrs = (void **)(sHeapInfo.parentHeapHandles + unk_size); + sHeapInfo.numMemBlocks = (u16 *)(sHeapInfo.subHeapRawPtrs + unk_size); + sHeapInfo.heapIdxs = (u8 *)(sHeapInfo.numMemBlocks + totalNumHeaps); + sHeapInfo.totalNumHeaps = (u16)totalNumHeaps; + sHeapInfo.nTemplates = (u16)nTemplates; sHeapInfo.unallocatedHeapId = (u16)unk_size; - sHeapInfo.maxHeaps = (u16)unk_size; + sHeapInfo.maxHeaps = (u16)unk_size; for (i = 0; i < nTemplates; i++) { switch (templates[i].arena) { @@ -79,7 +79,7 @@ void InitHeapSystem(const HEAP_PARAM *templates, u32 nTemplates, u32 totalNumHea if (ptr != NULL) { sHeapInfo.heapHandles[i] = NNS_FndCreateExpHeap(ptr, templates[i].size); - sHeapInfo.heapIdxs[i] = (u8)i; + sHeapInfo.heapIdxs[i] = (u8)i; } else { GF_ASSERT(0); } @@ -87,7 +87,7 @@ void InitHeapSystem(const HEAP_PARAM *templates, u32 nTemplates, u32 totalNumHea for (i = nTemplates; i < unk_size + 1; i++) { sHeapInfo.heapHandles[i] = NULL; - sHeapInfo.heapIdxs[i] = (u8)sHeapInfo.unallocatedHeapId; + sHeapInfo.heapIdxs[i] = (u8)sHeapInfo.unallocatedHeapId; } while (i < totalNumHeaps) { @@ -136,8 +136,8 @@ static BOOL CreateHeapInternal(HeapID parent, HeapID child, u32 size, s32 alignm if (sHeapInfo.heapHandles[i] != NULL) { sHeapInfo.parentHeapHandles[i] = parentHeap; - sHeapInfo.subHeapRawPtrs[i] = newHeapAddr; - sHeapInfo.heapIdxs[child] = (u8)i; + sHeapInfo.subHeapRawPtrs[i] = newHeapAddr; + sHeapInfo.heapIdxs[child] = (u8)i; return TRUE; } else { @@ -166,18 +166,18 @@ void DestroyHeap(HeapID heapId) { if (handle != NULL) { NNS_FndDestroyExpHeap(handle); - u8 index = sHeapInfo.heapIdxs[heapId]; + u8 index = sHeapInfo.heapIdxs[heapId]; NNSFndHeapHandle parentHeap = sHeapInfo.parentHeapHandles[index]; - void *childRaw = sHeapInfo.subHeapRawPtrs[index]; + void *childRaw = sHeapInfo.subHeapRawPtrs[index]; if (parentHeap != NULL && childRaw != NULL) { NNS_FndFreeToExpHeap(parentHeap, childRaw); } else { GF_ASSERT(0); } - sHeapInfo.heapHandles[sHeapInfo.heapIdxs[heapId]] = NULL; + sHeapInfo.heapHandles[sHeapInfo.heapIdxs[heapId]] = NULL; sHeapInfo.parentHeapHandles[sHeapInfo.heapIdxs[heapId]] = NULL; - sHeapInfo.subHeapRawPtrs[sHeapInfo.heapIdxs[heapId]] = NULL; + sHeapInfo.subHeapRawPtrs[sHeapInfo.heapIdxs[heapId]] = NULL; sHeapInfo.heapIdxs[heapId] = (u8)sHeapInfo.unallocatedHeapId; } @@ -210,7 +210,7 @@ void *AllocFromHeap(HeapID heapId, u32 size) { void *ptr = NULL; if (((u32)heapId) < sHeapInfo.totalNumHeaps) { u8 index = sHeapInfo.heapIdxs[heapId]; - ptr = AllocFromHeapInternal(sHeapInfo.heapHandles[index], size, 4, heapId); + ptr = AllocFromHeapInternal(sHeapInfo.heapHandles[index], size, 4, heapId); } if (ptr != NULL) { sHeapInfo.numMemBlocks[heapId]++; @@ -225,7 +225,7 @@ void *AllocFromHeapAtEnd(HeapID heapId, u32 size) { void *ptr = NULL; if (((u32)heapId) < sHeapInfo.totalNumHeaps) { u8 index = sHeapInfo.heapIdxs[heapId]; - ptr = AllocFromHeapInternal(sHeapInfo.heapHandles[index], size, -4, heapId); + ptr = AllocFromHeapInternal(sHeapInfo.heapHandles[index], size, -4, heapId); } if (ptr != NULL) { @@ -242,7 +242,7 @@ void FreeToHeap(void *ptr) { HeapID heapId = (HeapID)((MemoryBlock *)ptr)->heapId; if (((u32)heapId) < sHeapInfo.totalNumHeaps) { - u8 index = sHeapInfo.heapIdxs[heapId]; + u8 index = sHeapInfo.heapIdxs[heapId]; NNSFndHeapHandle heap = sHeapInfo.heapHandles[index]; GF_ASSERT(heap != NULL); @@ -265,7 +265,7 @@ void FreeToHeapExplicit(HeapID heapId, void *ptr) { GF_ASSERT(OS_GetProcMode() != OS_PROCMODE_IRQ); if (((u32)heapId) < sHeapInfo.totalNumHeaps) { - u8 index = sHeapInfo.heapIdxs[heapId]; + u8 index = sHeapInfo.heapIdxs[heapId]; NNSFndHeapHandle heap = sHeapInfo.heapHandles[index]; GF_ASSERT(heap != NULL); diff --git a/src/igt.c b/src/igt.c index f904152b1c..cc2b210c3b 100644 --- a/src/igt.c +++ b/src/igt.c @@ -3,7 +3,7 @@ #include "global.h" void InitIGT(struct IGT *igt) { - igt->hours = 0; + igt->hours = 0; igt->minutes = 0; igt->seconds = 0; } @@ -15,7 +15,7 @@ void AddIGTSeconds(struct IGT *igt, u32 seconds_to_add) { u32 seconds = igt->seconds + seconds_to_add; u32 minutes = igt->minutes; - u32 hours = igt->hours; + u32 hours = igt->hours; if (seconds > 59) { minutes += seconds / 60; seconds %= 60; @@ -28,14 +28,14 @@ void AddIGTSeconds(struct IGT *igt, u32 seconds_to_add) { #else if (hours >= 999) { #endif // BUGFIX_IGT_MAX - hours = 999; + hours = 999; minutes = 59; seconds = 59; } } } - igt->hours = hours; + igt->hours = hours; igt->minutes = minutes; igt->seconds = seconds; } diff --git a/src/intro_movie.c b/src/intro_movie.c index c0d199a00b..6839713577 100644 --- a/src/intro_movie.c +++ b/src/intro_movie.c @@ -63,9 +63,9 @@ static BOOL IntroMovie_Init(OVY_MANAGER *man, int *state) { IntroMovieOverlayData *data = OverlayManager_CreateAndGetData(man, sizeof(IntroMovieOverlayData), HEAP_ID_INTRO_MOVIE); memset(data, 0, sizeof(IntroMovieOverlayData)); - data->heapID = HEAP_ID_INTRO_MOVIE; - data->introSkipped = FALSE; - data->skipAllowed = FALSE; + data->heapID = HEAP_ID_INTRO_MOVIE; + data->introSkipped = FALSE; + data->skipAllowed = FALSE; gSystem.screensFlipped = TRUE; GfGfx_SwapDisplay(); data->savedLCRngSeed = GetLCRNGSeed(); @@ -80,7 +80,7 @@ static BOOL IntroMovie_Main(OVY_MANAGER *man, int *state) { IntroMovieOverlayData *data = OverlayManager_GetData(man); if (data->skipAllowed && ((gSystem.newKeys & PAD_BUTTON_A) || (gSystem.newKeys & PAD_BUTTON_START) || gSystem.touchNew)) { data->introSkipped = TRUE; - gSystem.unk70 = FALSE; + gSystem.unk70 = FALSE; sub_0200FBF4(PM_LCD_TOP, RGB_WHITE); sub_0200FBF4(PM_LCD_BOTTOM, RGB_WHITE); } @@ -94,7 +94,7 @@ static BOOL IntroMovie_Main(OVY_MANAGER *man, int *state) { case INTRO_MOVIE_RUN: if (sIntroMovieSceneFuncs[data->sceneNumber](data, IntroMovie_GetSceneDataPtr(data))) { ++data->sceneNumber; - data->sceneStep = 0; + data->sceneStep = 0; data->sceneTimer = 0; if (data->sceneNumber >= 5) { ++(*state); diff --git a/src/intro_movie_scene_1.c b/src/intro_movie_scene_1.c index 267d38fdc5..760e717c22 100644 --- a/src/intro_movie_scene_1.c +++ b/src/intro_movie_scene_1.c @@ -89,9 +89,9 @@ static void IntroMovie_Scene1_Init(IntroMovieOverlayData *data, IntroMovieScene1 } static BOOL IntroMovie_Scene1_Main(IntroMovieOverlayData *data, IntroMovieScene1Data *sceneData, int totalFrames) { - BgConfig *bgConfig = IntroMovie_GetBgConfig(data); + BgConfig *bgConfig = IntroMovie_GetBgConfig(data); IntroMovieBgLinearAnims *bgAnimCnt = IntroMovie_GetBgLinearAnimsController(data); - u8 timer = IntroMovie_GetSceneStepTimer(data); + u8 timer = IntroMovie_GetSceneStepTimer(data); switch (IntroMovie_GetSceneStep(data)) { case INTRO_SCENE1_APPEAR_COPYRIGHT: // Copyright appear BgSetPosTextAndCommit(bgConfig, GF_BG_LYR_MAIN_0, BG_POS_OP_SET_Y, 128); @@ -313,10 +313,10 @@ static void IntroMovie_Scene1_SetBrightnessAndBgMaskColor(IntroMovieOverlayData static void IntroMovie_Scene1_LoadSpriteGfx(IntroMovieOverlayData *data, IntroMovieScene1Data *sceneData) { IntroMovie_CreateSpriteResourceManagers(data, sIntroMovieScene1SpriteResCounts); GF_2DGfxResMan **ppMgr = IntroMovie_GetSpriteResourceManagersArray(data); - sceneData->charResObj = AddCharResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_CHAR], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_CHARRES, TRUE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_INTRO_MOVIE); - sceneData->plttResObj = AddPlttResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_PLTT], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_PLTTRES, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 2, HEAP_ID_INTRO_MOVIE); - sceneData->cellResObj = AddCellOrAnimResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_CELL], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_CELLRES, TRUE, 1, GF_GFX_RES_TYPE_CELL, HEAP_ID_INTRO_MOVIE); - sceneData->animResObj = AddCellOrAnimResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_ANIM], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_ANIMRES, TRUE, 1, GF_GFX_RES_TYPE_ANIM, HEAP_ID_INTRO_MOVIE); + sceneData->charResObj = AddCharResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_CHAR], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_CHARRES, TRUE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_INTRO_MOVIE); + sceneData->plttResObj = AddPlttResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_PLTT], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_PLTTRES, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 2, HEAP_ID_INTRO_MOVIE); + sceneData->cellResObj = AddCellOrAnimResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_CELL], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_CELLRES, TRUE, 1, GF_GFX_RES_TYPE_CELL, HEAP_ID_INTRO_MOVIE); + sceneData->animResObj = AddCellOrAnimResObjFromNarc(ppMgr[GF_GFX_RES_TYPE_ANIM], NARC_demo_opening_gs_opening, INTRO_MOVIE_SCENE1_BIRD_ANIMRES, TRUE, 1, GF_GFX_RES_TYPE_ANIM, HEAP_ID_INTRO_MOVIE); sub_0200ACF0(sceneData->charResObj); sub_0200AF94(sceneData->plttResObj); GfGfx_EngineATogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); @@ -337,7 +337,7 @@ static void IntroMovie_Scene1_CreateSprites(IntroMovieOverlayData *data, IntroMo IntroMovie_BuildSpriteResourcesHeaderAndTemplate(1, data, 1, NNS_G2D_VRAM_TYPE_2DMAIN, &spriteTemplate, &spriteResourcesHeader); spriteTemplate.position.x = 128 * FX32_ONE; spriteTemplate.position.y = 96 * FX32_ONE; - sceneData->sunSprite = Sprite_CreateAffine(&spriteTemplate); + sceneData->sunSprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sceneData->sunSprite, FALSE); Sprite_SetVisibleFlag(sceneData->sunSprite, FALSE); Sprite_SetAnimCtrlSeq(sceneData->sunSprite, 0); @@ -345,7 +345,7 @@ static void IntroMovie_Scene1_CreateSprites(IntroMovieOverlayData *data, IntroMo IntroMovie_BuildSpriteResourcesHeaderAndTemplate(1, data, 0, NNS_G2D_VRAM_TYPE_2DMAIN, &spriteTemplate, &spriteResourcesHeader); spriteTemplate.position.x = 128 * FX32_ONE; spriteTemplate.position.y = 96 * FX32_ONE; - sceneData->birdSprite = Sprite_CreateAffine(&spriteTemplate); + sceneData->birdSprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sceneData->birdSprite, FALSE); Sprite_SetVisibleFlag(sceneData->birdSprite, FALSE); Sprite_SetAnimCtrlSeq(sceneData->birdSprite, 1); diff --git a/src/intro_movie_scene_2.c b/src/intro_movie_scene_2.c index f320966c22..b62e83836a 100644 --- a/src/intro_movie_scene_2.c +++ b/src/intro_movie_scene_2.c @@ -112,9 +112,9 @@ static void IntroMovie_Scene2_InitFlyoverGrassBgScrollAnims(IntroMovieOverlayDat } static BOOL IntroMovie_Scene2_Main(IntroMovieOverlayData *data, IntroMovieScene2Data *sceneData, int totalFrames) { - BgConfig *bgConfig = IntroMovie_GetBgConfig(data); + BgConfig *bgConfig = IntroMovie_GetBgConfig(data); IntroMovieBgLinearAnims *bgAnimCnt = IntroMovie_GetBgLinearAnimsController(data); - u8 stepTimer = IntroMovie_GetSceneStepTimer(data); + u8 stepTimer = IntroMovie_GetSceneStepTimer(data); switch (IntroMovie_GetSceneStep(data)) { case INTRO_SCENE2_START_FLYIN: BeginNormalPaletteFade(0, 1, 1, RGB_WHITE, 3, 1, HEAP_ID_INTRO_MOVIE); @@ -192,7 +192,7 @@ static void IntroMovie_Scene2_Exit(IntroMovieOverlayData *data, IntroMovieScene2 IntroMovieBgLinearAnims *bgAnimCnt; bgAnimCnt = IntroMovie_GetBgLinearAnimsController(data); - bgConfig = IntroMovie_GetBgConfig(data); + bgConfig = IntroMovie_GetBgConfig(data); Main_SetVBlankIntrCB(NULL, NULL); if (sceneData->needFreeGfx) { for (u8 i = 0; i < 2; ++i) { @@ -268,7 +268,7 @@ static void IntroMovie_Scene2_LoadBgGfx(BgConfig *bgConfig) { static void IntroMovie_Scene2_LoadSpriteGfx(IntroMovieOverlayData *data, IntroMovieScene2Data *sceneData) { IntroMovie_CreateSpriteResourceManagers(data, sIntroMovieScene2SpriteResCounts); - GF_2DGfxResMan **resMen = IntroMovie_GetSpriteResourceManagersArray(data); + GF_2DGfxResMan **resMen = IntroMovie_GetSpriteResourceManagersArray(data); sceneData->spriteGfxRes[0][GF_GFX_RES_TYPE_CHAR] = AddCharResObjFromNarc(resMen[GF_GFX_RES_TYPE_CHAR], NARC_demo_opening_gs_opening, NARC_gs_opening_gs_opening_00000078_NCGR_lz, TRUE, 0, NNS_G2D_VRAM_TYPE_2DBOTH, HEAP_ID_INTRO_MOVIE); sceneData->spriteGfxRes[0][GF_GFX_RES_TYPE_PLTT] = AddPlttResObjFromNarc(resMen[GF_GFX_RES_TYPE_PLTT], NARC_demo_opening_gs_opening, NARC_gs_opening_gs_opening_00000077_NCLR, FALSE, 0, NNS_G2D_VRAM_TYPE_2DBOTH, 1, HEAP_ID_INTRO_MOVIE); sceneData->spriteGfxRes[0][GF_GFX_RES_TYPE_CELL] = AddCellOrAnimResObjFromNarc(resMen[GF_GFX_RES_TYPE_CELL], NARC_demo_opening_gs_opening, NARC_gs_opening_gs_opening_00000080_NCER_lz, TRUE, 0, GF_GFX_RES_TYPE_CELL, HEAP_ID_INTRO_MOVIE); @@ -332,7 +332,7 @@ static void IntroMovie_Scene2_CreateSprites(IntroMovieOverlayData *data, IntroMo IntroMovie_BuildSpriteResourcesHeaderAndTemplate(1, data, 1, NNS_G2D_VRAM_TYPE_2DMAIN, &spriteTemplate, &spriteHeader); spriteTemplate.position.x = 64 * FX32_ONE; spriteTemplate.position.y = -96 * FX32_ONE; - sceneData->ethanSprite0 = Sprite_CreateAffine(&spriteTemplate); + sceneData->ethanSprite0 = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sceneData->ethanSprite0, FALSE); Sprite_SetVisibleFlag(sceneData->ethanSprite0, TRUE); Sprite_SetAnimCtrlSeq(sceneData->ethanSprite0, 0); @@ -348,7 +348,7 @@ static void IntroMovie_Scene2_CreateSprites(IntroMovieOverlayData *data, IntroMo IntroMovie_BuildSpriteResourcesHeaderAndTemplate(1, data, 1, NNS_G2D_VRAM_TYPE_2DMAIN, &spriteTemplate, &spriteHeader); spriteTemplate.position.x = 320 * FX32_ONE; spriteTemplate.position.y = -96 * FX32_ONE; - sceneData->lyraSprite0 = Sprite_CreateAffine(&spriteTemplate); + sceneData->lyraSprite0 = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(sceneData->lyraSprite0, FALSE); Sprite_SetVisibleFlag(sceneData->lyraSprite0, TRUE); Sprite_SetAnimCtrlSeq(sceneData->lyraSprite0, 3); @@ -366,27 +366,27 @@ static void IntroMovie_Scene2_StartSpritePanEffect(IntroMovieScene2Data *sceneDa IntroMovieScene2SpritePanController *spritePanEffect; if (whichSprites == 0) { - spritePanEffect = &sceneData->spritePanCnt[0]; + spritePanEffect = &sceneData->spritePanCnt[0]; spritePanEffect->sprite0 = sceneData->ethanSprite0; spritePanEffect->sprite1 = sceneData->ethanSprite1; spritePanEffect->sprite2 = sceneData->ethanSprite2; } else { - spritePanEffect = &sceneData->spritePanCnt[1]; + spritePanEffect = &sceneData->spritePanCnt[1]; spritePanEffect->sprite0 = sceneData->lyraSprite0; spritePanEffect->sprite1 = sceneData->lyraSprite1; spritePanEffect->sprite2 = sceneData->lyraSprite2; } GF_ASSERT(!spritePanEffect->active); - spritePanEffect->active = TRUE; + spritePanEffect->active = TRUE; spritePanEffect->duration = duration; - spritePanEffect->counter = 0; + spritePanEffect->counter = 0; spritePanEffect->finished = 0; - VecFx32 *mtx = Sprite_GetMatrixPtr(spritePanEffect->sprite0); - spritePanEffect->xOffset = mtx->x / FX32_ONE; - spritePanEffect->yOffset = mtx->y / FX32_ONE; - spritePanEffect->xSpeed = xSpeed; - spritePanEffect->ySpeed = ySpeed; - spritePanEffect->task = SysTask_CreateOnMainQueue(ov60_021E8B7C, spritePanEffect, 0); + VecFx32 *mtx = Sprite_GetMatrixPtr(spritePanEffect->sprite0); + spritePanEffect->xOffset = mtx->x / FX32_ONE; + spritePanEffect->yOffset = mtx->y / FX32_ONE; + spritePanEffect->xSpeed = xSpeed; + spritePanEffect->ySpeed = ySpeed; + spritePanEffect->task = SysTask_CreateOnMainQueue(ov60_021E8B7C, spritePanEffect, 0); } static BOOL IntroMovie_Scene2_WaitSpritePanEffect(IntroMovieScene2Data *sceneData, int whichSprites) { @@ -409,7 +409,7 @@ static BOOL IntroMovie_Scene2_WaitSpritePanEffect(IntroMovieScene2Data *sceneDat static void ov60_021E8B7C(SysTask *task, void *pVoid) { IntroMovieScene2SpritePanController *spritePanCnt = (IntroMovieScene2SpritePanController *)pVoid; - VecFx32 sp4 = { 0, 0, 0 }; + VecFx32 sp4 = { 0, 0, 0 }; ++spritePanCnt->counter; int x = spritePanCnt->xSpeed * spritePanCnt->counter / spritePanCnt->duration; int y = spritePanCnt->ySpeed * spritePanCnt->counter / spritePanCnt->duration; @@ -417,9 +417,9 @@ static void ov60_021E8B7C(SysTask *task, void *pVoid) { y += spritePanCnt->yOffset; if (spritePanCnt->counter >= spritePanCnt->duration) { SysTask_Destroy(spritePanCnt->task); - spritePanCnt->task = NULL; + spritePanCnt->task = NULL; spritePanCnt->finished = TRUE; - spritePanCnt->active = FALSE; + spritePanCnt->active = FALSE; } sp4.x = x * FX32_ONE; sp4.y = y * FX32_ONE; diff --git a/src/intro_movie_scene_3.c b/src/intro_movie_scene_3.c index 886c68caad..f3477bf71f 100644 --- a/src/intro_movie_scene_3.c +++ b/src/intro_movie_scene_3.c @@ -213,9 +213,9 @@ static void IntroMovie_Scene3_Show2DGfx(IntroMovieScene3Data *sceneData, BgConfi static BOOL IntroMovie_Scene3_Main(IntroMovieOverlayData *data, IntroMovieScene3Data *sceneData, int totalFrames) { u8 stepTimer; - BgConfig *bgConfig = IntroMovie_GetBgConfig(data); + BgConfig *bgConfig = IntroMovie_GetBgConfig(data); IntroMovieBgLinearAnims *bgAnimCnt = IntroMovie_GetBgLinearAnimsController(data); - stepTimer = IntroMovie_GetSceneStepTimer(data); + stepTimer = IntroMovie_GetSceneStepTimer(data); IntroMovie_Scene3_Animate3DMap(sceneData); switch (IntroMovie_GetSceneStep(data)) { case INTRO_SCENE3_LOAD_NEWBARK: @@ -600,20 +600,20 @@ static void IntroMovie_Scene3_UnloadOBJGraphics(IntroMovieOverlayData *data, Int static void IntroMovie_Scene3_CreateSprites(IntroMovieOverlayData *data, IntroMovieScene3Data *sceneData) { SpriteResourcesHeader header; SpriteTemplate template; - int unownSpriteYcoords[3] = { 544, 672, 608 }; + int unownSpriteYcoords[3] = { 544, 672, 608 }; int unownSpriteAnimSeqNos[3] = { 1, 2, 3 }; IntroMovie_BuildSpriteResourcesHeaderAndTemplate(2, data, 0, NNS_G2D_VRAM_TYPE_2DSUB, &template, &header); - template.position.x = 128 * FX32_ONE; - template.position.y = 608 * FX32_ONE; + template.position.x = 128 * FX32_ONE; + template.position.y = 608 * FX32_ONE; sceneData->silverSilhouetteSprite = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(sceneData->silverSilhouetteSprite, FALSE); Sprite_SetVisibleFlag(sceneData->silverSilhouetteSprite, FALSE); Sprite_SetAnimCtrlSeq(sceneData->silverSilhouetteSprite, 0); IntroMovie_BuildSpriteResourcesHeaderAndTemplate(3, data, 0, NNS_G2D_VRAM_TYPE_2DSUB, &template, &header); - template.position.x = 32 * FX32_ONE; - template.position.y = 608 * FX32_ONE; + template.position.x = 32 * FX32_ONE; + template.position.y = 608 * FX32_ONE; sceneData->eusineSprite = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(sceneData->eusineSprite, FALSE); Sprite_SetVisibleFlag(sceneData->eusineSprite, FALSE); @@ -621,8 +621,8 @@ static void IntroMovie_Scene3_CreateSprites(IntroMovieOverlayData *data, IntroMo for (int i = 0; i < 3; ++i) { IntroMovie_BuildSpriteResourcesHeaderAndTemplate(3, data, 0, NNS_G2D_VRAM_TYPE_2DSUB, &template, &header); - template.position.x = 128 * FX32_ONE; - template.position.y = unownSpriteYcoords[i] * FX32_ONE; + template.position.x = 128 * FX32_ONE; + template.position.y = unownSpriteYcoords[i] * FX32_ONE; sceneData->unownSprites[i] = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(sceneData->unownSprites[i], FALSE); Sprite_SetVisibleFlag(sceneData->unownSprites[i], FALSE); @@ -645,8 +645,8 @@ static void IntroMovie_Scene3_Load3dGfxData(IntroMovieScene3Data *sceneData) { NNS_G3dMdlUseGlbEmi(pMdl); NNS_G3dMdlUseGlbLightEnableFlag(pMdl); for (j = 0; j < 2; ++j) { - sceneData->mapRender[i].rawData[j] = NARC_AllocAndReadWholeMember(narc, sMap3dObjFileIds[i][j], HEAP_ID_INTRO_MOVIE); - NNSG3dAnmObj *animObj = NNS_G3dGetAnmByIdx(sceneData->mapRender[i].rawData[j], 0); + sceneData->mapRender[i].rawData[j] = NARC_AllocAndReadWholeMember(narc, sMap3dObjFileIds[i][j], HEAP_ID_INTRO_MOVIE); + NNSG3dAnmObj *animObj = NNS_G3dGetAnmByIdx(sceneData->mapRender[i].rawData[j], 0); sceneData->mapRender[i].animObjs[j] = NNS_G3dAllocAnmObj(&sceneData->allocator, animObj, pMdl); NNS_G3dAnmObjInit(sceneData->mapRender[i].animObjs[j], animObj, pMdl, resTex); NNS_G3dRenderObjAddAnmObj(&sceneData->mapRender[i].renderObj, sceneData->mapRender[i].animObjs[j]); @@ -684,7 +684,7 @@ static void IntroMovie_Scene3_Animate3DMap(IntroMovieScene3Data *sceneData) { 0, FX32_ONE, }; - VecFx32 ones = { FX32_ONE, FX32_ONE, FX32_ONE }; + VecFx32 ones = { FX32_ONE, FX32_ONE, FX32_ONE }; VecFx32 zeros = { 0, 0, 0 }; int whichMap_i = sceneData->whichMap; diff --git a/src/intro_movie_scene_4.c b/src/intro_movie_scene_4.c index d4261877ad..420b3d16d3 100644 --- a/src/intro_movie_scene_4.c +++ b/src/intro_movie_scene_4.c @@ -114,7 +114,7 @@ static void IntroMovie_Scene4_Init(IntroMovieOverlayData *data, IntroMovieScene4 IntroMovie_Scene4_CreateSprites(data, sceneData); sceneData->gf3dVramMan = GF_3DVramMan_Create(HEAP_ID_INTRO_MOVIE, 0, 1, 0, 4, IntroMovie_Scene4_3DVRamManInit); sub_02014DA0(); - sceneData->particleHeap = AllocFromHeap(HEAP_ID_INTRO_MOVIE, 0x4800); + sceneData->particleHeap = AllocFromHeap(HEAP_ID_INTRO_MOVIE, 0x4800); sceneData->particleSystem = sub_02014DB4(IntroMovie_Scene4_TexAlloc, IntroMovie_Scene4_PlttAlloc, sceneData->particleHeap, 0x4800, TRUE, HEAP_ID_INTRO_MOVIE); Camera_SetPerspectiveClippingPlane(FX32_CONST(1), FX32_CONST(900), sub_02015524(sceneData->particleSystem)); sub_0201526C(sceneData->particleSystem, sub_02015264(NARC_a_0_5_9, 4, HEAP_ID_INTRO_MOVIE), 0x0A, TRUE); @@ -124,9 +124,9 @@ static void IntroMovie_Scene4_Init(IntroMovieOverlayData *data, IntroMovieScene4 } static BOOL IntroMovie_Scene4_Main(IntroMovieOverlayData *data, IntroMovieScene4Data *sceneData, int totalFrames) { - BgConfig *bgConfig = IntroMovie_GetBgConfig(data); + BgConfig *bgConfig = IntroMovie_GetBgConfig(data); IntroMovieBgLinearAnims *animCnt = IntroMovie_GetBgLinearAnimsController(data); - u8 stepTimer = IntroMovie_GetSceneStepTimer(data); + u8 stepTimer = IntroMovie_GetSceneStepTimer(data); switch (IntroMovie_GetSceneStep(data)) { case INTRO_SCENE4_FADE_IN: BeginNormalPaletteFade(0, 9, 9, RGB_BLACK, 10, 1, HEAP_ID_INTRO_MOVIE); @@ -401,14 +401,14 @@ static void IntroMovie_Scene4_LoadSpriteGfx(IntroMovieOverlayData *data, IntroMo GF_2DGfxResMan **resMen; IntroMovie_CreateSpriteResourceManagers(data, sIntroMovieScene4SpriteResCounts); - resMen = IntroMovie_GetSpriteResourceManagersArray(data); + resMen = IntroMovie_GetSpriteResourceManagersArray(data); sceneData->spriteResObjs[0][GF_GFX_RES_TYPE_CHAR] = AddCharResObjFromNarc(resMen[GF_GFX_RES_TYPE_CHAR], NARC_demo_opening_gs_opening, NARC_gs_opening_gs_opening_00000082_NCGR_lz, TRUE, 0, NNS_G2D_VRAM_TYPE_2DBOTH, HEAP_ID_INTRO_MOVIE); sceneData->spriteResObjs[0][GF_GFX_RES_TYPE_PLTT] = AddPlttResObjFromNarc(resMen[GF_GFX_RES_TYPE_PLTT], NARC_demo_opening_gs_opening, NARC_gs_opening_gs_opening_00000081_NCLR, FALSE, 0, NNS_G2D_VRAM_TYPE_2DBOTH, 2, HEAP_ID_INTRO_MOVIE); sceneData->spriteResObjs[0][GF_GFX_RES_TYPE_CELL] = AddCellOrAnimResObjFromNarc(resMen[GF_GFX_RES_TYPE_CELL], NARC_demo_opening_gs_opening, NARC_gs_opening_gs_opening_00000084_NCER_lz, TRUE, 0, GF_GFX_RES_TYPE_CELL, HEAP_ID_INTRO_MOVIE); sceneData->spriteResObjs[0][GF_GFX_RES_TYPE_ANIM] = AddCellOrAnimResObjFromNarc(resMen[GF_GFX_RES_TYPE_ANIM], NARC_demo_opening_gs_opening, NARC_gs_opening_gs_opening_00000083_NANR_lz, TRUE, 0, GF_GFX_RES_TYPE_ANIM, HEAP_ID_INTRO_MOVIE); for (i = 0; i < 3; ++i) { - s32 id = sp18[i]; + s32 id = sp18[i]; sceneData->spriteResObjs[i + 1][GF_GFX_RES_TYPE_CHAR] = AddCharResObjFromNarc(resMen[GF_GFX_RES_TYPE_CHAR], NARC_demo_opening_gs_opening, monSpriteChar[i], TRUE, id, NNS_G2D_VRAM_TYPE_2DMAIN, HEAP_ID_INTRO_MOVIE); sceneData->spriteResObjs[i + 1][GF_GFX_RES_TYPE_PLTT] = AddPlttResObjFromNarc(resMen[GF_GFX_RES_TYPE_PLTT], NARC_demo_opening_gs_opening, monSpritePltt[i], FALSE, id, NNS_G2D_VRAM_TYPE_2DMAIN, 1, HEAP_ID_INTRO_MOVIE); sceneData->spriteResObjs[i + 1][GF_GFX_RES_TYPE_CELL] = AddCellOrAnimResObjFromNarc(resMen[GF_GFX_RES_TYPE_CELL], NARC_demo_opening_gs_opening, monSpriteCell[i], TRUE, id, GF_GFX_RES_TYPE_CELL, HEAP_ID_INTRO_MOVIE); @@ -444,24 +444,24 @@ static void IntroMovie_Scene4_CreateSprites(IntroMovieOverlayData *data, IntroMo int monSpriteResIds[3] = { 1, 2, 3 }; IntroMovie_BuildSpriteResourcesHeaderAndTemplate(0, data, 0, NNS_G2D_VRAM_TYPE_2DSUB, &template, &header); - template.position.x = FX32_ONE * 128; - template.position.y = FX32_ONE * (0x100 + 96); + template.position.x = FX32_ONE * 128; + template.position.y = FX32_ONE * (0x100 + 96); sceneData->hand1Sprite = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(sceneData->hand1Sprite, FALSE); Sprite_SetVisibleFlag(sceneData->hand1Sprite, FALSE); Sprite_SetAnimCtrlSeq(sceneData->hand1Sprite, 0); IntroMovie_BuildSpriteResourcesHeaderAndTemplate(0, data, 0, NNS_G2D_VRAM_TYPE_2DMAIN, &template, &header); - template.position.x = FX32_ONE * 128; - template.position.y = FX32_ONE * 96; + template.position.x = FX32_ONE * 128; + template.position.y = FX32_ONE * 96; sceneData->hand2Sprite = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(sceneData->hand2Sprite, FALSE); Sprite_SetVisibleFlag(sceneData->hand2Sprite, FALSE); Sprite_SetAnimCtrlSeq(sceneData->hand2Sprite, 1); IntroMovie_BuildSpriteResourcesHeaderAndTemplate(0, data, 0, NNS_G2D_VRAM_TYPE_2DMAIN, &template, &header); - template.position.x = FX32_ONE * 128; - template.position.y = FX32_ONE * 96; + template.position.x = FX32_ONE * 128; + template.position.y = FX32_ONE * 96; sceneData->sparklesSprite = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(sceneData->sparklesSprite, FALSE); Sprite_SetVisibleFlag(sceneData->sparklesSprite, FALSE); @@ -469,8 +469,8 @@ static void IntroMovie_Scene4_CreateSprites(IntroMovieOverlayData *data, IntroMo for (u8 i = 0; i < 3; ++i) { IntroMovie_BuildSpriteResourcesHeaderAndTemplate(monSpriteResIds[i], data, 0, NNS_G2D_VRAM_TYPE_2DMAIN, &template, &header); - template.position.x = FX32_ONE * 128; - template.position.y = FX32_ONE * 96; + template.position.x = FX32_ONE * 128; + template.position.y = FX32_ONE * 96; sceneData->starterSprites[i] = Sprite_CreateAffine(&template); Sprite_SetAnimActiveFlag(sceneData->starterSprites[i], FALSE); Sprite_SetVisibleFlag(sceneData->starterSprites[i], FALSE); @@ -529,7 +529,7 @@ static void IntroMovie_Scene4_3DVRamManInit(void) { static void IntroMovie_Scene4_FlipScreensAtNextVBlank(IntroMovieScene4Data *sceneData, int whichScreen) { sceneData->flipScreensTaskArg = whichScreen; - sceneData->flipScreensTask = SysTask_CreateOnVBlankQueue(Task_IntroMovie_Scene4_FlipScreens, sceneData, 0); + sceneData->flipScreensTask = SysTask_CreateOnVBlankQueue(Task_IntroMovie_Scene4_FlipScreens, sceneData, 0); } static void Task_IntroMovie_Scene4_FlipScreens(SysTask *task, void *pVoid) { diff --git a/src/intro_movie_scene_5.c b/src/intro_movie_scene_5.c index 6b731eabd0..f4ae70c47c 100644 --- a/src/intro_movie_scene_5.c +++ b/src/intro_movie_scene_5.c @@ -60,7 +60,7 @@ static void IntroMovie_Scene5_VBlankCB(void *pVoid) { } static void IntroMovie_Scene5_Init(IntroMovieOverlayData *data, IntroMovieScene5Data *sceneData) { - BgConfig *bgConfig = IntroMovie_GetBgConfig(data); + BgConfig *bgConfig = IntroMovie_GetBgConfig(data); gSystem.screensFlipped = TRUE; GfGfx_SwapDisplay(); sub_0200FBF4(PM_LCD_TOP, RGB_BLACK); @@ -83,9 +83,9 @@ static void IntroMovie_Scene5_Init(IntroMovieOverlayData *data, IntroMovieScene5 #endif static BOOL IntroMovie_Scene5_Main(IntroMovieOverlayData *data, IntroMovieScene5Data *sceneData, int totalFrames) { - BgConfig *bgConfig = IntroMovie_GetBgConfig(data); + BgConfig *bgConfig = IntroMovie_GetBgConfig(data); IntroMovieBgLinearAnims *animCnt = IntroMovie_GetBgLinearAnimsController(data); - u8 stepTimer = IntroMovie_GetSceneStepTimer(data); + u8 stepTimer = IntroMovie_GetSceneStepTimer(data); switch (IntroMovie_GetSceneStep(data)) { case INTRO_SCENE5_WIPE_IN: BeginNormalPaletteFade(1, 9, 5, RGB_BLACK, 18, 1, HEAP_ID_INTRO_MOVIE); @@ -149,72 +149,72 @@ static void IntroMovie_Scene5_InitBgs(IntroMovieOverlayData *data) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_1, &bgTemplate, 0); } { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x512_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x512, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x512, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0800, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_2, &bgTemplate, 0); } { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_SUB_1, &bgTemplate, 0); } { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x512_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x512, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x512, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0800, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_SUB_2, &bgTemplate, 0); } diff --git a/src/intro_movie_scenes_lib.c b/src/intro_movie_scenes_lib.c index 2cae0c5ac1..a074b63ec6 100644 --- a/src/intro_movie_scenes_lib.c +++ b/src/intro_movie_scenes_lib.c @@ -53,13 +53,13 @@ void IntroMovie_BuildSpriteResourcesHeaderAndTemplate(int resId, IntroMovieOverl NULL, NULL); template->spriteList = data->spriteList; - template->header = header; + template->header = header; SetVec(template->position, 0, 0, 0); SetVec(template->scale, FX32_ONE, FX32_ONE, FX32_ONE); - template->rotation = 0; - template->priority = 0; + template->rotation = 0; + template->priority = 0; template->whichScreen = whichScreen; - template->heapId = HEAP_ID_INTRO_MOVIE; + template->heapId = HEAP_ID_INTRO_MOVIE; } void IntroMovie_RendererSetSurfaceCoords(IntroMovieOverlayData *data, int mainx, int mainy, int subx, int suby) { @@ -68,15 +68,15 @@ void IntroMovie_RendererSetSurfaceCoords(IntroMovieOverlayData *data, int mainx, } void IntroMovie_StartBlendFadeEffect(IntroMovieBgBlendAnim *data, int plane1, int plane2, u8 duration, int direction, int screen) { - data->counter = 0; - data->ev = 0; - data->finished = 0; + data->counter = 0; + data->ev = 0; + data->finished = 0; data->topScreen = screen; - data->plane1 = plane1; - data->plane2 = plane2; - data->duration = duration; + data->plane1 = plane1; + data->plane2 = plane2; + data->duration = duration; data->direction = direction; - data->task = SysTask_CreateOnMainQueue(Task_IntroMovie_BlendFadeEffect, data, 0); + data->task = SysTask_CreateOnMainQueue(Task_IntroMovie_BlendFadeEffect, data, 0); } void Task_IntroMovie_BlendFadeEffect(SysTask *task, void *pVoid) { @@ -87,7 +87,7 @@ void Task_IntroMovie_BlendFadeEffect(SysTask *task, void *pVoid) { if (data->ev >= 31) { data->ev = 31; SysTask_Destroy(data->task); - data->task = NULL; + data->task = NULL; data->finished = 1; } int ev; @@ -119,16 +119,16 @@ void IntroMovie_StartBgScroll_VBlank(BgConfig *bgConfig, IntroMovieBgScrollAnim } obj->bgConfig = bgConfig; - obj->bgId = bgId; - obj->counter = 0; + obj->bgId = bgId; + obj->counter = 0; obj->finished = FALSE; obj->duration = duration; - obj->xOrig = Bg_GetXpos(bgConfig, bgId); - obj->yOrig = Bg_GetYpos(bgConfig, bgId); - obj->xChange = xChange; - obj->yChange = yChange; - obj->active = TRUE; - obj->task = SysTask_CreateOnVBlankQueue(Task_IntroMovie_BgScroll_VBlank, obj, 0); + obj->xOrig = Bg_GetXpos(bgConfig, bgId); + obj->yOrig = Bg_GetYpos(bgConfig, bgId); + obj->xChange = xChange; + obj->yChange = yChange; + obj->active = TRUE; + obj->task = SysTask_CreateOnVBlankQueue(Task_IntroMovie_BgScroll_VBlank, obj, 0); } void IntroMovie_StartBgScroll_NotVBlank(BgConfig *bgConfig, IntroMovieBgScrollAnim *data, GFBgLayer bgId, s16 xChange, s16 yChange, int duration) { @@ -147,16 +147,16 @@ void IntroMovie_StartBgScroll_NotVBlank(BgConfig *bgConfig, IntroMovieBgScrollAn } obj->bgConfig = bgConfig; - obj->bgId = bgId; - obj->counter = 0; + obj->bgId = bgId; + obj->counter = 0; obj->finished = FALSE; obj->duration = duration; - obj->xOrig = Bg_GetXpos(bgConfig, bgId); - obj->yOrig = Bg_GetYpos(bgConfig, bgId); - obj->xChange = xChange; - obj->yChange = yChange; - obj->active = TRUE; - obj->task = SysTask_CreateOnMainQueue(Task_IntroMovie_BgScroll_NotVBlank, obj, 0); + obj->xOrig = Bg_GetXpos(bgConfig, bgId); + obj->yOrig = Bg_GetYpos(bgConfig, bgId); + obj->xChange = xChange; + obj->yChange = yChange; + obj->active = TRUE; + obj->task = SysTask_CreateOnMainQueue(Task_IntroMovie_BgScroll_NotVBlank, obj, 0); } void Task_IntroMovie_BgScroll_VBlank(SysTask *task, void *pVoid) { @@ -175,9 +175,9 @@ void Task_IntroMovie_BgScroll_VBlank(SysTask *task, void *pVoid) { y += data->yOrig; if (data->counter >= data->duration) { SysTask_Destroy(data->task); - data->task = NULL; + data->task = NULL; data->finished = TRUE; - data->active = FALSE; + data->active = FALSE; } } BgSetPosTextAndCommit(data->bgConfig, data->bgId, BG_POS_OP_SET_X, x); @@ -200,9 +200,9 @@ void Task_IntroMovie_BgScroll_NotVBlank(SysTask *task, void *pVoid) { y += data->yOrig; if (data->counter >= data->duration) { SysTask_Destroy(data->task); - data->task = NULL; + data->task = NULL; data->finished = TRUE; - data->active = FALSE; + data->active = FALSE; } } ScheduleSetBgPosText(data->bgConfig, data->bgId, BG_POS_OP_SET_X, x); @@ -210,7 +210,7 @@ void Task_IntroMovie_BgScroll_NotVBlank(SysTask *task, void *pVoid) { } BOOL IntroMovie_WaitBgScrollAnim(IntroMovieBgScrollAnim *data, GFBgLayer bgId) { - BOOL ret = FALSE; + BOOL ret = FALSE; IntroMovieBgScrollAnim *obj = &data[IntroMovie_BgLayerToScrollEffectSlot(bgId)]; if (!obj->active) { return TRUE; @@ -225,9 +225,9 @@ void IntroMovie_CancelBgScrollAnim(IntroMovieBgScrollAnim *data, GFBgLayer bgId) IntroMovieBgScrollAnim *obj = &data[IntroMovie_BgLayerToScrollEffectSlot(bgId)]; if (obj->active) { SysTask_Destroy(obj->task); - obj->task = NULL; + obj->task = NULL; obj->finished = TRUE; - obj->active = FALSE; + obj->active = FALSE; } } @@ -272,16 +272,16 @@ IntroMovieBgWindowAnim *IntroMovie_StartWindowPanEffect(IntroMovieBgWindowAnim * return NULL; } IntroMovieBgWindowAnim *ret = whichScreen == 0 ? &data[1] : &data[0]; - ret->param = *param; - ret->duration = duration; - ret->counter = 0; - ret->finished = TRUE; - ret->active = TRUE; - ret->whichScreen = whichScreen; - ret->x1 = param->x1Start; - ret->y1 = param->y1Start; - ret->x2 = param->x2Start; - ret->y2 = param->y2Start; + ret->param = *param; + ret->duration = duration; + ret->counter = 0; + ret->finished = TRUE; + ret->active = TRUE; + ret->whichScreen = whichScreen; + ret->x1 = param->x1Start; + ret->y1 = param->y1Start; + ret->x2 = param->x2Start; + ret->y2 = param->y2Start; IntroMovie_SetBgWindowsPosition(param->x1Start, param->y1Start, param->x2Start, param->y2Start, whichScreen); ret->task = SysTask_CreateOnVBlankQueue(Task_IntroMovie_WindowPanEffect, ret, 0); return ret; @@ -297,26 +297,26 @@ BOOL IntroMovie_WaitWindowPanEffect(IntroMovieBgWindowAnim *data, int a1) { #define SCALE_POS(start, end, pos, duration) ({ \ int diff = (end) - (start); \ - diff = diff * (pos) / (duration); \ + diff = diff * (pos) / (duration); \ (start) + diff; \ }) void Task_IntroMovie_WindowPanEffect(SysTask *task, void *pVoid) { IntroMovieBgWindowAnim *data = (IntroMovieBgWindowAnim *)pVoid; ++data->counter; - int x1 = SCALE_POS(data->param.x1Start, data->param.x1End, data->counter, data->duration); - int y1 = SCALE_POS(data->param.y1Start, data->param.y1End, data->counter, data->duration); - int x2 = SCALE_POS(data->param.x2Start, data->param.x2End, data->counter, data->duration); - int y2 = SCALE_POS(data->param.y2Start, data->param.y2End, data->counter, data->duration); + int x1 = SCALE_POS(data->param.x1Start, data->param.x1End, data->counter, data->duration); + int y1 = SCALE_POS(data->param.y1Start, data->param.y1End, data->counter, data->duration); + int x2 = SCALE_POS(data->param.x2Start, data->param.x2End, data->counter, data->duration); + int y2 = SCALE_POS(data->param.y2Start, data->param.y2End, data->counter, data->duration); data->x1 = x1; data->y1 = y1; data->x2 = x2; data->y2 = y2; if (data->counter >= data->duration) { SysTask_Destroy(data->task); - data->task = NULL; + data->task = NULL; data->finished = TRUE; - data->active = FALSE; + data->active = FALSE; } IntroMovie_SetBgWindowsPosition(x1, y1, x2, y2, data->whichScreen); } @@ -383,26 +383,26 @@ void IntroMovie_InitBgAnimGxState(IntroMovieOverlayData *data) { } void IntroMovie_BeginCircleWipeEffect(IntroMovieOverlayData *data, int kind, BOOL isTopScreen, int duration) { - int winIn = 0x1F; + int winIn = 0x1F; IntroMovieCircleWipeEffect *effectData = &data->circleWipeEffect; - BOOL setBrightnessNeutral = FALSE; - PMLCDTarget screenId = PM_LCD_BOTTOM; - int winOut = 0; - effectData->active = TRUE; - effectData->finished = FALSE; - effectData->duration = duration; - effectData->counter = 0; - effectData->whichScreen = isTopScreen; - effectData->x = FX16_ONE; - effectData->y = 0; - effectData->kind = kind; + BOOL setBrightnessNeutral = FALSE; + PMLCDTarget screenId = PM_LCD_BOTTOM; + int winOut = 0; + effectData->active = TRUE; + effectData->finished = FALSE; + effectData->duration = duration; + effectData->counter = 0; + effectData->whichScreen = isTopScreen; + effectData->x = FX16_ONE; + effectData->y = 0; + effectData->kind = kind; int bgId; int color; if (isTopScreen) { - bgId = GF_BG_LYR_MAIN_0; + bgId = GF_BG_LYR_MAIN_0; screenId = PM_LCD_TOP; } else { - bgId = GF_BG_LYR_SUB_0; + bgId = GF_BG_LYR_SUB_0; screenId = PM_LCD_BOTTOM; } if (effectData->kind == 0 || effectData->kind == 1) { @@ -412,8 +412,8 @@ void IntroMovie_BeginCircleWipeEffect(IntroMovieOverlayData *data, int kind, BOO } BG_SetMaskColor(bgId, color); if (effectData->kind == 0 || effectData->kind == 2) { - winIn = 0; - winOut = 0x1F; + winIn = 0; + winOut = 0x1F; setBrightnessNeutral = TRUE; } IntroMovie_SetBgWindowsPosition(0, 0, 255, 192, isTopScreen); @@ -439,15 +439,15 @@ BOOL IntroMovie_WaitCircleWipeEffect(IntroMovieOverlayData *data) { void Task_IntroMovie_CircleWipeEffect(SysTask *task, void *pVoid) { IntroMovieCircleWipeEffect *effectData = (IntroMovieCircleWipeEffect *)pVoid; - u16 idx = FX_DEG_TO_IDX(180 * FX32_ONE) * effectData->counter / effectData->duration; + u16 idx = FX_DEG_TO_IDX(180 * FX32_ONE) * effectData->counter / effectData->duration; effectData->x = FX_CosIdx(idx); effectData->y = FX_SinIdx(idx); ++effectData->counter; if (effectData->counter >= effectData->duration) { SysTask_Destroy(effectData->task); - effectData->task = NULL; + effectData->task = NULL; effectData->finished = TRUE; - effectData->active = FALSE; + effectData->active = FALSE; u8 screen = effectData->whichScreen == 0 ? PM_LCD_BOTTOM : PM_LCD_TOP; if (effectData->kind == 1) { diff --git a/src/item.c b/src/item.c index bd345812d0..a1ab330c3b 100644 --- a/src/item.c +++ b/src/item.c @@ -18,14 +18,14 @@ #include "pm_string.h" static const u16 sPocketCounts[POCKETS_COUNT] = { - [POCKET_ITEMS] = NUM_BAG_ITEMS, - [POCKET_MEDICINE] = NUM_BAG_MEDICINE, - [POCKET_BALLS] = NUM_BAG_BALLS, - [POCKET_TMHMS] = NUM_BAG_TMS_HMS, - [POCKET_BERRIES] = NUM_BAG_BERRIES, - [POCKET_MAIL] = NUM_BAG_MAIL, + [POCKET_ITEMS] = NUM_BAG_ITEMS, + [POCKET_MEDICINE] = NUM_BAG_MEDICINE, + [POCKET_BALLS] = NUM_BAG_BALLS, + [POCKET_TMHMS] = NUM_BAG_TMS_HMS, + [POCKET_BERRIES] = NUM_BAG_BERRIES, + [POCKET_MAIL] = NUM_BAG_MAIL, [POCKET_BATTLE_ITEMS] = NUM_BAG_BATTLE_ITEMS, - [POCKET_KEY_ITEMS] = NUM_BAG_KEY_ITEMS, + [POCKET_KEY_ITEMS] = NUM_BAG_KEY_ITEMS, }; static const u16 sTMHMMoves[] = { @@ -132,491 +132,491 @@ static const u16 sTMHMMoves[] = { }; static const u16 sItemNarcIds[ITEMS_COUNT][4] = { - [ITEM_NONE] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_MASTER_BALL] = { NARC_item_data_0001_bin, NARC_item_icon_item_icon_002_NCGR, NARC_item_icon_item_icon_003_NCLR, AGB_ITEM_MASTER_BALL }, - [ITEM_ULTRA_BALL] = { NARC_item_data_0002_bin, NARC_item_icon_item_icon_004_NCGR, NARC_item_icon_item_icon_005_NCLR, AGB_ITEM_ULTRA_BALL }, - [ITEM_GREAT_BALL] = { NARC_item_data_0003_bin, NARC_item_icon_item_icon_006_NCGR, NARC_item_icon_item_icon_007_NCLR, AGB_ITEM_GREAT_BALL }, - [ITEM_POKE_BALL] = { NARC_item_data_0004_bin, NARC_item_icon_item_icon_008_NCGR, NARC_item_icon_item_icon_009_NCLR, AGB_ITEM_POKE_BALL }, - [ITEM_SAFARI_BALL] = { NARC_item_data_0005_bin, NARC_item_icon_item_icon_010_NCGR, NARC_item_icon_item_icon_011_NCLR, AGB_ITEM_SAFARI_BALL }, - [ITEM_NET_BALL] = { NARC_item_data_0006_bin, NARC_item_icon_item_icon_012_NCGR, NARC_item_icon_item_icon_013_NCLR, AGB_ITEM_NET_BALL }, - [ITEM_DIVE_BALL] = { NARC_item_data_0007_bin, NARC_item_icon_item_icon_014_NCGR, NARC_item_icon_item_icon_015_NCLR, AGB_ITEM_DIVE_BALL }, - [ITEM_NEST_BALL] = { NARC_item_data_0008_bin, NARC_item_icon_item_icon_016_NCGR, NARC_item_icon_item_icon_017_NCLR, AGB_ITEM_NEST_BALL }, - [ITEM_REPEAT_BALL] = { NARC_item_data_0009_bin, NARC_item_icon_item_icon_018_NCGR, NARC_item_icon_item_icon_019_NCLR, AGB_ITEM_REPEAT_BALL }, - [ITEM_TIMER_BALL] = { NARC_item_data_0010_bin, NARC_item_icon_item_icon_020_NCGR, NARC_item_icon_item_icon_019_NCLR, AGB_ITEM_TIMER_BALL }, - [ITEM_LUXURY_BALL] = { NARC_item_data_0011_bin, NARC_item_icon_item_icon_021_NCGR, NARC_item_icon_item_icon_022_NCLR, AGB_ITEM_LUXURY_BALL }, + [ITEM_NONE] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_MASTER_BALL] = { NARC_item_data_0001_bin, NARC_item_icon_item_icon_002_NCGR, NARC_item_icon_item_icon_003_NCLR, AGB_ITEM_MASTER_BALL }, + [ITEM_ULTRA_BALL] = { NARC_item_data_0002_bin, NARC_item_icon_item_icon_004_NCGR, NARC_item_icon_item_icon_005_NCLR, AGB_ITEM_ULTRA_BALL }, + [ITEM_GREAT_BALL] = { NARC_item_data_0003_bin, NARC_item_icon_item_icon_006_NCGR, NARC_item_icon_item_icon_007_NCLR, AGB_ITEM_GREAT_BALL }, + [ITEM_POKE_BALL] = { NARC_item_data_0004_bin, NARC_item_icon_item_icon_008_NCGR, NARC_item_icon_item_icon_009_NCLR, AGB_ITEM_POKE_BALL }, + [ITEM_SAFARI_BALL] = { NARC_item_data_0005_bin, NARC_item_icon_item_icon_010_NCGR, NARC_item_icon_item_icon_011_NCLR, AGB_ITEM_SAFARI_BALL }, + [ITEM_NET_BALL] = { NARC_item_data_0006_bin, NARC_item_icon_item_icon_012_NCGR, NARC_item_icon_item_icon_013_NCLR, AGB_ITEM_NET_BALL }, + [ITEM_DIVE_BALL] = { NARC_item_data_0007_bin, NARC_item_icon_item_icon_014_NCGR, NARC_item_icon_item_icon_015_NCLR, AGB_ITEM_DIVE_BALL }, + [ITEM_NEST_BALL] = { NARC_item_data_0008_bin, NARC_item_icon_item_icon_016_NCGR, NARC_item_icon_item_icon_017_NCLR, AGB_ITEM_NEST_BALL }, + [ITEM_REPEAT_BALL] = { NARC_item_data_0009_bin, NARC_item_icon_item_icon_018_NCGR, NARC_item_icon_item_icon_019_NCLR, AGB_ITEM_REPEAT_BALL }, + [ITEM_TIMER_BALL] = { NARC_item_data_0010_bin, NARC_item_icon_item_icon_020_NCGR, NARC_item_icon_item_icon_019_NCLR, AGB_ITEM_TIMER_BALL }, + [ITEM_LUXURY_BALL] = { NARC_item_data_0011_bin, NARC_item_icon_item_icon_021_NCGR, NARC_item_icon_item_icon_022_NCLR, AGB_ITEM_LUXURY_BALL }, [ITEM_PREMIER_BALL] = { NARC_item_data_0012_bin, NARC_item_icon_item_icon_023_NCGR, NARC_item_icon_item_icon_022_NCLR, AGB_ITEM_PREMIER_BALL }, - [ITEM_DUSK_BALL] = { NARC_item_data_0013_bin, NARC_item_icon_item_icon_663_NCGR, NARC_item_icon_item_icon_664_NCLR, AGB_ITEM_NONE }, - [ITEM_HEAL_BALL] = { NARC_item_data_0014_bin, NARC_item_icon_item_icon_665_NCGR, NARC_item_icon_item_icon_666_NCLR, AGB_ITEM_NONE }, - [ITEM_QUICK_BALL] = { NARC_item_data_0015_bin, NARC_item_icon_item_icon_667_NCGR, NARC_item_icon_item_icon_668_NCLR, AGB_ITEM_NONE }, + [ITEM_DUSK_BALL] = { NARC_item_data_0013_bin, NARC_item_icon_item_icon_663_NCGR, NARC_item_icon_item_icon_664_NCLR, AGB_ITEM_NONE }, + [ITEM_HEAL_BALL] = { NARC_item_data_0014_bin, NARC_item_icon_item_icon_665_NCGR, NARC_item_icon_item_icon_666_NCLR, AGB_ITEM_NONE }, + [ITEM_QUICK_BALL] = { NARC_item_data_0015_bin, NARC_item_icon_item_icon_667_NCGR, NARC_item_icon_item_icon_668_NCLR, AGB_ITEM_NONE }, [ITEM_CHERISH_BALL] = { NARC_item_data_0016_bin, NARC_item_icon_item_icon_669_NCGR, NARC_item_icon_item_icon_670_NCLR, AGB_ITEM_NONE }, - [ITEM_POTION] = { NARC_item_data_0017_bin, NARC_item_icon_item_icon_024_NCGR, NARC_item_icon_item_icon_025_NCLR, AGB_ITEM_POTION }, - [ITEM_ANTIDOTE] = { NARC_item_data_0018_bin, NARC_item_icon_item_icon_026_NCGR, NARC_item_icon_item_icon_027_NCLR, AGB_ITEM_ANTIDOTE }, - [ITEM_BURN_HEAL] = { NARC_item_data_0019_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_028_NCLR, AGB_ITEM_BURN_HEAL }, - [ITEM_ICE_HEAL] = { NARC_item_data_0020_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_029_NCLR, AGB_ITEM_ICE_HEAL }, - [ITEM_AWAKENING] = { NARC_item_data_0021_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_031_NCLR, AGB_ITEM_AWAKENING }, - [ITEM_PARLYZ_HEAL] = { NARC_item_data_0022_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_032_NCLR, AGB_ITEM_PARALYZE_HEAL }, + [ITEM_POTION] = { NARC_item_data_0017_bin, NARC_item_icon_item_icon_024_NCGR, NARC_item_icon_item_icon_025_NCLR, AGB_ITEM_POTION }, + [ITEM_ANTIDOTE] = { NARC_item_data_0018_bin, NARC_item_icon_item_icon_026_NCGR, NARC_item_icon_item_icon_027_NCLR, AGB_ITEM_ANTIDOTE }, + [ITEM_BURN_HEAL] = { NARC_item_data_0019_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_028_NCLR, AGB_ITEM_BURN_HEAL }, + [ITEM_ICE_HEAL] = { NARC_item_data_0020_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_029_NCLR, AGB_ITEM_ICE_HEAL }, + [ITEM_AWAKENING] = { NARC_item_data_0021_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_031_NCLR, AGB_ITEM_AWAKENING }, + [ITEM_PARLYZ_HEAL] = { NARC_item_data_0022_bin, NARC_item_icon_item_icon_030_NCGR, NARC_item_icon_item_icon_032_NCLR, AGB_ITEM_PARALYZE_HEAL }, [ITEM_FULL_RESTORE] = { NARC_item_data_0023_bin, NARC_item_icon_item_icon_033_NCGR, NARC_item_icon_item_icon_034_NCLR, AGB_ITEM_FULL_RESTORE }, - [ITEM_MAX_POTION] = { NARC_item_data_0024_bin, NARC_item_icon_item_icon_033_NCGR, NARC_item_icon_item_icon_035_NCLR, AGB_ITEM_MAX_POTION }, + [ITEM_MAX_POTION] = { NARC_item_data_0024_bin, NARC_item_icon_item_icon_033_NCGR, NARC_item_icon_item_icon_035_NCLR, AGB_ITEM_MAX_POTION }, [ITEM_HYPER_POTION] = { NARC_item_data_0025_bin, NARC_item_icon_item_icon_024_NCGR, NARC_item_icon_item_icon_036_NCLR, AGB_ITEM_HYPER_POTION }, [ITEM_SUPER_POTION] = { NARC_item_data_0026_bin, NARC_item_icon_item_icon_024_NCGR, NARC_item_icon_item_icon_037_NCLR, AGB_ITEM_SUPER_POTION }, - [ITEM_FULL_HEAL] = { NARC_item_data_0027_bin, NARC_item_icon_item_icon_038_NCGR, NARC_item_icon_item_icon_039_NCLR, AGB_ITEM_FULL_HEAL }, - [ITEM_REVIVE] = { NARC_item_data_0028_bin, NARC_item_icon_item_icon_040_NCGR, NARC_item_icon_item_icon_042_NCLR, AGB_ITEM_REVIVE }, - [ITEM_MAX_REVIVE] = { NARC_item_data_0029_bin, NARC_item_icon_item_icon_041_NCGR, NARC_item_icon_item_icon_042_NCLR, AGB_ITEM_MAX_REVIVE }, - [ITEM_FRESH_WATER] = { NARC_item_data_0030_bin, NARC_item_icon_item_icon_043_NCGR, NARC_item_icon_item_icon_044_NCLR, AGB_ITEM_FRESH_WATER }, - [ITEM_SODA_POP] = { NARC_item_data_0031_bin, NARC_item_icon_item_icon_045_NCGR, NARC_item_icon_item_icon_046_NCLR, AGB_ITEM_SODA_POP }, - [ITEM_LEMONADE] = { NARC_item_data_0032_bin, NARC_item_icon_item_icon_047_NCGR, NARC_item_icon_item_icon_048_NCLR, AGB_ITEM_LEMONADE }, - [ITEM_MOOMOO_MILK] = { NARC_item_data_0033_bin, NARC_item_icon_item_icon_049_NCGR, NARC_item_icon_item_icon_050_NCLR, AGB_ITEM_MOOMOO_MILK }, + [ITEM_FULL_HEAL] = { NARC_item_data_0027_bin, NARC_item_icon_item_icon_038_NCGR, NARC_item_icon_item_icon_039_NCLR, AGB_ITEM_FULL_HEAL }, + [ITEM_REVIVE] = { NARC_item_data_0028_bin, NARC_item_icon_item_icon_040_NCGR, NARC_item_icon_item_icon_042_NCLR, AGB_ITEM_REVIVE }, + [ITEM_MAX_REVIVE] = { NARC_item_data_0029_bin, NARC_item_icon_item_icon_041_NCGR, NARC_item_icon_item_icon_042_NCLR, AGB_ITEM_MAX_REVIVE }, + [ITEM_FRESH_WATER] = { NARC_item_data_0030_bin, NARC_item_icon_item_icon_043_NCGR, NARC_item_icon_item_icon_044_NCLR, AGB_ITEM_FRESH_WATER }, + [ITEM_SODA_POP] = { NARC_item_data_0031_bin, NARC_item_icon_item_icon_045_NCGR, NARC_item_icon_item_icon_046_NCLR, AGB_ITEM_SODA_POP }, + [ITEM_LEMONADE] = { NARC_item_data_0032_bin, NARC_item_icon_item_icon_047_NCGR, NARC_item_icon_item_icon_048_NCLR, AGB_ITEM_LEMONADE }, + [ITEM_MOOMOO_MILK] = { NARC_item_data_0033_bin, NARC_item_icon_item_icon_049_NCGR, NARC_item_icon_item_icon_050_NCLR, AGB_ITEM_MOOMOO_MILK }, [ITEM_ENERGYPOWDER] = { NARC_item_data_0034_bin, NARC_item_icon_item_icon_051_NCGR, NARC_item_icon_item_icon_052_NCLR, AGB_ITEM_ENERGY_POWDER }, - [ITEM_ENERGY_ROOT] = { NARC_item_data_0035_bin, NARC_item_icon_item_icon_053_NCGR, NARC_item_icon_item_icon_054_NCLR, AGB_ITEM_ENERGY_ROOT }, - [ITEM_HEAL_POWDER] = { NARC_item_data_0036_bin, NARC_item_icon_item_icon_051_NCGR, NARC_item_icon_item_icon_055_NCLR, AGB_ITEM_HEAL_POWDER }, + [ITEM_ENERGY_ROOT] = { NARC_item_data_0035_bin, NARC_item_icon_item_icon_053_NCGR, NARC_item_icon_item_icon_054_NCLR, AGB_ITEM_ENERGY_ROOT }, + [ITEM_HEAL_POWDER] = { NARC_item_data_0036_bin, NARC_item_icon_item_icon_051_NCGR, NARC_item_icon_item_icon_055_NCLR, AGB_ITEM_HEAL_POWDER }, [ITEM_REVIVAL_HERB] = { NARC_item_data_0037_bin, NARC_item_icon_item_icon_056_NCGR, NARC_item_icon_item_icon_057_NCLR, AGB_ITEM_REVIVAL_HERB }, - [ITEM_ETHER] = { NARC_item_data_0038_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_059_NCLR, AGB_ITEM_ETHER }, - [ITEM_MAX_ETHER] = { NARC_item_data_0039_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_060_NCLR, AGB_ITEM_MAX_ETHER }, - [ITEM_ELIXIR] = { NARC_item_data_0040_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_061_NCLR, AGB_ITEM_ELIXIR }, - [ITEM_MAX_ELIXIR] = { NARC_item_data_0041_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_062_NCLR, AGB_ITEM_MAX_ELIXIR }, - [ITEM_LAVA_COOKIE] = { NARC_item_data_0042_bin, NARC_item_icon_item_icon_063_NCGR, NARC_item_icon_item_icon_064_NCLR, AGB_ITEM_LAVA_COOKIE }, - [ITEM_BERRY_JUICE] = { NARC_item_data_0043_bin, NARC_item_icon_item_icon_071_NCGR, NARC_item_icon_item_icon_072_NCLR, AGB_ITEM_BERRY_JUICE }, - [ITEM_SACRED_ASH] = { NARC_item_data_0044_bin, NARC_item_icon_item_icon_073_NCGR, NARC_item_icon_item_icon_074_NCLR, AGB_ITEM_SACRED_ASH }, - [ITEM_HP_UP] = { NARC_item_data_0045_bin, NARC_item_icon_item_icon_083_NCGR, NARC_item_icon_item_icon_084_NCLR, AGB_ITEM_HP_UP }, - [ITEM_PROTEIN] = { NARC_item_data_0046_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_086_NCLR, AGB_ITEM_PROTEIN }, - [ITEM_IRON] = { NARC_item_data_0047_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_087_NCLR, AGB_ITEM_IRON }, - [ITEM_CARBOS] = { NARC_item_data_0048_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_088_NCLR, AGB_ITEM_CARBOS }, - [ITEM_CALCIUM] = { NARC_item_data_0049_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_089_NCLR, AGB_ITEM_CALCIUM }, - [ITEM_RARE_CANDY] = { NARC_item_data_0050_bin, NARC_item_icon_item_icon_090_NCGR, NARC_item_icon_item_icon_091_NCLR, AGB_ITEM_RARE_CANDY }, - [ITEM_PP_UP] = { NARC_item_data_0051_bin, NARC_item_icon_item_icon_092_NCGR, NARC_item_icon_item_icon_093_NCLR, AGB_ITEM_PP_UP }, - [ITEM_ZINC] = { NARC_item_data_0052_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_094_NCLR, AGB_ITEM_ZINC }, - [ITEM_PP_MAX] = { NARC_item_data_0053_bin, NARC_item_icon_item_icon_095_NCGR, NARC_item_icon_item_icon_096_NCLR, AGB_ITEM_PP_MAX }, - [ITEM_OLD_GATEAU] = { NARC_item_data_0054_bin, NARC_item_icon_item_icon_466_NCGR, NARC_item_icon_item_icon_467_NCLR, AGB_ITEM_NONE }, - [ITEM_GUARD_SPEC_] = { NARC_item_data_0055_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_097_NCLR, AGB_ITEM_POKEHEARTGOLD_AGB_SPEC }, - [ITEM_DIRE_HIT] = { NARC_item_data_0056_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_098_NCLR, AGB_ITEM_DIRE_HIT }, - [ITEM_X_ATTACK] = { NARC_item_data_0057_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_099_NCLR, AGB_ITEM_X_ATTACK }, - [ITEM_X_DEFENSE] = { NARC_item_data_0058_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_101_NCLR, AGB_ITEM_X_DEFEND }, - [ITEM_X_SPEED] = { NARC_item_data_0059_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_102_NCLR, AGB_ITEM_X_SPEED }, - [ITEM_X_ACCURACY] = { NARC_item_data_0060_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_103_NCLR, AGB_ITEM_X_ACCURACY }, - [ITEM_X_SPECIAL] = { NARC_item_data_0061_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_104_NCLR, AGB_ITEM_X_SPECIAL }, - [ITEM_X_SP__DEF] = { NARC_item_data_0062_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_469_NCLR, AGB_ITEM_NONE }, - [ITEM_POKE_DOLL] = { NARC_item_data_0063_bin, NARC_item_icon_item_icon_105_NCGR, NARC_item_icon_item_icon_106_NCLR, AGB_ITEM_POKE_DOLL }, - [ITEM_FLUFFY_TAIL] = { NARC_item_data_0064_bin, NARC_item_icon_item_icon_107_NCGR, NARC_item_icon_item_icon_108_NCLR, AGB_ITEM_FLUFFY_TAIL }, - [ITEM_BLUE_FLUTE] = { NARC_item_data_0065_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_066_NCLR, AGB_ITEM_BLUE_FLUTE }, + [ITEM_ETHER] = { NARC_item_data_0038_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_059_NCLR, AGB_ITEM_ETHER }, + [ITEM_MAX_ETHER] = { NARC_item_data_0039_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_060_NCLR, AGB_ITEM_MAX_ETHER }, + [ITEM_ELIXIR] = { NARC_item_data_0040_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_061_NCLR, AGB_ITEM_ELIXIR }, + [ITEM_MAX_ELIXIR] = { NARC_item_data_0041_bin, NARC_item_icon_item_icon_058_NCGR, NARC_item_icon_item_icon_062_NCLR, AGB_ITEM_MAX_ELIXIR }, + [ITEM_LAVA_COOKIE] = { NARC_item_data_0042_bin, NARC_item_icon_item_icon_063_NCGR, NARC_item_icon_item_icon_064_NCLR, AGB_ITEM_LAVA_COOKIE }, + [ITEM_BERRY_JUICE] = { NARC_item_data_0043_bin, NARC_item_icon_item_icon_071_NCGR, NARC_item_icon_item_icon_072_NCLR, AGB_ITEM_BERRY_JUICE }, + [ITEM_SACRED_ASH] = { NARC_item_data_0044_bin, NARC_item_icon_item_icon_073_NCGR, NARC_item_icon_item_icon_074_NCLR, AGB_ITEM_SACRED_ASH }, + [ITEM_HP_UP] = { NARC_item_data_0045_bin, NARC_item_icon_item_icon_083_NCGR, NARC_item_icon_item_icon_084_NCLR, AGB_ITEM_HP_UP }, + [ITEM_PROTEIN] = { NARC_item_data_0046_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_086_NCLR, AGB_ITEM_PROTEIN }, + [ITEM_IRON] = { NARC_item_data_0047_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_087_NCLR, AGB_ITEM_IRON }, + [ITEM_CARBOS] = { NARC_item_data_0048_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_088_NCLR, AGB_ITEM_CARBOS }, + [ITEM_CALCIUM] = { NARC_item_data_0049_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_089_NCLR, AGB_ITEM_CALCIUM }, + [ITEM_RARE_CANDY] = { NARC_item_data_0050_bin, NARC_item_icon_item_icon_090_NCGR, NARC_item_icon_item_icon_091_NCLR, AGB_ITEM_RARE_CANDY }, + [ITEM_PP_UP] = { NARC_item_data_0051_bin, NARC_item_icon_item_icon_092_NCGR, NARC_item_icon_item_icon_093_NCLR, AGB_ITEM_PP_UP }, + [ITEM_ZINC] = { NARC_item_data_0052_bin, NARC_item_icon_item_icon_085_NCGR, NARC_item_icon_item_icon_094_NCLR, AGB_ITEM_ZINC }, + [ITEM_PP_MAX] = { NARC_item_data_0053_bin, NARC_item_icon_item_icon_095_NCGR, NARC_item_icon_item_icon_096_NCLR, AGB_ITEM_PP_MAX }, + [ITEM_OLD_GATEAU] = { NARC_item_data_0054_bin, NARC_item_icon_item_icon_466_NCGR, NARC_item_icon_item_icon_467_NCLR, AGB_ITEM_NONE }, + [ITEM_GUARD_SPEC_] = { NARC_item_data_0055_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_097_NCLR, AGB_ITEM_POKEHEARTGOLD_AGB_SPEC }, + [ITEM_DIRE_HIT] = { NARC_item_data_0056_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_098_NCLR, AGB_ITEM_DIRE_HIT }, + [ITEM_X_ATTACK] = { NARC_item_data_0057_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_099_NCLR, AGB_ITEM_X_ATTACK }, + [ITEM_X_DEFENSE] = { NARC_item_data_0058_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_101_NCLR, AGB_ITEM_X_DEFEND }, + [ITEM_X_SPEED] = { NARC_item_data_0059_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_102_NCLR, AGB_ITEM_X_SPEED }, + [ITEM_X_ACCURACY] = { NARC_item_data_0060_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_103_NCLR, AGB_ITEM_X_ACCURACY }, + [ITEM_X_SPECIAL] = { NARC_item_data_0061_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_104_NCLR, AGB_ITEM_X_SPECIAL }, + [ITEM_X_SP__DEF] = { NARC_item_data_0062_bin, NARC_item_icon_item_icon_100_NCGR, NARC_item_icon_item_icon_469_NCLR, AGB_ITEM_NONE }, + [ITEM_POKE_DOLL] = { NARC_item_data_0063_bin, NARC_item_icon_item_icon_105_NCGR, NARC_item_icon_item_icon_106_NCLR, AGB_ITEM_POKE_DOLL }, + [ITEM_FLUFFY_TAIL] = { NARC_item_data_0064_bin, NARC_item_icon_item_icon_107_NCGR, NARC_item_icon_item_icon_108_NCLR, AGB_ITEM_FLUFFY_TAIL }, + [ITEM_BLUE_FLUTE] = { NARC_item_data_0065_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_066_NCLR, AGB_ITEM_BLUE_FLUTE }, [ITEM_YELLOW_FLUTE] = { NARC_item_data_0066_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_067_NCLR, AGB_ITEM_YELLOW_FLUTE }, - [ITEM_RED_FLUTE] = { NARC_item_data_0067_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_068_NCLR, AGB_ITEM_RED_FLUTE }, - [ITEM_BLACK_FLUTE] = { NARC_item_data_0068_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_069_NCLR, AGB_ITEM_BLACK_FLUTE }, - [ITEM_WHITE_FLUTE] = { NARC_item_data_0069_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_070_NCLR, AGB_ITEM_WHITE_FLUTE }, - [ITEM_SHOAL_SALT] = { NARC_item_data_0070_bin, NARC_item_icon_item_icon_051_NCGR, NARC_item_icon_item_icon_075_NCLR, AGB_ITEM_SHOAL_SALT }, - [ITEM_SHOAL_SHELL] = { NARC_item_data_0071_bin, NARC_item_icon_item_icon_076_NCGR, NARC_item_icon_item_icon_077_NCLR, AGB_ITEM_SHOAL_SHELL }, - [ITEM_RED_SHARD] = { NARC_item_data_0072_bin, NARC_item_icon_item_icon_078_NCGR, NARC_item_icon_item_icon_079_NCLR, AGB_ITEM_RED_SHARD }, - [ITEM_BLUE_SHARD] = { NARC_item_data_0073_bin, NARC_item_icon_item_icon_078_NCGR, NARC_item_icon_item_icon_080_NCLR, AGB_ITEM_BLUE_SHARD }, + [ITEM_RED_FLUTE] = { NARC_item_data_0067_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_068_NCLR, AGB_ITEM_RED_FLUTE }, + [ITEM_BLACK_FLUTE] = { NARC_item_data_0068_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_069_NCLR, AGB_ITEM_BLACK_FLUTE }, + [ITEM_WHITE_FLUTE] = { NARC_item_data_0069_bin, NARC_item_icon_item_icon_065_NCGR, NARC_item_icon_item_icon_070_NCLR, AGB_ITEM_WHITE_FLUTE }, + [ITEM_SHOAL_SALT] = { NARC_item_data_0070_bin, NARC_item_icon_item_icon_051_NCGR, NARC_item_icon_item_icon_075_NCLR, AGB_ITEM_SHOAL_SALT }, + [ITEM_SHOAL_SHELL] = { NARC_item_data_0071_bin, NARC_item_icon_item_icon_076_NCGR, NARC_item_icon_item_icon_077_NCLR, AGB_ITEM_SHOAL_SHELL }, + [ITEM_RED_SHARD] = { NARC_item_data_0072_bin, NARC_item_icon_item_icon_078_NCGR, NARC_item_icon_item_icon_079_NCLR, AGB_ITEM_RED_SHARD }, + [ITEM_BLUE_SHARD] = { NARC_item_data_0073_bin, NARC_item_icon_item_icon_078_NCGR, NARC_item_icon_item_icon_080_NCLR, AGB_ITEM_BLUE_SHARD }, [ITEM_YELLOW_SHARD] = { NARC_item_data_0074_bin, NARC_item_icon_item_icon_078_NCGR, NARC_item_icon_item_icon_081_NCLR, AGB_ITEM_YELLOW_SHARD }, - [ITEM_GREEN_SHARD] = { NARC_item_data_0075_bin, NARC_item_icon_item_icon_078_NCGR, NARC_item_icon_item_icon_082_NCLR, AGB_ITEM_GREEN_SHARD }, - [ITEM_SUPER_REPEL] = { NARC_item_data_0076_bin, NARC_item_icon_item_icon_109_NCGR, NARC_item_icon_item_icon_110_NCLR, AGB_ITEM_SUPER_REPEL }, - [ITEM_MAX_REPEL] = { NARC_item_data_0077_bin, NARC_item_icon_item_icon_109_NCGR, NARC_item_icon_item_icon_111_NCLR, AGB_ITEM_MAX_REPEL }, - [ITEM_ESCAPE_ROPE] = { NARC_item_data_0078_bin, NARC_item_icon_item_icon_112_NCGR, NARC_item_icon_item_icon_113_NCLR, AGB_ITEM_ESCAPE_ROPE }, - [ITEM_REPEL] = { NARC_item_data_0079_bin, NARC_item_icon_item_icon_109_NCGR, NARC_item_icon_item_icon_114_NCLR, AGB_ITEM_REPEL }, - [ITEM_SUN_STONE] = { NARC_item_data_0080_bin, NARC_item_icon_item_icon_115_NCGR, NARC_item_icon_item_icon_116_NCLR, AGB_ITEM_SUN_STONE }, - [ITEM_MOON_STONE] = { NARC_item_data_0081_bin, NARC_item_icon_item_icon_117_NCGR, NARC_item_icon_item_icon_118_NCLR, AGB_ITEM_MOON_STONE }, - [ITEM_FIRE_STONE] = { NARC_item_data_0082_bin, NARC_item_icon_item_icon_119_NCGR, NARC_item_icon_item_icon_120_NCLR, AGB_ITEM_FIRE_STONE }, + [ITEM_GREEN_SHARD] = { NARC_item_data_0075_bin, NARC_item_icon_item_icon_078_NCGR, NARC_item_icon_item_icon_082_NCLR, AGB_ITEM_GREEN_SHARD }, + [ITEM_SUPER_REPEL] = { NARC_item_data_0076_bin, NARC_item_icon_item_icon_109_NCGR, NARC_item_icon_item_icon_110_NCLR, AGB_ITEM_SUPER_REPEL }, + [ITEM_MAX_REPEL] = { NARC_item_data_0077_bin, NARC_item_icon_item_icon_109_NCGR, NARC_item_icon_item_icon_111_NCLR, AGB_ITEM_MAX_REPEL }, + [ITEM_ESCAPE_ROPE] = { NARC_item_data_0078_bin, NARC_item_icon_item_icon_112_NCGR, NARC_item_icon_item_icon_113_NCLR, AGB_ITEM_ESCAPE_ROPE }, + [ITEM_REPEL] = { NARC_item_data_0079_bin, NARC_item_icon_item_icon_109_NCGR, NARC_item_icon_item_icon_114_NCLR, AGB_ITEM_REPEL }, + [ITEM_SUN_STONE] = { NARC_item_data_0080_bin, NARC_item_icon_item_icon_115_NCGR, NARC_item_icon_item_icon_116_NCLR, AGB_ITEM_SUN_STONE }, + [ITEM_MOON_STONE] = { NARC_item_data_0081_bin, NARC_item_icon_item_icon_117_NCGR, NARC_item_icon_item_icon_118_NCLR, AGB_ITEM_MOON_STONE }, + [ITEM_FIRE_STONE] = { NARC_item_data_0082_bin, NARC_item_icon_item_icon_119_NCGR, NARC_item_icon_item_icon_120_NCLR, AGB_ITEM_FIRE_STONE }, [ITEM_THUNDERSTONE] = { NARC_item_data_0083_bin, NARC_item_icon_item_icon_121_NCGR, NARC_item_icon_item_icon_122_NCLR, AGB_ITEM_THUNDER_STONE }, - [ITEM_WATER_STONE] = { NARC_item_data_0084_bin, NARC_item_icon_item_icon_123_NCGR, NARC_item_icon_item_icon_124_NCLR, AGB_ITEM_WATER_STONE }, - [ITEM_LEAF_STONE] = { NARC_item_data_0085_bin, NARC_item_icon_item_icon_125_NCGR, NARC_item_icon_item_icon_126_NCLR, AGB_ITEM_LEAF_STONE }, + [ITEM_WATER_STONE] = { NARC_item_data_0084_bin, NARC_item_icon_item_icon_123_NCGR, NARC_item_icon_item_icon_124_NCLR, AGB_ITEM_WATER_STONE }, + [ITEM_LEAF_STONE] = { NARC_item_data_0085_bin, NARC_item_icon_item_icon_125_NCGR, NARC_item_icon_item_icon_126_NCLR, AGB_ITEM_LEAF_STONE }, [ITEM_TINYMUSHROOM] = { NARC_item_data_0086_bin, NARC_item_icon_item_icon_127_NCGR, NARC_item_icon_item_icon_129_NCLR, AGB_ITEM_TINY_MUSHROOM }, [ITEM_BIG_MUSHROOM] = { NARC_item_data_0087_bin, NARC_item_icon_item_icon_128_NCGR, NARC_item_icon_item_icon_129_NCLR, AGB_ITEM_BIG_MUSHROOM }, - [ITEM_PEARL] = { NARC_item_data_0088_bin, NARC_item_icon_item_icon_130_NCGR, NARC_item_icon_item_icon_131_NCLR, AGB_ITEM_PEARL }, - [ITEM_BIG_PEARL] = { NARC_item_data_0089_bin, NARC_item_icon_item_icon_132_NCGR, NARC_item_icon_item_icon_131_NCLR, AGB_ITEM_BIG_PEARL }, - [ITEM_STARDUST] = { NARC_item_data_0090_bin, NARC_item_icon_item_icon_133_NCGR, NARC_item_icon_item_icon_134_NCLR, AGB_ITEM_STARDUST }, - [ITEM_STAR_PIECE] = { NARC_item_data_0091_bin, NARC_item_icon_item_icon_135_NCGR, NARC_item_icon_item_icon_134_NCLR, AGB_ITEM_STAR_PIECE }, - [ITEM_NUGGET] = { NARC_item_data_0092_bin, NARC_item_icon_item_icon_136_NCGR, NARC_item_icon_item_icon_137_NCLR, AGB_ITEM_NUGGET }, - [ITEM_HEART_SCALE] = { NARC_item_data_0093_bin, NARC_item_icon_item_icon_138_NCGR, NARC_item_icon_item_icon_139_NCLR, AGB_ITEM_HEART_SCALE }, - [ITEM_HONEY] = { NARC_item_data_0094_bin, NARC_item_icon_item_icon_470_NCGR, NARC_item_icon_item_icon_471_NCLR, AGB_ITEM_NONE }, + [ITEM_PEARL] = { NARC_item_data_0088_bin, NARC_item_icon_item_icon_130_NCGR, NARC_item_icon_item_icon_131_NCLR, AGB_ITEM_PEARL }, + [ITEM_BIG_PEARL] = { NARC_item_data_0089_bin, NARC_item_icon_item_icon_132_NCGR, NARC_item_icon_item_icon_131_NCLR, AGB_ITEM_BIG_PEARL }, + [ITEM_STARDUST] = { NARC_item_data_0090_bin, NARC_item_icon_item_icon_133_NCGR, NARC_item_icon_item_icon_134_NCLR, AGB_ITEM_STARDUST }, + [ITEM_STAR_PIECE] = { NARC_item_data_0091_bin, NARC_item_icon_item_icon_135_NCGR, NARC_item_icon_item_icon_134_NCLR, AGB_ITEM_STAR_PIECE }, + [ITEM_NUGGET] = { NARC_item_data_0092_bin, NARC_item_icon_item_icon_136_NCGR, NARC_item_icon_item_icon_137_NCLR, AGB_ITEM_NUGGET }, + [ITEM_HEART_SCALE] = { NARC_item_data_0093_bin, NARC_item_icon_item_icon_138_NCGR, NARC_item_icon_item_icon_139_NCLR, AGB_ITEM_HEART_SCALE }, + [ITEM_HONEY] = { NARC_item_data_0094_bin, NARC_item_icon_item_icon_470_NCGR, NARC_item_icon_item_icon_471_NCLR, AGB_ITEM_NONE }, [ITEM_GROWTH_MULCH] = { NARC_item_data_0095_bin, NARC_item_icon_item_icon_472_NCGR, NARC_item_icon_item_icon_473_NCLR, AGB_ITEM_NONE }, - [ITEM_DAMP_MULCH] = { NARC_item_data_0096_bin, NARC_item_icon_item_icon_474_NCGR, NARC_item_icon_item_icon_475_NCLR, AGB_ITEM_NONE }, + [ITEM_DAMP_MULCH] = { NARC_item_data_0096_bin, NARC_item_icon_item_icon_474_NCGR, NARC_item_icon_item_icon_475_NCLR, AGB_ITEM_NONE }, [ITEM_STABLE_MULCH] = { NARC_item_data_0097_bin, NARC_item_icon_item_icon_476_NCGR, NARC_item_icon_item_icon_477_NCLR, AGB_ITEM_NONE }, - [ITEM_GOOEY_MULCH] = { NARC_item_data_0098_bin, NARC_item_icon_item_icon_478_NCGR, NARC_item_icon_item_icon_479_NCLR, AGB_ITEM_NONE }, - [ITEM_ROOT_FOSSIL] = { NARC_item_data_0099_bin, NARC_item_icon_item_icon_392_NCGR, NARC_item_icon_item_icon_393_NCLR, AGB_ITEM_ROOT_FOSSIL }, - [ITEM_CLAW_FOSSIL] = { NARC_item_data_0100_bin, NARC_item_icon_item_icon_394_NCGR, NARC_item_icon_item_icon_393_NCLR, AGB_ITEM_CLAW_FOSSIL }, + [ITEM_GOOEY_MULCH] = { NARC_item_data_0098_bin, NARC_item_icon_item_icon_478_NCGR, NARC_item_icon_item_icon_479_NCLR, AGB_ITEM_NONE }, + [ITEM_ROOT_FOSSIL] = { NARC_item_data_0099_bin, NARC_item_icon_item_icon_392_NCGR, NARC_item_icon_item_icon_393_NCLR, AGB_ITEM_ROOT_FOSSIL }, + [ITEM_CLAW_FOSSIL] = { NARC_item_data_0100_bin, NARC_item_icon_item_icon_394_NCGR, NARC_item_icon_item_icon_393_NCLR, AGB_ITEM_CLAW_FOSSIL }, [ITEM_HELIX_FOSSIL] = { NARC_item_data_0101_bin, NARC_item_icon_item_icon_431_NCGR, NARC_item_icon_item_icon_432_NCLR, AGB_ITEM_HELIX_FOSSIL }, - [ITEM_DOME_FOSSIL] = { NARC_item_data_0102_bin, NARC_item_icon_item_icon_433_NCGR, NARC_item_icon_item_icon_432_NCLR, AGB_ITEM_DOME_FOSSIL }, - [ITEM_OLD_AMBER] = { NARC_item_data_0103_bin, NARC_item_icon_item_icon_425_NCGR, NARC_item_icon_item_icon_426_NCLR, AGB_ITEM_OLD_AMBER }, + [ITEM_DOME_FOSSIL] = { NARC_item_data_0102_bin, NARC_item_icon_item_icon_433_NCGR, NARC_item_icon_item_icon_432_NCLR, AGB_ITEM_DOME_FOSSIL }, + [ITEM_OLD_AMBER] = { NARC_item_data_0103_bin, NARC_item_icon_item_icon_425_NCGR, NARC_item_icon_item_icon_426_NCLR, AGB_ITEM_OLD_AMBER }, [ITEM_ARMOR_FOSSIL] = { NARC_item_data_0104_bin, NARC_item_icon_item_icon_617_NCGR, NARC_item_icon_item_icon_618_NCLR, AGB_ITEM_NONE }, [ITEM_SKULL_FOSSIL] = { NARC_item_data_0105_bin, NARC_item_icon_item_icon_615_NCGR, NARC_item_icon_item_icon_616_NCLR, AGB_ITEM_NONE }, - [ITEM_RARE_BONE] = { NARC_item_data_0106_bin, NARC_item_icon_item_icon_337_NCGR, NARC_item_icon_item_icon_338_NCLR, AGB_ITEM_NONE }, - [ITEM_SHINY_STONE] = { NARC_item_data_0107_bin, NARC_item_icon_item_icon_480_NCGR, NARC_item_icon_item_icon_481_NCLR, AGB_ITEM_NONE }, - [ITEM_DUSK_STONE] = { NARC_item_data_0108_bin, NARC_item_icon_item_icon_482_NCGR, NARC_item_icon_item_icon_483_NCLR, AGB_ITEM_NONE }, - [ITEM_DAWN_STONE] = { NARC_item_data_0109_bin, NARC_item_icon_item_icon_484_NCGR, NARC_item_icon_item_icon_485_NCLR, AGB_ITEM_NONE }, - [ITEM_OVAL_STONE] = { NARC_item_data_0110_bin, NARC_item_icon_item_icon_486_NCGR, NARC_item_icon_item_icon_487_NCLR, AGB_ITEM_NONE }, + [ITEM_RARE_BONE] = { NARC_item_data_0106_bin, NARC_item_icon_item_icon_337_NCGR, NARC_item_icon_item_icon_338_NCLR, AGB_ITEM_NONE }, + [ITEM_SHINY_STONE] = { NARC_item_data_0107_bin, NARC_item_icon_item_icon_480_NCGR, NARC_item_icon_item_icon_481_NCLR, AGB_ITEM_NONE }, + [ITEM_DUSK_STONE] = { NARC_item_data_0108_bin, NARC_item_icon_item_icon_482_NCGR, NARC_item_icon_item_icon_483_NCLR, AGB_ITEM_NONE }, + [ITEM_DAWN_STONE] = { NARC_item_data_0109_bin, NARC_item_icon_item_icon_484_NCGR, NARC_item_icon_item_icon_485_NCLR, AGB_ITEM_NONE }, + [ITEM_OVAL_STONE] = { NARC_item_data_0110_bin, NARC_item_icon_item_icon_486_NCGR, NARC_item_icon_item_icon_487_NCLR, AGB_ITEM_NONE }, [ITEM_ODD_KEYSTONE] = { NARC_item_data_0111_bin, NARC_item_icon_item_icon_488_NCGR, NARC_item_icon_item_icon_489_NCLR, AGB_ITEM_NONE }, [ITEM_GRISEOUS_ORB] = { NARC_item_data_0112_bin, NARC_item_icon_item_icon_699_NCGR, NARC_item_icon_item_icon_700_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_113] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_114] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_115] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_116] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_117] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_118] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_119] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_120] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_121] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_122] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_123] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_124] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_125] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_126] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_127] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_128] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_129] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_130] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_131] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_132] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_133] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_UNUSED_134] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_ADAMANT_ORB] = { NARC_item_data_0113_bin, NARC_item_icon_item_icon_648_NCGR, NARC_item_icon_item_icon_649_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_113] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_114] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_115] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_116] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_117] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_118] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_119] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_120] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_121] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_122] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_123] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_124] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_125] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_126] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_127] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_128] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_129] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_130] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_131] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_132] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_133] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_UNUSED_134] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, + [ITEM_ADAMANT_ORB] = { NARC_item_data_0113_bin, NARC_item_icon_item_icon_648_NCGR, NARC_item_icon_item_icon_649_NCLR, AGB_ITEM_NONE }, [ITEM_LUSTROUS_ORB] = { NARC_item_data_0114_bin, NARC_item_icon_item_icon_646_NCGR, NARC_item_icon_item_icon_647_NCLR, AGB_ITEM_NONE }, - [ITEM_GRASS_MAIL] = { NARC_item_data_0115_bin, NARC_item_icon_item_icon_140_NCGR, NARC_item_icon_item_icon_141_NCLR, AGB_ITEM_NONE }, - [ITEM_FLAME_MAIL] = { NARC_item_data_0116_bin, NARC_item_icon_item_icon_142_NCGR, NARC_item_icon_item_icon_143_NCLR, AGB_ITEM_NONE }, - [ITEM_BUBBLE_MAIL] = { NARC_item_data_0117_bin, NARC_item_icon_item_icon_144_NCGR, NARC_item_icon_item_icon_145_NCLR, AGB_ITEM_NONE }, - [ITEM_BLOOM_MAIL] = { NARC_item_data_0118_bin, NARC_item_icon_item_icon_146_NCGR, NARC_item_icon_item_icon_147_NCLR, AGB_ITEM_NONE }, - [ITEM_TUNNEL_MAIL] = { NARC_item_data_0119_bin, NARC_item_icon_item_icon_148_NCGR, NARC_item_icon_item_icon_149_NCLR, AGB_ITEM_NONE }, - [ITEM_STEEL_MAIL] = { NARC_item_data_0120_bin, NARC_item_icon_item_icon_150_NCGR, NARC_item_icon_item_icon_151_NCLR, AGB_ITEM_NONE }, - [ITEM_HEART_MAIL] = { NARC_item_data_0121_bin, NARC_item_icon_item_icon_152_NCGR, NARC_item_icon_item_icon_153_NCLR, AGB_ITEM_NONE }, - [ITEM_SNOW_MAIL] = { NARC_item_data_0122_bin, NARC_item_icon_item_icon_154_NCGR, NARC_item_icon_item_icon_155_NCLR, AGB_ITEM_NONE }, - [ITEM_SPACE_MAIL] = { NARC_item_data_0123_bin, NARC_item_icon_item_icon_156_NCGR, NARC_item_icon_item_icon_157_NCLR, AGB_ITEM_NONE }, - [ITEM_AIR_MAIL] = { NARC_item_data_0124_bin, NARC_item_icon_item_icon_158_NCGR, NARC_item_icon_item_icon_159_NCLR, AGB_ITEM_NONE }, - [ITEM_MOSAIC_MAIL] = { NARC_item_data_0125_bin, NARC_item_icon_item_icon_160_NCGR, NARC_item_icon_item_icon_161_NCLR, AGB_ITEM_NONE }, - [ITEM_BRICK_MAIL] = { NARC_item_data_0126_bin, NARC_item_icon_item_icon_162_NCGR, NARC_item_icon_item_icon_163_NCLR, AGB_ITEM_NONE }, - [ITEM_CHERI_BERRY] = { NARC_item_data_0127_bin, NARC_item_icon_item_icon_164_NCGR, NARC_item_icon_item_icon_165_NCLR, AGB_ITEM_CHERI_BERRY }, + [ITEM_GRASS_MAIL] = { NARC_item_data_0115_bin, NARC_item_icon_item_icon_140_NCGR, NARC_item_icon_item_icon_141_NCLR, AGB_ITEM_NONE }, + [ITEM_FLAME_MAIL] = { NARC_item_data_0116_bin, NARC_item_icon_item_icon_142_NCGR, NARC_item_icon_item_icon_143_NCLR, AGB_ITEM_NONE }, + [ITEM_BUBBLE_MAIL] = { NARC_item_data_0117_bin, NARC_item_icon_item_icon_144_NCGR, NARC_item_icon_item_icon_145_NCLR, AGB_ITEM_NONE }, + [ITEM_BLOOM_MAIL] = { NARC_item_data_0118_bin, NARC_item_icon_item_icon_146_NCGR, NARC_item_icon_item_icon_147_NCLR, AGB_ITEM_NONE }, + [ITEM_TUNNEL_MAIL] = { NARC_item_data_0119_bin, NARC_item_icon_item_icon_148_NCGR, NARC_item_icon_item_icon_149_NCLR, AGB_ITEM_NONE }, + [ITEM_STEEL_MAIL] = { NARC_item_data_0120_bin, NARC_item_icon_item_icon_150_NCGR, NARC_item_icon_item_icon_151_NCLR, AGB_ITEM_NONE }, + [ITEM_HEART_MAIL] = { NARC_item_data_0121_bin, NARC_item_icon_item_icon_152_NCGR, NARC_item_icon_item_icon_153_NCLR, AGB_ITEM_NONE }, + [ITEM_SNOW_MAIL] = { NARC_item_data_0122_bin, NARC_item_icon_item_icon_154_NCGR, NARC_item_icon_item_icon_155_NCLR, AGB_ITEM_NONE }, + [ITEM_SPACE_MAIL] = { NARC_item_data_0123_bin, NARC_item_icon_item_icon_156_NCGR, NARC_item_icon_item_icon_157_NCLR, AGB_ITEM_NONE }, + [ITEM_AIR_MAIL] = { NARC_item_data_0124_bin, NARC_item_icon_item_icon_158_NCGR, NARC_item_icon_item_icon_159_NCLR, AGB_ITEM_NONE }, + [ITEM_MOSAIC_MAIL] = { NARC_item_data_0125_bin, NARC_item_icon_item_icon_160_NCGR, NARC_item_icon_item_icon_161_NCLR, AGB_ITEM_NONE }, + [ITEM_BRICK_MAIL] = { NARC_item_data_0126_bin, NARC_item_icon_item_icon_162_NCGR, NARC_item_icon_item_icon_163_NCLR, AGB_ITEM_NONE }, + [ITEM_CHERI_BERRY] = { NARC_item_data_0127_bin, NARC_item_icon_item_icon_164_NCGR, NARC_item_icon_item_icon_165_NCLR, AGB_ITEM_CHERI_BERRY }, [ITEM_CHESTO_BERRY] = { NARC_item_data_0128_bin, NARC_item_icon_item_icon_166_NCGR, NARC_item_icon_item_icon_167_NCLR, AGB_ITEM_CHESTO_BERRY }, - [ITEM_PECHA_BERRY] = { NARC_item_data_0129_bin, NARC_item_icon_item_icon_168_NCGR, NARC_item_icon_item_icon_169_NCLR, AGB_ITEM_PECHA_BERRY }, - [ITEM_RAWST_BERRY] = { NARC_item_data_0130_bin, NARC_item_icon_item_icon_170_NCGR, NARC_item_icon_item_icon_171_NCLR, AGB_ITEM_RAWST_BERRY }, + [ITEM_PECHA_BERRY] = { NARC_item_data_0129_bin, NARC_item_icon_item_icon_168_NCGR, NARC_item_icon_item_icon_169_NCLR, AGB_ITEM_PECHA_BERRY }, + [ITEM_RAWST_BERRY] = { NARC_item_data_0130_bin, NARC_item_icon_item_icon_170_NCGR, NARC_item_icon_item_icon_171_NCLR, AGB_ITEM_RAWST_BERRY }, [ITEM_ASPEAR_BERRY] = { NARC_item_data_0131_bin, NARC_item_icon_item_icon_172_NCGR, NARC_item_icon_item_icon_173_NCLR, AGB_ITEM_ASPEAR_BERRY }, - [ITEM_LEPPA_BERRY] = { NARC_item_data_0132_bin, NARC_item_icon_item_icon_174_NCGR, NARC_item_icon_item_icon_175_NCLR, AGB_ITEM_LEPPA_BERRY }, - [ITEM_ORAN_BERRY] = { NARC_item_data_0133_bin, NARC_item_icon_item_icon_176_NCGR, NARC_item_icon_item_icon_177_NCLR, AGB_ITEM_ORAN_BERRY }, + [ITEM_LEPPA_BERRY] = { NARC_item_data_0132_bin, NARC_item_icon_item_icon_174_NCGR, NARC_item_icon_item_icon_175_NCLR, AGB_ITEM_LEPPA_BERRY }, + [ITEM_ORAN_BERRY] = { NARC_item_data_0133_bin, NARC_item_icon_item_icon_176_NCGR, NARC_item_icon_item_icon_177_NCLR, AGB_ITEM_ORAN_BERRY }, [ITEM_PERSIM_BERRY] = { NARC_item_data_0134_bin, NARC_item_icon_item_icon_178_NCGR, NARC_item_icon_item_icon_179_NCLR, AGB_ITEM_PERSIM_BERRY }, - [ITEM_LUM_BERRY] = { NARC_item_data_0135_bin, NARC_item_icon_item_icon_180_NCGR, NARC_item_icon_item_icon_181_NCLR, AGB_ITEM_LUM_BERRY }, + [ITEM_LUM_BERRY] = { NARC_item_data_0135_bin, NARC_item_icon_item_icon_180_NCGR, NARC_item_icon_item_icon_181_NCLR, AGB_ITEM_LUM_BERRY }, [ITEM_SITRUS_BERRY] = { NARC_item_data_0136_bin, NARC_item_icon_item_icon_182_NCGR, NARC_item_icon_item_icon_183_NCLR, AGB_ITEM_SITRUS_BERRY }, - [ITEM_FIGY_BERRY] = { NARC_item_data_0137_bin, NARC_item_icon_item_icon_184_NCGR, NARC_item_icon_item_icon_185_NCLR, AGB_ITEM_FIGY_BERRY }, - [ITEM_WIKI_BERRY] = { NARC_item_data_0138_bin, NARC_item_icon_item_icon_186_NCGR, NARC_item_icon_item_icon_187_NCLR, AGB_ITEM_WIKI_BERRY }, - [ITEM_MAGO_BERRY] = { NARC_item_data_0139_bin, NARC_item_icon_item_icon_188_NCGR, NARC_item_icon_item_icon_189_NCLR, AGB_ITEM_MAGO_BERRY }, - [ITEM_AGUAV_BERRY] = { NARC_item_data_0140_bin, NARC_item_icon_item_icon_190_NCGR, NARC_item_icon_item_icon_191_NCLR, AGB_ITEM_AGUAV_BERRY }, + [ITEM_FIGY_BERRY] = { NARC_item_data_0137_bin, NARC_item_icon_item_icon_184_NCGR, NARC_item_icon_item_icon_185_NCLR, AGB_ITEM_FIGY_BERRY }, + [ITEM_WIKI_BERRY] = { NARC_item_data_0138_bin, NARC_item_icon_item_icon_186_NCGR, NARC_item_icon_item_icon_187_NCLR, AGB_ITEM_WIKI_BERRY }, + [ITEM_MAGO_BERRY] = { NARC_item_data_0139_bin, NARC_item_icon_item_icon_188_NCGR, NARC_item_icon_item_icon_189_NCLR, AGB_ITEM_MAGO_BERRY }, + [ITEM_AGUAV_BERRY] = { NARC_item_data_0140_bin, NARC_item_icon_item_icon_190_NCGR, NARC_item_icon_item_icon_191_NCLR, AGB_ITEM_AGUAV_BERRY }, [ITEM_IAPAPA_BERRY] = { NARC_item_data_0141_bin, NARC_item_icon_item_icon_192_NCGR, NARC_item_icon_item_icon_193_NCLR, AGB_ITEM_IAPAPA_BERRY }, - [ITEM_RAZZ_BERRY] = { NARC_item_data_0142_bin, NARC_item_icon_item_icon_194_NCGR, NARC_item_icon_item_icon_195_NCLR, AGB_ITEM_RAZZ_BERRY }, - [ITEM_BLUK_BERRY] = { NARC_item_data_0143_bin, NARC_item_icon_item_icon_196_NCGR, NARC_item_icon_item_icon_197_NCLR, AGB_ITEM_BLUK_BERRY }, - [ITEM_NANAB_BERRY] = { NARC_item_data_0144_bin, NARC_item_icon_item_icon_198_NCGR, NARC_item_icon_item_icon_199_NCLR, AGB_ITEM_NANAB_BERRY }, + [ITEM_RAZZ_BERRY] = { NARC_item_data_0142_bin, NARC_item_icon_item_icon_194_NCGR, NARC_item_icon_item_icon_195_NCLR, AGB_ITEM_RAZZ_BERRY }, + [ITEM_BLUK_BERRY] = { NARC_item_data_0143_bin, NARC_item_icon_item_icon_196_NCGR, NARC_item_icon_item_icon_197_NCLR, AGB_ITEM_BLUK_BERRY }, + [ITEM_NANAB_BERRY] = { NARC_item_data_0144_bin, NARC_item_icon_item_icon_198_NCGR, NARC_item_icon_item_icon_199_NCLR, AGB_ITEM_NANAB_BERRY }, [ITEM_WEPEAR_BERRY] = { NARC_item_data_0145_bin, NARC_item_icon_item_icon_200_NCGR, NARC_item_icon_item_icon_201_NCLR, AGB_ITEM_WEPEAR_BERRY }, - [ITEM_PINAP_BERRY] = { NARC_item_data_0146_bin, NARC_item_icon_item_icon_202_NCGR, NARC_item_icon_item_icon_203_NCLR, AGB_ITEM_PINAP_BERRY }, - [ITEM_POMEG_BERRY] = { NARC_item_data_0147_bin, NARC_item_icon_item_icon_204_NCGR, NARC_item_icon_item_icon_205_NCLR, AGB_ITEM_POMEG_BERRY }, + [ITEM_PINAP_BERRY] = { NARC_item_data_0146_bin, NARC_item_icon_item_icon_202_NCGR, NARC_item_icon_item_icon_203_NCLR, AGB_ITEM_PINAP_BERRY }, + [ITEM_POMEG_BERRY] = { NARC_item_data_0147_bin, NARC_item_icon_item_icon_204_NCGR, NARC_item_icon_item_icon_205_NCLR, AGB_ITEM_POMEG_BERRY }, [ITEM_KELPSY_BERRY] = { NARC_item_data_0148_bin, NARC_item_icon_item_icon_206_NCGR, NARC_item_icon_item_icon_207_NCLR, AGB_ITEM_KELPSY_BERRY }, [ITEM_QUALOT_BERRY] = { NARC_item_data_0149_bin, NARC_item_icon_item_icon_208_NCGR, NARC_item_icon_item_icon_209_NCLR, AGB_ITEM_QUALOT_BERRY }, [ITEM_HONDEW_BERRY] = { NARC_item_data_0150_bin, NARC_item_icon_item_icon_210_NCGR, NARC_item_icon_item_icon_211_NCLR, AGB_ITEM_HONDEW_BERRY }, - [ITEM_GREPA_BERRY] = { NARC_item_data_0151_bin, NARC_item_icon_item_icon_212_NCGR, NARC_item_icon_item_icon_213_NCLR, AGB_ITEM_GREPA_BERRY }, + [ITEM_GREPA_BERRY] = { NARC_item_data_0151_bin, NARC_item_icon_item_icon_212_NCGR, NARC_item_icon_item_icon_213_NCLR, AGB_ITEM_GREPA_BERRY }, [ITEM_TAMATO_BERRY] = { NARC_item_data_0152_bin, NARC_item_icon_item_icon_214_NCGR, NARC_item_icon_item_icon_215_NCLR, AGB_ITEM_TAMATO_BERRY }, - [ITEM_CORNN_BERRY] = { NARC_item_data_0153_bin, NARC_item_icon_item_icon_216_NCGR, NARC_item_icon_item_icon_217_NCLR, AGB_ITEM_CORNN_BERRY }, + [ITEM_CORNN_BERRY] = { NARC_item_data_0153_bin, NARC_item_icon_item_icon_216_NCGR, NARC_item_icon_item_icon_217_NCLR, AGB_ITEM_CORNN_BERRY }, [ITEM_MAGOST_BERRY] = { NARC_item_data_0154_bin, NARC_item_icon_item_icon_218_NCGR, NARC_item_icon_item_icon_219_NCLR, AGB_ITEM_MAGOST_BERRY }, [ITEM_RABUTA_BERRY] = { NARC_item_data_0155_bin, NARC_item_icon_item_icon_220_NCGR, NARC_item_icon_item_icon_221_NCLR, AGB_ITEM_RABUTA_BERRY }, - [ITEM_NOMEL_BERRY] = { NARC_item_data_0156_bin, NARC_item_icon_item_icon_222_NCGR, NARC_item_icon_item_icon_223_NCLR, AGB_ITEM_NOMEL_BERRY }, + [ITEM_NOMEL_BERRY] = { NARC_item_data_0156_bin, NARC_item_icon_item_icon_222_NCGR, NARC_item_icon_item_icon_223_NCLR, AGB_ITEM_NOMEL_BERRY }, [ITEM_SPELON_BERRY] = { NARC_item_data_0157_bin, NARC_item_icon_item_icon_224_NCGR, NARC_item_icon_item_icon_225_NCLR, AGB_ITEM_SPELON_BERRY }, [ITEM_PAMTRE_BERRY] = { NARC_item_data_0158_bin, NARC_item_icon_item_icon_226_NCGR, NARC_item_icon_item_icon_227_NCLR, AGB_ITEM_PAMTRE_BERRY }, [ITEM_WATMEL_BERRY] = { NARC_item_data_0159_bin, NARC_item_icon_item_icon_228_NCGR, NARC_item_icon_item_icon_229_NCLR, AGB_ITEM_WATMEL_BERRY }, - [ITEM_DURIN_BERRY] = { NARC_item_data_0160_bin, NARC_item_icon_item_icon_230_NCGR, NARC_item_icon_item_icon_231_NCLR, AGB_ITEM_DURIN_BERRY }, - [ITEM_BELUE_BERRY] = { NARC_item_data_0161_bin, NARC_item_icon_item_icon_232_NCGR, NARC_item_icon_item_icon_233_NCLR, AGB_ITEM_BELUE_BERRY }, - [ITEM_OCCA_BERRY] = { NARC_item_data_0162_bin, NARC_item_icon_item_icon_554_NCGR, NARC_item_icon_item_icon_555_NCLR, AGB_ITEM_NONE }, + [ITEM_DURIN_BERRY] = { NARC_item_data_0160_bin, NARC_item_icon_item_icon_230_NCGR, NARC_item_icon_item_icon_231_NCLR, AGB_ITEM_DURIN_BERRY }, + [ITEM_BELUE_BERRY] = { NARC_item_data_0161_bin, NARC_item_icon_item_icon_232_NCGR, NARC_item_icon_item_icon_233_NCLR, AGB_ITEM_BELUE_BERRY }, + [ITEM_OCCA_BERRY] = { NARC_item_data_0162_bin, NARC_item_icon_item_icon_554_NCGR, NARC_item_icon_item_icon_555_NCLR, AGB_ITEM_NONE }, [ITEM_PASSHO_BERRY] = { NARC_item_data_0163_bin, NARC_item_icon_item_icon_556_NCGR, NARC_item_icon_item_icon_557_NCLR, AGB_ITEM_NONE }, - [ITEM_WACAN_BERRY] = { NARC_item_data_0164_bin, NARC_item_icon_item_icon_558_NCGR, NARC_item_icon_item_icon_559_NCLR, AGB_ITEM_NONE }, - [ITEM_RINDO_BERRY] = { NARC_item_data_0165_bin, NARC_item_icon_item_icon_560_NCGR, NARC_item_icon_item_icon_561_NCLR, AGB_ITEM_NONE }, - [ITEM_YACHE_BERRY] = { NARC_item_data_0166_bin, NARC_item_icon_item_icon_562_NCGR, NARC_item_icon_item_icon_563_NCLR, AGB_ITEM_NONE }, + [ITEM_WACAN_BERRY] = { NARC_item_data_0164_bin, NARC_item_icon_item_icon_558_NCGR, NARC_item_icon_item_icon_559_NCLR, AGB_ITEM_NONE }, + [ITEM_RINDO_BERRY] = { NARC_item_data_0165_bin, NARC_item_icon_item_icon_560_NCGR, NARC_item_icon_item_icon_561_NCLR, AGB_ITEM_NONE }, + [ITEM_YACHE_BERRY] = { NARC_item_data_0166_bin, NARC_item_icon_item_icon_562_NCGR, NARC_item_icon_item_icon_563_NCLR, AGB_ITEM_NONE }, [ITEM_CHOPLE_BERRY] = { NARC_item_data_0167_bin, NARC_item_icon_item_icon_564_NCGR, NARC_item_icon_item_icon_565_NCLR, AGB_ITEM_NONE }, - [ITEM_KEBIA_BERRY] = { NARC_item_data_0168_bin, NARC_item_icon_item_icon_566_NCGR, NARC_item_icon_item_icon_567_NCLR, AGB_ITEM_NONE }, - [ITEM_SHUCA_BERRY] = { NARC_item_data_0169_bin, NARC_item_icon_item_icon_568_NCGR, NARC_item_icon_item_icon_569_NCLR, AGB_ITEM_NONE }, - [ITEM_COBA_BERRY] = { NARC_item_data_0170_bin, NARC_item_icon_item_icon_570_NCGR, NARC_item_icon_item_icon_571_NCLR, AGB_ITEM_NONE }, + [ITEM_KEBIA_BERRY] = { NARC_item_data_0168_bin, NARC_item_icon_item_icon_566_NCGR, NARC_item_icon_item_icon_567_NCLR, AGB_ITEM_NONE }, + [ITEM_SHUCA_BERRY] = { NARC_item_data_0169_bin, NARC_item_icon_item_icon_568_NCGR, NARC_item_icon_item_icon_569_NCLR, AGB_ITEM_NONE }, + [ITEM_COBA_BERRY] = { NARC_item_data_0170_bin, NARC_item_icon_item_icon_570_NCGR, NARC_item_icon_item_icon_571_NCLR, AGB_ITEM_NONE }, [ITEM_PAYAPA_BERRY] = { NARC_item_data_0171_bin, NARC_item_icon_item_icon_572_NCGR, NARC_item_icon_item_icon_573_NCLR, AGB_ITEM_NONE }, - [ITEM_TANGA_BERRY] = { NARC_item_data_0172_bin, NARC_item_icon_item_icon_574_NCGR, NARC_item_icon_item_icon_575_NCLR, AGB_ITEM_NONE }, + [ITEM_TANGA_BERRY] = { NARC_item_data_0172_bin, NARC_item_icon_item_icon_574_NCGR, NARC_item_icon_item_icon_575_NCLR, AGB_ITEM_NONE }, [ITEM_CHARTI_BERRY] = { NARC_item_data_0173_bin, NARC_item_icon_item_icon_576_NCGR, NARC_item_icon_item_icon_577_NCLR, AGB_ITEM_NONE }, - [ITEM_KASIB_BERRY] = { NARC_item_data_0174_bin, NARC_item_icon_item_icon_578_NCGR, NARC_item_icon_item_icon_579_NCLR, AGB_ITEM_NONE }, - [ITEM_HABAN_BERRY] = { NARC_item_data_0175_bin, NARC_item_icon_item_icon_580_NCGR, NARC_item_icon_item_icon_581_NCLR, AGB_ITEM_NONE }, + [ITEM_KASIB_BERRY] = { NARC_item_data_0174_bin, NARC_item_icon_item_icon_578_NCGR, NARC_item_icon_item_icon_579_NCLR, AGB_ITEM_NONE }, + [ITEM_HABAN_BERRY] = { NARC_item_data_0175_bin, NARC_item_icon_item_icon_580_NCGR, NARC_item_icon_item_icon_581_NCLR, AGB_ITEM_NONE }, [ITEM_COLBUR_BERRY] = { NARC_item_data_0176_bin, NARC_item_icon_item_icon_582_NCGR, NARC_item_icon_item_icon_583_NCLR, AGB_ITEM_NONE }, [ITEM_BABIRI_BERRY] = { NARC_item_data_0177_bin, NARC_item_icon_item_icon_584_NCGR, NARC_item_icon_item_icon_585_NCLR, AGB_ITEM_NONE }, [ITEM_CHILAN_BERRY] = { NARC_item_data_0178_bin, NARC_item_icon_item_icon_586_NCGR, NARC_item_icon_item_icon_587_NCLR, AGB_ITEM_NONE }, [ITEM_LIECHI_BERRY] = { NARC_item_data_0179_bin, NARC_item_icon_item_icon_234_NCGR, NARC_item_icon_item_icon_235_NCLR, AGB_ITEM_LIECHI_BERRY }, [ITEM_GANLON_BERRY] = { NARC_item_data_0180_bin, NARC_item_icon_item_icon_236_NCGR, NARC_item_icon_item_icon_237_NCLR, AGB_ITEM_GANLON_BERRY }, - [ITEM_SALAC_BERRY] = { NARC_item_data_0181_bin, NARC_item_icon_item_icon_238_NCGR, NARC_item_icon_item_icon_239_NCLR, AGB_ITEM_SALAC_BERRY }, + [ITEM_SALAC_BERRY] = { NARC_item_data_0181_bin, NARC_item_icon_item_icon_238_NCGR, NARC_item_icon_item_icon_239_NCLR, AGB_ITEM_SALAC_BERRY }, [ITEM_PETAYA_BERRY] = { NARC_item_data_0182_bin, NARC_item_icon_item_icon_240_NCGR, NARC_item_icon_item_icon_241_NCLR, AGB_ITEM_PETAYA_BERRY }, [ITEM_APICOT_BERRY] = { NARC_item_data_0183_bin, NARC_item_icon_item_icon_242_NCGR, NARC_item_icon_item_icon_243_NCLR, AGB_ITEM_APICOT_BERRY }, [ITEM_LANSAT_BERRY] = { NARC_item_data_0184_bin, NARC_item_icon_item_icon_244_NCGR, NARC_item_icon_item_icon_245_NCLR, AGB_ITEM_LANSAT_BERRY }, - [ITEM_STARF_BERRY] = { NARC_item_data_0185_bin, NARC_item_icon_item_icon_246_NCGR, NARC_item_icon_item_icon_247_NCLR, AGB_ITEM_STARF_BERRY }, + [ITEM_STARF_BERRY] = { NARC_item_data_0185_bin, NARC_item_icon_item_icon_246_NCGR, NARC_item_icon_item_icon_247_NCLR, AGB_ITEM_STARF_BERRY }, [ITEM_ENIGMA_BERRY] = { NARC_item_data_0186_bin, NARC_item_icon_item_icon_248_NCGR, NARC_item_icon_item_icon_249_NCLR, AGB_ITEM_ENIGMA_BERRY }, - [ITEM_MICLE_BERRY] = { NARC_item_data_0187_bin, NARC_item_icon_item_icon_588_NCGR, NARC_item_icon_item_icon_589_NCLR, AGB_ITEM_NONE }, + [ITEM_MICLE_BERRY] = { NARC_item_data_0187_bin, NARC_item_icon_item_icon_588_NCGR, NARC_item_icon_item_icon_589_NCLR, AGB_ITEM_NONE }, [ITEM_CUSTAP_BERRY] = { NARC_item_data_0188_bin, NARC_item_icon_item_icon_590_NCGR, NARC_item_icon_item_icon_591_NCLR, AGB_ITEM_NONE }, [ITEM_JABOCA_BERRY] = { NARC_item_data_0189_bin, NARC_item_icon_item_icon_592_NCGR, NARC_item_icon_item_icon_593_NCLR, AGB_ITEM_NONE }, - [ITEM_ROWAP_BERRY] = { NARC_item_data_0190_bin, NARC_item_icon_item_icon_594_NCGR, NARC_item_icon_item_icon_595_NCLR, AGB_ITEM_NONE }, + [ITEM_ROWAP_BERRY] = { NARC_item_data_0190_bin, NARC_item_icon_item_icon_594_NCGR, NARC_item_icon_item_icon_595_NCLR, AGB_ITEM_NONE }, [ITEM_BRIGHTPOWDER] = { NARC_item_data_0191_bin, NARC_item_icon_item_icon_250_NCGR, NARC_item_icon_item_icon_251_NCLR, AGB_ITEM_BRIGHT_POWDER }, - [ITEM_WHITE_HERB] = { NARC_item_data_0192_bin, NARC_item_icon_item_icon_252_NCGR, NARC_item_icon_item_icon_253_NCLR, AGB_ITEM_WHITE_HERB }, - [ITEM_MACHO_BRACE] = { NARC_item_data_0193_bin, NARC_item_icon_item_icon_254_NCGR, NARC_item_icon_item_icon_255_NCLR, AGB_ITEM_MACHO_BRACE }, - [ITEM_EXP__SHARE] = { NARC_item_data_0194_bin, NARC_item_icon_item_icon_256_NCGR, NARC_item_icon_item_icon_257_NCLR, AGB_ITEM_EXP_SHARE }, - [ITEM_QUICK_CLAW] = { NARC_item_data_0195_bin, NARC_item_icon_item_icon_258_NCGR, NARC_item_icon_item_icon_259_NCLR, AGB_ITEM_QUICK_CLAW }, - [ITEM_SOOTHE_BELL] = { NARC_item_data_0196_bin, NARC_item_icon_item_icon_260_NCGR, NARC_item_icon_item_icon_261_NCLR, AGB_ITEM_SOOTHE_BELL }, - [ITEM_MENTAL_HERB] = { NARC_item_data_0197_bin, NARC_item_icon_item_icon_252_NCGR, NARC_item_icon_item_icon_262_NCLR, AGB_ITEM_MENTAL_HERB }, - [ITEM_CHOICE_BAND] = { NARC_item_data_0198_bin, NARC_item_icon_item_icon_263_NCGR, NARC_item_icon_item_icon_264_NCLR, AGB_ITEM_CHOICE_BAND }, - [ITEM_KINGS_ROCK] = { NARC_item_data_0199_bin, NARC_item_icon_item_icon_265_NCGR, NARC_item_icon_item_icon_266_NCLR, AGB_ITEM_KINGS_ROCK }, + [ITEM_WHITE_HERB] = { NARC_item_data_0192_bin, NARC_item_icon_item_icon_252_NCGR, NARC_item_icon_item_icon_253_NCLR, AGB_ITEM_WHITE_HERB }, + [ITEM_MACHO_BRACE] = { NARC_item_data_0193_bin, NARC_item_icon_item_icon_254_NCGR, NARC_item_icon_item_icon_255_NCLR, AGB_ITEM_MACHO_BRACE }, + [ITEM_EXP__SHARE] = { NARC_item_data_0194_bin, NARC_item_icon_item_icon_256_NCGR, NARC_item_icon_item_icon_257_NCLR, AGB_ITEM_EXP_SHARE }, + [ITEM_QUICK_CLAW] = { NARC_item_data_0195_bin, NARC_item_icon_item_icon_258_NCGR, NARC_item_icon_item_icon_259_NCLR, AGB_ITEM_QUICK_CLAW }, + [ITEM_SOOTHE_BELL] = { NARC_item_data_0196_bin, NARC_item_icon_item_icon_260_NCGR, NARC_item_icon_item_icon_261_NCLR, AGB_ITEM_SOOTHE_BELL }, + [ITEM_MENTAL_HERB] = { NARC_item_data_0197_bin, NARC_item_icon_item_icon_252_NCGR, NARC_item_icon_item_icon_262_NCLR, AGB_ITEM_MENTAL_HERB }, + [ITEM_CHOICE_BAND] = { NARC_item_data_0198_bin, NARC_item_icon_item_icon_263_NCGR, NARC_item_icon_item_icon_264_NCLR, AGB_ITEM_CHOICE_BAND }, + [ITEM_KINGS_ROCK] = { NARC_item_data_0199_bin, NARC_item_icon_item_icon_265_NCGR, NARC_item_icon_item_icon_266_NCLR, AGB_ITEM_KINGS_ROCK }, [ITEM_SILVERPOWDER] = { NARC_item_data_0200_bin, NARC_item_icon_item_icon_267_NCGR, NARC_item_icon_item_icon_268_NCLR, AGB_ITEM_SILVER_POWDER }, - [ITEM_AMULET_COIN] = { NARC_item_data_0201_bin, NARC_item_icon_item_icon_269_NCGR, NARC_item_icon_item_icon_270_NCLR, AGB_ITEM_AMULET_COIN }, - [ITEM_CLEANSE_TAG] = { NARC_item_data_0202_bin, NARC_item_icon_item_icon_271_NCGR, NARC_item_icon_item_icon_272_NCLR, AGB_ITEM_CLEANSE_TAG }, - [ITEM_SOUL_DEW] = { NARC_item_data_0203_bin, NARC_item_icon_item_icon_273_NCGR, NARC_item_icon_item_icon_274_NCLR, AGB_ITEM_SOUL_DEW }, + [ITEM_AMULET_COIN] = { NARC_item_data_0201_bin, NARC_item_icon_item_icon_269_NCGR, NARC_item_icon_item_icon_270_NCLR, AGB_ITEM_AMULET_COIN }, + [ITEM_CLEANSE_TAG] = { NARC_item_data_0202_bin, NARC_item_icon_item_icon_271_NCGR, NARC_item_icon_item_icon_272_NCLR, AGB_ITEM_CLEANSE_TAG }, + [ITEM_SOUL_DEW] = { NARC_item_data_0203_bin, NARC_item_icon_item_icon_273_NCGR, NARC_item_icon_item_icon_274_NCLR, AGB_ITEM_SOUL_DEW }, [ITEM_DEEPSEATOOTH] = { NARC_item_data_0204_bin, NARC_item_icon_item_icon_275_NCGR, NARC_item_icon_item_icon_276_NCLR, AGB_ITEM_DEEP_SEA_TOOTH }, [ITEM_DEEPSEASCALE] = { NARC_item_data_0205_bin, NARC_item_icon_item_icon_277_NCGR, NARC_item_icon_item_icon_278_NCLR, AGB_ITEM_DEEP_SEA_SCALE }, - [ITEM_SMOKE_BALL] = { NARC_item_data_0206_bin, NARC_item_icon_item_icon_279_NCGR, NARC_item_icon_item_icon_280_NCLR, AGB_ITEM_SMOKE_BALL }, - [ITEM_EVERSTONE] = { NARC_item_data_0207_bin, NARC_item_icon_item_icon_281_NCGR, NARC_item_icon_item_icon_282_NCLR, AGB_ITEM_EVERSTONE }, - [ITEM_FOCUS_BAND] = { NARC_item_data_0208_bin, NARC_item_icon_item_icon_283_NCGR, NARC_item_icon_item_icon_284_NCLR, AGB_ITEM_FOCUS_BAND }, - [ITEM_LUCKY_EGG] = { NARC_item_data_0209_bin, NARC_item_icon_item_icon_285_NCGR, NARC_item_icon_item_icon_286_NCLR, AGB_ITEM_LUCKY_EGG }, - [ITEM_SCOPE_LENS] = { NARC_item_data_0210_bin, NARC_item_icon_item_icon_287_NCGR, NARC_item_icon_item_icon_288_NCLR, AGB_ITEM_SCOPE_LENS }, - [ITEM_METAL_COAT] = { NARC_item_data_0211_bin, NARC_item_icon_item_icon_289_NCGR, NARC_item_icon_item_icon_290_NCLR, AGB_ITEM_METAL_COAT }, - [ITEM_LEFTOVERS] = { NARC_item_data_0212_bin, NARC_item_icon_item_icon_291_NCGR, NARC_item_icon_item_icon_292_NCLR, AGB_ITEM_LEFTOVERS }, + [ITEM_SMOKE_BALL] = { NARC_item_data_0206_bin, NARC_item_icon_item_icon_279_NCGR, NARC_item_icon_item_icon_280_NCLR, AGB_ITEM_SMOKE_BALL }, + [ITEM_EVERSTONE] = { NARC_item_data_0207_bin, NARC_item_icon_item_icon_281_NCGR, NARC_item_icon_item_icon_282_NCLR, AGB_ITEM_EVERSTONE }, + [ITEM_FOCUS_BAND] = { NARC_item_data_0208_bin, NARC_item_icon_item_icon_283_NCGR, NARC_item_icon_item_icon_284_NCLR, AGB_ITEM_FOCUS_BAND }, + [ITEM_LUCKY_EGG] = { NARC_item_data_0209_bin, NARC_item_icon_item_icon_285_NCGR, NARC_item_icon_item_icon_286_NCLR, AGB_ITEM_LUCKY_EGG }, + [ITEM_SCOPE_LENS] = { NARC_item_data_0210_bin, NARC_item_icon_item_icon_287_NCGR, NARC_item_icon_item_icon_288_NCLR, AGB_ITEM_SCOPE_LENS }, + [ITEM_METAL_COAT] = { NARC_item_data_0211_bin, NARC_item_icon_item_icon_289_NCGR, NARC_item_icon_item_icon_290_NCLR, AGB_ITEM_METAL_COAT }, + [ITEM_LEFTOVERS] = { NARC_item_data_0212_bin, NARC_item_icon_item_icon_291_NCGR, NARC_item_icon_item_icon_292_NCLR, AGB_ITEM_LEFTOVERS }, [ITEM_DRAGON_SCALE] = { NARC_item_data_0213_bin, NARC_item_icon_item_icon_293_NCGR, NARC_item_icon_item_icon_294_NCLR, AGB_ITEM_DRAGON_SCALE }, - [ITEM_LIGHT_BALL] = { NARC_item_data_0214_bin, NARC_item_icon_item_icon_295_NCGR, NARC_item_icon_item_icon_296_NCLR, AGB_ITEM_LIGHT_BALL }, - [ITEM_SOFT_SAND] = { NARC_item_data_0215_bin, NARC_item_icon_item_icon_297_NCGR, NARC_item_icon_item_icon_298_NCLR, AGB_ITEM_SOFT_SAND }, - [ITEM_HARD_STONE] = { NARC_item_data_0216_bin, NARC_item_icon_item_icon_299_NCGR, NARC_item_icon_item_icon_300_NCLR, AGB_ITEM_HARD_STONE }, + [ITEM_LIGHT_BALL] = { NARC_item_data_0214_bin, NARC_item_icon_item_icon_295_NCGR, NARC_item_icon_item_icon_296_NCLR, AGB_ITEM_LIGHT_BALL }, + [ITEM_SOFT_SAND] = { NARC_item_data_0215_bin, NARC_item_icon_item_icon_297_NCGR, NARC_item_icon_item_icon_298_NCLR, AGB_ITEM_SOFT_SAND }, + [ITEM_HARD_STONE] = { NARC_item_data_0216_bin, NARC_item_icon_item_icon_299_NCGR, NARC_item_icon_item_icon_300_NCLR, AGB_ITEM_HARD_STONE }, [ITEM_MIRACLE_SEED] = { NARC_item_data_0217_bin, NARC_item_icon_item_icon_301_NCGR, NARC_item_icon_item_icon_302_NCLR, AGB_ITEM_MIRACLE_SEED }, [ITEM_BLACKGLASSES] = { NARC_item_data_0218_bin, NARC_item_icon_item_icon_303_NCGR, NARC_item_icon_item_icon_304_NCLR, AGB_ITEM_BLACK_GLASSES }, - [ITEM_BLACK_BELT] = { NARC_item_data_0219_bin, NARC_item_icon_item_icon_305_NCGR, NARC_item_icon_item_icon_304_NCLR, AGB_ITEM_BLACK_BELT }, - [ITEM_MAGNET] = { NARC_item_data_0220_bin, NARC_item_icon_item_icon_306_NCGR, NARC_item_icon_item_icon_307_NCLR, AGB_ITEM_MAGNET }, + [ITEM_BLACK_BELT] = { NARC_item_data_0219_bin, NARC_item_icon_item_icon_305_NCGR, NARC_item_icon_item_icon_304_NCLR, AGB_ITEM_BLACK_BELT }, + [ITEM_MAGNET] = { NARC_item_data_0220_bin, NARC_item_icon_item_icon_306_NCGR, NARC_item_icon_item_icon_307_NCLR, AGB_ITEM_MAGNET }, [ITEM_MYSTIC_WATER] = { NARC_item_data_0221_bin, NARC_item_icon_item_icon_308_NCGR, NARC_item_icon_item_icon_309_NCLR, AGB_ITEM_MYSTIC_WATER }, - [ITEM_SHARP_BEAK] = { NARC_item_data_0222_bin, NARC_item_icon_item_icon_310_NCGR, NARC_item_icon_item_icon_311_NCLR, AGB_ITEM_SHARP_BEAK }, - [ITEM_POISON_BARB] = { NARC_item_data_0223_bin, NARC_item_icon_item_icon_312_NCGR, NARC_item_icon_item_icon_313_NCLR, AGB_ITEM_POISON_BARB }, + [ITEM_SHARP_BEAK] = { NARC_item_data_0222_bin, NARC_item_icon_item_icon_310_NCGR, NARC_item_icon_item_icon_311_NCLR, AGB_ITEM_SHARP_BEAK }, + [ITEM_POISON_BARB] = { NARC_item_data_0223_bin, NARC_item_icon_item_icon_312_NCGR, NARC_item_icon_item_icon_313_NCLR, AGB_ITEM_POISON_BARB }, [ITEM_NEVERMELTICE] = { NARC_item_data_0224_bin, NARC_item_icon_item_icon_314_NCGR, NARC_item_icon_item_icon_315_NCLR, AGB_ITEM_NEVER_MELT_ICE }, - [ITEM_SPELL_TAG] = { NARC_item_data_0225_bin, NARC_item_icon_item_icon_316_NCGR, NARC_item_icon_item_icon_317_NCLR, AGB_ITEM_SPELL_TAG }, + [ITEM_SPELL_TAG] = { NARC_item_data_0225_bin, NARC_item_icon_item_icon_316_NCGR, NARC_item_icon_item_icon_317_NCLR, AGB_ITEM_SPELL_TAG }, [ITEM_TWISTEDSPOON] = { NARC_item_data_0226_bin, NARC_item_icon_item_icon_318_NCGR, NARC_item_icon_item_icon_319_NCLR, AGB_ITEM_TWISTED_SPOON }, - [ITEM_CHARCOAL] = { NARC_item_data_0227_bin, NARC_item_icon_item_icon_320_NCGR, NARC_item_icon_item_icon_321_NCLR, AGB_ITEM_CHARCOAL }, - [ITEM_DRAGON_FANG] = { NARC_item_data_0228_bin, NARC_item_icon_item_icon_322_NCGR, NARC_item_icon_item_icon_323_NCLR, AGB_ITEM_DRAGON_FANG }, - [ITEM_SILK_SCARF] = { NARC_item_data_0229_bin, NARC_item_icon_item_icon_324_NCGR, NARC_item_icon_item_icon_325_NCLR, AGB_ITEM_SILK_SCARF }, - [ITEM_UPGRADE] = { NARC_item_data_0230_bin, NARC_item_icon_item_icon_326_NCGR, NARC_item_icon_item_icon_327_NCLR, AGB_ITEM_UP_GRADE }, - [ITEM_SHELL_BELL] = { NARC_item_data_0231_bin, NARC_item_icon_item_icon_328_NCGR, NARC_item_icon_item_icon_077_NCLR, AGB_ITEM_SHELL_BELL }, - [ITEM_SEA_INCENSE] = { NARC_item_data_0232_bin, NARC_item_icon_item_icon_329_NCGR, NARC_item_icon_item_icon_330_NCLR, AGB_ITEM_SEA_INCENSE }, - [ITEM_LAX_INCENSE] = { NARC_item_data_0233_bin, NARC_item_icon_item_icon_331_NCGR, NARC_item_icon_item_icon_332_NCLR, AGB_ITEM_LAX_INCENSE }, - [ITEM_LUCKY_PUNCH] = { NARC_item_data_0234_bin, NARC_item_icon_item_icon_333_NCGR, NARC_item_icon_item_icon_334_NCLR, AGB_ITEM_LUCKY_PUNCH }, + [ITEM_CHARCOAL] = { NARC_item_data_0227_bin, NARC_item_icon_item_icon_320_NCGR, NARC_item_icon_item_icon_321_NCLR, AGB_ITEM_CHARCOAL }, + [ITEM_DRAGON_FANG] = { NARC_item_data_0228_bin, NARC_item_icon_item_icon_322_NCGR, NARC_item_icon_item_icon_323_NCLR, AGB_ITEM_DRAGON_FANG }, + [ITEM_SILK_SCARF] = { NARC_item_data_0229_bin, NARC_item_icon_item_icon_324_NCGR, NARC_item_icon_item_icon_325_NCLR, AGB_ITEM_SILK_SCARF }, + [ITEM_UPGRADE] = { NARC_item_data_0230_bin, NARC_item_icon_item_icon_326_NCGR, NARC_item_icon_item_icon_327_NCLR, AGB_ITEM_UP_GRADE }, + [ITEM_SHELL_BELL] = { NARC_item_data_0231_bin, NARC_item_icon_item_icon_328_NCGR, NARC_item_icon_item_icon_077_NCLR, AGB_ITEM_SHELL_BELL }, + [ITEM_SEA_INCENSE] = { NARC_item_data_0232_bin, NARC_item_icon_item_icon_329_NCGR, NARC_item_icon_item_icon_330_NCLR, AGB_ITEM_SEA_INCENSE }, + [ITEM_LAX_INCENSE] = { NARC_item_data_0233_bin, NARC_item_icon_item_icon_331_NCGR, NARC_item_icon_item_icon_332_NCLR, AGB_ITEM_LAX_INCENSE }, + [ITEM_LUCKY_PUNCH] = { NARC_item_data_0234_bin, NARC_item_icon_item_icon_333_NCGR, NARC_item_icon_item_icon_334_NCLR, AGB_ITEM_LUCKY_PUNCH }, [ITEM_METAL_POWDER] = { NARC_item_data_0235_bin, NARC_item_icon_item_icon_335_NCGR, NARC_item_icon_item_icon_336_NCLR, AGB_ITEM_METAL_POWDER }, - [ITEM_THICK_CLUB] = { NARC_item_data_0236_bin, NARC_item_icon_item_icon_337_NCGR, NARC_item_icon_item_icon_338_NCLR, AGB_ITEM_THICK_CLUB }, - [ITEM_STICK] = { NARC_item_data_0237_bin, NARC_item_icon_item_icon_339_NCGR, NARC_item_icon_item_icon_340_NCLR, AGB_ITEM_STICK }, - [ITEM_RED_SCARF] = { NARC_item_data_0238_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_342_NCLR, AGB_ITEM_RED_SCARF }, - [ITEM_BLUE_SCARF] = { NARC_item_data_0239_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_343_NCLR, AGB_ITEM_BLUE_SCARF }, - [ITEM_PINK_SCARF] = { NARC_item_data_0240_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_344_NCLR, AGB_ITEM_PINK_SCARF }, - [ITEM_GREEN_SCARF] = { NARC_item_data_0241_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_345_NCLR, AGB_ITEM_GREEN_SCARF }, + [ITEM_THICK_CLUB] = { NARC_item_data_0236_bin, NARC_item_icon_item_icon_337_NCGR, NARC_item_icon_item_icon_338_NCLR, AGB_ITEM_THICK_CLUB }, + [ITEM_STICK] = { NARC_item_data_0237_bin, NARC_item_icon_item_icon_339_NCGR, NARC_item_icon_item_icon_340_NCLR, AGB_ITEM_STICK }, + [ITEM_RED_SCARF] = { NARC_item_data_0238_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_342_NCLR, AGB_ITEM_RED_SCARF }, + [ITEM_BLUE_SCARF] = { NARC_item_data_0239_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_343_NCLR, AGB_ITEM_BLUE_SCARF }, + [ITEM_PINK_SCARF] = { NARC_item_data_0240_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_344_NCLR, AGB_ITEM_PINK_SCARF }, + [ITEM_GREEN_SCARF] = { NARC_item_data_0241_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_345_NCLR, AGB_ITEM_GREEN_SCARF }, [ITEM_YELLOW_SCARF] = { NARC_item_data_0242_bin, NARC_item_icon_item_icon_341_NCGR, NARC_item_icon_item_icon_346_NCLR, AGB_ITEM_YELLOW_SCARF }, - [ITEM_WIDE_LENS] = { NARC_item_data_0243_bin, NARC_item_icon_item_icon_490_NCGR, NARC_item_icon_item_icon_491_NCLR, AGB_ITEM_NONE }, - [ITEM_MUSCLE_BAND] = { NARC_item_data_0244_bin, NARC_item_icon_item_icon_492_NCGR, NARC_item_icon_item_icon_493_NCLR, AGB_ITEM_NONE }, + [ITEM_WIDE_LENS] = { NARC_item_data_0243_bin, NARC_item_icon_item_icon_490_NCGR, NARC_item_icon_item_icon_491_NCLR, AGB_ITEM_NONE }, + [ITEM_MUSCLE_BAND] = { NARC_item_data_0244_bin, NARC_item_icon_item_icon_492_NCGR, NARC_item_icon_item_icon_493_NCLR, AGB_ITEM_NONE }, [ITEM_WISE_GLASSES] = { NARC_item_data_0245_bin, NARC_item_icon_item_icon_494_NCGR, NARC_item_icon_item_icon_495_NCLR, AGB_ITEM_NONE }, - [ITEM_EXPERT_BELT] = { NARC_item_data_0246_bin, NARC_item_icon_item_icon_496_NCGR, NARC_item_icon_item_icon_497_NCLR, AGB_ITEM_NONE }, - [ITEM_LIGHT_CLAY] = { NARC_item_data_0247_bin, NARC_item_icon_item_icon_611_NCGR, NARC_item_icon_item_icon_612_NCLR, AGB_ITEM_NONE }, - [ITEM_LIFE_ORB] = { NARC_item_data_0248_bin, NARC_item_icon_item_icon_498_NCGR, NARC_item_icon_item_icon_499_NCLR, AGB_ITEM_NONE }, - [ITEM_POWER_HERB] = { NARC_item_data_0249_bin, NARC_item_icon_item_icon_500_NCGR, NARC_item_icon_item_icon_501_NCLR, AGB_ITEM_NONE }, - [ITEM_TOXIC_ORB] = { NARC_item_data_0250_bin, NARC_item_icon_item_icon_502_NCGR, NARC_item_icon_item_icon_503_NCLR, AGB_ITEM_NONE }, - [ITEM_FLAME_ORB] = { NARC_item_data_0251_bin, NARC_item_icon_item_icon_504_NCGR, NARC_item_icon_item_icon_505_NCLR, AGB_ITEM_NONE }, + [ITEM_EXPERT_BELT] = { NARC_item_data_0246_bin, NARC_item_icon_item_icon_496_NCGR, NARC_item_icon_item_icon_497_NCLR, AGB_ITEM_NONE }, + [ITEM_LIGHT_CLAY] = { NARC_item_data_0247_bin, NARC_item_icon_item_icon_611_NCGR, NARC_item_icon_item_icon_612_NCLR, AGB_ITEM_NONE }, + [ITEM_LIFE_ORB] = { NARC_item_data_0248_bin, NARC_item_icon_item_icon_498_NCGR, NARC_item_icon_item_icon_499_NCLR, AGB_ITEM_NONE }, + [ITEM_POWER_HERB] = { NARC_item_data_0249_bin, NARC_item_icon_item_icon_500_NCGR, NARC_item_icon_item_icon_501_NCLR, AGB_ITEM_NONE }, + [ITEM_TOXIC_ORB] = { NARC_item_data_0250_bin, NARC_item_icon_item_icon_502_NCGR, NARC_item_icon_item_icon_503_NCLR, AGB_ITEM_NONE }, + [ITEM_FLAME_ORB] = { NARC_item_data_0251_bin, NARC_item_icon_item_icon_504_NCGR, NARC_item_icon_item_icon_505_NCLR, AGB_ITEM_NONE }, [ITEM_QUICK_POWDER] = { NARC_item_data_0252_bin, NARC_item_icon_item_icon_335_NCGR, NARC_item_icon_item_icon_658_NCLR, AGB_ITEM_NONE }, - [ITEM_FOCUS_SASH] = { NARC_item_data_0253_bin, NARC_item_icon_item_icon_659_NCGR, NARC_item_icon_item_icon_660_NCLR, AGB_ITEM_NONE }, - [ITEM_ZOOM_LENS] = { NARC_item_data_0254_bin, NARC_item_icon_item_icon_506_NCGR, NARC_item_icon_item_icon_507_NCLR, AGB_ITEM_NONE }, - [ITEM_METRONOME] = { NARC_item_data_0255_bin, NARC_item_icon_item_icon_508_NCGR, NARC_item_icon_item_icon_509_NCLR, AGB_ITEM_NONE }, - [ITEM_IRON_BALL] = { NARC_item_data_0256_bin, NARC_item_icon_item_icon_613_NCGR, NARC_item_icon_item_icon_614_NCLR, AGB_ITEM_NONE }, + [ITEM_FOCUS_SASH] = { NARC_item_data_0253_bin, NARC_item_icon_item_icon_659_NCGR, NARC_item_icon_item_icon_660_NCLR, AGB_ITEM_NONE }, + [ITEM_ZOOM_LENS] = { NARC_item_data_0254_bin, NARC_item_icon_item_icon_506_NCGR, NARC_item_icon_item_icon_507_NCLR, AGB_ITEM_NONE }, + [ITEM_METRONOME] = { NARC_item_data_0255_bin, NARC_item_icon_item_icon_508_NCGR, NARC_item_icon_item_icon_509_NCLR, AGB_ITEM_NONE }, + [ITEM_IRON_BALL] = { NARC_item_data_0256_bin, NARC_item_icon_item_icon_613_NCGR, NARC_item_icon_item_icon_614_NCLR, AGB_ITEM_NONE }, [ITEM_LAGGING_TAIL] = { NARC_item_data_0257_bin, NARC_item_icon_item_icon_650_NCGR, NARC_item_icon_item_icon_651_NCLR, AGB_ITEM_NONE }, [ITEM_DESTINY_KNOT] = { NARC_item_data_0258_bin, NARC_item_icon_item_icon_654_NCGR, NARC_item_icon_item_icon_655_NCLR, AGB_ITEM_NONE }, [ITEM_BLACK_SLUDGE] = { NARC_item_data_0259_bin, NARC_item_icon_item_icon_510_NCGR, NARC_item_icon_item_icon_511_NCLR, AGB_ITEM_NONE }, - [ITEM_ICY_ROCK] = { NARC_item_data_0260_bin, NARC_item_icon_item_icon_636_NCGR, NARC_item_icon_item_icon_637_NCLR, AGB_ITEM_NONE }, - [ITEM_SMOOTH_ROCK] = { NARC_item_data_0261_bin, NARC_item_icon_item_icon_638_NCGR, NARC_item_icon_item_icon_639_NCLR, AGB_ITEM_NONE }, - [ITEM_HEAT_ROCK] = { NARC_item_data_0262_bin, NARC_item_icon_item_icon_640_NCGR, NARC_item_icon_item_icon_641_NCLR, AGB_ITEM_NONE }, - [ITEM_DAMP_ROCK] = { NARC_item_data_0263_bin, NARC_item_icon_item_icon_642_NCGR, NARC_item_icon_item_icon_643_NCLR, AGB_ITEM_NONE }, - [ITEM_GRIP_CLAW] = { NARC_item_data_0264_bin, NARC_item_icon_item_icon_652_NCGR, NARC_item_icon_item_icon_653_NCLR, AGB_ITEM_NONE }, + [ITEM_ICY_ROCK] = { NARC_item_data_0260_bin, NARC_item_icon_item_icon_636_NCGR, NARC_item_icon_item_icon_637_NCLR, AGB_ITEM_NONE }, + [ITEM_SMOOTH_ROCK] = { NARC_item_data_0261_bin, NARC_item_icon_item_icon_638_NCGR, NARC_item_icon_item_icon_639_NCLR, AGB_ITEM_NONE }, + [ITEM_HEAT_ROCK] = { NARC_item_data_0262_bin, NARC_item_icon_item_icon_640_NCGR, NARC_item_icon_item_icon_641_NCLR, AGB_ITEM_NONE }, + [ITEM_DAMP_ROCK] = { NARC_item_data_0263_bin, NARC_item_icon_item_icon_642_NCGR, NARC_item_icon_item_icon_643_NCLR, AGB_ITEM_NONE }, + [ITEM_GRIP_CLAW] = { NARC_item_data_0264_bin, NARC_item_icon_item_icon_652_NCGR, NARC_item_icon_item_icon_653_NCLR, AGB_ITEM_NONE }, [ITEM_CHOICE_SCARF] = { NARC_item_data_0265_bin, NARC_item_icon_item_icon_512_NCGR, NARC_item_icon_item_icon_513_NCLR, AGB_ITEM_NONE }, - [ITEM_STICKY_BARB] = { NARC_item_data_0266_bin, NARC_item_icon_item_icon_514_NCGR, NARC_item_icon_item_icon_515_NCLR, AGB_ITEM_NONE }, + [ITEM_STICKY_BARB] = { NARC_item_data_0266_bin, NARC_item_icon_item_icon_514_NCGR, NARC_item_icon_item_icon_515_NCLR, AGB_ITEM_NONE }, [ITEM_POWER_BRACER] = { NARC_item_data_0267_bin, NARC_item_icon_item_icon_683_NCGR, NARC_item_icon_item_icon_684_NCLR, AGB_ITEM_NONE }, - [ITEM_POWER_BELT] = { NARC_item_data_0268_bin, NARC_item_icon_item_icon_691_NCGR, NARC_item_icon_item_icon_692_NCLR, AGB_ITEM_NONE }, - [ITEM_POWER_LENS] = { NARC_item_data_0269_bin, NARC_item_icon_item_icon_693_NCGR, NARC_item_icon_item_icon_694_NCLR, AGB_ITEM_NONE }, - [ITEM_POWER_BAND] = { NARC_item_data_0270_bin, NARC_item_icon_item_icon_685_NCGR, NARC_item_icon_item_icon_686_NCLR, AGB_ITEM_NONE }, + [ITEM_POWER_BELT] = { NARC_item_data_0268_bin, NARC_item_icon_item_icon_691_NCGR, NARC_item_icon_item_icon_692_NCLR, AGB_ITEM_NONE }, + [ITEM_POWER_LENS] = { NARC_item_data_0269_bin, NARC_item_icon_item_icon_693_NCGR, NARC_item_icon_item_icon_694_NCLR, AGB_ITEM_NONE }, + [ITEM_POWER_BAND] = { NARC_item_data_0270_bin, NARC_item_icon_item_icon_685_NCGR, NARC_item_icon_item_icon_686_NCLR, AGB_ITEM_NONE }, [ITEM_POWER_ANKLET] = { NARC_item_data_0271_bin, NARC_item_icon_item_icon_687_NCGR, NARC_item_icon_item_icon_688_NCLR, AGB_ITEM_NONE }, [ITEM_POWER_WEIGHT] = { NARC_item_data_0272_bin, NARC_item_icon_item_icon_689_NCGR, NARC_item_icon_item_icon_690_NCLR, AGB_ITEM_NONE }, - [ITEM_SHED_SHELL] = { NARC_item_data_0273_bin, NARC_item_icon_item_icon_516_NCGR, NARC_item_icon_item_icon_517_NCLR, AGB_ITEM_NONE }, - [ITEM_BIG_ROOT] = { NARC_item_data_0274_bin, NARC_item_icon_item_icon_518_NCGR, NARC_item_icon_item_icon_519_NCLR, AGB_ITEM_NONE }, + [ITEM_SHED_SHELL] = { NARC_item_data_0273_bin, NARC_item_icon_item_icon_516_NCGR, NARC_item_icon_item_icon_517_NCLR, AGB_ITEM_NONE }, + [ITEM_BIG_ROOT] = { NARC_item_data_0274_bin, NARC_item_icon_item_icon_518_NCGR, NARC_item_icon_item_icon_519_NCLR, AGB_ITEM_NONE }, [ITEM_CHOICE_SPECS] = { NARC_item_data_0275_bin, NARC_item_icon_item_icon_520_NCGR, NARC_item_icon_item_icon_521_NCLR, AGB_ITEM_NONE }, - [ITEM_FLAME_PLATE] = { NARC_item_data_0276_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_620_NCLR, AGB_ITEM_NONE }, + [ITEM_FLAME_PLATE] = { NARC_item_data_0276_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_620_NCLR, AGB_ITEM_NONE }, [ITEM_SPLASH_PLATE] = { NARC_item_data_0277_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_621_NCLR, AGB_ITEM_NONE }, - [ITEM_ZAP_PLATE] = { NARC_item_data_0278_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_622_NCLR, AGB_ITEM_NONE }, + [ITEM_ZAP_PLATE] = { NARC_item_data_0278_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_622_NCLR, AGB_ITEM_NONE }, [ITEM_MEADOW_PLATE] = { NARC_item_data_0279_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_623_NCLR, AGB_ITEM_NONE }, [ITEM_ICICLE_PLATE] = { NARC_item_data_0280_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_624_NCLR, AGB_ITEM_NONE }, - [ITEM_FIST_PLATE] = { NARC_item_data_0281_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_625_NCLR, AGB_ITEM_NONE }, - [ITEM_TOXIC_PLATE] = { NARC_item_data_0282_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_626_NCLR, AGB_ITEM_NONE }, - [ITEM_EARTH_PLATE] = { NARC_item_data_0283_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_627_NCLR, AGB_ITEM_NONE }, - [ITEM_SKY_PLATE] = { NARC_item_data_0284_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_628_NCLR, AGB_ITEM_NONE }, - [ITEM_MIND_PLATE] = { NARC_item_data_0285_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_629_NCLR, AGB_ITEM_NONE }, + [ITEM_FIST_PLATE] = { NARC_item_data_0281_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_625_NCLR, AGB_ITEM_NONE }, + [ITEM_TOXIC_PLATE] = { NARC_item_data_0282_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_626_NCLR, AGB_ITEM_NONE }, + [ITEM_EARTH_PLATE] = { NARC_item_data_0283_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_627_NCLR, AGB_ITEM_NONE }, + [ITEM_SKY_PLATE] = { NARC_item_data_0284_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_628_NCLR, AGB_ITEM_NONE }, + [ITEM_MIND_PLATE] = { NARC_item_data_0285_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_629_NCLR, AGB_ITEM_NONE }, [ITEM_INSECT_PLATE] = { NARC_item_data_0286_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_630_NCLR, AGB_ITEM_NONE }, - [ITEM_STONE_PLATE] = { NARC_item_data_0287_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_631_NCLR, AGB_ITEM_NONE }, + [ITEM_STONE_PLATE] = { NARC_item_data_0287_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_631_NCLR, AGB_ITEM_NONE }, [ITEM_SPOOKY_PLATE] = { NARC_item_data_0288_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_632_NCLR, AGB_ITEM_NONE }, - [ITEM_DRACO_PLATE] = { NARC_item_data_0289_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_633_NCLR, AGB_ITEM_NONE }, - [ITEM_DREAD_PLATE] = { NARC_item_data_0290_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_634_NCLR, AGB_ITEM_NONE }, - [ITEM_IRON_PLATE] = { NARC_item_data_0291_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_635_NCLR, AGB_ITEM_NONE }, - [ITEM_ODD_INCENSE] = { NARC_item_data_0292_bin, NARC_item_icon_item_icon_522_NCGR, NARC_item_icon_item_icon_523_NCLR, AGB_ITEM_NONE }, + [ITEM_DRACO_PLATE] = { NARC_item_data_0289_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_633_NCLR, AGB_ITEM_NONE }, + [ITEM_DREAD_PLATE] = { NARC_item_data_0290_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_634_NCLR, AGB_ITEM_NONE }, + [ITEM_IRON_PLATE] = { NARC_item_data_0291_bin, NARC_item_icon_item_icon_619_NCGR, NARC_item_icon_item_icon_635_NCLR, AGB_ITEM_NONE }, + [ITEM_ODD_INCENSE] = { NARC_item_data_0292_bin, NARC_item_icon_item_icon_522_NCGR, NARC_item_icon_item_icon_523_NCLR, AGB_ITEM_NONE }, [ITEM_ROCK_INCENSE] = { NARC_item_data_0293_bin, NARC_item_icon_item_icon_524_NCGR, NARC_item_icon_item_icon_525_NCLR, AGB_ITEM_NONE }, [ITEM_FULL_INCENSE] = { NARC_item_data_0294_bin, NARC_item_icon_item_icon_526_NCGR, NARC_item_icon_item_icon_527_NCLR, AGB_ITEM_NONE }, [ITEM_WAVE_INCENSE] = { NARC_item_data_0295_bin, NARC_item_icon_item_icon_528_NCGR, NARC_item_icon_item_icon_529_NCLR, AGB_ITEM_NONE }, [ITEM_ROSE_INCENSE] = { NARC_item_data_0296_bin, NARC_item_icon_item_icon_530_NCGR, NARC_item_icon_item_icon_531_NCLR, AGB_ITEM_NONE }, [ITEM_LUCK_INCENSE] = { NARC_item_data_0297_bin, NARC_item_icon_item_icon_532_NCGR, NARC_item_icon_item_icon_533_NCLR, AGB_ITEM_NONE }, [ITEM_PURE_INCENSE] = { NARC_item_data_0298_bin, NARC_item_icon_item_icon_534_NCGR, NARC_item_icon_item_icon_535_NCLR, AGB_ITEM_NONE }, - [ITEM_PROTECTOR] = { NARC_item_data_0299_bin, NARC_item_icon_item_icon_695_NCGR, NARC_item_icon_item_icon_696_NCLR, AGB_ITEM_NONE }, - [ITEM_ELECTIRIZER] = { NARC_item_data_0300_bin, NARC_item_icon_item_icon_536_NCGR, NARC_item_icon_item_icon_537_NCLR, AGB_ITEM_NONE }, - [ITEM_MAGMARIZER] = { NARC_item_data_0301_bin, NARC_item_icon_item_icon_538_NCGR, NARC_item_icon_item_icon_539_NCLR, AGB_ITEM_NONE }, + [ITEM_PROTECTOR] = { NARC_item_data_0299_bin, NARC_item_icon_item_icon_695_NCGR, NARC_item_icon_item_icon_696_NCLR, AGB_ITEM_NONE }, + [ITEM_ELECTIRIZER] = { NARC_item_data_0300_bin, NARC_item_icon_item_icon_536_NCGR, NARC_item_icon_item_icon_537_NCLR, AGB_ITEM_NONE }, + [ITEM_MAGMARIZER] = { NARC_item_data_0301_bin, NARC_item_icon_item_icon_538_NCGR, NARC_item_icon_item_icon_539_NCLR, AGB_ITEM_NONE }, [ITEM_DUBIOUS_DISC] = { NARC_item_data_0302_bin, NARC_item_icon_item_icon_540_NCGR, NARC_item_icon_item_icon_541_NCLR, AGB_ITEM_NONE }, [ITEM_REAPER_CLOTH] = { NARC_item_data_0303_bin, NARC_item_icon_item_icon_542_NCGR, NARC_item_icon_item_icon_543_NCLR, AGB_ITEM_NONE }, - [ITEM_RAZOR_CLAW] = { NARC_item_data_0304_bin, NARC_item_icon_item_icon_544_NCGR, NARC_item_icon_item_icon_545_NCLR, AGB_ITEM_NONE }, - [ITEM_RAZOR_FANG] = { NARC_item_data_0305_bin, NARC_item_icon_item_icon_546_NCGR, NARC_item_icon_item_icon_547_NCLR, AGB_ITEM_NONE }, - [ITEM_TM01] = { NARC_item_data_0306_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_TM01 }, - [ITEM_TM02] = { NARC_item_data_0307_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_399_NCLR, AGB_ITEM_TM02 }, - [ITEM_TM03] = { NARC_item_data_0308_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_TM03 }, - [ITEM_TM04] = { NARC_item_data_0309_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM04 }, - [ITEM_TM05] = { NARC_item_data_0310_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM05 }, - [ITEM_TM06] = { NARC_item_data_0311_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_403_NCLR, AGB_ITEM_TM06 }, - [ITEM_TM07] = { NARC_item_data_0312_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_TM07 }, - [ITEM_TM08] = { NARC_item_data_0313_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_TM08 }, - [ITEM_TM09] = { NARC_item_data_0314_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_TM09 }, - [ITEM_TM10] = { NARC_item_data_0315_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM10 }, - [ITEM_TM11] = { NARC_item_data_0316_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM11 }, - [ITEM_TM12] = { NARC_item_data_0317_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM12 }, - [ITEM_TM13] = { NARC_item_data_0318_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_TM13 }, - [ITEM_TM14] = { NARC_item_data_0319_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_TM14 }, - [ITEM_TM15] = { NARC_item_data_0320_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM15 }, - [ITEM_TM16] = { NARC_item_data_0321_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM16 }, - [ITEM_TM17] = { NARC_item_data_0322_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM17 }, - [ITEM_TM18] = { NARC_item_data_0323_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_TM18 }, - [ITEM_TM19] = { NARC_item_data_0324_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_TM19 }, - [ITEM_TM20] = { NARC_item_data_0325_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM20 }, - [ITEM_TM21] = { NARC_item_data_0326_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM21 }, - [ITEM_TM22] = { NARC_item_data_0327_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_TM22 }, - [ITEM_TM23] = { NARC_item_data_0328_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_TM23 }, - [ITEM_TM24] = { NARC_item_data_0329_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_TM24 }, - [ITEM_TM25] = { NARC_item_data_0330_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_TM25 }, - [ITEM_TM26] = { NARC_item_data_0331_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_410_NCLR, AGB_ITEM_TM26 }, - [ITEM_TM27] = { NARC_item_data_0332_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM27 }, - [ITEM_TM28] = { NARC_item_data_0333_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_410_NCLR, AGB_ITEM_TM28 }, - [ITEM_TM29] = { NARC_item_data_0334_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM29 }, - [ITEM_TM30] = { NARC_item_data_0335_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_411_NCLR, AGB_ITEM_TM30 }, - [ITEM_TM31] = { NARC_item_data_0336_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_TM31 }, - [ITEM_TM32] = { NARC_item_data_0337_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM32 }, - [ITEM_TM33] = { NARC_item_data_0338_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM33 }, - [ITEM_TM34] = { NARC_item_data_0339_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_TM34 }, - [ITEM_TM35] = { NARC_item_data_0340_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM35 }, - [ITEM_TM36] = { NARC_item_data_0341_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_403_NCLR, AGB_ITEM_TM36 }, - [ITEM_TM37] = { NARC_item_data_0342_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_TM37 }, - [ITEM_TM38] = { NARC_item_data_0343_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM38 }, - [ITEM_TM39] = { NARC_item_data_0344_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_TM39 }, - [ITEM_TM40] = { NARC_item_data_0345_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_TM40 }, - [ITEM_TM41] = { NARC_item_data_0346_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM41 }, - [ITEM_TM42] = { NARC_item_data_0347_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM42 }, - [ITEM_TM43] = { NARC_item_data_0348_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM43 }, - [ITEM_TM44] = { NARC_item_data_0349_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM44 }, - [ITEM_TM45] = { NARC_item_data_0350_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM45 }, - [ITEM_TM46] = { NARC_item_data_0351_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM46 }, - [ITEM_TM47] = { NARC_item_data_0352_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_TM47 }, - [ITEM_TM48] = { NARC_item_data_0353_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM48 }, - [ITEM_TM49] = { NARC_item_data_0354_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM49 }, - [ITEM_TM50] = { NARC_item_data_0355_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM50 }, - [ITEM_TM51] = { NARC_item_data_0356_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_NONE }, - [ITEM_TM52] = { NARC_item_data_0357_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_NONE }, - [ITEM_TM53] = { NARC_item_data_0358_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_NONE }, - [ITEM_TM54] = { NARC_item_data_0359_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM55] = { NARC_item_data_0360_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_NONE }, - [ITEM_TM56] = { NARC_item_data_0361_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, - [ITEM_TM57] = { NARC_item_data_0362_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_NONE }, - [ITEM_TM58] = { NARC_item_data_0363_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM59] = { NARC_item_data_0364_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_399_NCLR, AGB_ITEM_NONE }, - [ITEM_TM60] = { NARC_item_data_0365_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_NONE }, - [ITEM_TM61] = { NARC_item_data_0366_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_NONE }, - [ITEM_TM62] = { NARC_item_data_0367_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_610_NCLR, AGB_ITEM_NONE }, - [ITEM_TM63] = { NARC_item_data_0368_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, - [ITEM_TM64] = { NARC_item_data_0369_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM65] = { NARC_item_data_0370_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_411_NCLR, AGB_ITEM_NONE }, - [ITEM_TM66] = { NARC_item_data_0371_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, - [ITEM_TM67] = { NARC_item_data_0372_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM68] = { NARC_item_data_0373_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM69] = { NARC_item_data_0374_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, - [ITEM_TM70] = { NARC_item_data_0375_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM71] = { NARC_item_data_0376_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, - [ITEM_TM72] = { NARC_item_data_0377_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_NONE }, - [ITEM_TM73] = { NARC_item_data_0378_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_NONE }, - [ITEM_TM74] = { NARC_item_data_0379_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_NONE }, - [ITEM_TM75] = { NARC_item_data_0380_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM76] = { NARC_item_data_0381_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, - [ITEM_TM77] = { NARC_item_data_0382_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM78] = { NARC_item_data_0383_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM79] = { NARC_item_data_0384_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, - [ITEM_TM80] = { NARC_item_data_0385_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, - [ITEM_TM81] = { NARC_item_data_0386_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_610_NCLR, AGB_ITEM_NONE }, - [ITEM_TM82] = { NARC_item_data_0387_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM83] = { NARC_item_data_0388_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM84] = { NARC_item_data_0389_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_403_NCLR, AGB_ITEM_NONE }, - [ITEM_TM85] = { NARC_item_data_0390_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_NONE }, - [ITEM_TM86] = { NARC_item_data_0391_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_NONE }, - [ITEM_TM87] = { NARC_item_data_0392_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM88] = { NARC_item_data_0393_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_NONE }, - [ITEM_TM89] = { NARC_item_data_0394_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_610_NCLR, AGB_ITEM_NONE }, - [ITEM_TM90] = { NARC_item_data_0395_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, - [ITEM_TM91] = { NARC_item_data_0396_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_NONE }, - [ITEM_TM92] = { NARC_item_data_0397_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_NONE }, - [ITEM_HM01] = { NARC_item_data_0398_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_HM01 }, - [ITEM_HM02] = { NARC_item_data_0399_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_HM02 }, - [ITEM_HM03] = { NARC_item_data_0400_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_HM03 }, - [ITEM_HM04] = { NARC_item_data_0401_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_HM04 }, - [ITEM_HM05] = { NARC_item_data_0402_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_HM05 }, - [ITEM_HM06] = { NARC_item_data_0403_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_HM06 }, - [ITEM_HM07] = { NARC_item_data_0404_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_HM07 }, - [ITEM_HM08] = { NARC_item_data_0405_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_HM08 }, + [ITEM_RAZOR_CLAW] = { NARC_item_data_0304_bin, NARC_item_icon_item_icon_544_NCGR, NARC_item_icon_item_icon_545_NCLR, AGB_ITEM_NONE }, + [ITEM_RAZOR_FANG] = { NARC_item_data_0305_bin, NARC_item_icon_item_icon_546_NCGR, NARC_item_icon_item_icon_547_NCLR, AGB_ITEM_NONE }, + [ITEM_TM01] = { NARC_item_data_0306_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_TM01 }, + [ITEM_TM02] = { NARC_item_data_0307_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_399_NCLR, AGB_ITEM_TM02 }, + [ITEM_TM03] = { NARC_item_data_0308_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_TM03 }, + [ITEM_TM04] = { NARC_item_data_0309_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM04 }, + [ITEM_TM05] = { NARC_item_data_0310_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM05 }, + [ITEM_TM06] = { NARC_item_data_0311_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_403_NCLR, AGB_ITEM_TM06 }, + [ITEM_TM07] = { NARC_item_data_0312_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_TM07 }, + [ITEM_TM08] = { NARC_item_data_0313_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_TM08 }, + [ITEM_TM09] = { NARC_item_data_0314_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_TM09 }, + [ITEM_TM10] = { NARC_item_data_0315_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM10 }, + [ITEM_TM11] = { NARC_item_data_0316_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM11 }, + [ITEM_TM12] = { NARC_item_data_0317_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM12 }, + [ITEM_TM13] = { NARC_item_data_0318_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_TM13 }, + [ITEM_TM14] = { NARC_item_data_0319_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_TM14 }, + [ITEM_TM15] = { NARC_item_data_0320_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM15 }, + [ITEM_TM16] = { NARC_item_data_0321_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM16 }, + [ITEM_TM17] = { NARC_item_data_0322_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM17 }, + [ITEM_TM18] = { NARC_item_data_0323_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_TM18 }, + [ITEM_TM19] = { NARC_item_data_0324_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_TM19 }, + [ITEM_TM20] = { NARC_item_data_0325_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM20 }, + [ITEM_TM21] = { NARC_item_data_0326_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM21 }, + [ITEM_TM22] = { NARC_item_data_0327_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_TM22 }, + [ITEM_TM23] = { NARC_item_data_0328_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_TM23 }, + [ITEM_TM24] = { NARC_item_data_0329_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_TM24 }, + [ITEM_TM25] = { NARC_item_data_0330_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_TM25 }, + [ITEM_TM26] = { NARC_item_data_0331_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_410_NCLR, AGB_ITEM_TM26 }, + [ITEM_TM27] = { NARC_item_data_0332_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM27 }, + [ITEM_TM28] = { NARC_item_data_0333_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_410_NCLR, AGB_ITEM_TM28 }, + [ITEM_TM29] = { NARC_item_data_0334_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM29 }, + [ITEM_TM30] = { NARC_item_data_0335_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_411_NCLR, AGB_ITEM_TM30 }, + [ITEM_TM31] = { NARC_item_data_0336_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_TM31 }, + [ITEM_TM32] = { NARC_item_data_0337_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM32 }, + [ITEM_TM33] = { NARC_item_data_0338_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM33 }, + [ITEM_TM34] = { NARC_item_data_0339_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_TM34 }, + [ITEM_TM35] = { NARC_item_data_0340_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM35 }, + [ITEM_TM36] = { NARC_item_data_0341_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_403_NCLR, AGB_ITEM_TM36 }, + [ITEM_TM37] = { NARC_item_data_0342_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_TM37 }, + [ITEM_TM38] = { NARC_item_data_0343_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM38 }, + [ITEM_TM39] = { NARC_item_data_0344_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_TM39 }, + [ITEM_TM40] = { NARC_item_data_0345_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_TM40 }, + [ITEM_TM41] = { NARC_item_data_0346_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM41 }, + [ITEM_TM42] = { NARC_item_data_0347_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM42 }, + [ITEM_TM43] = { NARC_item_data_0348_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM43 }, + [ITEM_TM44] = { NARC_item_data_0349_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM44 }, + [ITEM_TM45] = { NARC_item_data_0350_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_TM45 }, + [ITEM_TM46] = { NARC_item_data_0351_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM46 }, + [ITEM_TM47] = { NARC_item_data_0352_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_TM47 }, + [ITEM_TM48] = { NARC_item_data_0353_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_TM48 }, + [ITEM_TM49] = { NARC_item_data_0354_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_TM49 }, + [ITEM_TM50] = { NARC_item_data_0355_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_TM50 }, + [ITEM_TM51] = { NARC_item_data_0356_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_NONE }, + [ITEM_TM52] = { NARC_item_data_0357_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_NONE }, + [ITEM_TM53] = { NARC_item_data_0358_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_NONE }, + [ITEM_TM54] = { NARC_item_data_0359_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM55] = { NARC_item_data_0360_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_NONE }, + [ITEM_TM56] = { NARC_item_data_0361_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, + [ITEM_TM57] = { NARC_item_data_0362_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_NONE }, + [ITEM_TM58] = { NARC_item_data_0363_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM59] = { NARC_item_data_0364_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_399_NCLR, AGB_ITEM_NONE }, + [ITEM_TM60] = { NARC_item_data_0365_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_NONE }, + [ITEM_TM61] = { NARC_item_data_0366_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_406_NCLR, AGB_ITEM_NONE }, + [ITEM_TM62] = { NARC_item_data_0367_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_610_NCLR, AGB_ITEM_NONE }, + [ITEM_TM63] = { NARC_item_data_0368_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, + [ITEM_TM64] = { NARC_item_data_0369_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM65] = { NARC_item_data_0370_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_411_NCLR, AGB_ITEM_NONE }, + [ITEM_TM66] = { NARC_item_data_0371_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, + [ITEM_TM67] = { NARC_item_data_0372_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM68] = { NARC_item_data_0373_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM69] = { NARC_item_data_0374_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, + [ITEM_TM70] = { NARC_item_data_0375_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM71] = { NARC_item_data_0376_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, + [ITEM_TM72] = { NARC_item_data_0377_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_404_NCLR, AGB_ITEM_NONE }, + [ITEM_TM73] = { NARC_item_data_0378_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_409_NCLR, AGB_ITEM_NONE }, + [ITEM_TM74] = { NARC_item_data_0379_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_NONE }, + [ITEM_TM75] = { NARC_item_data_0380_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM76] = { NARC_item_data_0381_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, + [ITEM_TM77] = { NARC_item_data_0382_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM78] = { NARC_item_data_0383_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM79] = { NARC_item_data_0384_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_407_NCLR, AGB_ITEM_NONE }, + [ITEM_TM80] = { NARC_item_data_0385_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_412_NCLR, AGB_ITEM_NONE }, + [ITEM_TM81] = { NARC_item_data_0386_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_610_NCLR, AGB_ITEM_NONE }, + [ITEM_TM82] = { NARC_item_data_0387_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM83] = { NARC_item_data_0388_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM84] = { NARC_item_data_0389_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_403_NCLR, AGB_ITEM_NONE }, + [ITEM_TM85] = { NARC_item_data_0390_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_NONE }, + [ITEM_TM86] = { NARC_item_data_0391_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_405_NCLR, AGB_ITEM_NONE }, + [ITEM_TM87] = { NARC_item_data_0392_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM88] = { NARC_item_data_0393_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_NONE }, + [ITEM_TM89] = { NARC_item_data_0394_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_610_NCLR, AGB_ITEM_NONE }, + [ITEM_TM90] = { NARC_item_data_0395_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_NONE }, + [ITEM_TM91] = { NARC_item_data_0396_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_408_NCLR, AGB_ITEM_NONE }, + [ITEM_TM92] = { NARC_item_data_0397_bin, NARC_item_icon_item_icon_397_NCGR, NARC_item_icon_item_icon_401_NCLR, AGB_ITEM_NONE }, + [ITEM_HM01] = { NARC_item_data_0398_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_HM01 }, + [ITEM_HM02] = { NARC_item_data_0399_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_413_NCLR, AGB_ITEM_HM02 }, + [ITEM_HM03] = { NARC_item_data_0400_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_HM03 }, + [ITEM_HM04] = { NARC_item_data_0401_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_HM04 }, + [ITEM_HM05] = { NARC_item_data_0402_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_HM05 }, + [ITEM_HM06] = { NARC_item_data_0403_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_398_NCLR, AGB_ITEM_HM06 }, + [ITEM_HM07] = { NARC_item_data_0404_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_400_NCLR, AGB_ITEM_HM07 }, + [ITEM_HM08] = { NARC_item_data_0405_bin, NARC_item_icon_item_icon_414_NCGR, NARC_item_icon_item_icon_402_NCLR, AGB_ITEM_HM08 }, [ITEM_EXPLORER_KIT] = { NARC_item_data_0000_bin, NARC_item_icon_item_icon_793_NCGR, NARC_item_icon_item_icon_794_NCLR, AGB_ITEM_NONE }, - [ITEM_LOOT_SACK] = { NARC_item_data_0406_bin, NARC_item_icon_item_icon_550_NCGR, NARC_item_icon_item_icon_551_NCLR, AGB_ITEM_NONE }, - [ITEM_RULE_BOOK] = { NARC_item_data_0407_bin, NARC_item_icon_item_icon_552_NCGR, NARC_item_icon_item_icon_553_NCLR, AGB_ITEM_NONE }, - [ITEM_POKE_RADAR] = { NARC_item_data_0408_bin, NARC_item_icon_item_icon_697_NCGR, NARC_item_icon_item_icon_698_NCLR, AGB_ITEM_NONE }, - [ITEM_POINT_CARD] = { NARC_item_data_0409_bin, NARC_item_icon_item_icon_681_NCGR, NARC_item_icon_item_icon_682_NCLR, AGB_ITEM_NONE }, - [ITEM_JOURNAL] = { NARC_item_data_0410_bin, NARC_item_icon_item_icon_606_NCGR, NARC_item_icon_item_icon_607_NCLR, AGB_ITEM_NONE }, - [ITEM_SEAL_CASE] = { NARC_item_data_0411_bin, NARC_item_icon_item_icon_671_NCGR, NARC_item_icon_item_icon_672_NCLR, AGB_ITEM_NONE }, + [ITEM_LOOT_SACK] = { NARC_item_data_0406_bin, NARC_item_icon_item_icon_550_NCGR, NARC_item_icon_item_icon_551_NCLR, AGB_ITEM_NONE }, + [ITEM_RULE_BOOK] = { NARC_item_data_0407_bin, NARC_item_icon_item_icon_552_NCGR, NARC_item_icon_item_icon_553_NCLR, AGB_ITEM_NONE }, + [ITEM_POKE_RADAR] = { NARC_item_data_0408_bin, NARC_item_icon_item_icon_697_NCGR, NARC_item_icon_item_icon_698_NCLR, AGB_ITEM_NONE }, + [ITEM_POINT_CARD] = { NARC_item_data_0409_bin, NARC_item_icon_item_icon_681_NCGR, NARC_item_icon_item_icon_682_NCLR, AGB_ITEM_NONE }, + [ITEM_JOURNAL] = { NARC_item_data_0410_bin, NARC_item_icon_item_icon_606_NCGR, NARC_item_icon_item_icon_607_NCLR, AGB_ITEM_NONE }, + [ITEM_SEAL_CASE] = { NARC_item_data_0411_bin, NARC_item_icon_item_icon_671_NCGR, NARC_item_icon_item_icon_672_NCLR, AGB_ITEM_NONE }, [ITEM_FASHION_CASE] = { NARC_item_data_0412_bin, NARC_item_icon_item_icon_675_NCGR, NARC_item_icon_item_icon_676_NCLR, AGB_ITEM_NONE }, - [ITEM_SEAL_BAG] = { NARC_item_data_0413_bin, NARC_item_icon_item_icon_673_NCGR, NARC_item_icon_item_icon_674_NCLR, AGB_ITEM_NONE }, - [ITEM_PAL_PAD] = { NARC_item_data_0414_bin, NARC_item_icon_item_icon_661_NCGR, NARC_item_icon_item_icon_662_NCLR, AGB_ITEM_NONE }, - [ITEM_WORKS_KEY] = { NARC_item_data_0415_bin, NARC_item_icon_item_icon_644_NCGR, NARC_item_icon_item_icon_645_NCLR, AGB_ITEM_NONE }, - [ITEM_OLD_CHARM] = { NARC_item_data_0416_bin, NARC_item_icon_item_icon_604_NCGR, NARC_item_icon_item_icon_605_NCLR, AGB_ITEM_NONE }, + [ITEM_SEAL_BAG] = { NARC_item_data_0413_bin, NARC_item_icon_item_icon_673_NCGR, NARC_item_icon_item_icon_674_NCLR, AGB_ITEM_NONE }, + [ITEM_PAL_PAD] = { NARC_item_data_0414_bin, NARC_item_icon_item_icon_661_NCGR, NARC_item_icon_item_icon_662_NCLR, AGB_ITEM_NONE }, + [ITEM_WORKS_KEY] = { NARC_item_data_0415_bin, NARC_item_icon_item_icon_644_NCGR, NARC_item_icon_item_icon_645_NCLR, AGB_ITEM_NONE }, + [ITEM_OLD_CHARM] = { NARC_item_data_0416_bin, NARC_item_icon_item_icon_604_NCGR, NARC_item_icon_item_icon_605_NCLR, AGB_ITEM_NONE }, [ITEM_GALACTIC_KEY] = { NARC_item_data_0417_bin, NARC_item_icon_item_icon_656_NCGR, NARC_item_icon_item_icon_657_NCLR, AGB_ITEM_NONE }, - [ITEM_RED_CHAIN] = { NARC_item_data_0418_bin, NARC_item_icon_item_icon_679_NCGR, NARC_item_icon_item_icon_680_NCLR, AGB_ITEM_NONE }, - [ITEM_TOWN_MAP] = { NARC_item_data_0419_bin, NARC_item_icon_item_icon_439_NCGR, NARC_item_icon_item_icon_440_NCLR, AGB_ITEM_TOWN_MAP }, - [ITEM_VS__SEEKER] = { NARC_item_data_0420_bin, NARC_item_icon_item_icon_441_NCGR, NARC_item_icon_item_icon_442_NCLR, AGB_ITEM_VS_SEEKER }, - [ITEM_COIN_CASE] = { NARC_item_data_0421_bin, NARC_item_icon_item_icon_349_NCGR, NARC_item_icon_item_icon_350_NCLR, AGB_ITEM_COIN_CASE }, - [ITEM_OLD_ROD] = { NARC_item_data_0422_bin, NARC_item_icon_item_icon_353_NCGR, NARC_item_icon_item_icon_354_NCLR, AGB_ITEM_OLD_ROD }, - [ITEM_GOOD_ROD] = { NARC_item_data_0423_bin, NARC_item_icon_item_icon_355_NCGR, NARC_item_icon_item_icon_356_NCLR, AGB_ITEM_GOOD_ROD }, - [ITEM_SUPER_ROD] = { NARC_item_data_0424_bin, NARC_item_icon_item_icon_357_NCGR, NARC_item_icon_item_icon_358_NCLR, AGB_ITEM_SUPER_ROD }, - [ITEM_SPRAYDUCK] = { NARC_item_data_0425_bin, NARC_item_icon_item_icon_363_NCGR, NARC_item_icon_item_icon_364_NCLR, AGB_ITEM_NONE }, - [ITEM_POFFIN_CASE] = { NARC_item_data_0426_bin, NARC_item_icon_item_icon_373_NCGR, NARC_item_icon_item_icon_374_NCLR, AGB_ITEM_NONE }, - [ITEM_BICYCLE] = { NARC_item_data_0427_bin, NARC_item_icon_item_icon_437_NCGR, NARC_item_icon_item_icon_438_NCLR, AGB_ITEM_BICYCLE }, - [ITEM_SUITE_KEY] = { NARC_item_data_0428_bin, NARC_item_icon_item_icon_429_NCGR, NARC_item_icon_item_icon_430_NCLR, AGB_ITEM_NONE }, - [ITEM_OAKS_LETTER] = { NARC_item_data_0429_bin, NARC_item_icon_item_icon_375_NCGR, NARC_item_icon_item_icon_064_NCLR, AGB_ITEM_NONE }, - [ITEM_LUNAR_WING] = { NARC_item_data_0430_bin, NARC_item_icon_item_icon_602_NCGR, NARC_item_icon_item_icon_603_NCLR, AGB_ITEM_NONE }, - [ITEM_MEMBER_CARD] = { NARC_item_data_0431_bin, NARC_item_icon_item_icon_608_NCGR, NARC_item_icon_item_icon_609_NCLR, AGB_ITEM_NONE }, - [ITEM_AZURE_FLUTE] = { NARC_item_data_0432_bin, NARC_item_icon_item_icon_677_NCGR, NARC_item_icon_item_icon_678_NCLR, AGB_ITEM_NONE }, - [ITEM_S_S__TICKET] = { NARC_item_data_0433_bin, NARC_item_icon_item_icon_359_NCGR, NARC_item_icon_item_icon_360_NCLR, AGB_ITEM_SS_TICKET }, + [ITEM_RED_CHAIN] = { NARC_item_data_0418_bin, NARC_item_icon_item_icon_679_NCGR, NARC_item_icon_item_icon_680_NCLR, AGB_ITEM_NONE }, + [ITEM_TOWN_MAP] = { NARC_item_data_0419_bin, NARC_item_icon_item_icon_439_NCGR, NARC_item_icon_item_icon_440_NCLR, AGB_ITEM_TOWN_MAP }, + [ITEM_VS__SEEKER] = { NARC_item_data_0420_bin, NARC_item_icon_item_icon_441_NCGR, NARC_item_icon_item_icon_442_NCLR, AGB_ITEM_VS_SEEKER }, + [ITEM_COIN_CASE] = { NARC_item_data_0421_bin, NARC_item_icon_item_icon_349_NCGR, NARC_item_icon_item_icon_350_NCLR, AGB_ITEM_COIN_CASE }, + [ITEM_OLD_ROD] = { NARC_item_data_0422_bin, NARC_item_icon_item_icon_353_NCGR, NARC_item_icon_item_icon_354_NCLR, AGB_ITEM_OLD_ROD }, + [ITEM_GOOD_ROD] = { NARC_item_data_0423_bin, NARC_item_icon_item_icon_355_NCGR, NARC_item_icon_item_icon_356_NCLR, AGB_ITEM_GOOD_ROD }, + [ITEM_SUPER_ROD] = { NARC_item_data_0424_bin, NARC_item_icon_item_icon_357_NCGR, NARC_item_icon_item_icon_358_NCLR, AGB_ITEM_SUPER_ROD }, + [ITEM_SPRAYDUCK] = { NARC_item_data_0425_bin, NARC_item_icon_item_icon_363_NCGR, NARC_item_icon_item_icon_364_NCLR, AGB_ITEM_NONE }, + [ITEM_POFFIN_CASE] = { NARC_item_data_0426_bin, NARC_item_icon_item_icon_373_NCGR, NARC_item_icon_item_icon_374_NCLR, AGB_ITEM_NONE }, + [ITEM_BICYCLE] = { NARC_item_data_0427_bin, NARC_item_icon_item_icon_437_NCGR, NARC_item_icon_item_icon_438_NCLR, AGB_ITEM_BICYCLE }, + [ITEM_SUITE_KEY] = { NARC_item_data_0428_bin, NARC_item_icon_item_icon_429_NCGR, NARC_item_icon_item_icon_430_NCLR, AGB_ITEM_NONE }, + [ITEM_OAKS_LETTER] = { NARC_item_data_0429_bin, NARC_item_icon_item_icon_375_NCGR, NARC_item_icon_item_icon_064_NCLR, AGB_ITEM_NONE }, + [ITEM_LUNAR_WING] = { NARC_item_data_0430_bin, NARC_item_icon_item_icon_602_NCGR, NARC_item_icon_item_icon_603_NCLR, AGB_ITEM_NONE }, + [ITEM_MEMBER_CARD] = { NARC_item_data_0431_bin, NARC_item_icon_item_icon_608_NCGR, NARC_item_icon_item_icon_609_NCLR, AGB_ITEM_NONE }, + [ITEM_AZURE_FLUTE] = { NARC_item_data_0432_bin, NARC_item_icon_item_icon_677_NCGR, NARC_item_icon_item_icon_678_NCLR, AGB_ITEM_NONE }, + [ITEM_S_S__TICKET] = { NARC_item_data_0433_bin, NARC_item_icon_item_icon_359_NCGR, NARC_item_icon_item_icon_360_NCLR, AGB_ITEM_SS_TICKET }, [ITEM_CONTEST_PASS] = { NARC_item_data_0434_bin, NARC_item_icon_item_icon_361_NCGR, NARC_item_icon_item_icon_362_NCLR, AGB_ITEM_CONTEST_PASS }, - [ITEM_MAGMA_STONE] = { NARC_item_data_0435_bin, NARC_item_icon_item_icon_596_NCGR, NARC_item_icon_item_icon_597_NCLR, AGB_ITEM_NONE }, - [ITEM_PARCEL] = { NARC_item_data_0436_bin, NARC_item_icon_item_icon_415_NCGR, NARC_item_icon_item_icon_416_NCLR, AGB_ITEM_OAKS_PARCEL }, - [ITEM_COUPON_1] = { NARC_item_data_0437_bin, NARC_item_icon_item_icon_417_NCGR, NARC_item_icon_item_icon_418_NCLR, AGB_ITEM_NONE }, - [ITEM_COUPON_2] = { NARC_item_data_0438_bin, NARC_item_icon_item_icon_419_NCGR, NARC_item_icon_item_icon_420_NCLR, AGB_ITEM_NONE }, - [ITEM_COUPON_3] = { NARC_item_data_0439_bin, NARC_item_icon_item_icon_421_NCGR, NARC_item_icon_item_icon_422_NCLR, AGB_ITEM_NONE }, - [ITEM_STORAGE_KEY] = { NARC_item_data_0440_bin, NARC_item_icon_item_icon_598_NCGR, NARC_item_icon_item_icon_599_NCLR, AGB_ITEM_STORAGE_KEY }, + [ITEM_MAGMA_STONE] = { NARC_item_data_0435_bin, NARC_item_icon_item_icon_596_NCGR, NARC_item_icon_item_icon_597_NCLR, AGB_ITEM_NONE }, + [ITEM_PARCEL] = { NARC_item_data_0436_bin, NARC_item_icon_item_icon_415_NCGR, NARC_item_icon_item_icon_416_NCLR, AGB_ITEM_OAKS_PARCEL }, + [ITEM_COUPON_1] = { NARC_item_data_0437_bin, NARC_item_icon_item_icon_417_NCGR, NARC_item_icon_item_icon_418_NCLR, AGB_ITEM_NONE }, + [ITEM_COUPON_2] = { NARC_item_data_0438_bin, NARC_item_icon_item_icon_419_NCGR, NARC_item_icon_item_icon_420_NCLR, AGB_ITEM_NONE }, + [ITEM_COUPON_3] = { NARC_item_data_0439_bin, NARC_item_icon_item_icon_421_NCGR, NARC_item_icon_item_icon_422_NCLR, AGB_ITEM_NONE }, + [ITEM_STORAGE_KEY] = { NARC_item_data_0440_bin, NARC_item_icon_item_icon_598_NCGR, NARC_item_icon_item_icon_599_NCLR, AGB_ITEM_STORAGE_KEY }, [ITEM_SECRETPOTION] = { NARC_item_data_0441_bin, NARC_item_icon_item_icon_600_NCGR, NARC_item_icon_item_icon_601_NCLR, AGB_ITEM_NONE }, [ITEM_VS__RECORDER] = { NARC_item_data_0442_bin, NARC_item_icon_item_icon_701_NCGR, NARC_item_icon_item_icon_702_NCLR, AGB_ITEM_NONE }, - [ITEM_GRACIDEA] = { NARC_item_data_0443_bin, NARC_item_icon_item_icon_703_NCGR, NARC_item_icon_item_icon_704_NCLR, AGB_ITEM_NONE }, - [ITEM_SECRET_KEY] = { NARC_item_data_0444_bin, NARC_item_icon_item_icon_705_NCGR, NARC_item_icon_item_icon_706_NCLR, AGB_ITEM_SECRET_KEY }, + [ITEM_GRACIDEA] = { NARC_item_data_0443_bin, NARC_item_icon_item_icon_703_NCGR, NARC_item_icon_item_icon_704_NCLR, AGB_ITEM_NONE }, + [ITEM_SECRET_KEY] = { NARC_item_data_0444_bin, NARC_item_icon_item_icon_705_NCGR, NARC_item_icon_item_icon_706_NCLR, AGB_ITEM_SECRET_KEY }, [ITEM_APRICORN_BOX] = { NARC_item_data_0445_bin, NARC_item_icon_item_icon_709_NCGR, NARC_item_icon_item_icon_710_NCLR, AGB_ITEM_NONE }, [ITEM_UNOWN_REPORT] = { NARC_item_data_0446_bin, NARC_item_icon_item_icon_759_NCGR, NARC_item_icon_item_icon_760_NCLR, AGB_ITEM_NONE }, - [ITEM_BERRY_POTS] = { NARC_item_data_0447_bin, NARC_item_icon_item_icon_711_NCGR, NARC_item_icon_item_icon_712_NCLR, AGB_ITEM_NONE }, + [ITEM_BERRY_POTS] = { NARC_item_data_0447_bin, NARC_item_icon_item_icon_711_NCGR, NARC_item_icon_item_icon_712_NCLR, AGB_ITEM_NONE }, [ITEM_DOWSING_MCHN] = { NARC_item_data_0448_bin, NARC_item_icon_item_icon_747_NCGR, NARC_item_icon_item_icon_748_NCLR, AGB_ITEM_ITEMFINDER }, - [ITEM_BLUE_CARD] = { NARC_item_data_0449_bin, NARC_item_icon_item_icon_761_NCGR, NARC_item_icon_item_icon_762_NCLR, AGB_ITEM_NONE }, + [ITEM_BLUE_CARD] = { NARC_item_data_0449_bin, NARC_item_icon_item_icon_761_NCGR, NARC_item_icon_item_icon_762_NCLR, AGB_ITEM_NONE }, [ITEM_SLOWPOKETAIL] = { NARC_item_data_0450_bin, NARC_item_icon_item_icon_763_NCGR, NARC_item_icon_item_icon_764_NCLR, AGB_ITEM_NONE }, - [ITEM_CLEAR_BELL] = { NARC_item_data_0451_bin, NARC_item_icon_item_icon_765_NCGR, NARC_item_icon_item_icon_766_NCLR, AGB_ITEM_NONE }, - [ITEM_CARD_KEY] = { NARC_item_data_0452_bin, NARC_item_icon_item_icon_767_NCGR, NARC_item_icon_item_icon_768_NCLR, AGB_ITEM_CARD_KEY }, + [ITEM_CLEAR_BELL] = { NARC_item_data_0451_bin, NARC_item_icon_item_icon_765_NCGR, NARC_item_icon_item_icon_766_NCLR, AGB_ITEM_NONE }, + [ITEM_CARD_KEY] = { NARC_item_data_0452_bin, NARC_item_icon_item_icon_767_NCGR, NARC_item_icon_item_icon_768_NCLR, AGB_ITEM_CARD_KEY }, [ITEM_BASEMENT_KEY] = { NARC_item_data_0453_bin, NARC_item_icon_item_icon_769_NCGR, NARC_item_icon_item_icon_770_NCLR, AGB_ITEM_BASEMENT_KEY }, [ITEM_SQUIRTBOTTLE] = { NARC_item_data_0454_bin, NARC_item_icon_item_icon_713_NCGR, NARC_item_icon_item_icon_714_NCLR, AGB_ITEM_NONE }, - [ITEM_RED_SCALE] = { NARC_item_data_0455_bin, NARC_item_icon_item_icon_771_NCGR, NARC_item_icon_item_icon_772_NCLR, AGB_ITEM_NONE }, - [ITEM_LOST_ITEM] = { NARC_item_data_0456_bin, NARC_item_icon_item_icon_773_NCGR, NARC_item_icon_item_icon_774_NCLR, AGB_ITEM_NONE }, - [ITEM_PASS] = { NARC_item_data_0457_bin, NARC_item_icon_item_icon_775_NCGR, NARC_item_icon_item_icon_776_NCLR, AGB_ITEM_NONE }, + [ITEM_RED_SCALE] = { NARC_item_data_0455_bin, NARC_item_icon_item_icon_771_NCGR, NARC_item_icon_item_icon_772_NCLR, AGB_ITEM_NONE }, + [ITEM_LOST_ITEM] = { NARC_item_data_0456_bin, NARC_item_icon_item_icon_773_NCGR, NARC_item_icon_item_icon_774_NCLR, AGB_ITEM_NONE }, + [ITEM_PASS] = { NARC_item_data_0457_bin, NARC_item_icon_item_icon_775_NCGR, NARC_item_icon_item_icon_776_NCLR, AGB_ITEM_NONE }, [ITEM_MACHINE_PART] = { NARC_item_data_0458_bin, NARC_item_icon_item_icon_777_NCGR, NARC_item_icon_item_icon_778_NCLR, AGB_ITEM_NONE }, - [ITEM_SILVER_WING] = { NARC_item_data_0459_bin, NARC_item_icon_item_icon_779_NCGR, NARC_item_icon_item_icon_780_NCLR, AGB_ITEM_NONE }, + [ITEM_SILVER_WING] = { NARC_item_data_0459_bin, NARC_item_icon_item_icon_779_NCGR, NARC_item_icon_item_icon_780_NCLR, AGB_ITEM_NONE }, [ITEM_RAINBOW_WING] = { NARC_item_data_0460_bin, NARC_item_icon_item_icon_781_NCGR, NARC_item_icon_item_icon_782_NCLR, AGB_ITEM_NONE }, - [ITEM_MYSTERY_EGG] = { NARC_item_data_0461_bin, NARC_item_icon_item_icon_783_NCGR, NARC_item_icon_item_icon_784_NCLR, AGB_ITEM_NONE }, + [ITEM_MYSTERY_EGG] = { NARC_item_data_0461_bin, NARC_item_icon_item_icon_783_NCGR, NARC_item_icon_item_icon_784_NCLR, AGB_ITEM_NONE }, [ITEM_RED_APRICORN] = { NARC_item_data_0462_bin, NARC_item_icon_item_icon_733_NCGR, NARC_item_icon_item_icon_734_NCLR, AGB_ITEM_NONE }, [ITEM_YLW_APRICORN] = { NARC_item_data_0463_bin, NARC_item_icon_item_icon_737_NCGR, NARC_item_icon_item_icon_738_NCLR, AGB_ITEM_NONE }, [ITEM_BLU_APRICORN] = { NARC_item_data_0464_bin, NARC_item_icon_item_icon_735_NCGR, NARC_item_icon_item_icon_736_NCLR, AGB_ITEM_NONE }, @@ -624,18 +624,18 @@ static const u16 sItemNarcIds[ITEMS_COUNT][4] = { [ITEM_PNK_APRICORN] = { NARC_item_data_0466_bin, NARC_item_icon_item_icon_741_NCGR, NARC_item_icon_item_icon_742_NCLR, AGB_ITEM_NONE }, [ITEM_WHT_APRICORN] = { NARC_item_data_0467_bin, NARC_item_icon_item_icon_743_NCGR, NARC_item_icon_item_icon_744_NCLR, AGB_ITEM_NONE }, [ITEM_BLK_APRICORN] = { NARC_item_data_0468_bin, NARC_item_icon_item_icon_745_NCGR, NARC_item_icon_item_icon_746_NCLR, AGB_ITEM_NONE }, - [ITEM_FAST_BALL] = { NARC_item_data_0469_bin, NARC_item_icon_item_icon_723_NCGR, NARC_item_icon_item_icon_724_NCLR, AGB_ITEM_NONE }, - [ITEM_LEVEL_BALL] = { NARC_item_data_0470_bin, NARC_item_icon_item_icon_717_NCGR, NARC_item_icon_item_icon_718_NCLR, AGB_ITEM_NONE }, - [ITEM_LURE_BALL] = { NARC_item_data_0471_bin, NARC_item_icon_item_icon_715_NCGR, NARC_item_icon_item_icon_716_NCLR, AGB_ITEM_NONE }, - [ITEM_HEAVY_BALL] = { NARC_item_data_0472_bin, NARC_item_icon_item_icon_721_NCGR, NARC_item_icon_item_icon_722_NCLR, AGB_ITEM_NONE }, - [ITEM_LOVE_BALL] = { NARC_item_data_0473_bin, NARC_item_icon_item_icon_727_NCGR, NARC_item_icon_item_icon_728_NCLR, AGB_ITEM_NONE }, - [ITEM_FRIEND_BALL] = { NARC_item_data_0474_bin, NARC_item_icon_item_icon_725_NCGR, NARC_item_icon_item_icon_726_NCLR, AGB_ITEM_NONE }, - [ITEM_MOON_BALL] = { NARC_item_data_0475_bin, NARC_item_icon_item_icon_719_NCGR, NARC_item_icon_item_icon_720_NCLR, AGB_ITEM_NONE }, - [ITEM_SPORT_BALL] = { NARC_item_data_0476_bin, NARC_item_icon_item_icon_731_NCGR, NARC_item_icon_item_icon_732_NCLR, AGB_ITEM_NONE }, - [ITEM_PARK_BALL] = { NARC_item_data_0477_bin, NARC_item_icon_item_icon_729_NCGR, NARC_item_icon_item_icon_730_NCLR, AGB_ITEM_NONE }, - [ITEM_PHOTO_ALBUM] = { NARC_item_data_0478_bin, NARC_item_icon_item_icon_606_NCGR, NARC_item_icon_item_icon_607_NCLR, AGB_ITEM_NONE }, - [ITEM_GB_SOUNDS] = { NARC_item_data_0479_bin, NARC_item_icon_item_icon_785_NCGR, NARC_item_icon_item_icon_786_NCLR, AGB_ITEM_NONE }, - [ITEM_TIDAL_BELL] = { NARC_item_data_0480_bin, NARC_item_icon_item_icon_787_NCGR, NARC_item_icon_item_icon_788_NCLR, AGB_ITEM_NONE }, + [ITEM_FAST_BALL] = { NARC_item_data_0469_bin, NARC_item_icon_item_icon_723_NCGR, NARC_item_icon_item_icon_724_NCLR, AGB_ITEM_NONE }, + [ITEM_LEVEL_BALL] = { NARC_item_data_0470_bin, NARC_item_icon_item_icon_717_NCGR, NARC_item_icon_item_icon_718_NCLR, AGB_ITEM_NONE }, + [ITEM_LURE_BALL] = { NARC_item_data_0471_bin, NARC_item_icon_item_icon_715_NCGR, NARC_item_icon_item_icon_716_NCLR, AGB_ITEM_NONE }, + [ITEM_HEAVY_BALL] = { NARC_item_data_0472_bin, NARC_item_icon_item_icon_721_NCGR, NARC_item_icon_item_icon_722_NCLR, AGB_ITEM_NONE }, + [ITEM_LOVE_BALL] = { NARC_item_data_0473_bin, NARC_item_icon_item_icon_727_NCGR, NARC_item_icon_item_icon_728_NCLR, AGB_ITEM_NONE }, + [ITEM_FRIEND_BALL] = { NARC_item_data_0474_bin, NARC_item_icon_item_icon_725_NCGR, NARC_item_icon_item_icon_726_NCLR, AGB_ITEM_NONE }, + [ITEM_MOON_BALL] = { NARC_item_data_0475_bin, NARC_item_icon_item_icon_719_NCGR, NARC_item_icon_item_icon_720_NCLR, AGB_ITEM_NONE }, + [ITEM_SPORT_BALL] = { NARC_item_data_0476_bin, NARC_item_icon_item_icon_731_NCGR, NARC_item_icon_item_icon_732_NCLR, AGB_ITEM_NONE }, + [ITEM_PARK_BALL] = { NARC_item_data_0477_bin, NARC_item_icon_item_icon_729_NCGR, NARC_item_icon_item_icon_730_NCLR, AGB_ITEM_NONE }, + [ITEM_PHOTO_ALBUM] = { NARC_item_data_0478_bin, NARC_item_icon_item_icon_606_NCGR, NARC_item_icon_item_icon_607_NCLR, AGB_ITEM_NONE }, + [ITEM_GB_SOUNDS] = { NARC_item_data_0479_bin, NARC_item_icon_item_icon_785_NCGR, NARC_item_icon_item_icon_786_NCLR, AGB_ITEM_NONE }, + [ITEM_TIDAL_BELL] = { NARC_item_data_0480_bin, NARC_item_icon_item_icon_787_NCGR, NARC_item_icon_item_icon_788_NCLR, AGB_ITEM_NONE }, [ITEM_RAGECANDYBAR] = { NARC_item_data_0481_bin, NARC_item_icon_item_icon_749_NCGR, NARC_item_icon_item_icon_750_NCLR, AGB_ITEM_NONE }, [ITEM_DATA_CARD_01] = { NARC_item_data_0482_bin, NARC_item_icon_item_icon_789_NCGR, NARC_item_icon_item_icon_790_NCLR, AGB_ITEM_NONE }, [ITEM_DATA_CARD_02] = { NARC_item_data_0483_bin, NARC_item_icon_item_icon_789_NCGR, NARC_item_icon_item_icon_790_NCLR, AGB_ITEM_NONE }, @@ -664,10 +664,10 @@ static const u16 sItemNarcIds[ITEMS_COUNT][4] = { [ITEM_DATA_CARD_25] = { NARC_item_data_0506_bin, NARC_item_icon_item_icon_789_NCGR, NARC_item_icon_item_icon_790_NCLR, AGB_ITEM_NONE }, [ITEM_DATA_CARD_26] = { NARC_item_data_0507_bin, NARC_item_icon_item_icon_789_NCGR, NARC_item_icon_item_icon_790_NCLR, AGB_ITEM_NONE }, [ITEM_DATA_CARD_27] = { NARC_item_data_0508_bin, NARC_item_icon_item_icon_789_NCGR, NARC_item_icon_item_icon_790_NCLR, AGB_ITEM_NONE }, - [ITEM_JADE_ORB] = { NARC_item_data_0509_bin, NARC_item_icon_item_icon_755_NCGR, NARC_item_icon_item_icon_756_NCLR, AGB_ITEM_NONE }, + [ITEM_JADE_ORB] = { NARC_item_data_0509_bin, NARC_item_icon_item_icon_755_NCGR, NARC_item_icon_item_icon_756_NCLR, AGB_ITEM_NONE }, [ITEM_LOCK_CAPSULE] = { NARC_item_data_0510_bin, NARC_item_icon_item_icon_791_NCGR, NARC_item_icon_item_icon_792_NCLR, AGB_ITEM_NONE }, - [ITEM_RED_ORB] = { NARC_item_data_0511_bin, NARC_item_icon_item_icon_751_NCGR, NARC_item_icon_item_icon_752_NCLR, AGB_ITEM_RED_ORB }, - [ITEM_BLUE_ORB] = { NARC_item_data_0512_bin, NARC_item_icon_item_icon_753_NCGR, NARC_item_icon_item_icon_754_NCLR, AGB_ITEM_BLUE_ORB }, + [ITEM_RED_ORB] = { NARC_item_data_0511_bin, NARC_item_icon_item_icon_751_NCGR, NARC_item_icon_item_icon_752_NCLR, AGB_ITEM_RED_ORB }, + [ITEM_BLUE_ORB] = { NARC_item_data_0512_bin, NARC_item_icon_item_icon_753_NCGR, NARC_item_icon_item_icon_754_NCLR, AGB_ITEM_BLUE_ORB }, [ITEM_ENIGMA_STONE] = { NARC_item_data_0513_bin, NARC_item_icon_item_icon_757_NCGR, NARC_item_icon_item_icon_758_NCLR, AGB_ITEM_NONE }, }; @@ -788,7 +788,7 @@ static s32 GetItemAttrSub(ItemPartyParam *param, u16 attrno); s32 GetItemAttr(u16 itemId, u16 attrno, HeapID heapId) { ItemData *itemData = (ItemData *)LoadItemDataOrGfx(itemId, ITEMNARC_PARAM, heapId); - s32 ret = GetItemAttr_PreloadedItemData(itemData, attrno); + s32 ret = GetItemAttr_PreloadedItemData(itemData, attrno); FreeToHeapExplicit(heapId, itemData); return ret; } @@ -1028,7 +1028,7 @@ String *GetNutName(u16 berryId, HeapID heapId) { berryId--; } msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0251_bin, heapId); - ret = NewString_ReadMsgData(msgData, berryId); + ret = NewString_ReadMsgData(msgData, berryId); DestroyMsgData(msgData); return ret; } diff --git a/src/launch_application.c b/src/launch_application.c index 5686032418..247a84a541 100644 --- a/src/launch_application.c +++ b/src/launch_application.c @@ -187,7 +187,7 @@ static const u8 sAllPockets[] = { POCKET_ITEMS, POCKET_MEDICINE, POCKET_BALLS, P void Bag_LaunchApp(FieldSystem *fieldSystem, BagView *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_Bag = { Bag_Init, Bag_Main, Bag_Exit, FS_OVERLAY_ID(OVY_15) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_Bag; + OVY_MGR_TEMPLATE template = sOverlayTemplate_Bag; FieldSystem_LaunchApplication(fieldSystem, &template, args); } @@ -205,8 +205,8 @@ BagView *sub_0203E3FC(FieldSystem *fieldSystem, ItemCheckUseData *taskman) { BagView *Bag_LaunchApp_WithPocket(FieldSystem *fieldSystem, u8 pocketType) { static const u8 sBerryPocket[] = { POCKET_BERRIES, 0xFF }; - static const u8 sItemPocket[] = { POCKET_ITEMS, 0xFF }; - static const u8 *sPockets = NULL; + static const u8 sItemPocket[] = { POCKET_ITEMS, 0xFF }; + static const u8 *sPockets = NULL; Bag *bag = Save_Bag_Get(fieldSystem->saveData); switch (pocketType) { @@ -240,21 +240,21 @@ void PokemonSummary_LearnForget_LaunchApp(FieldSystem *fieldSystem, PokemonSumma static PartyMenuArgs *PartyMenu_CreateArgs(HeapID heapId, FieldSystem *fieldSystem, int a2, PartyMenuContext context) { PartyMenuArgs *partyMenu = AllocFromHeap(heapId, sizeof(PartyMenuArgs)); MI_CpuClearFast(partyMenu, sizeof(PartyMenuArgs)); - partyMenu->party = SaveArray_Party_Get(fieldSystem->saveData); - partyMenu->bag = Save_Bag_Get(fieldSystem->saveData); - partyMenu->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - partyMenu->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - partyMenu->unk_25 = a2; - partyMenu->context = context; - partyMenu->fieldSystem = fieldSystem; + partyMenu->party = SaveArray_Party_Get(fieldSystem->saveData); + partyMenu->bag = Save_Bag_Get(fieldSystem->saveData); + partyMenu->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + partyMenu->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + partyMenu->unk_25 = a2; + partyMenu->context = context; + partyMenu->fieldSystem = fieldSystem; partyMenu->menuInputStatePtr = &fieldSystem->menuInputState; return partyMenu; } PartyMenuArgs *PartyMenu_LaunchApp_Unk1(FieldSystem *fieldSystem, FieldMoveCheckData *fieldMoveCheckData, u8 partySlot) { - PartyMenuArgs *args = PartyMenu_CreateArgs(HEAP_ID_FIELD, fieldSystem, 0, PARTY_MENU_CONTEXT_0); + PartyMenuArgs *args = PartyMenu_CreateArgs(HEAP_ID_FIELD, fieldSystem, 0, PARTY_MENU_CONTEXT_0); args->fieldMoveCheckData = fieldMoveCheckData; - args->partySlot = partySlot; + args->partySlot = partySlot; FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, args); return args; } @@ -277,7 +277,7 @@ int PartyMenuArgs_GetSlot(PartyMenuArgs *partyMenuArgs) { PartyMenuArgs *PartyMenu_LaunchApp_Unk4(HeapID heapId, FieldSystem *fieldSystem, u16 partySlot) { PartyMenuArgs *args = PartyMenu_CreateArgs(HEAP_ID_FIELD, fieldSystem, 0, PARTY_MENU_CONTEXT_18); - args->partySlot = partySlot; + args->partySlot = partySlot; FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, args); return args; } @@ -291,9 +291,9 @@ u16 sub_0203E600(UnkStruct_0203E600 *a0) { } static BOOL Task_OpenPartyMenuForUnionRoomBattleSelect(TaskManager *taskman) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); PartyMenuMoveSelectData *data = TaskManager_GetEnvironment(taskman); - int *state = TaskManager_GetStatePtr(taskman); + int *state = TaskManager_GetStatePtr(taskman); switch (*state) { case PMMS_OPEN_PARTY_MENU: FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, data->unk4); @@ -316,7 +316,7 @@ static BOOL Task_OpenPartyMenuForUnionRoomBattleSelect(TaskManager *taskman) { } break; case PMMS_OPEN_SUMMARY: - data->pokemonSummary = PokemonSummary_CreateArgs(fieldSystem, data->heapId, 0); + data->pokemonSummary = PokemonSummary_CreateArgs(fieldSystem, data->heapId, 0); data->pokemonSummary->partySlot = data->unk4->partySlot; PokemonSummary_LearnForget_LaunchApp(fieldSystem, data->pokemonSummary); *state = PMMS_WAIT_SUMMARY; @@ -338,12 +338,12 @@ static BOOL Task_OpenPartyMenuForUnionRoomBattleSelect(TaskManager *taskman) { PartyMenuArgs *TaskManager_LaunchPartyMenu_UnionRoomBattleSelect(TaskManager *taskman, HeapID heapId) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); UnkStruct_0203E6D4 *data = AllocFromHeap(heapId, sizeof(UnkStruct_0203E6D4)); - data->heapId = heapId; - PartyMenuArgs *args = PartyMenu_CreateArgs(heapId, fieldSystem, 0, PARTY_MENU_CONTEXT_UNION_ROOM_BATTLE_SELECT); - args->minMonsToSelect = 2; - args->maxMonsToSelect = 2; - args->maxLevel = 30; - args->linkBattleRuleset = NULL; + data->heapId = heapId; + PartyMenuArgs *args = PartyMenu_CreateArgs(heapId, fieldSystem, 0, PARTY_MENU_CONTEXT_UNION_ROOM_BATTLE_SELECT); + args->minMonsToSelect = 2; + args->maxMonsToSelect = 2; + args->maxLevel = 30; + args->linkBattleRuleset = NULL; data->partyMenu = args; TaskManager_Call(taskman, Task_OpenPartyMenuForUnionRoomBattleSelect, data); @@ -352,28 +352,28 @@ PartyMenuArgs *TaskManager_LaunchPartyMenu_UnionRoomBattleSelect(TaskManager *ta PartyMenuArgs *PartyMenu_LaunchApp_Unk5(FieldSystem *fieldSystem, int partySlot) { PartyMenuArgs *args = PartyMenu_CreateArgs(HEAP_ID_FIELD, fieldSystem, 0, PARTY_MENU_CONTEXT_SPIN_TRADE); - args->partySlot = partySlot; + args->partySlot = partySlot; FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, args); return args; } PokemonSummaryArgs *PokemonSummary_CreateArgs(FieldSystem *fieldSystem, HeapID heapId, int a2) { static const u8 _020FA1B0[] = { 0x00, 0x01, 0x02, 0x03, 0x04 }; - SaveData *saveData = fieldSystem->saveData; - PokemonSummaryArgs *args = AllocFromHeapAtEnd(heapId, sizeof(PokemonSummaryArgs)); + SaveData *saveData = fieldSystem->saveData; + PokemonSummaryArgs *args = AllocFromHeapAtEnd(heapId, sizeof(PokemonSummaryArgs)); MI_CpuFill8(args, 0, sizeof(PokemonSummaryArgs)); - args->options = Save_PlayerData_GetOptionsAddr(saveData); - args->party = SaveArray_Party_Get(saveData); - args->unk11 = 1; - args->partySlot = 0; - args->partyCount = Party_GetCount(args->party); - args->moveToLearn = MOVE_NONE; - args->unk12 = a2; - args->natDexEnabled = SaveArray_IsNatDexEnabled(saveData); - args->unk2C = sub_02088288(saveData); - args->ribbons = Save_SpecialRibbons_Get(saveData); + args->options = Save_PlayerData_GetOptionsAddr(saveData); + args->party = SaveArray_Party_Get(saveData); + args->unk11 = 1; + args->partySlot = 0; + args->partyCount = Party_GetCount(args->party); + args->moveToLearn = MOVE_NONE; + args->unk12 = a2; + args->natDexEnabled = SaveArray_IsNatDexEnabled(saveData); + args->unk2C = sub_02088288(saveData); + args->ribbons = Save_SpecialRibbons_Get(saveData); args->menuInputStatePtr = &fieldSystem->menuInputState; - args->isFlag982Set = sub_0208828C(fieldSystem->saveData); + args->isFlag982Set = sub_0208828C(fieldSystem->saveData); sub_02089D40(args, _020FA1B0); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); @@ -383,17 +383,17 @@ PokemonSummaryArgs *PokemonSummary_CreateArgs(FieldSystem *fieldSystem, HeapID h PokemonSummaryArgs *LearnForgetMove_LaunchApp(HeapID heapId, FieldSystem *fieldSystem, u8 partySlot, u16 moveToLearn) { static const u8 _020FA1A8[] = { 0x01, 0x04 }; - PokemonSummaryArgs *args = AllocFromHeap(heapId, sizeof(PokemonSummaryArgs)); + PokemonSummaryArgs *args = AllocFromHeap(heapId, sizeof(PokemonSummaryArgs)); MI_CpuFill8(args, 0, sizeof(PokemonSummaryArgs)); - args->party = SaveArray_Party_Get(fieldSystem->saveData); - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - args->unk11 = 1; - args->partySlot = partySlot; - args->partyCount = 1; - args->moveToLearn = moveToLearn; - args->unk12 = 2; - args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); - args->unk2C = 0; + args->party = SaveArray_Party_Get(fieldSystem->saveData); + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->unk11 = 1; + args->partySlot = partySlot; + args->partyCount = 1; + args->moveToLearn = moveToLearn; + args->unk12 = 2; + args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); + args->unk2C = 0; args->menuInputStatePtr = &fieldSystem->menuInputState; sub_02089D40(args, _020FA1A8); sub_0208AD34(args, Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); @@ -414,7 +414,7 @@ static BOOL sub_0203E878(TaskManager *taskman) { MsgBankMsgNo msgBankMsgNo; MailMessage mailMessage; - int *state = (int *)TaskManager_GetStatePtr(taskman); + int *state = (int *)TaskManager_GetStatePtr(taskman); UnkStruct_0203E878 *data = TaskManager_GetEnvironment(taskman); FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); switch (*state) { @@ -463,18 +463,18 @@ void sub_0203E960(TaskManager *taskman, int a1, UnkStruct_0203E8C8 *a2, u16 *a3, FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); UnkStruct_0203E878 *data = AllocFromHeap(HEAP_ID_32, sizeof(UnkStruct_0203E878)); - data->unk0 = a2; - data->unk4 = a3; - data->unk8 = a4; - data->unk10 = a1; + data->unk0 = a2; + data->unk4 = a3; + data->unk8 = a4; + data->unk10 = a1; switch (a1) { default: - args = EasyChat_CreateArgs(0, 0, fieldSystem->saveData, &fieldSystem->menuInputState, HEAP_ID_32); + args = EasyChat_CreateArgs(0, 0, fieldSystem->saveData, &fieldSystem->menuInputState, HEAP_ID_32); data->easyChat = args; sub_02090D14(args, *a3); break; case 1: - args = EasyChat_CreateArgs(1, 0, fieldSystem->saveData, &fieldSystem->menuInputState, HEAP_ID_32); + args = EasyChat_CreateArgs(1, 0, fieldSystem->saveData, &fieldSystem->menuInputState, HEAP_ID_32); data->easyChat = args; sub_02090D18(args, *a3, *a4); break; @@ -482,7 +482,7 @@ void sub_0203E960(TaskManager *taskman, int a1, UnkStruct_0203E8C8 *a2, u16 *a3, case 3: case 4: case 5: - args = EasyChat_CreateArgs(2, 0, fieldSystem->saveData, &fieldSystem->menuInputState, HEAP_ID_32); + args = EasyChat_CreateArgs(2, 0, fieldSystem->saveData, &fieldSystem->menuInputState, HEAP_ID_32); data->easyChat = args; sub_02090D40(args); MailMessage *mailMessage = sub_0202D660(fieldSystem->saveData, a1 - 2); @@ -499,13 +499,13 @@ void EasyChat_LaunchApp(FieldSystem *fieldSystem, EasyChatArgs *args) { static void PokegearPhone_LaunchApp_Impl(FieldSystem *fieldSystem, PokegearArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_Phone = { Phone_Init, Phone_Main, Phone_Exit, FS_OVERLAY_ID(OVY_100) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_Phone; + OVY_MGR_TEMPLATE template = sOverlayTemplate_Phone; FieldSystem_LaunchApplication(fieldSystem, &template, args); } static void PokegearTownMap_LaunchApp_Impl(FieldSystem *fieldSystem, PokegearArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_TownMap = { TownMap_Init, TownMap_Main, TownMap_Exit, FS_OVERLAY_ID(OVY_101) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_TownMap; + OVY_MGR_TEMPLATE template = sOverlayTemplate_TownMap; FieldSystem_LaunchApplication(fieldSystem, &template, args); } @@ -528,14 +528,14 @@ PokegearArgs *PokegearTownMap_LaunchApp(FieldSystem *fieldSystem, int kind) { static void SafariAreaCustomizer_LaunchApp_Impl(FieldSystem *fieldSystem, SafariAreaCustomizerArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_SafariAreaCustomizer = { SafariAreaCustomizer_Init, SafariAreaCustomizer_Main, SafariAreaCustomizer_Exit, FS_OVERLAY_ID(OVY_108) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_SafariAreaCustomizer; + OVY_MGR_TEMPLATE template = sOverlayTemplate_SafariAreaCustomizer; FieldSystem_LaunchApplication(fieldSystem, &template, args); } SafariAreaCustomizerArgs *SafariAreaCustomizer_LaunchApp(FieldSystem *fieldSystem) { SafariAreaCustomizerArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(SafariAreaCustomizerArgs)); MI_CpuFill8(args, 0, sizeof(SafariAreaCustomizerArgs)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->saveData = FieldSystem_GetSaveData(fieldSystem); args->menuInputStatePtr = &fieldSystem->menuInputState; SafariAreaCustomizer_LaunchApp_Impl(fieldSystem, args); return args; @@ -543,7 +543,7 @@ SafariAreaCustomizerArgs *SafariAreaCustomizer_LaunchApp(FieldSystem *fieldSyste static void SafariDecoration_LaunchApp_Impl(FieldSystem *fieldSystem, SafariDecorationArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_SafariDecoration = { SafariDecoration_Init, SafariDecoration_Main, SafariDecoration_Exit, FS_OVERLAY_ID(OVY_108) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_SafariDecoration; + OVY_MGR_TEMPLATE template = sOverlayTemplate_SafariDecoration; FieldSystem_LaunchApplication(fieldSystem, &template, args); } @@ -555,46 +555,46 @@ SafariDecorationArgs *SafariDecoration_LaunchApp(FieldSystem *fieldSystem) { static void PhotoAlbum_LaunchApp_Impl(FieldSystem *fieldSystem, PhotoAlbumArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_PhotoAlbum = { PhotoAlbum_Init, PhotoAlbum_Main, PhotoAlbum_Exit, FS_OVERLAY_ID(OVY_109) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_PhotoAlbum; + OVY_MGR_TEMPLATE template = sOverlayTemplate_PhotoAlbum; FieldSystem_LaunchApplication(fieldSystem, &template, args); } PhotoAlbumArgs *PhotoAlbum_LaunchApp(FieldSystem *fieldSystem, int unused, int initialCursorPos) { PhotoAlbumArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(PhotoAlbumArgs)); MI_CpuFill8(args, 0, sizeof(PhotoAlbumArgs)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->saveData = FieldSystem_GetSaveData(fieldSystem); args->menuInputStatePtr = &fieldSystem->menuInputState; - args->cursorPos = initialCursorPos; + args->cursorPos = initialCursorPos; PhotoAlbum_LaunchApp_Impl(fieldSystem, args); return args; } static void AlphPuzzle_LaunchApp_Impl(FieldSystem *fieldSystem, AlphPuzzleArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_AlphPuzzle = { AlphPuzzle_Init, AlphPuzzle_Main, AlphPuzzle_Exit, FS_OVERLAY_ID(OVY_110) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_AlphPuzzle; + OVY_MGR_TEMPLATE template = sOverlayTemplate_AlphPuzzle; FieldSystem_LaunchApplication(fieldSystem, &template, args); } AlphPuzzleArgs *AlphPuzzle_LaunchApp(FieldSystem *fieldSystem, u8 puzzle) { AlphPuzzleArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(AlphPuzzleArgs)); MI_CpuFill8(args, 0, sizeof(AlphPuzzleArgs)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->saveData = FieldSystem_GetSaveData(fieldSystem); args->menuInputStatePtr = &fieldSystem->menuInputState; - args->puzzle = puzzle; + args->puzzle = puzzle; AlphPuzzle_LaunchApp_Impl(fieldSystem, args); return args; } static void UnownReport_LaunchApp_Impl(FieldSystem *fieldSystem, UnownReportArgs *args) { static const OVY_MGR_TEMPLATE gOverlayTemplate_UnownReport = { UnownReport_Init, UnownReport_Main, UnownReport_Exit, FS_OVERLAY_ID(OVY_113) }; - OVY_MGR_TEMPLATE template = gOverlayTemplate_UnownReport; + OVY_MGR_TEMPLATE template = gOverlayTemplate_UnownReport; FieldSystem_LaunchApplication(fieldSystem, &template, args); } UnownReportArgs *UnownReport_LaunchApp(FieldSystem *fieldSystem) { UnownReportArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnownReportArgs)); MI_CpuFill8(args, 0, sizeof(UnownReportArgs)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->saveData = FieldSystem_GetSaveData(fieldSystem); args->menuInputStatePtr = &fieldSystem->menuInputState; UnownReport_LaunchApp_Impl(fieldSystem, args); return args; @@ -602,32 +602,32 @@ UnownReportArgs *UnownReport_LaunchApp(FieldSystem *fieldSystem) { static void BerryPots_LaunchApp_Impl(FieldSystem *fieldSystem, BerryPotsArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_BerryPots = { BerryPots_Init, BerryPots_Main, BerryPots_Exit, FS_OVERLAY_ID(OVY_16) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_BerryPots; + OVY_MGR_TEMPLATE template = sOverlayTemplate_BerryPots; FieldSystem_LaunchApplication(fieldSystem, &template, args); } BerryPotsArgs *BerryPots_LaunchApp(FieldSystem *fieldSystem) { BerryPotsArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(BerryPotsArgs)); MI_CpuFill8(args, 0, sizeof(BerryPotsArgs)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->saveData = FieldSystem_GetSaveData(fieldSystem); args->menuInputStatePtr = &fieldSystem->menuInputState; - args->cursor = fieldSystem->bagCursor; + args->cursor = fieldSystem->bagCursor; BerryPots_LaunchApp_Impl(fieldSystem, args); return args; } static void ApricornBox_LaunchApp_Impl(FieldSystem *fieldSystem, ApricornBoxArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_ApricornBox = { ApricornBox_Init, ApricornBox_Main, ApricornBox_Exit, FS_OVERLAY_ID(OVY_58) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_ApricornBox; + OVY_MGR_TEMPLATE template = sOverlayTemplate_ApricornBox; FieldSystem_LaunchApplication(fieldSystem, &template, args); } ApricornBoxArgs *ApricornBox_LaunchApp(FieldSystem *fieldSystem, int a1) { ApricornBoxArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(ApricornBoxArgs)); MI_CpuFill8(args, 0, sizeof(ApricornBoxArgs)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->saveData = FieldSystem_GetSaveData(fieldSystem); args->menuInputStatePtr = &fieldSystem->menuInputState; - args->unk10 = GameStats_GetCapped(Save_GameStats_Get(args->saveData), GAME_STAT_UNK0); + args->unk10 = GameStats_GetCapped(Save_GameStats_Get(args->saveData), GAME_STAT_UNK0); if (a1 == 1 && !CheckFlag997(Save_VarsFlags_Get(fieldSystem->saveData))) { args->unk0 = 0; } else { @@ -640,12 +640,12 @@ ApricornBoxArgs *ApricornBox_LaunchApp(FieldSystem *fieldSystem, int a1) { ApricornBoxArgs *sub_0203ED80(FieldSystem *fieldSystem, u32 a1, u16 *a2) { ApricornBoxArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(ApricornBoxArgs)); MI_CpuFill8(args, 0, sizeof(ApricornBoxArgs)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->saveData = FieldSystem_GetSaveData(fieldSystem); args->menuInputStatePtr = &fieldSystem->menuInputState; - args->unk10 = GameStats_GetCapped(Save_GameStats_Get(args->saveData), GAME_STAT_UNK0); - args->unk0 = 3; - args->unkC = a1; - args->unk8 = a2; + args->unk10 = GameStats_GetCapped(Save_GameStats_Get(args->saveData), GAME_STAT_UNK0); + args->unk0 = 3; + args->unkC = a1; + args->unk8 = a2; ApricornBox_LaunchApp_Impl(fieldSystem, args); return args; } @@ -658,10 +658,10 @@ static void BugContestSwapMon_LaunchApp_Impl(FieldSystem *fieldSystem, BugContes BugContestSwapMonArgs *BugContestSwapMon_LaunchApp(FieldSystem *fieldSystem, Pokemon *newlyCaughtMon, Pokemon *currentMon, BOOL noPokemonCaught) { BugContestSwapMonArgs *args = AllocFromHeap(HEAP_ID_FIELD, sizeof(BugContestSwapMonArgs)); MI_CpuFill8(args, 0, sizeof(BugContestSwapMonArgs)); - args->newlyCaughtMon = newlyCaughtMon; - args->currentMon = currentMon; + args->newlyCaughtMon = newlyCaughtMon; + args->currentMon = currentMon; args->noPokemonCaught = noPokemonCaught; - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); BugContestSwapMon_LaunchApp_Impl(fieldSystem, args); return args; } @@ -672,8 +672,8 @@ static void OptionsMenu_LaunchApp_Impl(FieldSystem *fieldSystem, OptionsMenuArgs } OptionsMenuArgs *OptionsMenu_LaunchApp(FieldSystem *fieldSystem) { - OptionsMenuArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(OptionsMenuArgs)); - args->options = Save_PlayerData_GetOptionsAddr(FieldSystem_GetSaveData(fieldSystem)); + OptionsMenuArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(OptionsMenuArgs)); + args->options = Save_PlayerData_GetOptionsAddr(FieldSystem_GetSaveData(fieldSystem)); args->menuInputStatePtr = &fieldSystem->menuInputState; OptionsMenu_LaunchApp_Impl(fieldSystem, args); return args; @@ -690,10 +690,10 @@ static void PokeathlonCourseRecord_LaunchApp_Impl(FieldSystem *fieldSystem, Poke PokeathlonCourseRecordArgs *PokeathlonCourseRecord_LaunchApp(FieldSystem *fieldSystem) { PokeathlonCourseRecordArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(PokeathlonCourseRecordArgs)); - SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); - POKEATHLON_SAV *pokeathlon = Save_Pokeathlon_Get(saveData); - args->pokeathlon = sub_02031974(pokeathlon); - args->unk4 = sub_0203EE54(saveData); + SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); + POKEATHLON_SAV *pokeathlon = Save_Pokeathlon_Get(saveData); + args->pokeathlon = sub_02031974(pokeathlon); + args->unk4 = sub_0203EE54(saveData); PokeathlonCourseRecord_LaunchApp_Impl(fieldSystem, args); return args; } @@ -704,14 +704,14 @@ static void PokeathlonMedals_LaunchApp_Impl(FieldSystem *fieldSystem, Pokeathlon } PokeathlonMedalsArgs *PokeathlonMedals_LaunchApp(FieldSystem *fieldSystem) { - PokeathlonMedalsArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(PokeathlonMedalsArgs)); - SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); + PokeathlonMedalsArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(PokeathlonMedalsArgs)); + SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); POKEATHLON_SAV *pokeathlonSave = Save_Pokeathlon_Get(saveData); - Pokedex *pokedex = Save_Pokedex_Get(saveData); - args->pokedex = pokedex; - args->unk4 = sub_02031978(pokeathlonSave); - args->natDexEnabled = Pokedex_GetNatDexFlag(pokedex); - args->unkC = sub_0203EE54(saveData); + Pokedex *pokedex = Save_Pokedex_Get(saveData); + args->pokedex = pokedex; + args->unk4 = sub_02031978(pokeathlonSave); + args->natDexEnabled = Pokedex_GetNatDexFlag(pokedex); + args->unkC = sub_0203EE54(saveData); PokeathlonMedals_LaunchApp_Impl(fieldSystem, args); return args; } @@ -723,13 +723,13 @@ static void PokeathlonEventRecord_LaunchApp_Impl(FieldSystem *fieldSystem, Pokea PokeathlonEventRecordArgs *PokeathlonEventRecord_LaunchApp(FieldSystem *fieldSystem) { PokeathlonEventRecordArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(PokeathlonEventRecordArgs)); - SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); - POKEATHLON_SAV *pokeathlonSave = Save_Pokeathlon_Get(saveData); - args->unk0 = sub_0203197C(pokeathlonSave); - args->unk4 = sub_02031984(pokeathlonSave); - args->profile = Save_PlayerData_GetProfileAddr(saveData); - args->unk10 = sub_0203EE54(saveData); - args->unk8 = sub_02031990(pokeathlonSave); + SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); + POKEATHLON_SAV *pokeathlonSave = Save_Pokeathlon_Get(saveData); + args->unk0 = sub_0203197C(pokeathlonSave); + args->unk4 = sub_02031984(pokeathlonSave); + args->profile = Save_PlayerData_GetProfileAddr(saveData); + args->unk10 = sub_0203EE54(saveData); + args->unk8 = sub_02031990(pokeathlonSave); PokeathlonEventRecord_LaunchApp_Impl(fieldSystem, args); return args; } @@ -741,17 +741,17 @@ static void PokeathlonUnk_LaunchApp_Impl(FieldSystem *fieldSystem, UnkStruct_020 UnkStruct_0203EFA0 *PokeathlonUnk_LaunchApp(FieldSystem *fieldSystem) { UnkStruct_0203EFA0 *args = AllocFromHeapAtEnd(HEAP_ID_3, sizeof(UnkStruct_0203EFA0)); - SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); - args->pokeathlon = Save_Pokeathlon_Get(saveData); - args->profile = profile; + SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); + args->pokeathlon = Save_Pokeathlon_Get(saveData); + args->profile = profile; PokeathlonUnk_LaunchApp_Impl(fieldSystem, args); return args; } static void sub_0203EFD4(FieldSystem *fieldSystem, UseMailArgs *args) { static const OVY_MGR_TEMPLATE _020FA434 = { ov55_UnkApp_Init, ov55_UnkApp_Main, ov55_UnkApp_Exit, FS_OVERLAY_ID(OVY_55) }; - args->menuInputStatePtr = &fieldSystem->menuInputState; + args->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &_020FA434, args); } @@ -781,34 +781,34 @@ UseMailArgs *sub_0203F050(FieldSystem *fieldSystem, Pokemon *mon, HeapID heapId) UnkStruct_0203F074 *sub_0203F074(FieldSystem *fieldSystem, HeapID heapId) { static const OVY_MGR_TEMPLATE _020FA2F4 = { ov103_021EC940, ov103_021EC988, ov103_021EC9A4, FS_OVERLAY_ID(OVY_103) }; - UnkStruct_0203F074 *args = AllocFromHeap(heapId, sizeof(UnkStruct_0203F074)); - args->saveData = FieldSystem_GetSaveData(fieldSystem); - args->fieldSystem = fieldSystem; - args->menuInputStatePtr = &fieldSystem->menuInputState; + UnkStruct_0203F074 *args = AllocFromHeap(heapId, sizeof(UnkStruct_0203F074)); + args->saveData = FieldSystem_GetSaveData(fieldSystem); + args->fieldSystem = fieldSystem; + args->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &_020FA2F4, args); return args; } void sub_0203F0A8(FieldSystem *fieldSystem, UnkOv67Args *args) { static const OVY_MGR_TEMPLATE _020FA2E4 = { ov67_021E5900, ov67_021E5984, ov67_021E5968, FS_OVERLAY_ID(OVY_67) }; - OVY_MGR_TEMPLATE template = _020FA2E4; + OVY_MGR_TEMPLATE template = _020FA2E4; FieldSystem_LaunchApplication(fieldSystem, &template, args); } static UnkStruct_0203F0D0 *sub_0203F0D0(HeapID heapId, SaveData *saveData, int partyIdx, int *a3, int a4) { UnkStruct_0203F0D0 *ptr = AllocFromHeap(heapId, sizeof(UnkStruct_0203F0D0)); memset(ptr, 0, sizeof(UnkStruct_0203F0D0)); - ptr->mon = Party_GetMonByIndex(SaveArray_Party_Get(saveData), partyIdx); + ptr->mon = Party_GetMonByIndex(SaveArray_Party_Get(saveData), partyIdx); SaveFashionData *fashionSave = Save_FashionData_Get(saveData); - SaveFashionDataSub *var1 = sub_0202B9B8(fashionSave, 0); - FashionCase *fashionCase = Save_FashionData_GetFashionCase(fashionSave); - ptr->unk4 = var1; - ptr->fashionCase = fashionCase; - ptr->options = Save_PlayerData_GetOptionsAddr(saveData); - ptr->gameStats = Save_GameStats_Get(saveData); - ptr->profile = Save_PlayerData_GetProfileAddr(saveData); - ptr->unk18 = a3; - ptr->unk1C = a4; + SaveFashionDataSub *var1 = sub_0202B9B8(fashionSave, 0); + FashionCase *fashionCase = Save_FashionData_GetFashionCase(fashionSave); + ptr->unk4 = var1; + ptr->fashionCase = fashionCase; + ptr->options = Save_PlayerData_GetOptionsAddr(saveData); + ptr->gameStats = Save_GameStats_Get(saveData); + ptr->profile = Save_PlayerData_GetProfileAddr(saveData); + ptr->unk18 = a3; + ptr->unk1C = a4; return ptr; } @@ -850,7 +850,7 @@ void sub_0203F198(TaskManager *taskman, u16 *ret, SaveData *saveData, u16 a3, u1 static BOOL sub_0203F1E8(FieldSystem *fieldSystem, UnkStruct_0203F0D0 *args) { static OVY_MGR_TEMPLATE _0210F9AC = { ov41_02246DE0, ov41_02246F08, ov41_02247150, FS_OVERLAY_ID(OVY_41) }; - args->menuInputStatePtr = &fieldSystem->menuInputState; + args->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &_0210F9AC, args); return TRUE; } @@ -866,20 +866,20 @@ static OVY_MGR_TEMPLATE sOverlayTemplate_WirelessTradeSelectMon = { WirelessTrad static const OVY_MGR_TEMPLATE sOverlayTemplate_TradeSequence = { TradeSequence_Init, TradeSequence_Main, TradeSequence_Exit, FS_OVERLAY_ID(OVY_71) }; static void InitWirelessTradeSelectMonArgs(WirelessTradeSelectMonArgs *args, FieldSystem *fieldSystem) { - args->profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - args->party = SaveArray_Party_Get(fieldSystem->saveData); - args->palPad = SaveArray_Get(fieldSystem->saveData, SAVE_PALPAD); - args->wifiHistory = Save_WiFiHistory_Get(fieldSystem->saveData); - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - args->pokedex = Save_Pokedex_Get(fieldSystem->saveData); - args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); - args->saveData = fieldSystem->saveData; - args->gameStats = Save_GameStats_Get(fieldSystem->saveData); + args->profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); + args->party = SaveArray_Party_Get(fieldSystem->saveData); + args->palPad = SaveArray_Get(fieldSystem->saveData, SAVE_PALPAD); + args->wifiHistory = Save_WiFiHistory_Get(fieldSystem->saveData); + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->pokedex = Save_Pokedex_Get(fieldSystem->saveData); + args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); + args->saveData = fieldSystem->saveData; + args->gameStats = Save_GameStats_Get(fieldSystem->saveData); args->partnerProfile = AllocFromHeap(HEAP_ID_32, PlayerProfile_sizeof()); - args->unk38 = AllocFromHeap(HEAP_ID_32, sub_02070D90()); - args->unk3C = AllocFromHeap(HEAP_ID_32, sub_02070D90()); - args->fieldSystem = fieldSystem; - args->unk30 = 0; + args->unk38 = AllocFromHeap(HEAP_ID_32, sub_02070D90()); + args->unk3C = AllocFromHeap(HEAP_ID_32, sub_02070D90()); + args->fieldSystem = fieldSystem; + args->unk30 = 0; } static void WirelessTradeSelectMon_FreeArgs(WirelessTradeSelectMonArgs *args) { @@ -901,7 +901,7 @@ static BOOL Task_WirelessTrade(TaskManager *taskman) { u32 evolutionCondition; FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - WirelessTradeData *data = TaskManager_GetEnvironment(taskman); + WirelessTradeData *data = TaskManager_GetEnvironment(taskman); switch (data->state) { case WIRELESS_TRADE_STATE_0: if (!sub_02039998()) { @@ -926,10 +926,10 @@ static BOOL Task_WirelessTrade(TaskManager *taskman) { break; case WIRELESS_TRADE_STATE_4: data->tradeSequence.partnerProfile = data->wirelessTradeSelectMon.partnerProfile; - data->tradeSequence.unk0 = Mon_GetBoxMon(data->wirelessTradeSelectMon.unk38); - data->tradeSequence.unk4 = Mon_GetBoxMon(data->wirelessTradeSelectMon.unk3C); - data->tradeSequence.options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - data->tradeSequence.unk10 = 1; + data->tradeSequence.unk0 = Mon_GetBoxMon(data->wirelessTradeSelectMon.unk38); + data->tradeSequence.unk4 = Mon_GetBoxMon(data->wirelessTradeSelectMon.unk3C); + data->tradeSequence.options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + data->tradeSequence.unk10 = 1; TIMEOFDAY timeOfDay = Field_GetTimeOfDay(fieldSystem); switch (timeOfDay) { @@ -953,11 +953,11 @@ static BOOL Task_WirelessTrade(TaskManager *taskman) { break; case WIRELESS_TRADE_STATE_5: int heldItem = GetMonData(data->wirelessTradeSelectMon.unk3C, MON_DATA_HELD_ITEM, NULL); - int species = GetMonEvolution(NULL, data->wirelessTradeSelectMon.unk3C, EVOCTX_TRADE, heldItem, (int *)&evolutionCondition); + int species = GetMonEvolution(NULL, data->wirelessTradeSelectMon.unk3C, EVOCTX_TRADE, heldItem, (int *)&evolutionCondition); if (species != SPECIES_NONE) { CreateHeap(HEAP_ID_3, HEAP_ID_26, 0x30000); data->tradeSequence.evolutionTaskData = sub_02075A7C(NULL, data->wirelessTradeSelectMon.unk3C, species, Save_PlayerData_GetOptionsAddr(fieldSystem->saveData), sub_02088288(fieldSystem->saveData), Save_Pokedex_Get(fieldSystem->saveData), Save_Bag_Get(fieldSystem->saveData), Save_GameStats_Get(fieldSystem->saveData), evolutionCondition, 4, HEAP_ID_26); - data->state = WIRELESS_TRADE_STATE_6; + data->state = WIRELESS_TRADE_STATE_6; } else { data->state = WIRELESS_TRADE_STATE_7; } @@ -974,7 +974,7 @@ static BOOL Task_WirelessTrade(TaskManager *taskman) { break; case WIRELESS_TRADE_STATE_7: data->wirelessTradeSelectMon.unk30++; - data->state = 2; + data->state = 2; GameStats *gameStats = Save_GameStats_Get(fieldSystem->saveData); GameStats_AddScore(gameStats, SCORE_EVENT_16); if (sub_02039998()) { @@ -987,7 +987,7 @@ static BOOL Task_WirelessTrade(TaskManager *taskman) { void CallTask_WirelessTrade(TaskManager *taskman) { WirelessTradeData *data = AllocFromHeap(HEAP_ID_32, sizeof(WirelessTradeData)); - data->state = 0; + data->state = 0; TaskManager_Call(taskman, Task_WirelessTrade, data); } @@ -996,18 +996,18 @@ static const OVY_MGR_TEMPLATE _020FA2B4 = { ov73_021E5900, ov73_021E5AB8, ov73_0 void sub_0203F4C8(FieldSystem *fieldSystem) { UnkStruct_0203F4C8 *args = AllocFromHeap(HEAP_ID_32, sizeof(UnkStruct_0203F4C8)); - args->unk0 = fieldSystem->unk84; - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->unk0 = fieldSystem->unk84; + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); FieldSystem_LaunchApplication(fieldSystem, &_020FA2C4, args); } UnkStruct_0203F4F8 *sub_0203F4F8(FieldSystem *fieldSystem) { UnkStruct_0203F4F8 *args = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203F4F8)); - args->saveData = fieldSystem->saveData; - args->unk4 = fieldSystem->unk84; - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - args->gameStats = Save_GameStats_Get(fieldSystem->saveData); - args->menuInputStatePtr = &fieldSystem->menuInputState; + args->saveData = fieldSystem->saveData; + args->unk4 = fieldSystem->unk84; + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->gameStats = Save_GameStats_Get(fieldSystem->saveData); + args->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &_020FA2B4, args); return args; } @@ -1017,7 +1017,7 @@ static const OVY_MGR_TEMPLATE sOverlayTemplate_PalPad = { PalPad_Init, PalPad_Ma PalPadArgs *PalPad_LaunchApp(FieldSystem *fieldSystem, SaveData *saveData, HeapID heapId) { PalPadArgs *args = AllocFromHeap(heapId, sizeof(PalPadArgs)); MI_CpuFill8(args, 0, sizeof(PalPadArgs)); - args->saveData = saveData; + args->saveData = saveData; args->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &sOverlayTemplate_PalPad, args); return args; @@ -1029,7 +1029,7 @@ void sub_0203F570(FieldSystem *fieldSystem, SaveData *args) { static BOOL Task_NamingScreen(TaskManager *taskman) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - NamingScreenData *data = TaskManager_GetEnvironment(taskman); + NamingScreenData *data = TaskManager_GetEnvironment(taskman); switch (data->state) { case 0: CallTask_LeaveOverworld(taskman); @@ -1050,7 +1050,7 @@ static BOOL Task_NamingScreen(TaskManager *taskman) { data->args->noInput = 1; } } else if (args->kind == 5) { - u16 *var2 = String_cstr(args->nameInputString); + u16 *var2 = String_cstr(args->nameInputString); SAV_FRIEND_GRP *friendGroup = Save_FriendGroup_Get(fieldSystem->saveData); if (sub_0202C88C(friendGroup, var2)) { data->args->noInput = 2; @@ -1073,7 +1073,7 @@ static BOOL Task_NamingScreen(TaskManager *taskman) { static void SetName(TaskManager *taskman) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - NamingScreenData *data = TaskManager_GetEnvironment(taskman); + NamingScreenData *data = TaskManager_GetEnvironment(taskman); switch (data->args->kind) { case NAME_SCREEN_PLAYER: PlayerProfile *profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); @@ -1087,7 +1087,7 @@ static void SetName(TaskManager *taskman) { Pokemon *mon; if (data->partyIdx == 0xff) { BugContest *contest = FieldSystem_BugContest_Get(fieldSystem); - mon = contest->mon; + mon = contest->mon; } else { mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), data->partyIdx); } @@ -1106,24 +1106,24 @@ static void SetName(TaskManager *taskman) { void CallTask_NamingScreen(TaskManager *taskman, NameScreenType type, int species, int maxLen, int partyIdx, const u16 *defaultStr, u16 *retVar) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskman); - NamingScreenData *data = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(NamingScreenData)); - data->state = 0; - data->partyIdx = partyIdx; - data->retVar = retVar; - data->args = NamingScreen_CreateArgs(HEAP_ID_FIELD, type, species, maxLen, Save_PlayerData_GetOptionsAddr(fieldSystem->saveData), &fieldSystem->menuInputState); - data->unk10 = String_New(12, HEAP_ID_FIELD); + NamingScreenData *data = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(NamingScreenData)); + data->state = 0; + data->partyIdx = partyIdx; + data->retVar = retVar; + data->args = NamingScreen_CreateArgs(HEAP_ID_FIELD, type, species, maxLen, Save_PlayerData_GetOptionsAddr(fieldSystem->saveData), &fieldSystem->menuInputState); + data->unk10 = String_New(12, HEAP_ID_FIELD); switch (type) { case NAME_SCREEN_POKEMON: Pokemon *mon; if (partyIdx == 0xff) { BugContest *contest = FieldSystem_BugContest_Get(fieldSystem); - mon = contest->mon; + mon = contest->mon; } else { mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), data->partyIdx); } data->args->monGender = GetMonData(mon, MON_DATA_GENDER, NULL); - data->args->monForm = GetMonData(mon, MON_DATA_FORM, NULL); + data->args->monForm = GetMonData(mon, MON_DATA_FORM, NULL); if (defaultStr != NULL) { CopyU16ArrayToString(data->unk10, defaultStr); } @@ -1142,10 +1142,10 @@ void CallTask_NamingScreen(TaskManager *taskman, NameScreenType type, int specie void TrainerCard_LaunchApp(FieldSystem *fieldSystem, TrainerCardAppArgs *args) { static const OVY_MGR_TEMPLATE sOverlayTemplate_TrainerCard = { TrainerCard_Init, TrainerCard_Main, TrainerCard_Exit, FS_OVERLAY_ID(trainer_card) }; - args->unk66C.menuInputStatePtr = &fieldSystem->menuInputState; - args->unk66C.saveData = fieldSystem->saveData; - args->unk66C.gameCleared = CheckGameClearFlag(Save_VarsFlags_Get(fieldSystem->saveData)); - args->unk66C.unk8 = 0; + args->unk66C.menuInputStatePtr = &fieldSystem->menuInputState; + args->unk66C.saveData = fieldSystem->saveData; + args->unk66C.gameCleared = CheckGameClearFlag(Save_VarsFlags_Get(fieldSystem->saveData)); + args->unk66C.unk8 = 0; FieldSystem_LaunchApplication(fieldSystem, &sOverlayTemplate_TrainerCard, args); } @@ -1164,49 +1164,49 @@ void TrainerCardSignature_LaunchApp(FieldSystem *fieldSystem) { Save_TrainerCard_Get(fieldSystem->saveData); // unused static const OVY_MGR_TEMPLATE sOverlayTemplate_TrainerCardSignature = { TrainerCardSignature_Init, TrainerCardSignature_Main, TrainerCardSignature_Exit, FS_OVERLAY_ID(trainer_card_signature) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_TrainerCardSignature; + OVY_MGR_TEMPLATE template = sOverlayTemplate_TrainerCardSignature; FieldSystem_LaunchApplication(fieldSystem, &template, fieldSystem->saveData); } void sub_0203F844(FieldSystem *fieldSystem, u16 a1) { static const OVY_MGR_TEMPLATE _020FA264 = { ov70_02238430, ov70_022385C0, ov70_022386F4, FS_OVERLAY_ID(OVY_70) }; - OVY_MGR_TEMPLATE template = _020FA264; + OVY_MGR_TEMPLATE template = _020FA264; UnkStruct_0203F844 *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnkStruct_0203F844)); - args->unk0 = sub_0202DB34(fieldSystem->saveData); - args->sysInfo = Save_SysInfo_Get(fieldSystem->saveData); - args->party = (Party *)SaveArray_Get(fieldSystem->saveData, SAVE_PARTY); - args->pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); - args->pokedex = Save_Pokedex_Get(fieldSystem->saveData); - args->unk14 = sub_0202C6F4(fieldSystem->saveData); - args->wifiHistory = Save_WiFiHistory_Get(fieldSystem->saveData); - args->profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - args->gameStats = Save_GameStats_Get(fieldSystem->saveData); - args->unk38 = sub_02088288(fieldSystem->saveData); - args->saveData = fieldSystem->saveData; - args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); - args->unk34 = sub_0203A040(args->unk14); - args->bag = Save_Bag_Get(fieldSystem->saveData); - args->unk3C = a1; + args->unk0 = sub_0202DB34(fieldSystem->saveData); + args->sysInfo = Save_SysInfo_Get(fieldSystem->saveData); + args->party = (Party *)SaveArray_Get(fieldSystem->saveData, SAVE_PARTY); + args->pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); + args->pokedex = Save_Pokedex_Get(fieldSystem->saveData); + args->unk14 = sub_0202C6F4(fieldSystem->saveData); + args->wifiHistory = Save_WiFiHistory_Get(fieldSystem->saveData); + args->profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->gameStats = Save_GameStats_Get(fieldSystem->saveData); + args->unk38 = sub_02088288(fieldSystem->saveData); + args->saveData = fieldSystem->saveData; + args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); + args->unk34 = sub_0203A040(args->unk14); + args->bag = Save_Bag_Get(fieldSystem->saveData); + args->unk3C = a1; FieldSystem_LaunchApplication(fieldSystem, &template, args); } NintendoWifiConnectArgs *NintendoWifiConnection_LaunchApp(FieldSystem *fieldSystem, u16 a1, u16 a2) { static const OVY_MGR_TEMPLATE sOverlayTemplate_NintendoWifiConnect = { NintendoWfc_Init, NintendoWfc_Main, NintendoWfc_Exit, FS_OVERLAY_ID(OVY_72) }; - OVY_MGR_TEMPLATE template = sOverlayTemplate_NintendoWifiConnect; + OVY_MGR_TEMPLATE template = sOverlayTemplate_NintendoWifiConnect; NintendoWifiConnectArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(NintendoWifiConnectArgs)); - args->frontierData = Save_FrontierData_Get(fieldSystem->saveData); - args->unk4 = sub_0202D928(fieldSystem->saveData); - args->sysInfo = Save_SysInfo_Get(fieldSystem->saveData); - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - args->unk14 = sub_0202C08C(sub_0202C6F4(fieldSystem->saveData)); - args->saveData = fieldSystem->saveData; - args->unk1C = sub_0203A040(sub_0202C6F4(fieldSystem->saveData)); - args->unk18 = a1; - args->unk24 = a2; - args->unk20 = 1; + args->frontierData = Save_FrontierData_Get(fieldSystem->saveData); + args->unk4 = sub_0202D928(fieldSystem->saveData); + args->sysInfo = Save_SysInfo_Get(fieldSystem->saveData); + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->unk14 = sub_0202C08C(sub_0202C6F4(fieldSystem->saveData)); + args->saveData = fieldSystem->saveData; + args->unk1C = sub_0203A040(sub_0202C6F4(fieldSystem->saveData)); + args->unk18 = a1; + args->unk24 = a2; + args->unk20 = 1; FieldSystem_LaunchApplication(fieldSystem, &template, args); return args; } @@ -1246,7 +1246,7 @@ void Credits_LaunchApp(FieldSystem *fieldSystem, CreditsArgs *args) { void MoveRelearner_LaunchApp(FieldSystem *menuInputStatePtr, MoveRelearnerArgs *args) { OVY_MGR_TEMPLATE template = { MoveRelearner_Init, MoveRelearner_Main, MoveRelearner_Exit, FS_OVERLAY_ID(OVY_68) }; - args->menuInputStatePtr = &menuInputStatePtr->menuInputState; + args->menuInputStatePtr = &menuInputStatePtr->menuInputState; FieldSystem_LaunchApplication(menuInputStatePtr, &template, args); } @@ -1256,43 +1256,43 @@ void HatchEggInParty(FieldSystem *fieldSystem) { Pokemon *mon = sub_0206CE44(SaveArray_Party_Get(fieldSystem->saveData)); GF_ASSERT(mon != NULL); - data.mon = mon; + data.mon = mon; data.options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); data.profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - data.unkC = FieldSystem_GetOverriddenMusicId(fieldSystem, fieldSystem->location->mapId); + data.unkC = FieldSystem_GetOverriddenMusicId(fieldSystem, fieldSystem->location->mapId); CallTask_HatchEggInParty(fieldSystem->taskman, &data); } VoltorbFlipArgs *VoltorbFlip_LaunchApp(FieldSystem *fieldSystem, u32 luck) { static const OVY_MGR_TEMPLATE sOverlayTemplate_VoltorbFlip = { VoltorbFlip_Init, VoltorbFlip_Main, VoltorbFlip_Exit, FS_OVERLAY_ID(voltorb_flip) }; - VoltorbFlipArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(VoltorbFlipArgs)); + VoltorbFlipArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(VoltorbFlipArgs)); MI_CpuFill8(args, 0, sizeof(VoltorbFlipArgs)); - SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); - args->coins = Save_PlayerData_GetCoinsAddr(saveData); - args->options = Save_PlayerData_GetOptionsAddr(saveData); + SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); + args->coins = Save_PlayerData_GetCoinsAddr(saveData); + args->options = Save_PlayerData_GetOptionsAddr(saveData); args->menuInputStatePtr = &fieldSystem->menuInputState; - args->profile = Save_PlayerData_GetProfileAddr(saveData); - args->saveData = fieldSystem->saveData; + args->profile = Save_PlayerData_GetProfileAddr(saveData); + args->saveData = fieldSystem->saveData; FieldSystem_LaunchApplication(fieldSystem, &sOverlayTemplate_VoltorbFlip, args); return args; } CertificatesArgs *Certificates_LaunchApp(FieldSystem *fieldSystem, HeapID heapId, u16 certificateId) { static const OVY_MGR_TEMPLATE sOverlayTemplate_Certificates = { Certificates_Init, Certificates_Main, Certificates_Exit, FS_OVERLAY_ID(certificates_app) }; - CertificatesArgs *args = AllocFromHeap(heapId, sizeof(CertificatesArgs)); - args->certificateId = certificateId; - args->saveData = fieldSystem->saveData; + CertificatesArgs *args = AllocFromHeap(heapId, sizeof(CertificatesArgs)); + args->certificateId = certificateId; + args->saveData = fieldSystem->saveData; FieldSystem_LaunchApplication(fieldSystem, &sOverlayTemplate_Certificates, args); return args; } UnkStruct_0203FAB4 *sub_0203FAB4(FieldSystem *fieldSystem, u8 a1, u8 a2, u16 a3, HeapID heapId) { static OVY_MGR_TEMPLATE _0210F9BC = { ov86_021E5900, ov86_021E5A40, ov86_021E5AA4, FS_OVERLAY_ID(OVY_86) }; - UnkStruct_0203FAB4 *args = AllocFromHeap(heapId, sizeof(UnkStruct_0203FAB4)); - args->unk4 = a1; - args->unk5 = a2; - args->unk6 = a3; - args->unk0 = fieldSystem->saveData; + UnkStruct_0203FAB4 *args = AllocFromHeap(heapId, sizeof(UnkStruct_0203FAB4)); + args->unk4 = a1; + args->unk5 = a2; + args->unk6 = a3; + args->unk0 = fieldSystem->saveData; FieldSystem_LaunchApplication(fieldSystem, &_0210F9BC, args); return args; } @@ -1300,18 +1300,18 @@ UnkStruct_0203FAB4 *sub_0203FAB4(FieldSystem *fieldSystem, u8 a1, u8 a2, u16 a3, PartyMenuArgs *PartyMenu_LaunchApp_Gracidea(FieldSystem *fieldSystem, HeapID heapId, u16 itemId) { PartyMenuArgs *args = AllocFromHeap(heapId, sizeof(PartyMenuArgs)); memset(args, 0, sizeof(PartyMenuArgs)); - args->party = SaveArray_Party_Get(fieldSystem->saveData); - args->bag = Save_Bag_Get(fieldSystem->saveData); - args->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - args->unk_10 = sub_020270C4(fieldSystem->saveData); + args->party = SaveArray_Party_Get(fieldSystem->saveData); + args->bag = Save_Bag_Get(fieldSystem->saveData); + args->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->unk_10 = sub_020270C4(fieldSystem->saveData); args->fieldMoveCheckData = NULL; - args->unk_25 = 0; - args->context = PARTY_MENU_CONTEXT_USE_ITEM; - args->itemId = itemId; - args->partySlot = 0; - args->fieldSystem = fieldSystem; - args->menuInputStatePtr = &fieldSystem->menuInputState; + args->unk_25 = 0; + args->context = PARTY_MENU_CONTEXT_USE_ITEM; + args->itemId = itemId; + args->partySlot = 0; + args->fieldSystem = fieldSystem; + args->menuInputStatePtr = &fieldSystem->menuInputState; FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, args); return args; } @@ -1336,18 +1336,18 @@ ScratchOffCardsArgs *ScratchOffCards_LaunchApp(FieldSystem *fieldSystem, HeapID PokemonSummaryArgs *PokemonSummary_LaunchApp(HeapID heapId, FieldSystem *fieldSystem, u16 partySlot, u16 moveToLearn) { PokemonSummaryArgs *args = AllocFromHeap(HEAP_ID_FIELD, sizeof(PokemonSummaryArgs)); - args->party = SaveArray_Party_Get(fieldSystem->saveData); - args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - args->unk11 = 1; - args->partySlot = partySlot; - args->partyCount = Party_GetCount(args->party); - args->moveToLearn = MOVE_NONE; - args->unk12 = 0; - args->ribbons = Save_SpecialRibbons_Get(fieldSystem->saveData); - args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); - args->unk2C = 0; - args->unk28 = 0; - args->isFlag982Set = sub_0208828C(fieldSystem->saveData); + args->party = SaveArray_Party_Get(fieldSystem->saveData); + args->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + args->unk11 = 1; + args->partySlot = partySlot; + args->partyCount = Party_GetCount(args->party); + args->moveToLearn = MOVE_NONE; + args->unk12 = 0; + args->ribbons = Save_SpecialRibbons_Get(fieldSystem->saveData); + args->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); + args->unk2C = 0; + args->unk28 = 0; + args->isFlag982Set = sub_0208828C(fieldSystem->saveData); sub_02089D40(args, _020FA0B0); sub_0208AD34(args, Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); @@ -1357,14 +1357,14 @@ PokemonSummaryArgs *PokemonSummary_LaunchApp(HeapID heapId, FieldSystem *fieldSy void sub_0203FC14(FieldSystem *fieldSystem, u16 a1, u16 a2) { static const OVY_MGR_TEMPLATE _020FA1C4 = { sub_020192D0, sub_0201935C, sub_02019490, FS_OVERLAY_ID(OVY_39) }; - OVY_MGR_TEMPLATE template = _020FA1C4; + OVY_MGR_TEMPLATE template = _020FA1C4; UnkStruct_0203FC14 *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnkStruct_0203FC14)); MI_CpuFill8(args, 0, sizeof(UnkStruct_0203FC14)); args->fieldSystem = fieldSystem; - args->saveData = fieldSystem->saveData; - args->unk8 = a1; - args->unkC = a2; + args->saveData = fieldSystem->saveData; + args->unk8 = a1; + args->unkC = a2; FieldSystem_LaunchApplication(fieldSystem, &template, args); } @@ -1375,24 +1375,24 @@ void PokeathlonCourse_LaunchApp(FieldSystem *fieldSystem, PokeathlonCourseArgs * void sub_0203FC68(FieldSystem *fieldSystem, void *args) { static const OVY_MGR_TEMPLATE _020FA454 = { ov104_021E5900, ov104_021E59E4, ov104_021E5B14, FS_OVERLAY_ID(OVY_104) }; - OVY_MGR_TEMPLATE template = _020FA454; + OVY_MGR_TEMPLATE template = _020FA454; FieldSystem_LaunchApplication(fieldSystem, &template, args); } void sub_0203FC90(FieldSystem *fieldSystem, void *args) { static const OVY_MGR_TEMPLATE _020FA1D4 = { ov105_021E5900, ov105_021E59DC, ov105_021E5B14, FS_OVERLAY_ID(OVY_105) }; - OVY_MGR_TEMPLATE template = _020FA1D4; + OVY_MGR_TEMPLATE template = _020FA1D4; FieldSystem_LaunchApplication(fieldSystem, &template, args); } LegendaryCinematicArgs *LegendaryCinematic_LaunchApp(FieldSystem *fieldSystem, UnkStruct_0203FCC4 *a1, u16 a2, u16 a3, HeapID heapId) { static const OVY_MGR_TEMPLATE sOverlayTemplate_LegendaryCinematic = { LegendaryCinematic_Init, LegendaryCinematic_Main, LegendaryCinematic_Exit, FS_OVERLAY_ID(OVY_106) }; - LegendaryCinematicArgs *args = AllocFromHeap(heapId, sizeof(LegendaryCinematicArgs)); + LegendaryCinematicArgs *args = AllocFromHeap(heapId, sizeof(LegendaryCinematicArgs)); memset(args, 0, sizeof(LegendaryCinematicArgs)); args->saveData = FieldSystem_GetSaveData(fieldSystem); - args->unk4 = *a1; - args->unk4C = a2; - args->unk4E = a3; + args->unk4 = *a1; + args->unk4C = a2; + args->unk4E = a3; FieldSystem_LaunchApplication(fieldSystem, &sOverlayTemplate_LegendaryCinematic, args); return args; } diff --git a/src/link_ruleset_data.c b/src/link_ruleset_data.c index 3beceae000..41dfdd9a4d 100644 --- a/src/link_ruleset_data.c +++ b/src/link_ruleset_data.c @@ -23,149 +23,149 @@ static u8 sRulesetIndexes[] = { }; static LinkBattleRuleset sDefaultRuleset = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 6, - .maxLevel = 100, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = TRUE, - .ubersClause = TRUE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 6, + .maxLevel = 100, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = TRUE, + .ubersClause = TRUE, .speciesDupeClause = TRUE, - .itemDupeClause = TRUE, - .dragonRageClause = FALSE, + .itemDupeClause = TRUE, + .dragonRageClause = FALSE, }; static LinkBattleRuleset sAlternateRulesets[] = { [STD_RULESET_STANDARD] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 3, - .maxLevel = 50, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = TRUE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 3, + .maxLevel = 50, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = TRUE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_FANCY] = { - .name = { EOS }, - .totalLevel = 80, - .partyCount = 3, - .maxLevel = 30, - .heightLimit = -20, - .weightLimit = -20, - .evolvedPokemon = FALSE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 80, + .partyCount = 3, + .maxLevel = 30, + .heightLimit = -20, + .weightLimit = -20, + .evolvedPokemon = FALSE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_LITTLE] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 3, - .maxLevel = 5, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = FALSE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 3, + .maxLevel = 5, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = FALSE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = TRUE, + .itemDupeClause = FALSE, + .dragonRageClause = TRUE, }, [STD_RULESET_LIGHT] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 3, - .maxLevel = 50, - .heightLimit = 0, - .weightLimit = -99, - .evolvedPokemon = FALSE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 3, + .maxLevel = 50, + .heightLimit = 0, + .weightLimit = -99, + .evolvedPokemon = FALSE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_DOUBLE] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 4, - .maxLevel = 50, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = TRUE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 4, + .maxLevel = 50, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = TRUE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_STANDARD_2] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 3, - .maxLevel = 100, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = TRUE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 3, + .maxLevel = 100, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = TRUE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_LIGHT_2] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 3, - .maxLevel = 100, - .heightLimit = 0, - .weightLimit = -99, - .evolvedPokemon = FALSE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 3, + .maxLevel = 100, + .heightLimit = 0, + .weightLimit = -99, + .evolvedPokemon = FALSE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_DOUBLE_2] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 4, - .maxLevel = 100, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = TRUE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 4, + .maxLevel = 100, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = TRUE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_DOUBLE_3] = { - .name = { EOS }, - .totalLevel = 0, - .partyCount = 4, - .maxLevel = 200, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = TRUE, - .ubersClause = FALSE, + .name = { EOS }, + .totalLevel = 0, + .partyCount = 4, + .maxLevel = 200, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = TRUE, + .ubersClause = FALSE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, [STD_RULESET_GS] = { - .name = { EOS }, - .totalLevel = 0 | FLAG_RULESET_BAN_SOUL_DEW, - .partyCount = 4, - .maxLevel = 100, - .heightLimit = 0, - .weightLimit = 0, - .evolvedPokemon = TRUE, - .ubersClause = TRUE, + .name = { EOS }, + .totalLevel = 0 | FLAG_RULESET_BAN_SOUL_DEW, + .partyCount = 4, + .maxLevel = 100, + .heightLimit = 0, + .weightLimit = 0, + .evolvedPokemon = TRUE, + .ubersClause = TRUE, .speciesDupeClause = FALSE, - .itemDupeClause = FALSE, - .dragonRageClause = FALSE, + .itemDupeClause = FALSE, + .dragonRageClause = FALSE, }, }; LinkBattleRuleset *sub_020291E8(SaveData *saveData, int index) { diff --git a/src/list_menu.c b/src/list_menu.c index a356c8ae08..20f6365653 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -11,20 +11,20 @@ static void ListMenuCallSelectionChangedCallback(struct ListMenu *list, u8 onIni struct ListMenu *ListMenuInit(const struct ListMenuTemplate *template, u16 cursorPos, u16 itemsAbove, HeapID heapId) { struct ListMenu *list = AllocFromHeap(heapId, sizeof(struct ListMenu)); - list->template = *template; - list->cursor = ListMenuCursorNew(heapId); - list->cursorPos = cursorPos; - list->itemsAbove = itemsAbove; - list->unk_30 = 0; - list->unk_31 = 0; - list->taskId = 0xFF; - list->unk_33 = 0; - list->heapId = (u8)heapId; - list->cursorPal = list->template.cursorPal; - list->fillValue = list->template.fillValue; + list->template = *template; + list->cursor = ListMenuCursorNew(heapId); + list->cursorPos = cursorPos; + list->itemsAbove = itemsAbove; + list->unk_30 = 0; + list->unk_31 = 0; + list->taskId = 0xFF; + list->unk_33 = 0; + list->heapId = (u8)heapId; + list->cursorPal = list->template.cursorPal; + list->fillValue = list->template.fillValue; list->cursorShadowPal = list->template.cursorShadowPal; - list->lettersSpacing = list->template.lettersSpacing; - list->fontId = list->template.fontId; + list->lettersSpacing = list->template.lettersSpacing; + list->fontId = list->template.fontId; list->overrideEnabled = FALSE; if (list->template.totalItems < list->template.maxShowed) { list->template.maxShowed = list->template.totalItems; @@ -62,15 +62,15 @@ s32 ListMenu_ProcessInput(struct ListMenu *list) { switch (list->template.scrollMultiple) { case LIST_NO_MULTIPLE_SCROLL: default: - leftButton = FALSE; + leftButton = FALSE; rightButton = FALSE; break; case LIST_MULTIPLE_SCROLL_DPAD: - leftButton = (u16)(gSystem.newAndRepeatedKeys & REG_PAD_KEYINPUT_LEFT_MASK); + leftButton = (u16)(gSystem.newAndRepeatedKeys & REG_PAD_KEYINPUT_LEFT_MASK); rightButton = (u16)(gSystem.newAndRepeatedKeys & REG_PAD_KEYINPUT_RIGHT_MASK); break; case LIST_MULTIPLE_SCROLL_L_R: - leftButton = (u16)(gSystem.newAndRepeatedKeys & REG_PAD_KEYINPUT_L_MASK); + leftButton = (u16)(gSystem.newAndRepeatedKeys & REG_PAD_KEYINPUT_L_MASK); rightButton = (u16)(gSystem.newAndRepeatedKeys & REG_PAD_KEYINPUT_R_MASK); break; } @@ -109,8 +109,8 @@ void RedrawListMenu(struct ListMenu *list) { } void ListMenuOverrideSetColors(struct ListMenu *list, u8 cursorPal, u8 fillValue, u8 cursorShadowPal) { - list->cursorPal = cursorPal; - list->fillValue = fillValue; + list->cursorPal = cursorPal; + list->fillValue = fillValue; list->cursorShadowPal = cursorShadowPal; list->overrideEnabled = TRUE; } @@ -211,8 +211,8 @@ static void ListMenuPrintEntries(struct ListMenu *list, u16 startIndex, u16 yOff static void ListMenuDrawCursor(struct ListMenu *list) { u8 yMultiplier = (u8)(GetFontAttribute((u8)list->template.fontId, 1) + list->template.itemVerticalPadding); - u8 x = list->template.cursor_X; - u8 y = (u8)(list->itemsAbove * yMultiplier + list->template.upText_Y); + u8 x = list->template.cursor_X; + u8 y = (u8)(list->itemsAbove * yMultiplier + list->template.upText_Y); switch (list->template.cursorKind) { case 0: ListMenuUpdateCursorObj(list->cursor, list->template.window, x, y); @@ -228,8 +228,8 @@ static void ListMenuErasePrintedCursor(struct ListMenu *list, u16 itemsAbove) { switch (list->template.cursorKind) { case 0: { u8 yMultiplier = (u8)(GetFontAttribute(list->template.fontId, 1) + list->template.itemVerticalPadding); - u8 width = 7; - u8 height = 16; + u8 width = 7; + u8 height = 16; FillWindowPixelRect(list->template.window, list->template.fillValue, list->template.cursor_X, @@ -251,7 +251,7 @@ static u8 ListMenuUpdateSelectedRowIndexAndScroll(struct ListMenu *list, u8 movi u16 newRow; itemsAbove = list->itemsAbove; - cursorPos = list->cursorPos; + cursorPos = list->cursorPos; if (!movingDown) { if (list->template.maxShowed == 1) { @@ -278,7 +278,7 @@ static u8 ListMenuUpdateSelectedRowIndexAndScroll(struct ListMenu *list, u8 movi } } list->itemsAbove = newRow; - list->cursorPos = (u16)(cursorPos - 1); + list->cursorPos = (u16)(cursorPos - 1); } } else { if (list->template.maxShowed == 1) { @@ -305,7 +305,7 @@ static u8 ListMenuUpdateSelectedRowIndexAndScroll(struct ListMenu *list, u8 movi } } list->itemsAbove = newRow; - list->cursorPos = (u16)(cursorPos + 1); + list->cursorPos = (u16)(cursorPos + 1); } } return 2; @@ -324,8 +324,8 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, u8 movingDown) { ScrollWindow(list->template.window, 1, (u8)(count * yMultiplier), (u8)((list->template.fillValue << 4) | list->template.fillValue)); ListMenuPrintEntries(list, list->cursorPos, 0, count); - y = (u16)((list->template.maxShowed * yMultiplier) + list->template.upText_Y); - width = GetWindowWidth(list->template.window); + y = (u16)((list->template.maxShowed * yMultiplier) + list->template.upText_Y); + width = GetWindowWidth(list->template.window); height = GetWindowHeight(list->template.window); FillWindowPixelRect(list->template.window, list->template.fillValue, @@ -354,8 +354,8 @@ static BOOL ListMenuChangeSelection(struct ListMenu *list, u8 updateCursorAndCal u16 oldSelectedRow; u8 selectionChange, i, cursorCount; - oldSelectedRow = list->itemsAbove; - cursorCount = 0; + oldSelectedRow = list->itemsAbove; + cursorCount = 0; selectionChange = 0; for (i = 0; i < count; i++) { do { diff --git a/src/list_menu_2d.c b/src/list_menu_2d.c index 1ac08689b1..8362e46e96 100644 --- a/src/list_menu_2d.c +++ b/src/list_menu_2d.c @@ -24,16 +24,16 @@ static void Get2dMenuSelectionCoords(struct ListMenu2D *listMenu, u8 *x, u8 *y, static struct ListMenu2D *Create2dMenuInternalEx(const struct ListMenu2DTemplate *template, u8 x, u8 y, u8 initialSelection, u8 heapId, int cancelKey) { struct ListMenu2D *ret = AllocFromHeap((HeapID)heapId, sizeof(struct ListMenu2D)); - ret->template = *template; - ret->cursor = ListMenuCursorNew((HeapID)heapId); - ret->cancelKey = cancelKey; - ret->selectedIndex = initialSelection; - ret->maxItemWidth = Get2dMenuMaxItemWidth(ret); - ret->heapId = heapId; - ret->x = x; - ret->y = y; - ret->maxGlyphWidth = GetFontAttribute(template->fontId, 0) + GetFontAttribute(template->fontId, 2); - ret->maxGlyphHeight = GetFontAttribute(template->fontId, 1) + GetFontAttribute(template->fontId, 3); + ret->template = *template; + ret->cursor = ListMenuCursorNew((HeapID)heapId); + ret->cancelKey = cancelKey; + ret->selectedIndex = initialSelection; + ret->maxItemWidth = Get2dMenuMaxItemWidth(ret); + ret->heapId = heapId; + ret->x = x; + ret->y = y; + ret->maxGlyphWidth = GetFontAttribute(template->fontId, 0) + GetFontAttribute(template->fontId, 2); + ret->maxGlyphHeight = GetFontAttribute(template->fontId, 1) + GetFontAttribute(template->fontId, 3); Print2dMenuItemTexts(ret); Draw2dMenuCursor(ret); return ret; @@ -181,7 +181,7 @@ static void Print2dMenuItemTexts(struct ListMenu2D *listMenu) { u8 dx; u8 x; FillWindowPixelBuffer(listMenu->template.window, GetFontAttribute(listMenu->template.fontId, 6)); - x = listMenu->x; + x = listMenu->x; dx = listMenu->maxItemWidth + listMenu->maxGlyphWidth * 2; for (i = 0; i < listMenu->template.itemsWide; i++) { for (j = 0; j < listMenu->template.itemsHigh; j++) { @@ -207,17 +207,17 @@ static void Get2dMenuSelectionCoords(struct ListMenu2D *listMenu, u8 *x, u8 *y, struct ListMenu2D *CreateYesNoMenu(BgConfig *bgConfig, const WindowTemplate *windowTemplate, u16 tileNum, u8 paletteNum, u8 initialSelection, HeapID heapId) { struct ListMenu2DTemplate menuTemplate; - MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0191_bin, heapId); + MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0191_bin, heapId); LISTMENUITEM *items = ListMenuItems_New(2, heapId); ListMenuItems_AppendFromMsgData(items, msgData, msg_0191_00042, 0); ListMenuItems_AppendFromMsgData(items, msgData, msg_0191_00043, LIST_CANCEL); DestroyMsgData(msgData); - menuTemplate.items = items; - menuTemplate.window = AllocWindows(heapId, 1); - menuTemplate.fontId = 0; - menuTemplate.itemsWide = 1; - menuTemplate.itemsHigh = 2; - menuTemplate.yTop = 0; + menuTemplate.items = items; + menuTemplate.window = AllocWindows(heapId, 1); + menuTemplate.fontId = 0; + menuTemplate.itemsWide = 1; + menuTemplate.itemsHigh = 2; + menuTemplate.yTop = 0; menuTemplate.cursorType = 0; menuTemplate.enableWrap = 0; AddWindow(bgConfig, menuTemplate.window, windowTemplate); diff --git a/src/list_menu_items.c b/src/list_menu_items.c index 27b84bfab2..bb99a1754f 100644 --- a/src/list_menu_items.c +++ b/src/list_menu_items.c @@ -10,10 +10,10 @@ LISTMENUITEM *ListMenuItems_New(u32 n, HeapID heapId) { LISTMENUITEM *ret = AllocFromHeap(heapId, (n + 1) * sizeof(LISTMENUITEM)); if (ret != NULL) { for (i = 0; i < n; i++) { - ret[i].text = NULL; + ret[i].text = NULL; ret[i].value = 0; } - ret[i].text = (String *)-1; + ret[i].text = (String *)-1; ret[i].value = heapId; } return ret; @@ -29,7 +29,7 @@ void ListMenuItems_AppendFromMsgData(LISTMENUITEM *items, MsgData *msgData, int items = ListMenuItems_SeekEnd(items, &dummy); if (items != NULL) { - items->text = NewString_ReadMsgData(msgData, msgId); + items->text = NewString_ReadMsgData(msgData, msgId); items->value = value; } } @@ -39,7 +39,7 @@ void ListMenuItems_AddItem(LISTMENUITEM *items, String *string, int value) { items = ListMenuItems_SeekEnd(items, &heapId); if (items != NULL) { - items->text = String_Dup(string, heapId); + items->text = String_Dup(string, heapId); items->value = value; } } diff --git a/src/location_backup.c b/src/location_backup.c index 232d3bcfcd..ab7e1fc4ee 100644 --- a/src/location_backup.c +++ b/src/location_backup.c @@ -8,29 +8,29 @@ #include "save_local_field_data.h" static const Location sLocation_PlayerRoom = { - .mapId = MAP_T20R0202, - .warpId = 0xFFFFFFFF, - .x = 0x00000006, - .y = 0x00000006, + .mapId = MAP_T20R0202, + .warpId = 0xFFFFFFFF, + .x = 0x00000006, + .y = 0x00000006, .direction = 0x00000001, }; static const Location sLocation_OutsidePlayerHome = { - .mapId = MAP_T20, - .warpId = 0xFFFFFFFF, - .x = 0x000002B7, - .y = 0x0000018D, + .mapId = MAP_T20, + .warpId = 0xFFFFFFFF, + .x = 0x000002B7, + .y = 0x0000018D, .direction = 0x00000001, }; void Location_SetToPlayerRoom(Location *dest) { const Location *src = &sLocation_PlayerRoom; - *dest = *src; + *dest = *src; } void Location_SetToOutsidePlayerHome(Location *dest) { const Location *src = &sLocation_OutsidePlayerHome; - *dest = *src; + *dest = *src; } void Save_SetPositionToPlayerRoom(SaveData *saveData) { diff --git a/src/location_gmm_dat.c b/src/location_gmm_dat.c index aa6624955e..aa9a31e1b5 100644 --- a/src/location_gmm_dat.c +++ b/src/location_gmm_dat.c @@ -601,137 +601,137 @@ static const u8 sLocationGmmDat_World[233] = { static const LocationGmmDat sLocationGmmDat[19] = { { - .country = COUNTRY_NONE, + .country = COUNTRY_NONE, .placeDatId = 18, - .gmm = NARC_msg_msg_0798_bin, - .msgIds = sLocationGmmDat_World, - .numMsgIds = 130, + .gmm = NARC_msg_msg_0798_bin, + .msgIds = sLocationGmmDat_World, + .numMsgIds = 130, }, { - .country = COUNTRY_ARGENTINA, + .country = COUNTRY_ARGENTINA, .placeDatId = 0, - .gmm = NARC_msg_msg_0780_bin, - .msgIds = sLocationGmmDat_Argentina, - .numMsgIds = NELEMS(sLocationGmmDat_Argentina), + .gmm = NARC_msg_msg_0780_bin, + .msgIds = sLocationGmmDat_Argentina, + .numMsgIds = NELEMS(sLocationGmmDat_Argentina), }, { - .country = COUNTRY_AUSTRALIA, + .country = COUNTRY_AUSTRALIA, .placeDatId = 1, - .gmm = NARC_msg_msg_0781_bin, - .msgIds = sLocationGmmDat_Australia, - .numMsgIds = NELEMS(sLocationGmmDat_Australia), + .gmm = NARC_msg_msg_0781_bin, + .msgIds = sLocationGmmDat_Australia, + .numMsgIds = NELEMS(sLocationGmmDat_Australia), }, { - .country = COUNTRY_BRAZIL, + .country = COUNTRY_BRAZIL, .placeDatId = 2, - .gmm = NARC_msg_msg_0782_bin, - .msgIds = sLocationGmmDat_Brazil, - .numMsgIds = NELEMS(sLocationGmmDat_Brazil), + .gmm = NARC_msg_msg_0782_bin, + .msgIds = sLocationGmmDat_Brazil, + .numMsgIds = NELEMS(sLocationGmmDat_Brazil), }, { - .country = COUNTRY_CANADA, + .country = COUNTRY_CANADA, .placeDatId = 3, - .gmm = NARC_msg_msg_0783_bin, - .msgIds = sLocationGmmDat_Canada, - .numMsgIds = NELEMS(sLocationGmmDat_Canada), + .gmm = NARC_msg_msg_0783_bin, + .msgIds = sLocationGmmDat_Canada, + .numMsgIds = NELEMS(sLocationGmmDat_Canada), }, { - .country = COUNTRY_CHINA, + .country = COUNTRY_CHINA, .placeDatId = 4, - .gmm = NARC_msg_msg_0784_bin, - .msgIds = sLocationGmmDat_China, - .numMsgIds = NELEMS(sLocationGmmDat_China), + .gmm = NARC_msg_msg_0784_bin, + .msgIds = sLocationGmmDat_China, + .numMsgIds = NELEMS(sLocationGmmDat_China), }, { - .country = COUNTRY_GERMANY, + .country = COUNTRY_GERMANY, .placeDatId = 5, - .gmm = NARC_msg_msg_0785_bin, - .msgIds = sLocationGmmDat_Germany, - .numMsgIds = NELEMS(sLocationGmmDat_Germany), + .gmm = NARC_msg_msg_0785_bin, + .msgIds = sLocationGmmDat_Germany, + .numMsgIds = NELEMS(sLocationGmmDat_Germany), }, { - .country = COUNTRY_SPAIN, + .country = COUNTRY_SPAIN, .placeDatId = 6, - .gmm = NARC_msg_msg_0786_bin, - .msgIds = sLocationGmmDat_Spain, - .numMsgIds = NELEMS(sLocationGmmDat_Spain), + .gmm = NARC_msg_msg_0786_bin, + .msgIds = sLocationGmmDat_Spain, + .numMsgIds = NELEMS(sLocationGmmDat_Spain), }, { - .country = COUNTRY_FINLAND, + .country = COUNTRY_FINLAND, .placeDatId = 7, - .gmm = NARC_msg_msg_0787_bin, - .msgIds = sLocationGmmDat_Finland, - .numMsgIds = NELEMS(sLocationGmmDat_Finland), + .gmm = NARC_msg_msg_0787_bin, + .msgIds = sLocationGmmDat_Finland, + .numMsgIds = NELEMS(sLocationGmmDat_Finland), }, { - .country = COUNTRY_FRANCE, + .country = COUNTRY_FRANCE, .placeDatId = 8, - .gmm = NARC_msg_msg_0788_bin, - .msgIds = sLocationGmmDat_France, - .numMsgIds = NELEMS(sLocationGmmDat_France), + .gmm = NARC_msg_msg_0788_bin, + .msgIds = sLocationGmmDat_France, + .numMsgIds = NELEMS(sLocationGmmDat_France), }, { - .country = COUNTRY_UNITED_KINGDOM, + .country = COUNTRY_UNITED_KINGDOM, .placeDatId = 9, - .gmm = NARC_msg_msg_0789_bin, - .msgIds = sLocationGmmDat_GreatBritain, - .numMsgIds = NELEMS(sLocationGmmDat_GreatBritain), + .gmm = NARC_msg_msg_0789_bin, + .msgIds = sLocationGmmDat_GreatBritain, + .numMsgIds = NELEMS(sLocationGmmDat_GreatBritain), }, { - .country = COUNTRY_INDIA, + .country = COUNTRY_INDIA, .placeDatId = 10, - .gmm = NARC_msg_msg_0790_bin, - .msgIds = sLocationGmmDat_India, - .numMsgIds = NELEMS(sLocationGmmDat_India), + .gmm = NARC_msg_msg_0790_bin, + .msgIds = sLocationGmmDat_India, + .numMsgIds = NELEMS(sLocationGmmDat_India), }, { - .country = COUNTRY_ITALY, + .country = COUNTRY_ITALY, .placeDatId = 11, - .gmm = NARC_msg_msg_0791_bin, - .msgIds = sLocationGmmDat_Italy, - .numMsgIds = NELEMS(sLocationGmmDat_Italy), + .gmm = NARC_msg_msg_0791_bin, + .msgIds = sLocationGmmDat_Italy, + .numMsgIds = NELEMS(sLocationGmmDat_Italy), }, { - .country = COUNTRY_JAPAN, + .country = COUNTRY_JAPAN, .placeDatId = 12, - .gmm = NARC_msg_msg_0792_bin, - .msgIds = sLocationGmmDat_Japan, - .numMsgIds = NELEMS(sLocationGmmDat_Japan), + .gmm = NARC_msg_msg_0792_bin, + .msgIds = sLocationGmmDat_Japan, + .numMsgIds = NELEMS(sLocationGmmDat_Japan), }, { - .country = COUNTRY_NORWAY, + .country = COUNTRY_NORWAY, .placeDatId = 13, - .gmm = NARC_msg_msg_0793_bin, - .msgIds = sLocationGmmDat_Norway, - .numMsgIds = NELEMS(sLocationGmmDat_Norway), + .gmm = NARC_msg_msg_0793_bin, + .msgIds = sLocationGmmDat_Norway, + .numMsgIds = NELEMS(sLocationGmmDat_Norway), }, { - .country = COUNTRY_POLAND, + .country = COUNTRY_POLAND, .placeDatId = 14, - .gmm = NARC_msg_msg_0794_bin, - .msgIds = sLocationGmmDat_Poland, - .numMsgIds = NELEMS(sLocationGmmDat_Poland), + .gmm = NARC_msg_msg_0794_bin, + .msgIds = sLocationGmmDat_Poland, + .numMsgIds = NELEMS(sLocationGmmDat_Poland), }, { - .country = COUNTRY_RUSSIAN_FEDERATION, + .country = COUNTRY_RUSSIAN_FEDERATION, .placeDatId = 15, - .gmm = NARC_msg_msg_0795_bin, - .msgIds = sLocationGmmDat_Russia, - .numMsgIds = NELEMS(sLocationGmmDat_Russia), + .gmm = NARC_msg_msg_0795_bin, + .msgIds = sLocationGmmDat_Russia, + .numMsgIds = NELEMS(sLocationGmmDat_Russia), }, { - .country = COUNTRY_SWEDEN, + .country = COUNTRY_SWEDEN, .placeDatId = 16, - .gmm = NARC_msg_msg_0796_bin, - .msgIds = sLocationGmmDat_Sweden, - .numMsgIds = NELEMS(sLocationGmmDat_Sweden), + .gmm = NARC_msg_msg_0796_bin, + .msgIds = sLocationGmmDat_Sweden, + .numMsgIds = NELEMS(sLocationGmmDat_Sweden), }, { - .country = COUNTRY_UNITED_STATES_OF_AMERICA, + .country = COUNTRY_UNITED_STATES_OF_AMERICA, .placeDatId = 17, - .gmm = NARC_msg_msg_0797_bin, - .msgIds = sLocationGmmDat_UnitedStates, - .numMsgIds = NELEMS(sLocationGmmDat_UnitedStates), + .gmm = NARC_msg_msg_0797_bin, + .msgIds = sLocationGmmDat_UnitedStates, + .numMsgIds = NELEMS(sLocationGmmDat_UnitedStates), }, }; diff --git a/src/mail.c b/src/mail.c index 107a4a756d..dc705a26fa 100644 --- a/src/mail.c +++ b/src/mail.c @@ -42,11 +42,11 @@ u32 MailArray_CountMessages(Mail *msgs, int n); void Mail_Init(Mail *mail) { int i; - mail->author_otId = 0; - mail->author_gender = PLAYER_GENDER_MALE; + mail->author_otId = 0; + mail->author_gender = PLAYER_GENDER_MALE; mail->author_language = gGameLanguage; - mail->author_version = gGameVersion; - mail->mail_type = MAIL_NONE; + mail->author_version = gGameVersion; + mail->mail_type = MAIL_NONE; StringFillEOS(mail->author_name, PLAYER_NAME_LENGTH + 1); for (i = 0; i < 3; i++) { mail->mon_icons[i].raw = 0xFFFF; @@ -109,31 +109,31 @@ void Mail_SetNewMessageDetails(Mail *mail, u8 mailType, u8 mon_no, SaveData *sav Mail_Init(mail); mail->mail_type = mailType; - party = SaveArray_Party_Get(saveData); + party = SaveArray_Party_Get(saveData); profile = Save_PlayerData_GetProfileAddr(saveData); CopyU16StringArray(mail->author_name, PlayerProfile_GetNamePtr(profile)); mail->author_gender = PlayerProfile_GetTrainerGender(profile); - mail->author_otId = PlayerProfile_GetTrainerID(profile); + mail->author_otId = PlayerProfile_GetTrainerID(profile); // Get the Pokemon icon data mail->form_flags = 0; for (i = mon_no, j = 0; i < Party_GetCount(party); i++) { - mon = Party_GetMonByIndex(party, i); + mon = Party_GetMonByIndex(party, i); species = GetMonData(mon, MON_DATA_SPECIES, NULL); - isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); - icon = Pokemon_GetIconNaix(mon); - pal = GetMonIconPaletteEx(species, form, isEgg); + isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); + icon = Pokemon_GetIconNaix(mon); + pal = GetMonIconPaletteEx(species, form, isEgg); mail->mon_icons[j].icon = icon; - mail->mon_icons[j].pal = pal; + mail->mon_icons[j].pal = pal; // Normal form conversion for icons added in Platinum or later. // Form numbers are saved to this buffer. for (k = 0; k < NELEMS(sFormOverrides); k++) { if (sFormOverrides[k].formed_icon == mail->mon_icons[j].icon && sFormOverrides[k].form == form) { mail->mon_icons[j].icon = sFormOverrides[k].base_icon; - mail->mon_icons[j].pal = GetMonIconPaletteEx(species, 0, isEgg); + mail->mon_icons[j].pal = GetMonIconPaletteEx(species, 0, isEgg); mail->form_flags |= sFormOverrides[k].form << (j * 5); break; } @@ -156,7 +156,7 @@ Mail *CreateKenyaMail(Pokemon *mon, u8 mailType, u8 gender, String *name, u8 otI ret->mail_type = mailType; CopyStringToU16Array(name, ret->author_name, PLAYER_NAME_LENGTH + 1); ret->author_gender = gender; - ret->author_otId = otId; + ret->author_otId = otId; // LETTER! Thank you! MailMsg_SetMsgBankAndNum(&ret->unk_20[0], 1, msg_0296_00007); @@ -175,13 +175,13 @@ Mail *CreateKenyaMail(Pokemon *mon, u8 mailType, u8 gender, String *name, u8 otI ret->form_flags = 0; - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); - r5 = Pokemon_GetIconNaix(mon); - r0 = GetMonIconPaletteEx(species, form, isEgg); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); + r5 = Pokemon_GetIconNaix(mon); + r0 = GetMonIconPaletteEx(species, form, isEgg); ret->mon_icons[0].icon = r5; - ret->mon_icons[0].pal = r0; + ret->mon_icons[0].pal = r0; return ret; } @@ -224,13 +224,13 @@ u16 sub_0202B404(Mail *mail, u8 r1, u8 r4, u16 r3) { for (i = 0; i < NELEMS(sFormOverrides); i++) { if (sFormOverrides[i].base_icon == sp0.icon && sFormOverrides[i].form == ((r3 >> (5 * r1)) & 31)) { sp0.icon = sFormOverrides[i].formed_icon; - sp0.pal = GetMonIconPaletteEx(sFormOverrides[i].species, sFormOverrides[i].form, FALSE); + sp0.pal = GetMonIconPaletteEx(sFormOverrides[i].species, sFormOverrides[i].form, FALSE); break; } } if (sp0.icon > 546) { sp0.icon = 7; - sp0.pal = 0; + sp0.pal = 0; } switch (r4) { case 0: @@ -303,7 +303,7 @@ u32 Mailbox_CountMessages(Mailbox *mailbox, int unused) { Mail *Mailbox_AllocAndFetchMailI(Mail *msgs, int n, int i, HeapID heapId) { const Mail *src = Mailbox_GetPtrToSlotI(msgs, n, i); - Mail *ret = Mail_New(heapId); + Mail *ret = Mail_New(heapId); if (src != NULL) { Mail_Copy(src, ret); } diff --git a/src/mail_message.c b/src/mail_message.c index db63e5fa48..1b596c53bc 100644 --- a/src/mail_message.c +++ b/src/mail_message.c @@ -38,7 +38,7 @@ void MailMsg_Init(MailMessage *mailMessage) { void MailMsg_Init_WithBank(MailMessage *mailMessage, u16 msgBank) { int i; mailMessage->msg_bank = msgBank; - mailMessage->msg_no = 0; + mailMessage->msg_no = 0; for (i = 0; i < MAILMSG_FIELDS_MAX; i++) { mailMessage->fields[i] = EC_WORD_NULL; } @@ -76,7 +76,7 @@ String *MailMsg_GetExpandedString(const MailMessage *mailMessage, HeapID heapId) } msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, sMessageBanks[mailMessage->msg_bank], heapId); - string = ReadMsgData_ExpandPlaceholders(msgFmt, msgData, mailMessage->msg_no, heapId); + string = ReadMsgData_ExpandPlaceholders(msgFmt, msgData, mailMessage->msg_no, heapId); DestroyMsgData(msgData); MessageFormat_Delete(msgFmt); return string; @@ -110,9 +110,9 @@ u32 MailMsg_NumFields(u16 msg_bank, u16 msg_no) { GF_ASSERT(msg_bank < NELEMS(sMessageBanks)); GF_ASSERT(msg_no < MailMsg_NumMsgsInBank(msg_bank)); - msg = ReadMsgData_NewNarc_NewString(NARC_msgdata_msg, sMessageBanks[msg_bank], msg_no, HEAP_ID_DEFAULT); + msg = ReadMsgData_NewNarc_NewString(NARC_msgdata_msg, sMessageBanks[msg_bank], msg_no, HEAP_ID_DEFAULT); msg_cstr = String_cstr(msg); - ret = 0; + ret = 0; while (*msg_cstr != EOS) { if (*msg_cstr == EXT_CTRL_CODE_BEGIN) { if (MsgArray_ControlCodeIsStrVar(msg_cstr)) { @@ -164,7 +164,7 @@ u32 MailMsg_NumMsgsInBank(u16 msg_bank) { void MailMsg_SetMsgBankAndNum(MailMessage *mailMessage, u16 msg_bank, u16 msg_no) { GF_ASSERT(msg_bank < NELEMS(sMessageBanks)); mailMessage->msg_bank = msg_bank; - mailMessage->msg_no = msg_no; + mailMessage->msg_no = msg_no; } void MailMsg_SetFieldI(MailMessage *mailMessage, u16 field_no, u16 ec_word) { diff --git a/src/mail_misc.c b/src/mail_misc.c index 1cbcd20520..45ced1ca1e 100644 --- a/src/mail_misc.c +++ b/src/mail_misc.c @@ -16,15 +16,15 @@ EasyChatArgs *EasyChat_CreateArgs(u8 args, u8 a1, SaveData *saveData, MenuInputStateMgr *menuInputStateMgr, HeapID heapId) { EasyChatArgs *ptr = AllocFromHeap(heapId, sizeof(EasyChatArgs)); - ptr->unk0 = args; - ptr->unk1 = a1; - ptr->pokedex = Save_Pokedex_Get(saveData); - ptr->easyChat = Save_EasyChat_Get(saveData); - ptr->gameCleared = CheckGameClearFlag(Save_VarsFlags_Get(saveData)); - ptr->unk5 = 0; - ptr->unk2 = 1; - ptr->unk3 = 0; - ptr->frame = Options_GetFrame(Save_PlayerData_GetOptionsAddr(saveData)); + ptr->unk0 = args; + ptr->unk1 = a1; + ptr->pokedex = Save_Pokedex_Get(saveData); + ptr->easyChat = Save_EasyChat_Get(saveData); + ptr->gameCleared = CheckGameClearFlag(Save_VarsFlags_Get(saveData)); + ptr->unk5 = 0; + ptr->unk2 = 1; + ptr->unk3 = 0; + ptr->frame = Options_GetFrame(Save_PlayerData_GetOptionsAddr(saveData)); ptr->menuInputPtr = menuInputStateMgr; if (args == 2) { @@ -77,7 +77,7 @@ u16 sub_02090D50(EasyChatArgs *args) { void sub_02090D54(EasyChatArgs *args, MsgBankMsgNo *msgBankMsgNo) { msgBankMsgNo->msgBank = args->unk1C[0]; - msgBankMsgNo->msgNo = args->unk1C[1]; + msgBankMsgNo->msgNo = args->unk1C[1]; } void sub_02090D60(EasyChatArgs *args, MailMessage *mailMessage) { @@ -119,7 +119,7 @@ void sub_02090D8C(EasyChatArgs *args, MailMessage *msg1, MailMessage *msg2) { return; case 1: msg1->msg_bank = args->unk1C[0]; - msg1->msg_no = args->unk1C[1]; + msg1->msg_no = args->unk1C[1]; return; case 2: *msg2 = args->mailMessage; @@ -170,14 +170,14 @@ UseMailArgs *sub_02090E68(SaveData *saveData, u16 a1, u8 partyIdx, u8 mailType, ptr->mailType = mailType; ptr->partyIdx = partyIdx; - ptr->mailbox = mailbox; - ptr->unk0 = 1; - ptr->unk8 = a1; - ptr->unkC = 0; + ptr->mailbox = mailbox; + ptr->unk0 = 1; + ptr->unk8 = a1; + ptr->unkC = 0; ptr->saveData = saveData; Mail *mail = Mail_New(heapId); - ptr->mail = mail; + ptr->mail = mail; Mail_Init(mail); Mail_SetNewMessageDetails(ptr->mail, MAIL_NONE, partyIdx, saveData); @@ -188,14 +188,14 @@ UseMailArgs *sub_02090EC0(SaveData *saveData, int n, u16 i, HeapID heapId) { UseMailArgs *ptr = AllocFromHeapAtEnd(heapId, sizeof(UseMailArgs)); MI_CpuFill8(ptr, 0, sizeof(UseMailArgs)); - ptr->unk0 = 0; - ptr->unk8 = n; - ptr->unkC = i; + ptr->unk0 = 0; + ptr->unk8 = n; + ptr->unkC = i; ptr->saveData = saveData; Mailbox *mailbox = Save_Mailbox_Get(saveData); - ptr->mailbox = mailbox; - ptr->mail = Mailbox_AllocAndFetchMailI(&mailbox->msgs[0], n, i, heapId); + ptr->mailbox = mailbox; + ptr->mail = Mailbox_AllocAndFetchMailI(&mailbox->msgs[0], n, i, heapId); return ptr; } @@ -204,11 +204,11 @@ UseMailArgs *sub_02090F00(SaveData *saveData, Pokemon *mon, HeapID heapId) { UseMailArgs *ptr = AllocFromHeapAtEnd(heapId, sizeof(UseMailArgs)); MI_CpuFill8(ptr, 0, sizeof(UseMailArgs)); - ptr->unk0 = 0; + ptr->unk0 = 0; ptr->saveData = saveData; Mail *mail = Mail_New(heapId); - ptr->mail = mail; + ptr->mail = mail; GetMonData(mon, MON_DATA_MAIL_STRUCT, ptr->mail); return ptr; @@ -218,11 +218,11 @@ UseMailArgs *sub_02090F38(SaveData *saveData, u8 mailType, HeapID heapId) { UseMailArgs *ptr = AllocFromHeapAtEnd(heapId, sizeof(UseMailArgs)); MI_CpuFill8(ptr, 0, sizeof(UseMailArgs)); - ptr->unk0 = 0; + ptr->unk0 = 0; ptr->saveData = saveData; Mail *mail = Mail_New(heapId); - ptr->mail = mail; + ptr->mail = mail; Mail_SetType(mail, mailType); return ptr; @@ -249,7 +249,7 @@ void sub_02090F90(UseMailArgs *args) { int Mailbox_MoveMessageFromMon(Mailbox *mailbox, Pokemon *mon, HeapID heapId) { int item = ITEM_NONE; - int idx = Mailbox_GetFirstEmptySlotIdx(mailbox); + int idx = Mailbox_GetFirstEmptySlotIdx(mailbox); if (idx != -1) { Mail *mail = Mail_New(heapId); diff --git a/src/main.c b/src/main.c index e778965c4b..553cda7102 100644 --- a/src/main.c +++ b/src/main.c @@ -60,7 +60,7 @@ void NitroMain(void) { FontID_Alloc(0, HEAP_ID_3); FontID_Alloc(1, HEAP_ID_3); FontID_Alloc(3, HEAP_ID_3); - _02111868.unk_10.unk_00 = -1; + _02111868.unk_10.unk_00 = -1; _02111868.unk_10.saveData = SaveData_New(); sub_02005D00(); InitSoundData(Save_Chatot_Get(_02111868.unk_10.saveData), Save_PlayerData_GetOptionsAddr(_02111868.unk_10.saveData)); @@ -87,7 +87,7 @@ void NitroMain(void) { break; } } - gSystem.unk70 = 1; + gSystem.unk70 = 1; gSystem.frameCounter = 0; InitializeMainRNG(); ScreenBrightnessData_InitAll(); @@ -133,9 +133,9 @@ void NitroMain(void) { } void Main_ResetOverlayManager(void) { - _02111868.mainOverlayId = FS_OVERLAY_ID_NONE; - _02111868.overlayManager = NULL; - _02111868.queuedMainOverlayId = FS_OVERLAY_ID_NONE; + _02111868.mainOverlayId = FS_OVERLAY_ID_NONE; + _02111868.overlayManager = NULL; + _02111868.queuedMainOverlayId = FS_OVERLAY_ID_NONE; _02111868.queuedMainOverlayTemplate = NULL; } @@ -147,9 +147,9 @@ static void Main_RunOverlayManager(void) { if (_02111868.queuedMainOverlayId != FS_OVERLAY_ID_NONE) { HandleLoadOverlay(_02111868.queuedMainOverlayId, OVY_LOAD_NORMAL); } - _02111868.mainOverlayId = _02111868.queuedMainOverlayId; - _02111868.overlayManager = OverlayManager_New(_02111868.queuedMainOverlayTemplate, &_02111868.unk_10, HEAP_ID_DEFAULT); - _02111868.queuedMainOverlayId = FS_OVERLAY_ID_NONE; + _02111868.mainOverlayId = _02111868.queuedMainOverlayId; + _02111868.overlayManager = OverlayManager_New(_02111868.queuedMainOverlayTemplate, &_02111868.unk_10, HEAP_ID_DEFAULT); + _02111868.queuedMainOverlayId = FS_OVERLAY_ID_NONE; _02111868.queuedMainOverlayTemplate = NULL; } if (OverlayManager_Run(_02111868.overlayManager)) { @@ -163,7 +163,7 @@ static void Main_RunOverlayManager(void) { void RegisterMainOverlay(FSOverlayID overlayId, const OVY_MGR_TEMPLATE *template) { GF_ASSERT(_02111868.queuedMainOverlayTemplate == NULL); - _02111868.queuedMainOverlayId = overlayId; + _02111868.queuedMainOverlayId = overlayId; _02111868.queuedMainOverlayTemplate = template; } @@ -220,9 +220,9 @@ static void sub_02000FD8(u32 a0, int a1) { int r4; int r5; - r4 = 0; - sp4 = sub_0203993C(); - r7 = sub_02039998(); + r4 = 0; + sp4 = sub_0203993C(); + r7 = sub_02039998(); gSystem.touchpadReadAuto = FALSE; if (a1 == 3) { r5 = 3; diff --git a/src/map_events.c b/src/map_events.c index 85e144820a..0be5a40948 100644 --- a/src/map_events.c +++ b/src/map_events.c @@ -91,7 +91,7 @@ const ObjectEvent *Field_GetObjectEvents(const FieldSystem *fieldSystem) { BOOL Field_SetEventDefaultXYPos(FieldSystem *fieldSystem, int id, u16 x, u16 y) { int i; ObjectEvent *objs = fieldSystem->mapEvents->object_events; - u32 num_objs = fieldSystem->mapEvents->num_object_events; + u32 num_objs = fieldSystem->mapEvents->num_object_events; for (i = 0; i < num_objs; i++) { if (objs[i].id == id) { @@ -108,7 +108,7 @@ BOOL Field_SetEventDefaultXYPos(FieldSystem *fieldSystem, int id, u16 x, u16 y) BOOL Field_SetEventDefaultDirection(FieldSystem *fieldSystem, int id, u16 dirn) { int i; ObjectEvent *objs = fieldSystem->mapEvents->object_events; - u32 num_objs = fieldSystem->mapEvents->num_object_events; + u32 num_objs = fieldSystem->mapEvents->num_object_events; for (i = 0; i < num_objs; i++) { if (objs[i].id == id) { @@ -124,7 +124,7 @@ BOOL Field_SetEventDefaultDirection(FieldSystem *fieldSystem, int id, u16 dirn) BOOL Field_SetEventDefaultMovement(FieldSystem *fieldSystem, int id, u16 movement) { int i; ObjectEvent *objs = fieldSystem->mapEvents->object_events; - u32 num_objs = fieldSystem->mapEvents->num_object_events; + u32 num_objs = fieldSystem->mapEvents->num_object_events; for (i = 0; i < num_objs; i++) { if (objs[i].id == id) { @@ -139,15 +139,15 @@ BOOL Field_SetEventDefaultMovement(FieldSystem *fieldSystem, int id, u16 movemen BOOL Field_SetWarpXYPos(FieldSystem *fieldSystem, int warpno, u16 x, u16 y) { WARP_EVENT *warps = fieldSystem->mapEvents->warp_events; - warps[warpno].x = x; - warps[warpno].z = y; + warps[warpno].x = x; + warps[warpno].z = y; return TRUE; } BOOL Field_SetBgEventXYPos(FieldSystem *fieldSystem, int bgno, u32 x, u32 y) { BG_EVENT *bgs = Field_GetBgEvents(fieldSystem); - bgs[bgno].x = x; - bgs[bgno].z = y; + bgs[bgno].x = x; + bgs[bgno].z = y; return TRUE; } diff --git a/src/map_matrix.c b/src/map_matrix.c index b07631205a..872b394424 100644 --- a/src/map_matrix.c +++ b/src/map_matrix.c @@ -13,14 +13,14 @@ #include "sys_vars.h" static void MapMatrix_MapMatrixData_Load(MAPMATRIXDATA *map_matrix_data, u16 matrix_id, u32 map_no) { - map_matrix_data->width = 0; + map_matrix_data->width = 0; map_matrix_data->height = 0; s32 i; for (i = 0; i < MAP_MATRIX_MAX_SIZE; i++) { - map_matrix_data->headers[i] = 0; - map_matrix_data->altitudes[i] = 0; + map_matrix_data->headers[i] = 0; + map_matrix_data->altitudes[i] = 0; map_matrix_data->maps.models[i] = 0; } @@ -29,12 +29,12 @@ static void MapMatrix_MapMatrixData_Load(MAPMATRIXDATA *map_matrix_data, u16 mat } void *buffer = AllocAtEndAndReadWholeNarcMemberByIdPair(NARC_fielddata_mapmatrix_map_matrix, matrix_id, HEAP_ID_FIELD); - u8 *cursor = (u8 *)buffer; + u8 *cursor = (u8 *)buffer; - map_matrix_data->width = *(cursor++); + map_matrix_data->width = *(cursor++); map_matrix_data->height = *(cursor++); - u8 has_headers_section = *(cursor++); + u8 has_headers_section = *(cursor++); u8 has_altitudes_section = *(cursor++); u8 name_length = *(cursor++); @@ -61,8 +61,8 @@ static void MapMatrix_MapMatrixData_Load(MAPMATRIXDATA *map_matrix_data, u16 mat MAPMATRIX *MapMatrix_New(void) { MAPMATRIX *map_matrix = AllocFromHeap(HEAP_ID_FIELD, sizeof(MAPMATRIX)); - map_matrix->width = 0; - map_matrix->height = 0; + map_matrix->width = 0; + map_matrix->height = 0; map_matrix->matrix_id = 0; return map_matrix; @@ -74,8 +74,8 @@ void MapMatrix_Load(u32 map_no, MAPMATRIX *map_matrix) { MapMatrix_MapMatrixData_Load(&map_matrix->data, matrix_id, map_no); map_matrix->matrix_id = matrix_id; - map_matrix->height = map_matrix->data.height; - map_matrix->width = map_matrix->data.width; + map_matrix->height = map_matrix->data.height; + map_matrix->width = map_matrix->data.width; } void MapMatrix_Free(MAPMATRIX *map_matrix) { @@ -98,7 +98,7 @@ u8 MapMatrix_GetHeight(MAPMATRIX *map_matrix) { } u16 MapMatrix_GetMapHeader(MAPMATRIX *map_matrix, s32 x, s32 y) { - s32 width = map_matrix->width; + s32 width = map_matrix->width; s32 height = map_matrix->height; GF_ASSERT(x >= 0 && x < width); @@ -123,7 +123,7 @@ MAPDATA *MapMatrix_MapData_New(HeapID heapId) { MAPDATA *map_data = AllocFromHeap(heapId, sizeof(MAPDATA)); void *buffer = AllocAtEndAndReadWholeNarcMemberByIdPair(NARC_fielddata_mapmatrix_map_matrix, 0, heapId); - u8 *cursor = (u8 *)buffer; + u8 *cursor = (u8 *)buffer; cursor += 4; u8 name_length = *cursor; cursor++; @@ -147,7 +147,7 @@ u16 GetMapModelNo(u32 map_no, MAPMATRIX *map_matrix) { void RemoveMahoganyTownAntennaTree(MAPMATRIX *map_matrix) { u16 *models = map_matrix->data.maps.models; - u8 width = map_matrix->width; + u8 width = map_matrix->width; if (map_matrix->matrix_id != NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin) { return; @@ -183,7 +183,7 @@ BOOL ShouldUseAlternateLakeOfRage(SaveData *saveData, u32 map_no) { void SetLakeOfRageWaterLevel(MAPMATRIX *map_matrix, BOOL lower_water_level) { u16 *models = map_matrix->data.maps.models; - u8 width = map_matrix->width; + u8 width = map_matrix->width; if (map_matrix->matrix_id != NARC_map_matrix_map_matrix_0000_EVERYWHERE_bin) { return; @@ -208,18 +208,18 @@ void SetLakeOfRageWaterLevel(MAPMATRIX *map_matrix, BOOL lower_water_level) { void PlaceSafariZoneAreas(MAPMATRIX *map_matrix, SaveData *save) { u16 *models = map_matrix->data.maps.models; - s32 width = map_matrix->width; + s32 width = map_matrix->width; if (map_matrix->matrix_id != NARC_map_matrix_map_matrix_0212_D47R0102_bin) { // Safari Zone return; } - SafariZone *safari_zone = Save_SafariZone_Get(save); + SafariZone *safari_zone = Save_SafariZone_Get(save); SAFARIZONE_AREASET *sz_area_set = SafariZone_GetAreaSet(safari_zone, 3); for (s32 y = 0; y < SAFARI_ZONE_AREA_SET_ROWS; y++) { for (s32 x = 0; x < SAFARI_ZONE_AREA_SET_COLS; x++) { - u8 area_no = sz_area_set->areas[(y * SAFARI_ZONE_AREA_SET_COLS) + x].area_no; + u8 area_no = sz_area_set->areas[(y * SAFARI_ZONE_AREA_SET_COLS) + x].area_no; models[width * (y + 1) + x + 1] = 652 + area_no; } } diff --git a/src/map_object.c b/src/map_object.c index e6ed1c88f3..606bc8e548 100644 --- a/src/map_object.c +++ b/src/map_object.c @@ -148,7 +148,7 @@ void MapObjectManager_Delete(MapObjectManager *manager) { } void sub_0205E104(MapObjectManager *manager, u32 unused, u32 mapId, u32 objectCount, ObjectEvent *objectEvents) { - u32 count = MapObjectManager_GetObjectCount(manager); + u32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); for (; count != 0; count--) { @@ -188,7 +188,7 @@ static MapObjectManager *MapObjectManager_New(u32 objectCount) { static LocalMapObject *MapObject_CreateFromObjectEvent(MapObjectManager *manager, ObjectEvent *objectEvent, u32 mapNo) { LocalMapObject *ret; - ObjectEvent event = *objectEvent; + ObjectEvent event = *objectEvent; ObjectEvent *eventPtr = &event; u32 objectId = ObjectEvent_GetID(eventPtr); @@ -248,11 +248,11 @@ LocalMapObject *MapObject_CreateWithParams(MapObjectManager *manager, u32 x, u32 } LocalMapObject *MapObject_CreateFromObjectEventWithId(MapObjectManager *manager, u16 id, u32 objectEventCount, u32 mapNo, const ObjectEvent *events) { - LocalMapObject *ret = NULL; + LocalMapObject *ret = NULL; ObjectEvent *objectEvent = ObjectEvent_GetByID(id, objectEventCount, (ObjectEvent *)events); if (objectEvent != NULL) { // casts and typing required to match - u32 eventFlag = ObjectEvent_GetEventFlag(objectEvent); + u32 eventFlag = ObjectEvent_GetEventFlag(objectEvent); FieldSystem *fieldSystem = MapObjectManager_GetFieldSystem(manager); if (FieldSystem_FlagCheck(fieldSystem, (u16)eventFlag) == FALSE) { ret = MapObject_CreateFromObjectEvent(manager, objectEvent, mapNo); @@ -287,7 +287,7 @@ void MapObject_Remove(LocalMapObject *object) { } void MapObject_Delete(LocalMapObject *object) { - u32 eventFlag = MapObject_GetEventFlag(object); + u32 eventFlag = MapObject_GetEventFlag(object); FieldSystem *fieldSystem = MapObject_GetFieldSystem(object); FieldSystem_FlagSet(fieldSystem, eventFlag); MapObject_Remove(object); @@ -309,8 +309,8 @@ void sub_0205E420(LocalMapObject *object) { } void MapObjectManager_RemoveAllActiveObjects(MapObjectManager *manager) { - s32 i = 0; - s32 count = MapObjectManager_GetObjectCount(manager); + s32 i = 0; + s32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { // BUG: does not check for if count is zero, and will always execute at least once @@ -326,8 +326,8 @@ void MapObjectManager_RemoveAllActiveObjects(MapObjectManager *manager) { void sub_0205E4C8(MapObjectManager *manager) { GF_ASSERT(sub_0205F5D4(manager) == TRUE); - s32 i = 0; - s32 count = MapObjectManager_GetObjectCount(manager); + s32 i = 0; + s32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { @@ -344,8 +344,8 @@ void sub_0205E4C8(MapObjectManager *manager) { void sub_0205E520(MapObjectManager *manager) { GF_ASSERT(sub_0205F5D4(manager) == TRUE); - s32 i = 0; - s32 count = MapObjectManager_GetObjectCount(manager); + s32 i = 0; + s32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { @@ -369,8 +369,8 @@ void sub_0205E520(MapObjectManager *manager) { void sub_0205E580(MapObjectManager *manager) { GF_ASSERT(sub_0205F5D4(manager) == TRUE); - s32 i = 0; - s32 count = MapObjectManager_GetObjectCount(manager); + s32 i = 0; + s32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { @@ -425,29 +425,29 @@ void MapObjectManager_RestoreFromSave(MapObjectManager *manager, SavedMapObject } static void SavedMapObject_InitFromLocalMapObject(FieldSystem *fieldSystem, LocalMapObject *localObject, SavedMapObject *savedObject) { - savedObject->flags = MapObject_GetFlags(localObject); - savedObject->flags2 = MapObject_GetFlags2(localObject); - savedObject->objId = MapObject_GetID(localObject); - savedObject->mapId = MapObject_GetMapID(localObject); - savedObject->spriteId = MapObject_GetSpriteID(localObject); - savedObject->movement = MapObject_GetMovement(localObject); - savedObject->type = MapObject_GetType(localObject); - savedObject->eventFlag = MapObject_GetEventFlag(localObject); - savedObject->script = MapObject_GetScriptID(localObject); + savedObject->flags = MapObject_GetFlags(localObject); + savedObject->flags2 = MapObject_GetFlags2(localObject); + savedObject->objId = MapObject_GetID(localObject); + savedObject->mapId = MapObject_GetMapID(localObject); + savedObject->spriteId = MapObject_GetSpriteID(localObject); + savedObject->movement = MapObject_GetMovement(localObject); + savedObject->type = MapObject_GetType(localObject); + savedObject->eventFlag = MapObject_GetEventFlag(localObject); + savedObject->script = MapObject_GetScriptID(localObject); savedObject->initialFacing = MapObject_GetInitialFacingDirection(localObject); savedObject->currentFacing = MapObject_GetFacingDirection(localObject); - savedObject->nextFacing = MapObject_GetNextFacingDirection(localObject); - savedObject->param[0] = MapObject_GetParam(localObject, 0); - savedObject->param[1] = MapObject_GetParam(localObject, 1); - savedObject->param[2] = MapObject_GetParam(localObject, 2); - savedObject->xRange = MapObject_GetXRange(localObject); - savedObject->yRange = MapObject_GetYRange(localObject); - savedObject->initialX = MapObject_GetInitialX(localObject); - savedObject->initialY = MapObject_GetInitialY(localObject); - savedObject->initialZ = MapObject_GetInitialZ(localObject); - savedObject->currentX = MapObject_GetCurrentX(localObject); - savedObject->currentY = MapObject_GetCurrentY(localObject); - savedObject->currentZ = MapObject_GetCurrentZ(localObject); + savedObject->nextFacing = MapObject_GetNextFacingDirection(localObject); + savedObject->param[0] = MapObject_GetParam(localObject, 0); + savedObject->param[1] = MapObject_GetParam(localObject, 1); + savedObject->param[2] = MapObject_GetParam(localObject, 2); + savedObject->xRange = MapObject_GetXRange(localObject); + savedObject->yRange = MapObject_GetYRange(localObject); + savedObject->initialX = MapObject_GetInitialX(localObject); + savedObject->initialY = MapObject_GetInitialY(localObject); + savedObject->initialZ = MapObject_GetInitialZ(localObject); + savedObject->currentX = MapObject_GetCurrentX(localObject); + savedObject->currentY = MapObject_GetCurrentY(localObject); + savedObject->currentZ = MapObject_GetCurrentZ(localObject); VecFx32 coords; sub_020611C8(savedObject->currentX, savedObject->currentZ, &coords); // some kind of x y vec copy with convertion between int and fx32 @@ -492,7 +492,7 @@ static void LocalMapObject_InitFromSavedMapObject(LocalMapObject *localObject, S MapObject_SetCurrentZ(localObject, savedObject->currentZ); VecFx32 coords = {}; - coords.y = savedObject->vecY; + coords.y = savedObject->vecY; MapObject_SetPositionVector(localObject, &coords); memcpy(sub_0205F394(localObject), savedObject->unk30, 16); @@ -521,13 +521,13 @@ static void MapObject_ConvertXZToPositionVec(LocalMapObject *object) { VecFx32 position; MapObject_CopyPositionVector(object, &position); - u32 x = MapObject_GetCurrentX(object); + u32 x = MapObject_GetCurrentX(object); position.x = x * FX32_CONST(16) + FX32_CONST(8); MapObject_SetPreviousX(object, x); MapObject_SetPreviousY(object, MapObject_GetCurrentY(object)); - u32 z = MapObject_GetCurrentZ(object); + u32 z = MapObject_GetCurrentZ(object); position.z = z * FX32_CONST(16) + FX32_CONST(8); MapObject_SetPreviousZ(object, z); @@ -543,17 +543,17 @@ void MapObject_CreateFromMultipleObjectEvents(MapObjectManager *manager, u32 map MapObjectInitArgs *args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(MapObjectInitArgs)); GF_ASSERT(args != NULL); - args->mapNo = mapNo; + args->mapNo = mapNo; args->objectEventCount = objectEventCount; - args->index = 0; - args->manager = manager; - args->objectEvents = objectEventsCopy; + args->index = 0; + args->manager = manager; + args->objectEvents = objectEventsCopy; MapObject_CreateFromInitArgs(args); } static void MapObject_CreateFromInitArgs(MapObjectInitArgs *args) { - FieldSystem *fieldSystem = MapObjectManager_GetFieldSystem(args->manager); + FieldSystem *fieldSystem = MapObjectManager_GetFieldSystem(args->manager); ObjectEvent *objectEvents = args->objectEvents; do { @@ -568,8 +568,8 @@ static void MapObject_CreateFromInitArgs(MapObjectInitArgs *args) { } static LocalMapObject *MapObjectManager_GetFirstInactiveObject(MapObjectManager *manager) { - s32 i = 0; - s32 count = MapObjectManager_GetObjectCount(manager); + s32 i = 0; + s32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { @@ -630,19 +630,19 @@ static void MapObject_InitFromObjectEvent(LocalMapObject *object, ObjectEvent *o static void MapObject_SetPositionVectorFromObjectEvent(LocalMapObject *object, ObjectEvent *objectEvent) { VecFx32 coords; - u16 x = ObjectEvent_GetXCoord(objectEvent); + u16 x = ObjectEvent_GetXCoord(objectEvent); coords.x = x * FX32_CONST(16) + FX32_CONST(8); MapObject_SetInitialX(object, x); MapObject_SetPreviousX(object, x); MapObject_SetCurrentX(object, x); coords.y = ObjectEvent_GetYCoord(objectEvent); - u32 y = (coords.y >> 3) / FX32_ONE; + u32 y = (coords.y >> 3) / FX32_ONE; MapObject_SetInitialY(object, y); MapObject_SetPreviousY(object, y); MapObject_SetCurrentY(object, y); - u16 z = ObjectEvent_GetZCoord(objectEvent); + u16 z = ObjectEvent_GetZCoord(objectEvent); coords.z = z * FX32_CONST(16) + FX32_CONST(8); MapObject_SetInitialZ(object, z); MapObject_SetPreviousZ(object, z); @@ -672,7 +672,7 @@ static void sub_0205ECE0(LocalMapObject *object) { extern const UnkLMOCallbackStruct2 ov01_0220724C; static void sub_0205ED18(LocalMapObject *object) { - u32 spriteId = MapObject_GetSpriteID(object); + u32 spriteId = MapObject_GetSpriteID(object); UnkLMOCallbackStruct2 *unk = (spriteId == SPRITE_CAMERA_FOCUS) ? (UnkLMOCallbackStruct2 *)&ov01_0220724C : sub_0205FB38(spriteId); sub_0205F468(object, sub_0205FB24(unk)); @@ -728,7 +728,7 @@ static LocalMapObject *MapObjectManager_GetFirstObjectWithIDAndMap(MapObjectMana LocalMapObject *MapObjectManager_GetFirstActiveObjectByID(MapObjectManager *manager, u32 id) { GF_ASSERT(manager != NULL); - s32 count = MapObjectManager_GetObjectCount(manager); + s32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects3(manager); do { if (MapObject_TestFlagsBits(objects, MAPOBJECTFLAG_ACTIVE) == TRUE && MapObject_CheckFlag25(objects) == FALSE && MapObject_GetID(objects) == id) { @@ -743,7 +743,7 @@ LocalMapObject *MapObjectManager_GetFirstActiveObjectByID(MapObjectManager *mana } LocalMapObject *MapObjectManager_GetFirstActiveObjectWithMovement(MapObjectManager *manager, u32 movement) { - s32 count = MapObjectManager_GetObjectCount(manager); + s32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects3(manager); do { @@ -765,7 +765,7 @@ BOOL MapObjectManager_GetNextObjectWithFlagFromIndex(MapObjectManager *manager, } LocalMapObject *objects = MapObjectManager_GetObjects3(manager); - LocalMapObject *object = objects + *index; + LocalMapObject *object = objects + *index; do { (*index)++; @@ -1097,13 +1097,13 @@ u32 MapObject_GetInitialFacingDirection(LocalMapObject *object) { void MapObject_SetFacingDirectionDirect(LocalMapObject *object, u32 direction) { object->previousFacing = object->currentFacing; - object->currentFacing = direction; + object->currentFacing = direction; } void MapObject_SetFacingDirection(LocalMapObject *object, u32 direction) { if (MapObject_GetFlagsBitsMask(object, MAPOBJECTFLAG_UNK7) == 0) { object->previousFacing = object->currentFacing; - object->currentFacing = direction; + object->currentFacing = direction; } } @@ -1117,7 +1117,7 @@ u32 MapObject_GetPreviousFacingDirection(LocalMapObject *object) { void MapObject_SetNextFacingDirection(LocalMapObject *object, u32 direction) { object->nextFacingBackup = object->nextFacing; - object->nextFacing = direction; + object->nextFacing = direction; } u32 MapObject_GetNextFacingDirection(LocalMapObject *object) { @@ -1391,7 +1391,7 @@ void sub_0205F568(MapObjectManager *manager) { } void MapObjectManager_PauseAllMovement(MapObjectManager *manager) { - u32 count = MapObjectManager_GetObjectCount(manager); + u32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { if (MapObject_CheckActive(objects)) { @@ -1404,7 +1404,7 @@ void MapObjectManager_PauseAllMovement(MapObjectManager *manager) { } void MapObjectManager_UnpauseAllMovement(MapObjectManager *manager) { - u32 count = MapObjectManager_GetObjectCount(manager); + u32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { if (MapObject_CheckActive(objects)) { @@ -1881,7 +1881,7 @@ static u16 ObjectEvent_GetZCoord(ObjectEvent *objectEvent) { } static ObjectEvent *ObjectEvent_GetByID(u16 id, s32 objectEventCount, ObjectEvent *objectEvents) { - s32 i = 0; + s32 i = 0; ObjectEvent *objectEvent = objectEvents; do { if (!ObjectEvent_ScriptIDIsUnset(objectEvent) && id == ObjectEvent_GetID(objectEvent)) { @@ -1953,7 +1953,7 @@ static UnkLMOCallbackStruct2 *sub_0205FB38(u32 spriteId) { } LocalMapObject *MapObjectManager_GetFirstObjectWithXAndZ(MapObjectManager *manager, u32 x, u32 z, BOOL checkPrevious) { - u32 count = MapObjectManager_GetObjectCount(manager); + u32 count = MapObjectManager_GetObjectCount(manager); LocalMapObject *objects = MapObjectManager_GetObjects(manager); do { @@ -2035,7 +2035,7 @@ void sub_0205FCD0(LocalMapObject *object) { } void sub_0205FCD4(LocalMapObject *object) { - u32 spriteId = MapObject_GetSpriteID(object); + u32 spriteId = MapObject_GetSpriteID(object); UnkLMOCallbackStruct2 *callbackStruct = (spriteId == 0x2000) ? (UnkLMOCallbackStruct2 *)&ov01_0220724C : sub_0205FB38(spriteId); sub_0205F47C(object, sub_0205FB28(callbackStruct)); } diff --git a/src/map_preview_graphic.c b/src/map_preview_graphic.c index 1790436465..e46c4731b5 100644 --- a/src/map_preview_graphic.c +++ b/src/map_preview_graphic.c @@ -56,700 +56,700 @@ typedef struct UnkStruct_0206A388 { static MapPreviewGraphicData sMapPreviewGraphicData[] = { // Dark Cave, North Side { - .mapId = MAP_D42R0101, + .mapId = MAP_D42R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r45_night_NSCR_lz, }, }, .unused3C = 0, }, // Dark Cave, South Side { - .mapId = MAP_D42R0102, + .mapId = MAP_D42R0102, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dark_cave_r31_night_NSCR_lz, }, }, .unused3C = 0, }, // Sprout Tower { - .mapId = MAP_D15R0101, + .mapId = MAP_D15R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_sprout_tower_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_sprout_tower_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_sprout_tower_night_NSCR_lz, }, }, .unused3C = 1, }, // Ruins of Alph 1 { - .mapId = MAP_D24R0211, + .mapId = MAP_D24R0211, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NSCR_lz, }, }, .unused3C = 2, }, // Ruins of Alph 2 { - .mapId = MAP_D24R0217, + .mapId = MAP_D24R0217, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ruins_of_alph_night_NSCR_lz, }, }, .unused3C = 2, }, // Union Cave { - .mapId = MAP_D25R0101, + .mapId = MAP_D25R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_union_cave_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_union_cave_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_union_cave_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_union_cave_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_union_cave_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_union_cave_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_union_cave_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_union_cave_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_union_cave_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_union_cave_night_NSCR_lz, }, }, .unused3C = 3, }, // Slowpoke Well { - .mapId = MAP_D26R0101, + .mapId = MAP_D26R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_slowpoke_well_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_slowpoke_well_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_slowpoke_well_night_NSCR_lz, }, }, .unused3C = 4, }, // Ilex Forest { - .mapId = MAP_D36R0101, + .mapId = MAP_D36R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_evening_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_evening_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_evening_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_evening_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_evening_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_evening_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ilex_forest_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ilex_forest_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ilex_forest_night_NSCR_lz, }, }, .unused3C = 5, }, // National Park { - .mapId = MAP_D22R0101, + .mapId = MAP_D22R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_national_park_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_national_park_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_national_park_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_national_park_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_national_park_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_national_park_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_national_park_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_national_park_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_national_park_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_national_park_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_national_park_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_national_park_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_national_park_evening_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_national_park_evening_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_national_park_evening_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_national_park_evening_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_national_park_evening_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_national_park_evening_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_national_park_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_national_park_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_national_park_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_national_park_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_national_park_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_national_park_night_NSCR_lz, }, }, .unused3C = 6, }, // Burned Tower { - .mapId = MAP_D18R0101, + .mapId = MAP_D18R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_burned_tower_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_burned_tower_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_burned_tower_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_burned_tower_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_burned_tower_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_burned_tower_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_burned_tower_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_burned_tower_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_burned_tower_evening_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_burned_tower_evening_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_evening_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_burned_tower_evening_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_burned_tower_evening_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_evening_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_burned_tower_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_burned_tower_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_burned_tower_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_burned_tower_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_burned_tower_night_NSCR_lz, }, }, .unused3C = 7, }, // Bell Tower { - .mapId = MAP_D17R0101, + .mapId = MAP_D17R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_bell_tower_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_bell_tower_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_bell_tower_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_bell_tower_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_bell_tower_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_bell_tower_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_bell_tower_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_bell_tower_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_bell_tower_evening_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_bell_tower_evening_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_evening_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_bell_tower_evening_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_bell_tower_evening_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_evening_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_bell_tower_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_bell_tower_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_bell_tower_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_bell_tower_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_bell_tower_night_NSCR_lz, }, }, .unused3C = 8, }, // Whirl Islands { - .mapId = MAP_D40R0101, + .mapId = MAP_D40R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_whirl_islands_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_whirl_islands_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_whirl_islands_night_NSCR_lz, }, }, .unused3C = 9, }, // Mt Mortar { - .mapId = MAP_D38R0101, + .mapId = MAP_D38R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_evening_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_evening_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_evening_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_evening_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_evening_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_evening_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_mortar_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_mortar_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_mortar_night_NSCR_lz, }, }, .unused3C = 11, }, // Ice Path { - .mapId = MAP_D39R0101, + .mapId = MAP_D39R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_ice_path_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ice_path_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ice_path_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ice_path_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ice_path_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_ice_path_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_ice_path_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_ice_path_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_ice_path_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_ice_path_night_NSCR_lz, }, }, .unused3C = 12, }, // Dragon's Den { - .mapId = MAP_D44R0101, + .mapId = MAP_D44R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_dragons_den_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dragons_den_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dragons_den_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dragons_den_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_dragons_den_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_dragons_den_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_dragons_den_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_dragons_den_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_dragons_den_night_NSCR_lz, }, }, .unused3C = 13, }, // Tohjo Falls { - .mapId = MAP_D45R0101, + .mapId = MAP_D45R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_tohjo_falls_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_tohjo_falls_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_tohjo_falls_night_NSCR_lz, }, }, .unused3C = 14, }, // Victory Road South { - .mapId = MAP_D43R0101, + .mapId = MAP_D43R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_night_NSCR_lz, }, }, .unused3C = 15, }, // Victory Road North { - .mapId = MAP_D43R0103, + .mapId = MAP_D43R0103, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_victory_road_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_victory_road_night_NSCR_lz, }, }, .unused3C = 15, }, // Viridian Forest { - .mapId = MAP_D46R0101, + .mapId = MAP_D46R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_evening_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_evening_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_evening_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_evening_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_evening_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_evening_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_viridian_forest_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_viridian_forest_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_viridian_forest_night_NSCR_lz, }, }, .unused3C = 16, }, // Diglett Cave { - .mapId = MAP_D01R0101, + .mapId = MAP_D01R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_diglett_cave_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_diglett_cave_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_diglett_cave_night_NSCR_lz, }, }, .unused3C = 17, }, // Rock Tunnel { - .mapId = MAP_D05R0101, + .mapId = MAP_D05R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_rock_tunnel_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_rock_tunnel_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_rock_tunnel_night_NSCR_lz, }, }, .unused3C = 18, }, // Mt Moon { - .mapId = MAP_D02R0101, + .mapId = MAP_D02R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_mt_moon_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_moon_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_moon_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_moon_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_moon_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_moon_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_moon_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_moon_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_moon_evening_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_moon_evening_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_evening_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_moon_evening_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_moon_evening_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_evening_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_moon_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_moon_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_moon_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_moon_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_moon_night_NSCR_lz, }, }, .unused3C = 20, }, // Seafoam Islands { - .mapId = MAP_D11R0101, + .mapId = MAP_D11R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_seafoam_islands_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_seafoam_islands_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_seafoam_islands_night_NSCR_lz, }, }, .unused3C = 21, }, // Mt Silver { - .mapId = MAP_D41R0101, + .mapId = MAP_D41R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_mt_silver_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_silver_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_silver_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_silver_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_mt_silver_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_mt_silver_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_mt_silver_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_mt_silver_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_mt_silver_night_NSCR_lz, }, }, .unused3C = 22, }, // Cerulean Cave { - .mapId = MAP_D03R0101, + .mapId = MAP_D03R0101, .unused4 = 0, - .files = { + .files = { { - .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_morning_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_morning_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_morning_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_morning_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_morning_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_morning_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_day_NSCR_lz, }, { - .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_night_NCLR, - .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_night_NCGR_lz, - .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_night_NSCR_lz, + .palNo = NARC_preview_graphic_preview_graphic_cerulean_cave_night_NCLR, + .charNo = NARC_preview_graphic_preview_graphic_cerulean_cave_night_NCGR_lz, + .scrnNo = NARC_preview_graphic_preview_graphic_cerulean_cave_night_NSCR_lz, }, }, .unused3C = 23, @@ -773,15 +773,15 @@ u8 MapPreviewGraphic_GetIndex(u32 mapId) { } void MapPreviewGraphic_BeginShowImage(TaskManager *man, int index, u8 time, int a3) { - FieldSystem *fsys = TaskManager_GetFieldSystem(man); + FieldSystem *fsys = TaskManager_GetFieldSystem(man); UnkStruct_0206A388 *unk = AllocFromHeapAtEnd(HEAP_ID_4, sizeof(UnkStruct_0206A388)); - unk->state = 0; + unk->state = 0; unk->displayTimer = 0; - unk->bgConfig = FieldSystem_GetBgConfigPtr(fsys); + unk->bgConfig = FieldSystem_GetBgConfigPtr(fsys); unk->fadeOutTimer = 0; - unk->unk1A = 0; - unk->index = index; + unk->unk1A = 0; + unk->index = index; switch (time) { case RTC_TIMEOFDAY_MORN: @@ -803,10 +803,10 @@ void MapPreviewGraphic_BeginShowImage(TaskManager *man, int index, u8 time, int break; } - unk->heapId = HEAP_ID_4; - unk->unk30 = a3; + unk->heapId = HEAP_ID_4; + unk->unk30 = a3; unk->unk34.state = 0; - unk->unk34.unk2 = 0; + unk->unk34.unk2 = 0; TaskManager_Call(man, Task_MapPreviewGraphic_ShowImage, unk); } @@ -819,7 +819,7 @@ typedef enum PreviewGraphicState { } PreviewGraphicState; static BOOL Task_MapPreviewGraphic_ShowImage(TaskManager *man) { - FieldSystem *fsys = TaskManager_GetFieldSystem(man); + FieldSystem *fsys = TaskManager_GetFieldSystem(man); UnkStruct_0206A388 *unk = TaskManager_GetEnvironment(man); switch (unk->state) { diff --git a/src/math_util.c b/src/math_util.c index eea2f06325..4b973054e7 100644 --- a/src/math_util.c +++ b/src/math_util.c @@ -8,8 +8,8 @@ u32 sMTRNG_State[624]; u32 sLCRNG_State; -int sMTRNG_Cycles = 625; -u32 sMTRNG_XOR[2] = { 0, 0x9908B0DF }; +int sMTRNG_Cycles = 625; +u32 sMTRNG_XOR[2] = { 0, 0x9908B0DF }; MATHCRC16Table *sCRC16TablePtr = NULL; fx32 GF_SinDegNoWrap(u16 deg) { @@ -94,15 +94,15 @@ u32 MTRandom(void) { } for (i = 0; i < 227; i++) { - val = (sMTRNG_State[i] & 0x80000000) | (sMTRNG_State[i + 1] & 0x7fffffff); + val = (sMTRNG_State[i] & 0x80000000) | (sMTRNG_State[i + 1] & 0x7fffffff); sMTRNG_State[i] = sMTRNG_State[i + 397] ^ (val >> 1) ^ sMTRNG_XOR[val & 0x1]; } for (; i < 623; i++) { - val = (sMTRNG_State[i] & 0x80000000) | (sMTRNG_State[i + 1] & 0x7fffffff); + val = (sMTRNG_State[i] & 0x80000000) | (sMTRNG_State[i + 1] & 0x7fffffff); sMTRNG_State[i] = sMTRNG_State[i + -227] ^ (val >> 1) ^ sMTRNG_XOR[val & 0x1]; } - val = (sMTRNG_State[623] & 0x80000000) | (sMTRNG_State[0] & 0x7fffffff); + val = (sMTRNG_State[623] & 0x80000000) | (sMTRNG_State[0] & 0x7fffffff); sMTRNG_State[623] = sMTRNG_State[396] ^ (val >> 1) ^ sMTRNG_XOR[val & 0x1]; sMTRNG_Cycles = 0; @@ -130,7 +130,7 @@ void MTX22_2DAffine(MtxFx22 *mtx, u16 radians, fx32 x, fx32 y, u8 type) { u32 Math_CalcArraySum(const void *data, u32 size) { const u8 *data8 = (const u8 *)data; - u32 sum = 0; + u32 sum = 0; int i; for (i = 0; i < size; i++) { sum += *data8++; diff --git a/src/message_format.c b/src/message_format.c index 3646d7ac98..8df76e8198 100644 --- a/src/message_format.c +++ b/src/message_format.c @@ -36,7 +36,7 @@ MessageFormat *MessageFormat_New_Custom(u32 nstr, u32 len, HeapID heapId) { GF_ASSERT(len != 0); ret = AllocFromHeapAtEnd(heapId, sizeof(MessageFormat)); if (ret != NULL) { - ret->count = nstr; + ret->count = nstr; ret->heapId = heapId; ret->buffer = String_New(len, heapId); if (ret->buffer != NULL) { @@ -109,7 +109,7 @@ void BufferRivalsName(MessageFormat *msgFmt, u32 fieldno, SaveData *saveData) { void BufferFriendsName(MessageFormat *msgFmt, u32 fieldno, SaveData *saveData) { PlayerProfile *playerProfile = Save_PlayerData_GetProfileAddr(saveData); - MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0445_bin, msgFmt->heapId); + MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0445_bin, msgFmt->heapId); if (PlayerProfile_GetTrainerGender(playerProfile) == PLAYER_GENDER_MALE) { ReadMsgDataIntoString(msgData, msg_0445_00001, msgFmt->buffer); // Lyra } else { @@ -267,7 +267,7 @@ void BufferLandmarkName(MessageFormat *msgFmt, u32 fieldno, u32 landmarkId) { if (msgData != NULL) { if (landmarkId == 0 || landmarkId >= MsgDataGetCount(msgData)) { DestroyMsgData(msgData); - msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0280_bin, msgFmt->heapId); + msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0280_bin, msgFmt->heapId); landmarkId = 2; } ReadMsgDataIntoString(msgData, landmarkId, msgFmt->buffer); @@ -410,7 +410,7 @@ void BufferLocationName(MessageFormat *msgFmt, u32 fieldno, u32 mapsecId) { NARC_msg_msg_0280_bin, }; u32 locationBank = sub_02017FAC(mapsecId); - u32 locationId = sub_02017FCC(mapsecId); + u32 locationId = sub_02017FCC(mapsecId); MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, msgBanks[locationBank], msgFmt->heapId); int msgBank; if (msgData != NULL) { @@ -421,10 +421,10 @@ void BufferLocationName(MessageFormat *msgFmt, u32 fieldno, u32 mapsecId) { } else { DestroyMsgData(msgData); if (locationBank == 0 && locationId == 0) { - msgBank = NARC_msg_msg_0281_bin; + msgBank = NARC_msg_msg_0281_bin; locationId = MAPLOC(METLOC_MYSTERY_ZONE); } else { - msgBank = NARC_msg_msg_0280_bin; + msgBank = NARC_msg_msg_0280_bin; locationId = MAPLOC(METLOC_FARAWAY_PLACE); } msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, msgBank, msgFmt->heapId); @@ -466,9 +466,9 @@ void BufferContestBackgroundName(MessageFormat *msgFmt, u32 fieldno, u32 bgId) { void BufferGroupName(MessageFormat *msgFmt, SaveData *saveData, s32 groupId, s32 fieldno, s32 nameType) { SAV_FRIEND_GRP *friendGrp = Save_FriendGroup_Get(saveData); - u8 sp10 = sub_0202C830(friendGrp, groupId); - u8 r7 = sub_0202C83C(friendGrp, groupId); - String *dest = String_New(64, HEAP_ID_4); + u8 sp10 = sub_0202C830(friendGrp, groupId); + u8 r7 = sub_0202C83C(friendGrp, groupId); + String *dest = String_New(64, HEAP_ID_4); CopyU16ArrayToString(dest, sub_0202C7E0(friendGrp, groupId, nameType)); BufferString(msgFmt, fieldno, dest, sp10, 1, r7); String_Delete(dest); @@ -667,7 +667,7 @@ void StringExpandPlaceholders(MessageFormat *msgFmt, String *dest, String *src) cstr = MsgArray_SkipControlCode(cstr); } else { const u16 *before = cstr; - cstr = MsgArray_SkipControlCode(cstr); + cstr = MsgArray_SkipControlCode(cstr); while (before < cstr) { String_AddChar(dest, *before++); } diff --git a/src/move_relearner.c b/src/move_relearner.c index 23696f6030..4cf062e19a 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -16,8 +16,8 @@ void MoveRelearner_Delete(MoveRelearnerArgs *moveRelearner) { u16 *MoveRelearner_GetEligibleLevelUpMoves(Pokemon *mon, HeapID heapId) { u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u8 form = GetMonData(mon, MON_DATA_FORM, NULL); - u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); + u8 form = GetMonData(mon, MON_DATA_FORM, NULL); + u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); u16 moves[MAX_MON_MOVES]; for (u8 i = 0; i < MAX_MON_MOVES; i++) { @@ -25,7 +25,7 @@ u16 *MoveRelearner_GetEligibleLevelUpMoves(Pokemon *mon, HeapID heapId) { } u16 *tableFromFile = AllocFromHeap(heapId, LEVEL_UP_LEARNSET_MAX * 2); - u16 *returnTable = AllocFromHeap(heapId, LEVEL_UP_LEARNSET_MAX * 2); + u16 *returnTable = AllocFromHeap(heapId, LEVEL_UP_LEARNSET_MAX * 2); LoadLevelUpLearnset_HandleAlternateForm(species, form, tableFromFile); diff --git a/src/msgdata.c b/src/msgdata.c index 8203ba472e..a08c92b37f 100644 --- a/src/msgdata.c +++ b/src/msgdata.c @@ -132,7 +132,7 @@ static void ReadMsgData_ExistingNarc_ExistingString(NARC *narc, u32 group, u32 n NARC_ReadFromMember(narc, group, 8 * num + 4, 8, &alloc); Decrypt1(&alloc, num, sp10[1]); size = alloc.length * 2; - buf = AllocFromHeapAtEnd(heapId, size); + buf = AllocFromHeapAtEnd(heapId, size); if (buf != NULL) { NARC_ReadFromMember(narc, group, alloc.offset, size, buf); Decrypt2(buf, alloc.length, num); @@ -172,7 +172,7 @@ static String *ReadMsgData_ExistingNarc_NewString(NARC *narc, u32 group, u32 num dest = String_New(alloc.length, heapId); if (dest != NULL) { size = alloc.length * 2; - buf = AllocFromHeapAtEnd(heapId, size); + buf = AllocFromHeapAtEnd(heapId, size); if (buf != NULL) { NARC_ReadFromMember(narc, group, alloc.offset, size, buf); Decrypt2(buf, alloc.length, num); @@ -209,10 +209,10 @@ MsgData *NewMsgDataFromNarc(MsgDataLoadType type, NarcId narc_id, s32 file_id, H } else { msgData->lazy = NARC_New(narc_id, heapId); } - msgData->type = (u16)type; + msgData->type = (u16)type; msgData->narc_id = (u16)narc_id; msgData->file_id = (u16)file_id; - msgData->heapId = (u16)heapId; + msgData->heapId = (u16)heapId; } return msgData; } @@ -283,7 +283,7 @@ void GetSpeciesNameIntoArray(u16 species, HeapID heapId, u16 *dest) { String *ReadMsgData_ExpandPlaceholders(MessageFormat *messageFormat, MsgData *msgData, u32 msgno, HeapID heapId) { String *ret = NULL; - String *r4 = String_New(1024, HEAP_ID_DEFAULT); + String *r4 = String_New(1024, HEAP_ID_DEFAULT); String *r5; if (r4 != NULL) { r5 = NewString_ReadMsgData(msgData, msgno); diff --git a/src/mystery_gift.c b/src/mystery_gift.c index 27f7c1a6f0..6e71e6be5b 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -63,7 +63,7 @@ BOOL SaveMysteryGift_TryInsertGift(MysteryGiftSave *mg, const MysteryGift *src, if (!MysteryGiftTagIsValid(mg->gifts[i].tag)) { MI_CpuCopy8(src, &mg->gifts[i], sizeof(MysteryGift)); mg->gifts[i].flag = cardIdx; - ret = TRUE; + ret = TRUE; break; } } @@ -111,7 +111,7 @@ BOOL SaveMysteryGift_TrySetSpecialCard(MysteryGiftSave *mg, const WonderCard *sr BOOL SaveMysteryGift_SetReceivedByIdx(MysteryGiftSave *mg, int index) { GF_ASSERT(index < NUM_SAVED_MYSTERY_GIFTS); - mg->gifts[index].tag = MG_TAG_INVALID; + mg->gifts[index].tag = MG_TAG_INVALID; mg->gifts[index].flag = 0; SaveSubstruct_UpdateCRC(SAVE_MYSTERY_GIFT); return TRUE; @@ -240,7 +240,7 @@ static MysteryGiftSave *sMysteryGiftSaveData; void SaveMGDataPtr_Begin(SaveData *saveData, HeapID heapId) { if (sMysteryGiftSaveData == NULL) { #ifdef MYSTERY_GIFT_SAVE_TRANSACTION_IMPL - u32 size = Save_MysteryGift_sizeof(); + u32 size = Save_MysteryGift_sizeof(); sMysteryGiftSaveData = AllocFromHeap(heapId, size); GF_ASSERT(sMysteryGiftSaveData != NULL); MI_CpuCopy32(Save_MysteryGift_Get(saveData), sMysteryGiftSaveData, size); diff --git a/src/naming_screen.c b/src/naming_screen.c index 5cc04ebda6..aea6a80085 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -143,8 +143,8 @@ typedef struct UnkStruct_02102278 { u8 x; u8 y; u16 sizeParam : 2; // GameFreak tried to be size-efficient here, but - u8 cursorX : 5; // messed up the data types. - u8 cursorY : 5; // cursorX and cursorY should both be u16. + u8 cursorX : 5; // messed up the data types. + u8 cursorY : 5; // cursorX and cursorY should both be u16. } NamingScreenTouchHitboxDef; BOOL NamingScreenApp_Init(OVY_MANAGER *ovyMan, int *pState); @@ -487,9 +487,9 @@ BOOL NamingScreenApp_Init(OVY_MANAGER *ovyMan, int *pState) { data = OverlayManager_CreateAndGetData(ovyMan, sizeof(NamingScreenAppData), HEAP_ID_NAMING_SCREEN); memset(data, 0, sizeof(NamingScreenAppData)); - data->bgConfig = BgConfig_Alloc(HEAP_ID_NAMING_SCREEN); - narc = NARC_New(NARC_data_namein, HEAP_ID_NAMING_SCREEN); - data->msgFormat = MessageFormat_New(HEAP_ID_NAMING_SCREEN); + data->bgConfig = BgConfig_Alloc(HEAP_ID_NAMING_SCREEN); + narc = NARC_New(NARC_data_namein, HEAP_ID_NAMING_SCREEN); + data->msgFormat = MessageFormat_New(HEAP_ID_NAMING_SCREEN); data->msgData_249 = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0249_bin, HEAP_ID_NAMING_SCREEN); data->msgData_254 = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0254_bin, HEAP_ID_NAMING_SCREEN); data->msgData_197 = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0197_bin, HEAP_ID_NAMING_SCREEN); @@ -519,9 +519,9 @@ BOOL NamingScreenApp_Init(OVY_MANAGER *ovyMan, int *pState) { if (data->type == NAME_SCREEN_POKEMON) { NamingScreen_LoadMonIcon(data->monIconCharData, data->plttData, data->playerGenderOrMonSpecies, data->monForm); } - sAppData = data; + sAppData = data; data->unk_5C4 = sub_020163E0(NULL, PM_LCD_BOTTOM, 12, HEAP_ID_NAMING_SCREEN); - *pState = NS_MAIN_STATE_WAIT_FADE_IN; + *pState = NS_MAIN_STATE_WAIT_FADE_IN; return TRUE; } @@ -531,7 +531,7 @@ BOOL NamingScreenApp_Init(OVY_MANAGER *ovyMan, int *pState) { static void NamingScreen_LoadMonIcon(NNSG2dCharacterData *pCharData, NNSG2dPaletteData *pPlttData, int species, int form) { GX_LoadOBJ(pCharData->pRawData, 0x57E0, 0x200); const u16 *rawPltt = pPlttData->pRawData; - u32 plttNo = GetMonIconPaletteEx(species, form, FALSE); + u32 plttNo = GetMonIconPaletteEx(species, form, FALSE); GX_LoadOBJPltt(rawPltt + 16 * plttNo, 0xC0, 0x20); } @@ -541,7 +541,7 @@ BOOL NamingScreenApp_Main(OVY_MANAGER *ovyMan, int *pState) { switch ((NamingScreenMainState)*pState) { case NS_MAIN_STATE_WAIT_FADE_IN: if (IsPaletteFadeFinished()) { - *pState = NS_MAIN_STATE_FINISH_INIT; + *pState = NS_MAIN_STATE_FINISH_INIT; data->delayCounter = 0; } break; @@ -550,7 +550,7 @@ BOOL NamingScreenApp_Main(OVY_MANAGER *ovyMan, int *pState) { NamingScreen_PlaceCursorSprite(data); NamingScreen_UpdateSpritesAnims(data->spriteAnimUpdateReq, data->uiSprites, data->pageNum); if (data->delayCounter > 5) { - *pState = NS_MAIN_STATE_INPUT_LOOP; + *pState = NS_MAIN_STATE_INPUT_LOOP; data->delayCounter = 0; } break; @@ -579,7 +579,7 @@ BOOL NamingScreenApp_Main(OVY_MANAGER *ovyMan, int *pState) { if (!TextPrinterCheckActive(data->battleMessageTextPrinterId)) { PlaySE(SEQ_SE_DP_PIRORIRO); ++data->spriteAnimUpdateReq[6]; - data->delayCounter = 0; + data->delayCounter = 0; data->pageSwitchState = NS_PAGESWITCH_STATE_DELAY_AND_FADE_OUT; } break; @@ -630,7 +630,7 @@ static NamingScreenMainState NamingScreen_HandleInput(NamingScreenAppData *data, NamingScreen_LoadKeyboardLayout(data->keyboard, data->pageNum); PlaySE(SEQ_SE_DP_SYU03); } else if (gSystem.newKeys & PAD_BUTTON_A) { - ret = NamingScreen_HandleCharacterInput(data, data->keyboard[data->kbCursor.y][data->kbCursor.x], TRUE); + ret = NamingScreen_HandleCharacterInput(data, data->keyboard[data->kbCursor.y][data->kbCursor.x], TRUE); data->kbCursor.showCursor = TRUE; } else if (data->isTouchInput == TRUE) { ret = NamingScreen_HandleCharacterInput(data, data->keyboard[data->kbCursor.y][data->kbCursor.x], FALSE); @@ -695,7 +695,7 @@ static BOOL NamingScreen_PMCharArrayIsAllSpaces(const u16 *s) { BOOL NamingScreenApp_Exit(OVY_MANAGER *ovyMan, int *pState) { NamingScreenAppData *data = OverlayManager_GetData(ovyMan); - NamingScreenArgs *args = OverlayManager_GetArgs(ovyMan); + NamingScreenArgs *args = OverlayManager_GetArgs(ovyMan); data->entryBuf[data->textCursorPos] = EOS; if (data->type == NAME_SCREEN_POKEMON) { @@ -757,19 +757,19 @@ BOOL NamingScreenApp_Exit(OVY_MANAGER *ovyMan, int *pState) { // ------------------------------- NamingScreenArgs *NamingScreen_CreateArgs(HeapID heapId, NameScreenType kind, int param, int maxLen, Options *options, MenuInputStateMgr *pMenuInputState) { - NamingScreenArgs *ret = AllocFromHeap(heapId, sizeof(NamingScreenArgs)); - ret->kind = kind; + NamingScreenArgs *ret = AllocFromHeap(heapId, sizeof(NamingScreenArgs)); + ret->kind = kind; ret->playerGenderOrMonSpecies = param; - ret->maxLen = maxLen; - ret->noInput = FALSE; - ret->nameInputFlat[0] = EOS; - ret->nameInputString = String_New(32, heapId); - ret->battleMsgId = 0; - ret->pcStorage = 0; - ret->monGender = 0; - ret->options = options; - ret->monForm = 0; - ret->pMenuInputState = pMenuInputState; + ret->maxLen = maxLen; + ret->noInput = FALSE; + ret->nameInputFlat[0] = EOS; + ret->nameInputString = String_New(32, heapId); + ret->battleMsgId = 0; + ret->pcStorage = 0; + ret->monGender = 0; + ret->options = options; + ret->monForm = 0; + ret->pMenuInputState = pMenuInputState; return ret; } @@ -791,13 +791,13 @@ static void NamingScreen_VBlankCB(void *param) { } static void NamingScreen_InitFromArgs(NamingScreenAppData *data, NamingScreenArgs *args) { - data->type = args->kind; + data->type = args->kind; data->playerGenderOrMonSpecies = args->playerGenderOrMonSpecies; - data->monForm = args->monForm; - data->maxLen = args->maxLen; - data->monGender = args->monGender; - data->options = args->options; - data->pMenuInputState = args->pMenuInputState; + data->monForm = args->monForm; + data->maxLen = args->maxLen; + data->monGender = args->monGender; + data->options = args->options; + data->pMenuInputState = args->pMenuInputState; } static void NamingScreen_SetGraphicsBanks(void) { @@ -830,18 +830,18 @@ static void NamingScreen_SetBgModesAndInitBuffers(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0x00000000, - .y = 0x00000000, + .x = 0x00000000, + .y = 0x00000000, .bufferSize = GF_BG_BUF_SIZE_512x256_4BPP, - .baseTile = 0x00000000, - .size = GF_BG_SCR_SIZE_512x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0x00000000, + .size = GF_BG_SCR_SIZE_512x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf000, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0x00000000, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0x00000000, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_0, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_MAIN_0); @@ -849,18 +849,18 @@ static void NamingScreen_SetBgModesAndInitBuffers(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0x00000000, - .y = 0x00000000, + .x = 0x00000000, + .y = 0x00000000, .bufferSize = GF_BG_BUF_SIZE_512x256_4BPP, - .baseTile = 0x00000000, - .size = GF_BG_SCR_SIZE_512x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0x00000000, + .size = GF_BG_SCR_SIZE_512x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe000, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0x00000000, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0x00000000, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_1, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_MAIN_1); @@ -868,18 +868,18 @@ static void NamingScreen_SetBgModesAndInitBuffers(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0x00000000, - .y = 0x00000000, + .x = 0x00000000, + .y = 0x00000000, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0x00000000, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0x00000000, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xd000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0x00000000, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0x00000000, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_2, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_MAIN_2); @@ -887,18 +887,18 @@ static void NamingScreen_SetBgModesAndInitBuffers(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0x00000000, - .y = 0x00000000, + .x = 0x00000000, + .y = 0x00000000, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0x00000000, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0x00000000, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0x00000000, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0x00000000, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_SUB_0, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_SUB_0); @@ -949,19 +949,19 @@ static void NamingScreen_InitKeyboardAndEntryCursors(NamingScreenAppData *data, if (args->battleMsgId != 0) { data->printedFromBattleGMM = TRUE; } - data->promptString = ReadMsgData_ExpandPlaceholders(data->msgFormat, data->msgData_249, _021020B4[data->type], HEAP_ID_NAMING_SCREEN); - data->unkJapaneseString = ReadMsgData_ExpandPlaceholders(data->msgFormat, data->msgData_249, msg_0249_00009, HEAP_ID_NAMING_SCREEN); - data->unk_184 = NewString_ReadMsgData(data->msgData_249, msg_0249_00007); - data->textCursorPos = StringLength(data->entryBufBak); - data->kbCursor.x = 0; - data->kbCursor.y = 1; - data->kbCursor.prevX = -1; - data->kbCursor.prevY = -1; - data->kbCursor.showCursor = TRUE; - data->kbCursor.ignoreInput = FALSE; - data->unk_484 = -1; - data->unk_488 = 0; - data->unk_48C = 0; + data->promptString = ReadMsgData_ExpandPlaceholders(data->msgFormat, data->msgData_249, _021020B4[data->type], HEAP_ID_NAMING_SCREEN); + data->unkJapaneseString = ReadMsgData_ExpandPlaceholders(data->msgFormat, data->msgData_249, msg_0249_00009, HEAP_ID_NAMING_SCREEN); + data->unk_184 = NewString_ReadMsgData(data->msgData_249, msg_0249_00007); + data->textCursorPos = StringLength(data->entryBufBak); + data->kbCursor.x = 0; + data->kbCursor.y = 1; + data->kbCursor.prevX = -1; + data->kbCursor.prevY = -1; + data->kbCursor.showCursor = TRUE; + data->kbCursor.ignoreInput = FALSE; + data->unk_484 = -1; + data->unk_488 = 0; + data->unk_48C = 0; data->entryBuf[data->maxLen] = EOS; for (int i = 0; i < 7; ++i) { data->spriteAnimUpdateReq[i] = 0; @@ -976,10 +976,10 @@ static void NamingScreen_InitKeyboardAndEntryCursors(NamingScreenAppData *data, static void NamingScreen_PrepareBattleMessage(NamingScreenAppData *data, OVY_MANAGER *ovyMan) { NamingScreenArgs *args = OverlayManager_GetArgs(ovyMan); if (args->battleMsgId != 0) { - String *string = String_New(200, HEAP_ID_NAMING_SCREEN); + String *string = String_New(200, HEAP_ID_NAMING_SCREEN); data->battleMsgString = NULL; - int boxno = PCStorage_GetActiveBox(args->pcStorage); - int nextOpenBoxNo = PCStorage_FindFirstBoxWithEmptySlot(args->pcStorage); + int boxno = PCStorage_GetActiveBox(args->pcStorage); + int nextOpenBoxNo = PCStorage_FindFirstBoxWithEmptySlot(args->pcStorage); BufferPCBoxName(data->msgFormat, 1, args->pcStorage, boxno); if (boxno != nextOpenBoxNo) { BufferPCBoxName(data->msgFormat, 2, args->pcStorage, nextOpenBoxNo); @@ -997,7 +997,7 @@ static void NamingScreen_PrepareBattleMessage(NamingScreenAppData *data, OVY_MAN CopyU16ArrayToString(string, data->entryBuf); BufferString(data->msgFormat, 0, string, 0, 0, 0); } - data->battleMsgString = ReadMsgData_ExpandPlaceholders(data->msgFormat, data->msgData_197, args->battleMsgId, HEAP_ID_NAMING_SCREEN); + data->battleMsgString = ReadMsgData_ExpandPlaceholders(data->msgFormat, data->msgData_197, args->battleMsgId, HEAP_ID_NAMING_SCREEN); data->printedFromBattleGMM = TRUE; String_Delete(string); } @@ -1040,8 +1040,8 @@ static void NamingScreen_InitObjCharPlttTransfer(void) { ObjCharTransferTemplate tmplate = { .maxTasks = 20, .sizeMain = 0x800, - .sizeSub = 0x800, - .heapId = HEAP_ID_NAMING_SCREEN, + .sizeSub = 0x800, + .heapId = HEAP_ID_NAMING_SCREEN, }; ObjCharTransfer_Init(&tmplate); ObjPlttTransfer_Init(20, HEAP_ID_NAMING_SCREEN); @@ -1092,7 +1092,7 @@ typedef struct SubspritePosControllerTaskData { static void SysTask_NamingScreen_SubspritePosController(SysTask *task, void *taskData) { SubspritePosControllerTaskData *data = taskData; - VecFx32 *pMatrix = Sprite_GetMatrixPtr(data->parent); + VecFx32 *pMatrix = Sprite_GetMatrixPtr(data->parent); VecFx32 matrix; matrix.x = pMatrix->x + data->dx; matrix.y = FX32_ONE * sUISpritesParam[data->i][1]; @@ -1106,35 +1106,35 @@ static void NamingScreen_CreateSprites(NamingScreenAppData *data) { CreateSpriteResourcesHeader(&data->spriteResHdr_Sub, 1, 1, 1, 1, -1, -1, 0, 0, data->gfxResMen[GF_GFX_RES_TYPE_CHAR], data->gfxResMen[GF_GFX_RES_TYPE_PLTT], data->gfxResMen[GF_GFX_RES_TYPE_CELL], data->gfxResMen[GF_GFX_RES_TYPE_ANIM], NULL, NULL); { SpriteTemplate spriteTemplate; - spriteTemplate.spriteList = data->spriteList; - spriteTemplate.header = &data->spriteResHdr_Main; - spriteTemplate.position.x = FX32_CONST(32); - spriteTemplate.position.y = FX32_CONST(96); - spriteTemplate.position.z = 0; - spriteTemplate.scale.x = FX32_ONE; - spriteTemplate.scale.y = FX32_ONE; - spriteTemplate.scale.z = FX32_ONE; - spriteTemplate.rotation = 0; - spriteTemplate.priority = 1; + spriteTemplate.spriteList = data->spriteList; + spriteTemplate.header = &data->spriteResHdr_Main; + spriteTemplate.position.x = FX32_CONST(32); + spriteTemplate.position.y = FX32_CONST(96); + spriteTemplate.position.z = 0; + spriteTemplate.scale.x = FX32_ONE; + spriteTemplate.scale.y = FX32_ONE; + spriteTemplate.scale.z = FX32_ONE; + spriteTemplate.rotation = 0; + spriteTemplate.priority = 1; spriteTemplate.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; - spriteTemplate.heapId = HEAP_ID_NAMING_SCREEN; + spriteTemplate.heapId = HEAP_ID_NAMING_SCREEN; for (i = 0; i < 9; ++i) { spriteTemplate.position.x = sUISpritesParam[i][0] * FX32_ONE; spriteTemplate.position.y = sUISpritesParam[i][1] * FX32_ONE; - data->uiSprites[i] = Sprite_CreateAffine(&spriteTemplate); + data->uiSprites[i] = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(data->uiSprites[i], TRUE); Sprite_SetAnimCtrlSeq(data->uiSprites[i], sUISpritesParam[i][2]); Sprite_SetDrawPriority(data->uiSprites[i], sUISpritesParam[i][3]); } Sprite_SetVisibleFlag(data->uiSprites[4], FALSE); for (i = 0; i < 7; ++i) { - data->tasks[i] = CreateSysTaskAndEnvironment(SysTask_NamingScreen_SubspritePosController, sizeof(SubspritePosControllerTaskData), 5, HEAP_ID_NAMING_SCREEN); + data->tasks[i] = CreateSysTaskAndEnvironment(SysTask_NamingScreen_SubspritePosController, sizeof(SubspritePosControllerTaskData), 5, HEAP_ID_NAMING_SCREEN); SubspritePosControllerTaskData *taskData = SysTask_GetData(data->tasks[i]); - taskData->parent = data->uiSprites[7]; - taskData->child = data->uiSprites[i]; - taskData->dx = sUISpritesParam[i][0] * FX32_ONE; - taskData->i = i; + taskData->parent = data->uiSprites[7]; + taskData->child = data->uiSprites[i]; + taskData->dx = sUISpritesParam[i][0] * FX32_ONE; + taskData->i = i; } for (i = 0; i < data->maxLen; ++i) { spriteTemplate.position.x = FX32_ONE * (80 + i * 12); @@ -1151,8 +1151,8 @@ static void NamingScreen_CreateSprites(NamingScreenAppData *data) { } static void NamingScreen_CreateIconSprite(NamingScreenAppData *data, SpriteTemplate *tmplate) { - tmplate->position.x = FX32_CONST(24); - tmplate->position.y = FX32_CONST(8); + tmplate->position.x = FX32_CONST(24); + tmplate->position.y = FX32_CONST(8); data->iconSprites[0] = Sprite_CreateAffine(tmplate); Sprite_SetAnimActiveFlag(data->iconSprites[0], TRUE); @@ -1183,8 +1183,8 @@ static void NamingScreen_CreateIconSprite(NamingScreenAppData *data, SpriteTempl case NAME_SCREEN_POKEMON: Sprite_SetAnimCtrlSeq(data->iconSprites[0], 50); if (data->monGender != 2) { - tmplate->position.x = (13 * data->maxLen + 80) * FX32_ONE; - tmplate->position.y = FX32_CONST(27); + tmplate->position.x = (13 * data->maxLen + 80) * FX32_ONE; + tmplate->position.y = FX32_CONST(27); data->iconSprites[1] = Sprite_CreateAffine(tmplate); if (data->monGender == 0) { Sprite_SetAnimCtrlSeq(data->iconSprites[1], 45); @@ -1259,12 +1259,12 @@ static void NamingScreen_HandlePageSwitch(BgConfig *bgConfig, Window *windows, i *data; SysTask *task; - task = CreateSysTaskAndEnvironment(SysTask_NamingScreen_WiggleEffect, sizeof(WiggleEffectTaskData), 0, HEAP_ID_NAMING_SCREEN); - data = SysTask_GetData(task); - data->sprite = pSprites[7]; - data->state = 0; - data->x = Sprite_GetMatrixPtr(pSprites[7])->x; - data->y = Sprite_GetMatrixPtr(pSprites[7])->y; + task = CreateSysTaskAndEnvironment(SysTask_NamingScreen_WiggleEffect, sizeof(WiggleEffectTaskData), 0, HEAP_ID_NAMING_SCREEN); + data = SysTask_GetData(task); + data->sprite = pSprites[7]; + data->state = 0; + data->x = Sprite_GetMatrixPtr(pSprites[7])->x; + data->y = Sprite_GetMatrixPtr(pSprites[7])->y; posVecs[bgId_prev].x = -11; ++(*pState); } @@ -1301,8 +1301,8 @@ static void NamingScreen_PrintMessageOnWindowLeftAlign(Window *window, NameScree } static void NamingScreen_PrintMessageOnWindowWithMargin(Window *window, NameScreenType unused, String *msg) { - int x = 16; - int width = FontID_String_GetWidth(0, msg, 0); + int x = 16; + int width = FontID_String_GetWidth(0, msg, 0); int windowWidth = GetWindowWidth(window) * 8; if (width + 16 > windowWidth) { x = windowWidth - width; @@ -1367,8 +1367,8 @@ static void NamingScreen_SetPageBgPriorities(BgConfig *bgConfig, GFBgLayer bgId, } static void NamingScreen_SetPagePgPosVecs(VecFx32 *posVecs, GFBgLayer bgId) { - posVecs[bgId].x = 238; - posVecs[bgId].y = -80; + posVecs[bgId].x = 238; + posVecs[bgId].y = -80; posVecs[bgId ^ 1].x = -11; posVecs[bgId ^ 1].y = -80; } @@ -1400,8 +1400,8 @@ static void NamingScreen_MoveKeyboardCursor(NamingScreenAppData *data, int dpadM } u16 prevKey = data->keyboard[data->kbCursor.y][data->kbCursor.x]; - int newX = NamingScreen_WrapAroundWithinInterval(data->kbCursor.x + sDpadMovementCoordDeltas[dpadMovement][0], 0, 13); - int newY = NamingScreen_WrapAroundWithinInterval(data->kbCursor.y + sDpadMovementCoordDeltas[dpadMovement][1], 0, 6); + int newX = NamingScreen_WrapAroundWithinInterval(data->kbCursor.x + sDpadMovementCoordDeltas[dpadMovement][0], 0, 13); + int newY = NamingScreen_WrapAroundWithinInterval(data->kbCursor.y + sDpadMovementCoordDeltas[dpadMovement][1], 0, 6); while (data->keyboard[newY][newX] == NAME_SCREEN_CONTROL_SKIP || (data->keyboard[newY][newX] == prevKey && data->keyboard[newY][newX] > NAME_SCREEN_BUTTON_START)) { if (data->kbCursor.prevY == 0 && data->keyboard[newY][newX] == NAME_SCREEN_CONTROL_SKIP && sDpadMovementCoordDeltas[dpadMovement][1] != 0) { newX = NamingScreen_WrapAroundWithinInterval(newX + data->kbCursor.deltaX, 0, 13); @@ -1415,8 +1415,8 @@ static void NamingScreen_MoveKeyboardCursor(NamingScreenAppData *data, int dpadM } static void NamingScreen_GetPlayerInput(NamingScreenAppData *data) { - int doUpdateCursor = 0; - int dpadMovement = 0; + int doUpdateCursor = 0; + int dpadMovement = 0; BOOL buttonInputIsTransition = FALSE; if (!Sprite_GetVisibleFlag(data->uiSprites[8])) { buttonInputIsTransition = TRUE; @@ -1529,7 +1529,7 @@ static void NamingScreen_BlitRawCharactersToWindow(Window *window, const u16 *ra } else { pmCharBuf[0] = rawChars[i]; pmCharBuf[1] = EOS; - width = FontID_FlatArray_GetWidth(0, pmCharBuf, 0); + width = FontID_FlatArray_GetWidth(0, pmCharBuf, 0); CopyU16ArrayToString(string, pmCharBuf); centerX = x + i * spacing + ((spacing - width) / 2); AddTextPrinterParameterizedWithColor(window, 0, string, centerX, y, textSpeed, color, NULL); @@ -1686,7 +1686,7 @@ static NamingScreenMainState NamingScreen_HandleCharacterInput(NamingScreenAppDa case NAME_SCREEN_BUTTON_PAGE_JP_UNUSED: if (data->pageNum != key - NAME_SCREEN_BUTTON_PAGE_UPPER) { data->pageSwitchState = NS_PAGESWITCH_STATE_DRAW_NEW_PAGE; - data->pageNum = key - NAME_SCREEN_BUTTON_PAGE_UPPER; + data->pageNum = key - NAME_SCREEN_BUTTON_PAGE_UPPER; NamingScreen_LoadKeyboardLayout(data->keyboard, data->pageNum); ++data->spriteAnimUpdateReq[key - NAME_SCREEN_BUTTON_PAGE_UPPER]; PlaySE(SEQ_SE_DP_SYU03); diff --git a/src/npc_trade.c b/src/npc_trade.c index 1733ad4b98..fb7ed6f3fb 100644 --- a/src/npc_trade.c +++ b/src/npc_trade.c @@ -30,10 +30,10 @@ NPCTradeAppData *NPCTradeApp_Init(HeapID heapId, NpcTradeNum tradeno) { ret = AllocFromHeap(heapId, sizeof(NPCTradeAppData)); memset(ret, 0, sizeof(NPCTradeAppData)); ret->trade_dat = GfGfxLoader_LoadFromNarc(NARC_a_1_1_2, tradeno, FALSE, heapId, FALSE); - ret->heapId = heapId; - ret->tradeno = tradeno; - ret->mon = AllocMonZeroed(heapId); - ret->profile = PlayerProfile_New(heapId); + ret->heapId = heapId; + ret->tradeno = tradeno; + ret->mon = AllocMonZeroed(heapId); + ret->profile = PlayerProfile_New(heapId); PlayerProfile_Init(ret->profile); { String *name; @@ -62,17 +62,17 @@ void NPCTrade_MakeAndGiveLoanMon(FieldSystem *fieldSystem, NpcTradeNum tradeno, Mail *mail; u8 mailno; - mon = AllocMonZeroed(HEAP_ID_FIELD); + mon = AllocMonZeroed(HEAP_ID_FIELD); trade_dat = GfGfxLoader_LoadFromNarc(NARC_a_1_1_2, tradeno, FALSE, HEAP_ID_FIELD, TRUE); _CreateTradeMon(mon, trade_dat, level, (NpcTradeNum)tradeno, mapno, 7, HEAP_ID_FIELD); UpdatePokedexWithReceivedSpecies(fieldSystem->saveData, mon); party = SaveArray_Party_Get(fieldSystem->saveData); Party_AddMon(party, mon); if (tradeno == NPC_TRADE_KENYA_SPEAROW) { - kenya = Party_GetMonByIndex(party, Party_GetCount(party) - 1); - name = _GetNpcTradeName(HEAP_ID_FIELD, NPC_TRADE_OT_NUM(tradeno)); + kenya = Party_GetMonByIndex(party, Party_GetCount(party) - 1); + name = _GetNpcTradeName(HEAP_ID_FIELD, NPC_TRADE_OT_NUM(tradeno)); mailno = ItemToMailId(trade_dat->heldItem); - mail = CreateKenyaMail(mon, mailno, trade_dat->gender, name, trade_dat->otId); + mail = CreateKenyaMail(mon, mailno, trade_dat->gender, name, trade_dat->otId); SetMonData(kenya, MON_DATA_MAIL_STRUCT, mail); String_Delete(name); FreeToHeap(mail); @@ -88,12 +88,12 @@ Mail *NPCTrade_MakeKenyaMail(void) { Mail *mail; u8 mailno; - mon = AllocMonZeroed(HEAP_ID_FIELD); + mon = AllocMonZeroed(HEAP_ID_FIELD); trade_dat = GfGfxLoader_LoadFromNarc(NARC_a_1_1_2, 7, FALSE, HEAP_ID_FIELD, TRUE); _CreateTradeMon(mon, trade_dat, 20, NPC_TRADE_KENYA_SPEAROW, MAP_R35R0101, 7, HEAP_ID_FIELD); - name = _GetNpcTradeName(HEAP_ID_FIELD, NPC_TRADE_OT_NUM(NPC_TRADE_KENYA_SPEAROW)); + name = _GetNpcTradeName(HEAP_ID_FIELD, NPC_TRADE_OT_NUM(NPC_TRADE_KENYA_SPEAROW)); mailno = ItemToMailId(trade_dat->heldItem); - mail = CreateKenyaMail(mon, mailno, trade_dat->gender, name, trade_dat->otId); + mail = CreateKenyaMail(mon, mailno, trade_dat->gender, name, trade_dat->otId); String_Delete(name); FreeToHeap(trade_dat); FreeToHeap(mon); @@ -108,7 +108,7 @@ int NPCTrade_CanGiveUpLoanMon(FieldSystem *fieldSystem, NpcTradeNum tradeno, u8 int i, n, party_count; party = SaveArray_Party_Get(fieldSystem->saveData); - mon = Party_GetMonByIndex(party, idx); + mon = Party_GetMonByIndex(party, idx); if (!MonIsInGameTradePoke(mon, tradeno)) { return 1; } @@ -118,7 +118,7 @@ int NPCTrade_CanGiveUpLoanMon(FieldSystem *fieldSystem, NpcTradeNum tradeno, u8 return 3; } - n = 0; + n = 0; party_count = Party_GetCount(party); for (i = 0; i < party_count; i++) { cur_poke = Party_GetMonByIndex(party, i); @@ -163,12 +163,12 @@ void NPCTrade_CreateTradeAnim(FieldSystem *fieldSystem, NPCTradeAppData *work, i _CreateTradeMon(work->mon, work->trade_dat, GetMonData(my_poke, MON_DATA_LEVEL, NULL), work->tradeno, fieldSystem->location->mapId, 1, work->heapId); CopyPokemonToPokemon(my_poke, my_mon_buf); CopyPokemonToPokemon(work->mon, trade_mon_buf); - anim_work->my_boxmon = Mon_GetBoxMon(my_mon_buf); - anim_work->trade_boxmon = Mon_GetBoxMon(trade_mon_buf); + anim_work->my_boxmon = Mon_GetBoxMon(my_mon_buf); + anim_work->trade_boxmon = Mon_GetBoxMon(trade_mon_buf); anim_work->trade_profile = work->profile; - anim_work->is_ingame = 1; - anim_work->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - time_of_day = Field_GetTimeOfDay(fieldSystem); + anim_work->is_ingame = 1; + anim_work->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + time_of_day = Field_GetTimeOfDay(fieldSystem); if (time_of_day == RTC_TIMEOFDAY_MORN || time_of_day == RTC_TIMEOFDAY_DAY) { anim_work->time_of_day = 0; } else if (time_of_day == RTC_TIMEOFDAY_EVE) { @@ -183,7 +183,7 @@ static String *_GetNpcTradeName(HeapID heapId, s32 msgno) { MsgData *msgData; msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0200_bin, heapId); - ret = NewString_ReadMsgData(msgData, msgno); + ret = NewString_ReadMsgData(msgData, msgno); DestroyMsgData(msgData); return ret; } @@ -197,7 +197,7 @@ static void _CreateTradeMon(Pokemon *mon, NPCTrade *trade_dat, u32 level, NpcTra CreateMon(mon, trade_dat->give_species, level, 32, TRUE, trade_dat->pid, OT_ID_PRESET, trade_dat->otId); heapId_2 = (int)heapId; - name = _GetNpcTradeName((HeapID)heapId_2, tradeno); + name = _GetNpcTradeName((HeapID)heapId_2, tradeno); SetMonData(mon, MON_DATA_NICKNAME_STRING, name); String_Delete(name); diff --git a/src/oaks_speech.c b/src/oaks_speech.c index 4926a9ba30..eea1b0feb4 100644 --- a/src/oaks_speech.c +++ b/src/oaks_speech.c @@ -34,98 +34,98 @@ FS_EXTERN_OVERLAY(OVY_36); // In Diamond and Pearl, the player pics were animated. // Vestiges of that system remain here. typedef enum OakSpeechPic { - OAK_SPEECH_PIC_NONE = 0, - OAK_SPEECH_PIC_OAK = 1, + OAK_SPEECH_PIC_NONE = 0, + OAK_SPEECH_PIC_OAK = 1, OAK_SPEECH_PIC_ETHAN = 2, - OAK_SPEECH_PIC_LYRA = 6, + OAK_SPEECH_PIC_LYRA = 6, } OakSpeechPic; typedef enum OakSpeechMainState { - OAK_SPEECH_MAIN_STATE_START_TUTORIAL_MUSIC = 0, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_TUTORIAL_MENU = 1, - OAK_SPEECH_MAIN_STATE_PRINT_TUTORIAL_MENU_MESSAGES = 2, - OAK_SPEECH_MAIN_STATE_TUTORIAL_MENU_HANDLE_INPUT = 3, - OAK_SPEECH_MAIN_STATE_FADE_OUT_TUTORIAL_MENU = 4, - OAK_SPEECH_MAIN_STATE_FADE_OUT_TUTORIAL_MENU_BGS = 5, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_TUTORIAL_MENU_BGS = 6, - OAK_SPEECH_MAIN_STATE_FADE_IN_TUTORIAL_MENU = 7, - OAK_SPEECH_MAIN_STATE_FADE_IN_CONTROL_INFO = 8, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_CONTROL_INFO = 9, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_1 = 11, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_2 = 12, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_3 = 13, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_4 = 14, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_5 = 15, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_6 = 16, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_7 = 17, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_8 = 18, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_9 = 19, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_10 = 20, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_11 = 21, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_23 = 22, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_ASK_UNDERSTOOD = 23, + OAK_SPEECH_MAIN_STATE_START_TUTORIAL_MUSIC = 0, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_TUTORIAL_MENU = 1, + OAK_SPEECH_MAIN_STATE_PRINT_TUTORIAL_MENU_MESSAGES = 2, + OAK_SPEECH_MAIN_STATE_TUTORIAL_MENU_HANDLE_INPUT = 3, + OAK_SPEECH_MAIN_STATE_FADE_OUT_TUTORIAL_MENU = 4, + OAK_SPEECH_MAIN_STATE_FADE_OUT_TUTORIAL_MENU_BGS = 5, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_TUTORIAL_MENU_BGS = 6, + OAK_SPEECH_MAIN_STATE_FADE_IN_TUTORIAL_MENU = 7, + OAK_SPEECH_MAIN_STATE_FADE_IN_CONTROL_INFO = 8, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_CONTROL_INFO = 9, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_1 = 11, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_2 = 12, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_3 = 13, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_4 = 14, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_5 = 15, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_6 = 16, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_7 = 17, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_8 = 18, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_9 = 19, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_10 = 20, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_11 = 21, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_23 = 22, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_ASK_UNDERSTOOD = 23, OAK_SPEECH_MAIN_STATE_CONTROL_INFO_ASK_UNDERSTOOD_HANDLE_YESNO = 24, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_UNDERSTOOD_YES = 27, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_UNDERSTOOD_YES_WAIT_FADE = 28, - OAK_SPEECH_MAIN_STATE_CONTROL_INFO_UNDERSTOOD_NO = 29, - OAK_SPEECH_MAIN_STATE_FADE_IN_ADVENTURE_INFO = 34, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_ADVENTURE_INFO = 35, - OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_1 = 36, - OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_2 = 37, - OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_3 = 38, - OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_4 = 39, - OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_5 = 40, - OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_6 = 41, - OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_FADE_OUT = 42, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_ADVENTURE_INFO = 43, - OAK_SPEECH_MAIN_STATE_NO_INFO_NEEDED_FADE_IN = 44, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_NO_INFO_NEEDED = 45, - OAK_SPEECH_MAIN_STATE_PRINT_TIME_OF_DAY_MSG = 46, - OAK_SPEECH_MAIN_STATE_SHOW_OAK = 47, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_OAK = 48, - OAK_SPEECH_MAIN_STATE_WELCOME_TO_WORLD = 49, - OAK_SPEECH_MAIN_STATE_SLIDE_OAK_RIGHT = 50, - OAK_SPEECH_MAIN_STATE_THIS_WORLD_IS_INHABITED = 51, - OAK_SPEECH_MAIN_STATE_BALL_OPENING_FLASH = 52, - OAK_SPEECH_MAIN_STATE_APPEAR_MARILL = 53, - OAK_SPEECH_MAIN_STATE_MARILL_CRY = 54, - OAK_SPEECH_MAIN_STATE_WAIT_MARILL_CRY = 55, - OAK_SPEECH_MAIN_STATE_WE_LIVE_ALONGSIDE = 56, - OAK_SPEECH_MAIN_STATE_HIDE_MARILL = 57, - OAK_SPEECH_MAIN_STATE_WAIT_AFTER_HIDE_MARILL = 58, - OAK_SPEECH_MAIN_STATE_SLIDE_OAK_LEFT = 59, - OAK_SPEECH_MAIN_STATE_TELL_ME_ABOUT_YOURSELF = 60, - OAK_SPEECH_MAIN_STATE_ARE_YOU_A_GENDER = 61, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_TO_ASK_GENDER = 62, - OAK_SPEECH_MAIN_STATE_SETUP_GENDER_SELECT_MENU = 63, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_GENDER_SELECT_MENU = 64, - OAK_SPEECH_MAIN_STATE_GENDER_SELECT_MENU_HANDLE_INPUT = 65, - OAK_SPEECH_MAIN_STATE_PREPARE_ASK_CONFIRM_GENDER = 66, - OAK_SPEECH_MAIN_STATE_ASK_CONFIRM_GENDER = 67, - OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_INIT_MENU = 68, - OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_HANDLE_INPUT = 69, - OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_HANDLE_RESULT = 70, - OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_NO_WAIT_FADE_OUT = 71, - OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_NO_WAIT_FADE_IN = 72, - OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YES = 93, - OAK_SPEECH_MAIN_STATE_PROMPT_NAME_DELAY_BEFORE = 94, - OAK_SPEECH_MAIN_STATE_PROMPT_NAME_LAUNCH_NAMING_SCREEN = 95, - OAK_SPEECH_MAIN_STATE_PROMPT_NAME_RESTORE_GRAPHICS_AFTER = 96, - OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YESNO_INIT_MENU = 97, - OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YESNO_HANDLE_INPUT = 98, - OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YESNO_HANDLE_RESULT = 99, - OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YES = 100, - OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YES_WAIT_FADE_OUT = 101, - OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YES_WAIT_FADE_IN = 102, - OAK_SPEECH_MAIN_STATE_YOUR_ADVENTURE_UNFOLDS = 103, - OAK_SPEECH_MAIN_STATE_FADE_OUT_FROM_LAST_OAK_MESSAGE = 110, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_FROM_LAST_OAK_MESSAGE = 111, - OAK_SPEECH_MAIN_STATE_FADE_IN_TO_SHRINK_ANIM = 120, - OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_TO_SHRINK_ANIM = 121, - OAK_SPEECH_MAIN_STATE_NOP_BEFORE_SHRINK_ANIM = 123, - OAK_SPEECH_MAIN_STATE_INIT_SHRINK_ANIM_STATE = 124, - OAK_SPEECH_MAIN_STATE_DELAY_BEFORE_SHRINK_ANIM = 125, - OAK_SPEECH_MAIN_STATE_RUN_SHRINK_ANIM = 126, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_UNDERSTOOD_YES = 27, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_UNDERSTOOD_YES_WAIT_FADE = 28, + OAK_SPEECH_MAIN_STATE_CONTROL_INFO_UNDERSTOOD_NO = 29, + OAK_SPEECH_MAIN_STATE_FADE_IN_ADVENTURE_INFO = 34, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_ADVENTURE_INFO = 35, + OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_1 = 36, + OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_2 = 37, + OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_3 = 38, + OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_4 = 39, + OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_5 = 40, + OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_6 = 41, + OAK_SPEECH_MAIN_STATE_ADVENTURE_INFO_FADE_OUT = 42, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_ADVENTURE_INFO = 43, + OAK_SPEECH_MAIN_STATE_NO_INFO_NEEDED_FADE_IN = 44, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_NO_INFO_NEEDED = 45, + OAK_SPEECH_MAIN_STATE_PRINT_TIME_OF_DAY_MSG = 46, + OAK_SPEECH_MAIN_STATE_SHOW_OAK = 47, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_OAK = 48, + OAK_SPEECH_MAIN_STATE_WELCOME_TO_WORLD = 49, + OAK_SPEECH_MAIN_STATE_SLIDE_OAK_RIGHT = 50, + OAK_SPEECH_MAIN_STATE_THIS_WORLD_IS_INHABITED = 51, + OAK_SPEECH_MAIN_STATE_BALL_OPENING_FLASH = 52, + OAK_SPEECH_MAIN_STATE_APPEAR_MARILL = 53, + OAK_SPEECH_MAIN_STATE_MARILL_CRY = 54, + OAK_SPEECH_MAIN_STATE_WAIT_MARILL_CRY = 55, + OAK_SPEECH_MAIN_STATE_WE_LIVE_ALONGSIDE = 56, + OAK_SPEECH_MAIN_STATE_HIDE_MARILL = 57, + OAK_SPEECH_MAIN_STATE_WAIT_AFTER_HIDE_MARILL = 58, + OAK_SPEECH_MAIN_STATE_SLIDE_OAK_LEFT = 59, + OAK_SPEECH_MAIN_STATE_TELL_ME_ABOUT_YOURSELF = 60, + OAK_SPEECH_MAIN_STATE_ARE_YOU_A_GENDER = 61, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_TO_ASK_GENDER = 62, + OAK_SPEECH_MAIN_STATE_SETUP_GENDER_SELECT_MENU = 63, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_GENDER_SELECT_MENU = 64, + OAK_SPEECH_MAIN_STATE_GENDER_SELECT_MENU_HANDLE_INPUT = 65, + OAK_SPEECH_MAIN_STATE_PREPARE_ASK_CONFIRM_GENDER = 66, + OAK_SPEECH_MAIN_STATE_ASK_CONFIRM_GENDER = 67, + OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_INIT_MENU = 68, + OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_HANDLE_INPUT = 69, + OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_HANDLE_RESULT = 70, + OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_NO_WAIT_FADE_OUT = 71, + OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_NO_WAIT_FADE_IN = 72, + OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YES = 93, + OAK_SPEECH_MAIN_STATE_PROMPT_NAME_DELAY_BEFORE = 94, + OAK_SPEECH_MAIN_STATE_PROMPT_NAME_LAUNCH_NAMING_SCREEN = 95, + OAK_SPEECH_MAIN_STATE_PROMPT_NAME_RESTORE_GRAPHICS_AFTER = 96, + OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YESNO_INIT_MENU = 97, + OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YESNO_HANDLE_INPUT = 98, + OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YESNO_HANDLE_RESULT = 99, + OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YES = 100, + OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YES_WAIT_FADE_OUT = 101, + OAK_SPEECH_MAIN_STATE_CONFIRM_NAME_YES_WAIT_FADE_IN = 102, + OAK_SPEECH_MAIN_STATE_YOUR_ADVENTURE_UNFOLDS = 103, + OAK_SPEECH_MAIN_STATE_FADE_OUT_FROM_LAST_OAK_MESSAGE = 110, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_OUT_FROM_LAST_OAK_MESSAGE = 111, + OAK_SPEECH_MAIN_STATE_FADE_IN_TO_SHRINK_ANIM = 120, + OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_TO_SHRINK_ANIM = 121, + OAK_SPEECH_MAIN_STATE_NOP_BEFORE_SHRINK_ANIM = 123, + OAK_SPEECH_MAIN_STATE_INIT_SHRINK_ANIM_STATE = 124, + OAK_SPEECH_MAIN_STATE_DELAY_BEFORE_SHRINK_ANIM = 125, + OAK_SPEECH_MAIN_STATE_RUN_SHRINK_ANIM = 126, } OakSpeechMainState; static void OakSpeech_VBlankCB(void *cbArg); @@ -181,32 +181,32 @@ static const int ov53_021E84FC[1] = { }; static const WindowTemplate ov53_021E8518 = { - .bgId = GF_BG_LYR_SUB_0, - .left = 24, - .top = 20, - .width = 7, - .height = 2, - .palette = 14, + .bgId = GF_BG_LYR_SUB_0, + .left = 24, + .top = 20, + .width = 7, + .height = 2, + .palette = 14, .baseTile = 0x0A3, }; static const WindowTemplate sWindowTemplate_DialogMsg = { - .bgId = GF_BG_LYR_MAIN_0, - .left = 2, - .top = 19, - .width = 27, - .height = 4, - .palette = 6, + .bgId = GF_BG_LYR_MAIN_0, + .left = 2, + .top = 19, + .width = 27, + .height = 4, + .palette = 6, .baseTile = 0x36D, }; static const WindowTemplate sFullScreenMsgWindowTemplate_copy2 = { - .bgId = GF_BG_LYR_MAIN_0, - .left = 4, - .top = 0, - .width = 24, - .height = 24, - .palette = 5, + .bgId = GF_BG_LYR_MAIN_0, + .left = 4, + .top = 0, + .width = 24, + .height = 24, + .palette = 5, .baseTile = 0x12D, }; @@ -232,12 +232,12 @@ static const TouchscreenHitbox ov53_021E8510[] = { }; static const WindowTemplate sFullScreenMsgWindowTemplate_copy1 = { - .bgId = GF_BG_LYR_MAIN_0, - .left = 4, - .top = 0, - .width = 24, - .height = 24, - .palette = 5, + .bgId = GF_BG_LYR_MAIN_0, + .left = 4, + .top = 0, + .width = 24, + .height = 24, + .palette = 5, .baseTile = 0x12D, }; @@ -349,33 +349,33 @@ static const int sPlayerPicShrinkGfx_Female[6] = { }; static const BgTemplate sBgTemplate_Main = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; static const BgTemplate sBgTemplate_Sub = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; static const int sMultichoiceMenuBgCursorCoords[][3] = { @@ -547,17 +547,17 @@ BOOL OakSpeech_Init(OVY_MANAGER *ovyMan, int *pState) { CreateHeap(HEAP_ID_3, HEAP_ID_OAKS_SPEECH, 0x40000); OakSpeechData *data = OverlayManager_CreateAndGetData(ovyMan, sizeof(OakSpeechData), HEAP_ID_OAKS_SPEECH); memset(data, 0, sizeof(OakSpeechData)); - data->heapId = HEAP_ID_OAKS_SPEECH; + data->heapId = HEAP_ID_OAKS_SPEECH; UnkStruct_02111868_sub *mainOvyArgs = OverlayManager_GetArgs(ovyMan); - data->saveData = mainOvyArgs->saveData; - data->options = Save_PlayerData_GetOptionsAddr(data->saveData); - data->state = OAK_SPEECH_MAIN_STATE_START_TUTORIAL_MUSIC; - data->unk_010 = 0; - data->overlayManager = NULL; - data->namingScreenArgs_Player = NamingScreen_CreateArgs(HEAP_ID_OAKS_SPEECH, NAME_SCREEN_PLAYER, 0, PLAYER_NAME_LENGTH, data->options, NULL); - data->namingScreenArgs_Rival = NamingScreen_CreateArgs(HEAP_ID_OAKS_SPEECH, NAME_SCREEN_RIVAL, 0, PLAYER_NAME_LENGTH, data->options, NULL); - data->lastChosenGender = 0; - data->frameDelayCounter = 0; + data->saveData = mainOvyArgs->saveData; + data->options = Save_PlayerData_GetOptionsAddr(data->saveData); + data->state = OAK_SPEECH_MAIN_STATE_START_TUTORIAL_MUSIC; + data->unk_010 = 0; + data->overlayManager = NULL; + data->namingScreenArgs_Player = NamingScreen_CreateArgs(HEAP_ID_OAKS_SPEECH, NAME_SCREEN_PLAYER, 0, PLAYER_NAME_LENGTH, data->options, NULL); + data->namingScreenArgs_Rival = NamingScreen_CreateArgs(HEAP_ID_OAKS_SPEECH, NAME_SCREEN_RIVAL, 0, PLAYER_NAME_LENGTH, data->options, NULL); + data->lastChosenGender = 0; + data->frameDelayCounter = 0; TextFlags_SetCanTouchSpeedUpPrint(FALSE); FontID_Alloc(4, data->heapId); return TRUE; @@ -565,7 +565,7 @@ BOOL OakSpeech_Init(OVY_MANAGER *ovyMan, int *pState) { BOOL OakSpeech_Main(OVY_MANAGER *ovyMan, int *pState) { OakSpeechData *data = OverlayManager_GetData(ovyMan); - BOOL ret = FALSE; + BOOL ret = FALSE; switch (*pState) { case 0: sub_0200FBF4(PM_LCD_TOP, RGB_BLACK); @@ -622,7 +622,7 @@ BOOL OakSpeech_Main(OVY_MANAGER *ovyMan, int *pState) { if (OverlayManager_Run(data->overlayManager) == TRUE) { OverlayManager_Delete(data->overlayManager); data->overlayManager = NULL; - *pState = 5; + *pState = 5; } break; case 5: @@ -638,7 +638,7 @@ BOOL OakSpeech_Main(OVY_MANAGER *ovyMan, int *pState) { BOOL OakSpeech_Exit(OVY_MANAGER *ovyMan, int *pState) { OakSpeechData *data = OverlayManager_GetData(ovyMan); - HeapID heapId = data->heapId; + HeapID heapId = data->heapId; FontID_Release(4); PlayerName_StringToFlat(Save_PlayerData_GetProfileAddr(data->saveData), data->namingScreenArgs_Player->nameInputString); PlayerProfile_SetTrainerGender(Save_PlayerData_GetProfileAddr(data->saveData), data->namingScreenArgs_Player->playerGenderOrMonSpecies); @@ -685,22 +685,22 @@ static void OakSpeech_InitBgs(OakSpeechData *data) { BgTemplate bgTemplate = sBgTemplate_Main; bgTemplate.screenBase = GX_BG_SCRBASE_0x7800; - bgTemplate.charBase = GX_BG_CHARBASE_0x18000; + bgTemplate.charBase = GX_BG_CHARBASE_0x18000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_MAIN_0, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_0); bgTemplate.screenBase = GX_BG_SCRBASE_0x7000; - bgTemplate.charBase = GX_BG_CHARBASE_0x14000; + bgTemplate.charBase = GX_BG_CHARBASE_0x14000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_MAIN_1, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_1); bgTemplate.screenBase = GX_BG_SCRBASE_0x6800; - bgTemplate.charBase = GX_BG_CHARBASE_0x10000; + bgTemplate.charBase = GX_BG_CHARBASE_0x10000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_MAIN_2, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_2); bgTemplate.screenBase = GX_BG_SCRBASE_0x6000; - bgTemplate.charBase = GX_BG_CHARBASE_0x0c000; + bgTemplate.charBase = GX_BG_CHARBASE_0x0c000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_MAIN_3, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_3); @@ -713,22 +713,22 @@ static void OakSpeech_InitBgs(OakSpeechData *data) { BgTemplate bgTemplate = sBgTemplate_Sub; bgTemplate.screenBase = GX_BG_SCRBASE_0x7800; - bgTemplate.charBase = GX_BG_CHARBASE_0x18000; + bgTemplate.charBase = GX_BG_CHARBASE_0x18000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_SUB_0, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_0); bgTemplate.screenBase = GX_BG_SCRBASE_0x7000; - bgTemplate.charBase = GX_BG_CHARBASE_0x14000; + bgTemplate.charBase = GX_BG_CHARBASE_0x14000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_SUB_1, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_1); bgTemplate.screenBase = GX_BG_SCRBASE_0x6800; - bgTemplate.charBase = GX_BG_CHARBASE_0x10000; + bgTemplate.charBase = GX_BG_CHARBASE_0x10000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_SUB_2, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_2); bgTemplate.screenBase = GX_BG_SCRBASE_0x6000; - bgTemplate.charBase = GX_BG_CHARBASE_0x0c000; + bgTemplate.charBase = GX_BG_CHARBASE_0x0c000; InitBgFromTemplate(data->bgConfig, GF_BG_LYR_SUB_3, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_3); @@ -772,11 +772,11 @@ static void OakSpeech_CleanupBgs(OakSpeechData *data) { static void OakSpeech_InitMsgPrinter(OakSpeechData *data) { data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0219_bin, data->heapId); ResetAllTextPrinters(); - data->unk_114 = sub_020163E0(NULL, PM_LCD_TOP, 6, data->heapId); - data->msgFormat = MessageFormat_New(data->heapId); - data->printDialogMsgState = 0; + data->unk_114 = sub_020163E0(NULL, PM_LCD_TOP, 6, data->heapId); + data->msgFormat = MessageFormat_New(data->heapId); + data->printDialogMsgState = 0; data->printAndFadeFullScreenTextState = 0; - data->unk_080 = 0; + data->unk_080 = 0; } static void OakSpeech_CleanupMsgPrinter(OakSpeechData *data) { @@ -793,35 +793,35 @@ static BOOL OakSpeech_BlendLayer(OakSpeechData *data, int param, BOOL isFadeOut) switch (param) { default: case GF_BG_LYR_MAIN_0: - plane = GX_BLEND_PLANEMASK_BG0; + plane = GX_BLEND_PLANEMASK_BG0; screen = PM_LCD_TOP; break; case GF_BG_LYR_MAIN_1: - plane = GX_BLEND_PLANEMASK_BG1; + plane = GX_BLEND_PLANEMASK_BG1; screen = PM_LCD_TOP; break; case GF_BG_LYR_MAIN_2: - plane = GX_BLEND_PLANEMASK_BG2; + plane = GX_BLEND_PLANEMASK_BG2; screen = PM_LCD_TOP; break; case GF_BG_LYR_SUB_0: - plane = GX_BLEND_PLANEMASK_BG0; + plane = GX_BLEND_PLANEMASK_BG0; screen = PM_LCD_BOTTOM; break; case GF_BG_LYR_SUB_1: - plane = GX_BLEND_PLANEMASK_BG1; + plane = GX_BLEND_PLANEMASK_BG1; screen = PM_LCD_BOTTOM; break; case GF_BG_LYR_SUB_2: - plane = GX_BLEND_PLANEMASK_BG2; + plane = GX_BLEND_PLANEMASK_BG2; screen = PM_LCD_BOTTOM; break; case 101: // GF_BG_LYR_MAIN_OBJ - plane = GX_BLEND_PLANEMASK_OBJ; + plane = GX_BLEND_PLANEMASK_OBJ; screen = PM_LCD_TOP; break; case 102: // GF_BG_LYR_SUB_OBJ - plane = GX_BLEND_PLANEMASK_OBJ; + plane = GX_BLEND_PLANEMASK_OBJ; screen = PM_LCD_BOTTOM; break; } @@ -829,8 +829,8 @@ static BOOL OakSpeech_BlendLayer(OakSpeechData *data, int param, BOOL isFadeOut) switch (data->layerBlendState) { case 0: if (!isFadeOut) { - data->layerBlendEv1 = 0; - data->layerBlendEv2 = 16; + data->layerBlendEv1 = 0; + data->layerBlendEv2 = 16; data->layerBlendState = 1; if (screen == 0) { G2_SetBlendAlpha( @@ -853,8 +853,8 @@ static BOOL OakSpeech_BlendLayer(OakSpeechData *data, int param, BOOL isFadeOut) ToggleBgLayer(param, GF_PLANE_TOGGLE_ON); } } else { - data->layerBlendEv1 = 16; - data->layerBlendEv2 = 0; + data->layerBlendEv1 = 16; + data->layerBlendEv2 = 0; data->layerBlendState = 2; } break; @@ -910,7 +910,7 @@ static BOOL OakSpeech_BlendLayer(OakSpeechData *data, int param, BOOL isFadeOut) case 3: G2_BlendNone(); G2S_BlendNone(); - ret = TRUE; + ret = TRUE; data->layerBlendState = 0; break; } @@ -953,7 +953,7 @@ static BOOL OakSpeech_PrintDialogMsg(OakSpeechData *data, int msgNum, int waitBu StringExpandPlaceholders(data->msgFormat, data->string, temp); String_Delete(temp); - data->textPrinter = AddTextPrinterParameterized(&data->dialogWindow, 1, data->string, 0, 0, Options_GetTextFrameDelay(data->options), NULL); + data->textPrinter = AddTextPrinterParameterized(&data->dialogWindow, 1, data->string, 0, 0, Options_GetTextFrameDelay(data->options), NULL); data->printDialogMsgState = 1; break; } @@ -1000,8 +1000,8 @@ static BOOL OakSpeech_PrintAndFadeFullScreenText(OakSpeechData *data, int msgNum } switch (kind) { case 1: - windowTemplate = sFullScreenMsgWindowTemplate_copy1; - windowTemplate.top = y; + windowTemplate = sFullScreenMsgWindowTemplate_copy1; + windowTemplate.top = y; windowTemplate.height = height; AddWindow(data->bgConfig, &data->fullScreenMsgWindow, &windowTemplate); FillWindowPixelRect(&data->fullScreenMsgWindow, 0, 0, 0, 0xC0, 0xC0); @@ -1010,8 +1010,8 @@ static BOOL OakSpeech_PrintAndFadeFullScreenText(OakSpeechData *data, int msgNum case 0: case 2: case 3: - windowTemplate = sFullScreenMsgWindowTemplate_copy2; - windowTemplate.top = y; + windowTemplate = sFullScreenMsgWindowTemplate_copy2; + windowTemplate.top = y; windowTemplate.height = height; if (kind == 3) { windowTemplate.left += 4; @@ -1033,7 +1033,7 @@ static BOOL OakSpeech_PrintAndFadeFullScreenText(OakSpeechData *data, int msgNum data->printAndFadeFullScreenTextState = 3; if (kind == 2) { data->printAndFadeFullScreenTextState = 4; - ret = TRUE; + ret = TRUE; } } break; @@ -1053,7 +1053,7 @@ static BOOL OakSpeech_PrintAndFadeFullScreenText(OakSpeechData *data, int msgNum RemoveWindow(&data->fullScreenMsgWindow); BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_MAIN_0); data->printAndFadeFullScreenTextState = 0; - ret = TRUE; + ret = TRUE; break; } @@ -1067,50 +1067,50 @@ static BOOL OakSpeech_PrintAndFadeCenteredFullScreenText(OakSpeechData *data, in static const WindowTemplate sMultichoiceMenuButtonWindowTemplates[][3] = { { { - .bgId = GF_BG_LYR_SUB_0, - .left = 2, - .top = 6, - .width = 13, - .height = 3, - .palette = 14, + .bgId = GF_BG_LYR_SUB_0, + .left = 2, + .top = 6, + .width = 13, + .height = 3, + .palette = 14, .baseTile = 0x001, }, { - .bgId = GF_BG_LYR_SUB_0, - .left = 2, - .top = 16, - .width = 13, - .height = 3, - .palette = 14, + .bgId = GF_BG_LYR_SUB_0, + .left = 2, + .top = 16, + .width = 13, + .height = 3, + .palette = 14, .baseTile = 0x036, }, }, { { - .bgId = GF_BG_LYR_SUB_0, - .left = 7, - .top = 3, - .width = 18, - .height = 3, - .palette = 14, + .bgId = GF_BG_LYR_SUB_0, + .left = 7, + .top = 3, + .width = 18, + .height = 3, + .palette = 14, .baseTile = 0x001, }, { - .bgId = GF_BG_LYR_SUB_0, - .left = 7, - .top = 10, - .width = 18, - .height = 3, - .palette = 14, + .bgId = GF_BG_LYR_SUB_0, + .left = 7, + .top = 10, + .width = 18, + .height = 3, + .palette = 14, .baseTile = 0x037, }, { - .bgId = GF_BG_LYR_SUB_0, - .left = 7, - .top = 17, - .width = 18, - .height = 3, - .palette = 14, + .bgId = GF_BG_LYR_SUB_0, + .left = 7, + .top = 17, + .width = 18, + .height = 3, + .palette = 14, .baseTile = 0x06D, }, }, @@ -1164,15 +1164,15 @@ static void OakSpeech_LoadButtonTutorialGfx(OakSpeechData *data) { GfGfxLoader_LoadCharData(NARC_demo_intro_intro, NARC_intro_intro_00000032_NCGR, data->bgConfig, GF_BG_LYR_SUB_3, 0, 0, FALSE, data->heapId); if (gGameVersion == VERSION_HEARTGOLD) { plttId_Main = NARC_intro_intro_00000001_NCLR; - plttId_Sub = NARC_intro_intro_00000030_NCLR; + plttId_Sub = NARC_intro_intro_00000030_NCLR; } else { plttId_Main = NARC_intro_intro_00000002_NCLR; - plttId_Sub = NARC_intro_intro_00000031_NCLR; + plttId_Sub = NARC_intro_intro_00000031_NCLR; } GfGfxLoader_GXLoadPal(NARC_demo_intro_intro, plttId_Main, GF_PAL_LOCATION_MAIN_BG, (enum GFPalSlotOffset)0, 0x60, data->heapId); GfGfxLoader_GXLoadPal(NARC_demo_intro_intro, plttId_Sub, GF_PAL_LOCATION_SUB_BG, (enum GFPalSlotOffset)0, 0xA0, data->heapId); - plttData_raw = GfGfxLoader_GetPlttData(NARC_demo_intro_intro, plttId_Sub, &plttData, data->heapId); + plttData_raw = GfGfxLoader_GetPlttData(NARC_demo_intro_intro, plttId_Sub, &plttData, data->heapId); data->genderSelectFrameDefaultPalette = ((const u16 *)plttData->pRawData)[12]; FreeToHeap(plttData_raw); @@ -1249,19 +1249,19 @@ static void ov53_021E6824(OakSpeechData *data, int a1) { } static void OakSpeech_InitMultichoiceMenu(OakSpeechMultichoice *dest, int menuId) { - dest->cursorPos = 0; - dest->unk_0 = 0; - dest->numOptions = sMultichoiceMenuParam[menuId][1]; - dest->pressDelay = 0; - dest->flashDelay = 0; + dest->cursorPos = 0; + dest->unk_0 = 0; + dest->numOptions = sMultichoiceMenuParam[menuId][1]; + dest->pressDelay = 0; + dest->flashDelay = 0; dest->flashFramesPer = 16; - dest->inPadMode = 0; + dest->inPadMode = 0; } static void OakSpeech_InitMultichoiceMenuWithFrameFlash(OakSpeechData *data, int menuId) { - data->menuData.unk_0 = 0; - data->menuData.numOptions = sMultichoiceMenuParam[menuId][1]; - data->menuData.flashDelay = 0; + data->menuData.unk_0 = 0; + data->menuData.numOptions = sMultichoiceMenuParam[menuId][1]; + data->menuData.flashDelay = 0; data->menuData.flashFramesPer = 16; GfGfxLoader_LoadScrnData(NARC_demo_intro_intro, sMultichoiceMenuParam[menuId][0], data->bgConfig, GF_BG_LYR_SUB_1, 0, 0, FALSE, data->heapId); GfGfxLoader_LoadCharData(NARC_demo_intro_intro, NARC_intro_intro_00000042_NCGR, data->bgConfig, GF_BG_LYR_SUB_1, 0, 0, FALSE, data->heapId); @@ -1278,7 +1278,7 @@ static int OakSpeech_MultichoiceMenuHandleInputVertical(OakSpeechData *data, int ++data->menuData.pressDelay; if (data->menuData.pressDelay > 20) { data->menuData.pressDelay = 0; - ret = data->menuData.cursorPos; + ret = data->menuData.cursorPos; } } else if (gSystem.touchNew) { hitbox = TouchscreenHitbox_FindRectAtTouchNew(hitboxes[menuId]); @@ -1287,7 +1287,7 @@ static int OakSpeech_MultichoiceMenuHandleInputVertical(OakSpeechData *data, int ToggleBgLayer(GF_BG_LYR_SUB_1, GF_PLANE_TOGGLE_ON); data->menuData.cursorPos = hitbox; ScheduleSetBgPosText(data->bgConfig, GF_BG_LYR_SUB_1, BG_POS_OP_SET_Y, sMultichoiceMenuBgCursorCoords[menuId][data->menuData.cursorPos]); - data->menuData.pressDelay = 1; + data->menuData.pressDelay = 1; data->menuData.flashFramesPer = 2; PlaySE(SEQ_SE_DP_SELECT); } @@ -1311,12 +1311,12 @@ static int OakSpeech_MultichoiceMenuHandleInputVertical(OakSpeechData *data, int PlaySE(SEQ_SE_DP_SELECT); } } else if (gSystem.newKeys & PAD_BUTTON_A) { - data->menuData.pressDelay = 1; + data->menuData.pressDelay = 1; data->menuData.flashFramesPer = 2; PlaySE(SEQ_SE_DP_SELECT); } else if (gSystem.newKeys & PAD_BUTTON_B) { - data->menuData.cursorPos = data->menuData.numOptions - 1; - data->menuData.pressDelay = 1; + data->menuData.cursorPos = data->menuData.numOptions - 1; + data->menuData.pressDelay = 1; data->menuData.flashFramesPer = 2; ScheduleSetBgPosText(data->bgConfig, GF_BG_LYR_SUB_1, BG_POS_OP_SET_Y, sMultichoiceMenuBgCursorCoords[menuId][data->menuData.cursorPos]); PlaySE(SEQ_SE_DP_SELECT); @@ -1401,13 +1401,13 @@ static BOOL OakSpeech_GenderSelectHandleInput(OakSpeechData *data) { if (gSystem.touchNew) { hitbox = TouchscreenHitbox_FindRectAtTouchNew(hitboxes); if (hitbox != -1) { - data->menuData.cursorPos = hitbox; - data->menuData.pressDelay = 1; + data->menuData.cursorPos = hitbox; + data->menuData.pressDelay = 1; data->menuData.flashFramesPer = 2; OakSpeech_BlinkHighlightedGenderFrame(data, 1); PlaySE(SEQ_SE_DP_SELECT); data->lastChosenGender = hitbox; - ret = TRUE; + ret = TRUE; } } else if (!data->menuData.inPadMode) { if (gSystem.newKeys & (PAD_BUTTON_A | PAD_KEY_LEFT | PAD_KEY_RIGHT)) { @@ -1428,12 +1428,12 @@ static BOOL OakSpeech_GenderSelectHandleInput(OakSpeechData *data) { PlaySE(SEQ_SE_DP_SELECT); } } else if (gSystem.newKeys & PAD_BUTTON_A) { - data->menuData.inPadMode = 0; - data->menuData.pressDelay = 1; + data->menuData.inPadMode = 0; + data->menuData.pressDelay = 1; data->menuData.flashFramesPer = 2; OakSpeech_BlinkHighlightedGenderFrame(data, 1); PlaySE(SEQ_SE_DP_SELECT); - ret = TRUE; + ret = TRUE; data->lastChosenGender = data->menuData.cursorPos; } } @@ -1442,7 +1442,7 @@ static BOOL OakSpeech_GenderSelectHandleInput(OakSpeechData *data) { } static void OakSpeech_InitPlayerPicShrinkAnim(OakSpeechData *data) { - data->playerPicShrinkAnimStep = 0; + data->playerPicShrinkAnimStep = 0; data->playerPicShrinkAnimDelay = 0; } @@ -1498,18 +1498,18 @@ static BOOL OakSpeech_TranslateOakPicHorizontally(OakSpeechData *data, int bgId, switch (data->oakPicHTranslateState) { case 0: data->oakPicHTranslateState = 1; - data->oakPicHTranslatePos = sOakPicTranslationParam[direction][0]; + data->oakPicHTranslatePos = sOakPicTranslationParam[direction][0]; break; case 1: data->oakPicHTranslatePos += sOakPicTranslationParam[direction][2]; if (sOakPicTranslationParam[direction][2] > 0) { if (data->oakPicHTranslatePos >= sOakPicTranslationParam[direction][1]) { - data->oakPicHTranslatePos = sOakPicTranslationParam[direction][1]; + data->oakPicHTranslatePos = sOakPicTranslationParam[direction][1]; data->oakPicHTranslateState = 2; } } else { if (data->oakPicHTranslatePos <= sOakPicTranslationParam[direction][1]) { - data->oakPicHTranslatePos = sOakPicTranslationParam[direction][1]; + data->oakPicHTranslatePos = sOakPicTranslationParam[direction][1]; data->oakPicHTranslateState = 2; } } @@ -1788,7 +1788,7 @@ static BOOL OakSpeech_DoMainTask(OakSpeechData *data) { break; case OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_NO_INFO_NEEDED: if (IsPaletteFadeFinished() == TRUE && OakSpeech_WaitFrames(data, 40) == TRUE) { - data->state = OAK_SPEECH_MAIN_STATE_PRINT_TIME_OF_DAY_MSG; + data->state = OAK_SPEECH_MAIN_STATE_PRINT_TIME_OF_DAY_MSG; data->queuedMsgId = OakSpeech_GetTimeOfDayIntroMsg(); } break; @@ -1838,7 +1838,7 @@ static BOOL OakSpeech_DoMainTask(OakSpeechData *data) { StartBrightnessTransition(4, 0, 16, (GXBlendPlaneMask)(GX_BLEND_PLANEMASK_BG0 | GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG3 | GX_BLEND_PLANEMASK_OBJ), SCREEN_MASK_SUB); PlaySE(SEQ_SE_DP_BOWA2); data->playerPicShrinkAnimStep = 0; - data->state = OAK_SPEECH_MAIN_STATE_APPEAR_MARILL; + data->state = OAK_SPEECH_MAIN_STATE_APPEAR_MARILL; } break; case OAK_SPEECH_MAIN_STATE_APPEAR_MARILL: @@ -1888,8 +1888,8 @@ static BOOL OakSpeech_DoMainTask(OakSpeechData *data) { break; case OAK_SPEECH_MAIN_STATE_TELL_ME_ABOUT_YOURSELF: if (OakSpeech_PrintDialogMsg(data, msg_0219_00036, 1) == TRUE) { - data->state = OAK_SPEECH_MAIN_STATE_ARE_YOU_A_GENDER; - data->menuData.cursorPos = 0; + data->state = OAK_SPEECH_MAIN_STATE_ARE_YOU_A_GENDER; + data->menuData.cursorPos = 0; data->menuData.numOptions = 2; } break; @@ -1916,12 +1916,12 @@ static BOOL OakSpeech_DoMainTask(OakSpeechData *data) { case OAK_SPEECH_MAIN_STATE_WAIT_FADE_IN_GENDER_SELECT_MENU: if (IsPaletteFadeFinished() == TRUE) { data->menuData.cursorPos = data->lastChosenGender; - data->state = OAK_SPEECH_MAIN_STATE_GENDER_SELECT_MENU_HANDLE_INPUT; + data->state = OAK_SPEECH_MAIN_STATE_GENDER_SELECT_MENU_HANDLE_INPUT; } break; case OAK_SPEECH_MAIN_STATE_GENDER_SELECT_MENU_HANDLE_INPUT: if (OakSpeech_GenderSelectHandleInput(data)) { - data->state = OAK_SPEECH_MAIN_STATE_PREPARE_ASK_CONFIRM_GENDER; + data->state = OAK_SPEECH_MAIN_STATE_PREPARE_ASK_CONFIRM_GENDER; data->playerGender = data->menuData.cursorPos; } break; @@ -1947,7 +1947,7 @@ static BOOL OakSpeech_DoMainTask(OakSpeechData *data) { OakSpeech_InitMultichoiceMenu(&data->menuData, 1); ov53_021E6824(data, 1); OakSpeech_PrintMultichoiceMenu(data, msg_0219_00047, msg_0219_00048, 0, 2); - data->state = OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_HANDLE_INPUT; + data->state = OAK_SPEECH_MAIN_STATE_CONFIRM_GENDER_YESNO_HANDLE_INPUT; data->menuData.cursorPos = 0; break; @@ -2009,8 +2009,8 @@ static BOOL OakSpeech_DoMainTask(OakSpeechData *data) { case OAK_SPEECH_MAIN_STATE_PROMPT_NAME_LAUNCH_NAMING_SCREEN: String_SetEmpty(data->namingScreenArgs_Player->nameInputString); data->namingScreenArgs_Player->playerGenderOrMonSpecies = data->playerGender; - data->overlayManager = OverlayManager_New(&gOverlayTemplate_NamingScreen, data->namingScreenArgs_Player, data->heapId); - data->state = OAK_SPEECH_MAIN_STATE_PROMPT_NAME_RESTORE_GRAPHICS_AFTER; + data->overlayManager = OverlayManager_New(&gOverlayTemplate_NamingScreen, data->namingScreenArgs_Player, data->heapId); + data->state = OAK_SPEECH_MAIN_STATE_PROMPT_NAME_RESTORE_GRAPHICS_AFTER; break; case OAK_SPEECH_MAIN_STATE_PROMPT_NAME_RESTORE_GRAPHICS_AFTER: diff --git a/src/oaks_speech_obj.c b/src/oaks_speech_obj.c index 7799f8fd4b..addb46f30f 100644 --- a/src/oaks_speech_obj.c +++ b/src/oaks_speech_obj.c @@ -8,87 +8,87 @@ static const UnkStruct_0200D2B4 sSpriteTemplates[] = { { .resourceSet = 0, - .x = 128, - .y = 50, - .z = 0, - .animSeqNo = 0, - .rotation = 2, - .palIndex = 1, + .x = 128, + .y = 50, + .z = 0, + .animSeqNo = 0, + .rotation = 2, + .palIndex = 1, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 1, - .x = 64, - .y = 104, - .z = 0, - .animSeqNo = 0, - .rotation = 0, - .palIndex = 0, + .x = 64, + .y = 104, + .z = 0, + .animSeqNo = 0, + .rotation = 0, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DSUB, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 2, - .x = 192, - .y = 104, - .z = 0, - .animSeqNo = 0, - .rotation = 1, - .palIndex = 1, + .x = 192, + .y = 104, + .z = 0, + .animSeqNo = 0, + .rotation = 1, + .palIndex = 1, .whichScreen = NNS_G2D_VRAM_TYPE_2DSUB, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 3, - .x = 256, - .y = 192, - .z = 0, - .animSeqNo = 0, - .rotation = 0, - .palIndex = 3, + .x = 256, + .y = 192, + .z = 0, + .animSeqNo = 0, + .rotation = 0, + .palIndex = 3, .whichScreen = NNS_G2D_VRAM_TYPE_2DSUB, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 4, - .x = 0, - .y = 0, - .z = 0, - .animSeqNo = 1, - .rotation = 0, - .palIndex = 4, + .x = 0, + .y = 0, + .z = 0, + .animSeqNo = 1, + .rotation = 0, + .palIndex = 4, .whichScreen = NNS_G2D_VRAM_TYPE_2DSUB, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 5, - .x = 160, - .y = 80, - .z = 0, - .animSeqNo = 0, - .rotation = 0, - .palIndex = 4, + .x = 160, + .y = 80, + .z = 0, + .animSeqNo = 0, + .rotation = 0, + .palIndex = 4, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, }; @@ -96,27 +96,27 @@ void OakSpeech_InitSpriteEngine(OakSpeechData *data) { GfGfx_EngineATogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); GfGfx_EngineBTogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); GF_CreateVramTransferManager(0x20, HEAP_ID_OAKS_SPEECH); - data->spriteRenderer = SpriteRenderer_Create(HEAP_ID_OAKS_SPEECH); + data->spriteRenderer = SpriteRenderer_Create(HEAP_ID_OAKS_SPEECH); data->spriteGfxHandler = SpriteRenderer_CreateGfxHandler(data->spriteRenderer); { OamManagerParam oamManagerParam = { - .fromOBJmain = 0, - .numOBJmain = 128, + .fromOBJmain = 0, + .numOBJmain = 128, .fromAffineMain = 0, - .numAffineMain = 32, - .fromOBJsub = 0, - .numOBJsub = 128, - .fromAffineSub = 0, - .numAffineSub = 32, + .numAffineMain = 32, + .fromOBJsub = 0, + .numOBJsub = 128, + .fromAffineSub = 0, + .numAffineSub = 32, }; OamCharTransferParam oamCharTransferParam = { - .maxTasks = 10, - .sizeMain = 0x400, - .sizeSub = 0x400, + .maxTasks = 10, + .sizeMain = 0x400, + .sizeSub = 0x400, .charModeMain = GX_OBJVRAMMODE_CHAR_1D_32K, - .charModeSub = GX_OBJVRAMMODE_CHAR_1D_32K, + .charModeSub = GX_OBJVRAMMODE_CHAR_1D_32K, }; SpriteRenderer_CreateOamCharPlttManagers(data->spriteRenderer, &oamManagerParam, &oamCharTransferParam, 0x20); diff --git a/src/oaks_speech_yesnomenu.c b/src/oaks_speech_yesnomenu.c index 749179f636..54d0bb4730 100644 --- a/src/oaks_speech_yesnomenu.c +++ b/src/oaks_speech_yesnomenu.c @@ -15,7 +15,7 @@ struct OakSpeechYesNo { u8 buttonPalette; u8 backgroundBgId; u8 buttonBgId; - u8 state : 4; + u8 state : 4; u8 result : 4; Window windows[2]; }; @@ -30,15 +30,15 @@ static BOOL OakSpeechYesNo_WaitCursorSpriteAnim(OakSpeechYesNo *yesnoMenu); OakSpeechYesNo *OakSpeechYesNo_Create(BgConfig *bgConfig, Sprite *sprite, int backgroundBgId, int buttonBgId, int buttonPalette, HeapID heapId) { GF_ASSERT(bgConfig != NULL); volatile HeapID heapId_2 = heapId; - OakSpeechYesNo *ret = AllocFromHeap(heapId, sizeof(OakSpeechYesNo)); + OakSpeechYesNo *ret = AllocFromHeap(heapId, sizeof(OakSpeechYesNo)); MI_CpuClear8(ret, sizeof(OakSpeechYesNo)); - ret->heapId = heapId; - ret->bgConfig = bgConfig; - ret->sprite = sprite; + ret->heapId = heapId; + ret->bgConfig = bgConfig; + ret->sprite = sprite; ret->backgroundBgId = backgroundBgId; - ret->buttonBgId = buttonBgId; - ret->buttonPalette = buttonPalette; - ret->msgFormat = MessageFormat_New(heapId_2); + ret->buttonBgId = buttonBgId; + ret->buttonPalette = buttonPalette; + ret->msgFormat = MessageFormat_New(heapId_2); Sprite_SetAnimActiveFlag(sprite, 1); OakSpeechYesNo_CreateWindows(ret); return ret; @@ -57,8 +57,8 @@ void OakSpeechYesNo_SetBackgroundPalette(OakSpeechYesNo *yesnoMenu, int palette) HeapID heapId; heapId = yesnoMenu->heapId; - bgId = yesnoMenu->backgroundBgId; - narc = NARC_New(NARC_a_2_3_7, heapId); + bgId = yesnoMenu->backgroundBgId; + narc = NARC_New(NARC_a_2_3_7, heapId); GfGfxLoader_GXLoadPalFromOpenNarc(narc, 0, GF_PAL_LOCATION_SUB_BG, (enum GFPalSlotOffset)(32 * palette), 0x20, heapId); GfGfxLoader_LoadCharDataFromOpenNarc(narc, 1, yesnoMenu->bgConfig, (GFBgLayer)bgId, 0, 0, FALSE, heapId); GfGfxLoader_LoadScrnDataFromOpenNarc(narc, 10, yesnoMenu->bgConfig, (GFBgLayer)bgId, 0, 0, FALSE, heapId); @@ -71,7 +71,7 @@ void OakSpeechYesNo_SetBackgroundPalette(OakSpeechYesNo *yesnoMenu, int palette) void OakSpeechYesNo_Start(OakSpeechYesNo *yesnoMenu, int msgBank, int msgId_Yes, int msgId_No) { OakSpeechYesNo_PrintMessageOnWindow(yesnoMenu, &yesnoMenu->windows[0], msgId_Yes, msgBank); OakSpeechYesNo_PrintMessageOnWindow(yesnoMenu, &yesnoMenu->windows[1], msgId_No, msgBank); - yesnoMenu->state = 0; + yesnoMenu->state = 0; yesnoMenu->result = YESNORESPONSE_YES; OakSpeechYesNo_SetCursorSpritePos(yesnoMenu); ToggleBgLayer(yesnoMenu->backgroundBgId, GF_PLANE_TOGGLE_ON); @@ -118,7 +118,7 @@ static void OakSpeechYesNo_RemoveWindows(OakSpeechYesNo *yesnoMenu) { static void OakSpeechYesNo_PrintMessageOnWindow(OakSpeechYesNo *yesnoMenu, Window *window, int msgId, int msgBank) { MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, msgBank, yesnoMenu->heapId); - String *string = ReadMsgData_ExpandPlaceholders(yesnoMenu->msgFormat, msgData, msgId, yesnoMenu->heapId); + String *string = ReadMsgData_ExpandPlaceholders(yesnoMenu->msgFormat, msgData, msgId, yesnoMenu->heapId); FillWindowPixelBuffer(window, 0); AddTextPrinterParameterizedWithColor(window, 4, string, 0, 0, TEXT_SPEED_INSTANT, MAKE_TEXT_COLOR(15, 1, 0), NULL); CopyWindowToVram(window); @@ -179,17 +179,17 @@ static const TouchscreenHitbox sHitboxes[] = { }; static BOOL OakSpeechYesNo_HandleInput(OakSpeechYesNo *yesnoMenu) { - BOOL ret = FALSE; + BOOL ret = FALSE; int hitbox = TouchscreenHitbox_FindRectAtTouchNew(sHitboxes); if (hitbox != -1) { PlaySE(SEQ_SE_DP_SELECT); switch (hitbox) { case 0: - ret = TRUE; + ret = TRUE; yesnoMenu->result = YESNORESPONSE_YES; break; case 1: - ret = TRUE; + ret = TRUE; yesnoMenu->result = YESNORESPONSE_NO; break; default: @@ -215,7 +215,7 @@ static BOOL OakSpeechYesNo_HandleInput(OakSpeechYesNo *yesnoMenu) { } ret = TRUE; } else if (gSystem.newKeys & PAD_BUTTON_B) { - ret = TRUE; + ret = TRUE; yesnoMenu->result = YESNORESPONSE_NO; } if (ret) { diff --git a/src/obj_char_transfer.c b/src/obj_char_transfer.c index ae499779ad..b8dee57b40 100644 --- a/src/obj_char_transfer.c +++ b/src/obj_char_transfer.c @@ -94,17 +94,17 @@ void ObjCharTransfer_InitEx(ObjCharTransferTemplate *template, GXOBJVRamModeChar if (sObjCharTransferTasksManager == NULL) { sObjCharTransferTasksManager = AllocFromHeap(template->heapId, sizeof(ObjCharTransferTasksManager)); MI_CpuClear32(sObjCharTransferTasksManager, sizeof(ObjCharTransferTasksManager)); - sObjCharTransferTasksManager->max = template->maxTasks; + sObjCharTransferTasksManager->max = template->maxTasks; sObjCharTransferTasksManager->tasks = (ObjCharTransferTask *)AllocFromHeap(template->heapId, sizeof(ObjCharTransferTask) * sObjCharTransferTasksManager->max); for (int i = 0; i < template->maxTasks; ++i) { ObjCharTransferTask_Init(&sObjCharTransferTasksManager->tasks[i]); } sObjCharTransferTasksManager->blockSizeMain = ObjCharTransfer_GetBlockSizeFromMode(modeMain); - sObjCharTransferTasksManager->blockSizeSub = ObjCharTransfer_GetBlockSizeFromMode(modeSub); + sObjCharTransferTasksManager->blockSizeSub = ObjCharTransfer_GetBlockSizeFromMode(modeSub); GX_SetOBJVRamModeChar(modeMain); GXS_SetOBJVRamModeChar(modeSub); int numBlocksMain = ObjCharTransfer_CalcBlockNumLimit(template->sizeMain, sObjCharTransferTasksManager->blockSizeMain); - int numBlocksSub = ObjCharTransfer_CalcBlockNumLimit(template->sizeSub, sObjCharTransferTasksManager->blockSizeSub); + int numBlocksSub = ObjCharTransfer_CalcBlockNumLimit(template->sizeSub, sObjCharTransferTasksManager->blockSizeSub); ObjCharTransfer_InitBlocksTransferBuffers(numBlocksMain, numBlocksSub, template->heapId); } } @@ -122,7 +122,7 @@ void ObjCharTransfer_Destroy(void) { void ObjCharTransfer_ClearBuffers(void) { sObjCharTransferTasksManager->offsetMain = 0; - sObjCharTransferTasksManager->offsetSub = 0; + sObjCharTransferTasksManager->offsetSub = 0; ObjCharTransfer_ClearBlockBuf(sObjCharTransferTasksManager->blockBufMain); ObjCharTransfer_ClearBlockBuf(sObjCharTransferTasksManager->blockBufSub); ObjCharTransfer_GetVramCapacityByBank(); @@ -258,8 +258,8 @@ NNSG2dImageProxy *ObjCharTransfer_ResizeTaskByResID_GetProxyPtr(int resId, u32 s task->state = OBJ_CHAR_TRANSFER_TASK_COPYABLE; ObjCharTransferTask_UpdateBaseAddrs(task, offsetMain, offsetSub); task->needResetBlockTransferFlags = TRUE; - task->sizeMain = newSizeMain; - task->sizeSub = newSizeSub; + task->sizeMain = newSizeMain; + task->sizeSub = newSizeSub; ObjCharTransferTask_G2dLoadImageMappingVramTransfer(task); ObjCharTransferInternal_ReserveTransferBlocksByVramOffsetAndSize(task->vram, offsetMain, offsetSub, newSizeMain, newSizeSub); @@ -282,7 +282,7 @@ NNSG2dImageProxy *ObjCharTransfer_CopyTransferTaskByProxyPtr(NNSG2dImageProxy *p if (task->state != OBJ_CHAR_TRANSFER_TASK_COPYABLE) { return NULL; } - *copiedTask = *task; + *copiedTask = *task; copiedTask->state = OBJ_CHAR_TRANSFER_TASK_COPY; if (copiedTask->vram & NNS_G2D_VRAM_TYPE_2DMAIN) { size = copiedTask->sizeMain; @@ -293,8 +293,8 @@ NNSG2dImageProxy *ObjCharTransfer_CopyTransferTaskByProxyPtr(NNSG2dImageProxy *p ObjCharTransferInternal_GetBlockNumAndFreeSpaceForTransfer(copiedTask->vram, &offsetMain, &offsetSub, size, &newSizeMain, &newSizeSub); ObjCharTransferTask_UpdateBaseAddrs(copiedTask, offsetMain, offsetSub); copiedTask->needResetBlockTransferFlags = TRUE; - copiedTask->sizeMain = newSizeMain; - copiedTask->sizeSub = newSizeSub; + copiedTask->sizeMain = newSizeMain; + copiedTask->sizeSub = newSizeSub; ObjCharTransferTask_G2dLoadImageMappingVramTransfer(copiedTask); ObjCharTransferInternal_ReserveTransferBlocksByVramOffsetAndSize(copiedTask->vram, offsetMain, offsetSub, newSizeMain, newSizeSub); @@ -330,8 +330,8 @@ BOOL sub_02021AC8(u32 size, BOOL a1, NNS_G2D_VRAM_TYPE vram, UnkStruct_02021AC8 ret = ObjCharTransfer_TryGetDestVramOffsets(size, vram, &offsetMain, &offsetSub); if (ret) { ObjCharTransfer_ReserveVramSpace(size, vram); - a3->vram = vram; - a3->size = size; + a3->vram = vram; + a3->size = size; a3->offset = vram == NNS_G2D_VRAM_TYPE_2DMAIN ? offsetMain : offsetSub; a3->unk_0A = FALSE; } @@ -341,10 +341,10 @@ BOOL sub_02021AC8(u32 size, BOOL a1, NNS_G2D_VRAM_TYPE vram, UnkStruct_02021AC8 ObjCharTransferInternal_ReserveTransferBlocksByVramOffsetAndSize(vram, offsetMain, offsetSub, sizeMain, sizeSub); a3->vram = vram; if (vram == NNS_G2D_VRAM_TYPE_2DMAIN) { - a3->size = sizeMain; + a3->size = sizeMain; a3->offset = offsetMain + sObjCharTransferTasksManager->freeSizeMain; } else { - a3->size = sizeSub; + a3->size = sizeSub; a3->offset = offsetSub + sObjCharTransferTasksManager->freeSizeSub; } a3->unk_0A = TRUE; @@ -371,7 +371,7 @@ void sub_02021B5C(UnkStruct_02021AC8 *a0) { ObjCharTransferTasksManager *ObjCharTransfer_PopTaskManager(void) { GF_ASSERT(sObjCharTransferTasksManager != NULL); ObjCharTransferTasksManager *ret = sObjCharTransferTasksManager; - sObjCharTransferTasksManager = NULL; + sObjCharTransferTasksManager = NULL; return ret; } @@ -381,26 +381,26 @@ void ObjCharTransfer_PushTaskManager(ObjCharTransferTasksManager *taskManager) { } static void ObjCharTransferTask_Init(ObjCharTransferTask *task) { - task->charData = NULL; - task->vram = NNS_G2D_VRAM_TYPE_NEITHER; - task->isTransferred = FALSE; - task->resId = -1; - task->baseAddrMain = 0; - task->baseAddrSub = 0; - task->state = OBJ_CHAR_TRANSFER_TASK_INIT; + task->charData = NULL; + task->vram = NNS_G2D_VRAM_TYPE_NEITHER; + task->isTransferred = FALSE; + task->resId = -1; + task->baseAddrMain = 0; + task->baseAddrSub = 0; + task->state = OBJ_CHAR_TRANSFER_TASK_INIT; task->shouldUpdateMappingTypeFromHW = FALSE; NNS_G2dInitImageProxy(&task->imageProxy); } static BOOL ObjCharTransferTask_InitFromTemplate(const ObjCharTransferTaskTemplate *template, ObjCharTransferTask *task) { - task->charData = template->charData; - task->resId = template->id; - task->vram = template->vram; - task->isTransferred = task->charData->characterFmt >> NNS_G2D_VRAMTRANSFERDATA_FLAG_SHIFT; - task->transferFromTail = template->atEnd; + task->charData = template->charData; + task->resId = template->id; + task->vram = template->vram; + task->isTransferred = task->charData->characterFmt >> NNS_G2D_VRAMTRANSFERDATA_FLAG_SHIFT; + task->transferFromTail = template->atEnd; task->needResetBlockTransferFlags = FALSE; - task->sizeMain = 0; - task->sizeSub = 0; + task->sizeMain = 0; + task->sizeSub = 0; return TRUE; } @@ -455,8 +455,8 @@ static BOOL ObjCharTransferTask_ReserveFromTail(ObjCharTransferTask *task) { } ObjCharTransferTask_UpdateBaseAddrs(task, offsetMain, offsetSub); task->needResetBlockTransferFlags = TRUE; - task->sizeMain = sizeMain; - task->sizeSub = sizeSub; + task->sizeMain = sizeMain; + task->sizeSub = sizeSub; ObjCharTransferTask_G2dLoadImageMapping(task); ObjCharTransferInternal_ReserveTransferBlocksByVramOffsetAndSize(task->vram, offsetMain, offsetSub, sizeMain, sizeSub); return TRUE; @@ -490,7 +490,7 @@ static GXOBJVRamModeChar ObjCharTransferTask_SetMappingTypeFromHW(ObjCharTransfe static void ObjCharTransferTask_SetBaseAddrs(ObjCharTransferTask *task, u32 offsetMain, u32 offsetSub) { task->baseAddrMain = offsetMain; - task->baseAddrSub = offsetSub; + task->baseAddrSub = offsetSub; if (!task->isTransferred) { ObjCharTransferTask_G2dLoadImageMapping(task); } @@ -498,9 +498,9 @@ static void ObjCharTransferTask_SetBaseAddrs(ObjCharTransferTask *task, u32 offs static BOOL ObjCharTransferInternal_GetBlockNumAndFreeSpaceForTransfer(int vram, u32 *blockNumMain, u32 *blockNumSub, u32 size, u32 *freeSpaceMain, u32 *freeSpaceSub) { if (vram & NNS_G2D_VRAM_TYPE_2DMAIN) { - *freeSpaceMain = ObjCharTransfer_AlignToBlock(size, sObjCharTransferTasksManager->blockSizeMain, TRUE); + *freeSpaceMain = ObjCharTransfer_AlignToBlock(size, sObjCharTransferTasksManager->blockSizeMain, TRUE); u32 numBlocksUsed = ObjCharTransfer_CalcBlockNumLimit(*freeSpaceMain, sObjCharTransferTasksManager->blockSizeMain); - *blockNumMain = ObjCharTransfer_FindAvailableTransferBlock(numBlocksUsed, sObjCharTransferTasksManager->blockBufMain); + *blockNumMain = ObjCharTransfer_FindAvailableTransferBlock(numBlocksUsed, sObjCharTransferTasksManager->blockBufMain); if (*blockNumMain == -1) { GF_ASSERT(FALSE); return FALSE; @@ -508,9 +508,9 @@ static BOOL ObjCharTransferInternal_GetBlockNumAndFreeSpaceForTransfer(int vram, *blockNumMain = ObjCharTransfer_GetBlockMemOffset(*blockNumMain, sObjCharTransferTasksManager->blockSizeMain); } if (vram & NNS_G2D_VRAM_TYPE_2DSUB) { - *freeSpaceSub = ObjCharTransfer_AlignToBlock(size, sObjCharTransferTasksManager->blockSizeSub, TRUE); + *freeSpaceSub = ObjCharTransfer_AlignToBlock(size, sObjCharTransferTasksManager->blockSizeSub, TRUE); u32 numBlocksUsed = ObjCharTransfer_CalcBlockNumLimit(*freeSpaceSub, sObjCharTransferTasksManager->blockSizeSub); - *blockNumSub = ObjCharTransfer_FindAvailableTransferBlock(numBlocksUsed, sObjCharTransferTasksManager->blockBufSub); + *blockNumSub = ObjCharTransfer_FindAvailableTransferBlock(numBlocksUsed, sObjCharTransferTasksManager->blockBufSub); if (*blockNumSub == -1) { GF_ASSERT(FALSE); return FALSE; @@ -531,12 +531,12 @@ static void ObjCharTransferTask_UpdateBaseAddrs(ObjCharTransferTask *task, u32 o static void ObjCharTransferInternal_ReserveTransferBlocksByVramOffsetAndSize(NNS_G2D_VRAM_TYPE vram, u32 offsetMain, u32 offsetSub, u32 sizeMain, u32 sizeSub) { if (vram & NNS_G2D_VRAM_TYPE_2DMAIN) { - u32 numBlocks = ObjCharTransfer_CalcBlockNumLimit(sizeMain, sObjCharTransferTasksManager->blockSizeMain); + u32 numBlocks = ObjCharTransfer_CalcBlockNumLimit(sizeMain, sObjCharTransferTasksManager->blockSizeMain); u32 blockStart = ObjCharTransfer_CalcBlockNumLimit(offsetMain, sObjCharTransferTasksManager->blockSizeMain); ObjCharTransfer_ReserveTransferBlocks(blockStart, numBlocks, sObjCharTransferTasksManager->blockBufMain); } if (vram & NNS_G2D_VRAM_TYPE_2DSUB) { - u32 numBlocks = ObjCharTransfer_CalcBlockNumLimit(sizeSub, sObjCharTransferTasksManager->blockSizeSub); + u32 numBlocks = ObjCharTransfer_CalcBlockNumLimit(sizeSub, sObjCharTransferTasksManager->blockSizeSub); u32 blockStart = ObjCharTransfer_CalcBlockNumLimit(offsetSub, sObjCharTransferTasksManager->blockSizeSub); ObjCharTransfer_ReserveTransferBlocks(blockStart, numBlocks, sObjCharTransferTasksManager->blockBufSub); } @@ -662,10 +662,10 @@ static void ObjCharTransfer_GetVramCapacityByBank(void) { break; } - int sizeToReserve = ObjCharTransfer_GetBlockMemOffset(sObjCharTransferTasksManager->numBlocksMain, sObjCharTransferTasksManager->blockSizeMain); + int sizeToReserve = ObjCharTransfer_GetBlockMemOffset(sObjCharTransferTasksManager->numBlocksMain, sObjCharTransferTasksManager->blockSizeMain); sObjCharTransferTasksManager->freeSizeMain = sObjCharTransferTasksManager->vramCapacityMain - sizeToReserve; - sizeToReserve = ObjCharTransfer_GetBlockMemOffset(sObjCharTransferTasksManager->numBlocksSub, sObjCharTransferTasksManager->blockSizeSub); - sObjCharTransferTasksManager->freeSizeSub = sObjCharTransferTasksManager->vramCapacitySub - sizeToReserve; + sizeToReserve = ObjCharTransfer_GetBlockMemOffset(sObjCharTransferTasksManager->numBlocksSub, sObjCharTransferTasksManager->blockSizeSub); + sObjCharTransferTasksManager->freeSizeSub = sObjCharTransferTasksManager->vramCapacitySub - sizeToReserve; GF_ASSERT(sObjCharTransferTasksManager->freeSizeMain >= 0 && sObjCharTransferTasksManager->freeSizeSub >= 0); GF_ASSERT(sObjCharTransferTasksManager->freeSizeMain >= 0 && sObjCharTransferTasksManager->freeSizeSub >= 0); // they wanted to be doubly sure } @@ -677,7 +677,7 @@ static void ObjCharTransfer_ClearBothScreensBlockBufs(void) { static void ObjCharTransfer_InitBlocksTransferBuffers(u32 numBlocksMain, u32 numBlocksSub, HeapID heapID) { sObjCharTransferTasksManager->numBlocksMain = numBlocksMain; - sObjCharTransferTasksManager->numBlocksSub = numBlocksSub; + sObjCharTransferTasksManager->numBlocksSub = numBlocksSub; if (sObjCharTransferTasksManager->blockBufMain != NULL) { FreeToHeap(sObjCharTransferTasksManager->blockBufMain); } @@ -722,7 +722,7 @@ static void ObjCharTransfer_ClearBlockBuf(u8 *buff) { static void ObjCharTransfer_ReserveTransferBlocks(u32 blockStart, u32 numBlocks, u8 *buffer) { if (buffer != NULL) { u32 blocksMax = ObjCharTransfer_GetBlocksCountFromBufferPtr(buffer); - u32 blockEnd = blockStart + numBlocks; + u32 blockEnd = blockStart + numBlocks; for (int i = blockStart; i < blockEnd; ++i) { if (i >= blocksMax) { break; @@ -745,7 +745,7 @@ static u32 ObjCharTransfer_FindAvailableTransferBlock(u32 reserveSize, u8 *buffe u8 byteIndex; ObjCharTransfer_BitPositionToByteAndBitIndexPair(i, &bitIndex, &byteIndex); u8 mask = 1 << byteIndex; - int j = 0; + int j = 0; while ((buffer[bitIndex] & mask) == 0 && j <= reserveSize) { int num = i + j; ObjCharTransfer_BitPositionToByteAndBitIndexPair(num, &bitIndex, &byteIndex); @@ -780,13 +780,13 @@ static void ObjCharTransfer_ResetBlockTransferFlagsEx(u32 blockStart, u32 blockM static void ObjCharTransferTask_ResetBlockTransferFlags(ObjCharTransferTask *task) { if (task->vram & NNS_G2D_VRAM_TYPE_2DMAIN) { - u32 loc = NNS_G2dGetImageLocation(&task->imageProxy, NNS_G2D_VRAM_TYPE_2DMAIN); + u32 loc = NNS_G2dGetImageLocation(&task->imageProxy, NNS_G2D_VRAM_TYPE_2DMAIN); u32 blockCur = ObjCharTransfer_CalcBlockNumLimit(loc - sObjCharTransferTasksManager->freeSizeMain, sObjCharTransferTasksManager->blockSizeMain); u32 blockMax = ObjCharTransfer_CalcBlockNumLimit(task->sizeMain, sObjCharTransferTasksManager->blockSizeMain); ObjCharTransfer_ResetBlockTransferFlagsEx(blockCur, blockMax, sObjCharTransferTasksManager->blockBufMain); } if (task->vram & NNS_G2D_VRAM_TYPE_2DSUB) { - u32 loc = NNS_G2dGetImageLocation(&task->imageProxy, NNS_G2D_VRAM_TYPE_2DSUB); + u32 loc = NNS_G2dGetImageLocation(&task->imageProxy, NNS_G2D_VRAM_TYPE_2DSUB); u32 blockCur = ObjCharTransfer_CalcBlockNumLimit(loc - sObjCharTransferTasksManager->freeSizeSub, sObjCharTransferTasksManager->blockSizeSub); u32 blockMax = ObjCharTransfer_CalcBlockNumLimit(task->sizeSub, sObjCharTransferTasksManager->blockSizeSub); ObjCharTransfer_ResetBlockTransferFlagsEx(blockCur, blockMax, sObjCharTransferTasksManager->blockBufSub); @@ -862,13 +862,13 @@ static void ObjCharTransfer_ReserveVramSpace(u32 size, NNS_G2D_VRAM_TYPE vram) { static void ObjCharTransfer_BitPositionToByteAndBitIndexPair(int arrayBitIndex, u32 *byteIndex, u8 *bitIndex) { *byteIndex = arrayBitIndex >> 3; - *bitIndex = arrayBitIndex & 7; + *bitIndex = arrayBitIndex & 7; } static void ObjCharTransferInternal_BoundsFixOffsetAndSize(u32 baseOffset, u32 curOffset, u32 size, int *correctedOffset, int *correctedSize) { *correctedOffset = curOffset - baseOffset; if (*correctedOffset < 0) { - *correctedSize = size + *correctedOffset; + *correctedSize = size + *correctedOffset; *correctedOffset = 0; } else { *correctedSize = size; diff --git a/src/obj_pltt_transfer.c b/src/obj_pltt_transfer.c index 6170778a1e..04ea609c0a 100644 --- a/src/obj_pltt_transfer.c +++ b/src/obj_pltt_transfer.c @@ -58,7 +58,7 @@ void ObjPlttTransfer_Init(int num, HeapID heapId) { sObjPlttTransferTasksManager = AllocFromHeap(heapId, sizeof(ObjPlttTransferTasksManager)); MI_CpuClear32(sObjPlttTransferTasksManager, sizeof(ObjPlttTransferTasksManager)); sObjPlttTransferTasksManager->numTasks = num; - sObjPlttTransferTasksManager->tasks = AllocFromHeap(heapId, num * sizeof(ObjPlttTransferTask)); + sObjPlttTransferTasksManager->tasks = AllocFromHeap(heapId, num * sizeof(ObjPlttTransferTask)); for (int i = 0; i < num; ++i) { ObjPlttTransferTask_Init(&sObjPlttTransferTasksManager->tasks[i]); } @@ -86,10 +86,10 @@ static void ObjPlttTransfer_HandleError(void) { } void ObjPlttTransfer_Reset(void) { - sObjPlttTransferTasksManager->posMain = 0; - sObjPlttTransferTasksManager->posSub = 0; + sObjPlttTransferTasksManager->posMain = 0; + sObjPlttTransferTasksManager->posSub = 0; sObjPlttTransferTasksManager->extPosMain = 0; - sObjPlttTransferTasksManager->extPosSub = 0; + sObjPlttTransferTasksManager->extPosSub = 0; ObjPlttTransfer_GetExtPlttSize(); ObjPlttTransfer_ReleaseAllBlocks(sObjPlttTransferTasksManager); } @@ -227,9 +227,9 @@ static BOOL ObjPlttTransfer_InitFromTemplate(const ObjPlttTransferTaskTemplate * GF_ASSERT(FALSE); return FALSE; } - task->resID = template->id; - task->vram = template->vram; - task->active = TRUE; + task->resID = template->id; + task->vram = template->vram; + task->active = TRUE; task->plttSize = template->plttNum; return TRUE; } @@ -249,13 +249,13 @@ static BOOL ObjPlttTransfer_ReserveAndTransfer_HandleExtPltt(const ObjPlttTransf if (task->plttData->bExtendedPlt) { pPosMain = &sObjPlttTransferTasksManager->extPosMain; sizeMain = sObjPlttTransferTasksManager->extSizeMain; - pPosSub = &sObjPlttTransferTasksManager->extPosSub; - sizeSub = sObjPlttTransferTasksManager->extSizeSub; + pPosSub = &sObjPlttTransferTasksManager->extPosSub; + sizeSub = sObjPlttTransferTasksManager->extSizeSub; } else { pPosMain = &sObjPlttTransferTasksManager->posMain; sizeMain = 0x200; - pPosSub = &sObjPlttTransferTasksManager->posSub; - sizeSub = 0x200; + pPosSub = &sObjPlttTransferTasksManager->posSub; + sizeSub = 0x200; } ObjPlttTransferTask_CheckAllocBlocks(task, *pPosMain, *pPosSub, sizeMain, sizeSub); ObjPlttTransferTask_PushToVRam_UpdateSzByte(task); @@ -383,7 +383,7 @@ static u32 ObjPlttTransfer_GetFreePlttLoadAddr(u16 blocks, int num) { static void ObjPlttTransfer_ReleaseAllBlocks(ObjPlttTransferTasksManager *manager) { manager->blocksMain = 0; - manager->blocksSub = 0; + manager->blocksSub = 0; } static void ObjPlttTransferTask_AcquireBlocks(ObjPlttTransferTask *task) { diff --git a/src/options.c b/src/options.c index d4a43aede3..e313b96c0f 100644 --- a/src/options.c +++ b/src/options.c @@ -18,12 +18,12 @@ void Options_Copy(Options *src, Options *dest) { void Options_Init(Options *options) { MI_CpuClear8(options, sizeof(Options)); - options->textSpeed = 1; // mid speed + options->textSpeed = 1; // mid speed options->soundMethod = 0; // stereo options->battleStyle = 0; // shift options->battleScene = 0; // on - options->buttonMode = 0; // normal - options->frame = 0; // frame 1 + options->buttonMode = 0; // normal + options->frame = 0; // frame 1 } void Options_SetButtonModeOnMain(SaveData *saveData, u32 buttonMode) { diff --git a/src/options_app.c b/src/options_app.c index a05b4ab2eb..6bc883704a 100644 --- a/src/options_app.c +++ b/src/options_app.c @@ -28,12 +28,12 @@ // Not to be confused with `Options`, which is almost exactly the same, save for two members being swapped. SMH typedef struct OptionsApp_Options { - u16 textSpeed : 4; + u16 textSpeed : 4; u16 soundMethod : 2; u16 battleScene : 1; u16 battleStyle : 1; - u16 buttonMode : 2; - u16 frame : 5; + u16 buttonMode : 2; + u16 frame : 5; } OptionsApp_Options; typedef struct OptionsApp_MenuEntry { @@ -59,11 +59,11 @@ typedef struct OptionsApp_Data { u32 exitState; u32 setupAndFreeState; u32 fadeUnused; // unused, game writes 0 here when it's about to start a fade, but never reads from here - u32 unk10_0 : 2; + u32 unk10_0 : 2; u32 currentMenuEntryId : 3; - u32 unk10_5 : 16; // unused - u32 unk10_21 : 1; - u32 unk10_22 : 10; // unused + u32 unk10_5 : 16; // unused + u32 unk10_21 : 1; + u32 unk10_22 : 10; // unused BgConfig *bgConfig; OptionsApp_Options options; Options *playerOptionsUnused; // unused copy of playerOptions @@ -175,129 +175,129 @@ static const u32 ov54_021E6DA8[15][2] = { static const UnkStruct_0200D2B4 ov54_021E6EAC[9] = { { .resourceSet = 0, - .x = 112, - .y = 24, - .z = 0, - .animSeqNo = 0, - .rotation = 1, - .palIndex = 0, + .x = 112, + .y = 24, + .z = 0, + .animSeqNo = 0, + .rotation = 1, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 0, - .x = 112, - .y = 48, - .z = 0, - .animSeqNo = 0, - .rotation = 1, - .palIndex = 0, + .x = 112, + .y = 48, + .z = 0, + .animSeqNo = 0, + .rotation = 1, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 0, - .x = 112, - .y = 72, - .z = 0, - .animSeqNo = 1, - .rotation = 1, - .palIndex = 0, + .x = 112, + .y = 72, + .z = 0, + .animSeqNo = 1, + .rotation = 1, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 0, - .x = 112, - .y = 96, - .z = 0, - .animSeqNo = 1, - .rotation = 1, - .palIndex = 0, + .x = 112, + .y = 96, + .z = 0, + .animSeqNo = 1, + .rotation = 1, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 0, - .x = 112, - .y = 120, - .z = 0, - .animSeqNo = 1, - .rotation = 1, - .palIndex = 0, + .x = 112, + .y = 120, + .z = 0, + .animSeqNo = 1, + .rotation = 1, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 1, - .x = 115, - .y = 144, - .z = 0, - .animSeqNo = 0, - .rotation = 1, - .palIndex = 0, + .x = 115, + .y = 144, + .z = 0, + .animSeqNo = 0, + .rotation = 1, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 2, - .x = 213, - .y = 144, - .z = 0, - .animSeqNo = 0, - .rotation = 1, - .palIndex = 0, + .x = 213, + .y = 144, + .z = 0, + .animSeqNo = 0, + .rotation = 1, + .palIndex = 0, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 3, - .x = 188, - .y = 170, - .z = 0, - .animSeqNo = 0, - .rotation = 1, - .palIndex = 1, + .x = 188, + .y = 170, + .z = 0, + .animSeqNo = 0, + .rotation = 1, + .palIndex = 1, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, { .resourceSet = 3, - .x = 116, - .y = 170, - .z = 0, - .animSeqNo = 0, - .rotation = 1, - .palIndex = 1, + .x = 116, + .y = 170, + .z = 0, + .animSeqNo = 0, + .rotation = 1, + .palIndex = 1, .whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN, - .unk_18 = 0, - .unk_1C = 0, - .unk_20 = 0, - .unk_24 = 0, + .unk_18 = 0, + .unk_1C = 0, + .unk_20 = 0, + .unk_24 = 0, }, }; @@ -333,19 +333,19 @@ BOOL OptionsMenu_Init(OVY_MANAGER *manager, int *state) { OptionsApp_Data *data = OverlayManager_CreateAndGetData(manager, sizeof(OptionsApp_Data), HEAP_ID_OPTIONS_APP); memset(data, 0, sizeof(OptionsApp_Data)); - data->options.textSpeed = Options_GetTextSpeed(args->options); + data->options.textSpeed = Options_GetTextSpeed(args->options); data->options.battleScene = Options_GetBattleScene(args->options); data->options.battleStyle = Options_GetBattleStyle(args->options); data->options.soundMethod = Options_GetSoundMethod(args->options); - data->options.buttonMode = Options_GetButtonMode(args->options); - data->options.frame = Options_GetFrame(args->options); + data->options.buttonMode = Options_GetButtonMode(args->options); + data->options.frame = Options_GetFrame(args->options); - data->menuInputPtr = args->menuInputStateMgr; + data->menuInputPtr = args->menuInputStateMgr; data->playerOptionsUnused = args->options; - data->heapId = HEAP_ID_OPTIONS_APP; - data->playerOptions = args->options; - data->menuInputState = MenuInputStateMgr_GetState(data->menuInputPtr); - data->frameNumText = String_New(40, data->heapId); + data->heapId = HEAP_ID_OPTIONS_APP; + data->playerOptions = args->options; + data->menuInputState = MenuInputStateMgr_GetState(data->menuInputPtr); + data->frameNumText = String_New(40, data->heapId); TextFlags_SetCanABSpeedUpPrint(FALSE); TextFlags_SetCanTouchSpeedUpPrint(FALSE); @@ -360,12 +360,12 @@ BOOL OptionsMenu_Exit(OVY_MANAGER *manager, int *state) { OptionsApp_Data *data = OverlayManager_GetData(manager); if (data->unk10_0 == 1) { - data->options.textSpeed = data->menuEntries[MENU_ENTRY_TEXT_SPEED].value; + data->options.textSpeed = data->menuEntries[MENU_ENTRY_TEXT_SPEED].value; data->options.battleScene = data->menuEntries[MENU_ENTRY_BATTLE_SCENE].value; data->options.battleStyle = data->menuEntries[MENU_ENTRY_BATTLE_STYLE].value; data->options.soundMethod = data->menuEntries[MENU_ENTRY_SOUND_METHOD].value; - data->options.buttonMode = data->menuEntries[MENU_ENTRY_BUTTON_MODE].value; - data->options.frame = data->menuEntries[MENU_ENTRY_FRAME].value; + data->options.buttonMode = data->menuEntries[MENU_ENTRY_BUTTON_MODE].value; + data->options.frame = data->menuEntries[MENU_ENTRY_FRAME].value; Options_SetTextSpeed(data->playerOptions, data->options.textSpeed); Options_SetBattleScene(data->playerOptions, data->options.battleScene); @@ -447,9 +447,9 @@ BOOL OptionsMenu_Main(OVY_MANAGER *manager, int *state) { static void OptionsApp_SetupGraphicsBanks(void) { GraphicsBanks banks = { - .bg = GX_VRAM_BG_128_A, - .subbg = GX_VRAM_SUB_BG_128_C, - .obj = GX_VRAM_OBJ_16_G, + .bg = GX_VRAM_BG_128_A, + .subbg = GX_VRAM_SUB_BG_128_C, + .obj = GX_VRAM_OBJ_16_G, .subobj = GX_VRAM_SUB_OBJ_16_I, }; GfGfx_SetBanks(&banks); @@ -546,85 +546,85 @@ static BOOL ov54_021E5DBC(OptionsApp_Data *data) { } static void OptionsApp_SetupBgConfig(OptionsApp_Data *data) { - data->bgConfig = BgConfig_Alloc(data->heapId); + data->bgConfig = BgConfig_Alloc(data->heapId); GraphicsModes modes = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; SetBothScreensModesAndDisable(&modes); BgTemplate templates[5] = { { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf000, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf000, - .charBase = GX_BG_CHARBASE_0x08000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x08000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }, }; @@ -766,17 +766,17 @@ static void OptionsApp_LoadMenuEntriesData(OptionsApp_Data *data) { } } - data->menuEntries[MENU_ENTRY_TEXT_SPEED].value = data->options.textSpeed; + data->menuEntries[MENU_ENTRY_TEXT_SPEED].value = data->options.textSpeed; data->menuEntries[MENU_ENTRY_BATTLE_SCENE].value = data->options.battleScene; data->menuEntries[MENU_ENTRY_BATTLE_STYLE].value = data->options.battleStyle; data->menuEntries[MENU_ENTRY_SOUND_METHOD].value = data->options.soundMethod; - data->menuEntries[MENU_ENTRY_BUTTON_MODE].value = data->options.buttonMode; - data->menuEntries[MENU_ENTRY_FRAME].value = data->options.frame; - data->menuEntries[MENU_ENTRY_6].value = 0; + data->menuEntries[MENU_ENTRY_BUTTON_MODE].value = data->options.buttonMode; + data->menuEntries[MENU_ENTRY_FRAME].value = data->options.frame; + data->menuEntries[MENU_ENTRY_6].value = 0; } static void ov54_021E6418(OptionsApp_Data *data, u16 menuEntryId) { - u32 selectedColor = MAKE_TEXT_COLOR(1, 2, 0); + u32 selectedColor = MAKE_TEXT_COLOR(1, 2, 0); u32 notSelectedColor = MAKE_TEXT_COLOR(15, 2, 0); u32 color; u16 i; @@ -934,7 +934,7 @@ static void OptionsApp_HandleInput(OptionsApp_Data *data) { break; default: { - data->currentMenuEntryId = ov54_021E6DA8[hitboxIndex][0]; + data->currentMenuEntryId = ov54_021E6DA8[hitboxIndex][0]; OptionsApp_MenuEntry *entry = &data->menuEntries[data->currentMenuEntryId]; u32 value = ov54_021E6DA8[hitboxIndex][1]; @@ -987,25 +987,25 @@ static void OptionsApp_SetupSpriteRenderer(OptionsApp_Data *data) { GfGfx_EngineATogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); GfGfx_EngineBTogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); - data->spriteRenderer = SpriteRenderer_Create(data->heapId); + data->spriteRenderer = SpriteRenderer_Create(data->heapId); data->spriteGfxHandler = SpriteRenderer_CreateGfxHandler(data->spriteRenderer); const OamManagerParam unk1 = { - .fromOBJmain = 0, - .numOBJmain = 128, + .fromOBJmain = 0, + .numOBJmain = 128, .fromAffineMain = 0, - .numAffineMain = 32, - .fromOBJsub = 0, - .numOBJsub = 128, - .fromAffineSub = 0, - .numAffineSub = 32, + .numAffineMain = 32, + .fromOBJsub = 0, + .numOBJsub = 128, + .fromAffineSub = 0, + .numAffineSub = 32, }; const OamCharTransferParam unk2 = { - .maxTasks = 9, - .sizeMain = 0x400, - .sizeSub = 0x400, + .maxTasks = 9, + .sizeMain = 0x400, + .sizeSub = 0x400, .charModeMain = GX_OBJVRAMMODE_CHAR_1D_32K, - .charModeSub = GX_OBJVRAMMODE_CHAR_1D_32K, + .charModeSub = GX_OBJVRAMMODE_CHAR_1D_32K, }; SpriteRenderer_CreateOamCharPlttManagers(data->spriteRenderer, &unk1, &unk2, 32); SpriteRenderer_CreateSpriteList(data->spriteRenderer, data->spriteGfxHandler, 9); diff --git a/src/overlay_06.c b/src/overlay_06.c index 2a177cd760..3a617a8875 100644 --- a/src/overlay_06.c +++ b/src/overlay_06.c @@ -24,8 +24,8 @@ SPLEmitter *ov06_0221BA40(HeapID heapId) { Camera *pGVar2; particleHeap = AllocFromHeap(heapId, 0x4800); - pPVar1 = sub_02014DB4(ov06_0221BB14, ov06_0221BB30, particleHeap, 0x4800, TRUE, heapId); - pGVar2 = sub_02015524(pPVar1); + pPVar1 = sub_02014DB4(ov06_0221BB14, ov06_0221BB30, particleHeap, 0x4800, TRUE, heapId); + pGVar2 = sub_02015524(pPVar1); if (pGVar2 != NULL) { Camera_SetPerspectiveClippingPlane(1 * FX32_ONE, 900 * FX32_ONE, pGVar2); } diff --git a/src/overlay_124.c b/src/overlay_124.c index 93576606f3..b44bf98b42 100644 --- a/src/overlay_124.c +++ b/src/overlay_124.c @@ -23,12 +23,12 @@ void FieldSystem_Init(OVY_MANAGER *man, FieldSystem *fieldSystem) { FS_LoadOverlay(MI_PROCESSOR_ARM9, FS_OVERLAY_ID(OVY_123)); key += 769 * (!ov123_0225F4A8(ov124_02260D68)); // 769 is prime UnkStruct_02111868_sub *args = OverlayManager_GetArgs(man); - fieldSystem->saveData = args->saveData; - fieldSystem->taskman = NULL; + fieldSystem->saveData = args->saveData; + fieldSystem->taskman = NULL; key += 47 * (!ov123_0225F688(ov124_02260D6C)); // 47 is prime - fieldSystem->location = LocalFieldData_GetCurrentPosition(Save_LocalFieldData_Get(fieldSystem->saveData)); + fieldSystem->location = LocalFieldData_GetCurrentPosition(Save_LocalFieldData_Get(fieldSystem->saveData)); fieldSystem->mapMatrix = MapMatrix_New(); - u32 key2 = 929 * ov123_0225F520(ov124_02260D58); // 929 is prime + u32 key2 = 929 * ov123_0225F520(ov124_02260D58); // 929 is prime Field_AllocateMapEvents(fieldSystem, HEAP_ID_FIELD); fieldSystem->bagCursor = BagCursor_New(HEAP_ID_FIELD); FS_UnloadOverlay(MI_PROCESSOR_ARM9, FS_OVERLAY_ID(OVY_123)); @@ -37,9 +37,9 @@ void FieldSystem_Init(OVY_MANAGER *man, FieldSystem *fieldSystem) { if ((key + key2) % 2441) { ov124_02260D1C(fieldSystem); } - fieldSystem->unkA8 = sub_02092BB8(HEAP_ID_FIELD); - fieldSystem->unk108 = FieldSystem_UnkSub108_Alloc(HEAP_ID_FIELD); - fieldSystem->phoneRingManager = GearPhoneRingManager_New(HEAP_ID_FIELD, fieldSystem); + fieldSystem->unkA8 = sub_02092BB8(HEAP_ID_FIELD); + fieldSystem->unk108 = FieldSystem_UnkSub108_Alloc(HEAP_ID_FIELD); + fieldSystem->phoneRingManager = GearPhoneRingManager_New(HEAP_ID_FIELD, fieldSystem); fieldSystem->judgeStatPosition = 0; if ((key + key2) % 4073) { ov124_02260D1C(fieldSystem); @@ -48,7 +48,7 @@ void FieldSystem_Init(OVY_MANAGER *man, FieldSystem *fieldSystem) { // clobbers the heap worse if you have made more progress through the game static void ov124_02260D1C(FieldSystem *fieldSystem) { - int i = 0; + int i = 0; int numBadges = 0; for (i = 0; i < 16; ++i) { if (PlayerProfile_TestBadgeFlag(Save_PlayerData_GetProfileAddr(fieldSystem->saveData), i) == TRUE) { diff --git a/src/overlay_16_022014A0.c b/src/overlay_16_022014A0.c index a2b0aab47a..7439938067 100644 --- a/src/overlay_16_022014A0.c +++ b/src/overlay_16_022014A0.c @@ -51,13 +51,13 @@ UnkStruct_ov16_022014A0 *ov16_022014A0(HeapID heapId) { NARC *narc; narc = GetBerryInfoNarc(heapId); - unk = AllocFromHeap(heapId, NUM_BERRIES * sizeof(UnkStruct_ov16_022014A0)); + unk = AllocFromHeap(heapId, NUM_BERRIES * sizeof(UnkStruct_ov16_022014A0)); for (int fileId = 0; fileId < NUM_BERRIES; fileId++) { - BerryFile *berryFile = GetBerryFileFromNarc(narc, fileId, heapId); + BerryFile *berryFile = GetBerryFileFromNarc(narc, fileId, heapId); unk[fileId].defaultGrowthTimeInHours = GetBerryAttr(berryFile, BERRY_ATTR_GROWTH_INTERVAL); - unk[fileId].defaultDrainRate = GetBerryAttr(berryFile, BERRY_ATTR_DRAIN_RATE); - unk[fileId].unk2 = GetBerryAttr(berryFile, BERRY_ATTR_UNK2); + unk[fileId].defaultDrainRate = GetBerryAttr(berryFile, BERRY_ATTR_DRAIN_RATE); + unk[fileId].unk2 = GetBerryAttr(berryFile, BERRY_ATTR_UNK2); FreeToHeap(berryFile); } @@ -68,15 +68,15 @@ UnkStruct_ov16_022014A0 *ov16_022014A0(HeapID heapId) { } static void BerryPot_Clear(BerryPot *berryPot) { - berryPot->berryId = BERRY_NONE; + berryPot->berryId = BERRY_NONE; berryPot->growthStage = BERRY_POT_GROWTH_STAGE_NONE; - berryPot->unk_2 = 0; - berryPot->unk_4 = 0; - berryPot->unk_8 = 0; - berryPot->unk_6 = 0; - berryPot->moisture = 0; - berryPot->unk_A = 0; - berryPot->mulch = MULCH_NONE; + berryPot->unk_2 = 0; + berryPot->unk_4 = 0; + berryPot->unk_8 = 0; + berryPot->unk_6 = 0; + berryPot->moisture = 0; + berryPot->unk_A = 0; + berryPot->mulch = MULCH_NONE; } static u32 ov16_02201514(BerryPot *berryPot, UnkStruct_ov16_022014A0 *a1) { @@ -153,14 +153,14 @@ u16 ov16_02201604(BerryPot *berryPots, u32 idx) { } void ov16_02201610(BerryPot *berryPots, u32 idx, UnkStruct_ov16_022014A0 *a2, u32 berryId) { - berryPots[idx].berryId = berryId; + berryPots[idx].berryId = berryId; berryPots[idx].growthStage = BERRY_POT_GROWTH_STAGE_PLANTED; - berryPots[idx].unk_2 = CalculateBerryPotGrowthInterval(a2, berryId, berryPots[idx].mulch); - berryPots[idx].unk_4 = 0; - berryPots[idx].unk_8 = 0; - berryPots[idx].unk_6 = 0; - berryPots[idx].moisture = 100; - berryPots[idx].unk_A = 5; + berryPots[idx].unk_2 = CalculateBerryPotGrowthInterval(a2, berryId, berryPots[idx].mulch); + berryPots[idx].unk_4 = 0; + berryPots[idx].unk_8 = 0; + berryPots[idx].unk_6 = 0; + berryPots[idx].moisture = 100; + berryPots[idx].unk_A = 5; } void BerryPots_ResetPotMoisture(BerryPot *berryPots, u32 idx) { @@ -203,9 +203,9 @@ static void ov16_02201688(BerryPot *berryPot, UnkStruct_ov16_022014A0 *a1) { berryPot->growthStage++; return; case BERRY_POT_GROWTH_STAGE_BERRIES: - berryPot->unk_6 = 0; + berryPot->unk_6 = 0; berryPot->growthStage = BERRY_POT_GROWTH_STAGE_SPROUTED; - berryPot->unk_A = 5; + berryPot->unk_A = 5; berryPot->unk_8++; if (berryPot->unk_8 == ov16_02201588(berryPot)) { BerryPot_Clear(berryPot); @@ -219,8 +219,8 @@ static void ov16_022016F4(BerryPot *berryPot, UnkStruct_ov16_022014A0 *a1, int a return; } - int drainRate = CalculateBerryPotDrainRate(a1, berryPot->berryId, berryPot->mulch); - int r4 = (a2 + berryPot->unk_4) / 60; + int drainRate = CalculateBerryPotDrainRate(a1, berryPot->berryId, berryPot->mulch); + int r4 = (a2 + berryPot->unk_4) / 60; berryPot->unk_4 = (a2 + berryPot->unk_4) % 60; if (r4 == 0) { return; @@ -251,7 +251,7 @@ void ov16_02201760(BerryPot *berryPots, UnkStruct_ov16_022014A0 *a1, s32 a2) { } s32 growthInterval = CalculateBerryPotGrowthInterval(a1, berryPots[i].berryId, berryPots[i].mulch); - s32 unk = ov16_02201598(&berryPots[i]); + s32 unk = ov16_02201598(&berryPots[i]); if (a2 >= growthInterval * unk) { BerryPot_Clear(&berryPots[i]); diff --git a/src/overlay_16_02201948.c b/src/overlay_16_02201948.c index 791e134fee..1210056c76 100644 --- a/src/overlay_16_02201948.c +++ b/src/overlay_16_02201948.c @@ -25,16 +25,16 @@ static const u8 ov16_02201B60[] = { }; static const OVY_MGR_TEMPLATE ov16_02201B68 = { - .init = BerryPotsApp_Initialize, - .exec = BerryPotsApp_Run, - .exit = BerryPotsApp_Exit, + .init = BerryPotsApp_Initialize, + .exec = BerryPotsApp_Run, + .exit = BerryPotsApp_Exit, .ovy_id = FS_OVERLAY_ID_NONE, }; static const OVY_MGR_TEMPLATE ov16_02201B78 = { - .init = Bag_Init, - .exec = Bag_Main, - .exit = Bag_Exit, + .init = Bag_Init, + .exec = Bag_Main, + .exit = Bag_Exit, .ovy_id = FS_OVERLAY_ID(OVY_15), }; @@ -79,7 +79,7 @@ BOOL BerryPots_Init(OVY_MANAGER *manager, int *state) { UnkStruct_ov16_0220196C *unk = OverlayManager_CreateAndGetData(manager, sizeof(UnkStruct_ov16_0220196C), HEAP_ID_BERRY_POTS); MI_CpuFill8(unk, 0, sizeof(UnkStruct_ov16_0220196C)); unk->heapId = HEAP_ID_BERRY_POTS; - unk->args = OverlayManager_GetArgs(manager); + unk->args = OverlayManager_GetArgs(manager); ov16_02201A34(unk); return TRUE; diff --git a/src/overlay_22.c b/src/overlay_22.c index 0a1c8987e9..872f5e9d0e 100644 --- a/src/overlay_22.c +++ b/src/overlay_22.c @@ -10,11 +10,11 @@ extern Window *ov01_021EEC00(struct FieldSystem *fieldSystem, u8 type, u8 x, u8 y); BOOL ScrCmd_116(ScriptContext *ctx) { - u8 type = ScriptReadByte(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u8 type = ScriptReadByte(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); Window **window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_POINTS_BOX); - *window = ov01_021EEC00(ctx->fieldSystem, type, x, y); + *window = ov01_021EEC00(ctx->fieldSystem, type, x, y); return FALSE; } @@ -25,7 +25,7 @@ BOOL ScrCmd_117(ScriptContext *ctx) { } BOOL ScrCmd_118(ScriptContext *ctx) { - u8 type = ScriptReadByte(ctx); + u8 type = ScriptReadByte(ctx); Window **window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_POINTS_BOX); ov01_021EEC7C(ctx->fieldSystem, *window, type); return FALSE; @@ -33,36 +33,36 @@ BOOL ScrCmd_118(ScriptContext *ctx) { BOOL ScrCmd_GetCoinAmount(ScriptContext *ctx) { u16 *ptr = ScriptGetVarPointer(ctx); - *ptr = CheckCoins(Save_PlayerData_GetCoinsAddr(ctx->fieldSystem->saveData)); + *ptr = CheckCoins(Save_PlayerData_GetCoinsAddr(ctx->fieldSystem->saveData)); return FALSE; } BOOL ScrCmd_GiveCoins(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 amount = ScriptGetVar(ctx); + u16 amount = ScriptGetVar(ctx); GiveCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData), amount); return FALSE; } BOOL ScrCmd_TakeCoins(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 amount = ScriptGetVar(ctx); + u16 amount = ScriptGetVar(ctx); TakeCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData), amount); return FALSE; } BOOL ScrCmd_569(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *ptr = ScriptGetVarPointer(ctx); + u16 *ptr = ScriptGetVarPointer(ctx); TakeCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData), *ptr); return FALSE; } BOOL ScrCmd_CheckCoinsImmediate(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *ptr = ScriptGetVarPointer(ctx); - u32 amount = ScriptReadWord(ctx); - u16 coins = CheckCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData)); + u16 *ptr = ScriptGetVarPointer(ctx); + u32 amount = ScriptReadWord(ctx); + u16 coins = CheckCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData)); if (coins < amount) { *ptr = FALSE; } else { @@ -73,9 +73,9 @@ BOOL ScrCmd_CheckCoinsImmediate(ScriptContext *ctx) { BOOL ScrCmd_CheckCoinsVar(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *resultPtr = ScriptGetVarPointer(ctx); - u16 *amountPtr = ScriptGetVarPointer(ctx); - u16 coins = CheckCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData)); + u16 *resultPtr = ScriptGetVarPointer(ctx); + u16 *amountPtr = ScriptGetVarPointer(ctx); + u16 coins = CheckCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData)); if (coins < *amountPtr) { *resultPtr = FALSE; } else { @@ -86,31 +86,31 @@ BOOL ScrCmd_CheckCoinsVar(ScriptContext *ctx) { BOOL ScrCmd_CheckGiveCoins(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *ptr = ScriptGetVarPointer(ctx); - u16 amount = ScriptGetVar(ctx); - *ptr = CanGiveCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData), amount); + u16 *ptr = ScriptGetVarPointer(ctx); + u16 amount = ScriptGetVar(ctx); + *ptr = CanGiveCoins(Save_PlayerData_GetCoinsAddr(fieldSystem->saveData), amount); return FALSE; } BOOL ScrCmd_GiveAthletePoints(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 amount = ScriptGetVar(ctx); + u16 amount = ScriptGetVar(ctx); SavePokeathlon_AddAthletePoints(Save_Pokeathlon_Get(fieldSystem->saveData), amount); return FALSE; } BOOL ScrCmd_TakeAthletePoints(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 amount = ScriptGetVar(ctx); + u16 amount = ScriptGetVar(ctx); SavePokeathlon_SubAthletePoints(Save_Pokeathlon_Get(fieldSystem->saveData), amount); return FALSE; } BOOL ScrCmd_CheckAthletePoints(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *ptr = ScriptGetVarPointer(ctx); - u16 amount = ScriptGetVar(ctx); - u32 points = SavePokeathlon_GetAthletePoints(Save_Pokeathlon_Get(fieldSystem->saveData)); + u16 *ptr = ScriptGetVarPointer(ctx); + u16 amount = ScriptGetVar(ctx); + u32 points = SavePokeathlon_GetAthletePoints(Save_Pokeathlon_Get(fieldSystem->saveData)); if (points < amount) { *ptr = FALSE; } else { diff --git a/src/overlay_25.c b/src/overlay_25.c index 0311334141..85d31a1c62 100644 --- a/src/overlay_25.c +++ b/src/overlay_25.c @@ -34,24 +34,24 @@ #define MAX_TRAINER_HOUSE_LEVEL 50 static const MailMessageTemplate TrainerHouse_DefaultLoseMessage = { - .msg_bank = MAILMSG_BANK_0292_GMM, - .msg_no = msg_0292_00000, + .msg_bank = MAILMSG_BANK_0292_GMM, + .msg_no = msg_0292_00000, .ec_groups = { EC_GROUP_GREETINGS, EC_GROUP_NONE }, - .ec_words = { msg_0287_thanks, 0 }, + .ec_words = { msg_0287_thanks, 0 }, }; static const MailMessageTemplate TrainerHouse_DefaultWinMessage = { - .msg_bank = MAILMSG_BANK_0296_GMM, - .msg_no = msg_0296_00007, + .msg_bank = MAILMSG_BANK_0296_GMM, + .msg_no = msg_0296_00007, .ec_groups = { EC_GROUP_TRAINER, EC_GROUP_NONE }, - .ec_words = { msg_0285_victory, 0 }, + .ec_words = { msg_0285_victory, 0 }, }; static const MailMessageTemplate TrainerHouse_DefaultIntroMessage = { - .msg_bank = MAILMSG_BANK_0294_GMM, - .msg_no = msg_0294_00003, + .msg_bank = MAILMSG_BANK_0294_GMM, + .msg_no = msg_0294_00003, .ec_groups = { EC_GROUP_TRAINER, EC_GROUP_NONE }, - .ec_words = { msg_0285_match, 0 }, + .ec_words = { msg_0285_match, 0 }, }; #define DUMMY_TRAINER_HOUSE_MON \ @@ -73,12 +73,12 @@ static const MailMessageTemplate TrainerHouse_DefaultIntroMessage = { static const TrainerHouseSet ov25_02259D9C = { .trainer = { - .id = 0, - .sprite = SPRITE_MAN3, + .id = 0, + .sprite = SPRITE_MAN3, .language = GAME_LANGUAGE, - .version = GAME_VERSION, - .gender = PLAYER_GENDER_MALE, - .otName = { + .version = GAME_VERSION, + .gender = PLAYER_GENDER_MALE, + .otName = { CHAR_JP_HIRA_HI, CHAR_JP_HIRA_KA, CHAR_JP_HIRA_RU, @@ -150,7 +150,7 @@ void TrainerHouse_StartBattle(FieldSystem *fieldSystem, u32 trainerNum) { if (trainerNum == MAX_NUM_TRAINER_HOUSE_SETS) { TrainerHouseSet set; TrainerHouse_SetNames(&set); - setup = TrainerHouse_NewBattleSetup(fieldSystem, &set); + setup = TrainerHouse_NewBattleSetup(fieldSystem, &set); Trainer *trainer = &setup->trainer[BATTLER_ENEMY]; MailMsg_Init_FromTemplate(&trainer->winMessage, &TrainerHouse_DefaultWinMessage); MailMsg_Init_FromTemplate(&trainer->loseMessage, &TrainerHouse_DefaultLoseMessage); @@ -158,9 +158,9 @@ void TrainerHouse_StartBattle(FieldSystem *fieldSystem, u32 trainerNum) { setup = TrainerHouse_NewBattleSetup(fieldSystem, &trainerHouse->sets[trainerNum]); } fieldSystem->unkA0 = NULL; - u32 effect = BattleSetup_GetWildTransitionEffect(setup); - u32 bgm = BattleSetup_GetWildBattleMusic(setup); - u32 *winFlag = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); + u32 effect = BattleSetup_GetWildTransitionEffect(setup); + u32 bgm = BattleSetup_GetWildBattleMusic(setup); + u32 *winFlag = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); CallTask_020509F0(fieldSystem->taskman, setup, effect, bgm, winFlag); } @@ -204,7 +204,7 @@ static void TrainerHouse_SetNames(TrainerHouseSet *set) { } BOOL ScrCmd_ShowTrainerHouseIntroMessage(ScriptContext *ctx) { - u16 trainerNum = ScriptGetVar(ctx); + u16 trainerNum = ScriptGetVar(ctx); TrainerHouse *trainerHouse = Save_TrainerHouse_Get(ctx->fieldSystem->saveData); MailMessage intro; MailMessage temp; @@ -223,12 +223,12 @@ static BattleSetup *TrainerHouse_NewBattleSetup(FieldSystem *fieldSystem, Traine s32 i; BattleSetup *setup = BattleSetup_New(HEAP_ID_FIELD, BATTLE_TYPE_TRAINER | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_13); SaveData *saveData = fieldSystem->saveData; - Party *party = SaveArray_Party_Get(saveData); + Party *party = SaveArray_Party_Get(saveData); sub_02051D18(setup, fieldSystem, saveData, fieldSystem->location->mapId, fieldSystem->bagCursor, fieldSystem->unkB0); setup->battleBg = BATTLE_BG_BUILDING_1; - setup->terrain = TERRAIN_BUILDING; - Pokemon *mon = AllocMonZeroed(HEAP_ID_FIELD); - s32 partyCount = Party_GetCount(party); + setup->terrain = TERRAIN_BUILDING; + Pokemon *mon = AllocMonZeroed(HEAP_ID_FIELD); + s32 partyCount = Party_GetCount(party); Party_InitWithMaxSize(setup->party[BATTLER_PLAYER], PARTY_SIZE); for (i = 0; i < partyCount; i++) { CopyPokemonToPokemon(Party_GetMonByIndex(party, i), mon); @@ -252,13 +252,13 @@ static void TrainerHouse_CopyToPokemon(TrainerHouseMon *trainerHouseMon, Pokemon s32 i; u8 tempByte; ZeroMonData(mon); - u32 level = trainerHouseMon->level > MAX_TRAINER_HOUSE_LEVEL - ? MAX_TRAINER_HOUSE_LEVEL - : trainerHouseMon->level; - tempByte = level; + u32 level = trainerHouseMon->level > MAX_TRAINER_HOUSE_LEVEL + ? MAX_TRAINER_HOUSE_LEVEL + : trainerHouseMon->level; + tempByte = level; u32 species = trainerHouseMon->species; - u32 ivs = trainerHouseMon->ivsWord & 0x3fffffff; - u32 pid = trainerHouseMon->pid; + u32 ivs = trainerHouseMon->ivsWord & 0x3fffffff; + u32 pid = trainerHouseMon->pid; CreateMonWithFixedIVs(mon, species, tempByte, ivs, pid); tempByte = trainerHouseMon->form; SetMonData(mon, MON_DATA_FORM, &tempByte); @@ -290,8 +290,8 @@ static void TrainerHouse_CopyToPokemon(TrainerHouseMon *trainerHouseMon, Pokemon static void TrainerHouse_InitTrainer(TrainerHouseSet *set, Trainer *trainer) { MI_CpuFill8(trainer, 0, sizeof(Trainer)); trainer->data.trainerClass = GetUnionRoomAvatarAttrBySprite(set->trainer.gender, set->trainer.sprite, 1); - trainer->data.unk_2 = 0; - trainer->data.aiFlags = 0xffffffff; + trainer->data.unk_2 = 0; + trainer->data.aiFlags = 0xffffffff; CopyU16StringArray(trainer->name, set->trainer.otName); MailMsg_Copy(&trainer->winMessage, &set->trainer.winMessage); MailMsg_Copy(&trainer->loseMessage, &set->trainer.loseMessage); @@ -302,7 +302,7 @@ static void TrainerHouse_InitBattleSetup(BattleSetup *setup, TrainerHouseSet *se s32 i; TrainerHouse_InitTrainer(set, &setup->trainer[battlerId]); setup->trainerId[battlerId] = set->trainer.id; - Pokemon *tempMon = AllocMonZeroed(HEAP_ID_FIELD); + Pokemon *tempMon = AllocMonZeroed(HEAP_ID_FIELD); Party_InitWithMaxSize(setup->party[battlerId], PARTY_SIZE); TrainerHouseMon *trainerHouseMon = set->party; for (i = 0; i < PARTY_SIZE; trainerHouseMon++, i++) { diff --git a/src/overlay_26_022598C0.c b/src/overlay_26_022598C0.c index a84e3d7103..22e3d3719c 100644 --- a/src/overlay_26_022598C0.c +++ b/src/overlay_26_022598C0.c @@ -81,7 +81,7 @@ u16 TryGetRematchTrainerIdByBaseTrainerId(SaveData *saveData, u16 trainer_id) { return 0; } - u16 rematch_no = GetIndexOfFirstUnbeatenRematch(saveData, rematch_set_no); + u16 rematch_no = GetIndexOfFirstUnbeatenRematch(saveData, rematch_set_no); u32 checked_rematch_no = CheckUnlockedRematchGroup(saveData, rematch_set_no, rematch_no); return GetRematchTrainerIdByIndexPair(rematch_set_no, checked_rematch_no); } diff --git a/src/overlay_26_022599D0.c b/src/overlay_26_022599D0.c index 5e18d7f900..ce57ad60fd 100644 --- a/src/overlay_26_022599D0.c +++ b/src/overlay_26_022599D0.c @@ -36,8 +36,8 @@ void ov26_022599D8(FieldSystem *fieldSystem, LocalMapObject *last_talked) { static LocalMapObject *ov26_02259A24(FieldSystem *fieldSystem, LocalMapObject *a1, BOOL a2) { u32 num_events = Field_GetNumObjectEvents(fieldSystem); - u16 script = MapObject_GetScriptID(a1); - u32 trainer = ScriptNumToTrainerNum(script); + u16 script = MapObject_GetScriptID(a1); + u32 trainer = ScriptNumToTrainerNum(script); if (!TrainerNumIsDouble(trainer)) { return NULL; @@ -62,7 +62,7 @@ static LocalMapObject *ov26_02259A24(FieldSystem *fieldSystem, LocalMapObject *a case 7: case 8: case 1: { - u32 script2 = MapObject_GetScriptID(object); + u32 script2 = MapObject_GetScriptID(object); u32 trainer2 = ScriptNumToTrainerNum((u16)script2); if (script != script2 && (u32)trainer == trainer2) { return object; diff --git a/src/overlay_36.c b/src/overlay_36.c index 15cb8045d6..beccf0c161 100644 --- a/src/overlay_36.c +++ b/src/overlay_36.c @@ -52,40 +52,40 @@ static void Continue_LoadSaveData_HandleError(HeapID heapId, SaveData *saveData) static void NewGame_InitSaveData(HeapID heapId, SaveData *saveData); const OVY_MGR_TEMPLATE ov36_App_MainMenu_SelectOption_NewGame = { - .init = ov36_TitleScreen_NewGame_AppInit, - .exec = ov36_TitleScreen_NewGame_AppExec, - .exit = ov36_TitleScreen_NewGame_AppExit, + .init = ov36_TitleScreen_NewGame_AppInit, + .exec = ov36_TitleScreen_NewGame_AppExec, + .exit = ov36_TitleScreen_NewGame_AppExit, .ovy_id = FS_OVERLAY_ID_NONE, }; const OVY_MGR_TEMPLATE ov36_App_InitGameState_AfterOakSpeech = { - .init = ov36_App_InitGameState_AfterOakSpeech_AppInit, - .exec = ov36_App_InitGameState_AfterOakSpeech_AppExec, - .exit = ov36_App_InitGameState_AfterOakSpeech_AppExit, + .init = ov36_App_InitGameState_AfterOakSpeech_AppInit, + .exec = ov36_App_InitGameState_AfterOakSpeech_AppExec, + .exit = ov36_App_InitGameState_AfterOakSpeech_AppExit, .ovy_id = FS_OVERLAY_ID_NONE, }; const OVY_MGR_TEMPLATE ov36_App_MainMenu_SelectOption_Continue = { - .init = ov36_App_MainMenu_SelectOption_Continue_AppInit, - .exec = ov36_App_MainMenu_SelectOption_Continue_AppExec, - .exit = ov36_App_MainMenu_SelectOption_Continue_AppExit, + .init = ov36_App_MainMenu_SelectOption_Continue_AppInit, + .exec = ov36_App_MainMenu_SelectOption_Continue_AppExec, + .exit = ov36_App_MainMenu_SelectOption_Continue_AppExit, .ovy_id = FS_OVERLAY_ID_NONE, }; static const MailMessageTemplate sMailMsgTemplates[2] = { { // ADVENTURE! EXCITED! - .msg_bank = MAILMSG_BANK_0292_GMM, - .msg_no = msg_0292_00004, + .msg_bank = MAILMSG_BANK_0292_GMM, + .msg_no = msg_0292_00004, .ec_groups = { EC_GROUP_LIFESTYLE, EC_GROUP_FEELINGS }, - .ec_words = { EC_WORD_LIFESTYLE_ADVENTURE - EC_WORDS_LIFESTYLE_MIN, EC_WORD_FEELINGS_EXCITED - EC_WORDS_FEELINGS_MIN }, + .ec_words = { EC_WORD_LIFESTYLE_ADVENTURE - EC_WORDS_LIFESTYLE_MIN, EC_WORD_FEELINGS_EXCITED - EC_WORDS_FEELINGS_MIN }, }, { // I love POKEMON! - .msg_bank = MAILMSG_BANK_0293_GMM, - .msg_no = msg_0293_00001, + .msg_bank = MAILMSG_BANK_0293_GMM, + .msg_no = msg_0293_00001, .ec_groups = { EC_GROUP_UNION, 0xFF }, - .ec_words = { EC_WORD_UNION_POKEMON - EC_WORDS_UNION_MIN, 0 }, + .ec_words = { EC_WORD_UNION_POKEMON - EC_WORDS_UNION_MIN, 0 }, }, }; @@ -124,7 +124,7 @@ BOOL ov36_App_InitGameState_AfterOakSpeech_AppInit(OVY_MANAGER *man, int *state) BOOL ov36_App_InitGameState_AfterOakSpeech_AppExec(OVY_MANAGER *man, int *state) { #pragma unused(state) struct UnkStruct_02111868_sub *unk_work = OverlayManager_GetArgs(man); - SaveData *saveData = unk_work->saveData; + SaveData *saveData = unk_work->saveData; InitGameStateAfterOakSpeech_Internal(HEAPID_OV36, saveData, TRUE); sub_0201838C(Save_PlayerData_GetIGTAddr(saveData)); @@ -149,8 +149,8 @@ BOOL ov36_App_MainMenu_SelectOption_Continue_AppInit(OVY_MANAGER *man, int *stat BOOL ov36_App_MainMenu_SelectOption_Continue_AppExec(OVY_MANAGER *man, int *state) { struct UnkStruct_02111868_sub *unk_work = OverlayManager_GetArgs(man); - SaveData *saveData = unk_work->saveData; - SysInfo *sys_info = Save_SysInfo_Get(saveData); + SaveData *saveData = unk_work->saveData; + SysInfo *sys_info = Save_SysInfo_Get(saveData); Continue_LoadSaveData_HandleError(HEAPID_OV36, saveData); @@ -189,7 +189,7 @@ static void InitGameStateAfterOakSpeech_Internal(HeapID heapId, SaveData *saveDa sub_020674BC(saveData); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); - u32 rand = MTRandom(); + u32 rand = MTRandom(); if (set_trainer_id) { PlayerProfile_SetTrainerID(profile, rand); @@ -209,18 +209,18 @@ static void InitGameStateAfterOakSpeech_Internal(HeapID heapId, SaveData *saveDa // Put an email from your friend into your PC. friend_names_msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0445_bin, HEAP_ID_3); - Mailbox *mailbox = Save_Mailbox_Get(saveData); - Pokemon *mon = AllocMonZeroed(HEAP_ID_3); + Mailbox *mailbox = Save_Mailbox_Get(saveData); + Pokemon *mon = AllocMonZeroed(HEAP_ID_3); CreateMon(mon, SPECIES_MARILL, 1, 0, FALSE, 0, OT_ID_PLAYER_ID, 0); Mail *mail; if (PlayerProfile_GetTrainerGender(profile) == PLAYER_GENDER_MALE) { author_name = NewString_ReadMsgData(friend_names_msgdata, msg_0445_00001); - mail = CreateKenyaMail(mon, MAIL_AIR, MON_FEMALE, author_name, 0); + mail = CreateKenyaMail(mon, MAIL_AIR, MON_FEMALE, author_name, 0); } else { author_name = NewString_ReadMsgData(friend_names_msgdata, msg_0445_00000); - mail = CreateKenyaMail(mon, MAIL_AIR, MON_MALE, author_name, 0); + mail = CreateKenyaMail(mon, MAIL_AIR, MON_MALE, author_name, 0); } MailMessage mail_message; diff --git a/src/overlay_55.c b/src/overlay_55.c index cca54aef9e..6109aaca6f 100644 --- a/src/overlay_55.c +++ b/src/overlay_55.c @@ -22,16 +22,16 @@ extern BOOL EasyChat_Main(OVY_MANAGER *, int *); extern BOOL EasyChat_Exit(OVY_MANAGER *, int *); static const OVY_MGR_TEMPLATE ov55_021E5BF4 = { - .init = ov56_021E5C20, - .exec = ov56_021E5C9C, - .exit = ov56_021E5CB4, + .init = ov56_021E5C20, + .exec = ov56_021E5C9C, + .exit = ov56_021E5CB4, .ovy_id = FS_OVERLAY_ID(OVY_56), }; static const OVY_MGR_TEMPLATE ov55_021E5C04 = { - .init = EasyChat_Init, - .exec = EasyChat_Main, - .exit = EasyChat_Exit, + .init = EasyChat_Init, + .exec = EasyChat_Main, + .exit = EasyChat_Exit, .ovy_id = FS_OVERLAY_ID(OVY_102), }; @@ -58,8 +58,8 @@ BOOL ov55_UnkApp_Init(OVY_MANAGER *manager, int *state) { overlayData = OverlayManager_CreateAndGetData(manager, sizeof(UnkStruct_ov55_021E5924), HEAP_ID_OV55); MI_CpuFill8(overlayData, 0, sizeof(UnkStruct_ov55_021E5924)); - overlayData->heapId = HEAP_ID_OV55; - overlayData->unk10 = ov55_021E5B08(args->mail, HEAP_ID_OV55); + overlayData->heapId = HEAP_ID_OV55; + overlayData->unk10 = ov55_021E5B08(args->mail, HEAP_ID_OV55); overlayData->unk10->options = Save_PlayerData_GetOptionsAddr(args->saveData); if (args->unk0 == 1) { overlayData->unk10->mailType = args->mailType; @@ -67,20 +67,20 @@ BOOL ov55_UnkApp_Init(OVY_MANAGER *manager, int *state) { if (overlayData->unk10->mailType >= NUM_MAIL) { overlayData->unk10->mailType = MAIL_GRASS; } - overlayData->unk10->unk0 = args->unk0; + overlayData->unk10->unk0 = args->unk0; overlayData->unk10->menuInputStateMgr = args->menuInputStatePtr; return TRUE; } BOOL ov55_UnkApp_Main(OVY_MANAGER *manager, int *state) { UnkStruct_ov55_021E5924 *overlayData = OverlayManager_GetData(manager); - UseMailArgs *args = OverlayManager_GetArgs(manager); + UseMailArgs *args = OverlayManager_GetArgs(manager); switch (*state) { case 0: overlayData->unk10->unk0 = args->unk0; - overlayData->unkC = OverlayManager_New(&ov55_021E5BF4, overlayData->unk10, overlayData->heapId); - *state = 1; + overlayData->unkC = OverlayManager_New(&ov55_021E5BF4, overlayData->unk10, overlayData->heapId); + *state = 1; break; case 1: @@ -125,7 +125,7 @@ BOOL ov55_UnkApp_Main(OVY_MANAGER *manager, int *state) { } sub_02090D20(overlayData->unk8, &overlayData->unk14); overlayData->unkC = OverlayManager_New(&ov55_021E5C04, overlayData->unk8, overlayData->heapId); - *state = 4; + *state = 4; break; case 4: @@ -155,13 +155,13 @@ static UnkStruct_ov55_021E5B08 *ov55_021E5B08(Mail *mail, HeapID heapId) { UnkStruct_ov55_021E5B08 *ret = AllocFromHeap(heapId, sizeof(UnkStruct_ov55_021E5B08)); MI_CpuFill8(ret, 0, sizeof(UnkStruct_ov55_021E5B08)); - ret->unk0 = 0; - ret->mailOTID = Mail_GetOTID(mail); + ret->unk0 = 0; + ret->mailOTID = Mail_GetOTID(mail); ret->mailAuthorName = String_New(PLAYER_NAME_LENGTH + 1, heapId); CopyU16ArrayToString(ret->mailAuthorName, Mail_GetAuthorNamePtr(mail)); - ret->mailType = Mail_GetType(mail); + ret->mailType = Mail_GetType(mail); ret->mailLanguage = Mail_GetLanguage(mail); - ret->mailVersion = Mail_GetVersion(mail); + ret->mailVersion = Mail_GetVersion(mail); for (u16 i = 0; i < 3; i++) { ret->unk18[i] = sub_0202B404(mail, (u8)i, 2, sub_0202B4E4(mail)); diff --git a/src/overlay_94.c b/src/overlay_94.c index c56b817bdc..f45399e215 100644 --- a/src/overlay_94.c +++ b/src/overlay_94.c @@ -50,7 +50,7 @@ void PartyMenu_InitIconFormChangeData(PartyMenu *partyMenu) { BOOL PartyMenu_AnimateIconFormChange(PartyMenu *partyMenu) { IconFormChangeData *work = partyMenu->iconFormChange; - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); switch (work->state) { case 0: @@ -59,12 +59,12 @@ BOOL PartyMenu_AnimateIconFormChange(PartyMenu *partyMenu) { case SPECIES_GIRATINA: Mon_UpdateGiratinaForm(mon); work->duration = 65; - work->fileId = NARC_particle_giratina; + work->fileId = NARC_particle_giratina; break; case SPECIES_SHAYMIN: Mon_UpdateShayminForm(mon, SHAYMIN_SKY); work->duration = 35; - work->fileId = NARC_particle_shaymin; + work->fileId = NARC_particle_shaymin; break; case SPECIES_ROTOM: default: diff --git a/src/overlay_bug_contest.c b/src/overlay_bug_contest.c index 3afce7e647..4e74c04dc2 100644 --- a/src/overlay_bug_contest.c +++ b/src/overlay_bug_contest.c @@ -40,12 +40,12 @@ BugContest *BugContest_New(FieldSystem *fieldSystem, u32 weekday) { bugContest = (BugContest *)AllocFromHeap(HEAP_ID_3, sizeof(BugContest)); MI_CpuClear8(bugContest, sizeof(BugContest)); - bugContest->heapId = HEAP_ID_3; - bugContest->saveData = fieldSystem->saveData; - bugContest->sport_balls = 20; - bugContest->mon = AllocMonZeroed(bugContest->heapId); + bugContest->heapId = HEAP_ID_3; + bugContest->saveData = fieldSystem->saveData; + bugContest->sport_balls = 20; + bugContest->mon = AllocMonZeroed(bugContest->heapId); bugContest->national_dex = Pokedex_GetNatDexFlag(Save_Pokedex_Get(bugContest->saveData)); - bugContest->day_of_week = weekday; + bugContest->day_of_week = weekday; BugContest_BackUpParty(bugContest); BugContest_InitOpponents(bugContest); BugContest_InitEncounters(bugContest); @@ -66,9 +66,9 @@ void BugContest_Judge(BugContest *bugContest) { BugContestant *player; // Judge the player's caught Pokemon - player = &bugContest->contestants[BUGCONTESTANT_PLAYER]; - player->id = BUGCONTESTANT_PLAYER; - player->score = BugContest_JudgePlayerMon(bugContest, bugContest->mon); + player = &bugContest->contestants[BUGCONTESTANT_PLAYER]; + player->id = BUGCONTESTANT_PLAYER; + player->score = BugContest_JudgePlayerMon(bugContest, bugContest->mon); player->data.species = GetMonData(bugContest->mon, MON_DATA_SPECIES, NULL); // Init the rankings list @@ -78,17 +78,17 @@ void BugContest_Judge(BugContest *bugContest) { // Sort the rankings list by selection sort for (i = 0; i < BUGCONTESTANT_COUNT - 1; i++) { - temp = bugContest->ranking[i]; + temp = bugContest->ranking[i]; cur_max = i; - score = bugContest->contestants[bugContest->ranking[i]].score; + score = bugContest->contestants[bugContest->ranking[i]].score; for (j = i + 1; j < BUGCONTESTANT_COUNT; j++) { score2 = bugContest->contestants[bugContest->ranking[j]].score; if (score2 >= score) { cur_max = j; - score = score2; + score = score2; } } - bugContest->ranking[i] = bugContest->ranking[cur_max]; + bugContest->ranking[i] = bugContest->ranking[cur_max]; bugContest->ranking[cur_max] = temp; } @@ -181,8 +181,8 @@ ENC_SLOT *BugContest_GetEncounterSlot(BugContest *bugContest, HeapID heapId) { break; } } - slot->species = bugContest->encounters[i].species; - modulo = bugContest->encounters[i].lvlmax - bugContest->encounters[i].lvlmin + 1; + slot->species = bugContest->encounters[i].species; + modulo = bugContest->encounters[i].lvlmax - bugContest->encounters[i].lvlmin + 1; slot->level_min = (LCRandom() % modulo) + bugContest->encounters[i].lvlmin; slot->level_max = 0; return slot; @@ -194,7 +194,7 @@ void BugContest_BackUpParty(BugContest *bugContest) { bugContest->party_cur = SaveArray_Party_Get(bugContest->saveData); Party_Copy(bugContest->party_cur, bugContest->party_bak); bugContest->party_cur_num = Party_GetCount(bugContest->party_cur); - bugContest->lead_mon_idx = Save_GetPartyLeadAlive(bugContest->saveData); + bugContest->lead_mon_idx = Save_GetPartyLeadAlive(bugContest->saveData); // You can only enter the contest with one pokemon, so // remove any Pokemon other than the first that can battle. for (i = 0; i < bugContest->party_cur_num - 1; i++) { @@ -256,7 +256,7 @@ void BugContest_InitOpponents(BugContest *bugContest) { return; } flen = FS_GetLength(&file); - bin = AllocFromHeapAtEnd(bugContest->heapId, flen); + bin = AllocFromHeapAtEnd(bugContest->heapId, flen); idxs = AllocFromHeapAtEnd(bugContest->heapId, 8); FS_ReadFile(&file, bin, flen); for (i = 0; i < BUGCONTESTANT_NPC_COUNT; i++) { @@ -267,8 +267,8 @@ void BugContest_InitOpponents(BugContest *bugContest) { rand = LCRandom() % 10; } while (BugContest_ContestantIsRegisteredN(bugContest, rand, i)); bugContest->contestants[i].id = rand; - curbin = &bin[8 * bugContest->contestants[i].id]; - k = 0; + curbin = &bin[8 * bugContest->contestants[i].id]; + k = 0; for (j = 0; j < 8; j++) { if (curbin[j].national && !bugContest->national_dex) { continue; @@ -279,7 +279,7 @@ void BugContest_InitOpponents(BugContest *bugContest) { idxs[k++] = j; } MI_CpuCopy8(&curbin[idxs[LCRandom() % k]], &bugContest->contestants[i].data, sizeof(BugContestantData)); - score = (LCRandom() % (2 * bugContest->contestants[i].data.randmod)) - bugContest->contestants[i].data.randmod; + score = (LCRandom() % (2 * bugContest->contestants[i].data.randmod)) - bugContest->contestants[i].data.randmod; bugContest->contestants[i].score = score + bugContest->contestants[i].data.score; } FreeToHeap(idxs); @@ -298,7 +298,7 @@ void BugContest_InitEncounters(BugContest *bugContest) { GF_ASSERT(0); return; } - flen = FS_GetLength(&file); + flen = FS_GetLength(&file); bugmon = AllocFromHeapAtEnd(bugContest->heapId, flen); FS_ReadFile(&file, bugmon, flen); if (bugContest->national_dex) { diff --git a/src/overlay_manager.c b/src/overlay_manager.c index 8f611b51bd..6bf1de2649 100644 --- a/src/overlay_manager.c +++ b/src/overlay_manager.c @@ -5,14 +5,14 @@ OVY_MANAGER *OverlayManager_New(const OVY_MGR_TEMPLATE *template, void *args, HeapID heapId) { OVY_MANAGER *ret; - ret = AllocFromHeap(heapId, sizeof(OVY_MANAGER)); - ret->template = *template; + ret = AllocFromHeap(heapId, sizeof(OVY_MANAGER)); + ret->template = *template; ret->exec_state = 0; ret->proc_state = 0; - ret->args = args; - ret->data = NULL; - ret->unk_20 = 0; - ret->unk_24 = 0; + ret->args = args; + ret->data = NULL; + ret->unk_20 = 0; + ret->unk_24 = 0; return ret; } @@ -23,7 +23,7 @@ void OverlayManager_Delete(OVY_MANAGER *man) { void *OverlayManager_CreateAndGetData(OVY_MANAGER *man, u32 size, HeapID heapId) { void *data; - data = AllocFromHeap(heapId, size); + data = AllocFromHeap(heapId, size); man->data = data; return data; } diff --git a/src/overlay_mic_test.c b/src/overlay_mic_test.c index 1642c148d9..c7540bbca6 100644 --- a/src/overlay_mic_test.c +++ b/src/overlay_mic_test.c @@ -119,16 +119,16 @@ static void MicTest_EndTasks(MicTestData *micTest); static int MicTest_CheckReturn(MicTestData *data); static const GraphicsBanks sMicTestGraphicsBanks = { - .bg = GX_VRAM_BG_128_A, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_128_C, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_128_B, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_16_I, + .bg = GX_VRAM_BG_128_A, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_128_C, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_128_B, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_16_I, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE }; typedef struct UnkStruct_021E6728 { @@ -142,105 +142,105 @@ typedef struct UnkStruct_021E6728 { static const UnkStruct_021E6728 ov62_021E6728[] = { { .bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = 1, - .colorMode = 0, + .baseTile = 0, + .size = 1, + .colorMode = 0, .screenBase = 0x1F, - .charBase = 0, - .bgExtPltt = 0, - .priority = 0, - .areaOver = 0, - .dummy = 0, - .mosaic = 0, + .charBase = 0, + .bgExtPltt = 0, + .priority = 0, + .areaOver = 0, + .dummy = 0, + .mosaic = 0, }, - .bgId = 0, + .bgId = 0, .unk1D = 0, .unk1E = 0, .unk1F = 0, }, { .bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = 1, - .colorMode = 0, + .baseTile = 0, + .size = 1, + .colorMode = 0, .screenBase = 0x1E, - .charBase = 1, - .bgExtPltt = 0, - .priority = 1, - .areaOver = 0, - .dummy = 0, - .mosaic = 0, + .charBase = 1, + .bgExtPltt = 0, + .priority = 1, + .areaOver = 0, + .dummy = 0, + .mosaic = 0, }, - .bgId = 1, + .bgId = 1, .unk1D = 0, .unk1E = 0, .unk1F = 0, }, { .bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = 1, - .colorMode = 0, + .baseTile = 0, + .size = 1, + .colorMode = 0, .screenBase = 0x1D, - .charBase = 2, - .bgExtPltt = 0, - .priority = 2, - .areaOver = 0, - .dummy = 0, - .mosaic = 0, + .charBase = 2, + .bgExtPltt = 0, + .priority = 2, + .areaOver = 0, + .dummy = 0, + .mosaic = 0, }, - .bgId = 2, + .bgId = 2, .unk1D = 0, .unk1E = 0, .unk1F = 0, }, { .bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = 1, - .colorMode = 0, + .baseTile = 0, + .size = 1, + .colorMode = 0, .screenBase = 0x1F, - .charBase = 0, - .bgExtPltt = 0, - .priority = 0, - .areaOver = 0, - .dummy = 0, - .mosaic = 0, + .charBase = 0, + .bgExtPltt = 0, + .priority = 0, + .areaOver = 0, + .dummy = 0, + .mosaic = 0, }, - .bgId = 4, + .bgId = 4, .unk1D = 0, .unk1E = 0, .unk1F = 0, }, { .bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = 1, - .colorMode = 0, + .baseTile = 0, + .size = 1, + .colorMode = 0, .screenBase = 0x1E, - .charBase = 1, - .bgExtPltt = 0, - .priority = 1, - .areaOver = 0, - .dummy = 0, - .mosaic = 0, + .charBase = 1, + .bgExtPltt = 0, + .priority = 1, + .areaOver = 0, + .dummy = 0, + .mosaic = 0, }, - .bgId = 5, + .bgId = 5, .unk1D = 0, .unk1E = 0, .unk1F = 0, @@ -249,64 +249,64 @@ static const UnkStruct_021E6728 ov62_021E6728[] = { static const UnkTemplate_0200D748 ov62_021E67C8[5] = { { - .x = 0x40, - .y = 0x60, - .z = 0, - .animation = 0, + .x = 0x40, + .y = 0x60, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { 0xA01, 0xA03, 0xA02, 0xA04, 0, 0 }, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { 0xA01, 0xA03, 0xA02, 0xA04, 0, 0 }, + .bgPriority = 0, + .vramTransfer = 0, }, { - .x = 0xC0, - .y = 0x60, - .z = 0, - .animation = 0, + .x = 0xC0, + .y = 0x60, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { 0xA01, 0xA03, 0xA02, 0xA04, 0, 0 }, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { 0xA01, 0xA03, 0xA02, 0xA04, 0, 0 }, + .bgPriority = 0, + .vramTransfer = 0, }, { - .x = 0x80, - .y = 0x60, - .z = 0, - .animation = 0, + .x = 0x80, + .y = 0x60, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { 0xB01, 0xB03, 0xB02, 0xB04, 0, 0 }, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { 0xB01, 0xB03, 0xB02, 0xB04, 0, 0 }, + .bgPriority = 0, + .vramTransfer = 0, }, { - .x = 0xD8, - .y = 0xB0, - .z = 0, - .animation = 0, + .x = 0xD8, + .y = 0xB0, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DSUB, - .resIdList = { 0xD01, 0xD03, 0xD02, 0xD04, 1, 0 }, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DSUB, + .resIdList = { 0xD01, 0xD03, 0xD02, 0xD04, 1, 0 }, + .bgPriority = 0, + .vramTransfer = 0, }, { - .x = 0, - .y = 0, - .z = 0, - .animation = 0, + .x = 0, + .y = 0, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { 0xC01, 0xC03, 0xC02, 0xC04, 0, 0 }, - .bgPriority = 0, - .vramTransfer = 0, + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { 0xC01, 0xC03, 0xC02, 0xC04, 0, 0 }, + .bgPriority = 0, + .vramTransfer = 0, }, }; static const u32 ov62_021E6694[7] = { 0, 1, 2, 3, 4, 4, 4 }; @@ -317,14 +317,14 @@ static const TouchscreenHitbox sMicTestTouchscreenHitboxes[] = { }; static const OamManagerParam sMicTestOamManParam = { - .fromOBJmain = 0, - .numOBJmain = 128, + .fromOBJmain = 0, + .numOBJmain = 128, .fromAffineMain = 0, - .numAffineMain = 32, - .fromOBJsub = 0, - .numOBJsub = 128, - .fromAffineSub = 0, - .numAffineSub = 32 + .numAffineMain = 32, + .fromOBJsub = 0, + .numOBJsub = 128, + .fromAffineSub = 0, + .numAffineSub = 32 }; static const OamCharTransferParam ov62_021E6668 = { @@ -345,9 +345,9 @@ static const SpriteResourceCountsListUnion sMicTestResCountList = { }; static const GraphicsModes sMicTestGraphicsMode = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D }; @@ -364,33 +364,33 @@ typedef struct MicTestTextBox { } MicTestTextBox; static const MicTestTextBox sMicTestTextBoxes[3] = { - { .bgId = 0, - .x = 1, - .y = 1, - .width = 9, - .height = 3, - .palNum = 0, + { .bgId = 0, + .x = 1, + .y = 1, + .width = 9, + .height = 3, + .palNum = 0, .baseTile = 1, - .fontId = 0, - .color = MAKE_TEXT_COLOR(15, 2, 0) }, - { .bgId = 4, - .x = 5, - .y = 8, - .width = 22, - .height = 5, - .palNum = 0, + .fontId = 0, + .color = MAKE_TEXT_COLOR(15, 2, 0) }, + { .bgId = 4, + .x = 5, + .y = 8, + .width = 22, + .height = 5, + .palNum = 0, .baseTile = 1, - .fontId = 0, - .color = MAKE_TEXT_COLOR(15, 2, 0) }, - { .bgId = 4, - .x = 24, - .y = 21, - .width = 6, - .height = 2, - .palNum = 0, + .fontId = 0, + .color = MAKE_TEXT_COLOR(15, 2, 0) }, + { .bgId = 4, + .x = 24, + .y = 21, + .width = 6, + .height = 2, + .palNum = 0, .baseTile = 0x6F, - .fontId = 4, - .color = MAKE_TEXT_COLOR(14, 15, 0) }, + .fontId = 4, + .color = MAKE_TEXT_COLOR(14, 15, 0) }, }; const OVY_MGR_TEMPLATE gApplication_MicTest = { MicTest_Init, MicTest_Main, MicTest_Exit, FS_OVERLAY_ID_NONE }; @@ -450,7 +450,7 @@ static BOOL MicTest_Main(OVY_MANAGER *overlayMan, int *state) { } static void MicTest_StartTask(MicTestTaskManager *taskMan, MicTestData *micTest, MicTestTask task) { - taskMan->micTest = micTest; + taskMan->micTest = micTest; taskMan->isFinished = FALSE; MicTest_SetTask(taskMan, task); } @@ -462,7 +462,7 @@ static void MicTestTaskMan_Run(MicTestTaskManager *taskMan) { } static void MicTest_SetTask(MicTestTaskManager *taskMan, MicTestTask task) { - taskMan->task = task; + taskMan->task = task; taskMan->state = 0; } @@ -764,13 +764,13 @@ static void ov62_021E61AC(MicTestInput *input, HeapID heapId, MICCallback a2, Mi MI_CpuFill8(data, 0, 0x120); input->unk1C = data; - input->mic.type = MIC_SAMPLING_TYPE_8BIT; - input->mic.buffer = (void *)((((u32)data) + 0x1F) & ~0x1F); // alignment to 32-bit boundary - input->mic.size = 256; - input->mic.rate = 0x1040; - input->mic.loop_enable = TRUE; + input->mic.type = MIC_SAMPLING_TYPE_8BIT; + input->mic.buffer = (void *)((((u32)data) + 0x1F) & ~0x1F); // alignment to 32-bit boundary + input->mic.size = 256; + input->mic.rate = 0x1040; + input->mic.loop_enable = TRUE; input->mic.full_callback = a2; - input->mic.full_arg = micTest; + input->mic.full_arg = micTest; input->unk34 = sub_02005518(); } @@ -823,9 +823,9 @@ static s32 MicTest_AverageMicInput(MicTestInput *input) { int i; u8 *buffer; - int cnt = 0; + int cnt = 0; int size = input->mic.size - 1; - buffer = input->mic.buffer; + buffer = input->mic.buffer; for (i = 0; i < size; i++) { if (buffer[i] < 0x80) { @@ -854,9 +854,9 @@ static void MicTest_MicrophoneCallback(MICResult result, void *data) { u32 volume; if (unkF0->curVolume < volumeAvg) { - volume = MicTest_GetVolumeBracket(volumeAvg); + volume = MicTest_GetVolumeBracket(volumeAvg); unkF0->curVolume = volumeAvg; - unkF0->unk24 = 1; + unkF0->unk24 = 1; } else { volume = MicTest_GetVolumeBracket(unkF0->curVolume); unkF0->curVolume -= 2; @@ -920,7 +920,7 @@ static u32 ov62_021E63D0(MicTestData *micTest) { static BOOL ov62_021E63E8(MicTestData *micTest, HeapID heapId, s16 x, s16 y) { UnkImageStruct *flag = 0; - MicTestSub_24 *args = NULL; + MicTestSub_24 *args = NULL; for (int i = 0; i < 3; i++) { if (micTest->unk24[i].task == NULL) { args = &micTest->unk24[i]; @@ -941,7 +941,7 @@ static BOOL ov62_021E63E8(MicTestData *micTest, HeapID heapId, s16 x, s16 y) { } static void ov62_021E6480(UnkImageStruct *a0, MicTestSub_24 *args, s16 x, s16 y, s32 z, s32 r1, s32 r2, BOOL a7) { - args->task = SysTask_CreateOnMainQueue(ov62_021E6570, args, 0); + args->task = SysTask_CreateOnMainQueue(ov62_021E6570, args, 0); MicTestSub_24 *data = SysTask_GetData(args->task); data->unk0 = a0; @@ -951,9 +951,9 @@ static void ov62_021E6480(UnkImageStruct *a0, MicTestSub_24 *args, s16 x, s16 y, data->unk8.y = FX32_CONST(y); data->unk8.z = 0; - s32 sine = GF_SinDegNoWrap(r1 + 90); + s32 sine = GF_SinDegNoWrap(r1 + 90); data->unk14.x = FX_MUL(z, sine); - sine = GF_SinDegNoWrap(r1); + sine = GF_SinDegNoWrap(r1); data->unk14.y = -FX_MUL(z, sine); data->unk14.z = 0; @@ -976,8 +976,8 @@ static void ov62_021E6570(SysTask *task, void *_data) { VEC_Add(&data->unk8, &data->unk14, &data->unk8); - s16 x = data->unk8.x >> FX32_SHIFT; - s16 y = data->unk8.y >> FX32_SHIFT; + s16 x = data->unk8.x >> FX32_SHIFT; + s16 y = data->unk8.y >> FX32_SHIFT; data->unk20 = data->unk20 + data->unk24; while (data->unk20 > FX32_CONST(360)) { diff --git a/src/overlay_trainer_card.c b/src/overlay_trainer_card.c index 1a69242ab7..729ea1b332 100644 --- a/src/overlay_trainer_card.c +++ b/src/overlay_trainer_card.c @@ -41,9 +41,9 @@ BOOL TrainerCard_Init(OVY_MANAGER *man, int *state) { TrainerCardAppState *data = OverlayManager_CreateAndGetData(man, sizeof(TrainerCardAppState), HEAP_ID_TRAINER_CARD); MI_CpuClear8(data, sizeof(TrainerCardAppState)); - data->heapId = HEAP_ID_TRAINER_CARD; + data->heapId = HEAP_ID_TRAINER_CARD; data->parentData = ptr; - data->unk10 = ptr; + data->unk10 = ptr; return TRUE; } @@ -117,7 +117,7 @@ static int TCardAppRunStep_SignatureExec(TrainerCardAppState *work) { return TRAINERCARD_RUN_SIGNATURE_EXEC; } - ptr = Save_TrainerCard_Get(work->parentData->saveData); + ptr = Save_TrainerCard_Get(work->parentData->saveData); work->parentData->signatureExists = TrainerCard_SignatureExists(ptr); MI_CpuCopy8(TrainerCard_GetSignature(ptr), work->parentData->signature, sizeof(work->parentData->signature)); return TRAINERCARD_RUN_INIT; diff --git a/src/pal_park.c b/src/pal_park.c index b1dc79b7da..901a3c9bc6 100644 --- a/src/pal_park.c +++ b/src/pal_park.c @@ -66,8 +66,8 @@ void PalPark_InitFromSave(FieldSystem *fieldSystem) { void PalPark_StopClock(FieldSystem *fieldSystem) { struct PalParkLocal *local = &sPalParkLocalState; - GameStats *stats = Save_GameStats_Get(fieldSystem->saveData); - s64 elapsed = GF_RTC_TimeDelta(local->timestamp, GF_RTC_DateTimeToSec()); + GameStats *stats = Save_GameStats_Get(fieldSystem->saveData); + s64 elapsed = GF_RTC_TimeDelta(local->timestamp, GF_RTC_DateTimeToSec()); if (elapsed < 1000) { local->timeRemainingFactor = 2 * (1000 - elapsed); } else { @@ -116,7 +116,7 @@ static void LoadMonPalParkStats(u16 species, u8 *dest) { static void InitPalParkMonsData(FieldSystem *fieldSystem, struct PalParkLocal *palpark) { struct MigratedPokemonSav *migrated = Save_MigratedPokemon_Get(fieldSystem->saveData); - Pokemon *mon = AllocMonZeroed(HEAP_ID_4); + Pokemon *mon = AllocMonZeroed(HEAP_ID_4); u8 narc_data[6]; u16 species; for (int i = 0; i < PARTY_SIZE; ++i) { @@ -130,9 +130,9 @@ static void InitPalParkMonsData(FieldSystem *fieldSystem, struct PalParkLocal *p palpark->mons[i].area = narc_data[PPMONDAT_OFFSET_WATER_SECTOR] + (int)(PP_ENCTYPE_WATER_MIN - PP_ENCTYPE_LAND_MIN); } palpark->mons[i].encounterRate = narc_data[PPMONDAT_OFFSET_ENCOUTER_RATE]; - palpark->mons[i].score = narc_data[PPMONDAT_OFFSET_SCORE]; - palpark->mons[i].type1 = GetMonData(mon, MON_DATA_TYPE_1, NULL); - palpark->mons[i].type2 = GetMonData(mon, MON_DATA_TYPE_2, NULL); + palpark->mons[i].score = narc_data[PPMONDAT_OFFSET_SCORE]; + palpark->mons[i].type1 = GetMonData(mon, MON_DATA_TYPE_1, NULL); + palpark->mons[i].type2 = GetMonData(mon, MON_DATA_TYPE_2, NULL); } FreeToHeap(mon); } @@ -149,7 +149,7 @@ static int CountCaughtMons(struct PalParkLocal *palpark) { } static void SetNumStepsUntilNextEncounterCheck(struct PalParkLocal *palpark) { - u16 rnd = LCRandom() % 10; + u16 rnd = LCRandom() % 10; palpark->stepsUntilEncounterRoll = rnd + 5; } @@ -236,9 +236,9 @@ static void HandleBattleEnd(FieldSystem *fieldSystem, BattleSetup *setup, struct } static BattleSetup *SetupEncounter(FieldSystem *fieldSystem, struct PalParkLocal *palpark) { - Pokemon *mon = AllocMonZeroed(HEAP_ID_32); + Pokemon *mon = AllocMonZeroed(HEAP_ID_32); struct MigratedPokemonSav *migratedMons = Save_MigratedPokemon_Get(fieldSystem->saveData); - BattleSetup *ret = BattleSetup_New_PalPark(HEAP_ID_FIELD, PalPark_CountMonsNotCaught(fieldSystem)); + BattleSetup *ret = BattleSetup_New_PalPark(HEAP_ID_FIELD, PalPark_CountMonsNotCaught(fieldSystem)); BattleSetup_InitFromFieldSystem(ret, fieldSystem); GetMigratedPokemonByIndex(migratedMons, palpark->encounterIndex, mon); BattleSetup_AddMonToParty(ret, mon, BATTLER_ENEMY); diff --git a/src/palette.c b/src/palette.c index 9ca48639d6..956782933b 100644 --- a/src/palette.c +++ b/src/palette.c @@ -32,9 +32,9 @@ void PaletteData_Free(PaletteData *plttData) { } void PaletteData_SetBuffers(PaletteData *data, PaletteBufferId bufferID, u16 *opaque, u16 *transparent, u32 size) { - data->buffers[bufferID].opaque = opaque; + data->buffers[bufferID].opaque = opaque; data->buffers[bufferID].transparent = transparent; - data->buffers[bufferID].size = size; + data->buffers[bufferID].size = size; } void PaletteData_AllocBuffers(PaletteData *data, PaletteBufferId bufferID, u32 size, HeapID heapID) { @@ -127,7 +127,7 @@ u16 *PaletteData_GetFadedBuf(PaletteData *data, PaletteBufferId bufferID) { u8 PaletteData_BeginPaletteFade(PaletteData *data, u16 toSelect, u16 opaqueBit, s8 wait, u8 cur, u8 end, u16 nextRGB) { u16 opaqueBitBak = opaqueBit; - u8 startTask = FALSE; + u8 startTask = FALSE; u8 i; for (i = 0; i < PLTTBUF_MAX; ++i) { @@ -150,7 +150,7 @@ u8 PaletteData_BeginPaletteFade(PaletteData *data, u16 toSelect, u16 opaqueBit, if (!data->callbackFlag) { data->callbackFlag = TRUE; data->selectedFlag = 1; - data->forceExit = FALSE; + data->forceExit = FALSE; SysTask_CreateOnMainQueue(SysTask_TimedPaletteFade, data, -2); } } @@ -160,7 +160,7 @@ u8 PaletteData_BeginPaletteFade(PaletteData *data, u16 toSelect, u16 opaqueBit, u8 PaletteData_ForceBeginPaletteFade(PaletteData *data, u16 toSelect, u16 opaqueBit, s8 wait, u8 cur, u8 end, u16 nextRGB) { u16 opaqueBitBak = opaqueBit; - u8 startTask = FALSE; + u8 startTask = FALSE; u8 i; for (i = 0; i < PLTTBUF_MAX; ++i) { @@ -183,7 +183,7 @@ u8 PaletteData_ForceBeginPaletteFade(PaletteData *data, u16 toSelect, u16 opaque if (!data->callbackFlag) { data->callbackFlag = TRUE; data->selectedFlag = 1; - data->forceExit = FALSE; + data->forceExit = FALSE; SysTask_CreateOnMainQueue(SysTask_TimedPaletteFade, data, -2); } } @@ -224,10 +224,10 @@ static void SelectedPaletteData_SetTimedFadeParams(SelectedPaletteData *selected selectedBit->wait = wait; } selectedBit->opaqueBit = opaqueBit; - selectedBit->cur = cur; - selectedBit->end = end; - selectedBit->nextRGB = nextRGB; - selectedBit->waitStep = selectedBit->wait; + selectedBit->cur = cur; + selectedBit->end = end; + selectedBit->nextRGB = nextRGB; + selectedBit->waitStep = selectedBit->wait; if (cur < end) { selectedBit->sign = 0; } else { @@ -239,10 +239,10 @@ static void SysTask_TimedPaletteFade(SysTask *task, void *taskData) { PaletteData *data = (PaletteData *)taskData; if (data->forceExit == 1) { - data->forceExit = 0; + data->forceExit = 0; data->transparentBit = 0; data->selectedBuffer = 0; - data->callbackFlag = 0; + data->callbackFlag = 0; SysTask_Destroy(task); return; } @@ -301,9 +301,9 @@ static void ApplyScheduledBlendStepToSinglePalette(u16 *opaque, u16 *transparent u32 i; u8 r, g, b; for (i = 0; i < size; ++i) { - r = BlendColor(opaque[i] & 0x1F, selectedBit->nextRGB & 0x1F, selectedBit->cur); - g = BlendColor((opaque[i] >> 5) & 0x1F, (selectedBit->nextRGB >> 5) & 0x1F, selectedBit->cur); - b = BlendColor((opaque[i] >> 10) & 0x1F, (selectedBit->nextRGB >> 10) & 0x1F, selectedBit->cur); + r = BlendColor(opaque[i] & 0x1F, selectedBit->nextRGB & 0x1F, selectedBit->cur); + g = BlendColor((opaque[i] >> 5) & 0x1F, (selectedBit->nextRGB >> 5) & 0x1F, selectedBit->cur); + b = BlendColor((opaque[i] >> 10) & 0x1F, (selectedBit->nextRGB >> 10) & 0x1F, selectedBit->cur); transparent[i] = (b << 10) | (g << 5) | r; } } @@ -426,7 +426,7 @@ void PaletteData_SetAutoTransparent(PaletteData *plttData, BOOL autoTransparent) } void PaletteData_SetSelectedBufferAll(PaletteData *plttData, BOOL a1) { - plttData->selectedFlag = a1 & 1; + plttData->selectedFlag = a1 & 1; plttData->selectedBuffer = PLTTBUF_ALL_F; } @@ -541,9 +541,9 @@ void BlendPalette(const u16 *src, u16 *dest, u16 size, u8 cur, u16 target) { b2 = ((RgbColor *)&target)->b; for (i = 0; i < size; ++i) { - r1 = ((RgbColor *)&src[i])->r; - g1 = ((RgbColor *)&src[i])->g; - b1 = ((RgbColor *)&src[i])->b; + r1 = ((RgbColor *)&src[i])->r; + g1 = ((RgbColor *)&src[i])->g; + b1 = ((RgbColor *)&src[i])->b; dest[i] = BlendColor(r1, r2, cur) | (BlendColor(g1, g2, cur) << 5) | (BlendColor(b1, b2, cur) << 10); } } @@ -574,7 +574,7 @@ void TintPalette_GrayScale(u16 *palette, int count) { g = (*palette >> 5) & 0x1F; b = (*palette >> 10) & 0x1F; // 0.3 * red + 0.59 * g + 0.1133 * b - gray = (76 * r + 151 * g + 29 * b) >> 8; + gray = (76 * r + 151 * g + 29 * b) >> 8; *palette++ = (gray << 10) | (gray << 5) | gray; } } @@ -588,9 +588,9 @@ void TintPalette_CustomTone(u16 *palette, int count, int rTone, int gTone, int b b = (*palette >> 10) & 0x1F; // 0.3 * red + 0.59 * g + 0.1133 * b gray = (76 * r + 151 * g + 29 * b) >> 8; - r = (u16)(rTone * gray) >> 8; - g = (u16)(gTone * gray) >> 8; - b = (u16)(bTone * gray) >> 8; + r = (u16)(rTone * gray) >> 8; + g = (u16)(gTone * gray) >> 8; + b = (u16)(bTone * gray) >> 8; if (r > 31) { r = 31; @@ -640,7 +640,7 @@ static void FadePaletteTowardsColorStep(const u16 *src, u16 *dest, int duration, void PaletteData_FadePalettesTowardsColorStep(PaletteData *plttData, int transparentBit, int opaqueBit, int duration, int step, u16 target) { int i, j, r, g, b; - plttData->selectedFlag = 1; + plttData->selectedFlag = 1; plttData->transparentBit = transparentBit; r = target & 0x1F; @@ -650,7 +650,7 @@ void PaletteData_FadePalettesTowardsColorStep(PaletteData *plttData, int transpa for (i = 0; i < PLTTBUF_MAX; ++i) { if (plttData->buffers[i].transparent != NULL && (transparentBit >> i) & 1) { plttData->buffers[i].selected.opaqueBit = opaqueBit; - plttData->buffers[i].size = 0x200; + plttData->buffers[i].size = 0x200; for (j = 0; j < 16; ++j) { if ((opaqueBit >> j) & 1) { FadePaletteTowardsColorStep(&plttData->buffers[i].opaque[j * 16], &plttData->buffers[i].transparent[j * 16], duration, step, r, g, b); diff --git a/src/party.c b/src/party.c index 611739b216..e7cb6e5f52 100644 --- a/src/party.c +++ b/src/party.c @@ -57,7 +57,7 @@ BOOL Party_RemoveMon(Party *party, int slot) { PARTY_ASSERT_SLOT(party, slot); GF_ASSERT(party->core.curCount > 0); for (; slot < party->core.curCount - 1; slot++) { - party->core.mons[slot] = party->core.mons[slot + 1]; + party->core.mons[slot] = party->core.mons[slot + 1]; party->extra.unk_00[slot] = party->extra.unk_00[slot + 1]; } ZeroMonData(&party->core.mons[slot]); @@ -97,7 +97,7 @@ void Party_ResetUnkSubSlot(Party *party, int slot) { void Party_SafeCopyMonToSlot_ResetUnkSub(Party *party, int slot, Pokemon *src) { PARTY_ASSERT_SLOT(party, slot); { - BOOL valid = GetMonData(&party->core.mons[slot], MON_DATA_SPECIES_EXISTS, NULL) - GetMonData(src, MON_DATA_SPECIES_EXISTS, NULL); + BOOL valid = GetMonData(&party->core.mons[slot], MON_DATA_SPECIES_EXISTS, NULL) - GetMonData(src, MON_DATA_SPECIES_EXISTS, NULL); party->core.mons[slot] = *src; MI_CpuClear8(&party->extra.unk_00[slot], sizeof(PartyExtraSub)); party->core.curCount += valid; @@ -110,13 +110,13 @@ BOOL Party_SwapSlots(Party *party, int slotA, int slotB) { PARTY_ASSERT_SLOT(party, slotA); PARTY_ASSERT_SLOT(party, slotB); - tmp_POKEMON = AllocFromHeap(HEAP_ID_DEFAULT, sizeof(Pokemon)); - *tmp_POKEMON = party->core.mons[slotA]; + tmp_POKEMON = AllocFromHeap(HEAP_ID_DEFAULT, sizeof(Pokemon)); + *tmp_POKEMON = party->core.mons[slotA]; party->core.mons[slotA] = party->core.mons[slotB]; party->core.mons[slotB] = *tmp_POKEMON; FreeToHeap(tmp_POKEMON); - tmp_PartyExtraSub = party->extra.unk_00[slotA]; + tmp_PartyExtraSub = party->extra.unk_00[slotA]; party->extra.unk_00[slotA] = party->extra.unk_00[slotB]; party->extra.unk_00[slotB] = tmp_PartyExtraSub; return FALSE; diff --git a/src/party_context_menu.c b/src/party_context_menu.c index 8474b72765..4049389189 100644 --- a/src/party_context_menu.c +++ b/src/party_context_menu.c @@ -319,30 +319,30 @@ void PartyMenu_DisableMainScreenBlend_AfterYesNo(void) { static void PartyMenu_StartContextMenuButtonPressAnim_FromCursorObj(PartyMenu *partyMenu, PartyMenuContextMenuCursor *cursor, int followUpState) { PartyMenuContextButtonAnimData *animData = &partyMenu->contextMenuButtonAnim; - animData->autoAnimTimer = 0; + animData->autoAnimTimer = 0; animData->buttonAnimState = 0; - animData->template = &cursor->menu; - animData->numItems = cursor->numItems; - animData->selection = cursor->selection; - animData->state = cursor->state; - animData->followUpState = followUpState; - animData->active = TRUE; + animData->template = &cursor->menu; + animData->numItems = cursor->numItems; + animData->selection = cursor->selection; + animData->state = cursor->state; + animData->followUpState = followUpState; + animData->active = TRUE; } void PartyMenu_StartContextMenuButtonAnim(PartyMenu *partyMenu, int selection, int followUpState, BOOL restartAnim) { PartyMenuContextButtonAnimData *animData = &partyMenu->contextMenuButtonAnim; - animData->autoAnimTimer = 0; + animData->autoAnimTimer = 0; animData->buttonAnimState = 0; - animData->template = NULL; - animData->selection = selection; - animData->state = Sprite_GetAnimationNumber(partyMenu->sprites[selection]) & 2; + animData->template = NULL; + animData->selection = selection; + animData->state = Sprite_GetAnimationNumber(partyMenu->sprites[selection]) & 2; if (restartAnim == TRUE) { Sprite_SetAnimCtrlCurrentFrame(partyMenu->sprites[selection], 0); Sprite_SetAnimCtrlSeq(partyMenu->sprites[selection], animData->state); } animData->followUpState = followUpState; - animData->active = TRUE; + animData->active = TRUE; } BOOL PartyMenu_AnimateContextMenuButtonPress(PartyMenu *partyMenu) { @@ -414,7 +414,7 @@ void PartyMenu_AddAllWindows(PartyMenu *partyMenu) { AddWindow(partyMenu->bgConfig, &partyMenu->windows[PARTY_MENU_WINDOW_ID_39], &templates[47]); if (partyMenu->args->context == PARTY_MENU_CONTEXT_UNION_ROOM_BATTLE_SELECT || partyMenu->args->context == PARTY_MENU_CONTEXT_17 || partyMenu->args->context == PARTY_MENU_CONTEXT_BATTLE_HALL || partyMenu->args->context == PARTY_MENU_CONTEXT_23) { WindowTemplate template = sAdditionalWindowTemplates[0]; - template.top = 22; + template.top = 22; AddWindow(partyMenu->bgConfig, &partyMenu->windows[PARTY_MENU_WINDOW_ID_31], &template); } else { AddWindow(partyMenu->bgConfig, &partyMenu->windows[PARTY_MENU_WINDOW_ID_31], &sAdditionalWindowTemplates[0]); @@ -472,7 +472,7 @@ void PartyMenu_OpenContextMenu(PartyMenu *partyMenu, u8 *items, u8 numItems) { u16 i, numFieldMoves; partyMenu->listMenuItems = ListMenuItems_New(numItems, HEAP_ID_PARTY_MENU); - numFieldMoves = 0; + numFieldMoves = 0; for (i = 0; i < numItems; ++i) { if (items[i] >= PARTY_MON_CONTEXT_MENU_FIELD_MOVES_BEGIN) { ListMenuItems_AddItem(partyMenu->listMenuItems, partyMenu->contextMenuStrings[PARTY_MON_CONTEXT_MENU_FIELD_MOVES_BEGIN + numFieldMoves], GetPartyMenuContextMenuActionFunc(items[i])); @@ -482,10 +482,10 @@ void PartyMenu_OpenContextMenu(PartyMenu *partyMenu, u8 *items, u8 numItems) { } } - contextMenu.items = partyMenu->listMenuItems; - contextMenu.window = &partyMenu->levelUpStatsWindow[0]; - contextMenu.unk_08 = 0; - contextMenu.unk_09 = 1; + contextMenu.items = partyMenu->listMenuItems; + contextMenu.window = &partyMenu->levelUpStatsWindow[0]; + contextMenu.unk_08 = 0; + contextMenu.unk_09 = 1; contextMenu.numItems = numItems; contextMenu.unk_0B_0 = 0; contextMenu.unk_0B_4 = 0; @@ -505,7 +505,7 @@ void sub_0207D1C8(PartyMenu *partyMenu) { ReadMsgDataIntoString(partyMenu->msgData, msg_0300_00183, partyMenu->formattedStrBuf); } else { Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - String *msg = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00038); + String *msg = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00038); BufferBoxMonNickname(partyMenu->msgFormat, 0, Mon_GetBoxMon(mon)); StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, msg); String_Delete(msg); @@ -803,15 +803,15 @@ void PartyMenu_CreateYesNoPrompt(PartyMenu *partyMenu) { partyMenu->yesNoPrompt = YesNoPrompt_Create(HEAP_ID_PARTY_MENU); - template.bgConfig = partyMenu->bgConfig; - template.bgId = GF_BG_LYR_MAIN_0; - template.tileStart = 0x260; - template.plttSlot = 11; - template.x = 25; - template.y = 10; - template.ignoreTouchFlag = FALSE; + template.bgConfig = partyMenu->bgConfig; + template.bgId = GF_BG_LYR_MAIN_0; + template.tileStart = 0x260; + template.plttSlot = 11; + template.x = 25; + template.y = 10; + template.ignoreTouchFlag = FALSE; template.initialCursorPos = 0; - template.shapeParam = 0; + template.shapeParam = 0; YesNoPrompt_InitFromTemplate(partyMenu->yesNoPrompt, &template); PartyMenu_SetBlendBrightness_ForYesNo(); } @@ -899,7 +899,7 @@ void PartyMenu_LevelUpPrintStatsChange(PartyMenu *partyMenu) { u32 i; Pokemon *mon; - mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); stats[0] = GetMonData(mon, MON_DATA_MAXHP, NULL); stats[1] = GetMonData(mon, MON_DATA_ATK, NULL); stats[2] = GetMonData(mon, MON_DATA_DEF, NULL); @@ -1019,20 +1019,20 @@ static void PartyMenu_PrintContextMenuItemText(PartyMenu *partyMenu, PartyMenuCo if (windowId == 7) { if (depressed == FALSE) { fillValue = 4; - color = MAKE_TEXT_COLOR(14, 15, 4); + color = MAKE_TEXT_COLOR(14, 15, 4); } else { fillValue = 11; - color = MAKE_TEXT_COLOR(14, 15, 11); + color = MAKE_TEXT_COLOR(14, 15, 11); } y = 4; x = FontID_String_GetCenterAlignmentX(4, contextMenu->items[selection].text, 0, GetWindowWidth(&partyMenu->contextMenuButtonWindows[windowId]) * 8); } else { if (depressed == FALSE) { fillValue = 4; - color = getButtonColorRaised(selection); + color = getButtonColorRaised(selection); } else { fillValue = 11; - color = getButtonColorDepressed(selection); + color = getButtonColorDepressed(selection); } y = 0; } @@ -1091,11 +1091,11 @@ void sub_0207E54C(PartyMenu *partyMenu, int numItems, int selection, int state) PartyMenuContextMenuCursor *PartyMenu_CreateContextMenuCursor(PartyMenu *partyMenu, const PartyMenuContextMenu *template, int selection, HeapID heapId, int state) { PartyMenuContextMenuCursor *ret = AllocFromHeap(heapId, sizeof(PartyMenuContextMenuCursor)); - ret->menu = *template; - ret->numItems = ret->menu.numItems; - ret->prevSelection = selection; - ret->selection = selection; - ret->state = state; + ret->menu = *template; + ret->numItems = ret->menu.numItems; + ret->prevSelection = selection; + ret->selection = selection; + ret->state = state; PartyMenu_ShowContextMenu(partyMenu, ret->menu.numItems, ret->state); sub_0207E358(partyMenu, &ret->menu, ret->menu.numItems, ret->prevSelection, ret->state); PartyMenu_SetBlendBrightness_ForYesNo(); @@ -1168,7 +1168,7 @@ static BOOL handlePartyContextMenuDpadInput(u8 *pSelection, int numItems, int di u32 PartyMenu_HandleInput_ContextMenu(PartyMenu *partyMenu, PartyMenuContextMenuCursor *cursor) { PartyMenuContextButtonAnimData *animData = &partyMenu->contextMenuButtonAnim; - BOOL dpadInputValid = FALSE; + BOOL dpadInputValid = FALSE; if (animData->active == TRUE) { if (PartyMenu_AnimateContextMenuButtonPress(partyMenu) == FALSE) { @@ -1234,7 +1234,7 @@ u32 PartyMenu_HandleInput_ContextMenu(PartyMenu *partyMenu, PartyMenuContextMenu u32 PartyMenu_HandleSubcontextMenuInput_TopLevel(PartyMenu *partyMenu, PartyMenuContextMenuCursor *cursor) { PartyMenuContextButtonAnimData *animData = &partyMenu->contextMenuButtonAnim; - BOOL dpadInputValid = FALSE; + BOOL dpadInputValid = FALSE; if (animData->active == TRUE) { if (PartyMenu_AnimateContextMenuButtonPress(partyMenu) == FALSE) { diff --git a/src/party_menu.c b/src/party_menu.c index 2613156e21..2de756d4e6 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -236,7 +236,7 @@ static BOOL PartyMenuApp_Init(OVY_MANAGER *manager, int *pState) { SetKeyRepeatTimers(4, 8); CreateHeap(HEAP_ID_3, HEAP_ID_PARTY_MENU, 0x30000); - narc = NARC_New(NARC_graphic_plist_gra, HEAP_ID_PARTY_MENU); + narc = NARC_New(NARC_graphic_plist_gra, HEAP_ID_PARTY_MENU); partyMenu = sub_02079BD8(manager); BeginNormalPaletteFade(2, 3, 3, RGB_BLACK, 6, 1, HEAP_ID_PARTY_MENU); sub_02079CE4(partyMenu); @@ -595,7 +595,7 @@ static int PartyMenu_Subtask_UseTMHM(PartyMenu *partyMenu) { return PartyMenu_HandleUseTMHMonMon(partyMenu); } else { PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; ReadMsgDataIntoString(partyMenu->msgData, msg_0300_00102, partyMenu->formattedStrBuf); return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; @@ -690,34 +690,34 @@ static TouchscreenHitbox _02110104[] = { static void sub_02079700(void) { GraphicsBanks graphicsBanks = { - .bg = GX_VRAM_BG_128_A, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_128_C, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_64_E, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_16_I, + .bg = GX_VRAM_BG_128_A, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_128_C, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_64_E, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_16_I, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_0_B, - .texpltt = GX_VRAM_TEXPLTT_01_FG, + .tex = GX_VRAM_TEX_0_B, + .texpltt = GX_VRAM_TEXPLTT_01_FG, }; GfGfx_SetBanks(&graphicsBanks); } static void sub_02079720(BgConfig *bgConfig) { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_0, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_MAIN_0); @@ -726,9 +726,9 @@ static void sub_02079720(BgConfig *bgConfig) { static void sub_02079758(BgConfig *bgConfig) { { GraphicsModes graphicsModes = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; SetBothScreensModesAndDisable(&graphicsModes); @@ -736,18 +736,18 @@ static void sub_02079758(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_0, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_MAIN_0); @@ -755,18 +755,18 @@ static void sub_02079758(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_1, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_MAIN_1); @@ -774,18 +774,18 @@ static void sub_02079758(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe800, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_2, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_MAIN_2); @@ -793,36 +793,36 @@ static void sub_02079758(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe000, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_MAIN_3, &bgTemplate, GF_BG_TYPE_TEXT); } { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xd800, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_SUB_2, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_SUB_2); @@ -830,18 +830,18 @@ static void sub_02079758(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x08000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x08000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_SUB_0, &bgTemplate, GF_BG_TYPE_TEXT); BgClearTilemapBufferAndCommit(bgConfig, GF_BG_LYR_SUB_0); @@ -849,18 +849,18 @@ static void sub_02079758(BgConfig *bgConfig) { { BgTemplate bgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = 0, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = 0, }; InitBgFromTemplate(bgConfig, GF_BG_LYR_SUB_1, &bgTemplate, GF_BG_TYPE_TEXT); } @@ -952,27 +952,27 @@ static PartyMenu *sub_02079BD8(OVY_MANAGER *manager) { u32 i; PartyMenu *ret = (PartyMenu *)OverlayManager_CreateAndGetData(manager, sizeof(PartyMenu), HEAP_ID_PARTY_MENU); memset(ret, 0, sizeof(PartyMenu)); - ret->args = OverlayManager_GetArgs(manager); + ret->args = OverlayManager_GetArgs(manager); ret->bgConfig = BgConfig_Alloc(HEAP_ID_PARTY_MENU); if (ret->args->context == PARTY_MENU_CONTEXT_UNION_ROOM_BATTLE_SELECT && ret->args->linkBattleRuleset != NULL) { ret->pokedex = PokedexData_CreateAndLoad(HEAP_ID_PARTY_MENU); } else { ret->pokedex = NULL; } - ret->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0300_bin, HEAP_ID_PARTY_MENU); + ret->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0300_bin, HEAP_ID_PARTY_MENU); ret->msgPrinter = MessagePrinter_New(15, 14, 0, HEAP_ID_PARTY_MENU); - ret->msgFormat = MessageFormat_New(HEAP_ID_PARTY_MENU); + ret->msgFormat = MessageFormat_New(HEAP_ID_PARTY_MENU); for (i = 0; i < PARTY_SIZE; ++i) { ret->monsDrawState[i].nickname = String_New(POKEMON_NAME_LENGTH + 1, HEAP_ID_PARTY_MENU); } - ret->formattedStrBuf = String_New(0x100, HEAP_ID_PARTY_MENU); + ret->formattedStrBuf = String_New(0x100, HEAP_ID_PARTY_MENU); ret->unformattedStrBuf = String_New(0x100, HEAP_ID_PARTY_MENU); for (i = 0; i < 20; ++i) { ret->contextMenuStrings[i] = String_New(32, HEAP_ID_PARTY_MENU); } ret->topScreenPanelShow = FALSE; - ret->partyMonIndex = ret->args->partySlot; - ret->unk_C66 = ret->partyMonIndex; + ret->partyMonIndex = ret->args->partySlot; + ret->unk_C66 = ret->partyMonIndex; return ret; } @@ -1028,20 +1028,20 @@ BOOL sub_02079E38(PartyMenu *partyMenu, u8 partySlot) { if (Party_GetCount(partyMenu->args->party) <= partySlot) { return FALSE; } - mon = Party_GetMonByIndex(partyMenu->args->party, partySlot); + mon = Party_GetMonByIndex(partyMenu->args->party, partySlot); species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); if (species == SPECIES_NONE) { return FALSE; } PartyMenu_BufferMonNickname(partyMenu, mon, partySlot); - partyMenu->monsDrawState[partySlot].species = species; - partyMenu->monsDrawState[partySlot].hp = (u16)GetMonData(mon, MON_DATA_HP, NULL); - partyMenu->monsDrawState[partySlot].maxHp = (u16)GetMonData(mon, MON_DATA_MAXHP, NULL); - partyMenu->monsDrawState[partySlot].level = (u16)GetMonData(mon, MON_DATA_LEVEL, NULL); + partyMenu->monsDrawState[partySlot].species = species; + partyMenu->monsDrawState[partySlot].hp = (u16)GetMonData(mon, MON_DATA_HP, NULL); + partyMenu->monsDrawState[partySlot].maxHp = (u16)GetMonData(mon, MON_DATA_MAXHP, NULL); + partyMenu->monsDrawState[partySlot].level = (u16)GetMonData(mon, MON_DATA_LEVEL, NULL); partyMenu->monsDrawState[partySlot].heldItem = (u16)GetMonData(mon, MON_DATA_HELD_ITEM, NULL); - partyMenu->monsDrawState[partySlot].capsule = (u16)GetMonData(mon, MON_DATA_CAPSULE, NULL); - partyMenu->monsDrawState[partySlot].isEgg = (u8)GetMonData(mon, MON_DATA_IS_EGG, NULL); - partyMenu->monsDrawState[partySlot].form = (u8)GetMonData(mon, MON_DATA_FORM, NULL); + partyMenu->monsDrawState[partySlot].capsule = (u16)GetMonData(mon, MON_DATA_CAPSULE, NULL); + partyMenu->monsDrawState[partySlot].isEgg = (u8)GetMonData(mon, MON_DATA_IS_EGG, NULL); + partyMenu->monsDrawState[partySlot].form = (u8)GetMonData(mon, MON_DATA_FORM, NULL); if (GetMonData(mon, MON_DATA_NO_PRINT_GENDER, NULL) == TRUE) { partyMenu->monsDrawState[partySlot].dontPrintGenderSymbol = FALSE; } else { @@ -1320,7 +1320,7 @@ static void PartyMenu_MoveCursorSpriteTo(PartyMenu *partyMenu, int selection, in Sprite_SetVisibleFlag(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], TRUE); Sprite_SetPositionXY(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], x, y); } - u8 oldPartyMonIndex = partyMenu->partyMonIndex; + u8 oldPartyMonIndex = partyMenu->partyMonIndex; partyMenu->partyMonIndex = selection; sub_0207B51C(partyMenu, oldPartyMonIndex, FALSE); sub_0207B51C(partyMenu, partyMenu->partyMonIndex, TRUE); @@ -1421,7 +1421,7 @@ void sub_0207AB84(PartyMenu *partyMenu, u8 partySlot) { Sprite_SetVisibleFlag(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], TRUE); Sprite_SetPositionXY(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], x, y); } - u8 oldSlot = partyMenu->partyMonIndex; + u8 oldSlot = partyMenu->partyMonIndex; partyMenu->partyMonIndex = partySlot; sub_0207B51C(partyMenu, oldSlot, FALSE); sub_0207B51C(partyMenu, partyMenu->partyMonIndex, TRUE); @@ -1896,7 +1896,7 @@ static u8 sub_0207B600(PartyMenu *partyMenu) { // UB: hits "return result;" but result was never initialized break; } - u32 oldSelection = partyMenu->partyMonIndex; + u32 oldSelection = partyMenu->partyMonIndex; partyMenu->partyMonIndex = selection; PlaySE(SEQ_SE_DP_SELECT); if (partyMenu->partyMonIndex == partyMenu->softboiledDonorSlot) { @@ -2278,13 +2278,13 @@ static int PartyMenu_Subtask_Softboiled(PartyMenu *partyMenu) { case 3: if (PartyMenu_SoftboiledHPTransferStep(partyMenu, partyMenu->partyMonIndex, 1) == TRUE) { Pokemon *pokemon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - String *string = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00065); + String *string = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00065); BufferBoxMonNickname(partyMenu->msgFormat, 0, Mon_GetBoxMon(pokemon)); BufferIntegerAsString(partyMenu->msgFormat, 1, partyMenu->levelUpStatsTmp[2], 3, PRINTING_MODE_LEFT_ALIGN, TRUE); StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->levelUpStatsTmp[1] = 4; + partyMenu->levelUpStatsTmp[1] = 4; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_SOFTBOILED; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -2306,7 +2306,7 @@ static u8 PartyMenu_SoftboiledTargetCheck(PartyMenu *partyMenu) { if (partyMenu->partyMonIndex == partyMenu->softboiledDonorSlot || partyMenu->monsDrawState[partyMenu->partyMonIndex].hp == 0 || partyMenu->monsDrawState[partyMenu->partyMonIndex].hp == partyMenu->monsDrawState[partyMenu->partyMonIndex].maxHp) { thunk_Sprite_SetPalIndex(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], 1); PartyMenu_PrintMessageOnWindow34(partyMenu, msg_0300_00120, TRUE); - partyMenu->levelUpStatsTmp[1] = 1; + partyMenu->levelUpStatsTmp[1] = 1; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_SOFTBOILED; return 1; } @@ -2322,7 +2322,7 @@ static BOOL PartyMenu_SoftboiledHPTransferStep(PartyMenu *partyMenu, u8 partySlo PartyMenu_DrawMonHpBarOnWindow(partyMenu, partySlot); if (partyMenu->levelUpStatsTmp[0] == partyMenu->levelUpStatsTmp[2] || partyMenu->monsDrawState[partySlot].hp == partyMenu->monsDrawState[partySlot].maxHp) { Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partySlot); - u32 hp = partyMenu->monsDrawState[partySlot].hp; + u32 hp = partyMenu->monsDrawState[partySlot].hp; SetMonData(mon, MON_DATA_HP, &hp); return TRUE; } @@ -2428,8 +2428,8 @@ static int PartyMenu_HandleUseItemOnMon(PartyMenu *partyMenu) { if (CanUseItemOnMonInParty(partyMenu->args->party, partyMenu->args->itemId, partyMenu->partyMonIndex, 0, HEAP_ID_PARTY_MENU) == TRUE) { Bag_TakeItem(partyMenu->args->bag, partyMenu->args->itemId, 1, HEAP_ID_PARTY_MENU); if (GetItemAttr_PreloadedItemData(itemData, ITEMATTR_EVOLVE)) { - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - partyMenu->args->species = GetMonEvolution(NULL, mon, EVOCTX_ITEM_USE, partyMenu->args->itemId, &partyMenu->args->evoMethod); + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + partyMenu->args->species = GetMonEvolution(NULL, mon, EVOCTX_ITEM_USE, partyMenu->args->itemId, &partyMenu->args->evoMethod); partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_EVO_ITEM_USE; FreeToHeap(itemData); return PARTY_MENU_STATE_BEGIN_EXIT; @@ -2438,7 +2438,7 @@ static int PartyMenu_HandleUseItemOnMon(PartyMenu *partyMenu) { } } else { PartyMenu_PrintMessageOnWindow34(partyMenu, msg_0300_00102, TRUE); - partyMenu->partyMonIndex = PARTY_MON_SELECTION_CONFIRM; + partyMenu->partyMonIndex = PARTY_MON_SELECTION_CONFIRM; partyMenu->itemUseCallback = PartyMenu_ItemUseFunc_WaitTextPrinterThenExit; } FreeToHeap(itemData); @@ -2456,8 +2456,8 @@ static u8 sub_0207C3D0(PartyMenu *partyMenu) { } static int PartyMenu_Subtask_GiveItemToMon(PartyMenu *partyMenu) { - int result = -1; - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + int result = -1; + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); FieldSystem *fieldSystem = partyMenu->args->fieldSystem; if (partyMenu->args->itemId == ITEM_GRISEOUS_ORB) { @@ -2517,7 +2517,7 @@ static int PartyMenu_GiveItemToMon_HandleGriseousOrb(PartyMenu *partyMenu, Pokem Bag_TakeItem(partyMenu->args->bag, partyMenu->args->itemId, 1, HEAP_ID_PARTY_MENU); SetMonData(mon, MON_DATA_HELD_ITEM, &itemToBeHeld); Pokemon_UpdateArceusForm(mon); - *transformResult = Mon_UpdateGiratinaForm(mon); + *transformResult = Mon_UpdateGiratinaForm(mon); partyMenu->monsDrawState[partyMenu->partyMonIndex].heldItem = partyMenu->args->itemId; PartyMenu_DrawMonHeldItemIcon(partyMenu, partyMenu->partyMonIndex, partyMenu->monsDrawState[partyMenu->partyMonIndex].heldItem); if (itemToBeHeld == ITEM_GRISEOUS_ORB && *transformResult != -1) { @@ -2578,7 +2578,7 @@ static int PartyMenu_Subtask_SwitchItemsHandleYesNoInput(PartyMenu *partyMenu) { case YESNORESPONSE_YES: { YesNoPrompt_Destroy(partyMenu->yesNoPrompt); PartyMenu_DisableMainScreenBlend_AfterYesNo(); - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); int newItemId = partyMenu->args->itemId; int oldItemId = partyMenu->monsDrawState[partyMenu->partyMonIndex].heldItem; s32 giratinaResult; @@ -2632,8 +2632,8 @@ static int PartyMenu_SwitchItemsDeclined(PartyMenu *partyMenu) { static int PartyMenu_GiveOrSwapHeldItems(PartyMenu *partyMenu) { Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); s32 giratinaResult; - int newItem = partyMenu->args->itemId; - int oldItem = partyMenu->monsDrawState[partyMenu->partyMonIndex].heldItem; + int newItem = partyMenu->args->itemId; + int oldItem = partyMenu->monsDrawState[partyMenu->partyMonIndex].heldItem; int manipulateItemResult = PartyMenu_GiveItemToMon_HandleGriseousOrb(partyMenu, mon, &giratinaResult); if (oldItem == ITEM_GRISEOUS_ORB && manipulateItemResult == PARTY_MENU_STATE_PRINT_ITEM_SWAP_MESSAGE && giratinaResult == 0) { manipulateItemResult = PARTY_MENU_STATE_PRINT_GIVE_GRISEOUS_ORB_MESSAGE; @@ -2666,8 +2666,8 @@ static int PartyMenu_HandleChooseMonForInGameTrade(PartyMenu *partyMenu) { } else { thunk_Sprite_SetPalIndex(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], 1); PartyMenu_PrintMessageOnWindow34(partyMenu, msg_0300_00179, TRUE); - partyMenu->yesCallback = PartyMenu_ConfirmRemoveCapsuleYes; - partyMenu->noCallback = PartyMenu_ConfirmRemoveCapsuleNo; + partyMenu->yesCallback = PartyMenu_ConfirmRemoveCapsuleYes; + partyMenu->noCallback = PartyMenu_ConfirmRemoveCapsuleNo; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } diff --git a/src/party_menu_items.c b/src/party_menu_items.c index 019f27e3b0..11acc5c8c9 100644 --- a/src/party_menu_items.c +++ b/src/party_menu_items.c @@ -412,13 +412,13 @@ static int PartyMenu_ItemUseFunc_StatusHealEtc(PartyMenu *partyMenu) { } static int PartyMenu_ItemUseFunc_EVDown(PartyMenu *partyMenu) { - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - u8 hpEv = GetMonData(mon, MON_DATA_HP_EV, NULL); - u8 atkEv = GetMonData(mon, MON_DATA_ATK_EV, NULL); - u8 defEv = GetMonData(mon, MON_DATA_DEF_EV, NULL); - u8 speedEv = GetMonData(mon, MON_DATA_SPEED_EV, NULL); - u8 spAtkEv = GetMonData(mon, MON_DATA_SPATK_EV, NULL); - u8 spDefEv = GetMonData(mon, MON_DATA_SPDEF_EV, NULL); + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + u8 hpEv = GetMonData(mon, MON_DATA_HP_EV, NULL); + u8 atkEv = GetMonData(mon, MON_DATA_ATK_EV, NULL); + u8 defEv = GetMonData(mon, MON_DATA_DEF_EV, NULL); + u8 speedEv = GetMonData(mon, MON_DATA_SPEED_EV, NULL); + u8 spAtkEv = GetMonData(mon, MON_DATA_SPATK_EV, NULL); + u8 spDefEv = GetMonData(mon, MON_DATA_SPDEF_EV, NULL); u8 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); UseItemOnMonInParty(partyMenu->args->party, partyMenu->args->itemId, partyMenu->partyMonIndex, 0, PartyMenu_GetCurrentMapSec(partyMenu), HEAP_ID_PARTY_MENU); sub_02079E38(partyMenu, partyMenu->partyMonIndex); @@ -443,7 +443,7 @@ static int PartyMenu_ItemUseFunc_EVDown(PartyMenu *partyMenu) { static int PartyMenu_ItemUseFunc_HPRestore(PartyMenu *partyMenu) { UseItemOnMonInParty(partyMenu->args->party, partyMenu->args->itemId, partyMenu->partyMonIndex, 0, PartyMenu_GetCurrentMapSec(partyMenu), HEAP_ID_PARTY_MENU); Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - int hp = GetMonData(mon, MON_DATA_HP, NULL); + int hp = GetMonData(mon, MON_DATA_HP, NULL); String *string; if (partyMenu->monsDrawState[partyMenu->partyMonIndex].hp == 0) { string = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00071); @@ -525,7 +525,7 @@ int PartyMenu_Subtask_SacredAsh(PartyMenu *partyMenu) { case 1: mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); UseItemOnPokemon(mon, partyMenu->args->itemId, 0, PartyMenu_GetCurrentMapSec(partyMenu), HEAP_ID_PARTY_MENU); - hp = GetMonData(mon, MON_DATA_HP, NULL); + hp = GetMonData(mon, MON_DATA_HP, NULL); string = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00071); BufferBoxMonNickname(partyMenu->msgFormat, 0, Mon_GetBoxMon(mon)); StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); @@ -540,7 +540,7 @@ int PartyMenu_Subtask_SacredAsh(PartyMenu *partyMenu) { break; case 2: mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - hp = GetMonData(mon, MON_DATA_HP, NULL); + hp = GetMonData(mon, MON_DATA_HP, NULL); ++partyMenu->monsDrawState[partyMenu->partyMonIndex].hp; PartyMenu_ClearMonHpTextWindow(partyMenu, partyMenu->partyMonIndex); FillWindowPixelBuffer(&partyMenu->windows[PARTY_MENU_WINDOW_ID_MON1_HPBAR + 5 * partyMenu->partyMonIndex], 0); @@ -553,7 +553,7 @@ int PartyMenu_Subtask_SacredAsh(PartyMenu *partyMenu) { break; case 3: if (!TextPrinterCheckActive(partyMenu->textPrinterId)) { - u8 last = partyMenu->partyMonIndex; + u8 last = partyMenu->partyMonIndex; partyMenu->partyMonIndex = PartyMenu_SacredAshGetNextMonId(partyMenu, last + 1); if (partyMenu->partyMonIndex != 0xFF) { ClearFrameAndWindow2(&partyMenu->windows[PARTY_MENU_WINDOW_ID_34], FALSE); @@ -562,7 +562,7 @@ int PartyMenu_Subtask_SacredAsh(PartyMenu *partyMenu) { } else { Bag_TakeItem(partyMenu->args->bag, partyMenu->args->itemId, 1, HEAP_ID_PARTY_MENU); partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; - partyMenu->partyMonIndex = 7; + partyMenu->partyMonIndex = 7; return PARTY_MENU_STATE_BEGIN_EXIT; } } @@ -572,7 +572,7 @@ int PartyMenu_Subtask_SacredAsh(PartyMenu *partyMenu) { } static int PartyMenu_ItemUseFunc_LevelUp(PartyMenu *partyMenu) { - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); partyMenu->levelUpStatsTmp[0] = GetMonData(mon, MON_DATA_MAXHP, NULL); partyMenu->levelUpStatsTmp[1] = GetMonData(mon, MON_DATA_ATK, NULL); partyMenu->levelUpStatsTmp[2] = GetMonData(mon, MON_DATA_DEF, NULL); @@ -581,9 +581,9 @@ static int PartyMenu_ItemUseFunc_LevelUp(PartyMenu *partyMenu) { partyMenu->levelUpStatsTmp[5] = GetMonData(mon, MON_DATA_SPEED, NULL); UseItemOnMonInParty(partyMenu->args->party, partyMenu->args->itemId, partyMenu->partyMonIndex, 0, PartyMenu_GetCurrentMapSec(partyMenu), HEAP_ID_PARTY_MENU); partyMenu->monsDrawState[partyMenu->partyMonIndex].level = GetMonData(mon, MON_DATA_LEVEL, NULL); - partyMenu->monsDrawState[partyMenu->partyMonIndex].hp = GetMonData(mon, MON_DATA_HP, NULL); + partyMenu->monsDrawState[partyMenu->partyMonIndex].hp = GetMonData(mon, MON_DATA_HP, NULL); partyMenu->monsDrawState[partyMenu->partyMonIndex].maxHp = GetMonData(mon, MON_DATA_MAXHP, NULL); - String *string = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00177); + String *string = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00177); BufferBoxMonNickname(partyMenu->msgFormat, 0, Mon_GetBoxMon(mon)); BufferIntegerAsString(partyMenu->msgFormat, 1, partyMenu->monsDrawState[partyMenu->partyMonIndex].level, 3, PRINTING_MODE_LEFT_ALIGN, TRUE); StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); @@ -599,7 +599,7 @@ static int PartyMenu_ItemUseFunc_LevelUp(PartyMenu *partyMenu) { sub_0207D5DC(partyMenu, partyMenu->partyMonIndex); PartyMenu_CommitPartyMonPanelWindowsToVram_InVBlank(partyMenu, partyMenu->partyMonIndex); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->itemUseCallback = PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop; + partyMenu->itemUseCallback = PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop; partyMenu->levelUpLearnMovesLoopState = 0; return PARTY_MENU_STATE_ITEM_USE_CB; } @@ -627,7 +627,7 @@ static int PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop(PartyMenu *partyMenu) { if ((gSystem.newKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) || System_GetTouchNew() == TRUE) { PlaySE(SEQ_SE_DP_SELECT); sub_0207E04C(partyMenu); - partyMenu->levelUpLearnMovesLoopState = 3; + partyMenu->levelUpLearnMovesLoopState = 3; partyMenu->args->levelUpMoveSearchState = 0; } break; @@ -646,8 +646,8 @@ static int PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->yesCallback = PartyMenu_ItemUseFunc_LevelUpPromptForgetMove; - partyMenu->noCallback = PartyMenu_ItemUseFunc_LevelUpAskStopTryingToLearn; + partyMenu->yesCallback = PartyMenu_ItemUseFunc_LevelUpPromptForgetMove; + partyMenu->noCallback = PartyMenu_ItemUseFunc_LevelUpAskStopTryingToLearn; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; default: @@ -677,9 +677,9 @@ static int PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop(PartyMenu *partyMenu) { partyMenu->levelUpLearnMovesLoopState = 4; break; case 6: - mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - mapEvoMethod = MapHeader_GetMapEvolutionMethod(partyMenu->args->fieldSystem->location->mapId); - partyMenu->args->species = GetMonEvolution(partyMenu->args->party, mon, EVOCTX_LEVELUP, mapEvoMethod, &partyMenu->args->evoMethod); + mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + mapEvoMethod = MapHeader_GetMapEvolutionMethod(partyMenu->args->fieldSystem->location->mapId); + partyMenu->args->species = GetMonEvolution(partyMenu->args->party, mon, EVOCTX_LEVELUP, mapEvoMethod, &partyMenu->args->evoMethod); partyMenu->args->selectedAction = partyMenu->args->species != SPECIES_NONE ? PARTY_MENU_ACTION_RETURN_EVO_RARE_CANDY : PARTY_MENU_ACTION_RETURN_0; return PARTY_MENU_STATE_BEGIN_EXIT; } @@ -688,9 +688,9 @@ static int PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop(PartyMenu *partyMenu) { } int PartyMenu_ItemUseFunc_LevelUpDoLearnMove(PartyMenu *partyMenu) { - partyMenu->itemUseCallback = PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop; + partyMenu->itemUseCallback = PartyMenu_ItemUseFunc_LevelUpLearnMovesLoop; partyMenu->levelUpLearnMovesLoopState = 3; - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); BufferBoxMonNickname(partyMenu->msgFormat, 0, Mon_GetBoxMon(mon)); if (partyMenu->args->selectedMoveIdx == 4) { BufferMoveName(partyMenu->msgFormat, 1, partyMenu->args->moveId); @@ -701,7 +701,7 @@ int PartyMenu_ItemUseFunc_LevelUpDoLearnMove(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->afterTextPrinterState = PARTY_MENU_STATE_ITEM_USE_CB; + partyMenu->afterTextPrinterState = PARTY_MENU_STATE_ITEM_USE_CB; partyMenu->levelUpLearnMovesLoopState = 5; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -712,7 +712,7 @@ static int PartyMenu_ItemUseFunc_LevelUpPromptForgetMove(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_5; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_5; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -722,8 +722,8 @@ static int PartyMenu_ItemUseFunc_LevelUpAskStopTryingToLearn(PartyMenu *partyMen StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->yesCallback = PartyMenu_ItemUseFunc_LevelUpDidNotLearnMove; - partyMenu->noCallback = PartyMenu_ItemUseFunc_LevelUpAskAgainToForget; + partyMenu->yesCallback = PartyMenu_ItemUseFunc_LevelUpDidNotLearnMove; + partyMenu->noCallback = PartyMenu_ItemUseFunc_LevelUpAskAgainToForget; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -733,7 +733,7 @@ static int PartyMenu_ItemUseFunc_LevelUpDidNotLearnMove(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->afterTextPrinterState = PARTY_MENU_STATE_ITEM_USE_CB; + partyMenu->afterTextPrinterState = PARTY_MENU_STATE_ITEM_USE_CB; partyMenu->levelUpLearnMovesLoopState = 4; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -743,8 +743,8 @@ static int PartyMenu_ItemUseFunc_LevelUpAskAgainToForget(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->yesCallback = PartyMenu_ItemUseFunc_LevelUpPromptForgetMove; - partyMenu->noCallback = PartyMenu_ItemUseFunc_LevelUpAskStopTryingToLearn; + partyMenu->yesCallback = PartyMenu_ItemUseFunc_LevelUpPromptForgetMove; + partyMenu->noCallback = PartyMenu_ItemUseFunc_LevelUpAskStopTryingToLearn; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -789,7 +789,7 @@ int PartyMenu_HandleUseTMHMonMon(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; break; case LEARN_MOVE_CHECK_KNOWN: @@ -797,7 +797,7 @@ int PartyMenu_HandleUseTMHMonMon(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; break; case LEARN_MOVE_CHECK_FULL: @@ -805,8 +805,8 @@ int PartyMenu_HandleUseTMHMonMon(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->yesCallback = PartyMenu_ItemUseFunc_TMHMPromptForgetMove; - partyMenu->noCallback = PartyMenu_ItemUseFunc_TMHMAskStopTryingToLearn; + partyMenu->yesCallback = PartyMenu_ItemUseFunc_TMHMPromptForgetMove; + partyMenu->noCallback = PartyMenu_ItemUseFunc_TMHMAskStopTryingToLearn; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; break; case LEARN_MOVE_CHECK_INCOMPAT: @@ -814,7 +814,7 @@ int PartyMenu_HandleUseTMHMonMon(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; break; } @@ -846,7 +846,7 @@ int PartyMenu_Subtask_TMHMLearnMove(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -856,7 +856,7 @@ static int PartyMenu_ItemUseFunc_TMHMPromptForgetMove(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_4; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_4; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -866,8 +866,8 @@ static int PartyMenu_ItemUseFunc_TMHMAskStopTryingToLearn(PartyMenu *partyMenu) StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->yesCallback = PartyMenu_ItemUseFunc_TMHMDidNotLearnMove; - partyMenu->noCallback = PartyMenu_ItemUseFunc_TMHMAskAgainToForget; + partyMenu->yesCallback = PartyMenu_ItemUseFunc_TMHMDidNotLearnMove; + partyMenu->noCallback = PartyMenu_ItemUseFunc_TMHMAskAgainToForget; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -877,7 +877,7 @@ static int PartyMenu_ItemUseFunc_TMHMDidNotLearnMove(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -887,8 +887,8 @@ static int PartyMenu_ItemUseFunc_TMHMAskAgainToForget(PartyMenu *partyMenu) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, string); String_Delete(string); PartyMenu_PrintMessageOnWindow34(partyMenu, -1, FALSE); - partyMenu->yesCallback = PartyMenu_ItemUseFunc_TMHMPromptForgetMove; - partyMenu->noCallback = PartyMenu_ItemUseFunc_TMHMAskStopTryingToLearn; + partyMenu->yesCallback = PartyMenu_ItemUseFunc_TMHMPromptForgetMove; + partyMenu->noCallback = PartyMenu_ItemUseFunc_TMHMAskStopTryingToLearn; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -910,8 +910,8 @@ void PartyMenu_LearnMoveToSlot(PartyMenu *partyMenu, Pokemon *mon, int moveIdx) } u8 PartyMenu_AddMoveNameToList(PartyMenu *partyMenu, int moveIdx) { - Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - u16 moveId = GetMonData(mon, MON_DATA_MOVE1 + moveIdx, NULL); + Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + u16 moveId = GetMonData(mon, MON_DATA_MOVE1 + moveIdx, NULL); String *string = NewString_ReadMsgData(partyMenu->msgData, msg_0300_00145 + moveIdx); BufferMoveName(partyMenu->msgFormat, 0, moveId); StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->unformattedStrBuf, string); @@ -932,20 +932,20 @@ void PartyMenu_SelectMoveForPpRestoreOrPpUp(PartyMenu *partyMenu, BOOL isPpResto PartyMenu_PrintMessageOnWindow33(partyMenu, msg_0300_00041, TRUE); } partyMenu->listMenuItems = ListMenuItems_New(5, HEAP_ID_PARTY_MENU); - u8 numItems = PartyMenu_AddMoveNameToList(partyMenu, 0); + u8 numItems = PartyMenu_AddMoveNameToList(partyMenu, 0); numItems += PartyMenu_AddMoveNameToList(partyMenu, 1); numItems += PartyMenu_AddMoveNameToList(partyMenu, 2); numItems += PartyMenu_AddMoveNameToList(partyMenu, 3); ListMenuItems_AddItem(partyMenu->listMenuItems, partyMenu->contextMenuStrings[PARTY_MON_CONTEXT_MENU_QUIT], GetPartyMenuContextMenuActionFunc(PARTY_MON_CONTEXT_MENU_QUIT)); PartyMenuContextMenu contextMenu; - contextMenu.items = partyMenu->listMenuItems; - contextMenu.window = &partyMenu->windows[PARTY_MENU_WINDOW_ID_36]; - contextMenu.unk_08 = 0; - contextMenu.unk_09 = 1; - contextMenu.numItems = numItems + 1; - contextMenu.unk_0B_0 = 0; - contextMenu.unk_0B_4 = 0; + contextMenu.items = partyMenu->listMenuItems; + contextMenu.window = &partyMenu->windows[PARTY_MENU_WINDOW_ID_36]; + contextMenu.unk_08 = 0; + contextMenu.unk_09 = 1; + contextMenu.numItems = numItems + 1; + contextMenu.unk_0B_0 = 0; + contextMenu.unk_0B_4 = 0; contextMenu.scrollEnabled = 1; sub_0207E54C(partyMenu, contextMenu.numItems, 0, 1); partyMenu->contextMenuCursor = PartyMenu_CreateContextMenuCursor(partyMenu, &contextMenu, 0, HEAP_ID_PARTY_MENU, 1); @@ -969,7 +969,7 @@ int PartyMenu_Subtask_SelectMove(PartyMenu *partyMenu) { PartyMenu_DisableMainScreenBlend_AfterYesNo(); if (UseItemOnMonInParty(partyMenu->args->party, partyMenu->args->itemId, partyMenu->partyMonIndex, input, PartyMenu_GetCurrentMapSec(partyMenu), HEAP_ID_PARTY_MENU) == TRUE) { Pokemon *mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); - int moveId = GetMonData(mon, MON_DATA_MOVE1 + input, NULL); + int moveId = GetMonData(mon, MON_DATA_MOVE1 + input, NULL); PartyMenu_GetItemUseMessage(partyMenu, partyMenu->args->itemId, moveId); Bag_TakeItem(partyMenu->args->bag, partyMenu->args->itemId, 1, HEAP_ID_PARTY_MENU); PlaySE(SEQ_SE_DP_KAIFUKU); @@ -977,7 +977,7 @@ int PartyMenu_Subtask_SelectMove(PartyMenu *partyMenu) { ReadMsgDataIntoString(partyMenu->msgData, msg_0300_00102, partyMenu->formattedStrBuf); } PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; case LIST_NOTHING_CHOSEN: @@ -997,7 +997,7 @@ void PartyMenu_HandleAttachMailFromMailbox(PartyMenu *partyMenu) { partyMenu->partyMonIndex = 7; } PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; } diff --git a/src/party_menu_list_items.c b/src/party_menu_list_items.c index 3f4b16e308..1bfa2dc8f8 100644 --- a/src/party_menu_list_items.c +++ b/src/party_menu_list_items.c @@ -55,39 +55,39 @@ static void PartyMonContextMenuAction_Headbutt(PartyMenu *partyMenu, int *pState static int PartyMonContextMenuAction_TransferHP(PartyMenu *partyMenu); static const u32 _02101CB8[] = { - [PARTY_MON_CONTEXT_MENU_SWITCH] = (u32)PartyMonContextMenuAction_Switch, - [PARTY_MON_CONTEXT_MENU_SUMMARY] = (u32)PartyMonContextMenuAction_Summary, - [PARTY_MON_CONTEXT_MENU_ITEM] = (u32)PartyMonContextMenuAction_Item, - [PARTY_MON_CONTEXT_MENU_GIVE] = (u32)PartyMonContextMenuAction_Give, - [PARTY_MON_CONTEXT_MENU_TAKE] = (u32)PartyMonContextMenuAction_Take, - [PARTY_MON_CONTEXT_MENU_MAIL] = (u32)PartyMonContextMenuAction_Mail, - [PARTY_MON_CONTEXT_MENU_READ_MAIL] = (u32)PartyMonContextMenuAction_ReadMail, - [PARTY_MON_CONTEXT_MENU_TAKE_MAIL] = (u32)PartyMonContextMenuAction_TakeMail, - [PARTY_MON_CONTEXT_MENU_STORE] = (u32)PartyMonContextMenuAction_Store, - [PARTY_MON_CONTEXT_MENU_QUIT] = LIST_CANCEL, - [PARTY_MON_CONTEXT_MENU_UNUSED] = LIST_CANCEL, - [PARTY_MON_CONTEXT_MENU_ENTER] = (u32)PartyMonContextMenuAction_Enter, - [PARTY_MON_CONTEXT_MENU_NO_ENTRY] = (u32)PartyMonContextMenuAction_NoEntry, + [PARTY_MON_CONTEXT_MENU_SWITCH] = (u32)PartyMonContextMenuAction_Switch, + [PARTY_MON_CONTEXT_MENU_SUMMARY] = (u32)PartyMonContextMenuAction_Summary, + [PARTY_MON_CONTEXT_MENU_ITEM] = (u32)PartyMonContextMenuAction_Item, + [PARTY_MON_CONTEXT_MENU_GIVE] = (u32)PartyMonContextMenuAction_Give, + [PARTY_MON_CONTEXT_MENU_TAKE] = (u32)PartyMonContextMenuAction_Take, + [PARTY_MON_CONTEXT_MENU_MAIL] = (u32)PartyMonContextMenuAction_Mail, + [PARTY_MON_CONTEXT_MENU_READ_MAIL] = (u32)PartyMonContextMenuAction_ReadMail, + [PARTY_MON_CONTEXT_MENU_TAKE_MAIL] = (u32)PartyMonContextMenuAction_TakeMail, + [PARTY_MON_CONTEXT_MENU_STORE] = (u32)PartyMonContextMenuAction_Store, + [PARTY_MON_CONTEXT_MENU_QUIT] = LIST_CANCEL, + [PARTY_MON_CONTEXT_MENU_UNUSED] = LIST_CANCEL, + [PARTY_MON_CONTEXT_MENU_ENTER] = (u32)PartyMonContextMenuAction_Enter, + [PARTY_MON_CONTEXT_MENU_NO_ENTRY] = (u32)PartyMonContextMenuAction_NoEntry, [PARTY_MON_CONTEXT_MENU_CONTEST_ENTER] = (u32)PartyMonContextMenuAction_ContestEnter, - [PARTY_MON_CONTEXT_MENU_SET] = (u32)PartyMonContextMenuAction_Set, - [PARTY_MON_CONTEXT_MENU_CONFIRM] = (u32)PartyMonContextMenuAction_Confirm, - [PARTY_MON_CONTEXT_MENU_CUT] = (u32)PartyMonContextMenuAction_Cut, - [PARTY_MON_CONTEXT_MENU_FLY] = (u32)PartyMonContextMenuAction_Fly, - [PARTY_MON_CONTEXT_MENU_SURF] = (u32)PartyMonContextMenuAction_Surf, - [PARTY_MON_CONTEXT_MENU_STRENGTH] = (u32)PartyMonContextMenuAction_Strength, - [PARTY_MON_CONTEXT_MENU_ROCK_SMASH] = (u32)PartyMonContextMenuAction_RockSmash, - [PARTY_MON_CONTEXT_MENU_WATERFALL] = (u32)PartyMonContextMenuAction_Waterfall, - [PARTY_MON_CONTEXT_MENU_ROCK_CLIMB] = (u32)PartyMonContextMenuAction_RockClimb, - [PARTY_MON_CONTEXT_MENU_WHIRLPOOL] = (u32)PartyMonContextMenuAction_Whirlpool, - [PARTY_MON_CONTEXT_MENU_FLASH] = (u32)PartyMonContextMenuAction_Flash, - [PARTY_MON_CONTEXT_MENU_TELEPORT] = (u32)PartyMonContextMenuAction_Teleport, - [PARTY_MON_CONTEXT_MENU_DIG] = (u32)PartyMonContextMenuAction_Dig, - [PARTY_MON_CONTEXT_MENU_SWEET_SCENT] = (u32)PartyMonContextMenuAction_SweetScent, - [PARTY_MON_CONTEXT_MENU_CHATTER] = (u32)PartyMonContextMenuAction_Chatter, - [PARTY_MON_CONTEXT_MENU_HEADBUTT] = (u32)PartyMonContextMenuAction_Headbutt, - [PARTY_MON_CONTEXT_MENU_MILK_DRINK] = (u32)PartyMonContextMenuAction_MilkDrink, - [PARTY_MON_CONTEXT_MENU_SOFTBOILED] = (u32)PartyMonContextMenuAction_Softboiled, - [PARTY_MON_CONTEXT_MENU_MAX] = LIST_CANCEL, + [PARTY_MON_CONTEXT_MENU_SET] = (u32)PartyMonContextMenuAction_Set, + [PARTY_MON_CONTEXT_MENU_CONFIRM] = (u32)PartyMonContextMenuAction_Confirm, + [PARTY_MON_CONTEXT_MENU_CUT] = (u32)PartyMonContextMenuAction_Cut, + [PARTY_MON_CONTEXT_MENU_FLY] = (u32)PartyMonContextMenuAction_Fly, + [PARTY_MON_CONTEXT_MENU_SURF] = (u32)PartyMonContextMenuAction_Surf, + [PARTY_MON_CONTEXT_MENU_STRENGTH] = (u32)PartyMonContextMenuAction_Strength, + [PARTY_MON_CONTEXT_MENU_ROCK_SMASH] = (u32)PartyMonContextMenuAction_RockSmash, + [PARTY_MON_CONTEXT_MENU_WATERFALL] = (u32)PartyMonContextMenuAction_Waterfall, + [PARTY_MON_CONTEXT_MENU_ROCK_CLIMB] = (u32)PartyMonContextMenuAction_RockClimb, + [PARTY_MON_CONTEXT_MENU_WHIRLPOOL] = (u32)PartyMonContextMenuAction_Whirlpool, + [PARTY_MON_CONTEXT_MENU_FLASH] = (u32)PartyMonContextMenuAction_Flash, + [PARTY_MON_CONTEXT_MENU_TELEPORT] = (u32)PartyMonContextMenuAction_Teleport, + [PARTY_MON_CONTEXT_MENU_DIG] = (u32)PartyMonContextMenuAction_Dig, + [PARTY_MON_CONTEXT_MENU_SWEET_SCENT] = (u32)PartyMonContextMenuAction_SweetScent, + [PARTY_MON_CONTEXT_MENU_CHATTER] = (u32)PartyMonContextMenuAction_Chatter, + [PARTY_MON_CONTEXT_MENU_HEADBUTT] = (u32)PartyMonContextMenuAction_Headbutt, + [PARTY_MON_CONTEXT_MENU_MILK_DRINK] = (u32)PartyMonContextMenuAction_MilkDrink, + [PARTY_MON_CONTEXT_MENU_SOFTBOILED] = (u32)PartyMonContextMenuAction_Softboiled, + [PARTY_MON_CONTEXT_MENU_MAX] = LIST_CANCEL, }; u32 GetPartyMenuContextMenuActionFunc(int index) { @@ -104,24 +104,24 @@ static void PartyMonContextMenuAction_Item(PartyMenu *partyMenu, int *pState) { PartyMenuContextMenu template; - template.items = partyMenu->listMenuItems; - template.window = &partyMenu->windows[PARTY_MENU_WINDOW_ID_35]; - template.unk_08 = 0; - template.unk_09 = 1; - template.numItems = 3; - template.unk_0B_0 = 0; - template.unk_0B_4 = 0; + template.items = partyMenu->listMenuItems; + template.window = &partyMenu->windows[PARTY_MENU_WINDOW_ID_35]; + template.unk_08 = 0; + template.unk_09 = 1; + template.numItems = 3; + template.unk_0B_0 = 0; + template.unk_0B_4 = 0; template.scrollEnabled = FALSE; sub_0207E54C(partyMenu, template.numItems, 0, 1); partyMenu->contextMenuCursor = PartyMenu_CreateContextMenuCursor(partyMenu, &template, 0, HEAP_ID_PARTY_MENU, 1); - *pState = PARTY_MENU_STATE_HANDLE_SUBCONTEXT_MENU_INPUT; + *pState = PARTY_MENU_STATE_HANDLE_SUBCONTEXT_MENU_INPUT; } static void PartyMonContextMenuAction_Give(PartyMenu *partyMenu, int *pState) { PartyMenu_DeleteContextMenuAndList(partyMenu); PartyMenu_DisableMainScreenBlend_AfterYesNo(); partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_GIVE_ITEM; - *pState = PARTY_MENU_STATE_BEGIN_EXIT; + *pState = PARTY_MENU_STATE_BEGIN_EXIT; } static void PartyMonContextMenuAction_Take(PartyMenu *partyMenu, int *pState) { @@ -139,7 +139,7 @@ static void PartyMonContextMenuAction_Take(PartyMenu *partyMenu, int *pState) { StringExpandPlaceholders(partyMenu->msgFormat, partyMenu->formattedStrBuf, partyMenu->unformattedStrBuf); } else { if (Bag_AddItem(partyMenu->args->bag, partyMenu->monsDrawState[partyMenu->partyMonIndex].heldItem, 1, HEAP_ID_PARTY_MENU) == TRUE) { - mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); u32 itemId = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &itemId); Pokemon_UpdateArceusForm(mon); @@ -206,24 +206,24 @@ static void PartyMonContextMenuAction_Mail(PartyMenu *partyMenu, int *pState) { PartyMenuContextMenu template; - template.items = partyMenu->listMenuItems; - template.window = &partyMenu->windows[PARTY_MENU_WINDOW_ID_35]; - template.unk_08 = 0; - template.unk_09 = 1; - template.numItems = 3; - template.unk_0B_0 = 0; - template.unk_0B_4 = 0; + template.items = partyMenu->listMenuItems; + template.window = &partyMenu->windows[PARTY_MENU_WINDOW_ID_35]; + template.unk_08 = 0; + template.unk_09 = 1; + template.numItems = 3; + template.unk_0B_0 = 0; + template.unk_0B_4 = 0; template.scrollEnabled = FALSE; sub_0207E54C(partyMenu, template.numItems, 0, 1); partyMenu->contextMenuCursor = PartyMenu_CreateContextMenuCursor(partyMenu, &template, 0, HEAP_ID_PARTY_MENU, 1); - *pState = PARTY_MENU_STATE_HANDLE_SUBCONTEXT_MENU_INPUT; + *pState = PARTY_MENU_STATE_HANDLE_SUBCONTEXT_MENU_INPUT; } static void PartyMonContextMenuAction_ReadMail(PartyMenu *partyMenu, int *pState) { PartyMenu_DeleteContextMenuAndList(partyMenu); PartyMenu_DisableMainScreenBlend_AfterYesNo(); partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_READ_MAIL; - *pState = PARTY_MENU_STATE_BEGIN_EXIT; + *pState = PARTY_MENU_STATE_BEGIN_EXIT; } static void PartyMonContextMenuAction_TakeMail(PartyMenu *partyMenu, int *pState) { @@ -231,10 +231,10 @@ static void PartyMonContextMenuAction_TakeMail(PartyMenu *partyMenu, int *pState PartyMenu_DeleteContextMenuAndList(partyMenu); PartyMenu_DisableMainScreenBlend_AfterYesNo(); PartyMenu_PrintMessageOnWindow34(partyMenu, msg_0300_00044, TRUE); - partyMenu->yesCallback = PartyMenu_TakeMail_SendToPC; - partyMenu->noCallback = PartyMenu_TakeMail_DontSendToPC; + partyMenu->yesCallback = PartyMenu_TakeMail_SendToPC; + partyMenu->noCallback = PartyMenu_TakeMail_DontSendToPC; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; - *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; + *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } static int PartyMenu_TakeMail_SendToPC(PartyMenu *partyMenu) { @@ -252,8 +252,8 @@ static int PartyMenu_TakeMail_SendToPC(PartyMenu *partyMenu) { static int PartyMenu_TakeMail_DontSendToPC(PartyMenu *partyMenu) { PartyMenu_PrintMessageOnWindow34(partyMenu, msg_0300_00048, FALSE); - partyMenu->yesCallback = PartyMenu_TakeMail_ReturnToBag; - partyMenu->noCallback = PartyMenu_TakeMail_DontReturnToBag; + partyMenu->yesCallback = PartyMenu_TakeMail_ReturnToBag; + partyMenu->noCallback = PartyMenu_TakeMail_DontReturnToBag; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -263,7 +263,7 @@ static int PartyMenu_TakeMail_ReturnToBag(PartyMenu *partyMenu) { G2_BlendNone(); if (Bag_AddItem(partyMenu->args->bag, partyMenu->monsDrawState[partyMenu->partyMonIndex].heldItem, 1, HEAP_ID_PARTY_MENU) == TRUE) { - mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); + mon = Party_GetMonByIndex(partyMenu->args->party, partyMenu->partyMonIndex); u32 itemId = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &itemId); Pokemon_UpdateArceusForm(mon); @@ -300,13 +300,13 @@ static void PartyMonContextMenuAction_Store(PartyMenu *partyMenu, int *pState) { PartyMenu_DisableMainScreenBlend_AfterYesNo(); if (partyMenu->monsDrawState[partyMenu->partyMonIndex].capsule == 0) { partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; - *pState = PARTY_MENU_STATE_BEGIN_EXIT; + *pState = PARTY_MENU_STATE_BEGIN_EXIT; } else { PartyMenu_PrintMessageOnWindow34(partyMenu, msg_0300_00179, TRUE); - partyMenu->yesCallback = PartyMenu_ConfirmRemoveCapsuleYes; - partyMenu->noCallback = PartyMenu_ConfirmRemoveCapsuleNo; + partyMenu->yesCallback = PartyMenu_ConfirmRemoveCapsuleYes; + partyMenu->noCallback = PartyMenu_ConfirmRemoveCapsuleNo; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_YES_NO_INIT; - *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; + *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } } @@ -325,7 +325,7 @@ int PartyMenu_ConfirmRemoveCapsuleNo(PartyMenu *partyMenu) { } static void PartyMonContextMenuAction_Switch(PartyMenu *partyMenu, int *pState) { - partyMenu->secondCursorActive = 1; + partyMenu->secondCursorActive = 1; partyMenu->softboiledDonorSlot = partyMenu->partyMonIndex; thunk_Sprite_SetPalIndex(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], 0); @@ -363,9 +363,9 @@ void sub_0207FC1C(PartyMenu *partyMenu) { u16 i; partyMenu->swapMonsData.slots[0] = partyMenu->partyMonIndex; partyMenu->swapMonsData.slots[1] = partyMenu->softboiledDonorSlot; - partyMenu->swapMonsData.active = 1; - partyMenu->swapMonsData.xOffset = 0; - partyMenu->swapMonsData.state = 0; + partyMenu->swapMonsData.active = 1; + partyMenu->swapMonsData.xOffset = 0; + partyMenu->swapMonsData.state = 0; if (partyMenu->swapMonsData.slots[0] & 1) { partyMenu->swapMonsData.directions[0] = 1; } else { @@ -436,7 +436,7 @@ BOOL sub_0207FD6C(PartyMenu *partyMenu) { case 4: Party_SwapSlots(partyMenu->args->party, swapMonsData->slots[0], swapMonsData->slots[1]); Sprite_SetVisibleFlag(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], TRUE); - swapMonsData->active = 0; + swapMonsData->active = 0; partyMenu->secondCursorActive = 0; sub_0207A7F4(partyMenu, partyMenu->partyMonIndex); sub_0207A7F4(partyMenu, partyMenu->softboiledDonorSlot); @@ -449,8 +449,8 @@ BOOL sub_0207FD6C(PartyMenu *partyMenu) { static void PartyMenu_SwapMonsPanelsStep(PartyMenu *partyMenu, u8 slot) { PartyMenuSwapMonsData *swapMonsData = &partyMenu->swapMonsData; - s8 x = partyMenu->monsDrawState[swapMonsData->slots[slot]].unk_14; - s8 y = partyMenu->monsDrawState[swapMonsData->slots[slot]].unk_15; + s8 x = partyMenu->monsDrawState[swapMonsData->slots[slot]].unk_14; + s8 y = partyMenu->monsDrawState[swapMonsData->slots[slot]].unk_15; FillBgTilemapRect(partyMenu->bgConfig, GF_BG_LYR_MAIN_2, 0, x, y, 16, 6, TILEMAP_FILL_KEEP_PAL); FillBgTilemapRect(partyMenu->bgConfig, GF_BG_LYR_MAIN_1, 0, x, y, 16, 6, TILEMAP_FILL_KEEP_PAL); @@ -491,37 +491,37 @@ static void PartyMenu_SwapMonsData(PartyMenu *partyMenu) { PartyMenuMonsDrawState *monBuf; s16 pos; - monBuf = AllocFromHeap(HEAP_ID_PARTY_MENU, sizeof(PartyMenuMonsDrawState)); - *monBuf = partyMenu->monsDrawState[swapMonsData->slots[0]]; + monBuf = AllocFromHeap(HEAP_ID_PARTY_MENU, sizeof(PartyMenuMonsDrawState)); + *monBuf = partyMenu->monsDrawState[swapMonsData->slots[0]]; partyMenu->monsDrawState[swapMonsData->slots[0]] = partyMenu->monsDrawState[swapMonsData->slots[1]]; partyMenu->monsDrawState[swapMonsData->slots[1]] = *monBuf; FreeToHeapExplicit(HEAP_ID_PARTY_MENU, monBuf); - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].iconX; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].iconX; partyMenu->monsDrawState[swapMonsData->slots[0]].iconX = partyMenu->monsDrawState[swapMonsData->slots[1]].iconX; partyMenu->monsDrawState[swapMonsData->slots[1]].iconX = pos; - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].iconY; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].iconY; partyMenu->monsDrawState[swapMonsData->slots[0]].iconY = partyMenu->monsDrawState[swapMonsData->slots[1]].iconY; partyMenu->monsDrawState[swapMonsData->slots[1]].iconY = pos; - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].statusIconX; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].statusIconX; partyMenu->monsDrawState[swapMonsData->slots[0]].statusIconX = partyMenu->monsDrawState[swapMonsData->slots[1]].statusIconX; partyMenu->monsDrawState[swapMonsData->slots[1]].statusIconX = pos; - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].statusIconY; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].statusIconY; partyMenu->monsDrawState[swapMonsData->slots[0]].statusIconY = partyMenu->monsDrawState[swapMonsData->slots[1]].statusIconY; partyMenu->monsDrawState[swapMonsData->slots[1]].statusIconY = pos; - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].heldItemX; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].heldItemX; partyMenu->monsDrawState[swapMonsData->slots[0]].heldItemX = partyMenu->monsDrawState[swapMonsData->slots[1]].heldItemX; partyMenu->monsDrawState[swapMonsData->slots[1]].heldItemX = pos; - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].heldItemY; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].heldItemY; partyMenu->monsDrawState[swapMonsData->slots[0]].heldItemY = partyMenu->monsDrawState[swapMonsData->slots[1]].heldItemY; partyMenu->monsDrawState[swapMonsData->slots[1]].heldItemY = pos; - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].unk_14; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].unk_14; partyMenu->monsDrawState[swapMonsData->slots[0]].unk_14 = partyMenu->monsDrawState[swapMonsData->slots[1]].unk_14; partyMenu->monsDrawState[swapMonsData->slots[1]].unk_14 = pos; - pos = partyMenu->monsDrawState[swapMonsData->slots[0]].unk_15; + pos = partyMenu->monsDrawState[swapMonsData->slots[0]].unk_15; partyMenu->monsDrawState[swapMonsData->slots[0]].unk_15 = partyMenu->monsDrawState[swapMonsData->slots[1]].unk_15; partyMenu->monsDrawState[swapMonsData->slots[1]].unk_15 = pos; @@ -541,19 +541,19 @@ static void PartyMenu_SwapMonsData(PartyMenu *partyMenu) { static void PartyMenu_RedrawMonHpBarAfterSwap(PartyMenu *partyMenu, u8 slot) { PartyMenuSwapMonsData *swapMonsData = &partyMenu->swapMonsData; - u16 *bg2Tilemap = swapMonsData->bg2Tilemaps[slot]; - const u16 *src = sub_0207A16C(partyMenu); + u16 *bg2Tilemap = swapMonsData->bg2Tilemaps[slot]; + const u16 *src = sub_0207A16C(partyMenu); u16 color; u16 i; if (partyMenu->monsDrawState[swapMonsData->slots[slot]].isEgg == TRUE) { for (i = 0; i < 9; ++i) { - color = bg2Tilemap[0x36 + i] & 0xF000; + color = bg2Tilemap[0x36 + i] & 0xF000; bg2Tilemap[0x36 + i] = color | 0x04B; } } else { for (i = 0; i < 9; ++i) { - color = bg2Tilemap[0x36 + i] & 0xF000; + color = bg2Tilemap[0x36 + i] & 0xF000; bg2Tilemap[0x36 + i] = color | (src[i] & 0xFFF); } } @@ -597,7 +597,7 @@ static void PartyMonContextMenuAction_Enter(PartyMenu *partyMenu, int *pState) { break; } partyMenu->afterTextPrinterState = PARTY_MENU_STATE_SELECT_MONS_ERROR_MSG_CLOSE; - *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; + *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } int PartyMenu_Subtask_SelectMonsErrorMsgClose(PartyMenu *partyMenu) { @@ -613,7 +613,7 @@ static void PartyMonContextMenuAction_NoEntry(PartyMenu *partyMenu, int *pState) if (partyMenu->partyMonIndex + 1 == partyMenu->args->selectedOrder[i]) { partyMenu->args->selectedOrder[i] = 0; for (; i < partyMenu->args->maxMonsToSelect - 1; ++i) { - partyMenu->args->selectedOrder[i] = partyMenu->args->selectedOrder[i + 1]; + partyMenu->args->selectedOrder[i] = partyMenu->args->selectedOrder[i + 1]; partyMenu->args->selectedOrder[i + 1] = 0; } break; @@ -670,7 +670,7 @@ int PartyMenu_HandleSetMonCapsule(PartyMenu *partyMenu) { partyMenu->partyMonIndex = 7; } PartyMenu_PrintMessageOnWindow34(partyMenu, -1, TRUE); - partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; + partyMenu->args->selectedAction = PARTY_MENU_ACTION_RETURN_0; partyMenu->afterTextPrinterState = PARTY_MENU_STATE_AFTER_MESSAGE_BEGIN_EXIT; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } @@ -713,7 +713,7 @@ static void PartyMenuContextMenuAction_FieldMoveCommon(PartyMenu *partyMenu, int PartyMenu_DisableMainScreenBlend_AfterYesNo(); PartyMenu_PrintMessageOnWindow34(partyMenu, msgId, TRUE); partyMenu->afterTextPrinterState = PARTY_MENU_STATE_3; - *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; + *pState = PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } static void PartyMonContextMenuAction_Cut(PartyMenu *partyMenu, int *pState) { @@ -810,7 +810,7 @@ static int PartyMonContextMenuAction_TransferHP(PartyMenu *partyMenu) { partyMenu->afterTextPrinterState = PARTY_MENU_STATE_3; return PARTY_MENU_STATE_WAIT_TEXT_PRINTER; } - partyMenu->secondCursorActive = 1; + partyMenu->secondCursorActive = 1; partyMenu->softboiledDonorSlot = partyMenu->partyMonIndex; thunk_Sprite_SetPalIndex(partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR], 0); s16 x, y; diff --git a/src/party_menu_sprites.c b/src/party_menu_sprites.c index 64cd3a48b2..7823a3d71f 100644 --- a/src/party_menu_sprites.c +++ b/src/party_menu_sprites.c @@ -355,18 +355,18 @@ void sub_0207EB24(PartyMenu *partyMenu) { GfGfx_EngineATogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); GfGfx_EngineBTogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); GF_CreateVramTransferManager(32, HEAP_ID_PARTY_MENU); - partyMenu->spriteRenderer = SpriteRenderer_Create(HEAP_ID_PARTY_MENU); + partyMenu->spriteRenderer = SpriteRenderer_Create(HEAP_ID_PARTY_MENU); partyMenu->spriteGfxHandler = SpriteRenderer_CreateGfxHandler(partyMenu->spriteRenderer); OamManagerParam oamManagerTemplate = { - .fromOBJmain = 0, - .numOBJmain = 128, + .fromOBJmain = 0, + .numOBJmain = 128, .fromAffineMain = 0, - .numAffineMain = 32, - .fromOBJsub = 4, - .numOBJsub = 124, - .fromAffineSub = 1, - .numAffineSub = 31, + .numAffineMain = 32, + .fromOBJsub = 4, + .numOBJsub = 124, + .fromAffineSub = 1, + .numAffineSub = 31, }; OamCharTransferParam transferTemplate = { 35, @@ -403,23 +403,23 @@ void sub_0207EBE4(PartyMenu *partyMenu, u8 partySlot, u16 x, u16 y, NARC *narc) isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); - sp1C.resourceSet = partySlot + 4; - sp1C.x = x; - sp1C.y = y; - sp1C.z = 0; - sp1C.animSeqNo = 0; - sp1C.rotation = 0; - sp1C.palIndex = GetMonIconPaletteEx(partyMenu->monsDrawState[partySlot].species, partyMenu->monsDrawState[partySlot].form, isEgg) + 3; - sp1C.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; - sp1C.unk_18 = 0; - sp1C.unk_1C = 0; - sp1C.unk_20 = 0; - sp1C.unk_24 = 0; - partyMenu->monsDrawState[partySlot].iconSprite = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sp1C); - sp1C.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; - sp1C.palIndex = GetMonIconPaletteEx(partyMenu->monsDrawState[partySlot].species, partyMenu->monsDrawState[partySlot].form, isEgg) + 1; - sp1C.x = x; - sp1C.y = y + 0x100; + sp1C.resourceSet = partySlot + 4; + sp1C.x = x; + sp1C.y = y; + sp1C.z = 0; + sp1C.animSeqNo = 0; + sp1C.rotation = 0; + sp1C.palIndex = GetMonIconPaletteEx(partyMenu->monsDrawState[partySlot].species, partyMenu->monsDrawState[partySlot].form, isEgg) + 3; + sp1C.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; + sp1C.unk_18 = 0; + sp1C.unk_1C = 0; + sp1C.unk_20 = 0; + sp1C.unk_24 = 0; + partyMenu->monsDrawState[partySlot].iconSprite = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sp1C); + sp1C.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; + sp1C.palIndex = GetMonIconPaletteEx(partyMenu->monsDrawState[partySlot].species, partyMenu->monsDrawState[partySlot].form, isEgg) + 1; + sp1C.x = x; + sp1C.y = y + 0x100; partyMenu->monsDrawState[partySlot].mainScreenIconSprite = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sp1C); } @@ -433,12 +433,12 @@ void sub_0207ECE0(PartyMenu *partyMenu, u8 partySlot) { void *ncgrFile; NNSG2dCharacterData *pCharData; - mon = Party_GetMonByIndex(partyMenu->args->party, partySlot); - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); - narc = NARC_New(NARC_poketool_icongra_poke_icon, HEAP_ID_PARTY_MENU); + mon = Party_GetMonByIndex(partyMenu->args->party, partySlot); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); + narc = NARC_New(NARC_poketool_icongra_poke_icon, HEAP_ID_PARTY_MENU); imageLocation = NNS_G2dGetImageLocation(Sprite_GetImageProxy(partyMenu->monsDrawState[partySlot].iconSprite), NNS_G2D_VRAM_TYPE_2DMAIN); - ncgrFile = GfGfxLoader_LoadFromOpenNarc(narc, Pokemon_GetIconNaix(mon), FALSE, HEAP_ID_PARTY_MENU, TRUE); + ncgrFile = GfGfxLoader_LoadFromOpenNarc(narc, Pokemon_GetIconNaix(mon), FALSE, HEAP_ID_PARTY_MENU, TRUE); if (NNS_G2dGetUnpackedCharacterData(ncgrFile, &pCharData)) { DC_FlushRange(pCharData->pRawData, pCharData->szByte); GX_LoadOBJ(pCharData->pRawData, imageLocation, pCharData->szByte); @@ -453,20 +453,20 @@ void sub_0207ECE0(PartyMenu *partyMenu, u8 partySlot) { } void sub_0207EDD4(PartyMenu *partyMenu) { - partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[0]); + partyMenu->sprites[PARTY_MENU_SPRITE_ID_CURSOR] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[0]); partyMenu->sprites[PARTY_MENU_SPRITE_ID_SWITCH_MON_CURSOR] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[1]); - partyMenu->sprites[PARTY_MENU_SPRITE_ID_8] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[2]); - partyMenu->sprites[PARTY_MENU_SPRITE_ID_9] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[3]); - partyMenu->sprites[PARTY_MENU_SPRITE_ID_28] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[22]); + partyMenu->sprites[PARTY_MENU_SPRITE_ID_8] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[2]); + partyMenu->sprites[PARTY_MENU_SPRITE_ID_9] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[3]); + partyMenu->sprites[PARTY_MENU_SPRITE_ID_28] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[22]); for (u32 i = 0; i < 6; ++i) { partyMenu->sprites[PARTY_MENU_SPRITE_ID_MON1_STATUS + i] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[4 + i]); - partyMenu->monsDrawState[i].statusIconX = sSpriteTemplates[4 + i].x; - partyMenu->monsDrawState[i].statusIconY = sSpriteTemplates[4 + i].y; + partyMenu->monsDrawState[i].statusIconX = sSpriteTemplates[4 + i].x; + partyMenu->monsDrawState[i].statusIconY = sSpriteTemplates[4 + i].y; Sprite_SetVisibleFlag(partyMenu->sprites[PARTY_MENU_SPRITE_ID_MON1_STATUS + i], FALSE); partyMenu->sprites[PARTY_MENU_SPRITE_ID_MON1_HELD_ITEM + i] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[10 + i]); - partyMenu->sprites[PARTY_MENU_SPRITE_ID_MON1_CAPSULE + i] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[16 + i]); + partyMenu->sprites[PARTY_MENU_SPRITE_ID_MON1_CAPSULE + i] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[16 + i]); } for (u32 i = 0; i < 6; ++i) { partyMenu->mainScreenStatusSprites[i] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sSpriteTemplates[23]); @@ -479,18 +479,18 @@ void sub_0207EDD4(PartyMenu *partyMenu) { void sub_0207EF5C(PartyMenu *partyMenu, u8 partySlot, u16 x, u16 y) { UnkStruct_0200D2B4 sp0; - sp0.resourceSet = 0; - sp0.x = x; - sp0.y = y; - sp0.z = 0; - sp0.animSeqNo = 0; - sp0.palIndex = 0; - sp0.unk_18 = 0; - sp0.unk_1C = 0; - sp0.unk_20 = 0; - sp0.unk_24 = 0; - sp0.rotation = 1; - sp0.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; + sp0.resourceSet = 0; + sp0.x = x; + sp0.y = y; + sp0.z = 0; + sp0.animSeqNo = 0; + sp0.palIndex = 0; + sp0.unk_18 = 0; + sp0.unk_1C = 0; + sp0.unk_20 = 0; + sp0.unk_24 = 0; + sp0.rotation = 1; + sp0.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; partyMenu->sprites[partySlot + PARTY_MENU_SPRITE_ID_BALL] = SpriteRenderer_CreateSprite(partyMenu->spriteRenderer, partyMenu->spriteGfxHandler, &sp0); } diff --git a/src/phonebook_dat.c b/src/phonebook_dat.c index df695d1889..0de848ff3c 100644 --- a/src/phonebook_dat.c +++ b/src/phonebook_dat.c @@ -20,7 +20,7 @@ struct PhoneBook *AllocAndReadPhoneBook(HeapID heapId) { // This is a waste of space // (flen - 4) bytes is allocated twice flen = FS_GetLength(&file); - ret = AllocFromHeap(heapId, flen); + ret = AllocFromHeap(heapId, flen); MI_CpuClear8(ret, flen); FS_ReadFile(&file, &ret->count, sizeof(ret->count)); diff --git a/src/photo_album.c b/src/photo_album.c index 7c685e7be4..ef06826d32 100644 --- a/src/photo_album.c +++ b/src/photo_album.c @@ -76,7 +76,7 @@ Photo *PhotoAlbum_LoadAllInUsePhotos(const PhotoAlbum *photoAlbum, HeapID heapId u8 i, j, n; Photo *ret; - n = PhotoAlbum_GetNumSaved(photoAlbum); + n = PhotoAlbum_GetNumSaved(photoAlbum); ret = AllocFromHeap(heapId, n * sizeof(Photo)); MI_CpuClear8(ret, n * sizeof(Photo)); j = 0; diff --git a/src/pm_string.c b/src/pm_string.c index 8969690c1e..74334857bb 100644 --- a/src/pm_string.c +++ b/src/pm_string.c @@ -18,9 +18,9 @@ String *String_New(u32 maxsize, HeapID heapId) { String *ret = (String *)AllocFromHeap(heapId, 2 * maxsize + sizeof(String) + sizeof(u16)); if (ret != NULL) { - ret->magic = STRING_MAGIC; + ret->magic = STRING_MAGIC; ret->maxsize = maxsize; - ret->size = 0; + ret->size = 0; ret->data[0] = EOS; } return ret; @@ -34,7 +34,7 @@ void String_Delete(String *string) { void String_SetEmpty(String *string) { ASSERT_STRING(string); - string->size = 0; + string->size = 0; string->data[0] = EOS; } @@ -109,7 +109,7 @@ void String16_FormatInteger(String *str, int num, u32 ndigits, PrintingMode strC String_SetEmpty(str); if (isNegative) { num *= -1; - u16 hyphen = (u16)((whichCharset == 0) ? CHAR_JP_HYPHEN : CHAR_HYPHEN); + u16 hyphen = (u16)((whichCharset == 0) ? CHAR_JP_HYPHEN : CHAR_HYPHEN); str->data[str->size++] = hyphen; } u32 dividend = sPowersOfTen[ndigits - 1]; @@ -117,14 +117,14 @@ void String16_FormatInteger(String *str, int num, u32 ndigits, PrintingMode strC u16 digit = (u16)(num / dividend); num -= dividend * digit; if (strConvMode == PRINTING_MODE_LEADING_ZEROS) { - u16 value = (u16)((digit < 10) ? charbase[digit] : CHAR_JP_QUESTION_MARK); + u16 value = (u16)((digit < 10) ? charbase[digit] : CHAR_JP_QUESTION_MARK); str->data[str->size++] = value; } else if (digit != 0 || dividend == 1) { - strConvMode = PRINTING_MODE_LEADING_ZEROS; - u16 value = (u16)((digit < 10) ? charbase[digit] : CHAR_JP_QUESTION_MARK); + strConvMode = PRINTING_MODE_LEADING_ZEROS; + u16 value = (u16)((digit < 10) ? charbase[digit] : CHAR_JP_QUESTION_MARK); str->data[str->size++] = value; } else if (strConvMode == PRINTING_MODE_RIGHT_ALIGN) { - u16 value = (u16)((whichCharset == 0) ? CHAR_JP_SPACE : CHAR_NARROW_SPACE); + u16 value = (u16)((whichCharset == 0) ? CHAR_JP_SPACE : CHAR_NARROW_SPACE); str->data[str->size++] = value; } dividend /= 10; @@ -195,7 +195,7 @@ void String16_FormatUnsignedLongLong(String *str, u64 num, u32 ndigits, Printing String_SetEmpty(str); if (isNegative) { num *= -1; - u16 hyphen = (u16)((whichCharset == 0) ? CHAR_JP_HYPHEN : CHAR_HYPHEN); + u16 hyphen = (u16)((whichCharset == 0) ? CHAR_JP_HYPHEN : CHAR_HYPHEN); str->data[str->size++] = hyphen; } u64 dividend = sPowersOfTen[ndigits - 1]; @@ -203,14 +203,14 @@ void String16_FormatUnsignedLongLong(String *str, u64 num, u32 ndigits, Printing u64 digit = num / dividend; num -= dividend * digit; if (strConvMode == PRINTING_MODE_LEADING_ZEROS) { - u16 value = (u16)((digit < 10ull) ? charbase[digit] : CHAR_JP_QUESTION_MARK); + u16 value = (u16)((digit < 10ull) ? charbase[digit] : CHAR_JP_QUESTION_MARK); str->data[str->size++] = value; } else if (digit != 0 || dividend == 1) { - strConvMode = PRINTING_MODE_LEADING_ZEROS; - u16 value = (u16)((digit < 10ull) ? charbase[digit] : CHAR_JP_QUESTION_MARK); + strConvMode = PRINTING_MODE_LEADING_ZEROS; + u16 value = (u16)((digit < 10ull) ? charbase[digit] : CHAR_JP_QUESTION_MARK); str->data[str->size++] = value; } else if (strConvMode == PRINTING_MODE_RIGHT_ALIGN) { - u16 value = (u16)((whichCharset == 0) ? CHAR_JP_SPACE : CHAR_SPACE); + u16 value = (u16)((whichCharset == 0) ? CHAR_JP_SPACE : CHAR_SPACE); str->data[str->size++] = value; } dividend /= 10ull; @@ -222,7 +222,7 @@ void String16_FormatUnsignedLongLong(String *str, u64 num, u32 ndigits, Printing } s64 String_atoi(String *str, BOOL *flag) { - s64 ret = 0ll; + s64 ret = 0ll; s64 pow10 = 1ll; if (str->size > 18) { return 0; @@ -300,7 +300,7 @@ void String_GetLineN(String *dest, volatile String *src, u32 n) { void String_RadioAddStatic(String *string, u8 level) { u32 width_3dots = FontID_GetGlyphWidth(0, CHAR_ELLIPSIS); - u32 width_1dot = FontID_GetGlyphWidth(0, CHAR_ONE_DOT); + u32 width_1dot = FontID_GetGlyphWidth(0, CHAR_ONE_DOT); u32 width_2dots = FontID_GetGlyphWidth(0, CHAR_TWO_DOTS); u32 cur_width; int str_len; @@ -388,7 +388,7 @@ void String_AddChar(String *str, u16 val) { if (str->size + 1 < str->maxsize) { str->data[str->size++] = val; - str->data[str->size] = EOS; + str->data[str->size] = EOS; return; } GF_ASSERT(0); @@ -400,10 +400,10 @@ BOOL String_IsTrainerName(String *string) { void String_Cat_HandleTrainerName(String *dest, String *src) { if (String_IsTrainerName(src)) { - u16 *dest_p = &dest->data[dest->size]; - u16 *src_p = &src->data[1]; - s32 bit = 0; - u32 outsize = 0; + u16 *dest_p = &dest->data[dest->size]; + u16 *src_p = &src->data[1]; + s32 bit = 0; + u32 outsize = 0; u16 cur_char = 0; while (1) { diff --git a/src/pm_version.c b/src/pm_version.c index 5c11feca78..7eb6f32752 100644 --- a/src/pm_version.c +++ b/src/pm_version.c @@ -1,4 +1,4 @@ #include "global.h" -const u8 gGameVersion = GAME_VERSION; +const u8 gGameVersion = GAME_VERSION; const u8 gGameLanguage = GAME_LANGUAGE; diff --git a/src/poke_overlay.c b/src/poke_overlay.c index e6218c4ca1..7b309a67c5 100644 --- a/src/poke_overlay.c +++ b/src/poke_overlay.c @@ -49,12 +49,12 @@ static PMiOverlayRegion GetOverlayLoadDestination(FSOverlayID id) { u8 *start; GF_ASSERT(FS_LoadOverlayInfo(&info, MI_PROCESSOR_ARM9, id) == TRUE); start = (u8 *)HW_ITCM_IMAGE; - end = (u8 *)HW_ITCM_END; + end = (u8 *)HW_ITCM_END; if (info.header.ram_address <= end && info.header.ram_address >= start) { return OVY_REGION_ITCM; } start = (u8 *)HW_DTCM; - end = start + HW_DTCM_SIZE; + end = start + HW_DTCM_SIZE; if (info.header.ram_address <= end && info.header.ram_address >= start) { return OVY_REGION_DTCM; } @@ -72,13 +72,13 @@ BOOL HandleLoadOverlay(FSOverlayID ovyId, PMOverlayLoadType loadType) { return FALSE; } - overlayRegion = GetOverlayLoadDestination(ovyId); + overlayRegion = GetOverlayLoadDestination(ovyId); loadedOverlays = GetLoadedOverlaysInRegion(overlayRegion); for (i = 0; i < OVY_MAX_PER_REGION; i++) { if (loadedOverlays[i].active == FALSE) { PMiLoadedOverlay *ovy = &loadedOverlays[i]; - ovy->active = TRUE; - ovy->id = ovyId; + ovy->active = TRUE; + ovy->id = ovyId; break; } } @@ -161,7 +161,7 @@ static BOOL GetOverlayRamBounds(FSOverlayID ovyId, void **start, void **end) { } *start = info.header.ram_address; - *end = (char *)*start + (info.header.ram_size + info.header.bss_size); + *end = (char *)*start + (info.header.ram_size + info.header.bss_size); return TRUE; } diff --git a/src/pokedex.c b/src/pokedex.c index 61b4a58007..3aea555d63 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -204,7 +204,7 @@ static BOOL Pokedex_CheckSeenForm_2max(Pokedex *pokedex, u32 species, u8 form) { return FALSE; } flag_p = Pokedex_GetFormOrderAddr(pokedex, species); - n = Pokedex_GetSeenFormNum_2max(pokedex, species); + n = Pokedex_GetSeenFormNum_2max(pokedex, species); for (i = 0; i < n; i++) { flag = CheckDexFlag(flag_p, i + 1); if (flag == form) { @@ -270,7 +270,7 @@ static void Pokedex_SetSeenForm_3max(Pokedex *pokedex, u32 species, u32 state) { GF_ASSERT(species == SPECIES_BURMY || species == SPECIES_WORMADAM || species == SPECIES_PICHU); if (!Pokedex_CheckSeenForm_3max(pokedex, species, state)) { flag_p = Pokedex_GetFormOrderAddr(pokedex, species); - n = Pokedex_CountSeenForms_3max(pokedex, species); + n = Pokedex_CountSeenForms_3max(pokedex, species); if (n < 3) { SetDex2FlagState(flag_p, state, n); } @@ -516,18 +516,18 @@ static BOOL SpeciesIsNotJohtoMythical(u16 species) { void Save_Pokedex_Init(Pokedex *pokedex) { memset(pokedex, 0, sizeof(Pokedex)); - pokedex->magic = POKEDEX_MAGIC; + pokedex->magic = POKEDEX_MAGIC; pokedex->nationalDex = 0; memset(pokedex->unownSeenOrder, 0xFF, 28); memset(pokedex->unownCaughtOrder, 0xFF, 28); - pokedex->shellosFormOrder = 0xFF; + pokedex->shellosFormOrder = 0xFF; pokedex->gastrodonFormOrder = 0xFF; - pokedex->burmyFormOrder = 0xFF; - pokedex->wormadamFormOrder = 0xFF; - pokedex->rotomFormOrder = -1; - pokedex->shayminFormOrder = 0xFF; - pokedex->giratinaFormOrder = 0xFF; - pokedex->pichuFormOrder = 0xFF; + pokedex->burmyFormOrder = 0xFF; + pokedex->wormadamFormOrder = 0xFF; + pokedex->rotomFormOrder = -1; + pokedex->shayminFormOrder = 0xFF; + pokedex->giratinaFormOrder = 0xFF; + pokedex->pichuFormOrder = 0xFF; Pokedex_InitDeoxysFormOrder(pokedex); } @@ -568,7 +568,7 @@ u16 Pokedex_CountJohtoDexOwned(Pokedex *pokedex) { u16 i, n; ASSERT_POKEDEX(pokedex); johto_species = LoadSpeciesToJohtoDexNoLUT(); - n = 0; + n = 0; for (i = 1; i <= NATIONAL_DEX_COUNT; i++) { if (Pokedex_CheckMonCaughtFlag(pokedex, i) == TRUE && johto_species[i] != J_SPECIES_NONE) { n++; @@ -583,7 +583,7 @@ u16 Pokedex_CountJohtoDexSeen(Pokedex *pokedex) { u16 i, n; ASSERT_POKEDEX(pokedex); johto_species = LoadSpeciesToJohtoDexNoLUT(); - n = 0; + n = 0; for (i = 1; i <= NATIONAL_DEX_COUNT; i++) { if (Pokedex_CheckMonSeenFlag(pokedex, i) == TRUE && johto_species[i] != J_SPECIES_NONE) { n++; @@ -620,7 +620,7 @@ u16 Pokedex_CountJohtoOwned_ExcludeMythical(Pokedex *pokedex) { u16 *johto_dex; johto_dex = LoadSpeciesToJohtoDexNoLUT(); - n = 0; + n = 0; for (i = 1; i <= NATIONAL_DEX_COUNT; i++) { if (Pokedex_CheckMonCaughtFlag(pokedex, i) == TRUE && johto_dex[i] != J_SPECIES_NONE && SpeciesIsNotJohtoMythical(i) == TRUE) { n++; @@ -774,9 +774,9 @@ void Pokedex_SetMonSeenFlag(Pokedex *pokedex, Pokemon *mon) { u32 gender; u8 seenGender; - species = GetMonData(mon, MON_DATA_SPECIES, NULL); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); - gender = GetMonGender(mon); + gender = GetMonGender(mon); ASSERT_POKEDEX(pokedex); if (!DexSpeciesIsInvalid(species)) { @@ -803,10 +803,10 @@ void Pokedex_SetMonCaughtFlag(Pokedex *pokedex, Pokemon *mon) { u32 gender; u32 gender_ct; - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - language = GetMonData(mon, MON_DATA_GAME_LANGUAGE, NULL); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + language = GetMonData(mon, MON_DATA_GAME_LANGUAGE, NULL); personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); - gender = GetMonGender(mon); + gender = GetMonGender(mon); ASSERT_POKEDEX(pokedex); if (!DexSpeciesIsInvalid(species)) { diff --git a/src/pokemon.c b/src/pokemon.c index 69c4de0f3b..68ac350346 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -124,7 +124,7 @@ BOOL AcquireMonLock(Pokemon *mon) { locked = TRUE; GF_ASSERT(!mon->box.box_lock); mon->box.party_lock = TRUE; - mon->box.box_lock = TRUE; + mon->box.box_lock = TRUE; DECRYPT_PTY(mon); DECRYPT_BOX(&mon->box); } @@ -134,9 +134,9 @@ BOOL AcquireMonLock(Pokemon *mon) { BOOL ReleaseMonLock(Pokemon *mon, BOOL locked) { BOOL prev = FALSE; if (mon->box.party_lock == TRUE && locked == TRUE) { - prev = TRUE; + prev = TRUE; mon->box.party_lock = FALSE; - mon->box.box_lock = FALSE; + mon->box.box_lock = FALSE; ENCRYPT_PTY(mon); mon->box.checksum = CHECKSUM(&mon->box); ENCRYPT_BOX(&mon->box); @@ -147,7 +147,7 @@ BOOL ReleaseMonLock(Pokemon *mon, BOOL locked) { BOOL AcquireBoxMonLock(BoxPokemon *boxMon) { BOOL locked = FALSE; if (!boxMon->box_lock) { - locked = TRUE; + locked = TRUE; boxMon->box_lock = TRUE; DECRYPT_BOX(boxMon); } @@ -157,7 +157,7 @@ BOOL AcquireBoxMonLock(BoxPokemon *boxMon) { BOOL ReleaseBoxMonLock(BoxPokemon *boxMon, BOOL locked) { BOOL prev = FALSE; if (boxMon->box_lock == TRUE && locked == TRUE) { - prev = TRUE; + prev = TRUE; boxMon->box_lock = FALSE; boxMon->checksum = CHECKSUM(boxMon); ENCRYPT_BOX(boxMon); @@ -223,14 +223,14 @@ void CreateBoxMon(BoxPokemon *boxMon, int species, int level, int fixedIV, int h SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &fixedIV); } else { exp = LCRandom(); - iv = exp & 0x1F; + iv = exp & 0x1F; SetBoxMonData(boxMon, MON_DATA_HP_IV, &iv); iv = (exp & 0x3E0) >> 5; SetBoxMonData(boxMon, MON_DATA_ATK_IV, &iv); iv = (exp & 0x7C00) >> 10; SetBoxMonData(boxMon, MON_DATA_DEF_IV, &iv); exp = LCRandom(); - iv = exp & 0x1F; + iv = exp & 0x1F; SetBoxMonData(boxMon, MON_DATA_SPEED_IV, &iv); iv = (exp & 0x3E0) >> 5; SetBoxMonData(boxMon, MON_DATA_SPATK_IV, &iv); @@ -238,7 +238,7 @@ void CreateBoxMon(BoxPokemon *boxMon, int species, int level, int fixedIV, int h SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv); } exp = (u32)GetMonBaseStat(species, BASE_ABILITY_1); - iv = (u32)GetMonBaseStat(species, BASE_ABILITY_2); + iv = (u32)GetMonBaseStat(species, BASE_ABILITY_2); if (iv != 0) { if (fixedPersonality & 1) { SetBoxMonData(boxMon, MON_DATA_ABILITY, &iv); @@ -263,11 +263,11 @@ void CreateMonWithNature(Pokemon *mon, u16 species, u8 level, u8 fixedIv, u8 nat } void CreateMonWithGenderNatureLetter(Pokemon *mon, u16 species, u8 level, u8 fixedIv, u8 gender, u8 nature, u8 letter) { - u32 pid = 0; + u32 pid = 0; u16 test = 0; if (letter != 0 && letter < 29) { do { - pid = (u32)(LCRandom() | (LCRandom() << 16)); + pid = (u32)(LCRandom() | (LCRandom() << 16)); test = (u16)CALC_UNOWN_LETTER(pid); } while (nature != GetNatureFromPersonality(pid) || gender != GetGenderBySpeciesAndPersonality(species, pid) || test != letter - 1); } else { @@ -277,7 +277,7 @@ void CreateMonWithGenderNatureLetter(Pokemon *mon, u16 species, u8 level, u8 fix } u32 GenPersonalityByGenderAndNature(u16 species, u8 gender, u8 nature) { - int pid = nature; + int pid = nature; u8 ratio = (u8)GetMonBaseStat(species, BASE_GENDER_RATIO); switch (ratio) { case MON_RATIO_MALE: @@ -304,7 +304,7 @@ void CreateMonWithFixedIVs(Pokemon *mon, int species, int level, int ivs, int pe void CalcMonLevelAndStats(Pokemon *mon) { BOOL decry = AcquireMonLock(mon); - u32 level = (u32)CalcMonLevel(mon); + u32 level = (u32)CalcMonLevel(mon); SetMonData(mon, MON_DATA_LEVEL, &level); CalcMonStats(mon); ReleaseMonLock(mon, decry); @@ -337,23 +337,23 @@ void CalcMonStats(Pokemon *mon) { int newSpdef; BOOL decry = AcquireMonLock(mon); - level = (int)GetMonData(mon, MON_DATA_LEVEL, NULL); - maxHp = (int)GetMonData(mon, MON_DATA_MAXHP, NULL); - hp = (int)GetMonData(mon, MON_DATA_HP, NULL); - hpIv = (int)GetMonData(mon, MON_DATA_HP_IV, NULL); - hpEv = (int)GetMonData(mon, MON_DATA_HP_EV, NULL); - atkIv = (int)GetMonData(mon, MON_DATA_ATK_IV, NULL); - atkEv = (int)GetMonData(mon, MON_DATA_ATK_EV, NULL); - defIv = (int)GetMonData(mon, MON_DATA_DEF_IV, NULL); - defEv = (int)GetMonData(mon, MON_DATA_DEF_EV, NULL); - speedIv = (int)GetMonData(mon, MON_DATA_SPEED_IV, NULL); - speedEv = (int)GetMonData(mon, MON_DATA_SPEED_EV, NULL); - spatkIv = (int)GetMonData(mon, MON_DATA_SPATK_IV, NULL); - spatkEv = (int)GetMonData(mon, MON_DATA_SPATK_EV, NULL); - spdefIv = (int)GetMonData(mon, MON_DATA_SPDEF_IV, NULL); - spdefEv = (int)GetMonData(mon, MON_DATA_SPDEF_EV, NULL); - form = (int)GetMonData(mon, MON_DATA_FORM, NULL); - species = (int)GetMonData(mon, MON_DATA_SPECIES, NULL); + level = (int)GetMonData(mon, MON_DATA_LEVEL, NULL); + maxHp = (int)GetMonData(mon, MON_DATA_MAXHP, NULL); + hp = (int)GetMonData(mon, MON_DATA_HP, NULL); + hpIv = (int)GetMonData(mon, MON_DATA_HP_IV, NULL); + hpEv = (int)GetMonData(mon, MON_DATA_HP_EV, NULL); + atkIv = (int)GetMonData(mon, MON_DATA_ATK_IV, NULL); + atkEv = (int)GetMonData(mon, MON_DATA_ATK_EV, NULL); + defIv = (int)GetMonData(mon, MON_DATA_DEF_IV, NULL); + defEv = (int)GetMonData(mon, MON_DATA_DEF_EV, NULL); + speedIv = (int)GetMonData(mon, MON_DATA_SPEED_IV, NULL); + speedEv = (int)GetMonData(mon, MON_DATA_SPEED_EV, NULL); + spatkIv = (int)GetMonData(mon, MON_DATA_SPATK_IV, NULL); + spatkEv = (int)GetMonData(mon, MON_DATA_SPATK_EV, NULL); + spdefIv = (int)GetMonData(mon, MON_DATA_SPDEF_IV, NULL); + spdefEv = (int)GetMonData(mon, MON_DATA_SPDEF_EV, NULL); + form = (int)GetMonData(mon, MON_DATA_FORM, NULL); + species = (int)GetMonData(mon, MON_DATA_SPECIES, NULL); baseStats = (BASE_STATS *)AllocFromHeap(HEAP_ID_DEFAULT, sizeof(BASE_STATS)); LoadMonBaseStats_HandleAlternateForm(species, form, baseStats); @@ -478,7 +478,7 @@ u32 GetBoxMonData(BoxPokemon *boxMon, int attr, void *dest) { } static u32 GetBoxMonDataInternal(BoxPokemon *boxMon, int attr, void *dest) { - u32 ret = 0; + u32 ret = 0; PokemonDataBlockA *blockA = &GetSubstruct(boxMon, boxMon->pid, 0)->blockA; PokemonDataBlockB *blockB = &GetSubstruct(boxMon, boxMon->pid, 1)->blockB; PokemonDataBlockC *blockC = &GetSubstruct(boxMon, boxMon->pid, 2)->blockC; @@ -717,8 +717,8 @@ static u32 GetBoxMonDataInternal(BoxPokemon *boxMon, int attr, void *dest) { ret = blockB->fatefulEncounter; break; case MON_DATA_GENDER: - ret = GetGenderBySpeciesAndPersonality(blockA->species, boxMon->pid); - blockB->gender = (u8)ret; + ret = GetGenderBySpeciesAndPersonality(blockA->species, boxMon->pid); + blockB->gender = (u8)ret; boxMon->checksum = CHECKSUM(boxMon); break; case MON_DATA_FORM: @@ -1199,7 +1199,7 @@ static void SetBoxMonDataInternal(BoxPokemon *boxMon, int attr, const void *valu case MON_DATA_NICKNAME_FLAT: for (i = 0; i < POKEMON_NAME_LENGTH + 1; i++) { blockC->nickname[i] = VALUE(u16); - value = (void *const)((char *)value + 2); + value = (void *const)((char *)value + 2); } break; case MON_DATA_NICKNAME_STRING_COMPARE: @@ -1247,7 +1247,7 @@ static void SetBoxMonDataInternal(BoxPokemon *boxMon, int attr, const void *valu case MON_DATA_OT_NAME: for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++) { blockD->otTrainerName[i] = VALUE(u16); - value = (void *)((char *)value + 2); + value = (void *)((char *)value + 2); } break; case MON_DATA_OT_NAME_2: @@ -1274,20 +1274,20 @@ static void SetBoxMonDataInternal(BoxPokemon *boxMon, int attr, const void *valu case MON_DATA_EGG_MET_LOCATION: case MON_DATA_HGSS_EGG_MET_LOCATION: if (VALUE(u16) == MAPSEC_MYSTERY_ZONE || LocationIsDiamondPearlCompatible(VALUE(u16)) == TRUE) { - blockD->DP_EggLocation = VALUE(u16); + blockD->DP_EggLocation = VALUE(u16); blockB->Platinum_EggLocation = VALUE(u16); } else { - blockD->DP_EggLocation = METLOC_FARAWAY_PLACE; + blockD->DP_EggLocation = METLOC_FARAWAY_PLACE; blockB->Platinum_EggLocation = VALUE(u16); } break; case MON_DATA_MET_LOCATION: case MON_DATA_HGSS_MET_LOCATION: if (VALUE(u16) == MAPSEC_MYSTERY_ZONE || LocationIsDiamondPearlCompatible(VALUE(u16)) == TRUE) { - blockD->DP_MetLocation = VALUE(u16); + blockD->DP_MetLocation = VALUE(u16); blockB->Platinum_MetLocation = VALUE(u16); } else { - blockD->DP_MetLocation = METLOC_FARAWAY_PLACE; + blockD->DP_MetLocation = METLOC_FARAWAY_PLACE; blockB->Platinum_MetLocation = VALUE(u16); } break; @@ -1297,10 +1297,10 @@ static void SetBoxMonDataInternal(BoxPokemon *boxMon, int attr, const void *valu case MON_DATA_POKEBALL: if (VALUE(u16) >= ITEM_MASTER_BALL && VALUE(u16) <= ITEM_CHERISH_BALL) { blockD->HGSS_Pokeball = VALUE(u16); - blockD->pokeball = VALUE(u16); + blockD->pokeball = VALUE(u16); } else if (VALUE(u16) >= ITEM_FAST_BALL && VALUE(u16) <= ITEM_SPORT_BALL) { blockD->HGSS_Pokeball = VALUE(u16) - (ITEM_FAST_BALL - BALL_FAST); - blockD->pokeball = BALL_POKE; + blockD->pokeball = BALL_POKE; } else { GF_ASSERT(VALUE(u16) != 0); } @@ -1315,10 +1315,10 @@ static void SetBoxMonDataInternal(BoxPokemon *boxMon, int attr, const void *valu blockD->encounterType = VALUE(u8); break; case MON_DATA_IVS_WORD: - blockB->hpIV = (VALUE(u32) >> 0) & 0x1F; - blockB->atkIV = (VALUE(u32) >> 5) & 0x1F; - blockB->defIV = (VALUE(u32) >> 10) & 0x1F; - blockB->spdIV = (VALUE(u32) >> 15) & 0x1F; + blockB->hpIV = (VALUE(u32) >> 0) & 0x1F; + blockB->atkIV = (VALUE(u32) >> 5) & 0x1F; + blockB->defIV = (VALUE(u32) >> 10) & 0x1F; + blockB->spdIV = (VALUE(u32) >> 15) & 0x1F; blockB->spatkIV = (VALUE(u32) >> 20) & 0x1F; blockB->spdefIV = (VALUE(u32) >> 25) & 0x1F; break; @@ -1838,7 +1838,7 @@ void FreeMonPersonal(BASE_STATS *personal) { int GetMonBaseStat_HandleAlternateForm(int species, int form, int attr) { int ret; BASE_STATS *personal = AllocAndLoadMonPersonal(ResolveMonForm(species, form), HEAP_ID_DEFAULT); - ret = GetPersonalAttr(personal, attr); + ret = GetPersonalAttr(personal, attr); FreeMonPersonal(personal); return ret; } @@ -1846,7 +1846,7 @@ int GetMonBaseStat_HandleAlternateForm(int species, int form, int attr) { int GetMonBaseStat(int species, int attr) { int ret; BASE_STATS *personal = AllocAndLoadMonPersonal(species, HEAP_ID_DEFAULT); - ret = GetPersonalAttr(personal, attr); + ret = GetPersonalAttr(personal, attr); FreeMonPersonal(personal); return ret; } @@ -1862,12 +1862,12 @@ int GetMonBaseStatEx_HandleAlternateForm(NARC *narc, int species, int form, int } u8 GetPercentProgressTowardsNextLevel(Pokemon *mon) { - BOOL decry = AcquireMonLock(mon); + BOOL decry = AcquireMonLock(mon); u16 species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); - u8 level = (u8)GetMonData(mon, MON_DATA_LEVEL, NULL); - u32 lo = GetMonExpBySpeciesAndLevel(species, level); - u32 hi = GetMonExpBySpeciesAndLevel(species, level + 1); - u32 cur = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); + u8 level = (u8)GetMonData(mon, MON_DATA_LEVEL, NULL); + u32 lo = GetMonExpBySpeciesAndLevel(species, level); + u32 hi = GetMonExpBySpeciesAndLevel(species, level + 1); + u32 cur = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); ReleaseMonLock(mon, decry); return (u8)(100 * (cur - lo) / (hi - lo)); } @@ -1878,15 +1878,15 @@ u32 CalcMonExpToNextLevel(Pokemon *mon) { u32 CalcBoxMonExpToNextLevel(BoxPokemon *boxMon) { u16 species = (u16)GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - u16 level = (u16)(CalcBoxMonLevel(boxMon) + 1); - u32 cur = GetBoxMonData(boxMon, MON_DATA_EXPERIENCE, NULL); - u32 hi = GetMonExpBySpeciesAndLevel(species, level); + u16 level = (u16)(CalcBoxMonLevel(boxMon) + 1); + u32 cur = GetBoxMonData(boxMon, MON_DATA_EXPERIENCE, NULL); + u32 hi = GetMonExpBySpeciesAndLevel(species, level); return hi - cur; } u32 GetMonBaseExperienceAtCurrentLevel(Pokemon *mon) { int species = (int)GetMonData(mon, MON_DATA_SPECIES, NULL); - int level = (int)GetMonData(mon, MON_DATA_LEVEL, NULL); + int level = (int)GetMonData(mon, MON_DATA_LEVEL, NULL); return GetMonExpBySpeciesAndLevel(species, level); } @@ -1916,9 +1916,9 @@ int CalcMonLevel(Pokemon *mon) { } int CalcBoxMonLevel(BoxPokemon *boxMon) { - BOOL decry = AcquireBoxMonLock(boxMon); + BOOL decry = AcquireBoxMonLock(boxMon); int species = (int)GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - int exp = (int)GetBoxMonData(boxMon, MON_DATA_EXPERIENCE, NULL); + int exp = (int)GetBoxMonData(boxMon, MON_DATA_EXPERIENCE, NULL); ReleaseBoxMonLock(boxMon, decry); return CalcLevelBySpeciesAndExp((u16)species, (u32)exp); } @@ -1926,7 +1926,7 @@ int CalcBoxMonLevel(BoxPokemon *boxMon) { int CalcLevelBySpeciesAndExp(u16 species, u32 exp) { int level; BASE_STATS *personal = AllocAndLoadMonPersonal(species, HEAP_ID_DEFAULT); - level = CalcLevelBySpeciesAndExp_PreloadedPersonal(personal, species, exp); + level = CalcLevelBySpeciesAndExp_PreloadedPersonal(personal, species, exp); FreeMonPersonal(personal); return level; } @@ -1949,7 +1949,7 @@ u8 GetMonNature(Pokemon *mon) { } u8 GetBoxMonNature(BoxPokemon *boxMon) { - BOOL decry = AcquireBoxMonLock(boxMon); + BOOL decry = AcquireBoxMonLock(boxMon); u32 personality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); ReleaseBoxMonLock(boxMon, decry); return GetNatureFromPersonality(personality); @@ -2042,8 +2042,8 @@ void MonApplyFriendshipMod(Pokemon *mon, u8 kind, u16 location) { return; } - effect = (u8)GetItemAttr((u16)GetMonData(mon, MON_DATA_HELD_ITEM, NULL), ITEMATTR_HOLD_EFFECT, HEAP_ID_DEFAULT); - tier = FRIENDSHIP_TIER_LOW; + effect = (u8)GetItemAttr((u16)GetMonData(mon, MON_DATA_HELD_ITEM, NULL), ITEMATTR_HOLD_EFFECT, HEAP_ID_DEFAULT); + tier = FRIENDSHIP_TIER_LOW; friendship = (s16)GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); if (friendship >= FRIENDSHIP_TIER_MID_MIN) { tier++; @@ -2076,16 +2076,16 @@ u8 GetMonGender(Pokemon *mon) { } u8 GetBoxMonGender(BoxPokemon *boxMon) { - BOOL decry = AcquireBoxMonLock(boxMon); + BOOL decry = AcquireBoxMonLock(boxMon); u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); + u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); ReleaseBoxMonLock(boxMon, decry); return GetGenderBySpeciesAndPersonality(species, pid); } u8 GetGenderBySpeciesAndPersonality(u16 species, u32 pid) { BASE_STATS *personal = AllocAndLoadMonPersonal(species, HEAP_ID_DEFAULT); - u8 gender = GetGenderBySpeciesAndPersonality_PreloadedPersonal(personal, species, pid); + u8 gender = GetGenderBySpeciesAndPersonality_PreloadedPersonal(personal, species, pid); FreeMonPersonal(personal); return gender; } @@ -2120,7 +2120,7 @@ u8 MonIsShiny(Pokemon *mon) { u8 BoxMonIsShiny(BoxPokemon *boxMon) { u32 otid = GetBoxMonData(boxMon, MON_DATA_OTID, NULL); - u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); + u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); return CalcShininessByOtIdAndPersonality(otid, pid); } @@ -2133,8 +2133,8 @@ u32 GenerateShinyPersonality(u32 otid) { u16 r6; u16 r5; otid = (u32)((((otid & 0xFFFF0000) >> 16) ^ (otid & 0xFFFF)) >> 3u); - r6 = (u16)(LCRandom() & 7); - r5 = (u16)(LCRandom() & 7); + r6 = (u16)(LCRandom() & 7); + r5 = (u16)(LCRandom() & 7); for (r4 = 0; r4 < 13; r4++) { if (MaskOfFlagNo(r4) & otid) { if (LCRandom() & 1) { @@ -2159,11 +2159,11 @@ void sub_02070130(PokepicTemplate *pokepicTemplate, BoxPokemon *boxMon, u8 which } void GetBoxmonSpriteCharAndPlttNarcIds(PokepicTemplate *pokepicTemplate, BoxPokemon *boxMon, u8 whichFacing, BOOL sp14) { - BOOL decry = AcquireBoxMonLock(boxMon); + BOOL decry = AcquireBoxMonLock(boxMon); u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES_OR_EGG, NULL); - u8 gender = GetBoxMonGender(boxMon); - u8 shiny = BoxMonIsShiny(boxMon); - u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); + u8 gender = GetBoxMonGender(boxMon); + u8 shiny = BoxMonIsShiny(boxMon); + u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); u8 form; if (species == SPECIES_EGG) { if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) == SPECIES_MANAPHY) { @@ -2183,93 +2183,93 @@ void GetBoxmonSpriteCharAndPlttNarcIds(PokepicTemplate *pokepicTemplate, BoxPoke } void GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) { - pokepicTemplate->species = SPECIES_NONE; - pokepicTemplate->isAnimated = FALSE; + pokepicTemplate->species = SPECIES_NONE; + pokepicTemplate->isAnimated = FALSE; pokepicTemplate->personality = 0; - form = sub_02070438(species, form); + form = sub_02070438(species, form); switch (species) { case SPECIES_BURMY: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xAA + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xAA + form * 2); break; case SPECIES_WORMADAM: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xB0 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xB0 + form * 2); break; case SPECIES_SHELLOS: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing + 0x54 + form); - pokepicTemplate->palDataID = (u16)(shiny + 0xB6 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xB6 + form * 2); break; case SPECIES_GASTRODON: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing + 0x58 + form); - pokepicTemplate->palDataID = (u16)(shiny + 0xBA + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xBA + form * 2); break; case SPECIES_CHERRIM: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing + 0x5C + form); - pokepicTemplate->palDataID = (u16)(shiny * 2 + 0xBE + form); + pokepicTemplate->palDataID = (u16)(shiny * 2 + 0xBE + form); break; case SPECIES_ARCEUS: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xC2 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xC2 + form * 2); break; case SPECIES_CASTFORM: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing * 2 + 0x40 + form); - pokepicTemplate->palDataID = (u16)(shiny * 4 + 0xA2 + form); + pokepicTemplate->palDataID = (u16)(shiny * 4 + 0xA2 + form); break; case SPECIES_DEOXYS: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0x9E); + pokepicTemplate->palDataID = (u16)(shiny + 0x9E); break; case SPECIES_UNOWN: - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xA0); + pokepicTemplate->palDataID = (u16)(shiny + 0xA0); break; case SPECIES_EGG: // egg, manaphy egg - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(0x84 + form); - pokepicTemplate->palDataID = (u16)(0xE6 + form); + pokepicTemplate->palDataID = (u16)(0xE6 + form); break; case SPECIES_MANAPHY_EGG: // bad egg - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = 0x84; - pokepicTemplate->palDataID = 0xE6; + pokepicTemplate->palDataID = 0xE6; break; case SPECIES_SHAYMIN: // land, sky - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xE8 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xE8 + form * 2); break; case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xEC + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xEC + form * 2); break; case SPECIES_GIRATINA: // altered, origin - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xF8 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xF8 + form * 2); break; case SPECIES_PICHU: // spiky-ear - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x9A + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xFC + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xFC + form * 2); break; default: - pokepicTemplate->narcID = NARC_poketool_pokegra_pokegra; + pokepicTemplate->narcID = NARC_poketool_pokegra_pokegra; pokepicTemplate->charDataID = (u16)(species * 6 + whichFacing + (gender == MON_FEMALE ? 0 : 1)); - pokepicTemplate->palDataID = (u16)(shiny + (species * 6 + 4)); + pokepicTemplate->palDataID = (u16)(shiny + (species * 6 + 4)); if (species == SPECIES_SPINDA && whichFacing == MON_PIC_FACING_FRONT) { - pokepicTemplate->species = SPECIES_SPINDA; - pokepicTemplate->isAnimated = FALSE; + pokepicTemplate->species = SPECIES_SPINDA; + pokepicTemplate->isAnimated = FALSE; pokepicTemplate->personality = personality; } break; @@ -2353,104 +2353,104 @@ u8 sub_02070438(u16 species, u8 form) { } void sub_02070560(PokepicTemplate *pokepicTemplate, u16 species, u8 whichFacing, u8 gender, u32 shiny) { - pokepicTemplate->narcID = NARC_pbr_pokegra; + pokepicTemplate->narcID = NARC_pbr_pokegra; pokepicTemplate->charDataID = (u16)(species * 6 + whichFacing + (gender == MON_FEMALE ? 0 : 1)); - pokepicTemplate->palDataID = (u16)(shiny + (species * 6 + 4)); + pokepicTemplate->palDataID = (u16)(shiny + (species * 6 + 4)); } void DP_GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 species, u8 gender, u8 whichFacing, u8 shiny, u8 form, u32 personality) { - pokepicTemplate->species = SPECIES_NONE; - pokepicTemplate->isAnimated = FALSE; + pokepicTemplate->species = SPECIES_NONE; + pokepicTemplate->isAnimated = FALSE; pokepicTemplate->personality = 0; - form = sub_02070438(species, form); + form = sub_02070438(species, form); switch (species) { case SPECIES_BURMY: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x48 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0x92 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0x92 + form * 2); break; case SPECIES_WORMADAM: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x4E + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0x98 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0x98 + form * 2); break; case SPECIES_SHELLOS: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing + 0x54 + form); - pokepicTemplate->palDataID = (u16)(shiny + 0x9E + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0x9E + form * 2); break; case SPECIES_GASTRODON: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing + 0x58 + form); - pokepicTemplate->palDataID = (u16)(shiny + 0xA2 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xA2 + form * 2); break; case SPECIES_CHERRIM: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing + 0x5C + form); - pokepicTemplate->palDataID = (u16)(shiny * 2 + 0xA6 + form); + pokepicTemplate->palDataID = (u16)(shiny * 2 + 0xA6 + form); break; case SPECIES_ARCEUS: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x60 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xAA + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xAA + form * 2); break; case SPECIES_CASTFORM: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing * 2 + 0x40 + form); - pokepicTemplate->palDataID = (u16)(shiny * 4 + 0x8A + form); + pokepicTemplate->palDataID = (u16)(shiny * 4 + 0x8A + form); break; case SPECIES_DEOXYS: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0x86); + pokepicTemplate->palDataID = (u16)(shiny + 0x86); break; case SPECIES_UNOWN: - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0x88); + pokepicTemplate->palDataID = (u16)(shiny + 0x88); break; case SPECIES_EGG: // egg, manaphy egg - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = (u16)(0x84 + form); - pokepicTemplate->palDataID = (u16)(0xCE + form); + pokepicTemplate->palDataID = (u16)(0xCE + form); break; case SPECIES_MANAPHY_EGG: // bad egg - pokepicTemplate->narcID = NARC_pbr_otherpoke; + pokepicTemplate->narcID = NARC_pbr_otherpoke; pokepicTemplate->charDataID = 0x84; - pokepicTemplate->palDataID = 0xCE; + pokepicTemplate->palDataID = 0xCE; break; case SPECIES_SHAYMIN: // land, sky if (form != 0) { - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x86 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xEA); + pokepicTemplate->palDataID = (u16)(shiny + 0xEA); } else { sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny); } break; case SPECIES_ROTOM: // normal, fan, mow, wash, heat, frost if (form != 0) { - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x8A + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xEC + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xEC + form * 2); } else { sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny); } break; case SPECIES_GIRATINA: // altered, origin if (form != 0) { - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x96 + form * 2); - pokepicTemplate->palDataID = (u16)(shiny + 0xF8 + form * 2); + pokepicTemplate->palDataID = (u16)(shiny + 0xF8 + form * 2); } else { sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny); } break; case SPECIES_PICHU: // spiky-ear if (form != 0) { - pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; + pokepicTemplate->narcID = NARC_poketool_pokegra_otherpoke; pokepicTemplate->charDataID = (u16)(whichFacing / 2 + 0x9C); - pokepicTemplate->palDataID = (u16)(shiny + 0xFE); + pokepicTemplate->palDataID = (u16)(shiny + 0xFE); } else { sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny); } @@ -2458,8 +2458,8 @@ void DP_GetMonSpriteCharAndPlttNarcIdsEx(PokepicTemplate *pokepicTemplate, u16 s default: sub_02070560(pokepicTemplate, species, whichFacing, gender, shiny); if (species == SPECIES_SPINDA && whichFacing == MON_PIC_FACING_FRONT) { - pokepicTemplate->species = SPECIES_SPINDA; - pokepicTemplate->isAnimated = FALSE; + pokepicTemplate->species = SPECIES_SPINDA; + pokepicTemplate->isAnimated = FALSE; pokepicTemplate->personality = personality; } break; @@ -2476,8 +2476,8 @@ u8 sub_02070848(BoxPokemon *boxMon, u8 whichFacing) { u8 sub_02070854(BoxPokemon *boxMon, u8 whichFacing, BOOL a2) { u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES_OR_EGG, NULL); - u8 gender = GetBoxMonGender(boxMon); - u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); + u8 gender = GetBoxMonGender(boxMon); + u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); u8 form; if (species == SPECIES_EGG) { if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) == SPECIES_MANAPHY) { @@ -2701,13 +2701,13 @@ struct UnkImageStruct *sub_02070C24(SpriteRenderer *renderer, SpriteGfxHandler * SpriteRenderer_LoadCellResObjFromOpenNarc(renderer, gfxHandler, narc, fileIDs.ncer_id, FALSE, resTag + 0x4E27); SpriteRenderer_LoadAnimResObjFromOpenNarc(renderer, gfxHandler, narc, fileIDs.nanr_id, FALSE, resTag + 0x4E27); NARC_Delete(narc); - spriteResourcesTemplate = _020FF588; + spriteResourcesTemplate = _020FF588; spriteResourcesTemplate.resIdList[GF_GFX_RES_TYPE_CHAR] = resTag + 0x4E2F; spriteResourcesTemplate.resIdList[GF_GFX_RES_TYPE_PLTT] = resTag + 0x4E2A; spriteResourcesTemplate.resIdList[GF_GFX_RES_TYPE_CELL] = resTag + 0x4E27; spriteResourcesTemplate.resIdList[GF_GFX_RES_TYPE_ANIM] = resTag + 0x4E27; - spriteResourcesTemplate.spritePriority = _020FF50C[resTag]; - object = SpriteRenderer_LoadResourcesAndCreateSprite(renderer, gfxHandler, &spriteResourcesTemplate); + spriteResourcesTemplate.spritePriority = _020FF50C[resTag]; + object = SpriteRenderer_LoadResourcesAndCreateSprite(renderer, gfxHandler, &spriteResourcesTemplate); Sprite_SetPalOffsetRespectVramOffset(object->sprite, 0); UnkImageStruct_SetSpritePositionXY(object, x, y); UnkImageStruct_TickSpriteAnimation1Frame(object); @@ -2717,20 +2717,20 @@ struct UnkImageStruct *sub_02070C24(SpriteRenderer *renderer, SpriteGfxHandler * void sub_02070D3C(s32 trainer_class, s32 battlerPosition, BOOL isLink, struct UnkStruct_02070D3C *a3) { if (battlerPosition == 2) { - a3->narcId = NARC_a_0_5_8; + a3->narcId = NARC_a_0_5_8; a3->ncgr_id = trainer_class * 5 + 0; a3->nclr_id = trainer_class * 5 + 1; a3->ncer_id = trainer_class * 5 + 2; a3->nanr_id = trainer_class * 5 + 3; a3->ncbr_id = trainer_class * 5 + 4; } else { - a3->narcId = NARC_a_0_0_6; + a3->narcId = NARC_a_0_0_6; trainer_class = TrainerClassToBackpicID(trainer_class, isLink); - a3->ncgr_id = trainer_class * 5 + 0; - a3->nclr_id = trainer_class * 5 + 1; - a3->ncer_id = trainer_class * 5 + 2; - a3->nanr_id = trainer_class * 5 + 3; - a3->ncbr_id = trainer_class * 5 + 4; + a3->ncgr_id = trainer_class * 5 + 0; + a3->nclr_id = trainer_class * 5 + 1; + a3->ncer_id = trainer_class * 5 + 2; + a3->nanr_id = trainer_class * 5 + 3; + a3->ncbr_id = trainer_class * 5 + 4; } } @@ -2759,11 +2759,11 @@ BoxPokemon *Mon_GetBoxMon(Pokemon *mon) { } BOOL Pokemon_TryLevelUp(Pokemon *mon) { - u16 species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); - u8 level = (u8)(GetMonData(mon, MON_DATA_LEVEL, NULL) + 1); - u32 exp = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); + u16 species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); + u8 level = (u8)(GetMonData(mon, MON_DATA_LEVEL, NULL) + 1); + u32 exp = GetMonData(mon, MON_DATA_EXPERIENCE, NULL); u32 growthrate = (u32)GetMonBaseStat(species, BASE_GROWTH_RATE); - u32 maxexp = GetExpByGrowthRateAndLevel((int)growthrate, 100); + u32 maxexp = GetExpByGrowthRateAndLevel((int)growthrate, 100); if (exp > maxexp) { exp = maxexp; SetMonData(mon, MON_DATA_EXPERIENCE, &exp); @@ -2792,11 +2792,11 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m struct Evolution *evoTable; int method_local; - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); - pid = GetMonData(mon, MON_DATA_PERSONALITY, NULL); - beauty = GetMonData(mon, MON_DATA_BEAUTY, NULL); - pid_hi = (u16)((pid & 0xFFFF0000) >> 16); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); + pid = GetMonData(mon, MON_DATA_PERSONALITY, NULL); + beauty = GetMonData(mon, MON_DATA_BEAUTY, NULL); + pid_hi = (u16)((pid & 0xFFFF0000) >> 16); holdEffect = GetItemAttr(heldItem, ITEMATTR_HOLD_EFFECT, HEAP_ID_DEFAULT); // Kadabra bypasses Everstone because he's just that broken. if (species != SPECIES_KADABRA && holdEffect == HOLD_EFFECT_NO_EVOLVE && context != EVOCTX_ITEM_USE) { @@ -2813,7 +2813,7 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m LoadMonEvolutionTable(species, evoTable); switch (context) { case EVOCTX_LEVELUP: - level = (u8)GetMonData(mon, MON_DATA_LEVEL, NULL); + level = (u8)GetMonData(mon, MON_DATA_LEVEL, NULL); friendship = (u16)GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); for (i = 0; i < 7; i++) { switch (evoTable[i].method) { @@ -2821,25 +2821,25 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m break; case EVO_FRIENDSHIP: if (friendship >= 220) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_FRIENDSHIP; } break; case EVO_FRIENDSHIP_DAY: if (IsNighttime() == 0 && friendship >= 220) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_FRIENDSHIP_DAY; } break; case EVO_FRIENDSHIP_NIGHT: if (IsNighttime() == 1 && friendship >= 220) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_FRIENDSHIP_NIGHT; } break; case EVO_LEVEL: if (evoTable[i].param <= level) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL; } break; @@ -2851,37 +2851,37 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m break; case EVO_LEVEL_ATK_GT_DEF: if (evoTable[i].param <= level && GetMonData(mon, MON_DATA_ATK, NULL) > GetMonData(mon, MON_DATA_DEF, NULL)) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_ATK_GT_DEF; } break; case EVO_LEVEL_ATK_EQ_DEF: if (evoTable[i].param <= level && GetMonData(mon, MON_DATA_ATK, NULL) == GetMonData(mon, MON_DATA_DEF, NULL)) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_ATK_EQ_DEF; } break; case EVO_LEVEL_ATK_LT_DEF: if (evoTable[i].param <= level && GetMonData(mon, MON_DATA_ATK, NULL) < GetMonData(mon, MON_DATA_DEF, NULL)) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_ATK_LT_DEF; } break; case EVO_LEVEL_PID_LO: if (evoTable[i].param <= level && pid_hi % 10 < 5) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_PID_LO; } break; case EVO_LEVEL_PID_HI: if (evoTable[i].param <= level && pid_hi % 10 >= 5) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_PID_HI; } break; case EVO_LEVEL_NINJASK: if (evoTable[i].param <= level) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_NINJASK; } break; @@ -2890,7 +2890,7 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m break; case EVO_BEAUTY: if (evoTable[i].param <= beauty) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_BEAUTY; } break; @@ -2900,55 +2900,55 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m break; case EVO_ITEM_DAY: if (IsNighttime() == 0 && evoTable[i].param == heldItem) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_ITEM_DAY; } break; case EVO_ITEM_NIGHT: if (IsNighttime() == 1 && evoTable[i].param == heldItem) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_ITEM_NIGHT; } break; case EVO_HAS_MOVE: if (MonHasMove(mon, evoTable[i].param) == TRUE) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_HAS_MOVE; } break; case EVO_OTHER_PARTY_MON: if (party != NULL && Party_HasMon(party, evoTable[i].param) == 1) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_OTHER_PARTY_MON; } break; case EVO_LEVEL_MALE: if (GetMonData(mon, MON_DATA_GENDER, NULL) == MON_MALE && evoTable[i].param <= level) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_MALE; } break; case EVO_LEVEL_FEMALE: if (GetMonData(mon, MON_DATA_GENDER, NULL) == MON_FEMALE && evoTable[i].param <= level) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_LEVEL_FEMALE; } break; case EVO_CORONET: if (usedItem == evoTable[i].method) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_CORONET; } break; case EVO_ETERNA: if (usedItem == evoTable[i].method) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_ETERNA; } break; case EVO_ROUTE217: if (usedItem == evoTable[i].method) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_ROUTE217; } break; @@ -2962,12 +2962,12 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m for (i = 0; i < 7; i++) { switch (evoTable[i].method) { case EVO_TRADE: - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_TRADE; break; case EVO_TRADE_ITEM: if (heldItem == evoTable[i].param) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = EVO_TRADE_ITEM; } break; @@ -2981,17 +2981,17 @@ u16 GetMonEvolution(Party *party, Pokemon *mon, u8 context, u16 usedItem, int *m case EVOCTX_ITEM_USE: for (i = 0; i < 7; i++) { if (evoTable[i].method == EVO_STONE && usedItem == evoTable[i].param) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = 0; break; } if (evoTable[i].method == EVO_STONE_MALE && GetMonData(mon, MON_DATA_GENDER, NULL) == MON_MALE && usedItem == evoTable[i].param) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = 0; break; } if (evoTable[i].method == EVO_STONE_FEMALE && GetMonData(mon, MON_DATA_GENDER, NULL) == MON_FEMALE && usedItem == evoTable[i].param) { - target = evoTable[i].target; + target = evoTable[i].target; *method_ret = 0; break; } @@ -3040,10 +3040,10 @@ void InitBoxMonMoveset(BoxPokemon *boxMon) { u8 level; u16 move; levelUpLearnset = AllocFromHeap(HEAP_ID_DEFAULT, MAX_LEARNED_MOVES * sizeof(u16)); - decry = AcquireBoxMonLock(boxMon); - species = (u16)GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); - level = (u8)CalcBoxMonLevel(boxMon); + decry = AcquireBoxMonLock(boxMon); + species = (u16)GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + level = (u8)CalcBoxMonLevel(boxMon); LoadLevelUpLearnset_HandleAlternateForm(species, (int)form, levelUpLearnset); for (i = 0; levelUpLearnset[i] != LEVEL_UP_LEARNSET_END; i++) { if ((levelUpLearnset[i] & LEVEL_UP_LEARNSET_LEVEL_MASK) > (level << LEVEL_UP_LEARNSET_LEVEL_SHIFT)) { @@ -3096,13 +3096,13 @@ void DeleteBoxMonFirstMoveAndAppend(BoxPokemon *boxMon, u16 move) { for (i = 0; i < MAX_MON_MOVES - 1; i++) { moves[i] = (u16)GetBoxMonData(boxMon, MON_DATA_MOVE1 + i + 1, NULL); - pp[i] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PP + i + 1, NULL); - ppUp[i] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PPUP + i + 1, NULL); + pp[i] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PP + i + 1, NULL); + ppUp[i] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PPUP + i + 1, NULL); } moves[3] = move; - pp[3] = (u8)GetMoveAttr(move, MOVEATTR_PP); - ppUp[3] = 0; + pp[3] = (u8)GetMoveAttr(move, MOVEATTR_PP); + ppUp[3] = 0; for (i = 0; i < MAX_MON_MOVES; i++) { SetBoxMonData(boxMon, MON_DATA_MOVE1 + i, &moves[i]); @@ -3134,16 +3134,16 @@ void BoxMonSetMoveInSlot(BoxPokemon *boxMon, u16 move, u8 slot) { SetBoxMonData(boxMon, MON_DATA_MOVE1 + slot, &move); ppUp = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PPUP + slot, NULL); - pp = (u8)GetMoveMaxPP(move, ppUp); + pp = (u8)GetMoveMaxPP(move, ppUp); SetBoxMonData(boxMon, MON_DATA_MOVE1PP + slot, &pp); } u32 MonTryLearnMoveOnLevelUp(Pokemon *mon, int *last_i, u16 *sp0) { - u32 ret = 0; + u32 ret = 0; u16 *levelUpLearnset = AllocFromHeap(HEAP_ID_DEFAULT, MAX_LEARNED_MOVES * sizeof(u16)); - u16 species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); - u32 form = GetMonData(mon, MON_DATA_FORM, NULL); - u8 level = (u8)GetMonData(mon, MON_DATA_LEVEL, NULL); + u16 species = (u16)GetMonData(mon, MON_DATA_SPECIES, NULL); + u32 form = GetMonData(mon, MON_DATA_FORM, NULL); + u8 level = (u8)GetMonData(mon, MON_DATA_LEVEL, NULL); LoadLevelUpLearnset_HandleAlternateForm(species, (int)form, levelUpLearnset); if (levelUpLearnset[*last_i] == LEVEL_UP_LEARNSET_END) { @@ -3176,11 +3176,11 @@ void BoxMonSwapMoves(BoxPokemon *boxMon, int slot1, int slot2) { u8 ppUp[2]; moves[0] = (u16)GetBoxMonData(boxMon, MON_DATA_MOVE1 + slot1, NULL); - pp[0] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PP + slot1, NULL); - ppUp[0] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PPUP + slot1, NULL); + pp[0] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PP + slot1, NULL); + ppUp[0] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PPUP + slot1, NULL); moves[1] = (u16)GetBoxMonData(boxMon, MON_DATA_MOVE1 + slot2, NULL); - pp[1] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PP + slot2, NULL); - ppUp[1] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PPUP + slot2, NULL); + pp[1] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PP + slot2, NULL); + ppUp[1] = (u8)GetBoxMonData(boxMon, MON_DATA_MOVE1PPUP + slot2, NULL); SetBoxMonData(boxMon, MON_DATA_MOVE1 + slot1, &moves[1]); SetBoxMonData(boxMon, MON_DATA_MOVE1PP + slot1, &pp[1]); @@ -3196,14 +3196,14 @@ void MonDeleteMoveSlot(Pokemon *mon, u32 slot) { u8 ppUp; for (; slot < MAX_MON_MOVES - 1; slot++) { move = (u16)GetMonData(mon, (int)(MON_DATA_MOVE1 + slot + 1), NULL); - pp = (u8)GetMonData(mon, (int)(MON_DATA_MOVE1PP + slot + 1), NULL); + pp = (u8)GetMonData(mon, (int)(MON_DATA_MOVE1PP + slot + 1), NULL); ppUp = (u8)GetMonData(mon, (int)(MON_DATA_MOVE1PPUP + slot + 1), NULL); SetMonData(mon, (int)(MON_DATA_MOVE1 + slot), &move); SetMonData(mon, (int)(MON_DATA_MOVE1PP + slot), &pp); SetMonData(mon, (int)(MON_DATA_MOVE1PPUP + slot), &ppUp); } move = MOVE_NONE; - pp = 0; + pp = 0; ppUp = 0; SetMonData(mon, MON_DATA_MOVE1 + 3, &move); SetMonData(mon, MON_DATA_MOVE1PP + 3, &pp); @@ -3337,9 +3337,9 @@ void Party_GivePokerusAtRandom(Party *party) { } u8 Party_MaskMonsWithPokerus(Party *party, u8 mask) { - int i = 0; + int i = 0; u32 flag = 1; - u8 ret = 0; + u8 ret = 0; Pokemon *mon; if (mask != 0) { do { @@ -3444,8 +3444,8 @@ void Pokemon_UpdateArceusForm(Pokemon *mon) { } void BoxMon_UpdateArceusForm(BoxPokemon *boxMon) { - u32 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - u32 ability = GetBoxMonData(boxMon, MON_DATA_ABILITY, NULL); + u32 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); + u32 ability = GetBoxMonData(boxMon, MON_DATA_ABILITY, NULL); u32 heldItem = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM, NULL); u32 form; if (species == SPECIES_ARCEUS && ability == ABILITY_MULTITYPE) { @@ -3502,7 +3502,7 @@ s32 Mon_UpdateGiratinaForm(Pokemon *mon) { } s32 BoxMon_UpdateGiratinaForm(BoxPokemon *boxMon) { - int species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); + int species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); int heldItem = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM, NULL); int form; if (species == SPECIES_GIRATINA) { @@ -3556,10 +3556,10 @@ void BoxMon_UpdateShayminForm(BoxPokemon *boxMon, int form) { BOOL Mon_CanUseGracidea(Pokemon *mon) { RTCTime time; - int species = GetMonData(mon, MON_DATA_SPECIES, NULL); - int form = GetMonData(mon, MON_DATA_FORM, NULL); - int status = GetMonData(mon, MON_DATA_STATUS, NULL); - int hp = GetMonData(mon, MON_DATA_HP, NULL); + int species = GetMonData(mon, MON_DATA_SPECIES, NULL); + int form = GetMonData(mon, MON_DATA_FORM, NULL); + int status = GetMonData(mon, MON_DATA_STATUS, NULL); + int hp = GetMonData(mon, MON_DATA_HP, NULL); BOOL fatefulEncounter = GetMonData(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL); GF_RTC_CopyTime(&time); @@ -3577,9 +3577,9 @@ void Party_ResetAllShayminToLandForm(Party *party) { int form; Pokemon *mon; for (i = 0; i < npoke; i++) { - mon = Party_GetMonByIndex(party, i); + mon = Party_GetMonByIndex(party, i); species = GetMonData(mon, MON_DATA_SPECIES, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (species == SPECIES_SHAYMIN && form == SHAYMIN_SKY) { Mon_UpdateShayminForm(mon, SHAYMIN_LAND); } @@ -3601,7 +3601,7 @@ BOOL Party_TryResetShaymin(Party *party, int min_max, const RTCTime *time) { return FALSE; } } else { - hour = time->hour; + hour = time->hour; minute = time->minute + 60 * (hour - 4); if (minute < min_max) { Party_ResetAllShayminToLandForm(party); @@ -3744,11 +3744,11 @@ void WildMonSetRandomHeldItem(Pokemon *mon, u32 a1, u32 a2) { u16 item1; u16 item2; if (!(a1 & 0x81)) { - chance = (u32)(LCRandom() % 100); + chance = (u32)(LCRandom() % 100); species = (u16)GetMonData(mon, MON_DATA_SPECIES, 0); - form = (u16)GetMonData(mon, MON_DATA_FORM, 0); - item1 = (u16)GetMonBaseStat_HandleAlternateForm(species, form, BASE_ITEM_1); - item2 = (u16)GetMonBaseStat_HandleAlternateForm(species, form, BASE_ITEM_2); + form = (u16)GetMonData(mon, MON_DATA_FORM, 0); + item1 = (u16)GetMonBaseStat_HandleAlternateForm(species, form, BASE_ITEM_1); + item2 = (u16)GetMonBaseStat_HandleAlternateForm(species, form, BASE_ITEM_2); if (item1 == item2 && item1 != ITEM_NONE) { SetMonData(mon, MON_DATA_HELD_ITEM, &item1); } else { @@ -3772,7 +3772,7 @@ BOOL GetBoxMonTMHMCompat(BoxPokemon *boxMon, u8 tmhm) { u32 form; species = GetBoxMonData(boxMon, MON_DATA_SPECIES_OR_EGG, NULL); - form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); return GetTMHMCompatBySpeciesAndForm(species, form, tmhm); } @@ -3786,16 +3786,16 @@ BOOL GetTMHMCompatBySpeciesAndForm(u16 species, u32 form, u8 tmhm) { // mask = 1 << (a2 % 32); // baseStat = BASE_TMHM_1 + (a2 / 32); if (tmhm < 32) { - mask = 1 << tmhm; + mask = 1 << tmhm; baseStat = BASE_TMHM_1; } else if (tmhm < 64) { - mask = 1 << (tmhm - 32); + mask = 1 << (tmhm - 32); baseStat = BASE_TMHM_2; } else if (tmhm < 96) { - mask = 1 << (tmhm - 64); + mask = 1 << (tmhm - 64); baseStat = BASE_TMHM_3; } else { - mask = 1 << (tmhm - 96); + mask = 1 << (tmhm - 96); baseStat = BASE_TMHM_4; } return (GetMonBaseStat_HandleAlternateForm(species, form, baseStat) & mask) != 0; @@ -3806,10 +3806,10 @@ void UpdateMonAbility(Pokemon *mon) { } void UpdateBoxMonAbility(BoxPokemon *boxMon) { - BOOL decry = AcquireBoxMonLock(boxMon); - int species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - int pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); - int form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + BOOL decry = AcquireBoxMonLock(boxMon); + int species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); + int pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); + int form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); int ability1 = GetMonBaseStat_HandleAlternateForm(species, form, BASE_ABILITY_1); int ability2 = GetMonBaseStat_HandleAlternateForm(species, form, BASE_ABILITY_2); if (ability2 != ABILITY_NONE) { @@ -3837,11 +3837,11 @@ void SetMonPersonality(Pokemon *mon, u32 personality) { tmpMon = AllocMonZeroed(HEAP_ID_DEFAULT); CopyPokemonToPokemon(mon, tmpMon); - r4 = &GetSubstruct(&tmpMon->box, mon->box.pid, 0)->blockA; - r6 = &GetSubstruct(&tmpMon->box, mon->box.pid, 1)->blockB; - r7 = &GetSubstruct(&tmpMon->box, mon->box.pid, 2)->blockC; - sp8 = &GetSubstruct(&tmpMon->box, mon->box.pid, 3)->blockD; - spC = &GetSubstruct(&mon->box, personality, 0)->blockA; + r4 = &GetSubstruct(&tmpMon->box, mon->box.pid, 0)->blockA; + r6 = &GetSubstruct(&tmpMon->box, mon->box.pid, 1)->blockB; + r7 = &GetSubstruct(&tmpMon->box, mon->box.pid, 2)->blockC; + sp8 = &GetSubstruct(&tmpMon->box, mon->box.pid, 3)->blockD; + spC = &GetSubstruct(&mon->box, personality, 0)->blockA; sp10 = &GetSubstruct(&mon->box, personality, 1)->blockB; sp14 = &GetSubstruct(&mon->box, personality, 2)->blockC; sp18 = &GetSubstruct(&mon->box, personality, 3)->blockD; @@ -3849,11 +3849,11 @@ void SetMonPersonality(Pokemon *mon, u32 personality) { DECRYPT_BOX(&tmpMon->box); DECRYPT_PTY(mon); DECRYPT_BOX(&mon->box); - mon->box.pid = personality; - *spC = *r4; - *sp10 = *r6; - *sp14 = *r7; - *sp18 = *sp8; + mon->box.pid = personality; + *spC = *r4; + *sp10 = *r6; + *sp14 = *r7; + *sp18 = *sp8; mon->box.checksum = CHECKSUM(&mon->box); ENCRYPT_BOX(&mon->box); ENCRYPT_PTY(mon); @@ -3870,7 +3870,7 @@ u32 ChangePersonalityToNatureGenderAndAbility(u32 pid, u16 species, u8 nature, u GF_ASSERT(gender != 0xFF); if (gen_mode) { u32 r4 = ((pid & 0xFFFF0000) >> 16) ^ (u16)pid; - pid = GenPersonalityByGenderAndNature(species, gender, nature); + pid = GenPersonalityByGenderAndNature(species, gender, nature); if ((pid & 1) != ability) { // Force correct ability for gender and nature pid pid++; @@ -3880,7 +3880,7 @@ u32 ChangePersonalityToNatureGenderAndAbility(u32 pid, u16 species, u8 nature, u u32 r1; u8 ratio = GetMonBaseStat(species, BASE_GENDER_RATIO); GF_ASSERT((nature & 1) == ability); - r1 = ((pid & 0xFFFF0000) >> 16) ^ (u16)pid; + r1 = ((pid & 0xFFFF0000) >> 16) ^ (u16)pid; pid = (0xFF00 ^ (r1 & 0xFF00)) << 16; // Force the pid to have the requested nature pid += nature - (pid % 25); @@ -3940,7 +3940,7 @@ void MonDecryptSegment(void *data, u32 size, u32 seed) { u32 CalcMonChecksum(void *_data, u32 size) { int i; const u16 *data = _data; - u16 ret = 0; + u16 ret = 0; for (i = 0; i < size / 2; i++) { ret += data[i]; } @@ -4107,18 +4107,18 @@ BOOL SpeciesIsMythical(u16 species) { BOOL MonCheckFrontierIneligibility(Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u16 form = GetMonData(mon, MON_DATA_FORM, NULL); + u16 form = GetMonData(mon, MON_DATA_FORM, NULL); return IsPokemonBannedFromBattleFrontier(species, form); } BOOL BoxmonBelongsToPlayer(BoxPokemon *boxMon, PlayerProfile *profile, HeapID heapId) { - u32 myId = PlayerProfile_GetTrainerID(profile); - u32 otId = GetBoxMonData(boxMon, MON_DATA_OTID, NULL); + u32 myId = PlayerProfile_GetTrainerID(profile); + u32 otId = GetBoxMonData(boxMon, MON_DATA_OTID, NULL); u32 myGender = PlayerProfile_GetTrainerGender(profile); u32 otGender = GetBoxMonData(boxMon, MON_DATA_MET_GENDER, NULL); - String *r7 = PlayerProfile_GetPlayerName_NewString(profile, heapId); - String *r6 = String_New(PLAYER_NAME_LENGTH + 1, heapId); - BOOL ret = FALSE; + String *r7 = PlayerProfile_GetPlayerName_NewString(profile, heapId); + String *r6 = String_New(PLAYER_NAME_LENGTH + 1, heapId); + BOOL ret = FALSE; GetBoxMonData(boxMon, MON_DATA_OT_NAME_2, r6); if (myId == otId && myGender == otGender && String_Compare(r7, r6) == 0) { ret = TRUE; @@ -4256,46 +4256,46 @@ void sub_02072A98(Pokemon *mon, struct UnkPokemonStruct_02072A98 *dest) { DECRYPT_BOX(&mon->box); } boxMon = Mon_GetBoxMon(mon); - dbA = &GetSubstruct(boxMon, boxMon->pid, 0)->blockA; - dbB = &GetSubstruct(boxMon, boxMon->pid, 1)->blockB; - dbC = &GetSubstruct(boxMon, boxMon->pid, 2)->blockC; - dbD = &GetSubstruct(boxMon, boxMon->pid, 3)->blockD; - - dest->pid = boxMon->pid; - dest->party_lock = FALSE; - dest->box_lock = FALSE; + dbA = &GetSubstruct(boxMon, boxMon->pid, 0)->blockA; + dbB = &GetSubstruct(boxMon, boxMon->pid, 1)->blockB; + dbC = &GetSubstruct(boxMon, boxMon->pid, 2)->blockC; + dbD = &GetSubstruct(boxMon, boxMon->pid, 3)->blockD; + + dest->pid = boxMon->pid; + dest->party_lock = FALSE; + dest->box_lock = FALSE; dest->checksum_fail = boxMon->checksum_fail; - dest->species = dbA->species; - dest->heldItem = dbA->heldItem; - dest->otID = dbA->otID; - dest->exp = dbA->exp; - dest->friendship = dbA->friendship; - dest->ability = dbA->ability; - dest->hpEV = dbA->hpEV; - dest->atkEV = dbA->atkEV; - dest->defEV = dbA->defEV; - dest->spdEV = dbA->spdEV; - dest->spatkEV = dbA->spatkEV; - dest->spdefEV = dbA->spdefEV; + dest->species = dbA->species; + dest->heldItem = dbA->heldItem; + dest->otID = dbA->otID; + dest->exp = dbA->exp; + dest->friendship = dbA->friendship; + dest->ability = dbA->ability; + dest->hpEV = dbA->hpEV; + dest->atkEV = dbA->atkEV; + dest->defEV = dbA->defEV; + dest->spdEV = dbA->spdEV; + dest->spatkEV = dbA->spatkEV; + dest->spdefEV = dbA->spdefEV; dest->originLanguage = dbA->originLanguage; for (i = 0; i < MAX_MON_MOVES; i++) { - dest->moves[i] = dbB->moves[i]; - dest->movePP[i] = dbB->movePP[i]; + dest->moves[i] = dbB->moves[i]; + dest->movePP[i] = dbB->movePP[i]; dest->movePpUps[i] = dbB->movePpUps[i]; } - dest->hpIV = dbB->hpIV; - dest->atkIV = dbB->atkIV; - dest->defIV = dbB->defIV; - dest->spdIV = dbB->spdIV; - dest->spatkIV = dbB->spatkIV; - dest->spdefIV = dbB->spdefIV; - dest->isEgg = dbB->isEgg; - dest->isNicknamed = dbB->isNicknamed; + dest->hpIV = dbB->hpIV; + dest->atkIV = dbB->atkIV; + dest->defIV = dbB->defIV; + dest->spdIV = dbB->spdIV; + dest->spatkIV = dbB->spatkIV; + dest->spdefIV = dbB->spdefIV; + dest->isEgg = dbB->isEgg; + dest->isNicknamed = dbB->isNicknamed; dest->fatefulEncounter = dbB->fatefulEncounter; - dest->gender = dbB->gender; - dest->alternateForm = dbB->alternateForm; + dest->gender = dbB->gender; + dest->alternateForm = dbB->alternateForm; for (i = 0; i < POKEMON_NAME_LENGTH + 1; i++) { dest->nickname[i] = dbC->nickname[i]; @@ -4306,16 +4306,16 @@ void sub_02072A98(Pokemon *mon, struct UnkPokemonStruct_02072A98 *dest) { } dest->pokeball = dbD->pokeball; - dest->status = mon->party.status; - dest->level = mon->party.level; + dest->status = mon->party.status; + dest->level = mon->party.level; dest->capsule = mon->party.capsule; - dest->hp = mon->party.hp; - dest->maxHp = mon->party.maxHp; - dest->atk = mon->party.atk; - dest->def = mon->party.def; - dest->speed = mon->party.speed; - dest->spatk = mon->party.spatk; - dest->spdef = mon->party.spdef; + dest->hp = mon->party.hp; + dest->maxHp = mon->party.maxHp; + dest->atk = mon->party.atk; + dest->def = mon->party.def; + dest->speed = mon->party.speed; + dest->spatk = mon->party.spatk; + dest->spdef = mon->party.spdef; if (!mon->box.party_lock) { ENCRYPT_PTY(mon); @@ -4333,46 +4333,46 @@ void sub_02072D64(const struct UnkPokemonStruct_02072A98 *src, Pokemon *mon) { MI_CpuClearFast(mon, sizeof(Pokemon)); boxMon = Mon_GetBoxMon(mon); - dbA = &GetSubstruct(boxMon, src->pid, 0)->blockA; - dbB = &GetSubstruct(boxMon, src->pid, 1)->blockB; - dbC = &GetSubstruct(boxMon, src->pid, 2)->blockC; - dbD = &GetSubstruct(boxMon, src->pid, 3)->blockD; - - boxMon->pid = src->pid; - boxMon->party_lock = FALSE; - boxMon->box_lock = FALSE; + dbA = &GetSubstruct(boxMon, src->pid, 0)->blockA; + dbB = &GetSubstruct(boxMon, src->pid, 1)->blockB; + dbC = &GetSubstruct(boxMon, src->pid, 2)->blockC; + dbD = &GetSubstruct(boxMon, src->pid, 3)->blockD; + + boxMon->pid = src->pid; + boxMon->party_lock = FALSE; + boxMon->box_lock = FALSE; boxMon->checksum_fail = src->checksum_fail; - dbA->species = src->species; - dbA->heldItem = src->heldItem; - dbA->otID = src->otID; - dbA->exp = src->exp; - dbA->friendship = src->friendship; - dbA->ability = src->ability; - dbA->hpEV = src->hpEV; - dbA->atkEV = src->atkEV; - dbA->defEV = src->defEV; - dbA->spdEV = src->spdEV; - dbA->spatkEV = src->spatkEV; - dbA->spdefEV = src->spdefEV; + dbA->species = src->species; + dbA->heldItem = src->heldItem; + dbA->otID = src->otID; + dbA->exp = src->exp; + dbA->friendship = src->friendship; + dbA->ability = src->ability; + dbA->hpEV = src->hpEV; + dbA->atkEV = src->atkEV; + dbA->defEV = src->defEV; + dbA->spdEV = src->spdEV; + dbA->spatkEV = src->spatkEV; + dbA->spdefEV = src->spdefEV; dbA->originLanguage = src->originLanguage; for (i = 0; i < MAX_MON_MOVES; i++) { - dbB->moves[i] = src->moves[i]; - dbB->movePP[i] = src->movePP[i]; + dbB->moves[i] = src->moves[i]; + dbB->movePP[i] = src->movePP[i]; dbB->movePpUps[i] = src->movePpUps[i]; } - dbB->hpIV = src->hpIV; - dbB->atkIV = src->atkIV; - dbB->defIV = src->defIV; - dbB->spdIV = src->spdIV; - dbB->spatkIV = src->spatkIV; - dbB->spdefIV = src->spdefIV; - dbB->isEgg = src->isEgg; - dbB->isNicknamed = src->isNicknamed; + dbB->hpIV = src->hpIV; + dbB->atkIV = src->atkIV; + dbB->defIV = src->defIV; + dbB->spdIV = src->spdIV; + dbB->spatkIV = src->spatkIV; + dbB->spdefIV = src->spdefIV; + dbB->isEgg = src->isEgg; + dbB->isNicknamed = src->isNicknamed; dbB->fatefulEncounter = src->fatefulEncounter; - dbB->gender = src->gender; - dbB->alternateForm = src->alternateForm; + dbB->gender = src->gender; + dbB->alternateForm = src->alternateForm; for (i = 0; i < POKEMON_NAME_LENGTH + 1; i++) { dbC->nickname[i] = src->nickname[i]; @@ -4388,16 +4388,16 @@ void sub_02072D64(const struct UnkPokemonStruct_02072A98 *src, Pokemon *mon) { dbD->pokeball = BALL_POKE; } - mon->party.status = src->status; - mon->party.level = src->level; + mon->party.status = src->status; + mon->party.level = src->level; mon->party.capsule = src->capsule; - mon->party.hp = src->hp; - mon->party.maxHp = src->maxHp; - mon->party.atk = src->atk; - mon->party.def = src->def; - mon->party.speed = src->speed; - mon->party.spatk = src->spatk; - mon->party.spdef = src->spdef; + mon->party.hp = src->hp; + mon->party.maxHp = src->maxHp; + mon->party.atk = src->atk; + mon->party.def = src->def; + mon->party.speed = src->speed; + mon->party.spatk = src->spatk; + mon->party.spdef = src->spdef; ENCRYPT_PTY(mon); mon->box.checksum = CHECKSUM(&mon->box); @@ -4976,34 +4976,34 @@ void CalcBoxMonPokeathlonPerformance(BoxPokemon *boxMon, struct PokeathlonTodayP u16 species; u16 form; - pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); + pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); nature = GetBoxMonNature(boxMon); GF_RTC_CopyDateTime(&date, &time); day = date.day; for (i = PERFORMANCE_MIN; i < PERFORMANCE_MAX; i++) { - u32 pid_digit = _u32_getDigitN(pid, i); + u32 pid_digit = _u32_getDigitN(pid, i); dest->stats[i].dailyMod = sPokeathlonPerformanceNatureMods[nature][i] + (2 * _u32_getDigitN(pid_digit + (day + (7 - i)) * (day + (i + 3)), 0) - 9); } species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); ReadWholeNarcMemberByIdPair(&data, NARC_poketool_personal_performance, sPokeathlonPerformanceArcIdxs[species] + form); - dest->stats[PERFORMANCE_POWER].base = data.base[ARCPERF_POWER]; - dest->stats[PERFORMANCE_POWER].lo = data.minmax[ARCPERF_POWER][0]; - dest->stats[PERFORMANCE_POWER].hi = data.minmax[ARCPERF_POWER][1]; - dest->stats[PERFORMANCE_SKILL].base = data.base[ARCPERF_SKILL]; - dest->stats[PERFORMANCE_SKILL].lo = data.minmax[ARCPERF_SKILL][0]; - dest->stats[PERFORMANCE_SKILL].hi = data.minmax[ARCPERF_SKILL][1]; - dest->stats[PERFORMANCE_SPEED].base = data.base[ARCPERF_SPEED]; - dest->stats[PERFORMANCE_SPEED].lo = data.minmax[ARCPERF_SPEED][0]; - dest->stats[PERFORMANCE_SPEED].hi = data.minmax[ARCPERF_SPEED][1]; - dest->stats[PERFORMANCE_JUMP].base = data.base[ARCPERF_JUMP]; - dest->stats[PERFORMANCE_JUMP].lo = data.minmax[ARCPERF_JUMP][0]; - dest->stats[PERFORMANCE_JUMP].hi = data.minmax[ARCPERF_JUMP][1]; + dest->stats[PERFORMANCE_POWER].base = data.base[ARCPERF_POWER]; + dest->stats[PERFORMANCE_POWER].lo = data.minmax[ARCPERF_POWER][0]; + dest->stats[PERFORMANCE_POWER].hi = data.minmax[ARCPERF_POWER][1]; + dest->stats[PERFORMANCE_SKILL].base = data.base[ARCPERF_SKILL]; + dest->stats[PERFORMANCE_SKILL].lo = data.minmax[ARCPERF_SKILL][0]; + dest->stats[PERFORMANCE_SKILL].hi = data.minmax[ARCPERF_SKILL][1]; + dest->stats[PERFORMANCE_SPEED].base = data.base[ARCPERF_SPEED]; + dest->stats[PERFORMANCE_SPEED].lo = data.minmax[ARCPERF_SPEED][0]; + dest->stats[PERFORMANCE_SPEED].hi = data.minmax[ARCPERF_SPEED][1]; + dest->stats[PERFORMANCE_JUMP].base = data.base[ARCPERF_JUMP]; + dest->stats[PERFORMANCE_JUMP].lo = data.minmax[ARCPERF_JUMP][0]; + dest->stats[PERFORMANCE_JUMP].hi = data.minmax[ARCPERF_JUMP][1]; dest->stats[PERFORMANCE_STAMINA].base = data.base[ARCPERF_STAMINA]; - dest->stats[PERFORMANCE_STAMINA].lo = data.minmax[ARCPERF_STAMINA][0]; - dest->stats[PERFORMANCE_STAMINA].hi = data.minmax[ARCPERF_STAMINA][1]; + dest->stats[PERFORMANCE_STAMINA].lo = data.minmax[ARCPERF_STAMINA][0]; + dest->stats[PERFORMANCE_STAMINA].hi = data.minmax[ARCPERF_STAMINA][1]; } void CalcMonPokeathlonPerformance(Pokemon *mon, struct PokeathlonTodayPerformance *dest) { diff --git a/src/pokemon_icon_idx.c b/src/pokemon_icon_idx.c index f6a2da1108..de1174626c 100644 --- a/src/pokemon_icon_idx.c +++ b/src/pokemon_icon_idx.c @@ -15,11 +15,11 @@ u32 Boxmon_GetIconNaix(BoxPokemon *boxMon) { int form; u32 ret; - encry = AcquireBoxMonLock(boxMon); + encry = AcquireBoxMonLock(boxMon); species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - isEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL); - form = BoxMonGetForm(boxMon); - ret = GetMonIconNaixEx(species, isEgg, form); + isEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL); + form = BoxMonGetForm(boxMon); + ret = GetMonIconNaixEx(species, isEgg, form); ReleaseBoxMonLock(boxMon, encry); return ret; } @@ -701,10 +701,10 @@ const u8 Boxmon_GetIconPalette(BoxPokemon *boxMon) { u32 form; BOOL isEgg; - encry = AcquireBoxMonLock(boxMon); - form = BoxMonGetForm(boxMon); + encry = AcquireBoxMonLock(boxMon); + form = BoxMonGetForm(boxMon); species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); - isEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL); + isEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL); ReleaseBoxMonLock(boxMon, encry); return GetMonIconPaletteEx(species, form, isEgg); } diff --git a/src/pokemon_mood.c b/src/pokemon_mood.c index 5a8336b520..f689b421e5 100644 --- a/src/pokemon_mood.c +++ b/src/pokemon_mood.c @@ -8,20 +8,20 @@ static const s8 sMoodModifiers[] = { [MON_MOOD_MODIFIER_LEVEL_UP_IN_BATTLE] = 40, - [MON_MOOD_MODIFIER_1] = 8, - [MON_MOOD_MODIFIER_2] = 50, - [MON_MOOD_MODIFIER_LEARN_TMHM] = 40, - [MON_MOOD_MODIFIER_4] = -80, - [MON_MOOD_MODIFIER_SURVIVED_PSN] = -50, - [MON_MOOD_MODIFIER_6] = -100, - [MON_MOOD_MODIFIER_7] = 30, + [MON_MOOD_MODIFIER_1] = 8, + [MON_MOOD_MODIFIER_2] = 50, + [MON_MOOD_MODIFIER_LEARN_TMHM] = 40, + [MON_MOOD_MODIFIER_4] = -80, + [MON_MOOD_MODIFIER_SURVIVED_PSN] = -50, + [MON_MOOD_MODIFIER_6] = -100, + [MON_MOOD_MODIFIER_7] = 30, }; static void MonAdjustMood(Pokemon *mon, s8 by) { s8 mood; s32 adjustedMood; - mood = GetMonData(mon, MON_DATA_MOOD, NULL); + mood = GetMonData(mon, MON_DATA_MOOD, NULL); adjustedMood = mood + by; if (adjustedMood > 127) { diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 56eefad912..efb579f557 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -100,9 +100,9 @@ BOOL PCStorage_PlaceMonInBoxByIndexPair(PCStorage *storage, u32 boxno, u32 slotn void PCStorage_SwapMonsInBoxByIndexPair(PCStorage *storage, u32 boxno, u32 from, u32 to) { BoxPokemon temp; - temp = storage->boxes[boxno].mons[from]; + temp = storage->boxes[boxno].mons[from]; storage->boxes[boxno].mons[from] = storage->boxes[boxno].mons[to]; - storage->boxes[boxno].mons[to] = temp; + storage->boxes[boxno].mons[to] = temp; PCStorage_SetBoxModified(storage, boxno); } @@ -154,7 +154,7 @@ BOOL PCStorage_FindFirstEmptySlot(PCStorage *storage, int *boxno_p, int *slotno_ do { while (j < MONS_PER_BOX) { if (!GetBoxMonData(&storage->boxes[i].mons[j], MON_DATA_SPECIES_EXISTS, NULL)) { - *boxno_p = i; + *boxno_p = i; *slotno_p = j; return TRUE; } diff --git a/src/pokepic.c b/src/pokepic.c index 79e5c6853f..f70823606a 100644 --- a/src/pokepic.c +++ b/src/pokepic.c @@ -300,14 +300,14 @@ static const int sPokepicShadowUVParams[4][4] = { PokepicManager *PokepicManager_Create(HeapID heapId) { PokepicManager *ret = AllocFromHeap(heapId, sizeof(PokepicManager)); MI_CpuClearFast(ret, sizeof(PokepicManager)); - ret->heapId = heapId; - ret->unread_330 = 0; + ret->heapId = heapId; + ret->unread_330 = 0; ret->charBaseAddr = 0; - ret->charSize = 0x8000; + ret->charSize = 0x8000; ret->plttBaseAddr = 0; - ret->plttSize = 0x80; - ret->charRawData = AllocFromHeap(heapId, 0x8000); - ret->plttRawData = AllocFromHeap(heapId, 0xC0); + ret->plttSize = 0x80; + ret->charRawData = AllocFromHeap(heapId, 0x8000); + ret->plttRawData = AllocFromHeap(heapId, 0xC0); MI_CpuClearFast(ret->plttRawData, 4); ret->plttRawDataUnfaded = AllocFromHeap(heapId, 0xC0); MI_CpuClearFast(ret->plttRawDataUnfaded, 4); @@ -321,22 +321,22 @@ PokepicManager *PokepicManager_Create(HeapID heapId) { u8 *pRawCharData; void *pNcgrFile = AllocAndReadWholeNarcMemberByIdPair(NARC_poketool_pokegra_otherpoke, NARC_otherpoke_259_NCGR, ret->heapId); // shadow.png NNS_G2dGetUnpackedCharacterData(pNcgrFile, &charData); - ret->charData.pixelFmt = charData->pixelFmt; - ret->charData.mapingType = charData->mapingType; + ret->charData.pixelFmt = charData->pixelFmt; + ret->charData.mapingType = charData->mapingType; ret->charData.characterFmt = charData->characterFmt; - pRawCharData = charData->pRawData; + pRawCharData = charData->pRawData; UnscanPokepic_PtHGSS(pRawCharData); MI_CpuFill8(ret->charRawData, *pRawCharData, 0x8000); for (int i = 0; i < 80; ++i) { for (int j = 0; j < 40; ++j) { - int dstOffs = 0x5050 + 0x80 * i + j; - int srcOffs = 0x50 * i + j; + int dstOffs = 0x5050 + 0x80 * i + j; + int srcOffs = 0x50 * i + j; ret->charRawData[dstOffs] = pRawCharData[srcOffs]; } } FreeToHeap(pNcgrFile); ret->needLoadImage = 1; - ret->needLoadPltt = 1; + ret->needLoadPltt = 1; return ret; } @@ -389,12 +389,12 @@ void PokepicManager_DrawAll(PokepicManager *pokepicManager) { u1, v1); } else { - width = (80 * pokepicManager->pics[i].drawParam.affineWidth) >> 8; + width = (80 * pokepicManager->pics[i].drawParam.affineWidth) >> 8; height = (80 * pokepicManager->pics[i].drawParam.affineHeight) >> 8; - u0 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][0]; - u1 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][2]; - v0 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][1]; - v1 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][3]; + u0 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][0]; + u1 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][2]; + v0 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][1]; + v1 = sPokepicUVParams[i][pokepicManager->pics[i].whichAnimStep][3]; NNS_G2dDrawSpriteFast( pokepicManager->pics[i].drawParam.xCenter - width / 2 + pokepicManager->pics[i].drawParam.xOffset, pokepicManager->pics[i].drawParam.yCenter - height / 2 + pokepicManager->pics[i].drawParam.yOffset - pokepicManager->pics[i].shadow.height, @@ -412,10 +412,10 @@ void PokepicManager_DrawAll(PokepicManager *pokepicManager) { } G3_TexPlttBase(pokepicManager->plttBaseAddr + 0x20 * (3 + pokepicManager->pics[i].shadow.palSlot), pokepicManager->imageProxy.attr.fmt); if (pokepicManager->pics[i].shadow.isAffine) { - width = (64 * pokepicManager->pics[i].drawParam.affineWidth) >> 8; + width = (64 * pokepicManager->pics[i].drawParam.affineWidth) >> 8; height = (16 * pokepicManager->pics[i].drawParam.affineHeight) >> 8; } else { - width = 64; + width = 64; height = 16; } if (pokepicManager->pics[i].shadow.shouldAdjustX) { @@ -459,9 +459,9 @@ void Pokepic_StartAnim(Pokepic *pokepic) { if (pokepic->animScript[pokepic->whichAnim].next == -1) { pokepic->whichAnimStep = 0; } else { - pokepic->animActive = 1; - pokepic->whichAnimStep = pokepic->animScript[pokepic->whichAnim].next; - pokepic->animStepDelay = pokepic->animScript[pokepic->whichAnim].duration; + pokepic->animActive = 1; + pokepic->whichAnimStep = pokepic->animScript[pokepic->whichAnim].next; + pokepic->animStepDelay = pokepic->animScript[pokepic->whichAnim].duration; pokepic->drawParam.xOffset = pokepic->animScript[pokepic->whichAnim].xOffset; } } @@ -488,30 +488,30 @@ Pokepic *PokepicManager_CreatePokepic(PokepicManager *pokepicManager, PokepicTem Pokepic *PokepicManager_CreatePokepicAt(PokepicManager *pokepicManager, PokepicTemplate *template, int x, int y, int z, int polygonId, int picIndex, PokepicAnimScript *animScript, PokepicCallback callback) { GF_ASSERT(!pokepicManager->pics[picIndex].active); MI_CpuClearFast(&pokepicManager->pics[picIndex], sizeof(Pokepic)); - pokepicManager->pics[picIndex].active = TRUE; - pokepicManager->pics[picIndex].needReloadChar = TRUE; - pokepicManager->pics[picIndex].needReloadPltt = TRUE; - pokepicManager->pics[picIndex].polygonId = polygonId; - pokepicManager->pics[picIndex].template = *template; - pokepicManager->pics[picIndex].templateBak = *template; - pokepicManager->pics[picIndex].drawParam.xCenter = x; - pokepicManager->pics[picIndex].drawParam.yCenter = y; - pokepicManager->pics[picIndex].drawParam.zCenter = z; - pokepicManager->pics[picIndex].drawParam.affineWidth = 0x100; + pokepicManager->pics[picIndex].active = TRUE; + pokepicManager->pics[picIndex].needReloadChar = TRUE; + pokepicManager->pics[picIndex].needReloadPltt = TRUE; + pokepicManager->pics[picIndex].polygonId = polygonId; + pokepicManager->pics[picIndex].template = *template; + pokepicManager->pics[picIndex].templateBak = *template; + pokepicManager->pics[picIndex].drawParam.xCenter = x; + pokepicManager->pics[picIndex].drawParam.yCenter = y; + pokepicManager->pics[picIndex].drawParam.zCenter = z; + pokepicManager->pics[picIndex].drawParam.affineWidth = 0x100; pokepicManager->pics[picIndex].drawParam.affineHeight = 0x100; - pokepicManager->pics[picIndex].drawParam.alpha = 31; - pokepicManager->pics[picIndex].drawParam.diffuseR = 31; - pokepicManager->pics[picIndex].drawParam.diffuseG = 31; - pokepicManager->pics[picIndex].drawParam.diffuseB = 31; - pokepicManager->pics[picIndex].drawParam.ambientR = 16; - pokepicManager->pics[picIndex].drawParam.ambientG = 16; - pokepicManager->pics[picIndex].drawParam.ambientB = 16; - pokepicManager->pics[picIndex].callback = callback; - pokepicManager->pics[picIndex].shadow.x = x; - pokepicManager->pics[picIndex].shadow.y = y; - pokepicManager->pics[picIndex].shadow.shouldAdjustX = TRUE; - pokepicManager->pics[picIndex].shadow.shouldAdjustY = TRUE; - pokepicManager->pics[picIndex].shadow.isAffine = TRUE; + pokepicManager->pics[picIndex].drawParam.alpha = 31; + pokepicManager->pics[picIndex].drawParam.diffuseR = 31; + pokepicManager->pics[picIndex].drawParam.diffuseG = 31; + pokepicManager->pics[picIndex].drawParam.diffuseB = 31; + pokepicManager->pics[picIndex].drawParam.ambientR = 16; + pokepicManager->pics[picIndex].drawParam.ambientG = 16; + pokepicManager->pics[picIndex].drawParam.ambientB = 16; + pokepicManager->pics[picIndex].callback = callback; + pokepicManager->pics[picIndex].shadow.x = x; + pokepicManager->pics[picIndex].shadow.y = y; + pokepicManager->pics[picIndex].shadow.shouldAdjustX = TRUE; + pokepicManager->pics[picIndex].shadow.shouldAdjustY = TRUE; + pokepicManager->pics[picIndex].shadow.isAffine = TRUE; if (animScript != NULL) { MI_CpuCopy8(animScript, pokepicManager->pics[picIndex].animScript, 10 * sizeof(PokepicAnimScript)); } @@ -622,30 +622,30 @@ void Pokepic_SetAttr(Pokepic *pokepic, int attr, int value) { break; case POKEPIC_FADE: pokepic->drawParam.fadeActive = value; - pokepic->needReloadPltt = TRUE; + pokepic->needReloadPltt = TRUE; break; case POKEPIC_FADE_COLOR: pokepic->drawParam.fadeTargetColor = value; - pokepic->needReloadPltt = TRUE; + pokepic->needReloadPltt = TRUE; break; case POKEPIC_FADE_BLDY: pokepic->drawParam.fadeCur = value; - pokepic->needReloadPltt = TRUE; + pokepic->needReloadPltt = TRUE; break; case POKEPIC_FADE_BLDY_TARGET: pokepic->drawParam.fadeEnd = value; - pokepic->needReloadPltt = TRUE; + pokepic->needReloadPltt = TRUE; break; case POKEPIC_FADE_SPEED: pokepic->drawParam.fadeDelayCounter = value; break; case POKEPIC_HFLIP: pokepic->drawParam.hflip = value; - pokepic->needReloadChar = TRUE; + pokepic->needReloadChar = TRUE; break; case POKEPIC_VFLIP: pokepic->drawParam.vflip = value; - pokepic->needReloadChar = TRUE; + pokepic->needReloadChar = TRUE; break; case POKEPIC_NODRAW: pokepic->drawParam.dontDraw = value; @@ -655,7 +655,7 @@ void Pokepic_SetAttr(Pokepic *pokepic, int attr, int value) { break; case POKEPIC_MOSAIC: pokepic->drawParam.mosaic = value; - pokepic->needReloadChar = TRUE; + pokepic->needReloadChar = TRUE; break; case POKEPIC_SHADOW_H: pokepic->shadow.height = value; @@ -931,31 +931,31 @@ void Pokepic_AddAttr(Pokepic *pokepic, int attr, int addend) { } void Pokepic_SetVisible(Pokepic *pokepic, int x, int y, int width, int height) { - pokepic->drawParam.visible = TRUE; + pokepic->drawParam.visible = TRUE; pokepic->drawParam.xOffset2 = x; pokepic->drawParam.yOffset2 = y; - pokepic->drawParam.width = width; - pokepic->drawParam.height = height; + pokepic->drawParam.width = width; + pokepic->drawParam.height = height; } void Pokepic_StartPaletteFade(Pokepic *pokepic, int start, int end, int framesPer, int targetColor) { - pokepic->drawParam.fadeActive = TRUE; - pokepic->drawParam.fadeCur = start; - pokepic->drawParam.fadeEnd = end; + pokepic->drawParam.fadeActive = TRUE; + pokepic->drawParam.fadeCur = start; + pokepic->drawParam.fadeEnd = end; pokepic->drawParam.fadeDelayCounter = 0; - pokepic->drawParam.fadeDelayLength = framesPer; - pokepic->drawParam.fadeTargetColor = targetColor; + pokepic->drawParam.fadeDelayLength = framesPer; + pokepic->drawParam.fadeTargetColor = targetColor; } void Pokepic_StartPaletteFadeAll(PokepicManager *pokepicManager, int start, int end, int framesPer, int targetColor) { for (int i = 0; i < 4; ++i) { if (pokepicManager->pics[i].active) { - pokepicManager->pics[i].drawParam.fadeActive = TRUE; - pokepicManager->pics[i].drawParam.fadeCur = start; - pokepicManager->pics[i].drawParam.fadeEnd = end; + pokepicManager->pics[i].drawParam.fadeActive = TRUE; + pokepicManager->pics[i].drawParam.fadeCur = start; + pokepicManager->pics[i].drawParam.fadeEnd = end; pokepicManager->pics[i].drawParam.fadeDelayCounter = 0; - pokepicManager->pics[i].drawParam.fadeDelayLength = framesPer; - pokepicManager->pics[i].drawParam.fadeTargetColor = targetColor; + pokepicManager->pics[i].drawParam.fadeDelayLength = framesPer; + pokepicManager->pics[i].drawParam.fadeTargetColor = targetColor; } } } @@ -983,10 +983,10 @@ static inline void runPokepicAnim(u8 *pActive, u8 *pWhichAnimStep, u8 *pWhichAni } if (animScript[*pWhichAnim].next == -1 || *pWhichAnim >= 10) { *pWhichAnimStep = 0; - *pActive = 0; + *pActive = 0; } else { *pWhichAnimStep = animScript[*pWhichAnim].next; - *pStepDelay = animScript[*pWhichAnim].duration; + *pStepDelay = animScript[*pWhichAnim].duration; } } else { --(*pStepDelay); @@ -1008,12 +1008,12 @@ static void Pokepic_RunAnimInternal(Pokepic *pokepic) { } } if (pokepic->whichAnim >= 10 || pokepic->animScript[pokepic->whichAnim].next == -1) { - pokepic->whichAnimStep = 0; - pokepic->animActive = 0; + pokepic->whichAnimStep = 0; + pokepic->animActive = 0; pokepic->drawParam.xOffset = 0; } else { - pokepic->whichAnimStep = pokepic->animScript[pokepic->whichAnim].next; - pokepic->animStepDelay = pokepic->animScript[pokepic->whichAnim].duration; + pokepic->whichAnimStep = pokepic->animScript[pokepic->whichAnim].next; + pokepic->animStepDelay = pokepic->animScript[pokepic->whichAnim].duration; pokepic->drawParam.xOffset = pokepic->animScript[pokepic->whichAnim].xOffset; } } else { @@ -1027,10 +1027,10 @@ static void Pokepic_RunAnim(Pokepic *pokepic) { } void PokepicAnim_Init(PokepicAnim *anim, PokepicAnimScript *animScript) { - anim->active = TRUE; - anim->animId = 0; - anim->animStep = animScript->next; - anim->stepDelay = animScript->duration; + anim->active = TRUE; + anim->animId = 0; + anim->animStep = animScript->next; + anim->stepDelay = animScript->duration; anim->animScript = animScript; for (int i = 0; i < 10; ++i) { anim->loopTimers[i] = 0; @@ -1053,24 +1053,24 @@ void Pokepic_ScheduleReloadFromNarc(Pokepic *pokepic) { void Pokepic_Push(Pokepic *pokepic) { pokepic->templateBak = pokepic->template; - pokepic->shadowBak = pokepic->shadow; + pokepic->shadowBak = pokepic->shadow; } void Pokepic_Pop(Pokepic *pokepic) { - pokepic->template = pokepic->templateBak; - pokepic->shadow = pokepic->shadowBak; + pokepic->template = pokepic->templateBak; + pokepic->shadow = pokepic->shadowBak; pokepic->needReloadChar = TRUE; pokepic->needReloadPltt = TRUE; } void PokepicManager_SetCharBaseAddrAndSize(PokepicManager *pokepicManager, int addr, int size) { pokepicManager->charBaseAddr = addr; - pokepicManager->charSize = size; + pokepicManager->charSize = size; } void PokepicManager_SetPlttBaseAddrAndSize(PokepicManager *pokepicManager, int addr, int size) { pokepicManager->plttBaseAddr = addr; - pokepicManager->plttSize = size; + pokepicManager->plttSize = size; } PokepicTemplate *Pokepic_GetTemplate(Pokepic *pokepic) { @@ -1081,16 +1081,16 @@ void PokepicManager_HandleLoadImgAndOrPltt(PokepicManager *pokepicManager) { if (pokepicManager->needLoadImage) { pokepicManager->needLoadImage = FALSE; NNS_G2dInitImageProxy(&pokepicManager->imageProxy); - pokepicManager->charData.H = 0x20; - pokepicManager->charData.W = 0x20; - pokepicManager->charData.szByte = pokepicManager->charSize; + pokepicManager->charData.H = 0x20; + pokepicManager->charData.W = 0x20; + pokepicManager->charData.szByte = pokepicManager->charSize; pokepicManager->charData.pRawData = pokepicManager->charRawData; NNS_G2dLoadImage2DMapping(&pokepicManager->charData, pokepicManager->charBaseAddr, NNS_G2D_VRAM_TYPE_3DMAIN, &pokepicManager->imageProxy); } if (pokepicManager->needLoadPltt) { pokepicManager->needLoadPltt = FALSE; NNS_G2dInitImagePaletteProxy(&pokepicManager->paletteProxy); - pokepicManager->plttData.szByte = pokepicManager->plttSize; + pokepicManager->plttData.szByte = pokepicManager->plttSize; pokepicManager->plttData.pRawData = pokepicManager->plttRawData; NNS_G2dLoadPalette(&pokepicManager->plttData, pokepicManager->plttBaseAddr, NNS_G2D_VRAM_TYPE_3DMAIN, &pokepicManager->paletteProxy); } @@ -1124,13 +1124,13 @@ static void PokepicManager_BufferCharData(PokepicManager *pokepicManager) { for (i = 0; i < 4; ++i) { if (pokepicManager->pics[i].active && pokepicManager->pics[i].needReloadChar) { pokepicManager->pics[i].needReloadChar = FALSE; - needCharUpdate = TRUE; - ncgrFile = AllocAndReadWholeNarcMemberByIdPair((NarcId)pokepicManager->pics[i].template.narcID, pokepicManager->pics[i].template.charDataID, pokepicManager->heapId); + needCharUpdate = TRUE; + ncgrFile = AllocAndReadWholeNarcMemberByIdPair((NarcId)pokepicManager->pics[i].template.narcID, pokepicManager->pics[i].template.charDataID, pokepicManager->heapId); NNS_G2dGetUnpackedCharacterData(ncgrFile, &pCharData); - pokepicManager->charData.pixelFmt = pCharData->pixelFmt; - pokepicManager->charData.mapingType = pCharData->mapingType; + pokepicManager->charData.pixelFmt = pCharData->pixelFmt; + pokepicManager->charData.mapingType = pCharData->mapingType; pokepicManager->charData.characterFmt = pCharData->characterFmt; - pRawCharData = pCharData->pRawData; + pRawCharData = pCharData->pRawData; UnscanPokepic(pRawCharData, (NarcId)pokepicManager->pics[i].template.narcID); Pokepic_MaybeAddSpindaSpots(&pokepicManager->pics[i], pRawCharData); @@ -1226,13 +1226,13 @@ static void PokepicManager_BufferPlttData(PokepicManager *pokepicManager) { for (i = 0; i < 4; ++i) { if (pokepicManager->pics[i].active && pokepicManager->pics[i].needReloadPltt) { pokepicManager->pics[i].needReloadPltt = FALSE; - needPlttUpdate = TRUE; - nclrFile = AllocAndReadWholeNarcMemberByIdPair((NarcId)pokepicManager->pics[i].template.narcID, pokepicManager->pics[i].template.palDataID, pokepicManager->heapId); + needPlttUpdate = TRUE; + nclrFile = AllocAndReadWholeNarcMemberByIdPair((NarcId)pokepicManager->pics[i].template.narcID, pokepicManager->pics[i].template.palDataID, pokepicManager->heapId); NNS_G2dGetUnpackedPaletteData(nclrFile, &plttData); pokepicManager->plttData.fmt = plttData->fmt; - src = plttData->pRawData; + src = plttData->pRawData; for (j = 0; j < 16; ++j) { - pokepicManager->plttRawData[j + 16 * i] = src[j]; + pokepicManager->plttRawData[j + 16 * i] = src[j]; pokepicManager->plttRawDataUnfaded[j + 16 * i] = src[j]; } FreeToHeap(nclrFile); @@ -1241,7 +1241,7 @@ static void PokepicManager_BufferPlttData(PokepicManager *pokepicManager) { NNS_G2dGetUnpackedPaletteData(nclrFile, &plttData); src = plttData->pRawData; for (j = 0; j < 16; ++j) { - pokepicManager->plttRawData[j + 16 * (3 + pokepicManager->pics[i].shadow.palSlot)] = src[j]; + pokepicManager->plttRawData[j + 16 * (3 + pokepicManager->pics[i].shadow.palSlot)] = src[j]; pokepicManager->plttRawDataUnfaded[j + 16 * (3 + pokepicManager->pics[i].shadow.palSlot)] = src[j]; } FreeToHeap(nclrFile); @@ -1249,7 +1249,7 @@ static void PokepicManager_BufferPlttData(PokepicManager *pokepicManager) { } if (pokepicManager->pics[i].active && pokepicManager->pics[i].drawParam.fadeActive) { if (pokepicManager->pics[i].drawParam.fadeDelayCounter == 0) { - needPlttUpdate = TRUE; + needPlttUpdate = TRUE; pokepicManager->pics[i].drawParam.fadeDelayCounter = pokepicManager->pics[i].drawParam.fadeDelayLength; BlendPalette(pokepicManager->plttRawDataUnfaded + 16 * i, pokepicManager->plttRawData + 16 * i, 16, pokepicManager->pics[i].drawParam.fadeCur, pokepicManager->pics[i].drawParam.fadeTargetColor); if (pokepicManager->pics[i].shadow.palSlot != 0) { @@ -1292,10 +1292,10 @@ void RawChardata_PlaceSpindaSpots(u8 *pRawData, u32 pid, BOOL isAnimated) { u32 lr = pid; for (i = 0; i < 4; ++i) { spotCoords = sSpindaSpotsCoordsPtrs[i]; - j = 0; + j = 0; while (spotCoords[j][0] != 0xFF) { - x = spotCoords[j][0] + ((pid & 0x0F) - 8); - y = spotCoords[j][1] + (((pid & 0xF0) >> 4) - 8); + x = spotCoords[j][0] + ((pid & 0x0F) - 8); + y = spotCoords[j][1] + (((pid & 0xF0) >> 4) - 8); destOffset = x / 2 + y * 80; if (x & 1) { if ((pRawData[destOffset] & 0xF0) >= 0x10 && (pRawData[destOffset] & 0xF0) <= 0x30) { @@ -1314,10 +1314,10 @@ void RawChardata_PlaceSpindaSpots(u8 *pRawData, u32 pid, BOOL isAnimated) { if (isAnimated) { for (i = 0; i < 4; ++i) { spotCoords = sSpindaSpotsCoordsPtrs[i]; - j = 0; + j = 0; while (spotCoords[j][0] != 0xFF) { - x = (spotCoords[j][0] - 14) + ((pid & 0x0F) - 8) + 80; - y = spotCoords[j][1] + (((pid & 0xF0) >> 4) - 8); + x = (spotCoords[j][0] - 14) + ((pid & 0x0F) - 8) + 80; + y = spotCoords[j][1] + (((pid & 0xF0) >> 4) - 8); destOffset = x / 2 + y * 80; if (x & 1) { if ((pRawData[destOffset] & 0xF0) >= 0x10 && (pRawData[destOffset] & 0xF0) <= 0x30) { @@ -1343,7 +1343,7 @@ static u16 lcrngUpdate(u32 *p) { static void UnscanPokepic_PtHGSS(u8 *pRawCharData) { int i; u16 *pCharData_asU16 = (u16 *)pRawCharData; - u32 seed = *pCharData_asU16; + u32 seed = *pCharData_asU16; for (i = 0; i < 3200; ++i) { pCharData_asU16[i] ^= seed; lcrngUpdate(&seed); @@ -1353,7 +1353,7 @@ static void UnscanPokepic_PtHGSS(u8 *pRawCharData) { static void UnscanPokepic_DP(u8 *pRawCharData) { int i; u16 *pCharData_asU16 = (u16 *)pRawCharData; - u32 seed = pCharData_asU16[3199]; + u32 seed = pCharData_asU16[3199]; for (i = 3199; i > -1; --i) { pCharData_asU16[i] ^= seed; lcrngUpdate(&seed); diff --git a/src/register_hall_of_fame.c b/src/register_hall_of_fame.c index 2abf73f323..77cb54aa47 100644 --- a/src/register_hall_of_fame.c +++ b/src/register_hall_of_fame.c @@ -99,7 +99,7 @@ typedef enum RegisterHallOfFamePicIdx_WholeParty { REGHOF_PIC_WHOLE_PLAYER_SHADOW, REGHOF_PIC_WHOLE_TWINKLE, - REGHOF_PIC_WHOLE_MON = 0, + REGHOF_PIC_WHOLE_MON = 0, REGHOF_PIC_WHOLE_MON_SHADOW = 6, } RegisterHallOfFamePicIdx_WholeParty; @@ -200,13 +200,13 @@ struct RegisterHallOfFameData { u16 curMonIndex; f32 unk_13058; f32 unk_1305C; - u32 requestUnsilhouetteFrontpic : 1; - u32 requestUnsilhouetteBackpic : 1; + u32 requestUnsilhouetteFrontpic : 1; + u32 requestUnsilhouetteBackpic : 1; u32 requestBeginSpotlightsAndConfetti : 1; - u32 requestPlayFlashKanseiSfx : 1; - u32 unk_13060_4 : 1; - u32 scrollingPolkadotBackground : 1; - u32 generatingConfetti : 1; + u32 requestPlayFlashKanseiSfx : 1; + u32 unk_13060_4 : 1; + u32 scrollingPolkadotBackground : 1; + u32 generatingConfetti : 1; int fadeDuration; u16 generateConfettiDelayLength; u16 generateConfettiDelayTimer; @@ -377,21 +377,21 @@ static const GraphicsModes sGraphicsModes_IndivMons = { static const WindowTemplate sWholePartySceneWindowTemplates[2] = { { - .bgId = GF_BG_LYR_MAIN_1, - .left = 0, - .top = 0, - .width = 32, - .height = 2, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_1, + .left = 0, + .top = 0, + .width = 32, + .height = 2, + .palette = 15, .baseTile = 0x001, }, { - .bgId = GF_BG_LYR_MAIN_1, - .left = 0, - .top = 22, - .width = 32, - .height = 2, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_1, + .left = 0, + .top = 22, + .width = 32, + .height = 2, + .palette = 15, .baseTile = 0x041, }, }; @@ -451,108 +451,108 @@ static const SpriteResourceCountsListUnion sSpriteGfxHandlerCapacities = { }; static const BgTemplate sBgTemplate_IndivMons_Main0 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_512x512_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_512x512, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_512x512, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe000, - .charBase = GX_BG_CHARBASE_0x18000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x18000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const BgTemplate sBgTemplate_IndivMons_Main1 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_512x512_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_512x512, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_512x512, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xc000, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const BgTemplate sBgTemplate_WholePartyScene_Main3 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xe800, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const BgTemplate sBgTemplate_WholePartyScene_Main1 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const BgTemplate sBgTemplate_WholePartyScene_Main2 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_256x256_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xf000, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const BgTemplate sBgTemplate_IndivMons_Main3 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_512x512_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_512x512, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_512x512, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x8000, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const BgTemplate sBgTemplate_IndivMons_Main2 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = GF_BG_BUF_SIZE_512x512_4BPP, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_512x512, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_512x512, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0xa000, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .mosaic = FALSE, }; static const UnkStruct_02014E30 ov63_0221FC38[2] = { @@ -701,66 +701,66 @@ static const GraphicsBanks sGfxBanks = { static const WindowTemplate sIndivMonsSceneWindowTemplates[7] = { { - .bgId = GF_BG_LYR_MAIN_0, - .left = 0, - .top = 0, - .width = 32, - .height = 2, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_0, + .left = 0, + .top = 0, + .width = 32, + .height = 2, + .palette = 15, .baseTile = 0x001, }, { - .bgId = GF_BG_LYR_MAIN_0, - .left = 18, - .top = 3, - .width = 14, - .height = 2, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_0, + .left = 18, + .top = 3, + .width = 14, + .height = 2, + .palette = 15, .baseTile = 0x041, }, { - .bgId = GF_BG_LYR_MAIN_0, - .left = 18, - .top = 6, - .width = 14, - .height = 4, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_0, + .left = 18, + .top = 6, + .width = 14, + .height = 4, + .palette = 15, .baseTile = 0x05D, }, { - .bgId = GF_BG_LYR_MAIN_0, - .left = 18, - .top = 12, - .width = 14, - .height = 9, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_0, + .left = 18, + .top = 12, + .width = 14, + .height = 9, + .palette = 15, .baseTile = 0x095, }, { - .bgId = GF_BG_LYR_MAIN_0, - .left = 0, - .top = 3, - .width = 14, - .height = 2, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_0, + .left = 0, + .top = 3, + .width = 14, + .height = 2, + .palette = 15, .baseTile = 0x041, }, { - .bgId = GF_BG_LYR_MAIN_0, - .left = 0, - .top = 6, - .width = 14, - .height = 4, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_0, + .left = 0, + .top = 6, + .width = 14, + .height = 4, + .palette = 15, .baseTile = 0x05D, }, { - .bgId = GF_BG_LYR_MAIN_0, - .left = 0, - .top = 12, - .width = 14, - .height = 9, - .palette = 15, + .bgId = GF_BG_LYR_MAIN_0, + .left = 0, + .top = 12, + .width = 14, + .height = 9, + .palette = 15, .baseTile = 0x095, }, }; @@ -797,42 +797,42 @@ static const RegHOFSpritePosScaleAnimParam sPicPosScaleAnimParams[27] = { static const UnkTemplate_0200D748 sPicTemplates[21] = { [0] = { - .x = 512, - .y = 480, - .z = 0, - .animation = 0, + .x = 512, + .y = 480, + .z = 0, + .animation = 0, .spritePriority = 0, - .pal = 0, - .vram = NNS_G2D_VRAM_TYPE_2DMAIN, - .resIdList = { + .pal = 0, + .vram = NNS_G2D_VRAM_TYPE_2DMAIN, + .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55512, [GF_GFX_RES_TYPE_PLTT] = 55512, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, - .bgPriority = 2, - .vramTransfer = 0 }, - [1] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 1, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55512, [GF_GFX_RES_TYPE_PLTT] = 55513, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [2] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 2, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55514, [GF_GFX_RES_TYPE_CELL] = 55513, [GF_GFX_RES_TYPE_ANIM] = 55513, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [3] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 3, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55515, [GF_GFX_RES_TYPE_CELL] = 55513, [GF_GFX_RES_TYPE_ANIM] = 55513, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [4] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 4, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55518, [GF_GFX_RES_TYPE_PLTT] = 55518, [GF_GFX_RES_TYPE_CELL] = 55514, [GF_GFX_RES_TYPE_ANIM] = 55514, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [5] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 5, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55518, [GF_GFX_RES_TYPE_PLTT] = 55519, [GF_GFX_RES_TYPE_CELL] = 55514, [GF_GFX_RES_TYPE_ANIM] = 55514, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [6] = { .x = 168, .y = -40, .z = 0, .animation = 0, .spritePriority = 20, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55512, [GF_GFX_RES_TYPE_PLTT] = 55512, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [7] = { .x = -92, .y = 88, .z = 0, .animation = 0, .spritePriority = 21, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55513, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [8] = { .x = 348, .y = 88, .z = 0, .animation = 0, .spritePriority = 22, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55514, [GF_GFX_RES_TYPE_PLTT] = 55514, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [9] = { .x = 88, .y = -40, .z = 0, .animation = 0, .spritePriority = 23, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55515, [GF_GFX_RES_TYPE_PLTT] = 55515, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [10] = { .x = 336, .y = 0, .z = 0, .animation = 0, .spritePriority = 24, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55516, [GF_GFX_RES_TYPE_PLTT] = 55516, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [11] = { .x = -80, .y = 0, .z = 0, .animation = 0, .spritePriority = 25, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55517, [GF_GFX_RES_TYPE_PLTT] = 55517, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [12] = { .x = 93, .y = 110, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55512, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [13] = { .x = 157, .y = 110, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [14] = { .x = 53, .y = 96, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55514, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [15] = { .x = 197, .y = 96, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55515, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [16] = { .x = 37, .y = 72, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55516, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [17] = { .x = 213, .y = 72, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55517, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [18] = { .x = 128, .y = 128, .z = 0, .animation = 0, .spritePriority = 10, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55519, [GF_GFX_RES_TYPE_PLTT] = 55520, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, - [19] = { .x = 125, .y = 120, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55519, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, - [20] = { .x = 0, .y = 0, .z = 0, .animation = 0, .spritePriority = 0, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55520, [GF_GFX_RES_TYPE_PLTT] = 55522, [GF_GFX_RES_TYPE_CELL] = 55515, [GF_GFX_RES_TYPE_ANIM] = 55515, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 } + .bgPriority = 2, + .vramTransfer = 0 }, + [1] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 1, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55512, [GF_GFX_RES_TYPE_PLTT] = 55513, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [2] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 2, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55514, [GF_GFX_RES_TYPE_CELL] = 55513, [GF_GFX_RES_TYPE_ANIM] = 55513, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [3] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 3, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55515, [GF_GFX_RES_TYPE_CELL] = 55513, [GF_GFX_RES_TYPE_ANIM] = 55513, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [4] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 4, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55518, [GF_GFX_RES_TYPE_PLTT] = 55518, [GF_GFX_RES_TYPE_CELL] = 55514, [GF_GFX_RES_TYPE_ANIM] = 55514, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [5] = { .x = 512, .y = 480, .z = 0, .animation = 0, .spritePriority = 5, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55518, [GF_GFX_RES_TYPE_PLTT] = 55519, [GF_GFX_RES_TYPE_CELL] = 55514, [GF_GFX_RES_TYPE_ANIM] = 55514, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [6] = { .x = 168, .y = -40, .z = 0, .animation = 0, .spritePriority = 20, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55512, [GF_GFX_RES_TYPE_PLTT] = 55512, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [7] = { .x = -92, .y = 88, .z = 0, .animation = 0, .spritePriority = 21, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55513, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [8] = { .x = 348, .y = 88, .z = 0, .animation = 0, .spritePriority = 22, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55514, [GF_GFX_RES_TYPE_PLTT] = 55514, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [9] = { .x = 88, .y = -40, .z = 0, .animation = 0, .spritePriority = 23, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55515, [GF_GFX_RES_TYPE_PLTT] = 55515, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [10] = { .x = 336, .y = 0, .z = 0, .animation = 0, .spritePriority = 24, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55516, [GF_GFX_RES_TYPE_PLTT] = 55516, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [11] = { .x = -80, .y = 0, .z = 0, .animation = 0, .spritePriority = 25, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55517, [GF_GFX_RES_TYPE_PLTT] = 55517, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [12] = { .x = 93, .y = 110, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55512, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [13] = { .x = 157, .y = 110, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55513, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [14] = { .x = 53, .y = 96, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55514, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [15] = { .x = 197, .y = 96, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55515, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [16] = { .x = 37, .y = 72, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55516, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [17] = { .x = 213, .y = 72, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55517, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [18] = { .x = 128, .y = 128, .z = 0, .animation = 0, .spritePriority = 10, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55519, [GF_GFX_RES_TYPE_PLTT] = 55520, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 }, + [19] = { .x = 125, .y = 120, .z = 0, .animation = 0, .spritePriority = 40, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55519, [GF_GFX_RES_TYPE_PLTT] = 55521, [GF_GFX_RES_TYPE_CELL] = 55512, [GF_GFX_RES_TYPE_ANIM] = 55512, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 3, .vramTransfer = 0 }, + [20] = { .x = 0, .y = 0, .z = 0, .animation = 0, .spritePriority = 0, .pal = 0, .vram = NNS_G2D_VRAM_TYPE_2DMAIN, .resIdList = { [GF_GFX_RES_TYPE_CHAR] = 55520, [GF_GFX_RES_TYPE_PLTT] = 55522, [GF_GFX_RES_TYPE_CELL] = 55515, [GF_GFX_RES_TYPE_ANIM] = 55515, [GF_GFX_RES_TYPE_MCEL] = -1, [GF_GFX_RES_TYPE_MANM] = -1 }, .bgPriority = 2, .vramTransfer = 0 } }; BOOL RegisterHallOfFame_Init(OVY_MANAGER *man, int *state) { @@ -846,13 +846,13 @@ BOOL RegisterHallOfFame_Init(OVY_MANAGER *man, int *state) { CreateHeap(HEAP_ID_3, HEAP_ID_REGISTER_HALL_OF_FAME, 0x50000); RegisterHallOfFameData *data = (RegisterHallOfFameData *)OverlayManager_CreateAndGetData(man, sizeof(RegisterHallOfFameData), HEAP_ID_REGISTER_HALL_OF_FAME); MI_CpuFill8(data, 0, sizeof(RegisterHallOfFameData)); - data->args = OverlayManager_GetArgs(man); - data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0180_bin, HEAP_ID_REGISTER_HALL_OF_FAME); + data->args = OverlayManager_GetArgs(man); + data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0180_bin, HEAP_ID_REGISTER_HALL_OF_FAME); data->msgFormat = MessageFormat_New(HEAP_ID_REGISTER_HALL_OF_FAME); - data->strbuf1 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME); - data->strbuf2 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME); - data->narcA101 = NARC_New(NARC_a_1_0_1, HEAP_ID_REGISTER_HALL_OF_FAME); - data->narcA180 = NARC_New(NARC_a_1_8_0, HEAP_ID_REGISTER_HALL_OF_FAME); + data->strbuf1 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME); + data->strbuf2 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME); + data->narcA101 = NARC_New(NARC_a_1_0_1, HEAP_ID_REGISTER_HALL_OF_FAME); + data->narcA180 = NARC_New(NARC_a_1_8_0, HEAP_ID_REGISTER_HALL_OF_FAME); RegisterHallOfFame_GetPartyDetails(data); RegisterHallOfFame_SetGfxBanks(); RegisterHallOfFame_CreateBgConfig(data); @@ -883,7 +883,7 @@ static RegisterHallOfFameScene (*const sSceneFuncs[8])(RegisterHallOfFameData *d BOOL RegisterHallOfFame_Main(OVY_MANAGER *man, int *state) { RegisterHallOfFameData *data = OverlayManager_GetData(man); - data->currentScene = sSceneFuncs[data->currentScene](data); + data->currentScene = sSceneFuncs[data->currentScene](data); if (data->currentScene == REGHOF_SCENE_MAX) { return TRUE; } @@ -926,11 +926,11 @@ static void RegisterHallOfFame_DestroyBgConfig(RegisterHallOfFameData *data) { } static void RegisterHallOfFame_CreateSpriteGfxHandlers(RegisterHallOfFameData *data) { - data->spriteRenderer = SpriteRenderer_Create(HEAP_ID_REGISTER_HALL_OF_FAME); + data->spriteRenderer = SpriteRenderer_Create(HEAP_ID_REGISTER_HALL_OF_FAME); data->spriteGfxHandler = SpriteRenderer_CreateGfxHandler(data->spriteRenderer); { - OamManagerParam sp2C = ov63_0221FCB8; + OamManagerParam sp2C = ov63_0221FCB8; OamCharTransferParam sp18 = ov63_0221FB30; SpriteRenderer_CreateOamCharPlttManagers(data->spriteRenderer, &sp2C, &sp18, 0x20); } @@ -981,9 +981,9 @@ static RegisterHallOfFameScene RegisterHallOfFame_FadeToBlack(RegisterHallOfFame } static BOOL RegisterHallOfFame_SetupSubproc(RegisterHallOfFameData *data, RegisterHallOfFameSubprocCallback callback, RegisterHallOfFameScene nextScene) { - data->nextScene = nextScene; - data->subprocTimer = 0; - data->subprocStage = 0; + data->nextScene = nextScene; + data->subprocTimer = 0; + data->subprocStage = 0; data->subprocCallback = callback; return TRUE; } @@ -1009,8 +1009,8 @@ static RegisterHallOfFameScene RegisterHallOfFame_IndivMonsInit(RegisterHallOfFa RegisterHallOfFame_IndivMonsScene_InitWindows(data); RegisterHallOfFames_IndivMons_LoadBgGfx(data); data->sceneSubstep = REGHOF_INDIV_SUBSCENE_RESET; - data->curMonIndex = 0; - data->vblankTask = SysTask_CreateOnVBlankQueue(VBlankTask_RegisterHallOfFame_IndividualMonsCongrats, data, 0); + data->curMonIndex = 0; + data->vblankTask = SysTask_CreateOnVBlankQueue(VBlankTask_RegisterHallOfFame_IndividualMonsCongrats, data, 0); return RegisterHallOfFame_FadeFromBlack(data, REGHOF_SCENE_INDIV_MONS_MAIN); } @@ -1065,7 +1065,7 @@ static RegisterHallOfFameScene RegisterHallOfFame_IndivMonsExit(RegisterHallOfFa } static RegisterHallOfFameScene RegisterHallOfFame_WholePartyInit(RegisterHallOfFameData *data) { - data->curMonIndex = 0; + data->curMonIndex = 0; data->sceneSubstep = REGHOF_WHOLE_SUBSCENE_INIT; RegisterHallOfFame_WholePartyScene_InitBGs(data); RegisterHallOfFame_WholePartyScene_LoadBgGfx(data); @@ -1250,15 +1250,15 @@ static void RegisterHallOfFame_SetSilhouettePalette(RegisterHallOfFameData *data } static void RegisterHallOfFame_BackupMonPicPalette(RegisterHallOfFameData *data, int monIdx, int picIdx) { - u32 dest = NNS_G2dGetImagePaletteLocation(Sprite_GetPaletteProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); - u16 *base = GetMainObjPlttAddr(); + u32 dest = NNS_G2dGetImagePaletteLocation(Sprite_GetPaletteProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); + u16 *base = GetMainObjPlttAddr(); RegisterHofMon *mon = &data->mons[monIdx]; MI_CpuCopy8(base + (dest / 2), mon->plttBak, 0x20); } static void RegisterHallOfFame_RestoreMonPicPalette(RegisterHallOfFameData *data, int monIdx, int picIdx) { - u32 dest = NNS_G2dGetImagePaletteLocation(Sprite_GetPaletteProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); + u32 dest = NNS_G2dGetImagePaletteLocation(Sprite_GetPaletteProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); RegisterHofMon *mon = &data->mons[monIdx]; RegisterHallOfFame_ReplaceSpritePltt(mon->plttBak, dest, 0x20); @@ -1344,21 +1344,21 @@ static void RegisterHallOfFame_IndivMonsScene_SetMon3dSpriteTex(RegisterHallOfFa NNSG3dResTex *resTex; void *fileData; const void *texData; - u32 imageLoc = NNS_G2dGetImageLocation(Sprite_GetImageProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); + u32 imageLoc = NNS_G2dGetImageLocation(Sprite_GetImageProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); int spriteSquareDim = hofMon->followPokeParam[1] ? 8 : 4; - u32 size = 32 * spriteSquareDim * spriteSquareDim; - int fileno = RegisterHallOfFame_GetMmodelBySpeciesFormGender(hofMon->species, hofMon->form, hofMon->gender); - fileData = AllocAndReadWholeNarcMemberByIdPair(NARC_data_mmodel_mmodel, fileno, HEAP_ID_REGISTER_HALL_OF_FAME); - resTex = NNS_G3dGetTex(fileData); - texData = NNS_G3dGetTexData(resTex); - void *buffer = AllocFromHeap(HEAP_ID_REGISTER_HALL_OF_FAME, size); + u32 size = 32 * spriteSquareDim * spriteSquareDim; + int fileno = RegisterHallOfFame_GetMmodelBySpeciesFormGender(hofMon->species, hofMon->form, hofMon->gender); + fileData = AllocAndReadWholeNarcMemberByIdPair(NARC_data_mmodel_mmodel, fileno, HEAP_ID_REGISTER_HALL_OF_FAME); + resTex = NNS_G3dGetTex(fileData); + texData = NNS_G3dGetTexData(resTex); + void *buffer = AllocFromHeap(HEAP_ID_REGISTER_HALL_OF_FAME, size); for (u8 i = 0; i < 8; ++i) { sub_020145B4((const u8 *)texData + size * i, spriteSquareDim, 0, 0, spriteSquareDim, spriteSquareDim, buffer); RegisterHallOfFame_ReplaceSpriteChar(buffer, imageLoc + size * i, size); } FreeToHeap(buffer); - u32 plttLoc = NNS_G2dGetImagePaletteLocation(Sprite_GetPaletteProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); + u32 plttLoc = NNS_G2dGetImagePaletteLocation(Sprite_GetPaletteProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); const void *loadPos = NNS_G3dGetPlttData(resTex); if (MonIsShiny(hofMon->mon) == TRUE) { loadPos = (const u8 *)loadPos + 0x20; @@ -1429,10 +1429,10 @@ static void RegisterHallOfFame_IndivMonsScene_RemoveWindows(RegisterHallOfFameDa } static void RegisterHallOfFame_IndivMonsScene_PrintMonDetailsOnWindow(RegisterHallOfFameData *data, u16 monIdx, int windowIdx) { - Window *windows = &data->windows[windowIdx]; + Window *windows = &data->windows[windowIdx]; RegisterHofMon *hofMon = &data->mons[monIdx]; - Pokemon *mon = hofMon->mon; - BoxPokemon *boxmon = Mon_GetBoxMon(mon); + Pokemon *mon = hofMon->mon; + BoxPokemon *boxmon = Mon_GetBoxMon(mon); FillWindowPixelBuffer(&windows[0], 0); ReadMsgDataIntoString(data->msgData, msg_0180_00004, data->strbuf1); @@ -1730,8 +1730,8 @@ static BOOL RegisterHallOfFame_ShowMon_LeftSide(RegisterHallOfFameData *data) { UnkImageStruct_SetSpritePriority(data->monPics[REGHOF_PIC_INDIV_BACK_SHADOW], 3); UnkImageStruct_SetSpritePriority(data->monPics[REGHOF_PIC_INDIV_OWSPRITE], 3); UnkImageStruct_SetSpritePriority(data->monPics[REGHOF_PIC_INDIV_OWSPRITE_SHADOW], 3); - data->unk_13058 = 1.0f; - data->unk_1305C = 1.5f; + data->unk_13058 = 1.0f; + data->unk_1305C = 1.5f; data->subprocTimer = 0; ++data->subprocStage; } else { @@ -1926,8 +1926,8 @@ static BOOL RegisterHallOfFame_ShowMon_RightSide(RegisterHallOfFameData *data) { UnkImageStruct_SetSpritePriority(data->monPics[REGHOF_PIC_INDIV_BACK_SHADOW], 3); UnkImageStruct_SetSpritePriority(data->monPics[REGHOF_PIC_INDIV_OWSPRITE], 3); UnkImageStruct_SetSpritePriority(data->monPics[REGHOF_PIC_INDIV_OWSPRITE_SHADOW], 3); - data->unk_13058 = 1.0f; - data->unk_1305C = 1.5f; + data->unk_13058 = 1.0f; + data->unk_1305C = 1.5f; data->subprocTimer = 0; ++data->subprocStage; } else { @@ -1996,18 +1996,18 @@ static void RegisterHallOfFame_GetPartyDetails(RegisterHallOfFameData *data) { for (i = 0; i < Party_GetCount(data->args->party); ++i) { pokemon = Party_GetMonByIndex(data->args->party, i); - encry = AcquireMonLock(pokemon); + encry = AcquireMonLock(pokemon); if (!GetMonData(pokemon, MON_DATA_IS_EGG, NULL)) { - hofMon = &data->mons[data->numMons]; - hofMon->mon = pokemon; - hofMon->species = GetMonData(pokemon, MON_DATA_SPECIES, NULL); + hofMon = &data->mons[data->numMons]; + hofMon->mon = pokemon; + hofMon->species = GetMonData(pokemon, MON_DATA_SPECIES, NULL); hofMon->personality = GetMonData(pokemon, MON_DATA_PERSONALITY, NULL); - hofMon->form = GetMonData(pokemon, MON_DATA_FORM, NULL); - hofMon->gender = GetMonData(pokemon, MON_DATA_GENDER, NULL); - hofMon->yOffset = GetMonPicHeightBySpeciesGenderForm(hofMon->species, hofMon->gender, 0, hofMon->form, hofMon->personality) + 8; + hofMon->form = GetMonData(pokemon, MON_DATA_FORM, NULL); + hofMon->gender = GetMonData(pokemon, MON_DATA_GENDER, NULL); + hofMon->yOffset = GetMonPicHeightBySpeciesGenderForm(hofMon->species, hofMon->gender, 0, hofMon->form, hofMon->personality) + 8; hofMon->metLocation = GetMonData(pokemon, MON_DATA_MET_LOCATION, NULL); - hofMon->level = GetMonData(pokemon, MON_DATA_LEVEL, NULL); - hofMon->partyIndex = i; + hofMon->level = GetMonData(pokemon, MON_DATA_LEVEL, NULL); + hofMon->partyIndex = i; if (hofMon->species == SPECIES_NIDORAN_F || hofMon->species == SPECIES_NIDORAN_M) { hofMon->printGender = FALSE; } else { @@ -2089,16 +2089,16 @@ static int RegisterHallOfFame_GetMmodelBySpeciesFormGender(int species, u8 form, static void RegisterHallOfFame_CreateTask_IndivMonAnimAndCry(RegisterHallOfFameData *data, int monIdx, int picIdx, BOOL startCry, int facing) { RegisterHofTaskData_IndivMonAnimAndCry *taskData = AllocFromHeap(HEAP_ID_REGISTER_HALL_OF_FAME, sizeof(RegisterHofTaskData_IndivMonAnimAndCry)); - taskData->hofMon = &data->mons[monIdx]; - taskData->startCry = startCry; - taskData->narc = data->narcA180; - taskData->imageLocation = NNS_G2dGetImageLocation(Sprite_GetImageProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); + taskData->hofMon = &data->mons[monIdx]; + taskData->startCry = startCry; + taskData->narc = data->narcA180; + taskData->imageLocation = NNS_G2dGetImageLocation(Sprite_GetImageProxy(data->monPics[picIdx]->sprite), NNS_G2D_VRAM_TYPE_2DMAIN); if (facing == MON_PIC_FACING_FRONT) { - taskData->charbuf = taskData->hofMon->frontspriteCharbuf; + taskData->charbuf = taskData->hofMon->frontspriteCharbuf; taskData->isFrontpic = 1; PokepicAnim_Init(&taskData->anim, taskData->hofMon->frontspriteAnim); } else { - taskData->charbuf = taskData->hofMon->backspriteCharbuf; + taskData->charbuf = taskData->hofMon->backspriteCharbuf; taskData->isFrontpic = 0; PokepicAnim_Init(&taskData->anim, taskData->hofMon->backspriteAnim); } @@ -2146,7 +2146,7 @@ static BOOL RegisterHallOfFame_WholeMonsSceneSubproc(RegisterHallOfFameData *dat UnkImageStruct_SetSpritePositionXY(data->monPics[REGHOF_PIC_WHOLE_TWINKLE], x, y); RegisterHallOfFame_StartPicAnimSeq(data, REGHOF_PIC_WHOLE_TWINKLE, 0); data->generateConfettiDelayLength = LCRandom() % 255 + 28; - data->generateConfettiDelayTimer = 0; + data->generateConfettiDelayTimer = 0; } else { ++data->generateConfettiDelayTimer; } @@ -2184,11 +2184,11 @@ static BOOL RegisterHallOfFame_WholeMonsSceneSubproc(RegisterHallOfFameData *dat } break; case REGHOF_WHOLE_SUBPROC_REQUEST_FIRST_PHOTO_FLASH: - data->fadeDuration = 40; - data->requestPlayFlashKanseiSfx = TRUE; + data->fadeDuration = 40; + data->requestPlayFlashKanseiSfx = TRUE; data->requestBeginSpotlightsAndConfetti = TRUE; - data->scrollingPolkadotBackground = TRUE; - data->generatingConfetti = TRUE; + data->scrollingPolkadotBackground = TRUE; + data->generatingConfetti = TRUE; UnkImageStruct_SetSpriteVisibleFlag(data->monPics[REGHOF_PIC_WHOLE_TWINKLE], TRUE); ++data->subprocStage; break; @@ -2208,7 +2208,7 @@ static BOOL RegisterHallOfFame_WholeMonsSceneSubproc(RegisterHallOfFameData *dat case REGHOF_WHOLE_SUBPROC_WAIT_BUTTON: if (IsPaletteFadeFinished() == TRUE) { if ((gSystem.newKeys & (PAD_BUTTON_A | PAD_BUTTON_B)) || System_GetTouchNew() == TRUE) { - data->fadeDuration = 15; + data->fadeDuration = 15; data->requestPlayFlashKanseiSfx = TRUE; ++data->subprocStage; } @@ -2219,7 +2219,7 @@ static BOOL RegisterHallOfFame_WholeMonsSceneSubproc(RegisterHallOfFameData *dat if (data->subprocTimer == 30) { if (IsPaletteFadeFinished() == TRUE) { data->fadeDuration = 15; - data->unk_13060_4 = TRUE; + data->unk_13060_4 = TRUE; ++data->subprocStage; } } else { @@ -2344,7 +2344,7 @@ static void RegisterHallOfFame_WholePartyScene_CreateSprites(RegisterHallOfFameD UnkStruct_02070D3C sp2C; UnkStruct_02014E30 sp1C = ov63_0221FAF0; - NARC *narc = NARC_New(NARC_a_0_0_8, HEAP_ID_REGISTER_HALL_OF_FAME); + NARC *narc = NARC_New(NARC_a_0_0_8, HEAP_ID_REGISTER_HALL_OF_FAME); u32 i; int tag; void *r4; @@ -2367,7 +2367,7 @@ static void RegisterHallOfFame_WholePartyScene_CreateSprites(RegisterHallOfFameD SpriteRenderer_LoadPlttResObjFromOpenNarc(data->spriteRenderer, data->spriteGfxHandler, data->narcA101, 19, FALSE, 1, NNS_G2D_VRAM_TYPE_2DMAIN, 55522); for (i = 0; i < 6; ++i) { - data->monPics[REGHOF_PIC_WHOLE_MON + i] = SpriteRenderer_LoadResourcesAndCreateSprite(data->spriteRenderer, data->spriteGfxHandler, &(sPicTemplates + 6)[i]); + data->monPics[REGHOF_PIC_WHOLE_MON + i] = SpriteRenderer_LoadResourcesAndCreateSprite(data->spriteRenderer, data->spriteGfxHandler, &(sPicTemplates + 6)[i]); data->monPics[REGHOF_PIC_WHOLE_MON_SHADOW + i] = SpriteRenderer_LoadResourcesAndCreateSprite(data->spriteRenderer, data->spriteGfxHandler, &(sPicTemplates + 6)[i + 6]); if (i < data->numMons) { RegisterHallOfFame_IndivMonsScene_SetPicGfxAndPltt(data, &data->mons[i], 2, REGHOF_PIC_WHOLE_MON + i); @@ -2382,7 +2382,7 @@ static void RegisterHallOfFame_WholePartyScene_CreateSprites(RegisterHallOfFameD sub_0200E0FC(data->monPics[REGHOF_PIC_WHOLE_MON_SHADOW + i], GX_OAM_MODE_XLU); UnkImageStruct_SetSpriteVisibleFlag(data->monPics[REGHOF_PIC_WHOLE_MON_SHADOW + i], FALSE); } - data->monPics[REGHOF_PIC_WHOLE_PLAYER] = SpriteRenderer_LoadResourcesAndCreateSprite(data->spriteRenderer, data->spriteGfxHandler, &sPicTemplates[18]); + data->monPics[REGHOF_PIC_WHOLE_PLAYER] = SpriteRenderer_LoadResourcesAndCreateSprite(data->spriteRenderer, data->spriteGfxHandler, &sPicTemplates[18]); data->monPics[REGHOF_PIC_WHOLE_PLAYER_SHADOW] = SpriteRenderer_LoadResourcesAndCreateSprite(data->spriteRenderer, data->spriteGfxHandler, &sPicTemplates[19]); sub_0200DF98(data->monPics[REGHOF_PIC_WHOLE_PLAYER], 1); sub_0200DF98(data->monPics[REGHOF_PIC_WHOLE_PLAYER_SHADOW], 1); @@ -2478,11 +2478,11 @@ static void RegisterHallOfFame_G3Commit(RegisterHallOfFameData *data) { static SysTask *RegisterHallOfFame_CreateSpotlightController(RegisterHallOfFameData *data) { RegisterHofSpotlightTaskData *spotlight = AllocFromHeap(HEAP_ID_REGISTER_HALL_OF_FAME, sizeof(RegisterHofSpotlightTaskData)); - sSpotlightsActive = TRUE; - sNumSpotlightTasks = 2; - spotlight->numSpotlights = 0; - spotlight->endMakeDLTask = SysTask_CreateOnVBlankQueue(Task_RegisterHallOfFame_Spotlights_EndMakeDL, spotlight, 3); - spotlight->parent = data; + sSpotlightsActive = TRUE; + sNumSpotlightTasks = 2; + spotlight->numSpotlights = 0; + spotlight->endMakeDLTask = SysTask_CreateOnVBlankQueue(Task_RegisterHallOfFame_Spotlights_EndMakeDL, spotlight, 3); + spotlight->parent = data; return SysTask_CreateOnVBlankQueue(Task_RegisterHallOfFame_Spotlights_BeginMakeDL, spotlight, 1); } @@ -2522,13 +2522,13 @@ static void RegisterHallOfFame_AddSpotlight(SysTask *task, int xOffset, fx32 ang static SysTask *RegisterHallOfFame_CreateSpotlightTaskEx(RegisterHofSpotlightTaskData *spotlight, int xOffset, fx32 angle, int index) { RegisterHofSpotlightChildTaskData *child = AllocFromHeap(HEAP_ID_REGISTER_HALL_OF_FAME, sizeof(RegisterHofSpotlightChildTaskData)); - child->parent = spotlight; - child->xOffset = xOffset; - child->color = sSpotlightColors[index]; - child->unused_804 = 0; - child->angle = angle; - child->speed = 2 * sSpotlightSpeeds[index]; // UB warning: can index past end of array - child->polygonId = index; + child->parent = spotlight; + child->xOffset = xOffset; + child->color = sSpotlightColors[index]; + child->unused_804 = 0; + child->angle = angle; + child->speed = 2 * sSpotlightSpeeds[index]; // UB warning: can index past end of array + child->polygonId = index; SetVec(child->vertices[0], xOffset - 80, FX16_CONST(-1), 0); SetVec(child->vertices[1], xOffset + 80, FX16_CONST(-1), 0); return SysTask_CreateOnVBlankQueue(Task_RegisterHallOfFame_SpotlightInstance, child, 2); @@ -2549,7 +2549,7 @@ static void Task_RegisterHallOfFame_SpotlightInstance(SysTask *task, void *taskD } } - s32 r6 = child->angle >> FX32_SHIFT; + s32 r6 = child->angle >> FX32_SHIFT; fx32 cosVal = child->xOffset + FX_Mul(GF_CosDegNoWrap(r6), FX32_CONST(2.5)); fx32 sinVal = -FX32_ONE + FX_Mul(GF_SinDegNoWrap(r6), FX32_CONST(2.5)); @@ -2630,9 +2630,9 @@ static SysTask *RegisterHallOfFame_CreateConfettiTask(RegisterHallOfFameData *da } SetLCRNGSeed(rand); - confetti->active = FALSE; + confetti->active = FALSE; confetti->requestPushGxCommand = FALSE; - confetti->unk_8D20 = FALSE; + confetti->unk_8D20 = FALSE; G3_MtxMode(GX_MTXMODE_POSITION_VECTOR); return SysTask_CreateOnMainQueue(Task_RegisterHallOfFame_Confetti, confetti, 0); } @@ -2647,7 +2647,7 @@ static void RegisterHallOfFame_EndConfetti(SysTask *task) { static void RegisterHallOfFame_StartConfetti(SysTask *task) { if (task != NULL) { RegisterHofConfettiEmitterTaskData *confetti = (RegisterHofConfettiEmitterTaskData *)SysTask_GetData(task); - confetti->active = TRUE; + confetti->active = TRUE; } } diff --git a/src/render_text.c b/src/render_text.c index c2b01c9fd4..f008caca06 100644 --- a/src/render_text.c +++ b/src/render_text.c @@ -97,7 +97,7 @@ RenderResult RenderText(TextPrinter *printer) { if (sTextFlags.canABSpeedUpPrint != 0) { if (TextPrinter_ContinueInputNew()) { subStruct->hasPrintBeenSpedUp = 1; - printer->delayCounter = 0; + printer->delayCounter = 0; } } @@ -105,7 +105,7 @@ RenderResult RenderText(TextPrinter *printer) { } printer->delayCounter = printer->textSpeedBottom; - currentChar = *printer->template.currentChar.raw; + currentChar = *printer->template.currentChar.raw; printer->template.currentChar.raw++; GF_ASSERT(currentChar != 0xF100); @@ -115,7 +115,7 @@ RenderResult RenderText(TextPrinter *printer) { return RENDER_FINISH; case CHAR_LF: printer->template.currentX = printer->template.x; - s32 fontAttribute = GetFontAttribute(printer->template.fontId, 1); + s32 fontAttribute = GetFontAttribute(printer->template.fontId, 1); printer->template.currentY += printer->template.lineSpacing + fontAttribute; @@ -131,7 +131,7 @@ RenderResult RenderText(TextPrinter *printer) { u16 field = MsgArray_ControlCodeGetField( printer->template.currentChar.raw, 0); if (field == 0xff) { - u8 r2 = printer->template.unk1B; + u8 r2 = printer->template.unk1B; printer->template.unk1B = ((printer->template.fgColor - 1) / 2 + 100); if (r2 < 100 || r2 >= 107) { @@ -146,7 +146,7 @@ RenderResult RenderText(TextPrinter *printer) { } } - printer->template.fgColor = (field * 2 + 1); + printer->template.fgColor = (field * 2 + 1); printer->template.shadowColor = (field * 2 + 2); GenerateFontHalfRowLookupTable(printer->template.fgColor, @@ -188,7 +188,7 @@ RenderResult RenderText(TextPrinter *printer) { printer->delayCounter = MsgArray_ControlCodeGetField( printer->template.currentChar.raw, 0); printer->template.currentChar.raw = MsgArray_SkipControlCode(printer->template.currentChar.raw); - printer->state = 6; + printer->state = 6; return RENDER_UPDATE; case 0x202: @@ -206,7 +206,7 @@ RenderResult RenderText(TextPrinter *printer) { printer->template.currentChar.raw, 0); break; case 0x205: { - int x = GetWindowWidth(printer->template.window) * 8; + int x = GetWindowWidth(printer->template.window) * 8; int width = FontID_FlatArray_GetWidthFirstLine(printer->template.fontId, printer->template.currentChar.raw, printer->template.letterSpacing); if (width < x) { printer->template.currentX = printer->template.x + (x - width) / 2; @@ -215,7 +215,7 @@ RenderResult RenderText(TextPrinter *printer) { } } break; case 0x206: { - int x = GetWindowWidth(printer->template.window) * 8; + int x = GetWindowWidth(printer->template.window) * 8; int width = FontID_FlatArray_GetWidthFirstLine(printer->template.fontId, printer->template.currentChar.raw, printer->template.letterSpacing); if (width < x) { printer->template.currentX = x - width; @@ -231,11 +231,11 @@ RenderResult RenderText(TextPrinter *printer) { switch (field) { case 100: printer->template.glyphTable = 0; - printer->template.unk1A = 0; + printer->template.unk1A = 0; break; case 200: printer->template.glyphTable = 0xFFFC; - printer->template.unk1A = 0; + printer->template.unk1A = 0; break; } @@ -305,16 +305,16 @@ RenderResult RenderText(TextPrinter *printer) { printer->template.window, printer->template.bgColor); printer->template.currentX = printer->template.x; printer->template.currentY = printer->template.y; - printer->state = 0; + printer->state = 0; } return RENDER_UPDATE; case 3: if (TextPrinter_WaitWithDownArrow(printer) != 0) { TextPrinter_ClearDownArrow(printer); - printer->scrollDistance = (GetFontAttribute(printer->template.fontId, 1) + printer->template.lineSpacing); + printer->scrollDistance = (GetFontAttribute(printer->template.fontId, 1) + printer->template.lineSpacing); printer->template.currentX = printer->template.x; - printer->state = 4; + printer->state = 4; } return RENDER_UPDATE; @@ -359,15 +359,15 @@ RenderResult RenderText(TextPrinter *printer) { FillWindowPixelBuffer(printer->template.window, printer->template.bgColor); printer->template.currentX = printer->template.x; printer->template.currentY = printer->template.y; - printer->state = 0; + printer->state = 0; } return RENDER_UPDATE; case 8: if (TextPrinter_WaitWithDownArrow(printer)) { TextPrinter_ClearDownArrow(printer); - printer->scrollDistance = printer->template.lineSpacing + GetFontAttribute(printer->template.fontId, 1); + printer->scrollDistance = printer->template.lineSpacing + GetFontAttribute(printer->template.fontId, 1); printer->template.currentX = printer->template.x; - printer->state = 4; + printer->state = 4; } return RENDER_UPDATE; } @@ -386,7 +386,7 @@ static void TextPrinter_InitDownArrowCounters(TextPrinter *printer) { subStruct->autoScrollDelay = 0; } else { subStruct->downArrowYPosIdx = 0; - subStruct->downArrowDelay = 0; + subStruct->downArrowDelay = 0; } sub_0200EB68(printer->template.window, sDownArrowBaseTile); } @@ -404,11 +404,11 @@ static void TextPrinter_DrawDownArrow(TextPrinter *printer) { return; } - u8 bg_id = GetWindowBgId(printer->template.window); - u8 x = GetWindowX(printer->template.window); - u8 y = GetWindowY(printer->template.window); - u8 width = GetWindowWidth(printer->template.window); - u8 height = GetWindowHeight(printer->template.window) - 2; + u8 bg_id = GetWindowBgId(printer->template.window); + u8 x = GetWindowX(printer->template.window); + u8 y = GetWindowY(printer->template.window); + u8 width = GetWindowWidth(printer->template.window); + u8 height = GetWindowHeight(printer->template.window) - 2; u16 baseTile = sDownArrowBaseTile; FillBgTilemapRect(printer->template.window->bgConfig, @@ -455,11 +455,11 @@ static void TextPrinter_ClearDownArrow(TextPrinter *printer) { return; } - u8 bg_id = GetWindowBgId(printer->template.window); - u8 x = GetWindowX(printer->template.window); - u8 y = GetWindowY(printer->template.window); - u8 width = GetWindowWidth(printer->template.window); - u8 height = GetWindowHeight(printer->template.window) - 2; + u8 bg_id = GetWindowBgId(printer->template.window); + u8 x = GetWindowX(printer->template.window); + u8 y = GetWindowY(printer->template.window); + u8 width = GetWindowWidth(printer->template.window); + u8 height = GetWindowHeight(printer->template.window) - 2; u16 baseTile = sDownArrowBaseTile; FillBgTilemapRect(printer->template.window->bgConfig, @@ -531,7 +531,7 @@ void TextFlags_SetCanABSpeedUpPrint(BOOL param0) { } void TextFlags_SetAutoScrollParam(int param0) { - sTextFlags.autoScroll = param0 & 1; + sTextFlags.autoScroll = param0 & 1; sTextFlags.autoScrollCanSpeedUp = (param0 >> 1) & 1; } @@ -569,15 +569,15 @@ BOOL TextFlags_GetIsTouchSpeedingUpPrint(void) { void TextFlags_SetFastForwardTouchButtonHitbox(const TouchscreenHitbox *hitbox) { sTextFlags.touchHitboxActive = TRUE; - sTouchScreenHitbox = *hitbox; + sTouchScreenHitbox = *hitbox; } void TextFlags_UnsetFastForwardTouchButtonHitbox(void) { - sTextFlags.touchHitboxActive = FALSE; - sTouchScreenHitbox.rect.top = 0; + sTextFlags.touchHitboxActive = FALSE; + sTouchScreenHitbox.rect.top = 0; sTouchScreenHitbox.rect.bottom = 192; - sTouchScreenHitbox.rect.left = 0; - sTouchScreenHitbox.rect.right = 255; + sTouchScreenHitbox.rect.left = 0; + sTouchScreenHitbox.rect.right = 255; } void TextFlags_BeginAutoScroll(BOOL noSpeedUp) { diff --git a/src/ribbon.c b/src/ribbon.c index c4c084643f..a830ff9c6d 100644 --- a/src/ribbon.c +++ b/src/ribbon.c @@ -15,7 +15,7 @@ #define RIBBON_DESC_SPECIAL_SIZE 1 // if sp == FALSE, id is a gmm id. if sp == TRUE, id points to a special ribbon -#define RIBBON_DESC(sp, id) ( \ +#define RIBBON_DESC(sp, id) ( \ ((id) << RIBBON_DESC_ID_SHIFT) | ((sp) << RIBBON_DESC_SPECIAL_SHIFT)) struct RibbonData { diff --git a/src/roamer.c b/src/roamer.c index 2b3f0f83ce..58cf7af8ea 100644 --- a/src/roamer.c +++ b/src/roamer.c @@ -12,11 +12,11 @@ u32 Save_Roamers_sizeof(void) { void Save_Roamers_Init(RoamerSaveData *roamer) { memset(roamer, 0, sizeof(RoamerSaveData)); - roamer->rand[0] = MTRandom(); - roamer->rand[1] = MTRandom(); - roamer->outbreak = FALSE; - roamer->repelSteps = 0; - roamer->unk_66 = 0; + roamer->rand[0] = MTRandom(); + roamer->rand[1] = MTRandom(); + roamer->outbreak = FALSE; + roamer->repelSteps = 0; + roamer->unk_66 = 0; roamer->flutePlayed = 0; } @@ -43,7 +43,7 @@ RoamerSaveData *Save_Roamers_Get(SaveData *saveData) { void RoamerSave_SetOutbreakActive(SaveData *saveData) { RoamerSaveData *roamer = Save_Roamers_Get(saveData); - roamer->outbreak = TRUE; + roamer->outbreak = TRUE; } u8 RoamerSave_OutbreakActive(RoamerSaveData *roamerSave) { diff --git a/src/safari_zone.c b/src/safari_zone.c index 79442fc960..2b9a97a1dc 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -150,7 +150,7 @@ void sub_0202F784(SafariZone *safari_zone, IGT *igt) { u32 sub_0202F798(SafariZone *safari_zone, IGT *igt, s32 a2) { u16 minutes = (igt->hours * 60) + igt->minutes; - s32 delta = minutes - safari_zone->unk5FA; + s32 delta = minutes - safari_zone->unk5FA; if (delta >= a2 * 60) { return 1; @@ -165,10 +165,10 @@ u32 sub_0202F798(SafariZone *safari_zone, IGT *igt, s32 a2) { void SafariZone_SetLinkLeaderFromProfile(SafariZone *safari_zone, PlayerProfile *profile, HeapID heapId) { SAFARIZONE_LINKLEADER *link_leader = &safari_zone->link_leader; - link_leader->id = PlayerProfile_GetTrainerID(profile); - link_leader->gender = PlayerProfile_GetTrainerGender(profile); - link_leader->language = PlayerProfile_GetLanguage(profile); - link_leader->version = PlayerProfile_GetVersion(profile); + link_leader->id = PlayerProfile_GetTrainerID(profile); + link_leader->gender = PlayerProfile_GetTrainerGender(profile); + link_leader->language = PlayerProfile_GetLanguage(profile); + link_leader->version = PlayerProfile_GetVersion(profile); String *name = String_New((PLAYER_NAME_LENGTH + 1) * sizeof(u16), heapId); PlayerName_FlatToString(profile, name); @@ -178,7 +178,7 @@ void SafariZone_SetLinkLeaderFromProfile(SafariZone *safari_zone, PlayerProfile link_leader->linked = TRUE; link_leader->received_timestamp = GF_RTC_DateTimeToSec(); - link_leader->rtc_offset = OS_GetOwnerRtcOffset(); + link_leader->rtc_offset = OS_GetOwnerRtcOffset(); } void SafariZone_GetLinkLeaderToProfile(SafariZone *safari_zone, PlayerProfile *profile) { @@ -217,8 +217,8 @@ void SafariZone_DeactivateLinkIfExpired(SafariZone *safari_zone) { } void SafariZone_SwapAreasInSet(SAFARIZONE_AREASET *area_set, u32 first, u32 second) { - SAFARIZONE_AREA tmp = area_set->areas[first]; - area_set->areas[first] = area_set->areas[second]; + SAFARIZONE_AREA tmp = area_set->areas[first]; + area_set->areas[first] = area_set->areas[second]; area_set->areas[second] = tmp; } @@ -282,10 +282,10 @@ void SafariZone_ClearObject(SAFARIZONE_OBJECT *object) { void SafariZone_ClearLeader(SAFARIZONE_LINKLEADER *link_leader) { MI_CpuClear8(link_leader, sizeof(SAFARIZONE_LINKLEADER)); - link_leader->id = 0; - link_leader->gender = 0; + link_leader->id = 0; + link_leader->gender = 0; link_leader->language = gGameLanguage; - link_leader->version = gGameVersion; + link_leader->version = gGameVersion; StringFillEOS(link_leader->name, PLAYER_NAME_LENGTH + 1); } diff --git a/src/sav_chatot.c b/src/sav_chatot.c index b019ce60e0..012cfb89bb 100644 --- a/src/sav_chatot.c +++ b/src/sav_chatot.c @@ -46,11 +46,11 @@ void Chatot_Decode(s8 *dest, const s8 *data) { s8 val2; for (dest_i = 0, i = 0; i < 1000; i++, dest_i += 2) { - val = (u8)(data[i] & 0xf); - val2 = transform(val); + val = (u8)(data[i] & 0xf); + val2 = transform(val); dest[dest_i + 0] = (s8)(val2 << 4); - val = (u8)(data[i] >> 4); - val2 = transform(val); + val = (u8)(data[i] >> 4); + val2 = transform(val); dest[dest_i + 1] = (s8)(val2 << 4); } } @@ -68,11 +68,11 @@ void Chatot_Encode(SOUND_CHATOT *chatot, const s8 *data) { chatot->exists = TRUE; for (src_i = 0; src_i < 2000; src_i += 2) { - val = data[src_i + 0]; - val2 = untransform(val); + val = data[src_i + 0]; + val2 = untransform(val); chatot->data[i] = (s8)val2; - val = data[src_i + 1]; + val = data[src_i + 1]; val2 = untransform(val); chatot->data[i] |= val2 << 4; diff --git a/src/sav_system_info.c b/src/sav_system_info.c index e5082bb1d1..723f8948b5 100644 --- a/src/sav_system_info.c +++ b/src/sav_system_info.c @@ -33,7 +33,7 @@ void Save_SysInfo_InitFromSystem(SysInfo *sys_info) { OS_GetMacAddress(sys_info->mac_address); OS_GetOwnerInfo(&owner_info); sys_info->birth_month = owner_info.birthday.month; - sys_info->birth_day = owner_info.birthday.day; + sys_info->birth_day = owner_info.birthday.day; } BOOL Save_SysInfo_MacAddressIsMine(SysInfo *sys_info) { @@ -82,10 +82,10 @@ void Save_SysInfo_SetField4C(SysInfo *sys_info, void *a1) { void Save_SysInfo_RTC_Init(SysInfo_RTC *rtc_info) { rtc_info->initialized = TRUE; GF_RTC_CopyDateTime(&rtc_info->date, &rtc_info->time); - rtc_info->days_since_nitro_epoch = RTC_ConvertDateToDay(&rtc_info->date); + rtc_info->days_since_nitro_epoch = RTC_ConvertDateToDay(&rtc_info->date); rtc_info->seconds_since_nitro_epoch = RTC_ConvertDateTimeToSecond(&rtc_info->date, &rtc_info->time); - rtc_info->seconds_at_game_clear = 0; - rtc_info->unk34 = 0; + rtc_info->seconds_at_game_clear = 0; + rtc_info->unk34 = 0; } BOOL sub_02028E1C(SysInfo_RTC *rtc_info) { diff --git a/src/save.c b/src/save.c index 837cc0b84b..b4deb0ed35 100644 --- a/src/save.c +++ b/src/save.c @@ -75,23 +75,23 @@ SaveData *SaveData_New(void) { MI_CpuClearFast(ret, sizeof(SaveData)); sSaveDataPtr = ret; - ret->flashChipDetected = SaveDetectFlash(); - ret->saveFileExists = FALSE; - ret->isNewGame = TRUE; + ret->flashChipDetected = SaveDetectFlash(); + ret->saveFileExists = FALSE; + ret->isNewGame = TRUE; ret->sectorCleanFlag[0] = 1; ret->sectorCleanFlag[1] = 1; SaveData_InitSubstructs(ret->arrayHeaders); SaveData_InitSlotSpecs(ret->saveSlotSpecs, ret->arrayHeaders); - status = Save_GetSaveFilesStatus(ret); + status = Save_GetSaveFilesStatus(ret); ret->statusFlags = 0; switch (status) { case LOAD_STATUS_IS_GOOD: case LOAD_STATUS_SLOT_FAIL: Save_LoadDynamicRegion(ret); ret->saveFileExists = TRUE; - ret->isNewGame = FALSE; + ret->isNewGame = FALSE; if (status == LOAD_STATUS_SLOT_FAIL) { ret->statusFlags |= 1; } else { @@ -165,7 +165,7 @@ BOOL SaveData_TryLoadOnContinue(SaveData *saveData) { } if (Save_LoadDynamicRegion(saveData)) { saveData->saveFileExists = TRUE; - saveData->isNewGame = FALSE; + saveData->isNewGame = FALSE; Save_CheckFrontierData(saveData, &sp4, &sp0); Save_ResetPCBoxModifiedFlags(saveData); return TRUE; @@ -190,7 +190,7 @@ int SaveGameNormal(SaveData *saveData) { ret = _NowWriteFlash(saveData); if (ret == WRITE_STATUS_SUCCESS) { saveData->saveFileExists = TRUE; - saveData->isNewGame = FALSE; + saveData->isNewGame = FALSE; } return ret; } @@ -209,7 +209,7 @@ int Save_NowWriteFile_AfterMGInit(SaveData *saveData, int a1) { } void Save_InitDynamicRegion(SaveData *saveData) { - saveData->isNewGame = TRUE; + saveData->isNewGame = TRUE; saveData->sectorCleanFlag[0] = 1; saveData->sectorCleanFlag[1] = 1; Save_InitDynamicRegion_Internal(saveData->dynamic_region, saveData->arrayHeaders); @@ -321,7 +321,7 @@ static struct SaveChunkFooter *GetSaveSectorFooterPtr(SaveData *saveData, void * struct SaveSlotSpec *spec; spec = &saveData->saveSlotSpecs[idx]; - ret = (u8 *)data + spec->offset; + ret = (u8 *)data + spec->offset; GF_ASSERT(spec->size != 0); return (struct SaveChunkFooter *)(ret + spec->size - sizeof(struct SaveChunkFooter)); } @@ -331,7 +331,7 @@ static BOOL ValidateSaveSectorFooter(SaveData *saveData, void *data, int idx) { struct SaveChunkFooter *footer; u32 offset; - spec = &saveData->saveSlotSpecs[idx]; + spec = &saveData->saveSlotSpecs[idx]; footer = GetSaveSectorFooterPtr(saveData, data, idx); offset = spec->offset; SaveFooterDebugPrn(footer); @@ -350,7 +350,7 @@ static BOOL ValidateSaveSectorFooter(SaveData *saveData, void *data, int idx) { static void SaveSlotCheck_InitFromSavedat(struct SaveSlotCheck *check, SaveData *saveData, void *data, int idx) { struct SaveChunkFooter *footer; - footer = GetSaveSectorFooterPtr(saveData, data, idx); + footer = GetSaveSectorFooterPtr(saveData, data, idx); check->valid = ValidateSaveSectorFooter(saveData, data, idx); if (check->valid) { check->count = footer->count; @@ -364,14 +364,14 @@ static void SaveSlot_BuildFooter(SaveData *saveData, void *data, int idx) { struct SaveChunkFooter *footer; u32 offset; - spec = &saveData->saveSlotSpecs[idx]; - footer = GetSaveSectorFooterPtr(saveData, data, idx); - offset = spec->offset; + spec = &saveData->saveSlotSpecs[idx]; + footer = GetSaveSectorFooterPtr(saveData, data, idx); + offset = spec->offset; footer->count = saveData->saveCounter; - footer->size = spec->size; + footer->size = spec->size; footer->magic = SAVE_CHUNK_MAGIC; - footer->slot = idx; - footer->crc = SaveArray_CalcCRC16MinusFooter(saveData, (u8 *)data + offset, spec->size); + footer->slot = idx; + footer->crc = SaveArray_CalcCRC16MinusFooter(saveData, (u8 *)data + offset, spec->size); SaveFooterDebugPrn(footer); } @@ -422,7 +422,7 @@ static u32 SaveSlotCheckCompare(struct SaveSlotCheck *first, struct SaveSlotChec static void Save_RecordWhichLatestGoodSector(SaveData *saveData, struct SaveSlotCheck *checks_main, struct SaveSlotCheck *checks_sub, int idx) { #pragma unused(checks_sub) - saveData->saveCounter = checks_main[idx].count; + saveData->saveCounter = checks_main[idx].count; saveData->lastGoodSector = idx; } @@ -463,7 +463,7 @@ static int Save_GetSaveFilesStatus(SaveData *saveData) { numGood_main = SaveSlotCheckCompare(&checks_main[0], &checks_main[1], &newer_main, &older_main); __older_main = older_main; __newer_main = newer_main; - numGood_sub = SaveSlotCheckCompare(&checks_sub[0], &checks_sub[1], &newer_sub, &older_sub); + numGood_sub = SaveSlotCheckCompare(&checks_sub[0], &checks_sub[1], &newer_sub, &older_sub); DebugPrn_MirrorValid(checks_main[0].valid); DebugPrn_MirrorValid(checks_main[1].valid); @@ -534,7 +534,7 @@ static void Save_CheckFrontierData(SaveData *saveData, int *err1, int *err2) { u8 sp04; int i; - misc = Save_Misc_Get(saveData); + misc = Save_Misc_Get(saveData); *err1 = 1; *err2 = 1; if (Save_CheckExtraChunksExist(saveData)) { @@ -585,8 +585,8 @@ static BOOL Save_LoadDynamicRegion(SaveData *saveData) { for (i = 0; i < SAVE_BLOCK_NUM; i++) { saveData->arrayHeaders[i].crc = GF_CalcCRC16(SaveArray_Get(saveData, i), saveData->arrayHeaders[i].size); } - pc_offs = saveData->saveSlotSpecs[1].offset; - pc_size = PCStorage_GetSizeOfBox() * PCStorage_GetNumBoxes(); + pc_offs = saveData->saveSlotSpecs[1].offset; + pc_size = PCStorage_GetSizeOfBox() * PCStorage_GetNumBoxes(); saveData->pcStorageLastCRC = GF_CalcCRC16(data + pc_offs, pc_size); Save_Frontier_Load(saveData); sub_0202C6FC(saveData); @@ -615,15 +615,15 @@ static void Save_WriteManInit(SaveData *saveData, struct AsyncWriteManager *writ sub_0202C714(saveData); Save_Frontier_Commit(saveData); - writeMan->state = 0; - writeMan->state_sub = 0; + writeMan->state = 0; + writeMan->state_sub = 0; writeMan->rollbackCounter = 0; - writeMan->waitingAsync = FALSE; + writeMan->waitingAsync = FALSE; writeMan->rollbackCounter = 1; - writeMan->count = saveData->saveCounter; + writeMan->count = saveData->saveCounter; saveData->saveCounter++; - writeMan->unk_4 = 0; - writeMan->curSector = 0; + writeMan->unk_4 = 0; + writeMan->curSector = 0; writeMan->numSectors = 2; Sys_SetSleepDisableFlag(1); } @@ -632,7 +632,7 @@ static int HandleWriteSaveAsync_NormalData(SaveData *saveData, struct AsyncWrite BOOL result; switch (writeMan->state) { case 0: - writeMan->lockId = Save_WriteSlotAsync(saveData, writeMan->curSector, saveData->lastGoodSector == 0); + writeMan->lockId = Save_WriteSlotAsync(saveData, writeMan->curSector, saveData->lastGoodSector == 0); writeMan->waitingAsync = TRUE; writeMan->state++; // fallthrough @@ -650,7 +650,7 @@ static int HandleWriteSaveAsync_NormalData(SaveData *saveData, struct AsyncWrite } // fallthrough case 2: - writeMan->lockId = Save_WriteChunkFooterAsync(saveData, writeMan->curSector, saveData->lastGoodSector == 0); + writeMan->lockId = Save_WriteChunkFooterAsync(saveData, writeMan->curSector, saveData->lastGoodSector == 0); writeMan->waitingAsync = TRUE; writeMan->state++; // fallthrough @@ -673,7 +673,7 @@ static int HandleWriteSaveAsync_NormalData(SaveData *saveData, struct AsyncWrite static void Save_WriteManFinish(SaveData *saveData, struct AsyncWriteManager *writeMan, int a2) { saveData->numModifiedBoxes = 0; - saveData->nextBoxToWrite = 0; + saveData->nextBoxToWrite = 0; if (a2 == 3) { if (writeMan->rollbackCounter) { saveData->saveCounter = writeMan->count; @@ -683,9 +683,9 @@ static void Save_WriteManFinish(SaveData *saveData, struct AsyncWriteManager *wr saveData->pcStorageLastCRC = saveData->pcStorageCRC; Save_ResetPCBoxModifiedFlags(saveData); saveData->sectorCleanFlag[saveData->lastGoodSector == 0] = 0; - saveData->lastGoodSector = saveData->lastGoodSector == 0; - saveData->saveFileExists = TRUE; - saveData->isNewGame = FALSE; + saveData->lastGoodSector = saveData->lastGoodSector == 0; + saveData->saveFileExists = TRUE; + saveData->isNewGame = FALSE; } Sys_ClearSleepDisableFlag(1); } @@ -746,16 +746,16 @@ static void SaveData_InitSubstructs(struct SaveArrayHeader *arr_hdr) { const struct SaveChunkHeader *hdr; int adrs; - hdr = gSaveChunkHeaders; + hdr = gSaveChunkHeaders; adrs = 0; GF_ASSERT(gNumSaveChunkHeaders == SAVE_BLOCK_NUM); for (i = 0; i < gNumSaveChunkHeaders; i++) { GF_ASSERT(i == hdr[i].id); - arr_hdr[i].id = hdr[i].id; - arr_hdr[i].size = GetSaveChunkSizePlusCRC(i); + arr_hdr[i].id = hdr[i].id; + arr_hdr[i].size = GetSaveChunkSizePlusCRC(i); arr_hdr[i].offset = adrs; - arr_hdr[i].crc = 0; - arr_hdr[i].slot = hdr[i].block; + arr_hdr[i].crc = 0; + arr_hdr[i].slot = hdr[i].block; adrs += arr_hdr[i].size; if (i == gNumSaveChunkHeaders - 1 || hdr[i].block != hdr[i + 1].block) { adrs += sizeof(struct SaveChunkFooter); @@ -774,18 +774,18 @@ static void SaveData_InitSlotSpecs(struct SaveSlotSpec *slotSpecs, struct SaveAr int j; npage = 0; - adrs = 0; - j = 0; + adrs = 0; + j = 0; for (i = 0; i < 2; i++) { - slotSpecs[i].id = i; + slotSpecs[i].id = i; slotSpecs[i].size = 0; for (; i == headers[j].slot && j < gNumSaveChunkHeaders; j++) { slotSpecs[i].size += headers[j].size; } slotSpecs[i].size += sizeof(struct SaveChunkFooter); slotSpecs[i].firstPage = npage; - slotSpecs[i].offset = adrs; - slotSpecs[i].numPages = (slotSpecs[i].size + SAVE_SECTOR_SIZE - 1) / SAVE_SECTOR_SIZE; + slotSpecs[i].offset = adrs; + slotSpecs[i].numPages = (slotSpecs[i].size + SAVE_SECTOR_SIZE - 1) / SAVE_SECTOR_SIZE; npage += slotSpecs[i].numPages; adrs += slotSpecs[i].size; if (adrs % 0x100 != 0) { @@ -806,7 +806,7 @@ static void Save_InitDynamicRegion_Internal(u8 *dynamic_region, struct SaveArray MI_CpuClearFast(dynamic_region, SAVE_PAGE_MAX * SAVE_SECTOR_SIZE); for (i = 0; i < gNumSaveChunkHeaders; i++) { adrs = headers[i].offset; - ptr = dynamic_region + adrs; + ptr = dynamic_region + adrs; MI_CpuClearFast(ptr, headers[i].size); chunkHeaders[i].initFunc(ptr); } @@ -842,11 +842,11 @@ static void CreateChunkFooter(SaveData *saveData, void *data, int idx, u32 size) footer = (struct SaveArrayFooter *)((u8 *)data + size); - footer->magic = SAVE_CHUNK_MAGIC; + footer->magic = SAVE_CHUNK_MAGIC; footer->saveno = saveData->lastGoodSaveNo + 1; - footer->size = size; - footer->idx = idx; - footer->crc = GF_CalcCRC16(data, size + offsetof(struct SaveArrayFooter, crc)); + footer->size = size; + footer->idx = idx; + footer->crc = GF_CalcCRC16(data, size + offsetof(struct SaveArrayFooter, crc)); } static BOOL ValidateChunk(SaveData *saveData, void *data, int idx, u32 size) { @@ -961,43 +961,43 @@ void *ReadExtraSaveChunk(SaveData *saveData, HeapID heapId, int idx, int *ret_p) GF_ASSERT(hdr->id == idx); size = hdr->sizeFunc() + sizeof(struct SaveArrayFooter); - ret = AllocFromHeap(heapId, size); + ret = AllocFromHeap(heapId, size); FlashLoadChunk(hdr->sector * SAVE_SECTOR_SIZE, ret, size); - valid1 = ValidateChunk(saveData, ret, idx, hdr->sizeFunc()); + valid1 = ValidateChunk(saveData, ret, idx, hdr->sizeFunc()); saveno1 = SaveArray_GetFooterSaveNo(ret, hdr->sizeFunc()); FlashLoadChunk((hdr->sector + 64) * SAVE_SECTOR_SIZE, ret, size); - valid2 = ValidateChunk(saveData, ret, idx, hdr->sizeFunc()); + valid2 = ValidateChunk(saveData, ret, idx, hdr->sizeFunc()); saveno2 = SaveArray_GetFooterSaveNo(ret, hdr->sizeFunc()); *ret_p = 1; if (valid1 == TRUE && valid2 == FALSE) { saveData->lastGoodSaveSlot = 0; - saveData->lastGoodSaveNo = saveno1; + saveData->lastGoodSaveNo = saveno1; FlashLoadChunk(hdr->sector * SAVE_SECTOR_SIZE, ret, size); return ret; } if (valid1 == FALSE && valid2 == TRUE) { saveData->lastGoodSaveSlot = 1; - saveData->lastGoodSaveNo = saveno2; + saveData->lastGoodSaveNo = saveno2; FlashLoadChunk((hdr->sector + 64) * SAVE_SECTOR_SIZE, ret, size); return ret; } if (valid1 == TRUE && valid2 == TRUE) { if (SaveCounterCompare(saveno1, saveno2) != -1) { saveData->lastGoodSaveSlot = 0; - saveData->lastGoodSaveNo = saveno1; + saveData->lastGoodSaveNo = saveno1; FlashLoadChunk(hdr->sector * SAVE_SECTOR_SIZE, ret, size); return ret; } else { saveData->lastGoodSaveSlot = 1; - saveData->lastGoodSaveNo = saveno2; + saveData->lastGoodSaveNo = saveno2; FlashLoadChunk((hdr->sector + 64) * SAVE_SECTOR_SIZE, ret, size); return ret; } } - *ret_p = 2; + *ret_p = 2; saveData->lastGoodSaveSlot = 0; - saveData->lastGoodSaveNo = 0; + saveData->lastGoodSaveNo = 0; return ret; } @@ -1021,7 +1021,7 @@ void *sub_020284A4(SaveData *saveData, HeapID heapId, int idx, int *ret_p, int * hdr = &gExtraSaveChunkHeaders[idx]; GF_ASSERT(hdr->id == idx); size = hdr->sizeFunc() + sizeof(struct SaveArrayFooter); - ret = AllocFromHeap(heapId, size); + ret = AllocFromHeap(heapId, size); sub_020286B4(saveData, idx, &sp24, &sp20, &sp1C); FlashLoadChunk(hdr->sector * SAVE_SECTOR_SIZE, ret, size); valid1 = ValidateChunk(saveData, ret, idx, hdr->sizeFunc()); @@ -1029,7 +1029,7 @@ void *sub_020284A4(SaveData *saveData, HeapID heapId, int idx, int *ret_p, int * FlashLoadChunk((hdr->sector + 64) * SAVE_SECTOR_SIZE, ret, size); valid2 = ValidateChunk(saveData, ret, idx, hdr->sizeFunc()); MI_CpuCopy8(ret, &sp28, sizeof(u32)); - *ret_p = 1; + *ret_p = 1; *ret2_p = 0; if (valid1 == TRUE && valid2 == FALSE && sp24 == sp2C) { if (sp1C == 1) { @@ -1185,10 +1185,10 @@ BOOL SaveSubstruct_AssertCRC(int idx) { u16 *data_u16; u16 crc; - data = SaveArray_Get(SaveData_Get(), idx); + data = SaveArray_Get(SaveData_Get(), idx); data_u16 = (u16 *)data; - size = GetSaveChunkSizePlusCRC(idx) - 4; - crc = GF_CalcCRC16(data, size); + size = GetSaveChunkSizePlusCRC(idx) - 4; + crc = GF_CalcCRC16(data, size); if (crc == data_u16[size / 2]) { return TRUE; } @@ -1203,10 +1203,10 @@ void SaveSubstruct_UpdateCRC(int idx) { u16 *data_u16; u16 crc; - data = SaveArray_Get(SaveData_Get(), idx); - data_u16 = (u16 *)data; - size = GetSaveChunkSizePlusCRC(idx) - 4; - crc = GF_CalcCRC16(data, size); + data = SaveArray_Get(SaveData_Get(), idx); + data_u16 = (u16 *)data; + size = GetSaveChunkSizePlusCRC(idx) - 4; + crc = GF_CalcCRC16(data, size); data_u16[size / 2] = crc; } @@ -1218,21 +1218,21 @@ static int HandleWriteSaveAsync_PCBoxes(SaveData *saveData, struct AsyncWriteMan switch (writeMan->state) { case 0: saveData->newBoxModifiedFlags = Save_CalcPCBoxModifiedFlags(saveData); - saveData->numModifiedBoxes = PCModifiedFlags_CountModifiedBoxes(saveData->newBoxModifiedFlags); - saveData->nextBoxToWrite = 0; - r7 = PCStorage_GetSizeOfBox() * PCStorage_GetNumBoxes(); - saveData->pcStorageCRC = GF_CalcCRC16(SaveArray_Get(saveData, SAVE_PCSTORAGE), r7); + saveData->numModifiedBoxes = PCModifiedFlags_CountModifiedBoxes(saveData->newBoxModifiedFlags); + saveData->nextBoxToWrite = 0; + r7 = PCStorage_GetSizeOfBox() * PCStorage_GetNumBoxes(); + saveData->pcStorageCRC = GF_CalcCRC16(SaveArray_Get(saveData, SAVE_PCSTORAGE), r7); if (saveData->numModifiedBoxes == 0) { GF_ASSERT(saveData->pcStorageCRC == saveData->pcStorageLastCRC); sub_020271A0(saveData); if (saveData->pcStorageCRC != saveData->pcStorageLastCRC) { - saveData->numModifiedBoxes = PCStorage_GetNumBoxes(); + saveData->numModifiedBoxes = PCStorage_GetNumBoxes(); saveData->newBoxModifiedFlags = BOX_ALL_MODIFIED_FLAG; Save_SetAllPCBoxesModified(saveData); } } writeMan->state_sub = 0; - data = saveData->dynamic_region; + data = saveData->dynamic_region; SaveSlot_BuildFooter(saveData, data, writeMan->curSector); GetSaveSectorFooterPtr(saveData, data, writeMan->curSector); writeMan->state++; @@ -1250,7 +1250,7 @@ static int HandleWriteSaveAsync_PCBoxes(SaveData *saveData, struct AsyncWriteMan } break; case 2: - writeMan->lockId = Save_WriteChunkFooterAsync(saveData, writeMan->curSector, saveData->lastGoodSector == 0); + writeMan->lockId = Save_WriteChunkFooterAsync(saveData, writeMan->curSector, saveData->lastGoodSector == 0); writeMan->waitingAsync = 1; writeMan->state++; // fallthrough @@ -1283,7 +1283,7 @@ static int Save_WritePCBoxes(SaveData *saveData, struct AsyncWriteManager *write } break; case 1: - writeMan->lockId = Save_WriteNextPCBox(saveData, &saveData->saveSlotSpecs[writeMan->curSector], saveData->lastGoodSector == 0); + writeMan->lockId = Save_WriteNextPCBox(saveData, &saveData->saveSlotSpecs[writeMan->curSector], saveData->lastGoodSector == 0); writeMan->waitingAsync = 1; writeMan->state_sub++; // fallthrough @@ -1298,14 +1298,14 @@ static int Save_WritePCBoxes(SaveData *saveData, struct AsyncWriteManager *write } break; case 3: - writeMan->lockId = Save_WritePCFooter(saveData, &saveData->saveSlotSpecs[writeMan->curSector], saveData->lastGoodSector == 0); + writeMan->lockId = Save_WritePCFooter(saveData, &saveData->saveSlotSpecs[writeMan->curSector], saveData->lastGoodSector == 0); writeMan->waitingAsync = 1; writeMan->state_sub++; // fallthrough case 4: if (WaitFlashWrite(writeMan->lockId, writeMan->waitingAsync, &write_ok)) { writeMan->waitingAsync = 0; - writeMan->state_sub = 0; + writeMan->state_sub = 0; if (!write_ok) { return 0; } @@ -1322,8 +1322,8 @@ static int Save_WriteNextPCBox(SaveData *saveData, struct SaveSlotSpec *spec, u8 u32 offset; box_size = PCStorage_GetSizeOfBox(); - offset = GetChunkOffsetFromCurrentSaveSlot(slot, spec); - boxno = PCModifiedFlags_GetIndexOfNthModifiedBox(saveData->newBoxModifiedFlags, saveData->nextBoxToWrite); + offset = GetChunkOffsetFromCurrentSaveSlot(slot, spec); + boxno = PCModifiedFlags_GetIndexOfNthModifiedBox(saveData->newBoxModifiedFlags, saveData->nextBoxToWrite); GF_ASSERT(boxno != 0xFF); return FlashWriteChunkInternal(offset + box_size * boxno, saveData->dynamic_region + spec->offset + box_size * boxno, box_size); } @@ -1338,15 +1338,15 @@ static int Save_WritePCFooter(SaveData *saveData, struct SaveSlotSpec *spec, u8 u32 pc_size; u16 crc; - pc_size = PCStorage_GetSizeOfBox() * PCStorage_GetNumBoxes(); - offset = GetChunkOffsetFromCurrentSaveSlot(slot, spec); - data = saveData->dynamic_region + spec->offset; + pc_size = PCStorage_GetSizeOfBox() * PCStorage_GetNumBoxes(); + offset = GetChunkOffsetFromCurrentSaveSlot(slot, spec); + data = saveData->dynamic_region + spec->offset; sector_size = spec->size - sizeof(struct SaveChunkFooter); GF_ASSERT(sector_size != 0); dynamic_region_ptr = saveData->dynamic_region; - spec_offset = spec->offset; - footer = GetSaveSectorFooterPtr(saveData, dynamic_region_ptr, 1); - crc = SaveArray_CalcCRC16MinusFooter(saveData, (u8 *)dynamic_region_ptr + spec_offset, spec->size); + spec_offset = spec->offset; + footer = GetSaveSectorFooterPtr(saveData, dynamic_region_ptr, 1); + crc = SaveArray_CalcCRC16MinusFooter(saveData, (u8 *)dynamic_region_ptr + spec_offset, spec->size); GF_ASSERT(crc == footer->crc); return FlashWriteChunkInternal(offset + pc_size, data + pc_size, sector_size - pc_size); } diff --git a/src/save_arrays.c b/src/save_arrays.c index 61157b2842..c62967172c 100644 --- a/src/save_arrays.c +++ b/src/save_arrays.c @@ -36,8 +36,8 @@ // These macros are temporary. As the respective sources // are decompiled, the calls should be phased out. -#define DECL_CHUNK(prefix) \ - extern u32 prefix##_sizeof(void); \ +#define DECL_CHUNK(prefix) \ + extern u32 prefix##_sizeof(void); \ extern void prefix##_Init(void *); #define DECL_CHUNK_EX(sizefn, initfn) \ extern u32 sizefn(void); \ diff --git a/src/save_data_read_error.c b/src/save_data_read_error.c index 469351fe86..f3aa4ada58 100644 --- a/src/save_data_read_error.c +++ b/src/save_data_read_error.c @@ -21,48 +21,48 @@ #include "unk_0200FA24.h" static const GraphicsBanks sDataReadErrorBanksConfig = { - .bg = GX_VRAM_BG_256_AB, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_NONE, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_NONE, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_NONE, + .bg = GX_VRAM_BG_256_AB, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_NONE, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_NONE, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_NONE, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE, + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE, }; static const struct GraphicsModes sDataReadErrorBgModeSet = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const BgTemplate sDataReadErrorBgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x18000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x18000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const WindowTemplate sDataReadErrorWindowTemplate = { - .bgId = GF_BG_LYR_MAIN_0, - .left = 3, - .top = 3, - .width = 26, - .height = 18, - .palette = 1, + .bgId = GF_BG_LYR_MAIN_0, + .left = 3, + .top = 3, + .width = 26, + .height = 18, + .palette = 1, .baseTile = 0x23, }; @@ -102,7 +102,7 @@ void ShowSaveDataReadError(HeapID heapId) { BG_SetMaskColor(GF_BG_LYR_SUB_0, RGB(1, 1, 27)); MsgData *error_msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0008_bin, heapId); - String *error_str = String_New(384, heapId); + String *error_str = String_New(384, heapId); ResetAllTextPrinters(); @@ -161,7 +161,7 @@ void ShowGBACartRemovedError(HeapID heapId) { BG_SetMaskColor(GF_BG_LYR_SUB_0, RGB(1, 1, 27)); MsgData *error_msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0008_bin, heapId); - String *error_str = String_New(384, heapId); + String *error_str = String_New(384, heapId); ResetAllTextPrinters(); diff --git a/src/save_data_write_error.c b/src/save_data_write_error.c index 4cdbf1209b..8ce1076892 100644 --- a/src/save_data_write_error.c +++ b/src/save_data_write_error.c @@ -21,48 +21,48 @@ #include "unk_0200FA24.h" static const GraphicsBanks sDataWriteErrorBanksConfig = { - .bg = GX_VRAM_BG_256_AB, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_NONE, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_NONE, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_NONE, + .bg = GX_VRAM_BG_256_AB, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_NONE, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_NONE, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_NONE, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE, + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE, }; static const struct GraphicsModes sDataWriteErrorBgModeSet = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const BgTemplate sDataWriteErrorBgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x18000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x18000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const WindowTemplate sDataWriteErrorWindowTemplate = { - .bgId = GF_BG_LYR_MAIN_0, - .left = 3, - .top = 3, - .width = 26, - .height = 18, - .palette = 1, + .bgId = GF_BG_LYR_MAIN_0, + .left = 3, + .top = 3, + .width = 26, + .height = 18, + .palette = 1, .baseTile = 0x23, }; @@ -111,7 +111,7 @@ void ShowSaveDataWriteError(HeapID heapId, int code) { BG_SetMaskColor(GF_BG_LYR_SUB_0, RGB(1, 1, 27)); MsgData *error_msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0009_bin, heapId); - String *error_str = String_New(384, heapId); + String *error_str = String_New(384, heapId); ResetAllTextPrinters(); diff --git a/src/save_local_field_data.c b/src/save_local_field_data.c index 9a3bcf051a..5a890a70a5 100644 --- a/src/save_local_field_data.c +++ b/src/save_local_field_data.c @@ -131,16 +131,16 @@ void FieldSystem_SyncMapObjectsToSave(FieldSystem *fieldSystem) { } void FieldSystem_RestoreMapObjectsFromSave(FieldSystem *fieldSystem) { - struct SavedMapObjectList *unk = Save_MapObjects_Get(fieldSystem->saveData); + struct SavedMapObjectList *unk = Save_MapObjects_Get(fieldSystem->saveData); struct SavedMapObject *follower = SaveMapObject_GetFirstObjectWithSpriteID(unk->subs, 64, SPRITE_FOLLOWER_MON_SHAYMIN_SKY); Pokemon *mon; int species; int form; if (follower != NULL && follower->objId == obj_partner_poke) { - mon = GetFirstAliveMonInParty_CrashIfNone(SaveArray_Party_Get(fieldSystem->saveData)); + mon = GetFirstAliveMonInParty_CrashIfNone(SaveArray_Party_Get(fieldSystem->saveData)); species = GetMonData(mon, MON_DATA_SPECIES, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (species != SPECIES_SHAYMIN) { GF_ASSERT(FALSE); } else if (form == SHAYMIN_LAND) { diff --git a/src/save_misc.c b/src/save_misc.c index 9230c95ce1..f16435a4b4 100644 --- a/src/save_misc.c +++ b/src/save_misc.c @@ -14,7 +14,7 @@ void Save_BerryPots_Init(BerryPot *berryPots) { MI_CpuClear8(berryPots, MAX_BERRY_POT * sizeof(BerryPot)); for (i = 0; i < MAX_BERRY_POT; i++) { berryPots[i].growthStage = BERRY_POT_GROWTH_STAGE_NONE; - berryPots[i].berryId = 0; + berryPots[i].berryId = 0; } } @@ -37,7 +37,7 @@ void Save_Misc_Init(SAVE_MISC_DATA *saveMiscData) { MI_CpuFill16(saveMiscData->rivalName, EOS, PLAYER_NAME_LENGTH + 1); MI_CpuFill8(saveMiscData->unk_0280, 0xFF, 8); MailMsg_Init_WithBank(&saveMiscData->battleGreetingEC, MAILMSG_BANK_0295_GMM); - saveMiscData->battleGreetingEC.msg_no = msg_0295_00000; + saveMiscData->battleGreetingEC.msg_no = msg_0295_00000; saveMiscData->battleGreetingEC.fields[0] = GetECWordIndexByPair(NARC_msg_msg_0287_bin, msg_0287_regards); saveMiscData->battleGreetingEC.fields[1] = EC_WORD_NULL; for (i = 0; i < 5; i++) { @@ -96,14 +96,14 @@ BOOL SaveMisc_CheckExtraChunksExist(SAVE_MISC_DATA *saveMiscData) { void SaveMisc_SetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int species, int form, int isEgg) { saveMiscData->favoriteMonSpecies = species; - saveMiscData->favoriteMonForm = form; - saveMiscData->favoriteMonIsEgg = isEgg; + saveMiscData->favoriteMonForm = form; + saveMiscData->favoriteMonIsEgg = isEgg; } void SaveMisc_GetFavoriteMon(SAVE_MISC_DATA *saveMiscData, int *species, int *form, int *isEgg) { *species = saveMiscData->favoriteMonSpecies; - *form = saveMiscData->favoriteMonForm; - *isEgg = saveMiscData->favoriteMonIsEgg; + *form = saveMiscData->favoriteMonForm; + *isEgg = saveMiscData->favoriteMonIsEgg; } static const u8 _020F677C[3][2] = { @@ -179,12 +179,12 @@ void sub_0202AB18(SAVE_MISC_DATA *saveMiscData, u8 a1, u8 a2, u8 a3) { void SaveMisc_SetTogepiPersonalityGender(SAVE_MISC_DATA *saveMiscData, int personality, u8 gender) { saveMiscData->togepiEggPersonality = personality; - saveMiscData->togepiEggGender = gender; + saveMiscData->togepiEggGender = gender; } void SaveMisc_GetTogepiPersonalityGender(SAVE_MISC_DATA *saveMiscData, int *personality, u8 *gender) { *personality = saveMiscData->togepiEggPersonality; - *gender = saveMiscData->togepiEggGender; + *gender = saveMiscData->togepiEggGender; } void SaveMisc_GetBattleGreeting(SAVE_MISC_DATA *saveMiscData, MailMessage *mailMessage) { @@ -212,5 +212,5 @@ void sub_0202AC38(SAVE_MISC_DATA *saveMiscData, int a1, u32 *a2, u32 *a3, u8 *a4 void sub_0202AC60(SAVE_MISC_DATA *saveMiscData, int a1, u32 a2, u32 a3, u8 a4) { saveMiscData->unk_02A8[0][a1 - 1] = a2; saveMiscData->unk_02A8[1][a1 - 1] = a3; - saveMiscData->unk_02D0[a1 - 1] = a4; + saveMiscData->unk_02D0[a1 - 1] = a4; } diff --git a/src/save_pokegear.c b/src/save_pokegear.c index 89ad28a549..cf45e8f590 100644 --- a/src/save_pokegear.c +++ b/src/save_pokegear.c @@ -27,13 +27,13 @@ MomsSavings *SaveData_GetMomsSavingsAddr(SaveData *saveData) { static void InitGSPlayerMiscInternal(SavePokegear *pokegear) { MI_CpuClear8(pokegear, sizeof(SavePokegear)); - pokegear->unk_0 = 3; - pokegear->unk_4_18 = 0; - pokegear->unk_1 = 0; - pokegear->unk_3 = 128; - pokegear->unk_2 = pokegear->unk_3; + pokegear->unk_0 = 3; + pokegear->unk_4_18 = 0; + pokegear->unk_1 = 0; + pokegear->unk_3 = 128; + pokegear->unk_2 = pokegear->unk_3; pokegear->registeredCards = 0; - pokegear->unk_4_27 = 0; + pokegear->unk_4_27 = 0; GSPlayerMisc_PhonebookInit(pokegear); MomsSavingsInit(&pokegear->momsSavings); } @@ -148,13 +148,13 @@ void RegisterPhoneNumberInPokeGear(SavePokegear *pokegear, u8 contact) { } if (GSPlayerMisc_IsGearNumberRegistered(pokegear, contact) == 0xFF) { - slot = GSPlayerMisc_FindEmptyGearPhonebookSlot(pokegear); + slot = GSPlayerMisc_FindEmptyGearPhonebookSlot(pokegear); pokegear->phoneContacts[slot].id = contact; } } PhoneContact *GSPlayerMisc_AllocAndCopyPhonebook(SavePokegear *pokegear, HeapID heapId) { - u8 num = GSPlayerMisc_FindEmptyGearPhonebookSlot(pokegear); + u8 num = GSPlayerMisc_FindEmptyGearPhonebookSlot(pokegear); PhoneContact *ret = AllocFromHeap(heapId, num * sizeof(PhoneContact)); MI_CpuCopy8(pokegear->phoneContacts, ret, num * sizeof(PhoneContact)); return ret; @@ -178,9 +178,9 @@ static MomsSavings *GSPlayerMisc_GetMomSavingsAddr(SavePokegear *pokegear) { } static void sub_0202EFC4(PhoneRematch *rematch) { - rematch->seeking = 0; - rematch->hasGift = 0; - rematch->unk_0_2 = 1; + rematch->seeking = 0; + rematch->hasGift = 0; + rematch->unk_0_2 = 1; rematch->giftItem = 0; } @@ -214,7 +214,7 @@ void sub_0202F050(MomsSavings *momsSavings, u8 idx) { return; } byteno = idx / 8; - mask = 1 << (idx % 8); + mask = 1 << (idx % 8); if (momsSavings->unk_14E[byteno] & mask) { momsSavings->unk_14E[byteno] ^= mask; } @@ -396,7 +396,7 @@ BOOL sub_0202F370(UnkPokegearSub8 *unk) { void sub_0202F388(UnkPokegearSub8 *unk) { int i; - unk->unk_0 = 0; + unk->unk_0 = 0; unk->unk_2_0 = 15; unk->unk_2_4 = 15; unk->unk_2_8 = 15; @@ -444,7 +444,7 @@ void sub_0202F434(struct UnkStruct_0202F3DC *src, UnkPokegearSub8 *dest) { void sub_0202F4B0(UnkPokegearSub8 *src, struct UnkStruct_0202F3DC *dest) { int i; - dest->unk_0 = src->unk_0; + dest->unk_0 = src->unk_0; dest->unk_4[0] = src->unk_2_0; dest->unk_4[1] = src->unk_2_4; dest->unk_4[2] = src->unk_2_8; diff --git a/src/save_rankings.c b/src/save_rankings.c index 1fab48e0b4..f44791eb59 100644 --- a/src/save_rankings.c +++ b/src/save_rankings.c @@ -79,7 +79,7 @@ u8 RankingsViewSys_GetFirstRecordIndexOnPage(int page) { static void SaveRankingsEntry_Init(SaveRankingsEntry *entry) { entry->groupId = 0; - entry->stat = 0; + entry->stat = 0; StringFillEOS(entry->playerName, PLAYER_NAME_LENGTH + 1); SaveSubstruct_UpdateCRC(SAVE_RANKINGS); } @@ -131,9 +131,9 @@ static u32 *Save_RankingSys_GetPlayerStats(SaveData *saveData, HeapID heapId) { FrontierSave *frontierSave; u32 *ret; - gameStats = Save_GameStats_Get(saveData); + gameStats = Save_GameStats_Get(saveData); frontierSave = Save_Frontier_GetStatic(saveData); - ret = AllocFromHeapAtEnd(heapId, RANKINGS_COUNT * sizeof(u32)); + ret = AllocFromHeapAtEnd(heapId, RANKINGS_COUNT * sizeof(u32)); for (i = 0; i < RANKINGS_COUNT; ++i) { switch (i) { @@ -182,11 +182,11 @@ SaveRankingsEntry *Save_GetPlayerMixingRankingEntry(SaveData *saveData, HeapID h PlayerProfile *profile; profile = Save_PlayerData_GetProfileAddr(saveData); - ret = AllocFromHeapAtEnd(heapId, RANKINGS_COUNT * sizeof(SaveRankingsEntry)); + ret = AllocFromHeapAtEnd(heapId, RANKINGS_COUNT * sizeof(SaveRankingsEntry)); MI_CpuClear8(ret, RANKINGS_COUNT * sizeof(SaveRankingsEntry)); groupId = Save_FriendGroup_GetGroupId(Save_FriendGroup_Get(saveData), 1); - name = PlayerProfile_GetPlayerName_NewString(profile, heapId); - tmp = Save_RankingSys_GetPlayerStats(saveData, heapId); + name = PlayerProfile_GetPlayerName_NewString(profile, heapId); + tmp = Save_RankingSys_GetPlayerStats(saveData, heapId); for (i = 0; i < RANKINGS_COUNT; ++i) { ret[i].groupId = groupId; @@ -262,7 +262,7 @@ static void SaveRankings_GetSorted(SaveRankings *saveRankings, SaveRankingsSortB for (i = 0; i < sortBuffer->rankingsTotalCount - 1; ++i) { for (j = sortBuffer->rankingsTotalCount - 1; j > i; --j) { if (sortBuffer->rankings[i]->stat < sortBuffer->rankings[j]->stat) { - SaveRankingsEntry *tmp = sortBuffer->rankings[i]; + SaveRankingsEntry *tmp = sortBuffer->rankings[i]; sortBuffer->rankings[i] = sortBuffer->rankings[j]; sortBuffer->rankings[j] = tmp; } @@ -291,8 +291,8 @@ void Save_UpdateRankingsFromMixing(SaveData *saveData, u8 playerIdx, u8 countIn, SaveRankings *saveRankings; saveRankings = Save_Rankings_Get(saveData); - groupId = Save_FriendGroup_GetGroupId(Save_FriendGroup_Get(saveData), 1); - cnt = 0; + groupId = Save_FriendGroup_GetGroupId(Save_FriendGroup_Get(saveData), 1); + cnt = 0; for (i = 0; i < countIn; ++i) { if (i != playerIdx && ppEntries[i] != NULL) { filteredEntries[cnt++] = ppEntries[i]; @@ -315,15 +315,15 @@ ViewRankingsPage *Save_GetPlayerViewRankingPage(SaveData *saveData, int page, He PlayerProfile *profile; profile = Save_PlayerData_GetProfileAddr(saveData); - ret = AllocFromHeap(heapId, sizeof(ViewRankingsPage)); + ret = AllocFromHeap(heapId, sizeof(ViewRankingsPage)); MI_CpuClear8(ret, sizeof(ViewRankingsPage)); - groupId = Save_FriendGroup_GetGroupId(Save_FriendGroup_Get(saveData), 1); - tmp = Save_RankingSys_GetPlayerStats(saveData, heapId); + groupId = Save_FriendGroup_GetGroupId(Save_FriendGroup_Get(saveData), 1); + tmp = Save_RankingSys_GetPlayerStats(saveData, heapId); ret->count = RankingsViewSys_GetNumRecordsPerPage(page); pageOffset = RankingsViewSys_GetFirstRecordIndexOnPage(page); for (i = 0; i < ret->count; ++i) { - ret->entries[i].groupId = groupId; - ret->entries[i].stat = tmp[i + pageOffset]; + ret->entries[i].groupId = groupId; + ret->entries[i].stat = tmp[i + pageOffset]; ret->entries[i].playerName = PlayerProfile_GetPlayerName_NewString(profile, heapId); } FreeToHeap(tmp); @@ -338,8 +338,8 @@ ViewRankingsPage *Save_GetReceivedViewRankingPage(SaveRankings *saveRankings, in MI_CpuClear8(ret, sizeof(ViewRankingsPage)); for (i = 0; i < RANKINGS_PER_STAT; ++i) { if (SaveRankingsEntry_IsInit(&saveRankings->array[page][i])) { - ret->entries[ret->count].groupId = saveRankings->array[page][i].groupId; - ret->entries[ret->count].stat = saveRankings->array[page][i].stat; + ret->entries[ret->count].groupId = saveRankings->array[page][i].groupId; + ret->entries[ret->count].stat = saveRankings->array[page][i].stat; ret->entries[ret->count].playerName = String_New(PLAYER_NAME_LENGTH + 1, heapId); CopyU16ArrayToString(ret->entries[ret->count].playerName, saveRankings->array[page][i].playerName); ++ret->count; diff --git a/src/save_wifi_history.c b/src/save_wifi_history.c index fab72dfe9f..f458dba26e 100644 --- a/src/save_wifi_history.c +++ b/src/save_wifi_history.c @@ -32,7 +32,7 @@ void WiFiHistory_SetPlayerGlobeInfo(SaveWiFiHistory *wifiHistory, int country, i GF_ASSERT(country < SAVE_WIFI_HISTORY_COUNTRY_MAX + 1); GF_ASSERT(region < SAVE_WIFI_HISTORY_REGION_MAX); wifiHistory->country = country; - wifiHistory->region = region; + wifiHistory->region = region; WiFiHistory_SetLocationSeenState(wifiHistory, country, region, SAVE_WIFI_HISTORY_STATE_MINE); SaveSubstruct_UpdateCRC(SAVE_WIFI_HISTORY); } diff --git a/src/scrcmd_12.c b/src/scrcmd_12.c index 9ace495373..e0db4ca782 100644 --- a/src/scrcmd_12.c +++ b/src/scrcmd_12.c @@ -12,7 +12,7 @@ BOOL ScrCmd_MomGiftCheck(ScriptContext *ctx) { u16 sp; - u16 *retPtr = ScriptGetVarPointer(ctx); + u16 *retPtr = ScriptGetVarPointer(ctx); MomsSavings *momsSavings = SaveData_GetMomsSavingsAddr(ctx->fieldSystem->saveData); if (sub_0202F224(momsSavings, 0, &sp) == 0) { *retPtr = FALSE; @@ -24,7 +24,7 @@ BOOL ScrCmd_MomGiftCheck(ScriptContext *ctx) { BOOL ScrCmd_PalParkAction(ScriptContext *ctx) { SaveVarsFlags *script = Save_VarsFlags_Get(ctx->fieldSystem->saveData); - u16 var0 = ScriptGetVar(ctx); + u16 var0 = ScriptGetVar(ctx); if (var0 == 2) { Save_VarsFlags_SetPalParkSysFlag(script); PalPark_ClearState(ctx->fieldSystem); @@ -42,8 +42,8 @@ BOOL ScrCmd_PalParkAction(ScriptContext *ctx) { BOOL ScrCmd_509(ScriptContext *ctx) { struct MigratedPokemonSav *unkStruct = Save_MigratedPokemon_Get(ctx->fieldSystem->saveData); - Pokemon *mon = AllocMonZeroed(HEAP_ID_32); - u16 *retPtr = ScriptGetVarPointer(ctx); + Pokemon *mon = AllocMonZeroed(HEAP_ID_32); + u16 *retPtr = ScriptGetVarPointer(ctx); if (sub_0202EC98(unkStruct) == PARTY_SIZE) { *retPtr = TRUE; } else { @@ -55,10 +55,10 @@ BOOL ScrCmd_509(ScriptContext *ctx) { BOOL ScrCmd_510(ScriptContext *ctx) { struct MigratedPokemonSav *unkStruct = Save_MigratedPokemon_Get(ctx->fieldSystem->saveData); - PCStorage *storage = SaveArray_PCStorage_Get(ctx->fieldSystem->saveData); - Pokemon *mon = AllocMonZeroed(HEAP_ID_32); - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData); - Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); + PCStorage *storage = SaveArray_PCStorage_Get(ctx->fieldSystem->saveData); + Pokemon *mon = AllocMonZeroed(HEAP_ID_32); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData); + Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); int i; for (i = 0; i < PARTY_SIZE; i++) { @@ -75,7 +75,7 @@ BOOL ScrCmd_510(ScriptContext *ctx) { } BOOL ScrCmd_PalParkScoreGet(ScriptContext *ctx) { - u16 var0 = ScriptGetVar(ctx); + u16 var0 = ScriptGetVar(ctx); u16 *retPtr = ScriptGetVarPointer(ctx); switch (var0) { @@ -92,7 +92,7 @@ BOOL ScrCmd_PalParkScoreGet(ScriptContext *ctx) { int val0 = PalPark_CalcTimeScore(ctx->fieldSystem); int val1 = PalPark_CalcSpeciesScore(ctx->fieldSystem); int val2 = PalPark_CalcTypesScore(ctx->fieldSystem); - *retPtr = val1 + val2 + val0; + *retPtr = val1 + val2 + val0; break; } } diff --git a/src/scrcmd_17.c b/src/scrcmd_17.c index f61d9fe414..e94737c8ca 100644 --- a/src/scrcmd_17.c +++ b/src/scrcmd_17.c @@ -6,8 +6,8 @@ BOOL ScrCmd_CheckPokedex(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *retPtr = ScriptGetVarPointer(ctx); - *retPtr = Pokedex_IsEnabled(pokedex); + u16 *retPtr = ScriptGetVarPointer(ctx); + *retPtr = Pokedex_IsEnabled(pokedex); return FALSE; } @@ -18,23 +18,23 @@ BOOL ScrCmd_GivePokedex(ScriptContext *ctx) { } BOOL ScrCmd_CheckRunningShoes(ScriptContext *ctx) { - u16 *retPtr = ScriptGetVarPointer(ctx); + u16 *retPtr = ScriptGetVarPointer(ctx); LocalFieldData *localFieldData = Save_LocalFieldData_Get(ctx->fieldSystem->saveData); - struct PlayerSaveData *sub = LocalFieldData_GetPlayer(localFieldData); - *retPtr = PlayerSaveData_CheckRunningShoes(sub); + struct PlayerSaveData *sub = LocalFieldData_GetPlayer(localFieldData); + *retPtr = PlayerSaveData_CheckRunningShoes(sub); return FALSE; } BOOL ScrCmd_GiveRunningShoes(ScriptContext *ctx) { LocalFieldData *localFieldData = Save_LocalFieldData_Get(ctx->fieldSystem->saveData); - struct PlayerSaveData *sub = LocalFieldData_GetPlayer(localFieldData); + struct PlayerSaveData *sub = LocalFieldData_GetPlayer(localFieldData); PlayerSaveData_SetRunningShoesFlag(sub, TRUE); return FALSE; } BOOL ScrCmd_CheckBadge(ScriptContext *ctx) { u16 badgeIdx = ScriptGetVar(ctx); - u16 *ret = ScriptGetVarPointer(ctx); + u16 *ret = ScriptGetVarPointer(ctx); GF_ASSERT(badgeIdx < 16); *ret = PlayerProfile_TestBadgeFlag(Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData), badgeIdx); @@ -134,7 +134,7 @@ BOOL ScrCmd_306(ScriptContext *ctx) { BOOL ScrCmd_StrengthFlagAction(ScriptContext *ctx) { SaveVarsFlags *state = Save_VarsFlags_Get(ctx->fieldSystem->saveData); - u8 mode = ScriptReadByte(ctx); + u8 mode = ScriptReadByte(ctx); switch (mode) { case FLAG_ACTION_SET: StrengthFlagAction(state, FLAG_ACTION_SET); @@ -144,7 +144,7 @@ BOOL ScrCmd_StrengthFlagAction(ScriptContext *ctx) { break; case FLAG_ACTION_CHECK: { u16 *ret = ScriptGetVarPointer(ctx); - *ret = StrengthFlagAction(state, FLAG_ACTION_CHECK); + *ret = StrengthFlagAction(state, FLAG_ACTION_CHECK); break; } default: @@ -155,7 +155,7 @@ BOOL ScrCmd_StrengthFlagAction(ScriptContext *ctx) { BOOL ScrCmd_FlashAction(ScriptContext *ctx) { SaveVarsFlags *state = Save_VarsFlags_Get(ctx->fieldSystem->saveData); - u8 mode = ScriptReadByte(ctx); + u8 mode = ScriptReadByte(ctx); switch (mode) { case FLAG_ACTION_SET: SysFlagFlashSet(state); @@ -165,7 +165,7 @@ BOOL ScrCmd_FlashAction(ScriptContext *ctx) { break; case FLAG_ACTION_CHECK: { u16 *ret = ScriptGetVarPointer(ctx); - *ret = SysFlagFlashCheck(state); + *ret = SysFlagFlashCheck(state); break; } default: @@ -177,7 +177,7 @@ BOOL ScrCmd_FlashAction(ScriptContext *ctx) { // Leftover from DPPt BOOL ScrCmd_DefogAction(ScriptContext *ctx) { SaveVarsFlags *state = Save_VarsFlags_Get(ctx->fieldSystem->saveData); - u8 mode = ScriptReadByte(ctx); + u8 mode = ScriptReadByte(ctx); switch (mode) { case FLAG_ACTION_SET: SysFlagDefogSet(state); @@ -187,7 +187,7 @@ BOOL ScrCmd_DefogAction(ScriptContext *ctx) { break; case FLAG_ACTION_CHECK: { u16 *ret = ScriptGetVarPointer(ctx); - *ret = SysFlagDefogCheck(state); + *ret = SysFlagDefogCheck(state); break; } default: diff --git a/src/scrcmd_20.c b/src/scrcmd_20.c index c5ed7f3374..c2e9cfe91d 100644 --- a/src/scrcmd_20.c +++ b/src/scrcmd_20.c @@ -135,7 +135,7 @@ BOOL ScrCmd_628(ScriptContext *ctx) { u16 r4 = ScriptGetVar(ctx); u16 r5 = ScriptGetVar(ctx); u32 r0 = sub_02030AE8(ctx->fieldSystem->saveData); - u8 s = 0; + u8 s = 0; sub_02030AA4(r0, 0xa, r5 * 4 + r4, &s); if (r4 == 3) { u32 r7; @@ -152,8 +152,8 @@ BOOL ScrCmd_628(ScriptContext *ctx) { } BOOL ScrCmd_633(ScriptContext *ctx) { - u16 r7 = ScriptReadHalfword(ctx); - u16 r5 = ScriptGetVar(ctx); + u16 r7 = ScriptReadHalfword(ctx); + u16 r5 = ScriptGetVar(ctx); u16 *resultPtr = ScriptGetVarPointer(ctx); sub_02030B04(ctx->fieldSystem->saveData); u32 sp04 = sub_02030C5C(ctx->fieldSystem->saveData); @@ -200,7 +200,7 @@ static BOOL BattleHall_DoesPartyContainEligibleMons(s32 numRequiredMons, SaveDat u16 species; u16 level; u16 form; - Party *party = SaveArray_Party_Get(saveData); + Party *party = SaveArray_Party_Get(saveData); u8 partyCount = Party_GetCount(party); if (partyCount < numRequiredMons) { return FALSE; @@ -211,9 +211,9 @@ static BOOL BattleHall_DoesPartyContainEligibleMons(s32 numRequiredMons, SaveDat } for (i = 0, numEligibleMons = 0; i < partyCount; i++) { Pokemon *mon = Party_GetMonByIndex(party, i); - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - level = GetMonData(mon, MON_DATA_LEVEL, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + level = GetMonData(mon, MON_DATA_LEVEL, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (GetMonData(mon, MON_DATA_IS_EGG, NULL) == FALSE && level >= 30 && IsPokemonBannedFromBattleFrontier(species, form) != TRUE) { @@ -245,7 +245,7 @@ BOOL ScrCmd_636(ScriptContext *ctx) { // returns whether the player and partner chose different mons for battle hall BOOL ScrCmd_634(ScriptContext *ctx) { u16 playerSpecies = ScriptGetVar(ctx); - u16 *resultPtr = ScriptGetVarPointer(ctx); + u16 *resultPtr = ScriptGetVarPointer(ctx); sub_0204F1E4(ctx->taskman, playerSpecies, resultPtr); return TRUE; } @@ -254,7 +254,7 @@ static void sub_0204F1E4(TaskManager *taskManager, u16 playerSpecies, u16 *resul UnkStruct_0204F1E4 *r4 = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0204F1E4)); memset(r4, 0, sizeof(UnkStruct_0204F1E4)); r4->playerTeam = playerSpecies; - r4->result = resultPtr; + r4->result = resultPtr; sub_02091574((FieldSystem *)r4); TaskManager_Call(taskManager, sub_0204F228, r4); } @@ -286,16 +286,16 @@ static BOOL sub_0204F228(TaskManager *taskManager) { static void sub_0204F284(TaskManager *taskManager, void *a1, BattleHallChallengeType challengeType) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_0204F284 *r4 = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0204F284)); + UnkStruct_0204F284 *r4 = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0204F284)); MI_CpuFill8(r4, 0, sizeof(UnkStruct_0204F284)); r4->challengeType = challengeType; - r4->unk08 = a1; + r4->unk08 = a1; TaskManager_Call(fieldSystem->taskman, sub_0204F2B8, r4); } static BOOL sub_0204F2B8(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_0204F284 *r4 = TaskManager_GetEnvironment(taskManager); + UnkStruct_0204F284 *r4 = TaskManager_GetEnvironment(taskManager); switch (r4->state) { case 0: r4->state = sub_0204F320(r4, fieldSystem, HEAP_ID_FIELD); @@ -319,20 +319,20 @@ static BOOL sub_0204F2B8(TaskManager *taskManager) { static u32 sub_0204F320(UnkStruct_0204F284 *a0, FieldSystem *fieldSystem, HeapID unused) { PartyMenuArgs *partyMenuArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); MIi_CpuClearFast(0, (u32 *)partyMenuArgs, sizeof(PartyMenuArgs)); - partyMenuArgs->party = SaveArray_Party_Get(fieldSystem->saveData); - partyMenuArgs->bag = Save_Bag_Get(fieldSystem->saveData); - partyMenuArgs->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - partyMenuArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - partyMenuArgs->unk_25 = 0; - partyMenuArgs->context = PARTY_MENU_CONTEXT_BATTLE_HALL; + partyMenuArgs->party = SaveArray_Party_Get(fieldSystem->saveData); + partyMenuArgs->bag = Save_Bag_Get(fieldSystem->saveData); + partyMenuArgs->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + partyMenuArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + partyMenuArgs->unk_25 = 0; + partyMenuArgs->context = PARTY_MENU_CONTEXT_BATTLE_HALL; partyMenuArgs->fieldSystem = fieldSystem; - partyMenuArgs->partySlot = a0->partySlot; + partyMenuArgs->partySlot = a0->partySlot; for (u8 i = 0; i < 2; i++) { partyMenuArgs->selectedOrder[i] = a0->selectedMons[i]; } - partyMenuArgs->maxLevel = 30; - partyMenuArgs->minMonsToSelect = 1; - partyMenuArgs->maxMonsToSelect = 1; + partyMenuArgs->maxLevel = 30; + partyMenuArgs->minMonsToSelect = 1; + partyMenuArgs->maxMonsToSelect = 1; partyMenuArgs->menuInputStatePtr = &fieldSystem->menuInputState; if (a0->challengeType == BATTLE_HALL_CHALLENGE_TYPE_DOUBLE) { partyMenuArgs->minMonsToSelect = 2; @@ -363,20 +363,20 @@ static u32 sub_0204F3F8(UnkStruct_0204F284 *a0, FieldSystem *fieldSystem) { } static u32 sub_0204F448(UnkStruct_0204F284 *a0, FieldSystem *fieldSystem, HeapID heapId) { - SaveData *saveData = fieldSystem->saveData; + SaveData *saveData = fieldSystem->saveData; PokemonSummaryArgs *args = AllocFromHeapAtEnd(heapId, sizeof(PokemonSummaryArgs)); MI_CpuFill8(args, 0, sizeof(PokemonSummaryArgs)); - args->options = Save_PlayerData_GetOptionsAddr(saveData); - args->party = SaveArray_Party_Get(saveData); + args->options = Save_PlayerData_GetOptionsAddr(saveData); + args->party = SaveArray_Party_Get(saveData); args->natDexEnabled = SaveArray_IsNatDexEnabled(saveData); - args->unk2C = sub_02088288(saveData); - args->unk11 = 1; - args->partySlot = a0->partySlot; - args->partyCount = Party_GetCount(args->party); - args->moveToLearn = MOVE_NONE; - args->unk12 = 0; - args->ribbons = Save_SpecialRibbons_Get(saveData); - args->isFlag982Set = sub_0208828C(saveData); + args->unk2C = sub_02088288(saveData); + args->unk11 = 1; + args->partySlot = a0->partySlot; + args->partyCount = Party_GetCount(args->party); + args->moveToLearn = MOVE_NONE; + args->unk12 = 0; + args->ribbons = Save_SpecialRibbons_Get(saveData); + args->isFlag982Set = sub_0208828C(saveData); sub_02089D40(args, unk_020FC224); sub_0208AD34(args, Save_PlayerData_GetProfileAddr(saveData)); FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PokemonSummary, args); @@ -389,7 +389,7 @@ static u32 sub_0204F4D8(UnkStruct_0204F284 *a0, FieldSystem *fieldSystem) { return 3; } PokemonSummaryArgs *pokemonSummaryArgs = *(a0->unk08); - a0->partySlot = pokemonSummaryArgs->partySlot; + a0->partySlot = pokemonSummaryArgs->partySlot; FreeToHeap(pokemonSummaryArgs); *(a0->unk08) = NULL; return 0; @@ -398,16 +398,16 @@ static u32 sub_0204F4D8(UnkStruct_0204F284 *a0, FieldSystem *fieldSystem) { BOOL ScrCmd_BufferBattleHallStreak(ScriptContext *ctx) { u32 i; void *unk0; - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 strIdxWinStreak = ScriptReadByte(ctx); - u8 strIdxCurrWinStreakTarget = ScriptReadByte(ctx); - u8 strIdxNextWinStreakTarget = ScriptReadByte(ctx); - u8 strIdxBP = ScriptReadByte(ctx); - u16 *winStreakLevel = ScriptGetVarPointer(ctx); - u16 *result = ScriptGetVarPointer(ctx); - u32 winStreak = 0; - u32 unk1 = 1; + u8 strIdxWinStreak = ScriptReadByte(ctx); + u8 strIdxCurrWinStreakTarget = ScriptReadByte(ctx); + u8 strIdxNextWinStreakTarget = ScriptReadByte(ctx); + u8 strIdxBP = ScriptReadByte(ctx); + u16 *winStreakLevel = ScriptGetVarPointer(ctx); + u16 *result = ScriptGetVarPointer(ctx); + u32 winStreak = 0; + u32 unk1 = 1; if (Save_CheckExtraChunksExist(fieldSystem->saveData) == FALSE) { *result = 0; return FALSE; @@ -424,7 +424,7 @@ BOOL ScrCmd_BufferBattleHallStreak(ScriptContext *ctx) { FreeToHeap(unk0); } BufferIntegerAsString(*messageFormat, strIdxWinStreak, winStreak, CountDigits(winStreak), PRINTING_MODE_RIGHT_ALIGN, TRUE); - u16 bp = 0; + u16 bp = 0; u32 currWinStreakLevel = 0; u16 prevWinStreakLevel = *winStreakLevel; for (i = *winStreakLevel; i < NELEMS(battleHallWinStreakBP); i++) { @@ -461,9 +461,9 @@ BOOL ScrCmd_BufferBattleHallStreak(ScriptContext *ctx) { BOOL ScrCmd_BattleHallCountUsedSpecies(ScriptContext *ctx) { u32 i; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *result = ScriptGetVarPointer(ctx); - u32 numSpecies = 0; - u32 unk0 = 1; + u16 *result = ScriptGetVarPointer(ctx); + u32 numSpecies = 0; + u32 unk0 = 1; if (!Save_CheckExtraChunksExist(fieldSystem->saveData)) { *result = 0; return FALSE; @@ -493,9 +493,9 @@ BOOL ScrCmd_BattleHallCountUsedSpecies(ScriptContext *ctx) { BOOL ScrCmd_BattleHallGetTotalStreak(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *result = ScriptGetVarPointer(ctx); - u32 winStreak = 0; - u32 unk0 = 1; + u16 *result = ScriptGetVarPointer(ctx); + u32 winStreak = 0; + u32 unk0 = 1; if (!Save_CheckExtraChunksExist(fieldSystem->saveData)) { *result = 0; return FALSE; @@ -521,7 +521,7 @@ BOOL ScrCmd_697(ScriptContext *ctx) { u16 *result = ScriptGetVarPointer(ctx); FrontierSave_GetStat(Save_Frontier_GetStatic(ctx->fieldSystem->saveData), sub_0205C11C(0), 0xff); u32 unk0 = FrontierSave_GetStat(Save_Frontier_GetStatic(ctx->fieldSystem->saveData), sub_0205C0CC(0), 0xff); - *result = 0; + *result = 0; if (unk0 == 50) { *result = 1; } diff --git a/src/scrcmd_8.c b/src/scrcmd_8.c index 3577d7b602..319af28aaf 100644 --- a/src/scrcmd_8.c +++ b/src/scrcmd_8.c @@ -6,29 +6,29 @@ #include "unk_0202C730.h" BOOL ScrCmd_GetStaticEncounterOutcomeFlag(ScriptContext *ctx) { - u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); + u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); u16 *variable = ScriptGetVarPointer(ctx); - *variable = *winFlag; + *variable = *winFlag; return TRUE; } BOOL ScrCmd_465(ScriptContext *ctx) { - MessageFormat **msg = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + MessageFormat **msg = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); SAV_FRIEND_GRP *group = Save_FriendGroup_Get(ctx->fieldSystem->saveData); - SaveData *save = ctx->fieldSystem->saveData; + SaveData *save = ctx->fieldSystem->saveData; u16 var = ScriptReadHalfword(ctx); switch (var) { case 0: { - u16 var0 = ScriptGetVar(ctx); + u16 var0 = ScriptGetVar(ctx); u16 *retPtr = ScriptGetVarPointer(ctx); - *retPtr = sub_0202C860(group, var0); + *retPtr = sub_0202C860(group, var0); return FALSE; } case 1: { - u16 var0 = ScriptGetVar(ctx); + u16 var0 = ScriptGetVar(ctx); u16 *retPtr = ScriptGetVarPointer(ctx); - *retPtr = sub_0202C878(group, var0); + *retPtr = sub_0202C878(group, var0); return FALSE; } case 2: { @@ -44,7 +44,7 @@ BOOL ScrCmd_465(ScriptContext *ctx) { break; } case 4: { - u16 *r5 = sub_0202C7E0(group, 0, 0); + u16 *r5 = sub_0202C7E0(group, 0, 0); u16 *retPtr = ScriptGetVarPointer(ctx); CallTask_NamingScreen(ctx->taskman, NAME_SCREEN_GROUP, 0, PLAYER_NAME_LENGTH, 0, r5, retPtr); return TRUE; @@ -56,7 +56,7 @@ BOOL ScrCmd_465(ScriptContext *ctx) { return FALSE; } case 6: { - String *str = String_New(64, HEAP_ID_32); + String *str = String_New(64, HEAP_ID_32); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData); PlayerName_FlatToString(profile, str); sub_0202C7F8(group, 0, 1, str); diff --git a/src/scrcmd_9.c b/src/scrcmd_9.c index 4b8d213335..0798443c9c 100644 --- a/src/scrcmd_9.c +++ b/src/scrcmd_9.c @@ -41,8 +41,8 @@ static u32 sub_0204A2A8(UnkStruct_Fsys_A0 *unkStruct, u8 a1); static const u16 _020FBF70[] = { 141, 145, 142, 143, 144 }; BOOL ScrCmd_410(ScriptContext *ctx) { - u16 unk4 = ScriptReadHalfword(ctx); - u16 unk6 = ScriptReadHalfword(ctx); + u16 unk4 = ScriptReadHalfword(ctx); + u16 unk6 = ScriptReadHalfword(ctx); ctx->fieldSystem->unkA0 = sub_0204A824(FieldSystem_GetSaveData(ctx->fieldSystem), unk4, unk6); return FALSE; } @@ -60,10 +60,10 @@ BOOL ScrCmd_411(ScriptContext *ctx) { BOOL ScrCmd_412(ScriptContext *ctx) { void **unk; - u16 id = ScriptReadHalfword(ctx); - u16 arg = ScriptGetVar(ctx); - u16 resultVarId = ScriptReadHalfword(ctx); - u16 *result = GetVarPointer(ctx->fieldSystem, resultVarId); + u16 id = ScriptReadHalfword(ctx); + u16 arg = ScriptGetVar(ctx); + u16 resultVarId = ScriptReadHalfword(ctx); + u16 *result = GetVarPointer(ctx->fieldSystem, resultVarId); UnkStruct_Fsys_A0 *unkStruct = ctx->fieldSystem->unkA0; switch (id) { case 1: @@ -117,7 +117,7 @@ BOOL ScrCmd_412(ScriptContext *ctx) { sub_0204AA58(unkStruct, ctx->taskman, unk); return TRUE; case 31: - unk = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + unk = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); *result = sub_0204AA78(unkStruct, unk, ctx->fieldSystem->saveData); break; case 32: @@ -197,33 +197,33 @@ BOOL ScrCmd_412(ScriptContext *ctx) { BOOL ScrCmd_413(ScriptContext *ctx) { UnkStruct_Fsys_A0 *unkStruct = ctx->fieldSystem->unkA0; - u16 unk6 = ScriptGetVar(ctx); - u16 unk7 = ScriptGetVar(ctx); - u16 *speciesPtr = ScriptGetVarPointer(ctx); - u16 *movePtr = ScriptGetVarPointer(ctx); - *speciesPtr = unkStruct->unk298[unk6].unk30[unk7].species; - *movePtr = unkStruct->unk298[unk6].unk30[unk7].moves[0]; + u16 unk6 = ScriptGetVar(ctx); + u16 unk7 = ScriptGetVar(ctx); + u16 *speciesPtr = ScriptGetVarPointer(ctx); + u16 *movePtr = ScriptGetVarPointer(ctx); + *speciesPtr = unkStruct->unk298[unk6].unk30[unk7].species; + *movePtr = unkStruct->unk298[unk6].unk30[unk7].moves[0]; return FALSE; } BOOL ScrCmd_414(ScriptContext *ctx) { u16 *unk = ScriptGetVarPointer(ctx); - *unk = sub_020672D8(ctx->fieldSystem->saveData); + *unk = sub_020672D8(ctx->fieldSystem->saveData); return FALSE; } BOOL ScrCmd_415(ScriptContext *ctx) { u16 *unk = ScriptGetVarPointer(ctx); - *unk = sub_02067398(ctx->fieldSystem->saveData); + *unk = sub_02067398(ctx->fieldSystem->saveData); return FALSE; } BOOL ScrCmd_416(ScriptContext *ctx) { - u16 unk7 = ScriptGetVar(ctx); - u16 unk4 = ScriptGetVar(ctx); - u16 *unkPtr = ScriptGetVarPointer(ctx); + u16 unk7 = ScriptGetVar(ctx); + u16 unk4 = ScriptGetVar(ctx); + u16 *unkPtr = ScriptGetVarPointer(ctx); UnkStruct_Fsys_A0 *unkStruct = ctx->fieldSystem->unkA0; - *unkPtr = FALSE; + *unkPtr = FALSE; u32 unk0; switch (unk7) { case 0: @@ -256,8 +256,8 @@ BOOL ScrCmd_416(ScriptContext *ctx) { BOOL ScrCmd_417(ScriptContext *ctx) { UnkStruct_Fsys_A0 *unkStruct = ctx->fieldSystem->unkA0; - u16 unk6 = ScriptGetVar(ctx); - u16 unk7 = ScriptReadHalfword(ctx); + u16 unk6 = ScriptGetVar(ctx); + u16 unk7 = ScriptReadHalfword(ctx); if (sub_0205C298(ctx->fieldSystem->saveData) == 1) { sub_020672A4(ctx->fieldSystem->taskman, unk6, unk7); } else { @@ -270,11 +270,11 @@ BOOL ScrCmd_417(ScriptContext *ctx) { static BOOL sub_0204A1E8(ScriptContext *ctx) { UnkStruct_Fsys_A0 *unkStruct = ctx->fieldSystem->unkA0; - u16 *unkPtr = GetVarPointer(ctx->fieldSystem, unkStruct->unk8DA); - u32 unk = unkStruct->unk8D5 == 1 ? 1 : 2; + u16 *unkPtr = GetVarPointer(ctx->fieldSystem, unkStruct->unk8DA); + u32 unk = unkStruct->unk8D5 == 1 ? 1 : 2; if (unkStruct->unk8D4 == unk) { unkStruct->unk8D4 = 0; - *unkPtr = unkStruct->unk8D8; + *unkPtr = unkStruct->unk8D8; return TRUE; } else { return FALSE; @@ -293,7 +293,7 @@ BOOL ScrCmd_418(ScriptContext *ctx) { BOOL ScrCmd_419(ScriptContext *ctx) { u16 *unk = ScriptGetVarPointer(ctx); - *unk = sub_0202D7B8(sub_0202D928(ctx->fieldSystem->saveData)); + *unk = sub_0202D7B8(sub_0202D928(ctx->fieldSystem->saveData)); return FALSE; } @@ -312,14 +312,14 @@ static u32 sub_0204A2A8(UnkStruct_Fsys_A0 *unkStruct, u8 a1) { BOOL ScrCmd_554(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 *unk = ScriptGetVarPointer(ctx); - *unk = FrontierData_BattlePointAction(Save_FrontierData_Get(saveData), 0, 0); + u16 *unk = ScriptGetVarPointer(ctx); + *unk = FrontierData_BattlePointAction(Save_FrontierData_Get(saveData), 0, 0); return FALSE; } BOOL ScrCmd_555(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 unk = ScriptGetVar(ctx); + u16 unk = ScriptGetVar(ctx); GameStats_Add(Save_GameStats_Get(ctx->fieldSystem->saveData), GAME_STAT_BATTLE_POINTS, unk); FrontierData_BattlePointAction(Save_FrontierData_Get(saveData), unk, 5); return FALSE; @@ -327,7 +327,7 @@ BOOL ScrCmd_555(ScriptContext *ctx) { BOOL ScrCmd_556(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 unk = ScriptGetVar(ctx); + u16 unk = ScriptGetVar(ctx); GameStats_Add(Save_GameStats_Get(ctx->fieldSystem->saveData), GAME_STAT_UNK70, unk); FrontierData_BattlePointAction(Save_FrontierData_Get(saveData), unk, 6); return FALSE; @@ -335,8 +335,8 @@ BOOL ScrCmd_556(ScriptContext *ctx) { BOOL ScrCmd_CheckBattlePoints(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 unk = ScriptGetVar(ctx); - u16 *unkPtr = ScriptGetVarPointer(ctx); + u16 unk = ScriptGetVar(ctx); + u16 *unkPtr = ScriptGetVarPointer(ctx); if (FrontierData_BattlePointAction(Save_FrontierData_Get(saveData), 0, 0) < unk) { *unkPtr = FALSE; } else { diff --git a/src/scrcmd_apricorn.c b/src/scrcmd_apricorn.c index 0abac8d9e2..f27422aba2 100644 --- a/src/scrcmd_apricorn.c +++ b/src/scrcmd_apricorn.c @@ -5,28 +5,28 @@ #include "unk_02055418.h" BOOL ScrCmd_AnimApricornTree(ScriptContext *ctx) { - u16 varId = ScriptReadHalfword(ctx); + u16 varId = ScriptReadHalfword(ctx); LocalMapObject **lastInteracted = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - u16 *retPtr = GetVarPointer(ctx->fieldSystem, varId); + u16 *retPtr = GetVarPointer(ctx->fieldSystem, varId); FieldSystem_AnimApricornTree(ctx->fieldSystem, *lastInteracted, retPtr); return TRUE; } BOOL ScrCmd_ApricornTreeGetApricorn(ScriptContext *ctx) { - u16 varId = ScriptReadHalfword(ctx); + u16 varId = ScriptReadHalfword(ctx); LocalMapObject **lastInteracted = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - u16 *retPtr = GetVarPointer(ctx->fieldSystem, varId); - *retPtr = FieldSystem_ApricornTree_GetApricorn(ctx->fieldSystem, *lastInteracted); + u16 *retPtr = GetVarPointer(ctx->fieldSystem, varId); + *retPtr = FieldSystem_ApricornTree_GetApricorn(ctx->fieldSystem, *lastInteracted); return FALSE; } BOOL ScrCmd_GiveApricornFromTree(ScriptContext *ctx) { - u16 var0 = ScriptGetVar(ctx); - u8 var1 = ScriptGetVar(ctx); - u16 *retPtr = ScriptGetVarPointer(ctx); + u16 var0 = ScriptGetVar(ctx); + u8 var1 = ScriptGetVar(ctx); + u16 *retPtr = ScriptGetVarPointer(ctx); SaveApricornBox *apricornBox = Save_ApricornBox_Get(ctx->fieldSystem->saveData); - u8 var2 = var0; - int apricornCount = ApricornBox_CountApricorn(apricornBox, var2); + u8 var2 = var0; + int apricornCount = ApricornBox_CountApricorn(apricornBox, var2); if ((var1 + apricornCount) <= 99) { ApricornBox_GiveApricorn(apricornBox, var2, var1); diff --git a/src/scrcmd_battle.c b/src/scrcmd_battle.c index 98f2beb87c..fa67060559 100644 --- a/src/scrcmd_battle.c +++ b/src/scrcmd_battle.c @@ -24,17 +24,17 @@ BOOL ScrCmd_GetTrainerPathToPlayer(ScriptContext *ctx) { sp10 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_FIELD_04); FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_FIELD_08); FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_ID); - encounterType = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_ENCOUNTER_TYPE); + encounterType = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_ENCOUNTER_TYPE); localMapObject = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_EVENT); - r7 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_FIELD_18); + r7 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_FIELD_18); } else { sp18 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_FIELD_00); sp10 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_FIELD_04); FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_FIELD_08); FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_ID); - encounterType = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_ENCOUNTER_TYPE); + encounterType = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_ENCOUNTER_TYPE); localMapObject = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_EVENT); - r7 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_FIELD_18); + r7 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_FIELD_18); } *r7 = sub_0206457C(fieldSystem, *localMapObject, fieldSystem->playerAvatar, *sp10, *sp18, 0, *encounterType, trainerNum); @@ -44,7 +44,7 @@ BOOL ScrCmd_GetTrainerPathToPlayer(ScriptContext *ctx) { BOOL ScrCmd_TrainerStepTowardsPlayer(ScriptContext *ctx) { int *r5; u16 trainerNum = ScriptGetVar(ctx); - u16 *var1 = ScriptGetVarPointer(ctx); + u16 *var1 = ScriptGetVarPointer(ctx); *var1 = 0; if (trainerNum == 0) { @@ -60,7 +60,7 @@ BOOL ScrCmd_TrainerStepTowardsPlayer(ScriptContext *ctx) { if (sub_02064598() == TRUE) { sub_020645AC(*r5); - *r5 = 0; + *r5 = 0; *var1 = 1; } @@ -68,16 +68,16 @@ BOOL ScrCmd_TrainerStepTowardsPlayer(ScriptContext *ctx) { } BOOL ScrCmd_GetTrainerEyeType(ScriptContext *ctx) { - u16 *encounterType = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_ENCOUNTER_TYPE); + u16 *encounterType = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_ENCOUNTER_TYPE); u16 *retEncounterType = ScriptGetVarPointer(ctx); - *retEncounterType = *encounterType; + *retEncounterType = *encounterType; return FALSE; } BOOL ScrCmd_GetEyeTrainerNum(ScriptContext *ctx) { - u16 *trainerId0 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_ID); - u16 *trainerId1 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_ID); - u16 trainerNum = ScriptGetVar(ctx); + u16 *trainerId0 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ENGAGED_TRAINER_0_ID); + u16 *trainerId1 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ENGAGED_TRAINER_1_ID); + u16 trainerNum = ScriptGetVar(ctx); u16 *retTrainerId = ScriptGetVarPointer(ctx); if (trainerNum == 0) { @@ -90,21 +90,21 @@ BOOL ScrCmd_GetEyeTrainerNum(ScriptContext *ctx) { } BOOL ScrCmd_GetTrainerNum(ScriptContext *ctx) { - u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); + u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); u16 *retTrainerNum = ScriptGetVarPointer(ctx); - *retTrainerNum = ScriptNumToTrainerNum(*script); + *retTrainerNum = ScriptNumToTrainerNum(*script); return FALSE; } BOOL ScrCmd_TrainerBattle(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *script = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); - u32 *winFlag = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); - u16 var0 = ScriptGetVar(ctx); - u16 var1 = ScriptGetVar(ctx); - u8 var2 = ScriptReadByte(ctx); - u8 var3 = ScriptReadByte(ctx); - u16 followerTrainerNum = 0; + u16 *script = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); + u32 *winFlag = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); + u16 var0 = ScriptGetVar(ctx); + u16 var1 = ScriptGetVar(ctx); + u8 var2 = ScriptReadByte(ctx); + u8 var3 = ScriptReadByte(ctx); + u16 followerTrainerNum = 0; if (Save_VarsFlags_CheckHaveFollower(Save_VarsFlags_Get(ctx->fieldSystem->saveData)) == TRUE) { followerTrainerNum = Save_VarsFlags_GetFollowerTrainerNum(Save_VarsFlags_Get(fieldSystem->saveData)); @@ -116,17 +116,17 @@ BOOL ScrCmd_TrainerBattle(ScriptContext *ctx) { BOOL ScrCmd_MultiBattle(ScriptContext *ctx) { u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); - u16 var0 = ScriptGetVar(ctx); - u16 var1 = ScriptGetVar(ctx); - u16 var2 = ScriptGetVar(ctx); - u8 var3 = ScriptReadByte(ctx); + u16 var0 = ScriptGetVar(ctx); + u16 var1 = ScriptGetVar(ctx); + u16 var2 = ScriptGetVar(ctx); + u8 var3 = ScriptReadByte(ctx); SetupAndStartTrainerBattle(ctx->taskman, var1, var2, var0, 0, var3, HEAP_ID_FIELD, winFlag); return TRUE; } BOOL ScrCmd_GetTrainerMsgParams(ScriptContext *ctx) { - u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); + u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); u16 *msgPtr0 = ScriptGetVarPointer(ctx); u16 *msgPtr1 = ScriptGetVarPointer(ctx); u16 *msgPtr2 = ScriptGetVarPointer(ctx); @@ -155,7 +155,7 @@ BOOL ScrCmd_GetTrainerMsgParams(ScriptContext *ctx) { } BOOL ScrCmd_GetRematchMsgParams(ScriptContext *ctx) { - u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); + u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); u16 *msgPtr0 = ScriptGetVarPointer(ctx); u16 *msgPtr1 = ScriptGetVarPointer(ctx); u16 *msgPtr2 = ScriptGetVarPointer(ctx); @@ -184,14 +184,14 @@ BOOL ScrCmd_GetRematchMsgParams(ScriptContext *ctx) { } BOOL ScrCmd_TrainerIsDoubleBattle(ScriptContext *ctx) { - u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); + u16 *script = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); u16 *retDoubleBattle = ScriptGetVarPointer(ctx); - *retDoubleBattle = TrainerNumIsDouble(ScriptNumToTrainerNum(*script)); + *retDoubleBattle = TrainerNumIsDouble(ScriptNumToTrainerNum(*script)); return FALSE; } BOOL ScrCmd_EncounterMusic(ScriptContext *ctx) { - u16 var0 = ScriptGetVar(ctx); + u16 var0 = ScriptGetVar(ctx); BOOL isKanto = MapHeader_IsKanto(ctx->fieldSystem->location->mapId); BGM_SaveStateAndPlayNew(Trainer_GetEncounterMusic(var0, isKanto)); return TRUE; @@ -203,15 +203,15 @@ BOOL ScrCmd_WhiteOut(ScriptContext *ctx) { } BOOL ScrCmd_CheckBattleWon(ScriptContext *ctx) { - u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); + u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); u16 *retBattleWon = ScriptGetVarPointer(ctx); - *retBattleWon = IsBattleResultWin(*winFlag); + *retBattleWon = IsBattleResultWin(*winFlag); return TRUE; } BOOL ScrCmd_StaticWildWonOrCaughtCheck(ScriptContext *ctx) { u16 *retPtr = ScriptGetVarPointer(ctx); - u8 var0 = ScriptReadByte(ctx); + u8 var0 = ScriptReadByte(ctx); int val; if (var0 == 1) { @@ -226,14 +226,14 @@ BOOL ScrCmd_StaticWildWonOrCaughtCheck(ScriptContext *ctx) { BOOL Scrcmd_LatiCaughtCheck(ScriptContext *ctx) { u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); - u16 *retPtr = ScriptGetVarPointer(ctx); - *retPtr = IsBattleResultLatiCaught(*winFlag); + u16 *retPtr = ScriptGetVarPointer(ctx); + *retPtr = IsBattleResultLatiCaught(*winFlag); return TRUE; } BOOL ScrCmd_PartyCheckForDouble(ScriptContext *ctx) { u16 *doubleBattlePtr = ScriptGetVarPointer(ctx); - *doubleBattlePtr = HasEnoughAlivePokemonForDoubleBattle(SaveArray_Party_Get(ctx->fieldSystem->saveData)); + *doubleBattlePtr = HasEnoughAlivePokemonForDoubleBattle(SaveArray_Party_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -245,16 +245,16 @@ BOOL ScrCmd_223(ScriptContext *ctx) { BOOL ScrCmd_224(ScriptContext *ctx) { LocalMapObject **lastInteracted = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - u32 mapObjectId = MapObject_GetID(*lastInteracted); + u32 mapObjectId = MapObject_GetID(*lastInteracted); TrainerFlagSet(ctx->fieldSystem->saveData, (u16)mapObjectId); return FALSE; } BOOL ScrCmd_GotoIfTrainerDefeated(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; LocalMapObject **lastInteracted = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - u32 offset = ScriptReadWord(ctx); - u32 mapObjectId = MapObject_GetID(*lastInteracted); + u32 offset = ScriptReadWord(ctx); + u32 mapObjectId = MapObject_GetID(*lastInteracted); if (TrainerFlagCheck(fieldSystem->saveData, (u16)mapObjectId) == TRUE) { ScriptJump(ctx, ctx->script_ptr + offset); diff --git a/src/scrcmd_battle_arcade.c b/src/scrcmd_battle_arcade.c index 7904d9a977..56ca2d88b8 100644 --- a/src/scrcmd_battle_arcade.c +++ b/src/scrcmd_battle_arcade.c @@ -64,8 +64,8 @@ static const u8 unk_020FC3AC[] = { }; BOOL ScrCmd_643(ScriptContext *ctx) { - u16 arg0 = ScriptReadHalfword(ctx); - u16 arg1 = ScriptGetVar(ctx); + u16 arg0 = ScriptReadHalfword(ctx); + u16 arg1 = ScriptGetVar(ctx); u16 *result = ScriptGetVarPointer(ctx); sub_02030E88(ctx->fieldSystem->saveData); void *unk0 = sub_02030FA0(ctx->fieldSystem->saveData); @@ -121,9 +121,9 @@ static void sub_0204FFB0(SaveData *saveData, void *a1, u8 a2) { } BOOL ScrCmd_644(ScriptContext *ctx) { - u16 firstMon = ScriptGetVar(ctx); + u16 firstMon = ScriptGetVar(ctx); u16 secondMon = ScriptGetVar(ctx); - u16 *result = ScriptGetVarPointer(ctx); + u16 *result = ScriptGetVarPointer(ctx); sub_02050060(ctx->taskman, firstMon, secondMon, result); return TRUE; } @@ -133,7 +133,7 @@ static void sub_02050060(TaskManager *taskManager, u16 firstMon, u16 secondMon, memset(unk, 0, sizeof(UnkStruct_02050060)); unk->playerTeam[0] = firstMon; unk->playerTeam[1] = secondMon; - unk->result = result; + unk->result = result; sub_02091574(unk); TaskManager_Call(taskManager, sub_020500A0, unk); } @@ -167,16 +167,16 @@ static BOOL sub_020500A0(TaskManager *taskManager) { static void sub_0205011C(TaskManager *taskManager, void *a1, BattleArcadeChallengeType challengeType) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_0204FBDC *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0204FBDC)); + UnkStruct_0204FBDC *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0204FBDC)); MI_CpuFill8(unk, 0, sizeof(UnkStruct_0204FBDC)); unk->challengeType = challengeType; - unk->unk0c = a1; + unk->unk0c = a1; TaskManager_Call(fieldSystem->taskman, sub_02050150, unk); } static BOOL sub_02050150(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_0204FBDC *unk = TaskManager_GetEnvironment(taskManager); + UnkStruct_0204FBDC *unk = TaskManager_GetEnvironment(taskManager); switch (unk->state) { case 0: unk->state = sub_020501B8(unk, fieldSystem, HEAP_ID_FIELD); @@ -200,20 +200,20 @@ static BOOL sub_02050150(TaskManager *taskManager) { static u32 sub_020501B8(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem, u32 a2) { PartyMenuArgs *partyMenu = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); MIi_CpuClearFast(0, (u32 *)partyMenu, sizeof(PartyMenuArgs)); - partyMenu->party = SaveArray_Party_Get(fieldSystem->saveData); - partyMenu->bag = Save_Bag_Get(fieldSystem->saveData); - partyMenu->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - partyMenu->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - partyMenu->unk_25 = 0; - partyMenu->context = PARTY_MENU_CONTEXT_23; + partyMenu->party = SaveArray_Party_Get(fieldSystem->saveData); + partyMenu->bag = Save_Bag_Get(fieldSystem->saveData); + partyMenu->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + partyMenu->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + partyMenu->unk_25 = 0; + partyMenu->context = PARTY_MENU_CONTEXT_23; partyMenu->fieldSystem = fieldSystem; - partyMenu->partySlot = a0->partySlot; + partyMenu->partySlot = a0->partySlot; for (u8 i = 0; i < 3; i++) { partyMenu->selectedOrder[i] = a0->selectedOrder[i]; } - partyMenu->maxLevel = 100; - partyMenu->minMonsToSelect = 3; - partyMenu->maxMonsToSelect = 3; + partyMenu->maxLevel = 100; + partyMenu->minMonsToSelect = 3; + partyMenu->maxMonsToSelect = 3; partyMenu->menuInputStatePtr = &(fieldSystem->menuInputState); if (a0->challengeType == BATTLE_ARCADE_CHALLENGE_TYPE_MULTI) { partyMenu->minMonsToSelect = 2; @@ -243,20 +243,20 @@ static u32 sub_02050290(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem) { } static u32 sub_020502E0(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem, HeapID heapId) { - SaveData *saveData = fieldSystem->saveData; + SaveData *saveData = fieldSystem->saveData; PokemonSummaryArgs *unk = AllocFromHeapAtEnd(heapId, sizeof(PokemonSummaryArgs)); MI_CpuFill8(unk, 0, sizeof(PokemonSummaryArgs)); - unk->options = Save_PlayerData_GetOptionsAddr(saveData); - unk->party = SaveArray_Party_Get(saveData); + unk->options = Save_PlayerData_GetOptionsAddr(saveData); + unk->party = SaveArray_Party_Get(saveData); unk->natDexEnabled = SaveArray_IsNatDexEnabled(saveData); - unk->unk2C = sub_02088288(saveData); - unk->unk11 = 1; - unk->partySlot = a0->partySlot; - unk->partyCount = Party_GetCount(unk->party); - unk->moveToLearn = MOVE_NONE; - unk->unk12 = 0; - unk->ribbons = Save_SpecialRibbons_Get(saveData); - unk->isFlag982Set = sub_0208828C(saveData); + unk->unk2C = sub_02088288(saveData); + unk->unk11 = 1; + unk->partySlot = a0->partySlot; + unk->partyCount = Party_GetCount(unk->party); + unk->moveToLearn = MOVE_NONE; + unk->unk12 = 0; + unk->ribbons = Save_SpecialRibbons_Get(saveData); + unk->isFlag982Set = sub_0208828C(saveData); sub_02089D40(unk, unk_020FC3AC); sub_0208AD34(unk, Save_PlayerData_GetProfileAddr(saveData)); FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PokemonSummary, unk); @@ -269,7 +269,7 @@ static u32 sub_02050370(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem) { return 3; } PokemonSummaryArgs *pokemonSummaryArgs = *(a0->unk0c); - a0->partySlot = pokemonSummaryArgs->partySlot; + a0->partySlot = pokemonSummaryArgs->partySlot; FreeToHeap(pokemonSummaryArgs); *(a0->unk0c) = NULL; return 0; diff --git a/src/scrcmd_battle_castle.c b/src/scrcmd_battle_castle.c index cae7816b79..be5caec78b 100644 --- a/src/scrcmd_battle_castle.c +++ b/src/scrcmd_battle_castle.c @@ -64,11 +64,11 @@ static const u8 unk_020FC3A4[] = { }; BOOL ScrCmd_637(ScriptContext *ctx) { - u16 arg0 = ScriptReadHalfword(ctx); - u16 arg1 = ScriptGetVar(ctx); + u16 arg0 = ScriptReadHalfword(ctx); + u16 arg1 = ScriptGetVar(ctx); u16 *result = ScriptGetVarPointer(ctx); sub_02030CC8(ctx->fieldSystem->saveData); - u32 unk0 = sub_02030E08(ctx->fieldSystem->saveData); + u32 unk0 = sub_02030E08(ctx->fieldSystem->saveData); void *unk1 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); switch (arg0) { case 0: @@ -125,9 +125,9 @@ static void sub_0204FA14(SaveData *saveData, u32 a1, u8 a2) { } BOOL ScrCmd_638(ScriptContext *ctx) { - u16 firstMon = ScriptGetVar(ctx); + u16 firstMon = ScriptGetVar(ctx); u16 secondMon = ScriptGetVar(ctx); - u16 *result = ScriptGetVarPointer(ctx); + u16 *result = ScriptGetVarPointer(ctx); sub_0204FB20(ctx->taskman, firstMon, secondMon, result); return TRUE; } @@ -137,7 +137,7 @@ static void sub_0204FB20(TaskManager *taskManager, u16 firstMon, u16 secondMon, memset(unk, 0, sizeof(UnkStruct_0204FB20)); unk->playerTeam[0] = firstMon; unk->playerTeam[1] = secondMon; - unk->result = result; + unk->result = result; sub_02091574(unk); TaskManager_Call(taskManager, sub_0204FB60, unk); } @@ -171,16 +171,16 @@ static BOOL sub_0204FB60(TaskManager *taskManager) { static void sub_0204FBDC(TaskManager *taskManager, void *a1, BattleCastleChallengeType challengeType) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_0204FBDC *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0204FBDC)); + UnkStruct_0204FBDC *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0204FBDC)); MI_CpuFill8(unk, 0, sizeof(UnkStruct_0204FBDC)); unk->challengeType = challengeType; - unk->unk0c = a1; + unk->unk0c = a1; TaskManager_Call(fieldSystem->taskman, sub_0204FC10, unk); } static BOOL sub_0204FC10(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_0204FBDC *unk = TaskManager_GetEnvironment(taskManager); + UnkStruct_0204FBDC *unk = TaskManager_GetEnvironment(taskManager); switch (unk->state) { case 0: unk->state = sub_0204FC78(unk, fieldSystem, HEAP_ID_FIELD); @@ -204,20 +204,20 @@ static BOOL sub_0204FC10(TaskManager *taskManager) { static u32 sub_0204FC78(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem, HeapID unused) { PartyMenuArgs *partyMenu = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); MIi_CpuClearFast(0, (u32 *)partyMenu, sizeof(PartyMenuArgs)); - partyMenu->party = SaveArray_Party_Get(fieldSystem->saveData); - partyMenu->bag = Save_Bag_Get(fieldSystem->saveData); - partyMenu->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - partyMenu->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - partyMenu->unk_25 = 0; - partyMenu->context = PARTY_MENU_CONTEXT_23; + partyMenu->party = SaveArray_Party_Get(fieldSystem->saveData); + partyMenu->bag = Save_Bag_Get(fieldSystem->saveData); + partyMenu->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + partyMenu->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + partyMenu->unk_25 = 0; + partyMenu->context = PARTY_MENU_CONTEXT_23; partyMenu->fieldSystem = fieldSystem; - partyMenu->partySlot = a0->partySlot; + partyMenu->partySlot = a0->partySlot; for (u8 i = 0; i < 3; i++) { partyMenu->selectedOrder[i] = a0->selectedOrder[i]; } - partyMenu->maxLevel = 100; - partyMenu->minMonsToSelect = 3; - partyMenu->maxMonsToSelect = 3; + partyMenu->maxLevel = 100; + partyMenu->minMonsToSelect = 3; + partyMenu->maxMonsToSelect = 3; partyMenu->menuInputStatePtr = &(fieldSystem->menuInputState); if (a0->challengeType == BATTLE_CASTLE_CHALLENGE_TYPE_MULTI) { partyMenu->minMonsToSelect = 2; @@ -247,20 +247,20 @@ static u32 sub_0204FD50(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem) { } static u32 sub_0204FDA0(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem, HeapID heapId) { - SaveData *saveData = fieldSystem->saveData; + SaveData *saveData = fieldSystem->saveData; PokemonSummaryArgs *unk = AllocFromHeapAtEnd(heapId, sizeof(PokemonSummaryArgs)); MI_CpuFill8(unk, 0, sizeof(PokemonSummaryArgs)); - unk->options = Save_PlayerData_GetOptionsAddr(saveData); - unk->party = SaveArray_Party_Get(saveData); + unk->options = Save_PlayerData_GetOptionsAddr(saveData); + unk->party = SaveArray_Party_Get(saveData); unk->natDexEnabled = SaveArray_IsNatDexEnabled(saveData); - unk->unk2C = sub_02088288(saveData); - unk->unk11 = 1; - unk->partySlot = a0->partySlot; - unk->partyCount = Party_GetCount(unk->party); - unk->moveToLearn = 0; - unk->unk12 = 0; - unk->ribbons = Save_SpecialRibbons_Get(saveData); - unk->isFlag982Set = sub_0208828C(saveData); + unk->unk2C = sub_02088288(saveData); + unk->unk11 = 1; + unk->partySlot = a0->partySlot; + unk->partyCount = Party_GetCount(unk->party); + unk->moveToLearn = 0; + unk->unk12 = 0; + unk->ribbons = Save_SpecialRibbons_Get(saveData); + unk->isFlag982Set = sub_0208828C(saveData); sub_02089D40(unk, unk_020FC3A4); sub_0208AD34(unk, Save_PlayerData_GetProfileAddr(saveData)); FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PokemonSummary, unk); @@ -273,7 +273,7 @@ static u32 sub_0204FE30(UnkStruct_0204FBDC *a0, FieldSystem *fieldSystem) { return 3; } PokemonSummaryArgs *unk = *(a0->unk0c); - a0->partySlot = unk->partySlot; + a0->partySlot = unk->partySlot; FreeToHeap(unk); *(a0->unk0c) = NULL; return 0; diff --git a/src/scrcmd_c.c b/src/scrcmd_c.c index 8f512725ca..052ab92288 100644 --- a/src/scrcmd_c.c +++ b/src/scrcmd_c.c @@ -122,12 +122,12 @@ void Script_SetMonSeenFlagBySpecies(FieldSystem *fieldSystem, u16 species); #include "data/fieldmap.h" static const WindowTemplate _020FAC94 = { - .bgId = 3, - .left = 25, - .top = 13, - .width = 6, - .height = 4, - .palette = 13, + .bgId = 3, + .left = 25, + .top = 13, + .width = 6, + .height = 4, + .palette = 13, .baseTile = 0x021F, }; @@ -162,10 +162,10 @@ static BOOL RunPauseTimer(ScriptContext *ctx); BOOL ScrCmd_Wait(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 frames_to_wait = ScriptReadHalfword(ctx); - u16 ptr_offset = ScriptReadHalfword(ctx); - u16 *ret_ptr = GetVarPointer(fieldSystem, ptr_offset); - *ret_ptr = frames_to_wait; + u16 frames_to_wait = ScriptReadHalfword(ctx); + u16 ptr_offset = ScriptReadHalfword(ctx); + u16 *ret_ptr = GetVarPointer(fieldSystem, ptr_offset); + *ret_ptr = frames_to_wait; ctx->data[0] = ptr_offset; SetupNativeScript(ctx, RunPauseTimer); @@ -186,7 +186,7 @@ BOOL ScrCmd_DebugWatch(ScriptContext *ctx) { } BOOL ScrCmd_LoadByte(ScriptContext *ctx) { - u8 reg = ScriptReadByte(ctx); + u8 reg = ScriptReadByte(ctx); u8 value = ScriptReadByte(ctx); ctx->data[reg] = value; @@ -195,7 +195,7 @@ BOOL ScrCmd_LoadByte(ScriptContext *ctx) { } BOOL ScrCmd_LoadWord(ScriptContext *ctx) { - u8 reg = ScriptReadByte(ctx); + u8 reg = ScriptReadByte(ctx); u32 value = ScriptReadWord(ctx); ctx->data[reg] = value; @@ -204,7 +204,7 @@ BOOL ScrCmd_LoadWord(ScriptContext *ctx) { } BOOL ScrCmd_LoadByteFromAddr(ScriptContext *ctx) { - u8 reg = ScriptReadByte(ctx); + u8 reg = ScriptReadByte(ctx); u8 *address = (u8 *)ScriptReadWord(ctx); ctx->data[reg] = *address; @@ -214,14 +214,14 @@ BOOL ScrCmd_LoadByteFromAddr(ScriptContext *ctx) { BOOL ScrCmd_WriteByteToAddr(ScriptContext *ctx) { u8 *address = (u8 *)ScriptReadWord(ctx); - *address = ScriptReadByte(ctx); + *address = ScriptReadByte(ctx); return FALSE; } BOOL ScrCmd_SetPtrByte(ScriptContext *ctx) { u8 *address = (u8 *)ScriptReadWord(ctx); - u8 reg = ScriptReadByte(ctx); + u8 reg = ScriptReadByte(ctx); *address = ctx->data[reg]; @@ -230,7 +230,7 @@ BOOL ScrCmd_SetPtrByte(ScriptContext *ctx) { BOOL ScrCmd_CopyLocal(ScriptContext *ctx) { u8 dest_reg = ScriptReadByte(ctx); - u8 src_reg = ScriptReadByte(ctx); + u8 src_reg = ScriptReadByte(ctx); ctx->data[dest_reg] = ctx->data[src_reg]; @@ -239,7 +239,7 @@ BOOL ScrCmd_CopyLocal(ScriptContext *ctx) { BOOL ScrCmd_CopyByte(ScriptContext *ctx) { u8 *dest_address = (u8 *)ScriptReadWord(ctx); - u8 *src_address = (u8 *)ScriptReadWord(ctx); + u8 *src_address = (u8 *)ScriptReadWord(ctx); *dest_address = *src_address; @@ -329,12 +329,12 @@ BOOL ScrCmd_CompareVarToVar(ScriptContext *ctx) { } BOOL ScrCmd_RunScript(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - u8 *num_active_script_contexts = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); + FieldSystem *fieldSystem = ctx->fieldSystem; + u8 *num_active_script_contexts = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); ScriptContext **new_context_ptr = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SCRIPT_CONTEXT_1); u16 script_to_run = ScriptReadHalfword(ctx); - *new_context_ptr = CreateScriptContext(fieldSystem, script_to_run); + *new_context_ptr = CreateScriptContext(fieldSystem, script_to_run); (*num_active_script_contexts)++; return TRUE; @@ -343,14 +343,14 @@ BOOL ScrCmd_RunScript(ScriptContext *ctx) { static BOOL ScrNative_WaitStd(ScriptContext *ctx); BOOL ScrCmd_CallStd(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_07); - u8 *num_active_script_contexts = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); + FieldSystem *fieldSystem = ctx->fieldSystem; + u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_07); + u8 *num_active_script_contexts = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); ScriptContext **new_context_ptr = (ScriptContext **)FieldSysGetAttrAddr(fieldSystem, (ScriptEnvField)(SCRIPTENV_SCRIPT_CONTEXT_0 + *num_active_script_contexts)); - u16 script_to_run = ScriptReadHalfword(ctx); + u16 script_to_run = ScriptReadHalfword(ctx); ScriptContext *new_context = CreateScriptContext(fieldSystem, script_to_run); - *new_context_ptr = new_context; + *new_context_ptr = new_context; new_context->id = *num_active_script_contexts; (*num_active_script_contexts)++; @@ -363,16 +363,16 @@ BOOL ScrCmd_CallStd(ScriptContext *ctx) { static BOOL ScrNative_WaitStd(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_07); - u8 *unused = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); + u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_07); + u8 *unused = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); return (*unk & (1 << ctx->id)) == 0; } BOOL ScrCmd_RestartCurrentScript(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_07); - u8 *unused = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); + u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_07); + u8 *unused = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_CONTEXT_COUNT); *unk ^= (1 << (ctx->id - 1)); return FALSE; @@ -387,7 +387,7 @@ BOOL ScrCmd_GoTo(ScriptContext *ctx) { BOOL ScrCmd_ObjectGoTo(ScriptContext *ctx) { LocalMapObject **lmo = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - u8 id = ScriptReadByte(ctx); + u8 id = ScriptReadByte(ctx); u32 offset_in_script = ScriptReadWord(ctx); if (id == MapObject_GetID(*lmo)) { @@ -398,7 +398,7 @@ BOOL ScrCmd_ObjectGoTo(ScriptContext *ctx) { } BOOL ScrCmd_BgGoTo(ScriptContext *ctx) { - u32 bg = sub_02050658(ctx->taskman); + u32 bg = sub_02050658(ctx->taskman); u8 required_bg = ScriptReadByte(ctx); u32 offset_in_script = ScriptReadWord(ctx); @@ -410,7 +410,7 @@ BOOL ScrCmd_BgGoTo(ScriptContext *ctx) { } BOOL ScrCmd_DirectionGoTo(ScriptContext *ctx) { - u32 *direction = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_FACING_DIRECTION); + u32 *direction = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_FACING_DIRECTION); u8 required_direction = ScriptReadByte(ctx); u32 offset_in_script = ScriptReadWord(ctx); @@ -434,7 +434,7 @@ BOOL ScrCmd_Return(ScriptContext *ctx) { } BOOL ScrCmd_GoToIf(ScriptContext *ctx) { - u8 condition = ScriptReadByte(ctx); + u8 condition = ScriptReadByte(ctx); u32 offset_in_script = ScriptReadWord(ctx); if (sConditionTable[condition][ctx->comparisonResult] == 1) { @@ -445,7 +445,7 @@ BOOL ScrCmd_GoToIf(ScriptContext *ctx) { } BOOL ScrCmd_CallIf(ScriptContext *ctx) { - u8 condition = ScriptReadByte(ctx); + u8 condition = ScriptReadByte(ctx); u32 offset_in_script = ScriptReadWord(ctx); if (sConditionTable[condition][ctx->comparisonResult] == 1) { @@ -457,7 +457,7 @@ BOOL ScrCmd_CallIf(ScriptContext *ctx) { BOOL ScrCmd_SetFlag(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 flag_to_set = ScriptReadHalfword(ctx); + u16 flag_to_set = ScriptReadHalfword(ctx); FieldSystem_FlagSet(fieldSystem, flag_to_set); @@ -466,7 +466,7 @@ BOOL ScrCmd_SetFlag(ScriptContext *ctx) { BOOL ScrCmd_ClearFlag(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 flag_to_clear = ScriptReadHalfword(ctx); + u16 flag_to_clear = ScriptReadHalfword(ctx); FieldSystem_FlagClear(fieldSystem, flag_to_clear); @@ -475,7 +475,7 @@ BOOL ScrCmd_ClearFlag(ScriptContext *ctx) { BOOL ScrCmd_CheckFlag(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 flag_to_check = ScriptReadHalfword(ctx); + u16 flag_to_check = ScriptReadHalfword(ctx); ctx->comparisonResult = FieldSystem_FlagCheck(fieldSystem, flag_to_check); @@ -483,9 +483,9 @@ BOOL ScrCmd_CheckFlag(ScriptContext *ctx) { } BOOL ScrCmd_CheckFlagVar(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; u16 *flag_in_var_to_check = ScriptGetVarPointer(ctx); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); *ret_ptr = FieldSystem_FlagCheck(fieldSystem, *flag_in_var_to_check); @@ -494,7 +494,7 @@ BOOL ScrCmd_CheckFlagVar(ScriptContext *ctx) { BOOL ScrCmd_SetFlagVar(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *flag_in_var_to_set = ScriptGetVarPointer(ctx); + u16 *flag_in_var_to_set = ScriptGetVarPointer(ctx); FieldSystem_FlagSet(fieldSystem, *flag_in_var_to_set); @@ -502,7 +502,7 @@ BOOL ScrCmd_SetFlagVar(ScriptContext *ctx) { } BOOL ScrCmd_ClearFlagVar(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; u16 *flag_in_var_to_clear = ScriptGetVarPointer(ctx); FieldSystem_FlagClear(fieldSystem, *flag_in_var_to_clear); @@ -528,7 +528,7 @@ BOOL ScrCmd_ClearTrainerFlag(ScriptContext *ctx) { BOOL ScrCmd_CheckTrainerFlag(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 flag_to_check = ScriptGetVar(ctx); + u16 flag_to_check = ScriptGetVar(ctx); ctx->comparisonResult = TrainerFlagCheck(fieldSystem->saveData, flag_to_check); @@ -537,7 +537,7 @@ BOOL ScrCmd_CheckTrainerFlag(ScriptContext *ctx) { BOOL ScrCmd_AddVar(ScriptContext *ctx) { u16 *dest_var = ScriptGetVarPointer(ctx); - u16 addend = ScriptGetVar(ctx); + u16 addend = ScriptGetVar(ctx); *dest_var += addend; @@ -545,7 +545,7 @@ BOOL ScrCmd_AddVar(ScriptContext *ctx) { } BOOL ScrCmd_SubVar(ScriptContext *ctx) { - u16 *dest_var = ScriptGetVarPointer(ctx); + u16 *dest_var = ScriptGetVarPointer(ctx); u16 subtrahend = ScriptGetVar(ctx); *dest_var -= subtrahend; @@ -555,7 +555,7 @@ BOOL ScrCmd_SubVar(ScriptContext *ctx) { BOOL ScrCmd_SetVar(ScriptContext *ctx) { u16 *dest_var = ScriptGetVarPointer(ctx); - u16 value = ScriptReadHalfword(ctx); + u16 value = ScriptReadHalfword(ctx); *dest_var = value; @@ -564,7 +564,7 @@ BOOL ScrCmd_SetVar(ScriptContext *ctx) { BOOL ScrCmd_CopyVar(ScriptContext *ctx) { u16 *dest_var = ScriptGetVarPointer(ctx); - u16 *src_var = ScriptGetVarPointer(ctx); + u16 *src_var = ScriptGetVarPointer(ctx); *dest_var = *src_var; @@ -573,7 +573,7 @@ BOOL ScrCmd_CopyVar(ScriptContext *ctx) { BOOL ScrCmd_SetOrCopyVar(ScriptContext *ctx) { u16 *dest_var = ScriptGetVarPointer(ctx); - u16 src_var = ScriptGetVar(ctx); + u16 src_var = ScriptGetVar(ctx); *dest_var = src_var; @@ -589,7 +589,7 @@ BOOL ScrCmd_048(ScriptContext *ctx) { struct UnkStruct_Ov01_021EF4C4 unk_struct; ov01_021EF4C4(&unk_struct, ctx); unk_struct.textFrameDelay = 1; - unk_struct.unk1 = 1; + unk_struct.unk1 = 1; ov01_021EF4DC(ctx, ctx->msgdata, msg_no, FALSE, &unk_struct); } @@ -674,40 +674,40 @@ static BOOL sub_020410F0(ScriptContext *ctx) { BOOL ScrCmd_OpenMsg(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); + u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); sub_0205B514(fieldSystem->bgConfig, FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW), 3); sub_0205B564(FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW), Save_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveData)); fieldSystem->unkD2_6 = 1; - *unk = 1; + *unk = 1; return FALSE; } BOOL ScrCmd_CloseMsg(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - Window *window = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); - u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); + Window *window = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); + u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); ClearFrameAndWindow2(window, 0); RemoveWindow(window); fieldSystem->unkD2_6 = 0; - *unk = 0; + *unk = 0; return FALSE; } BOOL ScrCmd_HoldMsg(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - Window *window = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); - u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); + Window *window = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW); + u8 *unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_FIELD_08); RemoveWindow(window); fieldSystem->unkD2_6 = 0; - *unk = 0; + *unk = 0; return FALSE; } @@ -716,12 +716,12 @@ static BOOL sub_02041270(ScriptContext *ctx); BOOL ScrCmd_062(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *var_8008 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8008); - u16 *var_8004 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8004); - u16 *var_8009 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8009); - u16 *var_800A = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800A); - u16 *var_8005 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8005); - u16 *var_800B = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800B); + u16 *var_8008 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8008); + u16 *var_8004 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8004); + u16 *var_8009 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8009); + u16 *var_800A = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800A); + u16 *var_8005 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8005); + u16 *var_800B = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800B); *var_8008 = ScriptReadByte(ctx); *var_8004 = ScriptReadByte(ctx); @@ -736,12 +736,12 @@ BOOL ScrCmd_062(ScriptContext *ctx) { static BOOL sub_02041270(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *var_8008 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8008); - u16 *var_8009 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8009); - u16 *var_800A = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800A); - u16 *var_800B = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800B); - u16 *var_8004 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8004); - u16 *var_8005 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8005); + u16 *var_8008 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8008); + u16 *var_8009 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8009); + u16 *var_800A = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800A); + u16 *var_800B = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_800B); + u16 *var_8004 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8004); + u16 *var_8005 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SPECIAL_VAR_8005); if (*var_8004 == 0 && *var_8005 == 0) { return TRUE; @@ -778,12 +778,12 @@ BOOL ScrCmd_DirectionSignpost(ScriptContext *ctx) { u8 unk2; FieldSystem *fieldSystem = ctx->fieldSystem; - String **tmp_str = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); - String **unk1 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 msg_no = ScriptReadByte(ctx); - unk2 = ScriptReadByte(ctx); - u16 arrow = ScriptReadHalfword(ctx); + String **tmp_str = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); + String **unk1 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 msg_no = ScriptReadByte(ctx); + unk2 = ScriptReadByte(ctx); + u16 arrow = ScriptReadHalfword(ctx); u16 unused_result_var_id = ScriptReadHalfword(ctx); fieldSystem->unkD2_6 = 1; @@ -802,8 +802,8 @@ BOOL ScrCmd_DirectionSignpost(ScriptContext *ctx) { BOOL ScrCmd_055(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 unk1 = ScriptReadByte(ctx); - u16 unk2 = ScriptReadHalfword(ctx); + u8 unk1 = ScriptReadByte(ctx); + u16 unk2 = ScriptReadHalfword(ctx); fieldSystem->unkD2_6 = 1; @@ -838,12 +838,12 @@ static BOOL sub_02041520(ScriptContext *ctx); BOOL ScrCmd_TrainerTips(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 *printer_id_ptr = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); - String **tmp_str = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); - String **unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 msg_no = ScriptReadByte(ctx); - u16 result_var_id = ScriptReadHalfword(ctx); + u8 *printer_id_ptr = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); + String **tmp_str = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_1); + String **unk = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 msg_no = ScriptReadByte(ctx); + u16 result_var_id = ScriptReadHalfword(ctx); ReadMsgDataIntoString(ctx->msgdata, msg_no, *tmp_str); StringExpandPlaceholders(*msg_fmt, *unk, *tmp_str); @@ -852,8 +852,8 @@ BOOL ScrCmd_TrainerTips(ScriptContext *ctx) { TextFlags_SetAutoScrollParam(AUTO_SCROLL_OFF); TextFlags_SetCanTouchSpeedUpPrint(FALSE); - Window *window = ov01_021F3D80(fieldSystem->unk68); - u8 text_speed = Options_GetTextFrameDelay(Save_PlayerData_GetOptionsAddr(fieldSystem->saveData)); + Window *window = ov01_021F3D80(fieldSystem->unk68); + u8 text_speed = Options_GetTextFrameDelay(Save_PlayerData_GetOptionsAddr(fieldSystem->saveData)); *printer_id_ptr = AddTextPrinterParameterizedWithColor(window, 1, *unk, 0, 0, text_speed, MAKE_TEXT_COLOR(2, 10, 15), NULL); ctx->data[0] = result_var_id; @@ -863,9 +863,9 @@ BOOL ScrCmd_TrainerTips(ScriptContext *ctx) { static BOOL sub_02041520(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 *printer_id_ptr = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); - u16 *ret_ptr = GetVarPointer(fieldSystem, ctx->data[0]); - u8 unused = ov01_021F3D84(fieldSystem->unk68); + u8 *printer_id_ptr = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); + u16 *ret_ptr = GetVarPointer(fieldSystem, ctx->data[0]); + u8 unused = ov01_021F3D84(fieldSystem->unk68); u16 direction = 0xFFFF; @@ -888,7 +888,7 @@ static BOOL sub_02041520(ScriptContext *ctx) { if (direction != 0xFFFF) { RemoveTextPrinter(*printer_id_ptr); PlayerAvatar_SetFacingDirection(ctx->fieldSystem->playerAvatar, direction); - *ret_ptr = 0; + *ret_ptr = 0; ctx->fieldSystem->unkD2_6 = 0; return TRUE; } @@ -906,12 +906,12 @@ BOOL ScrCmd_060(ScriptContext *ctx) { static BOOL sub_020415E0(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *ret_ptr = GetVarPointer(fieldSystem, ctx->data[0]); - u16 direction = 0xFFFF; - int new_keys = gSystem.newKeys; + u16 *ret_ptr = GetVarPointer(fieldSystem, ctx->data[0]); + u16 direction = 0xFFFF; + int new_keys = gSystem.newKeys; if ((new_keys & (PAD_BUTTON_A | PAD_BUTTON_B)) != 0) { - *ret_ptr = 0; + *ret_ptr = 0; fieldSystem->unkD2_6 = 0; return TRUE; } @@ -928,7 +928,7 @@ static BOOL sub_020415E0(ScriptContext *ctx) { if (direction != 0xFFFF) { PlayerAvatar_SetFacingDirection(ctx->fieldSystem->playerAvatar, direction); - *ret_ptr = 0; + *ret_ptr = 0; fieldSystem->unkD2_6 = 0; return TRUE; } @@ -942,21 +942,21 @@ BOOL ScrCmd_061(ScriptContext *ctx) { } BOOL ScrCmd_YesNo(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct ListMenu2D **listMenu2D = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LIST_MENU_2D); - u16 data = ScriptReadHalfword(ctx); + u16 data = ScriptReadHalfword(ctx); LoadUserFrameGfx1(fieldSystem->bgConfig, GF_BG_LYR_MAIN_3, 0x3D9, 11, 0, HEAP_ID_4); - *listMenu2D = Std_CreateYesNoMenu(fieldSystem->bgConfig, &_020FAC94, 0x3D9, 11, HEAP_ID_4); + *listMenu2D = Std_CreateYesNoMenu(fieldSystem->bgConfig, &_020FAC94, 0x3D9, 11, HEAP_ID_4); ctx->data[0] = data; SetupNativeScript(ctx, sub_020416E4); return TRUE; } BOOL sub_020416E4(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct ListMenu2D **listMenu2D = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LIST_MENU_2D); - u16 *ret_p = GetVarPointer(fieldSystem, ctx->data[0]); - int selection = Handle2dMenuInput_DeleteOnFinish(*listMenu2D, HEAP_ID_4); + u16 *ret_p = GetVarPointer(fieldSystem, ctx->data[0]); + int selection = Handle2dMenuInput_DeleteOnFinish(*listMenu2D, HEAP_ID_4); if (selection == LIST_NOTHING_CHOSEN) { return FALSE; } else { @@ -970,9 +970,9 @@ BOOL sub_020416E4(ScriptContext *ctx) { } BOOL ScrCmd_AddWaitingIcon(ScriptContext *ctx) { - Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW); + Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW); WaitingIcon **waitingIcon = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WAITING_ICON); - *waitingIcon = WaitingIcon_New(window, 0x3E2); + *waitingIcon = WaitingIcon_New(window, 0x3E2); return FALSE; } @@ -984,14 +984,14 @@ BOOL ScrCmd_RemoveWaitingIcon(ScriptContext *ctx) { static void sub_02041770(ScriptContext *ctx, struct UnkStruct_ov01_021EDC28 **a1, MsgData *msgData) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msgFmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 x = ScriptReadByte(ctx); - u8 y = ScriptReadByte(ctx); - u8 initCursorPos = ScriptReadByte(ctx); - u8 cancellable = ScriptReadByte(ctx); - u16 var = ScriptReadHalfword(ctx); - *a1 = ov01_021EDF78(fieldSystem, x, y, initCursorPos, cancellable, GetVarPointer(fieldSystem, var), *msgFmt, FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW), msgData); - ctx->data[0] = var; + MessageFormat **msgFmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 x = ScriptReadByte(ctx); + u8 y = ScriptReadByte(ctx); + u8 initCursorPos = ScriptReadByte(ctx); + u8 cancellable = ScriptReadByte(ctx); + u16 var = ScriptReadHalfword(ctx); + *a1 = ov01_021EDF78(fieldSystem, x, y, initCursorPos, cancellable, GetVarPointer(fieldSystem, var), *msgFmt, FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW), msgData); + ctx->data[0] = var; } BOOL ScrCmd_064(ScriptContext *ctx) { @@ -1006,16 +1006,16 @@ BOOL ScrCmd_065(ScriptContext *ctx) { BOOL ScrCmd_066(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u8 msgId = ScriptReadByte(ctx); - u8 value = ScriptReadByte(ctx); + u8 msgId = ScriptReadByte(ctx); + u8 value = ScriptReadByte(ctx); ov01_021EDC7C(*pp_menu, msgId, value); return FALSE; } BOOL ScrCmd_559(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u16 msgId = ScriptGetVar(ctx); - u16 value = ScriptGetVar(ctx); + u16 msgId = ScriptGetVar(ctx); + u16 value = ScriptGetVar(ctx); ov01_021EDC7C(*pp_menu, msgId, value); return FALSE; } @@ -1043,8 +1043,8 @@ BOOL ScrCmd_585(ScriptContext *ctx) { } BOOL sub_02041900(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_var = GetVarPointer(fieldSystem, ctx->data[0]); + FieldSystem *fieldSystem = ctx->fieldSystem; + u16 *p_var = GetVarPointer(fieldSystem, ctx->data[0]); struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MENU_WINDOW); if (*p_var == 0xEEEE) { if (sub_0205A478(fieldSystem->unk80)) { @@ -1071,9 +1071,9 @@ BOOL ScrCmd_069(ScriptContext *ctx) { BOOL ScrCmd_070(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u16 r6 = ScriptGetVar(ctx); - u16 r7 = ScriptGetVar(ctx); - u16 r3 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 r3 = ScriptGetVar(ctx); MoveTutorMenu_SetListItem(*pp_menu, (u8)r6, (u8)r7, (u8)r3); return FALSE; } @@ -1087,7 +1087,7 @@ BOOL ScrCmd_071(ScriptContext *ctx) { BOOL ScrCmd_695(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u16 var = ScriptGetVar(ctx); + u16 var = ScriptGetVar(ctx); ov01_021EE014(*pp_menu, var); SetupNativeScript(ctx, sub_020418B4); return TRUE; @@ -1095,8 +1095,8 @@ BOOL ScrCmd_695(ScriptContext *ctx) { BOOL ScrCmd_677(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u16 *var1 = ScriptGetVarPointer(ctx); - u16 *var2 = ScriptGetVarPointer(ctx); + u16 *var1 = ScriptGetVarPointer(ctx); + u16 *var2 = ScriptGetVarPointer(ctx); ov01_021EE0EC(*pp_menu, var1, var2); SetupNativeScript(ctx, sub_020418B4); return TRUE; @@ -1104,7 +1104,7 @@ BOOL ScrCmd_677(ScriptContext *ctx) { BOOL ScrCmd_072(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u8 val = ScriptReadByte(ctx); + u8 val = ScriptReadByte(ctx); ov01_021EE974(*pp_menu, val); SetupNativeScript(ctx, sub_020418B4); return TRUE; @@ -1112,21 +1112,21 @@ BOOL ScrCmd_072(ScriptContext *ctx) { BOOL ScrCmd_841(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u8 val = ScriptReadByte(ctx); + u8 val = ScriptReadByte(ctx); ov01_021EF018(*pp_menu, val); return TRUE; } BOOL ScrCmd_842(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **pp_menu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MENU_WINDOW); - u8 val = ScriptReadByte(ctx); + u8 val = ScriptReadByte(ctx); ov01_021EF034(*pp_menu, val); return TRUE; } BOOL ScrCmd_ApplyMovement(ScriptContext *ctx) { - u16 person = ScriptGetVar(ctx); - u32 offset = ScriptReadWord(ctx); + u16 person = ScriptGetVar(ctx); + u32 offset = ScriptReadWord(ctx); LocalMapObject *object = sub_02041C70(ctx->fieldSystem, person); EventObjectMovementMan *movementMan; u8 *movementCounter; @@ -1138,7 +1138,7 @@ BOOL ScrCmd_ApplyMovement(ScriptContext *ctx) { if (person == obj_partner_poke) { ov01_021F7704(object); } - movementMan = EventObjectMovementMan_Create(object, (const MovementScriptCommand *)(ctx->script_ptr + offset)); + movementMan = EventObjectMovementMan_Create(object, (const MovementScriptCommand *)(ctx->script_ptr + offset)); movementCounter = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_MOVEMENT_COUNTER); (*movementCounter)++; _ScheduleObjectEventMovement(ctx->fieldSystem, movementMan, NULL); @@ -1147,8 +1147,8 @@ BOOL ScrCmd_ApplyMovement(ScriptContext *ctx) { BOOL ScrCmd_563(ScriptContext *ctx) { u16 person = ScriptGetVar(ctx); - u16 x = ScriptGetVar(ctx); - u16 z = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 z = ScriptGetVar(ctx); u16 now_x, now_z; int i; LocalMapObject *object = sub_02041C70(ctx->fieldSystem, person); @@ -1157,32 +1157,32 @@ BOOL ScrCmd_563(ScriptContext *ctx) { u8 *movementCounter; GF_ASSERT(object != NULL); - cmd = AllocFromHeap(HEAP_ID_4, 64 * sizeof(MovementScriptCommand)); + cmd = AllocFromHeap(HEAP_ID_4, 64 * sizeof(MovementScriptCommand)); now_x = MapObject_GetCurrentX(object); now_z = MapObject_GetCurrentZ(object); - i = 0; + i = 0; if (now_x < x) { cmd[i].command = MOVEMENT_STEP_RIGHT; - cmd[i].length = x - now_x; + cmd[i].length = x - now_x; i++; } else if (now_x > x) { cmd[i].command = MOVEMENT_STEP_LEFT; - cmd[i].length = now_x - x; + cmd[i].length = now_x - x; i++; } if (now_z < z) { cmd[i].command = MOVEMENT_STEP_UP; - cmd[i].length = z - now_z; + cmd[i].length = z - now_z; i++; } else if (now_z > z) { cmd[i].command = MOVEMENT_STEP_DOWN; - cmd[i].length = now_z - z; + cmd[i].length = now_z - z; i++; } cmd[i].command = MOVEMENT_STEP_END; - cmd[i].length = 0; + cmd[i].length = 0; - movementMan = EventObjectMovementMan_Create(object, cmd); + movementMan = EventObjectMovementMan_Create(object, cmd); movementCounter = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_MOVEMENT_COUNTER); (*movementCounter)++; _ScheduleObjectEventMovement(ctx->fieldSystem, movementMan, cmd); @@ -1229,8 +1229,8 @@ void _ScheduleObjectEventMovement(FieldSystem *fieldSystem, EventObjectMovementM } env->fieldSystem = fieldSystem; env->movementMan = movementMan; - env->cmd = a2; - env->task = SysTask_CreateOnMainQueue((SysTaskFunc)_RunObjectEventMovement, env, 0); + env->cmd = a2; + env->task = SysTask_CreateOnMainQueue((SysTaskFunc)_RunObjectEventMovement, env, 0); } void _RunObjectEventMovement(SysTask *task, struct ObjectMovementTaskEnv *env) { @@ -1293,9 +1293,9 @@ static inline void _ResetMovementPauseWaitFlags(void) { } static BOOL _WaitMovementPauseBeforeMsg(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LAST_INTERACTED); - LocalMapObject *playerObj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); + LocalMapObject *playerObj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); LocalMapObject *unk; if (_CheckMovementPauseWaitFlag(1)) { @@ -1342,11 +1342,11 @@ BOOL _WaitFollowMonPaused(ScriptContext *ctx) { } BOOL ScrCmd_LockLastTalked(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LAST_INTERACTED); - LocalMapObject *playerObject = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); - LocalMapObject *unk = MapObjectManager_GetFirstActiveObjectWithMovement(fieldSystem->mapObjectManager, 0x30); - LocalMapObject *unk2 = sub_020660C0(*p_lastInteracted); + FieldSystem *fieldSystem = ctx->fieldSystem; + LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LAST_INTERACTED); + LocalMapObject *playerObject = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); + LocalMapObject *unk = MapObjectManager_GetFirstActiveObjectWithMovement(fieldSystem->mapObjectManager, 0x30); + LocalMapObject *unk2 = sub_020660C0(*p_lastInteracted); MapObjectManager *mapObjectManager = fieldSystem->mapObjectManager; _ResetMovementPauseWaitFlags(); @@ -1384,8 +1384,8 @@ BOOL ScrCmd_ReleaseAll(ScriptContext *ctx) { BOOL ScrCmd_098(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 objectId = ScriptReadHalfword(ctx); - LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objectId); + u16 objectId = ScriptReadHalfword(ctx); + LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objectId); if (object != NULL) { MapObject_PauseMovement(object); } else { @@ -1396,8 +1396,8 @@ BOOL ScrCmd_098(ScriptContext *ctx) { BOOL ScrCmd_099(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 objectId = ScriptReadHalfword(ctx); - LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objectId); + u16 objectId = ScriptReadHalfword(ctx); + LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objectId); if (object != NULL) { MapObject_UnpauseMovement(object); } else { @@ -1407,9 +1407,9 @@ BOOL ScrCmd_099(ScriptContext *ctx) { } BOOL ScrCmd_ShowPerson(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - u16 objectId = ScriptGetVar(ctx); - u32 nobjs = Field_GetNumObjectEvents(fieldSystem); + FieldSystem *fieldSystem = ctx->fieldSystem; + u16 objectId = ScriptGetVar(ctx); + u32 nobjs = Field_GetNumObjectEvents(fieldSystem); const ObjectEvent *objectEvents = Field_GetObjectEvents(fieldSystem); GF_ASSERT(MapObject_CreateFromObjectEventWithId(fieldSystem->mapObjectManager, objectId, nobjs, fieldSystem->location->mapId, objectEvents)); return FALSE; @@ -1417,8 +1417,8 @@ BOOL ScrCmd_ShowPerson(ScriptContext *ctx) { BOOL ScrCmd_HidePerson(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 objectId = ScriptGetVar(ctx); - LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objectId); + u16 objectId = ScriptGetVar(ctx); + LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objectId); if (object == NULL) { GF_ASSERT(0); } else { @@ -1428,8 +1428,8 @@ BOOL ScrCmd_HidePerson(ScriptContext *ctx) { } BOOL ScrCmd_102(ScriptContext *ctx) { - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); LocalMapObject **p_cameraObj = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_CAMERA_TARGET); VecFx32 *pos; *p_cameraObj = MapObject_Create(ctx->fieldSystem->mapObjectManager, x, y, 0, SPRITE_CAMERA_FOCUS, 0, ctx->fieldSystem->location->mapId); @@ -1453,10 +1453,10 @@ BOOL ScrCmd_103(ScriptContext *ctx) { } BOOL ScrCmd_678(ScriptContext *ctx) { - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); LocalMapObject **p_cameraObj = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_CAMERA_TARGET); - *p_cameraObj = MapObject_Create(ctx->fieldSystem->mapObjectManager, x, y, 0, SPRITE_CAMERA_FOCUS, 0, ctx->fieldSystem->location->mapId); + *p_cameraObj = MapObject_Create(ctx->fieldSystem->mapObjectManager, x, y, 0, SPRITE_CAMERA_FOCUS, 0, ctx->fieldSystem->location->mapId); sub_02061070(*p_cameraObj); MapObject_SetVisible(*p_cameraObj, TRUE); MapObject_ClearFlag18(*p_cameraObj, FALSE); @@ -1470,8 +1470,8 @@ BOOL ScrCmd_679(ScriptContext *ctx) { } BOOL ScrCmd_FacePlayer(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - u32 rvsDir = sub_020611F4(PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar)); + FieldSystem *fieldSystem = ctx->fieldSystem; + u32 rvsDir = sub_020611F4(PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar)); LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LAST_INTERACTED); u32 oldDir; int x, y; @@ -1510,8 +1510,8 @@ BOOL ScrCmd_FacePlayer(ScriptContext *ctx) { BOOL ScrCmd_GetPlayerCoords(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_x = ScriptGetVarPointer(ctx); - u16 *p_y = ScriptGetVarPointer(ctx); + u16 *p_x = ScriptGetVarPointer(ctx); + u16 *p_y = ScriptGetVarPointer(ctx); *p_x = GetPlayerXCoord(fieldSystem->playerAvatar); *p_y = GetPlayerZCoord(fieldSystem->playerAvatar); @@ -1520,10 +1520,10 @@ BOOL ScrCmd_GetPlayerCoords(ScriptContext *ctx) { BOOL ScrCmd_GetPersonCoords(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 personId = ScriptGetVar(ctx); - LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, personId); - u16 *p_x = ScriptGetVarPointer(ctx); - u16 *p_z = ScriptGetVarPointer(ctx); + u16 personId = ScriptGetVar(ctx); + LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, personId); + u16 *p_x = ScriptGetVarPointer(ctx); + u16 *p_z = ScriptGetVarPointer(ctx); if (object != NULL) { *p_x = MapObject_GetCurrentX(object); @@ -1538,7 +1538,7 @@ BOOL ScrCmd_GetPersonCoords(ScriptContext *ctx) { BOOL ScrCmd_GetPlayerFacing(ScriptContext *ctx) { u16 *p_direction = ScriptGetVarPointer(ctx); - *p_direction = PlayerAvatar_GetFacingDirection(ctx->fieldSystem->playerAvatar); + *p_direction = PlayerAvatar_GetFacingDirection(ctx->fieldSystem->playerAvatar); return FALSE; } @@ -1559,17 +1559,17 @@ BOOL ScrCmd_107(ScriptContext *ctx) { } BOOL ScrCmd_108(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); + u16 objectId = ScriptGetVar(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); - u8 arg = ScriptReadByte(ctx); + u8 arg = ScriptReadByte(ctx); MapObject_SetKeep(object, (BOOL)arg); return FALSE; } BOOL ScrCmd_109(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); + u16 objectId = ScriptGetVar(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); - u16 arg = ScriptReadHalfword(ctx); + u16 arg = ScriptReadHalfword(ctx); if (object != NULL) { sub_0205FC94(object, arg); } @@ -1577,9 +1577,9 @@ BOOL ScrCmd_109(ScriptContext *ctx) { } BOOL ScrCmd_574(ScriptContext *ctx) { - u16 *p_dest = ScriptGetVarPointer(ctx); - *p_dest = 0; - u16 objectId = ScriptGetVar(ctx); + u16 *p_dest = ScriptGetVarPointer(ctx); + *p_dest = 0; + u16 objectId = ScriptGetVar(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); if (object != NULL) { *p_dest = MapObject_GetMovement(object); @@ -1589,33 +1589,33 @@ BOOL ScrCmd_574(ScriptContext *ctx) { BOOL ScrCmd_136(ScriptContext *ctx) { u16 partyIdx = ScriptGetVar(ctx); - u16 *p_dest = ScriptGetVarPointer(ctx); - *p_dest = GetMonUnownLetter(Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIdx)); + u16 *p_dest = ScriptGetVarPointer(ctx); + *p_dest = GetMonUnownLetter(Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIdx)); return FALSE; } BOOL ScrCmd_PartySelectUI(ScriptContext *ctx) { PartyMenuArgs **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *partyMenu = PartyMenu_LaunchApp_Unk2(HEAP_ID_32, ctx->fieldSystem); + *partyMenu = PartyMenu_LaunchApp_Unk2(HEAP_ID_32, ctx->fieldSystem); SetupNativeScript(ctx, ScrNative_WaitApplication); return TRUE; } BOOL ScrCmd_566(ScriptContext *ctx) { // todo: trade screen PartyMenuArgs **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *partyMenu = PartyMenu_LaunchApp_InGameTrade(HEAP_ID_32, ctx->fieldSystem); + *partyMenu = PartyMenu_LaunchApp_InGameTrade(HEAP_ID_32, ctx->fieldSystem); SetupNativeScript(ctx, ScrNative_WaitApplication); return TRUE; } BOOL ScrCmd_350(ScriptContext *ctx) { // todo: union pokemon selection PartyMenuArgs **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *partyMenu = TaskManager_LaunchPartyMenu_UnionRoomBattleSelect(ctx->fieldSystem->taskman, HEAP_ID_32); + *partyMenu = TaskManager_LaunchPartyMenu_UnionRoomBattleSelect(ctx->fieldSystem->taskman, HEAP_ID_32); return TRUE; } BOOL ScrCmd_PartySelect(ScriptContext *ctx) { // todo: get selected pokemon slot - u16 *dest_p = ScriptGetVarPointer(ctx); + u16 *dest_p = ScriptGetVarPointer(ctx); PartyMenuArgs **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); GF_ASSERT(*partyMenu != NULL); *dest_p = PartyMenuArgs_GetSlot(*partyMenu); @@ -1628,8 +1628,8 @@ BOOL ScrCmd_PartySelect(ScriptContext *ctx) { // todo: get selected pokemon slot } BOOL ScrCmd_635(ScriptContext *ctx) { - u16 *r5 = ScriptGetVarPointer(ctx); - u16 *r6 = ScriptGetVarPointer(ctx); + u16 *r5 = ScriptGetVarPointer(ctx); + u16 *r6 = ScriptGetVarPointer(ctx); PartyMenuArgs **partyMenuPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); PartyMenuArgs *partyMenu; int partySlot; @@ -1652,11 +1652,11 @@ BOOL ScrCmd_635(ScriptContext *ctx) { } BOOL ScrCmd_639(ScriptContext *ctx) { - u16 *r5 = ScriptGetVarPointer(ctx); - u16 *sp0 = ScriptGetVarPointer(ctx); - u16 *r7 = ScriptGetVarPointer(ctx); + u16 *r5 = ScriptGetVarPointer(ctx); + u16 *sp0 = ScriptGetVarPointer(ctx); + u16 *r7 = ScriptGetVarPointer(ctx); struct PartyMenuArgs **partyMenuPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - struct PartyMenuArgs *partyMenu = *partyMenuPtr; + struct PartyMenuArgs *partyMenu = *partyMenuPtr; GF_ASSERT(partyMenu != NULL); int partySlot = PartyMenuArgs_GetSlot(*partyMenuPtr); if (partySlot == 7) { @@ -1677,11 +1677,11 @@ BOOL ScrCmd_639(ScriptContext *ctx) { } BOOL ScrCmd_645(ScriptContext *ctx) { - u16 *r5 = ScriptGetVarPointer(ctx); - u16 *sp0 = ScriptGetVarPointer(ctx); - u16 *r7 = ScriptGetVarPointer(ctx); + u16 *r5 = ScriptGetVarPointer(ctx); + u16 *sp0 = ScriptGetVarPointer(ctx); + u16 *r7 = ScriptGetVarPointer(ctx); struct PartyMenuArgs **partyMenuPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - struct PartyMenuArgs *partyMenu = *partyMenuPtr; + struct PartyMenuArgs *partyMenu = *partyMenuPtr; GF_ASSERT(partyMenu != NULL); int partySlot = PartyMenuArgs_GetSlot(*partyMenuPtr); if (partySlot == 7) { @@ -1702,8 +1702,8 @@ BOOL ScrCmd_645(ScriptContext *ctx) { } BOOL ScrCmd_GetMoveSelection(ScriptContext *ctx) { - u8 r6 = ScriptReadByte(ctx); - u16 *r5 = ScriptGetVarPointer(ctx); + u8 r6 = ScriptReadByte(ctx); + u16 *r5 = ScriptGetVarPointer(ctx); UnkStruct_0203E600 **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); // presumably move selection data? GF_ASSERT(*p_work != NULL); if (r6 == 1) { @@ -1717,10 +1717,10 @@ BOOL ScrCmd_GetMoveSelection(ScriptContext *ctx) { } BOOL ScrCmd_PokemonSummaryScreen(ScriptContext *ctx) { - void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); u8 onlySkillsPanel = ScriptReadByte(ctx); - u16 partySlot = ScriptGetVar(ctx); - u16 moveToLearn = ScriptGetVar(ctx); + u16 partySlot = ScriptGetVar(ctx); + u16 moveToLearn = ScriptGetVar(ctx); if (onlySkillsPanel == TRUE) { *p_work = LearnForgetMove_LaunchApp(HEAP_ID_32, ctx->fieldSystem, partySlot, moveToLearn); } else { @@ -1731,8 +1731,8 @@ BOOL ScrCmd_PokemonSummaryScreen(ScriptContext *ctx) { } BOOL ScrCmd_GetPhoneBookRematch(ScriptContext *ctx) { - u16 r4 = ScriptGetVar(ctx); - u16 *r6 = ScriptGetVarPointer(ctx); + u16 r4 = ScriptGetVar(ctx); + u16 *r6 = ScriptGetVarPointer(ctx); struct PhoneBook *phoneBook = AllocAndReadPhoneBook(HEAP_ID_32); HandleLoadOverlay(FS_OVERLAY_ID(OVY_26), OVY_LOAD_ASYNC); *r6 = PhoneBookTrainerGetRematchInfo(r4, ctx->fieldSystem->saveData, phoneBook, (TimeOfDayWildParam)(u8)Field_GetTimeOfDayWildParam(ctx->fieldSystem)); @@ -1743,13 +1743,13 @@ BOOL ScrCmd_GetPhoneBookRematch(ScriptContext *ctx) { BOOL ScrCmd_684(ScriptContext *ctx) { u16 *p_dest = ScriptGetVarPointer(ctx); - *p_dest = LocalFieldData_GetWeatherType(Save_LocalFieldData_Get(ctx->fieldSystem->saveData)); + *p_dest = LocalFieldData_GetWeatherType(Save_LocalFieldData_Get(ctx->fieldSystem->saveData)); return FALSE; } BOOL ScrNative_WaitApplication_DestroyTaskData(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - void **p_work = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + void **p_work = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_RUNNING_APP_DATA); if (FieldSystem_ApplicationIsRunning(fieldSystem)) { return FALSE; } @@ -1760,7 +1760,7 @@ BOOL ScrNative_WaitApplication_DestroyTaskData(ScriptContext *ctx) { static BOOL sub_020429A0(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - void **p_work = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + void **p_work = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_RUNNING_APP_DATA); if (FieldSystem_ApplicationIsRunning(fieldSystem)) { return FALSE; } @@ -1772,7 +1772,7 @@ static BOOL sub_020429A0(ScriptContext *ctx) { static BOOL sub_020429D4(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - void **p_work = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + void **p_work = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_RUNNING_APP_DATA); if (!sub_020970C0(*p_work)) { return FALSE; } @@ -1821,8 +1821,8 @@ static FashionAppData *sub_02042A60(HeapID heapId, FieldSystem *fieldSystem, int fashionAppData = AllocFromHeap(heapId, sizeof(FashionAppData)); memset(fashionAppData, 0, sizeof(FashionAppData)); fashionAppData->saveFashionData = saveFashionData; - fashionAppData->unk_8 = a2; - fashionAppData->unk_4 = a3; + fashionAppData->unk_8 = a2; + fashionAppData->unk_4 = a3; return fashionAppData; } @@ -1838,22 +1838,22 @@ BOOL ScrCmd_152(ScriptContext *ctx) { BOOL ScrCmd_153(ScriptContext *ctx) { struct FashionAppData **p_data = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u16 *p_dest = ScriptGetVarPointer(ctx); - *p_dest = (*p_data)->unk_4; + u16 *p_dest = ScriptGetVarPointer(ctx); + *p_dest = (*p_data)->unk_4; FreeToHeap(*p_data); return FALSE; } BOOL ScrCmd_451(ScriptContext *ctx) { u16 *p_dest = ScriptGetVarPointer(ctx); - *p_dest = sub_0203769C(); + *p_dest = sub_0203769C(); return TRUE; } BOOL ScrCmd_452(ScriptContext *ctx) { struct PokepicManager **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 species = ScriptGetVar(ctx); - u16 gender = ScriptGetVar(ctx); + u16 species = ScriptGetVar(ctx); + u16 gender = ScriptGetVar(ctx); LoadUserFrameGfx1(ctx->fieldSystem->bgConfig, GF_BG_LYR_MAIN_3, 0x3D9, 0xB, 0, HEAP_ID_4); *p_work = DrawPokemonPicFromSpecies(ctx->fieldSystem->bgConfig, GF_BG_LYR_MAIN_3, 10, 5, 11, 0x3D9, species, gender, HEAP_ID_4); Script_SetMonSeenFlagBySpecies(ctx->fieldSystem, species); @@ -1862,8 +1862,8 @@ BOOL ScrCmd_452(ScriptContext *ctx) { BOOL ScrCmd_547(ScriptContext *ctx) { struct PokepicManager **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 partyIdx = ScriptGetVar(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIdx); + u16 partyIdx = ScriptGetVar(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIdx); LoadUserFrameGfx1(ctx->fieldSystem->bgConfig, GF_BG_LYR_MAIN_3, 0x3D9, 0xB, 0, HEAP_ID_4); *p_work = DrawPokemonPicFromMon(ctx->fieldSystem->bgConfig, GF_BG_LYR_MAIN_3, 10, 5, 11, 0x3D9, mon, HEAP_ID_4); return FALSE; @@ -1871,13 +1871,13 @@ BOOL ScrCmd_547(ScriptContext *ctx) { BOOL ScrCmd_453(ScriptContext *ctx) { u8 **r0 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - **r0 = 1; + **r0 = 1; return TRUE; } BOOL ScrCmd_548(ScriptContext *ctx) { u8 **r0 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - **r0 = 2; + **r0 = 2; return TRUE; } @@ -1888,7 +1888,7 @@ BOOL ScrCmd_549(ScriptContext *ctx) { } BOOL sub_02042C78(ScriptContext *ctx) { - u8 **r0 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); + u8 **r0 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); u16 *dest_p = GetVarPointer(ctx->fieldSystem, ctx->data[0]); return **r0 != 3; } @@ -1910,7 +1910,7 @@ BOOL ScrCmd_681(ScriptContext *ctx) { } BOOL ScrCmd_154(ScriptContext *ctx) { - u16 r4 = ScriptGetVar(ctx); + u16 r4 = ScriptGetVar(ctx); u16 *r6 = ScriptGetVarPointer(ctx); u16 sp0 = ScriptGetVar(ctx); sub_0203F198(ctx->fieldSystem->taskman, r6, ctx->fieldSystem->saveData, r4, sp0); @@ -1919,9 +1919,9 @@ BOOL ScrCmd_154(ScriptContext *ctx) { BOOL ScrCmd_155(ScriptContext *ctx) { struct FashionAppData **fashionAppData = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u16 r7 = ScriptReadHalfword(ctx); - u16 *r6 = ScriptGetVarPointer(ctx); - *fashionAppData = sub_02042A60(HEAP_ID_FIELD, ctx->fieldSystem, 0, r7); + u16 r7 = ScriptReadHalfword(ctx); + u16 *r6 = ScriptGetVarPointer(ctx); + *fashionAppData = sub_02042A60(HEAP_ID_FIELD, ctx->fieldSystem, 0, r7); if (*fashionAppData == NULL) { *r6 = 1; return TRUE; @@ -1934,7 +1934,7 @@ BOOL ScrCmd_155(ScriptContext *ctx) { } BOOL ScrCmd_255(ScriptContext *ctx) { - u16 r6 = ScriptReadHalfword(ctx); + u16 r6 = ScriptReadHalfword(ctx); u16 *r4 = ScriptGetVarPointer(ctx); if (sub_02042A30(ctx->fieldSystem, 0, r6) == TRUE) { *r4 = 1; @@ -1964,16 +1964,16 @@ BOOL ScrCmd_156(ScriptContext *ctx) { BOOL ScrCmd_TownMap(ScriptContext *ctx) { PokegearArgs **p_townMap = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *p_townMap = PokegearTownMap_LaunchApp(ctx->fieldSystem, 1); + *p_townMap = PokegearTownMap_LaunchApp(ctx->fieldSystem, 1); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } BOOL ScrCmd_408(ScriptContext *ctx) { - u16 r7 = ScriptGetVar(ctx); - u16 sp0 = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 sp0 = ScriptGetVar(ctx); UnkOv67Args **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *p_work = AllocFromHeap(HEAP_ID_FIELD, sizeof(struct UnkOv67Args)); + *p_work = AllocFromHeap(HEAP_ID_FIELD, sizeof(struct UnkOv67Args)); InitUnkStructScrCmd408(*p_work, r7, sp0, ctx); sub_0203F0A8(ctx->fieldSystem, *p_work); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); @@ -1983,7 +1983,7 @@ BOOL ScrCmd_408(ScriptContext *ctx) { BOOL ScrCmd_158(ScriptContext *ctx) { // todo: PC box screen PCBoxArgs **p_work; - p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); *p_work = PCBoxAppData_New(ctx); PCBox_LaunchApp(ctx->fieldSystem, *p_work); SetupNativeScript(ctx, sub_020429A0); @@ -2008,7 +2008,7 @@ BOOL ScrCmd_161(ScriptContext *ctx) { BOOL ScrCmd_162(ScriptContext *ctx) { void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *p_work = sub_0203F4F8(ctx->fieldSystem); + *p_work = sub_0203F4F8(ctx->fieldSystem); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } @@ -2021,7 +2021,7 @@ BOOL ScrCmd_HOF_Credits(ScriptContext *ctx) { BOOL ScrCmd_164(ScriptContext *ctx) { HallOfFame **hof = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); // todo: hall of fame data - *hof = HallOfFameShowcase_LaunchApp(ctx->fieldSystem); + *hof = HallOfFameShowcase_LaunchApp(ctx->fieldSystem); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } @@ -2029,8 +2029,8 @@ BOOL ScrCmd_164(ScriptContext *ctx) { BOOL ScrCmd_706(ScriptContext *ctx) { int saveOk; HallOfFame *hof = LoadHallOfFame(ctx->fieldSystem->saveData, HEAP_ID_4, &saveOk); - u16 *p_var = ScriptGetVarPointer(ctx); - *p_var = 0; + u16 *p_var = ScriptGetVarPointer(ctx); + *p_var = 0; if (saveOk == 2) { *p_var = 1; } @@ -2039,7 +2039,7 @@ BOOL ScrCmd_706(ScriptContext *ctx) { } BOOL ScrCmd_165(ScriptContext *ctx) { - u16 r6 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); u16 *r4 = ScriptGetVarPointer(ctx); if (sub_0203A05C(ctx->fieldSystem->saveData)) { *r4 = 1; @@ -2065,7 +2065,7 @@ BOOL ScrCmd_ChooseStarter(ScriptContext *ctx) { BOOL ScrCmd_333(ScriptContext *ctx) { // todo: bag select screen void **p_work; u8 pocketType = ScriptReadByte(ctx) != 0 ? POCKET_TYPE_BERRIES : POCKET_TYPE_ITEMS; - p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); GF_ASSERT(*p_work == NULL); *p_work = Bag_LaunchApp_WithPocket(ctx->fieldSystem, pocketType); SetupNativeScript(ctx, ScrNative_WaitApplication); @@ -2073,7 +2073,7 @@ BOOL ScrCmd_333(ScriptContext *ctx) { // todo: bag select screen } BOOL ScrCmd_334(ScriptContext *ctx) { // todo: bag select screen result - u16 *r5 = ScriptGetVarPointer(ctx); + u16 *r5 = ScriptGetVarPointer(ctx); void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); GF_ASSERT(*p_work != NULL); *r5 = BagView_SelectResult(*p_work); @@ -2085,7 +2085,7 @@ BOOL ScrCmd_334(ScriptContext *ctx) { // todo: bag select screen result BOOL ScrCmd_370(ScriptContext *ctx) { // unknown? possibly daycare select screen?? void **p_work; u8 pocketType = ScriptReadByte(ctx) != 0 ? POCKET_TYPE_BERRIES : POCKET_TYPE_ITEMS; - p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); + p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); GF_ASSERT(*p_work == NULL); *p_work = Bag_LaunchApp_WithPocket(ctx->fieldSystem, pocketType); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); @@ -2106,7 +2106,7 @@ BOOL ScrCmd_NameRival(ScriptContext *ctx) { BOOL ScrCmd_NicknameInput(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 partyPos = ScriptGetVar(ctx); + u16 partyPos = ScriptGetVar(ctx); BugContest *contest; Pokemon *mon; u16 nickname[20]; @@ -2131,15 +2131,15 @@ BOOL ScrCmd_NicknameInput(ScriptContext *ctx) { BOOL ScrCmd_629(ScriptContext *ctx) { void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *p_work = sub_0209707C(ctx->fieldSystem); + *p_work = sub_0209707C(ctx->fieldSystem); SetupNativeScript(ctx, sub_020429D4); return TRUE; } BOOL ScrCmd_630(ScriptContext *ctx) { u16 *ret_p = ScriptGetVarPointer(ctx); - u32 r5 = sub_0205A894(); - u32 r0 = sub_02029084(); + u32 r5 = sub_0205A894(); + u32 r0 = sub_02029084(); if (r5 == r0) { *ret_p = FALSE; } else { @@ -2149,9 +2149,9 @@ BOOL ScrCmd_630(ScriptContext *ctx) { } BOOL ScrCmd_492(ScriptContext *ctx) { - u16 r4 = ScriptGetVar(ctx); + u16 r4 = ScriptGetVar(ctx); UnkStruct_0203E8C8 *r6 = (UnkStruct_0203E8C8 *)ScriptGetVarPointer(ctx); - u16 *r3 = ScriptGetVarPointer(ctx); + u16 *r3 = ScriptGetVarPointer(ctx); *r3 = 0xFFFF; sub_0203E960(ctx->fieldSystem->taskman, r4, r6, r3, NULL); @@ -2160,8 +2160,8 @@ BOOL ScrCmd_492(ScriptContext *ctx) { BOOL ScrCmd_PromptEasyChat(ScriptContext *ctx) { UnkStruct_0203E8C8 *r6 = (UnkStruct_0203E8C8 *)ScriptGetVarPointer(ctx); - u16 *r4 = ScriptGetVarPointer(ctx); - u16 *r0 = ScriptGetVarPointer(ctx); + u16 *r4 = ScriptGetVarPointer(ctx); + u16 *r0 = ScriptGetVarPointer(ctx); *r4 = 0xFFFF; *r0 = 0xFFFF; @@ -2171,17 +2171,17 @@ BOOL ScrCmd_PromptEasyChat(ScriptContext *ctx) { BOOL ScrCmd_494(ScriptContext *ctx) { MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 idx = ScriptGetVar(ctx); - u16 word = ScriptGetVar(ctx); + u16 idx = ScriptGetVar(ctx); + u16 word = ScriptGetVar(ctx); BufferECWord(*p_msgFmt, idx, word); return FALSE; } BOOL ScrCmd_FadeScreen(ScriptContext *ctx) { u16 duration = ScriptReadHalfword(ctx); - u16 speed = ScriptReadHalfword(ctx); - u16 type = ScriptReadHalfword(ctx); - u16 color = ScriptReadHalfword(ctx); + u16 speed = ScriptReadHalfword(ctx); + u16 type = ScriptReadHalfword(ctx); + u16 color = ScriptReadHalfword(ctx); BeginNormalPaletteFade(0, type, type, color, duration, speed, HEAP_ID_4); sub_0200FBDC(0); sub_0200FBDC(1); @@ -2200,20 +2200,20 @@ BOOL sub_02043458(ScriptContext *ctx) { } BOOL ScrCmd_Warp(ScriptContext *ctx) { - u16 mapId = ScriptGetVar(ctx); - u16 unused = ScriptReadHalfword(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 mapId = ScriptGetVar(ctx); + u16 unused = ScriptReadHalfword(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); u16 direction = ScriptGetVar(ctx); CallTask_ScriptWarp(ctx->taskman, mapId, -1, x, y, direction); return TRUE; } BOOL ScrCmd_448(ScriptContext *ctx) { - u16 mapId = ScriptReadHalfword(ctx); - u16 unused = ScriptReadHalfword(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 mapId = ScriptReadHalfword(ctx); + u16 unused = ScriptReadHalfword(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); u16 direction = ScriptReadHalfword(ctx); sub_0205412C(ctx->fieldSystem->taskman, mapId, -1, x, y, direction); return TRUE; @@ -2226,19 +2226,19 @@ BOOL ScrCmd_449(ScriptContext *ctx) { BOOL ScrCmd_445(ScriptContext *ctx) { Location *location = LocalFieldData_GetPreviousPosition(Save_LocalFieldData_Get(ctx->fieldSystem->saveData)); - u16 *ret_p = ScriptGetVarPointer(ctx); - *ret_p = location->mapId; + u16 *ret_p = ScriptGetVarPointer(ctx); + *ret_p = location->mapId; return FALSE; } BOOL ScrCmd_446(ScriptContext *ctx) { u16 *ret_p = ScriptGetVarPointer(ctx); - *ret_p = ctx->fieldSystem->location->mapId; + *ret_p = ctx->fieldSystem->location->mapId; return FALSE; } BOOL ScrCmd_840(ScriptContext *ctx) { - u16 mapId = ScriptGetVar(ctx); + u16 mapId = ScriptGetVar(ctx); u16 *ret_p = ScriptGetVarPointer(ctx); *ret_p = 0; @@ -2252,21 +2252,21 @@ BOOL ScrCmd_840(ScriptContext *ctx) { } BOOL ScrCmd_RockClimb(ScriptContext *ctx) { - u16 partySlot = ScriptGetVar(ctx); + u16 partySlot = ScriptGetVar(ctx); int playerDirection = PlayerAvatar_GetFacingDirection(ctx->fieldSystem->playerAvatar); CallFieldTask_RockClimb(ctx->taskman, playerDirection, partySlot); return TRUE; } BOOL ScrCmd_Surf(ScriptContext *ctx) { - u16 partySlot = ScriptGetVar(ctx); + u16 partySlot = ScriptGetVar(ctx); int playerDirection = PlayerAvatar_GetFacingDirection(ctx->fieldSystem->playerAvatar); CallFieldTask_Surf(ctx->taskman, playerDirection, partySlot); return TRUE; } BOOL ScrCmd_Waterfall(ScriptContext *ctx) { - u16 partySlot = ScriptGetVar(ctx); + u16 partySlot = ScriptGetVar(ctx); int playerDirection = PlayerAvatar_GetFacingDirection(ctx->fieldSystem->playerAvatar); CallFieldTask_Waterfall(ctx->taskman, playerDirection, partySlot); return TRUE; @@ -2274,8 +2274,8 @@ BOOL ScrCmd_Waterfall(ScriptContext *ctx) { BOOL ScrCmd_180(ScriptContext *ctx) { u16 mapId = ScriptReadHalfword(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); sub_020538C0(ctx->fieldSystem, mapId, -1, x, y, DIR_SOUTH); return TRUE; } @@ -2288,7 +2288,7 @@ BOOL ScrCmd_FlashEffect(ScriptContext *ctx) { } BOOL ScrCmd_Whirlpool(ScriptContext *ctx) { - u16 partySlot = ScriptGetVar(ctx); + u16 partySlot = ScriptGetVar(ctx); int playerDirection = PlayerAvatar_GetFacingDirection(ctx->fieldSystem->playerAvatar); CallFieldTask_Whirlpool(ctx->taskman, playerDirection, partySlot); return TRUE; @@ -2297,11 +2297,11 @@ BOOL ScrCmd_Whirlpool(ScriptContext *ctx) { BOOL sub_0204378C(ScriptContext *ctx); BOOL ScrCmd_183(ScriptContext *ctx) { - void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 partyIdx = ScriptGetVar(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIdx); + void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); + u16 partyIdx = ScriptGetVar(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIdx); int playerGender = PlayerAvatar_GetGender(ctx->fieldSystem->playerAvatar); - *p_work = ov02_02249458(ctx->fieldSystem, 0, mon, playerGender); + *p_work = ov02_02249458(ctx->fieldSystem, 0, mon, playerGender); SetupNativeScript(ctx, sub_0204378C); return TRUE; } @@ -2355,7 +2355,7 @@ BOOL ScrCmd_186(ScriptContext *ctx) { BOOL ScrCmd_GetPlayerState(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = PlayerAvatar_GetState(ctx->fieldSystem->playerAvatar); + *p_ret = PlayerAvatar_GetState(ctx->fieldSystem->playerAvatar); return FALSE; } @@ -2372,15 +2372,15 @@ BOOL ScrCmd_UpdateAvatarState(ScriptContext *ctx) { BOOL ScrCmd_211(ScriptContext *ctx) { RoamerSaveData *roamerSave = Save_Roamers_Get(ctx->fieldSystem->saveData); - u16 *r6 = ScriptGetVarPointer(ctx); - u16 *r4 = ScriptGetVarPointer(ctx); + u16 *r6 = ScriptGetVarPointer(ctx); + u16 *r4 = ScriptGetVarPointer(ctx); GetSwarmInfoFromRand(Roamers_GetRand(roamerSave, 2), r6, r4); return FALSE; } BOOL ScrCmd_GetStarterChoice(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Save_VarsFlags_GetStarter(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); + *p_ret = Save_VarsFlags_GetStarter(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -2393,11 +2393,11 @@ BOOL ScrCmd_SetStarterChoice(ScriptContext *ctx) { BOOL ScrCmd_TrainerMessage(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_scripno = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); + u16 *p_scripno = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); String **p_strbuf1 = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_STRING_BUFFER_0); - u8 *p_printerno = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); - u16 trainerno = ScriptGetVar(ctx); - u16 msgno = ScriptGetVar(ctx); + u8 *p_printerno = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_TEXT_PRINTER_NUMBER); + u16 trainerno = ScriptGetVar(ctx); + u16 msgno = ScriptGetVar(ctx); GetTrainerMessageByIdPair(trainerno, msgno, *p_strbuf1, HEAP_ID_FIELD); FillWindowPixelBuffer(FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_WINDOW), 15); @@ -2414,10 +2414,10 @@ BOOL sub_02043A98(ScriptContext *ctx); BOOL ScrCmd_226(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 r7 = ScriptGetVar(ctx); - u16 sp0 = ScriptGetVar(ctx); - u16 sp4 = ScriptGetVar(ctx); - u16 r6 = ScriptReadHalfword(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 sp0 = ScriptGetVar(ctx); + u16 sp4 = ScriptGetVar(ctx); + u16 r6 = ScriptReadHalfword(ctx); ov03_02255BB0(fieldSystem, r7, sp0, sp4); ctx->data[0] = r6; SetupNativeScript(ctx, sub_02043A98); @@ -2439,10 +2439,10 @@ BOOL sub_02043B30(ScriptContext *ctx); BOOL ScrCmd_227(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 r7 = ScriptGetVar(ctx); - u16 sp0 = ScriptGetVar(ctx); - u16 sp4 = ScriptGetVar(ctx); - u16 r6 = ScriptReadHalfword(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 sp0 = ScriptGetVar(ctx); + u16 sp4 = ScriptGetVar(ctx); + u16 r6 = ScriptReadHalfword(ctx); ov03_02255C18(fieldSystem, r7, sp0, sp4); ctx->data[0] = r6; SetupNativeScript(ctx, sub_02043B30); @@ -2472,7 +2472,7 @@ BOOL ScrCmd_229(ScriptContext *ctx) { BOOL ScrCmd_230(ScriptContext *ctx) { struct UnkStruct_ScrCmd230 **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - struct UnkStruct_ScrCmd230 *work = *p_work; + struct UnkStruct_ScrCmd230 *work = *p_work; CallTask_020508B8(ctx->fieldSystem->taskman, &work->unk_30, 5); FreeToHeap(work); *p_work = NULL; @@ -2486,58 +2486,58 @@ BOOL ScrCmd_231(ScriptContext *ctx) { BOOL ScrCmd_SetDynamicWarp(ScriptContext *ctx) { Location warp; - warp.mapId = ScriptGetVar(ctx); - warp.warpId = ScriptGetVar(ctx); - warp.x = ScriptGetVar(ctx); - warp.y = ScriptGetVar(ctx); + warp.mapId = ScriptGetVar(ctx); + warp.warpId = ScriptGetVar(ctx); + warp.x = ScriptGetVar(ctx); + warp.y = ScriptGetVar(ctx); warp.direction = ScriptGetVar(ctx); LocalFieldData_SetDynamicWarp(Save_LocalFieldData_Get(ctx->fieldSystem->saveData), &warp); return FALSE; } BOOL ScrCmd_GetDynamicWarpFloorNo(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); Location *warp = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(ctx->fieldSystem->saveData)); - *p_ret = MapNumToFloorNo(warp->mapId); + *p_ret = MapNumToFloorNo(warp->mapId); return FALSE; } BOOL ScrCmd_ElevatorCurFloorBox(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; MessageFormat **p_msgFmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 x = ScriptReadByte(ctx); - u8 y = ScriptReadByte(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - u16 floor = ScriptGetVar(ctx); + u8 x = ScriptReadByte(ctx); + u8 y = ScriptReadByte(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + u16 floor = ScriptGetVar(ctx); PrintCurFloorInNewWindow(fieldSystem, x, y, p_ret, *p_msgFmt, floor); return FALSE; } BOOL ScrCmd_CountJohtoDexSeen(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Pokedex_CountJohtoDexSeen(pokedex); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Pokedex_CountJohtoDexSeen(pokedex); return FALSE; } BOOL ScrCmd_CountJohtoDexOwned(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Pokedex_CountJohtoDexOwned(pokedex); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Pokedex_CountJohtoDexOwned(pokedex); return FALSE; } BOOL ScrCmd_CountNationalDexSeen(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Pokedex_CountNationalDexSeen(pokedex); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Pokedex_CountNationalDexSeen(pokedex); return FALSE; } BOOL ScrCmd_CountNationalDexOwned(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Pokedex_CountNationalDexOwned(pokedex); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Pokedex_CountNationalDexOwned(pokedex); return FALSE; } @@ -2547,11 +2547,11 @@ BOOL ScrCmd_247(ScriptContext *ctx) { } BOOL ScrCmd_GetDexEvalResult(ScriptContext *ctx) { - Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); + Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData); - u8 kind = ScriptReadByte(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - u16 *p_ret2 = ScriptGetVarPointer(ctx); + u8 kind = ScriptReadByte(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret2 = ScriptGetVarPointer(ctx); if (kind == 0) { *p_ret = sub_0205BBD0(Pokedex_CountJohtoOwned_ExcludeMythical(pokedex), PlayerProfile_GetTrainerGender(profile), p_ret2); @@ -2563,32 +2563,32 @@ BOOL ScrCmd_GetDexEvalResult(ScriptContext *ctx) { BOOL ScrCmd_RocketTrapBattle(ScriptContext *ctx) { u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); - u16 species = ScriptGetVar(ctx); - u16 level = ScriptGetVar(ctx); + u16 species = ScriptGetVar(ctx); + u16 level = ScriptGetVar(ctx); SetupAndStartWildBattle(ctx->taskman, species, level, winFlag, FALSE, FALSE); return TRUE; } BOOL ScrCmd_WildBattle(ScriptContext *ctx) { u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); - u16 species = ScriptGetVar(ctx); - u16 level = ScriptGetVar(ctx); - u8 shiny = ScriptReadByte(ctx); + u16 species = ScriptGetVar(ctx); + u16 level = ScriptGetVar(ctx); + u8 shiny = ScriptReadByte(ctx); SetupAndStartWildBattle(ctx->taskman, species, level, winFlag, TRUE, shiny); return TRUE; } BOOL ScrCmd_686(ScriptContext *ctx) { u32 *winFlag = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_BATTLE_WIN_FLAG); - u16 species = ScriptGetVar(ctx); - u16 level = ScriptGetVar(ctx); + u16 species = ScriptGetVar(ctx); + u16 level = ScriptGetVar(ctx); SetupAndStartFatefulWildBattle(ctx->taskman, species, level, winFlag, TRUE); return TRUE; } BOOL ScrCmd_250(ScriptContext *ctx) { u16 species = ScriptGetVar(ctx); - u16 level = ScriptGetVar(ctx); + u16 level = ScriptGetVar(ctx); SetupAndStartFirstBattle(ctx->taskman, species, level); return TRUE; } @@ -2606,7 +2606,7 @@ BOOL ScrCmd_252(ScriptContext *ctx) { BOOL ScrCmd_GetSaveFileState(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); if (Save_FileDoesNotBelongToPlayer(saveData)) { *p_ret = 0; @@ -2622,7 +2622,7 @@ BOOL ScrCmd_GetSaveFileState(ScriptContext *ctx) { BOOL ScrCmd_SaveGameNormal(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); *p_ret = Field_SaveGameNormal(fieldSystem); return FALSE; @@ -2635,14 +2635,14 @@ BOOL ScrCmd_SaveWipeExtraChunks(ScriptContext *ctx) { BOOL ScrCmd_642(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Save_CheckExtraChunksExist(ctx->fieldSystem->saveData); + *p_ret = Save_CheckExtraChunksExist(ctx->fieldSystem->saveData); return FALSE; } BOOL sub_02044054(ScriptContext *ctx); BOOL ScrCmd_257(ScriptContext *ctx) { - u16 r0 = ScriptGetVar(ctx); + u16 r0 = ScriptGetVar(ctx); ctx->data[0] = r0; sub_02037AC0(r0); SetupNativeScript(ctx, sub_02044054); @@ -2664,14 +2664,14 @@ BOOL ScrCmd_258(ScriptContext *ctx) { BOOL ScrCmd_259(ScriptContext *ctx) { MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); *p_ret = sub_0205A6AC(*p_msgFmt); return FALSE; } BOOL ScrCmd_260(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); *p_ret = sub_0205A9A0(ctx->fieldSystem->unk80, *p_msgFmt); @@ -2693,10 +2693,10 @@ BOOL ScrCmd_261(ScriptContext *ctx) { BOOL ScrCmd_264(ScriptContext *ctx) { LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 r4 = ScriptReadHalfword(ctx); - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); - SaveEasyChat *easyChat = Save_EasyChat_Get(FieldSystem_GetSaveData(ctx->fieldSystem)); + MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u16 r4 = ScriptReadHalfword(ctx); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); + SaveEasyChat *easyChat = Save_EasyChat_Get(FieldSystem_GetSaveData(ctx->fieldSystem)); u16 objId; if (r4 == 0) { @@ -2728,16 +2728,16 @@ BOOL sub_020441C4(ScriptContext *ctx) { BOOL ScrCmd_267(ScriptContext *ctx) { LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_LAST_INTERACTED); - u16 sp0 = ScriptReadHalfword(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - *p_ret = sub_0205A750(ctx->fieldSystem->unk80, MapObject_GetID(*p_lastInteracted), sp0, *p_msgFmt); + u16 sp0 = ScriptReadHalfword(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + *p_ret = sub_0205A750(ctx->fieldSystem->unk80, MapObject_GetID(*p_lastInteracted), sp0, *p_msgFmt); return FALSE; } BOOL ScrCmd_586(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_0205A4D8(ctx->fieldSystem->unk80); + *p_ret = sub_0205A4D8(ctx->fieldSystem->unk80); if (*p_ret) { void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); FreeToHeap(*p_work); @@ -2746,26 +2746,26 @@ BOOL ScrCmd_586(ScriptContext *ctx) { } BOOL ScrCmd_268(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LAST_INTERACTED); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_0205A200(fieldSystem->unk80, MapObject_GetID(*p_lastInteracted)); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = sub_0205A200(fieldSystem->unk80, MapObject_GetID(*p_lastInteracted)); return FALSE; } BOOL ScrCmd_274(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_LAST_INTERACTED); - u16 r7 = ScriptGetVar(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_0205A284(fieldSystem->unk80, MapObject_GetID(*p_lastInteracted), r7); + u16 r7 = ScriptGetVar(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = sub_0205A284(fieldSystem->unk80, MapObject_GetID(*p_lastInteracted), r7); return FALSE; } BOOL sub_02044318(ScriptContext *ctx); BOOL ScrCmd_269(ScriptContext *ctx) { - u16 var_idx = ScriptReadHalfword(ctx); + u16 var_idx = ScriptReadHalfword(ctx); ctx->data[0] = var_idx; SetupNativeScript(ctx, sub_02044318); return TRUE; @@ -2773,8 +2773,8 @@ BOOL ScrCmd_269(ScriptContext *ctx) { BOOL sub_02044318(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - int result = sub_0205A358(fieldSystem->unk80); - u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); + int result = sub_0205A358(fieldSystem->unk80); + u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); if (result == 0) { return FALSE; } else { @@ -2803,8 +2803,8 @@ BOOL ScrCmd_263(ScriptContext *ctx) { BOOL ScrCmd_271(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 r6 = ScriptGetVar(ctx); - u16 r2 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); + u16 r2 = ScriptGetVar(ctx); sub_0205A3B0(fieldSystem->unk80, r6, r2); return FALSE; } @@ -2812,7 +2812,7 @@ BOOL ScrCmd_271(ScriptContext *ctx) { BOOL sub_020443D8(ScriptContext *ctx); BOOL ScrCmd_272(ScriptContext *ctx) { - u16 var_idx = ScriptReadHalfword(ctx); + u16 var_idx = ScriptReadHalfword(ctx); ctx->data[0] = var_idx; SetupNativeScript(ctx, sub_020443D8); return TRUE; @@ -2820,7 +2820,7 @@ BOOL ScrCmd_272(ScriptContext *ctx) { BOOL sub_020443D8(ScriptContext *ctx) { u16 *p_ret = GetVarPointer(ctx->fieldSystem, ctx->data[0]); - u32 r0 = sub_0205A35C(ctx->fieldSystem->unk80); + u32 r0 = sub_0205A35C(ctx->fieldSystem->unk80); if (r0 >= 1) { *p_ret = r0; sub_0205ABB0(ctx->fieldSystem->unk80); @@ -2834,7 +2834,7 @@ BOOL sub_020443D8(ScriptContext *ctx) { BOOL sub_02044434(ScriptContext *ctx); BOOL ScrCmd_273(ScriptContext *ctx) { - u16 var_idx = ScriptReadHalfword(ctx); + u16 var_idx = ScriptReadHalfword(ctx); ctx->data[0] = var_idx; SetupNativeScript(ctx, sub_02044434); return TRUE; @@ -2842,7 +2842,7 @@ BOOL ScrCmd_273(ScriptContext *ctx) { BOOL sub_02044434(ScriptContext *ctx) { u16 *p_ret = GetVarPointer(ctx->fieldSystem, ctx->data[0]); - int r0 = sub_0205A39C(ctx->fieldSystem->unk80); + int r0 = sub_0205A39C(ctx->fieldSystem->unk80); if (gSystem.newKeys & PAD_BUTTON_B) { r0 = sub_0205A47C(ctx->fieldSystem->unk80, 8); } @@ -2860,7 +2860,7 @@ BOOL ScrCmd_286(ScriptContext *ctx) { } BOOL ScrCmd_BufferUnionRoomAvatarChoices(ScriptContext *ctx) { - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); BufferUnionRoomAvatarChoicesNames( PlayerProfile_GetTrainerID(profile), @@ -2871,9 +2871,9 @@ BOOL ScrCmd_BufferUnionRoomAvatarChoices(ScriptContext *ctx) { BOOL ScrCmd_UnionRoomAvatarIdxToTrainerClass(ScriptContext *ctx) { PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); - u16 choice = ScriptGetVar(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = UnionRoomAvatarIdxToSprite( + u16 choice = ScriptGetVar(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = UnionRoomAvatarIdxToSprite( PlayerProfile_GetTrainerID(profile), PlayerProfile_GetTrainerGender(profile), choice); @@ -2886,9 +2886,9 @@ BOOL ScrCmd_UnionRoomAvatarIdxToTrainerClass(ScriptContext *ctx) { BOOL ScrCmd_UnionRoomAvatarIdxToSprite(ScriptContext *ctx) { PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); - u16 choice = ScriptGetVar(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = UnionRoomAvatarIdxToSprite( + u16 choice = ScriptGetVar(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = UnionRoomAvatarIdxToSprite( PlayerProfile_GetTrainerID(profile), PlayerProfile_GetTrainerGender(profile), choice); @@ -2897,7 +2897,7 @@ BOOL ScrCmd_UnionRoomAvatarIdxToSprite(ScriptContext *ctx) { BOOL ScrCmd_289(ScriptContext *ctx) { PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); - u16 choice = ScriptGetVar(ctx); + u16 choice = ScriptGetVar(ctx); PlayerProfile_SetAvatar(profile, choice); return FALSE; } @@ -2908,7 +2908,7 @@ BOOL ScrCmd_OverworldWhiteOut(ScriptContext *ctx) { } BOOL ScrCmd_SetSpawn(ScriptContext *ctx) { - u16 spawnPoint = ScriptGetVar(ctx); + u16 spawnPoint = ScriptGetVar(ctx); LocalFieldData *localFieldData = Save_LocalFieldData_Get(ctx->fieldSystem->saveData); LocalFieldData_SetBlackoutSpawn(localFieldData, spawnPoint); return FALSE; @@ -2916,8 +2916,8 @@ BOOL ScrCmd_SetSpawn(ScriptContext *ctx) { BOOL ScrCmd_GetPlayerGender(ScriptContext *ctx) { PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = PlayerProfile_GetTrainerGender(profile); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = PlayerProfile_GetTrainerGender(profile); return FALSE; } @@ -2963,24 +2963,24 @@ BOOL ScrCmd_285(ScriptContext *ctx) { BOOL ScrCmd_335(ScriptContext *ctx) { u16 pocket = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Bag_PocketNotEmpty(Save_Bag_Get(ctx->fieldSystem->saveData), pocket); + *p_ret = Bag_PocketNotEmpty(Save_Bag_Get(ctx->fieldSystem->saveData), pocket); return FALSE; } BOOL ScrCmd_MovePerson(ScriptContext *ctx) { u16 objectId = ScriptGetVar(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); Field_SetEventDefaultXYPos(ctx->fieldSystem, objectId, x, y); return FALSE; } BOOL ScrCmd_MovePersonFacing(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); - u16 z = ScriptGetVar(ctx); - u16 direction = ScriptGetVar(ctx); + u16 objectId = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); + u16 z = ScriptGetVar(ctx); + u16 direction = ScriptGetVar(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); MapObject_SetPositionFromXYZAndDirection(object, x, y, z, direction); sub_02061070(object); @@ -2988,7 +2988,7 @@ BOOL ScrCmd_MovePersonFacing(ScriptContext *ctx) { } BOOL ScrCmd_SetObjectMovementType(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); + u16 objectId = ScriptGetVar(ctx); u16 movementType = ScriptGetVar(ctx); Field_SetEventDefaultMovement(ctx->fieldSystem, objectId, movementType); return FALSE; @@ -2996,30 +2996,30 @@ BOOL ScrCmd_SetObjectMovementType(ScriptContext *ctx) { BOOL ScrCmd_SetObjectFacing(ScriptContext *ctx) { u16 objectId = ScriptGetVar(ctx); - u16 facing = ScriptGetVar(ctx); + u16 facing = ScriptGetVar(ctx); Field_SetEventDefaultDirection(ctx->fieldSystem, objectId, facing); return FALSE; } BOOL ScrCmd_MoveWarp(ScriptContext *ctx) { u16 warpId = ScriptGetVar(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); Field_SetWarpXYPos(ctx->fieldSystem, warpId, x, y); return FALSE; } BOOL ScrCmd_MoveBgEvent(ScriptContext *ctx) { u16 bgId = ScriptGetVar(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); Field_SetBgEventXYPos(ctx->fieldSystem, bgId, x, y); return FALSE; } BOOL ScrCmd_344(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); - u16 dir = ScriptGetVar(ctx); + u16 objectId = ScriptGetVar(ctx); + u16 dir = ScriptGetVar(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); GF_ASSERT(object != NULL); ov01_021F9408(object, dir); @@ -3028,7 +3028,7 @@ BOOL ScrCmd_344(ScriptContext *ctx) { BOOL ScrCmd_347(ScriptContext *ctx) { u16 **r5 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_FIELD_34); - u16 r0 = ScriptGetVar(ctx); + u16 r0 = ScriptGetVar(ctx); if (*r5 != NULL) { **r5 = r0; } @@ -3040,7 +3040,7 @@ BOOL ScrCmd_307(ScriptContext *ctx) { u16 r6 = ScriptReadHalfword(ctx); u16 r7 = ScriptGetVar(ctx); u16 r2 = ScriptGetVar(ctx); - u8 r3 = ScriptReadByte(ctx); + u8 r3 = ScriptReadByte(ctx); ov01_021E9AE8(ctx->fieldSystem, r7 + 32 * r4, r2 + 32 * r6, r3); return FALSE; } @@ -3094,7 +3094,7 @@ BOOL ScrCmd_316(ScriptContext *ctx) { BOOL ScrCmd_317(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 r5 = ScriptReadByte(ctx); + u8 r5 = ScriptReadByte(ctx); if (Save_Gymmick_GetType(Save_GetGymmickPtr(FieldSystem_GetSaveData(fieldSystem))) != GYMMICK_ECRUTEAK) { return TRUE; } @@ -3109,8 +3109,8 @@ BOOL ScrCmd_CianwoodGymInit(ScriptContext *ctx) { BOOL ScrCmd_CianwoodGymTurnWinch(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = ov04_02256058(fieldSystem); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = ov04_02256058(fieldSystem); return TRUE; } @@ -3121,17 +3121,17 @@ BOOL ScrCmd_VermilionGymInit(ScriptContext *ctx) { BOOL ScrCmd_VermilionGymLockAction(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 lockno = ScriptReadByte(ctx); - u8 relock = ScriptReadByte(ctx); + u8 lockno = ScriptReadByte(ctx); + u8 relock = ScriptReadByte(ctx); ov04_0225640C(fieldSystem, lockno, relock); return TRUE; } BOOL ScrCmd_VermilionGymCanCheck(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 canId = ScriptReadByte(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = ov04_022563C4(fieldSystem, canId); + u8 canId = ScriptReadByte(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = ov04_022563C4(fieldSystem, canId); return FALSE; } @@ -3157,14 +3157,14 @@ BOOL ScrCmd_AzaleaGymInit(ScriptContext *ctx) { BOOL ScrCmd_AzaleaGymSpinarak(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 spinarakNo = ScriptReadByte(ctx); + u8 spinarakNo = ScriptReadByte(ctx); BeginAzaleaGymSpinarakRide(fieldSystem, spinarakNo); return TRUE; } BOOL ScrCmd_AzaleaGymSwitch(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 switchNo = ScriptReadByte(ctx); + u8 switchNo = ScriptReadByte(ctx); FlipAzaleaGymSwitch(fieldSystem, switchNo); return TRUE; } @@ -3185,14 +3185,14 @@ BOOL ScrCmd_ViridianGymInit(ScriptContext *ctx) { } BOOL ScrCmd_GetPlayerXYZ(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_x = ScriptGetVarPointer(ctx); - u16 *p_y = ScriptGetVarPointer(ctx); - u16 *p_z = ScriptGetVarPointer(ctx); + FieldSystem *fieldSystem = ctx->fieldSystem; + u16 *p_x = ScriptGetVarPointer(ctx); + u16 *p_y = ScriptGetVarPointer(ctx); + u16 *p_z = ScriptGetVarPointer(ctx); LocalMapObject *playerObj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); - *p_x = MapObject_GetCurrentX(playerObj); - *p_y = MapObject_GetCurrentY(playerObj) / 2; - *p_z = MapObject_GetCurrentZ(playerObj); + *p_x = MapObject_GetCurrentX(playerObj); + *p_y = MapObject_GetCurrentY(playerObj) / 2; + *p_z = MapObject_GetCurrentZ(playerObj); return FALSE; } @@ -3203,8 +3203,8 @@ BOOL ScrCmd_EggHatchAnim(ScriptContext *ctx) { BOOL ScrCmd_374(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 objId = ScriptGetVar(ctx); - LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objId); + u16 objId = ScriptGetVar(ctx); + LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objId); GF_ASSERT(object != NULL); MapObject_SetVisible(object, FALSE); return FALSE; @@ -3212,8 +3212,8 @@ BOOL ScrCmd_374(ScriptContext *ctx) { BOOL ScrCmd_MakeObjectVisible(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 objId = ScriptGetVar(ctx); - LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objId); + u16 objId = ScriptGetVar(ctx); + LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, objId); GF_ASSERT(object != NULL); MapObject_SetVisible(object, TRUE); return FALSE; @@ -3221,42 +3221,42 @@ BOOL ScrCmd_MakeObjectVisible(ScriptContext *ctx) { BOOL ScrCmd_376(ScriptContext *ctx) { // todo: mail screen UnkStruct_0203F074 **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); // MailAppData - *p_work = sub_0203F074(ctx->fieldSystem, HEAP_ID_FIELD); + *p_work = sub_0203F074(ctx->fieldSystem, HEAP_ID_FIELD); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } BOOL ScrCmd_377(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Mailbox_CountMessages(Save_Mailbox_Get(fieldSystem->saveData), 0); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Mailbox_CountMessages(Save_Mailbox_Get(fieldSystem->saveData), 0); return FALSE; } BOOL ScrCmd_ViewRankings(ScriptContext *ctx) { u16 pageScrollParam = ScriptGetVar(ctx); - u16 cursorPos = ScriptGetVar(ctx); + u16 cursorPos = ScriptGetVar(ctx); FieldSystem_LaunchTask_ViewRankingsApp(ctx->fieldSystem, pageScrollParam, cursorPos); return TRUE; } BOOL ScrCmd_379(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Field_GetTimeOfDay(ctx->fieldSystem); + *p_ret = Field_GetTimeOfDay(ctx->fieldSystem); return FALSE; } BOOL ScrCmd_Random(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); u16 modulo = ScriptGetVar(ctx); - *p_ret = LCRandom() % modulo; + *p_ret = LCRandom() % modulo; return TRUE; } BOOL ScrCmd_381(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); u16 modulo = ScriptGetVar(ctx); - *p_ret = LCRandom() % modulo; + *p_ret = LCRandom() % modulo; return TRUE; } @@ -3268,18 +3268,18 @@ BOOL ScrCmd_403(ScriptContext *ctx) { } BOOL ScrCmd_404(ScriptContext *ctx) { - u16 r4 = ScriptGetVar(ctx); - u16 r6 = ScriptGetVar(ctx); + u16 r4 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_0202BA2C(Save_FashionData_GetFashionCase(Save_FashionData_Get(ctx->fieldSystem->saveData)), r4, r6); + *p_ret = sub_0202BA2C(Save_FashionData_GetFashionCase(Save_FashionData_Get(ctx->fieldSystem->saveData)), r4, r6); return FALSE; } BOOL ScrCmd_405(ScriptContext *ctx) { - u16 r7 = ScriptGetVar(ctx); - u16 r6 = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = r6 <= sub_0202BA70(Save_FashionData_GetFashionCase(Save_FashionData_Get(ctx->fieldSystem->saveData)), r7); + *p_ret = r6 <= sub_0202BA70(Save_FashionData_GetFashionCase(Save_FashionData_Get(ctx->fieldSystem->saveData)), r7); return FALSE; } @@ -3290,16 +3290,16 @@ BOOL ScrCmd_406(ScriptContext *ctx) { } BOOL ScrCmd_407(ScriptContext *ctx) { - u16 r6 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_0202BA5C(Save_FashionData_GetFashionCase(Save_FashionData_Get(ctx->fieldSystem->saveData)), r6); + *p_ret = sub_0202BA5C(Save_FashionData_GetFashionCase(Save_FashionData_Get(ctx->fieldSystem->saveData)), r6); return FALSE; } BOOL ScrCmd_CheckJohtoDexComplete(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = FALSE; + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = FALSE; if (Pokedex_JohtoDexIsComplete(pokedex) == TRUE) { *p_ret = TRUE; } @@ -3308,8 +3308,8 @@ BOOL ScrCmd_CheckJohtoDexComplete(ScriptContext *ctx) { BOOL ScrCmd_CheckNationalDexComplete(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = FALSE; + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = FALSE; if (Pokedex_NationalDexIsComplete(pokedex) == TRUE) { *p_ret = TRUE; } @@ -3318,8 +3318,8 @@ BOOL ScrCmd_CheckNationalDexComplete(ScriptContext *ctx) { BOOL ScrCmd_ShowCertificate(ScriptContext *ctx) { CertificatesArgs **args = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u16 certificateId = ScriptGetVar(ctx); - *args = Certificates_LaunchApp(ctx->fieldSystem, HEAP_ID_32, certificateId); + u16 certificateId = ScriptGetVar(ctx); + *args = Certificates_LaunchApp(ctx->fieldSystem, HEAP_ID_32, certificateId); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } @@ -3337,22 +3337,22 @@ BOOL ScrCmd_420(ScriptContext *ctx) { } BOOL ScrCmd_421(ScriptContext *ctx) { - u16 r7 = ScriptReadHalfword(ctx); - u16 r4 = ScriptReadHalfword(ctx); - u16 r6 = ScriptReadHalfword(ctx); + u16 r7 = ScriptReadHalfword(ctx); + u16 r4 = ScriptReadHalfword(ctx); + u16 r6 = ScriptReadHalfword(ctx); u16 *p_ret_hi = GetVarPointer(ctx->fieldSystem, r4); u16 *p_ret_lo = GetVarPointer(ctx->fieldSystem, r6); - u32 statval = GameStats_GetCapped(Save_GameStats_Get(ctx->fieldSystem->saveData), r7); - *p_ret_hi = (statval & 0xFFFF0000) >> 16; - *p_ret_lo = statval & 0x0000FFFF; + u32 statval = GameStats_GetCapped(Save_GameStats_Get(ctx->fieldSystem->saveData), r7); + *p_ret_hi = (statval & 0xFFFF0000) >> 16; + *p_ret_lo = statval & 0x0000FFFF; return FALSE; } BOOL ScrCmd_422(ScriptContext *ctx) { - u16 statIdx = ScriptReadHalfword(ctx); + u16 statIdx = ScriptReadHalfword(ctx); u16 value_hi = ScriptReadHalfword(ctx); u16 value_lo = ScriptReadHalfword(ctx); - u8 action = ScriptReadByte(ctx); + u8 action = ScriptReadByte(ctx); u32 value = (value_hi << 16) | value_lo; switch (action) { @@ -3371,33 +3371,33 @@ BOOL ScrCmd_422(ScriptContext *ctx) { BOOL ScrCmd_704(ScriptContext *ctx) { u16 statIdx = ScriptReadHalfword(ctx); - u16 value = ScriptGetVar(ctx); + u16 value = ScriptGetVar(ctx); GameStats_Add(Save_GameStats_Get(ctx->fieldSystem->saveData), statIdx, value); return FALSE; } BOOL ScrCmd_705(ScriptContext *ctx) { u16 statIdx = ScriptReadHalfword(ctx); - u32 value = ScriptReadWord(ctx); + u32 value = ScriptReadWord(ctx); GameStats_Add(Save_GameStats_Get(ctx->fieldSystem->saveData), statIdx, value); return FALSE; } BOOL ScrCmd_SafariZoneAction(ScriptContext *ctx) { LocalFieldData *localFieldData = Save_LocalFieldData_Get(ctx->fieldSystem->saveData); - SaveVarsFlags *varsFlags = Save_VarsFlags_Get(ctx->fieldSystem->saveData); - SafariZone *safariZone = Save_SafariZone_Get(ctx->fieldSystem->saveData); - u8 action = ScriptReadByte(ctx); - u8 areaSet = ScriptReadByte(ctx); - u16 *p_nSafariBall = LocalFieldData_GetSafariBallsCounter(localFieldData); - u16 *p_nSafariSteps = LocalFieldData_GetSafariStepsCounter(localFieldData); + SaveVarsFlags *varsFlags = Save_VarsFlags_Get(ctx->fieldSystem->saveData); + SafariZone *safariZone = Save_SafariZone_Get(ctx->fieldSystem->saveData); + u8 action = ScriptReadByte(ctx); + u8 areaSet = ScriptReadByte(ctx); + u16 *p_nSafariBall = LocalFieldData_GetSafariBallsCounter(localFieldData); + u16 *p_nSafariSteps = LocalFieldData_GetSafariStepsCounter(localFieldData); int r1; switch (action) { case 0: Save_VarsFlags_SetSafariSysFlag(varsFlags); sub_0202F5F8(safariZone, areaSet); - *p_nSafariBall = 30; + *p_nSafariBall = 30; *p_nSafariSteps = 0; break; case 1: @@ -3408,7 +3408,7 @@ BOOL ScrCmd_SafariZoneAction(ScriptContext *ctx) { sub_0209730C(ctx->fieldSystem->saveData, r1); sub_0202F6A0(safariZone, 0); } - *p_nSafariBall = 0; + *p_nSafariBall = 0; *p_nSafariSteps = 0; break; } @@ -3439,7 +3439,7 @@ BOOL ScrCmd_CreateRoamer(ScriptContext *ctx) { BOOL ScrCmd_LoadNPCTrade(ScriptContext *ctx) { NPCTradeAppData **p_tradeWork = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u8 tradeNo = ScriptReadByte(ctx); + u8 tradeNo = ScriptReadByte(ctx); HandleLoadOverlay(FS_OVERLAY_ID(npc_trade), OVY_LOAD_ASYNC); *p_tradeWork = NPCTradeApp_Init(HEAP_ID_FIELD, (NpcTradeNum)tradeNo); @@ -3448,28 +3448,28 @@ BOOL ScrCmd_LoadNPCTrade(ScriptContext *ctx) { BOOL ScrCmd_GetOfferedSpecies(ScriptContext *ctx) { NPCTradeAppData **p_tradeWork = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = NPCTradeApp_GetOfferedSpecies(*p_tradeWork); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = NPCTradeApp_GetOfferedSpecies(*p_tradeWork); return FALSE; } BOOL ScrCmd_NPCTradeGetReqSpecies(ScriptContext *ctx) { NPCTradeAppData **p_tradeWork = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = NPCTradeApp_GetRequestedSpecies(*p_tradeWork); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = NPCTradeApp_GetRequestedSpecies(*p_tradeWork); return FALSE; } BOOL ScrCmd_GetNpcTradeUnusedFlag(ScriptContext *ctx) { NPCTradeAppData **p_tradeWork = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = NPCTradeApp_GetUnusedFlag(*p_tradeWork); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = NPCTradeApp_GetUnusedFlag(*p_tradeWork); return FALSE; } BOOL ScrCmd_NPCTradeExec(ScriptContext *ctx) { NPCTradeAppData **p_tradeWork = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 arg = ScriptGetVar(ctx); + u16 arg = ScriptGetVar(ctx); CallTask_NPCTrade(ctx->taskman, *p_tradeWork, arg, HEAP_ID_FIELD); return TRUE; } @@ -3483,8 +3483,8 @@ BOOL ScrCmd_NPCTradeEnd(ScriptContext *ctx) { BOOL ScrCmd_GiveLoanMon(ScriptContext *ctx) { u8 tradeno = ScriptReadByte(ctx); - u8 level = ScriptReadByte(ctx); - u16 mapno = ScriptReadHalfword(ctx); + u8 level = ScriptReadByte(ctx); + u16 mapno = ScriptReadHalfword(ctx); HandleLoadOverlay(FS_OVERLAY_ID(npc_trade), OVY_LOAD_ASYNC); NPCTrade_MakeAndGiveLoanMon(ctx->fieldSystem, (NpcTradeNum)tradeno, level, mapno); UnloadOverlayByID(FS_OVERLAY_ID(npc_trade)); @@ -3493,7 +3493,7 @@ BOOL ScrCmd_GiveLoanMon(ScriptContext *ctx) { BOOL ScrCmd_CheckReturnLoanMon(ScriptContext *ctx) { u8 tradeno = ScriptReadByte(ctx); - u16 idx = ScriptGetVar(ctx); + u16 idx = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); HandleLoadOverlay(FS_OVERLAY_ID(npc_trade), OVY_LOAD_ASYNC); *p_ret = NPCTrade_CanGiveUpLoanMon(ctx->fieldSystem, (NpcTradeNum)tradeno, idx); @@ -3512,9 +3512,9 @@ BOOL ScrCmd_476(ScriptContext *ctx) { } BOOL ScrCmd_NatDexFlagAction(ScriptContext *ctx) { - u8 action = ScriptReadByte(ctx); + u8 action = ScriptReadByte(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = 0; + *p_ret = 0; if (action == 1) { Pokedex_SetNatDexFlag(Save_Pokedex_Get(ctx->fieldSystem->saveData)); PlayerProfile_SetNatDexFlag(Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData)); @@ -3527,17 +3527,17 @@ BOOL ScrCmd_NatDexFlagAction(ScriptContext *ctx) { } BOOL ScrCmd_GetEVTotal(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); u16 partyIdx = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), partyIdx); - int hpEv = GetMonData(mon, MON_DATA_HP_EV, NULL); - int atkEv = GetMonData(mon, MON_DATA_ATK_EV, NULL); - int defEv = GetMonData(mon, MON_DATA_DEF_EV, NULL); + int hpEv = GetMonData(mon, MON_DATA_HP_EV, NULL); + int atkEv = GetMonData(mon, MON_DATA_ATK_EV, NULL); + int defEv = GetMonData(mon, MON_DATA_DEF_EV, NULL); int speedEv = GetMonData(mon, MON_DATA_SPEED_EV, NULL); int spAtkEv = GetMonData(mon, MON_DATA_SPATK_EV, NULL); int spDefEv = GetMonData(mon, MON_DATA_SPDEF_EV, NULL); - *p_ret = hpEv + atkEv + defEv + speedEv + spAtkEv + spDefEv; + *p_ret = hpEv + atkEv + defEv + speedEv + spAtkEv + spDefEv; return FALSE; } @@ -3563,27 +3563,27 @@ BOOL ScrCmd_PokeCenAnim(ScriptContext *ctx) { BOOL ScrCmd_ElevatorAnim(ScriptContext *ctx) { u16 direction = ScriptGetVar(ctx); - u16 length = ScriptGetVar(ctx); + u16 length = ScriptGetVar(ctx); ov02_0224BDE8(ctx->fieldSystem, direction, length); return TRUE; } BOOL ScrCmd_GetGameVersion(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = GAME_VERSION; + *p_ret = GAME_VERSION; return FALSE; } BOOL ScrCmd_PrimoPasswordCheck1(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); - u16 *p_ret = ScriptGetVarPointer(ctx); - PCStorage *pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); - u16 a = ScriptGetVar(ctx); - u16 b = ScriptGetVar(ctx); - u16 c = ScriptGetVar(ctx); - u16 d = ScriptGetVar(ctx); - int wallpaper = ov02_0224CD38(profile, a, b, c, d, HEAP_ID_4); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); + u16 *p_ret = ScriptGetVarPointer(ctx); + PCStorage *pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); + u16 a = ScriptGetVar(ctx); + u16 b = ScriptGetVar(ctx); + u16 c = ScriptGetVar(ctx); + u16 d = ScriptGetVar(ctx); + int wallpaper = ov02_0224CD38(profile, a, b, c, d, HEAP_ID_4); if (wallpaper == -1 || wallpaper > 7) { *p_ret = 0xFF; return FALSE; @@ -3598,14 +3598,14 @@ BOOL ScrCmd_PrimoPasswordCheck1(ScriptContext *ctx) { BOOL ScrCmd_PrimoPasswordCheck2(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); - u16 *p_ret = ScriptGetVarPointer(ctx); - PCStorage *pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); - u16 a = ScriptGetVar(ctx); - u16 b = ScriptGetVar(ctx); - u16 c = ScriptGetVar(ctx); - u16 d = ScriptGetVar(ctx); - int result = ov02_0224CD74(profile, a, b, c, d, HEAP_ID_4); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); + u16 *p_ret = ScriptGetVarPointer(ctx); + PCStorage *pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); + u16 a = ScriptGetVar(ctx); + u16 b = ScriptGetVar(ctx); + u16 c = ScriptGetVar(ctx); + u16 d = ScriptGetVar(ctx); + int result = ov02_0224CD74(profile, a, b, c, d, HEAP_ID_4); if (result == -1) { *p_ret = 0xFF; return FALSE; @@ -3617,28 +3617,28 @@ BOOL ScrCmd_PrimoPasswordCheck2(ScriptContext *ctx) { BOOL ScrCmd_500(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 r1 = ScriptReadByte(ctx); + u8 r1 = ScriptReadByte(ctx); ov02_0224BF58(fieldSystem, r1); return FALSE; } BOOL ScrCmd_501(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 r1 = ScriptReadByte(ctx); + u8 r1 = ScriptReadByte(ctx); ov02_0224BFC0(fieldSystem, r1); return FALSE; } BOOL ScrCmd_502(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u8 r1 = ScriptReadByte(ctx); + u8 r1 = ScriptReadByte(ctx); ov02_0224BFCC(fieldSystem, r1); return FALSE; } void Script_SetMonSeenFlagBySpecies(FieldSystem *fieldSystem, u16 species) { Pokedex *pokedex = Save_Pokedex_Get(fieldSystem->saveData); - Pokemon *mon = AllocMonZeroed(HEAP_ID_32); + Pokemon *mon = AllocMonZeroed(HEAP_ID_32); ZeroMonData(mon); CreateMon(mon, species, 50, 32, FALSE, 0, OT_ID_PLAYER_ID, 0); Pokedex_SetMonSeenFlag(pokedex, mon); @@ -3653,14 +3653,14 @@ BOOL ScrCmd_687(ScriptContext *ctx) { BOOL ScrCmd_CountPCEmptySpace(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = PCStorage_CountEmptySpotsInAllBoxes(SaveArray_PCStorage_Get(ctx->fieldSystem->saveData)); + *p_ret = PCStorage_CountEmptySpotsInAllBoxes(SaveArray_PCStorage_Get(ctx->fieldSystem->saveData)); return FALSE; } BOOL ScrCmd_PlayerMovementSavingSet(ScriptContext *ctx) { SysTask **r4 = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_FIELD_B8); - *r4 = PLAYER_STATE_WALKING; - *r4 = Field_PlayerMovementSavingSet(ctx->fieldSystem); + *r4 = PLAYER_STATE_WALKING; + *r4 = Field_PlayerMovementSavingSet(ctx->fieldSystem); return TRUE; } @@ -3684,15 +3684,15 @@ BOOL ScrCmd_AddSpecialGameStat(ScriptContext *ctx) { BOOL ScrCmd_517(ScriptContext *ctx) { u16 species = ScriptGetVar(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Party_HasMon(SaveArray_Party_Get(ctx->fieldSystem->saveData), species); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Party_HasMon(SaveArray_Party_Get(ctx->fieldSystem->saveData), species); return TRUE; } BOOL ScrCmd_518(ScriptContext *ctx) { - u16 form = ScriptGetVar(ctx); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); - int partyCount = Party_GetCount(party); + u16 form = ScriptGetVar(ctx); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + int partyCount = Party_GetCount(party); Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); int i; @@ -3708,8 +3708,8 @@ BOOL ScrCmd_518(ScriptContext *ctx) { } BOOL ScrCmd_519(ScriptContext *ctx) { - u16 *sp0 = ScriptGetVarPointer(ctx); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + u16 *sp0 = ScriptGetVarPointer(ctx); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); int partyCount = Party_GetCount(party); int sp18[PARTY_SIZE] = { @@ -3727,8 +3727,8 @@ BOOL ScrCmd_519(ScriptContext *ctx) { int j; BOOL hasMultiple; Pokemon *mon = Party_GetMonByIndex(party, i); - u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u32 form = GetMonData(mon, MON_DATA_FORM, NULL); + u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + u32 form = GetMonData(mon, MON_DATA_FORM, NULL); if (species == SPECIES_BURMY) { hasMultiple = FALSE; for (j = 0, sp18[i] = form; j < i; j++) { @@ -3757,16 +3757,16 @@ BOOL ScrCmd_521(ScriptContext *ctx) { BOOL ScrCmd_522(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Field_GetHour(ctx->fieldSystem); + *p_ret = Field_GetHour(ctx->fieldSystem); return FALSE; } BOOL ScrCmd_523(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); - u16 spC = ScriptGetVar(ctx); - u16 sp8 = ScriptGetVar(ctx); - u16 r6 = ScriptGetVar(ctx); - u16 r4 = ScriptGetVar(ctx); + u16 objectId = ScriptGetVar(ctx); + u16 spC = ScriptGetVar(ctx); + u16 sp8 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); + u16 r4 = ScriptGetVar(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); GF_ASSERT(object != NULL); sub_0205BED8(ctx->taskman, object, spC, sp8, r6, r4); @@ -3774,9 +3774,9 @@ BOOL ScrCmd_523(ScriptContext *ctx) { } BOOL ScrCmd_524(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); - u16 r7 = ScriptGetVar(ctx); - u16 r6 = ScriptGetVar(ctx); + u16 objectId = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); GF_ASSERT(object != NULL); sub_0205BFB4(ctx->taskman, object, r7, r6); @@ -3785,12 +3785,12 @@ BOOL ScrCmd_524(ScriptContext *ctx) { BOOL ScrCmd_525(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Save_PlayerHasAllRegisInParty(ctx->fieldSystem->saveData); + *p_ret = Save_PlayerHasAllRegisInParty(ctx->fieldSystem->saveData); return FALSE; } BOOL ScrCmd_526(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); FashionCase *fashionCase = Save_FashionData_GetFashionCase(Save_FashionData_Get(ctx->fieldSystem->saveData)); int i, k, n = 0; u16 sp4[16]; @@ -3824,13 +3824,13 @@ BOOL ScrCmd_526(ScriptContext *ctx) { BOOL ScrCmd_528(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = gSystem.unk6A; + *p_ret = gSystem.unk6A; return TRUE; } BOOL ScrCmd_530(ScriptContext *ctx) { - u16 r6 = ScriptGetVar(ctx); - u8 action = ScriptReadByte(ctx); + u16 r6 = ScriptGetVar(ctx); + u8 action = ScriptReadByte(ctx); SaveVarsFlags *varsFlags = Save_VarsFlags_Get(ctx->fieldSystem->saveData); if (action) { sub_02066C1C(varsFlags, r6); @@ -3842,15 +3842,15 @@ BOOL ScrCmd_530(ScriptContext *ctx) { BOOL ScrCmd_BufferBackgroundName(ScriptContext *ctx) { MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 bufferId = ScriptReadByte(ctx); - u16 backgroundId = ScriptGetVar(ctx); + u8 bufferId = ScriptReadByte(ctx); + u16 backgroundId = ScriptGetVar(ctx); BufferContestBackgroundName(*p_msgFmt, bufferId, backgroundId); return TRUE; } BOOL ScrCmd_534(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Save_VarsFlags_GetVar4041(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); + *p_ret = Save_VarsFlags_GetVar4041(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -3867,10 +3867,10 @@ BOOL ScrCmd_537(ScriptContext *ctx) { } BOOL ScrCmd_538(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); - u16 wordIdx = ScriptGetVar(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); + u16 wordIdx = ScriptGetVar(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - int trendy = Save_EasyChat_SetRandomTrendySaying(Save_EasyChat_Get(ctx->fieldSystem->saveData)); + int trendy = Save_EasyChat_SetRandomTrendySaying(Save_EasyChat_Get(ctx->fieldSystem->saveData)); if (trendy == 32) { *p_ret = 0xFFFF; return FALSE; @@ -3882,21 +3882,21 @@ BOOL ScrCmd_538(ScriptContext *ctx) { BOOL ScrCmd_540(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Save_EasyChat_TrendySayingsUnlockedAllCheck(Save_EasyChat_Get(ctx->fieldSystem->saveData)) == TRUE; + *p_ret = Save_EasyChat_TrendySayingsUnlockedAllCheck(Save_EasyChat_Get(ctx->fieldSystem->saveData)) == TRUE; return FALSE; } BOOL ScrCmd_539(ScriptContext *ctx) { SaveVarsFlags *varsFlags = Save_VarsFlags_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Save_VarsFlags_GetVar4042(varsFlags) >= 5; + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Save_VarsFlags_GetVar4042(varsFlags) >= 5; return FALSE; } BOOL ScrCmd_543(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); FieldSystem *fieldSystem = ctx->fieldSystem; - SysInfo *sysInfo = Save_SysInfo_Get(fieldSystem->saveData); + SysInfo *sysInfo = Save_SysInfo_Get(fieldSystem->saveData); if (Save_SysInfo_GetBirthMonth(sysInfo) == Field_GetMonth(fieldSystem) && Save_SysInfo_GetBirthDay(sysInfo) == Field_GetDay(fieldSystem)) { *p_ret = TRUE; } else { @@ -3907,14 +3907,14 @@ BOOL ScrCmd_543(ScriptContext *ctx) { BOOL ScrCmd_545(ScriptContext *ctx) { Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = Pokedex_GetSeenFormNum_Unown(pokedex, TRUE); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = Pokedex_GetSeenFormNum_Unown(pokedex, TRUE); return FALSE; } BOOL ScrCmd_546(ScriptContext *ctx) { - u8 mode = ScriptReadByte(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); + u8 mode = ScriptReadByte(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); SaveVarsFlags *varsFlags = Save_VarsFlags_Get(ctx->fieldSystem->saveData); GF_ASSERT(mode <= 1); *p_ret = sub_02066BC0(varsFlags, mode); @@ -3944,16 +3944,16 @@ BOOL ScrCmd_550(ScriptContext *ctx) { } BOOL ScrCmd_551(ScriptContext *ctx) { - u16 r6 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); PartyMenuArgs **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *p_work = PartyMenu_LaunchApp_Unk4(HEAP_ID_32, ctx->fieldSystem, r6); + *p_work = PartyMenu_LaunchApp_Unk4(HEAP_ID_32, ctx->fieldSystem, r6); SetupNativeScript(ctx, ScrNative_WaitApplication); return TRUE; } BOOL ScrCmd_552(ScriptContext *ctx) { - u16 *r6 = ScriptGetVarPointer(ctx); - u16 *r5 = ScriptGetVarPointer(ctx); + u16 *r6 = ScriptGetVarPointer(ctx); + u16 *r5 = ScriptGetVarPointer(ctx); struct PartyMenuArgs **partyMenu = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); GF_ASSERT(*partyMenu != NULL); *r6 = PartyMenuArgs_GetSlot(*partyMenu); @@ -3968,7 +3968,7 @@ BOOL ScrCmd_552(ScriptContext *ctx) { } BOOL ScrCmd_553(ScriptContext *ctx) { - u8 limit = ScriptReadByte(ctx); + u8 limit = ScriptReadByte(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); u16 rnd; if (limit > 100) { @@ -3984,8 +3984,8 @@ BOOL ScrCmd_553(ScriptContext *ctx) { } BOOL ScrCmd_560(ScriptContext *ctx) { - u16 my_case = ScriptGetVar(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 my_case = ScriptGetVar(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); FieldSystem *fieldSystem = ctx->fieldSystem; switch (my_case) { case 0: @@ -4015,20 +4015,20 @@ BOOL ScrCmd_560(ScriptContext *ctx) { BOOL ScrCmd_564(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_0203A05C(ctx->fieldSystem->saveData); + *p_ret = sub_0203A05C(ctx->fieldSystem->saveData); return FALSE; } BOOL ScrCmd_565(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_0202C2F8(sub_0202C6F4(ctx->fieldSystem->saveData)); + *p_ret = sub_0202C2F8(sub_0202C6F4(ctx->fieldSystem->saveData)); return FALSE; } BOOL ScrCmd_568(ScriptContext *ctx) { - u16 r4 = ScriptGetVar(ctx); + u16 r4 = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = 0; + *p_ret = 0; if (r4 >= 0x12A && r4 <= 0x139) { *p_ret = 1; } @@ -4037,21 +4037,21 @@ BOOL ScrCmd_568(ScriptContext *ctx) { BOOL ScrCmd_571(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - u16 sp4 = ScriptGetVar(ctx); - u16 sp8 = ScriptGetVar(ctx); - u16 spC = ScriptGetVar(ctx); - u16 r7 = ScriptGetVar(ctx); + u16 sp4 = ScriptGetVar(ctx); + u16 sp8 = ScriptGetVar(ctx); + u16 spC = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); String *r7_str; String *sp0_str; MessageFormat *msgFmt = MessageFormat_New(HEAP_ID_32); - MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0202_bin, HEAP_ID_32); + MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0202_bin, HEAP_ID_32); BufferECWord(msgFmt, 0, sp4); BufferECWord(msgFmt, 1, sp8); BufferECWord(msgFmt, 2, spC); BufferECWord(msgFmt, 3, r7); - r7_str = ReadMsgData_ExpandPlaceholders(msgFmt, msgData, msg_0202_00001, HEAP_ID_32); + r7_str = ReadMsgData_ExpandPlaceholders(msgFmt, msgData, msg_0202_00001, HEAP_ID_32); sp0_str = NewString_ReadMsgData(msgData, msg_0202_00000); - *p_ret = String_Compare(r7_str, sp0_str) == FALSE; + *p_ret = String_Compare(r7_str, sp0_str) == FALSE; String_Delete(r7_str); String_Delete(sp0_str); DestroyMsgData(msgData); @@ -4066,9 +4066,9 @@ BOOL ScrCmd_573(ScriptContext *ctx) { BOOL ScrCmd_576(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - *p_ret = sub_0205A6AC(*p_msgFmt); + *p_ret = sub_0205A6AC(*p_msgFmt); return FALSE; } @@ -4088,21 +4088,21 @@ BOOL ScrCmd_579(ScriptContext *ctx) { } BOOL ScrCmd_582(ScriptContext *ctx) { - u16 mapId = ScriptGetVar(ctx); - u16 x = ScriptGetVar(ctx); - u16 y = ScriptGetVar(ctx); - Location *specialSpawn = LocalFieldData_GetSpecialSpawnWarpPtr(Save_LocalFieldData_Get(ctx->fieldSystem->saveData)); - specialSpawn->mapId = mapId; - specialSpawn->x = x; - specialSpawn->y = y; - specialSpawn->warpId = -1; + u16 mapId = ScriptGetVar(ctx); + u16 x = ScriptGetVar(ctx); + u16 y = ScriptGetVar(ctx); + Location *specialSpawn = LocalFieldData_GetSpecialSpawnWarpPtr(Save_LocalFieldData_Get(ctx->fieldSystem->saveData)); + specialSpawn->mapId = mapId; + specialSpawn->x = x; + specialSpawn->y = y; + specialSpawn->warpId = -1; specialSpawn->direction = DIR_SOUTH; return FALSE; } BOOL ScrCmd_583(ScriptContext *ctx) { - u16 objectId = ScriptGetVar(ctx); - u8 r4 = ScriptReadByte(ctx); + u16 objectId = ScriptGetVar(ctx); + u8 r4 = ScriptReadByte(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); GF_ASSERT(object != NULL); MapObject_ClearFlag18(object, r4); @@ -4111,13 +4111,13 @@ BOOL ScrCmd_583(ScriptContext *ctx) { BOOL ScrCmd_GetTrcardStars(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = sub_020691E8(fieldSystem); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = sub_020691E8(fieldSystem); return FALSE; } BOOL ScrCmd_ShowSaveStats(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct SaveStatsPrinter **saveStatsPrinter = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SAVE_STATS_PRINTER); if (!Save_FileDoesNotBelongToPlayer(fieldSystem->saveData)) { *saveStatsPrinter = Field_SaveStatsPrinter_New(fieldSystem, HEAP_ID_4, 3); @@ -4127,7 +4127,7 @@ BOOL ScrCmd_ShowSaveStats(ScriptContext *ctx) { } BOOL ScrCmd_HideSaveStats(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct SaveStatsPrinter **saveStatsPrinter = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_SAVE_STATS_PRINTER); if (!Save_FileDoesNotBelongToPlayer(fieldSystem->saveData)) { Field_SaveStatsPrinter_RemoveFromScreen(*saveStatsPrinter); @@ -4144,8 +4144,8 @@ BOOL ScrCmd_595(ScriptContext *ctx) { BOOL ScrCmd_627(ScriptContext *ctx) { FrontierLaunchParam **pParam = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u8 r6 = ScriptReadByte(ctx); - FrontierLaunchParam *param = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FrontierLaunchParam)); + u8 r6 = ScriptReadByte(ctx); + FrontierLaunchParam *param = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FrontierLaunchParam)); MI_CpuClear8(param, sizeof(FrontierLaunchParam)); *pParam = param; if (r6 == 5 || r6 == 6) { @@ -4153,12 +4153,12 @@ BOOL ScrCmd_627(ScriptContext *ctx) { } else { param->unk0 = NULL; } - param->options = Save_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveData); - param->unk20 = r6; - param->saveData = ctx->fieldSystem->saveData; - param->mapId = ctx->fieldSystem->location->mapId; + param->options = Save_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveData); + param->unk20 = r6; + param->saveData = ctx->fieldSystem->saveData; + param->mapId = ctx->fieldSystem->location->mapId; param->bagCursor = ctx->fieldSystem->bagCursor; - param->unk1C = ctx->fieldSystem->unkB0; + param->unk1C = ctx->fieldSystem->unkB0; CallApplicationAsTask(ctx->taskman, &gOverlayTemplate_Frontier, param); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; @@ -4166,17 +4166,17 @@ BOOL ScrCmd_627(ScriptContext *ctx) { BOOL ScrCmd_631(ScriptContext *ctx) { void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u16 r6 = ScriptGetVar(ctx); - u16 r7 = ScriptGetVar(ctx); - u16 r3 = ScriptGetVar(ctx); - *p_work = sub_0203FAB4(ctx->fieldSystem, r6, r7, r3, HEAP_ID_32); + u16 r6 = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 r3 = ScriptGetVar(ctx); + *p_work = sub_0203FAB4(ctx->fieldSystem, r6, r7, r3, HEAP_ID_32); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } BOOL ScrCmd_ScratchOffCard(ScriptContext *ctx) { ScratchOffCardsArgs **scratchCardData = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *scratchCardData = ScratchOffCards_LaunchApp(ctx->fieldSystem, HEAP_ID_32); + *scratchCardData = ScratchOffCards_LaunchApp(ctx->fieldSystem, HEAP_ID_32); SetupNativeScript(ctx, ScrNative_WaitApplication); return TRUE; } @@ -4189,19 +4189,19 @@ BOOL ScrCmd_ScratchOffCardEnd(ScriptContext *ctx) { } BOOL ScrCmd_GetScratchOffPrize(ScriptContext *ctx) { - u16 cardno = ScriptGetVar(ctx); - u16 *p_ret1 = ScriptGetVarPointer(ctx); - u16 *p_ret2 = ScriptGetVarPointer(ctx); + u16 cardno = ScriptGetVar(ctx); + u16 *p_ret1 = ScriptGetVarPointer(ctx); + u16 *p_ret2 = ScriptGetVarPointer(ctx); ScratchOffCardsArgs **scratchCardDataPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - ScratchOffCardsArgs *scratchCardData = *scratchCardDataPtr; - *p_ret1 = scratchCardData->unk_08[cardno]; - *p_ret2 = scratchCardData->unk_0E[cardno]; + ScratchOffCardsArgs *scratchCardData = *scratchCardDataPtr; + *p_ret1 = scratchCardData->unk_08[cardno]; + *p_ret2 = scratchCardData->unk_0E[cardno]; return FALSE; } BOOL ScrCmd_662(ScriptContext *ctx) { - u16 r6 = ScriptGetVar(ctx); - u16 r7 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); if (sub_0203A05C(ctx->fieldSystem->saveData)) { *p_ret = 1; @@ -4223,7 +4223,7 @@ BOOL ScrCmd_663(ScriptContext *ctx) { BOOL ScrCmd_667(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = 0; + *p_ret = 0; if (gSystem.heldKeys & PAD_BUTTON_A) { *p_ret = 1; } @@ -4237,18 +4237,18 @@ u32 sub_020467A8(SaveData *saveData); BOOL ScrCmd_GetOwnedRotomForms(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *hasHeat = ScriptGetVarPointer(ctx); - u16 *hasWash = ScriptGetVarPointer(ctx); - u16 *hasFrost = ScriptGetVarPointer(ctx); - u16 *hasFan = ScriptGetVarPointer(ctx); - u16 *hasMow = ScriptGetVarPointer(ctx); + u16 *hasHeat = ScriptGetVarPointer(ctx); + u16 *hasWash = ScriptGetVarPointer(ctx); + u16 *hasFrost = ScriptGetVarPointer(ctx); + u16 *hasFan = ScriptGetVarPointer(ctx); + u16 *hasMow = ScriptGetVarPointer(ctx); u32 flag; - *hasHeat = FALSE; - *hasWash = FALSE; + *hasHeat = FALSE; + *hasWash = FALSE; *hasFrost = FALSE; - *hasFan = FALSE; - *hasMow = FALSE; + *hasFan = FALSE; + *hasMow = FALSE; flag = sub_020467A8(fieldSystem->saveData); if (((flag >> ROTOM_HEAT) & 1) == 1) { @@ -4270,8 +4270,8 @@ BOOL ScrCmd_GetOwnedRotomForms(ScriptContext *ctx) { } u32 sub_020467A8(SaveData *saveData) { - u32 ret = 0; - Party *party = SaveArray_Party_Get(saveData); + u32 ret = 0; + Party *party = SaveArray_Party_Get(saveData); int partyCount = Party_GetCount(party); int i, j; @@ -4300,9 +4300,9 @@ u32 sub_020467A8(SaveData *saveData) { } } - Pokemon *walkerMon = AllocMonZeroed(HEAP_ID_32); + Pokemon *walkerMon = AllocMonZeroed(HEAP_ID_32); BoxPokemon *walkerBoxMon = Mon_GetBoxMon(walkerMon); - POKEWALKER *pokeWalker = Save_Pokewalker_Get(saveData); + POKEWALKER *pokeWalker = Save_Pokewalker_Get(saveData); if (Pokewalker_TryGetBoxMon(pokeWalker, walkerBoxMon)) { if (GetBoxMonData(walkerBoxMon, MON_DATA_SPECIES, NULL) == SPECIES_ROTOM && !GetBoxMonData(walkerBoxMon, MON_DATA_IS_EGG, NULL)) { ret |= 1 << GetBoxMonData(walkerBoxMon, MON_DATA_FORM, NULL); @@ -4323,14 +4323,14 @@ BOOL ScrCmd_682(ScriptContext *ctx) { static u32 sHeap4Size; static u32 sHeap32Size; static u32 sHeap11Size; - u16 action = ScriptGetVar(ctx); + u16 action = ScriptGetVar(ctx); u32 heap11Size = GF_ExpHeap_FndGetTotalFreeSize(HEAP_ID_FIELD); - u32 heap4Size = GF_ExpHeap_FndGetTotalFreeSize(HEAP_ID_4); + u32 heap4Size = GF_ExpHeap_FndGetTotalFreeSize(HEAP_ID_4); u32 heap32Size = GF_ExpHeap_FndGetTotalFreeSize(HEAP_ID_32); if (action == 0) { sHeap11Size = heap11Size; - sHeap4Size = heap4Size; + sHeap4Size = heap4Size; sHeap32Size = heap32Size; } else { GF_ASSERT(heap11Size == sHeap11Size); @@ -4342,7 +4342,7 @@ BOOL ScrCmd_682(ScriptContext *ctx) { BOOL ScrCmd_691(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); if (GF_RTC_DateTimeToSec() - fieldSystem->unkB4 >= 120) { *p_ret = TRUE; } else { @@ -4353,8 +4353,8 @@ BOOL ScrCmd_691(ScriptContext *ctx) { BOOL ScrCmd_696(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 r5 = ScriptGetVar(ctx); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + u16 r5 = ScriptGetVar(ctx); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); int i, partyCount; Pokemon *mon; @@ -4371,8 +4371,8 @@ BOOL ScrCmd_696(ScriptContext *ctx) { BOOL ScrCmd_FollowerPokeIsEventTrigger(ScriptContext *ctx) { u8 event = ScriptReadByte(ctx); - u16 r7 = ScriptGetVar(ctx); - u16 *r6 = ScriptGetVarPointer(ctx); + u16 r7 = ScriptGetVar(ctx); + u16 *r6 = ScriptGetVarPointer(ctx); Pokemon *mon; int species; @@ -4414,8 +4414,8 @@ BOOL ScrCmd_FollowerPokeIsEventTrigger(ScriptContext *ctx) { BOOL ScrCmd_596(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = ov01_022055DC(MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, obj_partner_poke)); + u16 *p_ret = ScriptGetVarPointer(ctx); + *p_ret = ov01_022055DC(MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, obj_partner_poke)); return FALSE; } @@ -4427,7 +4427,7 @@ BOOL ScrCmd_597(ScriptContext *ctx) { BOOL ScrCmd_598(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 mode = ScriptReadHalfword(ctx); + u16 mode = ScriptReadHalfword(ctx); LocalMapObject *obj1, *obj2; if (mode == 1) { obj1 = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); @@ -4461,13 +4461,13 @@ BOOL ScrCmd_FollowMonFacePlayer(ScriptContext *ctx) { if (FollowMon_IsActive(ctx->fieldSystem)) { if (ov01_022055DC(FollowMon_GetMapObject(ctx->fieldSystem))) { LocalMapObject *myObject = PlayerAvatar_GetMapObject(FieldSystem_GetPlayerAvatar(ctx->fieldSystem)); - int facingDirection = PlayerAvatar_GetFacingDirection(FieldSystem_GetPlayerAvatar(ctx->fieldSystem)); - int playerX = MapObject_GetCurrentX(myObject); - int deltaX = GetDeltaXByFacingDirection(facingDirection) * 2; - s32 playerY = MapObject_GetCurrentY(myObject); - int playerZ = MapObject_GetCurrentZ(myObject); - int deltaY = GetDeltaYByFacingDirection(facingDirection) * 2; - u8 facingTile = GetMetatileBehaviorAt(ctx->fieldSystem, playerX + deltaX, playerZ + deltaY); + int facingDirection = PlayerAvatar_GetFacingDirection(FieldSystem_GetPlayerAvatar(ctx->fieldSystem)); + int playerX = MapObject_GetCurrentX(myObject); + int deltaX = GetDeltaXByFacingDirection(facingDirection) * 2; + s32 playerY = MapObject_GetCurrentY(myObject); + int playerZ = MapObject_GetCurrentZ(myObject); + int deltaY = GetDeltaYByFacingDirection(facingDirection) * 2; + u8 facingTile = GetMetatileBehaviorAt(ctx->fieldSystem, playerX + deltaX, playerZ + deltaY); VecFx32 posVec; MapObject_CopyPositionVector(myObject, &posVec); if (sub_020549A8(ctx->fieldSystem, &posVec, playerX + deltaX, playerZ + deltaY, 0) || MetatileBehavior_IsSurfableWater(facingTile) || sub_02060BFC(myObject, playerX + deltaX, playerY, playerZ + deltaY)) { @@ -4522,7 +4522,7 @@ BOOL ScrCmd_605(ScriptContext *ctx) { u8 r6 = ScriptReadByte(ctx); u8 r4 = ScriptReadByte(ctx); if (FollowMon_IsActive(ctx->fieldSystem)) { - LocalMapObject *playerObj = PlayerAvatar_GetMapObject(ctx->fieldSystem->playerAvatar); + LocalMapObject *playerObj = PlayerAvatar_GetMapObject(ctx->fieldSystem->playerAvatar); LocalMapObject *tsurePokeObj = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, obj_partner_poke); ov01_02205720(playerObj, tsurePokeObj, r6, r4); } @@ -4574,13 +4574,13 @@ BOOL ScrCmd_610(ScriptContext *ctx) { } BOOL ScrCmd_Pokeathlon(ScriptContext *ctx) { - u8 r6 = ScriptReadByte(ctx); - u8 r4 = ScriptReadByte(ctx); - u16 r7 = ScriptGetVar(ctx); + u8 r6 = ScriptReadByte(ctx); + u8 r4 = ScriptReadByte(ctx); + u16 r7 = ScriptGetVar(ctx); u16 *sp10 = ScriptGetVarPointer(ctx); u16 *sp14 = ScriptGetVarPointer(ctx); u16 *sp18 = ScriptGetVarPointer(ctx); - u16 *spC = ScriptGetVarPointer(ctx); + u16 *spC = ScriptGetVarPointer(ctx); sub_02095DF4(ctx->fieldSystem, r6, r4, r7, sp10, sp14, sp18, spC); return TRUE; } @@ -4597,7 +4597,7 @@ BOOL ScrCmd_GetFriendSprite(ScriptContext *ctx) { BOOL ScrCmd_RegisterPokegearCard(ScriptContext *ctx) { SavePokegear *pokegear = SaveData_GSPlayerMisc_Get(FieldSystem_GetSaveData(ctx->fieldSystem)); - u8 card = ScriptReadByte(ctx); + u8 card = ScriptReadByte(ctx); switch (card) { case 1: Pokegear_RegisterCard(pokegear, 1); @@ -4620,7 +4620,7 @@ BOOL ScrCmd_804(ScriptContext *ctx) { BOOL ScrCmd_RegisterGearNumber(ScriptContext *ctx) { SavePokegear *pokegear = SaveData_GSPlayerMisc_Get(FieldSystem_GetSaveData(ctx->fieldSystem)); - u8 number = ScriptGetVar(ctx); + u8 number = ScriptGetVar(ctx); if (number < NUM_PHONE_CONTACTS) { RegisterPhoneNumberInPokeGear(pokegear, number); } @@ -4629,8 +4629,8 @@ BOOL ScrCmd_RegisterGearNumber(ScriptContext *ctx) { BOOL ScrCmd_CheckRegisteredPhoneNumber(ScriptContext *ctx) { SavePokegear *pokegear = SaveData_GSPlayerMisc_Get(FieldSystem_GetSaveData(ctx->fieldSystem)); - u8 number = ScriptGetVar(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); + u8 number = ScriptGetVar(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); if (number < NUM_PHONE_CONTACTS) { *p_ret = GSPlayerMisc_IsGearNumberRegistered(pokegear, number); if (*p_ret == 0xFF) { @@ -4645,9 +4645,9 @@ BOOL ScrCmd_CheckRegisteredPhoneNumber(ScriptContext *ctx) { } BOOL ScrCmd_SetPhoneCall(ScriptContext *ctx) { - u16 r4 = ScriptGetVar(ctx); - u16 r6 = ScriptGetVar(ctx); - u16 r7 = ScriptGetVar(ctx); + u16 r4 = ScriptGetVar(ctx); + u16 r6 = ScriptGetVar(ctx); + u16 r7 = ScriptGetVar(ctx); void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); // PhoneCallAppData sub_02092DF4(FieldSystem_GetGearPhoneRingManager(ctx->fieldSystem)); ctx->fieldSystem->unkD2_7 = TRUE; @@ -4657,25 +4657,25 @@ BOOL ScrCmd_SetPhoneCall(ScriptContext *ctx) { BOOL ScrCmd_RunPhoneCall(ScriptContext *ctx) { void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *p_work = PokegearPhone_LaunchApp(ctx->fieldSystem); + *p_work = PokegearPhone_LaunchApp(ctx->fieldSystem); SetupNativeScript(ctx, ScrNative_WaitApplication_DestroyTaskData); return TRUE; } BOOL ScrCmd_LoadPhoneDat(ScriptContext *ctx) { - u16 idx = ScriptGetVar(ctx); + u16 idx = ScriptGetVar(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = LoadPhoneBookEntryI(idx, sub_02092E10(FieldSystem_GetGearPhoneRingManager(ctx->fieldSystem)), HEAP_ID_32); + *p_ret = LoadPhoneBookEntryI(idx, sub_02092E10(FieldSystem_GetGearPhoneRingManager(ctx->fieldSystem)), HEAP_ID_32); return FALSE; } BOOL ScrCmd_GetPhoneContactMsgIds(ScriptContext *ctx) { - u16 *p_scriptno = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); - u8 r6 = ScriptReadByte(ctx); - u16 *sp0 = ScriptGetVarPointer(ctx); - u16 *p_ret_msg = ScriptGetVarPointer(ctx); + u16 *p_scriptno = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_ACTIVE_SCRIPT_NUMBER); + u8 r6 = ScriptReadByte(ctx); + u16 *sp0 = ScriptGetVarPointer(ctx); + u16 *p_ret_msg = ScriptGetVarPointer(ctx); PhoneBookEntry *entry = sub_02092E10(FieldSystem_GetGearPhoneRingManager(ctx->fieldSystem)); - *sp0 = GetPhoneMessageGmm(entry->unk0); + *sp0 = GetPhoneMessageGmm(entry->unk0); u16 r5, p_ret_gmm; if (entry->unk0 == 0xFF) { @@ -4686,7 +4686,7 @@ BOOL ScrCmd_GetPhoneContactMsgIds(ScriptContext *ctx) { r6 = 0; } p_ret_gmm = ScriptNumToTrainerNum(*p_scriptno); - r5 = r6 + 1; + r5 = r6 + 1; if (p_ret_gmm >= LAST_TRAINER_INDEX) { *p_ret_msg = r5; } else if ((u16)TrainerNumIsDouble(ScriptNumToTrainerNum(*p_scriptno)) == FALSE) { @@ -4705,7 +4705,7 @@ BOOL ScrCmd_462(ScriptContext *ctx) { } BOOL ScrCmd_GetPhoneContactRandomGiftBerry(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); PhoneBookEntry *entry = sub_02092E10(FieldSystem_GetGearPhoneRingManager(ctx->fieldSystem)); if (entry->gift == ITEM_CHERI_BERRY) { *p_ret = ITEM_CHERI_BERRY + (LCRandom() % 10); @@ -4716,10 +4716,10 @@ BOOL ScrCmd_GetPhoneContactRandomGiftBerry(ScriptContext *ctx) { } BOOL ScrCmd_GetPhoneContactGiftItem(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); - PhoneBookEntry *entry = sub_02092E10(FieldSystem_GetGearPhoneRingManager(ctx->fieldSystem)); + u16 *p_ret = ScriptGetVarPointer(ctx); + PhoneBookEntry *entry = sub_02092E10(FieldSystem_GetGearPhoneRingManager(ctx->fieldSystem)); MomsSavings *momsSavings = SaveData_GetMomsSavingsAddr(ctx->fieldSystem->saveData); - *p_ret = PhoneRematches_GiftItemIdGet(momsSavings, entry->unk0); + *p_ret = PhoneRematches_GiftItemIdGet(momsSavings, entry->unk0); PhoneRematches_GiftItemIdSet(momsSavings, entry->unk0, ITEM_NONE); return FALSE; } @@ -4743,7 +4743,7 @@ BOOL ScrCmd_CameronPhoto(ScriptContext *ctx) { BOOL ScrCmd_CountSavedPhotos(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = PhotoAlbum_GetNumSaved(Save_PhotoAlbum_Get(ctx->fieldSystem->saveData)); + *p_ret = PhotoAlbum_GetNumSaved(Save_PhotoAlbum_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -4753,7 +4753,7 @@ BOOL ScrCmd_OpenPhotoAlbum(ScriptContext *ctx) { } BOOL ScrCmd_PlaceStarterBallsInElmsLab(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; const VecFx32 ballCoords[3] = { { FX32_CONST(131), 0, FX32_CONST(65) }, { FX32_CONST(141), 0, FX32_CONST(65) }, @@ -4778,8 +4778,8 @@ BOOL ScrCmd_PlaceStarterBallsInElmsLab(ScriptContext *ctx) { } BOOL ScrCmd_622(ScriptContext *ctx) { - u16 objectId = ScriptReadHalfword(ctx); - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 objectId = ScriptReadHalfword(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); LocalMapObject *object = MapObjectManager_GetFirstActiveObjectByID(ctx->fieldSystem->mapObjectManager, objectId); if (object != NULL) { *p_ret = MapObject_GetFacingDirection(object); @@ -4796,7 +4796,7 @@ BOOL ScrCmd_FollowMonInteract(ScriptContext *ctx) { BOOL ScrCmd_712(ScriptContext *ctx) { void **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u8 action = ScriptReadByte(ctx); + u8 action = ScriptReadByte(ctx); switch (action) { case 1: *p_work = PokeathlonMedals_LaunchApp(ctx->fieldSystem); @@ -4818,7 +4818,7 @@ BOOL ScrCmd_712(ScriptContext *ctx) { BOOL ScrCmd_AlphPuzzle(ScriptContext *ctx) { // this just loads a different puzzle with another ID AlphPuzzleArgs **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - u8 puzzle = ScriptReadByte(ctx); + u8 puzzle = ScriptReadByte(ctx); if (puzzle > 4) { puzzle = 0; } @@ -4828,20 +4828,20 @@ BOOL ScrCmd_AlphPuzzle(ScriptContext *ctx) { // this just loads a different puzz } BOOL ScrCmd_722(ScriptContext *ctx) { - u8 r7 = ScriptReadByte(ctx); - u8 r6 = ScriptReadByte(ctx); + u8 r7 = ScriptReadByte(ctx); + u8 r6 = ScriptReadByte(ctx); u16 sp8 = ScriptReadHalfword(ctx); - u16 r4 = ScriptReadHalfword(ctx); + u16 r4 = ScriptReadHalfword(ctx); u16 sp4 = ScriptReadHalfword(ctx); sub_020977CC(ctx->fieldSystem, r7, r6, sp8, r4, sp4); return TRUE; } BOOL ScrCmd_723(ScriptContext *ctx) { - u8 r7 = ScriptReadByte(ctx); - u8 r6 = ScriptReadByte(ctx); + u8 r7 = ScriptReadByte(ctx); + u8 r6 = ScriptReadByte(ctx); u16 sp8 = ScriptReadHalfword(ctx); - u16 r4 = ScriptReadHalfword(ctx); + u16 r4 = ScriptReadHalfword(ctx); u16 sp4 = ScriptReadHalfword(ctx); sub_020979A8(ctx->fieldSystem, r7, r6, sp8, r4, sp4); return TRUE; @@ -4855,7 +4855,7 @@ BOOL ScrCmd_Cinematic(ScriptContext *ctx) { BOOL ScrCmd_GetFollowPokePartyIndex(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = GetIdxOfFirstAliveMonInParty_CrashIfNone(SaveArray_Party_Get(ctx->fieldSystem->saveData)); + *p_ret = GetIdxOfFirstAliveMonInParty_CrashIfNone(SaveArray_Party_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -4903,7 +4903,7 @@ BOOL ScrCmd_732(ScriptContext *ctx) { } BOOL ScrCmd_733(ScriptContext *ctx) { - u8 r6 = ScriptReadByte(ctx); + u8 r6 = ScriptReadByte(ctx); u16 *p_ret = ScriptGetVarPointer(ctx); if (ov02_02250780(ctx->fieldSystem, r6)) { *p_ret = TRUE; @@ -4934,9 +4934,9 @@ BOOL ScrCmd_TouchscreenMenuHide(ScriptContext *ctx) { BOOL sub_020476E8(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); - int r5 = ov01_021F6B00(fieldSystem); - int r0 = ov01_021F6B10(fieldSystem); + u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); + int r5 = ov01_021F6B00(fieldSystem); + int r0 = ov01_021F6B10(fieldSystem); if (r5 == 3 && r0 == 1) { return TRUE; } else { @@ -4956,9 +4956,9 @@ BOOL ScrCmd_TouchscreenMenuShow(ScriptContext *ctx) { BOOL sub_02047744(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); - int r5 = ov01_021F6B00(fieldSystem); - int r0 = ov01_021F6B10(fieldSystem); + u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); + int r5 = ov01_021F6B00(fieldSystem); + int r0 = ov01_021F6B10(fieldSystem); if (r5 == 0 && r0 == 1) { return TRUE; } else { @@ -4968,7 +4968,7 @@ BOOL sub_02047744(ScriptContext *ctx) { BOOL ScrCmd_815(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 r1 = ScriptReadHalfword(ctx); + u16 r1 = ScriptReadHalfword(ctx); sub_0203E33C(fieldSystem, r1); return FALSE; } @@ -4977,8 +4977,8 @@ BOOL sub_020477C0(ScriptContext *ctx); BOOL ScrCmd_GetMenuChoice(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 var_ret = ScriptReadHalfword(ctx); - ctx->data[0] = var_ret; + u16 var_ret = ScriptReadHalfword(ctx); + ctx->data[0] = var_ret; ov01_021F6ABC(fieldSystem, 3, 3, &ctx->data[1]); SetupNativeScript(ctx, sub_020477C0); return TRUE; @@ -4986,9 +4986,9 @@ BOOL ScrCmd_GetMenuChoice(ScriptContext *ctx) { BOOL sub_020477C0(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); - int r7 = ov01_021F6B00(fieldSystem); - int r0 = ov01_021F6AEC(fieldSystem); + u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); + int r7 = ov01_021F6B00(fieldSystem); + int r0 = ov01_021F6AEC(fieldSystem); if (r7 == 3 && r0 == 6) { *p_ret = ctx->data[1]; return TRUE; @@ -5009,9 +5009,9 @@ BOOL ScrCmd_MenuInit(ScriptContext *ctx) { BOOL ScrCmd_MenuItemAdd(ScriptContext *ctx) { struct UnkStruct_ov01_021EDC28 **p_menu = ov01_021F6B20(ctx->fieldSystem); - u16 msgId = ScriptGetVar(ctx); - u16 where = ScriptGetVar(ctx); - u16 value = ScriptGetVar(ctx); + u16 msgId = ScriptGetVar(ctx); + u16 where = ScriptGetVar(ctx); + u16 value = ScriptGetVar(ctx); MoveTutorMenu_SetListItem(*p_menu, msgId, where, value); return FALSE; } @@ -5020,9 +5020,9 @@ BOOL sub_020478D0(ScriptContext *ctx); BOOL sub_02047908(struct UnkStruct_ov01_021EDC28 *menu, int idx); BOOL ScrCmd_MenuExec(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct UnkStruct_ov01_021EDC28 **p_menu = ov01_021F6B20(fieldSystem); - u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); + u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); ov01_021F6ABC(fieldSystem, 3, 7, p_ret); ov01_021F6B34(fieldSystem, sub_02047908, *p_menu); SetupNativeScript(ctx, sub_020478D0); @@ -5030,9 +5030,9 @@ BOOL ScrCmd_MenuExec(ScriptContext *ctx) { } BOOL sub_020478D0(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct UnkStruct_ov01_021EDC28 **p_menu = ov01_021F6B20(fieldSystem); - u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); + u16 *p_ret = GetVarPointer(fieldSystem, ctx->data[0]); if (*p_ret == 0xEEEE) { return FALSE; } else { @@ -5049,7 +5049,7 @@ BOOL sub_02047908(struct UnkStruct_ov01_021EDC28 *menu, int idx) { static u32 GetMaxBankTransactionAmount(FieldSystem *fieldSystem, int action) { u32 ret; u32 wallet = PlayerProfile_GetMoney(Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); - u32 bank = MomSavingsBalanceAction(SaveData_GetMomsSavingsAddr(fieldSystem->saveData), MOMS_BALANCE_GET, 0); + u32 bank = MomSavingsBalanceAction(SaveData_GetMomsSavingsAddr(fieldSystem->saveData), MOMS_BALANCE_GET, 0); switch (action) { case 0: ret = MAX_MONEY - bank; @@ -5073,13 +5073,13 @@ BOOL sub_020479D4(ScriptContext *ctx); BOOL ScrCmd_BankTransaction(ScriptContext *ctx) { struct BankTransactionWork **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 mode = ScriptReadHalfword(ctx); - u16 var_ret = ScriptReadHalfword(ctx); + u16 mode = ScriptReadHalfword(ctx); + u16 var_ret = ScriptReadHalfword(ctx); struct BankTransactionWork *work = *p_work = AllocFromHeap(HEAP_ID_4, sizeof(struct BankTransactionWork)); // statement must be this way to match - work->sub = AllocFromHeap(HEAP_ID_4, sizeof(struct BankTransactionWorkSub)); - work->mode = mode; - work->sub->max = GetMaxBankTransactionAmount(ctx->fieldSystem, mode); - work->sub->selected = -1; + work->sub = AllocFromHeap(HEAP_ID_4, sizeof(struct BankTransactionWorkSub)); + work->mode = mode; + work->sub->max = GetMaxBankTransactionAmount(ctx->fieldSystem, mode); + work->sub->selected = -1; ov01_021F6A9C(ctx->fieldSystem, 5, work->sub); ctx->data[0] = var_ret; SetupNativeScript(ctx, sub_020479D4); @@ -5088,8 +5088,8 @@ BOOL ScrCmd_BankTransaction(ScriptContext *ctx) { BOOL sub_020479D4(ScriptContext *ctx) { struct BankTransactionWork **p_work = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 *p_ret = GetVarPointer(ctx->fieldSystem, ctx->data[0]); - struct BankTransactionWork *work = *p_work; + u16 *p_ret = GetVarPointer(ctx->fieldSystem, ctx->data[0]); + struct BankTransactionWork *work = *p_work; if (work->sub->selected == -1) { return FALSE; } else if (work->sub->selected == 0) { @@ -5137,8 +5137,8 @@ BOOL ScrCmd_BankOrWalletIsFull(ScriptContext *ctx) { BOOL ScrCmd_RockSmashItemCheck(ScriptContext *ctx) { u16 followMonKnowsHm = ScriptGetVar(ctx); - u16 *itemFound = ScriptGetVarPointer(ctx); - u16 *item = ScriptGetVarPointer(ctx); + u16 *itemFound = ScriptGetVarPointer(ctx); + u16 *item = ScriptGetVarPointer(ctx); FieldSystem_RockSmashItemCheck(ctx->fieldSystem, (u8)followMonKnowsHm, itemFound, item); return TRUE; } @@ -5235,7 +5235,7 @@ BOOL ScrCmd_SetFollowMonInhibitState(ScriptContext *ctx) { // Loads an overlay containing additional script commands or data BOOL ScrCmd_ScriptOverlayCmd(ScriptContext *ctx) { - u8 ovy = ScriptReadByte(ctx); + u8 ovy = ScriptReadByte(ctx); u8 action = ScriptReadByte(ctx); static const FSOverlayID _020FACB0[] = { @@ -5260,7 +5260,7 @@ BOOL ScrCmd_ScriptOverlayCmd(ScriptContext *ctx) { } BOOL ScrCmd_CheckBankBalance(ScriptContext *ctx) { - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); u32 check_amt = ScriptReadWord(ctx); if (MomSavingsBalanceAction(SaveData_GetMomsSavingsAddr(ctx->fieldSystem->saveData), MOMS_BALANCE_GET, 0) >= check_amt) { *p_ret = TRUE; @@ -5271,14 +5271,14 @@ BOOL ScrCmd_CheckBankBalance(ScriptContext *ctx) { } BOOL ScrCmd_BufferRulesetName(ScriptContext *ctx) { - u16 ruleset = ScriptReadHalfword(ctx); + u16 ruleset = ScriptReadHalfword(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); ov03_022566D0(ctx->fieldSystem, *p_msgFmt, ruleset); return FALSE; } BOOL ScrCmd_799(ScriptContext *ctx) { - u16 *p_var = ScriptGetVarPointer(ctx); + u16 *p_var = ScriptGetVarPointer(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); ov03_022566D0(ctx->fieldSystem, *p_msgFmt, *p_var); return FALSE; @@ -5292,8 +5292,8 @@ BOOL ScrCmd_800(ScriptContext *ctx) { BOOL ScrCmd_801(ScriptContext *ctx) { Window **p_moneyBox = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MONEY_BOX); - u16 *p_var = ScriptGetVarPointer(ctx); - *p_moneyBox = ov01_021EEF68(ctx->fieldSystem, *p_var); + u16 *p_var = ScriptGetVarPointer(ctx); + *p_moneyBox = ov01_021EEF68(ctx->fieldSystem, *p_var); return FALSE; } @@ -5304,10 +5304,10 @@ BOOL ScrCmd_802(ScriptContext *ctx) { } BOOL ScrCmd_803(ScriptContext *ctx) { - u16 *r4 = ScriptGetVarPointer(ctx); - u16 *r6 = ScriptGetVarPointer(ctx); + u16 *r4 = ScriptGetVarPointer(ctx); + u16 *r6 = ScriptGetVarPointer(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - *r6 = ov03_02256A2C(ctx->fieldSystem, *p_msgFmt, *r4); + *r6 = ov03_02256A2C(ctx->fieldSystem, *p_msgFmt, *r4); return FALSE; } @@ -5362,9 +5362,9 @@ BOOL ScrCmd_822(ScriptContext *ctx) { } BOOL ScrCmd_823(ScriptContext *ctx) { - u16 *p_var = ScriptGetVarPointer(ctx); + u16 *p_var = ScriptGetVarPointer(ctx); MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - PlayerProfile *profile = PlayerProfile_New(HEAP_ID_4); + PlayerProfile *profile = PlayerProfile_New(HEAP_ID_4); SafariZone_GetLinkLeaderToProfile(Save_SafariZone_Get(ctx->fieldSystem->saveData), profile); BufferPlayersName(*p_msgFmt, *p_var, profile); FreeToHeap(profile); @@ -5373,7 +5373,7 @@ BOOL ScrCmd_823(ScriptContext *ctx) { BOOL ScrCmd_824(ScriptContext *ctx) { SafariZone *safariZone = Save_SafariZone_Get(ctx->fieldSystem->saveData); - u16 *p_ret = ScriptGetVarPointer(ctx); + u16 *p_ret = ScriptGetVarPointer(ctx); SafariZone_DeactivateLinkIfExpired(safariZone); if (SafariZone_IsCurrentlyLinked(safariZone)) { *p_ret = TRUE; @@ -5405,7 +5405,7 @@ BOOL ScrCmd_830(ScriptContext *ctx) { BOOL ScrCmd_831(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = ov02_0225316C(); + *p_ret = ov02_0225316C(); return FALSE; } @@ -5421,7 +5421,7 @@ BOOL ScrCmd_832(ScriptContext *ctx) { BOOL ScrCmd_833(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = ov02_022531B4(ctx->fieldSystem->saveData); + *p_ret = ov02_022531B4(ctx->fieldSystem->saveData); return FALSE; } diff --git a/src/scrcmd_daycare.c b/src/scrcmd_daycare.c index bf39743ad6..7e136a70eb 100644 --- a/src/scrcmd_daycare.c +++ b/src/scrcmd_daycare.c @@ -14,9 +14,9 @@ extern u32 FollowMon_GetSpriteID(int species, u16 form, u32 gender); static LocalMapObject *CreateDaycareMonSpriteInternal(MapObjectManager *object_man, u8 dc_mon_idx, u16 species, u8 form, u32 gender, u32 direction, u32 x, u32 y, u32 map_no, BOOL shiny); BOOL ScrCmd_BufferDaycareMonNicks(ScriptContext *ctx) { - SaveData *saveData = ctx->fieldSystem->saveData; + SaveData *saveData = ctx->fieldSystem->saveData; MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - Daycare *daycare = Save_Daycare_Get(saveData); + Daycare *daycare = Save_Daycare_Get(saveData); Save_Daycare_BufferStoredMonNicks(daycare, *msg_fmt); @@ -25,8 +25,8 @@ BOOL ScrCmd_BufferDaycareMonNicks(ScriptContext *ctx) { BOOL ScrCmd_GetDaycareState(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 *ret_ptr = ScriptGetVarPointer(ctx); - Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); + u16 *ret_ptr = ScriptGetVarPointer(ctx); + Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); *ret_ptr = Save_Daycare_GetState(daycare); @@ -43,10 +43,10 @@ BOOL ScrCmd_ResetDaycareEgg(ScriptContext *ctx) { BOOL ScrCmd_GiveDaycareEgg(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - Daycare *daycare = SaveArray_Get(fieldSystem->saveData, SAVE_DAYCARE); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); - SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); + Daycare *daycare = SaveArray_Get(fieldSystem->saveData, SAVE_DAYCARE); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); + SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); GiveEggToPlayer(daycare, party, profile); @@ -55,12 +55,12 @@ BOOL ScrCmd_GiveDaycareEgg(ScriptContext *ctx) { BOOL ScrCmd_RetrieveDaycareMon(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - SaveData *saveData = fieldSystem->saveData; - u16 *ret_ptr = ScriptGetVarPointer(ctx); - u16 daycare_mon_idx = ScriptGetVar(ctx); - Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + SaveData *saveData = fieldSystem->saveData; + u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 daycare_mon_idx = ScriptGetVar(ctx); + Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); *ret_ptr = Save_Daycare_RetrieveMon(party, *msg_fmt, daycare, (u8)daycare_mon_idx); @@ -69,11 +69,11 @@ BOOL ScrCmd_RetrieveDaycareMon(ScriptContext *ctx) { BOOL ScrCmd_BufferDaycareWithdrawCost(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - SaveData *saveData = fieldSystem->saveData; - u16 *ret_ptr = ScriptGetVarPointer(ctx); - u16 daycare_mon_idx = ScriptGetVar(ctx); - Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + SaveData *saveData = fieldSystem->saveData; + u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 daycare_mon_idx = ScriptGetVar(ctx); + Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); *ret_ptr = Save_Daycare_BufferMonNickAndRetrievalPrice(daycare, (u8)daycare_mon_idx, *msg_fmt); @@ -81,11 +81,11 @@ BOOL ScrCmd_BufferDaycareWithdrawCost(ScriptContext *ctx) { } BOOL ScrCmd_BufferDaycareMonGrowth(ScriptContext *ctx) { - SaveData *saveData = ctx->fieldSystem->saveData; + SaveData *saveData = ctx->fieldSystem->saveData; MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 *ret_ptr = ScriptGetVarPointer(ctx); - u16 daycare_mon_idx = ScriptGetVar(ctx); - Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); + u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 daycare_mon_idx = ScriptGetVar(ctx); + Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); *ret_ptr = Save_Daycare_BufferGrowthAndNick(daycare, daycare_mon_idx, *msg_fmt); @@ -94,9 +94,9 @@ BOOL ScrCmd_BufferDaycareMonGrowth(ScriptContext *ctx) { BOOL ScrCmd_GetTailDaycareMonSpeciesAndNick(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 *ret_ptr = ScriptGetVarPointer(ctx); - Daycare *daycare = Save_Daycare_Get(fieldSystem->saveData); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u16 *ret_ptr = ScriptGetVarPointer(ctx); + Daycare *daycare = Save_Daycare_Get(fieldSystem->saveData); *ret_ptr = Save_Daycare_BufferTailMonNick(daycare, *msg_fmt); @@ -105,10 +105,10 @@ BOOL ScrCmd_GetTailDaycareMonSpeciesAndNick(ScriptContext *ctx) { BOOL ScrCmd_PutMonInDaycare(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - SaveData *saveData = fieldSystem->saveData; - u16 slot = ScriptGetVar(ctx); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); - Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); + SaveData *saveData = fieldSystem->saveData; + u16 slot = ScriptGetVar(ctx); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); + Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); Save_Daycare_PutMonIn(party, (u8)slot, daycare, saveData); @@ -116,13 +116,13 @@ BOOL ScrCmd_PutMonInDaycare(ScriptContext *ctx) { } BOOL ScrCmd_BufferDaycareMonStats(ScriptContext *ctx) { - SaveData *saveData = ctx->fieldSystem->saveData; + SaveData *saveData = ctx->fieldSystem->saveData; MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 nickname_idx = ScriptGetVar(ctx); - u16 level_idx = ScriptGetVar(ctx); - u16 gender_idx = ScriptGetVar(ctx); - u16 slot = ScriptGetVar(ctx); - Daycare *daycare = Save_Daycare_Get(saveData); + u16 nickname_idx = ScriptGetVar(ctx); + u16 level_idx = ScriptGetVar(ctx); + u16 gender_idx = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); + Daycare *daycare = Save_Daycare_Get(saveData); Save_Daycare_BufferMonStats(daycare, (u8)nickname_idx, (u8)level_idx, (u8)gender_idx, (u8)slot, *msg_fmt); @@ -131,8 +131,8 @@ BOOL ScrCmd_BufferDaycareMonStats(ScriptContext *ctx) { BOOL ScrCmd_GetDaycareCompatibility(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 *ret_ptr = ScriptGetVarPointer(ctx); - Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); + u16 *ret_ptr = ScriptGetVarPointer(ctx); + Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); *ret_ptr = Save_Daycare_CalcCompatibility(daycare); @@ -141,8 +141,8 @@ BOOL ScrCmd_GetDaycareCompatibility(ScriptContext *ctx) { BOOL ScrCmd_CheckDaycareEgg(ScriptContext *ctx) { SaveData *saveData = ctx->fieldSystem->saveData; - u16 *ret_ptr = ScriptGetVarPointer(ctx); - Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); + u16 *ret_ptr = ScriptGetVarPointer(ctx); + Daycare *daycare = SaveArray_Get(saveData, SAVE_DAYCARE); *ret_ptr = Save_Daycare_HasEgg(daycare); @@ -155,7 +155,7 @@ BOOL ScrCmd_UpdateDaycareMonObjects(ScriptContext *ctx) { u16 species; FieldSystem *fieldSystem = ctx->fieldSystem; - daycare = Save_Daycare_Get(fieldSystem->saveData); + daycare = Save_Daycare_Get(fieldSystem->saveData); for (s32 dc_mon_idx = 0, y = 5, x = 8; dc_mon_idx < 2; dc_mon_idx++, y += 4, x += 2) { LocalMapObject *mon_map_object = MapObjectManager_GetFirstActiveObjectByID(fieldSystem->mapObjectManager, obj_daycare_poke_1 + dc_mon_idx); @@ -168,8 +168,8 @@ BOOL ScrCmd_UpdateDaycareMonObjects(ScriptContext *ctx) { continue; } - form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); - species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); + form = GetBoxMonData(boxMon, MON_DATA_FORM, NULL); + species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); u32 gender = GetBoxMonData(boxMon, MON_DATA_GENDER, NULL); BOOL shiny = BoxMonIsShiny(boxMon); @@ -180,7 +180,7 @@ BOOL ScrCmd_UpdateDaycareMonObjects(ScriptContext *ctx) { } static LocalMapObject *CreateDaycareMonSpriteInternal(MapObjectManager *object_man, u8 dc_mon_idx, u16 species, u8 form, u32 gender, u32 direction, u32 x, u32 y, u32 map_no, BOOL shiny) { - u32 sprite_id = FollowMon_GetSpriteID(species, form, gender); + u32 sprite_id = FollowMon_GetSpriteID(species, form, gender); LocalMapObject *lmo = MapObject_Create(object_man, x, y, direction, sprite_id, 11, map_no); GF_ASSERT(lmo != NULL); @@ -204,10 +204,10 @@ BOOL ScrCmd_DaycareSanitizeMon(ScriptContext *ctx) { Pokemon *mon; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 party_slot = ScriptGetVar(ctx); - u16 *ret_ptr = ScriptGetVarPointer(ctx); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); - mon = Party_GetMonByIndex(party, party_slot); + u16 party_slot = ScriptGetVar(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); + mon = Party_GetMonByIndex(party, party_slot); *ret_ptr = 0; diff --git a/src/scrcmd_dppl_prizes.c b/src/scrcmd_dppl_prizes.c index 48d1e9690d..c899db90f9 100644 --- a/src/scrcmd_dppl_prizes.c +++ b/src/scrcmd_dppl_prizes.c @@ -23,12 +23,12 @@ static const u16 sDPPlGameCornerPrizeMap[][2] = { }; BOOL ScrCmd_GetDPPlPrizeItemIdAndCost(ScriptContext *ctx) { - u16 prize_id = ScriptGetVar(ctx); + u16 prize_id = ScriptGetVar(ctx); u16 *prize_item_id = ScriptGetVarPointer(ctx); - u16 *prize_cost = ScriptGetVarPointer(ctx); + u16 *prize_cost = ScriptGetVarPointer(ctx); *prize_item_id = sDPPlGameCornerPrizeMap[prize_id][0]; - *prize_cost = sDPPlGameCornerPrizeMap[prize_id][1]; + *prize_cost = sDPPlGameCornerPrizeMap[prize_id][1]; return FALSE; } diff --git a/src/scrcmd_fossils.c b/src/scrcmd_fossils.c index cbf0b914aa..6055726c50 100644 --- a/src/scrcmd_fossils.c +++ b/src/scrcmd_fossils.c @@ -17,7 +17,7 @@ static const u16 sFossilPokemonMap[7][2] = { BOOL ScrCmd_CountFossils(ScriptContext *ctx) { FieldSystem *sav_ptr = ctx->fieldSystem; - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); u8 i; u16 total; @@ -30,7 +30,7 @@ BOOL ScrCmd_CountFossils(ScriptContext *ctx) { } BOOL ScrCmd_GetFossilPokemon(ScriptContext *ctx) { - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); u16 fossil_id = ScriptGetVar(ctx); *ret_ptr = 0; @@ -46,9 +46,9 @@ BOOL ScrCmd_GetFossilPokemon(ScriptContext *ctx) { BOOL ScrCmd_GetFossilMinimumAmount(ScriptContext *ctx) { FieldSystem *sav_ptr = ctx->fieldSystem; - u16 *ret_ptr1 = ScriptGetVarPointer(ctx); - u16 *ret_ptr2 = ScriptGetVarPointer(ctx); - u16 needed_amount = ScriptGetVar(ctx); + u16 *ret_ptr1 = ScriptGetVarPointer(ctx); + u16 *ret_ptr2 = ScriptGetVarPointer(ctx); + u16 needed_amount = ScriptGetVar(ctx); *ret_ptr1 = 0; *ret_ptr2 = 0; diff --git a/src/scrcmd_items.c b/src/scrcmd_items.c index fc2f89f4d9..0485afc295 100644 --- a/src/scrcmd_items.c +++ b/src/scrcmd_items.c @@ -8,9 +8,9 @@ extern BOOL ItemIsTMOrHM(u16 item_id); BOOL ScrCmd_GiveItem(ScriptContext *ctx) { FieldSystem *sav_ptr = ctx->fieldSystem; - u16 item_id = ScriptGetVar(ctx); - u16 quantity = ScriptGetVar(ctx); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 item_id = ScriptGetVar(ctx); + u16 quantity = ScriptGetVar(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); Bag *bag = Save_Bag_Get(sav_ptr->saveData); *ret_ptr = Bag_AddItem(bag, item_id, quantity, HEAP_ID_4); @@ -20,9 +20,9 @@ BOOL ScrCmd_GiveItem(ScriptContext *ctx) { BOOL ScrCmd_TakeItem(ScriptContext *ctx) { FieldSystem *sav_ptr = ctx->fieldSystem; - u16 item_id = ScriptGetVar(ctx); - u16 quantity = ScriptGetVar(ctx); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 item_id = ScriptGetVar(ctx); + u16 quantity = ScriptGetVar(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); Bag *bag = Save_Bag_Get(sav_ptr->saveData); *ret_ptr = Bag_TakeItem(bag, item_id, quantity, HEAP_ID_4); @@ -32,9 +32,9 @@ BOOL ScrCmd_TakeItem(ScriptContext *ctx) { BOOL ScrCmd_HasSpaceForItem(ScriptContext *ctx) { FieldSystem *sav_ptr = ctx->fieldSystem; - u16 item_id = ScriptGetVar(ctx); - u16 quantity = ScriptGetVar(ctx); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 item_id = ScriptGetVar(ctx); + u16 quantity = ScriptGetVar(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); Bag *bag = Save_Bag_Get(sav_ptr->saveData); *ret_ptr = Bag_HasSpaceForItem(bag, item_id, quantity, HEAP_ID_4); @@ -44,9 +44,9 @@ BOOL ScrCmd_HasSpaceForItem(ScriptContext *ctx) { BOOL ScrCmd_HasItem(ScriptContext *ctx) { FieldSystem *sav_ptr = ctx->fieldSystem; - u16 item_id = ScriptGetVar(ctx); - u16 quantity = ScriptGetVar(ctx); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 item_id = ScriptGetVar(ctx); + u16 quantity = ScriptGetVar(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); Bag *bag = Save_Bag_Get(sav_ptr->saveData); *ret_ptr = Bag_HasItem(bag, item_id, quantity, HEAP_ID_FIELD); @@ -56,8 +56,8 @@ BOOL ScrCmd_HasItem(ScriptContext *ctx) { BOOL ScrCmd_GetItemQuantity(ScriptContext *ctx) { FieldSystem *sav_ptr = ctx->fieldSystem; - u16 item_id = ScriptGetVar(ctx); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 item_id = ScriptGetVar(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); Bag *bag = Save_Bag_Get(sav_ptr->saveData); *ret_ptr = Bag_GetQuantity(bag, item_id, HEAP_ID_FIELD); @@ -66,7 +66,7 @@ BOOL ScrCmd_GetItemQuantity(ScriptContext *ctx) { } BOOL ScrCmd_ItemIsTMOrHM(ScriptContext *ctx) { - u16 item_id = ScriptGetVar(ctx); + u16 item_id = ScriptGetVar(ctx); u16 *ret_ptr = ScriptGetVarPointer(ctx); *ret_ptr = ItemIsTMOrHM(item_id); @@ -75,7 +75,7 @@ BOOL ScrCmd_ItemIsTMOrHM(ScriptContext *ctx) { } BOOL ScrCmd_GetItemPocket(ScriptContext *ctx) { - u16 item_id = ScriptGetVar(ctx); + u16 item_id = ScriptGetVar(ctx); u16 *ret_ptr = ScriptGetVarPointer(ctx); *ret_ptr = GetItemAttr(item_id, ITEMATTR_FIELD_POCKET, HEAP_ID_FIELD); diff --git a/src/scrcmd_lottery.c b/src/scrcmd_lottery.c index 6d990618fb..8bb4a132ea 100644 --- a/src/scrcmd_lottery.c +++ b/src/scrcmd_lottery.c @@ -8,27 +8,27 @@ u8 LotoId_CountDigitsMatched(u16 lotoId, u16 otid); BOOL ScrCmd_BufferDeptStoreFloorNo(ScriptContext *ctx) { MessageFormat **msg = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 fieldno = ScriptReadByte(ctx); - u8 floor = ScriptReadByte(ctx); + u8 fieldno = ScriptReadByte(ctx); + u8 floor = ScriptReadByte(ctx); BufferDeptStoreFloorNo(*msg, fieldno, floor); return FALSE; } BOOL ScrCmd_LotoIdGet(ScriptContext *ctx) { SaveVarsFlags *state = Save_VarsFlags_Get(ctx->fieldSystem->saveData); - u16 *retPtr = ScriptGetVarPointer(ctx); - u32 lotoId = Save_VarsFlags_GetLotoId(state); - *retPtr = lotoId; + u16 *retPtr = ScriptGetVarPointer(ctx); + u32 lotoId = Save_VarsFlags_GetLotoId(state); + *retPtr = lotoId; return FALSE; } BOOL ScrCmd_LotoIdSearch(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - PCStorage *storage = SaveArray_PCStorage_Get(fieldSystem->saveData); - u16 *retPtr0 = ScriptGetVarPointer(ctx); - u16 *retPtr1 = ScriptGetVarPointer(ctx); - u16 *retPtr2 = ScriptGetVarPointer(ctx); - u16 lotoId = ScriptGetVar(ctx); + PCStorage *storage = SaveArray_PCStorage_Get(fieldSystem->saveData); + u16 *retPtr0 = ScriptGetVarPointer(ctx); + u16 *retPtr1 = ScriptGetVarPointer(ctx); + u16 *retPtr2 = ScriptGetVarPointer(ctx); + u16 lotoId = ScriptGetVar(ctx); u16 partyCount; u16 monDigit; @@ -46,10 +46,10 @@ BOOL ScrCmd_LotoIdSearch(ScriptContext *ctx) { for (monDigit = 0, monPosition = 0, i = 0; i < partyCount; i++) { Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), i); if (!GetMonData(mon, MON_DATA_IS_EGG, NULL)) { - otid = GetMonData(mon, MON_DATA_OTID, NULL) & 0xffff; + otid = GetMonData(mon, MON_DATA_OTID, NULL) & 0xffff; digitCount = LotoId_CountDigitsMatched(lotoId, otid); if (digitCount != 0 && monDigit < digitCount) { - monDigit = digitCount; + monDigit = digitCount; monPosition = i; } } @@ -59,10 +59,10 @@ BOOL ScrCmd_LotoIdSearch(ScriptContext *ctx) { for (j = 0; j < MONS_PER_BOX; j++) { BoxPokemon *boxMon = PCStorage_GetMonByIndexPair(storage, ii, j); if (GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL) != 0 && !GetBoxMonData(boxMon, MON_DATA_IS_EGG, NULL)) { - otid = GetBoxMonData(boxMon, MON_DATA_OTID, NULL) & 0xffff; + otid = GetBoxMonData(boxMon, MON_DATA_OTID, NULL) & 0xffff; digitCount = LotoId_CountDigitsMatched(lotoId, otid); if (digitCount != 0 && boxDigit < digitCount) { - boxDigit = digitCount; + boxDigit = digitCount; boxPosition = ii * MONS_PER_BOX + j; } } @@ -93,14 +93,14 @@ BOOL ScrCmd_LotoIdSet(ScriptContext *ctx) { } static u16 sLotoId = 0; -static u16 sOtId = 0; +static u16 sOtId = 0; u8 LotoId_CountDigitsMatched(u16 lotoId, u16 otid) { u8 i; u8 count = 0; for (i = 0; i < 5; i++) { sLotoId = lotoId % 10; - sOtId = otid % 10; + sOtId = otid % 10; if ((lotoId % 10) != (otid % 10)) { break; diff --git a/src/scrcmd_mart.c b/src/scrcmd_mart.c index 4b4c58c3bd..deac5cfd10 100644 --- a/src/scrcmd_mart.c +++ b/src/scrcmd_mart.c @@ -46,7 +46,7 @@ BOOL ScrCmd_MartBuy(ScriptContext *ctx) { unused = ScriptGetVar(ctx); - nitems = 0; + nitems = 0; badge_count = 0; for (i = 0; i < 16; i++) { if (PlayerProfile_TestBadgeFlag(Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData), i) == TRUE) { @@ -494,11 +494,11 @@ BOOL ScrCmd_834(ScriptContext *ctx) { const struct MartItem *r3; int i; - sp0 = ScriptGetVarPointer(ctx); + sp0 = ScriptGetVarPointer(ctx); pokeathlon = Save_Pokeathlon_Get(ctx->fieldSystem->saveData); - r6 = 0; - r4 = 0; - varsFlags = Save_VarsFlags_Get(ctx->fieldSystem->saveData); + r6 = 0; + r4 = 0; + varsFlags = Save_VarsFlags_Get(ctx->fieldSystem->saveData); GF_RTC_CopyDate(&date); if (Pokedex_GetNatDexFlag(Save_Pokedex_Get(ctx->fieldSystem->saveData))) { r3 = _0210FA04[date.week + 7]; @@ -529,7 +529,7 @@ BOOL ScrCmd_835(ScriptContext *ctx) { int i; POKEATHLON_SAV *pokeathlon; - ret_ptr = ScriptGetVarPointer(ctx); + ret_ptr = ScriptGetVarPointer(ctx); pokeathlon = Save_Pokeathlon_Get(ctx->fieldSystem->saveData); for (i = 0; i < 27; i++) { if (!sub_02031A78(pokeathlon, i)) { diff --git a/src/scrcmd_money.c b/src/scrcmd_money.c index c9dd12f182..81819bf1ef 100644 --- a/src/scrcmd_money.c +++ b/src/scrcmd_money.c @@ -3,7 +3,7 @@ #include "scrcmd.h" BOOL ScrCmd_AddMoney(ScriptContext *ctx) { - SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); + SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); u32 amount = ScriptReadWord(ctx); @@ -13,7 +13,7 @@ BOOL ScrCmd_AddMoney(ScriptContext *ctx) { } BOOL ScrCmd_SubMoneyImmediate(ScriptContext *ctx) { - SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); + SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); u32 amount = ScriptReadWord(ctx); @@ -23,7 +23,7 @@ BOOL ScrCmd_SubMoneyImmediate(ScriptContext *ctx) { } BOOL ScrCmd_SubMoneyVar(ScriptContext *ctx) { - SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); + SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); u16 amount = ScriptGetVar(ctx); @@ -33,12 +33,12 @@ BOOL ScrCmd_SubMoneyVar(ScriptContext *ctx) { } BOOL ScrCmd_HasEnoughMoneyImmediate(ScriptContext *ctx) { - SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); + SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); u32 amount = ScriptReadWord(ctx); - u32 money = PlayerProfile_GetMoney(profile); + u32 money = PlayerProfile_GetMoney(profile); if (money < amount) { *ret_ptr = FALSE; } else { @@ -49,12 +49,12 @@ BOOL ScrCmd_HasEnoughMoneyImmediate(ScriptContext *ctx) { } BOOL ScrCmd_HasEnoughMoneyVar(ScriptContext *ctx) { - SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); + SaveData *saveData = FieldSystem_GetSaveData(ctx->fieldSystem); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); - u16 *ret_ptr = ScriptGetVarPointer(ctx); + u16 *ret_ptr = ScriptGetVarPointer(ctx); u16 amount = ScriptGetVar(ctx); - u32 money = PlayerProfile_GetMoney(profile); + u32 money = PlayerProfile_GetMoney(profile); if (money < amount) { *ret_ptr = FALSE; } else { diff --git a/src/scrcmd_move_relearner.c b/src/scrcmd_move_relearner.c index 94cfe25cd4..ecec28adfb 100644 --- a/src/scrcmd_move_relearner.c +++ b/src/scrcmd_move_relearner.c @@ -7,15 +7,15 @@ BOOL ScrNative_WaitApplication(ScriptContext *ctx); // Triggered for move deleter BOOL ScrCmd_394(ScriptContext *ctx) { - u16 var0 = ScriptGetVar(ctx); + u16 var0 = ScriptGetVar(ctx); PokemonSummaryArgs **runningAppData = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - *runningAppData = LearnForgetMove_LaunchApp(HEAP_ID_32, ctx->fieldSystem, var0, 0); + *runningAppData = LearnForgetMove_LaunchApp(HEAP_ID_32, ctx->fieldSystem, var0, 0); SetupNativeScript(ctx, ScrNative_WaitApplication); return TRUE; } BOOL ScrCmd_395(ScriptContext *ctx) { - u16 *retPtr = ScriptGetVarPointer(ctx); + u16 *retPtr = ScriptGetVarPointer(ctx); void **runningAppData = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); //*could* be MoveRelearnerArgs, not sure GF_ASSERT(*runningAppData != NULL); @@ -30,26 +30,26 @@ BOOL ScrCmd_395(ScriptContext *ctx) { } BOOL ScrCmd_466(ScriptContext *ctx) { - u16 *retPtr = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); - Pokemon *mon = Party_GetMonByIndex(party, slot); + u16 *retPtr = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + Pokemon *mon = Party_GetMonByIndex(party, slot); u16 *eligibleMoves = MoveRelearner_GetEligibleLevelUpMoves(mon, HEAP_ID_32); - *retPtr = MoveRelearner_IsValidMove(eligibleMoves); + *retPtr = MoveRelearner_IsValidMove(eligibleMoves); FreeToHeap(eligibleMoves); return FALSE; } static void StartMoveRelearner(ScriptContext *ctx, int type, Pokemon *mon, u16 *eligibleMoves) { MoveRelearnerArgs **moveRelearnerPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - MoveRelearnerArgs *moveRelearner = MoveRelearner_New(HEAP_ID_32); - *moveRelearnerPtr = moveRelearner; + MoveRelearnerArgs *moveRelearner = MoveRelearner_New(HEAP_ID_32); + *moveRelearnerPtr = moveRelearner; - moveRelearner->mon = mon; - moveRelearner->profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); - moveRelearner->options = Save_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveData); + moveRelearner->mon = mon; + moveRelearner->profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(ctx->fieldSystem)); + moveRelearner->options = Save_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveData); moveRelearner->eligibleMoves = eligibleMoves; - moveRelearner->type = type; + moveRelearner->type = type; MoveRelearner_LaunchApp(ctx->fieldSystem, moveRelearner); SetupNativeScript(ctx, ScrNative_WaitApplication); @@ -57,28 +57,28 @@ static void StartMoveRelearner(ScriptContext *ctx, int type, Pokemon *mon, u16 * } BOOL ScrCmd_MoveRelearner(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); + u16 slot = ScriptGetVar(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); u16 *eligibleMoves = MoveRelearner_GetEligibleLevelUpMoves(mon, HEAP_ID_32); StartMoveRelearner(ctx, 1, mon, eligibleMoves); return TRUE; } BOOL ScrCmd_MoveTutor(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); - u16 move = ScriptGetVar(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); + u16 slot = ScriptGetVar(ctx); + u16 move = ScriptGetVar(ctx); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); u16 *eligibleMoves = AllocFromHeap(HEAP_ID_32, 2 * sizeof(u16)); - eligibleMoves[0] = move; - eligibleMoves[1] = 0xffff; + eligibleMoves[0] = move; + eligibleMoves[1] = 0xffff; StartMoveRelearner(ctx, MOVE_RELEARNER_TUTOR, mon, eligibleMoves); return TRUE; } BOOL ScrCmd_MoveRelearnerGetResult(ScriptContext *ctx) { - u16 *retPtr = ScriptGetVarPointer(ctx); + u16 *retPtr = ScriptGetVarPointer(ctx); MoveRelearnerArgs **moveRelearnerPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA); - MoveRelearnerArgs *moveRelearner = *moveRelearnerPtr; + MoveRelearnerArgs *moveRelearner = *moveRelearnerPtr; GF_ASSERT(moveRelearner != NULL); if (moveRelearner->padding_1A[0] == 0) { diff --git a/src/scrcmd_move_tutor.c b/src/scrcmd_move_tutor.c index 99c62ff043..2418075284 100644 --- a/src/scrcmd_move_tutor.c +++ b/src/scrcmd_move_tutor.c @@ -97,11 +97,11 @@ static BOOL ov01_0220305C(ScriptContext *ctx); // get number of pages needed to show learnable moves from move tutor BOOL ScrCmd_652(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); - u16 moveTutorNpc = ScriptGetVar(ctx); - u16 *result = ScriptGetVarPointer(ctx); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); - Pokemon *mon = Party_GetMonByIndex(party, slot); + u16 slot = ScriptGetVar(ctx); + u16 moveTutorNpc = ScriptGetVar(ctx); + u16 *result = ScriptGetVarPointer(ctx); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + Pokemon *mon = Party_GetMonByIndex(party, slot); u32 numLearnableMoves = GetLearnableTutorMoves(mon, moveTutorNpc, NULL); if (numLearnableMoves == 0) { *result = 0; @@ -115,15 +115,15 @@ BOOL ScrCmd_652(ScriptContext *ctx) { BOOL ScrCmd_TutorMoveTeachInSlot(ScriptContext *ctx) { u16 partySlot = ScriptGetVar(ctx); - u16 moveSlot = ScriptGetVar(ctx); - u16 move = ScriptGetVar(ctx); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + u16 moveSlot = ScriptGetVar(ctx); + u16 move = ScriptGetVar(ctx); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); PartyMonSetMoveInSlot(party, partySlot, moveSlot, move); return FALSE; } BOOL ScrCmd_TutorMoveGetPrice(ScriptContext *ctx) { - u16 move = ScriptGetVar(ctx); + u16 move = ScriptGetVar(ctx); u16 *result = ScriptGetVarPointer(ctx); for (u32 i = 0; i < NELEMS(sTutorMoves); i++) { if (sTutorMoves[i].move == move) { @@ -138,12 +138,12 @@ BOOL ScrCmd_TutorMoveGetPrice(ScriptContext *ctx) { // check if mon at given slot can learn from headbutt move tutor BOOL ScrCmd_656(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); - u16 *result = ScriptGetVarPointer(ctx); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); - Pokemon *mon = Party_GetMonByIndex(party, slot); + u16 slot = ScriptGetVar(ctx); + u16 *result = ScriptGetVarPointer(ctx); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + Pokemon *mon = Party_GetMonByIndex(party, slot); u32 numLearnableMoves = GetLearnableTutorMoves(mon, MOVE_TUTOR_NPC_HEADBUTT, NULL); - *result = numLearnableMoves > 0 ? TRUE : FALSE; + *result = numLearnableMoves > 0 ? TRUE : FALSE; return FALSE; } @@ -200,10 +200,10 @@ static u16 GetLearnableTutorMoves(Pokemon *mon, u32 moveTutorNpc, u8 dest[]) { for (i = 0; i < MAX_MON_MOVES; i++) { currentMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); } - u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u32 form = GetMonData(mon, MON_DATA_FORM, NULL); + u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + u32 form = GetMonData(mon, MON_DATA_FORM, NULL); MoveTutorLearnset *learnset = GetMoveTutorLearnset(HEAP_ID_FIELD, GetMoveTutorLearnsetIndex(species, form)); - u16 numLearnableMoves = 0; + u16 numLearnableMoves = 0; for (j = 0; j < NELEMS(sTutorMoves); j++) { // this is equivalent to treating `learnset` as a bitfield of 64 bits // and then checking whether bit j is set @@ -251,19 +251,19 @@ BOOL ScrCmd_MoveTutorChooseMove(ScriptContext *ctx) { s32 i; s32 numLearnableMoves; BOOL showNextButton; - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct UnkStruct_ov01_021EDC28 **unk = ov01_021F6B20(fieldSystem); u16 resultVarId; MsgData *messageData; u16 showAsTwoColumns; MessageFormat **messageFormat = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 slot = ScriptGetVar(ctx); - u16 moveTutorNpc = ScriptGetVar(ctx); - u16 pageNum = ScriptGetVar(ctx); - resultVarId = ScriptReadHalfword(ctx); - ctx->data[0] = resultVarId; - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); - numLearnableMoves = GetLearnableTutorMoves(mon, moveTutorNpc, learnableMoves); + u16 slot = ScriptGetVar(ctx); + u16 moveTutorNpc = ScriptGetVar(ctx); + u16 pageNum = ScriptGetVar(ctx); + resultVarId = ScriptReadHalfword(ctx); + ctx->data[0] = resultVarId; + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); + numLearnableMoves = GetLearnableTutorMoves(mon, moveTutorNpc, learnableMoves); s32 numMovesToSkip; if (numLearnableMoves <= 7) { numMovesToSkip = 0; @@ -281,13 +281,13 @@ BOOL ScrCmd_MoveTutorChooseMove(ScriptContext *ctx) { // appropriate value of pageNum is always passed in // for all instances where this function is called. numLearnableMoves = MAX_TUTOR_MOVES_PER_PAGE; - numMovesToSkip = 0; + numMovesToSkip = 0; } - u16 *result = GetVarPointer(fieldSystem, resultVarId); - Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW); - *unk = ov01_021EDF78(fieldSystem, 1, 1, 0, 1, result, *messageFormat, window, ctx->msgdata); - messageData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0750_bin, HEAP_ID_32); - String *string = String_New(0x10, HEAP_ID_32); + u16 *result = GetVarPointer(fieldSystem, resultVarId); + Window *window = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_WINDOW); + *unk = ov01_021EDF78(fieldSystem, 1, 1, 0, 1, result, *messageFormat, window, ctx->msgdata); + messageData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0750_bin, HEAP_ID_32); + String *string = String_New(0x10, HEAP_ID_32); showAsTwoColumns = (numLearnableMoves + showNextButton >= 4) ? 1 : 0; for (i = 0; i < numLearnableMoves; i++) { ReadMsgDataIntoString(messageData, sTutorMoves[learnableMoves[i + numMovesToSkip]].move, string); @@ -308,9 +308,9 @@ BOOL ScrCmd_MoveTutorChooseMove(ScriptContext *ctx) { } static BOOL ov01_0220305C(ScriptContext *ctx) { - FieldSystem *fieldSystem = ctx->fieldSystem; + FieldSystem *fieldSystem = ctx->fieldSystem; struct UnkStruct_ov01_021EDC28 **unk = ov01_021F6B20(fieldSystem); - u16 *result = GetVarPointer(fieldSystem, ctx->data[0]); + u16 *result = GetVarPointer(fieldSystem, ctx->data[0]); if (*result == 0xeeee) { return FALSE; } @@ -320,16 +320,16 @@ static BOOL ov01_0220305C(ScriptContext *ctx) { // Unused BOOL ScrCmd_742(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); - u16 move = ScriptGetVar(ctx); - u16 *result = ScriptGetVarPointer(ctx); - *result = FALSE; + u16 slot = ScriptGetVar(ctx); + u16 move = ScriptGetVar(ctx); + u16 *result = ScriptGetVarPointer(ctx); + *result = FALSE; Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); Pokemon *mon = Party_GetMonByIndex(party, slot); - u16 *unk = AllocFromHeapAtEnd(HEAP_ID_FIELD, 0x2c); - u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); - u32 form = GetMonData(mon, MON_DATA_FORM, NULL); - s32 size = Species_LoadLearnsetTable(species, form, unk); + u16 *unk = AllocFromHeapAtEnd(HEAP_ID_FIELD, 0x2c); + u32 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + u32 form = GetMonData(mon, MON_DATA_FORM, NULL); + s32 size = Species_LoadLearnsetTable(species, form, unk); for (s32 i = 0; i < size; i++) { if (move == unk[i]) { *result = TRUE; diff --git a/src/scrcmd_mystery_gift.c b/src/scrcmd_mystery_gift.c index b77e687f36..621d19476f 100644 --- a/src/scrcmd_mystery_gift.c +++ b/src/scrcmd_mystery_gift.c @@ -112,9 +112,9 @@ static const struct ScriptMysteryGiftFuncs sScriptMysteryGiftActionTable[MG_TAG_ }; static void FieldSystem_InitGetMysteryGiftGmmState(struct GetMysteryGiftGmmState *state, FieldSystem *fieldSys, MessageFormat *msgFormat, MysteryGiftData *mgData) { - state->fieldSys = fieldSys; + state->fieldSys = fieldSys; state->msgFormat = msgFormat; - state->mgData = mgData; + state->mgData = mgData; } static int FieldSystem_GetTagOfNextMG(FieldSystem *fieldSys) { @@ -151,13 +151,13 @@ BOOL ScrCmd_MysteryGift(ScriptContext *ctx) { } case SCR_MG_GET_TYPE: { u16 *ptr = ScriptGetVarPointer(ctx); - *ptr = FieldSystem_GetTagOfNextMG(ctx->fieldSystem); + *ptr = FieldSystem_GetTagOfNextMG(ctx->fieldSystem); break; } case SCR_MG_CAN_RECEIVE: { - u16 *ptr = ScriptGetVarPointer(ctx); + u16 *ptr = ScriptGetVarPointer(ctx); const struct ScriptMysteryGiftFuncs *pFunc = &sScriptMysteryGiftActionTable[FieldSystem_GetTagOfNextMG(ctx->fieldSystem) - 1]; - *ptr = pFunc->check(ctx->fieldSystem, FieldSystem_GetDataOfNextMG(ctx->fieldSystem)); + *ptr = pFunc->check(ctx->fieldSystem, FieldSystem_GetDataOfNextMG(ctx->fieldSystem)); break; } case SCR_MG_RECEIVE: { @@ -169,9 +169,9 @@ BOOL ScrCmd_MysteryGift(ScriptContext *ctx) { case SCR_MG_MESSAGE_RECEIVED: { struct GetMysteryGiftGmmState gmmState; const struct ScriptMysteryGiftFuncs *pFunc = &sScriptMysteryGiftActionTable[FieldSystem_GetTagOfNextMG(ctx->fieldSystem) - 1]; - MessageFormat **pMsgFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 *pMsgBank = ScriptGetVarPointer(ctx); - u16 *pMsgNum = ScriptGetVarPointer(ctx); + MessageFormat **pMsgFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u16 *pMsgBank = ScriptGetVarPointer(ctx); + u16 *pMsgNum = ScriptGetVarPointer(ctx); FieldSystem_InitGetMysteryGiftGmmState(&gmmState, ctx->fieldSystem, *pMsgFormat, FieldSystem_GetDataOfNextMG(ctx->fieldSystem)); pFunc->messageSuccess(&gmmState, pMsgBank, pMsgNum); break; @@ -179,9 +179,9 @@ BOOL ScrCmd_MysteryGift(ScriptContext *ctx) { case SCR_MG_MESSAGE_FAILED: { struct GetMysteryGiftGmmState gmmState; const struct ScriptMysteryGiftFuncs *pFunc = &sScriptMysteryGiftActionTable[FieldSystem_GetTagOfNextMG(ctx->fieldSystem) - 1]; - MessageFormat **pMsgFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u16 *pMsgBank = ScriptGetVarPointer(ctx); - u16 *pMsgNum = ScriptGetVarPointer(ctx); + MessageFormat **pMsgFormat = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u16 *pMsgBank = ScriptGetVarPointer(ctx); + u16 *pMsgNum = ScriptGetVarPointer(ctx); FieldSystem_InitGetMysteryGiftGmmState(&gmmState, ctx->fieldSystem, *pMsgFormat, FieldSystem_GetDataOfNextMG(ctx->fieldSystem)); pFunc->messageFailure(&gmmState, pMsgBank, pMsgNum); break; @@ -200,21 +200,21 @@ static void MGGive_ManaphyEgg(FieldSystem *fieldSys, MysteryGiftData *unused) { static void MGMessageSuccess_ManaphyEgg(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00013; + *pMsgNum = msg_0209_00013; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); } static void MGGive_Mon(FieldSystem *fieldSys, MysteryGiftData *unused) { MysteryGiftPokemonTag *mgData = &FieldSystem_GetDataOfNextMG(fieldSys)->pokemon; - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(fieldSys->saveData); - SaveVarsFlags *vars_flags = Save_VarsFlags_Get(fieldSys->saveData); - Pokemon *tmpPokemon = NULL; - Pokemon *pokemon = &mgData->mon; - u8 *srcRibbons = mgData->ribbons; - int eggMetLocation = GetMonData(pokemon, MON_DATA_EGG_MET_LOCATION, NULL); - int personality = GetMonData(pokemon, MON_DATA_PERSONALITY, NULL); - int otid = GetMonData(pokemon, MON_DATA_OTID, NULL); - int rand = PRandom(OS_GetTick()); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(fieldSys->saveData); + SaveVarsFlags *vars_flags = Save_VarsFlags_Get(fieldSys->saveData); + Pokemon *tmpPokemon = NULL; + Pokemon *pokemon = &mgData->mon; + u8 *srcRibbons = mgData->ribbons; + int eggMetLocation = GetMonData(pokemon, MON_DATA_EGG_MET_LOCATION, NULL); + int personality = GetMonData(pokemon, MON_DATA_PERSONALITY, NULL); + int otid = GetMonData(pokemon, MON_DATA_OTID, NULL); + int rand = PRandom(OS_GetTick()); if (personality != 0) { if (personality == 1) { @@ -233,14 +233,14 @@ static void MGGive_Mon(FieldSystem *fieldSys, MysteryGiftData *unused) { gender = GetMonData(pokemon, MON_DATA_HP_IV, NULL) + GetMonData(pokemon, MON_DATA_ATK_IV, NULL) + GetMonData(pokemon, MON_DATA_DEF_IV, NULL) + GetMonData(pokemon, MON_DATA_SPEED_IV, NULL) + GetMonData(pokemon, MON_DATA_SPATK_IV, NULL) + GetMonData(pokemon, MON_DATA_SPDEF_IV, NULL); if (gender == 0) { u16 ivRand = LCRandom(); - rand = ivRand & 0x1Fu; + rand = ivRand & 0x1Fu; SetMonData(pokemon, MON_DATA_HP_IV, &rand); rand = (ivRand & 0x3E0u) >> 5; SetMonData(pokemon, MON_DATA_ATK_IV, &rand); rand = (ivRand & 0x7C00u) >> 10; SetMonData(pokemon, MON_DATA_DEF_IV, &rand); ivRand = LCRandom(); - rand = ivRand & 0x1Fu; + rand = ivRand & 0x1Fu; SetMonData(pokemon, MON_DATA_SPEED_IV, &rand); rand = (ivRand & 0x3E0u) >> 5; SetMonData(pokemon, MON_DATA_SPATK_IV, &rand); @@ -282,8 +282,8 @@ static void MGGive_Mon(FieldSystem *fieldSys, MysteryGiftData *unused) { if (mgData->fixedOT == OT_ID_PLAYER_ID) { String *playerName = PlayerProfile_GetPlayerName_NewString(profile, HEAP_ID_32); - u32 trainerId = PlayerProfile_GetTrainerID(profile); - BOOL gender = PlayerProfile_GetTrainerGender(profile); + u32 trainerId = PlayerProfile_GetTrainerID(profile); + BOOL gender = PlayerProfile_GetTrainerGender(profile); tmpPokemon = AllocMonZeroed(HEAP_ID_32); #ifdef UBFIX @@ -312,15 +312,15 @@ static void MGGive_Mon(FieldSystem *fieldSys, MysteryGiftData *unused) { static void MGMessageSuccess_GiveMon(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { MysteryGiftPokemonTag *mgData = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->pokemon; - *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00007; + *pMsgBank = NARC_msg_msg_0209_bin; + *pMsgNum = msg_0209_00007; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); BufferBoxMonSpeciesNameWithArticle(gmmState->msgFormat, 1, Mon_GetBoxMon(&mgData->mon)); } static void MGMessageFailure_GiveMon(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00004; + *pMsgNum = msg_0209_00004; } static void MGGive_Egg(FieldSystem *fieldSys, MysteryGiftData *mgData) { @@ -329,14 +329,14 @@ static void MGGive_Egg(FieldSystem *fieldSys, MysteryGiftData *mgData) { static void MGMessageSuccess_Egg(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { MysteryGiftPokemonTag *mgData = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->pokemon; - *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00008; + *pMsgBank = NARC_msg_msg_0209_bin; + *pMsgNum = msg_0209_00008; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); BufferBoxMonSpeciesName(gmmState->msgFormat, 1, Mon_GetBoxMon(&mgData->mon)); } static BOOL MGCheck_Item(FieldSystem *fieldSys, MysteryGiftData *unused) { - Bag *bag = Save_Bag_Get(fieldSys->saveData); + Bag *bag = Save_Bag_Get(fieldSys->saveData); u32 *pItem = &FieldSystem_GetDataOfNextMG(fieldSys)->item; return Bag_HasSpaceForItem(bag, *pItem, 1, HEAP_ID_32); } @@ -351,18 +351,18 @@ static void MGGive_Item(FieldSystem *fieldSys, MysteryGiftData *unused) { } static void MGMessageSuccess_Item(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { - u16 item = FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->item; + u16 item = FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->item; *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00009; + *pMsgNum = msg_0209_00009; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); BufferItemName(gmmState->msgFormat, 1, item); } static void MGMessageFailure_Item(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { - Bag *bag = Save_Bag_Get(gmmState->fieldSys->saveData); - u16 item = FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->item; + Bag *bag = Save_Bag_Get(gmmState->fieldSys->saveData); + u16 item = FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->item; *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00005; + *pMsgNum = msg_0209_00005; BufferItemName(gmmState->msgFormat, 0, item); } @@ -376,8 +376,8 @@ static void MGGive_BattleRules(FieldSystem *fieldSys, MysteryGiftData *mgData) { static void MGMessageSuccess_BattleRules(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { LinkBattleRuleset *mgData = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->ruleset; - *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00010; + *pMsgBank = NARC_msg_msg_0209_bin; + *pMsgNum = msg_0209_00010; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); String *rulesetName = LinkBattleRuleset_CreateStringFromName(mgData, HEAP_ID_32); BufferString(gmmState->msgFormat, 1, rulesetName, 0, 1, 2); @@ -387,7 +387,7 @@ static void MGMessageSuccess_BattleRules(struct GetMysteryGiftGmmState *gmmState // Unreachable static void MGMessageFailure_BattleRules(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00006; + *pMsgNum = msg_0209_00006; } static BOOL MGCheck_Decoration(FieldSystem *fieldSys, MysteryGiftData *mgData) { @@ -400,20 +400,20 @@ static void MGGive_Decoration(FieldSystem *fieldSys, MysteryGiftData *mgData) { // Unreachable static void MGMessageSuccess_Decoration(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { int decoration = FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->baseDecoration; - *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00011; + *pMsgBank = NARC_msg_msg_0209_bin; + *pMsgNum = msg_0209_00011; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); BufferDecorationName(gmmState->msgFormat, 1, decoration); } static void MGMessageFailure_Decoration(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00031; + *pMsgNum = msg_0209_00031; } static BOOL MGCheck_MonDeco(FieldSystem *fieldSys, MysteryGiftData *unused) { MysteryGiftMonDecorationTag *mgData = &FieldSystem_GetDataOfNextMG(fieldSys)->monDecoration; - int id = mgData->id; + int id = mgData->id; switch (mgData->kind) { case MGMONDECOTYPE_SEAL: return SealCase_CheckSealQuantity(Save_SealCase_Get(fieldSys->saveData), id, 1); @@ -428,7 +428,7 @@ static BOOL MGCheck_MonDeco(FieldSystem *fieldSys, MysteryGiftData *unused) { static void MGGive_MonDeco(FieldSystem *fieldSys, MysteryGiftData *unused) { MysteryGiftMonDecorationTag *mgData = &FieldSystem_GetDataOfNextMG(fieldSys)->monDecoration; - int id = mgData->id; + int id = mgData->id; switch (mgData->kind) { case MGMONDECOTYPE_SEAL: GiveOrTakeSeal(Save_SealCase_Get(fieldSys->saveData), id, 1); @@ -446,7 +446,7 @@ static void MGGive_MonDeco(FieldSystem *fieldSys, MysteryGiftData *unused) { static void MGMessageSuccess_MonDeco(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { MysteryGiftMonDecorationTag *mgData = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->monDecoration; - int id = mgData->id; + int id = mgData->id; switch (mgData->kind) { case MGMONDECOTYPE_SEAL: BufferSealName(gmmState->msgFormat, 1, id); @@ -461,13 +461,13 @@ static void MGMessageSuccess_MonDeco(struct GetMysteryGiftGmmState *gmmState, u1 break; } *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00012; + *pMsgNum = msg_0209_00012; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); } static void MGMessageFailure_MonDeco(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00006; + *pMsgNum = msg_0209_00006; } static BOOL MGCheck_MemberCard(FieldSystem *fieldSys, MysteryGiftData *mgData) { @@ -483,7 +483,7 @@ static void MGMessageSuccess_MemberCard(struct GetMysteryGiftGmmState *gmmState, static void MGMessageFailure_MemberCard(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00031; + *pMsgNum = msg_0209_00031; } static BOOL MGCheck_OaksLetter(FieldSystem *fieldSys, MysteryGiftData *mgData) { @@ -499,7 +499,7 @@ static void MGMessageSuccess_OaksLetter(struct GetMysteryGiftGmmState *gmmState, static void MGMessageFailure_OaksLetter(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00031; + *pMsgNum = msg_0209_00031; } static BOOL MGCheck_SecretKey(FieldSystem *fieldSys, MysteryGiftData *mgData) { @@ -515,7 +515,7 @@ static void MGMessageSuccess_SecretKey(struct GetMysteryGiftGmmState *gmmState, static void MGMessageFailure_SecretKey(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00031; + *pMsgNum = msg_0209_00031; } static BOOL MGCheck_AzureFlute(FieldSystem *fieldSys, MysteryGiftData *mgData) { @@ -531,7 +531,7 @@ static void MGMessageSuccess_AzureFlute(struct GetMysteryGiftGmmState *gmmState, static void MGMessageFailure_AzureFlute(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00031; + *pMsgNum = msg_0209_00031; } static BOOL MGCheck_PoketchApp(FieldSystem *fieldSys, MysteryGiftData *mgData) { @@ -547,13 +547,13 @@ static void MGMessageSuccess_PoketchApp(struct GetMysteryGiftGmmState *gmmState, static void MGMessageFailure_PoketchApp(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00031; + *pMsgNum = msg_0209_00031; } static BOOL MGCheck_PokewalkerCourse(FieldSystem *fieldSys, MysteryGiftData *unused) { - u8 *mgData = &FieldSystem_GetDataOfNextMG(fieldSys)->pokewalkerCourse; + u8 *mgData = &FieldSystem_GetDataOfNextMG(fieldSys)->pokewalkerCourse; POKEWALKER *pokeWalker = Save_Pokewalker_Get(fieldSys->saveData); - u8 courseNo = WALKER_COURSE_REFRESHING_FIELD; + u8 courseNo = WALKER_COURSE_REFRESHING_FIELD; if (*mgData < WALKER_COURSE_MAX) { courseNo = *mgData; } @@ -562,7 +562,7 @@ static BOOL MGCheck_PokewalkerCourse(FieldSystem *fieldSys, MysteryGiftData *unu static void MGGive_PokewalkerCourse(FieldSystem *fieldSys, MysteryGiftData *unused) { POKEWALKER *pokeWalker = Save_Pokewalker_Get(fieldSys->saveData); - u8 courseNo = FieldSystem_GetDataOfNextMG(fieldSys)->pokewalkerCourse; + u8 courseNo = FieldSystem_GetDataOfNextMG(fieldSys)->pokewalkerCourse; if (courseNo < WALKER_COURSE_MAX) { Pokewalker_UnlockCourse(pokeWalker, courseNo); } @@ -570,31 +570,31 @@ static void MGGive_PokewalkerCourse(FieldSystem *fieldSys, MysteryGiftData *unus static void MGMessageSuccess_PokewalkerCourse(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { u8 *mgData = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->pokewalkerCourse; - *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00019; + *pMsgBank = NARC_msg_msg_0209_bin; + *pMsgNum = msg_0209_00019; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); BufferPokewalkerCourseName(gmmState->msgFormat, 1, *mgData); } static void MGMessageFailure_PokewalkerCourse(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { - u8 *mgData = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->pokewalkerCourse; + u8 *mgData = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->pokewalkerCourse; POKEWALKER *pokeWalker = Save_Pokewalker_Get(gmmState->fieldSys->saveData); - *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00026; + *pMsgBank = NARC_msg_msg_0209_bin; + *pMsgNum = msg_0209_00026; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); BufferPokewalkerCourseName(gmmState->msgFormat, 1, *mgData); } static BOOL MGCheck_MemorialPhoto(FieldSystem *fieldSys, MysteryGiftData *mgData) { - Bag *bag = Save_Bag_Get(fieldSys->saveData); + Bag *bag = Save_Bag_Get(fieldSys->saveData); PhotoAlbum *album = Save_PhotoAlbum_Get(fieldSys->saveData); return PhotoAlbum_GetNumSaved(album) < PHOTO_ALBUM_MAX; } static void MGGive_MemorialPhoto(FieldSystem *fieldSys, MysteryGiftData *unused) { - Photo *mgData = &FieldSystem_GetDataOfNextMG(fieldSys)->photo; + Photo *mgData = &FieldSystem_GetDataOfNextMG(fieldSys)->photo; PhotoAlbum *album = Save_PhotoAlbum_Get(FieldSystem_GetSaveData(fieldSys)); - u8 slot = PhotoAlbum_GetIndexOfFirstEmptySlot(album); + u8 slot = PhotoAlbum_GetIndexOfFirstEmptySlot(album); if (slot == 0xFF) { GF_ASSERT(FALSE); } else { @@ -604,15 +604,15 @@ static void MGGive_MemorialPhoto(FieldSystem *fieldSys, MysteryGiftData *unused) static void MGMessageSuccess_MemorialPhoto(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { Photo *photo = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->photo; - *pMsgBank = NARC_msg_msg_0209_bin; - *pMsgNum = msg_0209_00018; + *pMsgBank = NARC_msg_msg_0209_bin; + *pMsgNum = msg_0209_00018; BufferPlayersName(gmmState->msgFormat, 0, Save_PlayerData_GetProfileAddr(gmmState->fieldSys->saveData)); } static void MGMessageFailure_MemorialPhoto(struct GetMysteryGiftGmmState *gmmState, u16 *pMsgBank, u16 *pMsgNum) { Photo *photo = &FieldSystem_GetDataOfNextMG(gmmState->fieldSys)->photo; - Bag *bag = Save_Bag_Get(gmmState->fieldSys->saveData); - *pMsgBank = NARC_msg_msg_0209_bin; + Bag *bag = Save_Bag_Get(gmmState->fieldSys->saveData); + *pMsgBank = NARC_msg_msg_0209_bin; if (!Bag_HasItem(bag, ITEM_PHOTO_ALBUM, 1, HEAP_ID_FIELD)) { *pMsgNum = msg_0209_00024; } else { diff --git a/src/scrcmd_party.c b/src/scrcmd_party.c index 6f04d902ca..2c22ca794f 100644 --- a/src/scrcmd_party.c +++ b/src/scrcmd_party.c @@ -16,25 +16,25 @@ FS_EXTERN_OVERLAY(npc_trade); BOOL ScrCmd_GiveMon(ScriptContext *ctx) { - u16 map = MapHeader_GetMapSec(ctx->fieldSystem->location->mapId); + u16 map = MapHeader_GetMapSec(ctx->fieldSystem->location->mapId); FieldSystem *fieldSystem = ctx->fieldSystem; - Pokedex *pokedex = Save_Pokedex_Get(fieldSystem->saveData); + Pokedex *pokedex = Save_Pokedex_Get(fieldSystem->saveData); - u16 species = ScriptGetVar(ctx); - u8 level = ScriptGetVar(ctx); + u16 species = ScriptGetVar(ctx); + u8 level = ScriptGetVar(ctx); u16 heldItem = ScriptGetVar(ctx); - u8 form = ScriptGetVar(ctx); - u16 ability = ScriptGetVar(ctx); - u16 *retPtr = ScriptGetVarPointer(ctx); + u8 form = ScriptGetVar(ctx); + u16 ability = ScriptGetVar(ctx); + u16 *retPtr = ScriptGetVarPointer(ctx); Party *party = SaveArray_Party_Get(fieldSystem->saveData); - *retPtr = GiveMon(HEAP_ID_FIELD, fieldSystem->saveData, species, level, form, ability, heldItem, map, 24); + *retPtr = GiveMon(HEAP_ID_FIELD, fieldSystem->saveData, species, level, form, ability, heldItem, map, 24); return FALSE; } BOOL ScrCmd_TakeMon(ScriptContext *ctx) { - u8 slot = ScriptGetVar(ctx); + u8 slot = ScriptGetVar(ctx); Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); Party_RemoveMon(party, slot); return FALSE; @@ -42,8 +42,8 @@ BOOL ScrCmd_TakeMon(ScriptContext *ctx) { BOOL ScrCmd_GetPartyMonSpecies(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 slot = ScriptGetVar(ctx); - u16 *species = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); + u16 *species = ScriptGetVarPointer(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); if (!GetMonData(mon, MON_DATA_IS_EGG, NULL)) { @@ -57,15 +57,15 @@ BOOL ScrCmd_GetPartyMonSpecies(ScriptContext *ctx) { BOOL ScrCmd_PartymonIsMine(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - SaveData *save = FieldSystem_GetSaveData(fieldSystem); - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(save); + SaveData *save = FieldSystem_GetSaveData(fieldSystem); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(save); u16 *slot = ScriptGetVarPointer(ctx); u16 *mine = ScriptGetVarPointer(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), *slot); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), *slot); u16 pokemonID = GetMonData(mon, MON_DATA_OTID, NULL); - u16 playerID = PlayerProfile_GetTrainerID(profile); + u16 playerID = PlayerProfile_GetTrainerID(profile); if (pokemonID == playerID) { *mine = FALSE; @@ -78,12 +78,12 @@ BOOL ScrCmd_PartymonIsMine(ScriptContext *ctx) { BOOL ScrCmd_GiveEgg(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); u16 species = ScriptGetVar(ctx); - u16 offset = ScriptGetVar(ctx); + u16 offset = ScriptGetVar(ctx); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); u8 partyCount = Party_GetCount(party); if (partyCount < PARTY_SIZE) { Pokemon *mon = AllocMonZeroed(HEAP_ID_FIELD); @@ -98,9 +98,9 @@ BOOL ScrCmd_GiveEgg(ScriptContext *ctx) { } BOOL ScrCmd_SetMonMove(ScriptContext *ctx) { - u16 monSlot = ScriptGetVar(ctx); + u16 monSlot = ScriptGetVar(ctx); u16 moveSlot = ScriptGetVar(ctx); - u16 moveId = ScriptGetVar(ctx); + u16 moveId = ScriptGetVar(ctx); PartyMonSetMoveInSlot(SaveArray_Party_Get(ctx->fieldSystem->saveData), monSlot, moveSlot, moveId); @@ -109,12 +109,12 @@ BOOL ScrCmd_SetMonMove(ScriptContext *ctx) { BOOL ScrCmd_MonHasMove(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *hasMove = ScriptGetVarPointer(ctx); - u16 move = ScriptGetVar(ctx); - u16 slot = ScriptGetVar(ctx); + u16 *hasMove = ScriptGetVarPointer(ctx); + u16 move = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); - *hasMove = FALSE; + *hasMove = FALSE; if (GetMonData(mon, MON_DATA_IS_EGG, NULL)) { return FALSE; } @@ -128,8 +128,8 @@ BOOL ScrCmd_MonHasMove(ScriptContext *ctx) { BOOL ScrCmd_GetPartySlotWithMove(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *slot = ScriptGetVarPointer(ctx); - u16 move = ScriptGetVar(ctx); + u16 *slot = ScriptGetVarPointer(ctx); + u16 move = ScriptGetVar(ctx); u8 i; u8 partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); @@ -150,18 +150,18 @@ BOOL ScrCmd_GetPartySlotWithMove(ScriptContext *ctx) { BOOL ScrCmd_SurvivePoisoning(ScriptContext *ctx) { u16 *poison = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); - *poison = SurvivePoisoning(mon); + *poison = SurvivePoisoning(mon); return FALSE; } BOOL ScrCmd_PartyCountMonsAtOrBelowLevel(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *levelCount = ScriptGetVarPointer(ctx); - u16 level = ScriptGetVar(ctx); + u16 *levelCount = ScriptGetVarPointer(ctx); + u16 level = ScriptGetVar(ctx); u8 i, count; u8 partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); @@ -178,11 +178,11 @@ BOOL ScrCmd_PartyCountMonsAtOrBelowLevel(ScriptContext *ctx) { BOOL ScrCmd_MonGetLevel(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *level = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 *level = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); - *level = 0; + *level = 0; if (!GetMonData(mon, MON_DATA_IS_EGG, NULL)) { *level = GetMonData(mon, MON_DATA_LEVEL, NULL); } @@ -192,8 +192,8 @@ BOOL ScrCmd_MonGetLevel(ScriptContext *ctx) { BOOL ScrCmd_MonGetNature(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *nature = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 *nature = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); u8 partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); if (slot >= partyCount) { @@ -213,8 +213,8 @@ BOOL ScrCmd_MonGetNature(ScriptContext *ctx) { BOOL ScrCmd_GetPartySlotWithNature(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *slot = ScriptGetVarPointer(ctx); - u16 nature = ScriptGetVar(ctx); + u16 *slot = ScriptGetVarPointer(ctx); + u16 nature = ScriptGetVar(ctx); u8 i; u8 partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); @@ -231,22 +231,22 @@ BOOL ScrCmd_GetPartySlotWithNature(ScriptContext *ctx) { BOOL ScrCmd_MonGetFriendship(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *friendship = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 *friendship = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); - *friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); + *friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); return FALSE; } BOOL ScrCmd_MonAddFriendship(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 friendshipModifier = ScriptGetVar(ctx); - u16 slot = ScriptGetVar(ctx); - u16 map = MapHeader_GetMapSec(ctx->fieldSystem->location->mapId); + u16 friendshipModifier = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); + u16 map = MapHeader_GetMapSec(ctx->fieldSystem->location->mapId); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); u16 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); if (friendshipModifier != 0) { if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == BALL_LUXURY) { @@ -273,10 +273,10 @@ BOOL ScrCmd_MonAddFriendship(ScriptContext *ctx) { BOOL ScrCmd_MonSubtractFriendship(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 friendshipModifier = ScriptGetVar(ctx); - u16 slot = ScriptGetVar(ctx); + u16 friendshipModifier = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); u16 friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); if (friendshipModifier > friendship) { friendship = 0; @@ -289,11 +289,11 @@ BOOL ScrCmd_MonSubtractFriendship(ScriptContext *ctx) { } BOOL ScrCmd_MonGetContestValue(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); u16 contestAttribute = ScriptGetVar(ctx); - u16 *contestValue = ScriptGetVarPointer(ctx); + u16 *contestValue = ScriptGetVarPointer(ctx); - Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); + Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); *contestValue = GetMonData(mon, contestAttribute + MON_DATA_COOL, NULL); return FALSE; @@ -301,39 +301,39 @@ BOOL ScrCmd_MonGetContestValue(ScriptContext *ctx) { BOOL ScrCmd_GetPartyLead(ScriptContext *ctx) { u16 *slot = ScriptGetVarPointer(ctx); - *slot = Save_GetPartyLead(ctx->fieldSystem->saveData); + *slot = Save_GetPartyLead(ctx->fieldSystem->saveData); return FALSE; } BOOL ScrCmd_GetPartyLeadAlive(ScriptContext *ctx) { u16 *slot = ScriptGetVarPointer(ctx); - *slot = Save_GetPartyLeadAlive(ctx->fieldSystem->saveData); + *slot = Save_GetPartyLeadAlive(ctx->fieldSystem->saveData); return FALSE; } BOOL ScrCmd_GetMonTypes(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *type1 = ScriptGetVarPointer(ctx); - u16 *type2 = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 *type1 = ScriptGetVarPointer(ctx); + u16 *type2 = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); - *type1 = GetMonData(mon, MON_DATA_TYPE_1, NULL); - *type2 = GetMonData(mon, MON_DATA_TYPE_2, NULL); + *type1 = GetMonData(mon, MON_DATA_TYPE_1, NULL); + *type2 = GetMonData(mon, MON_DATA_TYPE_2, NULL); return FALSE; } BOOL ScrCmd_GetPartyCount(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *count = ScriptGetVarPointer(ctx); - *count = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); + u16 *count = ScriptGetVarPointer(ctx); + *count = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); return FALSE; } BOOL ScrCmd_PartyCountNotEgg(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *eggCount = ScriptGetVarPointer(ctx); + u16 *eggCount = ScriptGetVarPointer(ctx); int count, i; int partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); @@ -350,8 +350,8 @@ BOOL ScrCmd_PartyCountNotEgg(ScriptContext *ctx) { BOOL ScrCmd_CountAliveMons(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *aliveCount = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 *aliveCount = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); int count, i; int partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); @@ -371,8 +371,8 @@ BOOL ScrCmd_CountAliveMons(ScriptContext *ctx) { BOOL ScrCmd_CountAliveMonsAndPC(ScriptContext *ctx) { int partyCount, count, i; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *pokemonCount = ScriptGetVarPointer(ctx); - PCStorage *pc = SaveArray_PCStorage_Get(fieldSystem->saveData); + u16 *pokemonCount = ScriptGetVarPointer(ctx); + PCStorage *pc = SaveArray_PCStorage_Get(fieldSystem->saveData); partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); for (i = 0, count = 0; i < partyCount; i++) { @@ -389,7 +389,7 @@ BOOL ScrCmd_CountAliveMonsAndPC(ScriptContext *ctx) { BOOL ScrCmd_PartyCountEgg(ScriptContext *ctx) { int partyCount, count, i; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *eggCount = ScriptGetVarPointer(ctx); + u16 *eggCount = ScriptGetVarPointer(ctx); partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); for (i = 0, count = 0; i < partyCount; i++) { @@ -406,7 +406,7 @@ BOOL ScrCmd_PartyCountEgg(ScriptContext *ctx) { BOOL ScrCmd_PartyHasPokerus(ScriptContext *ctx) { u16 i, partyCount; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *pokerus = ScriptGetVarPointer(ctx); + u16 *pokerus = ScriptGetVarPointer(ctx); partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); for (i = 0, *pokerus = FALSE; i < partyCount; i++) { @@ -421,19 +421,19 @@ BOOL ScrCmd_PartyHasPokerus(ScriptContext *ctx) { } BOOL ScrCmd_MonGetGender(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); u16 *gender = ScriptGetVarPointer(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); - *gender = GetMonData(mon, MON_DATA_GENDER, NULL); + *gender = GetMonData(mon, MON_DATA_GENDER, NULL); return FALSE; } BOOL ScrCmd_CountMonMoves(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *moveCount = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 *moveCount = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); if (GetMonData(mon, MON_DATA_IS_EGG, NULL)) { @@ -464,8 +464,8 @@ BOOL ScrCmd_CountMonMoves(ScriptContext *ctx) { BOOL ScrCmd_MonForgetMove(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 pokemonSlot = ScriptGetVar(ctx); - u16 moveSlot = ScriptGetVar(ctx); + u16 pokemonSlot = ScriptGetVar(ctx); + u16 moveSlot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), pokemonSlot); MonDeleteMoveSlot(mon, moveSlot); @@ -475,21 +475,21 @@ BOOL ScrCmd_MonForgetMove(ScriptContext *ctx) { BOOL ScrCmd_MonGetMove(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *move = ScriptGetVarPointer(ctx); - u16 pokemonSlot = ScriptGetVar(ctx); - u16 moveSlot = ScriptGetVar(ctx); + u16 *move = ScriptGetVarPointer(ctx); + u16 pokemonSlot = ScriptGetVar(ctx); + u16 moveSlot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), pokemonSlot); - *move = GetMonData(mon, moveSlot + MON_DATA_MOVE1, NULL); + *move = GetMonData(mon, moveSlot + MON_DATA_MOVE1, NULL); return FALSE; } BOOL ScrCmd_KenyaCheck(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *kenya = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); - u8 val = ScriptReadByte(ctx); + u16 *kenya = ScriptGetVarPointer(ctx); + u16 slot = ScriptGetVar(ctx); + u8 val = ScriptReadByte(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); if (!ItemIdIsMail(GetMonData(mon, MON_DATA_HELD_ITEM, NULL))) { @@ -504,7 +504,7 @@ BOOL ScrCmd_KenyaCheck(ScriptContext *ctx) { HandleLoadOverlay(FS_OVERLAY_ID(npc_trade), OVY_LOAD_ASYNC); Mail *kenyaMail = NPCTrade_MakeKenyaMail(); - Mail *mail = Mail_New(HEAP_ID_FIELD); + Mail *mail = Mail_New(HEAP_ID_FIELD); GetMonData(mon, MON_DATA_MAIL_STRUCT, mail); *kenya = Mail_Compare(kenyaMail, mail); FreeToHeap(mail); @@ -516,14 +516,14 @@ BOOL ScrCmd_KenyaCheck(ScriptContext *ctx) { BOOL ScrCmd_KenyaCheckPartyOrMailbox(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *kenya = ScriptGetVarPointer(ctx); - *kenya = FALSE; + u16 *kenya = ScriptGetVarPointer(ctx); + *kenya = FALSE; int i; Party *party = SaveArray_Party_Get(fieldSystem->saveData); HandleLoadOverlay(FS_OVERLAY_ID(npc_trade), OVY_LOAD_ASYNC); Mail *kenyaMail = NPCTrade_MakeKenyaMail(); - Mail *mail = Mail_New(HEAP_ID_FIELD); + Mail *mail = Mail_New(HEAP_ID_FIELD); UnloadOverlayByID(FS_OVERLAY_ID(npc_trade)); for (i = 0; i < Party_GetCount(party); i++) { @@ -540,7 +540,7 @@ BOOL ScrCmd_KenyaCheckPartyOrMailbox(ScriptContext *ctx) { } Mailbox *mailbox = Save_Mailbox_Get(fieldSystem->saveData); - i = 0; + i = 0; while (TRUE) { Mailbox_FetchMailToBuffer(mailbox->msgs, 0, i, mail); if (Mail_TypeIsValid(mail) && Mail_Compare(kenyaMail, mail)) { @@ -561,7 +561,7 @@ BOOL ScrCmd_KenyaCheckPartyOrMailbox(ScriptContext *ctx) { BOOL ScrCmd_MonGiveMail(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 slot = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); u16 item; Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); @@ -569,7 +569,7 @@ BOOL ScrCmd_MonGiveMail(ScriptContext *ctx) { return FALSE; } - item = ITEM_NONE; + item = ITEM_NONE; Mail *mail = Mail_New(HEAP_ID_FIELD); Mail_Init(mail); SetMonData(mon, MON_DATA_MAIL_STRUCT, mail); @@ -581,8 +581,8 @@ BOOL ScrCmd_MonGiveMail(ScriptContext *ctx) { BOOL ScrCmd_PlayerHasSpecies(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *playerHasSpecies = ScriptGetVarPointer(ctx); - u16 species = ScriptGetVar(ctx); + u16 *playerHasSpecies = ScriptGetVarPointer(ctx); + u16 species = ScriptGetVar(ctx); u8 i; u8 partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); @@ -599,8 +599,8 @@ BOOL ScrCmd_PlayerHasSpecies(ScriptContext *ctx) { BOOL ScrCmd_CountPartyMonsOfSpecies(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *speciesCount = ScriptGetVarPointer(ctx); - u16 species = ScriptGetVar(ctx); + u16 *speciesCount = ScriptGetVarPointer(ctx); + u16 species = ScriptGetVar(ctx); u16 array[6]; u8 i, j; @@ -632,8 +632,8 @@ BOOL ScrCmd_CountPartyMonsOfSpecies(ScriptContext *ctx) { BOOL ScrCmd_GetPartySlotWithSpecies(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *slot = ScriptGetVarPointer(ctx); - u16 species = ScriptGetVar(ctx); + u16 *slot = ScriptGetVarPointer(ctx); + u16 species = ScriptGetVar(ctx); u8 i; u8 partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); @@ -650,7 +650,7 @@ BOOL ScrCmd_GetPartySlotWithSpecies(ScriptContext *ctx) { BOOL ScrCmd_MonGetRibbonCount(ScriptContext *ctx) { u16 *ribbons = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); u16 i, count; @@ -668,9 +668,9 @@ BOOL ScrCmd_GetPartyRibbonCount(ScriptContext *ctx) { Party *party; u16 i, j, count; - u16 *ribbons = ScriptGetVarPointer(ctx); + u16 *ribbons = ScriptGetVarPointer(ctx); u16 partyCount = Party_GetCount(SaveArray_Party_Get(ctx->fieldSystem->saveData)); - party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + party = SaveArray_Party_Get(ctx->fieldSystem->saveData); for (i = 0, count = 0; i < RIBBON_MAX; i++) { for (j = 0; j < partyCount; j++) { @@ -688,18 +688,18 @@ BOOL ScrCmd_GetPartyRibbonCount(ScriptContext *ctx) { BOOL ScrCmd_MonHasRibbon(ScriptContext *ctx) { u16 *hasRibbon = ScriptGetVarPointer(ctx); - u16 slot = ScriptGetVar(ctx); - u16 ribbon = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); + u16 ribbon = ScriptGetVar(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); - *hasRibbon = GetMonData(mon, GetRibbonAttr(ribbon, RIBBONDAT_MONDATNO), NULL); + *hasRibbon = GetMonData(mon, GetRibbonAttr(ribbon, RIBBONDAT_MONDATNO), NULL); return FALSE; } BOOL ScrCmd_GiveRibbon(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); - u16 ribbon = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); + u16 ribbon = ScriptGetVar(ctx); u8 hasRibbon = TRUE; Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); @@ -711,9 +711,9 @@ BOOL ScrCmd_GiveRibbon(ScriptContext *ctx) { BOOL ScrCmd_PartyLegalCheck(ScriptContext *ctx) { u16 i, j; - u16 *legal = ScriptGetVarPointer(ctx); + u16 *legal = ScriptGetVarPointer(ctx); u16 partyCount = Party_GetCount(SaveArray_Party_Get(ctx->fieldSystem->saveData)); - Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); + Party *party = SaveArray_Party_Get(ctx->fieldSystem->saveData); for (i = 0; i < RIBBON_MAX; i++) { for (j = 0; j < partyCount; j++) { @@ -732,8 +732,8 @@ BOOL ScrCmd_PartyLegalCheck(ScriptContext *ctx) { BOOL ScrCmd_GetPartySlotWithFatefulEncounter(ScriptContext *ctx) { u8 partyCount, i; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 *slot = ScriptGetVarPointer(ctx); - u16 species = ScriptGetVar(ctx); + u16 *slot = ScriptGetVarPointer(ctx); + u16 species = ScriptGetVar(ctx); partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); for (i = 0, *slot = 255; i < partyCount; i++) { @@ -752,8 +752,8 @@ BOOL ScrCmd_GetPartySlotWithFatefulEncounter(ScriptContext *ctx) { BOOL ScrCmd_MonHasItem(ScriptContext *ctx) { int i; FieldSystem *fieldSystem = ctx->fieldSystem; - u16 item = ScriptGetVar(ctx); - u16 *hasItem = ScriptGetVarPointer(ctx); + u16 item = ScriptGetVar(ctx); + u16 *hasItem = ScriptGetVarPointer(ctx); int partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); for (i = 0, *hasItem = FALSE; i < partyCount; i++) { @@ -768,19 +768,19 @@ BOOL ScrCmd_MonHasItem(ScriptContext *ctx) { } BOOL ScrCmd_GetPartymonForm(ScriptContext *ctx) { - u16 slot = ScriptGetVar(ctx); + u16 slot = ScriptGetVar(ctx); u16 *form = ScriptGetVarPointer(ctx); Pokemon *mon = Party_GetMonByIndex(SaveArray_Party_Get(ctx->fieldSystem->saveData), slot); - *form = GetMonData(mon, MON_DATA_FORM, NULL); + *form = GetMonData(mon, MON_DATA_FORM, NULL); return FALSE; } BOOL ScrCmd_MonAddContestValue(ScriptContext *ctx) { Pokemon *mon; - u8 contestValue = 0; - u16 slot = ScriptGetVar(ctx); + u8 contestValue = 0; + u16 slot = ScriptGetVar(ctx); u8 contestAttribute = ScriptReadByte(ctx); int contestModifier = ScriptGetVar(ctx); diff --git a/src/scrcmd_size_record.c b/src/scrcmd_size_record.c index a5566e443f..7f3fe841bb 100644 --- a/src/scrcmd_size_record.c +++ b/src/scrcmd_size_record.c @@ -36,15 +36,15 @@ static u32 GetMonSizeHash(Pokemon *mon) { u16 spDefIv_lo; u16 ret, ret2; - pid_lo = GetMonData(mon, MON_DATA_PERSONALITY, NULL); - hpIv_lo = GetMonData(mon, MON_DATA_HP_IV, NULL) & 0xF; - atkIv_lo = GetMonData(mon, MON_DATA_ATK_IV, NULL) & 0xF; - defIv_lo = GetMonData(mon, MON_DATA_DEF_IV, NULL) & 0xF; - spdIv_lo = GetMonData(mon, MON_DATA_SPEED_IV, NULL) & 0xF; + pid_lo = GetMonData(mon, MON_DATA_PERSONALITY, NULL); + hpIv_lo = GetMonData(mon, MON_DATA_HP_IV, NULL) & 0xF; + atkIv_lo = GetMonData(mon, MON_DATA_ATK_IV, NULL) & 0xF; + defIv_lo = GetMonData(mon, MON_DATA_DEF_IV, NULL) & 0xF; + spdIv_lo = GetMonData(mon, MON_DATA_SPEED_IV, NULL) & 0xF; spAtkIv_lo = GetMonData(mon, MON_DATA_SPATK_IV, NULL) & 0xF; spDefIv_lo = GetMonData(mon, MON_DATA_SPDEF_IV, NULL) & 0xF; - ret = ((spDefIv_lo ^ spAtkIv_lo) * spdIv_lo) ^ (pid_lo >> 8); + ret = ((spDefIv_lo ^ spAtkIv_lo) * spdIv_lo) ^ (pid_lo >> 8); ret2 = ((atkIv_lo ^ defIv_lo) * hpIv_lo) ^ ((u8)pid_lo); return ret + (ret2 << 8); } @@ -74,8 +74,8 @@ static void FormatSizeRecord(FieldSystem *fieldSystem, u8 idx0, u8 idx1, u16 spe u32 r4; msgFmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - score = GetMonSize(species, rand); - r4 = LengthConvertToImperial(score); + score = GetMonSize(species, rand); + r4 = LengthConvertToImperial(score); BufferIntegerAsString(*msgFmt, idx0, r4 / 10, 3, PRINTING_MODE_LEFT_ALIGN, TRUE); BufferIntegerAsString(*msgFmt, idx1, r4 % 10, 1, PRINTING_MODE_LEFT_ALIGN, TRUE); } @@ -91,14 +91,14 @@ BOOL ScrCmd_SizeRecordCompare(ScriptContext *ctx) { FieldSystem *fieldSystem; fieldSystem = ctx->fieldSystem; - ret_p = ScriptGetVarPointer(ctx); - slot = ScriptGetVar(ctx); - mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - rand = GetMonSizeHash(mon); - cm1 = GetMonSize(species, rand); - record = Save_VarsFlags_GetFishingCompetitionLengthRecord(Save_VarsFlags_Get(fieldSystem->saveData)); - cm2 = GetMonSize(species, record); + ret_p = ScriptGetVarPointer(ctx); + slot = ScriptGetVar(ctx); + mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + rand = GetMonSizeHash(mon); + cm1 = GetMonSize(species, rand); + record = Save_VarsFlags_GetFishingCompetitionLengthRecord(Save_VarsFlags_Get(fieldSystem->saveData)); + cm2 = GetMonSize(species, record); { u32 in1 = LengthConvertToImperial(cm1); u32 in2 = LengthConvertToImperial(cm2); @@ -122,8 +122,8 @@ BOOL ScrCmd_SizeRecordUpdate(ScriptContext *ctx) { FieldSystem *fieldSystem; fieldSystem = ctx->fieldSystem; - slot = ScriptGetVar(ctx); - mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); + slot = ScriptGetVar(ctx); + mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); Save_VarsFlags_SetFishingCompetitionLengthRecord(Save_VarsFlags_Get(fieldSystem->saveData), GetMonSizeHash(mon)); return FALSE; } @@ -136,10 +136,10 @@ BOOL ScrCmd_BufferRecordSize(ScriptContext *ctx) { vu16 rand; fieldSystem = ctx->fieldSystem; - idx0 = ScriptGetVar(ctx); - idx1 = ScriptGetVar(ctx); - species = ScriptGetVar(ctx); - rand = Save_VarsFlags_GetFishingCompetitionLengthRecord(Save_VarsFlags_Get(fieldSystem->saveData)); + idx0 = ScriptGetVar(ctx); + idx1 = ScriptGetVar(ctx); + species = ScriptGetVar(ctx); + rand = Save_VarsFlags_GetFishingCompetitionLengthRecord(Save_VarsFlags_Get(fieldSystem->saveData)); FormatSizeRecord(fieldSystem, idx0, idx1, species, rand); return FALSE; } @@ -152,10 +152,10 @@ BOOL ScrCmd_BufferMonSize(ScriptContext *ctx) { u16 slot; fieldSystem = ctx->fieldSystem; - idx0 = ScriptGetVar(ctx); - idx1 = ScriptGetVar(ctx); - slot = ScriptGetVar(ctx); - mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); + idx0 = ScriptGetVar(ctx); + idx1 = ScriptGetVar(ctx); + slot = ScriptGetVar(ctx); + mon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), slot); FormatSizeRecord(fieldSystem, idx0, idx1, GetMonData(mon, MON_DATA_SPECIES, NULL), GetMonSizeHash(mon)); return FALSE; } diff --git a/src/scrcmd_sound.c b/src/scrcmd_sound.c index c1f5c23c7d..9b5daa68c5 100644 --- a/src/scrcmd_sound.c +++ b/src/scrcmd_sound.c @@ -12,9 +12,9 @@ BOOL ScrNative_WaitCry(ScriptContext *ctx); BOOL ScrNative_WaitFanfare(ScriptContext *ctx); BOOL ScrCmd_575(ScriptContext *ctx) { - u16 var0 = ScriptReadHalfword(ctx); + u16 var0 = ScriptReadHalfword(ctx); u16 *retPtr = ScriptGetVarPointer(ctx); - *retPtr = sub_02005F94(var0); + *retPtr = sub_02005F94(var0); return FALSE; } @@ -26,7 +26,7 @@ BOOL ScrCmd_PlayBGM(ScriptContext *ctx) { BOOL ScrCmd_StopBGM(ScriptContext *ctx) { u16 var0 = ScriptReadHalfword(ctx); - u16 bgm = GF_GetCurrentPlayingBGM(); + u16 bgm = GF_GetCurrentPlayingBGM(); StopBGM(bgm, 0); return FALSE; } @@ -44,7 +44,7 @@ BOOL ScrCmd_083(ScriptContext *ctx) { } BOOL ScrCmd_FadeOutBGM(ScriptContext *ctx) { - u16 seqno = ScriptReadHalfword(ctx); + u16 seqno = ScriptReadHalfword(ctx); u16 length = ScriptReadHalfword(ctx); GF_SndStartFadeOutBGM(seqno, length); SetupNativeScript(ctx, ScrNative_GetFadeTimer); @@ -98,7 +98,7 @@ BOOL ScrCmd_StopSE(ScriptContext *ctx) { } BOOL ScrCmd_WaitSE(ScriptContext *ctx) { - u16 sndseq = ScriptGetVar(ctx); + u16 sndseq = ScriptGetVar(ctx); ctx->data[0] = sndseq; SetupNativeScript(ctx, ScrNative_SEPlaying); return TRUE; @@ -152,7 +152,7 @@ BOOL ScrNative_WaitFanfare(ScriptContext *ctx) { } BOOL ScrCmd_ChatotHasCry(ScriptContext *ctx) { - u16 *retPtr = ScriptGetVarPointer(ctx); + u16 *retPtr = ScriptGetVarPointer(ctx); SOUND_CHATOT *chatot = Save_Chatot_Get(ctx->fieldSystem->saveData); if (Chatot_CheckCry(chatot) == TRUE) { *retPtr = TRUE; @@ -210,6 +210,6 @@ BOOL ScrCmd_665(ScriptContext *ctx) { BOOL ScrCmd_666(ScriptContext *ctx) { u16 *retPtr = ScriptGetVarPointer(ctx); - *retPtr = GF_GetCurrentPlayingBGM(); + *retPtr = GF_GetCurrentPlayingBGM(); return FALSE; } diff --git a/src/scrcmd_strbuf.c b/src/scrcmd_strbuf.c index bba9adbd67..b992c1904d 100644 --- a/src/scrcmd_strbuf.c +++ b/src/scrcmd_strbuf.c @@ -19,8 +19,8 @@ static String *_get_species_name(u16 species, HeapID heapId); BOOL ScrCmd_BufferStatName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u8 stat_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u8 stat_id = ScriptGetVar(ctx); BufferStatName(*msg_fmt, idx, stat_id); @@ -29,9 +29,9 @@ BOOL ScrCmd_BufferStatName(ScriptContext *ctx) { BOOL ScrCmd_BufferPlayersName(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); BufferPlayersName(*msg_fmt, idx, profile); @@ -40,8 +40,8 @@ BOOL ScrCmd_BufferPlayersName(ScriptContext *ctx) { BOOL ScrCmd_BufferRivalsName(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); BufferRivalsName(*msg_fmt, idx, fieldSystem->saveData); @@ -50,8 +50,8 @@ BOOL ScrCmd_BufferRivalsName(ScriptContext *ctx) { BOOL ScrCmd_BufferFriendsName(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); BufferFriendsName(*msg_fmt, idx, fieldSystem->saveData); @@ -60,9 +60,9 @@ BOOL ScrCmd_BufferFriendsName(ScriptContext *ctx) { BOOL ScrCmd_BufferMonSpeciesName(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 party_mon_idx = ScriptGetVar(ctx); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); + u16 party_mon_idx = ScriptGetVar(ctx); Party *party = SaveArray_Party_Get(fieldSystem->saveData); Pokemon *mon = Party_GetMonByIndex(party, party_mon_idx); @@ -73,8 +73,8 @@ BOOL ScrCmd_BufferMonSpeciesName(ScriptContext *ctx) { BOOL ScrCmd_BufferTypeName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 type_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 type_id = ScriptGetVar(ctx); BufferTypeName(*msg_fmt, idx, type_id); @@ -83,8 +83,8 @@ BOOL ScrCmd_BufferTypeName(ScriptContext *ctx) { BOOL ScrCmd_BufferItemName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 item_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 item_id = ScriptGetVar(ctx); BufferItemName(*msg_fmt, idx, item_id); @@ -93,8 +93,8 @@ BOOL ScrCmd_BufferItemName(ScriptContext *ctx) { BOOL ScrCmd_BufferPocketName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 pocket_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 pocket_id = ScriptGetVar(ctx); BufferPocketName(*msg_fmt, idx, pocket_id); @@ -103,8 +103,8 @@ BOOL ScrCmd_BufferPocketName(ScriptContext *ctx) { BOOL ScrCmd_BufferTMHMMoveName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 move_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 move_id = ScriptGetVar(ctx); BufferMoveName(*msg_fmt, idx, TMHMGetMove(move_id)); @@ -113,8 +113,8 @@ BOOL ScrCmd_BufferTMHMMoveName(ScriptContext *ctx) { BOOL ScrCmd_BufferMoveName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 move_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 move_id = ScriptGetVar(ctx); BufferMoveName(*msg_fmt, idx, move_id); @@ -123,8 +123,8 @@ BOOL ScrCmd_BufferMoveName(ScriptContext *ctx) { BOOL ScrCmd_BufferInt(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 number = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 number = ScriptGetVar(ctx); BufferIntegerAsString(*msg_fmt, idx, number, CountDigits(number), PRINTING_MODE_RIGHT_ALIGN, TRUE); @@ -133,10 +133,10 @@ BOOL ScrCmd_BufferInt(ScriptContext *ctx) { BOOL ScrCmd_BufferIntEx(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 number = ScriptGetVar(ctx); - u8 str_conv_mode = ScriptReadByte(ctx); - u8 unk2 = ScriptReadByte(ctx); + u8 idx = ScriptReadByte(ctx); + u16 number = ScriptGetVar(ctx); + u8 str_conv_mode = ScriptReadByte(ctx); + u8 unk2 = ScriptReadByte(ctx); u8 digits = unk2; if (str_conv_mode == PRINTING_MODE_LEFT_ALIGN) { @@ -150,10 +150,10 @@ BOOL ScrCmd_BufferIntEx(ScriptContext *ctx) { BOOL ScrCmd_661(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u32 number = ScriptReadWord(ctx); - u8 str_conv_mode = ScriptReadByte(ctx); - u8 unk2 = ScriptReadByte(ctx); + u8 idx = ScriptReadByte(ctx); + u32 number = ScriptReadWord(ctx); + u8 str_conv_mode = ScriptReadByte(ctx); + u8 unk2 = ScriptReadByte(ctx); u8 digits = unk2; if (str_conv_mode == PRINTING_MODE_LEFT_ALIGN) { @@ -167,9 +167,9 @@ BOOL ScrCmd_661(ScriptContext *ctx) { BOOL ScrCmd_BufferPartyMonNick(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 party_mon_idx = ScriptGetVar(ctx); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); + u16 party_mon_idx = ScriptGetVar(ctx); Party *party = SaveArray_Party_Get(fieldSystem->saveData); Pokemon *mon = Party_GetMonByIndex(party, party_mon_idx); @@ -180,10 +180,10 @@ BOOL ScrCmd_BufferPartyMonNick(ScriptContext *ctx) { BOOL ScrCmd_BufferBoxMonNick(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - PCStorage *pc = SaveArray_PCStorage_Get(fieldSystem->saveData); - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 box_mon_slot = ScriptGetVar(ctx); + PCStorage *pc = SaveArray_PCStorage_Get(fieldSystem->saveData); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); + u16 box_mon_slot = ScriptGetVar(ctx); BoxPokemon *box_mon = PCStorage_GetMonByIndexPair(pc, box_mon_slot / MONS_PER_BOX, box_mon_slot % MONS_PER_BOX); BufferBoxMonNickname(*msg_fmt, idx, box_mon); @@ -193,8 +193,8 @@ BOOL ScrCmd_BufferBoxMonNick(ScriptContext *ctx) { BOOL ScrCmd_BufferTrainerClassName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 trainer_class_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 trainer_class_id = ScriptGetVar(ctx); BufferTrainerClassName(*msg_fmt, idx, trainer_class_id); @@ -203,12 +203,12 @@ BOOL ScrCmd_BufferTrainerClassName(ScriptContext *ctx) { BOOL ScrCmd_BufferPlayerUnionAvatarClassName(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); - PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u32 gender = PlayerProfile_GetTrainerGender(profile); - u8 avatar = PlayerProfile_GetAvatar(profile); + SaveData *saveData = FieldSystem_GetSaveData(fieldSystem); + PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); + u32 gender = PlayerProfile_GetTrainerGender(profile); + u8 avatar = PlayerProfile_GetAvatar(profile); BufferTrainerClassNameWithArticle(*msg_fmt, idx, GetUnionRoomAvatarAttrBySprite(gender, avatar, 2)); @@ -217,10 +217,10 @@ BOOL ScrCmd_BufferPlayerUnionAvatarClassName(ScriptContext *ctx) { BOOL ScrCmd_BufferSpeciesName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 species = ScriptGetVar(ctx); - u16 unk2 = ScriptReadHalfword(ctx); - u8 unk3 = ScriptReadByte(ctx); + u8 idx = ScriptReadByte(ctx); + u16 species = ScriptGetVar(ctx); + u16 unk2 = ScriptReadHalfword(ctx); + u8 unk3 = ScriptReadByte(ctx); String *species_name = _get_species_name(species, HEAP_ID_4); BufferString(*msg_fmt, idx, species_name, unk2, unk3, 2); @@ -231,15 +231,15 @@ BOOL ScrCmd_BufferSpeciesName(ScriptContext *ctx) { String *_get_species_name(u16 species, HeapID heapId) { MsgData *msg_data = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0237_bin, heapId); - String *name = NewString_ReadMsgData(msg_data, species); + String *name = NewString_ReadMsgData(msg_data, species); DestroyMsgData(msg_data); return name; } BOOL ScrCmd_BufferStarterSpeciesName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 species = Save_VarsFlags_GetStarter(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); + u8 idx = ScriptReadByte(ctx); + u16 species = Save_VarsFlags_GetStarter(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); String *species_name = _get_species_name(species, HEAP_ID_4); BufferString(*msg_fmt, idx, species_name, 0, 1, 2); @@ -250,8 +250,8 @@ BOOL ScrCmd_BufferStarterSpeciesName(ScriptContext *ctx) { BOOL ScrCmd_BufferDPPtRivalStarterSpeciesName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 species = DPPtLeftover_GetRivalSpecies(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); + u8 idx = ScriptReadByte(ctx); + u16 species = DPPtLeftover_GetRivalSpecies(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); String *species_name = _get_species_name(species, HEAP_ID_4); BufferString(*msg_fmt, idx, species_name, 0, 1, 2); @@ -262,8 +262,8 @@ BOOL ScrCmd_BufferDPPtRivalStarterSpeciesName(ScriptContext *ctx) { BOOL ScrCmd_BufferDPPtFriendStarterSpeciesName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 species = DPPtLeftover_GetFriendStarterSpecies(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); + u8 idx = ScriptReadByte(ctx); + u16 species = DPPtLeftover_GetFriendStarterSpecies(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); String *species_name = _get_species_name(species, HEAP_ID_4); BufferString(*msg_fmt, idx, species_name, 0, 1, 2); @@ -274,8 +274,8 @@ BOOL ScrCmd_BufferDPPtFriendStarterSpeciesName(ScriptContext *ctx) { BOOL ScrCmd_BufferDecorationName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 decoration_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 decoration_id = ScriptGetVar(ctx); BufferDecorationName(*msg_fmt, idx, decoration_id); @@ -285,8 +285,8 @@ BOOL ScrCmd_BufferDecorationName(ScriptContext *ctx) { // This may be what's left of ScrCmd_GetUndergroundTrapName from D/P/Pt. BOOL ScrCmd_208(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 unused_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 unused_id = ScriptGetVar(ctx); return FALSE; } @@ -294,17 +294,17 @@ BOOL ScrCmd_208(ScriptContext *ctx) { // This may be what's left of ScrCmd_GetUndergroundItemName from D/P/Pt. BOOL ScrCmd_209(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 unused_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 unused_id = ScriptGetVar(ctx); return FALSE; } BOOL ScrCmd_BufferMapSecName(ScriptContext *ctx) { - String *str = String_New(22, HEAP_ID_4); + String *str = String_New(22, HEAP_ID_4); MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 mapno = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 mapno = ScriptGetVar(ctx); sub_02068F98(mapno, HEAP_ID_4, str); BufferString(*msg_fmt, idx, str, 0, 1, 2); @@ -315,9 +315,9 @@ BOOL ScrCmd_BufferMapSecName(ScriptContext *ctx) { BOOL ScrCmd_BufferBerryName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 berry_id = ScriptGetVar(ctx); - u16 unk = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 berry_id = ScriptGetVar(ctx); + u16 unk = ScriptGetVar(ctx); String *str = GetNutName((u16)(berry_id - FIRST_BERRY_IDX), HEAP_ID_32); BufferString(*msg_fmt, idx, str, 0, unk < 2, 2); @@ -328,8 +328,8 @@ BOOL ScrCmd_BufferBerryName(ScriptContext *ctx) { BOOL ScrCmd_BufferNatureName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 nature_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 nature_id = ScriptGetVar(ctx); BufferNatureName(*msg_fmt, idx, nature_id); @@ -338,8 +338,8 @@ BOOL ScrCmd_BufferNatureName(ScriptContext *ctx) { BOOL ScrCmd_BufferFashionName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 fashion_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 fashion_id = ScriptGetVar(ctx); BufferFashionName(*msg_fmt, idx, fashion_id); @@ -348,14 +348,14 @@ BOOL ScrCmd_BufferFashionName(ScriptContext *ctx) { BOOL ScrCmd_BufferPartyMonMoveName(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 party_slot = ScriptGetVar(ctx); - u16 move_slot = ScriptGetVar(ctx); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); + u16 party_slot = ScriptGetVar(ctx); + u16 move_slot = ScriptGetVar(ctx); Party *party = SaveArray_Party_Get(fieldSystem->saveData); Pokemon *mon = Party_GetMonByIndex(party, party_slot); - u16 move_id = GetMonData(mon, MON_DATA_MOVE1 + move_slot, NULL); + u16 move_id = GetMonData(mon, MON_DATA_MOVE1 + move_slot, NULL); BufferMoveName(*msg_fmt, idx, move_id); return FALSE; @@ -363,8 +363,8 @@ BOOL ScrCmd_BufferPartyMonMoveName(ScriptContext *ctx) { BOOL ScrCmd_BufferRibbonName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u8 unk = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u8 unk = ScriptGetVar(ctx); u16 ribbon_id = GetRibbonAttr(unk, RIBBONDAT_NAMEGMM); BufferRibbonNameOrDesc(*msg_fmt, idx, ribbon_id); @@ -374,8 +374,8 @@ BOOL ScrCmd_BufferRibbonName(ScriptContext *ctx) { BOOL ScrCmd_BufferSealName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 seal_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 seal_id = ScriptGetVar(ctx); BufferSealName(*msg_fmt, idx, seal_id); @@ -384,8 +384,8 @@ BOOL ScrCmd_BufferSealName(ScriptContext *ctx) { BOOL ScrCmd_BufferTrainerName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 trainer_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 trainer_id = ScriptGetVar(ctx); BufferTrainerName(*msg_fmt, idx, trainer_id); @@ -394,8 +394,8 @@ BOOL ScrCmd_BufferTrainerName(ScriptContext *ctx) { BOOL ScrCmd_BufferApricornName(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u8 apricorn_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u8 apricorn_id = ScriptGetVar(ctx); BufferApricornName(*msg_fmt, idx, apricorn_id); @@ -404,8 +404,8 @@ BOOL ScrCmd_BufferApricornName(ScriptContext *ctx) { BOOL ScrCmd_BufferItemNameIndef(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 item_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 item_id = ScriptGetVar(ctx); BufferItemNameWithIndefArticle(*msg_fmt, idx, item_id); @@ -414,8 +414,8 @@ BOOL ScrCmd_BufferItemNameIndef(ScriptContext *ctx) { BOOL ScrCmd_BufferItemNamePlural(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 item_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 item_id = ScriptGetVar(ctx); BufferItemNamePlural(*msg_fmt, idx, item_id); @@ -424,9 +424,9 @@ BOOL ScrCmd_BufferItemNamePlural(ScriptContext *ctx) { BOOL ScrCmd_BufferPartyMonSpeciesNameIndef(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 party_mon_slot = ScriptGetVar(ctx); + MessageFormat **msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); + u8 idx = ScriptReadByte(ctx); + u16 party_mon_slot = ScriptGetVar(ctx); Party *party = SaveArray_Party_Get(fieldSystem->saveData); Pokemon *mon = Party_GetMonByIndex(party, party_mon_slot); @@ -437,10 +437,10 @@ BOOL ScrCmd_BufferPartyMonSpeciesNameIndef(ScriptContext *ctx) { BOOL ScrCmd_BufferSpeciesNameIndef(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 item_id = ScriptGetVar(ctx); - u16 unused1 = ScriptReadHalfword(ctx); - u8 unused2 = ScriptReadByte(ctx); + u8 idx = ScriptReadByte(ctx); + u16 item_id = ScriptGetVar(ctx); + u16 unused1 = ScriptReadHalfword(ctx); + u8 unused2 = ScriptReadByte(ctx); BufferSpeciesNameWithArticle(*msg_fmt, idx, item_id); @@ -449,8 +449,8 @@ BOOL ScrCmd_BufferSpeciesNameIndef(ScriptContext *ctx) { BOOL ScrCmd_BufferDPPtFriendStarterSpeciesNameIndef(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 species = DPPtLeftover_GetFriendStarterSpecies(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); + u8 idx = ScriptReadByte(ctx); + u16 species = DPPtLeftover_GetFriendStarterSpecies(Save_VarsFlags_Get(ctx->fieldSystem->saveData)); BufferSpeciesNameWithArticle(*msg_fmt, idx, species); @@ -459,8 +459,8 @@ BOOL ScrCmd_BufferDPPtFriendStarterSpeciesNameIndef(ScriptContext *ctx) { BOOL ScrCmd_BufferFashionNameIndef(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 fashion_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 fashion_id = ScriptGetVar(ctx); BufferFashionNameWithArticle(*msg_fmt, idx, fashion_id); @@ -469,8 +469,8 @@ BOOL ScrCmd_BufferFashionNameIndef(ScriptContext *ctx) { BOOL ScrCmd_BufferTrainerClassNameIndef(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 trainer_class_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 trainer_class_id = ScriptGetVar(ctx); BufferTrainerClassNameWithArticle(*msg_fmt, idx, trainer_class_id); @@ -479,8 +479,8 @@ BOOL ScrCmd_BufferTrainerClassNameIndef(ScriptContext *ctx) { BOOL ScrCmd_BufferSealNamePlural(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); - u16 seal_id = ScriptGetVar(ctx); + u8 idx = ScriptReadByte(ctx); + u16 seal_id = ScriptGetVar(ctx); BufferSealNamePlural(*msg_fmt, idx, seal_id); @@ -489,7 +489,7 @@ BOOL ScrCmd_BufferSealNamePlural(ScriptContext *ctx) { BOOL ScrCmd_Capitalize(ScriptContext *ctx) { MessageFormat **msg_fmt = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MESSAGE_FORMAT); - u8 idx = ScriptReadByte(ctx); + u8 idx = ScriptReadByte(ctx); MessageFormat_UpperFirstChar(*msg_fmt, idx); diff --git a/src/script.c b/src/script.c index c4ad9a087d..91e0767719 100644 --- a/src/script.c +++ b/src/script.c @@ -3,13 +3,13 @@ void InitScriptContext(ScriptContext *ctx, const ScrCmdFunc *cmd_table, u32 cmd_count) { s32 i = 0; - ctx->mode = SCRIPT_MODE_STOPPED; + ctx->mode = SCRIPT_MODE_STOPPED; ctx->script_ptr = NULL; ctx->stackDepth = 0; - ctx->id = 0; + ctx->id = 0; ctx->native_ptr = NULL; - ctx->cmdTable = cmd_table; - ctx->cmd_count = cmd_count; + ctx->cmdTable = cmd_table; + ctx->cmd_count = cmd_count; for (i = 0; i < NELEMS(ctx->data); i++) { ctx->data[i] = 0; @@ -24,17 +24,17 @@ void InitScriptContext(ScriptContext *ctx, const ScrCmdFunc *cmd_table, u32 cmd_ BOOL SetupBytecodeScript(ScriptContext *ctx, const u8 *ptr) { ctx->script_ptr = ptr; - ctx->mode = SCRIPT_MODE_BYTECODE; + ctx->mode = SCRIPT_MODE_BYTECODE; return TRUE; } void SetupNativeScript(ScriptContext *ctx, ScrCmdFunc ptr) { - ctx->mode = SCRIPT_MODE_NATIVE; + ctx->mode = SCRIPT_MODE_NATIVE; ctx->native_ptr = ptr; } void StopScript(ScriptContext *ctx) { - ctx->mode = SCRIPT_MODE_STOPPED; + ctx->mode = SCRIPT_MODE_STOPPED; ctx->script_ptr = NULL; } diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 14f47fd437..f8b9d58f35 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -26,7 +26,7 @@ BOOL GiveMon(HeapID heapId, SaveData *saveData, int species, int level, int form BOOL result; profile = Save_PlayerData_GetProfileAddr(saveData); - party = SaveArray_Party_Get(saveData); + party = SaveArray_Party_Get(saveData); { mon = AllocMonZeroed(heapId); ZeroMonData(mon); @@ -55,8 +55,8 @@ BOOL GiveEgg(HeapID heapId, SaveData *saveData, int species, u8 metLocation, Map BOOL result; profile = Save_PlayerData_GetProfileAddr(saveData); - party = SaveArray_Party_Get(saveData); - mon = AllocMonZeroed(HEAP_ID_32); + party = SaveArray_Party_Get(saveData); + mon = AllocMonZeroed(HEAP_ID_32); ZeroMonData(mon); SetEggStats(mon, species, metLocation, profile, 4, sub_02017FE4(mapsecType, maploc)); result = Party_AddMon(party, mon); @@ -166,8 +166,8 @@ BOOL ApplyPoisonStep(Party *party, u16 location) { Pokemon *mon; n_poisoned = 0; - n_fainted = 0; - n = Party_GetCount(party); + n_fainted = 0; + n = Party_GetCount(party); for (i = 0; i < n; i++) { mon = Party_GetMonByIndex(party, i); if (!MonNotFaintedOrEgg(mon)) { diff --git a/src/seal_case.c b/src/seal_case.c index 6f79d39815..c9138769fa 100644 --- a/src/seal_case.c +++ b/src/seal_case.c @@ -86,7 +86,7 @@ BOOL GiveOrTakeSeal(SealCase *sealCase, int sealId, s16 quantity) { int num; int total; - num = SealCase_CountSealOccurrenceInUse(sealCase, sealId - SEAL_MIN); + num = SealCase_CountSealOccurrenceInUse(sealCase, sealId - SEAL_MIN); total = num + sealCase->inventory.seals[sealId - SEAL_MIN]; if (quantity < 0) { @@ -110,7 +110,7 @@ BOOL GiveOrTakeSeal2(SealCase *sealCase, int sealId, s16 quantity) { int num; int total; - num = SealCase_CountSealOccurrenceInUse(sealCase, sealId - SEAL_MIN); + num = SealCase_CountSealOccurrenceInUse(sealCase, sealId - SEAL_MIN); total = num; if (quantity < 0) { @@ -137,7 +137,7 @@ BOOL SealCase_CheckSealQuantity(const SealCase *sealCase, int sealId, s16 quanti int num; int total; - num = SealCase_CountSealOccurrenceInUse(sealCase, sealId - SEAL_MIN); + num = SealCase_CountSealOccurrenceInUse(sealCase, sealId - SEAL_MIN); total = num + sealCase->inventory.seals[sealId - SEAL_MIN]; if (quantity < 0) { diff --git a/src/sound.c b/src/sound.c index 0c6ee53494..68618df4bc 100644 --- a/src/sound.c +++ b/src/sound.c @@ -61,7 +61,7 @@ struct SND_WORK { /* 0xBEC7A */ u16 unk_BEC7A; /* 0xBEC7C */ u32 unk_BEC7C; /* 0xBEC80 */ u32 micInitDone : 1; - /* 0xBEC80 */ u32 micCounter : 31; + /* 0xBEC80 */ u32 micCounter : 31; /* 0xBEC84 */ u32 gbSoundsVolume; }; // size: 0xBEC88 @@ -92,7 +92,7 @@ void InitSoundData(SOUND_CHATOT *chatot, Options *options) { sSndHeapFreeSize = NNS_SndHeapGetSize(work->heap); GF_SndHeapGetFreeSize(); sub_02004898(work); - _02111950 = 0; + _02111950 = 0; work->myChatot = chatot; GF_SndSetMonoFlag(options->soundMethod); } @@ -185,9 +185,9 @@ void GF_SndCallback(void) { void GF_SndSetState(u32 state) { SND_WORK *work; - work = GetSoundDataPointer(); + work = GetSoundDataPointer(); work->unk_BEBEC = 0; - _0211194C = state; + _0211194C = state; } BOOL GF_SndIsFanfarePlaying(void) { @@ -339,7 +339,7 @@ int GF_Snd_SaveState(int *level_p) { SND_WORK *work; int level; - work = GetSoundDataPointer(); + work = GetSoundDataPointer(); level = NNS_SndHeapSaveState(work->heap); GF_ASSERT(level != -1); if (level_p != NULL) { @@ -360,7 +360,7 @@ void GF_Snd_LoadState(int level) { void GF_SndHeapGetFreeSize(void) { SND_WORK *work; - work = GetSoundDataPointer(); + work = GetSoundDataPointer(); sSndHeapFreeSize = NNS_SndHeapGetFreeSize(work->heap); } @@ -369,7 +369,7 @@ BOOL GF_Snd_LoadGroup(int groupNo) { SND_WORK *work; work = GetSoundDataPointer(); - ret = NNS_SndArcLoadGroup(groupNo, work->heap); + ret = NNS_SndArcLoadGroup(groupNo, work->heap); GF_SndHeapGetFreeSize(); return ret; } @@ -379,7 +379,7 @@ BOOL GF_Snd_LoadSeq(int seqNo) { SND_WORK *work; work = GetSoundDataPointer(); - ret = NNS_SndArcLoadSeq(seqNo, work->heap); + ret = NNS_SndArcLoadSeq(seqNo, work->heap); GF_SndHeapGetFreeSize(); return ret; } @@ -389,7 +389,7 @@ BOOL GF_Snd_LoadSeqEx(int seqNo, u32 loadFlag) { SND_WORK *work; work = GetSoundDataPointer(); - ret = NNS_SndArcLoadSeqEx(seqNo, loadFlag, work->heap); + ret = NNS_SndArcLoadSeqEx(seqNo, loadFlag, work->heap); GF_SndHeapGetFreeSize(); return ret; } @@ -399,7 +399,7 @@ BOOL GF_Snd_LoadWaveArc(int waveArcNo) { SND_WORK *work; work = GetSoundDataPointer(); - ret = NNS_SndArcLoadWaveArc(waveArcNo, work->heap); + ret = NNS_SndArcLoadWaveArc(waveArcNo, work->heap); GF_SndHeapGetFreeSize(); return ret; } @@ -409,7 +409,7 @@ BOOL GF_Snd_LoadBank(int bankNo) { SND_WORK *work; work = GetSoundDataPointer(); - ret = NNS_SndArcLoadBank(bankNo, work->heap); + ret = NNS_SndArcLoadBank(bankNo, work->heap); GF_SndHeapGetFreeSize(); return ret; } @@ -504,14 +504,14 @@ BOOL GF_SndWorkMicCounterFull(void) { void GF_SndWorkMicCounterReset(void) { SND_WORK *work; - work = GetSoundDataPointer(); + work = GetSoundDataPointer(); work->micCounter = 0; } void GF_SndWorkSetGbSoundsVolume(u8 a0) { SND_WORK *work; - work = GetSoundDataPointer(); + work = GetSoundDataPointer(); work->gbSoundsVolume = a0; } diff --git a/src/sound_chatot.c b/src/sound_chatot.c index 1a70df80d8..4e26ed09e5 100644 --- a/src/sound_chatot.c +++ b/src/sound_chatot.c @@ -96,16 +96,16 @@ void sub_02006DB8() { BOOL Chatot_StartRecording(void) { MICAutoParam st0; - st0.type = MIC_SAMPLING_TYPE_SIGNED_8BIT; + st0.type = MIC_SAMPLING_TYPE_SIGNED_8BIT; st0.buffer = sub_020059D8(); - st0.size = 2000; + st0.size = 2000; if ((st0.size & 0x1f) != 0) { st0.size &= ~0x1f; } - st0.rate = HW_CPU_CLOCK_ARM7 / 2000; - st0.loop_enable = 0; + st0.rate = HW_CPU_CLOCK_ARM7 / 2000; + st0.loop_enable = 0; st0.full_callback = 0; - st0.full_arg = 0; + st0.full_arg = 0; return GF_MIC_StartAutoSampling(&st0); } @@ -120,7 +120,7 @@ void Chatot_SaveRecording(SOUND_CHATOT *a0) { void sub_02006E3C(u8 a0) { u8 *r0 = GF_SdatGetAttrPtr(31); - *r0 = a0; + *r0 = a0; } void sub_02006E4C(SOUND_CHATOT *a0, u32 a1, u32 a2, s32 a3) { diff --git a/src/sound_radio_sys.c b/src/sound_radio_sys.c index d2a9d557af..17d5f65a3f 100644 --- a/src/sound_radio_sys.c +++ b/src/sound_radio_sys.c @@ -1,7 +1,7 @@ #include "sound.h" #include "sound_radio.h" -int sRadioSeqNo = 0; +int sRadioSeqNo = 0; NNSSndHandle sSndHandle = { NULL }; static void StopMusic(void) { diff --git a/src/sprite.c b/src/sprite.c index cadc85ab61..2389747d3a 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -47,14 +47,14 @@ SpriteList *SpriteList_Create(SpriteListParam *param) { ret->sprites = AllocFromHeap(param->heapId, param->num * sizeof(Sprite)); GF_ASSERT(ret->sprites != NULL); ret->numSprites = param->num; - ret->stack = AllocFromHeap(param->heapId, param->num * sizeof(Sprite *)); + ret->stack = AllocFromHeap(param->heapId, param->num * sizeof(Sprite *)); GF_ASSERT(ret->stack != NULL); SpriteList_InitStack(ret); Sprite_Init(&ret->dummy); ret->dummy.prev = &ret->dummy; ret->dummy.next = &ret->dummy; - ret->renderer = param->rendererInstance; - ret->animBuff = Sys_AllocAndReadFile(param->heapId, "data/clact_default.NANR"); + ret->renderer = param->rendererInstance; + ret->animBuff = Sys_AllocAndReadFile(param->heapId, "data/clact_default.NANR"); NNS_G2dGetUnpackedAnimBank(ret->animBuff, &ret->animBank); ret->flag = TRUE; return ret; @@ -112,11 +112,11 @@ void SpriteList_RenderAndAnimateSprites(SpriteList *spriteList) { } static void SpriteList_Init(SpriteList *spriteList) { - spriteList->sprites = NULL; - spriteList->numSprites = 0; - spriteList->stack = NULL; + spriteList->sprites = NULL; + spriteList->numSprites = 0; + spriteList->stack = NULL; spriteList->stackPointer = 0; - spriteList->renderer = NULL; + spriteList->renderer = NULL; Sprite_Init(&spriteList->dummy); spriteList->flag = FALSE; } @@ -135,29 +135,29 @@ Sprite *Sprite_CreateAffine(const SpriteTemplate *template) { return NULL; } - sprite->spriteList = template->spriteList; - sprite->animationNo = 0; - sprite->matrix = template->position; - sprite->scale = template->scale; - sprite->rotation = template->rotation; - sprite->type = template->whichScreen; + sprite->spriteList = template->spriteList; + sprite->animationNo = 0; + sprite->matrix = template->position; + sprite->scale = template->scale; + sprite->rotation = template->rotation; + sprite->type = template->whichScreen; sprite->drawPriority = template->priority; - sprite->affine = 0; - sprite->flip = 0; - sprite->mosaic = FALSE; - sprite->mode = GX_OAM_MODE_NORMAL; - sprite->overwrite = NNS_G2D_RND_OVERWRITE_PRIORITY | NNS_G2D_RND_OVERWRITE_PLTTNO_OFFS; + sprite->affine = 0; + sprite->flip = 0; + sprite->mosaic = FALSE; + sprite->mode = GX_OAM_MODE_NORMAL; + sprite->overwrite = NNS_G2D_RND_OVERWRITE_PRIORITY | NNS_G2D_RND_OVERWRITE_PLTTNO_OFFS; NNS_G2dSetRndCoreAffineOverwriteMode(&template->spriteList->renderer->rendererCore, (NNSG2dRendererAffineTypeOverwiteMode)sprite->affine); NNS_G2dSetRndCoreFlipMode(&template->spriteList->renderer->rendererCore, sprite->flip & 1, sprite->flip & 2); - sprite->drawFlag = 1; + sprite->drawFlag = 1; sprite->animActive = 0; - sprite->speed = FX32_CONST(2); + sprite->speed = FX32_CONST(2); if (!SpriteList_LoadCellAndAnimForSprite(template->spriteList, template->header, sprite, template->heapId)) { Sprite_Delete(sprite); return NULL; } sprite->palOffset = Sprite_GetPaletteVramOffset(&sprite->paletteProxy, sprite->type); - sprite->palIndex = sprite->palOffset; + sprite->palIndex = sprite->palOffset; SpriteList_InsertSprite(template->spriteList, sprite); return sprite; } @@ -166,13 +166,13 @@ Sprite *Sprite_Create(const SimpleSpriteTemplate *simpleTemplate) { SpriteTemplate template; template.spriteList = simpleTemplate->spriteList; - template.header = simpleTemplate->header; - template.position = simpleTemplate->position; + template.header = simpleTemplate->header; + template.position = simpleTemplate->position; SetVecFx32(template.scale, FX32_ONE, FX32_ONE, FX32_ONE); - template.rotation = 0; - template.priority = simpleTemplate->priority; + template.rotation = 0; + template.priority = simpleTemplate->priority; template.whichScreen = simpleTemplate->whichScreen; - template.heapId = simpleTemplate->heapId; + template.heapId = simpleTemplate->heapId; return Sprite_CreateAffine(&template); } @@ -257,7 +257,7 @@ void Sprite_SetAffineOverwriteType(Sprite *sprite, u8 affine) { void Sprite_SetFlip_AffineOff(Sprite *sprite, u8 flip) { GF_ASSERT(sprite != NULL); - sprite->flip = flip; + sprite->flip = flip; sprite->affine = 0; } @@ -296,12 +296,12 @@ void Sprite_SetAnimCtrlSeq(Sprite *sprite, int seq) { GF_ASSERT(Sprite_GetNumAnimSeqs(sprite) > seq); sprite->animationNo = (u16)seq; if (sprite->flag == SPRITE_ANIM_TYPE_CELL || sprite->flag == SPRITE_ANIM_TYPE_CELL_TRANSFER) { - SpriteAnimationData *animData = (SpriteAnimationData *)sprite->animationData; + SpriteAnimationData *animData = (SpriteAnimationData *)sprite->animationData; const NNSG2dAnimSequenceData *seqData = NNS_G2dGetAnimSequenceByIdx(animData->animBankData, seq); NNS_G2dSetCellAnimationSequence(&animData->animation, seqData); NNS_G2dStartAnimCtrl(&animData->animation.animCtrl); } else { - SpriteMultiAnimationData *animData = (SpriteMultiAnimationData *)sprite->animationData; + SpriteMultiAnimationData *animData = (SpriteMultiAnimationData *)sprite->animationData; const NNSG2dMultiCellAnimSequence *seqData = NNS_G2dGetAnimSequenceByIdx(animData->multiAnimBankData, seq); NNS_G2dSetAnimSequenceToMCAnimation(&animData->animation, seqData); NNS_G2dStartAnimCtrl(&animData->animation.animCtrl); @@ -400,7 +400,7 @@ u8 Sprite_GetPalOffset(Sprite *sprite) { void Sprite_SetDrawPriority(Sprite *sprite, u32 priority) { SpriteList *spriteList = sprite->spriteList; - sprite->drawPriority = priority; + sprite->drawPriority = priority; Sprite_EjectFromList(sprite); SpriteList_InsertSprite(spriteList, sprite); } @@ -482,10 +482,10 @@ static u32 Sprite_GetExAttrByAnimSeqAndFrame(const Sprite *sprite, u32 seq, u32 if (sprite->flag == SPRITE_ANIM_TYPE_CELL || sprite->flag == SPRITE_ANIM_TYPE_CELL_TRANSFER) { SpriteAnimationData *animData = (SpriteAnimationData *)sprite->animationData; - animBank = animData->animBankData; + animBank = animData->animBankData; } else { SpriteMultiAnimationData *animData = (SpriteMultiAnimationData *)sprite->animationData; - animBank = animData->multiAnimBankData; + animBank = animData->multiAnimBankData; } userExAnimAttrBank = NNS_G2dGetUserExAnimAttrBank(animBank); if (userExAnimAttrBank != NULL) { @@ -502,7 +502,7 @@ static u32 Sprite_GetExAttrByAnimSeqAndFrame(const Sprite *sprite, u32 seq, u32 } u32 Sprite_GetCurrentAnimFrameExAttr(Sprite *sprite) { - u32 animNum = Sprite_GetAnimationNumber(sprite); + u32 animNum = Sprite_GetAnimationNumber(sprite); u32 animFrame = Sprite_GetAnimCtrlCurrentFrame(sprite); return Sprite_GetExAttrByAnimSeqAndFrame(sprite, animNum, animFrame); } @@ -514,8 +514,8 @@ NNSG2dCellAnimation *Sprite_GetCellAnim(Sprite *sprite) { } static BOOL SpriteList_LoadCellAndAnimForSprite(SpriteList *spriteList, const SpriteResourcesHeader *resHdr, Sprite *sprite, HeapID heapId) { - sprite->flag = SpriteResourcesHeader_GetSpriteAnimType(resHdr); - sprite->imageProxy = *resHdr->imageProxy; + sprite->flag = SpriteResourcesHeader_GetSpriteAnimType(resHdr); + sprite->imageProxy = *resHdr->imageProxy; sprite->paletteProxy = *resHdr->plttProxy; Sprite_SetCellBankPtr(resHdr->cellData, sprite); if (resHdr->cellAnim != NULL) { @@ -548,26 +548,26 @@ static SpriteAnimType SpriteResourcesHeader_GetSpriteAnimType(const SpriteResour static void Sprite_SetCellBankPtr(const NNSG2dCellDataBank *cellData, Sprite *sprite) { SpriteAnimationData *animData = (SpriteAnimationData *)sprite->animationData; - animData->cellBank = cellData; + animData->cellBank = cellData; } static void Sprite_SetAnimBankPtr(const NNSG2dCellAnimBankData *cellAnim, Sprite *sprite) { SpriteAnimationData *animData = (SpriteAnimationData *)sprite->animationData; - animData->animBankData = cellAnim; + animData->animBankData = cellAnim; } static void Sprite_SetMultiCellBankPtr(const NNSG2dMultiCellDataBank *mcelData, Sprite *sprite) { SpriteMultiAnimationData *animData = (SpriteMultiAnimationData *)sprite->animationData; - animData->multiCellBank = mcelData; + animData->multiCellBank = mcelData; } static void Sprite_SetMultiAnimBankPtr(const NNSG2dMultiCellAnimBankData *mcelAnim, Sprite *sprite) { SpriteMultiAnimationData *animData = (SpriteMultiAnimationData *)sprite->animationData; - animData->multiAnimBankData = mcelAnim; + animData->multiAnimBankData = mcelAnim; } static void Sprite_InitCellAnimation(Sprite *sprite, HeapID heapId) { - SpriteAnimationData *animData = (SpriteAnimationData *)sprite->animationData; + SpriteAnimationData *animData = (SpriteAnimationData *)sprite->animationData; const NNSG2dAnimSequenceData *animSeq = NNS_G2dGetAnimSequenceByIdx(animData->animBankData, 0); NNS_G2dInitCellAnimation(&animData->animation, animSeq, animData->cellBank); } @@ -576,16 +576,16 @@ static void Sprite_InitCellAnimationWithTransfer(const SpriteResourcesHeader *re SpriteAnimationDataWithTransfer *animData = (SpriteAnimationDataWithTransfer *)sprite->animationData; const NNSG2dCharacterData *charData; animData->cellTransferStateHandle = NNS_G2dGetNewCellTransferStateHandle(); - charData = resHdr->charData; + charData = resHdr->charData; NNS_G2dInitCellAnimationVramTransfered(&animData->animation, NNS_G2dGetAnimSequenceByIdx(animData->animBankData, 0), animData->cellBank, animData->cellTransferStateHandle, -1, NNS_G2dGetImageLocation(&sprite->imageProxy, NNS_G2D_VRAM_TYPE_2DMAIN), NNS_G2dGetImageLocation(&sprite->imageProxy, NNS_G2D_VRAM_TYPE_2DSUB), charData->pRawData, NULL, charData->szByte); } static void Sprite_InitMultiCellAnimation(Sprite *sprite, HeapID heapId) { - SpriteMultiAnimationData *animData = (SpriteMultiAnimationData *)sprite->animationData; + SpriteMultiAnimationData *animData = (SpriteMultiAnimationData *)sprite->animationData; const NNSG2dMultiCellAnimSequence *animSeq = NNS_G2dGetAnimSequenceByIdx(animData->multiAnimBankData, 0); - u16 numNodes = NNS_G2dGetMCBankNumNodesRequired(animData->multiCellBank); - animData->node = AllocFromHeap(heapId, numNodes * sizeof(NNSG2dNode)); - animData->cellAnim = AllocFromHeap(heapId, numNodes * sizeof(NNSG2dCellAnimation)); + u16 numNodes = NNS_G2dGetMCBankNumNodesRequired(animData->multiCellBank); + animData->node = AllocFromHeap(heapId, numNodes * sizeof(NNSG2dNode)); + animData->cellAnim = AllocFromHeap(heapId, numNodes * sizeof(NNSG2dCellAnimation)); NNS_G2dInitMCAnimation(&animData->animation, animData->node, animData->cellAnim, numNodes, animData->animBankData, animData->cellBank, animData->multiCellBank); NNS_G2dSetAnimSequenceToMCAnimation(&animData->animation, animSeq); } @@ -658,16 +658,16 @@ static void SpriteList_InsertSprite(SpriteList *spriteList, Sprite *sprite) { if (spriteList->dummy.next == &spriteList->dummy) { spriteList->dummy.next = sprite; spriteList->dummy.prev = sprite; - sprite->prev = &spriteList->dummy; - sprite->next = &spriteList->dummy; + sprite->prev = &spriteList->dummy; + sprite->next = &spriteList->dummy; return; } if (spriteList->dummy.prev->drawPriority <= sprite->drawPriority) { - sprite->prev = spriteList->dummy.prev; + sprite->prev = spriteList->dummy.prev; spriteList->dummy.prev->next = sprite; - sprite->next = &spriteList->dummy; - spriteList->dummy.prev = sprite; + sprite->next = &spriteList->dummy; + spriteList->dummy.prev = sprite; return; } @@ -675,9 +675,9 @@ static void SpriteList_InsertSprite(SpriteList *spriteList, Sprite *sprite) { while (head != &spriteList->dummy) { if (head->drawPriority > sprite->drawPriority) { head->prev->next = sprite; - sprite->prev = head->prev; - head->prev = sprite; - sprite->next = head; + sprite->prev = head->prev; + head->prev = sprite; + sprite->next = head; return; } head = head->next; diff --git a/src/start_menu.c b/src/start_menu.c index 5a341c9973..3041903ade 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -194,19 +194,19 @@ static const int sActionToIconIndex[] = { }; static const StartMenuActionFunc sStartMenuActions[] = { - [START_MENU_ACTION_POKEDEX] = { .ident = msg_0196_00000, .func = Task_StartMenu_HandleSelection_Pokedex }, - [START_MENU_ACTION_POKEMON] = { .ident = msg_0196_00001, .func = Task_StartMenu_HandleSelection_Pokemon }, - [START_MENU_ACTION_BAG] = { .ident = msg_0196_00002, .func = Task_StartMenu_HandleSelection_Bag }, - [START_MENU_ACTION_TRAINER_CARD] = { .ident = msg_0196_00003, .func = Task_StartMenu_HandleSelection_TrainerCard }, - [START_MENU_ACTION_SAVE] = { .ident = msg_0196_00004, .func = Task_StartMenu_HandleSelection_Save }, - [START_MENU_ACTION_OPTIONS] = { .ident = msg_0196_00005, .func = Task_StartMenu_HandleSelection_Options }, + [START_MENU_ACTION_POKEDEX] = { .ident = msg_0196_00000, .func = Task_StartMenu_HandleSelection_Pokedex }, + [START_MENU_ACTION_POKEMON] = { .ident = msg_0196_00001, .func = Task_StartMenu_HandleSelection_Pokemon }, + [START_MENU_ACTION_BAG] = { .ident = msg_0196_00002, .func = Task_StartMenu_HandleSelection_Bag }, + [START_MENU_ACTION_TRAINER_CARD] = { .ident = msg_0196_00003, .func = Task_StartMenu_HandleSelection_TrainerCard }, + [START_MENU_ACTION_SAVE] = { .ident = msg_0196_00004, .func = Task_StartMenu_HandleSelection_Save }, + [START_MENU_ACTION_OPTIONS] = { .ident = msg_0196_00005, .func = Task_StartMenu_HandleSelection_Options }, [START_MENU_ACTION_RUNNING_SHOES] = { .ident = msg_0196_00006, .func = STARTMENUTASKFUNC_CANCEL }, - [START_MENU_ACTION_7] = { .ident = msg_0196_00007, .func = Task_StartMenu_HandleSelection_RemovedEasyChatThing }, - [START_MENU_ACTION_RETIRE] = { .ident = msg_0196_00008, .func = Task_StartMenu_HandleSelection_Retire }, - [START_MENU_ACTION_9] = { .ident = msg_0196_00014, .func = Task_StartMenu_HandleSelection_Pokegear }, - [START_MENU_ACTION_10] = { .ident = msg_0196_00014, .func = Task_StartMenu_HandleSelection_Pokegear }, - [START_MENU_ACTION_POKEGEAR] = { .ident = msg_0196_00014, .func = Task_StartMenu_HandleSelection_Pokegear }, - [START_MENU_ACTION_12] = { .ident = msg_0196_00014, .func = sub_0203D2CC }, + [START_MENU_ACTION_7] = { .ident = msg_0196_00007, .func = Task_StartMenu_HandleSelection_RemovedEasyChatThing }, + [START_MENU_ACTION_RETIRE] = { .ident = msg_0196_00008, .func = Task_StartMenu_HandleSelection_Retire }, + [START_MENU_ACTION_9] = { .ident = msg_0196_00014, .func = Task_StartMenu_HandleSelection_Pokegear }, + [START_MENU_ACTION_10] = { .ident = msg_0196_00014, .func = Task_StartMenu_HandleSelection_Pokegear }, + [START_MENU_ACTION_POKEGEAR] = { .ident = msg_0196_00014, .func = Task_StartMenu_HandleSelection_Pokegear }, + [START_MENU_ACTION_12] = { .ident = msg_0196_00014, .func = sub_0203D2CC }, }; static const u8 _020FA0AC[] = { @@ -255,8 +255,8 @@ void sub_0203BC28(FieldSystem *fieldSystem) { void sub_0203BCDC(FieldSystem *fieldSystem) { StartMenuTaskData *startMenu = StartMenu_Create(); - startMenu->inhibitIconFlags = sub_0203BEE0(fieldSystem); - startMenu->unk_350 = TRUE; + startMenu->inhibitIconFlags = sub_0203BEE0(fieldSystem); + startMenu->unk_350 = TRUE; if (sub_0205CF60(fieldSystem->playerAvatar) == TRUE) { sub_0205CFBC(fieldSystem->playerAvatar, PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar)); } @@ -265,8 +265,8 @@ void sub_0203BCDC(FieldSystem *fieldSystem) { void sub_0203BD20(FieldSystem *fieldSystem) { StartMenuTaskData *startMenu = StartMenu_Create(); - startMenu->inhibitIconFlags = sub_0203BEE8(fieldSystem); - startMenu->unk_350 = FALSE; + startMenu->inhibitIconFlags = sub_0203BEE8(fieldSystem); + startMenu->unk_350 = FALSE; if (sub_0205CF60(fieldSystem->playerAvatar) == TRUE) { sub_0205CFBC(fieldSystem->playerAvatar, PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar)); } @@ -276,7 +276,7 @@ void sub_0203BD20(FieldSystem *fieldSystem) { void sub_0203BD64(FieldSystem *fieldSystem) { PlaySE(SEQ_SE_DP_WIN_OPEN); StartMenuTaskData *startMenu = StartMenu_Create(); - startMenu->unk_350 = FALSE; + startMenu->unk_350 = FALSE; if (Save_VarsFlags_CheckSafariSysFlag(Save_VarsFlags_Get(fieldSystem->saveData)) == TRUE) { startMenu->inhibitIconFlags = FieldSystem_GetStartMenuButtonInhibitFlags_Safari(fieldSystem); } else if (Save_VarsFlags_CheckBugContestFlag(Save_VarsFlags_Get(fieldSystem->saveData)) == TRUE) { @@ -289,7 +289,7 @@ void sub_0203BD64(FieldSystem *fieldSystem) { startMenu->inhibitIconFlags = sub_0203BEE8(fieldSystem); } else if (fieldSystem->unk70 == 2) { startMenu->inhibitIconFlags = sub_0203BEE0(fieldSystem); - startMenu->unk_350 = TRUE; + startMenu->unk_350 = TRUE; } else { startMenu->inhibitIconFlags = FieldSystem_GetStartMenuButtonInhibitFlags_Normal(fieldSystem); } @@ -299,9 +299,9 @@ void sub_0203BD64(FieldSystem *fieldSystem) { static StartMenuTaskData *StartMenu_Create(void) { StartMenuTaskData *ret = AllocFromHeap(HEAP_ID_FIELD, sizeof(StartMenuTaskData)); MI_CpuClearFast(ret, sizeof(StartMenuTaskData)); - ret->state = 0; + ret->state = 0; ret->lastButtonSelected = 0; - ret->atexit_TaskEnv = NULL; + ret->atexit_TaskEnv = NULL; return ret; } @@ -351,7 +351,7 @@ static u32 sub_0203BEE8(FieldSystem *fieldSystem) { } static BOOL Task_StartMenu(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); switch (startMenu->state) { @@ -368,7 +368,7 @@ static BOOL Task_StartMenu(TaskManager *taskManager) { FieldSystem_MakeFieldMoveCheckData(fieldSystem, &startMenu->fieldMoveCheckData); Task_StartMenu_DrawCursor(taskManager); fieldSystem->unkD2_0 = 1; - startMenu->state = START_MENU_STATE_HANDLE_INPUT; + startMenu->state = START_MENU_STATE_HANDLE_INPUT; break; case START_MENU_STATE_2: if (ov01_021F6B10(fieldSystem) == 6) { @@ -473,11 +473,11 @@ static BOOL Task_StartMenu(TaskManager *taskManager) { } static void Task_StartMenu_DrawCursor(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - u32 numActiveButtons = StartMenu_BuildActionLists(startMenu, startMenu->insertionOrder, startMenu->selectionToAction); - startMenu->numActiveButtons = numActiveButtons; + u32 numActiveButtons = StartMenu_BuildActionLists(startMenu, startMenu->insertionOrder, startMenu->selectionToAction); + startMenu->numActiveButtons = numActiveButtons; startMenu->lastButtonSelected = 0; for (int i = 0; i < numActiveButtons; ++i) { if (fieldSystem->unk90 == startMenu->insertionOrder[i]) { @@ -582,7 +582,7 @@ static void FieldSystem_ResetGearRingManagerIfNotSelectingSaveOrPokegear(FieldSy } static BOOL Task_StartMenu_HandleInput(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); if (!ov01_021F6B00(fieldSystem) && ov01_021F6B10(fieldSystem) == TRUE) { @@ -620,7 +620,7 @@ static BOOL StartMenu_HandleKeyInput(TaskManager *taskManager, FieldSystem *fiel TaskFunc func = sStartMenuActions[startMenu->selectionToAction[startMenu->selectedIndex]].func; sub_0203DF64(fieldSystem, 0); ov01_021F6B50(fieldSystem); - fieldSystem->lastTouchMenuInput = 0; + fieldSystem->lastTouchMenuInput = 0; fieldSystem->lastStartMenuAction = startMenu->selectionToAction[startMenu->selectedIndex]; return func(taskManager); } @@ -637,7 +637,7 @@ static BOOL StartMenu_HandleTouchInput(TaskManager *taskManager, FieldSystem *fi switch (fieldSystem->lastTouchMenuInput) { case 1: PlaySE(SEQ_SE_GS_GEARCANCEL); - startMenu->state = START_MENU_STATE_CLOSE; + startMenu->state = START_MENU_STATE_CLOSE; fieldSystem->lastTouchMenuInput = 0; break; case 2: @@ -654,11 +654,11 @@ static BOOL StartMenu_HandleTouchInput(TaskManager *taskManager, FieldSystem *fi PlaySE(SEQ_SE_DP_SELECT); startMenu->selectedIndex = fieldSystem->unkD3; if (sStartMenuActions[startMenu->selectionToAction[startMenu->selectedIndex]].func == STARTMENUTASKFUNC_CANCEL) { - startMenu->state = START_MENU_STATE_CLOSE; + startMenu->state = START_MENU_STATE_CLOSE; fieldSystem->lastTouchMenuInput = 0; } else if (sStartMenuActions[startMenu->selectionToAction[startMenu->selectedIndex]].func != STARTMENUTASKFUNC_NONE) { if (FieldSystem_StartMenuActionIsAvailable(fieldSystem, (StartMenuAction)startMenu->selectionToAction[startMenu->selectedIndex])) { - TaskFunc func = sStartMenuActions[startMenu->selectionToAction[startMenu->selectedIndex]].func; + TaskFunc func = sStartMenuActions[startMenu->selectionToAction[startMenu->selectedIndex]].func; fieldSystem->lastTouchMenuInput = 0; sub_0203DF64(fieldSystem, 1); ov01_021F6B50(fieldSystem); @@ -697,20 +697,20 @@ static void StartMenu_CreateCursor(StartMenuTaskData *startMenu, u8 *a1, u32 a2, CreateSpriteResourcesHeader(&startMenu->spriteResourcesHeader, 0, 0, 0, 0, -1, -1, 0, 0, startMenu->gfxResMan[GF_GFX_RES_TYPE_CHAR], startMenu->gfxResMan[GF_GFX_RES_TYPE_PLTT], startMenu->gfxResMan[GF_GFX_RES_TYPE_CELL], startMenu->gfxResMan[GF_GFX_RES_TYPE_ANIM], NULL, NULL); SpriteTemplate spriteTemplate; - spriteTemplate.spriteList = startMenu->spriteList; - spriteTemplate.header = &startMenu->spriteResourcesHeader; - spriteTemplate.position.z = 0; - spriteTemplate.scale.x = FX32_ONE; - spriteTemplate.scale.y = FX32_ONE; - spriteTemplate.scale.z = FX32_ONE; - spriteTemplate.rotation = 0; - spriteTemplate.priority = 0; + spriteTemplate.spriteList = startMenu->spriteList; + spriteTemplate.header = &startMenu->spriteResourcesHeader; + spriteTemplate.position.z = 0; + spriteTemplate.scale.x = FX32_ONE; + spriteTemplate.scale.y = FX32_ONE; + spriteTemplate.scale.z = FX32_ONE; + spriteTemplate.rotation = 0; + spriteTemplate.priority = 0; spriteTemplate.whichScreen = NNS_G2D_VRAM_TYPE_2DMAIN; - spriteTemplate.heapId = HEAP_ID_FIELD; - spriteTemplate.header = &startMenu->spriteResourcesHeader; // second assign is necessary to match - spriteTemplate.position.x = FX32_CONST(100); - spriteTemplate.position.y = FX32_CONST(144); - startMenu->cursorSprite = Sprite_CreateAffine(&spriteTemplate); + spriteTemplate.heapId = HEAP_ID_FIELD; + spriteTemplate.header = &startMenu->spriteResourcesHeader; // second assign is necessary to match + spriteTemplate.position.x = FX32_CONST(100); + spriteTemplate.position.y = FX32_CONST(144); + startMenu->cursorSprite = Sprite_CreateAffine(&spriteTemplate); Sprite_SetAnimActiveFlag(startMenu->cursorSprite, TRUE); GfGfx_EngineATogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_ON); } @@ -726,7 +726,7 @@ static void StartMenu_DestroyCursor(StartMenuTaskData *startMenu) { static void Task_StartMenu_WaitFade(TaskManager *taskManager) { if (IsPaletteFadeFinished()) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); sub_0203C38C(startMenu, fieldSystem); @@ -737,7 +737,7 @@ static void Task_StartMenu_WaitFade(TaskManager *taskManager) { } static void Task_StartMenu_WaitApp(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); if (!FieldSystem_ApplicationIsRunning(fieldSystem)) { @@ -750,7 +750,7 @@ static void Task_StartMenu_WaitApp(TaskManager *taskManager) { void StartMenu_SetChildProcReturnTaskFunc(StartMenuTaskData *startMenu, TaskFunc func) { startMenu->atexit_TaskFunc = func; - startMenu->state = START_MENU_STATE_WAIT_APP; + startMenu->state = START_MENU_STATE_WAIT_APP; } static BOOL Task_StartMenu_HandleSelection_Pokedex(TaskManager *taskManager) { @@ -758,27 +758,27 @@ static BOOL Task_StartMenu_HandleSelection_Pokedex(TaskManager *taskManager) { ov01_021E636C(0); startMenu->atexit_TaskFunc = Task_StartMenu_OpenPokedex; - startMenu->state = START_MENU_STATE_WAIT_FADE; + startMenu->state = START_MENU_STATE_WAIT_FADE; return TRUE; } static BOOL Task_StartMenu_OpenPokedex(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); LocalFieldData *localFieldData = Save_LocalFieldData_Get(fieldSystem->saveData); - Location *position = LocalFieldData_GetCurrentPosition(localFieldData); - Location *specialSpawnWarp = LocalFieldData_GetSpecialSpawnWarpPtr(localFieldData); - PokedexArgs *pokedexArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PokedexArgs)); + Location *position = LocalFieldData_GetCurrentPosition(localFieldData); + Location *specialSpawnWarp = LocalFieldData_GetSpecialSpawnWarpPtr(localFieldData); + PokedexArgs *pokedexArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PokedexArgs)); MI_CpuClear8(pokedexArgs, sizeof(PokedexArgs)); - pokedexArgs->pokedex = Save_Pokedex_Get(fieldSystem->saveData); - pokedexArgs->playerProfile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); - pokedexArgs->unk_08 = fieldSystem->unkA8; + pokedexArgs->pokedex = Save_Pokedex_Get(fieldSystem->saveData); + pokedexArgs->playerProfile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); + pokedexArgs->unk_08 = fieldSystem->unkA8; pokedexArgs->menuInputStatePtr = &fieldSystem->menuInputState; - int x = GetPlayerXCoord(fieldSystem->playerAvatar); - int y = GetPlayerZCoord(fieldSystem->playerAvatar); - pokedexArgs->mapMatrixId = MapMatrix_GetMapHeader(fieldSystem->mapMatrix, x / 32, y / 32); - pokedexArgs->mapId = position->mapId; + int x = GetPlayerXCoord(fieldSystem->playerAvatar); + int y = GetPlayerZCoord(fieldSystem->playerAvatar); + pokedexArgs->mapMatrixId = MapMatrix_GetMapHeader(fieldSystem->mapMatrix, x / 32, y / 32); + pokedexArgs->mapId = position->mapId; if (MapHeader_MapIsOnMainMatrix(pokedexArgs->mapMatrixId)) { pokedexArgs->x = x; pokedexArgs->y = y; @@ -795,13 +795,13 @@ static BOOL Task_StartMenu_OpenPokedex(TaskManager *taskManager) { } } Pokedex_LaunchApp(fieldSystem, pokedexArgs); - startMenu->atexit_TaskEnv = pokedexArgs; + startMenu->atexit_TaskEnv = pokedexArgs; startMenu->atexit_TaskFunc = Task_StartMenu_HandleReturn_Pokedex; return FALSE; } static BOOL Task_StartMenu_HandleReturn_Pokedex(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); sub_020505C0(fieldSystem); @@ -817,21 +817,21 @@ static BOOL Task_StartMenu_HandleSelection_Pokemon(TaskManager *taskManager) { ov01_021E636C(0); startMenu->atexit_TaskFunc = Task_StartMenu_Pokemon; - startMenu->state = START_MENU_STATE_WAIT_FADE; + startMenu->state = START_MENU_STATE_WAIT_FADE; return TRUE; } static BOOL Task_StartMenu_Pokemon(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - startMenu->atexit_TaskEnv = PartyMenu_LaunchApp_Unk1(fieldSystem, &startMenu->fieldMoveCheckData, 0); + startMenu->atexit_TaskEnv = PartyMenu_LaunchApp_Unk1(fieldSystem, &startMenu->fieldMoveCheckData, 0); startMenu->atexit_TaskFunc = Task_StartMenu_HandleReturn_Pokemon; return FALSE; } BOOL Task_StartMenu_HandleReturn_Pokemon(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); PartyMenuArgs *partyMenuArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); @@ -841,19 +841,19 @@ BOOL Task_StartMenu_HandleReturn_Pokemon(TaskManager *taskManager) { switch (partyMenuArgs->selectedAction) { case PARTY_MENU_ACTION_RETURN_1: { PokemonSummaryArgs *pokemonSummaryArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PokemonSummaryArgs)); - pokemonSummaryArgs->party = SaveArray_Party_Get(fieldSystem->saveData); - pokemonSummaryArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - pokemonSummaryArgs->unk11 = 1; - pokemonSummaryArgs->partySlot = partyMenuArgs->partySlot; - pokemonSummaryArgs->partyCount = Party_GetCount(pokemonSummaryArgs->party); - pokemonSummaryArgs->moveToLearn = 0; - pokemonSummaryArgs->unk12 = 0; - pokemonSummaryArgs->ribbons = Save_SpecialRibbons_Get(fieldSystem->saveData); - pokemonSummaryArgs->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); - pokemonSummaryArgs->unk2C = sub_02088288(fieldSystem->saveData); - pokemonSummaryArgs->unk28 = 0; - pokemonSummaryArgs->menuInputStatePtr = &fieldSystem->menuInputState; - pokemonSummaryArgs->isFlag982Set = sub_0208828C(fieldSystem->saveData); + pokemonSummaryArgs->party = SaveArray_Party_Get(fieldSystem->saveData); + pokemonSummaryArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + pokemonSummaryArgs->unk11 = 1; + pokemonSummaryArgs->partySlot = partyMenuArgs->partySlot; + pokemonSummaryArgs->partyCount = Party_GetCount(pokemonSummaryArgs->party); + pokemonSummaryArgs->moveToLearn = 0; + pokemonSummaryArgs->unk12 = 0; + pokemonSummaryArgs->ribbons = Save_SpecialRibbons_Get(fieldSystem->saveData); + pokemonSummaryArgs->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); + pokemonSummaryArgs->unk2C = sub_02088288(fieldSystem->saveData); + pokemonSummaryArgs->unk28 = 0; + pokemonSummaryArgs->menuInputStatePtr = &fieldSystem->menuInputState; + pokemonSummaryArgs->isFlag982Set = sub_0208828C(fieldSystem->saveData); sub_02089D40(pokemonSummaryArgs, _020FA0B0); sub_0208AD34(pokemonSummaryArgs, Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); PokemonSummary_LearnForget_LaunchApp(fieldSystem, pokemonSummaryArgs); @@ -863,51 +863,51 @@ BOOL Task_StartMenu_HandleReturn_Pokemon(TaskManager *taskManager) { } case PARTY_MENU_ACTION_RETURN_4: { PokemonSummaryArgs *pokemonSummaryArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PokemonSummaryArgs)); - pokemonSummaryArgs->party = SaveArray_Party_Get(fieldSystem->saveData); - pokemonSummaryArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - pokemonSummaryArgs->unk11 = 1; - pokemonSummaryArgs->partySlot = partyMenuArgs->partySlot; - pokemonSummaryArgs->partyCount = 1; - pokemonSummaryArgs->moveToLearn = partyMenuArgs->moveId; - pokemonSummaryArgs->unk12 = 2; - pokemonSummaryArgs->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); - pokemonSummaryArgs->unk2C = sub_02088288(fieldSystem->saveData); - pokemonSummaryArgs->unk28 = 0; - pokemonSummaryArgs->menuInputStatePtr = &fieldSystem->menuInputState; - pokemonSummaryArgs->isFlag982Set = sub_0208828C(fieldSystem->saveData); + pokemonSummaryArgs->party = SaveArray_Party_Get(fieldSystem->saveData); + pokemonSummaryArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + pokemonSummaryArgs->unk11 = 1; + pokemonSummaryArgs->partySlot = partyMenuArgs->partySlot; + pokemonSummaryArgs->partyCount = 1; + pokemonSummaryArgs->moveToLearn = partyMenuArgs->moveId; + pokemonSummaryArgs->unk12 = 2; + pokemonSummaryArgs->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); + pokemonSummaryArgs->unk2C = sub_02088288(fieldSystem->saveData); + pokemonSummaryArgs->unk28 = 0; + pokemonSummaryArgs->menuInputStatePtr = &fieldSystem->menuInputState; + pokemonSummaryArgs->isFlag982Set = sub_0208828C(fieldSystem->saveData); sub_02089D40(pokemonSummaryArgs, _020FA0AC); sub_0208AD34(pokemonSummaryArgs, Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); PokemonSummary_LearnForget_LaunchApp(fieldSystem, pokemonSummaryArgs); - UnkStruct_0203D580 *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203D580)); - unk->itemId = partyMenuArgs->itemId; - unk->unk_2 = 0; + UnkStruct_0203D580 *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203D580)); + unk->itemId = partyMenuArgs->itemId; + unk->unk_2 = 0; startMenu->atexit_TaskEnv2 = unk; - startMenu->atexit_TaskEnv = pokemonSummaryArgs; + startMenu->atexit_TaskEnv = pokemonSummaryArgs; StartMenu_SetChildProcReturnTaskFunc(startMenu, sub_0203D580); break; } case PARTY_MENU_ACTION_RETURN_5: { PokemonSummaryArgs *pokemonSummaryArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PokemonSummaryArgs)); - pokemonSummaryArgs->party = SaveArray_Party_Get(fieldSystem->saveData); - pokemonSummaryArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); - pokemonSummaryArgs->unk11 = 1; - pokemonSummaryArgs->partySlot = partyMenuArgs->partySlot; - pokemonSummaryArgs->partyCount = 1; - pokemonSummaryArgs->moveToLearn = partyMenuArgs->moveId; - pokemonSummaryArgs->unk12 = 2; - pokemonSummaryArgs->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); - pokemonSummaryArgs->unk2C = sub_02088288(fieldSystem->saveData); - pokemonSummaryArgs->unk28 = 0; - pokemonSummaryArgs->menuInputStatePtr = &fieldSystem->menuInputState; - pokemonSummaryArgs->isFlag982Set = sub_0208828C(fieldSystem->saveData); + pokemonSummaryArgs->party = SaveArray_Party_Get(fieldSystem->saveData); + pokemonSummaryArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + pokemonSummaryArgs->unk11 = 1; + pokemonSummaryArgs->partySlot = partyMenuArgs->partySlot; + pokemonSummaryArgs->partyCount = 1; + pokemonSummaryArgs->moveToLearn = partyMenuArgs->moveId; + pokemonSummaryArgs->unk12 = 2; + pokemonSummaryArgs->natDexEnabled = SaveArray_IsNatDexEnabled(fieldSystem->saveData); + pokemonSummaryArgs->unk2C = sub_02088288(fieldSystem->saveData); + pokemonSummaryArgs->unk28 = 0; + pokemonSummaryArgs->menuInputStatePtr = &fieldSystem->menuInputState; + pokemonSummaryArgs->isFlag982Set = sub_0208828C(fieldSystem->saveData); sub_02089D40(pokemonSummaryArgs, _020FA0AC); sub_0208AD34(pokemonSummaryArgs, Save_PlayerData_GetProfileAddr(fieldSystem->saveData)); PokemonSummary_LearnForget_LaunchApp(fieldSystem, pokemonSummaryArgs); - UnkStruct_0203D580 *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203D580)); - unk->itemId = ITEM_NONE; - unk->unk_2 = partyMenuArgs->levelUpMoveSearchState; + UnkStruct_0203D580 *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203D580)); + unk->itemId = ITEM_NONE; + unk->unk_2 = partyMenuArgs->levelUpMoveSearchState; startMenu->atexit_TaskEnv2 = unk; - startMenu->atexit_TaskEnv = pokemonSummaryArgs; + startMenu->atexit_TaskEnv = pokemonSummaryArgs; StartMenu_SetChildProcReturnTaskFunc(startMenu, sub_0203D580); break; } @@ -921,16 +921,16 @@ BOOL Task_StartMenu_HandleReturn_Pokemon(TaskManager *taskManager) { StartMenu_SetChildProcReturnTaskFunc(startMenu, Task_ReturnToMenuFromMail); break; case PARTY_MENU_ACTION_RETURN_READ_MAIL: - startMenu->atexit_TaskEnv = sub_0203F050(fieldSystem, Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), partyMenuArgs->partySlot), HEAP_ID_FIELD); + startMenu->atexit_TaskEnv = sub_0203F050(fieldSystem, Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), partyMenuArgs->partySlot), HEAP_ID_FIELD); startMenu->atexit_TaskEnv2 = sub_0203D818(partyMenuArgs->itemId, 2, partyMenuArgs->partySlot); StartMenu_SetChildProcReturnTaskFunc(startMenu, Task_ReturnToMenuFromMail); break; case 3: { StartMenuAfterEvoPartySlotBak *afterEvoPartySlot = AllocFromHeap(HEAP_ID_FIELD, sizeof(StartMenuAfterEvoPartySlotBak)); - afterEvoPartySlot->partySlot = partyMenuArgs->partySlot; - startMenu->atexit_TaskEnv2 = afterEvoPartySlot; - Bag *bag = Save_Bag_Get(fieldSystem->saveData); - PlayerProfile *playerProfile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); + afterEvoPartySlot->partySlot = partyMenuArgs->partySlot; + startMenu->atexit_TaskEnv2 = afterEvoPartySlot; + Bag *bag = Save_Bag_Get(fieldSystem->saveData); + PlayerProfile *playerProfile = Save_PlayerData_GetProfileAddr(fieldSystem->saveData); (void)playerProfile; startMenu->atexit_TaskEnv = Bag_CreateView(bag, sPockets, HEAP_ID_FIELD); sub_0207789C(startMenu->atexit_TaskEnv, fieldSystem->saveData, 1, fieldSystem->bagCursor, &fieldSystem->menuInputState); @@ -940,24 +940,24 @@ BOOL Task_StartMenu_HandleReturn_Pokemon(TaskManager *taskManager) { } case PARTY_MENU_ACTION_RETURN_EVO_ITEM_USE: { UnkStruct_0203CA9C_Case8 *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203CA9C_Case8)); - unk->evoParam = partyMenuArgs->itemId; - unk->evoType = EVOCTX_ITEM_USE; - unk->partySlot = partyMenuArgs->partySlot; - unk->species = partyMenuArgs->species; - unk->evoMethod = partyMenuArgs->evoMethod; - startMenu->atexit_TaskEnv = unk; - startMenu->state = START_MENU_STATE_EVOLUTION; + unk->evoParam = partyMenuArgs->itemId; + unk->evoType = EVOCTX_ITEM_USE; + unk->partySlot = partyMenuArgs->partySlot; + unk->species = partyMenuArgs->species; + unk->evoMethod = partyMenuArgs->evoMethod; + startMenu->atexit_TaskEnv = unk; + startMenu->state = START_MENU_STATE_EVOLUTION; break; } case PARTY_MENU_ACTION_RETURN_EVO_RARE_CANDY: { UnkStruct_0203CA9C_Case8 *unk = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203CA9C_Case8)); - unk->evoParam = MapHeader_GetMapEvolutionMethod(fieldSystem->location->mapId); - unk->evoType = EVOCTX_LEVELUP; - unk->partySlot = partyMenuArgs->partySlot; - unk->species = partyMenuArgs->species; - unk->evoMethod = partyMenuArgs->evoMethod; - startMenu->atexit_TaskEnv = unk; - startMenu->state = START_MENU_STATE_EVOLUTION; + unk->evoParam = MapHeader_GetMapEvolutionMethod(fieldSystem->location->mapId); + unk->evoType = EVOCTX_LEVELUP; + unk->partySlot = partyMenuArgs->partySlot; + unk->species = partyMenuArgs->species; + unk->evoMethod = partyMenuArgs->evoMethod; + startMenu->atexit_TaskEnv = unk; + startMenu->state = START_MENU_STATE_EVOLUTION; break; } case PARTY_MENU_ACTION_RETURN_CUT: @@ -977,8 +977,8 @@ BOOL Task_StartMenu_HandleReturn_Pokemon(TaskManager *taskManager) { FieldMoveUseData fieldMoveUseData; fieldMoveUseData.fieldMoveIdx = partyMenuArgs->selectedAction - PARTY_MENU_ACTION_RETURN_FIELD_MOVE_BEGIN; - fieldMoveUseData.partySlot = partyMenuArgs->partySlot; - fieldMoveUseData.taskManager = taskManager; + fieldMoveUseData.partySlot = partyMenuArgs->partySlot; + fieldMoveUseData.taskManager = taskManager; ((FieldMoveUseFunc)PartyMenu_GetFieldMoveFunc(FIELD_MOVE_FUNC_USE, fieldMoveUseData.fieldMoveIdx))(&fieldMoveUseData, &startMenu->fieldMoveCheckData); break; } @@ -1013,12 +1013,12 @@ static BOOL Task_StartMenu_HandleSelection_Bag(TaskManager *taskManager) { ov01_021E636C(0); startMenu->atexit_TaskFunc = Task_StartMenu_Bag; - startMenu->state = START_MENU_STATE_WAIT_FADE; + startMenu->state = START_MENU_STATE_WAIT_FADE; return TRUE; } static BOOL Task_StartMenu_Bag(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); startMenu->atexit_TaskEnv = sub_0203E3FC(fieldSystem, &startMenu->itemCheckUseData); @@ -1030,18 +1030,18 @@ static BOOL Task_StartMenu_Bag(TaskManager *taskManager) { static void sub_0203CF74(PartyMenuArgs *partyMenuArgs, FieldSystem *fieldSystem, StartMenuTaskData *startMenu) { memset(partyMenuArgs, 0, sizeof(PartyMenuArgs)); - partyMenuArgs->party = SaveArray_Party_Get(fieldSystem->saveData); - partyMenuArgs->bag = Save_Bag_Get(fieldSystem->saveData); - partyMenuArgs->mailbox = Save_Mailbox_Get(fieldSystem->saveData); - partyMenuArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); + partyMenuArgs->party = SaveArray_Party_Get(fieldSystem->saveData); + partyMenuArgs->bag = Save_Bag_Get(fieldSystem->saveData); + partyMenuArgs->mailbox = Save_Mailbox_Get(fieldSystem->saveData); + partyMenuArgs->options = Save_PlayerData_GetOptionsAddr(fieldSystem->saveData); partyMenuArgs->fieldMoveCheckData = &startMenu->fieldMoveCheckData; - partyMenuArgs->unk_25 = 0; - partyMenuArgs->fieldSystem = fieldSystem; - partyMenuArgs->menuInputStatePtr = &fieldSystem->menuInputState; + partyMenuArgs->unk_25 = 0; + partyMenuArgs->fieldSystem = fieldSystem; + partyMenuArgs->menuInputStatePtr = &fieldSystem->menuInputState; } static BOOL Task_StartMenu_HandleReturn(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); BagView *bagView = BagView_New(HEAP_ID_FIELD); @@ -1051,10 +1051,10 @@ static BOOL Task_StartMenu_HandleReturn(TaskManager *taskManager) { switch (sub_0207790C(bagView)) { case 0: { ItemMenuUseData itemMenuUseData; - itemMenuUseData.itemId = BagView_GetItemId(bagView); - itemMenuUseData.partySlot = sub_02077914(bagView); + itemMenuUseData.itemId = BagView_GetItemId(bagView); + itemMenuUseData.partySlot = sub_02077914(bagView); itemMenuUseData.taskManager = taskManager; - ItemMenuUseFunc func = GetItemFieldUseFunc(USE_ITEM_TASK_MENU, GetItemAttr(itemMenuUseData.itemId, ITEMATTR_FIELDUSEFUNC, HEAP_ID_FIELD)); + ItemMenuUseFunc func = GetItemFieldUseFunc(USE_ITEM_TASK_MENU, GetItemAttr(itemMenuUseData.itemId, ITEMATTR_FIELDUSEFUNC, HEAP_ID_FIELD)); func(&itemMenuUseData, &startMenu->itemCheckUseData); break; } @@ -1066,29 +1066,29 @@ static BOOL Task_StartMenu_HandleReturn(TaskManager *taskManager) { memset(partyMenuArgs, 0, sizeof(PartyMenuArgs)); sub_0203CF74(partyMenuArgs, fieldSystem, startMenu); partyMenuArgs->context = PARTY_MENU_CONTEXT_9; - partyMenuArgs->itemId = BagView_GetItemId(bagView); + partyMenuArgs->itemId = BagView_GetItemId(bagView); FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, partyMenuArgs); startMenu->atexit_TaskEnv = partyMenuArgs; StartMenu_SetChildProcReturnTaskFunc(startMenu, Task_StartMenu_HandleReturn_Pokemon); break; } case 4: { - Party *party = SaveArray_Party_Get(fieldSystem->saveData); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); StartMenuAfterEvoPartySlotBak *unk = startMenu->atexit_TaskEnv2; - int monSlot = unk->partySlot; - u16 itemId = BagView_GetItemId(bagView); - Pokemon *pokemon = Party_GetMonByIndex(party, monSlot); + int monSlot = unk->partySlot; + u16 itemId = BagView_GetItemId(bagView); + Pokemon *pokemon = Party_GetMonByIndex(party, monSlot); FreeToHeap(startMenu->atexit_TaskEnv2); if (ItemIdIsMail(itemId) == TRUE && !GetMonData(pokemon, MON_DATA_HELD_ITEM, NULL)) { - startMenu->atexit_TaskEnv = sub_0203EFEC(fieldSystem, 2, monSlot, ItemToMailId(itemId), HEAP_ID_FIELD); + startMenu->atexit_TaskEnv = sub_0203EFEC(fieldSystem, 2, monSlot, ItemToMailId(itemId), HEAP_ID_FIELD); startMenu->atexit_TaskEnv2 = sub_0203D818(itemId, 0, monSlot); StartMenu_SetChildProcReturnTaskFunc(startMenu, Task_ReturnToMenuFromMail); } else { PartyMenuArgs *partyMenuArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); memset(partyMenuArgs, 0, sizeof(PartyMenuArgs)); sub_0203CF74(partyMenuArgs, fieldSystem, startMenu); - partyMenuArgs->party = party; - partyMenuArgs->itemId = BagView_GetItemId(bagView); + partyMenuArgs->party = party; + partyMenuArgs->itemId = BagView_GetItemId(bagView); partyMenuArgs->partySlot = monSlot; if (partyMenuArgs->itemId == ITEM_NONE) { partyMenuArgs->context = PARTY_MENU_CONTEXT_0; @@ -1117,15 +1117,15 @@ static BOOL Task_StartMenu_HandleSelection_TrainerCard(TaskManager *taskManager) ov01_021E636C(0); startMenu->atexit_TaskFunc = sub_0203D1CC; - startMenu->state = START_MENU_STATE_WAIT_FADE; + startMenu->state = START_MENU_STATE_WAIT_FADE; return TRUE; } static BOOL sub_0203D1CC(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - startMenu->atexit_TaskEnv = sub_020691C4(HEAP_ID_FIELD); + startMenu->atexit_TaskEnv = sub_020691C4(HEAP_ID_FIELD); TrainerCardAppArgs *trainerCard = startMenu->atexit_TaskEnv; sub_02068FC8(1, 1, 0, 255, fieldSystem, trainerCard); TrainerCard_LaunchApp(fieldSystem, trainerCard); @@ -1134,7 +1134,7 @@ static BOOL sub_0203D1CC(TaskManager *taskManager) { } static BOOL sub_0203D218(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); sub_020691E0(startMenu->atexit_TaskEnv); @@ -1145,7 +1145,7 @@ static BOOL sub_0203D218(TaskManager *taskManager) { static BOOL Task_StartMenu_HandleSelection_Save(TaskManager *taskManager) { StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); ov01_021F6A9C(fieldSystem, 1, NULL); startMenu->state = START_MENU_STATE_SAVE; @@ -1153,7 +1153,7 @@ static BOOL Task_StartMenu_HandleSelection_Save(TaskManager *taskManager) { } static void sub_0203D264(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); if (ov01_021F6B00(fieldSystem) == TRUE) { @@ -1162,13 +1162,13 @@ static void sub_0203D264(TaskManager *taskManager) { } static void sub_0203D288(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); if (!ov01_021F6B00(fieldSystem) && ov01_021F6B10(fieldSystem) == TRUE) { if (fieldSystem->lastTouchMenuInput == 1) { fieldSystem->lastTouchMenuInput = 0; - startMenu->state = START_MENU_STATE_CLOSE; + startMenu->state = START_MENU_STATE_CLOSE; } else { startMenu->state = START_MENU_STATE_HANDLE_INPUT; } @@ -1177,7 +1177,7 @@ static void sub_0203D288(TaskManager *taskManager) { static BOOL sub_0203D2CC(TaskManager *taskManager) { StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); ov01_021F6A9C(fieldSystem, 8, NULL); startMenu->state = START_MENU_STATE_19; @@ -1186,13 +1186,13 @@ static BOOL sub_0203D2CC(TaskManager *taskManager) { static void sub_0203D2EC(TaskManager *taskManager) { StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); startMenu->state = START_MENU_STATE_20; } static void sub_0203D304(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); startMenu->state = START_MENU_STATE_CLOSE; @@ -1203,21 +1203,21 @@ static BOOL Task_StartMenu_HandleSelection_Options(TaskManager *taskManager) { ov01_021E636C(0); startMenu->atexit_TaskFunc = Task_StartMenu_Options; - startMenu->state = START_MENU_STATE_WAIT_FADE; + startMenu->state = START_MENU_STATE_WAIT_FADE; return TRUE; } static BOOL Task_StartMenu_Options(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - startMenu->atexit_TaskEnv = OptionsMenu_LaunchApp(fieldSystem); + startMenu->atexit_TaskEnv = OptionsMenu_LaunchApp(fieldSystem); startMenu->atexit_TaskFunc = Task_StartMenu_HandleReturn_Options; return FALSE; } static BOOL Task_StartMenu_HandleReturn_Options(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); FreeToHeap(startMenu->atexit_TaskEnv); @@ -1231,12 +1231,12 @@ static BOOL Task_StartMenu_HandleSelection_RemovedEasyChatThing(TaskManager *tas ov01_021E636C(0); startMenu->atexit_TaskFunc = Task_StartMenu_RemovedEasyChatThing; - startMenu->state = START_MENU_STATE_WAIT_FADE; + startMenu->state = START_MENU_STATE_WAIT_FADE; return TRUE; } static BOOL Task_StartMenu_RemovedEasyChatThing(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); startMenu->atexit_TaskEnv = EasyChat_CreateArgs(2, 0, fieldSystem->saveData, &fieldSystem->menuInputState, HEAP_ID_FIELD); @@ -1249,7 +1249,7 @@ static BOOL Task_StartMenu_RemovedEasyChatThing(TaskManager *taskManager) { } static BOOL Task_StartMenu_HandleReturn_RemovedEasyChatThing(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); if (!sub_02090D48(startMenu->atexit_TaskEnv)) { @@ -1270,7 +1270,7 @@ static BOOL Task_StartMenu_HandleReturn_RemovedEasyChatThing(TaskManager *taskMa } static BOOL Task_StartMenu_HandleSelection_Retire(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); sub_0203C38C(startMenu, fieldSystem); @@ -1291,21 +1291,21 @@ static BOOL Task_StartMenu_HandleSelection_Pokegear(TaskManager *taskManager) { ov01_021E636C(0); startMenu->atexit_TaskFunc = Task_StartMenu_Pokegear; - startMenu->state = START_MENU_STATE_WAIT_FADE; + startMenu->state = START_MENU_STATE_WAIT_FADE; return TRUE; } static BOOL Task_StartMenu_Pokegear(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); - startMenu->atexit_TaskEnv = PokegearPhone_LaunchApp(fieldSystem); + startMenu->atexit_TaskEnv = PokegearPhone_LaunchApp(fieldSystem); startMenu->atexit_TaskFunc = Task_StartMenu_HandleReturn_Pokegear; return FALSE; } static BOOL Task_StartMenu_HandleReturn_Pokegear(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); sub_020505C0(fieldSystem); @@ -1317,7 +1317,7 @@ static BOOL Task_StartMenu_HandleReturn_Pokegear(TaskManager *taskManager) { } static BOOL sub_0203D580(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); PokemonSummaryArgs *summaryArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PokemonSummaryArgs)); @@ -1325,17 +1325,17 @@ static BOOL sub_0203D580(TaskManager *taskManager) { FreeToHeap(startMenu->atexit_TaskEnv); if (summaryArgs->unk12 == 2) { PartyMenuArgs *partyMenuArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); - UnkStruct_0203D580 *r7 = startMenu->atexit_TaskEnv2; + UnkStruct_0203D580 *r7 = startMenu->atexit_TaskEnv2; sub_0203CF74(partyMenuArgs, fieldSystem, startMenu); - partyMenuArgs->itemId = r7->itemId; - partyMenuArgs->partySlot = summaryArgs->partySlot; - partyMenuArgs->moveId = summaryArgs->moveToLearn; + partyMenuArgs->itemId = r7->itemId; + partyMenuArgs->partySlot = summaryArgs->partySlot; + partyMenuArgs->moveId = summaryArgs->moveToLearn; partyMenuArgs->selectedMoveIdx = summaryArgs->unk16; if (r7->itemId != ITEM_NONE) { - partyMenuArgs->context = PARTY_MENU_CONTEXT_REPLACE_MOVE_TMHM; + partyMenuArgs->context = PARTY_MENU_CONTEXT_REPLACE_MOVE_TMHM; partyMenuArgs->levelUpMoveSearchState = 0; } else { - partyMenuArgs->context = PARTY_MENU_CONTEXT_REPLACE_MOVE_LEVELUP; + partyMenuArgs->context = PARTY_MENU_CONTEXT_REPLACE_MOVE_LEVELUP; partyMenuArgs->levelUpMoveSearchState = r7->unk_2; } partyMenuArgs->menuInputStatePtr = &fieldSystem->menuInputState; @@ -1352,7 +1352,7 @@ static BOOL sub_0203D580(TaskManager *taskManager) { } static void sub_0203D664(TaskManager *taskManager, int a1) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); Bag *bag = Save_Bag_Get(fieldSystem->saveData); @@ -1365,7 +1365,7 @@ static void sub_0203D664(TaskManager *taskManager, int a1) { } static BOOL sub_0203D6C8(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); BagCursor_Field_PocketSetPosition(fieldSystem->bagCursor, POCKET_BERRIES, 0, 0); @@ -1376,7 +1376,7 @@ static BOOL sub_0203D6C8(TaskManager *taskManager) { } BOOL Task_ReturnToMenuFromAppItem(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); FreeToHeapExplicit(HEAP_ID_FIELD, startMenu->atexit_TaskEnv); @@ -1386,11 +1386,11 @@ BOOL Task_ReturnToMenuFromAppItem(TaskManager *taskManager) { } BOOL Task_UseFlyInField(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); FlyTaskStruct *flyMap = startMenu->atexit_TaskEnv2; - int partySlot = flyMap->partySlot; + int partySlot = flyMap->partySlot; FreeToHeapExplicit(HEAP_ID_FIELD, flyMap); PokegearArgs *pokegearArgs = startMenu->atexit_TaskEnv; if (!pokegearArgs->unk_14) { @@ -1398,27 +1398,27 @@ BOOL Task_UseFlyInField(TaskManager *taskManager) { startMenu->atexit_TaskEnv = PartyMenu_LaunchApp_Unk1(fieldSystem, &startMenu->fieldMoveCheckData, partySlot); StartMenu_SetChildProcReturnTaskFunc(startMenu, Task_StartMenu_HandleReturn_Pokemon); } else { - Pokemon *pokemon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), partySlot); + Pokemon *pokemon = Party_GetMonByIndex(SaveArray_Party_Get(fieldSystem->saveData), partySlot); struct UnkStruct_02067BF8 *r5 = sub_02067BF8(HEAP_ID_FIELD, fieldSystem, pokemon, partySlot, pokegearArgs->unk_20, pokegearArgs->mapCursorX * 32 + 0x10, pokegearArgs->mapCursorY * 32 + 0x10); FreeToHeapExplicit(HEAP_ID_FIELD, startMenu->atexit_TaskEnv); sub_020505C0(fieldSystem); startMenu->atexit_TaskFunc = sub_02067C30; - startMenu->atexit_TaskEnv = r5; - startMenu->state = START_MENU_STATE_12; + startMenu->atexit_TaskEnv = r5; + startMenu->state = START_MENU_STATE_12; } return FALSE; } UnkStruct_0203D818 *sub_0203D818(u16 itemId, u8 kind, u8 partySlot) { UnkStruct_0203D818 *ret = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0203D818)); - ret->itemId = itemId; - ret->partySlot = partySlot; - ret->kind = kind; + ret->itemId = itemId; + ret->partySlot = partySlot; + ret->kind = kind; return ret; } BOOL Task_ReturnToMenuFromMail(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); UnkStruct_0203D818 *unk = startMenu->atexit_TaskEnv2; @@ -1457,12 +1457,12 @@ BOOL Task_ReturnToMenuFromMail(TaskManager *taskManager) { } static void sub_0203D940(FieldSystem *fieldSystem, StartMenuTaskData *startMenu, u8 a2) { - UnkStruct_0203D818 *unk = startMenu->atexit_TaskEnv2; + UnkStruct_0203D818 *unk = startMenu->atexit_TaskEnv2; PartyMenuArgs *partyMenuArgs = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); sub_0203CF74(partyMenuArgs, fieldSystem, startMenu); - partyMenuArgs->itemId = unk->itemId; + partyMenuArgs->itemId = unk->itemId; partyMenuArgs->partySlot = unk->partySlot; - partyMenuArgs->context = a2; + partyMenuArgs->context = a2; sub_02090F70(startMenu->atexit_TaskEnv, Party_GetMonByIndex(partyMenuArgs->party, unk->partySlot)); sub_02090F90(startMenu->atexit_TaskEnv); FieldSystem_LaunchApplication(fieldSystem, &gOverlayTemplate_PartyMenu, partyMenuArgs); @@ -1471,7 +1471,7 @@ static void sub_0203D940(FieldSystem *fieldSystem, StartMenuTaskData *startMenu, } BOOL Task_ReturnToMenuFromVSRecorder(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); startMenu->atexit_TaskEnv = sub_0203E3FC(fieldSystem, &startMenu->itemCheckUseData); @@ -1480,14 +1480,14 @@ BOOL Task_ReturnToMenuFromVSRecorder(TaskManager *taskManager) { } static void Task_StartMenu_Evolution(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); UnkStruct_0203CA9C_Case8 *unk = startMenu->atexit_TaskEnv; Sound_Stop(); CreateHeap(HEAP_ID_3, HEAP_ID_EVOLUTION, 0x30000); - Party *party = SaveArray_Party_Get(fieldSystem->saveData); + Party *party = SaveArray_Party_Get(fieldSystem->saveData); Pokemon *pokemon = Party_GetMonByIndex(party, unk->partySlot); EvolutionTaskData *evolution; if (unk->evoType == EVOCTX_LEVELUP) { @@ -1496,15 +1496,15 @@ static void Task_StartMenu_Evolution(TaskManager *taskManager) { evolution = sub_02075A7C(party, pokemon, unk->species, Save_PlayerData_GetOptionsAddr(fieldSystem->saveData), sub_02088288(fieldSystem->saveData), Save_Pokedex_Get(fieldSystem->saveData), Save_Bag_Get(fieldSystem->saveData), Save_GameStats_Get(fieldSystem->saveData), unk->evoMethod, FALSE, HEAP_ID_EVOLUTION); } StartMenuAfterEvoPartySlotBak *newEnv = AllocFromHeap(HEAP_ID_FIELD, sizeof(StartMenuAfterEvoPartySlotBak)); - newEnv->partySlot = unk->partySlot; - startMenu->atexit_TaskEnv2 = newEnv; + newEnv->partySlot = unk->partySlot; + startMenu->atexit_TaskEnv2 = newEnv; FreeToHeap(startMenu->atexit_TaskEnv); startMenu->atexit_TaskEnv = evolution; - startMenu->state = START_MENU_STATE_WAIT_EVOLUTION; + startMenu->state = START_MENU_STATE_WAIT_EVOLUTION; } static void Task_StartMenu_WaitEvolution(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); StartMenuTaskData *startMenu = (StartMenuTaskData *)TaskManager_GetEnvironment(taskManager); if (sub_02075D3C(startMenu->atexit_TaskEnv) == TRUE) { @@ -1513,7 +1513,7 @@ static void Task_StartMenu_WaitEvolution(TaskManager *taskManager) { StopBGM(SEQ_GS_SHINKA, 0); sub_02004AD8(0); sub_02055164(fieldSystem, fieldSystem->location->mapId); - startMenu->atexit_TaskEnv = sub_0203E3FC(fieldSystem, &startMenu->itemCheckUseData); + startMenu->atexit_TaskEnv = sub_0203E3FC(fieldSystem, &startMenu->itemCheckUseData); StartMenuAfterEvoPartySlotBak *unk = startMenu->atexit_TaskEnv2; sub_020778E0(startMenu->atexit_TaskEnv, unk->partySlot); FreeToHeap(startMenu->atexit_TaskEnv2); diff --git a/src/string_util.c b/src/string_util.c index c872955c7d..fb875c20ec 100644 --- a/src/string_util.c +++ b/src/string_util.c @@ -95,7 +95,7 @@ u16 *ConvertUIntToDecimalString(u16 *dest, u32 num, PrintingMode strconvmode, u3 dest++; } else if (digit != 0 || denom == 1) { strconvmode = PRINTING_MODE_LEADING_ZEROS; - *dest = (digit >= 10) ? CHAR_JP_QUESTION_MARK : _digit_strcode[digit]; + *dest = (digit >= 10) ? CHAR_JP_QUESTION_MARK : _digit_strcode[digit]; dest++; } else if (strconvmode == PRINTING_MODE_RIGHT_ALIGN) { *dest = CHAR_JP_SPACE; diff --git a/src/sys_task.c b/src/sys_task.c index be6378055c..771c9523c2 100644 --- a/src/sys_task.c +++ b/src/sys_task.c @@ -12,9 +12,9 @@ SysTask *SysTaskQueue_InsertTaskCore(SysTaskQueue *queue, SysTaskFunc func, void void SysTaskQueue_InitTask(SysTaskQueue *queue, SysTask *task) { task->queue = queue; task->prev = task->next = &queue->headSentinel; - task->priority = 0; - task->data = NULL; - task->func = NULL; + task->priority = 0; + task->data = NULL; + task->func = NULL; } void SysTaskQueue_InitStack(SysTaskQueue *queue) { @@ -40,9 +40,9 @@ BOOL SysTaskQueue_DeleteTask(SysTaskQueue *queue, SysTask *task) { } task->queue = queue; task->prev = task->next = &queue->headSentinel; - task->priority = 0; - task->data = NULL; - task->func = NULL; + task->priority = 0; + task->data = NULL; + task->func = NULL; --queue->activeCount; queue->taskStack[queue->activeCount] = task; return TRUE; @@ -55,13 +55,13 @@ u32 SysTaskQueue_GetArenaSize(u32 num) { SysTaskQueue *SysTaskQueue_PlacementNew(u32 num, void *p_mem) { GF_ASSERT(p_mem != NULL); - SysTaskQueue *ret = (SysTaskQueue *)p_mem; - SysTask **taskStack = (SysTask **)&ret[1]; - ret->taskStack = taskStack; - SysTask *taskList = (SysTask *)&taskStack[num]; - ret->taskList = taskList; - ret->limit = num; - ret->activeCount = 0; + SysTaskQueue *ret = (SysTaskQueue *)p_mem; + SysTask **taskStack = (SysTask **)&ret[1]; + ret->taskStack = taskStack; + SysTask *taskList = (SysTask *)&taskStack[num]; + ret->taskList = taskList; + ret->limit = num; + ret->activeCount = 0; ret->isInsertingTask = 0; SysTaskQueue_Init(ret); return ret; @@ -71,10 +71,10 @@ void SysTaskQueue_Init(SysTaskQueue *queue) { SysTaskQueue_InitStack(queue); queue->headSentinel.queue = queue; queue->headSentinel.prev = queue->headSentinel.next = &queue->headSentinel; - queue->headSentinel.priority = 0; - queue->headSentinel.data = NULL; - queue->headSentinel.func = NULL; - queue->runningTask = queue->headSentinel.next; + queue->headSentinel.priority = 0; + queue->headSentinel.data = NULL; + queue->headSentinel.func = NULL; + queue->runningTask = queue->headSentinel.next; } void SysTaskQueue_RunTasks(SysTaskQueue *queue) { @@ -97,7 +97,7 @@ void SysTaskQueue_RunTasks(SysTaskQueue *queue) { SysTask *SysTaskQueue_InsertTask(SysTaskQueue *queue, SysTaskFunc func, void *data, u32 priority) { queue->isInsertingTask = TRUE; - SysTask *ret = SysTaskQueue_InsertTaskCore(queue, func, data, priority); + SysTask *ret = SysTaskQueue_InsertTaskCore(queue, func, data, priority); queue->isInsertingTask = FALSE; return ret; } @@ -109,8 +109,8 @@ SysTask *SysTaskQueue_InsertTaskCore(SysTaskQueue *queue, SysTaskFunc func, void return NULL; } ret->priority = priority; - ret->data = data; - ret->func = func; + ret->data = data; + ret->func = func; if (queue->runningTask->func != NULL) { if (queue->runningTask->priority <= priority) { @@ -123,10 +123,10 @@ SysTask *SysTaskQueue_InsertTaskCore(SysTaskQueue *queue, SysTaskFunc func, void } for (tail = queue->headSentinel.next; tail != &queue->headSentinel; tail = tail->next) { if (tail->priority > ret->priority) { - ret->prev = tail->prev; - ret->next = tail; + ret->prev = tail->prev; + ret->next = tail; tail->prev->next = ret; - tail->prev = ret; + tail->prev = ret; if (tail == queue->nextTask) { queue->nextTask = ret; } @@ -136,10 +136,10 @@ SysTask *SysTaskQueue_InsertTaskCore(SysTaskQueue *queue, SysTaskFunc func, void if (queue->nextTask == &queue->headSentinel) { queue->nextTask = ret; } - ret->prev = queue->headSentinel.prev; - ret->next = &queue->headSentinel; + ret->prev = queue->headSentinel.prev; + ret->next = &queue->headSentinel; queue->headSentinel.prev->next = ret; - queue->headSentinel.prev = ret; + queue->headSentinel.prev = ret; return ret; } diff --git a/src/sys_vars.c b/src/sys_vars.c index 900b4451f3..704090f1aa 100644 --- a/src/sys_vars.c +++ b/src/sys_vars.c @@ -173,9 +173,9 @@ void Save_VarsFlags_RollLotoId(SaveVarsFlags *state) { void Save_LCRNGAdvanceLotoID(SaveData *saveData, u16 var) { #pragma unused(var) - SaveVarsFlags *state = Save_VarsFlags_Get(saveData); + SaveVarsFlags *state = Save_VarsFlags_Get(saveData); SAV_FRIEND_GRP *friend_groups = Save_FriendGroup_Get(saveData); - u32 rand_id = sub_0202C7DC(friend_groups) * 1103515245 + 12345; + u32 rand_id = sub_0202C7DC(friend_groups) * 1103515245 + 12345; Save_VarsFlags_SetLotoId(state, rand_id); } @@ -190,13 +190,13 @@ void Save_VarsFlags_SetVar4041(SaveVarsFlags *state, u16 value) { void sub_02066D60(SaveData *saveData) { SaveVarsFlags *state = Save_VarsFlags_Get(saveData); - u32 rand = LCRandom() % 98; + u32 rand = LCRandom() % 98; Save_VarsFlags_SetVar4041(state, rand + 2); } void sub_02066D80(SaveVarsFlags *state) { - u16 var = GetScriptVar(state, VAR_UNK_4042); + u16 var = GetScriptVar(state, VAR_UNK_4042); u16 unk_value = 10000; if (var < 10000) { unk_value = var + 1; @@ -267,7 +267,7 @@ void Save_VarsFlags_SetVar4057(SaveVarsFlags *state, u16 value) { } void Save_VarsFlags_UpdateBuenasPasswordSet(SaveVarsFlags *state) { - u16 set = GetScriptVar(state, VAR_BUENAS_PASSWORD_SET); + u16 set = GetScriptVar(state, VAR_BUENAS_PASSWORD_SET); u16 new_set = LCRandom() % 30; if (set == new_set) { diff --git a/src/system.c b/src/system.c index 8c4f55751d..3416320a4e 100644 --- a/src/system.c +++ b/src/system.c @@ -36,25 +36,25 @@ void sub_0201A0E0(void) { } void Main_SetVBlankIntrCB(GFIntrCB cb, void *arg) { - gSystem.vBlankIntr = cb; + gSystem.vBlankIntr = cb; gSystem.vBlankIntrArg = arg; } void HBlankInterruptDisable(void) { HBlankIntrRegsToggle(FALSE); - gSystem.hBlankIntr = NULL; + gSystem.hBlankIntr = NULL; gSystem.hBlankIntrArg = NULL; } BOOL Main_SetHBlankIntrCB(GFIntrCB cb, void *arg) { if (cb == NULL) { HBlankIntrRegsToggle(FALSE); - gSystem.hBlankIntr = NULL; + gSystem.hBlankIntr = NULL; gSystem.hBlankIntrArg = NULL; return TRUE; } else if (gSystem.hBlankIntr == NULL) { gSystem.hBlankIntrArg = arg; - gSystem.hBlankIntr = cb; + gSystem.hBlankIntr = cb; HBlankIntrRegsToggle(TRUE); return TRUE; } else { @@ -120,10 +120,10 @@ void InitSystemForTheGame(void) { GX_Init(); OS_InitTick(); sub_0201A1B4(); - gSystem.mainTaskQueue = SysTaskQueue_PlacementNew(160, OS_AllocFromArenaLo(OS_ARENA_MAIN, SysTaskQueue_GetArenaSize(160), 4)); + gSystem.mainTaskQueue = SysTaskQueue_PlacementNew(160, OS_AllocFromArenaLo(OS_ARENA_MAIN, SysTaskQueue_GetArenaSize(160), 4)); gSystem.vblankTaskQueue = SysTaskQueue_PlacementNew(32, OS_AllocFromArenaLo(OS_ARENA_MAIN, SysTaskQueue_GetArenaSize(32), 4)); - gSystem.vwaitTaskQueue = SysTaskQueue_PlacementNew(32, OS_AllocFromArenaLo(OS_ARENA_MAIN, SysTaskQueue_GetArenaSize(32), 4)); - gSystem.printTaskQueue = SysTaskQueue_PlacementNew(4, OS_AllocFromArenaLo(OS_ARENA_MAIN, SysTaskQueue_GetArenaSize(4), 4)); + gSystem.vwaitTaskQueue = SysTaskQueue_PlacementNew(32, OS_AllocFromArenaLo(OS_ARENA_MAIN, SysTaskQueue_GetArenaSize(32), 4)); + gSystem.printTaskQueue = SysTaskQueue_PlacementNew(4, OS_AllocFromArenaLo(OS_ARENA_MAIN, SysTaskQueue_GetArenaSize(4), 4)); GX_DispOff(); GXS_DispOff(); GX_SetDispSelect(GX_DISP_SELECT_MAIN_SUB); @@ -135,15 +135,15 @@ void InitSystemForTheGame(void) { FS_Init(1); sub_02027010(); table_size = FS_TryLoadTable(NULL, 0); - fsTable = OS_AllocFromArenaLo(OS_ARENA_MAIN, table_size, 4); + fsTable = OS_AllocFromArenaLo(OS_ARENA_MAIN, table_size, 4); GF_ASSERT(fsTable != NULL); FS_TryLoadTable(fsTable, table_size); - gSystem.vBlankIntr = NULL; - gSystem.hBlankIntr = NULL; - gSystem.unk10 = NULL; - gSystem.unk14 = NULL; - gSystem.unk74 = NULL; - gSystem.vblankCounter = 0; + gSystem.vBlankIntr = NULL; + gSystem.hBlankIntr = NULL; + gSystem.unk10 = NULL; + gSystem.unk14 = NULL; + gSystem.unk74 = NULL; + gSystem.vblankCounter = 0; gSystem.screensFlipped = 0; CARD_SetCacheFlushThreshold(0x500, 0x2400); GF_CRC16Init(HEAP_ID_DEFAULT); @@ -167,7 +167,7 @@ void *Sys_AllocAndReadFile(HeapID heapId, const char *path) { FS_InitFile(&file); if (FS_OpenFile(&file, path)) { size = FS_GetLength(&file); - ret = AllocFromHeap(heapId, size); + ret = AllocFromHeap(heapId, size); if (ret != NULL) { if (FS_ReadFile(&file, ret, size) != size) { FreeToHeapExplicit(heapId, ret); @@ -208,21 +208,21 @@ void sub_0201A430(void) { void InitKeypadAndTouchpad(void) { TPCalibrateParam tp_calibrate; - gSystem.buttonMode = 0; - gSystem.heldKeysRaw = 0; - gSystem.newKeysRaw = 0; - gSystem.newAndRepeatedKeysRaw = 0; - gSystem.heldKeys = 0; - gSystem.newKeys = 0; - gSystem.newAndRepeatedKeys = 0; - gSystem.keyRepeatCounter = 0; + gSystem.buttonMode = 0; + gSystem.heldKeysRaw = 0; + gSystem.newKeysRaw = 0; + gSystem.newAndRepeatedKeysRaw = 0; + gSystem.heldKeys = 0; + gSystem.newKeys = 0; + gSystem.newAndRepeatedKeys = 0; + gSystem.keyRepeatCounter = 0; gSystem.keyRepeatContinueDelay = 4; - gSystem.keyRepeatStartDelay = 8; - gSystem.touchX = 0; - gSystem.touchY = 0; - gSystem.touchNew = 0; - gSystem.touchHeld = 0; - gSystem.touchpadReadAuto = FALSE; + gSystem.keyRepeatStartDelay = 8; + gSystem.touchX = 0; + gSystem.touchY = 0; + gSystem.touchNew = 0; + gSystem.touchHeld = 0; + gSystem.touchpadReadAuto = FALSE; TP_Init(); GF_TouchpadInit(); if (TP_GetUserInfo(&tp_calibrate) == TRUE) { @@ -246,30 +246,30 @@ void ReadKeypadAndTouchpad(void) { TPData rawTpData, calibTpData; int raw; if (PAD_DetectFold()) { - gSystem.newKeys = 0; - gSystem.heldKeys = 0; + gSystem.newKeys = 0; + gSystem.heldKeys = 0; gSystem.newAndRepeatedKeys = 0; - gSystem.touchNew = 0; - gSystem.touchHeld = 0; + gSystem.touchNew = 0; + gSystem.touchHeld = 0; return; } - raw = PAD_Read() | gSystem.simulatedInputs; - gSystem.simulatedInputs = 0; - gSystem.newKeysRaw = raw & (raw ^ gSystem.heldKeysRaw); + raw = PAD_Read() | gSystem.simulatedInputs; + gSystem.simulatedInputs = 0; + gSystem.newKeysRaw = raw & (raw ^ gSystem.heldKeysRaw); gSystem.newAndRepeatedKeysRaw = raw & (raw ^ gSystem.heldKeysRaw); if (raw != 0 && gSystem.heldKeysRaw == raw) { gSystem.keyRepeatCounter--; if (gSystem.keyRepeatCounter == 0) { gSystem.newAndRepeatedKeysRaw = raw; - gSystem.keyRepeatCounter = gSystem.keyRepeatContinueDelay; + gSystem.keyRepeatCounter = gSystem.keyRepeatContinueDelay; } } else { gSystem.keyRepeatCounter = gSystem.keyRepeatStartDelay; } - gSystem.heldKeysRaw = raw; - gSystem.newKeys = gSystem.newKeysRaw; - gSystem.heldKeys = gSystem.heldKeysRaw; + gSystem.heldKeysRaw = raw; + gSystem.newKeys = gSystem.newKeysRaw; + gSystem.heldKeys = gSystem.heldKeysRaw; gSystem.newAndRepeatedKeys = gSystem.newAndRepeatedKeysRaw; sub_0201A5E8(); if (!gSystem.touchpadReadAuto) { @@ -299,7 +299,7 @@ void ReadKeypadAndTouchpad(void) { calibTpData.touch = TP_TOUCH_OFF; } } - gSystem.touchNew = calibTpData.touch & (calibTpData.touch ^ gSystem.touchHeld); + gSystem.touchNew = calibTpData.touch & (calibTpData.touch ^ gSystem.touchHeld); gSystem.touchHeld = calibTpData.touch; } @@ -355,7 +355,7 @@ void sub_0201A5E8(void) { void SetKeyRepeatTimers(int cont, int start) { gSystem.keyRepeatContinueDelay = cont; - gSystem.keyRepeatStartDelay = start; + gSystem.keyRepeatStartDelay = start; } void sub_0201A728(int a0) { @@ -368,7 +368,7 @@ void sub_0201A738(int a0) { void sub_0201A748(HeapID heapId) { GF_ASSERT(gSystem.unk74 == NULL); - gSystem.unk74 = AllocFromHeapAtEnd(heapId, sizeof(u32)); + gSystem.unk74 = AllocFromHeapAtEnd(heapId, sizeof(u32)); *gSystem.unk74 = 0x2F93A1BC; } diff --git a/src/task.c b/src/task.c index 1d97f116c7..c9708f6dd1 100644 --- a/src/task.c +++ b/src/task.c @@ -5,30 +5,30 @@ static TaskManager *Task_New(FieldSystem *fieldSystem, TaskFunc taskFunc, void *env) { TaskManager *taskman; - taskman = AllocFromHeapAtEnd((HeapID)32, sizeof(TaskManager)); - taskman->prev = NULL; - taskman->func = taskFunc; - taskman->state = 0; - taskman->env = env; - taskman->unk10 = 0; - taskman->unk14 = NULL; + taskman = AllocFromHeapAtEnd((HeapID)32, sizeof(TaskManager)); + taskman->prev = NULL; + taskman->func = taskFunc; + taskman->state = 0; + taskman->env = env; + taskman->unk10 = 0; + taskman->unk14 = NULL; taskman->fieldSystem = fieldSystem; - taskman->unk1C = AllocFromHeapAtEnd((HeapID)32, sizeof(TaskManagerUnkSub1C)); + taskman->unk1C = AllocFromHeapAtEnd((HeapID)32, sizeof(TaskManagerUnkSub1C)); return taskman; } TaskManager *FieldSystem_CreateTask(FieldSystem *fieldSystem, TaskFunc taskFunc, void *env) { TaskManager *ret; GF_ASSERT(fieldSystem->taskman == NULL); - ret = Task_New(fieldSystem, taskFunc, env); + ret = Task_New(fieldSystem, taskFunc, env); fieldSystem->taskman = ret; return ret; } void TaskManager_Jump(TaskManager *taskman, TaskFunc taskFunc, void *env) { - taskman->func = taskFunc; + taskman->func = taskFunc; taskman->state = 0; - taskman->env = env; + taskman->env = env; if (taskman->unk14 != NULL || taskman->unk14 != NULL) { FreeToHeap(taskman->unk14); taskman->unk10 = 0; @@ -41,8 +41,8 @@ void TaskManager_Jump(TaskManager *taskman, TaskFunc taskFunc, void *env) { void TaskManager_Call(TaskManager *taskman, TaskFunc taskFunc, void *env) { TaskManager *newman; - newman = Task_New(taskman->fieldSystem, taskFunc, env); - newman->prev = taskman; + newman = Task_New(taskman->fieldSystem, taskFunc, env); + newman->prev = taskman; taskman->fieldSystem->taskman = newman; } @@ -88,7 +88,7 @@ static BOOL Task_RunApplicationUntilComplete(TaskManager *taskManager) { struct UnkTaskEnv *env; fieldSystem = TaskManager_GetFieldSystem(taskManager); - env = TaskManager_GetEnvironment(taskManager); + env = TaskManager_GetEnvironment(taskManager); switch (env->state) { case 0: @@ -108,10 +108,10 @@ static BOOL Task_RunApplicationUntilComplete(TaskManager *taskManager) { void CallApplicationAsTask(TaskManager *taskManager, const OVY_MGR_TEMPLATE *template, void *work) { struct UnkTaskEnv *env; - env = AllocFromHeapAtEnd((HeapID)32, sizeof(struct UnkTaskEnv)); - env->state = 0; + env = AllocFromHeapAtEnd((HeapID)32, sizeof(struct UnkTaskEnv)); + env->state = 0; env->template = template; - env->work = work; + env->work = work; TaskManager_Call(taskManager, Task_RunApplicationUntilComplete, env); } diff --git a/src/text.c b/src/text.c index 7a2565fd22..289b05866c 100644 --- a/src/text.c +++ b/src/text.c @@ -81,21 +81,21 @@ u8 AddTextPrinterParameterized(Window *window, FontID fontId, String *string, u3 TextPrinterTemplate template; template.currentChar.wrapped = string; - template.window = window; - template.fontId = fontId; - template.x = x; - template.y = y; - template.currentX = x; - template.currentY = y; - template.letterSpacing = sFonts[fontId].letterSpacing; - template.lineSpacing = sFonts[fontId].lineSpacing; - template.unk14 = sFonts[fontId].unk; - template.fgColor = sFonts[fontId].fgColor; - template.bgColor = sFonts[fontId].bgColor; - template.shadowColor = sFonts[fontId].shadowColor; - template.glyphTable = 0; - template.unk1A = 0; - template.unk1B = 0xFF; + template.window = window; + template.fontId = fontId; + template.x = x; + template.y = y; + template.currentX = x; + template.currentY = y; + template.letterSpacing = sFonts[fontId].letterSpacing; + template.lineSpacing = sFonts[fontId].lineSpacing; + template.unk14 = sFonts[fontId].unk; + template.fgColor = sFonts[fontId].fgColor; + template.bgColor = sFonts[fontId].bgColor; + template.shadowColor = sFonts[fontId].shadowColor; + template.glyphTable = 0; + template.unk1A = 0; + template.unk1B = 0xFF; return AddTextPrinter(&template, textSpeed, callback); } @@ -104,21 +104,21 @@ u8 AddTextPrinterParameterizedWithColor(Window *window, FontID fontId, String *s TextPrinterTemplate template; template.currentChar.wrapped = string; - template.window = window; - template.fontId = fontId; - template.x = x; - template.y = y; - template.currentX = x; - template.currentY = y; - template.letterSpacing = sFonts[fontId].letterSpacing; - template.lineSpacing = sFonts[fontId].lineSpacing; - template.unk14 = sFonts[fontId].unk; - template.fgColor = (color >> 16) & 0xFF; - template.shadowColor = (color >> 8) & 0xFF; - template.bgColor = (color >> 0) & 0xFF; - template.glyphTable = 0; - template.unk1A = 0; - template.unk1B = 0xFF; + template.window = window; + template.fontId = fontId; + template.x = x; + template.y = y; + template.currentX = x; + template.currentY = y; + template.letterSpacing = sFonts[fontId].letterSpacing; + template.lineSpacing = sFonts[fontId].lineSpacing; + template.unk14 = sFonts[fontId].unk; + template.fgColor = (color >> 16) & 0xFF; + template.shadowColor = (color >> 8) & 0xFF; + template.bgColor = (color >> 0) & 0xFF; + template.glyphTable = 0; + template.unk1A = 0; + template.unk1B = 0xFF; return AddTextPrinter(&template, textSpeed, callback); } @@ -127,21 +127,21 @@ u8 AddTextPrinterParameterizedWithColorAndSpacing(Window *window, int fontId, St TextPrinterTemplate template; template.currentChar.wrapped = string; - template.window = window; - template.fontId = fontId; - template.x = x; - template.y = y; - template.currentX = x; - template.currentY = y; - template.letterSpacing = letterSpacing; - template.lineSpacing = lineSpacing; - template.unk14 = sFonts[fontId].unk; - template.fgColor = (color >> 16) & 0xFF; - template.shadowColor = (color >> 8) & 0xFF; - template.bgColor = (color >> 0) & 0xFF; - template.glyphTable = 0; - template.unk1A = 0; - template.unk1B = 0xFF; + template.window = window; + template.fontId = fontId; + template.x = x; + template.y = y; + template.currentX = x; + template.currentY = y; + template.letterSpacing = letterSpacing; + template.lineSpacing = lineSpacing; + template.unk14 = sFonts[fontId].unk; + template.fgColor = (color >> 16) & 0xFF; + template.shadowColor = (color >> 8) & 0xFF; + template.bgColor = (color >> 0) & 0xFF; + template.glyphTable = 0; + template.unk1A = 0; + template.unk1B = 0xFF; return AddTextPrinter(&template, textSpeed, callback); } @@ -151,34 +151,34 @@ static u8 AddTextPrinter(TextPrinterTemplate *template, u32 speed, PrinterCallba return 0xFF; } - TextPrinter *printer = AllocFromHeap(HEAP_ID_DEFAULT, sizeof(TextPrinter)); - printer->active = TRUE; - printer->state = 0; + TextPrinter *printer = AllocFromHeap(HEAP_ID_DEFAULT, sizeof(TextPrinter)); + printer->active = TRUE; + printer->state = 0; printer->textSpeedBottom = speed; - printer->delayCounter = 0; - printer->scrollDistance = 0; - printer->unk2D = 0; + printer->delayCounter = 0; + printer->scrollDistance = 0; + printer->unk2D = 0; for (int i = 0; i < 7; i++) { printer->subStructFields[i] = 0; } - printer->template = *template; + printer->template = *template; printer->template.currentChar.raw = String_cstr(printer->template.currentChar.wrapped); - printer->callback = callback; - _021D1F6C = 0; + printer->callback = callback; + _021D1F6C = 0; sub_020204B8(printer); if (speed != TEXT_SPEED_NOTRANSFER && speed != TEXT_SPEED_INSTANT) { printer->textSpeedBottom--; printer->textSpeedTop = 1; - printer->id = CreateTextPrinterSysTask((SysTaskFunc)RunTextPrinter, printer, 1); + printer->id = CreateTextPrinterSysTask((SysTaskFunc)RunTextPrinter, printer, 1); return printer->id; } u32 i = 0; printer->textSpeedBottom = 0; - printer->textSpeedTop = 0; + printer->textSpeedTop = 0; GenerateFontHalfRowLookupTable(template->fgColor, template->bgColor, template->shadowColor); @@ -241,8 +241,8 @@ void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor) { colors[2] = shadowColor; colors[3] = bgColor; - sBgColor = bgColor; - sFgColor = fgColor; + sBgColor = bgColor; + sFgColor = fgColor; sShadowColor = shadowColor; u32 index = 0; @@ -259,23 +259,23 @@ void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor) { void DecompressGlyphTile(const u8 *src, u8 *dest) { const u16 *src16 = (u16 *)src; - u16 *dest16 = (u16 *)dest; - dest16[0] = sFontHalfRowLookupTable[(u32)src16[0] >> 8]; - dest16[1] = sFontHalfRowLookupTable[(u32)src16[0] & 0xFF]; - dest16[2] = sFontHalfRowLookupTable[(u32)src16[1] >> 8]; - dest16[3] = sFontHalfRowLookupTable[(u32)src16[1] & 0xFF]; - dest16[4] = sFontHalfRowLookupTable[(u32)src16[2] >> 8]; - dest16[5] = sFontHalfRowLookupTable[(u32)src16[2] & 0xFF]; - dest16[6] = sFontHalfRowLookupTable[(u32)src16[3] >> 8]; - dest16[7] = sFontHalfRowLookupTable[(u32)src16[3] & 0xFF]; - dest16[8] = sFontHalfRowLookupTable[(u32)src16[4] >> 8]; - dest16[9] = sFontHalfRowLookupTable[(u32)src16[4] & 0xFF]; - dest16[10] = sFontHalfRowLookupTable[(u32)src16[5] >> 8]; - dest16[11] = sFontHalfRowLookupTable[(u32)src16[5] & 0xFF]; - dest16[12] = sFontHalfRowLookupTable[(u32)src16[6] >> 8]; - dest16[13] = sFontHalfRowLookupTable[(u32)src16[6] & 0xFF]; - dest16[14] = sFontHalfRowLookupTable[(u32)src16[7] >> 8]; - dest16[15] = sFontHalfRowLookupTable[(u32)src16[7] & 0xFF]; + u16 *dest16 = (u16 *)dest; + dest16[0] = sFontHalfRowLookupTable[(u32)src16[0] >> 8]; + dest16[1] = sFontHalfRowLookupTable[(u32)src16[0] & 0xFF]; + dest16[2] = sFontHalfRowLookupTable[(u32)src16[1] >> 8]; + dest16[3] = sFontHalfRowLookupTable[(u32)src16[1] & 0xFF]; + dest16[4] = sFontHalfRowLookupTable[(u32)src16[2] >> 8]; + dest16[5] = sFontHalfRowLookupTable[(u32)src16[2] & 0xFF]; + dest16[6] = sFontHalfRowLookupTable[(u32)src16[3] >> 8]; + dest16[7] = sFontHalfRowLookupTable[(u32)src16[3] & 0xFF]; + dest16[8] = sFontHalfRowLookupTable[(u32)src16[4] >> 8]; + dest16[9] = sFontHalfRowLookupTable[(u32)src16[4] & 0xFF]; + dest16[10] = sFontHalfRowLookupTable[(u32)src16[5] >> 8]; + dest16[11] = sFontHalfRowLookupTable[(u32)src16[5] & 0xFF]; + dest16[12] = sFontHalfRowLookupTable[(u32)src16[6] >> 8]; + dest16[13] = sFontHalfRowLookupTable[(u32)src16[6] & 0xFF]; + dest16[14] = sFontHalfRowLookupTable[(u32)src16[7] >> 8]; + dest16[15] = sFontHalfRowLookupTable[(u32)src16[7] & 0xFF]; } static void sub_020204B8(TextPrinter *printer) { @@ -301,7 +301,7 @@ void RenderScreenFocusIndicatorTile(TextPrinter *printer, u32 unusedX, u32 unuse } u16 *startAddr = (void *)printer->unk30 + (fieldNum * (24 * 8 * sizeof(u16))); - u16 destX = (GetWindowWidth(window) - 3) * 8; + u16 destX = (GetWindowWidth(window) - 3) * 8; BlitBitmapRectToWindow(window, startAddr, 0, 0, 24, 32, destX, 0, 24, 32); } diff --git a/src/timer3.c b/src/timer3.c index 3a42acb97e..f930969bf5 100644 --- a/src/timer3.c +++ b/src/timer3.c @@ -34,7 +34,7 @@ u64 sub_02025488(void) { vu64 count_hi; OSIntrMode bak_psr; - bak_psr = OS_DisableInterrupts(); + bak_psr = OS_DisableInterrupts(); count_lo = *(REGType16 *)((u32)(REG_TM0CNT_L_ADDR + 4 * OS_TIMER_3)); count_hi = _021D2214 & 0x0000FFFFFFFFFFFFull; if ((OS_GetRequestIrqMask() & OS_IE_TIMER3) && !(count_lo & 0x8000)) { diff --git a/src/title_screen.c b/src/title_screen.c index 64e6752a1d..8b3a85dadd 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -120,11 +120,11 @@ static BOOL TitleScreen_Init(OVY_MANAGER *man, int *state) { CreateHeap(HEAP_ID_3, HEAP_ID_TITLE_SCREEN, 0x50000); TitleScreenOverlayData *data = OverlayManager_CreateAndGetData(man, sizeof(TitleScreenOverlayData), HEAP_ID_TITLE_SCREEN); memset(data, 0, sizeof(TitleScreenOverlayData)); - data->heapID = HEAP_ID_TITLE_SCREEN; - data->exitMode = TITLESCREEN_EXIT_UNSET; - data->timer = 0; + data->heapID = HEAP_ID_TITLE_SCREEN; + data->exitMode = TITLESCREEN_EXIT_UNSET; + data->timer = 0; data->needMasterBrightnessNeutral = FALSE; - data->animData.plttData = NULL; + data->animData.plttData = NULL; TitleScreen_SetGfxBanks(); TitleScreen_InitBgs(data); TitleScreen_Create3DVramMan(data); @@ -140,9 +140,9 @@ static BOOL TitleScreen_Main(OVY_MANAGER *man, int *state) { case TITLESCREEN_MAIN_WAIT_FADE: if (TitleScreenAnim_InitObjectsAndCamera(&data->animData, data->bgConfig, data->heapID) == TRUE) { data->animData.state = 0; - data->initialDelay = 30; - gSystem.unk70 = 0; - *state = (int)TITLESCREEN_MAIN_START_MUSIC; + data->initialDelay = 30; + gSystem.unk70 = 0; + *state = (int)TITLESCREEN_MAIN_START_MUSIC; } break; case TITLESCREEN_MAIN_START_MUSIC: @@ -176,7 +176,7 @@ static BOOL TitleScreen_Main(OVY_MANAGER *man, int *state) { *state = (int)TITLESCREEN_MAIN_FADEOUT; } else if (data->timer > TITLE_SCREEN_DURATION) { data->exitMode = TITLESCREEN_EXIT_TIMEOUT; - gSystem.unk70 = TRUE; + gSystem.unk70 = TRUE; GfGfx_EngineATogglePlanes(GX_PLANEMASK_BG3, GF_PLANE_TOGGLE_OFF); GF_SndStartFadeOutBGM(0, 60); *state = (int)TITLESCREEN_MAIN_PROCEED_NOFLASH; @@ -233,8 +233,8 @@ static BOOL TitleScreen_Main(OVY_MANAGER *man, int *state) { static BOOL TitleScreen_Exit(OVY_MANAGER *man, int *state) { TitleScreenOverlayData *data = OverlayManager_GetData(man); - HeapID heapID = data->heapID; - int exitMode = data->exitMode; + HeapID heapID = data->heapID; + int exitMode = data->exitMode; Main_SetVBlankIntrCB(NULL, NULL); TitleScreen_Delete3DVramMan(data); @@ -317,41 +317,41 @@ static void TitleScreen_Load3DObjects(TitleScreenAnimObject *animObj, int texFil if (nsbcaId > 0) { animObj->_3dResObjsArc[0] = AllocAndReadWholeNarcMemberByIdPair(NARC_demo_title_titledemo, nsbcaId, heapID); - pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[0], 0); - animObj->_3dAnmObjs[0] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); + pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[0], 0); + animObj->_3dAnmObjs[0] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); NNS_G3dAnmObjInit(animObj->_3dAnmObjs[0], pAnim, animObj->resModel, tex); NNS_G3dRenderObjAddAnmObj(&animObj->renderObj, animObj->_3dAnmObjs[0]); } if (nsbta > 0) { animObj->_3dResObjsArc[1] = AllocAndReadWholeNarcMemberByIdPair(NARC_demo_title_titledemo, nsbta, heapID); - pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[1], 0); - animObj->_3dAnmObjs[1] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); + pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[1], 0); + animObj->_3dAnmObjs[1] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); NNS_G3dAnmObjInit(animObj->_3dAnmObjs[1], pAnim, animObj->resModel, tex); NNS_G3dRenderObjAddAnmObj(&animObj->renderObj, animObj->_3dAnmObjs[1]); } if (nsbtp > 0) { animObj->_3dResObjsArc[2] = AllocAndReadWholeNarcMemberByIdPair(NARC_demo_title_titledemo, nsbtp, heapID); - pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[2], 0); - animObj->_3dAnmObjs[2] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); + pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[2], 0); + animObj->_3dAnmObjs[2] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); NNS_G3dAnmObjInit(animObj->_3dAnmObjs[2], pAnim, animObj->resModel, tex); NNS_G3dRenderObjAddAnmObj(&animObj->renderObj, animObj->_3dAnmObjs[2]); } if (nsbma > 0) { animObj->_3dResObjsArc[3] = AllocAndReadWholeNarcMemberByIdPair(NARC_demo_title_titledemo, nsbma, heapID); - pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[3], 0); - animObj->_3dAnmObjs[3] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); + pAnim = NNS_G3dGetAnmByIdx(animObj->_3dResObjsArc[3], 0); + animObj->_3dAnmObjs[3] = NNS_G3dAllocAnmObj(&animObj->allocator, pAnim, animObj->resModel); NNS_G3dAnmObjInit(animObj->_3dAnmObjs[3], pAnim, animObj->resModel, tex); NNS_G3dRenderObjAddAnmObj(&animObj->renderObj, animObj->_3dAnmObjs[3]); } - VecFx32 zero = { 0, 0, 0 }; + VecFx32 zero = { 0, 0, 0 }; animObj->translation = (VecFx32) { 30 * FX32_ONE, 95 * FX32_ONE, 0 }; - animObj->scale = (VecFx32) { FX32_ONE, FX32_ONE, FX32_ONE }; + animObj->scale = (VecFx32) { FX32_ONE, FX32_ONE, FX32_ONE }; animObj->rotationVec = zero; - animObj->subState = TITLESCREEN_MODELSUB_STOP; + animObj->subState = TITLESCREEN_MODELSUB_STOP; } static void TitleScreen_Unload3DObjects(TitleScreenAnimObject *animObj) { @@ -498,12 +498,12 @@ static BOOL TitleScreenAnim_InitObjectsAndCamera(TitleScreenAnimData *animData, } G3X_AntiAlias(TRUE); G3X_AlphaBlend(TRUE); - animData->cameraTarget.x = animData->cameraTargetStart.x; - animData->cameraTarget.y = animData->cameraTargetStart.y; - animData->cameraTarget.z = animData->cameraTargetStart.z; - animData->cameraPos.x = animData->cameraPosStart.x; - animData->cameraPos.y = animData->cameraPosStart.y; - animData->cameraPos.z = animData->cameraPosStart.z; + animData->cameraTarget.x = animData->cameraTargetStart.x; + animData->cameraTarget.y = animData->cameraTargetStart.y; + animData->cameraTarget.z = animData->cameraTargetStart.z; + animData->cameraPos.x = animData->cameraPosStart.x; + animData->cameraPos.y = animData->cameraPosStart.y; + animData->cameraPos.z = animData->cameraPosStart.z; animData->hooh_lugia.camera = Camera_New(heapID); Camera_Init_FromTargetAndPos(&animData->cameraTarget, &animData->cameraPos, 0xB60, 0, FALSE, animData->hooh_lugia.camera); Camera_SetPerspectiveClippingPlane(0, FX32_CONST(0.5), animData->hooh_lugia.camera); @@ -516,11 +516,11 @@ static BOOL TitleScreenAnim_InitObjectsAndCamera(TitleScreenAnimData *animData, G3X_AntiAlias(TRUE); gSystem.screensFlipped = TRUE; GfGfx_SwapDisplay(); - animData->hooh_lugia.state = TITLESCREEN_MODEL_RUN; - animData->sparkles.state = TITLESCREEN_MODEL_RUN; - animData->gameTitleDelayTimer = 0; + animData->hooh_lugia.state = TITLESCREEN_MODEL_RUN; + animData->sparkles.state = TITLESCREEN_MODEL_RUN; + animData->gameTitleDelayTimer = 0; animData->gameTitleFadeInTimer = 0; - animData->plttData = PaletteData_Init(HEAP_ID_TITLE_SCREEN); + animData->plttData = PaletteData_Init(HEAP_ID_TITLE_SCREEN); PaletteData_AllocBuffers(animData->plttData, PLTTBUF_SUB_BG, 0x200, HEAP_ID_TITLE_SCREEN); PaletteData_LoadPaletteSlotFromHardware(animData->plttData, PLTTBUF_SUB_BG, 0, 0x200); animData->glowState = 0; @@ -546,10 +546,10 @@ static BOOL TitleScreenAnim_Run(TitleScreenAnimData *animData, BgConfig *bgConfi SetBlendBrightness(0, (GXBlendPlaneMask)(GX_BLEND_PLANEMASK_BG0 | GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_BG2), SCREEN_MASK_SUB); G2S_SetBlendAlpha(4, 0x39, 0, 0x1F); animData->hooh_lugia.subState = TITLESCREEN_MODELSUB_RUN; - animData->sparkles.subState = TITLESCREEN_MODELSUB_RUN; + animData->sparkles.subState = TITLESCREEN_MODELSUB_RUN; NNS_G3dGlbLightColor(GX_LIGHTID_1, RGB_WHITE); animData->startInstructionFlashTimer = 0; - animData->state = TITLESCREEN_ANIM_RUN; + animData->state = TITLESCREEN_ANIM_RUN; break; case TITLESCREEN_ANIM_RUN: if (animData->enableStartInstructionFlash == TRUE) { @@ -632,7 +632,7 @@ static void TitleScreenAnim_Load2dBgGfx(BgConfig *bgConfig, HeapID heapID, Title BG_ClearCharDataRange(GF_BG_LYR_MAIN_3, 0x20, 0, heapID); MsgData *msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0719_bin, heapID); - String *string = String_New(64, heapID); + String *string = String_New(64, heapID); AddWindow(bgConfig, &animData->window, &sTouchToStartWindow); FillWindowPixelRect(&animData->window, 0, 0, 0, 0x100, 0x10); ReadMsgDataIntoString(msgData, msg_0719_00000, string); @@ -654,8 +654,8 @@ static void TitleScreenAnim_Load2dBgGfx(BgConfig *bgConfig, HeapID heapID, Title static void TitleScreenAnim_RunTopScreenGlow(TitleScreenAnimData *animData) { switch (animData->glowState) { case TITLESCREEN_GLOW_SETUP: - animData->glowState = TITLESCREEN_GLOW_IN; - animData->glowTimer = 0; + animData->glowState = TITLESCREEN_GLOW_IN; + animData->glowTimer = 0; animData->glowFadeStep = 0; break; case TITLESCREEN_GLOW_IN: diff --git a/src/touch_hitbox_controller.c b/src/touch_hitbox_controller.c index 3d1f731c41..386d58adb1 100644 --- a/src/touch_hitbox_controller.c +++ b/src/touch_hitbox_controller.c @@ -12,10 +12,10 @@ TouchHitboxController *TouchHitboxController_Create(const TouchscreenHitbox *hit TouchHitboxController *controller = AllocFromHeap(heapId, sizeof(TouchHitboxController)); if (controller != NULL) { - controller->hitboxes = hitboxes; + controller->hitboxes = hitboxes; controller->numTemplates = numTemplates; - controller->callback = callback; - controller->callbackArg = callbackArg; + controller->callback = callback; + controller->callbackArg = callbackArg; controller->templates = AllocFromHeap(heapId, numTemplates * sizeof(TouchHitboxControllerTemplate)); if (controller->templates != NULL) { @@ -31,8 +31,8 @@ TouchHitboxController *TouchHitboxController_Create(const TouchscreenHitbox *hit } static void TouchHitboxControllerTemplate_Init(TouchHitboxControllerTemplate *template) { - template->unkCallbackNum = 0; - template->touchActive = FALSE; + template->unkCallbackNum = 0; + template->touchActive = FALSE; template->numFramesActive = 0; } @@ -53,7 +53,7 @@ BOOL TouchHitboxController_IsTriggered(TouchHitboxController *controller) { u32 touchNew, touchHeld; // these are BOOLs but they have to be unsigned to match BOOL triggered = FALSE; - touchHeld = System_GetTouchHeld(); + touchHeld = System_GetTouchHeld(); if (touchHeld) { touchNew = System_GetTouchNew(); for (i = 0; i < controller->numTemplates; i++) { @@ -110,6 +110,6 @@ static int sub_02026DA4(TouchHitboxControllerTemplate *template, u32 touchHeld, } static void sub_02026DD8(TouchHitboxControllerTemplate *template, u8 a1) { - template->unkCallbackNum = a1; + template->unkCallbackNum = a1; template->numFramesActive = 0; } diff --git a/src/touch_save_app.c b/src/touch_save_app.c index 3f840242be..58940ae48e 100644 --- a/src/touch_save_app.c +++ b/src/touch_save_app.c @@ -100,51 +100,51 @@ static void ov30_0225DC18(void); static void ov30_0225DC28(void); static const BgTemplate ov30_0225DC64 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x6000, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const BgTemplate ov30_0225DC48 = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x7000, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const BgTemplate ov30_0225DC2C = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x6800, - .charBase = GX_BG_CHARBASE_0x00000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x00000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; typedef BOOL (*TouchSaveAppStateFunc)(TouchSaveAppData *); @@ -188,16 +188,16 @@ SysTask *ov30_0225D520(BgConfig *bgConfig, void *a1, FieldSystem *fieldSystem, v GfGfx_EngineBTogglePlanes(GX_PLANEMASK_BG2, GF_PLANE_TOGGLE_OFF); GfGfx_EngineBTogglePlanes(GX_PLANEMASK_OBJ, GF_PLANE_TOGGLE_OFF); - SysTask *task = CreateSysTaskAndEnvironment((SysTaskFunc)ov30_0225D700, sizeof(TouchSaveAppData), 10, HEAP_ID_8); + SysTask *task = CreateSysTaskAndEnvironment((SysTaskFunc)ov30_0225D700, sizeof(TouchSaveAppData), 10, HEAP_ID_8); TouchSaveAppData *data = SysTask_GetData(task); - data->task = task; - data->unk0 = 0; - data->bgConfig = bgConfig; - data->unk18 = a1; - data->fieldSystem = fieldSystem; - data->unk30 = 0; - data->options = Save_PlayerData_GetOptionsAddr(data->fieldSystem->saveData); - data->state = TOUCHSAVEAPP_STATE_DISPLAY_SAVE_INFORMATION; + data->task = task; + data->unk0 = 0; + data->bgConfig = bgConfig; + data->unk18 = a1; + data->fieldSystem = fieldSystem; + data->unk30 = 0; + data->options = Save_PlayerData_GetOptionsAddr(data->fieldSystem->saveData); + data->state = TOUCHSAVEAPP_STATE_DISPLAY_SAVE_INFORMATION; TouchSaveApp_SetupGraphics(data); TouchSaveApp_SetupText(data, data->fieldSystem->unkD2_0); @@ -288,7 +288,7 @@ static void TouchSaveApp_DestroyWindow(TouchSaveAppData *data) { static void TouchSaveApp_SetupText(TouchSaveAppData *data, u8 unused) { data->messageFormat = MessageFormat_New(HEAP_ID_8); - data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0040_bin, HEAP_ID_8); + data->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0040_bin, HEAP_ID_8); BufferPlayersName(data->messageFormat, 0, Save_PlayerData_GetProfileAddr(data->fieldSystem->saveData)); } @@ -300,31 +300,31 @@ static void TouchSaveApp_DestroyText(TouchSaveAppData *data) { static void ov30_0225D880(TouchSaveAppData *data) { YesNoPromptTemplate template; MI_CpuFill8(&template, 0, sizeof(YesNoPromptTemplate)); - template.bgConfig = data->bgConfig; - template.tileStart = 1; - template.plttSlot = 12; - template.bgId = 6; - template.x = 26; - template.y = 10; - template.ignoreTouchFlag = 0; + template.bgConfig = data->bgConfig; + template.tileStart = 1; + template.plttSlot = 12; + template.bgId = 6; + template.x = 26; + template.y = 10; + template.ignoreTouchFlag = 0; template.initialCursorPos = 0; BgClearTilemapBufferAndCommit(data->bgConfig, GF_BG_LYR_SUB_2); - YesNoPrompt *unk = YesNoPrompt_Create(HEAP_ID_4); + YesNoPrompt *unk = YesNoPrompt_Create(HEAP_ID_4); data->yesNoPrompt = unk; YesNoPrompt_InitFromTemplate(unk, &template); } static void TouchSaveApp_SetupWaitForTextPrinter(TouchSaveAppData *data, enum TouchSaveApp_State nextState) { - data->state = TOUCHSAVEAPP_STATE_WAIT_FOR_TEXT_PRINTER; + data->state = TOUCHSAVEAPP_STATE_WAIT_FOR_TEXT_PRINTER; data->stateAfterTextPrint = nextState; } static BOOL TouchSaveApp_DisplaySaveInformation(TouchSaveAppData *data) { UnkStruct_field_021F4360 *unk = ov01_021F4360(data->fieldSystem, HEAP_ID_4, 5); - data->unk40 = unk; + data->unk40 = unk; ov01_021F42F8(unk); data->state = TOUCHSAVEAPP_STATE_ASK_TO_SAVE; @@ -334,7 +334,7 @@ static BOOL TouchSaveApp_DisplaySaveInformation(TouchSaveAppData *data) { static BOOL TouchSaveApp_AskForSave(TouchSaveAppData *data) { if (!Save_FileDoesNotBelongToPlayer(data->fieldSystem->saveData)) { DrawFrameAndWindow2(&data->window, TRUE, 0xEC, 5); - data->string = NewString_ReadMsgData(data->msgData, msg_0040_00081); + data->string = NewString_ReadMsgData(data->msgData, msg_0040_00081); data->textPrinter = AddTextPrinterParameterized(&data->window, 1, data->string, 0, 0, Options_GetTextFrameDelay(data->options), NULL); TouchSaveApp_SetupWaitForTextPrinter(data, TOUCHSAVEAPP_STATE_GET_SAVE_CONFIRMATION); } else { @@ -384,7 +384,7 @@ static BOOL TouchSaveApp_HandleSaveConfirmation(TouchSaveAppData *data) { static BOOL TouchSaveApp_PrintOverwriteMessage(TouchSaveAppData *data) { FillWindowPixelBuffer(&data->window, 0xFF); - data->string = NewString_ReadMsgData(data->msgData, msg_0040_00082); + data->string = NewString_ReadMsgData(data->msgData, msg_0040_00082); data->textPrinter = AddTextPrinterParameterized(&data->window, 1, data->string, 0, 0, Options_GetTextFrameDelay(data->options), NULL); TouchSaveApp_SetupWaitForTextPrinter(data, TOUCHSAVEAPP_STATE_GET_OVERWRITE_CONFIRMATION); @@ -418,7 +418,7 @@ static BOOL TouchSaveApp_HandleOverwriteConfirmation(TouchSaveAppData *data) { static BOOL TouchSaveApp_PrintNotMySaveError(TouchSaveAppData *data) { DrawFrameAndWindow2(&data->window, TRUE, 0xEC, 5); - data->string = NewString_ReadMsgData(data->msgData, msg_0040_00020); + data->string = NewString_ReadMsgData(data->msgData, msg_0040_00020); data->textPrinter = AddTextPrinterParameterized(&data->window, 1, data->string, 0, 0, Options_GetTextFrameDelay(data->options), NULL); TouchSaveApp_SetupWaitForTextPrinter(data, TOUCHSAVEAPP_STATE_SAVE_FAILED); @@ -426,7 +426,7 @@ static BOOL TouchSaveApp_PrintNotMySaveError(TouchSaveAppData *data) { } static BOOL TouchSaveApp_SaveFailed(TouchSaveAppData *data) { - data->state = TOUCHSAVEAPP_STATE_CLOSE; + data->state = TOUCHSAVEAPP_STATE_CLOSE; data->waitFrames = 0; return FALSE; @@ -443,7 +443,7 @@ static BOOL TouchSaveApp_PrintSavingMessage(TouchSaveAppData *data) { } else { string = NewString_ReadMsgData(data->msgData, msg_0040_00021); } - data->string = string; + data->string = string; data->textPrinter = AddTextPrinterParameterized(&data->window, 1, data->string, 0, 0, Options_GetTextFrameDelay(data->options), NULL); TouchSaveApp_SetupWaitForTextPrinter(data, TOUCHSAVEAPP_STATE_SETUP_WAITING_ICON); @@ -452,7 +452,7 @@ static BOOL TouchSaveApp_PrintSavingMessage(TouchSaveAppData *data) { static BOOL TouchSaveApp_SetupWaitingIcon(TouchSaveAppData *data) { data->waitingIcon = WaitingIcon_New(&data->window, 0xEC); - data->state = TOUCHSAVEAPP_STATE_SAVE; + data->state = TOUCHSAVEAPP_STATE_SAVE; return FALSE; } @@ -470,7 +470,7 @@ static BOOL TouchSaveApp_PrintSavedMessage(TouchSaveAppData *data) { sub_0200F450(data->waitingIcon); FillWindowPixelBuffer(&data->window, 0xFF); - data->string = ReadMsgData_ExpandPlaceholders(data->messageFormat, data->msgData, msg_0040_00016, HEAP_ID_8); + data->string = ReadMsgData_ExpandPlaceholders(data->messageFormat, data->msgData, msg_0040_00016, HEAP_ID_8); data->textPrinter = AddTextPrinterParameterized(&data->window, 1, data->string, 0, 0, Options_GetTextFrameDelay(data->options), NULL); TouchSaveApp_SetupWaitForTextPrinter(data, TOUCHSAVEAPP_STATE_SAVE_SUCCEEDED); @@ -479,7 +479,7 @@ static BOOL TouchSaveApp_PrintSavedMessage(TouchSaveAppData *data) { static BOOL TouchSaveApp_SaveSucceeded(TouchSaveAppData *data) { PlaySE(SEQ_SE_DP_SAVE); - data->state = TOUCHSAVEAPP_STATE_CLOSE; + data->state = TOUCHSAVEAPP_STATE_CLOSE; data->waitFrames = 0; return FALSE; diff --git a/src/touchscreen_list_menu.c b/src/touchscreen_list_menu.c index 0b2e0283f4..2f2facfef5 100644 --- a/src/touchscreen_list_menu.c +++ b/src/touchscreen_list_menu.c @@ -32,7 +32,7 @@ static void TouchscreenListMenu_InvokeCallback(TouchscreenListMenu *menu, int a1 TouchscreenListMenuSpawner *TouchscreenListMenuSpawner_Create(HeapID heapId, PaletteData *paletteData) { TouchscreenListMenuSpawner *ret = AllocFromHeap(heapId, sizeof(TouchscreenListMenuSpawner)); MI_CpuClear8(ret, sizeof(TouchscreenListMenuSpawner)); - ret->heapId = heapId; + ret->heapId = heapId; ret->charDataRaw = GfGfxLoader_LoadFromNarc(NARC_data_sbox_gra, NARC_sbox_gra_sbox_gra_00000001_NCGR, FALSE, heapId, FALSE); NNS_G2dGetUnpackedBGCharacterData(ret->charDataRaw, &ret->pCharData); ret->plttDataRaw = GfGfxLoader_LoadFromNarc(NARC_data_sbox_gra, NARC_sbox_gra_sbox_gra_00000000_NCLR, FALSE, heapId, FALSE); @@ -56,14 +56,14 @@ static TouchscreenListMenu *TouchscreenListMenu_CreateInternal(TouchscreenListMe if (selection < ret->header.numWindows) { ret->cursorPos = selection; } - ret->animActive = 0; - ret->heapId = spawner->heapId; - ret->y = y; - ret->cursorPos = selection; - ret->isTouch = isTouch; - ret->callback = callback; + ret->animActive = 0; + ret->heapId = spawner->heapId; + ret->y = y; + ret->cursorPos = selection; + ret->isTouch = isTouch; + ret->callback = callback; ret->callbackArg = callbackArg; - ret->silent = silent; + ret->silent = silent; if (width == 0) { ret->width = TouchscreenListMenu_GetItemsTextMaxWidth(header->listMenuItems, ret->header.numWindows, 4, ret->header.template.xOffset); } else { @@ -169,10 +169,10 @@ typedef struct TaskData_TouchscreenListMenuGraphicsLoad { static void TouchscreenListMenuSpawner_ScheduleLoadGraphicsToVram(TouchscreenListMenuSpawner *spawner, TouchscreenListMenuHeader *header, PaletteData *plttData, HeapID heapId) { TaskData_TouchscreenListMenuGraphicsLoad *taskData = AllocFromHeapAtEnd(heapId, sizeof(TaskData_TouchscreenListMenuGraphicsLoad)); MI_CpuClear8(taskData, sizeof(TaskData_TouchscreenListMenuGraphicsLoad)); - taskData->pCharData = spawner->pCharData; - taskData->pPlttData = spawner->pPlttData; - taskData->bgConfig = header->bgConfig; - taskData->bgId = header->template.bgId; + taskData->pCharData = spawner->pCharData; + taskData->pPlttData = spawner->pPlttData; + taskData->bgConfig = header->bgConfig; + taskData->bgId = header->template.bgId; taskData->charOffset = header->template.charOffset; taskData->plttOffset = header->template.plttOffset; SysTask_CreateOnVWaitQueue(Task_LoadTouchscreenListMenuGraphicsToVram, taskData, 128); @@ -223,17 +223,17 @@ static u8 TouchscreenListMenu_GetItemsTextMaxWidth(LISTMENUITEM *listMenuItem, u static void TouchscreenListMenu_CreateWindows(TouchscreenListMenu *menu) { int i; u16 tilesPerWindow; - menu->windows = AllocWindows(menu->heapId, menu->header.numWindows); + menu->windows = AllocWindows(menu->heapId, menu->header.numWindows); menu->touchscreenHitboxes = AllocFromHeap(menu->heapId, (menu->header.numWindows + 1) * sizeof(TouchscreenHitbox)); MI_CpuClear8(menu->touchscreenHitboxes, (menu->header.numWindows + 1) * sizeof(TouchscreenHitbox)); tilesPerWindow = menu->width * 2; for (i = 0; i < menu->header.numWindows; ++i) { AddWindowParameterized(menu->header.bgConfig, &menu->windows[i], menu->header.template.bgId, menu->x + 1, menu->y + 1 + 3 * i, menu->width, 2, menu->header.template.plttOffset, menu->header.template.baseTile + tilesPerWindow * i); FillWindowPixelBuffer(&menu->windows[i], 3); - menu->touchscreenHitboxes[i].rect.top = (menu->y + 1) * 8 + 24 * i; + menu->touchscreenHitboxes[i].rect.top = (menu->y + 1) * 8 + 24 * i; menu->touchscreenHitboxes[i].rect.bottom = menu->touchscreenHitboxes[i].rect.top + 16; - menu->touchscreenHitboxes[i].rect.left = (menu->x + 1) * 8; - menu->touchscreenHitboxes[i].rect.right = menu->touchscreenHitboxes[i].rect.left + menu->width * 8; + menu->touchscreenHitboxes[i].rect.left = (menu->x + 1) * 8; + menu->touchscreenHitboxes[i].rect.right = menu->touchscreenHitboxes[i].rect.left + menu->width * 8; } menu->touchscreenHitboxes[i].rect.top = TOUCHSCREEN_RECTLIST_END; } @@ -353,15 +353,15 @@ static int TouchscreenListMenu_HandleTouchInput(TouchscreenListMenu *menu, BOOL *flagRet = FALSE; return -1; } - *flagRet = TRUE; + *flagRet = TRUE; menu->cursorPos = hitbox; TouchscreenListMenu_ToggleButtonPalette(menu, hitbox, TRUE); TouchscreenListMenu_DrawButtons(menu); ScheduleBgTilemapBufferTransfer(menu->header.bgConfig, menu->header.template.bgId); menu->animActive = 1; - menu->animTimer = 8; - menu->selection = hitbox; - menu->isTouch = 1; + menu->animTimer = 8; + menu->selection = hitbox; + menu->isTouch = 1; TouchscreenListMenu_PlaySE(menu, SEQ_SE_DP_SELECT); TouchscreenListMenu_InvokeCallback(menu, 2); return -1; @@ -381,8 +381,8 @@ static int TouchscreenListMenu_HandleKeyInput(TouchscreenListMenu *menu) { if (gSystem.newKeys & PAD_BUTTON_A) { TouchscreenListMenu_ToggleButtonPalette(menu, menu->cursorPos, TRUE); menu->animActive = 1; - menu->animTimer = 8; - menu->selection = menu->cursorPos; + menu->animTimer = 8; + menu->selection = menu->cursorPos; TouchscreenListMenu_PlaySE(menu, SEQ_SE_DP_SELECT); TouchscreenListMenu_InvokeCallback(menu, 2); return -1; diff --git a/src/trainer_data.c b/src/trainer_data.c index 672f3bcf49..a7a85cbdd8 100644 --- a/src/trainer_data.c +++ b/src/trainer_data.c @@ -23,7 +23,7 @@ void EnemyTrainerSet_Init(BattleSetup *battleSetup, SaveData *saveData, HeapID h int i; String *string; - msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0729_bin, heapId); + msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0729_bin, heapId); rivalName = Save_Misc_RivalName_Const_Get(Save_Misc_Const_Get(saveData)); for (i = 0; i < 4; i++) { if (battleSetup->trainerId[i] != 0) { @@ -283,7 +283,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) seedBak = GetLCRNGSeed(); Party_InitWithMaxSize(enemies->party[partyIndex], PARTY_SIZE); data = (TRPOKE *)AllocFromHeap(heapId, sizeof(TRPOKE) * PARTY_SIZE); - mon = AllocMonZeroed(heapId); + mon = AllocMonZeroed(heapId); TrainerData_ReadTrPoke(enemies->trainerId[partyIndex], data); // If a Pokemon's gender ratio is 50/50, the generated Pokemon will be the same @@ -310,7 +310,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) // Starting in Platinum, the Pokemon's form was encoded // in the upper 6 bits of the species. species = monSpecies[i].species & 0x3FF; - form = (monSpecies[i].species & 0xFC00) >> 10; + form = (monSpecies[i].species & 0xFC00) >> 10; // Starting in HGSS, additional checks are performed to // rand each Pokemon's personality. TrMon_OverridePidGender(species, form, monSpecies[i].genderAbilityOverride, &pidGender); @@ -355,7 +355,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) monSpeciesMoves = &data->species_moves; for (i = 0; i < enemies->trainer[partyIndex].data.npoke; i++) { species = monSpeciesMoves[i].species & 0x3FF; - form = (monSpeciesMoves[i].species & 0xFC00) >> 10; + form = (monSpeciesMoves[i].species & 0xFC00) >> 10; TrMon_OverridePidGender(species, form, monSpeciesMoves[i].genderAbilityOverride, &pidGender); personality = monSpeciesMoves[i].difficulty + monSpeciesMoves[i].level + species + enemies->trainerId[partyIndex]; SetLCRNGSeed(personality); @@ -363,7 +363,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) personality = LCRandom(); } personality = (personality << 8) + pidGender; - iv = (u8)((monSpeciesMoves[i].difficulty * 31) / 255); + iv = (u8)((monSpeciesMoves[i].difficulty * 31) / 255); CreateMon(mon, species, monSpeciesMoves[i].level, iv, TRUE, (s32)personality, OT_ID_RANDOM_NO_SHINY, 0); for (j = 0; j < MAX_MON_MOVES; j++) { MonSetMoveInSlot(mon, monSpeciesMoves[i].moves[j], (u8)j); @@ -382,7 +382,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) monSpeciesItem = &data->species_item; for (i = 0; i < enemies->trainer[partyIndex].data.npoke; i++) { species = monSpeciesItem[i].species & 0x3FF; - form = (monSpeciesItem[i].species & 0xFC00) >> 10; + form = (monSpeciesItem[i].species & 0xFC00) >> 10; TrMon_OverridePidGender(species, form, monSpeciesItem[i].genderAbilityOverride, &pidGender); personality = monSpeciesItem[i].difficulty + monSpeciesItem[i].level + species + enemies->trainerId[partyIndex]; SetLCRNGSeed(personality); @@ -390,7 +390,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) personality = LCRandom(); } personality = (personality << 8) + pidGender; - iv = (u8)((monSpeciesItem[i].difficulty * 31) / 255); + iv = (u8)((monSpeciesItem[i].difficulty * 31) / 255); CreateMon(mon, species, monSpeciesItem[i].level, iv, TRUE, (s32)personality, OT_ID_RANDOM_NO_SHINY, 0); SetMonData(mon, MON_DATA_HELD_ITEM, &monSpeciesItem[i].item); SetTrMonCapsule(monSpeciesItem[i].capsule, mon, heapId); @@ -407,7 +407,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) monSpeciesItemMoves = &data->species_item_moves; for (i = 0; i < enemies->trainer[partyIndex].data.npoke; i++) { species = monSpeciesItemMoves[i].species & 0x3FF; - form = (monSpeciesItemMoves[i].species & 0xFC00) >> 10; + form = (monSpeciesItemMoves[i].species & 0xFC00) >> 10; TrMon_OverridePidGender(species, form, monSpeciesItemMoves[i].genderAbilityOverride, &pidGender); personality = monSpeciesItemMoves[i].difficulty + monSpeciesItemMoves[i].level + species + enemies->trainerId[partyIndex]; SetLCRNGSeed(personality); @@ -415,7 +415,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) personality = LCRandom(); } personality = (personality << 8) + pidGender; - iv = (u8)((monSpeciesItemMoves[i].difficulty * 31) / 255); + iv = (u8)((monSpeciesItemMoves[i].difficulty * 31) / 255); CreateMon(mon, species, monSpeciesItemMoves[i].level, iv, TRUE, (s32)personality, OT_ID_RANDOM_NO_SHINY, 0); SetMonData(mon, MON_DATA_HELD_ITEM, &monSpeciesItemMoves[i].item); for (j = 0; j < MAX_MON_MOVES; j++) { @@ -435,7 +435,7 @@ void CreateNPCTrainerParty(BattleSetup *enemies, int partyIndex, HeapID heapId) } void TrMon_OverridePidGender(int species, int form, int overrideParam, u32 *pid) { - int genderOverride = overrideParam & 0xF; + int genderOverride = overrideParam & 0xF; int abilityOverride = (overrideParam & 0xF0) >> 4; if (overrideParam != 0) { if (genderOverride != 0) { diff --git a/src/trainer_memo.c b/src/trainer_memo.c index 34c86b9273..2e07b8963a 100644 --- a/src/trainer_memo.c +++ b/src/trainer_memo.c @@ -76,22 +76,22 @@ static void BoxMon_CopyLevelToMetLevel(BoxPokemon *boxMon); static void BoxMon_SetOriginalTrainerData(BoxPokemon *boxMon, PlayerProfile *profile, HeapID heapId); Unk0208E600 *sub_0208E600(Pokemon *mon, BOOL isMine, HeapID heapId, int a3) { - Unk0208E600 *ptr = AllocFromHeap(heapId, sizeof(Unk0208E600)); - ptr->heapId = heapId; - ptr->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0302_bin, heapId); - ptr->msgFmt = MessageFormat_New_Custom(9, 32, ptr->heapId); - ptr->mon = mon; - ptr->isMine = isMine; - ptr->notepad.natureLine = 0; - ptr->notepad.nature = NULL; - ptr->notepad.dateLocationMetLine = 0; - ptr->notepad.dateLocationMet = NULL; - ptr->notepad.characteristicLine = 0; - ptr->notepad.characteristic = NULL; + Unk0208E600 *ptr = AllocFromHeap(heapId, sizeof(Unk0208E600)); + ptr->heapId = heapId; + ptr->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0302_bin, heapId); + ptr->msgFmt = MessageFormat_New_Custom(9, 32, ptr->heapId); + ptr->mon = mon; + ptr->isMine = isMine; + ptr->notepad.natureLine = 0; + ptr->notepad.nature = NULL; + ptr->notepad.dateLocationMetLine = 0; + ptr->notepad.dateLocationMet = NULL; + ptr->notepad.characteristicLine = 0; + ptr->notepad.characteristic = NULL; ptr->notepad.flavorPreferenceLine = 0; - ptr->notepad.flavorPreference = NULL; - ptr->notepad.eggWatchLine = 0; - ptr->notepad.eggWatch = NULL; + ptr->notepad.flavorPreference = NULL; + ptr->notepad.eggWatchLine = 0; + ptr->notepad.eggWatch = NULL; int metCondition = MonMetCondition(ptr->mon, ptr->isMine); switch (metCondition) { @@ -301,7 +301,7 @@ void sub_0208E994(Unk0208E600 *a0) { // Returns true if the Pokemon has the proper metadata to trigger the event. BOOL MonMetadataMatchesEvent(u8 eventNo, Pokemon *mon, BOOL isMine) { u8 metCondition = MonMetCondition(mon, isMine); - u8 version = GetMonData(mon, MON_DATA_GAME_VERSION, NULL); + u8 version = GetMonData(mon, MON_DATA_GAME_VERSION, NULL); if ((metCondition == MET_CONDITION_FATEFUL_ENCOUNTER || metCondition == MET_CONDITION_FATEFUL_ENCOUNTER_TRADED) && (eventNo != EVENT_ARCEUS_HALL_OF_ORIGIN)) { return TRUE; @@ -338,7 +338,7 @@ static void FormatNature(Unk0208E600 *a0) { } static void FormatDateAndLocationMet(Unk0208E600 *a0, int msgNo) { - String *str = String_New(0x240, a0->heapId); + String *str = String_New(0x240, a0->heapId); a0->notepad.dateLocationMet = String_New(0x240, a0->heapId); ReadMsgDataIntoString(a0->msgData, msgNo, str); @@ -360,7 +360,7 @@ static void FormatDateAndLocationMet(Unk0208E600 *a0, int msgNo) { static void FormatDateAndLocation_Migrated(Unk0208E600 *a0, int msgNo) { int version; - String *str = String_New(0x120, a0->heapId); + String *str = String_New(0x120, a0->heapId); a0->notepad.dateLocationMet = String_New(0x120, a0->heapId); ReadMsgDataIntoString(a0->msgData, msgNo, str); @@ -408,7 +408,7 @@ static void FormatDateAndLocation_Migrated(Unk0208E600 *a0, int msgNo) { } static void FormatDateAndLocation_Egg(Unk0208E600 *a0, int msgNo, BOOL hatched) { - String *str = String_New(0x168, a0->heapId); + String *str = String_New(0x168, a0->heapId); a0->notepad.dateLocationMet = String_New(0x168, a0->heapId); ReadMsgDataIntoString(a0->msgData, msgNo, str); @@ -435,12 +435,12 @@ static void FormatCharacteristic(Unk0208E600 *a0) { a0->notepad.characteristic = String_New(0x48, a0->heapId); - int hpIv = GetMonData(a0->mon, MON_DATA_HP_IV, NULL); - int atkIv = GetMonData(a0->mon, MON_DATA_ATK_IV, NULL); - int defIv = GetMonData(a0->mon, MON_DATA_DEF_IV, NULL); - int speedIv = GetMonData(a0->mon, MON_DATA_SPEED_IV, NULL); - int spAtkIv = GetMonData(a0->mon, MON_DATA_SPATK_IV, NULL); - int spDefIv = GetMonData(a0->mon, MON_DATA_SPDEF_IV, NULL); + int hpIv = GetMonData(a0->mon, MON_DATA_HP_IV, NULL); + int atkIv = GetMonData(a0->mon, MON_DATA_ATK_IV, NULL); + int defIv = GetMonData(a0->mon, MON_DATA_DEF_IV, NULL); + int speedIv = GetMonData(a0->mon, MON_DATA_SPEED_IV, NULL); + int spAtkIv = GetMonData(a0->mon, MON_DATA_SPATK_IV, NULL); + int spDefIv = GetMonData(a0->mon, MON_DATA_SPDEF_IV, NULL); u32 personality = GetMonData(a0->mon, MON_DATA_PERSONALITY, NULL); switch (personality % 6) { @@ -595,7 +595,7 @@ static void FormatCharacteristic(Unk0208E600 *a0) { static void FormatFlavorPreference(Unk0208E600 *a0) { a0->notepad.flavorPreference = String_New(0x48, a0->heapId); - int index = 0; + int index = 0; for (int flavor = FLAVOR_START; flavor < FLAVOR_MAX; flavor++) { int preference = MonGetFlavorPreference(a0->mon, flavor); if (preference == 1) { @@ -608,7 +608,7 @@ static void FormatFlavorPreference(Unk0208E600 *a0) { static void FormatEggWatch(Unk0208E600 *a0) { int msgNo; - int eggCycles = GetMonData(a0->mon, MON_DATA_FRIENDSHIP, NULL); + int eggCycles = GetMonData(a0->mon, MON_DATA_FRIENDSHIP, NULL); a0->notepad.eggWatch = String_New(0x120, a0->heapId); if (eggCycles <= 5) { msgNo = msg_0302_00105; @@ -794,8 +794,8 @@ void BoxMonSetTrainerMemo(BoxPokemon *boxMon, PlayerProfile *profile, int strat, } static void BoxMon_SetOriginalTrainerData(BoxPokemon *boxMon, PlayerProfile *profile, HeapID heapId) { - u32 otId = PlayerProfile_GetTrainerID(profile); - u32 gender = PlayerProfile_GetTrainerGender(profile); + u32 otId = PlayerProfile_GetTrainerID(profile); + u32 gender = PlayerProfile_GetTrainerGender(profile); String *name = PlayerProfile_GetPlayerName_NewString(profile, heapId); SetBoxMonData(boxMon, MON_DATA_OTID, &otId); diff --git a/src/unk_02009D48.c b/src/unk_02009D48.c index 769b8134fe..6aef41fb98 100644 --- a/src/unk_02009D48.c +++ b/src/unk_02009D48.c @@ -13,8 +13,8 @@ void CreateSpriteResourcesHeader(struct SpriteResourcesHeader *hdr, int charId, GF_2DGfxResObj *charObj; GF_2DGfxResObj *plttObj; GF_2DGfxResObj *cellObj; - GF_2DGfxResObj *cellAnmObj = NULL; - GF_2DGfxResObj *multiCellObj = NULL; + GF_2DGfxResObj *cellAnmObj = NULL; + GF_2DGfxResObj *multiCellObj = NULL; GF_2DGfxResObj *multiCellAnmObj = NULL; NNSG2dImageProxy *proxy; @@ -54,9 +54,9 @@ void CreateSpriteResourcesHeader(struct SpriteResourcesHeader *hdr, int charId, GF_ASSERT(proxy != NULL); hdr->charData = NULL; } - hdr->plttProxy = GF_PlttResObj_GetPlttProxy(plttObj, proxy); + hdr->plttProxy = GF_PlttResObj_GetPlttProxy(plttObj, proxy); hdr->imageProxy = proxy; - hdr->cellData = GF2DGfxResObj_GetCellDataPtr(cellObj); + hdr->cellData = GF2DGfxResObj_GetCellDataPtr(cellObj); if (cellAnmObj != NULL) { hdr->cellAnim = GF2DGfxResObj_GetAnimDataPtr(cellAnmObj); } else { @@ -69,7 +69,7 @@ void CreateSpriteResourcesHeader(struct SpriteResourcesHeader *hdr, int charId, hdr->multiCellData = NULL; hdr->multiCellAnim = NULL; } - hdr->flag = transfer; + hdr->flag = transfer; hdr->priority = priority; } @@ -81,9 +81,9 @@ SpriteResourceHeaderList *SpriteResourceHeaderList_Create(const struct ResdatNar while (resdatNarcEntry[num].charId != -2) { num++; } - ret = AllocFromHeap(heapId, sizeof(SpriteResourceHeaderList)); + ret = AllocFromHeap(heapId, sizeof(SpriteResourceHeaderList)); ret->headers = AllocFromHeap(heapId, sizeof(SpriteResourcesHeader) * num); - ret->num = num; + ret->num = num; for (i = 0; i < ret->num; i++) { CreateSpriteResourcesHeader(&ret->headers[i], resdatNarcEntry[i].charId, resdatNarcEntry[i].plttId, resdatNarcEntry[i].cellId, resdatNarcEntry[i].animId, resdatNarcEntry[i].mcelId, resdatNarcEntry[i].manmId, resdatNarcEntry[i].xferFlag, resdatNarcEntry[i].priority, charMan, plttMan, cellMan, animMan, mcelMan, manmMan); } @@ -105,17 +105,17 @@ SpriteList *G2dRenderer_Init(int numSprites, GF_G2dRenderer *renderer, HeapID he GF_InitG2dRenderer(&renderer->rendererInstance, -FX32_ONE); rect.posTopLeft.x = 0; rect.posTopLeft.y = 0; - rect.sizeView.x = 255 * FX32_ONE; - rect.sizeView.y = 192 * FX32_ONE; + rect.sizeView.x = 255 * FX32_ONE; + rect.sizeView.y = 192 * FX32_ONE; sub_0200B27C(&renderer->renderSurface[0], &rect, NNS_G2D_VRAM_TYPE_2DMAIN, &renderer->rendererInstance); rect.posTopLeft.x = 0; rect.posTopLeft.y = 192 * FX32_ONE; - rect.sizeView.x = 255 * FX32_ONE; - rect.sizeView.y = 192 * FX32_ONE; + rect.sizeView.x = 255 * FX32_ONE; + rect.sizeView.y = 192 * FX32_ONE; sub_0200B27C(&renderer->renderSurface[1], &rect, NNS_G2D_VRAM_TYPE_2DSUB, &renderer->rendererInstance); - param.num = numSprites; + param.num = numSprites; param.rendererInstance = &renderer->rendererInstance; - param.heapId = heapId; + param.heapId = heapId; return SpriteList_Create(¶m); } @@ -124,8 +124,8 @@ void G2dRenderer_SetMainSurfaceCoords(GF_G2dRenderer *renderer, fx32 x, fx32 y) rect.posTopLeft.x = x; rect.posTopLeft.y = y; - rect.sizeView.x = 255 * FX32_ONE; - rect.sizeView.y = 192 * FX32_ONE; + rect.sizeView.x = 255 * FX32_ONE; + rect.sizeView.y = 192 * FX32_ONE; GF_SetG2dRendererSurface(&renderer->renderSurface[0], &rect); } @@ -134,8 +134,8 @@ void G2dRenderer_SetSubSurfaceCoords(GF_G2dRenderer *renderer, fx32 x, fx32 y) { rect.posTopLeft.x = x; rect.posTopLeft.y = y; - rect.sizeView.x = 255 * FX32_ONE; - rect.sizeView.y = 192 * FX32_ONE; + rect.sizeView.x = 255 * FX32_ONE; + rect.sizeView.y = 192 * FX32_ONE; GF_SetG2dRendererSurface(&renderer->renderSurface[1], &rect); } diff --git a/src/unk_0200A090.c b/src/unk_0200A090.c index e7d1556fbd..e0e58b4b13 100644 --- a/src/unk_0200A090.c +++ b/src/unk_0200A090.c @@ -23,11 +23,11 @@ static void *loadResourceFromNarc(NARC *narc, int fileId, BOOL compressed, HeapI GF_2DGfxResMan *Create2DGfxResObjMan(int num, GfGfxResType type, HeapID heapId) { GF_2DGfxResMan *ret = AllocFromHeap(heapId, sizeof(GF_2DGfxResMan)); - ret->resourceMgr = GF2dGfxRawResMan_Create(num, heapId); - ret->objects = AllocFromHeap(heapId, num * sizeof(GF_2DGfxResObj)); + ret->resourceMgr = GF2dGfxRawResMan_Create(num, heapId); + ret->objects = AllocFromHeap(heapId, num * sizeof(GF_2DGfxResObj)); memset(ret->objects, 0, num * sizeof(GF_2DGfxResObj)); - ret->max = num; - ret->num = 0; + ret->max = num; + ret->num = 0; ret->type = type; return ret; } @@ -111,7 +111,7 @@ void ReplaceCharResObjFromNarc(GF_2DGfxResMan *mgr, GF_2DGfxResObj *obj, NarcId GF_ASSERT(mgr->type == GF_GFX_RES_TYPE_CHAR); GF_ASSERT(obj != NULL); GF_ASSERT(obj->type == GF_GFX_RES_TYPE_CHAR); - id = GF2DGfxResObj_GetResID(obj); + id = GF2DGfxResObj_GetResID(obj); vram = GF2DGfxResObj_GetLoadAddress(obj); DestroySingle2DGfxResObj(mgr, obj); Add2DGfxResObjFromNarc(mgr, obj, narcId, fileId, compressed, id, vram, 0, GF_GFX_RES_TYPE_CHAR, heapId, FALSE); @@ -125,8 +125,8 @@ void ReplacePlttResObjFromNarc(GF_2DGfxResMan *mgr, GF_2DGfxResObj *obj, NarcId GF_ASSERT(mgr->type == GF_GFX_RES_TYPE_PLTT); GF_ASSERT(obj != NULL); GF_ASSERT(obj->type == GF_GFX_RES_TYPE_PLTT); - id = GF2DGfxResObj_GetResID(obj); - vram = GF2DGfxResObj_GetLoadAddress(obj); + id = GF2DGfxResObj_GetResID(obj); + vram = GF2DGfxResObj_GetLoadAddress(obj); pltt_num = GF2DGfxResObj_GetPlttNum(obj); DestroySingle2DGfxResObj(mgr, obj); Add2DGfxResObjFromNarc(mgr, obj, narcId, fileId, compressed, id, vram, pltt_num, GF_GFX_RES_TYPE_PLTT, heapId, FALSE); @@ -196,7 +196,7 @@ void ReplaceCharResObjFromOpenNarc(GF_2DGfxResMan *mgr, GF_2DGfxResObj *obj, NAR GF_ASSERT(mgr->type == GF_GFX_RES_TYPE_CHAR); GF_ASSERT(obj != NULL); GF_ASSERT(obj->type == GF_GFX_RES_TYPE_CHAR); - id = GF2DGfxResObj_GetResID(obj); + id = GF2DGfxResObj_GetResID(obj); vram = GF2DGfxResObj_GetLoadAddress(obj); DestroySingle2DGfxResObj(mgr, obj); Add2DGfxResObjFromOpenNarc(mgr, obj, narc, fileId, compressed, id, vram, 0, GF_GFX_RES_TYPE_CHAR, heapId, FALSE); @@ -210,8 +210,8 @@ void ReplacePlttResObjFromOpenNarc(GF_2DGfxResMan *mgr, GF_2DGfxResObj *obj, NAR GF_ASSERT(mgr->type == GF_GFX_RES_TYPE_PLTT); GF_ASSERT(obj != NULL); GF_ASSERT(obj->type == GF_GFX_RES_TYPE_PLTT); - id = GF2DGfxResObj_GetResID(obj); - vram = GF2DGfxResObj_GetLoadAddress(obj); + id = GF2DGfxResObj_GetResID(obj); + vram = GF2DGfxResObj_GetLoadAddress(obj); pltt_num = GF2DGfxResObj_GetPlttNum(obj); DestroySingle2DGfxResObj(mgr, obj); Add2DGfxResObjFromOpenNarc(mgr, obj, narc, fileId, compressed, id, vram, pltt_num, GF_GFX_RES_TYPE_PLTT, heapId, FALSE); @@ -241,9 +241,9 @@ static void loadAll2DGfxResObjFromHeaderInternal(GF_2DGfxResMan *mgr, const GF_2 GF_2DGfxResObjList *Create2DGfxResObjList(int num, HeapID heapId) { GF_2DGfxResObjList *ret = AllocFromHeap(heapId, sizeof(GF_2DGfxResObjList)); - ret->obj = AllocFromHeap(heapId, num * sizeof(GF_2DGfxResObj *)); - ret->max = num; - ret->num = 0; + ret->obj = AllocFromHeap(heapId, num * sizeof(GF_2DGfxResObj *)); + ret->max = num; + ret->num = 0; return ret; } @@ -381,9 +381,9 @@ GF_2DGfxResHeader *GF2DGfxResHeader_GetByIndex(GF_2DGfxResHeader *headers, int n void GF2DGfxResHeader_Init(const GF_2DGfxResHeaderNarcList *narcList, GF_2DGfxResHeader *header, HeapID heapId) { GF_ASSERT(header != NULL); - header->type = narcList->type; + header->type = narcList->type; header->isNarc = TRUE; - header->num = GF2DGfxResHeaderNarc_CountObjects(narcList->internal); + header->num = GF2DGfxResHeaderNarc_CountObjects(narcList->internal); if (header->num > 0) { header->table = AllocFromHeap(heapId, header->num * sizeof(GF_2DGfxResHeaderNarc)); } else { @@ -399,7 +399,7 @@ void GF2DGfxResHeader_Reset(GF_2DGfxResHeader *header) { FreeToHeap(header->table); } header->table = NULL; - header->num = 0; + header->num = 0; } int GF2dGfxResHeader_GetNumObjects(const GF_2DGfxResHeader *header) { @@ -425,7 +425,7 @@ int GF2DGfxResHeader_GetNarcMemberIdByIndex(GF_2DGfxResHeader *header, int idx) GF_ASSERT(header->num > idx); if (header->isNarc == TRUE) { GF_2DGfxResHeaderNarc *sub = header->table; - ret = sub[idx].fileId; + ret = sub[idx].fileId; } return ret; // UB: if not narc, this is uninitialized } @@ -436,7 +436,7 @@ BOOL GF2DGfxResHeader_GetCompressFlagByIndex(GF_2DGfxResHeader *header, int idx) GF_ASSERT(header->num > idx); if (header->isNarc == TRUE) { GF_2DGfxResHeaderNarc *sub = header->table; - ret = sub[idx].compressed; + ret = sub[idx].compressed; } return ret; // UB: if not narc, this is uninitialized } @@ -511,7 +511,7 @@ static struct CharResExtraData *GetResourceExtraCharData(void *resource, NNS_G2D static struct PlttResExtraData *GetResourceExtraPlttData(void *resource, NNS_G2D_VRAM_TYPE vram, int pltt_num, HeapID heapId) { struct PlttResExtraData *ret = AllocFromHeap(heapId, sizeof(struct PlttResExtraData)); NNS_G2dGetUnpackedPaletteData(resource, &ret->plttData); - ret->vram = vram; + ret->vram = vram; ret->pltt_num = pltt_num; return ret; } @@ -555,21 +555,21 @@ static void *getResObjExtra(GF_2DGfxResObj *obj) { static void Add2DGfxResObjFromFile(GF_2DGfxResMan *mgr, GF_2DGfxResObj *obj, char *name, int id, NNS_G2D_VRAM_TYPE vram, int pltt_num, GfGfxResType type, HeapID heapId) { obj->resource = GF2dGfxRawResMan_ReadAndAllocObj(mgr->resourceMgr, name, id, heapId); - obj->type = type; + obj->type = type; GF2DGfxResObj_LoadExDat(obj, type, vram, pltt_num, heapId); } static void Add2DGfxResObjFromNarc(GF_2DGfxResMan *mgr, GF_2DGfxResObj *obj, NarcId narcId, int fileId, BOOL compressed, int id, NNS_G2D_VRAM_TYPE vram, int pltt_num, GfGfxResType type, HeapID heapId, BOOL atEnd) { - void *res = GfGfxLoader_LoadFromNarc(narcId, fileId, compressed, heapId, atEnd); + void *res = GfGfxLoader_LoadFromNarc(narcId, fileId, compressed, heapId, atEnd); obj->resource = GF2dGfxRawResMan_AllocObj(mgr->resourceMgr, res, id); - obj->type = type; + obj->type = type; GF2DGfxResObj_LoadExDat(obj, type, vram, pltt_num, heapId); } static void Add2DGfxResObjFromOpenNarc(GF_2DGfxResMan *mgr, GF_2DGfxResObj *obj, NARC *narc, int fileId, BOOL compressed, int id, NNS_G2D_VRAM_TYPE vram, int pltt_num, GfGfxResType type, HeapID heapId, BOOL atEnd) { - void *res = loadResourceFromNarc(narc, fileId, compressed, heapId, atEnd); + void *res = loadResourceFromNarc(narc, fileId, compressed, heapId, atEnd); obj->resource = GF2dGfxRawResMan_AllocObj(mgr->resourceMgr, res, id); - obj->type = type; + obj->type = type; GF2DGfxResObj_LoadExDat(obj, type, vram, pltt_num, heapId); } diff --git a/src/unk_0200ACF0.c b/src/unk_0200ACF0.c index a1da95c7de..f1143bd430 100644 --- a/src/unk_0200ACF0.c +++ b/src/unk_0200ACF0.c @@ -11,9 +11,9 @@ BOOL sub_0200ACF0(GF_2DGfxResObj *obj) { ObjCharTransferTaskTemplate template; template.charData = GF2DGfxResObj_GetCharDataPtr(obj); - template.vram = GF2DGfxResObj_GetLoadAddress(obj); - template.id = GF2DGfxResObj_GetResID(obj); - template.atEnd = FALSE; + template.vram = GF2DGfxResObj_GetLoadAddress(obj); + template.id = GF2DGfxResObj_GetResID(obj); + template.atEnd = FALSE; return ObjCharTransfer_CreateTaskAndDoTransferFromTemplate(&template); } @@ -32,9 +32,9 @@ BOOL sub_0200AD64(GF_2DGfxResObj *obj) { ObjCharTransferTaskTemplate template; template.charData = GF2DGfxResObj_GetCharDataPtr(obj); - template.vram = GF2DGfxResObj_GetLoadAddress(obj); - template.id = GF2DGfxResObj_GetResID(obj); - template.atEnd = FALSE; + template.vram = GF2DGfxResObj_GetLoadAddress(obj); + template.id = GF2DGfxResObj_GetResID(obj); + template.atEnd = FALSE; return ObjCharTransfer_CreateTaskAndDoTransferFromTemplate_UpdateMappingTypeFromHW(&template); } @@ -44,9 +44,9 @@ BOOL sub_0200ADA4(GF_2DGfxResObj *obj) { ObjCharTransferTaskTemplate template; template.charData = GF2DGfxResObj_GetCharDataPtr(obj); - template.vram = GF2DGfxResObj_GetLoadAddress(obj); - template.id = GF2DGfxResObj_GetResID(obj); - template.atEnd = TRUE; + template.vram = GF2DGfxResObj_GetLoadAddress(obj); + template.id = GF2DGfxResObj_GetResID(obj); + template.atEnd = TRUE; return ObjCharTransfer_CreateTaskAndDoTransferFromTemplate(&template); } @@ -65,9 +65,9 @@ BOOL sub_0200AE18(GF_2DGfxResObj *obj) { ObjCharTransferTaskTemplate template; template.charData = GF2DGfxResObj_GetCharDataPtr(obj); - template.vram = GF2DGfxResObj_GetLoadAddress(obj); - template.id = GF2DGfxResObj_GetResID(obj); - template.atEnd = TRUE; + template.vram = GF2DGfxResObj_GetLoadAddress(obj); + template.id = GF2DGfxResObj_GetResID(obj); + template.atEnd = TRUE; return ObjCharTransfer_CreateTaskAndDoTransferFromTemplate_UpdateMappingTypeFromHW(&template); } @@ -83,7 +83,7 @@ void sub_0200AE58(GF_2DGfxResObjList *charResObjList) { void sub_0200AE8C(GF_2DGfxResObj *obj) { GF_ASSERT(obj != NULL); - int id = GF2DGfxResObj_GetResID(obj); + int id = GF2DGfxResObj_GetResID(obj); NNSG2dCharacterData *charData = GF2DGfxResObj_GetCharDataPtr(obj); ObjCharTransfer_ReplaceGraphicsFromChardataByResID(id, charData); } @@ -119,9 +119,9 @@ NNSG2dImageProxy *sub_0200AF24(GF_2DGfxResObj *charResObj, GF_2DGfxResObj *cellR GF_ASSERT(cellResObj != NULL); GF_ASSERT(GF2DGfxResObj_GetResType(cellResObj) == GF_GFX_RES_TYPE_CELL); - int resID = GF2DGfxResObj_GetResID(charResObj); + int resID = GF2DGfxResObj_GetResID(charResObj); NNSG2dCellDataBank *cellData = GF2DGfxResObj_GetCellDataPtr(cellResObj); - ret = ObjCharTransfer_ResizeTaskByResID_GetProxyPtr(resID, cellData->pVramTransferData->szByteMax); + ret = ObjCharTransfer_ResizeTaskByResID_GetProxyPtr(resID, cellData->pVramTransferData->szByteMax); if (ret == NULL) { ret = ObjCharTransfer_CopyTransferTaskByProxyPtr(ObjCharTransfer_GetProxyPtrByResID(resID)); } @@ -139,9 +139,9 @@ BOOL sub_0200AF94(GF_2DGfxResObj *plttResObj) { ObjPlttTransferTaskTemplate template; template.plttData = GF2DGfxResObj_GetPlttDataPtr(plttResObj); - template.vram = GF2DGfxResObj_GetLoadAddress(plttResObj); - template.id = GF2DGfxResObj_GetResID(plttResObj); - template.plttNum = GF2DGfxResObj_GetPlttNum(plttResObj); + template.vram = GF2DGfxResObj_GetLoadAddress(plttResObj); + template.id = GF2DGfxResObj_GetResID(plttResObj); + template.plttNum = GF2DGfxResObj_GetPlttNum(plttResObj); return ObjPlttTransfer_CreateTaskAndDoTransferFromTemplate_HandleExtPltt(&template); } @@ -160,9 +160,9 @@ BOOL sub_0200B00C(GF_2DGfxResObj *plttResObj) { ObjPlttTransferTaskTemplate template; template.plttData = GF2DGfxResObj_GetPlttDataPtr(plttResObj); - template.vram = GF2DGfxResObj_GetLoadAddress(plttResObj); - template.id = GF2DGfxResObj_GetResID(plttResObj); - template.plttNum = GF2DGfxResObj_GetPlttNum(plttResObj); + template.vram = GF2DGfxResObj_GetLoadAddress(plttResObj); + template.id = GF2DGfxResObj_GetResID(plttResObj); + template.plttNum = GF2DGfxResObj_GetPlttNum(plttResObj); return ObjPlttTransfer_CreateTaskAndDoTransferFromTemplate_ExtPlttBanned(&template); } @@ -177,7 +177,7 @@ void sub_0200B050(GF_2DGfxResObjList *plttResObjList) { void sub_0200B084(GF_2DGfxResObj *plttResObj) { GF_ASSERT(plttResObj != NULL); - int resID = GF2DGfxResObj_GetResID(plttResObj); + int resID = GF2DGfxResObj_GetResID(plttResObj); NNSG2dPaletteData *plttData = GF2DGfxResObj_GetPlttDataPtr(plttResObj); ObjPlttTransfer_CreateTransferTask(resID, plttData); } @@ -212,7 +212,7 @@ NNSG2dImagePaletteProxy *GF_PlttResObj_GetPlttProxy(GF_2DGfxResObj *plttResObj, int GF_PlttResObj_GetVramSlotNum(GF_2DGfxResObj *plttResObj, NNS_G2D_VRAM_TYPE vram) { NNSG2dImagePaletteProxy *plttProxy = GF_PlttResObj_GetPlttProxy(plttResObj, NULL); - int location = NNS_G2dGetImagePaletteLocation(plttProxy, vram); + int location = NNS_G2dGetImagePaletteLocation(plttProxy, vram); if (location != -1) { location /= 32; } diff --git a/src/unk_0200CE7C.c b/src/unk_0200CE7C.c index 219246f967..f3cf8d7bfe 100644 --- a/src/unk_0200CE7C.c +++ b/src/unk_0200CE7C.c @@ -11,7 +11,7 @@ void sub_0200CEB0(BattleNumberPrinter *unk, u32 num, u32 ndigits, PrintingMode s for (int i = 0; unk->strbuf[i] != EOS; ++i) { if (unk->strbuf[i] >= CHAR_JP_0 && unk->strbuf[i] <= CHAR_JP_9) { const u8 *src = (const u8 *)unk->charData->pRawData + 32 * (unk->strbuf[i] - CHAR_JP_0); - u8 *dst = (u8 *)dest + i * 32; + u8 *dst = (u8 *)dest + i * 32; MI_CpuCopy32( src, dst, diff --git a/src/unk_0200CF18.c b/src/unk_0200CF18.c index 006ee7c57e..12286c6e38 100644 --- a/src/unk_0200CF18.c +++ b/src/unk_0200CF18.c @@ -34,9 +34,9 @@ SpriteRenderer *SpriteRenderer_Create(HeapID heapId) { if (ret == NULL) { return NULL; } - ret->heapId = heapId; + ret->heapId = heapId; ret->numGfxHandlers = 0; - ret->hasOamManager = TRUE; + ret->hasOamManager = TRUE; return ret; } @@ -65,8 +65,8 @@ BOOL SpriteRenderer_CreateOamCharPlttManagers(SpriteRenderer *renderer, const Oa ObjCharTransferTemplate transferTemplate; transferTemplate.maxTasks = oamTransferParam->maxTasks; transferTemplate.sizeMain = oamTransferParam->sizeMain; - transferTemplate.sizeSub = oamTransferParam->sizeSub; - transferTemplate.heapId = renderer->heapId; + transferTemplate.sizeSub = oamTransferParam->sizeSub; + transferTemplate.heapId = renderer->heapId; ObjCharTransfer_InitEx(&transferTemplate, oamTransferParam->charModeMain, oamTransferParam->charModeSub); ObjPlttTransfer_Init(numPltts, renderer->heapId); NNS_G2dInitOamManagerModule(); @@ -171,24 +171,24 @@ static BOOL sub_0200D124(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, numGfxResTypes = GF_GFX_RES_TYPE_MAX - 2; } gfxHandler->numGfxResObjectTypes = numGfxResTypes; - size = GF2DGfxResHeader_sizeof(); - gfxHandler->_2dGfxResHeader = AllocFromHeap(renderer->heapId, size * numGfxResTypes); - narc = NARC_New(NARC_data_resdat, renderer->heapId); + size = GF2DGfxResHeader_sizeof(); + gfxHandler->_2dGfxResHeader = AllocFromHeap(renderer->heapId, size * numGfxResTypes); + narc = NARC_New(NARC_data_resdat, renderer->heapId); for (i = 0; i < numGfxResTypes; ++i) { header = GF2DGfxResHeader_GetByIndex(gfxHandler->_2dGfxResHeader, i); - data = GfGfxLoader_LoadFromOpenNarc(narc, fileIdList[i], FALSE, renderer->heapId, TRUE); + data = GfGfxLoader_LoadFromOpenNarc(narc, fileIdList[i], FALSE, renderer->heapId, TRUE); GF2DGfxResHeader_Init((GF_2DGfxResHeaderNarcList *)data, header, renderer->heapId); FreeToHeap(data); } for (i = 0; i < numGfxResTypes; ++i) { - header = GF2DGfxResHeader_GetByIndex(gfxHandler->_2dGfxResHeader, i); - size = GF2dGfxResHeader_GetNumObjects(header); + header = GF2DGfxResHeader_GetByIndex(gfxHandler->_2dGfxResHeader, i); + size = GF2dGfxResHeader_GetNumObjects(header); gfxHandler->_2dGfxResMan[i] = Create2DGfxResObjMan(size, (GfGfxResType)i, renderer->heapId); } for (i = 0; i < numGfxResTypes; ++i) { - header = GF2DGfxResHeader_GetByIndex(gfxHandler->_2dGfxResHeader, i); - size = GF2dGfxResHeader_GetNumObjects(header); + header = GF2DGfxResHeader_GetByIndex(gfxHandler->_2dGfxResHeader, i); + size = GF2dGfxResHeader_GetNumObjects(header); gfxHandler->_2dGfxResObjList[i] = Create2DGfxResObjList(size, renderer->heapId); gfxHandler->numGfxResObjects[i] = LoadAll2DGfxResObjsFromHeader(gfxHandler->_2dGfxResMan[i], header, gfxHandler->_2dGfxResObjList[i], renderer->heapId); } @@ -213,7 +213,7 @@ static BOOL sub_0200D124(SpriteRenderer *renderer, SpriteGfxHandler *gfxHandler, sub_0200AFD8(gfxHandler->_2dGfxResObjList[GF_GFX_RES_TYPE_PLTT]); break; } - data = GfGfxLoader_LoadFromOpenNarc(narc, fileIdList[6], FALSE, renderer->heapId, TRUE); + data = GfGfxLoader_LoadFromOpenNarc(narc, fileIdList[6], FALSE, renderer->heapId, TRUE); gfxHandler->spriteHeaderList = SpriteResourceHeaderList_Create( (struct ResdatNarcEntry *)data, renderer->heapId, @@ -245,7 +245,7 @@ static Sprite *MyCreateSprite(SpriteRenderer *renderer, SpriteGfxHandler *gfxHan SpriteTemplate template; template.spriteList = gfxHandler->spriteList; - template.header = &gfxHandler->spriteHeaderList->headers[headerIndex]; + template.header = &gfxHandler->spriteHeaderList->headers[headerIndex]; template.position.x = FX32_CONST(x); template.position.y = FX32_CONST(y); @@ -254,14 +254,14 @@ static Sprite *MyCreateSprite(SpriteRenderer *renderer, SpriteGfxHandler *gfxHan if (whichScreen == NNS_G2D_VRAM_TYPE_2DSUB) { template.position.y += FX32_CONST(GX_LCD_SIZE_Y); } - template.scale.x = FX32_ONE; - template.scale.y = FX32_ONE; - template.scale.z = FX32_ONE; - template.rotation = 0; - template.priority = priority; + template.scale.x = FX32_ONE; + template.scale.y = FX32_ONE; + template.scale.z = FX32_ONE; + template.rotation = 0; + template.priority = priority; template.whichScreen = whichScreen; - template.heapId = renderer->heapId; - ret = Sprite_CreateAffine(&template); + template.heapId = renderer->heapId; + ret = Sprite_CreateAffine(&template); if (ret != NULL) { Sprite_SetAnimCtrlSeq(ret, animSeqNo); switch (a10) { @@ -420,7 +420,7 @@ static UnkImageStruct *MyLoadResourcesAndCreateSprite(SpriteRenderer *renderer, return NULL; } ret->spriteResourceHeaderList->headers = AllocFromHeap(renderer->heapId, sizeof(SpriteResourcesHeader)); - ret->spriteResourcesHeader = ret->spriteResourceHeaderList->headers; + ret->spriteResourcesHeader = ret->spriteResourceHeaderList->headers; if (ret->spriteResourceHeaderList->headers == NULL) { if (ret->spriteResourceHeaderList != NULL) { // always true FreeToHeap(ret->spriteResourceHeaderList); @@ -459,22 +459,22 @@ static UnkImageStruct *MyLoadResourcesAndCreateSprite(SpriteRenderer *renderer, gfxHandler->_2dGfxResMan[GF_GFX_RES_TYPE_MANM]); spriteTemplate.spriteList = gfxHandler->spriteList; - spriteTemplate.header = ret->spriteResourcesHeader; + spriteTemplate.header = ret->spriteResourcesHeader; spriteTemplate.position.x = FX32_CONST(unkTemplate->x); spriteTemplate.position.y = FX32_CONST(unkTemplate->y); spriteTemplate.position.z = FX32_CONST(unkTemplate->z); if (unkTemplate->vram == NNS_G2D_VRAM_TYPE_2DSUB) { spriteTemplate.position.y += yOffset; } - spriteTemplate.scale.x = FX32_ONE; - spriteTemplate.scale.y = FX32_ONE; - spriteTemplate.scale.z = FX32_ONE; - spriteTemplate.rotation = 0; - spriteTemplate.priority = unkTemplate->spritePriority; + spriteTemplate.scale.x = FX32_ONE; + spriteTemplate.scale.y = FX32_ONE; + spriteTemplate.scale.z = FX32_ONE; + spriteTemplate.rotation = 0; + spriteTemplate.priority = unkTemplate->spritePriority; spriteTemplate.whichScreen = unkTemplate->vram; - spriteTemplate.heapId = renderer->heapId; - ret->sprite = Sprite_CreateAffine(&spriteTemplate); - ret->vramTransfer = unkTemplate->vramTransfer; + spriteTemplate.heapId = renderer->heapId; + ret->sprite = Sprite_CreateAffine(&spriteTemplate); + ret->vramTransfer = unkTemplate->vramTransfer; if (ret->sprite != NULL) { Sprite_SetAnimCtrlSeq(ret->sprite, unkTemplate->animation); if (unkTemplate->pal != 0xFFFF) { @@ -794,7 +794,7 @@ void UnkImageStruct_SetSpritePositionXY_CustomScreenYOffset(UnkImageStruct *unk, void Sprite_GetPositionXY(Sprite *sprite, s16 *x, s16 *y) { const VecFx32 *pos = Sprite_GetMatrixPtr(sprite); - *x = pos->x / FX32_ONE; + *x = pos->x / FX32_ONE; if (Sprite_GetVramType(sprite) == NNS_G2D_VRAM_TYPE_2DSUB) { *y = (pos->y - GX_LCD_SIZE_Y * FX32_ONE) / FX32_ONE; } else { @@ -808,7 +808,7 @@ void UnkImageStruct_GetSpritePositionXY(UnkImageStruct *unk, s16 *x, s16 *y) { void Sprite_GetPositionXY_CustomScreenYOffset(Sprite *sprite, s16 *x, s16 *y, fx32 yOffset) { const VecFx32 *pos = Sprite_GetMatrixPtr(sprite); - *x = pos->x / FX32_ONE; + *x = pos->x / FX32_ONE; if (Sprite_GetVramType(sprite) == NNS_G2D_VRAM_TYPE_2DSUB) { *y = (pos->y - yOffset) / FX32_ONE; } else { @@ -823,9 +823,9 @@ void UnkImageStruct_GetSpritePositionXY_CustomScreenYOffset(UnkImageStruct *unk, void Sprite_AddPositionXY(Sprite *sprite, s16 dx, s16 dy) { VecFx32 vec; const VecFx32 *pos = Sprite_GetMatrixPtr(sprite); - vec.x = pos->x + dx * FX32_ONE; - vec.y = pos->y + dy * FX32_ONE; - vec.z = pos->z; + vec.x = pos->x + dx * FX32_ONE; + vec.y = pos->y + dy * FX32_ONE; + vec.z = pos->z; Sprite_SetMatrix(sprite, &vec); } @@ -836,25 +836,25 @@ void UnkImageStruct_AddSpritePositionXY(UnkImageStruct *unk, s16 dx, s16 dy) { void UnkImageStruct_AddSpritePrecisePositionXY(UnkImageStruct *unk, fx32 dx, fx32 dy) { VecFx32 vec; const VecFx32 *pos = Sprite_GetMatrixPtr(unk->sprite); - vec.x = pos->x + dx; - vec.y = pos->y + dy; - vec.z = pos->z; + vec.x = pos->x + dx; + vec.y = pos->y + dy; + vec.z = pos->z; Sprite_SetMatrix(unk->sprite, &vec); } void UnkImageStruct_SetSpritePrecisePositionXY_NoBottomScreenCorrection(UnkImageStruct *unk, fx32 x, fx32 y) { VecFx32 vec; const VecFx32 *pos = Sprite_GetMatrixPtr(unk->sprite); - vec.x = x; - vec.y = y; - vec.z = pos->z; + vec.x = x; + vec.y = y; + vec.z = pos->z; Sprite_SetMatrix(unk->sprite, &vec); } void UnkImageStruct_GetSpritePositionXY_NoBottomScreenCorrection(UnkImageStruct *unk, fx32 *x, fx32 *y) { const VecFx32 *pos = Sprite_GetMatrixPtr(unk->sprite); - *x = pos->x; - *y = pos->y; + *x = pos->x; + *y = pos->y; } void UnkImageStruct_SetSpritePrecisePositionXY(UnkImageStruct *unk, fx32 x, fx32 y, fx32 yOffset) { @@ -882,8 +882,8 @@ void sub_0200DF98(UnkImageStruct *unk, u8 a1) { void sub_0200DFA4(Sprite *sprite, f32 x, f32 y) { VecFx32 *scale = Sprite_GetScalePtr(sprite); - scale->x = FX_F32_TO_FX32(x); - scale->y = FX_F32_TO_FX32(y); + scale->x = FX_F32_TO_FX32(x); + scale->y = FX_F32_TO_FX32(y); Sprite_SetScale(sprite, scale); } @@ -893,8 +893,8 @@ void sub_0200E024(UnkImageStruct *unk, f32 x, f32 y) { void sub_0200E030(Sprite *sprite, f32 *x, f32 *y) { VecFx32 *scale = Sprite_GetScalePtr(sprite); - *x = FX_FX32_TO_F32(scale->x); - *y = FX_FX32_TO_F32(scale->y); + *x = FX_FX32_TO_F32(scale->x); + *y = FX_FX32_TO_F32(scale->y); } void sub_0200E060(UnkImageStruct *unk, f32 *x, f32 *y) { diff --git a/src/unk_02013FDC.c b/src/unk_02013FDC.c index 9b65f04150..60c23a5827 100644 --- a/src/unk_02013FDC.c +++ b/src/unk_02013FDC.c @@ -45,11 +45,11 @@ static void sub_02014050(int x, int y, int width, int height, NNSG2dCharacterDat GF_ASSERT(pCharData->W >= x + width); GF_ASSERT(pCharData->H >= y + height); - srcu8 = pCharData->pRawData; - dstu8 = dest; + srcu8 = pCharData->pRawData; + dstu8 = dest; srcBlockSize = pCharData->W * 4; - srcOffset = 4 * x + y * srcBlockSize; - dstOffset = 0; + srcOffset = 4 * x + y * srcBlockSize; + dstOffset = 0; for (int i = y; i < y + height; ++i) { for (int j = x; j < x + width; ++j) { @@ -110,8 +110,8 @@ void sub_020141C4(NarcId narcId, s32 fileId, HeapID heapId, int x, int y, int wi srcu8 = ppCharData->pRawData; UnscanPokepic(srcu8, narcId); - dstu8 = dest; - srcWidth = ppCharData->W * 4; + dstu8 = dest; + srcWidth = ppCharData->W * 4; srcOffset = x * 4 + y * srcWidth; dstOffset = 0; @@ -140,8 +140,8 @@ static void sub_020142D4(int srcWidth, int srcHeight, int x, int y, int width, i srcu8 = src; dstu8 = dest; - xmax = x + width; - ymax = y + height; + xmax = x + width; + ymax = y + height; for (i = y; i < ymax; ++i) { for (j = x; j < xmax; ++j) { srcOffset = 32 * j + 32 * i * srcWidth; @@ -165,7 +165,7 @@ static void sub_02014374(NarcId narcId, s32 fileId, HeapID heapId, int x, int y, { 8, 8, 2, 2 }, }; - int sp18 = 0; + int sp18 = 0; void *sp14 = sub_02014298(narcId, fileId, heapId, x, y, width, height); for (int i = 0; i < 6; ++i) { sub_02014350(width, height, &sp1C[i], &sp18, sp14, dest); @@ -189,7 +189,7 @@ void *sub_0201442C(NarcId narcId, s32 fileId, HeapID heapId) { } void *sub_02014450(NarcId narcId, s32 fileId, HeapID heapId) { - void *ret = AllocFromHeap(heapId, 0x20); + void *ret = AllocFromHeap(heapId, 0x20); void *pNclrFile = AllocAndReadWholeNarcMemberByIdPair(narcId, fileId, heapId); NNSG2dPaletteData *pPlttData; GF_ASSERT(NNS_G2dGetUnpackedPaletteData(pNclrFile, &pPlttData) == TRUE); @@ -208,7 +208,7 @@ void sub_02014494(NarcId narcId, s32 fileId, HeapID heapId, int x, int y, int wi { 8, 8, 2, 2 }, }; - int sp28 = 0; + int sp28 = 0; void *sp24 = sub_02014178(narcId, fileId, heapId, x, y, width, height, pid, isAnimated, whichFacing, species); for (int i = 0; i < 6; ++i) { sub_02014350(width, height, &sp2C[i], &sp28, sp24, dest); @@ -238,11 +238,11 @@ void sub_020145B4(const void *texSrc, int texDim, int x, int y, int w, int h, vo u8 *dstu8; int srcBlockSize; - srcu8 = texSrc; - dstu8 = dest; + srcu8 = texSrc; + dstu8 = dest; srcBlockSize = texDim * 4; - srcOffset = 4 * x + y * srcBlockSize; - dstOffset = 0; + srcOffset = 4 * x + y * srcBlockSize; + dstOffset = 0; for (int i = y; i < y + h; ++i) { for (int j = x; j < x + w; ++j) { diff --git a/src/unk_02018380.c b/src/unk_02018380.c index 1947be921d..80a605ee1d 100644 --- a/src/unk_02018380.c +++ b/src/unk_02018380.c @@ -11,11 +11,11 @@ void sub_02018380(void) { } void sub_0201838C(IGT *igt) { - s_021D10E8.unk0 = 1; + s_021D10E8.unk0 = 1; s_021D10E8.unk10 = 0; s_021D10E8.unk14 = 0; - s_021D10E8.unk8 = 0; - s_021D10E8.igt = igt; + s_021D10E8.unk8 = 0; + s_021D10E8.igt = igt; s_021D10E8.unk18 = sub_020254FC(); } @@ -24,7 +24,7 @@ void sub_020183B0(void) { return; } - u64 val = sub_020254FC(); + u64 val = sub_020254FC(); u64 val2 = sub_02025504(val - s_021D10E8.unk18); if (s_021D10E8.unk8 >= val2) { return; diff --git a/src/unk_02025534.c b/src/unk_02025534.c index 9f58dc84a3..9c65477def 100644 --- a/src/unk_02025534.c +++ b/src/unk_02025534.c @@ -56,7 +56,7 @@ GF_2DGfxRawResObj *GF2dGfxRawResMan_AllocObj(GF_2DGfxRawResMan *resourceMgr, voi GF_ASSERT(obj != NULL); GF_ASSERT(GF2dGfxRawResMan_DoesNotHaveObjWithId(resourceMgr, id) == TRUE); obj->data = resource; - obj->id = id; + obj->id = id; ++resourceMgr->num; return obj; } @@ -143,7 +143,7 @@ static GF_2DGfxRawResObj *GF2DGfxResMan_FindNextFreeObjSlot(GF_2DGfxRawResMan *r static void GF2DGfxResObj_Init(GF_2DGfxRawResObj *obj) { GF_ASSERT(obj != NULL); - obj->id = -1; + obj->id = -1; obj->data = NULL; } @@ -153,8 +153,8 @@ static void GF2DGfxResObj_Init(GF_2DGfxRawResObj *obj) { GF_3DGfxRawResMan *GF3dGfxRawResMan_Create(int num, HeapID heapId) { GF_3DGfxRawResMan *ret = AllocFromHeap(heapId, sizeof(GF_3DGfxRawResMan)); - ret->man = GF2dGfxRawResMan_Create(num, heapId); - ret->objs = AllocFromHeap(heapId, num * sizeof(GF_3DGfxRawResObj)); + ret->man = GF2dGfxRawResMan_Create(num, heapId); + ret->objs = AllocFromHeap(heapId, num * sizeof(GF_3DGfxRawResObj)); for (int i = 0; i < num; ++i) { GF_3DGfxResObj_Init(&ret->objs[i]); } @@ -178,13 +178,13 @@ GF_3DGfxRawResObj *GF3dGfxRawResMan_AllocObj(GF_3DGfxRawResMan *man, void *resou GF_3DGfxRawResObj *ret; void *newResource; GF_ASSERT(man != NULL); - ret = GF_3DGfxResMan_FindNextFreeObjSlot(man); + ret = GF_3DGfxResMan_FindNextFreeObjSlot(man); ret->headerNeedsLoad = shouldCopyWithoutTex; if (ret->headerNeedsLoad == TRUE) { - newResource = ResFileHeaderCopyWithoutTex(resource, heapId); + newResource = ResFileHeaderCopyWithoutTex(resource, heapId); ret->resFileHeader = resource; } else { - newResource = resource; + newResource = resource; ret->resFileHeader = NULL; } ret->obj = GF2dGfxRawResMan_AllocObj(man->man, newResource, id); @@ -293,7 +293,7 @@ void GF3dGfxRawResObj_FreeVramAndSecondaryHeader(GF_3DGfxRawResObj *obj) { ResTexReleaseKeys(GF_3DGfxResObj_GetTex_MaybeFromSecondaryHeader(obj)); ResTexSetKeys(GF_3DGfxResObj_GetTex_Internal(obj), obj->texKey, obj->tex4x4Key, obj->plttKey); FreeToHeap(obj->resFileHeader); - obj->resFileHeader = NULL; + obj->resFileHeader = NULL; obj->hasLoadedFromHeader = TRUE; } @@ -342,12 +342,12 @@ static GF_3DGfxRawResObj *GF_3DGfxResMan_FindNextFreeObjSlot(const GF_3DGfxRawRe } static void GF_3DGfxResObj_Init(GF_3DGfxRawResObj *obj) { - obj->obj = NULL; - obj->texKey = 0; - obj->tex4x4Key = 0; - obj->plttKey = 0; + obj->obj = NULL; + obj->texKey = 0; + obj->tex4x4Key = 0; + obj->plttKey = 0; obj->hasLoadedFromHeader = FALSE; - obj->resFileHeader = NULL; + obj->resFileHeader = NULL; obj->hasLoadedFromHeader = FALSE; // BUG: should be headerNeedsLoad? } @@ -364,9 +364,9 @@ static void ResTexAllocVramAndGetKeys(NNSG3dResTex *tex, NNSG3dTexKey *texKey, N u32 tex4x4Size; u32 plttSize; - texSize = NNS_G3dTexGetRequiredSize(tex); + texSize = NNS_G3dTexGetRequiredSize(tex); tex4x4Size = NNS_G3dTex4x4GetRequiredSize(tex); - plttSize = NNS_G3dPlttGetRequiredSize(tex); + plttSize = NNS_G3dPlttGetRequiredSize(tex); if (texSize != 0) { *texKey = NNS_GfdAllocTexVram(texSize, FALSE, 0); @@ -399,7 +399,7 @@ static void ResTexReleaseKeys(NNSG3dResTex *tex) { } static void *ResFileHeaderCopyWithoutTex(const NNSG3dResFileHeader *header, HeapID heapId) { - u32 size = ResFileHeaderGetSizeWithoutTex(header); + u32 size = ResFileHeaderGetSizeWithoutTex(header); void *ret = AllocFromHeap(heapId, size); memcpy(ret, header, size); return ret; diff --git a/src/unk_02026E30.c b/src/unk_02026E30.c index 4cff0d24a8..868ed9d757 100644 --- a/src/unk_02026E30.c +++ b/src/unk_02026E30.c @@ -18,9 +18,9 @@ void Thunk_G3X_Reset(void) { } void RequestSwap3DBuffers(GXSortMode sortMode, GXBufferMode bufferMode) { - sGXRequest.sortMode = sortMode; + sGXRequest.sortMode = sortMode; sGXRequest.bufferMode = bufferMode; - sGXRequest.requested = TRUE; + sGXRequest.requested = TRUE; } void Handle3DBufferSwapRequest(void) { diff --git a/src/unk_0203170C.c b/src/unk_0203170C.c index 3fc73a5abf..b936bae3e1 100644 --- a/src/unk_0203170C.c +++ b/src/unk_0203170C.c @@ -80,15 +80,15 @@ static void sub_020317F4(SaveData *saveData, Unk020317F4 *a1) { PlayerProfile *profile; wifiHistory = Save_WiFiHistory_Get(saveData); - profile = Save_PlayerData_GetProfileAddr(saveData); - ptr2 = sub_02031774(saveData); + profile = Save_PlayerData_GetProfileAddr(saveData); + ptr2 = sub_02031774(saveData); MI_CpuClear8(a1, sizeof(Unk020317F4)); - a1->version = GAME_VERSION; + a1->version = GAME_VERSION; a1->language = GAME_LANGUAGE; - a1->unk2 = WifiHistory_GetPlayerCountry(wifiHistory); - a1->unk3 = WiFiHistory_GetPlayerRegion(wifiHistory); - a1->otId = PlayerProfile_GetTrainerID(profile); + a1->unk2 = WifiHistory_GetPlayerCountry(wifiHistory); + a1->unk3 = WiFiHistory_GetPlayerRegion(wifiHistory); + a1->otId = PlayerProfile_GetTrainerID(profile); CopyU16StringArray(a1->name, PlayerProfile_GetNamePtr(profile)); a1->unk18 = 0; strcpy(a1->unk24, ptr2->unk0); @@ -102,7 +102,7 @@ s32 sub_0203186C(SaveData *saveData, Unk020317F4 *a1) { sub_020317F4(saveData, a1); - rand = LCRandom() % 1000; + rand = LCRandom() % 1000; a1->unk60 = rand; a1->unk62 = 0xffff; diff --git a/src/unk_0204A3F4.c b/src/unk_0204A3F4.c index 97da51e20c..a6d6183352 100644 --- a/src/unk_0204A3F4.c +++ b/src/unk_0204A3F4.c @@ -119,16 +119,16 @@ BOOL sub_0204A5B0(u16 numRequired, SaveData *saveData, BOOL checkDuplicateItems) u8 numValid; u16 species, item, form; Party *party = SaveArray_Party_Get(saveData); - partyCount = Party_GetCount(party); + partyCount = Party_GetCount(party); if (partyCount < numRequired) { return FALSE; } SpeciesAndItem validMons[PARTY_SIZE]; for (i = 0, numValid = 0; i < partyCount; i++) { Pokemon *mon = Party_GetMonByIndex(party, i); - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); - form = GetMonData(mon, MON_DATA_FORM, NULL); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); + form = GetMonData(mon, MON_DATA_FORM, NULL); if (!checkDuplicateItems) { item = ITEM_NONE; } @@ -142,7 +142,7 @@ BOOL sub_0204A5B0(u16 numRequired, SaveData *saveData, BOOL checkDuplicateItems) continue; } validMons[numValid].species = species; - validMons[numValid].item = item; + validMons[numValid].item = item; numValid++; } if (numValid < numRequired) { @@ -164,13 +164,13 @@ u32 sub_0204A6A0(u32 a0) { } void sub_0204A6A8(FieldSystem *fieldSystem) { - Location *warp = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); - u32 y = GetPlayerZCoord(fieldSystem->playerAvatar); - u32 x = GetPlayerXCoord(fieldSystem->playerAvatar); - warp->mapId = fieldSystem->location->mapId; - warp->warpId = -1; - warp->x = x; - warp->y = y; + Location *warp = LocalFieldData_GetDynamicWarp(Save_LocalFieldData_Get(fieldSystem->saveData)); + u32 y = GetPlayerZCoord(fieldSystem->playerAvatar); + u32 x = GetPlayerXCoord(fieldSystem->playerAvatar); + warp->mapId = fieldSystem->location->mapId; + warp->warpId = -1; + warp->x = x; + warp->y = y; warp->direction = DIR_NORTH; SetFlag966(Save_VarsFlags_Get(fieldSystem->saveData)); } @@ -203,9 +203,9 @@ u16 sub_0204A750(SaveData *saveData) { } u32 sub_0204A764(SaveData *saveData) { - u32 unk = sub_0202D908(saveData); + u32 unk = sub_0202D908(saveData); FRONTIERDATA *frontierData = Save_FrontierData_Get(saveData); - u8 unk4 = sub_0202D284(unk, 0, 0); + u8 unk4 = sub_0202D284(unk, 0, 0); if (unk4 == 5) { return unk4; } @@ -235,14 +235,14 @@ UnkStruct_Fsys_A0 *sub_0204A824(SaveData *saveData, BOOL resumeFromPrevious, u32 UnkStruct_Fsys_A0 *unkStruct = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_Fsys_A0)); MI_CpuClear8(unkStruct, sizeof(UnkStruct_Fsys_A0)); unkStruct->heapId = HEAP_ID_FIELD; - unkStruct->unk70 = sub_0202D908(saveData); - unkStruct->unk74 = Save_FrontierData_Get(saveData); - unkStruct->unk00 = 0x12345678; + unkStruct->unk70 = sub_0202D908(saveData); + unkStruct->unk74 = Save_FrontierData_Get(saveData); + unkStruct->unk00 = 0x12345678; sub_0202D3E4(unkStruct->unk70, 0); if (!resumeFromPrevious) { - unkStruct->unk0f = a2; - unkStruct->unk0e = sub_0204A3F4(unkStruct->unk0f); - unkStruct->unk0c = 1; + unkStruct->unk0f = a2; + unkStruct->unk0e = sub_0204A3F4(unkStruct->unk0f); + unkStruct->unk0c = 1; unkStruct->curWinStreak = 0; for (u16 i = 0; i < 4; i++) { unkStruct->unk2a[i] = 0xff; @@ -254,10 +254,10 @@ UnkStruct_Fsys_A0 *sub_0204A824(SaveData *saveData, BOOL resumeFromPrevious, u32 u8 unk = unkStruct->unk0f; sub_0202D308(unkStruct->unk70, 0, &unk); } else { - unkStruct->unk0f = sub_0202D284(unkStruct->unk70, 0, 0); - unkStruct->unk0c = sub_0202D284(unkStruct->unk70, 1, 0); + unkStruct->unk0f = sub_0202D284(unkStruct->unk70, 0, 0); + unkStruct->unk0c = sub_0202D284(unkStruct->unk70, 1, 0); unkStruct->curWinStreak = unkStruct->unk0c - 1; - unkStruct->unk0e = sub_0204A3F4(unkStruct->unk0f); + unkStruct->unk0e = sub_0204A3F4(unkStruct->unk0f); sub_0202D284(unkStruct->unk70, 5, unkStruct->unk2a); sub_0202D284(unkStruct->unk70, 8, unkStruct->unk3e); unkStruct->unk08 = sub_0202D284(unkStruct->unk70, 10, 0); @@ -275,7 +275,7 @@ UnkStruct_Fsys_A0 *sub_0204A824(SaveData *saveData, BOOL resumeFromPrevious, u32 unkStruct->unk11 = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(saveData)); if (unkStruct->unk0f != 5) { FrontierSave *frontierSaveData = Save_Frontier_GetStatic(saveData); - GameStats *gameStats = Save_GameStats_Get(saveData); + GameStats *gameStats = Save_GameStats_Get(saveData); u16 unk0; if (unkStruct->unk0f == 6) { unk0 = Save_VarsFlags_GetVar4052(Save_VarsFlags_Get(saveData)); @@ -339,8 +339,8 @@ u32 sub_0204AB10(UnkStruct_Fsys_A0 *a0, SaveData *saveData) { Party *party = SaveArray_Party_Get(saveData); for (u16 i = 0; i < a0->unk0e; i++) { Pokemon *mon = Party_GetMonByIndex(party, a0->unk2a[i]); - species[i] = GetMonData(mon, MON_DATA_SPECIES, NULL); - items[i] = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); + species[i] = GetMonData(mon, MON_DATA_SPECIES, NULL); + items[i] = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); if (i == 0) { continue; } @@ -430,7 +430,7 @@ static void sub_0204ACA0(UnkStruct_Fsys_A0 *a0, SaveData *saveData, BOOL a2, u16 } void sub_0204AD04(UnkStruct_Fsys_A0 *a0, SaveData *saveData) { - GameStats *gameStats = Save_GameStats_Get(saveData); + GameStats *gameStats = Save_GameStats_Get(saveData); FrontierSave *frontierSaveData = Save_Frontier_GetStatic(saveData); if (a0->unk0f == 5) { return; @@ -466,9 +466,9 @@ void sub_0204AE20(UnkStruct_Fsys_A0 *a0, SaveData *saveData) { if (a0->unk0f == 5) { return; } - GameStats *gameStats = Save_GameStats_Get(saveData); + GameStats *gameStats = Save_GameStats_Get(saveData); FrontierSave *frontierSaveData = Save_Frontier_GetStatic(saveData); - u32 unk4 = a0->unk0f == 6 ? 112 : a0->unk0f * 2; + u32 unk4 = a0->unk0f == 6 ? 112 : a0->unk0f * 2; if (a0->unk0f == 6) { FrontierSave_GetStat(Save_Frontier_GetStatic(saveData), 100, sub_0205C268(100)); } else { @@ -666,9 +666,9 @@ u16 sub_0204B258(UnkStruct_Fsys_A0 *a0, SaveData *saveData) { } static BOOL sub_0204B2B8(SaveData *saveData, u32 ribbon, UnkStruct_Fsys_A0 *a2) { - u8 value = TRUE; + u8 value = TRUE; Party *party = SaveArray_Party_Get(saveData); - u8 count = 0; + u8 count = 0; for (s32 i = 0; i < a2->unk0e; i++) { Pokemon *mon = Party_GetMonByIndex(party, a2->unk2a[i]); if (GetMonData(mon, ribbon, NULL) == FALSE) { @@ -696,20 +696,20 @@ static u32 sub_0204B318(UnkStruct_Fsys_A0 *a0) { static void sub_0204B34C(UnkStruct_0204B470 *a0, Pokemon *mon) { a0->species = GetMonData(mon, MON_DATA_SPECIES, NULL); - a0->form = GetMonData(mon, MON_DATA_FORM, NULL); - a0->item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); + a0->form = GetMonData(mon, MON_DATA_FORM, NULL); + a0->item = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); for (s32 i = 0; i < MAX_MON_MOVES; i++) { a0->moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); a0->ppUp |= GetMonData(mon, MON_DATA_MOVE1PPUP + i, NULL) << (i * 2); } a0->language = GetMonData(mon, MON_DATA_GAME_LANGUAGE, NULL); - a0->otId = GetMonData(mon, MON_DATA_OTID, NULL); - a0->pid = GetMonData(mon, MON_DATA_PERSONALITY, NULL); - a0->ivsWord = GetMonData(mon, MON_DATA_IVS_WORD, NULL); + a0->otId = GetMonData(mon, MON_DATA_OTID, NULL); + a0->pid = GetMonData(mon, MON_DATA_PERSONALITY, NULL); + a0->ivsWord = GetMonData(mon, MON_DATA_IVS_WORD, NULL); for (s32 i = 0; i < NUM_STATS; i++) { a0->evs[i] = GetMonData(mon, MON_DATA_HP_EV + i, NULL); } - a0->ability = GetMonData(mon, MON_DATA_ABILITY, NULL); + a0->ability = GetMonData(mon, MON_DATA_ABILITY, NULL); a0->friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); GetMonData(mon, MON_DATA_NICKNAME_FLAT, a0->nickname); } diff --git a/src/unk_0204B538.c b/src/unk_0204B538.c index f612227383..174d23d12b 100644 --- a/src/unk_0204B538.c +++ b/src/unk_0204B538.c @@ -35,7 +35,7 @@ static u32 sub_0204BABC(UnkStruct_Fsys_A0 *a0, u16 *a1, u16 frontierTrainerIndex static u16 *sub_0204BC7C(u32 frontierTrainerIndex, HeapID heapId); static void GetFrontierMon(FrontierMon *mon, u32 frontierMonIndex); -static const u16 _020FBFA4[] = { ITEM_BRIGHTPOWDER, ITEM_LUM_BERRY, ITEM_LEFTOVERS, ITEM_QUICK_CLAW }; +static const u16 _020FBFA4[] = { ITEM_BRIGHTPOWDER, ITEM_LUM_BERRY, ITEM_LEFTOVERS, ITEM_QUICK_CLAW }; static const u16 _020FBFAC[][2] = { { 0, 99 }, { 80, 119 }, @@ -127,10 +127,10 @@ MessageFormat *sub_0204B538(SaveData *saveData, u16 numEligiblePokemon, u16 a2, Pokedex *pokedex; MessageFormat *messageFormat; MsgData *messageData; - speciesName = String_New(14, HEAP_ID_4); - unused = String_New(2, HEAP_ID_4); - pokedex = Save_Pokedex_Get(saveData); - messageData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0237_bin, HEAP_ID_4); + speciesName = String_New(14, HEAP_ID_4); + unused = String_New(2, HEAP_ID_4); + pokedex = Save_Pokedex_Get(saveData); + messageData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0237_bin, HEAP_ID_4); messageFormat = MessageFormat_New_Custom(19, 14, HEAP_ID_4); BufferIntegerAsString(messageFormat, 0, numEligiblePokemon, 1, PRINTING_MODE_LEFT_ALIGN, TRUE); for (u8 i = 0; i < NUM_BANNED_BATTLE_FRONTIER; i++) { @@ -158,13 +158,13 @@ u32 sub_0204B5E8(u8 a0) { } u16 sub_0204B610(FieldSystem *fieldSystem, u16 *a1) { - u16 unk = 0; + u16 unk = 0; UnkStruct_Fsys_A0 *unkStruct = fieldSystem->unkA0; - unkStruct->unk12 = a1[0]; - unkStruct->unk16 = a1[1]; - unkStruct->unk18 = a1[2]; - unkStruct->unk14 = a1[3]; - unkStruct->unk10_5 = unkStruct->unk12 + 5; + unkStruct->unk12 = a1[0]; + unkStruct->unk16 = a1[1]; + unkStruct->unk18 = a1[2]; + unkStruct->unk14 = a1[3]; + unkStruct->unk10_5 = unkStruct->unk12 + 5; if (unkStruct->unk2e[0] == unkStruct->unk16 || unkStruct->unk2e[0] == unkStruct->unk18) { unk++; } @@ -189,9 +189,9 @@ BOOL sub_0204B690(FieldSystem *fieldSystem, u16 *a1) { void sub_0204B6AC(UnkStruct_Fsys_A0 *a0, SaveData *saveData) { a0->unk83e[0] = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(saveData)); - Party *party = SaveArray_Party_Get(saveData); + Party *party = SaveArray_Party_Get(saveData); for (s32 i = 0; i < 2; i++) { - Pokemon *mon = Party_GetMonByIndex(party, a0->unk2a[i]); + Pokemon *mon = Party_GetMonByIndex(party, a0->unk2a[i]); a0->unk83e[1 + i] = GetMonData(mon, MON_DATA_SPECIES, NULL); } a0->unk83e[3] = sub_0202D57C(a0->unk74, 3, 0); @@ -202,7 +202,7 @@ void sub_0204B708(UnkStruct_Fsys_A0 *a0) { } void sub_0204B720(UnkStruct_Fsys_A0 *a0, u32 a1) { - a0->unk10_3 = a1; + a0->unk10_3 = a1; a0->unk83e[0] = a1; } @@ -231,11 +231,11 @@ u16 sub_0204B73C(UnkStruct_Fsys_A0 *a0, u8 a1, u8 a2, u32 a3) { static u16 *sub_0204B7D0(UnkStruct_0204B7D0 *a0, u32 frontierTrainerIndex, HeapID heapId) { MsgData *messageData = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0027_bin, heapId); MI_CpuClear8(a0, sizeof(UnkStruct_0204B7D0)); - u16 *unk = sub_0204BC7C(frontierTrainerIndex, heapId); - a0->unk00 = frontierTrainerIndex; - a0->unk18 = 0xffff; - a0->unk1a = frontierTrainerIndex * 3; - a0->unk04 = unk[0]; + u16 *unk = sub_0204BC7C(frontierTrainerIndex, heapId); + a0->unk00 = frontierTrainerIndex; + a0->unk18 = 0xffff; + a0->unk1a = frontierTrainerIndex * 3; + a0->unk04 = unk[0]; String *trainerName = NewString_ReadMsgData(messageData, frontierTrainerIndex); CopyStringToU16Array(trainerName, a0->unk08, NELEMS(a0->unk08)); String_Delete(trainerName); @@ -248,9 +248,9 @@ static u32 sub_0204B834(UnkStruct_Fsys_A0 *a0, UnkStruct_0204B470 *a1, u16 front FrontierMon frontierMon; MI_CpuClear8(a1, sizeof(UnkStruct_0204B470)); GetFrontierMon(&frontierMon, frontierMonIndex); - a1->species = frontierMon.species; - a1->form = frontierMon.form; - a1->item = a7 ? _020FBFA4[a6] : frontierMon.item; + a1->species = frontierMon.species; + a1->form = frontierMon.form; + a1->item = a7 ? _020FBFA4[a6] : frontierMon.item; u32 friendship = FRIENDSHIP_MAX; for (i = 0; i < MAX_MON_MOVES; i++) { a1->moves[i] = frontierMon.moves[i]; @@ -268,15 +268,15 @@ static u32 sub_0204B834(UnkStruct_Fsys_A0 *a0, UnkStruct_0204B470 *a1, u16 front a1->pid = pid; } else { a1->pid = a4; - pid = a4; + pid = a4; } - a1->hpIv = iv; - a1->atkIv = iv; - a1->defIv = iv; - a1->spdIv = iv; + a1->hpIv = iv; + a1->atkIv = iv; + a1->defIv = iv; + a1->spdIv = iv; a1->spAtkIv = iv; a1->spDefIv = iv; - s32 ev = 0; + s32 ev = 0; for (i = 0; i < NUM_STATS; i++) { if (frontierMon.evs & MaskOfFlagNo(i)) { ev++; @@ -291,9 +291,9 @@ static u32 sub_0204B834(UnkStruct_Fsys_A0 *a0, UnkStruct_0204B470 *a1, u16 front a1->evs[i] = ev; } } - a1->ppUp = 0; + a1->ppUp = 0; a1->language = gGameLanguage; - u32 ability = GetMonBaseStat(a1->species, BASE_ABILITY_2); + u32 ability = GetMonBaseStat(a1->species, BASE_ABILITY_2); if (ability != ABILITY_NONE) { if (a1->pid % 2) { a1->ability = ability; @@ -310,7 +310,7 @@ static u32 sub_0204B834(UnkStruct_Fsys_A0 *a0, UnkStruct_0204B470 *a1, u16 front u32 sub_0204BA04(UnkStruct_Fsys_A0 *a0, UnkStruct_0204B7D0 *a1, u16 frontierTrainerIndex, u32 a3, u16 *a4, u16 *a5, UnkStruct_0204A824_7E8 *a6, HeapID heapId) { u16 *unk7 = sub_0204B7D0(a1, frontierTrainerIndex, heapId); - u32 unk4 = sub_0204BABC(a0, unk7, frontierTrainerIndex, a1->unk30, a3, a4, a5, a6, heapId); + u32 unk4 = sub_0204BABC(a0, unk7, frontierTrainerIndex, a1->unk30, a3, a4, a5, a6, heapId); FreeToHeap(unk7); return unk4; } @@ -318,7 +318,7 @@ u32 sub_0204BA04(UnkStruct_Fsys_A0 *a0, UnkStruct_0204B7D0 *a1, u16 frontierTrai void sub_0204BA50(UnkStruct_Fsys_A0 *a0, UnkStruct_0204B7D0 *a1, u16 frontierTrainerIndex, u32 a3, UnkStruct_0204A824_7E8 *a4, HeapID heapId) { u8 iv; u16 *unk = sub_0204B7D0(a1, frontierTrainerIndex, heapId); - iv = sub_0204B4D4(frontierTrainerIndex); + iv = sub_0204B4D4(frontierTrainerIndex); for (s32 i = 0; i < 2; i++) { sub_0204B834(a0, &a1->unk30[i], a4->unk04[i], a4->otId, a4->unk08[i], iv, i, a3, heapId); } @@ -338,9 +338,9 @@ static u32 sub_0204BABC(UnkStruct_Fsys_A0 *a0, u16 *a1, u16 frontierTrainerIndex FrontierMon unk4c; GF_ASSERT(a4 <= 4); s32 unk = 0; - unk2c = 0; + unk2c = 0; while (unk != a4) { - u8 index = sub_0204B510(a0) % a1[1]; + u8 index = sub_0204B510(a0) % a1[1]; frontierMonIndex = a1[2 + index]; GetFrontierMon(&unk4c, frontierMonIndex); for (i = 0; i < unk; i++) { @@ -388,7 +388,7 @@ static u32 sub_0204BABC(UnkStruct_Fsys_A0 *a0, u16 *a1, u16 frontierTrainerIndex unk6c[unk] = frontierMonIndex; unk++; } - iv = sub_0204B4D4(frontierTrainerIndex); + iv = sub_0204B4D4(frontierTrainerIndex); otId = sub_0204B510(a0) | sub_0204B510(a0) << 16; if (unk2c >= 50) { unk28 = TRUE; diff --git a/src/unk_02055418.c b/src/unk_02055418.c index f95bebc672..f54c275854 100644 --- a/src/unk_02055418.c +++ b/src/unk_02055418.c @@ -50,7 +50,7 @@ void sub_02055450(FieldSystem *fieldSystem, SysInfo_RTC *sysinfo, RTCDate *date) } void sub_02055478(FieldSystem *fieldSystem, SysInfo_RTC *sysinfo, RTCDate *date, RTCTime *time) { - s64 seconds = RTC_ConvertDateTimeToSecond(date, time); + s64 seconds = RTC_ConvertDateTimeToSecond(date, time); s64 sys_seconds = RTC_ConvertDateTimeToSecond(&sysinfo->date, &sysinfo->time); if (seconds < sys_seconds) { sysinfo->date = *date; @@ -129,7 +129,7 @@ void FieldSystem_GetGameClearTime(FieldSystem *fieldSystem, RTCDate *date, RTCTi } void FieldSystem_SetGameClearTime(FieldSystem *fieldSystem) { - SysInfo_RTC *sysinfo = Save_SysInfo_RTC_Get(fieldSystem->saveData); + SysInfo_RTC *sysinfo = Save_SysInfo_RTC_Get(fieldSystem->saveData); sysinfo->seconds_at_game_clear = GF_RTC_DateTimeToSec(); } @@ -157,7 +157,7 @@ void sub_020556B8(FieldSystem *fieldSystem) { } void sub_020556C8(FieldSystem *fieldSystem, UnkStruct_020556FC *unkPtrB) { - void *unkB = fieldSystem->unk_44; + void *unkB = fieldSystem->unk_44; unkPtrB->unk5c = AllocFromHeap(unkPtrB->heapID, ov01_021F149C(unkB, 31)); ov01_021F14A8(unkB, 31, unkPtrB->unk5c); GF3dRender_InitObjFromHeader(&unkPtrB->unk4, &unkPtrB->unk58, &unkPtrB->unk5c); @@ -188,7 +188,7 @@ BOOL sub_02055760(FieldSystem *fieldSystem, LocalMapObject *mapObj) { BOOL sub_02055780(FieldSystem *fieldSystem, LocalMapObject *mapObj) { APRICORN_TREE *trees = Save_FieldApricornTrees_Get(fieldSystem->saveData); - int idx = MapObject_GetParam(mapObj, 0); + int idx = MapObject_GetParam(mapObj, 0); return sub_0202AE38(trees, idx); } diff --git a/src/unk_02055BF0.c b/src/unk_02055BF0.c index 9fd751eec9..d984569988 100644 --- a/src/unk_02055BF0.c +++ b/src/unk_02055BF0.c @@ -40,19 +40,19 @@ extern FieldSystemFunc _020FC76C[9]; void NewFieldFadeEnvironment(TaskManager *man, int pattern, int typeTop, int typeBottom, u16 colour, int duration, int framesPer, HeapID heapID) { FieldFadeEnvironment *sfenv = AllocFromHeap(heapID, sizeof(FieldFadeEnvironment)); - sfenv->pattern = pattern; - sfenv->typeTop = typeTop; - sfenv->typeBottom = typeBottom; - sfenv->colour = colour; - sfenv->duration = duration; - sfenv->framesPer = framesPer; - sfenv->heapID = heapID; - sfenv->state = 0; + sfenv->pattern = pattern; + sfenv->typeTop = typeTop; + sfenv->typeBottom = typeBottom; + sfenv->colour = colour; + sfenv->duration = duration; + sfenv->framesPer = framesPer; + sfenv->heapID = heapID; + sfenv->state = 0; TaskManager_Call(man, RoutineFieldFade, sfenv); } BOOL RoutineFieldFade(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldFadeEnvironment *fenv = TaskManager_GetEnvironment(man); switch (fenv->state) { case 0: @@ -73,30 +73,30 @@ BOOL RoutineFieldFade(TaskManager *man) { void NewFieldTransitionEnvironment(FieldSystem *fieldSystem, int mapID, int warpID, int x, int y, int dir, u32 transNo) { FieldTransitionEnvironment *fenv = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldTransitionEnvironment)); - fenv->state = 0; - fenv->transitionState = 0; - fenv->unk1 = 0; - fenv->location.mapId = mapID; - fenv->location.warpId = warpID; - fenv->location.x = x; - fenv->location.y = y; - fenv->location.direction = dir; - fenv->transitionNo = transNo; + fenv->state = 0; + fenv->transitionState = 0; + fenv->unk1 = 0; + fenv->location.mapId = mapID; + fenv->location.warpId = warpID; + fenv->location.x = x; + fenv->location.y = y; + fenv->location.direction = dir; + fenv->transitionNo = transNo; FieldSystem_CreateTask(fieldSystem, sub_02055DBC, fenv); } void sub_02055CD8(FieldSystem *fieldSystem, int mapID, int warpID, int x, int y, int dir) { FieldTransitionEnvironment *fenv = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldTransitionEnvironment)); - fenv->state = 0; - fenv->transitionState = 0; - fenv->unk1 = 0; - fenv->location.mapId = mapID; - fenv->location.warpId = warpID; - fenv->location.x = x; - fenv->location.y = y; - fenv->location.direction = dir; - int var = 0; - int otherID = fieldSystem->location->mapId; + fenv->state = 0; + fenv->transitionState = 0; + fenv->unk1 = 0; + fenv->location.mapId = mapID; + fenv->location.warpId = warpID; + fenv->location.x = x; + fenv->location.y = y; + fenv->location.direction = dir; + int var = 0; + int otherID = fieldSystem->location->mapId; if (MapHeader_IsCave(otherID)) { if (MapHeader_IsCave(mapID)) { var = 6; @@ -136,13 +136,13 @@ void sub_02055CD8(FieldSystem *fieldSystem, int mapID, int warpID, int x, int y, // this function handles transition routines between maps BOOL sub_02055DBC(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *env = TaskManager_GetEnvironment(man); switch (env->state) { case 0: env->transitionState = 0; - env->unk24 = NULL; - env->unk1 = 0; + env->unk24 = NULL; + env->unk1 = 0; if (FollowMon_IsActive(fieldSystem) && ov01_022057C4(fieldSystem) && PlayerAvatar_GetState(fieldSystem->playerAvatar) != PLAYER_STATE_CYCLING) { env->state = 9; break; @@ -150,7 +150,7 @@ BOOL sub_02055DBC(TaskManager *man) { case 1: if (FollowMon_IsActive(fieldSystem) && !ov01_022057C4(fieldSystem) && PlayerAvatar_GetState(fieldSystem->playerAvatar) != PLAYER_STATE_CYCLING) { LocalMapObject *followMon = FollowMon_GetMapObject(fieldSystem); - int species = FollowMon_GetSpecies(followMon); + int species = FollowMon_GetSpecies(followMon); if (!FollowMon_GetPermissionBySpeciesAndMap(species, env->location.mapId)) { env->unk24 = ov01_0220329C(followMon, 1); } @@ -233,7 +233,7 @@ BOOL sub_02055DBC(TaskManager *man) { } BOOL sub_02056004(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); switch (fenv->transitionState) { case 0: @@ -248,7 +248,7 @@ BOOL sub_02056004(TaskManager *man) { } BOOL sub_02056040(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); switch (fenv->transitionState) { case 0: @@ -273,7 +273,7 @@ BOOL sub_02056040(TaskManager *man) { } BOOL sub_020560C4(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); switch (fenv->transitionState) { case 0: @@ -296,7 +296,7 @@ BOOL sub_020560C4(TaskManager *man) { } BOOL sub_0205613C(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); LocalMapObject *obj; switch (fenv->transitionState) { @@ -312,7 +312,7 @@ BOOL sub_0205613C(TaskManager *man) { break; case 1: { int dir = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); - obj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); + obj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); if (dir == DIR_WEST) { MapObject_SetHeldMovement(obj, 10); } else if (dir == DIR_EAST) { @@ -345,7 +345,7 @@ BOOL sub_0205613C(TaskManager *man) { } BOOL sub_02056220(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); switch (fenv->transitionState) { @@ -360,7 +360,7 @@ BOOL sub_02056220(TaskManager *man) { } BOOL sub_02056268(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); switch (fenv->transitionState) { @@ -375,7 +375,7 @@ BOOL sub_02056268(TaskManager *man) { } BOOL sub_020562B0(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); LocalMapObject *obj; FieldEnvSubUnk18 *fenv18; @@ -386,9 +386,9 @@ BOOL sub_020562B0(TaskManager *man) { Field_PlayerAvatar_OrrTransitionFlags(fieldSystem->playerAvatar, 512); Field_PlayerAvatar_ApplyTransitionFlags(fieldSystem->playerAvatar); sub_0205F328(obj, 0); - fenv->unk18 = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldEnvSubUnk18)); - fenv18 = fenv->unk18; - fenv18->state = 0; + fenv->unk18 = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldEnvSubUnk18)); + fenv18 = fenv->unk18; + fenv18->state = 0; fenv18->direction = PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar); PlayerAvatar_ToggleAutomaticHeightUpdating(fieldSystem->playerAvatar, FALSE); ov01_021F6304(fieldSystem->unk2C); @@ -422,7 +422,7 @@ BOOL sub_020562B0(TaskManager *man) { case 1: obj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); VecFx32 pos; - fenv18 = fenv->unk18; + fenv18 = fenv->unk18; u32 state = fenv18->state; fenv18->state++; MapObject_CopyPositionVector(obj, &pos); @@ -453,7 +453,7 @@ BOOL sub_020562B0(TaskManager *man) { } BOOL sub_02056424(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); LocalMapObject *obj; FieldEnvSubUnk18 *fenv18; @@ -472,14 +472,14 @@ BOOL sub_02056424(TaskManager *man) { Field_PlayerAvatar_OrrTransitionFlags(fieldSystem->playerAvatar, 512); Field_PlayerAvatar_ApplyTransitionFlags(fieldSystem->playerAvatar); sub_0205F328(obj, 0); - fenv->unk18 = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldEnvSubUnk18)); + fenv->unk18 = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldEnvSubUnk18)); fenv->unk18->state = 0; PlayerAvatar_ToggleAutomaticHeightUpdating(fieldSystem->playerAvatar, FALSE); fenv->transitionState++; } break; case 2: - obj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); + obj = PlayerAvatar_GetMapObject(fieldSystem->playerAvatar); fenv18 = fenv->unk18; fenv18->state++; VecFx32 pos; @@ -506,7 +506,7 @@ BOOL sub_02056424(TaskManager *man) { } BOOL sub_02056530(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); LocalMapObject *obj; switch (fenv->transitionState) { @@ -541,7 +541,7 @@ BOOL sub_02056530(TaskManager *man) { } BOOL sub_020565FC(TaskManager *man) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(man); FieldTransitionEnvironment *fenv = TaskManager_GetEnvironment(man); switch (fenv->transitionState) { case 0: { diff --git a/src/unk_0205B3DC.c b/src/unk_0205B3DC.c index e50225b041..03d2049b31 100644 --- a/src/unk_0205B3DC.c +++ b/src/unk_0205B3DC.c @@ -63,7 +63,7 @@ int UnionRoomAvatarIdxToSprite(u32 trainerId, u32 playerGender, u32 choice) { int idx; int sprite; - idx = trainerId % 8; + idx = trainerId % 8; sprite = sPlayerAvatarIndexChoices[idx][choice]; return sPlayerAvatarAttributes[sprite + playerGender * 8][0]; } @@ -110,8 +110,8 @@ u16 *sub_0205B4A4(HeapID heapId) { int i; pltt_src = GfGfxLoader_GetPlttData(NARC_application_record_record, NARC_record_record_00000011_NCLR, &pPlttData, heapId); - ret = AllocFromHeap(heapId, 0x120 * 2); - plttRaw = pPlttData->pRawData; + ret = AllocFromHeap(heapId, 0x120 * 2); + plttRaw = pPlttData->pRawData; for (i = 0; i < 0x100; i++) { ret[i] = plttRaw[i]; } diff --git a/src/unk_020648EC.c b/src/unk_020648EC.c index 5f4a057106..dd7a5350d2 100644 --- a/src/unk_020648EC.c +++ b/src/unk_020648EC.c @@ -46,40 +46,40 @@ BOOL sub_02064938(FieldSystem *fieldSystem, u32 a1, u32 a2, u32 a3, u32 a4) { } static const FieldSystemFunc1 _020FE214[] = { - [GYMMICK_NONE] = NULL, - [GYMMICK_ECRUTEAK] = ov04_02254CBC, - [GYMMICK_CIANWOOD] = ov04_02255FC0, - [GYMMICK_VERMILION] = ov04_02256304, - [GYMMICK_VIOLET] = ov04_02253E20, - [GYMMICK_AZALEA] = ov04_02254190, + [GYMMICK_NONE] = NULL, + [GYMMICK_ECRUTEAK] = ov04_02254CBC, + [GYMMICK_CIANWOOD] = ov04_02255FC0, + [GYMMICK_VERMILION] = ov04_02256304, + [GYMMICK_VIOLET] = ov04_02253E20, + [GYMMICK_AZALEA] = ov04_02254190, [GYMMICK_BLACKTHORN] = ov04_02254F8C, - [GYMMICK_FUCHSIA] = ov04_02256650, - [GYMMICK_VIRIDIAN] = ov04_02256B64, - [GYMMICK_SINJOH] = ov04_02256E60, + [GYMMICK_FUCHSIA] = ov04_02256650, + [GYMMICK_VIRIDIAN] = ov04_02256B64, + [GYMMICK_SINJOH] = ov04_02256E60, }; static const FieldSystemFunc1 _020FE1EC[] = { - [GYMMICK_NONE] = NULL, - [GYMMICK_ECRUTEAK] = ov04_02254D84, - [GYMMICK_CIANWOOD] = ov04_02256044, - [GYMMICK_VERMILION] = ov04_022563B0, - [GYMMICK_VIOLET] = NULL, - [GYMMICK_AZALEA] = ov04_02254710, + [GYMMICK_NONE] = NULL, + [GYMMICK_ECRUTEAK] = ov04_02254D84, + [GYMMICK_CIANWOOD] = ov04_02256044, + [GYMMICK_VERMILION] = ov04_022563B0, + [GYMMICK_VIOLET] = NULL, + [GYMMICK_AZALEA] = ov04_02254710, [GYMMICK_BLACKTHORN] = ov04_0225507C, - [GYMMICK_FUCHSIA] = ov04_022566A0, - [GYMMICK_VIRIDIAN] = ov04_02256BA0, - [GYMMICK_SINJOH] = ov04_02256EB0, + [GYMMICK_FUCHSIA] = ov04_022566A0, + [GYMMICK_VIRIDIAN] = ov04_02256BA0, + [GYMMICK_SINJOH] = ov04_02256EB0, }; static const FieldSystemFunc2 _020FE23C[] = { - [GYMMICK_NONE] = NULL, - [GYMMICK_ECRUTEAK] = NULL, - [GYMMICK_CIANWOOD] = NULL, - [GYMMICK_VERMILION] = NULL, - [GYMMICK_VIOLET] = NULL, - [GYMMICK_AZALEA] = NULL, + [GYMMICK_NONE] = NULL, + [GYMMICK_ECRUTEAK] = NULL, + [GYMMICK_CIANWOOD] = NULL, + [GYMMICK_VERMILION] = NULL, + [GYMMICK_VIOLET] = NULL, + [GYMMICK_AZALEA] = NULL, [GYMMICK_BLACKTHORN] = ov04_022550D4, - [GYMMICK_FUCHSIA] = NULL, - [GYMMICK_VIRIDIAN] = NULL, - [GYMMICK_SINJOH] = NULL, + [GYMMICK_FUCHSIA] = NULL, + [GYMMICK_VIRIDIAN] = NULL, + [GYMMICK_SINJOH] = NULL, }; diff --git a/src/unk_0206B910.c b/src/unk_0206B910.c index 0a231f0580..d1124ffe17 100644 --- a/src/unk_0206B910.c +++ b/src/unk_0206B910.c @@ -63,9 +63,9 @@ typedef struct UnkStruct_0206BCD4 { } UnkStruct_0206BCD4; static const OVY_MGR_TEMPLATE _020FF480 = { - .init = ov57_022378DC, - .exec = ov57_02237AF8, - .exit = ov57_02237B20, + .init = ov57_022378DC, + .exec = ov57_02237AF8, + .exit = ov57_02237B20, .ovy_id = FS_OVERLAY_ID(OVY_57), }; @@ -79,34 +79,34 @@ static void sub_0206BD00(UnkStruct_0206BCD4 *a0); void sub_0206B910(TaskManager *taskManager, SaveData *saveData) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_0206B910 *r4 = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnkStruct_0206B910)); + UnkStruct_0206B910 *r4 = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnkStruct_0206B910)); memset(r4, 0, sizeof(UnkStruct_0206B910)); r4->saveData = saveData; - r4->unk04 = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0206B984)); + r4->unk04 = AllocFromHeap(HEAP_ID_FIELD, sizeof(UnkStruct_0206B984)); memset(r4->unk04, 0, sizeof(UnkStruct_0206B984)); - r4->unk04->options = Save_PlayerData_GetOptionsAddr(saveData); - r4->unk04->saveData = saveData; + r4->unk04->options = Save_PlayerData_GetOptionsAddr(saveData); + r4->unk04->saveData = saveData; r4->unk04->menuInputStatePtr = &fieldSystem->menuInputState; - r4->partyMenu = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); + r4->partyMenu = AllocFromHeap(HEAP_ID_FIELD, sizeof(PartyMenuArgs)); memset(r4->partyMenu, 0, sizeof(PartyMenuArgs)); TaskManager_Call(taskManager, sub_0206B984, r4); } static BOOL sub_0206B984(TaskManager *taskManager) { - UnkStruct_0206B910 *r7 = TaskManager_GetEnvironment(taskManager); - UnkStruct_0206B984 *r6 = r7->unk04; + UnkStruct_0206B910 *r7 = TaskManager_GetEnvironment(taskManager); + UnkStruct_0206B984 *r6 = r7->unk04; FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); switch (r7->state) { case 0: CallTask_LeaveOverworld(taskManager); - SealCase *sealCase = Save_SealCase_Get(r7->saveData); - r6->sealCase = sealCase; - r6->unk31 = 0; + SealCase *sealCase = Save_SealCase_Get(r7->saveData); + r6->sealCase = sealCase; + r6->unk31 = 0; r6->menuInputStatePtr = &fieldSystem->menuInputState; - Party *party = SaveArray_Party_Get(r7->saveData); - r6->party = party; - s32 partyCount = Party_GetCount(party); - r6->partyCount = partyCount; + Party *party = SaveArray_Party_Get(r7->saveData); + r6->party = party; + s32 partyCount = Party_GetCount(party); + r6->partyCount = partyCount; s32 i; for (i = 0; i < partyCount; i++) { r6->mons[i] = Party_GetMonByIndex(r6->party, i); @@ -133,22 +133,22 @@ static BOOL sub_0206B984(TaskManager *taskManager) { } break; case 3: - PartyMenuArgs *partyMenu = r7->partyMenu; - partyMenu->party = r6->party; - partyMenu->bag = Save_Bag_Get(r7->saveData); - partyMenu->mailbox = Save_Mailbox_Get(r7->saveData); - partyMenu->partySlot = 0; - partyMenu->unk_25 = 0; - partyMenu->context = PARTY_MENU_CONTEXT_ATTACH_CAPSULE; - partyMenu->options = r6->options; - partyMenu->fieldSystem = fieldSystem; + PartyMenuArgs *partyMenu = r7->partyMenu; + partyMenu->party = r6->party; + partyMenu->bag = Save_Bag_Get(r7->saveData); + partyMenu->mailbox = Save_Mailbox_Get(r7->saveData); + partyMenu->partySlot = 0; + partyMenu->unk_25 = 0; + partyMenu->context = PARTY_MENU_CONTEXT_ATTACH_CAPSULE; + partyMenu->options = r6->options; + partyMenu->fieldSystem = fieldSystem; partyMenu->menuInputStatePtr = &(fieldSystem->menuInputState); CallApplicationAsTask(taskManager, &gOverlayTemplate_PartyMenu, partyMenu); r7->state = 4; break; case 4: { PartyMenuArgs *partyMenu = r7->partyMenu; - u32 index = r7->unk04->unk30 + 1; + u32 index = r7->unk04->unk30 + 1; if (partyMenu->partySlot != 7) { Pokemon *mon = r7->unk04->mons[partyMenu->partySlot]; SetMonData(mon, MON_DATA_CAPSULE, &index); @@ -192,31 +192,31 @@ static BOOL sub_0206BB90(ScriptContext *ctx) { BOOL ScrCmd_234(ScriptContext *ctx) { UnkStruct_0206BCD4 **unkStruct = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 arg1 = ScriptGetVar(ctx); - u16 arg2 = ScriptGetVar(ctx); - u16 arg3 = ScriptGetVar(ctx); - u16 unused = ScriptGetVar(ctx); + u16 arg1 = ScriptGetVar(ctx); + u16 arg2 = ScriptGetVar(ctx); + u16 arg3 = ScriptGetVar(ctx); + u16 unused = ScriptGetVar(ctx); UnkStruct_0206BCEC unusedStruct; unusedStruct.unk00 = arg2; unusedStruct.unk01 = arg1; unusedStruct.unk02 = arg3; unusedStruct.unk18 = ctx->fieldSystem->saveData; - *unkStruct = sub_0206BCEC(&unusedStruct); + *unkStruct = sub_0206BCEC(&unusedStruct); return FALSE; } BOOL ScrCmd_235(ScriptContext *ctx) { UnkStruct_0206BCD4 **unkStruct = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 unused = ScriptGetVar(ctx); - u16 unused2 = MapHeader_GetMapSec(ctx->fieldSystem->location->mapId); + u16 unused = ScriptGetVar(ctx); + u16 unused2 = MapHeader_GetMapSec(ctx->fieldSystem->location->mapId); sub_0206BD00(*unkStruct); return FALSE; } BOOL ScrCmd_236(ScriptContext *ctx) { void **unused = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR); - u16 *result = ScriptGetVarPointer(ctx); - *result = 0; + u16 *result = ScriptGetVarPointer(ctx); + *result = 0; return FALSE; } diff --git a/src/unk_0206D494.c b/src/unk_0206D494.c index b1d8262312..60cb786854 100644 --- a/src/unk_0206D494.c +++ b/src/unk_0206D494.c @@ -64,10 +64,10 @@ BOOL sub_0206D494(FieldSystem *fieldSystem) { LocalMapObject *unk2 = sub_0206D590(unk1); if (unk2) { UnkStruct_0206D494 *unkStruct = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnkStruct_0206D494)); - unkStruct->unk00 = unk2; - unkStruct->unk04 = NULL; - unkStruct->unk08 = MapObject_GetFacingDirection(unk1); - unkStruct->unk09 = 0; + unkStruct->unk00 = unk2; + unkStruct->unk04 = NULL; + unkStruct->unk08 = MapObject_GetFacingDirection(unk1); + unkStruct->unk09 = 0; FieldSystem_CreateTask(fieldSystem, sub_0206D4E4, unkStruct); PlaySE(SEQ_SE_GS_HYOUKAI_HIT); return TRUE; @@ -77,9 +77,9 @@ BOOL sub_0206D494(FieldSystem *fieldSystem) { } static BOOL sub_0206D4E4(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); UnkStruct_0206D494 *unkStruct = TaskManager_GetEnvironment(taskManager); - u32 *state = TaskManager_GetStatePtr(taskManager); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: if (MapObject_IsMovementPaused(sub_0205C600(fieldSystem->mapObjectManager))) { @@ -112,13 +112,13 @@ static BOOL sub_0206D4E4(TaskManager *taskManager) { static LocalMapObject *sub_0206D590(LocalMapObject *object) { MapObjectManager *manager = MapObject_GetManager(object); - u32 direction = MapObject_GetFacingDirection(object); - u32 x = MapObject_GetCurrentX(object); - u32 dx = GetDeltaXByFacingDirection(direction); - u32 y = MapObject_GetCurrentY(object); - u32 z = MapObject_GetCurrentZ(object); - u32 dy = GetDeltaYByFacingDirection(direction); - LocalMapObject *obj = sub_0206D614(manager, x + dx, y, z + dy); + u32 direction = MapObject_GetFacingDirection(object); + u32 x = MapObject_GetCurrentX(object); + u32 dx = GetDeltaXByFacingDirection(direction); + u32 y = MapObject_GetCurrentY(object); + u32 z = MapObject_GetCurrentZ(object); + u32 dy = GetDeltaYByFacingDirection(direction); + LocalMapObject *obj = sub_0206D614(manager, x + dx, y, z + dy); if (obj) { if (MapObject_GetSpriteID(obj) != SPRITE_ICE) { return NULL; @@ -135,7 +135,7 @@ static LocalMapObject *sub_0206D590(LocalMapObject *object) { static LocalMapObject *sub_0206D614(MapObjectManager *manager, u32 x, u32 a2, u32 y) { LocalMapObject *object = MapObjectManager_GetObjects(manager); - u32 count = MapObjectManager_GetObjectCount(manager); + u32 count = MapObjectManager_GetObjectCount(manager); do { if (MapObject_GetFlagsBitsMask(object, MAPOBJECTFLAG_ACTIVE) && !MapObject_GetFlagsBitsMask(object, MAPOBJECTFLAG_UNK18)) { @@ -160,15 +160,15 @@ static u32 sub_0206D688(UnkStruct_0206D494 *a0) { switch (a0->unk09) { case 0: if (MapObject_IsMovementPaused(a0->unk00)) { - u32 x = MapObject_GetCurrentX(a0->unk00); - u32 dx = GetDeltaXByFacingDirection(a0->unk08); - u32 y = MapObject_GetCurrentY(a0->unk00); - u32 z = MapObject_GetCurrentZ(a0->unk00); - u32 dy = GetDeltaYByFacingDirection(a0->unk08); + u32 x = MapObject_GetCurrentX(a0->unk00); + u32 dx = GetDeltaXByFacingDirection(a0->unk08); + u32 y = MapObject_GetCurrentY(a0->unk00); + u32 z = MapObject_GetCurrentZ(a0->unk00); + u32 dy = GetDeltaYByFacingDirection(a0->unk08); u32 flags = sub_0206D7B8(a0->unk00, x + dx, y, z + dy); if (flags & 2) { MapObjectManager *manager = MapObject_GetManager(a0->unk00); - LocalMapObject *object = sub_0206D614(manager, x + dx, y, z + dy); + LocalMapObject *object = sub_0206D614(manager, x + dx, y, z + dy); if (!object) { GF_ASSERT(FALSE); return TRUE; @@ -271,15 +271,15 @@ static void sub_0206D850(PlayerAvatar *playerAvatar) { BOOL MonIsInGameTradePoke(Pokemon *mon, NpcTradeNum tradeNum) { NPCTrade *trade = GfGfxLoader_LoadFromNarc(NARC_a_1_1_2, tradeNum, FALSE, HEAP_ID_FIELD, TRUE); - BOOL result = MonIsInGameTradePokeInternal(mon, trade, tradeNum); + BOOL result = MonIsInGameTradePokeInternal(mon, trade, tradeNum); FreeToHeap(trade); return result != FALSE; } BOOL MonIsFromTogepiEgg(Pokemon *mon, SaveData *saveData) { PlayerProfile *profile = Save_PlayerData_GetProfileAddr(saveData); - SAVE_MISC_DATA *misc = Save_Misc_Get(saveData); - u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + SAVE_MISC_DATA *misc = Save_Misc_Get(saveData); + u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); if (!(species == SPECIES_TOGEPI || species == SPECIES_TOGETIC || species == SPECIES_TOGEKISS)) { @@ -350,9 +350,9 @@ static BOOL MonIsInGameTradePokeInternal(Pokemon *mon, NPCTrade *trade, NpcTrade return FALSE; } MsgData *messageData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0200_bin, HEAP_ID_FIELD); - String *monNickname = String_New(12, HEAP_ID_FIELD); + String *monNickname = String_New(12, HEAP_ID_FIELD); GetMonData(mon, MON_DATA_NICKNAME_STRING, monNickname); - String *tradeNickname = NewString_ReadMsgData(messageData, tradeNum); + String *tradeNickname = NewString_ReadMsgData(messageData, tradeNum); BOOL differentNickname = String_Compare(monNickname, tradeNickname); String_Delete(tradeNickname); String_Delete(monNickname); @@ -362,7 +362,7 @@ static BOOL MonIsInGameTradePokeInternal(Pokemon *mon, NPCTrade *trade, NpcTrade } String *monOtName = String_New(8, HEAP_ID_FIELD); GetMonData(mon, MON_DATA_OT_NAME_2, monOtName); - String *tradeOtName = NewString_ReadMsgData(messageData, NPC_TRADE_OT_NUM(tradeNum)); + String *tradeOtName = NewString_ReadMsgData(messageData, NPC_TRADE_OT_NUM(tradeNum)); BOOL differentOtName = String_Compare(monOtName, tradeOtName); String_Delete(tradeOtName); String_Delete(monOtName); @@ -392,10 +392,10 @@ void FieldSystem_IncrementBugContestTimer(FieldSystem *fieldSystem, int duration void BugContest_WarpToJudging(TaskManager *taskManager, FieldSystem *fieldSystem) { LocalFieldData *localFieldData = Save_LocalFieldData_Get(fieldSystem->saveData); Location warp; - warp.mapId = MAP_D22R0101; // national park - warp.warpId = -1; - warp.x = 46; - warp.y = 50; + warp.mapId = MAP_D22R0101; // national park + warp.warpId = -1; + warp.x = 46; + warp.y = 50; warp.direction = 0; LocalFieldData_SetDynamicWarp(localFieldData, &warp); sub_020537A8(taskManager, LocalFieldData_GetDynamicWarp(localFieldData)); @@ -409,14 +409,14 @@ void BugContest_PromptSwapPokemon(TaskManager *taskManager, Pokemon *mon) { } static BOOL Task_BugContest_PromptSwapPokemon(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); UnkStruct_0206DB94 *unkStruct = TaskManager_GetEnvironment(taskManager); - BugContest *contest = FieldSystem_BugContest_Get(fieldSystem); - u32 *state = TaskManager_GetStatePtr(taskManager); + BugContest *contest = FieldSystem_BugContest_Get(fieldSystem); + u32 *state = TaskManager_GetStatePtr(taskManager); switch (*state) { case 0: { u32 noPokemonCaught = contest->caught_poke == SPECIES_NONE; - unkStruct->unk08 = BugContestSwapMon_LaunchApp(fieldSystem, unkStruct->newlyCaughtMon, contest->mon, noPokemonCaught); + unkStruct->unk08 = BugContestSwapMon_LaunchApp(fieldSystem, unkStruct->newlyCaughtMon, contest->mon, noPokemonCaught); (*state)++; break; } @@ -438,11 +438,11 @@ static BOOL Task_BugContest_PromptSwapPokemon(TaskManager *taskManager) { } BOOL ScrCmd_SetTrainerHouseSprite(ScriptContext *ctx) { - u16 trainerNum = ScriptGetVar(ctx); - u16 *hasTrainer = ScriptGetVarPointer(ctx); - u16 *spriteId = GetVarPointer(ctx->fieldSystem, VAR_OBJ_1 + trainerNum); + u16 trainerNum = ScriptGetVar(ctx); + u16 *hasTrainer = ScriptGetVarPointer(ctx); + u16 *spriteId = GetVarPointer(ctx->fieldSystem, VAR_OBJ_1 + trainerNum); TrainerHouse *trainerHouse = Save_TrainerHouse_Get(ctx->fieldSystem->saveData); - *hasTrainer = TrainerHouseSet_CheckHasData(&trainerHouse->sets[trainerNum]); + *hasTrainer = TrainerHouseSet_CheckHasData(&trainerHouse->sets[trainerNum]); if (*hasTrainer) { *spriteId = trainerHouse->sets[trainerNum].trainer.sprite; } else { @@ -454,6 +454,6 @@ BOOL ScrCmd_SetTrainerHouseSprite(ScriptContext *ctx) { void FieldSystem_InitMystriStageGymmick(FieldSystem *fieldSystem) { Gymmick *gymmick = Save_GetGymmickPtr(FieldSystem_GetSaveData(fieldSystem)); Save_Gymmick_Init(gymmick, GYMMICK_SINJOH); - GymmickUnion *gymmickData = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_SINJOH); + GymmickUnion *gymmickData = Save_Gymmick_AssertMagic_GetData(gymmick, GYMMICK_SINJOH); gymmickData->sinjoh.choice = 0; } diff --git a/src/unk_02092BE8.c b/src/unk_02092BE8.c index bc1d5d0990..18010c9850 100644 --- a/src/unk_02092BE8.c +++ b/src/unk_02092BE8.c @@ -26,19 +26,19 @@ static void SysTask_RingGearPhone(SysTask *task, GearPhoneRingManager *ptr); static void sub_02092BE8(FieldSystem *sys, PokegearArgs *ptr, BOOL a2) { Unk_PokegearSTRUCT_14 Unk_struct; - SaveVarsFlags *state = Save_VarsFlags_Get(sys->saveData); - LocalFieldData *points = Save_LocalFieldData_Get(sys->saveData); - Location *warpPtr = LocalFieldData_GetSpecialSpawnWarpPtr(points); - Location *PosPtr = LocalFieldData_GetCurrentPosition(points); + SaveVarsFlags *state = Save_VarsFlags_Get(sys->saveData); + LocalFieldData *points = Save_LocalFieldData_Get(sys->saveData); + Location *warpPtr = LocalFieldData_GetSpecialSpawnWarpPtr(points); + Location *PosPtr = LocalFieldData_GetCurrentPosition(points); GearPhoneRingManager *phoneRingMgr = FieldSystem_GetGearPhoneRingManager(sys); - ptr->saveData = sys->saveData; - ptr->mapID = PosPtr->mapId; + ptr->saveData = sys->saveData; + ptr->mapID = PosPtr->mapId; if (MapHeader_MapIsOnMainMatrix(ptr->mapID)) { - ptr->x = GetPlayerXCoord(sys->playerAvatar); - ptr->y = GetPlayerZCoord(sys->playerAvatar); + ptr->x = GetPlayerXCoord(sys->playerAvatar); + ptr->y = GetPlayerZCoord(sys->playerAvatar); ptr->matrixXCoord = ptr->x / 32; ptr->matrixYCoord = ptr->y / 32; - ptr->mapHeader = ptr->mapID; + ptr->mapHeader = ptr->mapID; } else { ptr->x = warpPtr->x; ptr->y = warpPtr->y; @@ -56,10 +56,10 @@ static void sub_02092BE8(FieldSystem *sys, PokegearArgs *ptr, BOOL a2) { MapMatrix_Free(matrix); } - ptr->playerGender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(sys))); + ptr->playerGender = PlayerProfile_GetTrainerGender(Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(sys))); ptr->menuInputStatePtr = &sys->menuInputState; - ptr->unk01 = sub_0203DF3C(sys); - ptr->mapMusicID = FieldSystem_GetOverriddenMusicId(sys, ptr->mapID); + ptr->unk01 = sub_0203DF3C(sys); + ptr->mapMusicID = FieldSystem_GetOverriddenMusicId(sys, ptr->mapID); if (a2) { return; @@ -96,13 +96,13 @@ GearPhoneRingManager *GearPhoneRingManager_New(HeapID heapId, FieldSystem *sys) GearPhoneRingManager *ptr = AllocFromHeap(heapId, sizeof(GearPhoneRingManager)); MI_CpuClear8(ptr, sizeof(GearPhoneRingManager)); gearRingingManagerReset(ptr); - ptr->unk_varC = 10; - ptr->unk_var10 = 30; - ptr->unk_var12 = 50; - ptr->saveData = sys->saveData; + ptr->unk_varC = 10; + ptr->unk_var10 = 30; + ptr->unk_var12 = 50; + ptr->saveData = sys->saveData; ptr->pokegearData = SaveData_GSPlayerMisc_Get(ptr->saveData); - ptr->savingsData = SaveData_GetMomsSavingsAddr(ptr->saveData); - ptr->sys = sys; + ptr->savingsData = SaveData_GetMomsSavingsAddr(ptr->saveData); + ptr->sys = sys; return ptr; } @@ -117,7 +117,7 @@ GearPhoneRingManager *FieldSystem_GetGearPhoneRingManager(FieldSystem *sys) { void sub_02092DF4(GearPhoneRingManager *ptr) { ptr->unk_var0_0 = TRUE; - ptr->unk_var14 = 0; + ptr->unk_var14 = 0; } BOOL sub_02092E08(GearPhoneRingManager *ptr) { @@ -150,9 +150,9 @@ void sub_02092E34(GearPhoneRingManager *ptr, s32 a1, BOOL a2) { static void sub_02092E54(GearPhoneRingManager *ptr) { SaveVarsFlags *state = Save_VarsFlags_Get(ptr->saveData); - SafariZone *zone = Save_SafariZone_Get(ptr->saveData); - IGT *igt = Save_PlayerData_GetIGTAddr(ptr->saveData); - u8 var4057 = Save_VarsFlags_GetVar4057(state); + SafariZone *zone = Save_SafariZone_Get(ptr->saveData); + IGT *igt = Save_PlayerData_GetIGTAddr(ptr->saveData); + u8 var4057 = Save_VarsFlags_GetVar4057(state); u8 i; for (i = 0; i < 5; i++) { if (sub_0202F08C(ptr->savingsData, i + 7)) { @@ -215,17 +215,17 @@ void sub_02092F30(GearPhoneRingManager *ptr, s64 seconds) { static void gearRingingManagerReset(GearPhoneRingManager *ptr) { GearPhone_ToggleRinging(ptr, FALSE); - ptr->unk_var8 = 0; - ptr->unk_var14 = 0; + ptr->unk_var8 = 0; + ptr->unk_var14 = 0; ptr->unk_var0_0 = FALSE; ptr->unk_var0_1 = FALSE; ptr->unk_var0_3 = FALSE; - ptr->unk_var2 = 0xff; - ptr->unk_var3 = 0; - ptr->unk_var4 = 0; - ptr->unk_var7 = 0; + ptr->unk_var2 = 0xff; + ptr->unk_var3 = 0; + ptr->unk_var4 = 0; + ptr->unk_var7 = 0; ptr->entry.unk0 = 0xff; - ptr->unk_var12 = 50; + ptr->unk_var12 = 50; } static void sub_02092FA0(GearPhoneRingManager *ptr) { @@ -260,7 +260,7 @@ void GearPhone_ToggleRinging(GearPhoneRingManager *ptr, BOOL a1) { } MI_CpuClear8(&ptr->gearRing, sizeof(struct PokegearRingingTask)); ptr->gearRing.task = SysTask_CreateOnMainQueue((SysTaskFunc)SysTask_RingGearPhone, ptr, -1); - ptr->unk_var0_3 = TRUE; + ptr->unk_var0_3 = TRUE; } else { if (!ptr->unk_var0_3) { return; @@ -288,7 +288,7 @@ BOOL sub_02093070(FieldSystem *sys) { } BOOL sub_020930C4(FieldSystem *sys) { - int owned = Pokedex_CountNationalDexOwned(Save_Pokedex_Get(sys->saveData)); + int owned = Pokedex_CountNationalDexOwned(Save_Pokedex_Get(sys->saveData)); SaveVarsFlags *state = Save_VarsFlags_Get(sys->saveData); if (GSPlayerMisc_IsGearNumberRegistered(SaveData_GSPlayerMisc_Get(sys->saveData), PHONE_CONTACT_PROF__OAK) == 0xff) { return FALSE; diff --git a/src/unk_020932A4.c b/src/unk_020932A4.c index b9ff0936e8..8aaefbf3ce 100644 --- a/src/unk_020932A4.c +++ b/src/unk_020932A4.c @@ -7,7 +7,7 @@ #include "save_pokegear.h" u16 PhoneBookTrainerGetRematchInfo(u8 idx, SaveData *saveData, struct PhoneBook *phoneBook, TimeOfDayWildParam timeOfDay) { - MomsSavings *momsSavings = SaveData_GetMomsSavingsAddr(saveData); + MomsSavings *momsSavings = SaveData_GetMomsSavingsAddr(saveData); BOOL isSeekingPhoneRematches = PhoneRematches_IsSeeking(momsSavings, idx); if (!isSeekingPhoneRematches) { diff --git a/src/unk_02097720.c b/src/unk_02097720.c index 222f1bd855..ab9753abac 100644 --- a/src/unk_02097720.c +++ b/src/unk_02097720.c @@ -9,14 +9,14 @@ void sub_02097720(TaskManager *taskManager, u16 *unknownPtr) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); UnkStruct_02097720 *data = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnkStruct_02097720)); MI_CpuClear8(data, sizeof(UnkStruct_02097720)); - data->state = 0; + data->state = 0; data->unknown_4 = unknownPtr; TaskManager_Call(taskManager, sub_02097754, data); } static BOOL sub_02097754(TaskManager *taskManager) { FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); - UnkStruct_02097720 *env = TaskManager_GetEnvironment(taskManager); + UnkStruct_02097720 *env = TaskManager_GetEnvironment(taskManager); switch (env->state) { case 0: diff --git a/src/unk_02097D3C.c b/src/unk_02097D3C.c index b02bdfe791..61216068a3 100644 --- a/src/unk_02097D3C.c +++ b/src/unk_02097D3C.c @@ -10,16 +10,16 @@ static BOOL Task_ViewRankingsApp(TaskManager *taskManager); void FieldSystem_LaunchTask_ViewRankingsApp(FieldSystem *fieldSystem, u8 pageScrollParam, u8 cursorPos) { UnkStruct_02097D48 *taskData = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(UnkStruct_02097D48)); - taskData->state = 0; - taskData->args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(ViewRankingsArgs)); - taskData->args->saveData = FieldSystem_GetSaveData(fieldSystem); - taskData->args->page_scroll = pageScrollParam; - taskData->args->cursorPos = cursorPos; + taskData->state = 0; + taskData->args = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(ViewRankingsArgs)); + taskData->args->saveData = FieldSystem_GetSaveData(fieldSystem); + taskData->args->page_scroll = pageScrollParam; + taskData->args->cursorPos = cursorPos; TaskManager_Call(fieldSystem->taskman, Task_ViewRankingsApp, taskData); } static BOOL Task_ViewRankingsApp(TaskManager *taskManager) { - FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); + FieldSystem *fieldSystem = TaskManager_GetFieldSystem(taskManager); UnkStruct_02097D48 *taskData = TaskManager_GetEnvironment(taskManager); switch (taskData->state) { diff --git a/src/update_dex_received.c b/src/update_dex_received.c index c5aa1e2498..e42ffcd7e7 100644 --- a/src/update_dex_received.c +++ b/src/update_dex_received.c @@ -13,8 +13,8 @@ void UpdatePokedexWithReceivedSpecies(SaveData *saveData, Pokemon *mon) { u16 species; isEgg = GetMonData(mon, MON_DATA_IS_EGG, NULL); if (!isEgg) { - species = GetMonData(mon, MON_DATA_SPECIES, NULL); - Pokedex *pokedex = Save_Pokedex_Get(saveData); + species = GetMonData(mon, MON_DATA_SPECIES, NULL); + Pokedex *pokedex = Save_Pokedex_Get(saveData); GameStats *gameStats = Save_GameStats_Get(saveData); GameStats_IncSpeciesCaught(gameStats, pokedex, species); Pokedex_SetMonCaughtFlag(pokedex, mon); diff --git a/src/use_item_on_mon.c b/src/use_item_on_mon.c index 39a2417a41..0975acdb3f 100644 --- a/src/use_item_on_mon.c +++ b/src/use_item_on_mon.c @@ -98,9 +98,9 @@ BOOL CanUseItemOnPokemon(Pokemon *mon, u16 itemID, s32 moveIdx, HeapID heapID) { } } - hpEv = GetMonData(mon, MON_DATA_HP_EV, NULL); - atkEv = GetMonData(mon, MON_DATA_ATK_EV, NULL); - defEv = GetMonData(mon, MON_DATA_DEF_EV, NULL); + hpEv = GetMonData(mon, MON_DATA_HP_EV, NULL); + atkEv = GetMonData(mon, MON_DATA_ATK_EV, NULL); + defEv = GetMonData(mon, MON_DATA_DEF_EV, NULL); speedEv = GetMonData(mon, MON_DATA_SPEED_EV, NULL); spAtkEv = GetMonData(mon, MON_DATA_SPATK_EV, NULL); spDefEv = GetMonData(mon, MON_DATA_SPDEF_EV, NULL); @@ -240,7 +240,7 @@ BOOL UseItemOnPokemon(Pokemon *mon, u16 itemID, u16 moveIdx, u16 location, HeapI return FALSE; } - hadEffect = FALSE; + hadEffect = FALSE; effectFound = FALSE; sp58 = sp54 = GetMonData(mon, MON_DATA_STATUS, NULL); @@ -483,7 +483,7 @@ BOOL MonMoveCanRestorePP(Pokemon *mon, int moveIdx) { return FALSE; } - u8 pp = GetMonData(mon, MON_DATA_MOVE1PP + moveIdx, NULL); + u8 pp = GetMonData(mon, MON_DATA_MOVE1PP + moveIdx, NULL); u8 ppUp = GetMonData(mon, MON_DATA_MOVE1PPUP + moveIdx, NULL); return (u8)(pp < GetMoveMaxPP(moveID, ppUp)); } @@ -494,10 +494,10 @@ BOOL MonMoveRestorePP(Pokemon *mon, int moveIdx, int ppRestore) { return FALSE; } - int ppAttr = MON_DATA_MOVE1PP + moveIdx; - u8 pp = GetMonData(mon, ppAttr, NULL); + int ppAttr = MON_DATA_MOVE1PP + moveIdx; + u8 pp = GetMonData(mon, ppAttr, NULL); int ppUpAttr = MON_DATA_MOVE1PPUP + moveIdx; - u8 maxPp = GetMoveMaxPP(move_id, GetMonData(mon, ppUpAttr, NULL)); + u8 maxPp = GetMoveMaxPP(move_id, GetMonData(mon, ppUpAttr, NULL)); if (pp < maxPp) { if (ppRestore == PP_RESTORE_ALL) { pp = maxPp; @@ -518,7 +518,7 @@ BOOL BoostMonMovePpUpBy(Pokemon *mon, int moveIdx, int nPpUp) { u8 pp; int ppUpAttr = MON_DATA_MOVE1PPUP + moveIdx; - u8 ppUp = GetMonData(mon, ppUpAttr, NULL); + u8 ppUp = GetMonData(mon, ppUpAttr, NULL); if (ppUp == 3) { return FALSE; } @@ -529,8 +529,8 @@ BOOL BoostMonMovePpUpBy(Pokemon *mon, int moveIdx, int nPpUp) { } int ppAttr = MON_DATA_MOVE1PP + moveIdx; - pp = GetMonData(mon, ppAttr, NULL); - u8 maxPp = GetMoveMaxPP(move, ppUp); + pp = GetMonData(mon, ppAttr, NULL); + u8 maxPp = GetMoveMaxPP(move, ppUp); if ((u32)(ppUp + nPpUp) > 3) { ppUp = 3; } else { @@ -538,7 +538,7 @@ BOOL BoostMonMovePpUpBy(Pokemon *mon, int moveIdx, int nPpUp) { } u8 newMaxPp = GetMoveMaxPP(move, ppUp); - pp = pp + newMaxPp - maxPp; + pp = pp + newMaxPp - maxPp; SetMonData(mon, ppUpAttr, &ppUp); SetMonData(mon, ppAttr, &pp); diff --git a/src/voltorb_flip/voltorb_flip.c b/src/voltorb_flip/voltorb_flip.c index e69b2c26cc..b17dfd4b97 100644 --- a/src/voltorb_flip/voltorb_flip.c +++ b/src/voltorb_flip/voltorb_flip.c @@ -160,7 +160,7 @@ static void RenderCoinPayoutScreen(VoltorbFlipAppWork *work) { GfGfxLoader_LoadScrnDataFromOpenNarc(work->narc, NARC_voltorb_flip_voltorb_flip_00000006_bin, work->bgConfig, GF_BG_LYR_SUB_0, 0, 0, 1, work->heapId); int payout = GamePayout(work->game); - u16 coins = (u32)CheckCoins(work->coins); + u16 coins = (u32)CheckCoins(work->coins); PrintCoins(work, COIN_DISPLAY_PAYOUT, payout); PrintCoins(work, COIN_DISPLAY_TOTAL, coins); @@ -547,8 +547,8 @@ BOOL PlaySuspensefulFanfare(WorkflowEngine *workflow, VoltorbFlipAppWork *work) switch (state) { case 0: { int var2 = ov122_021E8DF0(work->unk240); - s16 col = var2 % 5; - s16 row = var2 / 5; + s16 col = var2 % 5; + s16 row = var2 / 5; // Unused MultiplierCardsFlipped(work->game); @@ -601,7 +601,7 @@ BOOL AwaitCardFlipAndResult(WorkflowEngine *workflow, VoltorbFlipAppWork *work) } break; case 1: { - int cardId = ov122_021E8DF0(work->unk240); + int cardId = ov122_021E8DF0(work->unk240); CardType type = GetCardType(work->game, cardId); s16 var4 = ((cardId % 5) * 4 + 1); @@ -778,7 +778,7 @@ BOOL ov122_021E6594(WorkflowEngine *workflow, VoltorbFlipAppWork *work) { ov122_021E8E40(work->unk240); int payout = GamePayout(work->game); - u16 coins = (u32)CheckCoins(work->coins); + u16 coins = (u32)CheckCoins(work->coins); PrintCoins(work, COIN_DISPLAY_PAYOUT, payout); PrintCoins(work, COIN_DISPLAY_TOTAL, coins); @@ -852,7 +852,7 @@ BOOL ov122_021E6700(WorkflowEngine *workflow, VoltorbFlipAppWork *work) { switch (var1) { case 1: { int cardId = ov122_021E8DF0(work->unk240); - int var3 = ov122_021E8E0C(work->unk240); + int var3 = ov122_021E8E0C(work->unk240); if (TryToggleCardMemo(work, cardId, var3)) { EnqueueWorkflow(workflow, WORKFLOW_UNK_13); return TRUE; @@ -960,12 +960,12 @@ BOOL PrintAreYouSureYouWantToQuit(WorkflowEngine *workflow, VoltorbFlipAppWork * BOOL ov122_021E6900(WorkflowEngine *workflow, VoltorbFlipAppWork *work) { YesNoPromptTemplate temp1 = { 0 }; - temp1.bgConfig = work->bgConfig; - temp1.bgId = 3; - temp1.tileStart = 31; - temp1.plttSlot = 9; - temp1.x = 25; - temp1.y = 10; + temp1.bgConfig = work->bgConfig; + temp1.bgId = 3; + temp1.tileStart = 31; + temp1.plttSlot = 9; + temp1.x = 25; + temp1.y = 10; temp1.initialCursorPos = 0; YesNoPrompt_InitFromTemplate(work->unk13C, &temp1); @@ -1026,7 +1026,7 @@ static BOOL AddCoinsToPayout(VoltorbFlipAppWork *work) { static BOOL AwardPayoutToPlayer(VoltorbFlipAppWork *work) { BOOL payoutDeducted; // only TRUE for incremental deduction - u16 coins = (u32)CheckCoins(work->coins); + u16 coins = (u32)CheckCoins(work->coins); u16 payout = GamePayout(work->game); if (System_GetTouchNew() || gSystem.newKeys != 0 || coins >= 50000) { @@ -1103,7 +1103,7 @@ static void PrintCoins(VoltorbFlipAppWork *work, CoinDisplay type, int amount) { static void RenderCardMemo(VoltorbFlipAppWork *work, int cardId, int memoFlag) { u16 temp1[1]; - int idx = MemoFlagToIdx(memoFlag); + int idx = MemoFlagToIdx(memoFlag); int var3 = (cardId % 5) * 4 + 1 + ov122_021E9344[idx].unk0; int var5 = (cardId / 5) * 4 + 1 + ov122_021E9344[idx].unk4; @@ -1122,24 +1122,24 @@ static void PrintBoardVoltorbs(VoltorbFlipAppWork *work) { u16 buf[4]; // Rows - i = 0; + i = 0; int y = 2; for (; i < 5; i++) { int voltorbs = VoltorbsAlongAxis(work->game, AXIS_ROW, i); - buf[2] = voltorbs + 203; - buf[3] = voltorbs + 235; + buf[2] = voltorbs + 203; + buf[3] = voltorbs + 235; LoadRectToBgTilemapRect(work->bgConfig, 2, &buf[2], 23, y, 1, 2); y += 4; } // Columns - i = 0; + i = 0; int x = 3; for (; i < 5; i++) { int voltorbs = VoltorbsAlongAxis(work->game, AXIS_COL, i); - buf[0] = voltorbs + 203; - buf[1] = voltorbs + 235; + buf[0] = voltorbs + 203; + buf[1] = voltorbs + 235; LoadRectToBgTilemapRect(work->bgConfig, 2, buf, x, 22, 1, 2); x += 4; @@ -1151,7 +1151,7 @@ static void PrintBoardPoints(VoltorbFlipAppWork *work) { u16 buf[4]; // Rows - i = 0; + i = 0; int y = 1; for (; i < 5; i++) { int points = PointsAlongAxis(work->game, AXIS_ROW, i); @@ -1164,7 +1164,7 @@ static void PrintBoardPoints(VoltorbFlipAppWork *work) { } // Columns - i = 0; + i = 0; int x = 2; for (; i < 5; i++) { int points = PointsAlongAxis(work->game, AXIS_COL, i); @@ -1193,8 +1193,8 @@ static void ov122_021E6E34(u16 *a0, int a1) { static void ov122_021E6E60(BgConfig *bgConfig, GameState *game, int cardId, int a3) { u16 temp1[9]; - int x = (cardId % 5) * 4 + 1; - int y = (cardId / 5) * 4 + 1; + int x = (cardId % 5) * 4 + 1; + int y = (cardId / 5) * 4 + 1; int cardType = GetCardType(game, cardId); switch (a3) { @@ -1264,7 +1264,7 @@ static BOOL ov122_021E6FB0(Ov122_021E70B8 *a0) { static void ov122_021E6FE4(Ov122_021E70B8 *a0) { int i; - i = 0; + i = 0; int var1 = 0; for (; i < 5; i++) { ov122_021E6F04(a0->bgConfig, a0->game, (u8)(a0->unk13 + var1), a0->unk10); @@ -1319,13 +1319,13 @@ static void PrintBoardVoltorbsAndPoints(VoltorbFlipAppWork *work) { static void ov122_021E70B8(Ov122_021E70B8 *a0, int a1, int a2, VoltorbFlipAppWork *work) { a0->bgConfig = work->bgConfig; - a0->unk8 = work->unk240; - a0->game = work->game; - a0->unkC = a2; - a0->unk11 = a1; - a0->unk10 = 0; - a0->unk12 = 0; - a0->unk13 = 5; + a0->unk8 = work->unk240; + a0->game = work->game; + a0->unkC = a2; + a0->unk11 = a1; + a0->unk10 = 0; + a0->unk12 = 0; + a0->unk13 = 5; switch (a2) { case 0: { @@ -1413,9 +1413,9 @@ static void ov122_021E72D0(VoltorbFlipAppWork *work) { for (int i = 0; i < 4; i++) { GF_ASSERT(ov122_021E92B0[i][2] < 13); - int var3 = ov122_021E92B0[i][2]; + int var3 = ov122_021E92B0[i][2]; void *var2 = work->unk14C[var3]; - int var4 = IsCardMemoFlagOn(work->game, var1, ov122_021E92B0[i][3]); + int var4 = IsCardMemoFlagOn(work->game, var1, ov122_021E92B0[i][3]); UnkImageStruct_SetSpriteAnimSeqNo(var2, ov122_021E92B0[i][var4]); } ov122_021E7274(work, 1); @@ -1480,14 +1480,14 @@ static void ov122_021E745C(VoltorbFlipAppWork *work) { void ov122_021E7488(VoltorbFlipAppWork *a0, int a1) { TouchscreenListMenuHeader temp1 = { 0 }; - const MsgNoList *ptr = &sMenuMsgNos[a1]; + const MsgNoList *ptr = &sMenuMsgNos[a1]; GF_ASSERT(a0->bgConfig != 0); temp1.template = ov122_021E9278.menuTemplate; temp1.listMenuItems = a0->menuItems[a1]; - temp1.bgConfig = a0->bgConfig; - temp1.numWindows = ptr->size; + temp1.bgConfig = a0->bgConfig; + temp1.numWindows = ptr->size; a0->menu = TouchscreenListMenu_Create(a0->unk1C, &temp1, a0->unk228, 17, 17 - ptr->size * 3, 13, 0); } @@ -1683,11 +1683,11 @@ static void ov122_021E79D0(VoltorbFlipAppWork *work) { static void ov122_021E7AEC(VoltorbFlipAppWork *work) { SpriteResourceCountsListUnion temp1 = ov122_021E92E4; - OamManagerParam temp2 = ov122_021E92FC; - OamCharTransferParam temp3 = ov122_021E92D0; - temp3.maxTasks = 0x80; + OamManagerParam temp2 = ov122_021E92FC; + OamCharTransferParam temp3 = ov122_021E92D0; + temp3.maxTasks = 0x80; - work->spriteRenderer = SpriteRenderer_Create(work->heapId); + work->spriteRenderer = SpriteRenderer_Create(work->heapId); work->spriteGfxHandler = SpriteRenderer_CreateGfxHandler(work->spriteRenderer); SpriteRenderer_CreateOamCharPlttManagers(work->spriteRenderer, &temp2, &temp3, 32); @@ -1711,7 +1711,7 @@ static void ov122_021E7B94(VoltorbFlipAppWork *work) { static void ov122_021E7BD4(VoltorbFlipAppWork *work) { GF_ASSERT(work->narc != 0); - SpriteRenderer *renderer = work->spriteRenderer; + SpriteRenderer *renderer = work->spriteRenderer; SpriteGfxHandler *gfxHandler = work->spriteGfxHandler; SpriteRenderer_LoadPlttResObjFromOpenNarc(renderer, gfxHandler, work->narc, NARC_voltorb_flip_voltorb_flip_00000010_bin, FALSE, 5, NNS_G2D_VRAM_TYPE_2DMAIN, 0); @@ -1829,9 +1829,9 @@ static UnkImageStruct *ov122_021E7C9C(SpriteRenderer *a0, SpriteGfxHandler *a1, GF_ASSERT(a0 != NULL); GF_ASSERT(a1 != NULL); - temp1.x = a2; - temp1.y = a3; - temp1.animation = a4; + temp1.x = a2; + temp1.y = a3; + temp1.animation = a4; temp1.spritePriority = a5; UnkImageStruct *var1 = SpriteRenderer_LoadResourcesAndCreateSprite_CustomBottomScreenOffset(a0, a1, &temp1, 0x20c000); @@ -1846,9 +1846,9 @@ static UnkImageStruct *ov122_021E7D04(SpriteRenderer *a0, SpriteGfxHandler *a1, GF_ASSERT(a0 != NULL); GF_ASSERT(a1 != NULL); - temp1.x = a2; - temp1.y = a3; - temp1.animation = a4; + temp1.x = a2; + temp1.y = a3; + temp1.animation = a4; temp1.spritePriority = a5; UnkImageStruct *var1 = SpriteRenderer_LoadResourcesAndCreateSprite_CustomBottomScreenOffset(a0, a1, &temp1, 0x20c000); @@ -1858,16 +1858,16 @@ static UnkImageStruct *ov122_021E7D04(SpriteRenderer *a0, SpriteGfxHandler *a1, } static void ov122_021E7D6C(VoltorbFlipAppWork *work) { - work->unk14C[0] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0, 0, 18, 1); - work->unk14C[1] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0, 0, 0, 0); - work->unk14C[2] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x28, 5, 2); - work->unk14C[3] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0xb0, 2, 2); - work->unk14C[4] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0x80, 0x60, 20, 5); - work->unk14C[5] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xc8, 0x50, 12, 4); - work->unk14C[6] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x50, 15, 4); - work->unk14C[7] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xc8, 0x68, 14, 4); - work->unk14C[8] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x68, 13, 4); - work->unk14C[9] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x80, 16, 3); + work->unk14C[0] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0, 0, 18, 1); + work->unk14C[1] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0, 0, 0, 0); + work->unk14C[2] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x28, 5, 2); + work->unk14C[3] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0xb0, 2, 2); + work->unk14C[4] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0x80, 0x60, 20, 5); + work->unk14C[5] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xc8, 0x50, 12, 4); + work->unk14C[6] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x50, 15, 4); + work->unk14C[7] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xc8, 0x68, 14, 4); + work->unk14C[8] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x68, 13, 4); + work->unk14C[9] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xe0, 0x80, 16, 3); work->unk14C[10] = ov122_021E7C9C(work->spriteRenderer, work->spriteGfxHandler, 0xc8, 0x50, 18, 1); work->unk14C[11] = ov122_021E7D04(work->spriteRenderer, work->spriteGfxHandler, 0x48, 0x38, 0, 0); work->unk14C[12] = ov122_021E7D04(work->spriteRenderer, work->spriteGfxHandler, 0x88, 0x28, 0, 0); @@ -1887,7 +1887,7 @@ static void ov122_021E7F48(VoltorbFlipAppWork *work) { } static void ov122_021E7F64(Sprite *a0, fx32 a1) { - NNSG2dCellAnimation *ptr = Sprite_GetCellAnim(a0); + NNSG2dCellAnimation *ptr = Sprite_GetCellAnim(a0); ptr->animCtrl.currentTime = a1; } @@ -1961,19 +1961,19 @@ static void ov122_021E8094(OVY_MANAGER *man) { VoltorbFlipAppWork *work = OverlayManager_CreateAndGetData(man, sizeof(VoltorbFlipAppWork), HEAP_ID_VOLTORB_FLIP); MI_CpuFill8(work, 0, sizeof(VoltorbFlipAppWork)); - work->heapId = HEAP_ID_VOLTORB_FLIP; - work->options = args->options; - work->coins = args->coins; + work->heapId = HEAP_ID_VOLTORB_FLIP; + work->options = args->options; + work->coins = args->coins; work->menuInputStatePtr = args->menuInputStatePtr; - work->profile = args->profile; - work->unk228 = MenuInputStateMgr_GetState(work->menuInputStatePtr); - work->unk229 = Options_GetFrame(work->options); - work->unk22A = Options_GetTextFrameDelay(work->options); + work->profile = args->profile; + work->unk228 = MenuInputStateMgr_GetState(work->menuInputStatePtr); + work->unk229 = Options_GetFrame(work->options); + work->unk22A = Options_GetTextFrameDelay(work->options); - work->narc = NARC_New(NARC_application_voltorb_flip, work->heapId); + work->narc = NARC_New(NARC_application_voltorb_flip, work->heapId); work->msgData = NewMsgDataFromNarc(MSGDATA_LOAD_DIRECT, NARC_msgdata_msg, NARC_msg_msg_0039_bin, work->heapId); - work->msgFmt = MessageFormat_New(work->heapId); - work->unk13C = YesNoPrompt_Create(work->heapId); + work->msgFmt = MessageFormat_New(work->heapId); + work->unk13C = YesNoPrompt_Create(work->heapId); ov122_021E7928(work); ov122_021E79D0(work); @@ -1988,8 +1988,8 @@ static void ov122_021E8094(OVY_MANAGER *man) { ov122_021E7D6C(work); work->workflow = CreateWorkflowEngine(work->heapId, (VoltorbFlipWorkflows *)&sVoltorbFlipWorkflows, NELEMS(sVoltorbFlipWorkflows), work); - work->unk240 = ov122_021E8CFC(work->heapId, work->unk14C[0], work->unk14C[10]); - work->game = CreateGameState(work->heapId); + work->unk240 = ov122_021E8CFC(work->heapId, work->unk14C[0], work->unk14C[10]); + work->game = CreateGameState(work->heapId); PrintBoardVoltorbsAndPoints(work); sub_02004EC4(0x46, 0, 0); diff --git a/src/voltorb_flip/voltorb_flip_data2.c b/src/voltorb_flip/voltorb_flip_data2.c index 147b1dfa1f..4fa6ff2676 100644 --- a/src/voltorb_flip/voltorb_flip_data2.c +++ b/src/voltorb_flip/voltorb_flip_data2.c @@ -97,172 +97,172 @@ const UnkTemplate_0200D748 ov122_021E9374 = { const WindowTemplate sVoltorbFlipWindowTemplates[17] = { { - .bgId = 0x03, - .left = 0x02, - .top = 0x13, - .width = 0x1B, - .height = 0x04, - .palette = 0x0C, + .bgId = 0x03, + .left = 0x02, + .top = 0x13, + .width = 0x1B, + .height = 0x04, + .palette = 0x0C, .baseTile = 0x00A2, }, { - .bgId = 0x03, - .left = 0x02, - .top = 0x15, - .width = 0x1B, - .height = 0x02, - .palette = 0x0C, + .bgId = 0x03, + .left = 0x02, + .top = 0x15, + .width = 0x1B, + .height = 0x02, + .palette = 0x0C, .baseTile = 0x00A2, }, { - .bgId = 0x01, - .left = 0x19, - .top = 0x04, - .width = 0x06, - .height = 0x06, - .palette = 0x0E, + .bgId = 0x01, + .left = 0x19, + .top = 0x04, + .width = 0x06, + .height = 0x06, + .palette = 0x0E, .baseTile = 0x010E, }, { - .bgId = 0x01, - .left = 0x19, - .top = 0x15, - .width = 0x06, - .height = 0x02, - .palette = 0x0E, + .bgId = 0x01, + .left = 0x19, + .top = 0x15, + .width = 0x06, + .height = 0x02, + .palette = 0x0E, .baseTile = 0x0132, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x01, - .width = 0x1E, - .height = 0x02, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x01, + .top = 0x01, + .width = 0x1E, + .height = 0x02, + .palette = 0x0C, .baseTile = 0x0001, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x03, - .width = 0x1E, - .height = 0x02, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x01, + .top = 0x03, + .width = 0x1E, + .height = 0x02, + .palette = 0x0C, .baseTile = 0x003D, }, { - .bgId = 0x05, - .left = 0x0D, - .top = 0x06, - .width = 0x12, - .height = 0x03, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x0D, + .top = 0x06, + .width = 0x12, + .height = 0x03, + .palette = 0x0C, .baseTile = 0x0079, }, { - .bgId = 0x05, - .left = 0x0D, - .top = 0x0A, - .width = 0x12, - .height = 0x03, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x0D, + .top = 0x0A, + .width = 0x12, + .height = 0x03, + .palette = 0x0C, .baseTile = 0x00AF, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x0E, - .width = 0x13, - .height = 0x04, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x01, + .top = 0x0E, + .width = 0x13, + .height = 0x04, + .palette = 0x0C, .baseTile = 0x00E5, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x13, - .width = 0x13, - .height = 0x04, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x01, + .top = 0x13, + .width = 0x13, + .height = 0x04, + .palette = 0x0C, .baseTile = 0x0131, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x0F, - .width = 0x07, - .height = 0x02, - .palette = 0x0D, + .bgId = 0x05, + .left = 0x01, + .top = 0x0F, + .width = 0x07, + .height = 0x02, + .palette = 0x0D, .baseTile = 0x0001, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x05, - .width = 0x1E, - .height = 0x06, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x01, + .top = 0x05, + .width = 0x1E, + .height = 0x06, + .palette = 0x0C, .baseTile = 0x000F, }, { - .bgId = 0x05, - .left = 0x0A, - .top = 0x0E, - .width = 0x15, - .height = 0x04, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x0A, + .top = 0x0E, + .width = 0x15, + .height = 0x04, + .palette = 0x0C, .baseTile = 0x00C3, }, { - .bgId = 0x05, - .left = 0x0A, - .top = 0x13, - .width = 0x15, - .height = 0x04, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x0A, + .top = 0x13, + .width = 0x15, + .height = 0x04, + .palette = 0x0C, .baseTile = 0x0117, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x11, - .width = 0x1E, - .height = 0x06, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x01, + .top = 0x11, + .width = 0x1E, + .height = 0x06, + .palette = 0x0C, .baseTile = 0x0001, }, { - .bgId = 0x05, - .left = 0x02, - .top = 0x07, - .width = 0x06, - .height = 0x06, - .palette = 0x0D, + .bgId = 0x05, + .left = 0x02, + .top = 0x07, + .width = 0x06, + .height = 0x06, + .palette = 0x0D, .baseTile = 0x0001, }, { - .bgId = 0x05, - .left = 0x01, - .top = 0x0F, - .width = 0x1E, - .height = 0x08, - .palette = 0x0C, + .bgId = 0x05, + .left = 0x01, + .top = 0x0F, + .width = 0x1E, + .height = 0x08, + .palette = 0x0C, .baseTile = 0x0025, }, @@ -271,94 +271,94 @@ const WindowTemplate sVoltorbFlipWindowTemplates[17] = { const BgTemplates sVoltorbFlipBgTemplates = { { { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 3, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 3, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0800, - .charBase = GX_BG_CHARBASE_0x08000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 2, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x08000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 2, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x1000, - .charBase = GX_BG_CHARBASE_0x0c000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x0c000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x1800, - .charBase = GX_BG_CHARBASE_0x10000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x10000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x04000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x04000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x0800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0800, - .charBase = GX_BG_CHARBASE_0x08000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 0, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x08000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 0, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }, } }; diff --git a/src/voltorb_flip/voltorb_flip_data3.c b/src/voltorb_flip/voltorb_flip_data3.c index 392a8f5418..c47208ed6d 100644 --- a/src/voltorb_flip/voltorb_flip_data3.c +++ b/src/voltorb_flip/voltorb_flip_data3.c @@ -4,20 +4,20 @@ #include "voltorb_flip/voltorb_flip_workflow.h" const VoltorbFlipWorkflows sVoltorbFlipWorkflows = { - [WORKFLOW_UNK_0] = { NULL, ov122_021E5BA8, ov122_021E5BE4, NULL, NULL }, - [WORKFLOW_NEW_ROUND] = { NULL, GenerateBoardAndPrintNewLevel, PrintYouCanEarnEvenMoreCoins, NULL, ov122_021E5D24 }, - [WORKFLOW_SELECT_MAIN_MENU] = { PrintPlayNewRound, ov122_021E5DB4, AwaitMainMenuSelection, NULL, NULL }, - [WORKFLOW_SELECT_GAME_INFO] = { PrintWhichSetOfInfo, ov122_021E5E34, AwaitGameInfoSelection, NULL, NULL }, - [WORKFLOW_HOW_TO_PLAY] = { OpenHowToPlayScreen, NULL, PrintHowToPlayMsg, NULL, CloseTutorialScreen }, - [WORKFLOW_HINT] = { OpenHintScreen, NULL, PrintHintMsg, NULL, CloseTutorialScreen }, - [WORKFLOW_ABOUT_MEMO] = { OpenAboutMemoScreen, NULL, PrintAboutMemoMsg, NULL, CloseTutorialScreen }, - [WORKFLOW_RENDER_BOARD] = { NULL, NULL, RenderBoard, NULL, NULL }, + [WORKFLOW_UNK_0] = { NULL, ov122_021E5BA8, ov122_021E5BE4, NULL, NULL }, + [WORKFLOW_NEW_ROUND] = { NULL, GenerateBoardAndPrintNewLevel, PrintYouCanEarnEvenMoreCoins, NULL, ov122_021E5D24 }, + [WORKFLOW_SELECT_MAIN_MENU] = { PrintPlayNewRound, ov122_021E5DB4, AwaitMainMenuSelection, NULL, NULL }, + [WORKFLOW_SELECT_GAME_INFO] = { PrintWhichSetOfInfo, ov122_021E5E34, AwaitGameInfoSelection, NULL, NULL }, + [WORKFLOW_HOW_TO_PLAY] = { OpenHowToPlayScreen, NULL, PrintHowToPlayMsg, NULL, CloseTutorialScreen }, + [WORKFLOW_HINT] = { OpenHintScreen, NULL, PrintHintMsg, NULL, CloseTutorialScreen }, + [WORKFLOW_ABOUT_MEMO] = { OpenAboutMemoScreen, NULL, PrintAboutMemoMsg, NULL, CloseTutorialScreen }, + [WORKFLOW_RENDER_BOARD] = { NULL, NULL, RenderBoard, NULL, NULL }, [WORKFLOW_AWAIT_BOARD_INTERACT] = { NULL, NULL, AwaitBoardInteraction, NULL, ov122_021E6008 }, - [WORKFLOW_FLIP_CARD] = { PlaySuspensefulFanfare, StartCardFlipEffect, AwaitCardFlipAndResult, ov122_021E6358, NULL }, - [WORKFLOW_UNK_10] = { NULL, NULL, PlayWinRoundFanfare, NULL, NULL }, - [WORKFLOW_AWARD_COINS] = { NULL, NULL, AwardCoins, NULL, NULL }, - [WORKFLOW_REVEAL_BOARD] = { NULL, NULL, ov122_021E64E8, ov122_021E6594, NULL }, - [WORKFLOW_UNK_13] = { ov122_021E65F4, NULL, ov122_021E65FC, NULL, ov122_021E67E0 }, - [WORKFLOW_UNK_14] = { ov122_021E66CC, ov122_021E66FC, ov122_021E6700, ov122_021E67DC, ov122_021E67E0 }, - [WORKFLOW_QUIT_ROUND] = { PrintAreYouSureYouWantToQuit, ov122_021E6900, AwaitQuitYesNoSelection, ov122_021E69DC, NULL }, + [WORKFLOW_FLIP_CARD] = { PlaySuspensefulFanfare, StartCardFlipEffect, AwaitCardFlipAndResult, ov122_021E6358, NULL }, + [WORKFLOW_UNK_10] = { NULL, NULL, PlayWinRoundFanfare, NULL, NULL }, + [WORKFLOW_AWARD_COINS] = { NULL, NULL, AwardCoins, NULL, NULL }, + [WORKFLOW_REVEAL_BOARD] = { NULL, NULL, ov122_021E64E8, ov122_021E6594, NULL }, + [WORKFLOW_UNK_13] = { ov122_021E65F4, NULL, ov122_021E65FC, NULL, ov122_021E67E0 }, + [WORKFLOW_UNK_14] = { ov122_021E66CC, ov122_021E66FC, ov122_021E6700, ov122_021E67DC, ov122_021E67E0 }, + [WORKFLOW_QUIT_ROUND] = { PrintAreYouSureYouWantToQuit, ov122_021E6900, AwaitQuitYesNoSelection, ov122_021E69DC, NULL }, }; diff --git a/src/voltorb_flip/voltorb_flip_game.c b/src/voltorb_flip/voltorb_flip_game.c index de0bc61d83..0663b13d38 100644 --- a/src/voltorb_flip/voltorb_flip_game.c +++ b/src/voltorb_flip/voltorb_flip_game.c @@ -98,7 +98,7 @@ void FlipCard(GameState *game, CardID cardId) { GF_ASSERT(card->flipped == FALSE); card->flipped = TRUE; - card->memo = 0; + card->memo = 0; } // Returns TRUE if some amount was deducted. @@ -132,7 +132,7 @@ CardType GetCardType(GameState *game, CardID cardId) { } int IsCardMemoFlagOn(GameState *game, CardID cardId, int memoFlag) { - Card *card = GetCard(game, cardId); + Card *card = GetCard(game, cardId); int cardMemoFlag = card->memo & memoFlag; if (cardMemoFlag == memoFlag) { return 1; @@ -142,7 +142,7 @@ int IsCardMemoFlagOn(GameState *game, CardID cardId, int memoFlag) { void ToggleCardMemo(GameState *game, CardID cardId, int memoFlag) { Card *card = GetCard(game, cardId); - int var2 = card->memo; + int var2 = card->memo; if (var2 & memoFlag) { card->memo -= memoFlag; return; @@ -230,8 +230,8 @@ static void AddRoundSummary(GameState *game) { RoundSummary *round = &game->boardHistory[game->historyHead]; round->roundOutcome = game->roundOutcome; round->cardsFlipped = game->cardsFlipped; - round->boardId = game->boardId; - round->level = game->level; + round->boardId = game->boardId; + round->level = game->level; game->historyHead = (game->historyHead + 1) % 5; } @@ -271,7 +271,7 @@ static int CalcNextLevel(GameState *game) { RoundOutcome roundOutcome; RoundSummary *prevRound = PrevRoundSummary(game); - roundOutcome = prevRound->roundOutcome; + roundOutcome = prevRound->roundOutcome; if (roundOutcome == ROUND_OUTCOME_WON && LEVEL_AT_LEAST(prevRound->boardId, 8)) { return 0; // Lv. 8 @@ -318,7 +318,7 @@ static int CalcNextLevel(GameState *game) { static void SelectBoardId(GameState *game) { int i; - int rand = (u32)MTRandom() % 100; + int rand = (u32)MTRandom() % 100; int level = CalcNextLevel(game); GF_ASSERT(level < 8); @@ -328,7 +328,7 @@ static void SelectBoardId(GameState *game) { } GF_ASSERT(i < 80); } - game->level = level; + game->level = level; game->boardId = i; } @@ -447,8 +447,8 @@ static BOOL RetryBoardGen(GameState *game) { for (i = 0; i < 25; i++) { Card *card = GetCard(game, (u8)i); if (IS_MULTIPLIER_CARD(card->type)) { - int col = i % 5; - int row = i / 5; + int col = i % 5; + int row = i / 5; int voltorbsInCol = VoltorbsAlongAxis(game, AXIS_COL, col); int voltorbsInRow = VoltorbsAlongAxis(game, AXIS_ROW, row); if (voltorbsInRow == 0 || voltorbsInCol == 0) { @@ -476,8 +476,8 @@ static void GenerateBoard(GameState *game) { GF_ASSERT(game->boardId < 80); int voltorbs = sBoardConfigs[game->boardId].voltorbs; - int twos = sBoardConfigs[game->boardId].twos; - int threes = sBoardConfigs[game->boardId].threes; + int twos = sBoardConfigs[game->boardId].twos; + int threes = sBoardConfigs[game->boardId].threes; for (int i = 0; i < 1000; i++) { PlaceCardsOnBoard(game, CARD_TYPE_ONE, 25, FALSE); diff --git a/src/voltorb_flip/voltorb_flip_input.c b/src/voltorb_flip/voltorb_flip_input.c index 1a729734dc..b40c43c989 100644 --- a/src/voltorb_flip/voltorb_flip_input.c +++ b/src/voltorb_flip/voltorb_flip_input.c @@ -199,7 +199,7 @@ static int ov122_021E8F6C(Ov122_021E8CFC *a0) { } static int ov122_021E9020(Ov122_021E8CFC *a0) { - int var1 = sub_02019F74(a0->unk8); + int var1 = sub_02019F74(a0->unk8); u32 elementId = sub_02019D18(a0->unk8); sub_02019F74(a0->unk8); diff --git a/src/voltorb_flip/voltorb_flip_workflow.c b/src/voltorb_flip/voltorb_flip_workflow.c index 0ecd6b77a6..12b1b05d03 100644 --- a/src/voltorb_flip/voltorb_flip_workflow.c +++ b/src/voltorb_flip/voltorb_flip_workflow.c @@ -9,9 +9,9 @@ WorkflowEngine *CreateWorkflowEngine(HeapID a0, VoltorbFlipWorkflows *workflows, int numWorkFlows, struct VoltorbFlipAppWork *work) { WorkflowEngine *ptr = AllocFromHeap(a0, sizeof(WorkflowEngine)); MI_CpuFill8(ptr, 0, sizeof(WorkflowEngine)); - ptr->workflows = workflows; - ptr->size = numWorkFlows; - ptr->work = work; + ptr->workflows = workflows; + ptr->size = numWorkFlows; + ptr->work = work; ptr->nextWorkflow = WORKFLOW_NONE; return ptr; } @@ -23,7 +23,7 @@ void FreeWorkflowEngine(WorkflowEngine *workflow) { // Returns TRUE when the Workflow is terminated. BOOL RunWorkflowEngine(WorkflowEngine *workflow) { VoltorbFlipWorkflows *vfWorkflows = workflow->workflows; - VoltorbFlipWorkflow *vfWorkflow = &(*vfWorkflows)[workflow->curWorkflow]; + VoltorbFlipWorkflow *vfWorkflow = &(*vfWorkflows)[workflow->curWorkflow]; VoltorbFlipTask task; switch (workflow->workflowState) { @@ -33,7 +33,7 @@ BOOL RunWorkflowEngine(WorkflowEngine *workflow) { workflow->workflowState = 1; } else { if (task(workflow, workflow->work)) { - workflow->taskState = 0; + workflow->taskState = 0; workflow->workflowState = 1; } break; @@ -62,14 +62,14 @@ BOOL RunWorkflowEngine(WorkflowEngine *workflow) { workflow->workflowState = 4; } else { if (task(workflow, workflow->work)) { - workflow->taskState = 0; + workflow->taskState = 0; workflow->workflowState = 4; } break; } case 4: GF_ASSERT(workflow->nextWorkflow != WORKFLOW_NONE); - workflow->curWorkflow = workflow->nextWorkflow; + workflow->curWorkflow = workflow->nextWorkflow; workflow->nextWorkflow = WORKFLOW_NONE; if (workflow->curWorkflow == WORKFLOW_TERMINATE) { @@ -77,7 +77,7 @@ BOOL RunWorkflowEngine(WorkflowEngine *workflow) { } workflow->workflowState = 0; - workflow->taskState = 0; + workflow->taskState = 0; break; default: GF_ASSERT(FALSE); @@ -103,7 +103,7 @@ int CurrentTaskState(WorkflowEngine *workflow) { int IncrementTaskState(WorkflowEngine *workflow) { GF_ASSERT(workflow->workflowState != 1); - int newState = workflow->taskState + 1; + int newState = workflow->taskState + 1; workflow->taskState = newState; return newState; } diff --git a/src/vram_transfer_manager.c b/src/vram_transfer_manager.c index efff533b4a..e288e4a247 100644 --- a/src/vram_transfer_manager.c +++ b/src/vram_transfer_manager.c @@ -13,8 +13,8 @@ void GF_CreateVramTransferManager(u32 taskMax, HeapID heapId) { GF_ASSERT(sVramTransferManager != NULL); sVramTransferManager->tasks = AllocFromHeap(heapId, taskMax * sizeof(NNSGfdVramTransferTask)); - sVramTransferManager->nMax = taskMax; - sVramTransferManager->nCur = 0; + sVramTransferManager->nMax = taskMax; + sVramTransferManager->nCur = 0; NNS_GfdInitVramTransferManager(sVramTransferManager->tasks, sVramTransferManager->nMax); } diff --git a/src/wfc_user_info_warning.c b/src/wfc_user_info_warning.c index c09c0b8c93..a9e8020a43 100644 --- a/src/wfc_user_info_warning.c +++ b/src/wfc_user_info_warning.c @@ -18,48 +18,48 @@ #include "unk_0200FA24.h" static const GraphicsBanks sWFCWarningMsgBanksConfig = { - .bg = GX_VRAM_BG_256_AB, - .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, - .subbg = GX_VRAM_SUB_BG_NONE, - .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, - .obj = GX_VRAM_OBJ_NONE, - .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, - .subobj = GX_VRAM_SUB_OBJ_NONE, + .bg = GX_VRAM_BG_256_AB, + .bgextpltt = GX_VRAM_BGEXTPLTT_NONE, + .subbg = GX_VRAM_SUB_BG_NONE, + .subbgextpltt = GX_VRAM_SUB_BGEXTPLTT_NONE, + .obj = GX_VRAM_OBJ_NONE, + .objextpltt = GX_VRAM_OBJEXTPLTT_NONE, + .subobj = GX_VRAM_SUB_OBJ_NONE, .subobjextpltt = GX_VRAM_SUB_OBJEXTPLTT_NONE, - .tex = GX_VRAM_TEX_NONE, - .texpltt = GX_VRAM_TEXPLTT_NONE, + .tex = GX_VRAM_TEX_NONE, + .texpltt = GX_VRAM_TEXPLTT_NONE, }; static const struct GraphicsModes sWFCWarningMsgBgModeSet = { - .dispMode = GX_DISPMODE_GRAPHICS, - .bgMode = GX_BGMODE_0, - .subMode = GX_BGMODE_0, + .dispMode = GX_DISPMODE_GRAPHICS, + .bgMode = GX_BGMODE_0, + .subMode = GX_BGMODE_0, ._2d3dMode = GX_BG0_AS_2D, }; static const BgTemplate sWFCWarningBgTemplate = { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .bufferSize = 0x800, - .baseTile = 0, - .size = GF_BG_SCR_SIZE_256x256, - .colorMode = GX_BG_COLORMODE_16, + .baseTile = 0, + .size = GF_BG_SCR_SIZE_256x256, + .colorMode = GX_BG_COLORMODE_16, .screenBase = GX_BG_SCRBASE_0x0000, - .charBase = GX_BG_CHARBASE_0x18000, - .bgExtPltt = GX_BG_EXTPLTT_01, - .priority = 1, - .areaOver = GX_BG_AREAOVER_XLU, - .dummy = 0, - .mosaic = FALSE, + .charBase = GX_BG_CHARBASE_0x18000, + .bgExtPltt = GX_BG_EXTPLTT_01, + .priority = 1, + .areaOver = GX_BG_AREAOVER_XLU, + .dummy = 0, + .mosaic = FALSE, }; static const WindowTemplate sWFCWarningWindowTemplate = { - .bgId = 0, - .left = 3, - .top = 3, - .width = 26, - .height = 18, - .palette = 1, + .bgId = 0, + .left = 3, + .top = 3, + .width = 26, + .height = 18, + .palette = 1, .baseTile = 0x23, }; @@ -100,7 +100,7 @@ void ShowWFCUserInfoWarning(HeapID heapId, int a1) { BG_SetMaskColor(GF_BG_LYR_SUB_0, RGB(1, 1, 27)); MsgData *warnings_msgdata = NewMsgDataFromNarc(MSGDATA_LOAD_LAZY, NARC_msgdata_msg, NARC_msg_msg_0800_bin, heapId); - String *warning_string = String_New(384, heapId); + String *warning_string = String_New(384, heapId); ResetAllTextPrinters(); diff --git a/src/yes_no_prompt.c b/src/yes_no_prompt.c index ef97b37f36..c6e9cb5447 100644 --- a/src/yes_no_prompt.c +++ b/src/yes_no_prompt.c @@ -78,17 +78,17 @@ static void YesNoPrompt_InitFromTemplate_Internal(YesNoPrompt *yesno, const YesN { 16, 6 }, }; - yesno->bgConfig = template->bgConfig; - yesno->bgId = template->bgId; - yesno->x = template->x; - yesno->y = template->y; + yesno->bgConfig = template->bgConfig; + yesno->bgId = template->bgId; + yesno->x = template->x; + yesno->y = template->y; yesno->inTouchMode = FALSE; if (template->initialCursorPos < 2) { yesno->cursorPos = template->initialCursorPos; } else { yesno->cursorPos = 0; } - yesno->width = dimensions[template->shapeParam][0]; + yesno->width = dimensions[template->shapeParam][0]; yesno->height = dimensions[template->shapeParam][1]; YesNoPrompt_InitPixelDataFromTemplate(yesno, template); YesNoPrompt_InitPlttFromTemplate(yesno, template); @@ -115,7 +115,7 @@ void YesNoPrompt_InitFromTemplateWithPalette(YesNoPrompt *yesno, const YesNoProm YesNoResponse YesNoPrompt_HandleInputForSave(YesNoPrompt *yesno) { yesno->lastTouchEvent = 8; - YesNoResponse result = YesNoPrompt_HandleInput(yesno); + YesNoResponse result = YesNoPrompt_HandleInput(yesno); if (result == YESNORESPONSE_WAIT && yesno->lastTouchEvent == 0) { if (yesno->result == 0) { result = YESNORESPONSE_YES_TOUCH; @@ -221,8 +221,8 @@ void YesNoPrompt_SetIgnoreTouch(YesNoPrompt *yesno, int a1) { static void YesNoPrompt_Init(YesNoPrompt *yesno, HeapID heapId) { memset(yesno, 0, sizeof(YesNoPrompt)); yesno->buttonsAreInit = 0; - yesno->heapId = heapId; - yesno->result = 3; + yesno->heapId = heapId; + yesno->result = 3; yesno->lastTouchEvent = 8; } @@ -243,14 +243,14 @@ static void YesNoPrompt_InitButtonsFromTemplate(YesNoPrompt *yesno, const YesNoP yesno->unk68[i] = (i + 1) * FX32_ONE; } - sp4.bgConfig = yesno->bgConfig; - sp4.bgId = yesno->bgId; + sp4.bgConfig = yesno->bgConfig; + sp4.bgId = yesno->bgId; sp4.screenDataNarcId = NARC_system_touch_subwindow; - sp4.baseTile = template->tileStart; - sp4.plttNum = template->plttSlot; - sp4.unk4 = yesno->unk68; - sp4.unk13 = 2; - sp4.x = yesno->x; + sp4.baseTile = template->tileStart; + sp4.plttNum = template->plttSlot; + sp4.unk4 = yesno->unk68; + sp4.unk13 = 2; + sp4.x = yesno->x; u8 baseFileNo; if (template->shapeParam) { @@ -272,10 +272,10 @@ static void YesNoPrompt_InitButtonsFromTemplate(YesNoPrompt *yesno, const YesNoP static void SetupTouchHitboxesController(YesNoPrompt *yesno, const YesNoPromptTemplate *template) { int i; for (i = 0; i < 2; ++i) { - yesno->hitboxes[i].rect.top = (yesno->y * 8) + (i * yesno->height * 8); - yesno->hitboxes[i].rect.left = (yesno->x * 8); + yesno->hitboxes[i].rect.top = (yesno->y * 8) + (i * yesno->height * 8); + yesno->hitboxes[i].rect.left = (yesno->x * 8); yesno->hitboxes[i].rect.bottom = (yesno->y * 8) + (i * yesno->height * 8) + (yesno->height * 8); - yesno->hitboxes[i].rect.right = (yesno->x * 8) + (yesno->width * 8); + yesno->hitboxes[i].rect.right = (yesno->x * 8) + (yesno->width * 8); } yesno->touchHitboxController = TouchHitboxController_Create(yesno->hitboxes, 2, (TouchHitboxControllerCallback)YesNoButton_TouchHitboxCB, yesno, yesno->heapId); } @@ -283,7 +283,7 @@ static void SetupTouchHitboxesController(YesNoPrompt *yesno, const YesNoPromptTe static void YesNoButton_TouchHitboxCB(u32 index, u32 event, YesNoPrompt *yesno) { yesno->lastTouchEvent = event; if (event == 0) { - yesno->result = index; + yesno->result = index; YesNoPromptButton *r3 = &yesno->buttons[index]; ScreenPushGraphicsRect(r3->bgConfig, r3->bgId, r3->screenDataPtrs[1], r3->x, r3->y); PlaySE(SEQ_SE_DP_BUTTON9); @@ -292,13 +292,13 @@ static void YesNoButton_TouchHitboxCB(u32 index, u32 event, YesNoPrompt *yesno) static void YesNoPromptButton_Draw(YesNoPromptButton *button, const struct UnkStruct_02016C28 *arg, HeapID heapId) { struct YesNoPromptSubstruct00_18 *r2 = &button->unk18; - r2->unk0 = arg->unk4; - r2->unk4 = arg->unk13; - r2->unk8 = 0; - button->bgConfig = arg->bgConfig; - button->bgId = arg->bgId; - button->x = arg->x; - button->y = arg->y; + r2->unk0 = arg->unk4; + r2->unk4 = arg->unk13; + r2->unk8 = 0; + button->bgConfig = arg->bgConfig; + button->bgId = arg->bgId; + button->x = arg->x; + button->y = arg->y; for (int i = 0; i < 2; ++i) { button->scrnDataRaw[i] = GfGfxLoader_GetScrnData((NarcId)arg->screenDataNarcId, arg->scrnDataFileNo[i], TRUE, &button->screenDataPtrs[i], heapId); ScreenSetBaseTile(button->screenDataPtrs[i], arg->baseTile); @@ -321,9 +321,9 @@ static SysTask *LoadPixelDataFromNarcAndScheduleTransfer(NarcId narcId, s32 file struct SysTaskState_02016DBC *buffer = (struct SysTaskState_02016DBC *)AllocFromHeap(heapId, sizeof(struct SysTaskState_02016DBC)); memset(buffer, 0, sizeof(struct SysTaskState_02016DBC)); buffer->charDataRaw = GfGfxLoader_GetCharData(narcId, fileId, TRUE, &buffer->charData, heapId); - buffer->bgConfig = bgConfig; - buffer->bgId = bgId; - buffer->tileStart = tileStart; + buffer->bgConfig = bgConfig; + buffer->bgId = bgId; + buffer->tileStart = tileStart; return SysTask_CreateOnVWaitQueue(SysTask_LoadBGPixels, buffer, 0x80); } @@ -331,9 +331,9 @@ static SysTask *LoadPlttFromNarcAndScheduleTransfer(NarcId narcId, s32 fileId, i struct SysTaskState_02016DF8 *buffer = (struct SysTaskState_02016DF8 *)AllocFromHeap(heapId, sizeof(struct SysTaskState_02016DF8)); memset(buffer, 0, sizeof(struct SysTaskState_02016DF8)); buffer->plttDataRaw = GfGfxLoader_GetPlttData(narcId, fileId, &buffer->plttData, heapId); - buffer->bgId = bgId; - buffer->offset = offset; - buffer->size = size; + buffer->bgId = bgId; + buffer->offset = offset; + buffer->size = size; return SysTask_CreateOnVWaitQueue(SysTask_LoadBGPltt, buffer, 0x80); }