cleaning
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "../assets/character_run_frames.h"
|
||||
#include "../assets/character_crawl_frames.h"
|
||||
|
||||
// Simple obstacle representation
|
||||
// Obstacle representation
|
||||
struct Obstacle {
|
||||
int x;
|
||||
int y;
|
||||
@@ -48,7 +48,7 @@ inline bool check_collision(const CharacterPosition& player,
|
||||
break;
|
||||
}
|
||||
|
||||
// Player's bounding box
|
||||
// Player bounding box
|
||||
const int player_left = box_x;
|
||||
const int player_right = player_left + box_w;
|
||||
const int player_top = player_bottom + box_h;
|
||||
@@ -59,7 +59,7 @@ inline bool check_collision(const CharacterPosition& player,
|
||||
const int obs_bottom = obs.y;
|
||||
const int obs_top = obs_bottom + obs.height;
|
||||
|
||||
// Simple overlap check
|
||||
// Overlap check
|
||||
bool horizontal = player_left < obs_right && player_right > obs_left;
|
||||
bool vertical = player_bottom < obs_top && player_top > obs_bottom;
|
||||
return horizontal && vertical;
|
||||
|
||||
Reference in New Issue
Block a user