diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-13 23:07:28 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-13 23:07:28 +0100 |
commit | 1d378dbddb1ba06ef9954326eec01f0cb3c33a26 (patch) | |
tree | 7e3e5590a9e3e5dc73610e1f9d34006ba5a5e950 | |
parent | this is starting to get boring.ill see (diff) | |
download | threshold-1d378dbddb1ba06ef9954326eec01f0cb3c33a26.tar.gz threshold-1d378dbddb1ba06ef9954326eec01f0cb3c33a26.tar.bz2 threshold-1d378dbddb1ba06ef9954326eec01f0cb3c33a26.tar.xz threshold-1d378dbddb1ba06ef9954326eec01f0cb3c33a26.tar.zst threshold-1d378dbddb1ba06ef9954326eec01f0cb3c33a26.zip |
what the fuck is going on
-rw-r--r-- | meta/maps/stage_1_start.bfm | 4 | ||||
-rw-r--r-- | meta/media/sprites/background.png | bin | 0 -> 109065 bytes | |||
-rw-r--r-- | src/entity.cpp | 16 | ||||
-rw-r--r-- | src/gameplay.cpp | 4 | ||||
-rw-r--r-- | src/gameplay.hpp | 5 |
5 files changed, 19 insertions, 10 deletions
diff --git a/meta/maps/stage_1_start.bfm b/meta/maps/stage_1_start.bfm index 601bc8f..74e68d9 100644 --- a/meta/maps/stage_1_start.bfm +++ b/meta/maps/stage_1_start.bfm @@ -1,4 +1,4 @@ BOSS 0 0 -ENEMIES 20 20 -WAVES 2 10 +ENEMIES 40 20 +WAVES 2 20 NEXT stage_1_1.bfm diff --git a/meta/media/sprites/background.png b/meta/media/sprites/background.png Binary files differnew file mode 100644 index 0000000..d3434f5 --- /dev/null +++ b/meta/media/sprites/background.png diff --git a/src/entity.cpp b/src/entity.cpp index 8427479..9892b0b 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -16,25 +16,25 @@ Entity::Entity(int const& h) : hp(h) { switch (dir) { case (0): { posX = - GetRandomValue((SCREENWIDTH / 2) - 30, (SCREENWIDTH / 2) + 30); + GetRandomValue((SCREENWIDTH / 2) - 300, (SCREENWIDTH / 2) + 300); posY = GetRandomValue(0, 40); break; } case (1): { - posX = GetRandomValue(SCREENWIDTH - 20, SCREENWIDTH + 20); - posY = GetRandomValue((SCREENHEIGHT / 2) - 30, - (SCREENHEIGHT / 2) + 30); + posX = GetRandomValue(SCREENWIDTH - 200, SCREENWIDTH + 200); + posY = GetRandomValue((SCREENHEIGHT / 2) - 300, + (SCREENHEIGHT / 2) + 300); break; } case (2): { posX = - GetRandomValue((SCREENWIDTH / 2) - 30, (SCREENWIDTH / 2) + 30); - posY = GetRandomValue(SCREENHEIGHT - 20, SCREENHEIGHT + 20); + GetRandomValue((SCREENWIDTH / 2) - 300, (SCREENWIDTH / 2) + 300); + posY = GetRandomValue(SCREENHEIGHT - 200, SCREENHEIGHT + 200); break; } case (3): { - posX = GetRandomValue(SCREENWIDTH - 20, SCREENWIDTH + 20); - posY = GetRandomValue((SCREENHEIGHT / 2), (SCREENHEIGHT / 2) + 10); + posX = GetRandomValue(SCREENWIDTH - 200, SCREENWIDTH + 200); + posY = GetRandomValue((SCREENHEIGHT / 2), (SCREENHEIGHT / 2) + 100); break; } } diff --git a/src/gameplay.cpp b/src/gameplay.cpp index b4c6477..49b86cc 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -215,6 +215,10 @@ int Game::tick() { en->posY += 2.1f; en->direction.y += 0.1f; } + // if ((GetRandomValue(0, 100) == 50) && (en->currentWeapon != nullptr)) { + // std::cout << "spawn enemy" << std::endl; + // en->currentWeapon->bang(enemies, &(*en)); + // } } else { if (en->posX >= SCREENWIDTH || en->posX <= 0 || en->posY >= SCREENHEIGHT) { diff --git a/src/gameplay.hpp b/src/gameplay.hpp index 6fadb79..a403661 100644 --- a/src/gameplay.hpp +++ b/src/gameplay.hpp @@ -34,10 +34,14 @@ #define SBIRE_TEX_IDLE "../meta/media/sprites/sbire_idle.png" #define SBIRE_TEX_HURT "../meta/media/sprites/sbire_hurt.png" +#define BACKGROUND_TEX "../meta/media/sprites/background.png" + // TODO: boss textures #define COOLPURPLE \ CLITERAL(Color) { 170, 153, 255, 255 } // cool Purple +// #define COOLPURPLE \ +// CLITERAL(Color) { 153, 0, 0, 255 } // cool Purple class Game { int nEnemies; // number of enemies on given level @@ -65,6 +69,7 @@ class Game { Vector2 origin; Texture2D crosshair; + // Texture2D background; public: Game(std::string const& path); |