![]() | ![]() ![]() |
| Home · Downloads · Your Account · Submit News |
|
Documentation Homepage HAMLib reference Back to HAM Homepage |
|
Functions | |
| void | ham_SetFxMode (u16 source_layer, u16 target_layer, u16 fx_mode) |
| Set the affected layers for alpha blending and tranparency. | |
| void | ham_SetFxAlphaLevel (u16 source_intensity, u16 target_intensity) |
| Set the tranparency/luminosity amount of FX layers. | |
| void | ham_SetFxBrightnessLevel (u16 intensity) |
| Set the brightness/darkness amount of FX layers. | |
|
||||||||||||
|
Set the tranparency/luminosity amount of FX layers.
After you set up tranparent layers and made sure their priorities are correct (if in doubt, see ham_InitBg() for details about priorities of backgrounds), you can user this function to determine the luminosity of the selected source and target layers. A setting of 0 means no luminosity, a setting of 15 means maximum luminosity. Also, please note that this function is only applicable if your FX mode is set to FX_MODE_ALPHABLEND. See also: ham_SetFxMode() ham_CreateObj() ham_InitBg() |
|
|
Set the brightness/darkness amount of FX layers.
Please note that calling this function will have no effect if the FX Mode FX_MODE_ALPHABLEND is set. See also: ham_SetFxMode() ham_SetFxAlphaLevel() |
|
||||||||||||||||
|
Set the affected layers for alpha blending and tranparency.
Bit Table for both source_layer and target_layer: bit | meaning (if set to 1) ----+---------------------- 0 | enable BG0 1 | enable BG1 2 | enable BG2 3 | enable BG3 4 | enable OBJ (sprites) 5 | enable BD 6 | unused 7 | unused For example, the example above would look as follows in C code: ham_SetFxMode(BIT0,BIT1,FX_MODE_ALPHABLEND); You can also select multiple source and target layers simultaneously. To make it easier for you to enter them, HAM provides a service macro for this, you can just write:
ham_SetFxMode(FX_LAYER_SELECT(1,0,0,0,0,0),
FX_LAYER_SELECT(0,1,0,0,0,0),
FX_MODE_ALPHABLEND);
See also: ham_CreateObj() ham_InitBg() ham_SetFxAlphaLevel() |