[Orxonox-commit 5555] r10218 - in code/trunk/src/modules: jump objects/controllers
landauf at orxonox.net
landauf at orxonox.net
Sat Jan 31 23:29:45 CET 2015
Author: landauf
Date: 2015-01-31 23:29:45 +0100 (Sat, 31 Jan 2015)
New Revision: 10218
Modified:
code/trunk/src/modules/jump/Jump.cc
code/trunk/src/modules/jump/JumpFigure.cc
code/trunk/src/modules/jump/JumpPrereqs.h
code/trunk/src/modules/objects/controllers/TeamTargetProxy.h
code/trunk/src/modules/objects/controllers/TurretController.cc
code/trunk/src/modules/objects/controllers/TurretController.h
Log:
fixed build and warnings with MSVC
Modified: code/trunk/src/modules/jump/Jump.cc
===================================================================
--- code/trunk/src/modules/jump/Jump.cc 2015-01-31 17:05:40 UTC (rev 10217)
+++ code/trunk/src/modules/jump/Jump.cc 2015-01-31 22:29:45 UTC (rev 10218)
@@ -594,7 +594,7 @@
float sectionLength = center_->getSectionLength();
newPlatform = new JumpPlatformStatic(center_->getContext());
- addPlatform(newPlatform, center_->getPlatformStaticTemplate(), 0.0, -0.05*sectionLength);
+ addPlatform(newPlatform, center_->getPlatformStaticTemplate(), 0.0, -0.05f*sectionLength);
platformWidth_ = newPlatform->getWidth();
platformHeight_ = newPlatform->getHeight();
@@ -602,9 +602,9 @@
for (float xPosition = platformWidth_; xPosition <= center_->getFieldDimension().x; xPosition += platformWidth_)
{
newPlatform = new JumpPlatformStatic(center_->getContext());
- addPlatform(newPlatform, center_->getPlatformStaticTemplate(), xPosition, -0.05*sectionLength);
+ addPlatform(newPlatform, center_->getPlatformStaticTemplate(), xPosition, -0.05f*sectionLength);
newPlatform = new JumpPlatformStatic(center_->getContext());
- addPlatform(newPlatform, center_->getPlatformStaticTemplate(), -xPosition, -0.05*sectionLength);
+ addPlatform(newPlatform, center_->getPlatformStaticTemplate(), -xPosition, -0.05f*sectionLength);
}
}
@@ -615,8 +615,8 @@
float sectionBegin = sectionNumber_ * sectionLength;
float sectionEnd = (1 + sectionNumber_) * sectionLength;
- int numI = 6;
- int numJ = 4;
+ const int numI = 6;
+ const int numJ = 4;
enum PlatformType
{
@@ -1262,7 +1262,7 @@
float Jump::randomSpeed()
{
float platformSpeed = center_->getPlatformSpeed();
- return randomPosition(0.5*platformSpeed, 1.5*platformSpeed);
+ return randomPosition(0.5f*platformSpeed, 1.5f*platformSpeed);
}
int Jump::getScore(PlayerInfo* player) const
Modified: code/trunk/src/modules/jump/JumpFigure.cc
===================================================================
--- code/trunk/src/modules/jump/JumpFigure.cc 2015-01-31 17:05:40 UTC (rev 10217)
+++ code/trunk/src/modules/jump/JumpFigure.cc 2015-01-31 22:29:45 UTC (rev 10218)
@@ -183,13 +183,13 @@
// Move through the left and right screen boundaries
Vector3 position = getPosition();
- if (position.x < -fieldWidth_*1.1)
+ if (position.x < -fieldWidth_*1.1f)
{
- position.x = fieldWidth_*1.1;
+ position.x = fieldWidth_*1.1f;
}
- else if (position.x > fieldWidth_*1.1)
+ else if (position.x > fieldWidth_*1.1f)
{
- position.x = -fieldWidth_*1.1;
+ position.x = -fieldWidth_*1.1f;
}
setPosition(position);
@@ -206,7 +206,7 @@
if (dead_ == false)
{
Vector3 velocity = getVelocity();
- velocity.z = (bootsActive_ ? 1.2*jumpSpeed_ : jumpSpeed_);
+ velocity.z = (bootsActive_ ? 1.2f*jumpSpeed_ : jumpSpeed_);
setVelocity(velocity);
animateHands_ = true;
@@ -220,7 +220,7 @@
if (dead_ == false)
{
Vector3 velocity = getVelocity();
- velocity.z = 1.2*jumpSpeed_;
+ velocity.z = 1.2f*jumpSpeed_;
setVelocity(velocity);
}
}
Modified: code/trunk/src/modules/jump/JumpPrereqs.h
===================================================================
--- code/trunk/src/modules/jump/JumpPrereqs.h 2015-01-31 17:05:40 UTC (rev 10217)
+++ code/trunk/src/modules/jump/JumpPrereqs.h 2015-01-31 22:29:45 UTC (rev 10218)
@@ -42,8 +42,8 @@
// Shared library settings
//-----------------------------------------------------------------------
-#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(PONG_STATIC_BUILD)
-# ifdef PONG_SHARED_BUILD
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(JUMP_STATIC_BUILD)
+# ifdef JUMP_SHARED_BUILD
# define _JumpExport __declspec(dllexport)
# else
# if defined( __MINGW32__ )
Modified: code/trunk/src/modules/objects/controllers/TeamTargetProxy.h
===================================================================
--- code/trunk/src/modules/objects/controllers/TeamTargetProxy.h 2015-01-31 17:05:40 UTC (rev 10217)
+++ code/trunk/src/modules/objects/controllers/TeamTargetProxy.h 2015-01-31 22:29:45 UTC (rev 10218)
@@ -29,7 +29,7 @@
#ifndef _TeamTargetProxy_H__
#define _TeamTargetProxy_H__
-#include "OrxonoxPrereqs.h"
+#include "objects/ObjectsPrereqs.h"
#include "controllers/FormationController.h"
namespace orxonox
@@ -44,7 +44,7 @@
because the turret isn't directly attached to the spaceship. Here's where this controller comes in. Drawback: the base
has to be controllable and ticks every second (performance?)
*/
- class _OrxonoxExport TeamTargetProxy : public FormationController, public Tickable
+ class _ObjectsExport TeamTargetProxy : public FormationController, public Tickable
{
public:
TeamTargetProxy(Context* context);
Modified: code/trunk/src/modules/objects/controllers/TurretController.cc
===================================================================
--- code/trunk/src/modules/objects/controllers/TurretController.cc 2015-01-31 17:05:40 UTC (rev 10217)
+++ code/trunk/src/modules/objects/controllers/TurretController.cc 2015-01-31 22:29:45 UTC (rev 10218)
@@ -28,7 +28,7 @@
#include "TurretController.h"
#include "worldentities/pawns/Pawn.h"
-#include "Turret.h"
+#include "objects/Turret.h"
namespace orxonox
{
Modified: code/trunk/src/modules/objects/controllers/TurretController.h
===================================================================
--- code/trunk/src/modules/objects/controllers/TurretController.h 2015-01-31 17:05:40 UTC (rev 10217)
+++ code/trunk/src/modules/objects/controllers/TurretController.h 2015-01-31 22:29:45 UTC (rev 10218)
@@ -33,7 +33,7 @@
#ifndef _TurretController_H__
#define _TurretController_H__
-#include "OrxonoxPrereqs.h"
+#include "objects/ObjectsPrereqs.h"
#include "controllers/ArtificialController.h"
namespace orxonox
@@ -44,7 +44,7 @@
The controllableEntity gets casted to Turret, so this controller won't work for anything else.
*/
- class _OrxonoxExport TurretController : public ArtificialController, public Tickable
+ class _ObjectsExport TurretController : public ArtificialController, public Tickable
{
public:
TurretController(Context* context);
More information about the Orxonox-commit
mailing list