mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 22:25:46 -04:00
tweak logic to output patches as soon as we encounter a non-patch line
This commit is contained in:
parent
6fbbcec0f9
commit
3868af2f1a
1 changed files with 5 additions and 3 deletions
|
@ -28,12 +28,14 @@ for line in texture1.split("\n"):
|
|||
oldtex = file("../../textures/combined.txt", "r").read()
|
||||
patches = []
|
||||
for line in oldtex.split("\n"):
|
||||
if len(line) == 0 or line[0] == ";" or line[0] == "#":
|
||||
print line
|
||||
elif line[0] == "*":
|
||||
# start of a patch line
|
||||
if len(line) > 0 and line[0] == "*":
|
||||
patches.append(line)
|
||||
else:
|
||||
if 1 == len(patches):
|
||||
print patches[0]
|
||||
patches = []
|
||||
# start of a texture definition
|
||||
if re.match(r'^[A-Z]', line):
|
||||
texline = line
|
||||
print line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue