X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=wad.c;h=b05227512b855dd606e5e9853a084a35700c174d;hb=63f63b8fdbc839ab5da9f3eccda24817d4ebc7be;hp=fabffc3b9205aeb50e16ae56c858a27d11805279;hpb=0766a43538f3b526cba347157d5259bb3e5785a9;p=xonotic%2Fdarkplaces.git diff --git a/wad.c b/wad.c index fabffc3b..b0522751 100644 --- a/wad.c +++ b/wad.c @@ -174,22 +174,22 @@ void W_LoadTextureWadFile (char *filename, int complain) if (!file) { if (complain) - Con_Printf("W_LoadTextureWadFile: couldn't find %s\n", filename); + Con_Errorf("W_LoadTextureWadFile: couldn't find %s\n", filename); return; } if (FS_Read(file, &header, sizeof(wadinfo_t)) != sizeof(wadinfo_t)) - {Con_Print("W_LoadTextureWadFile: unable to read wad header\n");FS_Close(file);file = NULL;return;} + {Con_Error("W_LoadTextureWadFile: unable to read wad header\n");FS_Close(file);file = NULL;return;} if(memcmp(header.identification, "WAD3", 4)) - {Con_Printf("W_LoadTextureWadFile: Wad file %s doesn't have WAD3 id\n",filename);FS_Close(file);file = NULL;return;} + {Con_Errorf("W_LoadTextureWadFile: Wad file %s doesn't have WAD3 id\n",filename);FS_Close(file);file = NULL;return;} numlumps = LittleLong(header.numlumps); if (numlumps < 1 || numlumps > 65536) - {Con_Printf("W_LoadTextureWadFile: invalid number of lumps (%i)\n", numlumps);FS_Close(file);file = NULL;return;} + {Con_Errorf("W_LoadTextureWadFile: invalid number of lumps (%i)\n", numlumps);FS_Close(file);file = NULL;return;} infotableofs = LittleLong(header.infotableofs); if (FS_Seek (file, infotableofs, SEEK_SET)) - {Con_Print("W_LoadTextureWadFile: unable to seek to lump table\n");FS_Close(file);file = NULL;return;} + {Con_Error("W_LoadTextureWadFile: unable to seek to lump table\n");FS_Close(file);file = NULL;return;} if (!wad.hlwads.mempool) Mem_ExpandableArray_NewArray(&wad.hlwads, cls.permanentmempool, sizeof(mwad_t), 16); @@ -200,7 +200,7 @@ void W_LoadTextureWadFile (char *filename, int complain) if (!w->lumps) { - Con_Print("W_LoadTextureWadFile: unable to allocate temporary memory for lump table\n"); + Con_Error("W_LoadTextureWadFile: unable to allocate temporary memory for lump table\n"); FS_Close(w->file); w->file = NULL; w->numlumps = 0; @@ -209,7 +209,7 @@ void W_LoadTextureWadFile (char *filename, int complain) if (FS_Read(file, w->lumps, sizeof(lumpinfo_t) * w->numlumps) != (fs_offset_t)sizeof(lumpinfo_t) * numlumps) { - Con_Print("W_LoadTextureWadFile: unable to read lump table\n"); + Con_Error("W_LoadTextureWadFile: unable to read lump table\n"); FS_Close(w->file); w->file = NULL; w->numlumps = 0;