Move Entity to axObj

This commit is contained in:
Mateon1
2024-09-21 12:44:45 +02:00
parent ac5136a2da
commit 49acc1a1eb
61 changed files with 746 additions and 601 deletions

View File

@@ -81,15 +81,14 @@ struct axObject
{
/* 0x0 */ axdata axdata;
/* 0x3C */ OpenedFile *spriteFile; // This might be a unkStruct_202EE8C instead and unkStruct_202EE8C.unk0 might be a OpenedFile* etc. See sub_8010F28
u16 unk40_maybeAnimTimer;
s16 unk40_maybeAnimTimer;
u8 unk42_animId1;
u8 unk43_animId2;
u8 unk44;
u8 unk44_direction1;
u8 unk45_orientation;
u8 unk46;
u8 unk47;
u8 unk48;
u8 fill49[0x4C - 0x49];
/* 0x48 */ struct EntityInfo* info;
};
// size: ?

View File

@@ -6,6 +6,7 @@
#include "sprite.h"
#include "structs/str_items.h"
#include "structs/str_moves.h"
#include "axdata.h"
#include "number_util.h"
@@ -351,16 +352,7 @@ typedef struct Entity
// The global spawn index counter starts at 10. Each Pokémon that spawns increments the counter and
// gets assigned the current counter value as its spawn index.
/* 0x26 */ u16 spawnGenID;
/* 0x28*/ EntitySpriteInfo spriteInfo;
OpenedFile *sprite;
s16 unk68;
u8 unk6A;
u8 unk6B;
/* 0x6C */ u8 direction;
/* 0x6D */ u8 direction2; // Duplicate of 0x6C?
u8 unk6E;
u8 unk6F;
/* 0x70 */ EntityInfo *info;
/* 0x28 */ struct axObject axObj;
} Entity;
enum EntityType
@@ -460,7 +452,7 @@ static inline void SetExpMultplier(EntityInfo *info)
static inline EntityInfo *GetEntInfo(Entity *ent)
{
return ent->info;
return ent->axObj.info;
}
#endif