|
#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) do{PA_REG_MOSAIC(screen) &= 255; PA_REG_MOSAIC(screen) |= ((h_size) + ((v_size) << 4));}while(0) |
| Set the Mosaic parameters for the backgrounds.
|
|
#define | PA_SetSpriteMosaicXY(screen, h_size, v_size) do{PA_REG_MOSAIC(screen) &= (255 << 8); PA_REG_MOSAIC(screen) |= (((h_size) << 8) + ((v_size) << 12));}while(0) |
| Set the Mosaic parameters for the sprites.
|
|
#define | PA_EnableSpecialFx(screen, EffectType, FirstTarget, SecondTarget) PA_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) PA_REG_BLDCNT(screen) = 0 |
| Disable Special Effects.
|
|
#define | PA_SetSFXAlpha(screen, Coeff1, Coeff2) PA_REG_BLDALPHA(screen) = (Coeff1) + ((Coeff2) << 8) |
| Set the special effect parameters for Alpha-Blending.
|
|
Set the sprite special effects (alpha-blending, luminosity, mosaic effects...)
◆ PA_EnableBgMosaic
#define PA_EnableBgMosaic |
( |
|
screen, |
|
|
|
bg |
|
) |
| _REG16(REG_BGCNT(screen, bg)) |= (1 << 6) |
Enable the mosaic effect for a given background.
- Parameters
-
screen | Background screen (0 or 1) |
bg | Background number |
◆ PA_DisableBgMosaic
#define PA_DisableBgMosaic |
( |
|
screen, |
|
|
|
bg |
|
) |
| _REG16(REG_BGCNT(screen, bg)) &= ~(1 << 6) |
Disable the mosaic effect for a given background.
- Parameters
-
screen | Background screen (0 or 1) |
bg | Background number |
◆ PA_SetBgMosaicXY
#define PA_SetBgMosaicXY |
( |
|
screen, |
|
|
|
h_size, |
|
|
|
v_size |
|
) |
| do{PA_REG_MOSAIC(screen) &= 255; PA_REG_MOSAIC(screen) |= ((h_size) + ((v_size) << 4));}while(0) |
Set the Mosaic parameters for the backgrounds.
- Parameters
-
screen | Screen... |
h_size | Horizontal size of the mosaic (1 for 1 pixel, 2 for 2 pixels, etc...) |
v_size | Vertical size of the mosaic (1 for 1 pixel, 2 for 2 pixels, etc...) |
◆ PA_SetSpriteMosaicXY
#define PA_SetSpriteMosaicXY |
( |
|
screen, |
|
|
|
h_size, |
|
|
|
v_size |
|
) |
| do{PA_REG_MOSAIC(screen) &= (255 << 8); PA_REG_MOSAIC(screen) |= (((h_size) << 8) + ((v_size) << 12));}while(0) |
Set the Mosaic parameters for the sprites.
- Parameters
-
screen | Screen... |
h_size | Horizontal size of the mosaic (1 for 1 pixel, 2 for 2 pixels, etc...) |
v_size | Vertical size of the mosaic (1 for 1 pixel, 2 for 2 pixels, etc...) |
◆ PA_EnableSpecialFx
#define PA_EnableSpecialFx |
( |
|
screen, |
|
|
|
EffectType, |
|
|
|
FirstTarget, |
|
|
|
SecondTarget |
|
) |
| PA_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.
- Parameters
-
screen | Screen... |
EffectType | Effect Type. 0 for non, 1 for alpha-blending, 2 for brightness increase, and 3 for brightness decrease. You can use the macros SFX_NONE, SFX_ALPHA, SFX_BRIGHTINC, SFX_BRIGHTDEC |
FirstTarget | Backgrounds and sprites for which to activate the effect. Use the following macro : SFX_BG0 | SFX_BG1 | SFX_BG2 | SFX_BG3 | SFX_OBJ | SFX_BD (back drop) |
SecondTarget | Backgrounds and sprites to be seen behind the alpha-blending. Use the following macro : SFX_BG0 | SFX_BG1 | SFX_BG2 | SFX_BG3 | SFX_OBJ | SFX_BD (back drop) |
◆ PA_DisableSpecialFx
#define PA_DisableSpecialFx |
( |
|
screen | ) |
PA_REG_BLDCNT(screen) = 0 |
Disable Special Effects.
- Parameters
-
◆ PA_SetSFXAlpha
#define PA_SetSFXAlpha |
( |
|
screen, |
|
|
|
Coeff1, |
|
|
|
Coeff2 |
|
) |
| PA_REG_BLDALPHA(screen) = (Coeff1) + ((Coeff2) << 8) |
Set the special effect parameters for Alpha-Blending.
- Parameters
-
screen | Screen... |
Coeff1 | Coefficient for the first layer, from 0 to 31. Apparently, it's better to set between 0 and 16 |
Coeff2 | Coefficient for the second layer, from 0 to 31. Apparently, it's better to set between 0 and 16 |