#include "assets.h" const char textureAssetPaths[TEXTURE_ASSET_COUNT][ASSET_PATH_MAX] = { "../assets/icon.png", "../assets/icon128.png", "../assets/icon64.png" }; const char modelAssetPaths[MODEL_ASSET_COUNT][ASSET_PATH_MAX] = { "../assets/antifaShip.obj", "../assets/soldato.obj", "../assets/caporale.obj", "../assets/sergente.obj", "../assets/maresciallo.obj", "../assets/generale.obj", "../assets/mussolini.obj", "../assets/guidedMissile.obj" }; void LoadAssets(Assets * assets) { int i; // Textures. for (i = 0; i < TEXTURE_ASSET_COUNT; ++i) assets->textures[i] = LoadTexture(textureAssetPaths[i]); // Models. for (i = 0; i < MODEL_ASSET_COUNT; ++i) assets->models[i] = LoadModel(modelAssetPaths[i]); TraceLog(LOG_INFO, "Assets loaded"); } void unloadAssets(Assets * assets) { int i; // Textures. for (i = 0; i < TEXTURE_ASSET_COUNT; ++i) UnloadTexture(assets->textures[i]); // Models. for (i = 0; i < MODEL_ASSET_COUNT; ++i) UnloadModel(assets->models[i]); TraceLog(LOG_INFO, "Assets unloaded"); }