Maelstrom: Add a visible border to the game area

From 45bf0bcbf688dd485c195a1c4e3391b3973c3819 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 30 Mar 2026 21:24:05 -0700
Subject: [PATCH] Add a visible border to the game area

---
 game/game.cpp | 15 +++++++++++++++
 game/game.h   |  1 +
 2 files changed, 16 insertions(+)

diff --git a/game/game.cpp b/game/game.cpp
index 22bb599d..fa664783 100644
--- a/game/game.cpp
+++ b/game/game.cpp
@@ -507,6 +507,8 @@ GamePanelDelegate::OnDraw(DRAWLEVEL drawLevel)
 		gPlayers[i]->BlitSprite();
 	}
 
+	DrawBorder();
+
 	if (m_zoom) {
 		StopZoomedDrawing();
 	}
@@ -652,6 +654,19 @@ GamePanelDelegate::StopZoomedDrawing()
 	screen->SetLogicalSize(ui->X() + ui->Width() + ui->X(), ui->Y() + ui->Height() + ui->Y());
 }
 
+void
+GamePanelDelegate::DrawBorder()
+{
+	SDL_Rect rect;
+
+	screen->GetClip(&rect);
+	rect.x -= 1;
+	rect.y -= 1;
+	rect.w += 2;
+	rect.h += 2;
+	screen->DrawRect(rect.x, rect.y, rect.w, rect.h, screen->MapRGB(0x9C, 0x9C, 0xFF));
+}
+
 /* ----------------------------------------------------------------- */
 /* -- Draw the status display */
 
diff --git a/game/game.h b/game/game.h
index 9839d7c7..4a9c87b9 100644
--- a/game/game.h
+++ b/game/game.h
@@ -46,6 +46,7 @@ class GamePanelDelegate : public UIPanelDelegate
 	void StopZoom();
 	void StartZoomedDrawing();
 	void StopZoomedDrawing();
+	void DrawBorder();
 	void DrawStatus(Bool first);
 	bool UpdateGameState();
 	void DoHousekeeping();