diff options
-rw-r--r-- | assets/gyroscope.png | bin | 105390 -> 193870 bytes | |||
-rw-r--r-- | src/gameScreen.c | 38 | ||||
-rw-r--r-- | src/gameScreen.h | 2 |
3 files changed, 27 insertions, 13 deletions
diff --git a/assets/gyroscope.png b/assets/gyroscope.png Binary files differindex c6da908..197a4b9 100644 --- a/assets/gyroscope.png +++ b/assets/gyroscope.png diff --git a/src/gameScreen.c b/src/gameScreen.c index 96e14ca..3dbb6ac 100644 --- a/src/gameScreen.c +++ b/src/gameScreen.c @@ -89,20 +89,31 @@ void drawGyroscope(Game * game) { ); // Top to bottom. - DrawLine( - gyroscopePosition.x + (GYROSCOPE_TEXTURE_SIZE / 2.0), - gyroscopePosition.y, - gyroscopePosition.x + (GYROSCOPE_TEXTURE_SIZE / 2.0), - gyroscopePosition.y + GYROSCOPE_TEXTURE_SIZE, - RED + DrawLineEx( + (Vector2){ + gyroscopePosition.x + (GYROSCOPE_TEXTURE_SIZE / 2.0), + gyroscopePosition.y, + }, + (Vector2){ + gyroscopePosition.x + (GYROSCOPE_TEXTURE_SIZE / 2.0), + gyroscopePosition.y + GYROSCOPE_TEXTURE_SIZE, + }, + GYROSCOPE_LINE_THICKNESS, + SKYBLUE ); - DrawLine( - gyroscopePosition.x, - gyroscopePosition.y + (GYROSCOPE_TEXTURE_SIZE / 2.0), - gyroscopePosition.x + GYROSCOPE_TEXTURE_SIZE, - gyroscopePosition.y + (GYROSCOPE_TEXTURE_SIZE / 2.0), - RED + // Left to right. + DrawLineEx( + (Vector2){ + gyroscopePosition.x, + gyroscopePosition.y + (GYROSCOPE_TEXTURE_SIZE / 2.0), + }, + (Vector2){ + gyroscopePosition.x + GYROSCOPE_TEXTURE_SIZE, + gyroscopePosition.y + (GYROSCOPE_TEXTURE_SIZE / 2.0), + }, + GYROSCOPE_LINE_THICKNESS, + YELLOW ); } @@ -124,7 +135,8 @@ void drawGameScreenGui(Game * game) { snprintf( buf, bufSize, - "X %.2f\nY %.2f\nZ %.2f\n\nSpeed %.2f", + "Health %.2f\n\nX %.2f\nY %.2f\nZ %.2f\n\nSpeed %.2f", + player->health, position.x, position.y, position.z, diff --git a/src/gameScreen.h b/src/gameScreen.h index 20872b3..698b044 100644 --- a/src/gameScreen.h +++ b/src/gameScreen.h @@ -4,6 +4,8 @@ #define GAME_SCREEN_H #define GAME_SCREEN_TEXT_SIZE 20.0 + +#define GYROSCOPE_LINE_THICKNESS 2.0 #define GYROSCOPE_TEXTURE_SIZE 80 // Gui stuff and shit. |