clang-format

This commit is contained in:
theo
2020-06-13 17:02:27 -07:00
parent 8e1ca1936b
commit 66fcdf6186
86 changed files with 2320 additions and 2604 deletions
+48 -50
View File
@@ -1,17 +1,16 @@
#include "global.h"
#ifndef ENTITY_H
#define ENTITY_H
typedef struct {
void *entity1;
void *entity2;
u8 filler[14];
void* entity1;
void* entity2;
u8 filler[14];
} UnkStruct;
typedef struct {
u8 type;
u8 type;
u8 subtype;
u8 parameter1;
u8 parameter2;
@@ -20,29 +19,28 @@ typedef struct {
union SplitWord {
s32 WORD;
struct {
s16 LO, HI;
s16 LO, HI;
} HALF;
};
union SplitHWord {
u16 HWORD;
struct {
u8 LO, HI;
u8 LO, HI;
} PACKED HALF;
};
typedef struct Entity
{
u32 *field_0x0;
u32 * field_0x4;
EntityType entityType;
typedef struct Entity {
u32* field_0x0;
u32* field_0x4;
EntityType entityType;
u8 action;
u8 previousActionFlag;
u8 parameter3;
u8 field_0xf;
u8 flags;
u8 scriptedScene:4;
u8 scriptedScene2:4;
u8 scriptedScene : 4;
u8 scriptedScene2 : 4;
s16 spriteTileSize;
u8 animationState;
u8 direction;
@@ -51,28 +49,28 @@ typedef struct Entity
union {
u8 raw;
struct {
u8 ss0:2;
u8 ss2:1;
u8 ss3:1;
u8 ss4:1;
u8 ss5:1;
u8 ss6:1;
u8 ss7:1;
u8 ss0 : 2;
u8 ss2 : 1;
u8 ss3 : 1;
u8 ss4 : 1;
u8 ss5 : 1;
u8 ss6 : 1;
u8 ss7 : 1;
} PACKED b;
} PACKED spriteSettings;
struct {
u8 b0:2;
u8 b1:2;
u8 b2:2;
u8 b3:2;
u8 b0 : 2;
u8 b1 : 2;
u8 b2 : 2;
u8 b3 : 2;
} PACKED spriteOrder;
u8 palette;
struct {
u8 b0:4;
u8 b1:1;
u8 b2:3;
u8 b0 : 4;
u8 b1 : 1;
u8 b2 : 3;
} PACKED spriteOrientation;
u8 filler[2];
u8 animationList;
@@ -81,13 +79,13 @@ typedef struct Entity
s16 nonPlanarMovement;
u8 spriteAnimation[3];
struct {
u8 b0:3;
u8 b1:5;
u8 b0 : 3;
u8 b1 : 5;
} PACKED ticks;
u16 collisions;
union SplitWord x;
union SplitWord y;
union SplitWord height; // todo
union SplitWord x;
union SplitWord y;
union SplitWord height; // todo
u8 collisionLayer;
s8 interactType;
u8 field_0x3a;
@@ -103,22 +101,22 @@ typedef struct Entity
u8 field_0x44;
u8 currentHealth;
s16 field_0x46;
u32 * boundingBox;
u32* boundingBox;
u8 field_0x4c;
u8 field_0x4d;
u8 field_0x4e;
u8 field_0x4f;
struct Entity * parent;
struct Entity * attachedEntity;
struct Entity* parent;
struct Entity* attachedEntity;
u8 field_0x58;
u8 field_0x59;
union {
u8 all;
struct {
u8 f0:1;
u8 f1:5;
u8 f2:1;
u8 f3:1;
u8 f0 : 1;
u8 f1 : 5;
u8 f2 : 1;
u8 f3 : 1;
} PACKED b;
} PACKED frames;
u8 gfx;
@@ -129,22 +127,22 @@ typedef struct Entity
u16 spriteVramOffset;
u8 spriteOffsetX;
u8 spriteOffsetY;
u32 * otherEntity;
u8 field_0x68;
u32* otherEntity;
u8 field_0x68;
u8 field_0x69;
u16 field_0x6a;
u8 field_0x6c;
u8 field_0x6d;
u8 filler4[6];
u32 * heldObjectPtr;
u8 filler3[2];
u16 itemCooldown;
u32 field_0x7c;
u16 field_0x80;
u32* heldObjectPtr;
u8 filler3[2];
u16 itemCooldown;
u32 field_0x7c;
u16 field_0x80;
u16 field_0x82;
union SplitHWord cutsceneBeh;
union SplitHWord cutsceneBeh;
u16 field_0x86;
} Entity;
#endif