Package: 32blit
32blit ToolsThis toolset is intended for use with the 32Blit console to prepare assets and upload games.RunningThe 32Blit toolset contains subcommands for each tool, you can list them with:32blit --helpimage - Convert images/sprites for 32Blitfont - Convert fonts for 32Blitmap - Convert popular tilemap formats for 32Blitraw - Convert raw/binary or csv data for 32Blitpack - Pack a collection of assets for 32Blitcmake - Generate CMake configuration for the asset packerflash - Flash a binary or save games/files to 32Blitmetadata - Tag a 32Blit .blit file with metadatarelocs - Prepend relocations to a game binaryversion - Print the current 32blit versionTo run a tool, append its name after the32blitcommand, eg:32blit versionToolsMetadataBuild metadata, and add it to a.blitfile.FlashFlash and manage games on your 32Blit over USB serial.RelocsCollate a list of addresses that need patched to make a.blitfile relocatable and position-independent.CmakeGenerate CMake files for metadata information and/or asset pipeline inputs/outputs.AssetsYou will typically create assets using the "asset pipeline", configured using anassets.ymlfile which lists all the files you want to include, and how they should be named in code.Anassets.ymlfile might look like:# Define an output target for the asset builder
# in this case we want a CSource (and implicitly also a header file)
# type auto-detection will notice the ".cpp" and act accordingly
assets.cpp:
  prefix: asset_
  # Include assets/sprites.png
  # and place it in a variable named "asset_sprites"
  # Since it ends in ".png" the builder will run "sprites_packed" to convert our source file
  assets/sprites.png:
    name: sprites
    palette: assets/sprites.act
    strict: true  # Fail if a colour does not exist in the palette
    transparent: 255,0,255

  # Include assets/level.tmx
  # and place it in a variable named "asset_level_N_tmx"
  # Since it ends in ".tmx" the builder will run "map_tiled" to convert our source file
  assets/level*.tmx:FontsConverts a ttf file or image file into a 32Blit font.Supported formats:Image .png, .gifFont .ttfImagesAll image assets are handled by Pillow so most image formats will work, be careful with lossy formats since they may add unwanted colours to your palette and leave you with oversized assets.Supported formats:8bit PNG .png24bit PNG .pngOptions:palette- Image or palette file (Adobe .act, Pro Motion NG .pal, GIMP .gpl) containing the asset colour palettetransparent- Transparent colour (if palette isn't an RGBA image), should be either hex (FFFFFF) or R,G,B (255,255,255)packed- (Defaults to true) will pack the output asset into bits depending on the palette size. A 16-colour palette would use 4-bits-per-pixel.strict- Only allow colours that are present in the palette image/fileMaps/LevelsSupported formats:Tiled .tmx -https://www.mapeditor.org/(extremely alpha!)Raw Binaries/Text FormatsSupported formats:CSV .csvBinary .bin, .rawChangelog0.7.3Validate metadata image sizes - thanks @Daft-FreakSupport for standalone metadata output - thanks @Daft-FreakSupport for generating a source file with Pico (RP2040) binary info - thanks @Daft-FreakOutput slightly more optimised C output - thanks @Daft-Freak0.7.2Add reloc support for ITCM RAM - thanks @Daft-Freak0.7.1Added DFU toolFilename now shown when flashingRemove unecessary reset-to-firmware codeFixed GIMP palette handlingSupport for more image font layouts (multiple row support)Make freetype a soft dependency when processing font dataMisc small tweaks & tidyup0.7.0Reworked Tiled maps support (requires updated SDK) - thanks @Daft-FreakMetadata CMake tool now escapes quotes - thanks @Daft-FreakNew project setup tool "32blit setup" for downloading/configuring a boilerplate project - thanks @Daft-FreakFixed asset builder throwing a cryptic error if no valid input files were found0.6.1Ensure the minimum required version of click is installed - thanks @LordEidiAdd separate launch command (in SDK v0.1.11 and later) and--launchflag to install - thanks @Daft-FreakSupport 16bit tile indexes - thanks @ThePythonatorOutput URL/Category metadata for SDL builds - thanks @Daft-Freak0.6.0Significant code refactor and fixes by @Ali1234Tools have been ported to ClickNew32blit installcommand that installs files/blits intelligently0.5.0Significant code refactor and fixes by @Ali1234Metadata dump fixed to support RL imagesBugfix to incorrect transparent colour being selectedConfigurable empty_tile for .tmx maps - specifies a tile ID for unset/empty tiles to be remapped toOptional struct output type for .tmx maps with width, height layer count and empty_tile.tmx map layers are now sortedShould not break compatibility, but use 0.4.x if you don't need the new features0.4.0Breaks metadata compatibility with previous versions!Add URL field for GitHub URLAdd Category field to categorise games/appsAdd file associations field to identify supported filetypes0.3.2Allow use of user-specified serial port if VID/PID are emptySupport handling multiple sets of options in CMake tool0.3.1Fixed "32blit game.blit" tosave(to SD) instead offlashagain0.3.0New: RLE Encoding support for spritesheetsFlasher: refined shorthands- "32blit flash game.blit" and "32blit game.blit" will flash a game.Flasher: fixed a bug where it would reset an open connection and break during a flash0.2.0New: Version tool: 32blit versionPacker: Format support for wildcard asset names0.1.4New: migrated PIC relocs tool into tools0.1.3Packer: Fix asset path handing to be relative to working directory0.1.2Flasher: Add list/del commandsPacker: Fix bug where asset packer shared class instances and stateMetadata: Find images when building from a config not in working directoryMetadata: Require only one of --file or --config options0.1.1Export metadata config to CMakeAdd support for packing metadata splash to icns format for macOS0.1.0Fix palettes to support 256 colours (count will be 0)Parse metadata and relocations with ConstructBreaking: Packed image format has changed!0.0.9Add support for PIC reloc'd binaries with RELO headerAdd string arg support for asset filename to cmake tool0.0.8Add autoreset from game to firmware when runningflash saveAddflash infoto determine if in game or firmwareAdd metadata dependency output from cmake toolFix asset dependency output to include additional files like paletteRedirect errors to stderrQuiet! Use -vvvv for info, warnings, errors and debug information.0.0.7Add metadata tool - tags binary with metadata from a .yml fileFix relative paths for packer palette filesAdd support for subdirectories to32blit flash save0.0.6Font tool (thanks @Daft-Freak)Flash command with multi-target function (thanks @Daft-Freak)Bugfixes to palette handling (thanks @Daft-Freak)Bugfixes to package recognition (seemed to affect Python 3.8 on Windows)Friendly (ish) error message when a .tmx tilemap with 0-index tiles is used (tmx is 1-indexed for valid tiles)0.0.5Output data length symbols (thanks @Daft-Freak)Fix --packed to be default, again (packed can be disabled with --packed no)Various other tweaksStart of 32blit file upload support0.0.4Default images to packed (packed arg now takes a bool)Fix bug in sprite payload size (thanks @Daft-Freak)0.0.3Fix packaging mishap so tool actually works0.0.2Real initial releasePack, cmake and asset commands workingVery beta!0.0.1Initial Release