aboutsummaryrefslogtreecommitdiff
path: root/Source/Font.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-06-28 16:19:36 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-06-28 16:19:36 +0200
commitbd23878d45f3e0ec2336b903bacc110688aac9bd (patch)
treee7a09377ac2bc955b58b868d80ddd1efaae5f8b2 /Source/Font.c
parentf9f9924566e82aae02817a2fbc7962764f5418c3 (diff)
downloadairport-bd23878d45f3e0ec2336b903bacc110688aac9bd.tar.gz
* Added font spacing parameter.
* Removed obsolete, unused functions. * Performance optimization: routines inside GameCalculations() were computating a big loop several times, so this has been modified so that loop is only performed once. * Initial implementation for GameGetAircraftTilemap(). Still some work TODO.
Diffstat (limited to 'Source/Font.c')
-rw-r--r--Source/Font.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Font.c b/Source/Font.c
index 6a90061..d9075f2 100644
--- a/Source/Font.c
+++ b/Source/Font.c
@@ -83,6 +83,11 @@ void FontSetSize(TYPE_FONT * ptrFont, short size)
ptrFont->spr.h = ptrFont->char_h;
}
+void FontSetSpacing(TYPE_FONT* ptrFont, short spacing)
+{
+ ptrFont->char_spacing = spacing;
+}
+
void FontCyclic(void)
{
_blend_effect_lum -= 8;
@@ -180,7 +185,7 @@ void FontPrintText(TYPE_FONT * ptrFont, short x, short y, char* str, ...)
//dprintf("Sprite rgb={%d,%d,%d}\n",ptrFont->spr.r, ptrFont->spr.g, ptrFont->spr.b);
GfxSortSprite(&ptrFont->spr);
- x += ptrFont->char_w;
+ x += ptrFont->char_spacing;
break;
}
}