mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- use Printf as the only command to print to the console.
All uses of OSD_Printf, initprintf etc. have been renamed.
This commit is contained in:
parent
588162e083
commit
66ecb05eb8
88 changed files with 1071 additions and 1127 deletions
|
@ -2462,10 +2462,10 @@ void actInit(bool bSaveLoad) {
|
|||
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
if (!gModernMap) {
|
||||
//initprintf("> This map *does not* provides modern features.\n");
|
||||
//Printf("> This map *does not* provides modern features.\n");
|
||||
nnExtResetGlobals();
|
||||
} else {
|
||||
//initprintf("> This map provides modern features.\n");
|
||||
//Printf("> This map provides modern features.\n");
|
||||
nnExtInitModernStuff(bSaveLoad);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -166,7 +166,7 @@ int RFS::Open(int lumpnum)
|
|||
{
|
||||
auto hFile = fileSystem.OpenFileReader(lumpnum);
|
||||
if (!hFile.isOpen()) {
|
||||
initprintf("BARF: Error opening file %d", lumpnum);
|
||||
Printf("BARF: Error opening file %d", lumpnum);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ int RFS::Open(int lumpnum)
|
|||
buffer.Resize(fileSize);
|
||||
_ptr = buffer.Data();
|
||||
if (_ptr == NULL) {
|
||||
initprintf("BARF: Not enough memory to read %d", lumpnum);
|
||||
Printf("BARF: Not enough memory to read %d", lumpnum);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ void RFS::ScriptError(const char *message)
|
|||
msg.Push('^');
|
||||
msg.Push(0);
|
||||
|
||||
initprintf("Error in %s line %d: %s\n\n%s", _fileName, _curLine, message, msg.Data());
|
||||
Printf("Error in %s line %d: %s\n\n%s", _fileName, _curLine, message, msg.Data());
|
||||
}
|
||||
|
||||
uint8_t RFS::GetNextTag()
|
||||
|
|
|
@ -441,7 +441,7 @@ int G_TryMapHack(const char* mhkfile)
|
|||
int const failure = engineLoadMHK(mhkfile);
|
||||
|
||||
if (!failure)
|
||||
initprintf("Loaded map hack file \"%s\"\n", mhkfile);
|
||||
Printf("Loaded map hack file \"%s\"\n", mhkfile);
|
||||
|
||||
return failure;
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ void StartLevel(GAMEOPTIONS *gameOptions)
|
|||
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
if (!gModernMap)
|
||||
OSD_Printf("> Modern types erased: %d.\n", modernTypesErased);
|
||||
Printf("> Modern types erased: %d.\n", modernTypesErased);
|
||||
#endif
|
||||
|
||||
scrLoadPLUs();
|
||||
|
@ -1061,10 +1061,10 @@ int GameInterface::app_main()
|
|||
|
||||
HookReplaceFunctions();
|
||||
|
||||
initprintf("Initializing Build 3D engine\n");
|
||||
Printf("Initializing Build 3D engine\n");
|
||||
scrInit();
|
||||
|
||||
initprintf("Loading tiles\n");
|
||||
Printf("Loading tiles\n");
|
||||
if (pUserTiles)
|
||||
{
|
||||
FStringf buffer("%s%%03i.ART", pUserTiles);
|
||||
|
@ -1087,33 +1087,33 @@ int GameInterface::app_main()
|
|||
if (!loaddefinitionsfile(defsfile))
|
||||
{
|
||||
uint32_t etime = timerGetTicks();
|
||||
initprintf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
Printf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
}
|
||||
loaddefinitions_game(defsfile, FALSE);
|
||||
powerupInit();
|
||||
initprintf("Loading cosine table\n");
|
||||
Printf("Loading cosine table\n");
|
||||
trigInit(gSysRes);
|
||||
initprintf("Initializing view subsystem\n");
|
||||
Printf("Initializing view subsystem\n");
|
||||
viewInit();
|
||||
initprintf("Initializing dynamic fire\n");
|
||||
Printf("Initializing dynamic fire\n");
|
||||
FireInit();
|
||||
initprintf("Initializing weapon animations\n");
|
||||
Printf("Initializing weapon animations\n");
|
||||
WeaponInit();
|
||||
LoadSaveSetup();
|
||||
LoadSavedInfo();
|
||||
gDemo.LoadDemoInfo();
|
||||
initprintf("There are %d demo(s) in the loop\n", gDemo.at59ef);
|
||||
initprintf("Loading control setup\n");
|
||||
Printf("There are %d demo(s) in the loop\n", gDemo.at59ef);
|
||||
Printf("Loading control setup\n");
|
||||
ctrlInit();
|
||||
timerInit(120);
|
||||
timerSetCallback(ClockStrobe);
|
||||
// PORT-TODO: CD audio init
|
||||
|
||||
initprintf("Initializing network users\n");
|
||||
Printf("Initializing network users\n");
|
||||
netInitialize(true);
|
||||
scrSetGameMode(0, 0, 0, 0);
|
||||
hud_size.Callback();
|
||||
initprintf("Initializing sound system\n");
|
||||
Printf("Initializing sound system\n");
|
||||
sndInit();
|
||||
gChoke.sub_83ff0(518, sub_84230);
|
||||
if (bAddUserMap)
|
||||
|
@ -1133,7 +1133,7 @@ RESTART:
|
|||
gViewIndex = myconnectindex;
|
||||
gMe = gView = &gPlayer[myconnectindex];
|
||||
netBroadcastPlayerInfo(myconnectindex);
|
||||
initprintf("Waiting for network players!\n");
|
||||
Printf("Waiting for network players!\n");
|
||||
netWaitForEveryone(0);
|
||||
if (gRestartGame)
|
||||
{
|
||||
|
@ -1355,12 +1355,12 @@ static void parsedefinitions_game_include(const char *fileName, scriptfile *pScr
|
|||
{
|
||||
if (!Bstrcasecmp(cmdtokptr,"null") || pScript == NULL) // this is a bit overboard to prevent unused parameter warnings
|
||||
{
|
||||
// initprintf("Warning: Failed including %s as module\n", fn);
|
||||
// Printf("Warning: Failed including %s as module\n", fn);
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
Printf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
}
|
||||
*/
|
||||
|
@ -1487,7 +1487,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
{
|
||||
if (musicID==NULL)
|
||||
{
|
||||
initprintf("Error: missing ID for music definition near line %s:%d\n",
|
||||
Printf("Error: missing ID for music definition near line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
@ -1496,7 +1496,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
break;
|
||||
|
||||
if (S_DefineMusic(musicID, fileName) == -1)
|
||||
initprintf("Error: invalid music ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
Printf("Error: invalid music ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1613,7 +1613,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)tile >= MAXUSERTILES))
|
||||
{
|
||||
initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
Printf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript,texturetokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1623,7 +1623,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
int32_t const orig_crc32 = tileGetCRC32(tile);
|
||||
if (orig_crc32 != tile_crc32)
|
||||
{
|
||||
// initprintf("CRC32 of tile %d doesn't match! CRC32: %d, Expected: %d\n", tile, orig_crc32, tile_crc32);
|
||||
// Printf("CRC32 of tile %d doesn't match! CRC32: %d, Expected: %d\n", tile, orig_crc32, tile_crc32);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1633,7 +1633,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
vec2_16_t const orig_size = tilesiz[tile];
|
||||
if (orig_size.x != tile_size.x && orig_size.y != tile_size.y)
|
||||
{
|
||||
// initprintf("Size of tile %d doesn't match! Size: (%d, %d), Expected: (%d, %d)\n", tile, orig_size.x, orig_size.y, tile_size.x, tile_size.y);
|
||||
// Printf("Size of tile %d doesn't match! Size: (%d, %d), Expected: (%d, %d)\n", tile, orig_size.x, orig_size.y, tile_size.x, tile_size.y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1740,7 +1740,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
if (!animPtr)
|
||||
{
|
||||
initprintf("Error: expected animation filename on line %s:%d\n",
|
||||
Printf("Error: expected animation filename on line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
@ -1785,7 +1785,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
{
|
||||
if (soundNum==-1)
|
||||
{
|
||||
initprintf("Error: missing ID for sound definition near line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
Printf("Error: missing ID for sound definition near line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1794,7 +1794,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
// maybe I should have just packed this into a sound_t and passed a reference...
|
||||
if (S_DefineSound(soundNum, fileName, minpitch, maxpitch, priority, type, distance, volume) == -1)
|
||||
initprintf("Error: invalid sound ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
Printf("Error: invalid sound ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -597,7 +597,7 @@ unsigned int dbReadMapCRC(const char *pPath)
|
|||
|
||||
if (!pNode)
|
||||
{
|
||||
initprintf("Error opening map file %s", pPath);
|
||||
Printf("Error opening map file %s", pPath);
|
||||
return -1;
|
||||
}
|
||||
char *pData = (char*)gSysRes.Lock(pNode);
|
||||
|
@ -660,7 +660,7 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
|||
|
||||
if (!pNode)
|
||||
{
|
||||
initprintf("Error opening map file %s", pPath);
|
||||
Printf("Error opening map file %s", pPath);
|
||||
return -1;
|
||||
}
|
||||
char *pData = (char*)gSysRes.Lock(pNode);
|
||||
|
@ -673,7 +673,7 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
|||
#endif
|
||||
if (memcmp(header.signature, "BLM\x1a", 4))
|
||||
{
|
||||
initprintf("Map file corrupted");
|
||||
Printf("Map file corrupted");
|
||||
gSysRes.Unlock(pNode);
|
||||
return -1;
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
|||
#endif
|
||||
|
||||
} else {
|
||||
initprintf("Map file is wrong version");
|
||||
Printf("Map file is wrong version");
|
||||
gSysRes.Unlock(pNode);
|
||||
return -1;
|
||||
}
|
||||
|
@ -739,14 +739,14 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
|||
}
|
||||
else
|
||||
{
|
||||
initprintf("Corrupted Map file");
|
||||
Printf("Corrupted Map file");
|
||||
gSysRes.Unlock(pNode);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (mapHeader.at16)
|
||||
{
|
||||
initprintf("Corrupted Map file");
|
||||
Printf("Corrupted Map file");
|
||||
gSysRes.Unlock(pNode);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1117,7 +1117,7 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
|||
md4once((unsigned char*)pData, nSize, g_loadedMapHack.md4);
|
||||
if (Bcrc32(pData, nSize-4, 0) != nCRC)
|
||||
{
|
||||
initprintf("Map File does not match CRC");
|
||||
Printf("Map File does not match CRC");
|
||||
gSysRes.Unlock(pNode);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1137,14 +1137,14 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
|||
}
|
||||
else
|
||||
{
|
||||
initprintf("Corrupted Map file");
|
||||
Printf("Corrupted Map file");
|
||||
gSysRes.Unlock(pNode);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (gSongId != 0)
|
||||
{
|
||||
initprintf("Corrupted Map file");
|
||||
Printf("Corrupted Map file");
|
||||
gSysRes.Unlock(pNode);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ void _consoleSysMsg(const char* pzFormat, ...) {
|
|||
va_start(args, pzFormat);
|
||||
vsprintf(buffer, pzFormat, args);
|
||||
|
||||
OSD_Printf(OSDTEXT_RED "%s(%i): %s\n", _module, _line, buffer);
|
||||
Printf(OSDTEXT_RED "%s(%i): %s\n", _module, _line, buffer);
|
||||
}
|
||||
|
||||
END_BLD_NS
|
||||
|
|
|
@ -911,7 +911,7 @@ void netInitialize(bool bConsole)
|
|||
}
|
||||
if (!gHaveNetworking)
|
||||
{
|
||||
initprintf("An error occurred while initializing ENet.\n");
|
||||
Printf("An error occurred while initializing ENet.\n");
|
||||
netResetToSinglePlayer();
|
||||
return;
|
||||
}
|
||||
|
@ -924,7 +924,7 @@ void netInitialize(bool bConsole)
|
|||
gNetENetServer = enet_host_create(&gNetENetAddress, 8, BLOOD_ENET_CHANNEL_MAX, 0, 0);
|
||||
if (!gNetENetServer)
|
||||
{
|
||||
initprintf("An error occurred while trying to create an ENet server host.\n");
|
||||
Printf("An error occurred while trying to create an ENet server host.\n");
|
||||
netDeinitialize();
|
||||
netResetToSinglePlayer();
|
||||
return;
|
||||
|
@ -966,7 +966,7 @@ void netInitialize(bool bConsole)
|
|||
char ipaddr[32];
|
||||
|
||||
enet_address_get_host_ip(&event.peer->address, ipaddr, sizeof(ipaddr));
|
||||
initprintf("Client connected: %s:%u\n", ipaddr, event.peer->address.port);
|
||||
Printf("Client connected: %s:%u\n", ipaddr, event.peer->address.port);
|
||||
numplayers++;
|
||||
for (int i = 1; i < kMaxPlayers; i++)
|
||||
{
|
||||
|
@ -990,7 +990,7 @@ void netInitialize(bool bConsole)
|
|||
char ipaddr[32];
|
||||
|
||||
enet_address_get_host_ip(&event.peer->address, ipaddr, sizeof(ipaddr));
|
||||
initprintf("Client disconnected: %s:%u\n", ipaddr, event.peer->address.port);
|
||||
Printf("Client disconnected: %s:%u\n", ipaddr, event.peer->address.port);
|
||||
numplayers--;
|
||||
for (int i = 1; i < kMaxPlayers; i++)
|
||||
{
|
||||
|
@ -1023,7 +1023,7 @@ void netInitialize(bool bConsole)
|
|||
}
|
||||
enet_host_service(gNetENetServer, NULL, 0);
|
||||
}
|
||||
initprintf("All clients connected\n");
|
||||
Printf("All clients connected\n");
|
||||
|
||||
dassert(numplayers >= 1);
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ void netInitialize(bool bConsole)
|
|||
{
|
||||
ENetEvent event;
|
||||
sprintf(buffer, "Connecting to %s:%u", gNetAddress, gNetPort);
|
||||
initprintf("%s\n", buffer);
|
||||
Printf("%s\n", buffer);
|
||||
if (!bConsole)
|
||||
{
|
||||
viewLoadingScreen(2518, "Network Game", NULL, buffer);
|
||||
|
@ -1083,16 +1083,16 @@ void netInitialize(bool bConsole)
|
|||
gNetENetPeer = enet_host_connect(gNetENetClient, &gNetENetAddress, BLOOD_ENET_CHANNEL_MAX, 0);
|
||||
if (!gNetENetPeer)
|
||||
{
|
||||
initprintf("No available peers for initiating an ENet connection.\n");
|
||||
Printf("No available peers for initiating an ENet connection.\n");
|
||||
netDeinitialize();
|
||||
netResetToSinglePlayer();
|
||||
return;
|
||||
}
|
||||
if (enet_host_service(gNetENetClient, &event, 5000) > 0 && event.type == ENET_EVENT_TYPE_CONNECT)
|
||||
initprintf("Connected to %s:%i\n", gNetAddress, gNetPort);
|
||||
Printf("Connected to %s:%i\n", gNetAddress, gNetPort);
|
||||
else
|
||||
{
|
||||
initprintf("Could not connect to %s:%i\n", gNetAddress, gNetPort);
|
||||
Printf("Could not connect to %s:%i\n", gNetAddress, gNetPort);
|
||||
netDeinitialize();
|
||||
return;
|
||||
}
|
||||
|
@ -1125,12 +1125,12 @@ void netInitialize(bool bConsole)
|
|||
switch (event.type)
|
||||
{
|
||||
case ENET_EVENT_TYPE_DISCONNECT:
|
||||
initprintf("Lost connection to server\n");
|
||||
Printf("Lost connection to server\n");
|
||||
netDeinitialize();
|
||||
netResetToSinglePlayer();
|
||||
return;
|
||||
case ENET_EVENT_TYPE_RECEIVE:
|
||||
//initprintf("NETEVENT\n");
|
||||
//Printf("NETEVENT\n");
|
||||
if (event.channelID == BLOOD_ENET_SERVICE)
|
||||
{
|
||||
char *pPacket = (char*)event.packet->data;
|
||||
|
@ -1143,14 +1143,14 @@ void netInitialize(bool bConsole)
|
|||
connecthead = connectinfo->connecthead;
|
||||
for (int i = 0; i < numplayers; i++)
|
||||
connectpoint2[i] = connectinfo->connectpoint2[i];
|
||||
//initprintf("BLOOD_SERVICE_CONNECTINFO\n");
|
||||
//Printf("BLOOD_SERVICE_CONNECTINFO\n");
|
||||
break;
|
||||
}
|
||||
case BLOOD_SERVICE_CONNECTID:
|
||||
dassert(numplayers > 1);
|
||||
myconnectindex = GetPacketByte(pPacket);
|
||||
bWaitServer = false;
|
||||
//initprintf("BLOOD_SERVICE_CONNECTID\n");
|
||||
//Printf("BLOOD_SERVICE_CONNECTID\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1162,7 +1162,7 @@ void netInitialize(bool bConsole)
|
|||
}
|
||||
}
|
||||
enet_host_service(gNetENetClient, NULL, 0);
|
||||
initprintf("Successfully connected to server\n");
|
||||
Printf("Successfully connected to server\n");
|
||||
}
|
||||
gNetENetInit = true;
|
||||
gGameOptions.nGameType = 2;
|
||||
|
@ -1197,7 +1197,7 @@ void netDeinitialize(void)
|
|||
void netPostEPacket(ENetPacket *pEPacket)
|
||||
{
|
||||
//static int number;
|
||||
//initprintf("netPostEPacket %i\n", number++);
|
||||
//Printf("netPostEPacket %i\n", number++);
|
||||
gNetPacketFifo[gNetPacketHead] = pEPacket;
|
||||
gNetPacketHead = (gNetPacketHead+1)%kENetFifoSize;
|
||||
}
|
||||
|
@ -1287,7 +1287,7 @@ void netUpdate(void)
|
|||
switch (event.type)
|
||||
{
|
||||
case ENET_EVENT_TYPE_DISCONNECT:
|
||||
initprintf("Lost connection to server\n");
|
||||
Printf("Lost connection to server\n");
|
||||
netDeinitialize();
|
||||
netResetToSinglePlayer();
|
||||
gQuitGame = gRestartGame = true;
|
||||
|
|
|
@ -236,7 +236,7 @@ void nnExtInitModernStuff(bool bSaveLoad) {
|
|||
}
|
||||
|
||||
if (!gAllowTrueRandom)
|
||||
initprintf("> True randomness is not available, using in-game random function(s)");
|
||||
Printf("> True randomness is not available, using in-game random function(s)");
|
||||
|
||||
for (int i = 0; i < kMaxXSprites; i++) {
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
|
||||
if (!fileSystem.Lookup(filename, "MAP"))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "map: file \"%s\" not found.\n", filename);
|
||||
Printf(OSD_ERROR "map: file \"%s\" not found.\n", filename);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -100,13 +100,13 @@ static int osdcmd_demo(osdcmdptr_t parm)
|
|||
{
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
//if (g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
//{
|
||||
// OSD_Printf("demo: Must not be in a game.\n");
|
||||
// Printf("demo: Must not be in a game.\n");
|
||||
// return OSDCMD_OK;
|
||||
//}
|
||||
|
||||
|
@ -125,7 +125,7 @@ static int osdcmd_give(osdcmdptr_t parm)
|
|||
{
|
||||
if (numplayers != 1 || !gGameStarted || gMe->pXSprite->health == 0)
|
||||
{
|
||||
OSD_Printf("give: Cannot give while dead or not in a single-player game.\n");
|
||||
Printf("give: Cannot give while dead or not in a single-player game.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ static int osdcmd_god(osdcmdptr_t UNUSED(parm))
|
|||
gCheatMgr.m_bPlayerCheated = true;
|
||||
}
|
||||
else
|
||||
OSD_Printf("god: Not in a single-player game.\n");
|
||||
Printf("god: Not in a single-player game.\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ static int osdcmd_noclip(osdcmdptr_t UNUSED(parm))
|
|||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("noclip: Not in a single-player game.\n");
|
||||
Printf("noclip: Not in a single-player game.\n");
|
||||
}
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
|
|
@ -147,7 +147,7 @@ void scrLoadPalette(void)
|
|||
#endif
|
||||
|
||||
paletteloaded = 0;
|
||||
initprintf("Loading palettes\n");
|
||||
Printf("Loading palettes\n");
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
DICTNODE *pPal = gSysRes.Lookup(PAL[i].name, "PAL");
|
||||
|
@ -161,7 +161,7 @@ void scrLoadPalette(void)
|
|||
paletteloaded |= PALETTE_MAIN;
|
||||
scrLoadPLUs();
|
||||
paletteloaded |= PALETTE_SHADE;
|
||||
initprintf("Loading translucency table\n");
|
||||
Printf("Loading translucency table\n");
|
||||
DICTNODE *pTrans = gSysRes.Lookup("TRANS", "TLU");
|
||||
if (!pTrans)
|
||||
ThrowError("TRANS.TLU not found");
|
||||
|
@ -222,14 +222,14 @@ void scrSetDac(void)
|
|||
|
||||
void scrInit(void)
|
||||
{
|
||||
initprintf("Initializing engine\n");
|
||||
Printf("Initializing engine\n");
|
||||
#ifdef USE_OPENGL
|
||||
glrendmode = REND_POLYMOST;
|
||||
#endif
|
||||
engineInit();
|
||||
curPalette = 0;
|
||||
curGamma = 0;
|
||||
initprintf("Loading gamma correction table\n");
|
||||
Printf("Loading gamma correction table\n");
|
||||
DICTNODE *pGamma = gSysRes.Lookup("gamma", "DAT");
|
||||
if (!pGamma)
|
||||
ThrowError("Gamma table not found");
|
||||
|
|
|
@ -44,7 +44,7 @@ void qloadvoxel(int32_t nVoxel)
|
|||
static int nLastVoxel = 0;
|
||||
DICTNODE *hVox = gSysRes.Lookup(nVoxel, "KVX");
|
||||
if (!hVox) {
|
||||
initprintf("Missing voxel #%d (max voxels: %d)", nVoxel, kMaxVoxels);
|
||||
Printf("Missing voxel #%d (max voxels: %d)", nVoxel, kMaxVoxels);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1803,7 +1803,7 @@ int dword_172CE0[16][3];
|
|||
|
||||
void viewInit(void)
|
||||
{
|
||||
initprintf("Initializing status bar\n");
|
||||
Printf("Initializing status bar\n");
|
||||
InitStatusBar();
|
||||
FontSet(0, 4096, 0);
|
||||
FontSet(1, 4192, 1);
|
||||
|
|
|
@ -90,7 +90,7 @@ enable_if_t<is_integral<T>::value, size_t> buildprintpiece(T x)
|
|||
while (--numChars);
|
||||
}
|
||||
|
||||
initputs(str);
|
||||
PrintString(PRINT_HIGH, str);
|
||||
return totalChars;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ enable_if_t<is_integral<T>::value, size_t> buildprintpiece(binwrap<T> x)
|
|||
for (int p = 0; p < numChars; ++p)
|
||||
str[numChars - 1 - p] = '0' + (char)((data >> p) & 1);
|
||||
|
||||
initputs(str);
|
||||
PrintString(PRINT_HIGH, str);
|
||||
return numChars;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ enable_if_t<is_integral<T>::value, size_t> buildprintpiece(octwrap<T> x)
|
|||
for (int p = 0; p < numChars; ++p)
|
||||
str[numChars - 1 - p] = '0' + (char)((data >> (p*3)) & 7);
|
||||
|
||||
initputs(str);
|
||||
PrintString(PRINT_HIGH, str);
|
||||
return numChars;
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ enable_if_t<is_integral<T>::value, size_t> buildprintpiece(hexwrap<T> x)
|
|||
for (int p = 0; p < numChars; ++p)
|
||||
str[numChars - 1 - p] = hexletters[(int)((data >> (p<<2)) & 0xF)];
|
||||
|
||||
initputs(str);
|
||||
PrintString(PRINT_HIGH, str);
|
||||
return numChars;
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ enable_if_t<is_integral<T>::value, size_t> buildprintpiece(HEXwrap<T> x)
|
|||
for (int p = 0; p < numChars; ++p)
|
||||
str[numChars - 1 - p] = HEXletters[(int)((data >> (p<<2)) & 0xF)];
|
||||
|
||||
initputs(str);
|
||||
PrintString(PRINT_HIGH, str);
|
||||
return numChars;
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ FORCE_INLINE size_t buildprintpiece(const T * x)
|
|||
|
||||
FORCE_INLINE size_t buildprintpiece(char const *str)
|
||||
{
|
||||
initputs(str);
|
||||
PrintString(PRINT_HIGH, str);
|
||||
return strlen(str);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,14 +129,14 @@ int32_t animvpx_read_ivf_header(FileReader & inhandle, animvpx_ivf_header_t *hdr
|
|||
if (hdr->fpsdenom==0 || hdr->fpsnumer==0)
|
||||
return 5; // "invalid framerate numerator or denominator"
|
||||
|
||||
initprintf("animvpx: rate is %d frames / %d seconds (%.03f fps).\n",
|
||||
Printf("animvpx: rate is %d frames / %d seconds (%.03f fps).\n",
|
||||
hdr->fpsnumer, hdr->fpsdenom, (double)hdr->fpsnumer/hdr->fpsdenom);
|
||||
}
|
||||
else
|
||||
{
|
||||
double fps = (hdr->fpsdenom==0) ? 0.0 : (double)hdr->fpsnumer/hdr->fpsdenom;
|
||||
|
||||
initprintf("animvpx: set rate to 30 fps (header says %d frames / %d seconds = %.03f fps).\n",
|
||||
Printf("animvpx: set rate to 30 fps (header says %d frames / %d seconds = %.03f fps).\n",
|
||||
hdr->fpsnumer, hdr->fpsdenom, fps);
|
||||
|
||||
/* Don't know FPS for sure, and don't have readahead code
|
||||
|
@ -236,7 +236,7 @@ static int32_t animvpx_read_frame(FileReader & inhandle, uint8_t **bufptr, uint3
|
|||
if (hdr.framesiz == 0)
|
||||
return 6; // must be 6, see animvpx_nextpic_errmsg[]
|
||||
|
||||
// OSD_Printf("frame size: %u\n", hdr.framesiz);
|
||||
// Printf("frame size: %u\n", hdr.framesiz);
|
||||
|
||||
if (!*bufptr)
|
||||
{
|
||||
|
@ -338,7 +338,7 @@ read_ivf_frame:
|
|||
}
|
||||
#endif
|
||||
if (corrupted)
|
||||
OSD_Printf("warning: corrupted frame!\n");
|
||||
Printf("warning: corrupted frame!\n");
|
||||
}
|
||||
|
||||
img = vpx_codec_get_frame(&codec->codec, &codec->iter);
|
||||
|
@ -494,7 +494,7 @@ void animvpx_print_stats(const animvpx_codec_ctx *codec)
|
|||
const int32_t *m = codec->maxtimes;
|
||||
int32_t n = codec->numframes;
|
||||
|
||||
initprintf("VP8 timing stats (mean, max) [ms] for %d frames:\n"
|
||||
Printf("VP8 timing stats (mean, max) [ms] for %d frames:\n"
|
||||
" read and decode frame: %.02f, %d\n"
|
||||
" 3 planes -> packed conversion: %.02f, %d\n"
|
||||
" upload and display: %.02f, %d\n",
|
||||
|
|
|
@ -125,13 +125,13 @@ int32_t engineLoadClipMaps(void)
|
|||
continue;
|
||||
// Numsprites will now be set!
|
||||
|
||||
initprintf("Loading clip map: %s\n", g_clipMapFiles[fi].GetChars());
|
||||
Printf("Loading clip map: %s\n", g_clipMapFiles[fi].GetChars());
|
||||
|
||||
if (ournumsectors+numsectors>MAXSECTORS ||
|
||||
ournumwalls+numwalls>MAXWALLS ||
|
||||
ournumsprites+Numsprites>MAXSPRITES)
|
||||
{
|
||||
initprintf("clip map: warning: exceeded limits when loading %s, aborting.\n", g_clipMapFiles[fi].GetChars());
|
||||
Printf("clip map: warning: exceeded limits when loading %s, aborting.\n", g_clipMapFiles[fi].GetChars());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ int32_t engineLoadClipMaps(void)
|
|||
|
||||
if (numclipmaps >= CM_MAX)
|
||||
{
|
||||
initprintf("warning: reached max clip map number %d, not processing any more\n", CM_MAX);
|
||||
Printf("warning: reached max clip map number %d, not processing any more\n", CM_MAX);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ int32_t engineLoadClipMaps(void)
|
|||
for (fi = 0; fi < g_clipMapFilesNum; ++fi)
|
||||
if (k>=fisec[fi])
|
||||
break;
|
||||
initprintf("clip map \"%s\": error: tried to chain picnum %d (sprite %d) in sector %d which"
|
||||
Printf("clip map \"%s\": error: tried to chain picnum %d (sprite %d) in sector %d which"
|
||||
" already belongs to picnum %d.\n", g_clipMapFiles[fi].GetChars(), pn, i-fispr[fi], k-fisec[fi],
|
||||
clipinfo[sectoidx[k]].picnum);
|
||||
engineInitClipMaps();
|
||||
|
@ -274,7 +274,7 @@ int32_t engineLoadClipMaps(void)
|
|||
for (fi = 0; fi < g_clipMapFilesNum; ++fi)
|
||||
if (i>=fispr[fi])
|
||||
break;
|
||||
initprintf("clip map \"%s\": warning: sprite %d pointing neither northward nor southward. %s will be wrong.\n",
|
||||
Printf("clip map \"%s\": warning: sprite %d pointing neither northward nor southward. %s will be wrong.\n",
|
||||
g_clipMapFiles[fi].GetChars(), i-fispr[fi], (sprite[i].cstat&48)==32 ? "Scaling and flipping" : "X-flipping");
|
||||
}
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ int32_t engineLoadClipMaps(void)
|
|||
for (fi = 0; fi < g_clipMapFilesNum; ++fi)
|
||||
if (ns>=fisec[fi])
|
||||
break;
|
||||
initprintf("clip map \"%s\": error: encountered more than one outer sector (%d and %d)"
|
||||
Printf("clip map \"%s\": error: encountered more than one outer sector (%d and %d)"
|
||||
" for sprite %d.\n", g_clipMapFiles[fi].GetChars(), outersect-fisec[fi], ns-fisec[fi], i-fispr[fi]);
|
||||
engineInitClipMaps();
|
||||
|
||||
|
@ -329,7 +329,7 @@ int32_t engineLoadClipMaps(void)
|
|||
for (fi = 0; fi < g_clipMapFilesNum; ++fi)
|
||||
if (ns>=fisec[fi])
|
||||
break;
|
||||
initprintf("clip map \"%s\": error: encountered sector %d belonging to index %d"
|
||||
Printf("clip map \"%s\": error: encountered sector %d belonging to index %d"
|
||||
" while collecting sectors for sprite %d (index %d).\n",
|
||||
g_clipMapFiles[fi].GetChars(), ns-fisec[fi], sectoidx[ns], i-fispr[fi], numclipmaps);
|
||||
engineInitClipMaps();
|
||||
|
@ -345,7 +345,7 @@ int32_t engineLoadClipMaps(void)
|
|||
|
||||
if (outersect==-1)
|
||||
{
|
||||
initprintf("clip map: INTERNAL ERROR: outersect==-1!\n");
|
||||
Printf("clip map: INTERNAL ERROR: outersect==-1!\n");
|
||||
engineInitClipMaps();
|
||||
|
||||
Xfree(fisec);
|
||||
|
@ -512,7 +512,7 @@ int32_t engineLoadClipMaps(void)
|
|||
initspritelists();
|
||||
|
||||
if (lwcp > 0)
|
||||
initprintf("Loaded clip map%s.\n", lwcp==1 ? "" : "s");
|
||||
Printf("Loaded clip map%s.\n", lwcp==1 ? "" : "s");
|
||||
|
||||
Xfree(fisec);
|
||||
Xfree(fispr);
|
||||
|
@ -649,7 +649,7 @@ int32_t clipsprite_try(uspriteptr_t const spr, int32_t xmin, int32_t ymin, int32
|
|||
|
||||
if (clipspritenum < MAXCLIPNUM)
|
||||
clipspritelist[clipspritenum++] = spr-(uspritetype *)sprite;
|
||||
//initprintf("%d: clip sprite[%d]\n",clipspritenum,j);
|
||||
//Printf("%d: clip sprite[%d]\n",clipspritenum,j);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -709,7 +709,7 @@ int32_t clipsprite_initindex(int32_t curidx, uspriteptr_t const curspr, int32_t
|
|||
|
||||
sec->floorz = daz + mulscale22(scalez, CM_FLOORZ(j));
|
||||
sec->ceilingz = daz + mulscale22(scalez, CM_CEILINGZ(j));
|
||||
//initprintf("sec %d: f=%d, c=%d\n", j, sec->floorz, sec->ceilingz);
|
||||
//Printf("sec %d: f=%d, c=%d\n", j, sec->floorz, sec->ceilingz);
|
||||
|
||||
for (int w=startwall; w<endwall; w++)
|
||||
{
|
||||
|
@ -1010,7 +1010,7 @@ static void clipupdatesector(vec2_t const pos, int16_t * const sectnum, int wall
|
|||
|
||||
if (nsecs > (walldist + 8))
|
||||
{
|
||||
OSD_Printf("%s():%d shortest distance between origin point (%d, %d) and sector %d is %d. Sector may be corrupt!\n",
|
||||
Printf("%s():%d shortest distance between origin point (%d, %d) and sector %d is %d. Sector may be corrupt!\n",
|
||||
EDUKE32_FUNCTION, __LINE__, pos.x, pos.y, *sectnum, nsecs);
|
||||
walldist = 0x7fff;
|
||||
}
|
||||
|
@ -1115,7 +1115,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
|
|||
// one bunch of sectors completed (either the very first
|
||||
// one or a sector-like sprite one), prepare the next
|
||||
|
||||
//initprintf("init sprite %d\n", clipspritecnt);
|
||||
//Printf("init sprite %d\n", clipspritecnt);
|
||||
if (!curspr)
|
||||
{
|
||||
// init sector-like sprites for clipping
|
||||
|
@ -1142,7 +1142,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
|
|||
|
||||
int const dasect = clipsectorlist[clipsectcnt++];
|
||||
//if (curspr)
|
||||
// initprintf("sprite %d/%d: sect %d/%d (%d)\n", clipspritecnt,clipspritenum, clipsectcnt,clipsectnum,dasect);
|
||||
// Printf("sprite %d/%d: sect %d/%d (%d)\n", clipspritecnt,clipspritenum, clipsectcnt,clipsectnum,dasect);
|
||||
|
||||
////////// Walls //////////
|
||||
|
||||
|
@ -1271,10 +1271,10 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
|
|||
}
|
||||
|
||||
if (clipmove_warned & 1)
|
||||
OSD_Printf("clipsectnum >= MAXCLIPSECTORS!\n");
|
||||
Printf("clipsectnum >= MAXCLIPSECTORS!\n");
|
||||
|
||||
if (clipmove_warned & 2)
|
||||
OSD_Printf("clipnum >= MAXCLIPNUM!\n");
|
||||
Printf("clipnum >= MAXCLIPNUM!\n");
|
||||
|
||||
////////// Sprites //////////
|
||||
|
||||
|
|
|
@ -148,16 +148,16 @@ static void defsparser_include(const char *fn, const scriptfile *script, const c
|
|||
if (EDUKE32_PREDICT_FALSE(!included))
|
||||
{
|
||||
if (!cmdtokptr)
|
||||
initprintf("Warning: Failed including %s as module\n", fn);
|
||||
Printf("Warning: Failed including %s as module\n", fn);
|
||||
else
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
Printf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!cmdtokptr)
|
||||
{
|
||||
initprintf("Loading module \"%s\"\n",fn);
|
||||
Printf("Loading module \"%s\"\n",fn);
|
||||
}
|
||||
|
||||
defsparser(included);
|
||||
|
@ -171,14 +171,14 @@ static int32_t check_tile_range(const char *defcmd, int32_t *tilebeg, int32_t *t
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE(*tileend < *tilebeg))
|
||||
{
|
||||
initprintf("Warning: %s: backwards tile range on line %s:%d\n", defcmd,
|
||||
Printf("Warning: %s: backwards tile range on line %s:%d\n", defcmd,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
swaplong(tilebeg, tileend);
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)*tilebeg >= MAXUSERTILES || (unsigned)*tileend >= MAXUSERTILES))
|
||||
{
|
||||
initprintf("Error: %s: Invalid tile range on line %s:%d\n", defcmd,
|
||||
Printf("Error: %s: Invalid tile range on line %s:%d\n", defcmd,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
return 1;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ static int32_t check_tile(const char *defcmd, int32_t tile, const scriptfile *sc
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)tile >= MAXUSERTILES))
|
||||
{
|
||||
initprintf("Error: %s: Invalid tile number on line %s:%d\n", defcmd,
|
||||
Printf("Error: %s: Invalid tile number on line %s:%d\n", defcmd,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
return 1;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
#ifdef USE_DEF_PROGRESS
|
||||
if (++iter >= 50)
|
||||
{
|
||||
initprintf(".");
|
||||
Printf(".");
|
||||
iter = 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -305,7 +305,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
switch (tokn)
|
||||
{
|
||||
case T_ERROR:
|
||||
initprintf("Error on line %s:%d.\n", script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
Printf("Error on line %s:%d.\n", script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case T_EOF:
|
||||
return 0;
|
||||
|
@ -330,7 +330,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (scriptfile_getsymbol(script,&number)) break;
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(scriptfile_addsymbolvalue(name,number) < 0))
|
||||
initprintf("Warning: Symbol %s was NOT redefined to %d on line %s:%d\n",
|
||||
Printf("Warning: Symbol %s was NOT redefined to %d on line %s:%d\n",
|
||||
name,number,script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(!fn))
|
||||
{
|
||||
initprintf("Error: missing 'file name' for artfile definition near line %s:%d\n",
|
||||
Printf("Error: missing 'file name' for artfile definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
spd = clamp(spd, 0, 15);
|
||||
if (EDUKE32_PREDICT_FALSE(type&~3))
|
||||
{
|
||||
initprintf("Error: animtilerange: animation type must be 0, 1, 2 or 3 on line %s:%d\n",
|
||||
Printf("Error: animtilerange: animation type must be 0, 1, 2 or 3 on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)num > 255))
|
||||
{
|
||||
initprintf("Error: animtilerange: tile difference can be at most 255 on line %s:%d\n",
|
||||
Printf("Error: animtilerange: tile difference can be at most 255 on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -736,7 +736,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)tile >= MAXUSERTILES))
|
||||
{
|
||||
initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
Printf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,texturetokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -746,7 +746,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
int32_t const orig_crc32 = tileGetCRC32(tile);
|
||||
if (orig_crc32 != tile_crc32)
|
||||
{
|
||||
// initprintf("CRC32 of tile %d doesn't match! CRC32: %d, Expected: %d\n", tile, orig_crc32, tile_crc32);
|
||||
// Printf("CRC32 of tile %d doesn't match! CRC32: %d, Expected: %d\n", tile, orig_crc32, tile_crc32);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -756,7 +756,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
vec2_16_t const orig_size = tilesiz[tile];
|
||||
if (orig_size.x != tile_size.x && orig_size.y != tile_size.y)
|
||||
{
|
||||
// initprintf("Size of tile %d doesn't match! Size: (%d, %d), Expected: (%d, %d)\n", tile, orig_size.x, orig_size.y, tile_size.x, tile_size.y);
|
||||
// Printf("Size of tile %d doesn't match! Size: (%d, %d), Expected: (%d, %d)\n", tile, orig_size.x, orig_size.y, tile_size.x, tile_size.y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -773,17 +773,17 @@ static int32_t defsparser(scriptfile *script)
|
|||
picanm[tile].extra = extra;
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(flags == 0 && !havexoffset && !haveyoffset))
|
||||
initprintf("\nError: missing 'file name' for tilefromtexture definition near line %s:%d",
|
||||
Printf("\nError: missing 'file name' for tilefromtexture definition near line %s:%d",
|
||||
script->filename, scriptfile_getlinum(script,texturetokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
int32_t const texstatus = tileImportFromTexture(fn, tile, alphacut, istexture);
|
||||
if (texstatus == -3)
|
||||
initprintf("Error: No palette loaded, in tilefromtexture definition near line %s:%d\n",
|
||||
Printf("Error: No palette loaded, in tilefromtexture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,texturetokptr));
|
||||
if (texstatus == -(3<<8))
|
||||
initprintf("Error: \"%s\" has more than one tile, in tilefromtexture definition near line %s:%d\n",
|
||||
Printf("Error: \"%s\" has more than one tile, in tilefromtexture definition near line %s:%d\n",
|
||||
fn, script->filename, scriptfile_getlinum(script,texturetokptr));
|
||||
if (texstatus < 0)
|
||||
break;
|
||||
|
@ -860,7 +860,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)temppal >= MAXPALOOKUPS-RESERVEDPALS))
|
||||
{
|
||||
initprintf("Error: copytile 'palette number' out of range (max=%d)\n",
|
||||
Printf("Error: copytile 'palette number' out of range (max=%d)\n",
|
||||
MAXPALOOKUPS-RESERVEDPALS-1);
|
||||
break;
|
||||
}
|
||||
|
@ -909,10 +909,10 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
int32_t const texstatus = tileImportFromTexture(fn, tile, 255, 0);
|
||||
if (texstatus == -3)
|
||||
initprintf("Error: No palette loaded, in importtile definition near line %s:%d\n",
|
||||
Printf("Error: No palette loaded, in importtile definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
if (texstatus == -(3<<8))
|
||||
initprintf("Error: \"%s\" has more than one tile, in importtile definition near line %s:%d\n",
|
||||
Printf("Error: \"%s\" has more than one tile, in importtile definition near line %s:%d\n",
|
||||
fn, script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
if (texstatus < 0)
|
||||
break;
|
||||
|
@ -1002,7 +1002,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
lastmodelid = md_loadmodel(modelfn);
|
||||
if (EDUKE32_PREDICT_FALSE(lastmodelid < 0))
|
||||
{
|
||||
initprintf("Warning: Failed loading MD2/MD3 model \"%s\"\n", modelfn);
|
||||
Printf("Warning: Failed loading MD2/MD3 model \"%s\"\n", modelfn);
|
||||
break;
|
||||
}
|
||||
md_setmisc(lastmodelid,(float)scale, shadeoffs,0.0,0.0,0);
|
||||
|
@ -1034,7 +1034,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (EDUKE32_PREDICT_FALSE(lastmodelid < 0))
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("Warning: Ignoring frame definition.\n");
|
||||
Printf("Warning: Ignoring frame definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1046,12 +1046,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
happy = 0; break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("Invalid tile number on line %s:%d\n",
|
||||
Printf("Invalid tile number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("Invalid frame name on line %s:%d\n",
|
||||
Printf("Invalid frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
|
@ -1077,7 +1077,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (EDUKE32_PREDICT_FALSE(lastmodelid < 0))
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("Warning: Ignoring animation definition.\n");
|
||||
Printf("Warning: Ignoring animation definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1089,15 +1089,15 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("Invalid starting frame name on line %s:%d\n",
|
||||
Printf("Invalid starting frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -3:
|
||||
initprintf("Invalid ending frame name on line %s:%d\n",
|
||||
Printf("Invalid ending frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -4:
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
Printf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1138,15 +1138,15 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("Invalid skin filename on line %s:%d\n",
|
||||
Printf("Invalid skin filename on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -3:
|
||||
initprintf("Invalid palette number on line %s:%d\n",
|
||||
Printf("Invalid palette number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -4:
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
Printf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1170,13 +1170,13 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(nextvoxid == MAXVOXELS))
|
||||
{
|
||||
initprintf("Maximum number of voxels (%d) already defined.\n", MAXVOXELS);
|
||||
Printf("Maximum number of voxels (%d) already defined.\n", MAXVOXELS);
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(qloadkvx(nextvoxid, fn)))
|
||||
{
|
||||
initprintf("Failure loading voxel file \"%s\"\n",fn);
|
||||
Printf("Failure loading voxel file \"%s\"\n",fn);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1195,7 +1195,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(lastvoxid < 0))
|
||||
{
|
||||
initprintf("Warning: Ignoring voxel tiles definition.\n");
|
||||
Printf("Warning: Ignoring voxel tiles definition.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1242,7 +1242,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
lastmodelid = md_loadmodel(modelfn);
|
||||
if (EDUKE32_PREDICT_FALSE(lastmodelid < 0))
|
||||
{
|
||||
initprintf("Warning: Failed loading MD2/MD3 model \"%s\"\n", modelfn);
|
||||
Printf("Warning: Failed loading MD2/MD3 model \"%s\"\n", modelfn);
|
||||
script->textptr = modelend+1;
|
||||
break;
|
||||
}
|
||||
|
@ -1252,7 +1252,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
int32_t token = getatoken(script,modeltokens,ARRAY_SIZE(modeltokens));
|
||||
switch (token)
|
||||
{
|
||||
//case T_ERROR: initprintf("Error on line %s:%d in model tokens\n", script->filename,script->linenum); break;
|
||||
//case T_ERROR: Printf("Error on line %s:%d in model tokens\n", script->filename,script->linenum); break;
|
||||
case T_SCALE:
|
||||
scriptfile_getdouble(script,&scale); break;
|
||||
case T_SHADE:
|
||||
|
@ -1314,7 +1314,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (EDUKE32_PREDICT_FALSE(lastmodelid < 0))
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("Warning: ignoring frame definition on line %s:%d.\n",
|
||||
Printf("Warning: ignoring frame definition on line %s:%d.\n",
|
||||
script->filename, scriptfile_getlinum(script,frametokptr));
|
||||
#endif
|
||||
break;
|
||||
|
@ -1322,7 +1322,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (smoothduration > 1.0)
|
||||
{
|
||||
initprintf("Warning: smoothduration out of range on line %s:%d.\n",
|
||||
Printf("Warning: smoothduration out of range on line %s:%d.\n",
|
||||
script->filename, scriptfile_getlinum(script,frametokptr));
|
||||
smoothduration = 1.0;
|
||||
}
|
||||
|
@ -1335,12 +1335,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
happy = 0; break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("Invalid tile number on line %s:%d\n",
|
||||
Printf("Invalid tile number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,frametokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("Invalid frame name on line %s:%d\n",
|
||||
Printf("Invalid frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,frametokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
|
@ -1386,15 +1386,15 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(!startframe)) initprintf("Error: missing 'start frame' for anim definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
if (EDUKE32_PREDICT_FALSE(!endframe)) initprintf("Error: missing 'end frame' for anim definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
if (EDUKE32_PREDICT_FALSE(!startframe)) Printf("Error: missing 'start frame' for anim definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
if (EDUKE32_PREDICT_FALSE(!endframe)) Printf("Error: missing 'end frame' for anim definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
model_ok &= happy;
|
||||
if (EDUKE32_PREDICT_FALSE(!happy)) break;
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(lastmodelid < 0))
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("Warning: Ignoring animation definition.\n");
|
||||
Printf("Warning: Ignoring animation definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1406,17 +1406,17 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("Invalid starting frame name on line %s:%d\n",
|
||||
Printf("Invalid starting frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,animtokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("Invalid ending frame name on line %s:%d\n",
|
||||
Printf("Invalid ending frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,animtokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -4:
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
Printf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,animtokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
|
@ -1477,7 +1477,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(!skinfn))
|
||||
{
|
||||
initprintf("Error: missing 'skin filename' for skin definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
Printf("Error: missing 'skin filename' for skin definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -1513,17 +1513,17 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("Invalid skin filename on line %s:%d\n",
|
||||
Printf("Invalid skin filename on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("Invalid palette number on line %s:%d\n",
|
||||
Printf("Invalid palette number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -4:
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
Printf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
|
@ -1599,7 +1599,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (EDUKE32_PREDICT_FALSE(lastmodelid < 0))
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("Warning: Ignoring frame definition.\n");
|
||||
Printf("Warning: Ignoring frame definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1614,12 +1614,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
happy = 0; break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("Invalid tile number on line %s:%d\n",
|
||||
Printf("Invalid tile number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,hudtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("Invalid frame name on line %s:%d\n",
|
||||
Printf("Invalid frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,hudtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
|
@ -1638,7 +1638,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
if (lastmodelid >= 0)
|
||||
{
|
||||
initprintf("Removing model %d due to errors.\n", lastmodelid);
|
||||
Printf("Removing model %d due to errors.\n", lastmodelid);
|
||||
md_undefinemodel(lastmodelid);
|
||||
nextmodelid--;
|
||||
}
|
||||
|
@ -1661,9 +1661,9 @@ static int32_t defsparser(scriptfile *script)
|
|||
md_thinoutmodel(lastmodelid, usedframebitmap);
|
||||
# ifdef DEBUG_MODEL_MEM
|
||||
if (i>=0 && i<onumframes)
|
||||
initprintf("used %d/%d frames: %s\n", i, onumframes, modelfn);
|
||||
Printf("used %d/%d frames: %s\n", i, onumframes, modelfn);
|
||||
else if (i<0)
|
||||
initprintf("md_thinoutmodel returned %d: %s\n", i, modelfn);
|
||||
Printf("md_thinoutmodel returned %d: %s\n", i, modelfn);
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
|
@ -1700,13 +1700,13 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(nextvoxid == MAXVOXELS))
|
||||
{
|
||||
initprintf("Maximum number of voxels (%d) already defined.\n", MAXVOXELS);
|
||||
Printf("Maximum number of voxels (%d) already defined.\n", MAXVOXELS);
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(qloadkvx(nextvoxid, fn)))
|
||||
{
|
||||
initprintf("Failure loading voxel file \"%s\"\n",fn);
|
||||
Printf("Failure loading voxel file \"%s\"\n",fn);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1717,7 +1717,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
switch (getatoken(script, voxeltokens, ARRAY_SIZE(voxeltokens)))
|
||||
{
|
||||
//case T_ERROR: initprintf("Error on line %s:%d in voxel tokens\n", script->filename,linenum); break;
|
||||
//case T_ERROR: Printf("Error on line %s:%d in voxel tokens\n", script->filename,linenum); break;
|
||||
case T_TILE:
|
||||
scriptfile_getsymbol(script,&tilex);
|
||||
|
||||
|
@ -1790,7 +1790,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
switch (getatoken(script,skyboxtokens,ARRAY_SIZE(skyboxtokens)))
|
||||
{
|
||||
//case T_ERROR: initprintf("Error on line %s:%d in skybox tokens\n",script->filename,linenum); break;
|
||||
//case T_ERROR: Printf("Error on line %s:%d in skybox tokens\n",script->filename,linenum); break;
|
||||
case T_TILE:
|
||||
scriptfile_getsymbol(script,&tile); break;
|
||||
case T_PAL:
|
||||
|
@ -1815,10 +1815,10 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(tile < 0)) initprintf("Error: skybox: missing 'tile number' near line %s:%d\n", script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy=0;
|
||||
if (EDUKE32_PREDICT_FALSE(tile < 0)) Printf("Error: skybox: missing 'tile number' near line %s:%d\n", script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy=0;
|
||||
for (i=0; i<6; i++)
|
||||
{
|
||||
if (EDUKE32_PREDICT_FALSE(!fn[i])) initprintf("Error: skybox: missing '%s filename' near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
|
||||
if (EDUKE32_PREDICT_FALSE(!fn[i])) Printf("Error: skybox: missing '%s filename' near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
|
||||
// FIXME?
|
||||
if (fileSystem.FileExists(fn[i]))
|
||||
happy = 0;
|
||||
|
@ -1856,21 +1856,21 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)basepal >= MAXBASEPALS))
|
||||
{
|
||||
initprintf("Error: missing or invalid 'base palette number' for highpalookup definition "
|
||||
Printf("Error: missing or invalid 'base palette number' for highpalookup definition "
|
||||
"near line %s:%d\n", script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)pal >= MAXPALOOKUPS - RESERVEDPALS))
|
||||
{
|
||||
initprintf("Error: missing or invalid 'palette number' for highpalookup definition near "
|
||||
Printf("Error: missing or invalid 'palette number' for highpalookup definition near "
|
||||
"line %s:%d\n", script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(!fn))
|
||||
{
|
||||
initprintf("Error: missing 'file name' for highpalookup definition near line %s:%d\n",
|
||||
Printf("Error: missing 'file name' for highpalookup definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1924,7 +1924,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(pal < 0))
|
||||
{
|
||||
initprintf("Error: tint: missing 'palette number' near line %s:%d\n",
|
||||
Printf("Error: tint: missing 'palette number' near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,tinttokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2009,12 +2009,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((havepal & HAVE_PAL)==0))
|
||||
{
|
||||
initprintf("Error: missing 'palette number' %s\n", msgend);
|
||||
Printf("Error: missing 'palette number' %s\n", msgend);
|
||||
break;
|
||||
}
|
||||
else if (EDUKE32_PREDICT_FALSE(pal==0 || (unsigned)pal >= MAXPALOOKUPS-RESERVEDPALS))
|
||||
{
|
||||
initprintf("Error: 'palette number' out of range (1 .. %d) %s\n",
|
||||
Printf("Error: 'palette number' out of range (1 .. %d) %s\n",
|
||||
MAXPALOOKUPS-RESERVEDPALS-1, msgend);
|
||||
break;
|
||||
}
|
||||
|
@ -2022,13 +2022,13 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (EDUKE32_PREDICT_FALSE(havepal & HAVEPAL_ERROR))
|
||||
{
|
||||
// will also disallow multiple remappals or remapselfs
|
||||
initprintf("Error: must have exactly one of either 'remappal' or 'remapself' %s\n", msgend);
|
||||
Printf("Error: must have exactly one of either 'remappal' or 'remapself' %s\n", msgend);
|
||||
break;
|
||||
}
|
||||
else if (EDUKE32_PREDICT_FALSE((havepal & HAVE_REMAPPAL)
|
||||
&& (unsigned)remappal >= MAXPALOOKUPS-RESERVEDPALS))
|
||||
{
|
||||
initprintf("Error: 'remap palette number' out of range (max=%d) %s\n",
|
||||
Printf("Error: 'remap palette number' out of range (max=%d) %s\n",
|
||||
MAXPALOOKUPS-RESERVEDPALS-1, msgend);
|
||||
break;
|
||||
}
|
||||
|
@ -2119,20 +2119,20 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (EDUKE32_PREDICT_FALSE((unsigned)tile >= MAXUSERTILES)) break; // message is printed later
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)pal >= MAXPALOOKUPS - RESERVEDPALS))
|
||||
{
|
||||
initprintf("Error: missing or invalid 'palette number' for texture definition near "
|
||||
Printf("Error: missing or invalid 'palette number' for texture definition near "
|
||||
"line %s:%d\n", script->filename, scriptfile_getlinum(script,paltokptr));
|
||||
break;
|
||||
}
|
||||
if (EDUKE32_PREDICT_FALSE(!fn))
|
||||
{
|
||||
initprintf("Error: missing 'file name' for texture definition near line %s:%d\n",
|
||||
Printf("Error: missing 'file name' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,paltokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(!fileSystem.FileExists(fn)))
|
||||
{
|
||||
initprintf("Error: %s not found in replacement for tile %d\n", fn, tile);
|
||||
Printf("Error: %s not found in replacement for tile %d\n", fn, tile);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2191,7 +2191,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (EDUKE32_PREDICT_FALSE((unsigned)tile >= MAXUSERTILES)) break; // message is printed later
|
||||
if (EDUKE32_PREDICT_FALSE(!fn))
|
||||
{
|
||||
initprintf("Error: missing 'file name' for texture definition near line %s:%d\n",
|
||||
Printf("Error: missing 'file name' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,detailtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2225,7 +2225,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)tile >= MAXUSERTILES))
|
||||
{
|
||||
initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
Printf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,texturetokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2272,7 +2272,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
break;
|
||||
|
||||
// XXX: See comment of md_undefinemodel()
|
||||
initprintf("Warning: undefmodelof: currently non-functional.\n");
|
||||
Printf("Warning: undefmodelof: currently non-functional.\n");
|
||||
break;
|
||||
|
||||
#if defined USE_OPENGL && 0
|
||||
|
@ -2426,7 +2426,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
char *string = NULL;
|
||||
scriptfile_getstring(script,&string);
|
||||
initprintf("%s\n",string);
|
||||
Printf("%s\n",string);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2551,7 +2551,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)id >= MAXBASEPALS))
|
||||
{
|
||||
initprintf("Error: basepalette: Invalid basepal number on line %s:%d\n",
|
||||
Printf("Error: basepalette: Invalid basepal number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
script->textptr = blockend+1;
|
||||
break;
|
||||
|
@ -2609,21 +2609,21 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(fn == NULL))
|
||||
{
|
||||
initprintf("Error: basepalette: No filename provided on line %s:%d\n",
|
||||
Printf("Error: basepalette: No filename provided on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(offset < 0))
|
||||
{
|
||||
initprintf("Error: basepalette: Invalid file offset on line %s:%d\n",
|
||||
Printf("Error: basepalette: Invalid file offset on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)shiftleft >= 8))
|
||||
{
|
||||
initprintf("Error: basepalette: Invalid left shift provided on line %s:%d\n",
|
||||
Printf("Error: basepalette: Invalid left shift provided on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2631,14 +2631,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
FileReader fil = fileSystem.OpenFileReader(fn, 0);
|
||||
if (!fil.isOpen())
|
||||
{
|
||||
initprintf("Error: basepalette: Failed opening \"%s\" on line %s:%d\n", fn,
|
||||
Printf("Error: basepalette: Failed opening \"%s\" on line %s:%d\n", fn,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (fil.Seek(offset, FileReader::SeekSet) < 0)
|
||||
{
|
||||
initprintf("Error: basepalette: Seek failed on line %s:%d\n",
|
||||
Printf("Error: basepalette: Seek failed on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2646,7 +2646,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
auto palbuf = fil.Read();
|
||||
if (palbuf.Size() < 768)
|
||||
{
|
||||
initprintf("Error: basepalette: Read failed on line %s:%d\n",
|
||||
Printf("Error: basepalette: Read failed on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2668,7 +2668,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)source >= MAXBASEPALS || source == id))
|
||||
{
|
||||
initprintf("Error: basepalette: Invalid source basepal number on line %s:%d\n",
|
||||
Printf("Error: basepalette: Invalid source basepal number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2676,7 +2676,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
uint8_t const * const sourcetable = basepaltable[source];
|
||||
if (EDUKE32_PREDICT_FALSE(sourcetable == NULL))
|
||||
{
|
||||
initprintf("Error: basepalette: Source basepal does not exist on line %s:%d\n",
|
||||
Printf("Error: basepalette: Source basepal does not exist on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2730,7 +2730,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)id >= MAXPALOOKUPS))
|
||||
{
|
||||
initprintf("Error: palookup: Invalid pal number on line %s:%d\n",
|
||||
Printf("Error: palookup: Invalid pal number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
script->textptr = blockend+1;
|
||||
break;
|
||||
|
@ -2788,14 +2788,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(fn == NULL))
|
||||
{
|
||||
initprintf("Error: palookup: No filename provided on line %s:%d\n",
|
||||
Printf("Error: palookup: No filename provided on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(offset < 0))
|
||||
{
|
||||
initprintf("Error: palookup: Invalid file offset on line %s:%d\n",
|
||||
Printf("Error: palookup: Invalid file offset on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2803,14 +2803,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
FileReader fil = fileSystem.OpenFileReader(fn, 0);
|
||||
if (!fil.isOpen())
|
||||
{
|
||||
initprintf("Error: palookup: Failed opening \"%s\" on line %s:%d\n", fn,
|
||||
Printf("Error: palookup: Failed opening \"%s\" on line %s:%d\n", fn,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (fil.Seek(offset, FileReader::SeekSet) < 0)
|
||||
{
|
||||
initprintf("Error: palookup: Seek failed on line %s:%d\n",
|
||||
Printf("Error: palookup: Seek failed on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2818,7 +2818,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
auto palookupbuf = fil.Read();
|
||||
if (palookupbuf.Size() < 256)
|
||||
{
|
||||
initprintf("Error: palookup: Read failed on line %s:%d\n",
|
||||
Printf("Error: palookup: Read failed on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2833,7 +2833,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE(!(paletteloaded & PALETTE_SHADE)))
|
||||
{
|
||||
initprintf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
Printf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2849,14 +2849,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)source >= MAXPALOOKUPS || source == id))
|
||||
{
|
||||
initprintf("Error: palookup: Invalid source pal number on line %s:%d\n",
|
||||
Printf("Error: palookup: Invalid source pal number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(source == 0 && !(paletteloaded & PALETTE_SHADE)))
|
||||
{
|
||||
initprintf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
Printf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2864,7 +2864,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
uint8_t const * const sourcepal = (uint8_t *)palookup[source];
|
||||
if (EDUKE32_PREDICT_FALSE(sourcepal == NULL))
|
||||
{
|
||||
initprintf("Error: palookup: Source palookup does not exist on line %s:%d\n",
|
||||
Printf("Error: palookup: Source palookup does not exist on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2910,7 +2910,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(!(paletteloaded & PALETTE_SHADE)))
|
||||
{
|
||||
initprintf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
Printf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -2964,14 +2964,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)remappal >= MAXPALOOKUPS))
|
||||
{
|
||||
initprintf("Error: palookup: Invalid remappal on line %s:%d\n",
|
||||
Printf("Error: palookup: Invalid remappal on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(!(paletteloaded & PALETTE_SHADE)))
|
||||
{
|
||||
initprintf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
Printf("Error: palookup: Shade tables not loaded on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3030,7 +3030,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)id >= MAXBLENDTABS))
|
||||
{
|
||||
initprintf("Error: blendtable: Invalid blendtable number on line %s:%d\n",
|
||||
Printf("Error: blendtable: Invalid blendtable number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
script->textptr = blockend+1;
|
||||
break;
|
||||
|
@ -3081,14 +3081,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(fn == NULL))
|
||||
{
|
||||
initprintf("Error: blendtable: No filename provided on line %s:%d\n",
|
||||
Printf("Error: blendtable: No filename provided on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(offset < 0))
|
||||
{
|
||||
initprintf("Error: blendtable: Invalid file offset on line %s:%d\n",
|
||||
Printf("Error: blendtable: Invalid file offset on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3096,14 +3096,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
FileReader fil = fileSystem.OpenFileReader(fn, 0);
|
||||
if (!fil.isOpen())
|
||||
{
|
||||
initprintf("Error: blendtable: Failed opening \"%s\" on line %s:%d\n", fn,
|
||||
Printf("Error: blendtable: Failed opening \"%s\" on line %s:%d\n", fn,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (fil.Seek(offset, FileReader::SeekSet) < 0)
|
||||
{
|
||||
initprintf("Error: blendtable: Seek failed on line %s:%d\n",
|
||||
Printf("Error: blendtable: Seek failed on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3111,7 +3111,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
auto blendbuf = fil.Read();
|
||||
if (blendbuf.Size() < 256*256)
|
||||
{
|
||||
initprintf("Error: blendtable: Read failed on line %s:%d\n",
|
||||
Printf("Error: blendtable: Read failed on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3126,7 +3126,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)source >= MAXBLENDTABS || source == id))
|
||||
{
|
||||
initprintf("Error: blendtable: Invalid source blendtable number on line %s:%d\n",
|
||||
Printf("Error: blendtable: Invalid source blendtable number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3302,7 +3302,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
numalphatabs = value;
|
||||
break;
|
||||
default:
|
||||
initprintf("Error: numalphatables: Invalid value on line %s:%d\n",
|
||||
Printf("Error: numalphatables: Invalid value on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3319,7 +3319,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(id0 > id1 || (unsigned)id0 >= MAXBASEPALS || (unsigned)id1 >= MAXBASEPALS))
|
||||
{
|
||||
initprintf("Error: undefbasepaletterange: Invalid range on line %s:%d\n",
|
||||
Printf("Error: undefbasepaletterange: Invalid range on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3342,7 +3342,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(id0 > id1 || (unsigned)id0 >= MAXPALOOKUPS || (unsigned)id1 >= MAXPALOOKUPS))
|
||||
{
|
||||
initprintf("Error: undefpalookuprange: Invalid range on line %s:%d\n",
|
||||
Printf("Error: undefpalookuprange: Invalid range on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3365,7 +3365,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(id0 > id1 || (unsigned)id0 >= MAXBLENDTABS || (unsigned)id1 >= MAXBLENDTABS))
|
||||
{
|
||||
initprintf("Error: undefblendtablerange: Invalid range on line %s:%d\n",
|
||||
Printf("Error: undefblendtablerange: Invalid range on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3400,7 +3400,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
break;
|
||||
|
||||
default:
|
||||
initprintf("Unknown token.\n"); break;
|
||||
Printf("Unknown token.\n"); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3416,7 +3416,7 @@ int32_t loaddefinitionsfile(const char *fn)
|
|||
|
||||
if (script)
|
||||
{
|
||||
initprintf("Loading \"%s\"\n",fn);
|
||||
Printf("Loading \"%s\"\n",fn);
|
||||
|
||||
defsparser(script);
|
||||
}
|
||||
|
@ -3437,7 +3437,7 @@ int32_t loaddefinitionsfile(const char *fn)
|
|||
|
||||
if (!script) return -1;
|
||||
|
||||
initprintf("\n");
|
||||
Printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1065,7 +1065,7 @@ int32_t checksectorpointer(int16_t i, int16_t sectnum)
|
|||
if ((yax_getnextwall(i, 0)<0 && yax_getnextwall(i, 1)<0) || bestwallscore>0)
|
||||
#endif
|
||||
{
|
||||
// initprintf("w%d new nw=%d (score %d)\n", i, bestnextwall, bestwallscore)
|
||||
// Printf("w%d new nw=%d (score %d)\n", i, bestnextwall, bestwallscore)
|
||||
wall[i].nextsector = bestnextsec;
|
||||
wall[i].nextwall = bestnextwall;
|
||||
wall[bestnextwall].nextsector = sectnum;
|
||||
|
@ -2498,13 +2498,13 @@ static inline void drawmaskleaf(_maskleaf* wall)
|
|||
{
|
||||
if (wall->branch[i]->drawing == 0)
|
||||
{
|
||||
//OSD_Printf("Drawing parent of %i : mask %i\n", wall->index, wall->branch[i]->index);
|
||||
//Printf("Drawing parent of %i : mask %i\n", wall->index, wall->branch[i]->index);
|
||||
drawmaskleaf(wall->branch[i]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
//OSD_Printf("Drawing mask %i\n", wall->index);
|
||||
//Printf("Drawing mask %i\n", wall->index);
|
||||
drawmaskwall(wall->index);
|
||||
}
|
||||
#endif
|
||||
|
@ -3352,13 +3352,13 @@ static void check_sprite(int32_t i)
|
|||
{
|
||||
if ((unsigned)sprite[i].statnum >= MAXSTATUS)
|
||||
{
|
||||
initprintf("Map error: sprite #%d (%d,%d) with illegal statnum (%d) REMOVED.\n",
|
||||
Printf("Map error: sprite #%d (%d,%d) with illegal statnum (%d) REMOVED.\n",
|
||||
i, TrackerCast(sprite[i].x), TrackerCast(sprite[i].y), TrackerCast(sprite[i].statnum));
|
||||
remove_sprite(i);
|
||||
}
|
||||
else if ((unsigned)sprite[i].picnum >= MAXTILES)
|
||||
{
|
||||
initprintf("Map error: sprite #%d (%d,%d) with illegal picnum (%d) REMOVED.\n",
|
||||
Printf("Map error: sprite #%d (%d,%d) with illegal picnum (%d) REMOVED.\n",
|
||||
i, TrackerCast(sprite[i].x), TrackerCast(sprite[i].y), TrackerCast(sprite[i].sectnum));
|
||||
remove_sprite(i);
|
||||
}
|
||||
|
@ -3372,13 +3372,13 @@ static void check_sprite(int32_t i)
|
|||
if (sprite[i].sectnum < 0)
|
||||
remove_sprite(i);
|
||||
|
||||
initprintf("Map error: sprite #%d (%d,%d) with illegal sector (%d) ",
|
||||
Printf("Map error: sprite #%d (%d,%d) with illegal sector (%d) ",
|
||||
i, TrackerCast(sprite[i].x), TrackerCast(sprite[i].y), osectnum);
|
||||
|
||||
if (sprite[i].statnum != MAXSTATUS)
|
||||
initprintf("changed to sector %d.\n", TrackerCast(sprite[i].sectnum));
|
||||
Printf("changed to sector %d.\n", TrackerCast(sprite[i].sectnum));
|
||||
else
|
||||
initprintf("REMOVED.\n");
|
||||
Printf("REMOVED.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3568,7 +3568,7 @@ int32_t engineLoadBoard(const char *filename, char flags, vec3_t *dapos, int16_t
|
|||
artSetupMapArt(filename);
|
||||
}
|
||||
|
||||
// initprintf("Loaded map \"%s\" (md4sum: %08x%08x%08x%08x)\n", filename, B_BIG32(*((int32_t*)&md4out[0])), B_BIG32(*((int32_t*)&md4out[4])), B_BIG32(*((int32_t*)&md4out[8])), B_BIG32(*((int32_t*)&md4out[12])));
|
||||
// Printf("Loaded map \"%s\" (md4sum: %08x%08x%08x%08x)\n", filename, B_BIG32(*((int32_t*)&md4out[0])), B_BIG32(*((int32_t*)&md4out[4])), B_BIG32(*((int32_t*)&md4out[8])), B_BIG32(*((int32_t*)&md4out[12])));
|
||||
|
||||
return engineFinishLoadBoard(dapos, dacursectnum, numsprites, myflags);
|
||||
}
|
||||
|
@ -4587,7 +4587,7 @@ void dragpoint(int16_t pointhighlight, int32_t dax, int32_t day, uint8_t flags)
|
|||
cnt--;
|
||||
if (cnt==0)
|
||||
{
|
||||
initprintf("dragpoint %d: infloop!\n", pointhighlight);
|
||||
Printf("dragpoint %d: infloop!\n", pointhighlight);
|
||||
i = numyaxwalls;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ static FORCE_INLINE int32_t yax_isislandwall(int32_t line, int32_t cf) { return
|
|||
extern char m32_debugstr[64][128];
|
||||
extern int32_t m32_numdebuglines;
|
||||
# define yaxdebug(fmt, ...) do { if (m32_numdebuglines<64) snprintf(m32_debugstr[m32_numdebuglines++], 128, fmt, ##__VA_ARGS__); } while (0)
|
||||
# define yaxprintf(fmt, ...) do { initprintf(fmt, ##__VA_ARGS__); } while (0)
|
||||
# define yaxprintf(fmt, ...) do { Printf(fmt, ##__VA_ARGS__); } while (0)
|
||||
#else
|
||||
# define yaxdebug(fmt, ...)
|
||||
# define yaxprintf(fmt, ...)
|
||||
|
|
|
@ -31,7 +31,7 @@ static int32_t addtileP(int32_t model,int32_t tile,int32_t pallet)
|
|||
UNREFERENCED_PARAMETER(model);
|
||||
if (curextra==MAXTILES+EXTRATILES-1)
|
||||
{
|
||||
initprintf("warning: max EXTRATILES reached\n");
|
||||
Printf("warning: max EXTRATILES reached\n");
|
||||
return curextra;
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ int32_t md_thinoutmodel(int32_t modelid, uint8_t *usedframebitmap)
|
|||
{
|
||||
if (anm->endframe <= anm->startframe)
|
||||
{
|
||||
// initprintf("backward anim %d-%d\n", anm->startframe, anm->endframe);
|
||||
// Printf("backward anim %d-%d\n", anm->startframe, anm->endframe);
|
||||
return -3;
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ int32_t md_thinoutmodel(int32_t modelid, uint8_t *usedframebitmap)
|
|||
for (anm=m->animations; anm; anm=anm->next)
|
||||
{
|
||||
if (otonframe[anm->startframe]==-1 || otonframe[anm->endframe-1]==-1)
|
||||
initprintf("md %d WTF: anm %d %d\n", modelid, anm->startframe, anm->endframe);
|
||||
Printf("md %d WTF: anm %d %d\n", modelid, anm->startframe, anm->endframe);
|
||||
|
||||
anm->startframe = otonframe[anm->startframe];
|
||||
anm->endframe = otonframe[anm->endframe-1];
|
||||
|
@ -336,7 +336,7 @@ int32_t md_thinoutmodel(int32_t modelid, uint8_t *usedframebitmap)
|
|||
if (tile2model[i].modelid == modelid)
|
||||
{
|
||||
if (otonframe[tile2model[i].framenum]==-1)
|
||||
initprintf("md %d WTF: tile %d, fr %d\n", modelid, i, tile2model[i].framenum);
|
||||
Printf("md %d WTF: tile %d, fr %d\n", modelid, i, tile2model[i].framenum);
|
||||
tile2model[i].framenum = otonframe[tile2model[i].framenum];
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ int32_t md_defineskin(int32_t modelid, const char *skinfn, int32_t palnum, int32
|
|||
sk->texture = TileFiles.GetTexture(skinfn);
|
||||
if (!sk->texture)
|
||||
{
|
||||
initprintf("Unable to load %s as model skin\n", skinfn);
|
||||
Printf("Unable to load %s as model skin\n", skinfn);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -480,7 +480,7 @@ FTexture *mdloadskin(idmodel_t *m, int32_t number, int32_t pal, int32_t surf, bo
|
|||
if (sk->palette == pal && sk->skinnum == number && sk->surfnum == surf)
|
||||
{
|
||||
if (exact) *exact = true;
|
||||
//OSD_Printf("Using exact match skin (pal=%d,skinnum=%d,surfnum=%d) %s\n",pal,number,surf,skinfile);
|
||||
//Printf("Using exact match skin (pal=%d,skinnum=%d,surfnum=%d) %s\n",pal,number,surf,skinfile);
|
||||
return sk->texture;
|
||||
}
|
||||
//If no match, give highest priority to number, then pal.. (Parkar's request, 02/27/2005)
|
||||
|
@ -498,7 +498,7 @@ FTexture *mdloadskin(idmodel_t *m, int32_t number, int32_t pal, int32_t surf, bo
|
|||
|
||||
if (skzero)
|
||||
{
|
||||
//OSD_Printf("Using def skin 0,0 as fallback, pal=%d\n", pal);
|
||||
//Printf("Using def skin 0,0 as fallback, pal=%d\n", pal);
|
||||
if (exact) *exact = false;
|
||||
return skzero->texture;
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ static void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (m->cframe >= m->numframes)
|
||||
OSD_Printf("1: c > n\n");
|
||||
Printf("1: c > n\n");
|
||||
#endif
|
||||
|
||||
int32_t const smoothdurationp = (hw_animsmoothing && (tile2model[tile].smoothduration != 0));
|
||||
|
@ -575,8 +575,8 @@ static void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
}
|
||||
else if (/* anim && */ sprext->mdanimcur != anim->startframe)
|
||||
{
|
||||
//if (sprext->flags & SPREXT_NOMDANIM) OSD_Printf("SPREXT_NOMDANIM\n");
|
||||
//OSD_Printf("smooth launched ! oldanim %i new anim %i\n", sprext->mdanimcur, anim->startframe);
|
||||
//if (sprext->flags & SPREXT_NOMDANIM) Printf("SPREXT_NOMDANIM\n");
|
||||
//Printf("smooth launched ! oldanim %i new anim %i\n", sprext->mdanimcur, anim->startframe);
|
||||
sprext->mdanimcur = (int16_t)anim->startframe;
|
||||
sprext->mdanimtims = mdtims;
|
||||
m->interpol = 0;
|
||||
|
@ -619,7 +619,7 @@ static void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
m->nframe = anim ? anim->startframe : smooth->mdcurframe;
|
||||
m->cframe = smooth->mdoldframe;
|
||||
|
||||
//OSD_Printf("smoothing... cframe %i nframe %i\n", m->cframe, m->nframe);
|
||||
//Printf("smoothing... cframe %i nframe %i\n", m->cframe, m->nframe);
|
||||
if (k > 65535)
|
||||
{
|
||||
sprext->mdanimtims = mdtims;
|
||||
|
@ -628,7 +628,7 @@ static void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
m->cframe = m->nframe; // = anim ? anim->startframe : smooth->mdcurframe;
|
||||
|
||||
smooth->mdoldframe = m->cframe;
|
||||
//OSD_Printf("smooth stopped !\n");
|
||||
//Printf("smooth stopped !\n");
|
||||
goto prep_return;
|
||||
}
|
||||
}
|
||||
|
@ -644,11 +644,11 @@ static void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
m->nframe = anim->startframe;
|
||||
|
||||
smooth->mdoldframe = m->cframe;
|
||||
//OSD_Printf("not smoothing... cframe %i nframe %i\n", m->cframe, m->nframe);
|
||||
//Printf("not smoothing... cframe %i nframe %i\n", m->cframe, m->nframe);
|
||||
}
|
||||
|
||||
m->interpol = ((float)(i&65535))/65536.f;
|
||||
//OSD_Printf("interpol %f\n", m->interpol);
|
||||
//Printf("interpol %f\n", m->interpol);
|
||||
|
||||
prep_return:
|
||||
if (m->cframe >= m->numframes)
|
||||
|
@ -778,7 +778,7 @@ static md2model_t *md2load(FileReader & fil, const char *filnam)
|
|||
//return m;
|
||||
|
||||
// the MD2 is now loaded internally - let's begin the MD3 conversion process
|
||||
//OSD_Printf("Beginning md3 conversion.\n");
|
||||
//Printf("Beginning md3 conversion.\n");
|
||||
m3 = (md3model_t *)Xcalloc(1, sizeof(md3model_t));
|
||||
m3->mdnum = 3; m3->texture = nullptr; m3->scale = m->scale;
|
||||
m3->head.id = IDP3_MAGIC; m3->head.vers = 15;
|
||||
|
@ -803,7 +803,7 @@ static md2model_t *md2load(FileReader & fil, const char *filnam)
|
|||
{
|
||||
f = (md2frame_t *)&m->frames[i*m->framebytes];
|
||||
Bstrcpy(m3->head.frames[i].nam, f->name);
|
||||
//OSD_Printf("Copied frame %s.\n", m3->head.frames[i].nam);
|
||||
//Printf("Copied frame %s.\n", m3->head.frames[i].nam);
|
||||
m3->muladdframes[i*2] = f->mul;
|
||||
m3->muladdframes[i*2+1] = f->add;
|
||||
i++;
|
||||
|
@ -833,18 +833,18 @@ static md2model_t *md2load(FileReader & fil, const char *filnam)
|
|||
s->xyzn = (md3xyzn_t *)Xcalloc(s->numverts * m->numframes, sizeof(md3xyzn_t));
|
||||
|
||||
//memoryusage += (s->numverts * m->numframes * sizeof(md3xyzn_t));
|
||||
//OSD_Printf("Current model geometry memory usage : %i.\n", memoryusage);
|
||||
//Printf("Current model geometry memory usage : %i.\n", memoryusage);
|
||||
|
||||
//OSD_Printf("Number of frames : %i\n", m->numframes);
|
||||
//OSD_Printf("Number of triangles : %i\n", head.numtris);
|
||||
//OSD_Printf("Number of vertices : %i\n", s->numverts);
|
||||
//Printf("Number of frames : %i\n", m->numframes);
|
||||
//Printf("Number of triangles : %i\n", head.numtris);
|
||||
//Printf("Number of vertices : %i\n", s->numverts);
|
||||
|
||||
// triangle converting
|
||||
i = 0;
|
||||
while (i < head.numtris)
|
||||
{
|
||||
j = 0;
|
||||
//OSD_Printf("Triangle : %i\n", i);
|
||||
//Printf("Triangle : %i\n", i);
|
||||
while (j < 3)
|
||||
{
|
||||
// triangle vertex indexes
|
||||
|
@ -867,10 +867,10 @@ static md2model_t *md2load(FileReader & fil, const char *filnam)
|
|||
}
|
||||
j++;
|
||||
}
|
||||
//OSD_Printf("End triangle.\n");
|
||||
//Printf("End triangle.\n");
|
||||
i++;
|
||||
}
|
||||
//OSD_Printf("Finished md3 conversion.\n");
|
||||
//Printf("Finished md3 conversion.\n");
|
||||
|
||||
{
|
||||
mdskinmap_t *sk;
|
||||
|
@ -886,7 +886,7 @@ static md2model_t *md2load(FileReader & fil, const char *filnam)
|
|||
sk->texture = TileFiles.GetTexture(fn);
|
||||
if (!sk->texture)
|
||||
{
|
||||
initprintf("Unable to load %s as model skin\n", m->skinfn);
|
||||
Printf("Unable to load %s as model skin\n", m->skinfn);
|
||||
}
|
||||
}
|
||||
m3->skinmap = sk;
|
||||
|
@ -1036,7 +1036,7 @@ static md3model_t *md3load(FileReader & fil)
|
|||
leng[3] = s->numframes*s->numverts*sizeof(md3xyzn_t);
|
||||
|
||||
//memoryusage += (s->numverts * s->numframes * sizeof(md3xyzn_t));
|
||||
//OSD_Printf("Current model geometry memory usage : %i.\n", memoryusage);
|
||||
//Printf("Current model geometry memory usage : %i.\n", memoryusage);
|
||||
|
||||
s->tris = (md3tri_t *)Xmalloc((leng[0] + leng[1]) + (leng[2] + leng[3]));
|
||||
|
||||
|
@ -1214,7 +1214,7 @@ static int md3postload_polymer_check(md3model_t *m)
|
|||
if (u[0] >= numverts || u[1] >= numverts || u[2] >= numverts)
|
||||
{
|
||||
// corrupt model
|
||||
OSD_Printf("%s: Triangle index out of bounds!\n", m->head.nam);
|
||||
Printf("%s: Triangle index out of bounds!\n", m->head.nam);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1270,7 +1270,7 @@ int md3postload_polymer(md3model_t *m)
|
|||
#ifdef DEBUG_MODEL_MEM
|
||||
i = (m->head.numframes * s->numverts * sizeof(float) * 15);
|
||||
if (i > 1<<20)
|
||||
initprintf("size %d (%d fr, %d v): md %s surf %d/%d\n", i, m->head.numframes, s->numverts,
|
||||
Printf("size %d (%d fr, %d v): md %s surf %d/%d\n", i, m->head.numframes, s->numverts,
|
||||
m->head.nam, surfi, m->head.numsurfs);
|
||||
#endif
|
||||
s->geometry = (float *)Xcalloc(m->head.numframes * s->numverts * 15, sizeof(float));
|
||||
|
@ -1403,7 +1403,7 @@ int md3postload_polymer(md3model_t *m)
|
|||
#ifdef DEBUG_MODEL_MEM
|
||||
else if (verti == verti%s->numverts)
|
||||
{
|
||||
OSD_Printf("%s: vert %d is unused\n", m->head.nam, verti);
|
||||
Printf("%s: vert %d is unused\n", m->head.nam, verti);
|
||||
}
|
||||
#endif
|
||||
// copy N over
|
||||
|
@ -1510,7 +1510,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
|||
(unsigned)m->nframe >= (unsigned)m->numframes)
|
||||
{
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_Printf("%s: mdframe oob: c:%d n:%d total:%d interpol:%.02f\n",
|
||||
Printf("%s: mdframe oob: c:%d n:%d total:%d interpol:%.02f\n",
|
||||
m->head.nam, m->cframe, m->nframe, m->numframes, m->interpol);
|
||||
#endif
|
||||
|
||||
|
@ -1861,7 +1861,7 @@ static mdmodel_t *mdload(const char *filnam)
|
|||
switch (B_LITTLE32(i))
|
||||
{
|
||||
case IDP2_MAGIC:
|
||||
// initprintf("Warning: model \"%s\" is version IDP2; wanted version IDP3\n",filnam);
|
||||
// Printf("Warning: model \"%s\" is version IDP2; wanted version IDP3\n",filnam);
|
||||
vm = (mdmodel_t *)md2load(fil,filnam);
|
||||
break; //IDP2
|
||||
case IDP3_MAGIC:
|
||||
|
|
|
@ -142,7 +142,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if ((unsigned) whichsprite >= (unsigned) MAXSPRITES)
|
||||
{
|
||||
// sprite number out of range
|
||||
initprintf("Sprite number out of range 0-%d on line %s:%d\n",
|
||||
Printf("Sprite number out of range 0-%d on line %s:%d\n",
|
||||
MAXSPRITES-1, script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
whichsprite = -1;
|
||||
break;
|
||||
|
@ -157,7 +157,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring angle offset directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring angle offset directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring not-MD2/MD3 directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring not-MD2/MD3 directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring no-MD2/MD3-anim directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring no-MD2/MD3-anim directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring pitch directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring pitch directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring roll directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring roll directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring mdxoff/mdpivxoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring mdxoff/mdpivxoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring mdyoff/mdpivyoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring mdyoff/mdpivyoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring mdzoff/mdpivzoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring mdzoff/mdpivzoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring mdposxoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring mdposxoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring mdposyoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring mdposyoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring mdposzoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring mdposzoff directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring moving away directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring moving away directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring moving away directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring moving away directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
if (whichsprite < 0)
|
||||
{
|
||||
// no sprite directive preceeding
|
||||
initprintf("Ignoring mhkreset directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
Printf("Ignoring mhkreset directive because of absent/invalid sprite number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script, cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ int32_t engineLoadMHK(const char *filename)
|
|||
{
|
||||
if (maphacklightcnt == PR_MAXLIGHTS)
|
||||
{
|
||||
initprintf("warning: max light count %d exceeded, "
|
||||
Printf("warning: max light count %d exceeded, "
|
||||
"ignoring further light defs\n", PR_MAXLIGHTS);
|
||||
toomanylights = 1;
|
||||
break;
|
||||
|
|
|
@ -129,7 +129,7 @@ void paletteLoadFromDisk(void)
|
|||
|
||||
if (numshades <= 1)
|
||||
{
|
||||
initprintf("Warning: Invalid number of shades in \"palette.dat\"!\n");
|
||||
Printf("Warning: Invalid number of shades in \"palette.dat\"!\n");
|
||||
numshades = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -141,8 +141,6 @@ void paletteLoadFromDisk(void)
|
|||
int32_t lamedukep = 0;
|
||||
if (numshades >= 256)
|
||||
{
|
||||
static char const * const seekfail = "Warning: seek failed in loadpalette()!\n";
|
||||
|
||||
uint16_t temp;
|
||||
if (read_and_test(fil, &temp, 2))
|
||||
return;
|
||||
|
@ -151,7 +149,7 @@ void paletteLoadFromDisk(void)
|
|||
{
|
||||
if (fil.Seek(-4, FileReader::SeekCur) < 0)
|
||||
{
|
||||
initputs(seekfail);
|
||||
Printf("Warning: seek failed in loadpalette()!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -162,7 +160,7 @@ void paletteLoadFromDisk(void)
|
|||
{
|
||||
if (fil.Seek(-2, FileReader::SeekCur) < 0)
|
||||
{
|
||||
initputs(seekfail);
|
||||
Printf("Warning: seek failed in loadpalette()!\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +183,7 @@ void paletteLoadFromDisk(void)
|
|||
uint8_t addblendtabs;
|
||||
if (read_and_test(fil, &addblendtabs, 1))
|
||||
{
|
||||
initprintf("Warning: failed reading additional blending table count\n");
|
||||
Printf("Warning: failed reading additional blending table count\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -195,14 +193,14 @@ void paletteLoadFromDisk(void)
|
|||
{
|
||||
if (read_and_test(fil, &blendnum, 1))
|
||||
{
|
||||
initprintf("Warning: failed reading additional blending table index\n");
|
||||
Printf("Warning: failed reading additional blending table index\n");
|
||||
Xfree(tab);
|
||||
return;
|
||||
}
|
||||
|
||||
if (read_and_test(fil, tab, 256*256))
|
||||
{
|
||||
initprintf("Warning: failed reading additional blending table\n");
|
||||
Printf("Warning: failed reading additional blending table\n");
|
||||
Xfree(tab);
|
||||
return;
|
||||
}
|
||||
|
@ -217,7 +215,7 @@ void paletteLoadFromDisk(void)
|
|||
if (!read_and_test(fil, &lognumalphatabs, 1))
|
||||
{
|
||||
if (!(lognumalphatabs >= 1 && lognumalphatabs <= 7))
|
||||
initprintf("invalid lognumalphatabs value, must be in [1 .. 7]\n");
|
||||
Printf("invalid lognumalphatabs value, must be in [1 .. 7]\n");
|
||||
else
|
||||
numalphatabs = 1<<lognumalphatabs;
|
||||
}
|
||||
|
@ -321,7 +319,7 @@ int32_t paletteLoadLookupTable(FileReader &fp)
|
|||
|
||||
if (palnum >= 256-RESERVEDPALS)
|
||||
{
|
||||
initprintf("ERROR: attempt to load lookup at reserved pal %d\n", palnum);
|
||||
Printf("ERROR: attempt to load lookup at reserved pal %d\n", palnum);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ CUSTOM_CVARD(Int, hw_texfilter, TEXFILTER_ON, CVAR_ARCHIVE | CVAR_GLOBALCONFIG,
|
|||
else
|
||||
{
|
||||
gltexapplyprops();
|
||||
OSD_Printf("Texture filtering mode changed to %s\n", glfiltermodes[hw_texfilter]);
|
||||
Printf("Texture filtering mode changed to %s\n", glfiltermodes[hw_texfilter]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ void polymost_glreset()
|
|||
polymosttext=nullptr;
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_Printf("polymost_glreset()\n");
|
||||
Printf("polymost_glreset()\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3006,7 +3006,7 @@ void polymost_scansector(int32_t sectnum)
|
|||
|
||||
if (numscans >= MAXWALLSB-1)
|
||||
{
|
||||
OSD_Printf("!!numscans\n");
|
||||
Printf("!!numscans\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4602,7 +4602,7 @@ static void polymost_precache(int32_t dapicnum, int32_t dapalnum, int32_t datype
|
|||
if (videoGetRenderMode() < REND_POLYMOST) return;
|
||||
if ((dapalnum < (MAXPALOOKUPS - RESERVEDPALS)) && (palookup[dapalnum] == NULL)) return;//dapalnum = 0;
|
||||
|
||||
//OSD_Printf("precached %d %d type %d\n", dapicnum, dapalnum, datype);
|
||||
//Printf("precached %d %d type %d\n", dapicnum, dapalnum, datype);
|
||||
hicprecaching = 1;
|
||||
GLInterface.SetTexture(dapicnum, TileFiles.tiles[dapicnum], dapalnum, 0, -1);
|
||||
hicprecaching = 0;
|
||||
|
@ -4641,7 +4641,7 @@ static void PolymostProcessVoxels(void)
|
|||
|
||||
g_haveVoxels = 2;
|
||||
|
||||
OSD_Printf("Generating voxel models for Polymost. This may take a while...\n");
|
||||
Printf("Generating voxel models for Polymost. This may take a while...\n");
|
||||
//videoNextPage();
|
||||
|
||||
for (bssize_t i = 0; i < MAXVOXELS; i++)
|
||||
|
|
|
@ -30,7 +30,7 @@ static int scriptfile_eof_error(scriptfile *sf)
|
|||
{
|
||||
if (scriptfile_eof(sf))
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n", sf->filename, scriptfile_getlinum(sf, sf->textptr));
|
||||
Printf("Error on line %s:%d: unexpected eof\n", sf->filename, scriptfile_getlinum(sf, sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ int32_t scriptfile_getstring(scriptfile *sf, char **retst)
|
|||
(*retst) = scriptfile_gettoken(sf);
|
||||
if (*retst == NULL)
|
||||
{
|
||||
initprintf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
Printf("Error on line %s:%d: unexpected eof\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -61,7 +61,7 @@ int32_t scriptfile_getnumber(scriptfile *sf, int32_t *num)
|
|||
{
|
||||
char *p = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
initprintf("Error on line %s:%d: expecting int32_t, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
Printf("Error on line %s:%d: expecting int32_t, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -124,7 +124,7 @@ int32_t scriptfile_getdouble(scriptfile *sf, double *num)
|
|||
{
|
||||
char *p = sf->textptr;
|
||||
skipovertoken(sf);
|
||||
initprintf("Error on line %s:%d: expecting float, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
Printf("Error on line %s:%d: expecting float, got \"%s\"\n",sf->filename,scriptfile_getlinum(sf,sf->ltextptr),p);
|
||||
return -2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -142,7 +142,7 @@ int scriptfile_getsymbol(scriptfile *sf, int32_t *num)
|
|||
{
|
||||
// looks like a string, so find it in the symbol table
|
||||
if (scriptfile_getsymbolvalue(t, num)) return 0;
|
||||
initprintf("Error on line %s:%d: expecting symbol, got \"%s\"\n", sf->filename, scriptfile_getlinum(sf, sf->ltextptr), t);
|
||||
Printf("Error on line %s:%d: expecting symbol, got \"%s\"\n", sf->filename, scriptfile_getlinum(sf, sf->ltextptr), t);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ int32_t scriptfile_getbraces(scriptfile *sf, char **braceend)
|
|||
|
||||
if (sf->textptr[0] != '{')
|
||||
{
|
||||
initprintf("Error on line %s:%d: expecting '{'\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
Printf("Error on line %s:%d: expecting '{'\n",sf->filename,scriptfile_getlinum(sf,sf->textptr));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -953,18 +953,6 @@ int Printf (const char *format, ...)
|
|||
return count;
|
||||
}
|
||||
|
||||
void OSD_Printf(const char *format, ...)
|
||||
{
|
||||
// For compatibility this only prints to the console, not to the notification message
|
||||
// Otherwise the game would become far too noisy.
|
||||
va_list argptr;
|
||||
int count;
|
||||
|
||||
va_start (argptr, format);
|
||||
count = VPrintf (PRINT_HIGH, format, argptr);
|
||||
va_end (argptr);
|
||||
}
|
||||
|
||||
int DPrintf (int level, const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
|
|
@ -131,7 +131,7 @@ void UserConfig::ProcessOptions()
|
|||
// -cfg / -setupfile refer to Build style config which are not supported.
|
||||
if (Args->CheckParm("-cfg") || Args->CheckParm("-setupfile"))
|
||||
{
|
||||
initprintf("Build-format config files not supported and will be ignored\n");
|
||||
Printf("Build-format config files not supported and will be ignored\n");
|
||||
}
|
||||
|
||||
#if 0 // MP disabled pending evaluation
|
||||
|
@ -149,7 +149,7 @@ void UserConfig::ProcessOptions()
|
|||
auto val = strtol(v, nullptr, 0);
|
||||
static const char* const addons[] = { "DUKE3D.GRP", "DUKEDC.GRP", "NWINTER.GRP", "VACATION.GRP" };
|
||||
if (val >= 0 && val < 4) gamegrp = addons[val];
|
||||
else initprintf("%s: Unknown Addon\n", v);
|
||||
else Printf("%s: Unknown Addon\n", v);
|
||||
}
|
||||
else if (Args->CheckParm("-nam"))
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ CUSTOM_CVARD(Int, hud_size, 9, CVAR_ARCHIVE | CVAR_NOINITCALL, "Defines the HUD
|
|||
if (gi->validate_hud(self))
|
||||
gi->set_hud_layout(self);
|
||||
else
|
||||
OSD_Printf("Hud size %d not available\n", *self);
|
||||
Printf("Hud size %d not available\n", *self);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -415,11 +415,11 @@ CUSTOM_CVARD(String, wchoice, "3457860291", CVAR_ARCHIVE | CVAR_NOINITCALL | CVA
|
|||
|
||||
j++;
|
||||
}
|
||||
// if (!gi->SetWeaponChoice(dest)) OSD_Printf("Weapon ordering not supported\n");
|
||||
// if (!gi->SetWeaponChoice(dest)) Printf("Weapon ordering not supported\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("Using default weapon orders.\n");
|
||||
Printf("Using default weapon orders.\n");
|
||||
self = "3457860291";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ int CountTiles (const char *fn, const uint8_t *RawData)
|
|||
int version = LittleLong(*(uint32_t *)RawData);
|
||||
if (version != 1)
|
||||
{
|
||||
initprintf("%s: Invalid art file version. Must be 1, got %d\n", fn, version);
|
||||
Printf("%s: Invalid art file version. Must be 1, got %d\n", fn, version);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -199,12 +199,12 @@ int CountTiles (const char *fn, const uint8_t *RawData)
|
|||
|
||||
if ((unsigned)tilestart >= MAXUSERTILES || (unsigned)tileend >= MAXUSERTILES)
|
||||
{
|
||||
initprintf("%s: Invalid tilestart or tileend\n", fn);
|
||||
Printf("%s: Invalid tilestart or tileend\n", fn);
|
||||
return 0;
|
||||
}
|
||||
if (tileend < tilestart)
|
||||
{
|
||||
initprintf("%s: tileend < tilestart\n", fn);
|
||||
Printf("%s: tileend < tilestart\n", fn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ int BuildTiles::LoadArtFile(const char *fn, bool mapart, int firsttile)
|
|||
}
|
||||
else
|
||||
{
|
||||
//initprintf("%s: file not found\n", fn);
|
||||
//Printf("%s: file not found\n", fn);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -777,7 +777,7 @@ int tileSetHightileReplacement(int picnum, int palnum, const char *filename, flo
|
|||
auto tex = TileFiles.tiles[picnum];
|
||||
if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0)
|
||||
{
|
||||
initprintf("Warning: defined hightile replacement for empty tile %d.", picnum);
|
||||
Printf("Warning: defined hightile replacement for empty tile %d.", picnum);
|
||||
return -1; // cannot add replacements to empty tiles, must create one beforehand
|
||||
}
|
||||
HightileReplacement replace = {};
|
||||
|
@ -785,7 +785,7 @@ int tileSetHightileReplacement(int picnum, int palnum, const char *filename, flo
|
|||
replace.faces[0] = TileFiles.GetTexture(filename);
|
||||
if (replace.faces[0] == nullptr)
|
||||
{
|
||||
initprintf("%s: Replacement for tile %d does not exist or is invalid\n", filename, picnum);
|
||||
Printf("%s: Replacement for tile %d does not exist or is invalid\n", filename, picnum);
|
||||
return -1;
|
||||
}
|
||||
replace.alphacut = min(alphacut,1.f);
|
||||
|
@ -813,7 +813,7 @@ int tileSetSkybox(int picnum, int palnum, const char **facenames, int flags )
|
|||
auto tex = TileFiles.tiles[picnum];
|
||||
if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0)
|
||||
{
|
||||
initprintf("Warning: defined skybox replacement for empty tile %d.", picnum);
|
||||
Printf("Warning: defined skybox replacement for empty tile %d.", picnum);
|
||||
return -1; // cannot add replacements to empty tiles, must create one beforehand
|
||||
}
|
||||
HightileReplacement replace = {};
|
||||
|
@ -823,7 +823,7 @@ int tileSetSkybox(int picnum, int palnum, const char **facenames, int flags )
|
|||
face = TileFiles.GetTexture(*facenames);
|
||||
if (face == nullptr)
|
||||
{
|
||||
initprintf("%s: Skybox image for tile %d does not exist or is invalid\n", *facenames, picnum);
|
||||
Printf("%s: Skybox image for tile %d does not exist or is invalid\n", *facenames, picnum);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "basics.h"
|
||||
#include "memarena.h"
|
||||
#include "printf.h"
|
||||
#include "cmdlib.h"
|
||||
|
||||
struct FMemArena::Block
|
||||
{
|
||||
|
@ -325,7 +326,7 @@ FString *FSharedStringArena::Alloc(const FString &source)
|
|||
strnode = (Node *)iAlloc(sizeof(Node));
|
||||
::new(&strnode->String) FString(source);
|
||||
strnode->Hash = hash;
|
||||
hash %= Bucket_Count;
|
||||
hash %= countof(Buckets);
|
||||
strnode->Next = Buckets[hash];
|
||||
Buckets[hash] = strnode;
|
||||
}
|
||||
|
@ -360,7 +361,7 @@ FString *FSharedStringArena::Alloc(const char *source, size_t strlen)
|
|||
strnode = (Node *)iAlloc(sizeof(Node));
|
||||
::new(&strnode->String) FString(source, strlen);
|
||||
strnode->Hash = hash;
|
||||
hash %= Bucket_Count;
|
||||
hash %= countof(Buckets);
|
||||
strnode->Next = Buckets[hash];
|
||||
Buckets[hash] = strnode;
|
||||
}
|
||||
|
@ -379,7 +380,7 @@ FSharedStringArena::Node *FSharedStringArena::FindString(const char *str, size_t
|
|||
{
|
||||
hash = SuperFastHash(str, strlen);
|
||||
|
||||
for (Node *node = Buckets[hash % Bucket_Count]; node != NULL; node = node->Next)
|
||||
for (Node *node = Buckets[hash % countof(Buckets)]; node != NULL; node = node->Next)
|
||||
{
|
||||
if (node->Hash == hash && node->String.Len() == strlen && memcmp(&node->String[0], str, strlen) == 0)
|
||||
{
|
||||
|
|
|
@ -82,11 +82,7 @@ protected:
|
|||
FString String;
|
||||
unsigned int Hash;
|
||||
};
|
||||
enum
|
||||
{
|
||||
Bucket_Count = 256
|
||||
};
|
||||
Node *Buckets[Bucket_Count];
|
||||
Node *Buckets[256];
|
||||
|
||||
Node *FindString(const char *str, size_t strlen, unsigned int &hash);
|
||||
private:
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
# define ATTRIBUTE(attrlist)
|
||||
#endif
|
||||
|
||||
|
||||
// This header collects all things printf.
|
||||
// EDuke32 had two totally separate output paths and all the added code from G/ZDoom uses yet another means.
|
||||
// Everything goes to the console now, but to avoid changing everything, this redirects all output to the console, with the proper settings.
|
||||
// Changing all this would mean altering over 1000 lines of code which would add a needless complication to merging from upstream.
|
||||
// This header collects all things printf, so that this doesn't need to pull in other, far more dirty headers, just for outputting some text.
|
||||
|
||||
extern "C" int mysnprintf(char* buffer, size_t count, const char* format, ...) ATTRIBUTE((format(printf, 3, 4)));
|
||||
extern "C" int myvsnprintf(char* buffer, size_t count, const char* format, va_list argptr) ATTRIBUTE((format(printf, 3, 0)));
|
||||
|
@ -52,38 +48,4 @@ int Printf (int printlevel, const char *format, ...) ATTRIBUTE((format(printf,2,
|
|||
int Printf (const char *format, ...) ATTRIBUTE((format(printf,1,2)));
|
||||
int DPrintf (int level, const char *format, ...) ATTRIBUTE((format(printf,2,3)));
|
||||
|
||||
|
||||
void OSD_Printf(const char *format, ...) ATTRIBUTE((format(printf,1,2)));
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
template<class... Args>
|
||||
inline void initprintf(const char *format, Args&&... args) //ATTRIBUTE((format(printf,1,2)))
|
||||
{
|
||||
OSD_Printf(format, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
// This was a define before - which should be avoided. Used by Shadow Warrior
|
||||
template<class... Args>
|
||||
inline void buildprintf(const char *format, Args&&... args) //ATTRIBUTE((format(printf,1,2)))
|
||||
{
|
||||
OSD_Printf(format, std::forward<Args>(args)...);
|
||||
}
|
||||
#else
|
||||
// Sigh... Sometimes a compiler's stubbornness with warnings can really make things worse than necessary...
|
||||
#define initprintf OSD_Printf
|
||||
#define buildprintf OSD_Printf
|
||||
#endif
|
||||
|
||||
|
||||
inline void initputs(const char *s)
|
||||
{
|
||||
PrintString(PRINT_HIGH, s);
|
||||
}
|
||||
|
||||
inline void buildputs(const char *s)
|
||||
{
|
||||
PrintString(PRINT_HIGH, s);
|
||||
}
|
||||
|
||||
void debugprintf(const char* f, ...); // Prints to the debugger's log.
|
||||
|
|
|
@ -334,7 +334,7 @@ void A_RadiusDamage(int const spriteNum, int const blastRadius, int const dmg1,
|
|||
|
||||
if (numSectors == MAXDAMAGESECTORS)
|
||||
{
|
||||
OSD_Printf("Sprite %d tried to damage more than %d sectors!\n", spriteNum, MAXDAMAGESECTORS);
|
||||
Printf("Sprite %d tried to damage more than %d sectors!\n", spriteNum, MAXDAMAGESECTORS);
|
||||
goto SKIPWALLCHECK;
|
||||
}
|
||||
}
|
||||
|
@ -590,7 +590,7 @@ int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uin
|
|||
if (newSectnum == -1)
|
||||
{
|
||||
newSectnum = pSprite->sectnum;
|
||||
// OSD_Printf("%s:%d wtf\n",__FILE__,__LINE__);
|
||||
// Printf("%s:%d wtf\n",__FILE__,__LINE__);
|
||||
}
|
||||
else if (newSectnum != pSprite->sectnum)
|
||||
{
|
||||
|
@ -690,7 +690,7 @@ void A_DeleteSprite(int spriteNum)
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE(block_deletesprite))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "A_DeleteSprite(): tried to remove sprite %d in EVENT_EGS\n", spriteNum);
|
||||
Printf(OSD_ERROR "A_DeleteSprite(): tried to remove sprite %d in EVENT_EGS\n", spriteNum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1420,7 +1420,7 @@ ACTOR_STATIC void G_MovePlayers(void)
|
|||
if (ud.god == 0)
|
||||
if (G_CheckForSpaceCeiling(pSprite->sectnum) || G_CheckForSpaceFloor(pSprite->sectnum))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "%s: player killed by space sector!\n", EDUKE32_FUNCTION);
|
||||
Printf(OSD_ERROR "%s: player killed by space sector!\n", EDUKE32_FUNCTION);
|
||||
P_QuickKill(pPlayer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
if (!anim)
|
||||
{
|
||||
OSD_Printf("Animation %s is undefined!\n", fn);
|
||||
Printf("Animation %s is undefined!\n", fn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("Failed reading IVF file: %s\n", animvpx_read_ivf_header_errmsg[i]);
|
||||
Printf("Failed reading IVF file: %s\n", animvpx_read_ivf_header_errmsg[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
if (animvpx_init_codec(&info, handle, &codec))
|
||||
{
|
||||
OSD_Printf("Error initializing VPX codec.\n");
|
||||
Printf("Error initializing VPX codec.\n");
|
||||
animvpx_restore_glstate();
|
||||
return 0;
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ int32_t Anim_Play(const char *fn)
|
|||
uint32_t nextframetime = timerGetTicks();
|
||||
uint8_t* pic;
|
||||
|
||||
// OSD_Printf("msecs per frame: %d\n", msecsperframe);
|
||||
// Printf("msecs per frame: %d\n", msecsperframe);
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -310,12 +310,12 @@ int32_t Anim_Play(const char *fn)
|
|||
i = animvpx_nextpic(&codec, &pic);
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("Failed getting next pic: %s\n", animvpx_nextpic_errmsg[i]);
|
||||
Printf("Failed getting next pic: %s\n", animvpx_nextpic_errmsg[i]);
|
||||
if (codec.errmsg)
|
||||
{
|
||||
OSD_Printf(" %s\n", codec.errmsg);
|
||||
Printf(" %s\n", codec.errmsg);
|
||||
if (codec.errmsg_detail)
|
||||
OSD_Printf(" detail: %s\n", codec.errmsg_detail);
|
||||
Printf(" detail: %s\n", codec.errmsg_detail);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ int32_t Anim_Play(const char *fn)
|
|||
{
|
||||
// XXX: ANM_LoadAnim() still checks less than the bare minimum,
|
||||
// e.g. ANM file could still be too small and not contain any frames.
|
||||
OSD_Printf("Error: malformed ANM file \"%s\".\n", fn);
|
||||
Printf("Error: malformed ANM file \"%s\".\n", fn);
|
||||
goto end_anim;
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ int32_t Anim_Play(const char *fn)
|
|||
{
|
||||
if (i > 4 && totalclock > frametime + 60)
|
||||
{
|
||||
OSD_Printf("WARNING: slowdown in %s, skipping playback\n", fn);
|
||||
Printf("WARNING: slowdown in %s, skipping playback\n", fn);
|
||||
goto end_anim_restore_gl;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,13 +54,13 @@ static void G_AddDemo(const char* param)
|
|||
|
||||
if (framespertic < 0)
|
||||
{
|
||||
initprintf("Play demo %s.\n", g_firstDemoFile);
|
||||
Printf("Play demo %s.\n", g_firstDemoFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
framespertic = clamp(framespertic, 0, 8)+1;
|
||||
// TODO: repeat count and gathering statistics.
|
||||
initprintf("Profile demo %s, %d frames/gametic, repeated 1x.\n", g_firstDemoFile,
|
||||
Printf("Profile demo %s, %d frames/gametic, repeated 1x.\n", g_firstDemoFile,
|
||||
framespertic-1);
|
||||
Demo_PlayFirst(framespertic, 1);
|
||||
g_noLogo = 1;
|
||||
|
|
|
@ -115,7 +115,7 @@ void G_LoadLookups(void)
|
|||
if (j < 0)
|
||||
{
|
||||
if (j == -1)
|
||||
initprintf("ERROR loading \"lookup.dat\": failed reading enough data.\n");
|
||||
Printf("ERROR loading \"lookup.dat\": failed reading enough data.\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
|
|||
demo_hasseeds = 0;
|
||||
|
||||
i = g_demo_totalCnt/REALGAMETICSPERSEC;
|
||||
OSD_Printf("demo %d duration: %d min %d sec\n", g_whichDemo, i/60, i%60);
|
||||
Printf("demo %d duration: %d min %d sec\n", g_whichDemo, i/60, i%60);
|
||||
|
||||
g_demo_cnt = 1;
|
||||
ud.reccnt = 0;
|
||||
|
@ -153,7 +153,7 @@ void G_OpenDemoWrite(void)
|
|||
|
||||
if (snprintf(demofn, sizeof(demofn), "%s" DEMOFN_FMT, G_GetDemoPath().GetChars(), demonum))
|
||||
{
|
||||
initprintf("Couldn't start demo writing: INTERNAL ERROR: file name too long\n");
|
||||
Printf("Couldn't start demo writing: INTERNAL ERROR: file name too long\n");
|
||||
goto error_wopen_demo;
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ static int32_t Demo_UpdateState(int32_t frominit)
|
|||
Demo_RestoreModes(j);
|
||||
|
||||
if (k)
|
||||
OSD_Printf("sv_updatestate() returned %d.\n", k);
|
||||
Printf("sv_updatestate() returned %d.\n", k);
|
||||
return k;
|
||||
}
|
||||
|
||||
|
@ -405,17 +405,17 @@ static void Demo_FinishProfile(void)
|
|||
|
||||
if (nt > 0)
|
||||
{
|
||||
OSD_Printf("== demo %d: %d gametics\n", dn, nt);
|
||||
OSD_Printf("== demo %d game times: %.03f ms (%.03f us/gametic)\n",
|
||||
Printf("== demo %d: %d gametics\n", dn, nt);
|
||||
Printf("== demo %d game times: %.03f ms (%.03f us/gametic)\n",
|
||||
dn, gms, (gms*1000.0)/nt);
|
||||
}
|
||||
|
||||
if (nf > 0)
|
||||
{
|
||||
OSD_Printf("== demo %d: %d frames (%d frames/gametic)\n", dn, nf, g_demo_profile-1);
|
||||
OSD_Printf("== demo %d drawrooms times: %.03f s (%.03f ms/frame)\n",
|
||||
Printf("== demo %d: %d frames (%d frames/gametic)\n", dn, nf, g_demo_profile-1);
|
||||
Printf("== demo %d drawrooms times: %.03f s (%.03f ms/frame)\n",
|
||||
dn, dms1/1000.0, dms1/nf);
|
||||
OSD_Printf("== demo %d drawrest times: %.03f s (%.03f ms/frame)\n",
|
||||
Printf("== demo %d drawrest times: %.03f s (%.03f ms/frame)\n",
|
||||
dn, dms2/1000.0, dms2/nf);
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,7 @@ static void Demo_FinishProfile(void)
|
|||
double totalprofms = gms+dms1+dms2;
|
||||
double totalms = timerGetHiTicks()-g_prof.starthiticks;
|
||||
if (totalprofms != 0)
|
||||
OSD_Printf("== demo %d: non-profiled time overhead: %.02f %%\n",
|
||||
Printf("== demo %d: non-profiled time overhead: %.02f %%\n",
|
||||
dn, 100.0*totalms/totalprofms - 100.0);
|
||||
}
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ RECHECK:
|
|||
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// OSD_Printf("ticcnt=%d, total=%d\n", g_demo_cnt, g_demo_totalCnt);
|
||||
// Printf("ticcnt=%d, total=%d\n", g_demo_cnt, g_demo_totalCnt);
|
||||
while (g_demo_cnt < g_demo_totalCnt || foundemo==0)
|
||||
{
|
||||
// Main loop here. It also runs when there's no demo to show,
|
||||
|
@ -600,7 +600,7 @@ RECHECK:
|
|||
|
||||
if (ud.reccnt<0)
|
||||
{
|
||||
OSD_Printf("G_PlaybackDemo: ud.reccnt<0!\n");
|
||||
Printf("G_PlaybackDemo: ud.reccnt<0!\n");
|
||||
CORRUPT(1);
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@ RECHECK:
|
|||
|
||||
if (k)
|
||||
{
|
||||
OSD_Printf("sv_readdiff() returned %d.\n", k);
|
||||
Printf("sv_readdiff() returned %d.\n", k);
|
||||
CORRUPT(6);
|
||||
}
|
||||
else
|
||||
|
@ -656,7 +656,7 @@ RECHECK:
|
|||
if (0)
|
||||
{
|
||||
corrupt:
|
||||
OSD_Printf(OSD_ERROR "Demo %d is corrupt (code %d).\n", g_whichDemo-1, corruptcode);
|
||||
Printf(OSD_ERROR "Demo %d is corrupt (code %d).\n", g_whichDemo-1, corruptcode);
|
||||
nextdemo:
|
||||
M_StartControlPanel(false);
|
||||
nextdemo_nomenu:
|
||||
|
@ -722,7 +722,7 @@ nextdemo_nomenu:
|
|||
// if fast-forwarding, we must update totalclock
|
||||
totalclock += TICSPERFRAME;
|
||||
|
||||
// OSD_Printf("t:%d, l+T:%d; cnt:%d, goal:%d%s", totalclock, (lockclock+TICSPERFRAME),
|
||||
// Printf("t:%d, l+T:%d; cnt:%d, goal:%d%s", totalclock, (lockclock+TICSPERFRAME),
|
||||
// g_demo_cnt, g_demo_goalCnt, g_demo_cnt>=g_demo_goalCnt?" ":"\n");
|
||||
if (g_demo_cnt>=g_demo_goalCnt)
|
||||
{
|
||||
|
@ -764,7 +764,7 @@ nextdemo_nomenu:
|
|||
{
|
||||
double t1 = timerGetHiTicks(), t2;
|
||||
|
||||
// initprintf("t=%d, o=%d, t-o = %d\n", totalclock,
|
||||
// Printf("t=%d, o=%d, t-o = %d\n", totalclock,
|
||||
// ototalclock, totalclock-ototalclock);
|
||||
|
||||
// NOTE: G_DrawRooms() calculates smoothratio inside and
|
||||
|
|
|
@ -358,7 +358,7 @@ static void G_OROR_DupeSprites(spritetype const *sp)
|
|||
tsp->z += -sp->z + actor[sp->yvel].ceilingz;
|
||||
tsp->sectnum = refsp->sectnum;
|
||||
|
||||
// OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsp->picnum,tsp->x,tsp->y,tsp->z);
|
||||
// Printf("duped sprite of pic %d at %d %d %d\n",tsp->picnum,tsp->x,tsp->y,tsp->z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ static void G_SE40(int32_t smoothratio)
|
|||
// XXX: PK: too large stack allocation for my taste
|
||||
int32_t i;
|
||||
int32_t pix_diff, newz;
|
||||
// initprintf("drawing ror\n");
|
||||
// Printf("drawing ror\n");
|
||||
|
||||
if (level)
|
||||
{
|
||||
|
@ -674,7 +674,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
|||
{
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (EDUKE32_PREDICT_FALSE(noDraw != 0))
|
||||
OSD_Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMSCAMERA return value must be 0 or 1, "
|
||||
Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMSCAMERA return value must be 0 or 1, "
|
||||
"other values are reserved.\n");
|
||||
#endif
|
||||
|
||||
|
@ -828,7 +828,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
|||
{
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (EDUKE32_PREDICT_FALSE(noDraw != 0))
|
||||
OSD_Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMS return value must be 0 or 1, "
|
||||
Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMS return value must be 0 or 1, "
|
||||
"other values are reserved.\n");
|
||||
#endif
|
||||
screen->BeginScene();
|
||||
|
@ -1016,7 +1016,7 @@ int32_t A_InsertSprite(int16_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int1
|
|||
if (EDUKE32_PREDICT_FALSE((unsigned)newSprite >= MAXSPRITES))
|
||||
{
|
||||
G_DumpDebugInfo();
|
||||
OSD_Printf("Failed spawning pic %d spr from pic %d spr %d at x:%d,y:%d,z:%d,sect:%d\n",
|
||||
Printf("Failed spawning pic %d spr from pic %d spr %d at x:%d,y:%d,z:%d,sect:%d\n",
|
||||
s_pn,s_ow < 0 ? -1 : TrackerCast(sprite[s_ow].picnum),s_ow,s_x,s_y,s_z,whatsect);
|
||||
G_GameExit("Too many sprites spawned.");
|
||||
}
|
||||
|
@ -2465,7 +2465,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
if (EDUKE32_PREDICT_FALSE(pSprite->hitag && pSprite->picnum == WATERBUBBLEMAKER))
|
||||
{
|
||||
// JBF 20030913: Pisses off X_Move(), eg. in bobsp2
|
||||
OSD_Printf(OSD_ERROR "WARNING: WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n",
|
||||
Printf(OSD_ERROR "WARNING: WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n",
|
||||
newSprite,TrackerCast(pSprite->x),TrackerCast(pSprite->y));
|
||||
pSprite->hitag = 0;
|
||||
}
|
||||
|
@ -2534,7 +2534,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
if (sprite[spriteNum].picnum == SECTOREFFECTOR && (sprite[spriteNum].lotag == 40 || sprite[spriteNum].lotag == 41) &&
|
||||
sprite[spriteNum].hitag == pSprite->hitag && newSprite != spriteNum)
|
||||
{
|
||||
// initprintf("found ror match\n");
|
||||
// Printf("found ror match\n");
|
||||
pSprite->yvel = spriteNum;
|
||||
break;
|
||||
}
|
||||
|
@ -2723,7 +2723,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
// use elevator sector's ceiling as heuristic
|
||||
T4(newSprite) = sector[sectNum].ceilingz;
|
||||
|
||||
OSD_Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector's ceilingz to "
|
||||
Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector's ceilingz to "
|
||||
"determine when to warp. Sector %d adjacent to a door?\n",
|
||||
newSprite, sectNum);
|
||||
}
|
||||
|
@ -2737,7 +2737,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
// heuristic
|
||||
T5(newSprite) = sector[sectNum].floorz;
|
||||
|
||||
OSD_Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector %d's floorz.\n",
|
||||
Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector %d's floorz.\n",
|
||||
newSprite, sectNum);
|
||||
}
|
||||
|
||||
|
@ -2944,7 +2944,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
}
|
||||
if (EDUKE32_PREDICT_FALSE(spriteNum == -1))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Found lonely Sector Effector (lotag 0) at (%d,%d)\n",
|
||||
Printf(OSD_ERROR "Found lonely Sector Effector (lotag 0) at (%d,%d)\n",
|
||||
TrackerCast(pSprite->x),TrackerCast(pSprite->y));
|
||||
changespritestat(newSprite, STAT_ACTOR);
|
||||
goto SPAWN_END;
|
||||
|
@ -3985,7 +3985,7 @@ skip:
|
|||
#ifdef DEBUGGINGAIDS
|
||||
// A negative actor[i].dispicnum used to mean 'no floor shadow please', but
|
||||
// that was a bad hack since the value could propagate to sprite[].picnum.
|
||||
OSD_Printf(OSD_ERROR "actor[%d].dispicnum = %d\n", i, actor[i].dispicnum);
|
||||
Printf(OSD_ERROR "actor[%d].dispicnum = %d\n", i, actor[i].dispicnum);
|
||||
#endif
|
||||
actor[i].dispicnum=0;
|
||||
continue;
|
||||
|
@ -4599,12 +4599,12 @@ static void parsedefinitions_game_include(const char *fileName, scriptfile *pScr
|
|||
{
|
||||
if (!Bstrcasecmp(cmdtokptr,"null") || pScript == NULL) // this is a bit overboard to prevent unused parameter warnings
|
||||
{
|
||||
// initprintf("Warning: Failed including %s as module\n", fn);
|
||||
// Printf("Warning: Failed including %s as module\n", fn);
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
Printf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
}
|
||||
*/
|
||||
|
@ -4649,14 +4649,14 @@ static void parsedefinitions_game_animsounds(scriptfile *pScript, const char * b
|
|||
// frame numbers start at 1 for us
|
||||
if (frameNum <= 0)
|
||||
{
|
||||
initprintf("Error: frame number must be greater zero on line %s:%d\n", pScript->filename,
|
||||
Printf("Error: frame number must be greater zero on line %s:%d\n", pScript->filename,
|
||||
scriptfile_getlinum(pScript, pScript->ltextptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (frameNum < lastFrameNum)
|
||||
{
|
||||
initprintf("Error: frame numbers must be in (not necessarily strictly)"
|
||||
Printf("Error: frame numbers must be in (not necessarily strictly)"
|
||||
" ascending order (line %s:%d)\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript, pScript->ltextptr));
|
||||
break;
|
||||
|
@ -4666,7 +4666,7 @@ static void parsedefinitions_game_animsounds(scriptfile *pScript, const char * b
|
|||
|
||||
if ((unsigned)soundNum >= MAXSOUNDS && soundNum != -1)
|
||||
{
|
||||
initprintf("Error: sound number #%d invalid on line %s:%d\n", soundNum, pScript->filename,
|
||||
Printf("Error: sound number #%d invalid on line %s:%d\n", soundNum, pScript->filename,
|
||||
scriptfile_getlinum(pScript, pScript->ltextptr));
|
||||
break;
|
||||
}
|
||||
|
@ -4684,12 +4684,12 @@ static void parsedefinitions_game_animsounds(scriptfile *pScript, const char * b
|
|||
|
||||
if (!defError)
|
||||
{
|
||||
// initprintf("Defined sound sequence for hi-anim \"%s\" with %d frame/sound pairs\n",
|
||||
// Printf("Defined sound sequence for hi-anim \"%s\" with %d frame/sound pairs\n",
|
||||
// hardcoded_anim_tokens[animnum].text, numpairs);
|
||||
}
|
||||
else
|
||||
{
|
||||
initprintf("Failed defining sound sequence for anim \"%s\".\n", fileName);
|
||||
Printf("Failed defining sound sequence for anim \"%s\".\n", fileName);
|
||||
}
|
||||
animPtr->Sounds.ShrinkToFit();
|
||||
}
|
||||
|
@ -4824,7 +4824,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
{
|
||||
if (musicID==NULL)
|
||||
{
|
||||
initprintf("Error: missing ID for music definition near line %s:%d\n",
|
||||
Printf("Error: missing ID for music definition near line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
@ -4833,7 +4833,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
break;
|
||||
|
||||
if (S_DefineMusic(musicID, fileName) == -1)
|
||||
initprintf("Error: invalid music ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
Printf("Error: invalid music ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -4927,7 +4927,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
if (!animPtr)
|
||||
{
|
||||
initprintf("Error: expected animation filename on line %s:%d\n",
|
||||
Printf("Error: expected animation filename on line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
@ -4973,7 +4973,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
{
|
||||
if (soundNum==-1)
|
||||
{
|
||||
initprintf("Error: missing ID for sound definition near line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
Printf("Error: missing ID for sound definition near line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4982,7 +4982,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
// maybe I should have just packed this into a sound_t and passed a reference...
|
||||
if (S_DefineSound(soundNum, fileName, minpitch, maxpitch, priority, type, distance, volume) == -1)
|
||||
initprintf("Error: invalid sound ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
Printf("Error: invalid sound ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -5014,7 +5014,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
if ((unsigned)choiceID >= MAXMENUGAMEPLAYENTRIES)
|
||||
{
|
||||
initprintf("Error: Maximum choices exceeded near line %s:%d\n",
|
||||
Printf("Error: Maximum choices exceeded near line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript, choicePtr));
|
||||
pScript->textptr = choiceEnd+1;
|
||||
}
|
||||
|
@ -5039,7 +5039,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
if ((unsigned)subChoiceID >= MAXMENUGAMEPLAYENTRIES)
|
||||
{
|
||||
initprintf("Error: Maximum subchoices exceeded near line %s:%d\n",
|
||||
Printf("Error: Maximum subchoices exceeded near line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript, subChoicePtr));
|
||||
pScript->textptr = subChoiceEnd+1;
|
||||
}
|
||||
|
@ -5237,7 +5237,7 @@ static void G_CompileScripts(void)
|
|||
static inline void G_CheckGametype(void)
|
||||
{
|
||||
m_coop = clamp(*m_coop, 0, g_gametypeCnt-1);
|
||||
initprintf("%s\n",g_gametypeNames[m_coop]);
|
||||
Printf("%s\n",g_gametypeNames[m_coop]);
|
||||
if (g_gametypeFlags[m_coop] & GAMETYPE_ITEMRESPAWN)
|
||||
ud.m_respawn_items = ud.m_respawn_inventory = 1;
|
||||
}
|
||||
|
@ -5334,7 +5334,7 @@ void El_CreateGameState(void)
|
|||
|
||||
if ((i = El_CreateState(&g_ElState, "game")))
|
||||
{
|
||||
initprintf("Lunatic: Error initializing global ELua state (code %d)\n", i);
|
||||
Printf("Lunatic: Error initializing global ELua state (code %d)\n", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5343,7 +5343,7 @@ void El_CreateGameState(void)
|
|||
if ((i = L_RunString(&g_ElState, luaJIT_BC__defs_game,
|
||||
LUNATIC_DEFS_BC_SIZE, "_defs_game.lua")))
|
||||
{
|
||||
initprintf("Lunatic: Error preparing global ELua state (code %d)\n", i);
|
||||
Printf("Lunatic: Error preparing global ELua state (code %d)\n", i);
|
||||
El_DestroyState(&g_ElState);
|
||||
}
|
||||
}
|
||||
|
@ -5401,7 +5401,7 @@ static void G_Startup(void)
|
|||
FString startupMap;
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
initprintf("The -map option is available in the registered version only!\n");
|
||||
Printf("The -map option is available in the registered version only!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5413,11 +5413,11 @@ static void G_Startup(void)
|
|||
|
||||
if (fileSystem.FileExists(startupMap))
|
||||
{
|
||||
initprintf("Using level: \"%s\".\n",startupMap.GetChars());
|
||||
Printf("Using level: \"%s\".\n",startupMap.GetChars());
|
||||
}
|
||||
else
|
||||
{
|
||||
initprintf("Level \"%s\" not found.\n",startupMap.GetChars());
|
||||
Printf("Level \"%s\" not found.\n",startupMap.GetChars());
|
||||
boardfilename[0] = 0;
|
||||
}
|
||||
}
|
||||
|
@ -5430,7 +5430,7 @@ static void G_Startup(void)
|
|||
Net_GetPackets();
|
||||
|
||||
if (numplayers > 1)
|
||||
initprintf("Multiplayer initialized.\n");
|
||||
Printf("Multiplayer initialized.\n");
|
||||
|
||||
if (TileFiles.artLoadFiles("tiles%03i.art") < 0)
|
||||
G_GameExit("Failed loading art.");
|
||||
|
@ -5439,7 +5439,7 @@ static void G_Startup(void)
|
|||
// after dynamic tile remapping (from C_Compile) and loading tiles.
|
||||
picanm[LOADSCREEN].sf |= PICANM_NOFULLBRIGHT_BIT;
|
||||
|
||||
// initprintf("Loading palette/lookups...\n");
|
||||
// Printf("Loading palette/lookups...\n");
|
||||
G_LoadLookups();
|
||||
|
||||
screenpeek = myconnectindex;
|
||||
|
@ -5607,7 +5607,7 @@ int GameInterface::app_main()
|
|||
// gotta set the proper title after we compile the CONs if this is the full version
|
||||
|
||||
if (g_scriptDebug)
|
||||
initprintf("CON debugging activated (level %d).\n",g_scriptDebug);
|
||||
Printf("CON debugging activated (level %d).\n",g_scriptDebug);
|
||||
|
||||
#ifndef NETCODE_DISABLE
|
||||
if (g_networkMode == NET_SERVER || g_networkMode == NET_DEDICATED_SERVER)
|
||||
|
@ -5663,7 +5663,7 @@ int GameInterface::app_main()
|
|||
if (!loaddefinitionsfile(defsfile))
|
||||
{
|
||||
uint32_t etime = timerGetTicks();
|
||||
initprintf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
Printf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
}
|
||||
loaddefinitions_game(defsfile, FALSE);
|
||||
|
||||
|
@ -5707,7 +5707,7 @@ int GameInterface::app_main()
|
|||
|
||||
int const clipMapError = engineLoadClipMaps();
|
||||
if (clipMapError > 0)
|
||||
initprintf("There was an error loading the sprite clipping map (status %d).\n", clipMapError);
|
||||
Printf("There was an error loading the sprite clipping map (status %d).\n", clipMapError);
|
||||
|
||||
g_clipMapFiles.Reset();
|
||||
|
||||
|
@ -5755,7 +5755,7 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
if(g_netClient)
|
||||
{
|
||||
OSD_Printf("Waiting for initial snapshot...");
|
||||
Printf("Waiting for initial snapshot...");
|
||||
Net_WaitForInitialSnapshot();
|
||||
|
||||
|
||||
|
|
|
@ -1130,12 +1130,12 @@ static void C_SkipComments(void)
|
|||
{
|
||||
case '/': // C++ style comment
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
initprintf("%s:%d: debug: got comment.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: got comment.\n",g_scriptFileName,g_lineNumber);
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
case '*': // beginning of a C style comment
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
initprintf("%s:%d: debug: got start of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: got start of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
do
|
||||
{
|
||||
if (*textptr == '\n')
|
||||
|
@ -1147,22 +1147,22 @@ static void C_SkipComments(void)
|
|||
if (EDUKE32_PREDICT_FALSE(!*textptr))
|
||||
{
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: EOF in comment!\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: EOF in comment!\n",g_scriptFileName,g_lineNumber);
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `/*' with no `*/'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `/*' with no `*/'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_scriptActorOffset = g_numBraces = g_processingState = 0;
|
||||
g_errorCnt++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
initprintf("%s:%d: debug: got end of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: got end of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
|
||||
textptr+=2;
|
||||
continue;
|
||||
default:
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: malformed comment.\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: malformed comment.\n", g_scriptFileName, g_lineNumber);
|
||||
scriptSkipLine();
|
||||
g_errorCnt++;
|
||||
continue;
|
||||
|
@ -1232,7 +1232,7 @@ static void C_GetNextLabelName(void)
|
|||
label[(g_labelCnt<<6)+i] = 0;
|
||||
|
||||
if (!(g_errorCnt|g_warningCnt) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: label `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: debug: label `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
}
|
||||
|
||||
static inline void scriptWriteValue(int32_t const value)
|
||||
|
@ -1318,7 +1318,7 @@ static int C_GetNextKeyword(void) //Returns its code #
|
|||
|
||||
textptr += l;
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: keyword `%s'.\n", g_scriptFileName, g_lineNumber, tempbuf);
|
||||
Printf("%s:%d: debug: keyword `%s'.\n", g_scriptFileName, g_lineNumber, tempbuf);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -1328,7 +1328,7 @@ static int C_GetNextKeyword(void) //Returns its code #
|
|||
if (EDUKE32_PREDICT_FALSE((tempbuf[0] == '{' || tempbuf[0] == '}') && tempbuf[1] != 0))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: expected whitespace between `%c' and `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf[0],tempbuf+1);
|
||||
Printf("%s:%d: error: expected whitespace between `%c' and `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf[0],tempbuf+1);
|
||||
}
|
||||
else C_ReportError(ERROR_EXPECTEDKEYWORD);
|
||||
|
||||
|
@ -1350,7 +1350,7 @@ static int32_t parse_decimal_number(void) // (textptr)
|
|||
// (CON code in the wild exists that does this). Note that such conversion
|
||||
// is implementation-defined (C99 6.3.1.3) but GCC does the 'expected' thing.
|
||||
#if 0
|
||||
initprintf("%s:%d: warning: number greater than INT32_MAX converted to a negative one.\n",
|
||||
Printf("%s:%d: warning: number greater than INT32_MAX converted to a negative one.\n",
|
||||
g_szScriptFileName,g_lineNumber);
|
||||
g_numCompilerWarnings++;
|
||||
#endif
|
||||
|
@ -1359,7 +1359,7 @@ static int32_t parse_decimal_number(void) // (textptr)
|
|||
{
|
||||
// out of range, this is arguably worse
|
||||
|
||||
initprintf("%s:%d: warning: number out of the range of a 32-bit integer encountered.\n",
|
||||
Printf("%s:%d: warning: number out of the range of a 32-bit integer encountered.\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
@ -1374,7 +1374,7 @@ static int32_t parse_hex_constant(const char *hexnum)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(x > UINT32_MAX))
|
||||
{
|
||||
initprintf(g_scriptFileName, ":", g_lineNumber, ": warning: number 0x", hex(x), " truncated to 32 bits.\n");
|
||||
Printf(g_scriptFileName, ":", g_lineNumber, ": warning: number 0x", hex(x), " truncated to 32 bits.\n");
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
||||
|
@ -1400,7 +1400,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
scriptWriteValue(parse_decimal_number());
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: constant %ld in place of gamevar.\n", g_scriptFileName, g_lineNumber, (long)(g_scriptPtr[-1]));
|
||||
Printf("%s:%d: debug: constant %ld in place of gamevar.\n", g_scriptFileName, g_lineNumber, (long)(g_scriptPtr[-1]));
|
||||
#if 1
|
||||
while (!ispecial(*textptr) && *textptr != ']') textptr++;
|
||||
#else
|
||||
|
@ -1419,7 +1419,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
}
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: flagging gamevar as negative.\n", g_scriptFileName, g_lineNumber); //,Batol(textptr));
|
||||
Printf("%s:%d: debug: flagging gamevar as negative.\n", g_scriptFileName, g_lineNumber); //,Batol(textptr));
|
||||
|
||||
flags = GV_FLAG_NEGATIVE;
|
||||
textptr++;
|
||||
|
@ -1524,7 +1524,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
textptr++;
|
||||
/// now pointing at 'xxx'
|
||||
C_GetNextLabelName();
|
||||
/*initprintf("found xxx label of \"%s\"\n", label+(g_numLabels<<6));*/
|
||||
/*Printf("found xxx label of \"%s\"\n", label+(g_numLabels<<6));*/
|
||||
|
||||
int32_t labelNum = -1;
|
||||
|
||||
|
@ -1632,7 +1632,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
if (EDUKE32_PREDICT_TRUE(id>=0 && labeltype[id] & LABEL_DEFINE))
|
||||
{
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: label `%s' in place of gamevar.\n",g_scriptFileName,g_lineNumber,label+(id<<6));
|
||||
Printf("%s:%d: debug: label `%s' in place of gamevar.\n",g_scriptFileName,g_lineNumber,label+(id<<6));
|
||||
|
||||
scriptWriteValue(GV_FLAG_CONSTANT);
|
||||
scriptWriteValue(labelcode[id]);
|
||||
|
@ -1659,7 +1659,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
}
|
||||
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
initprintf("%s:%d: debug: gamevar `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: debug: gamevar `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
|
||||
scriptWriteValue(id|flags);
|
||||
}
|
||||
|
@ -1712,7 +1712,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
char *gl = C_GetLabelType(labeltype[i]);
|
||||
initprintf("%s:%d: debug: %s label `%s'.\n",g_scriptFileName,g_lineNumber,gl,label+(i<<6));
|
||||
Printf("%s:%d: debug: %s label `%s'.\n",g_scriptFileName,g_lineNumber,gl,label+(i<<6));
|
||||
Xfree(gl);
|
||||
}
|
||||
|
||||
|
@ -1727,7 +1727,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
char * const el = C_GetLabelType(type);
|
||||
char * const gl = C_GetLabelType(labeltype[i]);
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: expected %s, found %s.\n",g_scriptFileName,g_lineNumber,el,gl);
|
||||
Printf("%s:%d: warning: expected %s, found %s.\n",g_scriptFileName,g_lineNumber,el,gl);
|
||||
g_warningCnt++;
|
||||
Xfree(el);
|
||||
Xfree(gl);
|
||||
|
@ -1758,7 +1758,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
if (EDUKE32_PREDICT_FALSE(!isdigit(textptr[i--])))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: invalid character `%c' in definition!\n",g_scriptFileName,g_lineNumber,textptr[i+1]);
|
||||
Printf("%s:%d: warning: invalid character `%c' in definition!\n",g_scriptFileName,g_lineNumber,textptr[i+1]);
|
||||
g_warningCnt++;
|
||||
break;
|
||||
}
|
||||
|
@ -1771,7 +1771,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
scriptWriteValue(parse_decimal_number());
|
||||
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
initprintf("%s:%d: debug: constant %ld.\n", g_scriptFileName, g_lineNumber, (long)g_scriptPtr[-1]);
|
||||
Printf("%s:%d: debug: constant %ld.\n", g_scriptFileName, g_lineNumber, (long)g_scriptPtr[-1]);
|
||||
|
||||
textptr += l;
|
||||
|
||||
|
@ -1868,7 +1868,7 @@ static bool C_CheckMalformedBranch(intptr_t lastScriptPtr)
|
|||
g_skipBranch = true;
|
||||
C_ReportError(-1);
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: malformed `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
Printf("%s:%d: warning: malformed `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
VM_GetKeywordForID(*(g_scriptPtr) & VM_INSTMASK));
|
||||
return true;
|
||||
}
|
||||
|
@ -1894,7 +1894,7 @@ static bool C_CheckEmptyBranch(int tw, intptr_t lastScriptPtr)
|
|||
C_ReportError(-1);
|
||||
g_warningCnt++;
|
||||
g_scriptPtr = lastScriptPtr + apScript;
|
||||
initprintf("%s:%d: warning: empty `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
Printf("%s:%d: warning: empty `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
VM_GetKeywordForID(*(g_scriptPtr) & VM_INSTMASK));
|
||||
scriptWriteAtOffset(CON_NULLOP | (VM_IFELSE_MAGIC<<12), g_scriptPtr);
|
||||
return true;
|
||||
|
@ -1936,14 +1936,14 @@ static void C_Include(const char *confile)
|
|||
if (!fp.isOpen())
|
||||
{
|
||||
g_errorCnt++;
|
||||
initprintf("%s:%d: error: could not find file `%s'.\n",g_scriptFileName,g_lineNumber,confile);
|
||||
Printf("%s:%d: error: could not find file `%s'.\n",g_scriptFileName,g_lineNumber,confile);
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t const len = fp.GetLength();
|
||||
char *mptr = (char *)Xmalloc(len+1);
|
||||
|
||||
initprintf("Including: %s (%d bytes)\n",confile, len);
|
||||
Printf("Including: %s (%d bytes)\n",confile, len);
|
||||
|
||||
fp.Read(mptr, len);
|
||||
fp.Close();
|
||||
|
@ -2265,7 +2265,7 @@ static void scriptUpdateOpcodeForVariableType(intptr_t *ins)
|
|||
{
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
initprintf("%s:%d: %s -> %s for var %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: %s -> %s for var %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(*ins & VM_INSTMASK), VM_GetKeywordForID(opcode), aGameVars[ins[1] & (MAXGAMEVARS-1)].szLabel);
|
||||
}
|
||||
|
||||
|
@ -2342,7 +2342,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE((j = hash_find(&h_labels,LAST_LABEL)) < 0))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: state `%s' not found.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: state `%s' not found.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
g_errorCnt++;
|
||||
g_scriptPtr++;
|
||||
continue;
|
||||
|
@ -2352,7 +2352,7 @@ DO_DEFSTATE:
|
|||
{
|
||||
char *gl = (char *) C_GetLabelType(labeltype[j]);
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: expected state, found %s.\n", g_scriptFileName, g_lineNumber, gl);
|
||||
Printf("%s:%d: warning: expected state, found %s.\n", g_scriptFileName, g_lineNumber, gl);
|
||||
g_warningCnt++;
|
||||
Xfree(gl);
|
||||
scriptWriteAtOffset(CON_NULLOP, &g_scriptPtr[-1]); // get rid of the state, leaving a nullop to satisfy if conditions
|
||||
|
@ -2360,7 +2360,7 @@ DO_DEFSTATE:
|
|||
}
|
||||
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
initprintf("%s:%d: debug: state label `%s'.\n", g_scriptFileName, g_lineNumber, label+(j<<6));
|
||||
Printf("%s:%d: debug: state label `%s'.\n", g_scriptFileName, g_lineNumber, label+(j<<6));
|
||||
|
||||
// 'state' type labels are always script addresses, as far as I can see
|
||||
scriptWritePointer((intptr_t)(apScript+labelcode[j]), g_scriptPtr++);
|
||||
|
@ -2370,7 +2370,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE(g_processingState == 0))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `ends' without open `state'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `ends' without open `state'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
}
|
||||
|
||||
|
@ -2543,7 +2543,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE(labelcode[i] != g_scriptPtr[-1]))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: ignored redefinition of `%s' to %d (old: %d).\n",g_scriptFileName,
|
||||
Printf("%s:%d: warning: ignored redefinition of `%s' to %d (old: %d).\n",g_scriptFileName,
|
||||
g_lineNumber,LAST_LABEL, (int32_t)(g_scriptPtr[-1]), labelcode[i]);
|
||||
}
|
||||
}
|
||||
|
@ -2581,7 +2581,7 @@ DO_DEFSTATE:
|
|||
{
|
||||
C_ReportError(-1);
|
||||
scriptWriteAtOffset(0, &g_scriptPtr[-1]);
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
||||
|
@ -2613,7 +2613,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE((i = hash_find(&h_labels,LAST_LABEL)) >= 0))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: duplicate move `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: duplicate move `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2653,7 +2653,7 @@ DO_DEFSTATE:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: volume number must be between 0 and MAXVOLUMES+1=%d.\n",
|
||||
Printf("%s:%d: error: volume number must be between 0 and MAXVOLUMES+1=%d.\n",
|
||||
g_scriptFileName, g_lineNumber, MAXVOLUMES+1);
|
||||
continue;
|
||||
|
||||
|
@ -2734,7 +2734,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE(i>=0))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: duplicate ai `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: duplicate ai `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2755,7 +2755,7 @@ DO_DEFSTATE:
|
|||
{
|
||||
C_ReportError(-1);
|
||||
scriptWriteAtOffset(0, &g_scriptPtr[-1]);
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
||||
|
@ -2808,7 +2808,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE(i>=0))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: duplicate action `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: duplicate action `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2871,7 +2871,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE(j > 6 || (j&3)==3))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: invalid useractor type. Must be 0, 1, 2"
|
||||
Printf("%s:%d: warning: invalid useractor type. Must be 0, 1, 2"
|
||||
" (notenemy, enemy, enemystayput) or have 4 added (\"doesn't move\").\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
|
@ -2942,7 +2942,7 @@ DO_DEFSTATE:
|
|||
{
|
||||
C_ReportError(-1);
|
||||
scriptWriteAtOffset(0, &g_scriptPtr[-1]);
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
break;
|
||||
|
@ -2987,7 +2987,7 @@ DO_DEFSTATE:
|
|||
//AddLog(g_szBuf);
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXEVENTS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: invalid event ID.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: invalid event ID.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
continue;
|
||||
}
|
||||
|
@ -3032,7 +3032,7 @@ DO_DEFSTATE:
|
|||
{
|
||||
g_scriptPtr[-1] = 32768;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: tried to set cstat 32767, using 32768 instead.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: tried to set cstat 32767, using 32768 instead.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
else if (EDUKE32_PREDICT_FALSE((g_scriptPtr[-1] & 48) == 48))
|
||||
|
@ -3040,7 +3040,7 @@ DO_DEFSTATE:
|
|||
i = g_scriptPtr[-1];
|
||||
g_scriptPtr[-1] ^= 48;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: tried to set cstat %d, using %d instead.\n",g_scriptFileName,g_lineNumber,i,(int32_t)(g_scriptPtr[-1]));
|
||||
Printf("%s:%d: warning: tried to set cstat %d, using %d instead.\n",g_scriptFileName,g_lineNumber,i,(int32_t)(g_scriptPtr[-1]));
|
||||
g_warningCnt++;
|
||||
}
|
||||
continue;
|
||||
|
@ -3095,7 +3095,7 @@ DO_DEFSTATE:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: invalid quote\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: invalid quote\n", g_scriptFileName, g_lineNumber);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -3108,7 +3108,7 @@ DO_DEFSTATE:
|
|||
g_warningCnt++;
|
||||
C_ReportError(-1);
|
||||
|
||||
initprintf("%s:%d: warning: found `else' with no `if'\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: warning: found `else' with no `if'\n", g_scriptFileName, g_lineNumber);
|
||||
|
||||
if (C_GetKeyword() == CON_LEFTBRACE)
|
||||
{
|
||||
|
@ -3352,7 +3352,7 @@ DO_DEFSTATE:
|
|||
if (unlikely(g_currentEvent != EVENT_ANIMATESPRITES))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: found `%s' outside of EVENT_ANIMATESPRITES\n",g_szScriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: warning: found `%s' outside of EVENT_ANIMATESPRITES\n",g_szScriptFileName,g_lineNumber,tempbuf);
|
||||
g_numCompilerWarnings++;
|
||||
}
|
||||
#endif
|
||||
|
@ -3480,7 +3480,7 @@ DO_DEFSTATE:
|
|||
if (EDUKE32_PREDICT_FALSE(*g_scriptPtr > BYTEVERSION_EDUKE32))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: need build %d, found build %d\n",g_scriptFileName,g_lineNumber,k,BYTEVERSION_EDUKE32);
|
||||
Printf("%s:%d: warning: need build %d, found build %d\n",g_scriptFileName,g_lineNumber,k,BYTEVERSION_EDUKE32);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
@ -3488,7 +3488,7 @@ DO_DEFSTATE:
|
|||
g_scriptPtr--;
|
||||
if (EDUKE32_PREDICT_FALSE(g_dynamicTileMapping))
|
||||
{
|
||||
initprintf("%s:%d: warning: duplicate dynamicremap statement\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: duplicate dynamicremap statement\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
g_dynamicTileMapping = 1;
|
||||
|
@ -3498,19 +3498,19 @@ DO_DEFSTATE:
|
|||
g_scriptPtr--;
|
||||
if (EDUKE32_PREDICT_FALSE(g_dynamicSoundMapping))
|
||||
{
|
||||
initprintf("%s:%d: warning: duplicate dynamicsoundremap statement\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: duplicate dynamicsoundremap statement\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
else
|
||||
#ifdef DYNSOUNDREMAP_ENABLE
|
||||
#ifdef DEBUGGINGAIDS
|
||||
initprintf("Using dynamic sound remapping\n");
|
||||
Printf("Using dynamic sound remapping\n");
|
||||
#endif
|
||||
|
||||
g_dynamicSoundMapping = 1;
|
||||
#else
|
||||
{
|
||||
initprintf("%s:%d: warning: dynamic sound remapping is disabled in this build\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: dynamic sound remapping is disabled in this build\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
#endif
|
||||
|
@ -3541,7 +3541,7 @@ setvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: divide or multiply by zero! What are you doing?\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: divide or multiply by zero! What are you doing?\n", g_scriptFileName, g_lineNumber);
|
||||
continue;
|
||||
}
|
||||
else if (tw == CON_DIVVAR || tw == CON_MULVAR)
|
||||
|
@ -3554,7 +3554,7 @@ setvar:
|
|||
|
||||
if (!g_errorCnt && !g_warningCnt && g_scriptDebug > 1)
|
||||
{
|
||||
initprintf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(tw), VM_GetKeywordForID(opcode));
|
||||
}
|
||||
|
||||
|
@ -3568,7 +3568,7 @@ setvar:
|
|||
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
initprintf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(tw), VM_GetKeywordForID(opcode));
|
||||
}
|
||||
|
||||
|
@ -3609,7 +3609,7 @@ setvarvar:
|
|||
{
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
initprintf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(*ins & VM_INSTMASK), VM_GetKeywordForID(opcode));
|
||||
}
|
||||
|
||||
|
@ -3688,7 +3688,7 @@ setvarvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: variable `%s' is not per-actor.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: variable `%s' is not per-actor.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
@ -3697,7 +3697,7 @@ setvarvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: variable `%s' is not per-player.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: variable `%s' is not per-player.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
@ -3822,7 +3822,7 @@ setvarvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: can't resize system array `%s'.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
Printf("%s:%d: error: can't resize system array `%s'.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3839,7 +3839,7 @@ setvarvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: can't swap system array `%s'.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
Printf("%s:%d: error: can't swap system array `%s'.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3853,7 +3853,7 @@ setvarvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: can't swap system array `%s'.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
Printf("%s:%d: error: can't swap system array `%s'.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3861,7 +3861,7 @@ setvarvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: can't swap arrays of different storage classes.\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: can't swap arrays of different storage classes.\n", g_scriptFileName, g_lineNumber);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -3927,7 +3927,7 @@ setvarvar:
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE(g_currentEvent == EVENT_ANIMATESPRITES))
|
||||
{
|
||||
initprintf("%s:%d: warning: found `%s' inside EVENT_ANIMATESPRITES\n",
|
||||
Printf("%s:%d: warning: found `%s' inside EVENT_ANIMATESPRITES\n",
|
||||
g_scriptFileName,g_lineNumber,tempbuf);
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
@ -4169,7 +4169,7 @@ setvarvar:
|
|||
{
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
initprintf("%s:%d: replacing %s with %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: replacing %s with %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(*ins & VM_INSTMASK), VM_GetKeywordForID(opcode));
|
||||
}
|
||||
|
||||
|
@ -4464,7 +4464,7 @@ ifvar:
|
|||
// probably does not allow nesting...
|
||||
|
||||
j=C_CountCaseStatements();
|
||||
// initprintf("Done Counting Case Statements for switch %d: found %d.\n", g_checkingSwitch,j);
|
||||
// Printf("Done Counting Case Statements for switch %d: found %d.\n", g_checkingSwitch,j);
|
||||
g_scriptPtr+=j*2;
|
||||
C_SkipComments();
|
||||
g_scriptPtr-=j*2; // allocate buffer for the table
|
||||
|
@ -4533,7 +4533,7 @@ ifvar:
|
|||
std::swap(tempscrptr[i+1], tempscrptr[n+1]);
|
||||
}
|
||||
}
|
||||
// for (j=3;j<3+tempscrptr[1]*2;j+=2)initprintf("%5d %8x\n",tempscrptr[j],tempscrptr[j+1]);
|
||||
// for (j=3;j<3+tempscrptr[1]*2;j+=2)Printf("%5d %8x\n",tempscrptr[j],tempscrptr[j+1]);
|
||||
|
||||
// save 'end' location
|
||||
scriptWriteAtOffset((intptr_t)g_scriptPtr - (intptr_t)apScript, tempscrptr);
|
||||
|
@ -4556,7 +4556,7 @@ ifvar:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `%s' statement when not in switch\n", g_scriptFileName,
|
||||
Printf("%s:%d: error: found `%s' statement when not in switch\n", g_scriptFileName,
|
||||
g_lineNumber, tw == CON_CASE ? "case" : "default");
|
||||
g_scriptPtr--;
|
||||
return 1;
|
||||
|
@ -4594,7 +4594,7 @@ repeatcase:
|
|||
// duplicate default statement
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: multiple `default' statements found in switch\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: multiple `default' statements found in switch\n", g_scriptFileName, g_lineNumber);
|
||||
}
|
||||
g_caseTablePtr[0]=(intptr_t) (g_scriptPtr-apScript); // save offset
|
||||
}
|
||||
|
@ -4648,7 +4648,7 @@ repeatcase:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `endswitch' before `break' or `return'\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: found `endswitch' before `break' or `return'\n", g_scriptFileName, g_lineNumber);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4656,7 +4656,7 @@ repeatcase:
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `endswitch' without matching `switch'\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: found `endswitch' without matching `switch'\n", g_scriptFileName, g_lineNumber);
|
||||
}
|
||||
return 1; // end of block
|
||||
|
||||
|
@ -4723,7 +4723,7 @@ repeatcase:
|
|||
{
|
||||
C_ReportError(-1);
|
||||
g_scriptPtr[-1] = 0;
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
break;
|
||||
|
@ -4835,7 +4835,7 @@ repeatcase:
|
|||
if ((g_scriptPtr[-2]>>12) == (VM_IFELSE_MAGIC) &&
|
||||
((g_scriptPtr[-2] & VM_INSTMASK) == CON_LEFTBRACE)) // rewrite "{ }" into "nullop"
|
||||
{
|
||||
// initprintf("%s:%d: rewriting empty braces '{ }' as 'nullop' from right\n",g_szScriptFileName,g_lineNumber);
|
||||
// Printf("%s:%d: rewriting empty braces '{ }' as 'nullop' from right\n",g_szScriptFileName,g_lineNumber);
|
||||
g_scriptPtr[-2] = CON_NULLOP | (VM_IFELSE_MAGIC<<12);
|
||||
g_scriptPtr -= 2;
|
||||
|
||||
|
@ -4859,7 +4859,7 @@ repeatcase:
|
|||
}
|
||||
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found more `}' than `{'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found more `}' than `{'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
}
|
||||
|
||||
|
@ -4886,14 +4886,14 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXVOLUMES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
}
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)k > MAXLEVELS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: level number exceeds maximum number of levels per episode.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: level number exceeds maximum number of levels per episode.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -4911,7 +4911,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXSKILLS))
|
||||
{
|
||||
initprintf("%s:%d: error: skill number exceeds maximum skill count %d.\n",
|
||||
Printf("%s:%d: error: skill number exceeds maximum skill count %d.\n",
|
||||
g_scriptFileName,g_lineNumber, MAXSKILLS);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -4930,7 +4930,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXVOLUMES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: volume number exceeds maximum volume count.\n",
|
||||
Printf("%s:%d: error: volume number exceeds maximum volume count.\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -4951,7 +4951,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXVOLUMES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: volume number exceeds maximum volume count.\n",
|
||||
Printf("%s:%d: error: volume number exceeds maximum volume count.\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -4976,7 +4976,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXVOLUMES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -4995,7 +4995,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > NUMGAMEFUNCTIONS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: function number exceeds number of game functions.\n",
|
||||
Printf("%s:%d: error: function number exceeds number of game functions.\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5011,7 +5011,7 @@ repeatcase:
|
|||
textptr++, i++;
|
||||
if (EDUKE32_PREDICT_FALSE(*textptr != 0x0a && *textptr != 0x0d && ispecial(*textptr)))
|
||||
{
|
||||
initprintf("%s:%d: warning: invalid character in function name.\n",
|
||||
Printf("%s:%d: warning: invalid character in function name.\n",
|
||||
g_scriptFileName, g_lineNumber);
|
||||
g_warningCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5031,7 +5031,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > NUMGAMEFUNCTIONS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: function number exceeds number of game functions.\n",
|
||||
Printf("%s:%d: error: function number exceeds number of game functions.\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5052,7 +5052,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXSKILLS))
|
||||
{
|
||||
initprintf("%s:%d: error: skill number exceeds maximum skill count %d.\n",
|
||||
Printf("%s:%d: error: skill number exceeds maximum skill count %d.\n",
|
||||
g_scriptFileName,g_lineNumber, MAXSKILLS);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5086,7 +5086,7 @@ repeatcase:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= (signed)sizeof(gamename)))
|
||||
{
|
||||
initprintf("%s:%d: warning: truncating game name to %d characters.\n",
|
||||
Printf("%s:%d: warning: truncating game name to %d characters.\n",
|
||||
g_scriptFileName,g_lineNumber,(int32_t)sizeof(gamename)-1);
|
||||
g_warningCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5146,7 +5146,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXGAMETYPES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: gametype number exceeds maximum gametype count.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: gametype number exceeds maximum gametype count.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -5161,7 +5161,7 @@ repeatcase:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= (signed)sizeof(g_gametypeNames[j])))
|
||||
{
|
||||
initprintf("%s:%d: warning: truncating gametype name to %d characters.\n",
|
||||
Printf("%s:%d: warning: truncating gametype name to %d characters.\n",
|
||||
g_scriptFileName,g_lineNumber,(int32_t)sizeof(g_gametypeNames[j])-1);
|
||||
g_warningCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5183,14 +5183,14 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXVOLUMES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
}
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)k > MAXLEVELS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: level number exceeds maximum number of levels per episode.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: level number exceeds maximum number of levels per episode.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -5206,7 +5206,7 @@ repeatcase:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= BMAX_PATH))
|
||||
{
|
||||
initprintf("%s:%d: error: level file name exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,BMAX_PATH);
|
||||
Printf("%s:%d: error: level file name exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,BMAX_PATH);
|
||||
g_errorCnt++;
|
||||
scriptSkipSpaces();
|
||||
break;
|
||||
|
@ -5245,7 +5245,7 @@ repeatcase:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= 32))
|
||||
{
|
||||
initprintf("%s:%d: warning: truncating level name to %d characters.\n",
|
||||
Printf("%s:%d: warning: truncating level name to %d characters.\n",
|
||||
g_scriptFileName,g_lineNumber,31);
|
||||
g_warningCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5273,7 +5273,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)k >= MAXQUOTES))
|
||||
{
|
||||
initprintf("%s:%d: error: quote number exceeds limit of %d.\n",g_scriptFileName,g_lineNumber,MAXQUOTES);
|
||||
Printf("%s:%d: error: quote number exceeds limit of %d.\n",g_scriptFileName,g_lineNumber,MAXQUOTES);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -5316,7 +5316,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)k >= NUMCHEATS))
|
||||
{
|
||||
initprintf("%s:%d: error: cheat number exceeds limit of %d.\n",g_scriptFileName,g_lineNumber,NUMCHEATS);
|
||||
Printf("%s:%d: error: cheat number exceeds limit of %d.\n",g_scriptFileName,g_lineNumber,NUMCHEATS);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -5334,7 +5334,7 @@ repeatcase:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= MAXCHEATDESC))
|
||||
{
|
||||
initprintf("%s:%d: warning: truncating cheat text to %d characters.\n",g_scriptFileName,g_lineNumber,MAXCHEATDESC-1);
|
||||
Printf("%s:%d: warning: truncating cheat text to %d characters.\n",g_scriptFileName,g_lineNumber,MAXCHEATDESC-1);
|
||||
g_warningCnt++;
|
||||
scriptSkipLine();
|
||||
break;
|
||||
|
@ -5362,7 +5362,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j >= NUMCHEATS))
|
||||
{
|
||||
initprintf("%s:%d: error: cheat undefinition attempts to undefine nonexistent cheat.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: cheat undefinition attempts to undefine nonexistent cheat.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -5378,7 +5378,7 @@ repeatcase:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)k >= NUMCHEATS))
|
||||
{
|
||||
initprintf("%s:%d: error: cheat redefinition attempts to redefine nonexistent cheat.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: cheat redefinition attempts to redefine nonexistent cheat.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
|
@ -5392,7 +5392,7 @@ repeatcase:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= (signed)sizeof(CheatStrings[k])))
|
||||
{
|
||||
initprintf("%s:%d: warning: truncating cheat string to %d characters.\n",
|
||||
Printf("%s:%d: warning: truncating cheat string to %d characters.\n",
|
||||
g_scriptFileName,g_lineNumber,(signed)sizeof(CheatStrings[k])-1);
|
||||
g_warningCnt++;
|
||||
scriptSkipLine();
|
||||
|
@ -5416,13 +5416,13 @@ repeatcase:
|
|||
k = g_scriptPtr[-1];
|
||||
if ((unsigned)k >= MAXSOUNDS - 1)
|
||||
{
|
||||
initprintf("%s:%d: error: sound index exceeds limit of %d.\n", g_scriptFileName, g_lineNumber, MAXSOUNDS - 1);
|
||||
Printf("%s:%d: error: sound index exceeds limit of %d.\n", g_scriptFileName, g_lineNumber, MAXSOUNDS - 1);
|
||||
g_errorCnt++;
|
||||
k = MAXSOUNDS - 1;
|
||||
}
|
||||
/*else if (g_sounds[k].filename != NULL)
|
||||
{
|
||||
initprintf("%s:%d: warning: sound %d already defined (%s)\n", g_scriptFileName, g_lineNumber, k, g_sounds[k].filename);
|
||||
Printf("%s:%d: warning: sound %d already defined (%s)\n", g_scriptFileName, g_lineNumber, k, g_sounds[k].filename);
|
||||
g_warningCnt++;
|
||||
}*/
|
||||
|
||||
|
@ -5473,7 +5473,7 @@ repeatcase:
|
|||
if (EDUKE32_PREDICT_FALSE(!g_scriptEventOffset))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `endevent' without open `onevent'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `endevent' without open `onevent'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
}
|
||||
if (EDUKE32_PREDICT_FALSE(g_numBraces > 0))
|
||||
|
@ -5512,7 +5512,7 @@ repeatcase:
|
|||
if (EDUKE32_PREDICT_FALSE(!g_scriptActorOffset || g_scriptEventOffset))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `enda' without open `actor'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `enda' without open `actor'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
g_scriptEventOffset = 0;
|
||||
}
|
||||
|
@ -5539,7 +5539,7 @@ repeatcase:
|
|||
if (EDUKE32_PREDICT_FALSE(otw == CON_BREAK))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: duplicate `break'.\n",g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: warning: duplicate `break'.\n",g_scriptFileName, g_lineNumber);
|
||||
g_warningCnt++;
|
||||
g_scriptPtr--;
|
||||
continue;
|
||||
|
@ -5604,7 +5604,7 @@ repeatcase:
|
|||
{
|
||||
C_ReportError(-1);
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: `nullop' found without `else'\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: `nullop' found without `else'\n",g_scriptFileName,g_lineNumber);
|
||||
g_scriptPtr--;
|
||||
g_skipBranch = true;
|
||||
}
|
||||
|
@ -5867,7 +5867,7 @@ static char const * C_ScriptVersionString(int32_t version)
|
|||
|
||||
void C_PrintStats(void)
|
||||
{
|
||||
initprintf("%d/%d labels, %d/%d variables, %d/%d arrays\n", g_labelCnt,
|
||||
Printf("%d/%d labels, %d/%d variables, %d/%d arrays\n", g_labelCnt,
|
||||
(int32_t) min((MAXSECTORS * sizeof(sectortype)/sizeof(int32_t)),
|
||||
MAXSPRITES * sizeof(spritetype)/(1<<6)),
|
||||
g_gameVarCount, MAXGAMEVARS, g_gameArrayCount, MAXGAMEARRAYS);
|
||||
|
@ -5878,15 +5878,15 @@ void C_PrintStats(void)
|
|||
if (apScriptEvent)
|
||||
cnt++;
|
||||
|
||||
if (cnt) initprintf("%d events, ", cnt);
|
||||
if (cnt) Printf("%d events, ", cnt);
|
||||
cnt = 0;
|
||||
|
||||
for (auto & tile : g_tile)
|
||||
if (tile.execPtr)
|
||||
cnt++;
|
||||
|
||||
if (cnt) initprintf("%d actors", cnt);
|
||||
initprintf("\n");
|
||||
if (cnt) Printf("%d actors", cnt);
|
||||
Printf("\n");
|
||||
}
|
||||
|
||||
// TODO: add some kind of mapping between the table and the struct holding the tokens
|
||||
|
@ -5945,7 +5945,7 @@ void C_Compile(const char *fileName)
|
|||
|
||||
int const kFileLen = kFile.GetLength();
|
||||
|
||||
initprintf("Compiling: %s (%d bytes)\n", fileName, kFileLen);
|
||||
Printf("Compiling: %s (%d bytes)\n", fileName, kFileLen);
|
||||
|
||||
uint32_t const startcompiletime = timerGetTicks();
|
||||
|
||||
|
@ -5982,7 +5982,7 @@ void C_Compile(const char *fileName)
|
|||
}
|
||||
|
||||
if (g_errorCnt > 63)
|
||||
initprintf("fatal error: too many errors: Aborted\n");
|
||||
Printf("fatal error: too many errors: Aborted\n");
|
||||
|
||||
//*script = (intptr_t) g_scriptPtr;
|
||||
|
||||
|
@ -5990,7 +5990,7 @@ void C_Compile(const char *fileName)
|
|||
|
||||
if (g_warningCnt || g_errorCnt)
|
||||
{
|
||||
initprintf("Found %d warning(s), %d error(s).\n", g_warningCnt, g_errorCnt);
|
||||
Printf("Found %d warning(s), %d error(s).\n", g_warningCnt, g_errorCnt);
|
||||
|
||||
if (g_errorCnt)
|
||||
{
|
||||
|
@ -6019,7 +6019,7 @@ void C_Compile(const char *fileName)
|
|||
|
||||
C_SetScriptSize(g_scriptPtr-apScript+8);
|
||||
|
||||
initprintf("Compiled %d bytes in %ums%s\n", (int)((intptr_t)g_scriptPtr - (intptr_t)apScript),
|
||||
Printf("Compiled %d bytes in %ums%s\n", (int)((intptr_t)g_scriptPtr - (intptr_t)apScript),
|
||||
timerGetTicks() - startcompiletime, C_ScriptVersionString(g_scriptVersion));
|
||||
|
||||
for (auto i : tables_free)
|
||||
|
@ -6042,92 +6042,92 @@ void C_ReportError(int error)
|
|||
if (Bstrcmp(g_szCurrentBlockName,g_szLastBlockName))
|
||||
{
|
||||
if (g_scriptEventOffset || g_processingState || g_scriptActorOffset)
|
||||
initprintf("%s: In %s `%s':\n",g_scriptFileName,g_scriptEventOffset?"event":g_scriptActorOffset?"actor":"state",g_szCurrentBlockName);
|
||||
else initprintf("%s: At top level:\n",g_scriptFileName);
|
||||
Printf("%s: In %s `%s':\n",g_scriptFileName,g_scriptEventOffset?"event":g_scriptActorOffset?"actor":"state",g_szCurrentBlockName);
|
||||
else Printf("%s: At top level:\n",g_scriptFileName);
|
||||
Bstrcpy(g_szLastBlockName,g_szCurrentBlockName);
|
||||
}
|
||||
switch (error)
|
||||
{
|
||||
case ERROR_NOTTOPLEVEL:
|
||||
initprintf("%s:%d: error: `%s' not at top level within script.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: `%s' not at top level within script.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_EVENTONLY:
|
||||
initprintf("%s:%d: error: keyword `%s' only available during events.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: keyword `%s' only available during events.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_EXCEEDSMAXTILES:
|
||||
initprintf("%s:%d: error: `%s' value exceeds MAXTILES. Maximum is %d.\n",g_scriptFileName,g_lineNumber,tempbuf,MAXTILES-1);
|
||||
Printf("%s:%d: error: `%s' value exceeds MAXTILES. Maximum is %d.\n",g_scriptFileName,g_lineNumber,tempbuf,MAXTILES-1);
|
||||
break;
|
||||
case ERROR_EXPECTEDKEYWORD:
|
||||
initprintf("%s:%d: error: expected a keyword but found `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: expected a keyword but found `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_FOUNDWITHIN:
|
||||
initprintf("%s:%d: error: found `%s' within %s.\n",g_scriptFileName,g_lineNumber,tempbuf,g_scriptEventOffset?"an event":g_scriptActorOffset?"an actor":"a state");
|
||||
Printf("%s:%d: error: found `%s' within %s.\n",g_scriptFileName,g_lineNumber,tempbuf,g_scriptEventOffset?"an event":g_scriptActorOffset?"an actor":"a state");
|
||||
break;
|
||||
case ERROR_ISAKEYWORD:
|
||||
initprintf("%s:%d: error: symbol `%s' is a keyword.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: symbol `%s' is a keyword.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_NOENDSWITCH:
|
||||
initprintf("%s:%d: error: did not find `endswitch' before `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: did not find `endswitch' before `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_NOTAGAMEDEF:
|
||||
initprintf("%s:%d: error: symbol `%s' is not a definition.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: symbol `%s' is not a definition.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_NOTAGAMEVAR:
|
||||
initprintf("%s:%d: error: symbol `%s' is not a variable.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: symbol `%s' is not a variable.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_NOTAGAMEARRAY:
|
||||
initprintf("%s:%d: error: symbol `%s' is not an array.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: symbol `%s' is not an array.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_GAMEARRAYBNC:
|
||||
initprintf("%s:%d: error: malformed array index: expected ], found %c\n",g_scriptFileName,g_lineNumber,*textptr);
|
||||
Printf("%s:%d: error: malformed array index: expected ], found %c\n",g_scriptFileName,g_lineNumber,*textptr);
|
||||
break;
|
||||
case ERROR_GAMEARRAYBNO:
|
||||
initprintf("%s:%d: error: malformed array index: expected [, found %c\n",g_scriptFileName,g_lineNumber,*textptr);
|
||||
Printf("%s:%d: error: malformed array index: expected [, found %c\n",g_scriptFileName,g_lineNumber,*textptr);
|
||||
break;
|
||||
case ERROR_INVALIDARRAYWRITE:
|
||||
initprintf("%s:%d: error: arrays can only be written to using `setarray'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: arrays can only be written to using `setarray'.\n",g_scriptFileName,g_lineNumber);
|
||||
break;
|
||||
case ERROR_PARAMUNDEFINED:
|
||||
initprintf("%s:%d: error: parameter `%s' is undefined.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: parameter `%s' is undefined.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_NOTAMEMBER:
|
||||
initprintf("%s:%d: error: symbol `%s' is not a valid structure member.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: symbol `%s' is not a valid structure member.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_SYNTAXERROR:
|
||||
initprintf("%s:%d: error: syntax error.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: syntax error.\n",g_scriptFileName,g_lineNumber);
|
||||
break;
|
||||
case ERROR_VARREADONLY:
|
||||
initprintf("%s:%d: error: variable `%s' is read-only.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: variable `%s' is read-only.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_ARRAYREADONLY:
|
||||
initprintf("%s:%d: error: array `%s' is read-only.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: array `%s' is read-only.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_VARTYPEMISMATCH:
|
||||
initprintf("%s:%d: error: variable `%s' is of the wrong type.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: variable `%s' is of the wrong type.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case WARNING_BADGAMEVAR:
|
||||
initprintf("%s:%d: warning: variable `%s' should be either per-player OR per-actor, not both.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: variable `%s' should be either per-player OR per-actor, not both.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case WARNING_DUPLICATECASE:
|
||||
initprintf("%s:%d: warning: duplicate case ignored.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: duplicate case ignored.\n",g_scriptFileName,g_lineNumber);
|
||||
break;
|
||||
case WARNING_DUPLICATEDEFINITION:
|
||||
initprintf("%s:%d: warning: duplicate definition `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: duplicate definition `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case WARNING_EVENTSYNC:
|
||||
initprintf("%s:%d: warning: found `%s' within a local event.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: warning: found `%s' within a local event.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case WARNING_LABELSONLY:
|
||||
initprintf("%s:%d: warning: expected a label, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a label, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
break;
|
||||
case WARNING_NAMEMATCHESVAR:
|
||||
initprintf("%s:%d: warning: symbol `%s' already used for variable.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: symbol `%s' already used for variable.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case WARNING_VARMASKSKEYWORD:
|
||||
initprintf("%s:%d: warning: variable `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
Printf("%s:%d: warning: variable `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
break;
|
||||
case WARNING_ARRAYMASKSKEYWORD:
|
||||
initprintf("%s:%d: warning: array `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
Printf("%s:%d: warning: array `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ enum
|
|||
do \
|
||||
{ \
|
||||
C_ReportError(-1); \
|
||||
initprintf("%s:%d: error: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
Printf("%s:%d: error: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
g_errorCnt++; \
|
||||
} while (0)
|
||||
|
||||
|
@ -74,7 +74,7 @@ enum
|
|||
do \
|
||||
{ \
|
||||
C_ReportError(-1); \
|
||||
initprintf("%s:%d: warning: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
Printf("%s:%d: warning: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
g_warningCnt++; \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -95,33 +95,33 @@ void VM_ScriptInfo(intptr_t const * const ptr, int const range)
|
|||
if (!apScript || !ptr || g_currentEvent == -1)
|
||||
return;
|
||||
|
||||
initprintf("\n");
|
||||
Printf("\n");
|
||||
|
||||
for (auto pScript = max<intptr_t const *>(ptr - (range >> 1), apScript),
|
||||
p_end = min<intptr_t const *>(ptr + (range >> 1), apScript + g_scriptSize);
|
||||
pScript < p_end;
|
||||
++pScript)
|
||||
{
|
||||
initprintf("%5d: %3d: ", (int32_t)(pScript - apScript), (int32_t)(pScript - ptr));
|
||||
Printf("%5d: %3d: ", (int32_t)(pScript - apScript), (int32_t)(pScript - ptr));
|
||||
|
||||
auto &v = *pScript;
|
||||
int const lineNum = VM_DECODE_LINE_NUMBER(v);
|
||||
int const vmInst = VM_DECODE_INST(v);
|
||||
|
||||
if (lineNum && lineNum != VM_IFELSE_MAGIC && vmInst < CON_OPCODE_END)
|
||||
initprintf("%5d %s (%d)\n", lineNum, VM_GetKeywordForID(vmInst), vmInst);
|
||||
Printf("%5d %s (%d)\n", lineNum, VM_GetKeywordForID(vmInst), vmInst);
|
||||
else
|
||||
initprintf("%d\n", (int32_t)*pScript);
|
||||
Printf("%d\n", (int32_t)*pScript);
|
||||
}
|
||||
|
||||
initprintf("\n");
|
||||
Printf("\n");
|
||||
|
||||
if (ptr == insptr)
|
||||
{
|
||||
if (vm.pUSprite)
|
||||
initprintf("current actor: %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
Printf("current actor: %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
|
||||
initprintf("g_errorLineNum: %d, g_tw: %d\n", VM_DECODE_LINE_NUMBER(g_tw), VM_DECODE_INST(g_tw));
|
||||
Printf("g_errorLineNum: %d, g_tw: %d\n", VM_DECODE_LINE_NUMBER(g_tw), VM_DECODE_INST(g_tw));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -498,7 +498,7 @@ int __fastcall G_GetAngleDelta(int currAngle, int newAngle)
|
|||
|
||||
if (klabs(currAngle-newAngle) < 1024)
|
||||
{
|
||||
// OSD_Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
// Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
return newAngle-currAngle;
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@ int __fastcall G_GetAngleDelta(int currAngle, int newAngle)
|
|||
if (currAngle > 1024)
|
||||
currAngle -= 2048;
|
||||
|
||||
// OSD_Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
// Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
return newAngle-currAngle;
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ GAMEEXEC_STATIC void VM_AlterAng(int32_t const moveFlags)
|
|||
|
||||
{
|
||||
AC_MOVE_ID(vm.pData) = 0;
|
||||
OSD_Printf(OSD_ERROR "bad moveptr for actor %d (%d)!\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
Printf(OSD_ERROR "bad moveptr for actor %d (%d)!\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -698,7 +698,7 @@ GAMEEXEC_STATIC void VM_Move(void)
|
|||
if (EDUKE32_PREDICT_FALSE((unsigned)AC_MOVE_ID(vm.pData) >= (unsigned)g_scriptSize-1))
|
||||
{
|
||||
AC_MOVE_ID(vm.pData) = 0;
|
||||
OSD_Printf(OSD_ERROR "clearing bad moveptr for actor %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
Printf(OSD_ERROR "clearing bad moveptr for actor %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1146,7 +1146,7 @@ void G_GetTimeDate(int32_t * const pValues)
|
|||
time(&timeStruct);
|
||||
struct tm *pTime = localtime(&timeStruct);
|
||||
|
||||
// initprintf("Time&date: %s\n",asctime (ti));
|
||||
// Printf("Time&date: %s\n",asctime (ti));
|
||||
|
||||
pValues[0] = pTime->tm_sec;
|
||||
pValues[1] = pTime->tm_min;
|
||||
|
@ -1272,7 +1272,7 @@ static void SetArray(int const arrayNum, int const arrayIndex, int const newValu
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)arrayNum >= (unsigned)g_gameArrayCount || (unsigned)arrayIndex >= (unsigned)aGameArrays[arrayNum].size))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Gv_SetVar(): tried to set invalid array %d or index out of bounds from "
|
||||
Printf(OSD_ERROR "Gv_SetVar(): tried to set invalid array %d or index out of bounds from "
|
||||
"sprite %d (%d), player %d\n",
|
||||
(int)arrayNum, vm.spriteNum, vm.pUSprite->picnum, vm.playerNum);
|
||||
vm.flags |= VM_RETURN;
|
||||
|
@ -1283,7 +1283,7 @@ static void SetArray(int const arrayNum, int const arrayIndex, int const newValu
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(arr.flags & GAMEARRAY_READONLY))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Tried to set value in read-only array `%s'", arr.szLabel);
|
||||
Printf(OSD_ERROR "Tried to set value in read-only array `%s'", arr.szLabel);
|
||||
vm.flags |= VM_RETURN;
|
||||
return;
|
||||
}
|
||||
|
@ -1314,7 +1314,7 @@ static void ResizeArray(int const arrayNum, int const newSize)
|
|||
if (newSize == oldSize || newSize < 0)
|
||||
return;
|
||||
#if 0
|
||||
OSD_Printf(OSDTEXT_GREEN "CON_RESIZEARRAY: resizing array %s from %d to %d\n",
|
||||
Printf(OSDTEXT_GREEN "CON_RESIZEARRAY: resizing array %s from %d to %d\n",
|
||||
array.szLabel, array.size, newSize);
|
||||
#endif
|
||||
if (newSize == 0)
|
||||
|
@ -2808,7 +2808,7 @@ GAMEEXEC_STATIC void VM_Execute(int const loop /*= false*/)
|
|||
CON_FOR_ITERATION();
|
||||
break;
|
||||
badindex:
|
||||
OSD_Printf(OSD_ERROR "Line %d, for %s: index %d out of range!\n", VM_DECODE_LINE_NUMBER(g_tw), iter_tokens[iterType].token, nIndex);
|
||||
Printf(OSD_ERROR "Line %d, for %s: index %d out of range!\n", VM_DECODE_LINE_NUMBER(g_tw), iter_tokens[iterType].token, nIndex);
|
||||
vm.flags |= VM_RETURN;
|
||||
dispatch();
|
||||
}
|
||||
|
@ -5247,7 +5247,7 @@ badindex:
|
|||
index = Gv_GetVar(*insptr++);
|
||||
if (EDUKE32_PREDICT_TRUE((unsigned)index < (unsigned)aGameArrays[lVarID].size))
|
||||
{
|
||||
initprintf(OSDTEXT_GREEN "CONLOGVAR: L=%d %s[%d] =%d\n", VM_DECODE_LINE_NUMBER(g_tw), aGameArrays[lVarID].szLabel, index,
|
||||
Printf(OSDTEXT_GREEN "CONLOGVAR: L=%d %s[%d] =%d\n", VM_DECODE_LINE_NUMBER(g_tw), aGameArrays[lVarID].szLabel, index,
|
||||
(int32_t)(m * Gv_GetArrayValue(lVarID, index)));
|
||||
dispatch();
|
||||
}
|
||||
|
@ -5271,7 +5271,7 @@ badindex:
|
|||
CON_ERRPRINTF("invalid array index\n");
|
||||
abort_after_error();
|
||||
}
|
||||
initprintf(OSDTEXT_GREEN "CONLOGVAR: L=%d %d %d\n", VM_DECODE_LINE_NUMBER(g_tw), index, Gv_GetVar(*insptr++, index, vm.playerNum));
|
||||
Printf(OSDTEXT_GREEN "CONLOGVAR: L=%d %d %d\n", VM_DECODE_LINE_NUMBER(g_tw), index, Gv_GetVar(*insptr++, index, vm.playerNum));
|
||||
dispatch();
|
||||
}
|
||||
}
|
||||
|
@ -5309,7 +5309,7 @@ badindex:
|
|||
Bstrcat(tempbuf, szBuf);
|
||||
Bsprintf(szBuf, " =%d\n", Gv_GetVar(lVarID) * m);
|
||||
Bstrcat(tempbuf, szBuf);
|
||||
initprintf(OSDTEXT_GREEN "%s", tempbuf);
|
||||
Printf(OSDTEXT_GREEN "%s", tempbuf);
|
||||
insptr++;
|
||||
dispatch();
|
||||
}
|
||||
|
@ -6211,7 +6211,7 @@ badindex:
|
|||
|
||||
VM_ASSERT((unsigned)tw < MAXQUOTES, "invalid quote %d\n", (int)tw);
|
||||
|
||||
OSD_Printf("%s\n", quoteMgr.GetQuote(tw));
|
||||
Printf("%s\n", quoteMgr.GetQuote(tw));
|
||||
dispatch();
|
||||
|
||||
vInstruction(CON_RESPAWNHITAG):
|
||||
|
@ -6496,7 +6496,7 @@ void G_SaveMapState(void)
|
|||
// If we're in EVENT_ANIMATESPRITES, we'll be saving pointer values to disk :-/
|
||||
#if !defined LUNATIC
|
||||
if (EDUKE32_PREDICT_FALSE(g_currentEvent == EVENT_ANIMATESPRITES))
|
||||
initprintf("Line %d: savemapstate called from EVENT_ANIMATESPRITES. WHY?\n", VM_DECODE_LINE_NUMBER(g_tw));
|
||||
Printf("Line %d: savemapstate called from EVENT_ANIMATESPRITES. WHY?\n", VM_DECODE_LINE_NUMBER(g_tw));
|
||||
#endif
|
||||
Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
|
||||
#ifndef NEW_MAP_FORMAT
|
||||
|
@ -6635,7 +6635,7 @@ void G_RestoreMapState(void)
|
|||
#if !defined LUNATIC
|
||||
if (EDUKE32_PREDICT_FALSE(g_currentEvent == EVENT_ANIMATESPRITES))
|
||||
{
|
||||
initprintf("Line %d: loadmapstate called from EVENT_ANIMATESPRITES. WHY?\n", VM_DECODE_LINE_NUMBER(g_tw));
|
||||
Printf("Line %d: loadmapstate called from EVENT_ANIMATESPRITES. WHY?\n", VM_DECODE_LINE_NUMBER(g_tw));
|
||||
for (native_t i=0; i<MAXSPRITES; i++)
|
||||
spriteext[i].tspr = NULL;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ void VM_DrawTileSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int3
|
|||
#define CON_ERRPRINTF(Text, ...) do { \
|
||||
FStringf str(Text, ## __VA_ARGS__); \
|
||||
vm.flags |= VM_RETURN; \
|
||||
OSD_Printf("Line %d, %s: %s", VM_DECODE_LINE_NUMBER(g_tw), VM_GetKeywordForID(VM_DECODE_INST(g_tw)), str.GetChars()); \
|
||||
Printf("Line %d, %s: %s", VM_DECODE_LINE_NUMBER(g_tw), VM_GetKeywordForID(VM_DECODE_INST(g_tw)), str.GetChars()); \
|
||||
} while (0)
|
||||
|
||||
#define CON_CRITICALERRPRINTF(Text, ...) do { \
|
||||
|
|
|
@ -116,7 +116,7 @@ int Gv_ReadSave(FileReader &kFile)
|
|||
char tbuf[12];
|
||||
|
||||
if (kFile.Read(tbuf, 12)!=12) goto corrupt;
|
||||
if (Bmemcmp(tbuf, "BEG: EDuke32", 12)) { OSD_Printf("BEG ERR\n"); return 2; }
|
||||
if (Bmemcmp(tbuf, "BEG: EDuke32", 12)) { Printf("BEG ERR\n"); return 2; }
|
||||
|
||||
Gv_Free(); // nuke 'em from orbit, it's the only way to be sure...
|
||||
|
||||
|
@ -223,7 +223,7 @@ int Gv_ReadSave(FileReader &kFile)
|
|||
}
|
||||
|
||||
if (kFile.Read(tbuf, 12) != 12) return -13;
|
||||
if (Bmemcmp(tbuf, "EOF: EDuke32", 12)) { OSD_Printf("EOF ERR\n"); return 2; }
|
||||
if (Bmemcmp(tbuf, "EOF: EDuke32", 12)) { Printf("EOF ERR\n"); return 2; }
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -376,7 +376,7 @@ void Gv_NewArray(const char *pszLabel, void *arrayptr, intptr_t asize, uint32_t
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: too many arrays!\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: too many arrays!\n",g_scriptFileName,g_lineNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ void Gv_NewArray(const char *pszLabel, void *arrayptr, intptr_t asize, uint32_t
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: array name `%s' exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,pszLabel, MAXARRAYLABEL);
|
||||
Printf("%s:%d: error: array name `%s' exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,pszLabel, MAXARRAYLABEL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ void Gv_NewArray(const char *pszLabel, void *arrayptr, intptr_t asize, uint32_t
|
|||
if (aGameArrays[i].flags & GAMEARRAY_SYSTEM)
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("ignored redefining system array `%s'.", pszLabel);
|
||||
Printf("ignored redefining system array `%s'.", pszLabel);
|
||||
}
|
||||
else
|
||||
C_ReportError(WARNING_DUPLICATEDEFINITION);
|
||||
|
@ -449,7 +449,7 @@ void Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: too many gamevars!\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: too many gamevars!\n",g_scriptFileName,g_lineNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ void Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: variable name `%s' exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,pszLabel, MAXVARLABEL);
|
||||
Printf("%s:%d: error: variable name `%s' exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,pszLabel, MAXVARLABEL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ void Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
if (EDUKE32_PREDICT_FALSE(aGameVars[gV].flags & (GAMEVAR_PTR_MASK)))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
return;
|
||||
}
|
||||
else if (EDUKE32_PREDICT_FALSE(!(aGameVars[gV].flags & GAMEVAR_SYSTEM)))
|
||||
|
@ -542,7 +542,7 @@ static int Gv_GetVarIndex(const char *szGameLabel)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)gameVar >= MAXGAMEVARS))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Gv_GetVarIndex(): INTERNAL ERROR: couldn't find gamevar %s!\n", szGameLabel);
|
||||
Printf(OSD_ERROR "Gv_GetVarIndex(): INTERNAL ERROR: couldn't find gamevar %s!\n", szGameLabel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -555,7 +555,7 @@ static int Gv_GetArrayIndex(const char *szArrayLabel)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)arrayIdx >= MAXGAMEARRAYS))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Gv_GetArrayIndex(): INTERNAL ERROR: couldn't find array %s!\n", szArrayLabel);
|
||||
Printf(OSD_ERROR "Gv_GetArrayIndex(): INTERNAL ERROR: couldn't find array %s!\n", szArrayLabel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -504,7 +504,7 @@ static void Net_InsertScratchPadSprite(int spriteIndex)
|
|||
headscratchpadsprite = spriteIndex;
|
||||
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Inserted scratch pad sprite %d\n", spriteIndex);
|
||||
Printf("DEBUG: Inserted scratch pad sprite %d\n", spriteIndex);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ static void Net_DeleteAllScratchPadSprites()
|
|||
{
|
||||
Net_DoDeleteSprite(spriteIndex);
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Deleted scratch pad sprite (set to STAT_NETALLOC) %d\n", spriteIndex);
|
||||
Printf("DEBUG: Deleted scratch pad sprite (set to STAT_NETALLOC) %d\n", spriteIndex);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ static void Net_DeleteAllScratchPadSprites()
|
|||
|
||||
static void Net_Error_Disconnect(const char* message)
|
||||
{
|
||||
OSD_Printf("Net_Error_Disconnect: %s\n", message);
|
||||
Printf("Net_Error_Disconnect: %s\n", message);
|
||||
// Here I could longjmp to the game main loop and unload the map somehow
|
||||
//
|
||||
// If we go to C++ it may be a good idea to throw an exception
|
||||
|
@ -786,7 +786,7 @@ static void Net_UpdateSpriteLinkedLists(int16_t spriteIndex, const netactor_t* s
|
|||
if ( snapActor->spr_statnum == MAXSTATUS)
|
||||
{
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Sprite %d: Case 2 (delete game sprite)\n", spriteIndex);
|
||||
Printf("DEBUG: Sprite %d: Case 2 (delete game sprite)\n", spriteIndex);
|
||||
#endif
|
||||
|
||||
Net_DeleteFromStat(spriteIndex);
|
||||
|
@ -799,7 +799,7 @@ static void Net_UpdateSpriteLinkedLists(int16_t spriteIndex, const netactor_t* s
|
|||
else if (oldGameStatnum == MAXSTATUS)
|
||||
{
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Sprite %d: Case 3 (insert new game sprite)\n", spriteIndex);
|
||||
Printf("DEBUG: Sprite %d: Case 3 (insert new game sprite)\n", spriteIndex);
|
||||
#endif
|
||||
|
||||
do_insertsprite_at_headofstat(spriteIndex, snapActor->spr_statnum);
|
||||
|
@ -811,7 +811,7 @@ static void Net_UpdateSpriteLinkedLists(int16_t spriteIndex, const netactor_t* s
|
|||
else if ((oldGameStatnum == STAT_NETALLOC) && snapActorIsNormalStat)
|
||||
{
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Sprite %d: Case 4 (STAT_NETALLOC to stat %d)\n", spriteIndex, snapActor->spr_statnum);
|
||||
Printf("DEBUG: Sprite %d: Case 4 (STAT_NETALLOC to stat %d)\n", spriteIndex, snapActor->spr_statnum);
|
||||
#endif
|
||||
|
||||
changespritestat(spriteIndex, snapActor->spr_statnum);
|
||||
|
@ -823,7 +823,7 @@ static void Net_UpdateSpriteLinkedLists(int16_t spriteIndex, const netactor_t* s
|
|||
else if (gameSpriteIsNormalStat && (snapActor->spr_statnum == STAT_NETALLOC))
|
||||
{
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Sprite %d: Case 5 (normal to STAT_NETALLOC)\n", spriteIndex);
|
||||
Printf("DEBUG: Sprite %d: Case 5 (normal to STAT_NETALLOC)\n", spriteIndex);
|
||||
#endif
|
||||
|
||||
changespritestat(spriteIndex, snapActor->spr_statnum);
|
||||
|
@ -835,7 +835,7 @@ static void Net_UpdateSpriteLinkedLists(int16_t spriteIndex, const netactor_t* s
|
|||
else if(gameSpriteIsNormalStat && snapActorIsNormalStat)
|
||||
{
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Sprite %d: Case 6 (normal stat to normal stat)\n", spriteIndex);
|
||||
Printf("DEBUG: Sprite %d: Case 6 (normal stat to normal stat)\n", spriteIndex);
|
||||
#endif
|
||||
|
||||
// note that these functions handle cases where the game sprite already has that stat/sectnum
|
||||
|
@ -844,7 +844,7 @@ static void Net_UpdateSpriteLinkedLists(int16_t spriteIndex, const netactor_t* s
|
|||
}
|
||||
|
||||
#ifdef SPRLIST_PRINT
|
||||
OSD_Printf("DEBUG: Sprite %d next is %d, prev is %d, head of stat %d is %d\n", spriteIndex, nextspritestat[spriteIndex], prevspritestat[spriteIndex], snapActor->spr_statnum, headspritestat[snapActor->spr_statnum]);
|
||||
Printf("DEBUG: Sprite %d next is %d, prev is %d, head of stat %d is %d\n", spriteIndex, nextspritestat[spriteIndex], prevspritestat[spriteIndex], snapActor->spr_statnum, headspritestat[snapActor->spr_statnum]);
|
||||
#endif
|
||||
|
||||
NET_DEBUG_VAR bool invalid = (
|
||||
|
@ -1571,7 +1571,7 @@ static void Net_SyncPlayer(ENetEvent *event)
|
|||
if (numplayers + g_netPlayersWaiting >= MAXPLAYERS)
|
||||
{
|
||||
enet_peer_disconnect_later(event->peer, DISC_SERVER_FULL);
|
||||
initprintf("Refused peer; server full.\n");
|
||||
Printf("Refused peer; server full.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1712,28 +1712,28 @@ static void Net_ReceiveDisconnect(ENetEvent *event)
|
|||
switch (event->data)
|
||||
{
|
||||
case DISC_BAD_PASSWORD:
|
||||
initprintf("%s\n", GStrings("Bad password."));
|
||||
Printf("%s\n", GStrings("Bad password."));
|
||||
return;
|
||||
case DISC_VERSION_MISMATCH:
|
||||
initprintf("%s\n", GStrings("Version mismatch."));
|
||||
Printf("%s\n", GStrings("Version mismatch."));
|
||||
return;
|
||||
case DISC_INVALID:
|
||||
initprintf("%s\n", GStrings("Invalid data detected."));
|
||||
Printf("%s\n", GStrings("Invalid data detected."));
|
||||
return;
|
||||
case DISC_SERVER_QUIT:
|
||||
initprintf("%s\n", GStrings("The server is quitting."));
|
||||
Printf("%s\n", GStrings("The server is quitting."));
|
||||
return;
|
||||
case DISC_SERVER_FULL:
|
||||
initprintf("%s\n", GStrings("The server is full.\n"));
|
||||
Printf("%s\n", GStrings("The server is full.\n"));
|
||||
return;
|
||||
case DISC_KICKED:
|
||||
initprintf("%s\n", GStrings("You have been kicked from the server.\n"));
|
||||
Printf("%s\n", GStrings("You have been kicked from the server.\n"));
|
||||
return;
|
||||
case DISC_BANNED:
|
||||
initprintf("%s\n", GStrings("You are banned from this server.\n"));
|
||||
Printf("%s\n", GStrings("You are banned from this server.\n"));
|
||||
return;
|
||||
default:
|
||||
initprintf("%s\n", GStrings("Disconnected.\n"));
|
||||
Printf("%s\n", GStrings("Disconnected.\n"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1830,13 +1830,13 @@ static void Net_ReceiveChallenge(uint8_t *pbuf, int32_t packbufleng, ENetEvent *
|
|||
if (byteVersion != BYTEVERSION || netVersion != NETVERSION)
|
||||
{
|
||||
enet_peer_disconnect_later(event->peer, DISC_VERSION_MISMATCH);
|
||||
initprintf("Bad client protocol: version %u.%u\n", byteVersion, netVersion);
|
||||
Printf("Bad client protocol: version %u.%u\n", byteVersion, netVersion);
|
||||
return;
|
||||
}
|
||||
if (crc != Bcrc32((uint8_t *)g_netPassword, Bstrlen(g_netPassword), 0))
|
||||
{
|
||||
enet_peer_disconnect_later(event->peer, DISC_BAD_PASSWORD);
|
||||
initprintf("Bad password from client.\n");
|
||||
Printf("Bad password from client.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2117,7 +2117,7 @@ static void Net_ParseClientPacket(ENetEvent *event)
|
|||
NET_DEBUG_VAR enum DukePacket_t packetType = (enum DukePacket_t)pbuf[0];
|
||||
|
||||
#ifdef PACKET_RECV_PRINT
|
||||
initprintf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
Printf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
#endif
|
||||
switch (pbuf[0])
|
||||
{
|
||||
|
@ -2196,12 +2196,12 @@ static void Net_HandleClientPackets(void)
|
|||
|
||||
enet_address_get_host_ip(&event.peer->address, ipaddr, sizeof(ipaddr));
|
||||
|
||||
OSD_Printf("A new client connected from %s:%u.\n", ipaddr, event.peer->address.port);
|
||||
Printf("A new client connected from %s:%u.\n", ipaddr, event.peer->address.port);
|
||||
|
||||
//[75] Temporary: For now the netcode can't handle more players connecting than there are player starts.
|
||||
if (g_playerSpawnCnt <= ud.multimode)
|
||||
{
|
||||
OSD_Printf("Connection dropped: No player spawn point available for this new player.");
|
||||
Printf("Connection dropped: No player spawn point available for this new player.");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2247,7 +2247,7 @@ static void Net_HandleClientPackets(void)
|
|||
enet_host_broadcast(g_netServer, CHAN_GAMESTATE,
|
||||
enet_packet_create(&packbuf[0], 6, ENET_PACKET_FLAG_RELIABLE));
|
||||
|
||||
initprintf("%s disconnected.\n", g_player[playeridx].user_name);
|
||||
Printf("%s disconnected.\n", g_player[playeridx].user_name);
|
||||
event.peer->data = NULL;
|
||||
|
||||
Dbg_PacketSent(PACKET_PLAYER_DISCONNECTED);
|
||||
|
@ -2444,7 +2444,7 @@ static void Net_ParseServerPacket(ENetEvent *event)
|
|||
--packbufleng;
|
||||
|
||||
#ifdef PACKET_RECV_PRINT
|
||||
initprintf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
Printf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
#endif
|
||||
switch (pbuf[0])
|
||||
{
|
||||
|
@ -4424,7 +4424,7 @@ static uint32_t Net_GetNextRevisionNumber(uint32_t currentNumber)
|
|||
if(currentNumber == UINT32_MAX)
|
||||
{
|
||||
// we should be able to recover from this
|
||||
OSD_Printf("Net_SendMapUpdates(): [Note] Map state revision number overflow.");
|
||||
Printf("Net_SendMapUpdates(): [Note] Map state revision number overflow.");
|
||||
return cStartingRevisionIndex;
|
||||
}
|
||||
|
||||
|
@ -4663,7 +4663,7 @@ void DumpMapStateHistory()
|
|||
|
||||
fwrite(&g_mapStateHistory[0], sizeof(g_mapStateHistory), 1, mapStatesFile);
|
||||
|
||||
OSD_Printf("Dumped map states to %s.\n", fileName);
|
||||
Printf("Dumped map states to %s.\n", fileName);
|
||||
|
||||
fclose(mapStatesFile);
|
||||
mapStatesFile = NULL;
|
||||
|
@ -4751,7 +4751,7 @@ void Net_Connect(const char *srvaddr)
|
|||
|
||||
if (g_netClient == NULL)
|
||||
{
|
||||
initprintf("An error occurred while trying to create an ENet client host.\n");
|
||||
Printf("An error occurred while trying to create an ENet client host.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4764,7 +4764,7 @@ void Net_Connect(const char *srvaddr)
|
|||
|
||||
if (g_netClientPeer == NULL)
|
||||
{
|
||||
initprintf("No available peers for initiating an ENet connection.\n");
|
||||
Printf("No available peers for initiating an ENet connection.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4773,7 +4773,7 @@ void Net_Connect(const char *srvaddr)
|
|||
/* Wait up to 5 seconds for the connection attempt to succeed. */
|
||||
if (enet_host_service(g_netClient, &event, 5000) > 0 && event.type == ENET_EVENT_TYPE_CONNECT)
|
||||
{
|
||||
initprintf("Connection to %s:%d succeeded.\n", oursrvaddr, address.port);
|
||||
Printf("Connection to %s:%d succeeded.\n", oursrvaddr, address.port);
|
||||
Xfree(oursrvaddr);
|
||||
return;
|
||||
}
|
||||
|
@ -4783,9 +4783,9 @@ void Net_Connect(const char *srvaddr)
|
|||
/* received. Reset the peer in the event the 5 seconds */
|
||||
/* had run out without any significant event. */
|
||||
enet_peer_reset(g_netClientPeer);
|
||||
initprintf("Connection to %s:%d failed.\n", oursrvaddr, address.port);
|
||||
Printf("Connection to %s:%d failed.\n", oursrvaddr, address.port);
|
||||
}
|
||||
initprintf(connectCount ? "Retrying...\n" : "Giving up connection attempt.\n");
|
||||
Printf(connectCount ? "Retrying...\n" : "Giving up connection attempt.\n");
|
||||
}
|
||||
|
||||
// [75] note: it only gets here if there was an error
|
||||
|
@ -5246,8 +5246,8 @@ void Net_InitNetwork()
|
|||
g_netServer = enet_host_create(&address, MAXPLAYERS, CHAN_MAX, 0, 0);
|
||||
|
||||
if (g_netServer == NULL)
|
||||
initprintf("An error occurred while trying to create an ENet server host.\n");
|
||||
else initprintf("Multiplayer server initialized\n");
|
||||
Printf("An error occurred while trying to create an ENet server host.\n");
|
||||
else Printf("Multiplayer server initialized\n");
|
||||
}
|
||||
|
||||
void Net_PrintLag(FString &output)
|
||||
|
@ -5270,11 +5270,11 @@ int osdcmd_listplayers(osdcmdptr_t parm)
|
|||
|
||||
if (!g_netServer)
|
||||
{
|
||||
initprintf("You are not the server.\n");
|
||||
Printf("You are not the server.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
initprintf("Connected clients:\n");
|
||||
Printf("Connected clients:\n");
|
||||
|
||||
for (currentPeer = g_netServer->peers;
|
||||
currentPeer < &g_netServer->peers[g_netServer->peerCount];
|
||||
|
@ -5284,7 +5284,7 @@ int osdcmd_listplayers(osdcmdptr_t parm)
|
|||
continue;
|
||||
|
||||
enet_address_get_host_ip(¤tPeer->address, ipaddr, sizeof(ipaddr));
|
||||
initprintf("%s %s\n", ipaddr,
|
||||
Printf("%s %s\n", ipaddr,
|
||||
g_player[(intptr_t)currentPeer->data].user_name);
|
||||
}
|
||||
|
||||
|
@ -5302,7 +5302,7 @@ static int osdcmd_kick(osdcmdptr_t parm)
|
|||
|
||||
if (!g_netServer)
|
||||
{
|
||||
initprintf("You are not the server.\n");
|
||||
Printf("You are not the server.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -5317,14 +5317,14 @@ static int osdcmd_kick(osdcmdptr_t parm)
|
|||
|
||||
if (currentPeer->address.host == hexaddr)
|
||||
{
|
||||
initprintf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
Printf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
g_player[(intptr_t)currentPeer->data].user_name);
|
||||
enet_peer_disconnect(currentPeer, DISC_KICKED);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
initprintf("Player %s not found!\n", parm->parms[0]);
|
||||
Printf("Player %s not found!\n", parm->parms[0]);
|
||||
osdcmd_listplayers(NULL);
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
@ -5340,7 +5340,7 @@ static int osdcmd_kickban(osdcmdptr_t parm)
|
|||
|
||||
if (!g_netServer)
|
||||
{
|
||||
initprintf("You are not the server.\n");
|
||||
Printf("You are not the server.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -5360,15 +5360,15 @@ static int osdcmd_kickban(osdcmdptr_t parm)
|
|||
char ipaddr[32];
|
||||
|
||||
enet_address_get_host_ip(¤tPeer->address, ipaddr, sizeof(ipaddr));
|
||||
initprintf("Host %s is now banned.\n", ipaddr);
|
||||
initprintf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
Printf("Host %s is now banned.\n", ipaddr);
|
||||
Printf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
g_player[(intptr_t)currentPeer->data].user_name);
|
||||
enet_peer_disconnect(currentPeer, DISC_BANNED);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
initprintf("Player %s not found!\n", parm->parms[0]);
|
||||
Printf("Player %s not found!\n", parm->parms[0]);
|
||||
osdcmd_listplayers(NULL);
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
|
|
@ -82,7 +82,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
|
||||
if (!fileSystem.Lookup(mapname, "MAP"))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
}
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Cannot use user maps in shareware.\n");
|
||||
Printf(OSD_ERROR "Cannot use user maps in shareware.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
// Treat as user map
|
||||
|
@ -153,13 +153,13 @@ static int osdcmd_demo(osdcmdptr_t parm)
|
|||
{
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
if (g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
{
|
||||
OSD_Printf("demo: Must not be in a game.\n");
|
||||
Printf("demo: Must not be in a game.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ static int osdcmd_activatecheat(osdcmdptr_t parm)
|
|||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
osdcmd_cheatsinfo_stat.cheatnum = Batoi(parm->parms[0]);
|
||||
else
|
||||
OSD_Printf("activatecheat: Not in a single-player game.\n");
|
||||
Printf("activatecheat: Not in a single-player game.\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ static int osdcmd_god(osdcmdptr_t UNUSED(parm))
|
|||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
osdcmd_cheatsinfo_stat.cheatnum = CHEAT_CORNHOLIO;
|
||||
else
|
||||
OSD_Printf("god: Not in a single-player game.\n");
|
||||
Printf("god: Not in a single-player game.\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ static int osdcmd_maxhealth(osdcmdptr_t parm)
|
|||
sprite[pPlayer->i].extra = newHealth;
|
||||
}
|
||||
else
|
||||
OSD_Printf("maxhealth: Not in a single-player game.\n");
|
||||
Printf("maxhealth: Not in a single-player game.\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ static int osdcmd_noclip(osdcmdptr_t UNUSED(parm))
|
|||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("noclip: Not in a single-player game.\n");
|
||||
Printf("noclip: Not in a single-player game.\n");
|
||||
}
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
@ -256,7 +256,7 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
|
||||
if (numplayers > 1 || !(g_player[myconnectindex].ps->gm & MODE_GAME))
|
||||
{
|
||||
OSD_Printf("spawn: Can't spawn sprites in multiplayer games or demos\n");
|
||||
Printf("spawn: Can't spawn sprites in multiplayer games or demos\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -307,14 +307,14 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
}
|
||||
if (i==g_labelCnt)
|
||||
{
|
||||
OSD_Printf("spawn: Invalid tile label given\n");
|
||||
Printf("spawn: Invalid tile label given\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if ((uint32_t)picnum >= MAXUSERTILES)
|
||||
{
|
||||
OSD_Printf("spawn: Invalid tile number\n");
|
||||
Printf("spawn: Invalid tile number\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -331,7 +331,7 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
{
|
||||
if (setsprite(idx, &vect) < 0)
|
||||
{
|
||||
OSD_Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
A_DeleteSprite(idx);
|
||||
}
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ static int osdcmd_setvar(osdcmdptr_t parm)
|
|||
{
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -357,12 +357,12 @@ static int osdcmd_setvar(osdcmdptr_t parm)
|
|||
{
|
||||
Gv_SetVar(i, newValue, g_player[myconnectindex].ps->i, myconnectindex);
|
||||
|
||||
OSD_Printf("Variable \"%s\" now has value %d (input: %d)\n", aGameVars[i].szLabel,
|
||||
Printf("Variable \"%s\" now has value %d (input: %d)\n", aGameVars[i].szLabel,
|
||||
Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex), newValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("setvar: \"%s\" is not a game variable!\n", parm->parms[0]);
|
||||
Printf("setvar: \"%s\" is not a game variable!\n", parm->parms[0]);
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ static int osdcmd_addlogvar(osdcmdptr_t parm)
|
|||
{
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -383,10 +383,10 @@ static int osdcmd_addlogvar(osdcmdptr_t parm)
|
|||
int const i = hash_find(&h_gamevars, parm->parms[0]);
|
||||
|
||||
if (i >= 0)
|
||||
OSD_Printf("Variable \"%s\" has value %d, default %d\n", parm->parms[0], Gv_GetVar(i, g_player[screenpeek].ps->i, screenpeek), (int)aGameVars[i].defaultValue);
|
||||
Printf("Variable \"%s\" has value %d, default %d\n", parm->parms[0], Gv_GetVar(i, g_player[screenpeek].ps->i, screenpeek), (int)aGameVars[i].defaultValue);
|
||||
else
|
||||
{
|
||||
OSD_Printf("addlogvar: %s is not a game variable!\n", parm->parms[0]);
|
||||
Printf("addlogvar: %s is not a game variable!\n", parm->parms[0]);
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,7 @@ static int osdcmd_setactorvar(osdcmdptr_t parm)
|
|||
{
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ static int osdcmd_setactorvar(osdcmdptr_t parm)
|
|||
|
||||
if ((unsigned)spriteNum >= MAXSPRITES)
|
||||
{
|
||||
OSD_Printf("setactorvar: Invalid sprite number!\n");
|
||||
Printf("setactorvar: Invalid sprite number!\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -420,12 +420,12 @@ static int osdcmd_setactorvar(osdcmdptr_t parm)
|
|||
{
|
||||
Gv_SetVar(i, newValue, spriteNum, myconnectindex);
|
||||
|
||||
OSD_Printf("Variable \"%s\" for sprite %d value is now %d (input: %d)\n", aGameVars[i].szLabel, spriteNum,
|
||||
Printf("Variable \"%s\" for sprite %d value is now %d (input: %d)\n", aGameVars[i].szLabel, spriteNum,
|
||||
Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex), newValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("setactorvar: %s is not a game variable!\n", parm->parms[1]);
|
||||
Printf("setactorvar: %s is not a game variable!\n", parm->parms[1]);
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
|
@ -440,7 +440,7 @@ static int osdcmd_give(osdcmdptr_t parm)
|
|||
if (numplayers != 1 || (g_player[myconnectindex].ps->gm & MODE_GAME) == 0 ||
|
||||
g_player[myconnectindex].ps->dead_flag != 0)
|
||||
{
|
||||
OSD_Printf("give: Cannot give while dead or not in a single-player game.\n");
|
||||
Printf("give: Cannot give while dead or not in a single-player game.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -497,17 +497,17 @@ static int osdcmd_dumpmapstate(osdfuncparm_t const * const)
|
|||
|
||||
static int osdcmd_playerinfo(osdfuncparm_t const * const)
|
||||
{
|
||||
OSD_Printf("Your player index is %d.\n", myconnectindex);
|
||||
Printf("Your player index is %d.\n", myconnectindex);
|
||||
|
||||
for(int32_t playerIndex = 0; playerIndex < MAXPLAYERS; playerIndex++)
|
||||
{
|
||||
if(g_player[playerIndex].ps == nullptr)
|
||||
{
|
||||
OSD_Printf("g_player[%d]: ps unallocated.\n", playerIndex);
|
||||
Printf("g_player[%d]: ps unallocated.\n", playerIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("g_player[%d]: ps->i is %d.\n", playerIndex, g_player[playerIndex].ps->i);
|
||||
Printf("g_player[%d]: ps->i is %d.\n", playerIndex, g_player[playerIndex].ps->i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,12 +572,12 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
|
|||
if (!haveev)
|
||||
{
|
||||
haveev = 1;
|
||||
OSD_Printf("\nevent times: event, total calls, total time [ms], mean time/call [us]\n");
|
||||
Printf("\nevent times: event, total calls, total time [ms], mean time/call [us]\n");
|
||||
}
|
||||
|
||||
buf[n] = 0;
|
||||
|
||||
OSD_Printf("%17s, %8d, %10.3f, %10.3f,\n",
|
||||
Printf("%17s, %8d, %10.3f, %10.3f,\n",
|
||||
buf, g_eventCalls[i], g_eventTotalMs[i],
|
||||
1000*g_eventTotalMs[i]/g_eventCalls[i]);
|
||||
}
|
||||
|
@ -588,7 +588,7 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
|
|||
if (!haveac)
|
||||
{
|
||||
haveac = 1;
|
||||
OSD_Printf("\nactor times: tile, total calls, total time [ms], {min,mean,max} time/call [us]\n");
|
||||
Printf("\nactor times: tile, total calls, total time [ms], {min,mean,max} time/call [us]\n");
|
||||
}
|
||||
|
||||
buf[0] = 0;
|
||||
|
@ -604,7 +604,7 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
|
|||
|
||||
if (!buf[0]) Bsprintf(buf, "%d", i);
|
||||
|
||||
OSD_Printf("%17s, %8d, %9.3f, %9.3f, %9.3f, %9.3f,\n",
|
||||
Printf("%17s, %8d, %9.3f, %9.3f, %9.3f, %9.3f,\n",
|
||||
buf, g_actorCalls[i], g_actorTotalMs[i],
|
||||
1000*g_actorMinMs[i],
|
||||
1000*g_actorTotalMs[i]/g_actorCalls[i],
|
||||
|
|
|
@ -2069,7 +2069,7 @@ static void P_FireWeapon(int playerNum)
|
|||
A_PlaySound(PWEAPON(playerNum, pPlayer->curr_weapon, FireSound), pPlayer->i);
|
||||
|
||||
P_SetWeaponGamevars(playerNum, pPlayer);
|
||||
// OSD_Printf("doing %d %d %d\n",PWEAPON(snum, p->curr_weapon, Shoots),p->curr_weapon,snum);
|
||||
// Printf("doing %d %d %d\n",PWEAPON(snum, p->curr_weapon, Shoots),p->curr_weapon,snum);
|
||||
A_Shoot(pPlayer->i, PWEAPON(playerNum, pPlayer->curr_weapon, Shoots));
|
||||
|
||||
for (bssize_t burstFire = PWEAPON(playerNum, pPlayer->curr_weapon, ShotsPerBurst) - 1; burstFire > 0; --burstFire)
|
||||
|
@ -4915,7 +4915,7 @@ void P_ProcessInput(int playerNum)
|
|||
{
|
||||
if (pSprite->extra > 0 && ud.noclip == 0)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "%s: player killed by cursectnum == -1!\n", EDUKE32_FUNCTION);
|
||||
Printf(OSD_ERROR "%s: player killed by cursectnum == -1!\n", EDUKE32_FUNCTION);
|
||||
P_QuickKill(pPlayer);
|
||||
if (!FURY)
|
||||
A_PlaySound(SQUISHED, pPlayer->i);
|
||||
|
@ -5676,7 +5676,7 @@ RECHECK:
|
|||
{
|
||||
if (mashedPotato)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "%s: player killed by pushmove()!\n", EDUKE32_FUNCTION);
|
||||
Printf(OSD_ERROR "%s: player killed by pushmove()!\n", EDUKE32_FUNCTION);
|
||||
P_QuickKill(pPlayer);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -488,7 +488,7 @@ void G_CacheMapData(void)
|
|||
|
||||
Bmemset(gotpic, 0, sizeof(gotpic));
|
||||
|
||||
OSD_Printf("Cache time: %dms\n", timerGetTicks() - cacheStartTime);
|
||||
Printf("Cache time: %dms\n", timerGetTicks() - cacheStartTime);
|
||||
}
|
||||
|
||||
int fragbarheight(void)
|
||||
|
@ -1267,7 +1267,7 @@ static void prelevel(int g)
|
|||
}
|
||||
|
||||
if (missedCloudSectors > 0)
|
||||
OSD_Printf(OSDTEXT_RED "Map warning: have %d unhandled CLOUDYSKIES ceilings.\n", missedCloudSectors);
|
||||
Printf(OSDTEXT_RED "Map warning: have %d unhandled CLOUDYSKIES ceilings.\n", missedCloudSectors);
|
||||
|
||||
// NOTE: must be safe loop because callbacks could delete sprites.
|
||||
for (int nextSprite, SPRITES_OF_STAT_SAFE(STAT_DEFAULT, i, nextSprite))
|
||||
|
@ -1665,7 +1665,7 @@ static int G_TryMapHack(const char *mhkfile)
|
|||
int const failure = engineLoadMHK(mhkfile);
|
||||
|
||||
if (!failure)
|
||||
initprintf("Loaded map hack file \"%s\"\n", mhkfile);
|
||||
Printf("Loaded map hack file \"%s\"\n", mhkfile);
|
||||
|
||||
return failure;
|
||||
}
|
||||
|
@ -1759,7 +1759,7 @@ int G_EnterLevel(int gameMode)
|
|||
{
|
||||
if (mm.fileName.IsEmpty())
|
||||
{
|
||||
OSD_Printf(OSDTEXT_RED "Map E%dL%d not defined!\n", ud.volume_number+1, ud.level_number+1);
|
||||
Printf(OSDTEXT_RED "Map E%dL%d not defined!\n", ud.volume_number+1, ud.level_number+1);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -1784,7 +1784,7 @@ int G_EnterLevel(int gameMode)
|
|||
{
|
||||
if (engineLoadBoard(boardfilename, 0, &p0.pos, &playerAngle, &p0.cursectnum) < 0)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", boardfilename);
|
||||
Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", boardfilename);
|
||||
return 1;
|
||||
}
|
||||
userMapRecord.name = "";
|
||||
|
@ -1798,7 +1798,7 @@ int G_EnterLevel(int gameMode)
|
|||
}
|
||||
else if (engineLoadBoard(mm.fileName, VOLUMEONE, &p0.pos, &playerAngle, &p0.cursectnum) < 0)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", mm.fileName.GetChars());
|
||||
Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", mm.fileName.GetChars());
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
@ -1890,11 +1890,11 @@ int G_EnterLevel(int gameMode)
|
|||
}
|
||||
|
||||
if (G_HaveUserMap())
|
||||
OSD_Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_USERMAP"), boardfilename);
|
||||
Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_USERMAP"), boardfilename);
|
||||
else if (FURY)
|
||||
OSD_Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_ENTERING"), mm.DisplayName());
|
||||
Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_ENTERING"), mm.DisplayName());
|
||||
else
|
||||
OSD_Printf(OSDTEXT_YELLOW "E%dL%d: %s\n", ud.volume_number + 1, ud.level_number + 1, mm.DisplayName());
|
||||
Printf(OSDTEXT_YELLOW "E%dL%d: %s\n", ud.volume_number + 1, ud.level_number + 1, mm.DisplayName());
|
||||
|
||||
g_restorePalette = -1;
|
||||
|
||||
|
|
|
@ -541,7 +541,7 @@ bool G_SavePlayer(FSaveGameNode *sv)
|
|||
|
||||
if (!g_netServer && ud.multimode < 2)
|
||||
{
|
||||
OSD_Printf("Saved: %s\n", fn.GetChars());
|
||||
Printf("Saved: %s\n", fn.GetChars());
|
||||
quoteMgr.InitializeQuote(QUOTE_RESERVED4, "Game Saved");
|
||||
P_DoQuote(QUOTE_RESERVED4, g_player[myconnectindex].ps);
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ static uint8_t *writespecdata(const dataspec_t *spec, FileWriter *fil, uint8_t *
|
|||
|
||||
if (cnt < 0)
|
||||
{
|
||||
OSD_Printf("wsd: cnt=%d, f=0x%x.\n", cnt, spec->flags);
|
||||
Printf("wsd: cnt=%d, f=0x%x.\n", cnt, spec->flags);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -722,12 +722,12 @@ static int32_t readspecdata(const dataspec_t *spec, FileReader *fil, uint8_t **d
|
|||
|
||||
if (ksiz != siz || Bmemcmp(spec->ptr, cmpstrbuf, siz))
|
||||
{
|
||||
OSD_Printf("rsd: spec=%s, idx=%d:\n", (char *)sptr->ptr, (int32_t)(spec-sptr));
|
||||
Printf("rsd: spec=%s, idx=%d:\n", (char *)sptr->ptr, (int32_t)(spec-sptr));
|
||||
|
||||
if (ksiz!=siz)
|
||||
OSD_Printf(" file read returned %d, expected %d.\n", ksiz, siz);
|
||||
Printf(" file read returned %d, expected %d.\n", ksiz, siz);
|
||||
else
|
||||
OSD_Printf(" sp->ptr and cmpstrbuf not identical!\n");
|
||||
Printf(" sp->ptr and cmpstrbuf not identical!\n");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -741,7 +741,7 @@ static int32_t readspecdata(const dataspec_t *spec, FileReader *fil, uint8_t **d
|
|||
|
||||
if (cnt < 0)
|
||||
{
|
||||
OSD_Printf("rsd: cnt<0... wtf?\n");
|
||||
Printf("rsd: cnt<0... wtf?\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -756,12 +756,12 @@ static int32_t readspecdata(const dataspec_t *spec, FileReader *fil, uint8_t **d
|
|||
|
||||
if (ksiz != siz)
|
||||
{
|
||||
OSD_Printf("rsd: spec=%s, idx=%d, mem=%p\n", (char *)sptr->ptr, (int32_t)(spec - sptr), mem);
|
||||
OSD_Printf(" : read %d, expected %d!\n",
|
||||
Printf("rsd: spec=%s, idx=%d, mem=%p\n", (char *)sptr->ptr, (int32_t)(spec - sptr), mem);
|
||||
Printf(" : read %d, expected %d!\n",
|
||||
ksiz, siz);
|
||||
|
||||
if (ksiz == -1)
|
||||
OSD_Printf(" read: %s\n", strerror(errno));
|
||||
Printf(" read: %s\n", strerror(errno));
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -901,7 +901,7 @@ static void cmpspecdata(const dataspec_t *spec, uint8_t **dumpvar, uint8_t **dif
|
|||
|
||||
if (cnt < 0)
|
||||
{
|
||||
OSD_Printf("csd: cnt=%d, f=0x%x\n", cnt, spec->flags);
|
||||
Printf("csd: cnt=%d, f=0x%x\n", cnt, spec->flags);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1343,7 +1343,7 @@ int32_t sv_saveandmakesnapshot(FileWriter &fil, int8_t spot)
|
|||
|
||||
if (p != svsnapshot+svsnapsiz)
|
||||
{
|
||||
OSD_Printf("sv_saveandmakesnapshot: ptr-(snapshot end)=%d!\n", (int32_t)(p - (svsnapshot + svsnapsiz)));
|
||||
Printf("sv_saveandmakesnapshot: ptr-(snapshot end)=%d!\n", (int32_t)(p - (svsnapshot + svsnapsiz)));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -1365,7 +1365,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
|
||||
if (filp->Read(h, sizeof(savehead_t)) != sizeof(savehead_t))
|
||||
{
|
||||
OSD_Printf("%s %d header corrupt.\n", havedemo ? "Demo":"Savegame", havedemo ? -spot : spot);
|
||||
Printf("%s %d header corrupt.\n", havedemo ? "Demo":"Savegame", havedemo ? -spot : spot);
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
return -1;
|
||||
}
|
||||
|
@ -1376,7 +1376,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
char headerCstr[sizeof(h->headerstr) + 1];
|
||||
Bmemcpy(headerCstr, h->headerstr, sizeof(h->headerstr));
|
||||
headerCstr[sizeof(h->headerstr)] = '\0';
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"DEDSAVEGAME\".\n",
|
||||
Printf("%s %d header reads \"%s\", expected \"DEDSAVEGAME\".\n",
|
||||
havedemo ? "Demo":"Savegame", havedemo ? -spot : spot, headerCstr);
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
return -2;
|
||||
|
@ -1387,7 +1387,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
#ifndef DEBUGGINGAIDS
|
||||
if (havedemo)
|
||||
#endif
|
||||
OSD_Printf("Incompatible savegame. Expected version %d.%d.%d.%d.%0x, found %d.%d.%d.%d.%0x\n", SV_MAJOR_VER, SV_MINOR_VER, BYTEVERSION,
|
||||
Printf("Incompatible savegame. Expected version %d.%d.%d.%d.%0x, found %d.%d.%d.%d.%0x\n", SV_MAJOR_VER, SV_MINOR_VER, BYTEVERSION,
|
||||
ud.userbytever, g_scriptcrc, h->majorver, h->minorver, h->bytever, h->userbytever, h->scriptcrc);
|
||||
|
||||
if (h->majorver == SV_MAJOR_VER && h->minorver == SV_MINOR_VER)
|
||||
|
@ -1406,7 +1406,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
#ifndef DEBUGGINGAIDS
|
||||
if (havedemo)
|
||||
#endif
|
||||
OSD_Printf("File incompatible. Expected pointer size %d, found %d\n",
|
||||
Printf("File incompatible. Expected pointer size %d, found %d\n",
|
||||
(int32_t)sizeof(intptr_t), h->getPtrSize());
|
||||
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
|
@ -1436,7 +1436,7 @@ int32_t sv_loadsnapshot(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
// else (if savegame), we just read the header and are now at offset sizeof(savehead_t)
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_Printf("sv_loadsnapshot: snapshot size: %d bytes.\n", h->snapsiz);
|
||||
Printf("sv_loadsnapshot: snapshot size: %d bytes.\n", h->snapsiz);
|
||||
#endif
|
||||
|
||||
if (spot >= 0)
|
||||
|
@ -1445,7 +1445,7 @@ int32_t sv_loadsnapshot(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
i = doloadplayer2(fil, NULL);
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
@ -1459,14 +1459,14 @@ int32_t sv_loadsnapshot(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
i = doloadplayer2(fil, &p);
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
sv_freemem();
|
||||
return 5;
|
||||
}
|
||||
|
||||
if (p != svsnapshot+svsnapsiz)
|
||||
{
|
||||
OSD_Printf("sv_loadsnapshot: internal error: p-(snapshot end)=%d!\n",
|
||||
Printf("sv_loadsnapshot: internal error: p-(snapshot end)=%d!\n",
|
||||
(int32_t)(p-(svsnapshot+svsnapsiz)));
|
||||
sv_freemem();
|
||||
return 6;
|
||||
|
@ -1495,7 +1495,7 @@ uint32_t sv_writediff(FileWriter *fil)
|
|||
#endif
|
||||
|
||||
if (p != svsnapshot+svsnapsiz)
|
||||
OSD_Printf("sv_writediff: dump+siz=%p, p=%p!\n", svsnapshot+svsnapsiz, p);
|
||||
Printf("sv_writediff: dump+siz=%p, p=%p!\n", svsnapshot+svsnapsiz, p);
|
||||
|
||||
uint32_t const diffsiz = d - svdiff;
|
||||
|
||||
|
@ -1535,7 +1535,7 @@ int32_t sv_readdiff(FileReader &fil)
|
|||
if (d!=svdiff+diffsiz)
|
||||
i|=2;
|
||||
if (i)
|
||||
OSD_Printf("sv_readdiff: p=%p, svsnapshot+svsnapsiz=%p; d=%p, svdiff+diffsiz=%p",
|
||||
Printf("sv_readdiff: p=%p, svsnapshot+svsnapsiz=%p; d=%p, svdiff+diffsiz=%p",
|
||||
p, svsnapshot+svsnapsiz, d, svdiff+diffsiz);
|
||||
return i;
|
||||
}
|
||||
|
@ -1674,8 +1674,8 @@ static void sv_restload()
|
|||
}
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
# define PRINTSIZE(name) do { if (mem) OSD_Printf(name ": %d\n", (int32_t)(mem-tmem)); \
|
||||
OSD_Printf(name ": %d ms\n", timerGetTicks()-t); t=timerGetTicks(); tmem=mem; } while (0)
|
||||
# define PRINTSIZE(name) do { if (mem) Printf(name ": %d\n", (int32_t)(mem-tmem)); \
|
||||
Printf(name ": %d ms\n", timerGetTicks()-t); t=timerGetTicks(); tmem=mem; } while (0)
|
||||
#else
|
||||
# define PRINTSIZE(name) do { } while (0)
|
||||
#endif
|
||||
|
@ -1769,7 +1769,7 @@ int32_t sv_updatestate(int32_t frominit)
|
|||
|
||||
if (p != pbeg+svsnapsiz)
|
||||
{
|
||||
OSD_Printf("sv_updatestate: ptr-(snapshot end)=%d\n", (int32_t)(p-(pbeg+svsnapsiz)));
|
||||
Printf("sv_updatestate: ptr-(snapshot end)=%d\n", (int32_t)(p-(pbeg+svsnapsiz)));
|
||||
return -9;
|
||||
}
|
||||
|
||||
|
|
|
@ -397,7 +397,7 @@ static void G_SetupCamTile(int spriteNum, int tileNum, int smoothRatio)
|
|||
goto finishTileSetup;
|
||||
#ifdef DEBUGGINGAIDS
|
||||
else if (EDUKE32_PREDICT_FALSE(noDraw != 0)) // event return values other than 0 and 1 are reserved
|
||||
OSD_Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMSCAMERATILE return value must be 0 or 1, "
|
||||
Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMSCAMERATILE return value must be 0 or 1, "
|
||||
"other values are reserved.\n");
|
||||
#endif
|
||||
screen->BeginScene();
|
||||
|
@ -794,7 +794,7 @@ void G_OperateSectors(int sectNum, int spriteNum)
|
|||
if (j == -1) j = nextsectorneighborz(sectNum,pSector->ceilingz,1,1);
|
||||
if (j == -1)
|
||||
{
|
||||
OSD_Printf("WARNING: ST29: null sector!\n");
|
||||
Printf("WARNING: ST29: null sector!\n");
|
||||
return;
|
||||
}
|
||||
j = sector[j].ceilingz;
|
||||
|
@ -805,7 +805,7 @@ void G_OperateSectors(int sectNum, int spriteNum)
|
|||
if (j == -1) j = nextsectorneighborz(sectNum,pSector->ceilingz,-1,-1);
|
||||
if (j == -1)
|
||||
{
|
||||
OSD_Printf("WARNING: ST29: null sector!\n");
|
||||
Printf("WARNING: ST29: null sector!\n");
|
||||
return;
|
||||
}
|
||||
j = sector[j].floorz;
|
||||
|
@ -890,7 +890,7 @@ REDODOOR:
|
|||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("WARNING: ST_22_SPLITTING_DOOR: null sector: floor neighbor=%d, ceiling neighbor=%d!\n",
|
||||
Printf("WARNING: ST_22_SPLITTING_DOOR: null sector: floor neighbor=%d, ceiling neighbor=%d!\n",
|
||||
floorNeighbor, ceilingNeighbor);
|
||||
pSector->lotag ^= 0x8000u;
|
||||
}
|
||||
|
@ -1242,7 +1242,7 @@ int P_ActivateSwitch(int playerNum, int wallOrSprite, int switchType)
|
|||
nSwitchPal = wall[wallOrSprite].pal;
|
||||
}
|
||||
|
||||
// initprintf("P_ActivateSwitch called picnum=%i switchissprite=%i\n",picnum,switchissprite);
|
||||
// Printf("P_ActivateSwitch called picnum=%i switchissprite=%i\n",picnum,switchissprite);
|
||||
|
||||
int basePicnum = G_GetBaseSwitch(nSwitchPicnum);
|
||||
int correctDips = 1;
|
||||
|
|
|
@ -353,7 +353,7 @@ void G_ProcessDynamicSoundMapping(const char *szLabel, int32_t lValue)
|
|||
struct dynitem *di = &g_dynSoundList[i];
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (g_scriptDebug && di->staticval != lValue)
|
||||
OSD_Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
#endif
|
||||
*di->dynvalptr = lValue;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int
|
|||
|
||||
if (t == NULL)
|
||||
{
|
||||
OSD_Printf("minitext: NULL text!\n");
|
||||
Printf("minitext: NULL text!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -492,12 +492,12 @@ static void parsedefinitions_game_include(const char *fileName, scriptfile *pScr
|
|||
{
|
||||
if (!Bstrcasecmp(cmdtokptr,"null") || pScript == NULL) // this is a bit overboard to prevent unused parameter warnings
|
||||
{
|
||||
// initprintf("Warning: Failed including %s as module\n", fn);
|
||||
// Printf("Warning: Failed including %s as module\n", fn);
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
Printf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
}
|
||||
*/
|
||||
|
@ -783,7 +783,7 @@ void I_Error(const char *fmt, ...)
|
|||
setvmode(3);
|
||||
#endif
|
||||
|
||||
initprintf("bailed to dos\n");
|
||||
Printf("bailed to dos\n");
|
||||
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
@ -1807,7 +1807,7 @@ void CheckCommandLine(int argc, char const* const* argv, int &doTitle)
|
|||
|
||||
doTitle = kFalse;
|
||||
|
||||
initprintf("Jumping to level %d...\n", levelnew);
|
||||
Printf("Jumping to level %d...\n", levelnew);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1854,7 +1854,7 @@ int GameInterface::app_main()
|
|||
}
|
||||
|
||||
#if defined(RENDERTYPEWIN) && defined(USE_OPENGL)
|
||||
if (forcegl) initprintf("GL driver blacklist disabled.\n");
|
||||
if (forcegl) Printf("GL driver blacklist disabled.\n");
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1873,7 +1873,7 @@ int GameInterface::app_main()
|
|||
|
||||
// GetCurPal(NULL);
|
||||
|
||||
initprintf("Initializing OSD...\n");
|
||||
Printf("Initializing OSD...\n");
|
||||
|
||||
registerosdcommands();
|
||||
|
||||
|
@ -1909,7 +1909,7 @@ int GameInterface::app_main()
|
|||
{
|
||||
AbortNetworkPlay();
|
||||
DebugOut("Network play aborted\n");
|
||||
initprintf("Network play aborted\n");
|
||||
Printf("Network play aborted\n");
|
||||
nWaitTicks = 60;
|
||||
}
|
||||
|
||||
|
@ -1926,7 +1926,7 @@ int GameInterface::app_main()
|
|||
if (!loaddefinitionsfile(defsfile))
|
||||
{
|
||||
uint32_t etime = timerGetTicks();
|
||||
initprintf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
Printf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
}
|
||||
loaddefinitions_game(defsfile, FALSE);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ void MyLoadPalette()
|
|||
//int hFile = kopen4load("PALETTE.DAT", 1);
|
||||
//if (hFile == -1)
|
||||
//{
|
||||
// initprintf("Error reading palette 'PALETTE.DAT'\n");
|
||||
// Printf("Error reading palette 'PALETTE.DAT'\n");
|
||||
// return;
|
||||
//}
|
||||
//
|
||||
|
@ -88,7 +88,7 @@ int LoadPaletteLookups()
|
|||
auto hFile = fileSystem.OpenFileReader(GradList[i], 1);
|
||||
if (!hFile.isOpen())
|
||||
{
|
||||
initprintf("Error reading palette lookup '%s'\n", GradList[i]);
|
||||
Printf("Error reading palette lookup '%s'\n", GradList[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ static int osdcmd_god(osdcmdptr_t UNUSED(parm))
|
|||
DoPassword(3);
|
||||
}
|
||||
else
|
||||
OSD_Printf("god: Not in a single-player game.\n");
|
||||
Printf("god: Not in a single-player game.\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ static int osdcmd_noclip(osdcmdptr_t UNUSED(parm))
|
|||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("noclip: Not in a single-player game.\n");
|
||||
Printf("noclip: Not in a single-player game.\n");
|
||||
}
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
@ -71,7 +71,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
|
||||
if (!fileSystem.Lookup(mapname, "MAP"))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ static int osdcmd_changelevel(osdcmdptr_t parm)
|
|||
|
||||
if (nLevel > nMaxLevels)
|
||||
{
|
||||
OSD_Printf("changelevel: invalid level number\n");
|
||||
Printf("changelevel: invalid level number\n");
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
|
|
|
@ -901,7 +901,7 @@ void DoKenTest()
|
|||
int nSector = sprite[nPlayerSprite].sectnum;
|
||||
if ((unsigned int)nSector >= kMaxSectors)
|
||||
{
|
||||
initprintf("DoKenTest: (unsigned int)nSector >= kMaxSectors\n");
|
||||
Printf("DoKenTest: (unsigned int)nSector >= kMaxSectors\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
auto hFile = fileSystem.ReopenFileReader(fileSystem.FindFile(buffer), true);
|
||||
if (!hFile.isOpen())
|
||||
{
|
||||
initprintf("Unable to open '%s'!\n", buffer);
|
||||
Printf("Unable to open '%s'!\n", buffer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
hFile.Read(&tag, sizeof(tag));
|
||||
if (tag < MAKE_ID('I', 'H', 0, 0) || (tag > MAKE_ID('I', 'H', 0, 0) && tag != MAKE_ID('D', 'S', 0, 0)))
|
||||
{
|
||||
initprintf("Unsupported sequence version!\n");
|
||||
Printf("Unsupported sequence version!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
{
|
||||
if (nSeqs < 0)
|
||||
{
|
||||
initprintf("Invalid sequence count!\n");
|
||||
Printf("Invalid sequence count!\n");
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
@ -217,7 +217,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
{
|
||||
if (nFrames < 0 )
|
||||
{
|
||||
initprintf("Invalid frame count!\n");
|
||||
Printf("Invalid frame count!\n");
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
@ -242,7 +242,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
{
|
||||
if (nChunks < 0 )
|
||||
{
|
||||
initprintf("Invalid chunk count!\n");
|
||||
Printf("Invalid chunk count!\n");
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
@ -315,7 +315,7 @@ void seq_LoadSequences()
|
|||
SeqOffsets[i] = sequences;
|
||||
|
||||
if (seq_ReadSequence(SeqNames[i]) == 0) {
|
||||
initprintf("Error loading '%s'\n", SeqNames[i]);
|
||||
Printf("Error loading '%s'\n", SeqNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ void PlayLocalSound(short nSound, short nRate, bool unattached, EChanFlags cflag
|
|||
{
|
||||
if (nSound < 0 || nSound >= kMaxSounds || !soundEngine->isValidSoundId(nSound + 1))
|
||||
{
|
||||
initprintf("PlayLocalSound: Invalid sound nSound == %i, nRate == %i\n", nSound, nRate);
|
||||
Printf("PlayLocalSound: Invalid sound nSound == %i, nRate == %i\n", nSound, nRate);
|
||||
return;
|
||||
}
|
||||
if (looped[nSound]) cflags |= CHANF_LOOP;
|
||||
|
@ -543,7 +543,7 @@ void PlayFX2(unsigned short nSound, short nSprite)
|
|||
{
|
||||
if ((nSound&0x1ff) >= kMaxSounds || !soundEngine->isValidSoundId((nSound & 0x1ff)+1))
|
||||
{
|
||||
initprintf("PlayFX2: Invalid sound nSound == %i, nSprite == %i\n", nSound, nSprite);
|
||||
Printf("PlayFX2: Invalid sound nSound == %i, nSprite == %i\n", nSound, nSprite);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ bool SmackerDecoder::Open(const char *fileName)
|
|||
file.Open(fileName);
|
||||
if (!file.Is_Open())
|
||||
{
|
||||
buildprintf("SmackerDecoder::Open() - Can't open file %s\n", fileName);
|
||||
Printf("SmackerDecoder::Open() - Can't open file %s\n", fileName);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ bool SmackerDecoder::Open(const char *fileName)
|
|||
if (memcmp(signature, kSMK2iD, 4) != 0
|
||||
&& memcmp(signature, kSMK4iD, 4) != 0)
|
||||
{
|
||||
buildprintf("SmackerDecoder::Open() - Unknown Smacker signature\n");
|
||||
Printf("SmackerDecoder::Open() - Unknown Smacker signature\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ bool SmackerDecoder::Open(const char *fileName)
|
|||
|
||||
if (nFrames > 0xFFFFFF)
|
||||
{
|
||||
buildprintf("SmackerDecoder::Open() - Too many frames\n");
|
||||
Printf("SmackerDecoder::Open() - Too many frames\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -447,7 +447,7 @@ int SmackerDecoder::DecodeTree(SmackerCommon::BitReader &bits, HuffContext *hc,
|
|||
if (!bits.GetBit()) // Leaf
|
||||
{
|
||||
if (hc->current >= 256){
|
||||
buildprintf("SmackerDecoder::DecodeTree() - Tree size exceeded\n");
|
||||
Printf("SmackerDecoder::DecodeTree() - Tree size exceeded\n");
|
||||
return -1;
|
||||
}
|
||||
if (length){
|
||||
|
@ -486,7 +486,7 @@ int SmackerDecoder::DecodeBigTree(SmackerCommon::BitReader &bits, HuffContext *h
|
|||
i2 = 0;
|
||||
|
||||
if (hc->current >= hc->length){
|
||||
buildprintf("SmackerDecoder::DecodeBigTree() - Tree size exceeded");
|
||||
Printf("SmackerDecoder::DecodeBigTree() - Tree size exceeded");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -548,7 +548,7 @@ int SmackerDecoder::DecodeHeaderTree(SmackerCommon::BitReader &bits, std::vector
|
|||
|
||||
if ((uint32_t)size >= UINT_MAX>>4)
|
||||
{
|
||||
buildprintf("SmackerDecoder::DecodeHeaderTree() - Size too large\n");
|
||||
Printf("SmackerDecoder::DecodeHeaderTree() - Size too large\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -971,7 +971,7 @@ int SmackerDecoder::DecodeAudio(uint32_t size, SmackerAudioTrack &track)
|
|||
int buf_size = track.bufferSize;
|
||||
|
||||
if (buf_size <= 4) {
|
||||
buildprintf("SmackerDecoder::DecodeAudio() - Packet is too small\n");
|
||||
Printf("SmackerDecoder::DecodeAudio() - Packet is too small\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -988,7 +988,7 @@ int SmackerDecoder::DecodeAudio(uint32_t size, SmackerAudioTrack &track)
|
|||
sampleBits = bits.GetBit();
|
||||
|
||||
if (stereo ^ (track.nChannels != 1)) {
|
||||
buildprintf("SmackerDecoder::DecodeAudio() - Channels mismatch\n");
|
||||
Printf("SmackerDecoder::DecodeAudio() - Channels mismatch\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1112,7 +1112,7 @@ float SmackerDecoder::GetFrameRate()
|
|||
void SmackerDecoder::GotoFrame(uint32_t frameNum)
|
||||
{
|
||||
if (frameNum >= nFrames) {
|
||||
buildprintf("SmackerDecoder::GotoFrame() - Invalid frame number\n");
|
||||
Printf("SmackerDecoder::GotoFrame() - Invalid frame number\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ int32_t A_MoveSprite(int32_t spriteNum, vec3_t const * const change, uint32_t cl
|
|||
if (newSectnum == -1)
|
||||
{
|
||||
newSectnum = pSprite->sectnum;
|
||||
// OSD_Printf("%s:%d wtf\n",__FILE__,__LINE__);
|
||||
// Printf("%s:%d wtf\n",__FILE__,__LINE__);
|
||||
}
|
||||
else if (newSectnum != pSprite->sectnum)
|
||||
{
|
||||
|
@ -517,7 +517,7 @@ void A_DeleteSprite(int spriteNum)
|
|||
{
|
||||
if (EDUKE32_PREDICT_FALSE(block_deletesprite))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "A_DeleteSprite(): tried to remove sprite %d in EVENT_EGS\n", spriteNum);
|
||||
Printf(OSD_ERROR "A_DeleteSprite(): tried to remove sprite %d in EVENT_EGS\n", spriteNum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
if (!anim)
|
||||
{
|
||||
OSD_Printf("Animation %s is undefined!\n", fn);
|
||||
Printf("Animation %s is undefined!\n", fn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("Failed reading IVF file: %s\n", animvpx_read_ivf_header_errmsg[i]);
|
||||
Printf("Failed reading IVF file: %s\n", animvpx_read_ivf_header_errmsg[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
if (animvpx_init_codec(&info, handle, &codec))
|
||||
{
|
||||
OSD_Printf("Error initializing VPX codec.\n");
|
||||
Printf("Error initializing VPX codec.\n");
|
||||
animvpx_restore_glstate();
|
||||
return 0;
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ int32_t Anim_Play(const char *fn)
|
|||
uint32_t nextframetime = timerGetTicks();
|
||||
uint8_t *pic;
|
||||
|
||||
// OSD_Printf("msecs per frame: %d\n", msecsperframe);
|
||||
// Printf("msecs per frame: %d\n", msecsperframe);
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -346,12 +346,12 @@ int32_t Anim_Play(const char *fn)
|
|||
i = animvpx_nextpic(&codec, &pic);
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("Failed getting next pic: %s\n", animvpx_nextpic_errmsg[i]);
|
||||
Printf("Failed getting next pic: %s\n", animvpx_nextpic_errmsg[i]);
|
||||
if (codec.errmsg)
|
||||
{
|
||||
OSD_Printf(" %s\n", codec.errmsg);
|
||||
Printf(" %s\n", codec.errmsg);
|
||||
if (codec.errmsg_detail)
|
||||
OSD_Printf(" detail: %s\n", codec.errmsg_detail);
|
||||
Printf(" detail: %s\n", codec.errmsg_detail);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
if (buffer.Size() <= 5)
|
||||
{
|
||||
OSD_Printf("Warning: skipping playback of empty ANM file \"%s\".\n", fn);
|
||||
Printf("Warning: skipping playback of empty ANM file \"%s\".\n", fn);
|
||||
goto end_anim;
|
||||
}
|
||||
|
||||
|
@ -470,7 +470,7 @@ int32_t Anim_Play(const char *fn)
|
|||
{
|
||||
// XXX: ANM_LoadAnim() still checks less than the bare minimum,
|
||||
// e.g. ANM file could still be too small and not contain any frames.
|
||||
OSD_Printf("Error: malformed ANM file \"%s\".\n", fn);
|
||||
Printf("Error: malformed ANM file \"%s\".\n", fn);
|
||||
goto end_anim;
|
||||
}
|
||||
|
||||
|
@ -487,7 +487,7 @@ int32_t Anim_Play(const char *fn)
|
|||
{
|
||||
if (i > 4 && totalclock > frametime + 60)
|
||||
{
|
||||
OSD_Printf("WARNING: slowdown in %s, skipping playback\n", fn);
|
||||
Printf("WARNING: slowdown in %s, skipping playback\n", fn);
|
||||
goto end_anim_restore_gl;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,13 +52,13 @@ static void G_AddDemo(const char* param)
|
|||
|
||||
if (framespertic < 0)
|
||||
{
|
||||
initprintf("Play demo %s.\n", g_firstDemoFile);
|
||||
Printf("Play demo %s.\n", g_firstDemoFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
framespertic = clamp(framespertic, 0, 8)+1;
|
||||
// TODO: repeat count and gathering statistics.
|
||||
initprintf("Profile demo %s, %d frames/gametic, repeated 1x.\n", g_firstDemoFile,
|
||||
Printf("Profile demo %s, %d frames/gametic, repeated 1x.\n", g_firstDemoFile,
|
||||
framespertic-1);
|
||||
Demo_PlayFirst(framespertic, 1);
|
||||
g_noLogo = 1;
|
||||
|
@ -71,7 +71,7 @@ void G_CheckCommandLine()
|
|||
if (Args->CheckParm("-altai"))
|
||||
{
|
||||
ud.playerai = 1;
|
||||
OSD_Printf("Other player AI.\n");
|
||||
Printf("Other player AI.\n");
|
||||
}
|
||||
auto val = Args->CheckValue("-skill");
|
||||
if (val)
|
||||
|
@ -91,7 +91,7 @@ void G_CheckCommandLine()
|
|||
ud.m_respawn_items = 1;
|
||||
ud.m_respawn_inventory = 1;
|
||||
}
|
||||
OSD_Printf("Respawn on.\n");
|
||||
Printf("Respawn on.\n");
|
||||
}
|
||||
}
|
||||
END_RR_NS
|
||||
|
|
|
@ -114,7 +114,7 @@ void G_LoadLookups(void)
|
|||
if (j < 0)
|
||||
{
|
||||
if (j == -1)
|
||||
initprintf("ERROR loading \"lookup.dat\": failed reading enough data.\n");
|
||||
Printf("ERROR loading \"lookup.dat\": failed reading enough data.\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
|
|||
i = sv_loadsnapshot(g_demo_recFilePtr, -g_whichDemo, &saveh);
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "There were errors opening demo %d (code: %d).\n", g_whichDemo, i);
|
||||
Printf(OSD_ERROR "There were errors opening demo %d (code: %d).\n", g_whichDemo, i);
|
||||
g_demo_recFilePtr.Close();
|
||||
return 0;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
|
|||
demo_hasseeds = 0;
|
||||
|
||||
i = g_demo_totalCnt/REALGAMETICSPERSEC;
|
||||
OSD_Printf("demo %d duration: %d min %d sec\n", g_whichDemo, i/60, i%60);
|
||||
Printf("demo %d duration: %d min %d sec\n", g_whichDemo, i/60, i%60);
|
||||
|
||||
g_demo_cnt = 1;
|
||||
ud.reccnt = 0;
|
||||
|
@ -156,7 +156,7 @@ void G_OpenDemoWrite(void)
|
|||
|
||||
if (snprintf(demofn, sizeof(demofn), "%s" DEMOFN_FMT, G_GetDemoPath().GetChars(), demonum))
|
||||
{
|
||||
initprintf("Couldn't start demo writing: INTERNAL ERROR: file name too long\n");
|
||||
Printf("Couldn't start demo writing: INTERNAL ERROR: file name too long\n");
|
||||
goto error_wopen_demo;
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ static int32_t Demo_UpdateState(int32_t frominit)
|
|||
Demo_RestoreModes(j);
|
||||
|
||||
if (k)
|
||||
OSD_Printf("sv_updatestate() returned %d.\n", k);
|
||||
Printf("sv_updatestate() returned %d.\n", k);
|
||||
return k;
|
||||
}
|
||||
|
||||
|
@ -408,17 +408,17 @@ static void Demo_FinishProfile(void)
|
|||
|
||||
if (nt > 0)
|
||||
{
|
||||
OSD_Printf("== demo %d: %d gametics\n", dn, nt);
|
||||
OSD_Printf("== demo %d game times: %.03f ms (%.03f us/gametic)\n",
|
||||
Printf("== demo %d: %d gametics\n", dn, nt);
|
||||
Printf("== demo %d game times: %.03f ms (%.03f us/gametic)\n",
|
||||
dn, gms, (gms*1000.0)/nt);
|
||||
}
|
||||
|
||||
if (nf > 0)
|
||||
{
|
||||
OSD_Printf("== demo %d: %d frames (%d frames/gametic)\n", dn, nf, g_demo_profile-1);
|
||||
OSD_Printf("== demo %d drawrooms times: %.03f s (%.03f ms/frame)\n",
|
||||
Printf("== demo %d: %d frames (%d frames/gametic)\n", dn, nf, g_demo_profile-1);
|
||||
Printf("== demo %d drawrooms times: %.03f s (%.03f ms/frame)\n",
|
||||
dn, dms1/1000.0, dms1/nf);
|
||||
OSD_Printf("== demo %d drawrest times: %.03f s (%.03f ms/frame)\n",
|
||||
Printf("== demo %d drawrest times: %.03f s (%.03f ms/frame)\n",
|
||||
dn, dms2/1000.0, dms2/nf);
|
||||
}
|
||||
|
||||
|
@ -426,7 +426,7 @@ static void Demo_FinishProfile(void)
|
|||
double totalprofms = gms+dms1+dms2;
|
||||
double totalms = timerGetHiTicks()-g_prof.starthiticks;
|
||||
if (totalprofms != 0)
|
||||
OSD_Printf("== demo %d: non-profiled time overhead: %.02f %%\n",
|
||||
Printf("== demo %d: non-profiled time overhead: %.02f %%\n",
|
||||
dn, 100.0*totalms/totalprofms - 100.0);
|
||||
}
|
||||
}
|
||||
|
@ -531,7 +531,7 @@ RECHECK:
|
|||
|
||||
inputState.ClearAllInput();
|
||||
|
||||
// OSD_Printf("ticcnt=%d, total=%d\n", g_demo_cnt, g_demo_totalCnt);
|
||||
// Printf("ticcnt=%d, total=%d\n", g_demo_cnt, g_demo_totalCnt);
|
||||
while (g_demo_cnt < g_demo_totalCnt || foundemo==0)
|
||||
{
|
||||
// Main loop here. It also runs when there's no demo to show,
|
||||
|
@ -603,7 +603,7 @@ RECHECK:
|
|||
|
||||
if (ud.reccnt<0)
|
||||
{
|
||||
OSD_Printf("G_PlaybackDemo: ud.reccnt<0!\n");
|
||||
Printf("G_PlaybackDemo: ud.reccnt<0!\n");
|
||||
CORRUPT(1);
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ RECHECK:
|
|||
|
||||
if (k)
|
||||
{
|
||||
OSD_Printf("sv_readdiff() returned %d.\n", k);
|
||||
Printf("sv_readdiff() returned %d.\n", k);
|
||||
CORRUPT(6);
|
||||
}
|
||||
else
|
||||
|
@ -659,7 +659,7 @@ RECHECK:
|
|||
if (0)
|
||||
{
|
||||
corrupt:
|
||||
OSD_Printf(OSD_ERROR "Demo %d is corrupt (code %d).\n", g_whichDemo-1, corruptcode);
|
||||
Printf(OSD_ERROR "Demo %d is corrupt (code %d).\n", g_whichDemo-1, corruptcode);
|
||||
nextdemo:
|
||||
M_StartControlPanel(false);
|
||||
nextdemo_nomenu:
|
||||
|
@ -727,7 +727,7 @@ nextdemo_nomenu:
|
|||
// if fast-forwarding, we must update totalclock
|
||||
totalclock += TICSPERFRAME;
|
||||
|
||||
// OSD_Printf("t:%d, l+T:%d; cnt:%d, goal:%d%s", totalclock, (lockclock+TICSPERFRAME),
|
||||
// Printf("t:%d, l+T:%d; cnt:%d, goal:%d%s", totalclock, (lockclock+TICSPERFRAME),
|
||||
// g_demo_cnt, g_demo_goalCnt, g_demo_cnt>=g_demo_goalCnt?" ":"\n");
|
||||
if (g_demo_cnt>=g_demo_goalCnt)
|
||||
{
|
||||
|
@ -769,7 +769,7 @@ nextdemo_nomenu:
|
|||
{
|
||||
double t1 = timerGetHiTicks(), t2;
|
||||
|
||||
// initprintf("t=%d, o=%d, t-o = %d\n", totalclock,
|
||||
// Printf("t=%d, o=%d, t-o = %d\n", totalclock,
|
||||
// ototalclock, totalclock-ototalclock);
|
||||
|
||||
// NOTE: G_DrawRooms() calculates smoothratio inside and
|
||||
|
|
|
@ -612,7 +612,7 @@ static void G_OROR_DupeSprites(const spritetype *sp)
|
|||
tsp->z += -sp->z + actor[sp->yvel].ceilingz;
|
||||
tsp->sectnum = refsp->sectnum;
|
||||
|
||||
// OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsp->picnum,tsp->x,tsp->y,tsp->z);
|
||||
// Printf("duped sprite of pic %d at %d %d %d\n",tsp->picnum,tsp->x,tsp->y,tsp->z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -649,7 +649,7 @@ static void G_SE40(int32_t smoothratio)
|
|||
// XXX: PK: too large stack allocation for my taste
|
||||
int32_t i;
|
||||
int32_t pix_diff, newz;
|
||||
// initprintf("drawing ror\n");
|
||||
// Printf("drawing ror\n");
|
||||
|
||||
if (level)
|
||||
{
|
||||
|
@ -1351,7 +1351,7 @@ int32_t A_InsertSprite(int16_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int1
|
|||
if (EDUKE32_PREDICT_FALSE((unsigned)i >= MAXSPRITES))
|
||||
{
|
||||
G_DumpDebugInfo();
|
||||
OSD_Printf("Failed spawning pic %d spr from pic %d spr %d at x:%d,y:%d,z:%d,sect:%d\n",
|
||||
Printf("Failed spawning pic %d spr from pic %d spr %d at x:%d,y:%d,z:%d,sect:%d\n",
|
||||
s_pn,s_ow < 0 ? -1 : TrackerCast(sprite[s_ow].picnum),s_ow,s_x,s_y,s_z,whatsect);
|
||||
G_GameExit("Too many sprites spawned.");
|
||||
}
|
||||
|
@ -2679,7 +2679,7 @@ rrbloodpool_fallthrough:
|
|||
if (EDUKE32_PREDICT_FALSE(pSprite->hitag && pSprite->picnum == WATERBUBBLEMAKER))
|
||||
{
|
||||
// JBF 20030913: Pisses off X_Move(), eg. in bobsp2
|
||||
OSD_Printf(OSD_ERROR "WARNING: WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n",
|
||||
Printf(OSD_ERROR "WARNING: WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n",
|
||||
newSprite,TrackerCast(pSprite->x),TrackerCast(pSprite->y));
|
||||
pSprite->hitag = 0;
|
||||
}
|
||||
|
@ -3606,7 +3606,7 @@ rr_badguy:
|
|||
if (sprite[spriteNum].picnum == SECTOREFFECTOR && (sprite[spriteNum].lotag == 40 || sprite[spriteNum].lotag == 41) &&
|
||||
sprite[spriteNum].hitag == pSprite->hitag && newSprite != spriteNum)
|
||||
{
|
||||
// initprintf("found ror match\n");
|
||||
// Printf("found ror match\n");
|
||||
pSprite->yvel = spriteNum;
|
||||
break;
|
||||
}
|
||||
|
@ -3805,7 +3805,7 @@ rr_badguy:
|
|||
// use elevator sector's ceiling as heuristic
|
||||
T4(newSprite) = sector[sectNum].ceilingz;
|
||||
|
||||
OSD_Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector's ceilingz to "
|
||||
Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector's ceilingz to "
|
||||
"determine when to warp. Sector %d adjacent to a door?\n",
|
||||
newSprite, sectNum);
|
||||
}
|
||||
|
@ -3819,7 +3819,7 @@ rr_badguy:
|
|||
// heuristic
|
||||
T5(newSprite) = sector[sectNum].floorz;
|
||||
|
||||
OSD_Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector %d's floorz.\n",
|
||||
Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector %d's floorz.\n",
|
||||
newSprite, sectNum);
|
||||
}
|
||||
|
||||
|
@ -4043,7 +4043,7 @@ rr_badguy:
|
|||
}
|
||||
if (EDUKE32_PREDICT_FALSE(spriteNum == -1))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Found lonely Sector Effector (lotag 0) at (%d,%d)\n",
|
||||
Printf(OSD_ERROR "Found lonely Sector Effector (lotag 0) at (%d,%d)\n",
|
||||
TrackerCast(pSprite->x),TrackerCast(pSprite->y));
|
||||
changespritestat(newSprite, STAT_ACTOR);
|
||||
goto SPAWN_END;
|
||||
|
@ -5372,7 +5372,7 @@ skip:
|
|||
#ifdef DEBUGGINGAIDS
|
||||
// A negative actor[i].dispicnum used to mean 'no floor shadow please', but
|
||||
// that was a bad hack since the value could propagate to sprite[].picnum.
|
||||
OSD_Printf(OSD_ERROR "actor[%d].dispicnum = %d\n", i, actor[i].dispicnum);
|
||||
Printf(OSD_ERROR "actor[%d].dispicnum = %d\n", i, actor[i].dispicnum);
|
||||
#endif
|
||||
actor[i].dispicnum=0;
|
||||
continue;
|
||||
|
@ -6103,12 +6103,12 @@ static void parsedefinitions_game_include(const char *fileName, scriptfile *pScr
|
|||
{
|
||||
if (!Bstrcasecmp(cmdtokptr,"null") || pScript == NULL) // this is a bit overboard to prevent unused parameter warnings
|
||||
{
|
||||
// initprintf("Warning: Failed including %s as module\n", fn);
|
||||
// Printf("Warning: Failed including %s as module\n", fn);
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
Printf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
}
|
||||
*/
|
||||
|
@ -6153,14 +6153,14 @@ static void parsedefinitions_game_animsounds(scriptfile *pScript, const char * b
|
|||
// frame numbers start at 1 for us
|
||||
if (frameNum <= 0)
|
||||
{
|
||||
initprintf("Error: frame number must be greater zero on line %s:%d\n", pScript->filename,
|
||||
Printf("Error: frame number must be greater zero on line %s:%d\n", pScript->filename,
|
||||
scriptfile_getlinum(pScript, pScript->ltextptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (frameNum < lastFrameNum)
|
||||
{
|
||||
initprintf("Error: frame numbers must be in (not necessarily strictly)"
|
||||
Printf("Error: frame numbers must be in (not necessarily strictly)"
|
||||
" ascending order (line %s:%d)\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript, pScript->ltextptr));
|
||||
break;
|
||||
|
@ -6170,7 +6170,7 @@ static void parsedefinitions_game_animsounds(scriptfile *pScript, const char * b
|
|||
|
||||
if ((unsigned)soundNum >= MAXSOUNDS && soundNum != -1)
|
||||
{
|
||||
initprintf("Error: sound number #%d invalid on line %s:%d\n", soundNum, pScript->filename,
|
||||
Printf("Error: sound number #%d invalid on line %s:%d\n", soundNum, pScript->filename,
|
||||
scriptfile_getlinum(pScript, pScript->ltextptr));
|
||||
break;
|
||||
}
|
||||
|
@ -6187,12 +6187,12 @@ static void parsedefinitions_game_animsounds(scriptfile *pScript, const char * b
|
|||
|
||||
if (!defError)
|
||||
{
|
||||
// initprintf("Defined sound sequence for hi-anim \"%s\" with %d frame/sound pairs\n",
|
||||
// Printf("Defined sound sequence for hi-anim \"%s\" with %d frame/sound pairs\n",
|
||||
// hardcoded_anim_tokens[animnum].text, numpairs);
|
||||
}
|
||||
else
|
||||
{
|
||||
initprintf("Failed defining sound sequence for anim \"%s\".\n", fileName);
|
||||
Printf("Failed defining sound sequence for anim \"%s\".\n", fileName);
|
||||
}
|
||||
animPtr->Sounds.ShrinkToFit();
|
||||
}
|
||||
|
@ -6307,7 +6307,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
{
|
||||
if (musicID==NULL)
|
||||
{
|
||||
initprintf("Error: missing ID for music definition near line %s:%d\n",
|
||||
Printf("Error: missing ID for music definition near line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
@ -6316,7 +6316,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
break;
|
||||
|
||||
if (S_DefineMusic(musicID, fileName) == -1)
|
||||
initprintf("Error: invalid music ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
Printf("Error: invalid music ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -6410,7 +6410,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
if (!animPtr)
|
||||
{
|
||||
initprintf("Error: expected animation filename on line %s:%d\n",
|
||||
Printf("Error: expected animation filename on line %s:%d\n",
|
||||
pScript->filename, scriptfile_getlinum(pScript, tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
@ -6456,7 +6456,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
{
|
||||
if (soundNum==-1)
|
||||
{
|
||||
initprintf("Error: missing ID for sound definition near line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
Printf("Error: missing ID for sound definition near line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -6465,7 +6465,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
|
|||
|
||||
// maybe I should have just packed this into a sound_t and passed a reference...
|
||||
if (S_DefineSound(soundNum, fileName, minpitch, maxpitch, priority, type, distance, volume) == -1)
|
||||
initprintf("Error: invalid sound ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
Printf("Error: invalid sound ID on line %s:%d\n", pScript->filename, scriptfile_getlinum(pScript,tokenPtr));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -6580,7 +6580,7 @@ static void G_CompileScripts(void)
|
|||
static inline void G_CheckGametype(void)
|
||||
{
|
||||
m_coop = clamp(*m_coop, 0, g_gametypeCnt-1);
|
||||
initprintf("%s\n",g_gametypeNames[m_coop]);
|
||||
Printf("%s\n",g_gametypeNames[m_coop]);
|
||||
if (g_gametypeFlags[m_coop] & GAMETYPE_ITEMRESPAWN)
|
||||
ud.m_respawn_items = ud.m_respawn_inventory = 1;
|
||||
}
|
||||
|
@ -6778,7 +6778,7 @@ static void G_Startup(void)
|
|||
FString startupMap;
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
initprintf("The -map option is available in the registered version only!\n");
|
||||
Printf("The -map option is available in the registered version only!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6790,11 +6790,11 @@ static void G_Startup(void)
|
|||
|
||||
if (fileSystem.FileExists(startupMap))
|
||||
{
|
||||
initprintf("Using level: \"%s\".\n",startupMap.GetChars());
|
||||
Printf("Using level: \"%s\".\n",startupMap.GetChars());
|
||||
}
|
||||
else
|
||||
{
|
||||
initprintf("Level \"%s\" not found.\n",startupMap.GetChars());
|
||||
Printf("Level \"%s\" not found.\n",startupMap.GetChars());
|
||||
boardfilename[0] = 0;
|
||||
}
|
||||
}
|
||||
|
@ -6807,7 +6807,7 @@ static void G_Startup(void)
|
|||
Net_GetPackets();
|
||||
|
||||
if (numplayers > 1)
|
||||
initprintf("Multiplayer initialized.\n");
|
||||
Printf("Multiplayer initialized.\n");
|
||||
|
||||
if (TileFiles.artLoadFiles("tiles%03i.art") < 0)
|
||||
G_GameExit("Failed loading art.");
|
||||
|
@ -6816,7 +6816,7 @@ static void G_Startup(void)
|
|||
// after dynamic tile remapping (from C_Compile) and loading tiles.
|
||||
picanm[LOADSCREEN].sf |= PICANM_NOFULLBRIGHT_BIT;
|
||||
|
||||
// initprintf("Loading palette/lookups...\n");
|
||||
// Printf("Loading palette/lookups...\n");
|
||||
G_LoadLookups();
|
||||
|
||||
if (DEER)
|
||||
|
@ -7002,7 +7002,7 @@ int GameInterface::app_main()
|
|||
// gotta set the proper title after we compile the CONs if this is the full version
|
||||
|
||||
if (g_scriptDebug)
|
||||
initprintf("CON debugging activated (level %d).\n",g_scriptDebug);
|
||||
Printf("CON debugging activated (level %d).\n",g_scriptDebug);
|
||||
|
||||
#ifndef NETCODE_DISABLE
|
||||
Net_InitNetwork();
|
||||
|
@ -7053,7 +7053,7 @@ int GameInterface::app_main()
|
|||
if (!loaddefinitionsfile(defsfile))
|
||||
{
|
||||
uint32_t etime = timerGetTicks();
|
||||
initprintf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
Printf("Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime-stime);
|
||||
}
|
||||
loaddefinitions_game(defsfile, FALSE);
|
||||
|
||||
|
@ -7095,7 +7095,7 @@ int GameInterface::app_main()
|
|||
#ifdef HAVE_CLIPSHAPE_FEATURE
|
||||
int const clipMapError = engineLoadClipMaps();
|
||||
if (clipMapError > 0)
|
||||
initprintf("There was an error loading the sprite clipping map (status %d).\n", clipMapError);
|
||||
Printf("There was an error loading the sprite clipping map (status %d).\n", clipMapError);
|
||||
|
||||
g_clipMapFiles.Reset();
|
||||
#endif
|
||||
|
|
|
@ -448,13 +448,13 @@ static int32_t C_SkipComments(void)
|
|||
{
|
||||
case '/': // C++ style comment
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: got comment.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: got comment.\n",g_scriptFileName,g_lineNumber);
|
||||
C_NextLine();
|
||||
g_gotComment = 1;
|
||||
continue;
|
||||
case '*': // beginning of a C style comment
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: got start of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: got start of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
do
|
||||
{
|
||||
if (*textptr == '\n')
|
||||
|
@ -466,23 +466,23 @@ static int32_t C_SkipComments(void)
|
|||
if (EDUKE32_PREDICT_FALSE(!*textptr))
|
||||
{
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: EOF in comment!\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: EOF in comment!\n",g_scriptFileName,g_lineNumber);
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `/*' with no `*/'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `/*' with no `*/'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_parsingActorPtr = g_processingState = g_numBraces = 0;
|
||||
g_errorCnt++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: got end of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: debug: got end of comment block.\n",g_scriptFileName,g_lineNumber);
|
||||
|
||||
textptr+=2;
|
||||
g_gotComment = 1;
|
||||
continue;
|
||||
default:
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: malformed comment.\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: error: malformed comment.\n", g_scriptFileName, g_lineNumber);
|
||||
C_NextLine();
|
||||
g_errorCnt++;
|
||||
continue;
|
||||
|
@ -547,7 +547,7 @@ static void C_GetNextLabelName(void)
|
|||
label[(g_labelCnt<<6)+i] = 0;
|
||||
|
||||
if (!(g_errorCnt|g_warningCnt) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: label `%s'.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: debug: label `%s'.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
}
|
||||
|
||||
static inline void scriptWriteValue(int32_t const value)
|
||||
|
@ -622,7 +622,7 @@ static int32_t C_GetNextKeyword(void) //Returns its code #
|
|||
textptr += l;
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: keyword `%s'.\n", g_scriptFileName, g_lineNumber, tempbuf);
|
||||
Printf("%s:%d: debug: keyword `%s'.\n", g_scriptFileName, g_lineNumber, tempbuf);
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,7 @@ static int32_t C_GetNextKeyword(void) //Returns its code #
|
|||
if (EDUKE32_PREDICT_FALSE((tempbuf[0] == '{' || tempbuf[0] == '}') && tempbuf[1] != 0))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: expected whitespace between `%c' and `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf[0],tempbuf+1);
|
||||
Printf("%s:%d: error: expected whitespace between `%c' and `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf[0],tempbuf+1);
|
||||
}
|
||||
else C_ReportError(ERROR_EXPECTEDKEYWORD);
|
||||
|
||||
|
@ -654,7 +654,7 @@ static int32_t parse_decimal_number(void) // (textptr)
|
|||
// (CON code in the wild exists that does this). Note that such conversion
|
||||
// is implementation-defined (C99 6.3.1.3) but GCC does the 'expected' thing.
|
||||
#if 0
|
||||
initprintf("%s:%d: warning: number greater than INT32_MAX converted to a negative one.\n",
|
||||
Printf("%s:%d: warning: number greater than INT32_MAX converted to a negative one.\n",
|
||||
g_szScriptFileName,g_lineNumber);
|
||||
g_numCompilerWarnings++;
|
||||
#endif
|
||||
|
@ -663,7 +663,7 @@ static int32_t parse_decimal_number(void) // (textptr)
|
|||
{
|
||||
// out of range, this is arguably worse
|
||||
|
||||
initprintf("%s:%d: warning: number out of the range of a 32-bit integer encountered.\n",
|
||||
Printf("%s:%d: warning: number out of the range of a 32-bit integer encountered.\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
@ -678,7 +678,7 @@ static int32_t parse_hex_constant(const char *hexnum)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE(x > UINT32_MAX))
|
||||
{
|
||||
initprintf(g_scriptFileName, ":", g_lineNumber, ": warning: number 0x", hex(x), " truncated to 32 bits.\n");
|
||||
Printf(g_scriptFileName, ":", g_lineNumber, ": warning: number 0x", hex(x), " truncated to 32 bits.\n");
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
||||
|
@ -704,7 +704,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
scriptWriteValue(parse_decimal_number());
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: constant %ld in place of gamevar.\n", g_scriptFileName, g_lineNumber, (long)(g_scriptPtr[-1]));
|
||||
Printf("%s:%d: debug: constant %ld in place of gamevar.\n", g_scriptFileName, g_lineNumber, (long)(g_scriptPtr[-1]));
|
||||
#if 1
|
||||
while (!ispecial(*textptr) && *textptr != ']') textptr++;
|
||||
#else
|
||||
|
@ -723,7 +723,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
}
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: flagging gamevar as negative.\n", g_scriptFileName, g_lineNumber); //,Batol(textptr));
|
||||
Printf("%s:%d: debug: flagging gamevar as negative.\n", g_scriptFileName, g_lineNumber); //,Batol(textptr));
|
||||
|
||||
flags = GV_FLAG_NEGATIVE;
|
||||
textptr++;
|
||||
|
@ -752,7 +752,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
if (EDUKE32_PREDICT_TRUE(id>=0 && labeltype[id] & LABEL_DEFINE))
|
||||
{
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: label `%s' in place of gamevar.\n",g_scriptFileName,g_lineNumber,label+(id<<6));
|
||||
Printf("%s:%d: debug: label `%s' in place of gamevar.\n",g_scriptFileName,g_lineNumber,label+(id<<6));
|
||||
|
||||
scriptWriteValue(GV_FLAG_CONSTANT);
|
||||
scriptWriteValue(labelcode[id]);
|
||||
|
@ -779,7 +779,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
}
|
||||
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
initprintf("%s:%d: debug: gamevar `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: debug: gamevar `%s'.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
|
||||
scriptWriteValue(id|flags);
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug > 1)
|
||||
{
|
||||
char *gl = C_GetLabelType(labeltype[i]);
|
||||
initprintf("%s:%d: debug: %s label `%s'.\n",g_scriptFileName,g_lineNumber,gl,label+(i<<6));
|
||||
Printf("%s:%d: debug: %s label `%s'.\n",g_scriptFileName,g_lineNumber,gl,label+(i<<6));
|
||||
Xfree(gl);
|
||||
}
|
||||
|
||||
|
@ -849,7 +849,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
char *el = C_GetLabelType(type);
|
||||
char *gl = C_GetLabelType(labeltype[i]);
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: expected %s, found %s.\n",g_scriptFileName,g_lineNumber,el,gl);
|
||||
Printf("%s:%d: warning: expected %s, found %s.\n",g_scriptFileName,g_lineNumber,el,gl);
|
||||
g_warningCnt++;
|
||||
Xfree(el);
|
||||
Xfree(gl);
|
||||
|
@ -882,7 +882,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
if (EDUKE32_PREDICT_FALSE(!isdigit(textptr[i--])))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: invalid character `%c' in definition!\n",g_scriptFileName,g_lineNumber,textptr[i+1]);
|
||||
Printf("%s:%d: warning: invalid character `%c' in definition!\n",g_scriptFileName,g_lineNumber,textptr[i+1]);
|
||||
g_warningCnt++;
|
||||
break;
|
||||
}
|
||||
|
@ -897,7 +897,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
*g_scriptPtr = parse_decimal_number();
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: constant %ld.\n",
|
||||
Printf("%s:%d: debug: constant %ld.\n",
|
||||
g_scriptFileName,g_lineNumber,(long)*g_scriptPtr);
|
||||
|
||||
g_scriptPtr++;
|
||||
|
@ -919,7 +919,7 @@ static int32_t C_CheckMalformedBranch(intptr_t lastScriptPtr)
|
|||
g_skipBranch = 1;
|
||||
C_ReportError(-1);
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: malformed `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
Printf("%s:%d: warning: malformed `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
VM_GetKeywordForID(*(g_scriptPtr) & VM_INSTMASK));
|
||||
return 1;
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ static int32_t C_CheckEmptyBranch(int32_t tw, intptr_t lastScriptPtr)
|
|||
C_ReportError(-1);
|
||||
g_warningCnt++;
|
||||
g_scriptPtr = lastScriptPtr + &apScript[0];
|
||||
initprintf("%s:%d: warning: empty `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
Printf("%s:%d: warning: empty `%s' branch\n",g_scriptFileName,g_lineNumber,
|
||||
VM_GetKeywordForID(*(g_scriptPtr) & VM_INSTMASK));
|
||||
*(g_scriptPtr) = (CON_NULLOP + (IFELSE_MAGIC<<12));
|
||||
return 1;
|
||||
|
@ -960,7 +960,7 @@ static void C_Include(const char *confile)
|
|||
if (!fp.isOpen())
|
||||
{
|
||||
g_errorCnt++;
|
||||
initprintf("%s:%d: error: could not find file `%s'.\n",g_scriptFileName,g_lineNumber,confile);
|
||||
Printf("%s:%d: error: could not find file `%s'.\n",g_scriptFileName,g_lineNumber,confile);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -968,7 +968,7 @@ static void C_Include(const char *confile)
|
|||
|
||||
char *mptr = (char *)Xmalloc(j+1);
|
||||
|
||||
initprintf("Including: %s (%d bytes)\n",confile, j);
|
||||
Printf("Including: %s (%d bytes)\n",confile, j);
|
||||
|
||||
fp.Read(mptr, j);
|
||||
fp.Close();
|
||||
|
@ -1124,7 +1124,7 @@ static void scriptUpdateOpcodeForVariableType(intptr_t *ins)
|
|||
{
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
initprintf("%s:%d: %s -> %s for var %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: %s -> %s for var %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(*ins & VM_INSTMASK), VM_GetKeywordForID(opcode), aGameVars[ins[1] & (MAXGAMEVARS-1)].szLabel);
|
||||
}
|
||||
|
||||
|
@ -1179,7 +1179,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
if (EDUKE32_PREDICT_FALSE((j = hash_find(&h_labels,label+(g_labelCnt<<6))) < 0))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: state `%s' not found.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: error: state `%s' not found.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
g_errorCnt++;
|
||||
g_scriptPtr++;
|
||||
continue;
|
||||
|
@ -1189,7 +1189,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
{
|
||||
char *gl = (char *) C_GetLabelType(labeltype[j]);
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: expected state, found %s.\n", g_scriptFileName, g_lineNumber, gl);
|
||||
Printf("%s:%d: warning: expected state, found %s.\n", g_scriptFileName, g_lineNumber, gl);
|
||||
g_warningCnt++;
|
||||
Xfree(gl);
|
||||
*(g_scriptPtr-1) = CON_NULLOP; // get rid of the state, leaving a nullop to satisfy if conditions
|
||||
|
@ -1198,7 +1198,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
}
|
||||
|
||||
if (!(g_errorCnt || g_warningCnt) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: state label `%s'.\n", g_scriptFileName, g_lineNumber, label+(j<<6));
|
||||
Printf("%s:%d: debug: state label `%s'.\n", g_scriptFileName, g_lineNumber, label+(j<<6));
|
||||
*g_scriptPtr = (intptr_t) (apScript+labelcode[j]);
|
||||
|
||||
// 'state' type labels are always script addresses, as far as I can see
|
||||
|
@ -1211,7 +1211,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
if (EDUKE32_PREDICT_FALSE(g_processingState == 0))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `ends' without open `state'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `ends' without open `state'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
}
|
||||
// else
|
||||
|
@ -1307,7 +1307,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
if (EDUKE32_PREDICT_FALSE(labelcode[i] != *(g_scriptPtr-1)))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: ignored redefinition of `%s' to %d (old: %d).\n",g_scriptFileName,
|
||||
Printf("%s:%d: warning: ignored redefinition of `%s' to %d (old: %d).\n",g_scriptFileName,
|
||||
g_lineNumber,label+(g_labelCnt<<6), (int32_t)(*(g_scriptPtr-1)), labelcode[i]);
|
||||
}
|
||||
}
|
||||
|
@ -1347,7 +1347,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
C_ReportError(-1);
|
||||
BITPTR_CLEAR(g_scriptPtr-apScript-1);
|
||||
*(g_scriptPtr-1) = 0;
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
||||
|
@ -1373,7 +1373,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
if (EDUKE32_PREDICT_FALSE((i = hash_find(&h_labels,label+(g_labelCnt<<6))) >= 0))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: duplicate move `%s' ignored.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: warning: duplicate move `%s' ignored.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1415,7 +1415,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: volume number must be between 0 and MAXVOLUMES+1=%d.\n",
|
||||
Printf("%s:%d: error: volume number must be between 0 and MAXVOLUMES+1=%d.\n",
|
||||
g_scriptFileName, g_lineNumber, MAXVOLUMES+1);
|
||||
continue;
|
||||
|
||||
|
@ -1489,7 +1489,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
if (EDUKE32_PREDICT_FALSE(i>=0))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: duplicate ai `%s' ignored.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: warning: duplicate ai `%s' ignored.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1511,7 +1511,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
C_ReportError(-1);
|
||||
BITPTR_CLEAR(g_scriptPtr-apScript-1);
|
||||
*(g_scriptPtr-1) = 0;
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
|
||||
|
@ -1559,7 +1559,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
if (EDUKE32_PREDICT_FALSE(i>=0))
|
||||
{
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: duplicate action `%s' ignored.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: warning: duplicate action `%s' ignored.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1622,7 +1622,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
if (EDUKE32_PREDICT_FALSE(j >= 3))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: invalid useractor type. Must be 0, 1, 2"
|
||||
Printf("%s:%d: warning: invalid useractor type. Must be 0, 1, 2"
|
||||
" (notenemy, enemy, enemystayput).\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
|
@ -1691,7 +1691,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
C_ReportError(-1);
|
||||
BITPTR_CLEAR(g_scriptPtr-apScript-1);
|
||||
*(g_scriptPtr-1) = 0;
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
break;
|
||||
|
@ -1734,7 +1734,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
//AddLog(g_szBuf);
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXEVENTS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: invalid event ID.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: invalid event ID.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
continue;
|
||||
}
|
||||
|
@ -1752,7 +1752,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
{
|
||||
*(g_scriptPtr-1) = 32768;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: tried to set cstat 32767, using 32768 instead.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: tried to set cstat 32767, using 32768 instead.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
else if (EDUKE32_PREDICT_FALSE((*(g_scriptPtr-1) & 48) == 48))
|
||||
|
@ -1760,7 +1760,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
i = *(g_scriptPtr-1);
|
||||
*(g_scriptPtr-1) ^= 48;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: tried to set cstat %d, using %d instead.\n",g_scriptFileName,g_lineNumber,i,(int32_t)(*(g_scriptPtr-1)));
|
||||
Printf("%s:%d: warning: tried to set cstat %d, using %d instead.\n",g_scriptFileName,g_lineNumber,i,(int32_t)(*(g_scriptPtr-1)));
|
||||
g_warningCnt++;
|
||||
}
|
||||
continue;
|
||||
|
@ -1817,7 +1817,7 @@ static int32_t C_ParseCommand(int32_t loop)
|
|||
g_warningCnt++;
|
||||
C_ReportError(-1);
|
||||
|
||||
initprintf("%s:%d: warning: found `else' with no `if'.\n", g_scriptFileName, g_lineNumber);
|
||||
Printf("%s:%d: warning: found `else' with no `if'.\n", g_scriptFileName, g_lineNumber);
|
||||
|
||||
if (C_GetKeyword() == CON_LEFTBRACE)
|
||||
{
|
||||
|
@ -1891,7 +1891,7 @@ setvar:
|
|||
{
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
initprintf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: %s -> %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(*ins & VM_INSTMASK), VM_GetKeywordForID(opcode));
|
||||
}
|
||||
|
||||
|
@ -1929,7 +1929,7 @@ setvar:
|
|||
{
|
||||
if (g_scriptDebug > 1 && !g_errorCnt && !g_warningCnt)
|
||||
{
|
||||
initprintf("%s:%d: replacing %s with %s\n", g_scriptFileName, g_lineNumber,
|
||||
Printf("%s:%d: replacing %s with %s\n", g_scriptFileName, g_lineNumber,
|
||||
VM_GetKeywordForID(*ins & VM_INSTMASK), VM_GetKeywordForID(opcode));
|
||||
}
|
||||
|
||||
|
@ -2039,7 +2039,7 @@ ifvar:
|
|||
{
|
||||
C_ReportError(-1);
|
||||
*(g_scriptPtr-1) = 0;
|
||||
initprintf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a move, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
g_warningCnt++;
|
||||
}
|
||||
break;
|
||||
|
@ -2163,7 +2163,7 @@ ifvar:
|
|||
if ((*(g_scriptPtr-2)>>12) == (IFELSE_MAGIC) &&
|
||||
((*(g_scriptPtr-2) & VM_INSTMASK) == CON_LEFTBRACE)) // rewrite "{ }" into "nullop"
|
||||
{
|
||||
// initprintf("%s:%d: rewriting empty braces '{ }' as 'nullop' from right\n",g_szScriptFileName,g_lineNumber);
|
||||
// Printf("%s:%d: rewriting empty braces '{ }' as 'nullop' from right\n",g_szScriptFileName,g_lineNumber);
|
||||
*(g_scriptPtr-2) = CON_NULLOP + (IFELSE_MAGIC<<12);
|
||||
g_scriptPtr -= 2;
|
||||
|
||||
|
@ -2182,7 +2182,7 @@ ifvar:
|
|||
if (EDUKE32_PREDICT_FALSE(g_numBraces < 0))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found more `}' than `{'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found more `}' than `{'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
}
|
||||
|
||||
|
@ -2208,7 +2208,7 @@ ifvar:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXVOLUMES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: volume number exceeds maximum volume count.\n",
|
||||
Printf("%s:%d: error: volume number exceeds maximum volume count.\n",
|
||||
g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
C_NextLine();
|
||||
|
@ -2232,7 +2232,7 @@ ifvar:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXSKILLS))
|
||||
{
|
||||
initprintf("%s:%d: error: skill number exceeds maximum skill count %d.\n",
|
||||
Printf("%s:%d: error: skill number exceeds maximum skill count %d.\n",
|
||||
g_scriptFileName,g_lineNumber, MAXSKILLS);
|
||||
g_errorCnt++;
|
||||
C_NextLine();
|
||||
|
@ -2262,14 +2262,14 @@ ifvar:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)j > MAXVOLUMES-1))
|
||||
{
|
||||
initprintf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: volume number exceeds maximum volume count.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
C_NextLine();
|
||||
continue;
|
||||
}
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)k > MAXLEVELS-1))
|
||||
{
|
||||
initprintf("%s:%d: error: level number exceeds maximum number of levels per episode.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: level number exceeds maximum number of levels per episode.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
C_NextLine();
|
||||
continue;
|
||||
|
@ -2285,7 +2285,7 @@ ifvar:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= BMAX_PATH))
|
||||
{
|
||||
initprintf("%s:%d: error: level file name exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,BMAX_PATH);
|
||||
Printf("%s:%d: error: level file name exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,BMAX_PATH);
|
||||
g_errorCnt++;
|
||||
C_SkipSpace();
|
||||
break;
|
||||
|
@ -2324,7 +2324,7 @@ ifvar:
|
|||
textptr++,i++;
|
||||
if (EDUKE32_PREDICT_FALSE(i >= 32))
|
||||
{
|
||||
initprintf("%s:%d: warning: truncating level name to %d characters.\n",
|
||||
Printf("%s:%d: warning: truncating level name to %d characters.\n",
|
||||
g_scriptFileName,g_lineNumber,32);
|
||||
g_warningCnt++;
|
||||
C_NextLine();
|
||||
|
@ -2348,7 +2348,7 @@ ifvar:
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)k >= MAXQUOTES))
|
||||
{
|
||||
initprintf("%s:%d: error: quote number exceeds limit of %d.\n",g_scriptFileName,g_lineNumber,MAXQUOTES);
|
||||
Printf("%s:%d: error: quote number exceeds limit of %d.\n",g_scriptFileName,g_lineNumber,MAXQUOTES);
|
||||
g_errorCnt++;
|
||||
}
|
||||
else
|
||||
|
@ -2386,13 +2386,13 @@ ifvar:
|
|||
k = g_scriptPtr[-1];
|
||||
if ((unsigned)k >= MAXSOUNDS - 1)
|
||||
{
|
||||
initprintf("%s:%d: error: sound index exceeds limit of %d.\n", g_scriptFileName, g_lineNumber, MAXSOUNDS - 1);
|
||||
Printf("%s:%d: error: sound index exceeds limit of %d.\n", g_scriptFileName, g_lineNumber, MAXSOUNDS - 1);
|
||||
g_errorCnt++;
|
||||
k = MAXSOUNDS - 1;
|
||||
}
|
||||
/*else if (g_sounds[k].filename != NULL)
|
||||
{
|
||||
initprintf("%s:%d: warning: sound %d already defined (%s)\n", g_scriptFileName, g_lineNumber, k, g_sounds[k].filename);
|
||||
Printf("%s:%d: warning: sound %d already defined (%s)\n", g_scriptFileName, g_lineNumber, k, g_sounds[k].filename);
|
||||
g_warningCnt++;
|
||||
}*/
|
||||
|
||||
|
@ -2441,7 +2441,7 @@ ifvar:
|
|||
if (EDUKE32_PREDICT_FALSE(!g_scriptEventOffset))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `endevent' without open `onevent'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `endevent' without open `onevent'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
}
|
||||
if (EDUKE32_PREDICT_FALSE(g_numBraces != 0))
|
||||
|
@ -2459,7 +2459,7 @@ ifvar:
|
|||
if (EDUKE32_PREDICT_FALSE(!g_parsingActorPtr || g_scriptEventOffset))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: found `enda' without open `actor'.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: found `enda' without open `actor'.\n",g_scriptFileName,g_lineNumber);
|
||||
g_errorCnt++;
|
||||
g_scriptEventOffset = 0;
|
||||
}
|
||||
|
@ -2518,7 +2518,7 @@ ifvar:
|
|||
{
|
||||
C_ReportError(-1);
|
||||
g_warningCnt++;
|
||||
initprintf("%s:%d: warning: `nullop' found without `else'\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: `nullop' found without `else'\n",g_scriptFileName,g_lineNumber);
|
||||
g_scriptPtr--;
|
||||
g_skipBranch = 1;
|
||||
}
|
||||
|
@ -2616,7 +2616,7 @@ static char const * C_ScriptVersionString(int32_t version)
|
|||
|
||||
void C_PrintStats(void)
|
||||
{
|
||||
initprintf("%d/%d labels\n", g_labelCnt,
|
||||
Printf("%d/%d labels\n", g_labelCnt,
|
||||
(int32_t) min((MAXSECTORS * sizeof(sectortype)/sizeof(int32_t)),
|
||||
MAXSPRITES * sizeof(spritetype)/(1<<6)));
|
||||
|
||||
|
@ -2627,9 +2627,9 @@ void C_PrintStats(void)
|
|||
if (g_tile[i].execPtr)
|
||||
j++;
|
||||
}
|
||||
if (j) initprintf("%d actors", j);
|
||||
if (j) Printf("%d actors", j);
|
||||
|
||||
initprintf("\n");
|
||||
Printf("\n");
|
||||
}
|
||||
|
||||
void C_Compile(const char *fileName)
|
||||
|
@ -2658,7 +2658,7 @@ void C_Compile(const char *fileName)
|
|||
|
||||
int const kFileLen = kFile.GetLength();
|
||||
|
||||
initprintf("Compiling: %s (%d bytes)\n", fileName, kFileLen);
|
||||
Printf("Compiling: %s (%d bytes)\n", fileName, kFileLen);
|
||||
|
||||
uint32_t const startcompiletime = timerGetTicks();
|
||||
|
||||
|
@ -2676,7 +2676,7 @@ void C_Compile(const char *fileName)
|
|||
|
||||
apScript = (intptr_t *)Xcalloc(1, g_scriptSize * sizeof(intptr_t));
|
||||
bitptr = (char *)Xcalloc(1, (((g_scriptSize + 7) >> 3) + 1) * sizeof(uint8_t));
|
||||
// initprintf("script: %d, bitptr: %d\n",script,bitptr);
|
||||
// Printf("script: %d, bitptr: %d\n",script,bitptr);
|
||||
|
||||
g_labelCnt = 0;
|
||||
g_defaultLabelCnt = 0;
|
||||
|
@ -2697,14 +2697,14 @@ void C_Compile(const char *fileName)
|
|||
userConfig.AddCons.reset();
|
||||
|
||||
if (g_errorCnt > 63)
|
||||
initprintf("fatal error: too many errors: Aborted\n");
|
||||
Printf("fatal error: too many errors: Aborted\n");
|
||||
|
||||
//*script = (intptr_t) g_scriptPtr;
|
||||
|
||||
DO_FREE_AND_NULL(mptr);
|
||||
|
||||
if (g_warningCnt || g_errorCnt)
|
||||
initprintf("Found %d warning(s), %d error(s).\n", g_warningCnt, g_errorCnt);
|
||||
Printf("Found %d warning(s), %d error(s).\n", g_warningCnt, g_errorCnt);
|
||||
|
||||
if (g_errorCnt)
|
||||
{
|
||||
|
@ -2716,7 +2716,7 @@ void C_Compile(const char *fileName)
|
|||
|
||||
C_SetScriptSize(g_scriptPtr-apScript+8);
|
||||
|
||||
initprintf("Script compiled in %dms, %ld bytes%s\n", timerGetTicks() - startcompiletime,
|
||||
Printf("Script compiled in %dms, %ld bytes%s\n", timerGetTicks() - startcompiletime,
|
||||
(unsigned long)(g_scriptPtr-apScript), C_ScriptVersionString(g_scriptVersion));
|
||||
|
||||
for (auto *i : tables_free)
|
||||
|
@ -2736,56 +2736,56 @@ void C_ReportError(int32_t iError)
|
|||
if (Bstrcmp(g_szCurrentBlockName,g_szLastBlockName))
|
||||
{
|
||||
if (g_scriptEventOffset || g_processingState || g_parsingActorPtr)
|
||||
initprintf("%s: In %s `%s':\n",g_scriptFileName,g_scriptEventOffset?"event":g_parsingActorPtr?"actor":"state",g_szCurrentBlockName);
|
||||
else initprintf("%s: At top level:\n",g_scriptFileName);
|
||||
Printf("%s: In %s `%s':\n",g_scriptFileName,g_scriptEventOffset?"event":g_parsingActorPtr?"actor":"state",g_szCurrentBlockName);
|
||||
else Printf("%s: At top level:\n",g_scriptFileName);
|
||||
Bstrcpy(g_szLastBlockName,g_szCurrentBlockName);
|
||||
}
|
||||
switch (iError)
|
||||
{
|
||||
case ERROR_CLOSEBRACKET:
|
||||
initprintf("%s:%d: error: found more `}' than `{' before `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: found more `}' than `{' before `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_EXCEEDSMAXTILES:
|
||||
initprintf("%s:%d: error: `%s' value exceeds MAXTILES. Maximum is %d.\n",g_scriptFileName,g_lineNumber,tempbuf,MAXTILES-1);
|
||||
Printf("%s:%d: error: `%s' value exceeds MAXTILES. Maximum is %d.\n",g_scriptFileName,g_lineNumber,tempbuf,MAXTILES-1);
|
||||
break;
|
||||
case ERROR_EXPECTEDKEYWORD:
|
||||
initprintf("%s:%d: error: expected a keyword but found `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: expected a keyword but found `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_FOUNDWITHIN:
|
||||
initprintf("%s:%d: error: found `%s' within %s.\n",g_scriptFileName,g_lineNumber,tempbuf,g_parsingActorPtr?"an actor":"a state");
|
||||
Printf("%s:%d: error: found `%s' within %s.\n",g_scriptFileName,g_lineNumber,tempbuf,g_parsingActorPtr?"an actor":"a state");
|
||||
break;
|
||||
case ERROR_ISAKEYWORD:
|
||||
initprintf("%s:%d: error: symbol `%s' is a keyword.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: error: symbol `%s' is a keyword.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
break;
|
||||
case ERROR_OPENBRACKET:
|
||||
initprintf("%s:%d: error: found more `{' than `}' before `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: found more `{' than `}' before `%s'.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_NOTAGAMEVAR:
|
||||
initprintf("%s:%d: error: symbol `%s' is not a variable.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: symbol `%s' is not a variable.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_PARAMUNDEFINED:
|
||||
initprintf("%s:%d: error: parameter `%s' is undefined.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
Printf("%s:%d: error: parameter `%s' is undefined.\n",g_scriptFileName,g_lineNumber,tempbuf);
|
||||
break;
|
||||
case ERROR_SYNTAXERROR:
|
||||
initprintf("%s:%d: error: syntax error.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: syntax error.\n",g_scriptFileName,g_lineNumber);
|
||||
break;
|
||||
case ERROR_VARREADONLY:
|
||||
initprintf("%s:%d: error: variable `%s' is read-only.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: variable `%s' is read-only.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case ERROR_VARTYPEMISMATCH:
|
||||
initprintf("%s:%d: error: variable `%s' is of the wrong type.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: error: variable `%s' is of the wrong type.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case WARNING_BADGAMEVAR:
|
||||
initprintf("%s:%d: warning: variable `%s' should be either per-player OR per-actor, not both.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: variable `%s' should be either per-player OR per-actor, not both.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case WARNING_DUPLICATEDEFINITION:
|
||||
initprintf("%s:%d: warning: duplicate definition `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
Printf("%s:%d: warning: duplicate definition `%s' ignored.\n",g_scriptFileName,g_lineNumber,LAST_LABEL);
|
||||
break;
|
||||
case WARNING_LABELSONLY:
|
||||
initprintf("%s:%d: warning: expected a label, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: warning: expected a label, found a constant.\n",g_scriptFileName,g_lineNumber);
|
||||
break;
|
||||
case WARNING_VARMASKSKEYWORD:
|
||||
initprintf("%s:%d: warning: variable `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
Printf("%s:%d: warning: variable `%s' masks keyword.\n", g_scriptFileName, g_lineNumber, LAST_LABEL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ enum
|
|||
do \
|
||||
{ \
|
||||
C_ReportError(-1); \
|
||||
initprintf("%s:%d: error: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
Printf("%s:%d: error: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
g_errorCnt++; \
|
||||
} while (0)
|
||||
|
||||
|
@ -63,7 +63,7 @@ enum
|
|||
do \
|
||||
{ \
|
||||
C_ReportError(-1); \
|
||||
initprintf("%s:%d: warning: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
Printf("%s:%d: warning: " Text "\n", g_scriptFileName, g_lineNumber, ##__VA_ARGS__); \
|
||||
g_warningCnt++; \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -91,30 +91,30 @@ void VM_ScriptInfo(intptr_t const *ptr, int range)
|
|||
|
||||
if (ptr)
|
||||
{
|
||||
initprintf("\n");
|
||||
Printf("\n");
|
||||
|
||||
for (auto pScript = max<intptr_t const *>(ptr - (range >> 1), apScript),
|
||||
p_end = min<intptr_t const *>(ptr + (range >> 1), apScript + g_scriptSize);
|
||||
pScript < p_end;
|
||||
++pScript)
|
||||
{
|
||||
initprintf("%5d: %3d: ", (int32_t)(pScript - apScript), (int32_t)(pScript - ptr));
|
||||
Printf("%5d: %3d: ", (int32_t)(pScript - apScript), (int32_t)(pScript - ptr));
|
||||
|
||||
if (*pScript >> 12 && (*pScript & VM_INSTMASK) < CON_END)
|
||||
initprintf("%5d %s\n", (int32_t)(*pScript >> 12), VM_GetKeywordForID(*pScript & VM_INSTMASK));
|
||||
Printf("%5d %s\n", (int32_t)(*pScript >> 12), VM_GetKeywordForID(*pScript & VM_INSTMASK));
|
||||
else
|
||||
initprintf("%d\n", (int32_t)*pScript);
|
||||
Printf("%d\n", (int32_t)*pScript);
|
||||
}
|
||||
|
||||
initprintf("\n");
|
||||
Printf("\n");
|
||||
}
|
||||
|
||||
if (ptr == insptr)
|
||||
{
|
||||
if (vm.pUSprite)
|
||||
initprintf("current actor: %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
Printf("current actor: %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
|
||||
initprintf("g_errorLineNum: %d, g_tw: %d\n", g_errorLineNum, g_tw);
|
||||
Printf("g_errorLineNum: %d, g_tw: %d\n", g_errorLineNum, g_tw);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ int32_t __fastcall G_GetAngleDelta(int32_t currAngle, int32_t newAngle)
|
|||
|
||||
if (klabs(currAngle-newAngle) < 1024)
|
||||
{
|
||||
// OSD_Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
// Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
return newAngle-currAngle;
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ int32_t __fastcall G_GetAngleDelta(int32_t currAngle, int32_t newAngle)
|
|||
if (currAngle > 1024)
|
||||
currAngle -= 2048;
|
||||
|
||||
// OSD_Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
// Printf("G_GetAngleDelta() returning %d\n",na-a);
|
||||
return newAngle-currAngle;
|
||||
}
|
||||
|
||||
|
@ -501,7 +501,7 @@ GAMEEXEC_STATIC void VM_AlterAng(int32_t const moveFlags)
|
|||
|
||||
{
|
||||
AC_MOVE_ID(vm.pData) = 0;
|
||||
OSD_Printf(OSD_ERROR "bad moveptr for actor %d (%d)!\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
Printf(OSD_ERROR "bad moveptr for actor %d (%d)!\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -708,7 +708,7 @@ GAMEEXEC_STATIC void VM_Move(void)
|
|||
if (EDUKE32_PREDICT_FALSE((unsigned)AC_MOVE_ID(vm.pData) >= (unsigned)g_scriptSize-1))
|
||||
{
|
||||
AC_MOVE_ID(vm.pData) = 0;
|
||||
OSD_Printf(OSD_ERROR "clearing bad moveptr for actor %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
Printf(OSD_ERROR "clearing bad moveptr for actor %d (%d)\n", vm.spriteNum, vm.pUSprite->picnum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1222,7 +1222,7 @@ void G_GetTimeDate(int32_t * const pValues)
|
|||
time(&timeStruct);
|
||||
struct tm *pTime = localtime(&timeStruct);
|
||||
|
||||
// initprintf("Time&date: %s\n",asctime (ti));
|
||||
// Printf("Time&date: %s\n",asctime (ti));
|
||||
|
||||
pValues[0] = pTime->tm_sec;
|
||||
pValues[1] = pTime->tm_min;
|
||||
|
@ -2817,7 +2817,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
Bstrcat(tempbuf, szBuf);
|
||||
Bsprintf(szBuf, " =%d\n", Gv_GetVar(lVarID) * m);
|
||||
Bstrcat(tempbuf, szBuf);
|
||||
initprintf(OSDTEXT_GREEN "%s", tempbuf);
|
||||
Printf(OSDTEXT_GREEN "%s", tempbuf);
|
||||
insptr++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ int32_t __fastcall G_GetAngleDelta(int32_t currAngle, int32_t newAngle);
|
|||
//void G_SaveMapState();
|
||||
|
||||
#define CON_ERRPRINTF(Text, ...) do { \
|
||||
OSD_Printf("Line %d, %s: " Text, g_errorLineNum, VM_GetKeywordForID(g_tw), ## __VA_ARGS__); \
|
||||
Printf("Line %d, %s: " Text, g_errorLineNum, VM_GetKeywordForID(g_tw), ## __VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define CON_CRITICALERRPRINTF(Text, ...) do { \
|
||||
|
|
|
@ -96,7 +96,7 @@ int Gv_ReadSave(FileReader &kFile)
|
|||
char tbuf[12];
|
||||
|
||||
if (kFile.Read(tbuf, 12)!=12) goto corrupt;
|
||||
if (Bmemcmp(tbuf, "BEG: EDuke32", 12)) { OSD_Printf("BEG ERR\n"); return 2; }
|
||||
if (Bmemcmp(tbuf, "BEG: EDuke32", 12)) { Printf("BEG ERR\n"); return 2; }
|
||||
|
||||
Gv_Free(); // nuke 'em from orbit, it's the only way to be sure...
|
||||
|
||||
|
@ -164,7 +164,7 @@ int Gv_ReadSave(FileReader &kFile)
|
|||
}
|
||||
|
||||
if (kFile.Read(tbuf, 12) != 12) return -13;
|
||||
if (Bmemcmp(tbuf, "EOF: EDuke32", 12)) { OSD_Printf("EOF ERR\n"); return 2; }
|
||||
if (Bmemcmp(tbuf, "EOF: EDuke32", 12)) { Printf("EOF ERR\n"); return 2; }
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -275,7 +275,7 @@ void Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: too many gamevars!\n",g_scriptFileName,g_lineNumber);
|
||||
Printf("%s:%d: error: too many gamevars!\n",g_scriptFileName,g_lineNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ void Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
{
|
||||
g_errorCnt++;
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: error: variable name `%s' exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,pszLabel, MAXVARLABEL);
|
||||
Printf("%s:%d: error: variable name `%s' exceeds limit of %d characters.\n",g_scriptFileName,g_lineNumber,pszLabel, MAXVARLABEL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,7 @@ void Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags)
|
|||
if (EDUKE32_PREDICT_FALSE(aGameVars[gV].flags & (GAMEVAR_PTR_MASK)))
|
||||
{
|
||||
C_ReportError(-1);
|
||||
initprintf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
Printf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",g_scriptFileName,g_lineNumber,label+(g_labelCnt<<6));
|
||||
return;
|
||||
}
|
||||
else if (EDUKE32_PREDICT_FALSE(!(aGameVars[gV].flags & GAMEVAR_SYSTEM)))
|
||||
|
@ -368,7 +368,7 @@ static int Gv_GetVarIndex(const char *szGameLabel)
|
|||
|
||||
if (EDUKE32_PREDICT_FALSE((unsigned)gameVar >= MAXGAMEVARS))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Gv_GetVarIndex(): INTERNAL ERROR: couldn't find gamevar %s!\n", szGameLabel);
|
||||
Printf(OSD_ERROR "Gv_GetVarIndex(): INTERNAL ERROR: couldn't find gamevar %s!\n", szGameLabel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2899,7 +2899,7 @@ void G_ProcessDynamicTileMapping(const char *szLabel, int32_t lValue)
|
|||
struct dynitem *di = &g_dynTileList[i];
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (g_scriptDebug && di->staticval != lValue)
|
||||
OSD_Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
#endif
|
||||
*di->dynvalptr = lValue;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ void Net_SyncPlayer(ENetEvent *event)
|
|||
if (numplayers + g_netPlayersWaiting >= MAXPLAYERS)
|
||||
{
|
||||
enet_peer_disconnect_later(event->peer, DISC_SERVER_FULL);
|
||||
initprintf("Refused peer; server full.\n");
|
||||
Printf("Refused peer; server full.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2130,7 +2130,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng)
|
|||
//{
|
||||
//lastpackettime = totalclock;
|
||||
#if 0
|
||||
initprintf("RECEIVED PACKET: type: %d : len %d\n", packbuf[0], packbufleng);
|
||||
Printf("RECEIVED PACKET: type: %d : len %d\n", packbuf[0], packbufleng);
|
||||
#endif
|
||||
switch (packbuf[0])
|
||||
{
|
||||
|
@ -2342,7 +2342,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng)
|
|||
Net_GetSyncInfoFromPacket(packbuf, packbufleng, &j, other);
|
||||
|
||||
if (j > packbufleng)
|
||||
initprintf("INVALID GAME PACKET!!! (packet %d, %d too many bytes (%d %d))\n",packbuf[0],j-packbufleng,packbufleng,k);
|
||||
Printf("INVALID GAME PACKET!!! (packet %d, %d too many bytes (%d %d))\n",packbuf[0],j-packbufleng,packbufleng,k);
|
||||
|
||||
break;
|
||||
case PACKET_TYPE_NULL_PACKET:
|
||||
|
@ -2350,7 +2350,7 @@ void Net_ParsePacket(uint8_t *packbuf, int packbufleng)
|
|||
|
||||
case PACKET_TYPE_PLAYER_READY:
|
||||
if (g_player[other].playerreadyflag == 0)
|
||||
initprintf("Player %d is ready\n", other);
|
||||
Printf("Player %d is ready\n", other);
|
||||
g_player[other].playerreadyflag++;
|
||||
return;
|
||||
//case PACKET_TYPE_QUIT:
|
||||
|
@ -2378,7 +2378,7 @@ void Net_Connect(const char *srvaddr)
|
|||
|
||||
if (g_netClient == NULL)
|
||||
{
|
||||
initprintf("An error occurred while trying to create an ENet client host.\n");
|
||||
Printf("An error occurred while trying to create an ENet client host.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2391,7 +2391,7 @@ void Net_Connect(const char *srvaddr)
|
|||
|
||||
if (g_netClientPeer == NULL)
|
||||
{
|
||||
initprintf("No available peers for initiating an ENet connection.\n");
|
||||
Printf("No available peers for initiating an ENet connection.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2401,7 +2401,7 @@ void Net_Connect(const char *srvaddr)
|
|||
if (enet_host_service(g_netClient, & event, 5000) > 0 &&
|
||||
event.type == ENET_EVENT_TYPE_CONNECT)
|
||||
{
|
||||
initprintf("Connection to %s:%d succeeded.\n", oursrvaddr, address.port);
|
||||
Printf("Connection to %s:%d succeeded.\n", oursrvaddr, address.port);
|
||||
Xfree(oursrvaddr);
|
||||
return;
|
||||
}
|
||||
|
@ -2411,9 +2411,9 @@ void Net_Connect(const char *srvaddr)
|
|||
/* received. Reset the peer in the event the 5 seconds */
|
||||
/* had run out without any significant event. */
|
||||
enet_peer_reset(g_netClientPeer);
|
||||
initprintf("Connection to %s:%d failed.\n", oursrvaddr, address.port);
|
||||
Printf("Connection to %s:%d failed.\n", oursrvaddr, address.port);
|
||||
}
|
||||
initprintf(i ? "Retrying...\n" : "Giving up connection attempt.\n");
|
||||
Printf(i ? "Retrying...\n" : "Giving up connection attempt.\n");
|
||||
}
|
||||
|
||||
Xfree(oursrvaddr);
|
||||
|
@ -2496,31 +2496,31 @@ void Net_ReceiveDisconnect(ENetEvent *event)
|
|||
switch (event->data)
|
||||
{
|
||||
case DISC_GAME_STARTED:
|
||||
initprintf("Game already started.\n");
|
||||
Printf("Game already started.\n");
|
||||
return;
|
||||
case DISC_BAD_PASSWORD:
|
||||
initprintf("Bad password.\n");
|
||||
Printf("Bad password.\n");
|
||||
return;
|
||||
case DISC_VERSION_MISMATCH:
|
||||
initprintf("Version mismatch.\n");
|
||||
Printf("Version mismatch.\n");
|
||||
return;
|
||||
case DISC_INVALID:
|
||||
initprintf("Invalid data detected.\n");
|
||||
Printf("Invalid data detected.\n");
|
||||
return;
|
||||
case DISC_SERVER_QUIT:
|
||||
initprintf("The server is quitting.\n");
|
||||
Printf("The server is quitting.\n");
|
||||
return;
|
||||
case DISC_SERVER_FULL:
|
||||
initprintf("The server is full.\n");
|
||||
Printf("The server is full.\n");
|
||||
return;
|
||||
case DISC_KICKED:
|
||||
initprintf("You have been kicked from the server.\n");
|
||||
Printf("You have been kicked from the server.\n");
|
||||
return;
|
||||
case DISC_BANNED:
|
||||
initprintf("You are banned from this server.\n");
|
||||
Printf("You are banned from this server.\n");
|
||||
return;
|
||||
default:
|
||||
initprintf("Disconnected.\n");
|
||||
Printf("Disconnected.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2584,7 +2584,7 @@ void Net_HandleClientPackets(void)
|
|||
|
||||
enet_address_get_host_ip(&event.peer->address, ipaddr, sizeof(ipaddr));
|
||||
|
||||
initprintf("A new client connected from %s:%u.\n", ipaddr, event.peer->address.port);
|
||||
Printf("A new client connected from %s:%u.\n", ipaddr, event.peer->address.port);
|
||||
|
||||
Net_SendAcknowledge(event.peer);
|
||||
break;
|
||||
|
@ -2592,7 +2592,7 @@ void Net_HandleClientPackets(void)
|
|||
|
||||
case ENET_EVENT_TYPE_RECEIVE:
|
||||
/*
|
||||
initprintf ("A packet of length %u containing %s was received from player %d on channel %u.\n",
|
||||
Printf ("A packet of length %u containing %s was received from player %d on channel %u.\n",
|
||||
event.packet -> dataLength,
|
||||
event.packet -> data,
|
||||
event.peer -> data,
|
||||
|
@ -2633,7 +2633,7 @@ void Net_HandleClientPackets(void)
|
|||
enet_host_broadcast(g_netServer, CHAN_GAMESTATE,
|
||||
enet_packet_create(packbuf, 6, ENET_PACKET_FLAG_RELIABLE));
|
||||
|
||||
initprintf("%s disconnected.\n", g_player[playeridx].user_name);
|
||||
Printf("%s disconnected.\n", g_player[playeridx].user_name);
|
||||
event.peer->data = NULL;
|
||||
break;
|
||||
|
||||
|
@ -2744,7 +2744,7 @@ void Net_ParseClientPacket(ENetEvent *event)
|
|||
}
|
||||
|
||||
#if 0
|
||||
initprintf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
Printf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2762,7 +2762,7 @@ void Net_ParseServerPacket(ENetEvent *event)
|
|||
--packbufleng; // int32_t other = pbuf[--packbufleng];
|
||||
|
||||
#if 0
|
||||
initprintf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
Printf("Received Packet: type: %d : len %d\n", pbuf[0], packbufleng);
|
||||
#endif
|
||||
switch (pbuf[0])
|
||||
{
|
||||
|
@ -2954,20 +2954,20 @@ void Net_ReceiveChallenge(uint8_t *pbuf, int32_t packbufleng, ENetEvent *event)
|
|||
if (g_player[myconnectindex].ps->gm&MODE_GAME)
|
||||
{
|
||||
enet_peer_disconnect_later(event->peer, DISC_GAME_STARTED);
|
||||
initprintf("Client attempted to connect to started game\n");
|
||||
Printf("Client attempted to connect to started game\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (byteVersion != BYTEVERSION || netVersion != NETVERSION)
|
||||
{
|
||||
enet_peer_disconnect_later(event->peer, DISC_VERSION_MISMATCH);
|
||||
initprintf("Bad client protocol: version %u.%u\n", byteVersion, netVersion);
|
||||
Printf("Bad client protocol: version %u.%u\n", byteVersion, netVersion);
|
||||
return;
|
||||
}
|
||||
if (crc != Bcrc32((uint8_t *)g_netPassword, Bstrlen(g_netPassword), 0))
|
||||
{
|
||||
enet_peer_disconnect_later(event->peer, DISC_BAD_PASSWORD);
|
||||
initprintf("Bad password from client.\n");
|
||||
Printf("Bad password from client.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3696,8 +3696,8 @@ void Net_InitNetwork()
|
|||
g_netServer = enet_host_create(&address, MAXPLAYERS, CHAN_MAX, 0, 0);
|
||||
|
||||
if (g_netServer == NULL)
|
||||
initprintf("An error occurred while trying to create an ENet server host.\n");
|
||||
else initprintf("Multiplayer server initialized\n");
|
||||
Printf("An error occurred while trying to create an ENet server host.\n");
|
||||
else Printf("Multiplayer server initialized\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3721,11 +3721,11 @@ int osdcmd_listplayers(osdcmdptr_t parm)
|
|||
|
||||
if (!g_netServer)
|
||||
{
|
||||
initprintf("You are not the server.\n");
|
||||
Printf("You are not the server.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
initprintf("Connected clients:\n");
|
||||
Printf("Connected clients:\n");
|
||||
|
||||
for (currentPeer = g_netServer->peers;
|
||||
currentPeer < &g_netServer->peers[g_netServer->peerCount];
|
||||
|
@ -3735,7 +3735,7 @@ int osdcmd_listplayers(osdcmdptr_t parm)
|
|||
continue;
|
||||
|
||||
enet_address_get_host_ip(¤tPeer->address, ipaddr, sizeof(ipaddr));
|
||||
initprintf("%s %s\n", ipaddr,
|
||||
Printf("%s %s\n", ipaddr,
|
||||
g_player[(intptr_t)currentPeer->data].user_name);
|
||||
}
|
||||
|
||||
|
@ -3753,7 +3753,7 @@ static int osdcmd_kick(osdcmdptr_t parm)
|
|||
|
||||
if (!g_netServer)
|
||||
{
|
||||
initprintf("You are not the server.\n");
|
||||
Printf("You are not the server.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -3768,14 +3768,14 @@ static int osdcmd_kick(osdcmdptr_t parm)
|
|||
|
||||
if (currentPeer->address.host == hexaddr)
|
||||
{
|
||||
initprintf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
Printf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
g_player[(intptr_t)currentPeer->data].user_name);
|
||||
enet_peer_disconnect(currentPeer, DISC_KICKED);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
initprintf("Player %s not found!\n", parm->parms[0]);
|
||||
Printf("Player %s not found!\n", parm->parms[0]);
|
||||
osdcmd_listplayers(NULL);
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
@ -3791,7 +3791,7 @@ static int osdcmd_kickban(osdcmdptr_t parm)
|
|||
|
||||
if (!g_netServer)
|
||||
{
|
||||
initprintf("You are not the server.\n");
|
||||
Printf("You are not the server.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -3811,15 +3811,15 @@ static int osdcmd_kickban(osdcmdptr_t parm)
|
|||
char ipaddr[32];
|
||||
|
||||
enet_address_get_host_ip(¤tPeer->address, ipaddr, sizeof(ipaddr));
|
||||
initprintf("Host %s is now banned.\n", ipaddr);
|
||||
initprintf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
Printf("Host %s is now banned.\n", ipaddr);
|
||||
Printf("Kicking %x (%s)\n", currentPeer->address.host,
|
||||
g_player[(intptr_t)currentPeer->data].user_name);
|
||||
enet_peer_disconnect(currentPeer, DISC_BANNED);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
initprintf("Player %s not found!\n", parm->parms[0]);
|
||||
Printf("Player %s not found!\n", parm->parms[0]);
|
||||
osdcmd_listplayers(NULL);
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
|
|
@ -79,7 +79,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
|
||||
if (!fileSystem.Lookup(mapname, "MAP"))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
}
|
||||
if (VOLUMEONE)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Cannot use user maps in shareware.\n");
|
||||
Printf(OSD_ERROR "Cannot use user maps in shareware.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
// Treat as user map
|
||||
|
@ -151,13 +151,13 @@ static int osdcmd_demo(osdcmdptr_t parm)
|
|||
{
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
if (g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
{
|
||||
OSD_Printf("demo: Must not be in a game.\n");
|
||||
Printf("demo: Must not be in a game.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ static int osdcmd_activatecheat(osdcmdptr_t parm)
|
|||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
osdcmd_cheatsinfo_stat.cheatnum = Batoi(parm->parms[0]);
|
||||
else
|
||||
OSD_Printf("activatecheat: Not in a single-player game.\n");
|
||||
Printf("activatecheat: Not in a single-player game.\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ static int osdcmd_god(osdcmdptr_t UNUSED(parm))
|
|||
if (numplayers == 1 && g_player[myconnectindex].ps->gm & MODE_GAME)
|
||||
osdcmd_cheatsinfo_stat.cheatnum = CHEAT_CORNHOLIO;
|
||||
else
|
||||
OSD_Printf("god: Not in a single-player game.\n");
|
||||
Printf("god: Not in a single-player game.\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ static int osdcmd_noclip(osdcmdptr_t UNUSED(parm))
|
|||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("noclip: Not in a single-player game.\n");
|
||||
Printf("noclip: Not in a single-player game.\n");
|
||||
}
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
@ -235,7 +235,7 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
|
||||
if (numplayers > 1 || !(g_player[myconnectindex].ps->gm & MODE_GAME))
|
||||
{
|
||||
OSD_Printf("spawn: Can't spawn sprites in multiplayer games or demos\n");
|
||||
Printf("spawn: Can't spawn sprites in multiplayer games or demos\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -286,14 +286,14 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
}
|
||||
if (i==g_labelCnt)
|
||||
{
|
||||
OSD_Printf("spawn: Invalid tile label given\n");
|
||||
Printf("spawn: Invalid tile label given\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if ((uint32_t)picnum >= MAXUSERTILES)
|
||||
{
|
||||
OSD_Printf("spawn: Invalid tile number\n");
|
||||
Printf("spawn: Invalid tile number\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -310,7 +310,7 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
{
|
||||
if (setsprite(idx, &vect) < 0)
|
||||
{
|
||||
OSD_Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
A_DeleteSprite(idx);
|
||||
}
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ static int osdcmd_give(osdcmdptr_t parm)
|
|||
if (numplayers != 1 || (g_player[myconnectindex].ps->gm & MODE_GAME) == 0 ||
|
||||
g_player[myconnectindex].ps->dead_flag != 0)
|
||||
{
|
||||
OSD_Printf("give: Cannot give while dead or not in a single-player game.\n");
|
||||
Printf("give: Cannot give while dead or not in a single-player game.\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -420,7 +420,7 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
|
|||
if (!haveac)
|
||||
{
|
||||
haveac = 1;
|
||||
OSD_Printf("\nactor times: tile, total calls, total time [ms], {min,mean,max} time/call [us]\n");
|
||||
Printf("\nactor times: tile, total calls, total time [ms], {min,mean,max} time/call [us]\n");
|
||||
}
|
||||
|
||||
buf[0] = 0;
|
||||
|
@ -436,7 +436,7 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
|
|||
|
||||
if (!buf[0]) Bsprintf(buf, "%d", i);
|
||||
|
||||
OSD_Printf("%17s, %8d, %9.3f, %9.3f, %9.3f, %9.3f,\n",
|
||||
Printf("%17s, %8d, %9.3f, %9.3f, %9.3f, %9.3f,\n",
|
||||
buf, g_actorCalls[i], g_actorTotalMs[i],
|
||||
1000*g_actorMinMs[i],
|
||||
1000*g_actorTotalMs[i]/g_actorCalls[i],
|
||||
|
|
|
@ -1665,7 +1665,7 @@ static void P_FireWeapon(int playerNum)
|
|||
A_PlaySound(PWEAPON(playerNum, pPlayer->curr_weapon, FireSound), pPlayer->i);
|
||||
|
||||
P_SetWeaponGamevars(playerNum, pPlayer);
|
||||
// OSD_Printf("doing %d %d %d\n",PWEAPON(snum, p->curr_weapon, Shoots),p->curr_weapon,snum);
|
||||
// Printf("doing %d %d %d\n",PWEAPON(snum, p->curr_weapon, Shoots),p->curr_weapon,snum);
|
||||
A_Shoot(pPlayer->i, PWEAPON(playerNum, pPlayer->curr_weapon, Shoots));
|
||||
|
||||
for (bssize_t burstFire = PWEAPON(playerNum, pPlayer->curr_weapon, ShotsPerBurst) - 1; burstFire > 0; --burstFire)
|
||||
|
|
|
@ -653,7 +653,7 @@ void G_CacheMapData(void)
|
|||
lpc++;
|
||||
}
|
||||
|
||||
// OSD_Printf("percentage %d lpc %d\n", percentage, lpc);
|
||||
// Printf("percentage %d lpc %d\n", percentage, lpc);
|
||||
}
|
||||
|
||||
tc = (int32_t) totalclock;
|
||||
|
@ -664,7 +664,7 @@ void G_CacheMapData(void)
|
|||
Bmemset(gotpic, 0, sizeof(gotpic));
|
||||
|
||||
endtime = timerGetTicks();
|
||||
OSD_Printf("Cache time: %dms\n", endtime-starttime);
|
||||
Printf("Cache time: %dms\n", endtime-starttime);
|
||||
}
|
||||
|
||||
extern int32_t fragbarheight(void)
|
||||
|
@ -1484,7 +1484,7 @@ static void prelevel(char g)
|
|||
}
|
||||
|
||||
if (missedCloudSectors > 0)
|
||||
OSD_Printf(OSDTEXT_RED "Map warning: have %d unhandled CLOUDYSKIES ceilings.\n", missedCloudSectors);
|
||||
Printf(OSDTEXT_RED "Map warning: have %d unhandled CLOUDYSKIES ceilings.\n", missedCloudSectors);
|
||||
|
||||
// NOTE: must be safe loop because callbacks could delete sprites.
|
||||
if (!DEER)
|
||||
|
@ -2238,7 +2238,7 @@ static int G_TryMapHack(const char *mhkfile)
|
|||
int32_t failure = engineLoadMHK(mhkfile);
|
||||
|
||||
if (!failure)
|
||||
initprintf("Loaded map hack file \"%s\"\n", mhkfile);
|
||||
Printf("Loaded map hack file \"%s\"\n", mhkfile);
|
||||
|
||||
return failure;
|
||||
}
|
||||
|
@ -2318,7 +2318,7 @@ int G_EnterLevel(int gameMode)
|
|||
|
||||
if (mi.fileName.IsEmpty() && !Menu_HaveUserMap())
|
||||
{
|
||||
OSD_Printf(OSDTEXT_RED "Map E%dL%d not defined!\n", ud.volume_number+1, ud.level_number+1);
|
||||
Printf(OSDTEXT_RED "Map E%dL%d not defined!\n", ud.volume_number+1, ud.level_number+1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2338,7 +2338,7 @@ int G_EnterLevel(int gameMode)
|
|||
{
|
||||
if (engineLoadBoard(boardfilename, 0, &pPlayer->pos, &lbang, &pPlayer->cursectnum) < 0)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", boardfilename);
|
||||
Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", boardfilename);
|
||||
return 1;
|
||||
}
|
||||
userMapRecord.name = "";
|
||||
|
@ -2351,7 +2351,7 @@ int G_EnterLevel(int gameMode)
|
|||
}
|
||||
else if (engineLoadBoard(mi.fileName, VOLUMEONE, &pPlayer->pos, &lbang, &pPlayer->cursectnum) < 0)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", mi.fileName.GetChars());
|
||||
Printf(OSD_ERROR "Map \"%s\" not found or invalid map version!\n", mi.fileName.GetChars());
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
@ -2487,11 +2487,11 @@ int G_EnterLevel(int gameMode)
|
|||
|
||||
if (G_HaveUserMap())
|
||||
{
|
||||
OSD_Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_USERMAP"), boardfilename);
|
||||
Printf(OSDTEXT_YELLOW "%s: %s\n", GStrings("TXT_USERMAP"), boardfilename);
|
||||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf(OSDTEXT_YELLOW "E%dL%d: %s\n", ud.volume_number+1, ud.level_number+1,
|
||||
Printf(OSDTEXT_YELLOW "E%dL%d: %s\n", ud.volume_number+1, ud.level_number+1,
|
||||
mapList[mii].DisplayName());
|
||||
}
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ void ghsound_ambientlooppoll(void)
|
|||
{
|
||||
if (dword_AA25C < 0 || dword_AA25C >= MAXSOUNDS)
|
||||
{
|
||||
initprintf("ghsound_ambientlooppoll bad index\n");
|
||||
Printf("ghsound_ambientlooppoll bad index\n");
|
||||
return;
|
||||
}
|
||||
if (!A_CheckSoundPlaying(-1, dword_AA25C))
|
||||
|
@ -679,7 +679,7 @@ void ghsound_preload(int a1)
|
|||
snd = vsi[i];
|
||||
if (snd >= MAXSOUNDS)
|
||||
{
|
||||
initprintf("ERROR: ghsound_preload: sndnum out of range\n");
|
||||
Printf("ERROR: ghsound_preload: sndnum out of range\n");
|
||||
continue;
|
||||
}
|
||||
if (snd > 0 && g_sounds[snd].ptr == NULL)
|
||||
|
@ -851,7 +851,7 @@ void sub_52BA8(void)
|
|||
{
|
||||
if (klabs(sprite[i].z - sector[sect].floorz) > 1024 && sprite[i].z < sector[sect].floorz)
|
||||
{
|
||||
initprintf("NOTICE: deleting floating sprite %i: x=%i, y=%i, z=%i, sect=%i\n", i, sprite[i].pos.x, sprite[i].pos.y, sprite[i].pos.z, sect);
|
||||
Printf("NOTICE: deleting floating sprite %i: x=%i, y=%i, z=%i, sect=%i\n", i, sprite[i].pos.x, sprite[i].pos.y, sprite[i].pos.z, sect);
|
||||
deletesprite(i);
|
||||
sprite[i].picnum = 0;
|
||||
sprite[i].cstat = 0;
|
||||
|
@ -1210,7 +1210,7 @@ void ghtrophy_savebestscores(void)
|
|||
|
||||
if (handle->Write(&bestscore, sizeof(bestscore)) != sizeof(bestscore))
|
||||
{
|
||||
initprintf("ghtrophy_savebestscores: error writing scores\n");
|
||||
Printf("ghtrophy_savebestscores: error writing scores\n");
|
||||
delete handle;
|
||||
return;
|
||||
}
|
||||
|
@ -1229,7 +1229,7 @@ void ghtrophy_loadbestscores(void)
|
|||
}
|
||||
if (handle.Read(&bestscore, sizeof(bestscore)) != sizeof(bestscore))
|
||||
{
|
||||
initprintf("ghtrophy_loadbestscores err read scores\n");
|
||||
Printf("ghtrophy_loadbestscores err read scores\n");
|
||||
memset(&bestscore, 0, sizeof(bestscore));
|
||||
}
|
||||
}
|
||||
|
@ -1362,7 +1362,7 @@ void ghtrophy_rscopysrcdest(scoretype2 *a1, scoretype2 *a2)
|
|||
{
|
||||
if (!a1 || !a2)
|
||||
{
|
||||
initprintf("ghtrophy_rscopysrcdest null ptr\n");
|
||||
Printf("ghtrophy_rscopysrcdest null ptr\n");
|
||||
return;
|
||||
}
|
||||
a2->f_0 = a1->f_0;
|
||||
|
@ -1925,12 +1925,12 @@ void ghrender_movewatersprites(void)
|
|||
spr = f2B8280[i].f_0;
|
||||
if (spr < 0 || spr >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghrender_movewatersprites: bad watersprite sprnum\n");
|
||||
Printf("ghrender_movewatersprites: bad watersprite sprnum\n");
|
||||
continue;
|
||||
}
|
||||
if (dword_AA39C < 0 || dword_AA39C >= 6)
|
||||
{
|
||||
initprintf("ghrender_movewatersprites: currepeat out of range\n");
|
||||
Printf("ghrender_movewatersprites: currepeat out of range\n");
|
||||
continue;
|
||||
}
|
||||
sprite[spr].xrepeat = f2B8280[i].f_2 + byte_AA394[dword_AA39C];
|
||||
|
@ -2128,7 +2128,7 @@ void ghshtgn_fire(short snum)
|
|||
v34--;
|
||||
if (v20 < 0)
|
||||
{
|
||||
initprintf("WARNING: ghshtgn_fire hitsect < 0\n");
|
||||
Printf("WARNING: ghshtgn_fire hitsect < 0\n");
|
||||
return;
|
||||
}
|
||||
sub_51678(v18, v1c, v20, v44, v48, v4c);
|
||||
|
@ -2136,13 +2136,13 @@ void ghshtgn_fire(short snum)
|
|||
{
|
||||
if (sprite[v1c].cstat == 32768)
|
||||
{
|
||||
initprintf("ERROR: hit spr with cstat 32768\n");
|
||||
Printf("ERROR: hit spr with cstat 32768\n");
|
||||
return;
|
||||
}
|
||||
sect = sprite[v1c].sectnum;
|
||||
if (sector[sect].hitag == 2000)
|
||||
{
|
||||
initprintf("ERROR: hit spr in REST_AREA sector\n");
|
||||
Printf("ERROR: hit spr in REST_AREA sector\n");
|
||||
return;
|
||||
}
|
||||
ghtrophy_addkill(v1c);
|
||||
|
@ -2222,12 +2222,12 @@ void ghshtgn_render(short snum)
|
|||
int vdx;
|
||||
if (dword_AA3BC < 0 || dword_AA3BC >= 15)
|
||||
{
|
||||
initprintf("ERROR: ghshtgn_draw bad index\n");
|
||||
Printf("ERROR: ghshtgn_draw bad index\n");
|
||||
return;
|
||||
}
|
||||
if (snum < 0 || snum >= numplayers)
|
||||
{
|
||||
initprintf("ERROR: ghshtgn_render bad index\n");
|
||||
Printf("ERROR: ghshtgn_render bad index\n");
|
||||
return;
|
||||
}
|
||||
DukePlayer_t* p = g_player[snum].ps;
|
||||
|
@ -2253,7 +2253,7 @@ void ghshtgn_render(short snum)
|
|||
}
|
||||
if (dword_AA540 >= 8)
|
||||
{
|
||||
initprintf("ERROR: ghshtgn_render bobcnt out of bounds\n");
|
||||
Printf("ERROR: ghshtgn_render bobcnt out of bounds\n");
|
||||
return;
|
||||
}
|
||||
sub_54D90();
|
||||
|
@ -2377,7 +2377,7 @@ void ghrifle_fire(short snum)
|
|||
}
|
||||
if (v20 < 0)
|
||||
{
|
||||
initprintf("WARNING: ghrifle_fire hitsect < 0\n");
|
||||
Printf("WARNING: ghrifle_fire hitsect < 0\n");
|
||||
return;
|
||||
}
|
||||
sub_51678(v18, v1c, v20, v44, v48, v4c);
|
||||
|
@ -2385,13 +2385,13 @@ void ghrifle_fire(short snum)
|
|||
{
|
||||
if (sprite[v1c].cstat == 32768)
|
||||
{
|
||||
initprintf("ERROR: hit spr with cstat 32768\n");
|
||||
Printf("ERROR: hit spr with cstat 32768\n");
|
||||
return;
|
||||
}
|
||||
sect = sprite[v1c].sectnum;
|
||||
if (sector[sect].hitag == 2000)
|
||||
{
|
||||
initprintf("ERROR: hit spr in REST_AREA sector\n");
|
||||
Printf("ERROR: hit spr in REST_AREA sector\n");
|
||||
return;
|
||||
}
|
||||
ghtrophy_addkill(v1c);
|
||||
|
@ -2470,12 +2470,12 @@ void ghrifle_render(short snum, int a2)
|
|||
int vdx, tile, x, y;
|
||||
if (dword_AA544 < 0 || dword_AA544 >= 17)
|
||||
{
|
||||
initprintf("ERROR: ghrifle_draw bad index\n");
|
||||
Printf("ERROR: ghrifle_draw bad index\n");
|
||||
return;
|
||||
}
|
||||
if (snum < 0 || snum >= numplayers)
|
||||
{
|
||||
initprintf("ERROR: ghrifle_render bad index\n");
|
||||
Printf("ERROR: ghrifle_render bad index\n");
|
||||
return;
|
||||
}
|
||||
DukePlayer_t* p = g_player[snum].ps;
|
||||
|
@ -2501,7 +2501,7 @@ void ghrifle_render(short snum, int a2)
|
|||
}
|
||||
if (dword_AA844 >= 8)
|
||||
{
|
||||
initprintf("ERROR: ghrifle_render bobcnt out of bounds\n");
|
||||
Printf("ERROR: ghrifle_render bobcnt out of bounds\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2587,7 +2587,7 @@ int ghpistol_setmode(int a1)
|
|||
case 2:
|
||||
if (!dword_AA84C)
|
||||
{
|
||||
initprintf("ghpistol_setmode: pistolloaded at 0\n");
|
||||
Printf("ghpistol_setmode: pistolloaded at 0\n");
|
||||
}
|
||||
else
|
||||
dword_AA84C--;
|
||||
|
@ -2649,7 +2649,7 @@ void ghpistol_fire(short snum)
|
|||
}
|
||||
if (v18 < 0)
|
||||
{
|
||||
initprintf("WARNING: ghpistol_fire hitsect < 0\n");
|
||||
Printf("WARNING: ghpistol_fire hitsect < 0\n");
|
||||
return;
|
||||
}
|
||||
sub_51678(v28, v1c, v18, v38, v3c, v40);
|
||||
|
@ -2657,12 +2657,12 @@ void ghpistol_fire(short snum)
|
|||
{
|
||||
if (sprite[v1c].cstat == 32768)
|
||||
{
|
||||
initprintf("ERROR: hit spr with cstat 32768\n");
|
||||
Printf("ERROR: hit spr with cstat 32768\n");
|
||||
return;
|
||||
}
|
||||
if (sector[sprite[v1c].sectnum].hitag == 2000)
|
||||
{
|
||||
initprintf("ERROR: hit spr in REST_AREA sector\n");
|
||||
Printf("ERROR: hit spr in REST_AREA sector\n");
|
||||
return;
|
||||
}
|
||||
ghtrophy_addkill(v1c);
|
||||
|
@ -2717,12 +2717,12 @@ void ghpistol_render(short snum)
|
|||
int vdx;
|
||||
if (dword_AA848 < 0 || dword_AA848 >= 15)
|
||||
{
|
||||
initprintf("ERROR: ghpistol_draw bad index\n");
|
||||
Printf("ERROR: ghpistol_draw bad index\n");
|
||||
return;
|
||||
}
|
||||
if (snum < 0 || snum >= numplayers)
|
||||
{
|
||||
initprintf("ERROR: ghpistol_render bad index\n");
|
||||
Printf("ERROR: ghpistol_render bad index\n");
|
||||
return;
|
||||
}
|
||||
DukePlayer_t *p = g_player[snum].ps;
|
||||
|
@ -2749,7 +2749,7 @@ void ghpistol_render(short snum)
|
|||
}
|
||||
if (dword_AA9C8 >= 8)
|
||||
{
|
||||
initprintf("ERROR: ghpistol_render bobcnt out of bounds\n");
|
||||
Printf("ERROR: ghpistol_render bobcnt out of bounds\n");
|
||||
return;
|
||||
}
|
||||
sub_54D90();
|
||||
|
@ -2786,7 +2786,7 @@ int ghbow_setmode(int a1)
|
|||
{
|
||||
if (a1 < 0 || a1 >= 7)
|
||||
{
|
||||
initprintf("ERROR: ghbow_setmode %i\n", a1);
|
||||
Printf("ERROR: ghbow_setmode %i\n", a1);
|
||||
return 0;
|
||||
}
|
||||
if (dword_AA9CC != a1)
|
||||
|
@ -2871,12 +2871,12 @@ void ghbow_render(short snum)
|
|||
int vdx;
|
||||
if (dword_AA9CC < 0 || dword_AA9CC >= 7)
|
||||
{
|
||||
initprintf("ERROR: ghbow_draw bad index\n");
|
||||
Printf("ERROR: ghbow_draw bad index\n");
|
||||
return;
|
||||
}
|
||||
if (snum < 0 || snum >= numplayers)
|
||||
{
|
||||
initprintf("ERROR: ghbow_render bad index\n");
|
||||
Printf("ERROR: ghbow_render bad index\n");
|
||||
return;
|
||||
}
|
||||
DukePlayer_t *p = g_player[snum].ps;
|
||||
|
@ -2903,7 +2903,7 @@ void ghbow_render(short snum)
|
|||
}
|
||||
if (dword_AAAAC >= 8)
|
||||
{
|
||||
initprintf("ERROR: ghbow_render bobcnt out of bounds\n");
|
||||
Printf("ERROR: ghbow_render bobcnt out of bounds\n");
|
||||
return;
|
||||
}
|
||||
sub_54D90();
|
||||
|
@ -2938,7 +2938,7 @@ void ghprecip_snowfall(void)
|
|||
sect = s->sectnum;
|
||||
if (sect < 0 || sect >= numsectors)
|
||||
{
|
||||
initprintf("ghprecip_snowfall: bad sectnum\n");
|
||||
Printf("ghprecip_snowfall: bad sectnum\n");
|
||||
goto BOLT;
|
||||
}
|
||||
if (s->z > sector[sect].floorz)
|
||||
|
@ -2966,7 +2966,7 @@ void ghprecip_snowfall(void)
|
|||
changespritestat(i, v18);
|
||||
if (v18 != s->sectnum)
|
||||
{
|
||||
initprintf("changespritesect failed\n");
|
||||
Printf("changespritesect failed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3011,7 +3011,7 @@ short ghtrax_getoldestdeertrax(void)
|
|||
}
|
||||
if (sprite[i].extra > dword_AAAB8)
|
||||
{
|
||||
initprintf("ghtrax_getoldestdeertrax: oldest trax at %i\n", sprite[i].extra.cast());
|
||||
Printf("ghtrax_getoldestdeertrax: oldest trax at %i\n", sprite[i].extra.cast());
|
||||
}
|
||||
i = nexti;
|
||||
}
|
||||
|
@ -3032,9 +3032,9 @@ void ghtrax_deertrax(short a1)
|
|||
v18 = insertsprite(s->sectnum, 0);
|
||||
if (v18 < 0 || v18 >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghtrax_deertrax: insertsprite failed\n");
|
||||
Printf("ghtrax_deertrax: insertsprite failed\n");
|
||||
dword_AAAB8 = dword_AAAB0;
|
||||
initprintf(" set maxtraxdeer to %i\n", dword_AAAB8);
|
||||
Printf(" set maxtraxdeer to %i\n", dword_AAAB8);
|
||||
}
|
||||
else
|
||||
dword_AAAB0++;
|
||||
|
@ -3044,7 +3044,7 @@ void ghtrax_deertrax(short a1)
|
|||
v18 = ghtrax_getoldestdeertrax();
|
||||
if (v18 < 0 || v18 >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghtrax_deertrax: invalid oldest trax sprite\n");
|
||||
Printf("ghtrax_deertrax: invalid oldest trax sprite\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3103,7 +3103,7 @@ short ghtrax_getoldestboartrax(void)
|
|||
}
|
||||
if (sprite[i].extra > dword_AAAC4)
|
||||
{
|
||||
initprintf("ghtrax_getoldestdeertrax: oldest trax at %i\n", sprite[i].extra.cast());
|
||||
Printf("ghtrax_getoldestdeertrax: oldest trax at %i\n", sprite[i].extra.cast());
|
||||
}
|
||||
i = nexti;
|
||||
}
|
||||
|
@ -3126,9 +3126,9 @@ void ghtrax_boartrax(short a1)
|
|||
v18 = insertsprite(s->sectnum, 0);
|
||||
if (v18 < 0 || v18 >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghtrax_boartrax: insertsprite failed\n");
|
||||
Printf("ghtrax_boartrax: insertsprite failed\n");
|
||||
dword_AAAC4 = dword_AAABC;
|
||||
initprintf(" set maxtraxboar to %d\n", dword_AAAC4);
|
||||
Printf(" set maxtraxboar to %d\n", dword_AAAC4);
|
||||
}
|
||||
else
|
||||
dword_AAABC++;
|
||||
|
@ -3138,7 +3138,7 @@ void ghtrax_boartrax(short a1)
|
|||
v18 = ghtrax_getoldestboartrax();
|
||||
if (v18 < 0 || v18 >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghtrax_boartrax: invalid oldest trax sprite\n");
|
||||
Printf("ghtrax_boartrax: invalid oldest trax sprite\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3181,7 +3181,7 @@ void sub_573C0(void)
|
|||
|
||||
vdx = MAXSPRITES - vdx;
|
||||
if (vdx <= 640)
|
||||
initprintf("not enuff sprites left for deer and boar trax\n");
|
||||
Printf("not enuff sprites left for deer and boar trax\n");
|
||||
dword_AAAB0 = 0;
|
||||
dword_AAAB4 = 0;
|
||||
dword_AAAB8 = 0x180;
|
||||
|
@ -3245,7 +3245,7 @@ void ghtrax_deerdroppings(short a1)
|
|||
v18 = insertsprite(s->sectnum, 0);
|
||||
if (v18 < 0 || v18 >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghtrax_deerdroppings: insertsprite failed\n");
|
||||
Printf("ghtrax_deerdroppings: insertsprite failed\n");
|
||||
return;
|
||||
}
|
||||
s2 = &sprite[v18];
|
||||
|
@ -3287,7 +3287,7 @@ void ghtrax_boardroppings(short a1)
|
|||
v18 = insertsprite(s->sectnum, 0);
|
||||
if (v18 < 0 || v18 >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghtrax_boardroppings: insertsprite failed\n");
|
||||
Printf("ghtrax_boardroppings: insertsprite failed\n");
|
||||
return;
|
||||
}
|
||||
s2 = &sprite[v18];
|
||||
|
@ -3736,7 +3736,7 @@ void ghtarget_hit(short a1, int a2)
|
|||
vc += 16;
|
||||
break;
|
||||
default:
|
||||
initprintf("WARNING: ghtarget_hit: spr not in track\n");
|
||||
Printf("WARNING: ghtarget_hit: spr not in track\n");
|
||||
break;
|
||||
}
|
||||
switch (g_player[myconnectindex].ps->dhat61f)
|
||||
|
@ -3828,13 +3828,13 @@ void gharrow_spawnarrow(short snum)
|
|||
s = insertsprite(p->cursectnum, 809);
|
||||
if (s < 0 || s >= MAXSPRITES)
|
||||
{
|
||||
initprintf("gharrow_spawnarrow: insertsprite failed\n");
|
||||
Printf("gharrow_spawnarrow: insertsprite failed\n");
|
||||
return;
|
||||
}
|
||||
spr = &sprite[s];
|
||||
if (!spr)
|
||||
{
|
||||
initprintf("gharrow_spawnarrow: null sprptr\n");
|
||||
Printf("gharrow_spawnarrow: null sprptr\n");
|
||||
return;
|
||||
}
|
||||
spr->x = p->pos.x;
|
||||
|
@ -3891,12 +3891,12 @@ void ghstatbr_registerkillinfo(short a1, int a2, int a3)
|
|||
{
|
||||
if (a1 < 0 || a1 >= MAXTILES)
|
||||
{
|
||||
initprintf("ERROR: ghstatbr_registerkillinfo bad pic range\n");
|
||||
Printf("ERROR: ghstatbr_registerkillinfo bad pic range\n");
|
||||
return;
|
||||
}
|
||||
if (a2 < 0)
|
||||
{
|
||||
initprintf("ERROR: ghstatbr_registerkillinfo neg points\n");
|
||||
Printf("ERROR: ghstatbr_registerkillinfo neg points\n");
|
||||
return;
|
||||
}
|
||||
switch (DYNAMICTILEMAP(a1))
|
||||
|
@ -4164,7 +4164,7 @@ void ghdeploy_move(void)
|
|||
s = &sprite[i];
|
||||
if (s->sectnum < 0 || s->sectnum >= numsectors)
|
||||
{
|
||||
initprintf("ghdeploy_move DEPLOYED bad sect %i\n", s->sectnum.cast());
|
||||
Printf("ghdeploy_move DEPLOYED bad sect %i\n", s->sectnum.cast());
|
||||
deletesprite(i);
|
||||
}
|
||||
else if (sector[s->sectnum].hitag == 2003)
|
||||
|
@ -4190,7 +4190,7 @@ void ghdeploy_move(void)
|
|||
s = &sprite[i];
|
||||
if (s->sectnum < 0 || s->sectnum >= numsectors)
|
||||
{
|
||||
initprintf("ghdeploy_move TOSS bad sect %i\n", s->sectnum.cast());
|
||||
Printf("ghdeploy_move TOSS bad sect %i\n", s->sectnum.cast());
|
||||
deletesprite(i);
|
||||
}
|
||||
vec3_t vec = { s->xvel, s->yvel, 0 };
|
||||
|
@ -4240,19 +4240,19 @@ void ghdeploy_drop(int a1, int a2)
|
|||
p = g_player[a1].ps;
|
||||
if (p->cursectnum < 0 || p->cursectnum >= numsectors)
|
||||
{
|
||||
initprintf("ERROR: ghdeploy_drop bad plrsectr %i\n", p->cursectnum);
|
||||
Printf("ERROR: ghdeploy_drop bad plrsectr %i\n", p->cursectnum);
|
||||
return;
|
||||
}
|
||||
va = insertsprite(p->cursectnum, 810);
|
||||
if (va < 0 || va >= MAXSPRITES)
|
||||
{
|
||||
initprintf("ghdeploy_drop: insertsprite failed\n");
|
||||
Printf("ghdeploy_drop: insertsprite failed\n");
|
||||
return;
|
||||
}
|
||||
s = &sprite[va];
|
||||
if (!s)
|
||||
{
|
||||
initprintf("ghdeploy_drop: null sprptr\n");
|
||||
Printf("ghdeploy_drop: null sprptr\n");
|
||||
return;
|
||||
}
|
||||
s->x = p->pos.x + (sintable[(fix16_to_int(p->q16ang) + 512) & 2047] >> 7);
|
||||
|
@ -4354,7 +4354,7 @@ void ghmumble_randomsayit(int a1, int a2)
|
|||
{
|
||||
if (a1 < 0 || a1 >= MAXSOUNDS)
|
||||
{
|
||||
initprintf("ghmumble_randomsayit bad sndnum\n");
|
||||
Printf("ghmumble_randomsayit bad sndnum\n");
|
||||
return;
|
||||
}
|
||||
if (g_player[myconnectindex].ps->gm == MODE_GAME)
|
||||
|
@ -4434,7 +4434,7 @@ void sub_5A02C(void)
|
|||
{
|
||||
if ((int)totalclock - dword_AABAC > 7200)
|
||||
{
|
||||
initprintf("nosightings mumble\n");
|
||||
Printf("nosightings mumble\n");
|
||||
t = rrdh_random() % 3;
|
||||
if (t == 2 && dword_2BEA24 != 3)
|
||||
t = 1;
|
||||
|
|
|
@ -286,7 +286,7 @@ bool G_SavePlayer(FSaveGameNode *sv)
|
|||
|
||||
if (!g_netServer && ud.multimode < 2)
|
||||
{
|
||||
OSD_Printf("Saved: %s\n", fn.GetChars());
|
||||
Printf("Saved: %s\n", fn.GetChars());
|
||||
quoteMgr.InitializeQuote(QUOTE_RESERVED4, "Game Saved");
|
||||
P_DoQuote(QUOTE_RESERVED4, g_player[myconnectindex].ps);
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ static uint8_t *writespecdata(const dataspec_t *spec, FileWriter *fil, uint8_t *
|
|||
|
||||
if (cnt < 0)
|
||||
{
|
||||
OSD_Printf("wsd: cnt=%d, f=0x%x.\n", cnt, spec->flags);
|
||||
Printf("wsd: cnt=%d, f=0x%x.\n", cnt, spec->flags);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -471,12 +471,12 @@ static int32_t readspecdata(const dataspec_t *spec, FileReader *fil, uint8_t **d
|
|||
|
||||
if (ksiz != siz || Bmemcmp(spec->ptr, cmpstrbuf, siz))
|
||||
{
|
||||
OSD_Printf("rsd: spec=%s, idx=%d:\n", (char *)sptr->ptr, (int32_t)(spec-sptr));
|
||||
Printf("rsd: spec=%s, idx=%d:\n", (char *)sptr->ptr, (int32_t)(spec-sptr));
|
||||
|
||||
if (ksiz!=siz)
|
||||
OSD_Printf(" file read returned %d, expected %d.\n", ksiz, siz);
|
||||
Printf(" file read returned %d, expected %d.\n", ksiz, siz);
|
||||
else
|
||||
OSD_Printf(" sp->ptr and cmpstrbuf not identical!\n");
|
||||
Printf(" sp->ptr and cmpstrbuf not identical!\n");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ static int32_t readspecdata(const dataspec_t *spec, FileReader *fil, uint8_t **d
|
|||
|
||||
if (cnt < 0)
|
||||
{
|
||||
OSD_Printf("rsd: cnt<0... wtf?\n");
|
||||
Printf("rsd: cnt<0... wtf?\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -505,12 +505,12 @@ static int32_t readspecdata(const dataspec_t *spec, FileReader *fil, uint8_t **d
|
|||
|
||||
if (ksiz != siz)
|
||||
{
|
||||
OSD_Printf("rsd: spec=%s, idx=%d, mem=%p\n", (char *)sptr->ptr, (int32_t)(spec - sptr), mem);
|
||||
OSD_Printf(" : read %d, expected %d!\n",
|
||||
Printf("rsd: spec=%s, idx=%d, mem=%p\n", (char *)sptr->ptr, (int32_t)(spec - sptr), mem);
|
||||
Printf(" : read %d, expected %d!\n",
|
||||
ksiz, siz);
|
||||
|
||||
if (ksiz == -1)
|
||||
OSD_Printf(" read: %s\n", strerror(errno));
|
||||
Printf(" read: %s\n", strerror(errno));
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -650,7 +650,7 @@ static void cmpspecdata(const dataspec_t *spec, uint8_t **dumpvar, uint8_t **dif
|
|||
|
||||
if (cnt < 0)
|
||||
{
|
||||
OSD_Printf("csd: cnt=%d, f=0x%x\n", cnt, spec->flags);
|
||||
Printf("csd: cnt=%d, f=0x%x\n", cnt, spec->flags);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1127,7 +1127,7 @@ int32_t sv_saveandmakesnapshot(FileWriter &fil, int8_t spot, bool isAutoSave)
|
|||
|
||||
if (p != svsnapshot+svsnapsiz)
|
||||
{
|
||||
OSD_Printf("sv_saveandmakesnapshot: ptr-(snapshot end)=%d!\n", (int32_t)(p - (svsnapshot + svsnapsiz)));
|
||||
Printf("sv_saveandmakesnapshot: ptr-(snapshot end)=%d!\n", (int32_t)(p - (svsnapshot + svsnapsiz)));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -1149,7 +1149,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
|
||||
if (filp->Read(h, sizeof(savehead_t)) != sizeof(savehead_t))
|
||||
{
|
||||
OSD_Printf("%s %d header corrupt.\n", havedemo ? "Demo":"Savegame", havedemo ? -spot : spot);
|
||||
Printf("%s %d header corrupt.\n", havedemo ? "Demo":"Savegame", havedemo ? -spot : spot);
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
return -1;
|
||||
}
|
||||
|
@ -1160,7 +1160,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
char headerCstr[sizeof(h->headerstr) + 1];
|
||||
Bmemcpy(headerCstr, h->headerstr, sizeof(h->headerstr));
|
||||
headerCstr[sizeof(h->headerstr)] = '\0';
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"DERSAVEGAME\".\n",
|
||||
Printf("%s %d header reads \"%s\", expected \"DERSAVEGAME\".\n",
|
||||
havedemo ? "Demo":"Savegame", havedemo ? -spot : spot, headerCstr);
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
return -2;
|
||||
|
@ -1171,7 +1171,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
#ifndef DEBUGGINGAIDS
|
||||
if (havedemo)
|
||||
#endif
|
||||
OSD_Printf("Incompatible savegame. Expected version %d.%d.%d.%d.%0x, found %d.%d.%d.%d.%0x\n", SV_MAJOR_VER, SV_MINOR_VER, BYTEVERSION,
|
||||
Printf("Incompatible savegame. Expected version %d.%d.%d.%d.%0x, found %d.%d.%d.%d.%0x\n", SV_MAJOR_VER, SV_MINOR_VER, BYTEVERSION,
|
||||
ud.userbytever, g_scriptcrc, h->majorver, h->minorver, h->bytever, h->userbytever, h->scriptcrc);
|
||||
|
||||
if (h->majorver == SV_MAJOR_VER && h->minorver == SV_MINOR_VER)
|
||||
|
@ -1190,7 +1190,7 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
|
|||
#ifndef DEBUGGINGAIDS
|
||||
if (havedemo)
|
||||
#endif
|
||||
OSD_Printf("File incompatible. Expected pointer size %d, found %d\n",
|
||||
Printf("File incompatible. Expected pointer size %d, found %d\n",
|
||||
(int32_t)sizeof(intptr_t), h->getPtrSize());
|
||||
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
|
@ -1220,7 +1220,7 @@ int32_t sv_loadsnapshot(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
// else (if savegame), we just read the header and are now at offset sizeof(savehead_t)
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_Printf("sv_loadsnapshot: snapshot size: %d bytes.\n", h->snapsiz);
|
||||
Printf("sv_loadsnapshot: snapshot size: %d bytes.\n", h->snapsiz);
|
||||
#endif
|
||||
|
||||
if (spot >= 0)
|
||||
|
@ -1229,7 +1229,7 @@ int32_t sv_loadsnapshot(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
i = doloadplayer2(fil, NULL);
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
@ -1243,14 +1243,14 @@ int32_t sv_loadsnapshot(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
i = doloadplayer2(fil, &p);
|
||||
if (i)
|
||||
{
|
||||
OSD_Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
Printf("sv_loadsnapshot: doloadplayer2() returned %d.\n", i);
|
||||
sv_freemem();
|
||||
return 5;
|
||||
}
|
||||
|
||||
if (p != svsnapshot+svsnapsiz)
|
||||
{
|
||||
OSD_Printf("sv_loadsnapshot: internal error: p-(snapshot end)=%d!\n",
|
||||
Printf("sv_loadsnapshot: internal error: p-(snapshot end)=%d!\n",
|
||||
(int32_t)(p-(svsnapshot+svsnapsiz)));
|
||||
sv_freemem();
|
||||
return 6;
|
||||
|
@ -1277,7 +1277,7 @@ uint32_t sv_writediff(FileWriter *fil)
|
|||
cmpspecdata((const dataspec_t *)svgm_vars, &p, &d);
|
||||
|
||||
if (p != svsnapshot+svsnapsiz)
|
||||
OSD_Printf("sv_writediff: dump+siz=%p, p=%p!\n", svsnapshot+svsnapsiz, p);
|
||||
Printf("sv_writediff: dump+siz=%p, p=%p!\n", svsnapshot+svsnapsiz, p);
|
||||
|
||||
uint32_t const diffsiz = d - svdiff;
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ int32_t sv_readdiff(FileReader &fil)
|
|||
if (d!=svdiff+diffsiz)
|
||||
i|=2;
|
||||
if (i)
|
||||
OSD_Printf("sv_readdiff: p=%p, svsnapshot+svsnapsiz=%p; d=%p, svdiff+diffsiz=%p",
|
||||
Printf("sv_readdiff: p=%p, svsnapshot+svsnapsiz=%p; d=%p, svdiff+diffsiz=%p",
|
||||
p, svsnapshot+svsnapsiz, d, svdiff+diffsiz);
|
||||
return i;
|
||||
}
|
||||
|
@ -1400,8 +1400,8 @@ static void sv_restload()
|
|||
}
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
# define PRINTSIZE(name) do { if (mem) OSD_Printf(name ": %d\n", (int32_t)(mem-tmem)); \
|
||||
OSD_Printf(name ": %d ms\n", timerGetTicks()-t); t=timerGetTicks(); tmem=mem; } while (0)
|
||||
# define PRINTSIZE(name) do { if (mem) Printf(name ": %d\n", (int32_t)(mem-tmem)); \
|
||||
Printf(name ": %d ms\n", timerGetTicks()-t); t=timerGetTicks(); tmem=mem; } while (0)
|
||||
#else
|
||||
# define PRINTSIZE(name) do { } while (0)
|
||||
#endif
|
||||
|
@ -1480,7 +1480,7 @@ int32_t sv_updatestate(int32_t frominit)
|
|||
|
||||
if (p != pbeg+svsnapsiz)
|
||||
{
|
||||
OSD_Printf("sv_updatestate: ptr-(snapshot end)=%d\n", (int32_t)(p-(pbeg+svsnapsiz)));
|
||||
Printf("sv_updatestate: ptr-(snapshot end)=%d\n", (int32_t)(p-(pbeg+svsnapsiz)));
|
||||
return -9;
|
||||
}
|
||||
|
||||
|
|
|
@ -944,7 +944,7 @@ void G_OperateSectors(int sectNum, int spriteNum)
|
|||
//if (j == -1) j = nextsectorneighborz(sectNum,pSector->ceilingz,1,1);
|
||||
if (j == -1)
|
||||
{
|
||||
OSD_Printf("WARNING: ST29: null sector!\n");
|
||||
Printf("WARNING: ST29: null sector!\n");
|
||||
return;
|
||||
}
|
||||
j = sector[j].ceilingz;
|
||||
|
@ -955,7 +955,7 @@ void G_OperateSectors(int sectNum, int spriteNum)
|
|||
//if (j == -1) j = nextsectorneighborz(sectNum,pSector->ceilingz,-1,-1);
|
||||
if (j == -1)
|
||||
{
|
||||
OSD_Printf("WARNING: ST29: null sector!\n");
|
||||
Printf("WARNING: ST29: null sector!\n");
|
||||
return;
|
||||
}
|
||||
j = sector[j].floorz;
|
||||
|
@ -1040,7 +1040,7 @@ REDODOOR:
|
|||
}
|
||||
else
|
||||
{
|
||||
OSD_Printf("WARNING: ST_22_SPLITTING_DOOR: null sector: floor neighbor=%d, ceiling neighbor=%d!\n",
|
||||
Printf("WARNING: ST_22_SPLITTING_DOOR: null sector: floor neighbor=%d, ceiling neighbor=%d!\n",
|
||||
floorNeighbor, ceilingNeighbor);
|
||||
pSector->lotag ^= 0x8000u;
|
||||
}
|
||||
|
@ -1400,7 +1400,7 @@ int P_ActivateSwitch(int playerNum, int wallOrSprite, int switchType)
|
|||
nSwitchPal = wall[wallOrSprite].pal;
|
||||
}
|
||||
|
||||
// initprintf("P_ActivateSwitch called picnum=%i switchissprite=%i\n",picnum,switchissprite);
|
||||
// Printf("P_ActivateSwitch called picnum=%i switchissprite=%i\n",picnum,switchissprite);
|
||||
|
||||
int basePicnum = G_GetBaseSwitch(nSwitchPicnum);
|
||||
int correctDips = 1;
|
||||
|
|
|
@ -345,7 +345,7 @@ void G_ProcessDynamicSoundMapping(const char *szLabel, int32_t lValue)
|
|||
struct sdynitem *di = &g_dynSoundList[i];
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (g_scriptDebug && di->staticval != lValue)
|
||||
OSD_Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
Printf("REMAP %s (%d) --> %d\n", di->str, di->staticval, lValue);
|
||||
#endif
|
||||
*di->dynvalptr = lValue;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int
|
|||
|
||||
if (t == NULL)
|
||||
{
|
||||
OSD_Printf("minitext: NULL text!\n");
|
||||
Printf("minitext: NULL text!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,21 +86,21 @@ void CON_ShowMirror(void)
|
|||
|
||||
if (op1 < 0 || op1 > 9)
|
||||
{
|
||||
OSD_Printf("Mirror number is out of range!");
|
||||
Printf("Mirror number is out of range!");
|
||||
return;
|
||||
}
|
||||
|
||||
OSD_Printf("camera is the ST1 sprite used as the view spot");
|
||||
OSD_Printf("camspite is the SpriteNum of the drawtotile tile in editart");
|
||||
OSD_Printf("camspic is the tile number of the drawtotile in editart");
|
||||
OSD_Printf("iscamera is whether or not this mirror is a camera type");
|
||||
OSD_Printf(" ");
|
||||
OSD_Printf("mirror[%d].mirrorwall = %d",op1,mirror[op1].mirrorwall);
|
||||
OSD_Printf("mirror[%d].mirrorsector = %d",op1,mirror[op1].mirrorsector);
|
||||
OSD_Printf("mirror[%d].camera = %d",op1,mirror[op1].camera);
|
||||
OSD_Printf("mirror[%d].camsprite = %d",op1,mirror[op1].camsprite);
|
||||
OSD_Printf("mirror[%d].campic = %d",op1,mirror[op1].campic);
|
||||
OSD_Printf("mirror[%d].iscamera = %d",op1,mirror[op1].ismagic);
|
||||
Printf("camera is the ST1 sprite used as the view spot");
|
||||
Printf("camspite is the SpriteNum of the drawtotile tile in editart");
|
||||
Printf("camspic is the tile number of the drawtotile in editart");
|
||||
Printf("iscamera is whether or not this mirror is a camera type");
|
||||
Printf(" ");
|
||||
Printf("mirror[%d].mirrorwall = %d",op1,mirror[op1].mirrorwall);
|
||||
Printf("mirror[%d].mirrorsector = %d",op1,mirror[op1].mirrorsector);
|
||||
Printf("mirror[%d].camera = %d",op1,mirror[op1].camera);
|
||||
Printf("mirror[%d].camsprite = %d",op1,mirror[op1].camsprite);
|
||||
Printf("mirror[%d].campic = %d",op1,mirror[op1].campic);
|
||||
Printf("mirror[%d].iscamera = %d",op1,mirror[op1].ismagic);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -683,7 +683,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
|
|||
tu = User[SpriteNum];
|
||||
|
||||
//if(tsp->statnum == STAT_GENERIC_QUEUE)
|
||||
// OSD_Printf("tsp->pal = %d",tsp->pal);
|
||||
// Printf("tsp->pal = %d",tsp->pal);
|
||||
|
||||
#if 0
|
||||
// Brighten up the sprite if set somewhere else to do so
|
||||
|
|
|
@ -741,7 +741,7 @@ bool InitGame()
|
|||
initmultiplayers(0, NULL, 0, 0, 0);
|
||||
else if (initmultiplayersparms(argc - firstnet, &argv[firstnet]))
|
||||
{
|
||||
buildputs("Waiting for players...\n");
|
||||
Printf("Waiting for players...\n");
|
||||
while (initmultiplayerscycle())
|
||||
{
|
||||
handleevents();
|
||||
|
@ -801,7 +801,6 @@ bool InitGame()
|
|||
|
||||
// LoadImages will now proceed to steal all the remaining heap space
|
||||
//_outtext("\n\n\n\n\n\n\n\n");
|
||||
//buildputs("Loading sound and graphics...\n");
|
||||
//AnimateCacheCursor();
|
||||
TileFiles.LoadArtSet("tiles%03d.art");
|
||||
|
||||
|
@ -835,7 +834,7 @@ bool InitGame()
|
|||
LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information
|
||||
}
|
||||
|
||||
if (!loaddefinitionsfile(G_DefFile())) buildputs("Definitions file loaded.\n");
|
||||
if (!loaddefinitionsfile(G_DefFile())) Printf("Definitions file loaded.\n");
|
||||
|
||||
userConfig.AddDefs.reset();
|
||||
|
||||
|
@ -2691,8 +2690,8 @@ int32_t GameInterface::app_main()
|
|||
|
||||
if (!DetectShareware())
|
||||
{
|
||||
if (SW_SHAREWARE) buildputs("Detected shareware GRP\n");
|
||||
else buildputs("Detected registered GRP\n");
|
||||
if (SW_SHAREWARE) Printf("Detected shareware GRP\n");
|
||||
else Printf("Detected registered GRP\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_SW_PLAYERS; i++)
|
||||
|
@ -2702,12 +2701,12 @@ int32_t GameInterface::app_main()
|
|||
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;
|
||||
|
||||
if (SW_SHAREWARE)
|
||||
buildputs("SHADOW WARRIOR(tm) Version 1.2 (Shareware Version)\n");
|
||||
Printf("SHADOW WARRIOR(tm) Version 1.2 (Shareware Version)\n");
|
||||
else
|
||||
buildputs("SHADOW WARRIOR(tm) Version 1.2\n");
|
||||
Printf("SHADOW WARRIOR(tm) Version 1.2\n");
|
||||
|
||||
if (sw_snd_scratch == 0) // This is always 0 at this point - this check is only here to prevent whole program optimization from eliminating the variable.
|
||||
buildputs("Copyright (c) 1997 3D Realms Entertainment\n");
|
||||
Printf("Copyright (c) 1997 3D Realms Entertainment\n");
|
||||
|
||||
UserMapName[0] = '\0';
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ extern int DispMono;
|
|||
#else
|
||||
void adduserquote(const char *daquote);
|
||||
extern int DispMono;
|
||||
#define MONO_PRINT(str) if (DispMono) OSD_Printf(str); // Put it in my userquote stuff!
|
||||
#define MONO_PRINT(str) if (DispMono) Printf(str); // Put it in my userquote stuff!
|
||||
//#define MONO_PRINT(str) if (DispMono) printf(str);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -420,7 +420,7 @@ void SetFadeAmt(PLAYERp pp, short damage, unsigned char startcolor)
|
|||
short fadedamage = 0;
|
||||
RGB_color color;
|
||||
|
||||
//OSD_Printf("SetAmt: fadeamt = %d, startcolor = %d, pp = %d",pp->FadeAmt,startcolor,pp->StartColor);
|
||||
//Printf("SetAmt: fadeamt = %d, startcolor = %d, pp = %d",pp->FadeAmt,startcolor,pp->StartColor);
|
||||
|
||||
if (abs(pp->FadeAmt) > 0 && startcolor == pp->StartColor)
|
||||
return;
|
||||
|
|
|
@ -814,7 +814,7 @@ int PachinkoCheckWin(short SpriteNum)
|
|||
|
||||
u->WaitTics = 0; // Can operate it again now
|
||||
|
||||
//OSD_Printf("bool1 = %d",TEST_BOOL1(sp));
|
||||
//Printf("bool1 = %d",TEST_BOOL1(sp));
|
||||
// You already won, no more from this machine!
|
||||
if (TEST_BOOL1(sp)) return 0;
|
||||
|
||||
|
|
|
@ -185,12 +185,12 @@ void netbroadcastpacket(uint8_t* buf, int len)
|
|||
{
|
||||
if (i == myconnectindex) continue;
|
||||
//sendpacket(i, buf, len);
|
||||
buildprintf("netsendpacket() sends normal to %d\n",i);
|
||||
Printf("netsendpacket() sends normal to %d\n",i);
|
||||
}
|
||||
buildputs("Contents:");
|
||||
Printf("Contents:");
|
||||
for (i=0; i<len; i++)
|
||||
buildprintf(" %02x", buf[i]);
|
||||
buildputs("\n");
|
||||
Printf(" %02x", buf[i]);
|
||||
Printf("\n");
|
||||
}
|
||||
|
||||
int netgetpacket(int *ind, uint8_t* buf)
|
||||
|
@ -226,7 +226,7 @@ int netgetpacket(int *ind, uint8_t* buf)
|
|||
for (i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
if (i == myconnectindex || i == *ind) continue;
|
||||
buildprintf("netgetpacket(): distributing to %d\n", i);
|
||||
Printf("netgetpacket(): distributing to %d\n", i);
|
||||
//sendpacket(i, buf, len);
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ int netgetpacket(int *ind, uint8_t* buf)
|
|||
return len;
|
||||
}
|
||||
|
||||
buildprintf("netgetpacket(): forwarding to %d\n", i);
|
||||
Printf("netgetpacket(): forwarding to %d\n", i);
|
||||
//sendpacket(i, buf, len);
|
||||
return 0; // nothing for us to do
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ int netgetpacket(int *ind, uint8_t* buf)
|
|||
}
|
||||
else
|
||||
{
|
||||
buildprintf("netgetpacket(): Got a proxy message from %d instead of %d\n",*ind,connecthead);
|
||||
Printf("netgetpacket(): Got a proxy message from %d instead of %d\n",*ind,connecthead);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ CheckVersion(int GameVersion)
|
|||
{
|
||||
if (GameVersion != Player[pnum].PlayerVersion)
|
||||
{
|
||||
buildprintf("CheckVersion(): player %d has version %d, expecting %d\n",
|
||||
Printf("CheckVersion(): player %d has version %d, expecting %d\n",
|
||||
pnum, Player[pnum].PlayerVersion, GameVersion);
|
||||
|
||||
adduserquote(VERSION_MSG);
|
||||
|
@ -588,7 +588,7 @@ waitforeverybody(void)
|
|||
if (!CommEnabled)
|
||||
return;
|
||||
|
||||
buildprintf("waitforeverybody() #%d\n", Player[myconnectindex].playerreadyflag + 1);
|
||||
Printf("waitforeverybody() #%d\n", Player[myconnectindex].playerreadyflag + 1);
|
||||
|
||||
//tenDbLprintf(gTenLog, 3, "in w4e");
|
||||
//tenDbFlushLog(gTenLog);
|
||||
|
|
|
@ -63,7 +63,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
|
||||
if (!fileSystem.Lookup(mapname, "MAP"))
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
Printf(OSD_ERROR "map: file \"%s\" not found.\n", mapname.GetChars());
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
|
||||
if (numplayers > 1 || !(g_player[myconnectindex].ps->gm & MODE_GAME))
|
||||
{
|
||||
OSD_Printf("spawn: Can't spawn sprites in multiplayer games or demos\n");
|
||||
Printf("spawn: Can't spawn sprites in multiplayer games or demos\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -196,14 +196,14 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
}
|
||||
if (i==g_labelCnt)
|
||||
{
|
||||
OSD_Printf("spawn: Invalid tile label given\n");
|
||||
Printf("spawn: Invalid tile label given\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if ((uint32_t)picnum >= MAXUSERTILES)
|
||||
{
|
||||
OSD_Printf("spawn: Invalid tile number\n");
|
||||
Printf("spawn: Invalid tile number\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
break;
|
||||
|
@ -220,7 +220,7 @@ static int osdcmd_spawn(osdcmdptr_t parm)
|
|||
{
|
||||
if (setsprite(idx, &vect) < 0)
|
||||
{
|
||||
OSD_Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
Printf("spawn: Sprite can't be spawned into null space\n");
|
||||
A_DeleteSprite(idx);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ void GetToken(SWBOOL crossline)
|
|||
if (script_p >= scriptend_p)
|
||||
{
|
||||
if (!crossline)
|
||||
initprintf("Error: Line %i is incomplete\n",scriptline);
|
||||
Printf("Error: Line %i is incomplete\n",scriptline);
|
||||
endofscript = TRUE;
|
||||
return;
|
||||
}
|
||||
|
@ -167,14 +167,14 @@ skipspace:
|
|||
if (script_p >= scriptend_p)
|
||||
{
|
||||
if (!crossline)
|
||||
initprintf("Error: Line %i is incomplete\n",scriptline);
|
||||
Printf("Error: Line %i is incomplete\n",scriptline);
|
||||
endofscript = TRUE;
|
||||
return;
|
||||
}
|
||||
if (*script_p++ == '\n')
|
||||
{
|
||||
if (!crossline)
|
||||
initprintf("Error: Line %i is incomplete\n",scriptline);
|
||||
Printf("Error: Line %i is incomplete\n",scriptline);
|
||||
scriptline++;
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ skipspace:
|
|||
if (script_p >= scriptend_p)
|
||||
{
|
||||
if (!crossline)
|
||||
initprintf("Error: Line %i is incomplete\n",scriptline);
|
||||
Printf("Error: Line %i is incomplete\n",scriptline);
|
||||
endofscript = TRUE;
|
||||
return;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ skipspace:
|
|||
if (*script_p == '#') // # is comment field
|
||||
{
|
||||
if (!crossline)
|
||||
initprintf("Error: Line %i is incomplete\n",scriptline);
|
||||
Printf("Error: Line %i is incomplete\n",scriptline);
|
||||
while (*script_p++ != '\n')
|
||||
if (script_p >= scriptend_p)
|
||||
{
|
||||
|
@ -211,7 +211,7 @@ skipspace:
|
|||
if (script_p == scriptend_p)
|
||||
break;
|
||||
ASSERT(token_p != &token[MAXTOKEN]);
|
||||
// initprintf("Error: Token too large on line %i\n",scriptline);
|
||||
// Printf("Error: Token too large on line %i\n",scriptline);
|
||||
}
|
||||
|
||||
*token_p = 0;
|
||||
|
@ -573,7 +573,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
// first map entry may not be used, max. amount needs investigation
|
||||
if (curmap < 1 || curmap > MAX_LEVELS_REG)
|
||||
{
|
||||
initprintf("Error: map number %d not in range 1-%d on line %s:%d\n",
|
||||
Printf("Error: map number %d not in range 1-%d on line %s:%d\n",
|
||||
curmap, MAX_LEVELS_REG, script->filename,
|
||||
scriptfile_getlinum(script,mapnumptr));
|
||||
script->textptr = braceend;
|
||||
|
@ -634,7 +634,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
initprintf("Error on line %s:%d\n",
|
||||
Printf("Error on line %s:%d\n",
|
||||
script->filename,
|
||||
scriptfile_getlinum(script,script->ltextptr));
|
||||
break;
|
||||
|
@ -652,7 +652,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
|
||||
if ((unsigned)--curmap >= 2u)
|
||||
{
|
||||
initprintf("Error: episode number %d not in range 1-2 on line %s:%d\n",
|
||||
Printf("Error: episode number %d not in range 1-2 on line %s:%d\n",
|
||||
curmap, script->filename,
|
||||
scriptfile_getlinum(script,epnumptr));
|
||||
script->textptr = braceend;
|
||||
|
@ -680,7 +680,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
initprintf("Error on line %s:%d\n",
|
||||
Printf("Error on line %s:%d\n",
|
||||
script->filename,
|
||||
scriptfile_getlinum(script,script->ltextptr));
|
||||
break;
|
||||
|
@ -698,7 +698,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
|
||||
if ((unsigned)--curmap >= 4u)
|
||||
{
|
||||
initprintf("Error: skill number %d not in range 1-4 on line %s:%d\n",
|
||||
Printf("Error: skill number %d not in range 1-4 on line %s:%d\n",
|
||||
curmap, script->filename,
|
||||
scriptfile_getlinum(script,epnumptr));
|
||||
script->textptr = braceend;
|
||||
|
@ -720,7 +720,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
initprintf("Error on line %s:%d\n",
|
||||
Printf("Error on line %s:%d\n",
|
||||
script->filename,
|
||||
scriptfile_getlinum(script,script->ltextptr));
|
||||
break;
|
||||
|
@ -796,7 +796,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
|
||||
if ((unsigned)--in >= (unsigned)InvDecl_TOTAL)
|
||||
{
|
||||
initprintf("Error: inventory item number not in range 1-%d on line %s:%d\n",
|
||||
Printf("Error: inventory item number not in range 1-%d on line %s:%d\n",
|
||||
InvDecl_TOTAL, script->filename,
|
||||
scriptfile_getlinum(script,invnumptr));
|
||||
script->textptr = braceend;
|
||||
|
@ -816,7 +816,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
if (scriptfile_getnumber(script, &amt)) break;
|
||||
break;
|
||||
default:
|
||||
initprintf("Error on line %s:%d\n",
|
||||
Printf("Error on line %s:%d\n",
|
||||
script->filename,
|
||||
scriptfile_getlinum(script,script->ltextptr));
|
||||
break;
|
||||
|
@ -846,7 +846,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
|
||||
if ((unsigned)--in >= (unsigned)SIZ(weaponmap))
|
||||
{
|
||||
initprintf("Error: weapon number not in range 1-%d on line %s:%d\n",
|
||||
Printf("Error: weapon number not in range 1-%d on line %s:%d\n",
|
||||
(int)SIZ(weaponmap), script->filename,
|
||||
scriptfile_getlinum(script,wpnnumptr));
|
||||
script->textptr = braceend;
|
||||
|
@ -881,7 +881,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
if (scriptfile_getnumber(script, &wpickup)) break;
|
||||
break;
|
||||
default:
|
||||
initprintf("Error on line %s:%d\n",
|
||||
Printf("Error on line %s:%d\n",
|
||||
script->filename,
|
||||
scriptfile_getlinum(script,script->ltextptr));
|
||||
break;
|
||||
|
@ -922,7 +922,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
if (scriptfile_getbraces(script, &braceend)) break;
|
||||
if ((unsigned)--curmap >= 6u)
|
||||
{
|
||||
initprintf("Error: theme number %d not in range 1-6 on line %s:%d\n",
|
||||
Printf("Error: theme number %d not in range 1-6 on line %s:%d\n",
|
||||
curmap, script->filename,
|
||||
scriptfile_getlinum(script,epnumptr));
|
||||
script->textptr = braceend;
|
||||
|
@ -941,7 +941,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
if (scriptfile_getnumber(script, &trak)) break;
|
||||
break;
|
||||
default:
|
||||
initprintf("Error on line %s:%d\n",
|
||||
Printf("Error on line %s:%d\n",
|
||||
script->filename,
|
||||
scriptfile_getlinum(script,script->ltextptr));
|
||||
break;
|
||||
|
@ -960,7 +960,7 @@ void LoadCustomInfoFromScript(const char *filename)
|
|||
case CM_SECRET:
|
||||
case CM_QUIT:
|
||||
default:
|
||||
initprintf("Error on line %s:%d\n",
|
||||
Printf("Error on line %s:%d\n",
|
||||
script->filename,
|
||||
scriptfile_getlinum(script,script->ltextptr));
|
||||
break;
|
||||
|
|
|
@ -939,7 +939,7 @@ SWBOOL PlaySong(const char* mapname, const char* song_file_name, int cdaudio_tra
|
|||
FStringf trackname("track%02d.ogg", cdaudio_track);
|
||||
if (!Mus_Play(mapname, trackname, true))
|
||||
{
|
||||
buildprintf("Can't find CD track %i!\n", cdaudio_track);
|
||||
Printf("Can't find CD track %i!\n", cdaudio_track);
|
||||
}
|
||||
else return true;
|
||||
}
|
||||
|
|
|
@ -1098,7 +1098,7 @@ ActorTestSpawn(SPRITEp sp)
|
|||
case ZILLA_RUN_R0: c = "zilla"; break;
|
||||
default: c = "?"; break;
|
||||
}
|
||||
initprintf("WARNING: skill-masked %s at %d,%d,%d not being killed because it "
|
||||
Printf("WARNING: skill-masked %s at %d,%d,%d not being killed because it "
|
||||
"activates something\n", c, TrackerCast(sp->x), TrackerCast(sp->y), TrackerCast(sp->z));
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -639,7 +639,7 @@ TrackSetup(void)
|
|||
{
|
||||
int i, nexti;
|
||||
auto const sp = (uspritetype const *)&sprite[headspritestat[STAT_TRACK+ndx]];
|
||||
buildprintf("WARNING: Did not find first point of Track Number %d, x %d, y %d\n", ndx, sp->x, sp->y);
|
||||
Printf("WARNING: Did not find first point of Track Number %d, x %d, y %d\n", ndx, sp->x, sp->y);
|
||||
for (i=headspritestat[STAT_TRACK+ndx]; i>=0; i=nexti)
|
||||
{
|
||||
// neuter the track's sprite list
|
||||
|
@ -1592,7 +1592,7 @@ PlaceActorsOnTracks(void)
|
|||
|
||||
if (Track[u->track].NumPoints == 0)
|
||||
{
|
||||
buildprintf("WARNING: Sprite %d (%d, %d) placed on track %d with no points!\n", i, TrackerCast(sp->x), TrackerCast(sp->y), u->track);
|
||||
Printf("WARNING: Sprite %d (%d, %d) placed on track %d with no points!\n", i, TrackerCast(sp->x), TrackerCast(sp->y), u->track);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue