mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 15:40:57 +00:00
Merge branch 'master' into wme_rendering
This commit is contained in:
commit
8e58be7a1d
@ -169,7 +169,7 @@ protected:
|
||||
PluginType _type;
|
||||
|
||||
public:
|
||||
Plugin() : _pluginObject(0) {}
|
||||
Plugin() : _pluginObject(0), _type(PLUGIN_TYPE_MAX) {}
|
||||
virtual ~Plugin() {
|
||||
//if (isLoaded())
|
||||
//unloadPlugin();
|
||||
|
@ -371,12 +371,14 @@ bool DecompressorDCL::unpack(ReadStream *src, byte *dest, uint32 nPacked, uint32
|
||||
debug(8, "\nCOPY(%d from %d)\n", val_length, val_distance);
|
||||
|
||||
if (val_length + _dwWrote > _szUnpacked) {
|
||||
warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes", val_length);
|
||||
warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes (declared unpacked size is %d bytes, current is %d + %d bytes)",
|
||||
val_length, _szUnpacked, _dwWrote, val_length);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_dwWrote < val_distance) {
|
||||
warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream");
|
||||
warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream (declared unpacked size is %d bytes, current is %d bytes)",
|
||||
_szUnpacked, _dwWrote);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,10 @@
|
||||
#ifndef COMMON_SCUMMSYS_H
|
||||
#define COMMON_SCUMMSYS_H
|
||||
|
||||
#ifndef __has_feature // Optional of course.
|
||||
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
|
||||
#endif
|
||||
|
||||
// This is a convenience macro to test whether the compiler used is a GCC
|
||||
// version, which is at least major.minor.
|
||||
#define GCC_ATLEAST(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
|
||||
|
4
configure
vendored
4
configure
vendored
@ -3410,10 +3410,10 @@ int main(void) {
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
cc_check $PNG_CFLAGS $PNG_LIBS -lpng && _png=yes
|
||||
cc_check $PNG_CFLAGS $PNG_LIBS -lpng -lz && _png=yes
|
||||
fi
|
||||
if test "$_png" = yes ; then
|
||||
LIBS="$LIBS $PNG_LIBS -lpng"
|
||||
LIBS="$LIBS $PNG_LIBS -lpng -lz"
|
||||
INCLUDES="$INCLUDES $PNG_CFLAGS"
|
||||
fi
|
||||
define_in_config_if_yes "$_png" 'USE_PNG'
|
||||
|
@ -20,6 +20,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __has_feature // Optional of course.
|
||||
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
|
@ -33,10 +33,6 @@
|
||||
#undef main
|
||||
#endif // main
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "common/endian.h"
|
||||
#include "create_mortdat.h"
|
||||
#include "enginetext.h"
|
||||
|
@ -30,8 +30,8 @@
|
||||
#undef main
|
||||
#endif // main
|
||||
|
||||
#include <vector>
|
||||
#include "create_neverhood.h"
|
||||
#include <vector>
|
||||
#include "md5.h"
|
||||
#include "tables.h"
|
||||
|
||||
|
@ -23,6 +23,10 @@
|
||||
#ifndef TOOLS_CREATE_PROJECT_H
|
||||
#define TOOLS_CREATE_PROJECT_H
|
||||
|
||||
#ifndef __has_feature // Optional of course.
|
||||
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
@ -22,6 +22,8 @@
|
||||
* The generated files is used by ScummVM to propose translation of its GUI.
|
||||
*/
|
||||
|
||||
#include "create_translations.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -34,7 +36,6 @@
|
||||
#undef main
|
||||
#endif // main
|
||||
|
||||
#include "create_translations.h"
|
||||
#include "po_parser.h"
|
||||
#include "cp_parser.h"
|
||||
|
||||
|
@ -28,4 +28,8 @@ typedef unsigned short uint16;
|
||||
typedef unsigned int uint32;
|
||||
typedef signed short int16;
|
||||
|
||||
#ifndef __has_feature // Optional of course.
|
||||
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
|
||||
#endif
|
||||
|
||||
#endif /* CREATE_TRANSLATIONS_H */
|
||||
|
@ -598,6 +598,7 @@ catalog Humongous Interactive Catalog
|
||||
a56e8d9d4281c53c3f63c9bd22a59e21 10978342 en All HE CUP Preview George Kormendi
|
||||
74da3494fbe1a7d20213b0afe0954755 10841544 fr All HE CUP Preview - George Kormendi
|
||||
4c4820518e16e1a0e3616a3b021a04f3 10927456 de All HE CUP Preview - Kirben
|
||||
288fb75b24389733c29fa107fe8d44e8 10795148 us All HE CUP Preview - Kirben
|
||||
|
||||
airport Let's Explore the Airport with Buzzy
|
||||
d6334a5a9b61afe18c368540fdf522ca -1 en Mac - - - Joachim Eberhard
|
||||
|
@ -48,6 +48,15 @@ namespace Composer {
|
||||
ComposerEngine::ComposerEngine(OSystem *syst, const ComposerGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
|
||||
_rnd = new Common::RandomSource("composer");
|
||||
_audioStream = NULL;
|
||||
_currSoundPriority = 0;
|
||||
_currentTime = 0;
|
||||
_lastTime = 0;
|
||||
_needsUpdate = true;
|
||||
_directoriesToStrip = 1;
|
||||
_mouseVisible = true;
|
||||
_mouseEnabled = false;
|
||||
_mouseSpriteId = 0;
|
||||
_lastButton = NULL;
|
||||
}
|
||||
|
||||
ComposerEngine::~ComposerEngine() {
|
||||
@ -79,12 +88,6 @@ Common::Error ComposerEngine::run() {
|
||||
_queuedScripts[i]._scriptId = 0;
|
||||
}
|
||||
|
||||
_mouseVisible = true;
|
||||
_mouseEnabled = false;
|
||||
_mouseSpriteId = 0;
|
||||
_lastButton = NULL;
|
||||
|
||||
_directoriesToStrip = 1;
|
||||
if (!_bookIni.loadFromFile("book.ini")) {
|
||||
_directoriesToStrip = 0;
|
||||
if (!_bookIni.loadFromFile("programs/book.ini")) {
|
||||
@ -103,7 +106,6 @@ Common::Error ComposerEngine::run() {
|
||||
height = atoi(getStringFromConfig("Common", "Height").c_str());
|
||||
initGraphics(width, height, true);
|
||||
_screen.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
|
||||
_needsUpdate = true;
|
||||
|
||||
Graphics::Cursor *cursor = Graphics::makeDefaultWinCursor();
|
||||
CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(),
|
||||
@ -113,11 +115,12 @@ Common::Error ComposerEngine::run() {
|
||||
|
||||
loadLibrary(0);
|
||||
|
||||
_currentTime = 0;
|
||||
_lastTime = 0;
|
||||
|
||||
uint fps = atoi(getStringFromConfig("Common", "FPS").c_str());
|
||||
uint frameTime = 1000 / fps;
|
||||
uint frameTime = 125; // Default to 125ms (1000/8)
|
||||
if (fps != 0)
|
||||
frameTime = 1000 / fps;
|
||||
else
|
||||
warning("FPS in book.ini is zero. Defaulting to 8...");
|
||||
uint32 lastDrawTime = 0;
|
||||
|
||||
while (!shouldQuit()) {
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "common/list.h"
|
||||
|
||||
#include "fullpipe/objects.h"
|
||||
#include "fullpipe/statics.h"
|
||||
#include "fullpipe/motion.h"
|
||||
#include "fullpipe/messages.h"
|
||||
#include "fullpipe/gameloader.h"
|
||||
@ -50,7 +51,9 @@ bool MctlCompound::load(MfcArchive &file) {
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
debug(6, "CompoundArray[%d]", i);
|
||||
MctlCompoundArrayItem *obj = (MctlCompoundArrayItem *)file.readClass();
|
||||
MctlCompoundArrayItem *obj = new MctlCompoundArrayItem();
|
||||
|
||||
obj->_motionControllerObj = (MotionController *)file.readClass();
|
||||
|
||||
int count1 = file.readUint32LE();
|
||||
|
||||
@ -68,16 +71,15 @@ bool MctlCompound::load(MfcArchive &file) {
|
||||
debug(6, "graphReact");
|
||||
obj->_movGraphReactObj = (MovGraphReact *)file.readClass();
|
||||
|
||||
_motionControllers.push_back(*obj);
|
||||
_motionControllers.push_back(obj);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int MctlCompound::addObject(StaticANIObject *obj) {
|
||||
warning("STUB: MctlCompound::addObject()");
|
||||
|
||||
return 0;
|
||||
void MctlCompound::addObject(StaticANIObject *obj) {
|
||||
for (uint i = 0; i < _motionControllers.size(); i++)
|
||||
_motionControllers[i]->_motionControllerObj->addObject(obj);
|
||||
}
|
||||
|
||||
int MctlCompound::removeObject(StaticANIObject *obj) {
|
||||
@ -87,7 +89,6 @@ int MctlCompound::removeObject(StaticANIObject *obj) {
|
||||
}
|
||||
|
||||
void MctlCompound::initMovGraph2() {
|
||||
#if 0
|
||||
if (_objtype != kObjTypeMctlCompound)
|
||||
return;
|
||||
|
||||
@ -97,10 +98,10 @@ void MctlCompound::initMovGraph2() {
|
||||
|
||||
MovGraph *gr = (MovGraph *)_motionControllers[i]->_motionControllerObj;
|
||||
|
||||
CMovGraph2 *newgr = new MovGraph2();
|
||||
MovGraph2 *newgr = new MovGraph2();
|
||||
|
||||
newgr->_links.push_back(gr->_links);
|
||||
newgr->_nodes.push_back(gr->_nodes);
|
||||
newgr->_links = gr->_links;
|
||||
newgr->_nodes = gr->_nodes;
|
||||
|
||||
gr->_links.clear();
|
||||
gr->_nodes.clear();
|
||||
@ -109,7 +110,6 @@ void MctlCompound::initMovGraph2() {
|
||||
|
||||
_motionControllers[i]->_motionControllerObj = newgr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void MctlCompound::freeItems() {
|
||||
@ -167,14 +167,277 @@ bool MovGraph::load(MfcArchive &file) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int MovGraph::addObject(StaticANIObject *obj) {
|
||||
void MovGraph::addObject(StaticANIObject *obj) {
|
||||
warning("STUB: MovGraph::addObject()");
|
||||
}
|
||||
|
||||
int MovGraph::removeObject(StaticANIObject *obj) {
|
||||
warning("STUB: MovGraph::removeObject()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MovGraph::freeItems() {
|
||||
warning("STUB: MovGraph::freeItems()");
|
||||
}
|
||||
|
||||
int MovGraph::method28() {
|
||||
warning("STUB: MovGraph::method28()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MovGraph::method2C() {
|
||||
warning("STUB: MovGraph::method2C()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MessageQueue *MovGraph::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
|
||||
warning("STUB: MovGraph::method34()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MovGraph::changeCallback() {
|
||||
warning("STUB: MovGraph::changeCallback()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MovGraph::method3C() {
|
||||
warning("STUB: MovGraph::method3C()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MovGraph::method44() {
|
||||
warning("STUB: MovGraph::method44()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MessageQueue *MovGraph::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
|
||||
warning("STUB: MovGraph::method4C()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MovGraph::method50() {
|
||||
warning("STUB: MovGraph::method50()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
double MovGraph::calcDistance(Common::Point *point, MovGraphLink *link, int flag) {
|
||||
warning("STUB: MovGraph::calcDistance()");
|
||||
int n1x = link->_movGraphNode1->_x;
|
||||
int n1y = link->_movGraphNode1->_y;
|
||||
int n2x = link->_movGraphNode2->_x;
|
||||
int n2y = link->_movGraphNode2->_y;
|
||||
double dist1x = (double)(point->x - n1x);
|
||||
double dist1y = (double)(n1y - point->y);
|
||||
double dist2x = (double)(n2x - n1x);
|
||||
double dist2y = (double)(n2y - n1y);
|
||||
double dist1 = sqrt(dist1y * dist1y + dist1x * dist1x);
|
||||
double dist2 = ((double)(n1y - n2y) * dist1y + dist2x * dist1x) / link->_distance / dist1;
|
||||
double distm = dist2 * dist1;
|
||||
double res = sqrt(1.0 - dist2 * dist2) * dist1;
|
||||
|
||||
if (dist2 <= 0.0 || distm >= link->_distance) {
|
||||
if (flag) {
|
||||
if (dist2 > 0.0) {
|
||||
if (distm >= link->_distance) {
|
||||
point->x = n2x;
|
||||
point->y = n2y;
|
||||
}
|
||||
} else {
|
||||
point->x = n1x;
|
||||
point->y = n1y;
|
||||
}
|
||||
} else {
|
||||
return -1.0;
|
||||
}
|
||||
} else {
|
||||
point->x = n1x + (dist2x * distm / link->_distance);
|
||||
point->y = n1y + (dist2y * distm / link->_distance);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
int MovGraph2::getItemIndexByGameObjectId(int objectId) {
|
||||
for (uint i = 0; i < _items.size(); i++)
|
||||
if (_items[i]->_objectId == objectId)
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool MovGraph2::initDirections(StaticANIObject *obj, MovGraph2Item *item) {
|
||||
item->_obj = obj;
|
||||
item->_objectId = obj->_id;
|
||||
|
||||
GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(obj->_objectName);
|
||||
if (!var)
|
||||
return false;
|
||||
|
||||
var = var->getSubVarByName("Test_walk");
|
||||
|
||||
if (!var)
|
||||
return false;
|
||||
|
||||
GameVar *varD = 0;
|
||||
Common::Point point;
|
||||
|
||||
for (int dir = 0; dir < 4; dir++) {
|
||||
switch (dir) {
|
||||
case 0:
|
||||
varD = var->getSubVarByName("Right");
|
||||
break;
|
||||
case 1:
|
||||
varD = var->getSubVarByName("Left");
|
||||
break;
|
||||
case 2:
|
||||
varD = var->getSubVarByName("Up");
|
||||
break;
|
||||
case 3:
|
||||
varD = var->getSubVarByName("Down");
|
||||
break;
|
||||
}
|
||||
|
||||
if (!varD)
|
||||
return false;
|
||||
|
||||
for (int act = 0; act < 3; act++) {
|
||||
int idx;
|
||||
|
||||
switch(act) {
|
||||
case 0:
|
||||
idx = varD->getSubVarAsInt("Start");
|
||||
break;
|
||||
case 1:
|
||||
idx = varD->getSubVarAsInt("Go");
|
||||
break;
|
||||
case 2:
|
||||
idx = varD->getSubVarAsInt("Stop");
|
||||
break;
|
||||
}
|
||||
|
||||
item->_subItems[dir]._walk[act]._movementId = idx;
|
||||
|
||||
Movement *mov = obj->getMovementById(idx);
|
||||
|
||||
item->_subItems[dir]._walk[act]._mov = mov;
|
||||
if (mov) {
|
||||
mov->calcSomeXY(point, 0);
|
||||
item->_subItems[dir]._walk[act]._mx = point.x;
|
||||
item->_subItems[dir]._walk[act]._my = point.y;
|
||||
}
|
||||
}
|
||||
|
||||
for (int act = 0; act < 4; act++) {
|
||||
int idx;
|
||||
|
||||
switch(act) {
|
||||
case 0:
|
||||
idx = varD->getSubVarAsInt("TurnR");
|
||||
break;
|
||||
case 1:
|
||||
idx = varD->getSubVarAsInt("TurnL");
|
||||
break;
|
||||
case 2:
|
||||
idx = varD->getSubVarAsInt("TurnU");
|
||||
break;
|
||||
case 3:
|
||||
idx = varD->getSubVarAsInt("TurnD");
|
||||
break;
|
||||
}
|
||||
|
||||
item->_subItems[dir]._turn[act]._movementId = idx;
|
||||
|
||||
Movement *mov = obj->getMovementById(idx);
|
||||
|
||||
item->_subItems[dir]._turn[act]._mov = mov;
|
||||
if (mov) {
|
||||
mov->calcSomeXY(point, 0);
|
||||
item->_subItems[dir]._turn[act]._mx = point.x;
|
||||
item->_subItems[dir]._turn[act]._my = point.y;
|
||||
}
|
||||
}
|
||||
|
||||
for (int act = 0; act < 4; act++) {
|
||||
int idx;
|
||||
|
||||
switch(act) {
|
||||
case 0:
|
||||
idx = varD->getSubVarAsInt("TurnSR");
|
||||
break;
|
||||
case 1:
|
||||
idx = varD->getSubVarAsInt("TurnSL");
|
||||
break;
|
||||
case 2:
|
||||
idx = varD->getSubVarAsInt("TurnSU");
|
||||
break;
|
||||
case 3:
|
||||
idx = varD->getSubVarAsInt("TurnSD");
|
||||
break;
|
||||
}
|
||||
|
||||
item->_subItems[dir]._turnS[act]._movementId = idx;
|
||||
|
||||
Movement *mov = obj->getMovementById(idx);
|
||||
|
||||
item->_subItems[dir]._turnS[act]._mov = mov;
|
||||
if (mov) {
|
||||
mov->calcSomeXY(point, 0);
|
||||
item->_subItems[dir]._turnS[act]._mx = point.x;
|
||||
item->_subItems[dir]._turnS[act]._my = point.y;
|
||||
}
|
||||
}
|
||||
|
||||
item->_subItems[dir]._staticsId1 = item->_subItems[dir]._walk[0]._mov->_staticsObj1->_staticsId;
|
||||
item->_subItems[dir]._staticsId2 = item->_subItems[dir]._walk[0]._mov->_staticsObj2->_staticsId;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void MovGraph2::addObject(StaticANIObject *obj) {
|
||||
MovGraph::addObject(obj);
|
||||
|
||||
int id = getItemIndexByGameObjectId(obj->_id);
|
||||
|
||||
if (id >= 0) {
|
||||
_items[id]->_obj = obj;
|
||||
} else {
|
||||
MovGraph2Item *item = new MovGraph2Item;
|
||||
|
||||
if (initDirections(obj, item)) {
|
||||
_items.push_back(item);
|
||||
} else {
|
||||
delete item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int MovGraph2::removeObject(StaticANIObject *obj) {
|
||||
warning("STUB: MovGraph2::removeObject()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MovGraph2::freeItems() {
|
||||
warning("STUB: MovGraph2::freeItems()");
|
||||
}
|
||||
|
||||
MessageQueue *MovGraph2::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
|
||||
warning("STUB: MovGraph2::method34()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MessageQueue *MovGraph2::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
|
||||
warning("STUB: MovGraph2::method4C()");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -185,7 +448,6 @@ MovGraphNode *MovGraph::calcOffset(int ox, int oy) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
MovGraphLink::MovGraphLink() {
|
||||
_distance = 0;
|
||||
_angle = 0;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
virtual void method10() {}
|
||||
virtual void clearEnabled() { _isEnabled = false; }
|
||||
virtual void setEnabled() { _isEnabled = true; }
|
||||
virtual int addObject(StaticANIObject *obj) { return 0; }
|
||||
virtual void addObject(StaticANIObject *obj) {}
|
||||
virtual int removeObject(StaticANIObject *obj) { return 0; }
|
||||
virtual void freeItems() {}
|
||||
virtual int method28() { return 0; }
|
||||
@ -57,58 +57,12 @@ public:
|
||||
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { return 0; }
|
||||
};
|
||||
|
||||
class MctlCompoundArray : public Common::Array<CObject>, public CObject {
|
||||
public:
|
||||
virtual bool load(MfcArchive &file);
|
||||
};
|
||||
|
||||
class MctlConnectionPointsArray : public Common::Array<CObject>, public CObject {
|
||||
public:
|
||||
virtual bool load(MfcArchive &file);
|
||||
};
|
||||
|
||||
class MctlCompound : public MotionController {
|
||||
MctlCompoundArray _motionControllers;
|
||||
|
||||
public:
|
||||
MctlCompound() { _objtype = kObjTypeMctlCompound; }
|
||||
|
||||
virtual bool load(MfcArchive &file);
|
||||
|
||||
virtual int addObject(StaticANIObject *obj);
|
||||
virtual int removeObject(StaticANIObject *obj);
|
||||
virtual void freeItems();
|
||||
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
|
||||
void initMovGraph2();
|
||||
};
|
||||
|
||||
class Unk2 : public CObject {
|
||||
int _items;
|
||||
int _count;
|
||||
|
||||
public:
|
||||
Unk2() : _items(0), _count(0) {}
|
||||
};
|
||||
|
||||
class MovGraphNode : public CObject {
|
||||
public:
|
||||
int _x;
|
||||
int _y;
|
||||
int _distance;
|
||||
int16 _field_10;
|
||||
int _field_14;
|
||||
|
||||
public:
|
||||
MovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {}
|
||||
virtual bool load(MfcArchive &file);
|
||||
};
|
||||
|
||||
class MovGraphReact : public CObject {
|
||||
// Empty
|
||||
};
|
||||
|
||||
typedef Common::Array<CObject> MctlConnectionPointsArray;
|
||||
|
||||
class MctlCompoundArrayItem : public CObject {
|
||||
friend class MctlCompound;
|
||||
|
||||
@ -124,6 +78,50 @@ class MctlCompoundArrayItem : public CObject {
|
||||
MctlCompoundArrayItem() : _movGraphReactObj(0) {}
|
||||
};
|
||||
|
||||
class MctlCompoundArray : public Common::Array<MctlCompoundArrayItem *>, public CObject {
|
||||
public:
|
||||
virtual bool load(MfcArchive &file);
|
||||
};
|
||||
|
||||
class MctlCompound : public MotionController {
|
||||
MctlCompoundArray _motionControllers;
|
||||
|
||||
public:
|
||||
MctlCompound() { _objtype = kObjTypeMctlCompound; }
|
||||
|
||||
virtual bool load(MfcArchive &file);
|
||||
|
||||
virtual void addObject(StaticANIObject *obj);
|
||||
virtual int removeObject(StaticANIObject *obj);
|
||||
virtual void freeItems();
|
||||
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
|
||||
void initMovGraph2();
|
||||
};
|
||||
|
||||
class Unk2 : public CObject {
|
||||
public:
|
||||
int _items;
|
||||
int _count;
|
||||
|
||||
public:
|
||||
Unk2() : _items(0), _count(0) {}
|
||||
};
|
||||
|
||||
class MovGraphNode : public CObject {
|
||||
public:
|
||||
int _x;
|
||||
int _y;
|
||||
int _distance;
|
||||
int16 _field_10;
|
||||
int _field_14;
|
||||
|
||||
public:
|
||||
MovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {}
|
||||
virtual bool load(MfcArchive &file);
|
||||
};
|
||||
|
||||
class ReactParallel : public MovGraphReact {
|
||||
//CRgn _rgn;
|
||||
int _x1;
|
||||
@ -186,13 +184,62 @@ class MovGraph : public MotionController {
|
||||
MovGraph();
|
||||
virtual bool load(MfcArchive &file);
|
||||
|
||||
virtual int addObject(StaticANIObject *obj);
|
||||
virtual void addObject(StaticANIObject *obj);
|
||||
virtual int removeObject(StaticANIObject *obj);
|
||||
virtual void freeItems();
|
||||
virtual int method28();
|
||||
virtual int method2C();
|
||||
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
virtual int changeCallback();
|
||||
virtual int method3C();
|
||||
virtual int method44();
|
||||
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
virtual int method50();
|
||||
|
||||
double calcDistance(Common::Point *point, MovGraphLink *link, int flag);
|
||||
MovGraphNode *calcOffset(int ox, int oy);
|
||||
};
|
||||
|
||||
class Movement;
|
||||
|
||||
struct MG2I {
|
||||
int _movementId;
|
||||
Movement *_mov;
|
||||
int _mx;
|
||||
int _my;
|
||||
};
|
||||
|
||||
struct MovGraph2ItemSub {
|
||||
int _staticsId2;
|
||||
int _staticsId1;
|
||||
MG2I _walk[3];
|
||||
MG2I _turn[4];
|
||||
MG2I _turnS[4];
|
||||
};
|
||||
|
||||
struct MovGraph2Item {
|
||||
int _objectId;
|
||||
StaticANIObject *_obj;
|
||||
MovGraph2ItemSub _subItems[4];
|
||||
};
|
||||
|
||||
class MovGraph2 : public MovGraph {
|
||||
public:
|
||||
Common::Array<MovGraph2Item *> _items;
|
||||
|
||||
public:
|
||||
virtual void addObject(StaticANIObject *obj);
|
||||
virtual int removeObject(StaticANIObject *obj);
|
||||
virtual void freeItems();
|
||||
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
||||
|
||||
int getItemIndexByGameObjectId(int objectId);
|
||||
bool initDirections(StaticANIObject *obj, MovGraph2Item *item);
|
||||
};
|
||||
|
||||
class MctlConnectionPoint : public CObject {
|
||||
public:
|
||||
int _connectionX;
|
||||
int _connectionY;
|
||||
int _field_C;
|
||||
|
@ -1348,7 +1348,7 @@ int MovGraph_messageHandler(ExCommand *cmd) {
|
||||
|
||||
double sq = (ani->_oy - node->_y) * (ani->_oy - node->_y) + (ani->_ox - node->_x) * (ani->_ox - node->_x);
|
||||
int off = (node->_field_14 >> 16) & 0xFF;
|
||||
double off2 = (link->_movGraphNode2->_field_14 >> 8) & 0xff - off;
|
||||
double off2 = ((link->_movGraphNode2->_field_14 >> 8) & 0xff) - off;
|
||||
|
||||
top = off + (int)(sqrt(sq) * off2 / link->_distance);
|
||||
} else {
|
||||
|
@ -1245,6 +1245,41 @@ Common::Point *Movement::getCurrDynamicPhaseXY(Common::Point &p) {
|
||||
return &p;
|
||||
}
|
||||
|
||||
Common::Point *Movement::calcSomeXY(Common::Point &p, int idx) {
|
||||
int oldox = _ox;
|
||||
int oldoy = _oy;
|
||||
int oldidx = _currDynamicPhaseIndex;
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
if (!idx) {
|
||||
Common::Point point;
|
||||
|
||||
_staticsObj1->getSomeXY(point);
|
||||
int y1 = _my - point.y;
|
||||
int x1 = _mx - point.x;
|
||||
|
||||
setDynamicPhaseIndex(0);
|
||||
|
||||
x = _currDynamicPhase->_someX + x1;
|
||||
y = _currDynamicPhase->_someY + y1;
|
||||
}
|
||||
|
||||
setOXY(x, y);
|
||||
|
||||
while (_currDynamicPhaseIndex != idx)
|
||||
gotoNextFrame(0, 0);
|
||||
|
||||
p.x = _ox;
|
||||
p.y = _oy;
|
||||
|
||||
setDynamicPhaseIndex(oldidx);
|
||||
setOXY(oldox, oldoy);
|
||||
|
||||
return &p;
|
||||
}
|
||||
|
||||
void Movement::setAlpha(int alpha) {
|
||||
if (_currMovement)
|
||||
for (uint i = 0; i < _currMovement->_dynamicPhases.size(); i++) {
|
||||
|
@ -140,6 +140,8 @@ class Movement : public GameObject {
|
||||
Common::Point *getCenter(Common::Point *p);
|
||||
Common::Point *getDimensionsOfPhase(Common::Point *p, int phaseIndex);
|
||||
|
||||
Common::Point *calcSomeXY(Common::Point &p, int idx);
|
||||
|
||||
void initStatics(StaticANIObject *ani);
|
||||
void updateCurrDynamicPhase();
|
||||
|
||||
|
@ -1094,7 +1094,7 @@ void CSTimeScene::idleAmbientAnims() {
|
||||
|
||||
bool CSTimeScene::eventIsActive() {
|
||||
return _vm->NISIsRunning() /* TODO || _vm->soundIsPlaying()*/ || _vm->getCurrentEventType() == kCSTimeEventWaitForClick
|
||||
|| _activeChar->_flappingState != 0xffff || _vm->getInterface()->getState() == 4;
|
||||
|| _activeChar->_flappingState != 0xffff || _vm->getInterface()->getState() == kCSTimeInterfaceDroppedInventory;
|
||||
}
|
||||
|
||||
void CSTimeScene::cursorOverHotspot(uint id) {
|
||||
|
@ -854,7 +854,7 @@ void CSTimeInterface::dropItemInInventory(uint16 id) {
|
||||
clearDialogArea();
|
||||
_inventoryDisplay->show();
|
||||
_inventoryDisplay->draw();
|
||||
_inventoryDisplay->setState(4);
|
||||
_inventoryDisplay->setState(kCSTimeInterfaceDroppedInventory);
|
||||
}
|
||||
|
||||
CSTimeHelp::CSTimeHelp(MohawkEngine_CSTime *vm) : _vm(vm) {
|
||||
|
@ -167,7 +167,8 @@ protected:
|
||||
enum CSTimeInterfaceState {
|
||||
kCSTimeInterfaceStateNormal = 1,
|
||||
kCSTimeInterfaceStateDragStart = 2,
|
||||
kCSTimeInterfaceStateDragging = 3
|
||||
kCSTimeInterfaceStateDragging = 3,
|
||||
kCSTimeInterfaceDroppedInventory = 4
|
||||
};
|
||||
|
||||
class CSTimeInterface {
|
||||
|
@ -37,7 +37,6 @@ class MouseHandler {
|
||||
private:
|
||||
MortevielleEngine *_vm;
|
||||
|
||||
int s_s[12][6];
|
||||
int _counter;
|
||||
public:
|
||||
Common::Point _pos;
|
||||
|
@ -131,7 +131,8 @@ void BlbArchive::load(BlbArchiveEntry *entry, byte *buffer, uint32 size) {
|
||||
break;
|
||||
case 3: // DCL-compressed
|
||||
if (!Common::decompressDCL(&_fd, buffer, entry->diskSize, entry->size))
|
||||
error("BlbArchive::load() Error during decompression of %08X", entry->fileHash);
|
||||
error("BlbArchive::load() Error during decompression of %08X (offset: %d, disk size: %d, size: %d)",
|
||||
entry->fileHash, entry->offset, entry->diskSize, entry->size);
|
||||
break;
|
||||
default:
|
||||
error("BlbArchive::load() Unknown compression type %d", entry->comprType);
|
||||
|
@ -252,7 +252,7 @@ bool Console::Cmd_DumpResource(int argc, const char **argv) {
|
||||
if (!handle.isValid()) {
|
||||
DebugPrintf("Invalid resource hash\n");
|
||||
} else {
|
||||
_vm->_res->loadResource(handle);
|
||||
_vm->_res->loadResource(handle, _vm->applyResourceFixes());
|
||||
Common::DumpFile outFile;
|
||||
outFile.open(outFileName);
|
||||
outFile.write(handle.data(), handle.size());
|
||||
|
@ -52,6 +52,10 @@ Common::Platform NeverhoodEngine::getPlatform() const {
|
||||
return _gameDescription->desc.platform;
|
||||
}
|
||||
|
||||
Common::Language NeverhoodEngine::getLanguage() const {
|
||||
return _gameDescription->desc.language;
|
||||
}
|
||||
|
||||
uint16 NeverhoodEngine::getVersion() const {
|
||||
return _gameDescription->version;
|
||||
}
|
||||
@ -60,6 +64,10 @@ bool NeverhoodEngine::isDemo() const {
|
||||
return _gameDescription->desc.flags & ADGF_DEMO;
|
||||
}
|
||||
|
||||
bool NeverhoodEngine::applyResourceFixes() const {
|
||||
return getLanguage() == Common::RU_RUS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static const PlainGameDescriptor neverhoodGames[] = {
|
||||
|
@ -574,6 +574,7 @@ TextEditWidget::TextEditWidget(NeverhoodEngine *vm, int16 x, int16 y, GameStateM
|
||||
|
||||
_maxVisibleChars = (_rect.x2 - _rect.x1) / _fontSurface->getCharWidth();
|
||||
_cursorPos = 0;
|
||||
_textLabelWidget = NULL;
|
||||
|
||||
SetUpdateHandler(&TextEditWidget::update);
|
||||
SetMessageHandler(&TextEditWidget::handleMessage);
|
||||
|
@ -1012,7 +1012,7 @@ void AsScene1002VenusFlyTrap::swallowKlaymen() {
|
||||
}
|
||||
|
||||
AsScene1002OutsideDoorBackground::AsScene1002OutsideDoorBackground(NeverhoodEngine *vm)
|
||||
: AnimatedSprite(vm, 1200), _countdown(0) {
|
||||
: AnimatedSprite(vm, 1200), _countdown(0), _isDoorClosed(true) {
|
||||
|
||||
createSurface(850, 186, 212);
|
||||
_x = 320;
|
||||
|
@ -155,8 +155,6 @@ protected:
|
||||
class SsScene1201Tnt : public StaticSprite {
|
||||
public:
|
||||
SsScene1201Tnt(NeverhoodEngine *vm, uint32 elemIndex, uint32 pointIndex, int16 clipY2);
|
||||
protected:
|
||||
uint32 _elemIndex;
|
||||
};
|
||||
|
||||
class Scene1201 : public Scene {
|
||||
|
@ -630,7 +630,7 @@ void AsScene1303Balloon::stPopBalloon() {
|
||||
}
|
||||
|
||||
Scene1303::Scene1303(NeverhoodEngine *vm, Module *parentModule)
|
||||
: Scene(vm, parentModule) {
|
||||
: Scene(vm, parentModule), _asBalloon(NULL) {
|
||||
|
||||
SetMessageHandler(&Scene1303::handleMessage);
|
||||
|
||||
|
@ -895,7 +895,7 @@ uint32 AsScene2809Spew::handleMessage(int messageNum, const MessageParam ¶m,
|
||||
}
|
||||
|
||||
AsScene2810Rope::AsScene2810Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x)
|
||||
: AnimatedSprite(vm, 1100) {
|
||||
: AnimatedSprite(vm, 1100), _parentScene(parentScene) {
|
||||
|
||||
createSurface(990, 68, 476);
|
||||
SetUpdateHandler(&AnimatedSprite::update);
|
||||
|
@ -72,8 +72,10 @@ public:
|
||||
uint32 getFeatures() const;
|
||||
uint16 getVersion() const;
|
||||
Common::Platform getPlatform() const;
|
||||
Common::Language getLanguage() const;
|
||||
bool hasFeature(EngineFeature f) const;
|
||||
bool isDemo() const;
|
||||
bool applyResourceFixes() const;
|
||||
Common::String getTargetName() { return _targetName; };
|
||||
|
||||
Common::RandomSource *_rnd;
|
||||
|
@ -66,6 +66,11 @@ void Palette::init() {
|
||||
_status = 0;
|
||||
_palette = new byte[1024];
|
||||
_basePalette = new byte[1024];
|
||||
_palCounter = 0;
|
||||
_fadeToR = 0;
|
||||
_fadeToG = 0;
|
||||
_fadeToB = 0;
|
||||
_fadeStep = 0;
|
||||
}
|
||||
|
||||
void Palette::usePalette() {
|
||||
|
@ -53,7 +53,7 @@ bool SpriteResource::load(uint32 fileHash, bool doLoadPosition) {
|
||||
unload();
|
||||
_vm->_res->queryResource(fileHash, _resourceHandle);
|
||||
if (_resourceHandle.isValid() && _resourceHandle.type() == kResTypeBitmap) {
|
||||
_vm->_res->loadResource(_resourceHandle);
|
||||
_vm->_res->loadResource(_resourceHandle, _vm->applyResourceFixes());
|
||||
const byte *spriteData = _resourceHandle.data();
|
||||
NPoint *position = doLoadPosition ? &_position : NULL;
|
||||
parseBitmapResource(spriteData, &_rle, &_dimensions, position, NULL, &_pixels);
|
||||
@ -83,7 +83,7 @@ bool PaletteResource::load(uint32 fileHash) {
|
||||
_vm->_res->queryResource(fileHash, _resourceHandle);
|
||||
if (_resourceHandle.isValid() &&
|
||||
(_resourceHandle.type() == kResTypeBitmap || _resourceHandle.type() == kResTypePalette)) {
|
||||
_vm->_res->loadResource(_resourceHandle);
|
||||
_vm->_res->loadResource(_resourceHandle, _vm->applyResourceFixes());
|
||||
_palette = _resourceHandle.data();
|
||||
// Check if the palette is stored in a bitmap
|
||||
if (_resourceHandle.type() == kResTypeBitmap)
|
||||
@ -144,7 +144,7 @@ bool AnimResource::load(uint32 fileHash) {
|
||||
uint16 frameListStartOfs, frameCount;
|
||||
uint32 spriteDataOfs, paletteDataOfs;
|
||||
|
||||
_vm->_res->loadResource(_resourceHandle);
|
||||
_vm->_res->loadResource(_resourceHandle, _vm->applyResourceFixes());
|
||||
resourceData = _resourceHandle.data();
|
||||
|
||||
animListCount = READ_LE_UINT16(resourceData);
|
||||
@ -323,7 +323,7 @@ void TextResource::load(uint32 fileHash) {
|
||||
unload();
|
||||
_vm->_res->queryResource(fileHash, _resourceHandle);
|
||||
if (_resourceHandle.isValid() && _resourceHandle.type() == kResTypeText) {
|
||||
_vm->_res->loadResource(_resourceHandle);
|
||||
_vm->_res->loadResource(_resourceHandle, _vm->applyResourceFixes());
|
||||
_textData = _resourceHandle.data();
|
||||
_count = READ_LE_UINT32(_textData);
|
||||
}
|
||||
@ -359,7 +359,7 @@ void DataResource::load(uint32 fileHash) {
|
||||
unload();
|
||||
_vm->_res->queryResource(fileHash, _resourceHandle);
|
||||
if (_resourceHandle.isValid() && _resourceHandle.type() == kResTypeData) {
|
||||
_vm->_res->loadResource(_resourceHandle);
|
||||
_vm->_res->loadResource(_resourceHandle, _vm->applyResourceFixes());
|
||||
data = _resourceHandle.data();
|
||||
dataSize = _resourceHandle.size();
|
||||
}
|
||||
|
@ -85,7 +85,25 @@ void ResourceMan::queryResource(uint32 fileHash, ResourceHandle &resourceHandle)
|
||||
resourceHandle._extData = firstEntry ? firstEntry->archiveEntry->extData : NULL;
|
||||
}
|
||||
|
||||
void ResourceMan::loadResource(ResourceHandle &resourceHandle) {
|
||||
struct EntrySizeFix {
|
||||
uint32 fileHash;
|
||||
uint32 offset;
|
||||
uint32 diskSize;
|
||||
uint32 size;
|
||||
uint32 fixedSize;
|
||||
};
|
||||
|
||||
static const EntrySizeFix entrySizeFixes[] = {
|
||||
// fileHash offset diskSize size fixedSize
|
||||
// Fixes for the Russian "Dyadyushka Risech" version
|
||||
// TODO
|
||||
// Fixes for the Russian "Fargus" version
|
||||
// TODO
|
||||
//
|
||||
{ 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
void ResourceMan::loadResource(ResourceHandle &resourceHandle, bool applyResourceFixes) {
|
||||
resourceHandle._data = NULL;
|
||||
if (resourceHandle.isValid()) {
|
||||
const uint32 fileHash = resourceHandle.fileHash();
|
||||
@ -97,8 +115,19 @@ void ResourceMan::loadResource(ResourceHandle &resourceHandle) {
|
||||
if (resourceData->data != NULL) {
|
||||
resourceData->dataRefCount++;
|
||||
} else {
|
||||
resourceData->data = new byte[resourceHandle._resourceFileEntry->archiveEntry->size];
|
||||
resourceHandle._resourceFileEntry->archive->load(resourceHandle._resourceFileEntry->archiveEntry, resourceData->data, 0);
|
||||
BlbArchiveEntry *entry = resourceHandle._resourceFileEntry->archiveEntry;
|
||||
|
||||
// Apply fixes for broken resources in Russian versions
|
||||
if (applyResourceFixes) {
|
||||
for (const EntrySizeFix *cur = entrySizeFixes; cur->fileHash > 0; ++cur) {
|
||||
if (entry->fileHash == cur->fileHash && entry->offset == cur->offset &&
|
||||
entry->diskSize == cur->diskSize && entry->size == cur->size)
|
||||
entry->size = cur->fixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
resourceData->data = new byte[entry->size];
|
||||
resourceHandle._resourceFileEntry->archive->load(entry, resourceData->data, 0);
|
||||
resourceData->dataRefCount = 1;
|
||||
}
|
||||
resourceHandle._data = resourceData->data;
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
const ResourceFileEntry& getEntry(uint index) { return _entries[index]; }
|
||||
uint getEntryCount() { return _entries.size(); }
|
||||
void queryResource(uint32 fileHash, ResourceHandle &resourceHandle);
|
||||
void loadResource(ResourceHandle &resourceHandle);
|
||||
void loadResource(ResourceHandle &resourceHandle, bool applyResourceFixes);
|
||||
void unloadResource(ResourceHandle &resourceHandle);
|
||||
void purgeResources();
|
||||
protected:
|
||||
|
@ -50,6 +50,9 @@ Scene::Scene(NeverhoodEngine *vm, Module *parentModule)
|
||||
_smackerPlayer = NULL;
|
||||
_isMessageListBusy = false;
|
||||
_messageValue = -1;
|
||||
_messageListStatus = 0;
|
||||
_messageListCount = 0;
|
||||
_messageListIndex = 0;
|
||||
|
||||
_backgroundFileHash = _cursorFileHash = 0;
|
||||
|
||||
|
@ -204,8 +204,6 @@ protected:
|
||||
// Used for debugging
|
||||
uint32 _backgroundFileHash, _cursorFileHash; // for StaticScene and all Scene* classes
|
||||
|
||||
void (Entity::*_savedUpdateHandlerCb)();
|
||||
uint32 (Entity::*_savedMessageHandlerCb)(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
int _messageValue;
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
bool queryPositionSprite(int16 mouseX, int16 mouseY);
|
||||
|
@ -27,7 +27,8 @@ namespace Neverhood {
|
||||
|
||||
Screen::Screen(NeverhoodEngine *vm)
|
||||
: _vm(vm), _paletteData(NULL), _paletteChanged(false), _smackerDecoder(NULL),
|
||||
_yOffset(0), _fullRefresh(false) {
|
||||
_yOffset(0), _fullRefresh(false), _frameDelay(0), _savedSmackerDecoder(NULL),
|
||||
_savedFrameDelay(0), _savedYOffset(0) {
|
||||
|
||||
_ticks = _vm->_system->getMillis();
|
||||
|
||||
|
@ -250,7 +250,9 @@ void SoundItem::update() {
|
||||
// SoundMan
|
||||
|
||||
SoundMan::SoundMan(NeverhoodEngine *vm)
|
||||
: _vm(vm), _soundIndex1(-1), _soundIndex2(-1), _soundIndex3(-1) {
|
||||
: _vm(vm), _soundIndex1(-1), _soundIndex2(-1), _soundIndex3(-1),
|
||||
_initialCountdown(0), _playOnceAfterCountdown(false),
|
||||
_initialCountdown3(0), _playOnceAfterCountdown3(false) {
|
||||
}
|
||||
|
||||
SoundMan::~SoundMan() {
|
||||
@ -577,7 +579,7 @@ AudioResourceManSoundItem::AudioResourceManSoundItem(NeverhoodEngine *vm, uint32
|
||||
void AudioResourceManSoundItem::loadSound() {
|
||||
if (!_data && _resourceHandle.isValid() &&
|
||||
(_resourceHandle.type() == kResTypeSound || _resourceHandle.type() == kResTypeMusic)) {
|
||||
_vm->_res->loadResource(_resourceHandle);
|
||||
_vm->_res->loadResource(_resourceHandle, _vm->applyResourceFixes());
|
||||
_data = _resourceHandle.data();
|
||||
}
|
||||
}
|
||||
@ -627,7 +629,8 @@ bool AudioResourceManSoundItem::isPlaying() {
|
||||
|
||||
AudioResourceManMusicItem::AudioResourceManMusicItem(NeverhoodEngine *vm, uint32 fileHash)
|
||||
: _vm(vm), _fileHash(fileHash), _terminate(false), _canRestart(false),
|
||||
_volume(100), _panning(50), _start(false), _isFadingIn(false), _isFadingOut(false), _isPlaying(false) {
|
||||
_volume(100), _panning(50), _start(false), _isFadingIn(false), _isFadingOut(false), _isPlaying(false),
|
||||
_fadeVolume(0), _fadeVolumeStep(0) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -211,6 +211,12 @@ void AnimatedSprite::init() {
|
||||
_replNewColor = 0;
|
||||
_animResource.setReplEnabled(false);
|
||||
_playBackwards = false;
|
||||
_currAnimFileHash = 0;
|
||||
_lastFrameIndex = 0;
|
||||
_plLastFrameIndex = 0;
|
||||
_plFirstFrameHash = 0;
|
||||
_plLastFrameHash = 0;
|
||||
_animStatus = 0;
|
||||
}
|
||||
|
||||
void AnimatedSprite::update() {
|
||||
|
@ -1467,6 +1467,32 @@ const SciScriptSignature sq4Signatures[] = {
|
||||
SCI_SIGNATUREENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
// When you leave Ulence Flats, another timepod is supposed to appear.
|
||||
// On fast machines, that timepod appears fully immediately and then
|
||||
// starts to appear like it should be. That first appearance is caused
|
||||
// by the scripts setting an invalid cel number and the machine being
|
||||
// so fast that there is no time for another script to actually fix
|
||||
// the cel number. On slower machines, the cel number gets fixed
|
||||
// by the cycler and that's why only fast machines are affected.
|
||||
// The same issue happens in Sierra SCI.
|
||||
// We simply set the correct starting cel number to fix the bug.
|
||||
// Responsible method: robotIntoShip::changeState(9)
|
||||
const byte sq1vgaSignatureUlenceFlatsTimepodGfxGlitch[] = {
|
||||
8,
|
||||
0x39, 0x07, // pushi 07 (ship::cel)
|
||||
0x78, // push1
|
||||
0x39, 0x0a, // pushi 0x0a (set ship::cel to 10)
|
||||
0x38, 0xa0, 0x00, // pushi 0x00a0 (ship::setLoop)
|
||||
0
|
||||
};
|
||||
|
||||
const uint16 sq1vgaPatchUlenceFlatsTimepodGfxGlitch[] = {
|
||||
PATCH_ADDTOOFFSET | +3,
|
||||
0x39, 0x09, // pushi 0x09 (set ship::cel to 9)
|
||||
PATCH_END
|
||||
};
|
||||
|
||||
const byte sq1vgaSignatureEgoShowsCard[] = {
|
||||
25,
|
||||
0x38, 0x46, 0x02, // push 0x246 (set up send frame to set timesShownID)
|
||||
@ -1484,7 +1510,8 @@ const byte sq1vgaSignatureEgoShowsCard[] = {
|
||||
0x36, // push (wrong, acc clobbered by class, above)
|
||||
0x35, 0x03, // ldi 0x03
|
||||
0x22, // lt?
|
||||
0};
|
||||
0
|
||||
};
|
||||
|
||||
// Note that this script patch is merely a reordering of the
|
||||
// instructions in the original script.
|
||||
@ -1504,13 +1531,14 @@ const uint16 sq1vgaPatchEgoShowsCard[] = {
|
||||
0x4a, 0x06, // send 0x06 (set timesShownID)
|
||||
0x35, 0x03, // ldi 0x03
|
||||
0x22, // lt?
|
||||
PATCH_END};
|
||||
PATCH_END
|
||||
};
|
||||
|
||||
|
||||
// script, description, magic DWORD, adjust
|
||||
const SciScriptSignature sq1vgaSignatures[] = {
|
||||
{ 58, "Sarien armory droid zapping ego first time", 1, PATCH_MAGICDWORD( 0x72, 0x88, 0x15, 0x36 ), -70,
|
||||
sq1vgaSignatureEgoShowsCard, sq1vgaPatchEgoShowsCard },
|
||||
{ 45, "Ulence Flats: timepod graphic glitch", 1, PATCH_MAGICDWORD( 0x07, 0x78, 0x39, 0x0a ), -1, sq1vgaSignatureUlenceFlatsTimepodGfxGlitch, sq1vgaPatchUlenceFlatsTimepodGfxGlitch },
|
||||
{ 58, "Sarien armory droid zapping ego first time", 1, PATCH_MAGICDWORD( 0x72, 0x88, 0x15, 0x36 ), -70, sq1vgaSignatureEgoShowsCard, sq1vgaPatchEgoShowsCard },
|
||||
|
||||
SCI_SIGNATUREENTRY_TERMINATOR};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
This file was generated by the md5table tool on Thu Aug 15 12:47:39 2013
|
||||
This file was generated by the md5table tool on Fri Sep 27 05:44:12 2013
|
||||
DO NOT EDIT MANUALLY!
|
||||
*/
|
||||
|
||||
@ -121,6 +121,7 @@ static const MD5Table md5table[] = {
|
||||
{ "2723fea3dae0cb47768c424b145ae0e7", "tentacle", "Floppy", "Floppy", 7932, Common::EN_ANY, Common::kPlatformDOS },
|
||||
{ "27b2ef1653089fe5b897d9cc89ce784f", "balloon", "HE 80", "", -1, Common::RU_RUS, Common::kPlatformWindows },
|
||||
{ "27b3a4224ad63d5b04627595c1c1a025", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformAmiga },
|
||||
{ "288fb75b24389733c29fa107fe8d44e8", "catalog", "HE CUP", "Preview", 10795148, Common::EN_USA, Common::kPlatformUnknown },
|
||||
{ "28d24a33448fab6795850bc9f159a4a2", "atlantis", "FM-TOWNS", "Demo", 11170, Common::JA_JPN, Common::kPlatformFMTowns },
|
||||
{ "28ef68ee3ed76d7e2ee8ee13c15fbd5b", "loom", "EGA", "EGA", 5748, Common::EN_ANY, Common::kPlatformDOS },
|
||||
{ "28f07458f1b6c24e118a1ea056827701", "lost", "HE 99", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
|
||||
|
@ -553,15 +553,15 @@ bool Animation::persist(OutputPersistenceBlock &writer) {
|
||||
writer.write(_currentFrameTime);
|
||||
writer.write(_running);
|
||||
writer.write(_finished);
|
||||
writer.write(static_cast<uint>(_direction));
|
||||
writer.write(static_cast<uint32>(_direction));
|
||||
|
||||
// Je nach Animationstyp entweder das Template oder die Ressource speichern.
|
||||
if (_animationResourcePtr) {
|
||||
uint marker = 0;
|
||||
uint32 marker = 0;
|
||||
writer.write(marker);
|
||||
writer.writeString(_animationResourcePtr->getFileName());
|
||||
} else if (_animationTemplateHandle) {
|
||||
uint marker = 1;
|
||||
uint32 marker = 1;
|
||||
writer.write(marker);
|
||||
writer.write(_animationTemplateHandle);
|
||||
} else {
|
||||
@ -574,13 +574,13 @@ bool Animation::persist(OutputPersistenceBlock &writer) {
|
||||
|
||||
// The following is only there to for compatibility with older saves
|
||||
// resp. the original engine.
|
||||
writer.write((uint)1);
|
||||
writer.write((uint32)1);
|
||||
writer.writeString("LuaLoopPointCB");
|
||||
writer.write(getHandle());
|
||||
writer.write((uint)1);
|
||||
writer.write((uint32)1);
|
||||
writer.writeString("LuaActionCB");
|
||||
writer.write(getHandle());
|
||||
writer.write((uint)1);
|
||||
writer.write((uint32)1);
|
||||
writer.writeString("LuaDeleteCB");
|
||||
writer.write(getHandle());
|
||||
|
||||
@ -605,12 +605,12 @@ bool Animation::unpersist(InputPersistenceBlock &reader) {
|
||||
reader.read(_currentFrameTime);
|
||||
reader.read(_running);
|
||||
reader.read(_finished);
|
||||
uint direction;
|
||||
uint32 direction;
|
||||
reader.read(direction);
|
||||
_direction = static_cast<Direction>(direction);
|
||||
|
||||
// Animationstyp einlesen.
|
||||
uint marker;
|
||||
uint32 marker;
|
||||
reader.read(marker);
|
||||
if (marker == 0) {
|
||||
Common::String resourceFilename;
|
||||
@ -629,9 +629,9 @@ bool Animation::unpersist(InputPersistenceBlock &reader) {
|
||||
|
||||
// The following is only there to for compatibility with older saves
|
||||
// resp. the original engine.
|
||||
uint callbackCount;
|
||||
uint32 callbackCount;
|
||||
Common::String callbackFunctionName;
|
||||
uint callbackData;
|
||||
uint32 callbackData;
|
||||
|
||||
// loop point callback
|
||||
reader.read(callbackCount);
|
||||
|
@ -159,18 +159,18 @@ private:
|
||||
BACKWARD
|
||||
};
|
||||
|
||||
int _relX;
|
||||
int _relY;
|
||||
int32 _relX;
|
||||
int32 _relY;
|
||||
float _scaleFactorX;
|
||||
float _scaleFactorY;
|
||||
uint _modulationColor;
|
||||
uint _currentFrame;
|
||||
int _currentFrameTime;
|
||||
uint32 _modulationColor;
|
||||
uint32 _currentFrame;
|
||||
int32 _currentFrameTime;
|
||||
bool _running;
|
||||
bool _finished;
|
||||
Direction _direction;
|
||||
AnimationResource *_animationResourcePtr;
|
||||
uint _animationTemplateHandle;
|
||||
uint32 _animationTemplateHandle;
|
||||
bool _framesLocked;
|
||||
|
||||
ANIMATION_CALLBACK _loopPointCallback;
|
||||
|
@ -36,7 +36,7 @@
|
||||
namespace Sword25 {
|
||||
|
||||
bool AnimationDescription::persist(OutputPersistenceBlock &writer) {
|
||||
writer.write(static_cast<uint>(_animationType));
|
||||
writer.write(static_cast<uint32>(_animationType));
|
||||
writer.write(_FPS);
|
||||
writer.write(_millisPerFrame);
|
||||
writer.write(_scalingAllowed);
|
||||
@ -47,7 +47,7 @@ bool AnimationDescription::persist(OutputPersistenceBlock &writer) {
|
||||
}
|
||||
|
||||
bool AnimationDescription::unpersist(InputPersistenceBlock &reader) {
|
||||
uint animationType;
|
||||
uint32 animationType;
|
||||
reader.read(animationType);
|
||||
_animationType = static_cast<Animation::ANIMATION_TYPES>(animationType);
|
||||
reader.read(_FPS);
|
||||
|
@ -52,8 +52,8 @@ protected:
|
||||
public:
|
||||
struct Frame {
|
||||
// Die Hotspot-Angabe bezieht sich auf das ungeflippte Bild!!
|
||||
int hotspotX;
|
||||
int hotspotY;
|
||||
int32 hotspotX;
|
||||
int32 hotspotY;
|
||||
bool flipV;
|
||||
bool flipH;
|
||||
Common::String fileName;
|
||||
@ -88,8 +88,8 @@ public:
|
||||
|
||||
protected:
|
||||
Animation::ANIMATION_TYPES _animationType;
|
||||
int _FPS;
|
||||
int _millisPerFrame;
|
||||
int32 _FPS;
|
||||
int32 _millisPerFrame;
|
||||
bool _scalingAllowed;
|
||||
bool _alphaAllowed;
|
||||
bool _colorModulationAllowed;
|
||||
|
@ -188,7 +188,7 @@ bool AnimationResource::parserCallback_frame(ParserNode *node) {
|
||||
|
||||
Common::String flipHString = node->values["fliph"];
|
||||
if (!flipHString.empty()) {
|
||||
if (!parseBooleanKey(flipVString, frame.flipV)) {
|
||||
if (!parseBooleanKey(flipHString, frame.flipH)) {
|
||||
warning("Illegal fliph value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").",
|
||||
flipHString.c_str(), getFileName().c_str());
|
||||
frame.flipH = false;
|
||||
|
@ -181,7 +181,7 @@ bool AnimationTemplate::persist(OutputPersistenceBlock &writer) {
|
||||
Result &= AnimationDescription::persist(writer);
|
||||
|
||||
// Frameanzahl schreiben.
|
||||
writer.write(_frames.size());
|
||||
writer.write((uint32)_frames.size());
|
||||
|
||||
// Frames einzeln persistieren.
|
||||
Common::Array<const Frame>::const_iterator Iter = _frames.begin();
|
||||
@ -209,7 +209,7 @@ bool AnimationTemplate::unpersist(InputPersistenceBlock &reader) {
|
||||
result &= AnimationDescription::unpersist(reader);
|
||||
|
||||
// Frameanzahl lesen.
|
||||
uint frameCount;
|
||||
uint32 frameCount;
|
||||
reader.read(frameCount);
|
||||
|
||||
// Frames einzeln wieder herstellen.
|
||||
|
@ -47,7 +47,7 @@ bool AnimationTemplateRegistry::persist(OutputPersistenceBlock &writer) {
|
||||
writer.write(_nextHandle);
|
||||
|
||||
// Anzahl an BS_AnimationTemplates schreiben.
|
||||
writer.write(_handle2PtrMap.size());
|
||||
writer.write((uint32)_handle2PtrMap.size());
|
||||
|
||||
// Alle BS_AnimationTemplates persistieren.
|
||||
HANDLE2PTR_MAP::const_iterator iter = _handle2PtrMap.begin();
|
||||
@ -77,13 +77,13 @@ bool AnimationTemplateRegistry::unpersist(InputPersistenceBlock &reader) {
|
||||
delete _handle2PtrMap.begin()->_value;
|
||||
|
||||
// Anzahl an BS_AnimationTemplates einlesen.
|
||||
uint animationTemplateCount;
|
||||
uint32 animationTemplateCount;
|
||||
reader.read(animationTemplateCount);
|
||||
|
||||
// Alle gespeicherten BS_AnimationTemplates wieder herstellen.
|
||||
for (uint i = 0; i < animationTemplateCount; ++i) {
|
||||
// Handle lesen.
|
||||
uint handle;
|
||||
uint32 handle;
|
||||
reader.read(handle);
|
||||
|
||||
// BS_AnimationTemplate wieder herstellen.
|
||||
|
@ -176,9 +176,9 @@ protected:
|
||||
bool _flipV;
|
||||
float _scaleFactorX;
|
||||
float _scaleFactorY;
|
||||
uint _modulationColor;
|
||||
int _originalWidth;
|
||||
int _originalHeight;
|
||||
uint32 _modulationColor;
|
||||
int32 _originalWidth;
|
||||
int32 _originalHeight;
|
||||
};
|
||||
|
||||
} // End of namespace Sword25
|
||||
|
@ -240,14 +240,6 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
|
||||
int cg = (color >> 8) & 0xff;
|
||||
int cb = (color >> 0) & 0xff;
|
||||
|
||||
// Compensate for transparency. Since we're coming
|
||||
// down to 255 alpha, we just compensate for the colors here
|
||||
if (ca != 255) {
|
||||
cr = cr * ca >> 8;
|
||||
cg = cg * ca >> 8;
|
||||
cb = cb * ca >> 8;
|
||||
}
|
||||
|
||||
// Create an encapsulating surface for the data
|
||||
Graphics::Surface srcImage;
|
||||
// TODO: Is the data really in the screen format?
|
||||
@ -400,52 +392,52 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
|
||||
} else {
|
||||
#if defined(SCUMM_LITTLE_ENDIAN)
|
||||
pix = *(uint32 *)out;
|
||||
int outb = (pix >> 0) & 0xff;
|
||||
int outg = (pix >> 8) & 0xff;
|
||||
int outr = (pix >> 16) & 0xff;
|
||||
int outb = ((pix >> 0) & 0xff) * (255 - a);
|
||||
int outg = ((pix >> 8) & 0xff) * (255 - a);
|
||||
int outr = ((pix >> 16) & 0xff) * (255 - a);
|
||||
if (cb == 0)
|
||||
outb = 0;
|
||||
outb = outb >> 8;
|
||||
else if (cb != 255)
|
||||
outb += ((b - outb) * a * cb) >> 16;
|
||||
outb = ((outb << 8) + b * a * cb) >> 16;
|
||||
else
|
||||
outb += ((b - outb) * a) >> 8;
|
||||
outb = (outb + b * a) >> 8;
|
||||
if (cg == 0)
|
||||
outg = 0;
|
||||
outg = outg >> 8;
|
||||
else if (cg != 255)
|
||||
outg += ((g - outg) * a * cg) >> 16;
|
||||
outg = ((outg << 8) + g * a * cg) >> 16;
|
||||
else
|
||||
outg += ((g - outg) * a) >> 8;
|
||||
outg = (outg + g * a) >> 8;
|
||||
if (cr == 0)
|
||||
outr = 0;
|
||||
outr = outr >> 8;
|
||||
else if (cr != 255)
|
||||
outr += ((r - outr) * a * cr) >> 16;
|
||||
outr = ((outr << 8) + r * a * cr) >> 16;
|
||||
else
|
||||
outr += ((r - outr) * a) >> 8;
|
||||
outr = (outr + r * a) >> 8;
|
||||
*(uint32 *)out = (255 << 24) | (outr << 16) | (outg << 8) | outb;
|
||||
out += 4;
|
||||
#else
|
||||
*out = 255;
|
||||
out++;
|
||||
if (cr == 0)
|
||||
*out = 0;
|
||||
*out = (*out * (255-a)) >> 8;
|
||||
else if (cr != 255)
|
||||
*out += ((r - *out) * a * cr) >> 16;
|
||||
*out = (((*out * (255-a)) << 8) + r * a * cr) >> 16;
|
||||
else
|
||||
*out += ((r - *out) * a) >> 8;
|
||||
*out = ((*out * (255-a)) + r * a) >> 8;
|
||||
out++;
|
||||
if (cg == 0)
|
||||
*out = 0;
|
||||
*out = (*out * (255-a)) >> 8;
|
||||
else if (cg != 255)
|
||||
*out += ((g - *out) * a * cg) >> 16;
|
||||
*out = (((*out * (255-a)) << 8) + g * a * cg) >> 16;
|
||||
else
|
||||
*out += ((g - *out) * a) >> 8;
|
||||
*out = ((*out * (255-a)) + g * a) >> 8;
|
||||
out++;
|
||||
if (cb == 0)
|
||||
*out = 0;
|
||||
*out = (*out * (255-a)) >> 8;
|
||||
else if (cb != 255)
|
||||
*out += ((b - *out) * a * cb) >> 16;
|
||||
*out = (((*out * (255-a)) << 8) + b * a * cb) >> 16;
|
||||
else
|
||||
*out += ((b - *out) * a) >> 8;
|
||||
*out = ((*out * (255-a)) + b * a) >> 8;
|
||||
out++;
|
||||
#endif
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ bool Panel::unpersist(InputPersistenceBlock &reader) {
|
||||
|
||||
result &= RenderObject::unpersist(reader);
|
||||
|
||||
uint color;
|
||||
uint32 color;
|
||||
reader.read(color);
|
||||
setColor(color);
|
||||
|
||||
|
@ -64,7 +64,7 @@ protected:
|
||||
virtual bool doRender(RectangleList *updateRects);
|
||||
|
||||
private:
|
||||
uint _color;
|
||||
uint32 _color;
|
||||
};
|
||||
|
||||
} // End of namespace Sword25
|
||||
|
@ -219,27 +219,27 @@ Common::Rect RenderObject::calcBoundingBox() const {
|
||||
return bbox;
|
||||
}
|
||||
|
||||
void RenderObject::calcAbsolutePos(int &x, int &y, int &z) const {
|
||||
void RenderObject::calcAbsolutePos(int32 &x, int32 &y, int32 &z) const {
|
||||
x = calcAbsoluteX();
|
||||
y = calcAbsoluteY();
|
||||
z = calcAbsoluteZ();
|
||||
}
|
||||
|
||||
int RenderObject::calcAbsoluteX() const {
|
||||
int32 RenderObject::calcAbsoluteX() const {
|
||||
if (_parentPtr.isValid())
|
||||
return _parentPtr->getAbsoluteX() + _x;
|
||||
else
|
||||
return _x;
|
||||
}
|
||||
|
||||
int RenderObject::calcAbsoluteY() const {
|
||||
int32 RenderObject::calcAbsoluteY() const {
|
||||
if (_parentPtr.isValid())
|
||||
return _parentPtr->getAbsoluteY() + _y;
|
||||
else
|
||||
return _y;
|
||||
}
|
||||
|
||||
int RenderObject::calcAbsoluteZ() const {
|
||||
int32 RenderObject::calcAbsoluteZ() const {
|
||||
if (_parentPtr.isValid())
|
||||
return _parentPtr->getAbsoluteZ() + _z;
|
||||
else
|
||||
@ -399,7 +399,7 @@ RenderObjectPtr<Text> RenderObject::addText(const Common::String &font, const Co
|
||||
|
||||
bool RenderObject::persist(OutputPersistenceBlock &writer) {
|
||||
// Typ und Handle werden als erstes gespeichert, damit beim Laden ein Objekt vom richtigen Typ mit dem richtigen Handle erzeugt werden kann.
|
||||
writer.write(static_cast<uint>(_type));
|
||||
writer.write(static_cast<uint32>(_type));
|
||||
writer.write(_handle);
|
||||
|
||||
// Restliche Objekteigenschaften speichern.
|
||||
@ -413,14 +413,14 @@ bool RenderObject::persist(OutputPersistenceBlock &writer) {
|
||||
writer.write(_visible);
|
||||
writer.write(_childChanged);
|
||||
writer.write(_initSuccess);
|
||||
writer.write(_bbox.left);
|
||||
writer.write(_bbox.top);
|
||||
writer.write(_bbox.right);
|
||||
writer.write(_bbox.bottom);
|
||||
writer.write(_oldBbox.left);
|
||||
writer.write(_oldBbox.top);
|
||||
writer.write(_oldBbox.right);
|
||||
writer.write(_oldBbox.bottom);
|
||||
writer.write((int32)_bbox.left);
|
||||
writer.write((int32)_bbox.top);
|
||||
writer.write((int32)_bbox.right);
|
||||
writer.write((int32)_bbox.bottom);
|
||||
writer.write((int32)_oldBbox.left);
|
||||
writer.write((int32)_oldBbox.top);
|
||||
writer.write((int32)_oldBbox.right);
|
||||
writer.write((int32)_oldBbox.bottom);
|
||||
writer.write(_oldX);
|
||||
writer.write(_oldY);
|
||||
writer.write(_oldZ);
|
||||
@ -455,7 +455,7 @@ bool RenderObject::unpersist(InputPersistenceBlock &reader) {
|
||||
reader.read(_oldY);
|
||||
reader.read(_oldZ);
|
||||
reader.read(_oldVisible);
|
||||
uint parentHandle;
|
||||
uint32 parentHandle;
|
||||
reader.read(parentHandle);
|
||||
_parentPtr = RenderObjectPtr<RenderObject>(parentHandle);
|
||||
reader.read(_refreshForced);
|
||||
@ -470,7 +470,7 @@ bool RenderObject::persistChildren(OutputPersistenceBlock &writer) {
|
||||
bool result = true;
|
||||
|
||||
// Kinderanzahl speichern.
|
||||
writer.write(_children.size());
|
||||
writer.write((uint32)_children.size());
|
||||
|
||||
// Rekursiv alle Kinder speichern.
|
||||
RENDEROBJECT_LIST::iterator it = _children.begin();
|
||||
@ -486,13 +486,13 @@ bool RenderObject::unpersistChildren(InputPersistenceBlock &reader) {
|
||||
bool result = true;
|
||||
|
||||
// Kinderanzahl einlesen.
|
||||
uint childrenCount;
|
||||
uint32 childrenCount;
|
||||
reader.read(childrenCount);
|
||||
if (!reader.isGood())
|
||||
return false;
|
||||
|
||||
// Alle Kinder rekursiv wieder herstellen.
|
||||
for (uint i = 0; i < childrenCount; ++i) {
|
||||
for (uint32 i = 0; i < childrenCount; ++i) {
|
||||
if (!recreatePersistedRenderObject(reader).isValid())
|
||||
return false;
|
||||
}
|
||||
@ -504,8 +504,8 @@ RenderObjectPtr<RenderObject> RenderObject::recreatePersistedRenderObject(InputP
|
||||
RenderObjectPtr<RenderObject> result;
|
||||
|
||||
// Typ und Handle auslesen.
|
||||
uint type;
|
||||
uint handle;
|
||||
uint32 type;
|
||||
uint32 handle;
|
||||
reader.read(type);
|
||||
reader.read(handle);
|
||||
if (!reader.isGood())
|
||||
|
@ -359,7 +359,7 @@ public:
|
||||
/**
|
||||
@brief Gibt das Handle des Objekte zurück.
|
||||
*/
|
||||
uint getHandle() const {
|
||||
uint32 getHandle() const {
|
||||
return _handle;
|
||||
}
|
||||
|
||||
@ -388,14 +388,14 @@ protected:
|
||||
typedef Common::List<RenderObjectPtr<RenderObject> > RENDEROBJECT_LIST;
|
||||
typedef Common::List<RenderObjectPtr<RenderObject> >::iterator RENDEROBJECT_ITER;
|
||||
|
||||
int _x; ///< Die X-Position des Objektes relativ zum Eltern-Objekt
|
||||
int _y; ///< Die Y-Position des Objektes relativ zum Eltern-Objekt
|
||||
int _z; ///< Der Z-Wert des Objektes relativ zum Eltern-Objekt
|
||||
int _absoluteX; ///< Die absolute X-Position des Objektes
|
||||
int _absoluteY; ///< Die absolute Y-Position des Objektes
|
||||
int _absoluteZ;
|
||||
int _width; ///< Die Breite des Objektes
|
||||
int _height; ///< Die Höhe des Objektes
|
||||
int32 _x; ///< Die X-Position des Objektes relativ zum Eltern-Objekt
|
||||
int32 _y; ///< Die Y-Position des Objektes relativ zum Eltern-Objekt
|
||||
int32 _z; ///< Der Z-Wert des Objektes relativ zum Eltern-Objekt
|
||||
int32 _absoluteX; ///< Die absolute X-Position des Objektes
|
||||
int32 _absoluteY; ///< Die absolute Y-Position des Objektes
|
||||
int32 _absoluteZ;
|
||||
int32 _width; ///< Die Breite des Objektes
|
||||
int32 _height; ///< Die Höhe des Objektes
|
||||
bool _visible; ///< Ist true, wenn das Objekt sichtbar ist
|
||||
bool _childChanged; ///< Ist true, wenn sich ein Kinderobjekt verändert hat
|
||||
TYPES _type; ///< Der Objekttyp
|
||||
@ -404,14 +404,14 @@ protected:
|
||||
|
||||
// Kopien der Variablen, die für die Errechnung des Dirty-Rects und zur Bestimmung der Objektveränderung notwendig sind
|
||||
Common::Rect _oldBbox;
|
||||
int _oldX;
|
||||
int _oldY;
|
||||
int _oldZ;
|
||||
int32 _oldX;
|
||||
int32 _oldY;
|
||||
int32 _oldZ;
|
||||
bool _oldVisible;
|
||||
|
||||
static int _nextGlobalVersion;
|
||||
|
||||
int _version;
|
||||
int32 _version;
|
||||
|
||||
// This should be set to true if the RenderObject is NOT alpha-blended to optimize drawing
|
||||
bool _isSolid;
|
||||
@ -475,7 +475,7 @@ private:
|
||||
/// Ist true, wenn das Objekt in nächsten Frame neu gezeichnet werden soll
|
||||
bool _refreshForced;
|
||||
|
||||
uint _handle;
|
||||
uint32 _handle;
|
||||
|
||||
/**
|
||||
@brief Entfernt ein Objekt aus der Kinderliste.
|
||||
@ -500,17 +500,17 @@ private:
|
||||
/**
|
||||
@brief Berechnet die absolute Position des Objektes.
|
||||
*/
|
||||
void calcAbsolutePos(int &x, int &y, int &z) const;
|
||||
void calcAbsolutePos(int32 &x, int32 &y, int32 &z) const;
|
||||
/**
|
||||
@brief Berechnet die absolute Position des Objektes auf der X-Achse.
|
||||
*/
|
||||
int calcAbsoluteX() const;
|
||||
int32 calcAbsoluteX() const;
|
||||
/**
|
||||
@brief Berechnet die absolute Position des Objektes.
|
||||
*/
|
||||
int calcAbsoluteY() const;
|
||||
int32 calcAbsoluteY() const;
|
||||
|
||||
int calcAbsoluteZ() const;
|
||||
int32 calcAbsoluteZ() const;
|
||||
|
||||
/**
|
||||
@brief Sortiert alle Kinderobjekte nach ihrem Renderang.
|
||||
|
@ -171,7 +171,7 @@ bool RenderObjectManager::persist(OutputPersistenceBlock &writer) {
|
||||
writer.write(_frameStarted);
|
||||
|
||||
// Referenzen auf die TimedRenderObjects persistieren.
|
||||
writer.write(_timedRenderObjects.size());
|
||||
writer.write((uint32)_timedRenderObjects.size());
|
||||
RenderObjectList::const_iterator iter = _timedRenderObjects.begin();
|
||||
while (iter != _timedRenderObjects.end()) {
|
||||
writer.write((*iter)->getHandle());
|
||||
@ -200,10 +200,10 @@ bool RenderObjectManager::unpersist(InputPersistenceBlock &reader) {
|
||||
_timedRenderObjects.resize(0);
|
||||
|
||||
// Referenzen auf die TimedRenderObjects wieder herstellen.
|
||||
uint timedObjectCount;
|
||||
uint32 timedObjectCount;
|
||||
reader.read(timedObjectCount);
|
||||
for (uint i = 0; i < timedObjectCount; ++i) {
|
||||
uint handle;
|
||||
for (uint32 i = 0; i < timedObjectCount; ++i) {
|
||||
uint32 handle;
|
||||
reader.read(handle);
|
||||
_timedRenderObjects.push_back(handle);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
namespace Sword25 {
|
||||
|
||||
namespace {
|
||||
const uint AUTO_WRAP_THRESHOLD_DEFAULT = 300;
|
||||
const uint32 AUTO_WRAP_THRESHOLD_DEFAULT = 300;
|
||||
}
|
||||
|
||||
Text::Text(RenderObjectPtr<RenderObject> parentPtr) :
|
||||
@ -98,8 +98,8 @@ void Text::setText(const Common::String &text) {
|
||||
}
|
||||
}
|
||||
|
||||
void Text::setColor(uint modulationColor) {
|
||||
uint newModulationColor = (modulationColor & 0x00ffffff) | (_modulationColor & 0xff000000);
|
||||
void Text::setColor(uint32 modulationColor) {
|
||||
uint32 newModulationColor = (modulationColor & 0x00ffffff) | (_modulationColor & 0xff000000);
|
||||
if (newModulationColor != _modulationColor) {
|
||||
_modulationColor = newModulationColor;
|
||||
forceRefresh();
|
||||
@ -108,7 +108,7 @@ void Text::setColor(uint modulationColor) {
|
||||
|
||||
void Text::setAlpha(int alpha) {
|
||||
assert(alpha >= 0 && alpha < 256);
|
||||
uint newModulationColor = (_modulationColor & 0x00ffffff) | alpha << 24;
|
||||
uint32 newModulationColor = (_modulationColor & 0x00ffffff) | alpha << 24;
|
||||
if (newModulationColor != _modulationColor) {
|
||||
_modulationColor = newModulationColor;
|
||||
forceRefresh();
|
||||
@ -123,7 +123,7 @@ void Text::setAutoWrap(bool autoWrap) {
|
||||
}
|
||||
}
|
||||
|
||||
void Text::setAutoWrapThreshold(uint autoWrapThreshold) {
|
||||
void Text::setAutoWrapThreshold(uint32 autoWrapThreshold) {
|
||||
if (autoWrapThreshold != _autoWrapThreshold) {
|
||||
_autoWrapThreshold = autoWrapThreshold;
|
||||
updateFormat();
|
||||
@ -351,7 +351,7 @@ bool Text::unpersist(InputPersistenceBlock &reader) {
|
||||
reader.read(autoWrap);
|
||||
setAutoWrap(autoWrap);
|
||||
|
||||
uint autoWrapThreshold;
|
||||
uint32 autoWrapThreshold;
|
||||
reader.read(autoWrapThreshold);
|
||||
setAutoWrapThreshold(autoWrapThreshold);
|
||||
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
@remark Dieses Attribut wird mit dem Wert 300 initialisiert.
|
||||
@remark Eine automatische Formatierung wird nur vorgenommen, wenn diese durch einen Aufruf von SetAutoWrap() aktiviert wurde.
|
||||
*/
|
||||
void setAutoWrapThreshold(uint autoWrapThreshold);
|
||||
void setAutoWrapThreshold(uint32 autoWrapThreshold);
|
||||
|
||||
/**
|
||||
@brief Gibt den dargestellten Text zurück.
|
||||
@ -100,7 +100,7 @@ public:
|
||||
@brief Setzt die Farbe des Textes.
|
||||
@param Color eine 24-Bit RGB Farbe, die die Farbe des Textes festlegt.
|
||||
*/
|
||||
void setColor(uint modulationColor);
|
||||
void setColor(uint32 modulationColor);
|
||||
|
||||
/**
|
||||
@brief Gibt den Alphawert des Textes zurück.
|
||||
@ -128,7 +128,7 @@ public:
|
||||
/**
|
||||
@brief Gibt die Längengrenze des Textes in Pixeln zurück, ab der eine automatische Formatierung vorgenommen wird.
|
||||
*/
|
||||
uint getAutoWrapThreshold() const {
|
||||
uint32 getAutoWrapThreshold() const {
|
||||
return _autoWrapThreshold;
|
||||
}
|
||||
|
||||
@ -142,11 +142,11 @@ private:
|
||||
Text(RenderObjectPtr<RenderObject> parentPtr);
|
||||
Text(InputPersistenceBlock &reader, RenderObjectPtr<RenderObject> parentPtr, uint handle);
|
||||
|
||||
uint _modulationColor;
|
||||
uint32 _modulationColor;
|
||||
Common::String _font;
|
||||
Common::String _text;
|
||||
bool _autoWrap;
|
||||
uint _autoWrapThreshold;
|
||||
uint32 _autoWrapThreshold;
|
||||
|
||||
struct Line {
|
||||
Common::Rect bbox;
|
||||
|
@ -235,13 +235,13 @@ bool InputEngine::persist(OutputPersistenceBlock &writer) {
|
||||
// Write out the number of command callbacks and their names.
|
||||
// Note: We do this only for compatibility with older engines resp.
|
||||
// the original engine.
|
||||
writer.write((uint)1);
|
||||
writer.write((uint32)1);
|
||||
writer.writeString("LuaCommandCB");
|
||||
|
||||
// Write out the number of command callbacks and their names.
|
||||
// Note: We do this only for compatibility with older engines resp.
|
||||
// the original engine.
|
||||
writer.write((uint)1);
|
||||
writer.write((uint32)1);
|
||||
writer.writeString("LuaCharacterCB");
|
||||
|
||||
return true;
|
||||
@ -253,7 +253,7 @@ bool InputEngine::unpersist(InputPersistenceBlock &reader) {
|
||||
// Read number of command callbacks and their names.
|
||||
// Note: We do this only for compatibility with older engines resp.
|
||||
// the original engine.
|
||||
uint commandCallbackCount;
|
||||
uint32 commandCallbackCount;
|
||||
reader.read(commandCallbackCount);
|
||||
assert(commandCallbackCount == 1);
|
||||
|
||||
@ -263,7 +263,7 @@ bool InputEngine::unpersist(InputPersistenceBlock &reader) {
|
||||
// Read number of character callbacks and their names.
|
||||
// Note: We do this only for compatibility with older engines resp.
|
||||
// the original engine.
|
||||
uint characterCallbackCount;
|
||||
uint32 characterCallbackCount;
|
||||
reader.read(characterCallbackCount);
|
||||
assert(characterCallbackCount == 1);
|
||||
|
||||
|
@ -48,12 +48,12 @@ InputPersistenceBlock::~InputPersistenceBlock() {
|
||||
}
|
||||
|
||||
void InputPersistenceBlock::read(int16 &value) {
|
||||
signed int v;
|
||||
int32 v;
|
||||
read(v);
|
||||
value = static_cast<int16>(v);
|
||||
}
|
||||
|
||||
void InputPersistenceBlock::read(signed int &value) {
|
||||
void InputPersistenceBlock::read(int32 &value) {
|
||||
if (checkMarker(SINT_MARKER)) {
|
||||
value = (int32)READ_LE_UINT32(_iter);
|
||||
_iter += 4;
|
||||
@ -62,7 +62,7 @@ void InputPersistenceBlock::read(signed int &value) {
|
||||
}
|
||||
}
|
||||
|
||||
void InputPersistenceBlock::read(uint &value) {
|
||||
void InputPersistenceBlock::read(uint32 &value) {
|
||||
if (checkMarker(UINT_MARKER)) {
|
||||
value = READ_LE_UINT32(_iter);
|
||||
_iter += 4;
|
||||
@ -96,7 +96,7 @@ void InputPersistenceBlock::readString(Common::String &value) {
|
||||
value = "";
|
||||
|
||||
if (checkMarker(STRING_MARKER)) {
|
||||
uint size;
|
||||
uint32 size;
|
||||
read(size);
|
||||
|
||||
if (checkBlockSize(size)) {
|
||||
@ -108,7 +108,7 @@ void InputPersistenceBlock::readString(Common::String &value) {
|
||||
|
||||
void InputPersistenceBlock::readByteArray(Common::Array<byte> &value) {
|
||||
if (checkMarker(BLOCK_MARKER)) {
|
||||
uint size;
|
||||
uint32 size;
|
||||
read(size);
|
||||
|
||||
if (checkBlockSize(size)) {
|
||||
|
@ -50,8 +50,8 @@ public:
|
||||
virtual ~InputPersistenceBlock();
|
||||
|
||||
void read(int16 &value);
|
||||
void read(signed int &value);
|
||||
void read(uint &value);
|
||||
void read(int32 &value);
|
||||
void read(uint32 &value);
|
||||
void read(float &value);
|
||||
void read(bool &value);
|
||||
void readString(Common::String &value);
|
||||
|
@ -139,12 +139,12 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
typedef Common::HashMap<uint, T *> HANDLE2PTR_MAP;
|
||||
typedef Common::HashMap<T *, uint, ClassPointer_Hash, ClassPointer_EqualTo> PTR2HANDLE_MAP;
|
||||
typedef Common::HashMap<uint32, T *> HANDLE2PTR_MAP;
|
||||
typedef Common::HashMap<T *, uint32, ClassPointer_Hash, ClassPointer_EqualTo> PTR2HANDLE_MAP;
|
||||
|
||||
HANDLE2PTR_MAP _handle2PtrMap;
|
||||
PTR2HANDLE_MAP _ptr2HandleMap;
|
||||
uint _nextHandle;
|
||||
uint32 _nextHandle;
|
||||
|
||||
T *findPtrByHandle(uint handle) {
|
||||
// Zum Handle gehörigen Pointer finden.
|
||||
|
@ -41,13 +41,13 @@ OutputPersistenceBlock::OutputPersistenceBlock() {
|
||||
_data.reserve(INITIAL_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
void OutputPersistenceBlock::write(signed int value) {
|
||||
void OutputPersistenceBlock::write(int32 value) {
|
||||
writeMarker(SINT_MARKER);
|
||||
value = TO_LE_32(value);
|
||||
rawWrite(&value, sizeof(value));
|
||||
}
|
||||
|
||||
void OutputPersistenceBlock::write(uint value) {
|
||||
void OutputPersistenceBlock::write(uint32 value) {
|
||||
writeMarker(UINT_MARKER);
|
||||
value = TO_LE_32(value);
|
||||
rawWrite(&value, sizeof(value));
|
||||
@ -74,14 +74,14 @@ void OutputPersistenceBlock::write(bool value) {
|
||||
void OutputPersistenceBlock::writeString(const Common::String &string) {
|
||||
writeMarker(STRING_MARKER);
|
||||
|
||||
write(string.size());
|
||||
write((uint32)string.size());
|
||||
rawWrite(string.c_str(), string.size());
|
||||
}
|
||||
|
||||
void OutputPersistenceBlock::writeByteArray(Common::Array<byte> &value) {
|
||||
writeMarker(BLOCK_MARKER);
|
||||
|
||||
write((uint)value.size());
|
||||
write((uint32)value.size());
|
||||
rawWrite(&value[0], value.size());
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,8 @@ class OutputPersistenceBlock : public PersistenceBlock {
|
||||
public:
|
||||
OutputPersistenceBlock();
|
||||
|
||||
void write(signed int value);
|
||||
void write(uint value);
|
||||
void write(int32 value);
|
||||
void write(uint32 value);
|
||||
void write(float value);
|
||||
void write(bool value);
|
||||
void writeString(const Common::String &string);
|
||||
|
@ -364,20 +364,20 @@ bool Polygon::isPointInPolygon(const Vertex &point, bool edgesBelongToPolygon) c
|
||||
bool Polygon::persist(OutputPersistenceBlock &writer) {
|
||||
writer.write(vertexCount);
|
||||
for (int i = 0; i < vertexCount; ++i) {
|
||||
writer.write(vertices[i].x);
|
||||
writer.write(vertices[i].y);
|
||||
writer.write((int32)vertices[i].x);
|
||||
writer.write((int32)vertices[i].y);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Polygon::unpersist(InputPersistenceBlock &reader) {
|
||||
int storedvertexCount;
|
||||
int32 storedvertexCount;
|
||||
reader.read(storedvertexCount);
|
||||
|
||||
Common::Array<Vertex> storedvertices;
|
||||
for (int i = 0; i < storedvertexCount; ++i) {
|
||||
int x, y;
|
||||
int32 x, y;
|
||||
reader.read(x);
|
||||
reader.read(y);
|
||||
storedvertices.push_back(Vertex(x, y));
|
||||
|
@ -169,7 +169,7 @@ public:
|
||||
//
|
||||
|
||||
/// Specifies the number of Vertecies in the Vertecies array.
|
||||
int vertexCount;
|
||||
int32 vertexCount;
|
||||
/// COntains the Vertecies of the polygon
|
||||
Vertex *vertices;
|
||||
|
||||
|
@ -67,7 +67,7 @@ uint Region::create(REGION_TYPE type) {
|
||||
|
||||
uint Region::create(InputPersistenceBlock &reader, uint handle) {
|
||||
// Read type
|
||||
uint type;
|
||||
uint32 type;
|
||||
reader.read(type);
|
||||
|
||||
// Depending on the type, create a new BS_Region or BS_WalkRegion object
|
||||
@ -299,22 +299,22 @@ bool Region::isLineOfSight(const Vertex &a, const Vertex &b) const {
|
||||
bool Region::persist(OutputPersistenceBlock &writer) {
|
||||
bool Result = true;
|
||||
|
||||
writer.write(static_cast<uint>(_type));
|
||||
writer.write(static_cast<uint32>(_type));
|
||||
writer.write(_valid);
|
||||
writer.write(_position.x);
|
||||
writer.write(_position.y);
|
||||
writer.write((int32)_position.x);
|
||||
writer.write((int32)_position.y);
|
||||
|
||||
writer.write(_polygons.size());
|
||||
writer.write((uint32)_polygons.size());
|
||||
Common::Array<Polygon>::iterator It = _polygons.begin();
|
||||
while (It != _polygons.end()) {
|
||||
Result &= It->persist(writer);
|
||||
++It;
|
||||
}
|
||||
|
||||
writer.write(_boundingBox.left);
|
||||
writer.write(_boundingBox.top);
|
||||
writer.write(_boundingBox.right);
|
||||
writer.write(_boundingBox.bottom);
|
||||
writer.write((uint32)_boundingBox.left);
|
||||
writer.write((uint32)_boundingBox.top);
|
||||
writer.write((uint32)_boundingBox.right);
|
||||
writer.write((uint32)_boundingBox.bottom);
|
||||
|
||||
return Result;
|
||||
}
|
||||
@ -325,7 +325,7 @@ bool Region::unpersist(InputPersistenceBlock &reader) {
|
||||
reader.read(_position.y);
|
||||
|
||||
_polygons.clear();
|
||||
uint PolygonCount;
|
||||
uint32 PolygonCount;
|
||||
reader.read(PolygonCount);
|
||||
for (uint i = 0; i < PolygonCount; ++i) {
|
||||
_polygons.push_back(Polygon(reader));
|
||||
|
@ -47,7 +47,7 @@ bool RegionRegistry::persist(OutputPersistenceBlock &writer) {
|
||||
writer.write(_nextHandle);
|
||||
|
||||
// Number of regions to write
|
||||
writer.write(_handle2PtrMap.size());
|
||||
writer.write((uint32)_handle2PtrMap.size());
|
||||
|
||||
// Persist all the BS_Regions
|
||||
HANDLE2PTR_MAP::const_iterator iter = _handle2PtrMap.begin();
|
||||
@ -76,13 +76,13 @@ bool RegionRegistry::unpersist(InputPersistenceBlock &reader) {
|
||||
delete _handle2PtrMap.begin()->_value;
|
||||
|
||||
// read in the number of BS_Regions
|
||||
uint regionCount;
|
||||
uint32 regionCount;
|
||||
reader.read(regionCount);
|
||||
|
||||
// Restore all the BS_Regions objects
|
||||
for (uint i = 0; i < regionCount; ++i) {
|
||||
// Handle read
|
||||
uint handle;
|
||||
uint32 handle;
|
||||
reader.read(handle);
|
||||
|
||||
// BS_Region restore
|
||||
|
@ -328,22 +328,22 @@ bool WalkRegion::persist(OutputPersistenceBlock &writer) {
|
||||
result &= Region::persist(writer);
|
||||
|
||||
// Persist the nodes
|
||||
writer.write(_nodes.size());
|
||||
writer.write((uint32)_nodes.size());
|
||||
Common::Array<Vertex>::const_iterator it = _nodes.begin();
|
||||
while (it != _nodes.end()) {
|
||||
writer.write(it->x);
|
||||
writer.write(it->y);
|
||||
writer.write((int32)it->x);
|
||||
writer.write((int32)it->y);
|
||||
++it;
|
||||
}
|
||||
|
||||
// Persist the visibility matrix
|
||||
writer.write(_visibilityMatrix.size());
|
||||
writer.write((uint32)_visibilityMatrix.size());
|
||||
Common::Array< Common::Array<int> >::const_iterator rowIter = _visibilityMatrix.begin();
|
||||
while (rowIter != _visibilityMatrix.end()) {
|
||||
writer.write(rowIter->size());
|
||||
writer.write((uint32)rowIter->size());
|
||||
Common::Array<int>::const_iterator colIter = rowIter->begin();
|
||||
while (colIter != rowIter->end()) {
|
||||
writer.write(*colIter);
|
||||
writer.write((int32)*colIter);
|
||||
++colIter;
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ bool WalkRegion::unpersist(InputPersistenceBlock &reader) {
|
||||
// this point only the additional data from BS_WalkRegion needs to be loaded
|
||||
|
||||
// Node load
|
||||
uint nodeCount;
|
||||
uint32 nodeCount;
|
||||
reader.read(nodeCount);
|
||||
_nodes.clear();
|
||||
_nodes.resize(nodeCount);
|
||||
@ -372,18 +372,20 @@ bool WalkRegion::unpersist(InputPersistenceBlock &reader) {
|
||||
}
|
||||
|
||||
// Visibility matrix load
|
||||
uint rowCount;
|
||||
uint32 rowCount;
|
||||
reader.read(rowCount);
|
||||
_visibilityMatrix.clear();
|
||||
_visibilityMatrix.resize(rowCount);
|
||||
Common::Array< Common::Array<int> >::iterator rowIter = _visibilityMatrix.begin();
|
||||
while (rowIter != _visibilityMatrix.end()) {
|
||||
uint colCount;
|
||||
uint32 colCount;
|
||||
reader.read(colCount);
|
||||
rowIter->resize(colCount);
|
||||
Common::Array<int>::iterator colIter = rowIter->begin();
|
||||
while (colIter != rowIter->end()) {
|
||||
reader.read(*colIter);
|
||||
int32 t;
|
||||
reader.read(t);
|
||||
*colIter = t;
|
||||
++colIter;
|
||||
}
|
||||
|
||||
|
@ -339,7 +339,7 @@ bool SoundEngine::persist(OutputPersistenceBlock &writer) {
|
||||
_handles[i].type = kFreeHandle;
|
||||
|
||||
writer.writeString(_handles[i].fileName);
|
||||
writer.write((int)_handles[i].sndType);
|
||||
writer.write(_handles[i].sndType);
|
||||
writer.write(_handles[i].volume);
|
||||
writer.write(_handles[i].pan);
|
||||
writer.write(_handles[i].loop);
|
||||
@ -363,13 +363,13 @@ bool SoundEngine::unpersist(InputPersistenceBlock &reader) {
|
||||
reader.read(_handles[i].id);
|
||||
|
||||
Common::String fileName;
|
||||
int sndType;
|
||||
int32 sndType;
|
||||
float volume;
|
||||
float pan;
|
||||
bool loop;
|
||||
int loopStart;
|
||||
int loopEnd;
|
||||
uint layer;
|
||||
int32 loopStart;
|
||||
int32 loopEnd;
|
||||
uint32 layer;
|
||||
|
||||
reader.readString(fileName);
|
||||
reader.read(sndType);
|
||||
|
@ -67,13 +67,13 @@ struct SndHandle {
|
||||
uint32 id;
|
||||
|
||||
Common::String fileName;
|
||||
int sndType;
|
||||
int32 sndType;
|
||||
float volume;
|
||||
float pan;
|
||||
bool loop;
|
||||
int loopStart;
|
||||
int loopEnd;
|
||||
uint layer;
|
||||
int32 loopStart;
|
||||
int32 loopEnd;
|
||||
uint32 layer;
|
||||
};
|
||||
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define lcode_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -5,11 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#define ldebug_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define lfunc_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define lgc_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -8,9 +8,6 @@
|
||||
#define llimits_h
|
||||
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
#include "lua.h"
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define lmem_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define LUA_CORE
|
||||
|
||||
|
||||
#include "lua.h"
|
||||
#include "lopcodes.h"
|
||||
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define lparser_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define lstate_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define lstring_c
|
||||
#define LUA_CORE
|
||||
|
||||
|
@ -7,12 +7,6 @@
|
||||
|
||||
#define FORBIDDEN_SYMBOL_EXCEPTION_ctype_h
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define lstrlib_c
|
||||
#define LUA_LIB
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define ltablib_c
|
||||
#define LUA_LIB
|
||||
|
||||
|
@ -186,7 +186,7 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) {
|
||||
void SendSceneTinselProcess(TINSEL_EVENT event) {
|
||||
SCENE_STRUC *ss;
|
||||
|
||||
if (g_SceneHandle != (SCNHANDLE)NULL) {
|
||||
if (g_SceneHandle != 0) {
|
||||
ss = (SCENE_STRUC *) FindChunk(g_SceneHandle, CHUNK_SCENE);
|
||||
|
||||
if (ss->hSceneScript) {
|
||||
|
@ -409,7 +409,7 @@ static uint32 *getSelectList(uint32 i) {
|
||||
sl[k++] = dialog->_choice[i]._select[j]._dwData;
|
||||
}
|
||||
|
||||
sl[k] = (uint32)NULL;
|
||||
sl[k] = 0;
|
||||
return sl;
|
||||
}
|
||||
|
||||
@ -436,7 +436,7 @@ static uint32 *GetItemList(uint32 nLoc) {
|
||||
}
|
||||
}
|
||||
|
||||
il[j] = (uint32)NULL;
|
||||
il[j] = 0;
|
||||
return il;
|
||||
}
|
||||
|
||||
@ -832,7 +832,7 @@ void LocationPollThread(CORO_PARAM, const void *param) {
|
||||
|
||||
if (_ctx->k == 0)
|
||||
// We can remove this item from the list
|
||||
_ctx->il[_ctx->i] = (uint32)NULL;
|
||||
_ctx->il[_ctx->i] = 0;
|
||||
else
|
||||
_ctx->nRealItems++;
|
||||
}
|
||||
|
@ -2066,8 +2066,8 @@ SceneObject::SceneObject() : SceneHotspot() {
|
||||
_visage = 0;
|
||||
_strip = 0;
|
||||
_frame = 0;
|
||||
_effect = 0;
|
||||
_shade = _shade2 = 0;
|
||||
_effect = EFFECT_NONE;
|
||||
_shade = _oldShade = 0;
|
||||
_linkedActor = NULL;
|
||||
|
||||
_field8A = Common::Point(0, 0);
|
||||
@ -2370,12 +2370,17 @@ void SceneObject::animate(AnimateMode animMode, ...) {
|
||||
|
||||
case ANIM_MODE_8:
|
||||
case ANIM_MODE_9:
|
||||
_field68 = va_arg(va, int);
|
||||
_endAction = va_arg(va, Action *);
|
||||
_frameChange = 1;
|
||||
_endFrame = getFrameCount();
|
||||
if (_frame == _endFrame)
|
||||
setFrame(getNewFrame());
|
||||
if (_animateMode == ANIM_MODE_9 && g_vm->getGameID() == GType_Ringworld2) {
|
||||
_frameChange = -1;
|
||||
_field2E = _position;
|
||||
} else {
|
||||
_field68 = va_arg(va, int);
|
||||
_endAction = va_arg(va, Action *);
|
||||
_frameChange = 1;
|
||||
_endFrame = getFrameCount();
|
||||
if (_frame == _endFrame)
|
||||
setFrame(getNewFrame());
|
||||
}
|
||||
break;
|
||||
}
|
||||
va_end(va);
|
||||
@ -2468,7 +2473,7 @@ void SceneObject::synchronize(Serializer &s) {
|
||||
if (g_vm->getGameID() == GType_Ringworld2) {
|
||||
s.syncAsSint16LE(_effect);
|
||||
s.syncAsSint16LE(_shade);
|
||||
s.syncAsSint16LE(_shade2);
|
||||
s.syncAsSint16LE(_oldShade);
|
||||
SYNC_POINTER(_linkedActor);
|
||||
}
|
||||
}
|
||||
@ -2514,9 +2519,9 @@ void SceneObject::remove() {
|
||||
|
||||
void SceneObject::dispatch() {
|
||||
if (g_vm->getGameID() == GType_Ringworld2) {
|
||||
if (_shade != _shade2)
|
||||
if (_shade != _oldShade)
|
||||
_flags |= OBJFLAG_PANES;
|
||||
_shade2 = _shade;
|
||||
_oldShade = _shade;
|
||||
}
|
||||
|
||||
uint32 currTime = g_globals->_events.getFrameNumber();
|
||||
@ -2634,8 +2639,9 @@ void SceneObject::dispatch() {
|
||||
_linkedActor->setFrame(_frame);
|
||||
}
|
||||
|
||||
if ((_effect == 1) && (getRegionIndex() < 11))
|
||||
_shade = 0;
|
||||
int regionIndex = getRegionIndex();
|
||||
if ((_effect == EFFECT_SHADED) && (regionIndex < 11))
|
||||
_shade = regionIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2664,7 +2670,24 @@ void SceneObject::removeObject() {
|
||||
|
||||
GfxSurface SceneObject::getFrame() {
|
||||
_visageImages.setVisage(_visage, _strip);
|
||||
return _visageImages.getFrame(_frame);
|
||||
GfxSurface frame = _visageImages.getFrame(_frame);
|
||||
|
||||
// If shading is needed, post apply the shadiing onto the frame
|
||||
if ((g_vm->getGameID() == GType_Ringworld2) && (_shade >= 1)) {
|
||||
Graphics::Surface s = frame.lockSurface();
|
||||
byte *p = (byte *)s.getPixels();
|
||||
byte *endP = p + s.w * s.h;
|
||||
|
||||
while (p < endP) {
|
||||
if (*p != frame._transColor)
|
||||
*p = R2_GLOBALS._fadePaletteMap[_shade - 1][*p];
|
||||
++p;
|
||||
}
|
||||
|
||||
frame.unlockSurface();
|
||||
}
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
void SceneObject::reposition() {
|
||||
@ -3285,7 +3308,7 @@ void Player::postInit(SceneObjectList *OwnerList) {
|
||||
{
|
||||
_moveDiff.x = 3;
|
||||
_moveDiff.y = 2;
|
||||
_effect = 1;
|
||||
_effect = EFFECT_SHADED;
|
||||
_shade = 0;
|
||||
_linkedActor = NULL;
|
||||
|
||||
|
@ -466,6 +466,9 @@ enum AnimateMode {ANIM_MODE_NONE = 0, ANIM_MODE_1 = 1, ANIM_MODE_2 = 2, ANIM_MOD
|
||||
ANIM_MODE_9 = 9
|
||||
};
|
||||
|
||||
enum Effect { EFFECT_NONE = 0, EFFECT_SHADED = 1, EFFECT_2 = 2, EFFECT_3 = 3,
|
||||
EFFECT_4 = 4, EFFECT_5 = 5 };
|
||||
|
||||
class SceneObject;
|
||||
|
||||
class Visage {
|
||||
@ -550,7 +553,7 @@ public:
|
||||
|
||||
// Ringworld 2 specific fields
|
||||
byte *_field9C;
|
||||
int _shade, _shade2;
|
||||
int _shade, _oldShade;
|
||||
int _effect;
|
||||
SceneObject *_linkedActor;
|
||||
public:
|
||||
|
@ -503,7 +503,7 @@ void Ringworld2Globals::reset() {
|
||||
_player._characterIndex = R2_QUINN;
|
||||
_player._characterScene[R2_QUINN] = 100;
|
||||
_player._characterScene[R2_SEEKER] = 300;
|
||||
_player._characterScene[3] = 300;
|
||||
_player._characterScene[R2_MIRANDA] = 300;
|
||||
}
|
||||
|
||||
void Ringworld2Globals::synchronize(Serializer &s) {
|
||||
|
@ -235,7 +235,7 @@ void CharacterDialog::show() {
|
||||
scene->saveCharacter(oldCharacter);
|
||||
|
||||
// Play the correctfrequency, if any, of the character being switched to's scanner device
|
||||
if (R2_GLOBALS._player._characterScene[0] != 300) {
|
||||
if (R2_GLOBALS._player._characterScene[R2_NONE] != 300) {
|
||||
switch (R2_GLOBALS._scannerFrequencies[R2_GLOBALS._player._characterIndex] - 1) {
|
||||
case 0:
|
||||
R2_GLOBALS._sound4.stop();
|
||||
|
@ -38,8 +38,6 @@ namespace TsAGE {
|
||||
namespace Ringworld2 {
|
||||
|
||||
Scene *Ringworld2Game::createScene(int sceneNumber) {
|
||||
warning("Switching to scene %d", sceneNumber);
|
||||
|
||||
switch (sceneNumber) {
|
||||
/* Scene group #0 */
|
||||
case 50:
|
||||
@ -1118,19 +1116,31 @@ void Ringworld2Game::start() {
|
||||
if (slot >= 0)
|
||||
R2_GLOBALS._sceneHandler->_loadGameSlot = slot;
|
||||
else {
|
||||
// Switch to the first game scene
|
||||
// Switch to the first title screen
|
||||
R2_GLOBALS._events.setCursor(CURSOR_WALK);
|
||||
R2_GLOBALS._uiElements._active = true;
|
||||
R2_GLOBALS._sceneManager.setNewScene(100);
|
||||
R2_GLOBALS._sceneManager.setNewScene(180);
|
||||
}
|
||||
|
||||
g_globals->_events.showCursor();
|
||||
}
|
||||
|
||||
void Ringworld2Game::restartGame() {
|
||||
if (MessageDialog::show(Ringworld2::R2_RESTART_MSG, CANCEL_BTN_STRING, YES_MSG) == 1)
|
||||
restart();
|
||||
}
|
||||
|
||||
void Ringworld2Game::restart() {
|
||||
g_globals->_scenePalette.clearListeners();
|
||||
g_globals->_soundHandler.stop();
|
||||
|
||||
// Reset the globals
|
||||
g_globals->reset();
|
||||
|
||||
// Clear save/load slots
|
||||
g_globals->_sceneHandler->_saveGameSlot = -1;
|
||||
g_globals->_sceneHandler->_loadGameSlot = -1;
|
||||
|
||||
// Change to the first game scene
|
||||
g_globals->_sceneManager.changeScene(100);
|
||||
}
|
||||
@ -1307,18 +1317,18 @@ GfxSurface SceneActor::getFrame() {
|
||||
|
||||
// TODO: Proper effects handling
|
||||
switch (_effect) {
|
||||
case 0:
|
||||
case 5:
|
||||
case EFFECT_NONE:
|
||||
case EFFECT_5:
|
||||
// TODO: Figure out purpose of setting image flags to 64, and getting
|
||||
// scene priorities -1 or _shade
|
||||
break;
|
||||
case 1:
|
||||
case EFFECT_SHADED:
|
||||
// TODO: Transposing using R2_GLOBALS._pixelArrayMap
|
||||
break;
|
||||
case 2:
|
||||
case EFFECT_2:
|
||||
// No effect
|
||||
break;
|
||||
case 4:
|
||||
case EFFECT_4:
|
||||
break;
|
||||
default:
|
||||
// TODO: Default effect
|
||||
@ -2087,7 +2097,7 @@ void AnimationPlayer::close() {
|
||||
|
||||
_field38 = 0;
|
||||
if (g_globals != NULL)
|
||||
R2_GLOBALS._animationCtr = MAX(R2_GLOBALS._animationCtr, 0);
|
||||
R2_GLOBALS._animationCtr = MAX(R2_GLOBALS._animationCtr - 1, 0);
|
||||
}
|
||||
|
||||
void AnimationPlayer::rleDecode(const byte *pSrc, byte *pDest, int size) {
|
||||
@ -2133,13 +2143,13 @@ void AnimationPlayer::getSlices() {
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
AnimationPlayerExt::AnimationPlayerExt(): AnimationPlayer() {
|
||||
_v = 0;
|
||||
_isActive = false;
|
||||
_field3A = 0;
|
||||
}
|
||||
|
||||
void AnimationPlayerExt::synchronize(Serializer &s) {
|
||||
AnimationPlayer::synchronize(s);
|
||||
s.syncAsSint16LE(_v);
|
||||
s.syncAsSint16LE(_isActive);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
@ -228,6 +228,7 @@ public:
|
||||
class Ringworld2Game: public Game {
|
||||
public:
|
||||
virtual void start();
|
||||
virtual void restartGame();
|
||||
virtual void restart();
|
||||
virtual void endGame(int resNum, int lineNum);
|
||||
|
||||
@ -441,7 +442,7 @@ public:
|
||||
|
||||
class AnimationPlayerExt: public AnimationPlayer {
|
||||
public:
|
||||
int _v;
|
||||
bool _isActive;
|
||||
public:
|
||||
AnimationPlayerExt();
|
||||
|
||||
|
@ -228,6 +228,7 @@ bool Scene100::Terminal::startAction(CursorType action, Event &event) {
|
||||
void Scene100::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(100);
|
||||
R2_GLOBALS._scenePalette.loadPalette(0);
|
||||
R2_GLOBALS._scenePalette.setEntry(255, 255, 255, 255);
|
||||
SceneExt::postInit();
|
||||
|
||||
if (R2_GLOBALS._sceneManager._previousScene != 125)
|
||||
@ -1480,14 +1481,14 @@ void Scene180::Action1::signal() {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
scene->_object5.setStrip((_actionIndex == 1) ? 1 : 2);
|
||||
scene->_object5.setFrame(1);
|
||||
scene->_object5.animate(ANIM_MODE_5, this);
|
||||
scene->_shipDisplay.setStrip((_actionIndex == 1) ? 1 : 2);
|
||||
scene->_shipDisplay.setFrame(1);
|
||||
scene->_shipDisplay.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 4:
|
||||
scene->_object5.setStrip(3);
|
||||
scene->_object5.setFrame(1);
|
||||
scene->_object5.animate(ANIM_MODE_5, this);
|
||||
scene->_shipDisplay.setStrip(3);
|
||||
scene->_shipDisplay.setFrame(1);
|
||||
scene->_shipDisplay.animate(ANIM_MODE_5, this);
|
||||
_actionIndex = 0;
|
||||
break;
|
||||
}
|
||||
@ -1495,7 +1496,7 @@ void Scene180::Action1::signal() {
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Scene180::Scene180(): SceneExt(), _webbsterSpeaker(27) {
|
||||
Scene180::Scene180(): SceneExt() {
|
||||
_field412 = 0;
|
||||
_frameInc = 0;
|
||||
_frameNumber = R2_GLOBALS._events.getFrameNumber();
|
||||
@ -1562,7 +1563,7 @@ void Scene180::signal() {
|
||||
_field412 = 1;
|
||||
R2_GLOBALS._sceneManager._hasPalette = true;
|
||||
_animationPlayer._paletteMode = ANIMPALMODE_NONE;
|
||||
_animationPlayer._v = 1;
|
||||
_animationPlayer._isActive = true;
|
||||
_animationPlayer._objectMode = ANIMOBJMODE_1;
|
||||
R2_GLOBALS._scene180Mode = 1;
|
||||
|
||||
@ -1605,7 +1606,7 @@ void Scene180::signal() {
|
||||
|
||||
case 5:
|
||||
_animationPlayer._paletteMode = ANIMPALMODE_NONE;
|
||||
_animationPlayer._v = 1;
|
||||
_animationPlayer._isActive = true;
|
||||
_animationPlayer._objectMode = ANIMOBJMODE_1;
|
||||
R2_GLOBALS._scene180Mode = 2;
|
||||
_animationPlayer.load(2);
|
||||
@ -1648,9 +1649,9 @@ void Scene180::signal() {
|
||||
|
||||
case 11:
|
||||
_field412 = 1;
|
||||
_object4.postInit();
|
||||
_object5.postInit();
|
||||
setAction(&_sequenceManager, this, 4000, &_object4, &_object5, NULL);
|
||||
_door.postInit();
|
||||
_shipDisplay.postInit();
|
||||
setAction(&_sequenceManager, this, 4000, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
@ -1666,37 +1667,37 @@ void Scene180::signal() {
|
||||
break;
|
||||
|
||||
case 13:
|
||||
setAction(&_sequenceManager, this, 4001, &_object4, &_object5, NULL);
|
||||
setAction(&_sequenceManager, this, 4001, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
setAction(&_sequenceManager, this, 4002, &_object4, &_object5, NULL);
|
||||
setAction(&_sequenceManager, this, 4002, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
setAction(&_sequenceManager, this, 4003, &_object4, &_object5, NULL);
|
||||
setAction(&_sequenceManager, this, 4003, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 19:
|
||||
setAction(&_sequenceManager, this, 4004, &_object4, &_object5, NULL);
|
||||
setAction(&_sequenceManager, this, 4004, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
setAction(&_sequenceManager, this, 4005, &_object4, &_object5, NULL);
|
||||
setAction(&_sequenceManager, this, 4005, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 23:
|
||||
setAction(&_sequenceManager, this, 4006, &_object4, &_object5, NULL);
|
||||
setAction(&_sequenceManager, this, 4006, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
setAction(&_sequenceManager, this, 4007, &_object4, &_object5, NULL);
|
||||
setAction(&_sequenceManager, this, 4007, &_door, &_shipDisplay, NULL);
|
||||
break;
|
||||
|
||||
case 27:
|
||||
_field412 = 0;
|
||||
_object4.remove();
|
||||
_object5.remove();
|
||||
_door.remove();
|
||||
_shipDisplay.remove();
|
||||
setSceneDelay(2);
|
||||
break;
|
||||
|
||||
@ -1710,7 +1711,7 @@ void Scene180::signal() {
|
||||
case 29:
|
||||
_field412 = 1;
|
||||
_animationPlayer._paletteMode = ANIMPALMODE_REPLACE_PALETTE;
|
||||
_animationPlayer._v = 1;
|
||||
_animationPlayer._isActive = true;
|
||||
_animationPlayer._objectMode = ANIMOBJMODE_42;
|
||||
R2_GLOBALS._scene180Mode = 3;
|
||||
_animationPlayer.load(3);
|
||||
@ -1719,12 +1720,12 @@ void Scene180::signal() {
|
||||
case 31:
|
||||
R2_GLOBALS._sound2.play(7);
|
||||
|
||||
_object4.postInit();
|
||||
_object4.setVisage(76);
|
||||
_object4.setStrip(1);
|
||||
_object4.setFrame(1);
|
||||
_object4.setPosition(Common::Point(288, 143));
|
||||
_object4.fixPriority(210);
|
||||
_door.postInit();
|
||||
_door.setVisage(76);
|
||||
_door.setStrip(1);
|
||||
_door.setFrame(1);
|
||||
_door.setPosition(Common::Point(288, 143));
|
||||
_door.fixPriority(210);
|
||||
|
||||
loadScene(75);
|
||||
|
||||
@ -1739,68 +1740,71 @@ void Scene180::signal() {
|
||||
case 32:
|
||||
_field412 = 1;
|
||||
|
||||
_object2.postInit();
|
||||
_object2.setPosition(Common::Point(161, 97));
|
||||
_object2.hide();
|
||||
_teal.postInit();
|
||||
_teal.setPosition(Common::Point(161, 97));
|
||||
_teal.hide();
|
||||
|
||||
_object3.postInit();
|
||||
_object3.setPosition(Common::Point(60, 96));
|
||||
_object3.hide();
|
||||
R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 11, this);
|
||||
_webbser.postInit();
|
||||
_webbser.setPosition(Common::Point(60, 96));
|
||||
_webbser.hide();
|
||||
_stripManager.start(11, this);
|
||||
break;
|
||||
|
||||
case 33:
|
||||
_object2.hide();
|
||||
_teal.hide();
|
||||
|
||||
_object3.setup(76, 4, 1);
|
||||
_object3.setFrame(_object3.getFrameCount());
|
||||
_webbser.setup(76, 4, 1);
|
||||
_webbser.setFrame(_webbser.getFrameCount());
|
||||
|
||||
_object5.postInit();
|
||||
_object5.setup(75, 1, 1);
|
||||
_object5.setPosition(Common::Point(221, 125));
|
||||
_object5.fixPriority(210);
|
||||
_object5.setAction(&_action1);
|
||||
R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 12, this);
|
||||
_shipDisplay.postInit();
|
||||
_shipDisplay.setup(75, 1, 1);
|
||||
_shipDisplay.setPosition(Common::Point(221, 125));
|
||||
_shipDisplay.fixPriority(210);
|
||||
_shipDisplay.setAction(&_action1);
|
||||
_stripManager.start(12, this);
|
||||
break;
|
||||
|
||||
case 34:
|
||||
_object2.hide();
|
||||
_object3.hide();
|
||||
_teal.hide();
|
||||
_webbser.hide();
|
||||
|
||||
_object1.postInit();
|
||||
_object1.setup(76, 2, 1);
|
||||
_object1.setPosition(Common::Point(287, 135));
|
||||
_object1.fixPriority(200);
|
||||
_dutyOfficer.postInit();
|
||||
_dutyOfficer.setup(76, 2, 1);
|
||||
_dutyOfficer.setPosition(Common::Point(287, 135));
|
||||
_dutyOfficer.fixPriority(200);
|
||||
|
||||
_sound1.play(19);
|
||||
R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 5, this);
|
||||
_door.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
|
||||
case 35:
|
||||
R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 13, this);
|
||||
_stripManager.start(13, this);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
_object2.remove();
|
||||
_teal.remove();
|
||||
_sound1.play(19);
|
||||
|
||||
R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 6, this);
|
||||
_door.animate(ANIM_MODE_6, this);
|
||||
break;
|
||||
|
||||
case 37:
|
||||
_field412 = 0;
|
||||
_object1.remove();
|
||||
_dutyOfficer.remove();
|
||||
_palette.loadPalette(9998);
|
||||
R2_GLOBALS._scenePalette.addFader(_palette._palette, 256, 8, this);
|
||||
break;
|
||||
|
||||
case 38:
|
||||
_object4.remove();
|
||||
_object5.setAction(NULL);
|
||||
_object5.remove();
|
||||
_door.remove();
|
||||
_shipDisplay.setAction(NULL);
|
||||
_shipDisplay.remove();
|
||||
|
||||
// TODO: Figure out why end action on sounds aren't firing. For now, I'm
|
||||
// simply setting up a scene delay to ensure the signal() method gets
|
||||
// called again after a brief delay
|
||||
setSceneDelay(10);
|
||||
R2_GLOBALS._sound2.fadeOut2(NULL);
|
||||
R2_GLOBALS._sound1.fadeOut2(NULL);
|
||||
R2_GLOBALS._sound1.fadeOut2(NULL /* this */);
|
||||
break;
|
||||
|
||||
case 39:
|
||||
@ -1823,7 +1827,7 @@ void Scene180::signal() {
|
||||
|
||||
case 41:
|
||||
_field412 = 1;
|
||||
_animationPlayer._v = 1;
|
||||
_animationPlayer._isActive = true;
|
||||
break;
|
||||
|
||||
case 42:
|
||||
@ -1842,13 +1846,14 @@ void Scene180::signal() {
|
||||
break;
|
||||
|
||||
case 45:
|
||||
R2_GLOBALS._scenePalette.addFader(_animationPlayer._subData._palData, 256, 28, this);
|
||||
_field412 = 1;
|
||||
_stripManager.start(28, this);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
_field412 = 1;
|
||||
_animationPlayer._paletteMode = ANIMPALMODE_NONE;
|
||||
_animationPlayer._v = 1;
|
||||
_animationPlayer._isActive = true;
|
||||
_animationPlayer._objectMode = ANIMOBJMODE_1;
|
||||
R2_GLOBALS._scene180Mode = 15;
|
||||
_animationPlayer.load(15, NULL);
|
||||
@ -1905,9 +1910,9 @@ void Scene180::dispatch() {
|
||||
}
|
||||
}
|
||||
|
||||
if (_animationPlayer._v) {
|
||||
if (_animationPlayer._isActive) {
|
||||
if (_animationPlayer.isCompleted()) {
|
||||
_animationPlayer._v = 0;
|
||||
_animationPlayer._isActive = false;
|
||||
_animationPlayer.close();
|
||||
_animationPlayer.remove();
|
||||
|
||||
@ -2805,12 +2810,12 @@ void Scene300::Action1::signal() {
|
||||
|
||||
switch (_actionIndex) {
|
||||
case 0:
|
||||
setAction(&scene->_sequenceManager2, this, 311, (R2_GLOBALS._player._characterIndex == 1) ?
|
||||
setAction(&scene->_sequenceManager2, this, 311, (R2_GLOBALS._player._characterIndex == R2_QUINN) ?
|
||||
(SceneObject *)&R2_GLOBALS._player : (SceneObject *)&scene->_quinn);
|
||||
_actionIndex = 2;
|
||||
break;
|
||||
case 1:
|
||||
setAction(&scene->_sequenceManager2, this, 312, (R2_GLOBALS._player._characterIndex == 1) ?
|
||||
setAction(&scene->_sequenceManager2, this, 312, (R2_GLOBALS._player._characterIndex == R2_QUINN) ?
|
||||
(SceneObject *)&R2_GLOBALS._player : (SceneObject *)&scene->_quinn);
|
||||
_actionIndex = 0;
|
||||
break;
|
||||
@ -2904,7 +2909,7 @@ bool Scene300::QuinnWorkstation::startAction(CursorType action, Event &event) {
|
||||
return true;
|
||||
|
||||
case CURSOR_LOOK:
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
SceneItem::display2(300, 47);
|
||||
return true;
|
||||
}
|
||||
@ -2927,7 +2932,7 @@ bool Scene300::MirandaWorkstation::startAction(CursorType action, Event &event)
|
||||
return true;
|
||||
|
||||
case CURSOR_LOOK:
|
||||
if (R2_GLOBALS._player._characterIndex == 3) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA) {
|
||||
SceneItem::display2(300, 47);
|
||||
return true;
|
||||
}
|
||||
@ -2943,7 +2948,7 @@ bool Scene300::MirandaWorkstation::startAction(CursorType action, Event &event)
|
||||
bool Scene300::SeekerWorkstation::startAction(CursorType action, Event &event) {
|
||||
switch (action) {
|
||||
case CURSOR_LOOK:
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
SceneItem::display2(300, 47);
|
||||
return true;
|
||||
}
|
||||
@ -3452,8 +3457,8 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
case 3:
|
||||
if (R2_GLOBALS._sceneManager._previousScene == 1500) {
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3150;
|
||||
R2_GLOBALS._player._characterScene[3] = 3150;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3150;
|
||||
R2_GLOBALS._player._characterScene[R2_MIRANDA] = 3150;
|
||||
R2_GLOBALS._player._effect = 0;
|
||||
R2_GLOBALS._player.setAction(NULL);
|
||||
R2_GLOBALS._player.disableControl();
|
||||
@ -4281,7 +4286,7 @@ void Scene325::consoleAction(int id) {
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if (R2_GLOBALS.getFlag(57) && (R2_GLOBALS._player._characterIndex == 1) && !R2_GLOBALS.getFlag(25)) {
|
||||
if (R2_GLOBALS.getFlag(57) && (R2_GLOBALS._player._characterIndex == R2_QUINN) && !R2_GLOBALS.getFlag(25)) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
|
||||
_sceneMode = 13;
|
||||
|
@ -197,11 +197,11 @@ class Scene180: public SceneExt {
|
||||
private:
|
||||
void setSceneDelay(int v);
|
||||
public:
|
||||
SpeakerWebbster _webbsterSpeaker;
|
||||
SpeakerDutyOfficer _dutyOfficerSpeaker;
|
||||
SpeakerTeal _tealSpeaker;
|
||||
SpeakerWebbster180 _webbsterSpeaker;
|
||||
SpeakerDutyOfficer180 _dutyOfficerSpeaker;
|
||||
SpeakerTeal180 _tealSpeaker;
|
||||
SpeakerGameText _gameTextSpeaker;
|
||||
SceneActor _object1, _object2, _object3, _object4, _object5;
|
||||
SceneActor _dutyOfficer, _teal, _webbser, _door, _shipDisplay;
|
||||
ScenePalette _palette;
|
||||
SceneText _textList[20];
|
||||
AnimationPlayerExt _animationPlayer;
|
||||
@ -306,7 +306,6 @@ public:
|
||||
virtual void dispatch();
|
||||
};
|
||||
|
||||
|
||||
class Scene250: public SceneExt {
|
||||
class Button: public SceneActor {
|
||||
public:
|
||||
@ -477,7 +476,6 @@ public:
|
||||
virtual void dispatch();
|
||||
};
|
||||
|
||||
|
||||
class Scene400: public SceneExt {
|
||||
/* Items */
|
||||
class Terminal: public NamedHotspot {
|
||||
|
@ -1520,7 +1520,7 @@ void Scene1200::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.setup(3156, 1, 6);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(160, 70));
|
||||
R2_GLOBALS._player._numFrames = 10;
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 1200;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 1200;
|
||||
|
||||
_actor1.postInit();
|
||||
_actor1.hide();
|
||||
|
@ -51,77 +51,77 @@ void Scene2000::initPlayer() {
|
||||
R2_GLOBALS._player.enableControl();
|
||||
break;
|
||||
case 1:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2001;
|
||||
else
|
||||
_sceneMode = 2021;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 2:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2002;
|
||||
else
|
||||
_sceneMode = 2022;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 3:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2000;
|
||||
else
|
||||
_sceneMode = 2020;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 4:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2005;
|
||||
else
|
||||
_sceneMode = 2025;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 5:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2004;
|
||||
else
|
||||
_sceneMode = 2024;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 6:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2009;
|
||||
else
|
||||
_sceneMode = 2029;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 7:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2008;
|
||||
else
|
||||
_sceneMode = 2028;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 8:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2013;
|
||||
else
|
||||
_sceneMode = 2033;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 9:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2012;
|
||||
else
|
||||
_sceneMode = 2032;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 10:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2016;
|
||||
else
|
||||
_sceneMode = 2036;
|
||||
setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 11:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2038;
|
||||
else
|
||||
_sceneMode = 2040;
|
||||
@ -137,7 +137,7 @@ void Scene2000::initPlayer() {
|
||||
|
||||
if ((R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) && (R2_GLOBALS._spillLocation[R2_QUINN] == R2_GLOBALS._spillLocation[R2_SEEKER])) {
|
||||
_object1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_object1.setup(20, 5, 1);
|
||||
_object1.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -601,25 +601,25 @@ void Scene2000::SouthExit::changeScene() {
|
||||
|
||||
switch (scene->_mazePlayerMode) {
|
||||
case 4:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2003, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2023, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 6:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2007, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2027, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 8:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2011, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2031, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 11:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->_sceneMode = 2039;
|
||||
else
|
||||
scene->_sceneMode = 2041;
|
||||
@ -666,19 +666,19 @@ void Scene2000::NorthExit::changeScene() {
|
||||
|
||||
switch (scene->_mazePlayerMode) {
|
||||
case 5:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2006, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2026, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 7:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2010, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2030, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 9:
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2014, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2034, &R2_GLOBALS._player, NULL);
|
||||
@ -698,56 +698,56 @@ void Scene2000::DoorExit::changeScene() {
|
||||
switch (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex]) {
|
||||
case 3:
|
||||
scene->_mazePlayerMode = 1;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2015, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2035, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 4:
|
||||
scene->_mazePlayerMode = 7;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2017, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2037, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 10:
|
||||
scene->_mazePlayerMode = 8;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2015, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2035, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 12:
|
||||
scene->_mazePlayerMode = 3;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2017, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2037, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 16:
|
||||
scene->_mazePlayerMode = 4;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2015, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2035, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 21:
|
||||
scene->_mazePlayerMode = 5;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2015, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2035, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 25:
|
||||
scene->_mazePlayerMode = 2;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2017, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2037, &R2_GLOBALS._player, NULL);
|
||||
break;
|
||||
case 34:
|
||||
scene->_mazePlayerMode = 6;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2017, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2037, &R2_GLOBALS._player, NULL);
|
||||
@ -791,7 +791,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setup(2008, 3, 1);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -1063,7 +1063,7 @@ void Scene2350::ExitUp::changeScene() {
|
||||
|
||||
R2_GLOBALS._player.disableControl(CURSOR_CROSSHAIRS);
|
||||
scene->_sceneMode = 12;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2350, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2352, &R2_GLOBALS._player, NULL);
|
||||
@ -1099,7 +1099,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setup(2008, 3, 1);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -1109,7 +1109,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_actor2.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_actor2.setup(20, 5, 1);
|
||||
_actor2.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -1139,7 +1139,7 @@ void Scene2350::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._oldCharacterScene[R2_GLOBALS._player._characterIndex] == 2000) {
|
||||
if (R2_GLOBALS._spillLocation[R2_GLOBALS._player._characterIndex] == 34) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_sceneMode = 2351;
|
||||
else
|
||||
_sceneMode = 2353;
|
||||
@ -1392,7 +1392,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setVisage(2008);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -1402,7 +1402,7 @@ void Scene2425::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_pictographs1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_pictographs1.setup(20, 5, 1);
|
||||
_pictographs1.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -1556,7 +1556,7 @@ void Scene2430::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setVisage(2008);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -1567,7 +1567,7 @@ void Scene2430::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_actor1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_actor1.setup(20, 5, 1);
|
||||
_actor1.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -1657,7 +1657,7 @@ bool Scene2435::Astor::startAction(CursorType action, Event &event) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
scene->_sceneMode = 20;
|
||||
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
|
||||
if ((R2_GLOBALS._player._characterIndex == 1) || (R2_GLOBALS.getFlag(82))) {
|
||||
if ((R2_GLOBALS._player._characterIndex == R2_QUINN) || (R2_GLOBALS.getFlag(82))) {
|
||||
scene->_stripManager.start(605, scene);
|
||||
return true;
|
||||
} else if (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2) {
|
||||
@ -1771,7 +1771,7 @@ void Scene2435::signal() {
|
||||
_sceneMode = 2436;
|
||||
R2_GLOBALS._player.setStrip(7);
|
||||
_companion.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_companion.setVisage(20);
|
||||
else
|
||||
_companion.setVisage(2008);
|
||||
@ -1839,7 +1839,7 @@ void Scene2440::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.enableControl();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setVisage(2008);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -1849,7 +1849,7 @@ void Scene2440::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.setPosition(Common::Point(210, 200));
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_actor1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_actor1.setup(20, 5, 1);
|
||||
_actor1.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -1927,7 +1927,7 @@ void Scene2445::signal() {
|
||||
bool Scene2450::Parker::startAction(CursorType action, Event &event) {
|
||||
Scene2450 *scene = (Scene2450 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
if ((action == CURSOR_USE) && (R2_GLOBALS._player._characterIndex == 1)) {
|
||||
if ((action == CURSOR_USE) && (R2_GLOBALS._player._characterIndex == R2_QUINN)) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
scene->_sceneMode = 2452;
|
||||
scene->setAction(&scene->_sequenceManager, scene, 2452, &R2_GLOBALS._player, &scene->_parker, NULL);
|
||||
@ -1945,7 +1945,7 @@ bool Scene2450::CareTaker::startAction(CursorType action, Event &event) {
|
||||
++R2_GLOBALS._v565AE;
|
||||
scene->_sceneMode = 20;
|
||||
R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS);
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
scene->_stripManager.start(699 + (R2_GLOBALS._v565AE * 2), scene);
|
||||
else
|
||||
scene->_stripManager.start(700 + (R2_GLOBALS._v565AE * 2), scene);
|
||||
@ -2017,7 +2017,7 @@ void Scene2450::postInit(SceneObjectList *OwnerList) {
|
||||
break;
|
||||
case 2000:
|
||||
_sceneMode = 2451;
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
if (R2_GLOBALS._player._characterScene[R2_SEEKER] == 2450) {
|
||||
_companion.postInit();
|
||||
_companion.setup(20, 6, 1);
|
||||
@ -2041,7 +2041,7 @@ void Scene2450::postInit(SceneObjectList *OwnerList) {
|
||||
}
|
||||
break;
|
||||
case 2450:
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.postInit();
|
||||
if (R2_GLOBALS.getFlag(61)) {
|
||||
R2_GLOBALS._player.setup(2008, 6, 1);
|
||||
@ -2111,7 +2111,7 @@ void Scene2450::postInit(SceneObjectList *OwnerList) {
|
||||
break;
|
||||
default:
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
if (R2_GLOBALS.getFlag(61)) {
|
||||
R2_GLOBALS._player.setup(2008, 3, 1);
|
||||
} else {
|
||||
@ -2429,7 +2429,7 @@ void Scene2500::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setVisage(11);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(2, 1);
|
||||
} else {
|
||||
@ -2439,7 +2439,7 @@ void Scene2500::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_actor1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_actor1.setup(21, 3, 1);
|
||||
_actor1.setDetails(9002, 1, -1, -1, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -2568,7 +2568,7 @@ void Scene2525::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setup(2008, 3, 1);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -2578,7 +2578,7 @@ void Scene2525::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_actor1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_actor1.setup(20, 5, 1);
|
||||
_actor1.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -2729,7 +2729,7 @@ void Scene2530::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setVisage(2008);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -2740,7 +2740,7 @@ void Scene2530::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_actor1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_actor1.setup(20, 5, 1);
|
||||
_actor1.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
@ -2892,7 +2892,7 @@ void Scene2535::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
R2_GLOBALS._player.setVisage(2008);
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -2903,7 +2903,7 @@ void Scene2535::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
if (R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) {
|
||||
_companion.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_companion.setup(20, 5, 1);
|
||||
_companion.setDetails(9002, 0, 4, 3, 1, (SceneItem *)NULL);
|
||||
} else {
|
||||
|
@ -334,7 +334,7 @@ void Scene3125::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._sound1.play(262);
|
||||
R2_GLOBALS._player.postInit();
|
||||
|
||||
if (R2_GLOBALS._player._oldCharacterScene[3] == 3250) {
|
||||
if (R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] == 3250) {
|
||||
_sceneMode = 3175;
|
||||
setAction(&_sequenceManager1, this, 3175, &R2_GLOBALS._player, &_door, NULL);
|
||||
} else {
|
||||
@ -343,7 +343,7 @@ void Scene3125::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.setPosition(Common::Point(89, 76));
|
||||
R2_GLOBALS._player.enableControl();
|
||||
}
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3125;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3125;
|
||||
}
|
||||
|
||||
void Scene3125::signal() {
|
||||
@ -545,7 +545,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) {
|
||||
if (R2_GLOBALS._sceneManager._previousScene == -1) {
|
||||
R2_INVENTORY.setObjectScene(R2_ANCIENT_SCROLLS, 2000);
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 3100;
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 0;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 0;
|
||||
R2_GLOBALS._player._characterIndex = R2_MIRANDA;
|
||||
}
|
||||
SceneExt::postInit();
|
||||
@ -708,7 +708,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) {
|
||||
}
|
||||
}
|
||||
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3150;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3150;
|
||||
}
|
||||
|
||||
void Scene3150::signal() {
|
||||
@ -910,7 +910,7 @@ void Scene3175::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
|
||||
if (R2_GLOBALS._player._oldCharacterScene[3] == 3250) {
|
||||
if (R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] == 3250) {
|
||||
R2_GLOBALS._player.setup(30, 5, 1);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(126, 77));
|
||||
@ -920,7 +920,7 @@ void Scene3175::postInit(SceneObjectList *OwnerList) {
|
||||
setAction(&_sequenceManager, this, 3175, &R2_GLOBALS._player, &_door, NULL);
|
||||
}
|
||||
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3175;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3175;
|
||||
}
|
||||
|
||||
void Scene3175::signal() {
|
||||
@ -1165,7 +1165,7 @@ void Scene3250::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(3250);
|
||||
|
||||
if (R2_GLOBALS._sceneManager._previousScene == -1) {
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 1200;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 1200;
|
||||
R2_GLOBALS._player._characterIndex = R2_MIRANDA;
|
||||
}
|
||||
|
||||
@ -1195,7 +1195,7 @@ void Scene3250::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
|
||||
switch (R2_GLOBALS._player._oldCharacterScene[3]) {
|
||||
switch (R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA]) {
|
||||
case 1200:
|
||||
_sceneMode = 3250;
|
||||
_actor4.postInit();
|
||||
@ -1234,7 +1234,7 @@ void Scene3250::postInit(SceneObjectList *OwnerList) {
|
||||
break;
|
||||
}
|
||||
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3250;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3250;
|
||||
}
|
||||
|
||||
void Scene3250::signal() {
|
||||
@ -1305,7 +1305,7 @@ void Scene3255::postInit(SceneObjectList *OwnerList) {
|
||||
_sceneMode = 3255;
|
||||
setAction(&_sequenceManager, this, 3255, &R2_GLOBALS._player, NULL);
|
||||
}
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3255;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3255;
|
||||
}
|
||||
|
||||
void Scene3255::signal() {
|
||||
@ -1512,7 +1512,7 @@ void Scene3260::postInit(SceneObjectList *OwnerList) {
|
||||
_item1.setDetails(Rect(0, 0, 320, 200), 3260, 0, 1, 2, 1, NULL);
|
||||
R2_GLOBALS._player.postInit();
|
||||
|
||||
if (R2_GLOBALS._player._oldCharacterScene[3] == 3275) {
|
||||
if (R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] == 3275) {
|
||||
_sceneMode = 3270;
|
||||
setAction(&_sequenceManager, this, 3270, &R2_GLOBALS._player, &_door, NULL);
|
||||
} else {
|
||||
@ -1522,7 +1522,7 @@ void Scene3260::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
R2_GLOBALS._player.enableControl();
|
||||
}
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3260;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3260;
|
||||
}
|
||||
|
||||
void Scene3260::remove() {
|
||||
@ -1614,7 +1614,7 @@ void Scene3275::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._scrollFollower = &R2_GLOBALS._player;
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.disableControl();
|
||||
if (R2_GLOBALS._player._oldCharacterScene[3] == 3150) {
|
||||
if (R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] == 3150) {
|
||||
_sceneMode = 11;
|
||||
R2_GLOBALS._player.setup(30, 3, 1);
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
@ -1623,7 +1623,7 @@ void Scene3275::postInit(SceneObjectList *OwnerList) {
|
||||
Common::Point pt(418, 128);
|
||||
NpcMover *mover = new NpcMover();
|
||||
R2_GLOBALS._player.addMover(mover, &pt, this);
|
||||
} else if (R2_GLOBALS._player._oldCharacterScene[3] == 3260) {
|
||||
} else if (R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] == 3260) {
|
||||
_sceneMode = 3276;
|
||||
setAction(&_sequenceManager, this, 3276, &R2_GLOBALS._player, &_door, NULL);
|
||||
} else {
|
||||
@ -1633,7 +1633,7 @@ void Scene3275::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
R2_GLOBALS._player.enableControl();
|
||||
}
|
||||
R2_GLOBALS._player._oldCharacterScene[3] = 3275;
|
||||
R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 3275;
|
||||
}
|
||||
|
||||
void Scene3275::signal() {
|
||||
@ -1813,7 +1813,7 @@ bool Scene3375::Companion2::startAction(CursorType action, Event &event) {
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
scene->_sceneMode = 9999;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
scene->_stripManager.start(3302, scene);
|
||||
else
|
||||
scene->_stripManager.start(3304, scene);
|
||||
@ -1828,7 +1828,7 @@ bool Scene3375::Companion1::startAction(CursorType action, Event &event) {
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
scene->_sceneMode = 9999;
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
scene->_stripManager.start(3302, scene);
|
||||
else
|
||||
scene->_stripManager.start(3301, scene);
|
||||
@ -2241,7 +2241,7 @@ bool Scene3385::Companion1::startAction(CursorType action, Event &event) {
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
scene->_sceneMode = 9999;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
scene->_stripManager.start(3302, scene);
|
||||
else
|
||||
scene->_stripManager.start(3304, scene);
|
||||
@ -2256,7 +2256,7 @@ bool Scene3385::Companion2::startAction(CursorType action, Event &event) {
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
scene->_sceneMode = 9999;
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
scene->_stripManager.start(3302, scene);
|
||||
else
|
||||
scene->_stripManager.start(3301, scene);
|
||||
@ -2333,7 +2333,7 @@ void Scene3385::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS._player._characterScene[R2_QUINN] = 3385;
|
||||
R2_GLOBALS._player._characterScene[R2_SEEKER] = 3385;
|
||||
R2_GLOBALS._player._characterScene[3] = 3385;
|
||||
R2_GLOBALS._player._characterScene[R2_MIRANDA] = 3385;
|
||||
|
||||
if (R2_GLOBALS._sceneManager._previousScene == 3375)
|
||||
_field11B2 = 3;
|
||||
@ -2343,16 +2343,16 @@ void Scene3385::postInit(SceneObjectList *OwnerList) {
|
||||
setZoomPercents(102, 40, 200, 160);
|
||||
R2_GLOBALS._player.postInit();
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
|
||||
else
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
|
||||
R2_GLOBALS._player.changeZoom(-1);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
R2_GLOBALS._player.setup(20, _field11B2, 1);
|
||||
else if (R2_GLOBALS._player._characterIndex == 3)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
R2_GLOBALS._player.setup(30, _field11B2, 1);
|
||||
else
|
||||
R2_GLOBALS._player.setup(10, _field11B2, 1);
|
||||
@ -2361,7 +2361,7 @@ void Scene3385::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
|
||||
_companion1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_companion1._moveRate = 10;
|
||||
_companion1._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -2370,7 +2370,7 @@ void Scene3385::postInit(SceneObjectList *OwnerList) {
|
||||
}
|
||||
_companion1.changeZoom(-1);
|
||||
_companion1._effect = 1;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_companion1.setup(10, _field11B2, 1);
|
||||
else
|
||||
_companion1.setup(20, _field11B2, 1);
|
||||
@ -2381,7 +2381,7 @@ void Scene3385::postInit(SceneObjectList *OwnerList) {
|
||||
_companion2._moveDiff = Common::Point(3, 2);
|
||||
_companion2.changeZoom(-1);
|
||||
_companion2._effect = 1;
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_companion2.setup(10, _field11B2, 1);
|
||||
else
|
||||
_companion2.setup(30, _field11B2, 1);
|
||||
@ -2478,7 +2478,7 @@ bool Scene3395::Companion1::startAction(CursorType action, Event &event) {
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
scene->_sceneMode = 9999;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
scene->_stripManager.start(3302, scene);
|
||||
else
|
||||
scene->_stripManager.start(3304, scene);
|
||||
@ -2493,7 +2493,7 @@ bool Scene3395::Companion2::startAction(CursorType action, Event &event) {
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
scene->_sceneMode = 9999;
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
scene->_stripManager.start(3302, scene);
|
||||
else
|
||||
scene->_stripManager.start(3301, scene);
|
||||
@ -2556,7 +2556,7 @@ void Scene3395::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS._player._characterScene[R2_QUINN] = 3395;
|
||||
R2_GLOBALS._player._characterScene[R2_SEEKER] = 3395;
|
||||
R2_GLOBALS._player._characterScene[3] = 3395;
|
||||
R2_GLOBALS._player._characterScene[R2_MIRANDA] = 3395;
|
||||
|
||||
if (R2_GLOBALS._sceneManager._previousScene == 3385)
|
||||
_field142E = 3;
|
||||
@ -2566,16 +2566,16 @@ void Scene3395::postInit(SceneObjectList *OwnerList) {
|
||||
setZoomPercents(51, 40, 200, 137);
|
||||
R2_GLOBALS._player.postInit();
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
|
||||
else
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
|
||||
R2_GLOBALS._player.changeZoom(-1);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
R2_GLOBALS._player.setup(20, _field142E, 1);
|
||||
else if (R2_GLOBALS._player._characterIndex == 3)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
R2_GLOBALS._player.setup(30, _field142E, 1);
|
||||
else
|
||||
R2_GLOBALS._player.setup(10, _field142E, 1);
|
||||
@ -2584,7 +2584,7 @@ void Scene3395::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.disableControl();
|
||||
|
||||
_companion1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_companion1._moveRate = 10;
|
||||
_companion1._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
@ -2593,7 +2593,7 @@ void Scene3395::postInit(SceneObjectList *OwnerList) {
|
||||
}
|
||||
_companion1.changeZoom(-1);
|
||||
_companion1._effect = 1;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_companion1.setup(10, _field142E, 1);
|
||||
else
|
||||
_companion1.setup(20, _field142E, 1);
|
||||
@ -2680,9 +2680,10 @@ void Scene3395::signal() {
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 3400 -
|
||||
* Scene 3400 - Confrontation
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
Scene3400::Scene3400() {
|
||||
_field157C = 0;
|
||||
}
|
||||
@ -2714,7 +2715,7 @@ void Scene3400::postInit(SceneObjectList *OwnerList) {
|
||||
setZoomPercents(51, 46, 180, 200);
|
||||
R2_GLOBALS._player._characterScene[R2_QUINN] = 3400;
|
||||
R2_GLOBALS._player._characterScene[R2_SEEKER] = 3400;
|
||||
R2_GLOBALS._player._characterScene[3] = 3400;
|
||||
R2_GLOBALS._player._characterScene[R2_MIRANDA] = 3400;
|
||||
|
||||
_actor7.postInit();
|
||||
_actor7.setup(3403, 1, 1);
|
||||
@ -2722,16 +2723,16 @@ void Scene3400::postInit(SceneObjectList *OwnerList) {
|
||||
_actor7.fixPriority(89);
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
|
||||
else
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
R2_GLOBALS._player.changeZoom(-1);
|
||||
R2_GLOBALS._player.setPosition(Common::Point(239, 64));
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
R2_GLOBALS._player.setup(20, 5, 1);
|
||||
else if (R2_GLOBALS._player._characterIndex == 3)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
R2_GLOBALS._player.setup(30, 5, 1);
|
||||
else
|
||||
R2_GLOBALS._player.setup(10, 5, 1);
|
||||
@ -2739,42 +2740,42 @@ void Scene3400::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
|
||||
R2_GLOBALS._player.disableControl();
|
||||
|
||||
_actor1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
_actor1._numFrames = 10;
|
||||
_actor1._moveDiff = Common::Point(3, 2);
|
||||
_companion1.postInit();
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_companion1._numFrames = 10;
|
||||
_companion1._moveDiff = Common::Point(3, 2);
|
||||
} else {
|
||||
_actor1._numFrames = 7;
|
||||
_actor1._moveDiff = Common::Point(5, 3);
|
||||
_companion1._numFrames = 7;
|
||||
_companion1._moveDiff = Common::Point(5, 3);
|
||||
}
|
||||
_actor1.changeZoom(-1);
|
||||
_actor1._effect = 1;
|
||||
_actor1.setPosition(Common::Point(247, 63));
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
_actor1.setup(10, 5, 1);
|
||||
_companion1.changeZoom(-1);
|
||||
_companion1._effect = 1;
|
||||
_companion1.setPosition(Common::Point(247, 63));
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_companion1.setup(10, 5, 1);
|
||||
else
|
||||
_actor1.setup(20, 5, 1);
|
||||
_actor1.animate(ANIM_MODE_1, NULL);
|
||||
_companion1.setup(20, 5, 1);
|
||||
_companion1.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
_actor2.postInit();
|
||||
_actor2._moveDiff = Common::Point(3, 2);
|
||||
_actor2.changeZoom(-1);
|
||||
_actor2._effect = 1;
|
||||
_actor2.setPosition(Common::Point(225, 63));
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
_actor2.setup(10, 5, 1);
|
||||
_companion2.postInit();
|
||||
_companion2._moveDiff = Common::Point(3, 2);
|
||||
_companion2.changeZoom(-1);
|
||||
_companion2._effect = 1;
|
||||
_companion2.setPosition(Common::Point(225, 63));
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_companion2.setup(10, 5, 1);
|
||||
else
|
||||
_actor2.setup(30, 5, 1);
|
||||
_actor2.animate(ANIM_MODE_1, NULL);
|
||||
_companion2.setup(30, 5, 1);
|
||||
_companion2.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
_actor3.postInit();
|
||||
_actor3._numFrames = 7;
|
||||
_actor3._moveDiff = Common::Point(5, 3);
|
||||
_actor3.changeZoom(-1);
|
||||
_actor3._effect = 1;
|
||||
_actor3.setPosition(Common::Point(235, 61));
|
||||
_actor3.setup(40, 3, 1);
|
||||
_actor3.animate(ANIM_MODE_1, NULL);
|
||||
_webbster.postInit();
|
||||
_webbster._numFrames = 7;
|
||||
_webbster._moveDiff = Common::Point(5, 3);
|
||||
_webbster.changeZoom(-1);
|
||||
_webbster._effect = 1;
|
||||
_webbster.setPosition(Common::Point(235, 61));
|
||||
_webbster.setup(40, 3, 1);
|
||||
_webbster.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
_actor6.postInit();
|
||||
_actor6.setup(3400, 1, 6);
|
||||
@ -2784,7 +2785,7 @@ void Scene3400::postInit(SceneObjectList *OwnerList) {
|
||||
|
||||
R2_GLOBALS.clearFlag(71);
|
||||
_sceneMode = 3400;
|
||||
setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor3, NULL);
|
||||
setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_companion1, &_companion2, &_webbster, NULL);
|
||||
}
|
||||
|
||||
void Scene3400::remove() {
|
||||
@ -2798,30 +2799,30 @@ void Scene3400::signal() {
|
||||
case 3305: {
|
||||
warning("STUB: sub_1D227()");
|
||||
_tealSpeaker._object1.hide();
|
||||
_actor4.show();
|
||||
_actor4.setStrip(1);
|
||||
_teal.show();
|
||||
_teal.setStrip(1);
|
||||
Common::Point pt(158, 190);
|
||||
NpcMover *mover = new NpcMover();
|
||||
_actor4.addMover(mover, &pt, this);
|
||||
_teal.addMover(mover, &pt, this);
|
||||
_sceneMode = 3402;
|
||||
setAction(&_sequenceManager, this, 3402, &R2_GLOBALS._player, &_actor1, &_actor2, &_actor3, NULL);
|
||||
setAction(&_sequenceManager, this, 3402, &R2_GLOBALS._player, &_companion1, &_companion2, &_webbster, NULL);
|
||||
}
|
||||
break;
|
||||
case 3306:
|
||||
R2_GLOBALS._sound2.play(318);
|
||||
_actor1.setStrip(2);
|
||||
_companion1.setStrip(2);
|
||||
R2_GLOBALS._player.setStrip(6);
|
||||
_actor2.setStrip(6);
|
||||
_actor3.setStrip(3);
|
||||
_actor4.setStrip(1);
|
||||
_companion2.setStrip(6);
|
||||
_webbster.setStrip(3);
|
||||
_teal.setStrip(1);
|
||||
R2_INVENTORY.setObjectScene(R2_SAPPHIRE_BLUE, 0);
|
||||
_stripManager.start(3307, this);
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_sceneMode = 3400;
|
||||
R2_GLOBALS._player.setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_actor4, &_actor8, NULL);
|
||||
R2_GLOBALS._player.setAction(&_sequenceManager, this, 3400, &R2_GLOBALS._player, &_teal, &_actor8, NULL);
|
||||
} else {
|
||||
_sceneMode = 3408;
|
||||
_actor1.setAction(&_sequenceManager, this, 3408, &_actor1, &_actor4, &_actor8, NULL);
|
||||
_companion1.setAction(&_sequenceManager, this, 3408, &_companion1, &_teal, &_actor8, NULL);
|
||||
}
|
||||
break;
|
||||
case 3307:
|
||||
@ -2837,63 +2838,63 @@ void Scene3400::signal() {
|
||||
break;
|
||||
case 3308:
|
||||
warning("STUB: sub_1D227()");
|
||||
_actor1.setStrip(2);
|
||||
_companion1.setStrip(2);
|
||||
R2_GLOBALS._player.setStrip(6);
|
||||
_actor2.setStrip(6);
|
||||
_actor3.setStrip(3);
|
||||
_actor4.setStrip(1);
|
||||
_companion2.setStrip(6);
|
||||
_webbster.setStrip(3);
|
||||
_teal.setStrip(1);
|
||||
_sceneMode = 3403;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
setAction(&_sequenceManager, this, 3403, &R2_GLOBALS._player, &_actor3, &_actor7, NULL);
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
setAction(&_sequenceManager, this, 3403, &R2_GLOBALS._player, &_webbster, &_actor7, NULL);
|
||||
else
|
||||
setAction(&_sequenceManager, this, 3403, &_actor1, &_actor3, &_actor7, NULL);
|
||||
setAction(&_sequenceManager, this, 3403, &_companion1, &_webbster, &_actor7, NULL);
|
||||
break;
|
||||
case 3309:
|
||||
warning("STUB: sub_1D227()");
|
||||
_actor4.setStrip(1);
|
||||
_teal.setStrip(1);
|
||||
_sceneMode = 3405;
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
setAction(&_sequenceManager, this, 3405, &R2_GLOBALS._player, &_actor7, NULL);
|
||||
else
|
||||
setAction(&_sequenceManager, this, 3405, &_actor2, &_actor7, NULL);
|
||||
setAction(&_sequenceManager, this, 3405, &_companion2, &_actor7, NULL);
|
||||
break;
|
||||
case 3310:
|
||||
warning("STUB: sub_1D227()");
|
||||
_actor4.setStrip(1);
|
||||
_teal.setStrip(1);
|
||||
_sceneMode = 3406;
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
setAction(&_sequenceManager, this, 3406, &R2_GLOBALS._player, &_actor7, NULL);
|
||||
else if (R2_GLOBALS._player._characterIndex == 2)
|
||||
setAction(&_sequenceManager, this, 3406, &_actor1, &_actor7, NULL);
|
||||
else if (R2_GLOBALS._player._characterIndex == 3)
|
||||
setAction(&_sequenceManager, this, 3406, &_actor2, &_actor7, NULL);
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
setAction(&_sequenceManager, this, 3406, &_companion1, &_actor7, NULL);
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
setAction(&_sequenceManager, this, 3406, &_companion2, &_actor7, NULL);
|
||||
break;
|
||||
case 3311:
|
||||
warning("STUB: sub_1D227()");
|
||||
_tealSpeaker._object1.hide();
|
||||
_actor4.show();
|
||||
_actor4.setStrip(1);
|
||||
_teal.show();
|
||||
_teal.setStrip(1);
|
||||
_sceneMode = 3407;
|
||||
setAction(&_sequenceManager, this, 3407, &_actor4, &_actor7, NULL);
|
||||
setAction(&_sequenceManager, this, 3407, &_teal, &_actor7, NULL);
|
||||
break;
|
||||
case 3400: {
|
||||
_actor8.postInit();
|
||||
_actor8.hide();
|
||||
_actor4.postInit();
|
||||
_actor4._numFrames = 7;
|
||||
_actor4._moveDiff = Common::Point(3, 2);
|
||||
_actor4.changeZoom(-1);
|
||||
_actor4._effect = 1;
|
||||
_actor4.setPosition(Common::Point(-15, 90));
|
||||
_actor4.setup(3402, 1, 1);
|
||||
_actor4.animate(ANIM_MODE_1, NULL);
|
||||
_teal.postInit();
|
||||
_teal._numFrames = 7;
|
||||
_teal._moveDiff = Common::Point(3, 2);
|
||||
_teal.changeZoom(-1);
|
||||
_teal._effect = 1;
|
||||
_teal.setPosition(Common::Point(-15, 90));
|
||||
_teal.setup(3402, 1, 1);
|
||||
_teal.animate(ANIM_MODE_1, NULL);
|
||||
Common::Point pt1(115, 90);
|
||||
NpcMover *mover1 = new NpcMover();
|
||||
_actor4.addMover(mover1, &pt1, this);
|
||||
R2_GLOBALS._scrollFollower = &_actor4;
|
||||
_teal.addMover(mover1, &pt1, this);
|
||||
R2_GLOBALS._scrollFollower = &_teal;
|
||||
Common::Point pt2(203, 76);
|
||||
NpcMover *mover2 = new NpcMover();
|
||||
_actor3.addMover(mover2, &pt2, NULL);
|
||||
_webbster.addMover(mover2, &pt2, NULL);
|
||||
_sceneMode = 3401;
|
||||
}
|
||||
break;
|
||||
@ -4228,15 +4229,16 @@ void Scene3500::dispatch() {
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 3600 -
|
||||
* Scene 3600 - Cutscene - walking at gunpoint
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
Scene3600::Scene3600() {
|
||||
_field2548 = 0;
|
||||
_field254A = 0;
|
||||
_field254C = 0;
|
||||
_field254E = 0;
|
||||
_field2550 = false;
|
||||
_ghoulTeleported = false;
|
||||
}
|
||||
void Scene3600::synchronize(Serializer &s) {
|
||||
SceneExt::synchronize(s);
|
||||
@ -4245,7 +4247,7 @@ void Scene3600::synchronize(Serializer &s) {
|
||||
s.syncAsSint16LE(_field254A);
|
||||
s.syncAsSint16LE(_field254C);
|
||||
s.syncAsSint16LE(_field254E);
|
||||
s.syncAsSint16LE(_field2550);
|
||||
s.syncAsSint16LE(_ghoulTeleported);
|
||||
}
|
||||
|
||||
Scene3600::Action3600::Action3600() {
|
||||
@ -4275,8 +4277,8 @@ void Scene3600::Action3600::signal() {
|
||||
R2_GLOBALS._sound2.play(330, NULL, 0);
|
||||
R2_GLOBALS._sound2.fade(127, 5, 10, false, NULL);
|
||||
}
|
||||
|
||||
setDelay(1);
|
||||
warning("TODO: Palette fader using parameter 2 = 256");
|
||||
R2_GLOBALS._scenePalette.fade((const byte *)&scene->_palette1._palette, true, _field20);
|
||||
if (_field20 > 0)
|
||||
_field20 -= 2;
|
||||
@ -4304,14 +4306,14 @@ void Scene3600::Action2::signal() {
|
||||
R2_GLOBALS._events.proc1();
|
||||
R2_GLOBALS._player.enableControl();
|
||||
_actionIndex = 3619;
|
||||
scene->_actor13._state = 0;
|
||||
scene->_protector._state = 0;
|
||||
// No break on purpose
|
||||
case 3619: {
|
||||
++_actionIndex;
|
||||
scene->_actor13.setup(3127, 2, 1);
|
||||
scene->_actor13.animate(ANIM_MODE_1, NULL);
|
||||
scene->_protector.setup(3127, 2, 1);
|
||||
scene->_protector.animate(ANIM_MODE_1, NULL);
|
||||
NpcMover *mover = new NpcMover();
|
||||
scene->_actor13.addMover(mover, &scene->_actor13._field8A, scene);
|
||||
scene->_protector.addMover(mover, &scene->_protector._field8A, scene);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -4337,9 +4339,9 @@ bool Scene3600::Item5::startAction(CursorType action, Event &event) {
|
||||
scene->_actor12.setStrip2(-1);
|
||||
scene->_actor4.setStrip2(-1);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
R2_GLOBALS._player.setAction(&scene->_sequenceManager3, scene, 3611, &R2_GLOBALS._player, NULL);
|
||||
else if (R2_GLOBALS._player._characterIndex == 3)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
R2_GLOBALS._player.setAction(&scene->_sequenceManager4, scene, 3612, &R2_GLOBALS._player, NULL);
|
||||
else
|
||||
R2_GLOBALS._player.setAction(&scene->_sequenceManager2, scene, 3610, &R2_GLOBALS._player, NULL);
|
||||
@ -4347,12 +4349,12 @@ bool Scene3600::Item5::startAction(CursorType action, Event &event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Scene3600::Actor13::startAction(CursorType action, Event &event) {
|
||||
bool Scene3600::Protector::startAction(CursorType action, Event &event) {
|
||||
Scene3600 *scene = (Scene3600 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch(action) {
|
||||
case CURSOR_TALK:
|
||||
if (!_action)
|
||||
if (_action)
|
||||
return SceneActor::startAction(action, event);
|
||||
|
||||
scene->_protectorSpeaker._displayMode = 1;
|
||||
@ -4379,6 +4381,7 @@ bool Scene3600::Actor13::startAction(CursorType action, Event &event) {
|
||||
R2_GLOBALS._sound3.play(43);
|
||||
else
|
||||
R2_GLOBALS._sound3.play(99);
|
||||
|
||||
if (_state != 0) {
|
||||
_state = 1;
|
||||
setup(3128, 1, 1);
|
||||
@ -4424,7 +4427,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
|
||||
setZoomPercents(142, 80, 167, 105);
|
||||
R2_GLOBALS._player._characterScene[R2_QUINN] = 3600;
|
||||
R2_GLOBALS._player._characterScene[R2_SEEKER] = 3600;
|
||||
R2_GLOBALS._player._characterScene[3] = 3600;
|
||||
R2_GLOBALS._player._characterScene[R2_MIRANDA] = 3600;
|
||||
|
||||
_item2.setDetails(33, 3600, 6, -1, -1);
|
||||
_item3.setDetails(Rect(3, 3, 22, 45), 3600, 9, -1, -1, 1, NULL);
|
||||
@ -4498,7 +4501,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
|
||||
_actor12.setup(30, 5, 11);
|
||||
_actor12.animate(ANIM_MODE_1, NULL);
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_actor10.setPosition(Common::Point(76, 148));
|
||||
_actor11.setPosition(Common::Point(134, 148));
|
||||
_actor12.setPosition(Common::Point(100, 148));
|
||||
@ -4506,7 +4509,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
|
||||
R2_GLOBALS._player.setup(20, _actor11._strip, 1);
|
||||
R2_GLOBALS._player.setPosition(_actor11._position);
|
||||
_actor11.hide();
|
||||
} else if (R2_GLOBALS._player._characterIndex == 3) {
|
||||
} else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA) {
|
||||
_actor10.setPosition(Common::Point(110, 148));
|
||||
_actor11.setPosition(Common::Point(76, 148));
|
||||
_actor12.setPosition(Common::Point(134, 148));
|
||||
@ -4531,14 +4534,14 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
|
||||
_actor5.setup(3601, 7, 5);
|
||||
|
||||
if (!R2_GLOBALS.getFlag(71)) {
|
||||
_actor13.postInit();
|
||||
_actor13._state = 0;
|
||||
_actor13._field8A = Common::Point(226, 152);
|
||||
_actor13._moveDiff = Common::Point(3, 2);
|
||||
_actor13.setPosition(Common::Point(284, 152));
|
||||
_actor13.setup(3127, 2, 1);
|
||||
_actor13.changeZoom(-1);
|
||||
_actor13.setDetails(3600, 15, -1, 17, 1, (SceneItem *) NULL);
|
||||
_protector.postInit();
|
||||
_protector._state = 0;
|
||||
_protector._field8A = Common::Point(226, 152);
|
||||
_protector._moveDiff = Common::Point(3, 2);
|
||||
_protector.setPosition(Common::Point(284, 152));
|
||||
_protector.setup(3127, 2, 1);
|
||||
_protector.changeZoom(-1);
|
||||
_protector.setDetails(3600, 15, -1, 17, 1, (SceneItem *) NULL);
|
||||
}
|
||||
|
||||
R2_GLOBALS._sound2.play(330);
|
||||
@ -4575,9 +4578,8 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
|
||||
_actor5.setup(3403, 8, 11);
|
||||
_actor5.setPosition(Common::Point(403, 155));
|
||||
|
||||
_actor12.setup(3403, 7, 1);
|
||||
|
||||
_actor13.setPosition(Common::Point(405, 155));
|
||||
_protector.setup(3403, 7, 1);
|
||||
_protector.setPosition(Common::Point(405, 155));
|
||||
|
||||
_actor2.postInit();
|
||||
_actor2.setup(3600, 2, 1);
|
||||
@ -4593,7 +4595,7 @@ void Scene3600::postInit(SceneObjectList *OwnerList) {
|
||||
_field254E = 0;
|
||||
}
|
||||
_field254E = 0;
|
||||
_field2550 = R2_GLOBALS.getFlag(71);
|
||||
_ghoulTeleported = R2_GLOBALS.getFlag(71);
|
||||
|
||||
R2_GLOBALS._sound1.play(326);
|
||||
_item1.setDetails(Rect(0, 0, 480, 200), 3600, 0, -1, -1, 1, NULL);
|
||||
@ -4611,15 +4613,15 @@ void Scene3600::remove() {
|
||||
void Scene3600::signal() {
|
||||
switch (_sceneMode) {
|
||||
case 3320:
|
||||
warning("STUB: sub_1D227()");
|
||||
// TODO: warning("STUB: sub_1D227()");
|
||||
R2_GLOBALS._walkRegions.disableRegion(14);
|
||||
R2_GLOBALS._scrollFollower = &_actor11;
|
||||
_tealSpeaker._object1.hide();
|
||||
_actor5.show();
|
||||
_actor5.setStrip(2);
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_sceneMode = 3602;
|
||||
else if (R2_GLOBALS._player._characterIndex == 3)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_sceneMode = 3603;
|
||||
else
|
||||
_sceneMode = 3601;
|
||||
@ -4643,7 +4645,7 @@ void Scene3600::signal() {
|
||||
_tealSpeaker._displayMode = 7;
|
||||
R2_GLOBALS._scrollFollower = &_actor5;
|
||||
_sceneMode = 3605;
|
||||
setAction(&_sequenceManager1, this, _sceneMode, &_actor5, &_actor13, &_actor2, NULL);
|
||||
setAction(&_sequenceManager1, this, _sceneMode, &_actor5, &_protector, &_actor2, NULL);
|
||||
break;
|
||||
case 3323:
|
||||
if (_field254A == 0)
|
||||
@ -4651,15 +4653,18 @@ void Scene3600::signal() {
|
||||
else {
|
||||
warning("STUB: sub_1D227()");
|
||||
_protectorSpeaker.proc16();
|
||||
_actor13.show();
|
||||
_actor13.setup(3258, 6, 1);
|
||||
_protector.show();
|
||||
_protector.setup(3258, 6, 1);
|
||||
|
||||
_sceneMode = 3607;
|
||||
_actor13.setAction(&_sequenceManager1, this, _sceneMode, &_actor13, NULL);
|
||||
_protector.setAction(&_sequenceManager1, this, _sceneMode, &_protector, NULL);
|
||||
|
||||
R2_GLOBALS._v558C2 = 1;
|
||||
_protectorSpeaker.proc16();
|
||||
_protectorSpeaker._displayMode = 1;
|
||||
_quinnSpeaker._displayMode = 1;
|
||||
_actor13.show();
|
||||
_protector.show();
|
||||
|
||||
R2_GLOBALS._scrollFollower = &R2_GLOBALS._player;
|
||||
R2_GLOBALS._walkRegions.enableRegion(17);
|
||||
R2_GLOBALS._walkRegions.enableRegion(18);
|
||||
@ -4668,7 +4673,8 @@ void Scene3600::signal() {
|
||||
R2_GLOBALS._walkRegions.disableRegion(14);
|
||||
R2_GLOBALS._walkRegions.disableRegion(15);
|
||||
R2_GLOBALS._walkRegions.disableRegion(16);
|
||||
_actor13.setAction(&_action1);
|
||||
|
||||
_actor3.setAction(&_action1);
|
||||
}
|
||||
break;
|
||||
case 3324:
|
||||
@ -4676,7 +4682,7 @@ void Scene3600::signal() {
|
||||
case 3607:
|
||||
g_globals->_events.setCursor(CURSOR_ARROW);
|
||||
R2_GLOBALS._player.enableControl(CURSOR_WALK);
|
||||
_actor13.fixPriority(-1);
|
||||
_protector.fixPriority(-1);
|
||||
_sceneMode = 3623;
|
||||
_field2548 = 1;
|
||||
break;
|
||||
@ -4689,7 +4695,8 @@ void Scene3600::signal() {
|
||||
R2_GLOBALS._sound1.stop();
|
||||
_actor1.hide();
|
||||
_actor6.hide();
|
||||
g_globals->gfxManager()._bounds.moveTo(Common::Point(40, 0));
|
||||
|
||||
_sceneBounds = Rect(40, 0, SCREEN_WIDTH + 40, SCREEN_HEIGHT);
|
||||
setZoomPercents(142, 80, 167, 105);
|
||||
loadScene(3600);
|
||||
R2_GLOBALS._uiElements.show();
|
||||
@ -4705,17 +4712,17 @@ void Scene3600::signal() {
|
||||
|
||||
_actor5.setPosition(Common::Point(298, 151));
|
||||
|
||||
_actor13.postInit();
|
||||
_actor13._state = 0;
|
||||
_actor13._field8A = Common::Point(226, 152);
|
||||
_actor13._moveDiff = Common::Point(5, 3);
|
||||
_actor13.setup(3403, 7, 1);
|
||||
_actor13.setPosition(Common::Point(405, 155));
|
||||
_actor13.changeZoom(-1);
|
||||
_actor13.addMover(NULL);
|
||||
_actor13.animate(ANIM_MODE_NONE);
|
||||
_actor13.hide();
|
||||
_actor13.setDetails(3600, 15, -1, 17, 5, &_item5);
|
||||
_protector.postInit();
|
||||
_protector._state = 0;
|
||||
_protector._field8A = Common::Point(226, 152);
|
||||
_protector._moveDiff = Common::Point(5, 3);
|
||||
_protector.setup(3403, 7, 1);
|
||||
_protector.setPosition(Common::Point(405, 155));
|
||||
_protector.changeZoom(-1);
|
||||
_protector.addMover(NULL);
|
||||
_protector.animate(ANIM_MODE_NONE);
|
||||
_protector.hide();
|
||||
_protector.setDetails(3600, 15, -1, 17, 5, &_item5);
|
||||
|
||||
_actor2.setup(3600, 2, 1);
|
||||
_actor2.setPosition(Common::Point(403, 161));
|
||||
@ -4726,12 +4733,12 @@ void Scene3600::signal() {
|
||||
_quinnSpeaker._displayMode = 2;
|
||||
_tealSpeaker._displayMode = 2;
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
|
||||
R2_GLOBALS._player.setup(20, _actor11._strip, 1);
|
||||
R2_GLOBALS._player.setPosition(_actor11._position);
|
||||
_actor11.hide();
|
||||
} else if (R2_GLOBALS._player._characterIndex == 3) {
|
||||
} else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA) {
|
||||
R2_GLOBALS._player._moveDiff = Common::Point(3, 2);
|
||||
R2_GLOBALS._player.setup(30, _actor12._strip, 1);
|
||||
R2_GLOBALS._player.setPosition(_actor12._position);
|
||||
@ -4779,7 +4786,7 @@ void Scene3600::signal() {
|
||||
_actor4.hide();
|
||||
_actor5.hide();
|
||||
|
||||
g_globals->gfxManager()._bounds.moveTo(Common::Point(60, 0));
|
||||
_sceneBounds = Rect(60, 0, SCREEN_WIDTH + 60, SCREEN_HEIGHT);
|
||||
setZoomPercents(51, 46, 180, 200);
|
||||
|
||||
loadScene(3400);
|
||||
@ -4802,8 +4809,8 @@ void Scene3600::signal() {
|
||||
setAction(&_sequenceManager1, this, 3450, &_actor1, &_actor6, NULL);
|
||||
break;
|
||||
case 3605:
|
||||
_actor13.setup(3258, 4, 1);
|
||||
_actor13.setAction(&_sequenceManager1, this, 3606, &_actor5, &_actor13, &_actor2, NULL);
|
||||
_protector.setup(3258, 4, 1);
|
||||
_protector.setAction(&_sequenceManager1, this, 3606, &_actor5, &_protector, &_actor2, NULL);
|
||||
_sceneMode = 3323;
|
||||
_stripManager.start(3323, this);
|
||||
|
||||
@ -4811,12 +4818,13 @@ void Scene3600::signal() {
|
||||
case 3620:
|
||||
// No break on purpose
|
||||
case 3623:
|
||||
if ((_actor13._position.x == 226) && (_actor13._position.y == 152) && (_action1._field1E != 0) && (_actor13._visage == 3127) && (!R2_GLOBALS.getFlag(71))) {
|
||||
if ((_protector._position.x == 226) && (_protector._position.y == 152)
|
||||
&& (_action1._field1E != 0) && (_protector._visage == 3127) && (!R2_GLOBALS.getFlag(71))) {
|
||||
R2_GLOBALS._sound2.stop();
|
||||
R2_GLOBALS._sound2.play(331);
|
||||
R2_GLOBALS.setFlag(71);
|
||||
_sceneMode = 3626;
|
||||
setAction(&_sequenceManager1, this, 3626, &_actor13, NULL);
|
||||
setAction(&_sequenceManager1, this, 3626, &_protector, NULL);
|
||||
}
|
||||
break;
|
||||
case 3624:
|
||||
@ -4833,7 +4841,7 @@ void Scene3600::signal() {
|
||||
R2_GLOBALS._sceneManager.changeScene(3700);
|
||||
break;
|
||||
case 3626:
|
||||
_actor13.setPosition(Common::Point(0, 0));
|
||||
_protector.setPosition(Common::Point(0, 0));
|
||||
_action1.setActionIndex(2);
|
||||
if (R2_GLOBALS._events.getCursor() > R2_LAST_INVENT) {
|
||||
R2_GLOBALS._events.setCursor(CURSOR_USE);
|
||||
@ -4858,10 +4866,12 @@ void Scene3600::process(Event &event) {
|
||||
}
|
||||
|
||||
void Scene3600::dispatch() {
|
||||
if ((R2_GLOBALS._player.getRegionIndex() == 200) && (_action1._field1E != 0) && (_field254E == 0)){
|
||||
if ((R2_GLOBALS._player.getRegionIndex() == 200) && (_action1._field1E != 0)
|
||||
&& (_field254E == 0)) {
|
||||
R2_GLOBALS._sound2.fadeOut2(NULL);
|
||||
if (_actor13._mover)
|
||||
_actor13.addMover(NULL);
|
||||
if (_protector._mover)
|
||||
_protector.addMover(NULL);
|
||||
|
||||
if (R2_GLOBALS._player._action)
|
||||
R2_GLOBALS._player.setAction(NULL);
|
||||
if (R2_GLOBALS._player._mover)
|
||||
@ -4883,10 +4893,10 @@ void Scene3600::dispatch() {
|
||||
|
||||
R2_GLOBALS._player.hide();
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_actor11.setPosition(R2_GLOBALS._player._position);
|
||||
_actor11.show();
|
||||
} else if (R2_GLOBALS._player._characterIndex == 3) {
|
||||
} else if (R2_GLOBALS._player._characterIndex == R2_MIRANDA) {
|
||||
_actor12.setPosition(R2_GLOBALS._player._position);
|
||||
_actor12.show();
|
||||
} else {
|
||||
@ -4899,10 +4909,10 @@ void Scene3600::dispatch() {
|
||||
_actor4.setAction(&_sequenceManager1, this, 3613, &_actor4, NULL);
|
||||
}
|
||||
|
||||
if ((_actor13.getRegionIndex() == 200) && (_action1._field1E != 0) && (_field254E == 0)){
|
||||
if ((_protector.getRegionIndex() == 200) && (_action1._field1E != 0) && !_ghoulTeleported) {
|
||||
R2_GLOBALS._sound2.fadeOut2(NULL);
|
||||
_sceneMode = 3620;
|
||||
_field2550 = 1;
|
||||
_ghoulTeleported = true;
|
||||
R2_GLOBALS._player.disableControl();
|
||||
|
||||
if (R2_GLOBALS._player._mover)
|
||||
@ -4916,6 +4926,7 @@ void Scene3600::dispatch() {
|
||||
if (_actor4._mover)
|
||||
_actor4.addMover(NULL);
|
||||
}
|
||||
|
||||
Scene::dispatch();
|
||||
}
|
||||
|
||||
@ -4923,10 +4934,12 @@ void Scene3600::dispatch() {
|
||||
* Scene 3700 - Cutscene - Teleport outside
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene3700::postInit(SceneObjectList *OwnerList) {
|
||||
loadScene(3700);
|
||||
R2_GLOBALS._uiElements._active = false;
|
||||
SceneExt::postInit();
|
||||
R2_GLOBALS._uiElements._active = false;
|
||||
R2_GLOBALS._interfaceY = SCREEN_HEIGHT;
|
||||
|
||||
_stripManager.setColors(60, 255);
|
||||
_stripManager.setFontNumber(3);
|
||||
@ -4934,30 +4947,31 @@ void Scene3700::postInit(SceneObjectList *OwnerList) {
|
||||
_stripManager.addSpeaker(&_seekerSpeaker);
|
||||
_stripManager.addSpeaker(&_mirandaSpeaker);
|
||||
|
||||
_actor1.postInit();
|
||||
_actor1._moveDiff = Common::Point(3, 2);
|
||||
_quinn.postInit();
|
||||
_quinn._moveDiff = Common::Point(3, 2);
|
||||
|
||||
_actor2.postInit();
|
||||
_actor2._numFrames = 7;
|
||||
_actor2._moveDiff = Common::Point(5, 3);
|
||||
_actor2.hide();
|
||||
_seeker.postInit();
|
||||
_seeker._numFrames = 7;
|
||||
_seeker._moveDiff = Common::Point(5, 3);
|
||||
_seeker.hide();
|
||||
|
||||
_actor3.postInit();
|
||||
_actor3._moveDiff = Common::Point(3, 2);
|
||||
_actor3.hide();
|
||||
_miranda.postInit();
|
||||
_miranda._moveDiff = Common::Point(3, 2);
|
||||
_miranda.hide();
|
||||
|
||||
_actor4.postInit();
|
||||
_actor4._numFrames = 7;
|
||||
_actor4._moveDiff = Common::Point(5, 3);
|
||||
_actor4.hide();
|
||||
_webbster.postInit();
|
||||
_webbster._numFrames = 7;
|
||||
_webbster._moveDiff = Common::Point(5, 3);
|
||||
_webbster.hide();
|
||||
|
||||
_actor5.postInit();
|
||||
|
||||
R2_GLOBALS._player.postInit();
|
||||
R2_GLOBALS._player.disableControl();
|
||||
R2_GLOBALS._sound1.play(332);
|
||||
|
||||
_sceneMode = 3700;
|
||||
setAction(&_sequenceManager, this, 3700, &_actor1, &_actor2, &_actor3, &_actor4, &_actor5, NULL);
|
||||
setAction(&_sequenceManager, this, 3700, &_quinn, &_seeker, &_miranda,
|
||||
&_webbster, &_actor5, NULL);
|
||||
}
|
||||
|
||||
void Scene3700::remove() {
|
||||
@ -4972,11 +4986,11 @@ void Scene3700::signal() {
|
||||
case 3329:
|
||||
warning("STUB: sub_1D227()");
|
||||
_sceneMode = 3701;
|
||||
setAction(&_sequenceManager, this, 3701, &_actor2, &_actor3, &_actor4, NULL);
|
||||
setAction(&_sequenceManager, this, 3701, &_seeker, &_miranda, &_webbster, NULL);
|
||||
break;
|
||||
case 3700:
|
||||
_actor1.setup(10, 6, 1);
|
||||
_actor2.setup(20, 5, 1);
|
||||
_quinn.setup(10, 6, 1);
|
||||
_seeker.setup(20, 5, 1);
|
||||
if (R2_GLOBALS.getFlag(71)) {
|
||||
_sceneMode = 3329;
|
||||
_stripManager.start(3329, this);
|
||||
|
@ -547,10 +547,10 @@ public:
|
||||
SpeakerMiranda3400 _mirandaSpeaker;
|
||||
SpeakerWebbster3400 _webbsterSpeaker;
|
||||
SpeakerTeal3400 _tealSpeaker;
|
||||
SceneActor _actor1;
|
||||
SceneActor _actor2;
|
||||
SceneActor _actor3;
|
||||
SceneActor _actor4;
|
||||
SceneActor _companion1;
|
||||
SceneActor _companion2;
|
||||
SceneActor _webbster;
|
||||
SceneActor _teal;
|
||||
SceneActor _actor5;
|
||||
SceneActor _actor6;
|
||||
SceneActor _actor7;
|
||||
@ -704,7 +704,7 @@ class Scene3600 : public SceneExt {
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
class Actor13 : public SceneActorExt {
|
||||
class Protector : public SceneActorExt {
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
public:
|
||||
@ -732,7 +732,7 @@ public:
|
||||
SceneActor _actor10;
|
||||
SceneActor _actor11;
|
||||
SceneActor _actor12;
|
||||
Actor13 _actor13;
|
||||
Protector _protector;
|
||||
SequenceManager _sequenceManager1;
|
||||
SequenceManager _sequenceManager2;
|
||||
SequenceManager _sequenceManager3;
|
||||
@ -743,7 +743,7 @@ public:
|
||||
int _field254A;
|
||||
int _field254C;
|
||||
int _field254E;
|
||||
bool _field2550;
|
||||
bool _ghoulTeleported;
|
||||
|
||||
Scene3600();
|
||||
virtual void postInit(SceneObjectList *OwnerList = NULL);
|
||||
@ -759,10 +759,10 @@ public:
|
||||
SpeakerQuinn3700 _quinnSpeaker;
|
||||
SpeakerSeeker3700 _seekerSpeaker;
|
||||
SpeakerMiranda3700 _mirandaSpeaker;
|
||||
SceneActor _actor1;
|
||||
SceneActor _actor2;
|
||||
SceneActor _actor3;
|
||||
SceneActor _actor4;
|
||||
SceneActor _quinn;
|
||||
SceneActor _seeker;
|
||||
SceneActor _miranda;
|
||||
SceneActor _webbster;
|
||||
SceneActor _actor5;
|
||||
SequenceManager _sequenceManager;
|
||||
|
||||
|
@ -541,7 +541,7 @@ void SpeakerMiranda300::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 3) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
Scene300 *scene = (Scene300 *)R2_GLOBALS._sceneManager._scene;
|
||||
@ -627,7 +627,7 @@ void SpeakerMiranda3375::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_companion2;
|
||||
@ -677,7 +677,7 @@ void SpeakerMiranda3385::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_companion2;
|
||||
@ -726,7 +726,7 @@ void SpeakerMiranda3395::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_companion2;
|
||||
@ -776,10 +776,10 @@ void SpeakerMiranda3400::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_actor2;
|
||||
_object2 = &scene->_companion2;
|
||||
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
@ -801,12 +801,12 @@ void SpeakerMiranda3400::proc15() {
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4051, 5, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4050, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -820,7 +820,7 @@ void SpeakerMiranda3600::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 3)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_actor12;
|
||||
@ -866,7 +866,7 @@ void SpeakerMiranda3700::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_actor3;
|
||||
_object2 = &scene->_miranda;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
@ -886,25 +886,25 @@ void SpeakerMiranda3700::proc15() {
|
||||
break;
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
scene->_actor1.setup(10, 6, 1);
|
||||
scene->_actor2.setup(20, 5, 1);
|
||||
scene->_quinn.setup(10, 6, 1);
|
||||
scene->_seeker.setup(20, 5, 1);
|
||||
_object2->setup(30, 1, 1);
|
||||
scene->_actor4.setup(40, 1, 1);
|
||||
scene->_webbster.setup(40, 1, 1);
|
||||
_object1.setup(4050, 5, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
scene->_actor3.setup(30, 8, 1);
|
||||
scene->_miranda.setup(30, 8, 1);
|
||||
_object1.setup(4052, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 3:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
scene->_actor2.setup(20, 1, 1);
|
||||
scene->_actor3.setup(30, 1, 1);
|
||||
scene->_seeker.setup(20, 1, 1);
|
||||
scene->_miranda.setup(30, 1, 1);
|
||||
_object1.setup(4051, 7, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -1116,7 +1116,7 @@ void SpeakerProtector3600::proc15() {
|
||||
Scene3600 *scene = (Scene3600 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_actor13;
|
||||
_object2 = &scene->_protector;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
@ -1176,7 +1176,7 @@ void SpeakerQuinn300::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 3) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_MIRANDA) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 300);
|
||||
@ -1272,7 +1272,7 @@ void SpeakerQuinn1100::proc15() {
|
||||
if (v == 0)
|
||||
return;
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 1100);
|
||||
@ -1318,7 +1318,7 @@ void SpeakerQuinn2435::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 2435);
|
||||
@ -1345,7 +1345,7 @@ void SpeakerQuinn2450::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 2435);
|
||||
@ -1500,9 +1500,9 @@ void SpeakerQuinn3375::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else if (R2_GLOBALS._player._characterIndex == 2)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object2 = &scene->_companion1;
|
||||
else
|
||||
_object2 = &scene->_companion2;
|
||||
@ -1551,9 +1551,9 @@ void SpeakerQuinn3385::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else if (R2_GLOBALS._player._characterIndex == 2)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object2 = &scene->_companion1;
|
||||
else
|
||||
_object2 = &scene->_companion2;
|
||||
@ -1587,7 +1587,7 @@ void SpeakerQuinn3385::proc15() {
|
||||
break;
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object1.setup(4010, 3, 1);
|
||||
else
|
||||
_object1.setup(4010, 5, 1);
|
||||
@ -1606,9 +1606,9 @@ void SpeakerQuinn3395::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else if (R2_GLOBALS._player._characterIndex == 2)
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object2 = &scene->_companion1;
|
||||
else
|
||||
_object2 = &scene->_companion2;
|
||||
@ -1642,7 +1642,7 @@ void SpeakerQuinn3395::proc15() {
|
||||
break;
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object1.setup(4010, 3, 1);
|
||||
else
|
||||
_object1.setup(4010, 5, 1);
|
||||
@ -1661,12 +1661,12 @@ void SpeakerQuinn3400::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else if (R2_GLOBALS._player._characterIndex == 2)
|
||||
_object2 = &scene->_actor1;
|
||||
else if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object2 = &scene->_companion1;
|
||||
else
|
||||
_object2 = &scene->_actor2;
|
||||
_object2 = &scene->_companion2;
|
||||
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
@ -1691,12 +1691,12 @@ void SpeakerQuinn3400::proc15() {
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4010, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 3:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4012, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -1710,7 +1710,7 @@ void SpeakerQuinn3600::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 1)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_QUINN)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_actor10;
|
||||
@ -1757,14 +1757,14 @@ void SpeakerQuinn3700::setText(const Common::String &msg) {
|
||||
|
||||
switch (_speakerMode) {
|
||||
case 2:
|
||||
scene->_actor3.setup(30, 1, 1);
|
||||
scene->_miranda.setup(30, 1, 1);
|
||||
R2_GLOBALS._sound2.play(44);
|
||||
break;
|
||||
case 3:
|
||||
scene->_actor3.setup(30, 1, 1);
|
||||
scene->_miranda.setup(30, 1, 1);
|
||||
break;
|
||||
default:
|
||||
scene->_actor3.setup(30, 7, 1);
|
||||
scene->_miranda.setup(30, 7, 1);
|
||||
break;
|
||||
}
|
||||
VisualSpeaker::setText(msg);
|
||||
@ -1776,7 +1776,7 @@ void SpeakerQuinn3700::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_actor1;
|
||||
_object2 = &scene->_quinn;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
@ -1797,24 +1797,24 @@ void SpeakerQuinn3700::proc15() {
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
R2_GLOBALS._sound2.stop();
|
||||
scene->_actor1.setup(10, 4, 1);
|
||||
scene->_actor3.setup(30, 7, 1);
|
||||
scene->_quinn.setup(10, 4, 1);
|
||||
scene->_miranda.setup(30, 7, 1);
|
||||
_object1.setup(3701, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
scene->_actor2.setup(20, 1, 1);
|
||||
scene->_actor3.setup(30, 1, 1);
|
||||
_object1.setup(3701, 2, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
scene->_seeker.setup(20, 1, 1);
|
||||
scene->_miranda.setup(30, 1, 1);
|
||||
_object1.setup(3702, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 3:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
scene->_actor1.setup(10, 2, 1);
|
||||
scene->_actor3.setup(30, 1, 1);
|
||||
scene->_quinn.setup(10, 2, 1);
|
||||
scene->_miranda.setup(30, 1, 1);
|
||||
_object1.setup(4011, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -2072,7 +2072,7 @@ void SpeakerSeeker1100::proc15() {
|
||||
if (v == 0)
|
||||
return;
|
||||
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 1100);
|
||||
@ -2129,7 +2129,7 @@ void SpeakerSeeker1900::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 1900);
|
||||
@ -2160,7 +2160,7 @@ void SpeakerSeeker2435::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 2435);
|
||||
@ -2187,7 +2187,7 @@ void SpeakerSeeker2450::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 2) {
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER) {
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
} else {
|
||||
assert(R2_GLOBALS._sceneManager._sceneNumber == 2450);
|
||||
@ -2362,10 +2362,10 @@ void SpeakerSeeker3400::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_actor1;
|
||||
_object2 = &scene->_companion1;
|
||||
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
@ -2387,27 +2387,27 @@ void SpeakerSeeker3400::proc15() {
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4031, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4031, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 3:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4030, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 4:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4031, 7, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 5:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4033, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -2421,7 +2421,7 @@ void SpeakerSeeker3600::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
if (R2_GLOBALS._player._characterIndex == 2)
|
||||
if (R2_GLOBALS._player._characterIndex == R2_SEEKER)
|
||||
_object2 = &R2_GLOBALS._player;
|
||||
else
|
||||
_object2 = &scene->_actor11;
|
||||
@ -2467,10 +2467,11 @@ void SpeakerSeeker3700::setText(const Common::String &msg) {
|
||||
|
||||
if (_speakerMode == 1) {
|
||||
R2_GLOBALS._sound2.play(44);
|
||||
scene->_actor3.setup(30, 8, 1);
|
||||
scene->_miranda.setup(30, 8, 1);
|
||||
} else {
|
||||
scene->_actor3.setup(30, 2, 1);
|
||||
scene->_miranda.setup(30, 2, 1);
|
||||
}
|
||||
|
||||
VisualSpeaker::setText(msg);
|
||||
}
|
||||
|
||||
@ -2480,7 +2481,7 @@ void SpeakerSeeker3700::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_actor2;
|
||||
_object2 = &scene->_seeker;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
@ -2501,19 +2502,19 @@ void SpeakerSeeker3700::proc15() {
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
R2_GLOBALS._sound2.stop();
|
||||
scene->_actor1.setup(10, 8, 1);
|
||||
scene->_actor2.setup(20, 7, 1);
|
||||
scene->_actor3.setup(30, 8, 1);
|
||||
scene->_quinn.setup(10, 8, 1);
|
||||
scene->_seeker.setup(20, 7, 1);
|
||||
scene->_miranda.setup(30, 8, 1);
|
||||
_object1.setup(3701, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
scene->_actor1.setup(10, 2, 1);
|
||||
scene->_actor2.setup(20, 1, 1);
|
||||
scene->_actor3.setup(30, 1, 1);
|
||||
scene->_quinn.setup(10, 2, 1);
|
||||
scene->_seeker.setup(20, 1, 1);
|
||||
scene->_miranda.setup(30, 1, 1);
|
||||
_object1.setup(4031, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -2637,6 +2638,41 @@ SpeakerTealMode7::SpeakerTealMode7(): SpeakerTeal() {
|
||||
_displayMode = 7;
|
||||
}
|
||||
|
||||
void SpeakerTeal180::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
Scene180 *scene = (Scene180 *)R2_GLOBALS._sceneManager._scene;
|
||||
_object2 = &scene->_teal;
|
||||
_object2->hide();
|
||||
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
|
||||
if (_object2->_mover)
|
||||
_object2->addMover(NULL);
|
||||
}
|
||||
|
||||
switch (v) {
|
||||
case 0:
|
||||
_object1.animate(ANIM_MODE_2, NULL);
|
||||
break;
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(75, 5, 1);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(77, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SpeakerTeal300::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
@ -2714,7 +2750,7 @@ void SpeakerTeal3400::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_actor4;
|
||||
_object2 = &scene->_teal;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1._numFrames = 7;
|
||||
@ -2731,8 +2767,8 @@ void SpeakerTeal3400::proc15() {
|
||||
|
||||
if (scene ->_sceneMode == 3305) {
|
||||
R2_GLOBALS._player.setStrip(6);
|
||||
scene->_actor1.setStrip(6);
|
||||
scene->_actor2.setStrip(6);
|
||||
scene->_companion1.setStrip(6);
|
||||
scene->_companion2.setStrip(6);
|
||||
}
|
||||
|
||||
switch (v) {
|
||||
@ -2742,22 +2778,22 @@ void SpeakerTeal3400::proc15() {
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4107, 5, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4107, 1, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 3:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4107, 7, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 4:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4107, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -2889,6 +2925,47 @@ SpeakerWebbster::SpeakerWebbster(int color) {
|
||||
_numFrames = 0;
|
||||
}
|
||||
|
||||
void SpeakerWebbster180::proc15() {
|
||||
Scene3375 *scene = (Scene3375 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_webbster;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
_object1._numFrames = 6;
|
||||
|
||||
if (_object2->_mover)
|
||||
_object2->addMover(NULL);
|
||||
}
|
||||
|
||||
switch (v) {
|
||||
case 0:
|
||||
_object1.animate(ANIM_MODE_2, NULL);
|
||||
break;
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(75, 7, 1);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(76, 4, 1);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 3:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(75, 6, 1);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SpeakerWebbster3240::proc15() {
|
||||
int v = _speakerMode;
|
||||
Scene3240 *scene = (Scene3240 *)R2_GLOBALS._sceneManager._scene;
|
||||
@ -3050,7 +3127,7 @@ void SpeakerWebbster3400::proc15() {
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_actor3;
|
||||
_object2 = &scene->_webbster;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
@ -3071,17 +3148,17 @@ void SpeakerWebbster3400::proc15() {
|
||||
case 1:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4110, 5, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 2:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4110, 7, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
case 3:
|
||||
((SceneItem *)_action)->_sceneRegionId = 0;
|
||||
_object1.setup(4110, 3, 1);
|
||||
_object1.animate(ANIM_MODE_5, NULL);
|
||||
_object1.animate(ANIM_MODE_5, this);
|
||||
break;
|
||||
default:
|
||||
signal();
|
||||
@ -3091,7 +3168,7 @@ void SpeakerWebbster3400::proc15() {
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
SpeakerDutyOfficer::SpeakerDutyOfficer(): VisualSpeaker() {
|
||||
SpeakerDutyOfficer180::SpeakerDutyOfficer180(): VisualSpeaker() {
|
||||
_speakerName = "DUTYOFFICER";
|
||||
_color1 = 5;
|
||||
_color2 = 0;
|
||||
@ -3103,13 +3180,13 @@ SpeakerDutyOfficer::SpeakerDutyOfficer(): VisualSpeaker() {
|
||||
_numFrames = 0;
|
||||
}
|
||||
|
||||
void SpeakerDutyOfficer::proc15() {
|
||||
void SpeakerDutyOfficer180::proc15() {
|
||||
Scene180 *scene = (Scene180 *)R2_GLOBALS._sceneManager._scene;
|
||||
|
||||
int v = _speakerMode;
|
||||
|
||||
if (!_object2) {
|
||||
_object2 = &scene->_object2;
|
||||
_object2 = &scene->_dutyOfficer;
|
||||
_object2->hide();
|
||||
_object1.postInit();
|
||||
_object1.setPosition(_object2->_position);
|
||||
|
@ -547,6 +547,12 @@ public:
|
||||
virtual Common::String getClassName() { return "SpeakerTealMode7"; }
|
||||
};
|
||||
|
||||
class SpeakerTeal180 : public SpeakerTeal {
|
||||
public:
|
||||
virtual Common::String getClassName() { return "SpeakerTeal180"; }
|
||||
virtual void proc15();
|
||||
};
|
||||
|
||||
class SpeakerTeal300 : public SpeakerTeal {
|
||||
public:
|
||||
virtual Common::String getClassName() { return "SpeakerTeal300"; }
|
||||
@ -595,6 +601,13 @@ public:
|
||||
virtual Common::String getClassName() { return "SpeakerWebbster"; }
|
||||
};
|
||||
|
||||
class SpeakerWebbster180 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster180() : SpeakerWebbster(27) {}
|
||||
virtual Common::String getClassName() { return "SpeakerWebbster180"; }
|
||||
virtual void proc15();
|
||||
};
|
||||
|
||||
class SpeakerWebbster2500 : public SpeakerWebbster {
|
||||
public:
|
||||
SpeakerWebbster2500() : SpeakerWebbster(27) {}
|
||||
@ -641,9 +654,9 @@ public:
|
||||
virtual void proc15();
|
||||
};
|
||||
|
||||
class SpeakerDutyOfficer: public VisualSpeaker {
|
||||
class SpeakerDutyOfficer180: public VisualSpeaker {
|
||||
public:
|
||||
SpeakerDutyOfficer();
|
||||
SpeakerDutyOfficer180();
|
||||
|
||||
virtual Common::String getClassName() { return "SpeakerDutyOfficer"; }
|
||||
virtual void proc15();
|
||||
|
@ -229,6 +229,7 @@ char const *const RESTORE_GAME = "Restore game";
|
||||
char const *const SHOW_CREDITS = "Show credits";
|
||||
char const *const PAUSE_GAME = "Pause game";
|
||||
char const *const RESUME_PLAY = " Resume play ";
|
||||
char const *const R2_RESTART_MSG = "Go to the beginning of game?";
|
||||
char const *const F2 = "F2";
|
||||
char const *const F3 = "F3";
|
||||
char const *const F4 = "F4";
|
||||
|
@ -182,6 +182,7 @@ extern char const *const RESTORE_GAME;
|
||||
extern char const *const SHOW_CREDITS;
|
||||
extern char const *const PAUSE_GAME;
|
||||
extern char const *const RESUME_PLAY;
|
||||
extern char const *const R2_RESTART_MSG;
|
||||
extern char const *const F2;
|
||||
extern char const *const F3;
|
||||
extern char const *const F4;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user