Merged invalid branch.

This commit is contained in:
Felix Ableitner 2012-09-12 14:21:57 +02:00
commit a793cc8933
10 changed files with 56 additions and 55 deletions

View file

@ -13,7 +13,6 @@
#include "util/Loader.h" #include "util/Loader.h"
#include "util/ResourceManager.h" #include "util/ResourceManager.h"
#include "util/String.h" #include "util/String.h"
#include "util/Log.h"
/// Goal amount of frames per second. /// Goal amount of frames per second.
const int Game::FPS_GOAL = 60; const int Game::FPS_GOAL = 60;
@ -46,7 +45,6 @@ Game::Game(const Vector2i& resolution) :
} }
mCollection.insert(std::shared_ptr<Sprite>(new Enemy(mWorld, Vector2f(400.0f, 200.0f))), mCollection.insert(std::shared_ptr<Sprite>(new Enemy(mWorld, Vector2f(400.0f, 200.0f))),
Collection::LEVEL_ACTOR); Collection::LEVEL_ACTOR);
} }
/** /**

View file

@ -22,9 +22,6 @@ Physical::Physical(const PhysicalData& data) :
assert(data.category); assert(data.category);
b2BodyDef bodyDef; b2BodyDef bodyDef;
// not moving -> static body
// moving -> dynamic body
// bullet -> kinematic body
bodyDef.type = (data.moving) bodyDef.type = (data.moving)
? b2_dynamicBody ? b2_dynamicBody
: b2_staticBody; : b2_staticBody;
@ -90,7 +87,11 @@ Physical::getSpeed() const {
} }
/** /**
<<<<<<< HEAD
* Returns the rotation of the body as an SFML angle. * Returns the rotation of the body as an SFML angle.
=======
* Returns the rotation of the body (converted to an SFML angle).
>>>>>>> origin/master
*/ */
float float
Physical::getAngle() const { Physical::getAngle() const {

View file

@ -8,9 +8,9 @@
#include "Bullet.h" #include "Bullet.h"
#include "../abstract/Actor.h" #include "../abstract/Actor.h"
#include "../util/Log.h"
const Vector2i Bullet::SIZE = Vector2i(20, 20); const Vector2i Bullet::SIZE = Vector2i(20, 20);
const float Bullet::SPEED = 500.0f; const float Bullet::SPEED = 500.0f;
/** /**

View file

@ -25,6 +25,7 @@ public:
// Public variables. // Public variables.
public: public:
static const Vector2i SIZE; static const Vector2i SIZE;
// Private variables. // Private variables.
private: private:
static const float SPEED; //< If speed is too low, bullets push each other away on insert. static const float SPEED; //< If speed is too low, bullets push each other away on insert.

View file

@ -39,6 +39,7 @@ protected:
private: private:
static const float SPEED; static const float SPEED;
static const Vector2i SIZE; static const Vector2i SIZE;
Weapon mWeapon; //< Weapon object used for Player::fire(). Weapon mWeapon; //< Weapon object used for Player::fire().
Vector2f mDestination; //< Absolute position of the movement destination. Vector2f mDestination; //< Absolute position of the movement destination.
Vector2f mCrosshairPosition; //< Relative position of the point to fire at (mouse cursor). Vector2f mCrosshairPosition; //< Relative position of the point to fire at (mouse cursor).