Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshakami committed Jul 10, 2024
1 parent ade9dbb commit 229d350
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions plt0/code/Parse_args.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,7 @@ public void Parse_args(string[] args, byte[] banner = null)
return;
}
Fill_palette_class.Fill_palette(bmp_palette, pixel_start_offset, array_size, colour_palette, rgba_channel, custom_rgba, palette_format_int32, algorithm, alpha, round3, round4, round5, round6);
// TODO: check missing assignment to output from the function above ??^^^^^ try to add a bmp of 16 pixels in input file 2.
}

}
Expand Down
8 changes: 4 additions & 4 deletions plt0/code/Write_bmp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ nothing happens

case 4: // RGB565
{
data[28] = 24; // converted to 24bpp to prevent loss
data[28] = 24; // converted to 24bpp to prevent loss - but I added alpha anyways
break;
}
case 2: // AI4
Expand Down Expand Up @@ -727,7 +727,7 @@ nothing happens
pixel[index + 4] = 0xff;
}
}
else // reads 0RRR RRGG GGGB BBBB
else // reads 1RRR RRGG GGGB BBBB
{
pixel[index + 2] = (byte)((colour_palette[(index_list[z][j][k] >> 4) << 1] << 1) & 248); // red
if (pixel[index + 2] == 248)
Expand Down Expand Up @@ -803,7 +803,7 @@ nothing happens
pixel[index] = 0xff;
}
}
else // reads 0RRR RRGG GGGB BBBB
else // reads 1RRR RRGG GGGB BBBB
{
pixel[index + 2] = (byte)((colour_palette[index_list[z][j][k] << 1] << 1) & 248); // red
if (pixel[index + 2] == 248)
Expand Down Expand Up @@ -862,7 +862,7 @@ nothing happens
pixel[index] = 0xff;
}
}
else // reads 0RRR RRGG GGGB BBBB
else // reads 1RRR RRGG GGGB BBBB
{
pixel[index + 2] = (byte)((colour_palette[(index_list[z][j][k] << 9) + (index_list[z][j][k + 1] << 1)] << 1) & 248); // red
if (pixel[index + 2] == 248)
Expand Down

0 comments on commit 229d350

Please sign in to comment.