mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-06-08 17:42:05 +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:
parent
d740aa06e1
commit
f15771f79b
11 changed files with 31 additions and 31 deletions
|
@ -1363,7 +1363,7 @@ void AnimationEditor::goToTitle()
|
||||||
if (!dsq->returnToScene.empty())
|
if (!dsq->returnToScene.empty())
|
||||||
game->transitionToScene(dsq->returnToScene);
|
game->transitionToScene(dsq->returnToScene);
|
||||||
else
|
else
|
||||||
dsq->title();
|
dsq->title(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationEditor::quit()
|
void AnimationEditor::quit()
|
||||||
|
|
|
@ -62,7 +62,7 @@ void BitBlotLogo::doShortBitBlot()
|
||||||
|
|
||||||
void BitBlotLogo::getOut()
|
void BitBlotLogo::getOut()
|
||||||
{
|
{
|
||||||
dsq->title();
|
dsq->title(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitBlotLogo::applyState()
|
void BitBlotLogo::applyState()
|
||||||
|
|
|
@ -1364,11 +1364,11 @@ void DSQ::init()
|
||||||
|
|
||||||
// Go directly to the title in dev mode
|
// Go directly to the title in dev mode
|
||||||
if(isDeveloperKeys())
|
if(isDeveloperKeys())
|
||||||
title();
|
title(false);
|
||||||
else if (dsq->user.demo.intro != 0)
|
else if (dsq->user.demo.intro != 0)
|
||||||
enqueueJumpState("Intro");
|
enqueueJumpState("Intro");
|
||||||
else if(dsq->user.demo.shortLogos)
|
else if(dsq->user.demo.shortLogos)
|
||||||
title();
|
title(false);
|
||||||
else
|
else
|
||||||
enqueueJumpState("BitBlotLogo");
|
enqueueJumpState("BitBlotLogo");
|
||||||
}
|
}
|
||||||
|
@ -2664,16 +2664,12 @@ void DSQ::title(bool fade)
|
||||||
if (fade)
|
if (fade)
|
||||||
{
|
{
|
||||||
sound->fadeMusic(SFT_OUT, 1);
|
sound->fadeMusic(SFT_OUT, 1);
|
||||||
|
run(1);
|
||||||
|
resetTimer();
|
||||||
|
sound->stopMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
run(1);
|
//user.save();
|
||||||
|
|
||||||
resetTimer();
|
|
||||||
|
|
||||||
if (fade)
|
|
||||||
sound->stopMusic();
|
|
||||||
|
|
||||||
user.save();
|
|
||||||
|
|
||||||
if (mod.isActive())
|
if (mod.isActive())
|
||||||
{
|
{
|
||||||
|
|
|
@ -167,7 +167,7 @@ public:
|
||||||
|
|
||||||
void action(int id, int state, int source, InputDevice device);
|
void action(int id, int state, int source, InputDevice device);
|
||||||
|
|
||||||
void title(bool fadeMusic=true);
|
void title(bool fadeMusic);
|
||||||
|
|
||||||
void cutsceneEffects(bool on);
|
void cutsceneEffects(bool on);
|
||||||
|
|
||||||
|
|
|
@ -3203,7 +3203,7 @@ void InGameMenu::onExitCheckYes()
|
||||||
{
|
{
|
||||||
dsq->sound->stopAllVoice();
|
dsq->sound->stopAllVoice();
|
||||||
dsq->toggleCursor(0, 0.25);
|
dsq->toggleCursor(0, 0.25);
|
||||||
dsq->title();
|
dsq->title(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InGameMenu::onExitCheckNo()
|
void InGameMenu::onExitCheckNo()
|
||||||
|
|
|
@ -83,7 +83,7 @@ void Intro::endIntro()
|
||||||
|
|
||||||
dsq->setCutscene(0);
|
dsq->setCutscene(0);
|
||||||
|
|
||||||
dsq->title();
|
dsq->title(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Intro::waitQuit(float t)
|
bool Intro::waitQuit(float t)
|
||||||
|
|
|
@ -106,7 +106,7 @@ bool Mod::loadSavedGame(const std::string& path)
|
||||||
|
|
||||||
debugLog("MOD: loadSavedGame/compatScript failed");
|
debugLog("MOD: loadSavedGame/compatScript failed");
|
||||||
setActive(false);
|
setActive(false);
|
||||||
dsq->title();
|
dsq->title(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,13 +226,21 @@ void Mod::applyStart()
|
||||||
dsq->continuity.reset();
|
dsq->continuity.reset();
|
||||||
dsq->scriptInterface.reset();
|
dsq->scriptInterface.reset();
|
||||||
|
|
||||||
|
if(!tryStart())
|
||||||
|
{
|
||||||
|
setActive(false);
|
||||||
|
dsq->title(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Mod::tryStart()
|
||||||
|
{
|
||||||
|
|
||||||
// Before loading init.lua, load a compatibility layer, if necessary
|
// Before loading init.lua, load a compatibility layer, if necessary
|
||||||
if(!loadCompatScript())
|
if(!loadCompatScript())
|
||||||
{
|
{
|
||||||
debugLog("MOD: compatScript failed");
|
debugLog("MOD: compatScript failed");
|
||||||
setActive(false);
|
return false;
|
||||||
dsq->title();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the mod-init.lua file
|
// load the mod-init.lua file
|
||||||
|
@ -243,17 +251,12 @@ void Mod::applyStart()
|
||||||
if (!dsq->runScript(scriptPath, "init"))
|
if (!dsq->runScript(scriptPath, "init"))
|
||||||
{
|
{
|
||||||
debugLog("MOD: runscript failed");
|
debugLog("MOD: runscript failed");
|
||||||
setActive(false);
|
return false;
|
||||||
dsq->title();
|
|
||||||
}
|
}
|
||||||
if (isActive() && game->sceneToLoad.empty())
|
if (isActive() && game->sceneToLoad.empty())
|
||||||
{
|
{
|
||||||
debugLog("MOD: no scene loaded in mod-init");
|
debugLog("MOD: no scene loaded in mod-init");
|
||||||
setActive(false);
|
return false;
|
||||||
dsq->title();
|
|
||||||
}
|
|
||||||
else if (isActive())
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ protected:
|
||||||
int debugMenu;
|
int debugMenu;
|
||||||
int enqueueModStart;
|
int enqueueModStart;
|
||||||
void applyStart();
|
void applyStart();
|
||||||
|
bool tryStart();
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string path;
|
std::string path;
|
||||||
|
|
|
@ -122,7 +122,7 @@ void ParticleEditor::goToTitle()
|
||||||
if (!dsq->returnToScene.empty())
|
if (!dsq->returnToScene.empty())
|
||||||
game->transitionToScene(dsq->returnToScene);
|
game->transitionToScene(dsq->returnToScene);
|
||||||
else
|
else
|
||||||
dsq->title();
|
dsq->title(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticleEditor::load()
|
void ParticleEditor::load()
|
||||||
|
|
|
@ -3877,7 +3877,7 @@ luaFunc(jumpState)
|
||||||
|
|
||||||
luaFunc(goToTitle)
|
luaFunc(goToTitle)
|
||||||
{
|
{
|
||||||
dsq->title();
|
dsq->title(true);
|
||||||
luaReturnNil();
|
luaReturnNil();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ void GameOver::applyState()
|
||||||
game->transitionToScene(game->sceneToLoad);
|
game->transitionToScene(game->sceneToLoad);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dsq->title();
|
dsq->title(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameOver::removeState()
|
void GameOver::removeState()
|
||||||
|
@ -252,7 +252,7 @@ void GameOver::removeState()
|
||||||
void GameOver::onClick()
|
void GameOver::onClick()
|
||||||
{
|
{
|
||||||
if (timer == 0)
|
if (timer == 0)
|
||||||
dsq->title();
|
dsq->title(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameOver::update(float dt)
|
void GameOver::update(float dt)
|
||||||
|
@ -426,7 +426,7 @@ void Nag::onExit()
|
||||||
switch (dsq->nagType)
|
switch (dsq->nagType)
|
||||||
{
|
{
|
||||||
case NAG_TOTITLE:
|
case NAG_TOTITLE:
|
||||||
dsq->title();
|
dsq->title(true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case NAG_QUIT:
|
case NAG_QUIT:
|
||||||
|
|
Loading…
Add table
Reference in a new issue