mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 16:25:47 -04:00
start rebuilding tmp_* in MVC format, first, model
This commit is contained in:
parent
5efaa7e2be
commit
a2ac1d5777
2 changed files with 64 additions and 1 deletions
26
tools/cleanroom/doom.py
Normal file
26
tools/cleanroom/doom.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
"""A module for manipulating Doom data structures."""
|
||||
|
||||
class Patch:
|
||||
def __init__(self, n,x,y):
|
||||
self.name = n
|
||||
self.yoff = x
|
||||
self.xoff =y
|
||||
|
||||
def __str__(self):
|
||||
return "*\t%8s\t\t%d\t%d" % (self.name,self.xoff,self.yoff)
|
||||
|
||||
class Texture:
|
||||
def __init__(self,name,width,height):
|
||||
self.name = name
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.patches = []
|
||||
self.pixbuf = None
|
||||
|
||||
def __str__(self):
|
||||
me = "%8s\t\t%d\t%d\n" % (self.name,int(self.width),int(self.height))
|
||||
kids = "\n".join(map(str, self.patches))
|
||||
if kids:
|
||||
kids += "\n"
|
||||
return (me + kids)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue