File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 1616
1717extern uint8_t pal [2 ];
1818extern ConfigInfo config ;
19-
2019extern short FONT_SIZE_X ;
2120extern short FONT_SIZE_Y ;
2221
22+ static short offset ;
23+
24+ // referenced by fast_text routines.
25+ unsigned short cx ;
26+ unsigned char cy ;
27+ unsigned char CharCode ;
28+ unsigned char Flags ;
29+ unsigned char * GlyphData ;
30+
31+ extern unsigned char font [];
32+ extern unsigned char fontm23 [];
33+ extern uint16_t mul0625 (uint16_t val );
34+ extern uint16_t mul0375 (uint16_t val );
35+
36+ extern void RenderGlyph (void );
37+
2338/**
2439 * screen_init_hook()
2540 * Called after tgi_init to set any special features, e.g. nmi trampolines.
@@ -125,4 +140,44 @@ void screen_beep(void)
125140 */
126141void screen_char_draw (padPt * Coord , unsigned char * ch , unsigned char count )
127142{
143+ unsigned char i ;
144+ Flags = 0 ;
145+
146+ switch (CurMem )
147+ {
148+ case M0 :
149+ GlyphData = font ;
150+ offset = -32 ;
151+ break ;
152+ case M1 :
153+ GlyphData = font ;
154+ offset = 64 ;
155+ break ;
156+ case M2 :
157+ GlyphData = fontm23 ;
158+ offset = -32 ;
159+ break ;
160+ case M3 :
161+ GlyphData = fontm23 ;
162+ offset = 32 ;
163+ break ;
164+ }
165+
166+ if (CurMode == ModeInverse )
167+ Flags |=0x80 ;
168+
169+ if (ModeBold )
170+ Flags |=0x40 ;
171+
172+ cx = mul0625 ((Coord -> x & 0x1FF ));
173+ cy = mul0375 ((Coord -> y + 14 ^0x1FF )& 0x1FF );
174+
175+
176+ for (i = 0 ;i < count ;++ i )
177+ {
178+ CharCode = ch [i ]+ offset ;
179+ RenderGlyph ();
180+ cx += 5 ;
181+ }
182+
128183}
Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ void terminal_set_plato(void)
8888{
8989 TTY = false;
9090 screen_clear ();
91+ CharWide = 8 ;
92+ CharHigh = 16 ;
9193}
9294
9395/**
You can’t perform that action at this time.
0 commit comments