Skip to content

Commit

Permalink
Support font code switching in dialog2bin
Browse files Browse the repository at this point in the history
  • Loading branch information
VariantXYZ committed Aug 19, 2023
1 parent 2799cae commit 8be9e8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/dialog2bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@
bintext.append(int(''.join(special_data), 16))
elif special_type == 'C' or special_type == 'D': # The remaining types are just single byte control codes
bintext.append(int( special_type + ''.join(special_data), 16))
elif special_type == 'f': # Font type
s = ''.join(special_data)
bintext.append(0xD5)
bintext.append(int(s, 16)) # f[00, FF], 0 is normal
else:
raise Exception(f"Unknown special_type {special_type} in {txt}")
except Exception as e:
Expand Down

0 comments on commit 8be9e8e

Please sign in to comment.