aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-10-30 14:40:15 -0600
committernathansmithsmith <nathansmith7@mailfence.com>2023-10-30 14:40:15 -0600
commit8f5f51cee013d5c1b9ad629c00aaf08a4572b332 (patch)
treee06c8da029aa76dd29e42881cd460581d90e3f94
parent0dd152a45305b54c6881eed1ff7d8d814cb92e59 (diff)
Fixed gyro with weird pixely thingy
-rw-r--r--src/gameScreen.c8
-rw-r--r--src/gyroscope.c2
-rw-r--r--src/settings.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c
index 700b8cd..7f574f2 100644
--- a/src/gameScreen.c
+++ b/src/gameScreen.c
@@ -253,16 +253,13 @@ void updateGameScreen(Game * game) {
if (gameScreen->levelComplete)
return;
- // GUI.
- drawGameScreenGui(game);
-
// Update world.
updateWorld(&game->world, game);
// Camera.
runCameraUpdate(game, game->cameras, gameScreen->mainCamera);
- // Draw.
+ // Draw world.
if (gameScreen->usingWorldRenderTexture) {
BeginTextureMode(gameScreen->worldRender);
ClearBackground(BLACK);
@@ -280,6 +277,9 @@ void updateGameScreen(Game * game) {
} else {
renderWorldGameScreen(game, gameScreen);
}
+
+ // GUI.
+ drawGameScreenGui(game);
}
void openGameScreen(Game * game) {
diff --git a/src/gyroscope.c b/src/gyroscope.c
index 7b6ee76..eb34e11 100644
--- a/src/gyroscope.c
+++ b/src/gyroscope.c
@@ -53,7 +53,7 @@ void drawGyroscope(Game * game, Gyroscope * gyroscope) {
// Draw this mother fucker.
BeginTextureMode(gyroscope->texture);
- ClearBackground(BLACK);
+ ClearBackground((Color){0x0, 0x0, 0x0, 0x0});
BeginMode3D(gyroscope->camera);
// This this fucker!!!
diff --git a/src/settings.c b/src/settings.c
index 3e3a178..b0c724d 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -16,7 +16,7 @@ void initSettings(Settings * settings) {
.drawFps = true,
.renderWidth = 480,
.renderHeight = 270,
- .useWorldRenderTexture = false
+ .useWorldRenderTexture = true
};
}