From dd5af2004da45ab3a4247ccfdf45a797ac54db36 Mon Sep 17 00:00:00 2001 From: _ <_> Date: Thu, 19 Apr 2018 05:30:13 -0700 Subject: [PATCH] Addressed warnings for texture module --- include/devil1tex.h | 43 ++++++++++++------------------------------- src/devil1tex.c | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/include/devil1tex.h b/include/devil1tex.h index bc37674..52a61b8 100644 --- a/include/devil1tex.h +++ b/include/devil1tex.h @@ -39,51 +39,32 @@ 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); - bool (* const gettextures) (struct Texture*, + +// input: pointer to struct, order, file data, file size +bool (* const gettextures) (struct Texture*, unsigned int, const char*, const unsigned int); } 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 diff --git a/src/devil1tex.c b/src/devil1tex.c index ed1417d..b27fc81 100644 --- a/src/devil1tex.c +++ b/src/devil1tex.c @@ -2,6 +2,32 @@ #include #include +// 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,