6 def __init__ (self, wad, vid):
9 self.SkullBaseLump = self.wad.GetNumForName("M_SKL00")
10 self.FontABaseLump = self.wad.GetNumForName("FONTA_S")+1
11 self.FontBBaseLump = self.wad.GetNumForName("FONTB_S")+1
13 def ProcessText (self, text, x, y, baselump, draw=True):
14 print 'Processing %s' % text
16 print 'ord %d' % ord (c)
21 patch = self.wad.CacheLumpNum (baselump + ord (c) - 33)
22 (w, h) = struct.unpack_from ('<hh', patch, 0)
24 print "Drawing at %d,%d" % (x,y)
25 self.vid.DrawPatch (x, y, patch)
29 def DrawTextA (self, text, x, y):
30 self.ProcessText (text, x, y, self.FontABaseLump)
32 def TextAWidth (self, text):
33 return self.ProcessText (text, 0, 0, self.FontABaseLump, False)
35 def DrawTextB (self, text, x, y):
36 self.ProcessText (text, x, y, self.FontBBaseLump)
38 def TextBWidth (self, text):
39 return self.ProcessText (text, 0, 0, self.FontBBaseLump, False)