aboutsummaryrefslogtreecommitdiff
path: root/sons_of_sol/Projectile.hpp
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2025-12-23 12:59:23 -0700
committerJosh Rahm <rahm@google.com>2025-12-23 12:59:23 -0700
commit46efbf05fcade8199035f956e20a63ca91fc88fd (patch)
tree9e3f3e297ea66e442e1a11b5ad16ad8ed6fc7fb7 /sons_of_sol/Projectile.hpp
parent306bb687414f54177eb37ab7cd744e491c397c31 (diff)
downloadSonsOfSol-46efbf05fcade8199035f956e20a63ca91fc88fd.tar.gz
SonsOfSol-46efbf05fcade8199035f956e20a63ca91fc88fd.tar.bz2
SonsOfSol-46efbf05fcade8199035f956e20a63ca91fc88fd.zip
Run clang-format and add .clang-format
Diffstat (limited to 'sons_of_sol/Projectile.hpp')
-rw-r--r--sons_of_sol/Projectile.hpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/sons_of_sol/Projectile.hpp b/sons_of_sol/Projectile.hpp
index 0949314..5f298a7 100644
--- a/sons_of_sol/Projectile.hpp
+++ b/sons_of_sol/Projectile.hpp
@@ -7,39 +7,40 @@
* Projectile.hpp: <description>
*/
+#include "glox/GloxCommon.hpp"
#include "glox/GloxPoint.hpp"
-#include "glox/objects/GloxCube.hpp"
#include "glox/GloxState.hpp"
-#include "glox/GloxCommon.hpp"
+#include "glox/objects/GloxCube.hpp"
#include <iostream>
#define TTL 50
class Projectile {
-public:
- Projectile( const glox::GloxPoint<>& position, const glox::GloxPoint<>& vector ) ;
-
- inline void update() {
- if( m_ttl == 0 || -- m_ttl == 0 ) {
- return ;
- }
- m_position += m_dpos;
+ public:
+ Projectile(const glox::GloxPoint<>& position,
+ const glox::GloxPoint<>& vector);
+
+ inline void update() {
+ if (m_ttl == 0 || --m_ttl == 0) {
+ return;
}
+ m_position += m_dpos;
+ }
- inline bool isDead() { return m_ttl == 0; }
+ inline bool isDead() { return m_ttl == 0; }
- void draw() ;
+ void draw();
- static void loadModel() ;
-private:
- uint8_t m_ttl ;
- float m_roty;
- float m_rotz;
- glox::GloxPoint<> m_position;
- glox::GloxPoint<> m_dpos;
- static glox::GloxCube* m_model ;
+ static void loadModel();
+ private:
+ uint8_t m_ttl;
+ float m_roty;
+ float m_rotz;
+ glox::GloxPoint<> m_position;
+ glox::GloxPoint<> m_dpos;
+ static glox::GloxCube* m_model;
};
#endif /* PROJECTILE_HPP_ */