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 --- src/gameScreen.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'src/gameScreen.c') 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, -- cgit v1.2.3