diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 35fb4a21a..b6b6cf588 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +May 17, 2008 (Changes by Graf Zahl) +- Fixed: All translucent blending operations for CopyColors must treat an + alpha of 0 so that the pixel is not modified or texture composition as + intended will not work. + May 16, 2008 - Fixed: 3D hardware texture filling did not copy pixels with 0 alpha, preserving whatever was underneath in the texture box previously. diff --git a/src/textures/bitmap.h b/src/textures/bitmap.h index 669218a5b..5d9b58a6f 100644 --- a/src/textures/bitmap.h +++ b/src/textures/bitmap.h @@ -312,42 +312,42 @@ struct bBlend { static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (d*i->invalpha + s*i->alpha) >> FRACBITS; } static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; } - static __forceinline bool ProcessAlpha0() { return true; } + static __forceinline bool ProcessAlpha0() { return false; } }; struct bAdd { static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MIN((d*FRACUNIT + s*i->alpha) >> FRACBITS, 255); } static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; } - static __forceinline bool ProcessAlpha0() { return true; } + static __forceinline bool ProcessAlpha0() { return false; } }; struct bSubtract { static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MAX((d*FRACUNIT - s*i->alpha) >> FRACBITS, 0); } static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; } - static __forceinline bool ProcessAlpha0() { return true; } + static __forceinline bool ProcessAlpha0() { return false; } }; struct bReverseSubtract { static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MAX((-d*FRACUNIT + s*i->alpha) >> FRACBITS, 0); } static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; } - static __forceinline bool ProcessAlpha0() { return true; } + static __forceinline bool ProcessAlpha0() { return false; } }; struct bModulate { static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (s*d)/255; } static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; } - static __forceinline bool ProcessAlpha0() { return true; } + static __forceinline bool ProcessAlpha0() { return false; } }; struct bCopyAlpha { static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (s*a + d*(255-a))/255; } static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; } - static __forceinline bool ProcessAlpha0() { return true; } + static __forceinline bool ProcessAlpha0() { return false; } };