- migrated Route66 and fixed some issues pointed out by this mod.

This commit is contained in:
Christoph Oelckers 2021-05-02 13:29:41 +02:00
parent 6f4e380728
commit a28b4ea06a
2 changed files with 129 additions and 11 deletions

View file

@ -317,15 +317,15 @@ bool FMapInfoParser::CheckLegacyMapDefinition(FString& mapname)
sc.MustGetNumber();
int indx = sc.Number;
auto map = FindMapByIndexOnly(vol, indx);
if (!map) I_Error("Map {%d, %d} does not exist", vol, indx);
mapname = map->labelName;
if (!map) mapname = "";
else mapname = map->labelName;
}
else
{
// SW only uses the level number
auto map = FindMapByLevelNum(vol);
if (!map) I_Error("Map {%d} does not exist", vol);
mapname = map->labelName;
if (!map) mapname = "";
else mapname = map->labelName;
}
sc.MustGetStringName("}");
return true;
@ -744,17 +744,25 @@ static int GetDefaultLevelNum(const char *mapname)
// Parses the header of a map definition ('map mapxx mapname')
//
//==========================================================================
static MapRecord sink;
MapRecord *FMapInfoParser::ParseMapHeader(MapRecord &defaultinfo)
{
FString mapname;
MapRecord* map;
if (!CheckLegacyMapDefinition(mapname))
{
ParseLookupName(mapname);
}
auto map = FindMapByName(mapname);
if (mapname.IsEmpty())
{
map = &sink; // parse over the entire definition but discard the result.
}
else
{
map = FindMapByName(mapname);
if (!map)
{
map = AllocateMap();
@ -762,6 +770,7 @@ MapRecord *FMapInfoParser::ParseMapHeader(MapRecord &defaultinfo)
DefaultExtension(mapname, ".map");
map->SetFileName(mapname);
}
}
if (!sc.CheckString("{"))
{
@ -770,7 +779,7 @@ MapRecord *FMapInfoParser::ParseMapHeader(MapRecord &defaultinfo)
}
else
{
if (map->name.IsEmpty()) sc.ScriptError("Missing level name");
if (map != &sink && map->name.IsEmpty()) sc.ScriptError("Missing level name");
sc.UnGet();
}
map->levelNumber = GetDefaultLevelNum(map->labelName);

View file

@ -0,0 +1,109 @@
// Cutscene definitions for RRR66. This is a little bit different than the main game.
cluster 2
{
outro
{
function = RRCutscenes.BuildE2End
}
}
map { 1, 1 }
{
interbackground = "BONUSPIC01"
rr_startsound = 391 // fixme: allow symbolic names
}
map { 1, 2 }
{
interbackground = "BONUSPIC02"
rr_startsound = 64
}
map { 1, 3 }
{
interbackground = "BONUSPIC03"
rr_startsound = 77
}
map { 1, 4 }
{
interbackground = "BONUSPIC04"
rr_startsound = 80
}
map { 1, 5 }
{
interbackground = "BONUSPIC05"
rr_startsound = 102
}
map { 1, 6 }
{
interbackground = "BONUSPIC06"
rr_startsound = 103
}
map { 1, 7 }
{
interbackground = "BONUSPIC07"
rr_startsound = 104
}
map { 2, 1 }
{
interbackground = "BONUSPIC08"
rr_startsound = 105
}
map { 2, 2 }
{
interbackground = "BONUSPIC09"
rr_startsound = 176
clearweapons
}
map { 2, 3 }
{
interbackground = "BONUSPIC10"
rr_startsound = 177
}
map { 2, 4 }
{
interbackground = "BONUSPIC11"
rr_startsound = 198
}
map { 2, 5 }
{
interbackground = "BONUSPIC12"
rr_startsound = 230
}
map { 2, 6 }
{
interbackground = "BONUSPIC13"
rr_startsound = 255
}
map { 2, 7 }
{
interbackground = "BONUSPIC14"
rr_startsound = 283
PrecacheTextures = "UFO1", "UFO2", "UFO3", "UFO4", "UFO5"
}
cutscenes
{
loadscreen
{
function = DukeCutscenes.BuildLoading // identical with Duke's
}
}
gameinfo
{
summaryscreen = RRCutscenes.BuildSPSummary
mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's
}