aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-09-21 21:55:10 -0600
committernathansmithsmith <nathansmith7@mailfence.com>2023-09-21 21:55:10 -0600
commit31e39555f6625ec7c2b9f8dd99b4bf19872e40c0 (patch)
tree61eb337aee5b55243ecc3dc4f576c1f2c9f30938
parentff2c529dda20dba1ea7ef21f46703d59fb49178b (diff)
Added more lines to gryoscope texure
-rw-r--r--assets/gyroscope.pngbin105390 -> 193870 bytes
-rw-r--r--src/gameScreen.c38
-rw-r--r--src/gameScreen.h2
3 files changed, 27 insertions, 13 deletions
diff --git a/assets/gyroscope.png b/assets/gyroscope.png
index c6da908..197a4b9 100644
--- a/assets/gyroscope.png
+++ b/assets/gyroscope.png
Binary files 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.