PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
include/psp2/gxt.h
Go to the documentation of this file.
00001 
00015 #ifndef _PSP2_GXT_H_
00016 #define _PSP2_GXT_H_
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 #include <psp2/gxm.h>
00023 
00025 enum SceGxtErrorCode {
00026     SCE_OK = 0,
00027     SCE_GXT_ERROR_INVALID_ALIGNMENT,
00028     SCE_GXT_ERROR_INVALID_VALUE,
00029     SCE_GXT_ERROR_INVALID_POINTER
00030 };
00031 
00033 typedef struct SceGxtHeader {
00034     uint32_t tag;       
00035     uint32_t version;   
00036     uint32_t numTextures;   
00037     uint32_t dataOffset;    
00038     uint32_t dataSize;  
00039     uint32_t numP4Palettes; 
00040     uint32_t numP8Palettes; 
00041     uint32_t pad;       
00042 } SceGxtHeader;
00043 
00045 typedef struct SceGxtTextureInfo {
00046     uint32_t dataOffset;        
00047     uint32_t dataSize;      
00048     uint32_t paletteIndex;      
00049     uint32_t flags;         
00050     uint32_t controlWords[4];   
00051 } SceGxtTextureInfo;
00052 
00061 SceGxtErrorCode sceGxtCheckData(const void *gxt);
00062 
00069 const void *sceGxtGetDataAddress(const void *gxt);
00070 
00077 uint32_t sceGxtGetDataSize(const void *gxt);
00078 
00085 uint32_t sceGxtGetHeaderSize(const void *gxt);
00086 
00093 uint32_t sceGxtGetTextureCount(const void *gxt);
00094 
00108 SceGxtErrorCode sceGxtSetPalette(SceGxmTexture *texture,
00109                 const void *gxt,
00110                 const void *textureData,
00111                 uint32_t paletteIndex);
00112 
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116 
00117 #endif /* _PSP2_GXT_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines