From 31e39555f6625ec7c2b9f8dd99b4bf19872e40c0 Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Thu, 21 Sep 2023 21:55:10 -0600 Subject: Added more lines to gryoscope texure --- assets/gyroscope.png | Bin 105390 -> 193870 bytes src/gameScreen.c | 38 +++++++++++++++++++++++++------------- src/gameScreen.h | 2 ++ 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/assets/gyroscope.png b/assets/gyroscope.png index c6da908..197a4b9 100644 Binary files a/assets/gyroscope.png and b/assets/gyroscope.png differ 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. -- cgit v1.2.3