Refactor menu rendering and improve projection sampling

- Updated AsciiRasterizer to support game and episode selection menus with improved layout and cursor handling.
- Enhanced SixelRasterizer and SoftwareRasterizer to modularize menu drawing logic for game and episode selection.
- Introduced new methods for drawing menus and applying fade effects across rasterizers.
- Adjusted wall texture sampling in Rasterizer to anchor to projection height center for consistent rendering.
- Added tests for wall texture sampling behavior to ensure legacy compatibility and new functionality.
- Modified Flutter audio adapter to use nullable access for active game and adjusted game selection logic in the main class.
- Cleaned up input handling in Wolf3dFlutterInput by removing unused menu tap variables.

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-18 20:06:18 +01:00
parent d93f467163
commit 0e143892f0
15 changed files with 1090 additions and 204 deletions

View File

@@ -37,6 +37,14 @@ void main() async {
recursive: true,
);
if (availableGames.isEmpty) {
stderr.writeln('\nNo Wolf3D game files were found at: $targetPath');
stderr.writeln(
'Please provide valid game data files before starting the CLI host.',
);
exitCleanly(1);
}
CliGameLoop? gameLoop;
void stopAndExit(int code) {
@@ -45,7 +53,7 @@ void main() async {
}
final engine = WolfEngine(
data: availableGames.values.first,
availableGames: availableGames.values.toList(growable: false),
startingEpisode: 0,
frameBuffer: FrameBuffer(
stdout.terminalColumns,