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