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
+1 -1
View File
@@ -1,7 +1,7 @@
#include "devil1pld.h"
#include <stdio.h>
namespace_struct const DEVIL1PLD = {getpldh, sizeofpldstruct, printpldh};
fn_devil1pld const DEVIL1PLD = {getpldh, sizeofpldstruct, printpldh};
static bool getpldh(struct PldHeader *ph, const char *filedata) {
bool good = false;
+11 -5
View File
@@ -2,7 +2,13 @@
#include <stdio.h>
#include <stdbool.h>
void printtph (struct TexturePack *tp) {
fn_devil1tex const DEVIL1TEX = {printtph,
printtbd,
gettexdescriptor,
gettexbatch,
unpacktexbatch};
static void printtph (struct TexturePack *tp) {
if (tp != NULL) {
printf("id: \t %c %c %c %c \n", tp -> id[3],
tp -> id[2],
@@ -15,7 +21,7 @@ void printtph (struct TexturePack *tp) {
return;
}
void printtbd(struct TextureBatchDescriptor *bd) {
static void printtbd(struct TextureBatchDescriptor *bd) {
if (bd != NULL) {
printf("batch index: \t %i \n", bd -> batchIdx);
printf("hash: \t %u \n", bd -> hash);
@@ -23,7 +29,7 @@ void printtbd(struct TextureBatchDescriptor *bd) {
}
}
bool gettexdescriptor(struct TextureBatchDescriptor **descriptor,
static bool gettexdescriptor(struct TextureBatchDescriptor **descriptor,
unsigned int i,
const char *filedata,
unsigned int filesize) {
@@ -38,7 +44,7 @@ bool gettexdescriptor(struct TextureBatchDescriptor **descriptor,
return done;
}
bool gettexbatch(struct TextureBatch **batch,
static bool gettexbatch(struct TextureBatch **batch,
unsigned int i,
const char *filedata,
unsigned int filesize) {
@@ -67,7 +73,7 @@ bool gettexbatch(struct TextureBatch **batch,
return true;
}
bool unpacktexbatch(struct Texture *t,
static bool unpacktexbatch(struct Texture *t,
unsigned int i,
const char *filedata,
const unsigned int filesize) {