Add shareware support and spawn correctly for difficulty levels
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -18,14 +18,18 @@ class WolfMap {
|
||||
);
|
||||
|
||||
/// Asynchronously loads the map files and parses them into a new WolfMap instance.
|
||||
static Future<WolfMap> loadDemo() async {
|
||||
static Future<WolfMap> loadShareware() async {
|
||||
// 1. Load the binary data
|
||||
final mapHead = await rootBundle.load("assets/MAPHEAD.WL1");
|
||||
final gameMaps = await rootBundle.load("assets/GAMEMAPS.WL1");
|
||||
final vswap = await rootBundle.load("assets/VSWAP.WL1");
|
||||
|
||||
// 2. Parse the data using the parser we just built
|
||||
final parsedLevels = WolfMapParser.parseMaps(mapHead, gameMaps);
|
||||
final parsedLevels = WolfMapParser.parseMaps(
|
||||
mapHead,
|
||||
gameMaps,
|
||||
isShareware: true,
|
||||
);
|
||||
final parsedTextures = VswapParser.parseWalls(vswap);
|
||||
final parsedSprites = VswapParser.parseSprites(vswap);
|
||||
|
||||
@@ -38,7 +42,7 @@ class WolfMap {
|
||||
}
|
||||
|
||||
/// Asynchronously loads the map files and parses them into a new WolfMap instance.
|
||||
static Future<WolfMap> load() async {
|
||||
static Future<WolfMap> loadRetail() async {
|
||||
// 1. Load the binary data
|
||||
final mapHead = await rootBundle.load("assets/MAPHEAD.WL6");
|
||||
final gameMaps = await rootBundle.load("assets/GAMEMAPS.WL6");
|
||||
|
||||
Reference in New Issue
Block a user