From 913aa4ffa627052fcea5b074e90a455316ef7e5f Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Sat, 31 Oct 2009 15:51:31 +0000 Subject: [PATCH] Cleanups. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3270 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/uqm/sis.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/sc2/src/uqm/sis.c b/sc2/src/uqm/sis.c index e1658c95a..14b174779 100644 --- a/sc2/src/uqm/sis.c +++ b/sc2/src/uqm/sis.c @@ -188,9 +188,15 @@ DrawSISMessageEx (const UNICODE *pStr, SIZE CurPos, SIZE ExPos, COUNT flags) if (pStr == (UNICODE *)~0L) { if (GLOBAL_SIS (FuelOnBoard) == 0) + { pStr = GAME_STRING (NAVIGATION_STRING_BASE + 2); + // "OUT OF FUEL" + } else + { pStr = GAME_STRING (NAVIGATION_STRING_BASE + 3); + // "AUTO-PILOT" + } } else { @@ -200,21 +206,27 @@ DrawSISMessageEx (const UNICODE *pStr, SIZE CurPos, SIZE ExPos, COUNT flags) { default: case IN_ENCOUNTER: - buf[0] = '\0'; + pStr = ""; break; case IN_LAST_BATTLE: case IN_INTERPLANETARY: GetClusterName (CurStarDescPtr, buf); + pStr = buf; break; case IN_HYPERSPACE: - utf8StringCopy (buf, sizeof (buf), - GAME_STRING (NAVIGATION_STRING_BASE - + (GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1 - ? 0 : 1))); + if (GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1) + { + pStr = GAME_STRING (NAVIGATION_STRING_BASE); + // "HyperSpace" + } + else + { + pStr = GAME_STRING (NAVIGATION_STRING_BASE + 1); + // "QuasiSpace" + } break; } - pStr = buf; } SetContextForeGroundColor ( @@ -223,7 +235,7 @@ DrawSISMessageEx (const UNICODE *pStr, SIZE CurPos, SIZE ExPos, COUNT flags) t.baseline.y = SIS_MESSAGE_HEIGHT - 2; t.pStr = pStr; - t.CharCount = utf8StringCount(pStr); + t.CharCount = (COUNT)~0; SetContextFont (TinyFont); if (flags & DSME_CLEARFR) @@ -1305,7 +1317,7 @@ flash_rect_func (void *data) #define CACHE_SIZE 10 DWORD TimeIn, WaitTime; SIZE strength, fstrength, incr; - RECT cached_rect, framesize_rect; + RECT cached_rect; FRAME cached_screen_frame = 0; Task task = (Task)data; int cached[CACHE_SIZE];