Revision: 66
http://balder.svn.sourceforge.net/balder/?rev=66&view=rev
Author: holomorph
Date: 2007-09-30 22:52:16 -0700 (Sun, 30 Sep 2007)
Log Message:
-----------
removed all the ../../ garbage from my includes and just pass the compiler a -Iinclude flag so it knows to look in the "include" directory for the headers
Modified Paths:
--------------
include/artificialcontroller.h
include/computerprobecontrol.h
include/configmanager.h
include/entity.h
include/gamemanager.h
include/input.h
include/menu/menu.h
include/player.h
include/powerup.h
include/powerupfactory.h
include/probe.h
include/probefactory.h
include/projectile.h
include/projectilefactory.h
include/renderer.h
include/soundmanager.h
src/artificialcontroller.cpp
src/collisionmask.cpp
src/computerprobecontrol.cpp
src/configmanager.cpp
src/entity.cpp
src/gamemanager.cpp
src/imageloader.cpp
src/input.cpp
src/log.cpp
src/main.cpp
src/mapparser.cpp
src/menu/ailistmodel.cpp
src/menu/animationwidget.cpp
src/menu/gamesetup.cpp
src/menu/mainmenu.cpp
src/menu/maplistmodel.cpp
src/menu/menu.cpp
src/menu/numberfield.cpp
src/menu/options.cpp
src/menu/playersetup.cpp
src/menu/samplemapwidget.cpp
src/menu/sampleprobewidget.cpp
src/menu/soundvideo.cpp
src/menu/submenu.cpp
src/player.cpp
src/powerup.cpp
src/powerupfactory.cpp
src/probe.cpp
src/probefactory.cpp
src/projectile.cpp
src/projectilefactory.cpp
src/renderer.cpp
src/soundmanager.cpp
Modified: include/artificialcontroller.h
===================================================================
--- include/artificialcontroller.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/artificialcontroller.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -17,11 +17,11 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-
+
#ifndef BALDERARTIFICIALCONTROLLER_H
#define BALDERARTIFICIALCONTROLLER_H
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
#include <list>
#include <string>
@@ -50,7 +50,7 @@
#endif
private:
- ArtificialController(); // so we can't instantiate one of these
+ ArtificialController(); // so we can't instantiate one of these
static GameManager* game_manager;
static CollisionMask* geometry;
static std::list<ComputerProbeControl*> controlled_probes;
Modified: include/computerprobecontrol.h
===================================================================
--- include/computerprobecontrol.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/computerprobecontrol.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -17,26 +17,26 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-
+
#ifndef BALDERARCOMPUTERPROBECONTROL_H
#define BALDERARCOMPUTERPROBECONTROLLER_H
#include <Python.h>
#include <list>
#include <string>
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
namespace Balder {
struct ComputerProbeControl {
player_id id;
input_states inputs;
- PyObject *pModule; // the name of the python module containing the ai
+ PyObject *pModule; // the name of the python module containing the ai
PyObject* pFunc; // the python ai function to use
ComputerProbeControl(player_id pid, std::string module);
~ComputerProbeControl();
static PyObject* LoadPythonModule(std::string module);
- static PyObject* FindAIFunction(PyObject *pModule);
+ static PyObject* FindAIFunction(PyObject *pModule);
};
}
#endif
Modified: include/configmanager.h
===================================================================
--- include/configmanager.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/configmanager.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,7 +21,7 @@
#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
#include <string>
class TiXmlDocument;
Modified: include/entity.h
===================================================================
--- include/entity.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/entity.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -22,8 +22,8 @@
#define ENTITY_H
#include <SDL/SDL.h>
-#include "../include/balder2dtypes.h"
-#include "../include/renderer.h"
+#include "balder2dtypes.h"
+#include "renderer.h"
namespace Balder{
@@ -34,7 +34,7 @@
private:
static const int MAXVELOCITY;
public:
- Entity ( GameManager* , double x_position, double y_position,
+ Entity ( GameManager* , double x_position, double y_position,
double x_velocity, double y_velocity, int width, int height );
const int GetX() const {return static_cast<int>(x_position);}
const int GetY() const {return static_cast<int>(y_position);}
Modified: include/gamemanager.h
===================================================================
--- include/gamemanager.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/gamemanager.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -25,8 +25,8 @@
#define STATWIDTH 100 // width in pixels for the status display
#define STATHEIGHT 100
-#include "../include/balder2dtypes.h"
-#include "../include/configmanager.h"
+#include "balder2dtypes.h"
+#include "configmanager.h"
#include <SDL/SDL.h>
#include <list>
#include <map>
@@ -56,7 +56,7 @@
double y_vel;
bool stuck;
SpawnLocation* next;
-};
+};
class GameManager {
private:
@@ -90,7 +90,7 @@
Uint32 FrameTimeLeft();
void DumpEntityState(); // this one in a debugging aid
std::string map_music;
-
+
public:
GameManager(Renderer *, SoundManager *);
~GameManager();
Modified: include/input.h
===================================================================
--- include/input.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/input.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,7 +21,7 @@
#ifndef INPUT_H
#define INPUT_H
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
namespace Balder{
Modified: include/menu/menu.h
===================================================================
--- include/menu/menu.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/menu/menu.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -23,7 +23,7 @@
#include <guichan.hpp>
#include <guichan/sdl.hpp>
-#include "../../include/menu/animationwidget.h"
+#include "menu/animationwidget.h"
#include "numberfield.h"
namespace Balder
Modified: include/player.h
===================================================================
--- include/player.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/player.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,7 +21,7 @@
#ifndef PLAYER_H
#define PLAYER_H
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
#include <sstream>
struct SDL_Surface;
@@ -50,7 +50,7 @@
void DoControl ( input_states inputs);
void SetProbe ( Probe* p );
void AddScore(int toAdd){score += toAdd;}
- int getScore() {return score;}
+ int getScore() {return score;}
const Probe* GetProbe(){return probe;}
const void DrawStats(SDL_Surface*);
@@ -58,13 +58,13 @@
{
score = theValue;
}
-
+
int GetScore() const
{
return score;
}
-
+
};
}
#endif
Modified: include/powerup.h
===================================================================
--- include/powerup.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/powerup.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -1,7 +1,7 @@
//
// C++ Interface: powerup
//
-// Description:
+// Description:
//
//
// Author: Bjorn Hansen <Holomorph@...>, (C) 2005
@@ -12,7 +12,7 @@
#ifndef BALDERPOWERUP_H
#define BALDERPOWERUP_H
-#include "../include/entity.h"
+#include "entity.h"
namespace Balder {
const int POWERUP_WIDTH = 16;
@@ -31,7 +31,7 @@
class PowerUp : public Entity
{
public:
- PowerUp(GameManager* , double x_position, double y_position,
+ PowerUp(GameManager* , double x_position, double y_position,
double x_velocity, double y_velocity, int effect=1);
~PowerUp();
const std::string GetType() const { return "powerup";}
Modified: include/powerupfactory.h
===================================================================
--- include/powerupfactory.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/powerupfactory.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,7 +21,7 @@
#ifndef POWERUPFACTORY_H
#define POWERUPFACTORY_H
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
namespace Balder{
@@ -31,7 +31,7 @@
class CollisionMask;
/**
- * A factory class for PowerUps which takes care of loading the PowerUp
+ * A factory class for PowerUps which takes care of loading the PowerUp
* sprite and registering it with the Renderer.
*/
class PowerUpFactory{
Modified: include/probe.h
===================================================================
--- include/probe.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/probe.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -24,8 +24,8 @@
#define RECHARGE_FRAME_INTERVAL_ON 50
#define RECHARGE_FRAME_INTERVAL_OFF 3000
-#include "../include/entity.h"
-#include "../include/balder2dtypes.h"
+#include "entity.h"
+#include "balder2dtypes.h"
#include <math.h>
namespace Balder{
Modified: include/probefactory.h
===================================================================
--- include/probefactory.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/probefactory.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,7 +21,7 @@
#ifndef PROBEFACTORY_H
#define PROBEFACTORY_H
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
namespace Balder{
@@ -31,7 +31,7 @@
class SoundManager;
/**
- * A factory class for Probes which takes care of loading the probe
+ * A factory class for Probes which takes care of loading the probe
* sprite and registering it with the Renderer.
*/
class ProbeFactory{
@@ -41,7 +41,7 @@
// class destructor
~ProbeFactory();
/// create a probe
- Probe* CreateProbe(GameManager* , double x_position, double y_position,
+ Probe* CreateProbe(GameManager* , double x_position, double y_position,
double x_velocity, double y_velocity, bool stuck, probe_color, player_id pid);
private:
SDL_Surface* sprite;
Modified: include/projectile.h
===================================================================
--- include/projectile.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/projectile.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,11 +21,11 @@
#ifndef PROJECTILE_H
#define PROJECTILE_H
-#include "../include/entity.h"
+#include "entity.h"
namespace Balder{
-
-class Projectile: public Entity {
+
+class Projectile: public Entity {
private:
static const int PROJECTILEWIDTH;
static const int PROJECTILEHEIGHT;
@@ -37,7 +37,7 @@
static const double SPEED;
static const bool Add_Probe_Velocity;
public:
- Projectile (GameManager* , double x_position, double y_position,
+ Projectile (GameManager* , double x_position, double y_position,
double x_velocity, double y_velocity, player_id);
const std::string GetType() const { return "projectile";}
void Move ( );
Modified: include/projectilefactory.h
===================================================================
--- include/projectilefactory.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/projectilefactory.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,7 +21,7 @@
#ifndef PROJECTILEFACTORY_H
#define PROJECTILEFACTORY_H
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
namespace Balder{
@@ -30,7 +30,7 @@
class GameManager;
/**
- * A factory class for Projectiles which takes care of loading the Projectile
+ * A factory class for Projectiles which takes care of loading the Projectile
* sprite and registering it with the Renderer.
*/
class ProjectileFactory{
@@ -40,7 +40,7 @@
// class destructor
~ProjectileFactory();
/// create a Projectile
- Projectile* CreateProjectile(GameManager* , double x_position, double y_position,
+ Projectile* CreateProjectile(GameManager* , double x_position, double y_position,
double x_velocity, double y_velocity, player_id);
private:
SDL_Surface* sprite;
Modified: include/renderer.h
===================================================================
--- include/renderer.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/renderer.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -23,7 +23,7 @@
#include <map>
#include <string>
-#include "../include/balder2dtypes.h"
+#include "balder2dtypes.h"
struct SDL_Surface;
class Font;
@@ -33,7 +33,7 @@
class Entity;
-class Renderer {
+class Renderer {
public:
static std::map<std::string,SDL_Surface*> sprite_registry;
Renderer();
@@ -42,7 +42,7 @@
void SetScreen(int width, int height, bool fullscreen=false);
/// load the bacground for the map with the specified name.
bool LoadBackground(const char* mapname);
- /// convenience function to blit an sdl surface to the screen
+ /// convenience function to blit an sdl surface to the screen
void BlitSurface(int x, int y, int width, int height, SDL_Surface* s);
/// display text on the screen
void DisplayText(int x, int y, std::string text);
Modified: include/soundmanager.h
===================================================================
--- include/soundmanager.h 2007-10-01 05:48:19 UTC (rev 65)
+++ include/soundmanager.h 2007-10-01 05:52:16 UTC (rev 66)
@@ -4,7 +4,7 @@
#include <map>
#include <string>
#include <SDL/SDL_mixer.h>
-#include "../include/configmanager.h"
+#include "configmanager.h"
namespace Balder{
Modified: src/artificialcontroller.cpp
===================================================================
--- src/artificialcontroller.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/artificialcontroller.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,14 +21,14 @@
#include <Python.h>
#include <stdlib.h>
#include <sstream>
-#include "../include/artificialcontroller.h"
-#include "../include/computerprobecontrol.h"
-#include "../include/gamemanager.h"
-#include "../include/collisionmask.h"
-#include "../include/input.h"
-#include "../include/entity.h"
-#include "../include/probe.h"
-#include "../include/log.h"
+#include "artificialcontroller.h"
+#include "computerprobecontrol.h"
+#include "gamemanager.h"
+#include "collisionmask.h"
+#include "input.h"
+#include "entity.h"
+#include "probe.h"
+#include "log.h"
using namespace Balder;
@@ -39,9 +39,9 @@
std::list<ComputerProbeControl*> ArtificialController::controlled_probes;
static PyMethodDef BalderAIMethods[] = {
- {"IsWall", Balder::ArtificialController::py_IsWall,
+ {"IsWall", Balder::ArtificialController::py_IsWall,
METH_VARARGS, "determine if a given point is part of a wall."},
- {"IsLineOfSight", Balder::ArtificialController::py_IsLineOfSight,
+ {"IsLineOfSight", Balder::ArtificialController::py_IsLineOfSight,
METH_VARARGS, "determine if any wall is blocking a \"line of sight\" between the given points."},
{NULL, NULL, 0, NULL} /* Sentinel */
};
@@ -79,7 +79,7 @@
void ArtificialController::ControlProbe(player_id id, std::string script)
{
ComputerProbeControl *p = new ComputerProbeControl(id, script);
- // if the function was not found, don't try to control this probe
+ // if the function was not found, don't try to control this probe
if (p->pFunc && PyCallable_Check(p->pFunc)) {
controlled_probes.push_back(p);
}
@@ -126,7 +126,7 @@
PyDict_SetItemString(pEntityData, "charge", PyInt_FromLong(p->GetCharge()));
PyDict_SetItemString(pEntityData, "life", PyInt_FromLong(p->GetLife()));
PyDict_SetItemString(pEntityData, "deaths", PyInt_FromLong(p->GetDeaths()));
- PyDict_SetItemString(pEntityData, "deaths", PyInt_FromLong(p->GetDeaths()));
+ PyDict_SetItemString(pEntityData, "deaths", PyInt_FromLong(p->GetDeaths()));
PyDict_SetItemString(pEntityData, "stuck", PyBool_FromLong(p->GetStuckStatus()));
PyDict_SetItemString(pEntityData, "rotation_angle", PyFloat_FromDouble(p->GetRotationAngle()));
// add to probe dictionary with the id as the key
@@ -161,7 +161,7 @@
Log::output(ss.str());
PyObject *excptn = PyErr_Occurred();
if (excptn) { PyErr_Print(); }
- // lets remove this probe from the list to control
+ // lets remove this probe from the list to control
// so this doesn't happen every frame
controlled_probes.erase(pit);
delete (*pit);
@@ -174,7 +174,7 @@
game_manager->SendInputState((*pit)->id,(*pit)->inputs);
}
++pit;
- }
+ }
}
PyObject* ArtificialController::py_IsWall(PyObject *self, PyObject *args)
@@ -204,11 +204,11 @@
int x, y, xdelta, ydelta;
xdelta = x2-x1;
ydelta = y2-y1;
- /* we want to proceed on the direction that will test the most
- points along the line, if we just tested along x the loop would
- have good resolution in the x direction,
- but could be very poor in the y direction, if the x values are
- very close but y values that are not close for example testing
+ /* we want to proceed on the direction that will test the most
+ points along the line, if we just tested along x the loop would
+ have good resolution in the x direction,
+ but could be very poor in the y direction, if the x values are
+ very close but y values that are not close for example testing
along the line from (5,1) to (6,20) would only test two points!
*/
if (xdelta*xdelta > ydelta*ydelta){
Modified: src/collisionmask.cpp
===================================================================
--- src/collisionmask.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/collisionmask.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -20,8 +20,8 @@
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
-#include "../include/collisionmask.h"
-#include "../include/imageloader.h"
+#include "collisionmask.h"
+#include "imageloader.h"
#include <string>
using namespace Balder;
Modified: src/computerprobecontrol.cpp
===================================================================
--- src/computerprobecontrol.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/computerprobecontrol.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,12 +18,12 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/computerprobecontrol.h"
-#include "../include/log.h"
+#include "computerprobecontrol.h"
+#include "log.h"
using namespace Balder;
-Balder::ComputerProbeControl::ComputerProbeControl(player_id pid, std::string module): id(pid)
+Balder::ComputerProbeControl::ComputerProbeControl(player_id pid, std::string module): id(pid)
{
pModule = ComputerProbeControl::LoadPythonModule(module);
if (pModule != NULL) {
@@ -32,7 +32,7 @@
else { pFunc = 0; }
}
-Balder::ComputerProbeControl::~ComputerProbeControl()
+Balder::ComputerProbeControl::~ComputerProbeControl()
{
Py_XDECREF(pFunc);
Py_XDECREF(pModule);
Modified: src/configmanager.cpp
===================================================================
--- src/configmanager.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/configmanager.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,8 +18,8 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/configmanager.h"
-#include "../include/renderer.h"
+#include "configmanager.h"
+#include "renderer.h"
#include "tinyxml/tinyxml.h"
#include <fstream>
@@ -428,7 +428,7 @@
void ConfigManager::GenerateConfig( const char *filename)
{
std::ofstream cfile( filename );
- cfile
+ cfile
<< "<?xml version=\"1.0\" ?> "
<< "<!-- Balder2d Configuration data --> "
<< "<Balder> "
Modified: src/entity.cpp
===================================================================
--- src/entity.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/entity.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,18 +18,18 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/log.h"
-#include "../include/entity.h"
-#include "../include/gamemanager.h"
-#include "../include/configmanager.h"
-#include "../include/collisionmask.h"
+#include "log.h"
+#include "entity.h"
+#include "gamemanager.h"
+#include "configmanager.h"
+#include "collisionmask.h"
#include <math.h>
using namespace Balder;
const int Entity::MAXVELOCITY = ConfigManager::GetIntValue("Entity", "maxvelocity");
-Entity::Entity ( GameManager* gm,
+Entity::Entity ( GameManager* gm,
double xp, double yp, double xv, double yv, int w, int h )
: game_manager(gm), x_position(xp),y_position(yp),
x_velocity(xv), y_velocity(yv), width(w), height(h), is_dead(false)
@@ -86,7 +86,7 @@
int x_ave = 0;
int y_ave = 0;
int x_offset, y_offset;
-
+
int x, y, radius, r2;
radius = width/2;
@@ -156,7 +156,7 @@
double norm = sqrt(x*x+y*y);
x = x/norm;
y = y/norm;
- // dot the normal vector with the velocity vector (actually what we have
+ // dot the normal vector with the velocity vector (actually what we have
// here is the negative of the normal to the surface.
double projection = x*x_velocity + y*y_velocity;
// make sure the vectors are within 90 degrees of each other, otherwise the
Modified: src/gamemanager.cpp
===================================================================
--- src/gamemanager.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/gamemanager.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,23 +18,23 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/log.h"
+#include "log.h"
#include <SDL/SDL.h>
-#include "../include/gamemanager.h"
-#include "../include/configmanager.h"
-#include "../include/player.h"
-#include "../include/input.h"
-#include "../include/artificialcontroller.h"
-#include "../include/probe.h"
-#include "../include/projectile.h"
-#include "../include/powerup.h"
-#include "../include/renderer.h"
-#include "../include/soundmanager.h"
-#include "../include/collisionmask.h"
-#include "../include/mapparser.h"
-#include "../include/probefactory.h"
-#include "../include/projectilefactory.h"
-#include "../include/powerupfactory.h"
+#include "gamemanager.h"
+#include "configmanager.h"
+#include "player.h"
+#include "input.h"
+#include "artificialcontroller.h"
+#include "probe.h"
+#include "projectile.h"
+#include "powerup.h"
+#include "renderer.h"
+#include "soundmanager.h"
+#include "collisionmask.h"
+#include "mapparser.h"
+#include "probefactory.h"
+#include "projectilefactory.h"
+#include "powerupfactory.h"
using namespace Balder;
@@ -88,7 +88,7 @@
try
{
for (int i=1; i < numplayers+1; ++i)
- {
+ {
// this will create a new player and associated probe
id = CreateNewPlayer();
// check and see if it's a human controlled player, or what AI script to use
@@ -108,7 +108,7 @@
{
throw "error creating player, or player probe";
}
- Log::output("running as Server . . ");
+ Log::output("running as Server . . ");
start_time = SDL_GetTicks();
int time = ConfigManager::GetIntValue("GameSetup", "TimeLimit");
if (time > 0) end_time = start_time + (time*60*1000);
@@ -128,7 +128,7 @@
mapwidth = statbox_x = mp.GetMapWidth();
mapheight = statbox_y = mp.GetMapHeight();
- render->SetScreen(mp.GetMapWidth(), mp.GetMapHeight()+STATHEIGHT,
+ render->SetScreen(mp.GetMapWidth(), mp.GetMapHeight()+STATHEIGHT,
ConfigManager::GetIntValue("Video", "fullscreen"));
// create the collision mask
collision_mask = new CollisionMask(mapname);
@@ -153,7 +153,7 @@
}
void GameManager::Run()
-{
+{
start_frame = frame;
int powerup_spawn_interval = ConfigManager::GetIntValue("Powerup", "spawn_interval");
int maxScore = ConfigManager::GetIntValue("GameSetup", "ScoreLimit");
@@ -199,7 +199,7 @@
int w1 = (*ent1)->GetWidth();
int h1 = (*ent1)->GetHeight();
while (ent2 != entity_list.end())
- {
+ {
// first a crude test
if ( abs(x1 - (*ent2)->GetX()) > w1 + (*ent2)->GetWidth() ||
abs(y1 - (*ent2)->GetY()) > h1 + (*ent2)->GetHeight() )
@@ -229,7 +229,7 @@
break;
}
++pl;
- }
+ }
}
if (end_time){
if (SDL_GetTicks() > end_time) EndGame("Time Up");
@@ -293,7 +293,7 @@
void GameManager::RemovePlayer(player_id id, bool notifyOthers)
{
- if (player_list.count(id) == 0) {
+ if (player_list.count(id) == 0) {
Log::output("attempting to remove non-existant player!");
return;
}
@@ -308,7 +308,7 @@
}
// now remove the player from the player list
player_list.erase(id);
- if (ConfigManager::GetIntValue("GameSetup", "LifeLimit") > 0
+ if (ConfigManager::GetIntValue("GameSetup", "LifeLimit") > 0
&& player_list.size() == 1) {
PlayerIterator p = player_list.begin();
render->DrawEntity(const_cast<Probe*>((*p).second->GetProbe()));
@@ -322,10 +322,10 @@
void GameManager::ScoreAdd(player_id addToID, int toAdd)
{
// if the player no longer exists, forget it
- if (player_list.count(addToID) == 0) return;
+ if (player_list.count(addToID) == 0) return;
(player_list[addToID])->AddScore(toAdd);
}
-void GameManager::CreateProjectile ( player_id pid, double x, double y,
+void GameManager::CreateProjectile ( player_id pid, double x, double y,
double x_vel, double y_vel )
{
// test to make sure the projectile will not be inside a wall
@@ -358,7 +358,7 @@
}
srand(frame); // seed with the frame number for predictable randomness
// now we can respawn the probe
- if (!spawn) {
+ if (!spawn) {
p->SetProbeState(200,200,1,-1, false);
return;
}
@@ -460,7 +460,7 @@
{
// (*pl).first is the player id, (*pl).second is the player pointer
(*pl).second->DrawStats(statbox);
- render->BlitSurface(((*pl).first - 1)*(STATWIDTH+10), statbox_y,
+ render->BlitSurface(((*pl).first - 1)*(STATWIDTH+10), statbox_y,
STATWIDTH, STATHEIGHT, statbox);
++pl;
}
@@ -504,7 +504,7 @@
Entity *e = *ent1;
ss << "\nPlayer " << e->GetOwner() << " " << e->GetType() << ":\n"
<< "\tX: " << e->GetXPosition() << "\tY: " << e->GetYPosition() << "\n"
- << "\tXvel: " << e->GetXVelocity() << "\tYvel: " << e->GetYVelocity()
+ << "\tXvel: " << e->GetXVelocity() << "\tYvel: " << e->GetYVelocity()
<< "\n";
++ent1;
if (0 == e->GetType().compare("probe" )) {
Modified: src/imageloader.cpp
===================================================================
--- src/imageloader.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/imageloader.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,8 +18,8 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/imageloader.h"
-#include "../include/log.h"
+#include "imageloader.h"
+#include "log.h"
#include <physfs.h>
using namespace Balder;
Modified: src/input.cpp
===================================================================
--- src/input.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/input.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -22,11 +22,11 @@
#include <SDL/SDL_keyboard.h>
#include <map>
#include <string>
-#include "../include/input.h"
-#include "../include/gamemanager.h"
-#include "../include/configmanager.h"
-#include "../include/player.h"
-#include "../include/log.h"
+#include "input.h"
+#include "gamemanager.h"
+#include "configmanager.h"
+#include "player.h"
+#include "log.h"
using namespace Balder;
@@ -35,51 +35,51 @@
SDLKey k;
} SDLKeyStringTable[] = {
{"BACKSPACE", SDLK_BACKSPACE},
- {"TAB", SDLK_TAB},
- {"ENTER", SDLK_RETURN},
- {"PAUSE", SDLK_PAUSE},
- {"ESC", SDLK_ESCAPE},
- {"SPACE", SDLK_SPACE},
- {"DEL", SDLK_DELETE},
- {"KP0", SDLK_KP0},
- {"KP1", SDLK_KP1},
- {"KP2", SDLK_KP2},
- {"KP3", SDLK_KP3},
- {"KP4", SDLK_KP4},
- {"KP5", SDLK_KP5},
- {"KP6", SDLK_KP6},
- {"KP7", SDLK_KP7},
- {"KP8", SDLK_KP8},
- {"KP9", SDLK_KP9},
- {"KP.", SDLK_KP_PERIOD},
- {"KP/", SDLK_KP_DIVIDE},
- {"KP*", SDLK_KP_MULTIPLY},
- {"KP-", SDLK_KP_MINUS},
- {"KP+", SDLK_KP_PLUS},
- {"KP_ENTER", SDLK_KP_ENTER},
- {"UP", SDLK_UP},
- {"DOWN", SDLK_DOWN},
- {"RIGHT", SDLK_RIGHT},
- {"LEFT", SDLK_LEFT},
- {"INSERT", SDLK_INSERT},
- {"HOME", SDLK_HOME},
- {"END", SDLK_END},
- {"PAGEUP", SDLK_PAGEUP},
- {"PAGEDOWN", SDLK_PAGEDOWN},
- {"F1", SDLK_F1},
- {"F2", SDLK_F2},
- {"F3", SDLK_F3},
- {"F4", SDLK_F4},
- {"F5", SDLK_F5},
- {"F6", SDLK_F6},
- {"F7", SDLK_F7},
- {"F8", SDLK_F8},
- {"F9", SDLK_F9},
- {"F10", SDLK_F10},
- {"F11", SDLK_F11},
- {"F12", SDLK_F12},
- {"F13", SDLK_F13},
- {"F14", SDLK_F14},
+ {"TAB", SDLK_TAB},
+ {"ENTER", SDLK_RETURN},
+ {"PAUSE", SDLK_PAUSE},
+ {"ESC", SDLK_ESCAPE},
+ {"SPACE", SDLK_SPACE},
+ {"DEL", SDLK_DELETE},
+ {"KP0", SDLK_KP0},
+ {"KP1", SDLK_KP1},
+ {"KP2", SDLK_KP2},
+ {"KP3", SDLK_KP3},
+ {"KP4", SDLK_KP4},
+ {"KP5", SDLK_KP5},
+ {"KP6", SDLK_KP6},
+ {"KP7", SDLK_KP7},
+ {"KP8", SDLK_KP8},
+ {"KP9", SDLK_KP9},
+ {"KP.", SDLK_KP_PERIOD},
+ {"KP/", SDLK_KP_DIVIDE},
+ {"KP*", SDLK_KP_MULTIPLY},
+ {"KP-", SDLK_KP_MINUS},
+ {"KP+", SDLK_KP_PLUS},
+ {"KP_ENTER", SDLK_KP_ENTER},
+ {"UP", SDLK_UP},
+ {"DOWN", SDLK_DOWN},
+ {"RIGHT", SDLK_RIGHT},
+ {"LEFT", SDLK_LEFT},
+ {"INSERT", SDLK_INSERT},
+ {"HOME", SDLK_HOME},
+ {"END", SDLK_END},
+ {"PAGEUP", SDLK_PAGEUP},
+ {"PAGEDOWN", SDLK_PAGEDOWN},
+ {"F1", SDLK_F1},
+ {"F2", SDLK_F2},
+ {"F3", SDLK_F3},
+ {"F4", SDLK_F4},
+ {"F5", SDLK_F5},
+ {"F6", SDLK_F6},
+ {"F7", SDLK_F7},
+ {"F8", SDLK_F8},
+ {"F9", SDLK_F9},
+ {"F10", SDLK_F10},
+ {"F11", SDLK_F11},
+ {"F12", SDLK_F12},
+ {"F13", SDLK_F13},
+ {"F14", SDLK_F14},
{"F15", SDLK_F15},
{"RSHIFT", SDLK_RSHIFT},
{"LSHIFT", SDLK_LSHIFT},
@@ -97,7 +97,7 @@
bool Input::keymapInitialized = false;
// contstructor
- Input::Input(GameManager* gm, int nplayers):
+ Input::Input(GameManager* gm, int nplayers):
game_manager(gm), num_players(nplayers)
{
SDL_JoystickEventState(SDL_ENABLE);
@@ -197,18 +197,18 @@
if(event.jaxis.value < -3200){ // left
controllers[1].inputs = old | LEFT;
if (old & RIGHT)
- controllers[1].inputs = old - RIGHT;
+ controllers[1].inputs = old - RIGHT;
}
else if(event.jaxis.value > 3200){ // right
controllers[1].inputs = old | RIGHT;
if (old & LEFT)
- controllers[1].inputs = old - LEFT;
+ controllers[1].inputs = old - LEFT;
}
else {
if (old & RIGHT)
controllers[1].inputs = old - RIGHT;
if (old & LEFT)
- controllers[1].inputs = old - LEFT;
+ controllers[1].inputs = old - LEFT;
}
}
// if anything was changed, send an event to the gamemanager
@@ -220,7 +220,7 @@
default:
return;
}
- }
+ }
}
@@ -267,8 +267,8 @@
void Input::BindKeys()
-{
- if (!keymapInitialized) { MapKeys();}
+{
+ if (!keymapInitialized) { MapKeys();}
// now get all of the keys from the config manager.
const char* key;
SDLKey k;
@@ -276,33 +276,33 @@
{
// It is convenient to set the initial input state here so we will
controllers[i].inputs = 0;
- // remember, players are numbered starting at 1, but the controllers
- // array is indexed 0 to (num_players - 1), so the controller number
+ // remember, players are numbered starting at 1, but the controllers
+ // array is indexed 0 to (num_players - 1), so the controller number
// we pass to the config manager is i + 1.
key = ConfigManager::GetPlayerControl(i+1,"right");
if (key && parse_key_map.count(key)) {k = parse_key_map[key];}
else {k = SDLK_UNKNOWN;}
controllers[i].right = k;
-
+
key = ConfigManager::GetPlayerControl(i+1,"left");
if (key && parse_key_map.count(key)) {k = parse_key_map[key];}
else {k = SDLK_UNKNOWN;}
controllers[i].left = k;
-
+
key = ConfigManager::GetPlayerControl(i+1,"stick");
if (key && parse_key_map.count(key)) {k = parse_key_map[key];}
else {k = SDLK_UNKNOWN;}
controllers[i].stick = k;
-
+
key = ConfigManager::GetPlayerControl(i+1,"push");
if (key && parse_key_map.count(key)) {k = parse_key_map[key];}
else {k = SDLK_UNKNOWN;}
controllers[i].push = k;
-
+
key = ConfigManager::GetPlayerControl(i+1,"fire");
if (key && parse_key_map.count(key)) {k = parse_key_map[key];}
else {k = SDLK_UNKNOWN;}
- controllers[i].fire = k;
+ controllers[i].fire = k;
}
}
Modified: src/log.cpp
===================================================================
--- src/log.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/log.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,7 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/log.h"
+#include "log.h"
using namespace Balder;
Modified: src/main.cpp
===================================================================
--- src/main.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/main.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -22,13 +22,13 @@
#include <SDL/SDL_image.h>
#include <SDL/SDL_thread.h>
#include <SDL/SDL_mixer.h>
-#include "../include/gamemanager.h"
-#include "../include/renderer.h"
-#include "../include/soundmanager.h"
-#include "../include/configmanager.h"
-#include "../include/menu/menu.h"
-#include "../include/imageloader.h"
-#include "../include/log.h"
+#include "gamemanager.h"
+#include "renderer.h"
+#include "soundmanager.h"
+#include "configmanager.h"
+#include "menu/menu.h"
+#include "imageloader.h"
+#include "log.h"
using namespace std;
using namespace Balder;
Modified: src/mapparser.cpp
===================================================================
--- src/mapparser.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/mapparser.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,9 +18,9 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/log.h"
-#include "../include/mapparser.h"
-#include "../include/gamemanager.h"
+#include "log.h"
+#include "mapparser.h"
+#include "gamemanager.h"
#include "tinyxml/tinyxml.h"
#include <string>
@@ -102,7 +102,7 @@
std::string str("false");
const char *stuck_status = stk->Attribute("status");
s->stuck = str.compare(stuck_status); // returns 0 if they match
- return s;
+ return s;
}
SpawnLocation* MapParser::NextSpawnLocation()
{
@@ -135,5 +135,5 @@
std::string str("false");
const char *stuck_status = stk->Attribute("status");
s->stuck = str.compare(stuck_status);
- return s;
+ return s;
}
Modified: src/menu/ailistmodel.cpp
===================================================================
--- src/menu/ailistmodel.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/ailistmodel.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,7 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/menu/ailistmodel.h"
+#include "menu/ailistmodel.h"
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
@@ -36,7 +36,7 @@
// always show Human option as it disables any ai scripting so that a user may play.
scriptnames.push_back("Human");
++numScripts;
-
+
boost::filesystem::path script_path( "scripts/" );
boost::filesystem::directory_iterator end_iter;
for ( boost::filesystem::directory_iterator dir_itr( script_path ); dir_itr != end_iter; ++dir_itr ) {
Modified: src/menu/animationwidget.cpp
===================================================================
--- src/menu/animationwidget.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/animationwidget.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -22,8 +22,8 @@
#include <guichan/sdl/sdlgraphics.hpp>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
-#include "../../include/menu/animationwidget.h"
-#include "../../include/imageloader.h"
+#include "menu/animationwidget.h"
+#include "imageloader.h"
using namespace Balder;
AnimationWidget::AnimationWidget(std::string aFileName, bool aHasBaseFrame,
Modified: src/menu/gamesetup.cpp
===================================================================
--- src/menu/gamesetup.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/gamesetup.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,10 +18,10 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/menu/gamesetup.h"
-#include "../../include/configmanager.h"
-#include "../../include/menu/samplemapwidget.h"
-#include "../../include/menu/maplistmodel.h"
+#include "menu/gamesetup.h"
+#include "configmanager.h"
+#include "menu/samplemapwidget.h"
+#include "menu/maplistmodel.h"
using namespace Balder;
Modified: src/menu/mainmenu.cpp
===================================================================
--- src/menu/mainmenu.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/mainmenu.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,9 +18,9 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/menu/menu.h"
-#include "../../include/menu/mainmenu.h"
-#include "../../include/menu/options.h"
+#include "menu/menu.h"
+#include "menu/mainmenu.h"
+#include "menu/options.h"
using namespace Balder;
Modified: src/menu/maplistmodel.cpp
===================================================================
--- src/menu/maplistmodel.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/maplistmodel.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,7 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/menu/maplistmodel.h"
+#include "menu/maplistmodel.h"
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
@@ -61,7 +61,7 @@
{
if ( boost::filesystem::is_directory( *dir_itr ) ) {
// lets try to check that this directory really contains a map
- if (find_file(*dir_itr, "maptags.xml")
+ if (find_file(*dir_itr, "maptags.xml")
&& find_file(*dir_itr, "geometry.png")
&& find_file(*dir_itr, "background.png") ) {
mapnames.push_back(dir_itr->leaf());
Modified: src/menu/menu.cpp
===================================================================
--- src/menu/menu.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/menu.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -19,9 +19,9 @@
***************************************************************************/
#include <SDL/SDL_mixer.h>
-#include "../../include/menu/menu.h"
-#include "../../include/menu/mainmenu.h"
-#include "../../include/soundmanager.h"
+#include "menu/menu.h"
+#include "menu/mainmenu.h"
+#include "soundmanager.h"
#include <iostream>
using namespace Balder;
Modified: src/menu/numberfield.cpp
===================================================================
--- src/menu/numberfield.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/numberfield.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -1,7 +1,7 @@
//
// C++ Implementation: numberfield
//
-// Description:
+// Description:
//
//
// Author: Bjorn Hansen <Holomorph@...>, (C) 2005
@@ -12,7 +12,7 @@
#include <sstream>
#include <guichan/font.hpp>
#include <guichan/graphics.hpp>
-#include "../../include/menu/numberfield.h"
+#include "menu/numberfield.h"
using namespace Balder;
using namespace gcn;
@@ -73,7 +73,7 @@
mText.erase(mCaretPosition - 1, 1);
--mCaretPosition;
}
-
+
else if (key.getValue() == Key::ENTER)
{
generateAction();
@@ -82,12 +82,12 @@
else if (key.getValue() == Key::HOME)
{
mCaretPosition = 0;
- }
+ }
else if (key.getValue() == Key::END)
{
mCaretPosition = mText.size();
- }
+ }
else if (key.isNumber())
{
@@ -103,12 +103,12 @@
Color faceColor = getBackgroundColor();
graphics->setColor(faceColor);
graphics->fillRectangle(Rectangle(0, 0, getWidth(), getHeight()));
-
+
if (isFocused())
- {
+ {
drawCaret(graphics, getWidth()-getFont()->getWidth(mText.substr(mCaretPosition,mText.size())) - 4);
}
-
+
graphics->setColor(getForegroundColor());
graphics->setFont(getFont());
//graphics->drawText(mText, 1 - mXScroll, 1);
Modified: src/menu/options.cpp
===================================================================
--- src/menu/options.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/options.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,11 +18,11 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/menu/options.h"
-#include "../../include/menu/gamesetup.h"
-#include "../../include/menu/playersetup.h"
-#include "../../include/menu/soundvideo.h"
-#include "../../include/configmanager.h"
+#include "menu/options.h"
+#include "menu/gamesetup.h"
+#include "menu/playersetup.h"
+#include "menu/soundvideo.h"
+#include "configmanager.h"
#include <sstream>
using namespace Balder;
Modified: src/menu/playersetup.cpp
===================================================================
--- src/menu/playersetup.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/playersetup.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,13 +18,13 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/log.h"
-#include "../../include/menu/playersetup.h"
-#include "../../include/menu/menu.h"
-#include "../../include/configmanager.h"
-#include "../../include/menu/sampleprobewidget.h"
-#include "../../include/menu/ailistmodel.h"
-#include "../../include/input.h"
+#include "log.h"
+#include "menu/playersetup.h"
+#include "menu/menu.h"
+#include "configmanager.h"
+#include "menu/sampleprobewidget.h"
+#include "menu/ailistmodel.h"
+#include "input.h"
#include <sstream>
using namespace Balder;
Modified: src/menu/samplemapwidget.cpp
===================================================================
--- src/menu/samplemapwidget.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/samplemapwidget.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -24,8 +24,8 @@
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_rotozoom.h>
-#include "../../include/menu/samplemapwidget.h"
-#include "../../include/imageloader.h"
+#include "menu/samplemapwidget.h"
+#include "imageloader.h"
using namespace Balder;
Modified: src/menu/sampleprobewidget.cpp
===================================================================
--- src/menu/sampleprobewidget.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/sampleprobewidget.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -23,9 +23,9 @@
#include <guichan/sdl/sdlgraphics.hpp>
#include <SDL/SDL.h>
#include <SDL/SDL_gfxPrimitives.h>
-#include "../../include/menu/sampleprobewidget.h"
-#include "../../include/probe.h"
-#include "../../include/log.h"
+#include "menu/sampleprobewidget.h"
+#include "probe.h"
+#include "log.h"
using namespace Balder;
SampleProbeWidget::SampleProbeWidget(): probeFrame(0), probeColor(0)
@@ -42,7 +42,7 @@
void SampleProbeWidget::draw(gcn::Graphics* graphics)
{
- // looks like we still have to draw directly to the screen here...
+ // looks like we still have to draw directly to the screen here...
// no doubt this will choke if the obect is not an SDLGraphics object
SDL_Surface *screen = dynamic_cast<gcn::SDLGraphics*>(graphics)->getTarget();
int x,y;
Modified: src/menu/soundvideo.cpp
===================================================================
--- src/menu/soundvideo.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/soundvideo.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,9 +18,9 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/menu/soundvideo.h"
-#include "../../include/configmanager.h"
-#include "../../include/soundmanager.h"
+#include "menu/soundvideo.h"
+#include "configmanager.h"
+#include "soundmanager.h"
using namespace Balder;
Modified: src/menu/submenu.cpp
===================================================================
--- src/menu/submenu.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/menu/submenu.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,7 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../../include/menu/submenu.h"
+#include "menu/submenu.h"
using namespace Balder;
Modified: src/player.cpp
===================================================================
--- src/player.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/player.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,11 +21,11 @@
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_gfxPrimitives.h>
-#include "../include/player.h"
-#include "../include/probe.h"
-#include "../include/input.h"
-#include "../include/gamemanager.h"
-#include "../include/imageloader.h"
+#include "player.h"
+#include "probe.h"
+#include "input.h"
+#include "gamemanager.h"
+#include "imageloader.h"
#include "SFont/Font.h"
#include <sstream>
Modified: src/powerup.cpp
===================================================================
--- src/powerup.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/powerup.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -1,7 +1,7 @@
//
// C++ Implementation: powerup
//
-// Description:
+// Description:
//
//
// Author: Bjorn Hansen <Holomorph@...>, (C) 2005
@@ -11,11 +11,11 @@
//
#include <math.h>
#include <SDL/SDL_image.h>
-#include "../include/powerup.h"
+#include "powerup.h"
namespace Balder {
-PowerUp::PowerUp(GameManager* gm, double x_position, double y_position,
+PowerUp::PowerUp(GameManager* gm, double x_position, double y_position,
double x_velocity, double y_velocity, int effect)
: Entity(gm, x_position, y_position,
x_velocity, y_velocity,
Modified: src/powerupfactory.cpp
===================================================================
--- src/powerupfactory.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/powerupfactory.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -22,11 +22,11 @@
#include <math.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
-#include "../include/powerupfactory.h" // class's header file
-#include "../include/renderer.h"
-#include "../include/powerup.h"
-#include "../include/collisionmask.h"
-#include "../include/imageloader.h"
+#include "powerupfactory.h" // class's header file
+#include "renderer.h"
+#include "powerup.h"
+#include "collisionmask.h"
+#include "imageloader.h"
using namespace Balder;
Modified: src/probe.cpp
===================================================================
--- src/probe.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/probe.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,12 +18,12 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/log.h"
-#include "../include/probe.h"
-#include "../include/projectile.h"
-#include "../include/powerup.h"
-#include "../include/gamemanager.h"
-#include "../include/configmanager.h"
+#include "log.h"
+#include "probe.h"
+#include "projectile.h"
+#include "powerup.h"
+#include "gamemanager.h"
+#include "configmanager.h"
#include <SDL/SDL_gfxPrimitives.h>
using namespace Balder;
@@ -44,7 +44,7 @@
charge_remaining(MAXCHARGE), life_remaining(MAXHITS), shield_power(0),
facing_angle(0),stick(false), stuck(stuck), pushOffState(0), pushOffSpeed(0),
rotation_state(NO_ROT), x_vel_add(0), y_vel_add(0), death_frame(0), hit_frame(0),
- spawn_frame(0), ammo_angle(0), color(c), owner(p), powerups(2), deaths(0),
+ spawn_frame(0), ammo_angle(0), color(c), owner(p), powerups(2), deaths(0),
removeFromGame(false)
{
bounding_box.w = PROBEWIDTH;
Modified: src/probefactory.cpp
===================================================================
--- src/probefactory.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/probefactory.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -20,11 +20,11 @@
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
-#include "../include/probefactory.h" // class's header file
-#include "../include/renderer.h"
-#include "../include/soundmanager.h"
-#include "../include/probe.h"
-#include "../include/imageloader.h"
+#include "probefactory.h" // class's header file
+#include "renderer.h"
+#include "soundmanager.h"
+#include "probe.h"
+#include "imageloader.h"
using namespace Balder;
Modified: src/projectile.cpp
===================================================================
--- src/projectile.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/projectile.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -18,9 +18,9 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "../include/projectile.h"
-#include "../include/gamemanager.h"
-#include "../include/configmanager.h"
+#include "projectile.h"
+#include "gamemanager.h"
+#include "configmanager.h"
using namespace Balder;
@@ -31,7 +31,7 @@
const int Projectile::EXPLODE_FRAMES = ConfigManager::GetIntValue("Projectile", "explodeframes");
const int Projectile::EXPLODE_RADIUS = ConfigManager::GetIntValue("Projectile", "exploderadius");
-Projectile::Projectile(GameManager* mg, double x_pos, double y_pos,
+Projectile::Projectile(GameManager* mg, double x_pos, double y_pos,
double x_vel, double y_vel, player_id pid)
:Entity(mg, x_pos, y_pos, x_vel, y_vel, PROJECTILEWIDTH, PROJECTILEHEIGHT),
time_remaining(PROJECTILELIFETIME), frame_number(0), owner(pid), is_exploding(false)
@@ -67,15 +67,15 @@
// there is a collision, but if we're already blowing up just return true;
if (is_exploding) {return true;}
// don't anialate friendly projectiles for the first few frames
- if (0 == e->GetType().compare("projectile")
+ if (0 == e->GetType().compare("projectile")
&& (time_remaining > PROJECTILELIFETIME - 30)
- && owner == dynamic_cast<Projectile*>(e)->GetOwner())
+ && owner == dynamic_cast<Projectile*>(e)->GetOwner())
{
return false;
- }
+ }
// we hit something that wasn't a wall, blow up!
Explode();
- return true;
+ return true;
}
void Projectile::Explode()
Modified: src/projectilefactory.cpp
===================================================================
--- src/projectilefactory.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/projectilefactory.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -20,10 +20,10 @@
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
-#include "../include/projectilefactory.h" // class's header file
-#include "../include/renderer.h"
-#include "../include/projectile.h"
-#include "../include/imageloader.h"
+#include "projectilefactory.h" // class's header file
+#include "renderer.h"
+#include "projectile.h"
+#include "imageloader.h"
using namespace Balder;
Modified: src/renderer.cpp
===================================================================
--- src/renderer.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/renderer.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -21,9 +21,9 @@
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include "SFont/Font.h"
-#include "../include/renderer.h"
-#include "../include/entity.h"
-#include "../include/imageloader.h"
+#include "renderer.h"
+#include "entity.h"
+#include "imageloader.h"
#include <string>
using namespace Balder;
Modified: src/soundmanager.cpp
===================================================================
--- src/soundmanager.cpp 2007-10-01 05:48:19 UTC (rev 65)
+++ src/soundmanager.cpp 2007-10-01 05:52:16 UTC (rev 66)
@@ -1,4 +1,4 @@
-#include "../include/soundmanager.h"
+#include "soundmanager.h"
using namespace Balder;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|