From b7d8bbaa94996391dc41b54696e0919719ad70e4 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 15 May 2005 20:41:23 +0000 Subject: Changes to use new font editor --- bitmapfont.mod/bitmapfont.bmx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bitmapfont.mod/bitmapfont.bmx') diff --git a/bitmapfont.mod/bitmapfont.bmx b/bitmapfont.mod/bitmapfont.bmx index 86c29f8..56a36ad 100644 --- a/bitmapfont.mod/bitmapfont.bmx +++ b/bitmapfont.mod/bitmapfont.bmx @@ -14,7 +14,7 @@ Strict Type BitmapFont - Const NOCHR=96 + Const NOCHR=95 Field img:TImage[NOCHR] Field height:Int[NOCHR] @@ -24,6 +24,7 @@ Type BitmapFont Function Load:BitmapFont(path:String) Local fnt:BitmapFont Local str:TStream + Local magic:String Local f,x,y Local r,g,b @@ -33,6 +34,13 @@ Type BitmapFont fnt=New BitmapFont + magic=ReadString(str,4) + + If (magic<>"BMF1") + CloseStream(str) + Return Null + EndIf + fnt.is_fixed=Readint(str) GetMaskColor(r,g,b) -- cgit v1.2.3