diff --git a/asm/include/itcm.inc b/asm/include/itcm.inc index c440050a..2f3cdf09 100644 --- a/asm/include/itcm.inc +++ b/asm/include/itcm.inc @@ -25,7 +25,6 @@ .public _022A3538 .public _022A353C .public _022A3554 -.public _022A35DC .public _022A35E8 .public _022A3614 .public _022A3620 @@ -81,7 +80,6 @@ .public _022A3804 .public _022A3805 .public _022A3806 -.public _022A88DC .public _022A88F0 .public _022A88FC .public _022B966C @@ -175,7 +173,9 @@ .public sub_02080EF0 .public sub_02080F30 .public sub_02080F30 +.public TOUCHSCREEN_STATUS .public TRIG_TABLE .public TryAddTargetToAiTargetList .public UpdateAiTargetPos .public UpdateWindow +.public WINDOW_LIST diff --git a/asm/include/main_02000DE0.inc b/asm/include/main_02000DE0.inc index 2b380e9c..56b83094 100644 --- a/asm/include/main_02000DE0.inc +++ b/asm/include/main_02000DE0.inc @@ -25,7 +25,6 @@ .public _020B3384 .public _020B33A0 .public _020B33C0 -.public _020B4BC0 .public _0229AFC0 .public _0229AFCC .public _0229AFE4 @@ -47,6 +46,7 @@ .public CardPullOut .public Debug_FatalError .public Debug_Print0 +.public DEFAULT_MEMORY_ARENA_MEMORY .public GetHeldButtons .public GetReleasedStylus .public GX_DispOff diff --git a/asm/include/main_02003DB8.inc b/asm/include/main_02003DB8.inc index 48a26eb6..51ed1acb 100644 --- a/asm/include/main_02003DB8.inc +++ b/asm/include/main_02003DB8.inc @@ -35,7 +35,6 @@ .public _022A3538 .public _022A353C .public _022A3554 -.public _022A35DC .public _022A35E8 .public _022A3614 .public _022A3620 @@ -124,3 +123,4 @@ .public sub_020845F8 .public sub_020850B4 .public sub_02085180 +.public TOUCHSCREEN_STATUS diff --git a/asm/include/main_0200C4CC.inc b/asm/include/main_0200C4CC.inc index b07c1cd6..b08af32d 100644 --- a/asm/include/main_0200C4CC.inc +++ b/asm/include/main_0200C4CC.inc @@ -27,11 +27,11 @@ .public _020AF6C4 .public _020AF6C8 .public _020AFF88_EU -.public _022A3824 .public AllKecleonShopsZInit .public AllocateTemp1024ByteBufferFromPool .public ARM9_UNKNOWN_TABLE__NA_2097FF8 .public AVAILABLE_ITEMS_IN_GROUP_TABLE +.public BAG_ITEMS .public BAG_ITEMS_PTR_MIRROR .public CopyBitsFrom .public CopyBitsTo diff --git a/asm/include/main_0200ED1C.inc b/asm/include/main_0200ED1C.inc index a8c603ef..8c92b8b5 100644 --- a/asm/include/main_0200ED1C.inc +++ b/asm/include/main_0200ED1C.inc @@ -269,7 +269,6 @@ .public _022A4BEC .public _022A4C00 .public _022A4C28 -.public _022A4C50 .public _022A4E50 .public _022A4E58 .public _022A4E7C @@ -297,6 +296,7 @@ .public AreItemsEquivalent .public ArrayCopy32 .public ArrayFill32 +.public AUDIO_COMMANDS_BUFFER .public BAG_ITEMS_PTR_MIRROR .public BulkItemToItem .public CALCIUM_STAT_BOOST diff --git a/asm/include/main_0202598C.inc b/asm/include/main_0202598C.inc index e767349d..88fd61e9 100644 --- a/asm/include/main_0202598C.inc +++ b/asm/include/main_0202598C.inc @@ -89,7 +89,6 @@ .public _022A7B00 .public _022A7B1C .public _022A7EDC -.public _022A88DC .public _022A88E4 .public _022A88F0 .public _022A88F8 @@ -104,20 +103,20 @@ .public _022A92C4 .public _022A9A5C .public _022AA35C -.public _022AAC64 .public _022AAC68 -.public _022AAC80 -.public _022AACFC -.public _022AAD78 -.public _022AAD7C .public _s32_div_f .public ADVANCED_MENU_DEFAULT_WINDOW_PARAMS .public ADVANCED_TEXT_BOX_DEFAULT_WINDOW_PARAMS +.public ALERT_ANIMATION_CONTROL .public ALERT_BOX_DEFAULT_WINDOW_PARAMS +.public ALERT_SPRITE_ID .public AnalyzeText .public AREA_NAME_BOX_DEFAULT_WINDOW_PARAMS .public COLLECTION_MENU_DEFAULT_WINDOW_PARAMS .public CONTROLS_CHART_DEFAULT_WINDOW_PARAMS +.public CURSOR_16_ANIMATION_CONTROL +.public CURSOR_16_SPRITE_ID +.public CURSOR_ANIMATION_CONTROL .public DEBUG_MENU_DEFAULT_WINDOW_PARAMS .public DecompressAtHalf .public DIALOGUE_BOX_DEFAULT_WINDOW_PARAMS @@ -216,3 +215,4 @@ .public UnloadFile .public UnloadOverlay .public WAN_TABLE +.public WINDOW_LIST diff --git a/asm/include/main_02034974.inc b/asm/include/main_02034974.inc index 0fb9e8d9..e219546f 100644 --- a/asm/include/main_02034974.inc +++ b/asm/include/main_02034974.inc @@ -288,7 +288,6 @@ .public _022AAE00 .public _022AAE2A .public _022AAE2E -.public _022AAE4C .public _022AAE58 .public _022AAE64 .public _022AAE68 @@ -303,22 +302,13 @@ .public _022AB0A1 .public _022AB0A2 .public _022AB0A9 -.public _022AB0AC -.public _022AB4AC -.public _022AB4B0 .public _022AB4F8 -.public _022AB4FC .public _022AB510 .public _022AB518 .public _022AB5A8 .public _022AB5AC -.public _022AB694 .public _022AB69C -.public _022AB918 .public _022AB924 -.public _022AB92C -.public _022AB930 -.public _022ABDE0 .public _f2d .public _fsub .public _s32_div_f @@ -391,6 +381,7 @@ .public Debug_Print0 .public Debug_SetDebugFlag .public Debug_SetLogFlag +.public DEBUG_SPECIAL_EPISODE_NUMBER .public DecompressAtNormalVeneer .public DEFAULT_HERO_ID .public DexNumbersEqual @@ -513,8 +504,12 @@ .public IsValidTeamMember .public ItemZInit .public KAOMADO_FILEPATH +.public KAOMADO_STREAM .public KEYBOARD_STRING_IDS +.public LAST_NEW_MOVE .public LearnMoves +.public LEVEL_UP_DATA_DECOMPRESS_BUFFER +.public LEVEL_UP_DATA_MONSTER_ID .public LoadFileFromRom .public LoadOverlay .public MemAlloc @@ -548,6 +543,8 @@ .public ov29_02347100 .public OverlayIsLoaded .public PARTNER_TALK_KIND_TABLE +.public PENDING_DUNGEON_ID +.public PLAY_TIME_SECONDS .public PlayAdvancedTextBoxInputSound .public PlayBgmByIdVeneer .public PlaySeVolumeWrapper @@ -570,6 +567,7 @@ .public ResumeAdvancedMenu .public SCRIPT_VARS .public SCRIPT_VARS_LOCALS +.public SCRIPT_VARS_VALUES .public SECONDARY_TERRAIN_TYPES .public SetActiveInventory .public SetActiveKecleonShop @@ -801,7 +799,9 @@ .public sub_02083B14 .public sub_02083B3C .public sub_02084304 +.public TEAM_MEMBER_TABLE .public TEAM_MEMBER_TABLE_PTR +.public TEAM_NAME .public TryPointCameraToMonster .public UnloadFile .public UNOWN_SPECIES_ADDITIONAL_CHAR_PTR_TABLE diff --git a/asm/include/main_02075600.inc b/asm/include/main_02075600.inc index 0251144e..b3bd8798 100644 --- a/asm/include/main_02075600.inc +++ b/asm/include/main_02075600.inc @@ -23,7 +23,6 @@ .public _022B9618 .public _022B961C .public _022B9644 -.public _022B9648 .public _022B9654 .public _022B966C .public _022B9670 @@ -91,5 +90,6 @@ .public sub_02084A4C .public sub_02085BD4 .public SVC_WaitByLoop +.public THREAD_INFO_STRUCT .public WaitForever2 .public WaitForInterrupt diff --git a/asm/include/overlay_29_022F62CC.inc b/asm/include/overlay_29_022F62CC.inc index 17974e6e..e44184bc 100644 --- a/asm/include/overlay_29_022F62CC.inc +++ b/asm/include/overlay_29_022F62CC.inc @@ -27,6 +27,7 @@ .public IsFloorOver .public IsShaymin .public IsShoppableItem +.public LOADED_ATTACK_SPRITE_DATA .public LOADED_ATTACK_SPRITE_FILE_INDEX .public LoadMissionMonsterSprites .public LoadMonsterSprite @@ -48,7 +49,6 @@ .public ov29_0234B09C .public ov29_02352760 .public ov29_023535A8 -.public ov29_0237C9AC .public ov29_0237C9B0 .public RemoveGroundItem .public SpawnItem diff --git a/asm/include/overlay_29_023085DC.inc b/asm/include/overlay_29_023085DC.inc index 8fb3f198..a247cd3b 100644 --- a/asm/include/overlay_29_023085DC.inc +++ b/asm/include/overlay_29_023085DC.inc @@ -43,6 +43,6 @@ .public ov29_0231EDFC .public ov29_023380FC .public ov29_023535DC -.public ov29_0237CA6D +.public RAPID_SPIN_BINDING_REMOVAL .public ResetDamageData .public UpdateAiTargetPos diff --git a/asm/include/overlay_29_0230E914.inc b/asm/include/overlay_29_0230E914.inc deleted file mode 100644 index 09df2f47..00000000 --- a/asm/include/overlay_29_0230E914.inc +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -.public abs -.public AI_THROWN_ITEM_ACTION_CHOICE_COUNT -.public BAG_ITEMS_PTR_MIRROR -.public CanSeeTarget -.public CheckVariousConditions -.public DUNGEON_PTR -.public DungeonRandInt -.public DungeonRandOutcome__022EAB20 -.public EntityIsValid__0230F008 -.public GetAiUseItemProbability -.public GetDirectionTowardsPosition -.public GetItemCategoryVeneer -.public GetItemInfo -.public GetPossibleAiArcItemTargets -.public GetTile -.public GetTreatmentBetweenMonsters -.public IqSkillIsEnabled -.public IsTargetInRange -.public MonsterCanThrowItems -.public ov29_0237C9D0 -.public ov29_0237C9D8 -.public ov29_0237C9F8 -.public SetMonsterActionFields -.public TestItemAiFlag diff --git a/asm/include/overlay_29_0230EDB0.inc b/asm/include/overlay_29_0230EDB0.inc new file mode 100644 index 00000000..66d6fe06 --- /dev/null +++ b/asm/include/overlay_29_0230EDB0.inc @@ -0,0 +1,12 @@ +#pragma once +.public abs +.public AI_THROWN_ITEM_ACTION_CHOICE_COUNT +.public AI_THROWN_ITEM_DIRECTION_IS_USED +.public AI_THROWN_ITEM_DIRECTIONS +.public AI_THROWN_ITEM_PROBABILITIES +.public CanSeeTarget +.public DUNGEON_PTR +.public EntityIsValid__0230F008 +.public GetAiUseItemProbability +.public GetTreatmentBetweenMonsters +.public IsTargetInRange diff --git a/asm/include/overlay_29_0232145C.inc b/asm/include/overlay_29_0232145C.inc index 38b999ef..2d0375d7 100644 --- a/asm/include/overlay_29_0232145C.inc +++ b/asm/include/overlay_29_0232145C.inc @@ -35,6 +35,7 @@ .public LogMessageByIdWithPopupCheckUser .public LogMessageWithPopupCheckUser .public LowerSpeed +.public METRONOME_NEXT_INDEX .public METRONOME_TABLE .public NATURE_POWER_TABLE .public NIGHTMARE_TURN_RANGE @@ -64,7 +65,6 @@ .public ov29_0234B084 .public ov29_0235370C .public ov29_0237CA68 -.public ov29_0237CA88 .public SLEEP_TURN_RANGE .public StringFromId .public sub_0201D1B0 diff --git a/asm/include/overlay_29_02325644.inc b/asm/include/overlay_29_02325644.inc index 60268993..d6065004 100644 --- a/asm/include/overlay_29_02325644.inc +++ b/asm/include/overlay_29_02325644.inc @@ -58,6 +58,7 @@ .public METEOR_MASH_BOOST_ATTACK_CHANCE .public MirrorMoveIsActive .public MORNING_SUN_HP_RESTORATION_TABLE +.public MULTIHIT_FATIGUE_MOVE_USED .public NIGHTMARE_TURN_RANGE .public OCTAZOOKA_LOWER_ACCURACY_CHANCE .public ov10_022BED90 @@ -77,16 +78,15 @@ .public ov29_0234B034 .public ov29_0234BA54 .public ov29_02352AD8 -.public ov29_0237CA69 -.public ov29_0237CA6A -.public ov29_0237CA6D -.public ov29_0237CA70 .public POWDER_SNOW_FREEZE_CHANCE .public PSYBEAM_CONFUSE_CHANCE +.public RAPID_SPIN_BINDING_REMOVAL .public RAZOR_WIND_DAMAGE_MULTIPLIER .public REVERSAL_DAMAGE_MULT_TABLE .public ROCK_SLIDE_CRINGE_CHANCE .public ROLLOUT_DAMAGE_MULT_TABLE +.public ROLLOUT_ICE_BALL_MISSED +.public ROLLOUT_ICE_BALL_SUCCESSIVE_HITS .public ShouldDisplayEntityAdvanced .public SILVER_WIND_BOOST_CHANCE .public SKY_ATTACK_CRINGE_CHANCE diff --git a/asm/include/overlay_29_02328030.inc b/asm/include/overlay_29_02328030.inc index b0ea9dd6..be0f0ba5 100644 --- a/asm/include/overlay_29_02328030.inc +++ b/asm/include/overlay_29_02328030.inc @@ -49,6 +49,7 @@ .public LowerOffensiveStat .public MOONLIGHT_HP_RESTORATION_TABLE .public MUDDY_WATER_LOWER_ACCURACY_CHANCE +.public MULTIHIT_MOVE_SUCCESSIVE_HITS .public NATURE_POWER_TABLE .public ov10_022C4E44 .public ov10_022C6324 @@ -69,9 +70,6 @@ .public ov29_0234B084 .public ov29_0234C738 .public ov29_02352B18 -.public ov29_0237CA6B -.public ov29_0237CA78 -.public ov29_0237CA7C .public POISON_FANG_POISON_CHANCE .public POISON_STING_POISON_CHANCE .public RemoveEmptyItemsInBagWrapper @@ -89,6 +87,7 @@ .public THUNDERBOLT_PARALYZE_CHANCE .public THUNDERSHOCK_PARALYZE_CHANCE .public TRI_ATTACK_STATUS_CHANCE +.public TRIPLE_KICK_SUCCESSIVE_HITS .public TryActivateWeather .public TryEndStatusWithAbility .public TryExplosion @@ -108,6 +107,7 @@ .public TryInflictTauntStatus .public TryInflictWishStatus .public TryWarp +.public TWINEEDLE_HIT_TRACKER .public TWINEEDLE_POISON_CHANCE .public TWISTER_CRINGE_CHANCE .public WATERFALL_CRINGE_CHANCE diff --git a/asm/include/overlay_29_0232A3FC.inc b/asm/include/overlay_29_0232A3FC.inc index a2b07bc1..fd84e652 100644 --- a/asm/include/overlay_29_0232A3FC.inc +++ b/asm/include/overlay_29_0232A3FC.inc @@ -56,6 +56,7 @@ .public LowerSpeed .public LUSTER_PURGE_LOWER_SPECIAL_DEFENSE_CHANCE .public METAL_CLAW_BOOST_ATTACK_CHANCE +.public METRONOME_NEXT_INDEX .public METRONOME_TABLE .public MIST_BALL_LOWER_SPECIAL_ATTACK_CHANCE .public MoveMonsterToPos @@ -81,7 +82,6 @@ .public ov29_0235171E .public ov29_02352B1C .public ov29_0237CA84 -.public ov29_0237CA88 .public POISON_TAIL_POISON_CHANCE .public RemoveEquivItem .public REST_TURN_RANGE diff --git a/asm/include/overlay_29_0232E864.inc b/asm/include/overlay_29_0232E864.inc index 1643b57d..d1b4d670 100644 --- a/asm/include/overlay_29_0232E864.inc +++ b/asm/include/overlay_29_0232E864.inc @@ -418,10 +418,10 @@ .public ov29_0234B034 .public ov29_02353718 .public ov29_0237CA68 -.public ov29_0237CA69 .public ov29_0237CA74 .public ov29_0237CA80 .public PlayMoveAnimation +.public ROLLOUT_ICE_BALL_MISSED .public ShouldDisplayEntityWrapper .public SPATK_STAT_IDX .public sub_02050FF8 diff --git a/asm/include/overlay_29_0233861C.inc b/asm/include/overlay_29_0233861C.inc index 1d50425b..52fe7ecb 100644 --- a/asm/include/overlay_29_0233861C.inc +++ b/asm/include/overlay_29_0233861C.inc @@ -10,6 +10,7 @@ .public DUNGEON_PTR .public DungeonRandInt .public DungeonRandRange +.public FLOOR_GENERATION_STATUS .public GenerateSecondaryTerrainFormations .public GetFinalKecleonShopSpawnChance .public GetFloorType @@ -69,7 +70,6 @@ .public ov29_0237CACC .public ov29_0237CD40 .public ov29_0237CFB8 -.public ov29_0237CFBC .public PlaceFixedRoomTile .public PlayEffectAnimationPos .public PosIsOutOfBounds diff --git a/asm/include/overlay_29_02340CE4.inc b/asm/include/overlay_29_02340CE4.inc index a312d8e0..5419c829 100644 --- a/asm/include/overlay_29_02340CE4.inc +++ b/asm/include/overlay_29_02340CE4.inc @@ -14,6 +14,7 @@ .public FIXED_ROOM_DATA_PTR .public FIXED_ROOM_ENTITY_SPAWN_TABLE .public FIXED_ROOM_MONSTER_SPAWN_STATS_TABLE +.public FLOOR_GENERATION_STATUS .public GenerateCleanItem .public GenerateStandardItem .public GetActiveTeamMember @@ -98,7 +99,6 @@ .public ov29_02353110 .public ov29_023534F0 .public ov29_02353798 -.public ov29_0237CFBC .public ov29_0237CFC0 .public ov29_0237CFFC .public PointsToZero diff --git a/asm/include/overlay_29_bss_02353860.inc b/asm/include/overlay_29_bss_02353860.inc new file mode 100644 index 00000000..3f59c932 --- /dev/null +++ b/asm/include/overlay_29_bss_02353860.inc @@ -0,0 +1,2 @@ +#pragma once + diff --git a/asm/include/overlay_29_bss_0237CA18.inc b/asm/include/overlay_29_bss_0237CA18.inc new file mode 100644 index 00000000..3f59c932 --- /dev/null +++ b/asm/include/overlay_29_bss_0237CA18.inc @@ -0,0 +1,2 @@ +#pragma once + diff --git a/asm/include/overlay_29_data_023534E0.inc b/asm/include/overlay_29_data_023534E0.inc new file mode 100644 index 00000000..ad692efd --- /dev/null +++ b/asm/include/overlay_29_data_023534E0.inc @@ -0,0 +1,22 @@ +#pragma once +.public ov29_0230D704 +.public ov29_0230D70C +.public ov29_0230D738 +.public ov29_0230D76C +.public ov29_0234FD28 +.public ov29_0234FD38 +.public ov29_0234FD58 +.public ov29_0234FD6C +.public ov29_0234FD80 +.public ov29_0234FD88 +.public ov29_0234FD90 +.public ov29_0234FD98 +.public ov29_0234FDA0 +.public ov29_0234FDA8 +.public ov29_0234FDB0 +.public ov29_0234FDB8 +.public ov29_0234FDC0 +.public ov29_0234FDC8 +.public ov29_023527E0 +.public ov29_023527E4 +.public ov29_023527E8 diff --git a/asm/include/overlay_29_data_02353700.inc b/asm/include/overlay_29_data_02353700.inc new file mode 100644 index 00000000..520234f5 --- /dev/null +++ b/asm/include/overlay_29_data_02353700.inc @@ -0,0 +1,6 @@ +#pragma once +.public ov29_02353128 +.public ov29_02353140 +.public ov29_02353158 +.public ov29_02353170 +.public ov29_02353188 diff --git a/asm/include/overlay_29_02352A54.inc b/asm/include/overlay_29_rodata_0234FD04.inc similarity index 100% rename from asm/include/overlay_29_02352A54.inc rename to asm/include/overlay_29_rodata_0234FD04.inc diff --git a/asm/include/overlay_29_0238280C.inc b/asm/include/overlay_29_rodata_02352A6C.inc similarity index 51% rename from asm/include/overlay_29_0238280C.inc rename to asm/include/overlay_29_rodata_02352A6C.inc index 997e7ead..6221d7fc 100644 --- a/asm/include/overlay_29_0238280C.inc +++ b/asm/include/overlay_29_rodata_02352A6C.inc @@ -23,32 +23,6 @@ .public ov10_022C4AE8 .public ov10_022C4B00 .public ov10_022C4B98 -.public ov29_0230D704 -.public ov29_0230D70C -.public ov29_0230D738 -.public ov29_0230D76C .public ov29_0234F21C .public ov29_0234F248 .public ov29_0234F9E8 -.public ov29_0234FD28 -.public ov29_0234FD38 -.public ov29_0234FD58 -.public ov29_0234FD6C -.public ov29_0234FD80 -.public ov29_0234FD88 -.public ov29_0234FD90 -.public ov29_0234FD98 -.public ov29_0234FDA0 -.public ov29_0234FDA8 -.public ov29_0234FDB0 -.public ov29_0234FDB8 -.public ov29_0234FDC0 -.public ov29_0234FDC8 -.public ov29_023527E0 -.public ov29_023527E4 -.public ov29_023527E8 -.public ov29_02353128 -.public ov29_02353140 -.public ov29_02353158 -.public ov29_02353170 -.public ov29_02353188 diff --git a/asm/itcm.s b/asm/itcm.s index f6d418a2..9e90b17c 100644 --- a/asm/itcm.s +++ b/asm/itcm.s @@ -1419,7 +1419,7 @@ sub_01FF9128: ; 0x01FF9128 sub sp, sp, #0x14 mov r1, #0xe0 mul r3, r0, r1 - ldr r1, _01FF9290 ; =_022A88DC + ldr r1, _01FF9290 ; =WINDOW_LIST add r1, r1, r3 str r1, [sp] ldrb r1, [r1, #7] @@ -1511,7 +1511,7 @@ _01FF9288: add sp, sp, #0x14 ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 -_01FF9290: .word _022A88DC +_01FF9290: .word WINDOW_LIST _01FF9294: .word _022A88FC _01FF9298: .word _022A88F0 arm_func_end sub_01FF9128 @@ -1522,7 +1522,7 @@ sub_01FF929C: ; 0x01FF929C sub sp, sp, #0x20 mov r1, #0xe0 mul r4, r0, r1 - ldr r1, _01FF9428 ; =_022A88DC + ldr r1, _01FF9428 ; =WINDOW_LIST add r1, r1, r4 str r1, [sp, #8] ldrb r1, [r1, #7] @@ -1623,7 +1623,7 @@ _01FF9420: add sp, sp, #0x20 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 -_01FF9428: .word _022A88DC +_01FF9428: .word WINDOW_LIST _01FF942C: .word _022A88FC _01FF9430: .word _022A88F0 arm_func_end sub_01FF929C diff --git a/asm/main_02000DE0.s b/asm/main_02000DE0.s index 8a6ae086..2b68a96b 100644 --- a/asm/main_02000DE0.s +++ b/asm/main_02000DE0.s @@ -7,7 +7,7 @@ InitMemAllocTable: ; 0x02000DE0 stmdb sp!, {r3, lr} sub sp, sp, #8 - ldr r1, _02000E54 ; =_020B4BC0 + ldr r1, _02000E54 ; =DEFAULT_MEMORY_ARENA_MEMORY ldr r3, _02000E58 ; =0x001E6400 ldr r0, _02000E5C ; =_02090B70 mov r2, r1 @@ -35,7 +35,7 @@ InitMemAllocTable: ; 0x02000DE0 add sp, sp, #8 ldmia sp!, {r3, pc} .align 2, 0 -_02000E54: .word _020B4BC0 +_02000E54: .word DEFAULT_MEMORY_ARENA_MEMORY _02000E58: .word 0x001E6400 _02000E5C: .word _02090B70 _02000E60: .word _020B3380 diff --git a/asm/main_02003DB8.s b/asm/main_02003DB8.s index fcfe8065..6539dd52 100644 --- a/asm/main_02003DB8.s +++ b/asm/main_02003DB8.s @@ -2974,7 +2974,7 @@ _02006560: .word _022A35E8 arm_func_start sub_02006564 sub_02006564: ; 0x02006564 - ldr r0, _020065A4 ; =_022A35DC + ldr r0, _020065A4 ; =TOUCHSCREEN_STATUS mvn r1, #0 str r1, [r0] str r1, [r0, #4] @@ -2992,7 +2992,7 @@ _02006584: blt _02006584 bx lr .align 2, 0 -_020065A4: .word _022A35DC +_020065A4: .word TOUCHSCREEN_STATUS _020065A8: .word _022A3614 arm_func_end sub_02006564 @@ -3017,7 +3017,7 @@ _020065D8: sub ip, ip, #0xc bpl _020065D8 ldrh r1, [sp, #0x26] - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS tst r1, #1 mvnne r2, #0 ldreqh r2, [sp, #0x20] @@ -3026,12 +3026,12 @@ _020065D8: str r2, [r0, #0x38] mvnne r2, #0 ldreqh r2, [sp, #0x22] - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS cmp r1, #1 str r2, [r0, #0x3c] moveq r1, #1 movne r1, #0 - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS tst r1, #0xff strb r1, [r0, #0x40] ldreqb r1, [r0, #0x4c] @@ -3076,11 +3076,11 @@ _020066BC: ldrge r0, [sp, #0x38] cmpge r0, #0 addge r0, sp, #0x34 - ldrge r3, _02006B50 ; =_022A35DC + ldrge r3, _02006B50 ; =TOUCHSCREEN_STATUS ldmgeia r0, {r0, r1, r2} stmgeia r3, {r0, r1, r2} bge _02006710 - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS mvn r1, #0 str r1, [r0] str r1, [r0, #4] @@ -3094,12 +3094,12 @@ _020066FC: mov r1, #0 strb r1, [r0, #8] _02006710: - ldr r0, _02006B50 ; =_022A35DC + ldr r0, _02006B50 ; =TOUCHSCREEN_STATUS add r3, sp, #0x28 ldmia r0, {r0, r1, r2} stmia r3, {r0, r1, r2} ldr r3, [sp, #0x28] - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS ldr r2, [sp, #0x2c] str r3, [r0, #0x18] str r2, [r0, #0x1c] @@ -3124,7 +3124,7 @@ _02006760: moveq r1, #0 _0200677C: streqh r1, [r0, #0xe] - ldr r1, _02006B44 ; =_022A35DC + ldr r1, _02006B44 ; =TOUCHSCREEN_STATUS ldrh ip, [r1, #0xc] cmp ip, #6 addls pc, pc, ip, lsl #2 @@ -3184,12 +3184,12 @@ _020067FC: ldr r0, [sp, #4] bl abs cmp r0, #8 - ldrlt r0, _02006B44 ; =_022A35DC + ldrlt r0, _02006B44 ; =TOUCHSCREEN_STATUS ldrlth r1, [r0, #0xe] orrlt r1, r1, #0x400 strlth r1, [r0, #0xe] _02006874: - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS mov r1, #4 ldrh r2, [r0, #0xe] orr r2, r2, #0x2000 @@ -3228,7 +3228,7 @@ _020068B0: bl abs cmp r0, #8 bge _02006934 - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS mov r1, #3 ldr r3, [r0, #0x18] ldr r2, [r0, #0x1c] @@ -3242,7 +3242,7 @@ _020068B0: _02006934: ldr r3, [sp, #0x28] ldr r2, [sp, #0x2c] - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS mov r1, #1 str r3, [r0, #0x28] str r2, [r0, #0x2c] @@ -3289,12 +3289,12 @@ _02006988: ldr r0, [sp, #0x14] bl abs cmp r0, #8 - ldrlt r0, _02006B44 ; =_022A35DC + ldrlt r0, _02006B44 ; =TOUCHSCREEN_STATUS ldrlth r1, [r0, #0xe] orrlt r1, r1, #0x800 strlth r1, [r0, #0xe] _02006A00: - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS mov r1, #5 ldrh r2, [r0, #0xe] orr r2, r2, #0x4000 @@ -3320,12 +3320,12 @@ _02006A1C: ldr r0, [sp, #0x1c] bl abs cmp r0, #8 - ldrlt r0, _02006B44 ; =_022A35DC + ldrlt r0, _02006B44 ; =TOUCHSCREEN_STATUS ldrlth r1, [r0, #0xe] orrlt r1, r1, #0x20 strlth r1, [r0, #0xe] _02006A74: - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS mov r1, #0 strh r1, [r0, #0xc] b _02006B2C @@ -3342,7 +3342,7 @@ _02006A84: orreq r0, r3, #0x140 orrne r0, r3, #0x280 strh r0, [r1, #0xe] - ldr r0, _02006B44 ; =_022A35DC + ldr r0, _02006B44 ; =TOUCHSCREEN_STATUS ldr r1, [r0, #0x10] cmp r1, #0x3c ldrgth r1, [r0, #0xe] @@ -3383,10 +3383,10 @@ _02006B34: .align 2, 0 _02006B3C: .word _020AF288 _02006B40: .word _022A362C -_02006B44: .word _022A35DC +_02006B44: .word TOUCHSCREEN_STATUS _02006B48: .word _022A3614 _02006B4C: .word _022A3620 -_02006B50: .word _022A35DC +_02006B50: .word TOUCHSCREEN_STATUS arm_func_end sub_020065AC arm_func_start sub_02006B54 @@ -3420,7 +3420,7 @@ sub_02006B98: ; 0x02006B98 stmdb sp!, {r3, lr} ldr r0, _02006BEC ; =_020AF288 bl sub_02002CB4 - ldr r0, _02006BF0 ; =_022A35DC + ldr r0, _02006BF0 ; =TOUCHSCREEN_STATUS ldrb r1, [r0, #8] cmp r1, #0 beq _02006BD8 @@ -3442,7 +3442,7 @@ _02006BE0: ldmia sp!, {r3, pc} .align 2, 0 _02006BEC: .word _020AF288 -_02006BF0: .word _022A35DC +_02006BF0: .word TOUCHSCREEN_STATUS _02006BF4: .word 0x00001101 _02006BF8: .word _022A35E8 arm_func_end sub_02006B98 @@ -3465,7 +3465,7 @@ GetReleasedStylus: ; 0x02006C1C mov r4, r0 ldr r0, _02006C84 ; =_020AF288 bl sub_02002CB4 - ldr r1, _02006C88 ; =_022A35DC + ldr r1, _02006C88 ; =TOUCHSCREEN_STATUS ldr r0, _02006C84 ; =_020AF288 ldrh r2, [r1, #0xe] strh r2, [r4] @@ -3489,7 +3489,7 @@ GetReleasedStylus: ; 0x02006C1C ldmia sp!, {r4, pc} .align 2, 0 _02006C84: .word _020AF288 -_02006C88: .word _022A35DC +_02006C88: .word TOUCHSCREEN_STATUS arm_func_end GetReleasedStylus arm_func_start sub_02006C8C diff --git a/asm/main_0200C4CC.s b/asm/main_0200C4CC.s index ce29b1ae..52d3a29c 100644 --- a/asm/main_0200C4CC.s +++ b/asm/main_0200C4CC.s @@ -445,7 +445,7 @@ _0200CA88: .word 0x00000263 arm_func_start sub_0200CA8C sub_0200CA8C: ; 0x0200CA8C stmdb sp!, {r3, lr} - ldr r1, _0200CAB4 ; =_022A3824 + ldr r1, _0200CAB4 ; =BAG_ITEMS ldr r0, _0200CAB8 ; =BAG_ITEMS_PTR_MIRROR str r1, [r0] bl LoadItemPspi2n @@ -455,7 +455,7 @@ sub_0200CA8C: ; 0x0200CA8C bl sub_02011AB8 ldmia sp!, {r3, pc} .align 2, 0 -_0200CAB4: .word _022A3824 +_0200CAB4: .word BAG_ITEMS _0200CAB8: .word BAG_ITEMS_PTR_MIRROR arm_func_end sub_0200CA8C diff --git a/asm/main_0200ED1C.s b/asm/main_0200ED1C.s index 0c250689..75e26964 100644 --- a/asm/main_0200ED1C.s +++ b/asm/main_0200ED1C.s @@ -12666,7 +12666,7 @@ sub_020184CC: ; 0x020184CC mov r2, r1 bl sub_02002A9C mov r2, #0 - ldr r1, _020185DC ; =_022A4C50 + ldr r1, _020185DC ; =AUDIO_COMMANDS_BUFFER mov r0, r2 _02018510: add r2, r2, #1 @@ -12721,7 +12721,7 @@ _020185CC: .word _020AF7C0 _020185D0: .word _022A4C00 _020185D4: .word _022A4C28 _020185D8: .word _020AF7E4 -_020185DC: .word _022A4C50 +_020185DC: .word AUDIO_COMMANDS_BUFFER _020185E0: .word _020AF780 _020185E4: .word 0x00000701 _020185E8: .word _020AF7AC @@ -13086,7 +13086,7 @@ sub_02018A78: ; 0x02018A78 ldr r1, _02018ADC ; =_020AF7E4 bl sub_02002D14 mov r1, #0 - ldr r4, _02018AE0 ; =_022A4C50 + ldr r4, _02018AE0 ; =AUDIO_COMMANDS_BUFFER b _02018AC0 _02018A98: ldr r0, [r4] @@ -13110,7 +13110,7 @@ _02018AC0: .align 2, 0 _02018AD8: .word _020AF7C0 _02018ADC: .word _020AF7E4 -_02018AE0: .word _022A4C50 +_02018AE0: .word AUDIO_COMMANDS_BUFFER arm_func_end sub_02018A78 arm_func_start SendAudioCommand2 @@ -13161,7 +13161,7 @@ _02018B68: .word _020AF7E4 arm_func_start AllocAudioCommand AllocAudioCommand: ; 0x02018B6C mov r3, #0 - ldr r2, _02018BA4 ; =_022A4C50 + ldr r2, _02018BA4 ; =AUDIO_COMMANDS_BUFFER b _02018B94 _02018B78: ldr r1, [r2] @@ -13177,7 +13177,7 @@ _02018B94: mov r0, #0 bx lr .align 2, 0 -_02018BA4: .word _022A4C50 +_02018BA4: .word AUDIO_COMMANDS_BUFFER arm_func_end AllocAudioCommand arm_func_start SendAudioCommand diff --git a/asm/main_0202598C.s b/asm/main_0202598C.s index 327d4f5d..55007ca1 100644 --- a/asm/main_0202598C.s +++ b/asm/main_0202598C.s @@ -2677,7 +2677,7 @@ sub_02026E78: ; 0x02026E78 stmdb sp!, {r3, lr} ldr r3, _02026FEC ; =_020AFD4C mov ip, #1 - ldr r0, _02026FF0 ; =_022A88DC + ldr r0, _02026FF0 ; =WINDOW_LIST mov r1, #0 mov r2, #0x1180 strb ip, [r3, #4] @@ -2692,7 +2692,7 @@ sub_02026E78: ; 0x02026E78 stmdb sp!, {r3, r4, r5, r6, r7, lr} ldr r3, _02026FEC ; =_020AFD4C mov r4, #1 - ldr r0, _02026FF0 ; =_022A88DC + ldr r0, _02026FF0 ; =WINDOW_LIST mov r1, #0 mov r2, #0x1180 strb r4, [r3, #2] @@ -2825,7 +2825,7 @@ _02026EB0: #endif .align 2, 0 _02026FEC: .word _020AFD4C -_02026FF0: .word _022A88DC +_02026FF0: .word WINDOW_LIST #ifndef JAPAN _02026FF4: .word _022A7A6C #endif @@ -3318,12 +3318,12 @@ _020275F4: .word _022A7A8C arm_func_start GetWindow GetWindow: ; 0x020275F8 - ldr r2, _02027608 ; =_022A88DC + ldr r2, _02027608 ; =WINDOW_LIST mov r1, #0xe0 mla r0, r1, r0, r2 bx lr .align 2, 0 -_02027608: .word _022A88DC +_02027608: .word WINDOW_LIST arm_func_end GetWindow arm_func_start sub_0202760C @@ -3356,7 +3356,7 @@ _02027980: .word _022A88F0 arm_func_start sub_02027624 sub_02027624: ; 0x02027624 - ldr r2, _02027644 ; =_022A88DC + ldr r2, _02027644 ; =WINDOW_LIST mov r1, #0xe0 mla r2, r0, r1, r2 ldrb r1, [r2, #6] @@ -3365,14 +3365,14 @@ sub_02027624: ; 0x02027624 mov r0, r0, lsl #5 bx lr .align 2, 0 -_02027644: .word _022A88DC +_02027644: .word WINDOW_LIST arm_func_end sub_02027624 arm_func_start NewWindowScreenCheck NewWindowScreenCheck: ; 0x02027648 stmdb sp!, {r4, lr} mov r4, #0 - ldr ip, _020276B8 ; =_022A88DC + ldr ip, _020276B8 ; =WINDOW_LIST mov lr, r4 mov r3, r4 _0202765C: @@ -3401,7 +3401,7 @@ _02027678: bl NewWindow ldmia sp!, {r4, pc} .align 2, 0 -_020276B8: .word _022A88DC +_020276B8: .word WINDOW_LIST _020276BC: .word _022A7A6C arm_func_end NewWindowScreenCheck @@ -3410,7 +3410,7 @@ NewWindow: ; 0x020276C0 stmdb sp!, {r4, r5, r6, r7, r8, lr} mov r8, r0 mov r7, r1 - ldr r5, _02027898 ; =_022A88DC + ldr r5, _02027898 ; =WINDOW_LIST ldr r6, _0202789C ; =_022A7B1C mov r4, #0 b _020276FC @@ -3533,7 +3533,7 @@ _02027704: strb r1, [r6, #0x2a] ldmia sp!, {r4, r5, r6, r7, r8, pc} .align 2, 0 -_02027898: .word _022A88DC +_02027898: .word WINDOW_LIST _0202789C: .word _022A7B1C _020278A0: .word _022A7A74 _020278A4: .word _022A7A6C @@ -3576,7 +3576,7 @@ sub_020278C4: ; 0x020278C4 streqb r3, [r1, r2] ldmeqia sp!, {r4, r5, r6, r7, r8, pc} mov ip, r1 - ldr r5, _02027970 ; =_022A88DC + ldr r5, _02027970 ; =WINDOW_LIST mov lr, #0xe0 b _02027924 _0202790C: @@ -3612,7 +3612,7 @@ _0202792C: _02027964: .word _022A7A6C _02027968: .word _022A8990 _0202796C: .word _022A8991 -_02027970: .word _022A88DC +_02027970: .word WINDOW_LIST arm_func_end sub_020278C4 arm_func_start sub_02027974 @@ -3626,7 +3626,7 @@ sub_02027974: ; 0x02027974 ldrsb r4, [r1, #3] #endif mov r1, r5 - ldr ip, _02027A00 ; =_022A88DC + ldr ip, _02027A00 ; =WINDOW_LIST mov r2, #0xe0 b _020279AC _02027994: @@ -3666,7 +3666,7 @@ _020279F4: ldmia sp!, {r3, r4, r5, pc} .align 2, 0 _020279FC: .word _022A7A6C -_02027A00: .word _022A88DC +_02027A00: .word WINDOW_LIST _02027A04: .word _022A8991 arm_func_end sub_02027974 @@ -3757,7 +3757,7 @@ _02027AEC: .word _020AFD94 arm_func_start UpdateWindow UpdateWindow: ; 0x02027AF0 - ldr r2, _02027B18 ; =_022A88DC + ldr r2, _02027B18 ; =WINDOW_LIST mov r1, #0xe0 mla r1, r0, r1, r2 ldr r0, [r1, #0x14] @@ -3768,7 +3768,7 @@ UpdateWindow: ; 0x02027AF0 str r0, [r1, #0x2c] bx lr .align 2, 0 -_02027B18: .word _022A88DC +_02027B18: .word WINDOW_LIST arm_func_end UpdateWindow arm_func_start sub_02027B1C @@ -3820,7 +3820,7 @@ sub_02027B88: ; 0x02027B88 #endif b _02027E00 _02027B9C: - ldr r1, _02027E18 ; =_022A88DC + ldr r1, _02027E18 ; =WINDOW_LIST mov r0, #0xe0 mla r4, r2, r0, r1 ldrb r0, [r4, #8] @@ -3995,7 +3995,7 @@ _02027E00: ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, pc} .align 2, 0 _02027E14: .word _022A7A6C -_02027E18: .word _022A88DC +_02027E18: .word WINDOW_LIST _02027E1C: .word _0209AC64 _02027E20: .word _020AFD98 _02027E24: .word _0209ACAC @@ -4007,7 +4007,7 @@ _02027E2C: .word _020AFD4C sub_02027E30: ; 0x02027E30 stmdb sp!, {r3, r4, r5, r6, r7, lr} sub sp, sp, #8 - ldr r3, _02028070 ; =_022A88DC + ldr r3, _02028070 ; =WINDOW_LIST mov r2, #0xe0 mla r7, r0, r2, r3 ldrsb r0, [r7, #9] @@ -4024,7 +4024,7 @@ sub_02027E30: ; 0x02027E30 cmp r1, #0 bne _02027F20 ldrsb r1, [r7, #0x10] - ldr r2, _02028070 ; =_022A88DC + ldr r2, _02028070 ; =WINDOW_LIST mov r0, #0xe0 mla r0, r1, r0, r2 add r0, r0, #0xbc @@ -4141,7 +4141,7 @@ _02027FFC: b _02028064 _0202801C: ldrsb r1, [r7, #0x10] - ldr r2, _02028070 ; =_022A88DC + ldr r2, _02028070 ; =WINDOW_LIST mov r0, #0xe0 mla r0, r1, r0, r2 add r0, r0, #0xbc @@ -4163,7 +4163,7 @@ _02028064: add sp, sp, #8 ldmia sp!, {r3, r4, r5, r6, r7, pc} .align 2, 0 -_02028070: .word _022A88DC +_02028070: .word WINDOW_LIST _02028074: .word _0209AC64 _02028078: .word _022A7AE4 _0202807C: .word _020AFD4C @@ -4172,7 +4172,7 @@ _0202807C: .word _020AFD4C arm_func_start sub_02028080 sub_02028080: ; 0x02028080 stmdb sp!, {r4, lr} - ldr r3, _020280B8 ; =_022A88DC + ldr r3, _020280B8 ; =WINDOW_LIST mov r2, #0xe0 mla r4, r0, r2, r3 strb r1, [r4, #9] @@ -4186,7 +4186,7 @@ sub_02028080: ; 0x02028080 str r1, [r0, #8] ldmia sp!, {r4, pc} .align 2, 0 -_020280B8: .word _022A88DC +_020280B8: .word WINDOW_LIST _020280BC: .word _020AFD4C arm_func_end sub_02028080 @@ -4266,12 +4266,12 @@ _02028190: .word _020AFD4C arm_func_start DeleteWindow DeleteWindow: ; 0x02028194 stmdb sp!, {r3, r4, r5, lr} - ldr r2, _02028224 ; =_022A88DC + ldr r2, _02028224 ; =WINDOW_LIST mov r1, #0xe0 mla r4, r0, r1, r2 bl sub_0202812C ldrb r5, [r4, #8] - ldr lr, _02028224 ; =_022A88DC + ldr lr, _02028224 ; =WINDOW_LIST mov ip, #1 mov r3, #0 _020281B8: @@ -4304,14 +4304,14 @@ _020281EC: strb r0, [r4, #0xb6] ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_02028224: .word _022A88DC +_02028224: .word WINDOW_LIST _02028228: .word _022A7A74 arm_func_end DeleteWindow arm_func_start sub_0202822C sub_0202822C: ; 0x0202822C stmdb sp!, {r4, lr} - ldr r2, _02028258 ; =_022A88DC + ldr r2, _02028258 ; =WINDOW_LIST mov r1, #0xe0 mla r4, r0, r1, r2 ldr r0, [r4, #0x14] @@ -4322,7 +4322,7 @@ sub_0202822C: ; 0x0202822C strb r0, [r4, #0xb6] ldmia sp!, {r4, pc} .align 2, 0 -_02028258: .word _022A88DC +_02028258: .word WINDOW_LIST arm_func_end sub_0202822C arm_func_start sub_0202825C @@ -4347,7 +4347,7 @@ _02028280: .word _022A7A74 arm_func_start GetWindowRectangle GetWindowRectangle: ; 0x02028284 - ldr r3, _020282C4 ; =_022A88DC + ldr r3, _020282C4 ; =WINDOW_LIST mov r2, #0xe0 mla r3, r0, r2, r3 ldrb r0, [r3, #5] @@ -4364,12 +4364,12 @@ GetWindowRectangle: ; 0x02028284 str r0, [r1, #0xc] bx lr .align 2, 0 -_020282C4: .word _022A88DC +_020282C4: .word WINDOW_LIST arm_func_end GetWindowRectangle arm_func_start sub_020282C8 sub_020282C8: ; 0x020282C8 - ldr r3, _020282F0 ; =_022A88DC + ldr r3, _020282F0 ; =WINDOW_LIST mov r2, #0xe0 mla r2, r0, r2, r3 ldrb r0, [r2, #7] @@ -4380,7 +4380,7 @@ sub_020282C8: ; 0x020282C8 str r0, [r1] bx lr .align 2, 0 -_020282F0: .word _022A88DC +_020282F0: .word WINDOW_LIST arm_func_end sub_020282C8 arm_func_start sub_020282F4 @@ -4418,13 +4418,13 @@ _02028338: .word _022A88E4 arm_func_start GetWindowContents GetWindowContents: ; 0x0202833C - ldr r2, _02028350 ; =_022A88DC + ldr r2, _02028350 ; =WINDOW_LIST mov r1, #0xe0 mla r1, r0, r1, r2 ldr r0, [r1, #0xc] bx lr .align 2, 0 -_02028350: .word _022A88DC +_02028350: .word WINDOW_LIST arm_func_end GetWindowContents arm_func_start sub_02028354 @@ -4442,7 +4442,7 @@ _02028368: .word _022A8992 sub_0202836C: ; 0x0202836C stmdb sp!, {r3, r4, r5, r6, r7, lr} sub sp, sp, #8 - ldr r2, _02028438 ; =_022A88DC + ldr r2, _02028438 ; =WINDOW_LIST mov r1, #0xe0 mla r6, r0, r1, r2 ldrb r0, [r6, #8] @@ -4498,7 +4498,7 @@ _02028428: add sp, sp, #8 ldmia sp!, {r3, r4, r5, r6, r7, pc} .align 2, 0 -_02028438: .word _022A88DC +_02028438: .word WINDOW_LIST arm_func_end sub_0202836C arm_func_start sub_0202843C @@ -4520,7 +4520,7 @@ _02028460: .word _022A7AC8 sub_02028464: ; 0x02028464 stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, lr} sub sp, sp, #0x14 - ldr r3, _02028768 ; =_022A88DC + ldr r3, _02028768 ; =WINDOW_LIST mov r2, #0xe0 mla r4, r0, r2, r3 ldrsb r0, [r4, #9] @@ -4735,7 +4735,7 @@ _02028758: add sp, sp, #0x14 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, pc} .align 2, 0 -_02028768: .word _022A88DC +_02028768: .word WINDOW_LIST _0202876C: .word _0209AC64 arm_func_end sub_02028464 @@ -4743,7 +4743,7 @@ _0202876C: .word _0209AC64 sub_02028770: ; 0x02028770 stmdb sp!, {r0, r1, r2, r3} stmdb sp!, {r3, r4, r5, lr} - ldr r2, _020287C0 ; =_022A88DC + ldr r2, _020287C0 ; =WINDOW_LIST mov r5, r0 mov r1, #0xe0 mla r4, r5, r1, r2 @@ -4762,7 +4762,7 @@ sub_02028770: ; 0x02028770 add sp, sp, #0x10 bx lr .align 2, 0 -_020287C0: .word _022A88DC +_020287C0: .word WINDOW_LIST arm_func_end sub_02028770 arm_func_start sub_020287C4 @@ -4789,7 +4789,7 @@ sub_020287E0: ; 0x020287E0 #endif mov r1, #0 mov sb, #1 - ldr r4, _02028844 ; =_022A88DC + ldr r4, _02028844 ; =WINDOW_LIST mov r8, #0xe0 mvn r7, #1 b _0202882C @@ -4812,14 +4812,14 @@ _0202882C: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, pc} .align 2, 0 _02028840: .word _022A7A6C -_02028844: .word _022A88DC +_02028844: .word WINDOW_LIST arm_func_end sub_020287E0 arm_func_start sub_02028848 sub_02028848: ; 0x02028848 stmdb sp!, {r3, r4, r5, r6, r7, lr} ldr r0, _020288D0 ; =_022A7A6C - ldr r6, _020288D4 ; =_022A88DC + ldr r6, _020288D4 ; =WINDOW_LIST #ifdef JAPAN ldrsb r0, [r0, #1] #else @@ -4862,20 +4862,20 @@ _020288C0: ldmia sp!, {r3, r4, r5, r6, r7, pc} .align 2, 0 _020288D0: .word _022A7A6C -_020288D4: .word _022A88DC +_020288D4: .word WINDOW_LIST _020288D8: .word _020AFD4C arm_func_end sub_02028848 arm_func_start sub_020288DC sub_020288DC: ; 0x020288DC - ldr r2, _020288F4 ; =_022A88DC + ldr r2, _020288F4 ; =WINDOW_LIST mov r1, #0xe0 mla r1, r0, r1, r2 ldr ip, _020288F8 ; =InitWindowTrailer add r0, r1, #0xbc bx ip .align 2, 0 -_020288F4: .word _022A88DC +_020288F4: .word WINDOW_LIST _020288F8: .word InitWindowTrailer arm_func_end sub_020288DC @@ -4883,7 +4883,7 @@ _020288F8: .word InitWindowTrailer sub_020288FC: ; 0x020288FC stmdb sp!, {r4, lr} sub sp, sp, #8 - ldr lr, _02028944 ; =_022A88DC + ldr lr, _02028944 ; =WINDOW_LIST mov ip, #0xe0 mla r4, r0, ip, lr ldr lr, [r4, #0xb8] @@ -4900,13 +4900,13 @@ sub_020288FC: ; 0x020288FC add sp, sp, #8 ldmia sp!, {r4, pc} .align 2, 0 -_02028944: .word _022A88DC +_02028944: .word WINDOW_LIST arm_func_end sub_020288FC arm_func_start sub_02028948 sub_02028948: ; 0x02028948 stmdb sp!, {r3, lr} - ldr r3, _0202897C ; =_022A88DC + ldr r3, _0202897C ; =WINDOW_LIST mov r2, #0xe0 mla ip, r0, r2, r3 ldr r3, [ip, #0xb8] @@ -4919,13 +4919,13 @@ sub_02028948: ; 0x02028948 bl sub_02029758 ldmia sp!, {r3, pc} .align 2, 0 -_0202897C: .word _022A88DC +_0202897C: .word WINDOW_LIST arm_func_end sub_02028948 arm_func_start sub_02028980 sub_02028980: ; 0x02028980 stmdb sp!, {r3, lr} - ldr r3, _020289B4 ; =_022A88DC + ldr r3, _020289B4 ; =WINDOW_LIST mov r2, #0xe0 mla ip, r0, r2, r3 ldr r3, [ip, #0xb8] @@ -4938,14 +4938,14 @@ sub_02028980: ; 0x02028980 bl sub_02029828 ldmia sp!, {r3, pc} .align 2, 0 -_020289B4: .word _022A88DC +_020289B4: .word WINDOW_LIST arm_func_end sub_02028980 arm_func_start sub_020289B8 sub_020289B8: ; 0x020289B8 stmdb sp!, {r4, lr} sub sp, sp, #8 - ldr lr, _02028A04 ; =_022A88DC + ldr lr, _02028A04 ; =WINDOW_LIST mov ip, #0xe0 mla r4, r0, ip, lr ldr lr, [r4, #0xb8] @@ -4963,14 +4963,14 @@ sub_020289B8: ; 0x020289B8 add sp, sp, #8 ldmia sp!, {r4, pc} .align 2, 0 -_02028A04: .word _022A88DC +_02028A04: .word WINDOW_LIST arm_func_end sub_020289B8 arm_func_start sub_02028A08 sub_02028A08: ; 0x02028A08 stmdb sp!, {r4, lr} sub sp, sp, #0x10 - ldr lr, _02028A60 ; =_022A88DC + ldr lr, _02028A60 ; =WINDOW_LIST mov ip, #0xe0 mla r4, r0, ip, lr sub r0, ip, #0xe1 @@ -4991,7 +4991,7 @@ sub_02028A08: ; 0x02028A08 add sp, sp, #0x10 ldmia sp!, {r4, pc} .align 2, 0 -_02028A60: .word _022A88DC +_02028A60: .word WINDOW_LIST arm_func_end sub_02028A08 arm_func_start sub_02028A64 @@ -5017,7 +5017,7 @@ sub_02028A64: ; 0x02028A64 strh r1, [r0, #6] b _02028BF4 _02028A94: - ldr r1, _02028DF0 ; =_022A88DC + ldr r1, _02028DF0 ; =WINDOW_LIST mov r0, #0xe0 mla r6, r3, r0, r1 ldrsb r1, [r6, #0xb6] @@ -5181,7 +5181,7 @@ _02028C40: bl sub_0200A174 _02028C60: mov r8, #0 - ldr r7, _02028DF0 ; =_022A88DC + ldr r7, _02028DF0 ; =WINDOW_LIST mov r6, r8 mov r5, #0xe0 _02028C70: @@ -5265,7 +5265,7 @@ _02028D30: _02028D58: ldr r0, _02028DEC ; =_022A7A6C #ifdef JAPAN - ldr r6, _02028DF0 ; =_022A88DC + ldr r6, _02028DF0 ; =WINDOW_LIST ldrsb r2, [r0, #1] ldr r5, _02028DF4 ; =_022A7B1C mov sb, #0xe0 @@ -5329,7 +5329,7 @@ _02028DD4: .align 2, 0 _02028DE8: .word _020AFD4C _02028DEC: .word _022A7A6C -_02028DF0: .word _022A88DC +_02028DF0: .word WINDOW_LIST _02028DF4: .word _022A7B1C _02028DF8: .word _020AFD98 _02028DFC: .word _0209ACA8 @@ -5864,7 +5864,7 @@ sub_02029478: ; 0x02029478 mov r0, #4 str r0, [sp, #4] mov r2, #1 - ldr r0, _02029504 ; =_022AAC80 + ldr r0, _02029504 ; =CURSOR_ANIMATION_CONTROL str r2, [sp, #8] mov r2, #0 mov r3, #0x3f8 @@ -5878,7 +5878,7 @@ _020294D0: str r0, [sp, #4] mov ip, #1 str ip, [sp, #8] - ldr r0, _02029508 ; =_022AACFC + ldr r0, _02029508 ; =CURSOR_16_ANIMATION_CONTROL mov r2, #0 mov r3, #0x7c str ip, [sp, #0xc] @@ -5887,8 +5887,8 @@ _020294FC: add sp, sp, #0x10 ldmia sp!, {r3, pc} .align 2, 0 -_02029504: .word _022AAC80 -_02029508: .word _022AACFC +_02029504: .word CURSOR_ANIMATION_CONTROL +_02029508: .word CURSOR_16_ANIMATION_CONTROL arm_func_end sub_02029478 arm_func_start LoadCursors @@ -5904,14 +5904,14 @@ LoadCursors: ; 0x0202950C ldr r0, [r0] mov r2, #0 bl LoadWanTableEntry - ldr r2, _02029660 ; =_022AAC64 + ldr r2, _02029660 ; =CURSOR_16_SPRITE_ID ldr r1, _02029658 ; =WAN_TABLE strh r0, [r2, #2] ldr r0, [r1] ldr r1, _02029664 ; =_0209AE08 mov r2, #0 bl LoadWanTableEntry - ldr r1, _02029660 ; =_022AAC64 + ldr r1, _02029660 ; =CURSOR_16_SPRITE_ID mov r3, #1 strh r0, [r1] str r3, [sp] @@ -5924,15 +5924,15 @@ LoadCursors: ; 0x0202950C mov r3, #1 str r3, [sp] str r3, [sp, #4] - ldr r0, _02029660 ; =_022AAC64 + ldr r0, _02029660 ; =CURSOR_16_SPRITE_ID mov r1, #0x7c ldrsh r0, [r0] mov r2, #0xe bl sub_0201D9C8 - ldr r0, _02029668 ; =_022AAC80 + ldr r0, _02029668 ; =CURSOR_ANIMATION_CONTROL bl InitAnimationControlWithSet__0201C0B0 - ldr r0, _02029668 ; =_022AAC80 - ldr r1, _02029660 ; =_022AAC64 + ldr r0, _02029668 ; =CURSOR_ANIMATION_CONTROL + ldr r1, _02029660 ; =CURSOR_16_SPRITE_ID ldrsh r1, [r1, #2] bl SetSpriteIdForAnimationControl mov r0, #0xf @@ -5943,18 +5943,18 @@ LoadCursors: ; 0x0202950C str r0, [sp, #8] mov r1, #0 str r1, [sp, #0xc] - ldr r0, _02029668 ; =_022AAC80 + ldr r0, _02029668 ; =CURSOR_ANIMATION_CONTROL mov r2, r1 mov r3, #0x3f8 bl SetAnimationForAnimationControl mov r1, #0 - ldr r0, _02029668 ; =_022AAC80 + ldr r0, _02029668 ; =CURSOR_ANIMATION_CONTROL strh r1, [r0, #0x38] bl sub_0201C108 - ldr r0, _0202966C ; =_022AACFC + ldr r0, _0202966C ; =CURSOR_16_ANIMATION_CONTROL bl InitAnimationControlWithSet__0201C0B0 - ldr r0, _0202966C ; =_022AACFC - ldr r1, _02029660 ; =_022AAC64 + ldr r0, _0202966C ; =CURSOR_16_ANIMATION_CONTROL + ldr r1, _02029660 ; =CURSOR_16_SPRITE_ID ldrsh r1, [r1] bl SetSpriteIdForAnimationControl mov r0, #0xe @@ -5964,12 +5964,12 @@ LoadCursors: ; 0x0202950C mov r0, #1 str r0, [sp, #8] str r0, [sp, #0xc] - ldr r0, _0202966C ; =_022AACFC + ldr r0, _0202966C ; =CURSOR_16_ANIMATION_CONTROL mov r1, #0 mov r2, r1 mov r3, #0x7c bl SetAnimationForAnimationControl - ldr r0, _0202966C ; =_022AACFC + ldr r0, _0202966C ; =CURSOR_16_ANIMATION_CONTROL mov r1, #0 strh r1, [r0, #0x38] bl sub_0201C108 @@ -5979,10 +5979,10 @@ LoadCursors: ; 0x0202950C _02029654: .word _022AAC68 _02029658: .word WAN_TABLE _0202965C: .word _0209ADF0 -_02029660: .word _022AAC64 +_02029660: .word CURSOR_16_SPRITE_ID _02029664: .word _0209AE08 -_02029668: .word _022AAC80 -_0202966C: .word _022AACFC +_02029668: .word CURSOR_ANIMATION_CONTROL +_0202966C: .word CURSOR_16_ANIMATION_CONTROL arm_func_end LoadCursors arm_func_start InitWindowTrailer @@ -6364,14 +6364,14 @@ _02029B70: ldr r1, [r4, #8] cmp r0, #0 bne _02029BA4 - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] strh r1, [r0, #0x1e] bl sub_0201CF5C b _02029EB0 _02029BA4: - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] strh r1, [r0, #0x1e] @@ -6385,14 +6385,14 @@ _02029BBC: ldr r1, [r4, #8] cmp r0, #0 bne _02029BF0 - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] strh r1, [r0, #0x1e] bl sub_0201CF5C b _02029EB0 _02029BF0: - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] strh r1, [r0, #0x1e] @@ -6406,7 +6406,7 @@ _02029C08: ldr r1, [r4, #8] cmp r0, #0 bne _02029C44 - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] @@ -6415,7 +6415,7 @@ _02029C08: bl sub_0201CF5C b _02029EB0 _02029C44: - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] @@ -6441,39 +6441,39 @@ _02029C64: add r1, sp, #0x18 cmp r0, #0 bne _02029CF0 - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL ldrh r2, [r0, #2] orr r2, r2, #0x20 strh r2, [r0, #2] bl sub_0201D110 ldr r1, [r4, #8] - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] sub r1, r1, #0x10 strh r1, [r0, #0x1e] bl sub_0201CF5C - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL ldrh r1, [r0, #2] bic r1, r1, #0x20 strh r1, [r0, #2] b _02029EB0 _02029CF0: - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL ldrh r2, [r0, #2] orr r2, r2, #0x20 strh r2, [r0, #2] bl sub_0201D110 ldr r1, [r4, #8] - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] sub r1, r1, #0x10 strh r1, [r0, #0x1e] bl sub_0201CF5C - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL ldrh r1, [r0, #2] bic r1, r1, #0x20 strh r1, [r0, #2] @@ -6486,7 +6486,7 @@ _02029D38: ldr r1, [r4, #8] cmp r0, #0 bne _02029D74 - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] @@ -6495,7 +6495,7 @@ _02029D38: bl sub_0201CF5C b _02029EB0 _02029D74: - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] @@ -6511,7 +6511,7 @@ _02029D94: ldr r1, [r4, #8] cmp r0, #0 bne _02029DD0 - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0x14] @@ -6520,7 +6520,7 @@ _02029D94: bl sub_0201CF5C b _02029DEC _02029DD0: - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0x14] @@ -6542,39 +6542,39 @@ _02029DEC: add r1, sp, #0xc cmp r0, #0 bne _02029E6C - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL ldrh r2, [r0, #2] orr r2, r2, #0x20 strh r2, [r0, #2] bl sub_0201D110 ldr r1, [r4, #8] - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] sub r1, r1, #0x10 strh r1, [r0, #0x1e] bl sub_0201CF5C - ldr r0, _02029EB8 ; =_022AAC80 + ldr r0, _02029EB8 ; =CURSOR_ANIMATION_CONTROL ldrh r1, [r0, #2] bic r1, r1, #0x20 strh r1, [r0, #2] b _02029EB0 _02029E6C: - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL ldrh r2, [r0, #2] orr r2, r2, #0x20 strh r2, [r0, #2] bl sub_0201D110 ldr r1, [r4, #8] - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL sub r1, r1, #4 strh r1, [r0, #0x1c] ldr r1, [r4, #0xc] sub r1, r1, #0x10 strh r1, [r0, #0x1e] bl sub_0201CF5C - ldr r0, _02029EBC ; =_022AACFC + ldr r0, _02029EBC ; =CURSOR_16_ANIMATION_CONTROL ldrh r1, [r0, #2] bic r1, r1, #0x20 strh r1, [r0, #2] @@ -6582,8 +6582,8 @@ _02029EB0: add sp, sp, #0x24 ldmia sp!, {r3, r4, pc} .align 2, 0 -_02029EB8: .word _022AAC80 -_02029EBC: .word _022AACFC +_02029EB8: .word CURSOR_ANIMATION_CONTROL +_02029EBC: .word CURSOR_16_ANIMATION_CONTROL _02029EC0: .word 0x0000FFFF arm_func_end sub_02029B0C @@ -6619,12 +6619,12 @@ LoadAlert: ; 0x02029EE8 ldr r0, [r0] mov r2, #0 bl LoadWanTableEntry - ldr r1, _02029F7C ; =_022AAD78 + ldr r1, _02029F7C ; =ALERT_SPRITE_ID strh r0, [r1] - ldr r0, _02029F80 ; =_022AAD7C + ldr r0, _02029F80 ; =ALERT_ANIMATION_CONTROL bl InitAnimationControlWithSet__0201C0B0 - ldr r1, _02029F7C ; =_022AAD78 - ldr r0, _02029F80 ; =_022AAD7C + ldr r1, _02029F7C ; =ALERT_SPRITE_ID + ldr r0, _02029F80 ; =ALERT_ANIMATION_CONTROL ldrsh r1, [r1] bl SetSpriteIdForAnimationControl mov r1, #0 @@ -6632,12 +6632,12 @@ LoadAlert: ; 0x02029EE8 stmia sp, {r0, r1} mov r0, #1 str r0, [sp, #8] - ldr r0, _02029F80 ; =_022AAD7C + ldr r0, _02029F80 ; =ALERT_ANIMATION_CONTROL mov r2, r1 mov r3, #0x3e4 str r1, [sp, #0xc] bl SetAnimationForAnimationControl - ldr r0, _02029F80 ; =_022AAD7C + ldr r0, _02029F80 ; =ALERT_ANIMATION_CONTROL mov r1, #0 strh r1, [r0, #0x38] bl sub_02029FBC @@ -6650,14 +6650,14 @@ LoadAlert: ; 0x02029EE8 .align 2, 0 _02029F74: .word WAN_TABLE _02029F78: .word _0209AE20 -_02029F7C: .word _022AAD78 -_02029F80: .word _022AAD7C +_02029F7C: .word ALERT_SPRITE_ID +_02029F80: .word ALERT_ANIMATION_CONTROL _02029F84: .word _020AFDA0 arm_func_end LoadAlert arm_func_start sub_02029F88 sub_02029F88: ; 0x02029F88 - ldr ip, _02029FB4 ; =_022AAD7C + ldr ip, _02029FB4 ; =ALERT_ANIMATION_CONTROL ldr r3, _02029FB8 ; =_020AFDA0 strh r0, [ip, #0x1c] strh r1, [ip, #0x1e] @@ -6669,13 +6669,13 @@ sub_02029F88: ; 0x02029F88 strb r2, [r3] bx lr .align 2, 0 -_02029FB4: .word _022AAD7C +_02029FB4: .word ALERT_ANIMATION_CONTROL _02029FB8: .word _020AFDA0 arm_func_end sub_02029F88 arm_func_start sub_02029FBC sub_02029FBC: ; 0x02029FBC - ldr r1, _02029FE0 ; =_022AAD7C + ldr r1, _02029FE0 ; =ALERT_ANIMATION_CONTROL ldr r0, _02029FE4 ; =_020AFDA0 ldrh r3, [r1, #2] mov r2, #0 @@ -6685,14 +6685,14 @@ sub_02029FBC: ; 0x02029FBC strb r2, [r0] bx lr .align 2, 0 -_02029FE0: .word _022AAD7C +_02029FE0: .word ALERT_ANIMATION_CONTROL _02029FE4: .word _020AFDA0 arm_func_end sub_02029FBC arm_func_start sub_02029FE8 sub_02029FE8: ; 0x02029FE8 stmdb sp!, {r3, lr} - ldr r0, _0202A034 ; =_022AAD7C + ldr r0, _0202A034 ; =ALERT_ANIMATION_CONTROL ldrh r1, [r0, #2] tst r1, #2 ldmneia sp!, {r3, pc} @@ -6712,7 +6712,7 @@ _0202A02C: bl sub_0201CF5C ldmia sp!, {r3, pc} .align 2, 0 -_0202A034: .word _022AAD7C +_0202A034: .word ALERT_ANIMATION_CONTROL _0202A038: .word _020AFDA0 arm_func_end sub_02029FE8 diff --git a/asm/main_02034974.s b/asm/main_02034974.s index 645b963e..beada8b3 100644 --- a/asm/main_02034974.s +++ b/asm/main_02034974.s @@ -14187,19 +14187,19 @@ _0203FD10: .word _022AAE58 sub_0203FD14: ; 0x0203FD14 ldr ip, _0203FD24 ; =InitMove mov r1, r0 - ldr r0, _0203FD28 ; =_022AAE4C + ldr r0, _0203FD28 ; =LAST_NEW_MOVE bx ip .align 2, 0 _0203FD24: .word InitMove -_0203FD28: .word _022AAE4C +_0203FD28: .word LAST_NEW_MOVE arm_func_end sub_0203FD14 arm_func_start sub_0203FD2C sub_0203FD2C: ; 0x0203FD2C - ldr r0, _0203FD34 ; =_022AAE4C + ldr r0, _0203FD34 ; =LAST_NEW_MOVE bx lr .align 2, 0 -_0203FD34: .word _022AAE4C +_0203FD34: .word LAST_NEW_MOVE arm_func_end sub_0203FD2C arm_func_start sub_0203FD38 @@ -14886,7 +14886,7 @@ _02040634: str r2, [sp] strb r2, [sp, #8] strb r2, [sp, #9] - ldr r2, _020407BC ; =_022AAE4C + ldr r2, _020407BC ; =LAST_NEW_MOVE cmp r0, #0 ldrb r0, [r2] mov r1, #0x6a @@ -14969,7 +14969,7 @@ _020407AC: .word _020AFE7C _020407B0: .word _022AAE00 _020407B4: .word _022AAE2A _020407B8: .word _022AADFC -_020407BC: .word _022AAE4C +_020407BC: .word LAST_NEW_MOVE arm_func_end PrintMoveOptionMenu arm_func_start sub_020407C0 @@ -28301,7 +28301,7 @@ _0204B048: .word _0209CF0C InitScriptVariableValues: ; 0x0204B04C stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} mov r1, #0 - ldr r0, _0204B2F8 ; =_022AB0AC + ldr r0, _0204B2F8 ; =SCRIPT_VARS_VALUES mov r7, r1 _0204B05C: strb r7, [r0, r1] @@ -28495,7 +28495,7 @@ _0204B118: bl InitDungeonListScriptVars ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 -_0204B2F8: .word _022AB0AC +_0204B2F8: .word SCRIPT_VARS_VALUES _0204B2FC: .word SCRIPT_VARS #if defined(EUROPE) _0204B300: .word 0x00000143 @@ -28646,7 +28646,7 @@ LoadScriptVariableRaw: ; 0x0204B49C cmp r2, #0x400 bge _0204B4C0 ldr r1, _0204B4E0 ; =SCRIPT_VARS - ldr r3, _0204B4E4 ; =_022AB0AC + ldr r3, _0204B4E4 ; =SCRIPT_VARS_VALUES add r1, r1, r2, lsl #4 str r1, [r0] ldrsh r1, [r1, #4] @@ -28664,7 +28664,7 @@ _0204B4D8: bx lr .align 2, 0 _0204B4E0: .word SCRIPT_VARS -_0204B4E4: .word _022AB0AC +_0204B4E4: .word SCRIPT_VARS_VALUES _0204B4E8: .word SCRIPT_VARS_LOCALS arm_func_end LoadScriptVariableRaw @@ -29838,14 +29838,14 @@ DumpScriptVariableValues: ; 0x0204C408 stmdb sp!, {r4, lr} mov r4, r0 bl EventFlagBackup - ldr r1, _0204C42C ; =_022AB0AC + ldr r1, _0204C42C ; =SCRIPT_VARS_VALUES mov r0, r4 mov r2, #0x400 bl MemcpySimple mov r0, #1 ldmia sp!, {r4, pc} .align 2, 0 -_0204C42C: .word _022AB0AC +_0204C42C: .word SCRIPT_VARS_VALUES arm_func_end DumpScriptVariableValues arm_func_start RestoreScriptVariableValues @@ -29857,7 +29857,7 @@ RestoreScriptVariableValues: ; 0x0204C430 add r0, sp, #0 mov r2, r1 bl LoadScriptVariableRaw - ldr r0, _0204C484 ; =_022AB0AC + ldr r0, _0204C484 ; =SCRIPT_VARS_VALUES mov r1, r4 mov r2, #0x400 bl MemcpySimple @@ -29872,7 +29872,7 @@ RestoreScriptVariableValues: ; 0x0204C430 add sp, sp, #8 ldmia sp!, {r4, pc} .align 2, 0 -_0204C484: .word _022AB0AC +_0204C484: .word SCRIPT_VARS_VALUES arm_func_end RestoreScriptVariableValues arm_func_start InitScenarioScriptVars @@ -30221,20 +30221,20 @@ _0204C914: .word SaveScriptVariableValue arm_func_start sub_0204C918 sub_0204C918: ; 0x0204C918 - ldr r0, _0204C924 ; =_022AB4AC + ldr r0, _0204C924 ; =DEBUG_SPECIAL_EPISODE_NUMBER ldr r0, [r0] bx lr .align 2, 0 -_0204C924: .word _022AB4AC +_0204C924: .word DEBUG_SPECIAL_EPISODE_NUMBER arm_func_end sub_0204C918 arm_func_start sub_0204C928 sub_0204C928: ; 0x0204C928 - ldr r1, _0204C934 ; =_022AB4AC + ldr r1, _0204C934 ; =DEBUG_SPECIAL_EPISODE_NUMBER str r0, [r1] bx lr .align 2, 0 -_0204C934: .word _022AB4AC +_0204C934: .word DEBUG_SPECIAL_EPISODE_NUMBER arm_func_end sub_0204C928 arm_func_start GetExecuteSpecialEpisodeType @@ -31394,12 +31394,12 @@ CopyProgressInfoFromScratchFrom: ; 0x0204D748 InitKaomadoStream: ; 0x0204D780 stmdb sp!, {r3, lr} bl FileRom_InitDataTransfer - ldr r0, _0204D798 ; =_022AB4B0 + ldr r0, _0204D798 ; =KAOMADO_STREAM bl FileRom_Veneer_FileInit bl FileRom_StopDataTransfer ldmia sp!, {r3, pc} .align 2, 0 -_0204D798: .word _022AB4B0 +_0204D798: .word KAOMADO_STREAM arm_func_end InitKaomadoStream arm_func_start InitPortraitParams @@ -31513,7 +31513,7 @@ LoadPortrait: ; 0x0204D8BC ldrsh r7, [sl] ldrsb r8, [sl, #2] bl FileRom_InitDataTransfer - ldr r0, _0204DA14 ; =_022AB4B0 + ldr r0, _0204DA14 ; =KAOMADO_STREAM ldr r1, _0204DA18 ; =KAOMADO_FILEPATH bl FileRom_HandleOpen mov fp, #0 @@ -31525,11 +31525,11 @@ _0204D8F4: mul r0, r7, r0 add r0, r0, r8, lsl #1 mov r1, r0, lsl #2 - ldr r0, _0204DA14 ; =_022AB4B0 + ldr r0, _0204DA14 ; =KAOMADO_STREAM mov r2, #0 sub r7, r7, #0x258 bl FileRom_HandleSeek - ldr r0, _0204DA14 ; =_022AB4B0 + ldr r0, _0204DA14 ; =KAOMADO_STREAM add r1, sp, #0 mov r2, #0xc bl FileRom_HandleRead @@ -31570,15 +31570,15 @@ _0204D99C: ble _0204D9DC cmp sb, #0 beq _0204D9C8 - ldr r0, _0204DA14 ; =_022AB4B0 + ldr r0, _0204DA14 ; =KAOMADO_STREAM mov r2, #0 bl FileRom_HandleSeek - ldr r0, _0204DA14 ; =_022AB4B0 + ldr r0, _0204DA14 ; =KAOMADO_STREAM mov r1, sb mov r2, r6 bl FileRom_HandleRead _0204D9C8: - ldr r0, _0204DA14 ; =_022AB4B0 + ldr r0, _0204DA14 ; =KAOMADO_STREAM bl FileClose bl FileRom_StopDataTransfer mov r0, #1 @@ -31592,7 +31592,7 @@ _0204D9DC: movne r8, #0 ldrnesh r7, [sl] bne _0204D9DC - ldr r0, _0204DA14 ; =_022AB4B0 + ldr r0, _0204DA14 ; =KAOMADO_STREAM bl FileClose bl FileRom_StopDataTransfer mov r0, #0 @@ -31600,7 +31600,7 @@ _0204DA0C: add sp, sp, #0xc ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 -_0204DA14: .word _022AB4B0 +_0204DA14: .word KAOMADO_STREAM _0204DA18: .word KAOMADO_FILEPATH arm_func_end LoadPortrait @@ -32627,17 +32627,17 @@ _0204E6F8: .word 0x000F1207 arm_func_start sub_0204E6FC sub_0204E6FC: ; 0x0204E6FC - ldr r0, _0204E708 ; =_022AB4FC + ldr r0, _0204E708 ; =PENDING_DUNGEON_ID ldrsb r0, [r0, #0xd] bx lr .align 2, 0 -_0204E708: .word _022AB4FC +_0204E708: .word PENDING_DUNGEON_ID arm_func_end sub_0204E6FC arm_func_start sub_0204E70C sub_0204E70C: ; 0x0204E70C stmdb sp!, {r4, lr} - ldr r0, _0204E75C ; =_022AB4FC + ldr r0, _0204E75C ; =PENDING_DUNGEON_ID ldrsb r4, [r0, #0xd] and r1, r4, #0xff cmp r1, #1 @@ -32660,40 +32660,40 @@ _0204E754: mov r0, r4 ldmia sp!, {r4, pc} .align 2, 0 -_0204E75C: .word _022AB4FC +_0204E75C: .word PENDING_DUNGEON_ID arm_func_end sub_0204E70C arm_func_start sub_0204E760 sub_0204E760: ; 0x0204E760 - ldr r0, _0204E76C ; =_022AB4FC + ldr r0, _0204E76C ; =PENDING_DUNGEON_ID ldrsh r0, [r0, #2] bx lr .align 2, 0 -_0204E76C: .word _022AB4FC +_0204E76C: .word PENDING_DUNGEON_ID arm_func_end sub_0204E760 arm_func_start sub_0204E770 sub_0204E770: ; 0x0204E770 - ldr r0, _0204E77C ; =_022AB4FC + ldr r0, _0204E77C ; =PENDING_DUNGEON_ID ldrb r0, [r0] bx lr .align 2, 0 -_0204E77C: .word _022AB4FC +_0204E77C: .word PENDING_DUNGEON_ID arm_func_end sub_0204E770 arm_func_start sub_0204E780 sub_0204E780: ; 0x0204E780 - ldr r0, _0204E78C ; =_022AB4FC + ldr r0, _0204E78C ; =PENDING_DUNGEON_ID ldrb r0, [r0, #0x14] bx lr .align 2, 0 -_0204E78C: .word _022AB4FC +_0204E78C: .word PENDING_DUNGEON_ID arm_func_end sub_0204E780 arm_func_start sub_0204E790 sub_0204E790: ; 0x0204E790 stmdb sp!, {r4, lr} - ldr lr, _0204E7B4 ; =_022AB4FC + ldr lr, _0204E7B4 ; =PENDING_DUNGEON_ID mov r4, r0 mov ip, #0xb _0204E7A0: @@ -32703,23 +32703,23 @@ _0204E7A0: bne _0204E7A0 ldmia sp!, {r4, pc} .align 2, 0 -_0204E7B4: .word _022AB4FC +_0204E7B4: .word PENDING_DUNGEON_ID arm_func_end sub_0204E790 arm_func_start sub_0204E7B8 sub_0204E7B8: ; 0x0204E7B8 stmdb sp!, {r3, lr} - ldr r1, _0204E8E0 ; =_022AB4FC + ldr r1, _0204E8E0 ; =PENDING_DUNGEON_ID mov r0, #0 ldrsb r2, [r1, #0xd] mov r1, #0x28 bl SaveScriptVariableValue - ldr r1, _0204E8E0 ; =_022AB4FC + ldr r1, _0204E8E0 ; =PENDING_DUNGEON_ID mov r0, #0 ldrsh r2, [r1, #2] mov r1, #0x27 bl SaveScriptVariableValue - ldr r1, _0204E8E0 ; =_022AB4FC + ldr r1, _0204E8E0 ; =PENDING_DUNGEON_ID mov r0, #0 ldrsh r2, [r1, #2] mov r1, #0x29 @@ -32732,7 +32732,7 @@ sub_0204E7B8: ; 0x0204E7B8 mov r1, #0x2b mov r2, #6 bl SaveScriptVariableValue - ldr r0, _0204E8E0 ; =_022AB4FC + ldr r0, _0204E8E0 ; =PENDING_DUNGEON_ID ldrsb r0, [r0, #0xd] cmp r0, #3 addls pc, pc, r0, lsl #2 @@ -32747,13 +32747,13 @@ _0204E83C: mov r1, #0x27 mov r2, #0xd7 bl SaveScriptVariableValue - ldr r0, _0204E8E0 ; =_022AB4FC + ldr r0, _0204E8E0 ; =PENDING_DUNGEON_ID ldr r1, _0204E8E4 ; =_022AB518 ldrb r0, [r0] bl sub_0205F00C cmp r0, #0 beq _0204E8D4 - ldr r1, _0204E8E0 ; =_022AB4FC + ldr r1, _0204E8E0 ; =PENDING_DUNGEON_ID ldrb r1, [r1, #0x1d] cmp r1, #0 beq _0204E8A0 @@ -32762,14 +32762,14 @@ _0204E83C: ldr r1, _0204E8E8 ; =CLIENT_LEVEL_TABLE mov r0, r0, lsl #1 ldrsh r1, [r1, r0] - ldr r3, _0204E8E0 ; =_022AB4FC + ldr r3, _0204E8E0 ; =PENDING_DUNGEON_ID mov ip, #1 ldr r0, _0204E8E4 ; =_022AB518 mov r2, #0 strb ip, [r3, #0x1d] bl sub_020544C8 _0204E8A0: - ldr r0, _0204E8E0 ; =_022AB4FC + ldr r0, _0204E8E0 ; =PENDING_DUNGEON_ID mov r1, #1 strb r1, [r0, #0xf] b _0204E8D4 @@ -32778,17 +32778,17 @@ _0204E8B0: mov r1, #0x27 mov r2, #0xd6 bl SaveScriptVariableValue - ldr r1, _0204E8E0 ; =_022AB4FC + ldr r1, _0204E8E0 ; =PENDING_DUNGEON_ID mov r0, #0 ldrsb r2, [r1, #0x12] mov r1, #0x29 bl SaveScriptVariableValue _0204E8D4: - ldr r0, _0204E8E0 ; =_022AB4FC + ldr r0, _0204E8E0 ; =PENDING_DUNGEON_ID ldrsb r0, [r0, #0xd] ldmia sp!, {r3, pc} .align 2, 0 -_0204E8E0: .word _022AB4FC +_0204E8E0: .word PENDING_DUNGEON_ID _0204E8E4: .word _022AB518 _0204E8E8: .word CLIENT_LEVEL_TABLE arm_func_end sub_0204E7B8 @@ -32798,7 +32798,7 @@ sub_0204E8EC: ; 0x0204E8EC stmdb sp!, {r4, lr} movs r4, r0 beq _0204E920 - ldr lr, _0204E944 ; =_022AB4FC + ldr lr, _0204E944 ; =PENDING_DUNGEON_ID mov ip, #0xb _0204E900: ldmia r4!, {r0, r1, r2, r3} @@ -32811,7 +32811,7 @@ _0204E900: ldmia sp!, {r4, pc} _0204E920: mov r3, #0 - ldr r0, _0204E944 ; =_022AB4FC + ldr r0, _0204E944 ; =PENDING_DUNGEON_ID sub r2, r3, #1 strb r2, [r0, #0xd] ldr r1, _0204E948 ; =_022AB4F8 @@ -32820,7 +32820,7 @@ _0204E920: strh r2, [r0, #2] ldmia sp!, {r4, pc} .align 2, 0 -_0204E944: .word _022AB4FC +_0204E944: .word PENDING_DUNGEON_ID _0204E948: .word _022AB4F8 arm_func_end sub_0204E8EC @@ -32828,14 +32828,14 @@ _0204E948: .word _022AB4F8 SetEnterDungeon: ; 0x0204E94C stmdb sp!, {r3, lr} mov r1, r0 - ldr r0, _0204E96C ; =_022AB4FC + ldr r0, _0204E96C ; =PENDING_DUNGEON_ID bl InitDungeonInit ldr r0, _0204E970 ; =_022AB4F8 mov r1, #1 strb r1, [r0] ldmia sp!, {r3, pc} .align 2, 0 -_0204E96C: .word _022AB4FC +_0204E96C: .word PENDING_DUNGEON_ID _0204E970: .word _022AB4F8 arm_func_end SetEnterDungeon @@ -32844,7 +32844,7 @@ sub_0204E974: ; 0x0204E974 stmdb sp!, {r3, r4, r5, lr} mov r5, r0 bl sub_0205B77C - ldr r2, _0204EA4C ; =_022AB4FC + ldr r2, _0204EA4C ; =PENDING_DUNGEON_ID mov r1, #2 mov r4, r0 strb r1, [r2, #0xd] @@ -32859,7 +32859,7 @@ sub_0204E974: ; 0x0204E974 ldr r0, _0204EA54 ; =_022AB5A8 mov r1, r5 bl sub_0205BD14 - ldr r1, _0204EA4C ; =_022AB4FC + ldr r1, _0204EA4C ; =PENDING_DUNGEON_ID mov r2, #0 strb r2, [r1, #0xf] strb r2, [r1, #0x10] @@ -32867,17 +32867,17 @@ sub_0204E974: ; 0x0204E974 mov r0, #7 strb r2, [r1, #0x11] bl GetPerformanceFlagWithChecks - ldr r1, _0204EA4C ; =_022AB4FC + ldr r1, _0204EA4C ; =PENDING_DUNGEON_ID mov r2, #0 strb r0, [r1, #5] mov r0, #6 strb r2, [r1, #6] bl GetPerformanceFlagWithChecks - ldr r1, _0204EA4C ; =_022AB4FC + ldr r1, _0204EA4C ; =PENDING_DUNGEON_ID strb r0, [r1, #8] mov r0, #1 bl GetPerformanceFlagWithChecks - ldr r1, _0204EA4C ; =_022AB4FC + ldr r1, _0204EA4C ; =PENDING_DUNGEON_ID mov r2, #0 strb r0, [r1, #9] strb r2, [r1, #0xa] @@ -32896,7 +32896,7 @@ sub_0204E974: ; 0x0204E974 strb r1, [r0] ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_0204EA4C: .word _022AB4FC +_0204EA4C: .word PENDING_DUNGEON_ID _0204EA50: .word _022AB510 _0204EA54: .word _022AB5A8 _0204EA58: .word _022AB4F8 @@ -33336,11 +33336,11 @@ _0204F01C: arm_func_start sub_0204F024 sub_0204F024: ; 0x0204F024 - ldr r1, _0204F030 ; =_022AB4FC + ldr r1, _0204F030 ; =PENDING_DUNGEON_ID strb r0, [r1, #0xe] bx lr .align 2, 0 -_0204F030: .word _022AB4FC +_0204F030: .word PENDING_DUNGEON_ID arm_func_end sub_0204F024 arm_func_start sub_0204F034 @@ -34162,53 +34162,53 @@ _0204F9B4: .word 0x000042BA arm_func_start sub_0204F9B8 sub_0204F9B8: ; 0x0204F9B8 ldr ip, _0204F9C4 ; =ResetPlayTimer - ldr r0, _0204F9C8 ; =_022AB694 + ldr r0, _0204F9C8 ; =PLAY_TIME_SECONDS bx ip .align 2, 0 _0204F9C4: .word ResetPlayTimer -_0204F9C8: .word _022AB694 +_0204F9C8: .word PLAY_TIME_SECONDS arm_func_end sub_0204F9B8 arm_func_start sub_0204F9CC sub_0204F9CC: ; 0x0204F9CC ldr ip, _0204F9D8 ; =PlayTimerTick - ldr r0, _0204F9DC ; =_022AB694 + ldr r0, _0204F9DC ; =PLAY_TIME_SECONDS bx ip .align 2, 0 _0204F9D8: .word PlayTimerTick -_0204F9DC: .word _022AB694 +_0204F9DC: .word PLAY_TIME_SECONDS arm_func_end sub_0204F9CC arm_func_start sub_0204F9E0 sub_0204F9E0: ; 0x0204F9E0 ldr ip, _0204F9EC ; =GetPlayTimeSeconds - ldr r0, _0204F9F0 ; =_022AB694 + ldr r0, _0204F9F0 ; =PLAY_TIME_SECONDS bx ip .align 2, 0 _0204F9EC: .word GetPlayTimeSeconds -_0204F9F0: .word _022AB694 +_0204F9F0: .word PLAY_TIME_SECONDS arm_func_end sub_0204F9E0 arm_func_start sub_0204F9F4 sub_0204F9F4: ; 0x0204F9F4 ldr ip, _0204FA04 ; =sub_02050E5C mov r1, r0 - ldr r0, _0204FA08 ; =_022AB694 + ldr r0, _0204FA08 ; =PLAY_TIME_SECONDS bx ip .align 2, 0 _0204FA04: .word sub_02050E5C -_0204FA08: .word _022AB694 +_0204FA08: .word PLAY_TIME_SECONDS arm_func_end sub_0204F9F4 arm_func_start sub_0204FA0C sub_0204FA0C: ; 0x0204FA0C ldr ip, _0204FA1C ; =sub_02050E8C mov r1, r0 - ldr r0, _0204FA20 ; =_022AB694 + ldr r0, _0204FA20 ; =PLAY_TIME_SECONDS bx ip .align 2, 0 _0204FA1C: .word sub_02050E8C -_0204FA20: .word _022AB694 +_0204FA20: .word PLAY_TIME_SECONDS arm_func_end sub_0204FA0C arm_func_start SetAdventureLogStructLocation @@ -35599,7 +35599,7 @@ StoreDefaultTeamData: ; 0x02050ACC mov r1, #0x234 #endif bl GetStringFromFileVeneer - ldr r0, _02050B08 ; =_022AB918 + ldr r0, _02050B08 ; =TEAM_NAME add r1, sp, #0 #ifdef JAPAN mov r2, #5 @@ -35607,7 +35607,7 @@ StoreDefaultTeamData: ; 0x02050ACC mov r2, #0xa #endif bl StrncpyName - ldr r0, _02050B0C ; =_022AB918 + ldr r0, _02050B0C ; =TEAM_NAME mov r1, #0 #ifdef JAPAN str r1, [r0, #8] @@ -35622,8 +35622,8 @@ StoreDefaultTeamData: ; 0x02050ACC #ifdef JAPAN _02050E54: .word 0x000004C5 #endif -_02050B08: .word _022AB918 -_02050B0C: .word _022AB918 +_02050B08: .word TEAM_NAME +_02050B0C: .word TEAM_NAME arm_func_end StoreDefaultTeamData arm_func_start GetMainTeamNameWithCheck @@ -35634,11 +35634,11 @@ GetMainTeamNameWithCheck: ; 0x02050B10 mov r0, #1 bl GetPerformanceFlagWithChecks cmp r0, #0 - ldrne r0, _02050B70 ; =_022AB918 + ldrne r0, _02050B70 ; =TEAM_NAME ldrneb r0, [r0] cmpne r0, #0 beq _02050B4C - ldr r1, _02050B74 ; =_022AB918 + ldr r1, _02050B74 ; =TEAM_NAME mov r0, r4 #ifdef JAPAN mov r2, #5 @@ -35663,8 +35663,8 @@ _02050B68: add sp, sp, #0x40 ldmia sp!, {r4, pc} .align 2, 0 -_02050B70: .word _022AB918 -_02050B74: .word _022AB918 +_02050B70: .word TEAM_NAME +_02050B74: .word TEAM_NAME #ifdef JAPAN _02050B78: .word 0x000004C8 #else @@ -35675,7 +35675,7 @@ _02050B78: .word 0x00000237 arm_func_start GetMainTeamName GetMainTeamName: ; 0x02050B7C ldr ip, _02050B8C ; =StrncpySimpleNoPadSafe - ldr r1, _02050B90 ; =_022AB918 + ldr r1, _02050B90 ; =TEAM_NAME #ifdef JAPAN mov r2, #5 #else @@ -35684,12 +35684,12 @@ GetMainTeamName: ; 0x02050B7C bx ip .align 2, 0 _02050B8C: .word StrncpySimpleNoPadSafe -_02050B90: .word _022AB918 +_02050B90: .word TEAM_NAME arm_func_end GetMainTeamName arm_func_start SetMainTeamName SetMainTeamName: ; 0x02050B94 - ldr r1, _02050BB4 ; =_022AB918 + ldr r1, _02050BB4 ; =TEAM_NAME mov r3, #0 _02050B9C: ldrb r2, [r0], #1 @@ -35703,7 +35703,7 @@ _02050B9C: blt _02050B9C bx lr .align 2, 0 -_02050BB4: .word _022AB918 +_02050BB4: .word TEAM_NAME arm_func_end SetMainTeamName arm_func_start GetRankupPoints @@ -35726,7 +35726,7 @@ _02050BE4: _02050BF0: mov r0, r4 bl GetRankUpEntry - ldr r1, _02050C0C ; =_022AB918 + ldr r1, _02050C0C ; =TEAM_NAME ldr r2, [r0, #4] #ifdef JAPAN ldr r0, [r1, #8] @@ -35736,7 +35736,7 @@ _02050BF0: sub r0, r2, r0 ldmia sp!, {r4, pc} .align 2, 0 -_02050C0C: .word _022AB918 +_02050C0C: .word TEAM_NAME arm_func_end GetRankupPoints arm_func_start sub_02050C10 @@ -35747,7 +35747,7 @@ sub_02050C10: ; 0x02050C10 #define SUB_02050C10_OFFSET #0xc #endif stmdb sp!, {r3, lr} - ldr r1, _02050C6C ; =_022AB918 + ldr r1, _02050C6C ; =TEAM_NAME ldr r2, [r1, SUB_02050C10_OFFSET] add r2, r2, r0 mov r0, #0x16 @@ -35755,7 +35755,7 @@ sub_02050C10: ; 0x02050C10 bl GetPerformanceFlagWithChecks cmp r0, #0 beq _02050C4C - ldr r0, _02050C6C ; =_022AB918 + ldr r0, _02050C6C ; =TEAM_NAME ldr r1, _02050C70 ; =0x05F5E0FF ldr r2, [r0, SUB_02050C10_OFFSET] cmp r2, r1 @@ -35764,14 +35764,14 @@ sub_02050C10: ; 0x02050C10 _02050C4C: mov r0, #7 bl GetRankUpEntry - ldr r1, _02050C6C ; =_022AB918 + ldr r1, _02050C6C ; =TEAM_NAME ldr r2, [r0, #4] ldr r0, [r1, SUB_02050C10_OFFSET] cmp r0, r2 strgt r2, [r1, SUB_02050C10_OFFSET] ldmia sp!, {r3, pc} .align 2, 0 -_02050C6C: .word _022AB918 +_02050C6C: .word TEAM_NAME _02050C70: .word 0x05F5E0FF arm_func_end sub_02050C10 @@ -35779,7 +35779,7 @@ _02050C70: .word 0x05F5E0FF GetRank: ; 0x02050C74 stmdb sp!, {r3, r4, r5, lr} mov r5, #0 - ldr r4, _02050CCC ; =_022AB918 + ldr r4, _02050CCC ; =TEAM_NAME b _02050CA4 _02050C84: mov r0, r5 @@ -35808,7 +35808,7 @@ _02050CC4: mov r0, r5 ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_02050CCC: .word _022AB918 +_02050CCC: .word TEAM_NAME arm_func_end GetRank arm_func_start sub_02050CD0 @@ -35838,7 +35838,7 @@ sub_02050CF8: ; 0x02050CF8 add r0, sp, #0 mov r1, r3 bl sub_02050990 - ldr r1, _02050D70 ; =_022AB918 + ldr r1, _02050D70 ; =TEAM_NAME add r0, sp, #0 #ifdef JAPAN mov r2, #0x28 @@ -35852,7 +35852,7 @@ sub_02050CF8: ; 0x02050CF8 bl CopyBitsTo mov r0, #1 bl GetPerformanceFlagWithChecks - ldr r1, _02050D78 ; =_022AB918 + ldr r1, _02050D78 ; =TEAM_NAME tst r0, #0xff #ifdef JAPAN strb r0, [r1, #0xc] @@ -35870,9 +35870,9 @@ sub_02050CF8: ; 0x02050CF8 add sp, sp, #0x10 ldmia sp!, {r3, pc} .align 2, 0 -_02050D70: .word _022AB918 +_02050D70: .word TEAM_NAME _02050D74: .word _022AB924 -_02050D78: .word _022AB918 +_02050D78: .word TEAM_NAME _02050D7C: .word ARM9_UNKNOWN_DATA__NA_209E6BC _02050D80: .word _0209E6BD arm_func_end sub_02050CF8 @@ -35886,7 +35886,7 @@ sub_02050D84: ; 0x02050D84 add r0, sp, #4 mov r1, r3 bl sub_02050974 - ldr r1, _02050DFC ; =_022AB918 + ldr r1, _02050DFC ; =TEAM_NAME add r0, sp, #4 #ifdef JAPAN mov r2, #0x28 @@ -35903,7 +35903,7 @@ sub_02050D84: ; 0x02050D84 mov r2, #1 bl CopyBitsFrom ldrb r0, [sp] - ldr r1, _02050E04 ; =_022AB918 + ldr r1, _02050E04 ; =TEAM_NAME tst r0, #1 movne r2, #1 moveq r2, #0 @@ -35918,9 +35918,9 @@ sub_02050D84: ; 0x02050D84 add sp, sp, #0x14 ldmia sp!, {pc} .align 2, 0 -_02050DFC: .word _022AB918 +_02050DFC: .word TEAM_NAME _02050E00: .word _022AB924 -_02050E04: .word _022AB918 +_02050E04: .word TEAM_NAME arm_func_end sub_02050D84 arm_func_start ResetPlayTimer @@ -38582,20 +38582,20 @@ _02052C38: .word _020A322C arm_func_start sub_02052C3C sub_02052C3C: ; 0x02052C3C stmdb sp!, {r3, lr} - ldr r1, _02052C68 ; =_022ABDE0 + ldr r1, _02052C68 ; =TEAM_MEMBER_TABLE ldr r0, _02052C6C ; =TEAM_MEMBER_TABLE_PTR str r1, [r0] bl LoadMonsterMd - ldr r0, _02052C70 ; =_022AB92C + ldr r0, _02052C70 ; =LEVEL_UP_DATA_MONSTER_ID mov r1, #0 strh r1, [r0] bl sub_020550DC bl sub_020560B8 ldmia sp!, {r3, pc} .align 2, 0 -_02052C68: .word _022ABDE0 +_02052C68: .word TEAM_MEMBER_TABLE _02052C6C: .word TEAM_MEMBER_TABLE_PTR -_02052C70: .word _022AB92C +_02052C70: .word LEVEL_UP_DATA_MONSTER_ID arm_func_end sub_02052C3C arm_func_start sub_02052C74 @@ -39452,7 +39452,7 @@ GetLvlUpEntry: ; 0x0205379C mov r1, #0x258 mov r4, r2 bl _s32_div_f - ldr r0, _02053844 ; =_022AB92C + ldr r0, _02053844 ; =LEVEL_UP_DATA_MONSTER_ID ldrsh r0, [r0] cmp r0, r1 beq _02053820 @@ -39460,7 +39460,7 @@ GetLvlUpEntry: ; 0x0205379C mov r1, #0x258 bl _s32_div_f sub r0, r1, #1 - ldr r2, _02053844 ; =_022AB92C + ldr r2, _02053844 ; =LEVEL_UP_DATA_MONSTER_ID mov r0, r0, lsl #0x10 strh r1, [r2] mov r1, r0, lsr #0x10 @@ -39472,14 +39472,14 @@ GetLvlUpEntry: ; 0x0205379C add r0, sp, #0 bl HandleSir0Translation ldr r2, [sp] - ldr r0, _02053848 ; =_022AB930 + ldr r0, _02053848 ; =LEVEL_UP_DATA_DECOMPRESS_BUFFER mov r1, #0 bl DecompressAtNormalVeneer add r0, sp, #4 bl UnloadFile _02053820: subs r4, r4, #1 - ldr r1, _02053848 ; =_022AB930 + ldr r1, _02053848 ; =LEVEL_UP_DATA_DECOMPRESS_BUFFER movmi r4, #0 mov r0, #0xc mla r0, r4, r0, r1 @@ -39488,8 +39488,8 @@ _02053820: add sp, sp, #0xc ldmia sp!, {r3, r4, r5, r6, pc} .align 2, 0 -_02053844: .word _022AB92C -_02053848: .word _022AB930 +_02053844: .word LEVEL_UP_DATA_MONSTER_ID +_02053848: .word LEVEL_UP_DATA_DECOMPRESS_BUFFER arm_func_end GetLvlUpEntry arm_func_start GetEncodedHalfword diff --git a/asm/main_02075600.s b/asm/main_02075600.s index 70af62cb..36641406 100644 --- a/asm/main_02075600.s +++ b/asm/main_02075600.s @@ -4884,13 +4884,13 @@ _0207914C: .word sub_02085BD4 arm_func_start IncrementThreadCount IncrementThreadCount: ; 0x02079150 - ldr r1, _02079164 ; =_022B9648 + ldr r1, _02079164 ; =THREAD_INFO_STRUCT ldr r0, [r1, #0x20] add r0, r0, #1 str r0, [r1, #0x20] bx lr .align 2, 0 -_02079164: .word _022B9648 +_02079164: .word THREAD_INFO_STRUCT arm_func_end IncrementThreadCount arm_func_start sub_02079168 @@ -4997,7 +4997,7 @@ _02079290: arm_func_start InsertThreadIntoList InsertThreadIntoList: ; 0x02079298 stmdb sp!, {r3, lr} - ldr r1, _020792F4 ; =_022B9648 + ldr r1, _020792F4 ; =THREAD_INFO_STRUCT mov ip, #0 ldr lr, [r1, #0x2c] mov r3, lr @@ -5018,17 +5018,17 @@ _020792D0: strne r1, [r0, #0x68] strne r0, [ip, #0x68] ldmneia sp!, {r3, pc} - ldr r1, _020792F4 ; =_022B9648 + ldr r1, _020792F4 ; =THREAD_INFO_STRUCT str lr, [r0, #0x68] str r0, [r1, #0x2c] ldmia sp!, {r3, pc} .align 2, 0 -_020792F4: .word _022B9648 +_020792F4: .word THREAD_INFO_STRUCT arm_func_end InsertThreadIntoList arm_func_start sub_020792F8 sub_020792F8: ; 0x020792F8 - ldr r1, _0207933C ; =_022B9648 + ldr r1, _0207933C ; =THREAD_INFO_STRUCT mov r2, #0 ldr r1, [r1, #0x2c] b _02079310 @@ -5044,17 +5044,17 @@ _02079310: strne r0, [r2, #0x68] bxne lr ldr r1, [r0, #0x68] - ldr r0, _0207933C ; =_022B9648 + ldr r0, _0207933C ; =THREAD_INFO_STRUCT str r1, [r0, #0x2c] bx lr .align 2, 0 -_0207933C: .word _022B9648 +_0207933C: .word THREAD_INFO_STRUCT arm_func_end sub_020792F8 arm_func_start sub_02079340 sub_02079340: ; 0x02079340 stmdb sp!, {r4, r5, r6, lr} - ldr r0, _02079400 ; =_022B9648 + ldr r0, _02079400 ; =THREAD_INFO_STRUCT ldr r1, [r0, #4] cmp r1, #0 ldmneia sp!, {r4, r5, r6, pc} @@ -5070,7 +5070,7 @@ _02079370: strh r0, [r4] ldmia sp!, {r4, r5, r6, pc} _0207937C: - ldr r0, _02079400 ; =_022B9648 + ldr r0, _02079400 ; =THREAD_INFO_STRUCT ldr r0, [r0, #8] ldr r6, [r0] bl sub_02079968 @@ -5086,7 +5086,7 @@ _0207937C: cmp r0, #0 ldmneia sp!, {r4, r5, r6, pc} _020793B8: - ldr r0, _02079400 ; =_022B9648 + ldr r0, _02079400 ; =THREAD_INFO_STRUCT ldr r2, [r0] cmp r2, #0 beq _020793D4 @@ -5101,13 +5101,13 @@ _020793D4: mov r1, r5 blx r2 _020793EC: - ldr r1, _02079400 ; =_022B9648 + ldr r1, _02079400 ; =THREAD_INFO_STRUCT mov r0, r5 str r5, [r1, #0x28] bl sub_02079D54 ldmia sp!, {r4, r5, r6, pc} .align 2, 0 -_02079400: .word _022B9648 +_02079400: .word THREAD_INFO_STRUCT _02079404: .word _022B966C arm_func_end sub_02079340 @@ -5115,7 +5115,7 @@ _02079404: .word _022B966C sub_02079408: ; 0x02079408 stmdb sp!, {r3, lr} sub sp, sp, #8 - ldr r0, _02079518 ; =_022B9648 + ldr r0, _02079518 ; =THREAD_INFO_STRUCT ldr r1, [r0, #0xc] cmp r1, #0 addne sp, sp, #8 @@ -5147,7 +5147,7 @@ _0207947C: sub ip, r0, r2 add r2, r1, #0x3f80 ldr r0, _02079530 ; =0x00000800 - ldr r1, _02079518 ; =_022B9648 + ldr r1, _02079518 ; =THREAD_INFO_STRUCT sub r3, r2, r0 str r3, [r1, #0x188] str ip, [r1, #0x184] @@ -5175,7 +5175,7 @@ _0207947C: mov r2, #0 str ip, [sp, #4] bl StartThread - ldr r0, _02079518 ; =_022B9648 + ldr r0, _02079518 ; =THREAD_INFO_STRUCT mov r1, #0x20 str r1, [r0, #0xa4] mov r1, #1 @@ -5183,7 +5183,7 @@ _0207947C: add sp, sp, #8 ldmia sp!, {r3, pc} .align 2, 0 -_02079518: .word _022B9648 +_02079518: .word THREAD_INFO_STRUCT _0207951C: .word _022B9670 _02079520: .word 0x00000000 _02079524: .word _022B973C @@ -5280,19 +5280,19 @@ _02079658: .word ThreadExit ThreadExit: ; 0x0207965C stmdb sp!, {r3, lr} bl EnableIrqFlag - ldr r0, _02079678 ; =_022B9648 + ldr r0, _02079678 ; =THREAD_INFO_STRUCT mov r1, #0 ldr r0, [r0, #0x28] bl sub_0207967C ldmia sp!, {r3, pc} .align 2, 0 -_02079678: .word _022B9648 +_02079678: .word THREAD_INFO_STRUCT arm_func_end ThreadExit arm_func_start sub_0207967C sub_0207967C: ; 0x0207967C stmdb sp!, {r3, r4, r5, lr} - ldr r2, _020796D0 ; =_022B9648 + ldr r2, _020796D0 ; =THREAD_INFO_STRUCT mov r5, r0 ldr r2, [r2, #0x1c] mov r4, r1 @@ -5314,14 +5314,14 @@ _020796C4: bl sub_020796D8 ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_020796D0: .word _022B9648 +_020796D0: .word THREAD_INFO_STRUCT _020796D4: .word sub_020796D8 arm_func_end sub_0207967C arm_func_start sub_020796D8 sub_020796D8: ; 0x020796D8 stmdb sp!, {r3, lr} - ldr r1, _0207970C ; =_022B9648 + ldr r1, _0207970C ; =THREAD_INFO_STRUCT ldr r1, [r1, #8] ldr r3, [r1] ldr r2, [r3, #0xb4] @@ -5335,13 +5335,13 @@ _02079704: bl sub_02079710 ldmia sp!, {r3, pc} .align 2, 0 -_0207970C: .word _022B9648 +_0207970C: .word THREAD_INFO_STRUCT arm_func_end sub_020796D8 arm_func_start sub_02079710 sub_02079710: ; 0x02079710 stmdb sp!, {r4, lr} - ldr r0, _02079768 ; =_022B9648 + ldr r0, _02079768 ; =THREAD_INFO_STRUCT ldr r0, [r0, #8] ldr r4, [r0] bl sub_02079C14 @@ -5364,7 +5364,7 @@ _02079740: bl WaitForever2 ldmia sp!, {r4, pc} .align 2, 0 -_02079768: .word _022B9648 +_02079768: .word THREAD_INFO_STRUCT arm_func_end sub_02079710 arm_func_start sub_0207976C @@ -5372,7 +5372,7 @@ sub_0207976C: ; 0x0207976C stmdb sp!, {r3, r4, r5, lr} mov r5, r0 bl EnableIrqFlag - ldr r1, _020797E4 ; =_022B9648 + ldr r1, _020797E4 ; =THREAD_INFO_STRUCT mov r4, r0 ldr r0, [r1, #0x28] cmp r0, r5 @@ -5402,7 +5402,7 @@ _020797B8: bl sub_02079990 ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_020797E4: .word _022B9648 +_020797E4: .word THREAD_INFO_STRUCT arm_func_end sub_0207976C arm_func_start sub_020797E8 @@ -5468,7 +5468,7 @@ sub_02079888: ; 0x02079888 stmdb sp!, {r4, r5, r6, lr} mov r6, r0 bl EnableIrqFlag - ldr r1, _020798D4 ; =_022B9648 + ldr r1, _020798D4 ; =THREAD_INFO_STRUCT mov r4, r0 ldr r0, [r1, #8] cmp r6, #0 @@ -5486,7 +5486,7 @@ _020798BC: bl SetIrqFlag ldmia sp!, {r4, r5, r6, pc} .align 2, 0 -_020798D4: .word _022B9648 +_020798D4: .word THREAD_INFO_STRUCT arm_func_end sub_02079888 arm_func_start sub_020798D8 @@ -5538,7 +5538,7 @@ sub_02079940: ; 0x02079940 arm_func_start sub_02079968 sub_02079968: ; 0x02079968 - ldr r0, _0207998C ; =_022B9648 + ldr r0, _0207998C ; =THREAD_INFO_STRUCT ldr r0, [r0, #0x2c] b _02079978 _02079974: @@ -5550,7 +5550,7 @@ _02079978: bne _02079974 bx lr .align 2, 0 -_0207998C: .word _022B9648 +_0207998C: .word THREAD_INFO_STRUCT arm_func_end sub_02079968 arm_func_start sub_02079990 @@ -5567,13 +5567,13 @@ sub_02079990: ; 0x02079990 arm_func_start sub_020799AC sub_020799AC: ; 0x020799AC stmdb sp!, {r4, r5, r6, r7, r8, lr} - ldr r0, _02079A60 ; =_022B9648 + ldr r0, _02079A60 ; =THREAD_INFO_STRUCT mov r4, #0 mov r5, r4 mov r6, r4 ldr r8, [r0, #0x28] bl EnableIrqFlag - ldr r1, _02079A60 ; =_022B9648 + ldr r1, _02079A60 ; =THREAD_INFO_STRUCT mov r7, r0 ldr r1, [r1, #0x2c] mov r0, r4 @@ -5606,7 +5606,7 @@ _02079A28: strne r0, [r4, #0x68] bne _02079A44 ldr r1, [r8, #0x68] - ldr r0, _02079A60 ; =_022B9648 + ldr r0, _02079A60 ; =THREAD_INFO_STRUCT str r1, [r0, #0x2c] _02079A44: ldr r0, [r5, #0x68] @@ -5617,13 +5617,13 @@ _02079A44: bl SetIrqFlag ldmia sp!, {r4, r5, r6, r7, r8, pc} .align 2, 0 -_02079A60: .word _022B9648 +_02079A60: .word THREAD_INFO_STRUCT arm_func_end sub_020799AC arm_func_start sub_02079A64 sub_02079A64: ; 0x02079A64 stmdb sp!, {r4, r5, r6, r7, r8, lr} - ldr r2, _02079B04 ; =_022B9648 + ldr r2, _02079B04 ; =THREAD_INFO_STRUCT mov r7, r0 mov r6, r1 ldr r8, [r2, #0x2c] @@ -5655,7 +5655,7 @@ _02079ABC: strne r0, [r4, #0x68] bne _02079AE4 ldr r1, [r7, #0x68] - ldr r0, _02079B04 ; =_022B9648 + ldr r0, _02079B04 ; =THREAD_INFO_STRUCT str r1, [r0, #0x2c] _02079AE4: mov r0, r7 @@ -5668,7 +5668,7 @@ _02079AF4: mov r0, #1 ldmia sp!, {r4, r5, r6, r7, r8, pc} .align 2, 0 -_02079B04: .word _022B9648 +_02079B04: .word THREAD_INFO_STRUCT _02079B08: .word _022B967C arm_func_end sub_02079A64 @@ -5685,7 +5685,7 @@ sub_02079B14: ; 0x02079B14 mov r4, r0 add r0, sp, #8 bl sub_0207B040 - ldr r0, _02079BB0 ; =_022B9648 + ldr r0, _02079BB0 ; =THREAD_INFO_STRUCT ldr r0, [r0, #8] ldr r0, [r0] str r0, [sp, #4] @@ -5722,7 +5722,7 @@ _02079BA0: add sp, sp, #0x34 ldmia sp!, {r4, r5, pc} .align 2, 0 -_02079BB0: .word _022B9648 +_02079BB0: .word THREAD_INFO_STRUCT _02079BB4: .word 0x000082EA _02079BB8: .word sub_02079BBC arm_func_end sub_02079B14 @@ -5745,14 +5745,14 @@ sub_02079BDC: ; 0x02079BDC stmdb sp!, {r3, r4, r5, lr} mov r5, r0 bl EnableIrqFlag - ldr r1, _02079C00 ; =_022B9648 + ldr r1, _02079C00 ; =THREAD_INFO_STRUCT ldr r4, [r1, #0x30] str r5, [r1, #0x30] bl SetIrqFlag mov r0, r4 ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_02079C00: .word _022B9648 +_02079C00: .word THREAD_INFO_STRUCT arm_func_end sub_02079BDC arm_func_start sub_02079C04 @@ -5768,7 +5768,7 @@ _02079C0C: sub_02079C14: ; 0x02079C14 stmdb sp!, {r4, lr} bl EnableIrqFlag - ldr r2, _02079C44 ; =_022B9648 + ldr r2, _02079C44 ; =THREAD_INFO_STRUCT mvn r1, #0 ldr r3, [r2, #4] cmp r3, r1 @@ -5779,14 +5779,14 @@ sub_02079C14: ; 0x02079C14 mov r0, r4 ldmia sp!, {r4, pc} .align 2, 0 -_02079C44: .word _022B9648 +_02079C44: .word THREAD_INFO_STRUCT arm_func_end sub_02079C14 arm_func_start sub_02079C48 sub_02079C48: ; 0x02079C48 stmdb sp!, {r4, lr} bl EnableIrqFlag - ldr r1, _02079C78 ; =_022B9648 + ldr r1, _02079C78 ; =THREAD_INFO_STRUCT mov r4, #0 ldr r3, [r1, #4] cmp r3, #0 @@ -5797,7 +5797,7 @@ sub_02079C48: ; 0x02079C48 mov r0, r4 ldmia sp!, {r4, pc} .align 2, 0 -_02079C78: .word _022B9648 +_02079C78: .word THREAD_INFO_STRUCT arm_func_end sub_02079C48 arm_func_start SetThreadField0xB4 diff --git a/asm/main_020897DC.s b/asm/main_020897DC.s index 459d0948..461f5575 100644 --- a/asm/main_020897DC.s +++ b/asm/main_020897DC.s @@ -33305,8 +33305,8 @@ _020B33A0: .global _020B33C0 _020B33C0: .space 0x1800 - .global _020B4BC0 -_020B4BC0: + .global DEFAULT_MEMORY_ARENA_MEMORY +DEFAULT_MEMORY_ARENA_MEMORY: .space 0x1E6400 .global _0229AFC0 _0229AFC0: @@ -33362,8 +33362,8 @@ _022A353C: .global _022A3554 _022A3554: .space 0x88 - .global _022A35DC -_022A35DC: + .global TOUCHSCREEN_STATUS +TOUCHSCREEN_STATUS: .space 0xC .global _022A35E8 _022A35E8: @@ -33530,8 +33530,8 @@ _022A3805: .global _022A3806 _022A3806: .space 0x1E - .global _022A3824 -_022A3824: + .global BAG_ITEMS +BAG_ITEMS: .space 0x13B4 .global _022A4BD8 _022A4BD8: @@ -33548,8 +33548,8 @@ _022A4C00: .global _022A4C28 _022A4C28: .space 0x28 - .global _022A4C50 -_022A4C50: + .global AUDIO_COMMANDS_BUFFER +AUDIO_COMMANDS_BUFFER: .space 0x200 .global _022A4E50 _022A4E50: @@ -33708,8 +33708,8 @@ _022A7B1C: .global _022A7EDC _022A7EDC: .space 0xA00 - .global _022A88DC -_022A88DC: + .global WINDOW_LIST +WINDOW_LIST: .space 0x8 .global _022A88E4 _022A88E4: @@ -33744,23 +33744,23 @@ _022A9A5C: .global _022AA35C _022AA35C: .space 0x908 - .global _022AAC64 -_022AAC64: + .global CURSOR_16_SPRITE_ID +CURSOR_16_SPRITE_ID: .space 0x4 .global _022AAC68 _022AAC68: .space 0x18 - .global _022AAC80 -_022AAC80: + .global CURSOR_ANIMATION_CONTROL +CURSOR_ANIMATION_CONTROL: .space 0x7C - .global _022AACFC -_022AACFC: + .global CURSOR_16_ANIMATION_CONTROL +CURSOR_16_ANIMATION_CONTROL: .space 0x7C - .global _022AAD78 -_022AAD78: + .global ALERT_SPRITE_ID +ALERT_SPRITE_ID: .space 0x4 - .global _022AAD7C -_022AAD7C: + .global ALERT_ANIMATION_CONTROL +ALERT_ANIMATION_CONTROL: .space 0x7C .global _022AADF8 _022AADF8: @@ -33777,8 +33777,8 @@ _022AAE2A: .global _022AAE2E _022AAE2E: .space 0x1E - .global _022AAE4C -_022AAE4C: + .global LAST_NEW_MOVE +LAST_NEW_MOVE: .space 0xC .global _022AAE58 _022AAE58: @@ -33826,20 +33826,20 @@ _022AB0A2: .global _022AB0A9 _022AB0A9: .space 0x3 - .global _022AB0AC -_022AB0AC: + .global SCRIPT_VARS_VALUES +SCRIPT_VARS_VALUES: .space 0x400 - .global _022AB4AC -_022AB4AC: + .global DEBUG_SPECIAL_EPISODE_NUMBER +DEBUG_SPECIAL_EPISODE_NUMBER: .space 0x4 - .global _022AB4B0 -_022AB4B0: + .global KAOMADO_STREAM +KAOMADO_STREAM: .space 0x48 .global _022AB4F8 _022AB4F8: .space 0x4 - .global _022AB4FC -_022AB4FC: + .global PENDING_DUNGEON_ID +PENDING_DUNGEON_ID: .space 0x14 .global _022AB510 _022AB510: @@ -33853,14 +33853,14 @@ _022AB5A8: .global _022AB5AC _022AB5AC: .space 0xE8 - .global _022AB694 -_022AB694: + .global PLAY_TIME_SECONDS +PLAY_TIME_SECONDS: .space 0x8 .global _022AB69C _022AB69C: .space 0x27C - .global _022AB918 -_022AB918: + .global TEAM_NAME +TEAM_NAME: #ifdef JAPAN .space 0x8 #else @@ -33869,14 +33869,14 @@ _022AB918: .global _022AB924 _022AB924: .space 0x8 - .global _022AB92C -_022AB92C: + .global LEVEL_UP_DATA_MONSTER_ID +LEVEL_UP_DATA_MONSTER_ID: .space 0x4 - .global _022AB930 -_022AB930: + .global LEVEL_UP_DATA_DECOMPRESS_BUFFER +LEVEL_UP_DATA_DECOMPRESS_BUFFER: .space 0x4B0 - .global _022ABDE0 -_022ABDE0: + .global TEAM_MEMBER_TABLE +TEAM_MEMBER_TABLE: .space 0x99A8 .global _022B5788 _022B5788: @@ -34058,8 +34058,8 @@ _022B961C: .global _022B9644 _022B9644: .space 0x4 - .global _022B9648 -_022B9648: + .global THREAD_INFO_STRUCT +THREAD_INFO_STRUCT: .space 0xC .global _022B9654 _022B9654: diff --git a/asm/overlay_11.s b/asm/overlay_11.s index 4c54d14c..2978ad44 100644 --- a/asm/overlay_11.s +++ b/asm/overlay_11.s @@ -393,7 +393,7 @@ ov11_022DC718: ; 0x022DC718 strh r1, [r0, #2] strh r1, [r0, #4] strb r3, [r0, #1] - ldr r1, _022DC798 ; =ov11_02324EB4 + ldr r1, _022DC798 ; =LOCK_NOTIFY_ARRAY ldr r0, _022DC79C ; =ov11_02324F1C mov r2, r3 _022DC770: @@ -408,7 +408,7 @@ _022DC788: .word ov11_02324E94 _022DC78C: .word ov11_02324EA4 _022DC790: .word ov11_02324ECC _022DC794: .word ov11_02324E80 -_022DC798: .word ov11_02324EB4 +_022DC798: .word LOCK_NOTIFY_ARRAY _022DC79C: .word ov11_02324F1C arm_func_end ov11_022DC718 @@ -1183,7 +1183,7 @@ _022DD128: arm_func_start UnlockScriptingLock UnlockScriptingLock: ; 0x022DD130 stmdb sp!, {r3, lr} - ldr ip, _022DD158 ; =ov11_02324EB4 + ldr ip, _022DD158 ; =LOCK_NOTIFY_ARRAY mov lr, #1 ldr r1, _022DD15C ; =ov11_02324E80 ldr r2, _022DD160 ; =ov11_02324F1C @@ -1193,7 +1193,7 @@ UnlockScriptingLock: ; 0x022DD130 strb lr, [r1, #1] ldmia sp!, {r3, pc} .align 2, 0 -_022DD158: .word ov11_02324EB4 +_022DD158: .word LOCK_NOTIFY_ARRAY _022DD15C: .word ov11_02324E80 _022DD160: .word ov11_02324F1C arm_func_end UnlockScriptingLock @@ -9228,7 +9228,7 @@ HandleUnlocks: ; 0x022E4350 ldmeqia sp!, {r4, r5, r6, r7, r8, pc} mov r8, #0 ldr r5, _022E43E0 ; =ov11_023195EC - ldr r7, _022E43E4 ; =ov11_02324EB4 + ldr r7, _022E43E4 ; =LOCK_NOTIFY_ARRAY strb r8, [r0, #1] mov r6, #2 mov r4, r8 @@ -9261,7 +9261,7 @@ _022E43CC: .align 2, 0 _022E43DC: .word ov11_02324E80 _022E43E0: .word ov11_023195EC -_022E43E4: .word ov11_02324EB4 +_022E43E4: .word LOCK_NOTIFY_ARRAY arm_func_end HandleUnlocks arm_func_start ov11_022E43E8 @@ -14490,7 +14490,7 @@ GroundMainLoop: ; 0x022E8774 mov r3, #1 bl MemArenaAlloc ldr r1, _022E91F0 ; =ov11_02324CB0 - ldr r2, _022E91F4 ; =ov11_02324FC0 + ldr r2, _022E91F4 ; =GROUND_MEMORY_ARENA_1 str r0, [r1, #8] mov r0, #0x64000 str r0, [sp, #0xc] @@ -15189,7 +15189,7 @@ _022E91E0: _022E91E8: .word ov11_02324FA0 _022E91EC: .word ov11_023209B0 _022E91F0: .word ov11_02324CB0 -_022E91F4: .word ov11_02324FC0 +_022E91F4: .word GROUND_MEMORY_ARENA_1 _022E91F8: .word GetFreeArenaGround _022E91FC: .word GetAllocArenaGround _022E9200: .word ov11_022E9258 @@ -83138,8 +83138,8 @@ ov11_02324E94: .global ov11_02324EA4 ov11_02324EA4: .space 0x10 - .global ov11_02324EB4 -ov11_02324EB4: + .global LOCK_NOTIFY_ARRAY +LOCK_NOTIFY_ARRAY: .space 0x18 .global ov11_02324ECC ov11_02324ECC: @@ -83171,8 +83171,8 @@ ov11_02324F9C: .global ov11_02324FA0 ov11_02324FA0: .space 0x20 - .global ov11_02324FC0 -ov11_02324FC0: + .global GROUND_MEMORY_ARENA_1 +GROUND_MEMORY_ARENA_1: .space 0x64000 .global ov11_02388FC0 ov11_02388FC0: diff --git a/asm/overlay_29_022F62CC.s b/asm/overlay_29_022F62CC.s index 33675d3c..aa017c05 100644 --- a/asm/overlay_29_022F62CC.s +++ b/asm/overlay_29_022F62CC.s @@ -887,11 +887,11 @@ ov29_022F6E40: ; 0x022F6E40 ldr r0, _022F6ED8 ; =0x0001A002 mov r1, #0 bl MemAlloc - ldr r2, _022F6EDC ; =ov29_0237C9AC + ldr r2, _022F6EDC ; =LOADED_ATTACK_SPRITE_DATA ldr r1, _022F6ED8 ; =0x0001A002 str r0, [r2] bl MemZero - ldr r0, _022F6EDC ; =ov29_0237C9AC + ldr r0, _022F6EDC ; =LOADED_ATTACK_SPRITE_DATA mov r1, #0 ldr r0, [r0] add r0, r0, #0x1a000 @@ -931,7 +931,7 @@ _022F6EC0: ldmia sp!, {r4, pc} .align 2, 0 _022F6ED8: .word 0x0001A002 -_022F6EDC: .word ov29_0237C9AC +_022F6EDC: .word LOADED_ATTACK_SPRITE_DATA _022F6EE0: .word ov29_0237C9B0 _022F6EE4: .word 0x00000216 _022F6EE8: .word 0x00000217 @@ -957,7 +957,7 @@ _022F6F0C: .word LOADED_ATTACK_SPRITE_FILE_INDEX FreeLoadedAttackSpriteAndMore: ; 0x022F6F10 stmdb sp!, {r4, r5, r6, lr} bl ClearLoadedAttackSprite - ldr r0, _022F6F60 ; =ov29_0237C9AC + ldr r0, _022F6F60 ; =LOADED_ATTACK_SPRITE_DATA ldr r0, [r0] bl MemFree mov r6, #0 @@ -973,12 +973,12 @@ _022F6F44: add r6, r6, #1 cmp r6, #2 blt _022F6F30 - ldr r0, _022F6F60 ; =ov29_0237C9AC + ldr r0, _022F6F60 ; =LOADED_ATTACK_SPRITE_DATA mov r1, #0 str r1, [r0] ldmia sp!, {r4, r5, r6, pc} .align 2, 0 -_022F6F60: .word ov29_0237C9AC +_022F6F60: .word LOADED_ATTACK_SPRITE_DATA _022F6F64: .word ov29_0237C9B0 arm_func_end FreeLoadedAttackSpriteAndMore @@ -993,7 +993,7 @@ SetAndLoadCurrentAttackAnimation: ; 0x022F6F68 ldreqh r0, [r2] cmpeq r0, r4 beq _022F6FE8 - ldr r0, _022F7000 ; =ov29_0237C9AC + ldr r0, _022F7000 ; =LOADED_ATTACK_SPRITE_DATA ldr r0, [r0] add r0, r0, #0x1a000 ldrsh r0, [r0] @@ -1004,13 +1004,13 @@ _022F6FA8: mov r1, #1 ldr r0, _022F7004 ; =WAN_TABLE str r1, [sp] - ldr r1, _022F7000 ; =ov29_0237C9AC + ldr r1, _022F7000 ; =LOADED_ATTACK_SPRITE_DATA ldr r0, [r0] ldr r3, [r1] mov r1, r5 mov r2, r4 bl LoadWanTableEntryFromPackUseProvidedMemory - ldr r1, _022F7000 ; =ov29_0237C9AC + ldr r1, _022F7000 ; =LOADED_ATTACK_SPRITE_DATA ldr r2, _022F6FFC ; =LOADED_ATTACK_SPRITE_FILE_INDEX ldr r1, [r1] add r1, r1, #0x1a000 @@ -1018,21 +1018,21 @@ _022F6FA8: strh r5, [r2, #2] strh r4, [r2] _022F6FE8: - ldr r0, _022F7000 ; =ov29_0237C9AC + ldr r0, _022F7000 ; =LOADED_ATTACK_SPRITE_DATA ldr r0, [r0] add r0, r0, #0x1a000 ldrsh r0, [r0] ldmia sp!, {r3, r4, r5, pc} .align 2, 0 _022F6FFC: .word LOADED_ATTACK_SPRITE_FILE_INDEX -_022F7000: .word ov29_0237C9AC +_022F7000: .word LOADED_ATTACK_SPRITE_DATA _022F7004: .word WAN_TABLE arm_func_end SetAndLoadCurrentAttackAnimation arm_func_start ClearLoadedAttackSprite ClearLoadedAttackSprite: ; 0x022F7008 stmdb sp!, {r3, lr} - ldr r0, _022F7048 ; =ov29_0237C9AC + ldr r0, _022F7048 ; =LOADED_ATTACK_SPRITE_DATA ldr r0, [r0] add r0, r0, #0x1a000 ldrsh r1, [r0] @@ -1041,26 +1041,26 @@ ClearLoadedAttackSprite: ; 0x022F7008 ldr r0, _022F704C ; =WAN_TABLE ldr r0, [r0] bl DeleteWanTableEntryVeneer - ldr r0, _022F7048 ; =ov29_0237C9AC + ldr r0, _022F7048 ; =LOADED_ATTACK_SPRITE_DATA mov r1, #0 ldr r0, [r0] add r0, r0, #0x1a000 strh r1, [r0] ldmia sp!, {r3, pc} .align 2, 0 -_022F7048: .word ov29_0237C9AC +_022F7048: .word LOADED_ATTACK_SPRITE_DATA _022F704C: .word WAN_TABLE arm_func_end ClearLoadedAttackSprite arm_func_start GetLoadedAttackSpriteId GetLoadedAttackSpriteId: ; 0x022F7050 - ldr r0, _022F7064 ; =ov29_0237C9AC + ldr r0, _022F7064 ; =LOADED_ATTACK_SPRITE_DATA ldr r0, [r0] add r0, r0, #0x1a000 ldrsh r0, [r0] bx lr .align 2, 0 -_022F7064: .word ov29_0237C9AC +_022F7064: .word LOADED_ATTACK_SPRITE_DATA arm_func_end GetLoadedAttackSpriteId arm_func_start DungeonGetTotalSpriteFileSize diff --git a/asm/overlay_29_023085DC.s b/asm/overlay_29_023085DC.s index 52fb790c..c5bd547d 100644 --- a/asm/overlay_29_023085DC.s +++ b/asm/overlay_29_023085DC.s @@ -474,7 +474,7 @@ _02308C38: bge _02308C88 add r0, r6, #0x100 ldrh r3, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET] - ldr r1, _02308F98 ; =ov29_0237CA6D + ldr r1, _02308F98 ; =RAPID_SPIN_BINDING_REMOVAL mov r2, #0 orr r3, r3, #2 strh r3, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET] @@ -714,7 +714,7 @@ _02308F88: .word ov29_023535DC _02308F8C: .word ov10_022C45B0 _02308F90: .word ov10_022C4564 _02308F94: .word ov10_022C468C -_02308F98: .word ov29_0237CA6D +_02308F98: .word RAPID_SPIN_BINDING_REMOVAL _02308F9C: .word ov10_022C4460 _02308FA0: .word ov10_022C4550 _02308FA4: .word ov10_022C45C0 diff --git a/asm/overlay_29_0230E914.s b/asm/overlay_29_0230E914.s deleted file mode 100644 index 4c65c48f..00000000 --- a/asm/overlay_29_0230E914.s +++ /dev/null @@ -1,507 +0,0 @@ - .include "asm/macros.inc" - .include "overlay_29_0230E914.inc" - - .text - - arm_func_start AiDecideUseItem -AiDecideUseItem: ; 0x0230E914 - stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr} - sub sp, sp, #0x50 - mov sl, r0 - ldr r7, [sl, #0xb4] - bl CheckVariousConditions - cmp r0, #0 - movne r0, #0 -#ifdef JAPAN - strneb r0, [r7, #0x108] - bne _0230ED98 - ldrb r0, [r7, #0x108] -#else - strneb r0, [r7, #0x109] - bne _0230ED98 - ldrb r0, [r7, #0x109] -#endif - cmp r0, #0 - beq _0230EAF0 - ldrb r0, [r7, #0x62] - tst r0, #1 - movne r0, #1 - moveq r0, #0 - tst r0, #0xff - beq _0230ED98 - ldrsh r0, [r7, #0x66] - bl GetItemCategoryVeneer - cmp r0, #0 - bne _0230EA08 - mov r0, sl - add r2, r7, #0x62 - mov r1, #2 - mov r3, #1 - bl GetPossibleAiThrownItemDirections - mov r4, #0 - ldr r6, _0230EDA0 ; =ov29_0237C9D8 - ldr r5, _0230EDA4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - b _0230E9DC -_0230E990: - ldr r0, [r6, r4, lsl #2] - bl DungeonRandOutcome__022EAB20 - cmp r0, #0 - beq _0230E9D8 - add r0, r7, #0x4a - mov r1, #0x24 - bl SetMonsterActionFields - mov r0, #0x81 - strb r0, [r7, #0x4e] - ldrsh r1, [sl, #4] - ldr r0, _0230EDA8 ; =ov29_0237C9F8 - strh r1, [r7, #0x50] - ldrsh r1, [sl, #6] - strh r1, [r7, #0x52] - ldr r0, [r0, r4, lsl #2] - and r0, r0, #7 - strb r0, [r7, #0x4c] - b _0230E9E8 -_0230E9D8: - add r4, r4, #1 -_0230E9DC: - ldr r0, [r5] - cmp r4, r0 - blt _0230E990 -_0230E9E8: - ldr r0, _0230EDA4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - ldr r0, [r0] - cmp r4, r0 - bne _0230ED98 - add r0, r7, #0x4a - mov r1, #0x39 - bl SetMonsterActionFields - b _0230ED98 -_0230EA08: - cmp r0, #1 - bne _0230EAAC - add r2, sp, #0 - mov r0, sl - add r1, r7, #0x62 - mov r3, #1 - bl GetPossibleAiArcItemTargets - ldr r0, _0230EDA4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - ldr r1, [r0] - cmp r1, #0 - beq _0230EA9C - ldr r0, [r0] - bl DungeonRandInt - mov r4, r0 - add r0, r7, #0x4a - mov r1, #0x24 - bl SetMonsterActionFields - mov r0, #0x81 - strb r0, [r7, #0x4e] - ldrsh r2, [sl, #4] - add r1, sp, #0 - add r0, sl, #4 - strh r2, [r7, #0x50] - ldrsh r2, [sl, #6] - add r1, r1, r4, lsl #2 - strh r2, [r7, #0x52] - bl GetDirectionTowardsPosition - and r0, r0, #7 - strb r0, [r7, #0x4c] - add r1, sp, #0 - mov r0, r4, lsl #2 - ldrh r0, [r1, r0] - add r1, r1, r4, lsl #2 - strh r0, [r7, #0x5a] - ldrh r0, [r1, #2] - strh r0, [r7, #0x5c] - b _0230ED98 -_0230EA9C: - add r0, r7, #0x4a - mov r1, #0x39 - bl SetMonsterActionFields - b _0230ED98 -_0230EAAC: - add r0, r0, #0xfe - and r0, r0, #0xff - cmp r0, #1 - add r0, r7, #0x4a - bhi _0230EAE4 - mov r1, #0x23 - bl SetMonsterActionFields - mov r0, #0x81 - strb r0, [r7, #0x4e] - ldrsh r0, [sl, #4] - strh r0, [r7, #0x50] - ldrsh r0, [sl, #6] - strh r0, [r7, #0x52] - b _0230ED98 -_0230EAE4: - mov r1, #0x39 - bl SetMonsterActionFields - b _0230ED98 -_0230EAF0: - mov r0, sl - mov r1, #0x16 - bl IqSkillIsEnabled - cmp r0, #0 - beq _0230ED98 - mov r5, #1 - b _0230ED90 -_0230EB0C: - cmp r5, #1 - addeq r8, r7, #0x62 - moveq r6, #0x81 - beq _0230EB84 - cmp r5, #0 - bne _0230EB58 - ldrsh r0, [sl, #4] - ldrsh r1, [sl, #6] - bl GetTile - ldr r0, [r0, #0x10] - cmp r0, #0 - beq _0230ED8C - ldr r1, [r0] - cmp r1, #3 - bne _0230ED8C - bl GetItemInfo - mov r8, r0 - mov r6, #0x80 - b _0230EB84 -_0230EB58: - ldrb r0, [r7, #7] - cmp r0, #0 - beq _0230ED98 - ldr r0, _0230EDAC ; =BAG_ITEMS_PTR_MIRROR - sub r1, r5, #1 - ldr r0, [r0] - sub r2, r5, #2 - ldr r3, [r0, #0x384] - mov r0, #6 - mla r8, r2, r0, r3 - and r6, r1, #0xff -_0230EB84: - ldrb r1, [r8] - tst r1, #1 - movne r0, #1 - moveq r0, #0 - tst r0, #0xff - beq _0230ED8C - ldrb r0, [r8] - tst r0, #2 - bne _0230ED8C - tst r1, #8 - movne r0, #1 - moveq r0, #0 - tst r0, #0xff - bne _0230ED8C - ldrsh r0, [r8, #4] - mov r1, #0 - bl TestItemAiFlag - cmp r0, #0 - beq _0230EC4C - mov r0, sl - mov r1, r8 - mov r2, #2 - bl GetAiUseItemProbability - movs r4, r0 - beq _0230EC4C - ldrsh r0, [r8, #4] - bl GetItemCategoryVeneer - mov sb, r0 - cmp sb, #9 - ldreqb r0, [r7, #6] - cmpeq r0, #0 - beq _0230EC4C - mov r0, r4 - bl DungeonRandOutcome__022EAB20 - cmp r0, #0 - beq _0230EC4C - cmp sb, #9 - add r0, r7, #0x4a - bne _0230EC2C - mov r1, #0x31 - bl SetMonsterActionFields - b _0230EC34 -_0230EC2C: - mov r1, #0x23 - bl SetMonsterActionFields -_0230EC34: - strb r6, [r7, #0x4e] - ldrsh r0, [sl, #4] - strh r0, [r7, #0x50] - ldrsh r0, [sl, #6] - strh r0, [r7, #0x52] - b _0230ED98 -_0230EC4C: - mov r0, r7 - bl MonsterCanThrowItems - cmp r0, #0 - beq _0230ED8C - mov r4, #1 - ldr fp, _0230EDA4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - b _0230ED84 -_0230EC68: - ldrsh r0, [r8, #4] - mov r1, r4 - bl TestItemAiFlag - cmp r0, #0 - beq _0230ED80 - ldrsh r0, [r8, #4] - bl GetItemCategoryVeneer - cmp r0, #1 - mov r0, sl - mov r3, #0 - bne _0230ED14 - mov r1, r8 - add r2, sp, #0 - bl GetPossibleAiArcItemTargets - ldr r0, [fp] - cmp r0, #0 - beq _0230ED80 - ldr r0, _0230EDA4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - ldr r0, [r0] - bl DungeonRandInt - mov r4, r0 - add r0, r7, #0x4a - mov r1, #0x24 - bl SetMonsterActionFields - strb r6, [r7, #0x4e] - ldrsh r2, [sl, #4] - add r1, sp, #0 - add r0, sl, #4 - strh r2, [r7, #0x50] - ldrsh r2, [sl, #6] - add r1, r1, r4, lsl #2 - strh r2, [r7, #0x52] - bl GetDirectionTowardsPosition - and r0, r0, #7 - strb r0, [r7, #0x4c] - add r1, sp, #0 - mov r0, r4, lsl #2 - ldrh r0, [r1, r0] - add r1, r1, r4, lsl #2 - strh r0, [r7, #0x5a] - ldrh r0, [r1, #2] - strh r0, [r7, #0x5c] - b _0230ED98 -_0230ED14: - mov r1, r4 - mov r2, r8 - bl GetPossibleAiThrownItemDirections - mov sb, #0 - b _0230ED74 -_0230ED28: - ldr r0, _0230EDA0 ; =ov29_0237C9D8 - ldr r0, [r0, sb, lsl #2] - bl DungeonRandOutcome__022EAB20 - cmp r0, #0 - beq _0230ED70 - add r0, r7, #0x4a - mov r1, #0x24 - bl SetMonsterActionFields - strb r6, [r7, #0x4e] - ldrsh r1, [sl, #4] - ldr r0, _0230EDA8 ; =ov29_0237C9F8 - strh r1, [r7, #0x50] - ldrsh r1, [sl, #6] - strh r1, [r7, #0x52] - ldr r0, [r0, sb, lsl #2] - and r0, r0, #7 - strb r0, [r7, #0x4c] - b _0230ED98 -_0230ED70: - add sb, sb, #1 -_0230ED74: - ldr r0, [fp] - cmp sb, r0 - blt _0230ED28 -_0230ED80: - add r4, r4, #1 -_0230ED84: - cmp r4, #3 - blt _0230EC68 -_0230ED8C: - add r5, r5, #1 -_0230ED90: - cmp r5, #0x34 - blt _0230EB0C -_0230ED98: - add sp, sp, #0x50 - ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} - .align 2, 0 -_0230EDA0: .word ov29_0237C9D8 -_0230EDA4: .word AI_THROWN_ITEM_ACTION_CHOICE_COUNT -_0230EDA8: .word ov29_0237C9F8 -_0230EDAC: .word BAG_ITEMS_PTR_MIRROR - arm_func_end AiDecideUseItem - - arm_func_start GetPossibleAiThrownItemDirections -GetPossibleAiThrownItemDirections: ; 0x0230EDB0 - stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr} - sub sp, sp, #0x14 - ldr r4, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - mov r5, #0 - mov sl, r0 - str r3, [sp, #8] - ldr r0, _0230EFF8 ; =ov29_0237C9D0 - str r1, [sp] - str r2, [sp, #4] - str r5, [r4] - mov fp, r5 -_0230EDDC: - strb fp, [r0, r5] - add r5, r5, #1 - cmp r5, #8 - blt _0230EDDC - mvn r0, #0 - str r0, [sp, #0x10] -_0230EDF4: - ldr r0, _0230EFFC ; =DUNGEON_PTR - ldr r0, [r0] - add r0, r0, fp, lsl #2 - add r0, r0, #0x12000 -#ifdef JAPAN - ldr r4, [r0, #0xad4] -#else - ldr r4, [r0, #0xb78] -#endif - mov r0, r4 - bl EntityIsValid__0230F008 - cmp r0, #0 - cmpne sl, r4 - beq _0230EFE0 - ldr r0, [sp] - mov r2, #0 - cmp r0, #1 - mov r0, sl - mov r1, r4 - bne _0230EE50 - mov r3, r2 - bl GetTreatmentBetweenMonsters - cmp r0, #0 - bne _0230EFE0 - mov r0, #3 - str r0, [sp, #0xc] - b _0230EE68 -_0230EE50: - mov r3, #1 - bl GetTreatmentBetweenMonsters - cmp r0, #1 - bne _0230EFE0 - mov r0, #1 - str r0, [sp, #0xc] -_0230EE68: - mov r0, sl - mov r1, r4 - bl CanSeeTarget - cmp r0, #0 - beq _0230EFE0 - ldrsh r6, [r4, #4] - ldrsh r7, [sl, #4] - sub r0, r7, r6 - bl abs - mov r5, r0 - ldrsh r8, [r4, #6] - ldrsh sb, [sl, #6] - sub r0, sb, r8 - bl abs - ldr r1, [sl, #0xb4] - ldrb r1, [r1, #0xee] - cmp r1, #0 - bne _0230EEC4 - cmp r5, r0 - movgt r1, r5 - movle r1, r0 - cmp r1, #0xa - bgt _0230EFE0 -_0230EEC4: - cmp r5, r0 - ldr r5, [sp, #0x10] - bne _0230EF08 - cmp r7, r6 - cmplt sb, r8 - movlt r5, #1 - blt _0230EF54 - cmp r7, r6 - bge _0230EEF4 - cmp sb, r8 - movgt r5, #3 - bgt _0230EF54 -_0230EEF4: - cmp r7, r6 - cmpgt sb, r8 - movgt r5, #5 - movle r5, #7 - b _0230EF54 -_0230EF08: - cmp r7, r6 - bne _0230EF1C - cmp sb, r8 - movlt r5, #0 - blt _0230EF54 -_0230EF1C: - cmp r7, r6 - bge _0230EF30 - cmp sb, r8 - moveq r5, #2 - beq _0230EF54 -_0230EF30: - cmp r7, r6 - bne _0230EF44 - cmp sb, r8 - movgt r5, #4 - bgt _0230EF54 -_0230EF44: - cmp r7, r6 - ble _0230EF54 - cmp sb, r8 - moveq r5, #6 -_0230EF54: - cmp r5, #0 - blt _0230EFE0 - ldr r0, _0230EFF8 ; =ov29_0237C9D0 - ldrb r0, [r0, r5] - cmp r0, #0 - bne _0230EFE0 - mov r0, sl - mov r1, r4 - mov r2, r5 - mov r3, #0xa - bl IsTargetInRange - cmp r0, #0 - beq _0230EFE0 - ldr r0, _0230EFF8 ; =ov29_0237C9D0 - mov r1, #1 - strb r1, [r0, r5] - ldr r0, [sp, #8] - cmp r0, #0 - ldr r0, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - ldr r1, [r0] - ldr r0, _0230F000 ; =ov29_0237C9F8 - str r5, [r0, r1, lsl #2] - movne r0, #0x64 - bne _0230EFC4 - ldr r2, [sp, #0xc] - ldr r1, [sp, #4] - mov r0, r4 - bl GetAiUseItemProbability -_0230EFC4: - ldr r1, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - ldr r2, [r1] - ldr r1, _0230F004 ; =ov29_0237C9D8 - str r0, [r1, r2, lsl #2] - ldr r0, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT - add r1, r2, #1 - str r1, [r0] -_0230EFE0: - add fp, fp, #1 - cmp fp, #0x14 - blt _0230EDF4 - add sp, sp, #0x14 - ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} - .align 2, 0 -_0230EFF4: .word AI_THROWN_ITEM_ACTION_CHOICE_COUNT -_0230EFF8: .word ov29_0237C9D0 -_0230EFFC: .word DUNGEON_PTR -_0230F000: .word ov29_0237C9F8 -_0230F004: .word ov29_0237C9D8 - arm_func_end GetPossibleAiThrownItemDirections diff --git a/asm/overlay_29_0230EDB0.s b/asm/overlay_29_0230EDB0.s new file mode 100644 index 00000000..47f1c74d --- /dev/null +++ b/asm/overlay_29_0230EDB0.s @@ -0,0 +1,176 @@ + .include "asm/macros.inc" + .include "overlay_29_0230EDB0.inc" + + .text + + arm_func_start GetPossibleAiThrownItemDirections +GetPossibleAiThrownItemDirections: ; 0x0230EDB0 + stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr} + sub sp, sp, #0x14 + ldr r4, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT + mov r5, #0 + mov sl, r0 + str r3, [sp, #8] + ldr r0, _0230EFF8 ; =AI_THROWN_ITEM_DIRECTION_IS_USED + str r1, [sp] + str r2, [sp, #4] + str r5, [r4] + mov fp, r5 +_0230EDDC: + strb fp, [r0, r5] + add r5, r5, #1 + cmp r5, #8 + blt _0230EDDC + mvn r0, #0 + str r0, [sp, #0x10] +_0230EDF4: + ldr r0, _0230EFFC ; =DUNGEON_PTR + ldr r0, [r0] + add r0, r0, fp, lsl #2 + add r0, r0, #0x12000 +#ifdef JAPAN + ldr r4, [r0, #0xad4] +#else + ldr r4, [r0, #0xb78] +#endif + mov r0, r4 + bl EntityIsValid__0230F008 + cmp r0, #0 + cmpne sl, r4 + beq _0230EFE0 + ldr r0, [sp] + mov r2, #0 + cmp r0, #1 + mov r0, sl + mov r1, r4 + bne _0230EE50 + mov r3, r2 + bl GetTreatmentBetweenMonsters + cmp r0, #0 + bne _0230EFE0 + mov r0, #3 + str r0, [sp, #0xc] + b _0230EE68 +_0230EE50: + mov r3, #1 + bl GetTreatmentBetweenMonsters + cmp r0, #1 + bne _0230EFE0 + mov r0, #1 + str r0, [sp, #0xc] +_0230EE68: + mov r0, sl + mov r1, r4 + bl CanSeeTarget + cmp r0, #0 + beq _0230EFE0 + ldrsh r6, [r4, #4] + ldrsh r7, [sl, #4] + sub r0, r7, r6 + bl abs + mov r5, r0 + ldrsh r8, [r4, #6] + ldrsh sb, [sl, #6] + sub r0, sb, r8 + bl abs + ldr r1, [sl, #0xb4] + ldrb r1, [r1, #0xee] + cmp r1, #0 + bne _0230EEC4 + cmp r5, r0 + movgt r1, r5 + movle r1, r0 + cmp r1, #0xa + bgt _0230EFE0 +_0230EEC4: + cmp r5, r0 + ldr r5, [sp, #0x10] + bne _0230EF08 + cmp r7, r6 + cmplt sb, r8 + movlt r5, #1 + blt _0230EF54 + cmp r7, r6 + bge _0230EEF4 + cmp sb, r8 + movgt r5, #3 + bgt _0230EF54 +_0230EEF4: + cmp r7, r6 + cmpgt sb, r8 + movgt r5, #5 + movle r5, #7 + b _0230EF54 +_0230EF08: + cmp r7, r6 + bne _0230EF1C + cmp sb, r8 + movlt r5, #0 + blt _0230EF54 +_0230EF1C: + cmp r7, r6 + bge _0230EF30 + cmp sb, r8 + moveq r5, #2 + beq _0230EF54 +_0230EF30: + cmp r7, r6 + bne _0230EF44 + cmp sb, r8 + movgt r5, #4 + bgt _0230EF54 +_0230EF44: + cmp r7, r6 + ble _0230EF54 + cmp sb, r8 + moveq r5, #6 +_0230EF54: + cmp r5, #0 + blt _0230EFE0 + ldr r0, _0230EFF8 ; =AI_THROWN_ITEM_DIRECTION_IS_USED + ldrb r0, [r0, r5] + cmp r0, #0 + bne _0230EFE0 + mov r0, sl + mov r1, r4 + mov r2, r5 + mov r3, #0xa + bl IsTargetInRange + cmp r0, #0 + beq _0230EFE0 + ldr r0, _0230EFF8 ; =AI_THROWN_ITEM_DIRECTION_IS_USED + mov r1, #1 + strb r1, [r0, r5] + ldr r0, [sp, #8] + cmp r0, #0 + ldr r0, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT + ldr r1, [r0] + ldr r0, _0230F000 ; =AI_THROWN_ITEM_DIRECTIONS + str r5, [r0, r1, lsl #2] + movne r0, #0x64 + bne _0230EFC4 + ldr r2, [sp, #0xc] + ldr r1, [sp, #4] + mov r0, r4 + bl GetAiUseItemProbability +_0230EFC4: + ldr r1, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT + ldr r2, [r1] + ldr r1, _0230F004 ; =AI_THROWN_ITEM_PROBABILITIES + str r0, [r1, r2, lsl #2] + ldr r0, _0230EFF4 ; =AI_THROWN_ITEM_ACTION_CHOICE_COUNT + add r1, r2, #1 + str r1, [r0] +_0230EFE0: + add fp, fp, #1 + cmp fp, #0x14 + blt _0230EDF4 + add sp, sp, #0x14 + ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} + .align 2, 0 +_0230EFF4: .word AI_THROWN_ITEM_ACTION_CHOICE_COUNT +_0230EFF8: .word AI_THROWN_ITEM_DIRECTION_IS_USED +_0230EFFC: .word DUNGEON_PTR +_0230F000: .word AI_THROWN_ITEM_DIRECTIONS +_0230F004: .word AI_THROWN_ITEM_PROBABILITIES + arm_func_end GetPossibleAiThrownItemDirections diff --git a/asm/overlay_29_023118D8.s b/asm/overlay_29_023118D8.s index 9dc53625..5794f9c3 100644 --- a/asm/overlay_29_023118D8.s +++ b/asm/overlay_29_023118D8.s @@ -73,15 +73,15 @@ _023119B0: ldmia sp!, {r3, r4, r5, r6, r7, pc} .align 2, 0 #ifdef JAPAN -#define TRY_INFLICT_SLEEP_STATUS_OFFSET -0x2C0 +#define TRY_INFLICT_STATUS_SLEEP_OFFSET -0x2C0 #else -#define TRY_INFLICT_SLEEP_STATUS_OFFSET 0 +#define TRY_INFLICT_STATUS_SLEEP_OFFSET 0 #endif -_023119D0: .word 0x00000D09 + TRY_INFLICT_SLEEP_STATUS_OFFSET -_023119D4: .word 0x00000D0A + TRY_INFLICT_SLEEP_STATUS_OFFSET -_023119D8: .word 0x00000D06 + TRY_INFLICT_SLEEP_STATUS_OFFSET -_023119DC: .word 0x00000D07 + TRY_INFLICT_SLEEP_STATUS_OFFSET -_023119E0: .word 0x00000D04 + TRY_INFLICT_SLEEP_STATUS_OFFSET +_023119D0: .word 0x00000D09 + TRY_INFLICT_STATUS_SLEEP_OFFSET +_023119D4: .word 0x00000D0A + TRY_INFLICT_STATUS_SLEEP_OFFSET +_023119D8: .word 0x00000D06 + TRY_INFLICT_STATUS_SLEEP_OFFSET +_023119DC: .word 0x00000D07 + TRY_INFLICT_STATUS_SLEEP_OFFSET +_023119E0: .word 0x00000D04 + TRY_INFLICT_STATUS_SLEEP_OFFSET arm_func_end TryInflictSleepStatus arm_func_start IsProtectedFromSleepClassStatus diff --git a/asm/overlay_29_0232145C.s b/asm/overlay_29_0232145C.s index d3d77616..901044de 100644 --- a/asm/overlay_29_0232145C.s +++ b/asm/overlay_29_0232145C.s @@ -1189,7 +1189,7 @@ _023223D4: mov r0, #0xa8 bl DungeonRandInt mov r2, r0 - ldr r1, _02322D1C ; =ov29_0237CA88 + ldr r1, _02322D1C ; =METRONOME_NEXT_INDEX add r0, sp, #0x28 str r2, [r1] ldr r1, _02322D20 ; =METRONOME_TABLE @@ -1826,7 +1826,7 @@ _02322D10: #define OV29_02322374_DATA_OFFSET 0 #endif _02322D18: .word 0x0000014A -_02322D1C: .word ov29_0237CA88 +_02322D1C: .word METRONOME_NEXT_INDEX _02322D20: .word METRONOME_TABLE _02322D24: .word 0x00000EA4 + OV29_02322374_DATA_OFFSET _02322D28: .word NATURE_POWER_TABLE diff --git a/asm/overlay_29_02325644.s b/asm/overlay_29_02325644.s index e476c797..a1cb4f8e 100644 --- a/asm/overlay_29_02325644.s +++ b/asm/overlay_29_02325644.s @@ -610,7 +610,7 @@ _02325E60: .word ATK_STAT_IDX DoMoveDamageMultihitUntilMiss: ; 0x02325E64 stmdb sp!, {r3, r4, lr} sub sp, sp, #4 - ldr ip, _02325EB8 ; =ov29_0237CA70 + ldr ip, _02325EB8 ; =ROLLOUT_ICE_BALL_SUCCESSIVE_HITS str r3, [sp] ldr ip, [ip] ldr r3, _02325EBC ; =ROLLOUT_DAMAGE_MULT_TABLE @@ -618,10 +618,10 @@ DoMoveDamageMultihitUntilMiss: ; 0x02325E64 ldr r3, [r3, ip, lsl #2] bl DealDamage cmp r0, #0 - ldreq r0, _02325EC0 ; =ov29_0237CA69 + ldreq r0, _02325EC0 ; =ROLLOUT_ICE_BALL_MISSED moveq r1, #1 streqb r1, [r0] - ldr r1, _02325EB8 ; =ov29_0237CA70 + ldr r1, _02325EB8 ; =ROLLOUT_ICE_BALL_SUCCESSIVE_HITS movne r4, #1 ldr r2, [r1] mov r0, r4 @@ -630,9 +630,9 @@ DoMoveDamageMultihitUntilMiss: ; 0x02325E64 add sp, sp, #4 ldmia sp!, {r3, r4, pc} .align 2, 0 -_02325EB8: .word ov29_0237CA70 +_02325EB8: .word ROLLOUT_ICE_BALL_SUCCESSIVE_HITS _02325EBC: .word ROLLOUT_DAMAGE_MULT_TABLE -_02325EC0: .word ov29_0237CA69 +_02325EC0: .word ROLLOUT_ICE_BALL_MISSED arm_func_end DoMoveDamageMultihitUntilMiss arm_func_start DoMoveYawn @@ -2719,14 +2719,14 @@ DoMoveDamageMultihitFatigue: ; 0x0232776C mov r4, #1 bl DungeonRandOutcomeUserAction cmp r0, #0 - ldrne r0, _023277B4 ; =ov29_0237CA6A + ldrne r0, _023277B4 ; =MULTIHIT_FATIGUE_MOVE_USED movne r1, r4 strneb r1, [r0] _023277AC: mov r0, r4 ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_023277B4: .word ov29_0237CA6A +_023277B4: .word MULTIHIT_FATIGUE_MOVE_USED arm_func_end DoMoveDamageMultihitFatigue arm_func_start DoMoveDamageWeightDependent @@ -2877,17 +2877,17 @@ DoMoveRapidSpin: ; 0x02327940 ldrh r0, [r0, #0x92] #endif tst r0, #2 - ldrne r0, _023279A8 ; =ov29_0237CA6D + ldrne r0, _023279A8 ; =RAPID_SPIN_BINDING_REMOVAL movne r1, #0 strneb r1, [r0] - ldreq r0, _023279A8 ; =ov29_0237CA6D + ldreq r0, _023279A8 ; =RAPID_SPIN_BINDING_REMOVAL moveq r1, r4 streqb r1, [r0] _023279A0: mov r0, r4 ldmia sp!, {r3, r4, r5, pc} .align 2, 0 -_023279A8: .word ov29_0237CA6D +_023279A8: .word RAPID_SPIN_BINDING_REMOVAL arm_func_end DoMoveRapidSpin arm_func_start DoMoveSureShot diff --git a/asm/overlay_29_02328030.s b/asm/overlay_29_02328030.s index bd496170..3d9721fd 100644 --- a/asm/overlay_29_02328030.s +++ b/asm/overlay_29_02328030.s @@ -1422,14 +1422,14 @@ DoMoveTwineedle: ; 0x0232915C mov r4, #0 bl DealDamage cmp r0, #0 - ldrne r0, _023291E8 ; =ov29_0237CA6B + ldrne r0, _023291E8 ; =TWINEEDLE_HIT_TRACKER movne r4, #1 strneb r4, [r0] - ldr r0, _023291E8 ; =ov29_0237CA6B + ldr r0, _023291E8 ; =TWINEEDLE_HIT_TRACKER ldrb r0, [r0] cmp r0, #0 beq _023291DC - ldr r0, _023291EC ; =ov29_0237CA78 + ldr r0, _023291EC ; =MULTIHIT_MOVE_SUCCESSIVE_HITS ldr r0, [r0] cmp r0, #2 bne _023291DC @@ -1450,8 +1450,8 @@ _023291DC: add sp, sp, #4 ldmia sp!, {r3, r4, r5, r6, pc} .align 2, 0 -_023291E8: .word ov29_0237CA6B -_023291EC: .word ov29_0237CA78 +_023291E8: .word TWINEEDLE_HIT_TRACKER +_023291EC: .word MULTIHIT_MOVE_SUCCESSIVE_HITS _023291F0: .word TWINEEDLE_POISON_CHANCE arm_func_end DoMoveTwineedle @@ -2538,7 +2538,7 @@ _02329F68: arm_func_start DoMoveTripleKick DoMoveTripleKick: ; 0x02329F78 stmdb sp!, {r3, lr} - ldr ip, _02329FB0 ; =ov29_0237CA7C + ldr ip, _02329FB0 ; =TRIPLE_KICK_SUCCESSIVE_HITS ldr lr, [ip] add lr, lr, #1 str lr, [ip] @@ -2552,7 +2552,7 @@ DoMoveTripleKick: ; 0x02329F78 and r0, r0, #0xff ldmia sp!, {r3, pc} .align 2, 0 -_02329FB0: .word ov29_0237CA7C +_02329FB0: .word TRIPLE_KICK_SUCCESSIVE_HITS arm_func_end DoMoveTripleKick arm_func_start DoMoveSport diff --git a/asm/overlay_29_0232A3FC.s b/asm/overlay_29_0232A3FC.s index 75df04c6..4b145a6c 100644 --- a/asm/overlay_29_0232A3FC.s +++ b/asm/overlay_29_0232A3FC.s @@ -2078,7 +2078,7 @@ DoMoveLeechSeed: ; 0x0232BC34 DoMoveMetronome: ; 0x0232BC64 stmdb sp!, {r3, r4, r5, r6, r7, lr} sub sp, sp, #8 - ldr r2, _0232BCB8 ; =ov29_0237CA88 + ldr r2, _0232BCB8 ; =METRONOME_NEXT_INDEX mov r5, r0 ldr r6, [r2] ldr r0, _0232BCBC ; =METRONOME_TABLE @@ -2098,7 +2098,7 @@ DoMoveMetronome: ; 0x0232BC64 add sp, sp, #8 ldmia sp!, {r3, r4, r5, r6, r7, pc} .align 2, 0 -_0232BCB8: .word ov29_0237CA88 +_0232BCB8: .word METRONOME_NEXT_INDEX _0232BCBC: .word METRONOME_TABLE _0232BCC0: .word ov10_022C5DE0 arm_func_end DoMoveMetronome diff --git a/asm/overlay_29_0232E864.s b/asm/overlay_29_0232E864.s index b991b844..e86314ec 100644 --- a/asm/overlay_29_0232E864.s +++ b/asm/overlay_29_0232E864.s @@ -879,7 +879,7 @@ _0232F498: ldr r2, [sb, #0xb4] cmp r0, #2 cmpne r0, #0x69 - ldreq r0, _0232F838 ; =ov29_0237CA69 + ldreq r0, _0232F838 ; =ROLLOUT_ICE_BALL_MISSED moveq r1, #1 streqb r1, [r0] ldrh r1, [r8, #4] @@ -1143,7 +1143,7 @@ _0232F828: .word 0x00000131 _0232F82C: .word 0x00000EBA + EXECUTE_MOVE_EFFECT_DATA_OFFSET _0232F830: .word 0x000001F6 _0232F834: .word 0x00000232 -_0232F838: .word ov29_0237CA69 +_0232F838: .word ROLLOUT_ICE_BALL_MISSED _0232F83C: .word 0x00001307 _0232F840: .word 0x00001306 _0232F844: .word 0x00000EBC + EXECUTE_MOVE_EFFECT_DATA_OFFSET diff --git a/asm/overlay_29_0233861C.s b/asm/overlay_29_0233861C.s index 9c1d5ebe..b00081d6 100644 --- a/asm/overlay_29_0233861C.s +++ b/asm/overlay_29_0233861C.s @@ -2634,7 +2634,7 @@ GenerateFloor: ; 0x0233A6D8 bl LoadFixedRoomDataVeneer bl ov29_02343DC4 ldr r1, _0233AE64 ; =DUNGEON_PTR - ldr r2, _0233AE6C ; =ov29_0237CFBC + ldr r2, _0233AE6C ; =FLOOR_GENERATION_STATUS ldr r1, [r1] mov r3, r8 add r1, r1, #0x12000 @@ -2645,7 +2645,7 @@ GenerateFloor: ; 0x0233A6D8 bl ResetHiddenStairsSpawn bl IsOutlawMonsterHouseFloor ldr r1, _0233AE64 ; =DUNGEON_PTR - ldr r3, _0233AE6C ; =ov29_0237CFBC + ldr r3, _0233AE6C ; =FLOOR_GENERATION_STATUS ldr r2, [r1] mov r1, sb add r2, r2, #0xc4 + GENERATE_FLOOR_OFFSET @@ -2653,7 +2653,7 @@ GenerateFloor: ; 0x0233A6D8 add r0, r2, #0x4000 bl GetHiddenStairsType ldr r1, _0233AE64 ; =DUNGEON_PTR - ldr r2, _0233AE6C ; =ov29_0237CFBC + ldr r2, _0233AE6C ; =FLOOR_GENERATION_STATUS ldr r1, [r1] str r0, [r2, #0x2c] add r0, r1, #0x4000 @@ -2663,7 +2663,7 @@ GenerateFloor: ; 0x0233A6D8 mov r1, #0xff cmp r0, #2 moveq r2, #1 - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS movne r2, r8 strb r2, [r0, #4] strb r1, [r0, #2] @@ -2671,7 +2671,7 @@ GenerateFloor: ; 0x0233A6D8 strb r1, [r0, #6] ldrb r0, [sb, #7] bl GetFinalKecleonShopSpawnChance - ldr r1, _0233AE6C ; =ov29_0237CFBC + ldr r1, _0233AE6C ; =FLOOR_GENERATION_STATUS strh r0, [r1, #0xc] ldrb r0, [sb, #8] strh r0, [r1, #0x10] @@ -2679,7 +2679,7 @@ GenerateFloor: ; 0x0233A6D8 cmp r0, #0 movne r0, #0x64 strneh r0, [r1, #0x10] - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS mov r1, #1 strb r1, [r0] sub r1, r1, #2 @@ -2712,7 +2712,7 @@ _0233A828: add r0, r0, #0x4000 strb r7, [r0, #0xc5 + GENERATE_FLOOR_OFFSET] ldr r0, [r3] - ldr r2, _0233AE6C ; =ov29_0237CFBC + ldr r2, _0233AE6C ; =FLOOR_GENERATION_STATUS add r0, r0, #0x4000 strb r7, [r0, #0xc6 + GENERATE_FLOOR_OFFSET] ldr r0, [r3] @@ -2752,10 +2752,10 @@ _0233A8C8: cmp r6, #1 add r0, r0, #0x4000 strh r6, [r0, #0xde + GENERATE_FLOOR_OFFSET] - ldrge r0, _0233AE6C ; =ov29_0237CFBC + ldrge r0, _0233AE6C ; =FLOOR_GENERATION_STATUS movge r1, #0 strge r1, [r0, #0x18] - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS mov r1, #0 strb r1, [r0, #5] strh r5, [r0, #0x20] @@ -2844,7 +2844,7 @@ _0233A9E4: add r2, r1, #0x4000 mov r1, #0xff strb r1, [r2, #0xc9 + GENERATE_FLOOR_OFFSET] - ldr r1, _0233AE6C ; =ov29_0237CFBC + ldr r1, _0233AE6C ; =FLOOR_GENERATION_STATUS strle r0, [sp, #4] and r0, sl, #0xf cmp r0, #0xb @@ -2867,7 +2867,7 @@ _0233AA4C: ; jump table _0233AA7C: mov r0, #2 bl DungeonRandInt - ldr r1, _0233AE6C ; =ov29_0237CFBC + ldr r1, _0233AE6C ; =FLOOR_GENERATION_STATUS mov r2, #1 strb r2, [r1, #6] add r1, r0, #2 @@ -2879,7 +2879,7 @@ _0233AA7C: _0233AAA8: mov r0, #2 bl DungeonRandInt - ldr r1, _0233AE6C ; =ov29_0237CFBC + ldr r1, _0233AE6C ; =FLOOR_GENERATION_STATUS mov r2, #2 strb r2, [r1, #6] add r1, r0, #2 @@ -2941,7 +2941,7 @@ _0233AB64: _0233AB78: bl ResetInnerBoundaryTileRows bl EnsureImpassableTilesAreWalls - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS ldrb r0, [r0, #5] cmp r0, #0 bne _0233AC4C @@ -3005,7 +3005,7 @@ _0233AC50: _0233AC58: cmp r6, #0xa bne _0233AC88 - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS mvn r1, #0 strh r1, [r0, #0x20] strh r1, [r0, #0x22] @@ -3069,7 +3069,7 @@ _0233AD3C: _0233AD44: cmp r7, #0xa bne _0233AD98 - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS mvn r1, #0 strh r1, [r0, #0x20] strh r1, [r0, #0x22] @@ -3089,21 +3089,21 @@ _0233AD44: bl MarkEnemySpawns bl ResolveInvalidSpawns _0233AD98: - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS ldrsh r1, [r0, #0x20] cmp r1, #0 ldrgesh r0, [r0, #0x22] cmpge r0, #0 blt _0233ADCC bl GetKecleonIdToSpawnByFloor - ldr r1, _0233AE6C ; =ov29_0237CFBC + ldr r1, _0233AE6C ; =FLOOR_GENERATION_STATUS mov r2, r0 ldrsh r0, [r1, #0x20] ldrsh r1, [r1, #0x22] mov r3, #0 bl MarkShopkeeperSpawn _0233ADCC: - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x30] cmp r0, #0 ldrlt r0, _0233AE64 ; =DUNGEON_PTR @@ -3122,7 +3122,7 @@ _0233ADF4: mov r1, r0 mov r3, #0x20 bl FlagHallwayJunctions - ldr r0, _0233AE6C ; =ov29_0237CFBC + ldr r0, _0233AE6C ; =FLOOR_GENERATION_STATUS ldrb r0, [r0, #4] cmp r0, #0 beq _0233AE28 @@ -3147,7 +3147,7 @@ _0233AE58: .align 2, 0 _0233AE64: .word DUNGEON_PTR _0233AE68: .word 0x000286B2 + GENERATE_FLOOR_OFFSET -_0233AE6C: .word ov29_0237CFBC +_0233AE6C: .word FLOOR_GENERATION_STATUS _0233AE70: .word SECONDARY_TERRAIN_TYPES _0233AE74: .word 0x00012AFA + GENERATE_FLOOR_OFFSET arm_func_end GenerateFloor @@ -3175,7 +3175,7 @@ ClearHiddenStairs: ; 0x0233AE94 ldrb r0, [r0] cmp r0, #0 ldmeqia sp!, {r3, pc} - ldr r1, _0233AF08 ; =ov29_0237CFBC + ldr r1, _0233AF08 ; =FLOOR_GENERATION_STATUS mvn r2, #0 ldrsh r0, [r1, #0x1c] cmp r0, r2 @@ -3185,7 +3185,7 @@ ClearHiddenStairs: ; 0x0233AE94 bl GetTileSafe mov r2, #0 strh r2, [r0] - ldr r1, _0233AF08 ; =ov29_0237CFBC + ldr r1, _0233AF08 ; =FLOOR_GENERATION_STATUS strh r2, [r0, #2] ldrsh r0, [r1, #0x1c] ldrsh r1, [r1, #0x1e] @@ -3201,7 +3201,7 @@ _0233AEFC: ldmia sp!, {r3, pc} .align 2, 0 _0233AF04: .word HIDDEN_STAIRS_SPAWN_BLOCKED -_0233AF08: .word ov29_0237CFBC +_0233AF08: .word FLOOR_GENERATION_STATUS arm_func_end ClearHiddenStairs arm_func_start FlagHallwayJunctions @@ -3351,13 +3351,13 @@ GenerateStandardFloor: ; 0x0233B028 mov r1, r6 mov r2, r5 bl GenerateMazeRoom - ldr r3, _0233B18C ; =ov29_0237CFBC + ldr r3, _0233B18C ; =FLOOR_GENERATION_STATUS add r0, sp, #0x80 ldrsh r3, [r3, #0xc] mov r1, r6 mov r2, r5 bl GenerateKecleonShop - ldr r3, _0233B18C ; =ov29_0237CFBC + ldr r3, _0233B18C ; =FLOOR_GENERATION_STATUS add r0, sp, #0x80 ldrsh r3, [r3, #0x10] mov r1, r6 @@ -3380,7 +3380,7 @@ GenerateStandardFloor: ; 0x0233B028 add sp, sp, #0x1000 ldmia sp!, {r3, r4, r5, r6, r7, pc} .align 2, 0 -_0233B18C: .word ov29_0237CFBC +_0233B18C: .word FLOOR_GENERATION_STATUS arm_func_end GenerateStandardFloor arm_func_start GenerateOuterRingFloor @@ -3661,13 +3661,13 @@ _0233B4A0: mov r2, #4 add r3, sp, #0x58 bl EnsureConnectedGrid - ldr r1, _0233B618 ; =ov29_0237CFBC + ldr r1, _0233B618 ; =FLOOR_GENERATION_STATUS add r0, sp, #0x94 ldrsh r3, [r1, #0xc] mov r1, #6 mov r2, #4 bl GenerateKecleonShop - ldr r1, _0233B618 ; =ov29_0237CFBC + ldr r1, _0233B618 ; =FLOOR_GENERATION_STATUS add r0, sp, #0x94 ldrsh r3, [r1, #0x10] mov r1, #6 @@ -3688,7 +3688,7 @@ _0233B4A0: ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _0233B614: .word 0x000001C2 -_0233B618: .word ov29_0237CFBC +_0233B618: .word FLOOR_GENERATION_STATUS arm_func_end GenerateOuterRingFloor arm_func_start GenerateCrossroadsFloor @@ -3962,13 +3962,13 @@ _0233B9B0: mov r2, #4 str r4, [sp] bl EnsureConnectedGrid - ldr r1, _0233BA78 ; =ov29_0237CFBC + ldr r1, _0233BA78 ; =FLOOR_GENERATION_STATUS add r0, sp, #0x98 ldrsh r3, [r1, #0xc] mov r1, #5 mov r2, #4 bl GenerateKecleonShop - ldr r1, _0233BA78 ; =ov29_0237CFBC + ldr r1, _0233BA78 ; =FLOOR_GENERATION_STATUS add r0, sp, #0x98 ldrsh r3, [r1, #0x10] mov r1, #5 @@ -3989,7 +3989,7 @@ _0233B9B0: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _0233BA74: .word 0x000001C2 -_0233BA78: .word ov29_0237CFBC +_0233BA78: .word FLOOR_GENERATION_STATUS arm_func_end GenerateCrossroadsFloor arm_func_start GenerateLineFloor @@ -4057,13 +4057,13 @@ GenerateLineFloor: ; 0x0233BA7C mov r2, #1 add r3, sp, #0x44 bl EnsureConnectedGrid - ldr r3, _0233BBD8 ; =ov29_0237CFBC + ldr r3, _0233BBD8 ; =FLOOR_GENERATION_STATUS add r0, sp, #0x80 ldrsh r3, [r3, #0xc] mov r1, #5 mov r2, #1 bl GenerateKecleonShop - ldr r1, _0233BBD8 ; =ov29_0237CFBC + ldr r1, _0233BBD8 ; =FLOOR_GENERATION_STATUS add r0, sp, #0x80 ldrsh r3, [r1, #0x10] mov r1, #5 @@ -4082,7 +4082,7 @@ GenerateLineFloor: ; 0x0233BA7C add sp, sp, #0x1000 ldmia sp!, {r3, r4, r5, r6, r7, pc} .align 2, 0 -_0233BBD8: .word ov29_0237CFBC +_0233BBD8: .word FLOOR_GENERATION_STATUS arm_func_end GenerateLineFloor arm_func_start GenerateCrossFloor @@ -4165,13 +4165,13 @@ _0233BC58: mov r2, r1 str ip, [sp] bl EnsureConnectedGrid - ldr r1, _0233BD70 ; =ov29_0237CFBC + ldr r1, _0233BD70 ; =FLOOR_GENERATION_STATUS add r0, sp, #0x80 ldrsh r3, [r1, #0xc] mov r1, #3 mov r2, r1 bl GenerateKecleonShop - ldr r3, _0233BD70 ; =ov29_0237CFBC + ldr r3, _0233BD70 ; =FLOOR_GENERATION_STATUS mov r1, #3 ldrsh r3, [r3, #0x10] add r0, sp, #0x80 @@ -4191,7 +4191,7 @@ _0233BC58: ldmia sp!, {r4, r5, r6, r7, r8, pc} .align 2, 0 _0233BD6C: .word 0x000001C2 -_0233BD70: .word ov29_0237CFBC +_0233BD70: .word FLOOR_GENERATION_STATUS arm_func_end GenerateCrossFloor arm_func_start GenerateBeetleFloor @@ -4284,13 +4284,13 @@ _0233BE48: mov r2, r1 add r3, sp, #0x44 bl EnsureConnectedGrid - ldr r3, _0233BF2C ; =ov29_0237CFBC + ldr r3, _0233BF2C ; =FLOOR_GENERATION_STATUS mov r1, #3 ldrsh r3, [r3, #0xc] add r0, sp, #0x80 mov r2, r1 bl GenerateKecleonShop - ldr r3, _0233BF2C ; =ov29_0237CFBC + ldr r3, _0233BF2C ; =FLOOR_GENERATION_STATUS mov r1, #3 ldrsh r3, [r3, #0x10] add r0, sp, #0x80 @@ -4310,7 +4310,7 @@ _0233BE48: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, pc} .align 2, 0 _0233BF28: .word 0x000001C2 -_0233BF2C: .word ov29_0237CFBC +_0233BF2C: .word FLOOR_GENERATION_STATUS arm_func_end GenerateBeetleFloor arm_func_start MergeRoomsVertically @@ -4553,13 +4553,13 @@ _0233C23C: mov r1, r6 mov r2, r5 bl GenerateMazeRoom - ldr r3, _0233C30C ; =ov29_0237CFBC + ldr r3, _0233C30C ; =FLOOR_GENERATION_STATUS add r0, sp, #0x80 ldrsh r3, [r3, #0xc] mov r1, r6 mov r2, r5 bl GenerateKecleonShop - ldr r3, _0233C30C ; =ov29_0237CFBC + ldr r3, _0233C30C ; =FLOOR_GENERATION_STATUS add r0, sp, #0x80 ldrsh r3, [r3, #0x10] mov r1, r6 @@ -4583,7 +4583,7 @@ _0233C23C: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _0233C308: .word 0x000001C2 -_0233C30C: .word ov29_0237CFBC +_0233C30C: .word FLOOR_GENERATION_STATUS arm_func_end GenerateOuterRoomsFloor arm_func_start IsNotFullFloorFixedRoom @@ -4630,7 +4630,7 @@ _0233C374: #ifdef JAPAN ldr r2, _0233C768 ; =HIDDEN_STAIRS_SPAWN_BLOCKED ldr r4, [r0] - ldr r1, _0233C76C ; =ov29_0237CFBC + ldr r1, _0233C76C ; =FLOOR_GENERATION_STATUS add r0, r4, #0x12000 ldr r3, [r0, #0xa00] add r4, r4, #0xcc00 @@ -4652,7 +4652,7 @@ _0233C374: #else ldr r4, _0233C768 ; =HIDDEN_STAIRS_SPAWN_BLOCKED ldr r0, [r0] - ldr r3, _0233C76C ; =ov29_0237CFBC + ldr r3, _0233C76C ; =FLOOR_GENERATION_STATUS add r2, r0, #0x12000 ldr r5, [r2, #0xaa4] add r1, r0, #0xcd00 @@ -4724,7 +4724,7 @@ _0233C450: blt _0233C3E0 mov r8, #0 add r4, r6, #5 - ldr sb, _0233C76C ; =ov29_0237CFBC + ldr sb, _0233C76C ; =FLOOR_GENERATION_STATUS add r5, r7, #5 mov r6, r8 _0233C46C: @@ -4940,7 +4940,7 @@ _0233C758: .align 2, 0 _0233C764: .word DUNGEON_PTR _0233C768: .word HIDDEN_STAIRS_SPAWN_BLOCKED -_0233C76C: .word ov29_0237CFBC +_0233C76C: .word FLOOR_GENERATION_STATUS _0233C770: .word 0x000001C2 arm_func_end GenerateFixedRoom @@ -5475,7 +5475,7 @@ _0233CE7C: cmp r8, #0x20 and r6, r6, #6 blt _0233CF2C - ldr r0, _0233CF80 ; =ov29_0237CFBC + ldr r0, _0233CF80 ; =FLOOR_GENERATION_STATUS ldrb r0, [r0, #6] cmp r0, #1 cmpeq r6, #2 @@ -5483,7 +5483,7 @@ _0233CE7C: _0233CF2C: cmp r8, #0x30 blt _0233CF48 - ldr r0, _0233CF80 ; =ov29_0237CFBC + ldr r0, _0233CF80 ; =FLOOR_GENERATION_STATUS ldrb r0, [r0, #6] cmp r0, #2 cmpeq r6, #2 @@ -5507,7 +5507,7 @@ _0233CF70: .align 2, 0 _0233CF78: .word 0x000001C2 _0233CF7C: .word DIRECTIONS_XY -_0233CF80: .word ov29_0237CFBC +_0233CF80: .word FLOOR_GENERATION_STATUS arm_func_end GenerateExtraHallways arm_func_start GetGridPositions @@ -5569,7 +5569,7 @@ _0233D020: mov lr, r8 b _0233D0E4 _0233D040: - ldr sl, _0233D100 ; =ov29_0237CFBC + ldr sl, _0233D100 ; =FLOOR_GENERATION_STATUS ldrb sl, [sl, #6] cmp sl, #1 bne _0233D064 @@ -5623,7 +5623,7 @@ _0233D0F0: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _0233D0FC: .word 0x000001C2 -_0233D100: .word ov29_0237CFBC +_0233D100: .word FLOOR_GENERATION_STATUS arm_func_end InitDungeonGrid arm_func_start AssignRooms @@ -5674,7 +5674,7 @@ _0233D178: strb r1, [r4, r5] strb r2, [r4, r0] blt _0233D178 - ldr r0, _0233D310 ; =ov29_0237CFBC + ldr r0, _0233D310 ; =FLOOR_GENERATION_STATUS mov fp, #0 sub r1, sb, #1 str fp, [r0, #0x14] @@ -5688,7 +5688,7 @@ _0233D1D0: ldr r1, _0233D314 ; =0x000001C2 mov r4, #0 mla r6, r3, r1, sl - ldr r1, _0233D310 ; =ov29_0237CFBC + ldr r1, _0233D310 ; =FLOOR_GENERATION_STATUS b _0233D250 _0233D1E4: mov r7, #0x1e @@ -5728,7 +5728,7 @@ _0233D250: _0233D25C: cmp r3, sb blt _0233D1D0 - ldr r0, _0233D310 ; =ov29_0237CFBC + ldr r0, _0233D310 ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x14] cmp r0, #2 bge _0233D308 @@ -5775,14 +5775,14 @@ _0233D2F4: cmp r4, #0xc8 blt _0233D27C _0233D2FC: - ldr r0, _0233D310 ; =ov29_0237CFBC + ldr r0, _0233D310 ; =FLOOR_GENERATION_STATUS mov r1, #0 strb r1, [r0] _0233D308: add sp, sp, #0x104 ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 -_0233D310: .word ov29_0237CFBC +_0233D310: .word FLOOR_GENERATION_STATUS _0233D314: .word 0x000001C2 arm_func_end AssignRooms @@ -5921,7 +5921,7 @@ _0233D4F0: movlt r0, r5 movge r0, #0 and r6, r0, #0xff - ldr r0, _0233D670 ; =ov29_0237CFBC + ldr r0, _0233D670 ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x18] cmp r0, #0 ldr r0, [sp, #0x14] @@ -6014,7 +6014,7 @@ _0233D658: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _0233D66C: .word 0x000001C2 -_0233D670: .word ov29_0237CFBC +_0233D670: .word FLOOR_GENERATION_STATUS arm_func_end CreateRoomsAndAnchors arm_func_start GenerateSecondaryStructures @@ -6069,12 +6069,12 @@ _0233D714: ; jump table b _0233D938 ; case 4 b _0233D72C ; case 5 _0233D72C: - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x18] cmp r0, #0 beq _0233E014 sub r1, r0, #1 - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS str r1, [r0, #0x18] add r0, sl, sb add r0, r0, r7 @@ -6233,7 +6233,7 @@ _0233D938: add r0, r4, r3 add r0, r0, r0, lsr #31 mov r5, r0, asr #1 - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS add r1, r2, r1 ldr r0, [r0, #0x18] add r1, r1, r1, lsr #31 @@ -6241,7 +6241,7 @@ _0233D938: cmp r0, #0 beq _0233E014 sub r1, r0, #1 - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS str r1, [r0, #0x18] add r0, sl, sb add r0, r0, r7 @@ -6471,12 +6471,12 @@ _0233DC9C: sub r1, r1, #3 bl DungeonRandRange mov fp, r0 - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x18] cmp r0, #0 beq _0233E014 sub r1, r0, #1 - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS str r1, [r0, #0x18] add r0, sl, sb add r0, r0, r7 @@ -6528,12 +6528,12 @@ _0233DDC8: ldrsh r0, [r2, #2] sub r0, r1, r0 tst r0, #1 - ldrne r0, _0233E058 ; =ov29_0237CFBC + ldrne r0, _0233E058 ; =FLOOR_GENERATION_STATUS ldrne r0, [r0, #0x18] cmpne r0, #0 beq _0233E014 sub r1, r0, #1 - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS str r1, [r0, #0x18] add r0, sl, sb add r0, r0, r7 @@ -6572,12 +6572,12 @@ _0233DE7C: strb r0, [r8, #9] b _0233E014 _0233DE94: - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x18] cmp r0, #0 beq _0233E014 sub r1, r0, #1 - ldr r0, _0233E058 ; =ov29_0237CFBC + ldr r0, _0233E058 ; =FLOOR_GENERATION_STATUS str r1, [r0, #0x18] mov r0, r8 ldrsh r2, [r0, #4] @@ -6693,7 +6693,7 @@ _0233E03C: ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _0233E054: .word 0x000001C2 -_0233E058: .word ov29_0237CFBC +_0233E058: .word FLOOR_GENERATION_STATUS arm_func_end GenerateSecondaryStructures arm_func_start AssignGridCellConnections @@ -8704,7 +8704,7 @@ GenerateKecleonShop: ; 0x0233FBE8 stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr} sub sp, sp, #0x44 ldr r5, _0233FF8C ; =DUNGEON_PTR - ldr r4, _0233FF90 ; =ov29_0237CFBC + ldr r4, _0233FF90 ; =FLOOR_GENERATION_STATUS mvn r7, #0 ldr r6, [r5] strh r7, [r4, #0x20] @@ -8829,7 +8829,7 @@ _0233FD34: bl abs cmp r0, #4 blt _0233FF6C - ldr r0, _0233FF90 ; =ov29_0237CFBC + ldr r0, _0233FF90 ; =FLOOR_GENERATION_STATUS add r1, sl, fp mov r3, #1 strb r3, [r0, #3] @@ -8857,12 +8857,12 @@ _0233FD34: str r1, [r0, #0xd18 + GENERATE_KECLEON_SHOP_OFFSET] rsb r2, r1, #0 str r2, [r0, #0xd1c + GENERATE_KECLEON_SHOP_OFFSET] - ldr r1, _0233FF90 ; =ov29_0237CFBC + ldr r1, _0233FF90 ; =FLOOR_GENERATION_STATUS str r2, [r0, #0xd20 + GENERATE_KECLEON_SHOP_OFFSET] ldr r4, [r1, #0x30] b _0233FED8 _0233FE54: - ldr sl, _0233FF90 ; =ov29_0237CFBC + ldr sl, _0233FF90 ; =FLOOR_GENERATION_STATUS add r8, r6, #0xc000 ldr r5, [sl, #0x34] b _0233FEC8 @@ -8898,7 +8898,7 @@ _0233FEC8: blt _0233FE64 add r4, r4, #1 _0233FED8: - ldr r0, _0233FF90 ; =ov29_0237CFBC + ldr r0, _0233FF90 ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x38] cmp r4, r0 blt _0233FE54 @@ -8925,7 +8925,7 @@ _0233FF28: ldrsh r0, [r4, #4] cmp r5, r0 blt _0233FEF4 - ldr r1, _0233FF90 ; =ov29_0237CFBC + ldr r1, _0233FF90 ; =FLOOR_GENERATION_STATUS ldr r2, [r1, #0x30] ldr r0, [r1, #0x38] add r0, r2, r0 @@ -8954,7 +8954,7 @@ _0233FF84: ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _0233FF8C: .word DUNGEON_PTR -_0233FF90: .word ov29_0237CFBC +_0233FF90: .word FLOOR_GENERATION_STATUS _0233FF94: .word 0x000001C2 _0233FF98: .word 0x0000270F arm_func_end GenerateKecleonShop @@ -8974,7 +8974,7 @@ GenerateMonsterHouse: ; 0x0233FF9C bl DungeonRandInt cmp r5, r0 ble _02340210 - ldr r0, _0234021C ; =ov29_0237CFBC + ldr r0, _0234021C ; =FLOOR_GENERATION_STATUS ldrb r0, [r0, #3] cmp r0, #0 bne _02340210 @@ -9090,7 +9090,7 @@ _02340118: ldrb r0, [fp, r7] cmp r0, #0 beq _023401F4 - ldr r0, _0234021C ; =ov29_0237CFBC + ldr r0, _0234021C ; =FLOOR_GENERATION_STATUS add r2, sl, r3 mov r3, #1 strb r3, [r0, #1] @@ -9145,7 +9145,7 @@ _02340210: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _02340218: .word DUNGEON_PTR -_0234021C: .word ov29_0237CFBC +_0234021C: .word FLOOR_GENERATION_STATUS _02340220: .word 0x000001C2 arm_func_end GenerateMonsterHouse @@ -9317,7 +9317,7 @@ _02340454: .word 0x000001C2 GenerateMaze: ; 0x02340458 stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, lr} sub sp, sp, #0x10 - ldr r2, _023406D0 ; =ov29_0237CFBC + ldr r2, _023406D0 ; =FLOOR_GENERATION_STATUS mov r3, #1 mov r5, r0 strb r3, [r2, #7] @@ -9493,7 +9493,7 @@ _023406B8: add sp, sp, #0x10 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, pc} .align 2, 0 -_023406D0: .word ov29_0237CFBC +_023406D0: .word FLOOR_GENERATION_STATUS arm_func_end GenerateMaze arm_func_start GenerateMazeLine diff --git a/asm/overlay_29_02340CE4.s b/asm/overlay_29_02340CE4.s index f5c7ea4b..deefa851 100644 --- a/asm/overlay_29_02340CE4.s +++ b/asm/overlay_29_02340CE4.s @@ -104,7 +104,7 @@ _02340DF4: add r1, r1, #0x4000 mov r2, #0 bl SpawnStairs - ldr r0, _0234145C ; =ov29_0237CFBC + ldr r0, _0234145C ; =FLOOR_GENERATION_STATUS ldr r0, [r0, #0x2c] cmp r0, #0 beq _02340EC8 @@ -122,7 +122,7 @@ _02340E6C: cmp r4, r0 blt _02340E54 ldr r0, _02341458 ; =DUNGEON_PTR - ldr r1, _0234145C ; =ov29_0237CFBC + ldr r1, _0234145C ; =FLOOR_GENERATION_STATUS ldr r2, [r0] ldr r4, [r1, #0x2c] add r0, r2, #0x2c000 @@ -502,7 +502,7 @@ _0234137C: tst r0, #1 bne _0234140C _023413E8: - ldr r0, _0234145C ; =ov29_0237CFBC + ldr r0, _0234145C ; =FLOOR_GENERATION_STATUS ldrb r0, [r0, #8] cmp r0, #0 ldrneb r0, [r4, #0xc9 + MARK_NON_ENEMY_SPAWNS_OFFSET] @@ -534,7 +534,7 @@ _02341450: ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _02341458: .word DUNGEON_PTR -_0234145C: .word ov29_0237CFBC +_0234145C: .word FLOOR_GENERATION_STATUS _02341460: .word 0x0002C9E8 + MARK_NON_ENEMY_SPAWNS_OFFSET _02341464: .word 0x00012AFA + MARK_NON_ENEMY_SPAWNS_OFFSET _02341468: .word MONSTER_HOUSE_MAX_NON_MONSTER_SPAWNS @@ -603,7 +603,7 @@ _023414D4: ldreqsh r0, [r4, #0xe2 + MARK_ENEMY_SPAWNS_OFFSET] cmpeq r7, r0 beq _0234156C - ldr r0, _02341764 ; =ov29_0237CFBC + ldr r0, _02341764 ; =FLOOR_GENERATION_STATUS ldrb r0, [r0, #8] cmp r0, #0 beq _02341558 @@ -753,7 +753,7 @@ _02341754: ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 _02341760: .word DUNGEON_PTR -_02341764: .word ov29_0237CFBC +_02341764: .word FLOOR_GENERATION_STATUS _02341768: .word MONSTER_HOUSE_MAX_MONSTER_SPAWNS arm_func_end MarkEnemySpawns @@ -1318,7 +1318,7 @@ _02341EF4: cmpeq r0, r6 movne r0, #0 bne _0234216C - ldr r0, _02342178 ; =ov29_0237CFBC + ldr r0, _02342178 ; =FLOOR_GENERATION_STATUS mov r4, #0 str r4, [r0, #0x24] _02341F50: @@ -1436,7 +1436,7 @@ _023420D0: blt _02341F64 cmp r3, #0 bne _02341F50 - ldr r0, _02342178 ; =ov29_0237CFBC + ldr r0, _02342178 ; =FLOOR_GENERATION_STATUS mov r8, #0 str r4, [r0, #0x24] add r6, sp, #0 @@ -1477,7 +1477,7 @@ _0234216C: ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, pc} .align 2, 0 _02342174: .word DUNGEON_PTR -_02342178: .word ov29_0237CFBC +_02342178: .word FLOOR_GENERATION_STATUS arm_func_end StairsAlwaysReachable arm_func_start ov29_0234217C @@ -1712,7 +1712,7 @@ _023424CC: .word 0x000001C2 arm_func_start GetNextFixedRoomAction GetNextFixedRoomAction: ; 0x023424D0 - ldr r1, _02342510 ; =ov29_0237CFBC + ldr r1, _02342510 ; =FLOOR_GENERATION_STATUS ldrh r0, [r1, #0xa] cmp r0, #0 subne r0, r0, #1 @@ -1730,7 +1730,7 @@ _02342504: ldrh r0, [r1, #0xe] bx lr .align 2, 0 -_02342510: .word ov29_0237CFBC +_02342510: .word FLOOR_GENERATION_STATUS _02342514: .word HIDDEN_STAIRS_SPAWN_BLOCKED arm_func_end GetNextFixedRoomAction @@ -1787,7 +1787,7 @@ ov29_02342594: ; 0x02342594 ldr r2, _023427D8 ; =DUNGEON_PTR ldr r4, _023427DC ; =HIDDEN_STAIRS_SPAWN_BLOCKED ldr sb, [r2] - ldr r3, _023427E0 ; =ov29_0237CFBC + ldr r3, _023427E0 ; =FLOOR_GENERATION_STATUS add r2, sb, #0x12000 ldr r5, [r2, #0xaa4 + OV29_02342594_OFFSET] mov r6, #0 @@ -1957,7 +1957,7 @@ _023427D0: .align 2, 0 _023427D8: .word DUNGEON_PTR _023427DC: .word HIDDEN_STAIRS_SPAWN_BLOCKED -_023427E0: .word ov29_0237CFBC +_023427E0: .word FLOOR_GENERATION_STATUS arm_func_end ov29_02342594 arm_func_start ov29_023427E4 @@ -1970,7 +1970,7 @@ ov29_023427E4: ; 0x023427E4 mov r5, #0 mov sb, r6 mov r4, r6 - ldr r8, _02342B74 ; =ov29_0237CFBC + ldr r8, _02342B74 ; =FLOOR_GENERATION_STATUS b _0234283C _0234280C: ldr r2, [r8, #0x38] @@ -1992,7 +1992,7 @@ _02342844: mov sb, #3 mov r5, #0 mov r4, sb - ldr r8, _02342B74 ; =ov29_0237CFBC + ldr r8, _02342B74 ; =FLOOR_GENERATION_STATUS b _02342888 _02342858: ldr r2, [r8, #0x3c] @@ -2018,7 +2018,7 @@ _02342890: mov r4, #0 b _0234295C _023428A8: - ldr r0, _02342B74 ; =ov29_0237CFBC + ldr r0, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r1, [r0, #0x38] ldr r0, [r0, #0x30] sub r0, r1, r0 @@ -2028,7 +2028,7 @@ _023428A8: bl DungeonRandInt cmp r0, #0x32 bge _02342918 - ldr sb, _02342B74 ; =ov29_0237CFBC + ldr sb, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r8, [sb, #0x34] b _023428F8 _023428DC: @@ -2043,13 +2043,13 @@ _023428F8: ldr r0, [sb, #0x3c] cmp r8, r0 blt _023428DC - ldr r0, _02342B74 ; =ov29_0237CFBC + ldr r0, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r1, [r0, #0x30] add r1, r1, #1 str r1, [r0, #0x30] b _02342958 _02342918: - ldr sb, _02342B74 ; =ov29_0237CFBC + ldr sb, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r0, [sb, #0x38] sub r0, r0, #1 str r0, [sb, #0x38] @@ -2076,7 +2076,7 @@ _02342964: mov r6, #0 b _02342A20 _0234296C: - ldr r0, _02342B74 ; =ov29_0237CFBC + ldr r0, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r1, [r0, #0x3c] ldr r0, [r0, #0x34] sub r0, r1, r0 @@ -2086,7 +2086,7 @@ _0234296C: bl DungeonRandInt cmp r0, #0x32 bge _023429DC - ldr r8, _02342B74 ; =ov29_0237CFBC + ldr r8, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r4, [r8, #0x30] b _023429BC _023429A0: @@ -2101,13 +2101,13 @@ _023429BC: ldr r0, [r8, #0x38] cmp r4, r0 blt _023429A0 - ldr r0, _02342B74 ; =ov29_0237CFBC + ldr r0, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r1, [r0, #0x34] add r1, r1, #1 str r1, [r0, #0x34] b _02342A1C _023429DC: - ldr r8, _02342B74 ; =ov29_0237CFBC + ldr r8, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r0, [r8, #0x3c] sub r0, r0, #1 str r0, [r8, #0x3c] @@ -2131,7 +2131,7 @@ _02342A20: cmp r6, r5 blt _0234296C _02342A28: - ldr r4, _02342B74 ; =ov29_0237CFBC + ldr r4, _02342B74 ; =FLOOR_GENERATION_STATUS ldr r6, [r4, #0x30] b _02342A74 _02342A34: @@ -2158,7 +2158,7 @@ _02342A74: ldr r3, [r4, #0x38] cmp r6, r3 blt _02342A34 - ldr r0, _02342B74 ; =ov29_0237CFBC + ldr r0, _02342B74 ; =FLOOR_GENERATION_STATUS mov r7, #0 ldr r1, [r0, #0x30] ldr r2, [r0, #0x34] @@ -2225,7 +2225,7 @@ _02342B6C: add sp, sp, #8 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} .align 2, 0 -_02342B74: .word ov29_0237CFBC +_02342B74: .word FLOOR_GENERATION_STATUS _02342B78: .word SHOP_ITEM_CHANCES arm_func_end ov29_023427E4 @@ -2271,7 +2271,7 @@ ov29_02342BEC: ; 0x02342BEC mov r0, r5, lsl #1 mul r0, r6, r0 ldr r3, _02342C60 ; =HIDDEN_STAIRS_SPAWN_BLOCKED - ldr r2, _02342C64 ; =ov29_0237CFBC + ldr r2, _02342C64 ; =FLOOR_GENERATION_STATUS mov r1, #0 str r4, [r3, #4] strh r1, [r2, #0xa] @@ -2299,7 +2299,7 @@ _02342C50: ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, pc} .align 2, 0 _02342C60: .word HIDDEN_STAIRS_SPAWN_BLOCKED -_02342C64: .word ov29_0237CFBC +_02342C64: .word FLOOR_GENERATION_STATUS arm_func_end ov29_02342BEC arm_func_start ResetImportantSpawnPositions @@ -2335,7 +2335,7 @@ SpawnStairs: ; 0x02342C8C ldrb r1, [r6] ldrb r0, [r0] cmp r0, #0 - ldrne r0, _02342D98 ; =ov29_0237CFBC + ldrne r0, _02342D98 ; =FLOOR_GENERATION_STATUS strneh r1, [r0, #0x1c] ldrneb r1, [r6, #1] strneh r1, [r0, #0x1e] @@ -2349,7 +2349,7 @@ SpawnStairs: ; 0x02342C8C _02342D00: ldrb r2, [r6] add r0, r8, #0x8c00 - ldr r1, _02342D98 ; =ov29_0237CFBC + ldr r1, _02342D98 ; =FLOOR_GENERATION_STATUS strh r2, [r0, #0x20] ldrb r2, [r6, #1] strh r2, [r0, #0x22] @@ -2389,7 +2389,7 @@ _02342D44: ldmia sp!, {r4, r5, r6, r7, r8, pc} .align 2, 0 _02342D94: .word HIDDEN_STAIRS_SPAWN_BLOCKED -_02342D98: .word ov29_0237CFBC +_02342D98: .word FLOOR_GENERATION_STATUS arm_func_end SpawnStairs arm_func_start GetHiddenStairsType @@ -2510,7 +2510,7 @@ _02342F04: .word KECLEON_SHOP_BOOST_CHANCE_MULTIPLIER arm_func_start ResetHiddenStairsSpawn ResetHiddenStairsSpawn: ; 0x02342F08 - ldr r1, _02342F28 ; =ov29_0237CFBC + ldr r1, _02342F28 ; =FLOOR_GENERATION_STATUS mvn r2, #0 strh r2, [r1, #0x1c] ldr r0, _02342F2C ; =HIDDEN_STAIRS_SPAWN_BLOCKED @@ -2519,7 +2519,7 @@ ResetHiddenStairsSpawn: ; 0x02342F08 strb r1, [r0] bx lr .align 2, 0 -_02342F28: .word ov29_0237CFBC +_02342F28: .word FLOOR_GENERATION_STATUS _02342F2C: .word HIDDEN_STAIRS_SPAWN_BLOCKED arm_func_end ResetHiddenStairsSpawn diff --git a/asm/overlay_29_bss_02353860.s b/asm/overlay_29_bss_02353860.s new file mode 100644 index 00000000..dfa2d8cc --- /dev/null +++ b/asm/overlay_29_bss_02353860.s @@ -0,0 +1,162 @@ + .include "asm/macros.inc" + .include "overlay_29_bss_02353860.inc" + + .bss +#ifndef EUROPE + .global ov29_02353860 +ov29_02353860: + .space 0x20 +#endif + .global ov29_02353880 +ov29_02353880: + .space 0x34 + .global ov29_023538B4 +ov29_023538B4: + .space 0x1963C + .global ov29_0236CEF0 +ov29_0236CEF0: + .space 0x6FC + .global ov29_0236D5EC +ov29_0236D5EC: + .space 0x6000 + .global ov29_023735EC +ov29_023735EC: + .space 0x4 + .global ov29_023735F0 +ov29_023735F0: + .space 0x4 + .global ov29_023735F4 +ov29_023735F4: + .space 0x4 + .global ov29_023735F8 +ov29_023735F8: + .space 0x4 + .global ov29_023735FC +ov29_023735FC: + .space 0x10 + .global ov29_0237360C +ov29_0237360C: + .space 0x80 + .global ov29_0237368C +ov29_0237368C: + .space 0x4 + .global ov29_02373690 +ov29_02373690: + .space 0x9000 + .global ov29_0237C690 +ov29_0237C690: + .space 0x4 + .global ov29_0237C694 +ov29_0237C694: + .space 0x2 + .global ov29_0237C696 +ov29_0237C696: + .space 0x2 + .global ov29_0237C698 +ov29_0237C698: + .space 0xC + .global ov29_0237C6A4 +ov29_0237C6A4: + .space 0x14 + .global ov29_0237C6B8 +ov29_0237C6B8: + .space 0x1C + .global ov29_0237C6D4 +ov29_0237C6D4: + .space 0x40 + .global ov29_0237C714 +ov29_0237C714: + .space 0x40 + .global ov29_0237C754 +ov29_0237C754: + .space 0x48 + .global ov29_0237C79C +ov29_0237C79C: + .space 0xB0 + .global ov29_0237C84C +ov29_0237C84C: + .space 0x4 + .global ov29_0237C850 +ov29_0237C850: + .space 0x14 + .global ov29_0237C864 +ov29_0237C864: + .space 0x24 + .global ov29_0237C888 +ov29_0237C888: + .space 0x2 + .global ov29_0237C88A +ov29_0237C88A: + .space 0x4 + .global ov29_0237C88E +ov29_0237C88E: + .space 0x2 + .global ov29_0237C890 +ov29_0237C890: + .space 0x2 + .global ov29_0237C892 +ov29_0237C892: + .space 0x86 + .global ov29_0237C918 +ov29_0237C918: + .space 0x4 + .global ov29_0237C91C +ov29_0237C91C: + .space 0x2 + .global ov29_0237C91E +ov29_0237C91E: + .space 0x2 + .global ov29_0237C920 +ov29_0237C920: + .space 0x2 + .global ov29_0237C922 +ov29_0237C922: + .space 0x4A + .global ov29_0237C96C +ov29_0237C96C: + .space 0x8 + .global ov29_0237C974 +ov29_0237C974: + .space 0x28 + .global ov29_0237C99C +ov29_0237C99C: + .space 0x4 + .global ov29_0237C9A0 +ov29_0237C9A0: + .space 0x4 + .global ov29_0237C9A4 +ov29_0237C9A4: + .space 0x8 + .global LOADED_ATTACK_SPRITE_DATA +LOADED_ATTACK_SPRITE_DATA: + .space 0x4 + .global ov29_0237C9B0 +ov29_0237C9B0: + .space 0x8 + .global ov29_0237C9B8 +ov29_0237C9B8: + .space 0x8 + .global ov29_0237C9C0 +ov29_0237C9C0: + .space 0x1 + .global ov29_0237C9C1 +ov29_0237C9C1: + .space 0x3 + .global ov29_0237C9C4 +ov29_0237C9C4: + .space 0x1 + .global ov29_0237C9C5 +ov29_0237C9C5: + .space 0x3 + .global ov29_0237C9C8 +ov29_0237C9C8: + .space 0x1 + .global ov29_0237C9C9 +ov29_0237C9C9: + .space 0x3 + .global ov29_0237C9CC +ov29_0237C9CC: + .space 0x4 + .global AI_THROWN_ITEM_DIRECTION_IS_USED +AI_THROWN_ITEM_DIRECTION_IS_USED: + .space 0x8 diff --git a/asm/overlay_29_bss_0237CA18.s b/asm/overlay_29_bss_0237CA18.s new file mode 100644 index 00000000..ec23a8e2 --- /dev/null +++ b/asm/overlay_29_bss_0237CA18.s @@ -0,0 +1,106 @@ + .include "asm/macros.inc" + .include "overlay_29_bss_0237CA18.inc" + + .bss + .global ov29_0237CA18 +ov29_0237CA18: + .space 0x8 + .global ov29_0237CA20 +ov29_0237CA20: + .space 0x8 + .global ov29_0237CA28 +ov29_0237CA28: + .space 0x20 + .global ov29_0237CA48 +ov29_0237CA48: + .space 0x20 + .global ov29_0237CA68 +ov29_0237CA68: + .space 0x1 + .global ROLLOUT_ICE_BALL_MISSED +ROLLOUT_ICE_BALL_MISSED: + .space 0x1 + .global MULTIHIT_FATIGUE_MOVE_USED +MULTIHIT_FATIGUE_MOVE_USED: + .space 0x1 + .global TWINEEDLE_HIT_TRACKER +TWINEEDLE_HIT_TRACKER: + .space 0x1 + .global ov29_0237CA6C +ov29_0237CA6C: + .space 0x1 + .global RAPID_SPIN_BINDING_REMOVAL +RAPID_SPIN_BINDING_REMOVAL: + .space 0x3 + .global ROLLOUT_ICE_BALL_SUCCESSIVE_HITS +ROLLOUT_ICE_BALL_SUCCESSIVE_HITS: + .space 0x4 + .global ov29_0237CA74 +ov29_0237CA74: + .space 0x4 + .global MULTIHIT_MOVE_SUCCESSIVE_HITS +MULTIHIT_MOVE_SUCCESSIVE_HITS: + .space 0x4 + .global TRIPLE_KICK_SUCCESSIVE_HITS +TRIPLE_KICK_SUCCESSIVE_HITS: + .space 0x4 + .global ov29_0237CA80 +ov29_0237CA80: + .space 0x4 + .global ov29_0237CA84 +ov29_0237CA84: + .space 0x4 + .global METRONOME_NEXT_INDEX +METRONOME_NEXT_INDEX: + .space 0x4 + .global ov29_0237CA8C +ov29_0237CA8C: + .space 0x4 + .global ov29_0237CA90 +ov29_0237CA90: + .space 0x6 + .global ov29_0237CA96 +ov29_0237CA96: + .space 0xA + .global ov29_0237CAA0 +ov29_0237CAA0: + .space 0xC + .global ov29_0237CAAC +ov29_0237CAAC: + .space 0xC + .global ov29_0237CAB8 +ov29_0237CAB8: + .space 0x14 + .global ov29_0237CACC +ov29_0237CACC: + .space 0x274 + .global ov29_0237CD40 +ov29_0237CD40: + .space 0x278 + .global ov29_0237CFB8 +ov29_0237CFB8: + .space 0x3 + .global ov29_0237CFBB +ov29_0237CFBB: + .space 0x1 + .global FLOOR_GENERATION_STATUS +FLOOR_GENERATION_STATUS: + .space 0x4 + .global ov29_0237CFC0 +ov29_0237CFC0: + .space 0x3C + .global ov29_0237CFFC +ov29_0237CFFC: + .space 0x4 + .global ov29_0237D000 +ov29_0237D000: + .space 0x5800 + .global ov29_02382800 +ov29_02382800: + .space 0x4 + .global ov29_02382804 +ov29_02382804: + .space 0x8 + .global ov29_0238280C +ov29_0238280C: + .space 0x14 diff --git a/asm/overlay_29_data_023534E0.s b/asm/overlay_29_data_023534E0.s new file mode 100644 index 00000000..55401a11 --- /dev/null +++ b/asm/overlay_29_data_023534E0.s @@ -0,0 +1,171 @@ + .include "asm/macros.inc" + .include "overlay_29_data_023534E0.inc" + + .data + .global ov29_023534E0 +ov29_023534E0: + .word ov29_0234FD6C + .word ov29_0234FD28 + .global ov29_023534E8 +ov29_023534E8: + .word ov29_0234FD58 + .word ov29_0234FD38 + .global ov29_023534F0 +ov29_023534F0: + .word ov29_0234FDB8 + .word ov29_0234FDC8 + .word ov29_0234FDC0 + .word ov29_0234FD88 + .word ov29_0234FDB0 + .word ov29_0234FD98 + .word ov29_0234FDA0 + .word ov29_0234FDA8 + .word ov29_0234FD90 + .word ov29_0234FD80 + .global ov29_02353518 +ov29_02353518: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_0235351C +ov29_0235351C: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_02353524 +ov29_02353524: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_0235352C +ov29_0235352C: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353530 +ov29_02353530: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353534 +ov29_02353534: + .byte 0x00, 0x00, 0x00, 0x00 + .global DUNGEON_PTR +DUNGEON_PTR: + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353540 +ov29_02353540: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353544 +ov29_02353544: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_0235354C +ov29_0235354C: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global TOP_SCREEN_STATUS_PTR +TOP_SCREEN_STATUS_PTR: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353558 +ov29_02353558: + .byte 0x00, 0x00, 0x00, 0x00 + .global LEADER_PTR +LEADER_PTR: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353560 +ov29_02353560: + .byte 0x00, 0x00 + .global ov29_02353562 +ov29_02353562: + .byte 0x00 + .global ov29_02353563 +ov29_02353563: + .byte 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .global DUNGEON_PRNG_STATE +DUNGEON_PRNG_STATE: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 + .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global DUNGEON_PRNG_STATE_SECONDARY_VALUES +DUNGEON_PRNG_STATE_SECONDARY_VALUES: + .byte 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 + .byte 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 + .global ov29_02353598 +ov29_02353598: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_0235359C +ov29_0235359C: + .byte 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00 + .global ov29_023535A4 +ov29_023535A4: + .byte 0xFE, 0x00, 0x00, 0x00 + .global ov29_023535A8 +ov29_023535A8: + .byte 0x00, 0x00, 0x00, 0x00 + .global LOADED_ATTACK_SPRITE_FILE_INDEX +LOADED_ATTACK_SPRITE_FILE_INDEX: + .byte 0xFF, 0xFF, 0xFF, 0xFF + .global EXCL_ITEM_EFFECTS_WEATHER_ATK_SPEED_BOOST +EXCL_ITEM_EFFECTS_WEATHER_ATK_SPEED_BOOST: + .byte 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x00 + .global EXCL_ITEM_EFFECTS_WEATHER_MOVE_SPEED_BOOST +EXCL_ITEM_EFFECTS_WEATHER_MOVE_SPEED_BOOST: + .byte 0x2F, 0x30, 0x31, 0x32 + .byte 0x33, 0x34, 0x35, 0x00 + .global EXCL_ITEM_EFFECTS_WEATHER_NO_STATUS +EXCL_ITEM_EFFECTS_WEATHER_NO_STATUS: + .byte 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00 + .global ov29_023535C8 +ov29_023535C8: + .word ov29_023527E0 + .word ov29_023527E8 + .word ov29_023527E4 + .global ov29_023535D4 +ov29_023535D4: + .byte 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_023535DC +ov29_023535DC: + .byte 0x0C, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00 + .word ov29_0230D738 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x0D, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00 + .word ov29_0230D738 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 + .word ov29_0230D738 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 + .word ov29_0230D738 + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x12, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 + .word ov29_0230D76C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x11, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x15, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x16, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x17, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00 + .word ov29_0230D70C + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .word ov29_0230D704 + .byte 0x00, 0x00, 0x00, 0x00 diff --git a/asm/overlay_29_data_02353700.s b/asm/overlay_29_data_02353700.s new file mode 100644 index 00000000..f75b4116 --- /dev/null +++ b/asm/overlay_29_data_02353700.s @@ -0,0 +1,126 @@ + .include "asm/macros.inc" + .include "overlay_29_data_02353700.inc" + + .data + ; Should be in dungeon_ai_items.c, but not sure how to mark it as .data rather than .rodata or .bss. + .global AI_THROWN_ITEM_ACTION_CHOICE_COUNT +AI_THROWN_ITEM_ACTION_CHOICE_COUNT: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353700 +ov29_02353700: + .byte 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00 + .global ov29_0235370C +ov29_0235370C: + .byte 0x00, 0x00, 0x00, 0x00 + .global EXCL_ITEM_EFFECTS_EVASION_BOOST +EXCL_ITEM_EFFECTS_EVASION_BOOST: + .byte 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x00 + .global ov29_02353718 +ov29_02353718: + .byte 0x00, 0x00, 0x00, 0x00 +#if defined(EUROPE) + .byte 0xEF, 0x03, 0xF0, 0x03 + .byte 0xF1, 0x03, 0xF2, 0x03 + .byte 0xF3, 0x03 + .global ov29_02353720 +ov29_02353720: + .byte 0xF5, 0x03 + .byte 0xF7, 0x03, 0xF9, 0x03 + .byte 0xFB, 0x03, 0xFD, 0x03 + .global ov29_0235371C +ov29_0235371C: + .byte 0xF4, 0x03, 0xF6, 0x03 + .byte 0xF8, 0x03, 0xFA, 0x03 + .byte 0xFC, 0x03, 0x00, 0x00 +#elif !defined(JAPAN) + .global ov29_0235371C +ov29_0235371C: + .byte 0xF4, 0x03, 0xF4, 0x03 + .global ov29_02353720 +ov29_02353720: + .byte 0xF5, 0x03, 0xF5, 0x03 +#endif + .global DEFAULT_TILE +DEFAULT_TILE: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_0235372C +ov29_0235372C: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353730 +ov29_02353730: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_0235376C +ov29_0235376C: + .byte 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_0235377C +ov29_0235377C: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_02353784 +ov29_02353784: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global HIDDEN_STAIRS_SPAWN_BLOCKED +HIDDEN_STAIRS_SPAWN_BLOCKED: + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global FIXED_ROOM_DATA_PTR +FIXED_ROOM_DATA_PTR: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353798 +ov29_02353798: + .byte 0x00, 0x00, 0x00, 0x00 + .word ov29_02353188 + .word ov29_02353170 + .word ov29_02353128 + .word ov29_02353158 + .word ov29_02353140 + .global ov29_023537B0 +ov29_023537B0: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_023537B4 +ov29_023537B4: + .byte 0x15, 0x00, 0x16, 0x00, 0x15, 0x00, 0x16, 0x00 + .global ov29_023537BC +ov29_023537BC: + .byte 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02 + .global ov29_023537C4 +ov29_023537C4: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_023537C8 +ov29_023537C8: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_023537CC +ov29_023537CC: + .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .global ov29_023537D8 +ov29_023537D8: + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .global DUNGEON_FADES_PTR +DUNGEON_FADES_PTR: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_023537E4 +ov29_023537E4: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_023537E8 +ov29_023537E8: + .byte 0xFA, 0x00, 0xB8, 0x04 + .byte 0xD9, 0x00, 0xB5, 0x04, 0xDB, 0x00, 0xB6, 0x04, 0xDC, 0x00, 0xB4, 0x04, 0xDD, 0x00, 0xB7, 0x04 + .byte 0xDE, 0x00, 0xBE, 0x04, 0xDF, 0x00, 0xC0, 0x04, 0xE0, 0x00, 0xC1, 0x04, 0xE1, 0x00, 0xD2, 0x04 + .byte 0xE2, 0x00, 0xBD, 0x04, 0xEC, 0x00, 0xBF, 0x04, 0xEE, 0x00, 0xC5, 0x04, 0xEF, 0x00, 0xC2, 0x04 + .byte 0xF0, 0x00, 0xC3, 0x04, 0xE3, 0x00, 0xC4, 0x04, 0xF1, 0x00, 0x00, 0x00, 0xF2, 0x00, 0x00, 0x00 + .byte 0xF3, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00 + .global ov29_02353834 +ov29_02353834: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_02353838 +ov29_02353838: + .byte 0x00, 0x00, 0x00, 0x00 + .global ov29_0235383C +ov29_0235383C: + .byte 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00 + .global ov29_02353848 +ov29_02353848: + .byte 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 diff --git a/asm/overlay_29_02352A54.s b/asm/overlay_29_rodata_0234FD04.s similarity index 99% rename from asm/overlay_29_02352A54.s rename to asm/overlay_29_rodata_0234FD04.s index 1e51ee39..866e7d11 100644 --- a/asm/overlay_29_02352A54.s +++ b/asm/overlay_29_rodata_0234FD04.s @@ -1,5 +1,5 @@ .include "asm/macros.inc" - .include "overlay_29_02352A54.inc" + .include "overlay_29_rodata_0234FD04.inc" .rodata .global ov29_0234FD04 diff --git a/asm/overlay_29_0238280C.s b/asm/overlay_29_rodata_02352A6C.s similarity index 69% rename from asm/overlay_29_0238280C.s rename to asm/overlay_29_rodata_02352A6C.s index f45576b7..b8073035 100644 --- a/asm/overlay_29_0238280C.s +++ b/asm/overlay_29_rodata_02352A6C.s @@ -1,5 +1,5 @@ .include "asm/macros.inc" - .include "overlay_29_0238280C.inc" + .include "overlay_29_rodata_02352A6C.inc" .rodata .global ov29_02352A6C @@ -818,561 +818,3 @@ ov29_02353474: ov29_023534B4: .byte 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x1C, 0x05 .byte 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - - .data - .global ov29_023534E0 -ov29_023534E0: - .word ov29_0234FD6C - .word ov29_0234FD28 - .global ov29_023534E8 -ov29_023534E8: - .word ov29_0234FD58 - .word ov29_0234FD38 - .global ov29_023534F0 -ov29_023534F0: - .word ov29_0234FDB8 - .word ov29_0234FDC8 - .word ov29_0234FDC0 - .word ov29_0234FD88 - .word ov29_0234FDB0 - .word ov29_0234FD98 - .word ov29_0234FDA0 - .word ov29_0234FDA8 - .word ov29_0234FD90 - .word ov29_0234FD80 - .global ov29_02353518 -ov29_02353518: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_0235351C -ov29_0235351C: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_02353524 -ov29_02353524: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_0235352C -ov29_0235352C: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353530 -ov29_02353530: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353534 -ov29_02353534: - .byte 0x00, 0x00, 0x00, 0x00 - .global DUNGEON_PTR -DUNGEON_PTR: - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353540 -ov29_02353540: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353544 -ov29_02353544: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_0235354C -ov29_0235354C: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global TOP_SCREEN_STATUS_PTR -TOP_SCREEN_STATUS_PTR: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353558 -ov29_02353558: - .byte 0x00, 0x00, 0x00, 0x00 - .global LEADER_PTR -LEADER_PTR: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353560 -ov29_02353560: - .byte 0x00, 0x00 - .global ov29_02353562 -ov29_02353562: - .byte 0x00 - .global ov29_02353563 -ov29_02353563: - .byte 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .global DUNGEON_PRNG_STATE -DUNGEON_PRNG_STATE: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 - .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global DUNGEON_PRNG_STATE_SECONDARY_VALUES -DUNGEON_PRNG_STATE_SECONDARY_VALUES: - .byte 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 - .byte 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 - .global ov29_02353598 -ov29_02353598: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_0235359C -ov29_0235359C: - .byte 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00 - .global ov29_023535A4 -ov29_023535A4: - .byte 0xFE, 0x00, 0x00, 0x00 - .global ov29_023535A8 -ov29_023535A8: - .byte 0x00, 0x00, 0x00, 0x00 - .global LOADED_ATTACK_SPRITE_FILE_INDEX -LOADED_ATTACK_SPRITE_FILE_INDEX: - .byte 0xFF, 0xFF, 0xFF, 0xFF - .global EXCL_ITEM_EFFECTS_WEATHER_ATK_SPEED_BOOST -EXCL_ITEM_EFFECTS_WEATHER_ATK_SPEED_BOOST: - .byte 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x00 - .global EXCL_ITEM_EFFECTS_WEATHER_MOVE_SPEED_BOOST -EXCL_ITEM_EFFECTS_WEATHER_MOVE_SPEED_BOOST: - .byte 0x2F, 0x30, 0x31, 0x32 - .byte 0x33, 0x34, 0x35, 0x00 - .global EXCL_ITEM_EFFECTS_WEATHER_NO_STATUS -EXCL_ITEM_EFFECTS_WEATHER_NO_STATUS: - .byte 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x00 - .global ov29_023535C8 -ov29_023535C8: - .word ov29_023527E0 - .word ov29_023527E8 - .word ov29_023527E4 - .global ov29_023535D4 -ov29_023535D4: - .byte 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_023535DC -ov29_023535DC: - .byte 0x0C, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00 - .word ov29_0230D738 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0D, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00 - .word ov29_0230D738 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 - .word ov29_0230D738 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 - .word ov29_0230D738 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x12, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00 - .word ov29_0230D76C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x11, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x15, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x16, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x17, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00 - .word ov29_0230D70C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .word ov29_0230D704 - .byte 0x00, 0x00, 0x00, 0x00 - .global AI_THROWN_ITEM_ACTION_CHOICE_COUNT -AI_THROWN_ITEM_ACTION_CHOICE_COUNT: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353700 -ov29_02353700: - .byte 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00 - .global ov29_0235370C -ov29_0235370C: - .byte 0x00, 0x00, 0x00, 0x00 - .global EXCL_ITEM_EFFECTS_EVASION_BOOST -EXCL_ITEM_EFFECTS_EVASION_BOOST: - .byte 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x00 - .global ov29_02353718 -ov29_02353718: - .byte 0x00, 0x00, 0x00, 0x00 -#if defined(EUROPE) - .byte 0xEF, 0x03, 0xF0, 0x03 - .byte 0xF1, 0x03, 0xF2, 0x03 - .byte 0xF3, 0x03 - .global ov29_02353720 -ov29_02353720: - .byte 0xF5, 0x03 - .byte 0xF7, 0x03, 0xF9, 0x03 - .byte 0xFB, 0x03, 0xFD, 0x03 - .global ov29_0235371C -ov29_0235371C: - .byte 0xF4, 0x03, 0xF6, 0x03 - .byte 0xF8, 0x03, 0xFA, 0x03 - .byte 0xFC, 0x03, 0x00, 0x00 -#elif !defined(JAPAN) - .global ov29_0235371C -ov29_0235371C: - .byte 0xF4, 0x03, 0xF4, 0x03 - .global ov29_02353720 -ov29_02353720: - .byte 0xF5, 0x03, 0xF5, 0x03 -#endif - .global DEFAULT_TILE -DEFAULT_TILE: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_0235372C -ov29_0235372C: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353730 -ov29_02353730: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_0235376C -ov29_0235376C: - .byte 0x00, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_0235377C -ov29_0235377C: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_02353784 -ov29_02353784: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global HIDDEN_STAIRS_SPAWN_BLOCKED -HIDDEN_STAIRS_SPAWN_BLOCKED: - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global FIXED_ROOM_DATA_PTR -FIXED_ROOM_DATA_PTR: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353798 -ov29_02353798: - .byte 0x00, 0x00, 0x00, 0x00 - .word ov29_02353188 - .word ov29_02353170 - .word ov29_02353128 - .word ov29_02353158 - .word ov29_02353140 - .global ov29_023537B0 -ov29_023537B0: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_023537B4 -ov29_023537B4: - .byte 0x15, 0x00, 0x16, 0x00, 0x15, 0x00, 0x16, 0x00 - .global ov29_023537BC -ov29_023537BC: - .byte 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02 - .global ov29_023537C4 -ov29_023537C4: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_023537C8 -ov29_023537C8: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_023537CC -ov29_023537CC: - .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .global ov29_023537D8 -ov29_023537D8: - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .global DUNGEON_FADES_PTR -DUNGEON_FADES_PTR: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_023537E4 -ov29_023537E4: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_023537E8 -ov29_023537E8: - .byte 0xFA, 0x00, 0xB8, 0x04 - .byte 0xD9, 0x00, 0xB5, 0x04, 0xDB, 0x00, 0xB6, 0x04, 0xDC, 0x00, 0xB4, 0x04, 0xDD, 0x00, 0xB7, 0x04 - .byte 0xDE, 0x00, 0xBE, 0x04, 0xDF, 0x00, 0xC0, 0x04, 0xE0, 0x00, 0xC1, 0x04, 0xE1, 0x00, 0xD2, 0x04 - .byte 0xE2, 0x00, 0xBD, 0x04, 0xEC, 0x00, 0xBF, 0x04, 0xEE, 0x00, 0xC5, 0x04, 0xEF, 0x00, 0xC2, 0x04 - .byte 0xF0, 0x00, 0xC3, 0x04, 0xE3, 0x00, 0xC4, 0x04, 0xF1, 0x00, 0x00, 0x00, 0xF2, 0x00, 0x00, 0x00 - .byte 0xF3, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00 - .global ov29_02353834 -ov29_02353834: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_02353838 -ov29_02353838: - .byte 0x00, 0x00, 0x00, 0x00 - .global ov29_0235383C -ov29_0235383C: - .byte 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00 - .global ov29_02353848 -ov29_02353848: - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .bss -#ifndef EUROPE - .global ov29_02353860 -ov29_02353860: - .space 0x20 -#endif - .global ov29_02353880 -ov29_02353880: - .space 0x34 - .global ov29_023538B4 -ov29_023538B4: - .space 0x1963C - .global ov29_0236CEF0 -ov29_0236CEF0: - .space 0x6FC - .global ov29_0236D5EC -ov29_0236D5EC: - .space 0x6000 - .global ov29_023735EC -ov29_023735EC: - .space 0x4 - .global ov29_023735F0 -ov29_023735F0: - .space 0x4 - .global ov29_023735F4 -ov29_023735F4: - .space 0x4 - .global ov29_023735F8 -ov29_023735F8: - .space 0x4 - .global ov29_023735FC -ov29_023735FC: - .space 0x10 - .global ov29_0237360C -ov29_0237360C: - .space 0x80 - .global ov29_0237368C -ov29_0237368C: - .space 0x4 - .global ov29_02373690 -ov29_02373690: - .space 0x9000 - .global ov29_0237C690 -ov29_0237C690: - .space 0x4 - .global ov29_0237C694 -ov29_0237C694: - .space 0x2 - .global ov29_0237C696 -ov29_0237C696: - .space 0x2 - .global ov29_0237C698 -ov29_0237C698: - .space 0xC - .global ov29_0237C6A4 -ov29_0237C6A4: - .space 0x14 - .global ov29_0237C6B8 -ov29_0237C6B8: - .space 0x1C - .global ov29_0237C6D4 -ov29_0237C6D4: - .space 0x40 - .global ov29_0237C714 -ov29_0237C714: - .space 0x40 - .global ov29_0237C754 -ov29_0237C754: - .space 0x48 - .global ov29_0237C79C -ov29_0237C79C: - .space 0xB0 - .global ov29_0237C84C -ov29_0237C84C: - .space 0x4 - .global ov29_0237C850 -ov29_0237C850: - .space 0x14 - .global ov29_0237C864 -ov29_0237C864: - .space 0x24 - .global ov29_0237C888 -ov29_0237C888: - .space 0x2 - .global ov29_0237C88A -ov29_0237C88A: - .space 0x4 - .global ov29_0237C88E -ov29_0237C88E: - .space 0x2 - .global ov29_0237C890 -ov29_0237C890: - .space 0x2 - .global ov29_0237C892 -ov29_0237C892: - .space 0x86 - .global ov29_0237C918 -ov29_0237C918: - .space 0x4 - .global ov29_0237C91C -ov29_0237C91C: - .space 0x2 - .global ov29_0237C91E -ov29_0237C91E: - .space 0x2 - .global ov29_0237C920 -ov29_0237C920: - .space 0x2 - .global ov29_0237C922 -ov29_0237C922: - .space 0x4A - .global ov29_0237C96C -ov29_0237C96C: - .space 0x8 - .global ov29_0237C974 -ov29_0237C974: - .space 0x28 - .global ov29_0237C99C -ov29_0237C99C: - .space 0x4 - .global ov29_0237C9A0 -ov29_0237C9A0: - .space 0x4 - .global ov29_0237C9A4 -ov29_0237C9A4: - .space 0x8 - .global ov29_0237C9AC -ov29_0237C9AC: - .space 0x4 - .global ov29_0237C9B0 -ov29_0237C9B0: - .space 0x8 - .global ov29_0237C9B8 -ov29_0237C9B8: - .space 0x8 - .global ov29_0237C9C0 -ov29_0237C9C0: - .space 0x1 - .global ov29_0237C9C1 -ov29_0237C9C1: - .space 0x3 - .global ov29_0237C9C4 -ov29_0237C9C4: - .space 0x1 - .global ov29_0237C9C5 -ov29_0237C9C5: - .space 0x3 - .global ov29_0237C9C8 -ov29_0237C9C8: - .space 0x1 - .global ov29_0237C9C9 -ov29_0237C9C9: - .space 0x3 - .global ov29_0237C9CC -ov29_0237C9CC: - .space 0x4 - .global ov29_0237C9D0 -ov29_0237C9D0: - .space 0x8 - .global ov29_0237C9D8 -ov29_0237C9D8: - .space 0x20 - .global ov29_0237C9F8 -ov29_0237C9F8: - .space 0x20 - .global ov29_0237CA18 -ov29_0237CA18: - .space 0x8 - .global ov29_0237CA20 -ov29_0237CA20: - .space 0x8 - .global ov29_0237CA28 -ov29_0237CA28: - .space 0x20 - .global ov29_0237CA48 -ov29_0237CA48: - .space 0x20 - .global ov29_0237CA68 -ov29_0237CA68: - .space 0x1 - .global ov29_0237CA69 -ov29_0237CA69: - .space 0x1 - .global ov29_0237CA6A -ov29_0237CA6A: - .space 0x1 - .global ov29_0237CA6B -ov29_0237CA6B: - .space 0x1 - .global ov29_0237CA6C -ov29_0237CA6C: - .space 0x1 - .global ov29_0237CA6D -ov29_0237CA6D: - .space 0x3 - .global ov29_0237CA70 -ov29_0237CA70: - .space 0x4 - .global ov29_0237CA74 -ov29_0237CA74: - .space 0x4 - .global ov29_0237CA78 -ov29_0237CA78: - .space 0x4 - .global ov29_0237CA7C -ov29_0237CA7C: - .space 0x4 - .global ov29_0237CA80 -ov29_0237CA80: - .space 0x4 - .global ov29_0237CA84 -ov29_0237CA84: - .space 0x4 - .global ov29_0237CA88 -ov29_0237CA88: - .space 0x4 - .global ov29_0237CA8C -ov29_0237CA8C: - .space 0x4 - .global ov29_0237CA90 -ov29_0237CA90: - .space 0x6 - .global ov29_0237CA96 -ov29_0237CA96: - .space 0xA - .global ov29_0237CAA0 -ov29_0237CAA0: - .space 0xC - .global ov29_0237CAAC -ov29_0237CAAC: - .space 0xC - .global ov29_0237CAB8 -ov29_0237CAB8: - .space 0x14 - .global ov29_0237CACC -ov29_0237CACC: - .space 0x274 - .global ov29_0237CD40 -ov29_0237CD40: - .space 0x278 - .global ov29_0237CFB8 -ov29_0237CFB8: - .space 0x3 - .global ov29_0237CFBB -ov29_0237CFBB: - .space 0x1 - .global ov29_0237CFBC -ov29_0237CFBC: - .space 0x4 - .global ov29_0237CFC0 -ov29_0237CFC0: - .space 0x3C - .global ov29_0237CFFC -ov29_0237CFFC: - .space 0x4 - .global ov29_0237D000 -ov29_0237D000: - .space 0x5800 - .global ov29_02382800 -ov29_02382800: - .space 0x4 - .global ov29_02382804 -ov29_02382804: - .space 0x8 - .global ov29_0238280C -ov29_0238280C: - .space 0x14 diff --git a/include/dg_random.h b/include/dg_random.h index 3f9b77a8..f3ee8ea5 100644 --- a/include/dg_random.h +++ b/include/dg_random.h @@ -1,16 +1,18 @@ #ifndef PMDSKY_DG_RANDOM_H #define PMDSKY_DG_RANDOM_H +#include "util.h" + s32 DungeonRandInt(s32 end); s32 DungeonRandRange(s32 from, s32 to); // Returns the result of a possibly biased coin flip (a Bernoulli random variable) with some success probability p, using the dungeon PRNG. // percentChance: success percentage (100*p) // return: true with probability p, false with probability (1-p) -u8 DungeonRandOutcome__022EAB20(s32 percentChance); +bool8 DungeonRandOutcome__022EAB20(s32 percentChance); // Returns the result of a possibly biased coin flip (a Bernoulli random variable) with some success probability p, using the dungeon PRNG. // percentChance: success percentage (100*p) // return: true with probability p, false with probability (1-p) -u8 DungeonRandOutcome__022EAB50(s32 percentChance); +bool8 DungeonRandOutcome__022EAB50(s32 percentChance); #endif //PMDSKY_DG_RANDOM_H diff --git a/include/direction.h b/include/direction.h new file mode 100644 index 00000000..1f87c0b5 --- /dev/null +++ b/include/direction.h @@ -0,0 +1,21 @@ +#ifndef PMDSKY_DIRECTION_H +#define PMDSKY_DIRECTION_H + +// Direction on the dungeon grid +enum direction_id { + DIR_NONE = -1, + DIR_DOWN = 0, + DIR_DOWN_RIGHT = 1, + DIR_RIGHT = 2, + DIR_UP_RIGHT = 3, + DIR_UP = 4, + DIR_UP_LEFT = 5, + DIR_LEFT = 6, + DIR_DOWN_LEFT = 7, + DIR_CURRENT = 8, // Current direction of an entity. Used as a special value in some functions +}; + +#define DIRECTION_MASK 7 +#define NUM_DIRECTIONS 8 + +#endif //PMDSKY_DIRECTION_H \ No newline at end of file diff --git a/include/dungeon.h b/include/dungeon.h index 2046ad5c..e02fc462 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -1,8 +1,9 @@ #ifndef HEADERS_TYPES_DUNGEON_MODE_DUNGEON_H_ #define HEADERS_TYPES_DUNGEON_MODE_DUNGEON_H_ -#include "enums.h" #include "dungeon_mode.h" +#include "enums.h" +#include "item.h" #define MAX_TEAM_MEMBERS 4 #define DUNGEON_MAX_POKEMON 20 diff --git a/include/dungeon_ai_items.h b/include/dungeon_ai_items.h new file mode 100644 index 00000000..bf01382b --- /dev/null +++ b/include/dungeon_ai_items.h @@ -0,0 +1,11 @@ +#ifndef PMDSKY_DUNGEON_AI_ITEMS_H +#define PMDSKY_DUNGEON_AI_ITEMS_H + +#include "dungeon_mode.h" + +// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). +bool8 EntityIsValid__0230E8F0(struct entity *entity); +// Decides whether or not an AI should use its held item and updates its action_data fields accordingly. +void AiDecideUseItem(struct entity *pokemon); + +#endif //PMDSKY_DUNGEON_AI_ITEMS_H diff --git a/include/dungeon_mode.h b/include/dungeon_mode.h index cc84dac0..7b42e4c9 100644 --- a/include/dungeon_mode.h +++ b/include/dungeon_mode.h @@ -1,10 +1,12 @@ #ifndef PMDSKY_DUNGEON_MODE_H #define PMDSKY_DUNGEON_MODE_H -#include "util.h" +#include "direction.h" +#include "dungeon_mode_common.h" #include "enums.h" +#include "item.h" #include "graphics.h" -#include "dungeon_mode_common.h" +#include "util.h" // Used in various contexts, like with entity positions in the dungeon struct position { @@ -19,31 +21,6 @@ struct pixel_position { u32 y; }; -// Item info -struct item { - // 0x0: flags: 1-byte bitfield - //u8 flags_0x0; - bool8 f_exists : 1; // Validity flag - bool8 f_in_shop : 1; // In a Kecleon Shop - bool8 f_unpaid : 1; // Picked up from a Kecleon Shop but not paid for yet - bool8 f_sticky : 1; // Sticky - bool8 f_set : 1; // Usable by L+R - bool8 flag_unk5 : 1; - // For stolen items to recover from outlaws (has red X)? Could be for other items for other - // types of missions? (Uncertain) - bool8 f_unk_mission_item1 : 1; - // For stolen items to recover from outlaws (has red X)? Could be for other items for other - // types of missions? (Uncertain) Definitely used temporarily when sorting the items in - // storage. - bool8 f_unk_mission_item2 : 1; - // 0x1: For bag items. 0 for none, 1 if held by the leader, 2 for the second party member, etc. - u8 held_by; - // 0x2: Only for stackable items. Will be 0 if unapplicable. For Poké, this is an "amount code" - // rather than the literal amount (see MONEY_QUANTITY_TABLE) - u16 quantity; - enum item_id id; // 0x4 -}; - // Monster stat modifier info struct monster_stat_modifiers { // Stages go from 0-20 inclusive, with normal being 10 @@ -116,7 +93,6 @@ struct action_parameter { // E.g., this is the monster index when taking an action on a monster, the move index when // using a move or a union item_index value when using an item. u8 action_use_idx; - u8 field_0x1; struct position item_pos; // 0x2: Position of the item to use when using an item on the floor }; @@ -126,17 +102,19 @@ struct action_data { enum direction_id direction; // 0x2: Direction in which the action will be performed u8 field_0x3; struct action_parameter action_parameters[2]; // 0x4: Parameters for the action - s16 field_0x10; - s16 field_0x12; + // 0x10: Position of the target that the Pokémon wants throw an item at. + struct position item_target_position; }; struct sleep_class_status { - u8 sleep; // 0xBD: STATUS_SLEEP if 1 - u8 sleep_turns; // 0xBE: Turns left for the status in statuses::sleep + // 0x0: If non-zero, the corresponding status in status_sleep_id is active. + enum status_sleep_id sleep; + u8 sleep_turns; // 0x1: Turns left for the status in statuses::sleep }; struct frozen_class_status { - u8 freeze; // 0x0: STATUS_FROZEN if 1 + // 0x0: If non-zero, the corresponding status in status_frozen_id is active. + enum status_frozen_id freeze; // 0x4: Controls the animation that plays when taking damage from the constriction status. // For some reason this is initalized to 0x22 (34)? Which is the animation used by // the exclusive item Nether Veil. @@ -147,18 +125,21 @@ struct frozen_class_status { }; struct cringe_class_status { - u8 cringe; // 0x0: STATUS_CRINGE if 1 + // 0x0: If non-zero, the corresponding status in status_cringe_id is active. + enum status_cringe_id cringe; u8 cringe_turns; // 0x1: Turns left for the status in statuses::cringe }; struct bide_class_status { - u8 bide; // 0x0: STATUS_BIDE if 1 + // 0x0: If non-zero, the corresponding status in status_two_turn_id is active. + enum status_two_turn_id bide; u8 bide_turns; // 0x1: Turns left for the status in statuses::bide u8 bide_move_slot; // 0x2: Slot in the user's move list }; struct curse_class_status { - u8 curse; // 0x0: STATUS_CURSED if 1 + // 0x0: If non-zero, the corresponding status in status_curse_id is active. + enum status_curse_id curse; // 0x1: Set to monster::is_not_team_member of the attacker (the one causing the decoy status). u8 curse_applier_non_team_member_flag; // 0x2: Set to 1 on a Pokemon when inflicted with the Decoy status. diff --git a/include/dungeon_mode_common.h b/include/dungeon_mode_common.h index 743697e3..bc67a625 100644 --- a/include/dungeon_mode_common.h +++ b/include/dungeon_mode_common.h @@ -5,31 +5,31 @@ // Monster move info struct move { - // 0x0: flags0: 1-byte bitfield - u8 flags0; - /* bool8 f_exists : 1; // This move will show up in the move list */ - /* bool8 f_subsequent_in_link_chain : 1; // This move is in a link chain, but not the first move */ - /* bool8 f_enabled_for_ai : 1; // AI can use this move */ - /* bool8 f_set : 1; // Usable by L+A */ - /* bool8 f_last_used : 1; // This move was the last one used (for things like Torment?) */ - /* bool8 f_disabled : 1; // For Torment (and maybe others) */ - /* u8 flags0_unk6 : 2; */ + // 0x0: flags: 1-byte bitfield + u8 flags; + // bool8 f_exists : 1; // This move will show up in the move list + // bool8 f_subsequent_in_link_chain : 1; // This move is in a link chain, but not the first move + // bool8 f_enabled_for_ai : 1; // AI can use this move + // bool8 f_set : 1; // Usable by L+A + // bool8 f_last_used : 1; // This move was the last one used (for things like Torment?) + // bool8 f_disabled : 1; // For Torment (and maybe others) + // u8 flags_unk6 : 2; u8 field_0x1; // 0x2: flags2: 2-byte bitfield u16 flags2; - /* bool8 f_sealed : 1; // Sealed by a Seal Trap. Also prevents AI from using this move */ - /* u16 flags2_unk1 : 2; */ - /* bool8 f_consume_pp : 1; // This move will consume PP this turn */ - /* bool8 f_consume_2_pp : 1; // Consume 2 PP this turn. No effect unless f_consume_pp is set */ - /* u16 flags2_unk5 : 1; */ - /* // Consume 4 PP this turn. No effect unless f_consume_pp is set, overrides f_consume_2_pp */ - /* bool8 f_consume_4_pp : 1; */ - /* u16 flags2_unk7 : 1; */ - /* u16 flags2_unk8 : 1; */ - /* bool8 f_exclusive_item_pp_boost : 1; // A PP-boosting exclusive item is in effect */ - /* u16 flags3_unk10 : 6; */ + // bool8 f_sealed : 1; // Sealed by a Seal Trap. Also prevents AI from using this move + // u16 flags2_unk1 : 2; + // bool8 f_consume_pp : 1; // This move will consume PP this turn + // bool8 f_consume_2_pp : 1; // Consume 2 PP this turn. No effect unless f_consume_pp is set + // u16 flags2_unk5 : 1; + // // Consume 4 PP this turn. No effect unless f_consume_pp is set, overrides f_consume_2_pp + // bool8 f_consume_4_pp : 1; + // u16 flags2_unk7 : 1; + // u16 flags2_unk8 : 1; + // bool8 f_exclusive_item_pp_boost : 1; // A PP-boosting exclusive item is in effect + // u16 flags3_unk10 : 6; enum move_id id : 16; // 0x4 u8 pp; // 0x6: Current PP diff --git a/include/dungeon_util.h b/include/dungeon_util.h index bb51185a..fb2070b0 100644 --- a/include/dungeon_util.h +++ b/include/dungeon_util.h @@ -1,11 +1,8 @@ #ifndef PMDSKY_DUNGEON_UTIL_H #define PMDSKY_DUNGEON_UTIL_H -#include "dungeon.h" +#include "dungeon_mode.h" -static inline struct monster *GetEntInfo(struct entity *ent) -{ - return ent->info; -} +bool8 ShouldRunMonsterAi(struct entity *pokemon); -#endif // PMDSKY_DUNGEON_UTIL_H \ No newline at end of file +#endif //PMDSKY_DUNGEON_UTIL_H diff --git a/include/dungeon_util_1.h b/include/dungeon_util_1.h deleted file mode 100644 index 85b71f3a..00000000 --- a/include/dungeon_util_1.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef PMDSKY_DUNGEON_UTIL_1_H -#define PMDSKY_DUNGEON_UTIL_1_H - -#include "dungeon_mode.h" - -bool8 ShouldRunMonsterAi(struct entity *pokemon); - -#endif //PMDSKY_DUNGEON_UTIL_1_H diff --git a/include/dungeon_util_static.h b/include/dungeon_util_static.h new file mode 100644 index 00000000..3147cd66 --- /dev/null +++ b/include/dungeon_util_static.h @@ -0,0 +1,22 @@ +#ifndef PMDSKY_DUNGEON_UTIL_STATIC_H +#define PMDSKY_DUNGEON_UTIL_STATIC_H + +#include "dungeon.h" + +static inline struct monster *GetEntInfo(struct entity *ent) +{ + return ent->info; +} + +static inline bool8 ItemSticky(u8 flags) +{ + // Double bang is needed to match for some reason. + return !!(flags & ITEM_FLAG_STICKY); +} + +static inline bool8 ItemExists(u8 flags) +{ + return !!(flags & ITEM_FLAG_EXISTS); +} + +#endif // PMDSKY_DUNGEON_UTIL_STATIC_H \ No newline at end of file diff --git a/include/enums.h b/include/enums.h index 0eb0a488..7d5f5e12 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1,20 +1,6 @@ #ifndef PMDSKY_ENUMS_H #define PMDSKY_ENUMS_H -// Direction on the dungeon grid -enum direction_id { - DIR_NONE = -1, - DIR_DOWN = 0, - DIR_DOWN_RIGHT = 1, - DIR_RIGHT = 2, - DIR_UP_RIGHT = 3, - DIR_UP = 4, - DIR_UP_LEFT = 5, - DIR_LEFT = 6, - DIR_DOWN_LEFT = 7, - DIR_CURRENT = 8, // Current direction of an entity. Used as a special value in some functions -}; - // Terrain type for a tile enum terrain_type { TERRAIN_WALL = 0, @@ -52,1411 +38,6 @@ enum ai_objective { AI_TAKE_ITEM = 7, }; -// Item ID -enum item_id { - ITEM_NOTHING = 0, - ITEM_STICK = 1, - ITEM_IRON_THORN = 2, - ITEM_SILVER_SPIKE = 3, - ITEM_GOLD_FANG = 4, - ITEM_CACNEA_SPIKE = 5, - ITEM_CORSOLA_TWIG = 6, - ITEM_GRAVELEROCK = 7, - ITEM_GEO_PEBBLE = 8, - ITEM_GOLD_THORN = 9, - ITEM_RARE_FOSSIL = 10, - ITEM_UNNAMED_0xB = 11, - ITEM_UNNAMED_0xC = 12, - ITEM_NO_SLIP_CAP = 13, - ITEM_Y_RAY_SPECS = 14, - ITEM_GAGGLE_SPECS = 15, - ITEM_MOBILE_SCARF = 16, - ITEM_HEAL_RIBBON = 17, - ITEM_TWIST_BAND = 18, - ITEM_SCOPE_LENS = 19, - ITEM_PATSY_BAND = 20, - ITEM_NO_STICK_CAP = 21, - ITEM_PIERCE_BAND = 22, - ITEM_JOY_RIBBON = 23, - ITEM_X_RAY_SPECS = 24, - ITEM_PERSIM_BAND = 25, - ITEM_POWER_BAND = 26, - ITEM_PECHA_SCARF = 27, - ITEM_INSOMNISCOPE = 28, - ITEM_WARP_SCARF = 29, - ITEM_TIGHT_BELT = 30, - ITEM_SNEAK_SCARF = 31, - ITEM_GOLD_RIBBON = 32, - ITEM_GOGGLE_SPECS = 33, - ITEM_DIET_RIBBON = 34, - ITEM_TRAP_SCARF = 35, - ITEM_RACKET_BAND = 36, - ITEM_DEF_SCARF = 37, - ITEM_STAMINA_BAND = 38, - ITEM_PLAIN_RIBBON = 39, - ITEM_SPECIAL_BAND = 40, - ITEM_ZINC_BAND = 41, - ITEM_DETECT_BAND = 42, - ITEM_SPACE_GLOBE = 43, - ITEM_DODGE_SCARF = 44, - ITEM_BOUNCE_BAND = 45, - ITEM_CURVE_BAND = 46, - ITEM_WHIFF_SPECS = 47, - ITEM_NO_AIM_SCOPE = 48, - ITEM_LOCKON_SPECS = 49, - ITEM_MUNCH_BELT = 50, - ITEM_PASS_SCARF = 51, - ITEM_WEATHER_BAND = 52, - ITEM_FRIEND_BOW = 53, - ITEM_BEAUTY_SCARF = 54, - ITEM_SUN_RIBBON = 55, - ITEM_LUNAR_RIBBON = 56, - ITEM_GOLDEN_MASK = 57, - ITEM_AMBER_TEAR = 58, - ITEM_ICY_FLUTE = 59, - ITEM_FIERY_DRUM = 60, - ITEM_TERRA_CYMBAL = 61, - ITEM_AQUA_MONICA = 62, - ITEM_ROCK_HORN = 63, - ITEM_GRASS_CORNET = 64, - ITEM_SKY_MELODICA = 65, - ITEM_MIRACLE_CHEST = 66, - ITEM_WONDER_CHEST = 67, - ITEM_IQ_BOOSTER = 68, - ITEM_HEAL_SEED = 69, - ITEM_ORAN_BERRY = 70, - ITEM_SITRUS_BERRY = 71, - ITEM_EYEDROP_SEED = 72, - ITEM_REVIVER_SEED = 73, - ITEM_BLINKER_SEED = 74, - ITEM_DOOM_SEED = 75, - ITEM_X_EYE_SEED = 76, - ITEM_LIFE_SEED = 77, - ITEM_RAWST_BERRY = 78, - ITEM_HUNGER_SEED = 79, - ITEM_QUICK_SEED = 80, - ITEM_PECHA_BERRY = 81, - ITEM_CHERI_BERRY = 82, - ITEM_TOTTER_SEED = 83, - ITEM_SLEEP_SEED = 84, - ITEM_PLAIN_SEED = 85, - ITEM_WARP_SEED = 86, - ITEM_BLAST_SEED = 87, - ITEM_GINSENG = 88, - ITEM_JOY_SEED = 89, - ITEM_CHESTO_BERRY = 90, - ITEM_STUN_SEED = 91, - ITEM_GABITE_SCALE = 92, - ITEM_GOLDEN_SEED = 93, - ITEM_VILE_SEED = 94, - ITEM_PURE_SEED = 95, - ITEM_VIOLENT_SEED = 96, - ITEM_VANISH_SEED = 97, - ITEM_UNNAMED_0x62 = 98, - ITEM_MAX_ELIXIR = 99, - ITEM_PROTEIN = 100, - ITEM_CALCIUM = 101, - ITEM_IRON = 102, - ITEM_NECTAR = 103, - ITEM_DROPEYE_SEED = 104, - ITEM_REVISER_SEED = 105, - ITEM_SLIP_SEED = 106, - ITEM_VIA_SEED = 107, - ITEM_ZINC = 108, - ITEM_APPLE = 109, - ITEM_BIG_APPLE = 110, - ITEM_GRIMY_FOOD = 111, - ITEM_HUGE_APPLE = 112, - ITEM_UNNAMED_0x71 = 113, - ITEM_UNNAMED_0x72 = 114, - ITEM_GOLDEN_APPLE = 115, - ITEM_MIX_ELIXIR = 116, - ITEM_OREN_BERRY = 117, - ITEM_DOUGH_SEED = 118, - ITEM_WHITE_GUMMI = 119, - ITEM_RED_GUMMI = 120, - ITEM_BLUE_GUMMI = 121, - ITEM_GRASS_GUMMI = 122, - ITEM_YELLOW_GUMMI = 123, - ITEM_CLEAR_GUMMI = 124, - ITEM_ORANGE_GUMMI = 125, - ITEM_PINK_GUMMI = 126, - ITEM_BROWN_GUMMI = 127, - ITEM_SKY_GUMMI = 128, - ITEM_GOLD_GUMMI = 129, - ITEM_GREEN_GUMMI = 130, - ITEM_GRAY_GUMMI = 131, - ITEM_PURPLE_GUMMI = 132, - ITEM_ROYAL_GUMMI = 133, - ITEM_BLACK_GUMMI = 134, - ITEM_SILVER_GUMMI = 135, - ITEM_WONDER_GUMMI = 136, - ITEM_GRAVELYROCK = 137, - ITEM_UNNAMED_0x8A = 138, - ITEM_UPGRADE = 139, - ITEM_KINGS_ROCK = 140, - ITEM_THUNDERSTONE = 141, - ITEM_DEEPSEASCALE = 142, - ITEM_DEEPSEATOOTH = 143, - ITEM_SUN_STONE = 144, - ITEM_MOON_STONE = 145, - ITEM_FIRE_STONE = 146, - ITEM_WATER_STONE = 147, - ITEM_METAL_COAT = 148, - ITEM_LEAF_STONE = 149, - ITEM_DRAGON_SCALE = 150, - ITEM_LINK_CABLE = 151, - ITEM_DUBIOUS_DISC = 152, - ITEM_PROTECTOR = 153, - ITEM_REAPER_CLOTH = 154, - ITEM_RAZOR_FANG = 155, - ITEM_RAZOR_CLAW = 156, - ITEM_ELECTIRIZER = 157, - ITEM_MAGMARIZER = 158, - ITEM_OVAL_STONE = 159, - ITEM_DAWN_STONE = 160, - ITEM_SHINY_STONE = 161, - ITEM_DUSK_STONE = 162, - ITEM_CORONET_ROCK = 163, - ITEM_MOSSY_ROCK = 164, - ITEM_FROZEN_ROCK = 165, - ITEM_UNNAMED_0xA6 = 166, - ITEM_GONE_PEBBLE = 167, - ITEM_WANDER_GUMMI = 168, - ITEM_PRIZE_TICKET = 169, - ITEM_SILVER_TICKET = 170, - ITEM_GOLD_TICKET = 171, - ITEM_PRISM_TICKET = 172, - ITEM_MYSTERY_PART = 173, - ITEM_SECRET_SLAB = 174, - ITEM_UNNAMED_0xAF = 175, - ITEM_UNNAMED_0xB0 = 176, - ITEM_UNNAMED_0xB1 = 177, - ITEM_WONDER_EGG = 178, - ITEM_GRACIDEA = 179, - ITEM_SKY_GIFT = 180, - ITEM_UNNAMED_0xB5 = 181, - ITEM_KEY = 182, - ITEM_POKE = 183, - ITEM_UNNAMED_0xB8 = 184, - ITEM_UNNAMED_0xB9 = 185, - ITEM_LOST_LOOT = 186, - ITEM_TM_USED_TM = 187, - ITEM_TM_FOCUS_PUNCH = 188, - ITEM_TM_DRAGON_CLAW = 189, - ITEM_TM_WATER_PULSE = 190, - ITEM_TM_CALM_MIND = 191, - ITEM_TM_ROAR = 192, - ITEM_TM_TOXIC = 193, - ITEM_TM_HAIL = 194, - ITEM_TM_BULK_UP = 195, - ITEM_TM_BULLET_SEED = 196, - ITEM_TM_HIDDEN_POWER = 197, - ITEM_UNNAMED_0xC6 = 198, - ITEM_TM_TAUNT = 199, - ITEM_TM_ICE_BEAM = 200, - ITEM_TM_BLIZZARD = 201, - ITEM_TM_HYPER_BEAM = 202, - ITEM_TM_LIGHT_SCREEN = 203, - ITEM_TM_PROTECT = 204, - ITEM_UNNAMED_0xCD = 205, - ITEM_TM_GIGA_DRAIN = 206, - ITEM_TM_SAFEGUARD = 207, - ITEM_TM_FRUSTRATION = 208, - ITEM_TM_SOLARBEAM = 209, - ITEM_TM_IRON_TAIL = 210, - ITEM_TM_THUNDERBOLT = 211, - ITEM_TM_THUNDER = 212, - ITEM_TM_EARTHQUAKE = 213, - ITEM_TM_RETURN = 214, - ITEM_TM_DIG = 215, - ITEM_TM_PSYCHIC = 216, - ITEM_TM_SHADOW_BALL = 217, - ITEM_TM_BRICK_BREAK = 218, - ITEM_UNNAMED_0xDB = 219, - ITEM_TM_REFLECT = 220, - ITEM_TM_SHOCK_WAVE = 221, - ITEM_TM_FLAMETHROWER = 222, - ITEM_TM_SLUDGE_BOMB = 223, - ITEM_UNNAMED_0xE0 = 224, - ITEM_TM_FIRE_BLAST = 225, - ITEM_UNNAMED_0xE2 = 226, - ITEM_TM_AERIAL_ACE = 227, - ITEM_TM_TORMENT = 228, - ITEM_TM_FACADE = 229, - ITEM_TM_SECRET_POWER = 230, - ITEM_TM_REST = 231, - ITEM_TM_ATTRACT = 232, - ITEM_TM_THIEF = 233, - ITEM_TM_STEEL_WING = 234, - ITEM_TM_SKILL_SWAP = 235, - ITEM_UNNAMED_0xEC = 236, - ITEM_TM_OVERHEAT = 237, - ITEM_TM_ROOST = 238, - ITEM_TM_FOCUS_BLAST = 239, - ITEM_TM_ENERGY_BALL = 240, - ITEM_TM_FALSE_SWIPE = 241, - ITEM_TM_BRINE = 242, - ITEM_TM_FLING = 243, - ITEM_TM_CHARGE_BEAM = 244, - ITEM_TM_ENDURE = 245, - ITEM_TM_DRAGON_PULSE = 246, - ITEM_TM_DRAIN_PUNCH = 247, - ITEM_TM_WILL_O_WISP = 248, - ITEM_TM_SILVER_WIND = 249, - ITEM_TM_EMBARGO = 250, - ITEM_TM_EXPLOSION = 251, - ITEM_TM_SHADOW_CLAW = 252, - ITEM_TM_PAYBACK = 253, - ITEM_TM_RECYCLE = 254, - ITEM_TM_GIGA_IMPACT = 255, - ITEM_TM_ROCK_POLISH = 256, - ITEM_TM_WIDE_SLASH = 257, - ITEM_UNNAMED_0x102 = 258, - ITEM_UNNAMED_0x103 = 259, - ITEM_TM_VACUUM_CUT = 260, - ITEM_TM_DIVE = 261, - ITEM_TM_FLASH = 262, - ITEM_TM_STONE_EDGE = 263, - ITEM_TM_AVALANCHE = 264, - ITEM_TM_THUNDER_WAVE = 265, - ITEM_TM_GYRO_BALL = 266, - ITEM_TM_SWORDS_DANCE = 267, - ITEM_TM_STEALTH_ROCK = 268, - ITEM_TM_PSYCH_UP = 269, - ITEM_TM_CAPTIVATE = 270, - ITEM_TM_DARK_PULSE = 271, - ITEM_TM_ROCK_SLIDE = 272, - ITEM_TM_X_SCISSOR = 273, - ITEM_TM_SLEEP_TALK = 274, - ITEM_TM_NATURAL_GIFT = 275, - ITEM_TM_POISON_JAB = 276, - ITEM_TM_DREAM_EATER = 277, - ITEM_TM_GRASS_KNOT = 278, - ITEM_TM_SWAGGER = 279, - ITEM_TM_PLUCK = 280, - ITEM_TM_U_TURN = 281, - ITEM_TM_SUBSTITUTE = 282, - ITEM_TM_FLASH_CANNON = 283, - ITEM_TM_TRICK_ROOM = 284, - ITEM_TM_CUT = 285, - ITEM_TM_FLY = 286, - ITEM_TM_SURF = 287, - ITEM_TM_STRENGTH = 288, - ITEM_TM_DEFOG = 289, - ITEM_TM_ROCK_SMASH = 290, - ITEM_TM_WATERFALL = 291, - ITEM_TM_ROCK_CLIMB = 292, - ITEM_UNNAMED_0x125 = 293, - ITEM_UNNAMED_0x126 = 294, - ITEM_UNNAMED_0x127 = 295, - ITEM_UNNAMED_0x128 = 296, - ITEM_UNNAMED_0x129 = 297, - ITEM_UNNAMED_0x12A = 298, - ITEM_UNNAMED_0x12B = 299, - ITEM_UNNAMED_0x12C = 300, - ITEM_HAIL_ORB = 301, - ITEM_SUNNY_ORB = 302, - ITEM_RAINY_ORB = 303, - ITEM_EVASION_ORB = 304, - ITEM_SANDY_ORB = 305, - ITEM_ROCKY_ORB = 306, - ITEM_SNATCH_ORB = 307, - ITEM_SEE_TRAP_ORB = 308, - ITEM_MUG_ORB = 309, - ITEM_REBOUND_ORB = 310, - ITEM_LOB_ORB = 311, - ITEM_SWITCHER_ORB = 312, - ITEM_BLOWBACK_ORB = 313, - ITEM_WARP_ORB = 314, - ITEM_TRANSFER_ORB = 315, - ITEM_SLOW_ORB = 316, - ITEM_QUICK_ORB = 317, - ITEM_LUMINOUS_ORB = 318, - ITEM_PETRIFY_ORB = 319, - ITEM_STAYAWAY_ORB = 320, - ITEM_POUNCE_ORB = 321, - ITEM_TRAWL_ORB = 322, - ITEM_CLEANSE_ORB = 323, - ITEM_UNNAMED_0x144 = 324, - ITEM_DECOY_ORB = 325, - ITEM_SLUMBER_ORB = 326, - ITEM_TOTTER_ORB = 327, - ITEM_TWO_EDGE_ORB = 328, - ITEM_SILENCE_ORB = 329, - ITEM_ESCAPE_ORB = 330, - ITEM_SCANNER_ORB = 331, - ITEM_RADAR_ORB = 332, - ITEM_DROUGHT_ORB = 333, - ITEM_TRAPBUST_ORB = 334, - ITEM_ROLLCALL_ORB = 335, - ITEM_INVISIFY_ORB = 336, - ITEM_ONE_SHOT_ORB = 337, - ITEM_IDENTIFY_ORB = 338, - ITEM_UNNAMED_0x153 = 339, - ITEM_SHOCKER_ORB = 340, - ITEM_SIZEBUST_ORB = 341, - ITEM_ONE_ROOM_ORB = 342, - ITEM_FILL_IN_ORB = 343, - ITEM_TRAPPER_ORB = 344, - ITEM_UNNAMED_0x159 = 345, - ITEM_ITEMIZER_ORB = 346, - ITEM_HURL_ORB = 347, - ITEM_MOBILE_ORB = 348, - ITEM_UNNAMED_0x15D = 349, - ITEM_STAIRS_ORB = 350, - ITEM_LONGTOSS_ORB = 351, - ITEM_PIERCE_ORB = 352, - ITEM_UNNAMED_0x161 = 353, - ITEM_SPURN_ORB = 354, - ITEM_FOE_HOLD_ORB = 355, - ITEM_ALL_MACH_ORB = 356, - ITEM_FOE_FEAR_ORB = 357, - ITEM_ALL_HIT_ORB = 358, - ITEM_FOE_SEAL_ORB = 359, - ITEM_UNNAMED_0x168 = 360, - ITEM_UNNAMED_0x169 = 361, - ITEM_LINK_BOX = 362, - ITEM_UNNAMED_0x16B = 363, - ITEM_GORGEOUS_BOX_1 = 364, - ITEM_GORGEOUS_BOX_2 = 365, - ITEM_GORGEOUS_BOX_3 = 366, - ITEM_HEAVY_BOX_1 = 367, - ITEM_HEAVY_BOX_2 = 368, - ITEM_HEAVY_BOX_3 = 369, - ITEM_SHINY_BOX_1 = 370, - ITEM_SHINY_BOX_2 = 371, - ITEM_SHINY_BOX_3 = 372, - ITEM_NIFTY_BOX_1 = 373, - ITEM_NIFTY_BOX_2 = 374, - ITEM_NIFTY_BOX_3 = 375, - ITEM_DAINTY_BOX_1 = 376, - ITEM_DAINTY_BOX_2 = 377, - ITEM_DAINTY_BOX_3 = 378, - ITEM_GLITTERY_BOX_1 = 379, - ITEM_GLITTERY_BOX_2 = 380, - ITEM_GLITTERY_BOX_3 = 381, - ITEM_PRETTY_BOX_1 = 382, - ITEM_PRETTY_BOX_2 = 383, - ITEM_PRETTY_BOX_3 = 384, - ITEM_DELUXE_BOX_1 = 385, - ITEM_DELUXE_BOX_2 = 386, - ITEM_DELUXE_BOX_3 = 387, - ITEM_LIGHT_BOX_1 = 388, - ITEM_LIGHT_BOX_2 = 389, - ITEM_LIGHT_BOX_3 = 390, - ITEM_CUTE_BOX_1 = 391, - ITEM_CUTE_BOX_2 = 392, - ITEM_CUTE_BOX_3 = 393, - ITEM_HARD_BOX_1 = 394, - ITEM_HARD_BOX_2 = 395, - ITEM_HARD_BOX_3 = 396, - ITEM_SINISTER_BOX_1 = 397, - ITEM_SINISTER_BOX_2 = 398, - ITEM_SINISTER_BOX_3 = 399, - ITEM_A_STONE = 400, - ITEM_B_STONE = 401, - ITEM_C_STONE = 402, - ITEM_D_STONE = 403, - ITEM_E_STONE = 404, - ITEM_F_STONE = 405, - ITEM_G_STONE = 406, - ITEM_H_STONE = 407, - ITEM_I_STONE = 408, - ITEM_J_STONE = 409, - ITEM_K_STONE = 410, - ITEM_L_STONE = 411, - ITEM_M_STONE = 412, - ITEM_N_STONE = 413, - ITEM_O_STONE = 414, - ITEM_P_STONE = 415, - ITEM_Q_STONE = 416, - ITEM_R_STONE = 417, - ITEM_S_STONE = 418, - ITEM_T_STONE = 419, - ITEM_U_STONE = 420, - ITEM_V_STONE = 421, - ITEM_W_STONE = 422, - ITEM_X_STONE = 423, - ITEM_Y_STONE = 424, - ITEM_Z_STONE = 425, - ITEM_EXCLAMATION_STONE = 426, - ITEM_QUESTION_STONE = 427, - ITEM_SILVER_BOW = 428, - ITEM_BROWN_BOW = 429, - ITEM_RED_BOW = 430, - ITEM_PINK_BOW = 431, - ITEM_ORANGE_BOW = 432, - ITEM_YELLOW_BOW = 433, - ITEM_LIME_BOW = 434, - ITEM_GREEN_BOW = 435, - ITEM_VIRIDIAN_BOW = 436, - ITEM_MINTY_BOW = 437, - ITEM_SKY_BLUE_BOW = 438, - ITEM_BLUE_BOW = 439, - ITEM_COBALT_BOW = 440, - ITEM_PURPLE_BOW = 441, - ITEM_VIOLET_BOW = 442, - ITEM_FUCHSIA_BOW = 443, - ITEM_PRISM_RUFF = 444, - ITEM_AQUA_COLLAR = 445, - ITEM_VOLT_COLLAR = 446, - ITEM_FIRE_COLLAR = 447, - ITEM_LIGHT_COLLAR = 448, - ITEM_DUSK_COLLAR = 449, - ITEM_VIRID_COLLAR = 450, - ITEM_ICY_COLLAR = 451, - ITEM_PEP_SASH = 452, - ITEM_COUNTER_RUFF = 453, - ITEM_VICTORY_BELT = 454, - ITEM_POWER_BANGLE = 455, - ITEM_THUNDERSHARD = 456, - ITEM_FALLEN_STAR = 457, - ITEM_FLUFF_DUST = 458, - ITEM_EGG_SHARD = 459, - ITEM_HEROIC_MEDAL = 460, - ITEM_CHIC_SHARD = 461, - ITEM_YELLOW_JEWEL = 462, - ITEM_RED_JEWEL = 463, - ITEM_BLUE_JEWEL = 464, - ITEM_LAUGH_DUST = 465, - ITEM_GUARD_SAND = 466, - ITEM_PURPLE_JEWEL = 467, - ITEM_WHITE_JEWEL = 468, - ITEM_BRAVE_DUST = 469, - ITEM_HEAL_DEW = 470, - ITEM_MARINE_CACHE = 471, - ITEM_FREEZE_VEIL = 472, - ITEM_THUNDER_VEIL = 473, - ITEM_FIRE_VEIL = 474, - ITEM_HAVOC_ROBE = 475, - ITEM_LIFE_RING = 476, - ITEM_BOLT_FANG = 477, - ITEM_FLARE_FANG = 478, - ITEM_AQUA_MANTLE = 479, - ITEM_SILVER_VEIL = 480, - ITEM_RAINBOW_VEIL = 481, - ITEM_CHRONO_VEIL = 482, - ITEM_ROCK_SASH = 483, - ITEM_ICE_SASH = 484, - ITEM_STEEL_SASH = 485, - ITEM_HEART_BROOCH = 486, - ITEM_EON_VEIL = 487, - ITEM_SEABED_VEIL = 488, - ITEM_TERRA_RING = 489, - ITEM_SKYHIGH_VEIL = 490, - ITEM_WISH_MANTLE = 491, - ITEM_REVIVE_ROBE = 492, - ITEM_SHADOW_VEIL = 493, - ITEM_PLASMA_VEIL = 494, - ITEM_EDIFY_ROBE = 495, - ITEM_CHARITY_ROBE = 496, - ITEM_HOPE_ROBE = 497, - ITEM_TIME_SHIELD = 498, - ITEM_AIR_BLADE = 499, - ITEM_SEARING_RING = 500, - ITEM_ANCIENT_RING = 501, - ITEM_NETHER_VEIL = 502, - ITEM_LUNAR_VEIL = 503, - ITEM_TIDAL_CAPE = 504, - ITEM_ECLIPSE_ROBE = 505, - ITEM_WHITE_SILK = 506, - ITEM_NORMAL_DUST = 507, - ITEM_WHITE_GEM = 508, - ITEM_JOY_GLOBE = 509, - ITEM_RED_SILK = 510, - ITEM_FIRE_DUST = 511, - ITEM_FIERY_GEM = 512, - ITEM_FIERY_GLOBE = 513, - ITEM_BLUE_SILK = 514, - ITEM_WATER_DUST = 515, - ITEM_AQUA_GEM = 516, - ITEM_AQUA_GLOBE = 517, - ITEM_GRASS_SILK = 518, - ITEM_GRASS_DUST = 519, - ITEM_GRASS_GEM = 520, - ITEM_SOOTHE_GLOBE = 521, - ITEM_YELLOW_SILK = 522, - ITEM_THUNDER_DUST = 523, - ITEM_THUNDER_GEM = 524, - ITEM_VOLT_GLOBE = 525, - ITEM_CLEAR_SILK = 526, - ITEM_ICY_DUST = 527, - ITEM_ICY_GEM = 528, - ITEM_ICY_GLOBE = 529, - ITEM_ORANGE_SILK = 530, - ITEM_COURAGE_DUST = 531, - ITEM_FIGHT_GEM = 532, - ITEM_POWER_GLOBE = 533, - ITEM_PINK_SILK = 534, - ITEM_POISON_DUST = 535, - ITEM_POISON_GEM = 536, - ITEM_POISON_GLOBE = 537, - ITEM_BROWN_SILK = 538, - ITEM_GROUND_DUST = 539, - ITEM_EARTH_GEM = 540, - ITEM_TERRA_GLOBE = 541, - ITEM_SKY_SILK = 542, - ITEM_SKY_DUST = 543, - ITEM_SKY_GEM = 544, - ITEM_SKY_GLOBE = 545, - ITEM_GOLD_SILK = 546, - ITEM_PSYCHE_DUST = 547, - ITEM_PSYCHE_GEM = 548, - ITEM_PSYCHE_GLOBE = 549, - ITEM_GREEN_SILK = 550, - ITEM_WONDER_DUST = 551, - ITEM_GUARD_GEM = 552, - ITEM_DEFEND_GLOBE = 553, - ITEM_GRAY_SILK = 554, - ITEM_ROCK_DUST = 555, - ITEM_STONE_GEM = 556, - ITEM_ROCK_GLOBE = 557, - ITEM_PURPLE_SILK = 558, - ITEM_SHADY_DUST = 559, - ITEM_SHADOW_GEM = 560, - ITEM_NETHER_GLOBE = 561, - ITEM_ROYAL_SILK = 562, - ITEM_DRAGON_DUST = 563, - ITEM_DRAGON_GEM = 564, - ITEM_DRAGON_GLOBE = 565, - ITEM_BLACK_SILK = 566, - ITEM_DARK_DUST = 567, - ITEM_DARK_GEM = 568, - ITEM_DUSK_GLOBE = 569, - ITEM_IRON_SILK = 570, - ITEM_STEEL_DUST = 571, - ITEM_METAL_GEM = 572, - ITEM_STEEL_GLOBE = 573, - ITEM_BULBA_CLAW = 574, - ITEM_BULBA_FANG = 575, - ITEM_GRASS_GUARD = 576, - ITEM_LEAFY_TIE = 577, - ITEM_IVY_CLAW = 578, - ITEM_IVY_FANG = 579, - ITEM_IVY_CREST = 580, - ITEM_PLANT_TORC = 581, - ITEM_VENUS_CLAW = 582, - ITEM_VENUS_FANG = 583, - ITEM_VENUS_SEAL = 584, - ITEM_SOLAR_SASH = 585, - ITEM_CHAR_CLAW = 586, - ITEM_CHAR_FANG = 587, - ITEM_FIERY_HEART = 588, - ITEM_HEAT_ARMLET = 589, - ITEM_CHARME_CLAW = 590, - ITEM_CHARME_FANG = 591, - ITEM_CHARME_CREST = 592, - ITEM_KINDLE_SCARF = 593, - ITEM_CHARIZ_CLAW = 594, - ITEM_CHARIZ_FANG = 595, - ITEM_CHARIZ_SEAL = 596, - ITEM_FLAME_BANGLE = 597, - ITEM_SQUIRT_FOAM = 598, - ITEM_SQUIRT_CARD = 599, - ITEM_WATER_GUARD = 600, - ITEM_AQUA_TIE = 601, - ITEM_WARTOR_CLAW = 602, - ITEM_WARTOR_FANG = 603, - ITEM_WARTOR_CREST = 604, - ITEM_BUBBLEBANGLE = 605, - ITEM_BLASTO_CLAW = 606, - ITEM_BLASTO_CARD = 607, - ITEM_BLASTO_SEAL = 608, - ITEM_HYDRO_BAND = 609, - ITEM_PICHU_HAIR = 610, - ITEM_PICHU_CARD = 611, - ITEM_EXPRESS_TAG = 612, - ITEM_SHOCKER_CAPE = 613, - ITEM_PIKACHU_HAIR = 614, - ITEM_PIKACHU_CARD = 615, - ITEM_VOLT_CHARM = 616, - ITEM_VOLT_TORC = 617, - ITEM_RAICHU_HAIR = 618, - ITEM_RAICHU_CARD = 619, - ITEM_RAICHU_CREST = 620, - ITEM_ZAPPER_SCARF = 621, - ITEM_MEOWTH_CLAW = 622, - ITEM_MEOWTH_FANG = 623, - ITEM_COIN_CHARM = 624, - ITEM_BLING_RUFF = 625, - ITEM_PERSIAN_CLAW = 626, - ITEM_PERSIAN_FANG = 627, - ITEM_INSIGHT_ROCK = 628, - ITEM_NOBLE_SCARF = 629, - ITEM_CHIKO_CLAW = 630, - ITEM_CHIKO_CARD = 631, - ITEM_DAWN_JEWEL = 632, - ITEM_FRESH_BOW = 633, - ITEM_BAYLEEF_CLAW = 634, - ITEM_BAYLEEF_CARD = 635, - ITEM_BAYLEEF_SEAL = 636, - ITEM_SPICE_BOW = 637, - ITEM_MEGANI_CLAW = 638, - ITEM_MEGANI_CARD = 639, - ITEM_SHINY_CHARM = 640, - ITEM_BRIGHT_VEIL = 641, - ITEM_CYNDA_HAIR = 642, - ITEM_CYNDA_CLAW = 643, - ITEM_BLAZING_ROCK = 644, - ITEM_STORM_SASH = 645, - ITEM_QUILA_HAIR = 646, - ITEM_QUILA_CARD = 647, - ITEM_QUILA_CREST = 648, - ITEM_VOLCANO_TORC = 649, - ITEM_TYPHLO_GASP = 650, - ITEM_TYPHLO_FANG = 651, - ITEM_TYPHLO_SEAL = 652, - ITEM_BLAST_BANGLE = 653, - ITEM_TOTODI_DEW = 654, - ITEM_TOTODI_FANG = 655, - ITEM_WATER_HEART = 656, - ITEM_WASH_BOW = 657, - ITEM_CROCO_FANG = 658, - ITEM_CROCO_CARD = 659, - ITEM_SWIRL_ROCK = 660, - ITEM_ANGER_SCARF = 661, - ITEM_FERAL_CLAW = 662, - ITEM_FERAL_FANG = 663, - ITEM_FERAL_CREST = 664, - ITEM_HYDRO_JAW = 665, - ITEM_TREECK_THORN = 666, - ITEM_TREECK_CARD = 667, - ITEM_FOREST_ORE = 668, - ITEM_GUARD_RING = 669, - ITEM_GROVY_SHOOT = 670, - ITEM_GROVY_CARD = 671, - ITEM_JUNGLE_TAG = 672, - ITEM_GRASS_BLADE = 673, - ITEM_SCEPT_CLAW = 674, - ITEM_SCEPT_CARD = 675, - ITEM_SCEPT_SEAL = 676, - ITEM_DRAIN_BANGLE = 677, - ITEM_TORCHIC_HAIR = 678, - ITEM_TORCHIC_CARD = 679, - ITEM_HOT_PEBBLE = 680, - ITEM_FIRE_CAPE = 681, - ITEM_COMBUS_SWEAT = 682, - ITEM_COMBUS_CLAW = 683, - ITEM_CHARGE_TAG = 684, - ITEM_GUTSY_BAND = 685, - ITEM_BLAZI_CLAW = 686, - ITEM_BLAZI_CARD = 687, - ITEM_BLAZI_SEAL = 688, - ITEM_BLAZE_TORC = 689, - ITEM_MUDKIP_MUD = 690, - ITEM_MUDKIP_CARD = 691, - ITEM_MUD_JEWEL = 692, - ITEM_SPEED_SCARF = 693, - ITEM_MARSH_MUD = 694, - ITEM_MARSH_CARD = 695, - ITEM_MARSH_CREST = 696, - ITEM_MARSH_TORC = 697, - ITEM_SWAMP_MUD = 698, - ITEM_SWAMP_CARD = 699, - ITEM_SWAMP_SEAL = 700, - ITEM_SWAMP_BANGLE = 701, - ITEM_SKITTY_FANG = 702, - ITEM_SKITTY_CARD = 703, - ITEM_SMILE_PEBBLE = 704, - ITEM_HEAL_PENDANT = 705, - ITEM_DELCAT_HAIR = 706, - ITEM_DELCAT_FANG = 707, - ITEM_PRIM_PEBBLE = 708, - ITEM_GUARD_COLLAR = 709, - ITEM_LUCKY_LEAF = 710, - ITEM_TURTWIG_CARD = 711, - ITEM_SPROUT_ROCK = 712, - ITEM_LEAFY_HAT = 713, - ITEM_GROTLE_TWIG = 714, - ITEM_GROTLE_CLAW = 715, - ITEM_GROTLE_CREST = 716, - ITEM_WOODY_SCARF = 717, - ITEM_TORT_CLAW = 718, - ITEM_TORT_HORN = 719, - ITEM_TORT_SEAL = 720, - ITEM_FOREST_TORC = 721, - ITEM_CHIM_HAIR = 722, - ITEM_CHIM_FANG = 723, - ITEM_NIMBLE_CHARM = 724, - ITEM_EMBER_CAP = 725, - ITEM_MONFER_HAIR = 726, - ITEM_MONFER_FANG = 727, - ITEM_MONFER_CREST = 728, - ITEM_BURST_SASH = 729, - ITEM_INFERN_HAIR = 730, - ITEM_INFERN_FANG = 731, - ITEM_INFERN_SEAL = 732, - ITEM_BLAZING_RUFF = 733, - ITEM_PIPLUP_FOAM = 734, - ITEM_PIPLUP_CARD = 735, - ITEM_SEA_ORE = 736, - ITEM_WATER_CAPE = 737, - ITEM_PRIN_FOAM = 738, - ITEM_PRIN_CARD = 739, - ITEM_PRIN_CREST = 740, - ITEM_AQUA_BLADE = 741, - ITEM_EMPOL_CLAW = 742, - ITEM_EMPOL_HORN = 743, - ITEM_EMPOL_SEAL = 744, - ITEM_MARINE_CROWN = 745, - ITEM_MUNCH_DROOL = 746, - ITEM_MUNCH_CLAW = 747, - ITEM_TUMMY_CHARM = 748, - ITEM_GLUTTON_CAPE = 749, - ITEM_SNORLAX_GASP = 750, - ITEM_SNORLAX_FANG = 751, - ITEM_VALOR_CHARM = 752, - ITEM_GLEE_SCARF = 753, - ITEM_SCYTHER_FANG = 754, - ITEM_SCYTHER_CARD = 755, - ITEM_AMBUSH_ROCK = 756, - ITEM_STRIKE_RUFF = 757, - ITEM_SCIZOR_WING = 758, - ITEM_SCIZOR_CARD = 759, - ITEM_STEEL_CHARM = 760, - ITEM_RED_ARMLET = 761, - ITEM_LAPRAS_SONG = 762, - ITEM_LAPRAS_CARD = 763, - ITEM_WAVY_CHARM = 764, - ITEM_MYSTIC_SCARF = 765, - ITEM_EEVEE_TAIL = 766, - ITEM_EEVEE_CARD = 767, - ITEM_EVOLVE_CHARM = 768, - ITEM_EEVEE = 769, - ITEM_CLEFFA_DEW = 770, - ITEM_CLEFFA_CARD = 771, - ITEM_STARRY_ORE = 772, - ITEM_COMET_RING = 773, - ITEM_CLEF_CLAW = 774, - ITEM_CLEF_FANG = 775, - ITEM_MOON_JEWEL = 776, - ITEM_MOON_SCARF = 777, - ITEM_CLEFA_CLAW = 778, - ITEM_CLEFA_CARD = 779, - ITEM_MOON_ROCK = 780, - ITEM_FAIRY_BOW = 781, - ITEM_IGGLY_DEW = 782, - ITEM_IGGLY_CARD = 783, - ITEM_BOUNCY_CHARM = 784, - ITEM_PRETTY_BOW = 785, - ITEM_JIGGLY_SONG = 786, - ITEM_JIGGLY_CARD = 787, - ITEM_SLUMBER_ROCK = 788, - ITEM_SNOOZE_RING = 789, - ITEM_WIGGLY_HAIR = 790, - ITEM_WIGGLY_CARD = 791, - ITEM_BUDDY_ROCK = 792, - ITEM_FRIEND_TORC = 793, - ITEM_TOGEPI_DEW = 794, - ITEM_TOGEPI_CARD = 795, - ITEM_PURE_HEART = 796, - ITEM_ANGEL_SCARF = 797, - ITEM_TOGETIC_WING = 798, - ITEM_TOGETIC_CARD = 799, - ITEM_HAPPY_ROCK = 800, - ITEM_LUCK_BROOCH = 801, - ITEM_TOGEK_WING = 802, - ITEM_TOGEK_CARD = 803, - ITEM_OVATION_ROCK = 804, - ITEM_GLITTER_ROBE = 805, - ITEM_SNEASEL_CLAW = 806, - ITEM_SNEASEL_CARD = 807, - ITEM_DUSK_JEWEL = 808, - ITEM_CRUEL_RING = 809, - ITEM_WEAVILE_CLAW = 810, - ITEM_WEAVILE_FANG = 811, - ITEM_VILE_TAG = 812, - ITEM_RUIN_ARMLET = 813, - ITEM_TEDDI_CLAW = 814, - ITEM_TEDDI_CARD = 815, - ITEM_HONEY_ROCK = 816, - ITEM_HEAL_SCARF = 817, - ITEM_URSA_CLAW = 818, - ITEM_URSA_FANG = 819, - ITEM_CALMING_ROCK = 820, - ITEM_HIBER_SCARF = 821, - ITEM_TYRO_SWEAT = 822, - ITEM_TYRO_CARD = 823, - ITEM_MUSCLE_CHARM = 824, - ITEM_TYROGUE = 825, - ITEM_SMOOCH_SONG = 826, - ITEM_SMOOCH_CARD = 827, - ITEM_KISS_CHARM = 828, - ITEM_HEART_TIARA = 829, - ITEM_JYNX_SONG = 830, - ITEM_JYNX_CARD = 831, - ITEM_FROZEN_ORE = 832, - ITEM_RUIN_SCARF = 833, - ITEM_ELEKID_CLAW = 834, - ITEM_ELEKID_CARD = 835, - ITEM_JOLT_CHARM = 836, - ITEM_CURRENT_RING = 837, - ITEM_ELECTA_CLAW = 838, - ITEM_ELECTA_FANG = 839, - ITEM_CHARGE_SEAL = 840, - ITEM_VOLT_BANGLE = 841, - ITEM_ELECTI_CLAW = 842, - ITEM_ELECTI_CARD = 843, - ITEM_VOLTAIC_ROCK = 844, - ITEM_VOLTAIC_BAND = 845, - ITEM_MAGBY_CLAW = 846, - ITEM_MAGBY_CARD = 847, - ITEM_EMBER_JEWEL = 848, - ITEM_COAL_RING = 849, - ITEM_MAGMAR_CLAW = 850, - ITEM_MAGMAR_CARD = 851, - ITEM_ERUPT_ORE = 852, - ITEM_MAGMA_SCARF = 853, - ITEM_MAGMOR_CLAW = 854, - ITEM_MAGMOR_CARD = 855, - ITEM_VULCAN_ROCK = 856, - ITEM_BURNING_TORC = 857, - ITEM_AZURI_DEW = 858, - ITEM_AZURI_CARD = 859, - ITEM_FOUNT_CHARM = 860, - ITEM_WATER_FLOAT = 861, - ITEM_MARILL_DEW = 862, - ITEM_MARILL_CARD = 863, - ITEM_SURFER_ROCK = 864, - ITEM_BRINE_SCARF = 865, - ITEM_AZUMA_DEW = 866, - ITEM_AZUMA_CARD = 867, - ITEM_STREAM_CHARM = 868, - ITEM_DOTTED_SCARF = 869, - ITEM_PLUSLE_TAIL = 870, - ITEM_PLUSLE_CARD = 871, - ITEM_CHEER_ROCK = 872, - ITEM_PULSE_BOW = 873, - ITEM_MINUN_TAIL = 874, - ITEM_MINUN_CARD = 875, - ITEM_VOLT_HEART = 876, - ITEM_SPARK_TIE = 877, - ITEM_CAST_DEW = 878, - ITEM_CAST_CARD = 879, - ITEM_CLOUD_ROCK = 880, - ITEM_WEATHER_CAPE = 881, - ITEM_WYNAUT_TAIL = 882, - ITEM_WYNAUT_CARD = 883, - ITEM_GRIN_CHARM = 884, - ITEM_CHEERY_SCARF = 885, - ITEM_WOBBU_SWEAT = 886, - ITEM_WOBBU_CARD = 887, - ITEM_ENDURE_ROCK = 888, - ITEM_SUFFER_SCARF = 889, - ITEM_BIDOOF_TOOTH = 890, - ITEM_BIDOOF_CARD = 891, - ITEM_FALL_CHARM = 892, - ITEM_STOLID_SCARF = 893, - ITEM_BIBA_TOOTH = 894, - ITEM_BIBA_CARD = 895, - ITEM_RIVER_CHARM = 896, - ITEM_DAM_SCARF = 897, - ITEM_SHINX_CLAW = 898, - ITEM_SHINX_FANG = 899, - ITEM_FLASH_TAG = 900, - ITEM_ENERGY_SCARF = 901, - ITEM_LUXIO_CLAW = 902, - ITEM_LUXIO_FANG = 903, - ITEM_SPARK_TAG = 904, - ITEM_SPARK_SCARF = 905, - ITEM_LUXRAY_CLAW = 906, - ITEM_LUXRAY_FANG = 907, - ITEM_GLARE_TAG = 908, - ITEM_GLARE_SASH = 909, - ITEM_PACHI_TOOTH = 910, - ITEM_PACHI_CARD = 911, - ITEM_ROUSE_CHARM = 912, - ITEM_MIRACLE_BOW = 913, - ITEM_BUIZEL_FANG = 914, - ITEM_BUIZEL_CARD = 915, - ITEM_SWIMMER_ROCK = 916, - ITEM_SCREW_TORC = 917, - ITEM_FLOAT_FANG = 918, - ITEM_FLOAT_CARD = 919, - ITEM_RESCUE_ROCK = 920, - ITEM_FLOAT_AID = 921, - ITEM_DRIFLOO_GASP = 922, - ITEM_DRIFLOO_CARD = 923, - ITEM_WIND_HEART = 924, - ITEM_DRAFT_RING = 925, - ITEM_DRIFBLI_GASP = 926, - ITEM_DRIFBLI_CARD = 927, - ITEM_EASY_CHARM = 928, - ITEM_BREEZE_SCARF = 929, - ITEM_CHERUBI_SEED = 930, - ITEM_CHERUBI_CARD = 931, - ITEM_CUTE_ORE = 932, - ITEM_CHARM_BOW = 933, - ITEM_CHERRIM_DEW = 934, - ITEM_CHERRIM_CARD = 935, - ITEM_SWEET_AROMA = 936, - ITEM_PETAL_DRESS = 937, - ITEM_BONSLY_DEW = 938, - ITEM_BONSLY_CARD = 939, - ITEM_ARID_TAG = 940, - ITEM_TEARY_CAPE = 941, - ITEM_SUDO_SWEAT = 942, - ITEM_SUDO_CARD = 943, - ITEM_DRAIN_ROCK = 944, - ITEM_FAKE_TORC = 945, - ITEM_JUNIOR_BEAM = 946, - ITEM_JUNIOR_CARD = 947, - ITEM_MIMIC_PEBBLE = 948, - ITEM_COPY_MASK = 949, - ITEM_MIME_KEY = 950, - ITEM_MIME_CARD = 951, - ITEM_BULWARK_ROCK = 952, - ITEM_BARRIER_BOW = 953, - ITEM_HAPPINY_DEW = 954, - ITEM_HAPPINY_CARD = 955, - ITEM_PLAY_TAG = 956, - ITEM_NURTURE_CAPE = 957, - ITEM_CHANSEY_SONG = 958, - ITEM_CHANSEY_CARD = 959, - ITEM_LUCKY_CHARM = 960, - ITEM_LUCKY_SCARF = 961, - ITEM_BLISSEY_SONG = 962, - ITEM_BLISSEY_CARD = 963, - ITEM_AMITY_ROCK = 964, - ITEM_FAITH_RING = 965, - ITEM_GIBLE_FANG = 966, - ITEM_GIBLE_CARD = 967, - ITEM_DRAGON_JEWEL = 968, - ITEM_DRAGON_TIE = 969, - ITEM_GABITE_CLAW = 970, - ITEM_GABITE_FANG = 971, - ITEM_STAR_ROCK = 972, - ITEM_METEOR_TORC = 973, - ITEM_GAR_CLAW = 974, - ITEM_GAR_FANG = 975, - ITEM_SPEED_TAG = 976, - ITEM_MACH_SCARF = 977, - ITEM_RIOLU_TAIL = 978, - ITEM_RIOLU_CARD = 979, - ITEM_VALIANT_ROCK = 980, - ITEM_EMIT_RING = 981, - ITEM_LUCARIO_FANG = 982, - ITEM_LUCARIO_CARD = 983, - ITEM_PLEDGE_ROCK = 984, - ITEM_RAVAGE_RING = 985, - ITEM_MANTYKE_BEAM = 986, - ITEM_MANTYKE_CARD = 987, - ITEM_WAFT_ROCK = 988, - ITEM_OCEAN_BOW = 989, - ITEM_MANTINE_FOAM = 990, - ITEM_MANTINE_CARD = 991, - ITEM_SUNSET_ROCK = 992, - ITEM_HORIZON_BOW = 993, - ITEM_PHIONE_SONG = 994, - ITEM_PHIONE_CARD = 995, - ITEM_WAVE_JEWEL = 996, - ITEM_RIPPLE_CAPE = 997, - ITEM_VULPIX_TAIL = 998, - ITEM_VULPIX_CARD = 999, - ITEM_VULPIX_TAG = 1000, - ITEM_GLOWING_BOW = 1001, - ITEM_NINE_HAIR = 1002, - ITEM_NINE_CARD = 1003, - ITEM_NINE_SEAL = 1004, - ITEM_AFIRE_COLLAR = 1005, - ITEM_PHANPY_CLAW = 1006, - ITEM_PHANPY_CARD = 1007, - ITEM_PHANPY_TAG = 1008, - ITEM_VALUE_RUFF = 1009, - ITEM_DONPHAN_FANG = 1010, - ITEM_DONPHAN_CARD = 1011, - ITEM_DON_CREST = 1012, - ITEM_ARMOR_SCARF = 1013, - ITEM_CATER_BELT = 1014, - ITEM_DEFENSE_BOW = 1015, - ITEM_GLITTERY_BOW = 1016, - ITEM_WEEDLE_BOW = 1017, - ITEM_KAKUNA_SCARF = 1018, - ITEM_CHARGE_SCARF = 1019, - ITEM_PIDGEY_BOW = 1020, - ITEM_PIDGEO_SCARF = 1021, - ITEM_PIDGEOT_TORC = 1022, - ITEM_RATTA_SCARF = 1023, - ITEM_OVERCOME_BOW = 1024, - ITEM_QUIRKY_BOW = 1025, - ITEM_WING_SCARF = 1026, - ITEM_LEASH_BOW = 1027, - ITEM_SHOCK_RUFF = 1028, - ITEM_SAND_SCARF = 1029, - ITEM_SANDY_TORC = 1030, - ITEM_POINTY_SCARF = 1031, - ITEM_RETURN_SCARF = 1032, - ITEM_IMPACT_TORC = 1033, - ITEM_HALVE_SCARF = 1034, - ITEM_THORNY_SCARF = 1035, - ITEM_KING_SASH = 1036, - ITEM_DODGE_BOW = 1037, - ITEM_ABSORB_SCARF = 1038, - ITEM_ODD_BOW = 1039, - ITEM_GUARD_HAT = 1040, - ITEM_AROMA_SCARF = 1041, - ITEM_MOVING_SCARF = 1042, - ITEM_FIRM_HAT = 1043, - ITEM_GAZE_GOGGLES = 1044, - ITEM_VENOMOTH_BOW = 1045, - ITEM_DIGLETT_HAT = 1046, - ITEM_DUGTRIO_BOW = 1047, - ITEM_PSYDUCK_HAT = 1048, - ITEM_PADDLE_SCARF = 1049, - ITEM_MANKEY_TORC = 1050, - ITEM_NULLIFY_BELT = 1051, - ITEM_GROWL_SCARF = 1052, - ITEM_LEGEND_BOW = 1053, - ITEM_DAMP_BOW = 1054, - ITEM_POLI_BOW = 1055, - ITEM_BOLD_BELT = 1056, - ITEM_PREDICT_TORC = 1057, - ITEM_PSYCHIC_TORC = 1058, - ITEM_SPARKLE_RUFF = 1059, - ITEM_IMPISH_BAND = 1060, - ITEM_STRONG_BELT = 1061, - ITEM_MACHAMP_BELT = 1062, - ITEM_BELL_BOW = 1063, - ITEM_DIGEST_SCARF = 1064, - ITEM_VICTREE_TORC = 1065, - ITEM_TANGLE_BOW = 1066, - ITEM_TENTA_CAPE = 1067, - ITEM_GEODUDE_TORC = 1068, - ITEM_ROCKY_TORC = 1069, - ITEM_RUGGED_SASH = 1070, - ITEM_HEATED_BOW = 1071, - ITEM_SUNLIGHT_BOW = 1072, - ITEM_SLOWPOKE_HAT = 1073, - ITEM_SLOW_SCARF = 1074, - ITEM_MAGNE_TORC = 1075, - ITEM_MAGNETON_BOW = 1076, - ITEM_BULLSEYE_BOW = 1077, - ITEM_BUDDY_TORC = 1078, - ITEM_FIGHT_TORC = 1079, - ITEM_GENTLE_BOW = 1080, - ITEM_NORTH_TORC = 1081, - ITEM_GRIMY_SCARF = 1082, - ITEM_SLIMY_BOW = 1083, - ITEM_SHELL_TORC = 1084, - ITEM_COVER_ARMOR = 1085, - ITEM_GASTLY_VEIL = 1086, - ITEM_SLIP_SCARF = 1087, - ITEM_SUNGLASSES = 1088, - ITEM_TRUST_BROOCH = 1089, - ITEM_DROWZEE_TIE = 1090, - ITEM_DREAM_COIN = 1091, - ITEM_KRABBY_BOW = 1092, - ITEM_SUPER_SASH = 1093, - ITEM_BALL_SCARF = 1094, - ITEM_ELECTRO_BOW = 1095, - ITEM_REPEL_SCARF = 1096, - ITEM_EXEGGU_SASH = 1097, - ITEM_CUBONE_SCARF = 1098, - ITEM_MAROWAK_TORC = 1099, - ITEM_LICKY_SCARF = 1100, - ITEM_KOFFING_BOW = 1101, - ITEM_WEEZ_SCARF = 1102, - ITEM_SOLID_SHIELD = 1103, - ITEM_PIERCE_DRILL = 1104, - ITEM_STICKY_BOW = 1105, - ITEM_KANG_APRON = 1106, - ITEM_HORSEA_BOW = 1107, - ITEM_SWIRL_SCARF = 1108, - ITEM_GOLDEEN_BOW = 1109, - ITEM_SEAKING_BOW = 1110, - ITEM_RECOVER_TORC = 1111, - ITEM_STARMIE_BELT = 1112, - ITEM_PINSIR_SASH = 1113, - ITEM_RUSHING_BOW = 1114, - ITEM_MAGIKARP_BOW = 1115, - ITEM_TEMPEST_SASH = 1116, - ITEM_DITTO_TORC = 1117, - ITEM_AI_BROOCH = 1118, - ITEM_SPIKE_BROOCH = 1119, - ITEM_AGED_SCARF = 1120, - ITEM_KABUTO_HAT = 1121, - ITEM_KABU_TORC = 1122, - ITEM_OLD_BROOCH = 1123, - ITEM_DRAGON_SASH = 1124, - ITEM_ALOFT_MANTLE = 1125, - ITEM_MIRAGE_CAPE = 1126, - ITEM_SENTRET_RUFF = 1127, - ITEM_BODY_COLLAR = 1128, - ITEM_EXPOSE_SPECS = 1129, - ITEM_NOCTOWL_TORC = 1130, - ITEM_MORNING_BOW = 1131, - ITEM_LEDIAN_BOW = 1132, - ITEM_SPINA_SCARF = 1133, - ITEM_ARIADOS_BOW = 1134, - ITEM_SLASH_BOW = 1135, - ITEM_SHINE_TORC = 1136, - ITEM_LANTURN_BOW = 1137, - ITEM_LIVELY_SCARF = 1138, - ITEM_XATU_BOW = 1139, - ITEM_WOOL_BOW = 1140, - ITEM_FLUFFY_SCARF = 1141, - ITEM_SACRED_SCARF = 1142, - ITEM_BRIGHT_TIARA = 1143, - ITEM_RAIN_CROWN = 1144, - ITEM_ZEPHYR_BOW = 1145, - ITEM_SKIP_SCARF = 1146, - ITEM_COTTON_TORC = 1147, - ITEM_REVENGE_RUFF = 1148, - ITEM_HASTY_BOW = 1149, - ITEM_SUN_SCARF = 1150, - ITEM_CHITIN_BOW = 1151, - ITEM_WOOPER_BOW = 1152, - ITEM_QUAG_TORC = 1153, - ITEM_MURKROW_HAT = 1154, - ITEM_KING_CAP = 1155, - ITEM_MISDREA_CAPE = 1156, - ITEM_CRYPTIC_SASH = 1157, - ITEM_REVERSE_BOW = 1158, - ITEM_ROBUST_BOW = 1159, - ITEM_DENSE_PONCHO = 1160, - ITEM_ESCAPE_SCARF = 1161, - ITEM_TAKEOFF_RUFF = 1162, - ITEM_QUARTZ_TORC = 1163, - ITEM_SNUB_CAPE = 1164, - ITEM_STERN_SASH = 1165, - ITEM_QWILFISH_BOW = 1166, - ITEM_SHUCKLE_BOW = 1167, - ITEM_HORN_TORC = 1168, - ITEM_LAVA_BOW = 1169, - ITEM_TORRID_SCARF = 1170, - ITEM_FRIGID_BOW = 1171, - ITEM_FROST_TORC = 1172, - ITEM_EAGER_BROOCH = 1173, - ITEM_REACH_BOW = 1174, - ITEM_PSY_BOW = 1175, - ITEM_SNOW_BROOCH = 1176, - ITEM_SKAR_CAPE = 1177, - ITEM_DARK_CHOKER = 1178, - ITEM_PIT_FANG = 1179, - ITEM_TORNADO_BOW = 1180, - ITEM_VIRTUAL_BOW = 1181, - ITEM_DELUSION_BOW = 1182, - ITEM_PAINT_SCARF = 1183, - ITEM_MILKY_SCARF = 1184, - ITEM_LARVITAR_BOW = 1185, - ITEM_PUPITA_SCARF = 1186, - ITEM_CRASH_CLAW = 1187, - ITEM_POOCH_COLLAR = 1188, - ITEM_DARK_FANG = 1189, - ITEM_MERRY_SCARF = 1190, - ITEM_LINOONE_RUFF = 1191, - ITEM_WURMPLE_BOW = 1192, - ITEM_TOUGH_SCARF = 1193, - ITEM_VIVID_SILK = 1194, - ITEM_GUARD_BOW = 1195, - ITEM_DUSTOX_BOW = 1196, - ITEM_KELP_HAT = 1197, - ITEM_JOLLY_SCARF = 1198, - ITEM_LUDICOLO_HAT = 1199, - ITEM_SEEDOT_HAT = 1200, - ITEM_NUZLEAF_BOW = 1201, - ITEM_SHIFTRY_BELT = 1202, - ITEM_TAILLOW_BOW = 1203, - ITEM_MIDAIR_SCARF = 1204, - ITEM_WINGULL_BOW = 1205, - ITEM_STOCK_SCARF = 1206, - ITEM_SENSING_HAT = 1207, - ITEM_MAGICAL_BOW = 1208, - ITEM_CARING_SCARF = 1209, - ITEM_BLISS_SCARF = 1210, - ITEM_BLOCKING_BOW = 1211, - ITEM_MOBILE_BOW = 1212, - ITEM_THWART_BOW = 1213, - ITEM_SLAK_SCARF = 1214, - ITEM_VIGOR_SASH = 1215, - ITEM_LAZY_RUFF = 1216, - ITEM_NOVICE_SCARF = 1217, - ITEM_NINJA_RUFF = 1218, - ITEM_AWE_MANTLE = 1219, - ITEM_GOOD_EARRING = 1220, - ITEM_NICE_BANGLE = 1221, - ITEM_GREAT_TORC = 1222, - ITEM_MAKUHIT_BELT = 1223, - ITEM_THRUST_BELT = 1224, - ITEM_NOSE_TORC = 1225, - ITEM_SABLE_SCOPE = 1226, - ITEM_DECEIT_MASK = 1227, - ITEM_IRON_TORC = 1228, - ITEM_METAL_BANGLE = 1229, - ITEM_IRON_HELMET = 1230, - ITEM_INTUIT_BOW = 1231, - ITEM_PONDER_SASH = 1232, - ITEM_PUNISH_TORC = 1233, - ITEM_PROTECT_MASK = 1234, - ITEM_NEON_SCARF = 1235, - ITEM_EVENING_BOW = 1236, - ITEM_THORNED_TORC = 1237, - ITEM_GULPIN_BOW = 1238, - ITEM_SWALOT_BELT = 1239, - ITEM_CARVA_SASH = 1240, - ITEM_VICIOUS_BOW = 1241, - ITEM_SPOUT_SCARF = 1242, - ITEM_HUGE_BOW = 1243, - ITEM_NUMEL_BOW = 1244, - ITEM_ERUPT_SCARF = 1245, - ITEM_SOOTY_SASH = 1246, - ITEM_SPRING_BOW = 1247, - ITEM_SCHEME_SCARF = 1248, - ITEM_HULA_BOW = 1249, - ITEM_DESERT_BOW = 1250, - ITEM_VIBRA_SCARF = 1251, - ITEM_RED_GLASSES = 1252, - ITEM_DESERT_SASH = 1253, - ITEM_CACTURNE_HAT = 1254, - ITEM_TUFT_BOW = 1255, - ITEM_CLOUD_RUFF = 1256, - ITEM_STRONG_SASH = 1257, - ITEM_SEVIPER_BOW = 1258, - ITEM_LUNATON_TORC = 1259, - ITEM_SOLROCK_BOW = 1260, - ITEM_SOAK_SCARF = 1261, - ITEM_WHISCASH_BOW = 1262, - ITEM_BOSSY_SCARF = 1263, - ITEM_COWER_SASH = 1264, - ITEM_BAL_BROOCH = 1265, - ITEM_CLAYDOL_TORC = 1266, - ITEM_BIND_SCARF = 1267, - ITEM_CRADILY_BOW = 1268, - ITEM_GUARD_CLAW = 1269, - ITEM_RIGID_CAPE = 1270, - ITEM_ADMIRE_SCARF = 1271, - ITEM_GRACE_SCARF = 1272, - ITEM_KECLEON_TORC = 1273, - ITEM_SHUPPET_CAPE = 1274, - ITEM_OMINOUS_TORC = 1275, - ITEM_DUSKULL_RUFF = 1276, - ITEM_ILLUSION_BOW = 1277, - ITEM_TROPIUS_BOW = 1278, - ITEM_CHIME_SCARF = 1279, - ITEM_PERISH_TORC = 1280, - ITEM_CHILLY_HAT = 1281, - ITEM_HAIL_SCARF = 1282, - ITEM_SLEET_BOW = 1283, - ITEM_SAFE_SCARF = 1284, - ITEM_WALREIN_TORC = 1285, - ITEM_CLAM_BROOCH = 1286, - ITEM_DEEP_TORC = 1287, - ITEM_GORE_SCARF = 1288, - ITEM_RELI_TORC = 1289, - ITEM_LUVDISC_TORC = 1290, - ITEM_CRAG_HELMET = 1291, - ITEM_OUTLAST_BOW = 1292, - ITEM_SALA_CAPE = 1293, - ITEM_BELDUM_TORC = 1294, - ITEM_METANG_SCARF = 1295, - ITEM_META_TORC = 1296, - ITEM_STARLY_BOW = 1297, - ITEM_REGRET_TORC = 1298, - ITEM_GUTS_SASH = 1299, - ITEM_STILL_BOW = 1300, - ITEM_KRICKE_TORC = 1301, - ITEM_BUDEW_SCARF = 1302, - ITEM_BOUQUET_CAPE = 1303, - ITEM_HARD_HELMET = 1304, - ITEM_SKULL_HELMET = 1305, - ITEM_REBOUND_BOW = 1306, - ITEM_BLOCK_BROOCH = 1307, - ITEM_STRAW_CAPE = 1308, - ITEM_WORMA_BOW = 1309, - ITEM_MOTHIM_BOW = 1310, - ITEM_NECTAR_BOW = 1311, - ITEM_VESPI_TORC = 1312, - ITEM_AWAKE_BOW = 1313, - ITEM_GASTRO_TORC = 1314, - ITEM_AMBIPOM_BOW = 1315, - ITEM_DEFROST_RUFF = 1316, - ITEM_ALLURE_COAT = 1317, - ITEM_MAGIC_HAT = 1318, - ITEM_HONCH_CAPE = 1319, - ITEM_GLAMEOW_BOW = 1320, - ITEM_SCARY_BELT = 1321, - ITEM_CHING_TORC = 1322, - ITEM_STINKY_SCARF = 1323, - ITEM_STENCH_SASH = 1324, - ITEM_IMAGE_BROOCH = 1325, - ITEM_MIRROR_TORC = 1326, - ITEM_CHATOT_SCARF = 1327, - ITEM_THICK_SCARF = 1328, - ITEM_GRIT_VEIL = 1329, - ITEM_SKORUPI_BOW = 1330, - ITEM_DUST_SCARF = 1331, - ITEM_CROA_TORC = 1332, - ITEM_TOXI_BELT = 1333, - ITEM_CARNI_BOW = 1334, - ITEM_SWIM_BOW = 1335, - ITEM_LUMI_TORC = 1336, - ITEM_SNOWY_TORC = 1337, - ITEM_FROZEN_CAPE = 1338, - ITEM_BUILDER_SASH = 1339, - ITEM_FLABBY_BELT = 1340, - ITEM_RHYPERI_TORC = 1341, - ITEM_CLINGING_BOW = 1342, - ITEM_YANMEGA_BOW = 1343, - ITEM_GLISCOR_CAPE = 1344, - ITEM_GLACIER_CAPE = 1345, - ITEM_BEST_SCARF = 1346, - ITEM_GALLANT_TORC = 1347, - ITEM_PROBO_HAT = 1348, - ITEM_UNLUCKY_SASH = 1349, - ITEM_FROSLASS_BOW = 1350, - ITEM_PURIFY_VEIL = 1351, - ITEM_UNNAMED_0x548 = 1352, - ITEM_UNNAMED_0x549 = 1353, - ITEM_UNNAMED_0x54A = 1354, - ITEM_UNNAMED_0x54B = 1355, - ITEM_UNNAMED_0x54C = 1356, - ITEM_UNNAMED_0x54D = 1357, - ITEM_UNNAMED_0x54E = 1358, - ITEM_UNNAMED_0x54F = 1359, - ITEM_UNNAMED_0x550 = 1360, - ITEM_UNNAMED_0x551 = 1361, - ITEM_UNNAMED_0x552 = 1362, - ITEM_UNNAMED_0x553 = 1363, - ITEM_UNNAMED_0x554 = 1364, - ITEM_UNNAMED_0x555 = 1365, - ITEM_UNNAMED_0x556 = 1366, - ITEM_UNNAMED_0x557 = 1367, - ITEM_UNNAMED_0x558 = 1368, - ITEM_UNNAMED_0x559 = 1369, - ITEM_UNNAMED_0x55A = 1370, - ITEM_UNNAMED_0x55B = 1371, - ITEM_UNNAMED_0x55C = 1372, - ITEM_UNNAMED_0x55D = 1373, - ITEM_UNNAMED_0x55E = 1374, - ITEM_UNNAMED_0x55F = 1375, - ITEM_UNNAMED_0x560 = 1376, - ITEM_UNNAMED_0x561 = 1377, - ITEM_UNNAMED_0x562 = 1378, - ITEM_UNNAMED_0x563 = 1379, - ITEM_UNNAMED_0x564 = 1380, - ITEM_UNNAMED_0x565 = 1381, - ITEM_UNNAMED_0x566 = 1382, - ITEM_UNNAMED_0x567 = 1383, - ITEM_UNNAMED_0x568 = 1384, - ITEM_UNNAMED_0x569 = 1385, - ITEM_UNNAMED_0x56A = 1386, - ITEM_UNNAMED_0x56B = 1387, - ITEM_UNNAMED_0x56C = 1388, - ITEM_UNNAMED_0x56D = 1389, - ITEM_UNNAMED_0x56E = 1390, - ITEM_UNNAMED_0x56F = 1391, - ITEM_UNNAMED_0x570 = 1392, - ITEM_UNNAMED_0x571 = 1393, - ITEM_UNNAMED_0x572 = 1394, - ITEM_UNNAMED_0x573 = 1395, - ITEM_UNNAMED_0x574 = 1396, - ITEM_UNNAMED_0x575 = 1397, - ITEM_UNNAMED_0x576 = 1398, - ITEM_UNNAMED_0x577 = 1399, -}; - - // Move ID enum move_id { MOVE_NOTHING = 0, @@ -3269,19 +1850,19 @@ enum action { ACTION_SEND_HOME = 52, // 0x34: Send a pokémon home ACTION_UNK_35 = 53, ACTION_GIVE_ITEM = 54, // 0X36: Give held item - ACTION_TAKE_ITEM = 35, // 0x37: Take a held item - ACTION_UNK_38 = 36, + ACTION_TAKE_ITEM = 55, // 0x37: Take a held item + ACTION_UNK_38 = 56, // 0x39: had second thoughts! - Used as a failsafe when trying to take an illegal // action - ACTION_SECOND_THOUGHTS = 37, - ACTION_SWAP_ITEM = 38, // 0x3A: Swapping an item - ACTION_CHANGE_LEADER = 39, // 0x3B: Change the team's leader - ACTION_SET_ITEM = 40, // 0x3C: Set item - ACTION_UNSET_ITEM = 41, // 0x3D: Unset item - ACTION_UNK_3E = 42, - ACTION_PICK_UP_AI = 43, // 0x3F: Pick up an item (AI) - ACTION_UNK_40 = 44, - ACTION_THROW_ARC_PLAYER = 45, // 0x41: Throw a Gravelerock or a similar item (player) + ACTION_SECOND_THOUGHTS = 57, + ACTION_SWAP_ITEM = 58, // 0x3A: Swapping an item + ACTION_CHANGE_LEADER = 59, // 0x3B: Change the team's leader + ACTION_SET_ITEM = 60, // 0x3C: Set item + ACTION_UNSET_ITEM = 61, // 0x3D: Unset item + ACTION_UNK_3E = 62, + ACTION_PICK_UP_AI = 63, // 0x3F: Pick up an item (AI) + ACTION_UNK_40 = 64, + ACTION_THROW_ARC_PLAYER = 65, // 0x41: Throw a Gravelerock or a similar item (player) ACTION_PAD = 0xffff, // To force the enum on 16 bits }; @@ -3627,38 +2208,114 @@ enum status_id { STATUS_STAIR_SPOTTER = 101, // Can locate stairs }; -#define SLEEP_STATUS_SLEEP (STATUS_SLEEP - STATUS_SLEEP + 1) // 1 -#define SLEEP_STATUS_SLEEPLESS (STATUS_SLEEPLESS - STATUS_SLEEP + 1) // 2 -#define SLEEP_STATUS_NIGHTMARE (STATUS_NIGHTMARE - STATUS_SLEEP + 1) // 3 -#define SLEEP_STATUS_YAWNING (STATUS_YAWNING - STATUS_SLEEP + 1) // 4 -#define SLEEP_STATUS_NAPPING (STATUS_NAPPING - STATUS_SLEEP + 1) // 5 +enum status_sleep_id { + STATUS_SLEEP_NONE = 0, + STATUS_SLEEP_SLEEP = 1, + STATUS_SLEEP_SLEEPLESS = 2, + STATUS_SLEEP_NIGHTMARE = 3, + STATUS_SLEEP_YAWNING = 4, + STATUS_SLEEP_NAPPING = 5, +}; -#define FROZEN_STATUS_FROZEN (STATUS_FROZEN - STATUS_FROZEN + 1) // 1 -#define FROZEN_STATUS_WRAP (STATUS_WRAP - STATUS_FROZEN + 1) // 3 -#define FROZEN_STATUS_WRAPPED (STATUS_WRAPPED - STATUS_FROZEN + 1) // 4 -#define FROZEN_STATUS_PETRIFIED (STATUS_PETRIFIED - STATUS_FROZEN + 1) // 6 +enum status_burn_id { + STATUS_BURN_NONE = 0, + STATUS_BURN_BURN = 1, + STATUS_BURN_POISONED = 2, + STATUS_BURN_BADLY_POISONED = 3, + STATUS_BURN_PARALYSIS = 4, +}; -#define BIDE_STATUS_BIDE (STATUS_BIDE - STATUS_BIDE + 1) // 1 -#define BIDE_STATUS_SOLARBEAM (STATUS_SOLARBEAM - STATUS_BIDE + 1) // 2 -#define BIDE_STATUS_SKY_ATTACK (STATUS_SKY_ATTACK - STATUS_BIDE + 1) // 3 -#define BIDE_STATUS_RAZOR_WIND (STATUS_RAZOR_WIND - STATUS_BIDE + 1) // 4 -#define BIDE_STATUS_FOCUS_PUNCH (STATUS_FOCUS_PUNCH - STATUS_BIDE + 1) // 5 -#define BIDE_STATUS_SKULL_BASH (STATUS_SKULL_BASH - STATUS_BIDE + 1) // 6 -#define BIDE_STATUS_FLYING (STATUS_FLYING - STATUS_BIDE + 1) // 7 -#define BIDE_STATUS_BOUNCING (STATUS_BOUNCING - STATUS_BIDE + 1) // 8 -#define BIDE_STATUS_DIVING (STATUS_DIVING - STATUS_BIDE + 1) // 9 -#define BIDE_STATUS_DIGGING (STATUS_DIGGING - STATUS_BIDE + 1) // 10 -#define BIDE_STATUS_CHARGING (STATUS_CHARGING - STATUS_BIDE + 1) // 11 -#define BIDE_STATUS_SHADOW_FORCE (STATUS_SHADOW_FORCE - STATUS_BIDE + 1)// 13 +enum status_frozen_id { + STATUS_FROZEN_NONE = 0, + STATUS_FROZEN_FROZEN = 1, + STATUS_FROZEN_SHADOW_HOLD = 2, + STATUS_FROZEN_WRAP = 3, + STATUS_FROZEN_WRAPPED = 4, + STATUS_FROZEN_INGRAIN = 5, + STATUS_FROZEN_PETRIFIED = 6, + STATUS_FROZEN_CONSTRICTION = 7, +}; -#define CRINGE_STATUS_CONFUSED (STATUS_CONFUSED - STATUS_CRINGE + 1) // 2 -#define CRINGE_STATUS_PAUSED (STATUS_PAUSED - STATUS_CRINGE + 1) // 3 -#define CRINGE_STATUS_INFATUATED (STATUS_INFATUATED - STATUS_CRINGE + 1) // 7 +enum status_cringe_id { + STATUS_CRINGE_NONE = 0, + STATUS_CRINGE_CRINGE = 1, + STATUS_CRINGE_CONFUSED = 2, + STATUS_CRINGE_PAUSED = 3, + STATUS_CRINGE_COWERING = 4, + STATUS_CRINGE_TAUNTED = 5, + STATUS_CRINGE_ENCORE = 6, + STATUS_CRINGE_INFATUATED = 7, +}; -#define CURSED_STATUS_DECOY (STATUS_DECOY - STATUS_CURSED + 1) // 2 -#define CURSED_STATUS_GASTRO_ACID (STATUS_GASTRO_ACID - STATUS_CURSED + 1) // 4 +enum status_two_turn_id { + STATUS_TWO_TURN_NONE = 0, + STATUS_TWO_TURN_BIDE = 1, + STATUS_TWO_TURN_SOLARBEAM = 2, + STATUS_TWO_TURN_SKY_ATTACK = 3, + STATUS_TWO_TURN_RAZOR_WIND = 4, + STATUS_TWO_TURN_FOCUS_PUNCH = 5, + STATUS_TWO_TURN_SKULL_BASH = 6, + STATUS_TWO_TURN_FLYING = 7, + STATUS_TWO_TURN_BOUNCING = 8, + STATUS_TWO_TURN_DIVING = 9, + STATUS_TWO_TURN_DIGGING = 10, + STATUS_TWO_TURN_CHARGING = 11, + STATUS_TWO_TURN_ENRAGED = 12, + STATUS_TWO_TURN_SHADOW_FORCE = 13, +}; -#define BLINKER_STATUS_BLINKER (STATUS_BLINKER - STATUS_BLINKER + 1) // 1 +enum status_reflect_id { + STATUS_REFLECT_NONE = 0, + STATUS_REFLECT_REFLECT = 1, + STATUS_REFLECT_SAFEGUARD = 2, + STATUS_REFLECT_LIGHT_SCREEN = 3, + STATUS_REFLECT_COUNTER = 4, + STATUS_REFLECT_MAGIC_COAT = 5, + STATUS_REFLECT_WISH = 6, + STATUS_REFLECT_PROTECT = 7, + STATUS_REFLECT_MIRROR_COAT = 8, + STATUS_REFLECT_ENDURING = 9, + STATUS_REFLECT_MINI_COUNTER = 10, + STATUS_REFLECT_MIRROR_MOVE = 11, + STATUS_REFLECT_CONVERSION2 = 12, + STATUS_REFLECT_VITAL_THROW = 13, + STATUS_REFLECT_MIST = 14, + STATUS_REFLECT_METAL_BURST = 15, + STATUS_REFLECT_AQUA_RING = 16, + STATUS_REFLECT_LUCKY_CHANT = 17, +}; + +enum status_curse_id { + STATUS_CURSE_NONE = 0, + STATUS_CURSE_CURSED = 1, + STATUS_CURSE_DECOY = 2, + STATUS_CURSE_SNATCH = 3, + STATUS_CURSE_GASTRO_ACID = 4, + STATUS_CURSE_HEAL_BLOCK = 5, + STATUS_CURSE_EMBARGO = 6, +}; + +enum status_leech_seed_id { + STATUS_LEECH_SEED_NONE = 0, + STATUS_LEECH_SEED_LEECH_SEED = 1, + STATUS_LEECH_SEED_DESTINY_BOND = 2, +}; + +enum status_sure_shot_id { + STATUS_SURE_SHOT_NONE = 0, + STATUS_SURE_SHOT_SURE_SHOT = 1, + STATUS_SURE_SHOT_WHIFFER = 2, + STATUS_SURE_SHOT_SET_DAMAGE = 3, + STATUS_SURE_SHOT_FOCUS_ENERGY = 4, +}; + +enum status_blinker_id { + STATUS_BLINKER_NONE = 0, + STATUS_BLINKER_BLINKER = 1, + STATUS_BLINKER_CROSS_EYED = 2, + STATUS_BLINKER_EYEDROPS = 3, + STATUS_BLINKER_DROPEYE = 4, +}; // Mission type on a floor enum mission_type { diff --git a/include/item.h b/include/item.h new file mode 100644 index 00000000..ec43a9b2 --- /dev/null +++ b/include/item.h @@ -0,0 +1,1486 @@ +#ifndef PMDSKY_ITEM_H +#define PMDSKY_ITEM_H + +// Item ID +enum item_id { + ITEM_NOTHING = 0, + ITEM_STICK = 1, + ITEM_IRON_THORN = 2, + ITEM_SILVER_SPIKE = 3, + ITEM_GOLD_FANG = 4, + ITEM_CACNEA_SPIKE = 5, + ITEM_CORSOLA_TWIG = 6, + ITEM_GRAVELEROCK = 7, + ITEM_GEO_PEBBLE = 8, + ITEM_GOLD_THORN = 9, + ITEM_RARE_FOSSIL = 10, + ITEM_UNNAMED_0xB = 11, + ITEM_UNNAMED_0xC = 12, + ITEM_NO_SLIP_CAP = 13, + ITEM_Y_RAY_SPECS = 14, + ITEM_GAGGLE_SPECS = 15, + ITEM_MOBILE_SCARF = 16, + ITEM_HEAL_RIBBON = 17, + ITEM_TWIST_BAND = 18, + ITEM_SCOPE_LENS = 19, + ITEM_PATSY_BAND = 20, + ITEM_NO_STICK_CAP = 21, + ITEM_PIERCE_BAND = 22, + ITEM_JOY_RIBBON = 23, + ITEM_X_RAY_SPECS = 24, + ITEM_PERSIM_BAND = 25, + ITEM_POWER_BAND = 26, + ITEM_PECHA_SCARF = 27, + ITEM_INSOMNISCOPE = 28, + ITEM_WARP_SCARF = 29, + ITEM_TIGHT_BELT = 30, + ITEM_SNEAK_SCARF = 31, + ITEM_GOLD_RIBBON = 32, + ITEM_GOGGLE_SPECS = 33, + ITEM_DIET_RIBBON = 34, + ITEM_TRAP_SCARF = 35, + ITEM_RACKET_BAND = 36, + ITEM_DEF_SCARF = 37, + ITEM_STAMINA_BAND = 38, + ITEM_PLAIN_RIBBON = 39, + ITEM_SPECIAL_BAND = 40, + ITEM_ZINC_BAND = 41, + ITEM_DETECT_BAND = 42, + ITEM_SPACE_GLOBE = 43, + ITEM_DODGE_SCARF = 44, + ITEM_BOUNCE_BAND = 45, + ITEM_CURVE_BAND = 46, + ITEM_WHIFF_SPECS = 47, + ITEM_NO_AIM_SCOPE = 48, + ITEM_LOCKON_SPECS = 49, + ITEM_MUNCH_BELT = 50, + ITEM_PASS_SCARF = 51, + ITEM_WEATHER_BAND = 52, + ITEM_FRIEND_BOW = 53, + ITEM_BEAUTY_SCARF = 54, + ITEM_SUN_RIBBON = 55, + ITEM_LUNAR_RIBBON = 56, + ITEM_GOLDEN_MASK = 57, + ITEM_AMBER_TEAR = 58, + ITEM_ICY_FLUTE = 59, + ITEM_FIERY_DRUM = 60, + ITEM_TERRA_CYMBAL = 61, + ITEM_AQUA_MONICA = 62, + ITEM_ROCK_HORN = 63, + ITEM_GRASS_CORNET = 64, + ITEM_SKY_MELODICA = 65, + ITEM_MIRACLE_CHEST = 66, + ITEM_WONDER_CHEST = 67, + ITEM_IQ_BOOSTER = 68, + ITEM_HEAL_SEED = 69, + ITEM_ORAN_BERRY = 70, + ITEM_SITRUS_BERRY = 71, + ITEM_EYEDROP_SEED = 72, + ITEM_REVIVER_SEED = 73, + ITEM_BLINKER_SEED = 74, + ITEM_DOOM_SEED = 75, + ITEM_X_EYE_SEED = 76, + ITEM_LIFE_SEED = 77, + ITEM_RAWST_BERRY = 78, + ITEM_HUNGER_SEED = 79, + ITEM_QUICK_SEED = 80, + ITEM_PECHA_BERRY = 81, + ITEM_CHERI_BERRY = 82, + ITEM_TOTTER_SEED = 83, + ITEM_SLEEP_SEED = 84, + ITEM_PLAIN_SEED = 85, + ITEM_WARP_SEED = 86, + ITEM_BLAST_SEED = 87, + ITEM_GINSENG = 88, + ITEM_JOY_SEED = 89, + ITEM_CHESTO_BERRY = 90, + ITEM_STUN_SEED = 91, + ITEM_GABITE_SCALE = 92, + ITEM_GOLDEN_SEED = 93, + ITEM_VILE_SEED = 94, + ITEM_PURE_SEED = 95, + ITEM_VIOLENT_SEED = 96, + ITEM_VANISH_SEED = 97, + ITEM_UNNAMED_0x62 = 98, + ITEM_MAX_ELIXIR = 99, + ITEM_PROTEIN = 100, + ITEM_CALCIUM = 101, + ITEM_IRON = 102, + ITEM_NECTAR = 103, + ITEM_DROPEYE_SEED = 104, + ITEM_REVISER_SEED = 105, + ITEM_SLIP_SEED = 106, + ITEM_VIA_SEED = 107, + ITEM_ZINC = 108, + ITEM_APPLE = 109, + ITEM_BIG_APPLE = 110, + ITEM_GRIMY_FOOD = 111, + ITEM_HUGE_APPLE = 112, + ITEM_UNNAMED_0x71 = 113, + ITEM_UNNAMED_0x72 = 114, + ITEM_GOLDEN_APPLE = 115, + ITEM_MIX_ELIXIR = 116, + ITEM_OREN_BERRY = 117, + ITEM_DOUGH_SEED = 118, + ITEM_WHITE_GUMMI = 119, + ITEM_RED_GUMMI = 120, + ITEM_BLUE_GUMMI = 121, + ITEM_GRASS_GUMMI = 122, + ITEM_YELLOW_GUMMI = 123, + ITEM_CLEAR_GUMMI = 124, + ITEM_ORANGE_GUMMI = 125, + ITEM_PINK_GUMMI = 126, + ITEM_BROWN_GUMMI = 127, + ITEM_SKY_GUMMI = 128, + ITEM_GOLD_GUMMI = 129, + ITEM_GREEN_GUMMI = 130, + ITEM_GRAY_GUMMI = 131, + ITEM_PURPLE_GUMMI = 132, + ITEM_ROYAL_GUMMI = 133, + ITEM_BLACK_GUMMI = 134, + ITEM_SILVER_GUMMI = 135, + ITEM_WONDER_GUMMI = 136, + ITEM_GRAVELYROCK = 137, + ITEM_UNNAMED_0x8A = 138, + ITEM_UPGRADE = 139, + ITEM_KINGS_ROCK = 140, + ITEM_THUNDERSTONE = 141, + ITEM_DEEPSEASCALE = 142, + ITEM_DEEPSEATOOTH = 143, + ITEM_SUN_STONE = 144, + ITEM_MOON_STONE = 145, + ITEM_FIRE_STONE = 146, + ITEM_WATER_STONE = 147, + ITEM_METAL_COAT = 148, + ITEM_LEAF_STONE = 149, + ITEM_DRAGON_SCALE = 150, + ITEM_LINK_CABLE = 151, + ITEM_DUBIOUS_DISC = 152, + ITEM_PROTECTOR = 153, + ITEM_REAPER_CLOTH = 154, + ITEM_RAZOR_FANG = 155, + ITEM_RAZOR_CLAW = 156, + ITEM_ELECTIRIZER = 157, + ITEM_MAGMARIZER = 158, + ITEM_OVAL_STONE = 159, + ITEM_DAWN_STONE = 160, + ITEM_SHINY_STONE = 161, + ITEM_DUSK_STONE = 162, + ITEM_CORONET_ROCK = 163, + ITEM_MOSSY_ROCK = 164, + ITEM_FROZEN_ROCK = 165, + ITEM_UNNAMED_0xA6 = 166, + ITEM_GONE_PEBBLE = 167, + ITEM_WANDER_GUMMI = 168, + ITEM_PRIZE_TICKET = 169, + ITEM_SILVER_TICKET = 170, + ITEM_GOLD_TICKET = 171, + ITEM_PRISM_TICKET = 172, + ITEM_MYSTERY_PART = 173, + ITEM_SECRET_SLAB = 174, + ITEM_UNNAMED_0xAF = 175, + ITEM_UNNAMED_0xB0 = 176, + ITEM_UNNAMED_0xB1 = 177, + ITEM_WONDER_EGG = 178, + ITEM_GRACIDEA = 179, + ITEM_SKY_GIFT = 180, + ITEM_UNNAMED_0xB5 = 181, + ITEM_KEY = 182, + ITEM_POKE = 183, + ITEM_UNNAMED_0xB8 = 184, + ITEM_UNNAMED_0xB9 = 185, + ITEM_LOST_LOOT = 186, + ITEM_TM_USED_TM = 187, + ITEM_TM_FOCUS_PUNCH = 188, + ITEM_TM_DRAGON_CLAW = 189, + ITEM_TM_WATER_PULSE = 190, + ITEM_TM_CALM_MIND = 191, + ITEM_TM_ROAR = 192, + ITEM_TM_TOXIC = 193, + ITEM_TM_HAIL = 194, + ITEM_TM_BULK_UP = 195, + ITEM_TM_BULLET_SEED = 196, + ITEM_TM_HIDDEN_POWER = 197, + ITEM_UNNAMED_0xC6 = 198, + ITEM_TM_TAUNT = 199, + ITEM_TM_ICE_BEAM = 200, + ITEM_TM_BLIZZARD = 201, + ITEM_TM_HYPER_BEAM = 202, + ITEM_TM_LIGHT_SCREEN = 203, + ITEM_TM_PROTECT = 204, + ITEM_UNNAMED_0xCD = 205, + ITEM_TM_GIGA_DRAIN = 206, + ITEM_TM_SAFEGUARD = 207, + ITEM_TM_FRUSTRATION = 208, + ITEM_TM_SOLARBEAM = 209, + ITEM_TM_IRON_TAIL = 210, + ITEM_TM_THUNDERBOLT = 211, + ITEM_TM_THUNDER = 212, + ITEM_TM_EARTHQUAKE = 213, + ITEM_TM_RETURN = 214, + ITEM_TM_DIG = 215, + ITEM_TM_PSYCHIC = 216, + ITEM_TM_SHADOW_BALL = 217, + ITEM_TM_BRICK_BREAK = 218, + ITEM_UNNAMED_0xDB = 219, + ITEM_TM_REFLECT = 220, + ITEM_TM_SHOCK_WAVE = 221, + ITEM_TM_FLAMETHROWER = 222, + ITEM_TM_SLUDGE_BOMB = 223, + ITEM_UNNAMED_0xE0 = 224, + ITEM_TM_FIRE_BLAST = 225, + ITEM_UNNAMED_0xE2 = 226, + ITEM_TM_AERIAL_ACE = 227, + ITEM_TM_TORMENT = 228, + ITEM_TM_FACADE = 229, + ITEM_TM_SECRET_POWER = 230, + ITEM_TM_REST = 231, + ITEM_TM_ATTRACT = 232, + ITEM_TM_THIEF = 233, + ITEM_TM_STEEL_WING = 234, + ITEM_TM_SKILL_SWAP = 235, + ITEM_UNNAMED_0xEC = 236, + ITEM_TM_OVERHEAT = 237, + ITEM_TM_ROOST = 238, + ITEM_TM_FOCUS_BLAST = 239, + ITEM_TM_ENERGY_BALL = 240, + ITEM_TM_FALSE_SWIPE = 241, + ITEM_TM_BRINE = 242, + ITEM_TM_FLING = 243, + ITEM_TM_CHARGE_BEAM = 244, + ITEM_TM_ENDURE = 245, + ITEM_TM_DRAGON_PULSE = 246, + ITEM_TM_DRAIN_PUNCH = 247, + ITEM_TM_WILL_O_WISP = 248, + ITEM_TM_SILVER_WIND = 249, + ITEM_TM_EMBARGO = 250, + ITEM_TM_EXPLOSION = 251, + ITEM_TM_SHADOW_CLAW = 252, + ITEM_TM_PAYBACK = 253, + ITEM_TM_RECYCLE = 254, + ITEM_TM_GIGA_IMPACT = 255, + ITEM_TM_ROCK_POLISH = 256, + ITEM_TM_WIDE_SLASH = 257, + ITEM_UNNAMED_0x102 = 258, + ITEM_UNNAMED_0x103 = 259, + ITEM_TM_VACUUM_CUT = 260, + ITEM_TM_DIVE = 261, + ITEM_TM_FLASH = 262, + ITEM_TM_STONE_EDGE = 263, + ITEM_TM_AVALANCHE = 264, + ITEM_TM_THUNDER_WAVE = 265, + ITEM_TM_GYRO_BALL = 266, + ITEM_TM_SWORDS_DANCE = 267, + ITEM_TM_STEALTH_ROCK = 268, + ITEM_TM_PSYCH_UP = 269, + ITEM_TM_CAPTIVATE = 270, + ITEM_TM_DARK_PULSE = 271, + ITEM_TM_ROCK_SLIDE = 272, + ITEM_TM_X_SCISSOR = 273, + ITEM_TM_SLEEP_TALK = 274, + ITEM_TM_NATURAL_GIFT = 275, + ITEM_TM_POISON_JAB = 276, + ITEM_TM_DREAM_EATER = 277, + ITEM_TM_GRASS_KNOT = 278, + ITEM_TM_SWAGGER = 279, + ITEM_TM_PLUCK = 280, + ITEM_TM_U_TURN = 281, + ITEM_TM_SUBSTITUTE = 282, + ITEM_TM_FLASH_CANNON = 283, + ITEM_TM_TRICK_ROOM = 284, + ITEM_TM_CUT = 285, + ITEM_TM_FLY = 286, + ITEM_TM_SURF = 287, + ITEM_TM_STRENGTH = 288, + ITEM_TM_DEFOG = 289, + ITEM_TM_ROCK_SMASH = 290, + ITEM_TM_WATERFALL = 291, + ITEM_TM_ROCK_CLIMB = 292, + ITEM_UNNAMED_0x125 = 293, + ITEM_UNNAMED_0x126 = 294, + ITEM_UNNAMED_0x127 = 295, + ITEM_UNNAMED_0x128 = 296, + ITEM_UNNAMED_0x129 = 297, + ITEM_UNNAMED_0x12A = 298, + ITEM_UNNAMED_0x12B = 299, + ITEM_UNNAMED_0x12C = 300, + ITEM_HAIL_ORB = 301, + ITEM_SUNNY_ORB = 302, + ITEM_RAINY_ORB = 303, + ITEM_EVASION_ORB = 304, + ITEM_SANDY_ORB = 305, + ITEM_ROCKY_ORB = 306, + ITEM_SNATCH_ORB = 307, + ITEM_SEE_TRAP_ORB = 308, + ITEM_MUG_ORB = 309, + ITEM_REBOUND_ORB = 310, + ITEM_LOB_ORB = 311, + ITEM_SWITCHER_ORB = 312, + ITEM_BLOWBACK_ORB = 313, + ITEM_WARP_ORB = 314, + ITEM_TRANSFER_ORB = 315, + ITEM_SLOW_ORB = 316, + ITEM_QUICK_ORB = 317, + ITEM_LUMINOUS_ORB = 318, + ITEM_PETRIFY_ORB = 319, + ITEM_STAYAWAY_ORB = 320, + ITEM_POUNCE_ORB = 321, + ITEM_TRAWL_ORB = 322, + ITEM_CLEANSE_ORB = 323, + ITEM_UNNAMED_0x144 = 324, + ITEM_DECOY_ORB = 325, + ITEM_SLUMBER_ORB = 326, + ITEM_TOTTER_ORB = 327, + ITEM_TWO_EDGE_ORB = 328, + ITEM_SILENCE_ORB = 329, + ITEM_ESCAPE_ORB = 330, + ITEM_SCANNER_ORB = 331, + ITEM_RADAR_ORB = 332, + ITEM_DROUGHT_ORB = 333, + ITEM_TRAPBUST_ORB = 334, + ITEM_ROLLCALL_ORB = 335, + ITEM_INVISIFY_ORB = 336, + ITEM_ONE_SHOT_ORB = 337, + ITEM_IDENTIFY_ORB = 338, + ITEM_UNNAMED_0x153 = 339, + ITEM_SHOCKER_ORB = 340, + ITEM_SIZEBUST_ORB = 341, + ITEM_ONE_ROOM_ORB = 342, + ITEM_FILL_IN_ORB = 343, + ITEM_TRAPPER_ORB = 344, + ITEM_UNNAMED_0x159 = 345, + ITEM_ITEMIZER_ORB = 346, + ITEM_HURL_ORB = 347, + ITEM_MOBILE_ORB = 348, + ITEM_UNNAMED_0x15D = 349, + ITEM_STAIRS_ORB = 350, + ITEM_LONGTOSS_ORB = 351, + ITEM_PIERCE_ORB = 352, + ITEM_UNNAMED_0x161 = 353, + ITEM_SPURN_ORB = 354, + ITEM_FOE_HOLD_ORB = 355, + ITEM_ALL_MACH_ORB = 356, + ITEM_FOE_FEAR_ORB = 357, + ITEM_ALL_HIT_ORB = 358, + ITEM_FOE_SEAL_ORB = 359, + ITEM_UNNAMED_0x168 = 360, + ITEM_UNNAMED_0x169 = 361, + ITEM_LINK_BOX = 362, + ITEM_UNNAMED_0x16B = 363, + ITEM_GORGEOUS_BOX_1 = 364, + ITEM_GORGEOUS_BOX_2 = 365, + ITEM_GORGEOUS_BOX_3 = 366, + ITEM_HEAVY_BOX_1 = 367, + ITEM_HEAVY_BOX_2 = 368, + ITEM_HEAVY_BOX_3 = 369, + ITEM_SHINY_BOX_1 = 370, + ITEM_SHINY_BOX_2 = 371, + ITEM_SHINY_BOX_3 = 372, + ITEM_NIFTY_BOX_1 = 373, + ITEM_NIFTY_BOX_2 = 374, + ITEM_NIFTY_BOX_3 = 375, + ITEM_DAINTY_BOX_1 = 376, + ITEM_DAINTY_BOX_2 = 377, + ITEM_DAINTY_BOX_3 = 378, + ITEM_GLITTERY_BOX_1 = 379, + ITEM_GLITTERY_BOX_2 = 380, + ITEM_GLITTERY_BOX_3 = 381, + ITEM_PRETTY_BOX_1 = 382, + ITEM_PRETTY_BOX_2 = 383, + ITEM_PRETTY_BOX_3 = 384, + ITEM_DELUXE_BOX_1 = 385, + ITEM_DELUXE_BOX_2 = 386, + ITEM_DELUXE_BOX_3 = 387, + ITEM_LIGHT_BOX_1 = 388, + ITEM_LIGHT_BOX_2 = 389, + ITEM_LIGHT_BOX_3 = 390, + ITEM_CUTE_BOX_1 = 391, + ITEM_CUTE_BOX_2 = 392, + ITEM_CUTE_BOX_3 = 393, + ITEM_HARD_BOX_1 = 394, + ITEM_HARD_BOX_2 = 395, + ITEM_HARD_BOX_3 = 396, + ITEM_SINISTER_BOX_1 = 397, + ITEM_SINISTER_BOX_2 = 398, + ITEM_SINISTER_BOX_3 = 399, + ITEM_A_STONE = 400, + ITEM_B_STONE = 401, + ITEM_C_STONE = 402, + ITEM_D_STONE = 403, + ITEM_E_STONE = 404, + ITEM_F_STONE = 405, + ITEM_G_STONE = 406, + ITEM_H_STONE = 407, + ITEM_I_STONE = 408, + ITEM_J_STONE = 409, + ITEM_K_STONE = 410, + ITEM_L_STONE = 411, + ITEM_M_STONE = 412, + ITEM_N_STONE = 413, + ITEM_O_STONE = 414, + ITEM_P_STONE = 415, + ITEM_Q_STONE = 416, + ITEM_R_STONE = 417, + ITEM_S_STONE = 418, + ITEM_T_STONE = 419, + ITEM_U_STONE = 420, + ITEM_V_STONE = 421, + ITEM_W_STONE = 422, + ITEM_X_STONE = 423, + ITEM_Y_STONE = 424, + ITEM_Z_STONE = 425, + ITEM_EXCLAMATION_STONE = 426, + ITEM_QUESTION_STONE = 427, + ITEM_SILVER_BOW = 428, + ITEM_BROWN_BOW = 429, + ITEM_RED_BOW = 430, + ITEM_PINK_BOW = 431, + ITEM_ORANGE_BOW = 432, + ITEM_YELLOW_BOW = 433, + ITEM_LIME_BOW = 434, + ITEM_GREEN_BOW = 435, + ITEM_VIRIDIAN_BOW = 436, + ITEM_MINTY_BOW = 437, + ITEM_SKY_BLUE_BOW = 438, + ITEM_BLUE_BOW = 439, + ITEM_COBALT_BOW = 440, + ITEM_PURPLE_BOW = 441, + ITEM_VIOLET_BOW = 442, + ITEM_FUCHSIA_BOW = 443, + ITEM_PRISM_RUFF = 444, + ITEM_AQUA_COLLAR = 445, + ITEM_VOLT_COLLAR = 446, + ITEM_FIRE_COLLAR = 447, + ITEM_LIGHT_COLLAR = 448, + ITEM_DUSK_COLLAR = 449, + ITEM_VIRID_COLLAR = 450, + ITEM_ICY_COLLAR = 451, + ITEM_PEP_SASH = 452, + ITEM_COUNTER_RUFF = 453, + ITEM_VICTORY_BELT = 454, + ITEM_POWER_BANGLE = 455, + ITEM_THUNDERSHARD = 456, + ITEM_FALLEN_STAR = 457, + ITEM_FLUFF_DUST = 458, + ITEM_EGG_SHARD = 459, + ITEM_HEROIC_MEDAL = 460, + ITEM_CHIC_SHARD = 461, + ITEM_YELLOW_JEWEL = 462, + ITEM_RED_JEWEL = 463, + ITEM_BLUE_JEWEL = 464, + ITEM_LAUGH_DUST = 465, + ITEM_GUARD_SAND = 466, + ITEM_PURPLE_JEWEL = 467, + ITEM_WHITE_JEWEL = 468, + ITEM_BRAVE_DUST = 469, + ITEM_HEAL_DEW = 470, + ITEM_MARINE_CACHE = 471, + ITEM_FREEZE_VEIL = 472, + ITEM_THUNDER_VEIL = 473, + ITEM_FIRE_VEIL = 474, + ITEM_HAVOC_ROBE = 475, + ITEM_LIFE_RING = 476, + ITEM_BOLT_FANG = 477, + ITEM_FLARE_FANG = 478, + ITEM_AQUA_MANTLE = 479, + ITEM_SILVER_VEIL = 480, + ITEM_RAINBOW_VEIL = 481, + ITEM_CHRONO_VEIL = 482, + ITEM_ROCK_SASH = 483, + ITEM_ICE_SASH = 484, + ITEM_STEEL_SASH = 485, + ITEM_HEART_BROOCH = 486, + ITEM_EON_VEIL = 487, + ITEM_SEABED_VEIL = 488, + ITEM_TERRA_RING = 489, + ITEM_SKYHIGH_VEIL = 490, + ITEM_WISH_MANTLE = 491, + ITEM_REVIVE_ROBE = 492, + ITEM_SHADOW_VEIL = 493, + ITEM_PLASMA_VEIL = 494, + ITEM_EDIFY_ROBE = 495, + ITEM_CHARITY_ROBE = 496, + ITEM_HOPE_ROBE = 497, + ITEM_TIME_SHIELD = 498, + ITEM_AIR_BLADE = 499, + ITEM_SEARING_RING = 500, + ITEM_ANCIENT_RING = 501, + ITEM_NETHER_VEIL = 502, + ITEM_LUNAR_VEIL = 503, + ITEM_TIDAL_CAPE = 504, + ITEM_ECLIPSE_ROBE = 505, + ITEM_WHITE_SILK = 506, + ITEM_NORMAL_DUST = 507, + ITEM_WHITE_GEM = 508, + ITEM_JOY_GLOBE = 509, + ITEM_RED_SILK = 510, + ITEM_FIRE_DUST = 511, + ITEM_FIERY_GEM = 512, + ITEM_FIERY_GLOBE = 513, + ITEM_BLUE_SILK = 514, + ITEM_WATER_DUST = 515, + ITEM_AQUA_GEM = 516, + ITEM_AQUA_GLOBE = 517, + ITEM_GRASS_SILK = 518, + ITEM_GRASS_DUST = 519, + ITEM_GRASS_GEM = 520, + ITEM_SOOTHE_GLOBE = 521, + ITEM_YELLOW_SILK = 522, + ITEM_THUNDER_DUST = 523, + ITEM_THUNDER_GEM = 524, + ITEM_VOLT_GLOBE = 525, + ITEM_CLEAR_SILK = 526, + ITEM_ICY_DUST = 527, + ITEM_ICY_GEM = 528, + ITEM_ICY_GLOBE = 529, + ITEM_ORANGE_SILK = 530, + ITEM_COURAGE_DUST = 531, + ITEM_FIGHT_GEM = 532, + ITEM_POWER_GLOBE = 533, + ITEM_PINK_SILK = 534, + ITEM_POISON_DUST = 535, + ITEM_POISON_GEM = 536, + ITEM_POISON_GLOBE = 537, + ITEM_BROWN_SILK = 538, + ITEM_GROUND_DUST = 539, + ITEM_EARTH_GEM = 540, + ITEM_TERRA_GLOBE = 541, + ITEM_SKY_SILK = 542, + ITEM_SKY_DUST = 543, + ITEM_SKY_GEM = 544, + ITEM_SKY_GLOBE = 545, + ITEM_GOLD_SILK = 546, + ITEM_PSYCHE_DUST = 547, + ITEM_PSYCHE_GEM = 548, + ITEM_PSYCHE_GLOBE = 549, + ITEM_GREEN_SILK = 550, + ITEM_WONDER_DUST = 551, + ITEM_GUARD_GEM = 552, + ITEM_DEFEND_GLOBE = 553, + ITEM_GRAY_SILK = 554, + ITEM_ROCK_DUST = 555, + ITEM_STONE_GEM = 556, + ITEM_ROCK_GLOBE = 557, + ITEM_PURPLE_SILK = 558, + ITEM_SHADY_DUST = 559, + ITEM_SHADOW_GEM = 560, + ITEM_NETHER_GLOBE = 561, + ITEM_ROYAL_SILK = 562, + ITEM_DRAGON_DUST = 563, + ITEM_DRAGON_GEM = 564, + ITEM_DRAGON_GLOBE = 565, + ITEM_BLACK_SILK = 566, + ITEM_DARK_DUST = 567, + ITEM_DARK_GEM = 568, + ITEM_DUSK_GLOBE = 569, + ITEM_IRON_SILK = 570, + ITEM_STEEL_DUST = 571, + ITEM_METAL_GEM = 572, + ITEM_STEEL_GLOBE = 573, + ITEM_BULBA_CLAW = 574, + ITEM_BULBA_FANG = 575, + ITEM_GRASS_GUARD = 576, + ITEM_LEAFY_TIE = 577, + ITEM_IVY_CLAW = 578, + ITEM_IVY_FANG = 579, + ITEM_IVY_CREST = 580, + ITEM_PLANT_TORC = 581, + ITEM_VENUS_CLAW = 582, + ITEM_VENUS_FANG = 583, + ITEM_VENUS_SEAL = 584, + ITEM_SOLAR_SASH = 585, + ITEM_CHAR_CLAW = 586, + ITEM_CHAR_FANG = 587, + ITEM_FIERY_HEART = 588, + ITEM_HEAT_ARMLET = 589, + ITEM_CHARME_CLAW = 590, + ITEM_CHARME_FANG = 591, + ITEM_CHARME_CREST = 592, + ITEM_KINDLE_SCARF = 593, + ITEM_CHARIZ_CLAW = 594, + ITEM_CHARIZ_FANG = 595, + ITEM_CHARIZ_SEAL = 596, + ITEM_FLAME_BANGLE = 597, + ITEM_SQUIRT_FOAM = 598, + ITEM_SQUIRT_CARD = 599, + ITEM_WATER_GUARD = 600, + ITEM_AQUA_TIE = 601, + ITEM_WARTOR_CLAW = 602, + ITEM_WARTOR_FANG = 603, + ITEM_WARTOR_CREST = 604, + ITEM_BUBBLEBANGLE = 605, + ITEM_BLASTO_CLAW = 606, + ITEM_BLASTO_CARD = 607, + ITEM_BLASTO_SEAL = 608, + ITEM_HYDRO_BAND = 609, + ITEM_PICHU_HAIR = 610, + ITEM_PICHU_CARD = 611, + ITEM_EXPRESS_TAG = 612, + ITEM_SHOCKER_CAPE = 613, + ITEM_PIKACHU_HAIR = 614, + ITEM_PIKACHU_CARD = 615, + ITEM_VOLT_CHARM = 616, + ITEM_VOLT_TORC = 617, + ITEM_RAICHU_HAIR = 618, + ITEM_RAICHU_CARD = 619, + ITEM_RAICHU_CREST = 620, + ITEM_ZAPPER_SCARF = 621, + ITEM_MEOWTH_CLAW = 622, + ITEM_MEOWTH_FANG = 623, + ITEM_COIN_CHARM = 624, + ITEM_BLING_RUFF = 625, + ITEM_PERSIAN_CLAW = 626, + ITEM_PERSIAN_FANG = 627, + ITEM_INSIGHT_ROCK = 628, + ITEM_NOBLE_SCARF = 629, + ITEM_CHIKO_CLAW = 630, + ITEM_CHIKO_CARD = 631, + ITEM_DAWN_JEWEL = 632, + ITEM_FRESH_BOW = 633, + ITEM_BAYLEEF_CLAW = 634, + ITEM_BAYLEEF_CARD = 635, + ITEM_BAYLEEF_SEAL = 636, + ITEM_SPICE_BOW = 637, + ITEM_MEGANI_CLAW = 638, + ITEM_MEGANI_CARD = 639, + ITEM_SHINY_CHARM = 640, + ITEM_BRIGHT_VEIL = 641, + ITEM_CYNDA_HAIR = 642, + ITEM_CYNDA_CLAW = 643, + ITEM_BLAZING_ROCK = 644, + ITEM_STORM_SASH = 645, + ITEM_QUILA_HAIR = 646, + ITEM_QUILA_CARD = 647, + ITEM_QUILA_CREST = 648, + ITEM_VOLCANO_TORC = 649, + ITEM_TYPHLO_GASP = 650, + ITEM_TYPHLO_FANG = 651, + ITEM_TYPHLO_SEAL = 652, + ITEM_BLAST_BANGLE = 653, + ITEM_TOTODI_DEW = 654, + ITEM_TOTODI_FANG = 655, + ITEM_WATER_HEART = 656, + ITEM_WASH_BOW = 657, + ITEM_CROCO_FANG = 658, + ITEM_CROCO_CARD = 659, + ITEM_SWIRL_ROCK = 660, + ITEM_ANGER_SCARF = 661, + ITEM_FERAL_CLAW = 662, + ITEM_FERAL_FANG = 663, + ITEM_FERAL_CREST = 664, + ITEM_HYDRO_JAW = 665, + ITEM_TREECK_THORN = 666, + ITEM_TREECK_CARD = 667, + ITEM_FOREST_ORE = 668, + ITEM_GUARD_RING = 669, + ITEM_GROVY_SHOOT = 670, + ITEM_GROVY_CARD = 671, + ITEM_JUNGLE_TAG = 672, + ITEM_GRASS_BLADE = 673, + ITEM_SCEPT_CLAW = 674, + ITEM_SCEPT_CARD = 675, + ITEM_SCEPT_SEAL = 676, + ITEM_DRAIN_BANGLE = 677, + ITEM_TORCHIC_HAIR = 678, + ITEM_TORCHIC_CARD = 679, + ITEM_HOT_PEBBLE = 680, + ITEM_FIRE_CAPE = 681, + ITEM_COMBUS_SWEAT = 682, + ITEM_COMBUS_CLAW = 683, + ITEM_CHARGE_TAG = 684, + ITEM_GUTSY_BAND = 685, + ITEM_BLAZI_CLAW = 686, + ITEM_BLAZI_CARD = 687, + ITEM_BLAZI_SEAL = 688, + ITEM_BLAZE_TORC = 689, + ITEM_MUDKIP_MUD = 690, + ITEM_MUDKIP_CARD = 691, + ITEM_MUD_JEWEL = 692, + ITEM_SPEED_SCARF = 693, + ITEM_MARSH_MUD = 694, + ITEM_MARSH_CARD = 695, + ITEM_MARSH_CREST = 696, + ITEM_MARSH_TORC = 697, + ITEM_SWAMP_MUD = 698, + ITEM_SWAMP_CARD = 699, + ITEM_SWAMP_SEAL = 700, + ITEM_SWAMP_BANGLE = 701, + ITEM_SKITTY_FANG = 702, + ITEM_SKITTY_CARD = 703, + ITEM_SMILE_PEBBLE = 704, + ITEM_HEAL_PENDANT = 705, + ITEM_DELCAT_HAIR = 706, + ITEM_DELCAT_FANG = 707, + ITEM_PRIM_PEBBLE = 708, + ITEM_GUARD_COLLAR = 709, + ITEM_LUCKY_LEAF = 710, + ITEM_TURTWIG_CARD = 711, + ITEM_SPROUT_ROCK = 712, + ITEM_LEAFY_HAT = 713, + ITEM_GROTLE_TWIG = 714, + ITEM_GROTLE_CLAW = 715, + ITEM_GROTLE_CREST = 716, + ITEM_WOODY_SCARF = 717, + ITEM_TORT_CLAW = 718, + ITEM_TORT_HORN = 719, + ITEM_TORT_SEAL = 720, + ITEM_FOREST_TORC = 721, + ITEM_CHIM_HAIR = 722, + ITEM_CHIM_FANG = 723, + ITEM_NIMBLE_CHARM = 724, + ITEM_EMBER_CAP = 725, + ITEM_MONFER_HAIR = 726, + ITEM_MONFER_FANG = 727, + ITEM_MONFER_CREST = 728, + ITEM_BURST_SASH = 729, + ITEM_INFERN_HAIR = 730, + ITEM_INFERN_FANG = 731, + ITEM_INFERN_SEAL = 732, + ITEM_BLAZING_RUFF = 733, + ITEM_PIPLUP_FOAM = 734, + ITEM_PIPLUP_CARD = 735, + ITEM_SEA_ORE = 736, + ITEM_WATER_CAPE = 737, + ITEM_PRIN_FOAM = 738, + ITEM_PRIN_CARD = 739, + ITEM_PRIN_CREST = 740, + ITEM_AQUA_BLADE = 741, + ITEM_EMPOL_CLAW = 742, + ITEM_EMPOL_HORN = 743, + ITEM_EMPOL_SEAL = 744, + ITEM_MARINE_CROWN = 745, + ITEM_MUNCH_DROOL = 746, + ITEM_MUNCH_CLAW = 747, + ITEM_TUMMY_CHARM = 748, + ITEM_GLUTTON_CAPE = 749, + ITEM_SNORLAX_GASP = 750, + ITEM_SNORLAX_FANG = 751, + ITEM_VALOR_CHARM = 752, + ITEM_GLEE_SCARF = 753, + ITEM_SCYTHER_FANG = 754, + ITEM_SCYTHER_CARD = 755, + ITEM_AMBUSH_ROCK = 756, + ITEM_STRIKE_RUFF = 757, + ITEM_SCIZOR_WING = 758, + ITEM_SCIZOR_CARD = 759, + ITEM_STEEL_CHARM = 760, + ITEM_RED_ARMLET = 761, + ITEM_LAPRAS_SONG = 762, + ITEM_LAPRAS_CARD = 763, + ITEM_WAVY_CHARM = 764, + ITEM_MYSTIC_SCARF = 765, + ITEM_EEVEE_TAIL = 766, + ITEM_EEVEE_CARD = 767, + ITEM_EVOLVE_CHARM = 768, + ITEM_EEVEE = 769, + ITEM_CLEFFA_DEW = 770, + ITEM_CLEFFA_CARD = 771, + ITEM_STARRY_ORE = 772, + ITEM_COMET_RING = 773, + ITEM_CLEF_CLAW = 774, + ITEM_CLEF_FANG = 775, + ITEM_MOON_JEWEL = 776, + ITEM_MOON_SCARF = 777, + ITEM_CLEFA_CLAW = 778, + ITEM_CLEFA_CARD = 779, + ITEM_MOON_ROCK = 780, + ITEM_FAIRY_BOW = 781, + ITEM_IGGLY_DEW = 782, + ITEM_IGGLY_CARD = 783, + ITEM_BOUNCY_CHARM = 784, + ITEM_PRETTY_BOW = 785, + ITEM_JIGGLY_SONG = 786, + ITEM_JIGGLY_CARD = 787, + ITEM_SLUMBER_ROCK = 788, + ITEM_SNOOZE_RING = 789, + ITEM_WIGGLY_HAIR = 790, + ITEM_WIGGLY_CARD = 791, + ITEM_BUDDY_ROCK = 792, + ITEM_FRIEND_TORC = 793, + ITEM_TOGEPI_DEW = 794, + ITEM_TOGEPI_CARD = 795, + ITEM_PURE_HEART = 796, + ITEM_ANGEL_SCARF = 797, + ITEM_TOGETIC_WING = 798, + ITEM_TOGETIC_CARD = 799, + ITEM_HAPPY_ROCK = 800, + ITEM_LUCK_BROOCH = 801, + ITEM_TOGEK_WING = 802, + ITEM_TOGEK_CARD = 803, + ITEM_OVATION_ROCK = 804, + ITEM_GLITTER_ROBE = 805, + ITEM_SNEASEL_CLAW = 806, + ITEM_SNEASEL_CARD = 807, + ITEM_DUSK_JEWEL = 808, + ITEM_CRUEL_RING = 809, + ITEM_WEAVILE_CLAW = 810, + ITEM_WEAVILE_FANG = 811, + ITEM_VILE_TAG = 812, + ITEM_RUIN_ARMLET = 813, + ITEM_TEDDI_CLAW = 814, + ITEM_TEDDI_CARD = 815, + ITEM_HONEY_ROCK = 816, + ITEM_HEAL_SCARF = 817, + ITEM_URSA_CLAW = 818, + ITEM_URSA_FANG = 819, + ITEM_CALMING_ROCK = 820, + ITEM_HIBER_SCARF = 821, + ITEM_TYRO_SWEAT = 822, + ITEM_TYRO_CARD = 823, + ITEM_MUSCLE_CHARM = 824, + ITEM_TYROGUE = 825, + ITEM_SMOOCH_SONG = 826, + ITEM_SMOOCH_CARD = 827, + ITEM_KISS_CHARM = 828, + ITEM_HEART_TIARA = 829, + ITEM_JYNX_SONG = 830, + ITEM_JYNX_CARD = 831, + ITEM_FROZEN_ORE = 832, + ITEM_RUIN_SCARF = 833, + ITEM_ELEKID_CLAW = 834, + ITEM_ELEKID_CARD = 835, + ITEM_JOLT_CHARM = 836, + ITEM_CURRENT_RING = 837, + ITEM_ELECTA_CLAW = 838, + ITEM_ELECTA_FANG = 839, + ITEM_CHARGE_SEAL = 840, + ITEM_VOLT_BANGLE = 841, + ITEM_ELECTI_CLAW = 842, + ITEM_ELECTI_CARD = 843, + ITEM_VOLTAIC_ROCK = 844, + ITEM_VOLTAIC_BAND = 845, + ITEM_MAGBY_CLAW = 846, + ITEM_MAGBY_CARD = 847, + ITEM_EMBER_JEWEL = 848, + ITEM_COAL_RING = 849, + ITEM_MAGMAR_CLAW = 850, + ITEM_MAGMAR_CARD = 851, + ITEM_ERUPT_ORE = 852, + ITEM_MAGMA_SCARF = 853, + ITEM_MAGMOR_CLAW = 854, + ITEM_MAGMOR_CARD = 855, + ITEM_VULCAN_ROCK = 856, + ITEM_BURNING_TORC = 857, + ITEM_AZURI_DEW = 858, + ITEM_AZURI_CARD = 859, + ITEM_FOUNT_CHARM = 860, + ITEM_WATER_FLOAT = 861, + ITEM_MARILL_DEW = 862, + ITEM_MARILL_CARD = 863, + ITEM_SURFER_ROCK = 864, + ITEM_BRINE_SCARF = 865, + ITEM_AZUMA_DEW = 866, + ITEM_AZUMA_CARD = 867, + ITEM_STREAM_CHARM = 868, + ITEM_DOTTED_SCARF = 869, + ITEM_PLUSLE_TAIL = 870, + ITEM_PLUSLE_CARD = 871, + ITEM_CHEER_ROCK = 872, + ITEM_PULSE_BOW = 873, + ITEM_MINUN_TAIL = 874, + ITEM_MINUN_CARD = 875, + ITEM_VOLT_HEART = 876, + ITEM_SPARK_TIE = 877, + ITEM_CAST_DEW = 878, + ITEM_CAST_CARD = 879, + ITEM_CLOUD_ROCK = 880, + ITEM_WEATHER_CAPE = 881, + ITEM_WYNAUT_TAIL = 882, + ITEM_WYNAUT_CARD = 883, + ITEM_GRIN_CHARM = 884, + ITEM_CHEERY_SCARF = 885, + ITEM_WOBBU_SWEAT = 886, + ITEM_WOBBU_CARD = 887, + ITEM_ENDURE_ROCK = 888, + ITEM_SUFFER_SCARF = 889, + ITEM_BIDOOF_TOOTH = 890, + ITEM_BIDOOF_CARD = 891, + ITEM_FALL_CHARM = 892, + ITEM_STOLID_SCARF = 893, + ITEM_BIBA_TOOTH = 894, + ITEM_BIBA_CARD = 895, + ITEM_RIVER_CHARM = 896, + ITEM_DAM_SCARF = 897, + ITEM_SHINX_CLAW = 898, + ITEM_SHINX_FANG = 899, + ITEM_FLASH_TAG = 900, + ITEM_ENERGY_SCARF = 901, + ITEM_LUXIO_CLAW = 902, + ITEM_LUXIO_FANG = 903, + ITEM_SPARK_TAG = 904, + ITEM_SPARK_SCARF = 905, + ITEM_LUXRAY_CLAW = 906, + ITEM_LUXRAY_FANG = 907, + ITEM_GLARE_TAG = 908, + ITEM_GLARE_SASH = 909, + ITEM_PACHI_TOOTH = 910, + ITEM_PACHI_CARD = 911, + ITEM_ROUSE_CHARM = 912, + ITEM_MIRACLE_BOW = 913, + ITEM_BUIZEL_FANG = 914, + ITEM_BUIZEL_CARD = 915, + ITEM_SWIMMER_ROCK = 916, + ITEM_SCREW_TORC = 917, + ITEM_FLOAT_FANG = 918, + ITEM_FLOAT_CARD = 919, + ITEM_RESCUE_ROCK = 920, + ITEM_FLOAT_AID = 921, + ITEM_DRIFLOO_GASP = 922, + ITEM_DRIFLOO_CARD = 923, + ITEM_WIND_HEART = 924, + ITEM_DRAFT_RING = 925, + ITEM_DRIFBLI_GASP = 926, + ITEM_DRIFBLI_CARD = 927, + ITEM_EASY_CHARM = 928, + ITEM_BREEZE_SCARF = 929, + ITEM_CHERUBI_SEED = 930, + ITEM_CHERUBI_CARD = 931, + ITEM_CUTE_ORE = 932, + ITEM_CHARM_BOW = 933, + ITEM_CHERRIM_DEW = 934, + ITEM_CHERRIM_CARD = 935, + ITEM_SWEET_AROMA = 936, + ITEM_PETAL_DRESS = 937, + ITEM_BONSLY_DEW = 938, + ITEM_BONSLY_CARD = 939, + ITEM_ARID_TAG = 940, + ITEM_TEARY_CAPE = 941, + ITEM_SUDO_SWEAT = 942, + ITEM_SUDO_CARD = 943, + ITEM_DRAIN_ROCK = 944, + ITEM_FAKE_TORC = 945, + ITEM_JUNIOR_BEAM = 946, + ITEM_JUNIOR_CARD = 947, + ITEM_MIMIC_PEBBLE = 948, + ITEM_COPY_MASK = 949, + ITEM_MIME_KEY = 950, + ITEM_MIME_CARD = 951, + ITEM_BULWARK_ROCK = 952, + ITEM_BARRIER_BOW = 953, + ITEM_HAPPINY_DEW = 954, + ITEM_HAPPINY_CARD = 955, + ITEM_PLAY_TAG = 956, + ITEM_NURTURE_CAPE = 957, + ITEM_CHANSEY_SONG = 958, + ITEM_CHANSEY_CARD = 959, + ITEM_LUCKY_CHARM = 960, + ITEM_LUCKY_SCARF = 961, + ITEM_BLISSEY_SONG = 962, + ITEM_BLISSEY_CARD = 963, + ITEM_AMITY_ROCK = 964, + ITEM_FAITH_RING = 965, + ITEM_GIBLE_FANG = 966, + ITEM_GIBLE_CARD = 967, + ITEM_DRAGON_JEWEL = 968, + ITEM_DRAGON_TIE = 969, + ITEM_GABITE_CLAW = 970, + ITEM_GABITE_FANG = 971, + ITEM_STAR_ROCK = 972, + ITEM_METEOR_TORC = 973, + ITEM_GAR_CLAW = 974, + ITEM_GAR_FANG = 975, + ITEM_SPEED_TAG = 976, + ITEM_MACH_SCARF = 977, + ITEM_RIOLU_TAIL = 978, + ITEM_RIOLU_CARD = 979, + ITEM_VALIANT_ROCK = 980, + ITEM_EMIT_RING = 981, + ITEM_LUCARIO_FANG = 982, + ITEM_LUCARIO_CARD = 983, + ITEM_PLEDGE_ROCK = 984, + ITEM_RAVAGE_RING = 985, + ITEM_MANTYKE_BEAM = 986, + ITEM_MANTYKE_CARD = 987, + ITEM_WAFT_ROCK = 988, + ITEM_OCEAN_BOW = 989, + ITEM_MANTINE_FOAM = 990, + ITEM_MANTINE_CARD = 991, + ITEM_SUNSET_ROCK = 992, + ITEM_HORIZON_BOW = 993, + ITEM_PHIONE_SONG = 994, + ITEM_PHIONE_CARD = 995, + ITEM_WAVE_JEWEL = 996, + ITEM_RIPPLE_CAPE = 997, + ITEM_VULPIX_TAIL = 998, + ITEM_VULPIX_CARD = 999, + ITEM_VULPIX_TAG = 1000, + ITEM_GLOWING_BOW = 1001, + ITEM_NINE_HAIR = 1002, + ITEM_NINE_CARD = 1003, + ITEM_NINE_SEAL = 1004, + ITEM_AFIRE_COLLAR = 1005, + ITEM_PHANPY_CLAW = 1006, + ITEM_PHANPY_CARD = 1007, + ITEM_PHANPY_TAG = 1008, + ITEM_VALUE_RUFF = 1009, + ITEM_DONPHAN_FANG = 1010, + ITEM_DONPHAN_CARD = 1011, + ITEM_DON_CREST = 1012, + ITEM_ARMOR_SCARF = 1013, + ITEM_CATER_BELT = 1014, + ITEM_DEFENSE_BOW = 1015, + ITEM_GLITTERY_BOW = 1016, + ITEM_WEEDLE_BOW = 1017, + ITEM_KAKUNA_SCARF = 1018, + ITEM_CHARGE_SCARF = 1019, + ITEM_PIDGEY_BOW = 1020, + ITEM_PIDGEO_SCARF = 1021, + ITEM_PIDGEOT_TORC = 1022, + ITEM_RATTA_SCARF = 1023, + ITEM_OVERCOME_BOW = 1024, + ITEM_QUIRKY_BOW = 1025, + ITEM_WING_SCARF = 1026, + ITEM_LEASH_BOW = 1027, + ITEM_SHOCK_RUFF = 1028, + ITEM_SAND_SCARF = 1029, + ITEM_SANDY_TORC = 1030, + ITEM_POINTY_SCARF = 1031, + ITEM_RETURN_SCARF = 1032, + ITEM_IMPACT_TORC = 1033, + ITEM_HALVE_SCARF = 1034, + ITEM_THORNY_SCARF = 1035, + ITEM_KING_SASH = 1036, + ITEM_DODGE_BOW = 1037, + ITEM_ABSORB_SCARF = 1038, + ITEM_ODD_BOW = 1039, + ITEM_GUARD_HAT = 1040, + ITEM_AROMA_SCARF = 1041, + ITEM_MOVING_SCARF = 1042, + ITEM_FIRM_HAT = 1043, + ITEM_GAZE_GOGGLES = 1044, + ITEM_VENOMOTH_BOW = 1045, + ITEM_DIGLETT_HAT = 1046, + ITEM_DUGTRIO_BOW = 1047, + ITEM_PSYDUCK_HAT = 1048, + ITEM_PADDLE_SCARF = 1049, + ITEM_MANKEY_TORC = 1050, + ITEM_NULLIFY_BELT = 1051, + ITEM_GROWL_SCARF = 1052, + ITEM_LEGEND_BOW = 1053, + ITEM_DAMP_BOW = 1054, + ITEM_POLI_BOW = 1055, + ITEM_BOLD_BELT = 1056, + ITEM_PREDICT_TORC = 1057, + ITEM_PSYCHIC_TORC = 1058, + ITEM_SPARKLE_RUFF = 1059, + ITEM_IMPISH_BAND = 1060, + ITEM_STRONG_BELT = 1061, + ITEM_MACHAMP_BELT = 1062, + ITEM_BELL_BOW = 1063, + ITEM_DIGEST_SCARF = 1064, + ITEM_VICTREE_TORC = 1065, + ITEM_TANGLE_BOW = 1066, + ITEM_TENTA_CAPE = 1067, + ITEM_GEODUDE_TORC = 1068, + ITEM_ROCKY_TORC = 1069, + ITEM_RUGGED_SASH = 1070, + ITEM_HEATED_BOW = 1071, + ITEM_SUNLIGHT_BOW = 1072, + ITEM_SLOWPOKE_HAT = 1073, + ITEM_SLOW_SCARF = 1074, + ITEM_MAGNE_TORC = 1075, + ITEM_MAGNETON_BOW = 1076, + ITEM_BULLSEYE_BOW = 1077, + ITEM_BUDDY_TORC = 1078, + ITEM_FIGHT_TORC = 1079, + ITEM_GENTLE_BOW = 1080, + ITEM_NORTH_TORC = 1081, + ITEM_GRIMY_SCARF = 1082, + ITEM_SLIMY_BOW = 1083, + ITEM_SHELL_TORC = 1084, + ITEM_COVER_ARMOR = 1085, + ITEM_GASTLY_VEIL = 1086, + ITEM_SLIP_SCARF = 1087, + ITEM_SUNGLASSES = 1088, + ITEM_TRUST_BROOCH = 1089, + ITEM_DROWZEE_TIE = 1090, + ITEM_DREAM_COIN = 1091, + ITEM_KRABBY_BOW = 1092, + ITEM_SUPER_SASH = 1093, + ITEM_BALL_SCARF = 1094, + ITEM_ELECTRO_BOW = 1095, + ITEM_REPEL_SCARF = 1096, + ITEM_EXEGGU_SASH = 1097, + ITEM_CUBONE_SCARF = 1098, + ITEM_MAROWAK_TORC = 1099, + ITEM_LICKY_SCARF = 1100, + ITEM_KOFFING_BOW = 1101, + ITEM_WEEZ_SCARF = 1102, + ITEM_SOLID_SHIELD = 1103, + ITEM_PIERCE_DRILL = 1104, + ITEM_STICKY_BOW = 1105, + ITEM_KANG_APRON = 1106, + ITEM_HORSEA_BOW = 1107, + ITEM_SWIRL_SCARF = 1108, + ITEM_GOLDEEN_BOW = 1109, + ITEM_SEAKING_BOW = 1110, + ITEM_RECOVER_TORC = 1111, + ITEM_STARMIE_BELT = 1112, + ITEM_PINSIR_SASH = 1113, + ITEM_RUSHING_BOW = 1114, + ITEM_MAGIKARP_BOW = 1115, + ITEM_TEMPEST_SASH = 1116, + ITEM_DITTO_TORC = 1117, + ITEM_AI_BROOCH = 1118, + ITEM_SPIKE_BROOCH = 1119, + ITEM_AGED_SCARF = 1120, + ITEM_KABUTO_HAT = 1121, + ITEM_KABU_TORC = 1122, + ITEM_OLD_BROOCH = 1123, + ITEM_DRAGON_SASH = 1124, + ITEM_ALOFT_MANTLE = 1125, + ITEM_MIRAGE_CAPE = 1126, + ITEM_SENTRET_RUFF = 1127, + ITEM_BODY_COLLAR = 1128, + ITEM_EXPOSE_SPECS = 1129, + ITEM_NOCTOWL_TORC = 1130, + ITEM_MORNING_BOW = 1131, + ITEM_LEDIAN_BOW = 1132, + ITEM_SPINA_SCARF = 1133, + ITEM_ARIADOS_BOW = 1134, + ITEM_SLASH_BOW = 1135, + ITEM_SHINE_TORC = 1136, + ITEM_LANTURN_BOW = 1137, + ITEM_LIVELY_SCARF = 1138, + ITEM_XATU_BOW = 1139, + ITEM_WOOL_BOW = 1140, + ITEM_FLUFFY_SCARF = 1141, + ITEM_SACRED_SCARF = 1142, + ITEM_BRIGHT_TIARA = 1143, + ITEM_RAIN_CROWN = 1144, + ITEM_ZEPHYR_BOW = 1145, + ITEM_SKIP_SCARF = 1146, + ITEM_COTTON_TORC = 1147, + ITEM_REVENGE_RUFF = 1148, + ITEM_HASTY_BOW = 1149, + ITEM_SUN_SCARF = 1150, + ITEM_CHITIN_BOW = 1151, + ITEM_WOOPER_BOW = 1152, + ITEM_QUAG_TORC = 1153, + ITEM_MURKROW_HAT = 1154, + ITEM_KING_CAP = 1155, + ITEM_MISDREA_CAPE = 1156, + ITEM_CRYPTIC_SASH = 1157, + ITEM_REVERSE_BOW = 1158, + ITEM_ROBUST_BOW = 1159, + ITEM_DENSE_PONCHO = 1160, + ITEM_ESCAPE_SCARF = 1161, + ITEM_TAKEOFF_RUFF = 1162, + ITEM_QUARTZ_TORC = 1163, + ITEM_SNUB_CAPE = 1164, + ITEM_STERN_SASH = 1165, + ITEM_QWILFISH_BOW = 1166, + ITEM_SHUCKLE_BOW = 1167, + ITEM_HORN_TORC = 1168, + ITEM_LAVA_BOW = 1169, + ITEM_TORRID_SCARF = 1170, + ITEM_FRIGID_BOW = 1171, + ITEM_FROST_TORC = 1172, + ITEM_EAGER_BROOCH = 1173, + ITEM_REACH_BOW = 1174, + ITEM_PSY_BOW = 1175, + ITEM_SNOW_BROOCH = 1176, + ITEM_SKAR_CAPE = 1177, + ITEM_DARK_CHOKER = 1178, + ITEM_PIT_FANG = 1179, + ITEM_TORNADO_BOW = 1180, + ITEM_VIRTUAL_BOW = 1181, + ITEM_DELUSION_BOW = 1182, + ITEM_PAINT_SCARF = 1183, + ITEM_MILKY_SCARF = 1184, + ITEM_LARVITAR_BOW = 1185, + ITEM_PUPITA_SCARF = 1186, + ITEM_CRASH_CLAW = 1187, + ITEM_POOCH_COLLAR = 1188, + ITEM_DARK_FANG = 1189, + ITEM_MERRY_SCARF = 1190, + ITEM_LINOONE_RUFF = 1191, + ITEM_WURMPLE_BOW = 1192, + ITEM_TOUGH_SCARF = 1193, + ITEM_VIVID_SILK = 1194, + ITEM_GUARD_BOW = 1195, + ITEM_DUSTOX_BOW = 1196, + ITEM_KELP_HAT = 1197, + ITEM_JOLLY_SCARF = 1198, + ITEM_LUDICOLO_HAT = 1199, + ITEM_SEEDOT_HAT = 1200, + ITEM_NUZLEAF_BOW = 1201, + ITEM_SHIFTRY_BELT = 1202, + ITEM_TAILLOW_BOW = 1203, + ITEM_MIDAIR_SCARF = 1204, + ITEM_WINGULL_BOW = 1205, + ITEM_STOCK_SCARF = 1206, + ITEM_SENSING_HAT = 1207, + ITEM_MAGICAL_BOW = 1208, + ITEM_CARING_SCARF = 1209, + ITEM_BLISS_SCARF = 1210, + ITEM_BLOCKING_BOW = 1211, + ITEM_MOBILE_BOW = 1212, + ITEM_THWART_BOW = 1213, + ITEM_SLAK_SCARF = 1214, + ITEM_VIGOR_SASH = 1215, + ITEM_LAZY_RUFF = 1216, + ITEM_NOVICE_SCARF = 1217, + ITEM_NINJA_RUFF = 1218, + ITEM_AWE_MANTLE = 1219, + ITEM_GOOD_EARRING = 1220, + ITEM_NICE_BANGLE = 1221, + ITEM_GREAT_TORC = 1222, + ITEM_MAKUHIT_BELT = 1223, + ITEM_THRUST_BELT = 1224, + ITEM_NOSE_TORC = 1225, + ITEM_SABLE_SCOPE = 1226, + ITEM_DECEIT_MASK = 1227, + ITEM_IRON_TORC = 1228, + ITEM_METAL_BANGLE = 1229, + ITEM_IRON_HELMET = 1230, + ITEM_INTUIT_BOW = 1231, + ITEM_PONDER_SASH = 1232, + ITEM_PUNISH_TORC = 1233, + ITEM_PROTECT_MASK = 1234, + ITEM_NEON_SCARF = 1235, + ITEM_EVENING_BOW = 1236, + ITEM_THORNED_TORC = 1237, + ITEM_GULPIN_BOW = 1238, + ITEM_SWALOT_BELT = 1239, + ITEM_CARVA_SASH = 1240, + ITEM_VICIOUS_BOW = 1241, + ITEM_SPOUT_SCARF = 1242, + ITEM_HUGE_BOW = 1243, + ITEM_NUMEL_BOW = 1244, + ITEM_ERUPT_SCARF = 1245, + ITEM_SOOTY_SASH = 1246, + ITEM_SPRING_BOW = 1247, + ITEM_SCHEME_SCARF = 1248, + ITEM_HULA_BOW = 1249, + ITEM_DESERT_BOW = 1250, + ITEM_VIBRA_SCARF = 1251, + ITEM_RED_GLASSES = 1252, + ITEM_DESERT_SASH = 1253, + ITEM_CACTURNE_HAT = 1254, + ITEM_TUFT_BOW = 1255, + ITEM_CLOUD_RUFF = 1256, + ITEM_STRONG_SASH = 1257, + ITEM_SEVIPER_BOW = 1258, + ITEM_LUNATON_TORC = 1259, + ITEM_SOLROCK_BOW = 1260, + ITEM_SOAK_SCARF = 1261, + ITEM_WHISCASH_BOW = 1262, + ITEM_BOSSY_SCARF = 1263, + ITEM_COWER_SASH = 1264, + ITEM_BAL_BROOCH = 1265, + ITEM_CLAYDOL_TORC = 1266, + ITEM_BIND_SCARF = 1267, + ITEM_CRADILY_BOW = 1268, + ITEM_GUARD_CLAW = 1269, + ITEM_RIGID_CAPE = 1270, + ITEM_ADMIRE_SCARF = 1271, + ITEM_GRACE_SCARF = 1272, + ITEM_KECLEON_TORC = 1273, + ITEM_SHUPPET_CAPE = 1274, + ITEM_OMINOUS_TORC = 1275, + ITEM_DUSKULL_RUFF = 1276, + ITEM_ILLUSION_BOW = 1277, + ITEM_TROPIUS_BOW = 1278, + ITEM_CHIME_SCARF = 1279, + ITEM_PERISH_TORC = 1280, + ITEM_CHILLY_HAT = 1281, + ITEM_HAIL_SCARF = 1282, + ITEM_SLEET_BOW = 1283, + ITEM_SAFE_SCARF = 1284, + ITEM_WALREIN_TORC = 1285, + ITEM_CLAM_BROOCH = 1286, + ITEM_DEEP_TORC = 1287, + ITEM_GORE_SCARF = 1288, + ITEM_RELI_TORC = 1289, + ITEM_LUVDISC_TORC = 1290, + ITEM_CRAG_HELMET = 1291, + ITEM_OUTLAST_BOW = 1292, + ITEM_SALA_CAPE = 1293, + ITEM_BELDUM_TORC = 1294, + ITEM_METANG_SCARF = 1295, + ITEM_META_TORC = 1296, + ITEM_STARLY_BOW = 1297, + ITEM_REGRET_TORC = 1298, + ITEM_GUTS_SASH = 1299, + ITEM_STILL_BOW = 1300, + ITEM_KRICKE_TORC = 1301, + ITEM_BUDEW_SCARF = 1302, + ITEM_BOUQUET_CAPE = 1303, + ITEM_HARD_HELMET = 1304, + ITEM_SKULL_HELMET = 1305, + ITEM_REBOUND_BOW = 1306, + ITEM_BLOCK_BROOCH = 1307, + ITEM_STRAW_CAPE = 1308, + ITEM_WORMA_BOW = 1309, + ITEM_MOTHIM_BOW = 1310, + ITEM_NECTAR_BOW = 1311, + ITEM_VESPI_TORC = 1312, + ITEM_AWAKE_BOW = 1313, + ITEM_GASTRO_TORC = 1314, + ITEM_AMBIPOM_BOW = 1315, + ITEM_DEFROST_RUFF = 1316, + ITEM_ALLURE_COAT = 1317, + ITEM_MAGIC_HAT = 1318, + ITEM_HONCH_CAPE = 1319, + ITEM_GLAMEOW_BOW = 1320, + ITEM_SCARY_BELT = 1321, + ITEM_CHING_TORC = 1322, + ITEM_STINKY_SCARF = 1323, + ITEM_STENCH_SASH = 1324, + ITEM_IMAGE_BROOCH = 1325, + ITEM_MIRROR_TORC = 1326, + ITEM_CHATOT_SCARF = 1327, + ITEM_THICK_SCARF = 1328, + ITEM_GRIT_VEIL = 1329, + ITEM_SKORUPI_BOW = 1330, + ITEM_DUST_SCARF = 1331, + ITEM_CROA_TORC = 1332, + ITEM_TOXI_BELT = 1333, + ITEM_CARNI_BOW = 1334, + ITEM_SWIM_BOW = 1335, + ITEM_LUMI_TORC = 1336, + ITEM_SNOWY_TORC = 1337, + ITEM_FROZEN_CAPE = 1338, + ITEM_BUILDER_SASH = 1339, + ITEM_FLABBY_BELT = 1340, + ITEM_RHYPERI_TORC = 1341, + ITEM_CLINGING_BOW = 1342, + ITEM_YANMEGA_BOW = 1343, + ITEM_GLISCOR_CAPE = 1344, + ITEM_GLACIER_CAPE = 1345, + ITEM_BEST_SCARF = 1346, + ITEM_GALLANT_TORC = 1347, + ITEM_PROBO_HAT = 1348, + ITEM_UNLUCKY_SASH = 1349, + ITEM_FROSLASS_BOW = 1350, + ITEM_PURIFY_VEIL = 1351, + ITEM_UNNAMED_0x548 = 1352, + ITEM_UNNAMED_0x549 = 1353, + ITEM_UNNAMED_0x54A = 1354, + ITEM_UNNAMED_0x54B = 1355, + ITEM_UNNAMED_0x54C = 1356, + ITEM_UNNAMED_0x54D = 1357, + ITEM_UNNAMED_0x54E = 1358, + ITEM_UNNAMED_0x54F = 1359, + ITEM_UNNAMED_0x550 = 1360, + ITEM_UNNAMED_0x551 = 1361, + ITEM_UNNAMED_0x552 = 1362, + ITEM_UNNAMED_0x553 = 1363, + ITEM_UNNAMED_0x554 = 1364, + ITEM_UNNAMED_0x555 = 1365, + ITEM_UNNAMED_0x556 = 1366, + ITEM_UNNAMED_0x557 = 1367, + ITEM_UNNAMED_0x558 = 1368, + ITEM_UNNAMED_0x559 = 1369, + ITEM_UNNAMED_0x55A = 1370, + ITEM_UNNAMED_0x55B = 1371, + ITEM_UNNAMED_0x55C = 1372, + ITEM_UNNAMED_0x55D = 1373, + ITEM_UNNAMED_0x55E = 1374, + ITEM_UNNAMED_0x55F = 1375, + ITEM_UNNAMED_0x560 = 1376, + ITEM_UNNAMED_0x561 = 1377, + ITEM_UNNAMED_0x562 = 1378, + ITEM_UNNAMED_0x563 = 1379, + ITEM_UNNAMED_0x564 = 1380, + ITEM_UNNAMED_0x565 = 1381, + ITEM_UNNAMED_0x566 = 1382, + ITEM_UNNAMED_0x567 = 1383, + ITEM_UNNAMED_0x568 = 1384, + ITEM_UNNAMED_0x569 = 1385, + ITEM_UNNAMED_0x56A = 1386, + ITEM_UNNAMED_0x56B = 1387, + ITEM_UNNAMED_0x56C = 1388, + ITEM_UNNAMED_0x56D = 1389, + ITEM_UNNAMED_0x56E = 1390, + ITEM_UNNAMED_0x56F = 1391, + ITEM_UNNAMED_0x570 = 1392, + ITEM_UNNAMED_0x571 = 1393, + ITEM_UNNAMED_0x572 = 1394, + ITEM_UNNAMED_0x573 = 1395, + ITEM_UNNAMED_0x574 = 1396, + ITEM_UNNAMED_0x575 = 1397, + ITEM_UNNAMED_0x576 = 1398, + ITEM_UNNAMED_0x577 = 1399, +}; + +enum item_category { + CATEGORY_THROWN_LINE = 0, + CATEGORY_THROWN_ARC = 1, + CATEGORY_BERRIES_SEEDS_VITAMINS = 2, + CATEGORY_FOOD_GUMMIES = 3, + CATEGORY_HELD_ITEMS = 4, + CATEGORY_TMS_HMS = 5, + CATEGORY_POKE = 6, // Money + CATEGORY_UNK_7 = 7, + CATEGORY_OTHER = 8, + CATEGORY_ORBS = 9, + CATEGORY_LINK_BOX = 10, + CATEGORY_USED_TM = 11, + CATEGORY_TREASURE_BOXES_1 = 12, + CATEGORY_TREASURE_BOXES_2 = 13, + CATEGORY_TREASURE_BOXES_3 = 14, + CATEGORY_EXCLUSIVE_ITEMS = 15, +}; + +enum item_flag { + ITEM_FLAG_EXISTS = 1 << 0, + ITEM_FLAG_IN_SHOP = 1 << 1, // in a Kecleon shop + ITEM_FLAG_UNPAID = 1 << 2, // Picked up in Kecleon shop but not paid for yet + ITEM_FLAG_STICKY = 1 << 3, + ITEM_FLAG_SET = 1 << 4 // This item can be thrown by pressing L+R instead of having to go to the bag menu. +}; + +enum item_ai_flag { + ITEM_AI_FLAG_TARGET_SELF, + ITEM_AI_FLAG_TARGET_ALLY, + ITEM_AI_FLAG_TARGET_ENEMY, + NUM_ITEM_AI_FLAGS +}; + +enum item_target_flag { + ITEM_TARGET_OTHER = 1 << 0, + ITEM_TARGET_ALLY = 1 << 1 +}; + +#define GROUND_ITEM_TOOLBOX_INDEX 0x80 +#define HELD_ITEM_TOOLBOX_INDEX 0x81 +#define INVENTORY_SIZE 52 +#define NUMBER_OF_ITEM_IDS (ITEM_UNNAMED_0x577 + 1) + +// Item info +struct item { + // 0x0: flags: 1-byte bitfield + volatile u8 flags; + // bool8 f_exists : 1; // Validity flag + // bool8 f_in_shop : 1; // In a Kecleon Shop + // bool8 f_unpaid : 1; // Picked up from a Kecleon Shop but not paid for yet + // bool8 f_sticky : 1; // Sticky + // bool8 f_set : 1; // Usable by L+R + // bool8 flag_unk5 : 1; + // // For stolen items to recover from outlaws (has red X)? Could be for other items for other + // // ypes of missions? (Uncertain) + // bool8 f_unk_mission_item1 : 1; + // // For stolen items to recover from outlaws (has red X)? Could be for other items for other + // // types of missions? (Uncertain) Definitely used temporarily when sorting the items in + // // storage. + // bool8 f_unk_mission_item2 : 1; + // 0x1: For bag items. 0 for none, 1 if held by the leader, 2 for the second party member, etc. + u8 held_by; + // 0x2: Only for stackable items. Will be 0 if unapplicable. For Poké, this is an "amount code" + // rather than the literal amount (see MONEY_QUANTITY_TABLE) + u16 quantity; + enum item_id id; // 0x4 +}; + +struct bag_items_inner { + /* 0x0 */ struct item bag_items[INVENTORY_SIZE]; +}; + +struct bag_items { + u8 fill0[0x384]; + /* 0x384 */ struct bag_items_inner *bag_items; +}; + +#endif //PMDSKY_ITEM_H diff --git a/include/overlay_29_0230E8F0.h b/include/overlay_29_0230E8F0.h deleted file mode 100644 index e1b78991..00000000 --- a/include/overlay_29_0230E8F0.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef PMDSKY_OVERLAY_29_0230E8F0_H -#define PMDSKY_OVERLAY_29_0230E8F0_H - -#include "dungeon_mode.h" - -// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -bool8 EntityIsValid__0230E8F0(struct entity *entity); - -#endif //PMDSKY_OVERLAY_29_0230E8F0_H diff --git a/include/overlay_29_0232E250.h b/include/overlay_29_0232E250.h index 27d0a03d..35c8e17c 100644 --- a/include/overlay_29_0232E250.h +++ b/include/overlay_29_0232E250.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" #include "dungeon_mode_common.h" +#include "item.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). bool8 EntityIsValidMoveEffects__0232E250(struct entity *entity); diff --git a/include/overlay_31_02382820.h b/include/overlay_31_02382820.h index cd49cb94..3ecb4bf3 100644 --- a/include/overlay_31_02382820.h +++ b/include/overlay_31_02382820.h @@ -1,5 +1,5 @@ -#ifndef PMDSKY_OVERLAY_3102382820_H -#define PMDSKY_OVERLAY_3102382820_H +#ifndef PMDSKY_OVERLAY_31_02382820_H +#define PMDSKY_OVERLAY_31_02382820_H #include "main_020348E4.h" #include "util.h" @@ -94,4 +94,4 @@ void StairsSubheadingCallback(struct Window* window); -#endif //PMDSKY_OVERLAY_3102382820_H +#endif //PMDSKY_OVERLAY_31_02382820_H diff --git a/main.lsf b/main.lsf index dde4c04a..08f35eff 100644 --- a/main.lsf +++ b/main.lsf @@ -220,6 +220,9 @@ Overlay OVY_28 Overlay OVY_29 { After OVY_10 + Object asm/overlay_29_rodata_0234FD04.o + Object asm/overlay_29_data_023534E0.o + Object asm/overlay_29_bss_02353860.o Object src/poly_text.o Object asm/overlay_29_022DC314.o Object src/overlay_29_022DEAB0.o @@ -246,7 +249,7 @@ Overlay OVY_29 Object asm/overlay_29_022EE36C.o Object src/overlay_29_022EF7A0.o Object asm/overlay_29_022EF7C4.o - Object src/dungeon_util_1.o + Object src/dungeon_util.o Object asm/overlay_29_022EFA6C.o Object src/overlay_29_022F0590.o Object asm/overlay_29_022F05B4.o @@ -300,8 +303,10 @@ Overlay OVY_29 Object asm/overlay_29_02308FE0.o Object src/overlay_29_0230A994.o Object asm/overlay_29_0230A9B8.o - Object src/overlay_29_0230E8F0.o - Object asm/overlay_29_0230E914.o + Object src/dungeon_ai_items.o + Object asm/overlay_29_data_02353700.o + Object asm/overlay_29_bss_0237CA18.o + Object asm/overlay_29_0230EDB0.o Object src/overlay_29_0230F008.o Object asm/overlay_29_0230F02C.o Object src/overlay_29_0230F980.o @@ -344,8 +349,8 @@ Overlay OVY_29 Object asm/overlay_29_0232145C.o Object src/overlay_29_02322DB8.o Object asm/overlay_29_02322DDC.o - Object asm/overlay_29_02352A54.o Object src/dungeon_move.o + Object asm/overlay_29_rodata_02352A6C.o Object asm/overlay_29_02324698.o Object src/overlay_29_02325620.o Object asm/overlay_29_02325644.o @@ -385,7 +390,6 @@ Overlay OVY_29 Object asm/overlay_29_0234DDF4.o Object src/overlay_29_0234EC14.o Object asm/overlay_29_0234EC38.o - Object asm/overlay_29_0238280C.o } Overlay OVY_30 { diff --git a/src/dg_random.c b/src/dg_random.c index 03ea550f..45ac4769 100644 --- a/src/dg_random.c +++ b/src/dg_random.c @@ -26,7 +26,7 @@ s32 DungeonRandRange(s32 from, s32 to) } } -u8 DungeonRandOutcome__022EAB20(s32 percentChance) +bool8 DungeonRandOutcome__022EAB20(s32 percentChance) { if ((((DungeonRand16Bit() & 0xFFFF) * 100) >> 16) < percentChance) { @@ -35,7 +35,7 @@ u8 DungeonRandOutcome__022EAB20(s32 percentChance) return FALSE; } -u8 DungeonRandOutcome__022EAB50(s32 percentChance) +bool8 DungeonRandOutcome__022EAB50(s32 percentChance) { if ((((DungeonRand16Bit() & 0xFFFF) * 100) >> 16) < percentChance) { diff --git a/src/dungeon_ai.c b/src/dungeon_ai.c index e0ea4c7d..4b270974 100644 --- a/src/dungeon_ai.c +++ b/src/dungeon_ai.c @@ -1,8 +1,9 @@ #include "dungeon_ai.h" #include "dg_random.h" +#include "direction.h" #include "dungeon_capabilities_1.h" +#include "dungeon_util_static.h" #include "dungeon_util.h" -#include "dungeon_util_1.h" #ifdef JAPAN #define CANNOT_USE_ITEM_MESSAGE 0xB2D @@ -33,7 +34,7 @@ void RunMonsterAi(struct entity *pokemon, u32 unused) struct monster *pokemon_info = GetEntInfo(pokemon); if (pokemon_info->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY) { - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_PETRIFIED) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_PETRIFIED) { EndFrozenClassStatus(pokemon, pokemon, TRUE); } @@ -75,7 +76,7 @@ void RunMonsterAi(struct entity *pokemon, u32 unused) entity_is_valid = target->type != ENTITY_NOTHING; } if (entity_is_valid && - GetEntInfo(target)->curse_class_status.curse == CURSED_STATUS_DECOY && + GetEntInfo(target)->curse_class_status.curse == STATUS_CURSE_DECOY && CanSeeTarget(pokemon, target)) { pokemon_info->decoy_ai_tracker = GetEntInfo(target)->curse_class_status.curse_applier_non_team_member_flag ? DECOY_AI_WILD : DECOY_AI_TEAM; @@ -105,7 +106,7 @@ void RunMonsterAi(struct entity *pokemon, u32 unused) { return; } - if (pokemon_info->cringe_class_status.cringe == CRINGE_STATUS_CONFUSED) + if (pokemon_info->cringe_class_status.cringe == STATUS_CRINGE_CONFUSED) { SetActionPassTurnOrWalk(&pokemon_info->action, pokemon_info->id); } @@ -124,7 +125,7 @@ void RunMonsterAi(struct entity *pokemon, u32 unused) } return; } - if (pokemon_info->cringe_class_status.cringe == CRINGE_STATUS_CONFUSED) + if (pokemon_info->cringe_class_status.cringe == STATUS_CRINGE_CONFUSED) { SetActionPassTurnOrWalk(&pokemon_info->action, pokemon_info->id); return; diff --git a/src/dungeon_ai_items.c b/src/dungeon_ai_items.c new file mode 100644 index 00000000..fb2ada99 --- /dev/null +++ b/src/dungeon_ai_items.c @@ -0,0 +1,213 @@ +#include "dungeon_ai_items.h" +#include "dg_random.h" +#include "direction.h" +#include "dungeon_capabilities_1.h" +#include "dungeon_util_static.h" +#include "item.h" + +#define NUM_POTENTIAL_ROCK_TARGETS 20 + +u32 AI_THROWN_ITEM_PROBABILITIES[NUM_DIRECTIONS] = {0}; +u32 AI_THROWN_ITEM_DIRECTIONS[NUM_DIRECTIONS] = {0}; + +extern volatile s32 AI_THROWN_ITEM_ACTION_CHOICE_COUNT; +extern struct bag_items *BAG_ITEMS_PTR_MIRROR; + +extern void GetPossibleAiThrownItemDirections(struct entity *pokemon, s32 thrown_ai_flag, struct item *item, bool8 ignore_roll_chance); +extern void SetMonsterActionFields(struct action_data *action_pointer, u16 action); +extern bool8 IqSkillIsEnabled(struct entity *pokemon, u8 iq_skill); +extern const struct tile *GetTile(s32 x, s32 y); +extern bool8 TestItemAiFlag(s16 id, s32 aiFlag); +extern enum item_category GetItemCategoryVeneer(s16 index); +extern void GetPossibleAiArcItemTargets(struct entity *pokemon, struct item *item, struct position potential_targets[], bool8 ignore_roll_chance); +extern s32 GetDirectionTowardsPosition(struct position *origin_pos, struct position *target_pos); +extern struct item *GetItemInfo(struct entity *entity); +extern u32 GetAiUseItemProbability(struct entity *target_pokemon, struct item *item, u32 item_target_flags); +extern bool8 MonsterCanThrowItems(struct monster *pokemon); + +bool8 EntityIsValid__0230E8F0(struct entity *entity) +{ + if (entity == NULL) + { + return FALSE; + } + return entity->type != ENTITY_NOTHING; +} + +void AiDecideUseItem(struct entity *pokemon) +{ + struct monster *pokemon_info = GetEntInfo(pokemon); + struct item *item; + struct position potential_target_positions[NUM_POTENTIAL_ROCK_TARGETS]; + s32 i; + u32 chosen_target_index; + if (CheckVariousConditions(pokemon)) + { + pokemon_info->use_held_item = FALSE; + return; + } + if (pokemon_info->use_held_item) + { + u8 selected_toolbox_index; + item = &pokemon_info->held_item; + if (!ItemExists(item->flags)) + return; + + selected_toolbox_index = HELD_ITEM_TOOLBOX_INDEX; + enum item_category item_type = GetItemCategoryVeneer(item->id); + if (item_type == CATEGORY_THROWN_LINE) + { + GetPossibleAiThrownItemDirections(pokemon, ITEM_AI_FLAG_TARGET_ENEMY, item, TRUE); + for (i = 0; i < AI_THROWN_ITEM_ACTION_CHOICE_COUNT; i++) + { + if (DungeonRandOutcome__022EAB20(AI_THROWN_ITEM_PROBABILITIES[i])) + { + SetMonsterActionFields(&pokemon_info->action, ACTION_THROW_ITEM_AI); + pokemon_info->action.action_parameters[0].action_use_idx = selected_toolbox_index; + pokemon_info->action.action_parameters[0].item_pos.x = pokemon->pos.x; + pokemon_info->action.action_parameters[0].item_pos.y = pokemon->pos.y; + pokemon_info->action.direction = (enum direction_id) (AI_THROWN_ITEM_DIRECTIONS[i] & DIRECTION_MASK); + break; + } + } + if (i == AI_THROWN_ITEM_ACTION_CHOICE_COUNT) + { + SetMonsterActionFields(&pokemon_info->action, ACTION_SECOND_THOUGHTS); + } + } + else if (item_type == CATEGORY_THROWN_ARC) + { + GetPossibleAiArcItemTargets(pokemon, item, potential_target_positions, TRUE); + if (AI_THROWN_ITEM_ACTION_CHOICE_COUNT != 0) + { + chosen_target_index = DungeonRandInt(AI_THROWN_ITEM_ACTION_CHOICE_COUNT); + SetMonsterActionFields(&pokemon_info->action, ACTION_THROW_ITEM_AI); + pokemon_info->action.action_parameters[0].action_use_idx = selected_toolbox_index; + pokemon_info->action.action_parameters[0].item_pos.x = pokemon->pos.x; + pokemon_info->action.action_parameters[0].item_pos.y = pokemon->pos.y; + pokemon_info->action.direction = (enum direction_id) (GetDirectionTowardsPosition(&pokemon->pos, &potential_target_positions[chosen_target_index]) & DIRECTION_MASK); + pokemon_info->action.item_target_position = potential_target_positions[chosen_target_index]; + } + else + { + SetMonsterActionFields(&pokemon_info->action, ACTION_SECOND_THOUGHTS); + } + } + else if (item_type == CATEGORY_BERRIES_SEEDS_VITAMINS || item_type == CATEGORY_FOOD_GUMMIES) + { + SetMonsterActionFields(&pokemon_info->action, ACTION_EAT_AI); + pokemon_info->action.action_parameters[0].action_use_idx = selected_toolbox_index; + pokemon_info->action.action_parameters[0].item_pos.x = pokemon->pos.x; + pokemon_info->action.action_parameters[0].item_pos.y = pokemon->pos.y; + } + else + { + SetMonsterActionFields(&pokemon_info->action, ACTION_SECOND_THOUGHTS); + } + } + else if (IqSkillIsEnabled(pokemon, IQ_ITEM_MASTER)) + { + s32 thrown_ai_flag; + for (s32 toolbox_index = 1; toolbox_index < INVENTORY_SIZE; toolbox_index++) + { + u8 selected_toolbox_index; + if (toolbox_index == 1) + { + item = &pokemon_info->held_item; + selected_toolbox_index = HELD_ITEM_TOOLBOX_INDEX; + } + else if (toolbox_index == 0) + { + // This seems unused. toolbox_index can never be 0. + const struct tile *map_tile = GetTile(pokemon->pos.x, pokemon->pos.y); + if (map_tile->object != NULL && map_tile->object->type == ENTITY_ITEM) + { + item = GetItemInfo(map_tile->object); + selected_toolbox_index = GROUND_ITEM_TOOLBOX_INDEX; + } + else + { + continue; + } + } + else if (pokemon_info->is_team_leader) + { + item = &BAG_ITEMS_PTR_MIRROR->bag_items->bag_items[toolbox_index - 2]; + selected_toolbox_index = toolbox_index - 1; + } + else + { + return; + } + + u8 item_flags = item->flags; + if (!ItemExists(item_flags) || item->flags & ITEM_FLAG_IN_SHOP) + continue; + + if (ItemSticky(item_flags)) + continue; + + if (TestItemAiFlag(item->id, ITEM_AI_FLAG_TARGET_SELF)) + { + u32 item_weight = GetAiUseItemProbability(pokemon, item, ITEM_TARGET_ALLY); + if (item_weight != 0) + { + enum item_category item_type = GetItemCategoryVeneer(item->id); + if (!(item_type == CATEGORY_ORBS && !pokemon_info->is_not_team_member) && DungeonRandOutcome__022EAB20(item_weight)) + { + if (item_type == CATEGORY_ORBS) + SetMonsterActionFields(&pokemon_info->action, ACTION_USE_ORB); + else + SetMonsterActionFields(&pokemon_info->action, ACTION_EAT_AI); + + pokemon_info->action.action_parameters[0].action_use_idx = selected_toolbox_index; + pokemon_info->action.action_parameters[0].item_pos.x = pokemon->pos.x; + pokemon_info->action.action_parameters[0].item_pos.y = pokemon->pos.y; + return; + } + } + } + + if (MonsterCanThrowItems(pokemon_info)) + { + for (thrown_ai_flag = ITEM_AI_FLAG_TARGET_ALLY; thrown_ai_flag < NUM_ITEM_AI_FLAGS; thrown_ai_flag++) + { + if (TestItemAiFlag(item->id, thrown_ai_flag)) + { + if (GetItemCategoryVeneer(item->id) == CATEGORY_THROWN_ARC) + { + GetPossibleAiArcItemTargets(pokemon, item, potential_target_positions, FALSE); + if (AI_THROWN_ITEM_ACTION_CHOICE_COUNT != 0) + { + chosen_target_index = DungeonRandInt(AI_THROWN_ITEM_ACTION_CHOICE_COUNT); + SetMonsterActionFields(&pokemon_info->action, ACTION_THROW_ITEM_AI); + pokemon_info->action.action_parameters[0].action_use_idx = selected_toolbox_index; + pokemon_info->action.action_parameters[0].item_pos.x = pokemon->pos.x; + pokemon_info->action.action_parameters[0].item_pos.y = pokemon->pos.y; + pokemon_info->action.direction = (enum direction_id) (GetDirectionTowardsPosition(&pokemon->pos, &potential_target_positions[chosen_target_index]) & DIRECTION_MASK); + pokemon_info->action.item_target_position = potential_target_positions[chosen_target_index]; + return; + } + } + else + { + GetPossibleAiThrownItemDirections(pokemon, thrown_ai_flag, item, FALSE); + for (i = 0; i < AI_THROWN_ITEM_ACTION_CHOICE_COUNT; i++) + { + if (DungeonRandOutcome__022EAB20(AI_THROWN_ITEM_PROBABILITIES[i])) + { + SetMonsterActionFields(&pokemon_info->action, ACTION_THROW_ITEM_AI); + pokemon_info->action.action_parameters[0].action_use_idx = selected_toolbox_index; + pokemon_info->action.action_parameters[0].item_pos.x = pokemon->pos.x; + pokemon_info->action.action_parameters[0].item_pos.y = pokemon->pos.y; + pokemon_info->action.direction = (enum direction_id) (AI_THROWN_ITEM_DIRECTIONS[i] & DIRECTION_MASK); + return; + } + } + } + } + } + } + } + } +} diff --git a/src/dungeon_ai_targeting.c b/src/dungeon_ai_targeting.c index fc683f5e..05e8ca2f 100644 --- a/src/dungeon_ai_targeting.c +++ b/src/dungeon_ai_targeting.c @@ -1,7 +1,7 @@ #include "dungeon_ai_targeting.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_pokemon_attributes_1.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" #include "overlay_29_023000E4.h" bool8 ShouldMonsterRunAway(struct entity *pokemon) diff --git a/src/dungeon_capabilities.c b/src/dungeon_capabilities.c index 7f890132..ce34933a 100644 --- a/src/dungeon_capabilities.c +++ b/src/dungeon_capabilities.c @@ -1,6 +1,6 @@ #include "dungeon_capabilities.h" #include "dungeon_statuses.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" extern bool8 CheckVariousStatuses(struct entity *entity); @@ -10,23 +10,23 @@ bool8 CheckVariousStatuses2(struct entity *entity, bool8 blind_check) if ((blind_check && IsBlinded(entity, TRUE))) return TRUE; - if (pokemon_info->sleep_class_status.sleep == SLEEP_STATUS_SLEEP) + if (pokemon_info->sleep_class_status.sleep == STATUS_SLEEP_SLEEP) return TRUE; - if (pokemon_info->sleep_class_status.sleep == SLEEP_STATUS_NAPPING) + if (pokemon_info->sleep_class_status.sleep == STATUS_SLEEP_NAPPING) return TRUE; - if (pokemon_info->sleep_class_status.sleep == SLEEP_STATUS_NIGHTMARE) + if (pokemon_info->sleep_class_status.sleep == STATUS_SLEEP_NIGHTMARE) return TRUE; - if (pokemon_info->cringe_class_status.cringe == CRINGE_STATUS_PAUSED) + if (pokemon_info->cringe_class_status.cringe == STATUS_CRINGE_PAUSED) return TRUE; - if (pokemon_info->cringe_class_status.cringe == CRINGE_STATUS_INFATUATED) + if (pokemon_info->cringe_class_status.cringe == STATUS_CRINGE_INFATUATED) return TRUE; - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_WRAP) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_WRAP) return TRUE; - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_WRAPPED) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_WRAPPED) return TRUE; if (CheckVariousStatuses(entity)) return TRUE; - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_PETRIFIED) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_PETRIFIED) return TRUE; if (pokemon_info->terrified_turns != 0) return TRUE; diff --git a/src/dungeon_capabilities_1.c b/src/dungeon_capabilities_1.c index 962b8a30..dd749711 100644 --- a/src/dungeon_capabilities_1.c +++ b/src/dungeon_capabilities_1.c @@ -3,7 +3,7 @@ #include "dungeon_capabilities.h" #include "dungeon_capabilities_2.h" #include "dungeon_move.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" #include "joined_at_checks.h" bool8 CheckVariousConditions(struct entity *pokemon) @@ -28,10 +28,10 @@ bool8 CheckVariousConditions(struct entity *pokemon) if (IsChargingAnyTwoTurnMove(pokemon, FALSE)) return TRUE; - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_WRAP) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_WRAP) return TRUE; - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_WRAPPED) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_WRAPPED) return TRUE; return FALSE; diff --git a/src/dungeon_capabilities_2.c b/src/dungeon_capabilities_2.c index 4f1a20e0..5a00a8fb 100644 --- a/src/dungeon_capabilities_2.c +++ b/src/dungeon_capabilities_2.c @@ -1,19 +1,19 @@ #include "dungeon_capabilities_2.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" bool8 CheckVariousStatuses(struct entity *pokemon) { struct monster *pokemon_info = GetEntInfo(pokemon); - if (pokemon_info->sleep_class_status.sleep != SLEEP_STATUS_SLEEPLESS && - pokemon_info->sleep_class_status.sleep != SLEEP_STATUS_YAWNING && - pokemon_info->sleep_class_status.sleep != STATUS_NONE) + if (pokemon_info->sleep_class_status.sleep != STATUS_SLEEP_SLEEPLESS && + pokemon_info->sleep_class_status.sleep != STATUS_SLEEP_YAWNING && + pokemon_info->sleep_class_status.sleep != STATUS_SLEEP_NONE) return TRUE; - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_FROZEN) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_FROZEN) return TRUE; - if (pokemon_info->frozen_class_status.freeze == FROZEN_STATUS_PETRIFIED) + if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_PETRIFIED) return TRUE; - if (pokemon_info->bide_class_status.bide == BIDE_STATUS_BIDE) + if (pokemon_info->bide_class_status.bide == STATUS_TWO_TURN_BIDE) return TRUE; return FALSE; diff --git a/src/dungeon_move.c b/src/dungeon_move.c index bd5f46c5..4de7a54a 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -1,20 +1,20 @@ #include "dungeon_move.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" #include "overlay_29_02321438.h" -const u8 TWO_TURN_STATUSES[11] = +const enum status_two_turn_id TWO_TURN_STATUSES[11] = { - BIDE_STATUS_SOLARBEAM, - BIDE_STATUS_SKY_ATTACK, - BIDE_STATUS_RAZOR_WIND, - BIDE_STATUS_FOCUS_PUNCH, - BIDE_STATUS_SKULL_BASH, - BIDE_STATUS_FLYING, - BIDE_STATUS_BOUNCING, - BIDE_STATUS_DIVING, - BIDE_STATUS_DIGGING, - BIDE_STATUS_SHADOW_FORCE, - STATUS_NONE + STATUS_TWO_TURN_SOLARBEAM, + STATUS_TWO_TURN_SKY_ATTACK, + STATUS_TWO_TURN_RAZOR_WIND, + STATUS_TWO_TURN_FOCUS_PUNCH, + STATUS_TWO_TURN_SKULL_BASH, + STATUS_TWO_TURN_FLYING, + STATUS_TWO_TURN_BOUNCING, + STATUS_TWO_TURN_DIVING, + STATUS_TWO_TURN_DIGGING, + STATUS_TWO_TURN_SHADOW_FORCE, + STATUS_TWO_TURN_NONE }; bool8 IsChargingAnyTwoTurnMove(struct entity *pokemon, bool8 check_charge) @@ -33,7 +33,7 @@ bool8 IsChargingAnyTwoTurnMove(struct entity *pokemon, bool8 check_charge) } // BUG: This condition is never reached because the for loop terminates by returning FALSE at the end of the TWO_TURN_STATUSES array. - if (check_charge && pokemon_info->bide_class_status.bide == BIDE_STATUS_CHARGING) + if (check_charge && pokemon_info->bide_class_status.bide == STATUS_TWO_TURN_CHARGING) return TRUE; return FALSE; } diff --git a/src/dungeon_pokemon_attributes.c b/src/dungeon_pokemon_attributes.c index daad3eab..4f3566dc 100644 --- a/src/dungeon_pokemon_attributes.c +++ b/src/dungeon_pokemon_attributes.c @@ -1,5 +1,5 @@ #include "dungeon_pokemon_attributes.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" #include "overlay_29_02301A60.h" bool8 NoGastroAcidStatus(struct entity *entity, enum ability_id ability) @@ -7,7 +7,7 @@ bool8 NoGastroAcidStatus(struct entity *entity, enum ability_id ability) if (!IsMonster__02301A60(entity)) return FALSE; - if (GetEntInfo(entity)->curse_class_status.curse == CURSED_STATUS_GASTRO_ACID) + if (GetEntInfo(entity)->curse_class_status.curse == STATUS_CURSE_GASTRO_ACID) return FALSE; return TRUE; diff --git a/src/dungeon_pokemon_attributes_1.c b/src/dungeon_pokemon_attributes_1.c index 6e9a8f51..d2bcb476 100644 --- a/src/dungeon_pokemon_attributes_1.c +++ b/src/dungeon_pokemon_attributes_1.c @@ -1,5 +1,5 @@ #include "dungeon_pokemon_attributes_1.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" bool8 IsTacticSet(struct entity *pokemon, enum tactic_id tactic_id) { diff --git a/src/dungeon_statuses.c b/src/dungeon_statuses.c index 9d36f928..5f2a8815 100644 --- a/src/dungeon_statuses.c +++ b/src/dungeon_statuses.c @@ -1,5 +1,6 @@ #include "dungeon_statuses.h" -#include "dungeon_util.h" +#include "dungeon_util_static.h" +#include "item.h" #include "overlay_29_02315118.h" extern bool8 ItemIsActive__0231513C(struct entity *entity, enum item_id item_id); @@ -9,7 +10,7 @@ bool8 IsBlinded(struct entity *entity, bool8 check_held_item) if (EntityIsValid__02315118(entity)) { struct monster *pokemon_info = GetEntInfo(entity); - if (pokemon_info->blinker_class_status.blinded == BLINKER_STATUS_BLINKER || + if (pokemon_info->blinker_class_status.blinded == STATUS_BLINKER_BLINKER || check_held_item && !pokemon_info->is_team_leader && ItemIsActive__0231513C(entity, ITEM_Y_RAY_SPECS)) return TRUE; } diff --git a/src/dungeon_util_1.c b/src/dungeon_util.c similarity index 96% rename from src/dungeon_util_1.c rename to src/dungeon_util.c index 2a206d3a..f7483c35 100644 --- a/src/dungeon_util_1.c +++ b/src/dungeon_util.c @@ -1,5 +1,5 @@ -#include "dungeon_util_1.h" #include "dungeon_util.h" +#include "dungeon_util_static.h" bool8 ShouldRunMonsterAi(struct entity *pokemon) { diff --git a/src/overlay_29_0230E8F0.c b/src/overlay_29_0230E8F0.c deleted file mode 100644 index ab9c13bd..00000000 --- a/src/overlay_29_0230E8F0.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "overlay_29_0230E8F0.h" - -bool8 EntityIsValid__0230E8F0(struct entity *entity) -{ - if (entity == NULL) - { - return FALSE; - } - return entity->type != ENTITY_NOTHING; -} diff --git a/tools/extract_function/split_data.py b/tools/extract_function/split_data.py index f407e74f..0746b407 100644 --- a/tools/extract_function/split_data.py +++ b/tools/extract_function/split_data.py @@ -30,12 +30,16 @@ symbol_line = None new_symbol_address = None hex_regex = re.compile('_[0-9A-F]{8}$') +data_type = None for i, line in enumerate(original_lines): if line.startswith(f'{SYMBOL_START}{symbol_name}'): symbol_line = i + elif line.startswith('\t.data') or line.startswith('\t.rodata') or line.startswith('\t.bss'): + data_type = line[line.index('.') + 1:].rstrip() if symbol_line is not None and line.startswith(SYMBOL_START) and hex_regex.search(line) is not None: new_symbol_address = line[-9:-1] + break if symbol_line is None: print(f'Failed to find symbol {symbol_name}.') @@ -55,9 +59,7 @@ with open(LSF_FILE_PATH, 'r') as lsf_file: lsf_lines = lsf_file.readlines() - extract_file_name = f'{file_prefix}{new_symbol_address}' - -new_asm_base_name = f"{file_prefix}{new_symbol_address}" +new_asm_base_name = f"{file_prefix}{data_type}_{new_symbol_address}" # If needed, add the extracted function's new .o file to main.lsf. merge_prev_file = None @@ -82,7 +84,7 @@ new_asm_header = f"""\t.include "asm/macros.inc" \t.include "{new_inc_file_name}" -\t.rodata +\t.{data_type} """ new_asm_file_path = os.path.join(ASM_FOLDER, new_asm_name) print('Creating', new_asm_file_path) diff --git a/tools/sync_pmdsky_debug/sync_from_pmdsky_debug.py b/tools/sync_pmdsky_debug/sync_from_pmdsky_debug.py index 3ba2d27a..1208c845 100644 --- a/tools/sync_pmdsky_debug/sync_from_pmdsky_debug.py +++ b/tools/sync_pmdsky_debug/sync_from_pmdsky_debug.py @@ -46,10 +46,6 @@ def add_files_with_extensions(folder: str, extensions: List[str]) -> List[str]: continue xmap_language_symbols = xmap_symbols[language] for section_name, pmdsky_debug_section in pmdsky_debug_language_symbols.items(): - if section_name == 'ram': - # We can't distinguish between different types of RAM symbols. - # E.g., they could be in the BSS, heap, etc. - continue if section_name in xmap_language_symbols: xmap_section = xmap_language_symbols[section_name] else: diff --git a/tools/sync_pmdsky_debug/xmap_reader.py b/tools/sync_pmdsky_debug/xmap_reader.py index 4ccc2ab5..5b4a2c55 100644 --- a/tools/sync_pmdsky_debug/xmap_reader.py +++ b/tools/sync_pmdsky_debug/xmap_reader.py @@ -26,6 +26,9 @@ def read_xmap_symbols() -> Dict[str, Dict[str, Dict[int, SymbolDetails]]]: xmap_symbols[language] = read_xmap_symbols_for_language(language) return xmap_symbols +def line_is_data(line: str) -> bool: + return '.rodata' in line or '.data' in line or '.bss' in line + def read_xmap_symbols_for_language(language: str) -> Dict[str, Dict[int, SymbolDetails]]: xmap_path = os.path.join('build', f'pmdsky.{language}', 'main.nef.xMAP') remote_xmap_url = f'https://raw.githubusercontent.com/pret/pmd-sky/xmap/pmdsky{language}.xMAP' @@ -72,11 +75,11 @@ def read_xmap_file(xmap_lines): if current_section is not None and current_section not in xmap_symbols: xmap_symbols[current_section] = {} - elif current_section is not None and line.startswith(' ') and ('.text' in line or '.rodata' in line or '.data' in line or '.bss' in line or '.itcm' in line) and len(line) > 28 and line[28] not in NON_FUNCTION_SYMBOLS: + elif current_section is not None and line.startswith(' ') and ('.text' in line or '.itcm' in line or line_is_data(line)) and len(line) > 28 and line[28] not in NON_FUNCTION_SYMBOLS: symbol_split = line[28:-1].split('\t') symbol_name = symbol_split[0] symbol_address = int(line[2:10], 16) - if '00000000' in line: + if line_is_data(line): if not symbol_name.startswith('$'): xmap_symbols[current_section][symbol_address] = SymbolDetails(symbol_name, symbol_split[1][1:-1], True) else: