aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/screen.h
diff options
context:
space:
mode:
authorMartin Kiewitz2010-05-15 14:17:50 +0000
committerMartin Kiewitz2010-05-15 14:17:50 +0000
commiteb2b3f352ed03dc7299ff6202e68a68116476aa9 (patch)
treebe15aec31d9d077ffc9760d4ee707d5e22d6503c /engines/sci/graphics/screen.h
parent59a255226f95d395cb73119ae2e04a3494d404a5 (diff)
downloadscummvm-rg350-eb2b3f352ed03dc7299ff6202e68a68116476aa9.tar.gz
scummvm-rg350-eb2b3f352ed03dc7299ff6202e68a68116476aa9.tar.bz2
scummvm-rg350-eb2b3f352ed03dc7299ff6202e68a68116476aa9.zip
SCI: adding upscaled hires mode 640x480 for kq6 and gk1, fixing valgrind error in GfxPortrait class, not using priority anymore when drawing hires cels (shouldnt be needed for kq6)
svn-id: r49040
Diffstat (limited to 'engines/sci/graphics/screen.h')
-rw-r--r--engines/sci/graphics/screen.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h
index f73b23a55d..bb8d1231d5 100644
--- a/engines/sci/graphics/screen.h
+++ b/engines/sci/graphics/screen.h
@@ -33,7 +33,7 @@
namespace Sci {
-#define SCI_SCREEN_MAXHEIGHT 400
+#define SCI_SCREEN_UPSCALEDMAXHEIGHT 200
enum GfxScreenUpscaledMode {
GFX_SCREEN_UPSCALED_DISABLED = 0,
@@ -58,7 +58,7 @@ enum GfxScreenMasks {
*/
class GfxScreen {
public:
- GfxScreen(ResourceManager *resMan, int16 width = 320, int16 height = 200, bool upscaledHires = false);
+ GfxScreen(ResourceManager *resMan, int16 width = 320, int16 height = 200, int upscaledHires = GFX_SCREEN_UPSCALED_DISABLED);
~GfxScreen();
uint16 getWidth() { return _width; }
@@ -82,7 +82,7 @@ public:
void drawLine(int16 left, int16 top, int16 right, int16 bottom, byte color, byte prio, byte control) {
drawLine(Common::Point(left, top), Common::Point(right, bottom), color, prio, control);
}
- bool getUpscaledHires() {
+ int getUpscaledHires() {
return _upscaledHires;
}
void putKanjiChar(Graphics::FontSJIS *commonFont, int16 x, int16 y, uint16 chr, byte color);
@@ -102,6 +102,8 @@ public:
void scale2x(byte *src, byte *dst, int16 srcWidth, int16 srcHeight);
+ void adjustToUpscaledCoordinates(int16 &y, int16 &x);
+
void dither(bool addToFlag);
void debugUnditherSetState(bool flag);
int16 *unditherGetMemorial();
@@ -138,7 +140,7 @@ private:
byte *_priorityScreen;
byte *_controlScreen;
- // this screen is the one that is actually displayed to the user. It may be 640x480 for japanese SCI1 games
+ // this screen is the one that is actually displayed to the user. It may be 640x400 for japanese SCI1 games
// SCI0 games may be undithered in here. Only read from this buffer for Save/ShowBits usage.
byte *_displayScreen;
@@ -148,7 +150,12 @@ private:
// this is a pointer to the currently active screen (changing it only required for debug purposes)
byte *_activeScreen;
- bool _upscaledHires;
+
+ // this variable defines, if upscaled hires is active and what upscaled mode is used
+ int _upscaledHires;
+
+ // this here holds a translation for vertical coordinates between native (visual) and actual (display) screen
+ int _upscaledMapping[SCI_SCREEN_UPSCALEDMAXHEIGHT + 1];
};
} // End of namespace Sci