#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" }; 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( TextFormat("assets/%s", textureAssetPaths[index])); } } 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) { UnloadTexture(assets->textures[index]); } }