diff options
author | BoredGuy <osome3717@gmail.com> | 2025-07-30 23:33:22 +0300 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2025-07-30 23:33:22 +0300 |
commit | c05e188ef6a4b715848f9f0b401351a43c80168d (patch) | |
tree | dc1dd17a8623b26bac9bc6b959084babe556ee32 /src/background.c | |
parent | 815aec62f8ae3a403e913559d5fe6138c8825007 (diff) |
Small Refactor
Diffstat (limited to 'src/background.c')
-rw-r--r-- | src/background.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/background.c b/src/background.c index 39e3c1e..060ce6a 100644 --- a/src/background.c +++ b/src/background.c @@ -10,7 +10,9 @@ void AddBackground(const char* backgroundTextureName) { e.drawLayer = Background_Layer; e.position = (Vector2) {0.0f, 0.0f}; - Texture2D backgroundTexture = GetTexture(backgroundTextureName); + + Texture2D backgroundTexture = + GetMatchingAssetWithType(backgroundTextureName, Texture_Asset)->texture; const float backgroundSizeScale = (float)WINDOW_HEIGHT / backgroundTexture.height; Vector2 backgroundBounds = @@ -24,7 +26,3 @@ void AddBackground(const char* backgroundTextureName) { AddEntity(&e); } - -void UpdateBackground(Entity* background, float deltaTime) { - background->position.x -= 600 * deltaTime; -} |