From 2d47b4a7b3bc21db4b8c5cd9e3f707860773c0b3 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Tue, 19 Jul 2016 02:59:30 +0200 Subject: [PATCH] Tiny header cleanup --- Aquaria/CurrentRender.cpp | 2 ++ Aquaria/Game.h | 30 ------------------------------ Aquaria/GameEnums.h | 31 +++++++++++++++++++++++++++++++ Aquaria/GridRender.h | 9 +++++++-- Aquaria/PathRender.cpp | 1 + Aquaria/SteamRender.cpp | 1 + 6 files changed, 42 insertions(+), 32 deletions(-) diff --git a/Aquaria/CurrentRender.cpp b/Aquaria/CurrentRender.cpp index 75bc495..7a5b0ec 100644 --- a/Aquaria/CurrentRender.cpp +++ b/Aquaria/CurrentRender.cpp @@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "GridRender.h" #include "RenderBase.h" +#include "Path.h" +#include "Game.h" #include "../BBGE/AfterEffect.h" diff --git a/Aquaria/Game.h b/Aquaria/Game.h index 51c67e8..9f3a851 100644 --- a/Aquaria/Game.h +++ b/Aquaria/Game.h @@ -368,36 +368,6 @@ typedef std::vector QuadArray; typedef std::vector ElementUpdateList; -// Note: although this is a bitmask, only one of these values may be set at a time! -// This is because GridRender and most Lua scripts check via ==, not for bits set (Lua 5.1 doesn't have bit ops) -enum ObsType -{ - OT_EMPTY = 0x00, - - // immutable - OT_BLACK = 0x01, - OT_BLACKINVIS = 0x02, // same as OT_BLACK, but not drawn - OT_MASK_BLACK = OT_BLACK | OT_BLACKINVIS, - - // set by tiles - OT_INVISIBLE = 0x04, - OT_INVISIBLEIN = 0x08, - OT_HURT = 0x10, - - // set by entities - OT_INVISIBLEENT = 0x20, - - // mask for all bits that block - OT_BLOCKING = OT_MASK_BLACK | OT_INVISIBLE | OT_INVISIBLEIN | OT_HURT | OT_INVISIBLEENT, - - // free for use, not colliding by default - OT_USER1 = 0x40, - OT_USER2 = 0x80, - OT_USER_MASK = OT_USER1 | OT_USER2, - - OT_OUTOFBOUNDS = 0xff -}; - struct EntitySaveData { public: diff --git a/Aquaria/GameEnums.h b/Aquaria/GameEnums.h index 967f1fd..e64b368 100644 --- a/Aquaria/GameEnums.h +++ b/Aquaria/GameEnums.h @@ -2,6 +2,37 @@ #define GAMEENUMS_H +// Note: although this is a bitmask, only one of these values may be set at a time! +// This is because GridRender and most Lua scripts check via ==, not for bits set (Lua 5.1 doesn't have bit ops) +enum ObsType +{ + OT_EMPTY = 0x00, + + // immutable + OT_BLACK = 0x01, + OT_BLACKINVIS = 0x02, // same as OT_BLACK, but not drawn + OT_MASK_BLACK = OT_BLACK | OT_BLACKINVIS, + + // set by tiles + OT_INVISIBLE = 0x04, + OT_INVISIBLEIN = 0x08, + OT_HURT = 0x10, + + // set by entities + OT_INVISIBLEENT = 0x20, + + // mask for all bits that block + OT_BLOCKING = OT_MASK_BLACK | OT_INVISIBLE | OT_INVISIBLEIN | OT_HURT | OT_INVISIBLEENT, + + // free for use, not colliding by default + OT_USER1 = 0x40, + OT_USER2 = 0x80, + OT_USER_MASK = OT_USER1 | OT_USER2, + + OT_OUTOFBOUNDS = 0xff +}; + + enum WorldMapRevealMethod { REVEAL_UNSPECIFIED = -1, diff --git a/Aquaria/GridRender.h b/Aquaria/GridRender.h index 5a48d8b..59dd84e 100644 --- a/Aquaria/GridRender.h +++ b/Aquaria/GridRender.h @@ -21,11 +21,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef GRIDRENDER_H #define GRIDRENDER_H +#include "GameEnums.h" #include "../BBGE/Quad.h" - -#include "Game.h" +#include "ActionMapper.h" class GemMover; +struct MinimapIcon; +struct WorldMapTile; +struct GemData; +class AquariaMenuItem; +class BitmapText; class GridRender : public RenderObject { diff --git a/Aquaria/PathRender.cpp b/Aquaria/PathRender.cpp index d73e4c1..1582586 100644 --- a/Aquaria/PathRender.cpp +++ b/Aquaria/PathRender.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "GridRender.h" #include "RenderBase.h" +#include "Game.h" PathRender::PathRender() : RenderObject() { diff --git a/Aquaria/SteamRender.cpp b/Aquaria/SteamRender.cpp index 7922be1..9c332f0 100644 --- a/Aquaria/SteamRender.cpp +++ b/Aquaria/SteamRender.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "GridRender.h" #include "RenderBase.h" #include "../BBGE/AfterEffect.h" +#include "Game.h" SteamRender::SteamRender() : RenderObject() {