Skip to content

Commit

Permalink
Fixes bug in PASM debugger REG/LUT map rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChipGracey committed Mar 5, 2023
1 parent 6f4eb70 commit 78d6a8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DebuggerUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2294,9 +2294,9 @@ procedure TDebuggerForm.DrawGoButton(ButtonColor, CaptionColor: integer);
procedure TDebuggerForm.BlendPixel(var p:PByte; a, b: integer; alpha, shade: byte);
begin
// New gamma-corrected alpha blending
p^ := Round(Power((Power(a shr 00 and $FF, 2.0) * (255 - alpha) + Power(b shr 00 and $FF, 2.0) * alpha) / 256, 1 / 0.5)); Inc(p);
p^ := Round(Power((Power(a shr 08 and $FF, 2.0) * (255 - alpha) + Power(b shr 08 and $FF, 2.0) * alpha) / 256, 1 / 0.5)); Inc(p);
p^ := Round(Power((Power(a shr 16 and $FF, 2.0) * (255 - alpha) + Power(b shr 16 and $FF, 2.0) * alpha) / 256, 1 / 0.5)); Inc(p);
p^ := Round(Power((Power(a shr 00 and $FF, 2.0) * (255 - alpha) + Power(b shr 00 and $FF, 2.0) * alpha) / 256, 0.5)); Inc(p);
p^ := Round(Power((Power(a shr 08 and $FF, 2.0) * (255 - alpha) + Power(b shr 08 and $FF, 2.0) * alpha) / 256, 0.5)); Inc(p);
p^ := Round(Power((Power(a shr 16 and $FF, 2.0) * (255 - alpha) + Power(b shr 16 and $FF, 2.0) * alpha) / 256, 0.5)); Inc(p);
// Old linear alpha blending
{ p^ := Smaller((a shr 00 and $FF * not alpha + b shr 00 and $FF * alpha + $FF) shr 8 + shade, $FF); Inc(p);
p^ := Smaller((a shr 08 and $FF * not alpha + b shr 08 and $FF * alpha + $FF) shr 8 + shade, $FF); Inc(p);
Expand Down
Binary file modified PNut_v39.exe
Binary file not shown.

0 comments on commit 78d6a8b

Please sign in to comment.