Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type. If your environment doesn't have stdbool.h, this simple replacement will suffice: typedef signed char bool;
This commit is contained in:
1 parent
9dd8859240
commit
a90ad3b0e2
258 files changed
+4052
-4057
No files matched your search
@@ -94,7 +94,7 @@ static int are_cells_full_(SnakeContext *ctx)
|
||||
|
||||
static void new_food_pos_(SnakeContext *ctx)
|
||||
{
|
||||
while (SDL_TRUE) {
|
||||
while (true) {
|
||||
const char x = (char) SDL_rand(SNAKE_GAME_WIDTH);
|
||||
const char y = (char) SDL_rand(SNAKE_GAME_HEIGHT);
|
||||
if (snake_cell_at(ctx, x, y) == SNAKE_CELL_NOTHING) {
|
||||
|
||||
Reference in new issue
Block a user