mirror of
https://github.com/elliotnunn/tbxi.git
synced 2024-11-14 16:12:10 +00:00
Fix NewWorld 1.x image generation
This commit is contained in:
parent
7fbbea569d
commit
f9ef4e1a35
@ -22,6 +22,8 @@ def build(src):
|
||||
except (NotADirectoryError, FileNotFoundError):
|
||||
raise dispatcher.WrongFormat
|
||||
|
||||
has_checksum = (b'adler32' in booter)
|
||||
|
||||
constants = dict()
|
||||
constant_spans = dict()
|
||||
for m in re.finditer(rb'h#\s+([A-Fa-f0-9]+)\s+constant\s+([-\w]+)', booter):
|
||||
@ -72,6 +74,6 @@ def build(src):
|
||||
assert start + len(insert) == stop
|
||||
booter[start:stop] = insert
|
||||
|
||||
append_checksum(booter)
|
||||
if has_checksum: append_checksum(booter)
|
||||
|
||||
return bytes(booter)
|
||||
|
@ -2,6 +2,8 @@ import os
|
||||
from os import path
|
||||
import re
|
||||
|
||||
from .slow_lzss import decompress
|
||||
|
||||
from . import dispatcher
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user