Added namespace structs for textures

This commit is contained in:
_
2018-04-17 20:03:06 -07:00
parent 40db88d4eb
commit 48f255eb36
5 changed files with 41 additions and 17 deletions

View File

@@ -17,8 +17,8 @@ typedef struct {
bool (* const getheader) (struct PldHeader*, const char*);
int (* const sizeofsector)(struct PldHeader*, unsigned int, unsigned int);
void (* const printheader) (struct PldHeader*);
} namespace_struct;
extern namespace_struct const DEVIL1PLD;
} fn_devil1pld;
extern fn_devil1pld const DEVIL1PLD;
// input: pointer to a struct, contents of the .pld file.
// * = pass by reference of a struct PldHeader

View File

@@ -38,32 +38,50 @@ struct TextureBatch {
#pragma pack(pop)
typedef struct {
void (* const printheader) (struct TexturePack*);
void (* const printbatchdesc)(struct TextureBatchDescriptor*);
bool (* const getbatchdesc) (struct TextureBatchDescriptor**,
unsigned int,
const char *,
unsigned int);
bool (* const getbatch) (struct TextureBatch**,
unsigned int,
const char*,
unsigned int);
bool (* const gettextures) (struct Texture*,
unsigned int,
const char*,
const unsigned int);
} fn_devil1tex;
extern fn_devil1tex const DEVIL1TEX;
// -------------------------------------------------------+
// Functions
// -------------------------------------------------------+
// Print Texture Pack Header.
void printtph(struct TexturePack*);
static void printtph(struct TexturePack*);
// Print Texture Batch Descriptor.
void printtbd(struct TextureBatchDescriptor*);
static void printtbd(struct TextureBatchDescriptor*);
// Get Texture Batch Descriptor.
// ** = 'pass by reference' of a pointer to struct
bool gettexdescriptor(struct TextureBatchDescriptor**,
static bool gettexdescriptor(struct TextureBatchDescriptor**,
unsigned int,
const char *,
unsigned int);
// Get Texture Batch.
// ** = 'pass by reference' of a pointer to struct
bool gettexbatch(struct TextureBatch**,
static bool gettexbatch(struct TextureBatch**,
unsigned int,
const char*,
unsigned int);
// Unpack Texture Batch
bool unpacktexbatch(struct Texture*,
static bool unpacktexbatch(struct Texture*,
unsigned int,
const char*,
const unsigned int);