Skip to content

Commit

Permalink
Tiny cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ohmnivore committed Sep 16, 2018
1 parent 0e682fe commit 14abadb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion code/Controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Controls {
public:

enum Mode {
WORLD,
WORLD = 0,
LOCAL,
SPRITE,
SPRITE_FOLLOW,
Expand Down
28 changes: 18 additions & 10 deletions code/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Renderer {
static const float SCREEN_HEIGHT;
static const float MAP_AND_WALL_SCALE;


enum WallDirection {
Y_PLUS = 0,
X_MINUS,
Expand All @@ -34,6 +35,19 @@ class Renderer {
WallsOfDir walls[WallDirection::MAX_WALL_DIRECTIONS];
};


enum TilemapOrder {
TILEMAP_BOTTOM = 0,
TILEMAP_TOP,
MAX_TILEMAP_ORDERS
};

struct Tilemap {
glm::vec3 pos;
int texIdx;
};


struct Sprite {
glm::vec3 pos;
int texIdx;
Expand All @@ -42,20 +56,23 @@ class Renderer {

typedef Oryol::Array<Sprite> Sprites;


struct DropShadow {
Sprite* sprite;
glm::vec3 pos;
};

typedef Oryol::Array<DropShadow> DropShadows;


struct BoxCollider {
glm::vec2 pos;
glm::vec2 size;
};

typedef Oryol::Array<BoxCollider> BoxColliders;


struct Renderable {

Renderable(const Wall& wall, const glm::vec3& viewSpacePos, const glm::mat3& transform);
Expand All @@ -72,16 +89,6 @@ class Renderer {

typedef Oryol::Array<Renderable> SortedRenderList;

enum TilemapOrder {
TILEMAP_BOTTOM,
TILEMAP_TOP,
MAX_TILEMAP_ORDERS
};

struct Tilemap {
glm::vec3 pos;
int texIdx;
};

typedef Oryol::Array<Oryol::String> TexPaths;
typedef Oryol::Array<glm::vec2> TexSizes;
Expand Down Expand Up @@ -109,6 +116,7 @@ class Renderer {
int bgColor[3];
};


void Setup(LvlData& lvl);

void Update(Camera& cam, LvlData& lvl);
Expand Down

0 comments on commit 14abadb

Please sign in to comment.