RetroArch
Classes | Macros | Typedefs | Functions | Variables
tpl.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <malloc.h>
#include <gcutil.h>
#include <gccore.h>
#include "tpl.h"
#include "processor.h"
Include dependency graph for tpl.c:

Classes

struct  _tplimgheader
 
struct  _tplpalheader
 
struct  _tpldesc
 

Macros

#define TPL_FILE_TYPE_DISC   0
 
#define TPL_FILE_TYPE_MEM   1
 
#define TPL_HDR_VERSION_FIELD   0
 
#define TPL_HDR_NTEXTURE_FIELD   4
 
#define TPL_HDR_HDRSIZE_FIELD   8
 
#define TPL_HDR_DESCR_FIELD   12
 

Typedefs

typedef struct _tplimgheader TPLImgHeader
 
typedef struct _tplpalheader TPLPalHeader
 
typedef struct _tpldesc TPLDescHeader
 

Functions

static u32 TPL_GetTextureSize (u32 width, u32 height, u32 fmt)
 
s32 TPL_OpenTPLFromFile (TPLFile *tdf, const char *file_name)
 
s32 TPL_OpenTPLFromMemory (TPLFile *tdf, void *memory, u32 len)
 
s32 TPL_GetTextureInfo (TPLFile *tdf, s32 id, u32 *fmt, u16 *width, u16 *height)
 
s32 TPL_GetTexture (TPLFile *tdf, s32 id, GXTexObj *texObj)
 
s32 TPL_GetTextureCI (TPLFile *tdf, s32 id, GXTexObj *texObj, GXTlutObj *tlutObj, u8 tluts)
 
void TPL_CloseTPLFile (TPLFile *tdf)
 

Variables

struct _tplimgheader ATTRIBUTE_PACKED
 

Macro Definition Documentation

◆ TPL_FILE_TYPE_DISC

#define TPL_FILE_TYPE_DISC   0

◆ TPL_FILE_TYPE_MEM

#define TPL_FILE_TYPE_MEM   1

◆ TPL_HDR_DESCR_FIELD

#define TPL_HDR_DESCR_FIELD   12

◆ TPL_HDR_HDRSIZE_FIELD

#define TPL_HDR_HDRSIZE_FIELD   8

◆ TPL_HDR_NTEXTURE_FIELD

#define TPL_HDR_NTEXTURE_FIELD   4

◆ TPL_HDR_VERSION_FIELD

#define TPL_HDR_VERSION_FIELD   0

Typedef Documentation

◆ TPLDescHeader

typedef struct _tpldesc TPLDescHeader

◆ TPLImgHeader

typedef struct _tplimgheader TPLImgHeader

◆ TPLPalHeader

typedef struct _tplpalheader TPLPalHeader

Function Documentation

◆ TPL_CloseTPLFile()

void TPL_CloseTPLFile ( TPLFile tdf)
Here is the call graph for this function:

◆ TPL_GetTexture()

s32 TPL_GetTexture ( TPLFile tdf,
s32  id,
GXTexObj texObj 
)
Here is the call graph for this function:

◆ TPL_GetTextureCI()

s32 TPL_GetTextureCI ( TPLFile tdf,
s32  id,
GXTexObj texObj,
GXTlutObj tlutObj,
u8  tluts 
)
Here is the call graph for this function:

◆ TPL_GetTextureInfo()

s32 TPL_GetTextureInfo ( TPLFile tdf,
s32  id,
u32 fmt,
u16 width,
u16 height 
)

◆ TPL_GetTextureSize()

static u32 TPL_GetTextureSize ( u32  width,
u32  height,
u32  fmt 
)
static
Here is the caller graph for this function:

◆ TPL_OpenTPLFromFile()

s32 TPL_OpenTPLFromFile ( TPLFile tdf,
const char *  file_name 
)
Here is the call graph for this function:

◆ TPL_OpenTPLFromMemory()

s32 TPL_OpenTPLFromMemory ( TPLFile tdf,
void memory,
u32  len 
)

Variable Documentation

◆ ATTRIBUTE_PACKED

struct _tpldesc ATTRIBUTE_PACKED