proper placement of the obstacles
This commit is contained in:
@@ -4,24 +4,24 @@
|
||||
|
||||
// Crawl obstacle for CRAWL1 (2 lines tall)
|
||||
static const char *OBSTACLE_CRAWL1_FRAME[] = {
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######"
|
||||
"#########",
|
||||
".######",
|
||||
"..#####",
|
||||
"..####",
|
||||
"...###",
|
||||
"...###"
|
||||
};
|
||||
|
||||
// Crawl obstacle for CRAWL2 (4 lines tall)
|
||||
static const char *OBSTACLE_CRAWL2_FRAME[] = {
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######",
|
||||
"#######"
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
"###"
|
||||
};
|
||||
|
||||
enum class CrawlObstacleType { Crawl1 = 0, Crawl2, COUNT };
|
||||
@@ -34,7 +34,9 @@ static const int OBSTACLE_CRAWL1_FRAME_WIDTH = std::strlen(OBSTACLE_CRAWL1_FRAME
|
||||
static const int OBSTACLE_CRAWL1_COLLISION_LEFT_OFFSET = 0;
|
||||
static const int OBSTACLE_CRAWL1_COLLISION_RIGHT_OFFSET = 0;
|
||||
static const int OBSTACLE_CRAWL1_COLLISION_WIDTH = OBSTACLE_CRAWL1_FRAME_WIDTH - (OBSTACLE_CRAWL1_COLLISION_LEFT_OFFSET + OBSTACLE_CRAWL1_COLLISION_RIGHT_OFFSET);
|
||||
static const int OBSTACLE_CRAWL1_COLLISION_HEIGHT = OBSTACLE_CRAWL1_FRAME_HEIGHT;
|
||||
static const int OBSTACLE_CRAWL1_COLLISION_TOP_OFFSET = 4; // first 4 rows are just empty ('.')
|
||||
// collision box height = bottom 2 rows
|
||||
static const int OBSTACLE_CRAWL1_COLLISION_HEIGHT = 2;
|
||||
|
||||
// Crawl2 dimensions and collision
|
||||
static const int OBSTACLE_CRAWL2_FRAME_HEIGHT = sizeof(OBSTACLE_CRAWL2_FRAME) / sizeof(OBSTACLE_CRAWL2_FRAME[0]);
|
||||
|
||||
Reference in New Issue
Block a user