mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-10 01:55:51 -05:00
Fix and unify IQ struct and joinetAt struct
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#include "structs/str_items.h"
|
||||
#include "structs/str_moves.h"
|
||||
#include "structs/str_position.h"
|
||||
#include "structs/str_dungeon_location.h"
|
||||
#include "structs/str_iq_skill_flags.h"
|
||||
#include "math.h"
|
||||
#include "number_util.h"
|
||||
#include "sprite.h"
|
||||
@@ -27,8 +29,6 @@
|
||||
#define STAT_STAGE_ACCURACY 0
|
||||
#define STAT_STAGE_EVASION 1
|
||||
|
||||
#define NUM_PICKED_IQ_SKILLS 3
|
||||
|
||||
// size: 0x8
|
||||
typedef struct unkStruct_8044CC8
|
||||
{
|
||||
@@ -55,13 +55,6 @@ typedef struct HiddenPower
|
||||
/* 0x2 */ u8 hiddenPowerType;
|
||||
} HiddenPower;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct JoinedAt
|
||||
{
|
||||
/* 0x0 */ u8 joinedAt;
|
||||
/* 0x1 */ u8 unk1;
|
||||
} JoinedAt;
|
||||
|
||||
// size: 0x14
|
||||
typedef struct AITarget
|
||||
{
|
||||
@@ -238,7 +231,7 @@ typedef struct EntityInfo
|
||||
// Index 0 is Defense. Index 1 is Special Defense.
|
||||
/* 0x34 */ s24_8 defensiveMultipliers[2];
|
||||
/* 0x3C */ HiddenPower hiddenPower;
|
||||
/* 0x40 */ JoinedAt joinedAt; // Uses the dungeon index in dungeon.h.
|
||||
/* 0x40 */ DungeonLocation joinedAt; // Uses the dungeon index in dungeon.h.
|
||||
/* 0x44 */ ActionContainer action;
|
||||
/* 0x5C */ u8 types[2];
|
||||
/* 0x5E */ u8 abilities[2];
|
||||
@@ -247,10 +240,8 @@ typedef struct EntityInfo
|
||||
/* 0x68 */ DungeonPos prevPos[NUM_PREV_POS];
|
||||
/* 0x78 */ AITarget aiTarget;
|
||||
// Bitwise flags corresponding to selected IQ skills.
|
||||
/* 0x8C */ u8 IQSkillMenuFlags[NUM_PICKED_IQ_SKILLS]; // IQ skills selected in the IQ skills menu.
|
||||
u8 padding8F;
|
||||
/* 0x90 */ u8 IQSkillFlags[NUM_PICKED_IQ_SKILLS];
|
||||
u8 padding93;
|
||||
/* 0x8C */ IqSkillFlags IQSkillMenuFlags; // IQ skills selected in the IQ skills menu.
|
||||
/* 0x90 */ IqSkillFlags IQSkillFlags;
|
||||
/* 0x94 */ u8 tactic;
|
||||
u8 fill95[0x98 - 0x95];
|
||||
/* 0x98 */ u32 unk98;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "structs/rgb.h"
|
||||
#include "structs/str_position.h"
|
||||
#include "structs/str_traps.h"
|
||||
#include "structs/str_dungeon_location.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#define DUNGEON_MAX_SIZE_X 56
|
||||
@@ -18,13 +19,6 @@
|
||||
#define DUNGEON_MAX_TRAPS 64
|
||||
#define DUNGEON_MAX_ITEMS 64
|
||||
|
||||
// size: 0x4
|
||||
typedef struct DungeonLocation
|
||||
{
|
||||
/* 0x0 */ u8 id;
|
||||
/* 0x1 */ u8 floor;
|
||||
} DungeonLocation;
|
||||
|
||||
// size: 0x18
|
||||
typedef struct Weather
|
||||
{
|
||||
|
||||
11
include/structs/str_dungeon_location.h
Normal file
11
include/structs/str_dungeon_location.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef GUARD_STR_DUNGEON_LOCATION_H
|
||||
#define GUARD_STR_DUNGEON_LOCATION_H
|
||||
|
||||
// size: 0x4
|
||||
typedef struct DungeonLocation
|
||||
{
|
||||
/* 0x0 */ u8 id;
|
||||
/* 0x1 */ u8 floor;
|
||||
} DungeonLocation;
|
||||
|
||||
#endif // GUARD_STR_DUNGEON_LOCATION_H
|
||||
11
include/structs/str_iq_skill_flags.h
Normal file
11
include/structs/str_iq_skill_flags.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef GUARD_STR_IQ_SKILL_FLAGS_H
|
||||
#define GUARD_STR_IQ_SKILL_FLAGS_H
|
||||
|
||||
#define NUM_PICKED_IQ_SKILLS 3
|
||||
|
||||
typedef struct IqSkillFlags
|
||||
{
|
||||
u8 flags[NUM_PICKED_IQ_SKILLS];
|
||||
} IqSkillFlags;
|
||||
|
||||
#endif
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "structs/str_items.h"
|
||||
#include "structs/str_moves.h"
|
||||
#include "structs/str_iq_skill_flags.h"
|
||||
|
||||
// size: 0x4
|
||||
typedef struct Offense
|
||||
@@ -33,7 +34,7 @@ typedef struct PokemonStruct1
|
||||
/* 0x16 */ s16 pokeHP;
|
||||
/* 0x18 */ Offense offense;
|
||||
/* 0x1C */ u32 currExp;
|
||||
/* 0x20 */ u32 IQSkills;
|
||||
/* 0x20 */ IqSkillFlags IQSkills;
|
||||
/* 0x24 */ u8 tacticIndex;
|
||||
/* 0x28 */ BulkItem heldItem;
|
||||
/* 0x2C */ Move moves[MAX_MON_MOVES];
|
||||
@@ -73,7 +74,7 @@ typedef struct PokemonStruct2
|
||||
/* 0x40 */ Item itemSlot; // heldItem
|
||||
/* 0x44 */ FixedPoint belly;
|
||||
/* 0x48 */ FixedPoint maxBelly;
|
||||
/* 0x4C */ u32 IQSkills; // unk20
|
||||
/* 0x4C */ IqSkillFlags IQSkills;
|
||||
/* 0x50 */ u8 tacticIndex;
|
||||
/* 0x54 */ HiddenPower hiddenPower;
|
||||
/* 0x58 */ u8 name[POKEMON_NAME_LENGTH]; // name (other offset)
|
||||
|
||||
Reference in New Issue
Block a user