Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug report
description: Report a wrong output, a crash, or a build failure.
labels: [bug]
body:
- type: dropdown
id: game
attributes:
label: Which game ROM were you using?
description: Pick the title that produced the issue.
options:
- Pokemon Black
- Pokemon White
- Pokemon Black 2
- Pokemon White 2
- Other / not applicable
validations:
required: true
- type: input
id: dex
attributes:
label: Pokémon dex number
description: National dex number of the species you were extracting (for example 25 for Pikachu). Leave blank if not applicable.
- type: input
id: cmd
attributes:
label: Command you ran
description: Paste the exact command line, with the path to the ROM redacted if you want.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behaviour
description: What did you expect the tool to produce?
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behaviour
description: What did the tool actually produce? Paste the terminal output, an image link, or both.
validations:
required: true
- type: textarea
id: env
attributes:
label: Environment
description: OS, CPU, raylib and libpng versions (`pkg-config --modversion raylib libpng`), and `AnimaEngine --version` if it printed one.
validations:
required: false
- type: checkboxes
id: ip
attributes:
label: Repository rules
description: Please confirm before submitting.
options:
- label: I understand this issue tracker is not for ROM or asset requests.
required: true
- label: I am not attaching a ROM, save file, or extracted Pokémon asset.
required: true
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature request
description: Suggest a new extraction target, output format, or quality-of-life improvement.
labels: [enhancement]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What are you trying to do that the current toolchain does not let you do?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: Sketch the change. A CLI flag, a new output folder, a new parser, or a GUI control are all fine.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Anything you considered and rejected, and why.
validations:
required: false
- type: input
id: scope
attributes:
label: Affected files
description: If you already know which source files would change, list them here.
validations:
required: false
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
linux-build:
name: Linux build & test
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential cmake git pkg-config \
libpng-dev libgl1-mesa-dev libx11-dev libxcursor-dev \
libxinerama-dev libxrandr-dev libxi-dev libasound2-dev

- name: Build raylib
run: |
git clone --depth 1 --branch "5.5" https://github.com/raysan5/raylib.git /tmp/raylib
cmake -S /tmp/raylib -B /tmp/raylib-build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_EXAMPLES=OFF \
-DCMAKE_INSTALL_PREFIX=/tmp/raylib-install
cmake --build /tmp/raylib-build --target install --config Release --parallel 2

- name: Build CLI
env:
PKG_CONFIG_PATH: /tmp/raylib-install/lib/pkgconfig:/tmp/raylib-install/lib64/pkgconfig
run: |
make PKG_CONFIG="pkg-config --static"

- name: Build GUI
env:
PKG_CONFIG_PATH: /tmp/raylib-install/lib/pkgconfig:/tmp/raylib-install/lib64/pkgconfig
run: |
make gui PKG_CONFIG="pkg-config --static"

- name: Run unit tests
env:
PKG_CONFIG_PATH: /tmp/raylib-install/lib/pkgconfig:/tmp/raylib-install/lib64/pkgconfig
run: |
make test PKG_CONFIG="pkg-config --static"

windows-build:
name: Windows build
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
make
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-pkgconf
mingw-w64-ucrt-x86_64-libpng
mingw-w64-ucrt-x86_64-raylib

- name: Build CLI and GUI
shell: msys2 {0}
run: |
make
make gui

- name: Run unit tests
shell: msys2 {0}
run: make test
46 changes: 46 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docs

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: Build Doxygen docs
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install doxygen
run: sudo apt-get update && sudo apt-get install -y doxygen

- name: Generate docs
run: make docs

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html

deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-22.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
platform: windows-x86_64
- os: macos-14
platform: macos-arm64
- os: macos-14
platform: macos-x86_64

steps:
- name: Checkout
Expand Down Expand Up @@ -88,8 +90,17 @@ jobs:
brew update
brew install pkg-config libpng raylib

- name: Build macOS package
if: runner.os == 'macOS'
- name: Build macOS x86_64 package
if: matrix.platform == 'macos-x86_64'
env:
MACOS_ARCH_FLAGS: -arch x86_64 -mmacosx-version-min=10.13
run: |
make CFLAGS="-Wall -Wextra -Wno-format-truncation -std=c99 -g -Iinclude $(pkg-config --cflags libpng) ${MACOS_ARCH_FLAGS}"
make gui CFLAGS="-Wall -Wextra -Wno-format-truncation -std=c99 -g -Iinclude $(pkg-config --cflags libpng) ${MACOS_ARCH_FLAGS}"
scripts/package_release.sh "${{ matrix.platform }}" "${GITHUB_REF_NAME:-dev}"

- name: Build macOS arm64 package
if: matrix.platform == 'macos-arm64'
run: |
make
make gui
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
*.ppm

# Generated documentation
/docs/html/
/docs/latex/
/docs/doxygen-warnings.log
/docs/build/

# ROMs, saves, and copyrighted game data must never be committed.
*.nds
Expand Down
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Changelog

All notable changes to AnimaEngine are documented in this file. Dates are
shown in YYYY-MM-DD format. Versions follow [Semantic Versioning](https://semver.org/).

## [Unreleased]

### Added
- Trademark disclaimer for Pokémon and individual species names, with a
matching notice in `THIRD_PARTY_NOTICES.md` and a header comment in
`source/pokemon_catalog.c`.
- GitHub Actions CI workflow (`.github/workflows/ci.yml`) that builds the
CLI, GUI, and unit tests on Linux and Windows for every push to `main`
and every pull request.
- GitHub Pages workflow (`.github/workflows/docs.yml`) that publishes the
Doxygen reference to <https://killdawill.github.io/AnimaEngine/>.
- Minimal unit-test harness under `tests/` with `make test`. Covers LZ10
detection and roundtrip, the catalog size, and spot-checked species.
- "How it works" / architecture section in the README.

### Changed
- `Doxyfile` moved to `docs/Doxyfile`; output now lives under `docs/build/`.
- README downloads section splits macOS into Apple Silicon and Intel, and
links to a real docs URL.
- `make` removes the `print` debug target; the new `make test` target runs
the unit tests.

### Fixed
- "Downloading A Release" header casing in the README.
- Unnecessary `\_` escape inside a code block in the README.

## [1.0.0] - 2026-05-21

### Added
- Initial public release. C99 sprite extraction and preview toolchain for
Nintendo DS Pokémon Black, White, Black 2, and White 2.
- Nitro parsers for NCGR, NCLR, NCER, NANR, NMCR, and NMAR.
- CLI and raylib-based GUI sharing a common `anima_backend`.
- Prebuilt Linux, Windows, and macOS (arm64) release packages.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2026 AnimaEngine contributors
Copyright (c) 2026 KillDaWill

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
37 changes: 26 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ RAYLIB_LDLIBS := $(shell $(PKG_CONFIG) --libs raylib)
BUILD_DIR := build
TARGET := AnimaEngine
GUI_TARGET := AnimaEngineGUI
TEST_TARGET := $(BUILD_DIR)/anima_tests

COMMON_SRC := $(filter-out source/main.c source/gui_main.c source/gui_app.c source/pokemon_catalog.c source/gui_raylib.c source/gui_state.c source/gui_widgets.c source/gui_view_rom.c source/gui_view_browser.c,$(wildcard source/*.c))
CLI_SRC := $(COMMON_SRC) source/pokemon_catalog.c source/main.c
GUI_SRC := $(COMMON_SRC) source/pokemon_catalog.c source/gui_raylib.c source/gui_state.c source/gui_widgets.c source/gui_view_rom.c source/gui_view_browser.c source/gui_app.c source/gui_main.c

TEST_SRC := tests/test_main.c tests/test_lz.c tests/test_pokemon_catalog.c
TEST_OBJ := $(patsubst tests/%.c,$(BUILD_DIR)/%.test.o,$(TEST_SRC))
TEST_DEPS := $(TEST_OBJ:.o=.d)
TEST_LIB_SRC := $(COMMON_SRC) source/pokemon_catalog.c
TEST_LIB_OBJ := $(patsubst source/%.c,$(BUILD_DIR)/%.test.o,$(TEST_LIB_SRC))

CLI_OBJ := $(patsubst source/%.c,$(BUILD_DIR)/%.o,$(CLI_SRC))
GUI_OBJ := $(patsubst source/%.c,$(BUILD_DIR)/%.gui.o,$(GUI_SRC))
CLI_DEPS := $(CLI_OBJ:.o=.d)
GUI_DEPS := $(GUI_OBJ:.o=.d)

.PHONY: all gui print docs clean release-clean
.PHONY: all gui test docs clean release-clean

all: $(TARGET)

Expand All @@ -31,6 +38,13 @@ gui: $(GUI_TARGET)
$(GUI_TARGET): $(GUI_OBJ)
$(CC) $(CFLAGS) $(RAYLIB_CFLAGS) -o $@ $(GUI_OBJ) $(LDLIBS) $(RAYLIB_LDLIBS)

test: $(TEST_TARGET)
@./$(TEST_TARGET)

$(TEST_TARGET): $(TEST_LIB_OBJ) $(TEST_OBJ)
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -o $@ $(TEST_LIB_OBJ) $(TEST_OBJ) $(LDLIBS)

$(BUILD_DIR)/%.o: source/%.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
Expand All @@ -39,20 +53,21 @@ $(BUILD_DIR)/%.gui.o: source/%.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(RAYLIB_CFLAGS) $(DEPFLAGS) -c $< -o $@

print:
@echo "COMMON_SRC = $(COMMON_SRC)"
@echo "CLI_SRC = $(CLI_SRC)"
@echo "GUI_SRC = $(GUI_SRC)"
@echo "CLI_OBJ = $(CLI_OBJ)"
@echo "GUI_OBJ = $(GUI_OBJ)"
$(BUILD_DIR)/%.test.o: source/%.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@

$(BUILD_DIR)/%.test.o: tests/%.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -Iinclude -Itests $(DEPFLAGS) -c $< -o $@

docs:
doxygen Doxyfile
doxygen docs/Doxyfile

clean:
rm -rf $(BUILD_DIR) $(TARGET) $(GUI_TARGET)
rm -rf $(BUILD_DIR) $(TARGET) $(GUI_TARGET) $(TEST_TARGET)

release-clean: clean
rm -rf release docs/html docs/latex docs/doxygen-warnings.log
rm -rf release docs/build

-include $(CLI_DEPS) $(GUI_DEPS)
-include $(CLI_DEPS) $(GUI_DEPS) $(TEST_DEPS)
Loading
Loading