aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.hpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-11 17:06:20 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-11 17:06:20 +0100
commit59d902df725c2d6a1b7cad016326ca51316b937f (patch)
treeeae43bbc5d3faf3799fe242f1648115e17a9df67 /src/gameplay.hpp
parentclang-format chromium test (diff)
downloadthreshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.gz
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.bz2
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.xz
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.zst
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.zip
clang format blind letsgo !
Diffstat (limited to 'src/gameplay.hpp')
-rw-r--r--src/gameplay.hpp49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/gameplay.hpp b/src/gameplay.hpp
index b379332..3a4f4cb 100644
--- a/src/gameplay.hpp
+++ b/src/gameplay.hpp
@@ -9,21 +9,20 @@
#ifndef GAMEPLAY_H_
#define GAMEPLAY_H_
+#include "entity.hpp"
#include "terrain.hpp"
#include "window.hpp"
-#include "entity.hpp"
#include <raylib.h>
-#include <vector>
#include <iostream>
+#include <vector>
// sound defines
-#define SHOTTY_BANG "../meta/media/mp3/shotty_shoot.mp3"
-#define SHOTTY_RELOAD "../meta/media/mp3/shotty_reload.mp3"
-
-#define AR_BANG "../meta/media/mp3/ar_shoot.mp3"
-#define AR_RELOAD "../meta/media/mp3/shotty_reload.mp3"
+#define SHOTTY_BANG "../meta/media/mp3/shotty_shoot.mp3"
+#define SHOTTY_RELOAD "../meta/media/mp3/shotty_reload.mp3"
+#define AR_BANG "../meta/media/mp3/ar_shoot.mp3"
+#define AR_RELOAD "../meta/media/mp3/shotty_reload.mp3"
// player textures
#define MUCHACHO_TEX "../meta/media/sprites/cowboy_idle.png"
@@ -34,26 +33,26 @@
// TODO: boss textures
-#define COOLPURPLE CLITERAL(Color){ 170, 153, 255, 255 } // cool Purple
+#define COOLPURPLE \
+ CLITERAL(Color) { 170, 153, 255, 255 } // cool Purple
class Game {
- int nEnemies; // number of enemies on given level
- int nWaves; // number of waves in level
- int nPerWave; // number of enemies per wave.
+ 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. therefore, no
// checks are made to verify their integrity.
// having wrong maps can (and probably will) result in a crash
- std::vector<Entity> * enemies;
-
- std::vector<Terrain*> * terrain;
+ std::vector<Entity>* enemies;
- Entity * player;
+ std::vector<Terrain*>* terrain;
- std::string next; // next level
- std::string current; // next level
+ Entity* player;
+ std::string next; // next level
+ std::string current; // next level
int frameWidth;
int frameHeight;
@@ -62,21 +61,21 @@ class Game {
Vector2 origin;
- public:
- Game(std::string const &path);
+ public:
+ Game(std::string const& path);
~Game();
Camera2D cam;
- void start() ;
- void draw() ;
+ void start();
+ void draw();
int tick() const;
int getKeys() const;
int shoot() const;
- int hit(Entity en, Vector2 add1, Vector2 add2) const ;
+ int hit(Entity en, Vector2 add1, Vector2 add2) const;
- std::string const &getNext() const; // returns next level's string
- std::string const &getCurrent() const; // returns next level's string
+ std::string const& getNext() const; // returns next level's string
+ std::string const& getCurrent() const; // returns next level's string
};
-#endif // GAMEPLAY_H_
+#endif // GAMEPLAY_H_