mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-24 17:26:41 +00:00
now that textures are no longer the bottleneck, speed up editor map reload
This commit is contained in:
parent
70b8dcdc3a
commit
6dc9dc7e8f
5 changed files with 21 additions and 13 deletions
|
@ -165,8 +165,6 @@ DSQ::DSQ(const std::string& fileSystem, const std::string& extraDataDir)
|
|||
cutscene_text = 0;
|
||||
cutscene_text2 = 0;
|
||||
|
||||
doScreenTrans = false;
|
||||
|
||||
cutscenePaused = false;
|
||||
inCutscene = false;
|
||||
_canSkipCutscene = false;
|
||||
|
@ -2227,7 +2225,7 @@ void DSQ::doLoadMenu()
|
|||
if (selectedSaveSlot != 0)
|
||||
{
|
||||
|
||||
dsq->doScreenTrans = true;
|
||||
game->doScreenTrans = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -327,8 +327,6 @@ public:
|
|||
static void loadModsCallback(const std::string &filename, void *param);
|
||||
static void loadModPackagesCallback(const std::string &filename, void *param);
|
||||
|
||||
bool doScreenTrans;
|
||||
|
||||
AquariaSaveSlot *selectedSaveSlot;
|
||||
void setStory();
|
||||
|
||||
|
|
|
@ -226,6 +226,8 @@ Game::Game() : StateObject()
|
|||
worldPaused = false;
|
||||
|
||||
cookingScript = 0;
|
||||
doScreenTrans = false;
|
||||
noSceneTransitionFadeout = false;
|
||||
}
|
||||
|
||||
Game::~Game()
|
||||
|
@ -3223,7 +3225,7 @@ void Game::applyState()
|
|||
else
|
||||
dsq->runScript("scripts/maps/map_"+sceneName+".lua", "init", true);
|
||||
|
||||
if (!dsq->doScreenTrans && (dsq->overlay->alpha != 0 && !dsq->overlay->alpha.isInterpolating()))
|
||||
if (!doScreenTrans && (dsq->overlay->alpha != 0 && !dsq->overlay->alpha.isInterpolating()))
|
||||
{
|
||||
if (verbose) debugLog("fading in");
|
||||
debugLog("FADEIN");
|
||||
|
@ -3237,12 +3239,12 @@ void Game::applyState()
|
|||
core->resetTimer();
|
||||
}
|
||||
|
||||
if (dsq->doScreenTrans)
|
||||
if (doScreenTrans)
|
||||
{
|
||||
debugLog("SCREENTRANS!");
|
||||
core->resetTimer();
|
||||
dsq->toggleCursor(false, 0);
|
||||
dsq->doScreenTrans = false;
|
||||
doScreenTrans = false;
|
||||
|
||||
dsq->transitionSaveSlots();
|
||||
dsq->overlay->alpha = 0;
|
||||
|
@ -3257,7 +3259,7 @@ void Game::applyState()
|
|||
|
||||
applyingState = false;
|
||||
|
||||
if (!dsq->doScreenTrans)
|
||||
if (!doScreenTrans)
|
||||
{
|
||||
dsq->toggleCursor(true, 0.5);
|
||||
}
|
||||
|
@ -5041,10 +5043,14 @@ void Game::removeState()
|
|||
|
||||
controlHint_ignoreClear = false;
|
||||
clearControlHint();
|
||||
dsq->overlay->color = 0;
|
||||
|
||||
dsq->overlay->alpha.interpolateTo(1, fadeTime);
|
||||
dsq->run(fadeTime);
|
||||
if(noSceneTransitionFadeout)
|
||||
noSceneTransitionFadeout = false;
|
||||
else
|
||||
{
|
||||
dsq->overlay->color = 0;
|
||||
dsq->overlay->alpha.interpolateTo(1, fadeTime);
|
||||
dsq->run(fadeTime);
|
||||
}
|
||||
|
||||
dsq->rumble(0,0,0,-1, INPUT_JOYSTICK);
|
||||
|
||||
|
|
|
@ -349,6 +349,8 @@ public:
|
|||
int worldMapIndex;
|
||||
|
||||
bool loadingScene;
|
||||
bool doScreenTrans;
|
||||
bool noSceneTransitionFadeout;
|
||||
|
||||
WaterSurfaceRender *waterSurfaceRender;
|
||||
|
||||
|
|
|
@ -1815,12 +1815,16 @@ void SceneEditor::loadSceneByName()
|
|||
{
|
||||
std::string s = dsq->getUserInputString("Enter Name of Map to Load");
|
||||
if (!s.empty())
|
||||
{
|
||||
dsq->game->noSceneTransitionFadeout = true;
|
||||
dsq->game->transitionToScene(s);
|
||||
}
|
||||
}
|
||||
|
||||
void SceneEditor::reloadScene()
|
||||
{
|
||||
debugLog("reloadScene");
|
||||
dsq->game->noSceneTransitionFadeout = true;
|
||||
dsq->game->positionToAvatar = dsq->game->avatar->position;
|
||||
dsq->game->transitionToScene(dsq->game->sceneName);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue