Module wf.api.v1.process.tools.superfamiconv

wf-superfamiconv tool wrapper.

Functions

config (options) Create a configuration table.
palette (input, config) Convert image data to raw palette data.
tiles (input, palette, config) Convert image data to raw tile data.
map (input, palette, tiles, config) Convert image data to raw map data.
convert_tileset (input, config) Convert image data to palette and tile data.
convert_tilemap (input, config) Convert image data to palette, tile and map data.

Class superfamiconv.Config

config:mode (mode) Select target mode/platform.
config:bpp (bpp) Select output bits per pixel.
config:tile_size (width, height) Select output tile size.
config:no_remap () Disable color remapping.
config:no_discard () Disable discarding redundant tiles.
config:no_flip () Disable horizontal/vertical tile flipping.
config:tile_direct () Disable all tilemap optimizations; assume the image is a direct representation of the desired tiles.
config:sprite_mode () Apply sprite output settings.
config:max_tiles (count) Set a maximum number of tiles.
config:subpalettes (palettes, colors) Split a palette into subpalettes.
config:color_zero (value) Configure color #0.
config:tile_base (offset) Set base tile offset.
config:palette_base (offset) Set base palette offset.
config:map_size (width, height) Set output map size.
config:split_map (width, height, column_order) Split output map into columns and rows of specified size.
config:verbose () Enable verbose terminal output.


Functions

config (options)
Create a configuration table.

Parameters:

  • options optional table Initial options.

Returns:

    table Configuration table.
palette (input, config)
Convert image data to raw palette data.

Parameters:

  • input string Input image data.
  • config optional table Configuration table.

Returns:

    string Converted raw palette data.

See also:

tiles (input, palette, config)
Convert image data to raw tile data.

Parameters:

  • input string Input image data.
  • palette string Input palette data.
  • config optional table Configuration table.

Returns:

    string Converted raw tile data.

See also:

map (input, palette, tiles, config)
Convert image data to raw map data.

Parameters:

  • input string Input image data.
  • palette string Input palette data.
  • tiles string Input tile data.
  • config optional table Configuration table.

Returns:

    string Converted raw map data.

See also:

convert_tileset (input, config)
Convert image data to palette and tile data.

Parameters:

  • input string Input image data.
  • config optional table Configuration table.

Returns:

    table Converted raw palette, tiles, and map data.

See also:

convert_tilemap (input, config)
Convert image data to palette, tile and map data.

Parameters:

  • input string Input image data.
  • config optional table Configuration table.

Returns:

    table Converted raw palette, tiles, and map data.

See also:

Class superfamiconv.Config

SuperFamiconv tool configuration.
config:mode (mode)
Select target mode/platform.

Parameters:

  • mode string Mode/platform:
    • snes
    • snes_mode7
    • gb
    • gbc
    • gba
    • gba_affine
    • md
    • pce
    • pce_sprite
    • ws
    • wsc
    • wsc_packed

Returns:

    table Configuration table.
config:bpp (bpp)
Select output bits per pixel.

Parameters:

  • bpp number Bits per pixel.

Returns:

    table Configuration table.
config:tile_size (width, height)
Select output tile size.

Parameters:

  • width number Tile width.
  • height number Tile height.

Returns:

    table Configuration table.
config:no_remap ()
Disable color remapping.

Returns:

    table Configuration table.
config:no_discard ()
Disable discarding redundant tiles.

Returns:

    table Configuration table.
config:no_flip ()
Disable horizontal/vertical tile flipping.

Returns:

    table Configuration table.
config:tile_direct ()
Disable all tilemap optimizations; assume the image is a direct representation of the desired tiles.

Returns:

    table Configuration table.
config:sprite_mode ()
Apply sprite output settings.

Returns:

    table Configuration table.
config:max_tiles (count)
Set a maximum number of tiles.

Parameters:

  • count number Tile count.

Returns:

    table Configuration table.
config:subpalettes (palettes, colors)
Split a palette into subpalettes.

Parameters:

  • palettes number Number of palettes.
  • colors number Colors per subpalette.

Returns:

    table Configuration table.
config:color_zero (value)
Configure color #0.

Parameters:

Returns:

    table Configuration table.
config:tile_base (offset)
Set base tile offset.

Parameters:

  • offset number Offset.

Returns:

    table Configuration table.
config:palette_base (offset)
Set base palette offset.

Parameters:

  • offset number Offset.

Returns:

    table Configuration table.
config:map_size (width, height)
Set output map size.

Parameters:

  • width number Width.
  • height number Height.

Returns:

    table Configuration table.
config:split_map (width, height, column_order)
Split output map into columns and rows of specified size.

Parameters:

  • width number Width.
  • height number Height.
  • column_order optional boolean If true, use column-major order to output map data.

Returns:

    table Configuration table.
config:verbose ()
Enable verbose terminal output.

Returns:

    table Configuration table.
generated by LDoc 1.5.0 Last updated 2024-08-03 18:41:58