mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- moved the "??? lumps" messages out of the single resource file handlers into the calling function and did a bit of include cleanup.
This commit is contained in:
parent
7d83dfa03a
commit
83befa7686
14 changed files with 29 additions and 42 deletions
|
@ -23,6 +23,18 @@ typedef int32_t fixed_t;
|
|||
|
||||
typedef uint32_t angle_t;
|
||||
|
||||
#if defined(__GNUC__)
|
||||
// With versions of GCC newer than 4.2, it appears it was determined that the
|
||||
// cost of an unaligned pointer on PPC was high enough to add padding to the
|
||||
// end of packed structs. For whatever reason __packed__ and pragma pack are
|
||||
// handled differently in this regard. Note that this only needs to be applied
|
||||
// to types which are used in arrays or sizeof is needed. This also prevents
|
||||
// code from taking references to the struct members.
|
||||
#define FORCE_PACKED __attribute__((__packed__))
|
||||
#else
|
||||
#define FORCE_PACKED
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define GCCPRINTF(stri,firstargi) __attribute__((format(printf,stri,firstargi)))
|
||||
|
|
|
@ -40,18 +40,6 @@ typedef TMap<int, PClassActor *> FClassMap;
|
|||
#define NOVTABLE
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
// With versions of GCC newer than 4.2, it appears it was determined that the
|
||||
// cost of an unaligned pointer on PPC was high enough to add padding to the
|
||||
// end of packed structs. For whatever reason __packed__ and pragma pack are
|
||||
// handled differently in this regard. Note that this only needs to be applied
|
||||
// to types which are used in arrays or sizeof is needed. This also prevents
|
||||
// code from taking references to the struct members.
|
||||
#define FORCE_PACKED __attribute__((__packed__))
|
||||
#else
|
||||
#define FORCE_PACKED
|
||||
#endif
|
||||
|
||||
#include "basics.h"
|
||||
#include "printf.h"
|
||||
|
||||
|
|
|
@ -39,8 +39,7 @@
|
|||
|
||||
#include "resourcefile.h"
|
||||
#include "cmdlib.h"
|
||||
#include "v_text.h"
|
||||
#include "w_wad.h"
|
||||
#include "printf.h"
|
||||
|
||||
|
||||
|
||||
|
@ -314,8 +313,6 @@ bool F7ZFile::Open(bool quiet, LumpFilterInfo *filter)
|
|||
}
|
||||
}
|
||||
|
||||
if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
|
||||
|
||||
GenerateHash();
|
||||
PostProcessArchive(&Lumps[0], sizeof(F7ZLump), filter);
|
||||
return true;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "resourcefile.h"
|
||||
#include "cmdlib.h"
|
||||
#include "doomtype.h"
|
||||
#include "printf.h"
|
||||
#include "findfile.h"
|
||||
|
||||
|
||||
|
@ -183,7 +183,6 @@ int FDirectory::AddDirectory(const char *dirpath)
|
|||
bool FDirectory::Open(bool quiet, LumpFilterInfo* filter)
|
||||
{
|
||||
NumLumps = AddDirectory(FileName);
|
||||
if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
PostProcessArchive(&Lumps[0], sizeof(FDirectoryLump), filter);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
*/
|
||||
|
||||
#include "resourcefile.h"
|
||||
#include "w_wad.h"
|
||||
#include "doomtype.h"
|
||||
#include "printf.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -118,7 +117,6 @@ bool FGrpFile::Open(bool quiet, LumpFilterInfo*)
|
|||
fileinfo[i].NameWithZero[12] = '\0'; // Be sure filename is null-terminated
|
||||
Lumps[i].LumpNameSetup(fileinfo[i].NameWithZero);
|
||||
}
|
||||
if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
|
||||
GenerateHash();
|
||||
delete[] fileinfo;
|
||||
return true;
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
|
||||
#include "resourcefile.h"
|
||||
#include "cmdlib.h"
|
||||
#include "w_wad.h"
|
||||
#include "doomtype.h"
|
||||
#include "printf.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
*/
|
||||
|
||||
#include "resourcefile.h"
|
||||
#include "w_wad.h"
|
||||
#include "doomtype.h"
|
||||
#include "printf.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -103,8 +102,6 @@ bool FPakFile::Open(bool quiet, LumpFilterInfo* filter)
|
|||
|
||||
Lumps.Resize(NumLumps);
|
||||
|
||||
if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
|
||||
|
||||
for(uint32_t i = 0; i < NumLumps; i++)
|
||||
{
|
||||
Lumps[i].LumpNameSetup(fileinfo[i].name);
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
|
||||
#include "resourcefile.h"
|
||||
#include "templates.h"
|
||||
#include "w_wad.h"
|
||||
#include "doomtype.h"
|
||||
#include "printf.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -151,7 +150,6 @@ bool FRFFFile::Open(bool quiet, LumpFilterInfo*)
|
|||
|
||||
Lumps = new FRFFLump[NumLumps];
|
||||
|
||||
if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
|
||||
for (uint32_t i = 0; i < NumLumps; ++i)
|
||||
{
|
||||
Lumps[i].Position = LittleLong(lumps[i].FilePos);
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "resourcefile.h"
|
||||
#include "v_text.h"
|
||||
#include "w_wad.h"
|
||||
#include "gi.h"
|
||||
#include "engineerrors.h"
|
||||
|
||||
//==========================================================================
|
||||
|
@ -176,7 +175,13 @@ bool FWadFile::Open(bool quiet, LumpFilterInfo*)
|
|||
char n[9];
|
||||
uppercopy(n, fileinfo[i].Name);
|
||||
n[8] = 0;
|
||||
// This needs to be done differently. We cannot simply assume that all lumps where the first character's high bit is set are compressed without verification.
|
||||
// This requires explicit toggling for precisely the files that need it.
|
||||
#if 0
|
||||
Lumps[i].Compressed = !(gameinfo.flags & GI_SHAREWARE) && (n[0] & 0x80) == 0x80;
|
||||
#else
|
||||
Lumps[i].Compressed = false;
|
||||
#endif
|
||||
n[0] &= ~0x80;
|
||||
Lumps[i].LumpNameSetup(n);
|
||||
|
||||
|
@ -202,8 +207,6 @@ bool FWadFile::Open(bool quiet, LumpFilterInfo*)
|
|||
|
||||
if (!quiet) // don't bother with namespaces in quiet mode. We won't need them.
|
||||
{
|
||||
if (!batchrun) Printf(", %d lumps\n", NumLumps);
|
||||
|
||||
SetNamespace("S_START", "S_END", ns_sprites);
|
||||
SetNamespace("F_START", "F_END", ns_flats, true);
|
||||
SetNamespace("C_START", "C_END", ns_colormaps);
|
||||
|
|
|
@ -119,7 +119,6 @@ bool FWHResFile::Open(bool quiet, LumpFilterInfo*)
|
|||
NumLumps = i;
|
||||
Lumps.Clamp(NumLumps);
|
||||
Lumps.ShrinkToFit();
|
||||
if (!quiet) Printf(", %d lumps\n", NumLumps);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
#include "file_zip.h"
|
||||
#include "cmdlib.h"
|
||||
#include "templates.h"
|
||||
#include "v_text.h"
|
||||
#include "w_wad.h"
|
||||
#include "printf.h"
|
||||
#include "w_zip.h"
|
||||
|
||||
#include "ancientzip.h"
|
||||
|
@ -338,8 +337,6 @@ bool FZipFile::Open(bool quiet, LumpFilterInfo* filter)
|
|||
NumLumps -= skipped;
|
||||
free(directory);
|
||||
|
||||
if (!quiet && !batchrun) Printf(TEXTCOLOR_NORMAL ", %d lumps\n", NumLumps);
|
||||
|
||||
GenerateHash();
|
||||
PostProcessArchive(&Lumps[0], sizeof(FZipLump), filter);
|
||||
return true;
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
#include <zlib.h>
|
||||
#include "resourcefile.h"
|
||||
#include "cmdlib.h"
|
||||
#include "w_wad.h"
|
||||
#include "gi.h"
|
||||
#include "doomstat.h"
|
||||
#include "doomtype.h"
|
||||
#include "md5.h"
|
||||
|
||||
|
||||
|
|
|
@ -377,6 +377,8 @@ void FWadCollection::AddFile (const char *filename, FileReader *wadr, bool quiet
|
|||
|
||||
if (resfile != NULL)
|
||||
{
|
||||
if (!quiet && !batchrun) Printf(", %d lumps\n", resfile->LumpCount());
|
||||
|
||||
uint32_t lumpstart = LumpInfo.Size();
|
||||
|
||||
resfile->SetFirstLump(lumpstart);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __W_ZIP
|
||||
#define __W_ZIP
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#pragma pack(1)
|
||||
// FZipCentralInfo
|
||||
struct FZipEndOfCentralDirectory
|
||||
|
|
Loading…
Reference in a new issue