This commit is contained in:
Grant Bagwell 2020-11-29 20:20:42 +01:00
commit 7a66df5945
3 changed files with 18 additions and 9 deletions

View file

@ -132,6 +132,7 @@ bool inMenu = false;
bool inGameGuiActive = false;
bool objectiveSystemActive = false;
bool inCinematic = false;
bool loading = false;
void Doom3Quest_setUseScreenLayer(int screen)
{
@ -139,12 +140,12 @@ void Doom3Quest_setUseScreenLayer(int screen)
inGameGuiActive = !!(screen & 0x2);
objectiveSystemActive = !!(screen & 0x4);
inCinematic = !!(screen & 0x8);
loading = !!(screen & 0x10);
}
bool Doom3Quest_useScreenLayer()
{
//Cinematics are now first person
return inMenu || forceVirtualScreen || inCinematic;
return inMenu || forceVirtualScreen || inCinematic || loading;
}
static void UnEscapeQuotes( char *arg )

View file

@ -2397,7 +2397,6 @@ void idCommonLocal::InitSIMD( void ) {
}
extern "C" void Doom3Quest_setUseScreenLayer(int use);
extern "C" void Doom3Quest_FrameSetup(int controlscheme);
extern "C" void Doom3Quest_Vibrate(int channel, float low, float high );
@ -2419,12 +2418,6 @@ void idCommonLocal::Frame( void ) {
// pump all the events
Sys_GenerateEvents();
int inMenu = (((idSessionLocal*)session)->guiActive != 0);
int inGameGui = ( game && game->InGameGuiActive());
int objectiveActive = ( game && game->ObjectiveSystemActive());
int cinematic = ( game && game->InCinematic());
Doom3Quest_setUseScreenLayer(inMenu?1:0 + inGameGui?2:0 + objectiveActive?4:0 + cinematic?8:0);
Doom3Quest_FrameSetup(cvarSystem->GetCVarInteger("vr_controlscheme"));
if (game) {

View file

@ -2383,6 +2383,19 @@ void idSessionLocal::PacifierUpdate() {
idAsyncNetwork::server.PacifierUpdate();
}
extern "C" void Doom3Quest_setUseScreenLayer(int use);
void setupScreenLayer()
{
int inMenu = (((idSessionLocal*)session)->guiActive != 0);
int inGameGui = ( game && game->InGameGuiActive());
int objectiveActive = ( game && game->ObjectiveSystemActive());
int cinematic = ( game && game->InCinematic());
bool loading = (((idSessionLocal*)session)->insideExecuteMapChange);
Doom3Quest_setUseScreenLayer(inMenu?1:0 + inGameGui?2:0 + objectiveActive?4:0 + cinematic?8:0 + loading?16:0);
}
/*
===============
idSessionLocal::Draw
@ -2391,6 +2404,8 @@ idSessionLocal::Draw
void idSessionLocal::Draw() {
bool fullConsole = false;
setupScreenLayer();
if ( insideExecuteMapChange ) {
if ( guiLoading ) {
guiLoading->Redraw( com_frameTime );