Renamed DrawText function to prevent name collisions in OSX - from peterb

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@548 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
ghaushe
2003-01-12 22:46:38 +00:00
parent 39ddda171e
commit 1d133995b5
22 changed files with 128 additions and 127 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.2: Changes towards version 0.2:
- Function name conflict fixes for Mac OSX -by peterb
- Minor fixes for pc-fonts (Outfit screen, gradient color swap) -by Nic - Minor fixes for pc-fonts (Outfit screen, gradient color swap) -by Nic
- DCQ is now accessed uniformly by routines in gfx_common.c - DCQ is now accessed uniformly by routines in gfx_common.c
- Fixed OpenGL colors on MacOS X -Mika - Fixed OpenGL colors on MacOS X -Mika
+10 -10
View File
@@ -152,7 +152,7 @@ add_text (int status, PTEXT pTextIn)
locText.CharCount = 1; locText.CharCount = 1;
ch = '*'; ch = '*';
locText.pStr = &ch; locText.pStr = &ch;
DrawText (&locText); font_DrawText (&locText);
locText = *pTextIn; locText = *pTextIn;
pText = &locText; pText = &locText;
@@ -203,7 +203,7 @@ add_text (int status, PTEXT pTextIn)
if (status <= 0) if (status <= 0)
{ {
if (pText->baseline.y < SIS_SCREEN_HEIGHT) if (pText->baseline.y < SIS_SCREEN_HEIGHT)
DrawText (pText); font_DrawText (pText);
pStr = pText->pStr + pText->CharCount; pStr = pText->pStr + pText->CharCount;
if(status < -4 && pText->baseline.y >= -status - 10) if(status < -4 && pText->baseline.y >= -status - 10)
@@ -217,24 +217,24 @@ add_text (int status, PTEXT pTextIn)
SetContextForeGroundColor (CommData.AlienTextBColor); SetContextForeGroundColor (CommData.AlienTextBColor);
--pText->baseline.x; --pText->baseline.x;
DrawText (pText); font_DrawText (pText);
++pText->baseline.x; ++pText->baseline.x;
--pText->baseline.y; --pText->baseline.y;
DrawText (pText); font_DrawText (pText);
++pText->baseline.x; ++pText->baseline.x;
++pText->baseline.y; ++pText->baseline.y;
DrawText (pText); font_DrawText (pText);
--pText->baseline.x; --pText->baseline.x;
++pText->baseline.y; ++pText->baseline.y;
DrawText (pText); font_DrawText (pText);
SetContextForeGroundColor (CommData.AlienTextFColor); SetContextForeGroundColor (CommData.AlienTextFColor);
--pText->baseline.y; --pText->baseline.y;
DrawText (pText); font_DrawText (pText);
pStr = pText->pStr + pText->CharCount; pStr = pText->pStr + pText->CharCount;
} }
@@ -290,12 +290,12 @@ DrawSISComWindow (void)
t.pStr = (UNICODE *)GetStringAddress (OldStrings); t.pStr = (UNICODE *)GetStringAddress (OldStrings);
t.CharCount = GetStringLength (OldStrings); t.CharCount = GetStringLength (OldStrings);
OldStrings = SetRelStringTableIndex (OldStrings, 1); OldStrings = SetRelStringTableIndex (OldStrings, 1);
DrawText (&t); font_DrawText (&t);
SetContextForeGroundColor (WHITE_COLOR); SetContextForeGroundColor (WHITE_COLOR);
t.pStr = (PBYTE)GetStringAddress (CreditStrings); t.pStr = (PBYTE)GetStringAddress (CreditStrings);
t.CharCount = GetStringLength (CreditStrings); t.CharCount = GetStringLength (CreditStrings);
CreditStrings = SetRelStringTableIndex (CreditStrings, 1); CreditStrings = SetRelStringTableIndex (CreditStrings, 1);
DrawText (&t); font_DrawText (&t);
if (j) if (j)
t.baseline.y += 12; t.baseline.y += 12;
@@ -628,7 +628,7 @@ FeedbackPlayerPhrase (UNICODE *pStr)
ct.pStr = GAME_STRING (FEEDBACK_STRING_BASE); ct.pStr = GAME_STRING (FEEDBACK_STRING_BASE);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xC, 0x1F), 0x48)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xC, 0x1F), 0x48));
DrawText (&ct); font_DrawText (&ct);
ct.baseline.y += 16; ct.baseline.y += 16;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x12, 0x14, 0x4F), 0x44)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x12, 0x14, 0x4F), 0x44));
ct.pStr = pStr; ct.pStr = pStr;
+15 -15
View File
@@ -231,11 +231,11 @@ SetSemaphore (GraphicsSem);
{ {
t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 0); t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 0);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += 12; t.baseline.y += 12;
t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 1); t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 1);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
else else
{ {
@@ -243,16 +243,16 @@ SetSemaphore (GraphicsSem);
t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 2); t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 2);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += 12; t.baseline.y += 12;
GetClusterName (CurStarDescPtr, buf); GetClusterName (CurStarDescPtr, buf);
t.pStr = buf; t.pStr = buf;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += 12; t.baseline.y += 12;
t.pStr = GLOBAL_SIS (PlanetName); t.pStr = GLOBAL_SIS (PlanetName);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
s.origin.x = SIS_SCREEN_WIDTH >> 1; s.origin.x = SIS_SCREEN_WIDTH >> 1;
@@ -383,8 +383,8 @@ DrawFadeText (UNICODE *str1, UNICODE *str2, BOOLEAN fade_in, PRECT
SetSemaphore (GraphicsSem); SetSemaphore (GraphicsSem);
SetContextForeGroundColor (fade_cycle[i]); SetContextForeGroundColor (fade_cycle[i]);
DrawText (&t1); font_DrawText (&t1);
DrawText (&t2); font_DrawText (&t2);
SleepThreadUntil (TimeIn + (ONE_SECOND / 20)); SleepThreadUntil (TimeIn + (ONE_SECOND / 20));
TimeIn = GetTimeCounter (); TimeIn = GetTimeCounter ();
} }
@@ -399,14 +399,14 @@ DrawFadeText (UNICODE *str1, UNICODE *str2, BOOLEAN fade_in, PRECT
SetSemaphore (GraphicsSem); SetSemaphore (GraphicsSem);
SetContextForeGroundColor (fade_cycle[i]); SetContextForeGroundColor (fade_cycle[i]);
DrawText (&t1); font_DrawText (&t1);
DrawText (&t2); font_DrawText (&t2);
SleepThreadUntil (TimeIn + (ONE_SECOND / 20)); SleepThreadUntil (TimeIn + (ONE_SECOND / 20));
TimeIn = GetTimeCounter (); TimeIn = GetTimeCounter ();
} }
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08));
DrawText (&t1); font_DrawText (&t1);
DrawText (&t2); font_DrawText (&t2);
} }
} }
@@ -560,11 +560,11 @@ UninitEncounter (void)
t.align = ALIGN_CENTER; t.align = ALIGN_CENTER;
t.pStr = buf; t.pStr = buf;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += 6; t.baseline.y += 6;
t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 3); t.pStr = GAME_STRING (ENCOUNTER_STRING_BASE + 3);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
ship_s.frame = FragPtr->ShipInfo.icons; ship_s.frame = FragPtr->ShipInfo.icons;
@@ -599,7 +599,7 @@ UninitEncounter (void)
SetContextForeGroundColor ( SetContextForeGroundColor (
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x18), 0x50) BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x18), 0x50)
); );
DrawText (&t); font_DrawText (&t);
DeltaSISGauges (0, 0, j); DeltaSISGauges (0, 0, j);
if ((VictoryState++ - 1) % MAX_DEAD_DISPLAYED) if ((VictoryState++ - 1) % MAX_DEAD_DISPLAYED)
@@ -681,7 +681,7 @@ UninitEncounter (void)
SetContextForeGroundColor ( SetContextForeGroundColor (
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x18), 0x50) BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x18), 0x50)
); );
DrawText (&t); font_DrawText (&t);
DrawFadeText ( DrawFadeText (
str1 = GAME_STRING (ENCOUNTER_STRING_BASE + 6), str1 = GAME_STRING (ENCOUNTER_STRING_BASE + 6),
+9 -9
View File
@@ -74,7 +74,7 @@ ConfirmSaveLoad (STAMP *MsgStamp)
BUILD_COLOR (MAKE_RGB15 (0x8, 0x8, 0x8), 0x1F), BUILD_COLOR (MAKE_RGB15 (0x8, 0x8, 0x8), 0x1F),
TRUE, BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08)); TRUE, BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08));
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x0F)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x14, 0x14, 0x14), 0x0F));
DrawText (&t); font_DrawText (&t);
} }
enum enum
@@ -228,7 +228,7 @@ DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state)
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
SetContextForeGroundColor (OldColor); SetContextForeGroundColor (OldColor);
} }
DrawText (&lf); font_DrawText (&lf);
} }
SetFlashRect (&r, (FRAME)0); SetFlashRect (&r, (FRAME)0);
SetFlashRect ((PRECT)~0L, (FRAME)0); SetFlashRect ((PRECT)~0L, (FRAME)0);
@@ -272,7 +272,7 @@ DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state)
DrawFilledRectangle (&text_r); DrawFilledRectangle (&text_r);
SetContextForeGroundColor (ForeGround); SetContextForeGroundColor (ForeGround);
DrawText (&lf); font_DrawText (&lf);
SetFlashRect (&r, (FRAME)0); SetFlashRect (&r, (FRAME)0);
} }
@@ -687,7 +687,7 @@ DrawCargo (COUNT redraw_state)
SetContextForeGroundColor (cargo_color[i]); SetContextForeGroundColor (cargo_color[i]);
wsprintf (buf, "%u", GLOBAL_SIS (ElementAmounts[i])); wsprintf (buf, "%u", GLOBAL_SIS (ElementAmounts[i]));
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += 12; t.baseline.y += 12;
} }
t.baseline.x = 50; t.baseline.x = 50;
@@ -699,7 +699,7 @@ DrawCargo (COUNT redraw_state)
SetContextForeGroundColor (cargo_color[i]); SetContextForeGroundColor (cargo_color[i]);
wsprintf (buf, "%u", GLOBAL_SIS (TotalBioMass)); wsprintf (buf, "%u", GLOBAL_SIS (TotalBioMass));
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
} }
@@ -830,7 +830,7 @@ ShowSummary (SUMMARY_DESC *pSD)
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x10, 0x00, 0x10), 0x01)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x10, 0x00, 0x10), 0x01));
DrawText (&t); font_DrawText (&t);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
} }
t.baseline.y = 126; t.baseline.y = 126;
@@ -842,7 +842,7 @@ ShowSummary (SUMMARY_DESC *pSD)
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x10, 0x00, 0x10), 0x01)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x10, 0x00, 0x10), 0x01));
DrawText (&t); font_DrawText (&t);
r.corner.x = 1; r.corner.x = 1;
r.corner.y = 141; r.corner.y = 141;
@@ -891,7 +891,7 @@ ShowSummary (SUMMARY_DESC *pSD)
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x1B, 0x00, 0x1B), 0x33)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x1B, 0x00, 0x1B), 0x33));
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.x = SIS_SCREEN_WIDTH - 57 + 1 + (SIS_TITLE_WIDTH >> 1); t.baseline.x = SIS_SCREEN_WIDTH - 57 + 1 + (SIS_TITLE_WIDTH >> 1);
if (pSD->Activity == IN_STARBASE) if (pSD->Activity == IN_STARBASE)
wstrcpy (buf, GAME_STRING (STARBASE_STRING_BASE)); wstrcpy (buf, GAME_STRING (STARBASE_STRING_BASE));
@@ -902,7 +902,7 @@ ShowSummary (SUMMARY_DESC *pSD)
r.corner.x / 10, r.corner.x % 10, r.corner.x / 10, r.corner.x % 10,
r.corner.y / 10, r.corner.y % 10); r.corner.y / 10, r.corner.y % 10);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
SetContext (OldContext); SetContext (OldContext);
+1 -1
View File
@@ -303,7 +303,7 @@ extern void DrawPoint (PPOINT pPoint);
extern void DrawRectangle (PRECT pRect); extern void DrawRectangle (PRECT pRect);
extern void DrawFilledRectangle (PRECT pRect); extern void DrawFilledRectangle (PRECT pRect);
extern void DrawLine (PLINE pLine); extern void DrawLine (PLINE pLine);
extern void DrawText (PTEXT pText); extern void font_DrawText (PTEXT pText);
extern void DrawPolygon (POLYGON Polygon); extern void DrawPolygon (POLYGON Polygon);
extern void DrawFilledPolygon (POLYGON Polygon); extern void DrawFilledPolygon (POLYGON Polygon);
extern void DrawBatch (PPRIMITIVE pBasePrim, PRIM_LINKS PrimLinks, extern void DrawBatch (PPRIMITIVE pBasePrim, PRIM_LINKS PrimLinks,
+1 -1
View File
@@ -99,7 +99,7 @@ ReleaseFont (FONT Font)
} }
void void
DrawText (PTEXT lpText) font_DrawText (PTEXT lpText)
{ {
SetPrimType (&_locPrim, TEXT_PRIM); SetPrimType (&_locPrim, TEXT_PRIM);
_locPrim.Object.Text = *lpText; _locPrim.Object.Text = *lpText;
+10 -10
View File
@@ -330,8 +330,8 @@ DrawTeamString (PMELEE_STATE pMS, COUNT HiLiteState)
SetContextForeGroundColor (HiLiteState == 0 SetContextForeGroundColor (HiLiteState == 0
? TEAM_NAME_TEXT_COLOR : TEAM_NAME_EDIT_TEXT_COLOR); ? TEAM_NAME_TEXT_COLOR : TEAM_NAME_EDIT_TEXT_COLOR);
DrawText (&lfText); font_DrawText (&lfText);
DrawText (&rtText); font_DrawText (&rtText);
} }
else else
{ {
@@ -369,7 +369,7 @@ DrawTeamString (PMELEE_STATE pMS, COUNT HiLiteState)
DrawFilledRectangle (&text_r); DrawFilledRectangle (&text_r);
SetContextForeGroundColor (BLACK_COLOR); // TEAM_NAME_EDIT_TEXT_COLOR); SetContextForeGroundColor (BLACK_COLOR); // TEAM_NAME_EDIT_TEXT_COLOR);
DrawText (&lfText); font_DrawText (&lfText);
} }
UnbatchGraphics (); UnbatchGraphics ();
} }
@@ -594,19 +594,19 @@ DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip)
{ {
t.pStr = GAME_STRING (MELEE_STRING_BASE + 0); // "Empty" t.pStr = GAME_STRING (MELEE_STRING_BASE + 0); // "Empty"
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.pStr = GAME_STRING (MELEE_STRING_BASE + 1); // "Slot" t.pStr = GAME_STRING (MELEE_STRING_BASE + 1); // "Slot"
} }
else else
{ {
t.pStr = GAME_STRING (MELEE_STRING_BASE + 2); // "Team" t.pStr = GAME_STRING (MELEE_STRING_BASE + 2); // "Team"
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.pStr = GAME_STRING (MELEE_STRING_BASE + 3); // "Name" t.pStr = GAME_STRING (MELEE_STRING_BASE + 3); // "Name"
} }
t.baseline.y += TINY_TEXT_HEIGHT; t.baseline.y += TINY_TEXT_HEIGHT;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
else else
{ {
@@ -750,12 +750,12 @@ DrawFileStrings (PMELEE_STATE pMS, int HiLiteState)
? BUILD_COLOR (MAKE_RGB15 (15, 16, 27), 0x00) ? BUILD_COLOR (MAKE_RGB15 (15, 16, 27), 0x00)
: BUILD_COLOR (MAKE_RGB15 (23, 24, 29), 0x00) : BUILD_COLOR (MAKE_RGB15 (23, 24, 29), 0x00)
); );
DrawText (&Text); font_DrawText (&Text);
rtText.baseline.y = Text.baseline.y; rtText.baseline.y = Text.baseline.y;
wsprintf (buf, "%d", GetTeamValue (&pMS->FileList[bot])); wsprintf (buf, "%d", GetTeamValue (&pMS->FileList[bot]));
rtText.CharCount = (COUNT)~0; rtText.CharCount = (COUNT)~0;
DrawText (&rtText); font_DrawText (&rtText);
} }
else else
{ {
@@ -794,12 +794,12 @@ DrawFileStrings (PMELEE_STATE pMS, int HiLiteState)
Text.pStr = pMS->FileList[bot - top].TeamName; Text.pStr = pMS->FileList[bot - top].TeamName;
Text.CharCount = (COUNT)~0; Text.CharCount = (COUNT)~0;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (15, 16, 27), 0x00)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (15, 16, 27), 0x00));
DrawText (&Text); font_DrawText (&Text);
rtText.baseline.y = Text.baseline.y; rtText.baseline.y = Text.baseline.y;
wsprintf (buf, "%d", GetTeamValue (&pMS->FileList[bot - top])); wsprintf (buf, "%d", GetTeamValue (&pMS->FileList[bot - top]));
rtText.CharCount = (COUNT)~0; rtText.CharCount = (COUNT)~0;
DrawText (&rtText); font_DrawText (&rtText);
} }
s.origin.x = Text.baseline.x + 1; s.origin.x = Text.baseline.x + 1;
+1 -1
View File
@@ -75,7 +75,7 @@ DrawModuleStrings (PMENU_STATE pMS, BYTE NewModule)
wsprintf (buf, "%u", GLOBAL (ModuleCost[NewModule]) * MODULE_COST_SCALE); wsprintf (buf, "%u", GLOBAL (ModuleCost[NewModule]) * MODULE_COST_SCALE);
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02));
DrawText (&t); font_DrawText (&t);
} }
UnbatchGraphics (); UnbatchGraphics ();
SetContext (OldContext); SetContext (OldContext);
+3 -3
View File
@@ -62,7 +62,7 @@ DrawMeleeFrame (STARSHIPPTR LastStarShipPtr, COUNT which_player)
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0x1F), 0x9)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0x1F), 0x9));
DrawText (&t); font_DrawText (&t);
r.corner.x = PICK_X_OFFS - 3; r.corner.x = PICK_X_OFFS - 3;
r.corner.y = PICK_Y_OFFS - 9 + ((1 - which_player) * PICK_SIDE_OFFS); r.corner.y = PICK_Y_OFFS - 9 + ((1 - which_player) * PICK_SIDE_OFFS);
@@ -74,7 +74,7 @@ DrawMeleeFrame (STARSHIPPTR LastStarShipPtr, COUNT which_player)
t.pStr = buf; t.pStr = buf;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x4, 0x5, 0x1F), 0x4B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x4, 0x5, 0x1F), 0x4B));
DrawText (&t); font_DrawText (&t);
if (LastStarShipPtr == 0 || LastStarShipPtr->special_counter == 0) if (LastStarShipPtr == 0 || LastStarShipPtr->special_counter == 0)
{ {
@@ -132,7 +132,7 @@ DrawMeleeFrame (STARSHIPPTR LastStarShipPtr, COUNT which_player)
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x13, 0x00, 0x00), 0x2C)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x13, 0x00, 0x00), 0x2C));
DrawText (&t); font_DrawText (&t);
} }
} }
+3 -3
View File
@@ -179,7 +179,7 @@ ChangeSelection:
UnlockStarShip (&race_q[0], hBattleShip); UnlockStarShip (&race_q[0], hBattleShip);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x14, 0x0A, 0x00), 0x0C)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x14, 0x0A, 0x00), 0x0C));
DrawText (&t); font_DrawText (&t);
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
} }
@@ -200,7 +200,7 @@ ChangeSelection:
else else
wsprintf (buf, "%u/%u", crew_level, max_crew); wsprintf (buf, "%u/%u", crew_level, max_crew);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x00), 0x02)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x00), 0x02));
DrawText (&t); font_DrawText (&t);
} }
SetFlashRect (&pMS->flash_rect0, (FRAME)0); SetFlashRect (&pMS->flash_rect0, (FRAME)0);
@@ -445,7 +445,7 @@ DrawArmadaPickShip (BOOLEAN draw_salvage_frame, PRECT pPickRect)
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x12, 0x12, 0x12), 0x17)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x12, 0x12, 0x12), 0x17));
SetContextFont (StarConFont); SetContextFont (StarConFont);
DrawText (&t); font_DrawText (&t);
r.extent.width = ICON_WIDTH; r.extent.width = ICON_WIDTH;
r.extent.height = ICON_HEIGHT; r.extent.height = ICON_HEIGHT;
+12 -12
View File
@@ -53,7 +53,7 @@ ShowRemainingCapacity (void)
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01));
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0x1F), 0x09)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0x1F), 0x09));
DrawText (&rt); font_DrawText (&rt);
UnbatchGraphics (); UnbatchGraphics ();
SetContext (OldContext); SetContext (OldContext);
@@ -105,7 +105,7 @@ DrawCargoStrings (BYTE OldElement, BYTE NewElement)
ct.pStr = GAME_STRING (CARGO_STRING_BASE); ct.pStr = GAME_STRING (CARGO_STRING_BASE);
ct.CharCount = (COUNT)~0; ct.CharCount = (COUNT)~0;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0x1F, 0x1F), 0x0B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0x1F, 0x1F), 0x0B));
DrawText (&ct); font_DrawText (&ct);
SetContextFont (TinyFont); SetContextFont (TinyFont);
} }
@@ -127,11 +127,11 @@ DrawCargoStrings (BYTE OldElement, BYTE NewElement)
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0x1F), 0x09)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0x1F), 0x09));
rt.baseline.x = 32; rt.baseline.x = 32;
rt_amount_buf[0] = '$'; rt_amount_buf[0] = '$';
DrawText (&rt); font_DrawText (&rt);
rt.baseline.x = 58; rt.baseline.x = 58;
rt_amount_buf[0] = '#'; rt_amount_buf[0] = '#';
DrawText (&rt); font_DrawText (&rt);
for (OldElement = 0; for (OldElement = 0;
OldElement < NUM_ELEMENT_CATEGORIES; ++OldElement) OldElement < NUM_ELEMENT_CATEGORIES; ++OldElement)
@@ -153,14 +153,14 @@ DrawCargoStrings (BYTE OldElement, BYTE NewElement)
wsprintf (rt_amount_buf, "%u", wsprintf (rt_amount_buf, "%u",
GLOBAL (ElementWorth[OldElement])); GLOBAL (ElementWorth[OldElement]));
rt.CharCount = (COUNT)~0; rt.CharCount = (COUNT)~0;
DrawText (&rt); font_DrawText (&rt);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x14), 0x03)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x14), 0x03));
rt.baseline.x = 58; rt.baseline.x = 58;
wsprintf (rt_amount_buf, "%u", wsprintf (rt_amount_buf, "%u",
GLOBAL_SIS (ElementAmounts[OldElement])); GLOBAL_SIS (ElementAmounts[OldElement]));
rt.CharCount = (COUNT)~0; rt.CharCount = (COUNT)~0;
DrawText (&rt); font_DrawText (&rt);
} }
cy += 9; cy += 9;
@@ -182,7 +182,7 @@ DrawCargoStrings (BYTE OldElement, BYTE NewElement)
rt.baseline.x = 58; rt.baseline.x = 58;
wsprintf (rt_amount_buf, "%u", GLOBAL_SIS (TotalBioMass)); wsprintf (rt_amount_buf, "%u", GLOBAL_SIS (TotalBioMass));
rt.CharCount = (COUNT)~0; rt.CharCount = (COUNT)~0;
DrawText (&rt); font_DrawText (&rt);
r.corner.x = 4; r.corner.x = 4;
r.corner.y = 117; r.corner.y = 117;
@@ -199,7 +199,7 @@ DrawCargoStrings (BYTE OldElement, BYTE NewElement)
lt.align = ALIGN_LEFT; lt.align = ALIGN_LEFT;
lt.pStr = GAME_STRING (CARGO_STRING_BASE + 1); lt.pStr = GAME_STRING (CARGO_STRING_BASE + 1);
lt.CharCount = (COUNT)~0; lt.CharCount = (COUNT)~0;
DrawText (&lt); font_DrawText (&lt);
} }
ShowRemainingCapacity (); ShowRemainingCapacity ();
@@ -229,14 +229,14 @@ DrawCargoStrings (BYTE OldElement, BYTE NewElement)
rt.baseline.x = 32; rt.baseline.x = 32;
wsprintf (rt_amount_buf, "%u", GLOBAL (ElementWorth[OldElement])); wsprintf (rt_amount_buf, "%u", GLOBAL (ElementWorth[OldElement]));
rt.CharCount = (COUNT)~0; rt.CharCount = (COUNT)~0;
DrawText (&rt); font_DrawText (&rt);
wsprintf (rt_amount_buf, "%u", GLOBAL_SIS (ElementAmounts[OldElement])); wsprintf (rt_amount_buf, "%u", GLOBAL_SIS (ElementAmounts[OldElement]));
} }
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x14), 0x03)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x14), 0x03));
rt.baseline.x = 58; rt.baseline.x = 58;
rt.CharCount = (COUNT)~0; rt.CharCount = (COUNT)~0;
DrawText (&rt); font_DrawText (&rt);
} }
if (NewElement != (BYTE)~0) if (NewElement != (BYTE)~0)
@@ -259,14 +259,14 @@ DrawCargoStrings (BYTE OldElement, BYTE NewElement)
rt.baseline.x = 32; rt.baseline.x = 32;
wsprintf (rt_amount_buf, "%u", GLOBAL (ElementWorth[NewElement])); wsprintf (rt_amount_buf, "%u", GLOBAL (ElementWorth[NewElement]));
rt.CharCount = (COUNT)~0; rt.CharCount = (COUNT)~0;
DrawText (&rt); font_DrawText (&rt);
wsprintf (rt_amount_buf, "%u", GLOBAL_SIS (ElementAmounts[NewElement])); wsprintf (rt_amount_buf, "%u", GLOBAL_SIS (ElementAmounts[NewElement]));
} }
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0x1F, 0x1F), 0x0B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0x1F, 0x1F), 0x0B));
rt.baseline.x = 58; rt.baseline.x = 58;
rt.CharCount = (COUNT)~0; rt.CharCount = (COUNT)~0;
DrawText (&rt); font_DrawText (&rt);
} }
UnbatchGraphics (); UnbatchGraphics ();
+7 -7
View File
@@ -89,7 +89,7 @@ DrawDevices (PMENU_STATE pMS, BYTE OldDevice, BYTE NewDevice)
ct.pStr = GAME_STRING (DEVICE_STRING_BASE); ct.pStr = GAME_STRING (DEVICE_STRING_BASE);
ct.CharCount = (COUNT)~0; ct.CharCount = (COUNT)~0;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0x1F, 0x1F), 0x0B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0x1F, 0x1F), 0x0B));
DrawText (&ct); font_DrawText (&ct);
SetContextFont (TinyFont); SetContextFont (TinyFont);
} }
@@ -119,11 +119,11 @@ DrawDevices (PMENU_STATE pMS, BYTE OldDevice, BYTE NewDevice)
t.baseline.y = cy; t.baseline.y = cy;
t.pStr = GAME_STRING (pDeviceMap[OldDevice] + DEVICE_STRING_BASE + 1); t.pStr = GAME_STRING (pDeviceMap[OldDevice] + DEVICE_STRING_BASE + 1);
t.CharCount = lpstrchr (t.pStr, ' '); t.CharCount = lpstrchr (t.pStr, ' ');
DrawText (&t); font_DrawText (&t);
t.baseline.y += 7; t.baseline.y += 7;
t.pStr += t.CharCount + 1; t.pStr += t.CharCount + 1;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
cy += 18; cy += 18;
@@ -148,11 +148,11 @@ DrawDevices (PMENU_STATE pMS, BYTE OldDevice, BYTE NewDevice)
t.baseline.y = cy; t.baseline.y = cy;
t.pStr = GAME_STRING (pDeviceMap[OldDevice] + DEVICE_STRING_BASE + 1); t.pStr = GAME_STRING (pDeviceMap[OldDevice] + DEVICE_STRING_BASE + 1);
t.CharCount = lpstrchr (t.pStr, ' '); t.CharCount = lpstrchr (t.pStr, ' ');
DrawText (&t); font_DrawText (&t);
t.baseline.y += 7; t.baseline.y += 7;
t.pStr += t.CharCount + 1; t.pStr += t.CharCount + 1;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
if (NewDevice < NUM_DEVICES) if (NewDevice < NUM_DEVICES)
@@ -166,11 +166,11 @@ DrawDevices (PMENU_STATE pMS, BYTE OldDevice, BYTE NewDevice)
t.baseline.y = cy; t.baseline.y = cy;
t.pStr = GAME_STRING (pDeviceMap[NewDevice] + DEVICE_STRING_BASE + 1); t.pStr = GAME_STRING (pDeviceMap[NewDevice] + DEVICE_STRING_BASE + 1);
t.CharCount = lpstrchr (t.pStr, ' '); t.CharCount = lpstrchr (t.pStr, ' ');
DrawText (&t); font_DrawText (&t);
t.baseline.y += 7; t.baseline.y += 7;
t.pStr += t.CharCount + 1; t.pStr += t.CharCount + 1;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
+3 -3
View File
@@ -1299,13 +1299,13 @@ ScrollPlanetSide (SIZE dx, SIZE dy, SIZE CountDown)
pPSD->MineralText[0].baseline.x -= dx; pPSD->MineralText[0].baseline.x -= dx;
pPSD->MineralText[0].baseline.y -= dy; pPSD->MineralText[0].baseline.y -= dy;
DrawText (&pPSD->MineralText[0]); font_DrawText (&pPSD->MineralText[0]);
pPSD->MineralText[1].baseline.x = pPSD->MineralText[0].baseline.x; pPSD->MineralText[1].baseline.x = pPSD->MineralText[0].baseline.x;
pPSD->MineralText[1].baseline.y = pPSD->MineralText[0].baseline.y + 7; pPSD->MineralText[1].baseline.y = pPSD->MineralText[0].baseline.y + 7;
DrawText (&pPSD->MineralText[1]); font_DrawText (&pPSD->MineralText[1]);
pPSD->MineralText[2].baseline.x = pPSD->MineralText[1].baseline.x; pPSD->MineralText[2].baseline.x = pPSD->MineralText[1].baseline.x;
pPSD->MineralText[2].baseline.y = pPSD->MineralText[1].baseline.y + 7; pPSD->MineralText[2].baseline.y = pPSD->MineralText[1].baseline.y + 7;
DrawText (&pPSD->MineralText[2]); font_DrawText (&pPSD->MineralText[2]);
} }
} }
+1 -1
View File
@@ -429,7 +429,7 @@ DrawStarMap (COUNT race_update, PRECT pClipRect)
BUILD_COLOR (MAKE_RGB15 (r, g, b), COLOR_256 (c) - 1) BUILD_COLOR (MAKE_RGB15 (r, g, b), COLOR_256 (c) - 1)
); );
} }
DrawText (&t); font_DrawText (&t);
} }
} }
+2 -2
View File
@@ -133,11 +133,11 @@ MakeReport (SOUND ReadOutSounds, UNICODE *pStr, COUNT StrLen)
while (word_chars--) while (word_chars--)
{ {
if (!Sleepy) if (!Sleepy)
DrawText (&t); font_DrawText (&t);
else else
{ {
SetSemaphore (GraphicsSem); SetSemaphore (GraphicsSem);
DrawText (&t); font_DrawText (&t);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
PlaySound (ReadOutSounds, GAME_SOUND_PRIORITY); PlaySound (ReadOutSounds, GAME_SOUND_PRIORITY);
+24 -24
View File
@@ -97,7 +97,7 @@ PrintScanTitlePC (TEXT *t, RECT *r, char *txt, int xpos)
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B));
wsprintf (t->pStr, txt); wsprintf (t->pStr, txt);
t->CharCount = (COUNT)~0; t->CharCount = (COUNT)~0;
DrawText (t); font_DrawText (t);
TextRect (t, r, NULL_PTR); TextRect (t, r, NULL_PTR);
t->baseline.x += r->extent.width; t->baseline.x += r->extent.width;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B));
@@ -174,7 +174,7 @@ PrintCoarseScanPC (void)
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x15), 0x3B));
SetContextFont (MicroFont); SetContextFont (MicroFont);
DrawText (&t); font_DrawText (&t);
SetContextFont (TinyFont); SetContextFont (TinyFont);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -195,7 +195,7 @@ PrintCoarseScanPC (void)
else else
wsprintf (buf, "%u.%02u a.u.", temp / 100, temp % 100); wsprintf (buf, "%u.%02u a.u.", temp / 100, temp % 100);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -216,7 +216,7 @@ PrintCoarseScanPC (void)
wsprintf (buf, "%u.%02u atm", temp / 100, temp % 100); wsprintf (buf, "%u.%02u atm", temp / 100, temp % 100);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -225,7 +225,7 @@ PrintCoarseScanPC (void)
PrintScanTitlePC (&t, &r, "Temp: ", LEFT_SIDE_BASELINE_X_PC); PrintScanTitlePC (&t, &r, "Temp: ", LEFT_SIDE_BASELINE_X_PC);
wsprintf (buf, "%d^ c", pSolarSysState->SysInfo.PlanetInfo.SurfaceTemperature); wsprintf (buf, "%d^ c", pSolarSysState->SysInfo.PlanetInfo.SurfaceTemperature);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -237,7 +237,7 @@ PrintCoarseScanPC (void)
else else
wsprintf (buf, "Class %u", pSolarSysState->SysInfo.PlanetInfo.Weather + 1); wsprintf (buf, "Class %u", pSolarSysState->SysInfo.PlanetInfo.Weather + 1);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -249,7 +249,7 @@ PrintCoarseScanPC (void)
else else
wsprintf (buf, "Class %u", pSolarSysState->SysInfo.PlanetInfo.Tectonics + 1); wsprintf (buf, "Class %u", pSolarSysState->SysInfo.PlanetInfo.Tectonics + 1);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
t.baseline.y = SCAN_BASELINE_Y_PC; t.baseline.y = SCAN_BASELINE_Y_PC;
@@ -272,7 +272,7 @@ PrintCoarseScanPC (void)
wsprintf (buf, "%lu.%02lu e.s.", tr / 100, tr % 100); wsprintf (buf, "%lu.%02lu e.s.", tr / 100, tr % 100);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -284,7 +284,7 @@ PrintCoarseScanPC (void)
else else
wsprintf (buf, "%u.%02u e.s.", temp / 100, temp % 100); wsprintf (buf, "%u.%02u e.s.", temp / 100, temp % 100);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -300,7 +300,7 @@ PrintCoarseScanPC (void)
wsprintf (buf, "%u.%02u g.", temp / 100, temp % 100); wsprintf (buf, "%u.%02u g.", temp / 100, temp % 100);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -319,7 +319,7 @@ PrintCoarseScanPC (void)
wsprintf (buf, "%u.%u days", temp / 10, temp % 10); wsprintf (buf, "%u.%u days", temp / 10, temp % 10);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING_PC; t.baseline.y += SCAN_LEADING_PC;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -330,7 +330,7 @@ PrintCoarseScanPC (void)
temp = -temp; temp = -temp;
wsprintf (buf, "%u^", temp); wsprintf (buf, "%u^", temp);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
} }
@@ -404,7 +404,7 @@ PrintCoarseScan3DO (void)
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xF, 0x00, 0x19), 0x3B));
SetContextFont (MicroFont); SetContextFont (MicroFont);
DrawText (&t); font_DrawText (&t);
s.origin.x = s.origin.y = 0; s.origin.x = s.origin.y = 0;
s.origin.x = 16 - SAFE_X; s.origin.x = 16 - SAFE_X;
@@ -430,7 +430,7 @@ PrintCoarseScan3DO (void)
else else
wsprintf (buf, "%u.%02u&", temp / 100, temp % 100); wsprintf (buf, "%u.%02u&", temp / 100, temp % 100);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -448,7 +448,7 @@ PrintCoarseScan3DO (void)
wsprintf (buf, "%u.%02u&", temp / 100, temp % 100); wsprintf (buf, "%u.%02u&", temp / 100, temp % 100);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -456,7 +456,7 @@ PrintCoarseScan3DO (void)
t.pStr = buf; t.pStr = buf;
wsprintf (buf, "%d^", pSolarSysState->SysInfo.PlanetInfo.SurfaceTemperature); wsprintf (buf, "%d^", pSolarSysState->SysInfo.PlanetInfo.SurfaceTemperature);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -465,7 +465,7 @@ PrintCoarseScan3DO (void)
wsprintf (buf, "<%u>", pSolarSysState->SysInfo.PlanetInfo.AtmoDensity == 0 wsprintf (buf, "<%u>", pSolarSysState->SysInfo.PlanetInfo.AtmoDensity == 0
? 0 : (pSolarSysState->SysInfo.PlanetInfo.Weather + 1)); ? 0 : (pSolarSysState->SysInfo.PlanetInfo.Weather + 1));
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -477,7 +477,7 @@ PrintCoarseScan3DO (void)
) == GAS_GIANT ) == GAS_GIANT
? 0 : (pSolarSysState->SysInfo.PlanetInfo.Tectonics + 1)); ? 0 : (pSolarSysState->SysInfo.PlanetInfo.Tectonics + 1));
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
t.baseline.x = RIGHT_SIDE_BASELINE_X; t.baseline.x = RIGHT_SIDE_BASELINE_X;
@@ -501,7 +501,7 @@ PrintCoarseScan3DO (void)
wsprintf (buf, "%lu.%02lu&", tr / 100, tr % 100); wsprintf (buf, "%lu.%02lu&", tr / 100, tr % 100);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -512,7 +512,7 @@ PrintCoarseScan3DO (void)
else else
wsprintf (buf, "%u.%02u&", temp / 100, temp % 100); wsprintf (buf, "%u.%02u&", temp / 100, temp % 100);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -527,7 +527,7 @@ PrintCoarseScan3DO (void)
wsprintf (buf, "%u.%02u&", temp / 100, temp % 100); wsprintf (buf, "%u.%02u&", temp / 100, temp % 100);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -537,7 +537,7 @@ PrintCoarseScan3DO (void)
temp = -temp; temp = -temp;
wsprintf (buf, "%u^", temp); wsprintf (buf, "%u^", temp);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += SCAN_LEADING; t.baseline.y += SCAN_LEADING;
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
@@ -555,7 +555,7 @@ PrintCoarseScan3DO (void)
wsprintf (buf, "%u.%u&", temp / 10, temp % 10); wsprintf (buf, "%u.%u&", temp / 10, temp % 10);
} }
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
} }
@@ -1066,7 +1066,7 @@ DoScan (INPUT_STATE InputState, PMENU_STATE
); );
break; break;
} }
DrawText (&t); font_DrawText (&t);
SetContext (ScanContext); SetContext (ScanContext);
ClearSemaphore (GraphicsSem); ClearSemaphore (GraphicsSem);
+1 -1
View File
@@ -196,7 +196,7 @@ SaveProblemMessage (STAMP *MsgStamp)
if (*t.pStr == '\0') if (*t.pStr == '\0')
break; break;
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
t.baseline.y += 11; t.baseline.y += 11;
} }
UnbatchGraphics (); UnbatchGraphics ();
+3 -3
View File
@@ -60,10 +60,10 @@ DrawShipNameString (UNICODE *pStr, COUNT CharCount, COORD y)
Text.baseline.x = STATUS_WIDTH >> 1; Text.baseline.x = STATUS_WIDTH >> 1;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x10, 0x10, 0x10), 0x19)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x10, 0x10, 0x10), 0x19));
DrawText (&Text); font_DrawText (&Text);
--Text.baseline.y; --Text.baseline.y;
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
DrawText (&Text); font_DrawText (&Text);
SetContextFont (OldFont); SetContextFont (OldFont);
} }
@@ -250,7 +250,7 @@ InitShipStatus (STARSHIPPTR StarShipPtr, PRECT pClipRect)
Text.baseline.y = y + GAUGE_YOFFS + 9; Text.baseline.y = y + GAUGE_YOFFS + 9;
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
DrawText (&Text); font_DrawText (&Text);
SetContextFont (OldFont); SetContextFont (OldFont);
} }
+2 -2
View File
@@ -175,7 +175,7 @@ DrawRaceStrings (BYTE NewRaceItem)
wsprintf (buf, "%u", ShipCost[NewRaceItem]); wsprintf (buf, "%u", ShipCost[NewRaceItem]);
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02));
DrawText (&t); font_DrawText (&t);
} }
UnbatchGraphics (); UnbatchGraphics ();
@@ -230,7 +230,7 @@ ShowShipCrew (SHIP_FRAGMENTPTR StarShipPtr, PRECT pRect)
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
} }
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x00), 0x02)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x00), 0x02));
DrawText (&t); font_DrawText (&t);
} }
static void static void
+14 -14
View File
@@ -123,7 +123,7 @@ SetContextClipRect (&r);
SetContextBackGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01)); SetContextBackGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01));
ClearDrawable (); ClearDrawable ();
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x1B, 0x00, 0x1B), 0x33)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x1B, 0x00, 0x1B), 0x33));
DrawText (&t); font_DrawText (&t);
UnbatchGraphics (); UnbatchGraphics ();
SetContextClipRect (NULL_PTR); SetContextClipRect (NULL_PTR);
@@ -207,7 +207,7 @@ SetContextClipRect (&r);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
SetContextFont (TinyFont); SetContextFont (TinyFont);
DrawText (&t); font_DrawText (&t);
} }
UnbatchGraphics (); UnbatchGraphics ();
@@ -295,7 +295,7 @@ DrawStatusMessage (UNICODE *pStr)
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x10, 0x00), 0x6B)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x10, 0x00), 0x6B));
DrawText (&t); font_DrawText (&t);
UnbatchGraphics (); UnbatchGraphics ();
SetContextClipRect (NULL_PTR); SetContextClipRect (NULL_PTR);
@@ -328,7 +328,7 @@ DrawCaptainsName (void)
t.pStr = GLOBAL_SIS (CommanderName); t.pStr = GLOBAL_SIS (CommanderName);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x16, 0xB, 0x1F), 0x38)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x16, 0xB, 0x1F), 0x38));
DrawText (&t); font_DrawText (&t);
SetContextForeGroundColor (OldColor); SetContextForeGroundColor (OldColor);
SetContextFont (OldFont); SetContextFont (OldFont);
@@ -390,7 +390,7 @@ DrawFlagshipName (BOOLEAN InStatusArea)
} }
else else
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x14, 0x0A, 0x00), 0x0C)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x14, 0x0A, 0x00), 0x0C));
DrawText (&t); font_DrawText (&t);
if (optWhichFonts == OPT_PC) if (optWhichFonts == OPT_PC)
SetContextFontEffect (0, 0, 0); SetContextFontEffect (0, 0, 0);
@@ -537,7 +537,7 @@ void DrawPC_SIS ()
BUILD_COLOR_RGBA (0x6B, 0x00, 0x00, 0xFF), BUILD_COLOR_RGBA (0x6B, 0x00, 0x00, 0xFF),
BUILD_COLOR_RGBA (0xF7, 0x00, 0x00, 0xFF)); BUILD_COLOR_RGBA (0xF7, 0x00, 0x00, 0xFF));
wsprintf (buf, "FUEL"); wsprintf (buf, "FUEL");
DrawText (&t); font_DrawText (&t);
r.corner.y += 79; r.corner.y += 79;
t.baseline.y += 79; t.baseline.y += 79;
@@ -547,7 +547,7 @@ void DrawPC_SIS ()
BUILD_COLOR_RGBA (0x00, 0x4D, 0x00, 0xFF), BUILD_COLOR_RGBA (0x00, 0x4D, 0x00, 0xFF),
BUILD_COLOR_RGBA (0x00, 0xAE, 0x00, 0xFF)); BUILD_COLOR_RGBA (0x00, 0xAE, 0x00, 0xFF));
wsprintf (buf, "CREW"); wsprintf (buf, "CREW");
DrawText (&t); font_DrawText (&t);
SetContextFontEffect (0, 0, 0); SetContextFontEffect (0, 0, 0);
r.corner.x = 2 + 1; r.corner.x = 2 + 1;
@@ -559,7 +559,7 @@ void DrawPC_SIS ()
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x02, 0x04, 0x1E), 0x38)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x02, 0x04, 0x1E), 0x38));
t.baseline.y = r.corner.y + 6; t.baseline.y = r.corner.y + 6;
wsprintf (buf, "CAPTAIN"); wsprintf (buf, "CAPTAIN");
DrawText (&t); font_DrawText (&t);
} }
void void
@@ -706,7 +706,7 @@ DeltaSISGauges (SIZE crew_delta, SIZE fuel_delta, int resunit_delta)
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0xE, 0x00), 0x6C)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0xE, 0x00), 0x6C));
DrawText (&t); font_DrawText (&t);
} }
if (fuel_delta != 0) if (fuel_delta != 0)
@@ -742,7 +742,7 @@ DeltaSISGauges (SIZE crew_delta, SIZE fuel_delta, int resunit_delta)
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x13, 0x00, 0x00), 0x2C)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x13, 0x00, 0x00), 0x2C));
DrawText (&t); font_DrawText (&t);
} }
} }
@@ -1262,11 +1262,11 @@ DrawPCMenu (BYTE beg_index, BYTE end_index, BYTE NewState, BYTE hilite, RECT *r)
r->extent.height = PC_MENU_HEIGHT - 1; 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); font_DrawText (&t);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x15, 0x15), 0x08)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x15, 0x15), 0x08));
} }
else else
DrawText (&t); font_DrawText (&t);
t.baseline.y += PC_MENU_HEIGHT; t.baseline.y += PC_MENU_HEIGHT;
} }
} }
@@ -1400,7 +1400,7 @@ DrawMenuStateStrings (BYTE beg_index, SWORD NewState)
wsprintf (buf, "%u", GLOBAL (CrewCost)); wsprintf (buf, "%u", GLOBAL (CrewCost));
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02));
DrawText (&t); font_DrawText (&t);
break; break;
case PM_FUEL: case PM_FUEL:
t.baseline.x = s.origin.x + RADAR_WIDTH - 2; t.baseline.x = s.origin.x + RADAR_WIDTH - 2;
@@ -1411,7 +1411,7 @@ DrawMenuStateStrings (BYTE beg_index, SWORD NewState)
wsprintf (buf, "%u", GLOBAL (FuelCost)); wsprintf (buf, "%u", GLOBAL (FuelCost));
SetContextFont (TinyFont); SetContextFont (TinyFont);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x1F, 0x00), 0x02));
DrawText (&t); font_DrawText (&t);
break; break;
} }
} }
+3 -3
View File
@@ -44,7 +44,7 @@ DrawBaseStateStrings (STARBASE_STATE OldState, STARBASE_STATE NewState)
{ {
t.pStr = GAME_STRING (STARBASE_STRING_BASE + 1 + OldState); t.pStr = GAME_STRING (STARBASE_STRING_BASE + 1 + OldState);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
t.baseline.y += (23 - 4); t.baseline.y += (23 - 4);
} }
@@ -53,13 +53,13 @@ DrawBaseStateStrings (STARBASE_STATE OldState, STARBASE_STATE NewState)
t.baseline.y = 106 + 28 + (SAFE_Y + 4) + ((23 - 4) * OldState); t.baseline.y = 106 + 28 + (SAFE_Y + 4) + ((23 - 4) * OldState);
t.pStr = GAME_STRING (STARBASE_STRING_BASE + 1 + OldState); t.pStr = GAME_STRING (STARBASE_STRING_BASE + 1 + OldState);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0xA), 0x0E)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0xA), 0x0E));
t.baseline.y = 106 + 28 + (SAFE_Y + 4) + ((23 - 4) * NewState); t.baseline.y = 106 + 28 + (SAFE_Y + 4) + ((23 - 4) * NewState);
t.pStr = GAME_STRING (STARBASE_STRING_BASE + 1 + NewState); t.pStr = GAME_STRING (STARBASE_STRING_BASE + 1 + NewState);
t.CharCount = (COUNT)~0; t.CharCount = (COUNT)~0;
DrawText (&t); font_DrawText (&t);
} }
void void
+2 -2
View File
@@ -134,7 +134,7 @@ DrawBattleCrewAmount (BOOLEAN CountPlayer)
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0xA, 0xA, 0xA), 0x08));
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
SetContextForeGroundColor (BLACK_COLOR); SetContextForeGroundColor (BLACK_COLOR);
DrawText (&t); font_DrawText (&t);
} }
void void
@@ -249,7 +249,7 @@ DrawCaptainsWindow (STARSHIPPTR StarShipPtr)
DrawBattleCrewAmount (TRUE); DrawBattleCrewAmount (TRUE);
SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x00), 0x02)); SetContextForeGroundColor (BUILD_COLOR (MAKE_RGB15 (0x00, 0x14, 0x00), 0x02));
SetContextFont (TinyFont); SetContextFont (TinyFont);
DrawText (&t); font_DrawText (&t);
} }
} }