[Scummvm-cvs-logs] scummvm master -> 887d56d9ca9cc488c8793321da0685bee5f2206a
dreammaster
dreammaster at scummvm.org
Sun Dec 11 08:01:46 CET 2011
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d315521c67 TSAGE: Added loading of conversation data that will be needed for R2R
518d4cd429 TSAGE: Changed the Player characterIndex int field to be a proper enum
887d56d9ca TSAGE: add missing hotspot code for Miranda in R2R Scene 300
Commit: d315521c67df814e88c28cbb2914f1b075349fa0
https://github.com/scummvm/scummvm/commit/d315521c67df814e88c28cbb2914f1b075349fa0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-10T22:41:44-08:00
Commit Message:
TSAGE: Added loading of conversation data that will be needed for R2R
Changed paths:
engines/tsage/converse.cpp
engines/tsage/converse.h
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index b98f6f6..0337774 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -531,29 +531,51 @@ void ConversationChoiceDialog::draw() {
/*--------------------------------------------------------------------------*/
void Obj44::load(const byte *dataP) {
- _id = READ_LE_UINT16(dataP);
+ Common::MemoryReadStream s(dataP, (g_vm->getGameID() == GType_Ringworld2) ? 126 : 68);
+
+ if (g_vm->getGameID() == GType_Ringworld2) {
+ _mode = s.readSint16LE();
+ s.readSint16LE();
+ _field4 = s.readSint16LE();
+ _field6 = s.readSint16LE();
+ _field8 = s.readSint16LE();
+ }
+
+ _id = s.readSint16LE();
for (int idx = 0; idx < OBJ44_LIST_SIZE; ++idx)
- _field2[idx] = READ_LE_UINT16(dataP + 2 + idx * 2);
+ _callbackId[idx] = s.readSint16LE();
+
+ if (g_vm->getGameID() == GType_Ringworld2) {
+ _field16 = s.readSint16LE();
+ s.skip(20);
+ } else {
+ s.skip(4);
+ }
- const byte *listP = dataP + 0x10;
- for (int idx = 0; idx < OBJ44_LIST_SIZE; ++idx, listP += 10) {
- _list[idx]._id = READ_LE_UINT16(listP);
- _list[idx]._scriptOffset = READ_LE_UINT16(listP + 2);
+ for (int idx = 0; idx < OBJ44_LIST_SIZE; ++idx) {
+ _list[idx]._id = s.readSint16LE();
+ _list[idx]._scriptOffset = s.readSint16LE();
+ s.skip(6);
}
- _speakerOffset = READ_LE_UINT16(dataP + 0x42);
+ _speakerOffset = s.readSint16LE();
}
void Obj44::synchronize(Serializer &s) {
s.syncAsSint32LE(_id);
for (int idx = 0; idx < OBJ44_LIST_SIZE; ++idx)
- s.syncAsSint32LE(_field2[idx]);
+ s.syncAsSint32LE(_callbackId[idx]);
for (int idx = 0; idx < OBJ44_LIST_SIZE; ++idx)
_list[idx].synchronize(s);
s.syncAsUint32LE(_speakerOffset);
- if (g_vm->getGameID() == GType_Ringworld2)
+ if (g_vm->getGameID() == GType_Ringworld2) {
s.syncAsSint16LE(_mode);
+ s.syncAsSint16LE(_field4);
+ s.syncAsSint16LE(_field6);
+ s.syncAsSint16LE(_field8);
+ s.syncAsSint16LE(_field16);
+ }
}
/*--------------------------------------------------------------------------*/
@@ -779,10 +801,10 @@ void StripManager::signal() {
if (_callbackObject) {
for (idx = 0; idx < OBJ44_LIST_SIZE; ++idx) {
- if (!obj44._field2[idx])
+ if (!obj44._callbackId[idx])
break;
- _callbackObject->stripCallback(obj44._field2[idx]);
+ _callbackObject->stripCallback(obj44._callbackId[idx]);
}
}
diff --git a/engines/tsage/converse.h b/engines/tsage/converse.h
index db05913..f645e2c 100644
--- a/engines/tsage/converse.h
+++ b/engines/tsage/converse.h
@@ -182,12 +182,14 @@ public:
class Obj44 : public Serialisable {
public:
int _id;
- int _field2[OBJ44_LIST_SIZE];
+ int _callbackId[OBJ44_LIST_SIZE];
Obj0A _list[OBJ44_LIST_SIZE];
uint _speakerOffset;
// Return to Ringworld specific field
int _mode;
+ int _field4, _field6, _field8;
+ int _field16;
public:
void load(const byte *dataP);
virtual void synchronize(Serializer &s);
Commit: 518d4cd429924f145626401c194f42fd76783c03
https://github.com/scummvm/scummvm/commit/518d4cd429924f145626401c194f42fd76783c03
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-10T22:46:58-08:00
Commit Message:
TSAGE: Changed the Player characterIndex int field to be a proper enum
Changed paths:
engines/tsage/core.cpp
engines/tsage/core.h
engines/tsage/globals.cpp
engines/tsage/ringworld2/ringworld2_dialogs.cpp
engines/tsage/ringworld2/ringworld2_scenes0.cpp
engines/tsage/ringworld2/ringworld2_scenes2.cpp
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 88121c4..9d7c8ab 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -2989,7 +2989,7 @@ Player::Player(): SceneObject() {
_field8C = 0;
// Return to Ringworld specific fields
- _characterIndex = 0;
+ _characterIndex = R2_NONE;
for (int i = 0; i < MAX_CHARACTERS; ++i) {
_characterScene[i] = 0;
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index d553523..cbd3d9f 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -621,6 +621,7 @@ public:
};
#define MAX_CHARACTERS 4
+enum R2RCharacter { R2_NONE = 0, R2_QUINN = 1, R2_SEEKER = 2, R2_MIRANDA = 3 };
class Player : public SceneObject {
public:
@@ -630,7 +631,7 @@ public:
bool _enabled;
// Return to Ringworld specific fields
- int _characterIndex;
+ R2RCharacter _characterIndex;
int _characterScene[MAX_CHARACTERS];
int _oldCharacterScene[MAX_CHARACTERS];
Common::Point _characterPos[MAX_CHARACTERS];
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 7f6f71c..9f137f4 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -400,7 +400,7 @@ void Ringworld2Globals::reset() {
_stripManager_lookupList[11] = 1;
// Reset fields stored in the player class
- _player._characterIndex = 1;
+ _player._characterIndex = R2_QUINN;
_player._characterScene[1] = 100;
_player._characterScene[2] = 300;
_player._characterScene[3] = 300;
diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
index 54a15f3..ddb4eae 100644
--- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp
+++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
@@ -218,11 +218,11 @@ void CharacterDialog::show() {
// Figure out the new selected character
if (btn == &dlg->_btnQuinn)
- R2_GLOBALS._player._characterIndex = 1;
+ R2_GLOBALS._player._characterIndex = R2_QUINN;
else if (btn == &dlg->_btnSeeker)
- R2_GLOBALS._player._characterIndex = 2;
+ R2_GLOBALS._player._characterIndex = R2_SEEKER;
else if (btn == &dlg->_btnMiranda)
- R2_GLOBALS._player._characterIndex = 3;
+ R2_GLOBALS._player._characterIndex = R2_MIRANDA;
// Remove the dialog
dlg->remove();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 5ca1785..88dfe11 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -1539,6 +1539,8 @@ bool Scene300::Miranda::startAction(CursorType action, Event &event) {
scene->_field412 = 211;
else
scene->_field412 = 438;
+
+ scene->_stripManager.start3(scene->_field412, scene, R2_GLOBALS._stripManager_lookupList);
}
return true;
@@ -1594,7 +1596,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
if (R2_GLOBALS._sceneManager._previousScene == -1) {
R2_GLOBALS._sceneManager._previousScene = 1000;
- R2_GLOBALS._player._characterIndex = 1;
+ R2_GLOBALS._player._characterIndex = R2_QUINN;
}
_stripManager.setColors(60, 255);
@@ -2002,7 +2004,7 @@ void Scene300::signal() {
break;
case 20:
- R2_GLOBALS._player._characterIndex = 1;
+ R2_GLOBALS._player._characterIndex = R2_QUINN;
R2_GLOBALS._sceneManager.changeScene(1500);
break;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index c83d605..4d8f7aa 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -1393,7 +1393,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) {
loadScene(2425);
SceneExt::postInit();
if (R2_GLOBALS._sceneManager._previousScene == -1) {
- R2_GLOBALS._player._characterIndex = 2;
+ R2_GLOBALS._player._characterIndex = R2_SEEKER;
R2_GLOBALS._sceneManager._previousScene = 2000;
}
Commit: 887d56d9ca9cc488c8793321da0685bee5f2206a
https://github.com/scummvm/scummvm/commit/887d56d9ca9cc488c8793321da0685bee5f2206a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-10T23:00:39-08:00
Commit Message:
TSAGE: add missing hotspot code for Miranda in R2R Scene 300
Changed paths:
engines/tsage/ringworld2/ringworld2_scenes0.cpp
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 88dfe11..9e87ebb 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -1528,7 +1528,39 @@ bool Scene300::Miranda::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_TALK:
if (R2_GLOBALS._player._characterIndex == 1) {
- warning("TODO: talk sequence");
+ R2_GLOBALS._player.disableControl();
+
+ if (!R2_GLOBALS.getFlag(44)) {
+ if (R2_GLOBALS.getFlag(40))
+ scene->_field412 = 119;
+ else if (R2_GLOBALS.getFlag(38))
+ scene->_field412 = 101;
+ else {
+ R2_GLOBALS._sound1.play(69);
+ scene->_field412 = 100;
+ }
+
+ scene->_sceneMode = 309;
+ scene->setAction(&scene->_sequenceManager1, scene, 309, &R2_GLOBALS._player, NULL);
+ } else if (!R2_GLOBALS.getFlag(55)) {
+ R2_GLOBALS._events.setCursor(CURSOR_ARROW);
+ scene->_sceneMode = 10;
+ scene->_stripManager.start3(scene->_field412, scene, R2_GLOBALS._stripManager_lookupList);
+ } else {
+ scene->_sceneMode = 16;
+
+ if (!R2_GLOBALS.getFlag(57)) {
+ R2_GLOBALS._events.setCursor(CURSOR_ARROW);
+ scene->_stripManager.start3(434, scene, R2_GLOBALS._stripManager_lookupList);
+ } else if (R2_GLOBALS._player._characterScene[R2_MIRANDA] != 500) {
+ R2_GLOBALS._events.setCursor(CURSOR_ARROW);
+ scene->_stripManager.start3(407, scene, R2_GLOBALS._stripManager_lookupList);
+ } else {
+ scene->_field412 = 433;
+ scene->_sceneMode = 309;
+ scene->setAction(&scene->_sequenceManager1, scene, 309, &R2_GLOBALS._player, NULL);
+ }
+ }
} else {
scene->_sceneMode = 10;
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
More information about the Scummvm-git-logs
mailing list