Dawn/src/game/poker/pokergameassets.c

39 lines
1.1 KiB
C

/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "pokergameassets.h"
bool pokerGameAssetsInit(pokergameassets_t *assets) {
// Load the game's shader
assetShaderLoad(&assets->shader,
"shaders/textured.vert", "shaders/textured.frag"
);
// Load the game's font
assetFontLoad(&assets->font, "fonts/opensans/OpenSans-Bold.ttf");
// Initialize the language buffer.
languageInit(&assets->language, "locale/language/en-US.csv");
// Load the world textures.
assetTextureLoad(&assets->testTexture, "textures/test_texture.png");
assetTextureLoad(&assets->cardTexture, "poker/cards.png");
assetTextureLoad(&assets->roomTexture, "poker/pub_skywall.png");
return true;
}
void pokerGameAssetsDispose(pokergameassets_t *assets) {
// Now we unload in what is essentially the reverse of the above.
textureDispose(&assets->roomTexture);
textureDispose(&assets->testTexture);
languageDispose(&assets->language);
fontDispose(&assets->font);
shaderDispose(&assets->shader);
}