Describe what the code does in comments and docs.

Comments say what the code does and why, docs/maxwell.md keeps the Maxwell facts, and fetch_refs.sh clones only the checkout the build reads. Code is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-07 03:20:42 -05:00
parent a1871280a3
commit 1b39aabd37
128 changed files with 481 additions and 577 deletions

View File

@@ -228,11 +228,11 @@ def restbl_sizes(table):
return dict(struct.unpack_from('<II', table, 22 + 8 * i) for i in range(count))
MAGIC = 0x18029a7f # MacNativeGames make_button_icons.py: a .bfotf's first word is its key XOR this
MAGIC = 0x18029a7f # a .bfotf's first word is its key XOR this
def bfotf(otf, key):
"""A .bfotf as MacNativeGames make_button_icons.py bfotf_encode writes it: 32-bit words XORed with the key."""
"""A .bfotf as tools/button_icons.py bfotf_encode writes it: 32-bit words XORed with the key."""
size = len(otf)
out = struct.pack('<II', MAGIC ^ key, struct.unpack('<I', size.to_bytes(4, 'big'))[0] ^ key)
out += b''.join(struct.pack('<I', struct.unpack_from('<I', otf, i)[0] ^ key) for i in range(0, size - size % 4, 4))