]> icculus.org git repositories - theoddone33/hheretic.git/blob - pyhexen.py
Menu fonts working, drawpatch fix
[theoddone33/hheretic.git] / pyhexen.py
1 import sys
2 import pyhexen
3 import pygame
4 from pygame.locals import *
5
6 def input(events):
7         for event in events:
8                 if event.type == QUIT:
9                         sys.exit(0)
10
11 wad = pyhexen.wad.WadReader ()
12 wad.InitMultipleFiles (['heretic.wad'])
13
14 vid = pyhexen.vid.Video (wad)
15 vid.Init ()
16
17 menu = pyhexen.menu.Menu (wad, vid)
18
19 vid.SetPalette (wad.CacheLumpName('PLAYPAL'))
20 vid.DrawRawScreen (wad.CacheLumpName('TITLE'))
21 vid.DrawPatch (4, 160, wad.CacheLumpName('ADVISOR'))
22
23 vid.WaitVBL ()
24
25 while True:
26         input (pygame.event.get())
27