mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
BURIED: Implement the trial version's auto-recall
This commit is contained in:
1 parent
e05089621a
commit
18a7b010be
6 files changed
+56
No files matched your search
@@ -3776,6 +3776,10 @@ bool SceneViewWindow::checkCustomSpaceStationAICommentDependencies(const Locatio
|
||||
}
|
||||
|
||||
SceneBase *SceneViewWindow::constructAILabSceneObject(Window *viewWindow, const LocationStaticData &sceneStaticData, const Location &priorLocation) {
|
||||
// Special scene for the trial version
|
||||
if (_vm->isTrial())
|
||||
return new TrialRecallScene(_vm, viewWindow, sceneStaticData, priorLocation);
|
||||
|
||||
switch (sceneStaticData.classID) {
|
||||
case 0:
|
||||
// Default scene
|
||||
|
||||
@@ -1115,6 +1115,10 @@ bool SceneViewWindow::checkCustomCastleAICommentDependencies(const Location &com
|
||||
}
|
||||
|
||||
SceneBase *SceneViewWindow::constructCastleSceneObject(Window *viewWindow, const LocationStaticData &sceneStaticData, const Location &priorLocation) {
|
||||
// Special scene for the trial version
|
||||
if (_vm->isTrial())
|
||||
return new TrialRecallScene(_vm, viewWindow, sceneStaticData, priorLocation);
|
||||
|
||||
switch (sceneStaticData.classID) {
|
||||
case 0:
|
||||
// Default scene
|
||||
|
||||
@@ -2582,6 +2582,10 @@ bool SceneViewWindow::checkCustomDaVinciAICommentDependencies(const Location &co
|
||||
}
|
||||
|
||||
SceneBase *SceneViewWindow::constructDaVinciSceneObject(Window *viewWindow, const LocationStaticData &sceneStaticData, const Location &priorLocation) {
|
||||
// Special scene for the trial version
|
||||
if (_vm->isTrial())
|
||||
return new TrialRecallScene(_vm, viewWindow, sceneStaticData, priorLocation);
|
||||
|
||||
switch (sceneStaticData.classID) {
|
||||
case 0:
|
||||
// Default scene
|
||||
|
||||
@@ -2351,6 +2351,10 @@ bool SceneViewWindow::checkCustomMayanAICommentDependencies(const Location &comm
|
||||
}
|
||||
|
||||
SceneBase *SceneViewWindow::constructMayanSceneObject(Window *viewWindow, const LocationStaticData &sceneStaticData, const Location &priorLocation) {
|
||||
// Special scene for the trial version
|
||||
if (_vm->isTrial())
|
||||
return new TrialRecallScene(_vm, viewWindow, sceneStaticData, priorLocation);
|
||||
|
||||
switch (sceneStaticData.classID) {
|
||||
case 0:
|
||||
// Default scene
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "buried/gameui.h"
|
||||
#include "buried/graphics.h"
|
||||
#include "buried/inventory_window.h"
|
||||
#include "buried/message.h"
|
||||
#include "buried/navarrow.h"
|
||||
#include "buried/resources.h"
|
||||
#include "buried/sound.h"
|
||||
@@ -35,6 +36,7 @@
|
||||
#include "buried/environ/scene_common.h"
|
||||
|
||||
#include "common/stream.h"
|
||||
#include "common/system.h"
|
||||
#include "graphics/surface.h"
|
||||
|
||||
namespace Buried {
|
||||
@@ -1276,4 +1278,36 @@ int ClickPlaySoundSynchronous::specifyCursor(Window *viewWindow, const Common::P
|
||||
return kCursorArrow;
|
||||
}
|
||||
|
||||
TrialRecallScene::TrialRecallScene(BuriedEngine *vm, Window *viewWindow, const LocationStaticData &sceneStaticData, const Location &priorLocation) :
|
||||
SceneBase(vm, viewWindow, sceneStaticData, priorLocation) {
|
||||
// Disable all movement
|
||||
_staticData.destUp.destinationScene = Location(-1, -1, -1, -1, -1, -1);
|
||||
_staticData.destLeft.destinationScene = Location(-1, -1, -1, -1, -1, -1);
|
||||
_staticData.destRight.destinationScene = Location(-1, -1, -1, -1, -1, -1);
|
||||
_staticData.destDown.destinationScene = Location(-1, -1, -1, -1, -1, -1);
|
||||
_staticData.destForward.destinationScene = Location(-1, -1, -1, -1, -1, -1);
|
||||
}
|
||||
|
||||
int TrialRecallScene::postEnterRoom(Window *viewWindow, const Location &priorLocation) {
|
||||
// Display the message
|
||||
static const char *const message =
|
||||
"This timezone is not available in this Trial Version. "
|
||||
"Call (800) 943-3664 to purchase the complete version of Buried in Time.\n"
|
||||
"Initiating Auto-Recall to Future Apartment...";
|
||||
((SceneViewWindow *)viewWindow)->displayLiveText(message, false);
|
||||
|
||||
// Wait about 10 seconds
|
||||
Cursor oldCursor = _vm->_gfx->setCursor(kCursorWait);
|
||||
uint32 start = g_system->getMillis();
|
||||
while (g_system->getMillis() - start < 10000)
|
||||
_vm->yield();
|
||||
_vm->_gfx->setCursor(oldCursor);
|
||||
|
||||
// Force a recall
|
||||
((GameUIWindow *)viewWindow->getParent())->_bioChipRightWindow->changeCurrentBioChip(kItemBioChipJump);
|
||||
((GameUIWindow *)viewWindow->getParent())->_bioChipRightWindow->sendMessage(new LButtonUpMessage(Common::Point(50, 150), 0));
|
||||
|
||||
return SC_TRUE;
|
||||
}
|
||||
|
||||
} // End of namespace Buried
|
||||
@@ -408,6 +408,12 @@ private:
|
||||
int _flagOffset;
|
||||
};
|
||||
|
||||
class TrialRecallScene : public SceneBase {
|
||||
public:
|
||||
TrialRecallScene(BuriedEngine *vm, Window *viewWindow, const LocationStaticData &sceneStaticData, const Location &priorLocation);
|
||||
int postEnterRoom(Window *viewWindow, const Location &priorLocation);
|
||||
};
|
||||
|
||||
} // End of namespace Buried
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user