Fix 4bits and 8bits images format.
This commit is contained in:
parent
dd5317de24
commit
dbe24a0891
2 changed files with 7 additions and 6 deletions
|
@ -5,14 +5,13 @@ This win32 layer will allow to easily update from the original Emu48 source code
|
|||
It can open or save the exact same state files (state.e48/e49) than the original Windows application!
|
||||
|
||||
NOT WORKING
|
||||
- Disassembler
|
||||
- Debugger
|
||||
- Macro
|
||||
- Infrared Printer
|
||||
- Serial Ports (Wire or Ir)
|
||||
- Disassembler
|
||||
- Debugger
|
||||
|
||||
TODO
|
||||
- Support 8bits images
|
||||
- Add recent files
|
||||
- Bug: Port1 is not enable from the state.e48 file!
|
||||
- Option to allow rotation
|
||||
|
@ -40,3 +39,4 @@ DONE
|
|||
- Settings show KML log should be true by default.
|
||||
- Sound
|
||||
- Bug: No refresh with the clock (Fix timers)
|
||||
- Support 8bits images
|
||||
|
|
|
@ -1254,7 +1254,7 @@ BOOL StretchBlt(HDC hdcDest, int xDest, int yDest, int wDest, int hDest, HDC hdc
|
|||
|
||||
for (float y = yDest; y < dst_maxy; y++) {
|
||||
float src_curx = xSrc;
|
||||
BYTE parity = 0;
|
||||
BYTE parity = xSrc;
|
||||
for (float x = xDest; x < dst_maxx; x++, parity++) {
|
||||
// Point sampling - you can also impl as bilinear or other
|
||||
|
||||
|
@ -1267,6 +1267,7 @@ BOOL StretchBlt(HDC hdcDest, int xDest, int yDest, int wDest, int hDest, HDC hdc
|
|||
switch (sourceBitCount) {
|
||||
case 4: {
|
||||
BYTE colorIndex = (parity & 0x1 ? sourcePixel[0] & (BYTE)0x0F : sourcePixel[0] >> 4);
|
||||
//BYTE colorIndex = (parity & 0x1 ? sourcePixel[0] >> 4 : sourcePixel[0] & (BYTE)0x0F);
|
||||
if (palPalEntry) {
|
||||
destinationPixel[0] = palPalEntry[colorIndex].peRed; //TODO Exchange Blue and Red?
|
||||
destinationPixel[1] = palPalEntry[colorIndex].peGreen;
|
||||
|
@ -1516,9 +1517,9 @@ UINT SetDIBColorTable(HDC hdc, UINT iStart, UINT cEntries, CONST RGBQUAD *prgbq
|
|||
&& hdc->realizedPalette->paletteLog->palNumEntries > 0 && iStart < hdc->realizedPalette->paletteLog->palNumEntries) {
|
||||
PALETTEENTRY * palPalEntry = hdc->realizedPalette->paletteLog->palPalEntry;
|
||||
for (int i = iStart, j = 0; i < cEntries; i++, j++) {
|
||||
palPalEntry[i].peRed = prgbq[j].rgbRed;
|
||||
palPalEntry[i].peRed = prgbq[j].rgbBlue;
|
||||
palPalEntry[i].peGreen = prgbq[j].rgbGreen;
|
||||
palPalEntry[i].peBlue = prgbq[j].rgbBlue;
|
||||
palPalEntry[i].peBlue = prgbq[j].rgbRed;
|
||||
palPalEntry[i].peFlags = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue