summaryrefslogtreecommitdiff
path: root/src/background.c
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-08-31 19:24:24 +0300
committerBoredGuy <osome3717@gmail.com>2025-08-31 19:24:24 +0300
commit1562dd67d16d328e919db28cfd48206c8c868fe4 (patch)
treefe8f78e9d94ae55ff3868739dc359dd4629f8441 /src/background.c
parent8a7c25827624348ccd7a9ac8bf978e71117f8b75 (diff)
Added hitbox/hurtbox system
- Made the entity struct much smaller
Diffstat (limited to 'src/background.c')
-rw-r--r--src/background.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/background.c b/src/background.c
index 7929fa1..a2b3334 100644
--- a/src/background.c
+++ b/src/background.c
@@ -14,17 +14,7 @@ void AddBackground(const char* backgroundTextureName) {
e.position = (Vector2) {0.0f, 0.0f};
Asset* backgroundTextureAsset =
- GetMatchingAssetWithType(backgroundTextureName, Texture_Asset);
-
- if (backgroundTextureAsset == NULL) {
-
- TraceLog(LOG_ERROR,
- "Failed to create background from texture asset: %s, asset not found",
- backgroundTextureName
- );
- exit(EXIT_FAILURE);
-
- }
+ GetMatchingAssetExitOnFail(backgroundTextureName, Texture_Asset);
Texture2D backgroundTexture = backgroundTextureAsset->texture;
const float backgroundSizeScale = (float)WINDOW_HEIGHT / backgroundTexture.height;