Skip to content

Commit

Permalink
feat: 0.1.3 update palette.py to use the new s4c header (#7)
Browse files Browse the repository at this point in the history
- Update `palette` subcommand to use the new `s4c` header
- Compatible with `sprites4curses` `>=0.4.8`
  • Loading branch information
jgabaut authored Aug 29, 2024
1 parent df4a220 commit 84b51da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "s4c-scripts"
version = "0.1.2"
version = "0.1.3"
authors = [
{ name="jgabaut", email="jgabaut@github.com" },
]
Expand Down
6 changes: 3 additions & 3 deletions s4c/core/palette.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#
# @section author_palette Author(s)
# - Created by jgabaut on 01/09/2023.
# - Modified by jgabaut on 19/01/2024.
# - Modified by jgabaut on 29/08/2024.

# Imports
import sys
Expand All @@ -37,7 +37,7 @@

## The file format version.
FILE_VERSION = "0.2.2"
SCRIPT_VERSION = "0.1.0"
SCRIPT_VERSION = "0.1.1"
F_STRING_ARGS = "<mode> <palette> <s4c path>"

# Expects the palette name as first argument, output directory as second argument.
Expand Down Expand Up @@ -109,7 +109,7 @@ def convert_palette(mode, palette_path, s4c_path):
if mode == "header":
print(f"#ifndef {target_name.upper()}_S4C_H_")
print(f"#define {target_name.upper()}_S4C_H_")
print(f"#include \"{s4c_path}/sprites4curses/s4c-animate/animate.h\"\n")
print(f"#include \"{s4c_path}/sprites4curses/src/s4c.h\"\n")
print(f"#define {target_name.upper()}_S4C_H_VERSION \"{FILE_VERSION}\"")
print(f"#define {target_name.upper()}_S4C_H_TOTCOLORS {read_colors}")
print("\n/**")
Expand Down
4 changes: 2 additions & 2 deletions s4c/s4c_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
from .core.sheet_converter import main as sheet_converter_main
from .core.png_resize import main as png_resize_main

S4C_CLI_VERSION = "0.1.2"
S4C_CLI_VERSION = "0.1.3"

EXPECTED_S4C_ANIMATE_V = "0.4.2"
EXPECTED_S4C_ANIMATE_V = "0.4.8"

subcoms = ["cut_sheet", "palette", "sprites", "sheet_converter", "png_resize", "help", "version"]
f_prog_str = f"{os.path.basename(__file__)}"
Expand Down

0 comments on commit 84b51da

Please sign in to comment.