From efc467b77c1b224420e98aeacb8f117ca172ad25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 8 Nov 2019 21:12:46 +0100 Subject: [PATCH] Add plasma --- assets.h | 21 +++++++++++++++++++++ assets/weapon_plasmagun.png | Bin 0 -> 711 bytes main.c | 5 +++-- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 assets/weapon_plasmagun.png diff --git a/assets.h b/assets.h index c8b1220..65acff2 100644 --- a/assets.h +++ b/assets.h @@ -477,6 +477,27 @@ SFG_PROGRAM_MEMORY uint8_t SFG_weaponImages[][SFG_TEXTURE_STORE_SIZE] = 235,168,0,0,0,0,0,34,34,0,0,0,2,34,47,22,229,168,0,0,0,0,0,0,0,0,0,0,0,0,2,34, 234,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,53,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,2,227,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34 + }, + { // 4, plasma gun +175,4,6,0,50,5,187,17,7,190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,51,0,0,0,0,0,0,0,0,0,3,51,0,0,3,51,136,0,0,0,0,0,0,0,51, +48,3,68,48,51,56,130,34,0,0,0,0,0,0,0,52,67,3,71,51,136,136,34,34,0,0,0,0,0,0,3, +68,71,51,120,136,130,34,34,68,0,0,0,0,0,0,3,71,119,136,88,34,34,68,68,17,0,0,0, +0,0,0,51,120,136,130,82,34,36,17,17,17,0,0,0,0,0,51,88,133,34,37,34,34,65,17,17, +17,0,0,0,0,51,136,82,34,85,82,34,34,113,17,17,17,0,0,0,51,136,85,34,34,34,34,34, +39,17,17,85,85,0,0,3,136,130,34,34,68,68,116,119,113,17,85,86,102,0,0,52,68,68, +68,68,17,17,17,17,17,21,86,153,153,0,0,49,17,17,17,17,17,17,17,17,17,85,105,103, +119,0,0,3,55,116,65,21,85,85,85,85,85,86,150,114,34,0,0,0,3,102,102,102,102,102, +102,102,102,102,151,34,85,0,0,0,3,150,150,150,150,153,105,150,153,150,151,37,85, +0,0,0,3,102,102,102,102,102,102,102,102,102,151,85,85,0,0,3,55,116,65,21,85,85, +85,85,85,86,150,113,17,0,0,50,34,34,34,34,34,34,34,34,34,85,105,103,119,0,0,52, +68,68,68,68,34,34,34,34,34,37,86,153,153,0,0,3,17,17,17,17,68,71,71,119,114,34, +85,86,102,0,0,0,51,17,68,17,17,17,17,17,23,34,34,85,85,0,0,0,0,51,17,65,17,68, +65,17,17,114,34,34,34,0,0,0,0,0,51,65,20,17,20,17,17,66,34,34,34,0,0,0,0,0,0,51, +113,17,17,65,17,20,34,34,34,0,0,0,0,0,0,3,119,119,17,65,17,17,68,68,34,0,0,0,0, +0,0,3,119,119,51,113,17,17,17,17,68,0,0,0,0,0,0,0,55,115,3,119,51,17,17,17,17,0, +0,0,0,0,0,0,51,48,3,119,48,51,49,17,17,0,0,0,0,0,0,0,0,0,3,51,0,0,3,51,17,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,51 } }; diff --git a/assets/weapon_plasmagun.png b/assets/weapon_plasmagun.png new file mode 100644 index 0000000000000000000000000000000000000000..45583df3b64eedc7d51da1c93ebbd0cd0b76d105 GIT binary patch literal 711 zcmV;&0yzDNP)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00J*bL_t(o!|higbHXqfed7@M z854+#iHZp%5;0MUKp-oT$jV71vI0?AF;Q7rfv7-4AS(A0Dt5PtB_(OUBn`(7v)pl9 z+O+TG<$W*dQwx0Kfo*~Zw|@fO1eo~w-n$C{24JySVZYxGfEWPIITo9h7m0}vc>C3k z8cPwpy9XApK_@vA{Xg@7Y4+O$sG8sZTUGEE;YKgKF2LQAt1yt~&s*UE8O$9fZF$0> zCBr%LY zNuqDU{to%1ewauCQhq9WC3ty?h*MHNG%oR;?RML#U?kuIr^+u&$B|G8OnncX5PT1*t%AhVdh8-*uYw#sdmuM9stKs3_hCkT>8=i=!>Bj&7002ovPDHLkV1i%wBe4Jg literal 0 HcmV?d00001 diff --git a/main.c b/main.c index c26d7f9..431f2dd 100755 --- a/main.c +++ b/main.c @@ -111,8 +111,9 @@ void SFG_init(); #define SFG_WEAPON_SHOTGUN 1 #define SFG_WEAPON_MACHINE_GUN 2 #define SFG_WEAPON_ROCKER_LAUNCHER 3 +#define SFG_WEAPON_PLASMAGUN 4 -#define SFG_WEAPONS_TOTAL 4 +#define SFG_WEAPONS_TOTAL 5 #define SFG_GAME_RESOLUTION_X \ (SFG_SCREEN_RESOLUTION_X / SFG_RESOLUTION_SCALEDOWN) @@ -2334,7 +2335,7 @@ void SFG_drawWeapon(int16_t bobOffset) SFG_blitImage(SFG_weaponImages[SFG_player.weapon], SFG_WEAPON_IMAGE_POSITION_X, - SFG_WEAPON_IMAGE_POSITION_Y + bobOffset, + SFG_WEAPON_IMAGE_POSITION_Y + bobOffset - 1, SFG_WEAPON_IMAGE_SCALE); }