// Online Manual-Specific Headers #ifndef HBM_NETWORKMANUAL_H_ #define HBM_NETWORKMANUAL_H_ #ifdef __cplusplus extern "C" { #endif /*__cplusplus */ #define HBM_ADD_LAYOUT #include typedef struct { void* layoutBuf; void* msgBuf; void* graphicBuf; void* reserve; u16 width; u16 height; GXTexFmt texFmt; } HBMNetworkManualInfo; // Be absolutely sure to call this between HBMCreate and HBMInit. void HBMCreateEx( const HBMNetworkManualInfo* input ); // Call this if you only want to deallocate additional data without calling HBMDelete(). void HBMDeleteEx(); #define JPG_NOERROR 0 #define JPG_GET_BUFFER_SIZE_ERROR -1 #define JPG_DECODE_ERROR -2 /*---------------------------------------------------------------------------* Name: HBMJPGGetTextureBufferSize Description: Gets the required size of the texture buffer from JPEG data. The computational cost of finding the size by calculation can be lowered if you know the texture size in advance. Arguments: *jpeg_workarea - Work memory for decoding JPEGs *buffersize - Returns the data size of the buffer *width - Returns the width of the buffer *height - Returns the height of the buffer *jpg - JPEG stream jpg_size - JPEG stream size format - Format of the texture to output Returns: *---------------------------------------------------------------------------*/ s32 HBMJPGGetTextureBufferSize( void *jpeg_workarea, s32 *buffersize, u16 *width, u16 *height, void *jpg, u32 jpg_size, GXTexFmt format ); /*---------------------------------------------------------------------------* Name: HBMJPGMakeTextureBuffer Description: Decodes from a JPEG into a texture buffer Arguments: *jpeg_workarea - Work memory for decoding JPEGs *result - Destination buffer for the decoding buf_size - Buffer size of the destination buffer for the decoding *jpg - JPEG stream jpg_size - JPEG stream size format - Format of the texture to output Returns: *---------------------------------------------------------------------------*/ s32 HBMJPGMakeTextureBuffer( void *jpeg_workarea, void *result, u32 buf_size, void *jpg, u32 jpg_size, GXTexFmt format ); #ifdef __cplusplus } #endif /*__cplusplus */ #endif /* HBM_NETWORKMANUAL_H_ */