summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2003-04-07 22:44:33 +0000
committerpixel <pixel>2003-04-07 22:44:33 +0000
commitc0108c1022ede4743247081f408ca7780095e520 (patch)
tree217ddb8550e19b52651e26a64eb8df80bfa6b380 /lib
parenta099991354e31b55a0d0903ba5755f13aeb43824 (diff)
Strange bugs...
Diffstat (limited to 'lib')
-rw-r--r--lib/base.cc4
-rw-r--r--lib/glsprite.cc4
-rw-r--r--lib/sprite.cc6
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/base.cc b/lib/base.cc
index 310dde3..8c1c862 100644
--- a/lib/base.cc
+++ b/lib/base.cc
@@ -28,7 +28,7 @@ mogltk::base::base(int w, int h, int flags) throw(GeneralException) : surface(0)
printm(M_INFO, "Video resolution: %dx%dx%d (ratio = %3.2f)\n", surface->w, surface->h, surface->format->BitsPerPixel, ratio);
- SDL_ShowCursor(0);
+ SDL_ShowCursor(SDL_DISABLE);
SDL_FillRect(surface, NULL, 0);
SDL_Flip(surface);
SDL_FillRect(surface, NULL, 0);
@@ -57,7 +57,7 @@ mogltk::base::base(int w, int h, int flags, int) : surface(0) {
width = w;
height = h;
- SDL_ShowCursor(0);
+ SDL_ShowCursor(SDL_DISABLE);
}
void mogltk::base::setsurface(SDL_Surface * _surface) throw (GeneralException) {
diff --git a/lib/glsprite.cc b/lib/glsprite.cc
index 01faada..3ccb2bd 100644
--- a/lib/glsprite.cc
+++ b/lib/glsprite.cc
@@ -21,9 +21,11 @@ void mogltk::glSprite::draw(int dx, int dy, ColorP c) {
if (!was2D)
mogltk::engine::glbase_o->Enter2DMode();
-
+
+ printm(M_INFO, "Drawing gl Sprite at %i %i\n", dx, dy);
c.Bind();
+ printm(M_INFO, "Drawing sprite texture...\n");
Bind();
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2i(GetPX() , GetPY() ); glVertex2i(dx , dy );
diff --git a/lib/sprite.cc b/lib/sprite.cc
index 74ea522..7e94ce5 100644
--- a/lib/sprite.cc
+++ b/lib/sprite.cc
@@ -52,9 +52,7 @@ void mogltk::Sprite::alloc() {
}
if (!found) {
-#ifdef DEBUG
printm(M_INFO, "Allocating a new texture for sprites\n");
-#endif
posx = posy = 0;
p = new TexList(TEXSIZE);
}
@@ -66,7 +64,7 @@ mogltk::Sprite::TexList::TexList(int size) {
tex = new texture(size, size, true);
if (header)
- header->next->prev = this;
+ header->prev = this;
prev = 0;
next = header;
header = this;
@@ -142,7 +140,7 @@ void mogltk::Sprite::draw(int dx, int dy, ColorP c) {
src.x = posx; src.y = posy; src.w = sx; src.h = sy;
dst.x = dx; dst.y = dy; dst.w = sx; dst.h = sy;
- printm(M_INFO, "Drawing sprite at %i %i\n", dx, dy);
+ printm(M_INFO, "Drawing SDL sprite at %i %i\n", dx, dy);
SDL_BlitSurface(tlist->GetSurface(), &src, mogltk::engine::base_o->getsurface(), &dst);