From 16533afa5876383384c5b7ef89187256833d6690 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Mon, 17 Apr 2023 14:46:20 -0500 Subject: [PATCH] Add a crosshair. --- Faceball2030/assets/crosshair.png | Bin 0 -> 1501 bytes Faceball2030/main.cpp | 2 ++ Faceball2030/main.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Faceball2030/assets/crosshair.png diff --git a/Faceball2030/assets/crosshair.png b/Faceball2030/assets/crosshair.png new file mode 100644 index 0000000000000000000000000000000000000000..fe3561599125b4c6acf33df26085afdce2d9c241 GIT binary patch literal 1501 zcmV<31tR*1P)EX>4Tx04R}tkv&MmKpe$i(~2VX1I!@ekfA!YAS&W0RV;#q(pG5I!Q|2}Xws0R zxHt-~1qVMCs}3&Cx;nTDg5U>;tBaGOiy;rjzr;BC%9xW2KE*(bR~ii9@QUQ@)V# zSmnIMSu0mr^Pc>L!JNL5;yTSy#IS@o5|E&viW17O5usHl#X^$yqaFMsu0KI8g#tGnm2Cnp$zfuQgKS{5( zw9pYSunk;Xw=`uBxZDATpA6ZQUCB>V$mfCgGy0}1Fmwy_u6eyR_i_3Fq^Yar8{ps& z7%x!vdWU!SwDx5|c5(TWSJf6c>LA;EE=naXjZzHvw=7;NB!=!HA^%*>?b5n$n5N#k=^c}pj3VTT zY=CT@bHP>xzzg{Y0N*Gquj>v=diD$1%Eq`8b6 z0f3M`_7?xF9r6K`c=kXzmPCOShJGIQOOu#it);PlZ7)4K1XIBZ7M}~=9e`B_()kt5 zB^SmZ5UharXhQIW!iZ2kutMHmgCFrn&E}c?>G}KOzL3qDZZz*Fzacb04|X z?cA$a2LBN&QlZ?|&;oDHdv(Az#Q#ukYiI#W2P^|c4gQC6J6a10IuNb_9*KKK+r~xlL~9;0EgRJ^#Jxpt_pzQB4Y@*OFSOU{m?R=)hsV@ zxLv3K<%ccf9oJ*L&nn|_s>0e)P*iG3uCL;K7695&Q1b{b;&M-h>Wl)k<$X2)g(wgm zLpQMa;<0_E20+Oc^QJ2x#2(wT0f;?@u9^4ZWBZ^EksZg-hb?;l5Ru3B!97AHdT-fwl^1;(oe2}Zm8ExOn)&+wc-{1+w; z0DK1U6Tol0L@u9~bzf!?JGRlJy00000NkvXXu0mjf DWssprite->width / 2),float(ScreenHeight() / 2 - crosshair->sprite->height / 2) }, crosshair, { 1,1 }, {255,255,255,128}); } GradientFillRectDecal({ 0,0 }, vf2d{ (float)ScreenWidth()/2,(float)ScreenHeight()/2 }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0) }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0) }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime > 0.2f ? 64 : 0) }, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0) }); GradientFillRectDecal({ float(ScreenWidth()/2),0}, vf2d{(float)ScreenWidth() / 2,(float)ScreenHeight() / 2}, {(uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0)}, { (uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime > 0.2f ? 64 : 0) }, {(uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0)}, {(uint8_t)screenCol.r,(uint8_t)screenCol.g,(uint8_t)screenCol.b,(uint8_t)(hudShakeTime>0.2f?120:hudShakeTime>0?64:0)}); diff --git a/Faceball2030/main.h b/Faceball2030/main.h index 954f494..f338789 100644 --- a/Faceball2030/main.h +++ b/Faceball2030/main.h @@ -237,7 +237,7 @@ class FaceBall : public PixelGameEngine Decal* dot, * enemy_ShootMe_tex,*bullet_tex,*wall_tex,*floor_tex, *enemy_Sonar_tex,*hud,*exit_wall_tex,*enemy_IShoot_tex, - *life4,*life3,*life2,*life1; + *life4,*life3,*life2,*life1,*crosshair; vi2d MAP_SIZE; vi2d exitCoords = { 0,0 }; std::vector>map;