Commit 71b6e34
committed
Porytiles2 MVP: Core compilation pipeline and domain architecture (#185)
This PR represents a major milestone in the Porytiles2 development
effort, establishing the core architecture and outline of the primary
tileset compilation pipeline (more implementation work to come).
- Implemented ChainableResult type for composable error handling with
context propagation
- Created FormattableError system with rich formatting capabilities
- Added UserDiagnostics interface with stderr implementation
- Introduced PT_TRY macros for ergonomic error handling
- Implemented error chain visualization with metatile and tile printers
- Added provenance tracking for configuration values
- Implemented RgbaTileNormalizer service for normalizing tiles to
canonical form
- Created NormalizedTile and NormalizedPal domain types
- Added RgbaTileDenormalizer for reconstructing original tiles from
normalized form
- Implemented tile masking system with ShapeMask (formerly MaskPixels)
- Created canonical tile types: CanonicalPixelTile and
CanonicalShapeTile
- Developed shape-based tile isomorphism detection system
- Added batch normalization capabilities
- Implemented ColorSet domain type for managing palette color
collections
- Created ColorSetBuilder service for constructing color sets
- Added ColorIndexMapBuilder for mapping colors to palette indices
- Integrated support for multiple extrinsic transparency values
- Implemented PrimaryTilesetCompiler service with multi-stage pipeline
architecture
- Created operation framework with ConstructRgbaMetatilesOp and other
pipeline operations
- Added OperandBundle for managing pipeline data flow
- Implemented tile validation services (e.g.,
validate_unique_color_count)
- Implemented RgbaLayerImageMetatileizer for converting layer images to
metatiles
- Created RgbaImageTileizer for breaking images into tiles
- Added MetatileAttribute domain model with support for
pokeemerald-specific attributes
- Implemented metatile decomposition capabilities
- Added MetatileDecompiler service stub
- Implemented ProjectTilesetArtifactReader with support for reading
pokeemerald attributes
- Created ProjectTilesetArtifactWriter with integration tests
- Added TilesPngWorkspace for managing tiles.png operations
- Enhanced artifact reading to correctly parse binary attribute formats
- Refactored TextFormatter with varargs support and multiple style
options
- Implemented FormatParam with implicit conversion support
- Removed fmtlib types from public API for better encapsulation
- Added convenience formatting methods throughout codebase
- Migrated from global config values to tileset-specific configuration
- Implemented configuration provenance tracking with
std::source_location
- Added extract_simple_function_name utility for source location
handling
- Updated DomainConfig to use tileset-prefixed keys
- Implemented lazy layered configuration evaluation
- Removed legacy BGR color classes in favor of RGBA
- Deleted IsoXTile types and associated services
- Removed domain/model subfolder structure for simplified organization
- Consolidated tile domain model package
- Refactored template library into multiple focused packages (xcut,
utilities)
- Deleted unused code and old notes files
- Created new package structure for better domain separation
- Added comprehensive unit tests for normalization, color management,
and metatileization
- Created integration tests for artifact I/O
- Added test resources for various edge cases (normalization,
attributes, etc.)
- Improved test organization under Resources/Tests/unit
- Added debug flags and coverage build configuration
- Integrated Doxygen Awesome CSS dependency
- Enhanced CMake FetchContent logging
- Added find_and_replace.sh utility script
- Updated .gitignore and launch.json configuration
- Restructured debug commands into comprehensive debug_commands.hpp
- Added tileset verification command
- Improved command validation
- Enhanced error messaging and diagnostics output
This PR establishes the foundational domain-driven design architecture
for Porytiles2:
- Clear separation between domain models, services, and utilities
- Template-based generic programming for flexibility
- Pipeline-based compilation with composable operations
- Rich error handling with full context propagation
- Transparent artifact I/O with format-agnostic interfaces
All changes include corresponding unit and integration tests. The test
suite covers:
- Tile normalization and denormalization round-trips
- Color set and index map generation
- Metatile construction and decomposition
- Artifact reading and writing
- Error handling and propagation
- Configuration provenance tracking
Major areas:
- Porytiles2/include/porytiles2/domain/ (extensive changes)
- Porytiles2/lib/domain/ (extensive changes)
- Porytiles2/include/porytiles2/utilities/ (new package structure)
- Porytiles2/tests/ (new test coverage)
- Resources/Tests/ (new test resources)1 parent d698021 commit 71b6e34
File tree
226 files changed
+13194
-6003
lines changed- .vscode
- Documentation
- Porytiles2
- Notes
- include/porytiles2
- app/config
- domain
- config
- models
- model
- orchestration
- repos
- services
- infra
- config
- diagnostics
- repos
- services
- utilities
- templates
- utilities
- text
- xcut
- config
- diagnostics
- panic
- result
- lib
- app/use_cases
- domain
- models
- model
- orchestration
- repos
- services
- infra
- config
- diagnostics
- repos
- services
- utilities
- porytiles2/domain/orchestration
- utilities
- text
- xcut/diagnostics
- tests
- integration
- image_io
- pipeline
- repos
- unit
- domain
- models
- model
- orchestration
- services
- infra
- config
- diagnostics
- utilities
- xcut
- config
- diagnostics
- result
- tools/driver
- Resources/Tests/unit
- domain
- compile_tileset/operations
- services
- utilities
- Scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
226 files changed
+13194
-6003
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 35 | + | |
41 | 36 | | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
45 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 47 | + | |
52 | 48 | | |
53 | 49 | | |
54 | 50 | | |
| |||
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
115 | | - | |
| 111 | + | |
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
0 commit comments