Metaphrasis Class Reference

A static conversion class for transforming RGBA image buffers into verious GX texture formats for Wii homebrew development. More...

#include <Metaphrasis.h>

List of all members.

Public Member Functions

 Metaphrasis ()
virtual ~Metaphrasis ()

Static Public Member Functions

static uint32_t * convertBufferToI4 (uint32_t *rgbaBuffer, uint16_t bufferWidth, uint16_t bufferHeight)
static uint32_t * convertBufferToI8 (uint32_t *rgbaBuffer, uint16_t bufferWidth, uint16_t bufferHeight)
static uint32_t * convertBufferToIA4 (uint32_t *rgbaBuffer, uint16_t bufferWidth, uint16_t bufferHeight)
static uint32_t * convertBufferToIA8 (uint32_t *rgbaBuffer, uint16_t bufferWidth, uint16_t bufferHeight)
static uint32_t * convertBufferToRGBA8 (uint32_t *rgbaBuffer, uint16_t bufferWidth, uint16_t bufferHeight)
static uint32_t * convertBufferToRGB565 (uint32_t *rgbaBuffer, uint16_t bufferWidth, uint16_t bufferHeight)
static uint32_t * convertBufferToRGB5A3 (uint32_t *rgbaBuffer, uint16_t bufferWidth, uint16_t bufferHeight)
static uint8_t convertRGBAToIA4 (uint32_t rgba)
static uint16_t convertRGBAToIA8 (uint32_t rgba)
static uint16_t convertRGBAToRGB565 (uint32_t rgba)
static uint16_t convertRGBAToRGB5A3 (uint32_t rgba)


Detailed Description

A static conversion class for transforming RGBA image buffers into verious GX texture formats for Wii homebrew development.

Author:
Armin Tamzarian
Version:
0.1.0
Metaphrasis is a static conversion class for transforming RGBA image buffers into verious GX texture formats for Wii homebrew development. Metaphrasis is written in C++ and makes use of a community standard and newly developed algorithms for conversion of 32-bit RGBA data buffers into various GX texture formats common to both the Gamecube and Wii platforms.

Constructor & Destructor Documentation

Metaphrasis::Metaphrasis (  ) 

Default constructor for the Metaphrasis class.

Metaphrasis::~Metaphrasis (  )  [virtual]

Default destructor for the Metaphrasis class.


Member Function Documentation

uint32_t * Metaphrasis::convertBufferToI4 ( uint32_t *  rgbaBuffer,
uint16_t  bufferWidth,
uint16_t  bufferHeight 
) [static]

Convert the specified RGBA data buffer into the I4 texture format

This routine converts the RGBA data buffer into the I4 texture format and returns a pointer to the converted buffer.

Parameters:
rgbaBuffer Buffer containing the temporarily rendered RGBA data.
bufferWidth Pixel width of the data buffer.
bufferHeight Pixel height of the data buffer.
Returns:
A pointer to the allocated buffer.

uint32_t * Metaphrasis::convertBufferToI8 ( uint32_t *  rgbaBuffer,
uint16_t  bufferWidth,
uint16_t  bufferHeight 
) [static]

Convert the specified RGBA data buffer into the I8 texture format

This routine converts the RGBA data buffer into the I8 texture format and returns a pointer to the converted buffer.

Parameters:
rgbaBuffer Buffer containing the temporarily rendered RGBA data.
bufferWidth Pixel width of the data buffer.
bufferHeight Pixel height of the data buffer.
Returns:
A pointer to the allocated buffer.

uint32_t * Metaphrasis::convertBufferToIA4 ( uint32_t *  rgbaBuffer,
uint16_t  bufferWidth,
uint16_t  bufferHeight 
) [static]

Convert the specified RGBA data buffer into the IA4 texture format

This routine converts the RGBA data buffer into the IA4 texture format and returns a pointer to the converted buffer.

Parameters:
rgbaBuffer Buffer containing the temporarily rendered RGBA data.
bufferWidth Pixel width of the data buffer.
bufferHeight Pixel height of the data buffer.
Returns:
A pointer to the allocated buffer.

uint32_t * Metaphrasis::convertBufferToIA8 ( uint32_t *  rgbaBuffer,
uint16_t  bufferWidth,
uint16_t  bufferHeight 
) [static]

Convert the specified RGBA data buffer into the IA8 texture format

This routine converts the RGBA data buffer into the IA8 texture format and returns a pointer to the converted buffer.

Parameters:
rgbaBuffer Buffer containing the temporarily rendered RGBA data.
bufferWidth Pixel width of the data buffer.
bufferHeight Pixel height of the data buffer.
Returns:
A pointer to the allocated buffer.

uint32_t * Metaphrasis::convertBufferToRGBA8 ( uint32_t *  rgbaBuffer,
uint16_t  bufferWidth,
uint16_t  bufferHeight 
) [static]

Convert the specified RGBA data buffer into the RGBA8 texture format

This routine converts the RGBA data buffer into the RGBA8 texture format and returns a pointer to the converted buffer.

Parameters:
rgbaBuffer Buffer containing the temporarily rendered RGBA data.
bufferWidth Pixel width of the data buffer.
bufferHeight Pixel height of the data buffer.
Returns:
A pointer to the allocated buffer.

uint32_t * Metaphrasis::convertBufferToRGB565 ( uint32_t *  rgbaBuffer,
uint16_t  bufferWidth,
uint16_t  bufferHeight 
) [static]

Convert the specified RGBA data buffer into the RGB565 texture format

This routine converts the RGBA data buffer into the RGB565 texture format and returns a pointer to the converted buffer.

Parameters:
rgbaBuffer Buffer containing the temporarily rendered RGBA data.
bufferWidth Pixel width of the data buffer.
bufferHeight Pixel height of the data buffer.
Returns:
A pointer to the allocated buffer.

uint32_t * Metaphrasis::convertBufferToRGB5A3 ( uint32_t *  rgbaBuffer,
uint16_t  bufferWidth,
uint16_t  bufferHeight 
) [static]

Convert the specified RGBA data buffer into the RGB5A3 texture format

This routine converts the RGBA data buffer into the RGB5A3 texture format and returns a pointer to the converted buffer.

Parameters:
rgbaBuffer Buffer containing the temporarily rendered RGBA data.
bufferWidth Pixel width of the data buffer.
bufferHeight Pixel height of the data buffer.
Returns:
A pointer to the allocated buffer.

uint8_t Metaphrasis::convertRGBAToIA4 ( uint32_t  rgba  )  [static]

Downsample the specified RGBA value data buffer to an IA4 value.

This routine downsamples the given RGBA data value into the IA4 texture data format.

Parameters:
rgba A 32-bit RGBA value to convert to the IA4 format.
Returns:
The IA4 value of the given RGBA value.

uint16_t Metaphrasis::convertRGBAToIA8 ( uint32_t  rgba  )  [static]

Downsample the specified RGBA value data buffer to an IA8 value.

This routine downsamples the given RGBA data value into the IA8 texture data format.

Parameters:
rgba A 32-bit RGBA value to convert to the IA8 format.
Returns:
The IA8 value of the given RGBA value.

uint16_t Metaphrasis::convertRGBAToRGB565 ( uint32_t  rgba  )  [static]

Downsample the specified RGBA value data buffer to an RGB565 value.

This routine downsamples the given RGBA data value into the RGB565 texture data format. Attribution for this routine is given fully to NoNameNo of GRRLIB Wii library.

Parameters:
rgba A 32-bit RGBA value to convert to the RGB565 format.
Returns:
The RGB565 value of the given RGBA value.

uint16_t Metaphrasis::convertRGBAToRGB5A3 ( uint32_t  rgba  )  [static]

Downsample the specified RGBA value data buffer to an RGB5A3 value.

This routine downsamples the given RGBA data value into the RGB5A3 texture data format. Attribution for this routine is given fully to WiiGator via the TehSkeen forum.

Parameters:
rgba A 32-bit RGBA value to convert to the RGB5A3 format.
Returns:
The RGB5A3 value of the given RGBA value.


The documentation for this class was generated from the following files:

Generated on Wed Jan 7 13:27:58 2009 by  doxygen 1.5.6