Skip to content

Commit

Permalink
Fix test regressions due to floating point
Browse files Browse the repository at this point in the history
Not sure if the game supports floating point numbers, but 150% and 200%
scaling end up with whole integers, so maintain that!

Regressed from 53c7292
  • Loading branch information
lah7 committed Jul 16, 2024
1 parent 8a252fa commit d240e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _update_attribute_coord(data, name):
new_values = []
values = part.split("(")[1].split(")")[0]
for number in values.split(","):
new_values.append(str(int(number) * UI_MULTIPLIER))
new_values.append(str(int(int(number) * UI_MULTIPLIER)))
part = f"{name}={part.replace(values, ','.join(new_values))}"
output.append(part)
return "".join(output)
Expand Down Expand Up @@ -204,7 +204,7 @@ def upscale_fontstyle_ini(file: GameFile, write_meta_file=True):
continue

old_size = int(parts[3])
new_size = old_size * UI_MULTIPLIER
new_size = int(old_size * UI_MULTIPLIER)
parts[3] = str(new_size)
output.append('"'.join(parts))

Expand Down

0 comments on commit d240e94

Please sign in to comment.