diff options
author | nathan <nathansmith@disroot.org> | 2025-07-25 06:06:55 +0000 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-07-25 06:06:55 +0000 |
commit | f96ad3c93b9a5a74d2af2e9b8b4835a672a9875b (patch) | |
tree | 3fa0e29ff83976450bab683401df422a1078b729 | |
parent | 7c4d899d6b8703f5cf787629a329c59a77a5411e (diff) | |
download | FindThings-f96ad3c93b9a5a74d2af2e9b8b4835a672a9875b.tar.gz FindThings-f96ad3c93b9a5a74d2af2e9b8b4835a672a9875b.tar.bz2 FindThings-f96ad3c93b9a5a74d2af2e9b8b4835a672a9875b.zip |
Fixing things up for future thingies
-rw-r--r-- | assets/heightmap.png | bin | 107055 -> 0 bytes | |||
-rw-r--r-- | src/assets.c | 22 | ||||
-rw-r--r-- | src/assets.h | 13 | ||||
-rw-r--r-- | src/entity.c | 2 |
4 files changed, 4 insertions, 33 deletions
diff --git a/assets/heightmap.png b/assets/heightmap.png Binary files differdeleted file mode 100644 index b9a1b69..0000000 --- a/assets/heightmap.png +++ /dev/null diff --git a/src/assets.c b/src/assets.c index a50b824..604b622 100644 --- a/src/assets.c +++ b/src/assets.c @@ -1,11 +1,6 @@ #include "assets.h" -const char imageAssetPaths[IMAGE_ASSET_COUNT][FT_NAMEMAX] = { - "heightmap.png" -}; - const char textureAssetPaths[TEXTURE_ASSET_COUNT][FT_NAMEMAX] = { - "heightmap.png", "mint.png", "nickel.png", "tree.png" @@ -13,14 +8,6 @@ const char textureAssetPaths[TEXTURE_ASSET_COUNT][FT_NAMEMAX] = { void initAssets(Assets* assets) { - // Images. - for (int index = 0; index < IMAGE_ASSET_COUNT; ++index) - { - assets->images[index] = LoadImage( - TextFormat("assets/%s", imageAssetPaths[index])); - } - - // Textures. for (int index = 0; index < TEXTURE_ASSET_COUNT; ++index) { assets->textures[index] = LoadTexture( @@ -30,14 +17,7 @@ void initAssets(Assets* assets) void closeAssets(Assets* assets) { - // Images. - for (int index = 0; index < IMAGE_ASSET_COUNT; ++index) - { - UnloadImage(assets->images[index]); - } - - // Textures. - for (int index = 0; index < TEXTURE_ASSET_COUNT; ++index) + for (int index = 0; index < TEXTURE_ASSET_COUNT; ++index) { UnloadTexture(assets->textures[index]); } diff --git a/src/assets.h b/src/assets.h index 0c6664c..88345b1 100644 --- a/src/assets.h +++ b/src/assets.h @@ -3,29 +3,20 @@ #ifndef ASSETS_H #define ASSETS_H -#define IMAGE_ASSET_COUNT 1 -#define TEXTURE_ASSET_COUNT 4 +#define TEXTURE_ASSET_COUNT 3 -extern const char imageAssetPaths[IMAGE_ASSET_COUNT][FT_NAMEMAX]; extern const char textureAssetPaths[TEXTURE_ASSET_COUNT][FT_NAMEMAX]; typedef int8_t AssetId; -// Image asset ids. -enum { - HEIGHT_MAP_IMAGE -}; - // Texture asset ids. enum { - HEIGHT_MAP_TEXTURE, MINT_TEXTURE, - NICK_TEXTURE, + NICKEL_TEXTURE, TREE_TEXTURE }; typedef struct { - Image images[IMAGE_ASSET_COUNT]; Texture textures[TEXTURE_ASSET_COUNT]; } Assets; diff --git a/src/entity.c b/src/entity.c index e510a01..d5a0bab 100644 --- a/src/entity.c +++ b/src/entity.c @@ -26,7 +26,7 @@ void updateEntity(Entity* entity, Game* game) entity->position, 1.0, WHITE); break; case STICKY_NICKEL: - DrawBillboard(game->player.camera, game->assets.textures[NICK_TEXTURE], + DrawBillboard(game->player.camera, game->assets.textures[NICKEL_TEXTURE], entity->position, 1.0, WHITE); break; default: |