Metadata-Version: 2.1
Name: nutcracker
Version: 0.3.1415
Summary: Tools for editing resources in SCUMM games.
License: GPL-3.0-or-later
Keywords: scumm,sputm,smush,lucasarts,humongous
Author: BLooperZ
Author-email: blooperz@users.noreply.github.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Utilities
Requires-Dist: Pillow (>=8.0.1,<9.0.0)
Requires-Dist: PyYAML (>=5.4.1,<6.0.0)
Requires-Dist: deal (>=4.5.0,<5.0.0)
Requires-Dist: numpy (>=1.19.1,<2.0.0)
Requires-Dist: parse (>=1.18.0,<2.0.0)
Requires-Dist: typer (>=0.3.2,<0.4.0)
Project-URL: repository, https://github.com/blooperz/nutcracker
Description-Content-Type: text/markdown

# NUTCracker
Tools for editing resources in SCUMM games.

## NUT File Usage
### Decoding
Decode all NUT files in given directory DATADIR
```
python -m nutcracker.decode_san DATADIR/*.NUT --nut --target OUTDIR
```
Creates a font image file named chars.png in OUTDIR which can be edited using regular image editing software (e.g. GIMP)

### Encoding
Encode given font image (PNG_FILE) with given codec number (CODEC) using REF_NUT_FILE as reference
```
python -m nutcracker.encode_nut PNG_FILE --target NEW_NUT_FILE --ref REF_NUT_FILE --codec CODEC [--fake CODEC]
```
This will convert font image file back to font file (NEW_NUT_FILE) which can be used in game.

Available codecs: 
* 21 (FT + The Dig*)
* 44 (COMI*)

*FONT3.NUT and the fonts in The Dig was actually encoded using codec 21 method but marked as 44.
It can be achieved using `--codec 21 --fake 44`.
see examples in [test.bat](test.bat)

