mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +00:00
TSAGE: Reworked item startAction calls from void to bool, to accommodate Blue Force changes
This commit is contained in:
parent
7b73ae590c
commit
406a8ca10e
@ -48,9 +48,11 @@ Scene *BlueForceGame::createScene(int sceneNumber) {
|
||||
// Tsunami Title Screen
|
||||
return new Scene20();
|
||||
case 50:
|
||||
// Map screen
|
||||
return new Scene50();
|
||||
case 60:
|
||||
error("Scene group 0 not implemented");
|
||||
// Motorcycle
|
||||
return new Scene60();
|
||||
/* Scene Group #1 */
|
||||
case 100:
|
||||
// Tsnunami Title Screen #2
|
||||
@ -364,7 +366,7 @@ void NamedObject::synchronize(Serializer &s) {
|
||||
s.syncAsSint16LE(_useLineNum);
|
||||
}
|
||||
|
||||
void NamedObject::startAction(CursorType action, Event &event) {
|
||||
bool NamedObject::startAction(CursorType action, Event &event) {
|
||||
bool handled = true;
|
||||
|
||||
switch (action) {
|
||||
@ -393,9 +395,10 @@ void NamedObject::startAction(CursorType action, Event &event) {
|
||||
|
||||
if (!handled)
|
||||
((SceneExt *)BF_GLOBALS._sceneManager._scene)->display(action);
|
||||
return handled;
|
||||
}
|
||||
|
||||
void NamedObject::setup(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) {
|
||||
void NamedObject::setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) {
|
||||
_resNum = resNum;
|
||||
_lookLineNum = lookLineNum;
|
||||
_talkLineNum = talkLineNum;
|
||||
|
@ -107,9 +107,9 @@ public:
|
||||
virtual Common::String getClassName() { return "NamedObject"; }
|
||||
virtual void synchronize(Serializer &s);
|
||||
virtual void postInit(SceneObjectList *OwnerList = NULL);
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
|
||||
void setup(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item);
|
||||
void setDetails(int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item);
|
||||
};
|
||||
|
||||
class CountdownObject: public NamedObject {
|
||||
@ -170,6 +170,7 @@ public:
|
||||
void addTimer(Timer *timer) { _timerList.add(timer); }
|
||||
void removeTimer(Timer *timer) { _timerList.remove(timer); }
|
||||
bool display(CursorType action);
|
||||
void fadeOut() {}
|
||||
};
|
||||
|
||||
class GroupedScene: public SceneExt {
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "tsage/blue_force/blueforce_scenes0.h"
|
||||
#include "tsage/blue_force/blueforce_dialogs.h"
|
||||
#include "tsage/scenes.h"
|
||||
#include "tsage/tsage.h"
|
||||
#include "tsage/staticres.h"
|
||||
@ -499,6 +500,613 @@ void Scene50::process(Event &event) {
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Scene 60 - Motorcycle
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
bool Scene60::Item2::startAction(CursorType action, Event &event) {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
switch (action) {
|
||||
case CURSOR_LOOK:
|
||||
SceneItem::display2(60, 15);
|
||||
break;
|
||||
default:
|
||||
switch (BF_GLOBALS._dayNumber) {
|
||||
case 1:
|
||||
if (BF_GLOBALS.getFlag(onDuty) && check1())
|
||||
return true;
|
||||
break;
|
||||
case 2:
|
||||
if (BF_GLOBALS.getFlag(onDuty) && check2())
|
||||
return true;
|
||||
}
|
||||
|
||||
BF_GLOBALS._sound1.play(BF_GLOBALS.getFlag(fWithLyle) ? 80 : 31);
|
||||
BF_GLOBALS._sound1.holdAt(1);
|
||||
scene->fadeOut();
|
||||
BF_GLOBALS._sceneManager.changeScene(50);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Scene60::Item2::check1() {
|
||||
if (BF_GLOBALS._bookmark >= bStoppedFrankie) {
|
||||
BF_GLOBALS._v5098C |= 1;
|
||||
return false;
|
||||
} else {
|
||||
if ((BF_GLOBALS._bookmark == bBookedGreen) && BF_GLOBALS.getFlag(fArrivedAtGangStop)) {
|
||||
BF_GLOBALS.set2Flags(f1035Frankie);
|
||||
BF_GLOBALS._sceneManager.changeScene(410);
|
||||
}
|
||||
|
||||
if (BF_GLOBALS._bookmark >= bLauraToParamedics) {
|
||||
if (BF_GLOBALS.getFlag(fLeftTraceIn910)) {
|
||||
if (BF_GLOBALS._bookmark < bBookedGreen) {
|
||||
BF_GLOBALS._bookmark = bBookedGreen;
|
||||
BF_GLOBALS.clearFlag(fCalledBackup);
|
||||
BF_GLOBALS.set2Flags(f1035Frankie);
|
||||
return false;
|
||||
} else if (BF_GLOBALS._bookmark == bBookedGreen) {
|
||||
if (!BF_GLOBALS.getFlag(fCalledBackup))
|
||||
BF_GLOBALS.setFlag(f1035Frankie);
|
||||
|
||||
BF_GLOBALS._sceneManager.changeScene(410);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (BF_GLOBALS._bookmark < bStartOfGame) {
|
||||
// Should never reach here
|
||||
} else if (BF_GLOBALS._bookmark < bCalledToDomesticViolence) {
|
||||
if ((BF_GLOBALS._v5098C >> 1) & 1)
|
||||
BF_GLOBALS.setFlag(fLateToMarina);
|
||||
else
|
||||
BF_GLOBALS._v5098C |= 2;
|
||||
} else {
|
||||
int v = ((BF_GLOBALS._v5098C >> 2) & 15 + 1) & 15;
|
||||
BF_GLOBALS._v5098C = (BF_GLOBALS._v5098C & 0xC3) | (v << 2);
|
||||
|
||||
if ((v != 1) && (v != 2)) {
|
||||
BF_GLOBALS._v4CEA8 = 19;
|
||||
BF_GLOBALS._sceneManager.changeScene(666);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BF_GLOBALS._v5098C |= 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Scene60::Item2::check2() {
|
||||
switch (BF_GLOBALS._bookmark) {
|
||||
case bInspectionDone:
|
||||
if (BF_GLOBALS._v5098D & 1) {
|
||||
BF_GLOBALS.setFlag(fLateToDrunkStop);
|
||||
} else {
|
||||
BF_GLOBALS._v5098D |= 1;
|
||||
}
|
||||
break;
|
||||
case bCalledToDrunkStop:
|
||||
BF_GLOBALS.setFlag(fHasDrivenFromDrunk);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
BF_GLOBALS._v5098C |= 0x80;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
bool Scene60::Item3::startAction(CursorType action, Event &event) {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
scene->fadeOut();
|
||||
BF_GLOBALS._sceneManager.changeScene(scene->_newScene);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Scene60::Radio::startAction(CursorType action, Event &event) {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch(action) {
|
||||
case CURSOR_LOOK:
|
||||
SceneItem::display2(60, 0);
|
||||
break;
|
||||
case CURSOR_USE:
|
||||
case CURSOR_TALK:
|
||||
scene->_sound.play(32);
|
||||
scene->setAction(&scene->_action1);
|
||||
break;
|
||||
default:
|
||||
SceneItem::display2(60, 1);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Scene60::Compartment::startAction(CursorType action, Event &event) {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch(action) {
|
||||
case CURSOR_LOOK:
|
||||
SceneItem::display2(60, 8);
|
||||
break;
|
||||
case CURSOR_USE:
|
||||
if ((BF_INVENTORY.getObjectScene(INV_TICKET_BOOK) == 1) &&
|
||||
(BF_INVENTORY.getObjectScene(INV_MIRANDA_CARD) == 1)) {
|
||||
SceneItem::display2(60, 9);
|
||||
}
|
||||
break;
|
||||
case CURSOR_TALK:
|
||||
SceneItem::display2(60, 10);
|
||||
break;
|
||||
case INV_TICKET_BOOK:
|
||||
SceneItem::display2(60, 11);
|
||||
scene->_ticketBook.show();
|
||||
BF_INVENTORY.setObjectScene(INV_TICKET_BOOK, 60);
|
||||
BF_GLOBALS._events.setCursor(CURSOR_USE);
|
||||
BF_GLOBALS._sceneItems.addBefore(&scene->_radio, &scene->_ticketBook);
|
||||
break;
|
||||
case INV_MIRANDA_CARD:
|
||||
SceneItem::display2(60, 12);
|
||||
scene->_mirandaCard.show();
|
||||
BF_INVENTORY.setObjectScene(INV_MIRANDA_CARD, 60);
|
||||
BF_GLOBALS._events.setCursor(CURSOR_USE);
|
||||
BF_GLOBALS._sceneItems.addAfter(&scene->_compartmentDoor, &scene->_mirandaCard);
|
||||
break;
|
||||
default:
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
bool Scene60::MirandaCard::startAction(CursorType action, Event &event) {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
case CURSOR_LOOK:
|
||||
SceneItem::display2(60, 5);
|
||||
return true;
|
||||
case CURSOR_USE:
|
||||
if (BF_INVENTORY.getObjectScene(INV_MIRANDA_CARD) == 60) {
|
||||
SceneItem::display2(60, 6);
|
||||
BF_INVENTORY.setObjectScene(INV_MIRANDA_CARD, 1);
|
||||
if (!BF_GLOBALS.getFlag(fGotPointsForTktBook)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
BF_GLOBALS.setFlag(fGotPointsForTktBook);
|
||||
}
|
||||
|
||||
scene->_mirandaCard.hide();
|
||||
BF_GLOBALS._sceneItems.remove(&scene->_mirandaCard);
|
||||
}
|
||||
return true;
|
||||
case CURSOR_TALK:
|
||||
SceneItem::display2(60, 7);
|
||||
return true;
|
||||
default:
|
||||
return NamedObject::startAction(action, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool Scene60::TicketBook::startAction(CursorType action, Event &event) {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
case CURSOR_LOOK:
|
||||
SceneItem::display2(60, 2);
|
||||
return true;
|
||||
case CURSOR_USE:
|
||||
if (BF_INVENTORY.getObjectScene(INV_TICKET_BOOK) == 60) {
|
||||
scene->_ticketBook.hide();
|
||||
BF_GLOBALS._sceneItems.remove(&scene->_ticketBook);
|
||||
SceneItem::display2(60, 3);
|
||||
BF_INVENTORY.setObjectScene(INV_TICKET_BOOK, 1);
|
||||
if (!BF_GLOBALS.getFlag(fShotNicoIn910)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
BF_GLOBALS.setFlag(fShotNicoIn910);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case CURSOR_TALK:
|
||||
SceneItem::display2(60, 4);
|
||||
return true;
|
||||
default:
|
||||
return NamedObject::startAction(action, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool Scene60::CompartmentDoor::startAction(CursorType action, Event &event) {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
case CURSOR_LOOK:
|
||||
SceneItem::display2(60, 13);
|
||||
return true;
|
||||
case CURSOR_USE:
|
||||
if (_flag) {
|
||||
_flag = false;
|
||||
BF_GLOBALS._player.disableControl();
|
||||
Common::Point pt(308, 165);
|
||||
NpcMover *mover = new NpcMover();
|
||||
addMover(mover, &pt, scene);
|
||||
} else {
|
||||
_flag = true;
|
||||
BF_GLOBALS._player.disableControl();
|
||||
Common::Point pt(288, 165);
|
||||
NpcMover *mover = new NpcMover();
|
||||
addMover(mover, &pt, scene);
|
||||
}
|
||||
return true;
|
||||
case CURSOR_TALK:
|
||||
SceneItem::display2(60, 14);
|
||||
return true;
|
||||
default:
|
||||
return NamedObject::startAction(action, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene60::Action1::signal() {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
setDelay(2);
|
||||
break;
|
||||
case 1:
|
||||
scene->_stripManager.start(634, this);
|
||||
break;
|
||||
case 2:
|
||||
_state = useRadio();
|
||||
setDelay(4);
|
||||
break;
|
||||
case 3:
|
||||
switch (_state) {
|
||||
case 1:
|
||||
if (BF_GLOBALS.removeFlag(fCan1004Marina)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 606;
|
||||
} else if (BF_GLOBALS.removeFlag(fCan1004Drunk)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 606;
|
||||
} else {
|
||||
_state = 611;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
_state = 612;
|
||||
break;
|
||||
case 3:
|
||||
if (BF_GLOBALS.removeFlag(f1015Marina)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 613;
|
||||
} else if (BF_GLOBALS.removeFlag(f1015Frankie)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 614;
|
||||
} else if (BF_GLOBALS.removeFlag(f1015Drunk)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 615;
|
||||
} else {
|
||||
_state = 616;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (BF_GLOBALS.removeFlag(f1027Marina)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_actionIndex = 5;
|
||||
_state = 617;
|
||||
} else if (BF_GLOBALS.removeFlag(f1027Frankie)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_actionIndex = 5;
|
||||
_state = 618;
|
||||
} else if (BF_GLOBALS.removeFlag(f1015Drunk)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_actionIndex = 5;
|
||||
_state = 619;
|
||||
} else {
|
||||
_state = 620;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (BF_GLOBALS.removeFlag(f1035Marina)) {
|
||||
BF_GLOBALS.setFlag(fCalledBackup);
|
||||
BF_GLOBALS._uiElements.addScore(50);
|
||||
_state = 621;
|
||||
} else if (BF_GLOBALS.removeFlag(f1035Frankie)) {
|
||||
BF_GLOBALS.setFlag(fCalledBackup);
|
||||
BF_GLOBALS._uiElements.addScore(50);
|
||||
_actionIndex = 5;
|
||||
_state = 622;
|
||||
} else if (BF_GLOBALS.removeFlag(f1035Drunk)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 623;
|
||||
} else {
|
||||
_state = 624;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (BF_GLOBALS.removeFlag(f1097Marina)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 625;
|
||||
} else if (BF_GLOBALS.removeFlag(f1097Frankie)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_actionIndex = 5;
|
||||
_state = 626;
|
||||
} else if (BF_GLOBALS.removeFlag(f1097Drunk)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 627;
|
||||
} else {
|
||||
_state = 628;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (BF_GLOBALS.removeFlag(f1098Marina)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 629;
|
||||
} else if (BF_GLOBALS.removeFlag(f1098Frankie)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 630;
|
||||
} else if (BF_GLOBALS.removeFlag(f1098Drunk)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
_state = 631;
|
||||
} else {
|
||||
_state = 632;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
_state = 610;
|
||||
break;
|
||||
}
|
||||
|
||||
scene->_stripManager.start(_state, this);
|
||||
break;
|
||||
case 4:
|
||||
remove();
|
||||
case 5:
|
||||
setDelay(120);
|
||||
break;
|
||||
case 6:
|
||||
_actionIndex = 4;
|
||||
scene->_stripManager.start(633, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int Scene60::Action1::useRadio() {
|
||||
return RadioConvDialog::show();
|
||||
}
|
||||
|
||||
void Scene60::Action2::signal() {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
BF_GLOBALS._player.disableControl();
|
||||
scene->_sound.play(32);
|
||||
setDelay(2);
|
||||
break;
|
||||
case 1:
|
||||
BF_GLOBALS._bookmark = bStartOfGame;
|
||||
BF_GLOBALS.set2Flags(f1035Marina);
|
||||
scene->_stripManager.start(60, this);
|
||||
break;
|
||||
case 2:
|
||||
BF_GLOBALS._player.enableControl();
|
||||
remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene60::Action3::signal() {
|
||||
Scene60 *scene = (Scene60 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (_actionIndex++) {
|
||||
case 0:
|
||||
BF_GLOBALS._player.disableControl();
|
||||
scene->_sound.play(32);
|
||||
setDelay(2);
|
||||
break;
|
||||
case 1:
|
||||
BF_GLOBALS._bookmark = bInspectionDone;
|
||||
BF_GLOBALS.set2Flags(f1035Drunk);
|
||||
BF_GLOBALS.setFlag(fCan1004Drunk);
|
||||
scene->_stripManager.start(71, this);
|
||||
break;
|
||||
case 2:
|
||||
scene->_field1222 = true;
|
||||
BF_GLOBALS._player.enableControl();
|
||||
remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Scene60::Scene60(): SceneExt() {
|
||||
_field1222 = false;
|
||||
_newScene = 0;
|
||||
}
|
||||
|
||||
void Scene60::postInit(SceneObjectList *OwnerList) {
|
||||
_newScene = BF_GLOBALS._driveFromScene = BF_GLOBALS._sceneManager._previousScene;
|
||||
|
||||
// Set up which scene background to use
|
||||
switch (_newScene) {
|
||||
case 300:
|
||||
_sceneNumber = 1301;
|
||||
break;
|
||||
case 380:
|
||||
_sceneNumber = 1380;
|
||||
break;
|
||||
case 410:
|
||||
_sceneNumber = 1410;
|
||||
break;
|
||||
case 551:
|
||||
_sceneNumber = 1550;
|
||||
break;
|
||||
case 550:
|
||||
_sceneNumber = 1555;
|
||||
break;
|
||||
case 580:
|
||||
_sceneNumber = 1580;
|
||||
break;
|
||||
case 800:
|
||||
_sceneNumber = 1810;
|
||||
break;
|
||||
default:
|
||||
_sceneNumber = 60;
|
||||
break;
|
||||
}
|
||||
|
||||
if (_sceneNumber == 1550) {
|
||||
if (BF_GLOBALS.getFlag(fHasDrivenFromDrunk))
|
||||
_sceneNumber = 1555;
|
||||
else {
|
||||
_object1.postInit();
|
||||
_object1.setVisage(1550);
|
||||
_object1.animate(ANIM_MODE_2);
|
||||
_object1.setPosition(Common::Point(158, 18));
|
||||
}
|
||||
}
|
||||
|
||||
loadScene(_sceneNumber);
|
||||
|
||||
if ((_sceneNumber == 1810) && (BF_GLOBALS._dayNumber > 1) &&
|
||||
(BF_GLOBALS._dayNumber < 5) && !BF_GLOBALS.getFlag(fWithLyle) &&
|
||||
((BF_GLOBALS._dayNumber != 4) && (BF_GLOBALS._bookmark >= bEndDayThree))) {
|
||||
_car.setup(1810, 1, 1, 164, 131, 1);
|
||||
}
|
||||
|
||||
if ((_sceneNumber == 1410) && (BF_GLOBALS._bookmark == bBookedGreen) &&
|
||||
!BF_GLOBALS.getFlag(fDriverOutOfTruck)) {
|
||||
_object1.postInit();
|
||||
_object1.setVisage(410);
|
||||
_object1.setStrip(6);
|
||||
_object1.setPosition(Common::Point(135, 47));
|
||||
}
|
||||
|
||||
if (BF_GLOBALS.getFlag(fWithLyle)) {
|
||||
_visage = 62;
|
||||
_item2._sceneRegionId = 22;
|
||||
} else if (BF_GLOBALS.getFlag(onDuty)) {
|
||||
_visage = 63;
|
||||
_item2._sceneRegionId = 20;
|
||||
} else {
|
||||
_visage = 61;
|
||||
_item2._sceneRegionId = 28;
|
||||
}
|
||||
_dashboard.setup(_visage, 1, 1, 160, 168, 100);
|
||||
_cursorId = CURSOR_USE;
|
||||
|
||||
if (_visage == 63) {
|
||||
_compartmentDoor.postInit();
|
||||
_compartmentDoor.setVisage(60);
|
||||
_compartmentDoor.setStrip(1);
|
||||
_compartmentDoor.setFrame(1);
|
||||
_compartmentDoor.setPosition(Common::Point(288, 165));
|
||||
_compartmentDoor.setPriority(250);
|
||||
_compartmentDoor._flag = true;
|
||||
BF_GLOBALS._sceneItems.push_back(&_compartmentDoor);
|
||||
|
||||
_mirandaCard.postInit();
|
||||
_mirandaCard.setVisage(60);
|
||||
_mirandaCard.setStrip(2);
|
||||
_mirandaCard.setFrame(2);
|
||||
_mirandaCard.setPosition(Common::Point(280, 160));
|
||||
|
||||
if (BF_INVENTORY.getObjectScene(INV_MIRANDA_CARD) == 60) {
|
||||
_mirandaCard.show();
|
||||
BF_GLOBALS._sceneItems.push_back(&_mirandaCard);
|
||||
} else {
|
||||
_mirandaCard.hide();
|
||||
}
|
||||
|
||||
_ticketBook.postInit();
|
||||
_ticketBook.setVisage(60);
|
||||
_ticketBook.setStrip(2);
|
||||
_ticketBook.setFrame(1);
|
||||
_ticketBook.setPosition(Common::Point(289, 161));
|
||||
|
||||
if (BF_INVENTORY.getObjectScene(INV_TICKET_BOOK) == 60) {
|
||||
_ticketBook.show();
|
||||
BF_GLOBALS._sceneItems.push_back(&_ticketBook);
|
||||
} else {
|
||||
_ticketBook.hide();
|
||||
}
|
||||
}
|
||||
|
||||
_item3._sceneRegionId = 7;
|
||||
_radio._sceneRegionId = 12;
|
||||
_compartment._sceneRegionId = 14;
|
||||
|
||||
_stripManager.addSpeaker(&_gameTextSpeaker);
|
||||
_stripManager.addSpeaker(&_jakeRadioSpeaker);
|
||||
|
||||
if (BF_GLOBALS.getFlag(onDuty) && !BF_GLOBALS.getFlag(fWithLyle)) {
|
||||
BF_GLOBALS._sceneItems.push_back(&_radio);
|
||||
BF_GLOBALS._sceneItems.push_back(&_compartment);
|
||||
}
|
||||
|
||||
BF_GLOBALS._sceneItems.push_back(&_item2);
|
||||
BF_GLOBALS._sceneItems.push_back(&_item3);
|
||||
BF_GLOBALS._player.enableControl();
|
||||
BF_GLOBALS._events.setCursor(CURSOR_USE);
|
||||
|
||||
switch (BF_GLOBALS._dayNumber) {
|
||||
case 1:
|
||||
if (BF_GLOBALS.getFlag(onDuty) && (BF_GLOBALS._v5098C & 1) &&
|
||||
(BF_GLOBALS._bookmark < bStartOfGame) && (BF_GLOBALS._sceneManager._previousScene != 342)) {
|
||||
setAction(&_action2);
|
||||
if (BF_GLOBALS._sceneManager._previousScene == 342)
|
||||
_newScene = 340;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (BF_GLOBALS.getFlag(onDuty) && ((BF_GLOBALS._v5098C >> 7) & 1) &&
|
||||
(BF_GLOBALS._sceneManager._previousScene != 550) &&
|
||||
(BF_GLOBALS._bookmark < bInspectionDone)) {
|
||||
setAction(&_action3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Scene60::signal() {
|
||||
++_sceneMode;
|
||||
BF_GLOBALS._player.enableControl();
|
||||
}
|
||||
|
||||
void Scene60::dispatch() {
|
||||
SceneExt::dispatch();
|
||||
|
||||
int idx = BF_GLOBALS._sceneRegions.indexOf(Common::Point(
|
||||
BF_GLOBALS._sceneManager._scene->_sceneBounds.left + BF_GLOBALS._events._mousePos.x,
|
||||
BF_GLOBALS._sceneManager._scene->_sceneBounds.top + BF_GLOBALS._events._mousePos.y));
|
||||
|
||||
if (idx == _item3._sceneRegionId) {
|
||||
if (BF_GLOBALS._events.getCursor() != CURSOR_EXIT) {
|
||||
_cursorId = BF_GLOBALS._events.getCursor();
|
||||
BF_GLOBALS._events.setCursor(CURSOR_EXIT);
|
||||
}
|
||||
} else {
|
||||
if (BF_GLOBALS._events.getCursor() == CURSOR_EXIT) {
|
||||
BF_GLOBALS._events.setCursor(_cursorId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace BlueForce
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "tsage/blue_force/blueforce_logic.h"
|
||||
#include "tsage/blue_force/blueforce_speakers.h"
|
||||
#include "tsage/converse.h"
|
||||
#include "tsage/events.h"
|
||||
#include "tsage/core.h"
|
||||
@ -96,6 +97,90 @@ public:
|
||||
virtual void process(Event &event);
|
||||
};
|
||||
|
||||
class Scene60 : public SceneExt {
|
||||
/* Items */
|
||||
class Item2: public NamedHotspot {
|
||||
private:
|
||||
bool check1();
|
||||
bool check2();
|
||||
public:
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item3: public NamedHotspot {
|
||||
public:
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Radio: public NamedHotspot {
|
||||
public:
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Compartment: public NamedHotspot {
|
||||
public:
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Objects */
|
||||
class MirandaCard: public NamedObject {
|
||||
public:
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class TicketBook: public NamedObject {
|
||||
public:
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class CompartmentDoor: public NamedObject {
|
||||
public:
|
||||
bool _flag;
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Actions */
|
||||
class Action1: public ActionExt {
|
||||
private:
|
||||
int useRadio();
|
||||
public:
|
||||
virtual void signal();
|
||||
};
|
||||
class Action2: public Action {
|
||||
public:
|
||||
virtual void signal();
|
||||
};
|
||||
class Action3: public Action {
|
||||
public:
|
||||
virtual void signal();
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
Action1 _action1;
|
||||
Action2 _action2;
|
||||
Action3 _action3;
|
||||
NamedObject _object1;
|
||||
MirandaCard _mirandaCard;
|
||||
TicketBook _ticketBook;
|
||||
CompartmentDoor _compartmentDoor;
|
||||
SceneObject _dashboard;
|
||||
AltSceneObject _car;
|
||||
NamedHotspot _item1;
|
||||
Item2 _item2;
|
||||
Item3 _item3;
|
||||
Radio _radio;
|
||||
Compartment _compartment;
|
||||
SpeakerGameText _gameTextSpeaker;
|
||||
SpeakerJakeRadio _jakeRadioSpeaker;
|
||||
ASound _sound;
|
||||
int _newScene;
|
||||
int _sceneNumber;
|
||||
int _visage;
|
||||
CursorType _cursorId;
|
||||
bool _field1222;
|
||||
|
||||
Scene60();
|
||||
virtual void postInit(SceneObjectList *OwnerList = NULL);
|
||||
virtual void signal();
|
||||
virtual void dispatch();
|
||||
};
|
||||
|
||||
|
||||
} // End of namespace BlueForce
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
@ -432,7 +432,7 @@ void Scene109::signal() {
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene190::Object4::startAction(CursorType action, Event &event) {
|
||||
bool Scene190::Object4::startAction(CursorType action, Event &event) {
|
||||
Scene190 *scene = (Scene190 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
@ -442,48 +442,46 @@ void Scene190::Object4::startAction(CursorType action, Event &event) {
|
||||
Common::Point pt(62, 96);
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
BF_GLOBALS._player.addMover(mover, &pt, scene);
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
NamedObject::startAction(action, event);
|
||||
break;
|
||||
return NamedObject::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene190::Item1::startAction(CursorType action, Event &event) {
|
||||
bool Scene190::Item1::startAction(CursorType action, Event &event) {
|
||||
Scene190 *scene = (Scene190 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
case CURSOR_USE:
|
||||
scene->setAction(&scene->_action1);
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
NamedHotspot::startAction(action, event);
|
||||
break;
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene190::Item2::startAction(CursorType action, Event &event) {
|
||||
bool Scene190::Item2::startAction(CursorType action, Event &event) {
|
||||
Scene190 *scene = (Scene190 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
case CURSOR_USE:
|
||||
scene->_stripManager.start(1900, scene);
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
NamedHotspot::startAction(action, event);
|
||||
break;
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene190::Exit::startAction(CursorType action, Event &event) {
|
||||
bool Scene190::Exit::startAction(CursorType action, Event &event) {
|
||||
Scene190 *scene = (Scene190 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
Common::Point pt(316, 91);
|
||||
PlayerMover *mover = new PlayerMover();
|
||||
BF_GLOBALS._player.addMover(mover, &pt, scene);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@ -555,7 +553,7 @@ void Scene190::postInit(SceneObjectList *OwnerList) {
|
||||
_object3.fixPriority(200);
|
||||
_object3.setPosition(Common::Point(170, 31));
|
||||
_object3.animate(ANIM_MODE_7, 0, NULL);
|
||||
_object3.setup(190, 8, 26, 19, 1, NULL);
|
||||
_object3.setDetails(190, 8, 26, 19, 1, NULL);
|
||||
|
||||
if (BF_GLOBALS.getFlag(fWithLyle)) {
|
||||
BF_GLOBALS._player.setVisage(303);
|
||||
@ -567,7 +565,7 @@ void Scene190::postInit(SceneObjectList *OwnerList) {
|
||||
_object4.setVisage(444);
|
||||
_object4.setFrame(2);
|
||||
_object4.setPosition(Common::Point(54, 114));
|
||||
_object4.setup(190, -1, -1, -1, 1, NULL);
|
||||
_object4.setDetails(190, -1, -1, -1, 1, NULL);
|
||||
|
||||
switch (BF_GLOBALS._sceneManager._previousScene) {
|
||||
case 300: {
|
||||
@ -631,17 +629,17 @@ void Scene190::postInit(SceneObjectList *OwnerList) {
|
||||
BF_GLOBALS._sound1.play(33);
|
||||
}
|
||||
|
||||
_exit.setup(Rect(310, 50, 320, 125), 190, -1, -1, -1, 1, NULL);
|
||||
_item2.setup(Rect(108, 1, 111, 94), 190, 7, 11, 18, 1, NULL);
|
||||
_item4.setup(2, 190, 5, 10, 16, 1);
|
||||
_item3.setup(1, 190, 4, 10, 15, 1);
|
||||
_item8.setup(6, 190, 20, 21, 22, 1);
|
||||
_item1.setup(7, 190, 1, 10, -1, 1);
|
||||
_item7.setup(5, 190, 0, 10, 12, 1);
|
||||
_item6.setup(4, 190, 2, 10, 13, 1);
|
||||
_item5.setup(3, 190, 3, 10, 14, 1);
|
||||
_item9.setup(Rect(0, 0, 89, 68), 190, 6, 10, 17, 1, NULL);
|
||||
_item10.setup(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 190, 23, -1, -1, 1, NULL);
|
||||
_exit.setDetails(Rect(310, 50, 320, 125), 190, -1, -1, -1, 1, NULL);
|
||||
_item2.setDetails(Rect(108, 1, 111, 94), 190, 7, 11, 18, 1, NULL);
|
||||
_item4.setDetails(2, 190, 5, 10, 16, 1);
|
||||
_item3.setDetails(1, 190, 4, 10, 15, 1);
|
||||
_item8.setDetails(6, 190, 20, 21, 22, 1);
|
||||
_item1.setDetails(7, 190, 1, 10, -1, 1);
|
||||
_item7.setDetails(5, 190, 0, 10, 12, 1);
|
||||
_item6.setDetails(4, 190, 2, 10, 13, 1);
|
||||
_item5.setDetails(3, 190, 3, 10, 14, 1);
|
||||
_item9.setDetails(Rect(0, 0, 89, 68), 190, 6, 10, 17, 1, NULL);
|
||||
_item10.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 190, 23, -1, -1, 1, NULL);
|
||||
}
|
||||
|
||||
void Scene190::signal() {
|
||||
|
@ -128,21 +128,21 @@ class Scene190: public SceneExt {
|
||||
/* Objects */
|
||||
class Object4: public NamedObject {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class Item1: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item2: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Exit: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Actions */
|
||||
|
@ -36,53 +36,60 @@ namespace BlueForce {
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene300::Object::startAction(CursorType action, Event &event) {
|
||||
bool Scene300::Object::startAction(CursorType action, Event &event) {
|
||||
if (action == CURSOR_TALK) {
|
||||
Scene300 *scene = (Scene300 *)BF_GLOBALS._sceneManager._scene;
|
||||
scene->_stripManager.start(_stripNumber, scene);
|
||||
return true;
|
||||
} else {
|
||||
NamedObject::startAction(action, event);
|
||||
return NamedObject::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene300::Object19::startAction(CursorType action, Event &event) {
|
||||
bool Scene300::Object19::startAction(CursorType action, Event &event) {
|
||||
if ((action != CURSOR_USE) || !BF_GLOBALS.getFlag(onDuty)) {
|
||||
NamedObject::startAction(action, event);
|
||||
return NamedObject::startAction(action, event);
|
||||
} else if ((BF_GLOBALS._dayNumber != 2) || (BF_GLOBALS._bookmark >= bEndDayOne)) {
|
||||
Scene300 *scene = (Scene300 *)BF_GLOBALS._sceneManager._scene;
|
||||
setAction(&scene->_action4);
|
||||
} else {
|
||||
SceneItem::display2(300, 33);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Scene300::Item1::startAction(CursorType action, Event &event) {
|
||||
bool Scene300::Item1::startAction(CursorType action, Event &event) {
|
||||
if (action == CURSOR_USE) {
|
||||
Scene300 *scene = (Scene300 *)BF_GLOBALS._sceneManager._scene;
|
||||
BF_GLOBALS._player.disableControl();
|
||||
scene->_sceneMode = 305;
|
||||
scene->setAction(&scene->_sequenceManager1, scene, 305, &BF_GLOBALS._player,
|
||||
&scene->_object8, NULL);
|
||||
return true;
|
||||
} else {
|
||||
NamedHotspot::startAction(action, event);
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene300::Item2::startAction(CursorType action, Event &event) {
|
||||
bool Scene300::Item2::startAction(CursorType action, Event &event) {
|
||||
if ((action == CURSOR_LOOK) || (action == CURSOR_USE)) {
|
||||
Scene300 *scene = (Scene300 *)BF_GLOBALS._sceneManager._scene;
|
||||
scene->setAction(&scene->_sequenceManager1, scene, 304, &scene->_object11, NULL);
|
||||
return true;
|
||||
} else {
|
||||
NamedHotspot::startAction(action, event);
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene300::Item14::startAction(CursorType action, Event &event) {
|
||||
bool Scene300::Item14::startAction(CursorType action, Event &event) {
|
||||
ADD_PLAYER_MOVER_NULL(BF_GLOBALS._player, 151, 54);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Scene300::Item15::startAction(CursorType action, Event &event) {
|
||||
bool Scene300::Item15::startAction(CursorType action, Event &event) {
|
||||
ADD_PLAYER_MOVER_NULL(BF_GLOBALS._player, 316, 90);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@ -234,8 +241,8 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
|
||||
_stripManager.addSpeaker(&_jakeSpeaker);
|
||||
|
||||
_field2762 = 0;
|
||||
_item14.setup(Rect(144, 27, 160, 60), 300, -1, -1, -1, 1, NULL);
|
||||
_item15.setup(Rect(310, 76, SCREEN_WIDTH, 105), 300, -1, -1, -1, 1, NULL);
|
||||
_item14.setDetails(Rect(144, 27, 160, 60), 300, -1, -1, -1, 1, NULL);
|
||||
_item15.setDetails(Rect(310, 76, SCREEN_WIDTH, 105), 300, -1, -1, -1, 1, NULL);
|
||||
|
||||
// Setup the player
|
||||
int playerVisage = BF_GLOBALS._player._visage;
|
||||
@ -258,20 +265,20 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
|
||||
_object17.setVisage(301);
|
||||
_object17.setStrip(1);
|
||||
_object17.setPosition(Common::Point(87, 88));
|
||||
_object17.setup(300, 11, 13, 2, 1, NULL);
|
||||
_object17.setDetails(300, 11, 13, 2, 1, NULL);
|
||||
|
||||
_object18.postInit();
|
||||
_object18.setVisage(301);
|
||||
_object18.setStrip(1);
|
||||
_object18.setPosition(Common::Point(137, 92));
|
||||
_object18.setup(300, 11, 13, 3, 1, NULL);
|
||||
_object18.setDetails(300, 11, 13, 3, 1, NULL);
|
||||
}
|
||||
|
||||
_object19.postInit();
|
||||
_object19.setVisage(301);
|
||||
_object19.setStrip(1);
|
||||
_object19.setPosition(Common::Point(175, 99));
|
||||
_object19.setup(300, 11, 13, 34, 1, NULL);
|
||||
_object19.setDetails(300, 11, 13, 34, 1, NULL);
|
||||
|
||||
_object11.postInit();
|
||||
_object11.setVisage(301);
|
||||
@ -283,7 +290,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
|
||||
case 50:
|
||||
case 60:
|
||||
BF_GLOBALS.clearFlag(onBike);
|
||||
if (BF_GLOBALS.getFlag(3)) {
|
||||
if (BF_GLOBALS.getFlag(onDuty)) {
|
||||
BF_GLOBALS._player.disableControl();
|
||||
_sceneMode = 318;
|
||||
setAction(&_sequenceManager1, this, 318, &BF_GLOBALS._player, &_object19, NULL);
|
||||
@ -335,19 +342,19 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
|
||||
break;
|
||||
}
|
||||
|
||||
_item10.setup(4, 300, 7, 13, 16, 1);
|
||||
_item11.setup(2, 300, 9, 13, 18, 1);
|
||||
_item12.setup(5, 300, 10, 13, 19, 1);
|
||||
_item13.setup(3, 300, 25, 26, 27, 1);
|
||||
_item2.setup(Rect(266, 54, 272, 59), 300, -1, -1, -1, 1, NULL);
|
||||
_item1.setup(Rect(262, 47, 299, 76), 300, 1, 13, -1, 1, NULL);
|
||||
_item4.setup(Rect(0, 85, SCREEN_WIDTH - 1, BF_INTERFACE_Y - 1), 300, 6, 13, 15, 1, NULL);
|
||||
_item7.setup(Rect(219, 46, 251, 74), 300, 22, 23, 24, 1, NULL);
|
||||
_item8.setup(Rect(301, 53, 319, 78), 300, 22, 23, 24, 1, NULL);
|
||||
_item5.setup(Rect(179, 44, 200, 55), 300, 8, 13, 17, 1, NULL);
|
||||
_item6.setup(Rect(210, 46, 231, 55), 300, 8, 13, 17, 1, NULL);
|
||||
_item3.setup(Rect(160, 0, SCREEN_WIDTH - 1, 75), 300, 4, 13, 14, 1, NULL);
|
||||
_item9.setup(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 300, 29, 30, 31, 1, NULL);
|
||||
_item10.setDetails(4, 300, 7, 13, 16, 1);
|
||||
_item11.setDetails(2, 300, 9, 13, 18, 1);
|
||||
_item12.setDetails(5, 300, 10, 13, 19, 1);
|
||||
_item13.setDetails(3, 300, 25, 26, 27, 1);
|
||||
_item2.setDetails(Rect(266, 54, 272, 59), 300, -1, -1, -1, 1, NULL);
|
||||
_item1.setDetails(Rect(262, 47, 299, 76), 300, 1, 13, -1, 1, NULL);
|
||||
_item4.setDetails(Rect(0, 85, SCREEN_WIDTH - 1, BF_INTERFACE_Y - 1), 300, 6, 13, 15, 1, NULL);
|
||||
_item7.setDetails(Rect(219, 46, 251, 74), 300, 22, 23, 24, 1, NULL);
|
||||
_item8.setDetails(Rect(301, 53, 319, 78), 300, 22, 23, 24, 1, NULL);
|
||||
_item5.setDetails(Rect(179, 44, 200, 55), 300, 8, 13, 17, 1, NULL);
|
||||
_item6.setDetails(Rect(210, 46, 231, 55), 300, 8, 13, 17, 1, NULL);
|
||||
_item3.setDetails(Rect(160, 0, SCREEN_WIDTH - 1, 75), 300, 4, 13, 14, 1, NULL);
|
||||
_item9.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 300, 29, 30, 31, 1, NULL);
|
||||
}
|
||||
|
||||
void Scene300::signal() {
|
||||
@ -625,7 +632,7 @@ void Scene300::setup() {
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene315::Item1::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item1::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
scene->_currentCursor = action;
|
||||
|
||||
@ -665,6 +672,7 @@ void Scene315::Item1::startAction(CursorType action, Event &event) {
|
||||
scene->_sceneMode = 3152;
|
||||
scene->setAction(&scene->_sequenceManager, scene, 3153, 1888, NULL);
|
||||
}
|
||||
break;
|
||||
case INV_FOREST_RAP:
|
||||
BF_GLOBALS._player.disableControl();
|
||||
scene->_stripNumber = BF_GLOBALS.getFlag(onDuty) ? 3178 : 3173;
|
||||
@ -721,12 +729,13 @@ void Scene315::Item1::startAction(CursorType action, Event &event) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
NamedHotspot::startAction(action, event);
|
||||
break;
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Scene315::Item2::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item2::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
@ -757,12 +766,13 @@ void Scene315::Item2::startAction(CursorType action, Event &event) {
|
||||
scene->setAction(&scene->_sequenceManager, scene, 3154, &BF_GLOBALS._player, NULL);
|
||||
break;
|
||||
default:
|
||||
NamedHotspot::startAction(action, event);
|
||||
break;
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Scene315::Item4::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item4::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
if (action == CURSOR_LOOK) {
|
||||
@ -772,23 +782,25 @@ void Scene315::Item4::startAction(CursorType action, Event &event) {
|
||||
scene->_object9.hide();
|
||||
scene->_sceneMode = 3167;
|
||||
scene->setAction(&scene->_sequenceManager, scene, 3167, &scene->_object9, this, NULL);
|
||||
return true;
|
||||
} else {
|
||||
NamedHotspot::startAction(action, event);
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene315::Item5::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item5::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
if (action == CURSOR_LOOK) {
|
||||
BF_GLOBALS._player.addMover(NULL);
|
||||
scene->_stripManager.start(3154, &BF_GLOBALS._stripProxy);
|
||||
return true;
|
||||
} else {
|
||||
NamedHotspot::startAction(action, event);
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene315::Item14::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item14::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
if ((action == INV_COLT45) && BF_GLOBALS.getFlag(onDuty)) {
|
||||
@ -805,42 +817,47 @@ void Scene315::Item14::startAction(CursorType action, Event &event) {
|
||||
scene->_sceneMode = 3159;
|
||||
scene->setAction(&scene->_sequenceManager, scene, 3159, &BF_GLOBALS._player, NULL);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
NamedHotspot::startAction(action, event);
|
||||
return NamedHotspot::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene315::Item15::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item15::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
if (action != CURSOR_USE)
|
||||
NamedHotspot::startAction(action, event);
|
||||
else if (BF_INVENTORY._forestRap._sceneNumber == 1)
|
||||
return NamedHotspot::startAction(action, event);
|
||||
else if (BF_INVENTORY._forestRap._sceneNumber == 1) {
|
||||
SceneItem::display2(315, 37);
|
||||
else {
|
||||
return true;
|
||||
} else {
|
||||
BF_GLOBALS._player.disableControl();
|
||||
scene->_sceneMode = 3158;
|
||||
scene->setAction(&scene->_sequenceManager, scene, 3158, &BF_GLOBALS._player, NULL);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene315::Item16::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item16::startAction(CursorType action, Event &event) {
|
||||
ADD_PLAYER_MOVER_NULL(BF_GLOBALS._player, 190, 75);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Scene315::Item17::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Item17::startAction(CursorType action, Event &event) {
|
||||
ADD_PLAYER_MOVER_NULL(BF_GLOBALS._player, event.mousePos.x, event.mousePos.y);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene315::Object1::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Object1::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
case CURSOR_LOOK:
|
||||
scene->_stripManager.start(3157, &BF_GLOBALS._stripProxy);
|
||||
break;
|
||||
return true;
|
||||
case CURSOR_USE:
|
||||
if (!BF_GLOBALS.getFlag(fGotPointsForCleaningGun)) {
|
||||
BF_GLOBALS._uiElements.addScore(10);
|
||||
@ -848,14 +865,14 @@ void Scene315::Object1::startAction(CursorType action, Event &event) {
|
||||
}
|
||||
BF_GLOBALS._player.addMover(NULL);
|
||||
scene->_stripManager.start(3159, &BF_GLOBALS._stripProxy);
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
NamedObject::startAction(action, event);
|
||||
return NamedObject::startAction(action, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Scene315::Object2::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Object2::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
@ -865,27 +882,26 @@ void Scene315::Object2::startAction(CursorType action, Event &event) {
|
||||
scene->_object9.hide();
|
||||
scene->_sceneMode = 3157;
|
||||
scene->setAction(&scene->_sequenceManager, scene, 3157, &BF_GLOBALS._player, &scene->_object9, NULL);
|
||||
break;
|
||||
return true;
|
||||
case CURSOR_USE:
|
||||
BF_GLOBALS._player.disableControl();
|
||||
scene->_sceneMode = 3156;
|
||||
scene->setAction(&scene->_sequenceManager, scene, BF_GLOBALS.getFlag(onDuty) ? 3156 : 3168,
|
||||
&BF_GLOBALS._player, this, NULL);
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
NamedObject::startAction(action, event);
|
||||
break;
|
||||
return NamedObject::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene315::Object3::startAction(CursorType action, Event &event) {
|
||||
bool Scene315::Object3::startAction(CursorType action, Event &event) {
|
||||
Scene315 *scene = (Scene315 *)BF_GLOBALS._sceneManager._scene;
|
||||
|
||||
switch (action) {
|
||||
case CURSOR_LOOK:
|
||||
BF_GLOBALS._player.addMover(NULL);
|
||||
scene->_stripManager.start(3156, &BF_GLOBALS._stripProxy);
|
||||
break;
|
||||
return true;
|
||||
case CURSOR_USE:
|
||||
if (!BF_GLOBALS.getFlag(fGotPointsForMemo)) {
|
||||
BF_GLOBALS._uiElements.addScore(30);
|
||||
@ -894,10 +910,9 @@ void Scene315::Object3::startAction(CursorType action, Event &event) {
|
||||
|
||||
BF_GLOBALS._player.addMover(NULL);
|
||||
scene->_stripManager.start(3158, &BF_GLOBALS._stripProxy);
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
NamedObject::startAction(action, event);
|
||||
break;
|
||||
return NamedObject::startAction(action, event);
|
||||
}
|
||||
}
|
||||
|
||||
@ -986,7 +1001,7 @@ void Scene315::postInit(SceneObjectList *OwnerList) {
|
||||
_object3.setStrip(4);
|
||||
_object3.setFrame(4);
|
||||
_object3.fixPriority(82);
|
||||
_object3.setup(315, -1, -1, -1, 1, NULL);
|
||||
_object3.setDetails(315, -1, -1, -1, 1, NULL);
|
||||
}
|
||||
|
||||
if (BF_GLOBALS._dayNumber == 1) {
|
||||
@ -997,7 +1012,7 @@ void Scene315::postInit(SceneObjectList *OwnerList) {
|
||||
_object1.setStrip(4);
|
||||
_object1.setFrame(2);
|
||||
_object1.fixPriority(82);
|
||||
_object1.setup(315, -1, -1, -1, 1, NULL);
|
||||
_object1.setDetails(315, -1, -1, -1, 1, NULL);
|
||||
}
|
||||
} else if ((BF_INVENTORY._daNote._sceneNumber != 1) && (BF_GLOBALS._dayNumber < 3)) {
|
||||
_object2.postInit();
|
||||
@ -1006,16 +1021,16 @@ void Scene315::postInit(SceneObjectList *OwnerList) {
|
||||
_object2.setFrame(2);
|
||||
_object2.setPosition(Common::Point(304, 31));
|
||||
_object2.fixPriority(70);
|
||||
_object2.setup(315, 3, 4, -1, 1, NULL);
|
||||
_object2.setDetails(315, 3, 4, -1, 1, NULL);
|
||||
}
|
||||
|
||||
_item2.setup(12, 315, 35, -1, 36, 1);
|
||||
_item5.setup(3, 315, -1, -1, -1, 1);
|
||||
_item1.setup(4, 315, 10, 11, 12, 1);
|
||||
_item3.setup(2, 315, 0, 1, 2, 1);
|
||||
_item4.setup(Rect(190, 17, 208, 30), 315, -1, -1, -1, 1, NULL);
|
||||
_item16.setup(Rect(184, 31, 211, 80), 315, -1, -1, -1, 1, NULL);
|
||||
_item17.setup(Rect(0, 157, 190, 167), 315, -1, -1, -1, 1, NULL);
|
||||
_item2.setDetails(12, 315, 35, -1, 36, 1);
|
||||
_item5.setDetails(3, 315, -1, -1, -1, 1);
|
||||
_item1.setDetails(4, 315, 10, 11, 12, 1);
|
||||
_item3.setDetails(2, 315, 0, 1, 2, 1);
|
||||
_item4.setDetails(Rect(190, 17, 208, 30), 315, -1, -1, -1, 1, NULL);
|
||||
_item16.setDetails(Rect(184, 31, 211, 80), 315, -1, -1, -1, 1, NULL);
|
||||
_item17.setDetails(Rect(0, 157, 190, 167), 315, -1, -1, -1, 1, NULL);
|
||||
|
||||
if (!BF_GLOBALS.getFlag(onDuty) && ((BF_GLOBALS._bookmark == bNone) || (BF_GLOBALS._bookmark == bLyleStoppedBy))) {
|
||||
_field1398 = 1;
|
||||
@ -1098,14 +1113,14 @@ void Scene315::postInit(SceneObjectList *OwnerList) {
|
||||
BF_GLOBALS._walkRegions.proc1(4);
|
||||
}
|
||||
|
||||
_item15.setup(24, 315, 38, 39, 40, 1);
|
||||
_item14.setup(14, 315, 24, 25, 26, 1);
|
||||
_item7.setup(5, 315, 8, 9, -1, 1);
|
||||
_item6.setup(6, 315, 5, 6, 7, 1);
|
||||
_item10.setup(8, 315, 13, -1, -1, 1);
|
||||
_item11.setup(9, 315, 14, -1, -1, 1);
|
||||
_item8.setup(7, 315, 15, 16, 17, 1);
|
||||
_item9.setup(10, 315, 18, 19, 20, 1);
|
||||
_item15.setDetails(24, 315, 38, 39, 40, 1);
|
||||
_item14.setDetails(14, 315, 24, 25, 26, 1);
|
||||
_item7.setDetails(5, 315, 8, 9, -1, 1);
|
||||
_item6.setDetails(6, 315, 5, 6, 7, 1);
|
||||
_item10.setDetails(8, 315, 13, -1, -1, 1);
|
||||
_item11.setDetails(9, 315, 14, -1, -1, 1);
|
||||
_item8.setDetails(7, 315, 15, 16, 17, 1);
|
||||
_item9.setDetails(10, 315, 18, 19, 20, 1);
|
||||
}
|
||||
|
||||
void Scene315::signal() {
|
||||
@ -1346,11 +1361,14 @@ void Scene315::dispatch() {
|
||||
*
|
||||
*--------------------------------------------------------------------------*/
|
||||
|
||||
void Scene325::Item1::startAction(CursorType action, Event &event) {
|
||||
bool Scene325::Item1::startAction(CursorType action, Event &event) {
|
||||
if (action == CURSOR_EXIT) {
|
||||
BF_GLOBALS._events.setCursor(CURSOR_WALK);
|
||||
BF_GLOBALS._player.disableControl();
|
||||
BF_GLOBALS._sceneManager.changeScene(315);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1406,7 +1424,7 @@ void Scene325::postInit(SceneObjectList *OwnerList) {
|
||||
_object5.setStrip(1);
|
||||
_object5.setPosition(Common::Point(135, 167));
|
||||
|
||||
_item1.setup(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 560, -1, -1, -1, 1, NULL);
|
||||
_item1.setDetails(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 560, -1, -1, -1, 1, NULL);
|
||||
BF_GLOBALS._player.disableControl();
|
||||
|
||||
_sceneMode = (BF_GLOBALS._dayNumber == 1) ? 3250 : 3251;
|
||||
|
@ -47,29 +47,29 @@ class Scene300: public SceneExt {
|
||||
public:
|
||||
Object(int stripNumber) { _stripNumber = stripNumber; }
|
||||
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Object19: public NamedObject {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class Item1: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item2: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item14: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item15: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Actions */
|
||||
@ -135,49 +135,49 @@ class Scene315: public SceneExt {
|
||||
/* Objects */
|
||||
class Object1: public NamedObject {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Object2: public NamedObject {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Object3: public NamedObject {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Items */
|
||||
class Item1: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item2: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item4: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item5: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item14: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item15: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item16: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
class Item17: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
|
||||
/* Actions */
|
||||
@ -230,7 +230,7 @@ class Scene325: public SceneExt {
|
||||
/* Items */
|
||||
class Item1: public NamedHotspot {
|
||||
public:
|
||||
virtual void startAction(CursorType action, Event &event);
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
};
|
||||
public:
|
||||
SequenceManager _sequenceManager;
|
||||
|
@ -307,6 +307,14 @@ void SpeakerPSutter::setText(const Common::String &msg) {
|
||||
_object2.fixCountdown(8, _numFrames);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
SpeakerJakeRadio::SpeakerJakeRadio(): VisualSpeaker() {
|
||||
_color1 = 13;
|
||||
_color2 = 7;
|
||||
_speakerName = "JAKE_RADIO";
|
||||
}
|
||||
|
||||
} // End of namespace BlueForce
|
||||
|
||||
} // End of namespace TsAGE
|
||||
|
@ -124,6 +124,13 @@ public:
|
||||
virtual void setText(const Common::String &msg);
|
||||
};
|
||||
|
||||
class SpeakerJakeRadio: public VisualSpeaker {
|
||||
public:
|
||||
SpeakerJakeRadio();
|
||||
|
||||
virtual Common::String getClassName() { return "SpeakerJakeRadio"; }
|
||||
};
|
||||
|
||||
|
||||
} // End of namespace BlueForce
|
||||
|
||||
|
@ -1467,6 +1467,19 @@ void SceneItem::remove() {
|
||||
_globals->_sceneItems.remove(this);
|
||||
}
|
||||
|
||||
bool SceneItem::startAction(CursorType action, Event &event) {
|
||||
if (_vm->getGameID() == GType_Ringworld) {
|
||||
doAction(action);
|
||||
return true;
|
||||
} else if ((action == CURSOR_LOOK) || (action == CURSOR_USE) || (action == CURSOR_TALK) ||
|
||||
(action < CURSOR_LOOK)) {
|
||||
doAction(action);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void SceneItem::doAction(int action) {
|
||||
const char *msg = NULL;
|
||||
|
||||
@ -1743,7 +1756,7 @@ void NamedHotspot::doAction(int action) {
|
||||
}
|
||||
}
|
||||
|
||||
void NamedHotspot::setup(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum) {
|
||||
void NamedHotspot::setDetails(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum) {
|
||||
setBounds(ys, xe, ye, xs);
|
||||
_resNum = resnum;
|
||||
_lookLineNum = lookLineNum;
|
||||
@ -1752,7 +1765,7 @@ void NamedHotspot::setup(int ys, int xs, int ye, int xe, const int resnum, const
|
||||
_globals->_sceneItems.addItems(this, NULL);
|
||||
}
|
||||
|
||||
void NamedHotspot::setup(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) {
|
||||
void NamedHotspot::setDetails(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item) {
|
||||
setBounds(bounds);
|
||||
_resNum = resNum;
|
||||
_lookLineNum = lookLineNum;
|
||||
@ -1775,7 +1788,7 @@ void NamedHotspot::setup(const Rect &bounds, int resNum, int lookLineNum, int ta
|
||||
}
|
||||
}
|
||||
|
||||
void NamedHotspot::setup(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode) {
|
||||
void NamedHotspot::setDetails(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode) {
|
||||
_sceneRegionId = sceneRegionId;
|
||||
_resNum = resNum;
|
||||
_lookLineNum = lookLineNum;
|
||||
@ -3645,8 +3658,11 @@ void ScenePriorities::load(int resNum) {
|
||||
|
||||
Region *ScenePriorities::find(int priority) {
|
||||
// If no priority regions are loaded, then return the placeholder region
|
||||
if (empty())
|
||||
return &_defaultPriorityRegion;
|
||||
if (empty()) {
|
||||
if (_vm->getGameID() == GType_Ringworld)
|
||||
return &_defaultPriorityRegion;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (priority > 255)
|
||||
priority = 255;
|
||||
|
@ -415,7 +415,7 @@ public:
|
||||
virtual Common::String getClassName() { return "SceneItem"; }
|
||||
virtual void remove();
|
||||
virtual void destroy() {}
|
||||
virtual void startAction(CursorType action, Event &event) { doAction(action); }
|
||||
virtual bool startAction(CursorType action, Event &event);
|
||||
virtual void doAction(int action);
|
||||
|
||||
bool contains(const Common::Point &pt);
|
||||
@ -453,9 +453,9 @@ public:
|
||||
virtual void doAction(int action);
|
||||
virtual Common::String getClassName() { return "NamedHotspot"; }
|
||||
virtual void synchronize(Serializer &s);
|
||||
void setup(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum);
|
||||
virtual void setup(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item);
|
||||
virtual void setup(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode);
|
||||
virtual void setDetails(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum);
|
||||
virtual void setDetails(const Rect &bounds, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode, SceneItem *item);
|
||||
virtual void setDetails(int sceneRegionId, int resNum, int lookLineNum, int talkLineNum, int useLineNum, int mode);
|
||||
};
|
||||
|
||||
enum AnimateMode {ANIM_MODE_NONE = 0, ANIM_MODE_1 = 1, ANIM_MODE_2 = 2, ANIM_MODE_3 = 3,
|
||||
|
@ -233,6 +233,8 @@ void BlueForceGlobals::reset() {
|
||||
_v4E238 = 0;
|
||||
_v50696 = 0;
|
||||
_v501FC = 0;
|
||||
_v5098C = 0;
|
||||
_v5098D = 0;
|
||||
_v51C42 = 0;
|
||||
_clip1Bullets = 8;
|
||||
_clip2Bullets = 8;
|
||||
@ -244,6 +246,19 @@ bool BlueForceGlobals::getHasBullets() {
|
||||
return BF_GLOBALS.getFlag(fLoadedSpare) ? (_clip2Bullets > 0) : (_clip1Bullets > 0);
|
||||
}
|
||||
|
||||
void BlueForceGlobals::set2Flags(int flagNum) {
|
||||
if (!getFlag(flagNum + 1)) {
|
||||
setFlag(flagNum + 1);
|
||||
setFlag(flagNum);
|
||||
}
|
||||
}
|
||||
|
||||
bool BlueForceGlobals::removeFlag(int flagNum) {
|
||||
bool result = getFlag(flagNum);
|
||||
clearFlag(flagNum);
|
||||
return result;
|
||||
}
|
||||
|
||||
} // end of namespace BlueForce
|
||||
|
||||
} // end of namespace TsAGE
|
||||
|
@ -176,6 +176,8 @@ public:
|
||||
int _v4E238;
|
||||
int _v501FC;
|
||||
int _v50696;
|
||||
uint8 _v5098C;
|
||||
uint8 _v5098D;
|
||||
int _v51C42;
|
||||
int _v51C44;
|
||||
int _interfaceY;
|
||||
@ -189,6 +191,8 @@ public:
|
||||
|
||||
virtual Common::String getClassName() { return "BFGlobals"; }
|
||||
virtual void synchronize(Serializer &s);
|
||||
void set2Flags(int flagNum);
|
||||
bool removeFlag(int flagNum);
|
||||
};
|
||||
|
||||
} // End of namespace BlueForce
|
||||
|
Loading…
x
Reference in New Issue
Block a user