Cleaned up almost every warning left according to GCC.
The only remaining warnings are signed/unsigned compares, warnings inside the doomed w_memlib.c, and a couple of mysterious (and probably meaningful) bugs regarding a pair of LockElement macros. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@989 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -230,10 +230,10 @@ ShipWorth (void)
|
||||
}
|
||||
|
||||
static COUNT rescue_fuel = 0;
|
||||
static SIS_STATE SIS_copy =
|
||||
{
|
||||
.log_x = 0,
|
||||
};
|
||||
|
||||
/* We're relying on this large, #define-dependent-size structure to be
|
||||
automatically initialized to 0 across the board here. */
|
||||
static SIS_STATE SIS_copy;
|
||||
|
||||
static BOOLEAN
|
||||
StripShip (COUNT fuel_required)
|
||||
|
||||
@@ -30,15 +30,6 @@ void LoadMasterShipList (void);
|
||||
|
||||
//End Added by Chris
|
||||
|
||||
static void
|
||||
DoFMV (char *name, char *loopname, BOOLEAN uninit)
|
||||
{
|
||||
VidPlay ((MEM_HANDLE)name, loopname, uninit);
|
||||
while (VidPlaying ())
|
||||
;
|
||||
VidStop ();
|
||||
}
|
||||
|
||||
void
|
||||
DoShipSpin (COUNT index, MUSIC_REF hMusic)
|
||||
{
|
||||
|
||||
@@ -28,13 +28,16 @@ void LoadMasterShipList (void);
|
||||
//End Added by Chris
|
||||
|
||||
void
|
||||
DoFMV (char *name, char *loopname)
|
||||
DoFMV (char *name, char *loopname, BOOLEAN uninit)
|
||||
{
|
||||
VidPlay((MEM_HANDLE)name, loopname,FALSE);
|
||||
MEM_HANDLE vidref = 0;
|
||||
VidPlay (vidref, loopname, uninit);
|
||||
while(VidPlaying ())
|
||||
;
|
||||
VidStop();
|
||||
(void) name;
|
||||
}
|
||||
|
||||
/* //Already defined in fmv.c
|
||||
void
|
||||
Introduction (void)
|
||||
@@ -71,7 +74,7 @@ Introduction (void)
|
||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)xform_buf, ONE_SECOND / 2));
|
||||
|
||||
if (InputState == 0)
|
||||
DoFMV ("intro", NULL);
|
||||
DoFMV ("intro", NULL, FALSE);
|
||||
|
||||
InitGameKernel ();
|
||||
}
|
||||
@@ -86,7 +89,7 @@ Victory (void)
|
||||
xform_buf[0] = FadeAllToBlack;
|
||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)xform_buf, ONE_SECOND / 2));
|
||||
|
||||
DoFMV ("victory", NULL);
|
||||
DoFMV ("victory", NULL, TRUE);
|
||||
|
||||
InitGameKernel ();
|
||||
}
|
||||
|
||||
@@ -142,7 +142,6 @@ DrawBatch (PPRIMITIVE lpBasePrim, PRIM_LINKS PrimLinks, register
|
||||
register GRAPHICS_PRIM PrimType;
|
||||
PPRIMITIVE lpWorkPrim;
|
||||
RECT ClipRect;
|
||||
FRAMEPTR SrcFramePtr;
|
||||
TFB_Palette color;
|
||||
DWORD c32k;
|
||||
|
||||
|
||||
@@ -306,7 +306,8 @@ FRAMEPTR Build_Font_Effect (FRAMEPTR FramePtr, Uint32 from, Uint32 to, BYTE type
|
||||
|
||||
width = GetFrameWidth (FramePtr);
|
||||
height = GetFrameHeight (FramePtr);
|
||||
NewFrame = CaptureDrawable (CreateDrawable (RAM_DRAWABLE, (SIZE)width, (SIZE)height, 1));
|
||||
NewFrame = CaptureDrawable (CreateDrawable ((CREATE_FLAGS)RAM_DRAWABLE,
|
||||
(SIZE)width, (SIZE)height, 1));
|
||||
tfbOrigImg = FramePtr->image;
|
||||
OrigImg = (SDL_Surface *)tfbOrigImg->NormalImg;
|
||||
SDL_LockSurface (OrigImg);
|
||||
|
||||
@@ -427,7 +427,7 @@ uint32 SoundDecoder_Decode (TFB_SoundDecoder *decoder)
|
||||
if (rc < 0)
|
||||
{
|
||||
decoder->error = SOUNDDECODER_ERROR;
|
||||
fprintf (stderr, "SoundDecoder_Decode(): error decoding %s, code %d\n", decoder->filename, rc);
|
||||
fprintf (stderr, "SoundDecoder_Decode(): error decoding %s, code %ld\n", decoder->filename, rc);
|
||||
return decoded_bytes;
|
||||
}
|
||||
if (rc == 0 || (close_on_done && buffer_size == (decoded_bytes + rc)))
|
||||
@@ -568,7 +568,7 @@ uint32 SoundDecoder_DecodeAll (TFB_SoundDecoder *decoder)
|
||||
{
|
||||
decoder->error = SOUNDDECODER_ERROR;
|
||||
fprintf (stderr, "SoundDecoder_DecodeAll(): "
|
||||
"error decoding %s, code %d\n",
|
||||
"error decoding %s, code %ld\n",
|
||||
decoder->filename, rc);
|
||||
return decoded_bytes;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ StreamDecoderTaskFunc (void *data)
|
||||
if ((error = TFBSound_GetError()) != TFBSOUND_NO_ERROR)
|
||||
{
|
||||
fprintf (stderr, "StreamDecoderTaskFunc(): TFBSound error after TFBSound_SourceQueueBuffers: %x, file %s, source %d, decoded_bytes %d\n",
|
||||
error, i, soundSource[i].sample->decoder->filename, decoded_bytes);
|
||||
error, soundSource[i].sample->decoder->filename, i, decoded_bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,7 +696,7 @@ GetSoundData (void *data)
|
||||
|
||||
if (delta < 0)
|
||||
{
|
||||
fprintf (stderr, "GetSoundData(): something's messed with timing, delta %d\n", delta);
|
||||
fprintf (stderr, "GetSoundData(): something's messed with timing, delta %ld\n", delta);
|
||||
delta = 0;
|
||||
}
|
||||
else if (delta > (int)(soundSource[SPEECH_SOURCE].sbuf_size * 2))
|
||||
@@ -711,7 +711,8 @@ GetSoundData (void *data)
|
||||
if (pos % 2 == 1)
|
||||
pos++;
|
||||
|
||||
assert (pos >= 0);
|
||||
// pos is an unsigned data type; this assertion cannot fail!
|
||||
// assert (pos >= 0);
|
||||
|
||||
for (i = 0; i < RADAR_WIDTH - 2; ++i)
|
||||
{
|
||||
@@ -783,7 +784,8 @@ GetSoundData (void *data)
|
||||
if (pos % 2 == 1)
|
||||
pos++;
|
||||
|
||||
assert (pos >= 0);
|
||||
// pos is an unsigned type; this assertion cannot fail!
|
||||
// assert (pos >= 0);
|
||||
|
||||
for (i = 0; i < RADAR_WIDTH - 2; ++i)
|
||||
{
|
||||
|
||||
@@ -43,6 +43,9 @@ extern BOOLEAN DestroyVideo (VIDEO_REF VideoRef);
|
||||
extern VIDEO_TYPE VidPlay (VIDEO_REF VidRef, char *loopname, BOOLEAN
|
||||
uninit);
|
||||
extern void VidStop (void);
|
||||
|
||||
void DoFMV (char *name, char *loopname, BOOLEAN uninit);
|
||||
|
||||
/*
|
||||
extern BOOLEAN VidPlaying (void);*/
|
||||
|
||||
|
||||
@@ -79,12 +79,15 @@ LoadPlanet (BOOLEAN IsDefined)
|
||||
|
||||
pPlanetDesc = pSolarSysState->pOrbitalDesc;
|
||||
|
||||
|
||||
/*
|
||||
if (pPlanetDesc->data_index & PLANET_SHIELDED)
|
||||
; /* pSolarSysState->PlanetSideFrame[2] = CaptureDrawable (
|
||||
pSolarSysState->PlanetSideFrame[2] = CaptureDrawable (
|
||||
LoadGraphic (PLANET_SHIELDED_MASK_PMAP_ANIM)
|
||||
); */
|
||||
// else if (pSolarSysState->SysInfo.PlanetInfo.AtmoDensity != GAS_GIANT_ATMOSPHERE)
|
||||
// LoadLanderData ();
|
||||
);
|
||||
else if (pSolarSysState->SysInfo.PlanetInfo.AtmoDensity != GAS_GIANT_ATMOSPHERE)
|
||||
LoadLanderData ();
|
||||
*/
|
||||
|
||||
{
|
||||
extern void GeneratePlanetMask (PPLANET_DESC
|
||||
|
||||
@@ -1904,8 +1904,13 @@ ExploreSolarSys (void)
|
||||
|
||||
universe.x = LOGX_TO_UNIVERSE (GLOBAL_SIS (log_x));
|
||||
universe.y = LOGY_TO_UNIVERSE (GLOBAL_SIS (log_y));
|
||||
CurStarDescPtr = FindStar (0, &universe, 1, 1);
|
||||
/*
|
||||
// The following code used to be there, but the test is
|
||||
// pointless. Maybe we should panic here?
|
||||
if ((CurStarDescPtr = FindStar (0, &universe, 1, 1)) == 0)
|
||||
;
|
||||
*/
|
||||
}
|
||||
GLOBAL_SIS (log_x) = UNIVERSE_TO_LOGX (CurStarDescPtr->star_pt.x);
|
||||
GLOBAL_SIS (log_y) = UNIVERSE_TO_LOGY (CurStarDescPtr->star_pt.y);
|
||||
|
||||
Reference in New Issue
Block a user