aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.hpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-11 16:19:57 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-11 16:19:57 +0100
commit00aaef95323c01f6575e497921595b68da52fd2f (patch)
treec568a4a6c2f140ce1e93ba6c433d0a6eb6467b67 /src/gameplay.hpp
parentcool man. death is fucked yo (diff)
downloadthreshold-00aaef95323c01f6575e497921595b68da52fd2f.tar.gz
threshold-00aaef95323c01f6575e497921595b68da52fd2f.tar.bz2
threshold-00aaef95323c01f6575e497921595b68da52fd2f.tar.xz
threshold-00aaef95323c01f6575e497921595b68da52fd2f.tar.zst
threshold-00aaef95323c01f6575e497921595b68da52fd2f.zip
mouselook just needed some sleep ! cool
Diffstat (limited to 'src/gameplay.hpp')
-rw-r--r--src/gameplay.hpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gameplay.hpp b/src/gameplay.hpp
index 7098e1a..17a17f4 100644
--- a/src/gameplay.hpp
+++ b/src/gameplay.hpp
@@ -13,6 +13,7 @@
#include "window.hpp"
#include "entity.hpp"
+#include <raylib.h>
#include <vector>
#include <iostream>
@@ -34,9 +35,15 @@
// TODO: boss textures
#define COOLPURPLE CLITERAL(Color){ 170, 153, 255, 255 } // cool Purple
-//rgb(170,153,255)
+
class Game {
int nEnemies; // number of enemies on given level
+ int nWaves; // number of waves in level
+ int nPerWave; // number of enemies per wave.
+
+ // NOTE : maps are assumed to be correct. tyhus, no
+ // checks are made to verify their integrity.
+ // having wrong maps can (and probably will) result in a crash
std::vector<Entity> * enemies;
@@ -47,7 +54,6 @@ class Game {
std::string next; // next level
std::string current; // next level
- Camera2D * camera;
int frameWidth;
int frameHeight;
@@ -60,13 +66,17 @@ class Game {
Game(std::string const &path);
~Game();
+ Camera2D cam;
+
void start() ;
- void draw() const;
+ void draw() ;
int tick() const;
int getKeys() const;
int shoot() const;
int hit(Entity en, Vector2 add1, Vector2 add2) const ;
+ int getDiff(Vector2 pos, Vector2 tip, Vector2 target) const ;
+
std::string const &getNext() const; // returns next level's string
std::string const &getCurrent() const; // returns next level's string
};