Definitions of DWORD/SDWORD changed to 'int' which is compatible with 32- and 64-bit systems; reflecting this in printf()s
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2351 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -797,7 +797,7 @@ ShowSummary (SUMMARY_DESC *pSD)
|
||||
SetContextClipRect (&OldRect);
|
||||
SetContext (SpaceContext);
|
||||
|
||||
sprintf (buf, "%lu", GLOBAL_SIS (ResUnits));
|
||||
sprintf (buf, "%u", GLOBAL_SIS (ResUnits));
|
||||
t.baseline.y = 102;
|
||||
r.extent.width = 76;
|
||||
r.extent.height = SHIP_NAME_HEIGHT;
|
||||
|
||||
@@ -156,7 +156,7 @@ initTempDir (void) {
|
||||
tempPtr = tempDirName + len;
|
||||
for (i = 0; i < NUM_TEMP_RETRIES; i++)
|
||||
{
|
||||
sprintf (tempPtr, "%08lx", num + i);
|
||||
sprintf (tempPtr, "%08x", num + i);
|
||||
if (createDirectory (tempDirName, 0700) == -1)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -395,13 +395,13 @@ Scale_PerfTest (void)
|
||||
if (i % 100 == 0)
|
||||
{
|
||||
Now = SDL_GetTicks ();
|
||||
log_add (log_Debug, "%03ld(%04ld) ", 100*1000 / (Now - TimeIn),
|
||||
log_add (log_Debug, "%03d(%04u) ", 100*1000 / (Now - TimeIn),
|
||||
Now - TimeIn);
|
||||
TimeIn = Now;
|
||||
}
|
||||
}
|
||||
|
||||
log_add (log_Always, "Full frames scaled: %d; over %ld ms; %ld fps\n",
|
||||
log_add (log_Always, "Full frames scaled: %d; over %u ms; %d fps\n",
|
||||
(i - 1), Now - TimeStart, i * 1000 / (Now - TimeStart));
|
||||
|
||||
SDL_UnlockSurface (scaled_display);
|
||||
|
||||
@@ -246,7 +246,7 @@ mem_allocate (MEM_SIZE coreSize, MEM_FLAGS flags, MEM_PRIORITY priority,
|
||||
log_add (log_Always, "mem_allocate: out of extents.");
|
||||
else if ((node->memory = MallocWithRetry (coreSize, "mem_allocate:")) == 0
|
||||
&& coreSize)
|
||||
log_add (log_Always, "mem_allocate: couldn't allocate %u bytes.",
|
||||
log_add (log_Always, "mem_allocate: couldn't allocate %ld bytes.",
|
||||
coreSize);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -138,7 +138,7 @@ res_GetResource (RESOURCE res)
|
||||
desc = lookupResourceDesc (resourceIndex, res);
|
||||
if (desc == NULL)
|
||||
{
|
||||
log_add (log_Warning, "Trying to get undefined resource %08lx",
|
||||
log_add (log_Warning, "Trying to get undefined resource %08x",
|
||||
(DWORD) res);
|
||||
return NULL_HANDLE;
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ PrintCoarseScanPC (void)
|
||||
if (val < 0)
|
||||
val = -val;
|
||||
t.pStr = buf;
|
||||
sprintf (buf, "%ld" STR_DEGREE_SIGN, val);
|
||||
sprintf (buf, "%d" STR_DEGREE_SIGN, val);
|
||||
t.CharCount = (COUNT)~0;
|
||||
font_DrawText (&t);
|
||||
UnlockMutex (GraphicsLock);
|
||||
@@ -556,7 +556,7 @@ PrintCoarseScan3DO (void)
|
||||
val = pSolarSysState->SysInfo.PlanetInfo.AxialTilt;
|
||||
if (val < 0)
|
||||
val = -val;
|
||||
sprintf (buf, "%ld" STR_DEGREE_SIGN, val);
|
||||
sprintf (buf, "%d" STR_DEGREE_SIGN, val);
|
||||
t.CharCount = (COUNT)~0;
|
||||
font_DrawText (&t);
|
||||
t.baseline.y += SCAN_LEADING;
|
||||
|
||||
@@ -484,7 +484,7 @@ RetrySave:
|
||||
|
||||
// Write the memory file to the actual savegame file.
|
||||
sprintf (file, "starcon2.%02u", which_game);
|
||||
log_add (log_Debug, "'%s' is %lu bytes long", file,
|
||||
log_add (log_Debug, "'%s' is %u bytes long", file,
|
||||
flen + sizeof (*summary_desc));
|
||||
if (flen && (out_fp = (PVOID)res_OpenResFile (saveDir, file, "wb")))
|
||||
{
|
||||
|
||||
@@ -370,7 +370,7 @@ DrawStatusMessage (const UNICODE *pStr)
|
||||
GET_GAME_STATE (MELNORME_CREDIT1)
|
||||
), GAME_STRING (STATUS_STRING_BASE + 0)); // "Cr"
|
||||
else if (GET_GAME_STATE (CHMMR_BOMB_STATE) < 2)
|
||||
sprintf (buf, "%lu %s", GLOBAL_SIS (ResUnits),
|
||||
sprintf (buf, "%u %s", GLOBAL_SIS (ResUnits),
|
||||
GAME_STRING (STATUS_STRING_BASE + 1)); // "RU"
|
||||
else
|
||||
sprintf (buf, "%s %s",
|
||||
@@ -647,7 +647,7 @@ DrawFlagshipStats (void)
|
||||
}
|
||||
font_DrawText (&t);
|
||||
t.baseline.y += leading;
|
||||
sprintf (buf, "%4lu", (fuel / FUEL_TANK_SCALE));
|
||||
sprintf (buf, "%4u", (fuel / FUEL_TANK_SCALE));
|
||||
font_DrawText (&t);
|
||||
|
||||
SetContextFontEffect (OldFontEffect);
|
||||
|
||||
Reference in New Issue
Block a user