summaryrefslogtreecommitdiff
path: root/hercules/code/fileutils.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-16 20:55:28 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-16 20:55:28 +0300
commitd27db8cca78e06582d8372a9d05f6483202c26ba (patch)
treeb0cd0384dc86d822ecf5a233ddbe2d046ea19585 /hercules/code/fileutils.py
parentd71aa7d6d7203e5408730cfd86d5f402e0e17a4a (diff)
downloadevol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.tar.gz
evol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.tar.bz2
evol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.tar.xz
evol-tools-d27db8cca78e06582d8372a9d05f6483202c26ba.zip
Add parsing for some RO formats.
Parsing act files and start of parsing spr files (for monsters)
Diffstat (limited to 'hercules/code/fileutils.py')
-rw-r--r--hercules/code/fileutils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/hercules/code/fileutils.py b/hercules/code/fileutils.py
index 884768f..44ec591 100644
--- a/hercules/code/fileutils.py
+++ b/hercules/code/fileutils.py
@@ -20,6 +20,12 @@ def readInt16(f):
arr.fromstring(data)
return arr[0]
+def readInt8(f):
+ data = f.read(1)
+ arr = array.array("B")
+ arr.fromstring(data)
+ return arr[0]
+
def readMapName(f):
data = f.read(12)
data = str(data)
@@ -27,6 +33,9 @@ def readMapName(f):
data = data[:-1]
return data
+def skipData(f, sz):
+ f.read(sz)
+
def readData(f, sz):
return f.read(sz)