X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fapplevideo.cpp;h=807253b1d267644d8a98dd0921f69a56dc95d918;hb=c0001155bc0909da61f6c849c0be9b16e9b7f4b6;hp=d3060bf96719278c9128fbb1f2706d12eb1c4f46;hpb=ebcadf2555c4086606f3a0b6c23cbec80d9ac1fd;p=apple2 diff --git a/src/applevideo.cpp b/src/applevideo.cpp index d3060bf..807253b 100755 --- a/src/applevideo.cpp +++ b/src/applevideo.cpp @@ -416,7 +416,8 @@ static void DrawString2(uint32_t x, uint32_t y, uint32_t color) uint32_t bBlue = (eBlue * invTrans + nBlue * trans) / 255; //THIS IS NOT ENDIAN SAFE - *(scrBuffer + address + xx + (yy * VIRTUAL_SCREEN_WIDTH)) = 0xFF000000 | (bBlue << 16) | (bGreen << 8) | bRed; +//NB: Setting the alpha channel here does nothing. + *(scrBuffer + address + xx + (yy * VIRTUAL_SCREEN_WIDTH)) = 0x7F000000 | (bBlue << 16) | (bGreen << 8) | bRed; } } } @@ -797,21 +798,15 @@ static void RenderHiRes(uint16_t toLine/*= 192*/) static void RenderDHiRes(uint16_t toLine/*= 192*/) { -// NOTE: Not endian safe. !!! FIX !!! [DONE] -#if 0 - uint32_t pixelOn = (screenType == ST_WHITE_MONO ? 0xFFFFFFFF : 0xFF61FF61); -#else // Now it is. Now roll this fix into all the other places... !!! FIX !!! // The colors are set in the 8-bit array as R G B A uint8_t monoColors[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0x61, 0xFF, 0x61, 0xFF }; uint32_t * colorPtr = (uint32_t *)monoColors; uint32_t pixelOn = (screenType == ST_WHITE_MONO ? colorPtr[0] : colorPtr[1]); -#endif for(uint16_t y=0; y> 1); + pixels = previous4bits | (pixels >> 1); // We now have 28 pixels (expanded from 14) in word: mask is $0F FF FF FF // 0ppp 1111 1111 1111 1111 1111 1111 1111 @@ -833,18 +828,18 @@ static void RenderDHiRes(uint16_t toLine/*= 192*/) { for(uint8_t i=0; i<7; i++) { - uint8_t bitPat = (pixels & 0x7F000000) >> 24; + uint8_t bitPat = (pixels & 0xFE000000) >> 25; pixels <<= 4; for(uint8_t j=0; j<4; j++) { - uint8_t color = blurTable[bitPat][j]; - scrBuffer[(x * 14) + (i * 4) + j + (((y * 2) + 0) * VIRTUAL_SCREEN_WIDTH)] = palette[color]; - scrBuffer[(x * 14) + (i * 4) + j + (((y * 2) + 1) * VIRTUAL_SCREEN_WIDTH)] = palette[color]; + uint32_t color = palette[blurTable[bitPat][j]]; + scrBuffer[(x * 14) + (i * 4) + j + (((y * 2) + 0) * VIRTUAL_SCREEN_WIDTH)] = color; + scrBuffer[(x * 14) + (i * 4) + j + (((y * 2) + 1) * VIRTUAL_SCREEN_WIDTH)] = color; } } - previous3bits = pixels & 0x70000000; + previous4bits = pixels & 0xF0000000; } else {