dp_doom: fix two warnings in old linuxdoom code
This commit is contained in:
parent
f1281295ee
commit
92bfba237f
2 changed files with 37 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Emacs style mode select -*- C++ -*-
|
// Emacs style mode select -*- C++ -*-
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Id:$
|
// $Id:$
|
||||||
|
@ -177,7 +177,7 @@ const char* const mapnames2[] = // DOOM 2 map names.
|
||||||
HUSTR_9,
|
HUSTR_9,
|
||||||
HUSTR_10,
|
HUSTR_10,
|
||||||
HUSTR_11,
|
HUSTR_11,
|
||||||
|
|
||||||
HUSTR_12,
|
HUSTR_12,
|
||||||
HUSTR_13,
|
HUSTR_13,
|
||||||
HUSTR_14,
|
HUSTR_14,
|
||||||
|
@ -187,7 +187,7 @@ const char* const mapnames2[] = // DOOM 2 map names.
|
||||||
HUSTR_18,
|
HUSTR_18,
|
||||||
HUSTR_19,
|
HUSTR_19,
|
||||||
HUSTR_20,
|
HUSTR_20,
|
||||||
|
|
||||||
HUSTR_21,
|
HUSTR_21,
|
||||||
HUSTR_22,
|
HUSTR_22,
|
||||||
HUSTR_23,
|
HUSTR_23,
|
||||||
|
@ -216,7 +216,7 @@ const char* const mapnamesp[] = // Plutonia WAD map names.
|
||||||
PHUSTR_9,
|
PHUSTR_9,
|
||||||
PHUSTR_10,
|
PHUSTR_10,
|
||||||
PHUSTR_11,
|
PHUSTR_11,
|
||||||
|
|
||||||
PHUSTR_12,
|
PHUSTR_12,
|
||||||
PHUSTR_13,
|
PHUSTR_13,
|
||||||
PHUSTR_14,
|
PHUSTR_14,
|
||||||
|
@ -226,7 +226,7 @@ const char* const mapnamesp[] = // Plutonia WAD map names.
|
||||||
PHUSTR_18,
|
PHUSTR_18,
|
||||||
PHUSTR_19,
|
PHUSTR_19,
|
||||||
PHUSTR_20,
|
PHUSTR_20,
|
||||||
|
|
||||||
PHUSTR_21,
|
PHUSTR_21,
|
||||||
PHUSTR_22,
|
PHUSTR_22,
|
||||||
PHUSTR_23,
|
PHUSTR_23,
|
||||||
|
@ -255,7 +255,7 @@ const char* const mapnamest[] = // TNT WAD map names.
|
||||||
THUSTR_9,
|
THUSTR_9,
|
||||||
THUSTR_10,
|
THUSTR_10,
|
||||||
THUSTR_11,
|
THUSTR_11,
|
||||||
|
|
||||||
THUSTR_12,
|
THUSTR_12,
|
||||||
THUSTR_13,
|
THUSTR_13,
|
||||||
THUSTR_14,
|
THUSTR_14,
|
||||||
|
@ -265,7 +265,7 @@ const char* const mapnamest[] = // TNT WAD map names.
|
||||||
THUSTR_18,
|
THUSTR_18,
|
||||||
THUSTR_19,
|
THUSTR_19,
|
||||||
THUSTR_20,
|
THUSTR_20,
|
||||||
|
|
||||||
THUSTR_21,
|
THUSTR_21,
|
||||||
THUSTR_22,
|
THUSTR_22,
|
||||||
THUSTR_23,
|
THUSTR_23,
|
||||||
|
@ -392,7 +392,7 @@ void HU_Init(void)
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
char buffer[9];
|
char buffer[17];
|
||||||
|
|
||||||
if (language == french)
|
if (language == french)
|
||||||
shiftxform = french_shiftxform;
|
shiftxform = french_shiftxform;
|
||||||
|
@ -440,7 +440,7 @@ void HU_Start(void)
|
||||||
HU_TITLEX, HU_TITLEY,
|
HU_TITLEX, HU_TITLEY,
|
||||||
hu_font,
|
hu_font,
|
||||||
HU_FONTSTART);
|
HU_FONTSTART);
|
||||||
|
|
||||||
switch ( gamemode )
|
switch ( gamemode )
|
||||||
{
|
{
|
||||||
case shareware:
|
case shareware:
|
||||||
|
@ -457,13 +457,13 @@ void HU_Start(void)
|
||||||
s = HU_TITLET;
|
s = HU_TITLET;
|
||||||
break;
|
break;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
case commercial:
|
case commercial:
|
||||||
default:
|
default:
|
||||||
s = HU_TITLE2;
|
s = HU_TITLE2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*s)
|
while (*s)
|
||||||
HUlib_addCharToTextLine(&w_title, *(s++));
|
HUlib_addCharToTextLine(&w_title, *(s++));
|
||||||
|
|
||||||
|
@ -556,7 +556,7 @@ void HU_Ticker(void)
|
||||||
HUlib_addMessageToSText(&w_message,
|
HUlib_addMessageToSText(&w_message,
|
||||||
player_names[i],
|
player_names[i],
|
||||||
w_inputbuffer[i].l.l);
|
w_inputbuffer[i].l.l);
|
||||||
|
|
||||||
message_nottobefuckedwith = true;
|
message_nottobefuckedwith = true;
|
||||||
message_on = true;
|
message_on = true;
|
||||||
message_counter = HU_MSGTIMEOUT;
|
message_counter = HU_MSGTIMEOUT;
|
||||||
|
@ -623,7 +623,7 @@ boolean HU_Responder(const event_t *ev)
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
int i;
|
int i;
|
||||||
int numplayers;
|
int numplayers;
|
||||||
|
|
||||||
static const char destination_keys[MAXPLAYERS] =
|
static const char destination_keys[MAXPLAYERS] =
|
||||||
{
|
{
|
||||||
HUSTR_KEYGREEN,
|
HUSTR_KEYGREEN,
|
||||||
|
@ -631,7 +631,7 @@ boolean HU_Responder(const event_t *ev)
|
||||||
HUSTR_KEYBROWN,
|
HUSTR_KEYBROWN,
|
||||||
HUSTR_KEYRED
|
HUSTR_KEYRED
|
||||||
};
|
};
|
||||||
|
|
||||||
static int num_nobrainers = 0;
|
static int num_nobrainers = 0;
|
||||||
|
|
||||||
numplayers = 0;
|
numplayers = 0;
|
||||||
|
@ -708,15 +708,15 @@ boolean HU_Responder(const event_t *ev)
|
||||||
return false;
|
return false;
|
||||||
// fprintf(stderr, "got here\n");
|
// fprintf(stderr, "got here\n");
|
||||||
macromessage = chat_macros[c];
|
macromessage = chat_macros[c];
|
||||||
|
|
||||||
// kill last message with a '\n'
|
// kill last message with a '\n'
|
||||||
HU_queueChatChar(KEY_ENTER); // DEBUG!!!
|
HU_queueChatChar(KEY_ENTER); // DEBUG!!!
|
||||||
|
|
||||||
// send the macro message
|
// send the macro message
|
||||||
while (*macromessage)
|
while (*macromessage)
|
||||||
HU_queueChatChar(*macromessage++);
|
HU_queueChatChar(*macromessage++);
|
||||||
HU_queueChatChar(KEY_ENTER);
|
HU_queueChatChar(KEY_ENTER);
|
||||||
|
|
||||||
// leave chat mode and notify that it was sent
|
// leave chat mode and notify that it was sent
|
||||||
chat_on = false;
|
chat_on = false;
|
||||||
strcpy(lastmessage, chat_macros[c]);
|
strcpy(lastmessage, chat_macros[c]);
|
||||||
|
@ -734,7 +734,7 @@ boolean HU_Responder(const event_t *ev)
|
||||||
{
|
{
|
||||||
// static unsigned char buf[20]; // DEBUG
|
// static unsigned char buf[20]; // DEBUG
|
||||||
HU_queueChatChar(c);
|
HU_queueChatChar(c);
|
||||||
|
|
||||||
// sprintf(buf, "KEY: %d => %d", ev->data1, c);
|
// sprintf(buf, "KEY: %d => %d", ev->data1, c);
|
||||||
// plr->message = buf;
|
// plr->message = buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Emacs style mode select -*- C++ -*-
|
// Emacs style mode select -*- C++ -*-
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Id:$
|
// $Id:$
|
||||||
|
@ -79,7 +79,7 @@ M_DrawText
|
||||||
x += 4;
|
x += 4;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
w = SHORT (hu_font[c]->width);
|
w = SHORT (hu_font[c]->width);
|
||||||
if (x+w > SCREENWIDTH)
|
if (x+w > SCREENWIDTH)
|
||||||
break;
|
break;
|
||||||
|
@ -107,7 +107,7 @@ M_WriteFile
|
||||||
{
|
{
|
||||||
FILE* handle;
|
FILE* handle;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
handle = fopen ( name, "wb");
|
handle = fopen ( name, "wb");
|
||||||
|
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
|
@ -115,10 +115,10 @@ M_WriteFile
|
||||||
|
|
||||||
count = fwrite (source, 1, length, handle);
|
count = fwrite (source, 1, length, handle);
|
||||||
fclose (handle);
|
fclose (handle);
|
||||||
|
|
||||||
if (count < length)
|
if (count < length)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ M_ReadFile
|
||||||
FILE* handle;
|
FILE* handle;
|
||||||
long count, length;
|
long count, length;
|
||||||
byte *buf;
|
byte *buf;
|
||||||
|
|
||||||
handle = fopen (name, "rb");
|
handle = fopen (name, "rb");
|
||||||
if (handle != NULL)
|
if (handle != NULL)
|
||||||
{
|
{
|
||||||
|
@ -298,11 +298,11 @@ void M_SaveDefaults (void)
|
||||||
int i;
|
int i;
|
||||||
int v;
|
int v;
|
||||||
FILE* f;
|
FILE* f;
|
||||||
|
|
||||||
f = fopen (defaultfile, "w");
|
f = fopen (defaultfile, "w");
|
||||||
if (!f)
|
if (!f)
|
||||||
return; // can't write the file, but don't complain
|
return; // can't write the file, but don't complain
|
||||||
|
|
||||||
for (i=0 ; i<numdefaults ; i++)
|
for (i=0 ; i<numdefaults ; i++)
|
||||||
{
|
{
|
||||||
if (!defaults[i].is_string)
|
if (!defaults[i].is_string)
|
||||||
|
@ -314,7 +314,7 @@ void M_SaveDefaults (void)
|
||||||
* (const char **) (defaults[i].location));
|
* (const char **) (defaults[i].location));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose (f);
|
fclose (f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ void M_LoadDefaults (void)
|
||||||
char* newstring;
|
char* newstring;
|
||||||
int parm;
|
int parm;
|
||||||
boolean isstring;
|
boolean isstring;
|
||||||
|
|
||||||
// set everything to base values
|
// set everything to base values
|
||||||
numdefaults = sizeof(defaults)/sizeof(defaults[0]);
|
numdefaults = sizeof(defaults)/sizeof(defaults[0]);
|
||||||
for (i=0 ; i<numdefaults ; i++)
|
for (i=0 ; i<numdefaults ; i++)
|
||||||
|
@ -344,7 +344,7 @@ void M_LoadDefaults (void)
|
||||||
else
|
else
|
||||||
*defaults[i].location = defaults[i].defaultvalue;
|
*defaults[i].location = defaults[i].defaultvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for a custom default file
|
// check for a custom default file
|
||||||
i = M_CheckParm ("-config");
|
i = M_CheckParm ("-config");
|
||||||
if (i && i<myargc-1)
|
if (i && i<myargc-1)
|
||||||
|
@ -354,7 +354,7 @@ void M_LoadDefaults (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
defaultfile = basedefault;
|
defaultfile = basedefault;
|
||||||
|
|
||||||
// read the file in, overriding any set defaults
|
// read the file in, overriding any set defaults
|
||||||
f = fopen (defaultfile, "r");
|
f = fopen (defaultfile, "r");
|
||||||
if (f)
|
if (f)
|
||||||
|
@ -387,7 +387,7 @@ void M_LoadDefaults (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose (f);
|
fclose (f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -580,7 +580,7 @@ WriteBMPfile
|
||||||
|
|
||||||
for (i = 0; i < height; ++i)
|
for (i = 0; i < height; ++i)
|
||||||
{
|
{
|
||||||
unsigned int j;
|
//unsigned int j;
|
||||||
|
|
||||||
bmp_pointer = &bmp[bitmap_offset + rounded_width * (height - i - 1)];
|
bmp_pointer = &bmp[bitmap_offset + rounded_width * (height - i - 1)];
|
||||||
|
|
||||||
|
@ -603,16 +603,16 @@ void M_ScreenShot (void)
|
||||||
int i;
|
int i;
|
||||||
byte* linear;
|
byte* linear;
|
||||||
char lbmname[12];
|
char lbmname[12];
|
||||||
|
|
||||||
// munge planar buffer to linear
|
// munge planar buffer to linear
|
||||||
linear = screens[2];
|
linear = screens[2];
|
||||||
I_ReadScreen (linear);
|
I_ReadScreen (linear);
|
||||||
|
|
||||||
// find a file name to save it to
|
// find a file name to save it to
|
||||||
strcpy(lbmname,"DOOM00.pcx");
|
strcpy(lbmname,"DOOM00.pcx");
|
||||||
if (bmp_screenshots)
|
if (bmp_screenshots)
|
||||||
strcpy(&lbmname[7],"bmp");
|
strcpy(&lbmname[7],"bmp");
|
||||||
|
|
||||||
for (i=0 ; i<=99 ; i++)
|
for (i=0 ; i<=99 ; i++)
|
||||||
{
|
{
|
||||||
lbmname[4] = i/10 + '0';
|
lbmname[4] = i/10 + '0';
|
||||||
|
@ -622,12 +622,12 @@ void M_ScreenShot (void)
|
||||||
}
|
}
|
||||||
if (i==100)
|
if (i==100)
|
||||||
I_Error ("M_ScreenShot: Couldn't create a screenshot");
|
I_Error ("M_ScreenShot: Couldn't create a screenshot");
|
||||||
|
|
||||||
// save the screenshot file
|
// save the screenshot file
|
||||||
(bmp_screenshots ? WriteBMPfile : WritePCXfile) (lbmname, linear,
|
(bmp_screenshots ? WriteBMPfile : WritePCXfile) (lbmname, linear,
|
||||||
SCREENWIDTH, SCREENHEIGHT,
|
SCREENWIDTH, SCREENHEIGHT,
|
||||||
W_CacheLumpName ("PLAYPAL",PU_CACHE));
|
W_CacheLumpName ("PLAYPAL",PU_CACHE));
|
||||||
|
|
||||||
players[consoleplayer].message = "screen shot";
|
players[consoleplayer].message = "screen shot";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue