Skip to content

Commit

Permalink
Fixed font rendering issues and bitmap loading
Browse files Browse the repository at this point in the history
  • Loading branch information
aegis-dev committed Mar 18, 2024
1 parent a091564 commit d33acb6
Show file tree
Hide file tree
Showing 96 changed files with 7 additions and 1 deletion.
Binary file modified Pixie/Internal/Assets/font/3x5/font_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_31.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Pixie/Internal/Assets/font/3x5/font_32.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_33.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_34.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_35.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_36.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_37.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_38.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_39.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_4.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_40.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_41.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_42.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_43.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_44.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_45.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_46.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_47.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_48.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_49.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_5.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_50.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_51.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_52.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_53.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_54.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_55.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_56.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_57.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_58.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_59.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_6.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_60.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_61.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_62.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_63.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_64.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_65.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_66.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_67.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_68.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_69.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_7.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_70.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_71.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_72.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_73.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_74.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_75.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_76.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_77.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_78.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_79.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_8.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_80.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_81.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_82.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_83.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_84.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_85.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_86.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_87.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_88.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_89.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_9.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_90.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_91.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_92.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_93.png
Binary file modified Pixie/Internal/Assets/font/3x5/font_94.png
5 changes: 5 additions & 0 deletions Pixie/Internal/Palette.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ private static List<Color> GetPalette()

internal static byte ColorFromRgb(Color color)
{
if (color.R == 0 && color.G == 0 && color.B == 0 && color.A == 0)
{
return (byte)PixieColor.None;
}

for (int colorIdx = 0; colorIdx < ColorPalette.Count; ++colorIdx)
{
Color paletteColor = ColorPalette[colorIdx];
Expand Down
3 changes: 2 additions & 1 deletion Pixie/Sprite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public static Sprite FromBitmapPNG(in Bitmap bitmap)
for (long y = bitmap.Height - 1; y >= 0; --y)
{
Color rgbColor = bitmap.GetPixel((int)x, (int)y);
column.Add(Palette.ColorFromRgb(rgbColor));
byte colorIdx = Palette.ColorFromRgb(rgbColor);
column.Add(colorIdx);
}
pixels.Add(column);
}
Expand Down

0 comments on commit d33acb6

Please sign in to comment.