From 9666d21ec1263181fb61307e7282b033ed859141 Mon Sep 17 00:00:00 2001 From: SlyVTT Date: Sat, 8 Jul 2023 23:02:57 +0200 Subject: [PATCH] corrected Player struct to avoid char overflow on CG (resolution is 396px wide > 255 (so out of bound for char) --- src/player.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/player.h b/src/player.h index e4771a2..e20c544 100644 --- a/src/player.h +++ b/src/player.h @@ -16,8 +16,8 @@ typedef enum { /* Struct that define player parameters */ typedef struct { - unsigned short int x, y; /* The position of the player */ - unsigned char px, py; /* The position of the player on screen */ + unsigned int x, y; /* The position of the player */ + unsigned int px, py; /* The position of the player on screen */ unsigned short int life; /* How many lives the player still has between 0 * and 100. */ } Player;