PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
Data Structures | Typedefs | Enumerations | Functions
include/psp2/gxt.h File Reference

Header file which defines GXT variables and functions. More...

#include <psp2/gxm.h>
Include dependency graph for gxt.h:

Go to the source code of this file.

Data Structures

struct  SceGxtHeader
struct  SceGxtTextureInfo

Typedefs

typedef struct SceGxtHeader SceGxtHeader
typedef struct SceGxtTextureInfo SceGxtTextureInfo

Enumerations

enum  SceGxtErrorCode { SCE_OK = 0, SCE_GXT_ERROR_INVALID_ALIGNMENT, SCE_GXT_ERROR_INVALID_VALUE, SCE_GXT_ERROR_INVALID_POINTER }

Functions

SceGxtErrorCode sceGxtCheckData (const void *gxt)
const void * sceGxtGetDataAddress (const void *gxt)
uint32_t sceGxtGetDataSize (const void *gxt)
uint32_t sceGxtGetHeaderSize (const void *gxt)
uint32_t sceGxtGetTextureCount (const void *gxt)
SceGxtErrorCode sceGxtSetPalette (SceGxmTexture *texture, const void *gxt, const void *textureData, uint32_t paletteIndex)

Detailed Description

Header file which defines GXT variables and functions.

The GXT library facilitates the runtime manipulation of GXT files produced using the offline texture tools.

Copyright (C) 2015 PSP2SDK Project

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.


Typedef Documentation

typedef struct SceGxtHeader SceGxtHeader

Header for a GXT file

This structure contains information about each texture in the GXT file


Enumeration Type Documentation

GXT error codes


Function Documentation

SceGxtErrorCode sceGxtCheckData ( const void *  gxt)

Checks if a pointer is a valid GXT file.

Parameters:
gxtpointer to the GXT data
Return values:
SCE_OK
SCE_GXT_ERROR_INVALID_VALUEMagic or version invalid
const void* sceGxtGetDataAddress ( const void *  gxt)

Gets the start address of the texture data.

Parameters:
gxtpointer to the GXT data
Returns:
A pointer to the start of the texture data
uint32_t sceGxtGetDataSize ( const void *  gxt)

Gets the size of the texture data.

Parameters:
gxtpointer to the GXT data
Returns:
The size of the texture data in bytes
uint32_t sceGxtGetHeaderSize ( const void *  gxt)

Gets the header size of a GXT file.

Parameters:
gxtpointer to the GXT data
Returns:
The size of the header in bytes
uint32_t sceGxtGetTextureCount ( const void *  gxt)

Gets the texture count in a GXT file.

Parameters:
gxtpointer to the GXT data
Returns:
The number of textures.
SceGxtErrorCode sceGxtSetPalette ( SceGxmTexture texture,
const void *  gxt,
const void *  textureData,
uint32_t  paletteIndex 
)

Sets the palette of a given texture.

Parameters:
texturepointer to the texture
gxtpointer to the GXT data
textureDatapointer to the start of texture data
paletteIndexpalette index
Return values:
SCE_OK
SCE_GXT_ERROR_INVALID_ALIGNMENT
SCE_GXT_ERROR_INVALID_VALUE
SCE_GXT_ERROR_INVALID_POINTER
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines