aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorMax Horn2010-06-28 11:19:45 +0000
committerMax Horn2010-06-28 11:19:45 +0000
commitdb2d41a4332c6c2a468f4460a23189a750fb8616 (patch)
treed62437571550629c2da59cc9aef22a977040a026 /engines/sci/graphics
parent4016bdfd271be8f20d6da5bbfad982d2fb7fa24d (diff)
downloadscummvm-rg350-db2d41a4332c6c2a468f4460a23189a750fb8616.tar.gz
scummvm-rg350-db2d41a4332c6c2a468f4460a23189a750fb8616.tar.bz2
scummvm-rg350-db2d41a4332c6c2a468f4460a23189a750fb8616.zip
SCI: Make src param of GfxScreen::scale2x const
svn-id: r50420
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/screen.cpp4
-rw-r--r--engines/sci/graphics/screen.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index ca8a8880b7..519020f3a1 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -583,9 +583,9 @@ void GfxScreen::debugShowMap(int mapNo) {
copyToScreen();
}
-void GfxScreen::scale2x(byte *src, byte *dst, int16 srcWidth, int16 srcHeight) {
+void GfxScreen::scale2x(const byte *src, byte *dst, int16 srcWidth, int16 srcHeight) {
int newWidth = srcWidth * 2;
- byte *srcPtr = src;
+ const byte *srcPtr = src;
for (int y = 0; y < srcHeight; y++) {
for (int x = 0; x < srcWidth; x++) {
diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h
index d64c2541ec..c1e10fabc8 100644
--- a/engines/sci/graphics/screen.h
+++ b/engines/sci/graphics/screen.h
@@ -50,7 +50,9 @@ enum GfxScreenMasks {
GFX_SCREEN_MASK_ALL = GFX_SCREEN_MASK_VISUAL|GFX_SCREEN_MASK_PRIORITY|GFX_SCREEN_MASK_CONTROL
};
-#define SCI_SCREEN_UNDITHERMEMORIAL_SIZE 256
+enum {
+ SCI_SCREEN_UNDITHERMEMORIAL_SIZE = 256
+};
/**
* Screen class, actually creates 3 (4) screens internally - which is visual/display (for the user),
@@ -104,7 +106,7 @@ public:
void setVerticalShakePos(uint16 shakePos);
- void scale2x(byte *src, byte *dst, int16 srcWidth, int16 srcHeight);
+ void scale2x(const byte *src, byte *dst, int16 srcWidth, int16 srcHeight);
void adjustToUpscaledCoordinates(int16 &y, int16 &x);