GLLib: ASprite Class Reference

GLLib

ASprite Class Reference
[ASprite]

ASprite Aurora Sprite class. More...

List of all members.


Public Member Functions

void ResizeCoords ()
 To be documented...
int scaleX (int x)
 To be documented.
int scaleY (int y)
 To be documented.
void SetPool (int poolIndex)
 set cache pool of ASprite
void SetResizeParameters (int spriteId, int resizeMode, boolean correctY)
 To be documented.

Static Public Member Functions

static int Crc32 (byte buffer[], int start, int count, int crc)
 Crc32.
static void InitCachePool (int poolCount)
 Initialize Cache Pool.
static void InitPoolSize (int poolIndex, int size)
 Initialize pool size.
static void ResetCachePool (int poolIndex)
 Release pool.
static void SetTempBuffer (Object pArray)
 Sets the temporary buffer array to be used for decoding operations.

Static Public Attributes

static final int BASE = 65521
static final int BLOCK_INFO_SIZE = 11
static final int CRC32_POLYNOMIAL = 0xEDB88320
static int crcTable [] = new int[256]
static final int HEADER_LEVEL0_MAX_WBITS = 30938
static final int NMAX = 5552
static final int PAL_BLEND_BLACK = 5
static final int PAL_BLUE_CYAN = 2
static final int PAL_GREEN = 3
static final int PAL_GREY = 4
static final int PAL_INVISIBLE = 0
static final int PAL_ORIGINAL = -1
static final int PAL_RED_YELLOW = 1
static final int PNG_INFO_SIZE = 57

Static Protected Attributes

static final byte IDAT [] = { 'I', 'D', 'A', 'T' }
static final byte IEND [] = { 'I', 'E', 'N', 'D' }
static final byte IHDR [] = { 'I', 'H', 'D', 'R' }
static final byte INFO32 [] = { 8, 6, 0, 0, 0 }
static final byte INFO8 [] = { 8, 3, 0, 0, 0 }
static final byte MAGIC [] = { -119, 80, 78, 71, 13, 10, 26, 10 }
static final byte[] MAGIC_IEND = {0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, (byte)0xae, 0x42, 0x60, (byte)0x82}
static final byte PLTE [] = { 'P', 'L', 'T', 'E' }
static final byte tRNS [] = { 't', 'R', 'N', 'S' }

Package Functions

 ASprite ()
 Empty constructor. Does nothing.
void BuildAnimCacheImages (int palette, int anim)
 Create cache images for all modules all frame used by a animation.
void BuildCacheImages (int pal, int m1, int m2, int pal_copy)
 Build Cache Images for this sprite.
void BuildFrameCacheImages (int palette, int frame)
 Create cache images for all modules used by a frame.
int CountFrameModules (int frame)
 Count the number of modules in a frame.
Object DecodeImage (int module)
 Decodes loaded module data.
void DecodeImageToByteArray (byte[] dest, int module, boolean img2dRGBA, boolean half)
 Decodes loaded module data to a byte array.
void DrawNumber (Graphics g, int num, int radix, int minDigit, int x, int y, int anchor, boolean restorecol)
 Draws text given a number.
void DrawNumber (Graphics g, int num, int minDigit, int x, int y, int anchor)
 Draws text given a number.
void DrawPage (Graphics g, String s, int x, int y, int anchor, int start, int end)
 Draws a string with appropriate newline characters as a page given a start and end.
void DrawPage (Graphics g, String s, int x, int y, int anchor)
 Draws a string with appropriate newline characters as a page.
void DrawPage (Graphics g, byte[] s, int x, int y, int anchor)
 Draws a byte array containing a string with appropriate newline characters as a page.
void DrawPageB (Graphics g, String s, short[] info, int x, int y, int startLine, int maxLines, int anchor)
 Draws a string with appropriate newline characters and wrapping information as a page.
void DrawString (Graphics g, String s, int x, int y, int anchor, boolean restorecol)
 Draws text given a string.
void DrawString (Graphics g, byte[] bs, int x, int y, int anchor, boolean restorecol)
 Draws text given a byte array containing a string.
void DrawString (Graphics g, String s, int x, int y, int anchor)
 Draws text given a string.
void DrawString (Graphics g, byte[] bs, int x, int y, int anchor)
 Draws text given a byte array containing a string.
void DrawStringOrChars (Graphics g, String s, char[] charBuff, int x, int y, int anchor, boolean restorecol)
void FreeAnimCacheImages (int palette, int anim)
 Free cache images for all modules of all frames used by a animation.
void FreeCacheData ()
 Free all cached data.
void FreeFrameCacheImages (int palette, int frame)
 Free cache images for all modules used by a frame.
void FreeMemory ()
 Free data after the modules have been cached.
void FreeModuleImage (int nPal, int nMod)
 Frees a cached module.
int GetAFrameFlags (int anim, int aframe)
 Gets the flags associated with a frame in an animation.
void GetAFrameRect (int anim, int aframe, int rectIndex, int[] rect, int flags)
 Get a FrameRect from a specific anim and aframe.
void GetAFrameRect (int[] rc, int anim, int aframe, int posX, int posY, int flags)
 Gets the rectangle occupied by an animation frame if it were to be drawn at posX/posY with flags.
int GetAFrames (int anim)
 Get the number of frames in an animation.
int GetAFramesOX (int v)
 To be documented.
int GetAFramesOY (int v)
 To be documented.
int GetAFrameTime (int anim, int aframe)
 Gets the time of a frame in an animation.
int GetAnimFrame (int anim, int aframe)
 Gets the ID of a frame inside an animation.
boolean GetBold ()
 Gets a value that indicates whether this Font is Bold.
int GetCharFrame (int c)
byte[] GetCharMap ()
 Returns the current character map used by DrawString.
short[][] GetCharMapShort ()
 new text rendering
int getCharSize (char c)
 Gets the width of the given character using this sprite.
int GetCharSpacing ()
 Gets the current character spacing for the sprite.
int GetCurrentMMapping ()
 Gets the current Module mapping index.
int GetCurrentPalette ()
 Gets the current palette for the sprite @ returns the current palette.
int GetFModuleOX (int v)
 To be documented.
int GetFModuleOY (int v)
 To be documented.
void GetFModuleRect (int[] rc, int frame, int fmodule, int posX, int posY, int flags, int hx, int hy)
 Gets the rectangle occupied by a module in a frame if it were to be drawn at posX/posY with flags.
int GetFModules (int frame)
 Get the number of modules in a frame.
int GetFontHeight ()
 Gets the font height of the sprite.
int GetFrameCount ()
 Get the number of frames in the sprite.
int GetFrameHeight (int frame)
 Gets the height of a frame.
int[] GetFrameMarkers (int frame)
 Get all the marker module positions of a frame.
int GetFrameModule (int frame, int fmodule)
 Get the id of a module in a frame.
int GetFrameModuleFlags (int frame, int fmodule)
 Get the flags set on a module in a frame.
int GetFrameModuleHeight (int frame, int fmodule)
 Get the height of a module inside a frame.
int GetFrameModulePalette (int frame, int fmodule)
 Retrieve a frame module's palette, if the sprite is exported using BS_FM_PALETTE flag.
int GetFrameModuleWidth (int frame, int fmodule)
 Get the width of a module inside a frame.
int GetFrameModuleX (int frame, int fmodule)
 Gets the X coordinate of a module inside a frame.
int GetFrameModuleY (int frame, int fmodule)
 Gets the Y coordinate of a module inside a frame.
void GetFrameRect (int frame, int rectIndex, int[] rect, int flags)
 Get a FrameRect from a specific frame.
void GetFrameRect (int[] rc, int frame, int posX, int posY, int flags)
 Gets the rectangle occupied by a frame if it were to be drawn at posX/posY with flags.
void GetFrameRect (int[] rc, int frame, int posX, int posY, int flags, int hx, int hy)
 Gets the rectangle occupied by a frame if it were to be drawn at posX/posY with flags.
int GetFrameRectCount (int frame)
 Get The FrameRect count for a specific frame.
int GetFrames ()
 Gets the number of frames in the sprite.
int GetFrameWidth (int frame)
 Gets the width of a frame.
int GetLineHeight ()
 Gets the current line height of the sprite.
int GetLineSpacing ()
 Returns the current line spacing for the sprite.
int GetModuleCount ()
 Get the number of modules in the sprite.
Object GetModuleData (int nModule, int nPalette)
 Get the Module's Data of a specific Palette.
int GetModuleHeight (int module)
 Gets the height of a module.
int GetModuleHeightOrg (int module)
 To be documented.
Image GetModuleImage (int nModule, int nPalette)
 Get the Module's Image of a specific Palette.
void GetModuleRect (int[] rc, int module, int posX, int posY, int flags)
 Gets the rectangle occupied by a module if it were to be drawn at posX/posY with flags.
int GetModuleWidth (int module)
 Gets the width of a module.
int GetModuleWidthOrg (int module)
 To be documented.
int GetModuleX (int module)
 Gets the x coordinate of a module.
int GetModuleY (int module)
 Gets the y coordinate of a module.
Object GetPalette (int nPalette)
 Gets a palette array.
int GetSpaceWidth ()
 Gets the current space width of the sprite.
boolean GetUnderline ()
 Gets a value that indicates whether this Font is underlined.
void Load (byte[] file, int offset, int pal_flags, int tr_flags, Image sprImage)
 Load the sprite from the given byte array and associated image.
void Load (byte[] file, int offset, Image sprImage)
 Load the sprite from the given byte array and associated image.
void Load (byte[] file, int offset, int pal_flags, int tr_flags)
 Load the sprite from the given byte array with flags.
void Load (byte[] file, int offset)
 Load the sprite from the given byte array.
void ModifyPalette (int palNb, int color)
 Modify palette, original palette will turn into the alpha value, and set one and only color for all palette original palette = 0x00RRGGBB, color parameter = 0x00CCCCCC result palette = 0xBBCCCCCC.
void ModifyPaletteAlpha (int palNb, int alpha)
 Modify the alpha value of a palette.
void ModifyPaletteAlphaUsingAltPalette (int p_iPaletteID, int p_iAlphaPaletteID)
 Modify palette, original palette will have its alpha channel set using the second palette's RED channel.
void ModifyPaletteAlphaUsingLastPalette (int p_iPaletteID)
 This is just a wrapper around ModifyPaletteAlphaUsingAltPalette which automatically uses the last palette for the alpha information.
void PaintAFrame (Graphics g, int anim, int aframe, int posX, int posY, int flags, int hx, int hy)
 Draws an animation frame at PosX/PosY with Flags.
void PaintAFrame (Graphics g, int anim, int aframe, int posX, int posY, int flags)
 Draws an animation frame at PosX/PosY with Flags.
void PaintFModule (Graphics g, int frame, int fmodule, int posX, int posY, int flags, int hx, int hy)
 Draws a module from a frame at PosX/PosY with Flags.
void PaintFModule (Graphics g, int frame, int fmodule, int posX, int posY, int flags)
 Draws a module from a frame at PosX/PosY with Flags.
void PaintFrame (Graphics g, int frame, int posX, int posY, int flags, int hx, int hy)
 Draws a frame at PosX/PosY with Flags.
void PaintFrame (Graphics g, int frame, int posX, int posY, int flags)
 Draws a frame at PosX/PosY with Flags.
void PaintModule (Graphics g, int module, int posX, int posY, int flags)
 Draws a module at PosX/PosY with Flags.
void PaintPrecomputedFrame (Graphics g, int x, int y, int frame)
 Paints a pre-computed frame at x, y.
void PrecomputeAllFrames (Graphics g)
 Precomputes all frames.
void PrecomputeFrame (Graphics g, int frame, int flags)
 Precompute a frame.
void SetBold (boolean bBold)
 Sets the bold for the font.
void SetCharMap (short[] pNewMap)
 Sets the character map used by DrawString for the new text rendering code.
void SetCharMap (byte[] pNewMap)
 Sets the character map used by DrawString.
void SetCharSpacing (int spacing)
 Sets the character spacing for the sprite.
void SetCharSpacingToDefault ()
 Reverts the character spacing to default for the sprite.
void SetCurrentMMapping (int map)
 Sets the current Module mapping index.
void SetCurrentPalette (int pal)
 Sets the current palette for the sprite.
void SetDefaultFontMetrics ()
 Sets the default values for font ascent, descent, height, space, and line spacing, based on the data found in the sprite file.
void SetLineHeight (int nHeight)
 Sets the line height for the sprite.
void SetLineHeightToDefault ()
 Reverts the line height to the default for the sprite.
void SetLineSpacing (int spacing)
 Sets the line spacing for the sprite.
void SetLineSpacingToDefault ()
 Reverts line spacing to the default for the sprite.
void SetModuleImage (Image pImg, int nModule, int nPalette)
 Set the Module's Image of a specific Palette.
void SetModuleImagesArray (Object pData)
 Sets the module cached image array.
void SetModuleMapping (int map, byte[] mmp)
 Set the module mapping at an index.
void SetSpaceWidth (int spacing)
 Sets the space width of the sprite.
void SetSpaceWidthToDefault ()
 Reverts the space width to the default for the sprite.
void SetUnderline (boolean bUnderline)
 Sets the underline for the font.
String TextFitToFixedWidth (String str, int text_w)
 Fits the supplied string to a given width.
byte[] TextFitToFixedWidth (byte[] str, int text_w)
 Fits the supplied byte array containing a string to a given width.
int[] TransformRGB (int[] image_data, int sizeX, int sizeY, int flags)
 Applies transformations to an RGB buffer.
void unload ()
 unload the sprite
void UpdateNumberSize (int num, int radix, int minDigit)
 Updates the text size for the sprite given a number.
void UpdateStringOrCharsSize (String s, char[] charBuff)
void UpdateStringSize (String s)
 Updates the current string size for the sprite given a string.
void UpdateStringSize (byte[] bs)
 Updates the current string size for the sprite given a byte array containing a string.
short[] WraptextB (String s, int width, int height)
 Wraps the provided string to a given area and returns an array containing the wrapped configuration.

Static Package Functions

 [static initializer]
static void DrawLine (Graphics g, int x1, int y1, int x2, int y2, int color, int radius, int initial)
 Bresenham's Line-Drawing Algorithm.
static short[] GenPalette (int type, short[] pal)
 Generates a palette based on another palette.
static int[] GenPalette (int type, int[] pal)
 Generates a palette based on another palette.
static int GetChars (char[] charBuf, int i, int radix, int minDigit)
static int GetCurrentStringHeight ()
 Gets the current string height used by DrawString.
static int GetCurrentStringWidth ()
 Gets the current string width used by DrawString.
static void SetCharMapStatic (byte[] pNewMap)
 Sets the character map used by DrawString from a static context.
static void SetGraphics (Graphics g1)
 Sets the current graphics context.
static void SetSubString (int i1, int i2)
 Set the current substring.
static int StringTokenize (String s, int index1, int index2, char token, int[] indices)
 Tokenize a string given a separating token character.

Package Attributes

byte[] _aframes
byte[] _aframes_flags
byte[] _aframes_frame
byte[] _aframes_ox_byte
short[] _aframes_ox_short
byte[] _aframes_oy_byte
short[] _aframes_oy_short
byte[] _aframes_time
boolean _alpha
short[] _anims_af_start
byte[] _anims_naf
int[][] _aryPrecomputedFlags
Object[][] _aryPrecomputedImages
short[][] _aryPrecomputedImgX
short[][] _aryPrecomputedImgY
short[][] _aryPrecomputedSizeX
short[][] _aryPrecomputedSizeY
short[][] _aryPrecomputedX
short[][] _aryPrecomputedY
int _bs_flags
boolean _bTraceNow
int _colors
int _cur_pal
int _cur_pool = -1
 which pool the cached images will be created in */
short _data_format
byte[] _fmodules
byte[] _fmodules_flags
byte[] _fmodules_id
byte[] _fmodules_ox_byte
short[] _fmodules_ox_short
byte[] _fmodules_oy_byte
short[] _fmodules_oy_short
byte[] _fmodules_pal
byte[] _frames_col
short[] _frames_col_short
short[] _frames_fm_start
byte[] _frames_nfm
byte[] _frames_rc
short[] _frames_rc_short
byte[] _frames_rects
short[] _frames_rects_short
short[] _frames_rects_start
byte[][] _gifHeader
int[] _header_size
int _i64rle_color_bits
int _i64rle_color_mask
Image[] _main_image
short[][] _map
byte[] _module_colors_byte
int[] _module_colors_int
Image[][] _module_image_imageAA
Image[][][] _module_image_imageAAA
int[][][] _module_image_intAAA
byte[] _module_types
byte[] _modules_data
int[] _modules_data_off_int
short[] _modules_data_off_short
short[] _modules_extra_info
short[] _modules_extra_pointer
byte[] _modules_h_byte
short[] _modules_h_scaled
short[] _modules_h_short
short[][][] _modules_image_shortAAA
byte[] _modules_usage
byte[] _modules_w_byte
short[] _modules_w_scaled
short[] _modules_w_short
byte[] _modules_x_byte
short[] _modules_x_short
byte[] _modules_y_byte
short[] _modules_y_short
int _nModules
int _old_pal
byte[] _pal_data
int[][] _pal_int
short[][] _pal_short
int _palettes
int[] _PNG_packed_IDAT_ADLER
int[] _PNG_packed_IDAT_CRC
int[] _PNG_packed_IHDR_CRC
int[] _PNG_packed_PLTE_CRC
int[] _PNG_packed_tRNS_CRC
byte[][] _transp
int[] _w_pos
int hRef
int hTarget
boolean mResizeCorrectY = false
int wRef
int wTarget
int xRatio
int yRatio

Static Package Attributes

static byte[] _buffer_index
static Graphics _graphics
static int _images_count
static int _images_size
static int _index1 = -1
static int _index2 = -1
static char[] _itoa_buffer
static int _operation = OPERATION_DRAW
static byte[] _png_index
static byte[] _png_result
static int _png_size
static int _png_start_crc
static ASprite[][] _poolCacheSprites
static short[][] _poolCacheStack
 table stores the indices of module images being cached.
static int[] _poolCacheStackIndex
 the loop cursor
static int[] _poolCacheStackMax
 the pool size
static int _rectX1
static int _rectX2
static int _rectY1
static int _rectY2
static int _text_h
 Used to gather dimensions of a string. (call UpdateStringSize() to update this value).
static int _text_w
 Used to gather dimensions of a string. (call UpdateStringSize() to update this value).
static short[] _warpTextInfo
static final int BS_AF_OFF_SHORT = (1 << 18)
static final int BS_ANIMS = (1 << 16)
static final int BS_DEFAULT_DOJA = (BS_MODULES | BS_FRAMES | BS_ANIMS| BS_MODULE_IMAGES | BS_GIF_HEADER | BS_MODULES_USAGE)
static final int BS_DEFAULT_MIDP1 = (BS_MODULES | BS_MODULES_XY | BS_FRAMES | BS_ANIMS)
static final int BS_DEFAULT_MIDP1b = (BS_MODULES | BS_FRAMES | BS_ANIMS | BS_MODULE_IMAGES | BS_PNG_CRC)
static final int BS_DEFAULT_MIDP1c = (BS_MODULES | BS_MODULES_XY | BS_FRAMES | BS_ANIMS | BS_SINGLE_IMAGE)
static final int BS_DEFAULT_MIDP2 = (BS_MODULES | BS_FRAMES | BS_ANIMS | BS_MODULE_IMAGES)
static final int BS_DEFAULT_NOKIA = (BS_DEFAULT_MIDP2)
static final int BS_FM_OFF_SHORT = (1 << 10)
static final int BS_FM_PALETTE = (1 << 14)
static final int BS_FRAME_COLL_RC = (1 << 13)
static final int BS_FRAME_RECTS = (1 << 15)
static final int BS_FRAMES = (1 << 8)
static final int BS_GIF_HEADER = (1 << 31)
static final int BS_IMAGE_SIZE_INT = (1 << 7)
static final int BS_KEEP_PAL = (1 << 26)
static final int BS_MODULE_IMAGES = (1 << 24)
static final int BS_MODULE_IMAGES_FX = (1 << 23)
static final int BS_MODULE_USAGE = (1 << 30)
static final int BS_MODULES = (1 << 0)
static final int BS_MODULES_IMG = (1 << 2)
static final int BS_MODULES_USAGE = (1 << 6)
static final int BS_MODULES_WH_SHORT = (1 << 4)
static final int BS_MODULES_XY = (1 << 1)
static final int BS_MODULES_XY_SHORT = (1 << 5)
static final int BS_NAF_1_BYTE = (1 << 19)
static final int BS_NFM_1_BYTE = (1 << 11)
static final int BS_NO_AF_START = (1 << 17)
static final int BS_PNG_CRC = (1 << 25)
static final int BS_SINGLE_IMAGE = (1 << 29)
static final int BS_SKIP_FRAME_RC = (1 << 12)
static final int BS_TRANSP_FIRST = (1 << 27)
static final int BS_TRANSP_LAST = (1 << 28)
static final short BSPRITE_v003 = (short)0x03DF
static final short BSPRITE_v004 = (short)0x04DF
static final short BSPRITE_v005 = (short)0x05DF
static int currentChunkType
static final short ENCODE_FORMAT_I127RLE = 0x27F1
static final short ENCODE_FORMAT_I16 = 0x1600
static final short ENCODE_FORMAT_I2 = 0x0200
static final short ENCODE_FORMAT_I256 = 0x5602
static final short ENCODE_FORMAT_I256RLE = 0x56F2
static final short ENCODE_FORMAT_I4 = 0x0400
static final short ENCODE_FORMAT_I64RLE = 0x64F0
static final byte FLAG_FLIP_X = 0x01
static final byte FLAG_FLIP_Y = 0x02
static final byte FLAG_HYPER_FM = 0x10
static final int FLAG_INDEX_EX_MASK = 0xC0
static final byte FLAG_OFFSET_AF = 0x20
static final byte FLAG_OFFSET_FM = 0x10
static final byte FLAG_ROT_90 = 0x04
static final byte FLAG_USER0 = 0x10
static final byte FLAG_USER1 = 0x20
static final int INDEX_EX_MASK = 0x0300
static final int INDEX_EX_SHIFT = 2
static final int INDEX_MASK = 0x03FF
static final int k_itoa_buffer_size = 33
 All possible chars for representing a number as a String only support 10 decimal system now.
static final byte[] MAGIC_IDAT_h = { (byte)0x78, (byte)0x9C, (byte)0x01, }
static final int MAX_TRANSFORMATION_FLAGS = 8
static final int MD_ARC = 3
static final int MD_FILL_ARC = 4
static final int MD_FILL_RECT = 2
static final int MD_FILL_TRIANGLE = 7
static final int MD_IMAGE = 0
static final int MD_MARKER = 5
static final int MD_RECT = 1
static final int MD_TRIANGLE = 6
static int mem = 0
static final int[] midp2_flags
static int mod
static int mResizeRef = RESIZE_REF_240x320
static final int OPERATION_COMPUTERECT = 1
static final int OPERATION_DRAW = 0
static final int OPERATION_MARK = 3
static final int OPERATION_RECORD = 2
static final short PIXEL_FORMAT_0565 = (short)0x6505
static final short PIXEL_FORMAT_1555 = (short)0x5515
static final short PIXEL_FORMAT_4444 = (short)0x4444
static final short PIXEL_FORMAT_8888 = (short)0x8888
static int record_frame = -1
static int record_index = -1
static final int RESIZE_CREATERGB = 1
static final int RESIZE_DRAW_ON_MUTABLE = 2
static final int RESIZE_NONE = 0
static final int RESIZE_NOT_CACHED = 3
static final int RESIZE_REF_176x220 = 1
static final int RESIZE_REF_240x256 = 2
static final int RESIZE_REF_240x320 = 0
static boolean s_bAspectRatio
static boolean s_bBilinear
static byte[] s_MapChar
static int[] s_rc = new int[4]
static int s_resizeType
static final int SCALE_SHIFT = 16
static final short SUPPORTED_VERSION = BSPRITE_v005
static byte temp_byte []
static int temp_int []
static short temp_short []
static int transform_int []

Detailed Description

ASprite Aurora Sprite class.

Implementation for sprites exported by AuroraGT editor. Contains methods to handle displaying of strings.

Author:
Ionut Matasaru ([email protected])
Dragos Velicu ([email protected])


Constructor & Destructor Documentation

ASprite (  )  [package]

Empty constructor. Does nothing.


Member Function Documentation

[static initializer] (  )  [static, package]

void BuildAnimCacheImages ( int  palette,
int  anim 
) [package]

Create cache images for all modules all frame used by a animation.

This funcion will call BuildFrameCacheImages(ASprite sprite, int frame, int palette) for each animation frame.

Parameters:
palette Sprite palette index. Will be ignored if the sprite is exported using BS_FM_PALETTE flag and if GLLibConfig.sprite_useFMPalette is enabled.
anim Animation index
See also:
ASprite.BuildFrameCacheImages(int palette, int frame)

ASprite.BuildCacheImages(int pal, int m1, int m2, int pal_copy)

GLLibConfig.sprite_useFMPalette

ASprite.BS_FM_PALETTE

void BuildCacheImages ( int  pal,
int  m1,
int  m2,
int  pal_copy 
) [package]

Build Cache Images for this sprite.

Parameters:
pal palette to be initialized
m1 first module
m2 last module (-1 . to end)
pal_copy mapping to another palette (-1 . build)

void BuildFrameCacheImages ( int  palette,
int  frame 
) [package]

Create cache images for all modules used by a frame.

Parameters:
palette Sprite palette index. Will be ignored if the sprite is exported using BS_FM_PALETTE flag and if GLLibConfig.sprite_useFMPalette is enabled.
frame Frame index
See also:
ASprite.BuildCacheImages(int pal, int m1, int m2, int pal_copy)

GLLibConfig.sprite_useFMPalette

ASprite.BS_FM_PALETTE

int CountFrameModules ( int  frame  )  [package]

Count the number of modules in a frame.

Parameters:
frame The frame to be examined
Returns:
The number of modules in the frame

static int Crc32 ( byte  buffer[],
int  start,
int  count,
int  crc 
) [static]

Crc32.

Parameters:
buffer the bufer for wich the crc is computed
start the index inthe buffer for wich the crc is computed
count the length to compute crc
crc ???to be documented???
Returns:
???to be documented???

Object DecodeImage ( int  module  )  [package]

Decodes loaded module data.

Parameters:
module Module to be decoded
Returns:
Object The decoded image data

void DecodeImageToByteArray ( byte[]  dest,
int  module,
boolean  img2dRGBA,
boolean  half 
) [package]

Decodes loaded module data to a byte array.

Parameters:
dest The destination array
module The module to be decoded
img2dRGBA True if the decoded image should be RGBA, false if RGB only
half True if the decoded image should be half-scaled

static void DrawLine ( Graphics  g,
int  x1,
int  y1,
int  x2,
int  y2,
int  color,
int  radius,
int  initial 
) [static, package]

Bresenham's Line-Drawing Algorithm.

Parameters:
g The graphics context
x1 X coordinate at the start of the line
y1 Y coordinate at the start of the line
x2 X coordinate at the end of the line
y2 Y coordinate at the end of the line
color The color of the line
radius The radius of the line
initial Initial offset

void DrawNumber ( Graphics  g,
int  num,
int  radix,
int  minDigit,
int  x,
int  y,
int  anchor,
boolean  restorecol 
) [package]

Draws text given a number.

Parameters:
g The graphics context
num The number to be drawn
radix The radix of number, only support 10 decimal system now
minDigit The min digit, not enough digits to make up for 0
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing
restorecol Boolean determining if the currently set font palette be restored after this operation

void DrawNumber ( Graphics  g,
int  num,
int  minDigit,
int  x,
int  y,
int  anchor 
) [package]

Draws text given a number.

Parameters:
g The graphics context
num The number to be drawn
minDigit The min digit, not enough digits to make up for 0
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing

void DrawPage ( Graphics  g,
String  s,
int  x,
int  y,
int  anchor,
int  start,
int  end 
) [package]

Draws a string with appropriate newline characters as a page given a start and end.

Parameters:
g The graphics context
s The string to be drawn
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing
start The character position to begin drawing at
end The character position to stop drawing at

void DrawPage ( Graphics  g,
String  s,
int  x,
int  y,
int  anchor 
) [package]

Draws a string with appropriate newline characters as a page.

Parameters:
g The graphics context
s The string to be drawn
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing

void DrawPage ( Graphics  g,
byte[]  s,
int  x,
int  y,
int  anchor 
) [package]

Draws a byte array containing a string with appropriate newline characters as a page.

Parameters:
g The graphics context
s The byte array to be drawn
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing

void DrawPageB ( Graphics  g,
String  s,
short[]  info,
int  x,
int  y,
int  startLine,
int  maxLines,
int  anchor 
) [package]

Draws a string with appropriate newline characters and wrapping information as a page.

Parameters:
g The graphics context
s The string to be drawn
info The wrapping information for the string
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
startLine The starting line to begin drawing from
maxLines The maximum number of lines to draw
anchor The anchor flags to be used for drawing

void DrawString ( Graphics  g,
String  s,
int  x,
int  y,
int  anchor,
boolean  restorecol 
) [package]

Draws text given a string.

Parameters:
g The graphics context
s The string to be drawn
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing
restorecol Boolean determining if the currently set font palette be restored after this operation

void DrawString ( Graphics  g,
byte[]  bs,
int  x,
int  y,
int  anchor,
boolean  restorecol 
) [package]

Draws text given a byte array containing a string.

Parameters:
g The graphics context
bs A byte array containing a string
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing
restorecol Boolean determining if the currently set font palette be restored after this operation

void DrawString ( Graphics  g,
String  s,
int  x,
int  y,
int  anchor 
) [package]

Draws text given a string.

Parameters:
g The graphics context
s The string to be drawn
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing

void DrawString ( Graphics  g,
byte[]  bs,
int  x,
int  y,
int  anchor 
) [package]

Draws text given a byte array containing a string.

Parameters:
g The graphics context
bs A byte array containing a string
x The X coordinate to be drawn to
y The Y coordinate to be drawn to
anchor The anchor flags to be used for drawing

void DrawStringOrChars ( Graphics  g,
String  s,
char[]  charBuff,
int  x,
int  y,
int  anchor,
boolean  restorecol 
) [package]

void FreeAnimCacheImages ( int  palette,
int  anim 
) [package]

Free cache images for all modules of all frames used by a animation.

This funcion will call FreeFrameCacheImages(int palette, int frame) for each animation frame.

Parameters:
palette Sprite palette index. Will be ignored if the sprite is exported using BS_FM_PALETTE flag and if GLLibConfig.sprite_useFMPalette is enabled.
anim Animation index
See also:
ASprite.FreeFrameCacheImages(int palette, int frame)

ASprite.FreeModuleImage(int nPal, int nMod)

GLLibConfig.sprite_useFMPalette

ASprite.BS_FM_PALETTE

void FreeCacheData (  )  [package]

Free all cached data.

void FreeFrameCacheImages ( int  palette,
int  frame 
) [package]

Free cache images for all modules used by a frame.

Parameters:
palette Sprite palette index. Will be ignored if the sprite is exported using BS_FM_PALETTE flag and if GLLibConfig.sprite_useFMPalette is enabled.
frame Frame index
See also:
ASprite.FreeModuleImage(int nPal, int nMod)

GLLibConfig.sprite_useFMPalette

ASprite.BS_FM_PALETTE

void FreeMemory (  )  [package]

Free data after the modules have been cached.

void FreeModuleImage ( int  nPal,
int  nMod 
) [package]

Frees a cached module.

Parameters:
nPal The palette index
nMod The module to be freed (-1 for all modules in this palette)

static short [] GenPalette ( int  type,
short[]  pal 
) [static, package]

Generates a palette based on another palette.

Parameters:
type Palette type (PAL_ORIGINAL, PAL_INVISIBLE, PAL_RED_YELLOW, PAL_BLUE_CYAN, PAL_GREEN, PAL_GREY or PAL_BLEND_BLACK)
pal The existing palette
Returns:
The generated palette

static int [] GenPalette ( int  type,
int[]  pal 
) [static, package]

Generates a palette based on another palette.

Parameters:
type Palette type (PAL_ORIGINAL, PAL_INVISIBLE, PAL_RED_YELLOW, PAL_BLUE_CYAN, PAL_GREEN, PAL_GREY or PAL_BLEND_BLACK)
pal The existing palette
Returns:
The generated palette

int GetAFrameFlags ( int  anim,
int  aframe 
) [package]

Gets the flags associated with a frame in an animation.

Parameters:
anim The animation to be examined
aframe The frame in the animation
Returns:
the flags associated with this frame in the animation

void GetAFrameRect ( int  anim,
int  aframe,
int  rectIndex,
int[]  rect,
int  flags 
) [package]

Get a FrameRect from a specific anim and aframe.

Parameters:
anim anim to query for Frame Rect.
aframe aframe to query for Frame Rect.
rectIndex which rect to get for this frame.
rect int array to hlod the rect, [x, y, w, h].
flags flip x/y flags

void GetAFrameRect ( int[]  rc,
int  anim,
int  aframe,
int  posX,
int  posY,
int  flags 
) [package]

Gets the rectangle occupied by an animation frame if it were to be drawn at posX/posY with flags.

Parameters:
rc The rectangle array to be populated
anim The animation containing the frame
aframe The frame to be examined
posX The X coordinate to be considered
posY The Y coordinate to be considered
flags The flags to be considered

int GetAFrames ( int  anim  )  [package]

Get the number of frames in an animation.

Parameters:
anim The animation to be examined
Returns:
The number of frames

int GetAFramesOX ( int  v  )  [package]

To be documented.

..

Parameters:
v 
Returns:
Int

int GetAFramesOY ( int  v  )  [package]

To be documented.

..

Parameters:
v 
Returns:
Int

int GetAFrameTime ( int  anim,
int  aframe 
) [package]

Gets the time of a frame in an animation.

Parameters:
anim The animation to be examined
aframe The frame in the animation
Returns:
The frame time

int GetAnimFrame ( int  anim,
int  aframe 
) [package]

Gets the ID of a frame inside an animation.

Parameters:
anim The animation to examine
aframe The frame inside the animation
Returns:
The frame ID

boolean GetBold (  )  [package]

Gets a value that indicates whether this Font is Bold.

Returns:
The font is Bold

int GetCharFrame ( int  c  )  [package]

byte [] GetCharMap (  )  [package]

Returns the current character map used by DrawString.

Returns:
byte array containg the the current character map

short [][] GetCharMapShort (  )  [package]

new text rendering

static int GetChars ( char[]  charBuf,
int  i,
int  radix,
int  minDigit 
) [static, package]

int getCharSize ( char  c  )  [package]

Gets the width of the given character using this sprite.

Parameters:
c The character to be examined
Returns:
The width of the character in pixels

int GetCharSpacing (  )  [package]

Gets the current character spacing for the sprite.

Returns:
The character spacing

int GetCurrentMMapping (  )  [package]

Gets the current Module mapping index.

Returns:
the index

int GetCurrentPalette (  )  [package]

Gets the current palette for the sprite @ returns the current palette.

static int GetCurrentStringHeight (  )  [static, package]

Gets the current string height used by DrawString.

Returns:
The current string height

static int GetCurrentStringWidth (  )  [static, package]

Gets the current string width used by DrawString.

Returns:
The current string width

int GetFModuleOX ( int  v  )  [package]

To be documented.

..

Parameters:
v 
Returns:
Int

int GetFModuleOY ( int  v  )  [package]

To be documented.

..

Parameters:
v 
Returns:
Int

void GetFModuleRect ( int[]  rc,
int  frame,
int  fmodule,
int  posX,
int  posY,
int  flags,
int  hx,
int  hy 
) [package]

Gets the rectangle occupied by a module in a frame if it were to be drawn at posX/posY with flags.

Parameters:
rc The rectangle array to be populated
frame The frame containing the module
fmodule The module to be examined
posX The X coordinate to be considered
posY The Y coordinate to be considered
flags The flags to be considered
hx ??? unused ???
hy ??? unused ???

int GetFModules ( int  frame  )  [package]

Get the number of modules in a frame.

Parameters:
frame The frame to be examined
Returns:
The number of modules

int GetFontHeight (  )  [package]

Gets the font height of the sprite.

Returns:
Int font height

int GetFrameCount (  )  [package]

Get the number of frames in the sprite.

Returns:
the number of frames

int GetFrameHeight ( int  frame  )  [package]

Gets the height of a frame.

Parameters:
frame The frame to be examined
Returns:
The frame height

int [] GetFrameMarkers ( int  frame  )  [package]

Get all the marker module positions of a frame.

Parameters:
frame frame to query for markers.
Returns:
an int array with all the markers or null if there are no maker on this frame.

int GetFrameModule ( int  frame,
int  fmodule 
) [package]

Get the id of a module in a frame.

Parameters:
frame the frame containing the module
fmodule the module to be examined
Returns:
the module id

int GetFrameModuleFlags ( int  frame,
int  fmodule 
) [package]

Get the flags set on a module in a frame.

Parameters:
frame the frame containing the module
fmodule the module to be examined
Returns:
the flags set on the module

int GetFrameModuleHeight ( int  frame,
int  fmodule 
) [package]

Get the height of a module inside a frame.

Parameters:
frame The frame to be examined
fmodule The module inside the frame
Returns:
The height of the module

int GetFrameModulePalette ( int  frame,
int  fmodule 
) [package]

Retrieve a frame module's palette, if the sprite is exported using BS_FM_PALETTE flag.

If this flag is not used or if GLLibConfig.sprite_useFMPalette isn't used, returns current sprite palette.

Parameters:
frame Frame index
fmodule Frame module index
Returns:
Frame module palette
See also:
GLLibConfig.sprite_useFMPalette

ASprite.BS_FM_PALETTE

ASprite.GetCurrentPalette()

int GetFrameModuleWidth ( int  frame,
int  fmodule 
) [package]

Get the width of a module inside a frame.

Parameters:
frame The frame to be examined
fmodule The module inside the frame
Returns:
The width of the module

int GetFrameModuleX ( int  frame,
int  fmodule 
) [package]

Gets the X coordinate of a module inside a frame.

Parameters:
frame The frame to be examined
fmodule The module inside the frame
Returns:
The X coordinate inside the frame

int GetFrameModuleY ( int  frame,
int  fmodule 
) [package]

Gets the Y coordinate of a module inside a frame.

Parameters:
frame The frame to be examined
fmodule The module inside the frame
Returns:
The Y coordinate inside the frame

void GetFrameRect ( int  frame,
int  rectIndex,
int[]  rect,
int  flags 
) [package]

Get a FrameRect from a specific frame.

Parameters:
frame frame to query for Frame Rect.
rectIndex which rect to get for this frame.
rect int array to hlod the rect, [x, y, w, h].
flags flip x/y flags

void GetFrameRect ( int[]  rc,
int  frame,
int  posX,
int  posY,
int  flags 
) [package]

Gets the rectangle occupied by a frame if it were to be drawn at posX/posY with flags.

Parameters:
rc The rectangle array to be populated
frame The frame to be examined
posX The X coordinate to be considered
posY The Y coordinate to be considered
flags The flags to be considered

void GetFrameRect ( int[]  rc,
int  frame,
int  posX,
int  posY,
int  flags,
int  hx,
int  hy 
) [package]

Gets the rectangle occupied by a frame if it were to be drawn at posX/posY with flags.

Parameters:
rc The rectangle array to be populated
frame The frame to be examined
posX The X coordinate to be considered
posY The Y coordinate to be considered
flags The flags to be considered
hx ??? Unused ???
hy ??? Unused ???

int GetFrameRectCount ( int  frame  )  [package]

Get The FrameRect count for a specific frame.

Parameters:
frame frame to query for Frame Rect Count.
Returns:
the Frame rect count for this frame.

int GetFrames (  )  [package]

Gets the number of frames in the sprite.

Returns:
The number of frames

int GetFrameWidth ( int  frame  )  [package]

Gets the width of a frame.

Parameters:
frame The frame to be examined
Returns:
The frame width

int GetLineHeight (  )  [package]

Gets the current line height of the sprite.

Returns:
The line height

int GetLineSpacing (  )  [package]

Returns the current line spacing for the sprite.

Returns:
The current line spacing

int GetModuleCount (  )  [package]

Get the number of modules in the sprite.

Returns:
the number of modules

Object GetModuleData ( int  nModule,
int  nPalette 
) [package]

Get the Module's Data of a specific Palette.

Parameters:
nModule Module number
nPalette Palette number
Returns:
Object (int[], short[] ...) of the module/palette or null if nModule/nPalette are not valid or if the Image does not exist.

int GetModuleHeight ( int  module  )  [package]

Gets the height of a module.

Parameters:
module The module to be examined
Returns:
The height

int GetModuleHeightOrg ( int  module  )  [package]

To be documented.

..

Parameters:
module 
Returns:
Int

Image GetModuleImage ( int  nModule,
int  nPalette 
) [package]

Get the Module's Image of a specific Palette.

Parameters:
nModule Module number
nPalette Palette number
Returns:
Image of the module/palette or null if nModule/nPalette are not valid or if the Image does not exist.

void GetModuleRect ( int[]  rc,
int  module,
int  posX,
int  posY,
int  flags 
) [package]

Gets the rectangle occupied by a module if it were to be drawn at posX/posY with flags.

Parameters:
rc The rectangle array to be populated
module The module to be examined
posX The X coordinate to be considered
posY The Y coordinate to be considered
flags The flags to be considered

int GetModuleWidth ( int  module  )  [package]

Gets the width of a module.

Parameters:
module The module to be examined
Returns:
The width

int GetModuleWidthOrg ( int  module  )  [package]

To be documented.

..

Parameters:
module 
Returns:
Int

int GetModuleX ( int  module  )  [package]

Gets the x coordinate of a module.

Parameters:
module The module to be examined
Returns:
The x coordinate

int GetModuleY ( int  module  )  [package]

Gets the y coordinate of a module.

Parameters:
module The module to be examined
Returns:
The y coordinate

Object GetPalette ( int  nPalette  )  [package]

Gets a palette array.

Parameters:
nPalette Palette index
Returns:
The palette array object

int GetSpaceWidth (  )  [package]

Gets the current space width of the sprite.

Returns:
The space width

boolean GetUnderline (  )  [package]

Gets a value that indicates whether this Font is underlined.

Returns:
The font is underlined

static void InitCachePool ( int  poolCount  )  [static]

Initialize Cache Pool.

Parameters:
poolCount init number of pool

static void InitPoolSize ( int  poolIndex,
int  size 
) [static]

Initialize pool size.

Parameters:
poolIndex index of pool
size size of pool

void Load ( byte[]  file,
int  offset,
int  pal_flags,
int  tr_flags,
Image  sprImage 
) [package]

Load the sprite from the given byte array and associated image.

Parameters:
file A byte array containing a sprite file
offset The offset inside the array at which to start reading
pal_flags Palette flags
tr_flags Transformation flags
sprImage The image associated with the sprite

void Load ( byte[]  file,
int  offset,
Image  sprImage 
) [package]

Load the sprite from the given byte array and associated image.

Parameters:
file A byte array containing a sprite file
offset The offset inside the array at which to start reading
sprImage The image associated with the sprite

void Load ( byte[]  file,
int  offset,
int  pal_flags,
int  tr_flags 
) [package]

Load the sprite from the given byte array with flags.

Parameters:
file A byte array containing a sprite file
offset The offset inside the array at which to start reading
pal_flags Palette flags
tr_flags Transformation flags

void Load ( byte[]  file,
int  offset 
) [package]

Load the sprite from the given byte array.

Parameters:
file A byte array containing a sprite file
offset The offset inside the array at which to start reading

void ModifyPalette ( int  palNb,
int  color 
) [package]

Modify palette, original palette will turn into the alpha value, and set one and only color for all palette original palette = 0x00RRGGBB, color parameter = 0x00CCCCCC result palette = 0xBBCCCCCC.

Parameters:
palNb The palette number
color The color to be set

void ModifyPaletteAlpha ( int  palNb,
int  alpha 
) [package]

Modify the alpha value of a palette.

Parameters:
palNb The palette number
alpha The alpha to be set

void ModifyPaletteAlphaUsingAltPalette ( int  p_iPaletteID,
int  p_iAlphaPaletteID 
) [package]

Modify palette, original palette will have its alpha channel set using the second palette's RED channel.

Original palette = 0x00RRGGBB, Alpha palette = 0x00AA0000 Result palette = 0xAARRGGBB

Parameters:
p_iPaletteID is the index of the palette you want to alter
p_iAlphaPaletteID is the index of the palette that holds the alpha channel in its RED channel

void ModifyPaletteAlphaUsingLastPalette ( int  p_iPaletteID  )  [package]

This is just a wrapper around ModifyPaletteAlphaUsingAltPalette which automatically uses the last palette for the alpha information.

Parameters:
p_iPaletteID is the index of the palette you want to alter

void PaintAFrame ( Graphics  g,
int  anim,
int  aframe,
int  posX,
int  posY,
int  flags,
int  hx,
int  hy 
) [package]

Draws an animation frame at PosX/PosY with Flags.

Parameters:
g The Graphics context
anim The animation containing the frame
aframe The frame to be drawn
posX The X coordinate to be drawn to
posY The Y coordinate to be drawn to
flags The flags to be used for this operation
hx The height of the area to be drawn
hy The width of the area to be drawn

void PaintAFrame ( Graphics  g,
int  anim,
int  aframe,
int  posX,
int  posY,
int  flags 
) [package]

Draws an animation frame at PosX/PosY with Flags.

Parameters:
g The Graphics context
anim The animation containing the frame
aframe The frame to be drawn
posX The X coordinate to be drawn to
posY The Y coordinate to be drawn to
flags The flags to be used for this operation

void PaintFModule ( Graphics  g,
int  frame,
int  fmodule,
int  posX,
int  posY,
int  flags,
int  hx,
int  hy 
) [package]

Draws a module from a frame at PosX/PosY with Flags.

Parameters:
g The Graphics context
frame The frame containing the module
fmodule The module to be drawn
posX The X coordinate to be drawn to
posY The Y coordinate to be drawn to
flags The flags to be used for this operation
hx The height of the area to be drawn
hy The width of the area to be drawn

void PaintFModule ( Graphics  g,
int  frame,
int  fmodule,
int  posX,
int  posY,
int  flags 
) [package]

Draws a module from a frame at PosX/PosY with Flags.

Parameters:
g The Graphics context
frame The frame containing the module
fmodule The module to be drawn
posX The X coordinate to be drawn to
posY The Y coordinate to be drawn to
flags The flags to be used for this operation

void PaintFrame ( Graphics  g,
int  frame,
int  posX,
int  posY,
int  flags,
int  hx,
int  hy 
) [package]

Draws a frame at PosX/PosY with Flags.

Parameters:
g The Graphics context
frame The frame to be drawn
posX The X coordinate to be drawn to
posY The Y coordinate to be drawn to
flags The flags to be used for this operation
hx The height of the area to be drawn
hy The width of the area to be drawn

void PaintFrame ( Graphics  g,
int  frame,
int  posX,
int  posY,
int  flags 
) [package]

Draws a frame at PosX/PosY with Flags.

Parameters:
g The Graphics context
frame The frame to be drawn
posX The X coordinate to be drawn to
posY The Y coordinate to be drawn to
flags The flags to be used for this operation

void PaintModule ( Graphics  g,
int  module,
int  posX,
int  posY,
int  flags 
) [package]

Draws a module at PosX/PosY with Flags.

Parameters:
g The Graphics context
module The frame to be drawn
posX The X coordinate to be drawn to
posY The Y coordinate to be drawn to
flags The flags to be used for this operation

void PaintPrecomputedFrame ( Graphics  g,
int  x,
int  y,
int  frame 
) [package]

Paints a pre-computed frame at x, y.

Parameters:
g The graphics context
x The X coordinate to draw to
y The Y coordinate to draw to
frame The frame to draw

void PrecomputeAllFrames ( Graphics  g  )  [package]

Precomputes all frames.

Parameters:
g The graphics context

void PrecomputeFrame ( Graphics  g,
int  frame,
int  flags 
) [package]

Precompute a frame.

Parameters:
g The graphics context
frame The frame to be precomputed
flags The drawing flags to be used

static void ResetCachePool ( int  poolIndex  )  [static]

Release pool.

Parameters:
poolIndex index of pool

void ResizeCoords (  ) 

To be documented...

int scaleX ( int  x  ) 

To be documented.

..

Parameters:
x 

int scaleY ( int  y  ) 

To be documented.

..

Parameters:
y 

void SetBold ( boolean  bBold  )  [package]

Sets the bold for the font.

Parameters:
bBold the bold flag

void SetCharMap ( short[]  pNewMap  )  [package]

Sets the character map used by DrawString for the new text rendering code.

Parameters:
pNewMap byte array containing the character map to be set

void SetCharMap ( byte[]  pNewMap  )  [package]

Sets the character map used by DrawString.

Parameters:
pNewMap byte array containing the character map to be set

static void SetCharMapStatic ( byte[]  pNewMap  )  [static, package]

Sets the character map used by DrawString from a static context.

Parameters:
pNewMap byte array containing the character map to be set

void SetCharSpacing ( int  spacing  )  [package]

Sets the character spacing for the sprite.

Parameters:
spacing the character spacing

void SetCharSpacingToDefault (  )  [package]

Reverts the character spacing to default for the sprite.

void SetCurrentMMapping ( int  map  )  [package]

Sets the current Module mapping index.

Parameters:
map The index to be set

void SetCurrentPalette ( int  pal  )  [package]

Sets the current palette for the sprite.

Parameters:
pal the palette to be set

void SetDefaultFontMetrics (  )  [package]

Sets the default values for font ascent, descent, height, space, and line spacing, based on the data found in the sprite file.

static void SetGraphics ( Graphics  g1  )  [static, package]

Sets the current graphics context.

Parameters:
g1 The graphics context to be set

void SetLineHeight ( int  nHeight  )  [package]

Sets the line height for the sprite.

Parameters:
nHeight the line height

void SetLineHeightToDefault (  )  [package]

Reverts the line height to the default for the sprite.

void SetLineSpacing ( int  spacing  )  [package]

Sets the line spacing for the sprite.

Parameters:
spacing the line spacing to be set

void SetLineSpacingToDefault (  )  [package]

Reverts line spacing to the default for the sprite.

void SetModuleImage ( Image  pImg,
int  nModule,
int  nPalette 
) [package]

Set the Module's Image of a specific Palette.

Parameters:
pImg Image to set in the ASprite
nModule Module number
nPalette Palette number

void SetModuleImagesArray ( Object  pData  )  [package]

Sets the module cached image array.

Parameters:
pData image array

void SetModuleMapping ( int  map,
byte[]  mmp 
) [package]

Set the module mapping at an index.

Parameters:
map The mapping index
mmp The module mapping

void SetPool ( int  poolIndex  ) 

set cache pool of ASprite

Parameters:
poolIndex index of pool

void SetResizeParameters ( int  spriteId,
int  resizeMode,
boolean  correctY 
)

To be documented.

..

Parameters:
spriteId 
resizeMode 
correctY 

void SetSpaceWidth ( int  spacing  )  [package]

Sets the space width of the sprite.

Parameters:
spacing the space width to set

void SetSpaceWidthToDefault (  )  [package]

Reverts the space width to the default for the sprite.

static void SetSubString ( int  i1,
int  i2 
) [static, package]

Set the current substring.

Parameters:
i1 index 1
i2 index 2

static void SetTempBuffer ( Object  pArray  )  [static]

Sets the temporary buffer array to be used for decoding operations.

Parameters:
pArray The buffer array to be used

void SetUnderline ( boolean  bUnderline  )  [package]

Sets the underline for the font.

Parameters:
bUnderline the underline flag

static int StringTokenize ( String  s,
int  index1,
int  index2,
char  token,
int[]  indices 
) [static, package]

Tokenize a string given a separating token character.

Parameters:
s The string to be tokenized
index1 The character position to begin tokenizing
index2 The character position to stop tokenizing
token The token character to be used
indices an int array where the tokenization configuration is to be stored
Returns:
The number of lines resulting from tokenization

String TextFitToFixedWidth ( String  str,
int  text_w 
) [package]

Fits the supplied string to a given width.

Parameters:
str The string to be wrapped
text_w The width to be wrapped to
Returns:
The wrapped string

byte [] TextFitToFixedWidth ( byte[]  str,
int  text_w 
) [package]

Fits the supplied byte array containing a string to a given width.

Parameters:
str The string byte array to be wrapped
text_w The width to be wrapped to
Returns:
The wrapped byte array

int [] TransformRGB ( int[]  image_data,
int  sizeX,
int  sizeY,
int  flags 
) [package]

Applies transformations to an RGB buffer.

Parameters:
image_data RGB buffer to transform
sizeX width of the rgb data
sizeY height of the rgb data
flags Transformation flags

void unload (  )  [package]

unload the sprite

void UpdateNumberSize ( int  num,
int  radix,
int  minDigit 
) [package]

Updates the text size for the sprite given a number.

Parameters:
num The number to be drawn
radix The radix of number
minDigit The min digit, not enough digits to make up for 0

void UpdateStringOrCharsSize ( String  s,
char[]  charBuff 
) [package]

void UpdateStringSize ( String  s  )  [package]

Updates the current string size for the sprite given a string.

Parameters:
s the string

void UpdateStringSize ( byte[]  bs  )  [package]

Updates the current string size for the sprite given a byte array containing a string.

Parameters:
bs a byte array containing a string

short [] WraptextB ( String  s,
int  width,
int  height 
) [package]

Wraps the provided string to a given area and returns an array containing the wrapped configuration.

Parameters:
s The string to be wrapped
width The width of the area to wrap to
height The height of the area to wrap to
Returns:
Short array containing the wrapping configuration


Member Data Documentation

byte [] _aframes [package]

byte [] _aframes_flags [package]

byte [] _aframes_frame [package]

byte [] _aframes_ox_byte [package]

short [] _aframes_ox_short [package]

byte [] _aframes_oy_byte [package]

short [] _aframes_oy_short [package]

byte [] _aframes_time [package]

boolean _alpha [package]

short [] _anims_af_start [package]

byte [] _anims_naf [package]

int [][] _aryPrecomputedFlags [package]

Object [][] _aryPrecomputedImages [package]

short [][] _aryPrecomputedImgX [package]

short [][] _aryPrecomputedImgY [package]

short [][] _aryPrecomputedSizeX [package]

short [][] _aryPrecomputedSizeY [package]

short [][] _aryPrecomputedX [package]

short [][] _aryPrecomputedY [package]

int _bs_flags [package]

boolean _bTraceNow [package]

byte [] _buffer_index [static, package]

int _colors [package]

int _cur_pal [package]

int _cur_pool = -1 [package]

which pool the cached images will be created in */

short _data_format [package]

byte [] _fmodules [package]

byte [] _fmodules_flags [package]

byte [] _fmodules_id [package]

byte [] _fmodules_ox_byte [package]

short [] _fmodules_ox_short [package]

byte [] _fmodules_oy_byte [package]

short [] _fmodules_oy_short [package]

byte [] _fmodules_pal [package]

byte [] _frames_col [package]

short [] _frames_col_short [package]

short [] _frames_fm_start [package]

byte [] _frames_nfm [package]

byte [] _frames_rc [package]

short [] _frames_rc_short [package]

byte [] _frames_rects [package]

short [] _frames_rects_short [package]

short [] _frames_rects_start [package]

byte [][] _gifHeader [package]

Graphics _graphics [static, package]

int [] _header_size [package]

int _i64rle_color_bits [package]

int _i64rle_color_mask [package]

int _images_count [static, package]

int _images_size [static, package]

int _index1 = -1 [static, package]

int _index2 = -1 [static, package]

char [] _itoa_buffer [static, package]

Image [] _main_image [package]

short [][] _map [package]

byte [] _module_colors_byte [package]

int [] _module_colors_int [package]

Image [][] _module_image_imageAA [package]

Image [][][] _module_image_imageAAA [package]

int [][][] _module_image_intAAA [package]

byte [] _module_types [package]

byte [] _modules_data [package]

int [] _modules_data_off_int [package]

short [] _modules_data_off_short [package]

short [] _modules_extra_info [package]

short [] _modules_extra_pointer [package]

byte [] _modules_h_byte [package]

short [] _modules_h_scaled [package]

short [] _modules_h_short [package]

short [][][] _modules_image_shortAAA [package]

byte [] _modules_usage [package]

byte [] _modules_w_byte [package]

short [] _modules_w_scaled [package]

short [] _modules_w_short [package]

byte [] _modules_x_byte [package]

short [] _modules_x_short [package]

byte [] _modules_y_byte [package]

short [] _modules_y_short [package]

int _nModules [package]

int _old_pal [package]

int _operation = OPERATION_DRAW [static, package]

byte [] _pal_data [package]

int [][] _pal_int [package]

short [][] _pal_short [package]

int _palettes [package]

byte [] _png_index [static, package]

int [] _PNG_packed_IDAT_ADLER [package]

int [] _PNG_packed_IDAT_CRC [package]

int [] _PNG_packed_IHDR_CRC [package]

int [] _PNG_packed_PLTE_CRC [package]

int [] _PNG_packed_tRNS_CRC [package]

byte [] _png_result [static, package]

int _png_size [static, package]

int _png_start_crc [static, package]

ASprite [][] _poolCacheSprites [static, package]

short [][] _poolCacheStack [static, package]

table stores the indices of module images being cached.

int [] _poolCacheStackIndex [static, package]

the loop cursor

int [] _poolCacheStackMax [static, package]

the pool size

int _rectX1 [static, package]

int _rectX2 [static, package]

int _rectY1 [static, package]

int _rectY2 [static, package]

int _text_h [static, package]

Used to gather dimensions of a string. (call UpdateStringSize() to update this value).

int _text_w [static, package]

Used to gather dimensions of a string. (call UpdateStringSize() to update this value).

byte [][] _transp [package]

int [] _w_pos [package]

short [] _warpTextInfo [static, package]

final int BASE = 65521 [static]

final int BLOCK_INFO_SIZE = 11 [static]

final int BS_AF_OFF_SHORT = (1 << 18) [static, package]

final int BS_ANIMS = (1 << 16) [static, package]

final int BS_DEFAULT_MIDP1 = (BS_MODULES | BS_MODULES_XY | BS_FRAMES | BS_ANIMS) [static, package]

final int BS_DEFAULT_MIDP1b = (BS_MODULES | BS_FRAMES | BS_ANIMS | BS_MODULE_IMAGES | BS_PNG_CRC) [static, package]

final int BS_DEFAULT_MIDP2 = (BS_MODULES | BS_FRAMES | BS_ANIMS | BS_MODULE_IMAGES) [static, package]

final int BS_DEFAULT_NOKIA = (BS_DEFAULT_MIDP2) [static, package]

final int BS_FM_OFF_SHORT = (1 << 10) [static, package]

final int BS_FM_PALETTE = (1 << 14) [static, package]

final int BS_FRAME_COLL_RC = (1 << 13) [static, package]

final int BS_FRAME_RECTS = (1 << 15) [static, package]

final int BS_FRAMES = (1 << 8) [static, package]

final int BS_GIF_HEADER = (1 << 31) [static, package]

final int BS_IMAGE_SIZE_INT = (1 << 7) [static, package]

final int BS_KEEP_PAL = (1 << 26) [static, package]

final int BS_MODULE_IMAGES = (1 << 24) [static, package]

final int BS_MODULE_IMAGES_FX = (1 << 23) [static, package]

final int BS_MODULE_USAGE = (1 << 30) [static, package]

final int BS_MODULES = (1 << 0) [static, package]

final int BS_MODULES_IMG = (1 << 2) [static, package]

final int BS_MODULES_USAGE = (1 << 6) [static, package]

final int BS_MODULES_WH_SHORT = (1 << 4) [static, package]

final int BS_MODULES_XY = (1 << 1) [static, package]

final int BS_MODULES_XY_SHORT = (1 << 5) [static, package]

final int BS_NAF_1_BYTE = (1 << 19) [static, package]

final int BS_NFM_1_BYTE = (1 << 11) [static, package]

final int BS_NO_AF_START = (1 << 17) [static, package]

final int BS_PNG_CRC = (1 << 25) [static, package]

final int BS_SINGLE_IMAGE = (1 << 29) [static, package]

final int BS_SKIP_FRAME_RC = (1 << 12) [static, package]

final int BS_TRANSP_FIRST = (1 << 27) [static, package]

final int BS_TRANSP_LAST = (1 << 28) [static, package]

final short BSPRITE_v003 = (short)0x03DF [static, package]

final short BSPRITE_v004 = (short)0x04DF [static, package]

final short BSPRITE_v005 = (short)0x05DF [static, package]

final int CRC32_POLYNOMIAL = 0xEDB88320 [static]

int crcTable[] = new int[256] [static]

int currentChunkType [static, package]

final short ENCODE_FORMAT_I127RLE = 0x27F1 [static, package]

final short ENCODE_FORMAT_I16 = 0x1600 [static, package]

final short ENCODE_FORMAT_I2 = 0x0200 [static, package]

final short ENCODE_FORMAT_I256 = 0x5602 [static, package]

final short ENCODE_FORMAT_I256RLE = 0x56F2 [static, package]

final short ENCODE_FORMAT_I4 = 0x0400 [static, package]

final short ENCODE_FORMAT_I64RLE = 0x64F0 [static, package]

final byte FLAG_FLIP_X = 0x01 [static, package]

final byte FLAG_FLIP_Y = 0x02 [static, package]

final byte FLAG_HYPER_FM = 0x10 [static, package]

final int FLAG_INDEX_EX_MASK = 0xC0 [static, package]

final byte FLAG_OFFSET_AF = 0x20 [static, package]

final byte FLAG_OFFSET_FM = 0x10 [static, package]

final byte FLAG_ROT_90 = 0x04 [static, package]

final byte FLAG_USER0 = 0x10 [static, package]

final byte FLAG_USER1 = 0x20 [static, package]

final int HEADER_LEVEL0_MAX_WBITS = 30938 [static]

int hRef [package]

int hTarget [package]

final byte IDAT[] = { 'I', 'D', 'A', 'T' } [static, protected]

final byte IEND[] = { 'I', 'E', 'N', 'D' } [static, protected]

final byte IHDR[] = { 'I', 'H', 'D', 'R' } [static, protected]

final int INDEX_EX_MASK = 0x0300 [static, package]

final int INDEX_EX_SHIFT = 2 [static, package]

final int INDEX_MASK = 0x03FF [static, package]

final byte INFO32[] = { 8, 6, 0, 0, 0 } [static, protected]

final byte INFO8[] = { 8, 3, 0, 0, 0 } [static, protected]

final int k_itoa_buffer_size = 33 [static, package]

All possible chars for representing a number as a String only support 10 decimal system now.

final byte MAGIC[] = { -119, 80, 78, 71, 13, 10, 26, 10 } [static, protected]

final byte [] MAGIC_IDAT_h = { (byte)0x78, (byte)0x9C, (byte)0x01, } [static, package]

final byte [] MAGIC_IEND = {0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, (byte)0xae, 0x42, 0x60, (byte)0x82} [static, protected]

final int MAX_TRANSFORMATION_FLAGS = 8 [static, package]

final int MD_ARC = 3 [static, package]

final int MD_FILL_ARC = 4 [static, package]

final int MD_FILL_RECT = 2 [static, package]

final int MD_FILL_TRIANGLE = 7 [static, package]

final int MD_IMAGE = 0 [static, package]

final int MD_MARKER = 5 [static, package]

final int MD_RECT = 1 [static, package]

final int MD_TRIANGLE = 6 [static, package]

int mem = 0 [static, package]

final int [] midp2_flags [static, package]

Initial value:

        
        {                                                                       
                javax.microedition.lcdui.game.Sprite.TRANS_NONE,                        
                javax.microedition.lcdui.game.Sprite.TRANS_MIRROR,                      
                javax.microedition.lcdui.game.Sprite.TRANS_MIRROR_ROT180,       
                javax.microedition.lcdui.game.Sprite.TRANS_ROT180,                      
                javax.microedition.lcdui.game.Sprite.TRANS_ROT90,                       
                javax.microedition.lcdui.game.Sprite.TRANS_MIRROR_ROT90,        
                javax.microedition.lcdui.game.Sprite.TRANS_MIRROR_ROT270,       
                javax.microedition.lcdui.game.Sprite.TRANS_ROT270,                      
        }

int mod [static, package]

boolean mResizeCorrectY = false [package]

int mResizeRef = RESIZE_REF_240x320 [static, package]

final int NMAX = 5552 [static]

final int OPERATION_COMPUTERECT = 1 [static, package]

final int OPERATION_DRAW = 0 [static, package]

final int OPERATION_MARK = 3 [static, package]

final int OPERATION_RECORD = 2 [static, package]

final int PAL_BLEND_BLACK = 5 [static]

final int PAL_BLUE_CYAN = 2 [static]

final int PAL_GREEN = 3 [static]

final int PAL_GREY = 4 [static]

final int PAL_INVISIBLE = 0 [static]

final int PAL_ORIGINAL = -1 [static]

final int PAL_RED_YELLOW = 1 [static]

final short PIXEL_FORMAT_0565 = (short)0x6505 [static, package]

final short PIXEL_FORMAT_1555 = (short)0x5515 [static, package]

final short PIXEL_FORMAT_4444 = (short)0x4444 [static, package]

final short PIXEL_FORMAT_8888 = (short)0x8888 [static, package]

final byte PLTE[] = { 'P', 'L', 'T', 'E' } [static, protected]

final int PNG_INFO_SIZE = 57 [static]

int record_frame = -1 [static, package]

int record_index = -1 [static, package]

final int RESIZE_CREATERGB = 1 [static, package]

final int RESIZE_DRAW_ON_MUTABLE = 2 [static, package]

final int RESIZE_NONE = 0 [static, package]

final int RESIZE_NOT_CACHED = 3 [static, package]

final int RESIZE_REF_176x220 = 1 [static, package]

final int RESIZE_REF_240x256 = 2 [static, package]

final int RESIZE_REF_240x320 = 0 [static, package]

boolean s_bAspectRatio [static, package]

boolean s_bBilinear [static, package]

byte [] s_MapChar [static, package]

int [] s_rc = new int[4] [static, package]

int s_resizeType [static, package]

final int SCALE_SHIFT = 16 [static, package]

final short SUPPORTED_VERSION = BSPRITE_v005 [static, package]

byte temp_byte[] [static, package]

int temp_int[] [static, package]

short temp_short[] [static, package]

int transform_int[] [static, package]

final byte tRNS[] = { 't', 'R', 'N', 'S' } [static, protected]

int wRef [package]

int wTarget [package]

int xRatio [package]

int yRatio [package]


Generated on Tue Sep 23 23:05:32 2008 for GLLib by  doxygen 1.5.2