Command *Command::opFadeScene(Script *script, bool fadeOut, int32 fadeDuration, bool pause) { Current *current = StarkGlobal->getCurrent(); Location *location = current->getLocation(); if (fadeOut) { location->fadeOutInit(fadeDuration); } else { location->fadeInInit(fadeDuration); } if (pause) { script->pause(fadeDuration); return this; // Stay on this command while the script is suspended } else { return nextCommand(); } }