aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-03 22:23:02 +0200
committerEugene Sandulenko2016-09-03 22:56:09 +0200
commit302562de3800e46ff2c07cad4eaef5b13c039776 (patch)
tree65718ed807ab54fd14ebaf7ab08d0b0e189ffa8d /engines
parentf8fc43be99aae36110b22f2016c9d62f1df2bd28 (diff)
downloadscummvm-rg350-302562de3800e46ff2c07cad4eaef5b13c039776.tar.gz
scummvm-rg350-302562de3800e46ff2c07cad4eaef5b13c039776.tar.bz2
scummvm-rg350-302562de3800e46ff2c07cad4eaef5b13c039776.zip
TESTBED: Added mouse cursor
Diffstat (limited to 'engines')
-rw-r--r--engines/testbed/graphics.cpp24
-rw-r--r--engines/testbed/graphics.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index 43580104e7..4943a42284 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -47,6 +47,7 @@ GFXTestSuite::GFXTestSuite() {
// Init Mouse Palette (White-black-yellow)
GFXtests::initMousePalette();
+ GFXtests::initMouseCursor();
// Add tests here
@@ -103,6 +104,29 @@ void GFXtests::initMousePalette() {
CursorMan.replaceCursorPalette(palette, 0, 3);
}
+static const byte MOUSECURSOR_SCI[] = {
+ 1,1,0,0,0,0,0,0,0,0,0,
+ 1,2,1,0,0,0,0,0,0,0,0,
+ 1,2,2,1,0,0,0,0,0,0,0,
+ 1,2,2,2,1,0,0,0,0,0,0,
+ 1,2,2,2,2,1,0,0,0,0,0,
+ 1,2,2,2,2,2,1,0,0,0,0,
+ 1,2,2,2,2,2,2,1,0,0,0,
+ 1,2,2,2,2,2,2,2,1,0,0,
+ 1,2,2,2,2,2,2,2,2,1,0,
+ 1,2,2,2,2,2,2,2,2,2,1,
+ 1,2,2,2,2,2,1,0,0,0,0,
+ 1,2,1,0,1,2,2,1,0,0,0,
+ 1,1,0,0,1,2,2,1,0,0,0,
+ 0,0,0,0,0,1,2,2,1,0,0,
+ 0,0,0,0,0,1,2,2,1,0,0,
+ 0,0,0,0,0,0,1,2,2,1,0
+};
+
+void GFXtests::initMouseCursor() {
+ CursorMan.replaceCursor(MOUSECURSOR_SCI, 11, 16, 0, 0, 0);
+}
+
Common::Rect GFXtests::computeSize(const Common::Rect &cursorRect, int scalingFactor, int cursorTargetScale) {
if (cursorTargetScale == 1 || scalingFactor == 1) {
// Game data and cursor would be scaled equally.
diff --git a/engines/testbed/graphics.h b/engines/testbed/graphics.h
index 139eeb97dd..ebb7b40be8 100644
--- a/engines/testbed/graphics.h
+++ b/engines/testbed/graphics.h
@@ -33,6 +33,7 @@ namespace GFXtests {
void drawEllipse(int x, int y, int a, int b);
void setupMouseLoop(bool disableCursorPalette = false, const char *gfxModeName = "", int cursorTargetScale = 1);
void initMousePalette();
+void initMouseCursor();
Common::Rect computeSize(const Common::Rect &cursorRect, int scalingFactor, int cursorTargetScale);
void HSVtoRGB(int &rComp, int &gComp, int &bComp, int hue, int sat, int val);
Common::Rect drawCursor(bool cursorPaletteDisabled = false, int cursorTargetScale = 1);