Add tile grid and atlas concept to game

This commit is contained in:
2016-06-25 21:23:15 +10:00
parent b7063963b8
commit e638724c75
8 changed files with 114 additions and 14 deletions
+8 -2
View File
@@ -8,14 +8,20 @@ GLOBAL_VAR AssetManager assetManager;
Texture *asset_getTexture(const enum TexList type)
{
// NOTE(doyle): Since we're using a map, the count of an object can
// only be 1 or 0
if (type < texlist_count)
return &assetManager.textures[type];
return NULL;
}
TexAtlas *asset_getTextureAtlas(const enum TexList type)
{
if (type < texlist_count)
return &assetManager.texAtlas[type];
return NULL;
}
const i32 asset_loadTextureImage(const char *const path, const enum TexList type)
{
/* Open the texture image */