mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-27 11:14:28 -05:00
Decomped TargetLeader()
This commit is contained in:
1157
asm/code_80718D8.s
1157
asm/code_80718D8.s
File diff suppressed because it is too large
Load Diff
1142
asm/code_8072CA8.s
Normal file
1142
asm/code_8072CA8.s
Normal file
File diff suppressed because it is too large
Load Diff
8
include/dungeon_ai_leader.h
Normal file
8
include/dungeon_ai_leader.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_DUNGEON_AI_LEADER_H
|
||||
#define GUARD_DUNGEON_AI_LEADER_H
|
||||
|
||||
#include "dungeon_entity.h"
|
||||
|
||||
bool8 TargetLeader(struct DungeonEntity *pokemon);
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef GUARD_POKEMON_3_H
|
||||
#define GUARD_POKEMON_3_H
|
||||
|
||||
bool8 TacticsTargetLeader(u8 tactic);
|
||||
bool8 HasIQForSkill(s32 pokeIQ, u8 IQSkillIndex);
|
||||
void SetIQSkill(u8 *param_1, u32 skillIndex);
|
||||
bool8 IsIQSkillSet(u8 *IQSkillsEnabled, u32 IQSkill);
|
||||
|
||||
@@ -236,6 +236,8 @@ SECTIONS {
|
||||
src/dungeon_ai_targeting.o(.text);
|
||||
src/dungeon_pokemon_attributes.o(.text);
|
||||
asm/code_80718D8.o(.text);
|
||||
src/dungeon_ai_leader.o(.text);
|
||||
asm/code_8072CA8.o(.text);
|
||||
src/dungeon_ai_items.o(.text);
|
||||
src/code_8073CF0.o(.text);
|
||||
asm/code_8073CF0.o(.text);
|
||||
|
||||
12
src/dungeon_ai_leader.c
Normal file
12
src/dungeon_ai_leader.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "global.h"
|
||||
#include "dungeon_ai_leader.h"
|
||||
#include "pokemon_3.h"
|
||||
|
||||
bool8 TargetLeader(struct DungeonEntity *pokemon)
|
||||
{
|
||||
if (pokemon->entityData->isEnemy)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return TacticsTargetLeader(pokemon->entityData->tactic);
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "constants/targeting.h"
|
||||
#include "constants/tactic.h"
|
||||
#include "dungeon_action.h"
|
||||
#include "dungeon_ai_leader.h"
|
||||
#include "dungeon_ai_movement_1.h"
|
||||
#include "dungeon_ai_targeting.h"
|
||||
#include "dungeon_capabilities_1.h"
|
||||
@@ -25,7 +26,6 @@
|
||||
#define CORRIDOR_VISIBILITY 2
|
||||
|
||||
extern void DecideMovement(struct DungeonEntity *pokemon, bool8 showRunAwayEffect);
|
||||
extern bool8 TargetLeader(struct DungeonEntity *pokemon);
|
||||
extern bool8 CanCrossWalls(struct DungeonEntity *pokemon);
|
||||
extern struct DungeonEntity *GetLeaderEntityIfVisible(struct DungeonEntity *pokemon);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ extern u32 gIQSkillNames[];
|
||||
extern u32 gIQSkillDescriptions[];
|
||||
extern u32 gTacticsDescriptions[];
|
||||
extern u8 *gTactics[];
|
||||
extern u8 gTacticsTargetLeader[];
|
||||
extern bool8 gTacticsTargetLeader[];
|
||||
|
||||
extern s16 gReqTacticLvls[];
|
||||
extern s32 gReqIQSkillPts[];
|
||||
@@ -481,9 +481,9 @@ u32 GetTacticsDescription(u8 r0)
|
||||
return gTacticsDescriptions[r0];
|
||||
}
|
||||
|
||||
u8 TacticsTargetLeader(u8 r0)
|
||||
bool8 TacticsTargetLeader(u8 tactic)
|
||||
{
|
||||
return gTacticsTargetLeader[r0];
|
||||
return gTacticsTargetLeader[tactic];
|
||||
}
|
||||
|
||||
void GetAvailTacticsforLvl(u8 *tacticsBuffer, s32 pokeLevel)
|
||||
|
||||
Reference in New Issue
Block a user