adjust error messages accordingly

This commit is contained in:
Fabian Greffrath 2025-05-13 07:54:32 +02:00
parent 494192c565
commit 227030cbab
35 changed files with 110 additions and 121 deletions

View File

@ -427,7 +427,7 @@ void D_StartNetGame(net_gamesettings_t *settings,
if (ticdup < 1)
{
I_Error("D_StartNetGame: invalid ticdup value (%d)", ticdup);
I_Error("invalid ticdup value (%d)", ticdup);
}
// TODO: Message disabled until we fix new_sync.
@ -522,7 +522,7 @@ boolean D_InitNetGame(net_connect_data_t *connect_data)
if (!NET_CL_Connect(addr, connect_data))
{
I_Error("D_InitNetGame: Failed to connect to %s:\n%s\n",
I_Error("Failed to connect to %s:\n%s\n",
NET_AddrToString(addr), net_client_reject_reason);
}
@ -831,7 +831,7 @@ void TryRunTics(void)
if (lowtic < gametic / ticdup)
{
I_Error("TryRunTics: lowtic < gametic");
I_Error("lowtic < gametic");
}
// Still no tics to run? Sleep until some are available.
@ -870,7 +870,7 @@ void TryRunTics(void)
{
if (gametic / ticdup > lowtic)
{
I_Error("gametic>lowtic");
I_Error("gametic > lowtic");
}
memcpy(local_playeringame, set->ingame, sizeof(local_playeringame));

View File

@ -558,7 +558,7 @@ void D_AddFile(const char *file)
if (!W_AddPath(path))
{
I_Error("Error: Failed to load %s", file);
I_Error("Failed to load %s", file);
}
}
@ -1335,7 +1335,7 @@ static void AutoLoadWADs(const char *path)
if (!W_AddPath(filename))
{
I_Error("Error: Failed to load %s", filename);
I_Error("Failed to load %s", filename);
}
}
I_EndGlob(glob);

View File

@ -2056,23 +2056,23 @@ static void G_DoPlayDemo(void)
if (*demo_p++ != 1)
{
I_Error("G_DoPlayDemo: Unknown demo format.");
I_Error("Unknown demo format.");
}
// the defunct format had only one extension (in two bytes)
if (*demo_p++ != 1 || *demo_p++ != 0)
{
I_Error("G_DoPlayDemo: Unknown demo format.");
I_Error("Unknown demo format.");
}
if (*demo_p++ != 8)
{
I_Error("G_DoPlayDemo: Unknown demo format.");
I_Error("Unknown demo format.");
}
if (memcmp(demo_p, "UMAPINFO", 8))
{
I_Error("G_DoPlayDemo: Unknown demo format.");
I_Error("Unknown demo format.");
}
demo_p += 8;
@ -3275,7 +3275,7 @@ static boolean G_CheckSpot(int playernum, mapthing_t *mthing)
ya = finesine[an];
break;
default:
I_Error("G_CheckSpot: unexpected angle %d\n", an);
I_Error("unexpected angle %d\n", an);
xa = ya = 0;
break;
}
@ -3877,16 +3877,16 @@ void G_ReloadDefaults(boolean keep_demover)
rngseed = time(NULL);
if (beta_emulation && demo_version != DV_MBF)
I_Error("G_ReloadDefaults: Beta emulation requires complevel MBF.");
I_Error("Beta emulation requires complevel MBF.");
if ((M_CheckParm("-dog") || M_CheckParm("-dogs")) && demo_version < DV_MBF)
I_Error("G_ReloadDefaults: Helper dogs require complevel MBF or MBF21.");
I_Error("Helper dogs require complevel MBF or MBF21.");
if (M_CheckParm("-skill") && startskill == sk_none && !demo_compatibility)
I_Error("G_ReloadDefaults: '-skill 0' requires complevel Vanilla.");
I_Error("'-skill 0' requires complevel Vanilla.");
if (demorecording && demo_version == DV_ID24)
I_Error("G_ReloadDefaults: Recording ID24 demos is currently not enabled. "
I_Error("Recording ID24 demos is currently not enabled. "
"Demo-compability in Complevel ID24 is not yet stable.");
if (demo_version < DV_MBF)
@ -4154,7 +4154,7 @@ static byte* G_WriteOptionsMBF21(byte* demo_p)
*demo_p++ = comp[i] != 0;
if (demo_p != target)
I_Error("mbf21_WriteOptions: MBF21_GAME_OPTION_SIZE is too small");
I_Error("MBF21_GAME_OPTION_SIZE is too small");
return demo_p;
}
@ -4230,7 +4230,7 @@ byte *G_WriteOptions(byte *demo_p)
*demo_p++ = 0;
if (demo_p != target)
I_Error("G_WriteOptions: GAME_OPTION_SIZE is too small");
I_Error("GAME_OPTION_SIZE is too small");
return target;
}

View File

@ -119,7 +119,7 @@ static weapontype_t NextWeapon(int direction)
if (i == arrlen(weapon_order))
{
I_Error("NextWeapon: Invalid weapon type %d", (int)weapon);
I_Error("Invalid weapon type %d", (int)weapon);
}
// Switch weapon. Don't loop forever.

View File

@ -147,7 +147,7 @@ void I_UpdateSoundParams(int channel, const sfxparams_t *params)
#ifdef RANGECHECK
if (channel < 0 || channel >= MAX_CHANNELS)
{
I_Error("I_UpdateSoundParams: channel out of range");
I_Error("channel out of range");
}
#endif
@ -325,7 +325,7 @@ void I_StopSound(int channel)
#ifdef RANGECHECK
if (channel < 0 || channel >= MAX_CHANNELS)
{
I_Error("I_StopSound: channel out of range");
I_Error("channel out of range");
}
#endif
@ -342,7 +342,7 @@ void I_PauseSound(int channel)
#ifdef RANGECHECK
if (channel < 0 || channel >= MAX_CHANNELS)
{
I_Error("I_PauseSound: channel out of range");
I_Error("channel out of range");
}
#endif
@ -362,7 +362,7 @@ void I_ResumeSound(int channel)
#ifdef RANGECHECK
if (channel < 0 || channel >= MAX_CHANNELS)
{
I_Error("I_ResumeSound: channel out of range");
I_Error("channel out of range");
}
#endif
@ -387,7 +387,7 @@ boolean I_SoundIsPlaying(int channel)
#ifdef RANGECHECK
if (channel < 0 || channel >= MAX_CHANNELS)
{
I_Error("I_SoundIsPlaying: channel out of range");
I_Error("channel out of range");
}
#endif
@ -404,7 +404,7 @@ boolean I_SoundIsPaused(int channel)
#ifdef RANGECHECK
if (channel < 0 || channel >= MAX_CHANNELS)
{
I_Error("I_SoundIsPaused: channel out of range");
I_Error("channel out of range");
}
#endif
@ -613,7 +613,7 @@ void I_SetMidiPlayer(void)
count_devices += array_size(strings);
}
I_Error("I_SetMidiPlayer: No music module could be initialized");
I_Error("No music module could be initialized");
}
boolean I_InitMusic(void)

View File

@ -166,7 +166,7 @@ void *I_Realloc(void *ptr, size_t size)
if (size != 0 && new_ptr == NULL)
{
I_Error("I_Realloc: failed on reallocation");
I_Error("failed on reallocation");
}
return new_ptr;

View File

@ -143,7 +143,7 @@ void I_InitTimer(void)
{
if (SDL_Init(SDL_INIT_TIMER) < 0)
{
I_Error("I_InitTimer: Failed to initialize timer: %s", SDL_GetError());
I_Error("Failed to initialize timer: %s", SDL_GetError());
}
#ifdef _WIN32
@ -161,7 +161,7 @@ void I_InitTimer(void)
}
if (hTimer == NULL)
{
I_Error("I_InitTimer: CreateWaitableTimer failed");
I_Error("CreateWaitableTimer failed");
}
#endif

View File

@ -57,7 +57,7 @@ static wchar_t *ConvertMultiByteToWide(const char *str, UINT code_page)
if (!wstr)
{
I_Error("ConvertUtf8ToWide: Failed to allocate new string");
I_Error("Failed to allocate new string");
return NULL;
}
@ -92,7 +92,7 @@ static char *ConvertWideToMultiByte(const wchar_t *wstr, UINT code_page)
if (!str)
{
I_Error("ConvertWideToMultiByte: Failed to allocate new string");
I_Error("Failed to allocate new string");
return NULL;
}

View File

@ -71,7 +71,7 @@ int M_FileLength(const char *path)
if (M_stat(path, &st) == -1)
{
I_Error("M_FileLength: stat error %s", strerror(errno));
I_Error("stat error %s", strerror(errno));
}
return st.st_size;
@ -378,7 +378,7 @@ char *M_StringReplace(const char *haystack, const char *needle,
result = malloc(result_len);
if (result == NULL)
{
I_Error("M_StringReplace: Failed to allocate new string");
I_Error("Failed to allocate new string");
return NULL;
}
@ -483,7 +483,7 @@ char *M_StringJoinInternal(const char *s[], size_t n)
{
if (s[i] == NULL)
{
I_Error("M_StringJoin: %d argument is NULL", i);
I_Error("%d argument is NULL", i);
}
length += strlen(s[i]);
@ -493,7 +493,7 @@ char *M_StringJoinInternal(const char *s[], size_t n)
if (result == NULL)
{
I_Error("M_StringJoin: Failed to allocate new string");
I_Error("Failed to allocate new string");
}
M_StringCopy(result, s[0], length);

View File

@ -47,7 +47,7 @@ void NET_AddModule(net_context_t *context, net_module_t *module)
{
if (context->num_modules >= MAX_MODULES)
{
I_Error("NET_AddModule: No more modules for context");
I_Error("No more modules for context");
}
context->modules[context->num_modules] = module;

View File

@ -91,8 +91,7 @@ static boolean NET_CL_InitClient(void)
static boolean NET_CL_InitServer(void)
{
I_Error("NET_CL_InitServer: attempted to initialize client pipe end as a "
"server!");
I_Error("attempted to initialize client pipe end as a server!");
return false;
}
@ -161,8 +160,7 @@ net_module_t net_loop_client_module =
static boolean NET_SV_InitClient(void)
{
I_Error("NET_SV_InitClient: attempted to initialize server pipe end as a "
"client!");
I_Error("attempted to initialize server pipe end as a client!");
return false;
}

View File

@ -823,7 +823,7 @@ void NET_QueryAddress(const char *addr_str)
if (addr == NULL)
{
I_Error("NET_QueryAddress: Host '%s' not found!", addr_str);
I_Error("Host '%s' not found!", addr_str);
}
// Add the address to the list of targets.

View File

@ -149,7 +149,7 @@ static void NET_SDL_FreeAddress(net_addr_t *addr)
}
}
I_Error("NET_SDL_FreeAddress: Attempted to remove an unused address!");
I_Error("Attempted to remove an unused address!");
}
static boolean NET_SDL_InitClient(void)
@ -177,7 +177,7 @@ static boolean NET_SDL_InitClient(void)
if (SDLNet_Init() < 0)
{
I_Error("NET_SDL_InitClient: Failed to initialize SDLNet: %s",
I_Error("Failed to initialize SDLNet: %s",
SDLNet_GetError());
}
@ -185,7 +185,7 @@ static boolean NET_SDL_InitClient(void)
if (udpsocket == NULL)
{
I_Error("NET_SDL_InitClient: Unable to open a socket!");
I_Error("Unable to open a socket!");
}
recvpacket = SDLNet_AllocPacket(1500);
@ -216,7 +216,7 @@ static boolean NET_SDL_InitServer(void)
if (SDLNet_Init() < 0)
{
I_Error("NET_SDL_InitServer: Failed to initialize SDLNet: %s",
I_Error("Failed to initialize SDLNet: %s",
SDLNet_GetError());
}
@ -224,7 +224,7 @@ static boolean NET_SDL_InitServer(void)
if (udpsocket == NULL)
{
I_Error("NET_SDL_InitServer: Unable to bind to port %i", port);
I_Error("Unable to bind to port %i", port);
}
recvpacket = SDLNet_AllocPacket(1500);
@ -282,7 +282,7 @@ static void NET_SDL_SendPacket(net_addr_t *addr, net_packet_t *packet)
if (!SDLNet_UDP_Send(udpsocket, -1, &sdl_packet))
{
I_Error("NET_SDL_SendPacket: Error transmitting packet: %s",
I_Error("Error transmitting packet: %s",
SDLNet_GetError());
}
}
@ -295,7 +295,7 @@ static boolean NET_SDL_RecvPacket(net_addr_t **addr, net_packet_t **packet)
if (result < 0)
{
I_Error("NET_SDL_RecvPacket: Error receiving packet: %s",
I_Error("Error receiving packet: %s",
SDLNet_GetError());
}

View File

@ -607,8 +607,7 @@ void NET_WriteProtocol(net_packet_t *packet, net_protocol_t protocol)
// If you add an entry to the net_protocol_t enum, a corresponding entry
// must be added to the protocol_names list.
I_Error("NET_WriteProtocol: protocol %d missing from protocol_names "
"list; please add it.",
I_Error("protocol %d missing from protocol_names list; please add it.",
protocol);
}

View File

@ -110,7 +110,7 @@ mapformat_t P_CheckMapFormat(int lumpnum)
if (W_LumpExistsWithName(lumpnum + ML_BLOCKMAP + 1, "BEHAVIOR"))
{
I_Error("P_SetupLevel: Hexen map format not supported in %s.\n",
I_Error("Hexen map format not supported in %s.\n",
lumpinfo[lumpnum].name);
}
@ -394,8 +394,7 @@ static void P_LoadSegs_XNOD(byte *data)
// Andrey Budko: check for wrong indexes
if ((unsigned)ldef->sidenum[side] >= (unsigned)numsides)
{
I_Error("P_LoadSegs_XNOD: linedef %d for seg %d references a "
"non-existent sidedef %d",
I_Error("linedef %d for seg %d references a non-existent sidedef %d",
linedef, i, (unsigned)ldef->sidenum[side]);
}
@ -475,8 +474,7 @@ static void P_LoadSegs_XGLN(byte *data)
if ((unsigned int)line >= (unsigned int)numlines)
{
I_Error("P_LoadSegs_XGLN: seg %d, %d references a "
"non-existent linedef %d",
I_Error("seg %d, %d references a non-existent linedef %d",
i, j, (unsigned int)line);
}
@ -485,14 +483,13 @@ static void P_LoadSegs_XGLN(byte *data)
if (side != 0 && side != 1)
{
I_Error("P_LoadSegs_XGLN: seg %d, %d references a "
"non-existent side %d",
I_Error("seg %d, %d references a non-existent side %d",
i, j, (unsigned int)side);
}
if ((unsigned)ldef->sidenum[side] >= (unsigned)numsides)
{
I_Error("P_LoadSegs_XGLN: linedef %d for seg %d, %d "
I_Error("linedef %d for seg %d, %d "
"references a non-existent sidedef %d",
line, i, j, (unsigned)ldef->sidenum[side]);
}
@ -592,8 +589,7 @@ void P_LoadNodes_XNOD(int lump, boolean compressed, boolean glnodes)
if (inflateInit(zstream) != Z_OK)
{
I_Error("P_LoadNodes_XNOD: Error during ZNOD nodes decompression "
"initialization!");
I_Error("Error during ZNOD nodes decompression initialization!");
}
// resize if output buffer runs full
@ -608,7 +604,7 @@ void P_LoadNodes_XNOD(int lump, boolean compressed, boolean glnodes)
if (err != Z_STREAM_END)
{
I_Error("P_LoadNodes_XNOD: Error during ZNOD nodes decompression!");
I_Error("Error during ZNOD nodes decompression!");
}
I_Printf(VB_DEBUG,
@ -619,8 +615,7 @@ void P_LoadNodes_XNOD(int lump, boolean compressed, boolean glnodes)
if (inflateEnd(zstream) != Z_OK)
{
I_Error("P_LoadNodes_XNOD: Error during ZNOD nodes decompression "
"shut-down!");
I_Error("Error during ZNOD nodes decompression shut-down!");
}
// release the original data lump
@ -684,7 +679,7 @@ void P_LoadNodes_XNOD(int lump, boolean compressed, boolean glnodes)
if (numSubs < 1)
{
I_Error("P_LoadNodes_XNOD: No subsectors in map!");
I_Error("No subsectors in map!");
}
numsubsectors = numSubs;
@ -710,7 +705,7 @@ void P_LoadNodes_XNOD(int lump, boolean compressed, boolean glnodes)
// subsectors
if (numSegs != currSeg)
{
I_Error("P_LoadNodes_XNOD: Incorrect number of segs in XNOD nodes!");
I_Error("Incorrect number of segs in XNOD nodes!");
}
numsegs = numSegs;

View File

@ -120,7 +120,7 @@ boolean P_GiveAmmo(player_t *player, ammotype_t ammo, int num)
return false;
if ((unsigned) ammo > NUMAMMO)
I_Error ("P_GiveAmmo: bad type %i", ammo);
I_Error ("bad type %i", ammo);
if ( player->ammo[ammo] == player->maxammo[ammo] )
return false;
@ -643,7 +643,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher)
break;
default:
// I_Error("P_SpecialThing: Unknown gettable thing");
// I_Error("Unknown gettable thing");
return; // killough 12/98: suppress error message
}

View File

@ -1235,7 +1235,7 @@ static void P_HitSlideLine(line_t *ld)
if (deltaangle > ANG180)
deltaangle += ANG180;
// I_Error ("SlideLine: ang>ANG180");
// I_Error ("ang>ANG180");
lineangle >>= ANGLETOFINESHIFT;
deltaangle >>= ANGLETOFINESHIFT;
@ -1256,7 +1256,7 @@ static boolean PTR_SlideTraverse(intercept_t *in)
#ifdef RANGECHECK
if (!in->isaline)
I_Error ("PTR_SlideTraverse: not a line?");
I_Error ("not a line?");
#endif
li = in->d.line;
@ -2438,7 +2438,7 @@ void P_CreateSecNodeList(mobj_t *thing,fixed_t x,fixed_t y)
void P_MapStart(void)
{
if (tmthing)
I_Error("P_MapStart: tmthing set!");
I_Error("tmthing set!");
}
void P_MapEnd(void)

View File

@ -2736,7 +2736,7 @@ void P_UnArchiveSpecials (void)
{
pusher->source = P_GetPushThing(pusher->affectee);
if (pusher->type == p_push && pusher->source == NULL)
I_Error("P_UnArchiveSpecials: Pusher thinker without source in sector %d",
I_Error("Pusher thinker without source in sector %d",
pusher->affectee);
}
P_AddThinker(&pusher->thinker);
@ -2762,8 +2762,7 @@ void P_UnArchiveSpecials (void)
break;
default:
I_Error ("P_UnarchiveSpecials:Unknown tclass %i "
"in savegame",tclass);
I_Error ("Unknown tclass %i in savegame",tclass);
}
}

View File

@ -221,7 +221,7 @@ void P_LoadSegs (int lump)
// Andrey Budko: check for wrong indexes
if ((unsigned)ldef->sidenum[side] >= (unsigned)numsides)
{
I_Error("P_LoadSegs: linedef %d for seg %d references a non-existent sidedef %d",
I_Error("linedef %d for seg %d references a non-existent sidedef %d",
linedef, i, (unsigned)ldef->sidenum[side]);
}

View File

@ -91,7 +91,7 @@ static boolean P_CrossSubsector(int num, register los_t *los)
#ifdef RANGECHECK
if (num >= numsubsectors)
I_Error("P_CrossSubsector: ss %i with numss = %i", num, numsubsectors);
I_Error("ss %i with numss = %i", num, numsubsectors);
#endif
for (count = subsectors[num].numlines; --count >= 0; seg++) // check lines

View File

@ -213,7 +213,7 @@ void P_InitPicAnims (void)
if (lastanim->speed < 65536 && lastanim->numpics != 1)
{
if (lastanim->numpics < 2)
I_Error ("P_InitPicAnims: bad cycle from %s to %s",
I_Error ("bad cycle from %s to %s",
animdefs[i].startname,
animdefs[i].endname);
}

View File

@ -147,7 +147,7 @@ void P_StartButton
return;
}
I_Error("P_StartButton: no button slots left!");
I_Error("no button slots left!");
}
//

View File

@ -613,7 +613,7 @@ static void R_Subsector(int num)
#ifdef RANGECHECK
if (num>=numsubsectors)
I_Error ("R_Subsector: ss %i with numss = %i", num, numsubsectors);
I_Error ("ss %i with numss = %i", num, numsubsectors);
#endif
sub = &subsectors[num];

View File

@ -686,7 +686,7 @@ void R_InitTextures (void)
offset = LONG(*directory);
if (offset > maxoff)
I_Error("R_InitTextures: bad texture directory");
I_Error("bad texture directory");
mtexture = (maptexture_t *) ( (byte *)maptex + offset);

View File

@ -108,8 +108,7 @@ byte dc_skycolor;
if ((unsigned)dc_x >= video.width || dc_yl < 0 \
|| dc_yh >= video.height) \
{ \
I_Error("DrawColumn" #NAME ": %i to %i at %i", dc_yl, dc_yh, \
dc_x); \
I_Error("%i to %i at %i", dc_yl, dc_yh, dc_x); \
} \
\
byte *dest = ylookup[dc_yl] + columnofs[dc_x]; \
@ -196,7 +195,7 @@ void R_DrawSkyColumn(void)
#ifdef RANGECHECK
if ((unsigned)dc_x >= video.width || dc_yl < 0 || dc_yh >= video.height)
{
I_Error("R_DrawSkyColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
I_Error("%i to %i at %i", dc_yl, dc_yh, dc_x);
}
#endif
@ -398,7 +397,7 @@ static void DrawFuzzColumnOriginal(void)
#ifdef RANGECHECK
if ((unsigned)dc_x >= video.width || dc_yl < 0 || dc_yh >= video.height)
{
I_Error("R_DrawFuzzColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
I_Error("%i to %i at %i", dc_yl, dc_yh, dc_x);
}
#endif
@ -478,7 +477,7 @@ static void DrawFuzzColumnBlocky(void)
#ifdef RANGECHECK
if ((unsigned)dc_x >= video.width || dc_yl < 0 || dc_yh >= video.height)
{
I_Error("R_DrawFuzzColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
I_Error("%i to %i at %i", dc_yl, dc_yh, dc_x);
}
#endif
@ -572,7 +571,7 @@ static void DrawFuzzColumnRefraction(void)
#ifdef RANGECHECK
if ((unsigned)dc_x >= video.width || dc_yl < 0 || dc_yh >= video.height)
{
I_Error("R_DrawFuzzColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
I_Error("%i to %i at %i", dc_yl, dc_yh, dc_x);
}
#endif
@ -640,7 +639,7 @@ static void DrawFuzzColumnShadow(void)
#ifdef RANGECHECK
if ((unsigned)dc_x >= video.width || dc_yl < 0 || dc_yh >= video.height)
{
I_Error("R_DrawFuzzColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
I_Error("%i to %i at %i", dc_yl, dc_yh, dc_x);
}
#endif

View File

@ -178,7 +178,7 @@ static void R_MapPlane(int y, int x1, int x2)
#ifdef RANGECHECK
if (x2 < x1 || x1<0 || x2>=viewwidth || (unsigned)y>viewheight)
I_Error ("R_MapPlane: %i, %i at %i",x1,x2,y);
I_Error ("%i, %i at %i",x1,x2,y);
#endif
// [FG] calculate flat coordinates relative to screen center

View File

@ -533,7 +533,7 @@ void R_StoreWallRange(const int start, const int stop)
#ifdef RANGECHECK
if (start >=viewwidth || start > stop)
I_Error ("Bad R_RenderWallRange: %i to %i", start , stop);
I_Error ("Bad range: %i to %i", start , stop);
#endif
sidedef = curline->sidedef;

View File

@ -142,7 +142,7 @@ static void R_InstallSpriteLump(int lump, unsigned frame,
}
if (frame >= MAX_SPRITE_FRAMES || rotation > 8)
I_Error("R_InstallSpriteLump: Bad frame characters in lump %i", lump);
I_Error("Bad frame characters in lump %i", lump);
if ((int) frame > maxframe)
maxframe = frame;
@ -288,8 +288,7 @@ void R_InitSpriteDefs(char **namelist)
int rotation;
for (rotation=0 ; rotation<8 ; rotation++)
if (sprtemp[frame].lump[rotation] == -1)
I_Error ("R_InitSprites: Sprite %.8s frame %c "
"is missing rotations",
I_Error ("Sprite %.8s frame %c is missing rotations",
namelist[i], frame+'A');
break;
}
@ -559,12 +558,12 @@ static void R_ProjectSprite (mobj_t* thing)
// decide which patch to use for sprite relative to player
if ((unsigned) thing->sprite >= num_sprites)
I_Error ("R_ProjectSprite: invalid sprite number %i", thing->sprite);
I_Error ("invalid sprite number %i", thing->sprite);
sprdef = &sprites[thing->sprite];
if ((thing->frame&FF_FRAMEMASK) >= sprdef->numframes)
I_Error ("R_ProjectSprite: invalid frame %i for sprite %s",
I_Error ("invalid frame %i for sprite %s",
thing->frame & FF_FRAMEMASK, sprnames[thing->sprite]);
sprframe = &sprdef->spriteframes[thing->frame & FF_FRAMEMASK];
@ -807,14 +806,14 @@ void R_DrawPSprite (pspdef_t *psp)
#ifdef RANGECHECK
if ((unsigned) psp->state->sprite >= num_sprites)
I_Error ("R_DrawPSprite: invalid sprite number %i", psp->state->sprite);
I_Error ("invalid sprite number %i", psp->state->sprite);
#endif
sprdef = &sprites[psp->state->sprite];
#ifdef RANGECHECK
if ((psp->state->frame&FF_FRAMEMASK) >= sprdef->numframes)
I_Error ("R_DrawPSprite: invalid frame %i for sprite %s",
I_Error ("invalid frame %i for sprite %s",
(int)(psp->state->frame & FF_FRAMEMASK),
sprnames[psp->state->sprite]);
#endif

View File

@ -94,7 +94,7 @@ static void S_StopChannel(int cnum)
#ifdef RANGECHECK
if (cnum < 0 || cnum >= snd_channels)
{
I_Error("S_StopChannel: handle %d out of range\n", cnum);
I_Error("handle %d out of range\n", cnum);
}
#endif
@ -201,7 +201,7 @@ static int S_getChannel(const mobj_t *origin, int priority, int singularity)
#ifdef RANGECHECK
if (cnum >= snd_channels)
{
I_Error("S_getChannel: handle %d out of range\n", cnum);
I_Error("handle %d out of range\n", cnum);
}
#endif
@ -286,7 +286,7 @@ static void StartSound(const mobj_t *origin, int sfx_id,
#ifdef RANGECHECK
if (cnum < 0 || cnum >= snd_channels)
{
I_Error("S_StartSfxInfo: handle %d out of range\n", cnum);
I_Error("handle %d out of range\n", cnum);
}
#endif

View File

@ -667,7 +667,7 @@ patch_t *V_CachePatchNum(int lump, pu_tag tag)
{
if (lump >= numlumps)
{
I_Error("V_CachePatchNum: %d >= numlumps", lump);
I_Error("%d >= numlumps", lump);
}
if (lumpcache[lump])
@ -774,7 +774,7 @@ void *V_CacheFlatNum(int lump, pu_tag tag)
{
if (lump >= numlumps)
{
I_Error("V_CacheFlatNum: %d >= numlumps", lump);
I_Error("%d >= numlumps", lump);
}
if (lumpcache[lump])
@ -831,7 +831,7 @@ int V_LumpSize(int lump)
{
if (lump >= numlumps)
{
I_Error("V_LumpFmtSize: %i >= numlumps", lump);
I_Error("%i >= numlumps", lump);
}
return lumpinfo[lump].fmt_size ? lumpinfo[lump].fmt_size

View File

@ -268,8 +268,8 @@ static void (*drawcolfunc)(const patch_column_t *patchcol);
if ((unsigned int)patchcol->x >= (unsigned int)video.width \
|| (unsigned int)patchcol->y1 >= (unsigned int)video.height) \
{ \
I_Error("DrawColumn" #NAME ": %i to %i at %i", patchcol->y1, \
patchcol->y2, patchcol->x); \
I_Error("%i to %i at %i", patchcol->y1, patchcol->y2, \
patchcol->x); \
} \
\
byte *dest = V_ADDRESS(dest_screen, patchcol->x, patchcol->y1); \
@ -685,7 +685,7 @@ void V_CopyRect(int srcx, int srcy, pixel_t *source, int width, int height,
|| srcy >= SCREENHEIGHT || destx + width < 0 || desty + height < 0
|| destx >= video.unscaledw || desty >= SCREENHEIGHT)
{
I_Error("Bad V_CopyRect");
I_Error("Bad coordinates");
}
#endif
@ -854,7 +854,7 @@ void V_GetBlock(int x, int y, int width, int height, byte *dest)
#ifdef RANGECHECK
if (x < 0 || x + width > video.width || y < 0 || y + height > video.height)
{
I_Error("Bad V_GetBlock");
I_Error("Bad coordinates");
}
#endif
@ -877,7 +877,7 @@ void V_PutBlock(int x, int y, int width, int height, byte *src)
#ifdef RANGECHECK
if (x < 0 || x + width > video.width || y < 0 || y + height > video.height)
{
I_Error("Bad V_PutBlock");
I_Error("Bad coordinates");
}
#endif

View File

@ -31,7 +31,7 @@ static int FileLength(int descriptor)
if (fstat(descriptor, &st) == -1)
{
I_Error("FileLength: failure in fstat\n");
I_Error("failure in fstat\n");
}
return st.st_size;
@ -82,7 +82,7 @@ static boolean W_FILE_AddDir(w_handle_t handle, const char *path,
int descriptor = M_open(filename, O_RDONLY | O_BINARY);
if (descriptor == -1)
{
I_Error("Error: opening %s", filename);
I_Error("Error opening %s", filename);
}
I_Printf(VB_INFO, " adding %s", filename);
@ -230,7 +230,7 @@ static void W_FILE_Read(w_handle_t handle, void *dest, int size)
int bytesread = read(handle.p1.descriptor, dest, size);
if (bytesread < size)
{
I_Error("W_ReadFile: only read %d of %d", bytesread, size);
I_Error("only read %d of %d", bytesread, size);
}
}

View File

@ -381,7 +381,7 @@ int W_GetNumForName (const char* name) // killough -- const added
{
int i = W_CheckNumForName (name);
if (i == -1)
I_Error ("W_GetNumForName: %.8s not found!", name); // killough .8 added
I_Error ("%.8s not found!", name); // killough .8 added
return i;
}
@ -440,7 +440,7 @@ void W_AddBaseDir(const char *path)
void W_InitMultipleFiles(void)
{
if (!numlumps)
I_Error ("W_InitFiles: no files found");
I_Error ("no files found");
//jff 1/23/98
// get all the sprites and flats into one marked block each
@ -477,7 +477,7 @@ void W_InitMultipleFiles(void)
int W_LumpLength (int lump)
{
if (lump >= numlumps)
I_Error ("W_LumpLength: %i >= numlumps",lump);
I_Error ("%i >= numlumps",lump);
return lumpinfo[lump].size;
}
@ -494,7 +494,7 @@ void W_ReadLump(int lump, void *dest)
#ifdef RANGECHECK
if (lump >= numlumps)
{
I_Error("W_ReadLump: %i >= numlumps", lump);
I_Error("%i >= numlumps", lump);
}
#endif
@ -525,7 +525,7 @@ void *W_CacheLumpNum(int lump, pu_tag tag)
{
#ifdef RANGECHECK
if ((unsigned)lump >= numlumps)
I_Error ("W_CacheLumpNum: %i >= numlumps",lump);
I_Error ("%i >= numlumps",lump);
#endif
if (!lumpcache[lump]) // read the lump in

View File

@ -59,7 +59,7 @@ static void AddWadInMem(w_handle_t handle, const char *name, int index,
if (!mz_zip_reader_extract_to_mem(zip, index, data, data_size, 0))
{
I_Error("AddWadInZip: mz_zip_reader_extract_to_mem failed");
I_Error("mz_zip_reader_extract_to_mem failed");
}
wadinfo_t header;
@ -242,7 +242,7 @@ static void W_ZIP_Read(w_handle_t handle, void *dest, int size)
if (!result)
{
I_Error("W_ZIP_Read: mz_zip_reader_extract_to_mem failed");
I_Error("mz_zip_reader_extract_to_mem failed");
}
}

View File

@ -58,7 +58,7 @@ void *Z_Malloc(size_t size, pu_tag tag, void **user)
memblock_t *block = NULL;
if (tag == PU_CACHE && !user)
I_Error ("Z_Malloc: An owner is required for purgable blocks");
I_Error ("An owner is required for purgable blocks");
if (!size)
return user ? *user = NULL : NULL; // malloc(0) returns NULL
@ -66,7 +66,7 @@ void *Z_Malloc(size_t size, pu_tag tag, void **user)
while (!(block = malloc(size + HEADER_SIZE)))
{
if (!blockbytag[PU_CACHE])
I_Error ("Z_Malloc: Failure trying to allocate %lu bytes", (unsigned long) size);
I_Error ("Failure trying to allocate %lu bytes", (unsigned long) size);
Z_FreeTag(PU_CACHE);
}
@ -104,7 +104,7 @@ void Z_Free(void *p)
block = (memblock_t *)((char *) p - HEADER_SIZE);
if (block->id != ZONEID)
I_Error("Z_Free: freed a pointer without ZONEID");
I_Error("freed a pointer without ZONEID");
block->id = 0; // Nullify id so another free fails
if (block->user) // Nullify user if one exists
@ -126,7 +126,7 @@ void Z_FreeTag(pu_tag tag)
memblock_t *block, *end_block;
if (tag < 0 || tag >= PU_MAX)
I_Error("Z_FreeTag: Tag %i does not exist", tag);
I_Error("Tag %i does not exist", tag);
block = blockbytag[tag];
if (!block)
@ -155,10 +155,10 @@ void Z_ChangeTag(void *ptr, pu_tag tag)
return;
if (block->id != ZONEID)
I_Error ("Z_ChangeTag: freed a pointer without ZONEID");
I_Error ("freed a pointer without ZONEID");
if (tag == PU_CACHE && !block->user)
I_Error ("Z_ChangeTag: an owner is required for purgable blocks\n");
I_Error ("an owner is required for purgable blocks\n");
if (block == block->next)
blockbytag[block->tag] = NULL;