From dc52203d0151a1b775700a53e053b9dadea57c85 Mon Sep 17 00:00:00 2001 From: ghaushe Date: Wed, 8 Jan 2003 14:26:13 +0000 Subject: [PATCH] minor PCMenu fixes from Nic, fOSSiL, and PhracturedBlue git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@537 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/planets/lander.c | 2 -- sc2/src/sc2code/planets/scan.c | 1 + sc2/src/sc2code/sis.c | 17 +++++++++++++---- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 5843e1f26..934a8f940 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.2: +- Minor fixes to PCMenu by fOSSiL, Nic, PhracturedBlue - Updated mingw support with better directions, and easier build -PBlue - PCMenus now suports 'settings', and menu font is correct -PhracturedBlue - Added '-b' option to get PC Menus -PhracturedBlue diff --git a/sc2/src/sc2code/planets/lander.c b/sc2/src/sc2code/planets/lander.c index 608c3e505..1da11bd87 100644 --- a/sc2/src/sc2code/planets/lander.c +++ b/sc2/src/sc2code/planets/lander.c @@ -1538,8 +1538,6 @@ InitPlanetSide (void) SetContext (OldContext); - ClearSISRect (CLEAR_SIS_RADAR); - ClearSemaphore (GraphicsSem); SET_GAME_STATE (PLANETARY_LANDING, 1); diff --git a/sc2/src/sc2code/planets/scan.c b/sc2/src/sc2code/planets/scan.c index 2b2037c7b..1b595d52d 100644 --- a/sc2/src/sc2code/planets/scan.c +++ b/sc2/src/sc2code/planets/scan.c @@ -996,6 +996,7 @@ DoScan (INPUT_STATE InputState, PMENU_STATE fuel_required / FUEL_TANK_SCALE, ((fuel_required % FUEL_TANK_SCALE) + 5) / 10); SetSemaphore (GraphicsSem); + ClearSISRect (CLEAR_SIS_RADAR); DrawStatusMessage (buf); ClearSemaphore (GraphicsSem); diff --git a/sc2/src/sc2code/sis.c b/sc2/src/sc2code/sis.c index 88c9f9fc4..6efe7463e 100644 --- a/sc2/src/sc2code/sis.c +++ b/sc2/src/sc2code/sis.c @@ -1034,8 +1034,15 @@ SetFlashRect (PRECT pRect, FRAME f) else { //Don't flash when using the PC menu - if (optPCmenu) + if (optPCmenu) { + if (flash_task) + { + ClearSemaphore (GraphicsSem); + ConcludeTask (flash_task); + SetSemaphore (GraphicsSem); + } return; + } OldContext = SetContext (StatusContext); GetContextClipRect (&clip_r); pRect = &temp_r; @@ -1148,7 +1155,7 @@ static char menu_string[][11] = { "music", "cyborg", "captain", - "ship", + "flagship", "exit menu" }; @@ -1179,6 +1186,8 @@ DrawPCMenu (BYTE beg_index, BYTE end_index, BYTE NewState, BYTE hilite, RECT *r) t.baseline.y = r->corner.y + PC_MENU_HEIGHT -1; t.pStr = buf; t.CharCount = (COUNT)~0; + r->corner.x++; + r->extent.width -= 2; SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x15, 0x15), 0x08)); for (i = beg_index; i <= end_index; i++) { @@ -1186,8 +1195,8 @@ DrawPCMenu (BYTE beg_index, BYTE end_index, BYTE NewState, BYTE hilite, RECT *r) if (hilite && pos == i) { SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x1F), 0x08)); - r->corner.y = t.baseline.y - PC_MENU_HEIGHT + 1; - r->extent.height = PC_MENU_HEIGHT; + r->corner.y = t.baseline.y - PC_MENU_HEIGHT + 2; + r->extent.height = PC_MENU_HEIGHT - 1; DrawFilledRectangle (r); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x0A, 0x1F, 0x1F), 0x08)); DrawText (&t);