commit 120d762e4593bb020e9e6bc641a426337cf112bc
parent 024cd391bdace50f64feca640652969c3950c9e8
Author: Henry Unite <unitehenry@gmail.com>
Date: Sun, 19 Apr 2026 17:31:55 +0000
refactor: load textures
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/game.c b/src/game.c
@@ -188,10 +188,6 @@ void draw_base() {
}
void draw_score() {
- if (screen == TITLE) {
- return;
- }
-
if (!IsTextureValid(scoreTexture[0])) {
for (int i = 0; i < sizeof(scoreTexture) / sizeof(scoreTexture[0]); i++) {
char *texturePath;
@@ -202,6 +198,10 @@ void draw_score() {
}
}
+ if (screen == TITLE) {
+ return;
+ }
+
float centerX = (screenWidth - scoreTexture[0].width) / 2.0f;
float centerY = (screenHeight - scoreTexture[0].height) / 2.0f;