- migrated RRRA as well.

This commit is contained in:
Christoph Oelckers 2021-05-02 14:01:10 +02:00
parent a28b4ea06a
commit bb9d492db6
8 changed files with 146 additions and 74 deletions

View File

@ -150,7 +150,7 @@ struct MapRecord
// game specific stuff
int rr_startsound = 0;
int rr_mamaspawn = 5;
int rr_mamaspawn = 15;
const char* LabelName() const
{

View File

@ -473,7 +473,7 @@ void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, C
{
if (!fromMap->outro.Create(runner, fromMap, !!toMap))
{
if (fromcluster != nullptr && !fromcluster->outro.Create(runner, fromMap, !!toMap))
if (fromcluster == nullptr || !fromcluster->outro.Create(runner, fromMap, !!toMap))
globalCutscenes.DefaultMapOutro.Create(runner, fromMap, !!toMap);
}
@ -485,7 +485,7 @@ void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, C
{
if (!toMap->intro.Create(runner, toMap, !!fromMap))
{
if (tocluster != nullptr && !tocluster->intro.Create(runner, toMap, !!fromMap))
if (tocluster == nullptr || !tocluster->intro.Create(runner, toMap, !!fromMap))
globalCutscenes.DefaultMapIntro.Create(runner, toMap, !!fromMap);
}
globalCutscenes.LoadingScreen.Create(runner, toMap, true);

View File

@ -3382,9 +3382,8 @@ void processinput_r(int snum)
psectlotag = 2;
}
}
else if (psectlotag == 7777)
if (currentLevel->levelNumber == makelevelnum(1, 6))
lastlevel = 1;
else if (psectlotag == 7777 && (currentLevel->gameflags & LEVEL_RR_HULKSPAWN))
lastlevel = 1;
if (psectlotag == 848 && sector[psect].floorpicnum == WATERTILE2)
psectlotag = 1;

View File

@ -671,19 +671,7 @@ void prelevel_common(int g)
WindDir = 0;
fakebubba_spawn = 0;
RRRA_ExitedLevel = 0;
mamaspawn_count = 15;
/* todo
if (ud.level_number != 3 || ud.volume_number != 0) {
if (ud.level_number == 2 && ud.volume_number == 1)
mamaspawn_count = 10;
else if (ud.level_number == 6 && ud.volume_number == 1)
mamaspawn_count = 15;
else if (ud.level_number == 4 && ud.volume_number == 1)
ps[myconnectindex].moonshine_amount = 0;
} else
mamaspawn_count = 5;
*/
mamaspawn_count = currentLevel->rr_mamaspawn;
BellTime = 0;
BellSprite = nullptr;
@ -919,8 +907,7 @@ void enterlevel(MapRecord *mi, int gamemode)
resetinventory(i);
clearweapon = true;
}
if (clearweapon || (isRRRA() && currentLevel->mapindex == 3 && currentLevel->cluster == 1)
|| (!isRRRA() && currentLevel->mapindex == 2 && currentLevel->cluster == 2))
if (clearweapon)
{
resetweapons(i);
ps[i].gotweapon.Clear(PISTOL_WEAPON);

View File

@ -431,11 +431,11 @@ void prelevel_r(int g)
prelevel_common(g);
p = &ps[screenpeek];
if (currentLevel->gameflags & LEVEL_RR_CLEARMOONSHINE)
ps[myconnectindex].steroids_amount = 0;
if (isRRRA())
{
if (currentLevel->levelNumber == makelevelnum(1, 4))
ps[myconnectindex].steroids_amount = 0;
for (j = 0; j < MAXSPRITES; j++)
{

View File

@ -0,0 +1,120 @@
// Cutscene definitions for RR
cluster 2
{
outro
{
function = RRCutscenes.BuildRAE2End
}
}
map { 1, 1 }
{
interbackground = "LEVELMAP01"
rr_startsound = 63
}
map { 1, 2 }
{
interbackground = "LEVELMAP02"
rr_startsound = 64
}
map { 1, 3 }
{
interbackground = "LEVELMAP03"
rr_startsound = 77
clearweapons
}
map { 1, 4 }
{
interbackground = "LEVELMAP04"
rr_startsound = 80
rr_mamaspawn = 5
}
map { 1, 5 }
{
interbackground = "LEVELMAP05"
rr_startsound = 102
PrecacheTextures = "#02577"
}
map { 1, 6 }
{
interbackground = "LEVELMAP06"
rr_startsound = 103
}
map { 1, 7 }
{
interbackground = "LEVELMAP07"
rr_startsound = 104
}
map { 2, 1 }
{
interbackground = "LEVELMAP08"
rr_startsound = 105
}
map { 2, 2 }
{
interbackground = "LEVELMAP09"
rr_startsound = 176
clearweapons
}
map { 2, 3 }
{
interbackground = "LEVELMAP10"
rr_startsound = 177
rr_mamaspawn = 10
}
map { 2, 4 }
{
interbackground = "LEVELMAP11"
rr_startsound = 198
}
map { 2, 5 }
{
interbackground = "LEVELMAP12"
rr_startsound = 230
rr_clearmoonshine
}
map { 2, 6 }
{
interbackground = "LEVELMAP13"
rr_startsound = 255
}
map { 2, 7 }
{
interbackground = "LEVELMAP14"
rr_startsound = 283
rrra_hulkspawn
PrecacheTextures = "UFO1_RRRA", "UFO2", "UFO3", "UFO4", "UFO5"
}
cutscenes
{
loadscreen
{
function = DukeCutscenes.BuildLoading // identical with Duke's
}
defaultmapintro
{
function = RRCutscenes.BuildMapIntro // this plays the 'travel' animation.
transitiononly
}
}
gameinfo
{
summaryscreen = RRCutscenes.BuildSPSummary
mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's
}

View File

@ -1,37 +0,0 @@
// Cutscene definitions for RR
/*
definecutscene intro
{
function RRCutscenes.BuildIntro
}
definecutscene episode 1
{
outro
{
function RRCutscenes.BuildE1End
}
}
definecutscene episode 2
{
outro
{
function RRCutscenes.BuildE2End
}
}
definecutscene mapintro
{
function RRCutscenes.BuildMapIntro // this plays the 'travel' animation.
transitiononly
}
definecutscene loading
{
function DukeCutscenes.BuildLoading // identical with Duke's
}
definecutscene summary RRCutscenes.BuildSPSummary
definecutscene mpsummary DukeCutscenes.BuildMPSummary // identical with Duke's
*/

View File

@ -319,17 +319,21 @@ class RRCutscenes
static void BuildE2End(ScreenJobRunner runner)
{
if (!Raze.isRRRA())
{
Array<int> soundinfo;
soundinfo.Pushv(1, RRSnd.LN_FINAL + 1);
runner.Append(MoviePlayerJob.CreateWithSoundinfo("rr_outro.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 9, 9, 9));
runner.Append(ImageScreen.CreateNamed("TENSCREEN"));
}
else
{
runner.Append(new("RRRAEndOfGame").Init());
}
Array<int> soundinfo;
soundinfo.Pushv(1, RRSnd.LN_FINAL + 1);
runner.Append(MoviePlayerJob.CreateWithSoundinfo("rr_outro.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 9, 9, 9));
runner.Append(ImageScreen.CreateNamed("TENSCREEN"));
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
static void BuildRAE2End(ScreenJobRunner runner)
{
runner.Append(new("RRRAEndOfGame").Init());
}
//---------------------------------------------------------------------------
@ -351,13 +355,12 @@ class RRCutscenes
static void BuildMapIntro(ScreenJobRunner runner, MapRecord map)
{
if (!raze.isRRRA()) return;
int ln = map.levelnumber;
int ln = map.levelnumber - 1;
if (ln == 0) return;
if (ln >= 1000) ln -= 1000-7;
let fn = String.Format("lvl%d.anm", ln);
Array<int> soundinfo;
runner.Append(MoviePlayerJob.CreateWithSoundinfo(fn, soundinfo, 0, 20, 20, 7200)); // wait for one minute on the final frame so that the video doesn't stop before the user notices.
runner.Append(MoviePlayerJob.CreateWithSoundinfo(fn, soundinfo, 0, 20, 20, 2000)); // wait for a few seconds on the final frame so that the video doesn't stop before the user notices.
}
}