Addressed warnings for texture module

This commit is contained in:
_ 2018-04-19 05:30:13 -07:00
parent ed2ee7bf71
commit dd5af2004d
2 changed files with 38 additions and 31 deletions

View File

@ -39,16 +39,27 @@ struct TextureBatch {
#pragma pack(pop)
typedef struct {
// input: pointer to struct
void (* const printheader) (struct TexturePack*);
// input: pointer to struct
void (* const printbatchdesc)(struct TextureBatchDescriptor*);
// input: pointer of pointer to struct, order, file data, file size
// ** = 'pass by reference' of a pointer to struct
bool (* const getbatchdesc) (struct TextureBatchDescriptor**,
unsigned int,
const char *,
unsigned int);
// input: pointer of pointer to struct, order, file data, file size
// ** = 'pass by reference' of a pointer to struct
bool (* const getbatch) (struct TextureBatch**,
unsigned int,
const char*,
unsigned int);
// input: pointer to struct, order, file data, file size
bool (* const gettextures) (struct Texture*,
unsigned int,
const char*,
@ -56,34 +67,4 @@ typedef struct {
} fn_devil1tex;
extern fn_devil1tex const DEVIL1TEX;
// -------------------------------------------------------+
// Functions
// -------------------------------------------------------+
// Print Texture Pack Header.
static void printtph(struct TexturePack*);
// Print Texture Batch Descriptor.
static void printtbd(struct TextureBatchDescriptor*);
// Get Texture Batch Descriptor.
// ** = 'pass by reference' of a pointer to struct
static bool gettexdescriptor(struct TextureBatchDescriptor**,
unsigned int,
const char *,
unsigned int);
// Get Texture Batch.
// ** = 'pass by reference' of a pointer to struct
static bool gettexbatch(struct TextureBatch**,
unsigned int,
const char*,
unsigned int);
// Unpack Texture Batch
static bool unpacktexbatch(struct Texture*,
unsigned int,
const char*,
const unsigned int);
#endif

View File

@ -2,6 +2,32 @@
#include <stdio.h>
#include <stdbool.h>
// Print Texture Pack Header.
static void printtph(struct TexturePack*);
// Print Texture Batch Descriptor.
static void printtbd(struct TextureBatchDescriptor*);
// Get Texture Batch Descriptor.
static bool gettexdescriptor(struct TextureBatchDescriptor**,
unsigned int,
const char *,
unsigned int);
// Get Texture Batch.
static bool gettexbatch(struct TextureBatch**,
unsigned int,
const char*,
unsigned int);
// Unpack Texture Batch
static bool unpacktexbatch(struct Texture*,
unsigned int,
const char*,
const unsigned int);
fn_devil1tex const DEVIL1TEX = {printtph,
printtbd,
gettexdescriptor,