summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 10:13:40 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 10:13:40 +0100
commiteb2e62609992ab8b47f8805f2bc2cafce271b66f (patch)
tree58d6c387f910e3a3348a6528127f4216b524ec57 /src/compoundsprite.cpp
parent05dc1666dc794ed6aa7f6568b768c652f8922c4e (diff)
parent8d06606835e3d01f537ebe96de8b216e64a1f969 (diff)
downloadmana-eb2e62609992ab8b47f8805f2bc2cafce271b66f.tar.gz
mana-eb2e62609992ab8b47f8805f2bc2cafce271b66f.tar.bz2
mana-eb2e62609992ab8b47f8805f2bc2cafce271b66f.tar.xz
mana-eb2e62609992ab8b47f8805f2bc2cafce271b66f.zip
Merge branch 'master' into lpc2012lpc2012
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index cd07ca51..0f231535 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -20,7 +20,6 @@
#include "compoundsprite.h"
-#include "game.h"
#include "graphics.h"
#include "map.h"
@@ -223,6 +222,7 @@ int CompoundSprite::getDuration() const
return duration;
}
+#if 0
static void updateValues(int &dimension, int &pos, int imgDimUL, int imgDimRD, int imgOffset)
{
// Handle going beyond the left/up
@@ -238,11 +238,18 @@ static void updateValues(int &dimension, int &pos, int imgDimUL, int imgDimRD, i
if (temp > dimension)
dimension = temp;
}
-
-#include "localplayer.h"
+#endif
void CompoundSprite::redraw() const
{
+#if 1 // TODO_SDL2: Does it make sense to implement CompoundSprite?
+ mWidth = mSprites.at(0)->getWidth();
+ mHeight = mSprites.at(0)->getHeight();
+ mOffsetX = 0;
+ mOffsetY = 0;
+ mNeedsRedraw = false;
+#else
+
#ifdef USE_OPENGL
// TODO OpenGL support
if (Image::getLoadAsOpenGL())
@@ -295,7 +302,7 @@ void CompoundSprite::redraw() const
int amask = 0xff000000;
#endif
- SDL_Surface *surface = SDL_CreateRGBSurface(SDL_HWSURFACE, mWidth, mHeight,
+ SDL_Surface *surface = SDL_CreateRGBSurface(0, mWidth, mHeight,
32, rmask, gmask, bmask, amask);
if (!surface)
@@ -322,7 +329,7 @@ void CompoundSprite::redraw() const
delete graphics;
- SDL_Surface *surfaceA = SDL_CreateRGBSurface(SDL_HWSURFACE, mWidth, mHeight,
+ SDL_Surface *surfaceA = SDL_CreateRGBSurface(0, mWidth, mHeight,
32, rmask, gmask, bmask, amask);
SDL_SetAlpha(surface, 0, SDL_ALPHA_OPAQUE);
@@ -338,4 +345,5 @@ void CompoundSprite::redraw() const
SDL_FreeSurface(surfaceA);
mNeedsRedraw = false;
+#endif
}