diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-03-15 16:57:06 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-03-15 16:57:06 +0000 |
commit | 409ea3517b46440f447e35280f399fb5c95e8d9d (patch) | |
tree | 73e4455d434776f07ae99d72139b2461a63400b7 /src | |
parent | 9d14163ea278171f96d0be0aa4e911f485befaf9 (diff) | |
download | PenguinYippies-409ea3517b46440f447e35280f399fb5c95e8d9d.tar.gz PenguinYippies-409ea3517b46440f447e35280f399fb5c95e8d9d.tar.bz2 PenguinYippies-409ea3517b46440f447e35280f399fb5c95e8d9d.zip |
stone texture
Diffstat (limited to 'src')
-rw-r--r-- | src/assets.c | 3 | ||||
-rw-r--r-- | src/assets.h | 5 | ||||
-rw-r--r-- | src/gameScreen.c | 15 |
3 files changed, 18 insertions, 5 deletions
diff --git a/src/assets.c b/src/assets.c index 95f90ed..11225b1 100644 --- a/src/assets.c +++ b/src/assets.c @@ -7,7 +7,8 @@ const char textureAssetsNames[TEXTURE_ASSET_COUNT][ASSETS_NAME_MAX] = { "toEmperorsEmporiumIcon.png", "toGameIcon.png", "emperorShopUI.png", - "shopBoard.png" + "shopBoard.png", + "stoneCurrency.png" }; const char animationAssetsNames[ANIMATION_ASSET_COUNT][ASSETS_NAME_MAX] = { diff --git a/src/assets.h b/src/assets.h index bf6da36..3d9b3eb 100644 --- a/src/assets.h +++ b/src/assets.h @@ -3,7 +3,7 @@ #define ASSETS_NAME_MAX 100 -#define TEXTURE_ASSET_COUNT 6 +#define TEXTURE_ASSET_COUNT 7 #define ANIMATION_ASSET_COUNT 3 #ifndef ASSETS_H @@ -20,7 +20,8 @@ enum TO_EMPERORS_EMPORIUM_ICON_TEXTURE, TO_GAME_ICON_TEXTURE, EMPEROR_SHOP_UI_TEXTURE, - SHOP_BOARD_TEXTURE + SHOP_BOARD_TEXTURE, + STONE_TEXTURE }; enum diff --git a/src/gameScreen.c b/src/gameScreen.c index 28e114a..f9594f0 100644 --- a/src/gameScreen.c +++ b/src/gameScreen.c @@ -130,9 +130,20 @@ void updateGameScreen(GameScreen* gameScreen, Game* game) } // Stones. + Texture stoneTexture = game->assets.textures[STONE_TEXTURE]; + + DrawTexturePro( + stoneTexture, + (Rectangle){5.0, 5.0, stoneTexture.width, stoneTexture.height}, + (Rectangle){0.0, 0.0, 35.0, 35.0}, + (Vector2){0.0, 0.0}, + 0.0, + WHITE + ); + char stonesBuf[30]; - snprintf(stonesBuf, sizeof(stonesBuf), "Stones: %d", game->stones); - DrawText(stonesBuf, 10, 10, 20, BLACK); + snprintf(stonesBuf, sizeof(stonesBuf), "%d", game->stones); + DrawText(stonesBuf, 40.0, 5.0, 30, BLACK); //DrawFPS(0, 0); } |