[Scummvm-git-logs] scummvm master -> 7bc544c5b6b15ec14cebf60328a7a31d2f916ab7
neuromancer
noreply at scummvm.org
Wed Jun 3 19:38:20 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
7bc544c5b6 SCUMM: RA2: implemented special monitor effect in level 12
Commit: 7bc544c5b6b15ec14cebf60328a7a31d2f916ab7
https://github.com/scummvm/scummvm/commit/7bc544c5b6b15ec14cebf60328a7a31d2f916ab7
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-06-03T21:37:41+02:00
Commit Message:
SCUMM: RA2: implemented special monitor effect in level 12
Changed paths:
engines/scumm/insane/rebel2/rebel.h
engines/scumm/insane/rebel2/render.cpp
diff --git a/engines/scumm/insane/rebel2/rebel.h b/engines/scumm/insane/rebel2/rebel.h
index 645596603c4..913e4465656 100644
--- a/engines/scumm/insane/rebel2/rebel.h
+++ b/engines/scumm/insane/rebel2/rebel.h
@@ -613,6 +613,7 @@ public:
// Update target lock state and draw crosshair/reticle
void renderCrosshair(byte *renderBitmap, int pitch, int width, int height);
+ void renderHandler8MonitorEffect(byte *renderBitmap, int pitch, int width, int height);
void renderHandler8PovOverlay(byte *renderBitmap, int pitch, int width, int height);
Common::Point getHandler7ShipDrawPoint();
Common::Point getHandler7ProjectedPoint();
diff --git a/engines/scumm/insane/rebel2/render.cpp b/engines/scumm/insane/rebel2/render.cpp
index 5eae883192b..1f821621e41 100644
--- a/engines/scumm/insane/rebel2/render.cpp
+++ b/engines/scumm/insane/rebel2/render.cpp
@@ -2599,6 +2599,9 @@ void InsaneRebel2::renderGameplayPostFrame(byte *renderBitmap, int pitch, int wi
// Crosshair/reticle (FUN_004089ab, FUN_0040d836).
renderCrosshair(renderBitmap, pitch, width, height);
+ // Handler 8 monitor scanline effect (FUN_0041C6EC/FUN_0041C6C3).
+ renderHandler8MonitorEffect(renderBitmap, pitch, width, height);
+
// Handler 8 POV text overlay (FUN_00401CCF).
renderHandler8PovOverlay(renderBitmap, pitch, width, height);
@@ -4242,6 +4245,40 @@ void InsaneRebel2::renderHandler25LaserShots(byte *renderBitmap, int pitch, int
}
}
+// renderHandler8MonitorEffect -- Level 12 POV monitor scanline effect.
+void InsaneRebel2::renderHandler8MonitorEffect(byte *renderBitmap, int pitch, int width, int height) {
+ if (_rebelHandler != 8 || !renderBitmap)
+ return;
+
+ const bool highRes = (width >= 640 || height >= 400);
+ const int effectWidth = MIN<int>(MIN<int>(width, pitch), highRes ? 640 : 320);
+ const int effectHeight = MIN<int>(height, highRes ? 360 : 180);
+ if (effectWidth <= 0 || effectHeight <= 1)
+ return;
+
+ if (highRes) {
+ // FUN_0041C6C3/FUN_00413EC2: fill every other gameplay row with color 4.
+ for (int y = 1; y < effectHeight; y += 2) {
+ byte *row = renderBitmap + y * pitch;
+ memset(row, 4, effectWidth);
+ }
+ return;
+ }
+
+ if (_rebelDetailMode <= 0)
+ return;
+
+ // FUN_0041C6EC/FUN_00413EFC: remap every other gameplay row through
+ // FUN_00410721()+0x400. ScummVM uses the primary edge table, matching
+ // DAT_0047a81c == 0.
+ const byte *monitorTable = _edgeTable + 0x400;
+ for (int y = 1; y < effectHeight; y += 2) {
+ byte *row = renderBitmap + y * pitch;
+ for (int x = 0; x < effectWidth; x++)
+ row[x] = monitorTable[row[x]];
+ }
+}
+
// renderHandler8PovOverlay -- Draw Level 12 POV text overlay (FUN_00401CCF).
void InsaneRebel2::renderHandler8PovOverlay(byte *renderBitmap, int pitch, int width, int height) {
if (_rebelHandler != 8 || !renderBitmap || !_smush_talkfontNut || !_smush_povfontNut)
More information about the Scummvm-git-logs
mailing list