diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-05-06 19:11:48 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-05-06 19:11:48 +0000 |
commit | fcd2d57b2a28c0e342ba8bf668a4501f845a6df0 (patch) | |
tree | 91323e0802d58839aefb181d152bf5aa8f55c65a | |
parent | 926f3b1467efa314bb667ddbfd45a01c0edcd426 (diff) | |
download | PenguinYippies-fcd2d57b2a28c0e342ba8bf668a4501f845a6df0.tar.gz PenguinYippies-fcd2d57b2a28c0e342ba8bf668a4501f845a6df0.tar.bz2 PenguinYippies-fcd2d57b2a28c0e342ba8bf668a4501f845a6df0.zip |
Penguins billboards drawing
-rw-r--r-- | assets/penguinBillboard.png | bin | 0 -> 11343 bytes | |||
-rw-r--r-- | src/assets.c | 3 | ||||
-rw-r--r-- | src/assets.h | 5 | ||||
-rw-r--r-- | src/shooterScreen.c | 8 | ||||
-rw-r--r-- | src/shooterScreen.h | 2 |
5 files changed, 12 insertions, 6 deletions
diff --git a/assets/penguinBillboard.png b/assets/penguinBillboard.png Binary files differnew file mode 100644 index 0000000..4ed6377 --- /dev/null +++ b/assets/penguinBillboard.png diff --git a/src/assets.c b/src/assets.c index 6903e48..1d9f197 100644 --- a/src/assets.c +++ b/src/assets.c @@ -10,7 +10,8 @@ const char textureAssetsNames[TEXTURE_ASSET_COUNT][ASSETS_NAME_MAX] = { "shopBoard.png", "stoneCurrency.png", "clickerTool.png", - "booperTool.png" + "booperTool.png", + "penguinBillboard.png" }; const char animationAssetsNames[ANIMATION_ASSET_COUNT][ASSETS_NAME_MAX] = { diff --git a/src/assets.h b/src/assets.h index 4c0355a..4e5fb61 100644 --- a/src/assets.h +++ b/src/assets.h @@ -3,7 +3,7 @@ #define ASSETS_NAME_MAX 100 -#define TEXTURE_ASSET_COUNT 9 +#define TEXTURE_ASSET_COUNT 10 #define ANIMATION_ASSET_COUNT 4 #ifndef ASSETS_H @@ -23,7 +23,8 @@ enum SHOP_BOARD_TEXTURE, STONE_TEXTURE, CLICKER_TOOL_TEXTURE, - BOOPER_TOOL_TEXTURE + BOOPER_TOOL_TEXTURE, + PENGUIN_BILLBOARD_TEXTURE }; enum diff --git a/src/shooterScreen.c b/src/shooterScreen.c index 07b77fa..437f0e0 100644 --- a/src/shooterScreen.c +++ b/src/shooterScreen.c @@ -1,5 +1,6 @@ #include "shooterScreen.h" #include "game.h" +#include "assets.h" #include <raylib.h> #include <raymath.h> @@ -102,11 +103,14 @@ void updateShooterScreenJump(ShooterScreen* shooterScreen, Game* game) } } -void updateShooterScreenPenguins(ShooterScreen* ShooterScreen, Game* game) +void updateShooterScreenPenguins(ShooterScreen* shooterScreen, Game* game) { + Texture texture = game->assets.textures[PENGUIN_BILLBOARD_TEXTURE]; + ShooterPenguin* penguins = shooterScreen->penguins; + for (int i = 0; i < SHOOTER_PENGUIN_COUNT; ++i) { - + DrawBillboard(shooterScreen->player.camera, texture, penguins[i].position, 2.0, WHITE); } } diff --git a/src/shooterScreen.h b/src/shooterScreen.h index 766faa4..2d9d533 100644 --- a/src/shooterScreen.h +++ b/src/shooterScreen.h @@ -14,7 +14,7 @@ #define MOUSE_SPEED 0.01 #define SHOOTER_PENGUIN_COUNT 5 -#define SHOOTER_PENGUIN_HEIGHT 2.0 +#define SHOOTER_PENGUIN_HEIGHT 1.0 typedef struct ShooterPlayer { Camera3D camera; |