Moving level loading into the package

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-14 23:30:51 +01:00
parent 8ea7642c8b
commit fc5e07ea10
8 changed files with 250 additions and 221 deletions

View File

@@ -1,7 +1,5 @@
import 'package:flutter/services.dart';
import 'package:wolf_3d_data/wolf_3d_data.dart';
import 'package:wolf_dart/features/map/wolf_level.dart';
import 'package:wolf_dart/features/map/wolf_map_parser.dart';
class WolfMap {
/// The fully parsed and decompressed levels from the game files.
@@ -24,7 +22,7 @@ class WolfMap {
final vswap = await rootBundle.load("assets/VSWAP.WL1");
// 2. Parse the data using the parser we just built
final parsedLevels = WolfMapParser.parseMaps(
final parsedLevels = WLParser.parseMaps(
mapHead,
gameMaps,
isShareware: true,
@@ -48,7 +46,7 @@ class WolfMap {
final vswap = await rootBundle.load("assets/VSWAP.WL6");
// 2. Parse the data using the parser we just built
final parsedLevels = WolfMapParser.parseMaps(mapHead, gameMaps);
final parsedLevels = WLParser.parseMaps(mapHead, gameMaps);
final parsedTextures = WLParser.parseWalls(vswap);
final parsedSprites = WLParser.parseSprites(vswap);