diff --git a/Faceball2030/assets/enemies/IShoot.png b/Faceball2030/assets/enemies/IShoot.png index 7faa4e0..b06088d 100644 Binary files a/Faceball2030/assets/enemies/IShoot.png and b/Faceball2030/assets/enemies/IShoot.png differ diff --git a/Faceball2030/main.cpp b/Faceball2030/main.cpp index 3b7b033..6bd2249 100644 --- a/Faceball2030/main.cpp +++ b/Faceball2030/main.cpp @@ -1694,6 +1694,9 @@ bool FaceBall::OnUserCreate() mapWalls.texture = wall_tex; mapFloor.texture = floor_tex; + mapSpr=new Sprite(128,128); + mapDecal=new Decal(mapSpr); + InitializeEnemyData(); InitializePowerupColors(); @@ -1982,6 +1985,16 @@ void FaceBall::RenderHud(float fElapsedTime) { if (camoDuration > 0) { DrawPartialDecal({ hudOffset + float(ScreenWidth() / 10 - 16), float(ScreenHeight() / 4 + ScreenHeight() / 4 * 2 - 16 * 4) }, vf2d{ 32,32 }*4, powerups_tex, { 5 * 32,0 }, { 32,32 },camoDuration>7?WHITE:camoDuration>2?std::abs(std::sin(10*camoDuration))>0.65?WHITE:BLACK: std::abs(std::sin(30 * camoDuration)) > 0.75 ? WHITE : BLACK); } + vf2d mapCenter = {float(ScreenWidth()-364),float(164)}; + mapSpr= new Sprite{128,128}; + vf2d mapSprSize = {float(mapSpr->width),float(mapSpr->height)}; + SetDrawTarget(mapSpr); + Clear(BLACK); + vf2d center = mapSprSize/2; + FillCircle(center,5,GREEN); + SetDrawTarget(nullptr); + mapDecal=new Decal(mapSpr); + DrawRotatedDecal(mapCenter-mapSprSize,mapDecal,-fYaw,mapSprSize/2); SetDecalMode(DecalMode::NORMAL); } 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) }); @@ -2106,7 +2119,8 @@ void FaceBall::RunEnemyAI(Enemy& e,float fElapsedTime,int myIndex) { }break; } }break; - case ISHOOT: { + case ISHOOT: + case ISHOOT_MAP: { e.rot += dat.rotSpd * fElapsedTime; if (e.CanShoot()) { e.ShootBullet(myIndex); @@ -2154,6 +2168,8 @@ void FaceBall::RunEnemyAI(Enemy& e,float fElapsedTime,int myIndex) { bool FaceBall::OnUserUpdate(float fElapsedTime) { + delete mapSpr; + delete mapDecal; fElapsedTime = std::min(0.01667f, fElapsedTime); gameTimer += fElapsedTime; switch (mode) { diff --git a/Faceball2030/main.h b/Faceball2030/main.h index 6df59fb..a9b09b7 100644 --- a/Faceball2030/main.h +++ b/Faceball2030/main.h @@ -263,6 +263,9 @@ class FaceBall : public PixelGameEngine enemy_Sonar, mapExit,enemy_ShootMe2,powerup,powerup2, enemy_IShoot; + Sprite*mapSpr; + Decal*mapDecal; + Decal* dot, * enemy_ShootMe_tex,*bullet_tex,*wall_tex,*floor_tex, *enemy_Sonar_tex,*hud,*exit_wall_tex,*enemy_ShootMe2_tex,*enemy_IShoot_tex, *life4,*life3,*life2,*life1,*crosshair,*hudmeter,*powerup_tex,*powerup2_tex, diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..07736e2 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,5 @@ +- Minimap +- Skybox +- Levels have distinguishing elements (skybox, walls, floor, fog color) +- Main Menu +- Sounds & Music \ No newline at end of file