// HEL Library \\

 
Main Page | Modules | Related Pages

Palette Functions

Functions


Detailed Description

Details...

The Palette Functions module provides functions to load Palettes into VRAM, save from VRAM, as well as functions to manipulate Palettes. All functions, except hel_PalBgInvertEx, use DMA Channel 3 in 16BIT mode to transfer the data either to or from VRAM.


Function Documentation

void hel_PalBgClear16 u32  PaletteBank  ) 
 

Set a background palette-bank to black.

The hel_PalBgClear16 function sets the background palette-bank specified by PaletteBank to black.

Parameters:
PaletteBank The palette-bank (0..15)
See also:
hel_PalBgClearEx, hel_PalBgClear256

void hel_PalBgClear256 void   ) 
 

Set entire background palette to black.

The hel_PalBgClear256 function sets the entire background palette to black.

See also:
hel_PalBgClearEx, hel_PalBgClear16

void hel_PalBgClearEx u32  StartIndex,
u32  EndIndex,
u32  R,
u32  G,
u32  B
 

Set entire background palette to a specific color.

This function sets all palette entries between and including StartIndex to EndIndex to the color specified in R, G and B.

Parameters:
StartIndex Index to start at (0..254)
EndIndex Index to end at (StartIndex+1..n)
R Red amount (0..255)
G Green amount (0..255)
B Blue amount (0..255)
See also:
hel_PalBgClear256, hel_PalBgClear16

void hel_PalBgInvert16 u32  PaletteBank  ) 
 

Invert colors of a 16 color background palette-bank.

The hel_PalBgInvert16 function inverts the colors of the background palette, specified by PaletteBank.

Parameters:
PaletteBank The palette-bank (0..15)
See also:
hel_PalBgInvertEx, hel_PalBgInvert256

void hel_PalBgInvert256 void   ) 
 

Invert colors of entire background palette.

This function inverts the entire background palette entries (colors)

See also:
hel_PalBgInvertEx, hel_PalBgInvert16

void hel_PalBgInvertEx u32  StartIndex,
u32  EndIndex
 

Invert a part of background palette.

This function inverts all background-palette colors between and including StartIndex and EndIndex.

Parameters:
StartIndex Index to start at (0..254)
EndIndex Index to end at (StartIndex+1..n)
See also:
hel_PalBgClear256, hel_PalBgClear16

void hel_PalBgLoad void *  SourceData,
u32  NumColors
 

Load a background palette.

The hel_PalBgLoad function loads a background palette.

Parameters:
SourceData Pointer to palette-data
NumColors Number of colors to load. The destination starting index is 0.

void hel_PalBgLoad16 void *  SourceData,
u32  PaletteBank
 

Load a 16 color background palette.

The hel_PalBgLoad16 function loads a 16 color background palette to the bank specified by PaletteBank

Parameters:
SourceData Pointer to palette-data
PaletteBank The palette-bank (0..15)
Note:
ham_LoadBGPal16 does not work from time to time. I didn't find out the reason for that, so I just made hel_PalBgLoad16 and use this one instead.

void hel_PalBgLoad256 void *  SourceData  ) 
 

Load a 256 color background palette.

The hel_PalBgLoad256 function loads a 256 color background palette

Parameters:
SourceData Pointer to palette-data

void hel_PalBgSave16 void *  pDest,
u32  PaletteBank
 

Save a 16 color background palette.

The hel_PalObjSave16 function copies a 16 color background palette from VRAM to the memorylocation specified by pDest.

Parameters:
pDest Destination address, must point to an allocated buffer of at least 16 halfwords (u16's).
PaletteBank Source palette-bank (0..15)

void hel_PalBgSave256 void *  pDest  ) 
 

Save a 256 color background palette.

The hel_PalBgSave256 function copies the 256 color background palette from VRAM to the memorylocation specified by pDest.

Parameters:
pDest Destination address, must point to an allocated buffer of at least 256 halfwords (u16's).

void hel_PalObjLoad void *  SourceData,
u32  NumColors
 

Load an object palette.

The hel_PalObjLoad function loads an object palette.

Parameters:
SourceData Pointer to palette-data
NumColors Number of colors to load. The destination starting index is 0.

void hel_PalObjLoad16 void *  SourceData,
u32  PaletteBank
 

Load a 16 color object palette.

The hel_PalObjLoad16 function loads a 16 color object palette to the bank specified by PaletteBank

Parameters:
SourceData Pointer to palette-data
PaletteBank The palette-bank (0..15)
Note:
ham_LoadObjPal16 does not work from time to time. I didn't find out the reason for that, so I just made hel_PalObjLoad16 and use this one instead.

void hel_PalObjLoad256 void *  SourceData  ) 
 

Load a 256 color object palette.

The hel_PalObjLoad256 function loads a 256 color object palette

Parameters:
SourceData Pointer to palette-data

void hel_PalObjSave16 void *  pDest,
u32  PaletteBank
 

Save a 16 color object palette.

The hel_PalObjSave16 function copies a 16 color object palette from VRAM to the memorylocation specified by pDest.

Parameters:
pDest Destination address, must point to an allocated buffer of at least 16 halfwords (u16's).
PaletteBank Source palette-bank (0..15)

void hel_PalObjSave256 void *  pDest  ) 
 

Save a 256 color object palette.

The hel_PalObjSave256 function copies the 256 color object palette from VRAM to the memorylocation specified by pDest.

Parameters:
pDest Destination address, must point to an allocated buffer of at least 256 halfwords (u16's).


Generated on Fri Jul 8 19:55:50 2005 by DoxyGen 1.4.3