From b42e1ca1d61e736d30ea85bc3f4e70ca6d718cbb Mon Sep 17 00:00:00 2001 From: G2 <72430668+G2-Games@users.noreply.github.com> Date: Sun, 5 May 2024 04:58:37 -0500 Subject: [PATCH] Update README.md --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f6b47d2..5c9cebc 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,11 @@ A small collection of utilities for exporting and importing assets from Little B ## Specifications and Info Bytes are in Little Endian -Each CZ file starts with a header. +Each `CZ#` file starts with a header. The first 14 (`0x0E`) bytes of the header are common to all +`CZ#` files. The data which come after that are specific to each format, although several +`CZ#` formats do share the same layout. -### The CZ0 and CZ3 header: +### Common header: | Offset | Ex. Values | ASCII | Purpose | |-------------|-------------|-------|-----------------------------------| | 0x00 - 0x03 | 43 5A 30 00 | CZ0 | Magic bytes | @@ -15,6 +17,10 @@ Each CZ file starts with a header. | 0x0A - 0x0B | DC 02 | 732 | Height of the image in pixels | | 0x0C - 0x0D | 20 00 | 32 | Bit depth of the image | | 0x0E | 03 | 3 | Color block | + +### The CZ0 and CZ3 header extra data: +| Offset | Ex. Values | ASCII | Purpose | +|-------------|-------------|-------|-----------------------------------| | 0x0F - 0x13 | --- | --- | ---[Unknown]--- | | 0x14 - 0x15 | 58 01 | 344 | Width of image crop | | 0x16 - 0x17 | DC 02 | 732 | Height of image crop | @@ -24,12 +30,8 @@ Each CZ file starts with a header. | 0x1E - 0x1F | 02 03 | 770 | Y offset of image, optional | | 0x20 - 0x23 | --- | --- | ---[Unknown]---, optional | -### The CZ1 and CZ2 header: + +### The CZ2 header extra data: | Offset | Ex. Values | ASCII | Purpose | |-------------|-------------|-------|-----------------------------------| -| 0x00 - 0x03 | 43 5A 30 00 | CZ0 | Magic bytes | -| 0x04 - 0x07 | 24 00 00 00 | 36 | Header length in bytes | -| 0x08 - 0x09 | 58 01 | 344 | Width of the image in pixels | -| 0x0A - 0x0B | DC 02 | 732 | Height of the image in pixels | -| 0x0C - 0x0D | 20 00 | 32 | Bit depth of the image | -| 0x0E | 03 | 3 | Color block | +| 0x0F - 0x12 | --- | --- | ---[Unknown]--- |