diff options
author | jdgleaver | 2020-10-15 17:00:00 +0100 |
---|---|---|
committer | jdgleaver | 2020-10-15 17:00:00 +0100 |
commit | 23294848d036e19ca45b8b511d343c95b9f914e6 (patch) | |
tree | 976ef8cf2b58958ad4888f97fa736916d6064386 /source/gfx.h | |
parent | 8c24c86a49b23086941814e3ae1d58a2993dac7a (diff) | |
download | snes9x2005-23294848d036e19ca45b8b511d343c95b9f914e6.tar.gz snes9x2005-23294848d036e19ca45b8b511d343c95b9f914e6.tar.bz2 snes9x2005-23294848d036e19ca45b8b511d343c95b9f914e6.zip |
Add 'USE_OLD_COLOUR_OPS' flag + PSP ifdef guards
Diffstat (limited to 'source/gfx.h')
-rw-r--r-- | source/gfx.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/gfx.h b/source/gfx.h index 096ea98..2a5c6f9 100644 --- a/source/gfx.h +++ b/source/gfx.h @@ -33,8 +33,8 @@ typedef struct uint32_t Pitch; int32_t Delta; -#if defined(PSP) - /* PSP uses pre-1.60 colour operations */ +#if defined(USE_OLD_COLOUR_OPS) + /* Pre-1.60 colour operations */ uint16_t* X2; uint16_t* ZERO_OR_X2; #endif @@ -151,8 +151,8 @@ extern uint8_t mul_brightness [16][32]; static INLINE uint16_t COLOR_ADD(uint16_t C1, uint16_t C2) { -#if defined(PSP) - /* PSP uses pre-1.60 colour operations */ +#if defined(USE_OLD_COLOUR_OPS) + /* Pre-1.60 colour operations */ if (C1 == 0) return C2; else if (C2 == 0) @@ -183,8 +183,8 @@ static INLINE uint16_t COLOR_ADD(uint16_t C1, uint16_t C2) ((C2) & RGB_REMOVE_LOW_BITS_MASK)) >> 1) + \ (((C1) & (C2) & RGB_LOW_BITS_MASK) | ALPHA_BITS_MASK)) -#if defined(PSP) -/* PSP uses pre-1.60 colour operations */ +#if defined(USE_OLD_COLOUR_OPS) +/* Pre-1.60 colour operations */ #define COLOR_SUB(C1, C2) \ (GFX.ZERO_OR_X2 [(((C1) | RGB_HI_BITS_MASKx2) - \ ((C2) & RGB_REMOVE_LOW_BITS_MASK)) >> 1] + \ |