mirror of
https://github.com/zeldaret/tmc
synced 2026-07-09 06:53:27 -04:00
cleanup
This commit is contained in:
@@ -114,7 +114,7 @@ typedef enum {
|
||||
SPRITE_8,
|
||||
SPRITE_9,
|
||||
SPRITE_OBJECT4,
|
||||
SPRITE_OBJECT6,
|
||||
SPRITE_EZLOCAP,
|
||||
SPRITE_12,
|
||||
SPRITE_13,
|
||||
SPRITE_14,
|
||||
|
||||
+1
-1
@@ -115,4 +115,4 @@ typedef enum {
|
||||
FX_6C,
|
||||
} Effect;
|
||||
|
||||
#endif // EFFECTS_H
|
||||
#endif // EFFECTS_H
|
||||
|
||||
+18
-6
@@ -5,6 +5,8 @@
|
||||
#include "global.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#define MAX_ENTITIES 71
|
||||
|
||||
typedef enum {
|
||||
PLAYER = 1,
|
||||
ENEMY = 3,
|
||||
@@ -175,6 +177,13 @@ enum {
|
||||
#define COORD_TO_TILE_OFFSET(entity, xOff, yOff) \
|
||||
TILE((entity)->x.HALF.HI - (xOff), (entity)->y.HALF.HI - (yOff))
|
||||
|
||||
enum {
|
||||
IdleNorth = 0x0,
|
||||
IdleEast = 0x2,
|
||||
IdleSouth = 0x4,
|
||||
IdleWest = 0x6,
|
||||
};
|
||||
|
||||
enum {
|
||||
DirectionNorth = 0x00,
|
||||
DirectionEast = 0x08,
|
||||
@@ -182,6 +191,10 @@ enum {
|
||||
DirectionWest = 0x18,
|
||||
};
|
||||
|
||||
#define AnimationStateTurnAround(expr) ((expr) ^ 0x4)
|
||||
#define AnimationStateIdle(expr) ((expr) & 0x6)
|
||||
#define AnimationStateWalk(expr) ((expr) & 0xe)
|
||||
|
||||
#define DirectionRound(expr) ((expr) & 0x18)
|
||||
#define DirectionRoundUp(expr) DirectionRound((expr) + 4)
|
||||
#define DirectionIsHorizontal(expr) ((expr) & 0x08)
|
||||
@@ -194,7 +207,7 @@ enum {
|
||||
#define Direction8Round(expr) ((expr) & 0x1c)
|
||||
#define Direction8RoundUp(expr) Direction8Round((expr) + 2)
|
||||
#define Direction8TurnAround(expr) (Direction8RoundUp(expr) ^ 0x10)
|
||||
#define Direction8ToAnimationState(expr) (Direction8RoundUp(expr) >> 2)
|
||||
#define Direction8ToAnimationState(expr) ((expr) >> 2)
|
||||
#define Direction8FromAnimationState(expr) ((expr) << 2)
|
||||
|
||||
Entity* GetEmptyEntity(void);
|
||||
@@ -270,11 +283,10 @@ void EraseAllEntities(void);
|
||||
enum {
|
||||
PRIO_MIN = 0,
|
||||
PRIO_PLAYER = 1,
|
||||
PRIO_REQUESTED = 2,
|
||||
PRIO_MESSAGE = 2,
|
||||
PRIO_OVERRIDE_MESSAGE = 3,
|
||||
PRIO_PLAYER_EVENT = 6,
|
||||
PRIO_INITIALIZING = 7,
|
||||
PRIO_MESSAGE = 2, /* do not block during message */
|
||||
PRIO_NO_BLOCK = 3, /* do not block during entity requested priority */
|
||||
PRIO_PLAYER_EVENT = 6, /* do not block during special player event */
|
||||
PRIO_HIGHEST = 7, /* do not block EVER */
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ typedef struct {
|
||||
u16 timer;
|
||||
u8 fillerA[0x26];
|
||||
} ChooseFileState;
|
||||
static_assert(sizeof(ChooseFileState) == 0x30);
|
||||
|
||||
// TODO: This occupies the same memory region as gMenu
|
||||
extern ChooseFileState gChooseFileState;
|
||||
|
||||
+2
-2
@@ -90,7 +90,7 @@ extern void sub_0804A720(Entity*);
|
||||
extern u32 sub_080AEFE0(Entity*);
|
||||
extern u32 sub_08049FA0(Entity*);
|
||||
extern u32 sub_08049FDC(Entity*, u32);
|
||||
extern u32 sub_080041A0(Entity*, Entity*, u32, u32);
|
||||
extern u32 EntityInRectRadius(Entity*, Entity*, u32, u32);
|
||||
extern u32 sub_08049EE4(Entity*);
|
||||
extern void sub_08077E54(ItemBehavior*);
|
||||
extern void sub_080042BA(Entity*, u32);
|
||||
@@ -260,7 +260,7 @@ extern void sub_0800455E(Entity*);
|
||||
extern u32* sub_08008790(Entity*, u32);
|
||||
extern void sub_0804ACF8();
|
||||
extern void sub_08073904(Entity*);
|
||||
extern u32 sub_08056134(void);
|
||||
extern u32 CheckHeaderValid(void);
|
||||
extern void sub_08004484(Entity*, Entity*);
|
||||
extern void sub_0805F8E4(u32 r0, WStruct* r1);
|
||||
extern u32 sub_08002632(Entity*);
|
||||
|
||||
+2
-1
@@ -88,4 +88,5 @@ extern const Hitbox gUnk_080FD4E0;
|
||||
extern const Hitbox gUnk_080FD3F4;
|
||||
extern const Hitbox gUnk_080FD3FC;
|
||||
extern const Hitbox gUnk_080FD43C;
|
||||
#endif
|
||||
extern const Hitbox gPlayerHitbox;
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ enum NPC {
|
||||
/*0x4a*/ GREGAL,
|
||||
/*0x4b*/ MAYOR_HAGEN,
|
||||
/*0x4c*/ BIG_GORON,
|
||||
/*0x4d*/ EZLO_CAP,
|
||||
/*0x4d*/ EZLO,
|
||||
/*0x4e*/ NPC_UNK_4E,
|
||||
/*0x4f*/ NPC_UNK_4F,
|
||||
/*0x50*/ CLOTHES_RACK,
|
||||
@@ -277,7 +277,7 @@ extern void Gregal_Fusion(Entity*);
|
||||
extern void MayorHagen(Entity*);
|
||||
extern void MayorHagen_Fusion(Entity*);
|
||||
extern void BigGoron(Entity*);
|
||||
extern void EzloCap(Entity*);
|
||||
extern void Ezlo(Entity*);
|
||||
extern void NPC4E(Entity*);
|
||||
extern void NPC4E_Fusion(Entity*);
|
||||
extern void NPC4F(Entity*);
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ typedef enum {
|
||||
BUTTON,
|
||||
OBJECT_4,
|
||||
POT,
|
||||
OBJECT_6,
|
||||
EZLO_CAP,
|
||||
PUSHED_BLOCK,
|
||||
LOCKED_DOOR,
|
||||
OBJECT_9,
|
||||
@@ -207,7 +207,7 @@ extern void ItemForSale(Entity*);
|
||||
extern void Button(Entity*);
|
||||
extern void Object4(Entity*);
|
||||
extern void Pot(Entity*);
|
||||
extern void Object6(Entity*);
|
||||
extern void EzloCap(Entity*);
|
||||
extern void BlockPushed(Entity*);
|
||||
extern void LockedDoor(Entity*);
|
||||
extern void Object9(Entity*);
|
||||
|
||||
+10
-2
@@ -63,8 +63,16 @@ typedef enum {
|
||||
} PlayerControlMode;
|
||||
|
||||
enum PlayerFlags {
|
||||
PL_BUSY = (1 << 0),
|
||||
PL_DROWNING = (1 << 2),
|
||||
PL_NO_CAP = (1 << 3),
|
||||
PL_USE_PORTAL = (1 << 5),
|
||||
PL_MINISH = (1 << 7),
|
||||
PL_BURNING = (1 << 10),
|
||||
PL_ROLLING = (1 << 18),
|
||||
PL_IN_HOLE = (1 << 20),
|
||||
PL_USE_LANTERN = (1 << 23),
|
||||
PL_USE_OCARINA = (1 << 28),
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -74,7 +82,7 @@ typedef struct {
|
||||
/*0x05*/ u8 heldObject;
|
||||
/*0x06*/ u8 pushedObject;
|
||||
/*0x07*/ u8 field_0x7;
|
||||
/*0x08*/ u16 field_0x8;
|
||||
/*0x08*/ u16 animation;
|
||||
/*0x0a*/ u8 field_0xa;
|
||||
/*0x0b*/ u8 keepFacing;
|
||||
/*0x0c*/ u8 playerAction;
|
||||
@@ -121,7 +129,7 @@ typedef struct {
|
||||
/*0x40*/ u8 hurtType[64];
|
||||
/*0x80*/ u16 field_0x80;
|
||||
/*0x82*/ u8 field_0x82[9];
|
||||
/*0x8b*/ u8 field_0x8b;
|
||||
/*0x8b*/ u8 controlMode;
|
||||
/*0x8c*/ u32 field_0x8c;
|
||||
/*0x90*/ union SplitWord field_0x90;
|
||||
/*0x94*/ u32 field_0x94;
|
||||
|
||||
+2
-2
@@ -60,8 +60,8 @@ typedef struct {
|
||||
u8 field_0x3;
|
||||
u8 field_0x4;
|
||||
u8 filler1[1];
|
||||
u8 itemForSaleIndex;
|
||||
u8 field_0x7;
|
||||
u8 shopItemType;
|
||||
u8 shopItemType2;
|
||||
u8 field_0x8;
|
||||
u8 field_0x9;
|
||||
u8 unk2;
|
||||
|
||||
@@ -32,7 +32,9 @@ typedef struct {
|
||||
u8 listenForKeyPresses;
|
||||
u8 field_0x6;
|
||||
u8 field_0x7;
|
||||
u8 pad[24];
|
||||
} struct_02000010;
|
||||
static_assert(sizeof(struct_02000010) == 0x20);
|
||||
|
||||
extern struct_02000010 gUnk_02000010;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user