[Scummvm-git-logs] scummvm master -> 521c3d838de3bc7436c4012dc99aad1e727527aa
bluegr
noreply at scummvm.org
Thu Feb 26 19:03:10 UTC 2026
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
8b1fd304a2 AGOS: Simon1 - More accurate Acorn cursor for Simon 1.
bed6af548b AGOS: Simon1 - Correct mapping for cursor palette.
25140ecc82 AGOS: Simon1 - Move the Acorn cursor in to graphics/riscoscursor.cpp/h
7dc239444f AGOS: Simon1 - Adjustments to common acorn cursor rendering.
6bb757574d AGOS: Simon1 - Acorn cursor palette is tiny.
d3426968d0 AGOS: Simon1 - Fix RISC OS cursor palette
9bc86f9709 AGOS - Simon 1 Acorn - Tidy up RiscOsCursor class
521c3d838d AGOS: Simon 1 Acorn - Code formatting convention sync for RiscOSCursor class members
Commit: 8b1fd304a28aed0022338aea227d205face99283
https://github.com/scummvm/scummvm/commit/8b1fd304a28aed0022338aea227d205face99283
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS: Simon1 - More accurate Acorn cursor for Simon 1.
Changed paths:
engines/agos/cursor.cpp
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 33ba34310d6..7498fdf3183 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -127,29 +127,18 @@ static const uint16 _common_moveLeft[32] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
-static const byte _simon1_acorn_cursor[11 * 22] = {
- 0xE6, 0xE6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE6, 0xE6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE6, 0xE5, 0xE6, 0xE6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 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FF, 0xFF, 0xE5, 0xE5, 0xE5,
};
static const byte _simon2_cursors[10][256] = {
@@ -800,7 +789,7 @@ void AGOSEngine_Simon1::initMouse() {
pal[0xE6 * 3 + 2] = 0xFF;
CursorMan.replaceCursorPalette(pal, 0, 256);
- CursorMan.replaceCursor(_simon1_acorn_cursor, 11, 22, 5, 1, 0xFF);
+ CursorMan.replaceCursor(_simon1_acorn_cursor, 11, 11, 5, 1, 0xFF);
return;
}
Commit: bed6af548b48c070eb3eb6bd3c390d4d20ae0cd0
https://github.com/scummvm/scummvm/commit/bed6af548b48c070eb3eb6bd3c390d4d20ae0cd0
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS: Simon1 - Correct mapping for cursor palette.
Changed paths:
engines/agos/cursor.cpp
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 7498fdf3183..300f03b1ec0 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -781,12 +781,12 @@ void AGOSEngine_Simon1::initMouse() {
memset(pal, 0, sizeof(pal));
pal[0xE5 * 3 + 0] = 0x00;
- pal[0xE5 * 3 + 1] = 0x00;
- pal[0xE5 * 3 + 2] = 0x99;
+ pal[0xE5 * 3 + 1] = 0xFF;
+ pal[0xE5 * 3 + 2] = 0xFF;
pal[0xE6 * 3 + 0] = 0x00;
- pal[0xE6 * 3 + 1] = 0xFF;
- pal[0xE6 * 3 + 2] = 0xFF;
+ pal[0xE6 * 3 + 1] = 0x00;
+ pal[0xE6 * 3 + 2] = 0x99;
CursorMan.replaceCursorPalette(pal, 0, 256);
CursorMan.replaceCursor(_simon1_acorn_cursor, 11, 11, 5, 1, 0xFF);
Commit: 25140ecc82e315216e50d75ceecea70770b3165b
https://github.com/scummvm/scummvm/commit/25140ecc82e315216e50d75ceecea70770b3165b
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS: Simon1 - Move the Acorn cursor in to graphics/riscoscursor.cpp/h
Changed paths:
A graphics/riscoscursor.cpp
A graphics/riscoscursor.h
engines/agos/cursor.cpp
graphics/module.mk
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 300f03b1ec0..33505522cd7 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -22,6 +22,7 @@
#include "common/endian.h"
#include "common/events.h"
+#include "graphics/riscoscursor.h"
#include "graphics/cursorman.h"
#include "agos/agos.h"
@@ -127,20 +128,6 @@ static const uint16 _common_moveLeft[32] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
-static const byte _simon1_acorn_cursor[11 * 11] = {
- 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xE5, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xE5, 0xE5, 0xE5,
- 0xE5, 0xE6, 0xE5, 0xE5, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE5, 0xE5, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE5, 0xE5,
-};
-
static const byte _simon2_cursors[10][256] = {
// cross hair
{ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xec,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
@@ -777,20 +764,13 @@ void AGOSEngine_Simon1::initMouse() {
AGOSEngine::initMouse();
if (getPlatform() == Common::kPlatformAcorn && ConfMan.getBool("use_system_cursor")) {
- byte pal[256 * 3];
- memset(pal, 0, sizeof(pal));
+ Graphics::Cursor *c = Graphics::makeRiscOSCursor();
- pal[0xE5 * 3 + 0] = 0x00;
- pal[0xE5 * 3 + 1] = 0xFF;
- pal[0xE5 * 3 + 2] = 0xFF;
+ CursorMan.replaceCursorPalette(c->getPalette(), c->getPaletteStartIndex(), c->getPaletteCount());
+ CursorMan.replaceCursor(c->getSurface(), c->getWidth(), c->getHeight(), c->getHotspotX(), c->getHotspotY(), c->getKeyColor());
- pal[0xE6 * 3 + 0] = 0x00;
- pal[0xE6 * 3 + 1] = 0x00;
- pal[0xE6 * 3 + 2] = 0x99;
-
- CursorMan.replaceCursorPalette(pal, 0, 256);
- CursorMan.replaceCursor(_simon1_acorn_cursor, 11, 11, 5, 1, 0xFF);
- return;
+ delete c;
+ return;
}
const uint16 *src = _common_mouseInfo;
diff --git a/graphics/module.mk b/graphics/module.mk
index f89a3063c55..2b7ecb44f63 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -51,6 +51,7 @@ MODULE_OBJS := \
pixelformat.o \
pm5544.o \
primitives.o \
+ riscoscursor.o \
renderer.o \
scalerplugin.o \
scaler/downscaler.o \
diff --git a/graphics/riscoscursor.cpp b/graphics/riscoscursor.cpp
new file mode 100644
index 00000000000..c6960b54919
--- /dev/null
+++ b/graphics/riscoscursor.cpp
@@ -0,0 +1,104 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "graphics/riscoscursor.h"
+#include "common/util.h"
+
+namespace Graphics {
+
+static const uint16 w = 11;
+static const uint16 h = 11;
+static const uint16 hotX = 0;
+static const uint16 hotY = 0;
+static const byte key = 0xFF;
+
+static const byte riscOSCursor[w * h] = {
+ 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xE5, 0xE6, 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xE5, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xE5, 0xFF, 0xFF,
+ 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5,
+ 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xE5, 0xE5, 0xE5,
+ 0xE5, 0xE6, 0xE5, 0xE5, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF, 0xFF, 0xFF,
+ 0xE5, 0xE5, 0xE5, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE5, 0xE5,
+};
+
+class RiscOSCursor : public Cursor {
+public:
+ RiscOSCursor() {
+ memset(_palette, 0, sizeof(_palette));
+
+ // 0xE5 = light blue
+ _palette[0xE5 * 3 + 0] = 0x00;
+ _palette[0xE5 * 3 + 1] = 0xFF;
+ _palette[0xE5 * 3 + 2] = 0xFF;
+
+ // 0xE6 = dark blue
+ _palette[0xE6 * 3 + 0] = 0x00;
+ _palette[0xE6 * 3 + 1] = 0x00;
+ _palette[0xE6 * 3 + 2] = 0x99;
+ }
+
+ uint16 getWidth() const override { return w; }
+ uint16 getHeight() const override { return h; }
+ uint16 getHotspotX() const override { return hotX; }
+ uint16 getHotspotY() const override { return hotY; }
+
+ const byte *getSurface() const override { return riscOSCursor; }
+ const byte *getPalette() const override { return _palette; }
+
+ byte getKeyColor() const override { return key; }
+ byte getPaletteStartIndex() const override { return 0; }
+ uint16 getPaletteCount() const override { return 256; }
+
+private:
+ byte _palette[256 * 3];
+};
+
+Cursor *makeRiscOSCursor() {
+ return new RiscOSCursor();
+}
+
+} // namespace Graphics
diff --git a/graphics/riscoscursor.h b/graphics/riscoscursor.h
new file mode 100644
index 00000000000..df4618d7464
--- /dev/null
+++ b/graphics/riscoscursor.h
@@ -0,0 +1,33 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef GRAPHICS_RISCOSCURSOR_H
+#define GRAPHICS_RISCOSCURSOR_H
+
+#include "graphics/cursor.h"
+
+namespace Graphics {
+
+Cursor *makeRiscOSCursor();
+
+} // namespace Graphics
+
+#endif
Commit: 7dc239444f1b7e543d94659bb41fd24722bcff86
https://github.com/scummvm/scummvm/commit/7dc239444f1b7e543d94659bb41fd24722bcff86
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS: Simon1 - Adjustments to common acorn cursor rendering.
Changed paths:
engines/agos/cursor.cpp
graphics/riscoscursor.cpp
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 33505522cd7..2833f26c91f 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -766,8 +766,7 @@ void AGOSEngine_Simon1::initMouse() {
if (getPlatform() == Common::kPlatformAcorn && ConfMan.getBool("use_system_cursor")) {
Graphics::Cursor *c = Graphics::makeRiscOSCursor();
- CursorMan.replaceCursorPalette(c->getPalette(), c->getPaletteStartIndex(), c->getPaletteCount());
- CursorMan.replaceCursor(c->getSurface(), c->getWidth(), c->getHeight(), c->getHotspotX(), c->getHotspotY(), c->getKeyColor());
+ CursorMan.replaceCursor(c);
delete c;
return;
diff --git a/graphics/riscoscursor.cpp b/graphics/riscoscursor.cpp
index c6960b54919..390a38839db 100644
--- a/graphics/riscoscursor.cpp
+++ b/graphics/riscoscursor.cpp
@@ -51,6 +51,7 @@ static const uint16 hotX = 0;
static const uint16 hotY = 0;
static const byte key = 0xFF;
+// Risc OS 3.11 cursor
static const byte riscOSCursor[w * h] = {
0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xE5, 0xE6, 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -94,7 +95,7 @@ public:
uint16 getPaletteCount() const override { return 256; }
private:
- byte _palette[256 * 3];
+ byte _palette[3];
};
Cursor *makeRiscOSCursor() {
Commit: 6bb757574d87bc72996ec8b48a6f99163810996f
https://github.com/scummvm/scummvm/commit/6bb757574d87bc72996ec8b48a6f99163810996f
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS: Simon1 - Acorn cursor palette is tiny.
Co-authored-by: Filippos Karapetis <bluegr at gmail.com>
Changed paths:
graphics/riscoscursor.cpp
diff --git a/graphics/riscoscursor.cpp b/graphics/riscoscursor.cpp
index 390a38839db..833bfc9ca07 100644
--- a/graphics/riscoscursor.cpp
+++ b/graphics/riscoscursor.cpp
@@ -92,7 +92,7 @@ public:
byte getKeyColor() const override { return key; }
byte getPaletteStartIndex() const override { return 0; }
- uint16 getPaletteCount() const override { return 256; }
+ uint16 getPaletteCount() const override { return 3; }
private:
byte _palette[3];
Commit: d3426968d0ca92c18ce5cc041979e244af58fb99
https://github.com/scummvm/scummvm/commit/d3426968d0ca92c18ce5cc041979e244af58fb99
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS: Simon1 - Fix RISC OS cursor palette
Changed paths:
graphics/riscoscursor.cpp
diff --git a/graphics/riscoscursor.cpp b/graphics/riscoscursor.cpp
index 833bfc9ca07..38777c617c5 100644
--- a/graphics/riscoscursor.cpp
+++ b/graphics/riscoscursor.cpp
@@ -49,53 +49,43 @@ static const uint16 w = 11;
static const uint16 h = 11;
static const uint16 hotX = 0;
static const uint16 hotY = 0;
-static const byte key = 0xFF;
+static const byte key = 0;
-// Risc OS 3.11 cursor
+// Palette: transparent, light blue, dark blue
+static const byte riscOSPalette[3 * 3] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0xFF, 0xFF,
+ 0x00, 0x00, 0x99
+};
+
+// 11 x 11 RISC OS 3.11 cursor
static const byte riscOSCursor[w * h] = {
- 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xE5, 0xFF, 0xFF,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5,
- 0xE5, 0xE6, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5, 0xE5, 0xE5, 0xE5, 0xE5,
- 0xE5, 0xE6, 0xE5, 0xE5, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF, 0xFF, 0xFF,
- 0xE5, 0xE5, 0xE5, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE6, 0xE6, 0xE5,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xE5, 0xE5,
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0,
+ 1, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0,
+ 1, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0,
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
+ 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
+ 1, 2, 1, 1, 1, 2, 2, 1, 0, 0, 0,
+ 1, 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, 0, 1, 2, 2, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1
};
class RiscOSCursor : public Cursor {
public:
- RiscOSCursor() {
- memset(_palette, 0, sizeof(_palette));
-
- // 0xE5 = light blue
- _palette[0xE5 * 3 + 0] = 0x00;
- _palette[0xE5 * 3 + 1] = 0xFF;
- _palette[0xE5 * 3 + 2] = 0xFF;
-
- // 0xE6 = dark blue
- _palette[0xE6 * 3 + 0] = 0x00;
- _palette[0xE6 * 3 + 1] = 0x00;
- _palette[0xE6 * 3 + 2] = 0x99;
- }
-
uint16 getWidth() const override { return w; }
uint16 getHeight() const override { return h; }
uint16 getHotspotX() const override { return hotX; }
uint16 getHotspotY() const override { return hotY; }
const byte *getSurface() const override { return riscOSCursor; }
- const byte *getPalette() const override { return _palette; }
+ const byte *getPalette() const override { return riscOSPalette; }
byte getKeyColor() const override { return key; }
byte getPaletteStartIndex() const override { return 0; }
uint16 getPaletteCount() const override { return 3; }
-
-private:
- byte _palette[3];
};
Cursor *makeRiscOSCursor() {
Commit: 9bc86f97096113c1949150f206e6f22b904cee5b
https://github.com/scummvm/scummvm/commit/9bc86f97096113c1949150f206e6f22b904cee5b
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS - Simon 1 Acorn - Tidy up RiscOsCursor class
Changed paths:
graphics/riscoscursor.cpp
diff --git a/graphics/riscoscursor.cpp b/graphics/riscoscursor.cpp
index 38777c617c5..08f9aa5a31b 100644
--- a/graphics/riscoscursor.cpp
+++ b/graphics/riscoscursor.cpp
@@ -45,21 +45,40 @@
namespace Graphics {
-static const uint16 w = 11;
-static const uint16 h = 11;
-static const uint16 hotX = 0;
-static const uint16 hotY = 0;
-static const byte key = 0;
+class RiscOSCursor : public Cursor {
+public:
+ uint16 getWidth() const override { return w; }
+ uint16 getHeight() const override { return h; }
+ uint16 getHotspotX() const override { return hotX; }
+ uint16 getHotspotY() const override { return hotY; }
+
+ const byte *getSurface() const override { return riscOSCursor; }
+ const byte *getPalette() const override { return riscOSPalette; }
+
+ byte getKeyColor() const override { return key; }
+ byte getPaletteStartIndex() const override { return 0; }
+ uint16 getPaletteCount() const override { return 3; }
+
+private:
+ static const uint16 w = 11;
+ static const uint16 h = 11;
+ static const uint16 hotX = 0;
+ static const uint16 hotY = 0;
+ static const byte key = 0;
+
+ static const byte riscOSPalette[3 * 3];
+ static const byte riscOSCursor[w * h];
+};
// Palette: transparent, light blue, dark blue
-static const byte riscOSPalette[3 * 3] = {
+const byte RiscOSCursor::riscOSPalette[3 * 3] = {
0x00, 0x00, 0x00,
0x00, 0xFF, 0xFF,
0x00, 0x00, 0x99
};
// 11 x 11 RISC OS 3.11 cursor
-static const byte riscOSCursor[w * h] = {
+const byte RiscOSCursor::riscOSCursor[RiscOSCursor::w * RiscOSCursor::h] = {
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0,
1, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0,
@@ -73,21 +92,6 @@ static const byte riscOSCursor[w * h] = {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1
};
-class RiscOSCursor : public Cursor {
-public:
- uint16 getWidth() const override { return w; }
- uint16 getHeight() const override { return h; }
- uint16 getHotspotX() const override { return hotX; }
- uint16 getHotspotY() const override { return hotY; }
-
- const byte *getSurface() const override { return riscOSCursor; }
- const byte *getPalette() const override { return riscOSPalette; }
-
- byte getKeyColor() const override { return key; }
- byte getPaletteStartIndex() const override { return 0; }
- uint16 getPaletteCount() const override { return 3; }
-};
-
Cursor *makeRiscOSCursor() {
return new RiscOSCursor();
}
Commit: 521c3d838de3bc7436c4012dc99aad1e727527aa
https://github.com/scummvm/scummvm/commit/521c3d838de3bc7436c4012dc99aad1e727527aa
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T21:02:30+02:00
Commit Message:
AGOS: Simon 1 Acorn - Code formatting convention sync for RiscOSCursor class members
Changed paths:
graphics/riscoscursor.cpp
diff --git a/graphics/riscoscursor.cpp b/graphics/riscoscursor.cpp
index 08f9aa5a31b..603733c99b6 100644
--- a/graphics/riscoscursor.cpp
+++ b/graphics/riscoscursor.cpp
@@ -47,38 +47,38 @@ namespace Graphics {
class RiscOSCursor : public Cursor {
public:
- uint16 getWidth() const override { return w; }
- uint16 getHeight() const override { return h; }
- uint16 getHotspotX() const override { return hotX; }
- uint16 getHotspotY() const override { return hotY; }
+ uint16 getWidth() const override { return _w; }
+ uint16 getHeight() const override { return _h; }
+ uint16 getHotspotX() const override { return _hotX; }
+ uint16 getHotspotY() const override { return _hotY; }
- const byte *getSurface() const override { return riscOSCursor; }
- const byte *getPalette() const override { return riscOSPalette; }
+ const byte *getSurface() const override { return _riscOSCursor; }
+ const byte *getPalette() const override { return _riscOSPalette; }
- byte getKeyColor() const override { return key; }
+ byte getKeyColor() const override { return _key; }
byte getPaletteStartIndex() const override { return 0; }
uint16 getPaletteCount() const override { return 3; }
private:
- static const uint16 w = 11;
- static const uint16 h = 11;
- static const uint16 hotX = 0;
- static const uint16 hotY = 0;
- static const byte key = 0;
+ static const uint16 _w = 11;
+ static const uint16 _h = 11;
+ static const uint16 _hotX = 0;
+ static const uint16 _hotY = 0;
+ static const byte _key = 0;
- static const byte riscOSPalette[3 * 3];
- static const byte riscOSCursor[w * h];
+ static const byte _riscOSPalette[3 * 3];
+ static const byte _riscOSCursor[_w * _h];
};
// Palette: transparent, light blue, dark blue
-const byte RiscOSCursor::riscOSPalette[3 * 3] = {
+const byte RiscOSCursor::_riscOSPalette[3 * 3] = {
0x00, 0x00, 0x00,
0x00, 0xFF, 0xFF,
0x00, 0x00, 0x99
};
// 11 x 11 RISC OS 3.11 cursor
-const byte RiscOSCursor::riscOSCursor[RiscOSCursor::w * RiscOSCursor::h] = {
+const byte RiscOSCursor::_riscOSCursor[RiscOSCursor::_w * RiscOSCursor::_h] = {
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0,
1, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0,
More information about the Scummvm-git-logs
mailing list