From d27db8cca78e06582d8372a9d05f6483202c26ba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 16 Sep 2015 20:55:28 +0300 Subject: Add parsing for some RO formats. Parsing act files and start of parsing spr files (for monsters) --- hercules/code/fileutils.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hercules/code/fileutils.py') 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) -- cgit v1.2.3-70-g09d2