cleaning
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include "collision.h"
|
||||
#include "mbed.h"
|
||||
|
||||
// Small helper for minimal mbed-safe clamp
|
||||
inline int clamp_min(int a, int b) { return (a > b) ? a : b; }
|
||||
inline int clamp_max(int a, int b) { return (a < b) ? a : b; }
|
||||
|
||||
@@ -26,12 +25,8 @@ public:
|
||||
|
||||
// Periodically spawn new obstacle
|
||||
if (tick_counter_ % SPAWN_EVERY_TICKS == 0) {
|
||||
auto type = (spawn_index_++ % 2 == 0)
|
||||
? CrawlObstacleType::Crawl1
|
||||
: CrawlObstacleType::Crawl2;
|
||||
const int w = (type == CrawlObstacleType::Crawl1)
|
||||
? OBSTACLE_CRAWL1_FRAME_WIDTH
|
||||
: OBSTACLE_CRAWL2_FRAME_WIDTH;
|
||||
auto type = (spawn_index_++ % 2 == 0) ? CrawlObstacleType::Crawl1 : CrawlObstacleType::Crawl2;
|
||||
const int w = (type == CrawlObstacleType::Crawl1) ? OBSTACLE_CRAWL1_FRAME_WIDTH : OBSTACLE_CRAWL2_FRAME_WIDTH;
|
||||
spawn_obstacle(type, VIEW_WIDTH - w - 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user