mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-30 14:18:10 -05:00
Decomped IsTeamMemberOnFirstTurnInFixedRoom
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
.public _s32_div_f
|
||||
.public CopySpawnEntriesMaster
|
||||
.public DUNGEON_PTR
|
||||
.public DungeonRngSetPrimary
|
||||
@@ -18,22 +17,21 @@
|
||||
.public GetOffensiveStatAtLevel
|
||||
.public GetOutlawSpawnData
|
||||
.public GetTile
|
||||
.public GetTurnLimit
|
||||
.public GroundToDungeonMoveset
|
||||
.public IQ_SKILLS
|
||||
.public InitMoveCheckId
|
||||
.public InitTeamMember
|
||||
.public IQ_SKILLS
|
||||
.public IsCurrentMissionType
|
||||
.public IsDestinationFloorWithFixedRoom
|
||||
.public IsDestinationFloorWithMonster
|
||||
.public IsFullFloorFixedRoom
|
||||
.public IsInvalidSpawnTile
|
||||
.public JoinedAtRangeCheck2Veneer
|
||||
.public LoadWazaP2
|
||||
.public SetMonsterLevelAndId
|
||||
.public UnloadCurrentWazaP
|
||||
.public _s32_div_f
|
||||
.public ov29_022FB83C
|
||||
.public ov29_022FCD04
|
||||
.public ov29_023021F0
|
||||
.public ov29_02351E28
|
||||
.public SetMonsterLevelAndId
|
||||
.public sub_0200F9B4
|
||||
.public UnloadCurrentWazaP
|
||||
@@ -1,35 +1,8 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "overlay_29_022FBE04.inc"
|
||||
.include "overlay_29_022FBE58.inc"
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start IsTeamMemberOnFirstTurnInFixedRoom
|
||||
IsTeamMemberOnFirstTurnInFixedRoom: ; 0x022FBE04
|
||||
stmdb sp!, {r3, lr}
|
||||
ldrb r0, [r0, #6]
|
||||
cmp r0, #0
|
||||
bne _022FBE4C
|
||||
ldr r0, _022FBE54 ; =DUNGEON_PTR
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, #0x748]
|
||||
bl GetTurnLimit
|
||||
ldr r1, _022FBE54 ; =DUNGEON_PTR
|
||||
ldr r1, [r1]
|
||||
add r1, r1, #0x700
|
||||
ldrsh r1, [r1, #0x84]
|
||||
cmp r1, r0
|
||||
bne _022FBE4C
|
||||
bl IsFullFloorFixedRoom
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
ldmneia sp!, {r3, pc}
|
||||
_022FBE4C:
|
||||
mov r0, #0
|
||||
ldmia sp!, {r3, pc}
|
||||
.align 2, 0
|
||||
_022FBE54: .word DUNGEON_PTR
|
||||
arm_func_end IsTeamMemberOnFirstTurnInFixedRoom
|
||||
|
||||
arm_func_start InitOtherMonsterData
|
||||
InitOtherMonsterData: ; 0x022FBE58
|
||||
stmdb sp!, {r3, r4, r5, r6, r7, lr}
|
||||
@@ -6,5 +6,6 @@
|
||||
|
||||
bool8 IsMonsterLoneOutlaw(struct monster* monster_info);
|
||||
bool8 IsSecretBazaarNpc(struct entity *entity);
|
||||
bool8 IsTeamMemberOnFirstTurnInFixedRoom(struct monster *monster);
|
||||
|
||||
#endif //PMDSKY_DUNGEON_LOGIC_7_H
|
||||
|
||||
2
main.lsf
2
main.lsf
@@ -449,7 +449,7 @@ Overlay OVY_29
|
||||
Object src/joined_at_checks.o
|
||||
Object asm/overlay_29_022FBB1C.o
|
||||
Object src/dungeon_logic_7.o
|
||||
Object asm/overlay_29_022FBE04.o
|
||||
Object asm/overlay_29_022FBE58.o
|
||||
Object src/overlay_29_022FC99C.o
|
||||
Object asm/overlay_29_022FC9C0.o
|
||||
Object src/overlay_29_022FEEB8_eu.o
|
||||
|
||||
@@ -49,7 +49,6 @@ struct can_move_in_direction_info
|
||||
|
||||
const s32 FACING_DIRECTION_INCREMENTS[] = {0, 1, -1, 2, -2, 3, -3, 4};
|
||||
|
||||
extern s32 IsTeamMemberOnFirstTurnInFixedRoom(struct monster*);
|
||||
extern bool8 ShouldAvoidFirstHit(struct entity *monster, bool8 force_avoid);
|
||||
extern bool8 CanSeeTeammate(struct entity *monster);
|
||||
extern struct entity* GetLeaderIfVisible(struct entity *monster);
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
#include "dungeon_logic_6.h"
|
||||
#include "dungeon_mode.h"
|
||||
#include "dungeon_util_static.h"
|
||||
#include "fixed_room_data_1.h"
|
||||
#include "util.h"
|
||||
|
||||
extern s32 GetTurnLimit(enum dungeon_id dungeon_id);
|
||||
|
||||
bool8 IsMonsterLoneOutlaw(struct monster* monster_info)
|
||||
{
|
||||
return IsBehaviorLoneOutlaw(monster_info->monster_behavior);
|
||||
@@ -13,3 +16,13 @@ bool8 IsSecretBazaarNpc(struct entity *entity)
|
||||
{
|
||||
return IsSecretBazaarNpcBehavior(GetEntInfo(entity)->monster_behavior);
|
||||
}
|
||||
|
||||
bool8 IsTeamMemberOnFirstTurnInFixedRoom(struct monster *monster)
|
||||
{
|
||||
if (!monster->is_not_team_member &&
|
||||
DUNGEON_PTR[0]->wind_turns == GetTurnLimit(DUNGEON_PTR[0]->id) &&
|
||||
IsFullFloorFixedRoom())
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user