Fix signed int comparison

scene_man
En Yi 2023-11-11 12:44:37 +08:00
parent 97714eccf6
commit d947d95247
2 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ static void render_editor_game_scene(Scene_t* scene)
{
#define SURFACE_THICKNESS 4
int up = i - tilemap.width;
int bot = i + tilemap.width;
unsigned int bot = i + tilemap.width;
int right = i + 1;
int left = i - 1;
int bot_line = y + TILE_SIZE - tilemap.tiles[i].water_level * WATER_BBOX_STEP - SURFACE_THICKNESS / 2;

View File

@ -167,7 +167,7 @@ static void render_regular_game_scene(Scene_t* scene)
{
#define SURFACE_THICKNESS 4
int up = i - tilemap.width;
int bot = i + tilemap.width;
unsigned int bot = i + tilemap.width;
int right = i + 1;
int left = i - 1;
int bot_line = y + TILE_SIZE - tilemap.tiles[i].water_level * WATER_BBOX_STEP - SURFACE_THICKNESS / 2;