Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c47554
commit 14ccd4f
Showing
6 changed files
with
302 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
/* ScummVM - Graphic Adventure Engine | ||
* | ||
* ScummVM is the legal property of its developers, whose names | ||
* are too numerous to list here. Please refer to the COPYRIGHT | ||
* file distributed with this source distribution. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
*/ | ||
|
||
#include "tsage/scenes.h" | ||
#include "tsage/tsage.h" | ||
#include "tsage/staticres.h" | ||
#include "tsage/ringworld2/ringworld2_scenes3.h" | ||
|
||
namespace TsAGE { | ||
|
||
namespace Ringworld2 { | ||
|
||
/*-------------------------------------------------------------------------- | ||
* Scene 3100 - | ||
* | ||
*--------------------------------------------------------------------------*/ | ||
Scene3100::Scene3100() { | ||
_field412 = 0; | ||
} | ||
|
||
void Scene3100::synchronize(Serializer &s) { | ||
SceneExt::synchronize(s); | ||
|
||
s.syncAsSint16LE(_field412); | ||
} | ||
|
||
bool Scene3100::Actor6::startAction(CursorType action, Event &event) { | ||
if (action != CURSOR_TALK) | ||
return SceneActor::startAction(action, event); | ||
|
||
Scene3100 *scene = (Scene3100 *)R2_GLOBALS._sceneManager._scene; | ||
|
||
R2_GLOBALS._player.disableControl(); | ||
scene->_sceneMode = 10; | ||
R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS); | ||
scene->_stripManager.start(606, scene); | ||
return true; | ||
} | ||
|
||
void Scene3100::postInit(SceneObjectList *OwnerList) { | ||
if (R2_GLOBALS._sceneManager._previousScene == 1000) { | ||
if (R2_GLOBALS._player._oldCharacterScene[1] == 3100) { | ||
loadScene(3101); | ||
R2_GLOBALS._v58CE2 = 0; | ||
} else { | ||
loadScene(3100); | ||
g_globals->gfxManager()._bounds.moveTo(Common::Point(160, 0)); | ||
} | ||
} else { | ||
loadScene(3100); | ||
} | ||
// Original was doing it twice in a row. Skipped. | ||
|
||
if (R2_GLOBALS._sceneManager._previousScene == 3255) | ||
R2_GLOBALS._v58CE2 = 0; | ||
|
||
SceneExt::postInit(); | ||
_stripManager.addSpeaker(&_guardSpeaker); | ||
|
||
if (R2_GLOBALS._sceneManager._previousScene == -1) | ||
R2_GLOBALS._sceneManager._previousScene = 1000; | ||
|
||
R2_GLOBALS._player.postInit(); | ||
R2_GLOBALS._player._characterIndex = R2_QUINN; | ||
R2_GLOBALS._player.disableControl(); | ||
|
||
_actor1.postInit(); | ||
_item2.setDetails(Rect(212, 97, 320, 114), 3100, 3, -1, -1, 1, NULL); | ||
_item1.setDetails(Rect(0, 0, 480, 200), 3100, 0, -1, -1, 1, NULL); | ||
_field412 = 0; | ||
|
||
if (R2_GLOBALS._sceneManager._previousScene == 1000) { | ||
if (R2_GLOBALS._player._oldCharacterScene[1] == 3100) { | ||
_sceneMode = 3102; | ||
_actor3.postInit(); | ||
_actor4.postInit(); | ||
_actor5.postInit(); | ||
R2_GLOBALS._sound1.play(274); | ||
_sound1.fadeSound(130); | ||
setAction(&_sequenceManager, this, 3102, &_actor1, &R2_GLOBALS._player, &_actor3, &_actor4, &_actor5, NULL); | ||
} else { | ||
_actor6.postInit(); | ||
_actor6.setup(3110, 5, 1); | ||
_actor6.changeZoom(50); | ||
_actor6.setPosition(Common::Point(10, 149)); | ||
_actor6.setDetails(3100, 6, -1, -1, 2, NULL); | ||
|
||
_actor4.postInit(); | ||
_actor4.setup(3103, 1, 1); | ||
_actor4.setPosition(Common::Point(278, 113)); | ||
_actor4.setDetails(3100, 9, -1, -1, 2, NULL); | ||
_actor4.animate(ANIM_MODE_2, NULL); | ||
|
||
_field412 = 1; | ||
_actor1.setDetails(3100, 3, -1, -1, 2, NULL); | ||
R2_GLOBALS._sound1.play(243); | ||
R2_GLOBALS._sound2.play(130); | ||
_sceneMode = 3100; | ||
|
||
setAction(&_sequenceManager, this, 3100, &R2_GLOBALS._player, &_actor1, NULL); | ||
} | ||
} else if (R2_GLOBALS._sceneManager._previousScene == 3255) { | ||
_sceneMode = 3101; | ||
_actor2.postInit(); | ||
_actor3.postInit(); | ||
_field412 = 1; | ||
|
||
setAction(&_sequenceManager, this, 3101, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor3, NULL); | ||
} else { | ||
_actor6.postInit(); | ||
_actor6.setup(3110, 5, 1); | ||
_actor6.changeZoom(50); | ||
_actor6.setPosition(Common::Point(10, 149)); | ||
_actor6.setDetails(3100, 6, -1, -1, 2, NULL); | ||
|
||
_actor4.postInit(); | ||
_actor4.setup(3103, 1, 1); | ||
_actor4.setPosition(Common::Point(278, 113)); | ||
_actor4.setDetails(3100, 9, -1, -1, 2, NULL); | ||
_actor4.animate(ANIM_MODE_2, NULL); | ||
|
||
_actor1.postInit(); | ||
_actor1.setup(3104, 4, 1); | ||
_actor1.setPosition(Common::Point(143, 104)); | ||
_actor1.setDetails(3100, 3, -1, -1, 2, NULL); | ||
|
||
R2_GLOBALS._player.setup(3110, 3, 1); | ||
R2_GLOBALS._player.changeZoom(50); | ||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL); | ||
R2_GLOBALS._player.setPosition(Common::Point(160, 150)); | ||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2); | ||
R2_GLOBALS._player.enableControl(CURSOR_ARROW); | ||
|
||
R2_GLOBALS._sound1.play(243); | ||
} | ||
|
||
R2_GLOBALS._player._oldCharacterScene[1] = 3100; | ||
} | ||
|
||
void Scene3100::remove() { | ||
R2_GLOBALS._scrollFollower = &R2_GLOBALS._player; | ||
R2_GLOBALS._sound1.fadeOut2(NULL); | ||
R2_GLOBALS._sound2.fadeOut2(NULL); | ||
_sound1.fadeOut2(NULL); | ||
SceneExt::remove(); | ||
} | ||
|
||
void Scene3100::signal() { | ||
switch (_sceneMode) { | ||
case 10: | ||
warning("TODO: Unknown cursor used (6/-6)"); | ||
R2_GLOBALS._player.enableControl(); | ||
break; | ||
case 3100: | ||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2); | ||
R2_GLOBALS._scrollFollower = &R2_GLOBALS._player; | ||
R2_GLOBALS._player.enableControl(CURSOR_ARROW); | ||
break; | ||
case 3101: | ||
R2_GLOBALS._sceneManager.changeScene(1000); | ||
break; | ||
case 3102: | ||
R2_GLOBALS._player._oldCharacterScene[1] = 1000; | ||
R2_GLOBALS._sceneManager.changeScene(1000); | ||
break; | ||
default: | ||
R2_GLOBALS._player.enableControl(CURSOR_ARROW); | ||
break; | ||
} | ||
} | ||
|
||
void Scene3100::dispatch() { | ||
if ((_sceneMode == 3100) && (_field412 != 0) && (R2_GLOBALS._player._position.y == 104)) { | ||
_field412 = 0; | ||
R2_GLOBALS._sound2.fadeOut2(NULL); | ||
} | ||
|
||
if ((_sceneMode == 3101) && (_field412 != 0) && (R2_GLOBALS._player._position.y < 104)) { | ||
_field412 = 0; | ||
_sound1.fadeSound(130); | ||
} | ||
|
||
Scene::dispatch(); | ||
} | ||
|
||
} // End of namespace Ringworld2 | ||
} // End of namespace TsAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* ScummVM - Graphic Adventure Engine | ||
* | ||
* ScummVM is the legal property of its developers, whose names | ||
* are too numerous to list here. Please refer to the COPYRIGHT | ||
* file distributed with this source distribution. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
*/ | ||
|
||
#ifndef TSAGE_RINGWORLD2_SCENES3_H | ||
#define TSAGE_RINGWORLD2_SCENES3_H | ||
|
||
#include "common/scummsys.h" | ||
#include "tsage/converse.h" | ||
#include "tsage/events.h" | ||
#include "tsage/core.h" | ||
#include "tsage/scenes.h" | ||
#include "tsage/globals.h" | ||
#include "tsage/sound.h" | ||
#include "tsage/ringworld2/ringworld2_logic.h" | ||
#include "tsage/ringworld2/ringworld2_speakers.h" | ||
|
||
namespace TsAGE { | ||
|
||
namespace Ringworld2 { | ||
|
||
using namespace TsAGE; | ||
|
||
|
||
class Scene3100 : public SceneExt { | ||
class Actor6 : public SceneActor { | ||
virtual bool startAction(CursorType action, Event &event); | ||
}; | ||
public: | ||
|
||
int _field412; | ||
SpeakerGuard3100 _guardSpeaker; | ||
NamedHotspot _item1; | ||
NamedHotspot _item2; | ||
SceneActor _actor1; | ||
SceneActor _actor2; | ||
SceneActor _actor3; | ||
SceneActor _actor4; | ||
SceneActor _actor5; | ||
Actor6 _actor6; | ||
ASoundExt _sound1; | ||
SequenceManager _sequenceManager; | ||
|
||
Scene3100(); | ||
virtual void postInit(SceneObjectList *OwnerList = NULL); | ||
virtual void remove(); | ||
virtual void signal(); | ||
virtual void dispatch(); | ||
virtual void synchronize(Serializer &s); | ||
}; | ||
|
||
} // End of namespace Ringworld2 | ||
} // End of namespace TsAGE | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters