aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets.c
blob: 0434b5c87b2c24d8faf365563bb2c43c136a5e5d (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
25
26
#include "assets.h"

const char textureAssetPaths[TEXTURE_ASSET_COUNT][FT_NAMEMAX] = {
  "mint.png",
  "nickel.png",
  "tree.png",
  "bush.png",
  "flower.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]);
  }
}