projects
/
physics.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6029825
)
renamed libpg to libbear
author
Patrik Gornicz
<Gornicz.P@gmail.com>
Thu, 28 May 2009 01:44:29 +0000
(21:44 -0400)
committer
Patrik Gornicz
<Gornicz.P@gmail.com>
Thu, 28 May 2009 01:44:29 +0000
(21:44 -0400)
41 files changed:
Makefile
patch
|
blob
|
blame
|
history
libs/bear.dll
[new symlink]
patch
|
blob
libs/libbear.so.0
[new symlink]
patch
|
blob
libs/libpg.so.0
[deleted symlink]
patch
|
blob
|
blame
|
history
libs/pg.dll
[deleted symlink]
patch
|
blob
|
blame
|
history
src/CollisionInfo.h
patch
|
blob
|
blame
|
history
src/Effects/Effect.h
patch
|
blob
|
blame
|
history
src/Effects/Gravity.h
patch
|
blob
|
blame
|
history
src/Effects/GravityWell.h
patch
|
blob
|
blame
|
history
src/Effects/Screen.h
patch
|
blob
|
blame
|
history
src/Entities/Ball.cpp
patch
|
blob
|
blame
|
history
src/Entities/Ball.h
patch
|
blob
|
blame
|
history
src/Entities/Entity.cpp
patch
|
blob
|
blame
|
history
src/Entities/Entity.h
patch
|
blob
|
blame
|
history
src/Entities/Line.cpp
patch
|
blob
|
blame
|
history
src/Entities/Line.h
patch
|
blob
|
blame
|
history
src/Entities/Particle.cpp
patch
|
blob
|
blame
|
history
src/Entities/Particle.h
patch
|
blob
|
blame
|
history
src/Entities/PhysicsEntity.cpp
patch
|
blob
|
blame
|
history
src/Entities/PhysicsEntity.h
patch
|
blob
|
blame
|
history
src/Entities/Point.cpp
patch
|
blob
|
blame
|
history
src/Entities/Point.h
patch
|
blob
|
blame
|
history
src/Entities/Polygon.cpp
patch
|
blob
|
blame
|
history
src/Entities/Polygon.h
patch
|
blob
|
blame
|
history
src/Entities/WindParticle.cpp
patch
|
blob
|
blame
|
history
src/Entities/WindParticle.h
patch
|
blob
|
blame
|
history
src/collisionManager.cpp
patch
|
blob
|
blame
|
history
src/config/config.cpp
patch
|
blob
|
blame
|
history
src/config/keys.cpp
patch
|
blob
|
blame
|
history
src/config/keys.h
patch
|
blob
|
blame
|
history
src/config/reader.cpp
patch
|
blob
|
blame
|
history
src/effectManager.cpp
patch
|
blob
|
blame
|
history
src/effectManager.h
patch
|
blob
|
blame
|
history
src/entityCreator.h
patch
|
blob
|
blame
|
history
src/entityManager.cpp
patch
|
blob
|
blame
|
history
src/game.cpp
patch
|
blob
|
blame
|
history
src/graphics/graphics.cpp
patch
|
blob
|
blame
|
history
src/graphics/graphics.h
patch
|
blob
|
blame
|
history
src/input/inputManager.cpp
patch
|
blob
|
blame
|
history
src/input/inputManager.h
patch
|
blob
|
blame
|
history
src/main.cpp
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index
8fb3377
..
fd0cfb4
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-10,7
+10,7
@@
else
LIBGL := -lGL -lGLU
LIBSDL := `sdl-config --libs`
endif
LIBGL := -lGL -lGLU
LIBSDL := `sdl-config --libs`
endif
-LIBMY := -l
pg
+LIBMY := -l
bear
LIBS := ${LIBSDL} ${LIBGL} ${LIBMY}
OPTFLAGS := -O2
LIBS := ${LIBSDL} ${LIBGL} ${LIBMY}
OPTFLAGS := -O2
@@
-97,10
+97,10
@@
LIBSTXT := $(addprefix ${DSTLIBSDIR},${LIBSTXT})
LIBSCPY := # := start
ifeq (${BUILD},WIN32)
LIBSCPY += SDL.dll
LIBSCPY := # := start
ifeq (${BUILD},WIN32)
LIBSCPY += SDL.dll
- LIBSCPY +=
pg
.dll
+ LIBSCPY +=
bear
.dll
else
LIBSCPY += libSDL-1.2.so.0
else
LIBSCPY += libSDL-1.2.so.0
- LIBSCPY += lib
pg
.so.0
+ LIBSCPY += lib
bear
.so.0
endif
LIBSCPY := $(addprefix ${DSTLIBSDIR},${LIBSCPY})
endif
LIBSCPY := $(addprefix ${DSTLIBSDIR},${LIBSCPY})
diff --git a/libs/bear.dll
b/libs/bear.dll
new file mode 120000
(symlink)
index 0000000..
03329c6
--- /dev/null
+++ b/
libs/bear.dll
@@ -0,0
+1
@@
+/usr/mingw32/lib/bear.dll
\ No newline at end of file
diff --git a/libs/libbear.so.0
b/libs/libbear.so.0
new file mode 120000
(symlink)
index 0000000..
5c6fb83
--- /dev/null
+++ b/
libs/libbear.so.0
@@ -0,0
+1
@@
+/usr/lib/libbear.so.0
\ No newline at end of file
diff --git
a/libs/libpg.so.0
b/libs/libpg.so.0
deleted file mode 120000
(symlink)
index
6b17e3b
..0000000
--- a/
libs/libpg.so.0
+++ /dev/null
@@
-1
+0,0 @@
-/usr/lib/libpg.so.0
\ No newline at end of file
diff --git
a/libs/pg.dll
b/libs/pg.dll
deleted file mode 120000
(symlink)
index
dd86165
..0000000
--- a/
libs/pg.dll
+++ /dev/null
@@
-1
+0,0 @@
-/usr/mingw32/lib/pg.dll
\ No newline at end of file
diff --git
a/src/CollisionInfo.h
b/src/CollisionInfo.h
index
6a1428e
..
32b0074
100644
(file)
--- a/
src/CollisionInfo.h
+++ b/
src/CollisionInfo.h
@@
-19,8
+19,8
@@
#ifndef COLLISIONINFO_H
#define COLLISIONINFO_H
#ifndef COLLISIONINFO_H
#define COLLISIONINFO_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Header Class *****
/// ***** Header Class *****
diff --git
a/src/Effects/Effect.h
b/src/Effects/Effect.h
index
15c7766
..
654c2a2
100644
(file)
--- a/
src/Effects/Effect.h
+++ b/
src/Effects/Effect.h
@@
-18,8
+18,8
@@
#ifndef EFFECT_H
#define EFFECT_H
#ifndef EFFECT_H
#define EFFECT_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
// Mutual headers ...
// Mutual headers ...
diff --git
a/src/Effects/Gravity.h
b/src/Effects/Gravity.h
index
f7458d3
..
146d787
100644
(file)
--- a/
src/Effects/Gravity.h
+++ b/
src/Effects/Gravity.h
@@
-18,8
+18,8
@@
#ifndef GRAVITY_H
#define GRAVITY_H
#ifndef GRAVITY_H
#define GRAVITY_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Effect.h"
#include "Effect.h"
diff --git
a/src/Effects/GravityWell.h
b/src/Effects/GravityWell.h
index
ea13a22
..
1d9f7e5
100644
(file)
--- a/
src/Effects/GravityWell.h
+++ b/
src/Effects/GravityWell.h
@@
-18,8
+18,8
@@
#ifndef GRAVITYWELL_H
#define GRAVITYWELL_H
#ifndef GRAVITYWELL_H
#define GRAVITYWELL_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Effect.h"
#include "Effect.h"
diff --git
a/src/Effects/Screen.h
b/src/Effects/Screen.h
index
2ff5f1a
..
82bcb7e
100644
(file)
--- a/
src/Effects/Screen.h
+++ b/
src/Effects/Screen.h
@@
-18,8
+18,8
@@
#ifndef SCREEN_H
#define SCREEN_H
#ifndef SCREEN_H
#define SCREEN_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Effect.h"
#include "Effect.h"
diff --git
a/src/Entities/Ball.cpp
b/src/Entities/Ball.cpp
index
ecbb412
..
11e3e09
100644
(file)
--- a/
src/Entities/Ball.cpp
+++ b/
src/Entities/Ball.cpp
@@
-17,9
+17,9
@@
#include "Ball.h"
#include "Ball.h"
-#include <
pg
/debug.h>
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "graphics/graphics.h"
#include "graphics/graphics.h"
diff --git
a/src/Entities/Ball.h
b/src/Entities/Ball.h
index
6b7c4c9
..
c3a1178
100644
(file)
--- a/
src/Entities/Ball.h
+++ b/
src/Entities/Ball.h
@@
-18,8
+18,8
@@
#ifndef BALL_H
#define BALL_H
#ifndef BALL_H
#define BALL_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "PhysicsEntity.h"
#include "PhysicsEntity.h"
diff --git
a/src/Entities/Entity.cpp
b/src/Entities/Entity.cpp
index
9510b78
..
ae04514
100644
(file)
--- a/
src/Entities/Entity.cpp
+++ b/
src/Entities/Entity.cpp
@@
-17,8
+17,8
@@
#include "Entity.h"
#include "Entity.h"
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Constructors/Destructors *****
/// ***** Constructors/Destructors *****
diff --git
a/src/Entities/Entity.h
b/src/Entities/Entity.h
index
6cd3e41
..
ff1db58
100644
(file)
--- a/
src/Entities/Entity.h
+++ b/
src/Entities/Entity.h
@@
-18,8
+18,8
@@
#ifndef ENTITY_H
#define ENTITY_H
#ifndef ENTITY_H
#define ENTITY_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Header Class *****
/// ***** Header Class *****
diff --git
a/src/Entities/Line.cpp
b/src/Entities/Line.cpp
index
fb82931
..
826d6fe
100644
(file)
--- a/
src/Entities/Line.cpp
+++ b/
src/Entities/Line.cpp
@@
-17,8
+17,8
@@
#include "Line.h"
#include "Line.h"
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Constructors/Destructors *****
/// ***** Constructors/Destructors *****
diff --git
a/src/Entities/Line.h
b/src/Entities/Line.h
index
f36bf1c
..
31a69d3
100644
(file)
--- a/
src/Entities/Line.h
+++ b/
src/Entities/Line.h
@@
-18,8
+18,8
@@
#ifndef LINE_H
#define LINE_H
#ifndef LINE_H
#define LINE_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Particle.h"
#include "Particle.h"
diff --git
a/src/Entities/Particle.cpp
b/src/Entities/Particle.cpp
index
23226e0
..
c7626d4
100644
(file)
--- a/
src/Entities/Particle.cpp
+++ b/
src/Entities/Particle.cpp
@@
-17,8
+17,8
@@
#include "Particle.h"
#include "Particle.h"
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Constructors/Destructors *****
/// ***** Constructors/Destructors *****
diff --git
a/src/Entities/Particle.h
b/src/Entities/Particle.h
index
51c85a4
..
34c8f64
100644
(file)
--- a/
src/Entities/Particle.h
+++ b/
src/Entities/Particle.h
@@
-18,8
+18,8
@@
#ifndef PARTICLE_H
#define PARTICLE_H
#ifndef PARTICLE_H
#define PARTICLE_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Entity.h"
#include "Entity.h"
diff --git
a/src/Entities/PhysicsEntity.cpp
b/src/Entities/PhysicsEntity.cpp
index
4ba50dc
..
060ef62
100644
(file)
--- a/
src/Entities/PhysicsEntity.cpp
+++ b/
src/Entities/PhysicsEntity.cpp
@@
-17,9
+17,9
@@
#include "PhysicsEntity.h"
#include "PhysicsEntity.h"
-#include <
pg
/debug.h>
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "effectManager.h"
#include "effectManager.h"
diff --git
a/src/Entities/PhysicsEntity.h
b/src/Entities/PhysicsEntity.h
index
e3ce13c
..
6c1d455
100644
(file)
--- a/
src/Entities/PhysicsEntity.h
+++ b/
src/Entities/PhysicsEntity.h
@@
-18,8
+18,8
@@
#ifndef PHYSICS_H
#define PHYSICS_H
#ifndef PHYSICS_H
#define PHYSICS_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Entity.h"
#include "Entity.h"
diff --git
a/src/Entities/Point.cpp
b/src/Entities/Point.cpp
index
c6072a6
..
58dd0da
100644
(file)
--- a/
src/Entities/Point.cpp
+++ b/
src/Entities/Point.cpp
@@
-17,8
+17,8
@@
#include "Point.h"
#include "Point.h"
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Constructors/Destructors *****
/// ***** Constructors/Destructors *****
diff --git
a/src/Entities/Point.h
b/src/Entities/Point.h
index
2f993cc
..
901040f
100644
(file)
--- a/
src/Entities/Point.h
+++ b/
src/Entities/Point.h
@@
-18,8
+18,8
@@
#ifndef POINT_H
#define POINT_H
#ifndef POINT_H
#define POINT_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Particle.h"
#include "Particle.h"
diff --git
a/src/Entities/Polygon.cpp
b/src/Entities/Polygon.cpp
index
373f805
..
4b3826e
100644
(file)
--- a/
src/Entities/Polygon.cpp
+++ b/
src/Entities/Polygon.cpp
@@
-17,9
+17,9
@@
#include "Polygon.h"
#include "Polygon.h"
-#include <
pg
/debug.h>
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "graphics/graphics.h"
#include "graphics/graphics.h"
diff --git
a/src/Entities/Polygon.h
b/src/Entities/Polygon.h
index
314a5ec
..
6624c95
100644
(file)
--- a/
src/Entities/Polygon.h
+++ b/
src/Entities/Polygon.h
@@
-18,8
+18,8
@@
#ifndef POLYGON_H
#define POLYGON_H
#ifndef POLYGON_H
#define POLYGON_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "PhysicsEntity.h"
#include "PhysicsEntity.h"
diff --git
a/src/Entities/WindParticle.cpp
b/src/Entities/WindParticle.cpp
index
9df28c2
..
786bb78
100644
(file)
--- a/
src/Entities/WindParticle.cpp
+++ b/
src/Entities/WindParticle.cpp
@@
-17,8
+17,8
@@
#include "WindParticle.h"
#include "WindParticle.h"
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Constructors/Destructors *****
/// ***** Constructors/Destructors *****
diff --git
a/src/Entities/WindParticle.h
b/src/Entities/WindParticle.h
index
b03aebb
..
560e660
100644
(file)
--- a/
src/Entities/WindParticle.h
+++ b/
src/Entities/WindParticle.h
@@
-18,8
+18,8
@@
#ifndef WINDPARTICLE_H
#define WINDPARTICLE_H
#ifndef WINDPARTICLE_H
#define WINDPARTICLE_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Point.h"
#include "Point.h"
diff --git
a/src/collisionManager.cpp
b/src/collisionManager.cpp
index
0e828a4
..
74158fd
100644
(file)
--- a/
src/collisionManager.cpp
+++ b/
src/collisionManager.cpp
@@
-17,10
+17,10
@@
#include "collisionManager.h"
#include "collisionManager.h"
-#include <
pg
/debug.h>
-#include <
pg
/Vector2.h>
-#include <
pg
/mathw.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+#include <
bear
/Vector2.h>
+#include <
bear
/mathw.h>
+using namespace
bear
;
#include "Entities/Ball.h"
#include "Entities/Polygon.h"
#include "Entities/Ball.h"
#include "Entities/Polygon.h"
diff --git
a/src/config/config.cpp
b/src/config/config.cpp
index
5194077
..
6c46bf0
100644
(file)
--- a/
src/config/config.cpp
+++ b/
src/config/config.cpp
@@
-17,8
+17,8
@@
#include "config.h"
#include "config.h"
-#include <
pg
/debug.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+using namespace
bear
;
#include <SDL/SDL.h>
#include "keys.h"
#include <SDL/SDL.h>
#include "keys.h"
diff --git
a/src/config/keys.cpp
b/src/config/keys.cpp
index
6cd2960
..
fd7be9e
100644
(file)
--- a/
src/config/keys.cpp
+++ b/
src/config/keys.cpp
@@
-17,8
+17,8
@@
#include "keys.h"
#include "keys.h"
-#include <
pg
/debug.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+using namespace
bear
;
#include <SDL/SDL.h>
#include <SDL/SDL.h>
diff --git
a/src/config/keys.h
b/src/config/keys.h
index
81eeb14
..
0b233a1
100644
(file)
--- a/
src/config/keys.h
+++ b/
src/config/keys.h
@@
-19,8
+19,8
@@
#ifndef KEYS_H
#define KEYS_H
#ifndef KEYS_H
#define KEYS_H
-#include <
pg
/debug.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+using namespace
bear
;
#include <SDL/SDL.h>
#include <SDL/SDL.h>
diff --git
a/src/config/reader.cpp
b/src/config/reader.cpp
index
edba875
..
86afa68
100644
(file)
--- a/
src/config/reader.cpp
+++ b/
src/config/reader.cpp
@@
-17,8
+17,8
@@
#include "reader.h"
#include "reader.h"
-#include <
pg
/debug.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+using namespace
bear
;
#include <iostream>
using std::cerr;
#include <iostream>
using std::cerr;
diff --git
a/src/effectManager.cpp
b/src/effectManager.cpp
index
526debe
..
0060652
100644
(file)
--- a/
src/effectManager.cpp
+++ b/
src/effectManager.cpp
@@
-17,8
+17,8
@@
#include "effectManager.h"
#include "effectManager.h"
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include <set>
#include <set>
diff --git
a/src/effectManager.h
b/src/effectManager.h
index
645c4ce
..
c343af3
100644
(file)
--- a/
src/effectManager.h
+++ b/
src/effectManager.h
@@
-18,8
+18,8
@@
#ifndef EFFECTMANAGER_H
#define EFFECTMANAGER_H
#ifndef EFFECTMANAGER_H
#define EFFECTMANAGER_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include "Entities/PhysicsEntity.h"
#include "Entities/PhysicsEntity.h"
diff --git
a/src/entityCreator.h
b/src/entityCreator.h
index
08ff369
..
1122b09
100644
(file)
--- a/
src/entityCreator.h
+++ b/
src/entityCreator.h
@@
-18,8
+18,8
@@
#ifndef ENTITYCREATOR_H
#define ENTITYCREATOR_H
#ifndef ENTITYCREATOR_H
#define ENTITYCREATOR_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
/// ***** Header Methods *****
namespace creator
/// ***** Header Methods *****
namespace creator
diff --git
a/src/entityManager.cpp
b/src/entityManager.cpp
index
10b2d1e
..
68c4508
100644
(file)
--- a/
src/entityManager.cpp
+++ b/
src/entityManager.cpp
@@
-17,10
+17,10
@@
#include "entityManager.h"
#include "entityManager.h"
-#include <
pg
/debug.h>
-#include <
pg
/Lock.h>
-#include <
pg
/Autolock.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+#include <
bear
/Lock.h>
+#include <
bear
/Autolock.h>
+using namespace
bear
;
#include <set>
#include <SDL/SDL.h>
#include <set>
#include <SDL/SDL.h>
diff --git
a/src/game.cpp
b/src/game.cpp
index
de3a602
..
000bdf4
100644
(file)
--- a/
src/game.cpp
+++ b/
src/game.cpp
@@
-17,8
+17,8
@@
#include "game.h"
#include "game.h"
-#include <
pg
/debug.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+using namespace
bear
;
#include <vector>
using std::vector;
#include <vector>
using std::vector;
diff --git
a/src/graphics/graphics.cpp
b/src/graphics/graphics.cpp
index
d795961
..
afc4441
100644
(file)
--- a/
src/graphics/graphics.cpp
+++ b/
src/graphics/graphics.cpp
@@
-17,9
+17,9
@@
#include "graphics.h"
#include "graphics.h"
-#include <
pg
/debug.h>
-#include <
pg
/mathw.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+#include <
bear
/mathw.h>
+using namespace
bear
;
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/gl.h>
#include <GL/glu.h>
diff --git
a/src/graphics/graphics.h
b/src/graphics/graphics.h
index
ec07616
..
6c58ef7
100644
(file)
--- a/
src/graphics/graphics.h
+++ b/
src/graphics/graphics.h
@@
-18,8
+18,8
@@
#ifndef GRAPHICS_H
#define GRAPHICS_H
#ifndef GRAPHICS_H
#define GRAPHICS_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include <vector>
#include <vector>
diff --git
a/src/input/inputManager.cpp
b/src/input/inputManager.cpp
index
7152138
..
23b945c
100644
(file)
--- a/
src/input/inputManager.cpp
+++ b/
src/input/inputManager.cpp
@@
-17,8
+17,8
@@
#include "inputManager.h"
#include "inputManager.h"
-#include <
pg
/debug.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+using namespace
bear
;
#include <SDL/SDL.h>
#include <SDL/SDL.h>
diff --git
a/src/input/inputManager.h
b/src/input/inputManager.h
index
a50f13d
..
f9a5ace
100644
(file)
--- a/
src/input/inputManager.h
+++ b/
src/input/inputManager.h
@@
-18,8
+18,8
@@
#ifndef INPUT_H
#define INPUT_H
#ifndef INPUT_H
#define INPUT_H
-#include <
pg
/Vector2.h>
-using namespace
pg
;
+#include <
bear
/Vector2.h>
+using namespace
bear
;
#include <SDL/SDL.h>
#include <SDL/SDL.h>
diff --git
a/src/main.cpp
b/src/main.cpp
index
05f9a25
..
988f5d1
100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-15,9
+15,9
@@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <
pg
/debug.h>
-#include <
pg/ticks
.h>
-using namespace
pg
;
+#include <
bear
/debug.h>
+#include <
bear/Timer
.h>
+using namespace
bear
;
#include <iostream>
using std::cout;
#include <iostream>
using std::cout;
@@
-85,7
+85,9
@@
static float s_fAccDrawWait = 0;
static int s_iUPS, s_iFPS;
static int s_iUpdateCount, s_iDrawCount;
static int s_iUPS, s_iFPS;
static int s_iUpdateCount, s_iDrawCount;
-static MICRO s_micLastSecond;
+
+static Ticks s_micLastSecond;
+static Timer s_timer;
static const float s_fGameStep = 10;
static const float s_fGameStep = 10;
@@
-109,9
+111,13
@@
void mainInit()
installSignal();
debug::init();
installSignal();
debug::init();
+
+ s_timer.init();
}
void mainClean()
{
}
void mainClean()
{
+ s_timer.fini();
+
debug::fini();
}
debug::fini();
}
@@
-177,7
+183,7
@@
void run()
void updateFPSCounters()
{
// Check if a second has passed to recalculate UPS and FPS
void updateFPSCounters()
{
// Check if a second has passed to recalculate UPS and FPS
- if (
tickCountMicro
() - s_micLastSecond >= 1000000)
+ if (
s_timer.query
() - s_micLastSecond >= 1000000)
{
s_iUPS = s_iUpdateCount;
s_iFPS = s_iDrawCount;
{
s_iUPS = s_iUpdateCount;
s_iFPS = s_iDrawCount;
@@
-186,7
+192,7
@@
void updateFPSCounters()
s_iUpdateCount -= s_iUPS;
s_iDrawCount -= s_iFPS;
s_iUpdateCount -= s_iUPS;
s_iDrawCount -= s_iFPS;
- s_micLastSecond =
tickCountMicro
();
+ s_micLastSecond =
s_timer.query
();
if(cfg::showFPS())
{
if(cfg::showFPS())
{
@@
-233,18
+239,20
@@
int startUpdateThread(void*)
{
updatesInit();
{
updatesInit();
- s_micLastSecond =
tickCountMicro
();
+ s_micLastSecond =
s_timer.query
();
while(s_bIsRunning)
{
while(s_bIsRunning)
{
- MICRO time = tickCountMicro();
+ Timer timer;
+ timer.init();
handleInput();
update(s_fGameStep);
updateFPSCounters();
handleInput();
update(s_fGameStep);
updateFPSCounters();
- time = tickCountMicro() - time;
+ const Ticks ticks = timer.query();
+ timer.fini();
- float wait = (1000000.0 / s_iTargetUPS - ti
me
);
+ float wait = (1000000.0 / s_iTargetUPS - ti
cks.microseconds()
);
s_fAccUpdateWait += 0 < wait ? wait : 0;
if(s_iMinWaitMicro < s_fAccUpdateWait)
s_fAccUpdateWait += 0 < wait ? wait : 0;
if(s_iMinWaitMicro < s_fAccUpdateWait)
@@
-266,11
+274,13
@@
int startDrawThread(void*)
while(s_bIsRunning)
{
while(s_bIsRunning)
{
- MICRO time = tickCountMicro();
+ Timer timer;
+ timer.init();
draw();
draw();
- time = tickCountMicro() - time;
+ const Ticks ticks = timer.query();
+ timer.fini();
- float wait = (1000000.0 / s_iTargetFPS - ti
me
);
+ float wait = (1000000.0 / s_iTargetFPS - ti
cks.microseconds()
);
s_fAccDrawWait += 0 < wait ? wait : 0;
if(s_iMinWaitMicro < s_fAccDrawWait)
s_fAccDrawWait += 0 < wait ? wait : 0;
if(s_iMinWaitMicro < s_fAccDrawWait)