1#ifndef __CONSOLE_SWIZZLER_INCLUDE_CONSOLE_SWIZZLER_H__
2#define __CONSOLE_SWIZZLER_INCLUDE_CONSOLE_SWIZZLER_H__
12#define _SWIZ_EXTERN __declspec(dllexport) extern
14#define _SWIZ_EXTERN __attribute__((visibility("default"))) extern
18#define _SWIZ_ENUM(s) typedef unsigned int s; enum
21#define SWIZ_VERSION "0.4.0"
22#define SWIZ_VERSION_INT 400
48 SWIZ_ERROR_UNKNOWN_PLATFORM,
49 SWIZ_ERROR_INVALID_TEXTURE_SIZE,
50 SWIZ_ERROR_INVALID_BLOCK_INFO,
51 SWIZ_ERROR_INVALID_ARRAY_SIZE,
52 SWIZ_ERROR_INVALID_GOBS_HEIGHT,
53 SWIZ_ERROR_MEMORY_ALLOC,
54 SWIZ_ERROR_NULL_POINTER,
72 SWIZ_PLATFORM_UNK = 0,
180 int block_width,
int block_height,
181 int block_data_size);
#define _SWIZ_EXTERN
Definition: console-swizzler.h:14
_SWIZ_EXTERN const char * swizGetVersion()
Gets the version of console-swizzler.
_SWIZ_EXTERN int swizGetVersionAsInt()
Gets the version of console-swizzler as an integer.
_SWIZ_EXTERN const char * swizGetErrorMessage(SwizError error)
Gets an error message for #SwizError.
#define _SWIZ_ENUM(s)
Definition: console-swizzler.h:18
Class for context of swizzling.
_SWIZ_EXTERN SwizError swizDoSwizzle(const uint8_t *data, uint8_t *swizzled, SwizContext *context)
Swizzles a texture.
_SWIZ_EXTERN void swizFreeContext(SwizContext *context)
Frees the memory of a context.
_SWIZ_EXTERN SwizError swizContextGetLastError(SwizContext *context)
Gets error status of context.
_SWIZ_EXTERN void swizContextSetHasMips(SwizContext *context, int has_mips)
Sets if textures have mipmaps or not.
_SWIZ_EXTERN SwizError swizDoUnswizzle(const uint8_t *data, uint8_t *unswizzled, SwizContext *context)
Unswizzles a texture.
_SWIZ_EXTERN uint8_t * swizAllocSwizzledData(SwizContext *context)
Allocates a buffer for swizzled data.
_SWIZ_EXTERN SwizContext * swizNewContext()
Creates a new context.
_SWIZ_EXTERN SwizError swizContextSetGobsHeight(SwizContext *context, int gobs_height)
Sets the max height of GOBs blocks for switch.
_SWIZ_EXTERN SwizError swizContextSetPlatform(SwizContext *context, SwizPlatform platform)
Sets platform information to context.
_SWIZ_EXTERN uint8_t * swizAllocUnswizzledData(SwizContext *context)
Allocates a buffer for unswizzled data.
_SWIZ_EXTERN SwizError swizContextSetBlockInfo(SwizContext *context, int block_width, int block_height, int block_data_size)
Sets block size to context.
_SWIZ_EXTERN void swizContextInit(SwizContext *context)
Initialize attributes of a context.
_SWIZ_EXTERN uint32_t swizGetSwizzledSize(SwizContext *context)
Gets binary size of swizzled data.
_SWIZ_EXTERN uint32_t swizGetUnswizzledSize(SwizContext *context)
Gets binary size of unswizzled data.
_SWIZ_EXTERN SwizError swizContextSetArraySize(SwizContext *context, int array_size)
Sets the number of textures in a buffer.
_SWIZ_EXTERN SwizError swizContextSetTextureSize(SwizContext *context, int width, int height)
Sets width and height to context.