aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Kropf <josh@slashdev.ca>2011-04-23 17:07:37 (GMT)
committerJosh Kropf <josh@slashdev.ca>2011-04-23 17:07:37 (GMT)
commit93bf4ce38f3dd7a200ab8c785da06e279950e974 (patch)
treef5c5b6a114c08122315d8acbea4a54e2f16cf04c
parentfcdd6af406593f8d62d0969d85fcf1409141ef77 (diff)
downloadballdemo-93bf4ce38f3dd7a200ab8c785da06e279950e974.zip
balldemo-93bf4ce38f3dd7a200ab8c785da06e279950e974.tar.gz
balldemo-93bf4ce38f3dd7a200ab8c785da06e279950e974.tar.bz2
changed the size of ball texture to be a power of two
-rw-r--r--assets/textures/ball.tgabin6444 -> 4140 bytes
-rw-r--r--common/stage.cpp8
2 files changed, 4 insertions, 4 deletions
diff --git a/assets/textures/ball.tga b/assets/textures/ball.tga
index 76b8190..d34f1fe 100644
--- a/assets/textures/ball.tga
+++ b/assets/textures/ball.tga
Binary files differ
diff --git a/common/stage.cpp b/common/stage.cpp
index e702943..50dd4d4 100644
--- a/common/stage.cpp
+++ b/common/stage.cpp
@@ -16,7 +16,7 @@
#include <cmath>
-// High precision time function returns time in seconds.
+// High precision time function returns current time in seconds.
static double now()
{
struct timeval tv;
@@ -161,14 +161,14 @@ void stage::queueAction(action_type_t type, float x, float y)
void stage::render()
{
- glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+ glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
const action_t * a = _actions.shift();
while (a) {
switch (a->type) {
case ACTION_TYPE_TOUCH_UP:
- _sprites.append(new ball(*this, a->x, a->y, 30));
+ _sprites.append(new ball(*this, a->x, a->y, 32));
break;
case ACTION_TYPE_TILT:
b2Vec2 gravity(a->x, a->y);
@@ -194,6 +194,6 @@ void stage::render()
}
}
- _text->printf(0, _height-_text->char_height(), "%d fps, %f s, %d sprites",
+ _text->printf(0, _height-_text->char_height(), "%d fps, %.3f s, %d sprites",
int(1.0 / ftime), ftime, _sprites.count());
}