Merge branch 'master' into zvision

This commit is contained in:
richiesams 2013-09-02 18:59:42 -05:00
commit a76f852c38
21 changed files with 556 additions and 441 deletions

View File

@ -129,7 +129,7 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
uint16 charsPerLine = (sd->w << 3) / (_screen->getFontWidth() + _screen->_charWidth);
while (c) {
char a = tolower(_ctrl[1]);
char a = tolower((unsigned char)_ctrl[1]);
if (!_tempString2 && c == '%') {
if (a == 'd') {

View File

@ -63,6 +63,7 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const MortevielleGameDescr
_mouseClick = false;
_inMainGameLoop = false;
_quitGame = false;
_pauseStartTime = -1;
_roomPresenceLuc = false;
_roomPresenceIda = false;
@ -164,6 +165,25 @@ Common::String MortevielleEngine::generateSaveFilename(const Common::String &tar
return Common::String::format("%s.%03d", target.c_str(), slot);
}
/**
* Pause the game.
*/
void MortevielleEngine::pauseEngineIntern(bool pause) {
Engine::pauseEngineIntern(pause);
if (pause) {
if (_pauseStartTime == -1)
_pauseStartTime = readclock();
} else {
if (_pauseStartTime != -1) {
int pauseEndTime = readclock();
_currentTime += (pauseEndTime - _pauseStartTime);
if (_uptodatePresence)
_startTime += (pauseEndTime - _pauseStartTime);
}
_pauseStartTime = -1;
}
}
/**
* Initialize the game state
*/

View File

@ -214,8 +214,8 @@ private:
int _minute;
int _curSearchObjId;
int _controlMenu;
int _startHour;
int _endHour;
int _startTime;
int _endTime;
Common::Point _stdPal[91][17];
int _x26KeyCount;
@ -229,7 +229,8 @@ private:
int _x;
int _y;
int _currentHourCount;
int _currentDayHour;
int _currentTime;
int _pauseStartTime;
Common::String _hintPctMessage;
byte *_cfiecBuffer;
@ -446,6 +447,8 @@ public:
virtual Common::Error loadGameState(int slot);
virtual Common::Error saveGameState(int slot, const Common::String &desc);
virtual Common::Error run();
virtual void pauseEngineIntern(bool pause);
virtual GUI::Debugger *getDebugger() {return &_debugger;}
uint32 getGameFlags() const;
Common::Language getLanguage() const;
Common::Language getOriginalLanguage() const;

View File

@ -413,8 +413,8 @@ void MortevielleEngine::prepareScreenType3() {
* @remarks Originally called 'calch'
*/
void MortevielleEngine::updateHour(int &day, int &hour, int &minute) {
int newHour = readclock();
int th = _currentHourCount + ((newHour - _currentDayHour) / _inGameHourDuration);
int newTime = readclock();
int th = _currentHourCount + ((newTime - _currentTime) / _inGameHourDuration);
minute = ((th % 2) + _currHalfHour) * 30;
hour = ((uint)th >> 1) + _currHour;
if (minute == 60) {
@ -1082,7 +1082,7 @@ void MortevielleEngine::initGame() {
if (!_coreVar._alreadyEnteredManor)
_blo = true;
_inGameHourDuration = kTime1;
_currentDayHour = readclock();
_currentTime = readclock();
}
/**
@ -1465,8 +1465,8 @@ void MortevielleEngine::gameLoaded() {
_x = 0;
_y = 0;
_num = 0;
_startHour = 0;
_endHour = 0;
_startTime = 0;
_endTime = 0;
_searchCount = 0;
_roomDoorId = OWN_ROOM;
_syn = true;
@ -2156,12 +2156,7 @@ void MortevielleEngine::drawRightFrame() {
* Read the current system time
*/
int MortevielleEngine::readclock() {
TimeDate dateTime;
g_system->getTimeAndDate(dateTime);
int m = dateTime.tm_min * 60;
int h = dateTime.tm_hour * 3600;
return h + m + dateTime.tm_sec;
return (int)(g_system->getMillis() / 1000);
}
/**
@ -2224,12 +2219,12 @@ void MortevielleEngine::prepareRoom() {
if (_coreVar._faithScore > 65)
_inGameHourDuration -= ((_inGameHourDuration / 3) * 2);
int newHour = readclock();
if ((newHour - _currentDayHour) > _inGameHourDuration) {
int newTime = readclock();
if ((newTime - _currentTime) > _inGameHourDuration) {
bool activeMenu = _menu._menuActive;
_menu.eraseMenu();
_currentHourCount += ((newHour - _currentDayHour) / _inGameHourDuration);
_currentDayHour = newHour;
_currentHourCount += ((newTime - _currentTime) / _inGameHourDuration);
_currentTime = newTime;
switch (_place) {
case GREEN_ROOM:
case DARKBLUE_ROOM:
@ -2279,7 +2274,7 @@ void MortevielleEngine::prepareRoom() {
_currBitIndex = 0;
if (!_uptodatePresence) {
_uptodatePresence = true;
_startHour = readclock();
_startTime = readclock();
if (getRandomNumber(1, 5) < 5) {
clearVerbBar();
prepareScreenType2();
@ -2297,11 +2292,11 @@ void MortevielleEngine::prepareRoom() {
_menu.drawMenu();
}
}
_endHour = readclock();
if ((_uptodatePresence) && ((_endHour - _startHour) > 17)) {
_endTime = readclock();
if ((_uptodatePresence) && ((_endTime - _startTime) > 17)) {
getPresenceBitIndex(_place);
_uptodatePresence = false;
_startHour = 0;
_startTime = 0;
if ((_coreVar._currPlace > OWN_ROOM) && (_coreVar._currPlace < DINING_ROOM))
_anyone = true;
}

View File

@ -72,6 +72,20 @@ static const ToltecsGameDescription gameDescriptions[] = {
},
},
{
// 3 Skulls of the Toltecs English version (alternate)
// From bug #3614933
{
"toltecs",
0,
AD_ENTRY1s("WESTERN", "a9c9cfef9d05b8f7a5573b626fa4ea87", 337643527),
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
},
{
// 3 Skulls of the Toltecs Russian version
{

View File

@ -678,7 +678,7 @@ void FocusObject::process(Event &event) {
BF_GLOBALS._events.setCursor(BF_GLOBALS._events.getCursor());
if ((event.eventType == EVENT_BUTTON_DOWN) && (BF_GLOBALS._events.getCursor() == CURSOR_WALK) &&
(event.btnState == 3)) {
(event.btnState == BTNSHIFT_RIGHT)) {
BF_GLOBALS._events.setCursor(CURSOR_USE);
event.handled = true;
}

View File

@ -2649,7 +2649,7 @@ void Scene160::Action2::signal() {
}
void Scene160::Action2::process(Event &event) {
if ((event.handled) || (event.eventType == 5))
if ((event.handled) || ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS)))
return;
if (_actionIndex == 25) {

View File

@ -1220,7 +1220,7 @@ void Scene560::SafeInset::process(Event &event) {
}
if ((event.eventType == EVENT_BUTTON_DOWN) && (BF_GLOBALS._events.getCursor() == CURSOR_WALK) &&
(event.btnState == 3)) {
(event.btnState == BTNSHIFT_RIGHT)) {
BF_GLOBALS._events.setCursor(CURSOR_USE);
event.handled = true;
}

View File

@ -1984,7 +1984,7 @@ void Scene840::BoatKeysInset::process(Event &event) {
CursorType cursorId = BF_GLOBALS._events.getCursor();
BF_GLOBALS._events.setCursor(cursorId);
if ((event.eventType == EVENT_BUTTON_DOWN) && (cursorId == CURSOR_WALK) && (event.btnState == 3)) {
if ((event.eventType == EVENT_BUTTON_DOWN) && (cursorId == CURSOR_WALK) && (event.btnState == BTNSHIFT_RIGHT)) {
BF_GLOBALS._events.setCursor(CURSOR_USE);
event.handled = true;
}

View File

@ -3267,6 +3267,7 @@ void Player::postInit(SceneObjectList *OwnerList) {
_moveDiff.y = 2;
_effect = 1;
_shade = 0;
_linkedActor = NULL;
setObjectWrapper(new SceneObjectWrapper());
setPosition(_characterPos[_characterIndex]);

View File

@ -113,7 +113,7 @@ bool EventsClass::getEvent(Event &evt, int eventMask) {
case Common::EVENT_RBUTTONUP:
case Common::EVENT_MBUTTONUP:
evt.eventType = EVENT_BUTTON_UP;
evt.btnState = 0;
evt.btnState = BTNSHIFT_LEFT;
break;
case Common::EVENT_KEYDOWN:
evt.eventType = EVENT_KEYPRESS;

View File

@ -381,6 +381,9 @@ void Ringworld2Globals::reset() {
if (!_scannerDialog)
_scannerDialog = new ScannerDialog();
// Default to Quinn as the active character
T2_GLOBALS._player._characterIndex = R2_QUINN;
// Reset the inventory
R2_INVENTORY.reset();
T2_GLOBALS._uiElements.updateInventory();
@ -407,7 +410,6 @@ void Ringworld2Globals::reset() {
_v565EB = 26;
_foodCount = 0;
_v565F6 = 0;
_v565F8 = 0;
_v565FA = 0;
_v565AE = 0;
_v56605[0] = 0;
@ -522,8 +524,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
s.syncAsSint16LE(_v565E9);
s.syncAsSint16LE(_v565EB);
s.syncAsSint16LE(_foodCount);
s.syncAsSint16LE(_v565F6);
s.syncAsSint16LE(_v565F8);
s.syncAsSint32LE(_v565F6);
s.syncAsSint16LE(_v565FA);
s.syncAsSint16LE(_landerSuitNumber);
s.syncAsSint16LE(_v566A6);

View File

@ -266,7 +266,6 @@ public:
int _v565EB;
int _foodCount;
int _v565F6;
int _v565F8;
int _v565FA;
int _v5657C;
byte _v565AE;

View File

@ -319,11 +319,10 @@ SceneExt::SceneExt(): Scene() {
for (int i = 0; i < 256; i++)
_field312[i] = 0;
_field372 = _field37A = 0;
_savedPlayerEnabled = false;
_savedUiEnabled = false;
_savedCanWalk = false;
_focusObject = NULL;
// WORKAROUND: In the original, playing animations don't reset the global _animationCtr
// counter as scene changes unless the playing animation explicitly finishes. For now,
@ -332,6 +331,13 @@ SceneExt::SceneExt(): Scene() {
R2_GLOBALS._animationCtr = 0;
}
void SceneExt::synchronize(Serializer &s) {
Scene::synchronize(s);
s.syncBytes(&_field312[0], 256);
_sceneAreas.synchronize(s);
}
void SceneExt::postInit(SceneObjectList *OwnerList) {
Scene::postInit(OwnerList);
@ -445,7 +451,6 @@ void SceneExt::fadeOut() {
void SceneExt::startStrip() {
SceneExt *scene = (SceneExt *)R2_GLOBALS._sceneManager._scene;
scene->_field372 = 1;
scene->_savedPlayerEnabled = R2_GLOBALS._player._enabled;
if (scene->_savedPlayerEnabled) {
@ -461,7 +466,6 @@ void SceneExt::startStrip() {
void SceneExt::endStrip() {
SceneExt *scene = (SceneExt *)R2_GLOBALS._sceneManager._scene;
scene->_field372 = 0;
if (scene->_savedPlayerEnabled) {
R2_GLOBALS._player.enableControl();
@ -1319,8 +1323,8 @@ void SceneArea::synchronize(Serializer &s) {
_bounds.synchronize(s);
s.syncAsSint16LE(_enabled);
s.syncAsSint16LE(_insideArea);
s.syncAsSint16LE(_cursorNum);
s.syncAsSint16LE(_savedCursorNum);
s.syncAsSint32LE(_cursorNum);
s.syncAsSint32LE(_savedCursorNum);
s.syncAsSint16LE(_cursorState);
}
@ -2267,9 +2271,9 @@ void ScannerDialog::Button::reset() {
break;
case 1700:
case 1800:
if (R2_GLOBALS._v565F8 < 0 || (R2_GLOBALS._v565F8 == 0 && R2_GLOBALS._v565F6 < 1201))
if (R2_GLOBALS._v565F6 < 1201)
scanner._obj4.setup(4, 3, 3);
else if (R2_GLOBALS._v565F8 > 0 || (R2_GLOBALS._v565F8 == 0 && R2_GLOBALS._v565F6 < 1201))
else if (R2_GLOBALS._v565F6 < 1201)
scanner._obj4.setup(4, 3, 4);
else
scanner._obj4.setup(4, 3, 5);

View File

@ -82,21 +82,17 @@ private:
static void endStrip();
public:
byte _field312[256];
int _field372;
bool _savedPlayerEnabled;
bool _savedUiEnabled;
bool _savedCanWalk;
int _field37A;
SceneObject *_focusObject;
Visage _cursorVisage;
SynchronizedList<EventHandler *> _sceneAreas;
Rect _v51C34;
public:
SceneExt();
virtual Common::String getClassName() { return "SceneExt"; }
virtual void synchronize(Serializer &s);
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void remove();
virtual void process(Event &event);

View File

@ -2489,14 +2489,13 @@ void Scene205::handleText() {
*--------------------------------------------------------------------------*/
Scene250::Button::Button(): SceneActor() {
_floorNumber = _v2 = 0;
_floorNumber = 0;
}
void Scene250::Button::synchronize(Serializer &s) {
SceneActor::synchronize(s);
s.syncAsSint16LE(_floorNumber);
s.syncAsSint16LE(_v2);
}
bool Scene250::Button::startAction(CursorType action, Event &event) {
@ -2504,7 +2503,7 @@ bool Scene250::Button::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_USE:
if (scene->_field414) {
if (scene->_destButtonY) {
SceneItem::display2(250, 15);
} else {
switch (_floorNumber) {
@ -2555,7 +2554,6 @@ bool Scene250::Button::startAction(CursorType action, Event &event) {
void Scene250::Button::setFloor(int floorNumber) {
SceneActor::postInit();
_floorNumber = floorNumber;
_v2 = 0;
if (_floorNumber <= 9) {
SceneObject::setup(250, 1, 4);
@ -2580,17 +2578,18 @@ void Scene250::Button::setFloor(int floorNumber) {
/*--------------------------------------------------------------------------*/
Scene250::Scene250(): SceneExt() {
_field412 = _field414 = _field416 = _field418 = _field41A = 0;
_currButtonY = _destButtonY = _elevatorSpeed = 0;
_skippingFl = _skippableFl = false;
}
void Scene250::synchronize(Serializer &s) {
SceneExt::synchronize(s);
s.syncAsSint16LE(_field412);
s.syncAsSint16LE(_field414);
s.syncAsSint16LE(_field416);
s.syncAsSint16LE(_field418);
s.syncAsSint16LE(_field41A);
s.syncAsSint16LE(_currButtonY);
s.syncAsSint16LE(_destButtonY);
s.syncAsSint16LE(_elevatorSpeed);
s.syncAsSint16LE(_skippableFl);
s.syncAsSint16LE(_skippingFl);
}
void Scene250::postInit(SceneObjectList *OwnerList) {
@ -2632,28 +2631,28 @@ void Scene250::postInit(SceneObjectList *OwnerList) {
switch (R2_GLOBALS._sceneManager._previousScene) {
case 200:
_field412 = 55;
_currButtonY = 55;
break;
case 300:
_field412 = 43;
_currButtonY = 43;
break;
case 700:
_field412 = 139;
_currButtonY = 139;
break;
case 850:
_field412 = 91;
_currButtonY = 91;
break;
default:
R2_GLOBALS._sceneManager._previousScene = 200;
_field412 = 55;
_currButtonY = 55;
break;
}
_currentFloor.setPosition(Common::Point(111, _field412));
_currentFloor.setPosition(Common::Point(111, _currButtonY));
}
void Scene250::signal() {
if (_field41A)
if (_skippingFl)
_sceneMode = 20;
switch (_sceneMode) {
@ -2664,20 +2663,24 @@ void Scene250::signal() {
R2_GLOBALS._player.setPosition(Common::Point(261, 185));
ADD_MOVER(R2_GLOBALS._player, 261, 15);
_field416 = 0;
_elevatorSpeed = 0;
_sceneMode = 2;
break;
case 2:
_sceneMode = ((_field414 - 12) == _field412) ? 4 : 3;
if (_destButtonY - 12 == _currButtonY)
_sceneMode = 4;
else
_sceneMode = 3;
signal();
break;
case 3:
_currentFloor.setPosition(Common::Point(111, _currentFloor._position.y + 12));
_field412 += 12;
_currButtonY += 12;
R2_GLOBALS._player.setPosition(Common::Point(261, 185));
ADD_MOVER(R2_GLOBALS._player, 261, 15);
if ((_field414 - 12) == _field412)
if ((_destButtonY - 12) == _currButtonY)
_sceneMode = 4;
break;
case 4:
@ -2699,12 +2702,12 @@ void Scene250::signal() {
R2_GLOBALS._player.setup(250, 1, 2);
R2_GLOBALS._player.setPosition(Common::Point(261, 15));
ADD_MOVER(R2_GLOBALS._player, 261, 185);
_field416 = 0;
_elevatorSpeed = 0;
_sceneMode = 7;
break;
case 7:
_field418 = 1;
if ((_field414 + 12) == _field412)
_skippableFl = true;
if ((_destButtonY + 12) == _currButtonY)
_sceneMode = 9;
else
_sceneMode = 8;
@ -2712,11 +2715,11 @@ void Scene250::signal() {
break;
case 8:
_currentFloor.setPosition(Common::Point(111, _currentFloor._position.y - 12));
_field412 -= 12;
_currButtonY -= 12;
R2_GLOBALS._player.setPosition(Common::Point(261, 15));
ADD_MOVER(R2_GLOBALS._player, 261, 185);
if ((_field414 + 12) == _field412)
if ((_destButtonY + 12) == _currButtonY)
_sceneMode = 9;
break;
case 9:
@ -2732,7 +2735,7 @@ void Scene250::signal() {
break;
case 20:
// Handle changing scene
switch (_field414) {
switch (_destButtonY) {
case 55:
R2_GLOBALS._sceneManager.changeScene(200);
break;
@ -2755,12 +2758,13 @@ void Scene250::signal() {
}
void Scene250::changeFloor(int floorNumber) {
_field414 = (floorNumber - 1) * 12 + 43;
_button1.setPosition(Common::Point(111, _field414));
_destButtonY = (floorNumber - 1) * 12 + 43;
_button1.setPosition(Common::Point(111, _destButtonY));
_button1.show();
_sceneMode = (_field412 >= _field414) ? 6 : 1;
if (_field414 == _field412)
_skippableFl = true;
_sceneMode = (_currButtonY >= _destButtonY) ? 6 : 1;
if (_destButtonY == _currButtonY)
_sceneMode = 20;
signal();
@ -2768,8 +2772,8 @@ void Scene250::changeFloor(int floorNumber) {
void Scene250::process(Event &event) {
if (!event.handled) {
if (((event.eventType == EVENT_KEYPRESS) || (event.btnState != 0)) && _field418) {
_field41A = 1;
if (((event.eventType == EVENT_KEYPRESS) || (event.btnState == BTNSHIFT_RIGHT)) && _skippableFl) {
_skippingFl = true;
event.handled = true;
}
@ -2780,14 +2784,14 @@ void Scene250::process(Event &event) {
void Scene250::dispatch() {
SceneExt::dispatch();
if (((_sceneMode == 2) || (_sceneMode == 7)) && (_field416 < 100)) {
++_field416;
R2_GLOBALS._player._moveDiff.y = _field416 / 5;
if (((_sceneMode == 2) || (_sceneMode == 7)) && (_elevatorSpeed < 100)) {
++_elevatorSpeed;
R2_GLOBALS._player._moveDiff.y = _elevatorSpeed / 5;
}
if (((_sceneMode == 5) || (_sceneMode == 10)) && (R2_GLOBALS._player._moveDiff.y > 4)) {
--_field416;
R2_GLOBALS._player._moveDiff.y = _field416 / 7 + 3;
--_elevatorSpeed;
R2_GLOBALS._player._moveDiff.y = (_elevatorSpeed / 7) + 3;
}
}

View File

@ -310,7 +310,7 @@ public:
class Scene250: public SceneExt {
class Button: public SceneActor {
public:
int _floorNumber, _v2;
int _floorNumber;
Button();
void setFloor(int floorNumber);
@ -318,7 +318,8 @@ class Scene250: public SceneExt {
virtual bool startAction(CursorType action, Event &event);
};
public:
int _field412, _field414, _field416, _field418, _field41A;
int _currButtonY, _destButtonY, _elevatorSpeed;
bool _skippingFl, _skippableFl;
NamedHotspot _background, _item2, _item3, _item4;
Button _button1, _currentFloor;
Button _floor1, _floor2, _floor3, _floor4, _floor5;

File diff suppressed because it is too large Load Diff

View File

@ -46,8 +46,8 @@ public:
SpeakerGameText _gameTextSpeaker;
AnimationPlayer _animationPlayer;
int _field412;
int _fieldD2E;
int _animCounter;
bool _forceCheckAnimationFl;
public:
Scene1000();
@ -89,7 +89,7 @@ class Scene1100 : public SceneExt {
};
public:
int _field412, _field414;
int _nextStripNum, _paletteRefreshStatus;
SpeakerSeeker1100 _seekerSpeaker;
SpeakerQuinn1100 _quinnSpeaker;
SpeakerChief1100 _chiefSpeaker;
@ -103,20 +103,20 @@ public:
NamedHotspot _item7;
SceneActor _actor1;
SceneActor _actor2;
SceneActor _actor3;
SceneActor _actor4;
SceneActor _actor5;
SceneActor _actor6;
SceneActor _actor7;
SceneActor _actor8;
SceneActor _actor9;
SceneActor _actor10;
SceneActor _actor11;
SceneActor _actor12;
SceneActor _actor13;
SceneActor _actor14;
SceneActor _actor15;
BackgroundSceneObject _object1;
SceneActor _shipFormation;
SceneActor _shipFormationShadow;
SceneActor _shotImpact1;
SceneActor _shotImpact2;
SceneActor _shotImpact3;
SceneActor _shotImpact4;
SceneActor _shotImpact5;
SceneActor _laserShot;
SceneActor _animation;
SceneActor _leftImpacts;
SceneActor _runningGuy1;
SceneActor _runningGuy2;
SceneActor _runningGuy3;
BackgroundSceneObject _rightLandslide;
BackgroundSceneObject _object2;
Seeker _seeker;
Trooper _trooper;
@ -730,15 +730,15 @@ class Scene1700 : public SceneExt {
virtual bool startAction(CursorType action, Event &event);
};
class Exit1 : public SceneExit {
class NorthExit : public SceneExit {
public:
virtual void changeScene();
};
class Exit2 : public SceneExit {
class SouthExit : public SceneExit {
public:
virtual void changeScene();
};
class Exit3 : public SceneExit {
class WestExit : public SceneExit {
public:
virtual void changeScene();
};
@ -755,13 +755,13 @@ public:
SceneActor _actor6;
SceneActor _actor7;
SceneActor _actor8;
SceneActor _actor9;
SceneActor _ledgeHopper;
SceneActor _actor10;
Actor11 _actor11;
Actor12 _actor12;
Exit1 _exit1;
Exit2 _exit2;
Exit3 _exit3;
NorthExit _northExit;
SouthExit _southExit;
WestExit _westExit;
SequenceManager _sequenceManager;
int _field77A;
@ -769,7 +769,7 @@ public:
Scene1700();
void synchronize(Serializer &s);
void subAF3F8();
void enterArea();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void remove();
@ -777,54 +777,54 @@ public:
};
class Scene1750 : public SceneExt {
class Actor4 : public SceneActor {
class SpeedSlider : public SceneActor {
public:
int _fieldA4;
int _fieldA6;
int _fieldA8;
int _fieldAA;
int _fieldAC;
int _fieldAE;
int _incrAmount;
int _xp;
int _ys;
int _height;
int _thumbHeight;
bool _mouseDown;
Actor4();
SpeedSlider();
virtual void synchronize(Serializer &s);
void subB1A76(int arg1, int arg2, int arg3, int arg4, int arg5);
void subB1B27();
void setupSlider(int incrAmount, int xp, int ys, int height, int thumbHeight);
void calculateSlider();
virtual void remove();
virtual void process(Event &event);
virtual bool startAction(CursorType action, Event &event);
};
class Actor5 : public SceneActor {
class Button : public SceneActor {
public:
int _fieldA4;
int _buttonId;
Actor5();
Button();
virtual void synchronize(Serializer &s);
virtual bool startAction(CursorType action, Event &event);
};
public:
NamedHotspot _item1;
NamedHotspot _item2;
NamedHotspot _item3;
NamedHotspot _item4;
NamedHotspot _item5;
NamedHotspot _background;
NamedHotspot _redLights;
NamedHotspot _greenLights;
NamedHotspot _frontView;
NamedHotspot _rearView;
SceneActor _actor1;
SceneActor _actor2;
SceneActor _actor3;
Actor4 _actor4;
Actor5 _actor5;
Actor5 _actor6;
Actor5 _actor7;
SpeedSlider _speedSlider;
Button _forwardButton;
Button _backwardButton;
Button _exitButton;
SequenceManager _sequenceManager;
PaletteRotation *_rotation;
int _field412;
int _direction;
int _field413;
int _field415;
int _speed;
int _field417;
int _field419;
int _field41B;

View File

@ -3057,7 +3057,7 @@ void Scene2700::Action4::signal() {
void Scene2700::Area1::process(Event &event) {
SceneArea::process(event);
if ((event.eventType == 1) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) {
if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) {
Scene2700 *scene = (Scene2700 *)R2_GLOBALS._sceneManager._scene;
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 10;
@ -3107,7 +3107,7 @@ void Scene2700::Area1::process(Event &event) {
void Scene2700::Area2::process(Event &event) {
SceneArea::process(event);
if ((event.eventType == 1) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) {
if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._player._canWalk) && (_bounds.contains(event.mousePos))) {
Scene2700 *scene = (Scene2700 *)R2_GLOBALS._sceneManager._scene;
R2_GLOBALS._player.disableControl();
scene->_sceneMode = 10;

View File

@ -5319,7 +5319,7 @@ void Scene3800::signal() {
}
void Scene3800::process(Event &event) {
if ((R2_GLOBALS._player._uiEnabled) && (event.eventType == 1) && (_rect1.contains(event.mousePos))) {
if ((R2_GLOBALS._player._uiEnabled) && (event.eventType == EVENT_BUTTON_DOWN) && (_rect1.contains(event.mousePos))) {
event.handled = true;
switch (R2_GLOBALS._events.getCursor()) {
case R2_NEGATOR_GUN:
@ -5582,7 +5582,7 @@ void Scene3900::signal() {
}
void Scene3900::process(Event &event) {
if ((R2_GLOBALS._player._uiEnabled) && (event.eventType == 1) && (_rect1.contains(event.mousePos))) {
if ((R2_GLOBALS._player._uiEnabled) && (event.eventType == EVENT_BUTTON_DOWN) && (_rect1.contains(event.mousePos))) {
event.handled = true;
switch (R2_GLOBALS._events.getCursor()) {
case R2_NEGATOR_GUN: