aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets.c
blob: 6f2ac0c19cd7c03a3df4d3b17071282a134c567e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "assets.h"

const char textureAssetPaths[TEXTURE_ASSET_COUNT][FT_NAMEMAX] = {
  "mint.png",
  "nickel.png",
  "tree.png"
};

void initAssets(Assets* assets)
{
  for (int index = 0; index < TEXTURE_ASSET_COUNT; ++index)
  {
    assets->textures[index] = LoadTexture(
      TextFormat("assets/%s", textureAssetPaths[index]));
  }
}

void closeAssets(Assets* assets)
{
  for (int index = 0; index < TEXTURE_ASSET_COUNT; ++index)
  {
    UnloadTexture(assets->textures[index]);
  }
}