mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-25 16:28:57 +05:30
Added docs for texture component
This commit is contained in:
parent
d6ef6e3dc5
commit
4bed12289b
99
docs/doc-tex.txt
Normal file
99
docs/doc-tex.txt
Normal file
@ -0,0 +1,99 @@
|
||||
|
||||
devil1tex.h / devil1tex.c
|
||||
Handles texture packages.
|
||||
|
||||
Functions
|
||||
All functions are static but exposed by a function pointer in a constant
|
||||
struct called DEVIL1TEX. For example, clients call functions using
|
||||
DEVIL1TEX.printheader(...);
|
||||
|
||||
|
||||
void printheader(struct TexturePack*);
|
||||
Prints the attributes and values of a header to standard output.
|
||||
|
||||
input: pointer to a TexturePack struct.
|
||||
|
||||
void printbatchdesc(struct TextureBatchDescriptor*);
|
||||
Prints the attributes and values if a TextureBatchDescriptor to
|
||||
standard output.
|
||||
|
||||
bool getbatchdesc(struct TextureBatchDescriptor**,
|
||||
unsigned int,
|
||||
const char *,
|
||||
unsigned int);
|
||||
Retrieves the i-th TextureBatchDescriptor from a buffer.
|
||||
|
||||
input:
|
||||
Pointer to a pointer of TextureBatchDescriptor.
|
||||
This is pass by reference of a pointer to the function.
|
||||
The pointer to TextureBatchDescriptor can be NULL and will be
|
||||
set to point to a region in the const char*.
|
||||
|
||||
unsigned int, the i-th instance of a TextureBatchDescriptor in
|
||||
the const char*.
|
||||
|
||||
const char*, the buffer containing the whole texture pack file.
|
||||
|
||||
unsigned int, the size of the buffer.
|
||||
|
||||
output:
|
||||
true when successfully retrieving a pointer to
|
||||
TextureBatchDescriptor.
|
||||
|
||||
false when unsuccesful in retrieving a pointer to
|
||||
TextureBatchDescriptor; failed checks against segmentation
|
||||
faults.
|
||||
When const char* (buffer) is NULL.
|
||||
|
||||
When the location of the TextureBatchDescriptor will exceed
|
||||
the size of a buffer.
|
||||
|
||||
bool getbatch(struct TextureBatch**,
|
||||
unsigned int,
|
||||
const char*
|
||||
unsigned int);
|
||||
Retrieves i-th instance of a TextureBatch from a buffer.
|
||||
|
||||
input:
|
||||
Pointer to a pointer of TextureBatch.
|
||||
This is pass by reference of a pointer to the function.
|
||||
The pointer to a TextureBatch can be NULL and will be set to
|
||||
point to a region in the const char*.
|
||||
|
||||
unsigned int, the i-th instance of a TextureBatch in the
|
||||
const char*.
|
||||
|
||||
const char*, the buffer containing the whole texture pack file.
|
||||
|
||||
unsigned int, the size of the buffer.
|
||||
|
||||
output:
|
||||
true on success.
|
||||
|
||||
false when failing checks against segmentation faults.
|
||||
When const char* is NULL.
|
||||
|
||||
When the location of the Texture Batch will exceed the size
|
||||
of the buffer.
|
||||
|
||||
bool gettextures(struct Texture*,
|
||||
unsigned int,
|
||||
const char*,
|
||||
unsigned int);
|
||||
Retrieves textures of the i-th batch from a buffer.
|
||||
|
||||
input:
|
||||
Pointer to Texture. This can be an array of Textures.
|
||||
This parameter can not be NULL.
|
||||
|
||||
unsigned int, the i-th instance the TextureBatch containing
|
||||
the files.
|
||||
|
||||
const char*, the buffer containing the whole texture pack file.
|
||||
|
||||
unsigned int, size of the buffer.
|
||||
|
||||
output:
|
||||
true on success.
|
||||
|
||||
false when failing checks against segmentation faults.
|
Loading…
Reference in New Issue
Block a user