From 2f8a59cd29a11fca09f9dbefb18e024285b4b872 Mon Sep 17 00:00:00 2001 From: memdmp Date: Sun, 12 Jan 2025 04:08:50 +0100 Subject: fix: make pattern work --- patterns/font.hexpat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'patterns') diff --git a/patterns/font.hexpat b/patterns/font.hexpat index 4a6a8c4..b1ebe61 100644 --- a/patterns/font.hexpat +++ b/patterns/font.hexpat @@ -7,12 +7,14 @@ import std.sys; import type.magic; +/* doesnt work idk why imhex is dying struct PixelRow { - u8 columns[width - 1] [[name("Row"), inline]]; + u8 columns[width] [[name("Row"), inline]]; }; struct ImageData { PixelRow rows[while(!std::mem::eof())] [[name("Rows"), inline]]; }; +*/ struct Offset { /** The X Offset of the character */ s32 x [[name("X"), comment("The X offset of the character's pixel data"), color("ff99ff")]]; @@ -26,9 +28,9 @@ struct CharBmp { /** The width of each line of the drawn character */ Offset offset [[name("Offset"), comment("Indicates the offset of the character's drawn data, in pixels"), color("cc99bb")]]; /** The horizontal offset that the origin of the next glyph should be from the origin of this glyph. */ - float advance_width [[name("Offset"), comment("Indicates the offset of the character's drawn data, in pixels"), color("99aaff")]]; + s32 advance_width [[name("Offset"), comment("Indicates the offset of the character's drawn data, in pixels"), color("99aaff")]]; /** Table of contents entries */ - ImageData imageData[width] [[name("Content")]]; + u8 imageData[while(!std::mem::eof())] [[name("Content")]]; }; CharBmp charbmp @ 0x00 [[name("CharBmp")]]; -- cgit v1.2.3