diff options
Diffstat (limited to 'hercules/code/fileutils.py')
-rw-r--r-- | hercules/code/fileutils.py | 9 |
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) |