TSAGE: R2R - Intro(?) (50): partial implementation.

Some missing core functions still have to be implemented.
This commit is contained in:
Strangerke 2011-11-08 23:41:09 +01:00
parent 001f7d6403
commit 58b082bcb1
5 changed files with 60 additions and 1 deletions

View File

@ -376,6 +376,7 @@ void Ringworld2Globals::reset() {
_v5657C = 0;
_v565F5 = 0;
_v57C2C = 0;
_v58CE2 = 0;
Common::set_to(&_v565F1[0], &_v565F1[MAX_CHARACTERS], 0);
_player._characterIndex = 1;
@ -390,6 +391,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
s.syncAsSint16LE(_v5657C);
s.syncAsSint16LE(_v565F5);
s.syncAsSint16LE(_v57C2C);
s.syncAsSint16LE(_v58CE2);
for (int i = 0; i < MAX_CHARACTERS; ++i)
s.syncAsSint16LE(_v565F1[i]);
}

View File

@ -247,6 +247,7 @@ public:
int _v565F5;
int _v5657C;
int _v57C2C;
int _v58CE2;
int _v565F1[4];
virtual void reset();

View File

@ -36,7 +36,7 @@ Scene *Ringworld2Game::createScene(int sceneNumber) {
switch (sceneNumber) {
/* Scene group #0 */
//
case 50: error("Scene number %d - Not yet implemented", sceneNumber);
case 50: return new Scene50();
// Quinn's room
case 100: return new Scene100();
// Computer console

View File

@ -29,6 +29,48 @@ namespace TsAGE {
namespace Ringworld2 {
void Scene50::Action1::signal() {
switch (_actionIndex++) {
case 0:
setDelay(2);
break;
case 1:
setDelay(180);
break;
case 2:
R2_GLOBALS._sceneManager.changeScene(100);
break;
default:
break;
}
}
void Scene50::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit(OwnerList);
loadScene(110);
R2_GLOBALS._v58CE2 = 0;
R2_GLOBALS._scenePalette.loadPalette(0);
R2_GLOBALS._sound2.play(10);
R2_GLOBALS._player.disableControl();
setAction(&_action1);
}
void Scene50::process(Event &event) {
if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == 27)) {
event.handled = true;
warning("TODO: incomplete Scene50::process()");
// CursorType _oldCursorId = _cursorId;
g_globals->_events.setCursor(R2_2);
// _cursorManager.sub_1D474(2, 0);
// sub_5566A(1);
// _cursorManager._fieldE = _oldCursorId;
R2_GLOBALS._sceneManager.changeScene(100);
}
}
/*--------------------------------------------------------------------------
* Scene 100 - Quinn's Room
*

View File

@ -38,6 +38,20 @@ namespace Ringworld2 {
using namespace TsAGE;
class Scene50: public SceneExt {
class Action1: public Action {
public:
void signal();
};
public:
Action1 _action1;
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void process(Event &event);
};
class Scene100: public SceneExt {
/* Objects */
class Door: public SceneActorExt {