PAlib: Fichier source de PA_SpecialFx.h

Page principale | Modules | Liste des fichiers | Portée globale | Rechercher

# PA_SpecialFx.h

Aller à la documentation de ce fichier.

    00001 #ifndef _PA_SpecialFx
    00002 #define _PA_SpecialFx
    00003
    00004
    00005
    00006
    00007 #define REG_MOSAIC(screen) _REG16(0x0400004C + (screen * 0x1000))
    00008 #define REG_BLDCNT(screen) _REG16(0x04000050 + (screen * 0x1000))
    00009 #define REG_BLDALPHA(screen) _REG16(0x04000052 + (screen * 0x1000))
    00010
    00011 #define SFX_BG0 1
    00012 #define SFX_BG1 2
    00013 #define SFX_BG2 4
    00014 #define SFX_BG3 8
    00015 #define SFX_OBJ 16
    00016 #define SFX_BD  32
    00017
    00018 #define SFX_NONE 0
    00019 #define SFX_ALPHA 1
    00020 #define SFX_BRIGHTINC 2
    00021 #define SFX_BRIGHTDEC 3
    00022
    00023
    00049 #define PA_EnableBgMosaic(screen, bg) _REG16(REG_BGCNT(screen, bg)) |= (1 << 6)
    00050
    00051
    00063 #define PA_DisableBgMosaic(screen, bg) _REG16(REG_BGCNT(screen, bg)) &= ~(1 << 6)
    00064
    00065
    00066
    00081 #define PA_SetBgMosaicXY(screen, h_size, v_size) {REG_MOSAIC(screen) &= 255; REG_MOSAIC(screen) |= ((h_size) + ((v_size) << 4));}
    00082
    00083
    00098 #define PA_SetSpriteMosaicXY(screen, h_size, v_size) {REG_MOSAIC(screen) &= (255 << 8); REG_MOSAIC(screen) |= (((h_size) << 8) + ((v_size) << 12));}
    00099
    00100
    00101
    00102
    00103
    00121 #define PA_EnableSpecialFx(screen, EffectType, FirstTarget, SecondTarget) REG_BLDCNT(screen) = ((FirstTarget) + ((SecondTarget) << 8) + ((EffectType) << 6))
    00122
    00123
    00124
    00125
    00134 #define PA_DisableSpecialFx(screen) REG_BLDCNT(screen) = 0
    00135
    00136
    00137
    00152 #define PA_SetSFXAlpha(screen, Coeff1, Coeff2) REG_BLDALPHA(screen) = (Coeff1) + ((Coeff2) << 8)
    00153
    00154  // end of SpecialFx
    00156
    00157
    00158
    00159 #endif
    00160
    00161