mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-26 02:07:26 +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_text = 0;
|
||||||
cutscene_text2 = 0;
|
cutscene_text2 = 0;
|
||||||
|
|
||||||
doScreenTrans = false;
|
|
||||||
|
|
||||||
cutscenePaused = false;
|
cutscenePaused = false;
|
||||||
inCutscene = false;
|
inCutscene = false;
|
||||||
_canSkipCutscene = false;
|
_canSkipCutscene = false;
|
||||||
|
@ -2227,7 +2225,7 @@ void DSQ::doLoadMenu()
|
||||||
if (selectedSaveSlot != 0)
|
if (selectedSaveSlot != 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
dsq->doScreenTrans = true;
|
game->doScreenTrans = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -327,8 +327,6 @@ public:
|
||||||
static void loadModsCallback(const std::string &filename, void *param);
|
static void loadModsCallback(const std::string &filename, void *param);
|
||||||
static void loadModPackagesCallback(const std::string &filename, void *param);
|
static void loadModPackagesCallback(const std::string &filename, void *param);
|
||||||
|
|
||||||
bool doScreenTrans;
|
|
||||||
|
|
||||||
AquariaSaveSlot *selectedSaveSlot;
|
AquariaSaveSlot *selectedSaveSlot;
|
||||||
void setStory();
|
void setStory();
|
||||||
|
|
||||||
|
|
|
@ -226,6 +226,8 @@ Game::Game() : StateObject()
|
||||||
worldPaused = false;
|
worldPaused = false;
|
||||||
|
|
||||||
cookingScript = 0;
|
cookingScript = 0;
|
||||||
|
doScreenTrans = false;
|
||||||
|
noSceneTransitionFadeout = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Game::~Game()
|
Game::~Game()
|
||||||
|
@ -3223,7 +3225,7 @@ void Game::applyState()
|
||||||
else
|
else
|
||||||
dsq->runScript("scripts/maps/map_"+sceneName+".lua", "init", true);
|
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");
|
if (verbose) debugLog("fading in");
|
||||||
debugLog("FADEIN");
|
debugLog("FADEIN");
|
||||||
|
@ -3237,12 +3239,12 @@ void Game::applyState()
|
||||||
core->resetTimer();
|
core->resetTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dsq->doScreenTrans)
|
if (doScreenTrans)
|
||||||
{
|
{
|
||||||
debugLog("SCREENTRANS!");
|
debugLog("SCREENTRANS!");
|
||||||
core->resetTimer();
|
core->resetTimer();
|
||||||
dsq->toggleCursor(false, 0);
|
dsq->toggleCursor(false, 0);
|
||||||
dsq->doScreenTrans = false;
|
doScreenTrans = false;
|
||||||
|
|
||||||
dsq->transitionSaveSlots();
|
dsq->transitionSaveSlots();
|
||||||
dsq->overlay->alpha = 0;
|
dsq->overlay->alpha = 0;
|
||||||
|
@ -3257,7 +3259,7 @@ void Game::applyState()
|
||||||
|
|
||||||
applyingState = false;
|
applyingState = false;
|
||||||
|
|
||||||
if (!dsq->doScreenTrans)
|
if (!doScreenTrans)
|
||||||
{
|
{
|
||||||
dsq->toggleCursor(true, 0.5);
|
dsq->toggleCursor(true, 0.5);
|
||||||
}
|
}
|
||||||
|
@ -5041,10 +5043,14 @@ void Game::removeState()
|
||||||
|
|
||||||
controlHint_ignoreClear = false;
|
controlHint_ignoreClear = false;
|
||||||
clearControlHint();
|
clearControlHint();
|
||||||
|
if(noSceneTransitionFadeout)
|
||||||
|
noSceneTransitionFadeout = false;
|
||||||
|
else
|
||||||
|
{
|
||||||
dsq->overlay->color = 0;
|
dsq->overlay->color = 0;
|
||||||
|
|
||||||
dsq->overlay->alpha.interpolateTo(1, fadeTime);
|
dsq->overlay->alpha.interpolateTo(1, fadeTime);
|
||||||
dsq->run(fadeTime);
|
dsq->run(fadeTime);
|
||||||
|
}
|
||||||
|
|
||||||
dsq->rumble(0,0,0,-1, INPUT_JOYSTICK);
|
dsq->rumble(0,0,0,-1, INPUT_JOYSTICK);
|
||||||
|
|
||||||
|
|
|
@ -349,6 +349,8 @@ public:
|
||||||
int worldMapIndex;
|
int worldMapIndex;
|
||||||
|
|
||||||
bool loadingScene;
|
bool loadingScene;
|
||||||
|
bool doScreenTrans;
|
||||||
|
bool noSceneTransitionFadeout;
|
||||||
|
|
||||||
WaterSurfaceRender *waterSurfaceRender;
|
WaterSurfaceRender *waterSurfaceRender;
|
||||||
|
|
||||||
|
|
|
@ -1815,12 +1815,16 @@ void SceneEditor::loadSceneByName()
|
||||||
{
|
{
|
||||||
std::string s = dsq->getUserInputString("Enter Name of Map to Load");
|
std::string s = dsq->getUserInputString("Enter Name of Map to Load");
|
||||||
if (!s.empty())
|
if (!s.empty())
|
||||||
|
{
|
||||||
|
dsq->game->noSceneTransitionFadeout = true;
|
||||||
dsq->game->transitionToScene(s);
|
dsq->game->transitionToScene(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneEditor::reloadScene()
|
void SceneEditor::reloadScene()
|
||||||
{
|
{
|
||||||
debugLog("reloadScene");
|
debugLog("reloadScene");
|
||||||
|
dsq->game->noSceneTransitionFadeout = true;
|
||||||
dsq->game->positionToAvatar = dsq->game->avatar->position;
|
dsq->game->positionToAvatar = dsq->game->avatar->position;
|
||||||
dsq->game->transitionToScene(dsq->game->sceneName);
|
dsq->game->transitionToScene(dsq->game->sceneName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue