- fix bad warnings

This commit is contained in:
Ilya Shurumov 2021-04-09 22:00:28 +06:00
parent c90b4e3bfd
commit eb67d47d6f
6 changed files with 19 additions and 17 deletions

View File

@ -526,7 +526,7 @@ int CutsceneCameraChange(int cameracnt)
return 0;
}
if (CutNextChange->next == -2)
if (CutNextChange->next == 254)
return 0;
}

View File

@ -230,7 +230,7 @@ TRI_POINT_LONG* debris_data[5] = {
VECTOR dummy = { 0 };
int gNight = 0;
char gRainCount = 30;
u_char gRainCount = 30;
int gEffectsTimer = 41;
int NextDamagedPmeter = 0;

View File

@ -30,7 +30,7 @@ extern TEXTURE_DETAILS lightref_texture;
extern VECTOR dummy;
extern int gNight;
extern char gRainCount;
extern u_char gRainCount;
extern int gEffectsTimer;
extern int lightning;
extern int variable_weather;

View File

@ -397,7 +397,7 @@ int CheckCameraChange(int CameraCnt)
return 0;
}
if (NextChange->next == -2)
if (NextChange->next == 254)
{
return 0;
}
@ -1758,7 +1758,7 @@ void ControlReplay(void)
{
if (MenuOffset != 0)
{
if (LastChange->prev != -1 && move == 5)
if (LastChange->prev != 0xFF && move == 5)
{
if (EditMode == 0)
{

View File

@ -1919,21 +1919,21 @@ int redriver2_main(int argc, char** argv)
for (int i = 1; i < argc; i++)
{
if (!_stricmp(argv[i], "-nofmv"))
if (!strcmp(argv[i], "-nofmv"))
{
gNoFMV = 1;
}
else if (!_stricmp(argv[i], "-nointro"))
else if (!strcmp(argv[i], "-nointro"))
{
// do nothing. All command line features use it
}
#ifdef DEBUG_OPTIONS
else if (!_stricmp(argv[i], "-exportxasubtitles"))
else if (!strcmp(argv[i], "-exportxasubtitles"))
{
extern void StoreXASubtitles();
StoreXASubtitles();
}
else if (!_stricmp(argv[i], "-startpos"))
else if (!strcmp(argv[i], "-startpos"))
{
if (argc - i < 3)
{
@ -1946,7 +1946,7 @@ int redriver2_main(int argc, char** argv)
i += 2;
}
else if (!_stricmp(argv[i], "-playercar"))
else if (!strcmp(argv[i], "-playercar"))
{
if (argc - i < 2)
{
@ -1956,7 +1956,7 @@ int redriver2_main(int argc, char** argv)
wantedCar[0] = atoi(argv[i + 1]);
i++;
}
else if (!_stricmp(argv[i], "-player2car"))
else if (!strcmp(argv[i], "-player2car"))
{
if (argc - i < 2)
{
@ -1966,7 +1966,7 @@ int redriver2_main(int argc, char** argv)
wantedCar[1] = atoi(argv[i + 1]);
i++;
}
else if (!_stricmp(argv[i], "-players"))
else if (!strcmp(argv[i], "-players"))
{
if (argc - i < 2)
{
@ -1976,7 +1976,7 @@ int redriver2_main(int argc, char** argv)
NumPlayers = atoi(argv[i + 1]);
i++;
}
else if (!_stricmp(argv[i], "-chase"))
else if (!strcmp(argv[i], "-chase"))
{
if (argc - i < 2)
{
@ -1987,7 +1987,7 @@ int redriver2_main(int argc, char** argv)
gChaseNumber = atoi(argv[i + 1]);
i++;
}
else if (!_stricmp(argv[i], "-mission"))
else if (!strcmp(argv[i], "-mission"))
{
if (argc - i < 2)
{
@ -2007,7 +2007,7 @@ int redriver2_main(int argc, char** argv)
LaunchGame();
}
#endif // _DEBUG_OPTIONS
else if (!_stricmp(argv[i], "-replay"))
else if (!strcmp(argv[i], "-replay"))
{
if (argc - i < 2)
{
@ -2056,7 +2056,7 @@ int redriver2_main(int argc, char** argv)
i++;
}
#ifdef CUTSCENE_RECORDER
else if (!_stricmp(argv[i], "-recordcutscene"))
else if (!strcmp(argv[i], "-recordcutscene"))
{
SetFEDrawMode();

View File

@ -32,7 +32,9 @@
#define printWarning PsyX_Log_Warning
#define printError PsyX_Log_Error
#if _MSC_VER >= 1400
#ifdef __EMSCRIPTEN__
#define trap(ode) {printError("EXCEPTION code: %x\n", ode);}
#elif _MSC_VER >= 1400
#define trap(ode) {printError("EXCEPTION code: %x\n", ode); __debugbreak();}
#elif defined(__GNUC__)
#define trap(ode) {__asm__("int3");}