Skip to content

Commit

Permalink
PlatformGraphics: Properly handle transparency in drawPixels(short)
Browse files Browse the repository at this point in the history
Seems to fix basically all Karma Studios games. (See Issue #50)

Note: They don't render properly unless FreeJ2ME matches their
expected resolution, so keep that in mind.
  • Loading branch information
AShiningRay committed Feb 21, 2025
1 parent 2b4d1d7 commit 513cf7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/recompile/mobile/PlatformGraphics.java
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ public void drawPixels(short[] pixels, boolean transparency, int offset, int sca
{
int index = offset + (col) + (row * scanlength);
data[row * width + col] = pixelToColor(pixels[index], format);
if (!transparency) { data[row * width + col] &= 0x00FFFFFF; } // Clear the alpha channel
if (!transparency) { data[row * width + col] = (data[row * width + col] & 0x00FFFFFF) | 0xFF000000; } // Set alpha to 255
}
}

Expand Down

0 comments on commit 513cf7c

Please sign in to comment.