Metadata-Version: 2.4
Name: zxp2boriel
Version: 0.1.3
Summary: Convert ZX-Paintbrush (.zxp) files to Boriel Basic
Home-page: https://github.com/rtorralba/zxp2boriel
Author: Raül Torralba
Author-email: raul.torralba@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# zxp2boriel

A Python tool to convert ZX-Paintbrush (.zxp) sprite files into Boriel Basic `DIM` array declarations.

## Installation

```bash
pip install zxp2boriel
```

## Usage

```bash
zxp2boriel --input <file.zxp> --width <pixels> --rows <rows> --cols <cols> --output <file.bas> --name <array_name>
```

### Arguments

- `--input`, `-i`: Input .zxp file path.
- `--width`, `-w`: Tile width in pixels (must be a multiple of 8).
- `--rows`, `-r`: Number of rows in the sprite sheet.
- `--cols`, `-c`: Number of columns in the sprite sheet.
- `--output`, `-o`: Output .bas file path.
- `--name`, `-n`: Name of the generated array variable.

### Example

Convert a 16x16 sprite sheet with 3 rows and 16 columns:

```bash
zxp2boriel -i sprites.zxp -w 16 -r 3 -c 16 -o sprites.bas -n sprites
```

This will generate a `sprites.bas` file containing:

```basic
Dim tiles(47, 31) As Ubyte => { ... }
```

## License

AGPL-v3
