mirror of
https://github.com/zeldaret/tmc
synced 2026-09-06 19:10:56 -04:00
Use new entity struct for player
This commit is contained in:
+2
-5
@@ -220,9 +220,6 @@ typedef struct Entity_ {
|
||||
/*0x62*/ u8 spriteOffsetX;
|
||||
/*0x63*/ s8 spriteOffsetY;
|
||||
/*0x64*/ void* myHeap; /**< Heap data allocated with #zMalloc. */
|
||||
#ifdef ENT_DEPRECATED
|
||||
GENERIC_ENTITY_FIELDS
|
||||
#endif
|
||||
} Entity;
|
||||
|
||||
typedef struct {
|
||||
@@ -248,8 +245,8 @@ typedef struct LinkedList {
|
||||
* to allow the iteration of all Entity's.
|
||||
*/
|
||||
extern LinkedList gEntityLists[9];
|
||||
extern Entity gAuxPlayerEntities[MAX_AUX_PLAYER_ENTITIES];
|
||||
extern Entity gEntities[MAX_ENTITIES];
|
||||
extern GenericEntity gAuxPlayerEntities[MAX_AUX_PLAYER_ENTITIES];
|
||||
extern GenericEntity gEntities[MAX_ENTITIES];
|
||||
|
||||
typedef void(EntityAction)(Entity*);
|
||||
typedef void (*EntityActionPtr)(Entity*);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef NEW_PLAYER_H
|
||||
#define NEW_PLAYER_H
|
||||
|
||||
#include "entity.h"
|
||||
|
||||
// TODO Use new player entity struct everywhere once it is fully discovered.
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u32 unk_68;
|
||||
/*0x6c*/ u8 unk_6c;
|
||||
/*0x6d*/ u8 unk_6d;
|
||||
/*0x6e*/ u8 unk_6e;
|
||||
/*0x6f*/ u8 unk_6f;
|
||||
/*0x70*/ Entity* unk_70;
|
||||
/*0x74*/ Entity* unk_74;
|
||||
/*0x78*/ u8 unk_78;
|
||||
/*0x79*/ u8 unk_79;
|
||||
/*0x7a*/ u16 unk_7a;
|
||||
/*0x7c*/ u32 unk_7c;
|
||||
/*0x80*/ u8 unk_80[8];
|
||||
} PlayerEntity;
|
||||
|
||||
#define gNewPlayerEntity (*(PlayerEntity*)&gPlayerEntity)
|
||||
|
||||
#endif // NEW_PLAYER_H
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifndef DEATHFX_H
|
||||
#define DEATHFX_H
|
||||
|
||||
#ifdef ENT_DEPRECATED
|
||||
#error "deathFx.h requires new entities"
|
||||
#endif
|
||||
#include "entity.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifndef LINKANIMATION_H
|
||||
#define LINKANIMATION_H
|
||||
|
||||
#ifdef ENT_DEPRECATED
|
||||
#error "linkAnimtion.h requires new entities"
|
||||
#endif
|
||||
#include "entity.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef PUSHABLEFURNITURE_H
|
||||
#define PUSHABLEFURNITURE_H
|
||||
|
||||
#include "object.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68[0x8];
|
||||
/*0x70*/ u16 unk_70;
|
||||
/*0x72*/ u16 unk_72;
|
||||
/*0x74*/ u16 unk_74;
|
||||
/*0x76*/ u16 unk_76;
|
||||
/*0x78*/ u8 unk_78[0x2];
|
||||
/*0x7a*/ u16 unk_7a;
|
||||
/*0x7c*/ u16 unk_7c;
|
||||
/*0x7e*/ u16 unk_7e;
|
||||
/*0x80*/ u8 unk_80;
|
||||
/*0x81*/ u8 unk_81;
|
||||
/*0x82*/ u8 unk_82;
|
||||
/*0x83*/ u8 unk_83;
|
||||
/*0x84*/ u8 unk_84[0x2];
|
||||
/*0x86*/ u16 unk_86;
|
||||
} PushableFurnitureEntity;
|
||||
|
||||
#endif // PUSHABLEFURNITURE_H
|
||||
+19
-2
@@ -4,6 +4,23 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ union SplitWord unk_68;
|
||||
/*0x6c*/ u8 unk_6c;
|
||||
/*0x6d*/ u8 unk_6d;
|
||||
/*0x6e*/ u8 unk_6e;
|
||||
/*0x6f*/ u8 unk_6f;
|
||||
/*0x70*/ Entity* unk_70;
|
||||
/*0x74*/ Entity* unk_74;
|
||||
/*0x78*/ u8 unk_78;
|
||||
/*0x79*/ u8 unk_79;
|
||||
/*0x7a*/ u16 unk_7a;
|
||||
/*0x7c*/ union SplitWord unk_7c;
|
||||
/*0x80*/ union SplitWord unk_80;
|
||||
/*0x84*/ union SplitWord unk_84;
|
||||
} PlayerEntity;
|
||||
|
||||
enum PlayerActions {
|
||||
PLAYER_INIT,
|
||||
PLAYER_NORMAL,
|
||||
@@ -585,9 +602,9 @@ extern const u8 gQuiverSizes[];
|
||||
extern Entity* gPlayerClones[];
|
||||
|
||||
extern PlayerState gPlayerState;
|
||||
extern Entity gPlayerEntity;
|
||||
extern PlayerEntity gPlayerEntity;
|
||||
|
||||
void DoPlayerAction(Entity*);
|
||||
void DoPlayerAction(PlayerEntity*);
|
||||
bool32 CheckInitPauseMenu(void);
|
||||
void SetPlayerControl(PlayerControlMode mode);
|
||||
void ResetActiveItems(void);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef PLAYERITEMBOTTLE_H
|
||||
#define PLAYERITEMBOTTLE_H
|
||||
|
||||
#include "entity.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 bottleIndex; /**< @see Item */
|
||||
/*0x69*/ u8 unused[6];
|
||||
/*0x6f*/ u8 bottleContent; /**< @see Item */
|
||||
} PlayerItemBottleEntity;
|
||||
|
||||
#endif // PLAYERITEMBOTTLE_H
|
||||
Reference in New Issue
Block a user