(Apologies this tutorial is rushed. Hopefully I will be able to streamline, simplify this, and provide more glyphs in the future, but for now, please accept this draft and hopefully it proves some use. Or here’s the event and supporting files, they should be easy enough to understand on their own.)
A screenshot of inserted glyphs for demonstration.
(TBD Menu font example)
This tutorial covers formatting and inserting custom dialogue and menu glyphs (both are similarly formatted) into an FE8U rom through the buildfile method, and how to use them with the text processor. This also utilizes the simpler ASCII / pointer table and no shift-JIS functionality.
Start with a 16x16px, 4 color image (or export one from FEBuilder).
Hop on over to usenti and export that bad boy as a bin (Image->Export, save as .bin (?), then under GFX: bitmap(GBA) from the dropdown, 2 bpp, deselect Pal checkbox, under File: deselect ‘h file’, click OK)
Your resulting .img.bin file should be 0x40 (64) bytes long. (Why did it add .img? Don’t know.)
Now we have the bitmap data of the glyph, we can make the full glyph struct (which includes character width data), write that glyph into our working file and update the pointer table to include our new glyph. Create a new .event file with the following and (oh heck how do I explain this… use the given glyph_tQuarterNote and _mQuarterNote examples, edit in your own pointer labels and .bin information)
//ASCII / straight-lookup only (FE8U) //Don't use 0x00-0x1F slots, used for dialogue functions //[0x80] is also unusable (forced - character), might be more #ifdef _FE8_ #ifndef menuGlyphTable //ASCII Pointer Table start point #define menuGlyphTable 0x58C7EC #endif #ifndef tGlyphTable #define tGlyphTable 0x58F6F4 #endif #endif ALIGN 4 #define mGlyphEntry(mGlyphEntry,mGlyphLoc) "PUSH; ORG menuGlyphTable+mGlyphEntry*0x04; POIN mGlyphLoc; POP" #define tGlyphEntry(tGlyphEntry,tGlyphLoc) "PUSH; ORG tGlyphTable+tGlyphEntry*0x04; POIN tGlyphLoc; POP" glyph_mQuarterNote: WORD 0x00000000 //empty pointer (no Shift-JIS) BYTE 0x00 //empty code-page # (no Shift-JIS) BYTE 5 //character width BYTE 0x00 //always zero BYTE 0x00 #incbin "mglyph_musicQuarterNote.img.bin" glyph_tQuarterNote: WORD 0x00000000 //empty pointer (no Shift-JIS) BYTE 0x00 //empty code-page # (no Shift-JIS) BYTE 5 //character width BYTE 0x00 //always zero BYTE 0x00 #incbin "tglyph_musicQuarterNote.img.bin" mGlyphEntry(0x81, glyph_mQuarterNote) tGlyphEntry(0x81, glyph_tQuarterNote)
What is “GlyphEntry”?:
TBD (Slots 0x00-0x1F aren’t shown although they do exist, they, along with slot 0x80, have additional functionality inbuilt and shouldn’t be used/overwritten.)
To use in your text:
Example given. [0x81] in this case is the same GlyphEntry referenced earlier, or you can assign it a parse definition of your own.
##DEBUG_GLYPHTEST [OpenMidRight][LoadArcturo][ToggleSmile] [0x81][0x82] I want to sing![N] I want to dance~[0x83][A] [X]
Emblem Magic, FEBuilder font tools