PAlib: PA_SpecialFx.h File Reference

Main Page | Modules | File List | Globals | Search for

# PA_SpecialFx.h File Reference

Special effects options. More...

Go to the source code of this file.

## Defines

#define | REG_MOSAIC(screen) _REG16(0x0400004C + (screen * 0x1000))
#define | REG_BLDCNT(screen) _REG16(0x04000050 + (screen * 0x1000))
#define | REG_BLDALPHA(screen) _REG16(0x04000052 + (screen * 0x1000))
#define | SFX_BG0 1
#define | SFX_BG1 2
#define | SFX_BG2 4
#define | SFX_BG3 8
#define | SFX_OBJ 16
#define | SFX_BD 32
#define | SFX_NONE 0
#define | SFX_ALPHA 1
#define | SFX_BRIGHTINC 2
#define | SFX_BRIGHTDEC 3
#define | PA_EnableBgMosaic(screen, bg) _REG16(REG_BGCNT(screen, bg)) |= (1 << 6)
| Enable the mosaic effect for a given background
#define | PA_DisableBgMosaic(screen, bg) _REG16(REG_BGCNT(screen, bg)) &= ~(1 << 6)
| Disable the mosaic effect for a given background
#define | PA_SetBgMosaicXY(screen, h_size, v_size) {REG_MOSAIC(screen) &= 255; REG_MOSAIC(screen) |= ((h_size) + ((v_size) << 4));}
| Set the Mosaic parameters for the backgrounds
#define | PA_SetSpriteMosaicXY(screen, h_size, v_size) {REG_MOSAIC(screen) &= (255 << 8); REG_MOSAIC(screen) |= (((h_size) << 8) + ((v_size) << 12));}
| Set the Mosaic parameters for the sprites
#define | PA_EnableSpecialFx(screen, EffectType, FirstTarget, SecondTarget) REG_BLDCNT(screen) = ((FirstTarget) + ((SecondTarget) << 8) + ((EffectType) << 6))
| Enable Special Effects and set whether backgrounds and sprites will use them or not. This also sets the type of Effect
#define | PA_DisableSpecialFx(screen) REG_BLDCNT(screen) = 0
| Disable Special Effects
#define | PA_SetSFXAlpha(screen, Coeff1, Coeff2) REG_BLDALPHA(screen) = (Coeff1) + ((Coeff2) << 8)
| Set the special effect parameters for Alpha-Blending

## Detailed Description

Special effects options.

Special effects (alpha-blending, luminosity, mosaic effect...)