Cleanups.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3270 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2009-10-31 15:51:31 +00:00
parent 5320aeeb7d
commit 913aa4ffa6
+20 -8
View File
@@ -188,9 +188,15 @@ DrawSISMessageEx (const UNICODE *pStr, SIZE CurPos, SIZE ExPos, COUNT flags)
if (pStr == (UNICODE *)~0L) if (pStr == (UNICODE *)~0L)
{ {
if (GLOBAL_SIS (FuelOnBoard) == 0) if (GLOBAL_SIS (FuelOnBoard) == 0)
{
pStr = GAME_STRING (NAVIGATION_STRING_BASE + 2); pStr = GAME_STRING (NAVIGATION_STRING_BASE + 2);
// "OUT OF FUEL"
}
else else
{
pStr = GAME_STRING (NAVIGATION_STRING_BASE + 3); pStr = GAME_STRING (NAVIGATION_STRING_BASE + 3);
// "AUTO-PILOT"
}
} }
else else
{ {
@@ -200,21 +206,27 @@ DrawSISMessageEx (const UNICODE *pStr, SIZE CurPos, SIZE ExPos, COUNT flags)
{ {
default: default:
case IN_ENCOUNTER: case IN_ENCOUNTER:
buf[0] = '\0'; pStr = "";
break; break;
case IN_LAST_BATTLE: case IN_LAST_BATTLE:
case IN_INTERPLANETARY: case IN_INTERPLANETARY:
GetClusterName (CurStarDescPtr, buf); GetClusterName (CurStarDescPtr, buf);
pStr = buf;
break; break;
case IN_HYPERSPACE: case IN_HYPERSPACE:
utf8StringCopy (buf, sizeof (buf), if (GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1)
GAME_STRING (NAVIGATION_STRING_BASE {
+ (GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1 pStr = GAME_STRING (NAVIGATION_STRING_BASE);
? 0 : 1))); // "HyperSpace"
}
else
{
pStr = GAME_STRING (NAVIGATION_STRING_BASE + 1);
// "QuasiSpace"
}
break; break;
} }
pStr = buf;
} }
SetContextForeGroundColor ( SetContextForeGroundColor (
@@ -223,7 +235,7 @@ DrawSISMessageEx (const UNICODE *pStr, SIZE CurPos, SIZE ExPos, COUNT flags)
t.baseline.y = SIS_MESSAGE_HEIGHT - 2; t.baseline.y = SIS_MESSAGE_HEIGHT - 2;
t.pStr = pStr; t.pStr = pStr;
t.CharCount = utf8StringCount(pStr); t.CharCount = (COUNT)~0;
SetContextFont (TinyFont); SetContextFont (TinyFont);
if (flags & DSME_CLEARFR) if (flags & DSME_CLEARFR)
@@ -1305,7 +1317,7 @@ flash_rect_func (void *data)
#define CACHE_SIZE 10 #define CACHE_SIZE 10
DWORD TimeIn, WaitTime; DWORD TimeIn, WaitTime;
SIZE strength, fstrength, incr; SIZE strength, fstrength, incr;
RECT cached_rect, framesize_rect; RECT cached_rect;
FRAME cached_screen_frame = 0; FRAME cached_screen_frame = 0;
Task task = (Task)data; Task task = (Task)data;
int cached[CACHE_SIZE]; int cached[CACHE_SIZE];