summaryrefslogtreecommitdiff
path: root/src/sdlgraphics.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-09 14:45:27 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-18 08:21:32 +0000
commiteb206d0a5a9b8d73b103c094e376c5e13cd4c218 (patch)
tree22b91f5bfd466e1894194822dfbef79550a6b0ef /src/sdlgraphics.cpp
parente7790891cf0bd6211b71d084044324a6e95573d8 (diff)
downloadmana-eb206d0a5a9b8d73b103c094e376c5e13cd4c218.tar.gz
mana-eb206d0a5a9b8d73b103c094e376c5e13cd4c218.tar.bz2
mana-eb206d0a5a9b8d73b103c094e376c5e13cd4c218.tar.xz
mana-eb206d0a5a9b8d73b103c094e376c5e13cd4c218.zip
Take only const pointers to images in Graphics
Helps making sure we're not modifying the images in the rendering code. Re-applies 4eea727b7649726670d8963d11ab4fd429624b3e (and reverts 363f71157a8107190b3bd2ba656faf0a0e63ab36).
Diffstat (limited to 'src/sdlgraphics.cpp')
-rw-r--r--src/sdlgraphics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sdlgraphics.cpp b/src/sdlgraphics.cpp
index d3ff72e2..37643190 100644
--- a/src/sdlgraphics.cpp
+++ b/src/sdlgraphics.cpp
@@ -106,7 +106,7 @@ void SDLGraphics::updateSize(int windowWidth, int windowHeight, float scale)
SDL_RenderSetScale(mRenderer, scaleX, scaleY);
}
-bool SDLGraphics::drawRescaledImage(Image *image,
+bool SDLGraphics::drawRescaledImage(const Image *image,
int srcX, int srcY,
int dstX, int dstY,
int width, int height,
@@ -136,7 +136,7 @@ bool SDLGraphics::drawRescaledImage(Image *image,
}
#if SDL_VERSION_ATLEAST(2, 0, 10)
-bool SDLGraphics::drawRescaledImageF(Image *image,
+bool SDLGraphics::drawRescaledImageF(const Image *image,
int srcX, int srcY,
float dstX, float dstY,
int width, int height,
@@ -166,7 +166,7 @@ bool SDLGraphics::drawRescaledImageF(Image *image,
}
#endif
-void SDLGraphics::drawRescaledImagePattern(Image *image,
+void SDLGraphics::drawRescaledImagePattern(const Image *image,
int x, int y,
int w, int h,
int scaledWidth,