#include "textures.h" Texture2D textures[T_COUNT]; Texture2D load_texture(const char *path){ char buf[128]; snprintf(buf, 128, ASSET_ROOT "%s", path); return LoadTexture(buf); } void load_textures(){ textures[T_PLAYER] = load_texture("8-dir.png"); textures[T_GRASS] = load_texture("grass_tiles.png"); textures[T_DIRT] = load_texture("dirt-path.png"); textures[T_TOWER] = load_texture("tower.png"); textures[T_SKELETON_MOVE] = load_texture("skeleton1/movement.png"); } void unload_textures(){ for (size_t i = 0; i < T_COUNT; i++){ UnloadTexture(textures[i]); } }