diff --git a/src/Bullet.h b/src/Bullet.h index 7db8afc8..39db7b91 100644 --- a/src/Bullet.h +++ b/src/Bullet.h @@ -2,6 +2,8 @@ #include "WindowsWrapper.h" +#include "CommonDefines.h" + #define BULLET_MAX 0x40 typedef struct BULLET @@ -31,13 +33,7 @@ typedef struct BULLET int enemyYL; int blockXL; int blockYL; - struct - { - int front; - int top; - int back; - int bottom; - } view; + OTHER_RECT view; } BULLET; typedef struct BULLET_TABLE @@ -50,13 +46,7 @@ typedef struct BULLET_TABLE int enemyYL; int blockXL; int blockYL; - struct - { - int front; - int top; - int back; - int bottom; - } view; + OTHER_RECT view; } BULLET_TABLE; extern BULLET gBul[BULLET_MAX]; diff --git a/src/CommonDefines.h b/src/CommonDefines.h index 198842df..f7eb3da3 100644 --- a/src/CommonDefines.h +++ b/src/CommonDefines.h @@ -20,3 +20,11 @@ enum Direction DIR_DOWN = 3, DIR_AUTO = 4 }; + +struct OTHER_RECT // The original name for this struct is unknown +{ + int front; + int top; + int back; + int bottom; +}; diff --git a/src/MyChar.h b/src/MyChar.h index f75ef715..53a585c0 100644 --- a/src/MyChar.h +++ b/src/MyChar.h @@ -2,6 +2,8 @@ #include "WindowsWrapper.h" +#include "CommonDefines.h" + // TODO - When I add bitmask constants for gMC.flags... // 0x100 is a 'player is underwater' flag @@ -38,20 +40,8 @@ typedef struct MYCHAR int ym; int ani_wait; int ani_no; - struct - { - int front; - int top; - int back; - int bottom; - } hit; - struct - { - int front; - int top; - int back; - int bottom; - } view; + OTHER_RECT hit; + OTHER_RECT view; RECT rect; RECT rect_arms; int level; diff --git a/src/NpChar.h b/src/NpChar.h index 542619ee..259896bc 100644 --- a/src/NpChar.h +++ b/src/NpChar.h @@ -2,6 +2,7 @@ #include "WindowsWrapper.h" +#include "CommonDefines.h" #include "Draw.h" #define NPC_MAX 0x200 @@ -81,20 +82,8 @@ typedef struct NPCHAR int count2; int act_no; int act_wait; - struct - { - int front; - int top; - int back; - int bottom; - } hit; - struct - { - int front; - int top; - int back; - int bottom; - } view; + OTHER_RECT hit; + OTHER_RECT view; unsigned char shock; int damage_view; int damage;