slayne's fixes (planetary reports, melee team names, saving in planet

scan)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@324 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2002-12-04 19:04:30 +00:00
parent 596876279e
commit 1d70f2d8f4
3 changed files with 23 additions and 10 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ DrawMeleeFrame (STARSHIPPTR LastStarShipPtr, COUNT which_player)
r.extent.height = NAME_AREA_HEIGHT;
DrawFilledRectangle (&r);
t.align = ALIGN_CENTER;
t.pStr = pMeleeState->TeamImage[which_player].TeamName;
t.pStr = pMeleeState->TeamImage[1 - which_player].TeamName;
t.CharCount = (COUNT)~0;
SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0x1F), 0x9));
+17
View File
@@ -1171,6 +1171,7 @@ DoFlagshipCommands (INPUT_STATE InputState, PMENU_STATE pMS)
NewState = pMS->CurState;
if ((InputState & DEVICE_BUTTON1) || LastActivity == CHECK_LOAD)
{
CONTEXT OldContext;
if (NewState != SCAN + 1 && NewState != (ROSTER + 1) + 1)
{
SetSemaphore (GraphicsSem);
@@ -1219,6 +1220,22 @@ DoFlagshipCommands (INPUT_STATE InputState, PMENU_STATE pMS)
case ROSTER + 1:
if (GameOptions () == 0)
return (FALSE);
ClearSISRect(DRAW_SIS_DISPLAY);
DrawSISFrame();
RepairSISBorder();
DrawSISMessage(NULL_PTR);
DrawSISTitle(GLOBAL_SIS(PlanetName));
DrawStarBackGround(TRUE);
OldContext = SetContext(SpaceContext);
SetContextDrawState(DEST_PIXMAP | DRAW_REPLACE);
SetSemaphore(GraphicsSem);
BatchGraphics();
DrawPlanet(SIS_SCREEN_WIDTH - MAP_WIDTH, SIS_SCREEN_HEIGHT - MAP_HEIGHT, 0, 0);
UnbatchGraphics();
SetContext(OldContext);
ClearSemaphore(GraphicsSem);
// else
// DrawMenuStateStrings (PM_SCAN, ROSTER + 1);
break;
+5 -9
View File
@@ -26,7 +26,7 @@
extern FRAME SpaceJunkFrame;
static void
ClearReportArea (COUNT page_cells)
ClearReportArea ()
{
COUNT i;
RECT r;
@@ -48,11 +48,8 @@ ClearReportArea (COUNT page_cells)
}
SetPrimNextLink (&prim_row[i - 1], END_OF_LIST);
if (page_cells == 0)
{
SetContextBackGroundColor (BLACK_COLOR);
ClearDrawable ();
}
SetContextBackGroundColor (BLACK_COLOR);
ClearDrawable ();
SetContextClipping (FALSE);
for (i = 0; i < NUM_CELL_ROWS; ++i)
{
@@ -71,7 +68,7 @@ MakeReport (SOUND ReadOutSounds, UNICODE *pStr, COUNT StrLen)
BYTE ButtonState;
int end_page_len;
UNICODE last_c, end_page_buf[80];
COUNT row_cells, page_cells;
COUNT row_cells;
BOOLEAN Sleepy;
RECT r;
TEXT t;
@@ -87,7 +84,6 @@ MakeReport (SOUND ReadOutSounds, UNICODE *pStr, COUNT StrLen)
last_c = *pStr;
Sleepy = TRUE;
page_cells = 0;
ClearSemaphore (GraphicsSem);
FlushInput ();
@@ -198,7 +194,7 @@ InitPageCell:
SetSemaphore (GraphicsSem);
if (!Sleepy)
BatchGraphics ();
ClearReportArea (page_cells++);
ClearReportArea();
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0, 0x1F, 0), 0xFF));
if (Sleepy)
ClearSemaphore (GraphicsSem);