1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

skip an extra 1 second black-screen time on startup whenever possible

The transition time is still there when entering the title
from another game state where it makes sense;
especially the intro.
This commit is contained in:
fgenesis 2023-06-01 13:03:52 +02:00
parent d740aa06e1
commit f15771f79b
11 changed files with 31 additions and 31 deletions

View file

@ -1363,7 +1363,7 @@ void AnimationEditor::goToTitle()
if (!dsq->returnToScene.empty())
game->transitionToScene(dsq->returnToScene);
else
dsq->title();
dsq->title(false);
}
void AnimationEditor::quit()

View file

@ -62,7 +62,7 @@ void BitBlotLogo::doShortBitBlot()
void BitBlotLogo::getOut()
{
dsq->title();
dsq->title(false);
}
void BitBlotLogo::applyState()

View file

@ -1364,11 +1364,11 @@ void DSQ::init()
// Go directly to the title in dev mode
if(isDeveloperKeys())
title();
title(false);
else if (dsq->user.demo.intro != 0)
enqueueJumpState("Intro");
else if(dsq->user.demo.shortLogos)
title();
title(false);
else
enqueueJumpState("BitBlotLogo");
}
@ -2664,16 +2664,12 @@ void DSQ::title(bool fade)
if (fade)
{
sound->fadeMusic(SFT_OUT, 1);
run(1);
resetTimer();
sound->stopMusic();
}
run(1);
resetTimer();
if (fade)
sound->stopMusic();
user.save();
//user.save();
if (mod.isActive())
{

View file

@ -167,7 +167,7 @@ public:
void action(int id, int state, int source, InputDevice device);
void title(bool fadeMusic=true);
void title(bool fadeMusic);
void cutsceneEffects(bool on);

View file

@ -3203,7 +3203,7 @@ void InGameMenu::onExitCheckYes()
{
dsq->sound->stopAllVoice();
dsq->toggleCursor(0, 0.25);
dsq->title();
dsq->title(true);
}
void InGameMenu::onExitCheckNo()

View file

@ -83,7 +83,7 @@ void Intro::endIntro()
dsq->setCutscene(0);
dsq->title();
dsq->title(true);
}
bool Intro::waitQuit(float t)

View file

@ -106,7 +106,7 @@ bool Mod::loadSavedGame(const std::string& path)
debugLog("MOD: loadSavedGame/compatScript failed");
setActive(false);
dsq->title();
dsq->title(false);
return false;
}
@ -226,13 +226,21 @@ void Mod::applyStart()
dsq->continuity.reset();
dsq->scriptInterface.reset();
if(!tryStart())
{
setActive(false);
dsq->title(false);
}
}
bool Mod::tryStart()
{
// Before loading init.lua, load a compatibility layer, if necessary
if(!loadCompatScript())
{
debugLog("MOD: compatScript failed");
setActive(false);
dsq->title();
return;
return false;
}
// load the mod-init.lua file
@ -243,17 +251,12 @@ void Mod::applyStart()
if (!dsq->runScript(scriptPath, "init"))
{
debugLog("MOD: runscript failed");
setActive(false);
dsq->title();
return false;
}
if (isActive() && game->sceneToLoad.empty())
{
debugLog("MOD: no scene loaded in mod-init");
setActive(false);
dsq->title();
}
else if (isActive())
{
return false;
}
}

View file

@ -70,6 +70,7 @@ protected:
int debugMenu;
int enqueueModStart;
void applyStart();
bool tryStart();
std::string name;
std::string path;

View file

@ -122,7 +122,7 @@ void ParticleEditor::goToTitle()
if (!dsq->returnToScene.empty())
game->transitionToScene(dsq->returnToScene);
else
dsq->title();
dsq->title(false);
}
void ParticleEditor::load()

View file

@ -3877,7 +3877,7 @@ luaFunc(jumpState)
luaFunc(goToTitle)
{
dsq->title();
dsq->title(true);
luaReturnNil();
}

View file

@ -239,7 +239,7 @@ void GameOver::applyState()
game->transitionToScene(game->sceneToLoad);
}
else
dsq->title();
dsq->title(false);
}
void GameOver::removeState()
@ -252,7 +252,7 @@ void GameOver::removeState()
void GameOver::onClick()
{
if (timer == 0)
dsq->title();
dsq->title(true);
}
void GameOver::update(float dt)
@ -426,7 +426,7 @@ void Nag::onExit()
switch (dsq->nagType)
{
case NAG_TOTITLE:
dsq->title();
dsq->title(true);
break;
default:
case NAG_QUIT: