From 4c0d125091e3b2b41719b3d0e3692672a1505a75 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sun, 11 May 2003 23:19:04 +0000 Subject: [PATCH] Mini-map in hspace/qspace now has borders too (bug #307 part 4) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@959 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 +- sc2/src/sc2code/hyper.c | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index a29d9f4a0..38ab57ee8 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -3,7 +3,7 @@ Changes towards version 0.3: - Two dialogue spots where visit count could run away patched; fixes bug #333, from Stas Sergeev - EventHandler checks CurStarDescPtr before dereferencing it (bug #347) -- Oscilloscope now has borders (bug #307 part 4) -Mika +- Oscilloscope/mini-map now has borders (bug #307 part 4) -Mika - Flashing rects are no longer constrained to even-numbered pixels on the y axis; fixes bug #255, from Nic - Fixed minor glitches in main window borders (bug #307 parts 1,2,3) -Mika diff --git a/sc2/src/sc2code/hyper.c b/sc2/src/sc2code/hyper.c index 00b2bd92a..efb7d6e98 100644 --- a/sc2/src/sc2code/hyper.c +++ b/sc2/src/sc2code/hyper.c @@ -1520,7 +1520,40 @@ SeedUniverse (void) s.origin.y = RADAR_HEIGHT >> 1; s.frame = blip_frame; DrawStamp (&s); - + + { + // draws borders to mini-map + + RECT r; + SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xE, 0xE, 0xE), 0x00)); + r.corner.x = 0; + r.corner.y = 0; + r.extent.width = RADAR_WIDTH - 1; + r.extent.height = 1; + DrawFilledRectangle (&r); + r.extent.width = 1; + r.extent.height = RADAR_HEIGHT - 1; + DrawFilledRectangle (&r); + + SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x6, 0x6, 0x6), 0x00)); + r.corner.x = RADAR_WIDTH - 1; + r.corner.y = 1; + r.extent.height = RADAR_HEIGHT - 1; + DrawFilledRectangle (&r); + r.corner.x = 1; + r.corner.y = RADAR_HEIGHT - 1; + r.extent.width = RADAR_WIDTH - 2; + r.extent.height = 1; + DrawFilledRectangle (&r); + + SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x8, 0x8, 0x8), 0x00)); + r.corner.x = 0; + DrawPoint (&r.corner); + r.corner.x = RADAR_WIDTH - 1; + r.corner.y = 0; + DrawPoint (&r.corner); + } + UnbatchGraphics (); SetContext (StatusContext);