From 1a82c65375706c5ce91e92ee6aa57e8c29cf002e Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sun, 1 Sep 2024 21:07:31 -0400 Subject: [PATCH 1/2] Synced from pmdsky-debug --- asm/include/overlay_29_022F7388.inc | 2 +- asm/include/overlay_29_022FEDBC.inc | 2 +- asm/include/overlay_29_02300108.inc | 2 +- asm/include/overlay_29_023118D8.inc | 2 +- asm/include/overlay_29_0232E864.inc | 2 +- asm/overlay_29_022F7388.s | 2 +- asm/overlay_29_022FEDBC.s | 2 +- asm/overlay_29_02300108.s | 4 ++-- asm/overlay_29_0230F02C.s | 6 +++--- asm/overlay_29_023118D8.s | 6 +++--- asm/overlay_29_0232E864.s | 12 ++++++------ 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/asm/include/overlay_29_022F7388.inc b/asm/include/overlay_29_022F7388.inc index 3409ad8a..a3ac3108 100644 --- a/asm/include/overlay_29_022F7388.inc +++ b/asm/include/overlay_29_022F7388.inc @@ -52,6 +52,7 @@ .public GetConversion2ConvertToType .public GetDefensiveStatAtLevel .public GetDirectionTowardsPosition +.public GetExclusiveItemWithEffectFromBag .public GetExp .public GetExplorerMazeMonster .public GetFloorType @@ -167,7 +168,6 @@ .public ov29_02304BAC .public ov29_02307CE0 .public ov29_02307DD0 -.public ov29_0230F654 .public ov29_0230F9A4 .public ov29_023159D4 .public ov29_02337EC0 diff --git a/asm/include/overlay_29_022FEDBC.inc b/asm/include/overlay_29_022FEDBC.inc index 33b99562..79366103 100644 --- a/asm/include/overlay_29_022FEDBC.inc +++ b/asm/include/overlay_29_022FEDBC.inc @@ -12,6 +12,7 @@ .public EXCL_ITEM_EFFECTS_WEATHER_MOVE_SPEED_BOOST .public ExclusiveItemEffectFlagTest .public GetApparentWeather +.public GetExclusiveItemWithEffectFromBag .public GetMobilityType .public GetSpeedStatus .public GetTile @@ -28,7 +29,6 @@ .public ov29_022E655C .public ov29_022FAA04 .public ov29_02300DCC -.public ov29_0230F654 .public ov29_02318D58 .public ov29_02322374 .public ov29_02344B44 diff --git a/asm/include/overlay_29_02300108.inc b/asm/include/overlay_29_02300108.inc index d57e71bc..bdf5a95c 100644 --- a/asm/include/overlay_29_02300108.inc +++ b/asm/include/overlay_29_02300108.inc @@ -23,6 +23,7 @@ .public GetEntityNaturalGiftInfo .public GetEntityWeatherBallType .public GetEvolutions +.public GetExclusiveItemWithEffectFromBag .public GetExplorerMazeMonster .public GetForcedLossReason .public GetMobilityTypeCheckSlipAndFloating @@ -60,7 +61,6 @@ .public ov29_022FBDE0 .public ov29_02302C04 .public ov29_02302CC8 -.public ov29_0230F654 .public ov29_02314DC4 .public ov29_02324BE8 .public ov29_02344B44 diff --git a/asm/include/overlay_29_023118D8.inc b/asm/include/overlay_29_023118D8.inc index 88284ce6..c5fbd3a3 100644 --- a/asm/include/overlay_29_023118D8.inc +++ b/asm/include/overlay_29_023118D8.inc @@ -12,6 +12,7 @@ .public EntityIsValid__023118B4 .public EntityIsValid__02315118 .public ExclusiveItemEffectFlagTest +.public GetExclusiveItemWithEffectFromBag .public GetTile .public GetTileAtEntity .public HasHeldItem @@ -78,7 +79,6 @@ .public ov29_023018AC .public ov29_02304A48 .public ov29_02304A84 -.public ov29_0230F654 .public ov29_02344B44 .public ov29_0234B034 .public ov29_0234B084 diff --git a/asm/include/overlay_29_0232E864.inc b/asm/include/overlay_29_0232E864.inc index 43dc1198..1643b57d 100644 --- a/asm/include/overlay_29_0232E864.inc +++ b/asm/include/overlay_29_0232E864.inc @@ -343,6 +343,7 @@ .public GetDamageSourceWrapper .public GetDirectionTowardsPosition .public GetEntityMoveTargetAndRange +.public GetExclusiveItemWithEffectFromBag .public GetMoveCategory .public GetMoveCritChance .public GetMovePower @@ -402,7 +403,6 @@ .public ov29_02304C3C .public ov29_02307BDC .public ov29_0230D088 -.public ov29_0230F654 .public ov29_02314DC4 .public ov29_0231AD38 .public ov29_023201D0 diff --git a/asm/overlay_29_022F7388.s b/asm/overlay_29_022F7388.s index 4ddb3de4..3e3d50ae 100644 --- a/asm/overlay_29_022F7388.s +++ b/asm/overlay_29_022F7388.s @@ -4728,7 +4728,7 @@ _022FAC04: mov r0, sb mov r1, #0x47 add r2, sp, #0xc - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag mov r0, #1 add r1, sp, #0xc bl ov29_02344B44 diff --git a/asm/overlay_29_022FEDBC.s b/asm/overlay_29_022FEDBC.s index f95e83e7..481036ef 100644 --- a/asm/overlay_29_022FEDBC.s +++ b/asm/overlay_29_022FEDBC.s @@ -1608,7 +1608,7 @@ _02300068: add r2, sp, #0 mov r0, sl mov r1, r7 - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag add r1, sp, #0 mov r0, #0 bl ov29_02344B44 diff --git a/asm/overlay_29_02300108.s b/asm/overlay_29_02300108.s index cfa8a8b5..6461d05d 100644 --- a/asm/overlay_29_02300108.s +++ b/asm/overlay_29_02300108.s @@ -2344,7 +2344,7 @@ ov29_02301A84: ; 0x02301A84 add r2, sp, #0 mov r0, r4 mov r1, r6 - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag add r1, sp, #0 mov r0, #1 bl ov29_02344B44 @@ -3173,7 +3173,7 @@ IsProtectedFromNegativeStatus: ; 0x02302430 add r2, sp, #0 mov r0, r5 mov r1, #0x59 - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag add r1, sp, #0 mov r0, #1 bl ov29_02344B44 diff --git a/asm/overlay_29_0230F02C.s b/asm/overlay_29_0230F02C.s index 6178fa7f..1ae9086c 100644 --- a/asm/overlay_29_0230F02C.s +++ b/asm/overlay_29_0230F02C.s @@ -483,8 +483,8 @@ _0230F64C: .word 0x00000C62 + TRY_NON_LEADER_ITEM_PICK_UP_OFFSET _0230F650: .word 0x00000C63 + TRY_NON_LEADER_ITEM_PICK_UP_OFFSET arm_func_end TryNonLeaderItemPickUp - arm_func_start ov29_0230F654 -ov29_0230F654: ; 0x0230F654 + arm_func_start GetExclusiveItemWithEffectFromBag +GetExclusiveItemWithEffectFromBag: ; 0x0230F654 stmdb sp!, {r3, r4, r5, r6, lr} sub sp, sp, #0xc mov r6, r0 @@ -515,7 +515,7 @@ ov29_0230F654: ; 0x0230F654 _0230F6C0: add sp, sp, #0xc ldmia sp!, {r3, r4, r5, r6, pc} - arm_func_end ov29_0230F654 + arm_func_end GetExclusiveItemWithEffectFromBag arm_func_start AuraBowIsActive AuraBowIsActive: ; 0x0230F6C8 diff --git a/asm/overlay_29_023118D8.s b/asm/overlay_29_023118D8.s index 4bcb320f..0cad02f5 100644 --- a/asm/overlay_29_023118D8.s +++ b/asm/overlay_29_023118D8.s @@ -3468,7 +3468,7 @@ _023145F4: add r2, sp, #4 mov r0, sb mov r1, #1 - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag add r1, sp, #4 mov r0, #1 bl ov29_02344B44 @@ -4062,7 +4062,7 @@ ExclusiveItemEffectIsActiveWithLogging: ; 0x02314D40 ldrb r1, [sp, #0x20] add r2, sp, #0 mov r0, r6 - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag add r1, sp, #0 mov r0, #1 bl ov29_02344B44 @@ -4094,7 +4094,7 @@ ov29_02314DC4: ; 0x02314DC4 add r2, sp, #0 mov r0, r6 mov r1, r4 - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag add r1, sp, #0 mov r0, #1 bl ov29_02344B44 diff --git a/asm/overlay_29_0232E864.s b/asm/overlay_29_0232E864.s index 6c2ba9f7..b991b844 100644 --- a/asm/overlay_29_0232E864.s +++ b/asm/overlay_29_0232E864.s @@ -556,7 +556,7 @@ _0232EFDC: beq _0232F188 mov r0, sb mov r1, r4 - bl ov29_02332FC8 + bl CanHitWithRegularAttack cmp r0, #0 beq _0232F188 ldr r0, [sp, #0x40] @@ -565,7 +565,7 @@ _0232EFDC: mov r0, r4 mov r1, #0x21 add r2, sp, #0xac - bl ov29_0230F654 + bl GetExclusiveItemWithEffectFromBag cmp r0, #0 beq _0232F060 mov r0, #0 @@ -625,7 +625,7 @@ _0232F090: bne _0232F188 mov r0, sb mov r1, r4 - bl ov29_02332FC8 + bl CanHitWithRegularAttack cmp r0, #0 beq _0232F188 mov r0, r4 @@ -5125,8 +5125,8 @@ _02332FC0: ldmia sp!, {r3, r4, r5, r6, r7, r8, pc} arm_func_end ov29_02332F18 - arm_func_start ov29_02332FC8 -ov29_02332FC8: ; 0x02332FC8 + arm_func_start CanHitWithRegularAttack +CanHitWithRegularAttack: ; 0x02332FC8 stmdb sp!, {r3, r4, r5, lr} mov r5, r0 mov r4, r1 @@ -5160,7 +5160,7 @@ _02333018: moveq r0, #0 and r0, r0, #0xff ldmia sp!, {r3, r4, r5, pc} - arm_func_end ov29_02332FC8 + arm_func_end CanHitWithRegularAttack arm_func_start ov29_02333044 ov29_02333044: ; 0x02333044 From fdadd56db761921ea080b91045b9f2232d320aaf Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Tue, 3 Sep 2024 21:04:21 -0400 Subject: [PATCH 2/2] Synced from pmdsky-debug --- asm/include/overlay_29_022DC2B8.inc | 6 +++--- asm/include/overlay_29_022FE4BC.inc | 6 +++--- asm/include/overlay_31.inc | 2 +- asm/overlay_29_022DC2B8.s | 12 +++++------ asm/overlay_29_022FE4BC.s | 20 +++++++++--------- asm/overlay_29_02337CCC.s | 32 ++++++++++++++--------------- asm/overlay_31.s | 2 +- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/asm/include/overlay_29_022DC2B8.inc b/asm/include/overlay_29_022DC2B8.inc index 24b1f588..39d5586d 100644 --- a/asm/include/overlay_29_022DC2B8.inc +++ b/asm/include/overlay_29_022DC2B8.inc @@ -34,11 +34,11 @@ .public GetApparentWeather .public GetBgRegionArea .public GetDefaultTileTextureId -.public GetDungeonGenInfoUnk0C .public GetDungeonMode .public GetDungeonRngPreseed .public GetFloorType .public GetForcedLossReason +.public GetHiddenFloorField .public GetLeader .public GetMaxReachedFloor .public GetMaxRescueAttempts @@ -170,8 +170,6 @@ .public ov29_0233785C .public ov29_0233845C .public ov29_0233873C -.public ov29_02338868 -.public ov29_02338898 .public ov29_023388B0 .public ov29_023389C4 .public ov29_02338A4C @@ -271,6 +269,8 @@ .public SetDungeonRngPreseed .public SetDungeonRngPreseed23Bit .public SetForcedLossReason +.public SetHiddenFloorField +.public SetHiddenStairsField .public SetMaxReachedFloor .public SetMinimapDataE447 .public SpawnInitialMonsters diff --git a/asm/include/overlay_29_022FE4BC.inc b/asm/include/overlay_29_022FE4BC.inc index da894206..711f8edb 100644 --- a/asm/include/overlay_29_022FE4BC.inc +++ b/asm/include/overlay_29_022FE4BC.inc @@ -10,6 +10,7 @@ .public EnemyEvolution .public EnsureCanStandCurrentTile .public EntityIsValid__022FED98 +.public GetHiddenStairsField .public HasHeldItem .public IqSkillIsEnabled .public IsChargingAnyTwoTurnMove @@ -56,9 +57,6 @@ .public ov29_0231A8A0 .public ov29_0231A9F8 .public ov29_02337CCC -.public ov29_02338708 -.public ov29_02338850 -.public ov29_02338898 .public ov29_02346888 .public ov29_0234B024 .public ov29_0234BA54 @@ -66,6 +64,8 @@ .public ov29_0237C9C0 .public ov29_0237CA68 .public ov29_0237CA6C +.public PositionIsOnHiddenStairs +.public SetHiddenFloorField .public SubstitutePlaceholderStringTags .public TryActivateFlashFireOnAllMonsters .public TrySpawnTrapperTrap diff --git a/asm/include/overlay_31.inc b/asm/include/overlay_31.inc index e3ce672a..fe04cd82 100644 --- a/asm/include/overlay_31.inc +++ b/asm/include/overlay_31.inc @@ -143,7 +143,6 @@ .public ov29_02300BF8 .public ov29_023021F0 .public ov29_02302388 -.public ov29_02338708 .public ov29_0233A0E8 .public ov29_023468FC .public ov29_02346E5C @@ -167,6 +166,7 @@ .public PlayWindowInputSound .public PopInventoryMenuField0x1A3 .public PositionHasItem +.public PositionIsOnHiddenStairs .public PreprocessString .public PreprocessStringFromId .public PrintIqSkillsMenu diff --git a/asm/overlay_29_022DC2B8.s b/asm/overlay_29_022DC2B8.s index 2fce4136..0179d0fe 100644 --- a/asm/overlay_29_022DC2B8.s +++ b/asm/overlay_29_022DC2B8.s @@ -3160,7 +3160,7 @@ ov29_022DEBBC: ; 0x022DEBBC #endif stmdb sp!, {r3, r4, r5, lr} mov r5, r0 - bl GetDungeonGenInfoUnk0C + bl GetHiddenFloorField mov r4, r0 mov r0, #0 bl SetForcedLossReason @@ -3226,7 +3226,7 @@ ov29_022DEBBC: ; 0x022DEBBC cmp r5, #0 ldmneia sp!, {r3, r4, r5, pc} mov r0, #0 - bl ov29_02338868 + bl SetHiddenStairsField bl ov29_02349188 ldr r2, _022DEF2C ; =DUNGEON_PTR mov r0, #0 @@ -3382,7 +3382,7 @@ _022DEF08: streqb r1, [r0, #0xda + OV29_022DEBBC_OFFSET] _022DEF20: mov r0, #0 - bl ov29_02338898 + bl SetHiddenFloorField ldmia sp!, {r3, r4, r5, pc} .align 2, 0 _022DEF2C: .word DUNGEON_PTR @@ -3753,7 +3753,7 @@ _022DF460: ldr r0, _022DFF54 ; =LEADER_PTR mov r1, #0 str r1, [r0] - bl GetDungeonGenInfoUnk0C + bl GetHiddenFloorField mov r6, r0 bl SetBothScreensWindowColorToDefault ldr r1, _022DFF40 ; =DUNGEON_PTR @@ -3769,7 +3769,7 @@ _022DF460: mov r1, #0xa add r0, r0, #0x700 strh r1, [r0, #0x88] - bl GetDungeonGenInfoUnk0C + bl GetHiddenFloorField cmp r0, #0 bne _022DF4E4 bl GenerateDungeonRngSeed @@ -4621,7 +4621,7 @@ _022E008C: bl ov29_022ECDE4 b _022E00EC _022E00C8: - bl GetDungeonGenInfoUnk0C + bl GetHiddenFloorField cmp r0, #0 bne _022DF428 ldr r0, _022DFF40 ; =DUNGEON_PTR diff --git a/asm/overlay_29_022FE4BC.s b/asm/overlay_29_022FE4BC.s index cafe5f92..e48724a3 100644 --- a/asm/overlay_29_022FE4BC.s +++ b/asm/overlay_29_022FE4BC.s @@ -358,21 +358,21 @@ _022FF3D4: ldrb r2, [r5, #0x4c] add r0, r6, #4 strb r2, [r1] - bl ov29_02338708 + bl PositionIsOnHiddenStairs cmp r0, #0 beq _022FF5E0 - bl ov29_02338850 + bl GetHiddenStairsField cmp r0, #1 bne _022FF41C mov r0, #1 - bl ov29_02338898 + bl SetHiddenFloorField b _022FF5E0 _022FF41C: - bl ov29_02338850 + bl GetHiddenStairsField cmp r0, #2 bne _022FF5E0 mov r0, #2 - bl ov29_02338898 + bl SetHiddenFloorField b _022FF5E0 _022FF434: mov r0, r6 @@ -995,21 +995,21 @@ _022FE9A8: ldrb r2, [r6, #0x4c] add r0, sb, #4 strb r2, [r1] - bl ov29_02338708 + bl PositionIsOnHiddenStairs cmp r0, #0 beq _022FEBB4 - bl ov29_02338850 + bl GetHiddenStairsField cmp r0, #1 bne _022FE9F0 mov r0, #1 - bl ov29_02338898 + bl SetHiddenFloorField b _022FEBB4 _022FE9F0: - bl ov29_02338850 + bl GetHiddenStairsField cmp r0, #2 bne _022FEBB4 mov r0, #2 - bl ov29_02338898 + bl SetHiddenFloorField b _022FEBB4 _022FEA08: mov r0, sb diff --git a/asm/overlay_29_02337CCC.s b/asm/overlay_29_02337CCC.s index ecfa068c..862f3f8e 100644 --- a/asm/overlay_29_02337CCC.s +++ b/asm/overlay_29_02337CCC.s @@ -644,7 +644,7 @@ ov29_02338430: ; 0x02338430 mov r1, #1 bl ov29_022EDEDC mov r0, r4 - bl ov29_02338708 + bl PositionIsOnHiddenStairs cmp r0, #0 ldmeqia sp!, {r4, pc} mov r0, #1 @@ -974,8 +974,8 @@ HiddenStairsPresent: ; 0x023386D8 _02338704: .word DUNGEON_PTR arm_func_end HiddenStairsPresent - arm_func_start ov29_02338708 -ov29_02338708: ; 0x02338708 + arm_func_start PositionIsOnHiddenStairs +PositionIsOnHiddenStairs: ; 0x02338708 ldr r1, _02338738 ; =DUNGEON_PTR ldrsh r2, [r0] ldr r1, [r1] @@ -996,7 +996,7 @@ ov29_02338708: ; 0x02338708 bx lr .align 2, 0 _02338738: .word DUNGEON_PTR - arm_func_end ov29_02338708 + arm_func_end PositionIsOnHiddenStairs arm_func_start ov29_0233873C ov29_0233873C: ; 0x0233873C @@ -1095,8 +1095,8 @@ _0233884C: .word 0x00000F31 #endif arm_func_end HiddenStairsTrigger - arm_func_start ov29_02338850 -ov29_02338850: ; 0x02338850 + arm_func_start GetHiddenStairsField +GetHiddenStairsField: ; 0x02338850 ldr r0, _02338864 ; =DUNGEON_PTR ldr r0, [r0] add r0, r0, #0x4000 @@ -1108,10 +1108,10 @@ ov29_02338850: ; 0x02338850 bx lr .align 2, 0 _02338864: .word DUNGEON_PTR - arm_func_end ov29_02338850 + arm_func_end GetHiddenStairsField - arm_func_start ov29_02338868 -ov29_02338868: ; 0x02338868 + arm_func_start SetHiddenStairsField +SetHiddenStairsField: ; 0x02338868 ldr r1, _0233887C ; =DUNGEON_PTR ldr r1, [r1] add r1, r1, #0x4000 @@ -1123,10 +1123,10 @@ ov29_02338868: ; 0x02338868 bx lr .align 2, 0 _0233887C: .word DUNGEON_PTR - arm_func_end ov29_02338868 + arm_func_end SetHiddenStairsField - arm_func_start GetDungeonGenInfoUnk0C -GetDungeonGenInfoUnk0C: ; 0x02338880 + arm_func_start GetHiddenFloorField +GetHiddenFloorField: ; 0x02338880 ldr r0, _02338894 ; =DUNGEON_PTR ldr r0, [r0] add r0, r0, #0x4000 @@ -1138,10 +1138,10 @@ GetDungeonGenInfoUnk0C: ; 0x02338880 bx lr .align 2, 0 _02338894: .word DUNGEON_PTR - arm_func_end GetDungeonGenInfoUnk0C + arm_func_end GetHiddenFloorField - arm_func_start ov29_02338898 -ov29_02338898: ; 0x02338898 + arm_func_start SetHiddenFloorField +SetHiddenFloorField: ; 0x02338898 ldr r1, _023388AC ; =DUNGEON_PTR ldr r1, [r1] add r1, r1, #0x4000 @@ -1153,7 +1153,7 @@ ov29_02338898: ; 0x02338898 bx lr .align 2, 0 _023388AC: .word DUNGEON_PTR - arm_func_end ov29_02338898 + arm_func_end SetHiddenFloorField arm_func_start ov29_023388B0 ov29_023388B0: ; 0x023388B0 diff --git a/asm/overlay_31.s b/asm/overlay_31.s index 82cf359e..508bb720 100644 --- a/asm/overlay_31.s +++ b/asm/overlay_31.s @@ -531,7 +531,7 @@ ov31_02382ED4: ; 0x02382ED4 moveq r4, #1 beq _02382F50 add r0, r5, #4 - bl ov29_02338708 + bl PositionIsOnHiddenStairs cmp r0, #0 movne r4, #3 _02382F50: