mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 11:50:49 +00:00
- flag SW's cutscenes as 'boss death only'.
This commit is contained in:
parent
d5c9768414
commit
5aa27bad3b
11 changed files with 21 additions and 12 deletions
|
@ -51,6 +51,7 @@
|
||||||
#include "s_music.h"
|
#include "s_music.h"
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
#include "i_interface.h"
|
#include "i_interface.h"
|
||||||
|
#include "gamecontrol.h"
|
||||||
|
|
||||||
CVAR(Bool, inter_subtitles, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
CVAR(Bool, inter_subtitles, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,7 @@ void CompleteLevel(MapRecord* map)
|
||||||
gameaction = ga_completed;
|
gameaction = ga_completed;
|
||||||
g_nextmap = !currentLevel || !(currentLevel->flags & MI_FORCEEOG)? map : nullptr;
|
g_nextmap = !currentLevel || !(currentLevel->flags & MI_FORCEEOG)? map : nullptr;
|
||||||
g_nextskill = -1; // This does not change the skill
|
g_nextskill = -1; // This does not change the skill
|
||||||
|
g_bossexit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -223,6 +224,7 @@ void CompleteLevel(MapRecord* map)
|
||||||
void changeMap(int player, uint8_t** stream, bool skip)
|
void changeMap(int player, uint8_t** stream, bool skip)
|
||||||
{
|
{
|
||||||
int skill = (int8_t)ReadByte(stream);
|
int skill = (int8_t)ReadByte(stream);
|
||||||
|
int bossexit = (int8_t)ReadByte(stream);
|
||||||
auto mapname = ReadStringConst(stream);
|
auto mapname = ReadStringConst(stream);
|
||||||
if (skip) return;
|
if (skip) return;
|
||||||
auto map = FindMapByName(mapname);
|
auto map = FindMapByName(mapname);
|
||||||
|
@ -231,6 +233,7 @@ void changeMap(int player, uint8_t** stream, bool skip)
|
||||||
gameaction = ga_completed;
|
gameaction = ga_completed;
|
||||||
g_nextmap = map;
|
g_nextmap = map;
|
||||||
g_nextskill = skill;
|
g_nextskill = skill;
|
||||||
|
g_bossexit = bossexit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,10 +254,11 @@ void endScreenJob(int player, uint8_t** stream, bool skip)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void ChangeLevel(MapRecord* map, int skill)
|
void ChangeLevel(MapRecord* map, int skill, bool bossexit)
|
||||||
{
|
{
|
||||||
Net_WriteByte(DEM_CHANGEMAP);
|
Net_WriteByte(DEM_CHANGEMAP);
|
||||||
Net_WriteByte(skill);
|
Net_WriteByte(skill);
|
||||||
|
Net_WriteByte(bossexit);
|
||||||
Net_WriteString(map? map->labelName : nullptr);
|
Net_WriteString(map? map->labelName : nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,6 +272,7 @@ void DeferredStartGame(MapRecord* map, int skill, bool nostopsound)
|
||||||
{
|
{
|
||||||
g_nextmap = map;
|
g_nextmap = map;
|
||||||
g_nextskill = skill;
|
g_nextskill = skill;
|
||||||
|
g_bossexit = false;
|
||||||
gameaction = nostopsound? ga_newgamenostopsound : ga_newgame;
|
gameaction = nostopsound? ga_newgamenostopsound : ga_newgame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -649,6 +649,7 @@ MapFlagHandlers[] =
|
||||||
{ "sw_deathexit_sumo", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_SUMO, 0, GAMEFLAG_SW },
|
{ "sw_deathexit_sumo", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_SUMO, 0, GAMEFLAG_SW },
|
||||||
{ "sw_deathexit_zilla", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_ZILLA, 0, GAMEFLAG_SW },
|
{ "sw_deathexit_zilla", MITYPE_SETFLAGG,LEVEL_SW_DEATHEXIT_ZILLA, 0, GAMEFLAG_SW },
|
||||||
{ "sw_spawnmines", MITYPE_SETFLAGG,LEVEL_SW_SPAWNMINES, 0, GAMEFLAG_SW },
|
{ "sw_spawnmines", MITYPE_SETFLAGG,LEVEL_SW_SPAWNMINES, 0, GAMEFLAG_SW },
|
||||||
|
{ "bossonlycutscene", MITYPE_SETFLAGG,LEVEL_BOSSONLYCUTSCENE, 0, -1 },
|
||||||
|
|
||||||
{ NULL, MITYPE_IGNORE, 0, 0}
|
{ NULL, MITYPE_IGNORE, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -122,6 +122,7 @@ gameaction_t gameaction = ga_nothing;
|
||||||
// gameaction state
|
// gameaction state
|
||||||
MapRecord* g_nextmap;
|
MapRecord* g_nextmap;
|
||||||
int g_nextskill;
|
int g_nextskill;
|
||||||
|
int g_bossexit;
|
||||||
|
|
||||||
|
|
||||||
FILE* hashfile;
|
FILE* hashfile;
|
||||||
|
|
|
@ -32,6 +32,7 @@ extern bool crouch_toggle;
|
||||||
struct MapRecord;
|
struct MapRecord;
|
||||||
extern MapRecord* g_nextmap;
|
extern MapRecord* g_nextmap;
|
||||||
extern int g_nextskill;
|
extern int g_nextskill;
|
||||||
|
extern int g_bossexit;
|
||||||
|
|
||||||
extern FMemArena dump; // this is for memory blocks than cannot be deallocated without some huge effort. Put them in here so that they do not register on shutdown.
|
extern FMemArena dump; // this is for memory blocks than cannot be deallocated without some huge effort. Put them in here so that they do not register on shutdown.
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ int GetAutomapZoom(int gZoom);
|
||||||
void DrawCrosshair(int deftile, int health, double xdelta, double ydelta, double scale, PalEntry color = 0xffffffff);
|
void DrawCrosshair(int deftile, int health, double xdelta, double ydelta, double scale, PalEntry color = 0xffffffff);
|
||||||
void updatePauseStatus();
|
void updatePauseStatus();
|
||||||
void DeferredStartGame(MapRecord* map, int skill, bool nostopsound = false);
|
void DeferredStartGame(MapRecord* map, int skill, bool nostopsound = false);
|
||||||
void ChangeLevel(MapRecord* map, int skill);
|
void ChangeLevel(MapRecord* map, int skill, bool bossexit = false);
|
||||||
void CompleteLevel(MapRecord* map);
|
void CompleteLevel(MapRecord* map);
|
||||||
|
|
||||||
struct UserConfig
|
struct UserConfig
|
||||||
|
|
|
@ -55,7 +55,7 @@ enum EMapGameFlags
|
||||||
|
|
||||||
LEVEL_WT_BOSSSPAWN = 16384,
|
LEVEL_WT_BOSSSPAWN = 16384,
|
||||||
|
|
||||||
|
LEVEL_BOSSONLYCUTSCENE = 32768,
|
||||||
};
|
};
|
||||||
|
|
||||||
// These get filled in by the map definition parsers of the front ends.
|
// These get filled in by the map definition parsers of the front ends.
|
||||||
|
|
|
@ -187,6 +187,9 @@ void ShowScoreboard(int numplayers, const CompletionFunc& completion_)
|
||||||
|
|
||||||
void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, CompletionFunc completion_)
|
void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, CompletionFunc completion_)
|
||||||
{
|
{
|
||||||
|
bool bossexit = g_bossexit;
|
||||||
|
g_bossexit = false;
|
||||||
|
|
||||||
completion = completion_;
|
completion = completion_;
|
||||||
runner = CreateRunner();
|
runner = CreateRunner();
|
||||||
GC::WriteBarrier(runner);
|
GC::WriteBarrier(runner);
|
||||||
|
@ -200,7 +203,7 @@ void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, C
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (fromMap)
|
if (fromMap && (!(fromMap->gameflags & LEVEL_BOSSONLYCUTSCENE) || bossexit))
|
||||||
{
|
{
|
||||||
if (!CreateCutscene(&fromMap->outro, runner, fromMap, !!toMap))
|
if (!CreateCutscene(&fromMap->outro, runner, fromMap, !!toMap))
|
||||||
{
|
{
|
||||||
|
|
|
@ -7206,7 +7206,7 @@ domovethings(void)
|
||||||
{
|
{
|
||||||
map = FindNextMap(currentLevel);
|
map = FindNextMap(currentLevel);
|
||||||
}
|
}
|
||||||
ChangeLevel(map, g_nextskill);
|
ChangeLevel(map, g_nextskill, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5330,7 +5330,7 @@ ActorHealth(short SpriteNum, short amt)
|
||||||
// Hack for Last Warrior which apparently needs to continue with the next level here.
|
// Hack for Last Warrior which apparently needs to continue with the next level here.
|
||||||
if (!(currentLevel->gameflags & LEVEL_SW_DEATHEXIT_SERPENT_NEXT))
|
if (!(currentLevel->gameflags & LEVEL_SW_DEATHEXIT_SERPENT_NEXT))
|
||||||
{
|
{
|
||||||
ChangeLevel(nullptr, g_nextskill);
|
ChangeLevel(nullptr, g_nextskill, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else FinishTimer = 1;
|
else FinishTimer = 1;
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
|
|
||||||
map { 9 }
|
|
||||||
{
|
|
||||||
sw_spawnmines
|
|
||||||
}
|
|
|
@ -25,6 +25,7 @@ map { 4 }
|
||||||
}
|
}
|
||||||
sw_bossmeter_serpent
|
sw_bossmeter_serpent
|
||||||
sw_deathexit_serpent
|
sw_deathexit_serpent
|
||||||
|
bossonlycutscene
|
||||||
}
|
}
|
||||||
|
|
||||||
map { 5 }
|
map { 5 }
|
||||||
|
@ -40,6 +41,7 @@ map { 11 }
|
||||||
}
|
}
|
||||||
sw_bossmeter_sumo
|
sw_bossmeter_sumo
|
||||||
sw_deathexit_sumo
|
sw_deathexit_sumo
|
||||||
|
bossonlycutscene
|
||||||
}
|
}
|
||||||
|
|
||||||
map { 20 }
|
map { 20 }
|
||||||
|
|
Loading…
Reference in a new issue