C# Class BCH.BCHTool

Show file Open project: SciresM/FEAT

Public Methods

Method Description
FormatToBPP ( int format ) : double
analyze ( string path, byte input ) : BCH
parseBCH ( string path ) : bool

Private Methods

Method Description
C11 ( UInt32 x ) : UInt32
ConvertETC1 ( IntPtr dataout, UInt32 &dataoutsize, IntPtr datain, UInt32 &datainsize, UInt16 wd, UInt16 ht, bool alpha ) : void
DM2X ( UInt32 code ) : UInt32
DM2Y ( UInt32 code ) : UInt32
DecodeColor ( uint val, int format ) : Color
GetA8 ( Color c ) : byte
GetL8 ( Color c ) : byte
GetLA4 ( Color c ) : byte
GetLA8 ( Color c ) : ushort
GetRGB565 ( Color c ) : ushort
GetRGBA4444 ( Color c ) : ushort
GetRGBA5551 ( Color c ) : ushort
GetRGBA8888 ( Color c ) : uint
convert8to5 ( int colorval ) : byte
d2xy ( uint d, uint &x, uint &y ) : void

Decimal Ordinate In to X / Y Coordinate Out

gcm ( int n, int m ) : int

Greatest common multiple (to round up)

getColorCount ( Bitmap img ) : int
getIMG ( BCHTexture bchtex, byte data ) : Bitmap
getIMG_ETC1 ( BCHTexture bchtex, byte data ) : Bitmap
nlpo2 ( int x ) : int

Next Largest Power of 2

parseEntry ( BCHTexture bchtex, byte data ) : Bitmap
xy2d ( uint x, uint y ) : uint

Combines X/Y Coordinates to a decimal ordinate.

Method Details

FormatToBPP() public static method

public static FormatToBPP ( int format ) : double
format int
return double

analyze() public static method

public static analyze ( string path, byte input ) : BCH
path string
input byte
return BCH

parseBCH() public static method

public static parseBCH ( string path ) : bool
path string
return bool