diff options
author | Matthew Stewart | 2018-07-26 17:38:44 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 23b3782b5217e3d08b84c6abce0821e01071c3f7 (patch) | |
tree | 880432cf30045aaf815bba45b27a13c84c5ef7ad /engines/startrek/rooms | |
parent | 5660ce81340a013c0c653a55b7430737213783a4 (diff) | |
download | scummvm-rg350-23b3782b5217e3d08b84c6abce0821e01071c3f7.tar.gz scummvm-rg350-23b3782b5217e3d08b84c6abce0821e01071c3f7.tar.bz2 scummvm-rg350-23b3782b5217e3d08b84c6abce0821e01071c3f7.zip |
STARTREK: SINS0
Diffstat (limited to 'engines/startrek/rooms')
-rw-r--r-- | engines/startrek/rooms/function_map.h | 5 | ||||
-rw-r--r-- | engines/startrek/rooms/sins0.cpp | 246 | ||||
-rw-r--r-- | engines/startrek/rooms/sins1.cpp | 41 | ||||
-rw-r--r-- | engines/startrek/rooms/sins2.cpp | 41 | ||||
-rw-r--r-- | engines/startrek/rooms/sins3.cpp | 41 | ||||
-rw-r--r-- | engines/startrek/rooms/sins4.cpp | 41 | ||||
-rw-r--r-- | engines/startrek/rooms/sins5.cpp | 41 |
7 files changed, 456 insertions, 0 deletions
diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h index c83dc99700..b44fbf1fb7 100644 --- a/engines/startrek/rooms/function_map.h +++ b/engines/startrek/rooms/function_map.h @@ -1790,6 +1790,11 @@ extern const int trial0NumActions, trial1NumActions, trial2NumActions extern const RoomAction trial4ActionList[], trial5ActionList[]; extern const int trial4NumActions, trial5NumActions; +extern const RoomAction sins0ActionList[], sins1ActionList[], sins2ActionList[], sins3ActionList[]; +extern const int sins0NumActions, sins1NumActions, sins2NumActions, sins3NumActions; +extern const RoomAction sins4ActionList[], sins5ActionList[]; +extern const int sins4NumActions, sins5NumActions; + } #endif diff --git a/engines/startrek/rooms/sins0.cpp b/engines/startrek/rooms/sins0.cpp new file mode 100644 index 0000000000..bd93f25033 --- /dev/null +++ b/engines/startrek/rooms/sins0.cpp @@ -0,0 +1,246 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "startrek/room.h" + +#define OBJECT_DOOR 8 + +#define HOTSPOT_DOOR 0x20 +#define HOTSPOT_GROUND 0x21 +#define HOTSPOT_STATUE 0x22 +#define HOTSPOT_PLANET 0x23 +#define HOTSPOT_SKY 0x24 // Not mapped anywhere? + +namespace StarTrek { + +extern const RoomAction sins0ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::sins0Tick1 }, + + { {ACTION_LOOK, 0xff, 0, 0}, &Room::sins0LookAnywhere }, + { {ACTION_LOOK, OBJECT_DOOR, 0, 0}, &Room::sins0LookAtOpenDoor }, + { {ACTION_LOOK, HOTSPOT_DOOR, 0, 0}, &Room::sins0LookAtClosedDoor }, + { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::sins0TalkToSpock }, + { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::sins0TalkToMccoy }, + { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::sins0TalkToRedshirt }, + { {ACTION_LOOK, HOTSPOT_GROUND, 0, 0}, &Room::sins0LookAtGround }, + { {ACTION_GET, HOTSPOT_GROUND, 0, 0}, &Room::sins0GetRock }, + { {ACTION_DONE_ANIM, 1, 0, 0}, &Room::sins0PickedUpRock }, + + { {ACTION_USE, OBJECT_ISTRICOR, 0xff, 0}, &Room::sins0UseSTricorderAnywhere }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_GROUND, 0}, &Room::sins0UseSTricorderOnGround }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_PLANET, 0}, &Room::sins0UseSTricorderOnPlanet }, + + { {ACTION_TICK, 40, 0, 0}, &Room::sins0Tick40 }, + { {ACTION_LOOK, HOTSPOT_STATUE, 0, 0}, &Room::sins0LookAtStatue }, + { {ACTION_LOOK, HOTSPOT_PLANET, 0, 0}, &Room::sins0LookAtPlanet }, + { {ACTION_LOOK, HOTSPOT_SKY, 0, 0}, &Room::sins0LookAtSky }, + { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::sins0LookAtKirk }, + { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::sins0LookAtSpock }, + { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::sins0LookAtMccoy }, + { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::sins0LookAtRedshirt }, + + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_DOOR, 0}, &Room::sins0UseSTricorderOnClosedDoor }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_STATUE, 0}, &Room::sins0UseSTricorderOnStatue }, + { {ACTION_USE, OBJECT_IMEDKIT, OBJECT_KIRK, 0}, &Room::sins0UseMedkitOnCrewman }, + { {ACTION_USE, OBJECT_IMEDKIT, OBJECT_SPOCK, 0}, &Room::sins0UseMedkitOnCrewman }, + { {ACTION_USE, OBJECT_IMEDKIT, OBJECT_MCCOY, 0}, &Room::sins0UseMedkitOnCrewman }, + { {ACTION_USE, OBJECT_IMEDKIT, OBJECT_REDSHIRT, 0}, &Room::sins0UseMedkitOnCrewman }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_KIRK, 0}, &Room::sins0UseMTricorderOnCrewman }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_SPOCK, 0}, &Room::sins0UseMTricorderOnCrewman }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_MCCOY, 0}, &Room::sins0UseMTricorderOnCrewman }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_REDSHIRT, 0}, &Room::sins0UseMTricorderOnCrewman }, + + { {ACTION_USE, OBJECT_ICOMM, 0xff, 0}, &Room::sins0UseCommunicator }, + { {ACTION_WALK, HOTSPOT_DOOR, 0, 0}, &Room::sins0WalkToDoor }, + { {ACTION_WALK, OBJECT_DOOR, 0, 0}, &Room::sins0WalkToDoor }, +}; + + +extern const int sins0NumActions = sizeof(sins0ActionList) / sizeof(RoomAction); + + +void Room::sins0Tick1() { + playVoc("SIN0LOOP"); + + if (!_vm->_awayMission.sins.enteredRoom0FirstTime) + _vm->_awayMission.disableInput = 2; + + if (_vm->_awayMission.sins.field3e) + loadActorAnim2(OBJECT_DOOR, "s0dr2", 0, 0); + if (_vm->_awayMission.sins.field3d) + loadActorAnim2(OBJECT_DOOR, "s0dr1", 0, 0); + + playMidiMusicTracks(MIDITRACK_27, -3); +} + +void Room::sins0LookAnywhere() { + showText(TX_SIN0N009); +} + +void Room::sins0LookAtOpenDoor() { + showText(TX_SIN0N005); +} + +void Room::sins0LookAtClosedDoor() { + showText(TX_SIN0N008); +} + +void Room::sins0TalkToSpock() { + showText(TX_SPEAKER_SPOCK, TX_SIN0_009); +} + +void Room::sins0TalkToMccoy() { + showText(TX_SPEAKER_MCCOY, TX_SIN0_011); +} + +void Room::sins0TalkToRedshirt() { + // ENHANCEMENT: This function had two implementations. The first (the originally used + // one) is a generic "area is secure" text. In the second (which was unused), he + // comments on how the small moon could have an atmosphere. This is more interesting + // and relevant, so that implementation is used instead. + if (false) + showText(TX_SPEAKER_MOSHER, TX_SIN0_024); + else { + showText(TX_SPEAKER_MOSHER, TX_SIN0_026); + showText(TX_SPEAKER_SPOCK, TX_SIN0_022); + showText(TX_SPEAKER_KIRK, TX_SIN0_006); + } +} + +void Room::sins0LookAtGround() { + showText(TX_SIN0N006); +} + +void Room::sins0GetRock() { + _vm->_awayMission.disableInput = true; + loadActorAnimC(OBJECT_KIRK, "kpickw", -1, -1, &Room::sins0PickedUpRock); + _vm->_awayMission.sins.field39 |= 1; +} + +void Room::sins0PickedUpRock() { + _vm->_awayMission.disableInput = false; + loadActorStandAnim(OBJECT_KIRK); + showText(TX_SIN0N010); + giveItem(OBJECT_IS8ROCKS); +} + +void Room::sins0UseSTricorderAnywhere() { + spockScan(DIR_S, TX_SIN0_018); +} + +void Room::sins0UseSTricorderOnGround() { + spockScan(DIR_S, TX_SIN0_017); + _vm->_awayMission.sins.field39 |= 1; +} + +void Room::sins0UseSTricorderOnPlanet() { + spockScan(DIR_S, TX_SIN0_016); +} + +void Room::sins0Tick40() { + if (!_vm->_awayMission.sins.enteredRoom0FirstTime) { + _vm->_awayMission.disableInput = false; + showText(TX_SPEAKER_UHURA, TX_SIN0U082); + showText(TX_SPEAKER_KIRK, TX_SIN0_003); + showText(TX_SPEAKER_SCOTT, TX_SIN0_S48); + showText(TX_SPEAKER_KIRK, TX_SIN0_007); + showText(TX_SPEAKER_SCOTT, TX_SIN0_S50); + showText(TX_SPEAKER_KIRK, TX_SIN0_005); + showText(TX_SPEAKER_SCOTT, TX_SIN0_S49); + showText(TX_SPEAKER_KIRK, TX_SIN0_001); + _vm->_awayMission.sins.enteredRoom0FirstTime = true; + } +} + +void Room::sins0LookAtStatue() { + showText(TX_SIN0N011); + showText(TX_SPEAKER_MCCOY, TX_SIN0_015); + showText(TX_SPEAKER_SPOCK, TX_SIN0_021); + showText(TX_SPEAKER_MOSHER, TX_SIN0_027); + showText(TX_SPEAKER_MCCOY, TX_SIN0_014); +} + +void Room::sins0LookAtPlanet() { + showText(TX_SIN0N007); +} + +void Room::sins0LookAtSky() { + // This seems unused, due to HOTSPOT_SKY not being mapped anywhere? + showText(TX_SIN0N004); +} + +void Room::sins0LookAtKirk() { + showText(TX_SIN0N002); +} + +void Room::sins0LookAtSpock() { + showText(TX_SIN0N003); +} + +void Room::sins0LookAtMccoy() { + showText(TX_SIN0N000); +} + +void Room::sins0LookAtRedshirt() { + showText(TX_SIN0N001); +} + +void Room::sins0UseSTricorderOnClosedDoor() { + spockScan(DIR_S, TX_SIN0_019); + showText(TX_SPEAKER_MOSHER, TX_SIN0_025); + showText(TX_SPEAKER_MCCOY, TX_SIN0_013); + showText(TX_SPEAKER_MOSHER, TX_SIN0_028); +} + +void Room::sins0UseSTricorderOnStatue() { + spockScan(DIR_S, TX_SIN0_020); + showText(TX_SPEAKER_KIRK, TX_SIN0_008); + showText(TX_SPEAKER_SPOCK, TX_SIN0_023); + + if (!_vm->_awayMission.sins.gotPointsForScanningStatue) { + _vm->_awayMission.sins.gotPointsForScanningStatue = true; + _vm->_awayMission.sins.missionScore += 1; + } +} + +void Room::sins0UseMedkitOnCrewman() { + showText(TX_SPEAKER_MCCOY, TX_SIN0_012); +} + +void Room::sins0UseMTricorderOnCrewman() { + mccoyScan(DIR_S, TX_SIN0_010); +} + +void Room::sins0UseCommunicator() { + if (!_vm->_awayMission.sins.field43) { + showText(TX_SPEAKER_KIRK, TX_SIN0_004); + showText(TX_SPEAKER_SCOTT, TX_SIN0_S01); + showText(TX_SPEAKER_KIRK, TX_SIN0_002); + } else + showText(TX_SPEAKER_UHURA, TX_SIN0U069); +} + +void Room::sins0WalkToDoor() { + walkCrewman(OBJECT_KIRK, 0x5f, 0x8c); +} + +} diff --git a/engines/startrek/rooms/sins1.cpp b/engines/startrek/rooms/sins1.cpp new file mode 100644 index 0000000000..fc7827a142 --- /dev/null +++ b/engines/startrek/rooms/sins1.cpp @@ -0,0 +1,41 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "startrek/room.h" + +#define OBJECT_8 8 + +#define HOTSPOT_20 0x20 + +namespace StarTrek { + +extern const RoomAction sins1ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::sins1Tick1 }, +}; + +extern const int sins1NumActions = sizeof(sins1ActionList) / sizeof(RoomAction); + + +void Room::sins1Tick1() { +} + +} diff --git a/engines/startrek/rooms/sins2.cpp b/engines/startrek/rooms/sins2.cpp new file mode 100644 index 0000000000..976814acab --- /dev/null +++ b/engines/startrek/rooms/sins2.cpp @@ -0,0 +1,41 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "startrek/room.h" + +#define OBJECT_8 8 + +#define HOTSPOT_20 0x20 + +namespace StarTrek { + +extern const RoomAction sins2ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::sins2Tick1 }, +}; + +extern const int sins2NumActions = sizeof(sins2ActionList) / sizeof(RoomAction); + + +void Room::sins2Tick1() { +} + +} diff --git a/engines/startrek/rooms/sins3.cpp b/engines/startrek/rooms/sins3.cpp new file mode 100644 index 0000000000..81795e4c29 --- /dev/null +++ b/engines/startrek/rooms/sins3.cpp @@ -0,0 +1,41 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "startrek/room.h" + +#define OBJECT_8 8 + +#define HOTSPOT_20 0x20 + +namespace StarTrek { + +extern const RoomAction sins3ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::sins3Tick1 }, +}; + +extern const int sins3NumActions = sizeof(sins3ActionList) / sizeof(RoomAction); + + +void Room::sins3Tick1() { +} + +} diff --git a/engines/startrek/rooms/sins4.cpp b/engines/startrek/rooms/sins4.cpp new file mode 100644 index 0000000000..05c582021c --- /dev/null +++ b/engines/startrek/rooms/sins4.cpp @@ -0,0 +1,41 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "startrek/room.h" + +#define OBJECT_8 8 + +#define HOTSPOT_20 0x20 + +namespace StarTrek { + +extern const RoomAction sins4ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::sins4Tick1 }, +}; + +extern const int sins4NumActions = sizeof(sins4ActionList) / sizeof(RoomAction); + + +void Room::sins4Tick1() { +} + +} diff --git a/engines/startrek/rooms/sins5.cpp b/engines/startrek/rooms/sins5.cpp new file mode 100644 index 0000000000..49f9784b62 --- /dev/null +++ b/engines/startrek/rooms/sins5.cpp @@ -0,0 +1,41 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "startrek/room.h" + +#define OBJECT_8 8 + +#define HOTSPOT_20 0x20 + +namespace StarTrek { + +extern const RoomAction sins5ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::sins5Tick1 }, +}; + +extern const int sins5NumActions = sizeof(sins5ActionList) / sizeof(RoomAction); + + +void Room::sins5Tick1() { +} + +} |