aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets.c
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2025-08-06 12:43:37 +0000
committernathan <nathansmith@disroot.org>2025-08-06 12:43:37 +0000
commit94ca30b13bffe1f02313b7fd32b2320e5c490fa5 (patch)
tree5019ec84a0c39fd2e38a11d03672e2ccdef6020d /src/assets.c
parentc5989ca9bcc1758f4d772d20b8bd4ae7762bc75e (diff)
downloadFindThings-94ca30b13bffe1f02313b7fd32b2320e5c490fa5.tar.gz
FindThings-94ca30b13bffe1f02313b7fd32b2320e5c490fa5.tar.bz2
FindThings-94ca30b13bffe1f02313b7fd32b2320e5c490fa5.zip
UGGGGG
Diffstat (limited to 'src/assets.c')
-rw-r--r--src/assets.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/assets.c b/src/assets.c
index 2ceff83..09388b8 100644
--- a/src/assets.c
+++ b/src/assets.c
@@ -16,20 +16,24 @@ const char shaderAssetNames[SHADER_ASSET_COUNT][FT_NAMEMAX] = {
"skybox"
};
+const char modelAssetPaths[MODEL_ASSET_COUNT][FT_NAMEMAX] = {
+ "UtilityPole.obj"
+};
+
void initAssets(Assets* assets)
{
// Textures.
for (int index = 0; index < TEXTURE_ASSET_COUNT; ++index)
{
assets->textures[index] = LoadTexture(
- TextFormat("assets/%s", textureAssetPaths[index]));
+ TextFormat("assets/images/%s", textureAssetPaths[index]));
}
// Images;
for (int index = 0; index < IMAGE_ASSET_COUNT; ++index)
{
assets->images[index] = LoadImage(
- TextFormat("assets/%s", imageAssetPaths[index]));
+ TextFormat("assets/images/%s", imageAssetPaths[index]));
}
// Shaders.
@@ -41,6 +45,13 @@ void initAssets(Assets* assets)
TextFormat("assets/shaders/glsl%i/%s.fs", GLSL_VERSION,
shaderAssetNames[index]));
}
+
+ // Models.
+ for (int index = 0; index < MODEL_ASSET_COUNT; ++index)
+ {
+ assets->models[index] = LoadModel(
+ TextFormat("assets/models/%s", modelAssetPaths[index]));
+ }
}
void closeAssets(Assets* assets)
@@ -59,4 +70,9 @@ void closeAssets(Assets* assets)
{
UnloadShader(assets->shaders[index]);
}
+
+ for (int index = 0; index < MODEL_ASSET_COUNT; ++index)
+ {
+ UnloadModel(assets->models[index]);
+ }
}