From 5c180a0b09cec08ddc42ac84ccceef86de217095 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 4 Dec 2024 11:30:19 -0300 Subject: [PATCH] Added FONT_SHORT_NARROWER (#5101) --- charmap.txt | 1 + data/scripts/debug.inc | 119 ++++++++++++++++++++++++ graphics/fonts/latin_short_narrower.png | Bin 0 -> 4374 bytes graphics/fonts/latin_small_narrower.png | Bin 7037 -> 4397 bytes graphics_file_rules.mk | 3 + include/fonts.h | 2 + include/text.h | 1 + src/debug.c | 11 +++ src/fonts.c | 36 +++++++ src/text.c | 77 ++++++++++++++- 10 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 graphics/fonts/latin_short_narrower.png diff --git a/charmap.txt b/charmap.txt index 63c2f6ebe1..3a2081e304 100644 --- a/charmap.txt +++ b/charmap.txt @@ -465,6 +465,7 @@ FONT_SMALL_NARROW = FC 06 08 FONT_NARROWER = FC 06 0A FONT_SMALL_NARROWER = FC 06 0B FONT_SHORT_NARROW = FC 06 0C +FONT_SHORT_NARROWER = FC 06 0D @ colors diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index 4851c87c40..9da3f529fc 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -447,3 +447,122 @@ Debug_EventScript_EWRAMCounters:: Debug_EventScript_EWRAMCounters_Text:: .string "Follower Steps: {STR_VAR_1}.\n" .string "Fishing Chain: {STR_VAR_2}.$" + +Debug_EventScript_FontTest_Text_1:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Angel Adept Blind Bodice Clique\n" + .string "Coast Dunce Docile Enact Eosin\l" + .string "Furlong Focal Gnome Gondola Human\l" + .string "Hoist Inlet Iodine Justin Jocose\l" + .string "Knoll Koala Linden Loads Milliner\l" + .string "Modal Number Nodule Onset Oddball\l" + .string "Pneumo Poncho Quanta Qophs Rhone\l" + .string "Roman Snout Sodium Tundra Tocsin\l" + .string "Uncle Udder Vulcan Vocal Whale\l" + .string "Woman Xmas Xenon Yunnan Young\l" + .string "Zloty Zodiac.$" + +Debug_EventScript_FontTest_Text_2:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Angel angel adept for the nuance loads\n" + .string "of the arena cocoa and quaalude. Blind\l" + .string "blind bodice for the submit oboe of the\l" + .string "club snob and abbot. Clique clique\l" + .string "coast for the pouch loco of the franc\l" + .string "assoc and accede. Dunce dunce docile\l" + .string "for the loudness mastodon of the\l" + .string "loud statehood and huddle.$" + +Debug_EventScript_FontTest_Text_3:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Enact enact eosin for the quench coed\n" + .string "of the pique canoe and bleep. Furlong\l" + .string "furlong focal for the genuflect\l" + .string "profound of the motif aloof and offers.\l" + .string "Gnome gnome gondola for the impugn\l" + .string "logos of the unplug analog and smuggle.\l" + .string "Human human hoist for the buddhist\l" + .string "alcohol of the riyadh caliph and\l" + .string "bathhouse.$" + +Debug_EventScript_FontTest_Text_4:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Inlet inlet iodine for the quince\n" + .string "champion of the ennui scampi and shiite.\l" + .string "Justin justin jocose for the djibouti\l" + .string "sojourn of the oranj raj and hajjis.\l" + .string "Knoll knoll koala for the banknote\l" + .string "lookout of the dybbuk outlook and\l" + .string "trekked. Linden linden loads for the\l" + .string "ulna monolog of the consul menthol and\l" + .string "shallot.$" + +Debug_EventScript_FontTest_Text_5:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Milliner milliner modal for the alumna\n" + .string "solomon of the album custom and summon.\l" + .string "Number number nodule for the unmade\l" + .string "economic of the shotgun bison and\l" + .string "tunnel. Onset onset oddball for the\l" + .string "abandon podium of the antiquo tempo\l" + .string "and moonlit. Pneumo pneumo poncho for\l" + .string "the dauphin opossum of the holdup\l" + .string "bishop and supplies.$" + +Debug_EventScript_FontTest_Text_6:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Quanta quanta qophs for the inquest\n" + .string "sheqel of the cinq coq and suqqu. Rhone\l" + .string "rhone roman for the burnt porous of the\l" + .string "lemur clamor and carrot. Snout snout\l" + .string "sodium for the ensnare bosom of the\l" + .string "genus pathos and missing. Tundra\l" + .string "tundra tocsin for the nutmeg isotope\l" + .string "of the peasant ingot and ottoman.$" + +Debug_EventScript_FontTest_Text_7:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Uncle uncle udder for the dunes cloud\n" + .string "of the hindu thou and continuum. Vulcan\l" + .string "vulcan vocal for the alluvial ovoid of\l" + .string "the yugoslav chekhov and revved. Whale\l" + .string "whale woman for the meanwhile blowout\l" + .string "of the forepaw meadow and glowworm.\l" + .string "Xmas xmas xenon for the bauxite\l" + .string "doxology of the tableaux equinox and\l" + .string "exxon.$" + +Debug_EventScript_FontTest_Text_8:: + .string "{FONT_SHORT_NARROWER}" @ Edit this to test your font + .string "Yunnan yunnan young for the dynamo\n" + .string "coyote of the obloquy employ and\l" + .string "sayyid. Zloty zloty zodiac for the gizmo\l" + .string "ozone of the franz laissez and buzzing.$" + +Debug_PrintFontTest:: + msgbox Debug_EventScript_FontTest_Text_1, MSGBOX_DEFAULT + msgbox Debug_EventScript_FontTest_Text_2, MSGBOX_DEFAULT + msgbox Debug_EventScript_FontTest_Text_3, MSGBOX_DEFAULT + msgbox Debug_EventScript_FontTest_Text_4, MSGBOX_DEFAULT + msgbox Debug_EventScript_FontTest_Text_5, MSGBOX_DEFAULT + msgbox Debug_EventScript_FontTest_Text_6, MSGBOX_DEFAULT + msgbox Debug_EventScript_FontTest_Text_7, MSGBOX_DEFAULT + msgbox Debug_EventScript_FontTest_Text_8, MSGBOX_DEFAULT + releaseall + end + +Debug_EventScript_FontTest:: + lockall + goto Debug_PrintFontTest +@ goto_if_eq VAR_RESULT, 0, Debug_NoPokemon +@ dynmultipush Debug_EventScript_InflictStatus1_Text_Single, 0 +@ dynmultipush Debug_EventScript_InflictStatus1_Text_PartyWide, 1 +@ dynmultipush Debug_EventScript_InflictStatus1_Text_Close, 2 +@ dynmultistack 0, 0, FALSE, 3 FALSE, 0, NULL +@ switch VAR_RESULT +@ case 0, Debug_EventScript_InflictStatus1_Single +@ case 1, Debug_EventScript_InflictStatus1_Party +@ case 2, Debug_EventScript_InflictStatus1_Close +@Debug_EventScript_InflictStatus1_Close: +@ releaseall +@ end diff --git a/graphics/fonts/latin_short_narrower.png b/graphics/fonts/latin_short_narrower.png new file mode 100644 index 0000000000000000000000000000000000000000..9c79ae474fdc289bea5a2332d0847001c3aeb190 GIT binary patch literal 4374 zcmcIoc{J3E+yBnjObjM8wnU@sA}-mBAz8AFN>TQ!C`@rJBijr`DqE7uI;But`Eh_>>JASNb2yyex&KqPhKFK*Hwgw^w!QLuTwQrVoKT(y%48}rbX;ys1dSZ%{V-l=;FZc$bO}czc6hz zjd=0!X#7jV47YHuf&8~M{39GSiU^RLC)HEx(MV$3_E$D3%ngy~d;mc6IUrWkvdNx9o>T&BZ{8EmXc_yOB zV9T^F!Y<9+6C;c#Hg1)*ZxT4AvBf`D^mmt(n~QoVkKY~y#UPtq2@ZERCO{U-;^%|M zVsXvOkD%Bt-^=nwDKnMl{VFw6eO_v-04#z{o9|^FUjLAI>@^FY7fGVhVnRN}rmOqtif3Q2x@oNpRJ-$v9s1K4=0^V@d0+-Paq+ z9G5{$AW5R3rogeevpQ||phUILCH!dPp$pTheF8-3S02;|atQ2IQ$1r)Xs6)Y(&$h& zafgx}fNrC`VKvTi+I^IaSXs9B%FLLJ0N zPmR8ZeAMq{!tEN%7cgPY4d%c-So~&h<18bt^x<&Wez_Lf{+Xt%KWu|_Cu?uG@@9VX z%&8OFFHiUH~yRB;>R^{#Y)F50bt|Dq<*kM}A4m z8tKUMc0&H__rMz}19f?om7_a`wt~`;mkIymphlpsN+dg^xTy34KtmpV#!y=D}R)k-ir!Mm&%i`Igfmhs;gr<`s3HHYEPTJA>{9YL( zGG9vit!ouKqW&-MMC$ztaJVGKlwfVz_DS*R34JJC*p)GU2#&h|COjt|3jV8{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FBt>A1wZJE@cD^! z=3R^)Ja=t96$>4E#jn49$C03s=5VxQMG0~-K;Nd&`Cc1$$(mj5Z#?}r_K7YLJ8^n<9%Nes91hHNZTIUlJxxY0GwI-6c7cO(ON3BD?FU_A0t*xy6-)2i~)%UMcry zTe}=$W-5ITPy`sDDX`g*+0!=Cp-mv%zn!{>D+%G4GW}iDm zb!SGD9ul{X?hD`C_$2Kwnppef>lf?XjxEilP+r4LGgP^Z=~eiXg3x;>N-f7|$nP!Y zE^@P24^u=zWx$1m^v`hOnE_nM%XE%DsH-KLguId^LJj_ygFPwl1-q=$9MFhUnK1Nj ovn^UG#rf&9=WQZPy0Z7U$%uzHu;0E_{QJ?cykKiuV&We2U-w!$FaQ7m literal 0 HcmV?d00001 diff --git a/graphics/fonts/latin_small_narrower.png b/graphics/fonts/latin_small_narrower.png index a183bed7cc286937c85ea2f7d7245fa41750ae85..d03f1b8ad0e2dd74778b0054d91943ab79943dc0 100644 GIT binary patch literal 4397 zcmeHLX*`tc-@otM48~Z}SV}UY=%lfn?24&`#29oCCu=7R!m%`EyDdp4TmMdSl4x;K zl0ju`GlOUoqB8ce?_oj`q{m$Ip`QFP{IBQg%pMVN;Yu^IEJ8xp**GYLRNxcX#jcy*Burxw@ae zg&}{PBgvMBJQEjPpv)SJHdn&Z`*_;mj5vJe8X8KTS&weC0ecCFy!dJ1VL)jHL6(`y zVMWM9DC%<3#0|aydP%wAkL70E4Y0lYHlu1^0{PjdA1|i>cEuwMb>&(m|^0yF=1GY-x#I&HMX!Q%% zUAUF>-zMbm;aC{?N3FhY?`0>OAx3gghW#*tBIBgYX!$CUb&9M)HlXff_+sFd8-UXL z$k>C7pQj$s=_qNbna1?%jUNILyGYRM5yT_t>>s8w5*|va&al+KPHhFpqZK~p2YK)>!BAcqV3i!R?;zJ`7xaxok9?rdP^tr@TJCoztNbc@1s$CuZknOySs%oCYg<& zZ+#)G)e6ehyk*pI#ZEz-P0d9A1$Q{`E58f&Q!hePFcNeMxeB$$W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ab z0f@1pDcM+iaN(p$QP9dQQK*R3X5Hl1B(1cVwM%hIVZ$qA8iziQrk^p{JGC)cJ1nCw zs7s}>6o$E7+O~kbNr$YACdX7=OVfe#VEc%R3ij z)qdO~*Ibn=4ov@-H-J&mT`;3D>NLRNyN^TaldgUDgE?#ec+!^3$) zi*G^m?qcThTO%!b>;yQl@pho|4oWuXvg(cDzRB2`&9`BlShr~5aiAIgvC~p$gt*u2 z*HS0F`DR?r_7yPa)w%(2QFebQvD+lC;)LC?jig?UtXOO>Gdv#Mr^wuJ$^pP#FK*nQ zJqml(VCZWmtIyHNi?H*(CfOf))|uSAsqB+$$s6dg;Qft@uBWTEF_%NR-+ zB1xQxVI(aYt%}rFGL|E%y$O*%S#w0W&(sjDM)b`+u(_ut{nDq?p%pM0*p>^s_ze=x zCg#i5>nw-g>DVf`-CwBR2W-sN({wT0>(E3J7q(+ubfhprn6(kYE8G1u1EdR!-WsH^ zraTG zm4Dt+aUg`oyzKq$AQUJXisNMMy{(ERybr3sHI1 zw#j??To!aBcJzfU*mi@w94KkpA}=}_rgpS;y^5OTsHkXSbv*nM6+u57nLFD}K0Ofe zMb0yNivhA^pk%QbjKB4$_`aX4eW`@gr}6c6D2>J24t0MX`g3ODkMx_J9p;?p$R)G8iciG{+uu3wTj>n5J;t>SLUh{J;F2~R jLAY8!oVE2w&&W9OFF#gk*>)0og9cn3-5qLH2PgdxOU@pT diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 39d634e19d..9f1be162f4 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -248,6 +248,9 @@ $(FONTGFXDIR)/small_narrower.latfont: $(FONTGFXDIR)/latin_small_narrower.png $(FONTGFXDIR)/short_narrow.latfont: $(FONTGFXDIR)/latin_short_narrow.png $(GFX) $< $@ +$(FONTGFXDIR)/short_narrower.latfont: $(FONTGFXDIR)/latin_short_narrower.png + $(GFX) $< $@ + $(FONTGFXDIR)/small.hwjpnfont: $(FONTGFXDIR)/japanese_small.png $(GFX) $< $@ diff --git a/include/fonts.h b/include/fonts.h index a6be35db98..5e6a9ffad5 100644 --- a/include/fonts.h +++ b/include/fonts.h @@ -21,5 +21,7 @@ extern const u8 gFontSmallNarrowerLatinGlyphWidths[]; extern const u16 gFontSmallNarrowerLatinGlyphs[]; extern const u8 gFontShortNarrowLatinGlyphWidths[]; extern const u16 gFontShortNarrowLatinGlyphs[]; +extern const u8 gFontShortNarrowerLatinGlyphWidths[]; +extern const u16 gFontShortNarrowerLatinGlyphs[]; #endif // GUARD_FONTS_H diff --git a/include/text.h b/include/text.h index 55500868dc..a148410c2f 100644 --- a/include/text.h +++ b/include/text.h @@ -21,6 +21,7 @@ enum { FONT_NARROWER, FONT_SMALL_NARROWER, FONT_SHORT_NARROW, + FONT_SHORT_NARROWER, }; // Return values for font functions diff --git a/src/debug.c b/src/debug.c index f1c403fc1e..590e415b7e 100644 --- a/src/debug.c +++ b/src/debug.c @@ -89,6 +89,7 @@ enum UtilDebugMenu DEBUG_UTIL_MENU_ITEM_SAVEBLOCK, DEBUG_UTIL_MENU_ITEM_ROM_SPACE, DEBUG_UTIL_MENU_ITEM_WEATHER, + DEBUG_UTIL_MENU_ITEM_FONT_TEST, DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK, DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK, DEBUG_UTIL_MENU_ITEM_WATCHCREDITS, @@ -365,6 +366,7 @@ static void DebugAction_Util_CheckSaveBlock(u8 taskId); static void DebugAction_Util_CheckROMSpace(u8 taskId); static void DebugAction_Util_Weather(u8 taskId); static void DebugAction_Util_Weather_SelectId(u8 taskId); +static void DebugAction_Util_FontTest(u8 taskId); static void DebugAction_Util_CheckWallClock(u8 taskId); static void DebugAction_Util_SetWallClock(u8 taskId); static void DebugAction_Util_WatchCredits(u8 taskId); @@ -453,6 +455,7 @@ static void DebugAction_BerryFunctions_Weeds(u8 taskId); extern const u8 Debug_FlagsNotSetOverworldConfigMessage[]; extern const u8 Debug_FlagsNotSetBattleConfigMessage[]; extern const u8 Debug_FlagsAndVarNotSetBattleConfigMessage[]; +extern const u8 Debug_EventScript_FontTest[]; extern const u8 Debug_EventScript_CheckEVs[]; extern const u8 Debug_EventScript_CheckIVs[]; extern const u8 Debug_EventScript_InflictStatus1[]; @@ -525,6 +528,7 @@ static const u8 sDebugText_Util_SaveBlockSpace[] = _("Save Block space static const u8 sDebugText_Util_ROMSpace[] = _("ROM space…{CLEAR_TO 110}{RIGHT_ARROW}"); static const u8 sDebugText_Util_Weather[] = _("Set weather…{CLEAR_TO 110}{RIGHT_ARROW}"); static const u8 sDebugText_Util_Weather_ID[] = _("Weather ID: {STR_VAR_3}\n{STR_VAR_1}\n{STR_VAR_2}"); +static const u8 sDebugText_Util_FontTest[] = _("Font Test…{CLEAR_TO 110}{RIGHT_ARROW}"); static const u8 sDebugText_Util_CheckWallClock[] = _("Check wall clock…{CLEAR_TO 110}{RIGHT_ARROW}"); static const u8 sDebugText_Util_SetWallClock[] = _("Set wall clock…{CLEAR_TO 110}{RIGHT_ARROW}"); static const u8 sDebugText_Util_WatchCredits[] = _("Watch credits…{CLEAR_TO 110}{RIGHT_ARROW}"); @@ -714,6 +718,7 @@ static const struct ListMenuItem sDebugMenu_Items_Utilities[] = [DEBUG_UTIL_MENU_ITEM_SAVEBLOCK] = {sDebugText_Util_SaveBlockSpace, DEBUG_UTIL_MENU_ITEM_SAVEBLOCK}, [DEBUG_UTIL_MENU_ITEM_ROM_SPACE] = {sDebugText_Util_ROMSpace, DEBUG_UTIL_MENU_ITEM_ROM_SPACE}, [DEBUG_UTIL_MENU_ITEM_WEATHER] = {sDebugText_Util_Weather, DEBUG_UTIL_MENU_ITEM_WEATHER}, + [DEBUG_UTIL_MENU_ITEM_FONT_TEST] = {sDebugText_Util_FontTest, DEBUG_UTIL_MENU_ITEM_FONT_TEST}, [DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK] = {sDebugText_Util_CheckWallClock, DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK}, [DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK] = {sDebugText_Util_SetWallClock, DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK}, [DEBUG_UTIL_MENU_ITEM_WATCHCREDITS] = {sDebugText_Util_WatchCredits, DEBUG_UTIL_MENU_ITEM_WATCHCREDITS}, @@ -884,6 +889,7 @@ static void (*const sDebugMenu_Actions_Utilities[])(u8) = [DEBUG_UTIL_MENU_ITEM_SAVEBLOCK] = DebugAction_Util_CheckSaveBlock, [DEBUG_UTIL_MENU_ITEM_ROM_SPACE] = DebugAction_Util_CheckROMSpace, [DEBUG_UTIL_MENU_ITEM_WEATHER] = DebugAction_Util_Weather, + [DEBUG_UTIL_MENU_ITEM_FONT_TEST] = DebugAction_Util_FontTest, [DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK] = DebugAction_Util_CheckWallClock, [DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK] = DebugAction_Util_SetWallClock, [DEBUG_UTIL_MENU_ITEM_WATCHCREDITS] = DebugAction_Util_WatchCredits, @@ -2294,6 +2300,11 @@ static void DebugAction_Util_Weather_SelectId(u8 taskId) } } +static void DebugAction_Util_FontTest(u8 taskId) +{ + Debug_DestroyMenu_Full_Script(taskId, Debug_EventScript_FontTest); +} + static void DebugAction_Util_CheckWallClock(u8 taskId) { Debug_DestroyMenu_Full_Script(taskId, PlayersHouse_2F_EventScript_CheckWallClock); diff --git a/src/fonts.c b/src/fonts.c index 2dcb0a7e78..2eb8ed062b 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -288,6 +288,42 @@ ALIGNED(4) const u8 gFontShortNarrowLatinGlyphWidths[] = { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, }; +ALIGNED(4) const u16 gFontShortNarrowerLatinGlyphs[] = INCBIN_U16("graphics/fonts/short_narrower.latfont"); +ALIGNED(4) const u8 gFontShortNarrowerLatinGlyphWidths[] = { + 1, 4, 4,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3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, +}; + ALIGNED(4) const u16 gFontSmallJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/small.hwjpnfont"); ALIGNED(4) const u16 gFontNormalJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/normal.hwjpnfont"); diff --git a/src/text.c b/src/text.c index acb2871a86..29ffc5ea3a 100644 --- a/src/text.c +++ b/src/text.c @@ -26,6 +26,7 @@ static u16 FontFunc_SmallNarrow(struct TextPrinter *); static u16 FontFunc_Narrower(struct TextPrinter *); static u16 FontFunc_SmallNarrower(struct TextPrinter *); static u16 FontFunc_ShortNarrow(struct TextPrinter *); +static u16 FontFunc_ShortNarrower(struct TextPrinter *); static void DecompressGlyph_Small(u16, bool32); static void DecompressGlyph_Normal(u16, bool32); static void DecompressGlyph_Short(u16, bool32); @@ -35,6 +36,7 @@ static void DecompressGlyph_Bold(u16); static void DecompressGlyph_Narrower(u16, bool32); static void DecompressGlyph_SmallNarrower(u16, bool32); static void DecompressGlyph_ShortNarrow(u16, bool32); +static void DecompressGlyph_ShortNarrower(u16, bool32); static u32 GetGlyphWidth_Small(u16, bool32); static u32 GetGlyphWidth_Normal(u16, bool32); static u32 GetGlyphWidth_Short(u16, bool32); @@ -43,6 +45,7 @@ static u32 GetGlyphWidth_SmallNarrow(u16, bool32); static u32 GetGlyphWidth_Narrower(u16, bool32); static u32 GetGlyphWidth_SmallNarrower(u16, bool32); static u32 GetGlyphWidth_ShortNarrow(u16, bool32); +static u32 GetGlyphWidth_ShortNarrower(u16, bool32); static EWRAM_DATA struct TextPrinter sTempTextPrinter = {0}; static EWRAM_DATA struct TextPrinter sTextPrinters[WINDOWS_MAX] = {0}; @@ -102,6 +105,7 @@ static const struct GlyphWidthFunc sGlyphWidthFuncs[] = { FONT_NARROWER, GetGlyphWidth_Narrower }, { FONT_SMALL_NARROWER, GetGlyphWidth_SmallNarrower }, { FONT_SHORT_NARROW, GetGlyphWidth_ShortNarrow }, + { FONT_SHORT_NARROWER, GetGlyphWidth_ShortNarrower }, }; struct @@ -260,6 +264,16 @@ static const struct FontInfo sFontInfos[] = .bgColor = 1, .shadowColor = 3, }, + [FONT_SHORT_NARROWER] = { + .fontFunction = FontFunc_ShortNarrower, + .maxLetterWidth = 5, + .maxLetterHeight = 14, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, }; static const u8 sMenuCursorDimensions[][2] = @@ -277,6 +291,7 @@ static const u8 sMenuCursorDimensions[][2] = [FONT_NARROWER] = { 8, 15 }, [FONT_SMALL_NARROWER] = { 8, 8 }, [FONT_SHORT_NARROW] = { 8, 14 }, + [FONT_SHORT_NARROWER] = { 8, 14 }, }; static const u16 sFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold.hwjpnfont"); @@ -850,6 +865,18 @@ static u16 FontFunc_ShortNarrow(struct TextPrinter *textPrinter) return RenderText(textPrinter); } +static u16 FontFunc_ShortNarrower(struct TextPrinter *textPrinter) +{ + struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); + + if (subStruct->hasFontIdBeenSet == FALSE) + { + subStruct->fontId = FONT_SHORT_NARROWER; + subStruct->hasFontIdBeenSet = TRUE; + } + return RenderText(textPrinter); +} + void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); @@ -1238,6 +1265,9 @@ static u16 RenderText(struct TextPrinter *textPrinter) case FONT_SHORT_NARROW: DecompressGlyph_ShortNarrow(currChar, textPrinter->japanese); break; + case FONT_SHORT_NARROWER: + DecompressGlyph_ShortNarrower(currChar, textPrinter->japanese); + break; case FONT_BRAILLE: break; } @@ -2161,6 +2191,50 @@ static u32 GetGlyphWidth_ShortNarrow(u16 glyphId, bool32 isJapanese) return gFontShortNarrowLatinGlyphWidths[glyphId]; } +static void DecompressGlyph_ShortNarrower(u16 glyphId, bool32 isJapanese) +{ + const u16 *glyphs; + + if (isJapanese == TRUE) + { + glyphs = gFontShortJapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7)); + DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); + DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8); + DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); // gCurGlyph + 0x20 + DecompressGlyphTile(glyphs + 0x88, gCurGlyph.gfxBufferBottom + 8); // gCurGlyph + 0x60 + gCurGlyph.width = gFontShortJapaneseGlyphWidths[glyphId]; + gCurGlyph.height = 14; + } + else + { + glyphs = gFontShortNarrowerLatinGlyphs + (0x20 * glyphId); + gCurGlyph.width = gFontShortNarrowerLatinGlyphWidths[glyphId]; + + if (gCurGlyph.width <= 8) + { + DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); + DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom); + } + else + { + DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); + DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8); + DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom); + DecompressGlyphTile(glyphs + 0x18, gCurGlyph.gfxBufferBottom + 8); + } + + gCurGlyph.height = 14; + } +} + +static u32 GetGlyphWidth_ShortNarrower(u16 glyphId, bool32 isJapanese) +{ + if (isJapanese == TRUE) + return gFontShortJapaneseGlyphWidths[glyphId]; + else + return gFontShortNarrowerLatinGlyphWidths[glyphId]; +} + static const s8 sNarrowerFontIds[] = { [FONT_SMALL] = FONT_SMALL_NARROW, @@ -2175,7 +2249,8 @@ static const s8 sNarrowerFontIds[] = [FONT_BOLD] = -1, [FONT_NARROWER] = -1, [FONT_SMALL_NARROWER] = -1, - [FONT_SHORT_NARROW] = -1, + [FONT_SHORT_NARROW] = FONT_SHORT_NARROWER, + [FONT_SHORT_NARROWER] = -1, }; // If the narrowest font ID doesn't fit the text, we still return that