summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index 4e91d281..e96137c4 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -281,19 +281,8 @@ void CompoundSprite::redraw() const
{
mWidth = at(0)->getWidth();
mHeight = at(0)->getHeight();
-
- // Temporary fix for position
- Map *map = Game::instance() ? Game::instance()->getCurrentMap() : 0;
- if (map)
- {
- mOffsetX = map->getTileWidth() / 2;
- mOffsetY = map->getTileHeight();
- }
- else // Char selection screen fix
- {
- mOffsetX = 16;
- mOffsetY = 32;
- }
+ mOffsetX = 0;
+ mOffsetY = 0;
mNeedsRedraw = false;
return;
}
@@ -326,18 +315,6 @@ void CompoundSprite::redraw() const
mOffsetX -= posX;
mOffsetY -= posY;
- Map *map = Game::instance() ? Game::instance()->getCurrentMap() : 0;
- if (map)
- {
- mOffsetX += map->getTileWidth() / 2;
- mOffsetY += map->getTileHeight();
- }
- else // Char selection screen fix
- {
- mOffsetX += 16;
- mOffsetY += 32;
- }
-
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
int rmask = 0xff000000;
int gmask = 0x00ff0000;
@@ -369,6 +346,12 @@ void CompoundSprite::redraw() const
s->draw(graphics, posX - s->getWidth() / 2, posY - s->getHeight());
}
+ // Uncomment to see buffer sizes
+ /*graphics->fillRectangle(gcn::Rectangle(0, 0, 3, 3));
+ graphics->fillRectangle(gcn::Rectangle(mWidth - 3, 0, 3, 3));
+ graphics->fillRectangle(gcn::Rectangle(mWidth - 3, mHeight - 3, 3, 3));
+ graphics->fillRectangle(gcn::Rectangle(0, mHeight - 3, 3, 3));*/
+
delete graphics;
SDL_Surface *surfaceA = SDL_CreateRGBSurface(SDL_HWSURFACE, mWidth, mHeight,