From 331a5fe3b2f86233a16ce6ec7491d41179ec6afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Mon, 14 Oct 2019 18:17:32 +0200 Subject: [PATCH] Add axe --- assets.h | 52 ++++++++++++++++++++++++++++++++++++++++-- assets/weapon_axe.png | Bin 0 -> 714 bytes main.c | 2 +- 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 assets/weapon_axe.png diff --git a/assets.h b/assets.h index 19825c6..08d8f28 100644 --- a/assets.h +++ b/assets.h @@ -591,7 +591,55 @@ uint8_t SFG_backgrounds[][SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE] = SFG_PROGRAM_MEMORY uint8_t SFG_weaponImages[][SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE] = { - { // 0, shotgun + { // 0, axe +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,1,1,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +1,1,2,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,0,0,175, +175,175,175,175,175,175,175,175,175,1,1,2,3,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,0,0,6,0,175,175,175,175,175,175,175,175,175,1,48,2,3,2,175, +175,175,175,175,175,175,175,175,175,175,175,0,0,6,6,6,0,175,175,175,175,175,175, +175,175,1,48,2,3,2,2,175,175,175,175,175,175,175,175,175,175,0,0,6,6,6,6,6,0, +175,175,175,175,175,175,175,1,48,2,3,2,2,48,175,175,175,175,175,175,175,175,0,0, +6,6,6,6,6,6,93,0,175,175,175,175,175,175,1,1,2,3,2,2,48,1,175,175,175,175,175, +175,175,0,6,6,6,6,6,6,93,93,93,0,175,175,175,175,175,1,52,6,1,2,48,1,1,175,175, +175,175,175,175,0,0,5,6,6,6,6,93,93,93,93,93,0,175,175,175,1,1,3,6,5,3,1,1,1, +175,175,175,175,175,175,0,5,5,5,6,6,6,93,93,93,93,93,93,0,175,175,1,2,4,6,4,3, +50,1,1,175,175,175,175,175,175,0,4,4,5,5,5,6,93,93,93,93,93,93,94,0,175,1,50,3, +5,4,3,50,1,175,175,175,175,175,175,175,0,4,4,4,4,4,173,173,93,93,93,93,93,94,94, +94,1,2,3,4,3,43,42,1,175,175,175,175,175,175,175,0,4,4,4,4,4,172,172,173,173,93, +93,93,94,94,93,93,33,2,4,3,2,2,1,175,175,175,175,175,175,175,0,6,5,5,4,4,172, +172,172,172,173,173,93,94,94,93,93,93,33,2,3,2,1,1,175,175,175,175,175,175,175, +175,175,0,0,6,6,93,172,172,172,172,172,173,94,94,93,93,93,93,94,1,2,1,175,175, +175,175,175,175,175,175,175,175,175,175,175,0,0,94,94,172,172,172,172,93,94,93, +93,93,93,93,94,33,1,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,0,94,94,94,93,93,93,172,173,93,93,93,93,93,1,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,0,0,94,94,93,93,172,172,173,93,93, +172,172,0,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,0,94,94,94,172,172,172,172,172,172,172,93,0,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,0,170,170,94,172,172, +171,171,172,93,93,0,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,0,4,172,170,94,171,172,172,173,173,173,93,0,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,0,3,81,170,94,94, +170,172,172,172,172,171,171,0,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,0,0,0,94,94,93,170,172,172,170,170,170,0,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +0,94,94,93,170,170,170,170,0,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,0,94,94,170,170,170,0,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,0,94,170,170,0,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,0,0,0,175,175, +175,175,175,175,175,175,175,175,175,175,175 + }, + { // 1, shotgun 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, 175,175,175,175,175,175,175,175,1,1,1,1,175,175,175,175,175,175,175,175,175,175, 175,175,175,175,175,175,175,175,175,175,175,175,175,175,1,1,1,1,17,100,100,100, @@ -633,7 +681,7 @@ uint8_t SFG_weaponImages[][SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE] = 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, 175,175 }, - { // 1, rocket launcher + { // 2, rocket launcher 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175, 175,175,175,175,175,175,175,0,0,0,0,175,175,175,175,175,175,175,175,175,175,175, 175,175,175,175,175,175,175,175,175,175,175,175,175,0,0,0,0,5,4,2,2,0,175,175, diff --git a/assets/weapon_axe.png b/assets/weapon_axe.png new file mode 100644 index 0000000000000000000000000000000000000000..6464f129877ef6141c53c1084bd202cd7046a631 GIT binary patch literal 714 zcmV;*0yX`KP)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00J^eL_t(o!^M`ZlG`v8h0kgN z1PTla3j_=V3Kj+w2;RpiG$=4ED99t^5%LHN3Iqxa3IYoX1PlZU0s|I^wO}Pz{)-(; z+uoVXIGJ(2bMB9H9~|%-8G-|F8{T8N;Kms6{~>?_I3ABMt=aTG%K;CuB?~MU+_v`L zWq<>C`ua5b{Zdu1M0aH&sRW`F-E&dbuub!ljXOlJ9PW#{?w%X1U#|pV++-;sO9=pY zjNoys%|cQMf(S8$JJ%BtK1l+C`(e{Tshc7``e~^?Rg)q%XW&v*f4@W`gnu6Pi1~J& z{GW$4cfrto4<1hi=c7hcL^$~Gr-}PwhfERR);S0OHkyh95dh!-fNR|o!E(5d;h`jP zPn@ER45x$TblwZ!3)c6>LF>_UEDBh1KMS7-1>n>)BM~>7aLqwti6#YvV>wJm*AsDR zmYQ(Qh9g@8{_aJp=3r?vIh_DbHNufFoqYLXN3d6ANaK==79|9kpKVy07*qoM6N<$f+2Gx(f|Me literal 0 HcmV?d00001 diff --git a/main.c b/main.c index 583002e..3441af5 100755 --- a/main.c +++ b/main.c @@ -898,7 +898,7 @@ void SFG_init() void SFG_playerRotateWeapon(uint8_t next) { SFG_player.weapon = (SFG_player.weapon + (next * 2 - 1)); - SFG_player.weapon %= 2; + SFG_player.weapon %= 3; } /**