From ae2906ca8302cd41f05582232799b35e0b05414d Mon Sep 17 00:00:00 2001 From: Steven Fuller Date: Sun, 12 Aug 2001 01:26:18 +0000 Subject: Fixed particle blending. --- src/win95/awiffld.cpp | 16 +--------------- src/win95/awtexld.cpp | 20 +++++++++----------- 2 files changed, 10 insertions(+), 26 deletions(-) (limited to 'src/win95') diff --git a/src/win95/awiffld.cpp b/src/win95/awiffld.cpp index e281079..1076937 100644 --- a/src/win95/awiffld.cpp +++ b/src/win95/awiffld.cpp @@ -52,7 +52,7 @@ class AwIffConvTransp if (*pCol == iTranspCol) return rawTranspCol; unsigned rv = AwIffConvNonTransp::DoConv(pCol,pPalette db_code1(DB_COMMA nPaletteSize)); if (rv != rawTranspCol) return rv; - + // make the colour non-transparent (nb: only an occasional case) // OK, Here's the plan: @@ -100,15 +100,7 @@ class AwIffConvTransp : (1<= 1100 - // VC5.0 gives inane warnings when += type operators - // are used on types smaller than int (even with - // explicit casting!) - #pragma warning(disable:4244) - #endif if ( nBlueDiffUp <= nBlueDiffDown @@ -155,12 +147,6 @@ class AwIffConvTransp { colAdj.g -= static_cast(1< itFormat(&listTextureFormats); !itFormat.done(); itFormat.next()) { - AdditionalPixelFormat const * pThisFormat = &itFormat(); + AdditionalPixelFormat * pThisFormat = &itFormat(); // is this format suitable? // ignoring alpha for now if @@ -495,12 +493,12 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR { // use display surface format pixelFormat = pfSurfaceFormat; + #endif - } - -/* Just convert the texture to 32bpp */ + /* Just convert the texture to 32bpp */ pixelFormat.palettizedB = 0; - pixelFormat.alphaB = 0; + + pixelFormat.alphaB = 1; pixelFormat.validB = 1; pixelFormat.bitsPerPixel = 32; pixelFormat.redLeftShift = 0; @@ -509,8 +507,8 @@ void AwBackupTexture::ChoosePixelFormat(AwTl::CreateTextureParms const & _parmsR pixelFormat.redRightShift = 0; pixelFormat.greenRightShift = 0; pixelFormat.blueRightShift = 0; - pixelFormat.dwRGBAlphaBitMask = 0x00000000; - + pixelFormat.dwRGBAlphaBitMask = 0xFF000000; + } } extern "C" { @@ -569,7 +567,7 @@ AwTl::SurfUnion AwBackupTexture::CreateTexture(AwTl::CreateTextureParms const & ++y; } - + /* temp junk */ Tex->w = m_nWidth; Tex->h = m_nHeight; @@ -1404,7 +1402,7 @@ void AwBackupTexture::ConvertRow(AwTl::PtrUnion pDest, unsigned nDestWidth, AwTl } } else - { + { if (m_bTranspMask) GenericConvertRow::Do(pDest,nDestWidth,pSrc.colourP+nSrcOffset,nSrcWidth); else -- cgit v1.3