From b53826079429939cdfbda073608cb85be8ba0738 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 7 Mar 2015 11:29:57 -0500 Subject: Created entity-component system Also tweaked the bloom flicker, tweaked the scanline texture, created a second test map, and created some currently unused sound effects. --- src/mapview.h | 65 ----------------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/mapview.h (limited to 'src/mapview.h') diff --git a/src/mapview.h b/src/mapview.h deleted file mode 100644 index 505ab25..0000000 --- a/src/mapview.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef MAPVIEW_H -#define MAPVIEW_H - -#include -#include "state.h" -#include "mob.h" -#include "map.h" - -using namespace::std; - -const int TILE_WIDTH = 8; -const int TILE_HEIGHT = 8; -const int GAME_WIDTH = 320; -const int GAME_HEIGHT = 200; -const int MAP_WIDTH = GAME_WIDTH/TILE_WIDTH; -const int MAP_HEIGHT = GAME_HEIGHT/TILE_HEIGHT; - -const int FRAMES_PER_SECOND = 60; -const double SECONDS_PER_FRAME = 1.0 / FRAMES_PER_SECOND; - -enum direction_t { - up, left, down, right -}; - -typedef struct { - int axis; - int lower; - int upper; - int type; -} collision_t; - -class MapView : public State { - public: - MapView(Map* start, int x, int y); - ~MapView(); - void loadMap(Map* m); - void input(int key, int action); - void tick(); - void render(Texture* tex); - - private: - void add_collision(int axis, int lower, int upper, direction_t dir, int type); - void check_collisions(mob_t* mob, int x_next, int y_next); - - list left_collisions; - list right_collisions; - list up_collisions; - list down_collisions; - - Texture* bg = NULL; - Texture* chara; - Texture* tiles; - - bool holding_left = false; - bool holding_right = false; - bool holding_down = false; - bool holding_up = false; - mob_t* player; - - Map* curMap; - - int animFrame = 0; -}; - -#endif -- cgit 1.4.1