summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-05-15 20:41:23 +0000
committerIan C <ianc@noddybox.co.uk>2005-05-15 20:41:23 +0000
commitb7d8bbaa94996391dc41b54696e0919719ad70e4 (patch)
tree0560e9f5e88fc19419a175c587bdaec807f107f3
parent2e2bc7939e2986814667e40ffe814e394c46beaf (diff)
Changes to use new font editor
-rw-r--r--bitmapfont.mod/bitmapfont.bmx10
1 files changed, 9 insertions, 1 deletions
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)