ref: cac93fa12952faa16d4db9d5fadfda13170ee966
parent: fc4cce01b309c727b4dc2d1d1ea72f095e48cf57
author: Fabien Sanglard <[email protected]>
date: Thu Dec 13 21:38:14 EST 2012
Removed many silly warnings.
--- a/Engine/src/cache1d.c
+++ b/Engine/src/cache1d.c
@@ -65,7 +65,7 @@
int32_t lockrecip[200];
// TC game directory
-uint8_t game_dir[512] = { '\0' };
+char game_dir[512] = { '\0' };
void initcache(int32_t dacachestart, int32_t dacachesize)
{
--- a/Engine/src/cache1d.h
+++ b/Engine/src/cache1d.h
@@ -43,7 +43,7 @@
int32_t compress(uint8_t *lzwinbuf, int32_t uncompleng, uint8_t *lzwoutbuf);
int32_t uncompress(uint8_t *lzwinbuf, int32_t compleng, uint8_t *lzwoutbuf);
-extern uint8_t game_dir[512];
+extern char game_dir[512];
extern int32_t TCkopen4load(const char *filename, int readfromGRP);
#endif /* !defined _INCLUDE_CACHE1D_H_ */
--- a/Engine/src/engine.c
+++ b/Engine/src/engine.c
@@ -6664,13 +6664,13 @@
}
-void printext256(int32_t xpos, int32_t ypos, short col, short backcol, uint8_t name[82], uint8_t fontsize)
+void printext256(int32_t xpos, int32_t ypos, short col, short backcol, char name[82], uint8_t fontsize)
{
__printext256(xpos, ypos, col, backcol, name, fontsize, 1);
}
-void printext256_noupdate(int32_t xpos, int32_t ypos, short col, short backcol, uint8_t name[82], uint8_t fontsize)
+void printext256_noupdate(int32_t xpos, int32_t ypos, short col, short backcol, char name[82], uint8_t fontsize)
{
__printext256(xpos, ypos, col, backcol, name, fontsize, 0);
}
--- a/Engine/src/engine.h
+++ b/Engine/src/engine.h
@@ -61,10 +61,8 @@
int loadboard(char *filename, int32_t *daposx, int32_t *daposy,
int32_t *daposz, short *daang, short *dacursectnum);
void drawmasks(void);
-void printext256(int32_t xpos, int32_t ypos, short col, short backcol,
- uint8_t name[82], uint8_t fontsize);
-void printext256_noupdate(int32_t xpos, int32_t ypos, short col, short backcol,
- uint8_t name[82], uint8_t fontsize);
+void printext256(int32_t xpos, int32_t ypos, short col, short backcol,char name[82], uint8_t fontsize);
+void printext256_noupdate(int32_t xpos, int32_t ypos, short col, short backcol,char name[82], uint8_t fontsize);
void initengine(void);
void uninitengine(void);
--- a/Engine/src/engine_protos.h
+++ b/Engine/src/engine_protos.h
@@ -99,7 +99,7 @@
void setsocket(short newsocket);
short getpacket(short *other, uint8_t *bufptr);
void flushpackets(void);
-void genericmultifunction(int32_t other, uint8_t *bufptr, int32_t messleng, int32_t command);
+void genericmultifunction(int32_t other, char *bufptr, int32_t messleng, int32_t command);
/* engine.c */
extern int setgotpic(int32_t i1);
@@ -151,8 +151,8 @@
extern void getmousevalues(short *mousx, short *mousy, short *bstatus);
extern void draw2dgrid(int32_t posxe, int32_t posye, short ange, int32_t zoome, short gride);
extern void draw2dscreen(int32_t posxe, int32_t posye, short ange, int32_t zoome, short gride);
-extern void printext256(int32_t xpos, int32_t ypos, short col, short backcol, uint8_t name[82], uint8_t fontsize);
-extern void printext256_noupdate(int32_t xpos, int32_t ypos, short col, short backcol, uint8_t name[82], uint8_t fontsize);
+extern void printext256(int32_t xpos, int32_t ypos, short col, short backcol, char name[82], uint8_t fontsize);
+extern void printext256_noupdate(int32_t xpos, int32_t ypos, short col, short backcol, char name[82], uint8_t fontsize);
#ifdef DBGRECORD
extern int krand(int line, uint8_t * file);
#else
--- a/Engine/src/sdl_driver.c
+++ b/Engine/src/sdl_driver.c
@@ -266,7 +266,7 @@
}
#endif
}
-void genericmultifunction(int32_t other, uint8_t *bufptr, int32_t messleng, int32_t command)
+void genericmultifunction(int32_t other, char *bufptr, int32_t messleng, int32_t command)
{
#ifndef USER_DUMMY_NETWORK
switch(nNetMode)
@@ -1171,7 +1171,7 @@
{
int i;
int32_t timeElapsed;
- uint8_t dummyString[4096];
+ char dummyString[4096];
_argc = argc;
_argv = argv;
@@ -1476,10 +1476,10 @@
} /* setgamemode */
-static int get_dimensions_from_str(const uint8_t *str, int32_t *_w, int32_t *_h)
+static int get_dimensions_from_str(const char *str, int32_t *_w, int32_t *_h)
{
- uint8_t *xptr = NULL;
- uint8_t *ptr = NULL;
+ char *xptr = NULL;
+ char *ptr = NULL;
int32_t w = -1;
int32_t h = -1;
@@ -1551,7 +1551,7 @@
{
int32_t w;
int32_t h;
- const uint8_t *envr = getenv(BUILD_USERSCREENRES);
+ const char *envr = getenv(BUILD_USERSCREENRES);
if (envr == NULL)
return;
@@ -1587,7 +1587,7 @@
} /* get_physical_resolutions */
-static void remove_vesa_mode(int index, const uint8_t *reason)
+static void remove_vesa_mode(int index, const char *reason)
{
int i;
@@ -1683,8 +1683,8 @@
static __inline void output_vesa_modelist(void)
{
- uint8_t buffer[256];
- uint8_t numbuf[20];
+ char buffer[256];
+ char numbuf[20];
int i;
if (!_sdl_debug_file)
--- a/Game/src/config.c
+++ b/Game/src/config.c
@@ -171,7 +171,7 @@
===================
*/
-uint8_t * CONFIG_FunctionNumToName( int32 func )
+char * CONFIG_FunctionNumToName( int32 func )
{
if (-1 < func && func < NUMGAMEFUNCTIONS)
{
@@ -852,15 +852,15 @@
// FIX_00016: Build in Keyboard/mouse setup. Mouse now faster.
for(i=0; i<MAXMOUSEBUTTONS; i++)
{
- sprintf((uint8_t *)tempbuf, "MouseButton%d", i);
- SCRIPT_PutString(scripthandle, "Controls", (uint8_t *)tempbuf,
+ sprintf((char *)tempbuf, "MouseButton%d", i);
+ SCRIPT_PutString(scripthandle, "Controls", (char *)tempbuf,
(MouseMapping[i]!=-1)?CONFIG_FunctionNumToName(MouseMapping[i]):"");
}
for (i=0;i<MAXMOUSEAXES*2;i++)
{
- sprintf((uint8_t *)tempbuf, "MouseDigitalAxes%d_%d", i>>1, i&1);
- SCRIPT_PutString(scripthandle, "Controls", (uint8_t *)tempbuf,
+ sprintf((char *)tempbuf, "MouseDigitalAxes%d_%d", i>>1, i&1);
+ SCRIPT_PutString(scripthandle, "Controls", (char *)tempbuf,
(MouseDigitalAxeMapping[i>>1][i&1]!=-1)?CONFIG_FunctionNumToName(MouseDigitalAxeMapping[i>>1][i&1]):"");
}
--- a/Game/src/cvar_defs.c
+++ b/Game/src/cvar_defs.c
@@ -327,7 +327,7 @@
void CVARDEFS_FunctionHelp(void* var)
{
int i, numArgs, numCvars;
- uint8_t *helpcmd = CONSOLE_GetArgv(0);
+ char *helpcmd = CONSOLE_GetArgv(0);
numCvars = CVAR_GetNumCvarBindings();
numArgs = CONSOLE_GetArgc();
--- a/Game/src/duke3d.h
+++ b/Game/src/duke3d.h
@@ -30,6 +30,8 @@
#include <string.h>
#include <stdlib.h>
+
+
#include "platform.h"
#if !PLATFORM_MACOSX
#include <malloc.h>
@@ -369,7 +371,8 @@
extern short numanimwalls,probey,lastprobey;
extern uint8_t *mymembuf;
-extern uint8_t typebuflen,typebuf[41];
+extern uint8_t typebuflen;
+char typebuf[41];
extern uint8_t MusicPtr[72000];
extern int32_t msx[2048],msy[2048];
extern short cyclers[MAXCYCLERS][6],numcyclers;
@@ -509,7 +512,8 @@
uint8_t fakeplayer;
};
-extern uint8_t tempbuf[2048], packbuf[576];
+extern char tempbuf[2048];
+extern uint8_t packbuf[576];
extern int32_t gc,max_player_health,max_armour_amount,max_ammo_amount[MAX_WEAPONS];
--- a/Game/src/funct.h
+++ b/Game/src/funct.h
@@ -29,7 +29,7 @@
#include "duke3d.h"
-extern void sendscore(uint8_t *s);
+extern void sendscore(char *s);
//#line "sounds.c" 25
extern void SoundStartup(void );
//#line "sounds.c" 95
@@ -251,7 +251,7 @@
//#line "menues.c" 806
extern void dispnames(void );
//#line "menues.c" 832
-extern int getfilenames(uint8_t kind[]);
+extern int getfilenames(char kind[]);
//#line "menues.c" 865
extern void sortfilenames(void);
//#line "menues.c" 886
@@ -405,7 +405,7 @@
//#line "game.c" 5863
extern void comlinehelp(uint8_t **argv);
//#line "game.c" 5889
-extern void checkcommandline(int argc,uint8_t **argv);
+extern void checkcommandline(int argc,char **argv);
//#line "game.c" 6078
extern void printstr(short x,short y,uint8_t string[],uint8_t attribute);
//#line "game.c" 6104
@@ -477,7 +477,7 @@
//#line "config.c" 170
extern int32 CONFIG_FunctionNameToNum(char *func);
//#line "config.c" 192
-extern uint8_t *CONFIG_FunctionNumToName(int32 func);
+extern char *CONFIG_FunctionNumToName(int32 func);
//#line "config.c" 211
extern int32 CONFIG_AnalogNameToNum(char *func);
//#line "config.c" 240
--- a/Game/src/game.c
+++ b/Game/src/game.c
@@ -104,7 +104,8 @@
void __interrupt __far newint24( int errval, int ax, int bp, int si );
int recfilep,totalreccnt;
-uint8_t debug_on = 0,actor_tog = 0,*rtsptr,memorycheckoveride=0;
+uint8_t debug_on = 0,actor_tog = 0,memorycheckoveride=0;
+char *rtsptr;
@@ -393,7 +394,7 @@
#define MAXUSERQUOTES 4
int32_t quotebot, quotebotgoal;
short user_quote_time[MAXUSERQUOTES];
-uint8_t user_quote[MAXUSERQUOTES][128];
+char user_quote[MAXUSERQUOTES][128];
// uint8_t typebuflen,typebuf[41];
static void adduserquote(char *daquote)
@@ -410,9 +411,9 @@
pub = NUMPAGES;
}
-uint8_t *grpVersion2char_from_crc(unsigned int crc32_grp_to_identify)
+char *grpVersion2char_from_crc(unsigned int crc32_grp_to_identify)
{
- uint8_t *id;
+ char *id;
int i=0;
id = crc32lookup[MAX_KNOWN_GRP].name; // unknown version
@@ -655,7 +656,7 @@
if (SoundToggle == 0 || ud.lockout == 1 || FXDevice == NumSoundCards)
break;
- rtsptr = (uint8_t *)RTS_GetSound(packbuf[1]-1);
+ rtsptr = (char *)RTS_GetSound(packbuf[1]-1);
if (*rtsptr == 'C')
FX_PlayVOC3D(rtsptr,0,0,0,255,-packbuf[1]);
else
@@ -1101,7 +1102,7 @@
for(i=0;i<cacnum;i++)
if ((*cac[i].lock) >= 200)
{
- sprintf(tempbuf,"Locked- %ld: Leng:%ld, Lock:%ld",i,cac[i].leng,*cac[i].lock);
+ sprintf(tempbuf,"Locked- %d: Leng:%d, Lock:%d",i,cac[i].leng,*cac[i].lock);
printext256(0L,k,31,-1,tempbuf,1); k += 6;
}
@@ -1110,7 +1111,7 @@
for(i=1;i<11;i++)
if (lumplockbyte[i] >= 200)
{
- sprintf(tempbuf,"RTS Locked %ld:",i);
+ sprintf(tempbuf,"RTS Locked %d:",i);
printext256(0L,k,31,-1,tempbuf,1); k += 6;
}
@@ -1452,7 +1453,7 @@
void weaponnum(short ind,int32_t x,int32_t y,int32_t num1, int32_t num2,uint8_t ha)
{
- uint8_t dabuf[80] = {0};
+ char dabuf[80] = {0};
rotatesprite((x-7)<<16,y<<16,65536L,0,THREEBYFIVE+ind+1,ha-10,7,10+128,0,0,xdim-1,ydim-1);
rotatesprite((x-3)<<16,y<<16,65536L,0,THREEBYFIVE+10,ha,0,10+128,0,0,xdim-1,ydim-1);
@@ -1461,7 +1462,7 @@
if(num1 > 99) num1 = 99;
if(num2 > 99) num2 = 99;
- sprintf(dabuf,"%ld",num1);
+ sprintf(dabuf,"%d",num1);
if(num1 > 9)
{
rotatesprite((x)<<16,y<<16,65536L,0,THREEBYFIVE+dabuf[0]-'0',ha,0,10+128,0,0,xdim-1,ydim-1);
@@ -1469,7 +1470,7 @@
}
else rotatesprite((x+4)<<16,y<<16,65536L,0,THREEBYFIVE+dabuf[0]-'0',ha,0,10+128,0,0,xdim-1,ydim-1);
- sprintf(dabuf,"%ld",num2);
+ sprintf(dabuf,"%d",num2);
if(num2 > 9)
{
rotatesprite((x+13)<<16,y<<16,65536L,0,THREEBYFIVE+dabuf[0]-'0',ha,0,10+128,0,0,xdim-1,ydim-1);
@@ -1648,7 +1649,7 @@
void digitalnumber(int32_t x,int32_t y,int32_t n,uint8_t s,uint8_t cs)
{
short i, j, k, p, c;
- uint8_t b[10];
+ char b[10];
//
// uint8_t * ltoa(int32_t l, uint8_t * buffer, int radix);
@@ -1655,7 +1656,7 @@
// is NON-STANDARD and equivalent to STANDARD
// (void) sprintf(buffer, "%ld", l);
//ltoa(n,b,10);
- sprintf(b,"%ld",n);
+ sprintf(b,"%d",n);
i = strlen(b);
j = 0;
@@ -2227,27 +2228,27 @@
y = 16;
}
- sprintf(tempbuf,"X= %ld",ps[snum].posx);
+ sprintf((char*)tempbuf,"X= %d",ps[snum].posx);
printext256(x,y,31,-1,tempbuf,1);
- sprintf(tempbuf,"Y= %ld",ps[snum].posy);
+ sprintf((char*)tempbuf,"Y= %d",ps[snum].posy);
printext256(x,y+7L,31,-1,tempbuf,1);
- sprintf(tempbuf,"Z= %ld",ps[snum].posz);
+ sprintf((char*)tempbuf,"Z= %d",ps[snum].posz);
printext256(x,y+14L,31,-1,tempbuf,1);
- sprintf(tempbuf,"A= %ld",ps[snum].ang);
+ sprintf((char*)tempbuf,"A= %d",ps[snum].ang);
printext256(x,y+21L,31,-1,tempbuf,1);
- sprintf(tempbuf,"ZV= %ld",ps[snum].poszv);
+ sprintf((char*)tempbuf,"ZV= %d",ps[snum].poszv);
printext256(x,y+28L,31,-1,tempbuf,1);
- sprintf(tempbuf,"OG= %ld",ps[snum].on_ground);
+ sprintf((char*)tempbuf,"OG= %d",ps[snum].on_ground);
printext256(x,y+35L,31,-1,tempbuf,1);
- sprintf(tempbuf,"AM= %ld",ps[snum].ammo_amount[GROW_WEAPON]);
+ sprintf((char*)tempbuf,"AM= %d",ps[snum].ammo_amount[GROW_WEAPON]);
printext256(x,y+43L,31,-1,tempbuf,1);
- sprintf(tempbuf,"LFW= %ld",ps[snum].last_full_weapon);
+ sprintf((char*)tempbuf,"LFW= %d",ps[snum].last_full_weapon);
printext256(x,y+50L,31,-1,tempbuf,1);
- sprintf(tempbuf,"SECTL= %ld",sector[ps[snum].cursectnum].lotag);
+ sprintf((char*)tempbuf,"SECTL= %d",sector[ps[snum].cursectnum].lotag);
printext256(x,y+57L,31,-1,tempbuf,1);
- sprintf(tempbuf,"SEED= %ld",randomseed);
+ sprintf((char*)tempbuf,"SEED= %d",randomseed);
printext256(x,y+64L,31,-1,tempbuf,1);
- sprintf(tempbuf,"THOLD= %ld",ps[snum].transporter_hold);
+ sprintf((char*)tempbuf,"THOLD= %d",ps[snum].transporter_hold);
printext256(x,y+64L+7,31,-1,tempbuf,1);
}
@@ -2380,7 +2381,7 @@
void gameexit(char *msg)
{
short i;
- uint8_t t[256];
+ char t[256];
strncpy(t,msg,256); t[255] = 0;
@@ -2525,7 +2526,8 @@
if( c == 999 ) return(0);
if( c == 998 )
{
- uint8_t b[41],ii;
+ char b[41];
+ uint8_t ii;
for(ii=0;ii<inputloc;ii++)
b[ii] = '*';
b[ii] = 0;
@@ -5207,7 +5209,7 @@
if(j == 0)
{
- sprintf(tempbuf,"Subway found no zero'd sectors with locators\nat (%ld,%ld).\n",sp->x,sp->y);
+ sprintf(tempbuf,"Subway found no zero'd sectors with locators\nat (%d,%d).\n",sp->x,sp->y);
gameexit(tempbuf);
}
@@ -7095,7 +7097,7 @@
printf("\n");
}
-void checkcommandline(int argc,uint8_t **argv)
+void checkcommandline(int argc,char **argv)
{
short i, j;
uint8_t *c;
@@ -7778,7 +7780,7 @@
}
-void sendscore(uint8_t *s)
+void sendscore(char *s)
{
if(numplayers > 1)
genericmultifunction(-1,s,strlen(s)+1,5);
@@ -7962,7 +7964,7 @@
fp = (FILE *)fopen("debug.txt","rt+");
- fprintf(fp,"%ld %ld %ld %ld %ld %ld %ld\n",a1,a2,a3,a4,vx,vy,vz);
+ fprintf(fp,"%d %d %d %d %d %d %d\n",a1,a2,a3,a4,vx,vy,vz);
fclose(fp);
@@ -8291,35 +8293,6 @@
setvmode(0x03);
-// This is needed for the icculus.org ported Build Engine.
-#if !PLATFORM_DOS
- //get the config entry for fullscreen
-
-
- // Are we trying to load a mod?
- if(game_dir[0] != '\0')
- {
- //FILE *fp = NULL;
- uint8_t setupfilename[128];
-
- //Yes
- sprintf(setupfilename, "%s\\%s", game_dir, SETUPFILENAME);
- iScriptHandle = SCRIPT_Load(setupfilename);
- }else
- {
- iScriptHandle = SCRIPT_Load(SETUPFILENAME);
- }
-
- if(iScriptHandle != -1)
- {
- SCRIPT_GetNumber(iScriptHandle, "Screen Setup", "Fullscreen",&BFullScreen);
- SCRIPT_Free(iScriptHandle);
- iScriptHandle = -1;
- }
-
- _platform_init(argc, argv, "Duke Nukem 3D", "Duke3D");
-#endif
-
setmmxoverlay(getenv("BUILD_NOPENTIUM") == NULL);
todd[0] = 'T';
@@ -8345,12 +8318,12 @@
puts("You don't have enough free memory to run Duke Nukem 3D.");
puts("The DOS \"mem\" command should report 6,800K (or 6.8 megs)");
puts("of \"total memory free\".\n");
- printf("Duke Nukem 3D requires %ld more bytes to run.\n",3162000-350000-totalmemory);
+ printf("Duke Nukem 3D requires %d more bytes to run.\n",3162000-350000-totalmemory);
Error(EXIT_SUCCESS, "");
}
}
else
- printf("Using %ld bytes for heap.\n",totalmemory);
+ printf("Using %d bytes for heap.\n",totalmemory);
#ifndef ONELEVELDEMO
// CTW - REMOVED
@@ -8827,7 +8800,7 @@
int32_t dummylong = 0;
uint8_t ver;
short i;
- uint8_t fullpathdemofilename[16];
+ char fullpathdemofilename[16];
if(ud.recstat == 2) kclose(recfilep);
@@ -10151,7 +10124,7 @@
minitext(23,80," NAME KILLS",8,2+8+16+128);
for(i=0;i<playerswhenstarted;i++)
{
- sprintf(tempbuf,"%-4ld",i+1);
+ sprintf(tempbuf,"%-4d",i+1);
minitext(92+(i*23),80,tempbuf,3,2+8+16+128);
}
@@ -10158,7 +10131,7 @@
for(i=0;i<playerswhenstarted;i++)
{
xfragtotal = 0;
- sprintf(tempbuf,"%ld",i+1);
+ sprintf(tempbuf,"%d",i+1);
minitext(30,90+t,tempbuf,0,2+8+16+128);
minitext(38,90+t,ud.user_name[i],ps[i].palookup,2+8+16+128);
@@ -10167,13 +10140,13 @@
{
if(i == y)
{
- sprintf(tempbuf,"%-4ld",ps[y].fraggedself);
+ sprintf(tempbuf,"%-4d",ps[y].fraggedself);
minitext(92+(y*23),90+t,tempbuf,2,2+8+16+128);
xfragtotal -= ps[y].fraggedself;
}
else
{
- sprintf(tempbuf,"%-4ld",frags[i][y]);
+ sprintf(tempbuf,"%-4d",frags[i][y]);
minitext(92+(y*23),90+t,tempbuf,0,2+8+16+128);
xfragtotal += frags[i][y];
}
@@ -10180,12 +10153,12 @@
if(myconnectindex == connecthead)
{
- sprintf(tempbuf,"stats %ld killed %ld %ld\n",i+1,y+1,frags[i][y]);
+ sprintf(tempbuf,"stats %d killed %d %d\n",i+1,y+1,frags[i][y]);
sendscore(tempbuf);
}
}
- sprintf(tempbuf,"%-4ld",xfragtotal);
+ sprintf(tempbuf,"%-4d",xfragtotal);
minitext(101+(8*23),90+t,tempbuf,2,2+8+16+128);
t += 7;
@@ -10200,7 +10173,7 @@
yfragtotal += ps[i].fraggedself;
yfragtotal += frags[i][y];
}
- sprintf(tempbuf,"%-4ld",yfragtotal);
+ sprintf(tempbuf,"%-4d",yfragtotal);
minitext(92+(y*23),96+(8*7),tempbuf,2,2+8+16+128);
}
@@ -10365,7 +10338,7 @@
bonuscnt++;
sound(PIPEBOMB_EXPLODE);
}
- sprintf(tempbuf,"%-3ld",ps[myconnectindex].actors_killed);
+ sprintf(tempbuf,"%-3d",ps[myconnectindex].actors_killed);
gametext((320>>2)+70,93+9,tempbuf,0,2+8+16);
if(ud.player_skill > 3 )
{
@@ -10375,8 +10348,8 @@
else
{
if( (ps[myconnectindex].max_actors_killed-ps[myconnectindex].actors_killed) < 0 )
- sprintf(tempbuf,"%-3ld",0);
- else sprintf(tempbuf,"%-3ld",ps[myconnectindex].max_actors_killed-ps[myconnectindex].actors_killed);
+ sprintf(tempbuf,"%-3d",0);
+ else sprintf(tempbuf,"%-3d",ps[myconnectindex].max_actors_killed-ps[myconnectindex].actors_killed);
gametext((320>>2)+70,99+4+9,tempbuf,0,2+8+16);
}
}
@@ -10394,11 +10367,11 @@
bonuscnt++;
sound(PIPEBOMB_EXPLODE);
}
- sprintf(tempbuf,"%-3ld",ps[myconnectindex].secret_rooms);
+ sprintf(tempbuf,"%-3d",ps[myconnectindex].secret_rooms);
gametext((320>>2)+70,120+9,tempbuf,0,2+8+16);
if( ps[myconnectindex].secret_rooms > 0 )
- sprintf(tempbuf,"%-3ld",(100*ps[myconnectindex].secret_rooms/ps[myconnectindex].max_secret_rooms));
- sprintf(tempbuf,"%-3ld",ps[myconnectindex].max_secret_rooms-ps[myconnectindex].secret_rooms);
+ sprintf(tempbuf,"%-3d",(100*ps[myconnectindex].secret_rooms/ps[myconnectindex].max_secret_rooms));
+ sprintf(tempbuf,"%-3d",ps[myconnectindex].max_secret_rooms-ps[myconnectindex].secret_rooms);
gametext((320>>2)+70,130+9,tempbuf,0,2+8+16);
}
}
@@ -10757,7 +10730,7 @@
if(ud.multimode>1) // if more than 1 player, we add name. Then add score if DM
{
- strcat((uint8_t *)tempbuf, " [");
+ strcat(tempbuf, " [");
for(i=connecthead;i>=0;i=connectpoint2[i])
{
if(!ud.user_name[i][0])
--- a/Game/src/global.c
+++ b/Game/src/global.c
@@ -91,7 +91,8 @@
char fta_quotes[NUMOFFIRSTTIMEACTIVE][64];
-uint8_t tempbuf[2048], packbuf[576];
+char tempbuf[2048];
+uint8_t packbuf[576];
char buf[80];
@@ -162,7 +163,8 @@
uint8_t actortype[MAXTILES];
-uint8_t display_mirror,typebuflen,typebuf[41];
+uint8_t display_mirror,typebuflen;
+char typebuf[41];
char music_fn[4][11][13];
uint8_t music_select;
@@ -520,7 +522,7 @@
exit (errorType);
}
-void write2disk(int line, uint8_t * cfilename, uint8_t *filename2write, uint8_t *message)
+void write2disk(int line, char * cfilename, char *filename2write, char *message)
{
// usage: write2disk(__LINE__, __FILE__, "c:\temp\my_dbug_file.txt", uint8_t * msg);
--- a/Game/src/menues.c
+++ b/Game/src/menues.c
@@ -1267,7 +1267,7 @@
#else
-int getfilenames(uint8_t kind[6])
+int getfilenames(char kind[6])
{
/* !!! FIXME: Visual C? */
#if (defined __WATCOMC__)
@@ -1716,15 +1716,15 @@
dispnames();
- sprintf(tempbuf,"PLAYERS: %-2d ",numplr);
- gametext(160,158,tempbuf,0,2+8+16);
+ sprintf((char*)tempbuf,"PLAYERS: %-2d ",numplr);
+ gametext(160,158,(char*)tempbuf,0,2+8+16);
- sprintf(tempbuf,"EPISODE: %-2d / LEVEL: %-2d / SKILL: %-2d",1+volnum,1+levnum,plrskl);
- gametext(160,170,tempbuf,0,2+8+16);
+ sprintf((char*)tempbuf,"EPISODE: %-2d / LEVEL: %-2d / SKILL: %-2d",1+volnum,1+levnum,plrskl);
+ gametext(160,170,(char*)tempbuf,0,2+8+16);
gametext(160,90,"LOAD game:",0,2+8+16);
- sprintf(tempbuf,"\"%s\"",ud.savegame[current_menu-1000]);
- gametext(160,99,tempbuf,0,2+8+16);
+ sprintf((char*)tempbuf,"\"%s\"",ud.savegame[current_menu-1000]);
+ gametext(160,99,(char*)tempbuf,0,2+8+16);
gametext(160,99+9,"(Y/N)",0,2+8+16);
_handle_events();
@@ -3647,8 +3647,8 @@
rotatesprite(160<<16,29<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
menutext(320>>1,34,0,0,&ud.user_name[myconnectindex][0]);
- sprintf(tempbuf,"Waiting for master");
- gametext(160,50,tempbuf,0,2+8+16);
+ sprintf((char*)tempbuf,"Waiting for master");
+ gametext(160,50,(char*)tempbuf,0,2+8+16);
gametext(160,59,"to select level",0,2+8+16);
if( KB_KeyPressed(sc_Escape) )