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
This commit is contained in:
ghaushe
2003-01-08 14:26:13 +00:00
parent b1c28f2a41
commit dc52203d01
4 changed files with 15 additions and 6 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.2: Changes towards version 0.2:
- Minor fixes to PCMenu by fOSSiL, Nic, PhracturedBlue
- Updated mingw support with better directions, and easier build -PBlue - Updated mingw support with better directions, and easier build -PBlue
- PCMenus now suports 'settings', and menu font is correct -PhracturedBlue - PCMenus now suports 'settings', and menu font is correct -PhracturedBlue
- Added '-b' option to get PC Menus -PhracturedBlue - Added '-b' option to get PC Menus -PhracturedBlue
-2
View File
@@ -1538,8 +1538,6 @@ InitPlanetSide (void)
SetContext (OldContext); SetContext (OldContext);
ClearSISRect (CLEAR_SIS_RADAR);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
SET_GAME_STATE (PLANETARY_LANDING, 1); SET_GAME_STATE (PLANETARY_LANDING, 1);
+1
View File
@@ -996,6 +996,7 @@ DoScan (INPUT_STATE InputState, PMENU_STATE
fuel_required / FUEL_TANK_SCALE, fuel_required / FUEL_TANK_SCALE,
((fuel_required % FUEL_TANK_SCALE) + 5) / 10); ((fuel_required % FUEL_TANK_SCALE) + 5) / 10);
SetSemaphore (GraphicsSem); SetSemaphore (GraphicsSem);
ClearSISRect (CLEAR_SIS_RADAR);
DrawStatusMessage (buf); DrawStatusMessage (buf);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
+13 -4
View File
@@ -1034,8 +1034,15 @@ SetFlashRect (PRECT pRect, FRAME f)
else else
{ {
//Don't flash when using the PC menu //Don't flash when using the PC menu
if (optPCmenu) if (optPCmenu) {
if (flash_task)
{
ClearSemaphore (GraphicsSem);
ConcludeTask (flash_task);
SetSemaphore (GraphicsSem);
}
return; return;
}
OldContext = SetContext (StatusContext); OldContext = SetContext (StatusContext);
GetContextClipRect (&clip_r); GetContextClipRect (&clip_r);
pRect = &temp_r; pRect = &temp_r;
@@ -1148,7 +1155,7 @@ static char menu_string[][11] = {
"music", "music",
"cyborg", "cyborg",
"captain", "captain",
"ship", "flagship",
"exit menu" "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.baseline.y = r->corner.y + PC_MENU_HEIGHT -1;
t.pStr = buf; t.pStr = buf;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
r->corner.x++;
r->extent.width -= 2;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x15, 0x15), 0x08)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x15, 0x15), 0x08));
for (i = beg_index; i <= end_index; i++) 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) if (hilite && pos == i)
{ {
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x1F), 0x08)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x0A, 0x0A, 0x1F), 0x08));
r->corner.y = t.baseline.y - PC_MENU_HEIGHT + 1; r->corner.y = t.baseline.y - PC_MENU_HEIGHT + 2;
r->extent.height = PC_MENU_HEIGHT; r->extent.height = PC_MENU_HEIGHT - 1;
DrawFilledRectangle (r); DrawFilledRectangle (r);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x0A, 0x1F, 0x1F), 0x08)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x0A, 0x1F, 0x1F), 0x08));
DrawText (&t); DrawText (&t);