Initial commit

This commit is contained in:
2026-10-09 02:48:24 +02:00
commit e05d973a8d
133 changed files with 101507 additions and 0 deletions

25
ackit/known_setups.py Normal file
View File

@@ -0,0 +1,25 @@
"""Database of Vorbis setups used by the game's own WEMs (from all shipped WADs).
Each entry: stripped Wwise setup (hex), its codebook hash, decode alloc sizes, and
formats seen. Reusing a known setup guarantees hash/alloc values the game accepts.
"""
import json
import os
PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "known_setups.json")
_DB = None
def db():
global _DB
if _DB is None:
_DB = json.load(open(PATH))
return _DB
def lookup_setup(ww_setup: bytes):
h = ww_setup.hex()
for e in db():
if e["setup"] == h:
return e
return None