aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS3
-rw-r--r--NEWS7
-rw-r--r--backends/events/dinguxsdl/dinguxsdl-events.cpp34
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp59
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.h11
-rw-r--r--backends/keymapper/action.h2
-rw-r--r--backends/platform/dingux/dingux.mk35
-rw-r--r--backends/platform/sdl/amigaos/amigaos.mk1
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl71
-rw-r--r--backends/platform/symbian/BuildPackageUpload_AllVersions.pl4
-rw-r--r--backends/platform/symbian/BuildPackageUpload_LocalSettings.pl29
-rw-r--r--backends/platform/symbian/help/ScummVM.rtf55
-rw-r--r--backends/platform/symbian/mmp/config.mmh2
-rw-r--r--backends/platform/symbian/mmp/scummvm_agi.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_agos.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_base.mmp.in26
-rw-r--r--backends/platform/symbian/mmp/scummvm_bbvs.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_cge.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_cine.mmp.in19
-rw-r--r--backends/platform/symbian/mmp/scummvm_composer.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_cruise.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_draci.mmp.in19
-rw-r--r--backends/platform/symbian/mmp/scummvm_drascula.mmp.in19
-rw-r--r--backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in19
-rw-r--r--backends/platform/symbian/mmp/scummvm_gob.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_groovie.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_hopkins.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_hugo.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_kyra.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_lure.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_m4.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_made.mmp.in22
-rw-r--r--backends/platform/symbian/mmp/scummvm_mads.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_mohawk.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_neverhood.mmp.in19
-rw-r--r--backends/platform/symbian/mmp/scummvm_parallaction.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_pegasus.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_queen.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_saga.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_sci.mmp.in22
-rw-r--r--backends/platform/symbian/mmp/scummvm_scumm.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_sky.mmp.in19
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword1.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword2.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword25.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_teenagent.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_testbed.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_tinsel.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_toltecs.mmp.in23
-rw-r--r--backends/platform/symbian/mmp/scummvm_tony.mmp.in23
-rw-r--r--backends/platform/symbian/mmp/scummvm_toon.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_touche.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_tucker.mmp.in21
-rw-r--r--backends/platform/symbian/mmp/scummvm_wintermute.mmp.in22
-rw-r--r--backends/platform/symbian/mmp/scummvm_zvision.mmp.in20
-rw-r--r--backends/platform/wii/osystem_events.cpp136
-rw-r--r--backends/taskbar/unity/unity-taskbar.cpp9
-rw-r--r--base/version.cpp8
-rwxr-xr-xconfigure36
-rw-r--r--devtools/create_kyradat/create_kyradat.cpp2
-rw-r--r--devtools/create_kyradat/games.cpp1
-rw-r--r--devtools/create_kyradat/resources.cpp89
-rw-r--r--devtools/create_kyradat/resources/eob1_dos_italian.h891
-rwxr-xr-xdevtools/credits.pl3
-rw-r--r--devtools/scumm-md5.txt10
-rw-r--r--dists/engine-data/kyra.datbin485978 -> 496648 bytes
-rw-r--r--dists/gcw0/default.gcw0.desktop16
-rwxr-xr-xdists/gcw0/opk_make.sh111
-rw-r--r--dists/gcw0/scummvm.pngbin0 -> 2656 bytes
-rwxr-xr-xdists/gcw0/scummvm.sh9
-rw-r--r--dists/gcw0/scummvmrc9
-rw-r--r--engines/cge/POTFILES2
-rw-r--r--engines/cge/detection.cpp74
-rw-r--r--engines/cge/fileio.cpp22
-rw-r--r--engines/cge2/POTFILES1
-rw-r--r--engines/cge2/cge2.cpp3
-rw-r--r--engines/cge2/cge2.h7
-rw-r--r--engines/cge2/cge2_main.cpp15
-rw-r--r--engines/cge2/detection.cpp87
-rw-r--r--engines/cge2/fileio.cpp14
-rw-r--r--engines/cge2/hero.cpp18
-rw-r--r--engines/cge2/map.cpp2
-rw-r--r--engines/cge2/saveload.cpp4
-rw-r--r--engines/cge2/snail.cpp2
-rw-r--r--engines/cge2/sound.cpp6
-rw-r--r--engines/cge2/toolbar.cpp17
-rw-r--r--engines/cge2/vga13h.cpp3
-rw-r--r--engines/drascula/drascula.cpp14
-rw-r--r--engines/dreamweb/POTFILES2
-rw-r--r--engines/fullpipe/scenes/scene27.cpp2
-rw-r--r--engines/gob/POTFILES2
-rw-r--r--engines/gob/inter_v1.cpp2
-rw-r--r--engines/hopkins/POTFILES2
-rw-r--r--engines/hopkins/files.cpp2
-rw-r--r--engines/kyra/POTFILES1
-rw-r--r--engines/kyra/detection_tables.h16
-rw-r--r--engines/kyra/items_lol.cpp2
-rw-r--r--engines/kyra/staticres.cpp2
-rw-r--r--engines/kyra/staticres_eob.cpp28
-rw-r--r--engines/kyra/text_rpg.cpp4
-rw-r--r--engines/mads/animation.cpp84
-rw-r--r--engines/mads/animation.h25
-rw-r--r--engines/mads/audio.cpp43
-rw-r--r--engines/mads/audio.h1
-rw-r--r--engines/mads/debugger.cpp43
-rw-r--r--engines/mads/debugger.h2
-rw-r--r--engines/mads/dialogs.cpp74
-rw-r--r--engines/mads/dialogs.h32
-rw-r--r--engines/mads/game.cpp2
-rw-r--r--engines/mads/mads.cpp5
-rw-r--r--engines/mads/menu_views.cpp768
-rw-r--r--engines/mads/menu_views.h225
-rw-r--r--engines/mads/module.mk1
-rw-r--r--engines/mads/msurface.cpp9
-rw-r--r--engines/mads/msurface.h5
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp89
-rw-r--r--engines/mads/nebular/dialogs_nebular.h32
-rw-r--r--engines/mads/nebular/game_nebular.cpp26
-rw-r--r--engines/mads/nebular/game_nebular.h4
-rw-r--r--engines/mads/nebular/menu_nebular.cpp559
-rw-r--r--engines/mads/nebular/menu_nebular.h129
-rw-r--r--engines/mads/nebular/nebular_scenes5.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes6.cpp5
-rw-r--r--engines/mads/nebular/sound_nebular.cpp55
-rw-r--r--engines/mads/nebular/sound_nebular.h27
-rw-r--r--engines/mads/palette.cpp63
-rw-r--r--engines/mads/palette.h2
-rw-r--r--engines/mads/phantom/game_phantom.cpp15
-rw-r--r--engines/mads/scene.cpp3
-rw-r--r--engines/mads/scene.h10
-rw-r--r--engines/mads/scene_data.cpp39
-rw-r--r--engines/mads/scene_data.h3
-rw-r--r--engines/mads/screen.cpp2
-rw-r--r--engines/mads/sound.cpp37
-rw-r--r--engines/mads/sound.h1
-rw-r--r--engines/mads/sprites.cpp6
-rw-r--r--engines/mads/user_interface.h2
-rw-r--r--engines/prince/animation.cpp178
-rw-r--r--engines/prince/animation.h73
-rw-r--r--engines/prince/archive.cpp144
-rw-r--r--engines/prince/archive.h61
-rw-r--r--engines/prince/common.h45
-rw-r--r--engines/prince/configure.engine3
-rw-r--r--engines/prince/cursor.cpp54
-rw-r--r--engines/prince/cursor.h46
-rw-r--r--engines/prince/curve_values.h45
-rw-r--r--engines/prince/debugger.cpp174
-rw-r--r--engines/prince/debugger.h58
-rw-r--r--engines/prince/decompress.cpp171
-rw-r--r--engines/prince/decompress.h44
-rw-r--r--engines/prince/detection.cpp73
-rw-r--r--engines/prince/detection.h100
-rw-r--r--engines/prince/flags.cpp420
-rw-r--r--engines/prince/flags.h421
-rw-r--r--engines/prince/font.cpp94
-rw-r--r--engines/prince/font.h64
-rw-r--r--engines/prince/graphics.cpp474
-rw-r--r--engines/prince/graphics.h76
-rw-r--r--engines/prince/hero.cpp1002
-rw-r--r--engines/prince/hero.h184
-rw-r--r--engines/prince/hero_set.h244
-rw-r--r--engines/prince/mhwanh.cpp71
-rw-r--r--engines/prince/mhwanh.h55
-rw-r--r--engines/prince/mob.cpp108
-rw-r--r--engines/prince/mob.h70
-rw-r--r--engines/prince/module.mk30
-rw-r--r--engines/prince/musNum.h87
-rw-r--r--engines/prince/object.cpp113
-rw-r--r--engines/prince/object.h70
-rw-r--r--engines/prince/option_text.h85
-rw-r--r--engines/prince/prince.cpp4733
-rw-r--r--engines/prince/prince.h668
-rw-r--r--engines/prince/pscr.cpp75
-rw-r--r--engines/prince/pscr.h48
-rw-r--r--engines/prince/resource.h100
-rw-r--r--engines/prince/saveload.cpp514
-rw-r--r--engines/prince/script.cpp2071
-rw-r--r--engines/prince/script.h397
-rw-r--r--engines/prince/sound.cpp211
-rw-r--r--engines/prince/sound.h67
-rw-r--r--engines/prince/variatxt.cpp55
-rw-r--r--engines/prince/variatxt.h40
-rw-r--r--engines/queen/POTFILES2
-rw-r--r--engines/queen/logic.cpp6
-rw-r--r--engines/queen/talk.cpp12
-rw-r--r--engines/saga/actor.h1
-rw-r--r--engines/saga/saveload.cpp29
-rw-r--r--engines/saga/scene.h3
-rw-r--r--engines/saga/sfuncs.cpp4
-rw-r--r--engines/saga/shorten.cpp2
-rw-r--r--engines/sci/console.cpp1
-rw-r--r--engines/sci/detection.cpp22
-rw-r--r--engines/sci/detection_tables.h13
-rw-r--r--engines/sci/engine/kfile.cpp20
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/event.cpp2
-rw-r--r--engines/sci/graphics/frameout.cpp9
-rw-r--r--engines/sci/graphics/palette.cpp24
-rw-r--r--engines/sci/graphics/palette.h2
-rw-r--r--engines/sci/graphics/view.cpp1
-rw-r--r--engines/sci/parser/vocabulary.cpp5
-rw-r--r--engines/sci/resource.cpp52
-rw-r--r--engines/sci/resource.h16
-rw-r--r--engines/sci/resource_audio.cpp1
-rw-r--r--engines/sci/sci.h6
-rw-r--r--engines/sci/sound/drivers/midi.cpp74
-rw-r--r--engines/scumm/POTFILES3
-rw-r--r--engines/scumm/detection.cpp6
-rw-r--r--engines/scumm/detection_tables.h20
-rw-r--r--engines/scumm/object.cpp1
-rw-r--r--engines/scumm/players/player_mac.cpp1
-rw-r--r--engines/scumm/scumm-md5.h9
-rw-r--r--engines/sword1/POTFILES2
-rw-r--r--engines/sword1/console.cpp23
-rw-r--r--engines/sword1/console.h1
-rw-r--r--engines/sword1/sound.cpp65
-rw-r--r--engines/sword1/sound.h2
-rw-r--r--engines/sword1/sword1.cpp2
-rw-r--r--engines/sword1/sword1.h1
-rw-r--r--engines/sword25/kernel/persistenceservice.cpp2
-rw-r--r--engines/sword25/util/pluto/pluto.cpp29
-rw-r--r--engines/tinsel/tinsel.cpp15
-rw-r--r--engines/touche/detection.cpp1
-rw-r--r--engines/tsage/POTFILES3
-rw-r--r--engines/tsage/blue_force/blueforce_dialogs.cpp2
-rw-r--r--engines/tsage/debugger.cpp6
-rw-r--r--engines/tsage/debugger.h4
-rw-r--r--engines/tsage/module.mk3
-rw-r--r--engines/tsage/ringworld/ringworld_dialogs.cpp2
-rw-r--r--engines/tsage/ringworld2/ringworld2_airduct.cpp909
-rw-r--r--engines/tsage/ringworld2/ringworld2_airduct.h89
-rw-r--r--engines/tsage/ringworld2/ringworld2_logic.cpp8
-rw-r--r--engines/tsage/ringworld2/ringworld2_outpost.cpp4700
-rw-r--r--engines/tsage/ringworld2/ringworld2_outpost.h259
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp2
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp7254
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.h401
-rw-r--r--engines/tsage/ringworld2/ringworld2_vampire.cpp1821
-rw-r--r--engines/tsage/ringworld2/ringworld2_vampire.h179
-rw-r--r--engines/wintermute/POTFILES1
-rw-r--r--engines/wintermute/base/sound/base_sound.cpp18
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.cpp29
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.h15
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp8
-rw-r--r--engines/zvision/POTFILES1
-rw-r--r--engines/zvision/fonts/truetype_font.cpp1
-rw-r--r--graphics/font.cpp131
-rw-r--r--graphics/font.h54
-rw-r--r--graphics/fonts/ttf.cpp29
-rw-r--r--graphics/transform_tools.h2
-rw-r--r--gui/credits.h3
-rw-r--r--gui/themes/scummmodern.zipbin1489429 -> 1485886 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx4
-rw-r--r--gui/themes/translations.datbin442582 -> 468258 bytes
-rw-r--r--icons/scummvm_drawer.infobin0 -> 20738 bytes
-rw-r--r--po/be_BY.po175
-rw-r--r--po/ca_ES.po176
-rw-r--r--po/cs_CZ.po175
-rw-r--r--po/da_DA.po175
-rw-r--r--po/de_DE.po175
-rw-r--r--po/es_ES.po177
-rw-r--r--po/eu.po169
-rw-r--r--po/fi_FI.po175
-rw-r--r--po/fr_FR.po175
-rw-r--r--po/gl_ES.po176
-rw-r--r--po/hu_HU.po175
-rw-r--r--po/it_IT.po175
-rw-r--r--po/nb_NO.po175
-rw-r--r--po/nl_NL.po3353
-rw-r--r--po/nn_NO.po170
-rw-r--r--po/pl_PL.po175
-rw-r--r--po/pt_BR.po168
-rw-r--r--po/ru_RU.po175
-rw-r--r--po/scummvm.pot178
-rw-r--r--po/se_SE.po175
-rw-r--r--po/uk_UA.po225
-rw-r--r--ports.mk5
-rw-r--r--video/avi_decoder.cpp5
280 files changed, 31550 insertions, 11050 deletions
diff --git a/AUTHORS b/AUTHORS
index 78b521e376..37067e5e04 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -468,6 +468,9 @@ Other contributions
Danish:
Steffen Nyeland
+ Dutch:
+ Ben Castricum
+
Finnish:
Toni Saarela
diff --git a/NEWS b/NEWS
index 6c174d5f44..bb23bb37ff 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,13 @@ For a more comprehensive changelog of the latest experimental code, see:
1.8.0 (????-??-??)
+Broken Sword 1:
+ - Fix speech endianness detection on big endian systems for the mac
+ version (bug #6720).
+ - Fix crash when reloading a game from the Main Menu while in the bull's
+ head scene (bug #6728). It may have been happening in other scenes as
+ well.
+
1.7.0 (2014-07-21)
New Games:
- Added support for Chivalry is Not Dead.
diff --git a/backends/events/dinguxsdl/dinguxsdl-events.cpp b/backends/events/dinguxsdl/dinguxsdl-events.cpp
index 6f9f2a7748..cc15f2666c 100644
--- a/backends/events/dinguxsdl/dinguxsdl-events.cpp
+++ b/backends/events/dinguxsdl/dinguxsdl-events.cpp
@@ -26,18 +26,48 @@
#include "backends/events/dinguxsdl/dinguxsdl-events.h"
+#ifndef GCW0
#define PAD_UP SDLK_UP
#define PAD_DOWN SDLK_DOWN
#define PAD_LEFT SDLK_LEFT
#define PAD_RIGHT SDLK_RIGHT
#define BUT_A SDLK_LCTRL
#define BUT_B SDLK_LALT
-#define BUT_X SDLK_SPACE
-#define BUT_Y SDLK_LSHIFT
+#define BUT_X SDLK_SPACE // BUT_Y in GCW0
+#define BUT_Y SDLK_LSHIFT // BUT_X in GCW0
#define BUT_SELECT SDLK_ESCAPE
#define BUT_START SDLK_RETURN
#define TRIG_L SDLK_TAB
#define TRIG_R SDLK_BACKSPACE
+#else // GCW0
+
+/******
+ * GCW0 keymap
+ * Dingoo button
+ * A -> Left Button BUT_Y
+ * B -> right button BUT_B
+ * X -> ' ' BUT_A '0'
+ * Y -> '.' BUT_X
+ * Select -> ESC TRIG_R
+ * Start -> F5 TRIG_L
+ * L -> Shift BUT_START
+ * R -> VK BUT_SELECT
+ */
+
+#define PAD_UP SDLK_UP
+#define PAD_DOWN SDLK_DOWN
+#define PAD_LEFT SDLK_LEFT
+#define PAD_RIGHT SDLK_RIGHT
+#define BUT_A SDLK_LSHIFT
+#define BUT_B SDLK_LALT
+#define BUT_X SDLK_SPACE
+#define BUT_Y SDLK_LCTRL
+#define BUT_SELECT SDLK_BACKSPACE
+#define BUT_START SDLK_TAB
+#define TRIG_L SDLK_RETURN
+#define TRIG_R SDLK_ESCAPE
+
+#endif
bool DINGUXSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
if (ev.key.keysym.sym == PAD_UP) {
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 5a66cdaa2f..7bebdf8ce6 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -62,7 +62,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode() {
_bIsDirectory = true;
_sPath = "";
_pFileLock = 0;
- _nProt = 0; // protection is ignored for the root volume
+ _nProt = 0; // Protection is ignored for the root volume
LEAVE();
}
@@ -84,7 +84,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
_bIsDirectory = false;
_bIsValid = false;
- // Check whether the node exists and if it is a directory
+ // Check whether the node exists and if it's a directory
struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_StringNameInput,_sPath.c_str(),TAG_END);
if (pExd) {
_nProt = pExd->Protection;
@@ -93,7 +93,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
_pFileLock = IDOS->Lock((CONST_STRPTR)_sPath.c_str(), SHARED_LOCK);
_bIsValid = (_pFileLock != 0);
- // Add a trailing slash if it is needed
+ // Add a trailing slash if needed
const char c = _sPath.lastChar();
if (c != '/' && c != ':')
_sPath += '/';
@@ -134,7 +134,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam
delete[] n;
}
- _bIsValid = false;
+ _bIsValid = false;
_bIsDirectory = false;
struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_FileLockInput,pLock,TAG_END);
@@ -188,10 +188,10 @@ bool AmigaOSFilesystemNode::exists() const {
bool nodeExists = false;
- // previously we were trying to examine the node in order
+ // Previously we were trying to examine the node in order
// to determine if the node exists or not.
// I don't see the point : once you have been granted a
- // lock on it then it means it exists...
+ // lock on it, it means it exists...
//
// ============================= Old code
// BPTR pLock = IDOS->Lock((STRPTR)_sPath.c_str(), SHARED_LOCK);
@@ -237,8 +237,8 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
ENTER();
bool ret = false;
- //TODO: honor the hidden flag
- // There is nothing like a hidden flag under AmigaOS...
+ // TODO: Honor the hidden flag
+ // There is no such thing as a hidden flag in AmigaOS...
if (!_bIsValid) {
debug(6, "Invalid node");
@@ -252,7 +252,7 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
return false; // Empty list
}
- if (_pFileLock == 0) {
+ if (isRootNode()) {
debug(6, "Root node");
LEAVE();
myList = listVolumes();
@@ -264,7 +264,7 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
EX_DataFields, (EXF_NAME|EXF_LINK|EXF_TYPE),
TAG_END);
if (context) {
- struct ExamineData * pExd = NULL; // NB: no need to free value after usage, all is dealt by the DirContext release
+ struct ExamineData * pExd = NULL; // NB: No need to free the value after usage, everything will be dealt with by the DirContext release
AmigaOSFilesystemNode *entry ;
while ( (pExd = IDOS->ExamineDir(context)) ) {
@@ -307,21 +307,33 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
ENTER();
- if (_pFileLock == 0) {
+ if (isRootNode()) {
debug(6, "Root node");
LEAVE();
return new AmigaOSFilesystemNode(*this);
}
+ BPTR pLock = _pFileLock;
+
+ if (!_bIsDirectory) {
+ assert(!pLock);
+ pLock = IDOS->Lock((CONST_STRPTR)_sPath.c_str(), SHARED_LOCK);
+ assert(pLock);
+ }
+
AmigaOSFilesystemNode *node;
- BPTR parentDir = IDOS->ParentDir( _pFileLock );
+ BPTR parentDir = IDOS->ParentDir( pLock );
if (parentDir) {
node = new AmigaOSFilesystemNode(parentDir);
IDOS->UnLock(parentDir);
} else
node = new AmigaOSFilesystemNode();
+ if (!_bIsDirectory) {
+ IDOS->UnLock(pLock);
+ }
+
LEAVE();
return node;
@@ -332,9 +344,9 @@ bool AmigaOSFilesystemNode::isReadable() const {
return false;
// Regular RWED protection flags are low-active or inverted, thus the negation.
- // moreover pseudo root filesystem (null _pFileLock) is readable whatever the
- // protection says
- bool readable = !(_nProt & EXDF_OTR_READ) || _pFileLock == 0;
+ // Moreover, a pseudo root filesystem is readable whatever the
+ // protection says.
+ bool readable = !(_nProt & EXDF_OTR_READ) || isRootNode();
return readable;
}
@@ -344,9 +356,9 @@ bool AmigaOSFilesystemNode::isWritable() const {
return false;
// Regular RWED protection flags are low-active or inverted, thus the negation.
- // moreover pseudo root filesystem (null _pFileLock) is never writable whatever
- // the protection says (because of the pseudo nature)
- bool writable = !(_nProt & EXDF_OTR_WRITE) && _pFileLock !=0;
+ // Moreover, a pseudo root filesystem is never writable whatever
+ // the protection says (Because of it's pseudo nature).
+ bool writable = !(_nProt & EXDF_OTR_WRITE) && !isRootNode();
return writable;
}
@@ -371,12 +383,13 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
if (dosList->dol_Type == DLT_VOLUME &&
dosList->dol_Name) {
- // Original was
- // dosList->dol_Name &&
- // dosList->dol_Task) {
+ // The original line was
+ //if (dosList->dol_Type == DLT_VOLUME &&
+ //dosList->dol_Name &&
+ //dosList->dol_Task) {
// which errored using SDK 53.24 with a 'struct dosList' has no member called 'dol_Task'
// I removed dol_Task because it's not used anywhere else
- // and it neither brought up further errors nor crashes or regressions.
+ // and it neither brought up further errors nor crashes or regressions
// Copy name to buffer
IDOS->CopyStringBSTRToC(dosList->dol_Name, buffer, MAXPATHLEN);
@@ -410,7 +423,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
delete[] volName;
}
- dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES);
+ dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES);
}
IDOS->UnLockDosList(kLockFlags);
diff --git a/backends/fs/amigaos4/amigaos4-fs.h b/backends/fs/amigaos4/amigaos4-fs.h
index bbe88b2716..408354888e 100644
--- a/backends/fs/amigaos4/amigaos4-fs.h
+++ b/backends/fs/amigaos4/amigaos4-fs.h
@@ -62,6 +62,11 @@ protected:
*/
virtual AbstractFSList listVolumes() const;
+ /**
+ * True if this is the pseudo root filesystem.
+ */
+ bool isRootNode() const { return _bIsValid && _bIsDirectory && _pFileLock == 0; }
+
public:
/**
* Creates an AmigaOSFilesystemNode with the root node as path.
@@ -76,19 +81,19 @@ public:
AmigaOSFilesystemNode(const Common::String &p);
/**
- * Creates an AmigaOSFilesystemNode given its lock and display name
+ * Creates an AmigaOSFilesystemNode given its lock and display name.
*
* @param pLock BPTR to the lock.
* @param pDisplayName name to be used for display, in case not supplied the FilePart() of the filename will be used.
*
- * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private
+ * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private.
*/
AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0);
/**
* Copy constructor.
*
- * @note Needed because it duplicates the file lock
+ * @note Needed because it duplicates the file lock.
*/
AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node);
diff --git a/backends/keymapper/action.h b/backends/keymapper/action.h
index ed4bb86ce6..17b1153c77 100644
--- a/backends/keymapper/action.h
+++ b/backends/keymapper/action.h
@@ -37,7 +37,7 @@ namespace Common {
struct HardwareInput;
class Keymap;
-#define ACTION_ID_SIZE (4)
+#define ACTION_ID_SIZE (5)
struct KeyActionEntry {
const KeyState ks;
diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk
index 48a9347143..1333e89ff8 100644
--- a/backends/platform/dingux/dingux.mk
+++ b/backends/platform/dingux/dingux.mk
@@ -1,6 +1,7 @@
DINGUX_EXE_STRIPPED := scummvm_stripped$(EXEEXT)
bundle_name = dingux-dist/scummvm
+gcw0_bundle = gcw0-opk
all: $(DINGUX_EXE_STRIPPED)
@@ -30,3 +31,37 @@ endif
$(CP) $(srcdir)/backends/platform/dingux/scummvm.gpe $(bundle_name)/
$(CP) $(srcdir)/backends/platform/dingux/README.DINGUX $(bundle_name)/
$(CP) $(srcdir)/backends/platform/dingux/scummvm.png $(bundle_name)/
+
+# Special target for generationg GCW-Zero OPK bundle
+$(gcw0_bundle): all
+ $(MKDIR) $(gcw0_bundle)
+ $(CP) $(DIST_FILES_DOCS) $(gcw0_bundle)/
+ $(MKDIR) $(gcw0_bundle)/themes
+ $(CP) $(DIST_FILES_THEMES) $(gcw0_bundle)/themes/
+ifdef DIST_FILES_ENGINEDATA
+ $(MKDIR) $(gcw0_bundle)/engine-data
+ $(CP) $(DIST_FILES_ENGINEDATA) $(gcw0_bundle)/engine-data/
+endif
+ifdef DYNAMIC_MODULES
+ $(MKDIR) $(gcw0_bundle)/plugins
+ $(CP) $(PLUGINS) $(gcw0_bundle)/plugins/
+endif
+ $(CP) $(EXECUTABLE) $(gcw0_bundle)/scummvm
+
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(gcw0_bundle)/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(gcw0_bundle)/
+
+ $(CP) $(srcdir)/dists/gcw0/scummvm.png $(gcw0_bundle)/
+ $(CP) $(srcdir)/dists/gcw0/default.gcw0.desktop $(gcw0_bundle)/
+ $(CP) $(srcdir)/dists/gcw0/scummvmrc $(gcw0_bundle)/
+ $(CP) $(srcdir)/dists/gcw0/scummvm.sh $(gcw0_bundle)/
+
+gcw0-opk-unstripped: $(gcw0_bundle)
+ $(CP) $(PLUGINS) $(gcw0_bundle)/plugins/
+ $(CP) $(EXECUTABLE) $(gcw0_bundle)/scummvm
+ ./dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm
+
+gcw-opk: $(gcw0_bundle)
+ $(STRIP) $(gcw0_bundle)/plugins/*
+ $(STRIP) $(gcw0_bundle)/scummvm
+ ./dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm
diff --git a/backends/platform/sdl/amigaos/amigaos.mk b/backends/platform/sdl/amigaos/amigaos.mk
index e998c6f3b2..5cec9c1588 100644
--- a/backends/platform/sdl/amigaos/amigaos.mk
+++ b/backends/platform/sdl/amigaos/amigaos.mk
@@ -4,6 +4,7 @@ amigaosdist: $(EXECUTABLE)
mkdir -p $(AMIGAOSPATH)/themes
mkdir -p $(AMIGAOSPATH)/extras
$(STRIP) $(EXECUTABLE) -o $(AMIGAOSPATH)/$(EXECUTABLE)
+ cp ${srcdir}/icons/scummvm_drawer.info $(AMIGAOSPATH).info
cp ${srcdir}/icons/scummvm.info $(AMIGAOSPATH)/$(EXECUTABLE).info
cp $(DIST_FILES_THEMES) $(AMIGAOSPATH)/themes/
ifdef DIST_FILES_ENGINEDATA
diff --git a/backends/platform/symbian/AdaptAllMMPs.pl b/backends/platform/symbian/AdaptAllMMPs.pl
index 18a464b580..6eed7f0690 100644
--- a/backends/platform/symbian/AdaptAllMMPs.pl
+++ b/backends/platform/symbian/AdaptAllMMPs.pl
@@ -16,6 +16,7 @@ chdir("../../../");
"mmp/scummvm_cruise.mmp",
"mmp/scummvm_draci.mmp",
"mmp/scummvm_drascula.mmp",
+ "mmp/scummvm_dreamweb.mmp",
"mmp/scummvm_gob.mmp",
"mmp/scummvm_groovie.mmp",
"mmp/scummvm_hopkins.mmp",
@@ -25,6 +26,7 @@ chdir("../../../");
"mmp/scummvm_m4.mmp",
"mmp/scummvm_made.mmp",
"mmp/scummvm_mohawk.mmp",
+ "mmp/scummvm_mortevielle.mmp",
"mmp/scummvm_neverhood.mmp",
"mmp/scummvm_parallaction.mmp",
"mmp/scummvm_pegasus.mmp",
@@ -43,19 +45,18 @@ chdir("../../../");
"mmp/scummvm_touche.mmp",
"mmp/scummvm_tsage.mmp",
"mmp/scummvm_tucker.mmp",
+ "mmp/scummvm_voyeur.mmp",
"mmp/scummvm_wintermute.mmp",
# New engines
"mmp/scummvm_avalanche.mmp",
"mmp/scummvm_bbvs.mmp",
- "mmp/scummvm_dreamweb.mmp",
+ "mmp/scummvm_cge2.mmp",
"mmp/scummvm_fullpipe.mmp",
"mmp/scummvm_lastexpress.mmp",
"mmp/scummvm_mads.mmp",
- "mmp/scummvm_mortevielle.mmp",
"mmp/scummvm_sword25.mmp",
"mmp/scummvm_testbed.mmp",
"mmp/scummvm_zvision.mmp",
- "mmp/scummvm_voyeur.mmp",
# Target Platform Project Files
"S60/ScummVM_S60.mmp",
"S60v3/ScummVM_S60v3.mmp",
@@ -92,7 +93,6 @@ Preparing to update all the Symbian MMP project files with objects from module.m
# some modules.mk files have #ifndef ENABLE_XXXX blocks:
my @section_empty = (""); # section standard: no #ifdef's in module.mk files
my @sections_agos = ("", "ENABLE_AGOS2"); # special sections for engine AGOS
-my @section_video = ("", "USE_BINK"); # special sections for engine VIDEO ###, "USE_THEORADEC"
my @sections_groovie = ("", "ENABLE_GROOVIE2"); # special sections for engine GROOVIE
my @sections_kyra = ("", "ENABLE_LOL","ENABLE_EOB"); # special sections for engine KYRA
my @sections_mohawk = ("", "ENABLE_CSTIME", "ENABLE_MYST", "ENABLE_RIVEN"); # special sections for engine MOHAWK
@@ -135,7 +135,7 @@ my @excludes_gui = (
# the USE_ARM_* defines not parsed correctly, exclude manually:
my @excludes_scumm = (
- ".*ARM.*", # the *ARM.s files are added in .mpp files based on WINS/ARM build!
+ ".*ARM.*", # the *ARM.s files are added in .mmp files based on WINS/ARM build!
# USE_ARM_SMUSH_ASM codec47ARM.s
# USE_ARM_GFX_ASM gfxARM.s
# USE_ARM_COSTUME_ASM proc3ARM.s compiled, linked?, but *not* used :P (portdefs.h)
@@ -149,57 +149,58 @@ ParseModule("_base", "gui", \@section_empty, \@excludes_gui);
ParseModule("_base", "graphics", \@section_empty, \@excludes_graphics);
ParseModule("_base", "image", \@section_empty);
ParseModule("_base", "audio", \@section_empty, \@excludes_snd);
-ParseModule("_base", "video", \@section_video); #
+ParseModule("_base", "video", \@section_empty);
chdir("engines/");
ParseModule("_scumm", "scumm", \@sections_scumm, \@excludes_scumm );
-ParseModule("_queen", "queen", \@section_empty);
+ParseModule("_agi", "agi", \@section_empty);
ParseModule("_agos", "agos", \@sections_agos);
-ParseModule("_sky", "sky", \@section_empty);
-ParseModule("_gob", "gob", \@section_empty);
-ParseModule("_saga", "saga", \@sections_saga);
-ParseModule("_kyra", "kyra", \@sections_kyra);
-ParseModule("_sword1", "sword1", \@section_empty);
-ParseModule("_sword2", "sword2", \@section_empty);
-ParseModule("_lure", "lure", \@section_empty);
ParseModule("_cine", "cine", \@section_empty);
-ParseModule("_cge", "cge", \@section_empty);
ParseModule("_composer","composer", \@section_empty);
-ParseModule("_agi", "agi", \@section_empty);
-ParseModule("_touche", "touche", \@section_empty);
-ParseModule("_parallaction","parallaction",\@section_empty);
ParseModule("_cruise", "cruise", \@section_empty);
+ParseModule("_cge", "cge", \@section_empty);
+ParseModule("_draci", "draci", \@section_empty);
ParseModule("_drascula","drascula", \@section_empty);
-ParseModule("_made", "made", \@section_empty);
-ParseModule("_m4", "m4", \@section_empty);
-ParseModule("_tinsel", "tinsel", \@section_empty);
+ParseModule("_dreamweb" ,"dreamweb", \@section_empty);
+ParseModule("_gob", "gob", \@section_empty);
ParseModule("_groovie", "groovie", \@sections_groovie);
-ParseModule("_tucker", "tucker", \@section_empty);
+ParseModule("_hopkins","hopkins", \@section_empty);
+ParseModule("_hugo" ,"hugo", \@section_empty);
+ParseModule("_kyra", "kyra", \@sections_kyra);
+ParseModule("_lure", "lure", \@section_empty);
+ParseModule("_made", "made", \@section_empty);
+ParseModule("_mohawk" ,"mohawk", \@sections_mohawk);
+ParseModule("_mortevielle" ,"mortevielle", \@section_empty);
+ParseModule("_neverhood" ,"neverhood", \@section_empty);
+ParseModule("_parallaction","parallaction",\@section_empty);
+ParseModule("_pegasus","pegasus", \@section_empty);
+ParseModule("_queen", "queen", \@section_empty);
+ParseModule("_saga", "saga", \@sections_saga);
ParseModule("_sci", "sci", \@sections_sci);
-ParseModule("_draci", "draci", \@section_empty);
+ParseModule("_sky", "sky", \@section_empty);
+ParseModule("_sword1", "sword1", \@section_empty);
+ParseModule("_sword2", "sword2", \@section_empty);
ParseModule("_teenagent","teenagent", \@section_empty);
-ParseModule("_mohawk" ,"mohawk", \@sections_mohawk);
-ParseModule("_hugo" ,"hugo", \@section_empty);
+ParseModule("_tinsel", "tinsel", \@section_empty);
+ParseModule("_toltecs","toltecs", \@section_empty);
+ParseModule("_tony", "tony", \@section_empty);
ParseModule("_toon" ,"toon", \@section_empty);
-ParseModule("_lastexpress","lastexpress", \@section_empty);
+ParseModule("_touche", "touche", \@section_empty);
ParseModule("_tsage", "tsage", \@section_empty);
-ParseModule("_tony", "tony", \@section_empty);
-ParseModule("_toltecs","toltecs", \@section_empty);
-ParseModule("_hopkins","hopkins", \@section_empty);
-ParseModule("_pegasus","pegasus", \@section_empty);
+ParseModule("_tucker", "tucker", \@section_empty);
+ParseModule("_voyeur" ,"voyeur", \@section_empty);
ParseModule("_wintermute","wintermute", \@section_empty);
##### new engines
ParseModule("_avalanche" ,"avalanche", \@section_empty);
-ParseModule("_dreamweb" ,"dreamweb", \@section_empty);
+ParseModule("_bbvs" ,"bbvs", \@section_empty);
+ParseModule("_cge2" ,"cge2", \@section_empty);
ParseModule("_fullpipe" ,"fullpipe", \@section_empty);
+ParseModule("_lastexpress","lastexpress", \@section_empty);
+ParseModule("_m4", "m4", \@section_empty);
ParseModule("_mads" ,"mads", \@section_empty);
-ParseModule("_mortevielle" ,"mortevielle", \@section_empty);
-ParseModule("_neverhood" ,"neverhood", \@section_empty);
ParseModule("_sword25" ,"sword25", \@section_empty);
ParseModule("_testbed" ,"testbed", \@section_empty);
ParseModule("_zvision" ,"zvision", \@section_empty);
-ParseModule("_voyeur" ,"voyeur", \@section_empty);
-ParseModule("_bbvs" ,"bbvs", \@section_empty);
print "
=======================================================================================
Done. Enjoy :P
diff --git a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
index a038bd90f8..fe81ed2261 100644
--- a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
+++ b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
@@ -64,10 +64,8 @@ $ExtraMacros .= "MACRO ENABLE_VKEYBD\n";
$ExtraMacros .= "MACRO DISABLE_FANCY_THEMES\n";
$ExtraMacros .= "MACRO USE_TRANSLATION\n";
$ExtraMacros .= "MACRO USE_BINK\n";
-#$ExtraMacros .= "MACRO USE_THEORADEC\n";
-#$ExtraMacros .= "MACRO USE_MPEG2\n";
# $ExtraMacros .= "MACRO \n";
-# candidates are : , USE_TIMIDITY,
+# candidates are : USE_TIMIDITY
# prep nice list of SDKs
#while( ($SDK, $RootDir) = each(%SDK_RootDirs) )
diff --git a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
index 26c2e4f69d..f9b376d674 100644
--- a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
+++ b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
@@ -2,32 +2,31 @@
##################################################################################################################
@WorkingEngines = qw(
- agos agi bbvs cine cge composer cruise draci
+ agos agi cine cge composer cruise draci dreamweb
drascula hugo gob groovie kyra lastexpress
lure made mohawk parallaction pegasus queen
saga sci scumm sky sword1 sword2 teenagent tinsel
toltecs tony toon touche tsage tucker wintermute
- dreamweb fullpipe hopkins mortevielle mads
+ bbvs fullpipe hopkins mortevielle mads cge2
neverhood testbed avalanche zvision voyeur
);
#### New engines
#### sword25
@WorkingEngines_1st = qw(
- bbvs cine composer cruise
- drascula groovie lastexpress
- lure made mohawk parallaction pegasus queen
- saga scumm
- toltecs tony toon touche tucker wintermute
- neverhood avalanche zvision voyeur
+ cge2 cine composer cruise drascula groovie
+ lastexpress made parallaction queen
+ saga scumm touche tucker wintermute
+ avalanche zvision voyeur
);
@WorkingEngines_2nd = qw(
- agos agi cge draci
- hugo gob kyra
- sci sky sword1 sword2 teenagent tinsel
- tsage
- dreamweb fullpipe hopkins mortevielle mads
+ agi agos bbvs cge draci gob hopkins
+ hugo kyra lure mohawk pegasus sci
+ sky sword1 sword2 teenagent mads
+ tinsel tsage toltecs tony toon
+ dreamweb fullpipe mortevielle
+ neverhood testbed
);
#### sword25
@@ -326,8 +325,8 @@
{
# the first one includes all SDKs & release-ready engines
- $VariationSets{'ALL'}{'all'} = "$DefaultFeatures @WorkingEngines @EnablableSubEngines";
- #$VariationSets{'ALL'}{'split'} = "$DefaultFeatures @WorkingEngines @EnablableSubEngines";
+ # $VariationSets{'ALL'}{'all'} = "$DefaultFeatures @WorkingEngines @EnablableSubEngines";
+ $VariationSets{'ALL'}{'split'} = "$DefaultFeatures @WorkingEngines @EnablableSubEngines";
# $VariationSets{'ALL'}{'1St'} = "$DefaultFeatures @WorkingEngines_1st @EnablableSubEngines";
# $VariationSets{'ALL'}{'2nd'} = "$DefaultFeatures @WorkingEngines_2nd @EnablableSubEngines";
# now one for each ready-for-release engine
diff --git a/backends/platform/symbian/help/ScummVM.rtf b/backends/platform/symbian/help/ScummVM.rtf
index 25254f5338..8e9d37363c 100644
--- a/backends/platform/symbian/help/ScummVM.rtf
+++ b/backends/platform/symbian/help/ScummVM.rtf
@@ -50,16 +50,16 @@ Synonyms;}{\*\cs33 \additive \super \sbasedon10 endnote reference;}{\s34\ql \fi-
{\listoverride\listid-119\listoverridecount0\ls7}{\listoverride\listid-125\listoverridecount0\ls8}{\listoverride\listid-120\listoverridecount0\ls9}{\listoverride\listid-129\listoverridecount0\ls10}{\listoverride\listid-119\listoverridecount0\ls11}
{\listoverride\listid-125\listoverridecount0\ls12}{\listoverride\listid-120\listoverridecount0\ls13}{\listoverride\listid-129\listoverridecount0\ls14}{\listoverride\listid-119\listoverridecount0\ls15}{\listoverride\listid-125\listoverridecount0\ls16}
{\listoverride\listid-120\listoverridecount0\ls17}{\listoverride\listid-129\listoverridecount0\ls18}{\listoverride\listid-119\listoverridecount0\ls19}{\listoverride\listid-125\listoverridecount0\ls20}{\listoverride\listid-120\listoverridecount0\ls21}
-{\listoverride\listid-129\listoverridecount0\ls22}{\listoverride\listid-119\listoverridecount0\ls23}{\listoverride\listid-125\listoverridecount0\ls24}{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23
-\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls25}{\listoverride\listid-2
-\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1
-\chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls26}}{\info{\author Fedor}{\operator Fedor}{\creatim\yr2013\mo11\dy30\hr23\min4}{\revtim\yr2014\mo7\dy2\hr12\min57}{\version98}{\edmins92}{\nofpages8}{\nofwords1514}{\nofchars8634}{\*\company DEV}
-{\nofcharsws0}{\vern8249}}\margl1701\margr850\margt1134\margb1134 \deftab708\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
-\jcompress\viewkind4\viewscale100\nolnhtadjtbl \fet0{\*\template E:\\Documents and Settings\\Administrator\\Application Data\\Microsoft\\\'d8\'e0\'e1\'eb\'ee\'ed\'fb\\cshelp2000.dot}\sectd \linex0\sectdefaultcl {\*\pnseclvl1
-\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5
-\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang
-{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s17\ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \i\f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {
-\lang1033\langfe1033\langnp1033 Author: Fedor Strizhniou.}{\f28
+{\listoverride\listid-129\listoverridecount0\ls22}{\listoverride\listid-119\listoverridecount0\ls23}{\listoverride\listid-125\listoverridecount0\ls24}{\listoverride\listid-120\listoverridecount0\ls25}{\listoverride\listid-129\listoverridecount0\ls26}
+{\listoverride\listid-119\listoverridecount0\ls27}{\listoverride\listid-125\listoverridecount0\ls28}{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1
+\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls29}{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel
+\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3991 ?;}{\levelnumbers;}\f30\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-283\li283 }}\ls30}}{\info{\author Fedor}
+{\operator Fedor}{\creatim\yr2013\mo11\dy30\hr23\min4}{\revtim\yr2014\mo9\dy9\hr19\min22}{\version99}{\edmins93}{\nofpages8}{\nofwords1514}{\nofchars8634}{\*\company DEV}{\nofcharsws0}{\vern8249}}\margl1701\margr850\margt1134\margb1134
+\deftab708\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind4\viewscale100\nolnhtadjtbl \fet0{\*\template
+E:\\Documents and Settings\\Administrator\\Application Data\\Microsoft\\\'d8\'e0\'e1\'eb\'ee\'ed\'fb\\cshelp2000.dot}\sectd \linex0\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
+{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain
+\s17\ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \i\f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\lang1033\langfe1033\langnp1033 Author: Fedor Strizhniou.}{\f28
\par }{\lang1033\langfe1033\langnp1033 Date: November 2013}{\f28
\par }{\lang1033\langfe1033\langnp1033 Version: 1.7.0
\par }\pard\plain \s1\ql \li0\ri0\sb360\sa240\keepn\widctlpar\nooverflow\faroman\outlinelevel0\rin0\lin0\itap0 \b\f1\fs32\lang2057\langfe1033\kerning28\cgrid\langnp2057\langfenp1033 {ScummVM Help
@@ -67,8 +67,8 @@ Synonyms;}{\*\cs33 \additive \super \sbasedon10 endnote reference;}{\s34\ql \fi-
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0 \b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28
About ScummVM Help
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {About ScummVM Help
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls29\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls29\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {About ScummVM Help
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }{
This help file based on ScummVM forum thread with some elaborations(in Anotherguest section) and text correction. If you wish add some text or translate you may download and modify source document from https://sourceforge.net/projects/scummvms60git/ and t
@@ -79,8 +79,8 @@ hen send me to fedor_qd@mail.ru
\par }{\f29
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 1st guide
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, UIQ, UIQ3, S80, s80, S90, s90
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls29\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls29\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, UIQ, UIQ3, S80, s80, S90, s90
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par }{UIQ3 devices: To the top right (holding the phone portrait) you four icons, from the top they are
\par
@@ -121,9 +121,9 @@ hen send me to fedor_qd@mail.ru
\par
\par What are these Joystick, Keyboard and Cursor modes anyway?
\par }{\f28
-\par }{Joystick mode sends SDL joystick events to ScummVM which acts as a mouse control in ScummVM. Cursor mode sends keyboard arrows instead, so for examp
-le it can be used to navigate through directorylist (one hand use perhaps!?) or save games etc. Keyboard mode is only available for S60 and enables multi-tap to enter text characters in save dialogs. These modes are implemented at the underlying SDL level
-, so this determines the types of events that ScummVM receives from SDL.
+\par }{Joystick mode sends SDL joystick events to ScummVM which acts as a mouse control in ScummVM. Cursor mode sends keyboard arrows instead, so for example it can be used to navigate
+through directorylist (one hand use perhaps!?) or save games etc. Keyboard mode is only available for S60 and enables multi-tap to enter text characters in save dialogs. These modes are implemented at the underlying SDL level, so this determines the types
+ of events that ScummVM receives from SDL.
\par What are these Shrinked, Zoomed and Upscaled modes anyway?
\par
\par Shrink displays the game on your screen but in a shrinked way, either in Portrait or Landscape mode, so not all the pixels c
@@ -135,8 +135,8 @@ s on S80/S90 devices in a better way for low resolution games. Currently it uses
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 2nd guide
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls29\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls29\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par
\par }{More user-friendly guide for Nokia phones (based on N96 but should apply to most phones)
@@ -178,8 +178,8 @@ t to exit Configuration Mode before typing!
\par Only applies to Landscape mode, simply swaps the screen output between having the phone tilted on its left side or on its right side.
\par
\par 4 - Toggle Zoom On and Off
-\par Zooms in on a portion of the screen. Handy for when you are looking through a screen for items or having trouble readin
-g subtitles. Use the navigation buttons for panning around the play area. Don't forget you'll have to exit out of Configuration Mode before you can move the pointer again. Exiting Configuration Mode does not reset the zoom level.
+\par Zooms in on a portion of the screen. Handy for when you are looking through a screen for items or having trouble reading subtitles. Use the navigation buttons for panning around
+ the play area. Don't forget you'll have to exit out of Configuration Mode before you can move the pointer again. Exiting Configuration Mode does not reset the zoom level.
\par }{\f29
\par }{5 & 6 - Unused
\par
@@ -200,8 +200,8 @@ g subtitles. Use the navigation buttons for panning around the play area. Don't
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\b0\f28 3rd guide
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls25\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls25\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls29\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls29\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Controls, Virtual keyboard, Shortcuts, ScummVM, Tips, S60, s60
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {\f28
\par
\par }{ScummVM keys on Nokia e71 (most likely on any other qwerty-device, too), tested on version 0.14.0svn (Feb. 18 2009
@@ -278,11 +278,12 @@ kinda makes it unplayable.
\par }{\f28
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {ScummVM1 engines list
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls26\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls26\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls30\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls30\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {agi
\par agos
\par \tab AGOS2
+\par cge2
\par cine
\par composer
\par cruise
@@ -311,8 +312,8 @@ kinda makes it unplayable.
\par
\par }\pard\plain \s2\ql \li0\ri0\sb120\sa120\keepn\widctlpar\brdrt\brdrs\brdrw30\brsp20 \brdrb\brdrs\brdrw30\brsp20 \tqr\tx9072{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\nooverflow\faroman\outlinelevel1\rin0\lin0\itap0
\b\f1\fs24\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {ScummVM2 engines list
-\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls26\pnrnot0
-\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls26\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
+\par {\pntext\pard\plain\s26 \f30\fs20\lang2057\langfe1033\langnp2057\langfenp1033 \loch\af30\dbch\af0\hich\f30 \'69\tab}}\pard\plain \s26\ql \fi-283\li283\ri0\sa120\widctlpar\brdrb\brdrs\brdrw15\brsp20 {\*\pn \pnlvlblt\ilvl0\ls30\pnrnot0
+\pnf30\pnstart1\pnindent283\pnhang{\pntxtb i}}\nooverflow\faroman\ls30\rin0\lin283\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {Supported engines
\par }\pard\plain \ql \li0\ri0\sa120\widctlpar\nooverflow\faroman\rin0\lin0\itap0 \f1\fs20\lang2057\langfe1033\cgrid\langnp2057\langfenp1033 {avalanche
\par cge
\par composer
diff --git a/backends/platform/symbian/mmp/config.mmh b/backends/platform/symbian/mmp/config.mmh
index 12c1fc2d2d..075697d99a 100644
--- a/backends/platform/symbian/mmp/config.mmh
+++ b/backends/platform/symbian/mmp/config.mmh
@@ -48,7 +48,7 @@ OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid l
OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
// -Wno-psabi turn off "note: the mangling of 'va_list' has changed in GCC 4.4"
OPTION GCCE -pipe -Wno-multichar -Wno-reorder -Wno-unused \
- -Wno-format -fsigned-char-Wno-psabi
+ -Wno-format -fsigned-char -Wno-psabi
ALWAYS_BUILD_AS_ARM
// *** Include paths
diff --git a/backends/platform/symbian/mmp/scummvm_agi.mmp.in b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
index d6f9e54b7d..f24e3ef1a9 100644
--- a/backends/platform/symbian/mmp/scummvm_agi.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_agi.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\agi
//STOP_AUTO_OBJECTS_AGI_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_agos.mmp.in b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
index d2b1329a24..ff15c8d5b0 100644
--- a/backends/platform/symbian/mmp/scummvm_agos.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_agos.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -59,19 +56,3 @@ SOURCEPATH ..\..\..\..\engines\agos
//STOP_AUTO_OBJECTS_AGOS_ENABLE_AGOS2//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in
index c3f12f6858..88aa689f5b 100644
--- a/backends/platform/symbian/mmp/scummvm_base.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in
@@ -32,12 +32,10 @@
TARGET scummvm_base.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-// using option -Wno-psabi to supress warning "note: the mangling of 'va_list' has changed in GCC 4.4"
+#include "config.mmh"
+
// compiler must use png.h from libpng.lib instead ScummVM's
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char -Wno-psabi -I'/Symbian/S60_5th_Edition_SDK_v1.0/epoc32/include/png'
-ALWAYS_BUILD_AS_ARM
+OPTION GCCE -I'/Symbian/S60_5th_Edition_SDK_v1.0/epoc32/include/png'
// Note: the LIB:*.lib statements are used by AdaptAllMMPs.pl, so don't remove them!
//START_AUTO_MACROS_MASTER//
@@ -50,21 +48,9 @@ ALWAYS_BUILD_AS_ARM
// *** Include paths
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio
-USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl
-USERINCLUDE \epoc32\include\mpeg2dec //\epoc32\include\theora
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
+USERINCLUDE ..\..\..\..\backends\fs ..\..\..\..\backends\platform\sdl
+USERINCLUDE \epoc32\include\mpeg2dec
+
// *** SOURCE files
diff --git a/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in b/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
index b4981e6eec..20d91a910d 100644
--- a/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_bbvs.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +51,3 @@ SOURCEPATH ..\..\..\..\engines\bbvs
//STOP_AUTO_OBJECTS_BBVS_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_cge.mmp.in b/backends/platform/symbian/mmp/scummvm_cge.mmp.in
index 35cb0f2f98..29bdad0600 100644
--- a/backends/platform/symbian/mmp/scummvm_cge.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cge.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_cge.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\cge
//STOP_AUTO_OBJECTS_CGE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_cine.mmp.in b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
index 99b45cddb8..f93cd30c9f 100644
--- a/backends/platform/symbian/mmp/scummvm_cine.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_CINE.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -55,17 +52,3 @@ SOURCEPATH ..\..\..\..\engines\cine
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_composer.mmp.in b/backends/platform/symbian/mmp/scummvm_composer.mmp.in
index 5a215f2d8d..72117fbc19 100644
--- a/backends/platform/symbian/mmp/scummvm_composer.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_composer.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_COMPOSER.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\COMPOSER
//STOP_AUTO_OBJECTS_COMPOSER_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
index 21a674dc1f..ceb5a2124f 100644
--- a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_cruise.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\cruise
//STOP_AUTO_OBJECTS_CRUISE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_draci.mmp.in b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
index fe899a91ff..77750ff696 100644
--- a/backends/platform/symbian/mmp/scummvm_draci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_draci.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -55,17 +52,3 @@ SOURCEPATH ..\..\..\..\engines\draci
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
index 8f532d4498..7f39126e68 100644
--- a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_drascula.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -55,17 +52,3 @@ SOURCEPATH ..\..\..\..\engines\drascula
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in b/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in
index 89ffd23ebd..22d5050597 100644
--- a/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_dreamweb.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -56,17 +53,3 @@ SOURCEPATH ..\..\..\..\engines\dreamweb
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_gob.mmp.in b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
index 884b06c61a..a46ee9c403 100644
--- a/backends/platform/symbian/mmp/scummvm_gob.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_gob.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\gob
//STOP_AUTO_OBJECTS_GOB_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
index 53fb33fef0..a2a3d5c47d 100644
--- a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_groovie.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +51,3 @@ SOURCEPATH ..\..\..\..\engines\groovie
//STOP_AUTO_OBJECTS_GROOVIE_//
SOURCE roq.cpp
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in b/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
index bafc11e65f..82728942a7 100644
--- a/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_HOPKINS.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\HOPKINS
//STOP_AUTO_OBJECTS_HOPKINS_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h \ No newline at end of file
diff --git a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
index 58622a83fd..1f250bda3f 100644
--- a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_hugo.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\hugo
//STOP_AUTO_OBJECTS_HUGO_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h \ No newline at end of file
diff --git a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
index 3fa05e856d..f3b30b1318 100644
--- a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_kyra.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -66,19 +63,3 @@ SOURCEPATH ..\..\..\..\engines\kyra
//STOP_AUTO_OBJECTS_KYRA_ENABLE_EOB//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
index 8e0b3026c7..38d63b4648 100644
--- a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_lastexpress.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\lastexpress
//STOP_AUTO_OBJECTS_LASTEXPRESS_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_lure.mmp.in b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
index 89c93d058d..2922c9df49 100644
--- a/backends/platform/symbian/mmp/scummvm_lure.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_lure.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\lure
//STOP_AUTO_OBJECTS_LURE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_m4.mmp.in b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
index b3024c93c3..0b3a0b60e4 100644
--- a/backends/platform/symbian/mmp/scummvm_m4.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_m4.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\m4
//STOP_AUTO_OBJECTS_M4_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_made.mmp.in b/backends/platform/symbian/mmp/scummvm_made.mmp.in
index d4a63f8d87..e240685753 100644
--- a/backends/platform/symbian/mmp/scummvm_made.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_made.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_made.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,20 +50,3 @@ SOURCEPATH ..\..\..\..\engines\made
//STOP_AUTO_OBJECTS_MADE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
-
diff --git a/backends/platform/symbian/mmp/scummvm_mads.mmp.in b/backends/platform/symbian/mmp/scummvm_mads.mmp.in
index d0d6091f83..e5e990dd2d 100644
--- a/backends/platform/symbian/mmp/scummvm_mads.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mads.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_mads.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +51,3 @@ SOURCEPATH ..\..\..\..\engines\mads
//STOP_AUTO_OBJECTS_MADS_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
index e9175593ec..19bed823d5 100644
--- a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_mohawk.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -72,19 +69,3 @@ SOURCEPATH ..\..\..\..\engines\mohawk
//STOP_AUTO_OBJECTS_MOHAWK_ENABLE_CSTIME//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in b/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in
index f118ddbef0..06f9333c37 100644
--- a/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_mortevielle.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +51,3 @@ SOURCEPATH ..\..\..\..\engines\mortevielle
//STOP_AUTO_OBJECTS_MORTEVIELLE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in b/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in
index a57161577f..b6deeb2d73 100644
--- a/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_neverhood.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_neverhood.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -55,17 +52,3 @@ SOURCEPATH ..\..\..\..\engines\neverhood
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
index cefdd1b282..c61e40626c 100644
--- a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_parallaction.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\parallaction
//STOP_AUTO_OBJECTS_PARALLACTION_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in b/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
index 68b2c12774..3ef85bf29d 100644
--- a/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_PEGASUS.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\PEGASUS
//STOP_AUTO_OBJECTS_PEGASUS_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h \ No newline at end of file
diff --git a/backends/platform/symbian/mmp/scummvm_queen.mmp.in b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
index 94835aae90..3a15fdd0a2 100644
--- a/backends/platform/symbian/mmp/scummvm_queen.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_queen.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\queen
//STOP_AUTO_OBJECTS_QUEEN_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_saga.mmp.in b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
index 77bf839efe..ce5de459b2 100644
--- a/backends/platform/symbian/mmp/scummvm_saga.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_saga.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -65,19 +62,3 @@ SOURCEPATH ..\..\..\..\engines\saga
//STOP_AUTO_OBJECTS_SAGA_ENABLE_SAGA2//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_sci.mmp.in b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
index d08501e471..49484b8c7c 100644
--- a/backends/platform/symbian/mmp/scummvm_sci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_sci.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -60,20 +57,3 @@ SOURCEPATH ..\..\..\..\engines\sci
//STOP_AUTO_OBJECTS_SCI_ENABLE_SCI32//
-
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
index a11dd071d3..60c54697d0 100644
--- a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_scumm.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -78,17 +75,5 @@ SOURCE smush/codec47ARM.s // ARM version: add ASM routines
// *** Include paths
-USERINCLUDE ..\..\..\..\engines ..\..\..\..\engines\scumm\smush ..\..\..\..\engines\scumm\insane
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
+USERINCLUDE ..\..\..\..\engines\scumm\smush ..\..\..\..\engines\scumm\insane
+
diff --git a/backends/platform/symbian/mmp/scummvm_sky.mmp.in b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
index 37fdc89f99..5363bb32ef 100644
--- a/backends/platform/symbian/mmp/scummvm_sky.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_sky.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -55,17 +52,5 @@ SOURCEPATH ..\..\..\..\engines\sky
// *** Include paths
-USERINCLUDE ..\..\..\..\engines ..\..\..\..\engines\sky\music
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
+USERINCLUDE ..\..\..\..\engines\sky\music
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
index 352cbe59f0..b4b2b91dae 100644
--- a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_sword1.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\sword1
//STOP_AUTO_OBJECTS_SWORD1_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
index 7b79bf7f5c..a8c963a618 100644
--- a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_sword2.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\sword2
//STOP_AUTO_OBJECTS_SWORD2_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_sword25.mmp.in b/backends/platform/symbian/mmp/scummvm_sword25.mmp.in
index 4159350bce..67efc10c45 100644
--- a/backends/platform/symbian/mmp/scummvm_sword25.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword25.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_sword25.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -56,18 +53,6 @@ SOURCEPATH ..\..\..\..\engines\sword25
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-USERINCLUDE ..\..\..\..\engines\sword25\util\lua ..\..\..\..\engines\sword25\util\pluto
+USERINCLUDE ..\..\..\..\engines\sword25\util\lua
+USERINCLUDE ..\..\..\..\engines\sword25\util\pluto
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
index 332b9f20ac..9551eda7b6 100644
--- a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_teenagent.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\teenagent
//STOP_AUTO_OBJECTS_TEENAGENT_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_testbed.mmp.in b/backends/platform/symbian/mmp/scummvm_testbed.mmp.in
index 20d3789a31..24b87d154c 100644
--- a/backends/platform/symbian/mmp/scummvm_testbed.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_testbed.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_testbed.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +51,3 @@ SOURCEPATH ..\..\..\..\engines\testbed
//STOP_AUTO_OBJECTS_TESTBED_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
index 15c5850cee..a5a62ffc15 100644
--- a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_tinsel.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\tinsel
//STOP_AUTO_OBJECTS_TINSEL_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h \ No newline at end of file
diff --git a/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in b/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
index df75290d81..1512dfed06 100644
--- a/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_TOLTECS.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -45,7 +42,7 @@ ALWAYS_BUILD_AS_ARM
// *** SOURCE files
-SOURCEPATH ..\..\..\..\engines\TOLTECS
+SOURCEPATH ..\..\..\..\engines\toltecs
//START_AUTO_OBJECTS_TOLTECS_//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\TOLTECS
//STOP_AUTO_OBJECTS_TOLTECS_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_tony.mmp.in b/backends/platform/symbian/mmp/scummvm_tony.mmp.in
index bcdbc1c979..18c4f6d3cb 100644
--- a/backends/platform/symbian/mmp/scummvm_tony.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tony.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_TONY.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -45,7 +42,7 @@ ALWAYS_BUILD_AS_ARM
// *** SOURCE files
-SOURCEPATH ..\..\..\..\engines\TONY
+SOURCEPATH ..\..\..\..\engines\tony
//START_AUTO_OBJECTS_TONY_//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\TONY
//STOP_AUTO_OBJECTS_TONY_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_toon.mmp.in b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
index 7bfec38dc5..9c7568cc8b 100644
--- a/backends/platform/symbian/mmp/scummvm_toon.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_toon.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\toon
//STOP_AUTO_OBJECTS_TOON_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_touche.mmp.in b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
index 407e275ae3..73e14ee691 100644
--- a/backends/platform/symbian/mmp/scummvm_touche.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_touche.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\touche
//STOP_AUTO_OBJECTS_TOUCHE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
index c457dd4083..aef8841cf2 100644
--- a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
@@ -32,10 +32,7 @@
TARGET scummvm_tucker.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -53,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\tucker
//STOP_AUTO_OBJECTS_TUCKER_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
index 63dd7d39d8..716484755f 100644
--- a/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
@@ -32,11 +32,7 @@
TARGET scummvm_wintermute.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-// -Wno-psabi turn off "note: the mangling of 'va_list' has changed in GCC 4.4"
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char -Wno-psabi
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,19 +50,3 @@ SOURCEPATH ..\..\..\..\engines\wintermute
//STOP_AUTO_OBJECTS_WINTERMUTE_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_zvision.mmp.in b/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
index 642f659551..e647275dbc 100644
--- a/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_zvision.mmp.in
@@ -33,10 +33,7 @@
TARGET scummvm_zvision.lib
TARGETTYPE lib
-OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
-OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
-OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
-ALWAYS_BUILD_AS_ARM
+#include "config.mmh"
//START_AUTO_MACROS_SLAVE//
@@ -54,18 +51,3 @@ SOURCEPATH ..\..\..\..\engines\zvision
//STOP_AUTO_OBJECTS_ZVISION_//
-// *** Include paths
-
-USERINCLUDE ..\..\..\..\engines
-USERINCLUDE ..\..\..\.. ..\..\..\..\gui ..\..\..\..\audio ..\src
-SYSTEMINCLUDE \epoc32\include\freetype
-SYSTEMINCLUDE \epoc32\include\mpeg2dec
-SYSTEMINCLUDE \epoc32\include\jpeg
-SYSTEMINCLUDE \epoc32\include\png
-SYSTEMINCLUDE \epoc32\include\ESDL
-SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
-SYSTEMINCLUDE \epoc32\include\theora
-SYSTEMINCLUDE \epoc32\include\tremor
-SYSTEMINCLUDE \epoc32\include
-SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index 0563639de3..13f5d1fbe0 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -70,73 +70,73 @@
#endif
#ifdef USE_WII_KBD
-static int keymap[][2] = {
- { KS_Return, Common::KEYCODE_RETURN },
- { KS_Up, Common::KEYCODE_UP },
- { KS_Down, Common::KEYCODE_DOWN },
- { KS_Left, Common::KEYCODE_LEFT },
- { KS_Right, Common::KEYCODE_RIGHT },
- { KS_Shift_L, Common::KEYCODE_LSHIFT },
- { KS_Shift_R, Common::KEYCODE_RSHIFT },
- { KS_Control_L, Common::KEYCODE_LCTRL },
- { KS_Control_R, Common::KEYCODE_RCTRL },
- { KS_Alt_L, Common::KEYCODE_LALT },
- { KS_Alt_R, Common::KEYCODE_RALT },
- { KS_Meta_L, Common::KEYCODE_LMETA },
- { KS_Meta_R, Common::KEYCODE_RMETA },
- { KS_KP_0, Common::KEYCODE_KP0 },
- { KS_KP_1, Common::KEYCODE_KP1 },
- { KS_KP_2, Common::KEYCODE_KP2 },
- { KS_KP_3, Common::KEYCODE_KP3 },
- { KS_KP_4, Common::KEYCODE_KP4 },
- { KS_KP_5, Common::KEYCODE_KP5 },
- { KS_KP_6, Common::KEYCODE_KP6 },
- { KS_KP_7, Common::KEYCODE_KP7 },
- { KS_KP_8, Common::KEYCODE_KP8 },
- { KS_KP_9, Common::KEYCODE_KP9 },
- { KS_Home, Common::KEYCODE_HOME },
- { KS_Insert, Common::KEYCODE_INSERT },
- { KS_End, Common::KEYCODE_END },
- { KS_Prior, Common::KEYCODE_PAGEUP },
- { KS_Next, Common::KEYCODE_PAGEDOWN },
- { KS_f1, Common::KEYCODE_F1 },
- { KS_f2, Common::KEYCODE_F2 },
- { KS_f3, Common::KEYCODE_F3 },
- { KS_f4, Common::KEYCODE_F4 },
- { KS_f5, Common::KEYCODE_F5 },
- { KS_f6, Common::KEYCODE_F6 },
- { KS_f7, Common::KEYCODE_F7 },
- { KS_f8, Common::KEYCODE_F8 },
- { KS_f9, Common::KEYCODE_F9 },
- { KS_f10, Common::KEYCODE_F10 },
- { KS_f11, Common::KEYCODE_F11 },
- { KS_f12, Common::KEYCODE_F12 },
- { KS_f13, Common::KEYCODE_F13 },
- { KS_f14, Common::KEYCODE_F14 },
- { KS_f15, Common::KEYCODE_F15 },
- { KS_F1, Common::KEYCODE_F1 },
- { KS_F2, Common::KEYCODE_F2 },
- { KS_F3, Common::KEYCODE_F3 },
- { KS_F4, Common::KEYCODE_F4 },
- { KS_F5, Common::KEYCODE_F5 },
- { KS_F6, Common::KEYCODE_F6 },
- { KS_F7, Common::KEYCODE_F7 },
- { KS_F8, Common::KEYCODE_F8 },
- { KS_F9, Common::KEYCODE_F9 },
- { KS_F10, Common::KEYCODE_F10 },
- { KS_F11, Common::KEYCODE_F11 },
- { KS_F12, Common::KEYCODE_F12 },
- { KS_F13, Common::KEYCODE_F13 },
- { KS_F14, Common::KEYCODE_F14 },
- { KS_F15, Common::KEYCODE_F15 },
- { KS_KP_Separator, Common::KEYCODE_KP_PERIOD },
- { KS_KP_Subtract, Common::KEYCODE_KP_DIVIDE },
- { KS_KP_Multiply, Common::KEYCODE_KP_MULTIPLY },
- { KS_KP_Add, Common::KEYCODE_KP_PLUS },
- { KS_KP_Subtract, Common::KEYCODE_KP_MINUS },
- { KS_KP_Equal, Common::KEYCODE_KP_EQUALS },
- { KS_KP_Enter, Common::KEYCODE_KP_ENTER },
- { 0, 0 }
+static int keymap[][3] = {
+ { KS_Return, Common::KEYCODE_RETURN, Common::ASCII_RETURN },
+ { KS_Up, Common::KEYCODE_UP, 0 },
+ { KS_Down, Common::KEYCODE_DOWN, 0 },
+ { KS_Left, Common::KEYCODE_LEFT, 0 },
+ { KS_Right, Common::KEYCODE_RIGHT, 0 },
+ { KS_Shift_L, Common::KEYCODE_LSHIFT, 0 },
+ { KS_Shift_R, Common::KEYCODE_RSHIFT, 0 },
+ { KS_Control_L, Common::KEYCODE_LCTRL, 0 },
+ { KS_Control_R, Common::KEYCODE_RCTRL, 0 },
+ { KS_Alt_L, Common::KEYCODE_LALT, 0 },
+ { KS_Alt_R, Common::KEYCODE_RALT, 0 },
+ { KS_Meta_L, Common::KEYCODE_LMETA, 0 },
+ { KS_Meta_R, Common::KEYCODE_RMETA, 0 },
+ { KS_KP_0, Common::KEYCODE_KP0, '0' },
+ { KS_KP_1, Common::KEYCODE_KP1, '1' },
+ { KS_KP_2, Common::KEYCODE_KP2, '2' },
+ { KS_KP_3, Common::KEYCODE_KP3, '3' },
+ { KS_KP_4, Common::KEYCODE_KP4, '4' },
+ { KS_KP_5, Common::KEYCODE_KP5, '5' },
+ { KS_KP_6, Common::KEYCODE_KP6, '6' },
+ { KS_KP_7, Common::KEYCODE_KP7, '7' },
+ { KS_KP_8, Common::KEYCODE_KP8, '8' },
+ { KS_KP_9, Common::KEYCODE_KP9, '9' },
+ { KS_Home, Common::KEYCODE_HOME, 0 },
+ { KS_Insert, Common::KEYCODE_INSERT, 0 },
+ { KS_End, Common::KEYCODE_END, 0 },
+ { KS_Prior, Common::KEYCODE_PAGEUP, 0 },
+ { KS_Next, Common::KEYCODE_PAGEDOWN, 0 },
+ { KS_f1, Common::KEYCODE_F1, Common::ASCII_F1 },
+ { KS_f2, Common::KEYCODE_F2, Common::ASCII_F2 },
+ { KS_f3, Common::KEYCODE_F3, Common::ASCII_F3 },
+ { KS_f4, Common::KEYCODE_F4, Common::ASCII_F4 },
+ { KS_f5, Common::KEYCODE_F5, Common::ASCII_F5 },
+ { KS_f6, Common::KEYCODE_F6, Common::ASCII_F6 },
+ { KS_f7, Common::KEYCODE_F7, Common::ASCII_F7 },
+ { KS_f8, Common::KEYCODE_F8, Common::ASCII_F8 },
+ { KS_f9, Common::KEYCODE_F9, Common::ASCII_F9 },
+ { KS_f10, Common::KEYCODE_F10, Common::ASCII_F10 },
+ { KS_f11, Common::KEYCODE_F11, Common::ASCII_F11 },
+ { KS_f12, Common::KEYCODE_F12, Common::ASCII_F12 },
+ { KS_f13, Common::KEYCODE_F13, 0 },
+ { KS_f14, Common::KEYCODE_F14, 0 },
+ { KS_f15, Common::KEYCODE_F15, 0 },
+ { KS_F1, Common::KEYCODE_F1, Common::ASCII_F1 },
+ { KS_F2, Common::KEYCODE_F2, Common::ASCII_F2 },
+ { KS_F3, Common::KEYCODE_F3, Common::ASCII_F3 },
+ { KS_F4, Common::KEYCODE_F4, Common::ASCII_F4 },
+ { KS_F5, Common::KEYCODE_F5, Common::ASCII_F5 },
+ { KS_F6, Common::KEYCODE_F6, Common::ASCII_F6 },
+ { KS_F7, Common::KEYCODE_F7, Common::ASCII_F7 },
+ { KS_F8, Common::KEYCODE_F8, Common::ASCII_F8 },
+ { KS_F9, Common::KEYCODE_F9, Common::ASCII_F9 },
+ { KS_F10, Common::KEYCODE_F10, Common::ASCII_F10 },
+ { KS_F11, Common::KEYCODE_F11, Common::ASCII_F11 },
+ { KS_F12, Common::KEYCODE_F12, Common::ASCII_F12 },
+ { KS_F13, Common::KEYCODE_F13, 0 },
+ { KS_F14, Common::KEYCODE_F14, 0 },
+ { KS_F15, Common::KEYCODE_F15, 0 },
+ { KS_KP_Separator, Common::KEYCODE_KP_PERIOD, '.' },
+ { KS_KP_Divide, Common::KEYCODE_KP_DIVIDE, '/' },
+ { KS_KP_Multiply, Common::KEYCODE_KP_MULTIPLY, '*' },
+ { KS_KP_Add, Common::KEYCODE_KP_PLUS, '+' },
+ { KS_KP_Subtract, Common::KEYCODE_KP_MINUS, '-' },
+ { KS_KP_Equal, Common::KEYCODE_KP_EQUALS, '=' },
+ { KS_KP_Enter, Common::KEYCODE_KP_ENTER, Common::ASCII_RETURN },
+ { 0, 0, 0 }
};
#endif
@@ -262,7 +262,7 @@ bool OSystem_Wii::pollKeyboard(Common::Event &event) {
while (keymap[i][0] != 0) {
if (keymap[i][0] == kbdEvent.symbol) {
event.kbd.keycode = static_cast<Common::KeyCode>(keymap[i][1]);
- event.kbd.ascii = 0;
+ event.kbd.ascii = keymap[i][2];
return true;
}
diff --git a/backends/taskbar/unity/unity-taskbar.cpp b/backends/taskbar/unity/unity-taskbar.cpp
index 1b82e58c8a..532d9656c3 100644
--- a/backends/taskbar/unity/unity-taskbar.cpp
+++ b/backends/taskbar/unity/unity-taskbar.cpp
@@ -26,6 +26,8 @@
#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_UNITY)
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include "backends/taskbar/unity/unity-taskbar.h"
#include "common/textconsole.h"
@@ -33,7 +35,12 @@
#include <unity.h>
UnityTaskbarManager::UnityTaskbarManager() {
- g_type_init();
+ /*
+ * Deprecated in Glib >= 2.36.0
+ */
+ if (!glib_check_version(2, 36, 0)) {
+ g_type_init();
+ }
_loop = g_main_loop_new(NULL, FALSE);
diff --git a/base/version.cpp b/base/version.cpp
index ef02ff9d21..fcb2740de9 100644
--- a/base/version.cpp
+++ b/base/version.cpp
@@ -146,4 +146,12 @@ const char *gScummVMFeatures = ""
#ifdef USE_PNG
"PNG "
#endif
+
+#ifdef ENABLE_KEYMAPPER
+ "keymapper "
+#endif
+
+#ifdef ENABLE_VKEYBD
+ "virtual keyboard "
+#endif
;
diff --git a/configure b/configure
index 541d1c2198..ebca8322dc 100755
--- a/configure
+++ b/configure
@@ -822,9 +822,9 @@ Usage: $0 [OPTIONS]...
Configuration:
-h, --help display this help and exit
- --backend=BACKEND backend to build (android, tizen, dc, dingux, ds, gph,
- iphone, linuxmoto, maemo, n64, null, openpandora, ps2,
- psp, samsungtv, sdl, webos, wii, wince) [sdl]
+ --backend=BACKEND backend to build (android, tizen, dc, dingux, ds, gcw0,
+ gph, iphone, linuxmoto, maemo, n64, null, openpandora,
+ ps2, psp, samsungtv, sdl, webos, wii, wince) [sdl]
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -859,6 +859,7 @@ Special configuration feature:
dreamcast for Sega Dreamcast
ds for Nintendo DS
gamecube for Nintendo GameCube
+ gcw0 for GCW Zero
gp2x for GP2X
gp2xwiz for GP2X Wiz
iphone for Apple iPhone
@@ -1298,7 +1299,7 @@ caanoo)
_host_cpu=arm
_host_alias=arm-none-linux-gnueabi
;;
-dingux)
+dingux | gcw0)
_host_os=linux
_host_cpu=mipsel
_host_alias=mipsel-linux
@@ -2588,6 +2589,25 @@ if test -n "$_host"; then
add_line_to_config_h "/* #define DEBUG_WII_GDB */"
add_line_to_config_h "#define USE_WII_DI"
;;
+ gcw0)
+ DEFINES="$DEFINES -DDINGUX -DGCW0"
+ DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE"
+ ASFLAGS="$ASFLAGS"
+ CXXFLAGS="$CXXFLAGS -mips32"
+ _backend="dingux"
+ _mt32emu=no
+ _optimization_level=-O3
+ # Disable alsa midi to get the port build on OpenDingux toolchain
+ _alsa=no
+ _vkeybd=yes
+ _build_hq_scalers=no
+ _keymapper=yes
+ # Force disable vorbis on dingux, it has terrible performance compared to tremor
+ _vorbis=no
+ # Force disable seq on dingux, no way to use it and it would get enabled by default with configure
+ _seq_midi=no
+ _port_mk="backends/platform/dingux/dingux.mk"
+ ;;
gp2x)
DEFINES="$DEFINES -DGP2X"
CXXFLAGS="$CXXFLAGS -march=armv4t"
@@ -3848,8 +3868,8 @@ if test "$_libunity" = auto ; then
;;
*)
# Unity has a lots of dependencies, update the libs and cflags var with them
- LIBUNITY_LIBS="$LIBUNITY_LIBS `pkg-config --libs unity = 3.8.4 2>> "$TMPLOG"`"
- LIBUNITY_CFLAGS="$LIBUNITY_CFLAGS `pkg-config --cflags unity = 3.8.4 2>> "$TMPLOG"`"
+ LIBUNITY_LIBS="$LIBUNITY_LIBS `pkg-config --libs 'unity > 3.8.1' 2>> "$TMPLOG"`"
+ LIBUNITY_CFLAGS="$LIBUNITY_CFLAGS `pkg-config --cflags 'unity > 3.8.1' 2>> "$TMPLOG"`"
_libunity=no
cat > $TMPC << EOF
#include <unity.h>
@@ -3863,6 +3883,10 @@ EOF
esac
fi
if test "$_libunity" = yes ; then
+ if test "$LIBUNITY_CFLAGS" = "" || test "$LIBUNITY_LIBS" = ""; then
+ LIBUNITY_LIBS="$LIBUNITY_LIBS `pkg-config --libs 'unity > 3.8.1' 2>> "$TMPLOG"`"
+ LIBUNITY_CFLAGS="$LIBUNITY_CFLAGS `pkg-config --cflags 'unity > 3.8.1' 2>> "$TMPLOG"`"
+ fi
LIBS="$LIBS $LIBUNITY_LIBS"
INCLUDES="$INCLUDES $LIBUNITY_CFLAGS"
fi
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp
index 7da7bd4ef0..441f315c8d 100644
--- a/devtools/create_kyradat/create_kyradat.cpp
+++ b/devtools/create_kyradat/create_kyradat.cpp
@@ -45,7 +45,7 @@
enum {
- kKyraDatVersion = 85
+ kKyraDatVersion = 86
};
const ExtractFilename extractFilenames[] = {
diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp
index 0162bda8ad..afe0c67dbf 100644
--- a/devtools/create_kyradat/games.cpp
+++ b/devtools/create_kyradat/games.cpp
@@ -99,6 +99,7 @@ const Game kyra3Games[] = {
const Game eob1Games[] = {
{ kEoB1, kPlatformDOS, kNoSpecial, EN_ANY },
{ kEoB1, kPlatformDOS, kNoSpecial, DE_DEU },
+ { kEoB1, kPlatformDOS, kNoSpecial, IT_ITA },
GAME_DUMMY_ENTRY
};
diff --git a/devtools/create_kyradat/resources.cpp b/devtools/create_kyradat/resources.cpp
index 66db495caf..4df6bb8fb8 100644
--- a/devtools/create_kyradat/resources.cpp
+++ b/devtools/create_kyradat/resources.cpp
@@ -93,6 +93,7 @@
#include "resources/eob1_dos.h"
#include "resources/eob1_dos_english.h"
#include "resources/eob1_dos_german.h"
+#include "resources/eob1_dos_italian.h"
// Eye of the Beholder: The Legend of Darkmoon
#include "resources/eob2_dos.h"
@@ -1249,6 +1250,94 @@ static const ResourceProvider resourceProviders[] = {
{ kEoBBaseManWord, kEoB1, kPlatformDOS, kNoSpecial, DE_DEU, &kEoB1ManWordDOSGermanProvider },
{ kEoBBaseManPrompt, kEoB1, kPlatformDOS, kNoSpecial, DE_DEU, &kEoB1ManPromptDOSGermanProvider },
{ kEoBBaseMonsterDistAttStrings, kEoB1, kPlatformDOS, kNoSpecial, DE_DEU, &kEoB1MonsterDistAttStringsDOSGermanProvider },
+ { kEoBBaseChargenStrings1, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ChargenStrings1DOSItalianProvider },
+ { kEoBBaseChargenStrings2, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ChargenStrings2DOSItalianProvider },
+ { kEoBBaseChargenStatStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ChargenStatStringsDOSItalianProvider },
+ { kEoBBaseChargenRaceSexStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ChargenRaceSexStringsDOSItalianProvider },
+ { kEoBBaseChargenClassStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ChargenClassStringsDOSItalianProvider },
+ { kEoBBaseChargenAlignmentStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ChargenAlignmentStringsDOSItalianProvider },
+ { kEoBBaseChargenEnterGameStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ChargenEnterGameStringsDOSItalianProvider },
+ { kEoB1MainMenuStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MainMenuStringsDOSItalianProvider },
+ { kEoB1BonusStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1BonusStringsDOSItalianProvider },
+ { kEoB1TurnUndeadString, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1TurnUndeadStringDOSItalianProvider },
+ { kEoB1Npc0Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc0StringsDOSItalianProvider },
+ { kEoB1Npc11Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc11StringsDOSItalianProvider },
+ { kEoB1Npc12Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc12StringsDOSItalianProvider },
+ { kEoB1Npc21Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc21StringsDOSItalianProvider },
+ { kEoB1Npc22Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc22StringsDOSItalianProvider },
+ { kEoB1Npc31Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc31StringsDOSItalianProvider },
+ { kEoB1Npc32Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc32StringsDOSItalianProvider },
+ { kEoB1Npc4Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc4StringsDOSItalianProvider },
+ { kEoB1Npc5Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc5StringsDOSItalianProvider },
+ { kEoB1Npc6Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc6StringsDOSItalianProvider },
+ { kEoB1Npc7Strings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1Npc7StringsDOSItalianProvider },
+ { kEoBBasePryDoorStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1PryDoorStringsDOSItalianProvider },
+ { kEoBBaseWarningStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1WarningStringsDOSItalianProvider },
+ { kEoBBaseItemSuffixStringsRings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ItemSuffixStringsRingsDOSItalianProvider },
+ { kEoBBaseItemSuffixStringsPotions, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ItemSuffixStringsPotionsDOSItalianProvider },
+ { kEoBBaseItemSuffixStringsWands, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ItemSuffixStringsWandsDOSItalianProvider },
+ { kEoBBaseRipItemStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1RipItemStringsDOSItalianProvider },
+ { kEoBBaseCursedString, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CursedStringDOSItalianProvider },
+ { kEoBBaseMagicObjectStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicObjectStringsDOSItalianProvider },
+ { kEoBBaseMagicObjectString5, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicObjectString5DOSItalianProvider },
+ { kEoBBasePatternSuffix, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1PatternSuffixDOSItalianProvider },
+ { kEoBBasePatternGrFix1, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1PatternGrFix1DOSItalianProvider },
+ { kEoBBasePatternGrFix2, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1PatternGrFix2DOSItalianProvider },
+ { kEoBBaseValidateArmorString, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ValidateArmorStringDOSItalianProvider },
+ { kEoBBaseValidateNoDropString, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ValidateNoDropStringDOSItalianProvider },
+ { kEoBBasePotionStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1PotionStringsDOSItalianProvider },
+ { kEoBBaseWandStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1WandStringsDOSItalianProvider },
+ { kEoBBaseItemMisuseStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ItemMisuseStringsDOSItalianProvider },
+ { kEoBBaseTakenStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1TakenStringsDOSItalianProvider },
+ { kEoBBasePotionEffectStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1PotionEffectStringsDOSItalianProvider },
+ { kEoBBaseYesNoStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1YesNoStringsDOSItalianProvider },
+ { kRpgCommonMoreStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MoreStringsDOSItalianProvider },
+ { kEoBBaseNpcMaxStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1NpcMaxStringsDOSItalianProvider },
+ { kEoBBaseNpcJoinStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1NpcJoinStringsDOSItalianProvider },
+ { kEoBBaseCancelStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CancelStringsDOSItalianProvider },
+ { kEoBBaseMenuStringsMain, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsMainDOSItalianProvider },
+ { kEoBBaseMenuStringsSaveLoad, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsSaveLoadDOSItalianProvider },
+ { kEoBBaseMenuStringsOnOff, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsOnOffDOSItalianProvider },
+ { kEoBBaseMenuStringsSpells, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsSpellsDOSItalianProvider },
+ { kEoBBaseMenuStringsRest, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsRestDOSItalianProvider },
+ { kEoBBaseMenuStringsDrop, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsDropDOSItalianProvider },
+ { kEoBBaseMenuStringsExit, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsExitDOSItalianProvider },
+ { kEoBBaseMenuStringsStarve, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsStarveDOSItalianProvider },
+ { kEoBBaseMenuStringsScribe, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsScribeDOSItalianProvider },
+ { kEoBBaseMenuStringsDrop2, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsDrop2DOSItalianProvider },
+ { kEoBBaseMenuStringsHead, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsHeadDOSItalianProvider },
+ { kEoBBaseMenuStringsPoison, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsPoisonDOSItalianProvider },
+ { kEoBBaseMenuStringsMgc, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsMgcDOSItalianProvider },
+ { kEoBBaseMenuStringsPrefs, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsPrefsDOSItalianProvider },
+ { kEoBBaseMenuStringsRest2, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsRest2DOSItalianProvider },
+ { kEoBBaseMenuStringsRest4, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsRest4DOSItalianProvider },
+ { kEoBBaseMenuStringsDefeat, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuStringsDefeatDOSItalianProvider },
+ { kEoBBaseMenuYesNoStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MenuYesNoStringsDOSItalianProvider },
+ { kEoBBaseCharGuiStringsHp, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharGuiStringsHpDOSItalianProvider },
+ { kEoBBaseCharGuiStringsWp1, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharGuiStringsWp1DOSItalianProvider },
+ { kEoBBaseCharGuiStringsWr, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharGuiStringsWrDOSItalianProvider },
+ { kEoBBaseCharGuiStringsSt1, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharGuiStringsSt1DOSItalianProvider },
+ { kEoBBaseCharGuiStringsIn, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharGuiStringsInDOSItalianProvider },
+ { kEoBBaseCharStatusStrings7, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharStatusStrings7DOSItalianProvider },
+ { kEoBBaseCharStatusStrings81, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharStatusStrings81DOSItalianProvider },
+ { kEoBBaseCharStatusStrings9, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharStatusStrings9DOSItalianProvider },
+ { kEoBBaseCharStatusStrings131, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1CharStatusStrings131DOSItalianProvider },
+ { kEoBBaseLevelGainStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1LevelGainStringsDOSItalianProvider },
+ { kEoBBaseBookNumbers, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1BookNumbersDOSItalianProvider },
+ { kEoBBaseMageSpellsList, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MageSpellsListDOSItalianProvider },
+ { kEoBBaseClericSpellsList, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ClericSpellsListDOSItalianProvider },
+ { kEoBBaseSpellNames, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1SpellNamesDOSItalianProvider },
+ { kEoBBaseMagicStrings1, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicStrings1DOSItalianProvider },
+ { kEoBBaseMagicStrings2, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicStrings2DOSItalianProvider },
+ { kEoBBaseMagicStrings3, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicStrings3DOSItalianProvider },
+ { kEoBBaseMagicStrings4, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicStrings4DOSItalianProvider },
+ { kEoBBaseMagicStrings6, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicStrings6DOSItalianProvider },
+ { kEoBBaseMagicStrings7, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicStrings7DOSItalianProvider },
+ { kEoBBaseMagicStrings8, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MagicStrings8DOSItalianProvider },
+ { kEoBBaseManDef, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ManDefDOSItalianProvider },
+ { kEoBBaseManWord, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ManWordDOSItalianProvider },
+ { kEoBBaseManPrompt, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1ManPromptDOSItalianProvider },
+ { kEoBBaseMonsterDistAttStrings, kEoB1, kPlatformDOS, kNoSpecial, IT_ITA, &kEoB1MonsterDistAttStringsDOSItalianProvider },
{ kEoBBaseChargenStrings1, kEoB2, kPlatformDOS, kNoSpecial, EN_ANY, &kEoB2ChargenStrings1DOSEnglishProvider },
{ kEoBBaseChargenStrings2, kEoB2, kPlatformDOS, kNoSpecial, EN_ANY, &kEoB2ChargenStrings2DOSEnglishProvider },
{ kEoBBaseChargenStartLevels, kEoB2, kPlatformDOS, kNoSpecial, UNK_LANG, &kEoB2ChargenStartLevelsDOSProvider },
diff --git a/devtools/create_kyradat/resources/eob1_dos_italian.h b/devtools/create_kyradat/resources/eob1_dos_italian.h
new file mode 100644
index 0000000000..680e197b57
--- /dev/null
+++ b/devtools/create_kyradat/resources/eob1_dos_italian.h
@@ -0,0 +1,891 @@
+static const char *const kEoB1ChargenStrings1DOSItalian[9] = {
+ "Il tuo gruppo ""\x0E""\rcompleto.Premi il\rbottone GIOCA per\riniziare la nuova\rpartita.",
+ " ",
+ "CA\rPF\rLIV",
+ "%s\r%d\r%d\r%d\r%d\r%d",
+ "%d\r%d",
+ "%d",
+ "%d/%d",
+ "%d/%d/%d",
+ "Scegli il riquadro\rdel personaggio\rche vuoi creare o\rvedere."
+};
+
+static const StringListProvider kEoB1ChargenStrings1DOSItalianProvider = { ARRAYSIZE(kEoB1ChargenStrings1DOSItalian), kEoB1ChargenStrings1DOSItalian };
+
+static const char *const kEoB1ChargenStrings2DOSItalian[12] = {
+ "%s",
+ "%d",
+ "%s",
+ "%d",
+ "%d",
+ "%d",
+ "%s",
+ "%d",
+ "SCEGLI RAZZA:",
+ "SCEGLI CLASSE:",
+ "SCEGLI ALLINEAMENTO:",
+ "NOME:"
+};
+
+static const StringListProvider kEoB1ChargenStrings2DOSItalianProvider = { ARRAYSIZE(kEoB1ChargenStrings2DOSItalian), kEoB1ChargenStrings2DOSItalian };
+
+static const char *const kEoB1ChargenStatStringsDOSItalian[12] = {
+ "FOR",
+ "INT",
+ "SAG",
+ "DES",
+ "COS",
+ "CAR",
+ "FORZA",
+ "INTELLIGENZA",
+ "SAGGEZZA",
+ "DESTREZZA",
+ "COSTITUZIONE",
+ "CARISMA"
+};
+
+static const StringListProvider kEoB1ChargenStatStringsDOSItalianProvider = { ARRAYSIZE(kEoB1ChargenStatStringsDOSItalian), kEoB1ChargenStatStringsDOSItalian };
+
+static const char *const kEoB1ChargenRaceSexStringsDOSItalian[12] = {
+ "UMANO MASCHIO",
+ "UMANO FEMMINA",
+ "ELFO MASCHIO",
+ "ELFO FEMMINA",
+ "MEZZUOMO MASCHIO",
+ "MEZZUOMO FEMMINA",
+ "NANO MASCHIO",
+ "NANO FEMMINA",
+ "GNOMO MASCHIO",
+ "GNOMO FEMMINA",
+ "MEZZUOMO MASCHIO",
+ "MEZZUOMO FEMMINA"
+};
+
+static const StringListProvider kEoB1ChargenRaceSexStringsDOSItalianProvider = { ARRAYSIZE(kEoB1ChargenRaceSexStringsDOSItalian), kEoB1ChargenRaceSexStringsDOSItalian };
+
+static const char *const kEoB1ChargenClassStringsDOSItalian[21] = {
+ "GUERRIERO",
+ "RANGER",
+ "PALADINO",
+ "MAGO",
+ "CHIERICO",
+ "LADRO",
+ "GUERRIERO/CHIERICO",
+ "GUERRIERO/LADRO",
+ "GUERRIERO/MAGO",
+ "GUER./MAGO/LADRO",
+ "LADRO/MAGO",
+ "CHIERICO/LADRO",
+ "GUER./CHIERICO/MAGO",
+ "RANGER/CHIERICO",
+ "CHIERICO/MAGO",
+ "GUERRIERO",
+ "MAGO",
+ "CHIERICO",
+ "LADRO",
+ "PALADINO",
+ "RANGER"
+};
+
+static const StringListProvider kEoB1ChargenClassStringsDOSItalianProvider = { ARRAYSIZE(kEoB1ChargenClassStringsDOSItalian), kEoB1ChargenClassStringsDOSItalian };
+
+static const char *const kEoB1ChargenAlignmentStringsDOSItalian[9] = {
+ "LEGALE BUONO",
+ "NEUTRALE BUONO",
+ "CAOTICO BUONO",
+ "LEGALE NEUTRALE",
+ "NEUTRALE PURO",
+ "CAOTICO NEUT.",
+ "LEGALE MALVAGIO",
+ "NEUTRALE MALV.",
+ "CAOTICO MALV."
+};
+
+static const StringListProvider kEoB1ChargenAlignmentStringsDOSItalianProvider = { ARRAYSIZE(kEoB1ChargenAlignmentStringsDOSItalian), kEoB1ChargenAlignmentStringsDOSItalian };
+
+static const char *const kEoB1ChargenEnterGameStringsDOSItalian[1] = {
+ " Avvio partita.\r in corso..."
+};
+
+static const StringListProvider kEoB1ChargenEnterGameStringsDOSItalianProvider = { ARRAYSIZE(kEoB1ChargenEnterGameStringsDOSItalian), kEoB1ChargenEnterGameStringsDOSItalian };
+
+static const char *const kEoB1MainMenuStringsDOSItalian[3] = {
+ "CARICA UNA PARTITA\r",
+ "CREA UN NUOVO GRUPPO\r",
+ "ESCI\r"
+};
+
+static const StringListProvider kEoB1MainMenuStringsDOSItalianProvider = { ARRAYSIZE(kEoB1MainMenuStringsDOSItalian), kEoB1MainMenuStringsDOSItalian };
+
+static const char *const kEoB1BonusStringsDOSItalian[3] = {
+ "Congratulazioni per aver scoperto tutte le 12 quest bonus di Beholder.\r\rI nomi dei personaggi del tuo gruppo vincente sono:\r\r",
+ "\r",
+ "\r\rPassword: %04x\r"
+};
+
+static const StringListProvider kEoB1BonusStringsDOSItalianProvider = { ARRAYSIZE(kEoB1BonusStringsDOSItalian), kEoB1BonusStringsDOSItalian };
+
+static const char *const kEoB1TurnUndeadStringDOSItalian[1] = {
+ "\x06\x06""%s usa scacciare non-morti!""\x06\x0F""\r"
+};
+
+static const StringListProvider kEoB1TurnUndeadStringDOSItalianProvider = { ARRAYSIZE(kEoB1TurnUndeadStringDOSItalian), kEoB1TurnUndeadStringDOSItalian };
+
+static const char *const kEoB1Npc0StringsDOSItalian[2] = {
+ "\rVi auguro fortuna nel vostro viaggio.",
+ "Chi dovrei resuscitare?"
+};
+
+static const StringListProvider kEoB1Npc0StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc0StringsDOSItalian), kEoB1Npc0StringsDOSItalian };
+
+static const char *const kEoB1Npc11StringsDOSItalian[3] = {
+ "Curalo",
+ "Parla",
+ "Riparti"
+};
+
+static const StringListProvider kEoB1Npc11StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc11StringsDOSItalian), kEoB1Npc11StringsDOSItalian };
+
+static const char *const kEoB1Npc12StringsDOSItalian[2] = {
+ "Curalo",
+ "Riparti"
+};
+
+static const StringListProvider kEoB1Npc12StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc12StringsDOSItalian), kEoB1Npc12StringsDOSItalian };
+
+static const char *const kEoB1Npc21StringsDOSItalian[2] = {
+ "Ascolta Proposta",
+ "Riparti"
+};
+
+static const StringListProvider kEoB1Npc21StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc21StringsDOSItalian), kEoB1Npc21StringsDOSItalian };
+
+static const char *const kEoB1Npc22StringsDOSItalian[2] = {
+ "Aiutalo",
+ "Riparti"
+};
+
+static const StringListProvider kEoB1Npc22StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc22StringsDOSItalian), kEoB1Npc22StringsDOSItalian };
+
+static const char *const kEoB1Npc31StringsDOSItalian[2] = {
+ "Cura Gruppo",
+ "Riparti"
+};
+
+static const StringListProvider kEoB1Npc31StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc31StringsDOSItalian), kEoB1Npc31StringsDOSItalian };
+
+static const char *const kEoB1Npc32StringsDOSItalian[3] = {
+ "Cura Gruppo",
+ "Resuscita morti",
+ "Riparti"
+};
+
+static const StringListProvider kEoB1Npc32StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc32StringsDOSItalian), kEoB1Npc32StringsDOSItalian };
+
+static const char *const kEoB1Npc4StringsDOSItalian[2] = {
+ "Attacca",
+ "Corrompi"
+};
+
+static const StringListProvider kEoB1Npc4StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc4StringsDOSItalian), kEoB1Npc4StringsDOSItalian };
+
+static const char *const kEoB1Npc5StringsDOSItalian[3] = {
+ "Uccidila",
+ "Ascoltala",
+ "Falla scappare"
+};
+
+static const StringListProvider kEoB1Npc5StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc5StringsDOSItalian), kEoB1Npc5StringsDOSItalian };
+
+static const char *const kEoB1Npc6StringsDOSItalian[2] = {
+ "Arrenditi",
+ "Attacca"
+};
+
+static const StringListProvider kEoB1Npc6StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc6StringsDOSItalian), kEoB1Npc6StringsDOSItalian };
+
+static const char *const kEoB1Npc7StringsDOSItalian[3] = {
+ "Liberalo",
+ "Uccidilo",
+ "Riparti"
+};
+
+static const StringListProvider kEoB1Npc7StringsDOSItalianProvider = { ARRAYSIZE(kEoB1Npc7StringsDOSItalian), kEoB1Npc7StringsDOSItalian };
+
+static const char *const kEoB1PryDoorStringsDOSItalian[7] = {
+ "Nessuno pu""\x11"" forzare la porta\r",
+ "Il gruppo forza la porta!\r",
+ "%s forza la porta!\r",
+ "Il gruppo prova a forzare la porta, ma fallisce.\r",
+ "Non puoi metterci quest'oggetto.\r",
+ "L'oggetto ""\x0E"" troppo grande.\r",
+ "Nessuno pu""\x11"" forzare questa porta.\r"
+};
+
+static const StringListProvider kEoB1PryDoorStringsDOSItalianProvider = { ARRAYSIZE(kEoB1PryDoorStringsDOSItalian), kEoB1PryDoorStringsDOSItalian };
+
+static const char *const kEoB1WarningStringsDOSItalian[3] = {
+ "Non potete proseguire da questa parte.\r",
+ "%s non pu""\x11"" consumare cibo!\r",
+ "Non ""\x0E"" commestibile!\r"
+};
+
+static const StringListProvider kEoB1WarningStringsDOSItalianProvider = { ARRAYSIZE(kEoB1WarningStringsDOSItalian), kEoB1WarningStringsDOSItalian };
+
+static const char *const kEoB1ItemSuffixStringsRingsDOSItalian[4] = {
+ "Ornamento",
+ "Stregoneria",
+ "Sostentamento",
+ "Caduta Morbida"
+};
+
+static const StringListProvider kEoB1ItemSuffixStringsRingsDOSItalianProvider = { ARRAYSIZE(kEoB1ItemSuffixStringsRingsDOSItalian), kEoB1ItemSuffixStringsRingsDOSItalian };
+
+static const char *const kEoB1ItemSuffixStringsPotionsDOSItalian[8] = {
+ "Forza dei Giganti",
+ "Guarigione",
+ "Super-Guarigione",
+ "Veleno",
+ "Vitalit""\x0C""",
+ "Velocit""\x0C""",
+ "Invisibilit""\x0C""",
+ "Antidoti"
+};
+
+static const StringListProvider kEoB1ItemSuffixStringsPotionsDOSItalianProvider = { ARRAYSIZE(kEoB1ItemSuffixStringsPotionsDOSItalian), kEoB1ItemSuffixStringsPotionsDOSItalian };
+
+static const char *const kEoB1ItemSuffixStringsWandsDOSItalian[7] = {
+ "Legno",
+ "Fulmini",
+ "Gelo",
+ "Cure",
+ "Palla di Fuoco",
+ "Silvias",
+ "Dardo Incantato",
+};
+
+static const StringListProvider kEoB1ItemSuffixStringsWandsDOSItalianProvider = { ARRAYSIZE(kEoB1ItemSuffixStringsWandsDOSItalian), kEoB1ItemSuffixStringsWandsDOSItalian };
+
+static const char *const kEoB1RipItemStringsDOSItalian[3] = {
+ "%s ha perso la sua ",
+ "%s ha perso il suo ",
+ ".\r"
+};
+
+static const StringListProvider kEoB1RipItemStringsDOSItalianProvider = { ARRAYSIZE(kEoB1RipItemStringsDOSItalian), kEoB1RipItemStringsDOSItalian };
+
+static const char *const kEoB1CursedStringDOSItalian[1] = {
+ "Maledetta %s %d"
+};
+
+static const StringListProvider kEoB1CursedStringDOSItalianProvider = { ARRAYSIZE(kEoB1CursedStringDOSItalian), kEoB1CursedStringDOSItalian };
+
+static const char *const kEoB1MagicObjectStringsDOSItalian[5] = {
+ "Pergamena del mago",
+ "Pergamena del Chierico",
+ "Anello",
+ "Pozione",
+ "bacchetta"
+};
+
+static const StringListProvider kEoB1MagicObjectStringsDOSItalianProvider = { ARRAYSIZE(kEoB1MagicObjectStringsDOSItalian), kEoB1MagicObjectStringsDOSItalian };
+
+static const char *const kEoB1MagicObjectString5DOSItalian[1] = {
+ "Legno"
+};
+
+static const StringListProvider kEoB1MagicObjectString5DOSItalianProvider = { ARRAYSIZE(kEoB1MagicObjectString5DOSItalian), kEoB1MagicObjectString5DOSItalian };
+
+static const char *const kEoB1PatternSuffixDOSItalian[1] = {
+ "%s di %s"
+};
+
+static const StringListProvider kEoB1PatternSuffixDOSItalianProvider = { ARRAYSIZE(kEoB1PatternSuffixDOSItalian), kEoB1PatternSuffixDOSItalian };
+
+static const char *const kEoB1PatternGrFix1DOSItalian[1] = {
+ "%s di %s"
+};
+
+static const StringListProvider kEoB1PatternGrFix1DOSItalianProvider = { ARRAYSIZE(kEoB1PatternGrFix1DOSItalian), kEoB1PatternGrFix1DOSItalian };
+
+static const char *const kEoB1PatternGrFix2DOSItalian[1] = {
+ "%s di %s"
+};
+
+static const StringListProvider kEoB1PatternGrFix2DOSItalianProvider = { ARRAYSIZE(kEoB1PatternGrFix2DOSItalian), kEoB1PatternGrFix2DOSItalian };
+
+static const char *const kEoB1ValidateArmorStringDOSItalian[1] = {
+ "%s non pu""\x11"" indossare quest'armatura.\r"
+};
+
+static const StringListProvider kEoB1ValidateArmorStringDOSItalianProvider = { ARRAYSIZE(kEoB1ValidateArmorStringDOSItalian), kEoB1ValidateArmorStringDOSItalian };
+
+static const char *const kEoB1ValidateNoDropStringDOSItalian[1] = {
+ "Non puoi metterci quest'oggetto.\r"
+};
+
+static const StringListProvider kEoB1ValidateNoDropStringDOSItalianProvider = { ARRAYSIZE(kEoB1ValidateNoDropStringDOSItalian), kEoB1ValidateNoDropStringDOSItalian };
+
+static const char *const kEoB1PotionStringsDOSItalian[2] = {
+ "avvelenato",
+ "%s si sente %s!\r"
+};
+
+static const StringListProvider kEoB1PotionStringsDOSItalianProvider = { ARRAYSIZE(kEoB1PotionStringsDOSItalian), kEoB1PotionStringsDOSItalian };
+
+static const char *const kEoB1WandStringsDOSItalian[2] = {
+ "La bacchetta pare priva di magia\r",
+ "Nessun effetto.\r"
+};
+
+static const StringListProvider kEoB1WandStringsDOSItalianProvider = { ARRAYSIZE(kEoB1WandStringsDOSItalian), kEoB1WandStringsDOSItalian };
+
+static const char *const kEoB1ItemMisuseStringsDOSItalian[3] = {
+ " non pu""\x11"" usare quest'oggetto.\r",
+ "Se indossato quest'oggetto funziona in automatico.\r",
+ "Questo oggetto non si usa cos""\x10"".\r"
+};
+
+static const StringListProvider kEoB1ItemMisuseStringsDOSItalianProvider = { ARRAYSIZE(kEoB1ItemMisuseStringsDOSItalian), kEoB1ItemMisuseStringsDOSItalian };
+
+static const char *const kEoB1TakenStringsDOSItalian[1] = {
+ " preso.\r"
+};
+
+static const StringListProvider kEoB1TakenStringsDOSItalianProvider = { ARRAYSIZE(kEoB1TakenStringsDOSItalian), kEoB1TakenStringsDOSItalian };
+
+static const char *const kEoB1PotionEffectStringsDOSItalian[8] = {
+ "molto pi""\x12"" forte",
+ "meglio",
+ "molto meglio",
+ "ammalato",
+ "sazio",
+ "agile e veloce",
+ "trasparente",
+ "meglio"
+};
+
+static const StringListProvider kEoB1PotionEffectStringsDOSItalianProvider = { ARRAYSIZE(kEoB1PotionEffectStringsDOSItalian), kEoB1PotionEffectStringsDOSItalian };
+
+static const char *const kEoB1YesNoStringsDOSItalian[2] = {
+ "s""\x10""",
+ "no"
+};
+
+static const StringListProvider kEoB1YesNoStringsDOSItalianProvider = { ARRAYSIZE(kEoB1YesNoStringsDOSItalian), kEoB1YesNoStringsDOSItalian };
+
+static const char *const kEoB1MoreStringsDOSItalian[1] = {
+ " >> "
+};
+
+static const StringListProvider kEoB1MoreStringsDOSItalianProvider = { ARRAYSIZE(kEoB1MoreStringsDOSItalian), kEoB1MoreStringsDOSItalian };
+
+static const char *const kEoB1NpcMaxStringsDOSItalian[1] = {
+ "Puoi avere solo sei personaggi nel tuo gruppo. Scegli chi congedare."
+};
+
+static const StringListProvider kEoB1NpcMaxStringsDOSItalianProvider = { ARRAYSIZE(kEoB1NpcMaxStringsDOSItalian), kEoB1NpcMaxStringsDOSItalian };
+
+static const char *const kEoB1NpcJoinStringsDOSItalian[1] = {
+ "%s si unisce al gruppo.\r"
+};
+
+static const StringListProvider kEoB1NpcJoinStringsDOSItalianProvider = { ARRAYSIZE(kEoB1NpcJoinStringsDOSItalian), kEoB1NpcJoinStringsDOSItalian };
+
+static const char *const kEoB1CancelStringsDOSItalian[1] = {
+ "ANNULLA"
+};
+
+static const StringListProvider kEoB1CancelStringsDOSItalianProvider = { ARRAYSIZE(kEoB1CancelStringsDOSItalian), kEoB1CancelStringsDOSItalian };
+
+static const char *const kEoB1MenuStringsMainDOSItalian[8] = {
+ "Opzioni:",
+ "Riposa",
+ "Studia Incantesimi",
+ "Prega Incantesimi",
+ "Trascrivi Pergamene",
+ "Impostazioni",
+ "Opzioni",
+ " << "
+};
+
+static const StringListProvider kEoB1MenuStringsMainDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsMainDOSItalian), kEoB1MenuStringsMainDOSItalian };
+
+static const char *const kEoB1MenuStringsSaveLoadDOSItalian[8] = {
+ "Carica Partita",
+ "Salva Partita",
+ "Congeda Personaggio",
+ "Esci dal gioco",
+ "Opzioni:",
+ "\r Salvato!",
+ "\r Salvataggio\r fallito!",
+ "\r Caricamento\r fallito!"
+};
+
+static const StringListProvider kEoB1MenuStringsSaveLoadDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsSaveLoadDOSItalian), kEoB1MenuStringsSaveLoadDOSItalian };
+
+static const char *const kEoB1MenuStringsOnOffDOSItalian[2] = {
+ "ON",
+ "OFF"
+};
+
+static const StringListProvider kEoB1MenuStringsOnOffDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsOnOffDOSItalian), kEoB1MenuStringsOnOffDOSItalian };
+
+static const char *const kEoB1MenuStringsSpellsDOSItalian[17] = {
+ "\r\r Scegli il\r personaggio del\r gruppo a cui\r far studiare gli\r incantesimi.",
+ "\r Il tuo Paladino ""\x0E""\r di livello troppo\r basso.",
+ "\r\r Il Mago non ha\r il Libro degli\r Incantesimi!",
+ "\r\r\r Scegli il\r personaggio del\r gruppo a cui far\r pregare per gli\r incantesimi.",
+ "\r Non hai nessun\r Chierico che\r possa pregare.",
+ "\r Non hai nessun\r Mago che possa\r studiare gli\r incantesimi.",
+ " Un Mago morto o\r svenuto non pu""\x11""\r memorizzare\r incantesimi.",
+ " Un Chierico morto o\r svenuto non pu""\x11""\r memorizzare\r incantesimi.",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "Canc.",
+ "Incantesimi:",
+ "S""\x10""",
+ "No"
+};
+
+static const StringListProvider kEoB1MenuStringsSpellsDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsSpellsDOSItalian), kEoB1MenuStringsSpellsDOSItalian };
+
+static const char *const kEoB1MenuStringsRestDOSItalian[5] = {
+ "\rMetti i tuoi \rguaritori a curare\ril gruppo?",
+ " Qualcuno ""\x0E"" ancora\rferito. Riposa\rfino alla\rguarigione?",
+ "Riposando.",
+ "\r Tutti i\r personaggi sono\r riposati.",
+ " Il tuo gruppo ha\rbisogno di riposare\rper ottenere gli\rincantesimi."
+};
+
+static const StringListProvider kEoB1MenuStringsRestDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsRestDOSItalian), kEoB1MenuStringsRestDOSItalian };
+
+static const char *const kEoB1MenuStringsDropDOSItalian[1] = {
+ " Non puoi avere\r meno di quattro\r personaggi."
+};
+
+static const StringListProvider kEoB1MenuStringsDropDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsDropDOSItalian), kEoB1MenuStringsDropDOSItalian };
+
+static const char *const kEoB1MenuStringsExitDOSItalian[1] = {
+ " Sei sicuro di\rvoler uscire dal\rgioco?"
+};
+
+static const StringListProvider kEoB1MenuStringsExitDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsExitDOSItalian), kEoB1MenuStringsExitDOSItalian };
+
+static const char *const kEoB1MenuStringsStarveDOSItalian[1] = {
+ " Il tuo gruppo sta\rpatendo la fame.\rContinua a riposare?"
+};
+
+static const StringListProvider kEoB1MenuStringsStarveDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsStarveDOSItalian), kEoB1MenuStringsStarveDOSItalian };
+
+static const char *const kEoB1MenuStringsScribeDOSItalian[5] = {
+ "Scegli la pergamena\rda trascrivere.",
+ "\r\r\r Scegli un Mago che\r vorrebbe trascrivere\r gli incantesimi.",
+ " Non hai nessuna\r pergamena da\r trascrivere.",
+ " Non hai nessuna\r pergamena utile\r a questo Mago.",
+ "\r Non hai nessun\r Mago che possa\r trascrivere\r pergamene."
+};
+
+static const StringListProvider kEoB1MenuStringsScribeDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsScribeDOSItalian), kEoB1MenuStringsScribeDOSItalian };
+
+static const char *const kEoB1MenuStringsDrop2DOSItalian[3] = {
+ " Scegli il\r personaggio da\r congedare.",
+ " Sei sicuro di\rvoler salvare la\rpartita?",
+ " Sei sicuro di\rvoler caricare una\rpartita?"
+};
+
+static const StringListProvider kEoB1MenuStringsDrop2DOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsDrop2DOSItalian), kEoB1MenuStringsDrop2DOSItalian };
+
+static const char *const kEoB1MenuStringsHeadDOSItalian[3] = {
+ "Al Campo:",
+ "Impostazioni:",
+ "Opzioni:"
+};
+
+static const StringListProvider kEoB1MenuStringsHeadDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsHeadDOSItalian), kEoB1MenuStringsHeadDOSItalian };
+
+static const char *const kEoB1MenuStringsPoisonDOSItalian[1] = {
+ "I membri avvelenati\rmoriranno! Riposa\rcomunque?"
+};
+
+static const StringListProvider kEoB1MenuStringsPoisonDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsPoisonDOSItalian), kEoB1MenuStringsPoisonDOSItalian };
+
+static const char *const kEoB1MenuStringsMgcDOSItalian[2] = {
+ "%-18s %1d",
+ "%d di %d rimanenti. "
+};
+
+static const StringListProvider kEoB1MenuStringsMgcDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsMgcDOSItalian), kEoB1MenuStringsMgcDOSItalian };
+
+static const char *const kEoB1MenuStringsPrefsDOSItalian[4] = {
+ "Musiche %-3s",
+ "Effetti sonori %-3s",
+ "Barre grafiche %-3s",
+ "Mouse %-3s"
+};
+
+static const StringListProvider kEoB1MenuStringsPrefsDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsPrefsDOSItalian), kEoB1MenuStringsPrefsDOSItalian };
+
+static const char *const kEoB1MenuStringsRest2DOSItalian[4] = {
+ "%s ha ottenuto %s.\r",
+ "%s ha memorizzato %s.\r",
+ "%s Cura %s.\r",
+ "Ore di riposo: %-4d"
+};
+
+static const StringListProvider kEoB1MenuStringsRest2DOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsRest2DOSItalian), kEoB1MenuStringsRest2DOSItalian };
+
+static const char *const kEoB1MenuStringsRest4DOSItalian[1] = {
+ "\rNon potete riposare vicino a dei mostri."
+};
+
+static const StringListProvider kEoB1MenuStringsRest4DOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsRest4DOSItalian), kEoB1MenuStringsRest4DOSItalian };
+
+static const char *const kEoB1MenuStringsDefeatDOSItalian[1] = {
+ "L'intero gruppo ""\x0E"" stato sconfitto. I servitori del male potranno portare avanti i loro piani indisturbati!\r"
+};
+
+static const StringListProvider kEoB1MenuStringsDefeatDOSItalianProvider = { ARRAYSIZE(kEoB1MenuStringsDefeatDOSItalian), kEoB1MenuStringsDefeatDOSItalian };
+
+static const char *const kEoB1MenuYesNoStringsDOSItalian[2] = {
+ "S""\x10""",
+ "No"
+};
+
+static const StringListProvider kEoB1MenuYesNoStringsDOSItalianProvider = { ARRAYSIZE(kEoB1MenuYesNoStringsDOSItalian), kEoB1MenuYesNoStringsDOSItalian };
+
+static const char *const kEoB1CharGuiStringsHpDOSItalian[2] = {
+ "PF",
+ "%3d di %-3d"
+};
+
+static const StringListProvider kEoB1CharGuiStringsHpDOSItalianProvider = { ARRAYSIZE(kEoB1CharGuiStringsHpDOSItalian), kEoB1CharGuiStringsHpDOSItalian };
+
+static const char *const kEoB1CharGuiStringsWp1DOSItalian[2] = {
+ "FFSSS",
+ "ZAC"
+};
+
+static const StringListProvider kEoB1CharGuiStringsWp1DOSItalianProvider = { ARRAYSIZE(kEoB1CharGuiStringsWp1DOSItalian), kEoB1CharGuiStringsWp1DOSItalian };
+
+static const char *const kEoB1CharGuiStringsWrDOSItalian[4] = {
+ "FUORI",
+ "PORTATA",
+ "NESSUNA",
+ "MUNIZIONE"
+};
+
+static const StringListProvider kEoB1CharGuiStringsWrDOSItalianProvider = { ARRAYSIZE(kEoB1CharGuiStringsWrDOSItalian), kEoB1CharGuiStringsWrDOSItalian };
+
+static const char *const kEoB1CharGuiStringsSt1DOSItalian[6] = {
+ "Scambiando",
+ "MORTO",
+ "SVENUTO",
+ "(LENTEZZA)",
+ "AVVELENATO",
+ "PARALIZZATO"
+};
+
+static const StringListProvider kEoB1CharGuiStringsSt1DOSItalianProvider = { ARRAYSIZE(kEoB1CharGuiStringsSt1DOSItalian), kEoB1CharGuiStringsSt1DOSItalian };
+
+static const char *const kEoB1CharGuiStringsInDOSItalian[4] = {
+ "INFO PERSONAGGIO",
+ "CLASSE ARMATURA",
+ "ESP",
+ "LIV"
+};
+
+static const StringListProvider kEoB1CharGuiStringsInDOSItalianProvider = { ARRAYSIZE(kEoB1CharGuiStringsInDOSItalian), kEoB1CharGuiStringsInDOSItalian };
+
+static const char *const kEoB1CharStatusStrings7DOSItalian[1] = {
+ "%s ha perso la forza dei giganti.\r"
+};
+
+static const StringListProvider kEoB1CharStatusStrings7DOSItalianProvider = { ARRAYSIZE(kEoB1CharStatusStrings7DOSItalian), kEoB1CharStatusStrings7DOSItalian };
+
+static const char *const kEoB1CharStatusStrings81DOSItalian[1] = {
+ "%s risente degli effetti del veleno!\r"
+};
+
+static const StringListProvider kEoB1CharStatusStrings81DOSItalianProvider = { ARRAYSIZE(kEoB1CharStatusStrings81DOSItalian), kEoB1CharStatusStrings81DOSItalian };
+
+static const char *const kEoB1CharStatusStrings9DOSItalian[1] = {
+ "%s non ""\x0E"" pi""\x12"" paralizzato!\r"
+};
+
+static const StringListProvider kEoB1CharStatusStrings9DOSItalianProvider = { ARRAYSIZE(kEoB1CharStatusStrings9DOSItalian), kEoB1CharStatusStrings9DOSItalian };
+
+static const char *const kEoB1CharStatusStrings131DOSItalian[1] = {
+ "%s ""\x0E"" %s!\r"
+};
+
+static const StringListProvider kEoB1CharStatusStrings131DOSItalianProvider = { ARRAYSIZE(kEoB1CharStatusStrings131DOSItalian), kEoB1CharStatusStrings131DOSItalian };
+
+static const char *const kEoB1LevelGainStringsDOSItalian[1] = {
+ "\x06\x01""%s ha guadagnato un livello di esperienza.""\x06\x0F""\r"
+};
+
+static const StringListProvider kEoB1LevelGainStringsDOSItalianProvider = { ARRAYSIZE(kEoB1LevelGainStringsDOSItalian), kEoB1LevelGainStringsDOSItalian };
+
+static const char *const kEoB1BookNumbersDOSItalian[5] = {
+ "Primo",
+ "Secondo",
+ "Terzo",
+ "Quarto",
+ "Quinto"
+};
+
+static const StringListProvider kEoB1BookNumbersDOSItalianProvider = { ARRAYSIZE(kEoB1BookNumbersDOSItalian), kEoB1BookNumbersDOSItalian };
+
+static const char *const kEoB1MageSpellsListDOSItalian[26] = {
+ "",
+ "Armatura",
+ "Mani Brucianti",
+ "Individua Magico",
+ "Dardo Incantato",
+ "Lettura Magico",
+ "Scudo",
+ "Scarica Elettrica",
+ "Invisibilit""\x0C",
+ "Chiavistello",
+ "Freccia Acida M.",
+ "Nube Maleodorante",
+ "Dissolvi Magie",
+ "Palla di Fuoco",
+ "Freccia Infuocata",
+ "Velocit""\x0C",
+ "Blocca Persone",
+ "Invisibilit""\x0C"" 3m",
+ "Fulmine",
+ "Tocco del Vampiro",
+ "Paura",
+ "Tempesta Ghiaccio",
+ "Pelle di Pietra",
+ "Nube Assassina",
+ "Cono di Freddo",
+ "Blocca Mostri"
+};
+
+static const StringListProvider kEoB1MageSpellsListDOSItalianProvider = { ARRAYSIZE(kEoB1MageSpellsListDOSItalian), kEoB1MageSpellsListDOSItalian };
+
+static const char *const kEoB1ClericSpellsListDOSItalian[25] = {
+ "",
+ "Benedizione",
+ "Cura Fer.L.",
+ "Causa Fer.L.",
+ "Individua Magico",
+ "Protez.Male",
+ "Aiuto",
+ "Lama Fiammegg.",
+ "Blocca Persone",
+ "Rallenta Veleno",
+ "Creare Cibo",
+ "Dissolvi Magie",
+ "Paramenti Magici",
+ "Preghiera",
+ "Rimuovi Paralisi",
+ "Cura Fer.G.",
+ "Causa Fer.G.",
+ "Neutral.Veleni",
+ "Protez.Male 3m",
+ "Protez.Fulmine",
+ "Cura Fer.C.",
+ "Causa Fer.C.",
+ "Colonna di Fuoco",
+ "Rianimare Morti",
+ "Imposizione Mani"
+};
+
+static const StringListProvider kEoB1ClericSpellsListDOSItalianProvider = { ARRAYSIZE(kEoB1ClericSpellsListDOSItalian), kEoB1ClericSpellsListDOSItalian };
+
+static const char *const kEoB1SpellNamesDOSItalian[51] = {
+ "",
+ "armatura",
+ "mani brucianti",
+ "individuazione del magico",
+ "dardo incantato",
+ "scudo",
+ "scarica elettrica",
+ "invisibilit""\x0C",
+ "freccia acida di melf",
+ "nube maleodorante",
+ "dissolvi magie",
+ "palla di fuoco",
+ "freccia infuocata",
+ "velocit""\x0C",
+ "blocca persone",
+ "invisibilit""\x0C"",raggio 3m",
+ "fulmine",
+ "tocco del vampiro",
+ "paura",
+ "tempesta di ghiaccio",
+ "pelle di pietra",
+ "nube assassina",
+ "cono di freddo",
+ "blocca mostri",
+ "benedizione",
+ "cura ferite leggere",
+ "causa ferita leggere",
+ "individuazione del magico",
+ "protezione dal male",
+ "aiuto",
+ "lama fiammeggiante",
+ "blocca persone",
+ "rallenta veleno",
+ "creare cibo e acqua",
+ "dissolvi magie",
+ "paramenti magici",
+ "preghiera",
+ "rimuovi paralisi",
+ "cura ferite gravi",
+ "causa ferite gravi",
+ "neutralizzare veleni",
+ "protezione dal male,raggio 3m",
+ "protezione dal fulmine",
+ "cura ferite critiche",
+ "causa ferite critiche",
+ "colonna di fuoco",
+ "rianimare morti",
+ "imposizione delle mani",
+ "",
+ "",
+ ""
+};
+
+static const StringListProvider kEoB1SpellNamesDOSItalianProvider = { ARRAYSIZE(kEoB1SpellNamesDOSItalian), kEoB1SpellNamesDOSItalian };
+
+static const char *const kEoB1MagicStrings1DOSItalian[6] = {
+ "ANNULLA",
+ "ANNULLA",
+ "Questo incantesimo richiede una mano libera.\r",
+ "Non puoi avere due di questi incantesimi attivi.\r",
+ "%s lancia %s.\r",
+ "ok\r"
+};
+
+static const StringListProvider kEoB1MagicStrings1DOSItalianProvider = { ARRAYSIZE(kEoB1MagicStrings1DOSItalian), kEoB1MagicStrings1DOSItalian };
+
+static const char *const kEoB1MagicStrings2DOSItalian[3] = {
+ "nessun effetto\r",
+ "%s ""\x0E"" stato disintegrato!!\r",
+ "Il gruppo ""\x0E"" stato colpito da 'Morte'!\r"
+};
+
+static const StringListProvider kEoB1MagicStrings2DOSItalianProvider = { ARRAYSIZE(kEoB1MagicStrings2DOSItalian), kEoB1MagicStrings2DOSItalian };
+
+static const char *const kEoB1MagicStrings3DOSItalian[6] = {
+ "Su chi lanci l'incantesimo? ",
+ "\rok\r",
+ "\rAnnullato.\r",
+ "L'incantesimo di %s, %s svanisce.\r",
+ "%s ha mancato il mostro.\r",
+ "%s deve stare in prima linea per colpire!\r"
+};
+
+static const StringListProvider kEoB1MagicStrings3DOSItalianProvider = { ARRAYSIZE(kEoB1MagicStrings3DOSItalian), kEoB1MagicStrings3DOSItalian };
+
+static const char *const kEoB1MagicStrings4DOSItalian[1] = {
+ "nessun effetto.\r"
+};
+
+static const StringListProvider kEoB1MagicStrings4DOSItalianProvider = { ARRAYSIZE(kEoB1MagicStrings4DOSItalian), kEoB1MagicStrings4DOSItalian };
+
+static const char *const kEoB1MagicStrings6DOSItalian[1] = {
+ "%s ha gi""\x0C"" classe armatura base alta.\r"
+};
+
+static const StringListProvider kEoB1MagicStrings6DOSItalianProvider = { ARRAYSIZE(kEoB1MagicStrings6DOSItalian), kEoB1MagicStrings6DOSItalian };
+
+static const char *const kEoB1MagicStrings7DOSItalian[5] = {
+ "I",
+ "II",
+ "III",
+ "IV",
+ "V"
+};
+
+static const StringListProvider kEoB1MagicStrings7DOSItalianProvider = { ARRAYSIZE(kEoB1MagicStrings7DOSItalian), kEoB1MagicStrings7DOSItalian };
+
+static const char *const kEoB1MagicStrings8DOSItalian[3] = {
+ "Tutti gli incantesimi su %s si sono dissolti.\r",
+ "'Benedizione' ""\x0E"" gi""\x0C"" attiva sul gruppo.\r",
+ "'Aiuto' fallisce!\r"
+};
+
+static const StringListProvider kEoB1MagicStrings8DOSItalianProvider = { ARRAYSIZE(kEoB1MagicStrings8DOSItalian), kEoB1MagicStrings8DOSItalian };
+
+static const byte kEoB1ManDefDOSItalian[120] = {
+ 0x09, 0x0A, 0x02, 0x00, 0x09, 0x04, 0x03, 0x00,
+ 0x09, 0x06, 0x06, 0x00, 0x09, 0x03, 0x03, 0x00,
+ 0x09, 0x04, 0x02, 0x00, 0x09, 0x01, 0x02, 0x00,
+ 0x09, 0x05, 0x01, 0x00, 0x09, 0x09, 0x02, 0x00,
+ 0x09, 0x06, 0x02, 0x00, 0x23, 0x01, 0x05, 0x00,
+ 0x23, 0x02, 0x02, 0x00, 0x23, 0x03, 0x06, 0x00,
+ 0x23, 0x05, 0x01, 0x00, 0x23, 0x06, 0x03, 0x00,
+ 0x23, 0x07, 0x01, 0x00, 0x1A, 0x01, 0x01, 0x00,
+ 0x1A, 0x03, 0x02, 0x00, 0x1A, 0x06, 0x01, 0x00,
+ 0x24, 0x01, 0x03, 0x00, 0x24, 0x03, 0x04, 0x00,
+ 0x24, 0x03, 0x01, 0x00, 0x02, 0x04, 0x03, 0x00,
+ 0x02, 0x03, 0x03, 0x00, 0x02, 0x05, 0x03, 0x00,
+ 0x01, 0x01, 0x01, 0x00, 0x01, 0x05, 0x03, 0x00,
+ 0x01, 0x04, 0x03, 0x00, 0x0C, 0x02, 0x01, 0x00,
+ 0x0C, 0x03, 0x03, 0x00, 0x0C, 0x04, 0x02, 0x00
+};
+
+static const ByteProvider kEoB1ManDefDOSItalianProvider = { ARRAYSIZE(kEoB1ManDefDOSItalian), kEoB1ManDefDOSItalian };
+
+static const char *const kEoB1ManWordDOSItalian[31] = {
+ "attacks",
+ "short",
+ "line",
+ "weapons",
+ "certain",
+ "rank",
+ "rear",
+ "can",
+ "away",
+ "dungeon",
+ "cursor",
+ "feature",
+ "information",
+ "displayed",
+ "below",
+ "around",
+ "carefree",
+ "gnomes",
+ "clerics",
+ "mystic",
+ "pummel",
+ "fitness",
+ "using",
+ "toughness",
+ "wealth",
+ "wizard",
+ "officials",
+ "hound",
+ "disturbing",
+ "flaming",
+ ""
+};
+
+static const StringListProvider kEoB1ManWordDOSItalianProvider = { ARRAYSIZE(kEoB1ManWordDOSItalian), kEoB1ManWordDOSItalian };
+
+static const char *const kEoB1ManPromptDOSItalian[1] = {
+ "\r\r\r\rOn the page with this symbol...\r\rFind line %d\rEnter word %d\r"
+};
+
+static const StringListProvider kEoB1ManPromptDOSItalianProvider = { ARRAYSIZE(kEoB1ManPromptDOSItalian), kEoB1ManPromptDOSItalian };
+
+static const char *const kEoB1MonsterDistAttStringsDOSItalian[5] = {
+ "%s ""\x0E"" stato colpito da 'Causa Ferite Gravi'\r",
+ "Il gruppo ""\x0E"" stato colpito da 'Flagello Mentale'!\r",
+ "paralizzato",
+ "avvelenato",
+ "paralizzato"
+};
+
+static const StringListProvider kEoB1MonsterDistAttStringsDOSItalianProvider = { ARRAYSIZE(kEoB1MonsterDistAttStringsDOSItalian), kEoB1MonsterDistAttStringsDOSItalian };
+
diff --git a/devtools/credits.pl b/devtools/credits.pl
index ce2ed0da74..0960011802 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -1036,6 +1036,9 @@ begin_credits("Credits");
begin_section("Danish");
add_person("Steffen Nyeland", "", "");
end_section();
+ begin_section("Dutch");
+ add_person("Ben Castricum", "", "");
+ end_section();
begin_section("Finnish");
add_person("Toni Saarela", "catnose", "");
end_section();
diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt
index f0cb577237..acee5d87b3 100644
--- a/devtools/scumm-md5.txt
+++ b/devtools/scumm-md5.txt
@@ -21,9 +21,6 @@
# - Source
# -> The source of the information, useful in case it has to be verified
#
-# TODO: We really should have a separate target for "Misc FM-TOWNS demos", so
-# that their description in the launcher doesn't start with "Zak McKracken"
-#
#
# Table of email addresse of contributors: Sometimes we need to add new
# information to this table, or need to verify the correctness of an
@@ -516,7 +513,7 @@ freddi Freddi Fish 1: The Case of the Missing Kelp Seeds
freddi2 Freddi Fish 2: The Case of the Haunted Schoolhouse
0a295b80f9a9edf818e8e161a0e83830 -1 fr All HE 80 - - gist974, ThierryFR
fce4b8010704b103acfeea9413788f32 -1 de All HE 80 - - Joachim Eberhard
- 8e9830a6f2702be5b22c8fa0a6aaf977 -1 nl Mac HE 80 - - daniel9
+ 8e9830a6f2702be5b22c8fa0a6aaf977 65305 nl All HE 80 - - daniel9
5057fb0e99e5aa29df1836329232f101 -1 All Windows HE 80 - - sev
ac62d50e39492ee3738b4e83a5ac780f -1 nl Windows HE 80 - - joostp
151071053a1d0021198216713939521d -1 en Windows HE 80 - - vampir_raziel
@@ -577,6 +574,7 @@ freddicove Freddi Fish 5: The Case of the Creature of Coral Cove
590e6546aacd0d374b7f3a4f53013ab1 -1 All All - - - cyx
21abe302e1b1e2b66d6f5c12e241ebfd -1 ru Windows unenc Unencrypted - sev
b8955d7d23b4972229060d1592489fef -1 nl All HE 100 - - adutchguy, daniel9
+ 8f345db2f3f5a25ed6305001957e6f72 41182 nl All HE 100 - - Ben Castricum
b100abf7ff83146df50db78dbd5e9cfa -1 fr All HE 100 - - alamaz, gist974
4ce2d5b355964bbcb5e5ce73236ef868 -1 ru Windows HE 100 - - sev
@@ -678,7 +676,7 @@ pajama3 Pajama Sam 3: You Are What You Eat From Your Head to Your Feet
f7711f9264d4d43c2a1518ec7c10a607 79382 us All - - - Kirben
2e8a1f76ea33bc5e04347646feee173d -1 de All - - - Joachim Eberhard
aefa244ea034b7cd2041f0a44be7d9ba -1 en Mac - - - pix_climber
- 06c3cf4f31daad8b1cd93153491db9e6 -1 nl Mac - - - daniel9
+ 06c3cf4f31daad8b1cd93153491db9e6 79382 nl All - - - daniel9
7410a8ba9795020cd42f171c4320659e -1 fr Windows - - - gist974
20176076d708bf14407bcc9bdcd7a418 -1 ru Windows - - - sev
@@ -820,7 +818,7 @@ balloon Putt-Putt and Pep's Balloon-O-Rama
bab0fb81dcb12b8930c5d850b8f2a7de 12800 de Windows HE 80 - - George Kormendi
145bd3373574feb668cc2eea2ec6cf86 -1 ru Windows HE 80 - - sev
27b2ef1653089fe5b897d9cc89ce784f -1 ru Windows HE 80 - - George Kormendi
- 2232b0b9411575b1f9961713ebc9de61 -1 All Windows HE 80 - ES and NL exiltd (ES), Ben Castricum (NL)
+ 2232b0b9411575b1f9961713ebc9de61 -1 nl Windows HE 80 - - Ben Castricum
a22af0ad0e3126d19d22707b0267a37d -1 nl Windows HE 80 - - Ben Castricum
a56a05c6b865b9956639f8c51269e5ab -1 nl Mac HE 80 - - Ben Castricum
d7b247c26bf1f01f8f7daf142be84de3 -1 en Windows HE 99 Updated - iziku
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat
index 37b3b0ef0b..3ad01b868f 100644
--- a/dists/engine-data/kyra.dat
+++ b/dists/engine-data/kyra.dat
Binary files differ
diff --git a/dists/gcw0/default.gcw0.desktop b/dists/gcw0/default.gcw0.desktop
new file mode 100644
index 0000000000..46bd2be092
--- /dev/null
+++ b/dists/gcw0/default.gcw0.desktop
@@ -0,0 +1,16 @@
+[Desktop Entry]
+Name=ScummVM
+Comment=Interpreter for several adventure games
+Comment[pl]=Interpreter graficznych gier przygodowych
+Comment[sv]=Tolk fУЖr flera УЄventyrsspel
+Comment[he]=зЄзЈзЉзŸ зœзžзЁзЄзЈ зžзЉз—зЇз™ з”зЈзЄзЊзЇзз•зЊ
+Comment[de]=Interpreter fУМr diverse Abenteuerspiele
+Comment[es]=IntУЉrprete para varias aventuras grУЁficas
+Comment[ca]=IntУЈrpret per diverses aventures grУ fiques
+Exec=scummvm.sh
+Icon=scummvm
+Terminal=false
+Type=Application
+Categories=games
+StartupNotify=false
+X-OD-Manual=README
diff --git a/dists/gcw0/opk_make.sh b/dists/gcw0/opk_make.sh
new file mode 100755
index 0000000000..b1bfd03efb
--- /dev/null
+++ b/dists/gcw0/opk_make.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+#
+# opk_make.sh
+#
+# This script is meant to ease generation of a opk file. Please consult the output
+# when running --help for a list of available parameters and an explaination of
+# those.
+#
+# Required tools when running the script:
+# bash
+# echo, cat, mv, rm, mksquashfs
+
+check_for_tool()
+{
+ which $1 &> /dev/null
+ if [ "$?" -ne "0" ];
+ then
+ cecho "ERROR: Could not find the program '$1'. Please make sure
+that it is available in your PATH since it is required to complete your request." $red
+ exit 1
+ fi
+}
+
+print_help()
+{
+ cat << EOSTREAM
+opk_make.sh - A script to package "something" into a OPK.
+
+Usage:
+ $(basename ${0}) {--directory|-d} <folder> {--opk|-o} <file> [{--help|-h}]
+
+
+Switches:
+ --directory / -d Sets the folder that is to be used for the resulting opk
+ to <folder>. This option is mandatory for the script to
+ function correctly.
+
+ --help / -h Displays this help text.
+
+ --opkname / -o Sets the output filename of the resulting opk to <file>.
+ This option is mandatory for the script to function
+ correctly.
+
+A version >=4.0 of squashfs is required to be available in your PATH.
+EOSTREAM
+}
+
+
+# Parse command line parameters
+while [ "${1}" != "" ]; do
+ if [ "${1}" = "--directory" ] || [ "${1}" = "-d" ];
+ then
+ FOLDER=$2
+ shift 2
+ elif [ "${1}" = "--help" ] || [ "${1}" = "-h" ];
+ then
+ print_help
+ exit 0
+ elif [ "${1}" = "--opkname" ] || [ "${1}" = "-o" ];
+ then
+ OPKNAME=$2
+ shift 2
+ else
+ echo "ERROR: '$1' is not a known argument. Printing --help and aborting."
+ print_help
+ exit 1
+ fi
+done
+
+
+# Probe if required variables were set
+echo "Checking if all required variables were set."
+if [ ! $OPKNAME ] || [ ! $FOLDER ];
+then
+ echo "ERROR: Not all required options were set! Please see the --help information below."
+ print_help
+ exit 1
+else
+ echo "OPKNAME set to '$OPKNAME'."
+fi
+# Check if the selected folder actually exists
+if [ ! -d $FOLDER ];
+then
+ echo "ERROR: '$FOLDER' doesn't exist or is not a folder."
+ exit 1
+else
+ echo "FOLDER set to '$FOLDER'."
+fi
+
+# Make iso from folder
+echo "Creating an iso file based on '$FOLDER'."
+
+check_for_tool mksquashfs
+if [ $(mksquashfs -version | awk 'BEGIN{r=0} $3>=4{r=1} END{print r}') -eq 0 ];
+then
+ echo "ERROR: Your squashfs version is older then version 4, please upgrade to 4.0 or later"
+ exit 1
+fi
+mksquashfs $FOLDER $OPKNAME.opk -noappend -no-exports -no-xattrs
+
+# Final message
+if [ -f $OPKNAME ];
+then
+ echo "Successfully finished creating the opk '$OPKNAME'."
+else
+ echo "There seems to have been a problem and '$OPKNAME' was not created. Please check
+the output above for any error messages. A possible cause for this is that there was
+not enough space available."
+ exit 1
+fi
+
diff --git a/dists/gcw0/scummvm.png b/dists/gcw0/scummvm.png
new file mode 100644
index 0000000000..128e59efc4
--- /dev/null
+++ b/dists/gcw0/scummvm.png
Binary files differ
diff --git a/dists/gcw0/scummvm.sh b/dists/gcw0/scummvm.sh
new file mode 100755
index 0000000000..c12a3030cc
--- /dev/null
+++ b/dists/gcw0/scummvm.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cd `dirname $0`
+
+if [ ! -f $HOME/.scummvmrc ] ; then
+ cp ./scummvmrc $HOME/.scummvmrc
+fi
+
+exec ./scummvm
diff --git a/dists/gcw0/scummvmrc b/dists/gcw0/scummvmrc
new file mode 100644
index 0000000000..c2087c222a
--- /dev/null
+++ b/dists/gcw0/scummvmrc
@@ -0,0 +1,9 @@
+[scummvm]
+fullscreen=true
+gfx_mode=1x
+aspect_ratio=true
+themepath=./themes
+browser_lastpath=/media
+extrapath=./engine-data
+pluginspath=./plugins
+joystick_num=0
diff --git a/engines/cge/POTFILES b/engines/cge/POTFILES
new file mode 100644
index 0000000000..55430683c3
--- /dev/null
+++ b/engines/cge/POTFILES
@@ -0,0 +1,2 @@
+engines/cge/detection.cpp
+
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index 022ff4df95..da5eb2b1f2 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -28,35 +28,19 @@
#include "base/plugins.h"
#include "graphics/thumbnail.h"
#include "cge/cge.h"
+#include "cge/fileio.h"
namespace CGE {
-struct CgeGameDescription {
- ADGameDescription desc;
-};
-
#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
-} // End of namespace CGE
-
static const PlainGameDescriptor CGEGames[] = {
{ "soltys", "Soltys" },
{ 0, 0 }
};
-namespace CGE {
-
static const ADGameDescription gameDescriptions[] = {
{
- "soltys", "",
- {
- {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
- {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437572},
- AD_LISTEND
- },
- Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
- },
- {
"soltys", "Freeware",
{
{"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
@@ -114,12 +98,6 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
-static const ADFileBasedFallback fileBasedFallback[] = {
- { &gameDescriptions[0], { "vol.cat", "vol.dat", 0 } },
- { 0, { 0 } }
-};
-} // End of namespace CGE
-
static const ADExtraGuiOptionsMap optionsList[] = {
{
GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
@@ -136,14 +114,10 @@ static const ADExtraGuiOptionsMap optionsList[] = {
class CGEMetaEngine : public AdvancedMetaEngine {
public:
- CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames, optionsList) {
+ CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames, optionsList) {
_singleid = "soltys";
}
- virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
- return detectGameFilebased(allFiles, fslist, CGE::fileBasedFallback);
- }
-
virtual const char *getName() const {
return "CGE";
}
@@ -152,6 +126,7 @@ public:
return "Soltys (c) 1994-1996 L.K. Avalon";
}
+ virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const;
virtual bool hasFeature(MetaEngineFeature f) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
virtual int getMaximumSaveSlot() const;
@@ -160,6 +135,44 @@ public:
virtual void removeSaveState(const char *target, int slot) const;
};
+static const ADFileBasedFallback fileBasedFallback[] = {
+ { &gameDescriptions[0], { "vol.cat", "vol.dat", 0 } },
+ { 0, { 0 } }
+};
+
+static ADGameDescription s_fallbackDesc = {
+ "Soltys",
+ "Unknown version",
+ AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
+ Common::UNK_LANG,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+};
+
+const ADGameDescription *CGEMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ ADFilePropertiesMap filesProps;
+
+ const ADGameDescription *game;
+ game = detectGameFilebased(allFiles, fslist, CGE::fileBasedFallback, &filesProps);
+
+ if (!game)
+ return nullptr;
+
+ SearchMan.clear();
+ SearchMan.addDirectory(fslist.begin()->getParent().getPath(), fslist.begin()->getParent());
+ ResourceManager *resman;
+ resman = new ResourceManager();
+ bool result = resman->exist("CGE.SAY");
+ delete resman;
+
+ if (!result)
+ return nullptr;
+
+ reportUnknown(fslist.begin()->getParent(), filesProps);
+ return &s_fallbackDesc;
+}
+
bool CGEMetaEngine::hasFeature(MetaEngineFeature f) const {
return
(f == kSupportsListSaves) ||
@@ -269,9 +282,10 @@ bool CGEMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD
}
return desc != 0;
}
+} // End of namespace CGE
#if PLUGIN_ENABLED_DYNAMIC(CGE)
- REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine);
+REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGE::CGEMetaEngine);
#else
- REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine);
+REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGE::CGEMetaEngine);
#endif
diff --git a/engines/cge/fileio.cpp b/engines/cge/fileio.cpp
index d910e275eb..df5c31d367 100644
--- a/engines/cge/fileio.cpp
+++ b/engines/cge/fileio.cpp
@@ -77,7 +77,7 @@ ResourceManager::ResourceManager() {
_buff[i]._page = new BtPage;
_buff[i]._pageNo = kBtValNone;
_buff[i]._index = -1;
- assert(_buff[i]._page != NULL);
+ assert(_buff[i]._page != nullptr);
}
}
@@ -118,10 +118,16 @@ uint16 ResourceManager::read(byte *buf, uint16 length) {
BtPage *ResourceManager::getPage(int level, uint16 pageId) {
debugC(1, kCGEDebugFile, "ResourceManager::getPage(%d, %d)", level, pageId);
+ if (level >= kBtLevel)
+ return nullptr;
+
if (_buff[level]._pageNo != pageId) {
int32 pos = pageId * kBtSize;
_buff[level]._pageNo = pageId;
- assert(_catFile->size() > pos);
+
+ if (_catFile->size() <= pos)
+ return nullptr;
+
// In the original, there was a check verifying if the
// purpose was to write a new file. This should only be
// to create a new file, thus it was removed.
@@ -146,11 +152,13 @@ BtKeypack *ResourceManager::find(const char *key) {
uint16 nxt = kBtValRoot;
while (!_catFile->eos()) {
BtPage *pg = getPage(lev, nxt);
+ if (!pg)
+ return nullptr;
+
// search
if (pg->_header._down != kBtValNone) {
int i;
for (i = 0; i < pg->_header._count; i++) {
- // Does this work, or does it have to compare the entire buffer?
if (scumm_strnicmp((const char *)key, (const char*)pg->_inner[i]._key, kBtKeySize) < 0)
break;
}
@@ -167,13 +175,17 @@ BtKeypack *ResourceManager::find(const char *key) {
return &pg->_leaf[i];
}
}
- return NULL;
+ return nullptr;
}
bool ResourceManager::exist(const char *name) {
debugC(1, kCGEDebugFile, "ResourceManager::exist(%s)", name);
- return scumm_stricmp(find(name)->_key, name) == 0;
+ BtKeypack* result = find(name);
+ if (!result)
+ return false;
+
+ return scumm_stricmp(result->_key, name) == 0;
}
uint16 ResourceManager::catRead(byte *buf, uint16 length) {
diff --git a/engines/cge2/POTFILES b/engines/cge2/POTFILES
new file mode 100644
index 0000000000..1e904763ec
--- /dev/null
+++ b/engines/cge2/POTFILES
@@ -0,0 +1 @@
+engines/cge2/detection.cpp
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index 8b51dda75e..37d87ba09c 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -76,9 +76,10 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
_vol[i] = nullptr;
_eventManager = nullptr;
_map = nullptr;
+ _console = nullptr;
_quitFlag = false;
_bitmapPalette = nullptr;
- _startupMode = 1;
+ _gamePhase = kPhaseIntro;
_now = 1;
_sex = 1;
_mouseTop = kWorldHeight / 3;
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
index 8e94683824..50b418f294 100644
--- a/engines/cge2/cge2.h
+++ b/engines/cge2/cge2.h
@@ -93,10 +93,7 @@ struct SavegameHeader;
#define kPowerRef 123
#define kDvolRef 124
#define kMvolRef 125
-#define kRef 126
#define kBusyRef 127
-#define kCapRef 128
-#define kVoxRef 129
#define kOffUseCount 130
#define kOffUseText 131
@@ -124,6 +121,8 @@ struct SavegameHeader {
enum ColorBank { kCBRel, kCBStd, kCBSay, kCBInf, kCBMnu, kCBWar };
+enum GamePhase { kPhaseInGame, kPhaseIntro, kPhaseOver };
+
// our engine debug channels
enum {
kCGE2DebugOpcode = 1 << 0
@@ -282,7 +281,7 @@ public:
bool _quitFlag;
Dac *_bitmapPalette;
- int _startupMode;
+ GamePhase _gamePhase; // Original name: startupmode
int _now;
int _sex;
int _mouseTop;
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp
index c52a354f9e..3e3d615a91 100644
--- a/engines/cge2/cge2_main.cpp
+++ b/engines/cge2/cge2_main.cpp
@@ -49,13 +49,13 @@ void System::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) {
// The original was calling keyClick()
// The sound is uselessly annoying and noisy, so it has been removed
_vm->killText();
- if (_vm->_startupMode == 1) {
+ if (_vm->_gamePhase == kPhaseIntro) {
_vm->_commandHandler->addCommand(kCmdClear, -1, 0, nullptr);
return;
}
}
} else {
- if (_vm->_startupMode)
+ if (_vm->_gamePhase != kPhaseInGame)
return;
_vm->_infoLine->setText(nullptr);
@@ -450,7 +450,7 @@ void CGE2Engine::sceneUp(int cav) {
_dark = false;
- if (!_startupMode)
+ if (_gamePhase == kPhaseInGame)
_mouse->on();
feedSnail(_vga->_showQ->locate(bakRef + 255), kNear, _heroTab[_sex]->_ptr);
@@ -522,7 +522,7 @@ void CGE2Engine::showBak(int ref) {
}
void CGE2Engine::mainLoop() {
- if (_startupMode == 0)
+ if (_gamePhase == kPhaseInGame)
checkSounds();
_vga->show();
@@ -722,10 +722,9 @@ void CGE2Engine::loadTab() {
if (_resman->exist(kTabName)) {
EncryptedStream f(this, kTabName);
- uint32 v;
for (int i = 0; i < kSceneMax; i++) {
- v = f.readUint32LE();
+ uint32 v = f.readUint32LE();
_eyeTab[i]->_x = FXP(v >> 8, static_cast<int>((int8)(v & 0xff)));
v = f.readUint32LE();
@@ -751,7 +750,7 @@ void CGE2Engine::cge2_main() {
if (_text->getText(255) != nullptr) {
runGame();
- _startupMode = 2;
+ _gamePhase = kPhaseOver;
}
_vga->sunset();
@@ -850,7 +849,7 @@ void Sprite::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) {
if ((mask & kEventAttn) != 0)
return;
- if (!_vm->_startupMode)
+ if (_vm->_gamePhase == kPhaseInGame)
_vm->_infoLine->setText(name());
if (_ref < 0)
diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp
index bef640658b..6e1b93d0b8 100644
--- a/engines/cge2/detection.cpp
+++ b/engines/cge2/detection.cpp
@@ -26,6 +26,7 @@
*/
#include "cge2/cge2.h"
+#include "cge2/fileio.h"
#include "engines/advancedDetector.h"
#include "common/translation.h"
#include "graphics/surface.h"
@@ -60,6 +61,26 @@ static const ADGameDescription gameDescriptions[] = {
Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
},
+ {
+ "sfinx", "Freeware v0.3",
+ {
+ {"vol.cat", 0, "f158e469dccbebc5a632eb848df89779", 129024},
+ {"vol.dat", 0, "d40a6b4ae173d6930be54ba56bee15d5", 34183430},
+ AD_LISTEND
+ },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ },
+
+ {
+ "sfinx", "Freeware v1.0",
+ {
+ {"vol.cat", 0, "f158e469dccbebc5a632eb848df89779", 129024},
+ {"vol.dat", 0, "d40a6b4ae173d6930be54ba56bee15d5", 34183443},
+ AD_LISTEND
+ },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+ },
+
AD_TABLE_END_MARKER
};
@@ -91,16 +112,55 @@ public:
return "Sfinx (c) 1994-1997 Janus B. Wisniewski and L.K. Avalon";
}
+ virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
virtual bool hasFeature(MetaEngineFeature f) const;
virtual int getMaximumSaveSlot() const;
virtual SaveStateList listSaves(const char *target) const;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
virtual void removeSaveState(const char *target, int slot) const;
+};
- const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const;
+static const ADFileBasedFallback fileBasedFallback[] = {
+ { &gameDescriptions[0], { "vol.cat", "vol.dat", 0 } },
+ { 0, { 0 } }
};
+static ADGameDescription s_fallbackDesc = {
+ "Sfinx",
+ "Unknown version",
+ AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
+ Common::UNK_LANG,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
+};
+
+// This fallback detection looks identical to the one used for CGE. In fact, the difference resides
+// in the ResourceManager which handles a different archive format. The rest of the detection is identical.
+const ADGameDescription *CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ ADFilePropertiesMap filesProps;
+
+ const ADGameDescription *game;
+ game = detectGameFilebased(allFiles, fslist, CGE2::fileBasedFallback, &filesProps);
+
+ if (!game)
+ return 0;
+
+ SearchMan.clear();
+ SearchMan.addDirectory(fslist.begin()->getParent().getPath(), fslist.begin()->getParent());
+ ResourceManager *resman;
+ resman = new ResourceManager();
+ bool result = resman->exist("CGE.SAY");
+ delete resman;
+
+ if (!result)
+ return 0;
+
+ reportUnknown(fslist.begin()->getParent(), filesProps);
+ return &s_fallbackDesc;
+}
+
bool CGE2MetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
if (desc)
*engine = new CGE2::CGE2Engine(syst, desc);
@@ -118,31 +178,6 @@ bool CGE2MetaEngine::hasFeature(MetaEngineFeature f) const {
(f == kSupportsLoadingDuringStartup);
}
-const ADGameDescription *CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
- static ADGameDescription desc;
-
- for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- if (file->isDirectory())
- continue;
-
- if (file->getName().equalsIgnoreCase("lang.eng")) {
- Common::File dataFile;
- if (!dataFile.open(*file))
- continue;
-
- desc.gameid = "sfinx";
- desc.extra = "Translation Alpha v0.2";
- desc.language = Common::EN_ANY;
- desc.platform = Common::kPlatformDOS;
- desc.flags = ADGF_NO_FLAGS;
- desc.guioptions = GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF);
-
- return (const ADGameDescription *)&desc;
- }
- }
- return 0;
-}
-
int CGE2MetaEngine::getMaximumSaveSlot() const {
return 99;
}
diff --git a/engines/cge2/fileio.cpp b/engines/cge2/fileio.cpp
index 6f8009716b..acb5bb870f 100644
--- a/engines/cge2/fileio.cpp
+++ b/engines/cge2/fileio.cpp
@@ -116,7 +116,10 @@ BtPage *ResourceManager::getPage(int level, uint16 pageId) {
if (_buff[level]._pageNo != pageId) {
int32 pos = pageId * kBtSize;
_buff[level]._pageNo = pageId;
- assert(_catFile->size() > pos);
+
+ if (_catFile->size() <= pos)
+ return nullptr;
+
// In the original, there was a check verifying if the
// purpose was to write a new file. This should only be
// to create a new file, thus it was removed.
@@ -139,6 +142,9 @@ BtKeypack *ResourceManager::find(const char *key) {
uint16 nxt = kBtValRoot;
while (!_catFile->eos()) {
BtPage *pg = getPage(lev, nxt);
+ if (!pg)
+ return nullptr;
+
// search
if (pg->_header._down != kBtValNone) {
int i;
@@ -170,7 +176,11 @@ BtKeypack *ResourceManager::find(const char *key) {
}
bool ResourceManager::exist(const char *name) {
- return scumm_stricmp(find(name)->_key, name) == 0;
+ BtKeypack *result = find(name);
+ if (!result)
+ return false;
+
+ return scumm_stricmp(result->_key, name) == 0;
}
uint16 ResourceManager::catRead(byte *buf, uint16 length) {
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp
index 86bd7ac953..225df54bd1 100644
--- a/engines/cge2/hero.cpp
+++ b/engines/cge2/hero.cpp
@@ -31,13 +31,14 @@
namespace CGE2 {
-Hero::Hero(CGE2Engine *vm)
- : Sprite(vm), _contact(nullptr), _dir(kNoDir),
- _curDim(0), _tracePtr(-1), _ignoreMap(false), _maxDist(0) {
+Hero::Hero(CGE2Engine *vm) : Sprite(vm), _contact(nullptr), _dir(kNoDir),
+ _curDim(0), _tracePtr(-1), _ignoreMap(false), _maxDist(0) {
- for (int i = 0; i < kDimMax; i++) {
+ for (int i = 0; i < kDimMax; i++)
_dim[i] = nullptr;
- }
+
+ _reachStart = _reachCycle = _sayStart = _funStart = 0;
+ _funDel0 = _funDel = 0;
}
Hero::~Hero() {
@@ -120,7 +121,8 @@ Sprite *Hero::expand() {
break;
case kIdName:
Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
- for (p = tmpStr; *p != '='; p++); // We search for the =
+ for (p = tmpStr; *p != '='; p++) // We search for the =
+ ;
setName(_vm->tail(p));
break;
default:
@@ -201,7 +203,7 @@ Sprite *Hero::expand() {
delete[] text;
int i = stepSize() / 2;
- _maxDist = sqrt(double(i * i * 2));
+ _maxDist = (int)sqrt(double(i * i * 2));
setCurrent();
return this;
@@ -413,7 +415,7 @@ void Hero::fun() {
}
int Hero::len(V2D v) {
- return sqrt(double(v.x * v.x + v.y * v.y));
+ return (int)sqrt(double(v.x * v.x + v.y * v.y));
}
bool Hero::findWay(){
diff --git a/engines/cge2/map.cpp b/engines/cge2/map.cpp
index 1ed0ea7daf..8c1f00048f 100644
--- a/engines/cge2/map.cpp
+++ b/engines/cge2/map.cpp
@@ -42,7 +42,7 @@ void Map::clear() {
void Map::load(int scene) {
clear();
- char fname[] = "%.2d.MAP\0";
+ const char *fname = "%.2d.MAP";
Common::String fileName = Common::String::format(fname, scene);
if (!_vm->_resman->exist(fileName.c_str()))
return;
diff --git a/engines/cge2/saveload.cpp b/engines/cge2/saveload.cpp
index c9cedff83f..fd60422dff 100644
--- a/engines/cge2/saveload.cpp
+++ b/engines/cge2/saveload.cpp
@@ -45,7 +45,7 @@ namespace CGE2 {
#define kBadSVG 99
bool CGE2Engine::canSaveGameStateCurrently() {
- return (_startupMode == 0) && _mouse->_active &&
+ return (_gamePhase == kPhaseInGame) && _mouse->_active &&
_commandHandler->idle() && (_soundStat._wait == nullptr);
}
@@ -77,7 +77,7 @@ void CGE2Engine::saveGame(int slotNumber, const Common::String &desc) {
}
bool CGE2Engine::canLoadGameStateCurrently() {
- return (_startupMode == 0) && _mouse->_active;
+ return (_gamePhase == kPhaseInGame) && _mouse->_active;
}
Common::Error CGE2Engine::loadGameState(int slot) {
diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp
index 0bf63839e9..8e1ddf2d9b 100644
--- a/engines/cge2/snail.cpp
+++ b/engines/cge2/snail.cpp
@@ -62,7 +62,7 @@ void CommandHandler::runCommand() {
if (_vm->_fx->exist(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0])) {
int16 oldRepeat = _vm->_sound->getRepeat();
_vm->_sound->setRepeat(1);
- _vm->_sound->play(Audio::Mixer::kSFXSoundType, _vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span);
+ _vm->_sound->play(Audio::Mixer::kSpeechSoundType, _vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span);
_vm->_sound->setRepeat(oldRepeat);
return;
}
diff --git a/engines/cge2/sound.cpp b/engines/cge2/sound.cpp
index 32f94b17b9..57ec5983e8 100644
--- a/engines/cge2/sound.cpp
+++ b/engines/cge2/sound.cpp
@@ -143,9 +143,9 @@ void Fx::clear() {
}
Common::String Fx::name(int ref, int sub) {
- char fxname[] = "%.2dfx%.2d.WAV\0";
- char subName[] = "%.2dfx%.2d?.WAV\0";
- char *p = (sub) ? subName : fxname;
+ const char *fxname = "%.2dfx%.2d.WAV";
+ const char *subName = "%.2dfx%.2d?.WAV";
+ const char *p = (sub) ? subName : fxname;
Common::String filename = Common::String::format(p, ref >> 8, ref & 0xFF);
if (sub)
filename.setChar('@' + sub, 6);
diff --git a/engines/cge2/toolbar.cpp b/engines/cge2/toolbar.cpp
index dbbed3480e..0cd220c984 100644
--- a/engines/cge2/toolbar.cpp
+++ b/engines/cge2/toolbar.cpp
@@ -35,11 +35,11 @@
namespace CGE2 {
-#define kSoundNumtoStateRate 25.7
+#define kSoundNumToStateRate 25.7
// == 257 / 10; where 10 equals to the volume switches' number of states [0..9]
// and ScummVM has a scale of 257 different values for setting sounds.
-#define kSoundStatetoNumRate 28.45
+#define kSoundStateToNumRate 28.45
// == 256 / 9 + 0.1; where 256 is the positive range of numbers we can set the volume to
// and the 10 states of a switch cut this range up to 9 equally big parts.
// We don't take into account 0 regarding the 256 different values (it would be the 257th),
@@ -120,7 +120,7 @@ void CGE2Engine::setVolume(int idx, int cnt) {
int p = _vol[idx]->_seqPtr + cnt;
if ((p >= 0) && (p < _vol[idx]->_seqCnt)) {
_vol[idx]->step(p);
- int newVolume = p * kSoundStatetoNumRate;
+ int newVolume = (int)(p * kSoundStateToNumRate);
switch (idx) {
case 0:
_oldSfxVolume = ConfMan.getInt("sfx_volume");
@@ -140,11 +140,11 @@ void CGE2Engine::setVolume(int idx, int cnt) {
void CGE2Engine::checkVolumeSwitches() {
int musicVolume = ConfMan.getInt("music_volume");
if (musicVolume != _oldMusicVolume)
- _vol[1]->step(musicVolume / kSoundNumtoStateRate);
+ _vol[1]->step((int)(musicVolume / kSoundNumToStateRate));
int sfxVolume = ConfMan.getInt("sfx_volume");
if (sfxVolume != _oldSfxVolume)
- _vol[0]->step(sfxVolume / kSoundNumtoStateRate);
+ _vol[0]->step((int)(sfxVolume / kSoundNumToStateRate));
}
void CGE2Engine::switchCap() {
@@ -182,7 +182,7 @@ void CGE2Engine::initToolbar() {
_infoLine->setText(nullptr);
_vga->_showQ->insert(_infoLine);
- _startupMode = 0;
+ _gamePhase = kPhaseInGame;
_mouse->center();
_mouse->off();
_mouse->on();
@@ -208,14 +208,13 @@ void CGE2Engine::initToolbar() {
void CGE2Engine::initVolumeSwitch(Sprite *volSwitch, int val) {
int state = 0;
- state = val / kSoundNumtoStateRate;
+ state = (int)(val / kSoundNumToStateRate);
volSwitch->step(state);
}
void CGE2Engine::checkMute() {
bool mute = ConfMan.getBool("mute");
- bool mutedChanged = mute != _muteAll;
- if (mutedChanged) {
+ if (mute != _muteAll) {
switchMusic();
switchVox();
_muteAll = mute;
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
index db96682237..227633579e 100644
--- a/engines/cge2/vga13h.cpp
+++ b/engines/cge2/vga13h.cpp
@@ -371,7 +371,8 @@ Sprite *Sprite::expand() {
break;
case kIdName:
Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr));
- for (p = tmpStr; *p != '='; p++); // We search for the =
+ for (p = tmpStr; *p != '='; p++) // We search for the =
+ ;
setName(_vm->tail(p));
break;
default:
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 797b6d94b0..c72d77c281 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -41,20 +41,6 @@
namespace Drascula {
-struct GameSettings {
- const char *gameid;
- const char *description;
- byte id;
- uint32 features;
- const char *detectname;
-};
-
-static const GameSettings drasculaSettings[] = {
- {"drascula", "Drascula game", 0, 0, 0},
-
- {NULL, NULL, 0, 0, NULL}
-};
-
DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
_charMap = 0;
_itemLocations = 0;
diff --git a/engines/dreamweb/POTFILES b/engines/dreamweb/POTFILES
index d05d239bb7..64fb20db67 100644
--- a/engines/dreamweb/POTFILES
+++ b/engines/dreamweb/POTFILES
@@ -1 +1,3 @@
engines/dreamweb/detection.cpp
+engines/dreamweb/saveload.cpp
+
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp
index 1431ceffba..8ec05caaff 100644
--- a/engines/fullpipe/scenes/scene27.cpp
+++ b/engines/fullpipe/scenes/scene27.cpp
@@ -340,7 +340,7 @@ void sceneHandler27_wipeDo() {
bool sceneHandler27_batFallLogic(uint batn) {
Bat *bat = g_vars->scene27_bats[batn];
- int y = (bat->currY - 458.0) * 0.4848484848484849 + 734.0;
+ int y = (int)((bat->currY - 458.0) * 0.4848484848484849 + 734.0);
if (y >= bat->currX)
return false;
diff --git a/engines/gob/POTFILES b/engines/gob/POTFILES
index 9a512469dd..ca7aa14177 100644
--- a/engines/gob/POTFILES
+++ b/engines/gob/POTFILES
@@ -1,3 +1,5 @@
engines/gob/inter_playtoons.cpp
engines/gob/inter_v2.cpp
engines/gob/inter_v5.cpp
+engines/gob/inter_geisha.cpp
+
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 40134bbf17..676564a9fb 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -1124,8 +1124,6 @@ void Inter_v1::o1_palLoad(OpFuncParams &params) {
_vm->_draw->_vgaPalette[i].green = _vm->_game->_script->readByte();
_vm->_draw->_vgaPalette[i].blue = _vm->_game->_script->readByte();
}
-
- memcpy(_vm->_draw->_vgaPalette, _vm->_draw->_vgaPalette, 16 * 3);
break;
case 53:
diff --git a/engines/hopkins/POTFILES b/engines/hopkins/POTFILES
new file mode 100644
index 0000000000..1ea7d5111b
--- /dev/null
+++ b/engines/hopkins/POTFILES
@@ -0,0 +1,2 @@
+engines/hopkins/detection.cpp
+
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp
index 6620f2878c..3100ed6cdc 100644
--- a/engines/hopkins/files.cpp
+++ b/engines/hopkins/files.cpp
@@ -74,7 +74,7 @@ int FileManager::readStream(Common::ReadStream &stream, void *buf, size_t nbytes
* It's now using the config manager and a per-engine GUI option.
*/
void FileManager::initCensorship() {
- _vm->_globals->_censorshipFl = ConfMan.getBool("enable_gore");
+ _vm->_globals->_censorshipFl = !ConfMan.getBool("enable_gore");
}
/**
diff --git a/engines/kyra/POTFILES b/engines/kyra/POTFILES
index 16888e2c5a..e5b380e52e 100644
--- a/engines/kyra/POTFILES
+++ b/engines/kyra/POTFILES
@@ -1,3 +1,4 @@
engines/kyra/detection.cpp
engines/kyra/lol.cpp
engines/kyra/sound_midi.cpp
+engines/kyra/saveload_eob.cpp
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 1ada9a87ba..2ee0262ef2 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -1568,6 +1568,22 @@ const KYRAGameDescription adGameDescs[] = {
EOB_FLAGS
},
+ { // Italian fan translation
+ {
+ "eob",
+ 0,
+ {
+ { "EOBDATA3.PAK", 0, "3ed915ab5b94d60dbfe1b55379889c51", -1 },
+ { 0, 0, 0, 0 }
+ },
+ Common::IT_ITA,
+ Common::kPlatformDOS,
+ ADGF_TESTING,
+ GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
+ },
+ EOB_FLAGS
+ },
+
{
{
"eob2",
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp
index f2a9637dfe..e1f864ddd2 100644
--- a/engines/kyra/items_lol.cpp
+++ b/engines/kyra/items_lol.cpp
@@ -265,7 +265,7 @@ bool LoLEngine::addItemToInventory(Item itemIndex) {
gui_drawInventory();
}
- assert(pos > 0 && pos < 48);
+ assert(pos >= 0 && pos < 48);
_inventory[pos] = itemIndex;
gui_drawInventory();
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 9b3b92b9c7..731f2f4ce5 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -39,7 +39,7 @@
namespace Kyra {
-#define RESFILE_VERSION 85
+#define RESFILE_VERSION 86
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index 54cc3066ec..aa7adc7461 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -464,20 +464,34 @@ void EoBCoreEngine::initStaticResource() {
// EOB I doesn't have load and save menus, because there is only one single
// save slot. Instead of emulating this we provide a menu similiar to EOB II.
- static const char *const saveLoadStrings[3][4] = {
- { "Cancel", "Empty Slot", "Save Game", "Load Game" },
- { "Abbr.", "Leerer Slot", "Speichern", " Laden" },
- { 0, 0, 0, 0 }
+ static const char *const saveLoadStrings[4][4] = {
+ { "Cancel", "Empty Slot", "Save Game", "Load Game" },
+ { "Abbr.", "Leerer Slot", "Speichern", " Laden" },
+ { " < < ", "Posizione Vuota", "Salva", "Carica" },
+ { 0, 0, 0, 0 }
};
- static const char *const errorSlotEmptyString[3] = {
+ static const char *const errorSlotEmptyString[4] = {
"There is no game\rsaved in that slot!",
"Hier ist noch kein\rSpiel gespeichert!",
+ "Non c'\x0E alcun gioco\rsalvato in quella\rposizione!",
0
};
- _saveLoadStrings = saveLoadStrings[(_flags.lang == Common::EN_ANY) ? 0 : ((_flags.lang == Common::DE_DEU) ? 1 : 2)];
- _errorSlotEmptyString = errorSlotEmptyString[(_flags.lang == Common::EN_ANY) ? 0 : ((_flags.lang == Common::DE_DEU) ? 1 : 2)];
+ if (_flags.lang == Common::EN_ANY) {
+ _saveLoadStrings = saveLoadStrings[0];
+ _errorSlotEmptyString = errorSlotEmptyString[0];
+ } else if (_flags.lang == Common::DE_DEU) {
+ _saveLoadStrings = saveLoadStrings[1];
+ _errorSlotEmptyString = errorSlotEmptyString[1];
+ } else if (_flags.lang == Common::IT_ITA) {
+ _saveLoadStrings = saveLoadStrings[2];
+ _errorSlotEmptyString = errorSlotEmptyString[2];
+ } else {
+ _saveLoadStrings = saveLoadStrings[3];
+ _errorSlotEmptyString = errorSlotEmptyString[3];
+ }
+
_menuOkString = "OK";
}
diff --git a/engines/kyra/text_rpg.cpp b/engines/kyra/text_rpg.cpp
index 03acde8497..5cd99738ef 100644
--- a/engines/kyra/text_rpg.cpp
+++ b/engines/kyra/text_rpg.cpp
@@ -30,7 +30,7 @@
namespace Kyra {
enum {
- kEoBTextBufferSize = 2048
+ kEoBTextBufferSize = 2560
};
TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *scr) : _vm(engine), _screen(scr),
@@ -216,7 +216,7 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
break;
default:
- if (_vm->game() == GI_LOL || (unsigned char)c > 30) {
+ if (_vm->game() == GI_EOB1 || _vm->game() == GI_LOL || (unsigned char)c > 30) {
_lineWidth += (sjisTextMode ? 4 : (_screen->_currentFont == Screen::FID_SJIS_FNT ? 9 : _screen->getCharWidth((uint8)c)));
_currentLine[_numCharsLeft++] = c;
_currentLine[_numCharsLeft] = 0;
diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index 512a3979f9..2b999fa305 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -32,10 +32,8 @@ void AAHeader::load(Common::SeekableReadStream *f) {
_miscEntriesCount = f->readUint16LE();
_frameEntriesCount = f->readUint16LE();
_messagesCount = f->readUint16LE();
- f->skip(1);
- _flags = f->readByte();
-
- f->skip(2);
+ _loadFlags = f->readUint16LE();
+ _charSpacing = f->readSint16LE();
_bgType = (AnimBgType)f->readUint16LE();
_roomNumber = f->readUint16LE();
f->skip(2);
@@ -49,7 +47,7 @@ void AAHeader::load(Common::SeekableReadStream *f) {
char buffer[FILENAME_SIZE];
f->read(buffer, FILENAME_SIZE);
buffer[FILENAME_SIZE - 1] = '\0';
- _interfaceFile = Common::String(buffer);
+ _backgroundFile = Common::String(buffer);
for (int i = 0; i < 50; ++i) {
f->read(buffer, FILENAME_SIZE);
@@ -134,7 +132,8 @@ void AnimMiscEntry::load(Common::SeekableReadStream *f) {
_numTicks = f->readUint16LE();
_posAdjust.x = f->readSint16LE();
_posAdjust.y = f->readSint16LE();
- _field8 = f->readUint16LE();
+ _scroll.x = f->readSByte();
+ _scroll.y = f->readSByte();
}
/*------------------------------------------------------------------------*/
@@ -160,6 +159,7 @@ Animation *Animation::init(MADSEngine *vm, Scene *scene) {
}
Animation::Animation(MADSEngine *vm, Scene *scene) : _vm(vm), _scene(scene) {
+ _flags = 0;
_font = nullptr;
_resetFlag = false;
_messageCtr = 0;
@@ -175,6 +175,8 @@ Animation::Animation(MADSEngine *vm, Scene *scene) : _vm(vm), _scene(scene) {
_actionDetails._indirectObjectId = -1;
_currentFrame = 0;
_oldFrameEntry = 0;
+ _rgbResult = -1;
+ _palIndex1 = _palIndex2 = -1;
}
Animation::~Animation() {
@@ -189,7 +191,7 @@ Animation::~Animation() {
}
}
-void Animation::load(UserInterface &interfaceSurface, DepthSurface &depthSurface,
+void Animation::load(MSurface &backSurface, DepthSurface &depthSurface,
const Common::String &resName, int flags, Common::Array<PaletteCycle> *palCycles,
SceneInfo *sceneInfo) {
Common::String resourceName = resName;
@@ -205,9 +207,10 @@ void Animation::load(UserInterface &interfaceSurface, DepthSurface &depthSurface
if (_header._bgType == ANIMBG_INTERFACE)
flags |= PALFLAG_RESERVED;
+ _flags = flags;
if (flags & ANIMFLAG_LOAD_BACKGROUND) {
- loadInterface(interfaceSurface, depthSurface, _header, flags, palCycles, sceneInfo);
+ loadBackground(backSurface, depthSurface, _header, flags, palCycles, sceneInfo);
}
if (flags & ANIMFLAG_LOAD_BACKGROUND_ONLY) {
// No data
@@ -243,7 +246,7 @@ void Animation::load(UserInterface &interfaceSurface, DepthSurface &depthSurface
for (int i = 0; i < _header._frameEntriesCount; i++) {
AnimFrameEntry rec;
- rec.load(frameStream, flags & ANIMFLAG_LOAD_BACKGROUND);
+ rec.load(frameStream, _header._bgType == ANIMBG_INTERFACE);
_frameEntries.push_back(rec);
}
@@ -256,7 +259,7 @@ void Animation::load(UserInterface &interfaceSurface, DepthSurface &depthSurface
// Chunk 4: Misc Data
Common::SeekableReadStream *miscStream = madsPack.getItemStream(streamIndex++);
- if (flags & ANIMFLAG_LOAD_BACKGROUND) {
+ if (_header._bgType == ANIMBG_INTERFACE) {
for (int i = 0; i < _header._miscEntriesCount; ++i) {
AnimUIEntry rec;
rec.load(miscStream);
@@ -275,7 +278,7 @@ void Animation::load(UserInterface &interfaceSurface, DepthSurface &depthSurface
// If the animation specifies a font, then load it for access
delete _font;
- if (_header._flags & ANIMFLAG_CUSTOM_FONT) {
+ if (_header._loadFlags & ANIMFLAG_CUSTOM_FONT) {
Common::String fontName = "*" + _header._fontResource;
_font = _vm->_font->getFont(fontName.c_str());
} else {
@@ -337,9 +340,6 @@ void Animation::startAnimation(int endTrigger) {
_unkIndex = -1;
//SpriteAsset *asset = _scene->_sprites[_spriteListIndexes[_header._spritesIndex]];
- // TODO: Weird stuff with _unkList. Seems like it's treated as pointers
- // here, but in processText, it's used as POINTs?
-
loadFrame(1);
}
@@ -385,12 +385,12 @@ bool Animation::drawFrame(SpriteAsset &spriteSet, const Common::Point &pt, int f
return 0;
}
-void Animation::loadInterface(UserInterface &interfaceSurface, DepthSurface &depthSurface,
+void Animation::loadBackground(MSurface &backSurface, DepthSurface &depthSurface,
AAHeader &header, int flags, Common::Array<PaletteCycle> *palCycles, SceneInfo *sceneInfo) {
_scene->_depthStyle = 0;
if (header._bgType <= ANIMBG_FULL_SIZE) {
_vm->_palette->_paletteUsage.setEmpty();
- sceneInfo->load(header._roomNumber, flags, header._interfaceFile, 0, depthSurface, interfaceSurface);
+ sceneInfo->load(header._roomNumber, 0, header._backgroundFile, flags, depthSurface, backSurface);
_scene->_depthStyle = sceneInfo->_depthStyle == 2 ? 1 : 0;
if (palCycles) {
palCycles->clear();
@@ -399,8 +399,8 @@ void Animation::loadInterface(UserInterface &interfaceSurface, DepthSurface &dep
}
} else if (header._bgType == ANIMBG_INTERFACE) {
// Load a scene interface
- Common::String resourceName = "*" + header._interfaceFile;
- interfaceSurface.load(resourceName);
+ Common::String resourceName = "*" + header._backgroundFile;
+ backSurface.load(resourceName);
if (palCycles)
palCycles->clear();
@@ -415,6 +415,7 @@ bool Animation::hasScroll() const {
void Animation::update() {
Scene &scene = _vm->_game->_scene;
+ Palette &palette = *_vm->_palette;
if (_header._manualFlag) {
int spriteListIndex = _spriteListIndexes[_header._spritesIndex];
@@ -534,28 +535,43 @@ void Animation::update() {
// Start displaying the message
AnimMessage &me = _messages[idx];
- // The color index to use is dependant on how many messages are currently on-screen
- uint8 colIndex;
- switch (_messageCtr) {
- case 1:
- colIndex = 252;
- break;
- case 2:
- colIndex = 16;
- break;
- default:
- colIndex = 250;
- break;
- }
+ if (_flags & ANIMFLAG_ANIMVIEW) {
+ _rgbResult = palette._paletteUsage.checkRGB(me._rgb1, -1, true, &_palIndex1);
+ _rgbResult = palette._paletteUsage.checkRGB(me._rgb2, _rgbResult, true, &_palIndex2);
+
+ // Update the palette with the two needed colors
+ int palStart = MIN(_palIndex1, _palIndex2);
+ int palCount = ABS(_palIndex2 - _palIndex1) + 1;
+ palette.setPalette(&palette._mainPalette[palStart * 3], palStart, palCount);
+ } else {
+ // The color index to use is dependant on how many messages are currently on-screen
+ switch (_messageCtr) {
+ case 1:
+ _palIndex1 = 252;
+ break;
+ case 2:
+ _palIndex1 = 16;
+ break;
+ default:
+ _palIndex1 = 250;
+ break;
+ }
+ _palIndex2 = _palIndex1 + 1;
- _vm->_palette->setEntry(colIndex, me._rgb1[0], me._rgb1[1], me._rgb1[2]);
- _vm->_palette->setEntry(colIndex + 1, me._rgb2[0], me._rgb2[1], me._rgb2[2]);
+ _vm->_palette->setEntry(_palIndex1, me._rgb1[0], me._rgb1[1], me._rgb1[2]);
+ _vm->_palette->setEntry(_palIndex2, me._rgb2[0], me._rgb2[1], me._rgb2[2]);
+ }
// Add a kernel message to display the given text
- me._kernelMsgIndex = scene._kernelMessages.add(me._pos, colIndex * 0x101 + 0x100,
+ me._kernelMsgIndex = scene._kernelMessages.add(me._pos,
+ _palIndex1 | (_palIndex2 << 8),
0, 0, INDEFINITE_TIMEOUT, me._msg);
assert(me._kernelMsgIndex >= 0);
++_messageCtr;
+
+ // If there's an accompanying sound, also play it
+ if (me._soundId > 0)
+ _vm->_audio->playSound(me._soundId - 1);
}
}
diff --git a/engines/mads/animation.h b/engines/mads/animation.h
index 15086d3e41..8b85a5370d 100644
--- a/engines/mads/animation.h
+++ b/engines/mads/animation.h
@@ -34,10 +34,11 @@
namespace MADS {
enum AnimFlag {
- ANIMFLAG_DITHER = 0x0001, // Dither to 16 colors
- ANIMFLAG_CUSTOM_FONT = 0x0020, // Load ccustom font
+ ANIMFLAG_DITHER = 0x1000, // Dither to 16 colors
+ ANIMFLAG_CUSTOM_FONT = 0x2000, // Load ccustom font
ANIMFLAG_LOAD_BACKGROUND = 0x0100, // Load background
- ANIMFLAG_LOAD_BACKGROUND_ONLY = 0x0200 // Load background only
+ ANIMFLAG_LOAD_BACKGROUND_ONLY = 0x0200, // Load background only
+ ANIMFLAG_ANIMVIEW = 0x4000 // Cutscene animation
};
enum AnimBgType {
@@ -82,7 +83,7 @@ public:
int _msgIndex;
int _numTicks;
Common::Point _posAdjust;
- int _field8;
+ Common::Point _scroll;
/**
* Loads data for the record
@@ -116,14 +117,15 @@ public:
int _miscEntriesCount;
int _frameEntriesCount;
int _messagesCount;
- byte _flags;
+ int _loadFlags;
+ int _charSpacing;
AnimBgType _bgType;
int _roomNumber;
bool _manualFlag;
int _spritesIndex;
Common::Point _scrollPosition;
uint32 _scrollTicks;
- Common::String _interfaceFile;
+ Common::String _backgroundFile;
Common::StringArray _spriteSetNames;
Common::String _lbmFilename;
Common::String _spritesFilename;
@@ -154,6 +156,9 @@ private:
uint32 _nextScrollTimer;
int _messageCtr;
int _trigger;
+ int _flags;
+ int _rgbResult;
+ int _palIndex1, _palIndex2;
TriggerMode _triggerMode;
ActionDetails _actionDetails;
@@ -166,9 +171,9 @@ private:
bool drawFrame(SpriteAsset &spriteSet, const Common::Point &pt, int frameNumber);
/**
- * Load the user interface display for an animation
+ * Load the user interface display or background for an animation
*/
- void loadInterface(UserInterface &interfaceSurface, DepthSurface &depthSurface,
+ void loadBackground(MSurface &backSurface, DepthSurface &depthSurface,
AAHeader &header, int flags, Common::Array<PaletteCycle> *palCycles, SceneInfo *sceneInfo);
/**
@@ -196,7 +201,7 @@ public:
/**
* Loads animation data
*/
- void load(UserInterface &interfaceSurface, DepthSurface &depthSurface, const Common::String &resName,
+ void load(MSurface &backSurface, DepthSurface &depthSurface, const Common::String &resName,
int flags, Common::Array<PaletteCycle> *palCycles, SceneInfo *sceneInfo);
/**
@@ -223,6 +228,8 @@ public:
int roomNumber() const { return _header._roomNumber; }
void resetSpriteSetsCount() { _header._spriteSetsCount = 0; } // CHECKME: See if it doesn't leak the memory when the destructor is called
+
+ SpriteAsset *getSpriteSet(int idx) { return _spriteSets[idx]; }
};
} // End of namespace MADS
diff --git a/engines/mads/audio.cpp b/engines/mads/audio.cpp
index 1c61e13957..def2cd6c62 100644
--- a/engines/mads/audio.cpp
+++ b/engines/mads/audio.cpp
@@ -37,6 +37,7 @@ AudioPlayer::AudioPlayer(Audio::Mixer *mixer, uint32 gameID) : _mixer(mixer), _g
AudioPlayer::~AudioPlayer() {
_dsrEntries.clear();
+ _filename = "";
}
bool AudioPlayer::isPlaying() const {
@@ -65,25 +66,27 @@ void AudioPlayer::setDefaultSoundGroup() {
}
void AudioPlayer::setSoundGroup(const Common::String &filename) {
- _dsrEntries.clear();
-
- _filename = filename;
- _dsrFile.open(filename);
-
- // Read header
- uint16 entryCount = _dsrFile.readUint16LE();
-
- for (uint16 i = 0; i < entryCount; i++) {
- DSREntry newEntry;
- newEntry.frequency = _dsrFile.readUint16LE();
- newEntry.channels = _dsrFile.readUint32LE();
- newEntry.compSize = _dsrFile.readUint32LE();
- newEntry.uncompSize = _dsrFile.readUint32LE();
- newEntry.offset = _dsrFile.readUint32LE();
- _dsrEntries.push_back(newEntry);
+ if (_filename != filename) {
+ _dsrEntries.clear();
+
+ _filename = filename;
+ _dsrFile.open(filename);
+
+ // Read header
+ uint16 entryCount = _dsrFile.readUint16LE();
+
+ for (uint16 i = 0; i < entryCount; i++) {
+ DSREntry newEntry;
+ newEntry.frequency = _dsrFile.readUint16LE();
+ newEntry.channels = _dsrFile.readUint32LE();
+ newEntry.compSize = _dsrFile.readUint32LE();
+ newEntry.uncompSize = _dsrFile.readUint32LE();
+ newEntry.offset = _dsrFile.readUint32LE();
+ _dsrEntries.push_back(newEntry);
+ }
+
+ _dsrFile.close();
}
-
- _dsrFile.close();
}
void AudioPlayer::playSound(int soundIndex, bool loop) {
@@ -126,4 +129,8 @@ void AudioPlayer::playSound(int soundIndex, bool loop) {
*/
}
+void AudioPlayer::stop() {
+ _mixer->stopHandle(_handle);
+}
+
} // End of namespace M4
diff --git a/engines/mads/audio.h b/engines/mads/audio.h
index 21f4bed59a..13c540bf85 100644
--- a/engines/mads/audio.h
+++ b/engines/mads/audio.h
@@ -46,6 +46,7 @@ public:
void setSoundGroup(const Common::String &filename);
void setDefaultSoundGroup();
void playSound(int soundIndex, bool loop = false);
+ void stop();
void setVolume(int volume);
bool isPlaying() const;
diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index 6bc6cf572d..99251f9fbb 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -24,6 +24,7 @@
#include "mads/compression.h"
#include "mads/mads.h"
#include "mads/debugger.h"
+#include "mads/nebular/menu_nebular.h"
namespace MADS {
@@ -46,6 +47,8 @@ Debugger::Debugger(MADSEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("show_item", WRAP_METHOD(Debugger, Cmd_ShowItem));
registerCmd("dump_items", WRAP_METHOD(Debugger, Cmd_DumpItems));
registerCmd("item", WRAP_METHOD(Debugger, Cmd_Item));
+ registerCmd("play_anim", WRAP_METHOD(Debugger, Cmd_PlayAnim));
+ registerCmd("play_text", WRAP_METHOD(Debugger, Cmd_PlayText));
}
static int strToInt(const char *s) {
@@ -348,4 +351,44 @@ bool Debugger::Cmd_Item(int argc, const char **argv) {
}
}
+bool Debugger::Cmd_PlayAnim(int argc, const char **argv) {
+ if (argc != 2) {
+ debugPrintf("Usage: %s <anim name>\n", argv[0]);
+ return true;
+ } else {
+ Common::String resName = argv[1];
+ if (resName.hasPrefix("@"))
+ resName.deleteChar(0);
+
+ Common::File f;
+ if (f.exists(resName) || f.exists(resName + ".res")) {
+ AnimationView::execute(_vm, resName);
+ return false;
+ } else {
+ debugPrintf("Could not find resource file\n");
+ return true;
+ }
+ }
+}
+
+bool Debugger::Cmd_PlayText(int argc, const char **argv) {
+ if (argc != 2) {
+ debugPrintf("Usage: %s <text name>\n", argv[0]);
+ return true;
+ } else {
+ Common::String resName = argv[1];
+ if (resName.hasPrefix("@"))
+ resName.deleteChar(0);
+
+ Common::File f;
+ if (f.exists(resName) || f.exists(resName + ".txr")) {
+ TextView::execute(_vm, resName);
+ return false;
+ } else {
+ debugPrintf("Could not find resource file\n");
+ return true;
+ }
+ }
+}
+
} // End of namespace MADS
diff --git a/engines/mads/debugger.h b/engines/mads/debugger.h
index 351eb13615..c8fee5f5b2 100644
--- a/engines/mads/debugger.h
+++ b/engines/mads/debugger.h
@@ -49,6 +49,8 @@ protected:
bool Cmd_ShowItem(int argc, const char **argv);
bool Cmd_DumpItems(int argc, const char **argv);
bool Cmd_Item(int argc, const char **argv);
+ bool Cmd_PlayAnim(int argc, const char **argv);
+ bool Cmd_PlayText(int argc, const char **argv);
public:
bool _showMousePos;
public:
diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp
index 7e6909d113..5e38f34fc6 100644
--- a/engines/mads/dialogs.cpp
+++ b/engines/mads/dialogs.cpp
@@ -395,4 +395,78 @@ Dialogs::Dialogs(MADSEngine *vm)
_pendingDialog = DIALOG_NONE;
}
+/*------------------------------------------------------------------------*/
+
+FullScreenDialog::FullScreenDialog(MADSEngine *vm) : _vm(vm) {
+ switch (_vm->getGameID()) {
+ case GType_RexNebular:
+ _screenId = 990;
+ break;
+ case GType_Phantom:
+ _screenId = 920;
+ break;
+ case GType_Dragonsphere:
+ _screenId = 922;
+ break;
+ default:
+ error("FullScreenDialog:Unknown game");
+ }
+ _palFlag = true;
+}
+
+FullScreenDialog::~FullScreenDialog() {
+ _vm->_screen.resetClipBounds();
+ _vm->_game->_scene.restrictScene();
+}
+
+void FullScreenDialog::display() {
+ Game &game = *_vm->_game;
+ Scene &scene = game._scene;
+
+ int nextSceneId = scene._nextSceneId;
+ int currentSceneId = scene._currentSceneId;
+ int priorSceneId = scene._priorSceneId;
+
+ if (_screenId > 0) {
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->load(_screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
+ }
+
+ scene._priorSceneId = priorSceneId;
+ scene._currentSceneId = currentSceneId;
+ scene._nextSceneId = nextSceneId;
+
+ _vm->_events->initVars();
+ game._kernelMode = KERNEL_ROOM_INIT;
+
+ byte pal[768];
+ if (_vm->_screenFade) {
+ Common::fill(&pal[0], &pal[PALETTE_SIZE], 0);
+ _vm->_palette->setFullPalette(pal);
+ } else {
+ _vm->_palette->getFullPalette(pal);
+ _vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16);
+ }
+
+ // Set Fx state and palette entries
+ game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
+ game._trigger = 0;
+
+ // Clear the screen and draw the upper and lower horizontal lines
+ _vm->_screen.empty();
+ _vm->_palette->setLowRange();
+ _vm->_screen.hLine(0, 20, MADS_SCREEN_WIDTH, 2);
+ _vm->_screen.hLine(0, 179, MADS_SCREEN_WIDTH, 2);
+ _vm->_screen.resetClipBounds();
+ _vm->_screen.copyRectToScreen(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT));
+
+ // Restrict the screen to the area between the two lines
+ _vm->_screen.setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH,
+ DIALOG_TOP + MADS_SCENE_HEIGHT));
+ _vm->_game->_scene.restrictScene();
+
+ if (_screenId > 0)
+ scene._spriteSlots.fullRefresh();
+}
+
} // End of namespace MADS
diff --git a/engines/mads/dialogs.h b/engines/mads/dialogs.h
index c586a6f1fe..317c7bd792 100644
--- a/engines/mads/dialogs.h
+++ b/engines/mads/dialogs.h
@@ -30,6 +30,8 @@
namespace MADS {
+#define DIALOG_TOP 22
+
class Dialog {
private:
void setDialogPalette();
@@ -226,6 +228,36 @@ public:
virtual bool show(int messageId, int objectId = -1) = 0;
};
+class FullScreenDialog: public EventTarget {
+protected:
+ /**
+ * Engine reference
+ */
+ MADSEngine *_vm;
+
+ /**
+ * Screen/scene to show background from
+ */
+ int _screenId;
+
+ /**
+ * Flag for palette initialization
+ */
+ bool _palFlag;
+
+ /**
+ * Handles displaying the screen background and dialog
+ */
+ virtual void display();
+public:
+ /**
+ * Constructor
+ */
+ FullScreenDialog(MADSEngine *vm);
+
+ virtual ~FullScreenDialog();
+};
+
} // End of namespace MADS
#endif /* MADS_DIALOGS_H */
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index b544eff2db..63a7e40d1b 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -433,8 +433,6 @@ void Game::handleKeypress(const Common::Event &event) {
default:
break;
}
-
- warning("TODO: handleKeypress - %d", (int)event.kbd.keycode);
}
void Game::synchronize(Common::Serializer &s, bool phase1) {
diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp
index 59eec40bcc..52a0b40561 100644
--- a/engines/mads/mads.cpp
+++ b/engines/mads/mads.cpp
@@ -68,6 +68,8 @@ MADSEngine::~MADSEngine() {
delete _resources;
delete _sound;
delete _audio;
+
+ _mixer->stopAll();
}
void MADSEngine::initialize() {
@@ -103,9 +105,6 @@ Common::Error MADSEngine::run() {
// Run the game
_game->run();
- // Dummy loop to keep application active
- _events->delay(9999);
-
return Common::kNoError;
}
diff --git a/engines/mads/menu_views.cpp b/engines/mads/menu_views.cpp
new file mode 100644
index 0000000000..03afc70c3e
--- /dev/null
+++ b/engines/mads/menu_views.cpp
@@ -0,0 +1,768 @@
+/* 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 "common/scummsys.h"
+#include "mads/game.h"
+#include "mads/mads.h"
+#include "mads/menu_views.h"
+#include "mads/resources.h"
+#include "mads/scene.h"
+#include "mads/screen.h"
+
+namespace MADS {
+
+MenuView::MenuView(MADSEngine *vm) : FullScreenDialog(vm) {
+ _breakFlag = false;
+ _redrawFlag = true;
+ _palFlag = false;
+}
+
+void MenuView::show() {
+ Scene &scene = _vm->_game->_scene;
+ EventsManager &events = *_vm->_events;
+ _vm->_screenFade = SCREEN_FADE_FAST;
+
+ scene._spriteSlots.reset(true);
+ display();
+
+ events.setEventTarget(this);
+ events.hideCursor();
+
+ while (!_breakFlag && !_vm->shouldQuit()) {
+ if (_redrawFlag) {
+ scene._kernelMessages.update();
+
+ _vm->_game->_scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
+ _redrawFlag = false;
+ }
+
+ _vm->_events->waitForNextFrame();
+ _vm->_game->_fx = kTransitionNone;
+ doFrame();
+ }
+
+ events.setEventTarget(nullptr);
+ _vm->_sound->stop();
+}
+
+void MenuView::display() {
+ _vm->_palette->resetGamePalette(4, 8);
+
+ FullScreenDialog::display();
+}
+
+bool MenuView::onEvent(Common::Event &event) {
+ if (event.type == Common::EVENT_KEYDOWN || event.type == Common::EVENT_LBUTTONDOWN) {
+ _breakFlag = true;
+ _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+ return true;
+ }
+
+ return false;
+}
+
+Common::String MenuView::getResourceName() {
+ Common::String s(_filename);
+ s.toLowercase();
+ while (s.contains('.'))
+ s.deleteLastChar();
+
+ return s;
+}
+
+/*------------------------------------------------------------------------*/
+
+char TextView::_resourceName[100];
+#define TEXTVIEW_LINE_SPACING 2
+#define TEXT_ANIMATION_DELAY 100
+#define TV_NUM_FADE_STEPS 40
+#define TV_FADE_DELAY_MILLI 50
+
+void TextView::execute(MADSEngine *vm, const Common::String &resName) {
+ assert(resName.size() < 100);
+ Common::strlcpy(_resourceName, resName.c_str(), sizeof(_resourceName));
+ vm->_dialogs->_pendingDialog = DIALOG_TEXTVIEW;
+}
+
+TextView::TextView(MADSEngine *vm) : MenuView(vm) {
+ _animating = false;
+ _panSpeed = 0;
+ _spareScreen = nullptr;
+ _scrollCount = 0;
+ _lineY = -1;
+ _scrollTimeout = 0;
+ _panCountdown = 0;
+ _translationX = 0;
+ _screenId = -1;
+
+ _font = _vm->_font->getFont(FONT_CONVERSATION);
+ _vm->_palette->resetGamePalette(4, 0);
+
+ load();
+}
+
+TextView::~TextView() {
+ // Turn off palette cycling as well as any playing sound
+ Scene &scene = _vm->_game->_scene;
+ scene._cyclingActive = false;
+ _vm->_sound->stop();
+}
+
+void TextView::load() {
+ Common::String scriptName(_resourceName);
+ scriptName += ".txr";
+
+ _filename = scriptName;
+ if (!_script.open(scriptName))
+ error("Could not open resource %s", _resourceName);
+
+ processLines();
+}
+
+void TextView::processLines() {
+ if (_script.eos())
+ error("Attempted to read past end of response file");
+
+ while (!_script.eos()) {
+ // Read in the next line
+ _script.readLine(_currentLine, 79);
+ char *p = _currentLine + strlen(_currentLine) - 1;
+ if (*p == '\n')
+ *p = '\0';
+
+ // Commented out line, so go loop for another
+ if (_currentLine[0] == '#')
+ continue;
+
+ // Process the line
+ char *cStart = strchr(_currentLine, '[');
+ if (cStart) {
+ while (cStart) {
+ // Loop for possible multiple commands on one line
+ char *cEnd = strchr(_currentLine, ']');
+ if (!cEnd)
+ error("Unterminated command '%s' in response file", _currentLine);
+
+ *cEnd = '\0';
+ processCommand();
+
+ // Copy rest of line (if any) to start of buffer
+ Common::strlcpy(_currentLine, cEnd + 1, sizeof(_currentLine));
+
+ cStart = strchr(_currentLine, '[');
+ }
+
+ if (_currentLine[0]) {
+ processText();
+ break;
+ }
+
+ } else {
+ processText();
+ break;
+ }
+ }
+}
+
+void TextView::processCommand() {
+ Scene &scene = _vm->_game->_scene;
+ Common::String scriptLine(_currentLine + 1);
+ scriptLine.toUppercase();
+ const char *paramP;
+ const char *commandStr = scriptLine.c_str();
+
+ if (!strncmp(commandStr, "BACKGROUND", 10)) {
+ // Set the background
+ paramP = commandStr + 10;
+ resetPalette();
+ int screenId = getParameter(&paramP);
+
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->load(screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
+ scene._spriteSlots.fullRefresh();
+ _redrawFlag = true;
+
+ } else if (!strncmp(commandStr, "GO", 2)) {
+ _animating = true;
+
+ } else if (!strncmp(commandStr, "PAN", 3)) {
+ // Set panning values
+ paramP = commandStr + 3;
+ int panX = getParameter(&paramP);
+ int panY = getParameter(&paramP);
+ int panSpeed = getParameter(&paramP);
+
+ if ((panX != 0) || (panY != 0)) {
+ _pan = Common::Point(panX, panY);
+ _panSpeed = panSpeed;
+ }
+
+ } else if (!strncmp(commandStr, "DRIVER", 6)) {
+ // Set the driver to use
+ paramP = commandStr + 7;
+
+ if (!strncmp(paramP, "#SOUND.00", 9)) {
+ int driverNum = paramP[9] - '0';
+ _vm->_sound->init(driverNum);
+ }
+ } else if (!strncmp(commandStr, "SOUND", 5)) {
+ // Set sound number
+ paramP = commandStr + 5;
+ int soundId = getParameter(&paramP);
+ _vm->_sound->command(soundId);
+
+ } else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') ||
+ (commandStr[5] == '1'))) {
+ // Set the text colors
+ int index = commandStr[5] - '0';
+ paramP = commandStr + 6;
+
+ byte r = getParameter(&paramP);
+ byte g = getParameter(&paramP);
+ byte b = getParameter(&paramP);
+
+ _vm->_palette->setEntry(5 + index, r, g, b);
+
+ } else if (!strncmp(commandStr, "SPARE", 5)) {
+ // Sets a secondary background number that can be later switched in with a PAGE command
+ paramP = commandStr + 6;
+ int spareIndex = commandStr[5] - '0';
+ assert(spareIndex < 4);
+ int screenId = getParameter(&paramP);
+
+ // Load the spare background
+ SceneInfo *sceneInfo = SceneInfo::init(_vm);
+ sceneInfo->_width = MADS_SCREEN_WIDTH;
+ sceneInfo->_height = MADS_SCENE_HEIGHT;
+ _spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
+ sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE,
+ _spareScreens[spareIndex]);
+ delete sceneInfo;
+
+ } else if (!strncmp(commandStr, "PAGE", 4)) {
+ // Signals to change to a previous specified secondary background
+ paramP = commandStr + 4;
+ int spareIndex = getParameter(&paramP);
+
+ // Only allow background switches if one isn't currently in progress
+ if (!_spareScreen && _spareScreens[spareIndex].getPixels() != nullptr) {
+ _spareScreen = &_spareScreens[spareIndex];
+ _translationX = 0;
+ }
+
+ } else {
+ error("Unknown response command: '%s'", commandStr);
+ }
+}
+
+int TextView::getParameter(const char **paramP) {
+ if ((**paramP != '=') && (**paramP != ','))
+ return 0;
+
+ int result = 0;
+ ++*paramP;
+ while ((**paramP >= '0') && (**paramP <= '9')) {
+ result = result * 10 + (**paramP - '0');
+ ++*paramP;
+ }
+
+ return result;
+}
+
+void TextView::processText() {
+ int xStart;
+
+ if (!strcmp(_currentLine, "***")) {
+ // Special signifier for end of script
+ _scrollCount = _font->getHeight() * 13;
+ _lineY = -1;
+ return;
+ }
+
+ _lineY = 0;
+
+ // Lines are always centered, except if line contains a '@', in which case the
+ // '@' marks the position that must be horizontally centered
+ char *centerP = strchr(_currentLine, '@');
+ if (centerP) {
+ *centerP = '\0';
+ xStart = (MADS_SCREEN_WIDTH / 2) - _font->getWidth(_currentLine);
+
+ // Delete the @ character and shift back the remainder of the string
+ char *p = centerP + 1;
+ if (*p == ' ') ++p;
+ strcpy(centerP, p);
+
+ } else {
+ int lineWidth = _font->getWidth(_currentLine);
+ xStart = (MADS_SCREEN_WIDTH - lineWidth) / 2;
+ }
+
+ // Add the new line to the list of pending lines
+ TextLine tl;
+ tl._pos = Common::Point(xStart, MADS_SCENE_HEIGHT);
+ tl._line = _currentLine;
+ tl._textDisplayIndex = -1;
+ _textLines.push_back(tl);
+}
+
+void TextView::display() {
+ FullScreenDialog::display();
+}
+
+void TextView::resetPalette() {
+ _vm->_palette->resetGamePalette(8, 8);
+ _vm->_palette->setEntry(5, 0, 63, 63);
+ _vm->_palette->setEntry(6, 0, 45, 45);
+}
+
+void TextView::doFrame() {
+ Scene &scene = _vm->_game->_scene;
+ if (!_animating)
+ return;
+
+ // Only update state if wait period has expired
+ uint32 currTime = g_system->getMillis();
+
+ // If a screen transition is in progress and it's time for another column, handle it
+ if (_spareScreen) {
+ byte *srcP = _spareScreen->getBasePtr(_translationX, 0);
+ byte *bgP = scene._backgroundSurface.getBasePtr(_translationX, 0);
+ byte *screenP = (byte *)_vm->_screen.getBasePtr(_translationX, 0);
+
+ for (int y = 0; y < MADS_SCENE_HEIGHT; ++y, srcP += MADS_SCREEN_WIDTH,
+ bgP += MADS_SCREEN_WIDTH, screenP += MADS_SCREEN_WIDTH) {
+ *bgP = *srcP;
+ *screenP = *srcP;
+ }
+
+ // Flag the column of the screen is modified
+ _vm->_screen.copyRectToScreen(Common::Rect(_translationX, 0,
+ _translationX + 1, MADS_SCENE_HEIGHT));
+
+ // Keep moving the column to copy to the right
+ if (++_translationX == MADS_SCREEN_WIDTH) {
+ // Surface transition is complete
+ _spareScreen = nullptr;
+ }
+ }
+
+ // Make sure it's time for an update
+ if (currTime < _scrollTimeout)
+ return;
+ _scrollTimeout = g_system->getMillis() + TEXT_ANIMATION_DELAY;
+ _redrawFlag = true;
+
+ // If any panning values are set, pan the background surface
+ if ((_pan.x != 0) || (_pan.y != 0)) {
+ if (_panCountdown > 0) {
+ --_panCountdown;
+ return;
+ }
+
+ // Handle horizontal panning
+ if (_pan.x != 0) {
+ byte *lineTemp = new byte[_pan.x];
+ for (int y = 0; y < MADS_SCENE_HEIGHT; ++y) {
+ byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
+
+ // Copy the first X pixels into temp buffer, move the rest of the line
+ // to the start of the line, and then move temp buffer pixels to end of line
+ Common::copy(pixelsP, pixelsP + _pan.x, lineTemp);
+ Common::copy(pixelsP + _pan.x, pixelsP + MADS_SCREEN_WIDTH, pixelsP);
+ Common::copy(lineTemp, lineTemp + _pan.x, pixelsP + MADS_SCREEN_WIDTH - _pan.x);
+ }
+
+ delete[] lineTemp;
+ }
+
+ // Handle vertical panning
+ if (_pan.y != 0) {
+ // Store the bottom Y lines into a temp buffer, move the rest of the lines down,
+ // and then copy the stored lines back to the top of the screen
+ byte *linesTemp = new byte[_pan.y * MADS_SCREEN_WIDTH];
+ byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, MADS_SCENE_HEIGHT - _pan.y);
+ Common::copy(pixelsP, pixelsP + MADS_SCREEN_WIDTH * _pan.y, linesTemp);
+
+ for (int y = MADS_SCENE_HEIGHT - 1; y >= _pan.y; --y) {
+ byte *destP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
+ byte *srcP = (byte *)scene._backgroundSurface.getBasePtr(0, y - _pan.y);
+ Common::copy(srcP, srcP + MADS_SCREEN_WIDTH, destP);
+ }
+
+ Common::copy(linesTemp, linesTemp + _pan.y * MADS_SCREEN_WIDTH,
+ (byte *)scene._backgroundSurface.getPixels());
+ delete[] linesTemp;
+ }
+
+ // Flag for a full screen refresh
+ scene._spriteSlots.fullRefresh();
+ }
+
+ // Scroll all active text lines up
+ for (int i = _textLines.size() - 1; i >= 0; --i) {
+ TextLine &tl = _textLines[i];
+ if (tl._textDisplayIndex != -1)
+ // Expire the text line that's already on-screen
+ scene._textDisplay.expire(tl._textDisplayIndex);
+
+ tl._pos.y--;
+ if (tl._pos.y < 0) {
+ _textLines.remove_at(i);
+ } else {
+ tl._textDisplayIndex = scene._textDisplay.add(tl._pos.x, tl._pos.y,
+ 0x605, -1, tl._line, _font);
+ }
+ }
+
+ if (_scrollCount > 0) {
+ // Handling final scrolling of text off of screen
+ if (--_scrollCount == 0) {
+ scriptDone();
+ return;
+ }
+ } else {
+ // Handling a text row
+ if (++_lineY == (_font->getHeight() + TEXTVIEW_LINE_SPACING))
+ processLines();
+ }
+}
+
+void TextView::scriptDone() {
+ _breakFlag = true;
+ _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+}
+
+/*------------------------------------------------------------------------*/
+
+char AnimationView::_resourceName[100];
+
+void AnimationView::execute(MADSEngine *vm, const Common::String &resName) {
+ assert(resName.size() < 100);
+ Common::strlcpy(_resourceName, resName.c_str(), sizeof(_resourceName));
+ vm->_dialogs->_pendingDialog = DIALOG_ANIMVIEW;
+}
+
+AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
+ _redrawFlag = false;
+
+ _soundDriverLoaded = false;
+ _previousUpdate = 0;
+ _screenId = -1;
+ _resetPalette = false;
+ _resyncMode = NEVER;
+ _v1 = 0;
+ _v2 = -1;
+ _resourceIndex = -1;
+ _currentAnimation = nullptr;
+ _sfx = 0;
+ _soundFlag = _bgLoadFlag = true;
+ _showWhiteBars = true;
+ _manualFrameNumber = 0;
+ _manualSpriteSet = nullptr;
+ _manualStartFrame = _manualEndFrame = 0;
+ _manualFrame2 = 0;
+ _animFrameNumber = 0;
+ _nextCyclingActive = false;
+ _sceneInfo = SceneInfo::init(_vm);
+
+ load();
+}
+
+AnimationView::~AnimationView() {
+ // Turn off palette cycling as well as any playing sound
+ Scene &scene = _vm->_game->_scene;
+ scene._cyclingActive = false;
+ _vm->_sound->stop();
+ _vm->_audio->stop();
+
+ // Delete data
+ delete _currentAnimation;
+ delete _sceneInfo;
+}
+
+void AnimationView::load() {
+ Common::String resName(_resourceName);
+ if (!resName.hasSuffix("."))
+ resName += ".res";
+
+ _filename = resName;
+ if (!_script.open(resName))
+ error("Could not open resource %s", resName.c_str());
+
+ processLines();
+}
+
+void AnimationView::display() {
+ Scene &scene = _vm->_game->_scene;
+ _vm->_palette->initPalette();
+ Common::fill(&_vm->_palette->_cyclingPalette[0], &_vm->_palette->_cyclingPalette[PALETTE_SIZE], 0);
+
+ _vm->_palette->resetGamePalette(1, 8);
+ scene._spriteSlots.reset();
+ scene._paletteCycles.clear();
+
+ MenuView::display();
+}
+
+bool AnimationView::onEvent(Common::Event &event) {
+ // Wait for the Escape key or a mouse press
+ if (((event.type == Common::EVENT_KEYDOWN) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) ||
+ (event.type == Common::EVENT_LBUTTONUP)) {
+ scriptDone();
+ return true;
+ }
+
+ return false;
+}
+
+void AnimationView::doFrame() {
+ Scene &scene = _vm->_game->_scene;
+
+ if (_resourceIndex == -1 || _currentAnimation->freeFlag()) {
+ if (++_resourceIndex == (int)_resources.size()) {
+ scriptDone();
+ } else {
+ scene._frameStartTime = 0;
+ loadNextResource();
+ }
+ } else if (_currentAnimation->getCurrentFrame() == 1) {
+ scene._cyclingActive = _nextCyclingActive;
+ }
+
+ if (_currentAnimation) {
+ ++scene._frameStartTime;
+ _currentAnimation->update();
+ _redrawFlag = true;
+ }
+}
+
+void AnimationView::loadNextResource() {
+ Scene &scene = _vm->_game->_scene;
+ Palette &palette = *_vm->_palette;
+ ResourceEntry &resEntry = _resources[_resourceIndex];
+ Common::Array<PaletteCycle> paletteCycles;
+
+ if (resEntry._bgFlag)
+ palette.resetGamePalette(1, 8);
+
+ palette._mainPalette[253 * 3] = palette._mainPalette[253 * 3 + 1]
+ = palette._mainPalette[253 * 3 + 2] = 0xb4;
+ palette.setPalette(&palette._mainPalette[253 * 3], 253, 1);
+
+ // Free any previous messages
+ scene._kernelMessages.reset();
+
+ // Handle the bars at the top/bottom
+ if (resEntry._showWhiteBars) {
+ // For animations the screen has been clipped to the middle 156 rows.
+ // So although it's slightly messy, bypass our screen class entirely,
+ // and draw the horizontal lines directly on the physiacl screen surface
+ Graphics::Surface *s = g_system->lockScreen();
+ s->hLine(0, 20, MADS_SCREEN_WIDTH, 253);
+ s->hLine(0, 179, MADS_SCREEN_WIDTH, 253);
+ g_system->unlockScreen();
+ }
+
+ // Load the new animation
+ delete _currentAnimation;
+ _currentAnimation = Animation::init(_vm, &scene);
+ int flags = ANIMFLAG_ANIMVIEW | (resEntry._bgFlag ? ANIMFLAG_LOAD_BACKGROUND : 0);
+ _currentAnimation->load(scene._backgroundSurface, scene._depthSurface,
+ resEntry._resourceName, flags, &paletteCycles, _sceneInfo);
+
+ // Signal for a screen refresh
+ scene._spriteSlots.fullRefresh();
+
+ // If a sound driver has been specified, then load the correct one
+ if (!_currentAnimation->_header._soundName.empty()) {
+ const char *chP = strchr(_currentAnimation->_header._soundName.c_str(), '.');
+ assert(chP);
+
+ // Handle both Rex naming (xxx.009) and naming in later games (e.g. xxx.ph9)
+ int driverNum = atoi(chP + 3);
+ // HACK for Dragon
+ if (_currentAnimation->_header._soundName == "#SOUND.DRG")
+ driverNum = 9;
+ _vm->_sound->init(driverNum);
+ }
+
+ // Handle any manual setup
+ if (_currentAnimation->_header._manualFlag) {
+ _manualFrameNumber = _currentAnimation->_header._spritesIndex;
+ _manualSpriteSet = _currentAnimation->getSpriteSet(_manualFrameNumber);
+ }
+
+ // Set the sound data for the animation
+ _vm->_sound->setEnabled(resEntry._soundFlag);
+
+ Common::String dsrName = _currentAnimation->_header._dsrName;
+ if (!dsrName.empty())
+ _vm->_audio->setSoundGroup(dsrName);
+
+ // Start the new animation
+ _currentAnimation->startAnimation(0);
+
+ // Handle the palette and cycling palette
+ scene._cyclingActive = false;
+ Common::copy(&palette._mainPalette[0], &palette._mainPalette[PALETTE_SIZE],
+ &palette._cyclingPalette[0]);
+
+ _vm->_game->_fx = (ScreenTransition)resEntry._fx;
+ _nextCyclingActive = paletteCycles.size() > 0;
+ if (!_vm->_game->_fx) {
+ palette.setFullPalette(palette._mainPalette);
+ }
+
+ scene.initPaletteAnimation(paletteCycles, _nextCyclingActive && !_vm->_game->_fx);
+}
+
+void AnimationView::scriptDone() {
+ _breakFlag = true;
+ _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+}
+
+void AnimationView::processLines() {
+ if (_script.eos()) {
+ // end of script, end animation
+ scriptDone();
+ return;
+ }
+
+ while (!_script.eos()) {
+ // Get in next line
+ _currentLine.clear();
+ char c;
+ while (!_script.eos() && (c = _script.readByte()) != '\n') {
+ if (c != '\r' && c != '\0')
+ _currentLine += c;
+ }
+
+ // Process the line
+ while (!_currentLine.empty()) {
+ if (_currentLine.hasPrefix("-")) {
+ _currentLine.deleteChar(0);
+
+ processCommand();
+ } else {
+ // Get resource name
+ Common::String resName;
+ while (!_currentLine.empty() && (c = _currentLine[0]) != ' ') {
+ _currentLine.deleteChar(0);
+ resName += c;
+ }
+
+ // Add resource into list along with any set state information
+ _resources.push_back(ResourceEntry(resName, _sfx, _soundFlag,
+ _bgLoadFlag, _showWhiteBars));
+
+ // Fx resets between resource entries
+ _sfx = 0;
+ }
+
+ // Skip any spaces
+ while (_currentLine.hasPrefix(" "))
+ _currentLine.deleteChar(0);
+ }
+ }
+}
+
+void AnimationView::processCommand() {
+ // Get the command character
+ char commandChar = toupper(_currentLine[0]);
+ _currentLine.deleteChar(0);
+
+ // Handle the command
+ switch (commandChar) {
+ case 'B':
+ _soundFlag = !_soundFlag;
+ break;
+ case 'H':
+ // -h[:ex] Disable EMS / XMS high memory support
+ if (_currentLine.hasPrefix(":"))
+ _currentLine.deleteChar(0);
+ while (_currentLine.hasPrefix("e") || _currentLine.hasPrefix("x"))
+ _currentLine.deleteChar(0);
+ break;
+ case 'O':
+ // -o:xxx Specify opening special effect
+ assert(_currentLine[0] == ':');
+ _currentLine.deleteChar(0);
+ _sfx = getParameter();
+ break;
+ case 'P':
+ // Switch to CONCAT mode, which is ignored anyway
+ break;
+ case 'R': {
+ // Resynch timer (always, beginning, never)
+ assert(_currentLine[0] == ':');
+ _currentLine.deleteChar(0);
+
+ char v = toupper(_currentLine[0]);
+ _currentLine.deleteChar(0);
+ if (v == 'N')
+ _resyncMode = NEVER;
+ else if (v == 'A')
+ _resyncMode = ALWAYS;
+ else if (v == 'B')
+ _resyncMode = BEGINNING;
+ else
+ error("Unknown parameter");
+ break;
+ }
+ case 'W':
+ // Switch white bars being visible
+ _showWhiteBars = !_showWhiteBars;
+ break;
+ case 'X':
+ // Exit after animation finishes. Ignore
+ break;
+ case 'D':
+ // Unimplemented and ignored in the original. Ignore as well
+ break;
+ case 'Y':
+ // Reset palette on startup
+ _resetPalette = true;
+ break;
+ default:
+ error("Unknown command char: '%c'", commandChar);
+ }
+}
+
+int AnimationView::getParameter() {
+ int result = 0;
+
+ while (!_currentLine.empty()) {
+ char c = _currentLine[0];
+
+ if (c >= '0' && c <= '9') {
+ _currentLine.deleteChar(0);
+ result = result * 10 + (c - '0');
+ } else {
+ break;
+ }
+ }
+
+ return result;
+}
+
+} // End of namespace MADS
diff --git a/engines/mads/menu_views.h b/engines/mads/menu_views.h
new file mode 100644
index 0000000000..cc5a13006f
--- /dev/null
+++ b/engines/mads/menu_views.h
@@ -0,0 +1,225 @@
+/* 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.
+ *
+ */
+
+#ifndef MADS_MENU_VIEWS_H
+#define MADS_MENU_VIEWS_H
+
+#include "common/scummsys.h"
+#include "mads/dialogs.h"
+#include "mads/game.h"
+#include "mads/msurface.h"
+
+namespace MADS {
+
+class MADSEngine;
+
+class MenuView: public FullScreenDialog {
+protected:
+ bool _breakFlag;
+ bool _redrawFlag;
+ Common::String _filename;
+
+ virtual void doFrame() = 0;
+
+ virtual void display();
+
+ /**
+ * Event handler
+ */
+ virtual bool onEvent(Common::Event &event);
+public:
+ MenuView(MADSEngine *vm);
+
+ virtual ~MenuView() {}
+
+ virtual void show();
+
+ Common::String getResourceName();
+};
+
+struct TextLine {
+ Common::Point _pos;
+ Common::String _line;
+ int _textDisplayIndex;
+};
+
+/**
+ * Scrolling text view
+ */
+class TextView : public MenuView {
+private:
+ static char _resourceName[100];
+
+ bool _animating;
+ Common::Array<TextLine> _textLines;
+ Common::Point _pan;
+ int _panSpeed;
+ MSurface _spareScreens[4];
+ int _scrollCount;
+ int _lineY;
+ uint32 _scrollTimeout;
+ int _panCountdown;
+ int _translationX;
+ Common::File _script;
+ char _currentLine[80];
+ MSurface *_spareScreen;
+ Font *_font;
+private:
+ /**
+ * Load the text resource
+ */
+ void load();
+
+ /**
+ * Process the lines
+ */
+ void processLines();
+
+ /**
+ * Process a command from the script file
+ */
+ void processCommand();
+
+ /**
+ * Process text from the script file
+ */
+ void processText();
+
+ /**
+ * Get a parameter from line
+ */
+ int getParameter(const char **paramP);
+
+ /**
+ * Reset the game palette
+ */
+ void resetPalette();
+protected:
+ virtual void display();
+
+ virtual void doFrame();
+
+ /**
+ * Called when the script is finished
+ */
+ virtual void scriptDone();
+public:
+ /**
+ * Queue the given text resource for display
+ */
+ static void execute(MADSEngine *vm, const Common::String &resName);
+
+ TextView(MADSEngine *vm);
+
+ virtual ~TextView();
+};
+
+enum ResyncMode { NEVER, ALWAYS, BEGINNING };
+
+struct ResourceEntry {
+ Common::String _resourceName;
+ int _fx;
+ bool _soundFlag;
+ bool _bgFlag;
+ bool _showWhiteBars;
+
+ ResourceEntry() {}
+ ResourceEntry(const Common::String &resName, int fx, bool soundFlag,
+ bool bgFlag, bool showWhiteBars) {
+ _resourceName = resName;
+ _fx = fx;
+ _soundFlag = soundFlag;
+ _bgFlag = bgFlag;
+ _showWhiteBars = showWhiteBars;
+ }
+};
+
+struct ResIndexEntry {
+ int _id;
+ int _v;
+ Common::String _resourceName;
+
+ ResIndexEntry() {}
+};
+
+/**
+* Animation cutscene view
+*/
+class AnimationView : public MenuView {
+private:
+ static char _resourceName[100];
+
+ Common::File _script;
+ uint32 _previousUpdate;
+ Common::String _currentLine;
+ bool _soundDriverLoaded;
+ bool _resetPalette;
+ ResyncMode _resyncMode;
+ int _sfx;
+ bool _soundFlag;
+ bool _bgLoadFlag;
+ bool _showWhiteBars;
+ Common::Array<ResourceEntry> _resources;
+ Common::Array<ResIndexEntry> _resIndex;
+ int _v1;
+ int _v2;
+ int _resourceIndex;
+ SceneInfo *_sceneInfo;
+ Animation *_currentAnimation;
+ int _manualFrameNumber;
+ SpriteAsset *_manualSpriteSet;
+ int _manualStartFrame, _manualEndFrame;
+ int _manualFrame2;
+ int _animFrameNumber;
+ bool _nextCyclingActive;
+private:
+ void load();
+
+ void processLines();
+
+ void processCommand();
+
+ int getParameter();
+
+ void loadNextResource();
+protected:
+ virtual void display();
+
+ virtual void doFrame();
+
+ virtual bool onEvent(Common::Event &event);
+
+ virtual void scriptDone();
+public:
+ /**
+ * Queue the given text resource for display
+ */
+ static void execute(MADSEngine *vm, const Common::String &resName);
+
+ AnimationView(MADSEngine *vm);
+
+ virtual ~AnimationView();
+};
+
+} // End of namespace MADS
+
+#endif /* MADS_MENU_VIEWS_H */
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 96353e9ae5..fc04a2f8ba 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -35,6 +35,7 @@ MODULE_OBJS := \
hotspots.o \
inventory.o \
mads.o \
+ menu_views.o \
messages.o \
msurface.o \
palette.o \
diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp
index 349f4a5f23..39824bac4b 100644
--- a/engines/mads/msurface.cpp
+++ b/engines/mads/msurface.cpp
@@ -87,7 +87,6 @@ void MSurface::drawSprite(const Common::Point &pt, SpriteInfo &info, const Commo
// rectangle is always 0, 0
assert(clipRect.top == 0 && clipRect.left == 0);
- // TODO: Put err* and scaled* into SpriteInfo
int errX = info.hotX * info.scaleX % 100;
int errY = info.hotY * info.scaleY % 100;
int scaledWidth = scaleValue(info.width, info.scaleX, errX);
@@ -160,7 +159,6 @@ void MSurface::drawSprite(const Common::Point &pt, SpriteInfo &info, const Commo
if (status == kStatusDraw && clipY == 0) {
// Draw previously scaled line
- // TODO Implement different drawing types (depth, shadow etc.)
byte *tempDst = dst;
for (int lineX = 0; lineX < scaledWidth; lineX++) {
byte pixel = scaledLineBuf[lineX];
@@ -186,8 +184,6 @@ void MSurface::drawSprite(const Common::Point &pt, SpriteInfo &info, const Commo
}
dst += pitch;
heightAmt--;
- // TODO depth etc.
- //depthAddress += Destination -> Width;
errY += 100;
if (errY >= 0)
@@ -266,11 +262,11 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth,
int highestDim = MAX(frameWidth, frameHeight);
bool lineDist[MADS_SCREEN_WIDTH];
- int distIndex = 0;
int distXCount = 0, distYCount = 0;
if (scale != -1) {
int distCtr = 0;
+ int distIndex = 0;
do {
distCtr += scale;
if (distCtr < 100) {
@@ -356,9 +352,10 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth,
if (widthAmount > 0)
spriteWidth -= widthAmount;
- int spriteRight = spriteLeft + spriteWidth;
if (spriteWidth <= 0)
return;
+
+ int spriteRight = spriteLeft + spriteWidth;
if (flipped) {
destX += distXCount - 1;
spriteLeft = -(distXCount - spriteRight);
diff --git a/engines/mads/msurface.h b/engines/mads/msurface.h
index 3a5bf22eed..ebfb1f437a 100644
--- a/engines/mads/msurface.h
+++ b/engines/mads/msurface.h
@@ -64,6 +64,11 @@ public:
* Helper method for calculating new dimensions when scaling a sprite
*/
static int scaleValue(int value, int scale, int err);
+
+ /**
+ * Base method for descendents to load their contents
+ */
+ virtual void load(const Common::String &resName) {}
public:
/**
* Basic constructor
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 57edbf9c19..f51d046951 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -314,13 +314,13 @@ void DialogsNebular::showDialog() {
break;
}
case DIALOG_TEXTVIEW: {
- TextView *dlg = new TextView(_vm);
+ TextView *dlg = new RexTextView(_vm);
dlg->show();
delete dlg;
break;
}
case DIALOG_ANIMVIEW: {
- AnimationView *dlg = new AnimationView(_vm);
+ AnimationView *dlg = new RexAnimationView(_vm);
dlg->show();
delete dlg;
break;
@@ -553,62 +553,6 @@ void PictureDialog::restore() {
/*------------------------------------------------------------------------*/
-FullScreenDialog::FullScreenDialog(MADSEngine *vm) : _vm(vm) {
- _screenId = 990;
- _palFlag = true;
-}
-
-FullScreenDialog::~FullScreenDialog() {
- _vm->_screen.resetClipBounds();
- _vm->_game->_scene.restrictScene();
-}
-
-void FullScreenDialog::display() {
- Game &game = *_vm->_game;
- Scene &scene = game._scene;
-
- int nextSceneId = scene._nextSceneId;
- int currentSceneId = scene._currentSceneId;
- int priorSceneId = scene._priorSceneId;
-
- SceneInfo *sceneInfo = SceneInfo::init(_vm);
- sceneInfo->load(_screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
-
- scene._priorSceneId = priorSceneId;
- scene._currentSceneId = currentSceneId;
- scene._nextSceneId = nextSceneId;
-
- _vm->_events->initVars();
- game._kernelMode = KERNEL_ROOM_INIT;
-
- byte pal[768];
- if (_vm->_screenFade) {
- Common::fill(&pal[0], &pal[PALETTE_SIZE], 0);
- _vm->_palette->setFullPalette(pal);
- } else {
- _vm->_palette->getFullPalette(pal);
- _vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16);
- }
-
- // Set Fx state and palette entries
- game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
- game._trigger = 0;
-
- // Clear the screen and draw the upper and lower horizontal lines
- _vm->_screen.empty();
- _vm->_palette->setLowRange();
- _vm->_screen.hLine(0, 20, MADS_SCREEN_WIDTH, 2);
- _vm->_screen.hLine(0, 179, MADS_SCREEN_WIDTH, 2);
- _vm->_screen.copyRectToScreen(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT));
-
- // Restrict the screen to the area between the two lines
- _vm->_screen.setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH,
- DIALOG_TOP + MADS_SCENE_HEIGHT));
- _vm->_game->_scene.restrictScene();
-}
-
-/*------------------------------------------------------------------------*/
-
GameDialog::DialogLine::DialogLine() {
_active = true;
_state = DLGSTATE_UNSELECTED;
@@ -650,6 +594,9 @@ GameDialog::GameDialog(MADSEngine *vm) : FullScreenDialog(vm) {
_vm->_events->waitCursor();
scene.clearVocab();
scene._dynamicHotspots.clear();
+ // Clear scene sprites and objects
+ scene._spriteSlots.reset();
+ _vm->_game->_screenObjects.clear();
_vm->_dialogs->_defaultPosition = Common::Point(-1, -1);
_menuSpritesIndex = 0;
}
@@ -657,6 +604,14 @@ GameDialog::GameDialog(MADSEngine *vm) : FullScreenDialog(vm) {
void GameDialog::display() {
FullScreenDialog::display();
+ Palette &palette = *_vm->_palette;
+ palette.setEntry(10, 0, 63, 0);
+ palette.setEntry(11, 0, 45, 0);
+ palette.setEntry(12, 63, 63, 0);
+ palette.setEntry(13, 45, 45, 0);
+ palette.setEntry(14, 63, 63, 63);
+ palette.setEntry(15, 45, 45, 45);
+
Scene &scene = _vm->_game->_scene;
SpriteAsset *menuSprites = new SpriteAsset(_vm, "*MENU", 0);
_menuSpritesIndex = scene._sprites.add(menuSprites);
@@ -964,6 +919,7 @@ void GameDialog::refreshText() {
DifficultyDialog::DifficultyDialog(MADSEngine *vm) : GameDialog(vm) {
setLines();
+ _vm->_palette->resetGamePalette(18, 10);
}
void DifficultyDialog::setLines() {
@@ -1108,6 +1064,14 @@ void OptionsDialog::display() {
void OptionsDialog::show() {
Nebular::GameNebular &game = *(Nebular::GameNebular *)_vm->_game;
+
+ // Previous options, restored when cancel is selected
+ bool prevEasyMouse = _vm->_easyMouse;
+ bool prevInvObjectsAnimated = _vm->_invObjectsAnimated;
+ bool prevTextWindowStill = _vm->_textWindowStill;
+ ScreenFade prevScreenFade = _vm->_screenFade;
+ StoryMode prevStoryMode = game._storyMode;
+
do {
_selectedLine = 0;
GameDialog::show();
@@ -1152,10 +1116,15 @@ void OptionsDialog::show() {
switch (_selectedLine) {
case 8: // Done
- // TODO: Copy from temporary config
+ // New options will be applied
break;
case 9: // Cancel
- // TODO: Ignore all changes to temporary config
+ // Revert all options from the saved ones
+ _vm->_easyMouse = prevEasyMouse;
+ _vm->_invObjectsAnimated = prevInvObjectsAnimated;
+ _vm->_textWindowStill = prevTextWindowStill;
+ _vm->_screenFade = prevScreenFade;
+ game._storyMode = prevStoryMode;
break;
default:
break;
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index f64f992611..d00cd87ead 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -31,8 +31,6 @@ namespace MADS {
namespace Nebular {
-#define DIALOG_TOP 22
-
enum CapitalizationMode { kUppercase = 0, kLowercase = 1, kUpperAndLower = 2 };
class DialogsNebular : public Dialogs {
@@ -109,36 +107,6 @@ enum DialogTextAlign { ALIGN_NONE = 0, ALIGN_CENTER = -1, ALIGN_AT_CENTER = -2,
enum DialogState { DLGSTATE_UNSELECTED = 0, DLGSTATE_SELECTED = 1, DLGSTATE_FOCUSED = 2 };
-class FullScreenDialog: public EventTarget {
-protected:
- /**
- * Engine reference
- */
- MADSEngine *_vm;
-
- /**
- * Screen/scene to show background from
- */
- int _screenId;
-
- /**
- * Flag for palette initialization
- */
- bool _palFlag;
-
- /**
- * Handles displaying the screen background and dialog
- */
- virtual void display();
-public:
- /**
- * Constructor
- */
- FullScreenDialog(MADSEngine *vm);
-
- virtual ~FullScreenDialog();
-};
-
class GameDialog: public FullScreenDialog {
struct DialogLine {
bool _active;
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 902f42507a..eae74d6da0 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -27,6 +27,7 @@
#include "mads/game.h"
#include "mads/screen.h"
#include "mads/msurface.h"
+#include "mads/menu_views.h"
#include "mads/nebular/game_nebular.h"
#include "mads/nebular/dialogs_nebular.h"
#include "mads/nebular/globals_nebular.h"
@@ -309,6 +310,31 @@ void GameNebular::setSectionHandler() {
}
void GameNebular::checkShowDialog() {
+ // Handling to start endgame sequences if the win/lose type has been set
+ switch (_winStatus) {
+ case 1:
+ // No shields failure ending
+ AnimationView::execute(_vm, "rexend1");
+ break;
+ case 2:
+ // Shields, but no targetting failure ending
+ AnimationView::execute(_vm, "rexend2");
+ break;
+ case 3:
+ // Completed game successfully, so activate quotes item on the main menu
+ ConfMan.setBool("ShowQuotes", true);
+ ConfMan.flushToDisk();
+
+ AnimationView::execute(_vm, "rexend3");
+ break;
+ case 4:
+ // Decompression ending
+ TextView::execute(_vm, "ending4");
+ break;
+ }
+ _winStatus = 0;
+
+ // Loop for showing dialogs, if any need to be shown
if (_vm->_dialogs->_pendingDialog && _player._stepEnabled && !_globals[kCopyProtectFailed]) {
_player.releasePlayerSprites();
diff --git a/engines/mads/nebular/game_nebular.h b/engines/mads/nebular/game_nebular.h
index da607d47ee..efa21a2e73 100644
--- a/engines/mads/nebular/game_nebular.h
+++ b/engines/mads/nebular/game_nebular.h
@@ -133,18 +133,16 @@ public:
virtual void synchronize(Common::Serializer &s, bool phase1);
};
-
+// Section handlers aren't needed in ScummVM implementation
class Section1Handler : public SectionHandler {
public:
Section1Handler(MADSEngine *vm) : SectionHandler(vm) {}
- // TODO: Properly implement handler methods
virtual void preLoadSection() {}
virtual void sectionPtr2() {}
virtual void postLoadSection() {}
};
-// TODO: Properly implement handler classes
typedef Section1Handler Section2Handler;
typedef Section1Handler Section3Handler;
typedef Section1Handler Section4Handler;
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 88453ecdba..f2f90e2291 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -21,8 +21,10 @@
*/
#include "common/scummsys.h"
+#include "common/config-manager.h"
#include "mads/game.h"
#include "mads/mads.h"
+#include "mads/menu_views.h"
#include "mads/resources.h"
#include "mads/scene.h"
#include "mads/screen.h"
@@ -36,45 +38,6 @@ namespace Nebular {
#define MADS_MENU_Y ((MADS_SCREEN_HEIGHT - MADS_SCENE_HEIGHT) / 2)
#define MADS_MENU_ANIM_DELAY 70
-MenuView::MenuView(MADSEngine *vm) : FullScreenDialog(vm) {
- _breakFlag = false;
- _redrawFlag = true;
- _palFlag = false;
-}
-
-void MenuView::show() {
- Scene &scene = _vm->_game->_scene;
- EventsManager &events = *_vm->_events;
- _vm->_screenFade = SCREEN_FADE_FAST;
-
- scene._spriteSlots.reset(true);
- display();
-
- events.setEventTarget(this);
- events.hideCursor();
-
- while (!_breakFlag && !_vm->shouldQuit()) {
- if (_redrawFlag) {
- _vm->_game->_scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
- _redrawFlag = false;
- }
-
- _vm->_events->waitForNextFrame();
- _vm->_game->_fx = kTransitionNone;
- doFrame();
- }
-
- events.setEventTarget(nullptr);
-}
-
-void MenuView::display() {
- _vm->_palette->resetGamePalette(4, 8);
-
- FullScreenDialog::display();
-}
-
-/*------------------------------------------------------------------------*/
-
MainMenu::MainMenu(MADSEngine *vm): MenuView(vm) {
Common::fill(&_menuItems[0], &_menuItems[7], (SpriteAsset *)nullptr);
Common::fill(&_menuItemIndexes[0], &_menuItemIndexes[7], -1);
@@ -91,6 +54,17 @@ MainMenu::MainMenu(MADSEngine *vm): MenuView(vm) {
}
MainMenu::~MainMenu() {
+ Scene &scene = _vm->_game->_scene;
+ for (int i = 0; i < 7; ++i) {
+ if (_menuItemIndexes[i] != -1)
+ scene._sprites.remove(_menuItemIndexes[i]);
+ }
+
+ scene._spriteSlots.reset();
+}
+
+bool MainMenu::shouldShowQuotes() {
+ return ConfMan.hasKey("ShowQuotes") && ConfMan.getBool("ShowQuotes");
}
void MainMenu::display() {
@@ -132,6 +106,9 @@ void MainMenu::doFrame() {
handleAction((MADSGameAction)_selectedIndex);
} else {
for (_menuItemIndex = 0; _menuItemIndex < 6; ++_menuItemIndex) {
+ if (_menuItemIndex == 4 && !shouldShowQuotes())
+ continue;
+
if (_menuItemIndex != _selectedIndex) {
addSpriteSlot();
}
@@ -151,6 +128,9 @@ void MainMenu::doFrame() {
if (_skipFlag && _menuItemIndex >= 0) {
// Quickly loop through all the menu items to display each's final frame
for (; _menuItemIndex < 6; ++_menuItemIndex) {
+ if (_menuItemIndex == 4 && !shouldShowQuotes())
+ continue;
+
// Draw the final frame of the menuitem
_frameIndex = 0;
addSpriteSlot();
@@ -160,9 +140,12 @@ void MainMenu::doFrame() {
} else {
if ((_menuItemIndex == -1) || (_frameIndex == 0)) {
if (++_menuItemIndex == 6) {
+
// Reached end of display animation
_vm->_events->showCursor();
return;
+ } else if (_menuItemIndex == 4 && !shouldShowQuotes()) {
+ ++_menuItemIndex;
}
_frameIndex = _menuItems[_menuItemIndex]->getCount() - 1;
@@ -340,7 +323,7 @@ void MainMenu::handleAction(MADSGameAction action) {
return;
case SHOW_INTRO:
- AnimationView::execute(_vm, "@rexopen");
+ AnimationView::execute(_vm, "rexopen");
break;
case CREDITS:
@@ -394,6 +377,7 @@ void AdvertView::show() {
events.setEventTarget(nullptr);
_vm->quitGame();
+ events.pollEvents();
}
bool AdvertView::onEvent(Common::Event &event) {
@@ -407,493 +391,16 @@ bool AdvertView::onEvent(Common::Event &event) {
/*------------------------------------------------------------------------*/
-char TextView::_resourceName[100];
-#define TEXTVIEW_LINE_SPACING 2
-#define TEXT_ANIMATION_DELAY 100
-#define TV_NUM_FADE_STEPS 40
-#define TV_FADE_DELAY_MILLI 50
-
-void TextView::execute(MADSEngine *vm, const Common::String &resName) {
- assert(resName.size() < 100);
- strncpy(_resourceName, resName.c_str(), sizeof(_resourceName));
- vm->_dialogs->_pendingDialog = DIALOG_TEXTVIEW;
-}
-
-TextView::TextView(MADSEngine *vm) : MenuView(vm) {
- _animating = false;
- _panSpeed = 0;
- Common::fill(&_spareScreens[0], &_spareScreens[10], 0);
- _spareScreen = nullptr;
- _scrollCount = 0;
- _lineY = -1;
- _scrollTimeout = 0;
- _panCountdown = 0;
- _translationX = 0;
-
- _font = _vm->_font->getFont(FONT_CONVERSATION);
- _vm->_palette->resetGamePalette(4, 0);
- load();
-}
-
-TextView::~TextView() {
- delete _spareScreen;
-}
-
-void TextView::load() {
- Common::String scriptName(_resourceName);
- scriptName += ".txr";
-
- if (!_script.open(scriptName))
- error("Could not open resource %s", _resourceName);
-
- processLines();
-}
-
-void TextView::processLines() {
- if (_script.eos())
- error("Attempted to read past end of response file");
-
- while (!_script.eos()) {
- // Read in the next line
- _script.readLine(_currentLine, 79);
- char *p = _currentLine + strlen(_currentLine) - 1;
- if (*p == '\n')
- *p = '\0';
-
- // Commented out line, so go loop for another
- if (_currentLine[0] == '#')
- continue;
-
- // Process the line
- char *cStart = strchr(_currentLine, '[');
- if (cStart) {
- while (cStart) {
- // Loop for possible multiple commands on one line
- char *cEnd = strchr(_currentLine, ']');
- if (!cEnd)
- error("Unterminated command '%s' in response file", _currentLine);
-
- *cEnd = '\0';
- processCommand();
-
- // Copy rest of line (if any) to start of buffer
- strncpy(_currentLine, cEnd + 1, sizeof(_currentLine));
-
- cStart = strchr(_currentLine, '[');
- }
-
- if (_currentLine[0]) {
- processText();
- break;
- }
-
- } else {
- processText();
- break;
- }
- }
-}
-
-void TextView::processCommand() {
- Common::String scriptLine(_currentLine + 1);
- scriptLine.toUppercase();
- const char *paramP;
- const char *commandStr = scriptLine.c_str();
-
- if (!strncmp(commandStr, "BACKGROUND", 10)) {
- // Set the background
- paramP = commandStr + 10;
- _screenId = getParameter(&paramP);
-
- } else if (!strncmp(commandStr, "GO", 2)) {
- _animating = true;
-
- } else if (!strncmp(commandStr, "PAN", 3)) {
- // Set panning values
- paramP = commandStr + 3;
- int panX = getParameter(&paramP);
- int panY = getParameter(&paramP);
- int panSpeed = getParameter(&paramP);
-
- if ((panX != 0) || (panY != 0)) {
- _pan = Common::Point(panX, panY);
- _panSpeed = panSpeed;
- }
-
- } else if (!strncmp(commandStr, "DRIVER", 6)) {
- // Set the driver to use
- paramP = commandStr + 7;
-
- if (!strncmp(paramP, "#SOUND.00", 9)) {
- int driverNum = paramP[9] - '0';
- _vm->_sound->init(driverNum);
- }
- } else if (!strncmp(commandStr, "SOUND", 5)) {
- // Set sound number
- paramP = commandStr + 5;
- int soundId = getParameter(&paramP);
- _vm->_sound->command(soundId);
-
- } else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') ||
- (commandStr[5] == '1'))) {
- // Set the text colors
- int index = commandStr[5] - '0';
- paramP = commandStr + 6;
-
- byte palEntry[3];
- palEntry[0] = getParameter(&paramP) << 2;
- palEntry[1] = getParameter(&paramP) << 2;
- palEntry[2] = getParameter(&paramP) << 2;
- _vm->_palette->setPalette(&palEntry[0], 5 + index, 1);
-
- } else if (!strncmp(commandStr, "SPARE", 5)) {
- // Sets a secondary background number that can be later switched in with a PAGE command
- paramP = commandStr + 6;
- int spareIndex = commandStr[5] - '0';
- if ((spareIndex >= 0) && (spareIndex <= 9)) {
- int screenId = getParameter(&paramP);
-
- _spareScreens[spareIndex] = screenId;
- }
-
- } else if (!strncmp(commandStr, "PAGE", 4)) {
- // Signals to change to a previous specified secondary background
- paramP = commandStr + 4;
- int spareIndex = getParameter(&paramP);
-
- // Only allow background switches if one isn't currently in progress
- if (!_spareScreen && (_spareScreens[spareIndex] != 0)) {
- _spareScreen = new MSurface(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT);
- //_spareScreen->loadBackground(_spareScreens[spareIndex], &_bgSpare);
-
- _translationX = 0;
- }
-
- } else {
- error("Unknown response command: '%s'", commandStr);
- }
-}
-
-int TextView::getParameter(const char **paramP) {
- if ((**paramP != '=') && (**paramP != ','))
- return 0;
-
- int result = 0;
- ++*paramP;
- while ((**paramP >= '0') && (**paramP <= '9')) {
- result = result * 10 + (**paramP - '0');
- ++*paramP;
- }
-
- return result;
-}
-
-void TextView::processText() {
- int lineWidth, xStart;
-
- if (!strcmp(_currentLine, "***")) {
- // Special signifier for end of script
- _scrollCount = _font->getHeight() * 13;
- _lineY = -1;
- return;
- }
-
- _lineY = 0;
-
- // Lines are always centered, except if line contains a '@', in which case the
- // '@' marks the position that must be horizontally centered
- char *centerP = strchr(_currentLine, '@');
- if (centerP) {
- *centerP = '\0';
- xStart = (MADS_SCREEN_WIDTH / 2) - _font->getWidth(_currentLine);
-
- // Delete the @ character and shift back the remainder of the string
- char *p = centerP + 1;
- if (*p == ' ') ++p;
- strcpy(centerP, p);
-
- } else {
- lineWidth = _font->getWidth(_currentLine);
- xStart = (MADS_SCREEN_WIDTH - lineWidth) / 2;
- }
-
- // Add the new line to the list of pending lines
- TextLine tl;
- tl._pos = Common::Point(xStart, 155);
- tl._line = _currentLine;
- _textLines.push_back(tl);
-}
-
-void TextView::display() {
- resetPalette();
-
- FullScreenDialog::display();
- _sceneChanged = true;
-}
-
-void TextView::resetPalette() {
- _vm->_palette->resetGamePalette(8, 8);
- _vm->_palette->setEntry(5, 0, 63, 63);
- _vm->_palette->setEntry(6, 0, 45, 45);
-}
-
-void TextView::doFrame() {
- Scene &scene = _vm->_game->_scene;
- if (!_animating)
- return;
-
- // Only update state if wait period has expired
- uint32 currTime = g_system->getMillis();
-
- // If a screen transition is in progress and it's time for another column, handle it
- if (_spareScreen) {
- byte *srcP = _spareScreen->getBasePtr(_translationX, 0);
- byte *destP = scene._backgroundSurface.getBasePtr(_translationX, 0);
-
- for (int y = 0; y < MADS_SCENE_HEIGHT; ++y, srcP += _spareScreen->w,
- destP += MADS_SCREEN_WIDTH) {
- *destP = *srcP;
- }
-
- if (++_translationX >= MADS_SCREEN_WIDTH) {
- // Surface transition is complete
- /*
- delete _spareScreen;
- _spareScreen = nullptr;
-
-// _vm->_palette->deleteRange(_bgCurrent);
- delete _bgCurrent;
- _bgCurrent = _bgSpare;
- _bgSpare = nullptr;
- */
- }
- }
-
- // Make sure it's time for an update
- if (currTime < _scrollTimeout)
- return;
- _scrollTimeout = g_system->getMillis() + TEXT_ANIMATION_DELAY;
- _redrawFlag = true;
-
- // If any panning values are set, pan the background surface
- if ((_pan.x != 0) || (_pan.y != 0)) {
- if (_panCountdown > 0) {
- --_panCountdown;
- return;
- }
-
- // Handle horizontal panning
- if (_pan.x != 0) {
- byte *lineTemp = new byte[_pan.x];
- for (int y = 0; y < MADS_SCENE_HEIGHT; ++y) {
- byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
-
- // Copy the first X pixels into temp buffer, move the rest of the line
- // to the start of the line, and then move temp buffer pixels to end of line
- Common::copy(pixelsP, pixelsP + _pan.x, lineTemp);
- Common::copy(pixelsP + _pan.x, pixelsP + MADS_SCREEN_WIDTH, pixelsP);
- Common::copy(lineTemp, lineTemp + _pan.x, pixelsP + MADS_SCREEN_WIDTH - _pan.x);
- }
-
- delete[] lineTemp;
- }
-
- // Handle vertical panning
- if (_pan.y != 0) {
- // Store the bottom Y lines into a temp buffer, move the rest of the lines down,
- // and then copy the stored lines back to the top of the screen
- byte *linesTemp = new byte[_pan.y * MADS_SCREEN_WIDTH];
- byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, MADS_SCENE_HEIGHT - _pan.y);
- Common::copy(pixelsP, pixelsP + MADS_SCREEN_WIDTH * _pan.y, linesTemp);
-
- for (int y = MADS_SCENE_HEIGHT - 1; y >= _pan.y; --y) {
- byte *destP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
- byte *srcP = (byte *)scene._backgroundSurface.getBasePtr(0, y - _pan.y);
- Common::copy(srcP, srcP + MADS_SCREEN_WIDTH, destP);
- }
-
- Common::copy(linesTemp, linesTemp + _pan.y * MADS_SCREEN_WIDTH,
- (byte *)scene._backgroundSurface.getPixels());
- delete[] linesTemp;
- }
-
- // Flag for a full screen refresh
- scene._spriteSlots.fullRefresh();
- }
-
- // Scroll all active text lines up
- scene._textDisplay.reset();
- for (int i = _textLines.size() - 1; i >= 0; --i) {
- TextLine &tl = _textLines[i];
- tl._pos.y--;
- if (tl._pos.y < 0) {
- _textLines.remove_at(i);
- } else {
- scene._textDisplay.add(tl._pos.x, tl._pos.y, 0x605, -1, tl._line, _font);
- }
- }
-
- if (_scrollCount > 0) {
- // Handling final scrolling of text off of screen
- if (--_scrollCount == 0) {
- scriptDone();
- return;
- }
- } else {
- // Handling a text row
- if (++_lineY == (_font->getHeight() + TEXTVIEW_LINE_SPACING))
- processLines();
- }
-}
-
-void TextView::scriptDone() {
- _breakFlag = true;
-}
-
-/*------------------------------------------------------------------------*/
-
-char AnimationView::_resourceName[100];
-
-void AnimationView::execute(MADSEngine *vm, const Common::String &resName) {
- assert(resName.size() < 100);
- strncpy(_resourceName, resName.c_str(), sizeof(_resourceName));
- vm->_dialogs->_pendingDialog = DIALOG_ANIMVIEW;
-}
-
-AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
- _soundDriverLoaded = false;
- _previousUpdate = 0;
-}
-
-void AnimationView::load() {
- Common::String resName(_resourceName);
- if (!resName.hasSuffix("."))
- resName += ".res";
-
- if (!_script.open(resName))
- error("Could not open resource %s", resName.c_str());
-
- processLines();
-}
-
-bool AnimationView::onEvent(Common::Event &event) {
- // Wait for the Escape key or a mouse press
- if (((event.type == Common::EVENT_KEYDOWN) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) ||
- (event.type == Common::EVENT_RBUTTONUP)) {
- scriptDone();
- return true;
- }
-
- return false;
-}
-
-void AnimationView::doFrame() {
- Scene &scene = _vm->_game->_scene;
- int bgNumber = 0;
-
- // Only update state if wait period has expired
- if (_previousUpdate > 0) {
- if (g_system->getMillis() - _previousUpdate < 3000) {
- return;
- } else {
- // time for an update
- _previousUpdate = g_system->getMillis();
- }
- } else {
- _previousUpdate = g_system->getMillis();
- return;
- }
-
- char bgFile[10];
- strncpy(bgFile, _currentFile, 5);
- bgFile[0] = bgFile[2];
- bgFile[1] = bgFile[3];
- bgFile[2] = bgFile[4];
- bgFile[3] = '\0';
- bgNumber = atoi(bgFile);
- sprintf(bgFile, "rm%i.art", bgNumber);
-
- // Not all scenes have a background. If there is one, refresh it
- if (Common::File::exists(bgFile)) {
- _vm->_palette->resetGamePalette(4, 8);
- SceneInfo *sceneInfo = SceneInfo::init(_vm);
- sceneInfo->load(bgNumber, 0, Common::String(), 0, scene._depthSurface,
- scene._backgroundSurface);
- }
-
- // Read next line
- processLines();
-}
+void RexAnimationView::scriptDone() {
+ AnimationView::scriptDone();
-void AnimationView::scriptDone() {
- _breakFlag = true;
- _vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
-}
-
-void AnimationView::processLines() {
- if (_script.eos()) {
- // end of script, end animation
- scriptDone();
- return;
- }
-
- while (!_script.eos()) {
- _script.readLine(_currentLine, 79);
-
- // Process the line
- char *cStart = strchr(_currentLine, '-');
- if (cStart) {
- while (cStart) {
- // Loop for possible multiple commands on one line
- char *cEnd = strchr(_currentLine, ' ');
- if (!cEnd)
- error("Unterminated command '%s' in response file", _currentLine);
-
- *cEnd = '\0';
- processCommand();
-
- // Copy rest of line (if any) to start of buffer
- // Don't use strcpy() here, because if the
- // rest of the line is the longer of the two
- // strings, the memory areas will overlap.
- memmove(_currentLine, cEnd + 1, strlen(cEnd + 1) + 1);
-
- cStart = strchr(_currentLine, '-');
- }
-
- if (_currentLine[0]) {
- sprintf(_currentFile, "%s", _currentLine);
- //printf("File: %s\n", _currentLine);
- break;
- }
-
- } else {
- sprintf(_currentFile, "%s", _currentLine);
- warning("File: %s\n", _currentLine);
- break;
- }
- }
-}
-
-void AnimationView::processCommand() {
- Common::String commandLine(_currentLine + 1);
- commandLine.toUppercase();
- const char *commandStr = commandLine.c_str();
- const char *param = commandStr;
-
- if (!strncmp(commandStr, "X", 1)) {
- //printf("X ");
- } else if (!strncmp(commandStr, "W", 1)) {
- //printf("W ");
- } else if (!strncmp(commandStr, "R", 1)) {
- param = param + 2;
- //printf("R:%s ", param);
- } else if (!strncmp(commandStr, "O", 1)) {
- // Set the transition effect
- param = param + 2;
- _vm->_game->_fx = (ScreenTransition)atoi(param);
- } else {
- error("Unknown response command: '%s'", commandStr);
+ Common::String s = getResourceName();
+ if (s == "rexend1") {
+ TextView::execute(_vm, "ending1");
+ } else if (s == "rexend2") {
+ TextView::execute(_vm, "ending2");
+ } else if (s == "rexend3") {
+ TextView::execute(_vm, "credits");
}
}
diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h
index 767183c4b9..77b8b6fc6e 100644
--- a/engines/mads/nebular/menu_nebular.h
+++ b/engines/mads/nebular/menu_nebular.h
@@ -25,6 +25,7 @@
#include "common/scummsys.h"
#include "mads/game.h"
+#include "mads/menu_views.h"
#include "mads/msurface.h"
#include "mads/nebular/dialogs_nebular.h"
@@ -36,22 +37,6 @@ namespace Nebular {
enum MADSGameAction { START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT };
-class MenuView: public FullScreenDialog {
-protected:
- bool _breakFlag;
- bool _redrawFlag;
-
- virtual void doFrame() = 0;
-
- virtual void display();
-public:
- MenuView(MADSEngine *vm);
-
- virtual ~MenuView() {}
-
- virtual void show();
-};
-
class MainMenu: public MenuView {
private:
SpriteAsset *_menuItems[7];
@@ -95,6 +80,8 @@ private:
* Add a sprite slot for the current menuitem frame
*/
void addSpriteSlot();
+
+ bool shouldShowQuotes();
protected:
/**
* Display the menu
@@ -143,116 +130,16 @@ public:
void show();
};
-struct TextLine {
- Common::Point _pos;
- Common::String _line;
-};
-
-/**
- * Scrolling text view
- */
-class TextView : public MenuView {
-private:
- static char _resourceName[100];
-
- bool _animating;
- bool _sceneChanged;
- Common::Array<TextLine> _textLines;
- Common::Point _pan;
- int _panSpeed;
- int _spareScreens[10];
- int _scrollCount;
- int _lineY;
- uint32 _scrollTimeout;
- int _panCountdown;
- int _translationX;
- Common::File _script;
- char _currentLine[80];
- MSurface *_spareScreen;
- Font *_font;
-private:
- /**
- * Load the text resource
- */
- void load();
-
- /**
- * Process the lines
- */
- void processLines();
-
- /**
- * Process a command from the script file
- */
- void processCommand();
-
- /**
- * Process text from the script file
- */
- void processText();
-
- /**
- * Get a parameter from line
- */
- int getParameter(const char **paramP);
-
- /**
- * Called when the script is finished
- */
- void scriptDone();
-
- /**
- * Reset the game palette
- */
- void resetPalette();
+class RexAnimationView : public AnimationView {
protected:
- virtual void display();
-
- virtual void doFrame();
+ virtual void scriptDone();
public:
- /**
- * Queue the given text resource for display
- */
- static void execute(MADSEngine *vm, const Common::String &resName);
-
- TextView(MADSEngine *vm);
-
- virtual ~TextView();
+ RexAnimationView(MADSEngine *vm) : AnimationView(vm) {}
};
-/**
-* Animation cutscene view
-*/
-class AnimationView : public MenuView {
-private:
- static char _resourceName[100];
-
- Common::File _script;
- uint32 _previousUpdate;
- char _currentLine[80];
- char _currentFile[10];
- bool _soundDriverLoaded;
-private:
- void load();
-
- void processLines();
-
- void processCommand();
-
- void scriptDone();
-protected:
- virtual void doFrame();
-
- virtual bool onEvent(Common::Event &event);
+class RexTextView : public TextView {
public:
- /**
- * Queue the given text resource for display
- */
- static void execute(MADSEngine *vm, const Common::String &resName);
-
- AnimationView(MADSEngine *vm);
-
- virtual ~AnimationView() {}
+ RexTextView(MADSEngine *vm) : TextView(vm) {}
};
} // End of namespace Nebular
diff --git a/engines/mads/nebular/nebular_scenes5.cpp b/engines/mads/nebular/nebular_scenes5.cpp
index 5a67d1541f..66d8294fc6 100644
--- a/engines/mads/nebular/nebular_scenes5.cpp
+++ b/engines/mads/nebular/nebular_scenes5.cpp
@@ -2847,8 +2847,6 @@ void Scene551::actions() {
_vm->_dialogs->show(55113);
else if (_action.isAction(VERB_LOOK, NOUN_TELEPORTER))
_vm->_dialogs->show(55114);
- else if (_action.isAction(VERB_LOOK, NOUN_BUILDING))
- _vm->_dialogs->show(55115);
else if (_action.isAction(VERB_LOOK, NOUN_SIDEWALK_TO_WEST)) {
if (_game._visitedScenes.exists(505))
_vm->_dialogs->show(55116);
diff --git a/engines/mads/nebular/nebular_scenes6.cpp b/engines/mads/nebular/nebular_scenes6.cpp
index d33675c578..13ee1a3dc1 100644
--- a/engines/mads/nebular/nebular_scenes6.cpp
+++ b/engines/mads/nebular/nebular_scenes6.cpp
@@ -643,7 +643,8 @@ void Scene603::actions() {
_game._player._visible = true;
_game._player._stepEnabled = true;
}
- }
+ } else
+ _vm->_dialogs->show(60323);
} else if (_action._lookFlag)
_vm->_dialogs->show(60310);
else if (_action.isAction(VERB_LOOK, NOUN_BED))
@@ -670,8 +671,6 @@ void Scene603::actions() {
_vm->_dialogs->show(60321);
else if (_action.isAction(VERB_TAKE, NOUN_PERFUME))
_vm->_dialogs->show(60322);
- else if (_action.isAction(VERB_TAKE, NOUN_NOTE))
- _vm->_dialogs->show(60323);
else if (_action.isAction(VERB_LOOK, NOUN_NOTE)) {
if (_game._objects[OBJ_NOTE]._roomNumber == _scene->_currentSceneId)
_vm->_dialogs->show(60324);
diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp
index 4c6070b528..0a054440b2 100644
--- a/engines/mads/nebular/sound_nebular.cpp
+++ b/engines/mads/nebular/sound_nebular.cpp
@@ -24,6 +24,7 @@
#include "audio/decoders/raw.h"
#include "common/algorithm.h"
#include "common/debug.h"
+#include "common/md5.h"
#include "common/memstream.h"
#include "mads/sound.h"
#include "mads/nebular/sound_nebular.h"
@@ -149,7 +150,7 @@ AdlibSample::AdlibSample(Common::SeekableReadStream &s) {
/*-----------------------------------------------------------------------*/
-ASound::ASound(Audio::Mixer *mixer, const Common::String &filename, int dataOffset) {
+ASound::ASound(Audio::Mixer *mixer, FM_OPL *opl, const Common::String &filename, int dataOffset) {
// Open up the appropriate sound file
if (!_soundFile.open(filename))
error("Could not open file - %s", filename.c_str());
@@ -197,8 +198,7 @@ ASound::ASound(Audio::Mixer *mixer, const Common::String &filename, int dataOffs
// Store passed parameters, and setup OPL
_dataOffset = dataOffset;
_mixer = mixer;
- _opl = OPL::Config::create();
- assert(_opl);
+ _opl = opl;
_opl->init(getRate());
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1,
@@ -217,7 +217,32 @@ ASound::~ASound() {
delete[] (*i)._data;
_mixer->stopHandle(_soundHandle);
- delete _opl;
+}
+
+void ASound::validate() {
+ Common::File f;
+ static const char *const MD5[] = {
+ "205398468de2c8873b7d4d73d5be8ddc",
+ "f9b2d944a2fb782b1af5c0ad592306d3",
+ "7431f8dad77d6ddfc24e6f3c0c4ac7df",
+ "eb1f3f5a4673d3e73d8ac1818c957cf4",
+ "f936dd853073fa44f3daac512e91c476",
+ "3dc139d3e02437a6d9b732072407c366",
+ "af0edab2934947982e9a405476702e03",
+ "8cbc25570b50ba41c9b5361cad4fbedc",
+ "a31e4783e098f633cbb6689adb41dd4f"
+ };
+
+ for (int i = 1; i <= 9; ++i) {
+ Common::String filename = Common::String::format("ASOUND.00%d", i);
+ if (!f.open(filename))
+ error("Could not process - %s", filename.c_str());
+ Common::String md5str = Common::computeStreamMD5AsString(f, 8192);
+ f.close();
+
+ if (md5str != MD5[i - 1])
+ error("Invalid sound file - %s", filename.c_str());
+ }
}
void ASound::adlibInit() {
@@ -941,8 +966,8 @@ const ASound1::CommandPtr ASound1::_commandList[42] = {
&ASound1::command40, &ASound1::command41
};
-ASound1::ASound1(Audio::Mixer *mixer)
- : ASound(mixer, "asound.001", 0x1520) {
+ASound1::ASound1(Audio::Mixer *mixer, FM_OPL *opl)
+ : ASound(mixer, opl, "asound.001", 0x1520) {
_cmd23Toggle = false;
// Load sound samples
@@ -1242,7 +1267,7 @@ const ASound2::CommandPtr ASound2::_commandList[44] = {
&ASound2::command40, &ASound2::command41, &ASound2::command42, &ASound2::command43
};
-ASound2::ASound2(Audio::Mixer *mixer) : ASound(mixer, "asound.002", 0x15E0) {
+ASound2::ASound2(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) {
_command12Param = 0xFD;
// Load sound samples
@@ -1613,7 +1638,7 @@ const ASound3::CommandPtr ASound3::_commandList[61] = {
&ASound3::command60
};
-ASound3::ASound3(Audio::Mixer *mixer) : ASound(mixer, "asound.003", 0x15B0) {
+ASound3::ASound3(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.003", 0x15B0) {
_command39Flag = false;
// Load sound samples
@@ -2017,7 +2042,7 @@ const ASound4::CommandPtr ASound4::_commandList[61] = {
&ASound4::command60
};
-ASound4::ASound4(Audio::Mixer *mixer) : ASound(mixer, "asound.004", 0x14F0) {
+ASound4::ASound4(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.004", 0x14F0) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 210; ++i)
@@ -2273,7 +2298,7 @@ const ASound5::CommandPtr ASound5::_commandList[42] = {
&ASound5::command40, &ASound5::command41
};
-ASound5::ASound5(Audio::Mixer *mixer) : ASound(mixer, "asound.002", 0x15E0) {
+ASound5::ASound5(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.002", 0x15E0) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x144);
for (int i = 0; i < 164; ++i)
@@ -2514,7 +2539,7 @@ const ASound6::CommandPtr ASound6::_commandList[30] = {
&ASound6::nullCommand, &ASound6::command29
};
-ASound6::ASound6(Audio::Mixer *mixer) : ASound(mixer, "asound.006", 0x1390) {
+ASound6::ASound6(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.006", 0x1390) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 200; ++i)
@@ -2670,7 +2695,7 @@ const ASound7::CommandPtr ASound7::_commandList[38] = {
&ASound7::command36, &ASound7::command37
};
-ASound7::ASound7(Audio::Mixer *mixer) : ASound(mixer, "asound.007", 0x1460) {
+ASound7::ASound7(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.007", 0x1460) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 214; ++i)
@@ -2876,7 +2901,7 @@ const ASound8::CommandPtr ASound8::_commandList[38] = {
&ASound8::command36, &ASound8::command37
};
-ASound8::ASound8(Audio::Mixer *mixer) : ASound(mixer, "asound.008", 0x1490) {
+ASound8::ASound8(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.008", 0x1490) {
// Load sound samples
_soundFile.seek(_dataOffset + 0x122);
for (int i = 0; i < 174; ++i)
@@ -3132,7 +3157,7 @@ const ASound9::CommandPtr ASound9::_commandList[52] = {
&ASound9::command48, &ASound9::command49, &ASound9::command50, &ASound9::command51
};
-ASound9::ASound9(Audio::Mixer *mixer) : ASound(mixer, "asound.009", 0x16F0) {
+ASound9::ASound9(Audio::Mixer *mixer, FM_OPL *opl) : ASound(mixer, opl, "asound.009", 0x16F0) {
_v1 = _v2 = 0;
_soundPtr = nullptr;
@@ -3143,7 +3168,7 @@ ASound9::ASound9(Audio::Mixer *mixer) : ASound(mixer, "asound.009", 0x16F0) {
}
int ASound9::command(int commandId, int param) {
- if (commandId > 60)
+ if (commandId > 51)
return 0;
_commandParam = param;
diff --git a/engines/mads/nebular/sound_nebular.h b/engines/mads/nebular/sound_nebular.h
index 744467b45e..ccfd40ad52 100644
--- a/engines/mads/nebular/sound_nebular.h
+++ b/engines/mads/nebular/sound_nebular.h
@@ -305,10 +305,12 @@ public:
public:
/**
* Constructor
+ * @param mixer Mixer
+ * @param opl OPL
* @param filename Specifies the adlib sound player file to use
* @param dataOffset Offset in the file of the data segment
*/
- ASound(Audio::Mixer *mixer, const Common::String &filename, int dataOffset);
+ ASound(Audio::Mixer *mixer, FM_OPL *opl, const Common::String &filename, int dataOffset);
/**
* Destructor
@@ -316,6 +318,11 @@ public:
virtual ~ASound();
/**
+ * Validates the Adlib sound files
+ */
+ static void validate();
+
+ /**
* Execute a player command. Most commands represent sounds to play, but some
* low number commands also provide control operations.
* @param commandId Player ommand to execute.
@@ -408,7 +415,7 @@ private:
void command111213();
int command2627293032();
public:
- ASound1(Audio::Mixer *mixer);
+ ASound1(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -460,7 +467,7 @@ private:
void command9Randomize();
void command9Apply(byte *data, int val, int incr);
public:
- ASound2(Audio::Mixer *mixer);
+ ASound2(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -520,7 +527,7 @@ private:
void command9Randomize();
void command9Apply(byte *data, int val, int incr);
public:
- ASound3(Audio::Mixer *mixer);
+ ASound3(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -558,7 +565,7 @@ private:
void method1();
public:
- ASound4(Audio::Mixer *mixer);
+ ASound4(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -604,7 +611,7 @@ private:
int command42();
int command43();
public:
- ASound5(Audio::Mixer *mixer);
+ ASound5(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -633,7 +640,7 @@ private:
int command25();
int command29();
public:
- ASound6(Audio::Mixer *mixer);
+ ASound6(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -665,7 +672,7 @@ private:
int command36();
int command37();
public:
- ASound7(Audio::Mixer *mixer);
+ ASound7(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -708,7 +715,7 @@ private:
void method1(byte *pData);
void adjustRange(byte *pData, byte v, int incr);
public:
- ASound8(Audio::Mixer *mixer);
+ ASound8(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
@@ -767,7 +774,7 @@ private:
int command59();
int command60();
public:
- ASound9(Audio::Mixer *mixer);
+ ASound9(Audio::Mixer *mixer, FM_OPL *opl);
virtual int command(int commandId, int param);
};
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp
index eedbf36ddd..1787b3c298 100644
--- a/engines/mads/palette.cpp
+++ b/engines/mads/palette.cpp
@@ -143,7 +143,7 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) {
for (uint palIndex = 0; palIndex < palette.size(); ++palIndex) {
bool changed = false;
- int newPalIndex = -1;
+ int newPalIndex = 0xFF;
int v1 = palRange[palIndex]._v2;
if (palette[v1]._flags & 8) {
@@ -229,7 +229,10 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) {
// In at least scene 318, when the doctor knocks you with the blackjack,
// the changed flag can be false
//assert(changed);
- assert(newPalIndex != -1);
+
+ // CHECKME: When pressing on F1 in the first screen, newPalIndex is set to 0xFF at this point
+ // which is a valid value for the index. Maybe a better check would be "< 256" ?
+ //assert(newPalIndex != -1);
int var52 = (noUsageFlag && palette[palIndex]._u2) ? 2 : 0;
@@ -314,6 +317,62 @@ int PaletteUsage::rgbFactor(byte *palEntry, RGB6 &pal6) {
return total;
}
+int PaletteUsage::checkRGB(const byte *rgb, int palStart, bool flag, int *palIndex) {
+ Palette &palette = *_vm->_palette;
+ bool match = false;
+ int result;
+ if (palStart >= 0) {
+ result = palStart;
+ } else {
+ result = -1;
+ for (int i = 0; i < palette._highRange; ++i) {
+ if (!palette._rgbList[i]) {
+ result = i;
+ break;
+ }
+ }
+ }
+
+ if (result >= 0) {
+ int mask = 1 << result;
+ byte *palP = &palette._mainPalette[0];
+ uint32 *flagsP = &palette._palFlags[0];
+
+ for (; flagsP < &palette._palFlags[PALETTE_COUNT]; ++flagsP, ++result) {
+ if ((!(*flagsP & 1) || flag) && !(*flagsP & 2)) {
+ if (!memcmp(palP, rgb, 3)) {
+ *flagsP |= mask;
+
+ if (palIndex)
+ *palIndex = result;
+ match = true;
+ break;
+ }
+ }
+ }
+
+ if (!match) {
+ palP = &palette._mainPalette[0];
+ flagsP = &palette._palFlags[0];
+
+ for (int i = 0; i < PALETTE_COUNT; ++i, palP += 3, ++flagsP) {
+ if (!*flagsP) {
+ Common::copy(rgb, rgb + 3, palP);
+ *flagsP |= mask;
+
+ if (palIndex)
+ *palIndex = i;
+ match = true;
+ break;
+ }
+ }
+ }
+ }
+
+ assert(match);
+ return result;
+}
+
/*------------------------------------------------------------------------*/
void RGBList::clear() {
diff --git a/engines/mads/palette.h b/engines/mads/palette.h
index 9b8b7146db..27d25f266b 100644
--- a/engines/mads/palette.h
+++ b/engines/mads/palette.h
@@ -136,6 +136,8 @@ public:
void updateUsage(Common::Array<int> &usageList, int sceneUsageIndex);
void resetPalFlags(int idx);
+
+ int checkRGB(const byte *rgb, int palStart, bool flag, int *palIndex);
};
class RGBList {
diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index ba2179fcbf..0b2531ef65 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -50,11 +50,12 @@ void GamePhantom::startGame() {
}
void GamePhantom::initializeGlobals() {
- //int count, count2;
- //int bad;
-
_globals.reset();
- //_globals[kTalkInanimateCount] = 8;
+
+ warning("TODO: sub_316DA()");
+
+ _player._facing = FACING_NORTH;
+ _player._turnToFacing = FACING_NORTH;
/* Section #1 variables */
// TODO
@@ -74,11 +75,7 @@ void GamePhantom::initializeGlobals() {
/* Section #9 variables */
// TODO
- _player._facing = FACING_NORTH;
- _player._turnToFacing = FACING_NORTH;
-
- //Player::preloadSequences("RXM", 1);
- //Player::preloadSequences("ROX", 1);
+ Player::preloadSequences("RAL", 1);
}
void GamePhantom::setSectionHandler() {
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index ad24dd4f60..18ceb3c813 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -360,6 +360,9 @@ void Scene::loop() {
if (_vm->_dialogs->_pendingDialog != DIALOG_NONE && !_vm->_game->_trigger
&& _vm->_game->_player._stepEnabled)
_reloadSceneFlag = true;
+
+ if (_vm->_game->_winStatus)
+ break;
}
}
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index ee7864cfee..9fd99ad8e5 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -52,11 +52,6 @@ private:
*/
void loadVocabStrings();
- /*
- * Initializes the data for palette animation within the scene
- */
- void initPaletteAnimation(Common::Array<PaletteCycle> &palCycles, bool animFlag);
-
/**
* Handles a single frame within the game scene
*/
@@ -204,6 +199,11 @@ public:
*/
void drawElements(ScreenTransition transitionType, bool surfaceFlag);
+ /*
+ * Initializes the data for palette animation within the scene
+ */
+ void initPaletteAnimation(Common::Array<PaletteCycle> &palCycles, bool animFlag);
+
/**
* Handles cycling palette colors for the scene
*/
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index e874468345..b0a5aa35c6 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -217,7 +217,7 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
int width = _width;
int height = _height;
- if (!bgSurface.getPixels()) {
+ if (!bgSurface.getPixels() || (bgSurface.w != width) || (bgSurface.h != height)) {
bgSurface.setSize(width, height);
}
@@ -232,11 +232,11 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName,
infoFile.close();
if (_vm->getGameID() == GType_RexNebular) {
- loadMadsV1Background(sceneId, resName, flags, bgSurface);
- loadPalette(sceneId, _artFileNum, resName, flags, bgSurface);
+ loadMadsV1Background(_artFileNum, resName, flags, bgSurface);
+ loadPalette(_sceneId, _artFileNum, resName, flags, bgSurface);
} else {
- loadMadsV2Background(sceneId, resName, flags, bgSurface);
- loadPalette(sceneId, sceneId, resName, flags, bgSurface);
+ loadMadsV2Background(_sceneId, resName, flags, bgSurface);
+ loadPalette(_sceneId, _sceneId, resName, flags, bgSurface);
}
Common::Array<SpriteAsset *> spriteSets;
@@ -299,6 +299,7 @@ void SceneInfo::loadPalette(int sceneId, int artFileNum, const Common::String &r
delete stream;
// Copy out the palette animation data
+ _paletteCycles.clear();
for (uint i = 0; i < artHeader._paletteCycles.size(); ++i)
_paletteCycles.push_back(artHeader._paletteCycles[i]);
@@ -333,7 +334,7 @@ void SceneInfo::loadMadsV1Background(int sceneId, const Common::String &resName,
// Get the ART resource
if (sceneFlag) {
- resourceName = Resources::formatName(RESPREFIX_RM, _artFileNum, ".ART");
+ resourceName = Resources::formatName(RESPREFIX_RM, sceneId, ".ART");
} else {
resourceName = "*" + Resources::formatResource(resName, resName);
}
@@ -342,13 +343,33 @@ void SceneInfo::loadMadsV1Background(int sceneId, const Common::String &resName,
File artFile(resourceName);
MadsPack artResource(&artFile);
- // Read in the background surface data
- assert(_width == bgSurface.w && _height == bgSurface.h);
+ // Read inhh the background surface data
+ assert(_width && _height == bgSurface.h);
stream = artResource.getItemStream(1);
stream->read(bgSurface.getPixels(), bgSurface.w * bgSurface.h);
+ delete stream;
+
+ if (flags & SCENEFLAG_TRANSLATE) {
+ // Load in the palette and translate it
+ Common::SeekableReadStream *palStream = artResource.getItemStream(0);
+ Common::Array<RGB6> palette;
+
+ _width = palStream->readUint16LE();
+ _height = palStream->readUint16LE();
+
+ int numColors = palStream->readUint16LE();
+ assert(numColors <= 252);
+ palette.resize(numColors);
+ for (int i = 0; i < numColors; ++i)
+ palette[i].load(palStream);
+ delete palStream;
+
+ // Translate the surface
+ _vm->_palette->_paletteUsage.process(palette, 0);
+ bgSurface.translate(palette);
+ }
// Close the ART file
- delete stream;
artFile.close();
}
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h
index 783a9ab8a9..41e094b8f5 100644
--- a/engines/mads/scene_data.h
+++ b/engines/mads/scene_data.h
@@ -55,7 +55,8 @@ class SpriteSlot;
enum {
SCENEFLAG_DITHER = 0x01, // Dither to 16 colors
- SCENEFLAG_LOAD_SHADOW = 0x10 // Load hard shadows
+ SCENEFLAG_LOAD_SHADOW = 0x10, // Load hard shadows
+ SCENEFLAG_TRANSLATE = 0x10000 // Translate palette of loaded background
};
class VerbInit {
diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp
index 590e63ac9e..c9a0863d85 100644
--- a/engines/mads/screen.cpp
+++ b/engines/mads/screen.cpp
@@ -212,7 +212,7 @@ void DirtyAreas::copy(MSurface *srcSurface, MSurface *destSurface, const Common:
Common::Rect bounds(srcBounds.left + posAdjust.x, srcBounds.top + posAdjust.y,
srcBounds.right + posAdjust.x, srcBounds.bottom + posAdjust.y);
- Common::Point destPos(bounds.left, bounds.top);
+ Common::Point destPos(srcBounds.left, srcBounds.top);
if ((*this)[i]._active && bounds.isValidRect()) {
srcSurface->copyTo(destSurface, bounds, destPos);
diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp
index 35d948e0b0..1652550ba3 100644
--- a/engines/mads/sound.cpp
+++ b/engines/mads/sound.cpp
@@ -36,10 +36,27 @@ SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer) {
_pollSoundEnabled = false;
_soundPollFlag = false;
_newSoundsPaused = false;
+
+ _opl = OPL::Config::create();
+ _opl->init(11025);
+
+ // Validate sound files
+ switch (_vm->getGameID()) {
+ case GType_RexNebular:
+ Nebular::ASound::validate();
+ break;
+ default:
+ break;
+ }
}
SoundManager::~SoundManager() {
- delete _driver;
+ if (_driver) {
+ _driver->stop();
+ delete _driver;
+ }
+
+ delete _opl;
}
void SoundManager::init(int sectionNumber) {
@@ -49,31 +66,31 @@ void SoundManager::init(int sectionNumber) {
case GType_RexNebular:
switch (sectionNumber) {
case 1:
- _driver = new Nebular::ASound1(_mixer);
+ _driver = new Nebular::ASound1(_mixer, _opl);
break;
case 2:
- _driver = new Nebular::ASound2(_mixer);
+ _driver = new Nebular::ASound2(_mixer, _opl);
break;
case 3:
- _driver = new Nebular::ASound3(_mixer);
+ _driver = new Nebular::ASound3(_mixer, _opl);
break;
case 4:
- _driver = new Nebular::ASound4(_mixer);
+ _driver = new Nebular::ASound4(_mixer, _opl);
break;
case 5:
- _driver = new Nebular::ASound5(_mixer);
+ _driver = new Nebular::ASound5(_mixer, _opl);
break;
case 6:
- _driver = new Nebular::ASound6(_mixer);
+ _driver = new Nebular::ASound6(_mixer, _opl);
break;
case 7:
- _driver = new Nebular::ASound7(_mixer);
+ _driver = new Nebular::ASound7(_mixer, _opl);
break;
case 8:
- _driver = new Nebular::ASound8(_mixer);
+ _driver = new Nebular::ASound8(_mixer, _opl);
break;
case 9:
- _driver = new Nebular::ASound9(_mixer);
+ _driver = new Nebular::ASound9(_mixer, _opl);
break;
default:
_driver = nullptr;
diff --git a/engines/mads/sound.h b/engines/mads/sound.h
index 9a251f9dd0..72bb21a812 100644
--- a/engines/mads/sound.h
+++ b/engines/mads/sound.h
@@ -37,6 +37,7 @@ class SoundManager {
private:
MADSEngine *_vm;
Audio::Mixer *_mixer;
+ FM_OPL *_opl;
Nebular::ASound *_driver;
bool _pollSoundEnabled;
bool _soundPollFlag;
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index cd358077b5..fd73930475 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -262,7 +262,7 @@ void SpriteSlots::drawBackground() {
scene._backgroundSurface.copyFrom(frame, pt, spriteSlot._depth, &scene._depthSurface,
-1, false, frame->getTransparencyIndex());
} else {
- error("Unsupported depth style");
+ frame->copyTo(&scene._backgroundSurface, pt, frame->getTransparencyIndex());
}
}
}
@@ -404,9 +404,9 @@ void SpriteSets::remove(int idx) {
delete (*this)[idx];
(*this)[idx] = nullptr;
} else {
- while (size() > 0 && (*this)[size() - 1] == nullptr) {
+ do {
remove_at(size() - 1);
- }
+ } while (size() > 0 && (*this)[size() - 1] == nullptr);
}
if (_assetCount > 0)
diff --git a/engines/mads/user_interface.h b/engines/mads/user_interface.h
index f251441e40..89044c9bf1 100644
--- a/engines/mads/user_interface.h
+++ b/engines/mads/user_interface.h
@@ -225,7 +225,7 @@ public:
/**
* Loads an interface from a specified resource
*/
- void load(const Common::String &resName);
+ virtual void load(const Common::String &resName);
/**
* Set up the interface
diff --git a/engines/prince/animation.cpp b/engines/prince/animation.cpp
new file mode 100644
index 0000000000..b4bde27f69
--- /dev/null
+++ b/engines/prince/animation.cpp
@@ -0,0 +1,178 @@
+/* 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 "prince/animation.h"
+#include "prince/decompress.h"
+
+#include "common/debug.h"
+#include "common/endian.h"
+
+namespace Prince {
+
+Animation::Animation() : _loopCount(0), _phaseCount(0), _frameCount(0), _baseX(0), _baseY(0)
+{
+}
+
+Animation::~Animation() {
+ clear();
+}
+
+void Animation::clear() {
+ _phaseList.clear();
+ for (int i = 0; i < _frameCount; i++) {
+ _frameList[i]._surface->free();
+ delete _frameList[i]._surface;
+ _frameList[i]._surface = nullptr;
+ if (_frameList[i]._compressedData != nullptr) {
+ free(_frameList[i]._compressedData);
+ _frameList[i]._compressedData = nullptr;
+ }
+ }
+}
+
+bool Animation::loadStream(Common::SeekableReadStream &stream) {
+ stream.skip(2); // skip not used x and y coord diff
+ _loopCount = stream.readUint16LE();
+ _phaseCount = stream.readUint16LE();
+ stream.skip(2); // skip _frameCount here
+ _baseX = stream.readUint16LE();
+ _baseY = stream.readUint16LE();
+ uint32 phaseTableOffset = stream.readUint32LE();
+ uint32 tableOfFrameOffsets = stream.pos();
+
+ stream.seek(phaseTableOffset);
+ Phase tempPhase;
+ _frameCount = 0;
+ for (int phase = 0; phase < _phaseCount; phase++) {
+ tempPhase._phaseOffsetX = stream.readSint16LE();
+ tempPhase._phaseOffsetY = stream.readSint16LE();
+ tempPhase._phaseToFrameIndex = stream.readUint16LE();
+ if (tempPhase._phaseToFrameIndex > _frameCount) {
+ _frameCount = tempPhase._phaseToFrameIndex;
+ }
+ _phaseList.push_back(tempPhase);
+ stream.skip(2);
+ }
+ if (_phaseCount) {
+ _frameCount++;
+ }
+
+ Frame tempFrame;
+ for (int frame = 0; frame < _frameCount; frame++) {
+ stream.seek(tableOfFrameOffsets + frame * 4);
+ uint32 frameInfoOffset = stream.readUint32LE();
+ stream.seek(frameInfoOffset);
+ uint16 frameWidth = stream.readUint16LE();
+ uint16 frameHeight = stream.readUint16LE();
+ uint32 frameDataPos = stream.pos();
+ uint32 frameDataOffset = stream.readUint32BE();
+
+ tempFrame._surface = new Graphics::Surface();
+ tempFrame._surface->create(frameWidth, frameHeight, Graphics::PixelFormat::createFormatCLUT8());
+ if (frameDataOffset == MKTAG('m', 'a', 's', 'm')) {
+ tempFrame._isCompressed = true;
+ tempFrame._dataSize = stream.readUint32LE();
+ tempFrame._compressedData = (byte *)malloc(tempFrame._dataSize);
+ stream.read(tempFrame._compressedData, tempFrame._dataSize);
+ } else {
+ tempFrame._isCompressed = false;
+ tempFrame._dataSize = 0;
+ tempFrame._compressedData = nullptr;
+ stream.seek(frameDataPos);
+ for (uint16 i = 0; i < frameHeight; i++) {
+ stream.read(tempFrame._surface->getBasePtr(0, i), frameWidth);
+ }
+ }
+ _frameList.push_back(tempFrame);
+ }
+
+ return true;
+}
+
+int16 Animation::getLoopCount() const {
+ return _loopCount;
+}
+
+int32 Animation::getPhaseCount() const {
+ return _phaseCount;
+}
+
+int32 Animation::getFrameCount() const {
+ return _frameCount;
+}
+
+int16 Animation::getBaseX() const {
+ return _baseX;
+}
+
+int16 Animation::getBaseY() const {
+ return _baseY;
+}
+
+int16 Animation::getPhaseOffsetX(int phaseIndex) const {
+ if (phaseIndex < _phaseCount) {
+ return _phaseList[phaseIndex]._phaseOffsetX;
+ } else {
+ error("getPhaseOffsetX() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
+ }
+}
+
+int16 Animation::getPhaseOffsetY(int phaseIndex) const {
+ if (phaseIndex < _phaseCount) {
+ return _phaseList[phaseIndex]._phaseOffsetY;
+ } else {
+ error("getPhaseOffsetY() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
+ }
+}
+
+int16 Animation::getPhaseFrameIndex(int phaseIndex) const {
+ if (phaseIndex < _phaseCount) {
+ return _phaseList[phaseIndex]._phaseToFrameIndex;
+ } else {
+ error("getPhaseFrameIndex() phaseIndex: %d, phaseCount: %d", phaseIndex, _phaseCount);
+ }
+}
+
+Graphics::Surface *Animation::getFrame(int frameIndex) {
+ if (frameIndex < _frameCount) {
+ if (_frameList[frameIndex]._isCompressed) {
+ Decompressor dec;
+ byte *ddata = (byte *)malloc(_frameList[frameIndex]._dataSize);
+ dec.decompress(_frameList[frameIndex]._compressedData, ddata, _frameList[frameIndex]._dataSize);
+ int frameHeight = _frameList[frameIndex]._surface->h;
+ int frameWidth = _frameList[frameIndex]._surface->w;
+ for (uint16 i = 0; i < frameHeight; i++) {
+ memcpy(_frameList[frameIndex]._surface->getBasePtr(0, i), ddata + frameWidth * i, frameWidth);
+ }
+ free(ddata);
+ free(_frameList[frameIndex]._compressedData);
+ _frameList[frameIndex]._compressedData = nullptr;
+ _frameList[frameIndex]._dataSize = 0;
+ _frameList[frameIndex]._isCompressed = false;
+ }
+ return _frameList[frameIndex]._surface;
+ } else {
+ error("getFrame() frameIndex: %d, frameCount: %d", frameIndex, _frameCount);
+ }
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/animation.h b/engines/prince/animation.h
new file mode 100644
index 0000000000..733acb399c
--- /dev/null
+++ b/engines/prince/animation.h
@@ -0,0 +1,73 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_ANIMATION_H
+#define PRINCE_ANIMATION_H
+
+#include "common/array.h"
+#include "common/stream.h"
+
+#include "graphics/surface.h"
+
+namespace Prince {
+
+class Animation {
+public:
+ Animation();
+ ~Animation();
+ bool loadStream(Common::SeekableReadStream &stream);
+
+ int16 getLoopCount() const;
+ int32 getPhaseCount() const;
+ int32 getFrameCount() const;
+ int16 getBaseX() const;
+ int16 getBaseY() const;
+ int16 getPhaseOffsetX(int phaseIndex) const;
+ int16 getPhaseOffsetY(int phaseIndex) const;
+ int16 getPhaseFrameIndex(int phaseIndex) const;
+ Graphics::Surface *getFrame(int frameIndex);
+ void clear();
+
+private:
+ struct Phase {
+ int16 _phaseOffsetX;
+ int16 _phaseOffsetY;
+ uint16 _phaseToFrameIndex;
+ };
+ struct Frame {
+ bool _isCompressed;
+ uint32 _dataSize;
+ byte *_compressedData;
+ Graphics::Surface *_surface;
+ };
+ Common::Array<Frame> _frameList;
+ Common::Array<Phase> _phaseList;
+ int16 _loopCount;
+ int16 _phaseCount;
+ int32 _frameCount;
+ int16 _baseX;
+ int16 _baseY;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/archive.cpp b/engines/prince/archive.cpp
new file mode 100644
index 0000000000..ae6a2b7546
--- /dev/null
+++ b/engines/prince/archive.cpp
@@ -0,0 +1,144 @@
+/* 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 "prince/archive.h"
+#include "prince/decompress.h"
+
+#include "common/stream.h"
+#include "common/debug.h"
+#include "common/memstream.h"
+
+namespace Prince {
+
+PtcArchive::PtcArchive() : _stream(nullptr) {
+}
+
+PtcArchive::~PtcArchive() {
+ close();
+}
+
+static void decrypt(byte *buffer, uint32 size) {
+ uint32 key = 0xDEADF00D;
+ while (size--) {
+ *buffer++ += key & 0xFF;
+ key ^= 0x2E84299A;
+ key += MKTAG('B', 'L', 'A', 'H');
+ key = ((key & 1) << 31) | (key >> 1);
+ }
+}
+
+bool PtcArchive::open(const Common::String &filename) {
+ _stream = SearchMan.createReadStreamForMember(filename);
+ if (!_stream)
+ return false;
+
+ _stream->readUint32LE(); // magic
+ uint32 fileTableOffset = _stream->readUint32LE() ^ 0x4D4F4B2D; // MOK-
+ uint32 fileTableSize = _stream->readUint32LE() ^ 0x534F4654; // SOFT
+
+ //debug("fileTableOffset : %08X", fileTableOffset);
+ //debug("fileTableSize: %08X", fileTableSize);
+
+ _stream->seek(fileTableOffset);
+
+ byte *fileTable = (byte *)malloc(fileTableSize);
+ byte *fileTableEnd = fileTable + fileTableSize;
+ _stream->read(fileTable, fileTableSize);
+ decrypt(fileTable, fileTableSize);
+
+ for (byte *fileItem = fileTable; fileItem < fileTableEnd; fileItem += 32) {
+ FileEntry item;
+ Common::String name = (const char*)fileItem;
+ item._offset = READ_LE_UINT32(fileItem + 24);
+ item._size = READ_LE_UINT32(fileItem + 28);
+ //debug("%12s %8X %d", name.c_str(), item._offset, item._size);
+ _items[name] = item;
+ }
+
+ free(fileTable);
+
+ return true;
+}
+
+void PtcArchive::close() {
+ delete _stream;
+ _stream = nullptr;
+ _items.clear();
+}
+
+bool PtcArchive::hasFile(const Common::String &name) const {
+ // TODO: check if path matching should be added
+ return _items.contains(name);
+}
+
+int PtcArchive::listMembers(Common::ArchiveMemberList &list) const {
+ int matches = 0;
+
+ for (FileMap::const_iterator it = _items.begin(); it != _items.end(); ++it) {
+ list.push_back(Common::ArchiveMemberList::value_type(new Common::GenericArchiveMember(it->_key, this)));
+ matches++;
+ }
+
+ return matches;
+}
+
+const Common::ArchiveMemberPtr PtcArchive::getMember(const Common::String &name) const {
+ if (!_items.contains(name)) {
+ Common::ArchiveMemberPtr();
+ }
+ return Common::ArchiveMemberList::value_type(new Common::GenericArchiveMember(name, this));
+}
+
+Common::SeekableReadStream *PtcArchive::createReadStreamForMember(const Common::String &name) const {
+ if (!_items.contains(name)) {
+ return 0;
+ }
+
+ const FileEntry &entryHeader = _items[name];
+
+ if (entryHeader._size < 4)
+ return 0;
+
+ uint32 size = entryHeader._size;
+
+ _stream->seek(entryHeader._offset);
+
+ // This *HAS* to be malloc (not new[]) because MemoryReadStream uses free() to free the memory
+ byte *buffer = (byte *)malloc(size);
+ _stream->read(buffer, size);
+
+ if (READ_BE_UINT32(buffer) == MKTAG('M', 'A', 'S', 'M')) {
+ Decompressor dec;
+ uint32 decompLen = READ_BE_UINT32(buffer + 14);
+ byte *decompData = (byte *)malloc(decompLen);
+ dec.decompress(buffer + 18, decompData, decompLen);
+ free(buffer);
+ size = decompLen;
+ buffer = decompData;
+ }
+
+ //debug("PtcArchive::createReadStreamForMember name %s", name.c_str());
+
+ return new Common::MemoryReadStream(buffer, size, DisposeAfterUse::YES);
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/archive.h b/engines/prince/archive.h
new file mode 100644
index 0000000000..e211036ed6
--- /dev/null
+++ b/engines/prince/archive.h
@@ -0,0 +1,61 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_ARCHIVE_H
+#define PRINCE_ARCHIVE_H
+
+#include "common/archive.h"
+#include "common/hashmap.h"
+#include "common/hash-str.h"
+
+namespace Prince {
+
+class PtcArchive : public Common::Archive {
+public:
+ PtcArchive();
+ ~PtcArchive();
+
+ bool open(const Common::String &filename);
+ void close();
+ bool isOpen() const { return _stream != 0; }
+
+ // Common::Archive API implementation
+ bool hasFile(const Common::String &name) const;
+ int listMembers(Common::ArchiveMemberList &list) const;
+ const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
+ Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
+
+private:
+ struct FileEntry {
+ uint32 _offset;
+ uint32 _size;
+ };
+
+ Common::SeekableReadStream *_stream;
+
+ typedef Common::HashMap<Common::String, FileEntry, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> FileMap;
+ FileMap _items;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/common.h b/engines/prince/common.h
new file mode 100644
index 0000000000..c846f9a751
--- /dev/null
+++ b/engines/prince/common.h
@@ -0,0 +1,45 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_COMMON_H
+#define PRINCE_COMMON_H
+
+namespace Prince {
+
+enum Direction {
+ kDirLD,
+ kDirL,
+ kDirLU,
+ kDirRD,
+ kDirR,
+ kDirRU,
+ kDirUL,
+ kDirU,
+ kDirUR,
+ kDirDL,
+ kDirD,
+ kDirDR
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/configure.engine b/engines/prince/configure.engine
new file mode 100644
index 0000000000..50740d9f41
--- /dev/null
+++ b/engines/prince/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine prince "The Prince and The Coward" no
diff --git a/engines/prince/cursor.cpp b/engines/prince/cursor.cpp
new file mode 100644
index 0000000000..ddcabbd28f
--- /dev/null
+++ b/engines/prince/cursor.cpp
@@ -0,0 +1,54 @@
+/* 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 "prince/cursor.h"
+
+#include "common/debug.h"
+
+namespace Prince {
+
+Cursor::Cursor() : _surface(nullptr) {
+}
+
+Cursor::~Cursor() {
+ if (_surface != nullptr) {
+ _surface->free();
+ delete _surface;
+ _surface = nullptr;
+ }
+}
+
+bool Cursor::loadStream(Common::SeekableReadStream &stream) {
+ stream.skip(4);
+ uint16 width = stream.readUint16LE();
+ uint16 height = stream.readUint16LE();
+
+ _surface = new Graphics::Surface();
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
+
+ for (int h = 0; h < height; h++) {
+ stream.read(_surface->getBasePtr(0, h), width);
+ }
+ return true;
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/cursor.h b/engines/prince/cursor.h
new file mode 100644
index 0000000000..9387f344dc
--- /dev/null
+++ b/engines/prince/cursor.h
@@ -0,0 +1,46 @@
+/* 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.
+ *
+ */
+
+#ifndef CURSOR_PRINCE_H
+#define CURSOR_PRINCE_H
+
+#include "graphics/surface.h"
+
+#include "common/stream.h"
+
+namespace Prince {
+
+class Cursor {
+public:
+ Cursor();
+ ~Cursor();
+
+ bool loadStream(Common::SeekableReadStream &stream);
+ const Graphics::Surface *getSurface() const { return _surface; }
+
+private:
+ Graphics::Surface *_surface;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/curve_values.h b/engines/prince/curve_values.h
new file mode 100644
index 0000000000..d72f11fd36
--- /dev/null
+++ b/engines/prince/curve_values.h
@@ -0,0 +1,45 @@
+/* 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.
+ *
+ */
+
+namespace Prince {
+
+const int curveValues[17][4] = {
+ { 32768, 0, 0, 0 },
+ { 25200, 7200, 480, -112 },
+ { 18816, 12544, 1792, -384 },
+ { 13520, 16224, 3744, -720 },
+ { 9216, 18432, 6144, -1024 },
+ { 5808, 19360, 8800, -1200 },
+ { 3200, 19200, 11520, -1152 },
+ { 1296, 18144, 14112, -784 },
+ { 0, 16384, 16384, 0 },
+ { -784, 14112, 18144, 1296 },
+ { -1152, 11520, 19200, 3200 },
+ { -1200, 8800, 19360, 5808 },
+ { -1024, 6144, 18432, 9216 },
+ { -720, 3744, 16224, 13520 },
+ { -384, 1792, 12544, 18816 },
+ { -112, 480, 7200, 25200 },
+ { 0, 0, 0, 32768 }
+};
+
+} // End of namespace Prince
diff --git a/engines/prince/debugger.cpp b/engines/prince/debugger.cpp
new file mode 100644
index 0000000000..fc216e0cfb
--- /dev/null
+++ b/engines/prince/debugger.cpp
@@ -0,0 +1,174 @@
+/* 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 "prince/debugger.h"
+#include "prince/prince.h"
+#include "prince/flags.h"
+#include "prince/script.h"
+
+namespace Prince {
+
+Debugger::Debugger(PrinceEngine *vm, InterpreterFlags *flags) : GUI::Debugger(), _vm(vm), _locationNr(0), _flags(flags) {
+ registerCmd("continue", WRAP_METHOD(Debugger, cmdExit));
+ registerCmd("level", WRAP_METHOD(Debugger, Cmd_DebugLevel));
+ registerCmd("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag));
+ registerCmd("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag));
+ registerCmd("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag));
+ registerCmd("viewflc", WRAP_METHOD(Debugger, Cmd_ViewFlc));
+ registerCmd("initroom", WRAP_METHOD(Debugger, Cmd_InitRoom));
+ registerCmd("changecursor", WRAP_METHOD(Debugger, Cmd_ChangeCursor));
+ registerCmd("additem", WRAP_METHOD(Debugger, Cmd_AddItem));
+}
+
+static int strToInt(const char *s) {
+ if (!*s)
+ // No string at all
+ return 0;
+ else if (toupper(s[strlen(s) - 1]) != 'H')
+ // Standard decimal string
+ return atoi(s);
+
+ // Hexadecimal string
+ uint tmp = 0;
+ int read = sscanf(s, "%xh", &tmp);
+ if (read < 1)
+ error("strToInt failed on string \"%s\"", s);
+ return (int)tmp;
+}
+
+bool Debugger::Cmd_DebugLevel(int argc, const char **argv) {
+ if (argc == 1) {
+ debugPrintf("Debugging is currently set at level %d\n", gDebugLevel);
+ } else { // set level
+ gDebugLevel = atoi(argv[1]);
+ if (0 <= gDebugLevel && gDebugLevel < 11) {
+ debugPrintf("Debug level set to level %d\n", gDebugLevel);
+ } else if (gDebugLevel < 0) {
+ debugPrintf("Debugging is now disabled\n");
+ } else
+ debugPrintf("Not a valid debug level (0 - 10)\n");
+ }
+
+ return true;
+}
+
+/*
+ * This command sets a flag
+ */
+bool Debugger::Cmd_SetFlag(int argc, const char **argv) {
+ // Check for a flag to set
+ if (argc != 3) {
+ debugPrintf("Usage: %s <flag number> <value>\n", argv[0]);
+ return true;
+ }
+
+ int flagNum = strToInt(argv[1]);
+ uint16 value = strToInt(argv[2]);
+ _flags->setFlagValue((Flags::Id)flagNum, value);
+ return true;
+}
+
+/*
+ * This command gets the value of a flag
+ */
+bool Debugger::Cmd_GetFlag(int argc, const char **argv) {
+ // Check for an flag to display
+ if (argc != 2) {
+ debugPrintf("Usage: %s <flag number>\n", argv[0]);
+ return true;
+ }
+
+ int flagNum = strToInt(argv[1]);
+ debugPrintf("Value: %d\n", _flags->getFlagValue((Flags::Id)flagNum));
+ return true;
+}
+
+/*
+ * This command clears a flag
+ */
+bool Debugger::Cmd_ClearFlag(int argc, const char **argv) {
+ // Check for a flag to clear
+ if (argc != 2) {
+ debugPrintf("Usage: %s <flag number>\n", argv[0]);
+ return true;
+ }
+
+ int flagNum = strToInt(argv[1]);
+ _flags->setFlagValue((Flags::Id)flagNum, 0);
+ return true;
+}
+
+/*
+ * This command starts new flc anim
+ */
+bool Debugger::Cmd_ViewFlc(int argc, const char **argv) {
+ // Check for a flag to clear
+ if (argc != 2) {
+ debugPrintf("Usage: %s <anim number>\n", argv[0]);
+ return true;
+ }
+
+ int flagNum = strToInt(argv[1]);
+ _vm->loadAnim(flagNum, false);
+ return true;
+}
+
+bool Debugger::Cmd_InitRoom(int argc, const char **argv) {
+ // Check for a flag to clear
+ if (argc != 2) {
+ debugPrintf("Usage: %s <anim number>\n", argv[0]);
+ return true;
+ }
+
+ _locationNr = strToInt(argv[1]);
+ return true;
+}
+
+bool Debugger::Cmd_ChangeCursor(int argc, const char **argv) {
+ // Check for a flag to clear
+ if (argc != 2) {
+ debugPrintf("Usage: %s <curId>\n", argv[0]);
+ return true;
+ }
+
+ _cursorNr = strToInt(argv[1]);
+
+ return true;
+}
+
+bool Debugger::Cmd_AddItem(int argc, const char **argv) {
+ if (argc != 2) {
+ debugPrintf("Usage: %s <itemId>\n", argv[0]);
+ return true;
+ }
+ if (!strcmp(argv[1], "map")) {
+ _vm->addInv(0, 29, true);
+ _vm->_flags->setFlagValue(Flags::MapaUsable, 1);
+ } else {
+ int itemId = strToInt(argv[1]);
+ _vm->addInv(0, itemId, true);
+ }
+
+ return true;
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/debugger.h b/engines/prince/debugger.h
new file mode 100644
index 0000000000..a4467e63d5
--- /dev/null
+++ b/engines/prince/debugger.h
@@ -0,0 +1,58 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_DEBUGGER_H
+#define PRINCE_DEBUGGER_H
+
+#include "common/scummsys.h"
+#include "gui/debugger.h"
+
+namespace Prince {
+
+class PrinceEngine;
+class InterpreterFlags;
+
+class Debugger : public GUI::Debugger {
+public:
+ Debugger(PrinceEngine *vm, InterpreterFlags *flags);
+ virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
+
+ uint8 _locationNr;
+ uint8 _cursorNr;
+
+private:
+ bool Cmd_DebugLevel(int argc, const char **argv);
+ bool Cmd_SetFlag(int argc, const char **argv);
+ bool Cmd_GetFlag(int argc, const char **argv);
+ bool Cmd_ClearFlag(int argc, const char **argv);
+ bool Cmd_ViewFlc(int argc, const char **argv);
+ bool Cmd_InitRoom(int argc, const char **argv);
+ bool Cmd_ChangeCursor(int argc, const char **argv);
+ bool Cmd_AddItem(int argc, const char **argv);
+
+ PrinceEngine *_vm;
+ InterpreterFlags *_flags;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/decompress.cpp b/engines/prince/decompress.cpp
new file mode 100644
index 0000000000..7fba179541
--- /dev/null
+++ b/engines/prince/decompress.cpp
@@ -0,0 +1,171 @@
+/* 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.
+ *
+ */
+
+// John_Doe's implementation
+
+#include "prince/decompress.h"
+
+namespace Prince {
+
+static const uint16 table1[] = {
+ 0x8000, 0x0002,
+ 0x4000, 0x0004,
+ 0x2000, 0x0008,
+ 0x1000, 0x0010,
+ 0x0800, 0x0020,
+ 0x0400, 0x0040,
+ 0x0200, 0x0080,
+ 0x0100, 0x0100,
+ 0x0080, 0x0200,
+ 0x0040, 0x0400
+};
+
+static const uint32 table2[] = {
+ 0x0000F000,
+ 0x0020FC00,
+ 0x00A0FF00,
+ 0x02A0FF80,
+ 0x06A0FFC0,
+ 0x0EA0FFE0,
+ 0x1EA0FFF0,
+ 0x3EA0FFF8
+};
+
+static const uint16 table3[] = {
+ 0x8000, 0x0000,
+ 0x4000, 0x0002,
+ 0x2000, 0x0006,
+ 0x1000, 0x000E,
+ 0x0800, 0x001E,
+ 0x0400, 0x003E,
+ 0x0200, 0x007E,
+ 0x0100, 0x00FE,
+ 0x0080, 0x01FE,
+ 0x0040, 0x03FE,
+ 0x0020, 0x07FE,
+ 0x0010, 0x0FFE,
+ 0x0008, 0x1FFE,
+ 0x0004, 0x3FFE,
+ 0x0002, 0x7FFE,
+ 0x0001, 0xFFFE
+};
+
+void Decompressor::decompress(byte *source, byte *dest, uint32 destSize) {
+ byte *destEnd = dest + destSize;
+ int more;
+ _src = source;
+ _dst = dest;
+ _bitBuffer = 0x80;
+ while (_dst < destEnd) {
+ uint32 ebp;
+ uint16 offset, length;
+ if (getBit()) {
+ if (getBit()) {
+ if (getBit()) {
+ if (getBit()) {
+ if (getBit()) {
+ if (getBit()) {
+ uint32 tableIndex = 0;
+ while (getBit())
+ tableIndex++;
+ length = table3[tableIndex * 2 + 0];
+ do {
+ more = !(length & 0x8000);
+ length = (length << 1) | getBit();
+ } while (more);
+ length += table3[tableIndex * 2 + 1];
+ length++;
+ memcpy(_dst, _src, length);
+ _src += length;
+ _dst += length;
+ }
+ *_dst++ = *_src++;
+ }
+ *_dst++ = *_src++;
+ }
+ *_dst++ = *_src++;
+ }
+ *_dst++ = *_src++;
+ }
+ *_dst++ = *_src++;
+ }
+ if (!getBit()) {
+ if (getBit()) {
+ uint32 tableIndex = getBit();
+ tableIndex = (tableIndex << 1) | getBit();
+ tableIndex = (tableIndex << 1) | getBit();
+ ebp = table2[tableIndex];
+ length = 1;
+ } else {
+ ebp = 0x0000FF00;
+ length = 0;
+ }
+ } else {
+ uint32 tableIndex = 0;
+ while (getBit())
+ tableIndex++;
+ length = table1[tableIndex * 2 + 0];
+ do {
+ more = !(length & 0x8000);
+ length = (length << 1) | getBit();
+ } while (more);
+ length += table1[tableIndex * 2 + 1];
+ tableIndex = getBit();
+ tableIndex = (tableIndex << 1) | getBit();
+ tableIndex = (tableIndex << 1) | getBit();
+ ebp = table2[tableIndex];
+ }
+ offset = ebp & 0xFFFF;
+ do {
+ if (_bitBuffer == 0x80) {
+ if (offset >= 0xFF00) {
+ offset = (offset << 8) | *_src++;
+ }
+ }
+ more = offset & 0x8000;
+ offset = (offset << 1) | getBit();
+ } while (more);
+ offset += (ebp >> 16);
+ length += 2;
+ while (length--) {
+ if (_dst >= destEnd) {
+ return;
+ }
+ *_dst = *(_dst - offset);
+ _dst++;
+ }
+ }
+}
+
+int Decompressor::getBit() {
+ int bit = (_bitBuffer & 0x80) >> 7;
+ _bitBuffer <<= 1;
+ if (_bitBuffer == 0) {
+ _bitBuffer = *_src++;
+ bit = (_bitBuffer & 0x80) >> 7;
+ _bitBuffer <<= 1;
+ _bitBuffer |= 1;
+ }
+ return bit;
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/decompress.h b/engines/prince/decompress.h
new file mode 100644
index 0000000000..ef495db65e
--- /dev/null
+++ b/engines/prince/decompress.h
@@ -0,0 +1,44 @@
+/* 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.
+ *
+ */
+
+// John_Doe's implementation
+
+#ifndef PRINCE_DECOMPRESS_H
+#define PRINCE_DECOMPRESS_H
+
+#include "engines/util.h"
+
+namespace Prince {
+
+class Decompressor {
+public:
+ void decompress(byte *source, byte *dest, uint32 destSize);
+protected:
+ byte *_src, *_dst;
+ byte _bitBuffer;
+ int _bitsLeft;
+ int getBit();
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/detection.cpp b/engines/prince/detection.cpp
new file mode 100644
index 0000000000..3f83009de8
--- /dev/null
+++ b/engines/prince/detection.cpp
@@ -0,0 +1,73 @@
+/* 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 "prince/detection.h"
+
+namespace Prince {
+
+int PrinceEngine::getGameType() const {
+ return _gameDescription->gameType;
+}
+
+const char *PrinceEngine::getGameId() const {
+ return _gameDescription->desc.gameid;
+}
+
+uint32 PrinceEngine::getFeatures() const {
+ return _gameDescription->desc.flags;
+}
+
+Common::Language PrinceEngine::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
+bool PrinceMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ using namespace Prince;
+ const PrinceGameDescription *gd = (const PrinceGameDescription *)desc;
+ if (gd) {
+ *engine = new PrinceEngine(syst, gd);
+ }
+ return gd != 0;
+}
+
+bool PrinceMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate) ||
+ (f == kSupportsListSaves);
+}
+
+bool Prince::PrinceEngine::hasFeature(EngineFeature f) const {
+ return
+ (f == kSupportsLoadingDuringRuntime) ||
+ (f == kSupportsSavingDuringRuntime);
+}
+
+} // End of namespace Prince
+
+#if PLUGIN_ENABLED_DYNAMIC(PRINCE)
+REGISTER_PLUGIN_DYNAMIC(PRINCE, PLUGIN_TYPE_ENGINE, Prince::PrinceMetaEngine);
+#else
+REGISTER_PLUGIN_STATIC(PRINCE, PLUGIN_TYPE_ENGINE, Prince::PrinceMetaEngine);
+#endif
diff --git a/engines/prince/detection.h b/engines/prince/detection.h
new file mode 100644
index 0000000000..5cc0d32be4
--- /dev/null
+++ b/engines/prince/detection.h
@@ -0,0 +1,100 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_DETECTION_H
+#define PRINCE_DETECTION_H
+
+#include "prince/prince.h"
+#include "engines/advancedDetector.h"
+
+namespace Prince {
+
+struct PrinceGameDescription {
+ ADGameDescription desc;
+ int gameType;
+};
+
+static const PlainGameDescriptor princeGames[] = {
+ {"prince", "Prince Game"},
+ {0, 0}
+};
+
+static const PrinceGameDescription gameDescriptions[] = {
+ {
+ {
+ "prince",
+ "Galador",
+ AD_ENTRY1s("databank.ptc", "5fa03833177331214ec1354761b1d2ee", 3565031),
+ Common::DE_DEU,
+ Common::kPlatformWindows,
+ ADGF_TESTING,
+ GUIO1(GUIO_NONE)
+ },
+ 0
+ },
+ {
+ {
+ "prince",
+ "Ksiaze i Tchorz",
+ AD_ENTRY1s("databank.ptc", "48ec9806bda9d152acbea8ce31c93c49", 3435298),
+ Common::PL_POL,
+ Common::kPlatformWindows,
+ ADGF_TESTING,
+ GUIO1(GUIO_NONE)
+ },
+ 1
+ },
+ { AD_TABLE_END_MARKER, 0 }
+};
+
+const static char *directoryGlobs[] = {
+ "all",
+ 0
+};
+
+class PrinceMetaEngine : public AdvancedMetaEngine {
+public:
+ PrinceMetaEngine() : AdvancedMetaEngine(Prince::gameDescriptions, sizeof(Prince::PrinceGameDescription), princeGames) {
+ _singleid = "prince";
+ _maxScanDepth = 2;
+ _directoryGlobs = directoryGlobs;
+ }
+
+ virtual const char *getName() const {
+ return "Prince Engine";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "The Prince and the Coward (C) 1996-97 Metropolis";
+ }
+
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual int getMaximumSaveSlot() const;
+ virtual SaveStateList listSaves(const char *target) const;
+ SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+ virtual void removeSaveState(const char *target, int slot) const;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/flags.cpp b/engines/prince/flags.cpp
new file mode 100644
index 0000000000..f1a05bd4df
--- /dev/null
+++ b/engines/prince/flags.cpp
@@ -0,0 +1,420 @@
+/* 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 "prince/flags.h"
+#include "prince/script.h"
+
+namespace Prince {
+
+const char *Flags::getFlagName(uint16 flagId) {
+ FlagDebug *flagd = nullptr;
+ flagd = (FlagDebug *)bsearch(&flagId, _flagNames, kFlagDebugAmount, sizeof(FlagDebug), Flags::compareFlagDebug);
+ if (flagd != nullptr) {
+ return flagd->flagName;
+ } else {
+ return "unknown_flag";
+ }
+}
+
+int Flags::compareFlagDebug(const void *a, const void *b) {
+ const uint32 *flagId = (const uint32 *)a;
+ const FlagDebug *entry = (const FlagDebug *)b;
+ if (*flagId < (uint32)entry->id) {
+ return -1;
+ } else if (*flagId > (uint32)entry->id) {
+ return 1;
+ }
+ return 0;
+}
+
+const Flags::FlagDebug Flags::_flagNames[Flags::kFlagDebugAmount] = {
+ { Flags::FLAGA1, "FLAGA1" },
+ { Flags::FLAGA2, "FLAGA2" },
+ { Flags::FLAGA3, "FLAGA3" },
+ { Flags::DESTX, "DESTX" },
+ { Flags::DESTY, "DESTY" },
+ { Flags::DESTD, "DESTD" },
+ { Flags::DwarfDone, "DwarfDone" },
+ { Flags::GRABARZCOUNTER, "GRABARZCOUNTER" },
+ { Flags::KIERUNEK, "KIERUNEK" },
+ { Flags::BACKFLAG1, "BACKFLAG1" },
+ { Flags::BACKFLAG2, "BACKFLAG2" },
+ { Flags::BACKFLAG3, "BACKFLAG3" },
+ { Flags::BACKFLAG4, "BACKFLAG4" },
+ { Flags::MACROFLAG1, "MACROFLAG1" },
+ { Flags::MACROFLAG2, "MACROFLAG2" },
+ { Flags::MACROFLAG3, "MACROFLAG3" },
+ { Flags::HEROLDDONE, "HEROLDDONE" },
+ { Flags::BRIDGESET, "BRIDGESET" },
+ { Flags::U_BT_1, "U_BT_1" },
+ { Flags::U_BT_2, "U_BT_2" },
+ { Flags::U_BT_3, "U_BT_3" },
+ { Flags::U_BT_4, "U_BT_4" },
+ { Flags::U_BT_5, "U_BT_5" },
+ { Flags::U_BT_6, "U_BT_6" },
+ { Flags::U_BT_7, "U_BT_7" },
+ { Flags::U_BT_8, "U_BT_8" },
+ { Flags::U_BT_9, "U_BT_9" },
+ { Flags::U_BT_COUNTER, "U_BT_COUNTER" },
+ { Flags::ARIVALDALIVE, "ARIVALDALIVE" },
+ { Flags::TALKCHAR1, "TALKCHAR1" },
+ { Flags::TalkType1, "TalkType1" },
+ { Flags::TALKROUT1, "TALKROUT1" },
+ { Flags::TALKROUT2, "TALKROUT2" },
+ { Flags::TALKROUT3, "TALKROUT3" },
+ { Flags::TALKROUT4, "TALKROUT4" },
+ { Flags::TALKANIM1, "TALKANIM1" },
+ { Flags::TALKANIM2, "TALKANIM2" },
+ { Flags::TALKCOLOR1, "TALKCOLOR1" },
+ { Flags::TALKCOLOR2, "TALKCOLOR2" },
+ { Flags::KapciuchTaken, "KapciuchTaken" },
+ { Flags::CurrentBeggarA, "CurrentBeggarA" },
+ { Flags::TempKapc, "TempKapc" },
+ { Flags::HomTaken, "HomTaken" },
+ { Flags::WizardTalk, "WizardTalk" },
+ { Flags::SunlordTalk, "SunlordTalk" },
+ { Flags::HermitTalk, "HermitTalk" },
+ { Flags::RunyMode, "RunyMode" },
+ { Flags::FatMerchantTalk, "FatMerchantTalk" },
+ { Flags::HotDogTalk, "HotDogTalk" },
+ { Flags::ThiefTalk, "ThiefTalk" },
+ { Flags::BeggarTalk, "BeggarTalk" },
+ { Flags::MonkTalk, "MonkTalk" },
+ { Flags::BardTalk, "BardTalk" },
+ { Flags::BarmanTalk, "BarmanTalk" },
+ { Flags::LeftPlayerTalk, "LeftPlayerTalk" },
+ { Flags::OczySowy, "OczySowy" },
+ { Flags::CzachySpeed1, "CzachySpeed1" },
+ { Flags::CzachySpeed2, "CzachySpeed2" },
+ { Flags::CzachySpeed3, "CzachySpeed3" },
+ { Flags::CzachySlowDown1, "CzachySlowDown1" },
+ { Flags::CzachySlowDown2, "CzachySlowDown2" },
+ { Flags::CzachySlowDown3, "CzachySlowDown3" },
+ { Flags::FjordDane, "FjordDane" },
+ { Flags::GKopany1, "GKopany1" },
+ { Flags::GKopany2, "GKopany2" },
+ { Flags::GKopany3, "GKopany3" },
+ { Flags::GKopany4, "GKopany4" },
+ { Flags::KnowGodWord, "KnowGodWord" },
+ { Flags::TALKROUT21, "TALKROUT21" },
+ { Flags::TALKROUT22, "TALKROUT22" },
+ { Flags::TALKROUT23, "TALKROUT23" },
+ { Flags::TALKROUT24, "TALKROUT24" },
+ { Flags::TalkType2, "TalkType2" },
+ { Flags::GrabarzTalk, "GrabarzTalk" },
+ { Flags::LastTalker, "LastTalker" },
+ { Flags::MapaPustelniaEnabled, "MapaPustelniaEnabled" },
+ { Flags::MapaTempleEnabled, "MapaTempleEnabled" },
+ { Flags::MapaFjordEnabled, "MapaFjordEnabled" },
+ { Flags::MapaSilmanionaEnabled, "MapaSilmanionaEnabled" },
+ { Flags::MapaKurhanEnabled, "MapaKurhanEnabled" },
+ { Flags::MapaDragonEnabled, "MapaDragonEnabled" },
+ { Flags::MapaMillEnabled, "MapaMillEnabled" },
+ { Flags::DwarfRunning, "DwarfRunning" },
+ { Flags::DwarfTalk, "DwarfTalk" },
+ { Flags::CurseLift, "CurseLift" },
+ { Flags::KosciSwapped, "KosciSwapped" },
+ { Flags::BookStolen, "BookStolen" },
+ { Flags::MapaUsable, "MapaUsable" },
+ { Flags::FjordBoss, "FjordBoss" },
+ { Flags::FjordHotDog, "FjordHotDog" },
+ { Flags::FjordLewy, "FjordLewy" },
+ { Flags::FjordPrawy, "FjordPrawy" },
+ { Flags::TalkArivald, "TalkArivald" },
+ { Flags::ShootDone, "ShootDone" },
+ { Flags::ShootRunning, "ShootRunning" },
+ { Flags::ShootKnow, "ShootKnow" },
+ { Flags::MirrorKnow, "MirrorKnow" },
+ { Flags::Gar1stTime, "Gar1stTime" },
+ { Flags::KosciTaken, "KosciTaken" },
+ { Flags::ArivGotSpell, "ArivGotSpell" },
+ { Flags::BookGiven, "BookGiven" },
+ { Flags::Wywieszka, "Wywieszka" },
+ { Flags::TalkSheila, "TalkSheila" },
+ { Flags::TalkSheila2, "TalkSheila2" },
+ { Flags::BackHuman, "BackHuman" },
+ { Flags::SkarbiecOpen, "SkarbiecOpen" },
+ { Flags::LustroTaken, "LustroTaken" },
+ { Flags::GargoyleHom, "GargoyleHom" },
+ { Flags::GargoyleBroken, "GargoyleBroken" },
+ { Flags::FjordDzien, "FjordDzien" },
+ { Flags::GargoyleHom2, "GargoyleHom2" },
+ { Flags::RunMonstersRunning, "RunMonstersRunning" },
+ { Flags::FoundPaperInCoffin, "FoundPaperInCoffin" },
+ { Flags::KnowSunlord, "KnowSunlord" },
+ { Flags::KnowSunlordTalk, "KnowSunlordTalk" },
+ { Flags::ArivaldCzyta, "ArivaldCzyta" },
+ { Flags::TelepX, "TelepX" },
+ { Flags::TelepY, "TelepY" },
+ { Flags::TelepDir, "TelepDir" },
+ { Flags::TelepRoom, "TelepRoom" },
+ { Flags::ListStolen, "ListStolen" },
+ { Flags::WifeInDoor, "WifeInDoor" },
+ { Flags::TalkWifeFlag, "TalkWifeFlag" },
+ { Flags::LetterGiven, "LetterGiven" },
+ { Flags::LutniaTaken, "LutniaTaken" },
+ { Flags::BardHomeOpen, "BardHomeOpen" },
+ { Flags::FjordNoMonsters, "FjordNoMonsters" },
+ { Flags::ShandriaWallTalking, "ShandriaWallTalking" },
+ { Flags::ShandriaWallCounter, "ShandriaWallCounter" },
+ { Flags::ShandriaWallDone, "ShandriaWallDone" },
+ { Flags::FutureDone, "FutureDone" },
+ { Flags::TalkButch, "TalkButch" },
+ { Flags::GotSzalik, "GotSzalik" },
+ { Flags::GotCzosnek, "GotCzosnek" },
+ { Flags::BearDone, "BearDone" },
+ { Flags::NekrVisited, "NekrVisited" },
+ { Flags::SunRiddle, "SunRiddle" },
+ { Flags::PtaszekAway, "PtaszekAway" },
+ { Flags::KotGadanie, "KotGadanie" },
+ { Flags::SzlafmycaTaken, "SzlafmycaTaken" },
+ { Flags::BabkaTalk, "BabkaTalk" },
+ { Flags::SellerTalk, "SellerTalk" },
+ { Flags::CzosnekDone, "CzosnekDone" },
+ { Flags::PriestCounter, "PriestCounter" },
+ { Flags::PriestGest1, "PriestGest1" },
+ { Flags::PriestGest2, "PriestGest2" },
+ { Flags::PriestGest3, "PriestGest3" },
+ { Flags::PriestGest4, "PriestGest4" },
+ { Flags::PriestAnim, "PriestAnim" },
+ { Flags::HolyWaterTaken, "HolyWaterTaken" },
+ { Flags::AxeTaken, "AxeTaken" },
+ { Flags::BadylTaken1, "BadylTaken1" },
+ { Flags::BadylTaken2, "BadylTaken2" },
+ { Flags::BadylSharpened, "BadylSharpened" },
+ { Flags::PorwanieSmoka, "PorwanieSmoka" },
+ { Flags::ShopReOpen, "ShopReOpen" },
+ { Flags::LuskaShown, "LuskaShown" },
+ { Flags::CudKnow, "CudKnow" },
+ { Flags::VampireDead, "VampireDead" },
+ { Flags::MapaVisible1, "MapaVisible1" },
+ { Flags::MapaVisible2, "MapaVisible2" },
+ { Flags::MapaVisible3, "MapaVisible3" },
+ { Flags::MapaVisible4, "MapaVisible4" },
+ { Flags::MapaVisible5, "MapaVisible5" },
+ { Flags::MapaVisible6, "MapaVisible6" },
+ { Flags::MapaVisible7, "MapaVisible7" },
+ { Flags::MapaVisible8, "MapaVisible8" },
+ { Flags::MapaVisible9, "MapaVisible9" },
+ { Flags::MapaX, "MapaX" },
+ { Flags::MapaY, "MapaY" },
+ { Flags::MapaD, "MapaD" },
+ { Flags::OldMapaX, "OldMapaX" },
+ { Flags::OldMapaY, "OldMapaY" },
+ { Flags::OldMapaD, "OldMapaD" },
+ { Flags::MovingBack, "MovingBack" },
+ { Flags::MapaCount, "MapaCount" },
+ { Flags::Pustelnia1st, "Pustelnia1st" },
+ { Flags::CzarnePole1st, "CzarnePole1st" },
+ { Flags::TalkArivNum, "TalkArivNum" },
+ { Flags::Pfui, "Pfui" },
+ { Flags::MapaSunlordEnabled, "MapaSunlordEnabled" },
+ { Flags::WebDone, "WebDone" },
+ { Flags::DragonDone, "DragonDone" },
+ { Flags::KanPlay, "KanPlay" },
+ { Flags::OldKanPlay, "OldKanPlay" },
+ { Flags::LapkiWait, "LapkiWait" },
+ { Flags::WebNoCheck, "WebNoCheck" },
+ { Flags::Perfumeria, "Perfumeria" },
+ { Flags::SmokNoCheck, "SmokNoCheck" },
+ { Flags::IluzjaBroken, "IluzjaBroken" },
+ { Flags::IluzjaWorking, "IluzjaWorking" },
+ { Flags::IluzjaCounter, "IluzjaCounter" },
+ { Flags::KurhanOpen1, "KurhanOpen1" },
+ { Flags::KastetTaken, "KastetTaken" },
+ { Flags::KastetDown, "KastetDown" },
+ { Flags::KurhanDone, "KurhanDone" },
+ { Flags::SkelCounter, "SkelCounter" },
+ { Flags::SkelDial1, "SkelDial1" },
+ { Flags::SkelDial2, "SkelDial2" },
+ { Flags::SkelDial3, "SkelDial3" },
+ { Flags::SkelDial4, "SkelDial4" },
+ { Flags::SameTalker, "SameTalker" },
+ { Flags::RunMonstersText, "RunMonstersText" },
+ { Flags::PiwnicaChecked, "PiwnicaChecked" },
+ { Flags::DragonTalked, "DragonTalked" },
+ { Flags::ToldAboutBook, "ToldAboutBook" },
+ { Flags::SilmanionaDone, "SilmanionaDone" },
+ { Flags::ToldBookCount, "ToldBookCount" },
+ { Flags::SmrodNoCheck, "SmrodNoCheck" },
+ { Flags::RopeTaken, "RopeTaken" },
+ { Flags::RopeTime, "RopeTime" },
+ { Flags::LaskaFree, "LaskaFree" },
+ { Flags::ShanSmokTalked, "ShanSmokTalked" },
+ { Flags::SwordTaken, "SwordTaken" },
+ { Flags::Mill1st, "Mill1st" },
+ { Flags::SawRat, "SawRat" },
+ { Flags::KnowRat, "KnowRat" },
+ { Flags::DziuraTimer, "DziuraTimer" },
+ { Flags::LaskaInside, "LaskaInside" },
+ { Flags::HoleBig, "HoleBig" },
+ { Flags::EnableWiedzmin, "EnableWiedzmin" },
+ { Flags::EnableTrucizna, "EnableTrucizna" },
+ { Flags::KnowPoison, "KnowPoison" },
+ { Flags::KufelTaken, "KufelTaken" },
+ { Flags::BojkaEnabled, "BojkaEnabled" },
+ { Flags::BitwaNot1st, "BitwaNot1st" },
+ { Flags::BojkaTimer, "BojkaTimer" },
+ { Flags::BojkaGirl, "BojkaGirl" },
+ { Flags::Look1st, "Look1st" },
+ { Flags::RatTaken, "RatTaken" },
+ { Flags::LaskaTalkedGr, "LaskaTalkedGr" },
+ { Flags::RatusGivus, "RatusGivus" },
+ { Flags::MamObole, "MamObole" },
+ { Flags::Speed1st, "Speed1st" },
+ { Flags::SpeedTimer, "SpeedTimer" },
+ { Flags::ProveIt, "ProveIt" },
+ { Flags::Proven, "Proven" },
+ { Flags::ShowWoalka, "ShowWoalka" },
+ { Flags::PoisonTaken, "PoisonTaken" },
+ { Flags::HellOpened, "HellOpened" },
+ { Flags::HellNoCheck, "HellNoCheck" },
+ { Flags::TalAn1, "TalAn1" },
+ { Flags::TalAn2, "TalAn2" },
+ { Flags::TalAn3, "TalAn3" },
+ { Flags::TalkDevilGuard, "TalkDevilGuard" },
+ { Flags::Sword1st, "Sword1st" },
+ { Flags::IluzjaNoCheck, "IluzjaNoCheck" },
+ { Flags::RozdzielniaNumber, "RozdzielniaNumber" },
+ { Flags::JailChecked, "JailChecked" },
+ { Flags::JailTalked, "JailTalked" },
+ { Flags::TrickFailed, "TrickFailed" },
+ { Flags::WegielVisible, "WegielVisible" },
+ { Flags::WegielTimer1, "WegielTimer1" },
+ { Flags::RandomSample, "RandomSample" },
+ { Flags::RandomSampleTimer, "RandomSampleTimer" },
+ { Flags::SampleTimer, "SampleTimer" },
+ { Flags::ZonaSample, "ZonaSample" },
+ { Flags::HoleTryAgain, "HoleTryAgain" },
+ { Flags::TeleportTimer, "TeleportTimer" },
+ { Flags::RozLezy, "RozLezy" },
+ { Flags::UdkoTimer, "UdkoTimer" },
+ { Flags::ZaworZatkany, "ZaworZatkany" },
+ { Flags::ZaworOpened, "ZaworOpened" },
+ { Flags::DoorExploded, "DoorExploded" },
+ { Flags::SkoraTaken, "SkoraTaken" },
+ { Flags::CiezkieByl, "CiezkieByl" },
+ { Flags::MamWegiel, "MamWegiel" },
+ { Flags::SwiecaAway, "SwiecaAway" },
+ { Flags::ITSAVE, "ITSAVE" },
+ { Flags::RozpadlSie, "RozpadlSie" },
+ { Flags::WegielFullTimer, "WegielFullTimer" },
+ { Flags::WegielDown, "WegielDown" },
+ { Flags::WegielDownTimer, "WegielDownTimer" },
+ { Flags::PaliSie, "PaliSie" },
+ { Flags::DiabGuardTalked, "DiabGuardTalked" },
+ { Flags::GuardsNoCheck, "GuardsNoCheck" },
+ { Flags::TalkedPowloka, "TalkedPowloka" },
+ { Flags::JailOpen, "JailOpen" },
+ { Flags::PrzytulTimer, "PrzytulTimer" },
+ { Flags::JailDone, "JailDone" },
+ { Flags::MamMonety, "MamMonety" },
+ { Flags::LotTimer, "LotTimer" },
+ { Flags::LotObj, "LotObj" },
+ { Flags::PtakTimer, "PtakTimer" },
+ { Flags::BookTimer, "BookTimer" },
+ { Flags::BookGiba, "BookGiba" },
+ { Flags::PtakLata, "PtakLata" },
+ { Flags::Podej, "Podej" },
+ { Flags::GotHint, "GotHint" },
+ { Flags::LawaLeci, "LawaLeci" },
+ { Flags::PowerKlik, "PowerKlik" },
+ { Flags::LucekBad, "LucekBad" },
+ { Flags::LucekBad1st, "LucekBad1st" },
+ { Flags::IntroDial1, "IntroDial1" },
+ { Flags::IntroDial2, "IntroDial2" },
+ { Flags::ItsOutro, "ItsOutro" },
+ { Flags::KamienComment, "KamienComment" },
+ { Flags::KamienSkip, "KamienSkip" },
+ { Flags::TesterFlag, "TesterFlag" },
+ { Flags::RememberLine, "RememberLine" },
+ { Flags::OpisLapek, "OpisLapek" },
+ { Flags::TalWait, "TalWait" },
+ { Flags::OpisKamienia, "OpisKamienia" },
+ { Flags::JumpBox, "JumpBox" },
+ { Flags::JumpBox1, "JumpBox1" },
+ { Flags::JumpBox2, "JumpBox2" },
+ { Flags::JumpBox3, "JumpBox3" },
+ { Flags::SpecPiesek, "SpecPiesek" },
+ { Flags::SpecPiesekCount, "SpecPiesekCount" },
+ { Flags::SpecPiesekGadanie, "SpecPiesekGadanie" },
+ { Flags::ZnikaFlag, "ZnikaFlag" },
+ { Flags::ZnikaTimer, "ZnikaTimer" },
+ { Flags::SowaTimer, "SowaTimer" },
+ { Flags::MamrotanieOff, "MamrotanieOff" },
+ { Flags::CURRMOB, "CURRMOB" },
+ { Flags::KOLOR, "KOLOR" },
+ { Flags::MBFLAG, "MBFLAG" },
+ { Flags::MXFLAG, "MXFLAG" },
+ { Flags::MYFLAG, "MYFLAG" },
+ { Flags::SCROLLTYPE, "SCROLLTYPE" },
+ { Flags::SCROLLVALUE, "SCROLLVALUE" },
+ { Flags::SCROLLVALUE2, "SCROLLVALUE2" },
+ { Flags::TALKEXITCODE, "TALKEXITCODE" },
+ { Flags::SPECROUTFLAG1, "SPECROUTFLAG1" },
+ { Flags::SPECROUTFLAG2, "SPECROUTFLAG2" },
+ { Flags::SPECROUTFLAG3, "SPECROUTFLAG3" },
+ { Flags::TALKFLAGCODE, "TALKFLAGCODE" },
+ { Flags::CURRROOM, "CURRROOM" },
+ { Flags::Talker1Init, "Talker1Init" },
+ { Flags::Talker2Init, "Talker2Init" },
+ { Flags::RESTOREROOM, "RESTOREROOM" },
+ { Flags::INVALLOWED, "INVALLOWED" },
+ { Flags::BOXSEL, "BOXSEL" },
+ { Flags::CURSEBLINK, "CURSEBLINK" },
+ { Flags::EXACTMOVE, "EXACTMOVE" },
+ { Flags::MOVEDESTX, "MOVEDESTX" },
+ { Flags::MOVEDESTY, "MOVEDESTY" },
+ { Flags::NOANTIALIAS, "NOANTIALIAS" },
+ { Flags::ESCAPED, "ESCAPED" },
+ { Flags::ALLOW1OPTION, "ALLOW1OPTION" },
+ { Flags::VOICE_H_LINE, "VOICE_H_LINE" },
+ { Flags::VOICE_A_LINE, "VOICE_A_LINE" },
+ { Flags::VOICE_B_LINE, "VOICE_B_LINE" },
+ { Flags::VOICE_C_LINE, "VOICE_C_LINE" },
+ { Flags::NOHEROATALL, "NOHEROATALL" },
+ { Flags::MOUSEENABLED, "MOUSEENABLED" },
+ { Flags::DIALINES, "DIALINES" },
+ { Flags::SHANWALK, "SHANWALK" },
+ { Flags::SHANDOG, "SHANDOG" },
+ { Flags::GETACTIONBACK, "GETACTIONBACK" },
+ { Flags::GETACTIONDATA, "GETACTIONDATA" },
+ { Flags::GETACTION, "GETACTION" },
+ { Flags::HEROFAST, "HEROFAST" },
+ { Flags::SELITEM, "SELITEM" },
+ { Flags::LMOUSE, "LMOUSE" },
+ { Flags::MINMX, "MINMX" },
+ { Flags::MAXMX, "MAXMX" },
+ { Flags::MINMY, "MINMY" },
+ { Flags::MAXMY, "MAXMY" },
+ { Flags::TORX1, "TORX1" },
+ { Flags::TORY1, "TORY1" },
+ { Flags::TORX2, "TORX2" },
+ { Flags::TORY2, "TORY2" },
+ { Flags::POWER, "POWER" },
+ { Flags::POWERENABLED, "POWERENABLED" },
+ { Flags::FLCRESTORE, "FLCRESTORE" },
+ { Flags::NOCLSTEXT, "NOCLSTEXT" },
+ { Flags::ESCAPED2, "ESCAPED2" },
+};
+
+} // End of namespace Prince
diff --git a/engines/prince/flags.h b/engines/prince/flags.h
new file mode 100644
index 0000000000..8337f82a95
--- /dev/null
+++ b/engines/prince/flags.h
@@ -0,0 +1,421 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_FLAGS_H
+#define PRINCE_FLAGS_H
+
+#include "common/scummsys.h"
+
+namespace Prince {
+
+class Flags {
+public:
+ static int compareFlagDebug(const void *a, const void *b);
+ static const char *getFlagName(uint16 flagId);
+
+ enum Id {
+ FLAGA1 = 0x8000,
+ FLAGA2 = 0x8002,
+ FLAGA3 = 0x8004,
+ DESTX = 0x8006,
+ DESTY = 0x8008,
+ DESTD = 0x800A,
+ DwarfDone = 0x800C,
+ GRABARZCOUNTER = 0x800E,
+ KIERUNEK = 0x8010,
+ BACKFLAG1 = 0x8012,
+ BACKFLAG2 = 0x8014,
+ BACKFLAG3 = 0x8016,
+ BACKFLAG4 = 0x8018,
+ MACROFLAG1 = 0x801A,
+ MACROFLAG2 = 0x801C,
+ MACROFLAG3 = 0x801E,
+ HEROLDDONE = 0x8020,
+ BRIDGESET = 0x8022,
+ U_BT_1 = 0x8024,
+ U_BT_2 = 0x8026,
+ U_BT_3 = 0x8028,
+ U_BT_4 = 0x802A,
+ U_BT_5 = 0x802C,
+ U_BT_6 = 0x802E,
+ U_BT_7 = 0x8030,
+ U_BT_8 = 0x8032,
+ U_BT_9 = 0x8034,
+ U_BT_COUNTER = 0x8036,
+ ARIVALDALIVE = 0x8038,
+ TALKCHAR1 = 0x803A,
+ TalkType1 = 0x803C,
+ TALKROUT1 = 0x803E,
+ TALKROUT2 = 0x8042,
+ TALKROUT3 = 0x8046,
+ TALKROUT4 = 0x804A,
+ TALKANIM1 = 0x804E,
+ TALKANIM2 = 0x8050,
+ TALKCOLOR1 = 0x8052,
+ TALKCOLOR2 = 0x8054,
+ KapciuchTaken = 0x8056,
+ CurrentBeggarA = 0x8058,
+ TempKapc = 0x805A,
+ HomTaken = 0x805C,
+ WizardTalk = 0x805E,
+ SunlordTalk = 0x8060,
+ HermitTalk = 0x8062,
+ RunyMode = 0x8064,
+ FatMerchantTalk = 0x8066,
+ HotDogTalk = 0x8068,
+ ThiefTalk = 0x806A,
+ BeggarTalk = 0x806C,
+ // DwarfTalk = 0x806E, // Redefinition
+ MonkTalk = 0x8070,
+ BardTalk = 0x8072,
+ BarmanTalk = 0x8074,
+ LeftPlayerTalk = 0x8076,
+ OczySowy = 0x8078,
+ CzachySpeed1 = 0x807A,
+ CzachySpeed2 = 0x807C,
+ CzachySpeed3 = 0x807E,
+ CzachySlowDown1 = 0x8080,
+ CzachySlowDown2 = 0x8082,
+ CzachySlowDown3 = 0x8084,
+ FjordDane = 0x8086,
+ GKopany1 = 0x8088,
+ GKopany2 = 0x808A,
+ GKopany3 = 0x808C,
+ GKopany4 = 0x808E,
+ KnowGodWord = 0x8090,
+ TALKROUT21 = 0x8092,
+ TALKROUT22 = 0x8096,
+ TALKROUT23 = 0x809A,
+ TALKROUT24 = 0x809E,
+ TalkType2 = 0x80A2,
+ GrabarzTalk = 0x80A4,
+ LastTalker = 0x80A6,
+ MapaPustelniaEnabled = 0x80A8,
+ MapaTempleEnabled = 0x80AA,
+ MapaFjordEnabled = 0x80AC,
+ MapaSilmanionaEnabled = 0x80AE,
+ MapaKurhanEnabled = 0x80B0,
+ MapaDragonEnabled = 0x80B2,
+ MapaMillEnabled = 0x80B4,
+ DwarfRunning = 0x80B6,
+ DwarfTalk = 0x80B8,
+ CurseLift = 0x80BA,
+ KosciSwapped = 0x80BC,
+ BookStolen = 0x80BE,
+ MapaUsable = 0x80C0,
+ FjordBoss = 0x80C2,
+ FjordHotDog = 0x80C4,
+ FjordLewy = 0x80C6,
+ FjordPrawy = 0x80C8,
+ TalkArivald = 0x80CA,
+ ShootDone = 0x80CC,
+ ShootRunning = 0x80CE,
+ ShootKnow = 0x80D0,
+ MirrorKnow = 0x80D2,
+ Gar1stTime = 0x80D4,
+ KosciTaken = 0x80D6,
+ ArivGotSpell = 0x80D8,
+ BookGiven = 0x80DA,
+ Wywieszka = 0x80DC,
+ TalkSheila = 0x80DE,
+ TalkSheila2 = 0x80E0,
+ BackHuman = 0x80E2,
+ SkarbiecOpen = 0x80E4,
+ LustroTaken = 0x80E6,
+ GargoyleHom = 0x80E8,
+ GargoyleBroken = 0x80EA,
+ FjordDzien = 0x80EC,
+ GargoyleHom2 = 0x80EE,
+ RunMonstersRunning = 0x80F0,
+ FoundPaperInCoffin = 0x80F2,
+ KnowSunlord = 0x80F4,
+ KnowSunlordTalk = 0x80F6,
+ ArivaldCzyta = 0x80F8,
+ TelepX = 0x80FA,
+ TelepY = 0x80FC,
+ TelepDir = 0x80FE,
+ TelepRoom = 0x8100,
+ ListStolen = 0x8102,
+ WifeInDoor = 0x8104,
+ TalkWifeFlag = 0x8106,
+ LetterGiven = 0x8108,
+ LutniaTaken = 0x810A,
+ BardHomeOpen = 0x810C,
+ FjordNoMonsters = 0x810E,
+ ShandriaWallTalking = 0x8110,
+ ShandriaWallCounter = 0x8112,
+ ShandriaWallDone = 0x8114,
+ FutureDone = 0x8116,
+ TalkButch = 0x8118,
+ GotSzalik = 0x811A,
+ GotCzosnek = 0x811C,
+ BearDone = 0x811E,
+ NekrVisited = 0x8120,
+ SunRiddle = 0x8122,
+ PtaszekAway = 0x8124,
+ KotGadanie = 0x8126,
+ SzlafmycaTaken = 0x8128,
+ BabkaTalk = 0x812A,
+ SellerTalk = 0x812C,
+ CzosnekDone = 0x812E,
+ PriestCounter = 0x8130,
+ PriestGest1 = 0x8132,
+ PriestGest2 = 0x8134,
+ PriestGest3 = 0x8136,
+ PriestGest4 = 0x8138,
+ PriestAnim = 0x813A,
+ HolyWaterTaken = 0x813C,
+ AxeTaken = 0x813E,
+ BadylTaken1 = 0x8140,
+ BadylTaken2 = 0x8142,
+ BadylSharpened = 0x8144,
+ PorwanieSmoka = 0x8146,
+ ShopReOpen = 0x8148,
+ LuskaShown = 0x814A,
+ CudKnow = 0x814C,
+ VampireDead = 0x814E,
+ MapaVisible1 = 0x8150,
+ MapaVisible2 = 0x8152,
+ MapaVisible3 = 0x8154,
+ MapaVisible4 = 0x8156,
+ MapaVisible5 = 0x8158,
+ MapaVisible6 = 0x815A,
+ MapaVisible7 = 0x815C,
+ MapaVisible8 = 0x815E,
+ MapaVisible9 = 0x8160,
+ MapaX = 0x8162,
+ MapaY = 0x8164,
+ MapaD = 0x8166,
+ OldMapaX = 0x8168,
+ OldMapaY = 0x816A,
+ OldMapaD = 0x816C,
+ MovingBack = 0x816E,
+ MapaCount = 0x8170,
+ Pustelnia1st = 0x8172,
+ CzarnePole1st = 0x8174,
+ TalkArivNum = 0x8176,
+ Pfui = 0x8178,
+ MapaSunlordEnabled = 0x817A,
+ WebDone = 0x817C,
+ DragonDone = 0x817E,
+ KanPlay = 0x8180,
+ OldKanPlay = 0x8182,
+ LapkiWait = 0x8184,
+ WebNoCheck = 0x8186,
+ Perfumeria = 0x8188,
+ SmokNoCheck = 0x818A,
+ IluzjaBroken = 0x818C,
+ IluzjaWorking = 0x818E,
+ IluzjaCounter = 0x8190,
+ KurhanOpen1 = 0x8192,
+ KastetTaken = 0x8194,
+ KastetDown = 0x8196,
+ KurhanDone = 0x8198,
+ SkelCounter = 0x819A,
+ SkelDial1 = 0x819C,
+ SkelDial2 = 0x819E,
+ SkelDial3 = 0x81A0,
+ SkelDial4 = 0x81A2,
+ SameTalker = 0x81A4,
+ RunMonstersText = 0x81A6,
+ PiwnicaChecked = 0x81A8,
+ DragonTalked = 0x81AA,
+ ToldAboutBook = 0x81AC,
+ SilmanionaDone = 0x81AE,
+ ToldBookCount = 0x81B0,
+ SmrodNoCheck = 0x81B2,
+ RopeTaken = 0x81B4,
+ RopeTime = 0x81B6,
+ LaskaFree = 0x81B8,
+ ShanSmokTalked = 0x81BA,
+ SwordTaken = 0x81BC,
+ Mill1st = 0x81BE,
+ SawRat = 0x81C0,
+ KnowRat = 0x81C2,
+ DziuraTimer = 0x81C4,
+ LaskaInside = 0x81C6,
+ HoleBig = 0x81C8,
+ EnableWiedzmin = 0x81CA,
+ EnableTrucizna = 0x81CC,
+ KnowPoison = 0x81CE,
+ KufelTaken = 0x81D0,
+ BojkaEnabled = 0x81D2,
+ BitwaNot1st = 0x81D4,
+ BojkaTimer = 0x81D6,
+ BojkaGirl = 0x81D8,
+ Look1st = 0x81DA,
+ RatTaken = 0x81DC,
+ LaskaTalkedGr = 0x81DE,
+ RatusGivus = 0x81E0,
+ MamObole = 0x81E2,
+ Speed1st = 0x81E4,
+ SpeedTimer = 0x81E6,
+ ProveIt = 0x81E8,
+ Proven = 0x81EA,
+ ShowWoalka = 0x81EC,
+ PoisonTaken = 0x81EE,
+ HellOpened = 0x81F0,
+ HellNoCheck = 0x81F2,
+ TalAn1 = 0x81F4,
+ TalAn2 = 0x81F6,
+ TalAn3 = 0x81F8,
+ TalkDevilGuard = 0x81fA,
+ Sword1st = 0x81FC,
+ IluzjaNoCheck = 0x81FE,
+ RozdzielniaNumber = 0x8200,
+ JailChecked = 0x8202,
+ JailTalked = 0x8204,
+ TrickFailed = 0x8206,
+ WegielVisible = 0x8208,
+ WegielTimer1 = 0x820A,
+ RandomSample = 0x820C,
+ RandomSampleTimer = 0x820E,
+ SampleTimer = 0x8210,
+ ZonaSample = 0x8212,
+ HoleTryAgain = 0x8214,
+ TeleportTimer = 0x8216,
+ RozLezy = 0x8218,
+ UdkoTimer = 0x821A,
+ ZaworZatkany = 0x821C,
+ ZaworOpened = 0x821E,
+ DoorExploded = 0x8220,
+ SkoraTaken = 0x8222,
+ CiezkieByl = 0x8224,
+ MamWegiel = 0x8226,
+ SwiecaAway = 0x8228,
+ ITSAVE = 0x822A,
+ RozpadlSie = 0x822C,
+ WegielFullTimer = 0x822E,
+ WegielDown = 0x8230,
+ WegielDownTimer = 0x8232,
+ PaliSie = 0x8234,
+ DiabGuardTalked = 0x8236,
+ GuardsNoCheck = 0x8238,
+ TalkedPowloka = 0x823A,
+ JailOpen = 0x823C,
+ PrzytulTimer = 0x823E,
+ JailDone = 0x8240,
+ MamMonety = 0x8242,
+ LotTimer = 0x8244,
+ LotObj = 0x8246,
+ PtakTimer = 0x8248,
+ BookTimer = 0x824A,
+ BookGiba = 0x824C,
+ PtakLata = 0x824E,
+ Podej = 0x8250,
+ GotHint = 0x8252,
+ LawaLeci = 0x8254,
+ PowerKlik = 0x8258,
+ LucekBad = 0x825A,
+ LucekBad1st = 0x825C,
+ IntroDial1 = 0x825E,
+ IntroDial2 = 0x8260,
+ ItsOutro = 0x8262,
+ KamienComment = 0x8264,
+ KamienSkip = 0x8266,
+ TesterFlag = 0x8268,
+ RememberLine = 0x826A,
+ OpisLapek = 0x826C,
+ //OpisKamienia = 0x826E, // Redefinition
+ TalWait = 0x8270,
+ OpisKamienia = 0x8272,
+ JumpBox = 0x8274,
+ JumpBox1 = 0x8276,
+ JumpBox2 = 0x8278,
+ JumpBox3 = 0x827A,
+ SpecPiesek = 0x827C,
+ SpecPiesekCount = 0x827E,
+ SpecPiesekGadanie = 0x8282,
+ ZnikaFlag = 0x8284,
+ ZnikaTimer = 0x8286,
+ SowaTimer = 0x8288,
+ MamrotanieOff = 0x828A,
+ // System flags controlled by script
+ CURRMOB = 0x8400,
+ KOLOR = 0x8402,
+ MBFLAG = 0x8404,
+ MXFLAG = 0x8406,
+ MYFLAG = 0x8408,
+ SCROLLTYPE = 0x840A,
+ SCROLLVALUE = 0x840C,
+ SCROLLVALUE2 = 0x840E,
+ TALKEXITCODE = 0x8410,
+ SPECROUTFLAG1 = 0x8412,
+ SPECROUTFLAG2 = 0x8414,
+ SPECROUTFLAG3 = 0x8416,
+ TALKFLAGCODE = 0x8418,
+ CURRROOM = 0x841A,
+ Talker1Init = 0x841C,
+ Talker2Init = 0x841E,
+ RESTOREROOM = 0x8420,
+ INVALLOWED = 0x8422,
+ BOXSEL = 0x8424,
+ CURSEBLINK = 0x8426,
+ EXACTMOVE = 0x8428,
+ MOVEDESTX = 0x842A,
+ MOVEDESTY = 0x842C,
+ NOANTIALIAS = 0x842E,
+ ESCAPED = 0x8430,
+ ALLOW1OPTION = 0x8432,
+ VOICE_H_LINE = 0x8434,
+ VOICE_A_LINE = 0x8436,
+ VOICE_B_LINE = 0x8438,
+ VOICE_C_LINE = 0x843A,
+ NOHEROATALL = 0x843C,
+ MOUSEENABLED = 0x843E,
+ DIALINES = 0x8440,
+ //SELITEM = 0x8442, // Redefinition
+ SHANWALK = 0x8444,
+ SHANDOG = 0x8446,
+ GETACTIONBACK = 0x8448,
+ GETACTIONDATA = 0x844C,
+ GETACTION = 0x8450,
+ HEROFAST = 0x8452,
+ SELITEM = 0x8454,
+ LMOUSE = 0x8456,
+ MINMX = 0x8458,
+ MAXMX = 0x845A,
+ MINMY = 0x845C,
+ MAXMY = 0x845E,
+ TORX1 = 0x8460,
+ TORY1 = 0x8462,
+ TORX2 = 0x8464,
+ TORY2 = 0x8466,
+ POWER = 0x8468,
+ POWERENABLED = 0x846A,
+ FLCRESTORE = 0x846C,
+ NOCLSTEXT = 0x846E,
+ ESCAPED2 = 0x8470
+ };
+
+ struct FlagDebug {
+ Id id;
+ char flagName[30];
+ };
+
+ static const int kFlagDebugAmount = 368;
+ static const FlagDebug _flagNames[kFlagDebugAmount];
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/font.cpp b/engines/prince/font.cpp
new file mode 100644
index 0000000000..e81a93d1a1
--- /dev/null
+++ b/engines/prince/font.cpp
@@ -0,0 +1,94 @@
+/* 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 "common/archive.h"
+#include "common/debug.h"
+#include "common/stream.h"
+
+#include "prince/font.h"
+#include "prince/prince.h"
+
+namespace Prince {
+
+Font::Font() : _fontData(nullptr) {
+}
+
+Font::~Font() {
+ if (_fontData != nullptr) {
+ free(_fontData);
+ _fontData = nullptr;
+ }
+}
+
+bool Font::loadStream(Common::SeekableReadStream &stream) {
+ stream.seek(0);
+ uint32 dataSize = stream.size();
+ _fontData = (byte *)malloc(dataSize);
+ stream.read(_fontData, stream.size());
+ return true;
+}
+
+int Font::getFontHeight() const {
+ return _fontData[5];
+}
+
+int Font::getMaxCharWidth() const {
+ return 0;
+}
+
+Font::ChrData Font::getChrData(byte chr) const {
+ chr -= 32;
+ uint16 chrOffset = 4 * chr + 6;
+
+ ChrData chrData;
+ chrData._width = _fontData[chrOffset + 2];
+ chrData._height = _fontData[chrOffset + 3];
+ chrData._pixels = _fontData + READ_LE_UINT16(_fontData + chrOffset);
+
+ return chrData;
+}
+
+int Font::getCharWidth(uint32 chr) const {
+ return getChrData(chr)._width;
+}
+
+void Font::drawChar(Graphics::Surface *dst, uint32 chr, int posX, int posY, uint32 color) const {
+ const ChrData chrData = getChrData(chr);
+ Common::Rect screenRect(0, 0, PrinceEngine::kNormalWidth, PrinceEngine::kNormalHeight);
+
+ for (int y = 0; y < chrData._height; y++) {
+ for (int x = 0; x < chrData._width; x++) {
+ byte d = chrData._pixels[x + (chrData._width * y)];
+ if (d == 0) d = 255;
+ else if (d == 1) d = 0;
+ else if (d == 2) d = color;
+ else if (d == 3) d = 0;
+ if (d != 255) {
+ if (screenRect.contains(posX + x, posY + y)) {
+ *(byte *)dst->getBasePtr(posX + x, posY + y) = d;
+ }
+ }
+ }
+ }
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/font.h b/engines/prince/font.h
new file mode 100644
index 0000000000..b03849a4aa
--- /dev/null
+++ b/engines/prince/font.h
@@ -0,0 +1,64 @@
+/* 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.
+ */
+
+#ifndef PRINCE_FONT_H
+#define PRINCE_FONT_H
+
+#include "graphics/font.h"
+#include "graphics/surface.h"
+
+#include "common/str.h"
+#include "common/rect.h"
+
+namespace Prince {
+
+class Font : public Graphics::Font {
+public:
+ Font();
+ virtual ~Font();
+
+ bool loadStream(Common::SeekableReadStream &stream);
+
+ virtual int getFontHeight() const override;
+
+ virtual int getMaxCharWidth() const override;
+
+ virtual int getCharWidth(uint32 chr) const override;
+
+ virtual void drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const override;
+
+ virtual int getKerningOffset(uint32 left, uint32 right) const override { return -2; }
+
+private:
+ struct ChrData {
+ byte *_pixels;
+ byte _width;
+ byte _height;
+ };
+
+ ChrData getChrData(byte chr) const;
+
+ byte *_fontData;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp
new file mode 100644
index 0000000000..ad6a2ff85c
--- /dev/null
+++ b/engines/prince/graphics.cpp
@@ -0,0 +1,474 @@
+/* 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 "prince/graphics.h"
+#include "prince/prince.h"
+#include "prince/mhwanh.h"
+
+#include "graphics/palette.h"
+
+#include "common/memstream.h"
+
+namespace Prince {
+
+GraphicsMan::GraphicsMan(PrinceEngine *vm) : _vm(vm), _changed(false) {
+ initGraphics(640, 480, true);
+
+ _frontScreen = new Graphics::Surface();
+ _frontScreen->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
+
+ _screenForInventory = new Graphics::Surface();
+ _screenForInventory->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
+
+ _mapScreen = new Graphics::Surface();
+ _mapScreen->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
+
+ _shadowTable70 = (byte *)malloc(256);
+ _shadowTable50 = (byte *)malloc(256);
+}
+
+GraphicsMan::~GraphicsMan() {
+ _frontScreen->free();
+ delete _frontScreen;
+
+ _screenForInventory->free();
+ delete _screenForInventory;
+
+ _mapScreen->free();
+ delete _mapScreen;
+
+ free(_shadowTable70);
+ free(_shadowTable50);
+}
+
+void GraphicsMan::update(Graphics::Surface *screen) {
+ if (_changed) {
+ _vm->_system->copyRectToScreen((byte *)screen->getBasePtr(0, 0), 640, 0, 0, 640, 480);
+
+ _vm->_system->updateScreen();
+ _changed = false;
+ }
+}
+
+void GraphicsMan::setPalette(const byte *palette) {
+ _vm->_system->getPaletteManager()->setPalette(palette, 0, 256);
+}
+
+void GraphicsMan::change() {
+ _changed = true;
+}
+
+void GraphicsMan::draw(Graphics::Surface *screen, const Graphics::Surface *s) {
+ uint16 w = MIN(screen->w, s->w);
+ const byte *src = (const byte *)s->getBasePtr(0, 0);
+ byte *dst = (byte *)screen->getBasePtr(0, 0);
+ for (uint y = 0; y < s->h; y++) {
+ if (y < screen->h) {
+ memcpy(dst, src, w);
+ }
+ src += s->pitch;
+ dst += screen->pitch;
+ }
+ change();
+}
+
+// Black (value = 0) as a primary transparent color, fix for FLC animations
+void GraphicsMan::drawTransparentSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, int secondTransColor) {
+ const byte *src1 = (const byte *)s->getBasePtr(0, 0);
+ byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
+ for (int y = 0; y < s->h; y++) {
+ if (y + posY < screen->h && y + posY >= 0) {
+ const byte *src2 = src1;
+ byte *dst2 = dst1;
+ for (int x = 0; x < s->w; x++, src2++, dst2++) {
+ if (*src2 && *src2 != secondTransColor) {
+ if (x + posX < screen->w && x + posX >= 0) {
+ *dst2 = *src2;
+ }
+ }
+ }
+ }
+ src1 += s->pitch;
+ dst1 += screen->pitch;
+ }
+ change();
+}
+
+/**
+ * Similar to drawTransparentSurface but with use of shadowTable for color recalculation
+ * and kShadowColor (191) as a transparent color.
+ */
+void GraphicsMan::drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, byte *shadowTable) {
+ const byte *src1 = (const byte *)s->getBasePtr(0, 0);
+ byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
+ for (int y = 0; y < s->h; y++) {
+ if (y + posY < screen->h && y + posY >= 0) {
+ const byte *src2 = src1;
+ byte *dst2 = dst1;
+ for (int x = 0; x < s->w; x++, src2++, dst2++) {
+ if (*src2 == kShadowColor) {
+ if (x + posX < screen->w && x + posX >= 0) {
+ *dst2 = *(shadowTable + *dst2);
+ }
+ }
+ }
+ }
+ src1 += s->pitch;
+ dst1 += screen->pitch;
+ }
+}
+
+/**
+ * Used in glowing animation for inventory items. Creates special blendTable array of colors,
+ * use black (0) as a transparent color.
+ */
+void GraphicsMan::drawTransparentWithBlendSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s) {
+ const byte *src1 = (const byte *)s->getBasePtr(0, 0);
+ byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
+ byte *blendTable = (byte *)malloc(256);
+ for (int i = 0; i < 256; i++) {
+ blendTable[i] = 255;
+ }
+ for (int y = 0; y < s->h; y++) {
+ if (y + posY < screen->h && y + posY >= 0) {
+ const byte *src2 = src1;
+ byte *dst2 = dst1;
+ for (int x = 0; x < s->w; x++, src2++, dst2++) {
+ if (*src2) {
+ if (x + posX < screen->w && x + posX >= 0) {
+ *dst2 = getBlendTableColor(*src2, *dst2, blendTable);
+ }
+ }
+ }
+ }
+ src1 += s->pitch;
+ dst1 += screen->pitch;
+ }
+ free(blendTable);
+ change();
+}
+
+/**
+ * Similar to drawTransparentSurface but with with use of DrawNode as argument for Z axis sorting
+ * and white (255) as transparent color.
+ */
+void GraphicsMan::drawTransparentDrawNode(Graphics::Surface *screen, DrawNode *drawNode) {
+ byte *src1 = (byte *)drawNode->s->getBasePtr(0, 0);
+ byte *dst1 = (byte *)screen->getBasePtr(drawNode->posX, drawNode->posY);
+ for (int y = 0; y < drawNode->s->h; y++) {
+ if (y + drawNode->posY < screen->h && y + drawNode->posY >= 0) {
+ byte *src2 = src1;
+ byte *dst2 = dst1;
+ for (int x = 0; x < drawNode->s->w; x++, src2++, dst2++) {
+ if (*src2 != 255) {
+ if (x + drawNode->posX < screen->w && x + drawNode->posX >= 0) {
+ *dst2 = *src2;
+ }
+ }
+ }
+ }
+ src1 += drawNode->s->pitch;
+ dst1 += screen->pitch;
+ }
+}
+
+/**
+ * Similar to drawTransparentDrawNode but with additional anti-aliasing code for sprite drawing.
+ * Edge smoothing is based on 256 x 256 table of colors transition.
+ * Algorithm is checking if currently drawing pixel is located next to the edge of sprite and if it makes jagged line.
+ * If it does then this pixel is set with color from transition table calculated of original background pixel color
+ * and sprite's edge pixel color.
+ */
+void GraphicsMan::drawTransparentWithTransDrawNode(Graphics::Surface *screen, DrawNode *drawNode) {
+ // pos of first pixel for each row of source sprite
+ byte *src1 = (byte *)drawNode->s->getBasePtr(0, 0);
+ // pos of drawing first pixel for each row on screen surface
+ byte *dst1 = (byte *)screen->getBasePtr(drawNode->posX, drawNode->posY);
+ // trasition table for calculating new color value
+ byte *transTableData = (byte *)drawNode->data;
+ for (int y = 0; y < drawNode->s->h; y++) {
+ if (y + drawNode->posY < screen->h && y + drawNode->posY >= 0) {
+ // current pixel in row of source sprite
+ byte *src2 = src1;
+ // current pixel in row of screen surface
+ byte *dst2 = dst1;
+ for (int x = 0; x < drawNode->s->w; x++, src2++, dst2++) {
+ if (x + drawNode->posX < screen->w && x + drawNode->posX >= 0) {
+ if (*src2 != 255) {
+ // if source sprite pixel is not mask color than draw it normally
+ *dst2 = *src2;
+ } else {
+ // check for making jagged line
+ if (x) {
+ // not first pixel in row
+ if (*(src2 - 1) == 255) {
+ // if it has mask color to the left - check right
+ if (x != drawNode->s->w - 1) {
+ // not last pixel in row
+ if (*(src2 + 1) == 255) {
+ // pixel to the right with mask color - no anti-alias
+ continue;
+ }
+ // it's not mask color to the right - we continue checking
+ } else {
+ // last pixel in row, no right check - no anti-alias
+ continue;
+ }
+ }
+ // it's not mask color to the left - we continue checking
+ } else if (x != drawNode->s->w - 1) {
+ // first pixel in row but not last - just right pixel checking
+ if (*(src2 + 1) == 255) {
+ // pixel to the right with mask color - no anti-alias
+ continue;
+ }
+ // it's not mask color to the right - we continue checking
+ } else {
+ // it's first and last pixel in row at the same time (width = 1) - no anti-alias
+ continue;
+ }
+ byte value = 0;
+ if (y != drawNode->s->h - 1) {
+ // not last row
+ // check pixel below of current src2 pixel
+ value = *(src2 + drawNode->s->pitch);
+ if (value == 255) {
+ // pixel below with mask color - check above
+ if (y) {
+ // not first row
+ value = *(src2 - drawNode->s->pitch);
+ if (value == 255) {
+ // pixel above with mask color - no anti-alias
+ continue;
+ }
+ // it's not mask color above - we draw as transition color
+ } else {
+ // first row - no anti-alias
+ continue;
+ }
+ }
+ // it's not mask color below - we draw as transition color
+ } else if (y) {
+ // last row - just check above
+ value = *(src2 - drawNode->s->pitch);
+ if (value == 255) {
+ // pixel above with mask color - no anti-alias
+ continue;
+ }
+ // it's not mask color above - we draw as transition color
+ } else {
+ // first and last row at the same time (height = 1) - no anti-alias
+ continue;
+ }
+ // new color value based on orginal screen surface color and sprite's edge pixel color
+ *dst2 = transTableData[*dst2 * 256 + value];
+ }
+ }
+ }
+ }
+ // adding pitch to jump to next row of pixels
+ src1 += drawNode->s->pitch;
+ dst1 += screen->pitch;
+ }
+}
+
+void GraphicsMan::drawMaskDrawNode(Graphics::Surface *screen, DrawNode *drawNode) {
+ byte *maskData = (byte *)drawNode->data;
+ byte *src1 = (byte *)drawNode->originalRoomSurface->getBasePtr(drawNode->posX, drawNode->posY);
+ byte *dst1 = (byte *)screen->getBasePtr(drawNode->posX, drawNode->posY);
+ int maskWidth = drawNode->width >> 3;
+ int maskPostion = 0;
+ int maskCounter = 128;
+ for (int y = 0; y < drawNode->height; y++) {
+ if (y + drawNode->posY < screen->h && y + drawNode->posY >= 0) {
+ byte *src2 = src1;
+ byte *dst2 = dst1;
+ int tempMaskPostion = maskPostion;
+ for (int x = 0; x < drawNode->width; x++, src2++, dst2++) {
+ if (x + drawNode->posX < screen->w && x + drawNode->posX >= 0) {
+ if ((maskData[tempMaskPostion] & maskCounter) != 0) {
+ *dst2 = *src2;
+ }
+ }
+ maskCounter >>= 1;
+ if (maskCounter == 0) {
+ maskCounter = 128;
+ tempMaskPostion++;
+ }
+ }
+ }
+ src1 += drawNode->originalRoomSurface->pitch;
+ dst1 += screen->pitch;
+ maskPostion += maskWidth;
+ maskCounter = 128;
+ }
+}
+
+void GraphicsMan::drawAsShadowDrawNode(Graphics::Surface *screen, DrawNode *drawNode) {
+ byte *shadowData = (byte *)drawNode->data;
+ byte *src1 = (byte *)drawNode->s->getBasePtr(0, 0);
+ byte *dst1 = (byte *)screen->getBasePtr(drawNode->posX, drawNode->posY);
+ for (int y = 0; y < drawNode->s->h; y++) {
+ if (y + drawNode->posY < screen->h && y + drawNode->posY >= 0) {
+ byte *src2 = src1;
+ byte *dst2 = dst1;
+ for (int x = 0; x < drawNode->s->w; x++, src2++, dst2++) {
+ if (*src2 == kShadowColor) {
+ if (x + drawNode->posX < screen->w && x + drawNode->posX >= 0) {
+ *dst2 = *(shadowData + *dst2);
+ }
+ }
+ }
+ }
+ src1 += drawNode->s->pitch;
+ dst1 += screen->pitch;
+ }
+}
+
+void GraphicsMan::drawBackSpriteDrawNode(Graphics::Surface *screen, DrawNode *drawNode) {
+ byte *src1 = (byte *)drawNode->s->getBasePtr(0, 0);
+ byte *dst1 = (byte *)screen->getBasePtr(drawNode->posX, drawNode->posY);
+ for (int y = 0; y < drawNode->s->h; y++) {
+ if (y + drawNode->posY < screen->h && y + drawNode->posY >= 0) {
+ byte *src2 = src1;
+ byte *dst2 = dst1;
+ for (int x = 0; x < drawNode->s->w; x++, src2++, dst2++) {
+ if (*src2 != 255) {
+ if (x + drawNode->posX < screen->w && x + drawNode->posX >= 0) {
+ if (*dst2 == 255) {
+ *dst2 = *src2;
+ }
+ }
+ }
+ }
+ }
+ src1 += drawNode->s->pitch;
+ dst1 += screen->pitch;
+ }
+}
+
+byte GraphicsMan::getBlendTableColor(byte pixelColor, byte backgroundPixelColor, byte *blendTable) {
+ int currColor = 0;
+
+ if (blendTable[pixelColor] != 255) {
+ currColor = blendTable[pixelColor];
+ } else {
+ const byte *originalPalette = _vm->_roomBmp->getPalette();
+
+ int redFirstOrg = originalPalette[pixelColor * 3] * _vm->_mst_shadow / 256;
+ CLIP(redFirstOrg, 0, 255);
+ if (_vm->_mst_shadow <= 256) {
+ int redFirstBack = originalPalette[backgroundPixelColor * 3] * (256 - _vm->_mst_shadow) / 256;
+ CLIP(redFirstBack, 0, 255);
+ redFirstOrg += redFirstBack;
+ CLIP(redFirstOrg, 0, 255);
+ }
+
+ int greenFirstOrg = originalPalette[pixelColor * 3 + 1] * _vm->_mst_shadow / 256;
+ CLIP(greenFirstOrg, 0, 255);
+ if (_vm->_mst_shadow <= 256) {
+ int greenFirstBack = originalPalette[backgroundPixelColor * 3 + 1] * (256 - _vm->_mst_shadow) / 256;
+ CLIP(greenFirstBack, 0, 255);
+ greenFirstOrg += greenFirstBack;
+ CLIP(greenFirstOrg, 0, 255);
+ }
+
+ int blueFirstOrg = originalPalette[pixelColor * 3 + 2] * _vm->_mst_shadow / 256;
+ CLIP(blueFirstOrg, 0, 255);
+ if (_vm->_mst_shadow <= 256) {
+ int blueFirstBack = originalPalette[backgroundPixelColor * 3 + 2] * (256 - _vm->_mst_shadow) / 256;
+ CLIP(blueFirstBack, 0, 255);
+ blueFirstOrg += blueFirstBack;
+ CLIP(blueFirstOrg, 0, 255);
+ }
+
+ int bigValue = PrinceEngine::kIntMax; // infinity
+ for (int j = 0; j < 256; j++) {
+ int redSecondOrg = originalPalette[3 * j];
+ int redNew = redFirstOrg - redSecondOrg;
+ redNew = redNew * redNew;
+
+ int greenSecondOrg = originalPalette[3 * j + 1];
+ int greenNew = greenFirstOrg - greenSecondOrg;
+ greenNew = greenNew * greenNew;
+
+ int blueSecondOrg = originalPalette[3 * j + 2];
+ int blueNew = blueFirstOrg - blueSecondOrg;
+ blueNew = blueNew * blueNew;
+
+ int sumOfColorValues = redNew + greenNew + blueNew;
+
+ if (sumOfColorValues < bigValue) {
+ bigValue = sumOfColorValues;
+ currColor = j;
+ }
+
+ if (sumOfColorValues == 0) {
+ break;
+ }
+ }
+ blendTable[pixelColor] = currColor;
+ }
+ return currColor;
+}
+
+void GraphicsMan::makeShadowTable(int brightness, byte *shadowPalette) {
+ int shadow = brightness * 256 / 100;
+ const byte *originalPalette = _vm->_roomBmp->getPalette();
+
+ for (int i = 0; i < 256; i++) {
+ int redFirstOrg = originalPalette[3 * i] * shadow / 256;
+ int greenFirstOrg = originalPalette[3 * i + 1] * shadow / 256;
+ int blueFirstOrg = originalPalette[3 * i + 2] * shadow / 256;
+
+ int currColor = 0;
+ int bigValue = 999999999; // infinity
+
+ for (int j = 0; j < 256; j++) {
+ int redSecondOrg = originalPalette[3 * j];
+ int redNew = redFirstOrg - redSecondOrg;
+ redNew = redNew * redNew;
+
+ int greenSecondOrg = originalPalette[3 * j + 1];
+ int greenNew = greenFirstOrg - greenSecondOrg;
+ greenNew = greenNew * greenNew;
+
+ int blueSecondOrg = originalPalette[3 * j + 2];
+ int blueNew = blueFirstOrg - blueSecondOrg;
+ blueNew = blueNew * blueNew;
+
+ int sumOfColorValues = redNew + greenNew + blueNew;
+
+ if (sumOfColorValues < bigValue) {
+ bigValue = sumOfColorValues;
+ currColor = j;
+ }
+
+ if (sumOfColorValues == 0) {
+ break;
+ }
+ }
+ shadowPalette[i] = currColor;
+ }
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/graphics.h b/engines/prince/graphics.h
new file mode 100644
index 0000000000..b6f002b7da
--- /dev/null
+++ b/engines/prince/graphics.h
@@ -0,0 +1,76 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_GRAPHICS_H
+#define PRINCE_GRAPHICS_H
+
+#include "graphics/surface.h"
+
+namespace Prince {
+
+class PrinceEngine;
+class MhwanhDecoder;
+struct DrawNode;
+
+class GraphicsMan {
+public:
+ GraphicsMan(PrinceEngine *vm);
+ ~GraphicsMan();
+
+ void update(Graphics::Surface *screen);
+
+ void change();
+
+ void setPalette(const byte *palette);
+ void makeShadowTable(int brightness, byte *shadowTable);
+
+ void draw(Graphics::Surface *screen, const Graphics::Surface *s);
+ void drawTransparentSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, int secondTransColor = 0);
+ void drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, byte *shadowTable);
+ void drawTransparentWithBlendSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s);
+
+ static void drawTransparentDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
+ static void drawTransparentWithTransDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
+ static void drawAsShadowDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
+ static void drawMaskDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
+ static void drawBackSpriteDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
+
+ byte getBlendTableColor(byte pixelColor, byte backgroundPixelColor, byte *blendTable);
+
+ Graphics::Surface *_frontScreen;
+ Graphics::Surface *_screenForInventory;
+ Graphics::Surface *_mapScreen;
+ const Graphics::Surface *_roomBackground;
+
+ byte *_shadowTable70;
+ byte *_shadowTable50;
+
+ static const byte kShadowColor = 191;
+
+private:
+ PrinceEngine *_vm;
+ bool _changed;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/hero.cpp b/engines/prince/hero.cpp
new file mode 100644
index 0000000000..146470f6b7
--- /dev/null
+++ b/engines/prince/hero.cpp
@@ -0,0 +1,1002 @@
+/* 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 "common/debug.h"
+#include "common/random.h"
+
+#include "prince/hero.h"
+#include "prince/hero_set.h"
+#include "prince/animation.h"
+#include "prince/resource.h"
+#include "prince/prince.h"
+#include "prince/graphics.h"
+#include "prince/flags.h"
+#include "prince/script.h"
+
+namespace Prince {
+
+Hero::Hero(PrinceEngine *vm, GraphicsMan *graph) : _vm(vm), _graph(graph),
+ _number(0), _visible(false), _state(kHeroStateStay), _middleX(0), _middleY(0),
+ _boreNum(1), _currHeight(0), _moveDelay(0), _shadMinus(0), _moveSetType(0), _zoomedHeroSurface(nullptr),
+ _lastDirection(kHeroDirDown), _destDirection(kHeroDirDown), _talkTime(0), _boredomTime(0), _phase(0),
+ _specAnim(nullptr), _drawX(0), _drawY(0), _drawZ(0),
+ _frameXSize(0), _frameYSize(0), _scaledFrameXSize(0), _scaledFrameYSize(0), _color(0),
+ _coords(nullptr), _dirTab(nullptr), _currCoords(nullptr), _currDirTab(nullptr), _step(0),
+ _maxBoredom(200), _leftRightMainDir(0), _upDownMainDir(0), _animSetNr(0)
+{
+}
+
+Hero::~Hero() {
+ freeHeroAnim();
+ freeOldMove();
+ freeZoomedSurface();
+}
+
+bool Hero::loadAnimSet(uint32 animSetNr) {
+ _animSetNr = animSetNr;
+
+ if (animSetNr >= ARRAYSIZE(heroSetTable)) {
+ return false;
+ }
+
+ _shadMinus = heroSetBack[animSetNr];
+
+ for (uint32 i = 0; i < _moveSet.size(); i++) {
+ delete _moveSet[i];
+ }
+
+ const HeroSetAnimNames &animSet = *heroSetTable[animSetNr];
+
+ _moveSet.resize(kMoveSetSize);
+ for (uint32 i = 0; i < kMoveSetSize; i++) {
+ debug("Anim set item %d %s", i, animSet[i]);
+ Animation *anim = nullptr;
+ if (animSet[i] != nullptr) {
+ anim = new Animation();
+ Resource::loadResource(anim, animSet[i], false);
+ }
+ _moveSet[i] = anim;
+ }
+
+ return true;
+}
+
+Graphics::Surface *Hero::getSurface() {
+ Animation *heroAnim = nullptr;
+ if (_specAnim != nullptr) {
+ heroAnim = _specAnim;
+ } else {
+ heroAnim = _moveSet[_moveSetType];
+ }
+
+ if (heroAnim != nullptr) {
+ int16 phaseFrameIndex = heroAnim->getPhaseFrameIndex(_phase);
+ Graphics::Surface *heroFrame = heroAnim->getFrame(phaseFrameIndex);
+ return heroFrame;
+ }
+ return nullptr;
+}
+
+uint16 Hero::getData(AttrId dataId) {
+ switch (dataId) {
+ case kHeroLastDir:
+ return _lastDirection;
+ case kHeroAnimSet:
+ return _animSetNr;
+ default:
+ assert(false);
+ return 0;
+ }
+}
+
+int Hero::getScaledValue(int size) {
+ int16 initScaleValue = _vm->_scaleValue;
+ if (_vm->_scaleValue != 10000) {
+ int newSize = 0;
+ for (int i = 0; i < size; i++) {
+ initScaleValue -= 100;
+ if (initScaleValue >= 0) {
+ newSize++;
+ } else {
+ initScaleValue += _vm->_scaleValue;
+ }
+ }
+ return newSize;
+ } else {
+ return size;
+ }
+}
+
+Graphics::Surface *Hero::zoomSprite(Graphics::Surface *heroFrame) {
+ Graphics::Surface *zoomedFrame = new Graphics::Surface();
+ zoomedFrame->create(_scaledFrameXSize, _scaledFrameYSize, Graphics::PixelFormat::createFormatCLUT8());
+
+ int sprZoomX;
+ int sprZoomY = _vm->_scaleValue;
+ uint xSource = 0;
+ uint ySource = 0;
+ uint xDest = 0;
+ uint yDest = 0;
+
+ for (int i = 0; i < _scaledFrameYSize; i++) {
+ // linear_loop:
+ while (1) {
+ sprZoomY -= 100;
+ if (sprZoomY >= 0 || _vm->_scaleValue == 10000) {
+ // all_r_y
+ sprZoomX = _vm->_scaleValue;
+ break; // to loop_lin
+ } else {
+ sprZoomY += _vm->_scaleValue;
+ xSource = 0;
+ ySource++;
+ }
+ }
+ // loop_lin:
+ for (int j = 0; j < _scaledFrameXSize; j++) {
+ sprZoomX -= 100;
+ if (sprZoomX >= 0) {
+ // its_all_r
+ memcpy(zoomedFrame->getBasePtr(xDest, yDest), heroFrame->getBasePtr(xSource, ySource), 1);
+ xDest++;
+ } else {
+ sprZoomX += _vm->_scaleValue;
+ j--;
+ }
+ xSource++;
+ }
+ xDest = 0;
+ yDest++;
+ xSource = 0;
+ ySource++;
+ }
+ return zoomedFrame;
+}
+
+void Hero::countDrawPosition() {
+ Animation *heroAnim = nullptr;
+ if (_specAnim != nullptr) {
+ heroAnim = _specAnim;
+ } else {
+ heroAnim = _moveSet[_moveSetType];
+ }
+ if (heroAnim != nullptr) {
+ int phaseFrameIndex = heroAnim->getPhaseFrameIndex(_phase);
+ Graphics::Surface *heroSurface = heroAnim->getFrame(phaseFrameIndex);
+
+ _frameXSize = heroSurface->w;
+ _frameYSize = heroSurface->h;
+ _scaledFrameXSize = getScaledValue(_frameXSize);
+ _scaledFrameYSize = getScaledValue(_frameYSize);
+
+ if (_vm->_scaleValue != 10000) {
+ //notfullSize
+ _drawX = _middleX - _scaledFrameXSize / 2;
+ _drawY = _middleY + 1 - _scaledFrameYSize;
+ _vm->checkMasks(_drawX, _drawY - 1, _scaledFrameXSize, _scaledFrameYSize, _middleY);
+ } else {
+ //fullSize
+ _drawX = _middleX - _frameXSize / 2;
+ _drawY = _middleY + 1 - _frameYSize;
+ _vm->checkMasks(_drawX, _drawY - 1, _frameXSize, _frameYSize, _middleY);
+ }
+ _drawZ = _middleY;
+ }
+}
+
+void Hero::showHeroShadow(Graphics::Surface *screen, DrawNode *drawNode) {
+ PrinceEngine *vm = (PrinceEngine *)drawNode->data;
+ int16 heroSurfaceWidth = drawNode->s->w;
+ int16 heroSurfaceHeight = drawNode->s->h;
+
+ Graphics::Surface *makeShadow = new Graphics::Surface();
+ makeShadow->create(heroSurfaceWidth, heroSurfaceHeight, Graphics::PixelFormat::createFormatCLUT8());
+
+ for (int y = 0; y < heroSurfaceHeight; y++) {
+ byte *src = (byte *)drawNode->s->getBasePtr(0, y);
+ byte *dst = (byte *)makeShadow->getBasePtr(0, y);
+ for (int x = 0; x < heroSurfaceWidth; x++, dst++, src++) {
+ if (*src != 0xFF) {
+ *dst = GraphicsMan::kShadowColor;
+ } else {
+ *dst = *src;
+ }
+ }
+ }
+
+ if (drawNode->posY > 1 && drawNode->posY < PrinceEngine::kMaxPicHeight) {
+ int shadDirection;
+ if (vm->_lightY > drawNode->posY) {
+ shadDirection = 1;
+ } else {
+ shadDirection = 0;
+ }
+
+ vm->_shadLineLen = 0;
+ Graphics::drawLine(vm->_lightX, vm->_lightY, drawNode->posX, drawNode->posY, 0, &vm->plotShadowLinePoint, vm);
+
+ byte *sprShadow = vm->_graph->_shadowTable70;
+
+ int shadDrawX = drawNode->posX - vm->_picWindowX;
+ int shadDrawY = drawNode->posY - vm->_picWindowY;
+
+ int shadPosX = shadDrawX;
+ int shadPosY = shadDrawY;
+ int shadBitAddr = drawNode->posY * PrinceEngine::kMaxPicWidth / 8 + drawNode->posX / 8;
+ int shadBitMask = 128 >> (drawNode->posX % 8);
+
+ int shadZoomY2 = vm->_shadScaleValue;
+ int shadZoomY = drawNode->scaleValue;
+
+ int diffX = 0;
+ int diffY = 0;
+
+ int shadowHeroX = 0;
+ int shadowHeroY = heroSurfaceHeight - 1;
+
+ int shadLastY = 0;
+
+ byte *shadowHero = (byte *)makeShadow->getBasePtr(shadowHeroX, shadowHeroY); // first pixel from last row of shadow hero
+ byte *background = (byte *)screen->getBasePtr(shadDrawX, shadDrawY); // pixel of background where shadow sprite starts
+
+ // banked2
+ byte *shadowLineStart = vm->_shadowLine + 8;
+
+ int shadWallDown = 0;
+ int shadWallBitAddr = 0;
+ int shadWallBitMask = 0;
+ byte *shadWallDestAddr = 0;
+ int shadWallPosY = 0;
+ int shadWallSkipX = 0;
+ int shadWallModulo = 0;
+
+ // linear_loop
+ for (int i = 0; i < heroSurfaceHeight; i++) {
+ int j;
+ //retry_line:
+ for (j = heroSurfaceHeight - i; j > 0; j--) {
+ shadZoomY -= 100;
+ if (shadZoomY < 0 && drawNode->scaleValue != 10000) {
+ shadZoomY += drawNode->scaleValue;
+ shadowHeroY--;
+ if (shadowHeroY < 0) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ if (!j) {
+ break;
+ }
+ if (shadowHeroY < 0) {
+ break;
+ }
+
+ //line_y_ok
+ if (shadLastY != shadPosY && shadPosY >= 0 && shadPosY < 480 && shadPosX < 640) {
+ shadLastY = shadPosY;
+ bool skipLineFlag = false;
+ int shadSkipX = 0;
+ int ctLoop = 0;
+ int sprModulo = 0;
+
+ if (shadPosX < 0) {
+ shadSkipX = -1 * shadPosX;
+ if (heroSurfaceWidth > shadSkipX) {
+ ctLoop = heroSurfaceWidth - shadSkipX;
+ shadowHeroX = shadSkipX;
+ } else {
+ //skip_line
+ skipLineFlag = true;
+ }
+ } else {
+ //x1_ok
+ if (shadPosX + heroSurfaceWidth > 640) {
+ ctLoop = 640 - shadPosX;
+ sprModulo = shadPosX + heroSurfaceWidth - 640;
+ } else {
+ //draw_line
+ ctLoop = heroSurfaceWidth;
+ }
+ }
+
+ if (!skipLineFlag) {
+ //draw_line1
+ //retry_line2
+ int k;
+ for (k = j; k > 0; k--) {
+ shadZoomY2 -= 100;
+ if (shadZoomY2 < 0 && vm->_shadScaleValue != 10000) {
+ shadZoomY2 += vm->_shadScaleValue;
+ shadowHeroY--;
+ if (shadowHeroY < 0) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ if (shadowHeroY < 0) {
+ break;
+ }
+ if (!k) {
+ break;
+ }
+ //line_y_ok_2:
+ //copy_trans
+ bool shadWDFlag = false;
+ int shadZoomX = drawNode->scaleValue;
+ int backgroundDiff = shadSkipX;
+ int shadBitMaskCopyTrans = shadBitMask;
+ int shadBitAddrCopyTrans = shadBitAddr;
+ shadowHero = (byte *)makeShadow->getBasePtr(shadowHeroX, shadowHeroY);
+ background = (byte *)screen->getBasePtr(shadDrawX + diffX + backgroundDiff, shadDrawY + diffY);
+
+ if (shadPosX < 0) {
+ if (heroSurfaceWidth > shadSkipX) {
+ shadBitAddrCopyTrans += shadSkipX / 8;
+ if ((shadSkipX % 8)) {
+ //loop_rotate:
+ for (int a = 0; a < (shadSkipX % 8); a++) {
+ if (shadBitMaskCopyTrans == 1) {
+ shadBitMaskCopyTrans = 128;
+ shadBitAddrCopyTrans++;
+ } else {
+ shadBitMaskCopyTrans >>= 1;
+ }
+ }
+ }
+ }
+ }
+
+ //ct_loop:
+ for (int l = 0; l < ctLoop; l++) {
+ shadZoomX -= 100;
+ if (shadZoomX < 0 && drawNode->scaleValue != 10000) {
+ shadZoomX += drawNode->scaleValue;
+ } else {
+ if (*shadowHero == GraphicsMan::kShadowColor) {
+ if ((shadBitMaskCopyTrans & vm->_shadowBitmap[shadBitAddrCopyTrans])) {
+ if (shadWallDown == 0) {
+ if ((shadBitMaskCopyTrans & vm->_shadowBitmap[shadBitAddrCopyTrans + PrinceEngine::kShadowBitmapSize])) {
+ shadWDFlag = true;
+ //shadow
+ *background = *(sprShadow + *background);
+ }
+ }
+ } else {
+ //shadow
+ *background = *(sprShadow + *background);
+ }
+ }
+ //ct_next
+ if (shadBitMaskCopyTrans == 1) {
+ shadBitMaskCopyTrans = 128;
+ shadBitAddrCopyTrans++;
+ } else {
+ shadBitMaskCopyTrans >>= 1;
+ }
+ //okok
+ backgroundDiff++;
+ background = (byte *)screen->getBasePtr(shadDrawX + diffX + backgroundDiff, shadDrawY + diffY);
+ }
+ shadowHeroX++;
+ shadowHero = (byte *)makeShadow->getBasePtr(shadowHeroX, shadowHeroY);
+ }
+ //byebyebye
+ if (!shadWallDown && shadWDFlag) {
+ shadWallDown = shadPosX;
+ shadWallBitAddr = shadBitAddr;
+ shadWallDestAddr = (byte *)screen->getBasePtr(shadDrawX + diffX, shadDrawY + diffY);
+ shadWallBitMask = shadBitMask;
+ shadWallPosY = shadPosY;
+ shadWallSkipX = shadSkipX;
+ shadWallModulo = sprModulo;
+ }
+ //byebye
+ if (shadDirection && shadWallDown) {
+ int shadBitMaskWallCopyTrans = shadWallBitMask;
+ int shadBitAddrWallCopyTrans = shadWallBitAddr;
+ background = shadWallDestAddr;
+ shadowHero = (byte *)makeShadow->getBasePtr(shadWallSkipX, shadowHeroY);
+
+ if (ctLoop > shadWallSkipX && ctLoop - shadWallSkipX > shadWallModulo) {
+ //WALL_copy_trans
+ shadWDFlag = false;
+ int shadZoomXWall = drawNode->scaleValue;
+ int backgroundDiffWall = 0;
+ int shadowHeroXWall = 0;
+ //ct_loop:
+ for (int m = 0; m < ctLoop; m++) {
+ shadZoomXWall -= 100;
+ if (shadZoomXWall < 0 && drawNode->scaleValue != 10000) {
+ shadZoomXWall += drawNode->scaleValue;
+ } else {
+ //point_ok:
+ if (*shadowHero == GraphicsMan::kShadowColor) {
+ if ((shadBitMaskWallCopyTrans & vm->_shadowBitmap[shadBitAddrWallCopyTrans + PrinceEngine::kShadowBitmapSize])) {
+ *background = *(sprShadow + *background);
+ }
+ }
+ //ct_next
+ if (shadBitMaskWallCopyTrans == 1) {
+ shadBitMaskWallCopyTrans = 128;
+ shadBitAddrWallCopyTrans++;
+ } else {
+ shadBitMaskWallCopyTrans >>= 1;
+ }
+ //okok
+ backgroundDiffWall++;
+ background = shadWallDestAddr + backgroundDiffWall;
+ }
+ shadowHeroXWall++;
+ shadowHero = (byte *)makeShadow->getBasePtr(shadWallSkipX + shadowHeroXWall, shadowHeroY);
+ }
+ }
+ //krap2
+ shadWallDestAddr -= PrinceEngine::kNormalWidth;
+ shadWallBitAddr -= PrinceEngine::kMaxPicWidth / 8;
+ shadWallPosY--;
+ }
+ }
+ }
+ //skip_line
+ //next_line
+ if (READ_LE_UINT16(shadowLineStart + 2) < READ_LE_UINT16(shadowLineStart - 2)) {
+ //minus_y
+ shadBitAddr -= PrinceEngine::kMaxPicWidth / 8;
+ shadPosY--;
+ diffY--;
+ } else if (READ_LE_UINT16(shadowLineStart + 2) > READ_LE_UINT16(shadowLineStart - 2)) {
+ shadBitAddr += PrinceEngine::kMaxPicWidth / 8;
+ shadPosY++;
+ diffY++;
+ }
+ //no_change_y
+ if (READ_LE_UINT16(shadowLineStart) < READ_LE_UINT16(shadowLineStart - 4)) {
+ //minus_x
+ shadPosX--;
+ //rol
+ if (shadBitMask == 128) {
+ shadBitMask = 1;
+ shadBitAddr--;
+ } else {
+ shadBitMask <<= 1;
+ }
+ diffX--;
+ } else if (READ_LE_UINT16(shadowLineStart) > READ_LE_UINT16(shadowLineStart - 4)) {
+ shadPosX++;
+ //ror
+ if (shadBitMask == 1) {
+ shadBitMask = 128;
+ shadBitAddr++;
+ } else {
+ shadBitMask >>= 1;
+ }
+ diffX++;
+ }
+ //no_change_x
+ shadowLineStart += 4;
+ shadowHeroY--;
+ if (shadowHeroY < 0) {
+ break;
+ }
+ shadowHeroX = 0;
+ background = (byte *)screen->getBasePtr(shadDrawX + diffX, shadDrawY + diffY);
+ shadowHero = (byte *)makeShadow->getBasePtr(shadowHeroX, shadowHeroY);
+ }
+ //koniec_bajki - end_of_a_story
+ }
+ makeShadow->free();
+ delete makeShadow;
+}
+
+void Hero::setScale(int8 zoomBitmapValue) {
+ if (!zoomBitmapValue) {
+ _vm->_scaleValue = 10000;
+ } else {
+ _vm->_scaleValue = 10000 / zoomBitmapValue;
+ }
+}
+
+void Hero::selectZoom() {
+ int8 zoomBitmapValue = *(_vm->_zoomBitmap + _middleY / 4 * _vm->kZoomBitmapWidth + _middleX / 4);
+ setScale(zoomBitmapValue);
+}
+
+int Hero::rotateHero(int oldDirection, int newDirection) {
+ switch (oldDirection) {
+ case kHeroDirLeft:
+ switch (newDirection) {
+ case kHeroDirRight:
+ return kMove_MLR;
+ case kHeroDirUp:
+ return kMove_MLU;
+ case kHeroDirDown:
+ return kMove_MLD;
+ }
+ break;
+ case kHeroDirRight:
+ switch (newDirection) {
+ case kHeroDirLeft:
+ return kMove_MRL;
+ case kHeroDirUp:
+ return kMove_MRU;
+ case kHeroDirDown:
+ return kMove_MRD;
+ }
+ break;
+ case kHeroDirUp:
+ switch (newDirection) {
+ case kHeroDirLeft:
+ return kMove_MUL;
+ case kHeroDirRight:
+ return kMove_MUR;
+ case kHeroDirDown:
+ return kMove_MUD;
+ }
+ break;
+ case kHeroDirDown:
+ switch (newDirection) {
+ case kHeroDirLeft:
+ return kMove_MDL;
+ case kHeroDirRight:
+ return kMove_MDR;
+ case kHeroDirUp:
+ return kMove_MDU;
+ }
+ break;
+ }
+ error("rotateHero - wrong directions - old %d, new %d", oldDirection, newDirection);
+}
+
+void Hero::heroStanding() {
+ _phase = 0;
+ switch (_lastDirection) {
+ case kHeroDirLeft:
+ _moveSetType = kMove_SL;
+ break;
+ case kHeroDirRight:
+ _moveSetType = kMove_SR;
+ break;
+ case kHeroDirUp:
+ _moveSetType = kMove_SU;
+ break;
+ case kHeroDirDown:
+ _moveSetType = kMove_SD;
+ break;
+ }
+}
+
+void Hero::showHero() {
+ if (_visible && !_vm->_flags->getFlagValue(Flags::NOHEROATALL)) {
+
+ if (_talkTime != 0) {
+ _talkTime--;
+ }
+
+ // Scale of hero
+ selectZoom();
+
+ if (_state != kHeroStateStay) {
+ _boredomTime = 0;
+ }
+
+ if (_state == kHeroStateSpec) {
+ if (_specAnim != nullptr) {
+ if (_phase < _specAnim->getPhaseCount() - 1) {
+ _phase++;
+ } else {
+ if (!_talkTime) {
+ _state = kHeroStateStay;
+ } else {
+ _state = kHeroStateTalk;
+ }
+ countDrawPosition();
+ return;
+ }
+ } else {
+ _state = kHeroStateStay;
+ }
+ } else {
+ freeHeroAnim();
+ }
+
+ if (_state == kHeroStateTalk) {
+ if (_talkTime) {
+ switch (_lastDirection) {
+ case kHeroDirLeft:
+ _moveSetType = kMove_TL;
+ break;
+ case kHeroDirRight:
+ _moveSetType = kMove_TR;
+ break;
+ case kHeroDirUp:
+ _moveSetType = kMove_TU;
+ break;
+ case kHeroDirDown:
+ _moveSetType = kMove_TD;
+ break;
+ }
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
+ _phase++;
+ } else {
+ _phase = _moveSet[_moveSetType]->getLoopCount();
+ }
+ } else {
+ _state = kHeroStateStay;
+ }
+ }
+
+ if (_state == kHeroStateBore) {
+ switch (_boreNum) {
+ case 0:
+ _moveSetType = kMove_BORED1;
+ break;
+ case 1:
+ _moveSetType = kMove_BORED2;
+ break;
+ }
+ if (_moveSet[_moveSetType] != nullptr) {
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
+ _phase++;
+ } else {
+ _phase = 0;
+ _lastDirection = kHeroDirDown;
+ _state = kHeroStateStay;
+ }
+ } else {
+ _state = kHeroStateStay;
+ }
+ }
+
+ if (_state == kHeroStateStay) {
+ if (!_vm->_optionsFlag) {
+ if (!_vm->_interpreter->getLastOPCode() || !_vm->_interpreter->getFgOpcodePC()) {
+ _boredomTime++;
+ if (_boredomTime == _maxBoredom) {
+ _boreNum =_vm->_randomSource.getRandomNumber(1); // rand one of two 'bored' animation
+ _phase = 0;
+ _state = kHeroStateBore;
+ if (_lastDirection == kHeroDirUp) {
+ _lastDirection = kHeroDirLeft;
+ } else {
+ _lastDirection = kHeroDirDown;
+ }
+ }
+ } else {
+ _boredomTime = 0;
+ }
+ } else {
+ _boredomTime = 0;
+ }
+ heroStanding();
+ }
+
+ if (_state == kHeroStateTurn) {
+ if (_destDirection && (_lastDirection != _destDirection)) {
+ _phase = 0;
+ int rotateDir = rotateHero(_lastDirection, _destDirection);
+ _lastDirection = _destDirection;
+ if (rotateDir) {
+ _moveSetType = rotateDir;
+ _state = kHeroStateTran;
+ } else {
+ _state = kHeroStateStay;
+ heroStanding();
+ }
+ } else {
+ _state = kHeroStateStay;
+ heroStanding();
+ }
+ }
+
+ if (_state == kHeroStateTran) {
+ if (_moveSet[_moveSetType] != nullptr) {
+ // only in bear form
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
+ _phase += 2;
+ } else {
+ _state = kHeroStateStay;
+ heroStanding();
+ }
+ } else {
+ _state = kHeroStateStay;
+ heroStanding();
+ }
+ }
+
+ if (_state == kHeroStateMvan) {
+ if (_moveSet[_moveSetType] != nullptr) {
+ // only in bear form
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
+ _phase += 2;
+ } else {
+ _state = kHeroStateMove;
+ }
+ } else {
+ _state = kHeroStateMove;
+ }
+ }
+
+ if (_state == kHeroStateDelayMove) {
+ _moveDelay--;
+ if (!_moveDelay) {
+ _state = kHeroStateMove;
+ }
+ }
+
+ if (_state == kHeroStateMove || _state == kHeroStateRun) {
+ //go_for_it:
+ while (1) {
+ if (_currCoords != nullptr) {
+ if (READ_LE_UINT32(_currCoords) != 0xFFFFFFFF) {
+ int x = READ_LE_UINT16(_currCoords);
+ int y = READ_LE_UINT16(_currCoords + 2);
+ _currCoords += 4;
+ int dir = *_currDirTab;
+ _currDirTab++;
+ if (_lastDirection != dir) {
+ _phase = 0;
+ int rotateDir = rotateHero(_lastDirection, dir);
+ _lastDirection = dir;
+ if (_moveSet[rotateDir] != nullptr) {
+ // only in bear form
+ _state = kHeroStateMvan;
+ _moveSetType = rotateDir;
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
+ _phase += 2;
+ break;
+ } else {
+ _state = kHeroStateMove;
+ continue;
+ }
+ } else {
+ continue;
+ }
+ }
+ //no_need_direction_change
+ if (dir == kHeroDirLeft) {
+ if (_middleX - x >= _step) {
+ heroMoveGotIt(x, y, dir);
+ break;
+ }
+ } else if (dir == kHeroDirRight) {
+ if (x - _middleX >= _step) {
+ heroMoveGotIt(x, y, dir);
+ break;
+ }
+ } else if (dir == kHeroDirUp) {
+ if (_middleY - y >= _step) {
+ heroMoveGotIt(x, y, dir);
+ break;
+ }
+ } else if (dir == kHeroDirDown) {
+ if (y - _middleY >= _step) {
+ heroMoveGotIt(x, y, dir);
+ break;
+ }
+ }
+ } else {
+ //finito
+ _middleX = READ_LE_UINT16(_currCoords - 4);
+ _middleY = READ_LE_UINT16(_currCoords - 2);
+ selectZoom();
+
+ if (_coords != nullptr) {
+ free(_coords);
+ _coords = nullptr;
+ _currCoords = nullptr;
+ }
+
+ if (_dirTab != nullptr) {
+ free(_dirTab);
+ _dirTab = nullptr;
+ _currDirTab = nullptr;
+ }
+
+ _boredomTime = 0;
+ _phase = 0;
+ _state = kHeroStateTurn;
+
+ if (!_destDirection) {
+ _destDirection = _lastDirection;
+ }
+
+ heroStanding();
+
+ break;
+ }
+ } else {
+ heroStanding();
+ break;
+ }
+ }
+ }
+ countDrawPosition();
+ }
+}
+
+void Hero::drawHero() {
+ if (_visible && !_vm->_flags->getFlagValue(Flags::NOHEROATALL)) {
+ freeZoomedSurface();
+ Graphics::Surface *mainHeroSurface = getSurface();
+ if (mainHeroSurface) {
+ DrawNode newDrawNode;
+ newDrawNode.posX = _drawX;
+ newDrawNode.posY = _drawY;
+ newDrawNode.posZ = _drawZ;
+ newDrawNode.width = 0;
+ newDrawNode.height = 0;
+ newDrawNode.originalRoomSurface = nullptr;
+ newDrawNode.data = _vm->_transTable;
+ newDrawNode.drawFunction = &_graph->drawTransparentWithTransDrawNode;
+
+ if (_vm->_scaleValue != 10000) {
+ _zoomedHeroSurface = zoomSprite(mainHeroSurface);
+ newDrawNode.s = _zoomedHeroSurface;
+ } else {
+ newDrawNode.s = mainHeroSurface;
+ }
+ _vm->_drawNodeList.push_back(newDrawNode);
+
+ drawHeroShadow(mainHeroSurface);
+
+ }
+ }
+}
+
+void Hero::drawHeroShadow(Graphics::Surface *heroFrame) {
+ DrawNode newDrawNode;
+ newDrawNode.posX = _middleX - _scaledFrameXSize / 2;
+ newDrawNode.posY = _middleY - _shadMinus - 1;
+ newDrawNode.posZ = kHeroShadowZ;
+ newDrawNode.width = 0;
+ newDrawNode.height = 0;
+ newDrawNode.scaleValue = _vm->_scaleValue;
+ newDrawNode.originalRoomSurface = nullptr;
+ newDrawNode.data = _vm;
+ newDrawNode.drawFunction = &showHeroShadow;
+ newDrawNode.s = heroFrame;
+ _vm->_drawNodeList.push_back(newDrawNode);
+}
+
+void Hero::heroMoveGotIt(int x, int y, int dir) {
+ _middleX = x;
+ _middleY = y;
+ selectZoom();
+
+ switch (dir) {
+ case kHeroDirLeft:
+ _moveSetType = kMove_ML;
+ break;
+ case kHeroDirRight:
+ _moveSetType = kMove_MR;
+ break;
+ case kHeroDirUp:
+ _moveSetType = kMove_MU;
+ break;
+ case kHeroDirDown:
+ _moveSetType = kMove_MD;
+ break;
+ }
+
+ if (_vm->_flags->getFlagValue(Flags::HEROFAST) || _state == kHeroStateRun) {
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 2) {
+ _phase += 2;
+ } else {
+ _phase = 0;
+ }
+ } else {
+ if (_phase < _moveSet[_moveSetType]->getPhaseCount() - 1) {
+ _phase++;
+ } else {
+ _phase = 0;
+ }
+ }
+
+ _step = kStepLeftRight;
+ if (_moveSetType == kMove_MU || _moveSetType == kMove_MD) {
+ _step = kStepUpDown;
+ }
+ if (_vm->_flags->getFlagValue(Flags::HEROFAST)) {
+ _step *= 2.5;
+ } else if (_state == kHeroStateRun) {
+ _step *= 2;
+ }
+}
+
+void Hero::scrollHero() {
+ int scrollType = _vm->_flags->getFlagValue(Flags::SCROLLTYPE);
+ int position = _middleX;
+ int scrollValue, scrollValue2;
+
+ switch (scrollType) {
+ case 0:
+ position = _middleX;
+ break;
+ case 1:
+ scrollValue = _vm->_flags->getFlagValue(Flags::SCROLLVALUE);
+ position = _vm->_normAnimList[scrollValue]._currX + _vm->_normAnimList[scrollValue]._currW / 2;
+ break;
+ case 2:
+ scrollValue = _vm->_flags->getFlagValue(Flags::SCROLLVALUE);
+ scrollValue2 = _vm->_flags->getFlagValue(Flags::SCROLLVALUE2);
+ position = scrollValue;
+ if (scrollValue < scrollValue2) {
+ _vm->_flags->setFlagValue(Flags::SCROLLVALUE, 0);
+ } else {
+ _vm->_flags->setFlagValue(Flags::SCROLLVALUE, scrollValue - scrollValue2);
+ }
+ break;
+ }
+
+ int locationWidth = _vm->_sceneWidth;
+ int difference = locationWidth - _vm->kNormalWidth / 2;
+
+ int destValue = 0;
+ if (position > _vm->kNormalWidth / 2) {
+ destValue = difference - _vm->kNormalWidth / 2;
+ }
+ if (position < difference) {
+ destValue = position - _vm->kNormalWidth / 2;
+ }
+
+ if(destValue < 0) {
+ destValue = 0;
+ }
+ _vm->_picWindowX = destValue;
+ _drawX -= destValue;
+}
+
+void Hero::freeOldMove() {
+ if (_coords != nullptr) {
+ free(_coords);
+ _coords = nullptr;
+ }
+ if (_dirTab != nullptr) {
+ free(_dirTab);
+ _dirTab = nullptr;
+ }
+ _step = 0;
+ _phase = 0;
+ _moveDelay = 0;
+ _state = Hero::kHeroStateStay;
+}
+
+void Hero::freeHeroAnim() {
+ if (_specAnim != nullptr) {
+ delete _specAnim;
+ _specAnim = nullptr;
+ }
+}
+
+void Hero::freeZoomedSurface() {
+ if (_zoomedHeroSurface != nullptr) {
+ _zoomedHeroSurface->free();
+ delete _zoomedHeroSurface;
+ _zoomedHeroSurface = nullptr;
+ }
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/hero.h b/engines/prince/hero.h
new file mode 100644
index 0000000000..d5f7d8cc7a
--- /dev/null
+++ b/engines/prince/hero.h
@@ -0,0 +1,184 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_HERO_H
+#define PRINCE_HERO_H
+
+#include "common/scummsys.h"
+#include "common/array.h"
+#include "common/memstream.h"
+
+#include "graphics/surface.h"
+#include "graphics/primitives.h"
+
+namespace Prince {
+
+class Animation;
+class PrinceEngine;
+class GraphicsMan;
+struct InventoryItem;
+struct DrawNode;
+
+class Hero {
+public:
+ static const uint32 kMoveSetSize = 26;
+ static const int16 kStepLeftRight = 8;
+ static const int16 kStepUpDown = 4;
+ static const int16 kHeroShadowZ = 2;
+
+ enum State {
+ kHeroStateStay,
+ kHeroStateTurn,
+ kHeroStateMove,
+ kHeroStateBore,
+ kHeroStateSpec,
+ kHeroStateTalk,
+ kHeroStateMvan,
+ kHeroStateTran,
+ kHeroStateRun,
+ kHeroStateDelayMove
+ };
+
+ enum Direction {
+ kHeroDirLeft = 1,
+ kHeroDirRight = 2,
+ kHeroDirUp = 3,
+ kHeroDirDown = 4
+ };
+
+ enum MoveSet {
+ kMove_SL,
+ kMove_SR,
+ kMove_SU,
+ kMove_SD,
+ kMove_ML,
+ kMove_MR,
+ kMove_MU,
+ kMove_MD,
+ kMove_TL,
+ kMove_TR,
+ kMove_TU,
+ kMove_TD,
+ kMove_MLU,
+ kMove_MLD,
+ kMove_MLR,
+ kMove_MRU,
+ kMove_MRD,
+ kMove_MRL,
+ kMove_MUL,
+ kMove_MUR,
+ kMove_MUD,
+ kMove_MDL,
+ kMove_MDR,
+ kMove_MDU,
+ kMove_BORED1,
+ kMove_BORED2
+ };
+
+ // Used instead of offset in getData
+ enum AttrId {
+ kHeroLastDir = 26,
+ kHeroAnimSet = 120
+ };
+
+ uint16 getData(AttrId dataId);
+
+ Hero(PrinceEngine *vm, GraphicsMan *graph);
+ ~Hero();
+ bool loadAnimSet(uint32 heroAnimNumber);
+
+ Graphics::Surface *getSurface();
+
+ void setPos(int16 x, int16 y) { _middleX = x; _middleY = y; }
+ void setVisible(bool flag) { _visible = flag; }
+
+ void showHero();
+ void drawHero();
+ void freeZoomedSurface();
+ void heroStanding();
+ void heroMoveGotIt(int x, int y, int dir);
+ int rotateHero(int oldDirection, int newDirection);
+ void scrollHero();
+ void setScale(int8 zoomBitmapValue);
+ int getScaledValue(int size);
+ void selectZoom();
+ void countDrawPosition();
+ Graphics::Surface *zoomSprite(Graphics::Surface *heroFrame);
+ void line(int x1, int y1, int x2, int y2);
+ void plotPoint(int x, int y);
+ static void showHeroShadow(Graphics::Surface *screen, DrawNode *drawNode);
+ void drawHeroShadow(Graphics::Surface *heroFrame);
+ void freeOldMove();
+ void freeHeroAnim();
+
+ uint16 _number;
+ uint16 _visible;
+ int16 _state;
+ int16 _middleX; // middle of X
+ int16 _middleY; // lower part of hero
+ int16 _moveSetType;
+
+ int16 _frameXSize;
+ int16 _frameYSize;
+ int16 _scaledFrameXSize;
+ int16 _scaledFrameYSize;
+ int16 _drawX;
+ int16 _drawY;
+ int16 _drawZ;
+
+ byte *_coords; // array of coordinates
+ byte *_dirTab; // array of directions
+ byte *_currCoords; // current coordinations
+ byte *_currDirTab; // current direction
+ int16 _lastDirection; // previous move direction
+ int16 _destDirection;
+ int16 _leftRightMainDir; // left or right - dominant direction
+ int16 _upDownMainDir; // up or down - dominant direction
+ int32 _phase; // Phase animation phase
+ int16 _step; // Step x/y step size depends on direction
+ int16 _maxBoredom; // stand still timeout
+ int16 _boredomTime; // Boredom current boredom time in frames
+ uint16 _boreNum; // Bore anim frame
+ int16 _talkTime; // TalkTime time of talk anim
+ Animation *_specAnim; // additional anim
+ Graphics::Surface *_zoomedHeroSurface;
+
+ uint16 _currHeight; // height of current anim phase
+
+ Common::Array<byte> _inventory; // Inventory array of items
+ Common::Array<byte> _inventory2; // Inventory2 array of items
+ // Font subtitiles font
+ int _color; // subtitles color
+ uint32 _animSetNr; // number of animation set
+ Common::Array<Animation *> _moveSet; // MoveAnims MoveSet
+
+ uint32 _moveDelay;
+ uint32 _shadMinus;
+
+private:
+ PrinceEngine *_vm;
+ GraphicsMan *_graph;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/hero_set.h b/engines/prince/hero_set.h
new file mode 100644
index 0000000000..dfe7e50268
--- /dev/null
+++ b/engines/prince/hero_set.h
@@ -0,0 +1,244 @@
+/* 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 "common/scummsys.h"
+
+namespace Prince {
+
+const int heroSetBack[7] = { 0, 0, 10, 0, 6, 0, 0 };
+
+typedef const char *HeroSetAnimNames[26];
+
+static HeroSetAnimNames heroSet5 = {
+ "SL_DIAB.ANI",
+ "SR_DIAB.ANI",
+ "SU_DIAB.ANI",
+ "SD_DIAB.ANI",
+ nullptr,
+ nullptr,
+ "MU_DIAB.ANI",
+ "MD_DIAB.ANI",
+ "TL_DIAB.ANI",
+ "TR_DIAB.ANI",
+ "TU_DIAB.ANI",
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
+};
+
+static HeroSetAnimNames heroSet1 = {
+ "SL_HERO1.ANI",
+ "SR_HERO1.ANI",
+ "SU_HERO1.ANI",
+ "SD_HERO1.ANI",
+ "ML_HERO1.ANI",
+ "MR_HERO1.ANI",
+ "MU_HERO1.ANI",
+ "MD_HERO1.ANI",
+ "TL_HERO1.ANI",
+ "TR_HERO1.ANI",
+ "TU_HERO1.ANI",
+ "TD_HERO1.ANI",
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ "KSI_KURZ.ANI",
+ "KS_WLOSY.ANI"
+};
+
+static HeroSetAnimNames heroSet2 = {
+ "SL_HERO2.ANI",
+ "SR_HERO2.ANI",
+ "SU_HERO2.ANI",
+ "SD_HERO2.ANI",
+ "ML_HERO2.ANI",
+ "MR_HERO2.ANI",
+ "MU_HERO2.ANI",
+ "MD_HERO2.ANI",
+ "TL_HERO2.ANI",
+ "TR_HERO2.ANI",
+ "TU_HERO2.ANI",
+ "TD_HERO2.ANI",
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ "KSI_KU_S.ANI",
+ "KS_WLO_S.ANI"
+};
+
+static HeroSetAnimNames heroSet3 = {
+ "SL_BEAR.ANI",
+ "SR_BEAR.ANI",
+ "SU_BEAR.ANI",
+ "SD_BEAR.ANI",
+ "NIED-LEW.ANI",
+ "NIED-PRW.ANI",
+ "NIED-TYL.ANI",
+ "NIED-PRZ.ANI",
+ "SL_BEAR.ANI",
+ "SR_BEAR.ANI",
+ "SU_BEAR.ANI",
+ "SD_BEAR.ANI",
+ "N_LW-TYL.ANI",
+ "N_LW-PRZ.ANI",
+ "N_LW-PR.ANI",
+ "N_PR-TYL.ANI",
+ "N_PR-PRZ.ANI",
+ "N_PR-LW.ANI",
+ "N_TYL-LW.ANI",
+ "N_TYL-PR.ANI",
+ "N_TL-PRZ.ANI",
+ "N_PRZ-LW.ANI",
+ "N_PRZ-PR.ANI",
+ "N_PRZ-TL.ANI",
+ nullptr,
+ nullptr,
+};
+
+static HeroSetAnimNames shanSet1 = {
+ "SL_SHAN.ANI",
+ "SR_SHAN.ANI",
+ "SU_SHAN.ANI",
+ "SD_SHAN.ANI",
+ "ML_SHAN.ANI",
+ "MR_SHAN.ANI",
+ "MU_SHAN.ANI",
+ "MD_SHAN.ANI",
+ "TL_SHAN.ANI",
+ "TR_SHAN.ANI",
+ "TU_SHAN.ANI",
+ "TD_SHAN.ANI",
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ "B1_SHAN.ANI",
+ "B2_SHAN.ANI",
+};
+
+static HeroSetAnimNames shanSet2 = {
+ "SL_SHAN2.ANI",
+ "SR_SHAN2.ANI",
+ "SU_SHAN.ANI",
+ "SD_SHAN2.ANI",
+ "ML_SHAN2.ANI",
+ "MR_SHAN2.ANI",
+ "MU_SHAN.ANI",
+ "MD_SHAN2.ANI",
+ "TL_SHAN2.ANI",
+ "TR_SHAN2.ANI",
+ "TU_SHAN.ANI",
+ "TD_SHAN2.ANI",
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ "B1_SHAN2.ANI",
+ "B2_SHAN2.ANI"
+};
+
+static HeroSetAnimNames arivSet1 = {
+ "SL_ARIV.ANI",
+ "SR_ARIV.ANI",
+ "SU_ARIV.ANI",
+ "SD_ARIV.ANI",
+ "ML_ARIV.ANI",
+ "MR_ARIV.ANI",
+ "MU_ARIV.ANI",
+ "MD_ARIV.ANI",
+ "TL_ARIV.ANI",
+ "TR_ARIV.ANI",
+ "TU_ARIV.ANI",
+ "TD_ARIV.ANI",
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr
+};
+
+const HeroSetAnimNames *heroSetTable[7] = {
+ &heroSet1,
+ &heroSet2,
+ &heroSet3,
+ &shanSet1,
+ &arivSet1,
+ &heroSet5,
+ &shanSet2,
+};
+
+} // End of namespace Prince
diff --git a/engines/prince/mhwanh.cpp b/engines/prince/mhwanh.cpp
new file mode 100644
index 0000000000..ef94ef71f9
--- /dev/null
+++ b/engines/prince/mhwanh.cpp
@@ -0,0 +1,71 @@
+/* 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 "common/stream.h"
+
+#include "graphics/surface.h"
+
+#include "prince/mhwanh.h"
+
+namespace Prince {
+
+MhwanhDecoder::MhwanhDecoder() : _surface(nullptr), _palette(nullptr) {
+}
+
+MhwanhDecoder::~MhwanhDecoder() {
+ destroy();
+}
+
+void MhwanhDecoder::destroy() {
+ if (_surface != nullptr) {
+ _surface->free();
+ delete _surface;
+ _surface = nullptr;
+ }
+ if (_palette != nullptr) {
+ free(_palette);
+ _palette = nullptr;
+ }
+}
+
+bool MhwanhDecoder::loadStream(Common::SeekableReadStream &stream) {
+ destroy();
+ stream.seek(0);
+ stream.skip(0x20);
+ // Read the palette
+ _palette = (byte *)malloc(kPaletteColorCount * 3);
+ for (uint16 i = 0; i < kPaletteColorCount; i++) {
+ _palette[i * 3] = stream.readByte();
+ _palette[i * 3 + 1] = stream.readByte();
+ _palette[i * 3 + 2] = stream.readByte();
+ }
+
+ _surface = new Graphics::Surface();
+ _surface->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
+ for (int h = 0; h < 480; h++) {
+ stream.read(_surface->getBasePtr(0, h), 640);
+ }
+
+ return true;
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/mhwanh.h b/engines/prince/mhwanh.h
new file mode 100644
index 0000000000..f8165a7666
--- /dev/null
+++ b/engines/prince/mhwanh.h
@@ -0,0 +1,55 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_MHWANH_H
+#define PRINCE_MHWANH_H
+
+#include "image/image_decoder.h"
+#include "image/bmp.h"
+
+#include "graphics/surface.h"
+
+#include "resource.h"
+
+namespace Prince {
+
+class MhwanhDecoder : public Image::ImageDecoder {
+public:
+ MhwanhDecoder();
+ virtual ~MhwanhDecoder();
+
+ // ImageDecoder API
+ void destroy();
+ virtual bool loadStream(Common::SeekableReadStream &stream);
+ virtual Graphics::Surface *getSurface() const { return _surface; }
+ virtual const byte *getPalette() const { return _palette; }
+ uint16 getPaletteCount() const { return kPaletteColorCount; }
+ static const uint16 kPaletteColorCount = 256;
+
+private:
+ Graphics::Surface *_surface;
+ byte *_palette;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/mob.cpp b/engines/prince/mob.cpp
new file mode 100644
index 0000000000..de825ef8b2
--- /dev/null
+++ b/engines/prince/mob.cpp
@@ -0,0 +1,108 @@
+/* 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 "prince/mob.h"
+
+namespace Prince {
+
+bool Mob::loadFromStream(Common::SeekableReadStream &stream) {
+ int32 pos = stream.pos();
+
+ uint16 visible = stream.readUint16LE();
+
+ if (visible == 0xFFFF)
+ return false;
+
+ _visible = visible;
+ _type = stream.readUint16LE();
+ _rect.left = stream.readUint16LE();
+ _rect.top = stream.readUint16LE();
+ _rect.right = stream.readUint16LE();
+ _rect.bottom = stream.readUint16LE();
+
+ _mask = stream.readUint16LE();
+
+ _examPosition.x = stream.readUint16LE();
+ _examPosition.y = stream.readUint16LE();
+ _examDirection = (Direction)stream.readUint16LE();
+
+ _usePosition.x = stream.readByte();
+ _usePosition.y = stream.readByte();
+ _useDirection = (Direction)stream.readUint16LE();
+
+ uint32 nameOffset = stream.readUint32LE();
+ uint32 examTextOffset = stream.readUint32LE();
+
+ byte c;
+ stream.seek(nameOffset);
+ _name.clear();
+ while ((c = stream.readByte()))
+ _name += c;
+
+ stream.seek(examTextOffset);
+ _examText.clear();
+ c = stream.readByte();
+ if (c) {
+ _examText += c;
+ do {
+ c = stream.readByte();
+ _examText += c;
+ } while (c != 255);
+ }
+ stream.seek(pos + 32);
+
+ return true;
+}
+
+void Mob::setData(AttrId dataId, uint16 value) {
+ switch (dataId) {
+ case kMobExamDir:
+ _examDirection = (Direction)value;
+ break;
+ case kMobExamX:
+ _examPosition.x = value;
+ break;
+ case kMobExamY:
+ _examPosition.y = value;
+ break;
+ default:
+ assert(false);
+ }
+}
+
+uint16 Mob::getData(AttrId dataId) {
+ switch (dataId) {
+ case kMobVisible:
+ return _visible;
+ case kMobExamDir:
+ return _examDirection;
+ case kMobExamX:
+ return _examPosition.x;
+ case kMobExamY:
+ return _examPosition.y;
+ default:
+ assert(false);
+ return 0;
+ }
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/mob.h b/engines/prince/mob.h
new file mode 100644
index 0000000000..cc60e36f9b
--- /dev/null
+++ b/engines/prince/mob.h
@@ -0,0 +1,70 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_MOB_H
+#define PRINCE_MOB_H
+
+#include "common/scummsys.h"
+#include "common/rect.h"
+#include "common/str.h"
+#include "common/stream.h"
+
+#include "prince/common.h"
+
+namespace Prince {
+
+class Mob {
+public:
+
+ Mob() : _name(""), _examText("") {}
+
+ bool loadFromStream(Common::SeekableReadStream &stream);
+
+ // Used instead of offset in setData and getData
+ enum AttrId {
+ kMobVisible = 0,
+ kMobExamX = 14,
+ kMobExamY = 16,
+ kMobExamDir = 18
+ };
+
+ void setData(AttrId dataId, uint16 value);
+ uint16 getData(AttrId dataId);
+
+ bool _visible;
+ uint16 _type;
+ uint16 _mask;
+ Common::Rect _rect;
+
+ Common::Point _examPosition;
+ Direction _examDirection;
+
+ Common::Point _usePosition;
+ Direction _useDirection;
+
+ Common::String _name;
+ Common::String _examText;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/module.mk b/engines/prince/module.mk
new file mode 100644
index 0000000000..b1be123d4b
--- /dev/null
+++ b/engines/prince/module.mk
@@ -0,0 +1,30 @@
+MODULE := engines/prince
+
+MODULE_OBJS = \
+ animation.o \
+ archive.o \
+ cursor.o \
+ debugger.o \
+ decompress.o \
+ detection.o \
+ flags.o \
+ font.o \
+ graphics.o \
+ hero.o \
+ mhwanh.o \
+ mob.o \
+ object.o \
+ prince.o \
+ pscr.o \
+ saveload.o \
+ script.o \
+ sound.o \
+ variatxt.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_PRINCE), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/prince/musNum.h b/engines/prince/musNum.h
new file mode 100644
index 0000000000..c24cba6ad7
--- /dev/null
+++ b/engines/prince/musNum.h
@@ -0,0 +1,87 @@
+/* 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.
+ *
+ */
+
+namespace Prince {
+
+enum RoomMus {
+ ROOM01MUS = 3,
+ ROOM02MUS = 9,
+ ROOM03MUS = 9,
+ ROOM04MUS = 9,
+ ROOM05MUS = 13,
+ ROOM06MUS = 9,
+ ROOM07MUS = 9,
+ ROOM08MUS = 9,
+ ROOM09MUS = 14,
+ ROOM10MUS = 9,
+ ROOM11MUS = 9,
+ ROOM12MUS = 9,
+ ROOM13MUS = 9,
+ ROOM14MUS = 9,
+ ROOM15MUS = 5,
+ ROOM16MUS = 5,
+ ROOM17MUS = 5,
+ ROOM18MUS = 5,
+ ROOM19MUS = 5,
+ ROOM20MUS = 12,
+ ROOM21MUS = 9,
+ ROOM22MUS = 9,
+ ROOM23MUS = 1,
+ ROOM24MUS = 1,
+ ROOM25MUS = 2,
+ ROOM26MUS = 10,
+ ROOM27MUS = 7,
+ ROOM28MUS = 10,
+ ROOM29MUS = 10,
+ ROOM30MUS = 11,
+ ROOM31MUS = 14,
+ ROOM32MUS = 11,
+ ROOM33MUS = 7,
+ ROOM34MUS = 7,
+ ROOM35MUS = 7,
+ ROOM36MUS = 7,
+ ROOM37MUS = 7,
+ ROOM38MUS = 7,
+ ROOM39MUS = 7,
+ ROOM40MUS = 7,
+ ROOM41MUS = 7,
+ ROOM42MUS = 7,
+ ROOM43MUS = 15,
+ ROOM46MUS = 100,
+ ROOM47MUS = 100,
+ ROOM48MUS = 100,
+ ROOM49MUS = 100,
+ ROOM50MUS = 100,
+ ROOM51MUS = 12,
+ ROOM52MUS = 9,
+ ROOM53MUS = 5,
+ ROOM54MUS = 11,
+ ROOM55MUS = 11,
+ ROOM56MUS = 11,
+ ROOM57MUS = 7,
+ ROOM58MUS = 13,
+ ROOM59MUS = 16,
+ ROOM60MUS = 4,
+ ROOM61MUS = 0
+};
+
+} // End of namespace Prince
diff --git a/engines/prince/object.cpp b/engines/prince/object.cpp
new file mode 100644
index 0000000000..a9a96455b1
--- /dev/null
+++ b/engines/prince/object.cpp
@@ -0,0 +1,113 @@
+/* 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 "common/archive.h"
+#include "common/debug-channels.h"
+#include "common/debug.h"
+#include "common/stream.h"
+
+#include "graphics/surface.h"
+
+#include "prince/object.h"
+
+namespace Prince {
+
+Object::Object() : _surface(nullptr), _x(0), _y(0), _z(0), _flags(0), _width(0),
+ _height(0), _zoomTime(0), _zoomSurface(nullptr)
+{
+}
+
+Object::~Object() {
+ if (_surface != nullptr) {
+ _surface->free();
+ delete _surface;
+ _surface = nullptr;
+ }
+ if (_zoomSurface != nullptr) {
+ _zoomSurface->free();
+ delete _zoomSurface;
+ _zoomSurface = nullptr;
+ }
+}
+
+void Object::loadSurface(Common::SeekableReadStream &stream) {
+ stream.skip(4);
+ _width = stream.readUint16LE();
+ _height = stream.readUint16LE();
+ _surface = new Graphics::Surface();
+ _surface->create(_width, _height, Graphics::PixelFormat::createFormatCLUT8());
+
+ for (int h = 0; h < _surface->h; h++) {
+ stream.read(_surface->getBasePtr(0, h), _surface->w);
+ }
+}
+
+bool Object::loadFromStream(Common::SeekableReadStream &stream) {
+ int32 pos = stream.pos();
+ uint16 x = stream.readUint16LE();
+ if (x == 0xFFFF) {
+ return false;
+ }
+ _x = x;
+ _y = stream.readSint16LE(); // skull mini-game has some signed y coords
+
+ const Common::String obStreamName = Common::String::format("OB%02d", stream.readUint16LE());
+ Common::SeekableReadStream *obStream = SearchMan.createReadStreamForMember(obStreamName);
+ if (obStream) {
+ loadSurface(*obStream);
+ }
+ delete obStream;
+
+ _flags = stream.readUint16LE();
+ _z = stream.readUint16LE();
+
+ stream.seek(pos + 16);
+
+ return true;
+}
+
+void Object::setData(AttrId dataId, int32 value) {
+ switch (dataId) {
+ case kObjectX:
+ _x = value;
+ break;
+ case kObjectY:
+ _y = value;
+ break;
+ default:
+ assert(false);
+ }
+}
+
+int32 Object::getData(AttrId dataId) {
+ switch (dataId) {
+ case kObjectX:
+ return _x;
+ case kObjectY:
+ return _y;
+ default:
+ assert(false);
+ return 0;
+ }
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/object.h b/engines/prince/object.h
new file mode 100644
index 0000000000..68edd061a0
--- /dev/null
+++ b/engines/prince/object.h
@@ -0,0 +1,70 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_OBJECT_H
+#define PRINCE_OBJECT_H
+
+#include "image/image_decoder.h"
+#include "graphics/surface.h"
+
+namespace Prince {
+
+class Object {
+public:
+ Object();
+ ~Object();
+
+ int32 _x;
+ int32 _y;
+ int32 _z;
+ uint16 _width;
+ uint16 _height;
+ int32 _flags;
+ int32 _zoomTime;
+ Graphics::Surface *_zoomSurface;
+
+ // Used instead of offset in setData and getData
+ enum AttrId {
+ kObjectAddr = 0,
+ kObjectX = 4,
+ kObjectY = 6,
+ kObjectZ = 8,
+ kObjectFlags = 10,
+ kObjectZoomInSource = 12,
+ kObjectZoomInLen = 16,
+ kObjectZoomInAddr = 20,
+ kObjectZoomInTime = 24
+ };
+
+ bool loadFromStream(Common::SeekableReadStream &stream);
+ Graphics::Surface *getSurface() const { return _surface; }
+ int32 getData(AttrId dataId);
+ void setData(AttrId dataId, int32 value);
+
+private:
+ void loadSurface(Common::SeekableReadStream &stream);
+ Graphics::Surface *_surface;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/option_text.h b/engines/prince/option_text.h
new file mode 100644
index 0000000000..d4d214c98c
--- /dev/null
+++ b/engines/prince/option_text.h
@@ -0,0 +1,85 @@
+/* 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.
+ *
+ */
+
+namespace Prince {
+
+// PL - Mazovia coding
+const char invOptionsTextPL[5][18] = {
+ "Obejrzyj",
+ "U\xa7""yj",
+ "Otw\xa2""rz/Pchnij",
+ "Zamknij/Poci\x86""gnij",
+ "Daj"
+};
+
+const char optionsTextPL[7][18] = {
+ "Podejd\xa6",
+ "Obejrzyj",
+ "Zabierz",
+ "U\xa7""yj",
+ "Otw\xa2""rz/Pchnij",
+ "Zamknij/Poci\x86""gnij",
+ "Porozmawiaj"
+};
+
+// DE - Other font then for PL + ISO 8859-2 or Windows-1250
+// + special letter values changing
+// Normal value: 196, 214, 220, 223, 228, 246, 252
+// Prince change: 131, 132, 133, 127, 128, 129, 130
+char invOptionsTextDE[5][17] = {
+ "Anschauen",
+ "Benutzen",
+ "\x84""ffnen/Sto\x7f""en",
+ "Schlie\x7f""en/Ziehen",
+ "Geben"
+};
+
+const char optionsTextDE[7][17] = {
+ "Hingehen",
+ "Anschauen",
+ "Wegnehmen",
+ "Benutzen",
+ "\x84""ffnen/Sto\x7f""en",
+ "Schlie\x7f""en/Ziehen",
+ "Ansprechen"
+};
+
+// EN
+const char *invOptionsTextEN[] = {
+ "Examine",
+ "Use",
+ "Open/Push",
+ "Close/Pull",
+ "Give"
+};
+
+const char *optionsTextEN[] = {
+ "Walk to",
+ "Examine",
+ "Pick up",
+ "Use",
+ "Open/Push",
+ "Close/Pull",
+ "Talk to"
+};
+
+} // End of namespace Prince
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
new file mode 100644
index 0000000000..b0f2cd5056
--- /dev/null
+++ b/engines/prince/prince.cpp
@@ -0,0 +1,4733 @@
+/* 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 "common/scummsys.h"
+#include "common/config-manager.h"
+#include "common/debug-channels.h"
+#include "common/debug.h"
+#include "common/events.h"
+#include "common/file.h"
+#include "common/random.h"
+#include "common/fs.h"
+#include "common/keyboard.h"
+#include "common/substream.h"
+#include "common/str.h"
+
+#include "graphics/cursorman.h"
+#include "graphics/surface.h"
+#include "graphics/palette.h"
+#include "graphics/pixelformat.h"
+
+#include "engines/util.h"
+#include "engines/advancedDetector.h"
+
+#include "audio/audiostream.h"
+
+#include "prince/prince.h"
+#include "prince/font.h"
+#include "prince/graphics.h"
+#include "prince/script.h"
+#include "prince/debugger.h"
+#include "prince/object.h"
+#include "prince/mob.h"
+#include "prince/sound.h"
+#include "prince/variatxt.h"
+#include "prince/flags.h"
+#include "prince/font.h"
+#include "prince/mhwanh.h"
+#include "prince/cursor.h"
+#include "prince/archive.h"
+#include "prince/hero.h"
+#include "prince/resource.h"
+#include "prince/animation.h"
+#include "prince/option_text.h"
+#include "prince/curve_values.h"
+
+namespace Prince {
+
+void PrinceEngine::debugEngine(const char *s, ...) {
+ char buf[STRINGBUFLEN];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, STRINGBUFLEN, s, va);
+ va_end(va);
+
+ debug("Prince::Engine %s", buf);
+}
+
+PrinceEngine::PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc) :
+ Engine(syst), _gameDescription(gameDesc), _graph(nullptr), _script(nullptr), _interpreter(nullptr), _flags(nullptr),
+ _locationNr(0), _debugger(nullptr), _midiPlayer(nullptr), _room(nullptr),
+ _cursor1(nullptr), _cursor2(nullptr), _cursor3(nullptr), _font(nullptr),
+ _suitcaseBmp(nullptr), _roomBmp(nullptr), _cursorNr(0), _picWindowX(0), _picWindowY(0), _randomSource("prince"),
+ _invLineX(134), _invLineY(176), _invLine(5), _invLines(3), _invLineW(70), _invLineH(76), _maxInvW(72), _maxInvH(76),
+ _invLineSkipX(2), _invLineSkipY(3), _showInventoryFlag(false), _inventoryBackgroundRemember(false),
+ _mst_shadow(0), _mst_shadow2(0), _candleCounter(0), _invX1(53), _invY1(18), _invWidth(536), _invHeight(438),
+ _invCurInside(false), _optionsFlag(false), _optionEnabled(0), _invExamY(120), _invMaxCount(2), _invCounter(0),
+ _optionsMob(-1), _currentPointerNumber(1), _selectedMob(-1), _selectedItem(0), _selectedMode(0),
+ _optionsWidth(210), _optionsHeight(170), _invOptionsWidth(210), _invOptionsHeight(130), _optionsStep(20),
+ _invOptionsStep(20), _optionsNumber(7), _invOptionsNumber(5), _optionsColor1(236), _optionsColor2(252),
+ _dialogWidth(600), _dialogHeight(0), _dialogLineSpace(10), _dialogColor1(220), _dialogColor2(223),
+ _dialogFlag(false), _dialogLines(0), _dialogText(nullptr), _mouseFlag(1),
+ _roomPathBitmap(nullptr), _roomPathBitmapTemp(nullptr), _coordsBufEnd(nullptr), _coordsBuf(nullptr), _coords(nullptr),
+ _traceLineLen(0), _rembBitmapTemp(nullptr), _rembBitmap(nullptr), _rembMask(0), _rembX(0), _rembY(0), _fpX(0), _fpY(0),
+ _checkBitmapTemp(nullptr), _checkBitmap(nullptr), _checkMask(0), _checkX(0), _checkY(0), _traceLineFirstPointFlag(false),
+ _tracePointFirstPointFlag(false), _coordsBuf2(nullptr), _coords2(nullptr), _coordsBuf3(nullptr), _coords3(nullptr),
+ _shanLen(0), _directionTable(nullptr), _currentMidi(0), _lightX(0), _lightY(0), _curveData(nullptr), _curvPos(0),
+ _creditsData(nullptr), _creditsDataSize(0), _currentTime(0), _zoomBitmap(nullptr), _shadowBitmap(nullptr), _transTable(nullptr),
+ _flcFrameSurface(nullptr), _shadScaleValue(0), _shadLineLen(0), _scaleValue(0), _dialogImage(nullptr) {
+
+ // Debug/console setup
+ DebugMan.addDebugChannel(DebugChannel::kScript, "script", "Prince Script debug channel");
+ DebugMan.addDebugChannel(DebugChannel::kEngine, "engine", "Prince Engine debug channel");
+
+ DebugMan.enableDebugChannel("script");
+
+ memset(_audioStream, 0, sizeof(_audioStream));
+
+ gDebugLevel = 10;
+}
+
+PrinceEngine::~PrinceEngine() {
+ DebugMan.clearAllDebugChannels();
+
+ delete _rnd;
+ delete _debugger;
+ delete _cursor1;
+ delete _cursor3;
+ delete _midiPlayer;
+ delete _script;
+ delete _flags;
+ delete _interpreter;
+ delete _font;
+ delete _roomBmp;
+ delete _suitcaseBmp;
+ delete _variaTxt;
+ free(_talkTxt);
+ free(_invTxt);
+ free(_dialogDat);
+ delete _graph;
+ delete _room;
+
+ if (_cursor2 != nullptr) {
+ _cursor2->free();
+ delete _cursor2;
+ }
+
+ for (uint i = 0; i < _objList.size(); i++) {
+ delete _objList[i];
+ }
+ _objList.clear();
+
+ free(_objSlot);
+
+ for (uint32 i = 0; i < _pscrList.size(); i++) {
+ delete _pscrList[i];
+ }
+ _pscrList.clear();
+
+ for (uint i = 0; i < _maskList.size(); i++) {
+ free(_maskList[i]._data);
+ }
+ _maskList.clear();
+
+ _drawNodeList.clear();
+
+ clearBackAnimList();
+ _backAnimList.clear();
+
+ freeAllNormAnims();
+ _normAnimList.clear();
+
+ for (uint i = 0; i < _allInvList.size(); i++) {
+ _allInvList[i]._surface->free();
+ delete _allInvList[i]._surface;
+ }
+ _allInvList.clear();
+
+ _optionsPic->free();
+ delete _optionsPic;
+
+ _optionsPicInInventory->free();
+ delete _optionsPicInInventory;
+
+ for (uint i = 0; i < _mainHero->_moveSet.size(); i++) {
+ delete _mainHero->_moveSet[i];
+ }
+
+ for (uint i = 0; i < _secondHero->_moveSet.size(); i++) {
+ delete _secondHero->_moveSet[i];
+ }
+
+ delete _mainHero;
+ delete _secondHero;
+
+ free(_roomPathBitmap);
+ free(_roomPathBitmapTemp);
+ free(_coordsBuf);
+
+ _mobPriorityList.clear();
+
+ freeAllSamples();
+
+ free(_zoomBitmap);
+ free(_shadowBitmap);
+ free(_transTable);
+
+ free(_curveData);
+
+ free(_shadowLine);
+
+ free(_creditsData);
+
+ if (_dialogImage != nullptr) {
+ _dialogImage->free();
+ delete _dialogImage;
+ }
+}
+
+GUI::Debugger *PrinceEngine::getDebugger() {
+ return _debugger;
+}
+
+void PrinceEngine::init() {
+
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
+ debugEngine("Adding all path: %s", gameDataDir.getPath().c_str());
+
+ PtcArchive *all = new PtcArchive();
+ if (!all->open("all/databank.ptc"))
+ error("Can't open all/databank.ptc");
+
+ PtcArchive *voices = new PtcArchive();
+ if (!voices->open("data/voices/databank.ptc"))
+ error("Can't open data/voices/databank.ptc");
+
+ PtcArchive *sound = new PtcArchive();
+ if (!sound->open("sound/databank.ptc"))
+ error("Can't open sound/databank.ptc");
+
+ SearchMan.addSubDirectoryMatching(gameDataDir, "all");
+
+ SearchMan.add("all", all);
+ SearchMan.add("voices", voices);
+ SearchMan.add("sound", sound);
+
+ _graph = new GraphicsMan(this);
+
+ _rnd = new Common::RandomSource("prince");
+
+ _midiPlayer = new MusicPlayer(this);
+
+ if (getLanguage() == Common::DE_DEU) {
+ _font = new Font();
+ Resource::loadResource(_font, "font3.raw", true);
+ } else {
+ _font = new Font();
+ Resource::loadResource(_font, "font1.raw", true);
+ }
+
+ _suitcaseBmp = new MhwanhDecoder();
+ Resource::loadResource(_suitcaseBmp, "walizka", true);
+
+ _script = new Script(this);
+ Resource::loadResource(_script, "skrypt.dat", true);
+
+ _flags = new InterpreterFlags();
+ _interpreter = new Interpreter(this, _script, _flags);
+
+ _debugger = new Debugger(this, _flags);
+
+ _variaTxt = new VariaTxt();
+ Resource::loadResource(_variaTxt, "variatxt.dat", true);
+
+ _cursor1 = new Cursor();
+ Resource::loadResource(_cursor1, "mouse1.cur", true);
+
+ _cursor3 = new Cursor();
+ Resource::loadResource(_cursor3, "mouse2.cur", true);
+
+ Common::SeekableReadStream *talkTxtStream = SearchMan.createReadStreamForMember("talktxt.dat");
+ if (!talkTxtStream) {
+ error("Can't load talkTxtStream");
+ return;
+ }
+ _talkTxtSize = talkTxtStream->size();
+ _talkTxt = (byte *)malloc(_talkTxtSize);
+ talkTxtStream->read(_talkTxt, _talkTxtSize);
+
+ delete talkTxtStream;
+
+ Common::SeekableReadStream *invTxtStream = SearchMan.createReadStreamForMember("invtxt.dat");
+ if (!invTxtStream) {
+ error("Can't load invTxtStream");
+ return;
+ }
+ _invTxtSize = invTxtStream->size();
+ _invTxt = (byte *)malloc(_invTxtSize);
+ invTxtStream->read(_invTxt, _invTxtSize);
+
+ delete invTxtStream;
+
+ loadAllInv();
+
+ Common::SeekableReadStream *dialogDatStream = SearchMan.createReadStreamForMember("dialog.dat");
+ if (!dialogDatStream) {
+ error("Can't load dialogDatStream");
+ return;
+ }
+ _dialogDatSize = dialogDatStream->size();
+ _dialogDat = (byte *)malloc(_dialogDatSize);
+ dialogDatStream->read(_dialogDat, _dialogDatSize);
+
+ delete dialogDatStream;
+
+ _optionsPic = new Graphics::Surface();
+ _optionsPic->create(_optionsWidth, _optionsHeight, Graphics::PixelFormat::createFormatCLUT8());
+ Common::Rect picRect(0, 0, _optionsWidth, _optionsHeight);
+ _optionsPic->fillRect(picRect, _graph->kShadowColor);
+
+ _optionsPicInInventory = new Graphics::Surface();
+ _optionsPicInInventory->create(_invOptionsWidth, _invOptionsHeight, Graphics::PixelFormat::createFormatCLUT8());
+ Common::Rect invPicRect(0, 0, _invOptionsWidth, _invOptionsHeight);
+ _optionsPicInInventory->fillRect(invPicRect, _graph->kShadowColor);
+
+ _roomBmp = new Image::BitmapDecoder();
+
+ _room = new Room();
+
+ _mainHero = new Hero(this, _graph);
+ _secondHero = new Hero(this, _graph);
+ _secondHero->_maxBoredom = 140;
+ _secondHero->loadAnimSet(3);
+
+ _roomPathBitmap = (byte *)malloc(kPathBitmapLen);
+ _roomPathBitmapTemp = (byte *)malloc(kPathBitmapLen);
+ _coordsBuf = (byte *)malloc(kTracePts * 4);
+ _coords = _coordsBuf;
+ _coordsBufEnd = _coordsBuf + kTracePts * 4 - 4;
+
+ BackgroundAnim tempBackAnim;
+ tempBackAnim._seq._currRelative = 0;
+ for (int i = 0; i < kMaxBackAnims; i++) {
+ _backAnimList.push_back(tempBackAnim);
+ }
+
+ Anim tempAnim;
+ tempAnim._animData = nullptr;
+ tempAnim._shadowData = nullptr;
+ for (int i = 0; i < kMaxNormAnims; i++) {
+ _normAnimList.push_back(tempAnim);
+ }
+
+ _objSlot = (uint16 *)malloc(kMaxObjects * sizeof(uint16));
+ for (int i = 0; i < kMaxObjects; i++) {
+ _objSlot[i] = 0xFF;
+ }
+
+ _zoomBitmap = (byte *)malloc(kZoomBitmapLen);
+ _shadowBitmap = (byte *)malloc(2 * kShadowBitmapSize);
+ _transTable = (byte *)malloc(kTransTableSize);
+
+ _curveData = (int16 *)malloc(2 * kCurveLen * sizeof(int16));
+
+ _shadowLine = (byte *)malloc(kShadowLineArraySize);
+
+ Common::SeekableReadStream *creditsDataStream = SearchMan.createReadStreamForMember("credits.dat");
+ if (!creditsDataStream) {
+ error("Can't load creditsDataStream");
+ return;
+ }
+ _creditsDataSize = creditsDataStream->size();
+ _creditsData = (byte *)malloc(_creditsDataSize);
+ creditsDataStream->read(_creditsData, _creditsDataSize);
+ delete creditsDataStream;
+}
+
+void PrinceEngine::showLogo() {
+ MhwanhDecoder logo;
+ _system->delayMillis(1000 / kFPS * 20);
+ if (Resource::loadResource(&logo, "logo.raw", true)) {
+ loadSample(0, "LOGO.WAV");
+ playSample(0, 0);
+ _graph->draw(_graph->_frontScreen, logo.getSurface());
+ _graph->change();
+ _graph->update(_graph->_frontScreen);
+ setPalette(logo.getPalette());
+ _system->delayMillis(1000 / kFPS * 70);
+ }
+}
+
+Common::Error PrinceEngine::run() {
+
+ init();
+
+ showLogo();
+
+ mainLoop();
+
+ return Common::kNoError;
+}
+
+bool AnimListItem::loadFromStream(Common::SeekableReadStream &stream) {
+ int32 pos = stream.pos();
+
+ uint16 type = stream.readUint16LE();
+ if (type == 0xFFFF) {
+ return false;
+ }
+ _type = type;
+ _fileNumber = stream.readUint16LE();
+ _startPhase = stream.readUint16LE();
+ _endPhase = stream.readUint16LE();
+ _loopPhase = stream.readUint16LE();
+ _x = stream.readSint16LE();
+ _y = stream.readSint16LE();
+ _loopType = stream.readUint16LE();
+ _nextAnim = stream.readUint16LE();
+ _flags = stream.readUint16LE();
+
+ //debug("AnimListItem type %d, fileNumber %d, x %d, y %d, flags %d", _type, _fileNumber, _x, _y, _flags);
+ //debug("startPhase %d, endPhase %d, loopPhase %d", _startPhase, _endPhase, _loopPhase);
+
+ // 32 byte aligment
+ stream.seek(pos + 32);
+
+ return true;
+}
+
+bool PrinceEngine::loadLocation(uint16 locationNr) {
+
+ blackPalette();
+
+ _flicPlayer.close();
+
+ memset(_textSlots, 0, sizeof(_textSlots));
+ freeAllSamples();
+
+ debugEngine("PrinceEngine::loadLocation %d", locationNr);
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.remove(Common::String::format("%02d", _locationNr));
+
+ _locationNr = locationNr;
+ _debugger->_locationNr = locationNr;
+
+ _flags->setFlagValue(Flags::CURRROOM, _locationNr);
+ _interpreter->stopBg();
+
+ changeCursor(0);
+
+ const Common::String locationNrStr = Common::String::format("%02d", _locationNr);
+ debugEngine("loadLocation %s", locationNrStr.c_str());
+
+ PtcArchive *locationArchive = new PtcArchive();
+ if (!locationArchive->open(locationNrStr + "/databank.ptc"))
+ error("Can't open location %s", locationNrStr.c_str());
+
+ SearchMan.add(locationNrStr, locationArchive);
+
+ loadMusic(_locationNr);
+
+ // load location background, replace old one
+ Resource::loadResource(_roomBmp, "room", true);
+ if (_roomBmp->getSurface()) {
+ _sceneWidth = _roomBmp->getSurface()->w;
+ }
+
+ loadZoom(_zoomBitmap, kZoomBitmapLen, "zoom");
+ loadShadow(_shadowBitmap, kShadowBitmapSize, "shadow", "shadow2");
+ loadTrans(_transTable, "trans");
+ loadPath("path");
+
+ for (uint32 i = 0; i < _pscrList.size(); i++) {
+ delete _pscrList[i];
+ }
+ _pscrList.clear();
+ Resource::loadResource(_pscrList, "pscr.lst", false);
+
+ loadMobPriority("mobpri");
+
+ _mobList.clear();
+ if (getLanguage() == Common::DE_DEU) {
+ const Common::String mobLstName = Common::String::format("mob%02d.lst", _locationNr);
+ debug("name: %s", mobLstName.c_str());
+ Resource::loadResource(_mobList, mobLstName.c_str(), false);
+ } else {
+ Resource::loadResource(_mobList, "mob.lst", false);
+ }
+
+ _animList.clear();
+ Resource::loadResource(_animList, "anim.lst", false);
+
+ for (uint32 i = 0; i < _objList.size(); i++) {
+ delete _objList[i];
+ }
+ _objList.clear();
+ Resource::loadResource(_objList, "obj.lst", false);
+
+ _room->loadRoom(_script->getRoomOffset(_locationNr));
+
+ for (uint i = 0; i < _maskList.size(); i++) {
+ free(_maskList[i]._data);
+ }
+ _maskList.clear();
+ _script->loadAllMasks(_maskList, _room->_nak);
+
+ _picWindowX = 0;
+
+ _lightX = _script->getLightX(_locationNr);
+ _lightY = _script->getLightY(_locationNr);
+ setShadowScale(_script->getShadowScale(_locationNr));
+
+ for (uint i = 0; i < _mobList.size(); i++) {
+ _mobList[i]._visible = _script->getMobVisible(_room->_mobs, i);
+ }
+
+ _script->installObjects(_room->_obj);
+
+ freeAllNormAnims();
+
+ clearBackAnimList();
+ _script->installBackAnims(_backAnimList, _room->_backAnim);
+
+ _graph->makeShadowTable(70, _graph->_shadowTable70);
+ _graph->makeShadowTable(50, _graph->_shadowTable50);
+
+ _mainHero->freeOldMove();
+ _secondHero->freeOldMove();
+
+ _mainHero->scrollHero();
+
+ return true;
+}
+
+void PrinceEngine::setShadowScale(int32 shadowScale) {
+ shadowScale = 100 - shadowScale;
+ if (!shadowScale) {
+ _shadScaleValue = 10000;
+ } else {
+ _shadScaleValue = 10000 / shadowScale;
+ }
+}
+
+void PrinceEngine::plotShadowLinePoint(int x, int y, int color, void *data) {
+ PrinceEngine *vm = (PrinceEngine *)data;
+ WRITE_LE_UINT16(&vm->_shadowLine[vm->_shadLineLen * 4], x);
+ WRITE_LE_UINT16(&vm->_shadowLine[vm->_shadLineLen * 4 + 2], y);
+ vm->_shadLineLen++;
+}
+
+void PrinceEngine::changeCursor(uint16 curId) {
+ _debugger->_cursorNr = curId;
+ _mouseFlag = curId;
+ _flags->setFlagValue(Flags::MOUSEENABLED, curId);
+
+ const Graphics::Surface *curSurface = nullptr;
+
+ switch (curId) {
+ case 0:
+ CursorMan.showMouse(false);
+ _optionsFlag = 0;
+ _selectedMob = -1;
+ return;
+ case 1:
+ curSurface = _cursor1->getSurface();
+ break;
+ case 2:
+ curSurface = _cursor2;
+ break;
+ case 3:
+ curSurface = _cursor3->getSurface();
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ mousePos.x = CLIP(mousePos.x, (int16) 315, (int16) 639);
+ mousePos.y = CLIP(mousePos.y, (int16) 0, (int16) 170);
+ _system->warpMouse(mousePos.x, mousePos.y);
+ break;
+ }
+
+ CursorMan.replaceCursorPalette(_roomBmp->getPalette(), 0, 255);
+ CursorMan.replaceCursor(
+ curSurface->getBasePtr(0, 0),
+ curSurface->w, curSurface->h,
+ 0, 0,
+ 255, false,
+ &curSurface->format
+ );
+ CursorMan.showMouse(true);
+}
+
+void PrinceEngine::makeInvCursor(int itemNr) {
+ const Graphics::Surface *cur1Surface = _cursor1->getSurface();
+ int cur1W = cur1Surface->w;
+ int cur1H = cur1Surface->h;
+ const Common::Rect cur1Rect(0, 0, cur1W, cur1H);
+
+ const Graphics::Surface *itemSurface = _allInvList[itemNr].getSurface();
+ int itemW = itemSurface->w;
+ int itemH = itemSurface->h;
+
+ int cur2W = cur1W + itemW / 2;
+ int cur2H = cur1H + itemH / 2;
+
+ if (_cursor2 != nullptr) {
+ _cursor2->free();
+ delete _cursor2;
+ }
+ _cursor2 = new Graphics::Surface();
+ _cursor2->create(cur2W, cur2H, Graphics::PixelFormat::createFormatCLUT8());
+ Common::Rect cur2Rect(0, 0, cur2W, cur2H);
+ _cursor2->fillRect(cur2Rect, 255);
+ _cursor2->copyRectToSurface(*cur1Surface, 0, 0, cur1Rect);
+
+ const byte *src1 = (const byte *)itemSurface->getBasePtr(0, 0);
+ byte *dst1 = (byte *)_cursor2->getBasePtr(cur1W, cur1H);
+
+ if (itemH % 2) {
+ itemH--;
+ }
+ if (itemW % 2) {
+ itemW--;
+ }
+
+ for (int y = 0; y < itemH; y++) {
+ const byte *src2 = src1;
+ byte *dst2 = dst1;
+ if (y % 2 == 0) {
+ for (int x = 0; x < itemW; x++, src2++) {
+ if (x % 2 == 0) {
+ if (*src2) {
+ *dst2 = *src2;
+ } else {
+ *dst2 = 255;
+ }
+ dst2++;
+ }
+ }
+ dst1 += _cursor2->pitch;
+ }
+ src1 += itemSurface->pitch;
+ }
+}
+
+bool PrinceEngine::loadMusic(int musNumber) {
+ uint8 midiNumber = MusicPlayer::_musRoomTable[musNumber];
+ if (midiNumber) {
+ if (midiNumber != 100) {
+ if (_currentMidi != midiNumber) {
+ _currentMidi = midiNumber;
+ const char *musName = MusicPlayer::_musTable[_currentMidi];
+ _midiPlayer->loadMidi(musName);
+ }
+ }
+ } else {
+ stopMusic();
+ }
+ return true;
+}
+
+void PrinceEngine::stopMusic() {
+ if (_midiPlayer->isPlaying()) {
+ _midiPlayer->stop();
+ }
+}
+
+bool PrinceEngine::playNextFLCFrame() {
+ if (!_flicPlayer.isVideoLoaded())
+ return false;
+
+ const Graphics::Surface *s = _flicPlayer.decodeNextFrame();
+ if (s) {
+ _graph->drawTransparentSurface(_graph->_frontScreen, 0, 0, s, 255);
+ _graph->change();
+ _flcFrameSurface = s;
+ } else if (_flicLooped) {
+ _flicPlayer.rewind();
+ playNextFLCFrame();
+ } else if (_flcFrameSurface) {
+ _graph->drawTransparentSurface(_graph->_frontScreen, 0, 0, _flcFrameSurface, 255);
+ _graph->change();
+ }
+
+ return true;
+}
+
+void PrinceEngine::playSample(uint16 sampleId, uint16 loopType) {
+ if (_audioStream[sampleId]) {
+ if (_mixer->isSoundIDActive(sampleId)) {
+ return;
+ }
+ _audioStream[sampleId]->rewind();
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle[sampleId], _audioStream[sampleId], sampleId, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
+ }
+}
+
+void PrinceEngine::stopSample(uint16 sampleId) {
+ _mixer->stopID(sampleId);
+}
+
+void PrinceEngine::stopAllSamples() {
+ _mixer->stopAll();
+}
+
+void PrinceEngine::freeSample(uint16 sampleId) {
+ stopSample(sampleId);
+ if (_audioStream[sampleId] != nullptr) {
+ delete _audioStream[sampleId];
+ _audioStream[sampleId] = nullptr;
+ }
+}
+
+void PrinceEngine::freeAllSamples() {
+ for (int sampleId = 0; sampleId < kMaxSamples; sampleId++) {
+ freeSample(sampleId);
+ }
+}
+
+bool PrinceEngine::loadSample(uint32 sampleSlot, const Common::String &streamName) {
+ // FIXME: This is just a workaround streamName is a path
+ // SOUND\\SCIERKA1.WAV for now only last path component is used
+ Common::String normalizedPath = lastPathComponent(streamName, '\\');
+
+ // WALKAROUND: Wrong name in script, not existing sound in data files
+ if (!normalizedPath.compareTo("9997BEKA.WAV")) {
+ return 0;
+ }
+
+ debugEngine("loadSample slot %d, name %s", sampleSlot, normalizedPath.c_str());
+
+ freeSample(sampleSlot);
+ Common::SeekableReadStream *sampleStream = SearchMan.createReadStreamForMember(normalizedPath);
+ if (sampleStream == nullptr) {
+ delete sampleStream;
+ error("Can't load sample %s to slot %d", normalizedPath.c_str(), sampleSlot);
+ }
+ _audioStream[sampleSlot] = Audio::makeWAVStream(sampleStream, DisposeAfterUse::NO);
+ delete sampleStream;
+ return true;
+}
+
+bool PrinceEngine::loadVoice(uint32 slot, uint32 sampleSlot, const Common::String &streamName) {
+ debugEngine("Loading wav %s slot %d", streamName.c_str(), slot);
+
+ if (slot >= kMaxTexts) {
+ error("Text slot bigger than MAXTEXTS %d", kMaxTexts - 1);
+ return false;
+ }
+
+ freeSample(sampleSlot);
+ Common::SeekableReadStream *sampleStream = SearchMan.createReadStreamForMember(streamName);
+ if (sampleStream == nullptr) {
+ debug("Can't open %s", streamName.c_str());
+ return false;
+ }
+
+ uint32 id = sampleStream->readUint32LE();
+ if (id != MKTAG('F', 'F', 'I', 'R')) {
+ error("It's not RIFF file %s", streamName.c_str());
+ return false;
+ }
+
+ sampleStream->skip(0x20);
+ id = sampleStream->readUint32LE();
+ if (id != MKTAG('a', 't', 'a', 'd')) {
+ error("No data section in %s id %04x", streamName.c_str(), id);
+ return false;
+ }
+
+ id = sampleStream->readUint32LE();
+ debugEngine("SetVoice slot %d time %04x", slot, id);
+ id <<= 3;
+ id /= 22050;
+ id += 2;
+
+ _textSlots[slot]._time = id;
+ if (!slot) {
+ _mainHero->_talkTime = id;
+ } else if (slot == 1) {
+ _secondHero->_talkTime = id;
+ }
+
+ debugEngine("SetVoice slot %d time %04x", slot, id);
+ sampleStream->seek(SEEK_SET);
+ _audioStream[sampleSlot] = Audio::makeWAVStream(sampleStream, DisposeAfterUse::NO);
+ delete sampleStream;
+ return true;
+}
+
+void PrinceEngine::setVoice(uint16 slot, uint32 sampleSlot, uint16 flag) {
+ Common::String sampleName;
+ uint32 currentString = _interpreter->getCurrentString();
+
+ if (currentString >= 80000) {
+ uint32 nr = currentString - 80000;
+ sampleName = Common::String::format("%02d0%02d-%02d.WAV", nr / 100, nr % 100, flag);
+ } else if (currentString >= 70000) {
+ sampleName = Common::String::format("inv%02d-01.WAV", currentString - 70000);
+ } else if (currentString >= 60000) {
+ sampleName = Common::String::format("M%04d-%02d.WAV", currentString - 60000, flag);
+ } else if (currentString >= 2000) {
+ return;
+ } else if (flag >= 100) {
+ sampleName = Common::String::format("%03d-%03d.WAV", currentString, flag);
+ } else {
+ sampleName = Common::String::format("%03d-%02d.WAV", currentString, flag);
+ }
+
+ loadVoice(slot, sampleSlot, sampleName);
+}
+
+bool PrinceEngine::loadAnim(uint16 animNr, bool loop) {
+ Common::String streamName = Common::String::format("AN%02d", animNr);
+ Common::SeekableReadStream *flicStream = SearchMan.createReadStreamForMember(streamName);
+
+ if (!flicStream) {
+ error("Can't open %s", streamName.c_str());
+ return false;
+ }
+
+ if (!_flicPlayer.loadStream(flicStream)) {
+ error("Can't load flic stream %s", streamName.c_str());
+ }
+
+ debugEngine("%s loaded", streamName.c_str());
+ _flicLooped = loop;
+ _flicPlayer.start();
+ playNextFLCFrame();
+ return true;
+}
+
+bool PrinceEngine::loadZoom(byte *zoomBitmap, uint32 dataSize, const char *resourceName) {
+ Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(resourceName);
+ if (!stream) {
+ delete stream;
+ return false;
+ }
+ if (stream->read(zoomBitmap, dataSize) != dataSize) {
+ free(zoomBitmap);
+ delete stream;
+ return false;
+ }
+ delete stream;
+ return true;
+}
+
+bool PrinceEngine::loadShadow(byte *shadowBitmap, uint32 dataSize, const char *resourceName1, const char *resourceName2) {
+ Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(resourceName1);
+ if (!stream) {
+ delete stream;
+ return false;
+ }
+
+ if (stream->read(shadowBitmap, dataSize) != dataSize) {
+ free(shadowBitmap);
+ delete stream;
+ return false;
+ }
+
+ Common::SeekableReadStream *stream2 = SearchMan.createReadStreamForMember(resourceName2);
+ if (!stream2) {
+ delete stream;
+ delete stream2;
+ return false;
+ }
+
+ byte *shadowBitmap2 = shadowBitmap + dataSize;
+ if (stream2->read(shadowBitmap2, dataSize) != dataSize) {
+ free(shadowBitmap);
+ delete stream;
+ delete stream2;
+ return false;
+ }
+
+ delete stream;
+ delete stream2;
+ return true;
+}
+
+bool PrinceEngine::loadTrans(byte *transTable, const char *resourceName) {
+ Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(resourceName);
+ if (!stream) {
+ delete stream;
+ for (int i = 0; i < 256; i++) {
+ for (int j = 0; j < 256; j++) {
+ transTable[i * 256 + j] = j;
+ }
+ }
+ return true;
+ }
+ if (stream->read(transTable, kTransTableSize) != kTransTableSize) {
+ delete stream;
+ return false;
+ }
+ delete stream;
+ return true;
+}
+
+bool PrinceEngine::loadPath(const char *resourceName) {
+ Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(resourceName);
+ if (!stream) {
+ delete stream;
+ return false;
+ }
+ if (stream->read(_roomPathBitmap, kPathBitmapLen) != kPathBitmapLen) {
+ delete stream;
+ return false;
+ }
+ delete stream;
+ return true;
+}
+
+bool PrinceEngine::loadAllInv() {
+ for (int i = 0; i < kMaxInv; i++) {
+ InvItem tempInvItem;
+
+ const Common::String invStreamName = Common::String::format("INV%02d", i);
+ Common::SeekableReadStream *invStream = SearchMan.createReadStreamForMember(invStreamName);
+ if (!invStream) {
+ delete invStream;
+ return true;
+ }
+
+ tempInvItem._x = invStream->readUint16LE();
+ tempInvItem._y = invStream->readUint16LE();
+ int width = invStream->readUint16LE();
+ int height = invStream->readUint16LE();
+ tempInvItem._surface = new Graphics::Surface();
+ tempInvItem._surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
+
+ for (int h = 0; h < tempInvItem._surface->h; h++) {
+ invStream->read(tempInvItem._surface->getBasePtr(0, h), tempInvItem._surface->w);
+ }
+
+ _allInvList.push_back(tempInvItem);
+ delete invStream;
+ }
+
+ return true;
+}
+
+bool PrinceEngine::loadMobPriority(const char *resourceName) {
+ Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(resourceName);
+ if (!stream) {
+ delete stream;
+ return false;
+ }
+
+ _mobPriorityList.clear();
+ uint mobId;
+ while (1) {
+ mobId = stream->readUint32LE();
+ if (mobId == 0xFFFFFFFF) {
+ break;
+ }
+ _mobPriorityList.push_back(mobId);
+ }
+ delete stream;
+ return true;
+}
+
+void PrinceEngine::keyHandler(Common::Event event) {
+ uint16 nChar = event.kbd.keycode;
+ switch (nChar) {
+ case Common::KEYCODE_d:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ getDebugger()->attach();
+ }
+ break;
+ case Common::KEYCODE_z:
+ if (_flags->getFlagValue(Flags::POWERENABLED)) {
+ _flags->setFlagValue(Flags::MBFLAG, 1);
+ }
+ break;
+ case Common::KEYCODE_x:
+ if (_flags->getFlagValue(Flags::POWERENABLED)) {
+ _flags->setFlagValue(Flags::MBFLAG, 2);
+ }
+ break;
+ case Common::KEYCODE_ESCAPE:
+ _flags->setFlagValue(Flags::ESCAPED2, 1);
+ break;
+ }
+}
+
+int PrinceEngine::getMob(Common::Array<Mob> &mobList, bool usePriorityList, int posX, int posY) {
+
+ Common::Point pointPos(posX, posY);
+
+ int mobListSize;
+ if (usePriorityList) {
+ mobListSize = _mobPriorityList.size();
+ } else {
+ mobListSize = mobList.size();
+ }
+
+ for (int mobNumber = 0; mobNumber < mobListSize; mobNumber++) {
+ Mob *mob = nullptr;
+ if (usePriorityList) {
+ mob = &mobList[_mobPriorityList[mobNumber]];
+ } else {
+ mob = &mobList[mobNumber];
+ }
+
+ if (mob->_visible) {
+ continue;
+ }
+
+ int type = mob->_type & 7;
+ switch (type) {
+ case 0:
+ case 1:
+ //normal_mob
+ if (!mob->_rect.contains(pointPos)) {
+ continue;
+ }
+ break;
+ case 3:
+ //mob_obj
+ if (mob->_mask < kMaxObjects) {
+ int nr = _objSlot[mob->_mask];
+ if (nr != 0xFF) {
+ Object &obj = *_objList[nr];
+ Common::Rect objectRect(obj._x, obj._y, obj._x + obj._width, obj._y + obj._height);
+ if (objectRect.contains(pointPos)) {
+ Graphics::Surface *objSurface = obj.getSurface();
+ byte *pixel = (byte *)objSurface->getBasePtr(posX - obj._x, posY - obj._y);
+ if (*pixel != 255) {
+ break;
+ }
+ }
+ }
+ }
+ continue;
+ break;
+ case 2:
+ case 5:
+ //check_ba_mob
+ if (!_backAnimList[mob->_mask].backAnims.empty()) {
+ int currentAnim = _backAnimList[mob->_mask]._seq._currRelative;
+ Anim &backAnim = _backAnimList[mob->_mask].backAnims[currentAnim];
+ if (backAnim._animData != nullptr) {
+ if (!backAnim._state) {
+ Common::Rect backAnimRect(backAnim._currX, backAnim._currY, backAnim._currX + backAnim._currW, backAnim._currY + backAnim._currH);
+ if (backAnimRect.contains(pointPos)) {
+ int phase = backAnim._showFrame;
+ int phaseFrameIndex = backAnim._animData->getPhaseFrameIndex(phase);
+ Graphics::Surface *backAnimSurface = backAnim._animData->getFrame(phaseFrameIndex);
+ byte pixel = *(byte *)backAnimSurface->getBasePtr(posX - backAnim._currX, posY - backAnim._currY);
+ if (pixel != 255) {
+ if (type == 5) {
+ if (mob->_rect.contains(pointPos)) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ continue;
+ break;
+ default:
+ //not_part_ba
+ continue;
+ break;
+ }
+
+ if (usePriorityList) {
+ return _mobPriorityList[mobNumber];
+ } else {
+ return mobNumber;
+ }
+ }
+ return -1;
+}
+
+int PrinceEngine::checkMob(Graphics::Surface *screen, Common::Array<Mob> &mobList, bool usePriorityList) {
+ if (_mouseFlag == 0 || _mouseFlag == 3) {
+ return -1;
+ }
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ int mobNumber = getMob(mobList, usePriorityList, mousePos.x + _picWindowX, mousePos.y);
+
+ if (mobNumber != -1) {
+ Common::String mobName = mobList[mobNumber]._name;
+
+ if (getLanguage() == Common::DE_DEU) {
+ for (uint i = 0; i < mobName.size(); i++) {
+ switch (mobName[i]) {
+ case '\xc4':
+ mobName.setChar('\x83', i);
+ break;
+ case '\xd6':
+ mobName.setChar('\x84', i);
+ break;
+ case '\xdc':
+ mobName.setChar('\x85', i);
+ break;
+ case '\xdf':
+ mobName.setChar('\x7f', i);
+ break;
+ case '\xe4':
+ mobName.setChar('\x80', i);
+ break;
+ case '\xf6':
+ mobName.setChar('\x81', i);
+ break;
+ case '\xfc':
+ mobName.setChar('\x82', i);
+ break;
+ }
+ }
+ }
+
+ uint16 textW = getTextWidth(mobName.c_str());
+
+ uint16 x = mousePos.x - textW / 2;
+ if (x > screen->w) {
+ x = 0;
+ }
+
+ if (x + textW > screen->w) {
+ x = screen->w - textW;
+ }
+
+ uint16 y = mousePos.y - _font->getFontHeight();
+ if (y > screen->h) {
+ y = _font->getFontHeight() - 2;
+ }
+
+ _font->drawString(screen, mobName, x, y, screen->w, 216);
+ }
+
+ return mobNumber;
+}
+
+void PrinceEngine::printAt(uint32 slot, uint8 color, char *s, uint16 x, uint16 y) {
+ debugC(1, DebugChannel::kEngine, "PrinceEngine::printAt slot %d, color %d, x %02d, y %02d, str %s", slot, color, x, y, s);
+
+ if (getLanguage() == Common::DE_DEU)
+ correctStringDEU(s);
+
+ Text &text = _textSlots[slot];
+ text._str = s;
+ text._x = x;
+ text._y = y;
+ text._color = color;
+ int lines = calcTextLines(s);
+ text._time = calcTextTime(lines);
+}
+
+int PrinceEngine::calcTextLines(const char *s) {
+ int lines = 1;
+ while (*s) {
+ if (*s == '\n') {
+ lines++;
+ }
+ s++;
+ }
+ return lines;
+}
+
+int PrinceEngine::calcTextTime(int numberOfLines) {
+ return numberOfLines * 30;
+}
+
+void PrinceEngine::correctStringDEU(char *s) {
+ while (*s) {
+ switch (*s) {
+ case '\xc4':
+ *s = '\x83';
+ break;
+ case '\xd6':
+ *s = '\x84';
+ break;
+ case '\xdc':
+ *s = '\x85';
+ break;
+ case '\xdf':
+ *s = '\x7f';
+ break;
+ case '\xe4':
+ *s = '\x80';
+ break;
+ case '\xf6':
+ *s = '\x81';
+ break;
+ case '\xfc':
+ *s = '\x82';
+ break;
+ }
+ s++;
+ }
+}
+
+uint32 PrinceEngine::getTextWidth(const char *s) {
+ uint16 textW = 0;
+ while (*s) {
+ textW += _font->getCharWidth(*s) + _font->getKerningOffset(0, 0);
+ s++;
+ }
+ return textW;
+}
+
+void PrinceEngine::showTexts(Graphics::Surface *screen) {
+ for (uint32 slot = 0; slot < kMaxTexts; slot++) {
+
+ if (_showInventoryFlag && slot) {
+ // only slot 0 for inventory
+ break;
+ }
+
+ Text& text = _textSlots[slot];
+ if (!text._str && !text._time) {
+ continue;
+ }
+
+ int x = text._x;
+ int y = text._y;
+
+ if (!_showInventoryFlag) {
+ x -= _picWindowX;
+ y -= _picWindowY;
+ }
+
+ Common::Array<Common::String> lines;
+ _font->wordWrapText(text._str, _graph->_frontScreen->w, lines);
+
+ int wideLine = 0;
+ for (uint i = 0; i < lines.size(); i++) {
+ int textLen = getTextWidth(lines[i].c_str());
+ if (textLen > wideLine) {
+ wideLine = textLen;
+ }
+ }
+
+ int leftBorderText = 6;
+ if (x + wideLine / 2 > kNormalWidth - leftBorderText) {
+ x = kNormalWidth - leftBorderText - wideLine / 2;
+ }
+
+ if (x - wideLine / 2 < leftBorderText) {
+ x = leftBorderText + wideLine / 2;
+ }
+
+ int textSkip = 2;
+ for (uint i = 0; i < lines.size(); i++) {
+ int drawX = x - getTextWidth(lines[i].c_str()) / 2;
+ int drawY = y - 10 - (lines.size() - i) * (_font->getFontHeight() - textSkip);
+ if (drawX < 0) {
+ drawX = 0;
+ }
+ if (drawY < 0) {
+ drawY = 0;
+ }
+ _font->drawString(screen, lines[i], drawX, drawY, screen->w, text._color);
+ }
+
+ text._time--;
+ if (!text._time) {
+ text._str = nullptr;
+ }
+ }
+}
+
+bool PrinceEngine::spriteCheck(int sprWidth, int sprHeight, int destX, int destY) {
+ destX -= _picWindowX;
+ destY -= _picWindowY;
+
+ // if x1 is on visible part of screen
+ if (destX < 0) {
+ if (destX + sprWidth < 1) {
+ //x2 is negative - out of window
+ return false;
+ }
+ }
+ // if x1 is outside of screen on right side
+ if (destX >= kNormalWidth) {
+ return false;
+ }
+
+ if (destY < 0) {
+ if (destY + sprHeight < 1) {
+ //y2 is negative - out of window
+ return false;
+ }
+ }
+ if (destY >= kNormalHeight) {
+ return false;
+ }
+
+ return true;
+}
+
+// CheckNak
+void PrinceEngine::checkMasks(int x1, int y1, int sprWidth, int sprHeight, int z) {
+ int x2 = x1 + sprWidth - 1;
+ int y2 = y1 + sprHeight - 1;
+ if (x1 < 0) {
+ x1 = 0;
+ }
+ for (uint i = 0; i < _maskList.size(); i++) {
+ if (!_maskList[i]._state && !_maskList[i]._flags) {
+ if (_maskList[i]._z > z) {
+ if (_maskList[i]._x1 <= x2 && _maskList[i]._x2 >= x1) {
+ if (_maskList[i]._y1 <= y2 && _maskList[i]._y2 >= y1) {
+ _maskList[i]._state = 1;
+ }
+ }
+ }
+ }
+ }
+}
+
+// ClsNak
+void PrinceEngine::clsMasks() {
+ for (uint i = 0; i < _maskList.size(); i++) {
+ if (_maskList[i]._state) {
+ _maskList[i]._state = 0;
+ }
+ }
+}
+
+// InsertNakladki
+void PrinceEngine::insertMasks(Graphics::Surface *originalRoomSurface) {
+ for (uint i = 0; i < _maskList.size(); i++) {
+ if (_maskList[i]._state) {
+ if (_maskList[i]._data != nullptr) {
+ showMask(i, originalRoomSurface);
+ } else {
+ error("insertMasks() - Wrong mask data- nr %d", i);
+ }
+ }
+ }
+}
+
+// ShowNak
+void PrinceEngine::showMask(int maskNr, Graphics::Surface *originalRoomSurface) {
+ if (!_maskList[maskNr]._flags) {
+ if (spriteCheck(_maskList[maskNr]._width, _maskList[maskNr]._height, _maskList[maskNr]._x1, _maskList[maskNr]._y1)) {
+ int destX = _maskList[maskNr]._x1 - _picWindowX;
+ int destY = _maskList[maskNr]._y1 - _picWindowY;
+ DrawNode newDrawNode;
+ newDrawNode.posX = destX;
+ newDrawNode.posY = destY;
+ newDrawNode.posZ = _maskList[maskNr]._z;
+ newDrawNode.width = _maskList[maskNr]._width;
+ newDrawNode.height = _maskList[maskNr]._height;
+ newDrawNode.s = nullptr;
+ newDrawNode.originalRoomSurface = originalRoomSurface;
+ newDrawNode.data = _maskList[maskNr].getMask();
+ newDrawNode.drawFunction = &_graph->drawMaskDrawNode;
+ _drawNodeList.push_back(newDrawNode);
+ }
+ }
+}
+
+void PrinceEngine::showSprite(Graphics::Surface *spriteSurface, int destX, int destY, int destZ) {
+ if (spriteCheck(spriteSurface->w, spriteSurface->h, destX, destY)) {
+ destX -= _picWindowX;
+ destY -= _picWindowY;
+ DrawNode newDrawNode;
+ newDrawNode.posX = destX;
+ newDrawNode.posY = destY;
+ newDrawNode.posZ = destZ;
+ newDrawNode.width = 0;
+ newDrawNode.height = 0;
+ newDrawNode.s = spriteSurface;
+ newDrawNode.originalRoomSurface = nullptr;
+ newDrawNode.data = _transTable;
+ newDrawNode.drawFunction = &_graph->drawTransparentWithTransDrawNode;
+ _drawNodeList.push_back(newDrawNode);
+ }
+}
+
+void PrinceEngine::showSpriteShadow(Graphics::Surface *shadowSurface, int destX, int destY, int destZ) {
+ if (spriteCheck(shadowSurface->w, shadowSurface->h, destX, destY)) {
+ destX -= _picWindowX;
+ destY -= _picWindowY;
+ DrawNode newDrawNode;
+ newDrawNode.posX = destX;
+ newDrawNode.posY = destY;
+ newDrawNode.posZ = destZ;
+ newDrawNode.width = 0;
+ newDrawNode.height = 0;
+ newDrawNode.s = shadowSurface;
+ newDrawNode.originalRoomSurface = nullptr;
+ newDrawNode.data = _graph->_shadowTable70;
+ newDrawNode.drawFunction = &_graph->drawAsShadowDrawNode;
+ _drawNodeList.push_back(newDrawNode);
+ }
+}
+
+void PrinceEngine::showAnim(Anim &anim) {
+ //ShowFrameCode
+ //ShowAnimFrame
+ int phase = anim._showFrame;
+ int phaseFrameIndex = anim._animData->getPhaseFrameIndex(phase);
+ int x = anim._x + anim._animData->getPhaseOffsetX(phase);
+ int y = anim._y + anim._animData->getPhaseOffsetY(phase);
+ int animFlag = anim._flags;
+ int checkMaskFlag = (animFlag & 1);
+ int maxFrontFlag = (animFlag & 2);
+ int specialZFlag = anim._nextAnim;
+ int z = anim._nextAnim;
+ Graphics::Surface *animSurface = anim._animData->getFrame(phaseFrameIndex);
+ int frameWidth = animSurface->w;
+ int frameHeight = animSurface->h;
+ int shadowZ = 0;
+
+ if (checkMaskFlag) {
+ if (!anim._nextAnim) {
+ z = y + frameHeight - 1;
+ }
+ checkMasks(x, y, frameWidth, frameHeight, z);
+ }
+
+ if (specialZFlag) {
+ z = specialZFlag;
+ } else if (maxFrontFlag) {
+ z = kMaxPicHeight + 1;
+ } else {
+ z = y + frameHeight - 1;
+ }
+ shadowZ = z;
+
+ anim._currX = x;
+ anim._currY = y;
+ anim._currW = frameWidth;
+ anim._currH = frameHeight;
+ showSprite(animSurface, x, y, z);
+
+ // make_special_shadow
+ if ((anim._flags & 0x80)) {
+ if (animSurface) {
+ DrawNode newDrawNode;
+ newDrawNode.posX = x;
+ newDrawNode.posY = y + animSurface->h - anim._shadowBack;
+ newDrawNode.posZ = Hero::kHeroShadowZ;
+ newDrawNode.width = 0;
+ newDrawNode.height = 0;
+ newDrawNode.scaleValue = _scaleValue;
+ newDrawNode.originalRoomSurface = nullptr;
+ newDrawNode.data = this;
+ newDrawNode.drawFunction = &Hero::showHeroShadow;
+ newDrawNode.s = animSurface;
+ _drawNodeList.push_back(newDrawNode);
+ }
+ }
+
+ //ShowFrameCodeShadow
+ //ShowAnimFrameShadow
+ if (anim._shadowData != nullptr) {
+ int shadowPhaseFrameIndex = anim._shadowData->getPhaseFrameIndex(phase);
+ int shadowX = anim._shadowData->getBaseX() + anim._shadowData->getPhaseOffsetX(phase);
+ int shadowY = anim._shadowData->getBaseY() + anim._shadowData->getPhaseOffsetY(phase);
+ Graphics::Surface *shadowSurface = anim._shadowData->getFrame(shadowPhaseFrameIndex);
+ int shadowFrameWidth = shadowSurface->w;
+ int shadowFrameHeight = shadowSurface->h;
+
+ if (checkMaskFlag) {
+ checkMasks(shadowX, shadowY, shadowFrameWidth, shadowFrameHeight, shadowY + shadowFrameWidth - 1);
+ }
+
+ if (!shadowZ) {
+ if (maxFrontFlag) {
+ shadowZ = kMaxPicHeight + 1;
+ } else {
+ shadowZ = shadowY + shadowFrameWidth - 1;
+ }
+ }
+ showSpriteShadow(shadowSurface, shadowX, shadowY, shadowZ);
+ }
+}
+
+void PrinceEngine::showNormAnims() {
+ for (int i = 0; i < kMaxNormAnims; i++) {
+ Anim &anim = _normAnimList[i];
+ if (anim._animData != nullptr) {
+ int phaseCount = anim._animData->getPhaseCount();
+ if (!anim._state) {
+ if (anim._frame == anim._lastFrame - 1) {
+ if (anim._loopType) {
+ if (anim._loopType == 1) {
+ anim._frame = anim._loopFrame;
+ } else {
+ continue;
+ }
+ }
+ } else {
+ anim._frame++;
+ }
+ anim._showFrame = anim._frame;
+ if (anim._showFrame >= phaseCount) {
+ anim._showFrame = phaseCount - 1;
+ }
+ showAnim(anim);
+ }
+ }
+ }
+}
+
+void PrinceEngine::setBackAnim(Anim &backAnim) {
+ int start = backAnim._basaData._start;
+ if (start != -1) {
+ backAnim._frame = start;
+ backAnim._showFrame = start;
+ backAnim._loopFrame = start;
+ }
+ int end = backAnim._basaData._end;
+ if (end != -1) {
+ backAnim._lastFrame = end;
+ }
+ backAnim._state = 0;
+}
+
+void PrinceEngine::showBackAnims() {
+ for (uint i = 0; i < kMaxBackAnims; i++) {
+ BAS &seq = _backAnimList[i]._seq;
+ int activeSubAnim = seq._currRelative;
+ if (!_backAnimList[i].backAnims.empty()) {
+ if (_backAnimList[i].backAnims[activeSubAnim]._animData != nullptr) {
+ if (!_backAnimList[i].backAnims[activeSubAnim]._state) {
+ seq._counter++;
+ if (seq._type == 2) {
+ if (!seq._currRelative) {
+ if (seq._counter >= seq._data) {
+ if (seq._anims > 2) {
+ seq._currRelative = _randomSource.getRandomNumber(seq._anims - 2) + 1;
+ activeSubAnim = seq._currRelative;
+ seq._current = _backAnimList[i].backAnims[activeSubAnim]._basaData._num;
+ }
+ setBackAnim(_backAnimList[i].backAnims[activeSubAnim]);
+ seq._counter = 0;
+ }
+ }
+ }
+
+ if (seq._type == 3) {
+ if (!seq._currRelative) {
+ if (seq._counter < seq._data2) {
+ continue;
+ } else {
+ setBackAnim(_backAnimList[i].backAnims[activeSubAnim]);
+ }
+ }
+ }
+
+ if (_backAnimList[i].backAnims[activeSubAnim]._frame == _backAnimList[i].backAnims[activeSubAnim]._lastFrame - 1) {
+ _backAnimList[i].backAnims[activeSubAnim]._frame = _backAnimList[i].backAnims[activeSubAnim]._loopFrame;
+ switch (seq._type) {
+ case 1:
+ if (seq._anims > 1) {
+ int rnd;
+ do {
+ rnd = _randomSource.getRandomNumber(seq._anims - 1);
+ } while (rnd == seq._currRelative);
+ seq._currRelative = rnd;
+ seq._current = _backAnimList[i].backAnims[rnd]._basaData._num;
+ activeSubAnim = rnd;
+ setBackAnim(_backAnimList[i].backAnims[activeSubAnim]);
+ seq._counter = 0;
+ }
+ break;
+ case 2:
+ if (seq._currRelative) {
+ seq._currRelative = 0;
+ seq._current = _backAnimList[i].backAnims[0]._basaData._num;
+ activeSubAnim = 0;
+ setBackAnim(_backAnimList[i].backAnims[activeSubAnim]);
+ seq._counter = 0;
+ }
+ break;
+ case 3:
+ seq._currRelative = 0;
+ seq._current = _backAnimList[i].backAnims[0]._basaData._num;
+ seq._counter = 0;
+ seq._data2 = _randomSource.getRandomNumber(seq._data - 1);
+ continue; // for bug in original game
+ break;
+ }
+ } else {
+ _backAnimList[i].backAnims[activeSubAnim]._frame++;
+ }
+ _backAnimList[i].backAnims[activeSubAnim]._showFrame = _backAnimList[i].backAnims[activeSubAnim]._frame;
+ showAnim(_backAnimList[i].backAnims[activeSubAnim]);
+ }
+ }
+ }
+ }
+}
+
+void PrinceEngine::removeSingleBackAnim(int slot) {
+ if (!_backAnimList[slot].backAnims.empty()) {
+ for (uint j = 0; j < _backAnimList[slot].backAnims.size(); j++) {
+ if (_backAnimList[slot].backAnims[j]._animData != nullptr) {
+ delete _backAnimList[slot].backAnims[j]._animData;
+ _backAnimList[slot].backAnims[j]._animData = nullptr;
+ }
+ if (_backAnimList[slot].backAnims[j]._shadowData != nullptr) {
+ delete _backAnimList[slot].backAnims[j]._shadowData;
+ _backAnimList[slot].backAnims[j]._shadowData = nullptr;
+ }
+ }
+ _backAnimList[slot].backAnims.clear();
+ _backAnimList[slot]._seq._currRelative = 0;
+ }
+}
+
+void PrinceEngine::clearBackAnimList() {
+ for (int i = 0; i < kMaxBackAnims; i++) {
+ removeSingleBackAnim(i);
+ }
+}
+
+void PrinceEngine::grabMap() {
+ _graph->_frontScreen->copyFrom(*_roomBmp->getSurface());
+ showObjects();
+ runDrawNodes();
+ _graph->_mapScreen->copyFrom(*_graph->_frontScreen);
+}
+
+void PrinceEngine::initZoomIn(int slot) {
+ freeZoomObject(slot);
+ Object *object = _objList[slot];
+ if (object != nullptr) {
+ Graphics::Surface *zoomSource = object->getSurface();
+ if (zoomSource != nullptr) {
+ object->_flags |= 0x8000;
+ object->_zoomSurface = new Graphics::Surface();
+ object->_zoomSurface->create(zoomSource->w, zoomSource->h, Graphics::PixelFormat::createFormatCLUT8());
+ object->_zoomSurface->fillRect(Common::Rect(zoomSource->w, zoomSource->h), 0xFF);
+ object->_zoomTime = 20;
+ }
+ }
+}
+
+void PrinceEngine::initZoomOut(int slot) {
+ freeZoomObject(slot);
+ Object *object = _objList[slot];
+ if (object != nullptr) {
+ Graphics::Surface *zoomSource = object->getSurface();
+ if (zoomSource != nullptr) {
+ object->_flags |= 0x4000;
+ object->_zoomSurface = new Graphics::Surface();
+ object->_zoomSurface->copyFrom(*zoomSource);
+ object->_zoomTime = 10;
+ }
+ }
+}
+
+void PrinceEngine::doZoomIn(int slot) {
+ Object *object = _objList[slot];
+ if (object != nullptr) {
+ Graphics::Surface *orgSurface = object->getSurface();
+ if (orgSurface != nullptr) {
+ byte *src1 = (byte *)orgSurface->getBasePtr(0, 0);
+ byte *dst1 = (byte *)object->_zoomSurface->getBasePtr(0, 0);
+ int x = 0;
+ int surfaceHeight = orgSurface->h;
+ for (int y = 0; y < surfaceHeight; y++) {
+ byte *src2 = src1;
+ byte *dst2 = dst1;
+ int w = orgSurface->w - x;
+ src2 += x;
+ dst2 += x;
+ while (w > 0) {
+ int randVal = _randomSource.getRandomNumber(zoomInStep - 1);
+ if (randVal < w) {
+ *(dst2 + randVal) = *(src2 + randVal);
+ src2 += zoomInStep;
+ dst2 += zoomInStep;
+ } else if (y + 1 != surfaceHeight) {
+ *(dst1 + orgSurface->pitch + randVal - w) = *(src1 + orgSurface->pitch + randVal - w);
+ }
+ w -= zoomInStep;
+ }
+ x = -1 * w;
+ src1 += orgSurface->pitch;
+ dst1 += orgSurface->pitch;
+ }
+ }
+ }
+}
+
+void PrinceEngine::doZoomOut(int slot) {
+ Object *object = _objList[slot];
+ if (object != nullptr) {
+ Graphics::Surface *orgSurface = object->getSurface();
+ if (orgSurface != nullptr) {
+ byte *dst1 = (byte *)object->_zoomSurface->getBasePtr(0, 0);
+ int x = 0;
+ int surfaceHeight = orgSurface->h;
+ for (int y = 0; y < surfaceHeight; y++) {
+ byte *dst2 = dst1;
+ int w = orgSurface->w - x;
+ dst2 += x;
+ while (w > 0) {
+ int randVal = _randomSource.getRandomNumber(zoomInStep - 1);
+ if (randVal < w) {
+ *(dst2 + randVal) = 255;
+ dst2 += zoomInStep;
+ } else if (y + 1 != surfaceHeight) {
+ *(dst1 + orgSurface->pitch + randVal - w) = 255;
+ }
+ w -= zoomInStep;
+ }
+ x = -1 * w;
+ dst1 += orgSurface->pitch;
+ }
+ }
+ }
+}
+
+void PrinceEngine::freeZoomObject(int slot) {
+ Object *object = _objList[slot];
+ if (object != nullptr) {
+ if (object->_zoomSurface != nullptr) {
+ object->_zoomSurface->free();
+ delete object->_zoomSurface;
+ object->_zoomSurface = nullptr;
+ }
+ }
+}
+
+void PrinceEngine::showObjects() {
+ for (int i = 0; i < kMaxObjects; i++) {
+ int nr = _objSlot[i];
+ if (nr != 0xFF) {
+ Graphics::Surface *objSurface = nullptr;
+ if ((_objList[nr]->_flags & 0x8000)) {
+ _objList[nr]->_zoomTime--;
+ if (!_objList[nr]->_zoomTime) {
+ freeZoomObject(nr);
+ _objList[nr]->_flags &= 0x7FFF;
+ objSurface = _objList[nr]->getSurface();
+ } else {
+ doZoomIn(nr);
+ objSurface = _objList[nr]->_zoomSurface;
+ }
+ } else if ((_objList[nr]->_flags & 0x4000)) {
+ _objList[nr]->_zoomTime--;
+ if (!_objList[nr]->_zoomTime) {
+ freeZoomObject(nr);
+ _objList[nr]->_flags &= 0xBFFF;
+ objSurface = _objList[nr]->getSurface();
+ } else {
+ doZoomOut(nr);
+ objSurface = _objList[nr]->_zoomSurface;
+ }
+ } else {
+ objSurface = _objList[nr]->getSurface();
+ }
+
+ if (objSurface != nullptr) {
+ if (spriteCheck(objSurface->w, objSurface->h, _objList[nr]->_x, _objList[nr]->_y)) {
+ int destX = _objList[nr]->_x - _picWindowX;
+ int destY = _objList[nr]->_y - _picWindowY;
+ DrawNode newDrawNode;
+ newDrawNode.posX = destX;
+ newDrawNode.posY = destY;
+ newDrawNode.posZ = _objList[nr]->_z;
+ newDrawNode.width = 0;
+ newDrawNode.height = 0;
+ newDrawNode.s = objSurface;
+ newDrawNode.originalRoomSurface = nullptr;
+ if ((_objList[nr]->_flags & 0x2000)) {
+ newDrawNode.data = nullptr;
+ newDrawNode.drawFunction = &_graph->drawBackSpriteDrawNode;
+ } else {
+ newDrawNode.data = _transTable;
+ if (_flags->getFlagValue(Flags::NOANTIALIAS)) {
+ newDrawNode.drawFunction = &_graph->drawTransparentDrawNode;
+ } else {
+ newDrawNode.drawFunction = &_graph->drawTransparentWithTransDrawNode;
+ }
+ }
+ _drawNodeList.push_back(newDrawNode);
+ }
+
+ if ((_objList[nr]->_flags & 1)) {
+ checkMasks(_objList[nr]->_x, _objList[nr]->_y, objSurface->w, objSurface->h, _objList[nr]->_z);
+ }
+ }
+ }
+ }
+}
+
+void PrinceEngine::showParallax() {
+ if (!_pscrList.empty()) {
+ for (uint i = 0; i < _pscrList.size(); i++) {
+ Graphics::Surface *pscrSurface = _pscrList[i]->getSurface();
+ if (pscrSurface != nullptr) {
+ int x = _pscrList[i]->_x - (_pscrList[i]->_step * _picWindowX / 4);
+ int y = _pscrList[i]->_y;
+ int z = PScr::kPScrZ;
+ if (spriteCheck(pscrSurface->w, pscrSurface->h, x, y)) {
+ showSprite(pscrSurface, x, y, z);
+ }
+ }
+ }
+ }
+}
+
+bool PrinceEngine::compareDrawNodes(DrawNode d1, DrawNode d2) {
+ if (d1.posZ < d2.posZ) {
+ return true;
+ }
+ return false;
+}
+
+void PrinceEngine::runDrawNodes() {
+ Common::sort(_drawNodeList.begin(), _drawNodeList.end(), compareDrawNodes);
+
+ for (uint i = 0; i < _drawNodeList.size(); i++) {
+ (*_drawNodeList[i].drawFunction)(_graph->_frontScreen, &_drawNodeList[i]);
+ }
+ _graph->change();
+}
+
+void PrinceEngine::drawScreen() {
+ if (!_showInventoryFlag || _inventoryBackgroundRemember) {
+ clsMasks();
+
+ _mainHero->showHero();
+ _mainHero->scrollHero();
+ _mainHero->drawHero();
+
+ _secondHero->showHero();
+ _secondHero->_drawX -= _picWindowX;
+ _secondHero->drawHero();
+
+ const Graphics::Surface *roomSurface;
+ if (_locationNr != 50) {
+ roomSurface = _roomBmp->getSurface();
+ } else {
+ roomSurface = _graph->_mapScreen;
+ }
+ Graphics::Surface visiblePart;
+ if (roomSurface) {
+ visiblePart = roomSurface->getSubArea(Common::Rect(_picWindowX, 0, roomSurface->w, roomSurface->h));
+ _graph->draw(_graph->_frontScreen, &visiblePart);
+ }
+
+ showBackAnims();
+
+ showNormAnims();
+
+ playNextFLCFrame();
+
+ showObjects();
+
+ if (roomSurface) {
+ insertMasks(&visiblePart);
+ }
+
+ showParallax();
+
+ runDrawNodes();
+
+ _drawNodeList.clear();
+
+ if (!_inventoryBackgroundRemember && !_dialogFlag) {
+ if (!_optionsFlag) {
+ _selectedMob = checkMob(_graph->_frontScreen, _mobList, true);
+ }
+ showTexts(_graph->_frontScreen);
+ checkOptions();
+ } else {
+ _inventoryBackgroundRemember = false;
+ }
+
+ showPower();
+
+ getDebugger()->onFrame();
+
+ } else {
+ displayInventory();
+ }
+}
+
+void PrinceEngine::blackPalette() {
+ byte *paletteBackup = (byte *)malloc(256 * 3);
+ byte *blackPalette1 = (byte *)malloc(256 * 3);
+
+ int fadeStep = kFadeStep - 1;
+ for (int i = 0; i < kFadeStep; i++) {
+ _system->getPaletteManager()->grabPalette(paletteBackup, 0, 256);
+ for (int j = 0; j < 256; j++) {
+ blackPalette1[3 * j] = paletteBackup[3 * j] * fadeStep / 4;
+ blackPalette1[3 * j + 1] = paletteBackup[3 * j + 1] * fadeStep / 4;
+ blackPalette1[3 * j + 2] = paletteBackup[3 * j + 2] * fadeStep / 4;
+ }
+ fadeStep--;
+ _graph->setPalette(blackPalette1);
+ _system->updateScreen();
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ eventMan->pollEvent(event);
+ if (shouldQuit()) {
+ free(paletteBackup);
+ free(blackPalette1);
+ return;
+ }
+ pause();
+ }
+ free(paletteBackup);
+ free(blackPalette1);
+}
+
+void PrinceEngine::setPalette(const byte *palette) {
+ if (palette != nullptr) {
+ byte *blackPalette_ = (byte *)malloc(256 * 3);
+ int fadeStep = 0;
+ for (int i = 0; i <= kFadeStep; i++) {
+ for (int j = 0; j < 256; j++) {
+ blackPalette_[3 * j] = palette[3 * j] * fadeStep / 4;
+ blackPalette_[3 * j + 1] = palette[3 * j + 1] * fadeStep / 4;
+ blackPalette_[3 * j + 2] = palette[3 * j + 2] * fadeStep / 4;
+ }
+ fadeStep++;
+ _graph->setPalette(blackPalette_);
+ _system->updateScreen();
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ eventMan->pollEvent(event);
+ if (shouldQuit()) {
+ _graph->setPalette(palette);
+ free(blackPalette_);
+ return;
+ }
+ pause();
+ }
+ _graph->setPalette(palette);
+ free(blackPalette_);
+ }
+}
+
+void PrinceEngine::pause() {
+ int delay = 1000 / kFPS - int32(_system->getMillis() - _currentTime);
+ delay = delay < 0 ? 0 : delay;
+ _system->delayMillis(delay);
+ _currentTime = _system->getMillis();
+}
+
+void PrinceEngine::pause2() {
+ int delay = 1000 / (kFPS * 2) - int32(_system->getMillis() - _currentTime);
+ delay = delay < 0 ? 0 : delay;
+ _system->delayMillis(delay);
+ _currentTime = _system->getMillis();
+}
+
+void PrinceEngine::addInv(int heroId, int item, bool addItemQuiet) {
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _mainHero;
+ } else if (heroId == 1) {
+ hero = _secondHero;
+ }
+ if (hero != nullptr) {
+ if (hero->_inventory.size() < kMaxItems) {
+ if (item != 0x7FFF) {
+ hero->_inventory.push_back(item);
+ }
+ if (!addItemQuiet) {
+ addInvObj();
+ }
+ _interpreter->setResult(0);
+ } else {
+ _interpreter->setResult(1);
+ }
+ }
+}
+
+void PrinceEngine::remInv(int heroId, int item) {
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _mainHero;
+ } else if (heroId == 1) {
+ hero = _secondHero;
+ }
+ if (hero != nullptr) {
+ for (uint i = 0; i < hero->_inventory.size(); i++) {
+ if (hero->_inventory[i] == item) {
+ hero->_inventory.remove_at(i);
+ _interpreter->setResult(0);
+ return;
+ }
+ }
+ }
+ _interpreter->setResult(1);
+}
+
+void PrinceEngine::clearInv(int heroId) {
+ switch (heroId) {
+ case 0:
+ _mainHero->_inventory.clear();
+ break;
+ case 1:
+ _secondHero->_inventory.clear();
+ break;
+ default:
+ error("clearInv() - wrong hero slot");
+ break;
+ }
+}
+
+void PrinceEngine::swapInv(int heroId) {
+ Common::Array<int> tempInv;
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _mainHero;
+ } else if (heroId == 1) {
+ hero = _secondHero;
+ }
+ if (hero != nullptr) {
+ for (uint i = 0; i < hero->_inventory.size(); i++) {
+ tempInv.push_back(hero->_inventory[i]);
+ }
+ hero->_inventory.clear();
+ for (uint i = 0; i < hero->_inventory2.size(); i++) {
+ hero->_inventory.push_back(hero->_inventory2[i]);
+ }
+ hero->_inventory2.clear();
+ for (uint i = 0; i < tempInv.size(); i++) {
+ hero->_inventory2.push_back(tempInv[i]);
+ }
+ tempInv.clear();
+ }
+}
+
+void PrinceEngine::addInvObj() {
+ changeCursor(0);
+ prepareInventoryToView();
+
+ _inventoryBackgroundRemember = true;
+ drawScreen();
+
+ Graphics::Surface *suitcase = _suitcaseBmp->getSurface();
+
+ if (!_flags->getFlagValue(Flags::CURSEBLINK)) {
+
+ loadSample(27, "PRZEDMIO.WAV");
+ playSample(27, 0);
+
+ _mst_shadow2 = 1;
+
+ while (_mst_shadow2 < 512) {
+ rememberScreenInv();
+ _graph->drawTransparentSurface(_graph->_screenForInventory, 0, 0, suitcase);
+ drawInvItems();
+ _graph->update(_graph->_screenForInventory);
+ _mst_shadow2 += 50;
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ eventMan->pollEvent(event);
+ if (shouldQuit()) {
+ return;
+ }
+ pause();
+ }
+ while (_mst_shadow2 > 256) {
+ rememberScreenInv();
+ _graph->drawTransparentSurface(_graph->_screenForInventory, 0, 0, suitcase);
+ drawInvItems();
+ _graph->update(_graph->_screenForInventory);
+ _mst_shadow2 -= 42;
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ eventMan->pollEvent(event);
+ if (shouldQuit()) {
+ return;
+ }
+ pause();
+ }
+ } else {
+ //CURSEBLINK:
+ for (int i = 0; i < 3; i++) {
+ _mst_shadow2 = 256;
+ while (_mst_shadow2 < 512) {
+ rememberScreenInv();
+ _graph->drawTransparentSurface(_graph->_screenForInventory, 0, 0, suitcase);
+ drawInvItems();
+ _graph->update(_graph->_screenForInventory);
+ _mst_shadow2 += 50;
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ eventMan->pollEvent(event);
+ if (shouldQuit()) {
+ return;
+ }
+ pause();
+ }
+ while (_mst_shadow2 > 256) {
+ rememberScreenInv();
+ _graph->drawTransparentSurface(_graph->_screenForInventory, 0, 0, suitcase);
+ drawInvItems();
+ _graph->update(_graph->_screenForInventory);
+ _mst_shadow2 -= 50;
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ eventMan->pollEvent(event);
+ if (shouldQuit()) {
+ return;
+ }
+ pause();
+ }
+ }
+ }
+ _mst_shadow2 = 0;
+ for (int i = 0; i < 20; i++) {
+ rememberScreenInv();
+ _graph->drawTransparentSurface(_graph->_screenForInventory, 0, 0, suitcase);
+ drawInvItems();
+ _graph->update(_graph->_screenForInventory);
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ eventMan->pollEvent(event);
+ if (shouldQuit()) {
+ return;
+ }
+ pause();
+ }
+}
+
+void PrinceEngine::rememberScreenInv() {
+ _graph->_screenForInventory->copyFrom(*_graph->_frontScreen);
+}
+
+void PrinceEngine::inventoryFlagChange(bool inventoryState) {
+ if (inventoryState) {
+ _showInventoryFlag = true;
+ _inventoryBackgroundRemember = true;
+ } else {
+ _showInventoryFlag = false;
+ }
+}
+
+void PrinceEngine::prepareInventoryToView() {
+ _invMobList.clear();
+ int invItem = _mainHero->_inventory.size();
+ _invLine = invItem / 3;
+ if (invItem % 3) {
+ _invLine++;
+ }
+ if (_invLine < 4) {
+ _invLine = 4;
+ }
+ _maxInvW = (374 - 2 * _invLine) / _invLine;
+ _invLineW = _maxInvW - 2;
+
+ int currInvX = _invLineX;
+ int currInvY = _invLineY;
+
+ Common::MemoryReadStream stream(_invTxt, _invTxtSize);
+ byte c;
+
+ uint item = 0;
+ for (int i = 0; i < _invLines; i++) {
+ for (int j = 0; j < _invLine; j++) {
+ Mob tempMobItem;
+ if (item < _mainHero->_inventory.size()) {
+ int itemNr = _mainHero->_inventory[item];
+ tempMobItem._visible = 0;
+ tempMobItem._mask = itemNr;
+ tempMobItem._rect = Common::Rect(currInvX + _picWindowX, currInvY, currInvX + _picWindowX + _invLineW - 1, currInvY + _invLineH - 1);
+ tempMobItem._type = 0; // to work with checkMob()
+
+ tempMobItem._name = "";
+ tempMobItem._examText = "";
+ int txtOffset = READ_LE_UINT32(&_invTxt[itemNr * 8]);
+ int examTxtOffset = READ_LE_UINT32(&_invTxt[itemNr * 8 + 4]);
+
+ stream.seek(txtOffset);
+ while ((c = stream.readByte())) {
+ tempMobItem._name += c;
+ }
+
+ stream.seek(examTxtOffset);
+ while ((c = stream.readByte())) {
+ tempMobItem._examText += c;
+ }
+ _invMobList.push_back(tempMobItem);
+ }
+ currInvX += _invLineW + _invLineSkipX;
+ item++;
+ }
+ currInvX = _invLineX;
+ currInvY += _invLineSkipY + _invLineH;
+ }
+}
+
+void PrinceEngine::drawInvItems() {
+ int currInvX = _invLineX;
+ int currInvY = _invLineY;
+ uint item = 0;
+ for (int i = 0; i < _invLines; i++) {
+ for (int j = 0; j < _invLine; j++) {
+ if (item < _mainHero->_inventory.size()) {
+ int itemNr = _mainHero->_inventory[item];
+ _mst_shadow = 0;
+ if (_mst_shadow2) {
+ if (!_flags->getFlagValue(Flags::CURSEBLINK)) {
+ if (item + 1 == _mainHero->_inventory.size()) { // last item in inventory
+ _mst_shadow = 1;
+ }
+ } else if (itemNr == 1 || itemNr == 3 || itemNr == 4 || itemNr == 7) {
+ _mst_shadow = 1;
+ }
+ }
+
+ int drawX = currInvX;
+ int drawY = currInvY;
+ Graphics::Surface *itemSurface = nullptr;
+ if (itemNr != 68) {
+ itemSurface = _allInvList[itemNr].getSurface();
+ if (itemSurface->h < _maxInvH) {
+ drawY += (_maxInvH - itemSurface->h) / 2;
+ }
+ } else {
+ // candle item:
+ if (_candleCounter == 8) {
+ _candleCounter = 0;
+ }
+ itemNr = _candleCounter;
+ _candleCounter++;
+ itemNr &= 7;
+ itemNr += 71;
+ itemSurface = _allInvList[itemNr].getSurface();
+ drawY += _allInvList[itemNr]._y + (_maxInvH - 76) / 2 - 200;
+ }
+ if (itemSurface->w < _maxInvW) {
+ drawX += (_maxInvW - itemSurface->w) / 2;
+ }
+ if (!_mst_shadow) {
+ _graph->drawTransparentSurface(_graph->_screenForInventory, drawX, drawY, itemSurface);
+ } else {
+ _mst_shadow = _mst_shadow2;
+ _graph->drawTransparentWithBlendSurface(_graph->_screenForInventory, drawX, drawY, itemSurface);
+ }
+ }
+ currInvX += _invLineW + _invLineSkipX;
+ item++;
+ }
+ currInvX = _invLineX;
+ currInvY += _invLineSkipY + _invLineH;
+ }
+}
+
+void PrinceEngine::walkTo() {
+ if (_mainHero->_visible) {
+ _mainHero->freeHeroAnim();
+ _mainHero->freeOldMove();
+ _interpreter->storeNewPC(_script->_scriptInfo.usdCode);
+ int destX, destY;
+ if (_optionsMob != -1) {
+ destX = _mobList[_optionsMob]._examPosition.x;
+ destY = _mobList[_optionsMob]._examPosition.y;
+ _mainHero->_destDirection = _mobList[_optionsMob]._examDirection;
+ } else {
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ destX = mousePos.x + _picWindowX;
+ destY = mousePos.y + _picWindowY;
+ _mainHero->_destDirection = 0;
+ }
+ _mainHero->_coords = makePath(kMainHero, _mainHero->_middleX, _mainHero->_middleY, destX, destY);
+ if (_mainHero->_coords != nullptr) {
+ _mainHero->_currCoords = _mainHero->_coords;
+ _mainHero->_dirTab = _directionTable;
+ _mainHero->_currDirTab = _directionTable;
+ _directionTable = nullptr;
+ _mainHero->_state = Hero::kHeroStateMove;
+ moveShandria();
+ }
+ }
+}
+
+void PrinceEngine::moveRunHero(int heroId, int x, int y, int dir, bool runHeroFlag) {
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _mainHero;
+ } else if (heroId == 1) {
+ hero = _secondHero;
+ }
+
+ if (hero != nullptr) {
+ if (dir) {
+ hero->_destDirection = dir;
+ }
+ if (x || y) {
+ hero->freeOldMove();
+ hero->_coords = makePath(heroId, hero->_middleX, hero->_middleY, x, y);
+ if (hero->_coords != nullptr) {
+ hero->_currCoords = hero->_coords;
+ hero->_dirTab = _directionTable;
+ hero->_currDirTab = _directionTable;
+ _directionTable = nullptr;
+ if (runHeroFlag) {
+ hero->_state = Hero::kHeroStateRun;
+ } else {
+ hero->_state = Hero::kHeroStateMove;
+ }
+ if (heroId == kMainHero && _mouseFlag) {
+ moveShandria();
+ }
+ }
+ } else {
+ hero->freeOldMove();
+ hero->_state = Hero::kHeroStateTurn;
+ }
+ hero->freeHeroAnim();
+ hero->_visible = 1;
+ }
+}
+
+void PrinceEngine::leftMouseButton() {
+ _flags->setFlagValue(Flags::LMOUSE, 1);
+ if (_flags->getFlagValue(Flags::POWERENABLED)) {
+ _flags->setFlagValue(Flags::MBFLAG, 1);
+ }
+ if (_mouseFlag) {
+ int option = 0;
+ int optionEvent = -1;
+
+ if (_optionsFlag) {
+ if (_optionEnabled < _optionsNumber && _optionEnabled != -1) {
+ option = _optionEnabled;
+ _optionsFlag = 0;
+ } else {
+ return;
+ }
+ } else {
+ _optionsMob = _selectedMob;
+ if (_optionsMob == -1) {
+ walkTo();
+ return;
+ }
+ option = 0;
+ }
+ //do_option
+ if (_currentPointerNumber != 2) {
+ //skip_use_code
+ int optionScriptOffset = _room->getOptionOffset(option);
+ if (optionScriptOffset != 0) {
+ optionEvent = _script->scanMobEvents(_optionsMob, optionScriptOffset);
+ }
+ if (optionEvent == -1) {
+ if (!option) {
+ walkTo();
+ return;
+ } else {
+ optionEvent = _script->getOptionStandardOffset(option);
+ }
+ }
+ } else if (_selectedMode) {
+ //give_item
+ if (_room->_itemGive) {
+ optionEvent = _script->scanMobEventsWithItem(_optionsMob, _room->_itemGive, _selectedItem);
+ }
+ if (optionEvent == -1) {
+ //standard_giveitem
+ optionEvent = _script->_scriptInfo.stdGiveItem;
+ }
+ } else {
+ if (_room->_itemUse) {
+ optionEvent = _script->scanMobEventsWithItem(_optionsMob, _room->_itemUse, _selectedItem);
+ _flags->setFlagValue(Flags::SELITEM, _selectedItem);
+ }
+ if (optionEvent == -1) {
+ //standard_useitem
+ optionEvent = _script->_scriptInfo.stdUseItem;
+ }
+ }
+ _interpreter->storeNewPC(optionEvent);
+ _flags->setFlagValue(Flags::CURRMOB, _selectedMob);
+ _selectedMob = -1;
+ _optionsMob = -1;
+ } else {
+ if (!_flags->getFlagValue(Flags::POWERENABLED)) {
+ if (!_flags->getFlagValue(Flags::NOCLSTEXT)) {
+ for (int slot = 0; slot < kMaxTexts; slot++) {
+ if (slot != 9) {
+ Text& text = _textSlots[slot];
+ if (!text._str) {
+ continue;
+ }
+ text._str = 0;
+ text._time = 0;
+ }
+ }
+ _mainHero->_talkTime = 0;
+ _secondHero->_talkTime = 0;
+ }
+ }
+ }
+}
+
+void PrinceEngine::rightMouseButton() {
+ if (_flags->getFlagValue(Flags::POWERENABLED)) {
+ _flags->setFlagValue(Flags::MBFLAG, 2);
+ }
+ if (_mouseFlag && _mouseFlag != 3) {
+ _mainHero->freeOldMove();
+ _secondHero->freeOldMove();
+ _interpreter->storeNewPC(0);
+ if (_currentPointerNumber < 2) {
+ enableOptions(true);
+ } else {
+ _currentPointerNumber = 1;
+ changeCursor(1);
+ }
+ }
+}
+
+void PrinceEngine::inventoryLeftMouseButton() {
+ if (!_mouseFlag) {
+ _textSlots[0]._time = 0;
+ _textSlots[0]._str = nullptr;
+ stopSample(28);
+ }
+
+ if (_optionsFlag == 1) {
+ if (_selectedMob != -1) {
+ if (_optionEnabled < _invOptionsNumber) {
+ _optionsFlag = 0;
+ } else {
+ return;
+ }
+ } else {
+ error("PrinceEngine::inventoryLeftMouseButton() - optionsFlag = 1, selectedMob = 0");
+ if (_currentPointerNumber == 2) {
+ changeCursor(1);
+ _currentPointerNumber = 1;
+ _selectedMob = -1;
+ _optionsMob = -1;
+ return;
+ } else {
+ return;
+ }
+ }
+ } else {
+ if (_selectedMob != -1) {
+ if (_currentPointerNumber != 2) {
+ if (_invMobList[_selectedMob]._mask != 29) {
+ _optionEnabled = 0;
+ } else {
+ // map item
+ _optionEnabled = 1;
+ }
+ } else {
+ //use_item_on_item
+ int invObjUU = _script->scanMobEventsWithItem(_invMobList[_selectedMob]._mask, _script->_scriptInfo.invObjUU, _selectedItem);
+ if (invObjUU == -1) {
+ int textNr = 80011; // "I can't do it."
+ if (_selectedItem == 31 || _invMobList[_selectedMob]._mask == 31) {
+ textNr = 80020; // "Nothing is happening."
+ }
+ _interpreter->setCurrentString(textNr);
+ printAt(0, 216, (char *)_variaTxt->getString(textNr - 80000), kNormalWidth / 2, 100);
+ setVoice(0, 28, 1);
+ playSample(28, 0);
+ _selectedMob = -1;
+ _optionsMob = -1;
+ return;
+ } else {
+ _interpreter->storeNewPC(invObjUU);
+ _flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob]._mask);
+ _showInventoryFlag = false;
+ }
+ }
+ } else {
+ return;
+ }
+ }
+ //do_option
+ if (_optionEnabled == 0) {
+ int invObjExamEvent = _script->scanMobEvents(_invMobList[_selectedMob]._mask, _script->_scriptInfo.invObjExam);
+ if (invObjExamEvent == -1) {
+ // do_standard
+ printAt(0, 216, (char *)_invMobList[_selectedMob]._examText.c_str(), kNormalWidth / 2, _invExamY);
+ _interpreter->setCurrentString(_invMobList[_selectedMob]._mask + 70000);
+ setVoice(0, 28, 1);
+ playSample(28, 0);
+ // disableuseuse
+ changeCursor(0);
+ _currentPointerNumber = 1;
+ } else {
+ _interpreter->storeNewPC(invObjExamEvent);
+ _flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob]._mask);
+ _showInventoryFlag = false;
+ }
+ } else if (_optionEnabled == 1) {
+ // not_examine
+ int invObjUse = _script->scanMobEvents(_invMobList[_selectedMob]._mask, _script->_scriptInfo.invObjUse);
+ if (invObjUse == -1) {
+ // do_standard_use
+ _selectedMode = 0;
+ _selectedItem = _invMobList[_selectedMob]._mask;
+ makeInvCursor(_invMobList[_selectedMob]._mask);
+ _currentPointerNumber = 2;
+ changeCursor(2);
+ } else {
+ _interpreter->storeNewPC(invObjUse);
+ _flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob]._mask);
+ _showInventoryFlag = false;
+ }
+ } else if (_optionEnabled == 4) {
+ // do_standard_give
+ _selectedMode = 1;
+ _selectedItem = _invMobList[_selectedMob]._mask;
+ makeInvCursor(_invMobList[_selectedMob]._mask);
+ _currentPointerNumber = 2;
+ changeCursor(2);
+ } else {
+ // use_item_on_item
+ int invObjUU = _script->scanMobEventsWithItem(_invMobList[_selectedMob]._mask, _script->_scriptInfo.invObjUU, _selectedItem);
+ if (invObjUU == -1) {
+ int textNr = 80011; // "I can't do it."
+ if (_selectedItem == 31 || _invMobList[_selectedMob]._mask == 31) {
+ textNr = 80020; // "Nothing is happening."
+ }
+ _interpreter->setCurrentString(textNr);
+ printAt(0, 216, (char *)_variaTxt->getString(textNr - 80000), kNormalWidth / 2, 100);
+ setVoice(0, 28, 1);
+ playSample(28, 0);
+ } else {
+ _interpreter->storeNewPC(invObjUU);
+ _flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob]._mask);
+ _showInventoryFlag = false;
+ }
+ }
+ _selectedMob = -1;
+ _optionsMob = -1;
+}
+
+void PrinceEngine::inventoryRightMouseButton() {
+ if (_textSlots[0]._str == nullptr) {
+ enableOptions(false);
+ }
+}
+
+void PrinceEngine::enableOptions(bool checkType) {
+ if (_optionsFlag != 1) {
+ changeCursor(1);
+ _currentPointerNumber = 1;
+ if (_selectedMob != -1) {
+ if (checkType) {
+ if (_mobList[_selectedMob]._type & 0x100) {
+ return;
+ }
+ }
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ int x1 = mousePos.x - _optionsWidth / 2;
+ int x2 = mousePos.x + _optionsWidth / 2;
+ if (x1 < 0) {
+ x1 = 0;
+ x2 = _optionsWidth;
+ } else if (x2 >= kNormalWidth) {
+ x1 = kNormalWidth - _optionsWidth;
+ x2 = kNormalWidth;
+ }
+ int y1 = mousePos.y - 10;
+ if (y1 < 0) {
+ y1 = 0;
+ }
+ if (y1 + _optionsHeight >= kNormalHeight) {
+ y1 = kNormalHeight - _optionsHeight;
+ }
+ _optionsMob = _selectedMob;
+ _optionsX = x1;
+ _optionsY = y1;
+ _optionsFlag = 1;
+ }
+ }
+}
+
+void PrinceEngine::checkOptions() {
+ if (_optionsFlag) {
+ Common::Rect optionsRect(_optionsX, _optionsY, _optionsX + _optionsWidth, _optionsY + _optionsHeight);
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ if (!optionsRect.contains(mousePos)) {
+ _optionsFlag = 0;
+ _selectedMob = -1;
+ return;
+ }
+ _graph->drawAsShadowSurface(_graph->_frontScreen, _optionsX, _optionsY, _optionsPic, _graph->_shadowTable50);
+
+ _optionEnabled = -1;
+ int optionsYCord = mousePos.y - (_optionsY + 16);
+ if (optionsYCord >= 0) {
+ int selectedOptionNr = optionsYCord / _optionsStep;
+ if (selectedOptionNr < _optionsNumber) {
+ _optionEnabled = selectedOptionNr;
+ }
+ }
+ int optionsColor;
+ int textY = _optionsY + 16;
+ for (int i = 0; i < _optionsNumber; i++) {
+ if (i != _optionEnabled) {
+ optionsColor = _optionsColor1;
+ } else {
+ optionsColor = _optionsColor2;
+ }
+ Common::String optText;
+ switch(getLanguage()) {
+ case Common::PL_POL:
+ optText = optionsTextPL[i];
+ break;
+ case Common::DE_DEU:
+ optText = optionsTextDE[i];
+ break;
+ case Common::EN_ANY:
+ optText = optionsTextEN[i];
+ break;
+ default:
+ break;
+ };
+ uint16 textW = getTextWidth(optText.c_str());
+ uint16 textX = _optionsX + _optionsWidth / 2 - textW / 2;
+ _font->drawString(_graph->_frontScreen, optText, textX, textY, textW, optionsColor);
+ textY += _optionsStep;
+ }
+ }
+}
+
+void PrinceEngine::checkInvOptions() {
+ if (_optionsFlag) {
+ Common::Rect optionsRect(_optionsX, _optionsY, _optionsX + _invOptionsWidth, _optionsY + _invOptionsHeight);
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ if (!optionsRect.contains(mousePos)) {
+ _optionsFlag = 0;
+ _selectedMob = -1;
+ return;
+ }
+ _graph->drawAsShadowSurface(_graph->_screenForInventory, _optionsX, _optionsY, _optionsPicInInventory, _graph->_shadowTable50);
+
+ _optionEnabled = -1;
+ int optionsYCord = mousePos.y - (_optionsY + 16);
+ if (optionsYCord >= 0) {
+ int selectedOptionNr = optionsYCord / _invOptionsStep;
+ if (selectedOptionNr < _invOptionsNumber) {
+ _optionEnabled = selectedOptionNr;
+ }
+ }
+ int optionsColor;
+ int textY = _optionsY + 16;
+ for (int i = 0; i < _invOptionsNumber; i++) {
+ if (i != _optionEnabled) {
+ optionsColor = _optionsColor1;
+ } else {
+ optionsColor = _optionsColor2;
+ }
+ Common::String invText;
+ switch(getLanguage()) {
+ case Common::PL_POL:
+ invText = invOptionsTextPL[i];
+ break;
+ case Common::DE_DEU:
+ invText = invOptionsTextDE[i];
+ break;
+ case Common::EN_ANY:
+ invText = invOptionsTextEN[i];
+ break;
+ default:
+ error("Unknown game language %d", getLanguage());
+ break;
+ };
+ uint16 textW = getTextWidth(invText.c_str());
+ uint16 textX = _optionsX + _invOptionsWidth / 2 - textW / 2;
+ _font->drawString(_graph->_screenForInventory, invText, textX, textY, _graph->_screenForInventory->w, optionsColor);
+ textY += _invOptionsStep;
+ }
+ }
+}
+
+void PrinceEngine::displayInventory() {
+
+ _mainHero->freeOldMove();
+ _secondHero->freeOldMove();
+
+ _interpreter->setFgOpcodePC(0);
+
+ stopAllSamples();
+
+ prepareInventoryToView();
+
+ while (!shouldQuit()) {
+
+ if (_textSlots[0]._str != nullptr) {
+ changeCursor(0);
+ } else {
+ changeCursor(_currentPointerNumber);
+
+ Common::Rect inventoryRect(_invX1, _invY1, _invX1 + _invWidth, _invY1 + _invHeight);
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+
+ if (!_invCurInside && inventoryRect.contains(mousePos)) {
+ _invCurInside = true;
+ }
+
+ if (_invCurInside && !inventoryRect.contains(mousePos)) {
+ inventoryFlagChange(false);
+ _invCurInside = false;
+ break;
+ }
+ }
+
+ rememberScreenInv();
+
+ Graphics::Surface *suitcase = _suitcaseBmp->getSurface();
+ _graph->drawTransparentSurface(_graph->_screenForInventory, 0, 0, suitcase);
+
+ drawInvItems();
+
+ showTexts(_graph->_screenForInventory);
+
+ if (!_optionsFlag && _textSlots[0]._str == nullptr) {
+ _selectedMob = checkMob(_graph->_screenForInventory, _invMobList, false);
+ }
+
+ checkInvOptions();
+
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ keyHandler(event);
+ break;
+ case Common::EVENT_LBUTTONDOWN:
+ inventoryLeftMouseButton();
+ break;
+ case Common::EVENT_RBUTTONDOWN:
+ inventoryRightMouseButton();
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!_showInventoryFlag) {
+ break;
+ }
+
+ if (shouldQuit())
+ return;
+
+ getDebugger()->onFrame();
+ _graph->update(_graph->_screenForInventory);
+ pause();
+ }
+
+ if (_currentPointerNumber == 2) {
+ _flags->setFlagValue(Flags::SELITEM, _selectedItem);
+ } else {
+ _flags->setFlagValue(Flags::SELITEM, 0);
+ }
+}
+
+void PrinceEngine::createDialogBox(int dialogBoxNr) {
+ _dialogLines = 0;
+ int amountOfDialogOptions = 0;
+ int dialogDataValue = (int)READ_LE_UINT32(_dialogData);
+
+ byte c;
+ int sentenceNumber;
+ _dialogText = _dialogBoxAddr[dialogBoxNr];
+ byte *dialogText = _dialogText;
+
+ while ((sentenceNumber = *dialogText) != 0xFF) {
+ dialogText++;
+ if (!(dialogDataValue & (1 << sentenceNumber))) {
+ _dialogLines += calcTextLines((const char *)dialogText);
+ amountOfDialogOptions++;
+ }
+ do {
+ c = *dialogText;
+ dialogText++;
+ } while (c);
+ }
+
+ _dialogHeight = _font->getFontHeight() * _dialogLines + _dialogLineSpace * (amountOfDialogOptions + 1);
+ _dialogImage = new Graphics::Surface();
+ _dialogImage->create(_dialogWidth, _dialogHeight, Graphics::PixelFormat::createFormatCLUT8());
+ Common::Rect dBoxRect(0, 0, _dialogWidth, _dialogHeight);
+ _dialogImage->fillRect(dBoxRect, _graph->kShadowColor);
+}
+
+void PrinceEngine::dialogRun() {
+
+ _dialogFlag = true;
+
+ while (!shouldQuit()) {
+
+ _interpreter->stepBg();
+ drawScreen();
+
+ int dialogX = (640 - _dialogWidth) / 2;
+ int dialogY = 460 - _dialogHeight;
+ _graph->drawAsShadowSurface(_graph->_frontScreen, dialogX, dialogY, _dialogImage, _graph->_shadowTable50);
+
+ int dialogSkipLeft = 14;
+ int dialogSkipUp = 10;
+
+ int dialogTextX = dialogX + dialogSkipLeft;
+ int dialogTextY = dialogY + dialogSkipUp;
+
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+
+ byte c;
+ int sentenceNumber;
+ byte *dialogText = _dialogText;
+ byte *dialogCurrentText = nullptr;
+ int dialogSelected = -1;
+ int dialogDataValue = (int)READ_LE_UINT32(_dialogData);
+
+ while ((sentenceNumber = *dialogText) != 0xFF) {
+ dialogText++;
+ int actualColor = _dialogColor1;
+
+ if (!(dialogDataValue & (1 << sentenceNumber))) {
+ if (getLanguage() == Common::DE_DEU) {
+ correctStringDEU((char *)dialogText);
+ }
+ Common::Array<Common::String> lines;
+ _font->wordWrapText((const char *)dialogText, _graph->_frontScreen->w, lines);
+
+ Common::Rect dialogOption(dialogTextX, dialogTextY - dialogSkipUp / 2, dialogX + _dialogWidth - dialogSkipLeft, dialogTextY + lines.size() * _font->getFontHeight() + dialogSkipUp / 2 - 1);
+ if (dialogOption.contains(mousePos)) {
+ actualColor = _dialogColor2;
+ dialogSelected = sentenceNumber;
+ dialogCurrentText = dialogText;
+ }
+
+ for (uint j = 0; j < lines.size(); j++) {
+ _font->drawString(_graph->_frontScreen, lines[j], dialogTextX, dialogTextY, _graph->_frontScreen->w, actualColor);
+ dialogTextY += _font->getFontHeight();
+ }
+ dialogTextY += _dialogLineSpace;
+ }
+ do {
+ c = *dialogText;
+ dialogText++;
+ } while (c);
+ }
+
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ keyHandler(event);
+ break;
+ case Common::EVENT_LBUTTONDOWN:
+ if (dialogSelected != -1) {
+ dialogLeftMouseButton(dialogCurrentText, dialogSelected);
+ _dialogFlag = false;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (shouldQuit()) {
+ return;
+ }
+
+ if (!_dialogFlag) {
+ break;
+ }
+
+ getDebugger()->onFrame();
+ _graph->update(_graph->_frontScreen);
+ pause();
+ }
+ _dialogImage->free();
+ delete _dialogImage;
+ _dialogImage = nullptr;
+ _dialogFlag = false;
+}
+
+void PrinceEngine::dialogLeftMouseButton(byte *string, int dialogSelected) {
+ _interpreter->setString(string);
+ talkHero(0);
+
+ int dialogDataValue = (int)READ_LE_UINT32(_dialogData);
+ dialogDataValue |= (1u << dialogSelected);
+ WRITE_LE_UINT32(_dialogData, dialogDataValue);
+
+ _flags->setFlagValue(Flags::BOXSEL, dialogSelected + 1);
+ setVoice(0, 28, dialogSelected + 1);
+
+ _flags->setFlagValue(Flags::VOICE_H_LINE, _dialogOptLines[dialogSelected * 4]);
+ _flags->setFlagValue(Flags::VOICE_A_LINE, _dialogOptLines[dialogSelected * 4 + 1]);
+ _flags->setFlagValue(Flags::VOICE_B_LINE, _dialogOptLines[dialogSelected * 4 + 2]);
+
+ _interpreter->setString(_dialogOptAddr[dialogSelected]);
+}
+
+void PrinceEngine::talkHero(int slot) {
+ // heroSlot = textSlot (slot 0 or 1)
+ Text &text = _textSlots[slot];
+ int lines = calcTextLines((const char *)_interpreter->getString());
+ int time = lines * 30;
+
+ if (slot == 0) {
+ text._color = 220; // TODO - test this
+ _mainHero->_state = Hero::kHeroStateTalk;
+ _mainHero->_talkTime = time;
+ text._x = _mainHero->_middleX;
+ text._y = _mainHero->_middleY - _mainHero->_scaledFrameYSize;
+ } else {
+ text._color = _flags->getFlagValue(Flags::KOLOR); // TODO - test this
+ _secondHero->_state = Hero::kHeroStateTalk;
+ _secondHero->_talkTime = time;
+ text._x = _secondHero->_middleX;
+ text._y = _secondHero->_middleY - _secondHero->_scaledFrameYSize;
+ }
+ text._time = time;
+ if (getLanguage() == Common::DE_DEU) {
+ correctStringDEU((char *)_interpreter->getString());
+ }
+ text._str = (const char *)_interpreter->getString();
+ _interpreter->increaseString();
+}
+
+void PrinceEngine::doTalkAnim(int animNumber, int slot, AnimType animType) {
+ Text &text = _textSlots[slot];
+ int lines = calcTextLines((const char *)_interpreter->getString());
+ int time = lines * 30;
+ if (animType == kNormalAnimation) {
+ Anim &normAnim = _normAnimList[animNumber];
+ if (normAnim._animData != nullptr) {
+ if (!normAnim._state) {
+ if (normAnim._currW && normAnim._currH) {
+ text._color = _flags->getFlagValue(Flags::KOLOR);
+ text._x = normAnim._currX + normAnim._currW / 2;
+ text._y = normAnim._currY - 10;
+ }
+ }
+ }
+ } else if (animType == kBackgroundAnimation) {
+ if (!_backAnimList[animNumber].backAnims.empty()) {
+ int currAnim = _backAnimList[animNumber]._seq._currRelative;
+ Anim &backAnim = _backAnimList[animNumber].backAnims[currAnim];
+ if (backAnim._animData != nullptr) {
+ if (!backAnim._state) {
+ if (backAnim._currW && backAnim._currH) {
+ text._color = _flags->getFlagValue(Flags::KOLOR);
+ text._x = backAnim._currX + backAnim._currW / 2;
+ text._y = backAnim._currY - 10;
+ }
+ }
+ }
+ }
+ } else {
+ error("doTalkAnim() - wrong animType: %d", animType);
+ }
+ text._time = time;
+ if (getLanguage() == Common::DE_DEU) {
+ correctStringDEU((char *)_interpreter->getString());
+ }
+ text._str = (const char *)_interpreter->getString();
+ _interpreter->increaseString();
+}
+
+void PrinceEngine::freeNormAnim(int slot) {
+ if (!_normAnimList.empty()) {
+ _normAnimList[slot]._state = 1;
+ if (_normAnimList[slot]._animData != nullptr) {
+ delete _normAnimList[slot]._animData;
+ _normAnimList[slot]._animData = nullptr;
+ }
+ if (_normAnimList[slot]._shadowData != nullptr) {
+ delete _normAnimList[slot]._shadowData;
+ _normAnimList[slot]._shadowData = nullptr;
+ }
+ }
+}
+
+void PrinceEngine::freeAllNormAnims() {
+ for (int i = 0; i < kMaxNormAnims; i++) {
+ freeNormAnim(i);
+ }
+}
+
+void PrinceEngine::getCurve() {
+ _flags->setFlagValue(Flags::TORX1, _curveData[_curvPos]);
+ _flags->setFlagValue(Flags::TORY1, _curveData[_curvPos + 1]);
+ _curvPos += 2;
+}
+
+void PrinceEngine::makeCurve() {
+ _curvPos = 0;
+ int x1 = _flags->getFlagValue(Flags::TORX1);
+ int y1 = _flags->getFlagValue(Flags::TORY1);
+ int x2 = _flags->getFlagValue(Flags::TORX2);
+ int y2 = _flags->getFlagValue(Flags::TORY2);
+
+ for (int i = 0; i < kCurveLen; i++) {
+ int sum1 = x1 * curveValues[i][0];
+ sum1 += (x2 + (x1 - x2) / 2) * curveValues[i][1];
+ sum1 += x2 * curveValues[i][2];
+ sum1 += x2 * curveValues[i][3];
+
+ int sum2 = y1 * curveValues[i][0];
+ sum2 += (y2 - 20) * curveValues[i][1];
+ sum2 += (y2 - 10) * curveValues[i][2];
+ sum2 += y2 * curveValues[i][3];
+
+ _curveData[i * 2] = (sum1 >> 15);
+ _curveData[i * 2 + 1] = (sum2 >> 15);
+ }
+}
+
+void PrinceEngine::mouseWeirdo() {
+ if (_mouseFlag == 3) {
+ int weirdDir = _randomSource.getRandomNumber(3);
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ switch (weirdDir) {
+ case 0:
+ mousePos.x += kCelStep;
+ break;
+ case 1:
+ mousePos.x -= kCelStep;
+ break;
+ case 2:
+ mousePos.y += kCelStep;
+ break;
+ case 3:
+ mousePos.y -= kCelStep;
+ break;
+ }
+ mousePos.x = CLIP(mousePos.x, (int16) 315, (int16) 639);
+ _flags->setFlagValue(Flags::MXFLAG, mousePos.x);
+ mousePos.y = CLIP(mousePos.y, (int16) 0, (int16) 170);
+ _flags->setFlagValue(Flags::MYFLAG, mousePos.y);
+ _system->warpMouse(mousePos.x, mousePos.y);
+ }
+}
+
+void PrinceEngine::showPower() {
+ if (_flags->getFlagValue(Flags::POWERENABLED)) {
+ int power = _flags->getFlagValue(Flags::POWER);
+
+ byte *dst = (byte *)_graph->_frontScreen->getBasePtr(kPowerBarPosX, kPowerBarPosY);
+ for (int y = 0; y < kPowerBarHeight; y++) {
+ byte *dst2 = dst;
+ for (int x = 0; x < kPowerBarWidth; x++, dst2++) {
+ *dst2 = kPowerBarBackgroundColor;
+ }
+ dst += _graph->_frontScreen->pitch;
+ }
+
+ if (power) {
+ dst = (byte *)_graph->_frontScreen->getBasePtr(kPowerBarPosX, kPowerBarGreenPosY);
+ for (int y = 0; y < kPowerBarGreenHeight; y++) {
+ byte *dst2 = dst;
+ for (int x = 0; x < power + 1; x++, dst2++) {
+ if (x < 58) {
+ *dst2 = kPowerBarGreenColor1;
+ } else {
+ *dst2 = kPowerBarGreenColor2;
+ }
+ }
+ dst += _graph->_frontScreen->pitch;
+ }
+ }
+
+ _graph->change();
+ }
+}
+
+void PrinceEngine::scrollCredits() {
+ byte *scrollAdress = _creditsData;
+ while (!shouldQuit()) {
+ for (int scrollPos = 0; scrollPos > -23; scrollPos--) {
+ const Graphics::Surface *roomSurface = _roomBmp->getSurface();
+ if (roomSurface) {
+ _graph->draw(_graph->_frontScreen, roomSurface);
+ }
+ char *s = (char *)scrollAdress;
+ int drawY = scrollPos;
+ for (int i = 0; i < 22; i++) {
+ Common::String line;
+ char *linePos = s;
+ while ((*linePos != 13)) {
+ line += *linePos;
+ linePos++;
+ }
+ if (!line.empty()) {
+ int drawX = (kNormalWidth - getTextWidth(line.c_str())) / 2;
+ _font->drawString(_graph->_frontScreen, line, drawX, drawY, _graph->_frontScreen->w, 217);
+ }
+
+ char letter1;
+ bool gotIt1 = false;
+ do {
+ letter1 = *s;
+ s++;
+ if (letter1 == 13) {
+ if (*s == 10) {
+ s++;
+ }
+ if (*s != 35) {
+ gotIt1 = true;
+ }
+ break;
+ }
+ } while (letter1 != 35);
+
+ if (gotIt1) {
+ drawY += 23;
+ } else {
+ break;
+ }
+ }
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
+ if (event.type == Common::EVENT_KEYDOWN) {
+ if (event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+ blackPalette();
+ return;
+ }
+ }
+ }
+ if (shouldQuit()) {
+ return;
+ }
+ _graph->change();
+ _graph->update(_graph->_frontScreen);
+ pause2();
+ }
+ char letter2;
+ byte *scan2 = scrollAdress;
+ bool gotIt2 = false;
+ do {
+ letter2 = *scan2;
+ scan2++;
+ if (letter2 == 13) {
+ if (*scan2 == 10) {
+ scan2++;
+ }
+ if (*scan2 != 35) {
+ gotIt2 = true;
+ }
+ break;
+ }
+ } while (letter2 != 35);
+ if (gotIt2) {
+ scrollAdress = scan2;
+ } else {
+ break;
+ }
+ }
+ blackPalette();
+}
+
+// Modified version of Graphics::drawLine() to allow breaking the loop and return value
+int PrinceEngine::drawLine(int x0, int y0, int x1, int y1, int (*plotProc)(int, int, void *), void *data) {
+ // Bresenham's line algorithm, as described by Wikipedia
+ const bool steep = ABS(y1 - y0) > ABS(x1 - x0);
+
+ if (steep) {
+ SWAP(x0, y0);
+ SWAP(x1, y1);
+ }
+
+ const int delta_x = ABS(x1 - x0);
+ const int delta_y = ABS(y1 - y0);
+ const int delta_err = delta_y;
+ int x = x0;
+ int y = y0;
+ int err = 0;
+
+ const int x_step = (x0 < x1) ? 1 : -1;
+ const int y_step = (y0 < y1) ? 1 : -1;
+
+ int stopFlag = 0;
+ if (steep)
+ stopFlag = (*plotProc)(y, x, data);
+ else
+ stopFlag = (*plotProc)(x, y, data);
+
+ while (x != x1 && !stopFlag) {
+ x += x_step;
+ err += delta_err;
+ if (2 * err > delta_x) {
+ y += y_step;
+ err -= delta_x;
+ }
+ if (steep)
+ stopFlag = (*plotProc)(y, x, data);
+ else
+ stopFlag = (*plotProc)(x, y, data);
+ }
+ return stopFlag;
+}
+
+int PrinceEngine::getPixelAddr(byte *pathBitmap, int x, int y) {
+ int mask = 128 >> (x & 7);
+ byte value = pathBitmap[x / 8 + y * 80];
+ return (mask & value);
+}
+
+void PrinceEngine::findPoint(int x, int y) {
+ _fpX = x;
+ _fpY = y;
+
+ if (getPixelAddr(_roomPathBitmap, x, y)) {
+ return;
+ }
+
+ int fpL = x;
+ int fpU = y;
+ int fpR = x;
+ int fpD = y;
+
+ while (1) {
+ if (fpD != kMaxPicHeight) {
+ if (getPixelAddr(_roomPathBitmap, x, fpD)) {
+ _fpX = x;
+ _fpY = fpD;
+ break;
+ }
+ fpD++;
+ }
+ if (fpU) {
+ if (getPixelAddr(_roomPathBitmap, x, fpU)) {
+ _fpX = x;
+ _fpY = fpU;
+ break;
+ }
+ fpU--;
+ }
+ if (fpL) {
+ if (getPixelAddr(_roomPathBitmap, fpL, y)) {
+ _fpX = fpL;
+ _fpY = y;
+ break;
+ }
+ fpL--;
+ }
+ if (fpR != _sceneWidth) {
+ if (getPixelAddr(_roomPathBitmap, fpR, y)) {
+ _fpX = fpR;
+ _fpY = y;
+ break;
+ }
+ fpR++;
+ }
+ if (!fpU && (fpD == kMaxPicHeight)) {
+ if (!fpL && (fpR == _sceneWidth)) {
+ break;
+ }
+ }
+ }
+}
+
+Direction PrinceEngine::makeDirection(int x1, int y1, int x2, int y2) {
+ if (x1 != x2) {
+ if (y1 != y2) {
+ if (x1 > x2) {
+ if (y1 > y2) {
+ if (x1 - x2 >= y1 - y2) {
+ return kDirLU;
+ } else {
+ return kDirUL;
+ }
+ } else {
+ if (x1 - x2 >= y2 - y1) {
+ return kDirLD;
+ } else {
+ return kDirDL;
+ }
+ }
+ } else {
+ if (y1 > y2) {
+ if (x2 - x1 >= y1 - y2) {
+ return kDirRU;
+ } else {
+ return kDirUR;
+ }
+ } else {
+ if (x2 - x1 >= y2 - y1) {
+ return kDirRD;
+ } else {
+ return kDirDR;
+ }
+ }
+ }
+ } else {
+ if (x1 >= x2) {
+ return kDirL;
+ } else {
+ return kDirR;
+ }
+ }
+ } else {
+ if (y1 >= y2) {
+ return kDirU;
+ } else {
+ return kDirD;
+ }
+ }
+}
+
+void PrinceEngine::specialPlot(int x, int y) {
+ if (_coords < _coordsBufEnd) {
+ WRITE_LE_UINT16(_coords, x);
+ _coords += 2;
+ WRITE_LE_UINT16(_coords, y);
+ _coords += 2;
+ specialPlot2(x, y);
+ }
+}
+
+void PrinceEngine::specialPlot2(int x, int y) {
+ int mask = 128 >> (x & 7);
+ _roomPathBitmapTemp[x / 8 + y * 80] |= mask;
+}
+
+void PrinceEngine::specialPlotInside(int x, int y) {
+ if (_coords < _coordsBufEnd) {
+ WRITE_LE_UINT16(_coords, x);
+ _coords += 2;
+ WRITE_LE_UINT16(_coords, y);
+ _coords += 2;
+ }
+}
+
+int PrinceEngine::plotTraceLine(int x, int y, void *data) {
+ PrinceEngine *traceLine = (PrinceEngine *)data;
+ if (!traceLine->_traceLineFirstPointFlag) {
+ if (!traceLine->getPixelAddr(traceLine->_roomPathBitmapTemp, x, y)) {
+ if (traceLine->getPixelAddr(traceLine->_roomPathBitmap, x, y)) {
+ traceLine->specialPlotInside(x, y);
+ traceLine->_traceLineLen++;
+ return 0;
+ } else {
+ return -1;
+ }
+ } else {
+ return 1;
+ }
+ } else {
+ traceLine->_traceLineFirstPointFlag = false;
+ return 0;
+ }
+}
+
+int PrinceEngine::leftDownDir() {
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::leftDir() {
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::leftUpDir() {
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::rightDownDir() {
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::rightDir() {
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::rightUpDir() {
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::upLeftDir() {
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::upDir() {
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::upRightDir() {
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::downLeftDir() {
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::downDir() {
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::downRightDir() {
+ if (!checkRightDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDownDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkRightUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ if (!checkLeftUpDir()) {
+ specialPlot(_checkX, _checkY);
+ return 0;
+ }
+ return -1;
+}
+
+int PrinceEngine::cpe() {
+ if ((*(_checkBitmap - kPBW) & _checkMask)) {
+ if ((*(_checkBitmap + kPBW) & _checkMask)) {
+ int value;
+ switch (_checkMask) {
+ case 128:
+ value = READ_LE_UINT16(_checkBitmap - 1);
+ value &= 0x4001;
+ if (value != 0x4001) {
+ return 0;
+ }
+ break;
+ case 64:
+ value = *_checkBitmap;
+ value &= 0xA0;
+ if (value != 0xA0) {
+ return 0;
+ }
+ break;
+ case 32:
+ value = *_checkBitmap;
+ value &= 0x50;
+ if (value != 0x50) {
+ return 0;
+ }
+ break;
+ case 16:
+ value = *_checkBitmap;
+ value &= 0x28;
+ if (value != 0x28) {
+ return 0;
+ }
+ break;
+ case 8:
+ value = *_checkBitmap;
+ value &= 0x14;
+ if (value != 0x14) {
+ return 0;
+ }
+ break;
+ case 4:
+ value = *_checkBitmap;
+ value &= 0xA;
+ if (value != 0xA) {
+ return 0;
+ }
+ break;
+ case 2:
+ value = *_checkBitmap;
+ value &= 0x5;
+ if (value != 0x5) {
+ return 0;
+ }
+ break;
+ case 1:
+ value = READ_LE_UINT16(_checkBitmap);
+ value &= 0x8002;
+ if (value != 0x8002) {
+ return 0;
+ }
+ break;
+ default:
+ error("Wrong _checkMask value - cpe()");
+ break;
+ }
+ _checkX = _rembX;
+ _checkY = _rembY;
+ _checkBitmapTemp = _rembBitmapTemp;
+ _checkBitmap = _rembBitmap;
+ _checkMask = _rembMask;
+ return -1;
+ }
+ return 0;
+ }
+ return 0;
+}
+
+int PrinceEngine::checkLeftDownDir() {
+ if (_checkX && _checkY != (kMaxPicHeight / 2 - 1)) {
+ int tempMask = _checkMask;
+ if (tempMask != 128) {
+ tempMask <<= 1;
+ if ((*(_checkBitmap + kPBW) & tempMask)) {
+ if (!(*(_checkBitmapTemp + kPBW) & tempMask)) {
+ _checkBitmap += kPBW;
+ _checkBitmapTemp += kPBW;
+ _checkMask = tempMask;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ if ((*(_checkBitmap + kPBW - 1) & 1)) {
+ if (!(*(_checkBitmapTemp + kPBW - 1) & 1)) {
+ _checkBitmap += (kPBW - 1);
+ _checkBitmapTemp += (kPBW - 1);
+ _checkMask = 1;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ }
+ _checkX--;
+ _checkY++;
+ return cpe();
+ } else {
+ return -1;
+ }
+}
+
+int PrinceEngine::checkLeftDir() {
+ if (_checkX) {
+ int tempMask = _checkMask;
+ if (tempMask != 128) {
+ tempMask <<= 1;
+ if ((*(_checkBitmap) & tempMask)) {
+ if (!(*(_checkBitmapTemp) & tempMask)) {
+ _checkMask = tempMask;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ if ((*(_checkBitmap - 1) & 1)) {
+ if (!(*(_checkBitmapTemp - 1) & 1)) {
+ _checkBitmap--;
+ _checkBitmapTemp--;
+ _checkMask = 1;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ }
+ _checkX--;
+ return cpe();
+ } else {
+ return -1;
+ }
+}
+
+int PrinceEngine::checkDownDir() {
+ if (_checkY != (kMaxPicHeight / 2 - 1)) {
+ if ((*(_checkBitmap + kPBW) & _checkMask)) {
+ if (!(*(_checkBitmapTemp + kPBW) & _checkMask)) {
+ _checkBitmap += kPBW;
+ _checkBitmapTemp += kPBW;
+ _checkY++;
+ return cpe();
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ return -1;
+ }
+}
+
+int PrinceEngine::checkUpDir() {
+ if (_checkY) {
+ if ((*(_checkBitmap - kPBW) & _checkMask)) {
+ if (!(*(_checkBitmapTemp - kPBW) & _checkMask)) {
+ _checkBitmap -= kPBW;
+ _checkBitmapTemp -= kPBW;
+ _checkY--;
+ return cpe();
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ return -1;
+ }
+}
+
+int PrinceEngine::checkRightDir() {
+ if (_checkX != (kMaxPicWidth / 2 - 1)) {
+ int tempMask = _checkMask;
+ if (tempMask != 1) {
+ tempMask >>= 1;
+ if ((*(_checkBitmap) & tempMask)) {
+ if (!(*(_checkBitmapTemp) & tempMask)) {
+ _checkMask = tempMask;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ if ((*(_checkBitmap + 1) & 128)) {
+ if (!(*(_checkBitmapTemp + 1) & 128)) {
+ _checkBitmap++;
+ _checkBitmapTemp++;
+ _checkMask = 128;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ }
+ _checkX++;
+ return cpe();
+ } else {
+ return -1;
+ }
+}
+
+int PrinceEngine::checkLeftUpDir() {
+ if (_checkX && _checkY) {
+ int tempMask = _checkMask;
+ if (tempMask != 128) {
+ tempMask <<= 1;
+ if ((*(_checkBitmap - kPBW) & tempMask)) {
+ if (!(*(_checkBitmapTemp - kPBW) & tempMask)) {
+ _checkBitmap -= kPBW;
+ _checkBitmapTemp -= kPBW;
+ _checkMask = tempMask;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ if ((*(_checkBitmap - (kPBW + 1)) & 1)) {
+ if (!(*(_checkBitmapTemp - (kPBW + 1)) & 1)) {
+ _checkBitmap -= (kPBW + 1);
+ _checkBitmapTemp -= (kPBW + 1);
+ _checkMask = 1;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ }
+ _checkX--;
+ _checkY--;
+ return cpe();
+ } else {
+ return -1;
+ }
+}
+
+int PrinceEngine::checkRightDownDir() {
+ if (_checkX != (kMaxPicWidth / 2 - 1) && _checkY != (kMaxPicHeight / 2 - 1)) {
+ int tempMask = _checkMask;
+ if (tempMask != 1) {
+ tempMask >>= 1;
+ if ((*(_checkBitmap + kPBW) & tempMask)) {
+ if (!(*(_checkBitmapTemp + kPBW) & tempMask)) {
+ _checkBitmap += kPBW;
+ _checkBitmapTemp += kPBW;
+ _checkMask = tempMask;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ if ((*(_checkBitmap + kPBW + 1) & 128)) {
+ if (!(*(_checkBitmapTemp + kPBW + 1) & 128)) {
+ _checkBitmap += kPBW + 1;
+ _checkBitmapTemp += kPBW + 1;
+ _checkMask = 128;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ }
+ _checkX++;
+ _checkY++;
+ return cpe();
+ } else {
+ return -1;
+ }
+}
+
+int PrinceEngine::checkRightUpDir() {
+ if (_checkX != (kMaxPicWidth / 2 - 1) && _checkY) {
+ int tempMask = _checkMask;
+ if (tempMask != 1) {
+ tempMask >>= 1;
+ if ((*(_checkBitmap - kPBW) & tempMask)) {
+ if (!(*(_checkBitmapTemp - kPBW) & tempMask)) {
+ _checkBitmap -= kPBW;
+ _checkBitmapTemp -= kPBW;
+ _checkMask = tempMask;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ if ((*(_checkBitmap - kPBW + 1) & 128)) {
+ if (!(*(_checkBitmapTemp - kPBW + 1) & 128)) {
+ _checkBitmap -= (kPBW - 1);
+ _checkBitmapTemp -= (kPBW - 1);
+ _checkMask = 128;
+ } else {
+ return 1;
+ }
+ } else {
+ return -1;
+ }
+ }
+ _checkX++;
+ _checkY--;
+ return cpe();
+ } else {
+ return -1;
+ }
+}
+
+bool PrinceEngine::tracePath(int x1, int y1, int x2, int y2) {
+ for (int i = 0; i < kPathBitmapLen; i++) {
+ _roomPathBitmapTemp[i] = 0;
+ }
+ if (x1 != x2 || y1 != y2) {
+ if (getPixelAddr(_roomPathBitmap, x1, y1)) {
+ if (getPixelAddr(_roomPathBitmap, x2, y2)) {
+ _coords = _coordsBuf;
+ specialPlot(x1, y1);
+
+ int x = x1;
+ int y = y1;
+
+ while (1) {
+ int btx = x;
+ int bty = y;
+ byte *bcad = _coords;
+
+ _traceLineLen = 0;
+ _traceLineFirstPointFlag = true;
+ int drawLineFlag = drawLine(x, y, x2, y2, &this->plotTraceLine, this);
+
+ if (!drawLineFlag) {
+ return true;
+ } else if (drawLineFlag == -1 && _traceLineLen >= 2) {
+ byte *tempCorrds = bcad;
+ while (tempCorrds != _coords) {
+ x = READ_LE_UINT16(tempCorrds);
+ y = READ_LE_UINT16(tempCorrds + 2);
+ tempCorrds += 4;
+ specialPlot2(x, y);
+ }
+ } else {
+ _coords = bcad;
+ x = btx;
+ y = bty;
+ }
+
+ Direction dir = makeDirection(x, y, x2, y2);
+
+ _rembBitmapTemp = &_roomPathBitmapTemp[x / 8 + y * 80];
+ _rembBitmap = &_roomPathBitmap[x / 8 + y * 80];
+ _rembMask = 128 >> (x & 7);
+ _rembX = x;
+ _rembY = y;
+
+ _checkBitmapTemp = _rembBitmapTemp;
+ _checkBitmap = _rembBitmap;
+ _checkMask = _rembMask;
+ _checkX = _rembX;
+ _checkY = _rembY;
+
+ int result;
+ switch (dir) {
+ case kDirLD:
+ result = leftDownDir();
+ break;
+ case kDirL:
+ result = leftDir();
+ break;
+ case kDirLU:
+ result = leftUpDir();
+ break;
+ case kDirRD:
+ result = rightDownDir();
+ break;
+ case kDirR:
+ result = rightDir();
+ break;
+ case kDirRU:
+ result = rightUpDir();
+ break;
+ case kDirUL:
+ result = upLeftDir();
+ break;
+ case kDirU:
+ result = upDir();
+ break;
+ case kDirUR:
+ result = upRightDir();
+ break;
+ case kDirDL:
+ result = downLeftDir();
+ break;
+ case kDirD:
+ result = downDir();
+ break;
+ case kDirDR:
+ result = downRightDir();
+ break;
+ default:
+ result = -1;
+ error("tracePath: wrong direction %d", dir);
+ break;
+ }
+
+ if (result) {
+ byte *tempCoords = _coords;
+ tempCoords -= 4;
+ if (tempCoords > _coordsBuf) {
+ int tempX = READ_LE_UINT16(tempCoords);
+ int tempY = READ_LE_UINT16(tempCoords + 2);
+ if (_checkX == tempX && _checkY == tempY) {
+ _coords = tempCoords;
+ }
+ x = READ_LE_UINT16(tempCoords);
+ y = READ_LE_UINT16(tempCoords + 2);
+ } else {
+ return false;
+ }
+ } else {
+ x = _checkX;
+ y = _checkY;
+ }
+ }
+ return true;
+ } else {
+ error("tracePath: wrong destination point");
+ }
+ } else {
+ error("tracePath: wrong start point");
+ }
+ } else {
+ error("tracePath: same point");
+ }
+}
+
+void PrinceEngine::specialPlotInside2(int x, int y) {
+ WRITE_LE_UINT16(_coords2, x);
+ _coords2 += 2;
+ WRITE_LE_UINT16(_coords2, y);
+ _coords2 += 2;
+}
+
+int PrinceEngine::plotTracePoint(int x, int y, void *data) {
+ PrinceEngine *tracePoint = (PrinceEngine *)data;
+ if (!tracePoint->_tracePointFirstPointFlag) {
+ if (tracePoint->getPixelAddr(tracePoint->_roomPathBitmap, x, y)) {
+ tracePoint->specialPlotInside2(x, y);
+ return 0;
+ } else {
+ return -1;
+ }
+ } else {
+ tracePoint->_tracePointFirstPointFlag = false;
+ return 0;
+ }
+}
+
+void PrinceEngine::approxPath() {
+ byte *oldCoords;
+ _coords2 = _coordsBuf2;
+ byte *tempCoordsBuf = _coordsBuf; // first point on path
+ byte *tempCoords = _coords;
+ if (tempCoordsBuf != tempCoords) {
+ tempCoords -= 4; // last point on path
+ while (tempCoordsBuf != tempCoords) {
+ int x1 = READ_LE_UINT16(tempCoords);
+ int y1 = READ_LE_UINT16(tempCoords + 2);
+ int x2 = READ_LE_UINT16(tempCoordsBuf);
+ int y2 = READ_LE_UINT16(tempCoordsBuf + 2);
+ tempCoordsBuf += 4;
+ //TracePoint
+ oldCoords = _coords2;
+ if (_coords2 == _coordsBuf2) {
+ WRITE_LE_UINT16(_coords2, x1);
+ WRITE_LE_UINT16(_coords2 + 2, y1);
+ _coords2 += 4;
+ } else {
+ int testX = READ_LE_UINT16(_coords2 - 4);
+ int testY = READ_LE_UINT16(_coords2 - 2);
+ if (testX != x1 || testY != y1) {
+ WRITE_LE_UINT16(_coords2, x1);
+ WRITE_LE_UINT16(_coords2 + 2, y1);
+ _coords2 += 4;
+ }
+ }
+ _tracePointFirstPointFlag = true;
+ bool drawLineFlag = drawLine(x1, y1, x2, y2, &this->plotTracePoint, this);
+ if (!drawLineFlag) {
+ tempCoords = tempCoordsBuf - 4;
+ tempCoordsBuf = _coordsBuf;
+ } else {
+ _coords2 = oldCoords;
+ }
+ }
+ }
+}
+
+void PrinceEngine::freeDirectionTable() {
+ if (_directionTable != nullptr) {
+ free(_directionTable);
+ _directionTable = nullptr;
+ }
+}
+
+int PrinceEngine::scanDirectionsFindNext(byte *tempCoordsBuf, int xDiff, int yDiff) {
+
+ int tempX, tempY, direction;
+
+ tempX = Hero::kHeroDirLeft;
+ if (xDiff < 0) {
+ tempX = Hero::kHeroDirRight;
+ }
+
+ tempY = Hero::kHeroDirUp;
+ if (yDiff < 0) {
+ tempY = Hero::kHeroDirDown;
+ }
+
+ while (1) {
+ int againPointX1 = READ_LE_UINT16(tempCoordsBuf);
+ int againPointY1 = READ_LE_UINT16(tempCoordsBuf + 2);
+ tempCoordsBuf += 4;
+
+ if (tempCoordsBuf == _coords) {
+ direction = tempX;
+ break;
+ }
+
+ int dX = againPointX1 - READ_LE_UINT16(tempCoordsBuf);
+ int dY = againPointY1 - READ_LE_UINT16(tempCoordsBuf + 2);
+
+ if (dX != xDiff) {
+ direction = tempY;
+ break;
+ }
+
+ if (dY != yDiff) {
+ direction = tempX;
+ break;
+ }
+ }
+ return direction;
+}
+
+void PrinceEngine::scanDirections() {
+ freeDirectionTable();
+ byte *tempCoordsBuf = _coordsBuf;
+ if (tempCoordsBuf != _coords) {
+ int size = (_coords - tempCoordsBuf) / 4 + 1; // number of coord points plus one for end marker
+ _directionTable = (byte *)malloc(size);
+ byte *tempDirTab = _directionTable;
+ int direction = -1;
+ int lastDirection = -1;
+
+ while (1) {
+ int x1 = READ_LE_UINT16(tempCoordsBuf);
+ int y1 = READ_LE_UINT16(tempCoordsBuf + 2);
+ tempCoordsBuf += 4;
+ if (tempCoordsBuf == _coords) {
+ break;
+ }
+ int x2 = READ_LE_UINT16(tempCoordsBuf);
+ int y2 = READ_LE_UINT16(tempCoordsBuf + 2);
+
+ int xDiff = x1 - x2;
+ int yDiff = y1 - y2;
+
+ if (xDiff) {
+ if (yDiff) {
+ if (lastDirection != -1) {
+ direction = lastDirection;
+ if (direction == Hero::kHeroDirLeft) {
+ if (xDiff < 0) {
+ direction = scanDirectionsFindNext(tempCoordsBuf, xDiff, yDiff);
+ }
+ } else if (direction == Hero::kHeroDirRight) {
+ if (xDiff >= 0) {
+ direction = scanDirectionsFindNext(tempCoordsBuf, xDiff, yDiff);
+ }
+ } else if (direction == Hero::kHeroDirUp) {
+ if (yDiff < 0) {
+ direction = scanDirectionsFindNext(tempCoordsBuf, xDiff, yDiff);
+ }
+ } else {
+ if (yDiff >= 0) {
+ direction = scanDirectionsFindNext(tempCoordsBuf, xDiff, yDiff);
+ }
+ }
+ } else {
+ direction = scanDirectionsFindNext(tempCoordsBuf, xDiff, yDiff);
+ }
+ } else {
+ direction = Hero::kHeroDirLeft;
+ if (xDiff < 0) {
+ direction = Hero::kHeroDirRight;
+ }
+ }
+ } else {
+ if (yDiff) {
+ direction = Hero::kHeroDirUp;
+ if (yDiff < 0) {
+ direction = Hero::kHeroDirDown;
+ }
+ } else {
+ direction = lastDirection;
+ }
+ }
+ lastDirection = direction;
+ *tempDirTab = direction;
+ tempDirTab++;
+ }
+ *tempDirTab = *(tempDirTab - 1);
+ tempDirTab++;
+ *tempDirTab = 0;
+ }
+}
+
+void PrinceEngine::moveShandria() {
+ int shanLen1 = _shanLen;
+ if (_flags->getFlagValue(Flags::SHANDOG)) {
+ _secondHero->freeHeroAnim();
+ _secondHero->freeOldMove();
+ byte *shanCoords = _mainHero->_currCoords + shanLen1 * 4 - 4;
+ int shanX = READ_LE_UINT16(shanCoords - 4);
+ int shanY = READ_LE_UINT16(shanCoords - 2);
+ int xDiff = shanX - _secondHero->_middleX;
+ if (xDiff < 0) {
+ xDiff *= -1;
+ }
+ int yDiff = shanY - _secondHero->_middleY;
+ if (yDiff < 0) {
+ yDiff *= -1;
+ }
+ shanCoords -= 4;
+ if (shanCoords != _mainHero->_currCoords) {
+ yDiff *= 1.5;
+ int shanDis = xDiff * xDiff + yDiff * yDiff;
+ if (shanDis >= kMinDistance) {
+ while (1) {
+ shanCoords -= 4;
+ if (shanCoords == _mainHero->_currCoords) {
+ break;
+ }
+ int x = READ_LE_UINT16(shanCoords);
+ int y = READ_LE_UINT16(shanCoords + 2);
+ int pointDiffX = x - shanX;
+ if (pointDiffX < 0) {
+ pointDiffX *= -1;
+ }
+ int pointDiffY = y - shanY;
+ if (pointDiffY < 0) {
+ pointDiffY *= -1;
+ }
+ pointDiffY *= 1.5;
+ int distance = pointDiffX * pointDiffX + pointDiffY * pointDiffY;
+ if (distance >= kMinDistance) {
+ break;
+ }
+ }
+ int pathSizeDiff = (shanCoords - _mainHero->_currCoords) / 4;
+ int destDir = *(_mainHero->_currDirTab + pathSizeDiff);
+ _secondHero->_destDirection = destDir;
+ int destX = READ_LE_UINT16(shanCoords);
+ int destY = READ_LE_UINT16(shanCoords + 2);
+ _secondHero->_coords = makePath(kSecondHero, _secondHero->_middleX, _secondHero->_middleY, destX, destY);
+ if (_secondHero->_coords != nullptr) {
+ _secondHero->_currCoords = _secondHero->_coords;
+ int delay = shanLen1 - _shanLen;
+ if (delay < 6) {
+ delay = 6;
+ }
+ _secondHero->_moveDelay = delay / 2;
+ _secondHero->_state = Hero::kHeroStateDelayMove;
+ _secondHero->_dirTab = _directionTable;
+ _secondHero->_currDirTab = _directionTable;
+ _directionTable = nullptr;
+ }
+ }
+ }
+ }
+}
+
+byte *PrinceEngine::makePath(int heroId, int currX, int currY, int destX, int destY) {
+ int realDestX = destX;
+ int realDestY = destY;
+ _flags->setFlagValue(Flags::MOVEDESTX, destX);
+ _flags->setFlagValue(Flags::MOVEDESTY, destY);
+
+ int x1 = currX / 2;
+ int y1 = currY / 2;
+ int x2 = destX / 2;
+ int y2 = destY / 2;
+
+ if ((x1 != x2) || (y1 != y2)) {
+ findPoint(x1, y1);
+ if (!getPixelAddr(_roomPathBitmap, _fpX, _fpY)) {
+ return nullptr;
+ }
+ if ((x1 != _fpX) || (y1 != _fpY)) {
+ x1 = _fpX;
+ y1 = _fpY;
+ }
+ findPoint(x2, y2);
+ if (!getPixelAddr(_roomPathBitmap, _fpX, _fpY)) {
+ return nullptr;
+ }
+ if ((x2 != _fpX) || (y2 != _fpY)) {
+ x2 = _fpX;
+ y2 = _fpY;
+ if (!_flags->getFlagValue(Flags::EXACTMOVE)) {
+ realDestX = x2 * 2;
+ realDestY = y2 * 2;
+ _flags->setFlagValue(Flags::MOVEDESTX, realDestX);
+ _flags->setFlagValue(Flags::MOVEDESTY, realDestY);
+ } else {
+ return nullptr;
+ }
+ }
+
+ if ((x1 == x2) && (y1 == y2)) {
+ if (!heroId) {
+ _mainHero->freeOldMove();
+ _mainHero->_state = Hero::kHeroStateTurn;
+ } else if (heroId == 1) {
+ _secondHero->freeOldMove();
+ _secondHero->_state = Hero::kHeroStateTurn;
+ }
+ return nullptr;
+ }
+
+ int pathLen1 = 0;
+ int pathLen2 = 0;
+ int stX = x1;
+ int stY = y1;
+ int sizeCoords2 = 0;
+
+ if (tracePath(x1, y1, x2, y2)) {
+ allocCoords2();
+ approxPath();
+ sizeCoords2 = _coords2 - _coordsBuf2;
+ for (int i = 0; i < sizeCoords2; i++) {
+ _coordsBuf[i] = _coordsBuf2[i];
+ }
+ _coords = _coordsBuf + sizeCoords2;
+ approxPath();
+ _coordsBuf3 = _coordsBuf2;
+ _coordsBuf2 = nullptr;
+ _coords3 = _coords2;
+ _coords2 = nullptr;
+ pathLen1 = _coords3 - _coordsBuf3;
+ }
+ if (tracePath(x2, y2, x1, y1)) {
+ allocCoords2();
+ approxPath();
+ sizeCoords2 = _coords2 - _coordsBuf2;
+ for (int i = 0; i < sizeCoords2; i++) {
+ _coordsBuf[i] = _coordsBuf2[i];
+ }
+ _coords = _coordsBuf + sizeCoords2;
+ approxPath();
+ pathLen2 = _coords2 - _coordsBuf2;
+ }
+
+ byte *chosenCoordsBuf = _coordsBuf2;
+ byte *choosenCoords = _coords2;
+ int choosenLength = pathLen1;
+ if (pathLen1 < pathLen2) {
+ chosenCoordsBuf = _coordsBuf3;
+ choosenCoords = _coords3;
+ choosenLength = pathLen2;
+ }
+
+ if (choosenLength) {
+ if (chosenCoordsBuf != nullptr) {
+ int tempXBegin = READ_LE_UINT16(chosenCoordsBuf);
+ int tempYBegin = READ_LE_UINT16(chosenCoordsBuf + 2);
+ if (stX != tempXBegin || stY != tempYBegin) {
+ SWAP(chosenCoordsBuf, choosenCoords);
+ chosenCoordsBuf -= 4;
+ byte *tempCoordsBuf = _coordsBuf;
+ while (1) {
+ int cord = READ_LE_UINT32(chosenCoordsBuf);
+ WRITE_LE_UINT32(tempCoordsBuf, cord);
+ tempCoordsBuf += 4;
+ if (chosenCoordsBuf == choosenCoords) {
+ break;
+ }
+ chosenCoordsBuf -= 4;
+ }
+ _coords = tempCoordsBuf;
+ } else {
+ int sizeChoosen = choosenCoords - chosenCoordsBuf;
+ for (int i = 0; i < sizeChoosen; i++) {
+ _coordsBuf[i] = chosenCoordsBuf[i];
+ }
+ _coords = _coordsBuf + sizeChoosen;
+ }
+ WRITE_LE_UINT32(_coords, 0xFFFFFFFF);
+ freeCoords2();
+ freeCoords3();
+ scanDirections();
+
+ byte *tempCoordsBuf = _coordsBuf;
+ byte *tempCoords = _coords;
+ byte *newCoords;
+ if (tempCoordsBuf != tempCoords) {
+ int normCoordsSize = _coords - _coordsBuf + 4;
+ newCoords = (byte *)malloc(normCoordsSize);
+ byte *newCoordsBegin = newCoords;
+ while (tempCoordsBuf != tempCoords) {
+ int newValueX = READ_LE_UINT16(tempCoordsBuf);
+ WRITE_LE_UINT16(newCoords, newValueX * 2);
+ newCoords += 2;
+ int newValueY = READ_LE_UINT16(tempCoordsBuf + 2);
+ WRITE_LE_UINT16(newCoords, newValueY * 2);
+ newCoords += 2;
+ tempCoordsBuf += 4;
+ }
+ WRITE_LE_UINT16(newCoords - 4, realDestX);
+ WRITE_LE_UINT16(newCoords - 2, realDestY);
+ WRITE_LE_UINT32(newCoords, 0xFFFFFFFF);
+ newCoords += 4;
+ _shanLen = (newCoords - newCoordsBegin);
+ _shanLen /= 4;
+ return newCoordsBegin;
+ }
+ }
+ }
+ _coords = _coordsBuf;
+ freeCoords2();
+ freeCoords3();
+ return nullptr;
+ } else {
+ if (!heroId) {
+ _mainHero->freeOldMove();
+ _mainHero->_state = Hero::kHeroStateTurn;
+ } else if (heroId == 1) {
+ _secondHero->freeOldMove();
+ _secondHero->_state = Hero::kHeroStateTurn;
+ }
+ return nullptr;
+ }
+}
+
+void PrinceEngine::allocCoords2() {
+ if (_coordsBuf2 == nullptr) {
+ _coordsBuf2 = (byte *)malloc(kTracePts * 4);
+ _coords2 = _coordsBuf2;
+ }
+}
+
+void PrinceEngine::freeCoords2() {
+ if (_coordsBuf2 != nullptr) {
+ free(_coordsBuf2);
+ _coordsBuf2 = nullptr;
+ _coords2 = nullptr;
+ }
+}
+
+void PrinceEngine::freeCoords3() {
+ if (_coordsBuf3 != nullptr) {
+ free(_coordsBuf3);
+ _coordsBuf3 = nullptr;
+ _coords3 = nullptr;
+ }
+}
+
+void PrinceEngine::openInventoryCheck() {
+ if (!_optionsFlag) {
+ if (_mouseFlag == 1 || _mouseFlag == 2) {
+ if (_mainHero->_visible) {
+ if (!_flags->getFlagValue(Flags::INVALLOWED)) {
+ // 29 - Basement, 50 - Map
+ if (_locationNr != 29 && _locationNr != 50) {
+ Common::Point mousePos = _system->getEventManager()->getMousePos();
+ if (mousePos.y < 4 && !_showInventoryFlag) {
+ _invCounter++;
+ } else {
+ _invCounter = 0;
+ }
+ if (_invCounter >= _invMaxCount) {
+ inventoryFlagChange(true);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void PrinceEngine::mainLoop() {
+ changeCursor(0);
+ _currentTime = _system->getMillis();
+
+ while (!shouldQuit()) {
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ keyHandler(event);
+ break;
+ case Common::EVENT_LBUTTONDOWN:
+ leftMouseButton();
+ break;
+ case Common::EVENT_RBUTTONDOWN:
+ rightMouseButton();
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (shouldQuit()) {
+ return;
+ }
+
+ // for "throw a rock" mini-game
+ mouseWeirdo();
+
+ _interpreter->stepBg();
+ _interpreter->stepFg();
+
+ drawScreen();
+
+ _graph->update(_graph->_frontScreen);
+
+ openInventoryCheck();
+
+ pause();
+ }
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/prince.h b/engines/prince/prince.h
new file mode 100644
index 0000000000..0e5bf97dde
--- /dev/null
+++ b/engines/prince/prince.h
@@ -0,0 +1,668 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_H
+#define PRINCE_H
+
+#include "common/random.h"
+#include "common/system.h"
+#include "common/debug.h"
+#include "common/debug-channels.h"
+#include "common/textconsole.h"
+#include "common/rect.h"
+#include "common/events.h"
+#include "common/endian.h"
+#include "common/savefile.h"
+#include "common/serializer.h"
+
+#include "image/bmp.h"
+
+#include "gui/debugger.h"
+
+#include "engines/engine.h"
+#include "engines/util.h"
+
+#include "audio/mixer.h"
+
+#include "video/flic_decoder.h"
+
+#include "prince/mob.h"
+#include "prince/object.h"
+#include "prince/pscr.h"
+
+namespace Prince {
+
+struct PrinceGameDescription;
+struct SavegameHeader;
+
+class PrinceEngine;
+class GraphicsMan;
+class Script;
+class Interpreter;
+class InterpreterFlags;
+class Debugger;
+class MusicPlayer;
+class VariaTxt;
+class Cursor;
+class MhwanhDecoder;
+class Font;
+class Hero;
+class Animation;
+class Room;
+class Pscr;
+
+struct Text {
+ const char *_str;
+ uint16 _x, _y;
+ uint16 _time;
+ uint32 _color;
+
+ Text() : _str(nullptr), _x(0), _y(0), _time(0), _color(255){
+ }
+};
+
+struct AnimListItem {
+ uint16 _type; // type of animation - for background anims RND of frame
+ uint16 _fileNumber;
+ uint16 _startPhase; // first phase number
+ uint16 _endPhase;
+ uint16 _loopPhase;
+ int16 _x;
+ int16 _y;
+ uint16 _loopType;
+ uint16 _nextAnim; // number of animation to do for loop = 3
+ uint16 _flags; // byte 0 - draw masks, byte 1 - draw in front of mask, byte 2 - load but turn off drawing
+ bool loadFromStream(Common::SeekableReadStream &stream);
+};
+
+struct BAS {
+ int32 _type; // type of sequence
+ int32 _data; // additional data
+ int32 _anims; // number of animations
+ int32 _current; // actual number of animation
+ int32 _counter; // time counter for animation
+ int32 _currRelative; //actual relative number for animation
+ int32 _data2; // additional data for measurements
+};
+
+const int kStructSizeBAS = 28;
+
+struct BASA {
+ int16 _num; // animation number
+ int16 _start; // initial frame
+ int16 _end; // final frame
+ //int16 _pad; // fulfilment to 8 bytes
+};
+
+const int kStructSizeBASA = 8;
+
+// background and normal animation
+struct Anim {
+ BASA _basaData;
+ int32 _addr; //animation adress
+ int16 _usage;
+ int16 _state; // state of animation: 0 - turning on, 1 - turning off
+ int16 _flags;
+ int16 _frame; // number of phase to show
+ int16 _lastFrame; // last phase
+ int16 _loopFrame; // first frame of loop
+ int16 _showFrame; // actual visible frame of animation
+ int16 _loopType; // type of loop (0 - last frame; 1 - normal loop (begin from _loopFrame); 2 - no loop; 3 - load new animation)
+ int16 _nextAnim; // number of next animation to load after actual
+ int16 _x;
+ int16 _y;
+ int32 _currFrame;
+ int16 _currX;
+ int16 _currY;
+ int16 _currW;
+ int16 _currH;
+ int16 _packFlag;
+ int32 _currShadowFrame;
+ int16 _packShadowFlag;
+ int32 _shadowBack;
+ int16 _relX;
+ int16 _relY;
+ Animation *_animData;
+ Animation *_shadowData;
+
+ enum AnimOffsets {
+ kAnimState = 10,
+ kAnimFrame = 14,
+ kAnimLastFrame = 16,
+ kAnimX = 26
+ };
+
+ int16 getAnimData(Anim::AnimOffsets offset) {
+ switch (offset) {
+ case kAnimState:
+ return _state;
+ case kAnimFrame:
+ return _frame + 1; // fix for location 30 - man with a dog animation
+ case kAnimX:
+ return _x;
+ default:
+ error("getAnimData() - Wrong offset type: %d", (int) offset);
+ }
+ }
+
+ void setAnimData(Anim::AnimOffsets offset, int16 value) {
+ if (offset == kAnimX) {
+ _x = value;
+ } else {
+ error("setAnimData() - Wrong offset: %d, value: %d", (int) offset, value);
+ }
+ }
+};
+
+struct BackgroundAnim {
+ BAS _seq;
+ Common::Array<Anim> backAnims;
+};
+
+enum AnimType {
+ kBackgroundAnimation,
+ kNormalAnimation
+};
+
+// Nak (PL - Nakladka)
+struct Mask {
+ uint16 _state; // visible / invisible
+ int16 _flags; // turning on / turning off of an mask
+ int16 _x1;
+ int16 _y1;
+ int16 _x2;
+ int16 _y2;
+ int16 _z;
+ int16 _number; // number of mask for background recreating
+ int16 _width;
+ int16 _height;
+ byte *_data;
+
+ int16 getX() const {
+ return READ_LE_UINT16(_data);
+ }
+
+ int16 getY() const {
+ return READ_LE_UINT16(_data + 2);
+ }
+
+ int16 getWidth() const {
+ return READ_LE_UINT16(_data + 4);
+ }
+
+ int16 getHeight() const {
+ return READ_LE_UINT16(_data + 6);
+ }
+
+ byte *getMask() const {
+ return (byte *)(_data + 8);
+ }
+};
+
+struct InvItem {
+ int _x;
+ int _y;
+ Graphics::Surface *_surface;
+ Graphics::Surface *getSurface() const { return _surface; }
+};
+
+struct DrawNode {
+ int posX;
+ int posY;
+ int posZ;
+ int32 width;
+ int32 height;
+ int32 scaleValue;
+ Graphics::Surface *s;
+ Graphics::Surface *originalRoomSurface;
+ void *data;
+ void (*drawFunction)(Graphics::Surface *, DrawNode *);
+};
+
+struct DebugChannel {
+
+enum Type {
+ kScript,
+ kEngine
+};
+
+};
+
+class PrinceEngine : public Engine {
+protected:
+ Common::Error run();
+
+public:
+ PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc);
+ virtual ~PrinceEngine();
+
+ virtual bool hasFeature(EngineFeature f) const;
+ virtual bool canSaveGameStateCurrently();
+ virtual bool canLoadGameStateCurrently();
+ virtual Common::Error saveGameState(int slot, const Common::String &desc);
+ virtual Common::Error loadGameState(int slot);
+
+ static bool readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header);
+ Common::String generateSaveName(int slot);
+ void writeSavegameHeader(Common::OutSaveFile *out, SavegameHeader &header);
+ void syncGame(Common::SeekableReadStream *readStream, Common::WriteStream *writeStream);
+ bool loadGame(int slotNumber);
+ void resetGame();
+
+ int32 _creditsDataSize;
+ byte *_creditsData;
+ void scrollCredits();
+
+ int getGameType() const;
+ const char *getGameId() const;
+ uint32 getFeatures() const;
+ Common::Language getLanguage() const;
+
+ const PrinceGameDescription *_gameDescription;
+ Video::FlicDecoder _flicPlayer;
+ const Graphics::Surface *_flcFrameSurface;
+ VariaTxt *_variaTxt;
+
+ uint32 _talkTxtSize;
+ byte *_talkTxt;
+
+ bool loadLocation(uint16 locationNr);
+ bool loadAnim(uint16 animNr, bool loop);
+ bool loadVoice(uint32 textSlot, uint32 sampleSlot, const Common::String &name);
+ bool loadSample(uint32 sampleSlot, const Common::String &name);
+ bool loadZoom(byte *zoomBitmap, uint32 dataSize, const char *resourceName);
+ bool loadShadow(byte *shadowBitmap, uint32 dataSize, const char *resourceName1, const char *resourceName2);
+ bool loadTrans(byte *transTable, const char *resourceName);
+ bool loadMobPriority(const char *resourceName);
+
+ bool loadMusic(int musNumber);
+ void stopMusic();
+
+ void playSample(uint16 sampleId, uint16 loopType);
+ void stopSample(uint16 sampleId);
+ void stopAllSamples();
+ void freeSample(uint16 sampleId);
+ void freeAllSamples();
+
+ void setVoice(uint16 slot, uint32 sampleSlot, uint16 flag);
+
+ virtual GUI::Debugger *getDebugger();
+
+ void changeCursor(uint16 curId);
+ void printAt(uint32 slot, uint8 color, char *s, uint16 x, uint16 y);
+ int calcTextLines(const char *s);
+ int calcTextTime(int numberOfLines);
+ void correctStringDEU(char *s);
+
+ static const uint8 kMaxTexts = 32;
+ Text _textSlots[kMaxTexts];
+
+ Hero *_mainHero;
+ Hero *_secondHero;
+
+ enum HeroId {
+ kMainHero,
+ kSecondHero
+ };
+
+ int _mouseFlag;
+ uint32 _currentTime;
+ uint16 _locationNr;
+ uint16 _sceneWidth;
+ int32 _picWindowX;
+ int32 _picWindowY;
+
+ Image::BitmapDecoder *_roomBmp;
+ MhwanhDecoder *_suitcaseBmp;
+ Room *_room;
+ Script *_script;
+ InterpreterFlags *_flags;
+ Interpreter *_interpreter;
+ GraphicsMan *_graph;
+ uint8 _currentMidi;
+ byte *_zoomBitmap;
+ byte *_shadowBitmap;
+ byte *_transTable;
+
+ int16 _scaleValue; // scale for hero or special shadow animation
+ int16 _lightX; // for hero shadow
+ int16 _lightY;
+ int32 _shadScaleValue;
+ int32 _shadLineLen;
+ byte *_shadowLine;
+ void setShadowScale(int32 shadowScale);
+ static void plotShadowLinePoint(int x, int y, int color, void *data);
+
+ static const int16 kFPS = 15;
+ static const int32 kIntMax = 2147483647;
+
+ static const int16 kMaxPicWidth = 1280;
+ static const int16 kMaxPicHeight = 480;
+ static const int16 kZoomStep = 4;
+ static const int32 kZoomBitmapLen = kMaxPicHeight / kZoomStep * kMaxPicWidth / kZoomStep;
+ static const int32 kShadowBitmapSize = kMaxPicWidth * kMaxPicHeight / 8;
+ static const int16 kShadowLineArraySize = 2 * 1280 * 4;
+ static const int16 kZoomBitmapWidth = kMaxPicWidth / kZoomStep;
+ static const int16 kZoomBitmapHeight = kMaxPicHeight / kZoomStep;
+ static const int16 kNormalWidth = 640;
+ static const int16 kNormalHeight = 480;
+ static const int32 kTransTableSize = 256 * 256;
+
+ static const int kMaxNormAnims = 64;
+ static const int kMaxBackAnims = 64;
+ static const int kMaxObjects = 64;
+ static const int kMaxMobs = 64;
+
+ Common::Array<DrawNode> _drawNodeList;
+ Common::Array<AnimListItem> _animList;
+ Common::Array<BackgroundAnim> _backAnimList;
+ Common::Array<Anim> _normAnimList;
+ Common::Array<Mob> _mobList;
+ Common::Array<uint32> _mobPriorityList;
+ Common::Array<Mask> _maskList;
+ Common::Array<Object *> _objList;
+ uint16 *_objSlot;
+
+ void freeNormAnim(int slot);
+ void freeAllNormAnims();
+ void removeSingleBackAnim(int slot);
+
+ Common::RandomSource _randomSource;
+
+ void checkMasks(int x1, int y1, int sprWidth, int sprHeight, int z);
+ void insertMasks(Graphics::Surface *originalRoomSurface);
+ void showMask(int maskNr, Graphics::Surface *originalRoomSurface);
+ void clsMasks();
+
+ void grabMap();
+
+ int _selectedMob; // number of selected Mob / inventory item
+ int _selectedItem; // number of item on mouse cursor
+ int _selectedMode;
+ int _currentPointerNumber;
+
+ static const int16 kMaxInv = 90; // max amount of inventory items in whole game
+ static const int16 kMaxItems = 30; // size of inventory
+
+ uint32 _invTxtSize;
+ byte *_invTxt;
+
+ Graphics::Surface *_optionsPic;
+ Graphics::Surface *_optionsPicInInventory;
+
+ bool _optionsFlag;
+ int _optionEnabled;
+ int _optionsMob;
+ int _optionsX;
+ int _optionsY;
+ int _optionsWidth;
+ int _optionsHeight;
+ int _invOptionsWidth;
+ int _invOptionsHeight;
+ int _optionsStep;
+ int _invOptionsStep;
+ int _optionsNumber;
+ int _invOptionsNumber;
+ int _optionsColor1; // color for non-selected options
+ int _optionsColor2; // color for selected option
+
+ bool _showInventoryFlag;
+ int _invExamY;
+ bool _inventoryBackgroundRemember;
+ int _invLineX;
+ int _invLineY;
+ int _invLine; // number of items in one line
+ int _invLines; // number of lines with inventory items
+ int _invLineW;
+ int _invLineH;
+ int _maxInvW;
+ int _maxInvH;
+ int _invLineSkipX;
+ int _invLineSkipY;
+ int _invX1;
+ int _invY1;
+ int _invWidth;
+ int _invHeight;
+ bool _invCurInside;
+ int _mst_shadow;
+ int _mst_shadow2; // blinking after adding new item
+ int _candleCounter; // special counter for candle inventory item
+ int _invMaxCount; // time to turn inventory on
+ int _invCounter; // turning on counter
+
+ void inventoryFlagChange(bool inventoryState);
+ bool loadAllInv();
+ void rememberScreenInv();
+ void prepareInventoryToView();
+ void drawInvItems();
+ void displayInventory();
+ void addInv(int heroId, int item, bool addItemQuiet);
+ void remInv(int heroId, int item);
+ void clearInv(int heroId);
+ void swapInv(int heroId);
+ void addInvObj();
+ void makeInvCursor(int itemNr);
+ void enableOptions(bool checkType);
+ void checkOptions();
+ void checkInvOptions();
+ void openInventoryCheck();
+
+ void leftMouseButton();
+ void rightMouseButton();
+ void inventoryLeftMouseButton();
+ void inventoryRightMouseButton();
+ void dialogLeftMouseButton(byte *string, int dialogSelected);
+
+ uint32 _dialogDatSize;
+ byte *_dialogDat;
+ byte *_dialogData; // on, off flags for lines of dialog text
+
+ byte *_dialogBoxAddr[32]; // adresses of dialog windows
+ byte *_dialogOptAddr[32]; // adresses of dialog options
+ int _dialogOptLines[4 * 32]; // numbers of initial dialog lines
+
+ byte *_dialogText;
+ int _dialogLines;
+ bool _dialogFlag;
+ int _dialogWidth;
+ int _dialogHeight;
+ int _dialogLineSpace;
+ int _dialogColor1; // color for non-selected options
+ int _dialogColor2; // color for selected option
+ Graphics::Surface *_dialogImage;
+
+ void createDialogBox(int dialogBoxNr);
+ void dialogRun();
+ void talkHero(int slot);
+ void doTalkAnim(int animNumber, int slot, AnimType animType);
+
+ static const uint8 zoomInStep = 8;
+ void initZoomIn(int slot);
+ void initZoomOut(int slot);
+ void doZoomIn(int slot);
+ void doZoomOut(int slot);
+ void freeZoomObject(int slot);
+
+ static const uint8 kFadeStep = 4;
+ void blackPalette();
+ void setPalette(const byte *palette);
+
+ int getMob(Common::Array<Mob> &mobList, bool usePriorityList, int posX, int posY);
+
+ // 'Throw a rock' mini-game:
+ static const int16 kCurveLen = 17;
+ static const int kCelStep = 4;
+ int16 *_curveData;
+ int _curvPos;
+ void makeCurve();
+ void getCurve();
+ void mouseWeirdo();
+
+ static const uint16 kPowerBarPosX = 288;
+ static const uint16 kPowerBarPosY = 430;
+ static const uint8 kPowerBarWidth = 64;
+ static const uint8 kPowerBarHeight = 16;
+ static const uint8 kPowerBarBackgroundColor = 0;
+ static const uint16 kPowerBarGreenPosY = 434;
+ static const uint8 kPowerBarGreenColor1 = 202;
+ static const uint8 kPowerBarGreenColor2 = 235;
+ static const uint8 kPowerBarGreenHeight = 8;
+ void showPower();
+
+ // Pathfinding
+ static const int16 kPathGridStep = 2;
+ static const int32 kPathBitmapLen = (kMaxPicHeight / kPathGridStep * kMaxPicWidth / kPathGridStep) / 8;
+ static const int32 kTracePts = 8000;
+ static const int32 kPBW = kMaxPicWidth / 16; // PathBitmapWidth
+ static const int kMinDistance = 2500;
+
+ byte *_roomPathBitmap; // PL - Sala
+ byte *_roomPathBitmapTemp; // PL - SSala
+ byte *_coordsBufEnd;
+ byte *_coordsBuf; // optimal path
+ byte *_coords; // last path point adress from coordsBuf
+ byte *_coordsBuf2;
+ byte *_coords2;
+ byte *_coordsBuf3;
+ byte *_coords3;
+ int _traceLineLen;
+ bool _traceLineFirstPointFlag; // if plotTraceLine after first point
+ bool _tracePointFirstPointFlag; // if plotTracePoint after first point
+ byte *_directionTable;
+ int _shanLen;
+
+ byte *_checkBitmapTemp;
+ byte *_checkBitmap;
+ int _checkMask;
+ int _checkX;
+ int _checkY;
+
+ byte *_rembBitmapTemp;
+ byte *_rembBitmap;
+ int _rembMask;
+ int _rembX;
+ int _rembY;
+
+ int _fpX;
+ int _fpY;
+
+ int drawLine(int x0, int y0, int x1, int y1, int (*plotProc)(int, int, void *), void *data);
+ bool loadPath(const char *resourceName);
+ byte *makePath(int heroId, int currX, int currY, int destX, int destY);
+ void findPoint(int x, int y);
+ int getPixelAddr(byte *pathBitmap, int x, int y);
+ static int plotTraceLine(int x, int y, void *data);
+ void specialPlotInside(int x, int y);
+ bool tracePath(int x1, int y1, int x2, int y2);
+ Direction makeDirection(int x1, int y1, int x2, int y2);
+ void specialPlot(int x, int y);
+ void specialPlot2(int x, int y);
+ void allocCoords2();
+ void freeCoords2();
+ void freeCoords3();
+ static int plotTracePoint(int x, int y, void *data);
+ void specialPlotInside2(int x, int y);
+ void approxPath();
+ void freeDirectionTable();
+ void scanDirections();
+ int scanDirectionsFindNext(byte *coords, int xDiff, int yDiff);
+ void moveShandria();
+ void walkTo();
+ void moveRunHero(int heroId, int x, int y, int dir, bool runHeroFlag);
+
+ int leftDownDir();
+ int leftDir();
+ int leftUpDir();
+ int rightDownDir();
+ int rightDir();
+ int rightUpDir();
+ int upLeftDir();
+ int upDir();
+ int upRightDir();
+ int downLeftDir();
+ int downDir();
+ int downRightDir();
+
+ int cpe();
+ int checkLeftDownDir();
+ int checkLeftDir();
+ int checkDownDir();
+ int checkUpDir();
+ int checkRightDir();
+ int checkLeftUpDir();
+ int checkRightDownDir();
+ int checkRightUpDir();
+
+private:
+ bool playNextFLCFrame();
+ void keyHandler(Common::Event event);
+ int checkMob(Graphics::Surface *screen, Common::Array<Mob> &mobList, bool usePriorityList);
+ void drawScreen();
+ void showTexts(Graphics::Surface *screen);
+ void init();
+ void showLogo();
+ void showAnim(Anim &anim);
+ void showNormAnims();
+ void setBackAnim(Anim &backAnim);
+ void showBackAnims();
+ void clearBackAnimList();
+ bool spriteCheck(int sprWidth, int sprHeight, int destX, int destY);
+ void showSprite(Graphics::Surface *spriteSurface, int destX, int destY, int destZ);
+ void showSpriteShadow(Graphics::Surface *shadowSurface, int destX, int destY, int destZ);
+ void showObjects();
+ void showParallax();
+ static bool compareDrawNodes(DrawNode d1, DrawNode d2);
+ void runDrawNodes();
+ void makeShadowTable(int brightness);
+ void pause();
+ void pause2();
+
+ uint32 getTextWidth(const char *s);
+ void debugEngine(const char *s, ...);
+
+ uint8 _cursorNr;
+
+ Common::RandomSource *_rnd;
+ Cursor *_cursor1;
+ Graphics::Surface *_cursor2;
+ Cursor *_cursor3;
+ Debugger *_debugger;
+ Font *_font;
+ MusicPlayer *_midiPlayer;
+
+ static const int kMaxSamples = 60;
+ Audio::RewindableAudioStream *_audioStream[kMaxSamples];
+ Audio::SoundHandle _soundHandle[kMaxSamples];
+
+ Common::Array<PScr *> _pscrList;
+ Common::Array<InvItem> _allInvList;
+ Common::Array<Mob> _invMobList;
+
+ bool _flicLooped;
+
+ void mainLoop();
+
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/pscr.cpp b/engines/prince/pscr.cpp
new file mode 100644
index 0000000000..d9d36a3356
--- /dev/null
+++ b/engines/prince/pscr.cpp
@@ -0,0 +1,75 @@
+/* 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 "common/archive.h"
+#include "common/stream.h"
+
+#include "prince/pscr.h"
+
+namespace Prince {
+
+PScr::PScr() : _x(0), _y(0), _step(0), _surface(nullptr)
+{
+}
+
+PScr::~PScr() {
+ if (_surface != nullptr) {
+ _surface->free();
+ delete _surface;
+ _surface = nullptr;
+ }
+}
+
+void PScr::loadSurface(Common::SeekableReadStream &stream) {
+ stream.skip(4);
+ int width = stream.readUint16LE();
+ int height = stream.readUint16LE();
+ _surface = new Graphics::Surface();
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
+
+ for (int h = 0; h < _surface->h; h++) {
+ stream.read(_surface->getBasePtr(0, h), _surface->w);
+ }
+}
+
+bool PScr::loadFromStream(Common::SeekableReadStream &stream) {
+ int32 pos = stream.pos();
+ uint16 file = stream.readUint16LE();
+ if (file == 0xFFFF) {
+ return false;
+ }
+ _x = stream.readUint16LE();
+ _y = stream.readUint16LE();
+ _step = stream.readUint16LE();
+
+ const Common::String pscrStreamName = Common::String::format("PS%02d", file);
+ Common::SeekableReadStream *pscrStream = SearchMan.createReadStreamForMember(pscrStreamName);
+ if (pscrStream != nullptr) {
+ loadSurface(*pscrStream);
+ }
+ delete pscrStream;
+ stream.seek(pos + 12); // size of PScrList struct
+
+ return true;
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/pscr.h b/engines/prince/pscr.h
new file mode 100644
index 0000000000..d59fa37d81
--- /dev/null
+++ b/engines/prince/pscr.h
@@ -0,0 +1,48 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_PSCR_H
+#define PRINCE_PSCR_H
+
+#include "graphics/surface.h"
+
+namespace Prince {
+
+class PScr {
+public:
+ PScr();
+ ~PScr();
+ int16 _x;
+ int16 _y;
+ int16 _step;
+ static const int16 kPScrZ = 1000;
+
+ bool loadFromStream(Common::SeekableReadStream &stream);
+ Graphics::Surface *getSurface() const { return _surface; }
+private:
+ void loadSurface(Common::SeekableReadStream &stream);
+ Graphics::Surface *_surface;
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/resource.h b/engines/prince/resource.h
new file mode 100644
index 0000000000..b1fbd9c4f0
--- /dev/null
+++ b/engines/prince/resource.h
@@ -0,0 +1,100 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_RESOURCE_H
+#define PRINCE_RESOURCE_H
+
+#include "common/stream.h"
+#include "common/archive.h"
+#include "common/debug-channels.h"
+#include "common/ptr.h"
+
+namespace Prince {
+
+namespace Resource {
+
+ template <typename T>
+ bool loadFromStream(T &resource, Common::SeekableReadStream &stream) {
+ return resource.loadStream(stream);
+ }
+
+ template<typename T>
+ bool loadResource(T *resource, const char *resourceName, bool required) {
+ Common::ScopedPtr<Common::SeekableReadStream> stream(SearchMan.createReadStreamForMember(resourceName));
+ if (!stream) {
+ if (required)
+ error("Can't load %s", resourceName);
+ return false;
+ }
+
+ return loadFromStream(*resource, *stream);
+ }
+
+ template <typename T>
+ bool loadResource(Common::Array<T> &array, Common::SeekableReadStream &stream, bool required = true) {
+ T t;
+ while (t.loadFromStream(stream))
+ array.push_back(t);
+
+ return true;
+ }
+
+
+ template <typename T>
+ bool loadResource(Common::Array<T> &array, const char *resourceName, bool required = true) {
+ Common::ScopedPtr<Common::SeekableReadStream> stream(SearchMan.createReadStreamForMember(resourceName));
+ if (!stream) {
+ if (required)
+ error("Can't load %s", resourceName);
+ return false;
+ }
+
+ return loadResource(array, *stream, required);
+ }
+
+ template <typename T>
+ bool loadResource(Common::Array<T *> &array, const char *resourceName, bool required = true) {
+
+ Common::ScopedPtr<Common::SeekableReadStream> stream(SearchMan.createReadStreamForMember(resourceName));
+ if (!stream) {
+ if (required)
+ error("Can't load %s", resourceName);
+ return false;
+ }
+
+ // FIXME: This is stupid. Maybe loadFromStream should be helper method that returns initiailzed object
+ while (true) {
+ T* t = new T();
+ if (!t->loadFromStream(*stream)) {
+ delete t;
+ break;
+ }
+ array.push_back(t);
+ }
+ return true;
+ }
+
+}
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/saveload.cpp b/engines/prince/saveload.cpp
new file mode 100644
index 0000000000..39a4002b40
--- /dev/null
+++ b/engines/prince/saveload.cpp
@@ -0,0 +1,514 @@
+/* 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 "prince/prince.h"
+#include "prince/graphics.h"
+#include "prince/detection.h"
+#include "prince/flags.h"
+#include "prince/script.h"
+#include "prince/hero.h"
+
+#include "common/savefile.h"
+#include "common/system.h"
+#include "common/config-manager.h"
+#include "common/memstream.h"
+
+#include "graphics/thumbnail.h"
+#include "graphics/surface.h"
+#include "graphics/palette.h"
+#include "graphics/scaler.h"
+
+namespace Prince {
+
+#define kBadSVG 99
+#define kSavegameVersion 1
+#define kSavegameStrSize 14
+#define kSavegameStr "SCUMMVM_PRINCE"
+
+class InterpreterFlags;
+class Interpreter;
+
+struct SavegameHeader {
+ uint8 version;
+ Common::String saveName;
+ Graphics::Surface *thumbnail;
+ int saveYear, saveMonth, saveDay;
+ int saveHour, saveMinutes;
+};
+
+int PrinceMetaEngine::getMaximumSaveSlot() const {
+ return 99;
+}
+
+SaveStateList PrinceMetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::StringArray filenames;
+ Common::String pattern = target;
+ pattern += ".???";
+
+ filenames = saveFileMan->listSavefiles(pattern);
+ sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
+
+ SaveStateList saveList;
+ for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); filename++) {
+ // Obtain the last 3 digits of the filename, since they correspond to the save slot
+ int slotNum = atoi(filename->c_str() + filename->size() - 3);
+
+ if (slotNum >= 0 && slotNum <= 99) {
+
+ Common::InSaveFile *file = saveFileMan->openForLoading(*filename);
+ if (file) {
+ Prince::SavegameHeader header;
+
+ // Check to see if it's a ScummVM savegame or not
+ char buffer[kSavegameStrSize + 1];
+ file->read(buffer, kSavegameStrSize + 1);
+
+ if (!strncmp(buffer, kSavegameStr, kSavegameStrSize + 1)) {
+ // Valid savegame
+ if (Prince::PrinceEngine::readSavegameHeader(file, header)) {
+ saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
+ if (header.thumbnail) {
+ header.thumbnail->free();
+ delete header.thumbnail;
+ }
+ }
+ } else {
+ // Must be an original format savegame
+ saveList.push_back(SaveStateDescriptor(slotNum, "Unknown"));
+ }
+
+ delete file;
+ }
+ }
+ }
+
+ return saveList;
+}
+
+SaveStateDescriptor PrinceMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
+ Common::String fileName = Common::String::format("%s.%03d", target, slot);
+ Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
+
+ if (f) {
+ Prince::SavegameHeader header;
+
+ // Check to see if it's a ScummVM savegame or not
+ char buffer[kSavegameStrSize + 1];
+ f->read(buffer, kSavegameStrSize + 1);
+
+ bool hasHeader = !strncmp(buffer, kSavegameStr, kSavegameStrSize + 1) &&
+ Prince::PrinceEngine::readSavegameHeader(f, header);
+ delete f;
+
+ if (!hasHeader) {
+ // Original savegame perhaps?
+ SaveStateDescriptor desc(slot, "Unknown");
+ return desc;
+ } else {
+ // Create the return descriptor
+ SaveStateDescriptor desc(slot, header.saveName);
+ desc.setThumbnail(header.thumbnail);
+ desc.setSaveDate(header.saveYear, header.saveMonth, header.saveDay);
+ desc.setSaveTime(header.saveHour, header.saveMinutes);
+
+ return desc;
+ }
+ }
+
+ return SaveStateDescriptor();
+}
+
+bool PrinceEngine::readSavegameHeader(Common::InSaveFile *in, SavegameHeader &header) {
+ header.thumbnail = nullptr;
+
+ // Get the savegame version
+ header.version = in->readByte();
+ if (header.version > kSavegameVersion)
+ return false;
+
+ // Read in the string
+ header.saveName.clear();
+ char ch;
+ while ((ch = (char)in->readByte()) != '\0')
+ header.saveName += ch;
+
+ // Get the thumbnail
+ header.thumbnail = Graphics::loadThumbnail(*in);
+ if (!header.thumbnail)
+ return false;
+
+ // Read in save date/time
+ header.saveYear = in->readSint16LE();
+ header.saveMonth = in->readSint16LE();
+ header.saveDay = in->readSint16LE();
+ header.saveHour = in->readSint16LE();
+ header.saveMinutes = in->readSint16LE();
+
+ return true;
+}
+
+void PrinceMetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::String fileName = Common::String::format("%s.%03d", target, slot);
+ g_system->getSavefileManager()->removeSavefile(fileName);
+}
+
+// TODO
+bool PrinceEngine::canSaveGameStateCurrently() {
+ return true;
+}
+
+// TODO
+bool PrinceEngine::canLoadGameStateCurrently() {
+ return true;
+}
+
+Common::Error PrinceEngine::saveGameState(int slot, const Common::String &desc) {
+ // Set up the serializer
+ Common::String slotName = generateSaveName(slot);
+ Common::OutSaveFile *saveFile = g_system->getSavefileManager()->openForSaving(slotName);
+
+ // Write out the ScummVM savegame header
+ SavegameHeader header;
+ header.saveName = desc;
+ header.version = kSavegameVersion;
+ writeSavegameHeader(saveFile, header);
+
+ // Write out the data of the savegame
+ syncGame(nullptr, saveFile);
+
+ // Finish writing out game data
+ saveFile->finalize();
+ delete saveFile;
+
+ return Common::kNoError;
+}
+
+Common::String PrinceEngine::generateSaveName(int slot) {
+ return Common::String::format("%s.%03d", _targetName.c_str(), slot);
+}
+
+void PrinceEngine::writeSavegameHeader(Common::OutSaveFile *out, SavegameHeader &header) {
+ // Write out a savegame header
+ out->write(kSavegameStr, kSavegameStrSize + 1);
+
+ out->writeByte(kSavegameVersion);
+
+ // Write savegame name
+ out->write(header.saveName.c_str(), header.saveName.size() + 1);
+
+ // Get the active palette
+ uint8 thumbPalette[256 * 3];
+ _system->getPaletteManager()->grabPalette(thumbPalette, 0, 256);
+
+ // Create a thumbnail and save it
+ Graphics::Surface *thumb = new Graphics::Surface();
+ Graphics::Surface *s = _graph->_frontScreen; // check inventory / map etc..
+ ::createThumbnail(thumb, (const byte *)s->getPixels(), s->w, s->h, thumbPalette);
+ Graphics::saveThumbnail(*out, *thumb);
+ thumb->free();
+ delete thumb;
+
+ // Write out the save date/time
+ TimeDate td;
+ g_system->getTimeAndDate(td);
+ out->writeSint16LE(td.tm_year + 1900);
+ out->writeSint16LE(td.tm_mon + 1);
+ out->writeSint16LE(td.tm_mday);
+ out->writeSint16LE(td.tm_hour);
+ out->writeSint16LE(td.tm_min);
+}
+
+void PrinceEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteStream *writeStream) {
+ int emptyRoom = 0x00;
+ int normRoom = 0xFF;
+ byte endInv = 0xFF;
+
+ Common::Serializer s(readStream, writeStream);
+
+ if (s.isSaving()) {
+ // Flag values
+ for (int i = 0; i < _flags->kMaxFlags; i++) {
+ uint32 value = _flags->getFlagValue((Flags::Id)(_flags->kFlagMask + i));
+ s.syncAsUint32LE(value);
+ }
+
+ // Dialog data
+ for (uint32 i = 0; i < _dialogDatSize; i++) {
+ byte value = _dialogDat[i];
+ s.syncAsByte(value);
+ }
+
+ // Location number
+ s.syncAsUint16LE(_locationNr);
+
+ // Rooms
+ for (int roomId = 0; roomId < _script->kMaxRooms; roomId++) {
+ Room *room = new Room();
+ room->loadRoom(_script->getRoomOffset(roomId));
+
+ if (room->_mobs) {
+ s.syncAsByte(normRoom);
+ } else {
+ s.syncAsByte(emptyRoom);
+ delete room;
+ continue;
+ }
+
+ // Mobs
+ for (int mobId = 0; mobId < kMaxMobs; mobId++) {
+ byte value = _script->getMobVisible(room->_mobs, mobId);
+ s.syncAsByte(value);
+ }
+
+ // Background animations
+ for (int backAnimSlot = 0; backAnimSlot < kMaxBackAnims; backAnimSlot++) {
+ uint32 value = _script->getBackAnimId(room->_backAnim, backAnimSlot);
+ s.syncAsUint32LE(value);
+ }
+
+ // Objects
+ for (int objectSlot = 0; objectSlot < kMaxObjects; objectSlot++) {
+ byte value = _script->getObjId(room->_obj, objectSlot);
+ s.syncAsByte(value);
+ }
+
+ delete room;
+ }
+
+ // Main hero
+ s.syncAsUint16LE(_mainHero->_visible);
+ s.syncAsUint16LE(_mainHero->_middleX);
+ s.syncAsUint16LE(_mainHero->_middleY);
+ s.syncAsUint16LE(_mainHero->_lastDirection);
+ s.syncAsUint32LE(_mainHero->_color);
+ s.syncAsUint16LE(_mainHero->_maxBoredom);
+ s.syncAsUint32LE(_mainHero->_animSetNr);
+
+ for (uint inv1Slot = 0; inv1Slot < _mainHero->_inventory.size(); inv1Slot++) {
+ s.syncAsByte(_mainHero->_inventory[inv1Slot]);
+ }
+ s.syncAsByte(endInv);
+
+ for (uint inv2Slot = 0; inv2Slot < _mainHero->_inventory2.size(); inv2Slot++) {
+ s.syncAsByte(_mainHero->_inventory2[inv2Slot]);
+ }
+ s.syncAsByte(endInv);
+
+ // Second hero
+ s.syncAsUint16LE(_secondHero->_visible);
+ s.syncAsUint16LE(_secondHero->_middleX);
+ s.syncAsUint16LE(_secondHero->_middleY);
+ s.syncAsUint16LE(_secondHero->_lastDirection);
+ s.syncAsUint32LE(_secondHero->_color);
+ s.syncAsUint16LE(_secondHero->_maxBoredom);
+ s.syncAsUint32LE(_secondHero->_animSetNr);
+
+ for (uint inv1Slot = 0; inv1Slot < _secondHero->_inventory.size(); inv1Slot++) {
+ s.syncAsByte(_secondHero->_inventory[inv1Slot]);
+ }
+ s.syncAsByte(endInv);
+
+ for (uint inv2Slot = 0; inv2Slot < _secondHero->_inventory2.size(); inv2Slot++) {
+ s.syncAsByte(_secondHero->_inventory2[inv2Slot]);
+ }
+ s.syncAsByte(endInv);
+
+ } else {
+ // Cursor reset
+ changeCursor(1);
+ _currentPointerNumber = 1;
+
+ // Flag values
+ for (int i = 0; i < _flags->kMaxFlags; i++) {
+ uint32 value = 0;
+ s.syncAsUint32LE(value);
+ _flags->setFlagValue((Flags::Id)(_flags->kFlagMask + i), value);
+ }
+
+ // Dialog data
+ for (uint32 i = 0; i < _dialogDatSize; i++) {
+ byte value = 0;
+ s.syncAsByte(value);
+ _dialogDat[i] = value;
+ }
+
+ // Location number
+ int restoreRoom = 0;
+ s.syncAsUint16LE(restoreRoom);
+ _flags->setFlagValue(Flags::RESTOREROOM, restoreRoom);
+
+ // Rooms
+ for (int roomId = 0; roomId < _script->kMaxRooms; roomId++) {
+ Room *room = new Room();
+ room->loadRoom(_script->getRoomOffset(roomId));
+
+ byte roomType = emptyRoom;
+ s.syncAsByte(roomType);
+ if (roomType == emptyRoom) {
+ delete room;
+ continue;
+ }
+
+ // Mobs
+ for (int mobId = 0; mobId < kMaxMobs; mobId++) {
+ byte value = 0;
+ s.syncAsByte(value);
+ _script->setMobVisible(room->_mobs, mobId, value);
+ }
+
+ // Background animations
+ for (int backAnimSlot = 0; backAnimSlot < kMaxBackAnims; backAnimSlot++) {
+ uint32 value = 0;
+ s.syncAsUint32LE(value);
+ _script->setBackAnimId(room->_backAnim, backAnimSlot, value);
+ }
+
+ // Objects
+ for (int objectSlot = 0; objectSlot < kMaxObjects; objectSlot++) {
+ byte value = 0;
+ s.syncAsByte(value);
+ _script->setObjId(room->_obj, objectSlot, value);
+ }
+
+ delete room;
+ }
+
+ // Main hero
+ s.syncAsUint16LE(_mainHero->_visible);
+ s.syncAsUint16LE(_mainHero->_middleX);
+ s.syncAsUint16LE(_mainHero->_middleY);
+ s.syncAsUint16LE(_mainHero->_lastDirection);
+ s.syncAsUint32LE(_mainHero->_color);
+ s.syncAsUint16LE(_mainHero->_maxBoredom);
+ s.syncAsUint32LE(_mainHero->_animSetNr);
+ _mainHero->loadAnimSet(_mainHero->_animSetNr);
+
+ _mainHero->_inventory.clear();
+ byte invId = endInv;
+ while (1) {
+ s.syncAsByte(invId);
+ if (invId == endInv) {
+ break;
+ }
+ _mainHero->_inventory.push_back(invId);
+ }
+
+ _mainHero->_inventory2.clear();
+ invId = endInv;
+ while (1) {
+ s.syncAsByte(invId);
+ if (invId == endInv) {
+ break;
+ }
+ _mainHero->_inventory2.push_back(invId);
+ }
+
+ // Second hero
+ s.syncAsUint16LE(_secondHero->_visible);
+ s.syncAsUint16LE(_secondHero->_middleX);
+ s.syncAsUint16LE(_secondHero->_middleY);
+ s.syncAsUint16LE(_secondHero->_lastDirection);
+ s.syncAsUint32LE(_secondHero->_color);
+ s.syncAsUint16LE(_secondHero->_maxBoredom);
+ s.syncAsUint32LE(_secondHero->_animSetNr);
+ _secondHero->loadAnimSet(_secondHero->_animSetNr);
+
+ _secondHero->_inventory.clear();
+ invId = endInv;
+ while (1) {
+ s.syncAsByte(invId);
+ if (invId == endInv) {
+ break;
+ }
+ _secondHero->_inventory.push_back(invId);
+ }
+
+ _secondHero->_inventory2.clear();
+ invId = endInv;
+ while (1) {
+ s.syncAsByte(invId);
+ if (invId == endInv) {
+ break;
+ }
+ _secondHero->_inventory2.push_back(invId);
+ }
+
+ // Script
+ _interpreter->setBgOpcodePC(0);
+ _interpreter->setFgOpcodePC(_script->_scriptInfo.restoreGame);
+
+ }
+}
+
+Common::Error PrinceEngine::loadGameState(int slot) {
+ if (!loadGame(slot)) {
+ return Common::kReadingFailed;
+ }
+ return Common::kNoError;
+}
+
+bool PrinceEngine::loadGame(int slotNumber) {
+ Common::MemoryReadStream *readStream;
+
+ // Open up the savegame file
+ Common::String slotName = generateSaveName(slotNumber);
+ Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(slotName);
+
+ // Read the data into a data buffer
+ int size = saveFile->size();
+ byte *dataBuffer = (byte *)malloc(size);
+ saveFile->read(dataBuffer, size);
+ readStream = new Common::MemoryReadStream(dataBuffer, size, DisposeAfterUse::YES);
+ delete saveFile;
+
+ // Check to see if it's a ScummVM savegame or not
+ char buffer[kSavegameStrSize + 1];
+ readStream->read(buffer, kSavegameStrSize + 1);
+
+ if (strncmp(buffer, kSavegameStr, kSavegameStrSize + 1) != 0) {
+ delete readStream;
+ return false;
+ } else {
+ SavegameHeader saveHeader;
+
+ if (!readSavegameHeader(readStream, saveHeader)) {
+ delete readStream;
+ return false;
+ }
+
+ // Delete the thumbnail
+ saveHeader.thumbnail->free();
+ delete saveHeader.thumbnail;
+ }
+
+ // Get in the savegame
+ syncGame(readStream, nullptr);
+ delete readStream;
+
+ // TODO
+ //syncSpeechSettings();
+
+ return true;
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp
new file mode 100644
index 0000000000..d1a0034940
--- /dev/null
+++ b/engines/prince/script.cpp
@@ -0,0 +1,2071 @@
+/* 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 "prince/script.h"
+#include "prince/prince.h"
+#include "prince/flags.h"
+#include "prince/variatxt.h"
+#include "prince/font.h"
+#include "prince/hero.h"
+#include "prince/resource.h"
+#include "prince/animation.h"
+
+#include "common/debug.h"
+#include "common/debug-channels.h"
+#include "common/archive.h"
+#include "common/memstream.h"
+
+namespace Prince {
+
+static const uint16 kNumOpcodes = 144;
+
+Room::Room() {}
+
+bool Room::loadRoom(byte *roomData) {
+ int roomSize = 64;
+ Common::MemoryReadStream roomStream(roomData, roomSize);
+
+ _mobs = roomStream.readSint32LE();
+ _backAnim = roomStream.readSint32LE();
+ _obj = roomStream.readSint32LE();
+ _nak = roomStream.readSint32LE();
+ _itemUse = roomStream.readSint32LE();
+ _itemGive = roomStream.readSint32LE();
+ _walkTo = roomStream.readSint32LE();
+ _examine = roomStream.readSint32LE();
+ _pickup = roomStream.readSint32LE();
+ _use = roomStream.readSint32LE();
+ _pushOpen = roomStream.readSint32LE();
+ _pullClose = roomStream.readSint32LE();
+ _talk = roomStream.readSint32LE();
+ _give = roomStream.readSint32LE();
+
+ return true;
+}
+
+int Room::getOptionOffset(int option) {
+ switch (option) {
+ case 0:
+ return _walkTo;
+ case 1:
+ return _examine;
+ case 2:
+ return _pickup;
+ case 3:
+ return _use;
+ case 4:
+ return _pushOpen;
+ case 5:
+ return _pullClose;
+ case 6:
+ return _talk;
+ case 7:
+ return _give;
+ default:
+ error("Wrong option - nr %d", option);
+ }
+}
+
+Script::Script(PrinceEngine *vm) : _vm(vm), _data(nullptr), _dataSize(0) {
+}
+
+Script::~Script() {
+ if (_data != nullptr) {
+ free(_data);
+ _dataSize = 0;
+ _data = nullptr;
+ }
+}
+
+bool Script::loadStream(Common::SeekableReadStream &stream) {
+ _dataSize = stream.size();
+ if (!_dataSize) {
+ return false;
+ }
+
+ _data = (byte *)malloc(_dataSize);
+
+ if (!_data) {
+ return false;
+ }
+
+ stream.read(_data, _dataSize);
+
+ Common::MemoryReadStream scriptDataStream(_data, _dataSize);
+ _scriptInfo.rooms = scriptDataStream.readSint32LE();
+ _scriptInfo.startGame = scriptDataStream.readSint32LE();
+ _scriptInfo.restoreGame = scriptDataStream.readSint32LE();
+ _scriptInfo.stdExamine = scriptDataStream.readSint32LE();
+ _scriptInfo.stdPickup = scriptDataStream.readSint32LE();
+ _scriptInfo.stdUse = scriptDataStream.readSint32LE();
+ _scriptInfo.stdOpen = scriptDataStream.readSint32LE();
+ _scriptInfo.stdClose = scriptDataStream.readSint32LE();
+ _scriptInfo.stdTalk = scriptDataStream.readSint32LE();
+ _scriptInfo.stdGive = scriptDataStream.readSint32LE();
+ _scriptInfo.usdCode = scriptDataStream.readSint32LE();
+ _scriptInfo.invObjExam = scriptDataStream.readSint32LE();
+ _scriptInfo.invObjUse = scriptDataStream.readSint32LE();
+ _scriptInfo.invObjUU = scriptDataStream.readSint32LE();
+ _scriptInfo.stdUseItem = scriptDataStream.readSint32LE();
+ _scriptInfo.lightSources = scriptDataStream.readSint32LE();
+ _scriptInfo.specRout = scriptDataStream.readSint32LE();
+ _scriptInfo.invObjGive = scriptDataStream.readSint32LE();
+ _scriptInfo.stdGiveItem = scriptDataStream.readSint32LE();
+ _scriptInfo.goTester = scriptDataStream.readSint32LE();
+
+ return true;
+}
+
+uint16 Script::readScript16(uint32 address) {
+ assert((_data + address + sizeof(uint16)) <= (_data + _dataSize));
+ uint16 data = READ_LE_UINT16(&_data[address]);
+ return data;
+}
+
+uint32 Script::readScript32(uint32 address) {
+ assert((_data + address + sizeof(uint32)) <= (_data + _dataSize));
+ uint32 data = READ_LE_UINT32(&_data[address]);
+ return data;
+}
+
+int16 Script::getLightX(int locationNr) {
+ return (int)READ_LE_UINT16(&_data[_scriptInfo.lightSources + locationNr * 8]);
+}
+
+int16 Script::getLightY(int locationNr) {
+ return (int)READ_LE_UINT16(&_data[_scriptInfo.lightSources + locationNr * 8 + 2]);
+}
+
+int32 Script::getShadowScale(int locationNr) {
+ return (int)READ_LE_UINT16(&_data[_scriptInfo.lightSources + locationNr * 8 + 4]);
+}
+
+uint32 Script::getStartGameOffset() {
+ return _scriptInfo.startGame;
+}
+
+uint32 Script::getLocationInitScript(int initRoomTableOffset, int roomNr) {
+ return (uint32)READ_LE_UINT32(&_data[initRoomTableOffset + roomNr * 4]);
+}
+
+byte Script::getMobVisible(int roomMobOffset, uint16 mob) {
+ return _data[roomMobOffset + mob];
+}
+
+void Script::setMobVisible(int roomMobOffset, uint16 mob, byte value) {
+ _data[roomMobOffset + mob] = value;
+}
+
+uint8 *Script::getRoomOffset(int locationNr) {
+ return &_data[_scriptInfo.rooms + locationNr * 64];
+}
+
+int32 Script::getOptionStandardOffset(int option) {
+ switch (option) {
+ case 1:
+ return _scriptInfo.stdExamine;
+ case 2:
+ return _scriptInfo.stdPickup;
+ case 3:
+ return _scriptInfo.stdUse;
+ case 4:
+ return _scriptInfo.stdOpen;
+ case 5:
+ return _scriptInfo.stdClose;
+ case 6:
+ return _scriptInfo.stdTalk;
+ case 7:
+ return _scriptInfo.stdGive;
+ default:
+ error("Wrong standard option - nr %d", option);
+ }
+}
+
+uint8 *Script::getHeroAnimName(int offset) {
+ return &_data[offset];
+}
+
+uint32 Script::getBackAnimId(int roomBackAnimOffset, int slot) {
+ uint32 animId = READ_LE_UINT32(&_data[roomBackAnimOffset + slot * 4]);
+ return animId;
+}
+
+void Script::setBackAnimId(int roomBackAnimOffset, int slot, int animId) {
+ WRITE_LE_UINT32(&_data[roomBackAnimOffset + slot * 4], animId);
+}
+
+byte Script::getObjId(int roomObjOffset, int slot) {
+ return _data[roomObjOffset + slot];
+}
+
+void Script::setObjId(int roomObjOffset, int slot, byte objectId) {
+ _data[roomObjOffset + slot] = objectId;
+}
+
+int Script::scanMobEvents(int mobMask, int dataEventOffset) {
+ debug("mobMask: %d", mobMask);
+ int i = 0;
+ int16 mob;
+ int32 code;
+ do {
+ mob = (int)READ_LE_UINT16(&_data[dataEventOffset + i * 6]);
+ if (mob == mobMask) {
+ code = (int)READ_LE_UINT32(&_data[dataEventOffset + i * 6 + 2]);
+ debug("code: %d", code);
+ return code;
+ }
+ i++;
+ } while (mob != -1);
+ return -1;
+}
+
+int Script::scanMobEventsWithItem(int mobMask, int dataEventOffset, int itemMask) {
+ debug("mobMask: %d", mobMask);
+ int i = 0;
+ int16 mob;
+ int16 item;
+ int32 code;
+ do {
+ mob = (int)READ_LE_UINT16(&_data[dataEventOffset + i * 8]);
+ if (mob == mobMask) {
+ item = (int)READ_LE_UINT16(&_data[dataEventOffset + i * 8 + 2]);
+ if (item == itemMask) {
+ code = (int)READ_LE_UINT32(&_data[dataEventOffset + i * 8 + 4]);
+ debug("itemMask: %d", item);
+ debug("code: %d", code);
+ return code;
+ }
+ }
+ i++;
+ } while (mob != -1);
+ return -1;
+}
+
+void Script::installSingleBackAnim(Common::Array<BackgroundAnim> &backAnimList, int slot, int roomBackAnimOffset) {
+
+ _vm->removeSingleBackAnim(slot); // free slot before loading
+
+ int offset = roomBackAnimOffset + slot * 4; // BackgroundAnim offset for selected slot number
+
+ BackgroundAnim newBackgroundAnim; // BackgroundAnim seq data and its array of Anim
+
+ int animOffset = READ_LE_UINT32(&_data[offset]); // pos of BackgroundAnim data in script
+ int anims = READ_LE_UINT32(&_data[animOffset + 8]); // amount of Anim in BackgroundAnim
+
+ if (anims == 0) {
+ anims = 1; // anims with 0 as amount in game data has just 1 animation
+ }
+
+ if (animOffset != 0) {
+ Common::MemoryReadStream stream(_data, _dataSize); // stream from script data
+ for (int i = 0; i < anims; i++) {
+ Anim newAnim;
+ stream.seek(animOffset + kStructSizeBAS + kStructSizeBASA * i);
+ // Anim BASA data
+ newAnim._basaData._num = stream.readUint16LE();
+ newAnim._basaData._start = stream.readUint16LE();
+ newAnim._basaData._end = stream.readUint16LE();
+
+ // Anim number in game files
+ int animNumber = newAnim._basaData._num;
+ const Common::String animName = Common::String::format("AN%02d", animNumber);
+ const Common::String shadowName = Common::String::format("AN%02dS", animNumber);
+ newAnim._animData = new Animation();
+ newAnim._shadowData = new Animation();
+ Resource::loadResource(newAnim._animData, animName.c_str(), true);
+ if (!Resource::loadResource(newAnim._shadowData, shadowName.c_str(), false)) {
+ delete newAnim._shadowData;
+ newAnim._shadowData = nullptr;
+ }
+
+ newAnim._usage = 0;
+ newAnim._state = 0; // enabled
+ if ((_vm->_animList[animNumber]._flags & 4)) {
+ newAnim._state = 1;
+ newAnim._frame = _vm->_animList[animNumber]._endPhase;
+ newAnim._showFrame = _vm->_animList[animNumber]._endPhase;
+ } else {
+ newAnim._frame = _vm->_animList[animNumber]._startPhase;
+ newAnim._showFrame = _vm->_animList[animNumber]._startPhase;
+ }
+ newAnim._flags = _vm->_animList[animNumber]._flags;
+ newAnim._lastFrame = _vm->_animList[animNumber]._endPhase;
+ newAnim._loopFrame = _vm->_animList[animNumber]._loopPhase;
+ newAnim._loopType = _vm->_animList[animNumber]._loopType;
+ newAnim._nextAnim = _vm->_animList[animNumber]._nextAnim;
+ newAnim._x = _vm->_animList[animNumber]._x;
+ newAnim._y = _vm->_animList[animNumber]._y;
+ newAnim._currFrame = 0;
+ newAnim._currX = _vm->_animList[animNumber]._x;
+ newAnim._currY = _vm->_animList[animNumber]._y;
+ newAnim._currW = 0;
+ newAnim._currH = 0;
+ newAnim._packFlag = 0;
+ newAnim._shadowBack = _vm->_animList[animNumber]._type;
+ newBackgroundAnim.backAnims.push_back(newAnim);
+ }
+
+ // Anim BAS data
+ stream.seek(animOffset);
+ newBackgroundAnim._seq._type = stream.readUint32LE();
+ newBackgroundAnim._seq._data = stream.readUint32LE();
+ newBackgroundAnim._seq._anims = stream.readUint32LE();
+ stream.skip(12);
+ newBackgroundAnim._seq._current = newBackgroundAnim.backAnims[0]._basaData._num;
+ newBackgroundAnim._seq._counter = 0;
+ newBackgroundAnim._seq._currRelative = 0;
+ newBackgroundAnim._seq._data2 = stream.readUint32LE();
+
+ int start = newBackgroundAnim.backAnims[0]._basaData._start; // BASA_Start of first frame
+ int end = newBackgroundAnim.backAnims[0]._basaData._end; // BASA_End of first frame
+
+ if (start != -1) {
+ newBackgroundAnim.backAnims[0]._frame = start;
+ newBackgroundAnim.backAnims[0]._showFrame = start;
+ newBackgroundAnim.backAnims[0]._loopFrame = start;
+ }
+
+ if (end != -1) {
+ newBackgroundAnim.backAnims[0]._lastFrame = end;
+ }
+
+ backAnimList[slot] = newBackgroundAnim;
+ }
+}
+
+void Script::installBackAnims(Common::Array<BackgroundAnim> &backAnimList, int roomBackAnimOffset) {
+ for (int i = 0; i < _vm->kMaxBackAnims; i++) {
+ installSingleBackAnim(backAnimList, i, roomBackAnimOffset);
+ }
+}
+
+void Script::installObjects(int offset) {
+ for (int i = 0; i < _vm->kMaxObjects; i++) {
+ _vm->_objSlot[i] = _data[offset];
+ offset++;
+ }
+}
+
+bool Script::loadAllMasks(Common::Array<Mask> &maskList, int offset) {
+ Mask tempMask;
+ while (1) {
+ Common::MemoryReadStream maskStream(_data, _dataSize);
+ maskStream.seek(offset);
+ tempMask._state = maskStream.readUint16LE();
+ if (tempMask._state == 0xffff) {
+ break;
+ }
+ tempMask._flags = maskStream.readUint16LE();
+ tempMask._x1 = maskStream.readUint16LE();
+ tempMask._y1 = maskStream.readUint16LE();
+ tempMask._x2 = maskStream.readUint16LE();
+ tempMask._y2 = maskStream.readUint16LE();
+ tempMask._z = maskStream.readUint16LE();
+ tempMask._number = maskStream.readUint16LE();
+
+ const Common::String msStreamName = Common::String::format("MS%02d", tempMask._number);
+ Common::SeekableReadStream *msStream = SearchMan.createReadStreamForMember(msStreamName);
+ if (!msStream) {
+ tempMask._width = 0;
+ tempMask._height = 0;
+ tempMask._data = nullptr;
+ debug("Can't load %s", msStreamName.c_str());
+ delete msStream;
+ } else {
+ int32 dataSize = msStream->size();
+ if (dataSize != -1) {
+ tempMask._data = (byte *)malloc(dataSize);
+ if (msStream->read(tempMask._data, dataSize) != (uint32)dataSize) {
+ free(tempMask._data);
+ delete msStream;
+ return false;
+ }
+ delete msStream;
+ }
+ tempMask._width = tempMask.getWidth();
+ tempMask._height = tempMask.getHeight();
+ }
+
+ maskList.push_back(tempMask);
+ offset += 16; // size of Mask (Nak) struct
+ }
+ return true;
+}
+
+InterpreterFlags::InterpreterFlags() {
+ resetAllFlags();
+}
+
+void InterpreterFlags::resetAllFlags() {
+ memset(_flags, 0, sizeof(_flags));
+}
+
+void InterpreterFlags::setFlagValue(Flags::Id flagId, int32 value) {
+ _flags[(uint32)flagId - kFlagMask] = value;
+}
+
+int32 InterpreterFlags::getFlagValue(Flags::Id flagId) {
+ return _flags[(uint32)flagId - kFlagMask];
+}
+
+Interpreter::Interpreter(PrinceEngine *vm, Script *script, InterpreterFlags *flags) :
+ _vm(vm), _script(script), _flags(flags),
+ _stacktop(0), _opcodeNF(false), _opcodeEnd(false),
+ _waitFlag(0), _result(true) {
+
+ // Initialize the script
+ _mode = "fg";
+ _fgOpcodePC = _script->getStartGameOffset();
+ _bgOpcodePC = 0;
+}
+
+void Interpreter::debugInterpreter(const char *s, ...) {
+ char buf[STRINGBUFLEN];
+ va_list va;
+ va_start(va, s);
+ vsnprintf(buf, STRINGBUFLEN, s, va);
+ va_end(va);
+
+ Common::String str = Common::String::format("@0x%08X: ", _lastInstruction);
+ str += Common::String::format("op %04d: ", _lastOpcode);
+ //debugC(10, DebugChannel::kScript, "PrinceEngine::Script %s %s", str.c_str(), buf);
+ if (!strcmp(_mode, "fg")) {
+ debug(10, "PrinceEngine::Script %s %s", str.c_str(), buf);
+ }
+ //debug("Prince::Script mode %s %s %s", _mode, str.c_str(), buf);
+}
+
+void Interpreter::stepBg() {
+ if (_bgOpcodePC) {
+ _mode = "bg";
+ _bgOpcodePC = step(_bgOpcodePC);
+ }
+}
+
+void Interpreter::stepFg() {
+ if (_fgOpcodePC) {
+ _mode = "fg";
+ _fgOpcodePC = step(_fgOpcodePC);
+ }
+}
+
+uint32 Interpreter::step(uint32 opcodePC) {
+ _currentInstruction = opcodePC;
+
+ while (!_opcodeNF) {
+ _lastInstruction = _currentInstruction;
+
+ // Get the current opcode
+ _lastOpcode = readScript16();
+
+ if (_lastOpcode >= kNumOpcodes)
+ error(
+ "Trying to execute unknown opcode @0x%04X: %02d",
+ _currentInstruction,
+ _lastOpcode);
+
+ // Execute the current opcode
+ OpcodeFunc op = _opcodes[_lastOpcode];
+ (this->*op)();
+ if (_opcodeNF) {
+ _opcodeNF = 0;
+ break;
+ }
+ }
+
+ if (_opcodeEnd) {
+ _vm->quitGame();
+ }
+
+ return _currentInstruction;
+}
+
+void Interpreter::storeNewPC(int opcodePC) {
+ if (_flags->getFlagValue(Flags::GETACTION) == 1) {
+ _flags->setFlagValue(Flags::GETACTIONDATA, opcodePC);
+ opcodePC = _flags->getFlagValue(Flags::GETACTIONBACK);
+ }
+ _fgOpcodePC = opcodePC;
+}
+
+int Interpreter::getLastOPCode() {
+ return _lastOpcode;
+}
+
+int Interpreter::getFgOpcodePC() {
+ return _fgOpcodePC;
+}
+
+uint32 Interpreter::getCurrentString() {
+ return _currentString;
+}
+
+void Interpreter::setCurrentString(uint32 value) {
+ _currentString = value;
+}
+
+byte *Interpreter::getString() {
+ return _string;
+}
+
+void Interpreter::setString(byte *newString) {
+ _string = newString;
+}
+
+void Interpreter::increaseString() {
+ while (*_string) {
+ _string++;
+ }
+ _string++;
+}
+
+void Interpreter::setResult(byte value) {
+ _result = value;
+}
+
+void Interpreter::setBgOpcodePC(uint32 value) {
+ _bgOpcodePC = value;
+}
+
+void Interpreter::setFgOpcodePC(uint32 value) {
+ _fgOpcodePC = value;
+}
+
+uint16 Interpreter::readScript16() {
+ uint16 data = _script->readScript16(_currentInstruction);
+ _currentInstruction += sizeof(uint16);
+ return data;
+}
+
+uint32 Interpreter::readScript32() {
+ uint32 data = _script->readScript32(_currentInstruction);
+ _currentInstruction += sizeof(uint32);
+ return data;
+}
+
+int32 Interpreter::readScriptFlagValue() {
+ uint16 value = readScript16();
+ if (value & InterpreterFlags::kFlagMask) {
+ return _flags->getFlagValue((Flags::Id)value);
+ }
+ return value;
+}
+
+Flags::Id Interpreter::readScriptFlagId() {
+ return (Flags::Id)readScript16();
+}
+
+void Interpreter::O_WAITFOREVER() {
+ _vm->changeCursor(_vm->_currentPointerNumber);
+ _opcodeNF = 1;
+ _currentInstruction -= 2;
+ //debugInterpreter("O_WAITFOREVER");
+}
+
+void Interpreter::O_BLACKPALETTE() {
+ _vm->blackPalette();
+ debugInterpreter("O_BLACKPALETTE");
+}
+
+void Interpreter::O_SETUPPALETTE() {
+ _vm->setPalette(_vm->_roomBmp->getPalette());
+ debugInterpreter("O_SETUPPALETTE");
+}
+
+void Interpreter::O_INITROOM() {
+ int32 roomId = readScriptFlagValue();
+ _vm->loadLocation(roomId);
+ _opcodeNF = 1;
+ debugInterpreter("O_INITROOM %d", roomId);
+}
+
+void Interpreter::O_SETSAMPLE() {
+ int32 sampleId = readScriptFlagValue();
+ int32 sampleNameOffset = readScript32();
+ const char *sampleName = _script->getString(_currentInstruction + sampleNameOffset - 4);
+ _vm->loadSample(sampleId, sampleName);
+ debugInterpreter("O_SETSAMPLE %d %s", sampleId, sampleName);
+}
+
+void Interpreter::O_FREESAMPLE() {
+ int32 sampleId = readScriptFlagValue();
+ _vm->freeSample(sampleId);
+ debugInterpreter("O_FREESAMPLE sampleId: %d", sampleId);
+}
+
+void Interpreter::O_PLAYSAMPLE() {
+ int32 sampleId = readScriptFlagValue();
+ uint16 loopType = readScript16();
+ _vm->playSample(sampleId, loopType);
+ debugInterpreter("O_PLAYSAMPLE sampleId %d loopType %d", sampleId, loopType);
+}
+
+void Interpreter::O_PUTOBJECT() {
+ int32 roomId = readScriptFlagValue();
+ int32 slot = readScriptFlagValue();
+ int32 objectId = readScriptFlagValue();
+ Room *room = new Room();
+ room->loadRoom(_script->getRoomOffset(roomId));
+ _vm->_script->setObjId(room->_obj, slot, objectId);
+ if (_vm->_locationNr == roomId) {
+ _vm->_objSlot[slot] = objectId;
+ }
+ delete room;
+ debugInterpreter("O_PUTOBJECT roomId %d, slot %d, objectId %d", roomId, slot, objectId);
+}
+
+void Interpreter::O_REMOBJECT() {
+ int32 roomId = readScriptFlagValue();
+ int32 slot = readScriptFlagValue();
+ Room *room = new Room();
+ room->loadRoom(_script->getRoomOffset(roomId));
+ _vm->_script->setObjId(room->_obj, slot, 0xFF);
+ if (_vm->_locationNr == roomId) {
+ _vm->_objSlot[slot] = 0xFF;
+ }
+ delete room;
+ debugInterpreter("O_REMOBJECT roomId %d slot %d", roomId, slot);
+}
+
+void Interpreter::O_SHOWANIM() {
+ int32 slot = readScriptFlagValue();
+ int32 animId = readScriptFlagValue();
+ _vm->freeNormAnim(slot);
+ Anim &anim = _vm->_normAnimList[slot];
+ AnimListItem &animList = _vm->_animList[animId];
+ anim._currFrame = 0;
+ anim._packFlag = 0;
+ anim._state = 0;
+ anim._frame = animList._startPhase;
+ anim._showFrame = animList._startPhase;
+ anim._lastFrame = animList._endPhase;
+ anim._loopFrame = animList._loopPhase;
+ anim._x = animList._x;
+ anim._y = animList._y;
+ anim._loopType = animList._loopType;
+ anim._shadowBack = animList._type;
+ anim._flags = animList._flags;
+ anim._nextAnim = animList._nextAnim;
+ int fileNumber = animList._fileNumber;
+ const Common::String animName = Common::String::format("AN%02d", fileNumber);
+ const Common::String shadowName = Common::String::format("AN%02dS", fileNumber);
+ anim._animData = new Animation();
+ anim._shadowData = new Animation();
+ Resource::loadResource(anim._animData, animName.c_str(), true);
+ if (!Resource::loadResource(anim._shadowData, shadowName.c_str(), false)) {
+ delete anim._shadowData;
+ anim._shadowData = nullptr;
+ }
+
+ // WALKAROUND: fix for turning off bard's wife background animation
+ // in front of bard's house (location 7) after giving her poem (item 33)
+ // in script: GiveLetter (line 11082)
+ if (_currentInstruction == kGiveLetterScriptFix) {
+ _vm->_backAnimList[1].backAnims[0]._state = 1;
+ }
+
+ debugInterpreter("O_SHOWANIM slot %d, animId %d", slot, animId);
+}
+
+void Interpreter::O_CHECKANIMEND() {
+ int32 slot = readScriptFlagValue();
+ if (_vm->_normAnimList[slot]._frame != _vm->_normAnimList[slot]._lastFrame - 1) {
+ _currentInstruction -= 4;
+ _opcodeNF = 1;
+ }
+ debugInterpreter("O_CHECKANIMEND slot %d", slot);
+}
+
+void Interpreter::O_FREEANIM() {
+ int32 slot = readScriptFlagValue();
+ _vm->freeNormAnim(slot);
+ debugInterpreter("O_FREEANIM slot %d", slot);
+}
+
+void Interpreter::O_CHECKANIMFRAME() {
+ int32 slot = readScriptFlagValue();
+ int32 frameNumber = readScriptFlagValue();
+ if (_vm->_normAnimList[slot]._frame != frameNumber - 1) {
+ _currentInstruction -= 6;
+ _opcodeNF = 1;
+ }
+ debugInterpreter("O_CHECKANIMFRAME slot %d, frameNumber %d", slot, frameNumber);
+}
+
+void Interpreter::O_PUTBACKANIM() {
+ int32 roomId = readScriptFlagValue();
+ int32 slot = readScriptFlagValue();
+ int32 animId = readScript32();
+ Room *room = new Room();
+ room->loadRoom(_script->getRoomOffset(roomId));
+ _vm->_script->setBackAnimId(room->_backAnim, slot, animId);
+ if (_vm->_locationNr == roomId) {
+ _vm->_script->installSingleBackAnim(_vm->_backAnimList, slot, room->_backAnim);
+ }
+ delete room;
+ debugInterpreter("O_PUTBACKANIM roomId %d, slot %d, animId %d", roomId, slot, animId);
+}
+
+void Interpreter::O_REMBACKANIM() {
+ int32 roomId = readScriptFlagValue();
+ int32 slot = readScriptFlagValue();
+ if (_vm->_locationNr == roomId) {
+ _vm->removeSingleBackAnim(slot);
+ }
+ Room *room = new Room();
+ room->loadRoom(_script->getRoomOffset(roomId));
+ _vm->_script->setBackAnimId(room->_backAnim, slot, 0);
+ delete room;
+ debugInterpreter("O_REMBACKANIM roomId %d, slot %d", roomId, slot);
+}
+
+void Interpreter::O_CHECKBACKANIMFRAME() {
+ int32 slotId = readScriptFlagValue();
+ int32 frameId = readScriptFlagValue();
+ int currAnim = _vm->_backAnimList[slotId]._seq._currRelative;
+ if (_vm->_backAnimList[slotId].backAnims[currAnim]._frame != frameId - 1) {
+ _currentInstruction -= 6;
+ _opcodeNF = 1;
+ }
+ debugInterpreter("O_CHECKBACKANIMFRAME slotId %d, frameId %d", slotId, frameId);
+}
+
+// Not used in script
+void Interpreter::O_FREEALLSAMPLES() {
+ error("O_FREEALLSAMPLES");
+}
+
+void Interpreter::O_SETMUSIC() {
+ uint16 musicId = readScript16();
+ _vm->loadMusic(musicId);
+ debugInterpreter("O_SETMUSIC musicId %d", musicId);
+}
+
+void Interpreter::O_STOPMUSIC() {
+ _vm->stopMusic();
+ debugInterpreter("O_STOPMUSIC");
+}
+
+void Interpreter::O__WAIT() {
+ int32 pause = readScriptFlagValue();
+ debugInterpreter("O__WAIT pause %d", pause);
+ if (!_waitFlag) {
+ // set new wait flag value and continue
+ _waitFlag = pause;
+ _opcodeNF = 1;
+ _currentInstruction -= 4;
+ return;
+ }
+ _waitFlag--;
+ if (_waitFlag > 0) {
+ _opcodeNF = 1;
+ _currentInstruction -= 4;
+ return;
+ }
+}
+
+// Not used in script
+void Interpreter::O_UPDATEOFF() {
+ error("O_UPDATEOFF");
+}
+
+// Not used in script
+void Interpreter::O_UPDATEON() {
+ error("O_UPDATEON");
+}
+
+// Not used in script
+void Interpreter::O_UPDATE () {
+ error("O_UPDATE");
+}
+
+// Not used in script
+void Interpreter::O_CLS() {
+ error("O_CLS");
+}
+
+void Interpreter::O__CALL() {
+ int32 address = readScript32();
+ _stack[_stacktop] = _currentInstruction;
+ _stacktop++;
+ _currentInstruction += address - 4;
+ debugInterpreter("O__CALL 0x%04X", _currentInstruction);
+}
+
+void Interpreter::O_RETURN() {
+ if (_stacktop > 0) {
+ _stacktop--;
+ _currentInstruction = _stack[_stacktop];
+ debugInterpreter("O_RETURN 0x%04X", _currentInstruction);
+ } else {
+ error("O_RETURN: Stack is empty");
+ }
+}
+
+void Interpreter::O_GO() {
+ int32 opPC = readScript32();
+ _currentInstruction += opPC - 4;
+ debugInterpreter("O_GO 0x%04X", opPC);
+}
+
+void Interpreter::O_BACKANIMUPDATEOFF() {
+ int32 slotId = readScriptFlagValue();
+ int currAnim = _vm->_backAnimList[slotId]._seq._currRelative;
+ if (!_vm->_backAnimList[slotId].backAnims.empty()) {
+ _vm->_backAnimList[slotId].backAnims[currAnim]._state = 1;
+ }
+ debugInterpreter("O_BACKANIMUPDATEOFF slotId %d", slotId);
+}
+
+void Interpreter::O_BACKANIMUPDATEON() {
+ int32 slotId = readScriptFlagValue();
+ int currAnim = _vm->_backAnimList[slotId]._seq._currRelative;
+ if (!_vm->_backAnimList[slotId].backAnims.empty()) {
+ _vm->_backAnimList[slotId].backAnims[currAnim]._state = 0;
+ }
+ debugInterpreter("O_BACKANIMUPDATEON slotId %d", slotId);
+}
+
+void Interpreter::O_CHANGECURSOR() {
+ int32 cursorId = readScriptFlagValue();
+ _vm->changeCursor(cursorId);
+ debugInterpreter("O_CHANGECURSOR %x", cursorId);
+}
+
+// Not used in script
+void Interpreter::O_CHANGEANIMTYPE() {
+ error("O_CHANGEANIMTYPE");
+}
+
+void Interpreter::O__SETFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ _flags->setFlagValue((Flags::Id)(flagId), value);
+ debugInterpreter("O__SETFLAG 0x%04X (%s) = %d", flagId, Flags::getFlagName(flagId), value);
+}
+
+void Interpreter::O_COMPARE() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ _result = _flags->getFlagValue(flagId) != value;
+ debugInterpreter("O_COMPARE flagId 0x%04X (%s), value %d == %d (%d)", flagId, Flags::getFlagName(flagId), value, _flags->getFlagValue(flagId), _result);
+}
+
+void Interpreter::O_JUMPZ() {
+ int32 offset = readScript32();
+ if (!_result) {
+ _currentInstruction += offset - 4;
+ }
+ debugInterpreter("O_JUMPZ result = %d, next %08x, offset 0x%08X", _result, _currentInstruction, offset);
+}
+
+void Interpreter::O_JUMPNZ() {
+ int32 offset = readScript32();
+ if (_result) {
+ _currentInstruction += offset - 4;
+ }
+ debugInterpreter("O_JUMPNZ result = %d, next %08x, offset 0x%08X", _result, _currentInstruction, offset);
+}
+
+void Interpreter::O_EXIT() {
+ int32 exitCode = readScriptFlagValue();
+ _opcodeEnd = true;
+ _opcodeNF = 1;
+ if (exitCode == 0x2EAD) {
+ _vm->scrollCredits();
+ }
+ debugInterpreter("O_EXIT exitCode %d", exitCode);
+}
+
+void Interpreter::O_ADDFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ _flags->setFlagValue(flagId, _flags->getFlagValue(flagId) + value);
+ if (_flags->getFlagValue(flagId)) {
+ _result = 1;
+ }
+ else {
+ _result = 0;
+ }
+ debugInterpreter("O_ADDFLAG flagId %04x (%s), value %d", flagId, Flags::getFlagName(flagId), value);
+}
+
+void Interpreter::O_TALKANIM() {
+ int32 animNumber = readScriptFlagValue();
+ int32 slot = readScriptFlagValue();
+ _vm->doTalkAnim(animNumber, slot, kNormalAnimation);
+ debugInterpreter("O_TALKANIM animNumber %d, slot %d", animNumber, slot);
+}
+
+void Interpreter::O_SUBFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ _flags->setFlagValue(flagId, _flags->getFlagValue(flagId) - value);
+ if (_flags->getFlagValue(flagId)) {
+ _result = 1;
+ }
+ else {
+ _result = 0;
+ }
+ debugInterpreter("O_SUBFLAG flagId %d, value %d", flagId, value);
+}
+
+void Interpreter::O_SETSTRING() {
+ int32 offset = readScript32();
+ _currentString = offset;
+ if (offset >= 80000) {
+ _string = _vm->_variaTxt->getString(offset - 80000);
+ debugInterpreter("GetVaria %s", _string);
+ }
+ else if (offset < 2000) {
+ _vm->_dialogData = &_vm->_dialogDat[offset * 4 - 4];
+ uint32 of = READ_LE_UINT32(_vm->_talkTxt + offset * 4);
+ const char *txt = (const char *)&_vm->_talkTxt[of];
+ _string = &_vm->_talkTxt[of];
+ debugInterpreter("TalkTxt %d %s", of, txt);
+ }
+ debugInterpreter("O_SETSTRING %04d", offset);
+}
+
+void Interpreter::O_ANDFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ _flags->setFlagValue(flagId, _flags->getFlagValue(flagId) & value);
+ if (_flags->getFlagValue(flagId)) {
+ _result = 1;
+ } else {
+ _result = 0;
+ }
+ debugInterpreter("O_ANDFLAG flagId %d, value %d", flagId, value);
+}
+
+void Interpreter::O_GETMOBDATA() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 mobId = readScriptFlagValue();
+ int32 mobOffset = readScriptFlagValue();
+ int16 value = _vm->_mobList[mobId].getData((Mob::AttrId)mobOffset);
+ _flags->setFlagValue(flagId, value);
+ debugInterpreter("O_GETMOBDATA flagId %d, modId %d, mobOffset %d", flagId, mobId, mobOffset);
+}
+
+void Interpreter::O_ORFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ _flags->setFlagValue(flagId, _flags->getFlagValue(flagId) | value);
+ if (_flags->getFlagValue(flagId)) {
+ _result = 1;
+ } else {
+ _result = 0;
+ }
+ debugInterpreter("O_ORFLAG flagId %d, value %d", flagId, value);
+}
+
+void Interpreter::O_SETMOBDATA() {
+ int32 mobId = readScriptFlagValue();
+ int32 mobOffset = readScriptFlagValue();
+ int32 value = readScriptFlagValue();
+ _vm->_mobList[mobId].setData((Mob::AttrId)mobOffset, value);
+ debugInterpreter("O_SETMOBDATA mobId %d, mobOffset %d, value %d", mobId, mobOffset, value);
+}
+
+void Interpreter::O_XORFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ _flags->setFlagValue(flagId, _flags->getFlagValue(flagId) ^ value);
+ if (_flags->getFlagValue(flagId)) {
+ _result = 1;
+ } else {
+ _result = 0;
+ }
+ debugInterpreter("O_XORFLAG flagId %d, value %d", flagId, value);
+}
+
+void Interpreter::O_GETMOBTEXT() {
+ int32 mob = readScriptFlagValue();
+ _currentString = _vm->_locationNr * 100 + mob + 60001;
+ _string = (byte *)_vm->_mobList[mob]._examText.c_str();
+ debugInterpreter("O_GETMOBTEXT mob %d", mob);
+}
+
+void Interpreter::O_MOVEHERO() {
+ int32 heroId = readScriptFlagValue();
+ int32 x = readScriptFlagValue();
+ int32 y = readScriptFlagValue();
+ int32 dir = readScriptFlagValue();
+ _vm->moveRunHero(heroId, x, y, dir, false);
+ debugInterpreter("O_MOVEHERO heroId %d, x %d, y %d, dir %d", heroId, x, y, dir);
+}
+
+void Interpreter::O_WALKHERO() {
+ int32 heroId = readScriptFlagValue();
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _vm->_mainHero;
+ } else if (heroId == 1) {
+ hero = _vm->_secondHero;
+ }
+ if (hero != nullptr) {
+ if (hero->_state != Hero::kHeroStateStay) {
+ _currentInstruction -= 4;
+ _opcodeNF = 1;
+ }
+ }
+ debugInterpreter("O_WALKHERO %d", heroId);
+}
+
+void Interpreter::O_SETHERO() {
+ int32 heroId = readScriptFlagValue();
+ int32 x = readScriptFlagValue();
+ int32 y = readScriptFlagValue();
+ int32 dir = readScriptFlagValue();
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _vm->_mainHero;
+ } else if (heroId == 1) {
+ hero = _vm->_secondHero;
+ }
+ if (hero != nullptr) {
+ hero->setPos(x, y);
+ hero->_lastDirection = dir;
+ hero->_visible = 1;
+ hero->countDrawPosition();
+ }
+ debugInterpreter("O_SETHERO heroId %d, x %d, y %d, dir %d", heroId, x, y, dir);
+}
+
+void Interpreter::O_HEROOFF() {
+ int32 heroId = readScriptFlagValue();
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _vm->_mainHero;
+ } else if (heroId == 1) {
+ hero = _vm->_secondHero;
+ }
+ if (hero != nullptr) {
+ hero->setVisible(false);
+ }
+ debugInterpreter("O_HEROOFF %d", heroId);
+}
+
+void Interpreter::O_HEROON() {
+ int32 heroId = readScriptFlagValue();
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _vm->_mainHero;
+ } else if (heroId == 1) {
+ hero = _vm->_secondHero;
+ }
+ if (hero != nullptr) {
+ hero->setVisible(true);
+ }
+ debugInterpreter("O_HEROON %d", heroId);
+}
+
+void Interpreter::O_CLSTEXT() {
+ int32 slot = readScriptFlagValue();
+ _vm->_textSlots[slot]._str = nullptr;
+ _vm->_textSlots[slot]._time = 0;
+ debugInterpreter("O_CLSTEXT slot %d", slot);
+}
+
+void Interpreter::O_CALLTABLE() {
+ Flags::Id flagId = readScriptFlagId();
+ int roomNr = _flags->getFlagValue(flagId);
+ int32 tableOffset = readScript32();
+ int initLocationScript = _script->getLocationInitScript(tableOffset, roomNr);
+ if (initLocationScript) {
+ _stack[_stacktop] = _currentInstruction;
+ _stacktop++;
+ _currentInstruction = initLocationScript;
+ }
+ debugInterpreter("O_CALLTABLE loc %d", roomNr);
+}
+
+void Interpreter::O_CHANGEMOB() {
+ int32 mob = readScriptFlagValue();
+ int32 value = readScriptFlagValue();
+ value ^= 1;
+ _vm->_script->setMobVisible(_vm->_room->_mobs, mob, value);
+ _vm->_mobList[mob]._visible = value;
+ debugInterpreter("O_CHANGEMOB mob %d, value %d", mob, value);
+}
+
+void Interpreter::O_ADDINV() {
+ int32 hero = readScriptFlagValue();
+ int32 item = readScriptFlagValue();
+ _vm->addInv(hero, item, false);
+ debugInterpreter("O_ADDINV hero %d, item %d", hero, item);
+}
+
+void Interpreter::O_REMINV() {
+ int32 hero = readScriptFlagValue();
+ int32 item = readScriptFlagValue();
+ _vm->remInv(hero, item);
+ debugInterpreter("O_REMINV hero %d, item %d", hero, item);
+}
+
+// Not used in script
+void Interpreter::O_REPINV() {
+ error("O_REPINV");
+}
+
+// Not used in script
+void Interpreter::O_OBSOLETE_GETACTION() {
+ error("O_OBSOLETE_GETACTION");
+}
+
+// Not used in script
+void Interpreter::O_ADDWALKAREA() {
+ error("O_ADDWALKAREA");
+}
+
+// Not used in script
+void Interpreter::O_REMWALKAREA() {
+ error("O_REMWALKAREA");
+}
+
+ // Not used in script
+void Interpreter::O_RESTOREWALKAREA() {
+ error("O_RESTOREWALKAREA");
+}
+
+void Interpreter::O_WAITFRAME() {
+ _opcodeNF = true;
+ debugInterpreter("O_WAITFRAME");
+}
+
+void Interpreter::O_SETFRAME() {
+ int32 anim = readScriptFlagValue();
+ int32 frame = readScriptFlagValue();
+ _vm->_normAnimList[anim]._frame = frame;
+ debugInterpreter("O_SETFRAME anim %d, frame %d", anim, frame);
+}
+
+// Not used in script
+void Interpreter::O_RUNACTION() {
+ error("O_RUNACTION");
+}
+
+void Interpreter::O_COMPAREHI() {
+ Flags::Id flag = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ int32 flagValue = _flags->getFlagValue(flag);
+ if (flagValue > value) {
+ _result = 0;
+ } else {
+ _result = 1;
+ }
+ debugInterpreter("O_COMPAREHI flag %04x - (%s), value %d, flagValue %d, result %d", flag, Flags::getFlagName(flag), value, flagValue, _result);
+}
+
+void Interpreter::O_COMPARELO() {
+ Flags::Id flag = readScriptFlagId();
+ int32 value = readScriptFlagValue();
+ int32 flagValue = _flags->getFlagValue(flag);
+ if (flagValue < value) {
+ _result = 0;
+ } else {
+ _result = 1;
+ }
+ debugInterpreter("O_COMPARELO flag %04x - (%s), value %d, flagValue %d, result %d", flag, Flags::getFlagName(flag), value, flagValue, _result);
+}
+
+// Not used in script
+void Interpreter::O_PRELOADSET() {
+ error("O_PRELOADSET");
+}
+
+// Not used in script
+void Interpreter::O_FREEPRELOAD() {
+ error("O_FREEPRELOAD");
+}
+
+// Not used in script
+void Interpreter::O_CHECKINV() {
+ error("O_CHECKINV");
+}
+
+void Interpreter::O_TALKHERO() {
+ int32 hero = readScriptFlagValue();
+ _vm->talkHero(hero);
+ debugInterpreter("O_TALKHERO hero %d", hero);
+}
+
+void Interpreter::O_WAITTEXT() {
+ int32 slot = readScriptFlagValue();
+ Text &text = _vm->_textSlots[slot];
+ if (text._time && text._str) {
+ if (_flags->getFlagValue(Flags::ESCAPED)) {
+ text._time = 1;
+ if (!slot) {
+ _vm->_mainHero->_talkTime = 1;
+ } else if (slot == 1) {
+ _vm->_secondHero->_talkTime = 1;
+ }
+ } else {
+ _opcodeNF = 1;
+ _currentInstruction -= 4;
+ }
+ }
+ //debugInterpreter("O_WAITTEXT slot %d", slot);
+}
+
+void Interpreter::O_SETHEROANIM() {
+ int32 heroId = readScriptFlagValue();
+ int32 offset = readScript32();
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _vm->_mainHero;
+ } else {
+ hero = _vm->_secondHero;
+ }
+ if (hero != nullptr) {
+ hero->freeHeroAnim();
+ if (hero ->_specAnim == nullptr) {
+ hero->_specAnim = new Animation();
+ if (offset < 100) {
+ const Common::String animName = Common::String::format("AN%02d", offset);
+ Resource::loadResource(hero->_specAnim, animName.c_str(), true);
+ } else {
+ const Common::String animName = Common::String((const char *)_script->getHeroAnimName(offset));
+ Common::String normalizedPath = lastPathComponent(animName, '\\');
+ Resource::loadResource(hero->_specAnim, normalizedPath.c_str(), true);
+ }
+ hero->_phase = 0;
+ hero->_state = Hero::kHeroStateSpec;
+ }
+ }
+ debugInterpreter("O_SETHEROANIM hero %d, offset %d", hero, offset);
+}
+
+void Interpreter::O_WAITHEROANIM() {
+ int32 heroId = readScriptFlagValue();
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _vm->_mainHero;
+ } else {
+ hero = _vm->_secondHero;
+ }
+ if (hero != nullptr) {
+ if (hero->_state == Hero::kHeroStateSpec) {
+ _currentInstruction -= 4;
+ _opcodeNF = 1;
+ }
+ }
+ debugInterpreter("O_WAITHEROANIM heroId %d", heroId);
+}
+
+void Interpreter::O_GETHERODATA() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 heroId = readScriptFlagValue();
+ int32 heroOffset = readScriptFlagValue();
+ Hero *hero = nullptr;
+ if (!heroId) {
+ hero = _vm->_mainHero;
+ } else {
+ hero = _vm->_secondHero;
+ }
+ if (hero != nullptr) {
+ _flags->setFlagValue(flagId, hero->getData((Hero::AttrId)heroOffset));
+ }
+ debugInterpreter("O_GETHERODATA flag %04x - (%s), heroId %d, heroOffset %d", flagId, Flags::getFlagName(flagId), heroId, heroOffset);
+}
+
+// No need of implementation here
+void Interpreter::O_GETMOUSEBUTTON() {
+ debugInterpreter("O_GETMOUSEBUTTON");
+}
+
+void Interpreter::O_CHANGEFRAMES() {
+ int32 anim = readScriptFlagValue();
+ int32 frame = readScriptFlagValue();
+ int32 lastFrame = readScriptFlagValue();
+ int32 loopFrame = readScriptFlagValue();
+ _vm->_normAnimList[anim]._frame = frame;
+ _vm->_normAnimList[anim]._lastFrame = lastFrame;
+ _vm->_normAnimList[anim]._loopFrame = loopFrame;
+ debugInterpreter("O_CHANGFRAMES anim %d, frame %d, lastFrame %d, loopFrame %d", anim, frame, lastFrame, loopFrame);
+}
+
+void Interpreter::O_CHANGEBACKFRAMES() {
+ int32 anim = readScriptFlagValue();
+ int32 frame = readScriptFlagValue();
+ int32 lastFrame = readScriptFlagValue();
+ int32 loopFrame = readScriptFlagValue();
+ int currAnim = _vm->_backAnimList[anim]._seq._currRelative;
+ Anim &backAnim = _vm->_backAnimList[anim].backAnims[currAnim];
+ backAnim._frame = frame;
+ backAnim._lastFrame = lastFrame;
+ backAnim._loopFrame = loopFrame;
+ debugInterpreter("O_CHANGEBACKFRAMES anim %d, frame %d, lastFrame %d, loopFrame %d", anim, frame, lastFrame, loopFrame);
+}
+
+void Interpreter::O_GETBACKANIMDATA() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 animNumber = readScriptFlagValue();
+ int32 animDataOffset = readScriptFlagValue();
+ int currAnim = _vm->_backAnimList[animNumber]._seq._currRelative;
+ int16 value = _vm->_backAnimList[animNumber].backAnims[currAnim].getAnimData((Anim::AnimOffsets)(animDataOffset));
+ _flags->setFlagValue((Flags::Id)(flagId), value);
+ debugInterpreter("O_GETBACKANIMDATA flag %04X (%s), animNumber %d, animDataOffset %d, value %d", flagId, Flags::getFlagName(flagId), animNumber, animDataOffset, value);
+}
+
+void Interpreter::O_GETANIMDATA() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 anim = readScriptFlagValue();
+ int32 animOffset = readScriptFlagValue();
+ if (_vm->_normAnimList[anim]._animData != nullptr) {
+ _flags->setFlagValue(flagId, _vm->_normAnimList[anim].getAnimData((Anim::AnimOffsets)(animOffset)));
+ }
+ debugInterpreter("O_GETANIMDATA flag %04X (%s), anim %d, animOffset %d", flagId, Flags::getFlagName(flagId), anim, animOffset);
+}
+
+void Interpreter::O_SETBGCODE() {
+ int32 offset = readScript32();
+ _bgOpcodePC = _currentInstruction + offset - 4;
+ debugInterpreter("O_SETBGCODE next %08x, offset %08x", _bgOpcodePC, offset);
+}
+
+void Interpreter::O_SETBACKFRAME() {
+ int32 anim = readScriptFlagValue();
+ int32 frame = readScriptFlagValue();
+ int currAnim = _vm->_backAnimList[anim]._seq._currRelative;
+ if (_vm->_backAnimList[anim].backAnims[currAnim]._animData != nullptr) {
+ _vm->_backAnimList[anim].backAnims[currAnim]._frame = frame;
+ }
+ debugInterpreter("O_SETBACKFRAME anim %d, frame %d", anim, frame);
+}
+
+void Interpreter::O_GETRND() {
+ Flags::Id flag = readScriptFlagId();
+ uint16 rndSeed = readScript16();
+ int value = _vm->_randomSource.getRandomNumber(rndSeed - 1);
+ _flags->setFlagValue(flag, value);
+ debugInterpreter("O_GETRND flag %d, rndSeed %d, value %d", flag, rndSeed, value);
+}
+
+void Interpreter::O_TALKBACKANIM() {
+ int32 animNumber = readScriptFlagValue();
+ int32 slot = readScriptFlagValue();
+ _vm->doTalkAnim(animNumber, slot, kBackgroundAnimation);
+ debugInterpreter("O_TALKBACKANIM animNumber %d, slot %d", animNumber, slot);
+}
+
+// Simplifying, because used only once in Location 20
+void Interpreter::O_LOADPATH() {
+ readScript32();
+ _vm->loadPath("path2");
+ debugInterpreter("O_LOADPATH - path2");
+}
+
+void Interpreter::O_GETCHAR() {
+ Flags::Id flagId = readScriptFlagId();
+ _flags->setFlagValue(flagId, *_string);
+ _string++;
+ debugInterpreter("O_GETCHAR %04X (%s) %02x", flagId, Flags::getFlagName(flagId), _flags->getFlagValue(flagId));
+}
+
+void Interpreter::O_SETDFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 address = readScript32();
+ _flags->setFlagValue((Flags::Id)(flagId), _currentInstruction + address - 4);
+ debugInterpreter("O_SETDFLAG 0x%04X (%s) = 0x%04X", flagId, Flags::getFlagName(flagId), _currentInstruction + address - 4);
+}
+
+void Interpreter::O_CALLDFLAG() {
+ Flags::Id flagId = readScriptFlagId();
+ _stack[_stacktop] = _currentInstruction;
+ _stacktop++;
+ _currentInstruction = _flags->getFlagValue(flagId);
+ debugInterpreter("O_CALLDFLAG 0x%04X (%s) = 0x%04X", flagId, Flags::getFlagName(flagId), _currentInstruction);
+}
+
+void Interpreter::O_PRINTAT() {
+ int32 slot = readScriptFlagValue();
+ int32 x = readScriptFlagValue();
+ int32 y = readScriptFlagValue();
+ int32 color = _flags->getFlagValue(Flags::KOLOR);
+ _vm->printAt(slot, color, (char *)_string, x, y);
+ increaseString();
+ debugInterpreter("O_PRINTAT slot %d, x %d, y %d", slot, x, y);
+}
+
+void Interpreter::O_ZOOMIN() {
+ int32 slot = readScriptFlagValue();
+ _vm->initZoomIn(slot);
+ debugInterpreter("O_ZOOMIN slot %04d", slot);
+}
+
+void Interpreter::O_ZOOMOUT() {
+ int32 slot = readScriptFlagValue();
+ _vm->initZoomOut(slot);
+ debugInterpreter("O_ZOOMOUT slot %d", slot);
+}
+
+// Not used in script
+void Interpreter::O_SETSTRINGOFFSET() {
+ error("O_SETSTRINGOFFSET");
+}
+
+void Interpreter::O_GETOBJDATA() {
+ Flags::Id flag = readScriptFlagId();
+ int32 slot = readScriptFlagValue();
+ int32 objOffset = readScriptFlagValue();
+ int nr = _vm->_objSlot[slot];
+ if (nr != 0xFF) {
+ int16 value = _vm->_objList[nr]->getData((Object::AttrId)objOffset);
+ _flags->setFlagValue(flag, value);
+ }
+ debugInterpreter("O_GETOBJDATA flag %d, objSlot %d, objOffset %d", flag, slot, objOffset);
+}
+
+void Interpreter::O_SETOBJDATA() {
+ int32 slot = readScriptFlagValue();
+ int32 objOffset = readScriptFlagValue();
+ int32 value = readScriptFlagValue();
+ int nr = _vm->_objSlot[slot];
+ if (nr != 0xFF) {
+ _vm->_objList[nr]->setData((Object::AttrId)objOffset, value);
+ }
+ debugInterpreter("O_SETOBJDATA objSlot %d, objOffset %d, value %d", slot, objOffset, value);
+}
+
+// Not used in script
+void Interpreter::O_SWAPOBJECTS() {
+ error("O_SWAPOBJECTS");
+}
+
+void Interpreter::O_CHANGEHEROSET() {
+ int32 heroId = readScriptFlagValue();
+ int32 heroSet = readScriptFlagValue();
+ if (!heroId) {
+ _vm->_mainHero->loadAnimSet(heroSet);
+ } else if (heroId == 1) {
+ _vm->_secondHero->loadAnimSet(heroSet);
+ }
+ debugInterpreter("O_CHANGEHEROSET hero %d, heroSet %d", heroId, heroSet);
+}
+
+// Not used in script
+void Interpreter::O_ADDSTRING() {
+ error("O_ADDSTRING");
+}
+
+void Interpreter::O_SUBSTRING() {
+ int32 value = readScriptFlagValue();
+ _string -= value;
+ debugInterpreter("O_SUBSTRING value %d", value);
+}
+
+int Interpreter::checkSeq(byte *string) {
+ int freeHSlotIncrease = 0;
+ byte c;
+ while ((c = string[0]) != 0xFF) {
+ string++;
+ if (c < 0xF0) {
+ freeHSlotIncrease++;
+ while ((c = string[0])) {
+ string++;
+ }
+ string++;
+ } else if (c != 0xFE) {
+ string++;
+ }
+ }
+ return freeHSlotIncrease;
+}
+
+void Interpreter::O_INITDIALOG() {
+ if (_string[0] == 255) {
+ byte *stringCurrOff = _string;
+ byte *string = _string;
+ stringCurrOff++;
+ int32 adressOfFirstSequence = (int)READ_LE_UINT16(stringCurrOff);
+ stringCurrOff += 2;
+ _string = string + adressOfFirstSequence;
+
+ for (int i = 0; i < 32; i++) {
+ _vm->_dialogBoxAddr[i] = 0;
+ _vm->_dialogOptAddr[i] = 0;
+ }
+
+ for (int i = 0; i < 4 * 32; i++) {
+ _vm->_dialogOptLines[i] = 0;
+ }
+
+ int16 off;
+ byte *line = nullptr;
+
+ int dialogBox = 0;
+ while ((off = (int)READ_LE_UINT16(stringCurrOff)) != -1) {
+ stringCurrOff += 2;
+ if (off) {
+ line = string + off;
+ }
+ _vm->_dialogBoxAddr[dialogBox] = line;
+ dialogBox++;
+ }
+ stringCurrOff += 2;
+
+ int dialogOpt = 0;
+ while ((off = (int)READ_LE_UINT16(stringCurrOff)) != -1) {
+ stringCurrOff += 2;
+ if (off) {
+ line = string + off;
+ }
+ _vm->_dialogOptAddr[dialogOpt] = line;
+ dialogOpt++;
+ }
+
+ _flags->setFlagValue(Flags::VOICE_A_LINE, 0);
+ _flags->setFlagValue(Flags::VOICE_B_LINE, 0); // bx in original?
+
+ int freeHSlot = 0;
+ for (int i = 31; i >= 0; i--) {
+ if (_vm->_dialogOptAddr[i] != 0) {
+ i++;
+ freeHSlot = i;
+ _flags->setFlagValue(Flags::VOICE_H_LINE, i);
+ break;
+ }
+ }
+
+ freeHSlot += checkSeq(_string);
+
+ for (int i = 0; i < 32; i++) {
+ _vm->_dialogOptLines[i * 4] = freeHSlot;
+ _vm->_dialogOptLines[i * 4 + 1] = freeHSlot;
+ _vm->_dialogOptLines[i * 4 + 2] = freeHSlot;
+ if (_vm->_dialogOptAddr[i]) {
+ freeHSlot += checkSeq(_vm->_dialogOptAddr[i]);
+ }
+ }
+ }
+ debugInterpreter("O_INITDIALOG");
+}
+
+void Interpreter::O_ENABLEDIALOGOPT() {
+ int32 opt = readScriptFlagValue();
+ int dialogDataValue = (int)READ_LE_UINT32(_vm->_dialogData);
+ dialogDataValue &= ~(1u << opt);
+ WRITE_LE_UINT32(_vm->_dialogData, dialogDataValue);
+ debugInterpreter("O_ENABLEDIALOGOPT opt %d", opt);
+}
+
+void Interpreter::O_DISABLEDIALOGOPT() {
+ int32 opt = readScriptFlagValue();
+ int dialogDataValue = (int)READ_LE_UINT32(_vm->_dialogData);
+ dialogDataValue |= (1u << opt);
+ WRITE_LE_UINT32(_vm->_dialogData, dialogDataValue);
+ debugInterpreter("O_DISABLEDIALOGOPT opt %d", opt);
+}
+
+void Interpreter::O_SHOWDIALOGBOX() {
+ int32 box = readScriptFlagValue();
+ uint32 currInstr = _currentInstruction;
+ _vm->createDialogBox(box);
+ _flags->setFlagValue(Flags::DIALINES, _vm->_dialogLines);
+ if (_vm->_dialogLines) {
+ _vm->changeCursor(1);
+ _vm->dialogRun();
+ _vm->changeCursor(0);
+ }
+ _currentInstruction = currInstr;
+ debugInterpreter("O_SHOWDIALOGBOX box %d", box);
+}
+
+void Interpreter::O_STOPSAMPLE() {
+ int32 slot = readScriptFlagValue();
+ _vm->stopSample(slot);
+ debugInterpreter("O_STOPSAMPLE slot %d", slot);
+}
+
+void Interpreter::O_BACKANIMRANGE() {
+ int32 slotId = readScriptFlagValue();
+ uint16 animId = readScript16();
+ int32 low = readScriptFlagValue();
+ int32 high = readScriptFlagValue();
+ if (animId != 0xFFFF) {
+ if (animId & InterpreterFlags::kFlagMask) {
+ animId = _flags->getFlagValue((Flags::Id)animId);
+ }
+ }
+ _result = 1;
+ if (!_vm->_backAnimList[slotId].backAnims.empty()) {
+ int currAnim = _vm->_backAnimList[slotId]._seq._currRelative;
+ if (_vm->_backAnimList[slotId].backAnims[currAnim]._animData != nullptr) {
+ if (animId == 0xFFFF || _vm->_backAnimList[slotId]._seq._current == animId) {
+ Anim &backAnim = _vm->_backAnimList[slotId].backAnims[currAnim];
+ if (!backAnim._state) {
+ if (backAnim._frame >= low) {
+ if (backAnim._frame <= high) {
+ _result = 0;
+ }
+ }
+ }
+ }
+ }
+ }
+ debugInterpreter("O_BACKANIMRANGE slotId %d, animId %d, low %d, high %d, _result %d", slotId, animId, low, high, _result);
+}
+
+void Interpreter::O_CLEARPATH() {
+ for (int i = 0; i < _vm->kPathBitmapLen; i++) {
+ _vm->_roomPathBitmap[i] = 255;
+ }
+ debugInterpreter("O_CLEARPATH");
+}
+
+void Interpreter::O_SETPATH() {
+ _vm->loadPath("path");
+ debugInterpreter("O_SETPATH");
+}
+
+void Interpreter::O_GETHEROX() {
+ int32 heroId = readScriptFlagValue();
+ Flags::Id flagId = readScriptFlagId();
+ if (!heroId) {
+ _flags->setFlagValue(flagId, _vm->_mainHero->_middleX);
+ } else if (heroId == 1) {
+ _flags->setFlagValue(flagId, _vm->_secondHero->_middleX);
+ }
+ debugInterpreter("O_GETHEROX heroId %d, flagId %d", heroId, flagId);
+}
+
+void Interpreter::O_GETHEROY() {
+ int32 heroId = readScriptFlagValue();
+ Flags::Id flagId = readScriptFlagId();
+ if (!heroId) {
+ _flags->setFlagValue(flagId, _vm->_mainHero->_middleY);
+ } else if (heroId == 1) {
+ _flags->setFlagValue(flagId, _vm->_secondHero->_middleY);
+ }
+ debugInterpreter("O_GETHEROY heroId %d, flagId %d", heroId, flagId);
+}
+
+void Interpreter::O_GETHEROD() {
+ int32 heroId = readScriptFlagValue();
+ Flags::Id flagId = readScriptFlagId();
+ if (!heroId) {
+ _flags->setFlagValue(flagId, _vm->_mainHero->_lastDirection);
+ } else if (heroId == 1) {
+ _flags->setFlagValue(flagId, _vm->_secondHero->_lastDirection);
+ }
+ debugInterpreter("O_GETHEROD heroId %d, flagId %d", heroId, flagId);
+}
+
+void Interpreter::O_PUSHSTRING() {
+ _stringStack.string = _string;
+ _stringStack.dialogData = _vm->_dialogData;
+ _stringStack.currentString = _currentString;
+ debugInterpreter("O_PUSHSTRING");
+}
+
+void Interpreter::O_POPSTRING() {
+ _string = _stringStack.string;
+ _vm->_dialogData = _stringStack.dialogData;
+ _currentString = _stringStack.currentString;
+ debugInterpreter("O_POPSTRING");
+}
+
+void Interpreter::O_SETFGCODE() {
+ int32 offset = readScript32();
+ _fgOpcodePC = _currentInstruction + offset - 4;
+ debugInterpreter("O_SETFGCODE next %08x, offset %08x", _fgOpcodePC, offset);
+}
+
+void Interpreter::O_STOPHERO() {
+ int32 heroId = readScriptFlagValue();
+ if (!heroId) {
+ _vm->_mainHero->freeOldMove();
+ } else if (heroId == 1) {
+ _vm->_secondHero->freeOldMove();
+ }
+ debugInterpreter("O_STOPHERO heroId %d", heroId);
+}
+
+void Interpreter::O_ANIMUPDATEOFF() {
+ int32 slotId = readScriptFlagValue();
+ _vm->_normAnimList[slotId]._state = 1;
+ debugInterpreter("O_ANIMUPDATEOFF slotId %d", slotId);
+}
+
+void Interpreter::O_ANIMUPDATEON() {
+ int32 slotId = readScriptFlagValue();
+ _vm->_normAnimList[slotId]._state = 0;
+ debugInterpreter("O_ANIMUPDATEON slotId %d", slotId);
+}
+
+void Interpreter::O_FREECURSOR() {
+ _vm->changeCursor(0);
+ _vm->_currentPointerNumber = 1;
+ // free memory here?
+ debugInterpreter("O_FREECURSOR");
+}
+
+void Interpreter::O_ADDINVQUIET() {
+ int32 hero = readScriptFlagValue();
+ int32 item = readScriptFlagValue();
+ _vm->addInv(hero, item, true);
+ debugInterpreter("O_ADDINVQUIET hero %d, item %d", hero, item);
+}
+
+void Interpreter::O_RUNHERO() {
+ int32 heroId = readScriptFlagValue();
+ int32 x = readScriptFlagValue();
+ int32 y = readScriptFlagValue();
+ int32 dir = readScriptFlagValue();
+ _vm->moveRunHero(heroId, x, y, dir, true);
+ debugInterpreter("O_RUNHERO heroId %d, x %d, y %d, dir %d", heroId, x, y, dir);
+}
+
+void Interpreter::O_SETBACKANIMDATA() {
+ uint16 animNumber = readScript16();
+ uint16 animDataOffset = readScript16();
+ Flags::Id flagId = readScriptFlagId();
+ uint16 value = _flags->getFlagValue((Flags::Id)(flagId));
+ int currAnim = _vm->_backAnimList[animNumber]._seq._currRelative;
+ _vm->_backAnimList[animNumber].backAnims[currAnim].setAnimData((Anim::AnimOffsets)(animDataOffset), value);
+ debugInterpreter("O_SETBACKANIMDATA flag %04X (%s), animNumber %d, animDataOffset %d, value %d", flagId, Flags::getFlagName(flagId), animNumber, animDataOffset, value);
+}
+
+void Interpreter::O_VIEWFLC() {
+ int32 animNr = readScriptFlagValue();
+ _vm->_flcFrameSurface = nullptr;
+ _vm->loadAnim(animNr, false);
+ debugInterpreter("O_VIEWFLC animNr %d", animNr);
+}
+
+void Interpreter::O_CHECKFLCFRAME() {
+ int32 frameNr = readScriptFlagValue();
+ debugInterpreter("O_CHECKFLCFRAME frame number %d", frameNr);
+ if (_vm->_flicPlayer.getCurFrame() != frameNr) {
+ _currentInstruction -= 4;
+ _opcodeNF = 1;
+ }
+}
+
+void Interpreter::O_CHECKFLCEND() {
+ const Video::FlicDecoder &flicPlayer = _vm->_flicPlayer;
+ debugInterpreter("O_CHECKFLCEND frameCount %d, currentFrame %d", flicPlayer.getFrameCount(), flicPlayer.getCurFrame());
+ if (flicPlayer.getFrameCount() - flicPlayer.getCurFrame() > 1) {
+ _currentInstruction -= 2;
+ _opcodeNF = 1;
+ }
+}
+
+void Interpreter::O_FREEFLC() {
+ _vm->_flcFrameSurface = nullptr;
+ debugInterpreter("O_FREEFLC");
+}
+
+void Interpreter::O_TALKHEROSTOP() {
+ int32 heroId = readScriptFlagValue();
+ if (!heroId) {
+ _vm->_mainHero->_state = Hero::kHeroStateStay;
+ } else if (heroId == 1) {
+ _vm->_secondHero->_state = Hero::kHeroStateStay;
+ }
+ debugInterpreter("O_TALKHEROSTOP %d", heroId);
+}
+
+void Interpreter::O_HEROCOLOR() {
+ int32 heroId = readScriptFlagValue();
+ int32 color = readScriptFlagValue();
+ if (!heroId) {
+ _vm->_mainHero->_color = color;
+ } else if (heroId == 1) {
+ _vm->_secondHero->_color = color;
+ }
+ debugInterpreter("O_HEROCOLOR heroId %d, color %d", heroId, color);
+}
+
+void Interpreter::O_GRABMAPA() {
+ _vm->grabMap();
+ debugInterpreter("O_GRABMAPA");
+}
+
+void Interpreter::O_ENABLENAK() {
+ int32 nakId = readScriptFlagValue();
+ _vm->_maskList[nakId]._flags = 0;
+ debugInterpreter("O_ENABLENAK nakId %d", nakId);
+}
+
+void Interpreter::O_DISABLENAK() {
+ int32 nakId = readScriptFlagValue();
+ _vm->_maskList[nakId]._flags = 1;
+ debugInterpreter("O_DISABLENAK nakId %d", nakId);
+}
+
+void Interpreter::O_GETMOBNAME() {
+ int32 modId = readScriptFlagValue();
+ _string = (byte *)_vm->_mobList[modId]._name.c_str();
+ debugInterpreter("O_GETMOBNAME modId %d", modId);
+}
+
+void Interpreter::O_SWAPINVENTORY() {
+ int32 hero = readScriptFlagValue();
+ _vm->swapInv(hero);
+ debugInterpreter("O_SWAPINVENTORY hero %d", hero);
+}
+
+void Interpreter::O_CLEARINVENTORY() {
+ int32 hero = readScriptFlagValue();
+ _vm->clearInv(hero);
+ debugInterpreter("O_CLEARINVENTORY hero %d", hero);
+}
+
+void Interpreter::O_SKIPTEXT() {
+ increaseString();
+ debugInterpreter("O_SKIPTEXT");
+}
+
+void Interpreter::O_SETVOICEH() {
+ int32 slot = readScriptFlagValue();
+ static const uint32 VOICE_H_SLOT = 28;
+ uint16 voiceLineH = _flags->getFlagValue(Flags::VOICE_H_LINE);
+ _vm->setVoice(slot, VOICE_H_SLOT, voiceLineH);
+}
+
+void Interpreter::O_SETVOICEA() {
+ int32 slot = readScriptFlagValue();
+ static const uint32 VOICE_A_SLOT = 29;
+ uint16 voiceLineH = _flags->getFlagValue(Flags::VOICE_H_LINE);
+ _vm->setVoice(slot, VOICE_A_SLOT, voiceLineH);
+}
+
+void Interpreter::O_SETVOICEB() {
+ int32 slot = readScriptFlagValue();
+ static const uint32 VOICE_B_SLOT = 30;
+ uint16 voiceLineH = _flags->getFlagValue(Flags::VOICE_H_LINE);
+ _vm->setVoice(slot, VOICE_B_SLOT, voiceLineH);
+}
+
+void Interpreter::O_SETVOICEC() {
+ int32 slot = readScriptFlagValue();
+ static const uint32 VOICE_C_SLOT = 31;
+ uint16 voiceLineH = _flags->getFlagValue(Flags::VOICE_H_LINE);
+ _vm->setVoice(slot, VOICE_C_SLOT, voiceLineH);
+}
+
+void Interpreter::O_SETVOICED() {
+ int32 slot = readScriptFlagValue();
+ static const uint32 VOICE_D_SLOT = 32;
+ uint16 voiceLineH = _flags->getFlagValue(Flags::VOICE_H_LINE);
+ _vm->setVoice(slot, VOICE_D_SLOT, voiceLineH);
+}
+
+void Interpreter::O_VIEWFLCLOOP() {
+ int32 animId = readScriptFlagValue();
+ _vm->loadAnim(animId, true);
+ debugInterpreter("O_VIEWFLCLOOP animId %d", animId);
+}
+
+// Not used in script
+void Interpreter::O_FLCSPEED() {
+ int32 speed = readScriptFlagValue();
+ error("O_FLCSPEED speed %d", speed);
+}
+
+void Interpreter::O_OPENINVENTORY() {
+ _vm->_showInventoryFlag = true;
+ _opcodeNF = 1;
+ debugInterpreter("O_OPENINVENTORY");
+}
+
+void Interpreter::O_KRZYWA() {
+ _vm->makeCurve();
+ debugInterpreter("O_KRZYWA");
+}
+
+void Interpreter::O_GETKRZYWA() {
+ _vm->getCurve();
+ debugInterpreter("O_GETKRZYWA");
+}
+
+void Interpreter::O_GETMOB() {
+ Flags::Id flagId = readScriptFlagId();
+ int32 posX = readScriptFlagValue();
+ int32 posY = readScriptFlagValue();
+ int mobNumber = _vm->getMob(_vm->_mobList, true, posX, posY);
+ _flags->setFlagValue(flagId, mobNumber + 1);
+ debugInterpreter("O_GETMOB flagId %d, posX %d, posY %d", flagId, posX, posY);
+}
+
+// Not used in game
+void Interpreter::O_INPUTLINE() {
+ error("O_INPUTLINE");
+}
+
+// Not used in script
+void Interpreter::O_BREAK_POINT() {
+ error("O_BREAK_POINT");
+}
+
+Interpreter::OpcodeFunc Interpreter::_opcodes[kNumOpcodes] = {
+ &Interpreter::O_WAITFOREVER,
+ &Interpreter::O_BLACKPALETTE,
+ &Interpreter::O_SETUPPALETTE,
+ &Interpreter::O_INITROOM,
+ &Interpreter::O_SETSAMPLE,
+ &Interpreter::O_FREESAMPLE,
+ &Interpreter::O_PLAYSAMPLE,
+ &Interpreter::O_PUTOBJECT,
+ &Interpreter::O_REMOBJECT,
+ &Interpreter::O_SHOWANIM,
+ &Interpreter::O_CHECKANIMEND,
+ &Interpreter::O_FREEANIM,
+ &Interpreter::O_CHECKANIMFRAME,
+ &Interpreter::O_PUTBACKANIM,
+ &Interpreter::O_REMBACKANIM,
+ &Interpreter::O_CHECKBACKANIMFRAME,
+ &Interpreter::O_FREEALLSAMPLES,
+ &Interpreter::O_SETMUSIC,
+ &Interpreter::O_STOPMUSIC,
+ &Interpreter::O__WAIT,
+ &Interpreter::O_UPDATEOFF,
+ &Interpreter::O_UPDATEON,
+ &Interpreter::O_UPDATE ,
+ &Interpreter::O_CLS,
+ &Interpreter::O__CALL,
+ &Interpreter::O_RETURN,
+ &Interpreter::O_GO,
+ &Interpreter::O_BACKANIMUPDATEOFF,
+ &Interpreter::O_BACKANIMUPDATEON,
+ &Interpreter::O_CHANGECURSOR,
+ &Interpreter::O_CHANGEANIMTYPE,
+ &Interpreter::O__SETFLAG,
+ &Interpreter::O_COMPARE,
+ &Interpreter::O_JUMPZ,
+ &Interpreter::O_JUMPNZ,
+ &Interpreter::O_EXIT,
+ &Interpreter::O_ADDFLAG,
+ &Interpreter::O_TALKANIM,
+ &Interpreter::O_SUBFLAG,
+ &Interpreter::O_SETSTRING,
+ &Interpreter::O_ANDFLAG,
+ &Interpreter::O_GETMOBDATA,
+ &Interpreter::O_ORFLAG,
+ &Interpreter::O_SETMOBDATA,
+ &Interpreter::O_XORFLAG,
+ &Interpreter::O_GETMOBTEXT,
+ &Interpreter::O_MOVEHERO,
+ &Interpreter::O_WALKHERO,
+ &Interpreter::O_SETHERO,
+ &Interpreter::O_HEROOFF,
+ &Interpreter::O_HEROON,
+ &Interpreter::O_CLSTEXT,
+ &Interpreter::O_CALLTABLE,
+ &Interpreter::O_CHANGEMOB,
+ &Interpreter::O_ADDINV,
+ &Interpreter::O_REMINV,
+ &Interpreter::O_REPINV,
+ &Interpreter::O_OBSOLETE_GETACTION,
+ &Interpreter::O_ADDWALKAREA,
+ &Interpreter::O_REMWALKAREA,
+ &Interpreter::O_RESTOREWALKAREA,
+ &Interpreter::O_WAITFRAME,
+ &Interpreter::O_SETFRAME,
+ &Interpreter::O_RUNACTION,
+ &Interpreter::O_COMPAREHI,
+ &Interpreter::O_COMPARELO,
+ &Interpreter::O_PRELOADSET,
+ &Interpreter::O_FREEPRELOAD,
+ &Interpreter::O_CHECKINV,
+ &Interpreter::O_TALKHERO,
+ &Interpreter::O_WAITTEXT,
+ &Interpreter::O_SETHEROANIM,
+ &Interpreter::O_WAITHEROANIM,
+ &Interpreter::O_GETHERODATA,
+ &Interpreter::O_GETMOUSEBUTTON,
+ &Interpreter::O_CHANGEFRAMES,
+ &Interpreter::O_CHANGEBACKFRAMES,
+ &Interpreter::O_GETBACKANIMDATA,
+ &Interpreter::O_GETANIMDATA,
+ &Interpreter::O_SETBGCODE,
+ &Interpreter::O_SETBACKFRAME,
+ &Interpreter::O_GETRND,
+ &Interpreter::O_TALKBACKANIM,
+ &Interpreter::O_LOADPATH,
+ &Interpreter::O_GETCHAR,
+ &Interpreter::O_SETDFLAG,
+ &Interpreter::O_CALLDFLAG,
+ &Interpreter::O_PRINTAT,
+ &Interpreter::O_ZOOMIN,
+ &Interpreter::O_ZOOMOUT,
+ &Interpreter::O_SETSTRINGOFFSET,
+ &Interpreter::O_GETOBJDATA,
+ &Interpreter::O_SETOBJDATA,
+ &Interpreter::O_SWAPOBJECTS,
+ &Interpreter::O_CHANGEHEROSET,
+ &Interpreter::O_ADDSTRING,
+ &Interpreter::O_SUBSTRING,
+ &Interpreter::O_INITDIALOG,
+ &Interpreter::O_ENABLEDIALOGOPT,
+ &Interpreter::O_DISABLEDIALOGOPT,
+ &Interpreter::O_SHOWDIALOGBOX,
+ &Interpreter::O_STOPSAMPLE,
+ &Interpreter::O_BACKANIMRANGE,
+ &Interpreter::O_CLEARPATH,
+ &Interpreter::O_SETPATH,
+ &Interpreter::O_GETHEROX,
+ &Interpreter::O_GETHEROY,
+ &Interpreter::O_GETHEROD,
+ &Interpreter::O_PUSHSTRING,
+ &Interpreter::O_POPSTRING,
+ &Interpreter::O_SETFGCODE,
+ &Interpreter::O_STOPHERO,
+ &Interpreter::O_ANIMUPDATEOFF,
+ &Interpreter::O_ANIMUPDATEON,
+ &Interpreter::O_FREECURSOR,
+ &Interpreter::O_ADDINVQUIET,
+ &Interpreter::O_RUNHERO,
+ &Interpreter::O_SETBACKANIMDATA,
+ &Interpreter::O_VIEWFLC,
+ &Interpreter::O_CHECKFLCFRAME,
+ &Interpreter::O_CHECKFLCEND,
+ &Interpreter::O_FREEFLC,
+ &Interpreter::O_TALKHEROSTOP,
+ &Interpreter::O_HEROCOLOR,
+ &Interpreter::O_GRABMAPA,
+ &Interpreter::O_ENABLENAK,
+ &Interpreter::O_DISABLENAK,
+ &Interpreter::O_GETMOBNAME,
+ &Interpreter::O_SWAPINVENTORY,
+ &Interpreter::O_CLEARINVENTORY,
+ &Interpreter::O_SKIPTEXT,
+ &Interpreter::O_SETVOICEH,
+ &Interpreter::O_SETVOICEA,
+ &Interpreter::O_SETVOICEB,
+ &Interpreter::O_SETVOICEC,
+ &Interpreter::O_VIEWFLCLOOP,
+ &Interpreter::O_FLCSPEED,
+ &Interpreter::O_OPENINVENTORY,
+ &Interpreter::O_KRZYWA,
+ &Interpreter::O_GETKRZYWA,
+ &Interpreter::O_GETMOB,
+ &Interpreter::O_INPUTLINE,
+ &Interpreter::O_SETVOICED,
+ &Interpreter::O_BREAK_POINT,
+};
+
+} // End of namespace Prince
diff --git a/engines/prince/script.h b/engines/prince/script.h
new file mode 100644
index 0000000000..4799e84944
--- /dev/null
+++ b/engines/prince/script.h
@@ -0,0 +1,397 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_SCRIPT_H
+#define PRINCE_SCRIPT_H
+
+#include "common/random.h"
+#include "common/endian.h"
+#include "common/array.h"
+#include "common/stream.h"
+
+#include "prince/flags.h"
+
+namespace Prince {
+
+class PrinceEngine;
+class Animation;
+class Object;
+struct Anim;
+struct BackgroundAnim;
+struct Mask;
+
+class Room {
+public:
+ Room();
+ int _mobs; // mob flag offset
+ int _backAnim; // offset to array of animation numbers
+ int _obj; // offset to array of object numbers
+ int _nak; // offset to array of masks
+ int _itemUse;
+ int _itemGive;
+ int _walkTo; // offset to array of WALKTO events or 0
+ int _examine; // offset to array of EXAMINE events or 0
+ int _pickup;
+ int _use;
+ int _pushOpen;
+ int _pullClose;
+ int _talk;
+ int _give;
+
+ bool loadStream(Common::SeekableReadStream &stream);
+ bool loadRoom(byte *roomData);
+ int getOptionOffset(int option);
+
+private:
+
+ typedef void (Room::*LoadingStep)(Common::SeekableReadStream &stream);
+
+ void nextLoadStep(Common::SeekableReadStream &stream, LoadingStep step);
+
+ void loadMobs(Common::SeekableReadStream &stream);
+ void loadBackAnim(Common::SeekableReadStream &stream);
+ void loadObj(Common::SeekableReadStream &stream);
+ void loadNak(Common::SeekableReadStream &stream);
+ void loadItemUse(Common::SeekableReadStream &stream);
+ void loadItemGive(Common::SeekableReadStream &stream);
+ void loadWalkTo(Common::SeekableReadStream &stream);
+ void loadExamine(Common::SeekableReadStream &stream);
+ void loadPickup(Common::SeekableReadStream &stream);
+ void loadUse(Common::SeekableReadStream &stream);
+ void loadPushOpen(Common::SeekableReadStream &stream);
+ void loadPullClose(Common::SeekableReadStream &stream);
+ void loadTalk(Common::SeekableReadStream &stream);
+ void loadGive(Common::SeekableReadStream &stream);
+};
+
+
+class Script {
+public:
+ static const int16 kMaxRooms = 60;
+
+ Script(PrinceEngine *vm);
+ ~Script();
+
+ struct ScriptInfo {
+ int rooms;
+ int startGame;
+ int restoreGame;
+ int stdExamine;
+ int stdPickup;
+ int stdUse;
+ int stdOpen;
+ int stdClose;
+ int stdTalk;
+ int stdGive;
+ int usdCode;
+ int invObjExam;
+ int invObjUse;
+ int invObjUU;
+ int stdUseItem;
+ int lightSources;
+ int specRout;
+ int invObjGive;
+ int stdGiveItem;
+ int goTester;
+ };
+
+ ScriptInfo _scriptInfo;
+
+ bool loadStream(Common::SeekableReadStream &stream);
+
+ uint16 readScript16(uint32 address);
+ uint32 readScript32(uint32 address);
+
+ uint32 getStartGameOffset();
+ uint32 getLocationInitScript(int initRoomTableOffset, int roomNr);
+ int16 getLightX(int locationNr);
+ int16 getLightY(int locationNr);
+ int32 getShadowScale(int locationNr);
+ uint8 *getRoomOffset(int locationNr);
+ int32 getOptionStandardOffset(int option);
+ uint8 *getHeroAnimName(int offset);
+
+ void installBackAnims(Common::Array<BackgroundAnim> &backAnimList, int roomBackAnimOffset);
+ void installSingleBackAnim(Common::Array<BackgroundAnim> &backAnimList, int slot, int roomBackAnimOffset);
+ void installObjects(int offset);
+ bool loadAllMasks(Common::Array<Mask> &maskList, int offset);
+
+ int scanMobEvents(int mobMask, int dataEventOffset);
+ int scanMobEventsWithItem(int mobMask, int dataEventOffset, int itemMask);
+
+ byte getMobVisible(int roomMobOffset, uint16 mob);
+ void setMobVisible(int roomMobOffset, uint16 mob, byte value);
+
+ uint32 getBackAnimId(int roomBackAnimOffset, int slot);
+ void setBackAnimId(int roomBackAnimOffset, int slot, int animId);
+
+ byte getObjId(int roomObjOffset, int slot);
+ void setObjId(int roomObjOffset, int slot, byte objectId);
+
+ const char *getString(uint32 offset) {
+ return (const char *)(&_data[offset]);
+ }
+
+private:
+ PrinceEngine *_vm;
+ uint8 *_data;
+ uint32 _dataSize;
+ Common::Array<Room> _roomList;
+};
+
+class InterpreterFlags {
+public:
+ InterpreterFlags();
+
+ void setFlagValue(Flags::Id flag, int32 value);
+ int32 getFlagValue(Flags::Id flag);
+
+ void resetAllFlags();
+
+ static const uint16 kFlagMask = 0x8000;
+ static const uint16 kMaxFlags = 2000;
+private:
+ int32 _flags[kMaxFlags];
+};
+
+class Interpreter {
+public:
+ Interpreter(PrinceEngine *vm, Script *script, InterpreterFlags *flags);
+
+ void stopBg() { _bgOpcodePC = 0; }
+
+ void stepBg();
+ void stepFg();
+ void storeNewPC(int opcodePC);
+ int getLastOPCode();
+ int getFgOpcodePC();
+
+ void setBgOpcodePC(uint32 value);
+ void setFgOpcodePC(uint32 value);
+
+ uint32 getCurrentString();
+ void setCurrentString(uint32 value);
+
+ byte *getString();
+ void setString(byte *newString);
+ void increaseString();
+
+ void setResult(byte value);
+
+private:
+ PrinceEngine *_vm;
+ Script *_script;
+ InterpreterFlags *_flags;
+
+ uint32 _currentInstruction;
+
+ uint32 _bgOpcodePC;
+ uint32 _fgOpcodePC;
+
+ uint16 _lastOpcode;
+ uint32 _lastInstruction;
+ byte _result;
+
+ bool _opcodeNF; // break interpreter loop
+ bool _opcodeEnd; // end of a game flag
+
+ static const uint32 _STACK_SIZE = 500;
+ uint32 _stack[_STACK_SIZE];
+ struct stringStack {
+ byte *string;
+ byte *dialogData;
+ uint32 currentString;
+ } _stringStack;
+ uint8 _stacktop;
+ uint32 _waitFlag;
+
+ byte *_string;
+ uint32 _currentString;
+ const char *_mode;
+
+ // Helper functions
+ uint32 step(uint32 opcodePC);
+ uint16 readScript16();
+ uint32 readScript32();
+ int32 readScriptFlagValue();
+ Flags::Id readScriptFlagId();
+ int checkSeq(byte *string);
+
+ void debugInterpreter(const char *s, ...);
+
+ typedef void (Interpreter::*OpcodeFunc)();
+ static OpcodeFunc _opcodes[];
+
+ static const int kGiveLetterScriptFix = 79002;
+
+ // Keep opcode handlers names as they are in original code
+ // making it easier to switch back and forth
+ void O_WAITFOREVER();
+ void O_BLACKPALETTE();
+ void O_SETUPPALETTE();
+ void O_INITROOM();
+ void O_SETSAMPLE();
+ void O_FREESAMPLE();
+ void O_PLAYSAMPLE();
+ void O_PUTOBJECT();
+ void O_REMOBJECT();
+ void O_SHOWANIM();
+ void O_CHECKANIMEND();
+ void O_FREEANIM();
+ void O_CHECKANIMFRAME();
+ void O_PUTBACKANIM();
+ void O_REMBACKANIM();
+ void O_CHECKBACKANIMFRAME();
+ void O_FREEALLSAMPLES();
+ void O_SETMUSIC();
+ void O_STOPMUSIC();
+ void O__WAIT();
+ void O_UPDATEOFF();
+ void O_UPDATEON();
+ void O_UPDATE ();
+ void O_CLS();
+ void O__CALL();
+ void O_RETURN();
+ void O_GO();
+ void O_BACKANIMUPDATEOFF();
+ void O_BACKANIMUPDATEON();
+ void O_CHANGECURSOR();
+ void O_CHANGEANIMTYPE();
+ void O__SETFLAG();
+ void O_COMPARE();
+ void O_JUMPZ();
+ void O_JUMPNZ();
+ void O_EXIT();
+ void O_ADDFLAG();
+ void O_TALKANIM();
+ void O_SUBFLAG();
+ void O_SETSTRING();
+ void O_ANDFLAG();
+ void O_GETMOBDATA();
+ void O_ORFLAG();
+ void O_SETMOBDATA();
+ void O_XORFLAG();
+ void O_GETMOBTEXT();
+ void O_MOVEHERO();
+ void O_WALKHERO();
+ void O_SETHERO();
+ void O_HEROOFF();
+ void O_HEROON();
+ void O_CLSTEXT();
+ void O_CALLTABLE();
+ void O_CHANGEMOB();
+ void O_ADDINV();
+ void O_REMINV();
+ void O_REPINV();
+ void O_OBSOLETE_GETACTION();
+ void O_ADDWALKAREA();
+ void O_REMWALKAREA();
+ void O_RESTOREWALKAREA();
+ void O_WAITFRAME();
+ void O_SETFRAME();
+ void O_RUNACTION();
+ void O_COMPAREHI();
+ void O_COMPARELO();
+ void O_PRELOADSET();
+ void O_FREEPRELOAD();
+ void O_CHECKINV();
+ void O_TALKHERO();
+ void O_WAITTEXT();
+ void O_SETHEROANIM();
+ void O_WAITHEROANIM();
+ void O_GETHERODATA();
+ void O_GETMOUSEBUTTON();
+ void O_CHANGEFRAMES();
+ void O_CHANGEBACKFRAMES();
+ void O_GETBACKANIMDATA();
+ void O_GETANIMDATA();
+ void O_SETBGCODE();
+ void O_SETBACKFRAME();
+ void O_GETRND();
+ void O_TALKBACKANIM();
+ void O_LOADPATH();
+ void O_GETCHAR();
+ void O_SETDFLAG();
+ void O_CALLDFLAG();
+ void O_PRINTAT();
+ void O_ZOOMIN();
+ void O_ZOOMOUT();
+ void O_SETSTRINGOFFSET();
+ void O_GETOBJDATA();
+ void O_SETOBJDATA();
+ void O_SWAPOBJECTS();
+ void O_CHANGEHEROSET();
+ void O_ADDSTRING();
+ void O_SUBSTRING();
+ void O_INITDIALOG();
+ void O_ENABLEDIALOGOPT();
+ void O_DISABLEDIALOGOPT();
+ void O_SHOWDIALOGBOX();
+ void O_STOPSAMPLE();
+ void O_BACKANIMRANGE();
+ void O_CLEARPATH();
+ void O_SETPATH();
+ void O_GETHEROX();
+ void O_GETHEROY();
+ void O_GETHEROD();
+ void O_PUSHSTRING();
+ void O_POPSTRING();
+ void O_SETFGCODE();
+ void O_STOPHERO();
+ void O_ANIMUPDATEOFF();
+ void O_ANIMUPDATEON();
+ void O_FREECURSOR();
+ void O_ADDINVQUIET();
+ void O_RUNHERO();
+ void O_SETBACKANIMDATA();
+ void O_VIEWFLC();
+ void O_CHECKFLCFRAME();
+ void O_CHECKFLCEND();
+ void O_FREEFLC();
+ void O_TALKHEROSTOP();
+ void O_HEROCOLOR();
+ void O_GRABMAPA();
+ void O_ENABLENAK();
+ void O_DISABLENAK();
+ void O_GETMOBNAME();
+ void O_SWAPINVENTORY();
+ void O_CLEARINVENTORY();
+ void O_SKIPTEXT();
+ void O_SETVOICEH();
+ void O_SETVOICEA();
+ void O_SETVOICEB();
+ void O_SETVOICEC();
+ void O_VIEWFLCLOOP();
+ void O_FLCSPEED();
+ void O_OPENINVENTORY();
+ void O_KRZYWA();
+ void O_GETKRZYWA();
+ void O_GETMOB();
+ void O_INPUTLINE();
+ void O_SETVOICED();
+ void O_BREAK_POINT();
+
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/sound.cpp b/engines/prince/sound.cpp
new file mode 100644
index 0000000000..032297ee43
--- /dev/null
+++ b/engines/prince/sound.cpp
@@ -0,0 +1,211 @@
+/* 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 "prince/prince.h"
+#include "prince/sound.h"
+#include "prince/musNum.h"
+
+#include "common/config-manager.h"
+#include "common/memstream.h"
+#include "common/archive.h"
+#include "audio/decoders/raw.h"
+#include "audio/audiostream.h"
+
+namespace Prince {
+
+const char *MusicPlayer::_musTable[] = {
+ "",
+ "Battlfld.mid",
+ "Cave.mid",
+ "Cemetery.mid",
+ "Credits.mid",
+ "Fjord.mid",
+ "Guitar.mid",
+ "Hell.mid",
+ "Jingle.mid",
+ "Main.mid",
+ "Night.mid",
+ "Reality.mid",
+ "Sunlord.mid",
+ "Tavern.mid",
+ "Temple.mid",
+ "Boruta.mid",
+ "Intro.mid"
+};
+
+const uint8 MusicPlayer::_musRoomTable[] = {
+ 0,
+ ROOM01MUS,
+ ROOM02MUS,
+ ROOM03MUS,
+ ROOM04MUS,
+ ROOM05MUS,
+ ROOM06MUS,
+ ROOM07MUS,
+ ROOM08MUS,
+ ROOM09MUS,
+ ROOM10MUS,
+ ROOM11MUS,
+ ROOM12MUS,
+ ROOM13MUS,
+ ROOM14MUS,
+ ROOM15MUS,
+ ROOM16MUS,
+ ROOM17MUS,
+ ROOM18MUS,
+ ROOM19MUS,
+ ROOM20MUS,
+ ROOM21MUS,
+ ROOM22MUS,
+ ROOM23MUS,
+ ROOM24MUS,
+ ROOM25MUS,
+ ROOM26MUS,
+ ROOM27MUS,
+ ROOM28MUS,
+ ROOM29MUS,
+ ROOM30MUS,
+ ROOM31MUS,
+ ROOM32MUS,
+ ROOM33MUS,
+ ROOM34MUS,
+ ROOM35MUS,
+ ROOM36MUS,
+ ROOM37MUS,
+ ROOM38MUS,
+ ROOM39MUS,
+ ROOM40MUS,
+ ROOM41MUS,
+ ROOM42MUS,
+ ROOM43MUS,
+ 0,
+ 0,
+ ROOM46MUS,
+ ROOM47MUS,
+ ROOM48MUS,
+ ROOM49MUS,
+ ROOM50MUS,
+ ROOM51MUS,
+ ROOM52MUS,
+ ROOM53MUS,
+ ROOM54MUS,
+ ROOM55MUS,
+ ROOM56MUS,
+ ROOM57MUS,
+ ROOM58MUS,
+ ROOM59MUS,
+ ROOM60MUS,
+ ROOM61MUS
+};
+
+
+MusicPlayer::MusicPlayer(PrinceEngine *vm) : _vm(vm) {
+ _data = nullptr;
+ _isGM = false;
+
+ MidiPlayer::createDriver();
+
+ int ret = _driver->open();
+ if (ret == 0) {
+ if (_nativeMT32)
+ _driver->sendMT32Reset();
+ else
+ _driver->sendGMReset();
+
+ _driver->setTimerCallback(this, &timerCallback);
+ }
+}
+
+MusicPlayer::~MusicPlayer() {
+ killMidi();
+}
+
+void MusicPlayer::killMidi() {
+ Audio::MidiPlayer::stop();
+
+ free(_data);
+ _data = nullptr;
+}
+
+void MusicPlayer::loadMidi(const char *name) {
+ Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(name);
+ if (!stream) {
+ debug("Can't load midi stream %s", name);
+ return;
+ }
+
+ // Stop any currently playing MIDI file
+ killMidi();
+
+ // Read in the data for the file
+ _dataSize = stream->size();
+ _data = (byte *)malloc(_dataSize);
+ stream->read(_data, _dataSize);
+
+ delete stream;
+
+ // Start playing the music
+ sndMidiStart();
+}
+
+void MusicPlayer::sndMidiStart() {
+ _isGM = true;
+
+ MidiParser *parser = MidiParser::createParser_SMF();
+ if (parser->loadMusic(_data, _dataSize)) {
+ parser->setTrack(0);
+ parser->setMidiDriver(this);
+ parser->setTimerRate(_driver->getBaseTempo());
+ parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1);
+
+ _parser = parser;
+
+ syncVolume();
+
+ // Al the tracks are supposed to loop
+ _isLooping = true;
+ _isPlaying = true;
+ }
+}
+
+void MusicPlayer::send(uint32 b) {
+ if ((b & 0xF0) == 0xC0 && !_isGM && !_nativeMT32) {
+ b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8;
+ }
+
+ Audio::MidiPlayer::send(b);
+}
+
+void MusicPlayer::sendToChannel(byte channel, uint32 b) {
+ if (!_channelsTable[channel]) {
+ _channelsTable[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();
+ // If a new channel is allocated during the playback, make sure
+ // its volume is correctly initialized.
+ if (_channelsTable[channel])
+ _channelsTable[channel]->volume(_channelsVolume[channel] * _masterVolume / 255);
+ }
+
+ if (_channelsTable[channel])
+ _channelsTable[channel]->send(b);
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/sound.h b/engines/prince/sound.h
new file mode 100644
index 0000000000..cc44b0a110
--- /dev/null
+++ b/engines/prince/sound.h
@@ -0,0 +1,67 @@
+/* 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.
+ *
+ */
+
+#ifndef PRINCE_SOUND_H
+#define PRINCE_SOUND_H
+
+#include "audio/audiostream.h"
+#include "audio/decoders/wave.h"
+#include "audio/fmopl.h"
+#include "audio/mididrv.h"
+#include "audio/midiparser.h"
+#include "audio/midiplayer.h"
+#include "audio/mixer.h"
+#include "common/memstream.h"
+
+namespace Prince {
+
+class PrinceEngine;
+
+class MusicPlayer: public Audio::MidiPlayer {
+private:
+ PrinceEngine *_vm;
+ byte *_data;
+ int _dataSize;
+ bool _isGM;
+
+ // Start MIDI File
+ void sndMidiStart();
+
+ // Stop MIDI File
+ void sndMidiStop();
+public:
+ MusicPlayer(PrinceEngine *vm);
+ ~MusicPlayer();
+
+ void loadMidi(const char *);
+ void killMidi();
+
+ virtual void send(uint32 b);
+ virtual void sendToChannel(byte channel, uint32 b);
+
+ static const char *_musTable[];
+ static const uint8 _musRoomTable[];
+};
+
+} // End of namespace Prince
+
+#endif
diff --git a/engines/prince/variatxt.cpp b/engines/prince/variatxt.cpp
new file mode 100644
index 0000000000..c38c65ce5d
--- /dev/null
+++ b/engines/prince/variatxt.cpp
@@ -0,0 +1,55 @@
+/* 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 "prince/variatxt.h"
+#include "common/debug.h"
+
+namespace Prince {
+
+VariaTxt::VariaTxt() : _dataSize(0), _data(nullptr) {
+}
+
+VariaTxt::~VariaTxt() {
+ _dataSize = 0;
+ if (_data != nullptr) {
+ free(_data);
+ _data = nullptr;
+ }
+}
+
+
+bool VariaTxt::loadStream(Common::SeekableReadStream &stream) {
+ _dataSize = stream.size();
+ _data = (byte *)malloc(_dataSize);
+ stream.read(_data, _dataSize);
+ return true;
+}
+
+byte *VariaTxt::getString(uint32 stringId) {
+ uint32 stringOffset = READ_LE_UINT32(_data + stringId * 4);
+ if (stringOffset > _dataSize) {
+ assert(false);
+ }
+ return _data + stringOffset;
+}
+
+} // End of namespace Prince
diff --git a/engines/prince/variatxt.h b/engines/prince/variatxt.h
new file mode 100644
index 0000000000..04c34bc0ef
--- /dev/null
+++ b/engines/prince/variatxt.h
@@ -0,0 +1,40 @@
+/* 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 "common/stream.h"
+
+namespace Prince {
+
+class VariaTxt {
+public:
+ VariaTxt();
+ ~VariaTxt();
+
+ bool loadStream(Common::SeekableReadStream &stream);
+ byte *getString(uint32 stringId);
+
+private:
+ uint32 _dataSize;
+ byte *_data;
+};
+
+} // End of namespace Prince
diff --git a/engines/queen/POTFILES b/engines/queen/POTFILES
index 1baf9c24de..28624662ca 100644
--- a/engines/queen/POTFILES
+++ b/engines/queen/POTFILES
@@ -1 +1 @@
-engines/queen/queen.cpp
+engines/queen/detection.cpp
diff --git a/engines/queen/logic.cpp b/engines/queen/logic.cpp
index d48bb8a498..664a9a15f9 100644
--- a/engines/queen/logic.cpp
+++ b/engines/queen/logic.cpp
@@ -2115,9 +2115,15 @@ void LogicInterview::setupSpecialMoveTable() {
}
void LogicGame::useJournal() {
+ _vm->input()->clearKeyVerb();
+ _vm->input()->clearMouseButton();
+
_vm->command()->clear(false);
_journal->use();
_vm->walk()->stopJoe();
+
+ _vm->input()->clearKeyVerb();
+ _vm->input()->clearMouseButton();
}
bool LogicGame::changeToSpecialRoom() {
diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp
index 1b9d72babc..e86a53d448 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -189,7 +189,7 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
}
}
- if (_vm->input()->talkQuit())
+ if (_vm->input()->talkQuit() || _vm->shouldQuit())
break;
retval = _dialogueTree[level][selectedSentence].dialogueNodeValue1;
@@ -1250,15 +1250,12 @@ int16 Talk::selectSentence() {
}
_vm->input()->clearKeyVerb();
+ _vm->input()->clearMouseButton();
if (sentenceCount > 0) {
int oldZone = 0;
- while (0 == selectedSentence) {
-
- if (_vm->input()->talkQuit())
- break;
-
+ while (0 == selectedSentence && !_vm->input()->talkQuit() && !_vm->shouldQuit()) {
_vm->update();
Common::Point mouse = _vm->input()->getMousePos();
@@ -1328,6 +1325,9 @@ int16 Talk::selectSentence() {
}
}
+ _vm->input()->clearKeyVerb();
+ _vm->input()->clearMouseButton();
+
debug(6, "Selected sentence %i", selectedSentence);
arrowBobUp->active = false;
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index b8a5436d76..8dc27c74be 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -468,7 +468,6 @@ public:
int actorIdToIndex(uint16 id) { return (id == ID_PROTAG) ? 0 : objectIdToIndex(id); }
uint16 actorIndexToId(int index) { return (index == 0) ? ID_PROTAG : objectIndexToId(kGameObjectActor, index); }
ActorData *getActor(uint16 actorId);
- ActorData *getFirstActor() { return &_actors.front(); }
// clarification: Obj - means game object, such Hat, Spoon etc, Object - means Actor,Obj,HitZone,StepZone
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 90ba62070b..e659e09ce8 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -215,8 +215,7 @@ void SagaEngine::save(const char *fileName, const char *saveName) {
#ifdef ENABLE_IHNM
if (getGameId() == GID_IHNM) {
out->writeSint32LE(_scene->currentChapterNumber());
- // Protagonist
- out->writeSint32LE(_scene->currentProtag());
+ out->writeSint32LE(0); // obsolete, was used for the protagonist
out->writeSint32LE(_scene->getCurrentMusicTrack());
out->writeSint32LE(_scene->getCurrentMusicRepeat());
}
@@ -316,7 +315,7 @@ void SagaEngine::load(const char *fileName) {
if (getGameId() == GID_IHNM) {
int currentChapter = _scene->currentChapterNumber();
_scene->setChapterNumber(in->readSint32LE());
- _scene->setProtag(in->readSint32LE());
+ in->skip(4); // obsolete, was used for setting the protagonist
if (_scene->currentChapterNumber() != currentChapter)
_scene->changeScene(-2, 0, kTransitionFade, _scene->currentChapterNumber());
_scene->setCurrentMusicTrack(in->readSint32LE());
@@ -366,30 +365,6 @@ void SagaEngine::load(const char *fileName) {
int volume = _music->getVolume();
_music->setVolume(0);
-#ifdef ENABLE_IHNM
- // Protagonist swapping
- if (getGameId() == GID_IHNM) {
- if (_scene->currentProtag() != 0 && _scene->currentChapterNumber() != 6) {
- ActorData *actor1 = _actor->getFirstActor();
- ActorData *actor2;
- // The original gets actor2 from the current protagonist ID, but this is sometimes wrong
- // If the current protagonist ID is not correct, use the stored protagonist
- if (!_actor->validActorId(_scene->currentProtag())) {
- actor2 = _actor->_protagonist;
- } else {
- actor2 = _actor->getActor(_scene->currentProtag());
- }
-
- SWAP(actor1->_location, actor2->_location);
-
- actor2->_flags &= ~kProtagonist;
- actor1->_flags |= kProtagonist;
- _actor->_protagonist = _actor->_centerActor = actor1;
- _scene->setProtag(actor1->_id);
- }
- }
-#endif
-
_scene->clearSceneQueue();
_scene->changeScene(sceneNumber, ACTOR_NO_ENTRANCE, kTransitionNoFade);
diff --git a/engines/saga/scene.h b/engines/saga/scene.h
index 6a9571d282..410713c5d5 100644
--- a/engines/saga/scene.h
+++ b/engines/saga/scene.h
@@ -286,8 +286,6 @@ class Scene {
#endif
return _sceneLUT[sceneNumber];
}
- int currentProtag() const { return _currentProtag; }
- void setProtag(int pr) { _currentProtag = pr; }
int currentSceneNumber() const { return _sceneNumber; }
int currentChapterNumber() const { return _chapterNumber; }
void setChapterNumber(int ch) { _chapterNumber = ch; }
@@ -341,7 +339,6 @@ class Scene {
Common::Array<uint16> _sceneLUT;
SceneQueueList _sceneQueue;
bool _sceneLoaded;
- int _currentProtag;
int _sceneNumber;
int _chapterNumber;
int _outsetSceneNumber;
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index cb963e23ac..2175d8f40a 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -748,14 +748,10 @@ void Script::sfSwapActors(SCRIPTFUNC_PARAMS) {
actor1->_flags &= ~kProtagonist;
actor2->_flags |= kProtagonist;
_vm->_actor->_protagonist = _vm->_actor->_centerActor = actor2;
- if (_vm->getGameId() == GID_IHNM)
- _vm->_scene->setProtag(actorId2);
} else if (actor2->_flags & kProtagonist) {
actor2->_flags &= ~kProtagonist;
actor1->_flags |= kProtagonist;
_vm->_actor->_protagonist = _vm->_actor->_centerActor = actor1;
- if (_vm->getGameId() == GID_IHNM)
- _vm->_scene->setProtag(actorId1);
}
}
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index edb12a3dd9..1e1c397212 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -438,7 +438,7 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
for (i = 0; i < 64; ++i)
oldValues[curChannel][i] = 0;
- int arrayTerminator = MIN<int>(64, blockSize);
+ uint arrayTerminator = MIN<int>(64, blockSize);
for (i = 0; i < arrayTerminator; ++i)
oldValues[curChannel][i] = buffer[curChannel][blockSize - (i + 1)];
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 565e9752c3..510c8cd9ca 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -485,6 +485,7 @@ bool Console::cmdGetVersion(int argc, const char **argv) {
#endif
debugPrintf("View type: %s\n", viewTypeDesc[g_sci->getResMan()->getViewType()]);
debugPrintf("Uses palette merging: %s\n", g_sci->_gfxPalette->isMerging() ? "yes" : "no");
+ debugPrintf("Uses 16 bit color matching: %s\n", g_sci->_gfxPalette->isUsing16bitColorMatch() ? "yes" : "no");
debugPrintf("Resource volume version: %s\n", g_sci->getResMan()->getVolVersionDesc());
debugPrintf("Resource map version: %s\n", g_sci->getResMan()->getMapVersionDesc());
debugPrintf("Contains selector vocabulary (vocab.997): %s\n", hasVocab997 ? "yes" : "no");
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 4f28738508..85ff1c0062 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -563,31 +563,28 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
// If these files aren't found, it can't be SCI
- if (!foundResMap && !foundRes000) {
+ if (!foundResMap && !foundRes000)
return 0;
- }
ResourceManager resMan;
- resMan.addAppropriateSources(fslist);
- resMan.init(true);
+ resMan.addAppropriateSourcesForDetection(fslist);
+ resMan.initForDetection();
// TODO: Add error handling.
#ifndef ENABLE_SCI32
// Is SCI32 compiled in? If not, and this is a SCI32 game,
// stop here
- if (getSciVersion() >= SCI_VERSION_2) {
- return (const ADGameDescription *)&s_fallbackDesc;
- }
+ if (getSciVersionForDetection() >= SCI_VERSION_2)
+ return 0;
#endif
ViewType gameViews = resMan.getViewType();
// Have we identified the game views? If not, stop here
- // Can't be SCI (or unsupported SCI views). Pinball Creep by sierra also uses resource.map/resource.000 files
- // but doesnt share sci format at all, if we dont return 0 here we will detect this game as SCI
- if (gameViews == kViewUnknown) {
+ // Can't be SCI (or unsupported SCI views). Pinball Creep by Sierra also uses resource.map/resource.000 files
+ // but doesn't share SCI format at all
+ if (gameViews == kViewUnknown)
return 0;
- }
// Set the platform to Amiga if the game is using Amiga views
if (gameViews == kViewAmiga)
@@ -597,9 +594,8 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
Common::String sierraGameId = resMan.findSierraGameId();
// If we don't have a game id, the game is not SCI
- if (sierraGameId.empty()) {
+ if (sierraGameId.empty())
return 0;
- }
Common::String gameId = convertSierraGameId(sierraGameId, &s_fallbackDesc.flags, resMan);
strncpy(s_fallbackGameIdBuf, gameId.c_str(), sizeof(s_fallbackGameIdBuf) - 1);
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 91b3c45c6e..0fddaa51b4 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -1832,15 +1832,12 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
-#if 0
- // The resource.002 file, contained in disk 3, is broken in this version
- // (it contains a large chunk of zeroes and several broken resources,
- // e.g. pic 250 and views 250 and 251).
- // Thus this detection entry isn't accurate.
-
- // Larry 1 Remake - English Amiga (from www.back2roots.org)
+ // Larry 1 Remake - English Amiga
// Executable scanning reports "1.004.024"
// SCI interpreter version 1.000.784
+ // NOTE: The resource.002 file, contained in disk 3, is broken in the
+ // www.back2roots.org version (it contains a large chunk of zeroes and
+ // several broken resources, e.g. pic 250 and views 250 and 251).
{"lsl1sci", "SCI", {
{"resource.map", 0, "7d115a9e27dc8ac71e8d5ef33d589bd5", 3366},
{"resource.000", 0, "e67fd129d5810fc7ad8ea509d891cc00", 363073},
@@ -1849,7 +1846,6 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "4a34c3367c2fe7eb380d741374da1989", 572251},
AD_LISTEND},
Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
-#endif
// Larry 1 VGA Remake - English DOS (from spookypeanut)
// Executable scanning reports "1.000.577", VERSION file reports "2.1"
@@ -4119,6 +4115,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
FANMADE("Knight's Quest Demo 1.0", "5e816edf993956752ed06fccfeeae6d9", 1260, "959321f88a22905fa1f8c6d897874744", 703836),
FANMADE("LockerGnome Quest", "3eeff9130206cad0c4e1551e2b9dd2c5", 420, "ae05ca90806fd90cc43f147c82d3547c", 158906),
FANMADE("LockerGnome Quest Redux", "55b0081dbdd77a07807c76cec3606970", 492, "75c9c5e8a475a7b5f1a6cb18edad67f2", 168069),
+ FANMADE("LockerGnome Quest Redux", "6299578d8ab709cc181baea6b984a0a7", 492, "c0ff4bfcc62fb111337343967e4001fd", 167383),
FANMADE("New Year's Mystery", "e4dcab1b1d3cb4a2c070a07a9c9589e0", 708, "e00ca5e44fd4e98d8174b467b31b0f21", 295425),
FANMADE("New Year's Mystery (Updated)", "efd1beb5120293725065c95959144f81", 714, "b3bd3c2372ed6efa28adb12403c4c31a", 305027),
FANMADE("Ocean Battle", "c2304a0568e0eb84f8e9a0915f01170a", 408, "46c520c1ac9b63528854d0f58c7e1b74", 142234),
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 61fb717567..c56eb09482 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -37,6 +37,7 @@
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#include "sci/engine/savegame.h"
+#include "sci/graphics/menu.h"
#include "sci/sound/audio.h"
#include "sci/console.h"
@@ -913,6 +914,25 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
// code concerning this via script patch.
s->variables[VAR_GLOBAL][0xB3].setOffset(SAVEGAMEID_OFFICIALRANGE_START + savegameId);
break;
+ case GID_JONES:
+ // HACK: The code that enables certain menu items isn't called when a game is restored from the
+ // launcher, or the "Restore game" option in the game's main menu - bugs #6537 and #6723.
+ // These menu entries are disabled when the game is launched, and are enabled when a new game is
+ // started. The code for enabling these entries is is all in script 1, room1::init, but that code
+ // path is never followed in these two cases (restoring game from the menu, or restoring a game
+ // from the ScummVM launcher). Thus, we perform the calls to enable the menus ourselves here.
+ // These two are needed when restoring from the launcher
+ // FIXME: The original interpreter saves and restores the menu state, so these attributes
+ // are automatically reset there. We may want to do the same.
+ g_sci->_gfxMenu->kernelSetAttribute(257 >> 8, 257 & 0xFF, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Sierra -> About Jones
+ g_sci->_gfxMenu->kernelSetAttribute(258 >> 8, 258 & 0xFF, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Sierra -> Help
+ // The rest are normally enabled from room1::init
+ g_sci->_gfxMenu->kernelSetAttribute(769 >> 8, 769 & 0xFF, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Options -> Delete current player
+ g_sci->_gfxMenu->kernelSetAttribute(513 >> 8, 513 & 0xFF, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Game -> Save Game
+ g_sci->_gfxMenu->kernelSetAttribute(515 >> 8, 515 & 0xFF, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Game -> Restore Game
+ g_sci->_gfxMenu->kernelSetAttribute(1025 >> 8, 1025 & 0xFF, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Status -> Statistics
+ g_sci->_gfxMenu->kernelSetAttribute(1026 >> 8, 1026 & 0xFF, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Status -> Goals
+ break;
default:
break;
}
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index cdcdcc41e5..9decc4cef6 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -844,6 +844,8 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const Common::Strin
if (voc)
voc->saveLoadWithSerializer(ser);
+ // TODO: SSCI (at least JonesCD, presumably more) also stores the Menu state
+
return true;
}
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 511d2014bd..b1c002413d 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -262,7 +262,7 @@ SciEvent EventManager::getScummVMEvent() {
// Scancodify if appropriate
if (modifiers & Common::KBD_ALT)
input.character = altify(input.character);
- else if ((modifiers & Common::KBD_CTRL) && input.character > 0 && input.character < 27)
+ if (getSciVersion() <= SCI_VERSION_1_MIDDLE && (modifiers & Common::KBD_CTRL) && input.character > 0 && input.character < 27)
input.character += 96; // 0x01 -> 'a'
// If no actual key was pressed (e.g. if only a modifier key was pressed),
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 91b5b25e99..fafc734895 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -784,13 +784,10 @@ void GfxFrameout::kernelFrameout() {
// swapped in the GK1 inventory screen, investigate why.
// This is also needed for GK1 rooms 710 and 720 (catacombs, inner and
// outer circle), for handling the tiles and talking to Wolfgang.
- // HACK: Fix the coordinates by explicitly setting them here.
- Common::Rect objNSRect = g_sci->_gfxCompare->getNSRect(itemEntry->object);
- uint16 roomNumber = g_sci->getEngineState()->currentRoomNumber();
- if (objNSRect.top == nsRect.left && objNSRect.left == nsRect.top && nsRect.top != 0 && nsRect.left != 0 ||
- (g_sci->getGameId() == GID_GK1 && (roomNumber == 710 || roomNumber == 720))) {
+ // HACK: Fix the coordinates by explicitly setting them here for GK1.
+ // Also check bug #6729, for another case where this is needed.
+ if (g_sci->getGameId() == GID_GK1)
g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect);
- }
}
// Don't attempt to draw sprites that are outside the visible
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index a3624c7959..36b9660d4e 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -65,14 +65,19 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen)
// the real merging done in earlier games. If we use the copying over, we
// will get issues because some views have marked all colors as being used
// and those will overwrite the current palette in that case
- if (getSciVersion() < SCI_VERSION_1_1)
+ if (getSciVersion() < SCI_VERSION_1_1) {
_useMerging = true;
- else if (getSciVersion() == SCI_VERSION_1_1)
+ _use16bitColorMatch = true;
+ } else if (getSciVersion() == SCI_VERSION_1_1) {
// there are some games that use inbetween SCI1.1 interpreter, so we have
// to detect if the current game is merging or copying
_useMerging = _resMan->detectPaletteMergingSci11();
- else // SCI32
+ _use16bitColorMatch = _useMerging;
+ } else {
+ // SCI32
_useMerging = false;
+ _use16bitColorMatch = false; // not verified that SCI32 uses 8-bit color matching
+ }
palVaryInit();
@@ -120,6 +125,10 @@ bool GfxPalette::isMerging() {
return _useMerging;
}
+bool GfxPalette::isUsing16bitColorMatch() {
+ return _use16bitColorMatch;
+}
+
// meant to get called only once during init of engine
void GfxPalette::setDefault() {
if (_resMan->getViewType() == kViewEga)
@@ -520,6 +529,15 @@ uint16 GfxPalette::matchColor(byte r, byte g, byte b) {
dr = _sysPalette.colors[i].r - r;
dg = _sysPalette.colors[i].g - g;
db = _sysPalette.colors[i].b - b;
+ if (!_use16bitColorMatch) {
+ // remove upper bits for most SCI1.1 games
+ // this bug was introduced with Quest For Glory 3 interpreter
+ // we have to implement it, otherwise some colors will be "wrong"
+ // See Space Quest 5 bug #6455
+ dr &= 0xFF;
+ dg &= 0xFF;
+ db &= 0xFF;
+ }
// minimum squares match
cdiff = (dr*dr) + (dg*dg) + (db*db);
// minimum sum match (Sierra's)
diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h
index 347695deb8..93cc2a8189 100644
--- a/engines/sci/graphics/palette.h
+++ b/engines/sci/graphics/palette.h
@@ -46,6 +46,7 @@ public:
~GfxPalette();
bool isMerging();
+ bool isUsing16bitColorMatch();
void setDefault();
void createFromData(byte *data, int bytesLeft, Palette *paletteOut);
@@ -124,6 +125,7 @@ private:
bool _sysPaletteChanged;
bool _useMerging;
+ bool _use16bitColorMatch;
Common::Array<PalSchedule> _schedules;
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index f3f352e5b8..a88546e68c 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -283,6 +283,7 @@ void GfxView::initData(GuiResourceId resourceId) {
_isScaleable = false;
break;
case 0x40:
+ case 0x4F: // LSL6 Polish, seems to be garbage - bug #6718
case 0:
break; // don't do anything, we already have _isScaleable set
default:
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index 3344b79e26..000b037b44 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -535,10 +535,7 @@ bool Vocabulary::tokenizeString(ResultWordListList &retval, const char *sentence
if (Common::isAlnum(c) || (c == '-' && wordLen) || (c >= 0x80)) {
currentWord[wordLen] = lowerCaseMap[c];
++wordLen;
- } else if (c == '\'' && wordLen && (sentence[pos_in_sentence] == 's' || sentence[pos_in_sentence] == 'S')) {
- // Skip apostrophe-s at the end of the word, if it exists
- pos_in_sentence++; // skip the 's'
- } else {
+ } else if (c == ' ' || c == '\0') {
// Continue on this word. Words may contain a '-', but may not start with
// one.
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 17195c14b8..d155792853 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -55,6 +55,11 @@ SciVersion getSciVersion() {
return s_sciVersion;
}
+SciVersion getSciVersionForDetection() {
+ assert(!g_sci);
+ return s_sciVersion;
+}
+
const char *getSciVersionDesc(SciVersion version) {
switch (version) {
case SCI_VERSION_NONE:
@@ -88,9 +93,6 @@ const char *getSciVersionDesc(SciVersion version) {
//////////////////////////////////////////////////////////////////////
-
-#undef SCI_REQUIRE_RESOURCE_FILES
-
//#define SCI_VERBOSE_RESMAN 1
static const char *const s_errorDescriptions[] = {
@@ -639,7 +641,7 @@ int ResourceManager::addAppropriateSources() {
return 1;
}
-int ResourceManager::addAppropriateSources(const Common::FSList &fslist) {
+int ResourceManager::addAppropriateSourcesForDetection(const Common::FSList &fslist) {
ResourceSource *map = 0;
Common::Array<ResourceSource *> sci21Maps;
@@ -858,7 +860,7 @@ void ResourceManager::freeResourceSources() {
ResourceManager::ResourceManager() {
}
-void ResourceManager::init(bool initFromFallbackDetector) {
+void ResourceManager::init() {
_memoryLocked = 0;
_memoryLRU = 0;
_LRU.clear();
@@ -890,25 +892,24 @@ void ResourceManager::init(bool initFromFallbackDetector) {
debugC(1, kDebugLevelResMan, "resMan: Detected volume version %d: %s", _volVersion, versionDescription(_volVersion));
if ((_mapVersion == kResVersionUnknown) && (_volVersion == kResVersionUnknown)) {
- warning("Volume and map version not detected, assuming that this is not a sci game");
+ warning("Volume and map version not detected, assuming that this is not a SCI game");
_viewType = kViewUnknown;
return;
}
scanNewSources();
- if (!initFromFallbackDetector) {
- if (!addAudioSources()) {
- // FIXME: This error message is not always correct.
- // OTOH, it is nice to be able to detect missing files/sources
- // So we should definitely fix addAudioSources so this error
- // only pops up when necessary. Disabling for now.
- //error("Somehow I can't seem to find the sound files I need (RESOURCE.AUD/RESOURCE.SFX), aborting");
- }
- addScriptChunkSources();
- scanNewSources();
+ if (!addAudioSources()) {
+ // FIXME: This error message is not always correct.
+ // OTOH, it is nice to be able to detect missing files/sources
+ // So we should definitely fix addAudioSources so this error
+ // only pops up when necessary. Disabling for now.
+ //error("Somehow I can't seem to find the sound files I need (RESOURCE.AUD/RESOURCE.SFX), aborting");
}
+ addScriptChunkSources();
+ scanNewSources();
+
detectSciVersion();
debugC(1, kDebugLevelResMan, "resMan: Detected %s", getSciVersionDesc(getSciVersion()));
@@ -943,6 +944,22 @@ void ResourceManager::init(bool initFromFallbackDetector) {
}
}
+void ResourceManager::initForDetection() {
+ assert(!g_sci);
+
+ _memoryLocked = 0;
+ _memoryLRU = 0;
+ _LRU.clear();
+ _resMap.clear();
+ _audioMapSCI1 = NULL;
+
+ _mapVersion = detectMapVersion();
+ _volVersion = detectVolVersion();
+
+ scanNewSources();
+ detectSciVersion();
+}
+
ResourceManager::~ResourceManager() {
// freeing resources
ResourceMap::iterator itr = _resMap.begin();
@@ -1645,6 +1662,9 @@ int ResourceManager::readResourceMapSCI1(ResourceSource *map) {
do {
type = fileStream->readByte() & 0x1F;
resMap[type].wOffset = fileStream->readUint16LE();
+ if (fileStream->eos())
+ return SCI_ERROR_RESMAP_NOT_FOUND;
+
resMap[prevtype].wSize = (resMap[type].wOffset
- resMap[prevtype].wOffset) / nEntrySize;
prevtype = type;
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index e90f52a3ce..62f3c584ac 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -312,10 +312,22 @@ public:
/**
* Initializes the resource manager.
*/
- void init(bool initFromFallbackDetector = false);
+ void init();
+ /**
+ * Similar to the function above, only called from the fallback detector
+ */
+ void initForDetection();
+
+ /**
+ * Adds all of the resource files for a game
+ */
int addAppropriateSources();
- int addAppropriateSources(const Common::FSList &fslist); // TODO: Switch from FSList to Common::Archive?
+
+ /**
+ * Similar to the function above, only called from the fallback detector
+ */
+ int addAppropriateSourcesForDetection(const Common::FSList &fslist); // TODO: Switch from FSList to Common::Archive?
/**
* Looks up a resource's data.
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 4c7cd9b84a..66778f0914 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -710,7 +710,6 @@ SoundResource::SoundResource(uint32 resourceNr, ResourceManager *resMan, SciVers
// 0x20 is set on rhythm channels to prevent remapping
// CHECKME: Which SCI versions need that set manually?
- channel->flags = (*channel->data) >> 4;
if (channel->number == 9)
channel->flags |= 2;
// Note: flag 1: channel start offset is 0 instead of 10
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 48bc4819d2..2377386c72 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -429,6 +429,12 @@ extern SciEngine *g_sci;
SciVersion getSciVersion();
/**
+ * Same as above, but this version doesn't assert on unknown SCI versions.
+ * Only used by the fallback detector
+ */
+SciVersion getSciVersionForDetection();
+
+/**
* Convenience function converting an SCI version into a human-readable string.
*/
const char *getSciVersionDesc(SciVersion version);
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 80a72b9a6f..baf85de74c 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -399,24 +399,42 @@ void MidiPlayer_Midi::playSwitch(bool play) {
}
bool MidiPlayer_Midi::isMt32GmPatch(const byte *data, int size) {
- if (size < 1155)
+ // WORKAROUND: Some Mac games (e.g. LSL5) may have an extra byte at the
+ // end, so compensate for that here - bug #6725.
+ if (size == 16890)
+ size--;
+
+ // Need at least 1153 + 2 bytes for a GM patch. Check readMt32GmPatch()
+ // below for more info.
+ if (size < 1153 + 2)
return false;
+ // The maximum number of bytes for an MT-32 patch is 16889. The maximum
+ // number of timbres is 64, which leads us to:
+ // 491 + 1 + 64 * 246 + 653 = 16889
if (size > 16889)
return true;
bool isMt32 = false;
bool isMt32Gm = false;
+ // First, check for a GM patch. The presence of MIDI data after the
+ // initial 1153 + 2 bytes indicates a GM patch
if (READ_LE_UINT16(data + 1153) + 1155 == size)
isMt32Gm = true;
- int pos = 492 + 246 * data[491];
+ // Now check for a regular MT-32 patch. Check readMt32Patch() below for
+ // more info.
+ // 491 = 20 + 20 + 20 + 2 + 1 + 11 + 3 * 11 + 256 + 128
+ byte timbresNr = data[491];
+ int pos = 492 + 246 * timbresNr;
+ // Patches 49-96
if ((size >= (pos + 386)) && (READ_BE_UINT16(data + pos) == 0xabcd))
- pos += 386;
+ pos += 386; // 256 + 128 + 2
+ // Rhythm key map + partial reserve
if ((size >= (pos + 267)) && (READ_BE_UINT16(data + pos) == 0xdcba))
- pos += 267;
+ pos += 267; // 256 + 9 + 2
if (size == pos)
isMt32 = true;
@@ -460,10 +478,28 @@ void MidiPlayer_Midi::sendMt32SysEx(const uint32 addr, const byte *buf, int len,
}
void MidiPlayer_Midi::readMt32Patch(const byte *data, int size) {
+ // MT-32 patch contents:
+ // - 20 bytes unkown
+ // - 20 bytes before-SysEx message
+ // - 20 bytes goodbye SysEx message
+ // - 2 bytes volume
+ // - 1 byte reverb
+ // - 11 bytes reverb Sysex message
+ // - 3 * 11 reverb data
+ // - 256 + 128 bytes patches 1-48
+ // --> total: 491 bytes
+ // - 1 byte number of timbres (64 max)
+ // - 246 * timbres timbre data
+ // - 2 bytes flag (0xabcd)
+ // - 256 + 128 bytes patches 49-96
+ // - 2 bytes flag (0xdcba)
+ // - 256 bytes rhythm key map
+ // - 9 bytes partial reserve
+
Common::MemoryReadStream *str = new Common::MemoryReadStream(data, size);
// Send before-SysEx text
- str->seek(0x14);
+ str->seek(20);
sendMt32SysEx(0x200000, str, 20);
// Save goodbye message
@@ -527,15 +563,25 @@ void MidiPlayer_Midi::readMt32Patch(const byte *data, int size) {
}
void MidiPlayer_Midi::readMt32GmPatch(const byte *data, int size) {
- memcpy(_patchMap, data, 0x80);
- memcpy(_keyShift, data + 0x80, 0x80);
- memcpy(_volAdjust, data + 0x100, 0x80);
- memcpy(_percussionMap, data + 0x180, 0x80);
- _channels[MIDI_RHYTHM_CHANNEL].volAdjust = data[0x200];
- memcpy(_velocityMapIdx, data + 0x201, 0x80);
- memcpy(_velocityMap, data + 0x281, 0x200);
-
- uint16 midiSize = READ_LE_UINT16(data + 0x481);
+ // GM patch contents:
+ // - 128 bytes patch map
+ // - 128 bytes key shift
+ // - 128 bytes volume adjustment
+ // - 128 bytes percussion map
+ // - 1 byte volume adjust for the rhythm channel
+ // - 128 bytes velocity map IDs
+ // - 512 bytes velocity map
+ // --> total: 1153 bytes
+
+ memcpy(_patchMap, data, 128);
+ memcpy(_keyShift, data + 128, 128);
+ memcpy(_volAdjust, data + 256, 128);
+ memcpy(_percussionMap, data + 384, 128);
+ _channels[MIDI_RHYTHM_CHANNEL].volAdjust = data[512];
+ memcpy(_velocityMapIdx, data + 513, 128);
+ memcpy(_velocityMap, data + 641, 512);
+
+ uint16 midiSize = READ_LE_UINT16(data + 1153);
if (midiSize > 0) {
if (size < midiSize + 1155)
diff --git a/engines/scumm/POTFILES b/engines/scumm/POTFILES
index 6034320259..6d10537d3c 100644
--- a/engines/scumm/POTFILES
+++ b/engines/scumm/POTFILES
@@ -1,3 +1,6 @@
engines/scumm/dialogs.cpp
engines/scumm/help.cpp
engines/scumm/scumm.cpp
+engines/scumm/players/player_v3m.cpp
+engines/scumm/players/player_v5m.cpp
+
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 7cd50e1f4c..a7922b232e 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -504,12 +504,6 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF
dr.extra = "V1 Demo";
}
- // HACK: If 'Demo' occurs in the extra string, set the GF_DEMO flag,
- // required by some game demos (e.g. Dig, FT and COMI).
- if (dr.extra && strstr(dr.extra, "Demo")) {
- dr.game.features |= GF_DEMO;
- }
-
// HACK: Try to detect languages for translated games
if (dr.language == UNK_LANG) {
dr.language = detectLanguage(fslist, dr.game.id);
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index ae334c201c..3f08f17aff 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -260,13 +260,16 @@ static const GameSettings gameVariantsTable[] = {
{"samnmax", "Floppy", 0, GID_SAMNMAX, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO1(GUIO_NOSPEECH)},
#ifdef ENABLE_SCUMM_7_8
- {"ft", 0, 0, GID_FT, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
+ {"ft", "", 0, GID_FT, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
+ {"ft", "Demo", 0, GID_FT, 7, 0, MDT_NONE, GF_DEMO, UNK, GUIO1(GUIO_NOMIDI)},
- {"dig", "", 0, GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
+ {"dig", "", 0, GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
+ {"dig", "Demo", 0, GID_DIG, 7, 0, MDT_NONE, GF_DEMO, UNK, GUIO1(GUIO_NOMIDI)},
{"dig", "Steam", "steam", GID_DIG, 7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},
- {"comi", 0, 0, GID_CMI, 8, 0, MDT_NONE, 0, Common::kPlatformWindows, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)},
-#endif
+ {"comi", "", 0, GID_CMI, 8, 0, MDT_NONE, 0, Common::kPlatformWindows, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)},
+ {"comi", "Demo", 0, GID_CMI, 8, 0, MDT_NONE, GF_DEMO, Common::kPlatformWindows, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)},
+ #endif
// Humongous Entertainment Scumm Version 6
{"activity", "", 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO1(GUIO_NOLAUNCHLOAD)},
@@ -677,12 +680,13 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "freddi", "Freddi Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "freddi", "Freddi Fish", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "freddi", "FreddiD", kGenHEPC, Common::NL_NLD, UNK, 0 },
+ { "freddi", "FreddiE", kGenHEPC, UNK_LANG, UNK, 0 },
{ "freddi", "Freddi Fisk", kGenHEMac, Common::SE_SWE, Common::kPlatformMacintosh, 0 },
{ "freddi", "FRITZI", kGenHEPC, Common::DE_DEU, UNK, 0 },
{ "freddi", "Marine Malice", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 },
{ "freddi", "MM-DEMO", kGenHEPC, UNK_LANG, UNK, 0 },
- { "freddi2", "freddi2", kGenHEPC, UNK_LANG, UNK, 0 },
+ { "freddi2", "freddi2", kGenHEPC, UNK_LANG, Common::kPlatformWindows, 0 },
{ "freddi2", "FF2-demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "freddi2", "ff2-demo", kGenHEPC, UNK_LANG, Common::kPlatformWindows, 0 },
{ "freddi2", "FFHSDemo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
@@ -744,7 +748,7 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "lost", "lost", kGenHEPC, UNK_LANG, UNK, 0 },
{ "lost", "Lost and Found", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "lost", "smaller", kGenHEPC, UNK_LANG, UNK, 0 },
- { "lost", "verloren", kGenHEPC, Common::NL_NLD, UNK, 0 },
+ { "lost", "verloren", kGenHEPC, Common::NL_NLD, Common::kPlatformWindows, 0 },
{ "lost", "Verloren", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 },
{ "maze", "maze", kGenHEPC, UNK_LANG, UNK, 0 },
@@ -789,7 +793,7 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "pajama2", "PJ2 Demo", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 },
{ "pajama2", "PS2DEMO", kGenHEPC, Common::HE_ISR, UNK, 0 },
- { "pajama3", "pajama3", kGenHEPC, UNK_LANG, UNK, 0 },
+ { "pajama3", "pajama3", kGenHEPC, UNK_LANG, Common::kPlatformWindows, 0 },
{ "pajama3", "FPJ3Demo", kGenHEPC, Common::FR_FRA, UNK, 0 },
{ "pajama3", "GPJ3Demo", kGenHEPC, Common::DE_DEU, UNK, 0 },
{ "pajama3", "PajamaHTF", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
@@ -888,7 +892,7 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "socks", "socks", kGenHEPC, UNK_LANG, UNK, 0 },
{ "socks", "SockWorks", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
- { "socks", "SokkenSoep", kGenHEPC, Common::NL_NLD, UNK, 0 },
+ { "socks", "SokkenSoep", kGenHEPC, Common::NL_NLD, Common::kPlatformWindows, 0 },
{ "socks", "SokkenSoep", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 },
{ "spyfox", "spyfox", kGenHEPC, UNK_LANG, Common::kPlatformWindows, 0 },
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 7919075d0b..db836467ef 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -1013,7 +1013,6 @@ void ScummEngine::resetRoomObject(ObjectData *od, const byte *room, const byte *
od->actordir = (byte)READ_LE_UINT16(&imhd->v7.actordir);
} else if (_game.version == 6) {
- assert(imhd);
od->obj_nr = READ_LE_UINT16(&(cdhd->v6.obj_id));
od->width = READ_LE_UINT16(&cdhd->v6.w);
diff --git a/engines/scumm/players/player_mac.cpp b/engines/scumm/players/player_mac.cpp
index fe15698494..634fd2de2b 100644
--- a/engines/scumm/players/player_mac.cpp
+++ b/engines/scumm/players/player_mac.cpp
@@ -21,7 +21,6 @@
*/
#include "common/macresman.h"
-#include "common/translation.h"
#include "engines/engine.h"
#include "gui/message.h"
#include "scumm/players/player_mac.h"
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index 0eeff57ff7..d7ec9bb686 100644
--- a/engines/scumm/scumm-md5.h
+++ b/engines/scumm/scumm-md5.h
@@ -1,5 +1,5 @@
/*
- This file was generated by the md5table tool on Wed Jun 25 10:34:07 2014
+ This file was generated by the md5table tool on Mon Oct 20 12:17:31 2014
DO NOT EDIT MANUALLY!
*/
@@ -28,7 +28,7 @@ static const MD5Table md5table[] = {
{ "055ffe4f47753e47594ac67823220c54", "puttrace", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "057c9b456dedcc4d71b991a3072a20b3", "monkey", "SEGA", "", 9465, Common::JA_JPN, Common::kPlatformSegaCD },
{ "06b187468113f9ae5a400b148a847fac", "atlantis", "Floppy", "Floppy", 12075, Common::EN_ANY, Common::kPlatformMacintosh },
- { "06c3cf4f31daad8b1cd93153491db9e6", "pajama3", "", "", -1, Common::NL_NLD, Common::kPlatformMacintosh },
+ { "06c3cf4f31daad8b1cd93153491db9e6", "pajama3", "", "", 79382, Common::NL_NLD, Common::kPlatformUnknown },
{ "07433205acdca3bc553d0e731588b35f", "airport", "", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "07a1eefd8ca95d77310311446c0f53d0", "brstorm", "", "", 5433, Common::EN_ANY, Common::kPlatformUnknown },
{ "07b810e37be7489263f7bc7627d4765d", "freddi4", "unenc", "Unencrypted", -1, Common::RU_RUS, Common::kPlatformWindows },
@@ -112,7 +112,7 @@ static const MD5Table md5table[] = {
{ "2108d83dcf09f8adb4bc524669c8cf51", "PuttTime", "HE 99", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "21a6592322f92550f144f68a8a4e685e", "dig", "", "", -1, Common::FR_FRA, Common::kPlatformMacintosh },
{ "21abe302e1b1e2b66d6f5c12e241ebfd", "freddicove", "unenc", "Unencrypted", -1, Common::RU_RUS, Common::kPlatformWindows },
- { "2232b0b9411575b1f9961713ebc9de61", "balloon", "HE 80", "", -1, Common::UNK_LANG, Common::kPlatformWindows },
+ { "2232b0b9411575b1f9961713ebc9de61", "balloon", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformWindows },
{ "225e18566e810c634bf7de63e7568e3e", "mustard", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "22c9eb04455440131ffc157aeb8d40a8", "fbear", "HE 70", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "22de86b2f7ec6e5db745ed1123310b44", "spyfox2", "", "Demo", 15832, Common::FR_FRA, Common::kPlatformWindows },
@@ -393,9 +393,10 @@ static const MD5Table md5table[] = {
{ "8e3241ddd6c8dadf64305e8740d45e13", "balloon", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "8e4ee4db46954bfe2912e259a16fad82", "monkey2", "", "", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "8e9417564f33790815445b2136efa667", "atlantis", "", "CD", 11915, Common::JA_JPN, Common::kPlatformMacintosh },
- { "8e9830a6f2702be5b22c8fa0a6aaf977", "freddi2", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformMacintosh },
+ { "8e9830a6f2702be5b22c8fa0a6aaf977", "freddi2", "HE 80", "", 65305, Common::NL_NLD, Common::kPlatformUnknown },
{ "8eb84cee9b429314c7f0bdcf560723eb", "monkey", "FM-TOWNS", "", 9925, Common::EN_ANY, Common::kPlatformFMTowns },
{ "8ee63cafb1fe9d62aa0d5a23117e70e7", "freddi2", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
+ { "8f345db2f3f5a25ed6305001957e6f72", "freddicove", "HE 100", "", 41182, Common::NL_NLD, Common::kPlatformUnknown },
{ "8f3758ff98c9c5d78e5d635222cad026", "atlantis", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "8fec68383202d38c0d25e9e3b757c5df", "comi", "Demo", "Demo", 18041, Common::UNK_LANG, Common::kPlatformWindows },
{ "8ffd618a776a4c0d8922bb28b09f8ce8", "airport", "", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
diff --git a/engines/sword1/POTFILES b/engines/sword1/POTFILES
index 849bef9060..b60d55ff22 100644
--- a/engines/sword1/POTFILES
+++ b/engines/sword1/POTFILES
@@ -1,4 +1,4 @@
engines/sword1/animation.cpp
engines/sword1/control.cpp
engines/sword1/logic.cpp
-engines/sword1/sword1.cpp
+
diff --git a/engines/sword1/console.cpp b/engines/sword1/console.cpp
index 3eb3b93a19..7fabc62192 100644
--- a/engines/sword1/console.cpp
+++ b/engines/sword1/console.cpp
@@ -22,14 +22,37 @@
#include "sword1/console.h"
#include "sword1/sword1.h"
+#include "sword1/sound.h"
+#include "common/config-manager.h"
+#include "common/str.h"
namespace Sword1 {
SwordConsole::SwordConsole(SwordEngine *vm) : GUI::Debugger(), _vm(vm) {
assert(_vm);
+ if (scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1mac") == 0 || scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1macdemo") == 0)
+ registerCmd("speechEndianness", WRAP_METHOD(SwordConsole, Cmd_SpeechEndianness));
}
SwordConsole::~SwordConsole() {
}
+
+bool SwordConsole::Cmd_SpeechEndianness(int argc, const char **argv) {
+ if (argc == 1) {
+ debugPrintf("Using %s speech\n", _vm->_sound->_bigEndianSpeech ? "be" : "le");
+ return true;
+ }
+ if (argc == 2) {
+ if (scumm_stricmp(argv[1], "le") == 0) {
+ _vm->_sound->_bigEndianSpeech = false;
+ return false;
+ } else if (scumm_stricmp(argv[1], "be") == 0) {
+ _vm->_sound->_bigEndianSpeech = true;
+ return false;
+ }
+ }
+ debugPrintf("Usage: %s [le | be]\n", argv[0]);
+ return true;
+}
} // End of namespace Sword
diff --git a/engines/sword1/console.h b/engines/sword1/console.h
index a2bb51f9a4..88ee756151 100644
--- a/engines/sword1/console.h
+++ b/engines/sword1/console.h
@@ -36,6 +36,7 @@ public:
private:
SwordEngine *_vm;
+ bool Cmd_SpeechEndianness(int argc, const char **argv);
};
} // End of namespace Sword1
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index ddde7f4235..9140bddb65 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -116,7 +116,7 @@ void Sound::checkSpeechFileEndianness() {
return;
// I picked the sample to use randomly (I just made sure it is long enough so that there is
- // a fair change of the heuristic to have a stable result and work for every language).
+ // a fair chance of the heuristic to have a stable result and work for every language).
int roomNo = _currentCowFile == 1 ? 1 : 129;
int localNo = _currentCowFile == 1 ? 2 : 933;
// Get the speech data and apply the heuristic
@@ -128,37 +128,42 @@ void Sound::checkSpeechFileEndianness() {
// Compute average of difference between two consecutive samples for both BE and LE
_bigEndianSpeech = false;
int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size);
- if (data) {
- if (size > 4000)
- size = 2000;
- else
- size /= 2;
- double le_diff_sum = 0.;
- for (uint32 i = 1; i < size; ++i)
- le_diff_sum += fabs((double)(data[i] - data[i - 1]));
- delete[] data;
- _bigEndianSpeech = true;
- data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size);
- if (data) {
- if (size > 4000)
- size = 2000;
- else
- size /= 2;
- double be_diff_sum = 0.;
- for (uint32 i = 1; i < size; ++i)
- be_diff_sum += fabs((double)(data[i] - data[i - 1]));
- delete [] data;
- // Set the big endian flag
- _bigEndianSpeech = (be_diff_sum < le_diff_sum);
- if (_bigEndianSpeech)
- debug(6, "Mac version: using big endian speech file");
- else
- debug(6, "Mac version: using little endian speech file");
- debug(8, "Speech endianness heuristic: average = %f for BE and %f for LE, computed on %d samples)", be_diff_sum / (size - 1), le_diff_sum / (size - 1), size);
- } else
- _bigEndianSpeech = false;
+ uint32 maxSamples = size > 2000 ? 2000 : size;
+ double le_diff = endiannessHeuristicValue(data, size, maxSamples);
+ delete[] data;
+ _bigEndianSpeech = true;
+ data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size);
+ double be_diff = endiannessHeuristicValue(data, size, maxSamples);
+ delete [] data;
+ // Set the big endian flag
+ _bigEndianSpeech = (be_diff < le_diff);
+ if (_bigEndianSpeech)
+ debug(6, "Mac version: using big endian speech file");
+ else
+ debug(6, "Mac version: using little endian speech file");
+ debug(8, "Speech endianness heuristic: average = %f for BE and %f for LE (%d samples)", be_diff, le_diff, maxSamples);
+ }
+}
+
+double Sound::endiannessHeuristicValue(int16* data, uint32 dataSize, uint32 &maxSamples) {
+ if (!data)
+ return 50000.; // the heuristic value for the wrong endianess is about 21000 (1/3rd of the 16 bits range)
+
+ double diff_sum = 0.;
+ uint32 cpt = 0;
+ int16 prev_value = (int16)FROM_LE_16(*((uint16 *)(data)));
+ for (uint32 i = 1; i < dataSize && cpt < maxSamples; ++i) {
+ int16 value = (int16)FROM_LE_16(*((uint16 *)(data + i)));
+ if (value != prev_value) {
+ diff_sum += fabs((double)(value - prev_value));
+ ++cpt;
+ prev_value = value;
}
}
+ if (cpt == 0)
+ return 50000.;
+ maxSamples = cpt;
+ return diff_sum / cpt;
}
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index 666598dba0..e65e797934 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -79,6 +79,7 @@ enum CowMode {
};
class Sound {
+ friend class SwordConsole;
public:
Sound(Audio::Mixer *mixer, ResMan *pResMan);
~Sound();
@@ -101,6 +102,7 @@ public:
void engine();
void checkSpeechFileEndianness();
+ double endiannessHeuristicValue(int16* data, uint32 dataSize, uint32 &maxSamples);
private:
uint8 _sfxVolL, _sfxVolR, _speechVolL, _speechVolR;
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 08ea02f32d..1e9b7f70f4 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -774,6 +774,8 @@ void SwordEngine::reinitRes() {
_logic->newScreen(Logic::_scriptVars[NEW_SCREEN]);
_sound->newScreen(Logic::_scriptVars[NEW_SCREEN]);
Logic::_scriptVars[SCREEN] = Logic::_scriptVars[NEW_SCREEN];
+ _logic->engine();
+ _logic->updateScreenParams();
_screen->fullRefresh();
_screen->draw();
}
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index c58e97e353..eb24ef70fa 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -79,6 +79,7 @@ struct SystemVars {
};
class SwordEngine : public Engine {
+ friend class SwordConsole;
public:
SwordEngine(OSystem *syst);
virtual ~SwordEngine();
diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp
index fb83b7f941..7d68081593 100644
--- a/engines/sword25/kernel/persistenceservice.cpp
+++ b/engines/sword25/kernel/persistenceservice.cpp
@@ -52,7 +52,7 @@ static const uint SLOT_COUNT = 18;
static const uint FILE_COPY_BUFFER_SIZE = 1024 * 10;
static const char *VERSIONIDOLD = "SCUMMVM1";
static const char *VERSIONID = "SCUMMVM2";
-static const int VERSIONNUM = 2;
+static const int VERSIONNUM = 3;
#define MAX_SAVEGAME_SIZE 100
diff --git a/engines/sword25/util/pluto/pluto.cpp b/engines/sword25/util/pluto/pluto.cpp
index fb477c1687..78b0a815e8 100644
--- a/engines/sword25/util/pluto/pluto.cpp
+++ b/engines/sword25/util/pluto/pluto.cpp
@@ -835,7 +835,15 @@ static void persistthread(PersistInfo *pi)
#endif
write_size(pi, &stackbase);
write_size(pi, &stacktop);
+
+ // ptrdiff_t changes sizes based on 32/64 bit
+ // Hard cast to 64 bit size if SIZE64 is defined
+#ifdef SIZES64
+ uint64 ptrIndex = static_cast<uint64>(L2->errfunc);
+ pi_write(pi, &ptrIndex, sizeof(uint64), pi->ud);
+#else
pi_write(pi, &L2->errfunc, sizeof(ptrdiff_t), pi->ud);
+#endif
//write_size(pi, (size_t *)&L2->errfunc);
}
@@ -944,12 +952,6 @@ static void persist(PersistInfo *pi)
if(!lua_isnil(pi->L, -1)) {
/* perms reftbl ... obj ref */
int zero = 0;
- // FIXME: Casting a pointer to an integer data type is a bad idea we
- // should really get rid of this by fixing the design of this code.
- // For now casting to size_t should silence most (all?) compilers,
- // since size_t is supposedly the same size as a pointer on most
- // (modern) architectures.
- int ref = (int)(size_t)lua_touserdata(pi->L, -1);
pi_write(pi, &zero, sizeof(int), pi->ud);
if (humanReadable) {
snprintf(hrBuf, hrBufSize, "persist_seenobject\n");
@@ -958,7 +960,8 @@ static void persist(PersistInfo *pi)
#ifdef TOTEXT
printf("persist_seenobject\n");
#endif
- pi_write(pi, &ref, sizeof(int), pi->ud);
+ int *ref = (int *)lua_touserdata(pi->L, -1);
+ pi_write(pi, ref, sizeof(int), pi->ud);
if (humanReadable) {
snprintf(hrBuf, hrBufSize, "persist_touserdata_ref %d\n", ref);
hrOut(pi);
@@ -1011,7 +1014,8 @@ static void persist(PersistInfo *pi)
}
lua_pushvalue(pi->L, -1);
/* perms reftbl ... obj obj */
- lua_pushlightuserdata(pi->L, (void *)(++(pi->counter)));
+ int *ref = (int *)lua_newuserdata(pi->L, sizeof(int));
+ *ref = ++(pi->counter);
/* perms reftbl ... obj obj ref */
lua_rawset(pi->L, 2);
/* perms reftbl ... obj */
@@ -1737,7 +1741,16 @@ static void unpersistthread(int ref, UnpersistInfo *upi)
verify(LIF(Z,read)(&upi->zio, &L2->status, sizeof(lu_byte)) == 0);
read_size(&upi->zio, &stackbase);
read_size(&upi->zio, &stacktop);
+
+#ifdef SIZES64
+ uint64 value;
+ verify(LIF(Z,read)(&upi->zio, &value, sizeof(uint64)) == 0);
+
+ L2->errfunc = static_cast<ptrdiff_t>(value);
+#else
verify(LIF(Z,read)(&upi->zio, &L2->errfunc, sizeof(ptrdiff_t)) == 0);
+#endif
+
//read_size(&upi->zio, (size_t *)&L2->errfunc);
L2->base = L2->stack + stackbase;
L2->top = L2->stack + stacktop;
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 31610a8467..57d8432f0e 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -821,7 +821,8 @@ const char *const TinselEngine::_textFiles[][3] = {
TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) :
- Engine(syst), _gameDescription(gameDesc), _random("tinsel") {
+ Engine(syst), _gameDescription(gameDesc), _random("tinsel"),
+ _sound(0), _midiMusic(0), _pcmMusic(0), _bmv(0) {
_vm = this;
_config = new Config(this);
@@ -846,13 +847,6 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc)
if (cd_num >= 0)
_system->getAudioCDManager()->openCD(cd_num);
- _midiMusic = new MidiMusicPlayer();
- _pcmMusic = new PCMMusicPlayer();
-
- _sound = new SoundManager(this);
-
- _bmv = new BMVPlayer();
-
_mousePos.x = 0;
_mousePos.y = 0;
_keyHandler = NULL;
@@ -896,6 +890,11 @@ void TinselEngine::initializePath(const Common::FSNode &gamePath) {
}
Common::Error TinselEngine::run() {
+ _midiMusic = new MidiMusicPlayer();
+ _pcmMusic = new PCMMusicPlayer();
+ _sound = new SoundManager(this);
+ _bmv = new BMVPlayer();
+
// Initialize backend
if (getGameID() == GID_DW2) {
#ifndef DW2_EXACT_SIZE
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index 97a14e5bc1..1d0e136d69 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -24,7 +24,6 @@
#include "engines/advancedDetector.h"
#include "common/savefile.h"
#include "common/system.h"
-#include "common/translation.h"
#include "base/plugins.h"
diff --git a/engines/tsage/POTFILES b/engines/tsage/POTFILES
new file mode 100644
index 0000000000..de18cbd072
--- /dev/null
+++ b/engines/tsage/POTFILES
@@ -0,0 +1,3 @@
+engines/tsage/dialogs.cpp
+engines/tsage/scenes.cpp
+
diff --git a/engines/tsage/blue_force/blueforce_dialogs.cpp b/engines/tsage/blue_force/blueforce_dialogs.cpp
index 2f337ac549..5be27c9ae7 100644
--- a/engines/tsage/blue_force/blueforce_dialogs.cpp
+++ b/engines/tsage/blue_force/blueforce_dialogs.cpp
@@ -20,8 +20,6 @@
*
*/
-#include "common/translation.h"
-
#include "gui/dialog.h"
#include "gui/widget.h"
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index b647807f8a..a38796717a 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -42,7 +42,7 @@ Debugger::Debugger() : GUI::Debugger() {
registerCmd("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject));
registerCmd("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
registerCmd("sound", WRAP_METHOD(Debugger, Cmd_Sound));
- registerCmd("setdebug", WRAP_METHOD(Debugger, Cmd_SetDebug));
+ registerCmd("setdebug", WRAP_METHOD(Debugger, Cmd_SetOutpostAlphaDebug));
}
static int strToInt(const char *s) {
@@ -344,7 +344,7 @@ bool Debugger::Cmd_Sound(int argc, const char **argv) {
/**
* Activate internal debugger, when available
*/
-bool Debugger::Cmd_SetDebug(int argc, const char **argv) {
+bool Debugger::Cmd_SetOutpostAlphaDebug(int argc, const char **argv) {
debugPrintf("Not available in this game\n");
return true;
}
@@ -720,7 +720,7 @@ bool Ringworld2Debugger::Cmd_MoveObject(int argc, const char **argv) {
/**
* Activate internal debugger, when available
*/
-bool Ringworld2Debugger::Cmd_SetDebug(int argc, const char **argv) {
+bool Ringworld2Debugger::Cmd_SetOutpostAlphaDebug(int argc, const char **argv) {
if (argc != 1) {
debugPrintf("Usage: %s\n", argv[0]);
return true;
diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h
index 610f45de64..b0f4c665dd 100644
--- a/engines/tsage/debugger.h
+++ b/engines/tsage/debugger.h
@@ -45,7 +45,7 @@ protected:
bool Cmd_Sound(int argc, const char **argv);
virtual bool Cmd_ListObjects(int argc, const char **argv) = 0;
virtual bool Cmd_MoveObject(int argc, const char **argv) = 0;
- virtual bool Cmd_SetDebug(int argc, const char **argv);
+ virtual bool Cmd_SetOutpostAlphaDebug(int argc, const char **argv);
};
class DemoDebugger : public Debugger {
@@ -70,7 +70,7 @@ class Ringworld2Debugger : public Debugger {
protected:
virtual bool Cmd_ListObjects(int argc, const char **argv);
virtual bool Cmd_MoveObject(int argc, const char **argv);
- virtual bool Cmd_SetDebug(int argc, const char **argv);
+ virtual bool Cmd_SetOutpostAlphaDebug(int argc, const char **argv);
};
} // End of namespace TsAGE
diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index 53c03e2e57..d62f398c20 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -35,13 +35,16 @@ MODULE_OBJS := \
ringworld/ringworld_scenes8.o \
ringworld/ringworld_scenes10.o \
ringworld/ringworld_speakers.o \
+ ringworld2/ringworld2_airduct.o \
ringworld2/ringworld2_dialogs.o \
ringworld2/ringworld2_logic.o \
+ ringworld2/ringworld2_outpost.o \
ringworld2/ringworld2_scenes0.o \
ringworld2/ringworld2_scenes1.o \
ringworld2/ringworld2_scenes2.o \
ringworld2/ringworld2_scenes3.o \
ringworld2/ringworld2_speakers.o \
+ ringworld2/ringworld2_vampire.o \
saveload.o \
scenes.o \
sound.o \
diff --git a/engines/tsage/ringworld/ringworld_dialogs.cpp b/engines/tsage/ringworld/ringworld_dialogs.cpp
index 226a943f08..1dd3bc158b 100644
--- a/engines/tsage/ringworld/ringworld_dialogs.cpp
+++ b/engines/tsage/ringworld/ringworld_dialogs.cpp
@@ -20,8 +20,6 @@
*
*/
-#include "common/translation.h"
-
#include "gui/dialog.h"
#include "gui/widget.h"
diff --git a/engines/tsage/ringworld2/ringworld2_airduct.cpp b/engines/tsage/ringworld2/ringworld2_airduct.cpp
new file mode 100644
index 0000000000..136e8d5d1b
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_airduct.cpp
@@ -0,0 +1,909 @@
+/* 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 "tsage/ringworld2/ringworld2_airduct.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+/*--------------------------------------------------------------------------
+ * Scene 1200 - Air Ducts Maze
+ *
+ *--------------------------------------------------------------------------*/
+
+Scene1200::Scene1200() {
+ _nextCrawlDirection = 0;
+ _field414 = 0;
+ _field416 = 0;
+ _field418 = 0;
+ _field41A = 0;
+ _fixupMaze = false;
+}
+
+void Scene1200::synchronize(Serializer &s) {
+ SceneExt::synchronize(s);
+
+ s.syncAsSint16LE(_nextCrawlDirection);
+ s.syncAsSint16LE(_field414);
+ s.syncAsSint16LE(_field416);
+ s.syncAsSint16LE(_field418);
+ s.syncAsSint16LE(_field41A);
+ s.syncAsSint16LE(_fixupMaze);
+}
+
+Scene1200::LaserPanel::LaserPanel() {
+}
+
+void Scene1200::LaserPanel::Jumper::init(int state) {
+ _state = state;
+
+ SceneActor::postInit();
+ setup(1003, 1, 1);
+ fixPriority(255);
+
+ switch (_state) {
+ case 1:
+ switch (R2_GLOBALS._ductMazePanel1State) {
+ case 1:
+ setFrame2(2);
+ setPosition(Common::Point(129, 101));
+ break;
+ case 2:
+ setFrame2(3);
+ setPosition(Common::Point(135, 95));
+ break;
+ default:
+ break;
+ }
+ break;
+ case 2:
+ switch (R2_GLOBALS._ductMazePanel2State) {
+ case 1:
+ setFrame2(2);
+ setPosition(Common::Point(152, 101));
+ break;
+ case 2:
+ setFrame2(3);
+ setPosition(Common::Point(158, 122));
+ break;
+ case 3:
+ setFrame2(3);
+ setPosition(Common::Point(135, 122));
+ break;
+ default:
+ break;
+ }
+ break;
+ case 3:
+ switch (R2_GLOBALS._ductMazePanel3State) {
+ case 1:
+ setFrame2(3);
+ setPosition(Common::Point(158, 95));
+ break;
+ case 2:
+ setFrame2(2);
+ setPosition(Common::Point(175, 101));
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ setDetails(1200, 12, -1, -1, 2, (SceneItem *) NULL);
+}
+
+bool Scene1200::LaserPanel::Jumper::startAction(CursorType action, Event &event) {
+ if (action != CURSOR_USE)
+ return SceneActor::startAction(action, event);
+
+ R2_GLOBALS._sound2.play(260);
+ switch (_state) {
+ case 1:
+ if (R2_GLOBALS._ductMazePanel1State == 1) {
+ R2_GLOBALS._ductMazePanel1State = 2;
+ setFrame2(3);
+ setPosition(Common::Point(135, 95));
+ } else {
+ R2_GLOBALS._ductMazePanel1State = 1;
+ setFrame2(2);
+ setPosition(Common::Point(129, 101));
+ }
+ break;
+ case 2:
+ ++R2_GLOBALS._ductMazePanel2State;
+ if (R2_GLOBALS._ductMazePanel2State == 4)
+ R2_GLOBALS._ductMazePanel2State = 1;
+
+ switch (R2_GLOBALS._ductMazePanel2State) {
+ case 1:
+ setFrame2(2);
+ setPosition(Common::Point(152, 101));
+ break;
+ case 2:
+ setFrame2(3);
+ setPosition(Common::Point(158, 122));
+ break;
+ case 3:
+ setFrame2(3);
+ setPosition(Common::Point(135, 122));
+ break;
+ default:
+ break;
+ }
+ break;
+ case 3:
+ if (R2_GLOBALS._ductMazePanel3State == 1) {
+ R2_GLOBALS._ductMazePanel3State = 2;
+ setFrame2(2);
+ setPosition(Common::Point(175, 101));
+ } else {
+ R2_GLOBALS._ductMazePanel3State = 1;
+ setFrame2(3);
+ setPosition(Common::Point(158, 95));
+ }
+ break;
+ default:
+ break;
+ }
+
+ Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
+ scene->_field418 = 0;
+
+ if ((R2_GLOBALS._ductMazePanel1State == 1) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
+ scene->_field418 = 1;
+ else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
+ scene->_field418 = 2;
+ else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 2))
+ scene->_field418 = 3;
+ else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 3) && (R2_GLOBALS._ductMazePanel3State == 1))
+ scene->_field418 = 4;
+
+ return true;
+}
+
+void Scene1200::LaserPanel::postInit(SceneObjectList *OwnerList) {
+ Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
+
+ scene->_field41A = 1;
+ R2_GLOBALS._events.setCursor(CURSOR_USE);
+ setup2(1003, 1, 1, 100, 40);
+ setup3(1200, 11, -1, -1);
+ R2_GLOBALS._sound2.play(259);
+ _jumper1.init(1);
+ _jumper2.init(2);
+ _jumper3.init(3);
+
+ R2_GLOBALS._player._canWalk = false;
+}
+
+void Scene1200::LaserPanel::remove() {
+ Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
+
+ scene->_field41A = 0;
+ scene->_sceneAreas.remove(&_jumper1);
+ scene->_sceneAreas.remove(&_jumper2);
+ scene->_sceneAreas.remove(&_jumper3);
+ _jumper1.remove();
+ _jumper2.remove();
+ _jumper3.remove();
+
+ ModalWindow::remove();
+ R2_GLOBALS._player._canWalk = true;
+}
+
+void Scene1200::postInit(SceneObjectList *OwnerList) {
+ loadScene(1200);
+ SceneExt::postInit();
+
+ if (R2_GLOBALS._sceneManager._previousScene < 3200)
+ R2_GLOBALS._sound1.play(257);
+
+ _nextCrawlDirection = CRAWL_EAST;
+ _field414 = 0;
+ _field416 = 0;
+ _field418 = 0;
+ _field41A = 0;
+
+ if ((R2_GLOBALS._ductMazePanel1State == 1) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
+ _field418 = 1;
+ else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
+ _field418 = 2;
+ else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 2))
+ _field418 = 3;
+ else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 3) && (R2_GLOBALS._ductMazePanel3State == 1))
+ _field418 = 4;
+
+ R2_GLOBALS._player.postInit();
+ R2_GLOBALS._player.disableControl();
+ R2_GLOBALS._player.setup(3156, 1, 6);
+ R2_GLOBALS._player.setPosition(Common::Point(160, 70));
+ R2_GLOBALS._player._numFrames = 10;
+ R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 1200;
+
+ _actor1.postInit();
+ _actor1.hide();
+
+ _mazeUI.setDisplayBounds(Rect(110, 20, 210, 120));
+
+ _mazeUI.postInit();
+ _mazeUI.load(1);
+ _mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
+
+ R2_GLOBALS._player.enableControl();
+ _item1.setDetails(Rect(0, 0, 320, 200), 1200, 0, 1, 2, 1, NULL);
+}
+
+void Scene1200::signal() {
+ switch (_sceneMode++) {
+ case 1:
+ // No break on purpose
+ case 1200:
+ // No break on purpose
+ case 1201:
+ // No break on purpose
+ case 1202:
+ // No break on purpose
+ case 1203:
+ R2_GLOBALS._player.enableControl();
+ // CHECKME: The original is calling _eventManager.waitEvent();
+ _sceneMode = 2;
+ break;
+ case 10:
+ _field416 = 1;
+ _field414 = 6;
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.setStrip(1);
+ R2_GLOBALS._player.setFrame(5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ case 11:
+ // No break on purpose
+ case 21:
+ // No break on purpose
+ case 31:
+ // No break on purpose
+ case 41:
+ _field416 = 0;
+ break;
+ case 12:
+ _field414 = 14;
+ R2_GLOBALS._player._numFrames = 10;
+ R2_GLOBALS._player.setup(3155, 1, 4);
+ R2_GLOBALS._player.setPosition(Common::Point(160, 70));
+ R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
+ break;
+ case 13:
+ // No break on purpose
+ case 16:
+ // No break on purpose
+ case 23:
+ // No break on purpose
+ case 26:
+ // No break on purpose
+ case 33:
+ // No break on purpose
+ case 36:
+ // No break on purpose
+ case 43:
+ // No break on purpose
+ case 46:
+ R2_GLOBALS._player.setFrame(4);
+ _sceneMode = 1;
+ setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+ break;
+ case 15:
+ // No break on purpose
+ case 25:
+ // No break on purpose
+ case 35:
+ // No break on purpose
+ case 45:
+ _field414 = 20;
+ R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
+ break;
+ case 20:
+ _field416 = 1;
+ _field414 = 6;
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.setStrip(2);
+ R2_GLOBALS._player.setFrame(5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ case 22:
+ _field414 = 14;
+ R2_GLOBALS._player._numFrames = 10;
+ R2_GLOBALS._player.setup(3155, 2, 4);
+ R2_GLOBALS._player.setPosition(Common::Point(160, 70));
+ R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
+ break;
+ case 30:
+ _field416 = 1;
+ _field414 = 6;
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.setStrip(3);
+ R2_GLOBALS._player.setFrame(5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ case 32:
+ _field414 = 14;
+ R2_GLOBALS._player._numFrames = 10;
+ R2_GLOBALS._player.setup(3155, 3, 4);
+ R2_GLOBALS._player.setPosition(Common::Point(160, 70));
+ R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
+ break;
+ case 40:
+ _field416 = 1;
+ _field414 = 6;
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.setStrip(4);
+ R2_GLOBALS._player.setFrame(5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ case 42:
+ _field414 = 14;
+ R2_GLOBALS._player._numFrames = 10;
+ R2_GLOBALS._player.setup(3155, 4, 4);
+ R2_GLOBALS._player.setPosition(Common::Point(160, 70));
+ R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
+ break;
+ case 50:
+ // No break on purpose
+ case 55:
+ // No break on purpose
+ case 60:
+ R2_GLOBALS._player.setup(3156, 5, 1);
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 51:
+ // No break on purpose
+ case 56:
+ // No break on purpose
+ case 117:
+ R2_GLOBALS._player.setup(3157, 1, 1);
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 52:
+ // No break on purpose
+ case 82:
+ // No break on purpose
+ case 118:
+ R2_GLOBALS._player.setup(3156, 3, 6);
+ _sceneMode = 1;
+ setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+ break;
+ case 57:
+ // No break on purpose
+ case 91:
+ // No break on purpose
+ case 96:
+ R2_GLOBALS._player.setup(3157, 2, 1);
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 58:
+ // No break on purpose
+ case 92:
+ // No break on purpose
+ case 122:
+ R2_GLOBALS._player.setup(3156, 2, 6);
+ _sceneMode = 1;
+ setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+ break;
+ case 61:
+ R2_GLOBALS._player.setup(3157, 4, 5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ case 62:
+ // No break on purpose
+ case 72:
+ // No break on purpose
+ case 98:
+ R2_GLOBALS._player.setup(3156, 4, 6);
+ _sceneMode = 1;
+ setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+ break;
+ case 70:
+ // No break on purpose
+ case 75:
+ // No break on purpose
+ case 80:
+ R2_GLOBALS._player.setup(3156, 6, 1);
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 71:
+ // No break on purpose
+ case 76:
+ // No break on purpose
+ case 97:
+ R2_GLOBALS._player.setup(3157, 3, 1);
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 77:
+ // No break on purpose
+ case 111:
+ // No break on purpose
+ case 116:
+ R2_GLOBALS._player.setup(3157, 4, 1);
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 78:
+ // No break on purpose
+ case 102:
+ // No break on purpose
+ case 112:
+ R2_GLOBALS._player.setup(3156, 1, 6);
+ _sceneMode = 1;
+ setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
+ break;
+ case 81:
+ R2_GLOBALS._player.setup(3157, 2, 5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ case 90:
+ // No break on purpose
+ case 95:
+ // No break on purpose
+ case 100:
+ R2_GLOBALS._player.setup(3156, 7, 1);
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 101:
+ R2_GLOBALS._player.setup(3157, 1, 5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ case 110:
+ // No break on purpose
+ case 115:
+ // No break on purpose
+ case 120:
+ R2_GLOBALS._player.setup(3156, 8, 1);
+ R2_GLOBALS._player._numFrames = 5;
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ break;
+ case 121:
+ R2_GLOBALS._player.setup(3157, 3, 5);
+ R2_GLOBALS._player.animate(ANIM_MODE_6, this);
+ break;
+ default:
+ // CHECKME: The original is walling _eventManager.waitEvent();
+ _sceneMode = 2;
+ break;
+ }
+}
+
+void Scene1200::process(Event &event) {
+ if (_field414 != 0)
+ return;
+
+ Scene::process(event);
+
+ if (!R2_GLOBALS._player._canWalk)
+ return;
+
+ if (event.eventType == EVENT_BUTTON_DOWN) {
+ Common::Point cellPos = R2_GLOBALS._ventCellPos;
+ _mazeUI.pixelToCellXY(cellPos);
+
+ int cellId = _mazeUI.getCellFromPixelXY(event.mousePos);
+ switch (R2_GLOBALS._events.getCursor()) {
+ case CURSOR_WALK:
+ event.handled = true;
+ if ((event.mousePos.x > 179) && (event.mousePos.x < 210) && (event.mousePos.y > 50) && (event.mousePos.y < 89))
+ startCrawling(CRAWL_EAST);
+
+ if ((event.mousePos.x > 109) && (event.mousePos.x < 140) && (event.mousePos.y > 50) && (event.mousePos.y < 89))
+ startCrawling(CRAWL_WEST);
+
+ if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 89) && (event.mousePos.y < 120))
+ startCrawling(CRAWL_SOUTH);
+
+ if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 19) && (event.mousePos.y < 50))
+ startCrawling(CRAWL_NORTH);
+ break;
+ case CURSOR_USE:
+ if (cellId > 36) {
+ if ( ((cellPos.x == 3) && (cellPos.y == 33))
+ || ((cellPos.x == 7) && (cellPos.y == 33))
+ || ((cellPos.x == 33) && (cellPos.y == 41))
+ || ((cellPos.x == 5) && (cellPos.y == 5))
+ || ((cellPos.x == 13) && (cellPos.y == 21))
+ || ((cellPos.x == 17) && (cellPos.y == 21))
+ || ((cellPos.x == 17) && (cellPos.y == 5))
+ || ((cellPos.x == 17) && (cellPos.y == 9))
+ || ((cellPos.x == 29) && (cellPos.y == 17))
+ || ((cellPos.x == 33) && (cellPos.y == 17))
+ || ((cellPos.x == 35) && (cellPos.y == 17))
+ || ((cellPos.x == 41) && (cellPos.y == 21)) ) {
+ _laserPanel.postInit();
+ event.handled = true;
+ }
+ }
+
+ if ((cellId == 1) || (cellId == 4) || (cellId == 11) || (cellId == 14)) {
+ if ( ((cellPos.x == 3) && (cellPos.y == 9))
+ || ((cellPos.x == 11) && (cellPos.y == 27))
+ || ((cellPos.x == 17) && (cellPos.y == 7))
+ || ((cellPos.x == 17) && (cellPos.y == 27))
+ || ((cellPos.x == 17) && (cellPos.y == 33))
+ || (cellPos.x == 33) ) {
+ switch (cellPos.x) {
+ case 3:
+ R2_GLOBALS._sceneManager.changeScene(3150);
+ break;
+ case 33:
+ if (R2_GLOBALS._scientistConvIndex >= 4)
+ R2_GLOBALS._sceneManager.changeScene(3250);
+ else
+ SceneItem::display(1200, 6, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, LIST_END);
+ break;
+ default:
+ SceneItem::display(1200, 5, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, LIST_END);
+ break;
+ }
+ event.handled = true;
+ }
+ }
+ break;
+ case CURSOR_LOOK:
+ if ((cellId == 1) || (cellId == 4) || (cellId == 11) || (cellId == 14)) {
+ event.handled = true;
+ switch (cellPos.x) {
+ case 3:
+ // It was your cell.
+ SceneItem::display(1200, 8, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ break;
+ case 9:
+ R2_GLOBALS._sceneManager.changeScene(3240);
+ break;
+ case 11:
+ if (cellPos.y == 27)
+ R2_GLOBALS._sceneManager.changeScene(3210);
+ else
+ // A vent grill
+ SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ break;
+ case 17:
+ switch (cellPos.y) {
+ case 5:
+ R2_GLOBALS._sceneManager.changeScene(3230);
+ break;
+ case 21:
+ R2_GLOBALS._sceneManager.changeScene(3220);
+ break;
+ case 33:
+ R2_GLOBALS._sceneManager.changeScene(3200);
+ break;
+ default:
+ // A vent grill
+ SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ break;
+ }
+ break;
+ case 33:
+ R2_GLOBALS._sceneManager.changeScene(3245);
+ break;
+ default:
+ SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ break;
+ }
+ }
+ if (cellId > 36) {
+ // "An anti-pest laser"
+ event.handled = true;
+ SceneItem::display(1200, 9, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ }
+ break;
+ case CURSOR_TALK:
+ event.handled = true;
+ break;
+ default:
+ return;
+ }
+ } else if (event.eventType == EVENT_KEYPRESS) {
+ if (_field414) {
+ event.handled = false;
+ return;
+ }
+
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_KP8:
+ case Common::KEYCODE_UP:
+ startCrawling(CRAWL_NORTH);
+ break;
+ case Common::KEYCODE_KP4:
+ case Common::KEYCODE_LEFT:
+ startCrawling(CRAWL_WEST);
+ break;
+ case Common::KEYCODE_KP6:
+ case Common::KEYCODE_RIGHT:
+ startCrawling(CRAWL_EAST);
+ break;
+ case Common::KEYCODE_KP2:
+ case Common::KEYCODE_DOWN:
+ startCrawling(CRAWL_SOUTH);
+ break;
+ default:
+ event.handled = false;
+ return;
+ break;
+ }
+ } else
+ return;
+}
+
+void Scene1200::dispatch() {
+ Rect tmpRect;
+ Scene::dispatch();
+
+ if (_fixupMaze) {
+ _mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
+ //_mazeUI.draw();
+ _fixupMaze = false;
+ }
+
+ if (_field414 != 0) {
+ tmpRect.set(110, 20, 210, 120);
+ _field414--;
+
+ switch (_nextCrawlDirection) {
+ case CRAWL_EAST:
+ R2_GLOBALS._ventCellPos.x += 2;
+ break;
+ case CRAWL_WEST:
+ R2_GLOBALS._ventCellPos.x -= 2;
+ break;
+ case CRAWL_SOUTH:
+ R2_GLOBALS._ventCellPos.y += 2;
+ break;
+ case CRAWL_NORTH:
+ R2_GLOBALS._ventCellPos.y -= 2;
+ break;
+ default:
+ break;
+ }
+
+ _mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
+ //_mazeUI.draw();
+
+ if (_field416 != 0) {
+ switch(_nextCrawlDirection) {
+ case CRAWL_EAST:
+ R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x - 2, R2_GLOBALS._player._position.y));
+ break;
+ case CRAWL_WEST:
+ R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x + 2, R2_GLOBALS._player._position.y));
+ break;
+ case CRAWL_SOUTH:
+ R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y - 2));
+ break;
+ case CRAWL_NORTH:
+ R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y + 2));
+ break;
+ default:
+ break;
+ }
+ }
+ if (_field414 == 0) {
+ if (_field416 == 0)
+ R2_GLOBALS._player.animate(ANIM_MODE_NONE, NULL);
+ signal();
+ }
+ }
+}
+
+void Scene1200::saveCharacter(int characterIndex) {
+ R2_GLOBALS._sound1.fadeOut2(NULL);
+ SceneExt::saveCharacter(characterIndex);
+}
+
+void Scene1200::startCrawling(CrawlDirection dir) {
+ Common::Point cellPos = R2_GLOBALS._ventCellPos;
+ _mazeUI.pixelToCellXY(cellPos);
+
+ switch (dir) {
+ case CRAWL_EAST:
+ if ( ((_mazeUI.getCellFromPixelXY(Common::Point(200, 50)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(200, 88)) > 36))
+ && ( ((cellPos.x == 3) && (cellPos.y == 33) && (_field418 != 4))
+ || ((cellPos.x == 13) && (cellPos.y == 21) && (_field418 != 2))
+ || ((cellPos.x == 29) && (cellPos.y == 17) && (_field418 != 1))
+ || ((cellPos.x == 33) && (cellPos.y == 41)) )
+ ) {
+ R2_GLOBALS._player.disableControl();
+ _sceneMode = 1200;
+ setAction(&_sequenceManager, this, 1200, &_actor1, NULL);
+ } else if (_mazeUI.getCellFromPixelXY(Common::Point(200, 69)) == 36) {
+ switch (_nextCrawlDirection) {
+ case CRAWL_EAST:
+ if (R2_GLOBALS._player._visage == 3155)
+ _sceneMode = 15;
+ else
+ _sceneMode = 10;
+ break;
+ case CRAWL_WEST:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 76;
+ else
+ _sceneMode = 75;
+ break;
+ case CRAWL_SOUTH:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 101;
+ else
+ _sceneMode = 100;
+ break;
+ case CRAWL_NORTH:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 111;
+ else
+ _sceneMode = 110;
+ break;
+ default:
+ break;
+ }
+ R2_GLOBALS._player.disableControl();
+ _nextCrawlDirection = 1;
+ signal();
+ }
+ break;
+ case CRAWL_WEST:
+ if ( ((_mazeUI.getCellFromPixelXY(Common::Point(120, 50)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(120, 88)) > 36))
+ && ( ((cellPos.x == 7) && (cellPos.y == 33) && (_field418 != 4))
+ || ((cellPos.x == 17) && (cellPos.y == 21) && (_field418 != 2))
+ || ((cellPos.x == 33) && (cellPos.y == 17) && (_field418 != 1))
+ || ((cellPos.x == 5) && (cellPos.y == 5)) )
+ ) {
+ R2_GLOBALS._player.disableControl();
+ _sceneMode = 1201;
+ setAction(&_sequenceManager, this, 1201, &_actor1, NULL);
+ } else if (_mazeUI.getCellFromPixelXY(Common::Point(120, 69)) == 36) {
+ switch (_nextCrawlDirection) {
+ case CRAWL_EAST:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 56;
+ else
+ _sceneMode = 55;
+ break;
+ case CRAWL_WEST:
+ if (R2_GLOBALS._player._visage == 3155)
+ _sceneMode = 25;
+ else
+ _sceneMode = 20;
+ break;
+ case CRAWL_SOUTH:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 91;
+ else
+ _sceneMode = 90;
+ break;
+ case CRAWL_NORTH:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 121;
+ else
+ _sceneMode = 120;
+ break;
+ default:
+ break;
+ }
+ R2_GLOBALS._player.disableControl();
+ _nextCrawlDirection = 2;
+ signal();
+ }
+ break;
+ case CRAWL_SOUTH:
+ if ( ((_mazeUI.getCellFromPixelXY(Common::Point(140, 110)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(178, 110)) > 36))
+ && ( ((cellPos.x == 17) && (cellPos.y == 5) && (_field418 != 3))
+ || ((cellPos.x == 41) && (cellPos.y == 21)) )
+ ) {
+ R2_GLOBALS._player.disableControl();
+ _sceneMode = 1203;
+ setAction(&_sequenceManager, this, 1203, &_actor1, NULL);
+ } else if (_mazeUI.getCellFromPixelXY(Common::Point(160, 110)) == 36) {
+ switch (_nextCrawlDirection) {
+ case CRAWL_EAST:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 51;
+ else
+ _sceneMode = 50;
+ break;
+ case CRAWL_WEST:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 81;
+ else
+ _sceneMode = 80;
+ break;
+ case CRAWL_SOUTH:
+ if (R2_GLOBALS._player._visage == 3155)
+ _sceneMode = 35;
+ else
+ _sceneMode = 30;
+ break;
+ case CRAWL_NORTH:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 116;
+ else
+ _sceneMode = 115;
+ break;
+ default:
+ break;
+ }
+ R2_GLOBALS._player.disableControl();
+ _nextCrawlDirection = 3;
+ signal();
+ }
+ break;
+ case CRAWL_NORTH:
+ if ( ((_mazeUI.getCellFromPixelXY(Common::Point(140, 30)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(178, 30)) > 36))
+ && ( ((cellPos.x == 17) && (cellPos.y == 9) && (_field418 != 3))
+ || ((cellPos.x == 35) && (cellPos.y == 17)) )
+ ) {
+ R2_GLOBALS._player.disableControl();
+ _sceneMode = 1202;
+ setAction(&_sequenceManager, this, 1202, &_actor1, NULL);
+ } else if (_mazeUI.getCellFromPixelXY(Common::Point(160, 30)) == 36) {
+ switch (_nextCrawlDirection) {
+ case CRAWL_EAST:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 61;
+ else
+ _sceneMode = 60;
+ break;
+ case CRAWL_WEST:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 71;
+ else
+ _sceneMode = 70;
+ break;
+ case CRAWL_SOUTH:
+ if (R2_GLOBALS._player._visage == 3156)
+ _sceneMode = 96;
+ else
+ _sceneMode = 95;
+ break;
+ case CRAWL_NORTH:
+ if (R2_GLOBALS._player._visage == 3155)
+ _sceneMode = 45;
+ else
+ _sceneMode = 40;
+ break;
+ default:
+ _sceneMode = 1;
+ R2_GLOBALS._player.setup(3156, 4, 6);
+ break;
+ }
+ R2_GLOBALS._player.disableControl();
+ _nextCrawlDirection = 4;
+ signal();
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_airduct.h b/engines/tsage/ringworld2/ringworld2_airduct.h
new file mode 100644
index 0000000000..89dfe778d0
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_airduct.h
@@ -0,0 +1,89 @@
+/* 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.
+ *
+ */
+
+#ifndef TSAGE_RINGWORLD2_AIRDUCT_H
+#define TSAGE_RINGWORLD2_AIRDUCT_H
+
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+#include "tsage/sound.h"
+#include "tsage/ringworld2/ringworld2_logic.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+using namespace TsAGE;
+
+class Scene1200 : public SceneExt {
+ enum CrawlDirection { CRAWL_EAST = 1, CRAWL_WEST = 2, CRAWL_SOUTH = 3, CRAWL_NORTH = 4 };
+
+ class LaserPanel: public ModalWindow {
+ public:
+ class Jumper : public SceneActorExt {
+ public:
+ void init(int state);
+ virtual bool startAction(CursorType action, Event &event);
+ };
+
+ Jumper _jumper1;
+ Jumper _jumper2;
+ Jumper _jumper3;
+
+ LaserPanel();
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void remove();
+ };
+
+public:
+ NamedHotspot _item1;
+ SceneActor _actor1;
+ LaserPanel _laserPanel;
+ MazeUI _mazeUI;
+ SequenceManager _sequenceManager;
+
+ int _nextCrawlDirection;
+ int _field414;
+ int _field416;
+ int _field418;
+ int _field41A;
+ bool _fixupMaze;
+
+ Scene1200();
+ void synchronize(Serializer &s);
+
+ void startCrawling(CrawlDirection dir);
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void signal();
+ virtual void process(Event &event);
+ virtual void dispatch();
+ virtual void saveCharacter(int characterIndex);
+};
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
+
+#endif
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 99188c1ab6..d24541932f 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -32,6 +32,9 @@
#include "tsage/ringworld2/ringworld2_scenes1.h"
#include "tsage/ringworld2/ringworld2_scenes2.h"
#include "tsage/ringworld2/ringworld2_scenes3.h"
+#include "tsage/ringworld2/ringworld2_airduct.h"
+#include "tsage/ringworld2/ringworld2_outpost.h"
+#include "tsage/ringworld2/ringworld2_vampire.h"
namespace TsAGE {
@@ -355,6 +358,11 @@ SceneExt::SceneExt(): Scene() {
// to make inter-scene debugging easier, I'm explicitly resetting the _animationCtr
// on scene start, since scene objects aren't drawn while it's non-zero
R2_GLOBALS._animationCtr = 0;
+
+ // WORKAROUND: We had a case where at some point the number of modal dialogs
+ // open became incorrect. So reset it on scene changes to fix the problem if
+ // it ever happens
+ R2_GLOBALS._insetUp = 0;
}
void SceneExt::synchronize(Serializer &s) {
diff --git a/engines/tsage/ringworld2/ringworld2_outpost.cpp b/engines/tsage/ringworld2/ringworld2_outpost.cpp
new file mode 100644
index 0000000000..05cfa6259b
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_outpost.cpp
@@ -0,0 +1,4700 @@
+/* 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 "graphics/cursorman.h"
+#include "tsage/tsage.h"
+#include "tsage/staticres.h"
+#include "tsage/ringworld2/ringworld2_outpost.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+/*--------------------------------------------------------------------------
+ * Scene 1337 - Card game
+ *
+ *--------------------------------------------------------------------------*/
+
+Scene1337::Card::Card() {
+ _cardId = 0;
+ _stationPos = Common::Point(0, 0);
+}
+
+void Scene1337::Card::synchronize(Serializer &s) {
+ _card.synchronize(s);
+
+ s.syncAsSint16LE(_cardId);
+ s.syncAsSint16LE(_stationPos.x);
+ s.syncAsSint16LE(_stationPos.y);
+}
+
+bool Scene1337::Card::isIn(Common::Point pt) {
+ if ((_stationPos.x > pt.x) || (_stationPos.x + 24 < pt.x))
+ return false;
+
+ if ((_stationPos.y > pt.y) || (_stationPos.y + 24 < pt.y))
+ return false;
+
+ return true;
+}
+
+Scene1337::GameBoardSide::GameBoardSide() {
+ _card1Pos = Common::Point(0, 0);
+ _card2Pos = Common::Point(0, 0);
+ _card3Pos = Common::Point(0, 0);
+ _card4Pos = Common::Point(0, 0);
+ _frameNum = 0;
+}
+
+void Scene1337::GameBoardSide::synchronize(Serializer &s) {
+ SceneHotspot::synchronize(s);
+
+ for (int i = 0; i < 4; i++)
+ _handCard[i].synchronize(s);
+
+ for (int i = 0; i < 8; i++)
+ _outpostStation[i].synchronize(s);
+
+ _delayCard.synchronize(s);
+ _emptyStationPos.synchronize(s);
+
+ s.syncAsSint16LE(_card1Pos.x);
+ s.syncAsSint16LE(_card1Pos.y);
+ s.syncAsSint16LE(_card2Pos.x);
+ s.syncAsSint16LE(_card2Pos.y);
+ s.syncAsSint16LE(_card3Pos.x);
+ s.syncAsSint16LE(_card3Pos.y);
+ s.syncAsSint16LE(_card4Pos.x);
+ s.syncAsSint16LE(_card4Pos.y);
+ s.syncAsSint16LE(_frameNum);
+}
+
+Scene1337::Scene1337() {
+ _autoplay = false;
+ _cardsAvailableNumb = 0;
+ _currentDiscardIndex = 0;
+
+ for (int i = 0; i < 100; i++)
+ _availableCardsPile[i] = 0;
+
+ _shuffleEndedFl = false;
+ _currentPlayerNumb = 0;
+ _actionPlayerIdx = 0;
+ _actionVictimIdx = 0;
+ _showPlayerTurn = false;
+ _displayHelpFl = false;
+ _winnerId = -1;
+ _instructionsDisplayedFl = false;
+ _instructionsWaitCount = 0;
+
+ _delayedFunction = nullptr;
+ _actionCard1 = nullptr;
+ _actionCard2 = nullptr;
+ _actionCard3 = nullptr;
+
+ _cursorCurRes = 0;
+ _cursorCurStrip = 0;
+ _cursorCurFrame = 0;
+}
+
+void Scene1337::synchronize(Serializer &s) {
+ _actionCard1->synchronize(s);
+ _actionCard2->synchronize(s);
+ _actionCard3->synchronize(s);
+ _animatedCard.synchronize(s);
+ _shuffleAnimation.synchronize(s);
+ _discardedPlatformCard.synchronize(s);
+ _selectedCard.synchronize(s);
+ _discardPile.synchronize(s);
+ _stockCard.synchronize(s);
+ _aSound1.synchronize(s);
+ _aSound2.synchronize(s);
+ _helpIcon.synchronize(s);
+ _stockPile.synchronize(s);
+ _actionItem.synchronize(s);
+ _currentPlayerArrow.synchronize(s);
+
+ for (int i = 0; i < 4; i++)
+ _gameBoardSide[i].synchronize(s);
+
+ for (int i = 0; i < 8; i++) {
+ _upperDisplayCard[i].synchronize(s);
+ _lowerDisplayCard[i].synchronize(s);
+ }
+
+ // TODO s.syncPointer(_delayedFunction);
+ s.syncAsByte(_autoplay);
+ s.syncAsByte(_shuffleEndedFl);
+ s.syncAsByte(_showPlayerTurn);
+ s.syncAsByte(_displayHelpFl);
+ s.syncAsByte(_instructionsDisplayedFl);
+ s.syncAsSint16LE(_currentDiscardIndex);
+ s.syncAsSint16LE(_cardsAvailableNumb);
+ s.syncAsSint16LE(_currentPlayerNumb);
+ s.syncAsSint16LE(_actionPlayerIdx);
+ s.syncAsSint16LE(_actionVictimIdx);
+ s.syncAsSint16LE(_winnerId);
+ s.syncAsSint16LE(_instructionsWaitCount);
+ s.syncAsSint16LE(_cursorCurRes);
+ s.syncAsSint16LE(_cursorCurStrip);
+ s.syncAsSint16LE(_cursorCurFrame);
+
+ for (int i = 0; i < 100; i++)
+ s.syncAsSint16LE(_availableCardsPile[i]);
+
+}
+
+void Scene1337::Action1337::waitFrames(int32 frameCount) {
+ uint32 firstFrameNumber = g_globals->_events.getFrameNumber();
+ uint32 curFrame = firstFrameNumber;
+ uint32 destFrame = firstFrameNumber + frameCount;
+
+ while ((curFrame < destFrame) && !g_vm->shouldQuit()) {
+ TsAGE::Event event;
+ g_globals->_events.getEvent(event);
+ curFrame = g_globals->_events.getFrameNumber();
+ }
+
+ // CHECKME: The original is calling _eventManager.waitEvent();
+}
+
+/**
+ * Display instructions
+ */
+void Scene1337::Action1::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 1: {
+ scene->actionDisplay(1331, 6, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ R2_GLOBALS._sceneObjects->draw();
+ scene->actionDisplay(1331, 7, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ scene->actionDisplay(1331, 8, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ scene->_gameBoardSide[1]._outpostStation[0]._cardId = 2;
+ scene->_gameBoardSide[1]._outpostStation[0]._card.postInit();
+ scene->_gameBoardSide[1]._outpostStation[0]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[1]._outpostStation[0]._stationPos, 0);
+ scene->_gameBoardSide[1]._outpostStation[0]._card.setStrip(2);
+ scene->_gameBoardSide[1]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[1]._outpostStation[0]._cardId);
+ scene->_gameBoardSide[1]._outpostStation[0]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[1]._outpostStation[0]);
+
+ scene->_gameBoardSide[1]._outpostStation[1]._cardId = 3;
+ scene->_gameBoardSide[1]._outpostStation[1]._card.postInit();
+ scene->_gameBoardSide[1]._outpostStation[1]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[1]._outpostStation[1]._stationPos, 0);
+ scene->_gameBoardSide[1]._outpostStation[1]._card.setStrip(2);
+ scene->_gameBoardSide[1]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[1]._outpostStation[1]._cardId);
+ scene->_gameBoardSide[1]._outpostStation[1]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[1]._outpostStation[1]);
+
+ scene->_gameBoardSide[2]._outpostStation[0]._cardId = 4;
+ scene->_gameBoardSide[2]._outpostStation[0]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[0]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[0]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[0]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[0]._cardId);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[0]);
+
+ scene->_gameBoardSide[3]._outpostStation[0]._cardId = 5;
+ scene->_gameBoardSide[3]._outpostStation[0]._card.postInit();
+ scene->_gameBoardSide[3]._outpostStation[0]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[0]._stationPos, 0);
+ scene->_gameBoardSide[3]._outpostStation[0]._card.setStrip(2);
+ scene->_gameBoardSide[3]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[0]._cardId);
+ scene->_gameBoardSide[3]._outpostStation[0]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[0]);
+
+ scene->_gameBoardSide[3]._outpostStation[1]._cardId = 6;
+ scene->_gameBoardSide[3]._outpostStation[1]._card.postInit();
+ scene->_gameBoardSide[3]._outpostStation[1]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[1]._stationPos, 0);
+ scene->_gameBoardSide[3]._outpostStation[1]._card.setStrip(2);
+ scene->_gameBoardSide[3]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[1]._cardId);
+ scene->_gameBoardSide[3]._outpostStation[1]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[1]);
+
+ scene->_gameBoardSide[3]._outpostStation[2]._cardId = 7;
+ scene->_gameBoardSide[3]._outpostStation[2]._card.postInit();
+ scene->_gameBoardSide[3]._outpostStation[2]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._outpostStation[2]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[2]._stationPos, 0);
+ scene->_gameBoardSide[3]._outpostStation[2]._card.setStrip(2);
+ scene->_gameBoardSide[3]._outpostStation[2]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[2]._cardId);
+ scene->_gameBoardSide[3]._outpostStation[2]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[2]);
+
+ scene->_gameBoardSide[0]._outpostStation[0]._cardId = 8;
+ scene->_gameBoardSide[0]._outpostStation[0]._card.postInit();
+ scene->_gameBoardSide[0]._outpostStation[0]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[0]._outpostStation[0]._stationPos, 0);
+ scene->_gameBoardSide[0]._outpostStation[0]._card.setStrip(2);
+ scene->_gameBoardSide[0]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[0]._outpostStation[0]._cardId);
+ scene->_gameBoardSide[0]._outpostStation[0]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[0]._outpostStation[0]);
+
+ scene->_gameBoardSide[0]._outpostStation[1]._cardId = 9;
+ scene->_gameBoardSide[0]._outpostStation[1]._card.postInit();
+ scene->_gameBoardSide[0]._outpostStation[1]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[0]._outpostStation[1]._stationPos, 0);
+ scene->_gameBoardSide[0]._outpostStation[1]._card.setStrip(2);
+ scene->_gameBoardSide[0]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[0]._outpostStation[1]._cardId);
+ scene->_gameBoardSide[0]._outpostStation[1]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[0]._outpostStation[1]);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(60);
+ scene->actionDisplay(1331, 9, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ scene->_gameBoardSide[2]._outpostStation[1]._cardId = 2;
+ scene->_gameBoardSide[2]._outpostStation[1]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[1]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[1]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[1]._cardId);
+ scene->_gameBoardSide[2]._outpostStation[1]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]);
+
+ scene->_gameBoardSide[2]._outpostStation[2]._cardId = 3;
+ scene->_gameBoardSide[2]._outpostStation[2]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[2]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[2]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[2]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[2]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[2]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[2]._cardId);
+ scene->_gameBoardSide[2]._outpostStation[2]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[2]);
+
+ scene->_gameBoardSide[2]._outpostStation[3]._cardId = 5;
+ scene->_gameBoardSide[2]._outpostStation[3]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[3]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[3]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[3]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[3]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[3]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[3]._cardId);
+ scene->_gameBoardSide[2]._outpostStation[3]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[3]);
+
+ scene->_gameBoardSide[2]._outpostStation[4]._cardId = 6;
+ scene->_gameBoardSide[2]._outpostStation[4]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[4]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[4]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[4]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[4]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[4]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[4]._cardId);
+ scene->_gameBoardSide[2]._outpostStation[4]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[4]);
+
+ scene->_gameBoardSide[2]._outpostStation[5]._cardId = 7;
+ scene->_gameBoardSide[2]._outpostStation[5]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[5]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[5]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[5]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[5]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[5]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[5]._cardId);
+ scene->_gameBoardSide[2]._outpostStation[5]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[5]);
+
+ scene->_gameBoardSide[2]._outpostStation[6]._cardId = 8;
+ scene->_gameBoardSide[2]._outpostStation[6]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[6]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[6]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[6]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[6]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[6]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[6]._cardId);
+ scene->_gameBoardSide[2]._outpostStation[6]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[6]);
+
+ scene->_gameBoardSide[2]._outpostStation[7]._cardId = 9;
+ scene->_gameBoardSide[2]._outpostStation[7]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[7]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[7]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[7]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[7]._card.setStrip(2);
+ scene->_gameBoardSide[2]._outpostStation[7]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[7]._cardId);
+ scene->_gameBoardSide[2]._outpostStation[7]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[7]);
+
+ scene->_aSound1.play(62);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(120);
+ scene->_gameBoardSide[2]._outpostStation[0]._card.remove();
+ scene->_gameBoardSide[2]._outpostStation[1]._card.remove();
+ scene->_gameBoardSide[2]._outpostStation[2]._card.remove();
+ scene->_gameBoardSide[2]._outpostStation[3]._card.remove();
+ scene->_gameBoardSide[2]._outpostStation[4]._card.remove();
+ scene->_gameBoardSide[2]._outpostStation[5]._card.remove();
+ scene->_gameBoardSide[2]._outpostStation[6]._card.remove();
+ scene->_gameBoardSide[2]._outpostStation[7]._card.remove();
+
+ scene->_gameBoardSide[1]._outpostStation[0]._card.remove();
+ scene->_gameBoardSide[1]._outpostStation[1]._card.remove();
+
+ scene->_gameBoardSide[3]._outpostStation[0]._card.remove();
+ scene->_gameBoardSide[3]._outpostStation[1]._card.remove();
+ scene->_gameBoardSide[3]._outpostStation[2]._card.remove();
+
+ scene->_gameBoardSide[0]._outpostStation[0]._card.remove();
+ scene->_gameBoardSide[0]._outpostStation[1]._card.remove();
+
+ scene->_stockPile.setup(1332, 5, 1);
+ scene->_stockPile.setPosition(Common::Point(162, 95));
+ scene->_stockPile.setPriority(110);
+ scene->_stockPile._effect = EFFECT_SHADED;
+ scene->_stockPile.show();
+
+ scene->_gameBoardSide[1]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[1]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._handCard[0]._card.setPosition(scene->_gameBoardSide[1]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[1]._handCard[0]._card.setStrip(1);
+ scene->_gameBoardSide[1]._handCard[0]._card.setFrame(4);
+ scene->_gameBoardSide[1]._handCard[0]._card.fixPriority(170);
+
+ scene->_gameBoardSide[1]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[1]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._handCard[1]._card.setPosition(scene->_gameBoardSide[1]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[1]._handCard[1]._card.setStrip(1);
+ scene->_gameBoardSide[1]._handCard[1]._card.setFrame(4);
+ scene->_gameBoardSide[1]._handCard[1]._card.fixPriority(170);
+
+ scene->_gameBoardSide[1]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[1]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._handCard[2]._card.setPosition(scene->_gameBoardSide[1]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[1]._handCard[2]._card.setStrip(1);
+ scene->_gameBoardSide[1]._handCard[2]._card.setFrame(4);
+ scene->_gameBoardSide[1]._handCard[2]._card.fixPriority(170);
+
+ scene->_gameBoardSide[2]._handCard[0]._cardId = 30;
+ scene->_gameBoardSide[2]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[2]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._handCard[0]._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[2]._handCard[0]._card.setStrip(1);
+ scene->_gameBoardSide[2]._handCard[0]._card.setFrame(2);
+ scene->_gameBoardSide[2]._handCard[0]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[0]);
+
+ scene->_gameBoardSide[2]._handCard[1]._cardId = 16;
+ scene->_gameBoardSide[2]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[2]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._handCard[1]._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[2]._handCard[1]._card.setStrip(1);
+ scene->_gameBoardSide[2]._handCard[1]._card.setFrame(2);
+ scene->_gameBoardSide[2]._handCard[1]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[1]);
+
+ scene->_gameBoardSide[2]._handCard[2]._cardId = 1;
+ scene->_gameBoardSide[2]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[2]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._handCard[2]._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[2]._handCard[2]._card.setStrip(1);
+ scene->_gameBoardSide[2]._handCard[2]._card.setFrame(2);
+ scene->_gameBoardSide[2]._handCard[2]._card.fixPriority(170);
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[2]);
+
+ scene->_gameBoardSide[3]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[3]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._handCard[0]._card.setPosition(scene->_gameBoardSide[3]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[3]._handCard[0]._card.setStrip(1);
+ scene->_gameBoardSide[3]._handCard[0]._card.setFrame(3);
+ scene->_gameBoardSide[3]._handCard[0]._card.fixPriority(170);
+
+ scene->_gameBoardSide[3]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[3]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._handCard[1]._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[3]._handCard[1]._card.setStrip(1);
+ scene->_gameBoardSide[3]._handCard[1]._card.setFrame(3);
+ scene->_gameBoardSide[3]._handCard[1]._card.fixPriority(170);
+
+ scene->_gameBoardSide[3]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[3]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._handCard[2]._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[3]._handCard[2]._card.setStrip(1);
+ scene->_gameBoardSide[3]._handCard[2]._card.setFrame(3);
+ scene->_gameBoardSide[3]._handCard[2]._card.fixPriority(170);
+
+ scene->_gameBoardSide[0]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[0]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._handCard[0]._card.setPosition(scene->_gameBoardSide[0]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[0]._handCard[0]._card.setStrip(1);
+ scene->_gameBoardSide[0]._handCard[0]._card.setFrame(2);
+ scene->_gameBoardSide[0]._handCard[0]._card.fixPriority(170);
+
+ scene->_gameBoardSide[0]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[0]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._handCard[1]._card.setPosition(scene->_gameBoardSide[0]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[0]._handCard[1]._card.setStrip(1);
+ scene->_gameBoardSide[0]._handCard[1]._card.setFrame(2);
+ scene->_gameBoardSide[0]._handCard[1]._card.fixPriority(170);
+
+ scene->_gameBoardSide[0]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[0]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._handCard[2]._card.setPosition(scene->_gameBoardSide[0]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[0]._handCard[2]._card.setStrip(1);
+ scene->_gameBoardSide[0]._handCard[2]._card.setFrame(2);
+ scene->_gameBoardSide[0]._handCard[2]._card.fixPriority(170);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ scene->actionDisplay(1331, 10, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
+ scene->_animatedCard._card.show();
+ scene->_aSound2.play(61);
+
+ Common::Point pt(91, 174);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+ }
+ break;
+ case 2: {
+ scene->_gameBoardSide[2]._handCard[3]._cardId = 2;
+ scene->_gameBoardSide[2]._handCard[3]._card.postInit();
+ scene->_gameBoardSide[2]._handCard[3]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._handCard[3]._card.setPosition(scene->_gameBoardSide[2]._handCard[3]._stationPos, 0);
+ scene->_gameBoardSide[2]._handCard[3]._card.setStrip(1);
+ scene->_gameBoardSide[2]._handCard[3]._card.setFrame(2);
+ scene->_gameBoardSide[2]._handCard[3]._card.fixPriority(170);
+
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[3]);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(60);
+ scene->actionDisplay(1331, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ scene->actionDisplay(1331, 12, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ scene->_gameBoardSide[2]._outpostStation[1]._cardId = 1;
+ scene->_gameBoardSide[2]._outpostStation[1]._card.postInit();
+ scene->_gameBoardSide[2]._outpostStation[1]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0);
+ scene->_gameBoardSide[2]._outpostStation[1]._card.hide();
+
+ scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[2]._card._strip);
+ scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._card._frame);
+ scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL);
+
+ scene->_gameBoardSide[2]._handCard[2]._cardId = 0;
+ scene->_gameBoardSide[2]._handCard[2]._card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._outpostStation[1]._stationPos, this);
+ }
+ break;
+ case 3: {
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]);
+ scene->_aSound1.play(59);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(60);
+ scene->actionDisplay(1331, 13, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ scene->_gameBoardSide[2]._outpostStation[1]._cardId = scene->_gameBoardSide[2]._handCard[3]._cardId;
+
+ scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[3]._card._strip);
+ scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[3]._card._frame);
+
+ scene->_gameBoardSide[2]._handCard[3]._cardId = 0;
+ scene->_gameBoardSide[2]._handCard[3]._card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[3]._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._outpostStation[1]._stationPos, this);
+ }
+ break;
+ case 4: {
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]);
+ scene->_aSound1.play(59);
+
+ scene->_discardPile._cardId = 1;
+ scene->_discardPile._card.hide();
+
+ scene->_animatedCard._card.setStrip(5);
+ scene->_animatedCard._card.setFrame(1);
+ scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
+ }
+ break;
+ case 5: {
+ scene->_animatedCard._card.hide();
+
+ scene->_discardPile._card.postInit();
+ scene->_discardPile._card.setVisage(1332);
+ scene->_discardPile._card.setPosition(scene->_discardPile._stationPos, 0);
+ scene->setAnimationInfo(&scene->_discardPile);
+ scene->_aSound2.play(61);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(60);
+ scene->actionDisplay(1331, 14, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ scene->_gameBoardSide[2]._delayCard._card.postInit();
+ scene->_gameBoardSide[2]._delayCard._card.setVisage(1332);
+ scene->_gameBoardSide[2]._delayCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
+ scene->_gameBoardSide[2]._delayCard._card.hide();
+
+ scene->_gameBoardSide[3]._handCard[2]._cardId = 0;
+ scene->_gameBoardSide[3]._handCard[2].remove();
+
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayCard._stationPos, this);
+ }
+ break;
+ case 6: {
+ scene->_animatedCard._card.hide();
+ scene->_gameBoardSide[2]._delayCard._cardId = 21;
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._delayCard);
+ scene->_aSound1.play(57);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(60);
+ scene->actionDisplay(1331, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ int tmpVal = 15;
+ int i = -1;
+
+ for (i = 0; i <= 7; i++) {
+ tmpVal += 29;
+
+ scene->_upperDisplayCard[i].postInit();
+ scene->_upperDisplayCard[i].setVisage(1332);
+ scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 90), 0);
+ scene->_upperDisplayCard[i].setStrip(3);
+ scene->_upperDisplayCard[i].fixPriority(190);
+
+ scene->_lowerDisplayCard[i].postInit();
+ scene->_lowerDisplayCard[i].setVisage(1332);
+ scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 90), 0);
+ scene->_lowerDisplayCard[i].setStrip(7);
+ scene->_lowerDisplayCard[i].setFrame(1);
+ scene->_lowerDisplayCard[i].fixPriority(180);
+ }
+
+ scene->_upperDisplayCard[0].setFrame(1);
+ scene->_upperDisplayCard[1].setFrame(3);
+ scene->_upperDisplayCard[2].setFrame(6);
+ scene->_upperDisplayCard[3].setFrame(8);
+ scene->_upperDisplayCard[4].setFrame(9);
+ scene->_upperDisplayCard[5].setFrame(10);
+ scene->_upperDisplayCard[6].setFrame(11);
+ scene->_upperDisplayCard[7].setFrame(12);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(240);
+
+ scene->_upperDisplayCard[0].remove();
+ scene->_upperDisplayCard[1].remove();
+ scene->_upperDisplayCard[2].remove();
+ scene->_upperDisplayCard[3].remove();
+ scene->_upperDisplayCard[4].remove();
+ scene->_upperDisplayCard[5].remove();
+ scene->_upperDisplayCard[6].remove();
+ scene->_upperDisplayCard[7].remove();
+
+ scene->_lowerDisplayCard[0].remove();
+ scene->_lowerDisplayCard[1].remove();
+ scene->_lowerDisplayCard[2].remove();
+ scene->_lowerDisplayCard[3].remove();
+ scene->_lowerDisplayCard[4].remove();
+ scene->_lowerDisplayCard[5].remove();
+ scene->_lowerDisplayCard[6].remove();
+ scene->_lowerDisplayCard[7].remove();
+
+ scene->_discardPile._cardId = scene->_gameBoardSide[2]._delayCard._cardId;
+
+ scene->_gameBoardSide[2]._delayCard._cardId = 0;
+ scene->_gameBoardSide[2]._delayCard._card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
+ }
+ break;
+ case 7: {
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(&scene->_discardPile);
+ scene->_aSound2.play(61);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ scene->_gameBoardSide[2]._delayCard._card.postInit();
+ scene->_gameBoardSide[2]._delayCard._card.setVisage(1332);
+ scene->_gameBoardSide[2]._delayCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
+ scene->_gameBoardSide[2]._delayCard._card.hide();
+
+ scene->_gameBoardSide[3]._handCard[1]._cardId = 0;
+ scene->_gameBoardSide[3]._handCard[1].remove();
+
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayCard._stationPos, this);
+ }
+ break;
+ case 8: {
+ scene->_animatedCard._card.hide();
+ scene->_gameBoardSide[2]._delayCard._cardId = 14;
+ scene->setAnimationInfo(&scene->_gameBoardSide[2]._delayCard);
+ scene->_aSound1.play(57);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ scene->actionDisplay(1331, 16, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ int tmpVal = 72;
+ int i = -1;
+
+ for (i = 0; i <= 3; i++) {
+ tmpVal += 29;
+ scene->_upperDisplayCard[i].postInit();
+ scene->_upperDisplayCard[i].setVisage(1332);
+ scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 71), 0);
+ scene->_upperDisplayCard[i].setStrip(3);
+ scene->_upperDisplayCard[i].fixPriority(190);
+
+ scene->_lowerDisplayCard[i].postInit();
+ scene->_lowerDisplayCard[i].setVisage(1332);
+ scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 71), 0);
+ scene->_lowerDisplayCard[i].setStrip(7);
+ scene->_lowerDisplayCard[i].setFrame(1);
+ scene->_lowerDisplayCard[i].fixPriority(180);
+ }
+
+ scene->_upperDisplayCard[0].setFrame(2);
+ scene->_upperDisplayCard[1].setFrame(5);
+ scene->_upperDisplayCard[2].setFrame(7);
+ scene->_upperDisplayCard[3].setFrame(15);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(240);
+ scene->actionDisplay(1331, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ tmpVal = 72;
+ for (i = 4; i <= 7; i++) {
+ tmpVal += 29;
+
+ scene->_upperDisplayCard[i].postInit();
+ scene->_upperDisplayCard[i].setVisage(1332);
+ scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 100), 0);
+ scene->_upperDisplayCard[i].setStrip(4);
+ scene->_upperDisplayCard[i].fixPriority(190);
+
+ scene->_lowerDisplayCard[i].postInit();
+ scene->_lowerDisplayCard[i].setVisage(1332);
+ scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 100), 0);
+ scene->_lowerDisplayCard[i].setStrip(7);
+ scene->_lowerDisplayCard[i].setFrame(1);
+ scene->_lowerDisplayCard[i].fixPriority(180);
+ }
+
+ scene->_upperDisplayCard[4].setFrame(1);
+ scene->_upperDisplayCard[5].setFrame(5);
+ scene->_upperDisplayCard[6].setFrame(7);
+ scene->_upperDisplayCard[7].setFrame(3);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(240);
+
+ scene->_upperDisplayCard[0].remove();
+ scene->_upperDisplayCard[1].remove();
+ scene->_upperDisplayCard[2].remove();
+ scene->_upperDisplayCard[3].remove();
+ scene->_upperDisplayCard[4].remove();
+ scene->_upperDisplayCard[5].remove();
+ scene->_upperDisplayCard[6].remove();
+ scene->_upperDisplayCard[7].remove();
+
+ scene->_lowerDisplayCard[0].remove();
+ scene->_lowerDisplayCard[1].remove();
+ scene->_lowerDisplayCard[2].remove();
+ scene->_lowerDisplayCard[3].remove();
+ scene->_lowerDisplayCard[4].remove();
+ scene->_lowerDisplayCard[5].remove();
+ scene->_lowerDisplayCard[6].remove();
+ scene->_lowerDisplayCard[7].remove();
+
+ scene->_discardPile._cardId = scene->_gameBoardSide[2]._handCard[0]._cardId;
+
+ scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[0]._card._strip);
+ scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._card._frame);
+ scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL);
+
+ scene->_gameBoardSide[2]._handCard[0]._cardId = 0;
+ scene->_gameBoardSide[2]._handCard[0]._card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayCard._stationPos, this);
+ }
+ break;
+ case 9: {
+ scene->_aSound1.play(58);
+ scene->_gameBoardSide[2]._delayCard._cardId = 0;
+ scene->_gameBoardSide[2]._delayCard.remove();
+ scene->_animatedCard._card.setStrip(5);
+ scene->_animatedCard._card.setFrame(1);
+ scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
+ }
+ break;
+ case 10: {
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(&scene->_discardPile);
+ scene->_aSound2.play(61);
+
+ R2_GLOBALS._sceneObjects->draw();
+ scene->actionDisplay(1331, 18, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ scene->_upperDisplayCard[0].postInit();
+ scene->_upperDisplayCard[0].setVisage(1332);
+ scene->_upperDisplayCard[0].setPosition(Common::Point(131, 71), 0);
+ scene->_upperDisplayCard[0].fixPriority(190);
+ scene->_upperDisplayCard[0].setStrip(3);
+ scene->_upperDisplayCard[0].setFrame(4);
+
+ scene->_lowerDisplayCard[0].postInit();
+ scene->_lowerDisplayCard[0].setVisage(1332);
+ scene->_lowerDisplayCard[0].setPosition(Common::Point(131, 71), 0);
+ scene->_lowerDisplayCard[0].setStrip(7);
+ scene->_lowerDisplayCard[0].setFrame(1);
+ scene->_lowerDisplayCard[0].fixPriority(180);
+
+ scene->_upperDisplayCard[1].postInit();
+ scene->_upperDisplayCard[1].setVisage(1332);
+ scene->_upperDisplayCard[1].setPosition(Common::Point(160, 71), 0);
+ scene->_upperDisplayCard[1].fixPriority(190);
+ scene->_upperDisplayCard[1].setStrip(3);
+ scene->_upperDisplayCard[1].setFrame(16);
+
+ scene->_lowerDisplayCard[1].postInit();
+ scene->_lowerDisplayCard[1].setVisage(1332);
+ scene->_lowerDisplayCard[1].setPosition(Common::Point(160, 71), 0);
+ scene->_lowerDisplayCard[1].setStrip(7);
+ scene->_lowerDisplayCard[1].setFrame(1);
+ scene->_lowerDisplayCard[1].fixPriority(180);
+
+ scene->_upperDisplayCard[2].postInit();
+ scene->_upperDisplayCard[2].setVisage(1332);
+ scene->_upperDisplayCard[2].setPosition(Common::Point(131, 100), 0);
+ scene->_upperDisplayCard[2].fixPriority(190);
+ scene->_upperDisplayCard[2].setStrip(4);
+ scene->_upperDisplayCard[2].setFrame(4);
+
+ scene->_lowerDisplayCard[2].postInit();
+ scene->_lowerDisplayCard[2].setVisage(1332);
+ scene->_lowerDisplayCard[2].setPosition(Common::Point(131, 100), 0);
+ scene->_lowerDisplayCard[2].setStrip(7);
+ scene->_lowerDisplayCard[2].setFrame(1);
+ scene->_lowerDisplayCard[2].fixPriority(180);
+
+ scene->_upperDisplayCard[3].postInit();
+ scene->_upperDisplayCard[3].setVisage(1332);
+ scene->_upperDisplayCard[3].setPosition(Common::Point(160, 100), 0);
+ scene->_upperDisplayCard[3].fixPriority(190);
+ scene->_upperDisplayCard[3].setStrip(4);
+ scene->_upperDisplayCard[3].setFrame(2);
+
+ scene->_lowerDisplayCard[3].postInit();
+ scene->_lowerDisplayCard[3].setVisage(1332);
+ scene->_lowerDisplayCard[3].setPosition(Common::Point(160, 100), 0);
+ scene->_lowerDisplayCard[3].setStrip(7);
+ scene->_lowerDisplayCard[3].setFrame(1);
+ scene->_lowerDisplayCard[3].fixPriority(180);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ waitFrames(240);
+
+ scene->_upperDisplayCard[0].remove();
+ scene->_upperDisplayCard[1].remove();
+ scene->_upperDisplayCard[2].remove();
+ scene->_upperDisplayCard[3].remove();
+
+ scene->_lowerDisplayCard[0].remove();
+ scene->_lowerDisplayCard[1].remove();
+ scene->_lowerDisplayCard[2].remove();
+ scene->_lowerDisplayCard[3].remove();
+
+ scene->_currentPlayerArrow.setFrame(1);
+ scene->_currentPlayerArrow.show();
+ scene->_currentPlayerArrow.animate(ANIM_MODE_2, NULL);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ scene->actionDisplay(1331, 19, 159, 10, 1, 220, 0, 7, 0, 154, 154);
+
+ scene->_currentPlayerArrow.hide();
+
+ scene->actionDisplay(1331, 20, 159, 10, 1, 220, 0, 7, 0, 154, 154);
+ scene->actionDisplay(1331, 21, 159, 10, 1, 220, 0, 7, 0, 154, 154);
+
+ scene->_discardPile._cardId = scene->_gameBoardSide[2]._handCard[1]._cardId;
+
+ scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[1]._card._strip);
+ scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._card._frame);
+ scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL);
+
+ scene->_gameBoardSide[2]._handCard[1]._cardId = 0;
+ scene->_gameBoardSide[2]._handCard[1]._card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
+ }
+ break;
+ case 11: {
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(&scene->_discardPile);
+ scene->_aSound2.play(61);
+ scene->_animatedCard._card.setStrip(5);
+ scene->_animatedCard._card.setFrame(1);
+ scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
+
+ R2_GLOBALS._sceneObjects->draw();
+
+ scene->actionDisplay(1331, 22, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ int i = -1;
+ for (i = 0; i <= 3; i ++) {
+ scene->_gameBoardSide[3]._handCard[i]._cardId = 0;
+ scene->_gameBoardSide[3]._handCard[i]._card.remove();
+
+ scene->_gameBoardSide[2]._handCard[i]._cardId = 0;
+ scene->_gameBoardSide[2]._handCard[i]._card.remove();
+
+ scene->_gameBoardSide[0]._handCard[i]._cardId = 0;
+ scene->_gameBoardSide[0]._handCard[i]._card.remove();
+
+ scene->_gameBoardSide[1]._handCard[i]._cardId = 0;
+ scene->_gameBoardSide[1]._handCard[i]._card.remove();
+ }
+
+ for (i = 0; i <= 7; i++) {
+ scene->_gameBoardSide[3]._outpostStation[i]._cardId = 0;
+ scene->_gameBoardSide[3]._outpostStation[i]._card.remove();
+
+ scene->_gameBoardSide[2]._outpostStation[i]._cardId = 0;
+ scene->_gameBoardSide[2]._outpostStation[i]._card.remove();
+
+ scene->_gameBoardSide[0]._outpostStation[i]._cardId = 0;
+ scene->_gameBoardSide[0]._outpostStation[i]._card.remove();
+
+ scene->_gameBoardSide[1]._outpostStation[i]._cardId = 0;
+ scene->_gameBoardSide[1]._outpostStation[i]._card.remove();
+ }
+
+ scene->_gameBoardSide[2]._delayCard._cardId = 0;
+ scene->_gameBoardSide[2]._delayCard._card.remove();
+
+ scene->_discardPile._cardId = 0;
+ scene->_discardPile._card.remove();
+
+ scene->_stockPile.remove();
+ }
+ // No break on purpose
+ case 0:
+ R2_GLOBALS._sceneObjects->draw();
+ signal();
+ break;
+ case 12:
+ scene->suggestInstructions();
+ remove();
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * Shuffle cards animation
+ */
+void Scene1337::Action2::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ scene->_shuffleAnimation._card.postInit();
+ scene->_shuffleAnimation._card.setVisage(1332);
+ scene->_shuffleAnimation._card.setStrip(8);
+ scene->_shuffleAnimation._card.setFrame(1);
+ scene->_shuffleAnimation._card.fixPriority(300);
+ scene->_shuffleAnimation._card.setPosition(Common::Point(156, 108));
+
+ scene->_discardPile._card.remove();
+ scene->_discardPile._cardId = 0;
+
+ scene->_aSound1.play(60);
+ scene->_shuffleAnimation._card.animate(ANIM_MODE_5, this);
+ break;
+ case 1:
+ scene->_shuffleAnimation._card.setFrame(1);
+
+ scene->_aSound1.play(60);
+ scene->_shuffleAnimation._card.animate(ANIM_MODE_5, this);
+ break;
+ case 2: {
+ Common::Point pt(156, 108);
+ NpcMover *mover = new NpcMover();
+ scene->_shuffleAnimation._card.addMover(mover, &pt, this);
+ }
+ break;
+ case 3:
+ scene->_shuffleAnimation._card.remove();
+ scene->_stockPile.setup(1332, 5, 1);
+ scene->_stockPile.setPosition(Common::Point(162, 95));
+ scene->_stockPile.setPriority(110);
+ scene->_stockPile._effect = EFFECT_SHADED;
+ scene->_stockPile.show();
+ scene->_shuffleEndedFl = true;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * Deal cards
+ */
+void Scene1337::Action3::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_animatedCard._card._moveDiff = Common::Point(30, 30);
+ scene->_animatedCard._card.setVisage(1332);
+ scene->_animatedCard._card.setStrip(5);
+ scene->_animatedCard._card.setFrame(1);
+ scene->_animatedCard._card.fixPriority(400);
+ scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(283, 146);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_animatedCard._card.show();
+ scene->_gameBoardSide[1]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 1: {
+ scene->_gameBoardSide[1]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[1]._handCard[0]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[1]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._handCard[0]._card.setPosition(scene->_gameBoardSide[1]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[1]._handCard[0]._card.setStrip(1);
+ scene->_gameBoardSide[1]._handCard[0]._card.setFrame(4);
+ scene->_gameBoardSide[1]._handCard[0]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(10, 174);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[2]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 2: {
+ scene->_gameBoardSide[2]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[2]._handCard[0]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[2]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._handCard[0]._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[2]._handCard[0]._card.fixPriority(170);
+ if (scene->_gameBoardSide[2]._handCard[0]._cardId > 25) {
+ scene->_gameBoardSide[2]._handCard[0]._card.setStrip(4);
+ scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId - 25);
+ } else if (scene->_gameBoardSide[2]._handCard[0]._cardId > 9) {
+ scene->_gameBoardSide[2]._handCard[0]._card.setStrip(3);
+ scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId - 9);
+ } else {
+ scene->_gameBoardSide[2]._handCard[0]._card.setStrip(2);
+ scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId);
+ }
+ scene->_aSound2.play(61);
+
+ Common::Point pt(14, 14);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[3]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 3: {
+ scene->_gameBoardSide[3]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[3]._handCard[0]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[3]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._handCard[0]._card.setPosition(scene->_gameBoardSide[3]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[3]._handCard[0]._card.setStrip(1);
+ scene->_gameBoardSide[3]._handCard[0]._card.setFrame(3);
+ scene->_gameBoardSide[3]._handCard[0]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(280, 5);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[0]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 4: {
+ scene->_gameBoardSide[0]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[0]._handCard[0]._card._moveDiff = Common::Point(30,30);
+ scene->_gameBoardSide[0]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._handCard[0]._card.setPosition(scene->_gameBoardSide[0]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[0]._handCard[0]._card.setStrip(5);
+ scene->_gameBoardSide[0]._handCard[0]._card.setFrame(1);
+ scene->_gameBoardSide[0]._handCard[0]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(283, 124);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[1]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 5: {
+ scene->_gameBoardSide[1]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[1]._handCard[1]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[1]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._handCard[1]._card.setPosition(scene->_gameBoardSide[1]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[1]._handCard[1]._card.setStrip(1);
+ scene->_gameBoardSide[1]._handCard[1]._card.setFrame(4);
+ scene->_gameBoardSide[1]._handCard[1]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(37, 174);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[2]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 6: {
+ scene->_gameBoardSide[2]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[2]._handCard[1]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[2]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._handCard[1]._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[2]._handCard[1]._card.fixPriority(170);
+
+ if (scene->_gameBoardSide[2]._handCard[1]._cardId > 25) {
+ scene->_gameBoardSide[2]._handCard[1]._card.setStrip(4);
+ scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId - 25);
+ } else if (scene->_gameBoardSide[2]._handCard[1]._cardId > 9) {
+ scene->_gameBoardSide[2]._handCard[1]._card.setStrip(3);
+ scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId - 9);
+ } else {
+ scene->_gameBoardSide[2]._handCard[1]._card.setStrip(2);
+ scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId);
+ }
+
+ scene->_aSound2.play(61);
+
+ Common::Point pt(14, 36);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[3]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 7: {
+ scene->_gameBoardSide[3]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[3]._handCard[1]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[3]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._handCard[1]._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos);
+ scene->_gameBoardSide[3]._handCard[1]._card.setStrip(1);
+ scene->_gameBoardSide[3]._handCard[1]._card.setFrame(3);
+ scene->_gameBoardSide[3]._handCard[1]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(253, 5);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[0]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 8: {
+ scene->_gameBoardSide[0]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[0]._handCard[1]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[0]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._handCard[1]._card.setPosition(scene->_gameBoardSide[0]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[0]._handCard[1]._card.setStrip(5);
+ scene->_gameBoardSide[0]._handCard[1]._card.setFrame(1);
+ scene->_gameBoardSide[0]._handCard[1]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(283, 102);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[1]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 9: {
+ scene->_gameBoardSide[1]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[1]._handCard[2]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[1]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[1]._handCard[2]._card.setPosition(scene->_gameBoardSide[1]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[1]._handCard[2]._card.setStrip(1);
+ scene->_gameBoardSide[1]._handCard[2]._card.setFrame(4);
+ scene->_gameBoardSide[1]._handCard[2]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(64, 174);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[2]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 10: {
+ scene->_gameBoardSide[2]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[2]._handCard[2]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[2]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[2]._handCard[2]._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[2]._handCard[2]._card.fixPriority(170);
+
+ if (scene->_gameBoardSide[2]._handCard[2]._cardId > 25) {
+ scene->_gameBoardSide[2]._handCard[2]._card.setStrip(4);
+ scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId - 25);
+ } else if (scene->_gameBoardSide[2]._handCard[2]._cardId > 9) {
+ scene->_gameBoardSide[2]._handCard[2]._card.setStrip(3);
+ scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId - 9);
+ } else {
+ scene->_gameBoardSide[2]._handCard[2]._card.setStrip(2);
+ scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId);
+ }
+
+ scene->_aSound2.play(61);
+
+ Common::Point pt(14, 58);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[3]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 11: {
+ scene->_gameBoardSide[3]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[3]._handCard[2]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[3]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[3]._handCard[2]._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[3]._handCard[2]._card.setStrip(1);
+ scene->_gameBoardSide[3]._handCard[2]._card.setFrame(3);
+ scene->_gameBoardSide[3]._handCard[2]._card.fixPriority(170);
+ scene->_aSound2.play(61);
+
+ Common::Point pt(226, 5);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+
+ scene->_gameBoardSide[0]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ }
+ break;
+ case 12:
+ scene->_gameBoardSide[0]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[0]._handCard[2]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[0]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[0]._handCard[2]._card.setPosition(scene->_gameBoardSide[0]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[0]._handCard[2]._card.setStrip(5);
+ scene->_gameBoardSide[0]._handCard[2]._card.setFrame(1);
+ scene->_gameBoardSide[0]._handCard[2]._card.fixPriority(170);
+ scene->_animatedCard._card.hide();
+ default:
+ break;
+ }
+
+ if (_actionIndex > 12) {
+ scene->_currentPlayerNumb = 0;
+ R2_GLOBALS._sceneObjects->draw();
+ scene->actionDisplay(1330, 0, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ scene->handleNextTurn();
+ } else if (_actionIndex >= 1) {
+ scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
+ scene->_cardsAvailableNumb--;
+ }
+}
+
+/**
+ * Action used to handle the other players' turn
+ */
+void Scene1337::Action4::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if (scene->_cardsAvailableNumb < 0)
+ scene->shuffleCards();
+ scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
+ scene->_animatedCard._card.show();
+ scene->_aSound2.play(61);
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos, this);
+
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
+ scene->_cardsAvailableNumb--;
+
+ if (scene->_cardsAvailableNumb < 0)
+ scene->_stockPile.remove();
+ } else {
+ // Self call, forcing next actionIndex
+ signal();
+ }
+ break;
+ case 1:
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.y) ) {
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.postInit();
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setVisage(1332);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._stationPos, 0);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setStrip(1);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.fixPriority(170);
+ }
+
+ if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
+ scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]);
+
+ scene->_animatedCard._card.hide();
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if (scene->_cardsAvailableNumb < 0)
+ scene->shuffleCards();
+ scene->_animatedCard._card.setPosition(Common::Point(162, 95));
+ scene->_animatedCard._card.show();
+
+ scene->_aSound2.play(61);
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos, this);
+
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
+ scene->_cardsAvailableNumb--;
+ if (scene->_cardsAvailableNumb < 0)
+ scene->_stockPile.remove();
+ } else
+ signal();
+ break;
+ case 2:
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.y) ) {
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.postInit();
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setVisage(1332);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._stationPos, 0);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setStrip(1);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.fixPriority(170);
+ }
+
+ if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
+ scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]);
+
+ scene->_animatedCard._card.hide();
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if (scene->_cardsAvailableNumb < 0)
+ scene->shuffleCards();
+ scene->_animatedCard._card.setPosition(Common::Point(162, 95));
+ scene->_animatedCard._card.show();
+
+ scene->_aSound2.play(61);
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos, this);
+
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
+ scene->_cardsAvailableNumb--;
+ if (scene->_cardsAvailableNumb < 0)
+ scene->_stockPile.remove();
+ } else
+ signal();
+ break;
+ case 3:
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.y) ) {
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.postInit();
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setVisage(1332);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._stationPos, 0);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setStrip(1);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.fixPriority(170);
+ }
+
+ if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
+ scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]);
+
+ scene->_animatedCard._card.hide();
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if (scene->_cardsAvailableNumb < 0)
+ scene->shuffleCards();
+ scene->_animatedCard._card.setPosition(Common::Point(162, 95));
+ scene->_animatedCard._card.show();
+
+ scene->_aSound2.play(61);
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos, this);
+
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
+ scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
+ scene->_cardsAvailableNumb--;
+ if (scene->_cardsAvailableNumb < 0)
+ scene->_stockPile.remove();
+ } else
+ signal();
+ break;
+ case 4:
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.y) ) {
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.postInit();
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card._moveDiff = Common::Point(30, 30);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setVisage(1332);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._stationPos, 0);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setStrip(1);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
+ scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.fixPriority(170);
+ }
+
+ if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
+ scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]);
+
+ scene->_animatedCard._card.hide();
+ switch (scene->_currentPlayerNumb) {
+ case 0:
+ scene->handlePlayer0();
+ break;
+ case 1:
+ scene->handlePlayer1();
+ break;
+ case 2:
+ scene->handleAutoplayPlayer2();
+ break;
+ case 3:
+ scene->handlePlayer3();
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * Animations for discarding a card
+ */
+void Scene1337::Action5::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard1->_cardId;
+ scene->_currentDiscardIndex--;
+ if (!g_globals->_sceneObjects->contains(&scene->_discardPile._card)) {
+ // The first discarded card makes the pile appear
+ scene->_discardPile._card.postInit();
+ scene->_discardPile._card.hide();
+ scene->_discardPile._card.setVisage(1332);
+ scene->_discardPile._card.setPosition(scene->_discardPile._stationPos, 0);
+ scene->_discardPile._card.fixPriority(170);
+ }
+
+ scene->_discardPile._cardId = scene->_actionCard1->_cardId;
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+
+ if (scene->_actionCard1 == &scene->_selectedCard) {
+ scene->setCursorData(5, 1, 4);
+ scene->subC4CEC();
+ }
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_animatedCard._card.show();
+ Common::Point pt(128, 95);
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &pt, this);
+ }
+ break;
+ case 1:
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(&scene->_discardPile);
+ scene->_aSound2.play(61);
+ scene->handleNextTurn();
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * Animations for playing a platform card
+ */
+void Scene1337::Action6::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_actionCard2->_cardId = 1;
+ scene->_actionCard2->_card.postInit();
+ scene->_actionCard2->_card.hide();
+ scene->_actionCard2->_card.setVisage(1332);
+ scene->_actionCard2->_card.setPosition(scene->_actionCard2->_stationPos);
+ scene->_actionCard2->_card.fixPriority(170);
+
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
+ }
+ break;
+ case 1:
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(scene->_actionCard2);
+ scene->_aSound1.play(59);
+ if (scene->_actionCard1 == &scene->_selectedCard) {
+ scene->setCursorData(5, 1, 4);
+ scene->subC4CEC();
+ }
+ scene->handleNextTurn();
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * Upgrade platform to station by playing a station card on top of it
+ */
+void Scene1337::Action7::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
+
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_animatedCard._card.show();
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
+ }
+ break;
+ case 1:
+ if (scene->_actionCard1 == &scene->_selectedCard) {
+ scene->setCursorData(5, 1, 4);
+ scene->subC4CEC();
+ }
+ scene->setAnimationInfo(scene->_actionCard2);
+ scene->_aSound1.play(59);
+ scene->_discardedPlatformCard._cardId = 1;
+ scene->_discardedPlatformCard._stationPos = scene->_actionCard2->_stationPos;
+ scene->_discardedPlatformCard._card.postInit();
+ scene->_discardedPlatformCard._card.hide();
+ scene->_discardedPlatformCard._card._flags = OBJFLAG_HIDING;
+
+ scene->discardCard(&scene->_discardedPlatformCard);
+ break;
+ default:
+ break;
+ }
+}
+
+// Remove a delay card
+void Scene1337::Action8::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
+ scene->_currentDiscardIndex--;
+
+ scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
+ scene->_actionCard1->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
+ }
+ break;
+ case 1:
+ scene->_animatedCard._card.hide();
+
+ if (scene->_actionCard1 == &scene->_selectedCard) {
+ scene->setCursorData(5, 1, 4);
+ scene->subC4CEC();
+ }
+ scene->setAnimationInfo(scene->_actionCard2);
+ scene->_aSound1.play(58);
+ scene->discardCard(scene->_actionCard2);
+ break;
+ default:
+ break;
+ }
+}
+
+// Play delay card
+void Scene1337::Action9::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
+ scene->_actionCard2->_card.postInit();
+ scene->_actionCard2->_card.hide();
+ scene->_actionCard2->_card.setVisage(1332);
+ scene->_actionCard2->_card.setPosition(scene->_actionCard2->_stationPos, 0);
+ scene->_actionCard2->_card.fixPriority(170);
+
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
+ }
+ break;
+ case 1:
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(scene->_actionCard2);
+ scene->_aSound1.play(57);
+
+ if (scene->_actionCard1 == &scene->_selectedCard) {
+ scene->setCursorData(5, 1, 4);
+ scene->subC4CEC();
+ }
+
+ scene->handleNextTurn();
+ break;
+ default:
+ break;
+ }
+}
+
+// Play a card on the central outpost.
+// This card is either a counter-trick card or a meteor card
+void Scene1337::Action10::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_actionCard3->_card.postInit();
+ scene->_actionCard3->_card.hide();
+ scene->_actionCard3->_card.setVisage(1332);
+ scene->_actionCard3->_card.setPosition(scene->_actionCard3->_stationPos, 0);
+ scene->_actionCard3->_card.fixPriority(170);
+ scene->_actionCard3->_cardId = scene->_actionCard1->_cardId;
+
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+
+ if (scene->_actionCard1 == &scene->_selectedCard) {
+ scene->setCursorData(5, 1, 4);
+ scene->subC4CEC();
+ }
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_animatedCard._card.show();
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard3->_stationPos, this);
+ }
+ break;
+ case 1: {
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(scene->_actionCard3);
+ scene->_aSound1.play(57);
+
+ bool found = false;
+ int indexFound = -1;
+
+ switch (scene->_actionPlayerIdx) {
+ case 0:
+ for (indexFound = 0; indexFound < 3; indexFound++) {
+ // Check for the presence of an interceptor card
+ if (scene->_gameBoardSide[0]._handCard[indexFound]._cardId == 29) {
+ found = true;
+ break;
+ }
+ }
+ break;
+ case 1:
+ for (indexFound = 0; indexFound < 3; indexFound++) {
+ // Check for the presence of an interceptor card
+ if (scene->_gameBoardSide[1]._handCard[indexFound]._cardId == 29) {
+ found = true;
+ break;
+ }
+ }
+ break;
+ case 2:
+ for (indexFound = 0; indexFound < 3; indexFound++) {
+ // Check for the presence of an interceptor card
+ if (scene->_gameBoardSide[2]._handCard[indexFound]._cardId == 29) {
+ found = true;
+ break;
+ }
+ }
+ break;
+ case 3:
+ for (indexFound = 0; indexFound < 3; indexFound++) {
+ // Check for the presence of an interceptor card
+ if (scene->_gameBoardSide[3]._handCard[indexFound]._cardId == 29) {
+ found = true;
+ break;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ bool found2 = false;
+
+ if (found) {
+ switch (scene->_actionPlayerIdx) {
+ case 0:
+ scene->playInterceptorCard(&scene->_gameBoardSide[0]._handCard[indexFound], scene->_actionCard3);
+ found2 = true;
+ break;
+ case 1:
+ scene->playInterceptorCard(&scene->_gameBoardSide[1]._handCard[indexFound], scene->_actionCard3);
+ found2 = true;
+ break;
+ case 2:
+ scene->subC4CD2();
+ if (MessageDialog::show(USE_INTERCEPTOR, NO_MSG, YES_MSG) == 0)
+ scene->subC4CEC();
+ else {
+ scene->playInterceptorCard(&scene->_gameBoardSide[2]._handCard[indexFound], scene->_actionCard3);
+ found2 = true;
+ }
+ break;
+ case 3:
+ scene->playInterceptorCard(&scene->_gameBoardSide[3]._handCard[indexFound], scene->_actionCard3);
+ found2 = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (found2)
+ break;
+
+ if (scene->_actionPlayerIdx == 2) {
+ int stationCount = 0;
+ for (int i = 0; i <= 7; i++) {
+ if (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0)
+ ++stationCount;
+ }
+
+ if (stationCount <= 1) {
+ for (int i = 0; i <= 7; i++) {
+ if (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0) {
+ scene->_actionCard2 = &scene->_gameBoardSide[2]._outpostStation[i];
+ break;
+ }
+ }
+ } else {
+ scene->subC4CD2();
+
+ found2 = false;
+ while (!found2) {
+ scene->actionDisplay(1330, 130, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ // Wait for a mouse or keypress
+ Event event;
+ while (!g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !g_vm->shouldQuit()) {
+ g_globals->_scenePalette.signalListeners();
+ R2_GLOBALS._sceneObjects->draw();
+ g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
+ }
+
+ scene->_selectedCard._stationPos = event.mousePos;
+
+ for (int i = 0; i <= 7; i++) {
+ if (scene->_gameBoardSide[2]._outpostStation[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0)) {
+ scene->_actionCard2 = &scene->_gameBoardSide[2]._outpostStation[i];
+ found2 = true;
+ break;
+ }
+ }
+ }
+ scene->subC4CEC();
+ }
+ }
+
+ scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
+ scene->_currentDiscardIndex--;
+ scene->_actionCard2->_cardId = 0;
+ scene->_actionCard2->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard2->_stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard3->_stationPos, this);
+ }
+ break;
+ case 2:
+ scene->_animatedCard._card.hide();
+ scene->discardCard(scene->_actionCard3);
+ break;
+ default:
+ break;
+ }
+}
+
+// Use Thief card (#25) and pick a card from the opponent
+void Scene1337::Action11::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_actionCard2->_card.postInit();
+ scene->_actionCard2->_card.hide();
+ scene->_actionCard2->_card.setVisage(1332);
+ scene->_actionCard2->_card.setPosition(scene->_actionCard2->_stationPos, 0);
+ scene->_actionCard2->_card.fixPriority(170);
+ scene->_actionCard2->_cardId = 25;
+
+ if (scene->_actionPlayerIdx == 2) {
+ scene->_animatedCard._card.setPosition(scene->_actionCard2->_stationPos, 0);
+ scene->setCursorData(5, 1, 4);
+ } else {
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ }
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
+ }
+ break;
+ case 1: {
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(scene->_actionCard2);
+ scene->_aSound1.play(57);
+
+ bool found = false;
+ bool noAction = true;
+
+ int i = -1;
+
+ switch (scene->_actionVictimIdx) {
+ case 0:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[0]._handCard[i]._cardId == 27) {
+ found = true;
+ break;
+ }
+ }
+
+ if ((found) && (scene->getRandomCardFromHand(scene->_actionPlayerIdx) != -1)) {
+ scene->_actionCard1 = &scene->_gameBoardSide[0]._handCard[i];
+ scene->_actionCard2 = &scene->_gameBoardSide[0]._emptyStationPos;
+ if (scene->_actionPlayerIdx != 0) {
+ int tmpVal = scene->getRandomCardFromHand(scene->_actionPlayerIdx);
+ scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionPlayerIdx]._handCard[tmpVal];
+ }
+ scene->_actionItem.setAction(&scene->_action12);
+ noAction = false;
+ }
+ break;
+ case 1:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[1]._handCard[i]._cardId == 27) {
+ found = true;
+ break;
+ }
+ }
+
+ if ((found) && (scene->getRandomCardFromHand(scene->_actionPlayerIdx) != -1)) {
+ scene->_actionCard1 = &scene->_gameBoardSide[1]._handCard[i];
+ scene->_actionCard2 = &scene->_gameBoardSide[1]._emptyStationPos;
+ if (scene->_actionPlayerIdx != 1) {
+ int tmpVal = scene->getRandomCardFromHand(scene->_actionPlayerIdx);
+ scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionPlayerIdx]._handCard[tmpVal];
+ }
+ scene->_actionItem.setAction(&scene->_action12);
+ noAction = false;
+ }
+ break;
+ case 2:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[2]._handCard[i]._cardId == 27) {
+ found = true;
+ break;
+ }
+ }
+
+ if ((found) && (scene->getRandomCardFromHand(scene->_actionPlayerIdx) != -1)) {
+ scene->subC4CD2();
+ if (MessageDialog::show(USE_DOUBLE_AGENT, NO_MSG, YES_MSG) == 0)
+ scene->subC4CEC();
+ else {
+ scene->subC4CEC();
+ scene->_actionCard1 = &scene->_gameBoardSide[2]._handCard[i];
+ scene->_actionCard2 = &scene->_gameBoardSide[2]._emptyStationPos;
+ if (scene->_actionPlayerIdx != 2) {
+ int tmpVal = scene->getRandomCardFromHand(scene->_actionPlayerIdx);
+ scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionPlayerIdx]._handCard[tmpVal];
+ }
+ scene->_actionItem.setAction(&scene->_action12);
+ noAction = false;
+ }
+ }
+ break;
+ case 3:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[3]._handCard[i]._cardId == 27) {
+ found = true;
+ break;
+ }
+ }
+
+ if ((found) && (scene->getRandomCardFromHand(scene->_actionPlayerIdx) != -1)) {
+ scene->_actionCard1 = &scene->_gameBoardSide[3]._handCard[i];
+ scene->_actionCard2 = &scene->_gameBoardSide[3]._emptyStationPos;
+ if (scene->_actionPlayerIdx != 3) {
+ int tmpVal = scene->getRandomCardFromHand(scene->_actionPlayerIdx);
+ scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionPlayerIdx]._handCard[tmpVal];
+ }
+ scene->_actionItem.setAction(&scene->_action12);
+ noAction = false;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (!noAction)
+ break;
+
+ if (scene->_actionPlayerIdx == 2) {
+ int count = 0;
+ if (scene->_actionVictimIdx != 2) {
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[scene->_actionVictimIdx]._handCard[i]._cardId != 0)
+ ++count;
+ }
+ }
+
+ if (count > 1) {
+ scene->subC4CD2();
+
+ found = false;
+ while (!found) {
+ switch (scene->_actionVictimIdx) {
+ case 0:
+ scene->actionDisplay(1330, 131, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 1:
+ scene->actionDisplay(1330, 132, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 3:
+ scene->actionDisplay(1330, 133, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+
+ Event event;
+ while (!g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !g_vm->shouldQuit()) {
+ g_globals->_scenePalette.signalListeners();
+ R2_GLOBALS._sceneObjects->draw();
+ g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
+ }
+
+ scene->_selectedCard._stationPos = event.mousePos;
+
+ found = false;
+
+ if (scene->_actionVictimIdx != 2) {
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[scene->_actionVictimIdx]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[scene->_actionVictimIdx]._handCard[i]._cardId != 0)) {
+ scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionVictimIdx]._handCard[i];
+ found = true;
+ break;
+ }
+ }
+ }
+ } // while
+ scene->_displayHelpFl = true;
+ scene->subC4CEC();
+ } else if (scene->_actionVictimIdx != 2) {
+ int tmpVal = scene->getRandomCardFromHand(scene->_actionVictimIdx);
+ scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionVictimIdx]._handCard[tmpVal];
+ }
+ }
+
+ scene->_actionCard1->_card.postInit();
+ scene->_actionCard1->_card.hide();
+ scene->_actionCard1->_card.setVisage(1332);
+ scene->_actionCard1->_card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_actionCard1->_card.fixPriority(170);
+ scene->_actionCard1->_card.setStrip2(1);
+ scene->_actionCard1->_cardId = scene->_actionCard3->_cardId;
+
+ scene->_actionCard3->_cardId = 0;
+ scene->_actionCard3->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard3->_stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard1->_stationPos, this);
+ }
+ break;
+ case 2:
+ scene->_animatedCard._card.hide();
+ switch (scene->_actionPlayerIdx) {
+ case 0:
+ scene->_actionCard1->_card.setFrame2(2);
+ scene->_actionCard1->_card.show();
+ break;
+ case 1:
+ scene->_actionCard1->_card.setFrame2(4);
+ scene->_actionCard1->_card.show();
+ break;
+ case 3:
+ scene->_actionCard1->_card.setFrame2(3);
+ scene->_actionCard1->_card.show();
+ break;
+ default:
+ scene->setAnimationInfo(scene->_actionCard1);
+ break;
+ }
+
+ scene->_currentPlayerNumb--;
+ scene->_showPlayerTurn = false;
+ scene->discardCard(scene->_actionCard2);
+ break;
+ default:
+ break;
+ }
+}
+
+// Pick a card in opponent hand
+void Scene1337::Action12::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ signal();
+ break;
+ case 1: {
+ scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
+ scene->_currentDiscardIndex++;
+ scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
+ }
+ break;
+ case 2:
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(scene->_actionCard2);
+ scene->_aSound1.play(58);
+ if (scene->_actionVictimIdx == 2) {
+ int count = 0;
+ int i = -1;
+ switch (scene->_actionPlayerIdx) {
+ case 0:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[0]._handCard[i]._cardId != 0)
+ ++count;
+ }
+ break;
+ case 1:
+ for (i = 0; i <= 3; i++) {
+ // The original game was counting in the hand of player 3, which is obviously wrong
+ if (scene->_gameBoardSide[1]._handCard[i]._cardId != 0)
+ ++count;
+ }
+ break;
+ case 3:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[3]._handCard[i]._cardId != 0)
+ ++count;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (count > 1) {
+ scene->subC4CD2();
+
+ bool found = false;
+
+ while (!found) {
+ switch (scene->_actionPlayerIdx) {
+ case 0:
+ scene->actionDisplay(1330, 131, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 1:
+ scene->actionDisplay(1330, 132, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 3:
+ scene->actionDisplay(1330, 133, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+
+ Event event;
+ while (!g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !g_vm->shouldQuit()) {
+ g_globals->_scenePalette.signalListeners();
+ R2_GLOBALS._sceneObjects->draw();
+ g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
+ }
+
+ scene->_selectedCard._stationPos = event.mousePos;
+
+ switch (scene->_actionPlayerIdx) {
+ case 0:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[0]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[0]._handCard[i]._cardId != 0)) {
+ found = true;
+ scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[i];
+ break;
+ }
+ }
+ break;
+ case 1:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[1]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[1]._handCard[i]._cardId != 0)) {
+ found = true;
+ scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[i];
+ break;
+ }
+ }
+ break;
+ case 3:
+ for (i = 0; i <= 3; i++) {
+ if (scene->_gameBoardSide[3]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[3]._handCard[i]._cardId != 0)) {
+ found = true;
+ scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[i];
+ break;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ scene->subC4CEC();
+ } else {
+ switch (scene->_actionPlayerIdx) {
+ case 0:
+ scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[scene->getRandomCardFromHand(0)];
+ break;
+ case 1:
+ scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[scene->getRandomCardFromHand(1)];
+ break;
+ case 3:
+ scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[scene->getRandomCardFromHand(3)];
+ break;
+ default:
+ break;
+ }
+ }
+
+ scene->_actionCard1->_card.postInit();
+ scene->_actionCard1->_card.hide();
+ scene->_actionCard1->_card.setVisage(1332);
+ scene->_actionCard1->_card.setPosition(scene->_actionCard1->_stationPos);
+ scene->_actionCard1->_card.fixPriority(170);
+ scene->_actionCard1->_card.setStrip2(1);
+ scene->_actionCard1->_cardId = scene->_actionCard3->_cardId;
+
+ scene->_actionCard3->_cardId = 0;
+ scene->_actionCard3->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard3->_stationPos);
+ scene->_animatedCard._card.show();
+ scene->_aSound1.play(57);
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard1->_stationPos, this);
+ }
+ break;
+ case 3:
+ scene->_animatedCard._card.hide();
+ switch (scene->_actionVictimIdx) {
+ case 0:
+ scene->_actionCard1->_card.setFrame2(2);
+ scene->_actionCard1->_card.show();
+ break;
+ case 1:
+ scene->_actionCard1->_card.setFrame2(4);
+ scene->_actionCard1->_card.show();
+ break;
+ case 3:
+ scene->_actionCard1->_card.setFrame2(3);
+ scene->_actionCard1->_card.show();
+ break;
+ default:
+ scene->setAnimationInfo(scene->_actionCard1);
+ break;
+ }
+ scene->discardCard(scene->_actionCard2);
+ break;
+ default:
+ break;
+ }
+}
+
+// Handle the animations of the interceptor card
+void Scene1337::Action13::signal() {
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0: {
+ scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
+ scene->_currentDiscardIndex--;
+
+ scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
+
+ scene->_actionCard1->_cardId = 0;
+ scene->_actionCard1->_card.remove();
+
+ scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
+ scene->_animatedCard._card.show();
+
+ NpcMover *mover = new NpcMover();
+ scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
+ }
+ break;
+ case 1:
+ scene->_animatedCard._card.hide();
+ scene->setAnimationInfo(scene->_actionCard2);
+ scene->_aSound1.play(58);
+ signal();
+ break;
+ case 2:
+ scene->discardCard(scene->_actionCard2);
+ break;
+ default:
+ break;
+ }
+}
+
+void Scene1337::postInit(SceneObjectList *OwnerList) {
+// In the original, may be found in subPostInit.
+// Without it, enableControl asserts
+ loadScene(1330);
+ R2_GLOBALS._uiElements._active = false;
+ SceneExt::postInit();
+//
+
+ // Hide the user interface
+ BF_GLOBALS._interfaceY = SCREEN_HEIGHT;
+ R2_GLOBALS._uiElements._visible = false;
+
+ R2_GLOBALS._player.enableControl();
+ R2_GLOBALS._player._canWalk = false;
+ R2_GLOBALS._player._uiEnabled = false;
+
+ _delayedFunction = nullptr;
+
+ _actionCard1 = nullptr;
+ _actionCard2 = nullptr;
+ _actionCard3 = nullptr;
+
+ _gameBoardSide[2]._handCard[0]._stationPos = Common::Point(10, 174);
+ _gameBoardSide[2]._handCard[1]._stationPos = Common::Point(37, 174);
+ _gameBoardSide[2]._handCard[2]._stationPos = Common::Point(64, 174);
+ _gameBoardSide[2]._handCard[3]._stationPos = Common::Point(91, 174);
+
+ _gameBoardSide[2]._outpostStation[0]._stationPos = Common::Point(119, 174);
+ _gameBoardSide[2]._outpostStation[1]._stationPos = Common::Point(119, 148);
+ _gameBoardSide[2]._outpostStation[2]._stationPos = Common::Point(119, 122);
+ _gameBoardSide[2]._outpostStation[3]._stationPos = Common::Point(145, 122);
+ _gameBoardSide[2]._outpostStation[4]._stationPos = Common::Point(171, 122);
+ _gameBoardSide[2]._outpostStation[5]._stationPos = Common::Point(171, 148);
+ _gameBoardSide[2]._outpostStation[6]._stationPos = Common::Point(171, 174);
+ _gameBoardSide[2]._outpostStation[7]._stationPos = Common::Point(145, 174);
+
+ _gameBoardSide[2]._delayCard._stationPos = Common::Point(199, 174);
+
+ _gameBoardSide[2]._emptyStationPos._stationPos = Common::Point(145, 148);
+
+ _gameBoardSide[2]._card1Pos = Common::Point(10, 174);
+ _gameBoardSide[2]._card2Pos = Common::Point(37, 174);
+ _gameBoardSide[2]._card3Pos = Common::Point(64, 174);
+ _gameBoardSide[2]._card4Pos = Common::Point(91, 174);
+ _gameBoardSide[2]._frameNum = 2;
+
+ _gameBoardSide[3]._handCard[0]._stationPos = Common::Point(14, 14);
+ _gameBoardSide[3]._handCard[1]._stationPos = Common::Point(14, 36);
+ _gameBoardSide[3]._handCard[2]._stationPos = Common::Point(14, 58);
+ _gameBoardSide[3]._handCard[3]._stationPos = Common::Point(14, 80);
+
+ _gameBoardSide[3]._outpostStation[0]._stationPos = Common::Point(37, 66);
+ _gameBoardSide[3]._outpostStation[1]._stationPos = Common::Point(63, 66);
+ _gameBoardSide[3]._outpostStation[2]._stationPos = Common::Point(89, 66);
+ _gameBoardSide[3]._outpostStation[3]._stationPos = Common::Point(89, 92);
+ _gameBoardSide[3]._outpostStation[4]._stationPos = Common::Point(89, 118);
+ _gameBoardSide[3]._outpostStation[5]._stationPos = Common::Point(63, 118);
+ _gameBoardSide[3]._outpostStation[6]._stationPos = Common::Point(37, 118);
+ _gameBoardSide[3]._outpostStation[7]._stationPos = Common::Point(37, 92);
+
+ _gameBoardSide[3]._delayCard._stationPos = Common::Point(37, 145);
+
+ _gameBoardSide[3]._emptyStationPos._stationPos = Common::Point(63, 92);
+
+ _gameBoardSide[3]._card1Pos = Common::Point(14, 14);
+ _gameBoardSide[3]._card2Pos = Common::Point(14, 36);
+ _gameBoardSide[3]._card3Pos = Common::Point(14, 58);
+ _gameBoardSide[3]._card4Pos = Common::Point(14, 80);
+ _gameBoardSide[3]._frameNum = 3;
+
+ _gameBoardSide[0]._handCard[0]._stationPos = Common::Point(280, 5);
+ _gameBoardSide[0]._handCard[1]._stationPos = Common::Point(253, 5);
+ _gameBoardSide[0]._handCard[2]._stationPos = Common::Point(226, 5);
+ _gameBoardSide[0]._handCard[3]._stationPos = Common::Point(199, 5);
+
+ _gameBoardSide[0]._outpostStation[0]._stationPos = Common::Point(171, 16);
+ _gameBoardSide[0]._outpostStation[1]._stationPos = Common::Point(171, 42);
+ _gameBoardSide[0]._outpostStation[2]._stationPos = Common::Point(171, 68);
+ _gameBoardSide[0]._outpostStation[3]._stationPos = Common::Point(145, 68);
+ _gameBoardSide[0]._outpostStation[4]._stationPos = Common::Point(119, 68);
+ _gameBoardSide[0]._outpostStation[5]._stationPos = Common::Point(119, 42);
+ _gameBoardSide[0]._outpostStation[6]._stationPos = Common::Point(119, 16);
+ _gameBoardSide[0]._outpostStation[7]._stationPos = Common::Point(145, 16);
+
+ _gameBoardSide[0]._delayCard._stationPos = Common::Point(91, 16);
+
+ _gameBoardSide[0]._emptyStationPos._stationPos = Common::Point(145, 42);
+
+ _gameBoardSide[0]._card1Pos = Common::Point(280, 5);
+ _gameBoardSide[0]._card2Pos = Common::Point(253, 5);
+ _gameBoardSide[0]._card3Pos = Common::Point(226, 5);
+ _gameBoardSide[0]._card4Pos = Common::Point(199, 5);
+ _gameBoardSide[0]._frameNum = 2;
+
+ _gameBoardSide[1]._handCard[0]._stationPos = Common::Point(283, 146);
+ _gameBoardSide[1]._handCard[1]._stationPos = Common::Point(283, 124);
+ _gameBoardSide[1]._handCard[2]._stationPos = Common::Point(283, 102);
+ _gameBoardSide[1]._handCard[3]._stationPos = Common::Point(283, 80);
+
+ _gameBoardSide[1]._outpostStation[0]._stationPos = Common::Point(253, 122);
+ _gameBoardSide[1]._outpostStation[1]._stationPos = Common::Point(227, 122);
+ _gameBoardSide[1]._outpostStation[2]._stationPos = Common::Point(201, 122);
+ _gameBoardSide[1]._outpostStation[3]._stationPos = Common::Point(201, 96);
+ _gameBoardSide[1]._outpostStation[4]._stationPos = Common::Point(201, 70);
+ _gameBoardSide[1]._outpostStation[5]._stationPos = Common::Point(227, 70);
+ _gameBoardSide[1]._outpostStation[6]._stationPos = Common::Point(253, 70);
+ _gameBoardSide[1]._outpostStation[7]._stationPos = Common::Point(253, 96);
+
+ _gameBoardSide[1]._delayCard._stationPos = Common::Point(253, 43);
+
+ _gameBoardSide[1]._emptyStationPos._stationPos = Common::Point(227, 96);
+
+ _gameBoardSide[1]._card1Pos = Common::Point(283, 146);
+ _gameBoardSide[1]._card2Pos = Common::Point(283, 124);
+ _gameBoardSide[1]._card3Pos = Common::Point(283, 102);
+ _gameBoardSide[1]._card4Pos = Common::Point(283, 80);
+ _gameBoardSide[1]._frameNum = 4;
+
+ subPostInit();
+
+ _stockPile.postInit();
+}
+
+void Scene1337::remove() {
+ if (R2_GLOBALS._v57709 > 1) {
+ subD1917();
+ subD1940(false);
+ }
+
+ R2_GLOBALS._uiElements._active = true;
+ R2_GLOBALS._uiElements._visible = true;
+ SceneExt::remove();
+}
+
+void Scene1337::process(Event &event) {
+ if (event.eventType == EVENT_BUTTON_DOWN) {
+ if (event.btnState == BTNSHIFT_RIGHT) {
+ updateCursorId(R2_GLOBALS._mouseCursorId, true);
+ event.handled = true;
+ } else if (_delayedFunction) {
+ FunctionPtrType tmpFctPtr = _delayedFunction;
+ _delayedFunction = nullptr;
+ (this->*tmpFctPtr)();
+ event.handled = true;
+ }
+ } else if (event.eventType == EVENT_KEYPRESS) {
+ if (event.kbd.keycode == Common::KEYCODE_SPACE) {
+ if (_delayedFunction) {
+ FunctionPtrType tmpFctPtr = _delayedFunction;
+ _delayedFunction = nullptr;
+ (this->*tmpFctPtr)();
+ event.handled = true;
+ }
+ } else
+ warning("Fixme: Find proper keycode value");
+ }
+
+ if (!event.handled)
+ Scene::process(event);
+}
+
+void Scene1337::dispatch() {
+ if (!_instructionsDisplayedFl) {
+ ++_instructionsWaitCount;
+ if (_instructionsWaitCount == 4) {
+ _instructionsDisplayedFl = true;
+ suggestInstructions();
+ }
+ }
+
+ // The following code is in the original in sceneHandler::process(),
+ // which is terrible as it's checked in every scene of the game.
+ setCursorData(5, _cursorCurStrip, _cursorCurFrame);
+ //
+
+ Scene::dispatch();
+}
+
+void Scene1337::actionDisplay(int resNum, int lineNum, int x, int y, int keepOnScreen, int width, int textMode, int fontNum, int colFG, int colBGExt, int colFGExt) {
+ // TODO: Check if it's normal that arg5 is unused and replaced by an hardcoded 0 value
+ // May hide an original bug
+
+ SceneItem::display(resNum, lineNum, SET_X, x, SET_Y, y, SET_KEEP_ONSCREEN, 0,
+ SET_WIDTH, width, SET_POS_MODE, -1, SET_TEXT_MODE, textMode,
+ SET_FONT, fontNum, SET_FG_COLOR, colFG, SET_EXT_BGCOLOR, colBGExt,
+ SET_EXT_FGCOLOR, colFGExt, LIST_END);
+}
+
+void Scene1337::setAnimationInfo(Card *card) {
+ if (!card)
+ return;
+
+ if (card->_cardId > 25) {
+ card->_card.setStrip2(4);
+ card->_card.setFrame(card->_cardId - 25);
+ } else if (card->_cardId > 9) {
+ card->_card.setStrip2(3);
+ card->_card.setFrame(card->_cardId - 9);
+ } else {
+ card->_card.setStrip2(2);
+ card->_card.setFrame(card->_cardId);
+ }
+
+ card->_card.show();
+ R2_GLOBALS._sceneObjects->draw();
+}
+
+void Scene1337::handleNextTurn() {
+ switch (_winnerId) {
+ case -1:
+ ++_currentPlayerNumb;
+ if (_currentPlayerNumb > 3)
+ _currentPlayerNumb = 0;
+
+ if (_showPlayerTurn) {
+ _currentPlayerArrow.show();
+ switch (_currentPlayerNumb) {
+ case 0:
+ _currentPlayerArrow.setStrip(3);
+ break;
+ case 1:
+ _currentPlayerArrow.setStrip(4);
+ break;
+ case 2:
+ subD1975(174, 107);
+ _currentPlayerArrow.setStrip(1);
+ break;
+ case 3:
+ subC4CEC();
+ _currentPlayerArrow.setStrip(2);
+ break;
+ default:
+ break;
+ }
+
+ if (!_autoplay)
+ _delayedFunction = &Scene1337::handlePlayerTurn;
+ else
+ handlePlayerTurn();
+ } else {
+ handlePlayerTurn();
+ }
+ break;
+ case 0:
+ _aSound2.play(62);
+ actionDisplay(1330, 135, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ actionDisplay(1330, 121, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ actionDisplay(1330, 122, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ R2_GLOBALS._sceneObjects->draw();
+ actionDisplay(1330, 123, 159, 134, 1, 200, 0, 7, 0, 105, 105);
+ break;
+ case 1:
+ _aSound2.play(62);
+ actionDisplay(1330, 151, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ actionDisplay(1330, 118, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ actionDisplay(1330, 119, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ R2_GLOBALS._sceneObjects->draw();
+ actionDisplay(1330, 120, 159, 134, 1, 200, 0, 7, 0, 105, 105);
+ break;
+ case 2:
+ _aSound2.play(62);
+ actionDisplay(1330, 134, 159, 134, 1, 200, 0, 7, 0, 105, 105);
+ actionDisplay(1330, 124, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ actionDisplay(1330, 126, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ R2_GLOBALS._sceneObjects->draw();
+ actionDisplay(1330, 125, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ break;
+ case 3:
+ _aSound2.play(62);
+ actionDisplay(1330, 150, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ actionDisplay(1330, 115, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ actionDisplay(1330, 116, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ R2_GLOBALS._sceneObjects->draw();
+ actionDisplay(1330, 117, 159, 134, 1, 200, 0, 7, 0, 105, 105);
+ break;
+ default:
+ break;
+ }
+
+ if (_winnerId != -1)
+ R2_GLOBALS._sceneManager.changeScene(125);
+
+}
+
+void Scene1337::handlePlayerTurn() {
+ if (_showPlayerTurn)
+ _currentPlayerArrow.hide();
+
+ switch (_currentPlayerNumb) {
+ case 2:
+ subC4CD2();
+ if (_displayHelpFl)
+ actionDisplay(1330, 114, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ _displayHelpFl = false;
+ // No break on purpose
+ case 0:
+ // No break on purpose
+ case 1:
+ // No break on purpose
+ case 3:
+ _actionItem.setAction(&_action4);
+ default:
+ break;
+ }
+
+ _showPlayerTurn = true;
+
+}
+
+bool Scene1337::isStationCard(int cardId) {
+ switch (cardId) {
+ case 10:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 17:
+ // No break on purpose
+ case 18:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 20:
+ // No break on purpose
+ case 21:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool Scene1337::isStopConstructionCard(int cardId) {
+ switch (cardId) {
+ case 11:
+ // No break on purpose
+ case 14:
+ // No break on purpose
+ case 16:
+ // No break on purpose
+ case 24:
+ return true;
+ default:
+ return false;
+ }
+}
+
+int Scene1337::getStationId(int playerId, int handCardId) {
+ if ((_gameBoardSide[playerId]._handCard[handCardId]._cardId > 1) && (_gameBoardSide[playerId]._handCard[handCardId]._cardId <= 9))
+ return handCardId;
+
+ return -1;
+}
+
+int Scene1337::findPlatformCardInHand(int playerId) {
+ for (int i = 0; i <= 3; i++) {
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 1)
+ return i;
+ }
+
+ return -1;
+}
+
+int Scene1337::findMeteorCardInHand(int playerId) {
+ for (int i = 0; i <= 3; i++) {
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 13)
+ return i;
+ }
+
+ return -1;
+}
+
+int Scene1337::findThieftCardInHand(int playerId) {
+ for (int i = 0; i <= 3; i++) {
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 25)
+ return i;
+ }
+
+ return -1;
+}
+
+int Scene1337::isDelayCard(int cardId) {
+ switch (cardId) {
+ case 11:
+ // No break on purpose
+ case 14:
+ // No break on purpose
+ case 16:
+ // No break on purpose
+ case 24:
+ return cardId;
+ break;
+ default:
+ return -1;
+ break;
+ }
+}
+
+int Scene1337::getStationCardId(int cardId) {
+ switch (cardId) {
+ case 10:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 17:
+ // No break on purpose
+ case 18:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 20:
+ // No break on purpose
+ case 21:
+ return cardId;
+ default:
+ return -1;
+ }
+}
+
+void Scene1337::handlePlayer01Discard(int playerId) {
+ switch (playerId) {
+ case 0:
+ for (int i = 0; i <= 3; i++) {
+ if (getStationCardId(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ if (isDelayCard(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Outpost Card
+ if ((_gameBoardSide[playerId]._handCard[i]._cardId > 1) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 9)) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ if ((_gameBoardSide[playerId]._handCard[i]._cardId >= 26) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 33)) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Station Card
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 1) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Thief card
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 25) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Meteor Card
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 13) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+ break;
+ case 1:
+ for (int i = 0; i <= 3; i++) {
+ if ((_gameBoardSide[playerId]._handCard[i]._cardId >= 26) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 33)) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Station Card
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 1) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Outpost Card
+ if ((_gameBoardSide[playerId]._handCard[i]._cardId > 1) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 9)) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ if (getStationCardId(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ if (isDelayCard(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Thief card
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 25) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ // Meteor Card
+ if (_gameBoardSide[playerId]._handCard[i]._cardId == 13) {
+ discardCard(&_gameBoardSide[playerId]._handCard[i]);
+ return;
+ }
+ }
+
+ break;
+ default:
+ break;
+ }
+}
+
+void Scene1337::playThieftCard(int playerId, Card *card, int victimId) {
+ _actionPlayerIdx = playerId;
+ _actionVictimIdx = victimId;
+
+ int randIndx;
+
+ for (;;) {
+ randIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
+ if (_gameBoardSide[victimId]._handCard[randIndx]._cardId != 0)
+ break;
+ }
+
+ _actionCard1 = card;
+ _actionCard2 = &_gameBoardSide[victimId]._emptyStationPos;
+ _actionCard3 = &_gameBoardSide[victimId]._handCard[randIndx];
+
+ _actionItem.setAction(&_action11);
+}
+
+int Scene1337::getPreventionCardId(int cardId) {
+ int retVal;
+
+ switch (cardId) {
+ case 10:
+ retVal = 2;
+ break;
+ case 12:
+ retVal = 3;
+ break;
+ case 15:
+ retVal = 5;
+ break;
+ case 17:
+ retVal = 9;
+ break;
+ case 18:
+ retVal = 6;
+ break;
+ case 19:
+ retVal = 4;
+ break;
+ case 20:
+ retVal = 8;
+ break;
+ case 21:
+ retVal = 7;
+ break;
+ default:
+ retVal = -1;
+ }
+
+ return retVal;
+}
+
+bool Scene1337::isAttackPossible(int victimId, int cardId) {
+ if (victimId < 0 || victimId >= ARRAYSIZE(_gameBoardSide))
+ error("Scene1337::isAttackPossible() victimId:%d out of range 0 to %d", victimId, ARRAYSIZE(_gameBoardSide)-1);
+
+ for (int i = 0; i <= 7; i++) {
+ if (_gameBoardSide[victimId]._outpostStation[i]._cardId != 0) {
+ if (getPreventionCardId(cardId) == _gameBoardSide[victimId]._outpostStation[i]._cardId)
+ return false;
+ }
+ }
+ return true;
+}
+
+int Scene1337::getPlayerWithOutpost(int playerId) {
+ int randPlayerId = R2_GLOBALS._randomSource.getRandomNumber(3);
+
+ for (int i = 0; i <= 3; i++) {
+ if (randPlayerId != playerId) {
+ for (int j = 0; j <= 7; j++) {
+ if (_gameBoardSide[randPlayerId]._outpostStation[j]._cardId != 0)
+ return randPlayerId;
+ }
+ }
+
+ if (playerId == 1) {
+ randPlayerId--;
+ if (randPlayerId < 0)
+ randPlayerId = 3;
+ } else {
+ ++randPlayerId;
+ if (randPlayerId > 3)
+ randPlayerId = 0;
+ }
+ }
+
+ return -1;
+}
+
+bool Scene1337::checkAntiDelayCard(int delayCardId, int cardId) {
+ if ((delayCardId == 11) && (cardId == 26)) // Diplomacy
+ return true;
+
+ if ((delayCardId == 14) && (cardId == 30)) // Cure
+ return true;
+
+ if ((delayCardId == 16) && (cardId == 32)) // Agreement
+ return true;
+
+ if ((delayCardId == 24) && (cardId == 28)) // Innovation
+ return true;
+
+ return false;
+}
+
+void Scene1337::playStationCard(Card *station, Card *platform) {
+ _actionCard1 = station;
+ _actionCard2 = platform;
+ _actionItem.setAction(&_action7);
+}
+
+int Scene1337::getRandomCardFromHand(int playerId) {
+ if ( (_gameBoardSide[playerId]._handCard[0]._cardId == 0)
+ && (_gameBoardSide[playerId]._handCard[1]._cardId == 0)
+ && (_gameBoardSide[playerId]._handCard[2]._cardId == 0)
+ && (_gameBoardSide[playerId]._handCard[3]._cardId == 0))
+ return -1;
+
+ int randIndx;
+ for (;;) {
+ randIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
+ if (_gameBoardSide[playerId]._handCard[randIndx]._cardId != 0)
+ break;
+ }
+
+ return randIndx;
+}
+
+void Scene1337::playPlatformCard(Card *card, Card *dest) {
+ _actionCard1 = card;
+ _actionCard2 = dest;
+
+ _actionItem.setAction(&_action6);
+}
+
+void Scene1337::playDelayCard(Card *card, Card *dest) {
+ _actionCard1 = card;
+ _actionCard2 = dest;
+
+ _actionItem.setAction(&_action9);
+}
+
+void Scene1337::playAntiDelayCard(Card *card, Card *dest) {
+ _actionCard1 = card;
+ _actionCard2 = dest;
+
+ _actionItem.setAction(&_action8);
+
+ // WORKAROUND: Restore the default cursor and for a call to signal.
+ // This works around the cursor caching we got rid of, and avoid
+ // the game ends in an eternal loop when a player reacts to another player
+ // attack.
+ setCursorData(5, 1, 4);
+ signal();
+}
+
+
+Scene1337::Card *Scene1337::getStationCard(int playerId) {
+ for (int i = 0; i <= 7; i++) {
+ if ((_gameBoardSide[playerId]._outpostStation[i]._cardId >= 1) && (_gameBoardSide[playerId]._outpostStation[i]._cardId <= 9))
+ return &_gameBoardSide[playerId]._outpostStation[i];
+ }
+
+ return nullptr;
+}
+
+void Scene1337::playCentralOutpostCard(Card *card, int playerId) {
+ _actionCard1 = card;
+ _actionCard2 = getStationCard(playerId);
+ _actionCard3 = &_gameBoardSide[playerId]._emptyStationPos;
+ _actionPlayerIdx = playerId;
+ _actionItem.setAction(&_action10);
+}
+
+void Scene1337::discardCard(Card *card) {
+ _actionCard1 = card;
+
+ _actionItem.setAction(&_action5);
+}
+
+void Scene1337::subC4CD2() {
+ if (R2_GLOBALS._v57709 > 0) {
+ subD1917();
+ subD1940(false); // _v5780C--
+ }
+}
+
+void Scene1337::subC4CEC() {
+ if (R2_GLOBALS._v57709 == 0) {
+ subD18F5();
+ subD1940(true); // _v5780C++
+ }
+}
+
+// Play Interceptor card
+void Scene1337::playInterceptorCard(Card *subObj1, Card *subObj2) {
+ _actionCard1 = subObj1;
+ _actionCard2 = subObj2;
+
+ _actionItem.setAction(&_action13);
+}
+
+void Scene1337::displayDialog(int dialogNumb) {
+ switch (dialogNumb - 1) {
+ case 0:
+ actionDisplay(1330, 53, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 1:
+ actionDisplay(1330, 57, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 2:
+ actionDisplay(1330, 58, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 3:
+ actionDisplay(1330, 59, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 4:
+ actionDisplay(1330, 60, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 5:
+ actionDisplay(1330, 61, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 6:
+ actionDisplay(1330, 62, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 7:
+ actionDisplay(1330, 63, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 8:
+ actionDisplay(1330, 64, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 9:
+ actionDisplay(1330, 65, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 10:
+ actionDisplay(1330, 67, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 11:
+ actionDisplay(1330, 69, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 12:
+ actionDisplay(1330, 71, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ actionDisplay(1330, 72, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ actionDisplay(1330, 73, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 13:
+ actionDisplay(1330, 79, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 14:
+ actionDisplay(1330, 81, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 83, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 16:
+ actionDisplay(1330, 85, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 17:
+ actionDisplay(1330, 87, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 18:
+ actionDisplay(1330, 89, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 19:
+ actionDisplay(1330, 91, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 93, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 23:
+ actionDisplay(1330, 95, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 24:
+ actionDisplay(1330, 97, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 25:
+ actionDisplay(1330, 104, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 26:
+ actionDisplay(1330, 105, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ actionDisplay(1330, 106, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 27:
+ actionDisplay(1330, 110, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 28:
+ actionDisplay(1330, 108, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ actionDisplay(1330, 109, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 29:
+ actionDisplay(1330, 111, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 31:
+ actionDisplay(1330, 112, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+}
+
+void Scene1337::subPostInit() {
+ R2_GLOBALS._v57709 = 0;
+ R2_GLOBALS._v5780C = 0;
+ updateCursorId(1, false);
+ subD1940(true); // _v5780C++
+ subD18F5();
+
+// loadScene(1330);
+// SceneExt::postInit();
+
+ R2_GLOBALS._scenePalette.addRotation(224, 235, 1);
+
+ _availableCardsPile[0] = 1;
+ _availableCardsPile[1] = 1;
+ _availableCardsPile[2] = 1;
+ _availableCardsPile[3] = 1;
+ _availableCardsPile[4] = 1;
+ _availableCardsPile[5] = 1;
+ _availableCardsPile[6] = 1;
+ _availableCardsPile[7] = 1;
+ _availableCardsPile[8] = 26;
+ _availableCardsPile[9] = 2;
+ _availableCardsPile[10] = 2;
+ _availableCardsPile[11] = 2;
+ _availableCardsPile[12] = 2;
+ _availableCardsPile[13] = 2;
+ _availableCardsPile[14] = 26;
+ _availableCardsPile[15] = 3;
+ _availableCardsPile[16] = 3;
+ _availableCardsPile[17] = 3;
+ _availableCardsPile[18] = 3;
+ _availableCardsPile[19] = 3;
+ _availableCardsPile[20] = 28;
+ _availableCardsPile[21] = 4;
+ _availableCardsPile[22] = 4;
+ _availableCardsPile[23] = 4;
+ _availableCardsPile[24] = 4;
+ _availableCardsPile[25] = 4;
+ _availableCardsPile[26] = 28;
+ _availableCardsPile[27] = 5;
+ _availableCardsPile[28] = 5;
+ _availableCardsPile[29] = 5;
+ _availableCardsPile[30] = 5;
+ _availableCardsPile[31] = 5;
+ _availableCardsPile[32] = 30;
+ _availableCardsPile[33] = 6;
+ _availableCardsPile[34] = 6;
+ _availableCardsPile[35] = 6;
+ _availableCardsPile[36] = 6;
+ _availableCardsPile[37] = 6;
+ _availableCardsPile[38] = 30;
+ _availableCardsPile[39] = 7;
+ _availableCardsPile[40] = 7;
+ _availableCardsPile[41] = 7;
+ _availableCardsPile[42] = 7;
+ _availableCardsPile[43] = 7;
+ _availableCardsPile[44] = 32;
+ _availableCardsPile[45] = 8;
+ _availableCardsPile[46] = 8;
+ _availableCardsPile[47] = 8;
+ _availableCardsPile[48] = 8;
+ _availableCardsPile[49] = 8;
+ _availableCardsPile[50] = 32;
+ _availableCardsPile[51] = 9;
+ _availableCardsPile[52] = 9;
+ _availableCardsPile[53] = 9;
+ _availableCardsPile[54] = 9;
+ _availableCardsPile[55] = 9;
+ _availableCardsPile[56] = 10;
+ _availableCardsPile[57] = 11;
+ _availableCardsPile[58] = 12;
+ _availableCardsPile[59] = 13;
+ _availableCardsPile[60] = 13;
+ _availableCardsPile[61] = 14;
+ _availableCardsPile[62] = 15;
+ _availableCardsPile[63] = 16;
+ _availableCardsPile[64] = 17;
+ _availableCardsPile[65] = 18;
+ _availableCardsPile[66] = 19;
+ _availableCardsPile[67] = 20;
+ _availableCardsPile[68] = 21;
+ _availableCardsPile[69] = 26;
+ _availableCardsPile[70] = 28;
+ _availableCardsPile[71] = 24;
+ _availableCardsPile[72] = 25;
+ _availableCardsPile[73] = 25;
+ _availableCardsPile[74] = 25;
+ _availableCardsPile[75] = 25;
+ _availableCardsPile[76] = 26;
+ _availableCardsPile[77] = 26;
+ _availableCardsPile[78] = 26;
+ _availableCardsPile[79] = 27;
+ _availableCardsPile[80] = 27;
+ _availableCardsPile[81] = 28;
+ _availableCardsPile[82] = 28;
+ _availableCardsPile[83] = 28;
+ _availableCardsPile[84] = 29;
+ _availableCardsPile[85] = 29;
+ _availableCardsPile[86] = 29;
+ _availableCardsPile[87] = 30;
+ _availableCardsPile[88] = 30;
+ _availableCardsPile[89] = 30;
+ _availableCardsPile[90] = 30;
+ _availableCardsPile[91] = 32;
+ _availableCardsPile[92] = 1;
+ _availableCardsPile[93] = 32;
+ _availableCardsPile[94] = 32;
+ _availableCardsPile[95] = 32;
+ _availableCardsPile[96] = 1;
+ _availableCardsPile[97] = 1;
+ _availableCardsPile[98] = 1;
+ _availableCardsPile[99] = 0;
+
+ _cardsAvailableNumb = 98;
+ _currentDiscardIndex = 98; // CHECKME: Would make more sense at pos 99
+
+ _discardPile._cardId = 0;
+ _discardPile._stationPos = Common::Point(128, 95);
+
+ _stockCard._cardId = 0;
+ _stockCard._stationPos = Common::Point(162, 95);
+
+ _selectedCard._cardId = 0;
+
+ _animatedCard._card.postInit();
+ _animatedCard._card.setVisage(1332);
+ _animatedCard._card.setStrip(5);
+ _animatedCard._card.setFrame(1);
+ _animatedCard._card._moveDiff = Common::Point(10, 10);
+ _animatedCard._card.fixPriority(400);
+ _animatedCard._card.setPosition(Common::Point(128, 95), 0);
+ _animatedCard._card.animate(ANIM_MODE_2, NULL);
+ _animatedCard._card.hide();
+
+ _currentPlayerArrow.postInit();
+ _currentPlayerArrow.setVisage(1334);
+ _currentPlayerArrow.setStrip(1);
+ _currentPlayerArrow.setFrame(1);
+ _currentPlayerArrow._numFrames = 12;
+ _currentPlayerArrow.fixPriority(500);
+ _currentPlayerArrow.setPosition(Common::Point(174, 107), 0);
+ _currentPlayerArrow.animate(ANIM_MODE_2, NULL);
+ _currentPlayerArrow.hide();
+
+ _showPlayerTurn = true;
+ _displayHelpFl = false;
+ _winnerId = -1;
+
+ _helpIcon.postInit();
+ _helpIcon.setup(9531, 1, 1);
+ _helpIcon.setPosition(Common::Point(249, 168));
+ _helpIcon.setPriority(155);
+ _helpIcon._effect = EFFECT_NONE;
+ _helpIcon.show();
+
+ _autoplay = false;
+ _instructionsDisplayedFl = false;
+ _instructionsWaitCount = 0;
+}
+
+void Scene1337::suggestInstructions() {
+ if (R2_GLOBALS._v57709 > 0)
+ subD1917();
+
+ if (MessageDialog::show(NEED_INSTRUCTIONS, NO_MSG, YES_MSG) == 0) {
+ if (R2_GLOBALS._v57709 == 0)
+ subD18F5();
+ dealCards();
+ } else {
+ if (R2_GLOBALS._v57709 == 0)
+ subD18F5();
+ displayInstructions();
+ }
+}
+
+void Scene1337::displayInstructions() {
+ _actionItem.setAction(&_action1);
+}
+
+void Scene1337::shuffleCards() {
+ R2_GLOBALS._sceneObjects->draw();
+
+ // Remove holes in card pile
+ for (int i = 0; i <= 98; i++) {
+ if (_availableCardsPile[i] == 0) {
+ for (int j = i + 1; j <= 98; j ++) {
+ if (_availableCardsPile[j] != 0) {
+ _availableCardsPile[i] = _availableCardsPile[j];
+ _availableCardsPile[j] = 0;
+ break;
+ }
+ }
+ }
+ }
+
+ // Compute the number of available cards
+ for (int i = 0; i <= 99; i ++) {
+ if (_availableCardsPile[i] == 0) {
+ // CHECKME: This will fail if i == 0, which shouldn't happen
+ // as we don't shuffle cards when no card is available.
+ _cardsAvailableNumb = i - 1;
+ _currentDiscardIndex = 98; // CHECKME: Would make more sense at pos 99
+ break;
+ }
+ }
+
+ for (int i = 0; i < 2000; i ++) {
+ int randIndx = R2_GLOBALS._randomSource.getRandomNumber(_cardsAvailableNumb);
+ int swap = _availableCardsPile[0];
+ _availableCardsPile[0] = _availableCardsPile[randIndx];
+ _availableCardsPile[randIndx] = swap;
+ }
+
+ _shuffleEndedFl = false;
+
+ // Shuffle cards
+ _animatedCard._card.setAction(&_action2);
+
+ while(!_shuffleEndedFl && !g_vm->shouldQuit()) {
+ g_globals->_sceneObjects->recurse(SceneHandler::dispatchObject);
+ g_globals->_scenePalette.signalListeners();
+ R2_GLOBALS._sceneObjects->draw();
+ g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
+ }
+}
+
+void Scene1337::dealCards() {
+ _animatedCard._card._moveDiff = Common::Point(30, 30);
+ shuffleCards();
+
+ // Deal cards
+ _actionItem.setAction(&_action3);
+}
+
+void Scene1337::showOptionsDialog() {
+ // Display menu with "Auto Play", "New Game", "Quit" and "Continue"
+ OptionsDialog::show();
+}
+
+void Scene1337::handleClick(int arg1, Common::Point pt) {
+ int curReg = R2_GLOBALS._sceneRegions.indexOf(g_globals->_events._mousePos);
+
+ if (arg1 == 3) {
+ bool found = false;
+ int i;
+ for (i = 0; i <= 7; i++) {
+ if ( _gameBoardSide[2]._outpostStation[i].isIn(pt)
+ || _gameBoardSide[0]._outpostStation[i].isIn(pt)
+ || _gameBoardSide[1]._outpostStation[i].isIn(pt)
+ || _gameBoardSide[3]._outpostStation[i].isIn(pt) ) {
+ found = true;
+ break;
+ }
+ }
+
+ if (found) {
+ switch (curReg) {
+ case 5:
+ if (_gameBoardSide[2]._outpostStation[i]._cardId != 0)
+ displayDialog(_gameBoardSide[2]._outpostStation[i]._cardId);
+ else
+ actionDisplay(1330, 20, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 10:
+ if (_gameBoardSide[3]._outpostStation[i]._cardId != 0)
+ displayDialog(_gameBoardSide[3]._outpostStation[i]._cardId);
+ else
+ actionDisplay(1330, 22, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ if (_gameBoardSide[0]._outpostStation[i]._cardId != 0)
+ displayDialog(_gameBoardSide[0]._outpostStation[i]._cardId);
+ else
+ actionDisplay(1330, 21, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ if (_gameBoardSide[1]._outpostStation[i]._cardId != 0)
+ displayDialog(_gameBoardSide[1]._outpostStation[i]._cardId);
+ else
+ actionDisplay(1330, 23, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else if ( _gameBoardSide[2]._delayCard.isIn(pt)
+ || _gameBoardSide[0]._delayCard.isIn(pt)
+ || _gameBoardSide[1]._delayCard.isIn(pt)
+ || _gameBoardSide[3]._delayCard.isIn(pt) ) {
+ switch (curReg) {
+ case 5:
+ if (_gameBoardSide[2]._delayCard._cardId != 0)
+ displayDialog(_gameBoardSide[2]._delayCard._cardId);
+ else
+ actionDisplay(1330, 10, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 10:
+ if (_gameBoardSide[3]._delayCard._cardId != 0)
+ displayDialog(_gameBoardSide[3]._delayCard._cardId);
+ else
+ actionDisplay(1330, 16, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ if (_gameBoardSide[0]._delayCard._cardId != 0)
+ displayDialog(_gameBoardSide[0]._delayCard._cardId);
+ else
+ actionDisplay(1330, 13, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ if (_gameBoardSide[1]._delayCard._cardId != 0)
+ displayDialog(_gameBoardSide[1]._delayCard._cardId);
+ else
+ actionDisplay(1330, 18, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else if (_discardPile.isIn(pt)) {
+ if (_discardPile._cardId != 0)
+ displayDialog(_discardPile._cardId);
+ else
+ actionDisplay(1330, 7, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (_helpIcon._bounds.contains(pt))
+ actionDisplay(1330, 43, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else if (_stockCard.isIn(pt))
+ actionDisplay(1330, 4, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else if ( (_gameBoardSide[2]._emptyStationPos.isIn(pt))
+ || (_gameBoardSide[3]._emptyStationPos.isIn(pt))
+ || (_gameBoardSide[0]._emptyStationPos.isIn(pt))
+ || (_gameBoardSide[1]._emptyStationPos.isIn(pt)) )
+ actionDisplay(1330, 32, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else if (_gameBoardSide[2]._handCard[0].isIn(pt))
+ displayDialog(_gameBoardSide[2]._handCard[0]._cardId);
+ else if (_gameBoardSide[2]._handCard[1].isIn(pt))
+ displayDialog(_gameBoardSide[2]._handCard[1]._cardId);
+ else if (_gameBoardSide[2]._handCard[2].isIn(pt))
+ displayDialog(_gameBoardSide[2]._handCard[2]._cardId);
+ else if (_gameBoardSide[2]._handCard[3].isIn(pt))
+ displayDialog(_gameBoardSide[2]._handCard[3]._cardId);
+ else if ((curReg >= 6) && (curReg <= 9))
+ actionDisplay(1330, 29, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else if ((curReg >= 11) && (curReg <= 14))
+ actionDisplay(1330, 31, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else if ((curReg >= 16) && (curReg <= 19))
+ actionDisplay(1330, 30, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else {
+ switch (curReg) {
+ case 0:
+ actionDisplay(1330, 2, 159, 134, 1, 200, 0, 7, 0, 105, 105);
+ break;
+ case 5:
+ actionDisplay(1330, 25, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 10:
+ actionDisplay(1330, 27, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 26, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 28, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 21:
+ actionDisplay(1330, 24, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ if (arg1 != 1)
+ return;
+
+ for (int i = 0; i <= 7; i++) {
+ if (_gameBoardSide[2]._outpostStation[i].isIn(pt)) {
+ switch (_gameBoardSide[2]._outpostStation[i]._cardId) {
+ case 0:
+ actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 1:
+ actionDisplay(1330, 54, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ }
+ return;
+ }
+ if (_gameBoardSide[0]._outpostStation[i].isIn(pt)) {
+ switch (_gameBoardSide[0]._outpostStation[i]._cardId) {
+ case 0:
+ actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ }
+ return;
+ }
+ if (_gameBoardSide[1]._outpostStation[i].isIn(pt)) {
+ switch (_gameBoardSide[1]._outpostStation[i]._cardId) {
+ case 0:
+ actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ break;
+ default:
+ actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ break;
+ }
+ return;
+ }
+ if (_gameBoardSide[3]._outpostStation[i].isIn(pt)) {
+ switch (_gameBoardSide[3]._outpostStation[i]._cardId) {
+ case 0:
+ actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ break;
+ default:
+ actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ break;
+ }
+ return;
+ }
+ }
+
+ if (_gameBoardSide[2]._delayCard.isIn(pt)) {
+ // The original uses _gameBoardSide[0], which is obviously a bug.
+ if (_gameBoardSide[2]._delayCard._cardId != 0)
+ actionDisplay(1330, 39, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else
+ actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ return;
+ }
+ if (_gameBoardSide[3]._delayCard.isIn(pt)) {
+ if (_gameBoardSide[3]._delayCard._cardId != 0)
+ actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ else
+ actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+
+ return;
+ }
+ if (_gameBoardSide[1]._delayCard.isIn(pt)) {
+ if (_gameBoardSide[1]._delayCard._cardId != 0)
+ actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ else
+ actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+
+ return;
+ }
+ if (_gameBoardSide[0]._delayCard.isIn(pt)) {
+ if (_gameBoardSide[0]._delayCard._cardId != 0)
+ actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else
+ actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+
+ return;
+ }
+ if (_gameBoardSide[3]._emptyStationPos.isIn(pt)) {
+ actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ return;
+ }
+ if (_gameBoardSide[1]._emptyStationPos.isIn(pt)) {
+ actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ return;
+ }
+ if (_gameBoardSide[0]._emptyStationPos.isIn(pt)) {
+ actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ return;
+ }
+
+ if (_helpIcon._bounds.contains(pt)) {
+ showOptionsDialog();
+ return;
+ }
+
+ if (_discardPile.isIn(pt))
+ actionDisplay(1330, 9, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else if (_stockCard.isIn(pt))
+ actionDisplay(1330, 5, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ else {
+ switch (curReg) {
+ case 0:
+ actionDisplay(1330, 3, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 6:
+ // no break on purpose
+ case 7:
+ // no break on purpose
+ case 8:
+ // no break on purpose
+ case 9:
+ actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ break;
+ case 10:
+ actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
+ break;
+ case 11:
+ // no break on purpose
+ case 12:
+ // no break on purpose
+ case 13:
+ // no break on purpose
+ case 14:
+ actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 16:
+ // no break on purpose
+ case 17:
+ // no break on purpose
+ case 18:
+ // no break on purpose
+ case 19:
+ actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ break;
+ case 20:
+ actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
+ break;
+ default:
+ actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ }
+ }
+}
+
+void Scene1337::handlePlayer0() {
+ if (_gameBoardSide[0]._delayCard._cardId != 0) {
+ switch (_gameBoardSide[0]._delayCard._cardId) {
+ case 10:
+ //No break on purpose
+ case 12:
+ //No break on purpose
+ case 15:
+ //No break on purpose
+ case 17:
+ //No break on purpose
+ case 18:
+ //No break on purpose
+ case 19:
+ //No break on purpose
+ case 20:
+ //No break on purpose
+ case 21:
+ discardCard(&_gameBoardSide[0]._delayCard);
+ return;
+ default:
+ for (int i = 0; i <= 3; i++) {
+ if (checkAntiDelayCard(_gameBoardSide[0]._delayCard._cardId, _gameBoardSide[0]._handCard[i]._cardId)) {
+ playAntiDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[0]._delayCard);
+ return;
+ }
+ }
+
+ break;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ int tmpVal = getStationId(0, i);
+
+ if (tmpVal != -1) {
+ bool stationAlreadyPresentFl = false;
+ for (int j = 0; j <= 7; j++) {
+ if (_gameBoardSide[0]._outpostStation[j]._cardId == _gameBoardSide[0]._handCard[tmpVal]._cardId) {
+ stationAlreadyPresentFl = true;
+ break;
+ }
+ }
+
+ if (!stationAlreadyPresentFl) {
+ for (int j = 0; j <= 7; j++) {
+ if ((_gameBoardSide[0]._outpostStation[j]._cardId == 1) && !isStopConstructionCard(_gameBoardSide[0]._delayCard._cardId)) {
+ int stationCount = 0;
+ for (int k = 0; k <= 7; k++) {
+ if ((_gameBoardSide[0]._outpostStation[k]._cardId > 1) && (_gameBoardSide[0]._outpostStation[k]._cardId <= 9)) {
+ ++stationCount;
+ }
+ }
+
+ if (stationCount == 7)
+ _winnerId = 0;
+
+ playStationCard(&_gameBoardSide[0]._handCard[tmpVal], &_gameBoardSide[0]._outpostStation[j]);
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ int tmpVal = findPlatformCardInHand(0);
+
+ if (tmpVal != -1) {
+ for (int i = 0; i <= 7; i++) {
+ if ((_gameBoardSide[0]._outpostStation[i]._cardId == 0) && !isStopConstructionCard(_gameBoardSide[0]._delayCard._cardId)) {
+ playPlatformCard(&_gameBoardSide[0]._handCard[tmpVal], &_gameBoardSide[0]._outpostStation[i]);
+ return;
+ }
+ }
+ }
+
+ int meteorCardId = findMeteorCardInHand(0);
+ if (meteorCardId != -1) {
+ for (int i = 0; i <= 7; i++) {
+ if (_gameBoardSide[2]._outpostStation[i]._cardId != 0) {
+ playCentralOutpostCard(&_gameBoardSide[0]._handCard[meteorCardId], 2);
+ return;
+ }
+ }
+ }
+
+ int thieftId = findThieftCardInHand(0);
+ if (thieftId != -1) {
+ if ( (_gameBoardSide[2]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[2]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[2]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[2]._handCard[3]._cardId != 0) ) {
+ playThieftCard(0, &_gameBoardSide[0]._handCard[thieftId], 2);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ if ((isDelayCard(_gameBoardSide[0]._handCard[i]._cardId) != -1)
+ && (_gameBoardSide[2]._delayCard._cardId == 0)
+ && isAttackPossible(2, _gameBoardSide[0]._handCard[i]._cardId)) {
+ playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[2]._delayCard);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ if ((getStationCardId(_gameBoardSide[0]._handCard[i]._cardId) != -1)
+ && (_gameBoardSide[2]._delayCard._cardId == 0)
+ && isAttackPossible(2, _gameBoardSide[0]._handCard[i]._cardId)) {
+ playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[2]._delayCard);
+ return;
+ }
+ }
+
+ meteorCardId = findMeteorCardInHand(0);
+ int victimId = getPlayerWithOutpost(0);
+
+ if ((meteorCardId != -1) && (victimId != -1)) {
+ playCentralOutpostCard(&_gameBoardSide[0]._handCard[meteorCardId], victimId);
+ return;
+ }
+
+ thieftId = findThieftCardInHand(0);
+ if (thieftId != -1) {
+ if ( (_gameBoardSide[1]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) {
+ playThieftCard(0, &_gameBoardSide[0]._handCard[thieftId], 1);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ if (getStationCardId(_gameBoardSide[0]._handCard[i]._cardId) != -1) {
+ if ((_gameBoardSide[1]._delayCard._cardId == 0) && isAttackPossible(1, _gameBoardSide[0]._handCard[i]._cardId)) {
+ playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[1]._delayCard);
+ return;
+ }
+
+ if ((_gameBoardSide[3]._delayCard._cardId == 0) && isAttackPossible(3, _gameBoardSide[0]._handCard[i]._cardId)) {
+ playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[3]._delayCard);
+ return;
+ }
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ tmpVal = isDelayCard(_gameBoardSide[0]._handCard[i]._cardId);
+ if (tmpVal != -1) {
+ if ((_gameBoardSide[1]._delayCard._cardId == 0) && isAttackPossible(1, _gameBoardSide[0]._handCard[i]._cardId)) {
+ playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[1]._delayCard);
+ return;
+ }
+
+ if ((_gameBoardSide[3]._delayCard._cardId == 0) && isAttackPossible(3, _gameBoardSide[0]._handCard[i]._cardId)) {
+ playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[3]._delayCard);
+ return;
+ }
+ }
+ }
+
+ handlePlayer01Discard(0);
+}
+
+void Scene1337::handlePlayer1() {
+ if (this->_gameBoardSide[1]._delayCard._cardId != 0) {
+ switch (_gameBoardSide[1]._delayCard._cardId) {
+ case 10:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 17:
+ // No break on purpose
+ case 18:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 20:
+ // No break on purpose
+ case 21:
+ discardCard(&_gameBoardSide[1]._delayCard);
+ return;
+ default:
+ for (int i = 0; i <= 3; i++) {
+ if (checkAntiDelayCard(_gameBoardSide[1]._delayCard._cardId, _gameBoardSide[1]._handCard[i]._cardId)) {
+ playAntiDelayCard(&_gameBoardSide[1]._handCard[i], &_gameBoardSide[1]._delayCard);
+ return;
+ }
+ }
+ break;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ int tmpIndx = getStationId(1, i);
+ if (tmpIndx == -1)
+ break;
+
+ int tmpVal = 0;
+ for (int j = 0; j <= 7; j++) {
+ if (_gameBoardSide[1]._outpostStation[j]._cardId == _gameBoardSide[1]._handCard[tmpIndx]._cardId) {
+ tmpVal = 1;
+ break;
+ }
+ }
+
+ if (tmpVal == 0)
+ break;
+
+ for (int j = 0; j <= 7; j++) {
+ if ((_gameBoardSide[1]._outpostStation[j]._cardId == 1) && !isStopConstructionCard(_gameBoardSide[1]._delayCard._cardId)) {
+ int stationCount = 0;
+ for (int k = 0; k <= 7; k++) {
+ if ((_gameBoardSide[1]._outpostStation[k]._cardId > 1) && (_gameBoardSide[1]._outpostStation[k]._cardId <= 9))
+ ++stationCount;
+ }
+
+ if (stationCount == 7)
+ _winnerId = 1;
+
+ playStationCard(&_gameBoardSide[1]._handCard[tmpIndx], &_gameBoardSide[1]._outpostStation[j]);
+ return;
+ }
+ }
+ }
+
+ int normalCardId = findPlatformCardInHand(1);
+ if (normalCardId != -1) {
+ for (int i = 0; i <= 7; i++) {
+ if ((_gameBoardSide[1]._outpostStation[i]._cardId == 0) && !isStopConstructionCard(_gameBoardSide[1]._delayCard._cardId)) {
+ playPlatformCard(&_gameBoardSide[1]._handCard[normalCardId], &_gameBoardSide[1]._outpostStation[i]);
+ return;
+ }
+ }
+ }
+
+ int meterorCardId = findMeteorCardInHand(1);
+ int victimId = getPlayerWithOutpost(1);
+
+ if ((meterorCardId != -1) && (victimId != -1)) {
+ playCentralOutpostCard(&_gameBoardSide[1]._handCard[meterorCardId], victimId);
+ return;
+ }
+
+ int thieftId = findThieftCardInHand(1);
+ if (thieftId != -1) {
+ int playerIdFound = -1;
+ int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3);
+ for (int i = 0; i <= 3; i++) {
+ if (rndVal != 1) {
+ if ( (_gameBoardSide[rndVal]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[rndVal]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[rndVal]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[rndVal]._handCard[3]._cardId != 0)) {
+ playerIdFound = rndVal;
+ break;
+ }
+ }
+ // The original was only updating in the rndVal block,
+ // which was a bug as the checks were stopping at this point
+ rndVal--;
+ if (rndVal < 0)
+ rndVal = 3;
+ }
+
+ if (playerIdFound != -1) {
+ playThieftCard(1, &_gameBoardSide[1]._handCard[thieftId], playerIdFound);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 3; i++) {
+ int tmpVal = isDelayCard(_gameBoardSide[1]._handCard[i]._cardId);
+ if (tmpVal != -1) {
+ victimId = -1;
+ int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3);
+
+ for (int j = 0; j <= 3; j++) {
+ if (rndVal != 1) {
+ if ((_gameBoardSide[rndVal]._delayCard._cardId == 0) && isAttackPossible(rndVal, _gameBoardSide[1]._handCard[i]._cardId))
+ victimId = rndVal;
+ }
+
+ if (victimId != -1) {
+ playDelayCard(&_gameBoardSide[1]._handCard[i], &_gameBoardSide[victimId]._delayCard);
+ return;
+ } else {
+ rndVal--;
+ if (rndVal < 0)
+ rndVal = 3;
+ }
+ }
+ }
+ }
+
+ for (int j = 0; j <= 3; j++) {
+ if (getStationCardId(_gameBoardSide[1]._handCard[j]._cardId) != -1) {
+ victimId = -1;
+ int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3);
+ for (int l = 0; l <= 3; l++) {
+ if (rndVal != 1) {
+ if ((_gameBoardSide[rndVal]._delayCard._cardId == 0) && (_gameBoardSide[1]._handCard[j]._cardId == 1))
+ victimId = rndVal;
+ }
+ if (victimId != -1) {
+ playDelayCard(&_gameBoardSide[1]._handCard[j], &_gameBoardSide[victimId]._delayCard);
+ return;
+ } else {
+ rndVal--;
+ if (rndVal < 0)
+ rndVal = 3;
+ }
+ }
+ }
+ }
+
+ handlePlayer01Discard(1);
+}
+
+void Scene1337::handlePlayer3() {
+ if (_gameBoardSide[3]._delayCard._cardId != 0) {
+ switch (_gameBoardSide[3]._delayCard._cardId) {
+ case 10:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 17:
+ // No break on purpose
+ case 18:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 20:
+ // No break on purpose
+ case 21:
+ discardCard(&_gameBoardSide[3]._delayCard);
+ return;
+ default:
+ for (int i = 0; i <= 3; i++) {
+ if (checkAntiDelayCard(_gameBoardSide[3]._delayCard._cardId, _gameBoardSide[3]._handCard[i]._cardId)) {
+ playAntiDelayCard(&_gameBoardSide[3]._handCard[i], &_gameBoardSide[3]._delayCard);
+ return;
+ }
+ }
+ break;
+ }
+ }
+
+ int randIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
+ if (_gameBoardSide[3]._handCard[randIndx]._cardId == 1) {
+ // Station Card
+ for (int i = 0; i <= 7; i++) {
+ if ((_gameBoardSide[3]._outpostStation[i]._cardId == 0) && !isStopConstructionCard(_gameBoardSide[3]._delayCard._cardId)) {
+ playPlatformCard(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[3]._outpostStation[i]);
+ return;
+ }
+ }
+ } else if (_gameBoardSide[3]._handCard[randIndx]._cardId <= 9) {
+ // Outpost Card
+ for (int i = 0; i <= 7; i++) {
+ if (_gameBoardSide[3]._outpostStation[i]._cardId == _gameBoardSide[3]._handCard[randIndx]._cardId) {
+ discardCard(&_gameBoardSide[3]._handCard[randIndx]);
+ return;
+ }
+ }
+
+ for (int i = 0; i <= 7; i++) {
+ if ((_gameBoardSide[3]._outpostStation[i]._cardId == 1) && !isStopConstructionCard(_gameBoardSide[3]._delayCard._cardId)) {
+ int stationCount = 0;
+ for (int j = 0; j <= 7; j++) {
+ if ((_gameBoardSide[3]._outpostStation[j]._cardId > 1) && (_gameBoardSide[3]._outpostStation[j]._cardId <= 9))
+ ++stationCount;
+ }
+
+ if (stationCount == 7)
+ _winnerId = 3;
+
+ playStationCard(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[3]._outpostStation[i]);
+ return;
+ }
+ }
+ } else if (_gameBoardSide[3]._handCard[randIndx]._cardId == 13) {
+ // Meteor Card
+ int victimId = getPlayerWithOutpost(3);
+
+ if (victimId != -1) {
+ playCentralOutpostCard(&_gameBoardSide[3]._handCard[randIndx], victimId);
+ return;
+ }
+ } else if (_gameBoardSide[3]._handCard[randIndx]._cardId == 25) {
+ // Thief card
+ int victimId = -1;
+ int tmpRandIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
+
+ for (int i = 0; i <= 3; i++) {
+ if ( (tmpRandIndx != 3)
+ && ( (_gameBoardSide[tmpRandIndx]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[tmpRandIndx]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[tmpRandIndx]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[tmpRandIndx]._handCard[3]._cardId != 0) )) {
+ victimId = tmpRandIndx;
+ break;
+ }
+
+ ++tmpRandIndx;
+ if (tmpRandIndx > 3)
+ tmpRandIndx = 0;
+ }
+
+ if (victimId != -1) {
+ playThieftCard(3, &_gameBoardSide[3]._handCard[randIndx], victimId);
+ return;
+ }
+ } else {
+ switch (_gameBoardSide[3]._handCard[randIndx]._cardId) {
+ case 10:
+ // No break on purpose
+ case 11:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 14:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 16:
+ // No break on purpose
+ case 17:
+ // No break on purpose
+ case 18:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 20:
+ // No break on purpose
+ case 21:
+ // No break on purpose
+ case 24: {
+ int victimId = -1;
+ int tmpRandIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
+
+ for (int i = 0; i <= 3; i++) {
+ if (tmpRandIndx != 3) {
+ if ((_gameBoardSide[tmpRandIndx]._delayCard._cardId == 0)
+ && isAttackPossible(tmpRandIndx, _gameBoardSide[3]._handCard[randIndx]._cardId))
+ victimId = tmpRandIndx;
+ }
+
+ ++tmpRandIndx;
+ if (tmpRandIndx > 3)
+ tmpRandIndx = 0;
+
+ if (victimId != -1)
+ break;
+ }
+
+ if (victimId != -1) {
+ // Useless second identical check skipped
+ playDelayCard(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[victimId]._delayCard);
+ return;
+ }
+ }
+ default:
+ break;
+ }
+ }
+
+ discardCard(&_gameBoardSide[3]._handCard[randIndx]);
+}
+
+void Scene1337::handleAutoplayPlayer2() {
+ if (getStationCardId(this->_gameBoardSide[2]._delayCard._cardId) == -1)
+ _delayedFunction = &Scene1337::handlePlayer2;
+ else
+ discardCard(&_gameBoardSide[2]._delayCard);
+}
+
+void Scene1337::handlePlayer2() {
+ _selectedCard._stationPos = g_globals->_events._mousePos;
+
+ if (R2_GLOBALS._v57810 == 200) {
+ // Hand
+ int i;
+ for (i = 0; i < 4; i++) {
+ if ((_gameBoardSide[2]._handCard[i].isIn(_selectedCard._stationPos)) && (_gameBoardSide[2]._handCard[i]._cardId != 0)) {
+ Card *handcard = &_gameBoardSide[2]._handCard[i];
+ _selectedCard._cardId = handcard->_cardId;
+ _selectedCard._stationPos = handcard->_stationPos;
+ //warning("_selectedCard._actorName = handcard->_actorName;");
+ //warning("_selectedCard._fieldE = handcard->_fieldE;");
+ //warning("_selectedCard._field10 = handcard->_field10;");
+ //warning("_selectedCard._field12 = handcard->_field12;");
+ //warning("_selectedCard._field14 = handcard->_field14;");
+ //warning("_selectedCard._field16 = handcard->_field16;");
+ _selectedCard._sceneRegionId = handcard->_sceneRegionId;
+ _selectedCard._position = handcard->_position;
+ _selectedCard._yDiff = handcard->_yDiff;
+ _selectedCard._bounds = handcard->_bounds;
+ _selectedCard._resNum = handcard->_resNum;
+ _selectedCard._lookLineNum = handcard->_lookLineNum;
+ _selectedCard._talkLineNum = handcard->_talkLineNum;
+ _selectedCard._useLineNum = handcard->_useLineNum;
+ _selectedCard._action = handcard->_action;
+ //warning("_selectedCard._field0 = handcard->_field0;");
+ _selectedCard._card._updateStartFrame = handcard->_card._updateStartFrame;
+ _selectedCard._card._walkStartFrame = handcard->_card._walkStartFrame;
+ _selectedCard._card._oldPosition = handcard->_card._oldPosition;
+ _selectedCard._card._percent = handcard->_card._percent;
+ _selectedCard._card._priority = handcard->_card._priority;
+ _selectedCard._card._angle = handcard->_card._angle;
+ _selectedCard._card._flags = handcard->_card._flags;
+ _selectedCard._card._xe = handcard->_card._xe;
+ _selectedCard._card._xs = handcard->_card._xs;
+ _selectedCard._card._paneRects[0] = handcard->_card._paneRects[0];
+ _selectedCard._card._paneRects[1] = handcard->_card._paneRects[1];
+ _selectedCard._card._visage = handcard->_card._visage;
+ _selectedCard._card._objectWrapper = handcard->_card._objectWrapper;
+ _selectedCard._card._strip = handcard->_card._strip;
+ _selectedCard._card._animateMode = handcard->_card._animateMode;
+ _selectedCard._card._frame = handcard->_card._frame;
+ _selectedCard._card._endFrame = handcard->_card._endFrame;
+ _selectedCard._card._loopCount = handcard->_card._loopCount;
+ _selectedCard._card._frameChange = handcard->_card._frameChange;
+ _selectedCard._card._numFrames = handcard->_card._numFrames;
+ _selectedCard._card._regionIndex = handcard->_card._regionIndex;
+ _selectedCard._card._mover = handcard->_card._mover;
+ _selectedCard._card._moveDiff = handcard->_card._moveDiff;
+ _selectedCard._card._moveRate = handcard->_card._moveRate;
+ _selectedCard._card._actorDestPos = handcard->_card._actorDestPos;
+ _selectedCard._card._endAction = handcard->_card._endAction;
+ _selectedCard._card._regionBitList = handcard->_card._regionBitList;
+ // _selectedCard._object1._actorName = handcard->_object1._actorName;
+ //warning("_selectedCard._card._fieldE = handcard->_card._fieldE;");
+ //warning("_selectedCard._card._field10 = handcard->_card._field10;");
+ //warning("_selectedCard._card._field12 = handcard->_card._field12;");
+ //warning("_selectedCard._card._field14 = handcard->_card._field14;");
+ //warning("_selectedCard._card._field16 = handcard->_card._field16;");
+
+ _gameBoardSide[2]._handCard[i]._cardId = 0;
+ _gameBoardSide[2]._handCard[i]._card.remove();
+ break;
+ }
+ }
+
+ if (i == 4) {
+ handleClick(1, _selectedCard._stationPos);
+ handleAutoplayPlayer2();
+ return;
+ } else {
+ setCursorData(1332, _selectedCard._card._strip, _selectedCard._card._frame);
+ R2_GLOBALS._sceneObjects->draw();
+ }
+ } else if (R2_GLOBALS._v57810 == 300) {
+ // Eye
+ handleClick(3, _selectedCard._stationPos);
+ handleAutoplayPlayer2();
+ return;
+ } else {
+ // The original code is calling a function full of dead code.
+ // Only this message remains after a cleanup.
+ MessageDialog::show(WRONG_ANSWER_MSG, OK_BTN_STRING);
+ //
+ handleAutoplayPlayer2();
+ return;
+ }
+
+ Event event;
+ bool found;
+ for (;;) {
+ if ( ((g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN)) && (event.btnState == BTNSHIFT_RIGHT))
+ || (g_globals->_events.getEvent(event, EVENT_KEYPRESS)) ){
+ _selectedCard._stationPos = g_globals->_events._mousePos;
+ found = false;
+
+ for (int i = 0; i <= 3; i ++) {
+ if (_gameBoardSide[2]._handCard[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if (_gameBoardSide[2]._handCard[i]._cardId == 0) {
+ _gameBoardSide[2]._handCard[i]._cardId = _selectedCard._cardId;
+ _gameBoardSide[2]._handCard[i]._card.postInit();
+ _gameBoardSide[2]._handCard[i]._card.hide();
+ _gameBoardSide[2]._handCard[i]._card.setVisage(1332);
+ _gameBoardSide[2]._handCard[i]._card.setPosition(_gameBoardSide[2]._handCard[i]._stationPos, 0);
+ _gameBoardSide[2]._handCard[i]._card.fixPriority(170);
+ setAnimationInfo(&_gameBoardSide[2]._handCard[i]);
+ setCursorData(5, 1, 4);
+ _currentPlayerNumb--;
+ _showPlayerTurn = false;
+ handleNextTurn();
+ return;
+ } else {
+ actionDisplay(1330, 127, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ found = true;
+ }
+ break;
+ }
+ }
+
+ if (!found) {
+ if (_discardPile.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ discardCard(&_selectedCard);
+ return;
+ } else if (_selectedCard._cardId == 1) {
+ bool isInCardFl = false;
+ int i;
+ for (i = 0; i <= 7; i++) {
+ if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ isInCardFl = true;
+ break;
+ }
+ }
+
+ if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 0)) {
+ if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
+ actionDisplay(1330, 55, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else {
+ playPlatformCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
+ return;
+ }
+ } else {
+ actionDisplay(1330, 56, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_selectedCard._cardId <= 9) {
+ bool isInCardFl = false;
+ int i;
+ for (i = 0; i <= 7; i++) {
+ if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ isInCardFl = true;
+ break;
+ }
+ }
+ if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 1)) {
+ isInCardFl = false;
+ for (int j = 0; j <= 7; j++) {
+ if (_selectedCard._cardId == _gameBoardSide[2]._outpostStation[j]._cardId) {
+ isInCardFl = true;
+ break;
+ }
+ }
+ if (isInCardFl) {
+ // This station is already in place
+ actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
+ // You must eliminate your delay before you can play a station
+ actionDisplay(1330, 35, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else {
+ int stationCount = 0;
+ for (int k = 0; k <= 7; k++) {
+ if ((_gameBoardSide[2]._outpostStation[k]._cardId > 1) && (_gameBoardSide[2]._outpostStation[k]._cardId <= 9))
+ ++stationCount;
+ }
+
+ if (stationCount == 7)
+ _winnerId = 2;
+
+ playStationCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
+ return;
+ }
+ } else {
+ actionDisplay(1330, 37, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if ((_selectedCard._cardId == 26) || (_selectedCard._cardId == 30) ||(_selectedCard._cardId == 32) || (_selectedCard._cardId == 28)) {
+ // Check anti-delay card (26 = Diplomacy, 28 = Innovation, 30 = Cure, 32 = Agreement)
+ if (_gameBoardSide[2]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ actionDisplay(1330, 42, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (checkAntiDelayCard(_gameBoardSide[2]._delayCard._cardId, _selectedCard._cardId)) {
+ playAntiDelayCard(&_selectedCard, &_gameBoardSide[2]._delayCard);
+ return;
+ } else {
+ if (_gameBoardSide[2]._delayCard._cardId != 0) {
+ switch (_gameBoardSide[2]._delayCard._cardId) {
+ case 11:
+ actionDisplay(1330, 68, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 14:
+ actionDisplay(1330, 80, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 16:
+ actionDisplay(1330, 84, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 24:
+ actionDisplay(1330, 96, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else {
+ actionDisplay(1330, 41, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ }
+ } else if ((getStationCardId(_selectedCard._cardId) == -1) && (isDelayCard(_selectedCard._cardId) == -1)) {
+ if (_selectedCard._cardId == 13) {
+ // Meteor Card
+ if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ for (int k = 0; k <= 7; k++) {
+ if (_gameBoardSide[0]._outpostStation[k]._cardId != 0) {
+ playCentralOutpostCard(&_selectedCard, 0);
+ return;
+ }
+ }
+ actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ for (int k = 0; k <= 7; k++) {
+ if (_gameBoardSide[3]._outpostStation[k]._cardId != 0) {
+ playCentralOutpostCard(&_selectedCard, 3);
+ return;
+ }
+ }
+ actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ for (int k = 0; k <= 7; k++) {
+ if (_gameBoardSide[1]._outpostStation[k]._cardId == 0) {
+ playCentralOutpostCard(&_selectedCard, 1);
+ return;
+ }
+ }
+ actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else {
+ actionDisplay(1330, 128, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_selectedCard._cardId == 25) {
+ // Thief card
+ if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if ( (_gameBoardSide[0]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[0]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[0]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[0]._handCard[3]._cardId != 0) ) {
+ int k;
+ for (k = 0; k <= 3; k++){
+ if (_gameBoardSide[2]._handCard[k]._cardId == 0)
+ break;
+ }
+ playThieftCard(2, &_gameBoardSide[2]._handCard[k], 0);
+ return;
+ } else {
+ actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if ( (_gameBoardSide[1]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) {
+ int k;
+ for (k = 0; k <= 3; k++){
+ if (_gameBoardSide[2]._handCard[k]._cardId == 0)
+ break;
+ }
+ playThieftCard(2, &_gameBoardSide[2]._handCard[k], 1);
+ return;
+ } else {
+ actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ }
+
+ if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if ( (_gameBoardSide[3]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[3]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[3]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[3]._handCard[3]._cardId != 0) ) {
+ int k;
+ for (k = 0; k <= 3; k++){
+ if (_gameBoardSide[2]._handCard[k]._cardId == 0)
+ break;
+ }
+ playThieftCard(2, &_gameBoardSide[2]._handCard[k], 3);
+ return;
+ } else {
+ actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else {
+ actionDisplay(1330, 129, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_selectedCard._cardId == 29) {
+ // Interceptor cards are used to prevent collision
+ actionDisplay(1330, 136, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (_selectedCard._cardId == 27) {
+ actionDisplay(1330, 137, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_gameBoardSide[0]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if (_gameBoardSide[0]._delayCard._cardId != 0) {
+ actionDisplay(1330, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (!isAttackPossible(0, _selectedCard._cardId)) {
+ switch (_selectedCard._cardId) {
+ case 10:
+ actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 12:
+ actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 17:
+ actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 18:
+ actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 19:
+ actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 21:
+ actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else {
+ playDelayCard(&_selectedCard, &_gameBoardSide[0]._delayCard);
+ return;
+ }
+ } else if (_gameBoardSide[3]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if (_gameBoardSide[3]._delayCard._cardId != 0) {
+ actionDisplay(1330, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (!isAttackPossible(3, _selectedCard._cardId)) {
+ switch (_selectedCard._cardId) {
+ case 10:
+ actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 12:
+ actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 17:
+ actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 18:
+ actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 19:
+ actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 21:
+ actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else {
+ playDelayCard(&_selectedCard, &_gameBoardSide[3]._delayCard);
+ return;
+ }
+ } else if (_gameBoardSide[1]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if (_gameBoardSide[1]._delayCard._cardId != 0) {
+ actionDisplay(1330, 19, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (!isAttackPossible(1, _selectedCard._cardId)) {
+ switch (_selectedCard._cardId) {
+ case 10:
+ actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 12:
+ actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 17:
+ actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 18:
+ actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 19:
+ actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 21:
+ actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else {
+ playDelayCard(&_selectedCard, &_gameBoardSide[1]._delayCard);
+ return;
+ }
+ } else {
+ actionDisplay(1330, 38, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ }
+ } else {
+ g_globals->_scenePalette.signalListeners();
+ R2_GLOBALS._sceneObjects->draw();
+ g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
+ }
+
+ g_globals->_sceneObjects->recurse(SceneHandler::dispatchObject);
+ }
+}
+
+void Scene1337::updateCursorId(int cursorId, bool updateFl) {
+ if ((R2_GLOBALS._v57709 != 0) || (R2_GLOBALS._v5780C != 0))
+ return;
+
+ R2_GLOBALS._mouseCursorId = cursorId;
+
+ if (updateFl) {
+ R2_GLOBALS._mouseCursorId++;
+
+ if (R2_GLOBALS._mouseCursorId < 1)
+ R2_GLOBALS._mouseCursorId = 2;
+
+ if (R2_GLOBALS._mouseCursorId > 2)
+ R2_GLOBALS._mouseCursorId = 1;
+ }
+
+ // The original was using an intermediate function to call setCursorData.
+ // It has been removed to improve readability
+ if (R2_GLOBALS._mouseCursorId == 1) {
+ R2_GLOBALS._v57810 = 200;
+ setCursorData(5, 1, 4);
+ } else if (R2_GLOBALS._mouseCursorId == 2) {
+ R2_GLOBALS._v57810 = 300;
+ setCursorData(5, 1, 5);
+ } else {
+ R2_GLOBALS._v57810 = 0;
+ setCursorData(5, 0, 0);
+ }
+}
+
+void Scene1337::setCursorData(int resNum, int rlbNum, int frameNum) {
+ _cursorCurRes = resNum;
+ _cursorCurStrip = rlbNum;
+ _cursorCurFrame = frameNum;
+
+ if (!frameNum) {
+ // Should be a hardcoded cursor displaying only a dot.
+ // FIXME: Use another cursor when possible
+ R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS);
+ } else {
+ // TODO: The original was using some resource caching, which was useless and complex
+ // and which has been removed. This cursor behavior clearly made intensive use of this caching...
+ // We now have to find a way to cache these cursor pointers and avoid loading them multiple times per seconds
+ uint size;
+ byte *cursor = g_resourceManager->getSubResource(resNum, rlbNum, frameNum, &size);
+ // Decode the cursor
+ GfxSurface s = surfaceFromRes(cursor);
+
+ Graphics::Surface surface = s.lockSurface();
+ const byte *cursorData = (const byte *)surface.getPixels();
+ CursorMan.replaceCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColor);
+ s.unlockSurface();
+
+ DEALLOCATE(cursor);
+ }
+}
+
+void Scene1337::subD18F5() {
+ if (R2_GLOBALS._v57709 == 0)
+ // The original restores a copy of the default cursor (the hand), which isn't possible with our implementation
+ // We reload that cursor instead.
+ setCursorData(5, 1, 4);
+
+ ++R2_GLOBALS._v57709;
+}
+
+void Scene1337::subD1917() {
+ if (R2_GLOBALS._v57709 != 0) {
+ R2_GLOBALS._v57709--;
+ if (R2_GLOBALS._v57709 == 0) {
+ // The original was using an intermediate function to call setCursorData.
+ // It has been removed to improve readability
+ setCursorData(5, _cursorCurStrip, _cursorCurFrame);
+ }
+ }
+}
+
+void Scene1337::subD1940(bool flag) {
+ if (flag)
+ ++R2_GLOBALS._v5780C;
+ else if (R2_GLOBALS._v5780C != 0)
+ --R2_GLOBALS._v5780C;
+}
+
+void Scene1337::subD1975(int arg1, int arg2) {
+ // No implementation required in ScummVM: Mouse handling with tons of caching
+}
+
+void Scene1337::OptionsDialog::show() {
+ OptionsDialog *dlg = new OptionsDialog();
+ dlg->draw();
+
+ // Show the dialog
+ GfxButton *btn = dlg->execute(NULL);
+
+ // Figure out the new selected character
+ if (btn == &dlg->_quitGame)
+ R2_GLOBALS._sceneManager.changeScene(125);
+ else if (btn == &dlg->_restartGame)
+ R2_GLOBALS._sceneManager.changeScene(1330);
+
+ // Remove the dialog
+ dlg->remove();
+ delete dlg;
+}
+
+Scene1337::OptionsDialog::OptionsDialog() {
+ // Set the elements text
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+ _autoplay.setText(scene->_autoplay ? AUTO_PLAY_ON : AUTO_PLAY_OFF);
+ _restartGame.setText(START_NEW_CARD_GAME);
+ _quitGame.setText(QUIT_CARD_GAME);
+ _continueGame.setText(CONTINUE_CARD_GAME);
+
+ // Set position of the elements
+ _autoplay._bounds.moveTo(5, 2);
+ _restartGame._bounds.moveTo(5, _autoplay._bounds.bottom + 2);
+ _quitGame._bounds.moveTo(5, _restartGame._bounds.bottom + 2);
+ _continueGame._bounds.moveTo(5, _quitGame._bounds.bottom + 2);
+
+ // Add the items to the dialog
+ addElements(&_autoplay, &_restartGame, &_quitGame, &_continueGame, NULL);
+
+ // Set the dialog size and position
+ frame();
+ _bounds.collapse(-6, -6);
+ setCenter(160, 100);
+}
+
+GfxButton *Scene1337::OptionsDialog::execute(GfxButton *defaultButton) {
+ _gfxManager.activate();
+
+ // Event loop
+ GfxButton *selectedButton = NULL;
+
+ bool breakFlag = false;
+ while (!g_vm->shouldQuit() && !breakFlag) {
+ Event event;
+ while (g_globals->_events.getEvent(event) && !breakFlag) {
+ // Adjust mouse positions to be relative within the dialog
+ event.mousePos.x -= _gfxManager._bounds.left;
+ event.mousePos.y -= _gfxManager._bounds.top;
+
+ for (GfxElementList::iterator i = _elements.begin(); i != _elements.end(); ++i) {
+ if ((*i)->process(event))
+ selectedButton = static_cast<GfxButton *>(*i);
+ }
+
+ if (selectedButton == &_autoplay) {
+ // Toggle Autoplay
+ selectedButton = NULL;
+ Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
+ scene->_autoplay = !scene->_autoplay;
+
+ _autoplay.setText(scene->_autoplay ? AUTO_PLAY_ON : AUTO_PLAY_OFF);
+ _autoplay.draw();
+ } else if (selectedButton) {
+ breakFlag = true;
+ break;
+ } else if (!event.handled) {
+ if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
+ selectedButton = NULL;
+ breakFlag = true;
+ break;
+ }
+ }
+ }
+
+ g_system->delayMillis(10);
+ GLOBALS._screenSurface.updateScreen();
+ }
+
+ _gfxManager.deactivate();
+ return selectedButton;
+}
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_outpost.h b/engines/tsage/ringworld2/ringworld2_outpost.h
new file mode 100644
index 0000000000..6c6952c196
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_outpost.h
@@ -0,0 +1,259 @@
+/* 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.
+ *
+ */
+
+#ifndef TSAGE_RINGWORLD2_OUTPOST_H
+#define TSAGE_RINGWORLD2_OUTPOST_H
+
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+#include "tsage/sound.h"
+#include "tsage/ringworld2/ringworld2_logic.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+using namespace TsAGE;
+
+class Scene1337 : public SceneExt {
+ class OptionsDialog: public GfxDialog {
+ private:
+ GfxButton _autoplay;
+ GfxButton _restartGame;
+ GfxButton _quitGame;
+ GfxButton _continueGame;
+
+ OptionsDialog();
+ virtual ~OptionsDialog() {}
+ virtual GfxButton *execute(GfxButton *defaultButton);
+ public:
+ static void show();
+ };
+
+ class Card: public SceneHotspot {
+ public:
+ SceneObject _card;
+
+ int _cardId;
+ Common::Point _stationPos;
+
+ Card();
+ void synchronize(Serializer &s);
+ bool isIn(Common::Point pt);
+ };
+
+ class GameBoardSide: public SceneHotspot {
+ public:
+ Card _handCard[4];
+ Card _outpostStation[8];
+ Card _delayCard;
+ Card _emptyStationPos;
+
+ Common::Point _card1Pos;
+ Common::Point _card2Pos;
+ Common::Point _card3Pos;
+ Common::Point _card4Pos;
+ int _frameNum;
+
+ GameBoardSide();
+ void synchronize(Serializer &s);
+ };
+
+ class Action1337: public Action {
+ public:
+ void waitFrames(int32 frameCount);
+ };
+
+ class Action1: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action2: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action3: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action4: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action5: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action6: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action7: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action8: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action9: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action10: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action11: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action12: public Action1337 {
+ public:
+ void signal();
+ };
+ class Action13: public Action1337 {
+ public:
+ void signal();
+ };
+public:
+ Action1 _action1;
+ Action2 _action2;
+ Action3 _action3;
+ Action4 _action4;
+ Action5 _action5;
+ Action6 _action6;
+ Action7 _action7;
+ Action8 _action8;
+ Action9 _action9;
+ Action10 _action10;
+ Action11 _action11;
+ Action12 _action12;
+ Action13 _action13;
+
+ typedef void (Scene1337::*FunctionPtrType)();
+ FunctionPtrType _delayedFunction;
+
+ bool _autoplay;
+ bool _shuffleEndedFl;
+ bool _showPlayerTurn;
+ bool _displayHelpFl;
+ bool _instructionsDisplayedFl;
+
+ // Discarded cards are put in the available cards pile, with an higher index so there no conflict
+ int _currentDiscardIndex;
+ int _availableCardsPile[100];
+ int _cardsAvailableNumb;
+ int _currentPlayerNumb;
+ int _actionPlayerIdx;
+ int _actionVictimIdx;
+ int _winnerId;
+ int _instructionsWaitCount;
+ int _cursorCurRes;
+ int _cursorCurStrip;
+ int _cursorCurFrame;
+
+ ASound _aSound1;
+ ASound _aSound2;
+ GameBoardSide _gameBoardSide[4];
+ SceneActor _helpIcon;
+ SceneActor _stockPile;
+ SceneItem _actionItem;
+ SceneObject _currentPlayerArrow;
+
+ Card *_actionCard1;
+ Card *_actionCard2;
+ Card *_actionCard3;
+ Card _animatedCard;
+ Card _shuffleAnimation;
+ Card _discardedPlatformCard;
+ Card _selectedCard;
+ Card _discardPile;
+ Card _stockCard;
+
+ SceneObject _upperDisplayCard[8];
+ SceneObject _lowerDisplayCard[8];
+
+ Scene1337();
+ virtual void synchronize(Serializer &s);
+
+ void actionDisplay(int resNum, int lineNum, int x, int y, int keepOnScreen, int width, int textMode, int fontNum, int colFG, int colBGExt, int colFGExt);
+ void setAnimationInfo(Card *card);
+ void handleNextTurn();
+ void handlePlayerTurn();
+ bool isStationCard(int cardId);
+ bool isStopConstructionCard(int cardId);
+ int getStationId(int playerId, int handCardId);
+ int findPlatformCardInHand(int playerId);
+ int findMeteorCardInHand(int playerId);
+ int findThieftCardInHand(int playerId);
+ int isDelayCard(int cardId);
+ int getStationCardId(int cardId);
+ void handlePlayer01Discard(int playerId);
+ void playThieftCard(int playerId, Card *card, int victimId);
+ int getPreventionCardId(int cardId);
+ bool isAttackPossible(int victimId, int cardId);
+ int getPlayerWithOutpost(int playerId);
+ bool checkAntiDelayCard(int delayCardId, int cardId);
+ void playStationCard(Card *station, Card *platform);
+ void playDelayCard(Card *card, Card *dest);
+ void playPlatformCard(Card *card, Card *dest);
+ void playAntiDelayCard(Card *card, Card *dest);
+ Card *getStationCard(int arg1);
+ void playCentralOutpostCard(Card *card, int playerId);
+ int getRandomCardFromHand(int playerId);
+ void discardCard(Card *card);
+ void subC4CD2();
+ void subC4CEC();
+ void playInterceptorCard(Card *subObj1, Card *subObj2);
+ void displayDialog(int dialogNumb);
+ void subPostInit();
+ void displayInstructions();
+ void suggestInstructions();
+ void shuffleCards();
+ void dealCards();
+ void showOptionsDialog();
+ void handleClick(int arg1, Common::Point pt);
+ void handlePlayer0();
+ void handlePlayer1();
+ void handlePlayer2();
+ void handlePlayer3();
+ void handleAutoplayPlayer2();
+ void updateCursorId(int arg1, bool arg2);
+ void setCursorData(int resNum, int rlbNum, int frameNum);
+ void subD18F5();
+ void subD1917();
+ void subD1940(bool flag);
+ void subD1975(int arg1, int arg2);
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void remove();
+ virtual void process(Event &event);
+ virtual void dispatch();
+};
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
+
+#endif
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index b82565332a..573cbbb29a 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -627,7 +627,7 @@ void Scene125::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
_palette.loadPalette(0);
- if (R2_GLOBALS._sceneManager._previousScene != 125)
+ if ((R2_GLOBALS._sceneManager._previousScene != 125) && (R2_GLOBALS._sceneManager._previousScene != 1337) && (R2_GLOBALS._sceneManager._previousScene != 1330))
// Save the prior scene to return to when the console is turned off
R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = R2_GLOBALS._sceneManager._previousScene;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index e2c22bd0b4..81dc05e2a4 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -1321,5469 +1321,6 @@ void Scene1100::saveCharacter(int characterIndex) {
}
/*--------------------------------------------------------------------------
- * Scene 1200 - Air Ducts Maze
- *
- *--------------------------------------------------------------------------*/
-
-Scene1200::Scene1200() {
- _nextCrawlDirection = 0;
- _field414 = 0;
- _field416 = 0;
- _field418 = 0;
- _field41A = 0;
- _fixupMaze = false;
-}
-
-void Scene1200::synchronize(Serializer &s) {
- SceneExt::synchronize(s);
-
- s.syncAsSint16LE(_nextCrawlDirection);
- s.syncAsSint16LE(_field414);
- s.syncAsSint16LE(_field416);
- s.syncAsSint16LE(_field418);
- s.syncAsSint16LE(_field41A);
- s.syncAsSint16LE(_fixupMaze);
-}
-
-Scene1200::LaserPanel::LaserPanel() {
-}
-
-void Scene1200::LaserPanel::Jumper::init(int state) {
- _state = state;
-
- SceneActor::postInit();
- setup(1003, 1, 1);
- fixPriority(255);
-
- switch (_state) {
- case 1:
- switch (R2_GLOBALS._ductMazePanel1State) {
- case 1:
- setFrame2(2);
- setPosition(Common::Point(129, 101));
- break;
- case 2:
- setFrame2(3);
- setPosition(Common::Point(135, 95));
- break;
- default:
- break;
- }
- break;
- case 2:
- switch (R2_GLOBALS._ductMazePanel2State) {
- case 1:
- setFrame2(2);
- setPosition(Common::Point(152, 101));
- break;
- case 2:
- setFrame2(3);
- setPosition(Common::Point(158, 122));
- break;
- case 3:
- setFrame2(3);
- setPosition(Common::Point(135, 122));
- break;
- default:
- break;
- }
- break;
- case 3:
- switch (R2_GLOBALS._ductMazePanel3State) {
- case 1:
- setFrame2(3);
- setPosition(Common::Point(158, 95));
- break;
- case 2:
- setFrame2(2);
- setPosition(Common::Point(175, 101));
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
-
- setDetails(1200, 12, -1, -1, 2, (SceneItem *) NULL);
-}
-
-bool Scene1200::LaserPanel::Jumper::startAction(CursorType action, Event &event) {
- if (action != CURSOR_USE)
- return SceneActor::startAction(action, event);
-
- R2_GLOBALS._sound2.play(260);
- switch (_state) {
- case 1:
- if (R2_GLOBALS._ductMazePanel1State == 1) {
- R2_GLOBALS._ductMazePanel1State = 2;
- setFrame2(3);
- setPosition(Common::Point(135, 95));
- } else {
- R2_GLOBALS._ductMazePanel1State = 1;
- setFrame2(2);
- setPosition(Common::Point(129, 101));
- }
- break;
- case 2:
- ++R2_GLOBALS._ductMazePanel2State;
- if (R2_GLOBALS._ductMazePanel2State == 4)
- R2_GLOBALS._ductMazePanel2State = 1;
-
- switch (R2_GLOBALS._ductMazePanel2State) {
- case 1:
- setFrame2(2);
- setPosition(Common::Point(152, 101));
- break;
- case 2:
- setFrame2(3);
- setPosition(Common::Point(158, 122));
- break;
- case 3:
- setFrame2(3);
- setPosition(Common::Point(135, 122));
- break;
- default:
- break;
- }
- break;
- case 3:
- if (R2_GLOBALS._ductMazePanel3State == 1) {
- R2_GLOBALS._ductMazePanel3State = 2;
- setFrame2(2);
- setPosition(Common::Point(175, 101));
- } else {
- R2_GLOBALS._ductMazePanel3State = 1;
- setFrame2(3);
- setPosition(Common::Point(158, 95));
- }
- break;
- default:
- break;
- }
-
- Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
- scene->_field418 = 0;
-
- if ((R2_GLOBALS._ductMazePanel1State == 1) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
- scene->_field418 = 1;
- else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
- scene->_field418 = 2;
- else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 2))
- scene->_field418 = 3;
- else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 3) && (R2_GLOBALS._ductMazePanel3State == 1))
- scene->_field418 = 4;
-
- return true;
-}
-
-void Scene1200::LaserPanel::postInit(SceneObjectList *OwnerList) {
- Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
-
- scene->_field41A = 1;
- R2_GLOBALS._events.setCursor(CURSOR_USE);
- setup2(1003, 1, 1, 100, 40);
- setup3(1200, 11, -1, -1);
- R2_GLOBALS._sound2.play(259);
- _jumper1.init(1);
- _jumper2.init(2);
- _jumper3.init(3);
-
- R2_GLOBALS._player._canWalk = false;
-}
-
-void Scene1200::LaserPanel::remove() {
- Scene1200 *scene = (Scene1200 *)R2_GLOBALS._sceneManager._scene;
-
- scene->_field41A = 0;
- scene->_sceneAreas.remove(&_jumper1);
- scene->_sceneAreas.remove(&_jumper2);
- scene->_sceneAreas.remove(&_jumper3);
- _jumper1.remove();
- _jumper2.remove();
- _jumper3.remove();
-
- ModalWindow::remove();
- R2_GLOBALS._player._canWalk = true;
-}
-
-void Scene1200::postInit(SceneObjectList *OwnerList) {
- loadScene(1200);
- SceneExt::postInit();
-
- if (R2_GLOBALS._sceneManager._previousScene < 3200)
- R2_GLOBALS._sound1.play(257);
-
- _nextCrawlDirection = CRAWL_EAST;
- _field414 = 0;
- _field416 = 0;
- _field418 = 0;
- _field41A = 0;
-
- if ((R2_GLOBALS._ductMazePanel1State == 1) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
- _field418 = 1;
- else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 1))
- _field418 = 2;
- else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 1) && (R2_GLOBALS._ductMazePanel3State == 2))
- _field418 = 3;
- else if ((R2_GLOBALS._ductMazePanel1State == 2) && (R2_GLOBALS._ductMazePanel2State == 3) && (R2_GLOBALS._ductMazePanel3State == 1))
- _field418 = 4;
-
- R2_GLOBALS._player.postInit();
- R2_GLOBALS._player.disableControl();
- R2_GLOBALS._player.setup(3156, 1, 6);
- R2_GLOBALS._player.setPosition(Common::Point(160, 70));
- R2_GLOBALS._player._numFrames = 10;
- R2_GLOBALS._player._oldCharacterScene[R2_MIRANDA] = 1200;
-
- _actor1.postInit();
- _actor1.hide();
-
- _mazeUI.setDisplayBounds(Rect(110, 20, 210, 120));
-
- _mazeUI.postInit();
- _mazeUI.load(1);
- _mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
-
- R2_GLOBALS._player.enableControl();
- _item1.setDetails(Rect(0, 0, 320, 200), 1200, 0, 1, 2, 1, NULL);
-}
-
-void Scene1200::signal() {
- switch (_sceneMode++) {
- case 1:
- // No break on purpose
- case 1200:
- // No break on purpose
- case 1201:
- // No break on purpose
- case 1202:
- // No break on purpose
- case 1203:
- R2_GLOBALS._player.enableControl();
- // CHECKME: The original is calling _eventManager.waitEvent();
- _sceneMode = 2;
- break;
- case 10:
- _field416 = 1;
- _field414 = 6;
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.setStrip(1);
- R2_GLOBALS._player.setFrame(5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- case 11:
- // No break on purpose
- case 21:
- // No break on purpose
- case 31:
- // No break on purpose
- case 41:
- _field416 = 0;
- break;
- case 12:
- _field414 = 14;
- R2_GLOBALS._player._numFrames = 10;
- R2_GLOBALS._player.setup(3155, 1, 4);
- R2_GLOBALS._player.setPosition(Common::Point(160, 70));
- R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
- break;
- case 13:
- // No break on purpose
- case 16:
- // No break on purpose
- case 23:
- // No break on purpose
- case 26:
- // No break on purpose
- case 33:
- // No break on purpose
- case 36:
- // No break on purpose
- case 43:
- // No break on purpose
- case 46:
- R2_GLOBALS._player.setFrame(4);
- _sceneMode = 1;
- setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
- break;
- case 15:
- // No break on purpose
- case 25:
- // No break on purpose
- case 35:
- // No break on purpose
- case 45:
- _field414 = 20;
- R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
- break;
- case 20:
- _field416 = 1;
- _field414 = 6;
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.setStrip(2);
- R2_GLOBALS._player.setFrame(5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- case 22:
- _field414 = 14;
- R2_GLOBALS._player._numFrames = 10;
- R2_GLOBALS._player.setup(3155, 2, 4);
- R2_GLOBALS._player.setPosition(Common::Point(160, 70));
- R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
- break;
- case 30:
- _field416 = 1;
- _field414 = 6;
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.setStrip(3);
- R2_GLOBALS._player.setFrame(5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- case 32:
- _field414 = 14;
- R2_GLOBALS._player._numFrames = 10;
- R2_GLOBALS._player.setup(3155, 3, 4);
- R2_GLOBALS._player.setPosition(Common::Point(160, 70));
- R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
- break;
- case 40:
- _field416 = 1;
- _field414 = 6;
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.setStrip(4);
- R2_GLOBALS._player.setFrame(5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- case 42:
- _field414 = 14;
- R2_GLOBALS._player._numFrames = 10;
- R2_GLOBALS._player.setup(3155, 4, 4);
- R2_GLOBALS._player.setPosition(Common::Point(160, 70));
- R2_GLOBALS._player.animate(ANIM_MODE_2, NULL);
- break;
- case 50:
- // No break on purpose
- case 55:
- // No break on purpose
- case 60:
- R2_GLOBALS._player.setup(3156, 5, 1);
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 51:
- // No break on purpose
- case 56:
- // No break on purpose
- case 117:
- R2_GLOBALS._player.setup(3157, 1, 1);
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 52:
- // No break on purpose
- case 82:
- // No break on purpose
- case 118:
- R2_GLOBALS._player.setup(3156, 3, 6);
- _sceneMode = 1;
- setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
- break;
- case 57:
- // No break on purpose
- case 91:
- // No break on purpose
- case 96:
- R2_GLOBALS._player.setup(3157, 2, 1);
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 58:
- // No break on purpose
- case 92:
- // No break on purpose
- case 122:
- R2_GLOBALS._player.setup(3156, 2, 6);
- _sceneMode = 1;
- setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
- break;
- case 61:
- R2_GLOBALS._player.setup(3157, 4, 5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- case 62:
- // No break on purpose
- case 72:
- // No break on purpose
- case 98:
- R2_GLOBALS._player.setup(3156, 4, 6);
- _sceneMode = 1;
- setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
- break;
- case 70:
- // No break on purpose
- case 75:
- // No break on purpose
- case 80:
- R2_GLOBALS._player.setup(3156, 6, 1);
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 71:
- // No break on purpose
- case 76:
- // No break on purpose
- case 97:
- R2_GLOBALS._player.setup(3157, 3, 1);
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 77:
- // No break on purpose
- case 111:
- // No break on purpose
- case 116:
- R2_GLOBALS._player.setup(3157, 4, 1);
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 78:
- // No break on purpose
- case 102:
- // No break on purpose
- case 112:
- R2_GLOBALS._player.setup(3156, 1, 6);
- _sceneMode = 1;
- setAction(&_sequenceManager, this, 1, &R2_GLOBALS._player, NULL);
- break;
- case 81:
- R2_GLOBALS._player.setup(3157, 2, 5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- case 90:
- // No break on purpose
- case 95:
- // No break on purpose
- case 100:
- R2_GLOBALS._player.setup(3156, 7, 1);
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 101:
- R2_GLOBALS._player.setup(3157, 1, 5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- case 110:
- // No break on purpose
- case 115:
- // No break on purpose
- case 120:
- R2_GLOBALS._player.setup(3156, 8, 1);
- R2_GLOBALS._player._numFrames = 5;
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- break;
- case 121:
- R2_GLOBALS._player.setup(3157, 3, 5);
- R2_GLOBALS._player.animate(ANIM_MODE_6, this);
- break;
- default:
- // CHECKME: The original is walling _eventManager.waitEvent();
- _sceneMode = 2;
- break;
- }
-}
-
-void Scene1200::process(Event &event) {
- if (_field414 != 0)
- return;
-
- Scene::process(event);
-
- if (!R2_GLOBALS._player._canWalk)
- return;
-
- if (event.eventType == EVENT_BUTTON_DOWN) {
- Common::Point cellPos = R2_GLOBALS._ventCellPos;
- _mazeUI.pixelToCellXY(cellPos);
-
- int cellId = _mazeUI.getCellFromPixelXY(event.mousePos);
- switch (R2_GLOBALS._events.getCursor()) {
- case CURSOR_WALK:
- event.handled = true;
- if ((event.mousePos.x > 179) && (event.mousePos.x < 210) && (event.mousePos.y > 50) && (event.mousePos.y < 89))
- startCrawling(CRAWL_EAST);
-
- if ((event.mousePos.x > 109) && (event.mousePos.x < 140) && (event.mousePos.y > 50) && (event.mousePos.y < 89))
- startCrawling(CRAWL_WEST);
-
- if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 89) && (event.mousePos.y < 120))
- startCrawling(CRAWL_SOUTH);
-
- if ((event.mousePos.x > 140) && (event.mousePos.x < 179) && (event.mousePos.y > 19) && (event.mousePos.y < 50))
- startCrawling(CRAWL_NORTH);
- break;
- case CURSOR_USE:
- if (cellId > 36) {
- if ( ((cellPos.x == 3) && (cellPos.y == 33))
- || ((cellPos.x == 7) && (cellPos.y == 33))
- || ((cellPos.x == 33) && (cellPos.y == 41))
- || ((cellPos.x == 5) && (cellPos.y == 5))
- || ((cellPos.x == 13) && (cellPos.y == 21))
- || ((cellPos.x == 17) && (cellPos.y == 21))
- || ((cellPos.x == 17) && (cellPos.y == 5))
- || ((cellPos.x == 17) && (cellPos.y == 9))
- || ((cellPos.x == 29) && (cellPos.y == 17))
- || ((cellPos.x == 33) && (cellPos.y == 17))
- || ((cellPos.x == 35) && (cellPos.y == 17))
- || ((cellPos.x == 41) && (cellPos.y == 21)) ) {
- _laserPanel.postInit();
- event.handled = true;
- }
- }
-
- if ((cellId == 1) || (cellId == 4) || (cellId == 11) || (cellId == 14)) {
- if ( ((cellPos.x == 3) && (cellPos.y == 9))
- || ((cellPos.x == 11) && (cellPos.y == 27))
- || ((cellPos.x == 17) && (cellPos.y == 7))
- || ((cellPos.x == 17) && (cellPos.y == 27))
- || ((cellPos.x == 17) && (cellPos.y == 33))
- || (cellPos.x == 33) ) {
- switch (cellPos.x) {
- case 3:
- R2_GLOBALS._sceneManager.changeScene(3150);
- break;
- case 33:
- if (R2_GLOBALS._scientistConvIndex >= 4)
- R2_GLOBALS._sceneManager.changeScene(3250);
- else
- SceneItem::display(1200, 6, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, LIST_END);
- break;
- default:
- SceneItem::display(1200, 5, 0, 280, 1, 160, 9, 1, 2, 20, 7, 154, LIST_END);
- break;
- }
- event.handled = true;
- }
- }
- break;
- case CURSOR_LOOK:
- if ((cellId == 1) || (cellId == 4) || (cellId == 11) || (cellId == 14)) {
- event.handled = true;
- switch (cellPos.x) {
- case 3:
- // It was your cell.
- SceneItem::display(1200, 8, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- break;
- case 9:
- R2_GLOBALS._sceneManager.changeScene(3240);
- break;
- case 11:
- if (cellPos.y == 27)
- R2_GLOBALS._sceneManager.changeScene(3210);
- else
- // A vent grill
- SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- break;
- case 17:
- switch (cellPos.y) {
- case 5:
- R2_GLOBALS._sceneManager.changeScene(3230);
- break;
- case 21:
- R2_GLOBALS._sceneManager.changeScene(3220);
- break;
- case 33:
- R2_GLOBALS._sceneManager.changeScene(3200);
- break;
- default:
- // A vent grill
- SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- break;
- }
- break;
- case 33:
- R2_GLOBALS._sceneManager.changeScene(3245);
- break;
- default:
- SceneItem::display(1200, 10, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- break;
- }
- }
- if (cellId > 36) {
- // "An anti-pest laser"
- event.handled = true;
- SceneItem::display(1200, 9, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- }
- break;
- case CURSOR_TALK:
- event.handled = true;
- break;
- default:
- return;
- }
- } else if (event.eventType == EVENT_KEYPRESS) {
- if (_field414) {
- event.handled = false;
- return;
- }
-
- switch (event.kbd.keycode) {
- case Common::KEYCODE_KP8:
- case Common::KEYCODE_UP:
- startCrawling(CRAWL_NORTH);
- break;
- case Common::KEYCODE_KP4:
- case Common::KEYCODE_LEFT:
- startCrawling(CRAWL_WEST);
- break;
- case Common::KEYCODE_KP6:
- case Common::KEYCODE_RIGHT:
- startCrawling(CRAWL_EAST);
- break;
- case Common::KEYCODE_KP2:
- case Common::KEYCODE_DOWN:
- startCrawling(CRAWL_SOUTH);
- break;
- default:
- event.handled = false;
- return;
- break;
- }
- } else
- return;
-}
-
-void Scene1200::dispatch() {
- Rect tmpRect;
- Scene::dispatch();
-
- if (_fixupMaze) {
- _mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
- //_mazeUI.draw();
- _fixupMaze = false;
- }
-
- if (_field414 != 0) {
- tmpRect.set(110, 20, 210, 120);
- _field414--;
-
- switch (_nextCrawlDirection) {
- case CRAWL_EAST:
- R2_GLOBALS._ventCellPos.x += 2;
- break;
- case CRAWL_WEST:
- R2_GLOBALS._ventCellPos.x -= 2;
- break;
- case CRAWL_SOUTH:
- R2_GLOBALS._ventCellPos.y += 2;
- break;
- case CRAWL_NORTH:
- R2_GLOBALS._ventCellPos.y -= 2;
- break;
- default:
- break;
- }
-
- _mazeUI.setMazePosition(R2_GLOBALS._ventCellPos);
- //_mazeUI.draw();
-
- if (_field416 != 0) {
- switch(_nextCrawlDirection) {
- case CRAWL_EAST:
- R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x - 2, R2_GLOBALS._player._position.y));
- break;
- case CRAWL_WEST:
- R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x + 2, R2_GLOBALS._player._position.y));
- break;
- case CRAWL_SOUTH:
- R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y - 2));
- break;
- case CRAWL_NORTH:
- R2_GLOBALS._player.setPosition(Common::Point(R2_GLOBALS._player._position.x, R2_GLOBALS._player._position.y + 2));
- break;
- default:
- break;
- }
- }
- if (_field414 == 0) {
- if (_field416 == 0)
- R2_GLOBALS._player.animate(ANIM_MODE_NONE, NULL);
- signal();
- }
- }
-}
-
-void Scene1200::saveCharacter(int characterIndex) {
- R2_GLOBALS._sound1.fadeOut2(NULL);
- SceneExt::saveCharacter(characterIndex);
-}
-
-void Scene1200::startCrawling(CrawlDirection dir) {
- Common::Point cellPos = R2_GLOBALS._ventCellPos;
- _mazeUI.pixelToCellXY(cellPos);
-
- switch (dir) {
- case CRAWL_EAST:
- if ( ((_mazeUI.getCellFromPixelXY(Common::Point(200, 50)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(200, 88)) > 36))
- && ( ((cellPos.x == 3) && (cellPos.y == 33) && (_field418 != 4))
- || ((cellPos.x == 13) && (cellPos.y == 21) && (_field418 != 2))
- || ((cellPos.x == 29) && (cellPos.y == 17) && (_field418 != 1))
- || ((cellPos.x == 33) && (cellPos.y == 41)) )
- ) {
- R2_GLOBALS._player.disableControl();
- _sceneMode = 1200;
- setAction(&_sequenceManager, this, 1200, &_actor1, NULL);
- } else if (_mazeUI.getCellFromPixelXY(Common::Point(200, 69)) == 36) {
- switch (_nextCrawlDirection) {
- case CRAWL_EAST:
- if (R2_GLOBALS._player._visage == 3155)
- _sceneMode = 15;
- else
- _sceneMode = 10;
- break;
- case CRAWL_WEST:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 76;
- else
- _sceneMode = 75;
- break;
- case CRAWL_SOUTH:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 101;
- else
- _sceneMode = 100;
- break;
- case CRAWL_NORTH:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 111;
- else
- _sceneMode = 110;
- break;
- default:
- break;
- }
- R2_GLOBALS._player.disableControl();
- _nextCrawlDirection = 1;
- signal();
- }
- break;
- case CRAWL_WEST:
- if ( ((_mazeUI.getCellFromPixelXY(Common::Point(120, 50)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(120, 88)) > 36))
- && ( ((cellPos.x == 7) && (cellPos.y == 33) && (_field418 != 4))
- || ((cellPos.x == 17) && (cellPos.y == 21) && (_field418 != 2))
- || ((cellPos.x == 33) && (cellPos.y == 17) && (_field418 != 1))
- || ((cellPos.x == 5) && (cellPos.y == 5)) )
- ) {
- R2_GLOBALS._player.disableControl();
- _sceneMode = 1201;
- setAction(&_sequenceManager, this, 1201, &_actor1, NULL);
- } else if (_mazeUI.getCellFromPixelXY(Common::Point(120, 69)) == 36) {
- switch (_nextCrawlDirection) {
- case CRAWL_EAST:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 56;
- else
- _sceneMode = 55;
- break;
- case CRAWL_WEST:
- if (R2_GLOBALS._player._visage == 3155)
- _sceneMode = 25;
- else
- _sceneMode = 20;
- break;
- case CRAWL_SOUTH:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 91;
- else
- _sceneMode = 90;
- break;
- case CRAWL_NORTH:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 121;
- else
- _sceneMode = 120;
- break;
- default:
- break;
- }
- R2_GLOBALS._player.disableControl();
- _nextCrawlDirection = 2;
- signal();
- }
- break;
- case CRAWL_SOUTH:
- if ( ((_mazeUI.getCellFromPixelXY(Common::Point(140, 110)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(178, 110)) > 36))
- && ( ((cellPos.x == 17) && (cellPos.y == 5) && (_field418 != 3))
- || ((cellPos.x == 41) && (cellPos.y == 21)) )
- ) {
- R2_GLOBALS._player.disableControl();
- _sceneMode = 1203;
- setAction(&_sequenceManager, this, 1203, &_actor1, NULL);
- } else if (_mazeUI.getCellFromPixelXY(Common::Point(160, 110)) == 36) {
- switch (_nextCrawlDirection) {
- case CRAWL_EAST:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 51;
- else
- _sceneMode = 50;
- break;
- case CRAWL_WEST:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 81;
- else
- _sceneMode = 80;
- break;
- case CRAWL_SOUTH:
- if (R2_GLOBALS._player._visage == 3155)
- _sceneMode = 35;
- else
- _sceneMode = 30;
- break;
- case CRAWL_NORTH:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 116;
- else
- _sceneMode = 115;
- break;
- default:
- break;
- }
- R2_GLOBALS._player.disableControl();
- _nextCrawlDirection = 3;
- signal();
- }
- break;
- case CRAWL_NORTH:
- if ( ((_mazeUI.getCellFromPixelXY(Common::Point(140, 30)) > 36) || (_mazeUI.getCellFromPixelXY(Common::Point(178, 30)) > 36))
- && ( ((cellPos.x == 17) && (cellPos.y == 9) && (_field418 != 3))
- || ((cellPos.x == 35) && (cellPos.y == 17)) )
- ) {
- R2_GLOBALS._player.disableControl();
- _sceneMode = 1202;
- setAction(&_sequenceManager, this, 1202, &_actor1, NULL);
- } else if (_mazeUI.getCellFromPixelXY(Common::Point(160, 30)) == 36) {
- switch (_nextCrawlDirection) {
- case CRAWL_EAST:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 61;
- else
- _sceneMode = 60;
- break;
- case CRAWL_WEST:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 71;
- else
- _sceneMode = 70;
- break;
- case CRAWL_SOUTH:
- if (R2_GLOBALS._player._visage == 3156)
- _sceneMode = 96;
- else
- _sceneMode = 95;
- break;
- case CRAWL_NORTH:
- if (R2_GLOBALS._player._visage == 3155)
- _sceneMode = 45;
- else
- _sceneMode = 40;
- break;
- default:
- _sceneMode = 1;
- R2_GLOBALS._player.setup(3156, 4, 6);
- break;
- }
- R2_GLOBALS._player.disableControl();
- _nextCrawlDirection = 4;
- signal();
- }
- break;
- default:
- break;
- }
-}
-
-/*--------------------------------------------------------------------------
- * Scene 1337 - Card game
- *
- *--------------------------------------------------------------------------*/
-
-Scene1337::Card::Card() {
- _cardId = 0;
- _stationPos = Common::Point(0, 0);
-}
-
-void Scene1337::Card::synchronize(Serializer &s) {
- warning("STUBBED: Card::synchronize()");
-}
-
-bool Scene1337::Card::isIn(Common::Point pt) {
- if ((_stationPos.x > pt.x) || (_stationPos.x + 24 < pt.x))
- return false;
-
- if ((_stationPos.y > pt.y) || (_stationPos.y + 24 < pt.y))
- return false;
-
- return true;
-}
-
-Scene1337::GameBoardSide::GameBoardSide() {
- _card1Pos = Common::Point(0, 0);
- _card2Pos = Common::Point(0, 0);
- _card3Pos = Common::Point(0, 0);
- _card4Pos = Common::Point(0, 0);
- _frameNum = 0;
-}
-
-void Scene1337::GameBoardSide::synchronize(Serializer &s) {
- warning("STUBBED: GameBoardSide::synchronize()");
-}
-
-Scene1337::Scene1337() {
- _autoplay = false;
- _cardsAvailableNumb = 0;
- _currentDiscardIndex = 0;
-
- for (int i = 0; i < 100; i++)
- _availableCardsPile[i] = 0;
-
- _shuffleEndedFl = false;
- _currentPlayerNumb = 0;
- _actionIdx1 = 0;
- _actionIdx2 = 0;
- _showPlayerTurn = false;
- _displayHelpFl = false;
- _winnerId = -1;
- _instructionsDisplayedFl = false;
- _instructionsWaitCount = 0;
-
- _delayedFunction = nullptr;
- _actionCard1 = nullptr;
- _actionCard2 = nullptr;
- _actionCard3 = nullptr;
-
- _cursorCurRes = 0;
- _cursorCurStrip = 0;
- _cursorCurFrame = 0;
-}
-
-void Scene1337::synchronize(Serializer &s) {
- warning("STUBBED: Scene1337::synchronize()");
-}
-
-void Scene1337::Action1337::waitFrames(int32 frameCount) {
- uint32 firstFrameNumber = g_globals->_events.getFrameNumber();
- uint32 curFrame = firstFrameNumber;
- uint32 destFrame = firstFrameNumber + frameCount;
-
- while ((curFrame < destFrame) && !g_vm->shouldQuit()) {
- TsAGE::Event event;
- g_globals->_events.getEvent(event);
- curFrame = g_globals->_events.getFrameNumber();
- }
-
- // CHECKME: The original is calling _eventManager.waitEvent();
-}
-
-/**
- * Display instructions
- */
-void Scene1337::Action1::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 1: {
- scene->actionDisplay(1331, 6, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- R2_GLOBALS._sceneObjects->draw();
- scene->actionDisplay(1331, 7, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- scene->actionDisplay(1331, 8, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- scene->_gameBoardSide[1]._outpostStation[0]._cardId = 2;
- scene->_gameBoardSide[1]._outpostStation[0]._card.postInit();
- scene->_gameBoardSide[1]._outpostStation[0]._card.setVisage(1332);
- scene->_gameBoardSide[1]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[1]._outpostStation[0]._stationPos, 0);
- scene->_gameBoardSide[1]._outpostStation[0]._card.setStrip(2);
- scene->_gameBoardSide[1]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[1]._outpostStation[0]._cardId);
- scene->_gameBoardSide[1]._outpostStation[0]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[1]._outpostStation[0]);
-
- scene->_gameBoardSide[1]._outpostStation[1]._cardId = 3;
- scene->_gameBoardSide[1]._outpostStation[1]._card.postInit();
- scene->_gameBoardSide[1]._outpostStation[1]._card.setVisage(1332);
- scene->_gameBoardSide[1]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[1]._outpostStation[1]._stationPos, 0);
- scene->_gameBoardSide[1]._outpostStation[1]._card.setStrip(2);
- scene->_gameBoardSide[1]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[1]._outpostStation[1]._cardId);
- scene->_gameBoardSide[1]._outpostStation[1]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[1]._outpostStation[1]);
-
- scene->_gameBoardSide[2]._outpostStation[0]._cardId = 4;
- scene->_gameBoardSide[2]._outpostStation[0]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[0]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[0]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[0]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[0]._cardId);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[0]);
-
- scene->_gameBoardSide[3]._outpostStation[0]._cardId = 5;
- scene->_gameBoardSide[3]._outpostStation[0]._card.postInit();
- scene->_gameBoardSide[3]._outpostStation[0]._card.setVisage(1332);
- scene->_gameBoardSide[3]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[0]._stationPos, 0);
- scene->_gameBoardSide[3]._outpostStation[0]._card.setStrip(2);
- scene->_gameBoardSide[3]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[0]._cardId);
- scene->_gameBoardSide[3]._outpostStation[0]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[0]);
-
- scene->_gameBoardSide[3]._outpostStation[1]._cardId = 6;
- scene->_gameBoardSide[3]._outpostStation[1]._card.postInit();
- scene->_gameBoardSide[3]._outpostStation[1]._card.setVisage(1332);
- scene->_gameBoardSide[3]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[1]._stationPos, 0);
- scene->_gameBoardSide[3]._outpostStation[1]._card.setStrip(2);
- scene->_gameBoardSide[3]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[1]._cardId);
- scene->_gameBoardSide[3]._outpostStation[1]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[1]);
-
- scene->_gameBoardSide[3]._outpostStation[2]._cardId = 7;
- scene->_gameBoardSide[3]._outpostStation[2]._card.postInit();
- scene->_gameBoardSide[3]._outpostStation[2]._card.setVisage(1332);
- scene->_gameBoardSide[3]._outpostStation[2]._card.setPosition(scene->_gameBoardSide[3]._outpostStation[2]._stationPos, 0);
- scene->_gameBoardSide[3]._outpostStation[2]._card.setStrip(2);
- scene->_gameBoardSide[3]._outpostStation[2]._card.setFrame(scene->_gameBoardSide[3]._outpostStation[2]._cardId);
- scene->_gameBoardSide[3]._outpostStation[2]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[3]._outpostStation[2]);
-
- scene->_gameBoardSide[0]._outpostStation[0]._cardId = 8;
- scene->_gameBoardSide[0]._outpostStation[0]._card.postInit();
- scene->_gameBoardSide[0]._outpostStation[0]._card.setVisage(1332);
- scene->_gameBoardSide[0]._outpostStation[0]._card.setPosition(scene->_gameBoardSide[0]._outpostStation[0]._stationPos, 0);
- scene->_gameBoardSide[0]._outpostStation[0]._card.setStrip(2);
- scene->_gameBoardSide[0]._outpostStation[0]._card.setFrame(scene->_gameBoardSide[0]._outpostStation[0]._cardId);
- scene->_gameBoardSide[0]._outpostStation[0]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[0]._outpostStation[0]);
-
- scene->_gameBoardSide[0]._outpostStation[1]._cardId = 9;
- scene->_gameBoardSide[0]._outpostStation[1]._card.postInit();
- scene->_gameBoardSide[0]._outpostStation[1]._card.setVisage(1332);
- scene->_gameBoardSide[0]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[0]._outpostStation[1]._stationPos, 0);
- scene->_gameBoardSide[0]._outpostStation[1]._card.setStrip(2);
- scene->_gameBoardSide[0]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[0]._outpostStation[1]._cardId);
- scene->_gameBoardSide[0]._outpostStation[1]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[0]._outpostStation[1]);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(60);
- scene->actionDisplay(1331, 9, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- scene->_gameBoardSide[2]._outpostStation[1]._cardId = 2;
- scene->_gameBoardSide[2]._outpostStation[1]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[1]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[1]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[1]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[1]._cardId);
- scene->_gameBoardSide[2]._outpostStation[1]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]);
-
- scene->_gameBoardSide[2]._outpostStation[2]._cardId = 3;
- scene->_gameBoardSide[2]._outpostStation[2]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[2]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[2]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[2]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[2]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[2]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[2]._cardId);
- scene->_gameBoardSide[2]._outpostStation[2]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[2]);
-
- scene->_gameBoardSide[2]._outpostStation[3]._cardId = 5;
- scene->_gameBoardSide[2]._outpostStation[3]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[3]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[3]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[3]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[3]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[3]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[3]._cardId);
- scene->_gameBoardSide[2]._outpostStation[3]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[3]);
-
- scene->_gameBoardSide[2]._outpostStation[4]._cardId = 6;
- scene->_gameBoardSide[2]._outpostStation[4]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[4]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[4]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[4]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[4]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[4]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[4]._cardId);
- scene->_gameBoardSide[2]._outpostStation[4]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[4]);
-
- scene->_gameBoardSide[2]._outpostStation[5]._cardId = 7;
- scene->_gameBoardSide[2]._outpostStation[5]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[5]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[5]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[5]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[5]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[5]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[5]._cardId);
- scene->_gameBoardSide[2]._outpostStation[5]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[5]);
-
- scene->_gameBoardSide[2]._outpostStation[6]._cardId = 8;
- scene->_gameBoardSide[2]._outpostStation[6]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[6]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[6]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[6]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[6]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[6]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[6]._cardId);
- scene->_gameBoardSide[2]._outpostStation[6]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[6]);
-
- scene->_gameBoardSide[2]._outpostStation[7]._cardId = 9;
- scene->_gameBoardSide[2]._outpostStation[7]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[7]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[7]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[7]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[7]._card.setStrip(2);
- scene->_gameBoardSide[2]._outpostStation[7]._card.setFrame(scene->_gameBoardSide[2]._outpostStation[7]._cardId);
- scene->_gameBoardSide[2]._outpostStation[7]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[7]);
-
- scene->_aSound1.play(62);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(120);
- scene->_gameBoardSide[2]._outpostStation[0]._card.remove();
- scene->_gameBoardSide[2]._outpostStation[1]._card.remove();
- scene->_gameBoardSide[2]._outpostStation[2]._card.remove();
- scene->_gameBoardSide[2]._outpostStation[3]._card.remove();
- scene->_gameBoardSide[2]._outpostStation[4]._card.remove();
- scene->_gameBoardSide[2]._outpostStation[5]._card.remove();
- scene->_gameBoardSide[2]._outpostStation[6]._card.remove();
- scene->_gameBoardSide[2]._outpostStation[7]._card.remove();
-
- scene->_gameBoardSide[1]._outpostStation[0]._card.remove();
- scene->_gameBoardSide[1]._outpostStation[1]._card.remove();
-
- scene->_gameBoardSide[3]._outpostStation[0]._card.remove();
- scene->_gameBoardSide[3]._outpostStation[1]._card.remove();
- scene->_gameBoardSide[3]._outpostStation[2]._card.remove();
-
- scene->_gameBoardSide[0]._outpostStation[0]._card.remove();
- scene->_gameBoardSide[0]._outpostStation[1]._card.remove();
-
- scene->_stockPile.setup(1332, 5, 1);
- scene->_stockPile.setPosition(Common::Point(165, 95));
- scene->_stockPile.setPriority(110);
- scene->_stockPile._effect = EFFECT_SHADED;
- scene->_stockPile.show();
-
- scene->_gameBoardSide[1]._handCard[0]._card.postInit();
- scene->_gameBoardSide[1]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[1]._handCard[0]._card.setPosition(scene->_gameBoardSide[1]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[1]._handCard[0]._card.setStrip(1);
- scene->_gameBoardSide[1]._handCard[0]._card.setFrame(4);
- scene->_gameBoardSide[1]._handCard[0]._card.fixPriority(170);
-
- scene->_gameBoardSide[1]._handCard[1]._card.postInit();
- scene->_gameBoardSide[1]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[1]._handCard[1]._card.setPosition(scene->_gameBoardSide[1]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[1]._handCard[1]._card.setStrip(1);
- scene->_gameBoardSide[1]._handCard[1]._card.setFrame(4);
- scene->_gameBoardSide[1]._handCard[1]._card.fixPriority(170);
-
- scene->_gameBoardSide[1]._handCard[2]._card.postInit();
- scene->_gameBoardSide[1]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[1]._handCard[2]._card.setPosition(scene->_gameBoardSide[1]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[1]._handCard[2]._card.setStrip(1);
- scene->_gameBoardSide[1]._handCard[2]._card.setFrame(4);
- scene->_gameBoardSide[1]._handCard[2]._card.fixPriority(170);
-
- scene->_gameBoardSide[2]._handCard[0]._cardId = 30;
- scene->_gameBoardSide[2]._handCard[0]._card.postInit();
- scene->_gameBoardSide[2]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[2]._handCard[0]._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[2]._handCard[0]._card.setStrip(1);
- scene->_gameBoardSide[2]._handCard[0]._card.setFrame(2);
- scene->_gameBoardSide[2]._handCard[0]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[0]);
-
- scene->_gameBoardSide[2]._handCard[1]._cardId = 16;
- scene->_gameBoardSide[2]._handCard[1]._card.postInit();
- scene->_gameBoardSide[2]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[2]._handCard[1]._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[2]._handCard[1]._card.setStrip(1);
- scene->_gameBoardSide[2]._handCard[1]._card.setFrame(2);
- scene->_gameBoardSide[2]._handCard[1]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[1]);
-
- scene->_gameBoardSide[2]._handCard[2]._cardId = 1;
- scene->_gameBoardSide[2]._handCard[2]._card.postInit();
- scene->_gameBoardSide[2]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[2]._handCard[2]._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[2]._handCard[2]._card.setStrip(1);
- scene->_gameBoardSide[2]._handCard[2]._card.setFrame(2);
- scene->_gameBoardSide[2]._handCard[2]._card.fixPriority(170);
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[2]);
-
- scene->_gameBoardSide[3]._handCard[0]._card.postInit();
- scene->_gameBoardSide[3]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[3]._handCard[0]._card.setPosition(scene->_gameBoardSide[3]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[3]._handCard[0]._card.setStrip(1);
- scene->_gameBoardSide[3]._handCard[0]._card.setFrame(3);
- scene->_gameBoardSide[3]._handCard[0]._card.fixPriority(170);
-
- scene->_gameBoardSide[3]._handCard[1]._card.postInit();
- scene->_gameBoardSide[3]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[3]._handCard[1]._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[3]._handCard[1]._card.setStrip(1);
- scene->_gameBoardSide[3]._handCard[1]._card.setFrame(3);
- scene->_gameBoardSide[3]._handCard[1]._card.fixPriority(170);
-
- scene->_gameBoardSide[3]._handCard[2]._card.postInit();
- scene->_gameBoardSide[3]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[3]._handCard[2]._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[3]._handCard[2]._card.setStrip(1);
- scene->_gameBoardSide[3]._handCard[2]._card.setFrame(3);
- scene->_gameBoardSide[3]._handCard[2]._card.fixPriority(170);
-
- scene->_gameBoardSide[0]._handCard[0]._card.postInit();
- scene->_gameBoardSide[0]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[0]._handCard[0]._card.setPosition(scene->_gameBoardSide[0]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[0]._handCard[0]._card.setStrip(1);
- scene->_gameBoardSide[0]._handCard[0]._card.setFrame(2);
- scene->_gameBoardSide[0]._handCard[0]._card.fixPriority(170);
-
- scene->_gameBoardSide[0]._handCard[1]._card.postInit();
- scene->_gameBoardSide[0]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[0]._handCard[1]._card.setPosition(scene->_gameBoardSide[0]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[0]._handCard[1]._card.setStrip(1);
- scene->_gameBoardSide[0]._handCard[1]._card.setFrame(2);
- scene->_gameBoardSide[0]._handCard[1]._card.fixPriority(170);
-
- scene->_gameBoardSide[0]._handCard[2]._card.postInit();
- scene->_gameBoardSide[0]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[0]._handCard[2]._card.setPosition(scene->_gameBoardSide[0]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[0]._handCard[2]._card.setStrip(1);
- scene->_gameBoardSide[0]._handCard[2]._card.setFrame(2);
- scene->_gameBoardSide[0]._handCard[2]._card.fixPriority(170);
-
- R2_GLOBALS._sceneObjects->draw();
-
- scene->actionDisplay(1331, 10, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
- scene->_animatedCard._card.show();
- scene->_aSound2.play(61);
-
- Common::Point pt(91, 174);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
- }
- break;
- case 2: {
- scene->_gameBoardSide[2]._handCard[3]._cardId = 2;
- scene->_gameBoardSide[2]._handCard[3]._card.postInit();
- scene->_gameBoardSide[2]._handCard[3]._card.setVisage(1332);
- scene->_gameBoardSide[2]._handCard[3]._card.setPosition(scene->_gameBoardSide[2]._handCard[3]._stationPos, 0);
- scene->_gameBoardSide[2]._handCard[3]._card.setStrip(1);
- scene->_gameBoardSide[2]._handCard[3]._card.setFrame(2);
- scene->_gameBoardSide[2]._handCard[3]._card.fixPriority(170);
-
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._handCard[3]);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(60);
- scene->actionDisplay(1331, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- scene->actionDisplay(1331, 12, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- scene->_gameBoardSide[2]._outpostStation[1]._cardId = 1;
- scene->_gameBoardSide[2]._outpostStation[1]._card.postInit();
- scene->_gameBoardSide[2]._outpostStation[1]._card.setVisage(1332);
- scene->_gameBoardSide[2]._outpostStation[1]._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0);
- scene->_gameBoardSide[2]._outpostStation[1]._card.hide();
-
- scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[2]._card._strip);
- scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._card._frame);
- scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL);
-
- scene->_gameBoardSide[2]._handCard[2]._cardId = 0;
- scene->_gameBoardSide[2]._handCard[2]._card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._outpostStation[1]._stationPos, this);
- }
- break;
- case 3: {
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]);
- scene->_aSound1.play(59);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(60);
- scene->actionDisplay(1331, 13, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- scene->_gameBoardSide[2]._outpostStation[1]._cardId = scene->_gameBoardSide[2]._handCard[3]._cardId;
-
- scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[3]._card._strip);
- scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[3]._card._frame);
-
- scene->_gameBoardSide[2]._handCard[3]._cardId = 0;
- scene->_gameBoardSide[2]._handCard[3]._card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[3]._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._outpostStation[1]._stationPos, this);
- }
- break;
- case 4: {
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._outpostStation[1]);
- scene->_aSound1.play(59);
-
- scene->_discardPile._cardId = 1;
- scene->_discardPile._card.hide();
-
- scene->_animatedCard._card.setStrip(5);
- scene->_animatedCard._card.setFrame(1);
- scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._outpostStation[1]._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
- }
- break;
- case 5: {
- scene->_animatedCard._card.hide();
-
- scene->_discardPile._card.postInit();
- scene->_discardPile._card.setVisage(1332);
- scene->_discardPile._card.setPosition(scene->_discardPile._stationPos, 0);
- scene->setAnimationInfo(&scene->_discardPile);
- scene->_aSound2.play(61);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(60);
- scene->actionDisplay(1331, 14, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- scene->_gameBoardSide[2]._delayCard._card.postInit();
- scene->_gameBoardSide[2]._delayCard._card.setVisage(1332);
- scene->_gameBoardSide[2]._delayCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
- scene->_gameBoardSide[2]._delayCard._card.hide();
-
- scene->_gameBoardSide[3]._handCard[2]._cardId = 0;
- scene->_gameBoardSide[3]._handCard[2].remove();
-
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayCard._stationPos, this);
- }
- break;
- case 6: {
- scene->_animatedCard._card.hide();
- scene->_gameBoardSide[2]._delayCard._cardId = 21;
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._delayCard);
- scene->_aSound1.play(57);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(60);
- scene->actionDisplay(1331, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- int tmpVal = 15;
- int i = -1;
-
- for (i = 0; i <= 7; i++) {
- tmpVal += 29;
-
- scene->_upperDisplayCard[i].postInit();
- scene->_upperDisplayCard[i].setVisage(1332);
- scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 90), 0);
- scene->_upperDisplayCard[i].setStrip(3);
- scene->_upperDisplayCard[i].fixPriority(190);
-
- scene->_lowerDisplayCard[i].postInit();
- scene->_lowerDisplayCard[i].setVisage(1332);
- scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 90), 0);
- scene->_lowerDisplayCard[i].setStrip(7);
- scene->_lowerDisplayCard[i].setFrame(1);
- scene->_lowerDisplayCard[i].fixPriority(180);
- }
-
- scene->_upperDisplayCard[0].setFrame(1);
- scene->_upperDisplayCard[1].setFrame(3);
- scene->_upperDisplayCard[2].setFrame(6);
- scene->_upperDisplayCard[3].setFrame(8);
- scene->_upperDisplayCard[4].setFrame(9);
- scene->_upperDisplayCard[5].setFrame(10);
- scene->_upperDisplayCard[6].setFrame(11);
- scene->_upperDisplayCard[7].setFrame(12);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(240);
-
- scene->_upperDisplayCard[0].remove();
- scene->_upperDisplayCard[1].remove();
- scene->_upperDisplayCard[2].remove();
- scene->_upperDisplayCard[3].remove();
- scene->_upperDisplayCard[4].remove();
- scene->_upperDisplayCard[5].remove();
- scene->_upperDisplayCard[6].remove();
- scene->_upperDisplayCard[7].remove();
-
- scene->_lowerDisplayCard[0].remove();
- scene->_lowerDisplayCard[1].remove();
- scene->_lowerDisplayCard[2].remove();
- scene->_lowerDisplayCard[3].remove();
- scene->_lowerDisplayCard[4].remove();
- scene->_lowerDisplayCard[5].remove();
- scene->_lowerDisplayCard[6].remove();
- scene->_lowerDisplayCard[7].remove();
-
- scene->_discardPile._cardId = scene->_gameBoardSide[2]._delayCard._cardId;
-
- scene->_gameBoardSide[2]._delayCard._cardId = 0;
- scene->_gameBoardSide[2]._delayCard._card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
- }
- break;
- case 7: {
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(&scene->_discardPile);
- scene->_aSound2.play(61);
-
- R2_GLOBALS._sceneObjects->draw();
-
- scene->_gameBoardSide[2]._delayCard._card.postInit();
- scene->_gameBoardSide[2]._delayCard._card.setVisage(1332);
- scene->_gameBoardSide[2]._delayCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
- scene->_gameBoardSide[2]._delayCard._card.hide();
-
- scene->_gameBoardSide[3]._handCard[1]._cardId = 0;
- scene->_gameBoardSide[3]._handCard[1].remove();
-
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayCard._stationPos, this);
- }
- break;
- case 8: {
- scene->_animatedCard._card.hide();
- scene->_gameBoardSide[2]._delayCard._cardId = 14;
- scene->setAnimationInfo(&scene->_gameBoardSide[2]._delayCard);
- scene->_aSound1.play(57);
-
- R2_GLOBALS._sceneObjects->draw();
-
- scene->actionDisplay(1331, 16, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- int tmpVal = 72;
- int i = -1;
-
- for (i = 0; i <= 3; i++) {
- tmpVal += 29;
- scene->_upperDisplayCard[i].postInit();
- scene->_upperDisplayCard[i].setVisage(1332);
- scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 71), 0);
- scene->_upperDisplayCard[i].setStrip(3);
- scene->_upperDisplayCard[i].fixPriority(190);
-
- scene->_lowerDisplayCard[i].postInit();
- scene->_lowerDisplayCard[i].setVisage(1332);
- scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 71), 0);
- scene->_lowerDisplayCard[i].setStrip(7);
- scene->_lowerDisplayCard[i].setFrame(1);
- scene->_lowerDisplayCard[i].fixPriority(180);
- }
-
- scene->_upperDisplayCard[0].setFrame(2);
- scene->_upperDisplayCard[1].setFrame(5);
- scene->_upperDisplayCard[2].setFrame(7);
- scene->_upperDisplayCard[3].setFrame(15);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(240);
- scene->actionDisplay(1331, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- tmpVal = 72;
- for (i = 4; i <= 7; i++) {
- tmpVal += 29;
-
- scene->_upperDisplayCard[i].postInit();
- scene->_upperDisplayCard[i].setVisage(1332);
- scene->_upperDisplayCard[i].setPosition(Common::Point(tmpVal, 100), 0);
- scene->_upperDisplayCard[i].setStrip(4);
- scene->_upperDisplayCard[i].fixPriority(190);
-
- scene->_lowerDisplayCard[i].postInit();
- scene->_lowerDisplayCard[i].setVisage(1332);
- scene->_lowerDisplayCard[i].setPosition(Common::Point(tmpVal, 100), 0);
- scene->_lowerDisplayCard[i].setStrip(7);
- scene->_lowerDisplayCard[i].setFrame(1);
- scene->_lowerDisplayCard[i].fixPriority(180);
- }
-
- scene->_upperDisplayCard[4].setFrame(1);
- scene->_upperDisplayCard[5].setFrame(5);
- scene->_upperDisplayCard[6].setFrame(7);
- scene->_upperDisplayCard[7].setFrame(3);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(240);
-
- scene->_upperDisplayCard[0].remove();
- scene->_upperDisplayCard[1].remove();
- scene->_upperDisplayCard[2].remove();
- scene->_upperDisplayCard[3].remove();
- scene->_upperDisplayCard[4].remove();
- scene->_upperDisplayCard[5].remove();
- scene->_upperDisplayCard[6].remove();
- scene->_upperDisplayCard[7].remove();
-
- scene->_lowerDisplayCard[0].remove();
- scene->_lowerDisplayCard[1].remove();
- scene->_lowerDisplayCard[2].remove();
- scene->_lowerDisplayCard[3].remove();
- scene->_lowerDisplayCard[4].remove();
- scene->_lowerDisplayCard[5].remove();
- scene->_lowerDisplayCard[6].remove();
- scene->_lowerDisplayCard[7].remove();
-
- scene->_discardPile._cardId = scene->_gameBoardSide[2]._handCard[0]._cardId;
-
- scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[0]._card._strip);
- scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._card._frame);
- scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL);
-
- scene->_gameBoardSide[2]._handCard[0]._cardId = 0;
- scene->_gameBoardSide[2]._handCard[0]._card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[2]._delayCard._stationPos, this);
- }
- break;
- case 9: {
- scene->_aSound1.play(58);
- scene->_gameBoardSide[2]._delayCard._cardId = 0;
- scene->_gameBoardSide[2]._delayCard.remove();
- scene->_animatedCard._card.setStrip(5);
- scene->_animatedCard._card.setFrame(1);
- scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._delayCard._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
- }
- break;
- case 10: {
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(&scene->_discardPile);
- scene->_aSound2.play(61);
-
- R2_GLOBALS._sceneObjects->draw();
- scene->actionDisplay(1331, 18, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- scene->_upperDisplayCard[0].postInit();
- scene->_upperDisplayCard[0].setVisage(1332);
- scene->_upperDisplayCard[0].setPosition(Common::Point(131, 71), 0);
- scene->_upperDisplayCard[0].fixPriority(190);
- scene->_upperDisplayCard[0].setStrip(3);
- scene->_upperDisplayCard[0].setFrame(4);
-
- scene->_lowerDisplayCard[0].postInit();
- scene->_lowerDisplayCard[0].setVisage(1332);
- scene->_lowerDisplayCard[0].setPosition(Common::Point(131, 71), 0);
- scene->_lowerDisplayCard[0].setStrip(7);
- scene->_lowerDisplayCard[0].setFrame(1);
- scene->_lowerDisplayCard[0].fixPriority(180);
-
- scene->_upperDisplayCard[1].postInit();
- scene->_upperDisplayCard[1].setVisage(1332);
- scene->_upperDisplayCard[1].setPosition(Common::Point(160, 71), 0);
- scene->_upperDisplayCard[1].fixPriority(190);
- scene->_upperDisplayCard[1].setStrip(3);
- scene->_upperDisplayCard[1].setFrame(16);
-
- scene->_lowerDisplayCard[1].postInit();
- scene->_lowerDisplayCard[1].setVisage(1332);
- scene->_lowerDisplayCard[1].setPosition(Common::Point(160, 71), 0);
- scene->_lowerDisplayCard[1].setStrip(7);
- scene->_lowerDisplayCard[1].setFrame(1);
- scene->_lowerDisplayCard[1].fixPriority(180);
-
- scene->_upperDisplayCard[2].postInit();
- scene->_upperDisplayCard[2].setVisage(1332);
- scene->_upperDisplayCard[2].setPosition(Common::Point(131, 100), 0);
- scene->_upperDisplayCard[2].fixPriority(190);
- scene->_upperDisplayCard[2].setStrip(4);
- scene->_upperDisplayCard[2].setFrame(4);
-
- scene->_lowerDisplayCard[2].postInit();
- scene->_lowerDisplayCard[2].setVisage(1332);
- scene->_lowerDisplayCard[2].setPosition(Common::Point(131, 100), 0);
- scene->_lowerDisplayCard[2].setStrip(7);
- scene->_lowerDisplayCard[2].setFrame(1);
- scene->_lowerDisplayCard[2].fixPriority(180);
-
- scene->_upperDisplayCard[3].postInit();
- scene->_upperDisplayCard[3].setVisage(1332);
- scene->_upperDisplayCard[3].setPosition(Common::Point(160, 100), 0);
- scene->_upperDisplayCard[3].fixPriority(190);
- scene->_upperDisplayCard[3].setStrip(4);
- scene->_upperDisplayCard[3].setFrame(2);
-
- scene->_lowerDisplayCard[3].postInit();
- scene->_lowerDisplayCard[3].setVisage(1332);
- scene->_lowerDisplayCard[3].setPosition(Common::Point(160, 100), 0);
- scene->_lowerDisplayCard[3].setStrip(7);
- scene->_lowerDisplayCard[3].setFrame(1);
- scene->_lowerDisplayCard[3].fixPriority(180);
-
- R2_GLOBALS._sceneObjects->draw();
-
- waitFrames(240);
-
- scene->_upperDisplayCard[0].remove();
- scene->_upperDisplayCard[1].remove();
- scene->_upperDisplayCard[2].remove();
- scene->_upperDisplayCard[3].remove();
-
- scene->_lowerDisplayCard[0].remove();
- scene->_lowerDisplayCard[1].remove();
- scene->_lowerDisplayCard[2].remove();
- scene->_lowerDisplayCard[3].remove();
-
- scene->_currentPlayerArrow.setFrame(1);
- scene->_currentPlayerArrow.show();
- scene->_currentPlayerArrow.animate(ANIM_MODE_2, NULL);
-
- R2_GLOBALS._sceneObjects->draw();
-
- scene->actionDisplay(1331, 19, 159, 10, 1, 220, 0, 7, 0, 154, 154);
-
- scene->_currentPlayerArrow.hide();
-
- scene->actionDisplay(1331, 20, 159, 10, 1, 220, 0, 7, 0, 154, 154);
- scene->actionDisplay(1331, 21, 159, 10, 1, 220, 0, 7, 0, 154, 154);
-
- scene->_discardPile._cardId = scene->_gameBoardSide[2]._handCard[1]._cardId;
-
- scene->_animatedCard._card.setStrip(scene->_gameBoardSide[2]._handCard[1]._card._strip);
- scene->_animatedCard._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._card._frame);
- scene->_animatedCard._card.animate(ANIM_MODE_NONE, NULL);
-
- scene->_gameBoardSide[2]._handCard[1]._cardId = 0;
- scene->_gameBoardSide[2]._handCard[1]._card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_discardPile._stationPos, this);
- }
- break;
- case 11: {
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(&scene->_discardPile);
- scene->_aSound2.play(61);
- scene->_animatedCard._card.setStrip(5);
- scene->_animatedCard._card.setFrame(1);
- scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
-
- R2_GLOBALS._sceneObjects->draw();
-
- scene->actionDisplay(1331, 22, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- int i = -1;
- for (i = 0; i <= 3; i ++) {
- scene->_gameBoardSide[3]._handCard[i]._cardId = 0;
- scene->_gameBoardSide[3]._handCard[i]._card.remove();
-
- scene->_gameBoardSide[2]._handCard[i]._cardId = 0;
- scene->_gameBoardSide[2]._handCard[i]._card.remove();
-
- scene->_gameBoardSide[0]._handCard[i]._cardId = 0;
- scene->_gameBoardSide[0]._handCard[i]._card.remove();
-
- scene->_gameBoardSide[1]._handCard[i]._cardId = 0;
- scene->_gameBoardSide[1]._handCard[i]._card.remove();
- }
-
- for (i = 0; i <= 7; i++) {
- scene->_gameBoardSide[3]._outpostStation[i]._cardId = 0;
- scene->_gameBoardSide[3]._outpostStation[i]._card.remove();
-
- scene->_gameBoardSide[2]._outpostStation[i]._cardId = 0;
- scene->_gameBoardSide[2]._outpostStation[i]._card.remove();
-
- scene->_gameBoardSide[0]._outpostStation[i]._cardId = 0;
- scene->_gameBoardSide[0]._outpostStation[i]._card.remove();
-
- scene->_gameBoardSide[1]._outpostStation[i]._cardId = 0;
- scene->_gameBoardSide[1]._outpostStation[i]._card.remove();
- }
-
- scene->_gameBoardSide[2]._delayCard._cardId = 0;
- scene->_gameBoardSide[2]._delayCard._card.remove();
-
- scene->_discardPile._cardId = 0;
- scene->_discardPile._card.remove();
-
- scene->_stockPile.remove();
- }
- // No break on purpose
- case 0:
- R2_GLOBALS._sceneObjects->draw();
- signal();
- break;
- case 12:
- scene->suggestInstructions();
- remove();
- break;
- default:
- break;
- }
-}
-
-/**
- * Shuffle cards animation
- */
-void Scene1337::Action2::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0:
- scene->_shuffleAnimation._card.postInit();
- scene->_shuffleAnimation._card.setVisage(1332);
- scene->_shuffleAnimation._card.setStrip(8);
- scene->_shuffleAnimation._card.setFrame(1);
- scene->_shuffleAnimation._card.fixPriority(300);
- scene->_shuffleAnimation._card.setPosition(Common::Point(156, 108));
-
- scene->_discardPile._card.remove();
- scene->_discardPile._cardId = 0;
-
- scene->_aSound1.play(60);
- scene->_shuffleAnimation._card.animate(ANIM_MODE_5, this);
- break;
- case 1:
- scene->_shuffleAnimation._card.setFrame(1);
-
- scene->_aSound1.play(60);
- scene->_shuffleAnimation._card.animate(ANIM_MODE_5, this);
- break;
- case 2: {
- Common::Point pt(156, 108);
- NpcMover *mover = new NpcMover();
- scene->_shuffleAnimation._card.addMover(mover, &pt, this);
- }
- break;
- case 3:
- scene->_shuffleAnimation._card.remove();
- scene->_stockPile.setup(1332, 5, 1);
- scene->_stockPile.setPosition(Common::Point(162, 95));
- scene->_stockPile.setPriority(110);
- scene->_stockPile._effect = EFFECT_SHADED;
- scene->_stockPile.show();
- scene->_shuffleEndedFl = true;
- break;
- default:
- break;
- }
-}
-
-/**
- * Deal cards
- */
-void Scene1337::Action3::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
-
- switch (_actionIndex++) {
- case 0: {
- scene->_animatedCard._card._moveDiff = Common::Point(30, 30);
- scene->_animatedCard._card.setVisage(1332);
- scene->_animatedCard._card.setStrip(5);
- scene->_animatedCard._card.setFrame(1);
- scene->_animatedCard._card.fixPriority(400);
- scene->_animatedCard._card.animate(ANIM_MODE_2, NULL);
- scene->_aSound2.play(61);
-
- Common::Point pt(283, 146);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_animatedCard._card.show();
- scene->_gameBoardSide[1]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 1: {
- scene->_gameBoardSide[1]._handCard[0]._card.postInit();
- scene->_gameBoardSide[1]._handCard[0]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[1]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[1]._handCard[0]._card.setPosition(scene->_gameBoardSide[1]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[1]._handCard[0]._card.setStrip(1);
- scene->_gameBoardSide[1]._handCard[0]._card.setFrame(4);
- scene->_gameBoardSide[1]._handCard[0]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(10, 174);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[2]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 2: {
- scene->_gameBoardSide[2]._handCard[0]._card.postInit();
- scene->_gameBoardSide[2]._handCard[0]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[2]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[2]._handCard[0]._card.setPosition(scene->_gameBoardSide[2]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[2]._handCard[0]._card.fixPriority(170);
- if (scene->_gameBoardSide[2]._handCard[0]._cardId > 25) {
- scene->_gameBoardSide[2]._handCard[0]._card.setStrip(4);
- scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId - 25);
- } else if (scene->_gameBoardSide[2]._handCard[0]._cardId > 9) {
- scene->_gameBoardSide[2]._handCard[0]._card.setStrip(3);
- scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId - 9);
- } else {
- scene->_gameBoardSide[2]._handCard[0]._card.setStrip(2);
- scene->_gameBoardSide[2]._handCard[0]._card.setFrame(scene->_gameBoardSide[2]._handCard[0]._cardId);
- }
- scene->_aSound2.play(61);
-
- Common::Point pt(14, 14);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[3]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 3: {
- scene->_gameBoardSide[3]._handCard[0]._card.postInit();
- scene->_gameBoardSide[3]._handCard[0]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[3]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[3]._handCard[0]._card.setPosition(scene->_gameBoardSide[3]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[3]._handCard[0]._card.setStrip(1);
- scene->_gameBoardSide[3]._handCard[0]._card.setFrame(3);
- scene->_gameBoardSide[3]._handCard[0]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(280, 5);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[0]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 4: {
- scene->_gameBoardSide[0]._handCard[0]._card.postInit();
- scene->_gameBoardSide[0]._handCard[0]._card._moveDiff = Common::Point(30,30);
- scene->_gameBoardSide[0]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[0]._handCard[0]._card.setPosition(scene->_gameBoardSide[0]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[0]._handCard[0]._card.setStrip(5);
- scene->_gameBoardSide[0]._handCard[0]._card.setFrame(1);
- scene->_gameBoardSide[0]._handCard[0]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(283, 124);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[1]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 5: {
- scene->_gameBoardSide[1]._handCard[1]._card.postInit();
- scene->_gameBoardSide[1]._handCard[1]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[1]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[1]._handCard[1]._card.setPosition(scene->_gameBoardSide[1]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[1]._handCard[1]._card.setStrip(1);
- scene->_gameBoardSide[1]._handCard[1]._card.setFrame(4);
- scene->_gameBoardSide[1]._handCard[1]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(37, 174);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[2]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 6: {
- scene->_gameBoardSide[2]._handCard[1]._card.postInit();
- scene->_gameBoardSide[2]._handCard[1]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[2]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[2]._handCard[1]._card.setPosition(scene->_gameBoardSide[2]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[2]._handCard[1]._card.fixPriority(170);
-
- if (scene->_gameBoardSide[2]._handCard[1]._cardId > 25) {
- scene->_gameBoardSide[2]._handCard[1]._card.setStrip(4);
- scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId - 25);
- } else if (scene->_gameBoardSide[2]._handCard[1]._cardId > 9) {
- scene->_gameBoardSide[2]._handCard[1]._card.setStrip(3);
- scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId - 9);
- } else {
- scene->_gameBoardSide[2]._handCard[1]._card.setStrip(2);
- scene->_gameBoardSide[2]._handCard[1]._card.setFrame(scene->_gameBoardSide[2]._handCard[1]._cardId);
- }
-
- scene->_aSound2.play(61);
-
- Common::Point pt(14, 36);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[3]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 7: {
- scene->_gameBoardSide[3]._handCard[1]._card.postInit();
- scene->_gameBoardSide[3]._handCard[1]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[3]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[3]._handCard[1]._card.setPosition(scene->_gameBoardSide[3]._handCard[1]._stationPos);
- scene->_gameBoardSide[3]._handCard[1]._card.setStrip(1);
- scene->_gameBoardSide[3]._handCard[1]._card.setFrame(3);
- scene->_gameBoardSide[3]._handCard[1]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(253, 5);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[0]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 8: {
- scene->_gameBoardSide[0]._handCard[1]._card.postInit();
- scene->_gameBoardSide[0]._handCard[1]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[0]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[0]._handCard[1]._card.setPosition(scene->_gameBoardSide[0]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[0]._handCard[1]._card.setStrip(5);
- scene->_gameBoardSide[0]._handCard[1]._card.setFrame(1);
- scene->_gameBoardSide[0]._handCard[1]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(283, 102);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[1]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 9: {
- scene->_gameBoardSide[1]._handCard[2]._card.postInit();
- scene->_gameBoardSide[1]._handCard[2]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[1]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[1]._handCard[2]._card.setPosition(scene->_gameBoardSide[1]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[1]._handCard[2]._card.setStrip(1);
- scene->_gameBoardSide[1]._handCard[2]._card.setFrame(4);
- scene->_gameBoardSide[1]._handCard[2]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(64, 174);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[2]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 10: {
- scene->_gameBoardSide[2]._handCard[2]._card.postInit();
- scene->_gameBoardSide[2]._handCard[2]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[2]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[2]._handCard[2]._card.setPosition(scene->_gameBoardSide[2]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[2]._handCard[2]._card.fixPriority(170);
-
- if (scene->_gameBoardSide[2]._handCard[2]._cardId > 25) {
- scene->_gameBoardSide[2]._handCard[2]._card.setStrip(4);
- scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId - 25);
- } else if (scene->_gameBoardSide[2]._handCard[2]._cardId > 9) {
- scene->_gameBoardSide[2]._handCard[2]._card.setStrip(3);
- scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId - 9);
- } else {
- scene->_gameBoardSide[2]._handCard[2]._card.setStrip(2);
- scene->_gameBoardSide[2]._handCard[2]._card.setFrame(scene->_gameBoardSide[2]._handCard[2]._cardId);
- }
-
- scene->_aSound2.play(61);
-
- Common::Point pt(14, 58);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[3]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 11: {
- scene->_gameBoardSide[3]._handCard[2]._card.postInit();
- scene->_gameBoardSide[3]._handCard[2]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[3]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[3]._handCard[2]._card.setPosition(scene->_gameBoardSide[3]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[3]._handCard[2]._card.setStrip(1);
- scene->_gameBoardSide[3]._handCard[2]._card.setFrame(3);
- scene->_gameBoardSide[3]._handCard[2]._card.fixPriority(170);
- scene->_aSound2.play(61);
-
- Common::Point pt(226, 5);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
-
- scene->_gameBoardSide[0]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- }
- break;
- case 12:
- scene->_gameBoardSide[0]._handCard[2]._card.postInit();
- scene->_gameBoardSide[0]._handCard[2]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[0]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[0]._handCard[2]._card.setPosition(scene->_gameBoardSide[0]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[0]._handCard[2]._card.setStrip(5);
- scene->_gameBoardSide[0]._handCard[2]._card.setFrame(1);
- scene->_gameBoardSide[0]._handCard[2]._card.fixPriority(170);
- scene->_animatedCard._card.hide();
- default:
- break;
- }
-
- if (_actionIndex > 12) {
- scene->_currentPlayerNumb = 0;
- R2_GLOBALS._sceneObjects->draw();
- scene->actionDisplay(1330, 0, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- scene->handleNextTurn();
- } else if (_actionIndex >= 1) {
- scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
- scene->_cardsAvailableNumb--;
- }
-}
-
-/**
- * Action used to handle the other players' turn
- */
-void Scene1337::Action4::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0:
- if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0)
- && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
- if (scene->_cardsAvailableNumb < 0)
- scene->shuffleCards();
- scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
- scene->_animatedCard._card.show();
- scene->_aSound2.play(61);
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos, this);
-
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
- scene->_cardsAvailableNumb--;
-
- if (scene->_cardsAvailableNumb < 0)
- scene->_stockPile.remove();
- } else {
- // Self call, forcing next actionIndex
- signal();
- }
- break;
- case 1:
- if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.x)
- && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.y) ) {
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.postInit();
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setVisage(1332);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._stationPos, 0);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setStrip(1);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.fixPriority(170);
- }
-
- if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
- scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]);
-
- scene->_animatedCard._card.hide();
- if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0)
- && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
- if (scene->_cardsAvailableNumb < 0)
- scene->shuffleCards();
- scene->_animatedCard._card.setPosition(Common::Point(162, 95));
- scene->_animatedCard._card.show();
-
- scene->_aSound2.play(61);
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos, this);
-
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
- scene->_cardsAvailableNumb--;
- if (scene->_cardsAvailableNumb < 0)
- scene->_stockPile.remove();
- } else
- signal();
- break;
- case 2:
- if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.x)
- && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.y) ) {
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.postInit();
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setVisage(1332);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._stationPos, 0);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setStrip(1);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.fixPriority(170);
- }
-
- if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
- scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]);
-
- scene->_animatedCard._card.hide();
- if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId == 0)
- && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
- if (scene->_cardsAvailableNumb < 0)
- scene->shuffleCards();
- scene->_animatedCard._card.setPosition(Common::Point(162, 95));
- scene->_animatedCard._card.show();
-
- scene->_aSound2.play(61);
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos, this);
-
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
- scene->_cardsAvailableNumb--;
- if (scene->_cardsAvailableNumb < 0)
- scene->_stockPile.remove();
- } else
- signal();
- break;
- case 3:
- if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.x)
- && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.y) ) {
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.postInit();
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setVisage(1332);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._stationPos, 0);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setStrip(1);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.fixPriority(170);
- }
-
- if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
- scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]);
-
- scene->_animatedCard._card.hide();
- if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId == 0)
- && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
- if (scene->_cardsAvailableNumb < 0)
- scene->shuffleCards();
- scene->_animatedCard._card.setPosition(Common::Point(162, 95));
- scene->_animatedCard._card.show();
-
- scene->_aSound2.play(61);
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos, this);
-
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId = scene->_availableCardsPile[scene->_cardsAvailableNumb];
- scene->_availableCardsPile[scene->_cardsAvailableNumb] = 0;
- scene->_cardsAvailableNumb--;
- if (scene->_cardsAvailableNumb < 0)
- scene->_stockPile.remove();
- } else
- signal();
- break;
- case 4:
- if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.x)
- && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.y) ) {
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.postInit();
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card._moveDiff = Common::Point(30, 30);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setVisage(1332);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setPosition(scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._stationPos, 0);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setStrip(1);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setFrame(scene->_gameBoardSide[scene->_currentPlayerNumb]._frameNum);
- scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.fixPriority(170);
- }
-
- if ((R2_GLOBALS._debugCardGame) || (scene->_currentPlayerNumb == 2))
- scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]);
-
- scene->_animatedCard._card.hide();
- switch (scene->_currentPlayerNumb) {
- case 0:
- scene->handlePlayer0();
- break;
- case 1:
- scene->handlePlayer1();
- break;
- case 2:
- scene->handleAutoplayPlayer2();
- break;
- case 3:
- scene->handlePlayer3();
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * Animations for discarding a card
- */
-void Scene1337::Action5::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard1->_cardId;
- scene->_currentDiscardIndex--;
- if (!g_globals->_sceneObjects->contains(&scene->_discardPile._card)) {
- // The first discarded card makes the pile appear
- scene->_discardPile._card.postInit();
- scene->_discardPile._card.hide();
- scene->_discardPile._card.setVisage(1332);
- scene->_discardPile._card.setPosition(scene->_discardPile._stationPos, 0);
- scene->_discardPile._card.fixPriority(170);
- }
-
- scene->_discardPile._cardId = scene->_actionCard1->_cardId;
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
-
- if (scene->_actionCard1 == &scene->_selectedCard) {
- scene->setCursorData(5, 1, 4);
- scene->subC4CEC();
- }
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_animatedCard._card.show();
- Common::Point pt(128, 95);
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &pt, this);
- }
- break;
- case 1:
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(&scene->_discardPile);
- scene->_aSound2.play(61);
- scene->handleNextTurn();
- break;
- default:
- break;
- }
-}
-
-/**
- * Animations for playing a platform card
- */
-void Scene1337::Action6::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_actionCard2->_cardId = 1;
- scene->_actionCard2->_card.postInit();
- scene->_actionCard2->_card.hide();
- scene->_actionCard2->_card.setVisage(1332);
- scene->_actionCard2->_card.setPosition(scene->_actionCard2->_stationPos);
- scene->_actionCard2->_card.fixPriority(170);
-
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
- }
- break;
- case 1:
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(scene->_actionCard2);
- scene->_aSound1.play(59);
- if (scene->_actionCard1 == &scene->_selectedCard) {
- scene->setCursorData(5, 1, 4);
- scene->subC4CEC();
- }
- scene->handleNextTurn();
- break;
- default:
- break;
- }
-}
-
-/**
- * Upgrade platform to station by playing a station card on top of it
- */
-void Scene1337::Action7::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
-
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_animatedCard._card.show();
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
- }
- break;
- case 1:
- if (scene->_actionCard1 == &scene->_selectedCard) {
- scene->setCursorData(5, 1, 4);
- scene->subC4CEC();
- }
- scene->setAnimationInfo(scene->_actionCard2);
- scene->_aSound1.play(59);
- scene->_discardedPlatformCard._cardId = 1;
- scene->_discardedPlatformCard._stationPos = scene->_actionCard2->_stationPos;
- scene->_discardedPlatformCard._card.postInit();
- scene->_discardedPlatformCard._card.hide();
- scene->_discardedPlatformCard._card._flags = OBJFLAG_HIDING;
-
- scene->discardCard(&scene->_discardedPlatformCard);
- break;
- default:
- break;
- }
-}
-
-void Scene1337::Action8::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
- scene->_currentDiscardIndex--;
-
- scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
- scene->_actionCard1->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
- }
- break;
- case 1:
- scene->_animatedCard._card.hide();
-
- if (scene->_actionCard1 == &scene->_selectedCard) {
- scene->setCursorData(5, 1, 4);
- scene->subC4CEC();
- }
- scene->setAnimationInfo(scene->_actionCard2);
- scene->_aSound1.play(58);
- scene->discardCard(scene->_actionCard2);
- break;
- default:
- break;
- }
-}
-
-// Play delay card
-void Scene1337::Action9::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
- scene->_actionCard2->_card.postInit();
- scene->_actionCard2->_card.hide();
- scene->_actionCard2->_card.setVisage(1332);
- scene->_actionCard2->_card.setPosition(scene->_actionCard2->_stationPos, 0);
- scene->_actionCard2->_card.fixPriority(170);
-
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
- }
- break;
- case 1:
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(scene->_actionCard2);
- scene->_aSound1.play(57);
-
- if (scene->_actionCard1 == &scene->_selectedCard) {
- scene->setCursorData(5, 1, 4);
- scene->subC4CEC();
- }
-
- scene->handleNextTurn();
- break;
- default:
- break;
- }
-}
-
-// Counter a trick with a card
-void Scene1337::Action10::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_actionCard3->_card.postInit();
- scene->_actionCard3->_card.hide();
- scene->_actionCard3->_card.setVisage(1332);
- scene->_actionCard3->_card.setPosition(scene->_actionCard3->_stationPos, 0);
- scene->_actionCard3->_card.fixPriority(170);
- scene->_actionCard3->_cardId = scene->_actionCard1->_cardId;
-
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
-
- if (scene->_actionCard1 == &scene->_selectedCard) {
- scene->setCursorData(5, 1, 4);
- scene->subC4CEC();
- }
-
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_animatedCard._card.show();
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard3->_stationPos, this);
- }
- break;
- case 1: {
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(scene->_actionCard3);
- scene->_aSound1.play(57);
-
- bool found = false;
- int indexFound = -1;
-
- switch (scene->_actionIdx1) {
- case 0:
- for (indexFound = 0; indexFound < 3; indexFound++) {
- if (scene->_gameBoardSide[0]._handCard[indexFound]._cardId == 29) {
- found = true;
- break;
- }
- }
- break;
- case 1:
- for (indexFound = 0; indexFound < 3; indexFound++) {
- if (scene->_gameBoardSide[1]._handCard[indexFound]._cardId == 29) {
- found = true;
- break;
- }
- }
- break;
- case 2:
- for (indexFound = 0; indexFound < 3; indexFound++) {
- if (scene->_gameBoardSide[2]._handCard[indexFound]._cardId == 29) {
- found = true;
- break;
- }
- }
- break;
- case 3:
- for (indexFound = 0; indexFound < 3; indexFound++) {
- if (scene->_gameBoardSide[3]._handCard[indexFound]._cardId == 29) {
- found = true;
- break;
- }
- }
- break;
- default:
- break;
- }
-
- bool found2 = false;
-
- if (found) {
- switch (scene->_actionIdx1) {
- case 0:
- scene->subC51A0(&scene->_gameBoardSide[0]._handCard[indexFound], scene->_actionCard3);
- found2 = true;
- break;
- case 1:
- scene->subC51A0(&scene->_gameBoardSide[1]._handCard[indexFound], scene->_actionCard3);
- found2 = true;
- break;
- case 2:
- scene->subC4CD2();
- if (MessageDialog::show(USE_INTERCEPTOR, NO_MSG, YES_MSG) == 0)
- scene->subC4CEC();
- else {
- scene->subC51A0(&scene->_gameBoardSide[2]._handCard[indexFound], scene->_actionCard3);
- found2 = true;
- }
- break;
- case 3:
- scene->subC51A0(&scene->_gameBoardSide[3]._handCard[indexFound], scene->_actionCard3);
- found2 = true;
- break;
- default:
- break;
- }
- }
-
- if (!found2)
- break;
-
- if (scene->_actionIdx1 == 2) {
- int j = 0;
- for (int i = 0; i <= 7; i++) {
- if (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0)
- ++j;
- }
-
- if (j <= 1) {
- for (int i = 0; i <= 7; i++) {
- if (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0) {
- scene->_actionCard2 = &scene->_gameBoardSide[2]._outpostStation[i];
- break;
- }
- }
- } else {
- scene->subC4CD2();
-
- found2 = false;
- while (!found2) {
- scene->actionDisplay(1330, 130, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- // Wait for a mouse or keypress
- Event event;
- while (!g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !g_vm->shouldQuit()) {
- g_globals->_scenePalette.signalListeners();
- R2_GLOBALS._sceneObjects->draw();
- g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
- }
-
- scene->_selectedCard._stationPos = event.mousePos;
-
- for (int i = 0; i <= 7; i++) {
- if (scene->_gameBoardSide[2]._outpostStation[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[2]._outpostStation[i]._cardId != 0)) {
- scene->_actionCard2 = &scene->_gameBoardSide[2]._outpostStation[0];
- found2 = true;
- break;
- }
- }
- }
- scene->subC4CEC();
- }
- }
-
- scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
- scene->_currentDiscardIndex--;
- scene->_actionCard2->_cardId = 0;
- scene->_actionCard2->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard2->_stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard3->_stationPos, this);
- }
- break;
- case 2:
- scene->_animatedCard._card.hide();
- scene->discardCard(scene->_actionCard3);
- break;
- default:
- break;
- }
-}
-
-// Use trick (card #25 - thieft ?) and pick a card from the opponent
-void Scene1337::Action11::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_actionCard2->_card.postInit();
- scene->_actionCard2->_card.hide();
- scene->_actionCard2->_card.setVisage(1332);
- scene->_actionCard2->_card.setPosition(scene->_actionCard2->_stationPos, 0);
- scene->_actionCard2->_card.fixPriority(170);
- scene->_actionCard2->_cardId = 25;
-
- if (scene->_actionIdx1 == 2) {
- scene->_animatedCard._card.setPosition(scene->_actionCard2->_stationPos, 0);
- scene->setCursorData(5, 1, 4);
- } else {
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- }
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
- }
- break;
- case 1: {
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(scene->_actionCard2);
- scene->_aSound1.play(57);
-
- bool found = false;
- bool noAction = true;
-
- int i = -1;
-
- switch (scene->_actionIdx2) {
- case 0:
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[0]._handCard[i]._cardId == 27) {
- found = true;
- break;
- }
- }
-
- if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) {
- scene->_actionCard1 = &scene->_gameBoardSide[0]._handCard[i];
- scene->_actionCard2 = &scene->_gameBoardSide[0]._emptyStationPos;
- if (scene->_actionIdx1 != 0) {
- int tmpVal = scene->getFreeHandCard(scene->_actionIdx1);
- scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
- }
- scene->_actionItem.setAction(&scene->_action12);
- noAction = false;
- }
- break;
- case 1:
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[1]._handCard[i]._cardId == 27) {
- found = true;
- break;
- }
- }
-
- if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) {
- scene->_actionCard1 = &scene->_gameBoardSide[1]._handCard[i];
- scene->_actionCard2 = &scene->_gameBoardSide[1]._emptyStationPos;
- if (scene->_actionIdx1 != 1) {
- int tmpVal = scene->getFreeHandCard(scene->_actionIdx1);
- scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
- }
- scene->_actionItem.setAction(&scene->_action12);
- noAction = false;
- }
- break;
- case 2:
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[2]._handCard[i]._cardId == 27) {
- found = true;
- break;
- }
- }
-
- if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) {
- scene->subC4CD2();
- if (MessageDialog::show(USE_DOUBLE_AGENT, NO_MSG, YES_MSG) == 0)
- scene->subC4CEC();
- else {
- scene->subC4CEC();
- scene->_actionCard1 = &scene->_gameBoardSide[2]._handCard[i];
- scene->_actionCard2 = &scene->_gameBoardSide[2]._emptyStationPos;
- if (scene->_actionIdx1 != 2) {
- int tmpVal = scene->getFreeHandCard(scene->_actionIdx1);
- scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
- }
- scene->_actionItem.setAction(&scene->_action12);
- noAction = false;
- }
- }
- break;
- case 3:
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[3]._handCard[i]._cardId == 27) {
- found = true;
- break;
- }
- }
-
- if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) {
- scene->_actionCard1 = &scene->_gameBoardSide[3]._handCard[i];
- scene->_actionCard2 = &scene->_gameBoardSide[3]._emptyStationPos;
- if (scene->_actionIdx1 != 3) {
- int tmpVal = scene->getFreeHandCard(scene->_actionIdx1);
- scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
- }
- scene->_actionItem.setAction(&scene->_action12);
- noAction = false;
- }
- break;
- default:
- break;
- }
-
- if (!noAction)
- return;
-
- if (scene->_actionIdx1 == 2) {
- int count = 0;
- if (scene->_actionIdx2 != 2) {
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[scene->_actionIdx2]._handCard[i]._cardId == 0)
- ++count;
- }
- }
-
- if (count > 1) {
- scene->subC4CD2();
-
- found = false;
- while (!found) {
- switch (scene->_actionIdx2) {
- case 0:
- scene->actionDisplay(1330, 131, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 1:
- scene->actionDisplay(1330, 132, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 3:
- scene->actionDisplay(1330, 133, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
-
- Event event;
- while (!g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !g_vm->shouldQuit()) {
- g_globals->_scenePalette.signalListeners();
- R2_GLOBALS._sceneObjects->draw();
- g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
- }
-
- scene->_selectedCard._stationPos = event.mousePos;
-
- found = false;
-
- if (scene->_actionIdx2 != 2) {
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[scene->_actionIdx2]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[scene->_actionIdx2]._handCard[i]._cardId != 0)) {
- scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx2]._handCard[i];
- found = true;
- break;
- }
- }
- }
- } // while
- scene->_displayHelpFl = true;
- scene->subC4CEC();
- } else if (scene->_actionIdx2 != 2) {
- int tmpVal = scene->getFreeHandCard(scene->_actionIdx2);
- scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx2]._handCard[tmpVal];
- }
- }
-
- scene->_actionCard1->_card.postInit();
- scene->_actionCard1->_card.hide();
- scene->_actionCard1->_card.setVisage(1332);
- scene->_actionCard1->_card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_actionCard1->_card.fixPriority(170);
- scene->_actionCard1->_card.setStrip2(1);
- scene->_actionCard1->_cardId = scene->_actionCard3->_cardId;
-
- scene->_actionCard3->_cardId = 0;
- scene->_actionCard3->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard3->_stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard1->_stationPos, this);
- }
- break;
- case 2:
- scene->_animatedCard._card.hide();
- switch (scene->_actionIdx1) {
- case 0:
- scene->_actionCard1->_card.setFrame2(2);
- scene->_actionCard1->_card.show();
- break;
- case 1:
- scene->_actionCard1->_card.setFrame2(4);
- scene->_actionCard1->_card.show();
- break;
- case 3:
- scene->_actionCard1->_card.setFrame2(3);
- scene->_actionCard1->_card.show();
- break;
- default:
- scene->setAnimationInfo(scene->_actionCard1);
- break;
- }
-
- scene->_currentPlayerNumb--;
- scene->_showPlayerTurn = false;
- scene->discardCard(scene->_actionCard2);
- break;
- default:
- break;
- }
-}
-
-// Pick a card in opponent hand
-void Scene1337::Action12::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0:
- signal();
- break;
- case 1: {
- scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
- scene->_currentDiscardIndex++;
- scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
- }
- break;
- case 2:
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(scene->_actionCard2);
- scene->_aSound1.play(58);
- if (scene->_actionIdx2 == 2) {
- int count = 0;
- int i = -1;
- switch (scene->_actionIdx1) {
- case 0:
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[0]._handCard[i]._cardId != 0)
- ++count;
- }
- break;
- case 1:
- for (i = 0; i <= 3; i++) {
- // The original game was counting in the hand of player 3, which is obviously wrong
- if (scene->_gameBoardSide[1]._handCard[i]._cardId != 0)
- ++count;
- }
- break;
- case 3:
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[3]._handCard[i]._cardId != 0)
- ++count;
- }
- break;
- default:
- break;
- }
-
- if (count > 1) {
- scene->subC4CD2();
-
- bool found = false;
-
- while (!found) {
- switch (scene->_actionIdx1) {
- case 0:
- scene->actionDisplay(1330, 131, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 1:
- scene->actionDisplay(1330, 132, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 3:
- scene->actionDisplay(1330, 133, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
-
- Event event;
- while (!g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !g_vm->shouldQuit()) {
- g_globals->_scenePalette.signalListeners();
- R2_GLOBALS._sceneObjects->draw();
- g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
- }
-
- scene->_selectedCard._stationPos = event.mousePos;
-
- if (scene->_actionIdx1 == 0) {
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[0]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[0]._handCard[i]._cardId != 0)) {
- found = true;
- scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[i];
- break;
- }
- }
- }
-
- if (scene->_actionIdx1 == 3) {
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[3]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[3]._handCard[i]._cardId != 0)) {
- found = true;
- scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[i];
- break;
- }
- }
- }
-
- if (scene->_actionIdx1 == 1) {
- for (i = 0; i <= 3; i++) {
- if (scene->_gameBoardSide[1]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[1]._handCard[i]._cardId != 0)) {
- found = true;
- scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[i];
- break;
- }
- }
- }
- }
- scene->subC4CEC();
- } else if (scene->_actionIdx1 != 1) {
- switch (scene->_actionIdx1) {
- case 0:
- scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[scene->getFreeHandCard(0)];
- break;
- case 3:
- scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[scene->getFreeHandCard(3)];
- break;
- default:
- break;
- }
- } else {
- scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[scene->getFreeHandCard(1)];
- }
-
- scene->_actionCard1->_card.postInit();
- scene->_actionCard1->_card.hide();
- scene->_actionCard1->_card.setVisage(1332);
- scene->_actionCard1->_card.setPosition(scene->_actionCard1->_stationPos);
- scene->_actionCard1->_card.fixPriority(170);
- scene->_actionCard1->_card.setStrip2(1);
- scene->_actionCard1->_cardId = scene->_actionCard3->_cardId;
-
- scene->_actionCard3->_cardId = 0;
- scene->_actionCard3->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard3->_stationPos);
- scene->_animatedCard._card.show();
- scene->_aSound1.play(57);
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard1->_stationPos, this);
- }
- break;
- case 3:
- scene->_animatedCard._card.hide();
- switch (scene->_actionIdx2) {
- case 0:
- scene->_actionCard1->_card.setFrame2(2);
- scene->_actionCard1->_card.show();
- break;
- case 1:
- scene->_actionCard1->_card.setFrame2(4);
- scene->_actionCard1->_card.show();
- break;
- case 3:
- scene->_actionCard1->_card.setFrame2(3);
- scene->_actionCard1->_card.show();
- break;
- default:
- scene->setAnimationInfo(scene->_actionCard1);
- break;
- }
- scene->discardCard(scene->_actionCard2);
- scene->handleNextTurn();
- break;
- default:
- break;
- }
-}
-
-void Scene1337::Action13::signal() {
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_actionIndex++) {
- case 0: {
- scene->_availableCardsPile[scene->_currentDiscardIndex] = scene->_actionCard2->_cardId;
- scene->_currentDiscardIndex--;
-
- scene->_actionCard2->_cardId = scene->_actionCard1->_cardId;
-
- scene->_actionCard1->_cardId = 0;
- scene->_actionCard1->_card.remove();
-
- scene->_animatedCard._card.setPosition(scene->_actionCard1->_stationPos, 0);
- scene->_animatedCard._card.show();
-
- NpcMover *mover = new NpcMover();
- scene->_animatedCard._card.addMover(mover, &scene->_actionCard2->_stationPos, this);
- }
- break;
- case 1:
- scene->_animatedCard._card.hide();
- scene->setAnimationInfo(scene->_actionCard2);
- scene->_aSound1.play(58);
- signal();
- break;
- case 2:
- scene->discardCard(scene->_actionCard2);
- break;
- default:
- break;
- }
-}
-
-void Scene1337::postInit(SceneObjectList *OwnerList) {
-// In the original, may be found in subPostInit.
-// Without it, enableControl asserts
- loadScene(1330);
- R2_GLOBALS._uiElements._active = false;
- SceneExt::postInit();
-//
-
- // Hide the user interface
- BF_GLOBALS._interfaceY = SCREEN_HEIGHT;
- R2_GLOBALS._uiElements._visible = false;
-
- R2_GLOBALS._player.enableControl();
- R2_GLOBALS._player._canWalk = false;
- R2_GLOBALS._player._uiEnabled = false;
-
- _delayedFunction = nullptr;
-
- _actionCard1 = nullptr;
- _actionCard2 = nullptr;
- _actionCard3 = nullptr;
-
- _gameBoardSide[2]._handCard[0]._stationPos = Common::Point(10, 174);
- _gameBoardSide[2]._handCard[1]._stationPos = Common::Point(37, 174);
- _gameBoardSide[2]._handCard[2]._stationPos = Common::Point(64, 174);
- _gameBoardSide[2]._handCard[3]._stationPos = Common::Point(91, 174);
-
- _gameBoardSide[2]._outpostStation[0]._stationPos = Common::Point(119, 174);
- _gameBoardSide[2]._outpostStation[1]._stationPos = Common::Point(119, 148);
- _gameBoardSide[2]._outpostStation[2]._stationPos = Common::Point(119, 122);
- _gameBoardSide[2]._outpostStation[3]._stationPos = Common::Point(145, 122);
- _gameBoardSide[2]._outpostStation[4]._stationPos = Common::Point(171, 122);
- _gameBoardSide[2]._outpostStation[5]._stationPos = Common::Point(171, 148);
- _gameBoardSide[2]._outpostStation[6]._stationPos = Common::Point(171, 174);
- _gameBoardSide[2]._outpostStation[7]._stationPos = Common::Point(145, 174);
-
- _gameBoardSide[2]._delayCard._stationPos = Common::Point(199, 174);
-
- _gameBoardSide[2]._emptyStationPos._stationPos = Common::Point(145, 148);
-
- _gameBoardSide[2]._card1Pos = Common::Point(10, 174);
- _gameBoardSide[2]._card2Pos = Common::Point(37, 174);
- _gameBoardSide[2]._card3Pos = Common::Point(64, 174);
- _gameBoardSide[2]._card4Pos = Common::Point(91, 174);
- _gameBoardSide[2]._frameNum = 2;
-
- _gameBoardSide[3]._handCard[0]._stationPos = Common::Point(14, 14);
- _gameBoardSide[3]._handCard[1]._stationPos = Common::Point(14, 36);
- _gameBoardSide[3]._handCard[2]._stationPos = Common::Point(14, 58);
- _gameBoardSide[3]._handCard[3]._stationPos = Common::Point(14, 80);
-
- _gameBoardSide[3]._outpostStation[0]._stationPos = Common::Point(37, 66);
- _gameBoardSide[3]._outpostStation[1]._stationPos = Common::Point(63, 66);
- _gameBoardSide[3]._outpostStation[2]._stationPos = Common::Point(89, 66);
- _gameBoardSide[3]._outpostStation[3]._stationPos = Common::Point(89, 92);
- _gameBoardSide[3]._outpostStation[4]._stationPos = Common::Point(89, 118);
- _gameBoardSide[3]._outpostStation[5]._stationPos = Common::Point(63, 118);
- _gameBoardSide[3]._outpostStation[6]._stationPos = Common::Point(37, 118);
- _gameBoardSide[3]._outpostStation[7]._stationPos = Common::Point(37, 92);
-
- _gameBoardSide[3]._delayCard._stationPos = Common::Point(37, 145);
-
- _gameBoardSide[3]._emptyStationPos._stationPos = Common::Point(63, 92);
-
- _gameBoardSide[3]._card1Pos = Common::Point(14, 14);
- _gameBoardSide[3]._card2Pos = Common::Point(14, 36);
- _gameBoardSide[3]._card3Pos = Common::Point(14, 58);
- _gameBoardSide[3]._card4Pos = Common::Point(14, 80);
- _gameBoardSide[3]._frameNum = 3;
-
- _gameBoardSide[0]._handCard[0]._stationPos = Common::Point(280, 5);
- _gameBoardSide[0]._handCard[1]._stationPos = Common::Point(253, 5);
- _gameBoardSide[0]._handCard[2]._stationPos = Common::Point(226, 5);
- _gameBoardSide[0]._handCard[3]._stationPos = Common::Point(199, 5);
-
- _gameBoardSide[0]._outpostStation[0]._stationPos = Common::Point(171, 16);
- _gameBoardSide[0]._outpostStation[1]._stationPos = Common::Point(171, 42);
- _gameBoardSide[0]._outpostStation[2]._stationPos = Common::Point(171, 68);
- _gameBoardSide[0]._outpostStation[3]._stationPos = Common::Point(145, 68);
- _gameBoardSide[0]._outpostStation[4]._stationPos = Common::Point(119, 68);
- _gameBoardSide[0]._outpostStation[5]._stationPos = Common::Point(119, 42);
- _gameBoardSide[0]._outpostStation[6]._stationPos = Common::Point(119, 16);
- _gameBoardSide[0]._outpostStation[7]._stationPos = Common::Point(145, 16);
-
- _gameBoardSide[0]._delayCard._stationPos = Common::Point(91, 16);
-
- _gameBoardSide[0]._emptyStationPos._stationPos = Common::Point(145, 42);
-
- _gameBoardSide[0]._card1Pos = Common::Point(280, 5);
- _gameBoardSide[0]._card2Pos = Common::Point(253, 5);
- _gameBoardSide[0]._card3Pos = Common::Point(226, 5);
- _gameBoardSide[0]._card4Pos = Common::Point(199, 5);
- _gameBoardSide[0]._frameNum = 2;
-
- _gameBoardSide[1]._handCard[0]._stationPos = Common::Point(283, 146);
- _gameBoardSide[1]._handCard[1]._stationPos = Common::Point(283, 124);
- _gameBoardSide[1]._handCard[2]._stationPos = Common::Point(283, 102);
- _gameBoardSide[1]._handCard[3]._stationPos = Common::Point(283, 80);
-
- _gameBoardSide[1]._outpostStation[0]._stationPos = Common::Point(253, 122);
- _gameBoardSide[1]._outpostStation[1]._stationPos = Common::Point(227, 122);
- _gameBoardSide[1]._outpostStation[2]._stationPos = Common::Point(201, 122);
- _gameBoardSide[1]._outpostStation[3]._stationPos = Common::Point(201, 96);
- _gameBoardSide[1]._outpostStation[4]._stationPos = Common::Point(201, 70);
- _gameBoardSide[1]._outpostStation[5]._stationPos = Common::Point(227, 70);
- _gameBoardSide[1]._outpostStation[6]._stationPos = Common::Point(253, 70);
- _gameBoardSide[1]._outpostStation[7]._stationPos = Common::Point(253, 96);
-
- _gameBoardSide[1]._delayCard._stationPos = Common::Point(253, 43);
-
- _gameBoardSide[1]._emptyStationPos._stationPos = Common::Point(227, 96);
-
- _gameBoardSide[1]._card1Pos = Common::Point(283, 146);
- _gameBoardSide[1]._card2Pos = Common::Point(283, 124);
- _gameBoardSide[1]._card3Pos = Common::Point(283, 102);
- _gameBoardSide[1]._card4Pos = Common::Point(283, 80);
- _gameBoardSide[1]._frameNum = 4;
-
- subPostInit();
-
- _stockPile.postInit();
-}
-
-void Scene1337::remove() {
- if (R2_GLOBALS._v57709 > 1) {
- subD1917();
- subD1940(false);
- }
-
- R2_GLOBALS._uiElements._active = true;
- R2_GLOBALS._uiElements._visible = true;
- SceneExt::remove();
-}
-
-void Scene1337::process(Event &event) {
- if (event.eventType == EVENT_BUTTON_DOWN) {
- if (event.btnState == BTNSHIFT_RIGHT) {
- updateCursorId(R2_GLOBALS._mouseCursorId, true);
- event.handled = true;
- } else if (_delayedFunction) {
- FunctionPtrType tmpFctPtr = _delayedFunction;
- _delayedFunction = nullptr;
- (this->*tmpFctPtr)();
- event.handled = true;
- }
- } else if (event.eventType == EVENT_KEYPRESS) {
- if (event.kbd.keycode == Common::KEYCODE_SPACE) {
- if (_delayedFunction) {
- FunctionPtrType tmpFctPtr = _delayedFunction;
- _delayedFunction = nullptr;
- (this->*tmpFctPtr)();
- event.handled = true;
- }
- } else
- warning("Fixme: Find proper keycode value");
- }
-
- if (!event.handled)
- Scene::process(event);
-}
-
-void Scene1337::dispatch() {
- if (!_instructionsDisplayedFl) {
- ++_instructionsWaitCount;
- if (_instructionsWaitCount == 4) {
- _instructionsDisplayedFl = true;
- suggestInstructions();
- }
- }
-
- // The following code is in the original in sceneHandler::process(),
- // which is terrible as it's checked in every scene of the game.
- setCursorData(5, _cursorCurStrip, _cursorCurFrame);
- //
-
- Scene::dispatch();
-}
-
-void Scene1337::actionDisplay(int resNum, int lineNum, int x, int y, int keepOnScreen, int width, int textMode, int fontNum, int colFG, int colBGExt, int colFGExt) {
- // TODO: Check if it's normal that arg5 is unused and replaced by an hardcoded 0 value
- // May hide an original bug
-
- SceneItem::display(resNum, lineNum, SET_X, x, SET_Y, y, SET_KEEP_ONSCREEN, 0,
- SET_WIDTH, width, SET_POS_MODE, -1, SET_TEXT_MODE, textMode,
- SET_FONT, fontNum, SET_FG_COLOR, colFG, SET_EXT_BGCOLOR, colBGExt,
- SET_EXT_FGCOLOR, colFGExt, LIST_END);
-}
-
-void Scene1337::setAnimationInfo(Card *card) {
- if (!card)
- return;
-
- if (card->_cardId > 25) {
- card->_card.setStrip2(4);
- card->_card.setFrame(card->_cardId - 25);
- } else if (card->_cardId > 9) {
- card->_card.setStrip2(3);
- card->_card.setFrame(card->_cardId - 9);
- } else {
- card->_card.setStrip2(2);
- card->_card.setFrame(card->_cardId);
- }
-
- card->_card.show();
- R2_GLOBALS._sceneObjects->draw();
-}
-
-void Scene1337::handleNextTurn() {
- switch (_winnerId) {
- case -1:
- ++_currentPlayerNumb;
- if (_currentPlayerNumb > 3)
- _currentPlayerNumb = 0;
-
- if (_showPlayerTurn) {
- _currentPlayerArrow.show();
- switch (_currentPlayerNumb) {
- case 0:
- _currentPlayerArrow.setStrip(3);
- break;
- case 1:
- _currentPlayerArrow.setStrip(4);
- break;
- case 2:
- subD1975(174, 107);
- _currentPlayerArrow.setStrip(1);
- break;
- case 3:
- subC4CEC();
- _currentPlayerArrow.setStrip(2);
- break;
- default:
- break;
- }
-
- if (!_autoplay)
- _delayedFunction = &Scene1337::handlePlayerTurn;
- else
- handlePlayerTurn();
- } else {
- handlePlayerTurn();
- }
- break;
- case 0:
- _aSound2.play(62);
- actionDisplay(1330, 135, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- actionDisplay(1330, 121, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- actionDisplay(1330, 122, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- R2_GLOBALS._sceneObjects->draw();
- actionDisplay(1330, 123, 159, 134, 1, 200, 0, 7, 0, 105, 105);
- break;
- case 1:
- _aSound2.play(62);
- actionDisplay(1330, 151, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- actionDisplay(1330, 118, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- actionDisplay(1330, 119, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- R2_GLOBALS._sceneObjects->draw();
- actionDisplay(1330, 120, 159, 134, 1, 200, 0, 7, 0, 105, 105);
- break;
- case 2:
- _aSound2.play(62);
- actionDisplay(1330, 134, 159, 134, 1, 200, 0, 7, 0, 105, 105);
- actionDisplay(1330, 124, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- actionDisplay(1330, 126, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- R2_GLOBALS._sceneObjects->draw();
- actionDisplay(1330, 125, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- break;
- case 3:
- _aSound2.play(62);
- actionDisplay(1330, 150, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- actionDisplay(1330, 115, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- actionDisplay(1330, 116, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- R2_GLOBALS._sceneObjects->draw();
- actionDisplay(1330, 117, 159, 134, 1, 200, 0, 7, 0, 105, 105);
- break;
- default:
- break;
- }
-
- if (_winnerId != -1)
- R2_GLOBALS._sceneManager.changeScene(125);
-
-}
-
-void Scene1337::handlePlayerTurn() {
- if (_showPlayerTurn)
- _currentPlayerArrow.hide();
-
- switch (_currentPlayerNumb) {
- case 2:
- subC4CD2();
- if (_displayHelpFl)
- actionDisplay(1330, 114, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- _displayHelpFl = false;
- // No break on purpose
- case 0:
- // No break on purpose
- case 1:
- // No break on purpose
- case 3:
- _actionItem.setAction(&_action4);
- default:
- break;
- }
-
- _showPlayerTurn = true;
-
-}
-
-bool Scene1337::isStationCard(int cardId) {
- switch (cardId) {
- case 10:
- // No break on purpose
- case 12:
- // No break on purpose
- case 15:
- // No break on purpose
- case 17:
- // No break on purpose
- case 18:
- // No break on purpose
- case 19:
- // No break on purpose
- case 20:
- // No break on purpose
- case 21:
- return true;
- default:
- return false;
- }
-}
-
-bool Scene1337::isStopConstructionCard(int cardId) {
- switch (cardId) {
- case 11:
- // No break on purpose
- case 14:
- // No break on purpose
- case 16:
- // No break on purpose
- case 24:
- return true;
- default:
- return false;
- }
-}
-
-int Scene1337::getStationId(int playerId, int handCardId) {
- if ((_gameBoardSide[playerId]._handCard[handCardId]._cardId > 1) && (_gameBoardSide[playerId]._handCard[handCardId]._cardId <= 9))
- return handCardId;
-
- return -1;
-}
-
-int Scene1337::findPlatformCardInHand(int playerId) {
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 1)
- return i;
- }
-
- return -1;
-}
-
-int Scene1337::findCard13InHand(int playerId) {
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 13)
- return i;
- }
-
- return -1;
-}
-
-int Scene1337::checkThieftCard(int playerId) {
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 25)
- return i;
- }
-
- return -1;
-}
-
-int Scene1337::isDelayCard(int cardId) {
- switch (cardId) {
- case 11:
- // No break on purpose
- case 14:
- // No break on purpose
- case 16:
- // No break on purpose
- case 24:
- return cardId;
- break;
- default:
- return -1;
- break;
- }
-}
-
-int Scene1337::getStationCardId(int cardId) {
- switch (cardId) {
- case 10:
- // No break on purpose
- case 12:
- // No break on purpose
- case 15:
- // No break on purpose
- case 17:
- // No break on purpose
- case 18:
- // No break on purpose
- case 19:
- // No break on purpose
- case 20:
- // No break on purpose
- case 21:
- return cardId;
- default:
- return -1;
- }
-}
-
-void Scene1337::handlePlayer01Discard(int playerId) {
- switch (playerId) {
- case 0:
- for (int i = 0; i <= 3; i++) {
- if (getStationCardId(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (isDelayCard(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if ((_gameBoardSide[playerId]._handCard[i]._cardId > 1) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 9)) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if ((_gameBoardSide[playerId]._handCard[i]._cardId >= 26) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 33)) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 1) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 25) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 13) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
- break;
- case 1:
- for (int i = 0; i <= 3; i++) {
- if ((_gameBoardSide[playerId]._handCard[i]._cardId >= 26) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 33)) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 1) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if ((_gameBoardSide[playerId]._handCard[i]._cardId > 1) && (_gameBoardSide[playerId]._handCard[i]._cardId <= 9)) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (getStationCardId(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (isDelayCard(_gameBoardSide[playerId]._handCard[i]._cardId) != -1) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 25) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (_gameBoardSide[playerId]._handCard[i]._cardId == 13) {
- discardCard(&_gameBoardSide[playerId]._handCard[i]);
- return;
- }
- }
-
- break;
- default:
- break;
- }
-}
-
-void Scene1337::playThieftCard(int playerId, Card *card, int victimId) {
- _actionIdx1 = playerId;
- _actionIdx2 = victimId;
-
- int randIndx;
-
- for (;;) {
- randIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
- if (_gameBoardSide[victimId]._handCard[randIndx]._cardId != 0)
- break;
- }
-
- _actionCard1 = card;
- _actionCard2 = &_gameBoardSide[victimId]._emptyStationPos;
- _actionCard3 = &_gameBoardSide[victimId]._handCard[randIndx];
-
- _actionItem.setAction(&_action11);
-}
-
-int Scene1337::getPreventionCardId(int cardId) {
- int retVal;
-
- switch (cardId) {
- case 10:
- retVal = 2;
- break;
- case 12:
- retVal = 3;
- break;
- case 15:
- retVal = 5;
- break;
- case 17:
- retVal = 9;
- break;
- case 18:
- retVal = 6;
- break;
- case 19:
- retVal = 4;
- break;
- case 20:
- retVal = 8;
- break;
- case 21:
- retVal = 7;
- break;
- default:
- retVal = -1;
- }
-
- return retVal;
-}
-
-bool Scene1337::isAttackPossible(int victimId, int cardId) {
- if (victimId < 0 || victimId >= ARRAYSIZE(_gameBoardSide))
- error("Scene1337::isAttackPossible() victimId:%d out of range 0 to %d", victimId, ARRAYSIZE(_gameBoardSide)-1);
-
- for (int i = 0; i <= 7; i++) {
- if (_gameBoardSide[victimId]._outpostStation[i]._cardId != 0) {
- if (getPreventionCardId(cardId) == _gameBoardSide[victimId]._outpostStation[i]._cardId)
- return false;
- }
- }
- return true;
-}
-
-int Scene1337::getPlayerWithOutpost(int playerId) {
- int randPlayerId = R2_GLOBALS._randomSource.getRandomNumber(3);
-
- for (int i = 0; i <= 3; i++) {
- if (randPlayerId != playerId) {
- for (int j = 0; j <= 7; j++) {
- if (_gameBoardSide[randPlayerId]._outpostStation[j]._cardId != 0)
- return randPlayerId;
- }
- }
-
- if (playerId == 1) {
- randPlayerId--;
- if (randPlayerId < 0)
- randPlayerId = 3;
- } else {
- ++randPlayerId;
- if (randPlayerId > 3)
- randPlayerId = 0;
- }
- }
-
- return -1;
-}
-
-bool Scene1337::checkAntiDelayCard(int delayCardId, int cardId) {
- if ((delayCardId == 11) && (cardId == 26))
- return true;
-
- if ((delayCardId == 14) && (cardId == 30))
- return true;
-
- if ((delayCardId == 16) && (cardId == 32))
- return true;
-
- if ((delayCardId == 24) && (cardId == 28))
- return true;
-
- return false;
-}
-
-void Scene1337::playStationCard(Card *station, Card *platform) {
- _actionCard1 = station;
- _actionCard2 = platform;
- _actionItem.setAction(&_action7);
-}
-
-int Scene1337::getFreeHandCard(int playerId) {
- if ( (_gameBoardSide[playerId]._handCard[0]._cardId == 0)
- && (_gameBoardSide[playerId]._handCard[1]._cardId == 0)
- && (_gameBoardSide[playerId]._handCard[2]._cardId == 0)
- && (_gameBoardSide[playerId]._handCard[3]._cardId == 0))
- return -1;
-
- int randIndx;
- for (;;) {
- randIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
- if (_gameBoardSide[playerId]._handCard[randIndx]._cardId == 0)
- break;
- }
-
- return randIndx;
-}
-
-void Scene1337::playPlatformCard(Card *card, Card *dest) {
- _actionCard1 = card;
- _actionCard2 = dest;
-
- _actionItem.setAction(&_action6);
-}
-
-void Scene1337::playDelayCard(Card *card, Card *dest) {
- _actionCard1 = card;
- _actionCard2 = dest;
-
- _actionItem.setAction(&_action9);
-}
-
-void Scene1337::playAntiDelayCard(Card *card, Card *dest) {
- _actionCard1 = card;
- _actionCard2 = dest;
-
- _actionItem.setAction(&_action8);
-
- handleNextTurn();
-}
-
-
-Scene1337::Card *Scene1337::getStationCard(int playerId) {
- for (int i = 0; i <= 7; i++) {
- if ((_gameBoardSide[playerId]._outpostStation[i]._cardId >= 1) && (_gameBoardSide[playerId]._outpostStation[i]._cardId <= 9))
- return &_gameBoardSide[playerId]._outpostStation[i];
- }
-
- return nullptr;
-}
-
-void Scene1337::playCounterTrickCard(Card *card, int playerId) {
- _actionCard1 = card;
- _actionCard2 = getStationCard(playerId);
- _actionCard3 = &_gameBoardSide[playerId]._emptyStationPos;
- _actionIdx1 = playerId;
- _actionItem.setAction(&_action10);
- handleNextTurn();
-}
-
-void Scene1337::discardCard(Card *card) {
- _actionCard1 = card;
-
- _actionItem.setAction(&_action5);
-}
-
-void Scene1337::subC4CD2() {
- if (R2_GLOBALS._v57709 > 0) {
- subD1917();
- subD1940(false); // _v5780C--
- }
-}
-
-void Scene1337::subC4CEC() {
- if (R2_GLOBALS._v57709 == 0) {
- subD18F5();
- subD1940(true); // _v5780C++
- }
-}
-
-void Scene1337::subC51A0(Card *subObj1, Card *subObj2) {
- _actionCard1 = subObj1;
- _actionCard2 = subObj2;
-
- _actionItem.setAction(&_action13);
-}
-
-void Scene1337::displayDialog(int dialogNumb) {
- switch (dialogNumb - 1) {
- case 0:
- actionDisplay(1330, 53, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 1:
- actionDisplay(1330, 57, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 2:
- actionDisplay(1330, 58, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 3:
- actionDisplay(1330, 59, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 4:
- actionDisplay(1330, 60, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 5:
- actionDisplay(1330, 61, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 6:
- actionDisplay(1330, 62, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 7:
- actionDisplay(1330, 63, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 8:
- actionDisplay(1330, 64, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 9:
- actionDisplay(1330, 65, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 10:
- actionDisplay(1330, 67, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 11:
- actionDisplay(1330, 69, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 12:
- actionDisplay(1330, 71, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- actionDisplay(1330, 72, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- actionDisplay(1330, 73, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 13:
- actionDisplay(1330, 79, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 14:
- actionDisplay(1330, 81, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 83, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 16:
- actionDisplay(1330, 85, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 17:
- actionDisplay(1330, 87, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 18:
- actionDisplay(1330, 89, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 19:
- actionDisplay(1330, 91, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 93, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 23:
- actionDisplay(1330, 95, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 24:
- actionDisplay(1330, 97, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 25:
- actionDisplay(1330, 104, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 26:
- actionDisplay(1330, 105, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- actionDisplay(1330, 106, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 27:
- actionDisplay(1330, 110, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 28:
- actionDisplay(1330, 108, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- actionDisplay(1330, 109, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 29:
- actionDisplay(1330, 111, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 31:
- actionDisplay(1330, 112, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
-}
-
-void Scene1337::subPostInit() {
- R2_GLOBALS._v57709 = 0;
- R2_GLOBALS._v5780C = 0;
- updateCursorId(1, false);
- subD1940(true); // _v5780C++
- subD18F5();
-
-// loadScene(1330);
-// SceneExt::postInit();
-
- R2_GLOBALS._scenePalette.addRotation(224, 235, 1);
-
- _availableCardsPile[0] = 1;
- _availableCardsPile[1] = 1;
- _availableCardsPile[2] = 1;
- _availableCardsPile[3] = 1;
- _availableCardsPile[4] = 1;
- _availableCardsPile[5] = 1;
- _availableCardsPile[6] = 1;
- _availableCardsPile[7] = 1;
- _availableCardsPile[8] = 26;
- _availableCardsPile[9] = 2;
- _availableCardsPile[10] = 2;
- _availableCardsPile[11] = 2;
- _availableCardsPile[12] = 2;
- _availableCardsPile[13] = 2;
- _availableCardsPile[14] = 26;
- _availableCardsPile[15] = 3;
- _availableCardsPile[16] = 3;
- _availableCardsPile[17] = 3;
- _availableCardsPile[18] = 3;
- _availableCardsPile[19] = 3;
- _availableCardsPile[20] = 28;
- _availableCardsPile[21] = 4;
- _availableCardsPile[22] = 4;
- _availableCardsPile[23] = 4;
- _availableCardsPile[24] = 4;
- _availableCardsPile[25] = 4;
- _availableCardsPile[26] = 28;
- _availableCardsPile[27] = 5;
- _availableCardsPile[28] = 5;
- _availableCardsPile[29] = 5;
- _availableCardsPile[30] = 5;
- _availableCardsPile[31] = 5;
- _availableCardsPile[32] = 30;
- _availableCardsPile[33] = 6;
- _availableCardsPile[34] = 6;
- _availableCardsPile[35] = 6;
- _availableCardsPile[36] = 6;
- _availableCardsPile[37] = 6;
- _availableCardsPile[38] = 30;
- _availableCardsPile[39] = 7;
- _availableCardsPile[40] = 7;
- _availableCardsPile[41] = 7;
- _availableCardsPile[42] = 7;
- _availableCardsPile[43] = 7;
- _availableCardsPile[44] = 32;
- _availableCardsPile[45] = 8;
- _availableCardsPile[46] = 8;
- _availableCardsPile[47] = 8;
- _availableCardsPile[48] = 8;
- _availableCardsPile[49] = 8;
- _availableCardsPile[50] = 32;
- _availableCardsPile[51] = 9;
- _availableCardsPile[52] = 9;
- _availableCardsPile[53] = 9;
- _availableCardsPile[54] = 9;
- _availableCardsPile[55] = 9;
- _availableCardsPile[56] = 10;
- _availableCardsPile[57] = 11;
- _availableCardsPile[58] = 12;
- _availableCardsPile[59] = 13;
- _availableCardsPile[60] = 13;
- _availableCardsPile[61] = 14;
- _availableCardsPile[62] = 15;
- _availableCardsPile[63] = 16;
- _availableCardsPile[64] = 17;
- _availableCardsPile[65] = 18;
- _availableCardsPile[66] = 19;
- _availableCardsPile[67] = 20;
- _availableCardsPile[68] = 21;
- _availableCardsPile[69] = 26;
- _availableCardsPile[70] = 28;
- _availableCardsPile[71] = 24;
- _availableCardsPile[72] = 25;
- _availableCardsPile[73] = 25;
- _availableCardsPile[74] = 25;
- _availableCardsPile[75] = 25;
- _availableCardsPile[76] = 26;
- _availableCardsPile[77] = 26;
- _availableCardsPile[78] = 26;
- _availableCardsPile[79] = 27;
- _availableCardsPile[80] = 27;
- _availableCardsPile[81] = 28;
- _availableCardsPile[82] = 28;
- _availableCardsPile[83] = 28;
- _availableCardsPile[84] = 29;
- _availableCardsPile[85] = 29;
- _availableCardsPile[86] = 29;
- _availableCardsPile[87] = 30;
- _availableCardsPile[88] = 30;
- _availableCardsPile[89] = 30;
- _availableCardsPile[90] = 30;
- _availableCardsPile[91] = 32;
- _availableCardsPile[92] = 1;
- _availableCardsPile[93] = 32;
- _availableCardsPile[94] = 32;
- _availableCardsPile[95] = 32;
- _availableCardsPile[96] = 1;
- _availableCardsPile[97] = 1;
- _availableCardsPile[98] = 1;
- _availableCardsPile[99] = 0;
-
- _cardsAvailableNumb = 98;
- _currentDiscardIndex = 98; // CHECKME: Would make more sense at pos 99
-
- _discardPile._cardId = 0;
- _discardPile._stationPos = Common::Point(128, 95);
-
- _stockCard._cardId = 0;
- _stockCard._stationPos = Common::Point(162, 95);
-
- _selectedCard._cardId = 0;
-
- _animatedCard._card.postInit();
- _animatedCard._card.setVisage(1332);
- _animatedCard._card.setStrip(5);
- _animatedCard._card.setFrame(1);
- _animatedCard._card._moveDiff = Common::Point(10, 10);
- _animatedCard._card.fixPriority(400);
- _animatedCard._card.setPosition(Common::Point(128, 95), 0);
- _animatedCard._card.animate(ANIM_MODE_2, NULL);
- _animatedCard._card.hide();
-
- _currentPlayerArrow.postInit();
- _currentPlayerArrow.setVisage(1334);
- _currentPlayerArrow.setStrip(1);
- _currentPlayerArrow.setFrame(1);
- _currentPlayerArrow._numFrames = 12;
- _currentPlayerArrow.fixPriority(500);
- _currentPlayerArrow.setPosition(Common::Point(174, 107), 0);
- _currentPlayerArrow.animate(ANIM_MODE_2, NULL);
- _currentPlayerArrow.hide();
-
- _showPlayerTurn = true;
- _displayHelpFl = false;
- _winnerId = -1;
-
- _helpIcon.postInit();
- _helpIcon.setup(9531, 1, 1);
- _helpIcon.setPosition(Common::Point(249, 168));
- _helpIcon.setPriority(155);
- _helpIcon._effect = EFFECT_NONE;
- _helpIcon.show();
-
- _autoplay = false;
- _instructionsDisplayedFl = false;
- _instructionsWaitCount = 0;
-}
-
-void Scene1337::suggestInstructions() {
- if (R2_GLOBALS._v57709 > 0)
- subD1917();
-
- if (MessageDialog::show(NEED_INSTRUCTIONS, NO_MSG, YES_MSG) == 0) {
- if (R2_GLOBALS._v57709 == 0)
- subD18F5();
- dealCards();
- } else {
- if (R2_GLOBALS._v57709 == 0)
- subD18F5();
- displayInstructions();
- }
-}
-
-void Scene1337::displayInstructions() {
- _actionItem.setAction(&_action1);
-}
-
-void Scene1337::shuffleCards() {
- R2_GLOBALS._sceneObjects->draw();
-
- // Remove holes in card pile
- for (int i = 0; i <= 98; i++) {
- if (_availableCardsPile[i] == 0) {
- for (int j = i + 1; j <= 98; j ++) {
- if (_availableCardsPile[j] != 0) {
- _availableCardsPile[i] = _availableCardsPile[j];
- _availableCardsPile[j] = 0;
- break;
- }
- }
- }
- }
-
- // Compute the number of available cards
- for (int i = 0; i <= 99; i ++) {
- if (_availableCardsPile[i] == 0) {
- // CHECKME: This will fail if i == 0, which shouldn't happen
- // as we don't shuffle cards when no card is available.
- _cardsAvailableNumb = i - 1;
- _currentDiscardIndex = 98; // CHECKME: Would make more sense at pos 99
- break;
- }
- }
-
- for (int i = 0; i < 2000; i ++) {
- int randIndx = R2_GLOBALS._randomSource.getRandomNumber(_cardsAvailableNumb);
- int swap = _availableCardsPile[0];
- _availableCardsPile[0] = _availableCardsPile[randIndx];
- _availableCardsPile[randIndx] = swap;
- }
-
- _shuffleEndedFl = false;
-
- // Shuffle cards
- _animatedCard._card.setAction(&_action2);
-
- while(!_shuffleEndedFl && !g_vm->shouldQuit()) {
- g_globals->_sceneObjects->recurse(SceneHandler::dispatchObject);
- g_globals->_scenePalette.signalListeners();
- R2_GLOBALS._sceneObjects->draw();
- g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
- }
-}
-
-void Scene1337::dealCards() {
- _animatedCard._card._moveDiff = Common::Point(30, 30);
- shuffleCards();
-
- // Deal cards
- _actionItem.setAction(&_action3);
-}
-
-void Scene1337::showOptionsDialog() {
- // Display menu with "Auto Play", "New Game", "Quit" and "Continue"
- OptionsDialog::show();
-}
-
-void Scene1337::handleClick(int arg1, Common::Point pt) {
- int curReg = R2_GLOBALS._sceneRegions.indexOf(g_globals->_events._mousePos);
-
- if (arg1 == 3) {
- bool found = false;
- int i;
- for (i = 0; i <= 7; i++) {
- if ( _gameBoardSide[2]._outpostStation[i].isIn(pt)
- || _gameBoardSide[0]._outpostStation[i].isIn(pt)
- || _gameBoardSide[1]._outpostStation[i].isIn(pt)
- || _gameBoardSide[3]._outpostStation[i].isIn(pt) ) {
- found = true;
- break;
- }
- }
-
- if (found) {
- switch (curReg) {
- case 5:
- if (_gameBoardSide[2]._outpostStation[i]._cardId != 0)
- displayDialog(_gameBoardSide[2]._outpostStation[i]._cardId);
- else
- actionDisplay(1330, 20, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 10:
- if (_gameBoardSide[3]._outpostStation[i]._cardId != 0)
- displayDialog(_gameBoardSide[3]._outpostStation[i]._cardId);
- else
- actionDisplay(1330, 22, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- if (_gameBoardSide[0]._outpostStation[i]._cardId != 0)
- displayDialog(_gameBoardSide[0]._outpostStation[i]._cardId);
- else
- actionDisplay(1330, 21, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- if (_gameBoardSide[1]._outpostStation[i]._cardId != 0)
- displayDialog(_gameBoardSide[1]._outpostStation[i]._cardId);
- else
- actionDisplay(1330, 23, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- } else if ( _gameBoardSide[2]._delayCard.isIn(pt)
- || _gameBoardSide[0]._delayCard.isIn(pt)
- || _gameBoardSide[1]._delayCard.isIn(pt)
- || _gameBoardSide[3]._delayCard.isIn(pt) ) {
- switch (curReg) {
- case 5:
- if (_gameBoardSide[2]._delayCard._cardId != 0)
- displayDialog(_gameBoardSide[2]._delayCard._cardId);
- else
- actionDisplay(1330, 10, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 10:
- if (_gameBoardSide[3]._delayCard._cardId != 0)
- displayDialog(_gameBoardSide[3]._delayCard._cardId);
- else
- actionDisplay(1330, 16, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- if (_gameBoardSide[0]._delayCard._cardId != 0)
- displayDialog(_gameBoardSide[0]._delayCard._cardId);
- else
- actionDisplay(1330, 13, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- if (_gameBoardSide[1]._delayCard._cardId != 0)
- displayDialog(_gameBoardSide[1]._delayCard._cardId);
- else
- actionDisplay(1330, 18, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- } else if (_discardPile.isIn(pt)) {
- if (_discardPile._cardId != 0)
- displayDialog(_discardPile._cardId);
- else
- actionDisplay(1330, 7, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (_helpIcon._bounds.contains(pt))
- actionDisplay(1330, 43, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if (_stockCard.isIn(pt))
- actionDisplay(1330, 4, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if ( (_gameBoardSide[2]._emptyStationPos.isIn(pt))
- || (_gameBoardSide[3]._emptyStationPos.isIn(pt))
- || (_gameBoardSide[0]._emptyStationPos.isIn(pt))
- || (_gameBoardSide[1]._emptyStationPos.isIn(pt)) )
- actionDisplay(1330, 32, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if (_gameBoardSide[2]._handCard[0].isIn(pt))
- displayDialog(_gameBoardSide[2]._handCard[0]._cardId);
- else if (_gameBoardSide[2]._handCard[1].isIn(pt))
- displayDialog(_gameBoardSide[2]._handCard[1]._cardId);
- else if (_gameBoardSide[2]._handCard[2].isIn(pt))
- displayDialog(_gameBoardSide[2]._handCard[2]._cardId);
- else if (_gameBoardSide[2]._handCard[3].isIn(pt))
- displayDialog(_gameBoardSide[2]._handCard[3]._cardId);
- else if ((curReg >= 6) && (curReg <= 9))
- actionDisplay(1330, 29, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if ((curReg >= 11) && (curReg <= 14))
- actionDisplay(1330, 31, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if ((curReg >= 16) && (curReg <= 19))
- actionDisplay(1330, 30, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else {
- switch (curReg) {
- case 0:
- actionDisplay(1330, 2, 159, 134, 1, 200, 0, 7, 0, 105, 105);
- break;
- case 5:
- actionDisplay(1330, 25, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 10:
- actionDisplay(1330, 27, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 26, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 28, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 21:
- actionDisplay(1330, 24, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- }
- }
-
- if (arg1 != 1)
- return;
-
- for (int i = 0; i <= 7; i++) {
- if (_gameBoardSide[2]._outpostStation[i].isIn(pt)) {
- switch (_gameBoardSide[2]._outpostStation[i]._cardId) {
- case 0:
- actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 1:
- actionDisplay(1330, 54, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- }
- return;
- }
- if (_gameBoardSide[0]._outpostStation[i].isIn(pt)) {
- switch (_gameBoardSide[0]._outpostStation[i]._cardId) {
- case 0:
- actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- }
- return;
- }
- if (_gameBoardSide[1]._outpostStation[i].isIn(pt)) {
- switch (_gameBoardSide[1]._outpostStation[i]._cardId) {
- case 0:
- actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- break;
- default:
- actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- break;
- }
- return;
- }
- if (_gameBoardSide[3]._outpostStation[i].isIn(pt)) {
- switch (_gameBoardSide[3]._outpostStation[i]._cardId) {
- case 0:
- actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- break;
- default:
- actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- break;
- }
- return;
- }
- }
-
- if (_gameBoardSide[2]._delayCard.isIn(pt)) {
- // The original uses _gameBoardSide[0], which is obviously a bug.
- if (_gameBoardSide[2]._delayCard._cardId != 0)
- actionDisplay(1330, 39, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else
- actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- return;
- }
- if (_gameBoardSide[3]._delayCard.isIn(pt)) {
- if (_gameBoardSide[3]._delayCard._cardId != 0)
- actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- else
- actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
-
- return;
- }
- if (_gameBoardSide[1]._delayCard.isIn(pt)) {
- if (_gameBoardSide[1]._delayCard._cardId != 0)
- actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- else
- actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
-
- return;
- }
- if (_gameBoardSide[0]._delayCard.isIn(pt)) {
- if (_gameBoardSide[0]._delayCard._cardId != 0)
- actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else
- actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
-
- return;
- }
- if (_gameBoardSide[3]._emptyStationPos.isIn(pt)) {
- actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- return;
- }
- if (_gameBoardSide[1]._emptyStationPos.isIn(pt)) {
- actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- return;
- }
- if (_gameBoardSide[0]._emptyStationPos.isIn(pt)) {
- actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- return;
- }
-
- if (_helpIcon._bounds.contains(pt)) {
- showOptionsDialog();
- return;
- }
-
- if (_discardPile.isIn(pt))
- actionDisplay(1330, 9, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if (_stockCard.isIn(pt))
- actionDisplay(1330, 5, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else {
- switch (curReg) {
- case 0:
- actionDisplay(1330, 3, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 6:
- // no break on purpose
- case 7:
- // no break on purpose
- case 8:
- // no break on purpose
- case 9:
- actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- break;
- case 10:
- actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172);
- break;
- case 11:
- // no break on purpose
- case 12:
- // no break on purpose
- case 13:
- // no break on purpose
- case 14:
- actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 16:
- // no break on purpose
- case 17:
- // no break on purpose
- case 18:
- // no break on purpose
- case 19:
- actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- break;
- case 20:
- actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117);
- break;
- default:
- actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- }
- }
-}
-
-void Scene1337::handlePlayer0() {
- if (_gameBoardSide[0]._delayCard._cardId != 0) {
- switch (_gameBoardSide[0]._delayCard._cardId) {
- case 10:
- //No break on purpose
- case 12:
- //No break on purpose
- case 15:
- //No break on purpose
- case 17:
- //No break on purpose
- case 18:
- //No break on purpose
- case 19:
- //No break on purpose
- case 20:
- //No break on purpose
- case 21:
- discardCard(&_gameBoardSide[0]._delayCard);
- break;
- default:
- for (int i = 0; i <= 3; i++) {
- if (checkAntiDelayCard(_gameBoardSide[0]._delayCard._cardId, _gameBoardSide[0]._handCard[i]._cardId)) {
- playAntiDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[0]._delayCard);
- return;
- }
- }
-
- break;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- int tmpVal = getStationId(0, i);
-
- if (tmpVal != -1) {
- bool stationAlreadyPresentFl = false;
- for (int j = 0; j <= 7; j++) {
- if (_gameBoardSide[0]._outpostStation[j]._cardId == _gameBoardSide[0]._handCard[tmpVal]._cardId) {
- stationAlreadyPresentFl = true;
- break;
- }
- }
-
- if (!stationAlreadyPresentFl) {
- for (int j = 0; j <= 7; j++) {
- if ((_gameBoardSide[0]._outpostStation[j]._cardId == 1) && !isStopConstructionCard(_gameBoardSide[0]._delayCard._cardId)) {
- int stationCount = 0;
- for (int k = 0; k <= 7; k++) {
- if ((_gameBoardSide[0]._outpostStation[k]._cardId > 1) && (_gameBoardSide[0]._outpostStation[k]._cardId <= 9)) {
- ++stationCount;
- }
- }
-
- if (stationCount == 7)
- _winnerId = 0;
-
- playStationCard(&_gameBoardSide[0]._handCard[tmpVal], &_gameBoardSide[0]._outpostStation[j]);
- return;
- }
- }
- }
- }
- }
-
- int tmpVal = findPlatformCardInHand(0);
-
- if (tmpVal != -1) {
- for (int i = 0; i <= 7; i++) {
- if ((_gameBoardSide[0]._outpostStation[i]._cardId == 0) && !isStopConstructionCard(_gameBoardSide[0]._delayCard._cardId)) {
- playPlatformCard(&_gameBoardSide[0]._handCard[tmpVal], &_gameBoardSide[0]._outpostStation[i]);
- return;
- }
- }
- }
-
- int card13Id = findCard13InHand(0);
- if (card13Id != -1) {
- for (int i = 0; i <= 7; i++) {
- if (_gameBoardSide[2]._outpostStation[i]._cardId != 0) {
- playCounterTrickCard(&_gameBoardSide[0]._handCard[card13Id], 2);
- return;
- }
- }
- }
-
- int thieftId = checkThieftCard(0);
- if (thieftId != -1) {
- if ( (_gameBoardSide[2]._handCard[0]._cardId != 0)
- || (_gameBoardSide[2]._handCard[1]._cardId != 0)
- || (_gameBoardSide[2]._handCard[2]._cardId != 0)
- || (_gameBoardSide[2]._handCard[3]._cardId != 0) ) {
- playThieftCard(0, &_gameBoardSide[0]._handCard[thieftId], 2);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if ((isDelayCard(_gameBoardSide[0]._handCard[i]._cardId) != -1)
- && (_gameBoardSide[2]._delayCard._cardId == 0)
- && isAttackPossible(2, _gameBoardSide[0]._handCard[i]._cardId)) {
- playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[2]._delayCard);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if ((getStationCardId(_gameBoardSide[0]._handCard[i]._cardId) != -1)
- && (_gameBoardSide[2]._delayCard._cardId == 0)
- && isAttackPossible(2, _gameBoardSide[0]._handCard[i]._cardId)) {
- playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[2]._delayCard);
- return;
- }
- }
-
- card13Id = findCard13InHand(0);
- int victimPlayerId = getPlayerWithOutpost(0);
-
- if ((card13Id != -1) && (victimPlayerId != -1)) {
- playCounterTrickCard(&_gameBoardSide[0]._handCard[card13Id], victimPlayerId);
- return;
- }
-
- thieftId = checkThieftCard(0);
- if (thieftId != -1) {
- if ( (_gameBoardSide[1]._handCard[0]._cardId != 0)
- || (_gameBoardSide[1]._handCard[1]._cardId != 0)
- || (_gameBoardSide[1]._handCard[2]._cardId != 0)
- || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) {
- playThieftCard(0, &_gameBoardSide[0]._handCard[thieftId], 1);
- return;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- if (getStationCardId(_gameBoardSide[0]._handCard[i]._cardId) != -1) {
- if ((_gameBoardSide[1]._delayCard._cardId == 0) && isAttackPossible(1, _gameBoardSide[0]._handCard[i]._cardId)) {
- playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[1]._delayCard);
- return;
- }
-
- if ((_gameBoardSide[3]._delayCard._cardId == 0) && isAttackPossible(3, _gameBoardSide[0]._handCard[i]._cardId)) {
- playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[3]._delayCard);
- return;
- }
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- tmpVal = isDelayCard(_gameBoardSide[0]._handCard[i]._cardId);
- if (tmpVal != -1) {
- if ((_gameBoardSide[1]._delayCard._cardId == 0) && isAttackPossible(1, _gameBoardSide[0]._handCard[i]._cardId)) {
- playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[1]._delayCard);
- return;
- }
-
- if ((_gameBoardSide[3]._delayCard._cardId == 0) && isAttackPossible(3, _gameBoardSide[0]._handCard[i]._cardId)) {
- playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[3]._delayCard);
- return;
- }
- }
- }
-
- handlePlayer01Discard(0);
-}
-
-void Scene1337::handlePlayer1() {
- if (this->_gameBoardSide[1]._delayCard._cardId != 0) {
- switch (_gameBoardSide[1]._delayCard._cardId) {
- case 10:
- // No break on purpose
- case 12:
- // No break on purpose
- case 15:
- // No break on purpose
- case 17:
- // No break on purpose
- case 18:
- // No break on purpose
- case 19:
- // No break on purpose
- case 20:
- // No break on purpose
- case 21:
- discardCard(&_gameBoardSide[1]._delayCard);
- return;
- default:
- for (int i = 0; i <= 3; i++) {
- if (checkAntiDelayCard(_gameBoardSide[1]._delayCard._cardId, _gameBoardSide[1]._handCard[i]._cardId)) {
- playAntiDelayCard(&_gameBoardSide[1]._handCard[i], &_gameBoardSide[1]._delayCard);
- return;
- }
- }
- break;
- }
- }
-
- for (int i = 0; i <= 3; i++) {
- int tmpIndx = getStationId(1, i);
- if (tmpIndx == -1)
- break;
-
- int tmpVal = 0;
- for (int j = 0; j <= 7; j++) {
- if (_gameBoardSide[1]._outpostStation[j]._cardId == _gameBoardSide[1]._handCard[tmpIndx]._cardId) {
- tmpVal = 1;
- break;
- }
- }
-
- if (tmpVal == 0)
- break;
-
- for (int j = 0; j <= 7; j++) {
- if ((_gameBoardSide[1]._outpostStation[j]._cardId == 1) && !isStopConstructionCard(_gameBoardSide[1]._delayCard._cardId)) {
- int stationCount = 0;
- for (int k = 0; k <= 7; k++) {
- if ((_gameBoardSide[1]._outpostStation[k]._cardId > 1) && (_gameBoardSide[1]._outpostStation[k]._cardId <= 9))
- ++stationCount;
- }
-
- if (stationCount == 7)
- _winnerId = 1;
-
- playStationCard(&_gameBoardSide[1]._handCard[tmpIndx], &_gameBoardSide[1]._outpostStation[j]);
- return;
- }
- }
- }
-
- int normalCardId = findPlatformCardInHand(1);
- if (normalCardId != -1) {
- for (int i = 0; i <= 7; i++) {
- if ((_gameBoardSide[1]._outpostStation[i]._cardId == 0) && !isStopConstructionCard(_gameBoardSide[1]._delayCard._cardId)) {
- playPlatformCard(&_gameBoardSide[1]._handCard[normalCardId], &_gameBoardSide[1]._outpostStation[i]);
- return;
- }
- }
- }
-
- int card13Id = findCard13InHand(1);
- int tmpVal2 = getPlayerWithOutpost(1);
-
- if ((card13Id != -1) && (tmpVal2 != -1)) {
- playCounterTrickCard(&_gameBoardSide[1]._handCard[card13Id], tmpVal2);
- return;
- }
-
- int thieftId = checkThieftCard(1);
- if (thieftId != -1) {
- int playerIdFound = -1;
- int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3);
- for (int i = 0; i <= 3; i++) {
- if (rndVal != 1) {
- if ( (_gameBoardSide[rndVal]._handCard[0]._cardId != 0)
- || (_gameBoardSide[rndVal]._handCard[1]._cardId != 0)
- || (_gameBoardSide[rndVal]._handCard[2]._cardId != 0)
- || (_gameBoardSide[rndVal]._handCard[3]._cardId == 0)) {
- playerIdFound = rndVal;
- break;
- }
- }
- // The original was only updating in the rndVal block,
- // which was a bug as the checks were stopping at this point
- rndVal--;
- if (rndVal < 0)
- rndVal = 3;
- }
-
- if (playerIdFound != -1) {
- playThieftCard(1, &_gameBoardSide[1]._handCard[thieftId], playerIdFound);
- return;
- }
- }
-
- int count = -1;
- int i;
- for (i = 0; i <= 3; i++) {
- int tmpVal = isDelayCard(_gameBoardSide[1]._handCard[i]._cardId);
- if (tmpVal != -1) {
- int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3);
-
- for (int j = 0; j <= 3; j++) {
- //CHECKME: tmpVal or rndVal?
- // FIXME: This is probably meant to be rndVal, but not clear...
- if (tmpVal < 0 || tmpVal >= ARRAYSIZE(_gameBoardSide))
- error("Scene1337::handlePlayer1() tmpVal:%d out of range 0 to %d", tmpVal, ARRAYSIZE(_gameBoardSide)-1);
-
- if (tmpVal != 1) {
- if ((_gameBoardSide[tmpVal]._delayCard._cardId == 0) && isAttackPossible(tmpVal, _gameBoardSide[1]._handCard[i]._cardId))
- count = tmpVal;
- }
-
- if (count < 0 || count >= ARRAYSIZE(_gameBoardSide))
- error("Scene1337::handlePlayer1() count:%d out of range 0 to %d", count, ARRAYSIZE(_gameBoardSide)-1);
-
- if (count != -1) {
- playDelayCard(&_gameBoardSide[1]._handCard[i], &_gameBoardSide[count]._delayCard);
- return;
- } else {
- rndVal--;
- if (rndVal < 0)
- rndVal = 3;
- }
- }
- }
- }
-
- int j;
- for (j = 0; j <= 3; j++) {
- if (getStationCardId(_gameBoardSide[1]._handCard[j]._cardId) != -1) {
- count = -1;
- int rndVal = R2_GLOBALS._randomSource.getRandomNumber(3);
- for (int l = 0; l <= 3; l++) {
- if (rndVal != 1) {
- if ((_gameBoardSide[rndVal]._delayCard._cardId == 0) && (_gameBoardSide[1]._handCard[j]._cardId == 1))
- count = rndVal;
- }
- if (count != -1) {
- playDelayCard(&_gameBoardSide[1]._handCard[j], &_gameBoardSide[count]._delayCard);
- return;
- } else {
- rndVal--;
- if (rndVal < 0)
- rndVal = 3;
- }
- }
- }
- }
-
- handlePlayer01Discard(1);
-}
-
-void Scene1337::handlePlayer3() {
- if (_gameBoardSide[3]._delayCard._cardId != 0) {
- switch (_gameBoardSide[3]._delayCard._cardId) {
- case 10:
- // No break on purpose
- case 12:
- // No break on purpose
- case 15:
- // No break on purpose
- case 17:
- // No break on purpose
- case 18:
- // No break on purpose
- case 19:
- // No break on purpose
- case 20:
- // No break on purpose
- case 21:
- discardCard(&_gameBoardSide[3]._delayCard);
- return;
- default:
- for (int i = 0; i <= 3; i++) {
- if (checkAntiDelayCard(_gameBoardSide[3]._delayCard._cardId, _gameBoardSide[3]._handCard[i]._cardId)) {
- playAntiDelayCard(&_gameBoardSide[3]._handCard[i], &_gameBoardSide[3]._delayCard);
- return;
- }
- }
- break;
- }
- }
-
- int randIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
-
- if (_gameBoardSide[3]._handCard[randIndx]._cardId == 1) {
- for (int i = 0; i <= 7; i++) {
- if ((_gameBoardSide[3]._outpostStation[i]._cardId == 0) && !isStopConstructionCard(_gameBoardSide[3]._delayCard._cardId)) {
- playPlatformCard(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[3]._outpostStation[i]);
- return;
- }
- }
- } else if (_gameBoardSide[3]._handCard[randIndx]._cardId <= 9) {
- for (int i = 0; i <= 7; i++) {
- if (_gameBoardSide[3]._outpostStation[i]._cardId == _gameBoardSide[3]._handCard[randIndx]._cardId) {
- discardCard(&_gameBoardSide[3]._handCard[randIndx]);
- return;
- }
- }
-
- for (int i = 0; i <= 7; i++) {
- if ((_gameBoardSide[3]._outpostStation[i]._cardId == 1) && !isStopConstructionCard(_gameBoardSide[3]._delayCard._cardId)) {
- int stationCount = 0;
- for (int j = 0; j <= 7; j++) {
- if ((_gameBoardSide[3]._outpostStation[j]._cardId > 1) && (_gameBoardSide[3]._outpostStation[j]._cardId <= 9))
- ++stationCount;
- }
-
- if (stationCount == 7)
- _winnerId = 3;
-
- playStationCard(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[3]._outpostStation[i]);
- return;
- }
- }
- } else if (_gameBoardSide[3]._handCard[randIndx]._cardId == 13) {
- int victimId = getPlayerWithOutpost(3);
-
- if (victimId != -1) {
- playCounterTrickCard(&_gameBoardSide[3]._handCard[randIndx], victimId);
- return;
- }
- } else if (_gameBoardSide[3]._handCard[randIndx]._cardId == 25) {
- int victimId = -1;
- int tmpRandIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
-
- for (int i = 0; i <= 3; i++) {
- if ( (tmpRandIndx != 3)
- && ( (_gameBoardSide[tmpRandIndx]._handCard[0]._cardId != 0)
- || (_gameBoardSide[tmpRandIndx]._handCard[1]._cardId != 0)
- || (_gameBoardSide[tmpRandIndx]._handCard[2]._cardId != 0)
- || (_gameBoardSide[tmpRandIndx]._handCard[3]._cardId != 0) )) {
- victimId = tmpRandIndx;
- break;
- }
-
- ++tmpRandIndx;
- if (tmpRandIndx > 3)
- tmpRandIndx = 0;
- }
-
- if (victimId != -1) {
- playThieftCard(3, &_gameBoardSide[3]._handCard[randIndx], victimId);
- return;
- }
- } else {
- switch (_gameBoardSide[3]._handCard[randIndx]._cardId) {
- case 10:
- // No break on purpose
- case 11:
- // No break on purpose
- case 12:
- // No break on purpose
- case 14:
- // No break on purpose
- case 15:
- // No break on purpose
- case 16:
- // No break on purpose
- case 17:
- // No break on purpose
- case 18:
- // No break on purpose
- case 19:
- // No break on purpose
- case 20:
- // No break on purpose
- case 21:
- // No break on purpose
- case 24: {
- int victimId = -1;
- int tmpRandIndx = R2_GLOBALS._randomSource.getRandomNumber(3);
-
- for (int i = 0; i <= 3; i++) {
- if (tmpRandIndx != 3) {
- if ((_gameBoardSide[tmpRandIndx]._delayCard._cardId == 0)
- && isAttackPossible(tmpRandIndx, _gameBoardSide[3]._handCard[randIndx]._cardId))
- victimId = tmpRandIndx;
- }
-
- ++tmpRandIndx;
- if (tmpRandIndx > 3)
- tmpRandIndx = 0;
-
- if (victimId != -1)
- break;
- }
-
- if (victimId != -1) {
- // Useless second identical check skipped
- playDelayCard(&_gameBoardSide[3]._handCard[randIndx], &_gameBoardSide[victimId]._delayCard);
- return;
- }
- }
- default:
- break;
- }
- }
-
- discardCard(&_gameBoardSide[3]._handCard[randIndx]);
-}
-
-void Scene1337::handleAutoplayPlayer2() {
- if (getStationCardId(this->_gameBoardSide[2]._delayCard._cardId) == -1)
- _delayedFunction = &Scene1337::handlePlayer2;
- else
- discardCard(&_gameBoardSide[2]._delayCard);
-}
-
-void Scene1337::handlePlayer2() {
- _selectedCard._stationPos = g_globals->_events._mousePos;
-
- if (R2_GLOBALS._v57810 == 200) {
- // Hand
- int i;
- for (i = 0; i < 4; i++) {
- if ((_gameBoardSide[2]._handCard[i].isIn(_selectedCard._stationPos)) && (_gameBoardSide[2]._handCard[i]._cardId != 0)) {
- Card *handcard = &_gameBoardSide[2]._handCard[i];
- _selectedCard._cardId = handcard->_cardId;
- _selectedCard._stationPos = handcard->_stationPos;
- //warning("_selectedCard._actorName = handcard->_actorName;");
- //warning("_selectedCard._fieldE = handcard->_fieldE;");
- //warning("_selectedCard._field10 = handcard->_field10;");
- //warning("_selectedCard._field12 = handcard->_field12;");
- //warning("_selectedCard._field14 = handcard->_field14;");
- //warning("_selectedCard._field16 = handcard->_field16;");
- _selectedCard._sceneRegionId = handcard->_sceneRegionId;
- _selectedCard._position = handcard->_position;
- _selectedCard._yDiff = handcard->_yDiff;
- _selectedCard._bounds = handcard->_bounds;
- _selectedCard._resNum = handcard->_resNum;
- _selectedCard._lookLineNum = handcard->_lookLineNum;
- _selectedCard._talkLineNum = handcard->_talkLineNum;
- _selectedCard._useLineNum = handcard->_useLineNum;
- _selectedCard._action = handcard->_action;
- //warning("_selectedCard._field0 = handcard->_field0;");
- _selectedCard._card._updateStartFrame = handcard->_card._updateStartFrame;
- _selectedCard._card._walkStartFrame = handcard->_card._walkStartFrame;
- // _field2E is named _field3C in R2R
- _selectedCard._card._oldPosition = handcard->_card._oldPosition;
- _selectedCard._card._percent = handcard->_card._percent;
- _selectedCard._card._priority = handcard->_card._priority;
- _selectedCard._card._angle = handcard->_card._angle;
- _selectedCard._card._flags = handcard->_card._flags;
- _selectedCard._card._xe = handcard->_card._xe;
- _selectedCard._card._xs = handcard->_card._xs;
- _selectedCard._card._paneRects[0] = handcard->_card._paneRects[0];
- _selectedCard._card._paneRects[1] = handcard->_card._paneRects[1];
- _selectedCard._card._visage = handcard->_card._visage;
- _selectedCard._card._objectWrapper = handcard->_card._objectWrapper;
- _selectedCard._card._strip = handcard->_card._strip;
- _selectedCard._card._animateMode = handcard->_card._animateMode;
- _selectedCard._card._frame = handcard->_card._frame;
- _selectedCard._card._endFrame = handcard->_card._endFrame;
- // _field68 is named _field76 in R2R
- _selectedCard._card._loopCount = handcard->_card._loopCount;
- _selectedCard._card._frameChange = handcard->_card._frameChange;
- _selectedCard._card._numFrames = handcard->_card._numFrames;
- _selectedCard._card._regionIndex = handcard->_card._regionIndex;
- _selectedCard._card._mover = handcard->_card._mover;
- _selectedCard._card._moveDiff = handcard->_card._moveDiff;
- _selectedCard._card._moveRate = handcard->_card._moveRate;
- _selectedCard._card._actorDestPos = handcard->_card._actorDestPos;
- _selectedCard._card._endAction = handcard->_card._endAction;
- _selectedCard._card._regionBitList = handcard->_card._regionBitList;
- // _selectedCard._object1._actorName = handcard->_object1._actorName;
- //warning("_selectedCard._card._fieldE = handcard->_card._fieldE;");
- //warning("_selectedCard._card._field10 = handcard->_card._field10;");
- //warning("_selectedCard._card._field12 = handcard->_card._field12;");
- //warning("_selectedCard._card._field14 = handcard->_card._field14;");
- //warning("_selectedCard._card._field16 = handcard->_card._field16;");
-
- _gameBoardSide[2]._handCard[i]._cardId = 0;
- _gameBoardSide[2]._handCard[i]._card.remove();
- break;
- }
- }
-
- if (i == 4) {
- handleClick(1, _selectedCard._stationPos);
- handleAutoplayPlayer2();
- return;
- } else {
- setCursorData(1332, _selectedCard._card._strip, _selectedCard._card._frame);
- R2_GLOBALS._sceneObjects->draw();
- }
- } else if (R2_GLOBALS._v57810 == 300) {
- // Eye
- handleClick(3, _selectedCard._stationPos);
- handleAutoplayPlayer2();
- return;
- } else {
- // The original code is calling a function full of dead code.
- // Only this message remains after a cleanup.
- MessageDialog::show(WRONG_ANSWER_MSG, OK_BTN_STRING);
- //
- handleAutoplayPlayer2();
- return;
- }
-
- Event event;
- bool found;
- for (;;) {
- if ( ((g_globals->_events.getEvent(event, EVENT_BUTTON_DOWN)) && (event.btnState == BTNSHIFT_RIGHT))
- || (g_globals->_events.getEvent(event, EVENT_KEYPRESS)) ){
- _selectedCard._stationPos = g_globals->_events._mousePos;
- found = false;
-
- for (int i = 0; i <= 3; i ++) {
- if (_gameBoardSide[2]._handCard[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if (_gameBoardSide[2]._handCard[i]._cardId == 0) {
- _gameBoardSide[2]._handCard[i]._cardId = _selectedCard._cardId;
- _gameBoardSide[2]._handCard[i]._card.postInit();
- _gameBoardSide[2]._handCard[i]._card.hide();
- _gameBoardSide[2]._handCard[i]._card.setVisage(1332);
- _gameBoardSide[2]._handCard[i]._card.setPosition(_gameBoardSide[2]._handCard[i]._stationPos, 0);
- _gameBoardSide[2]._handCard[i]._card.fixPriority(170);
- setAnimationInfo(&_gameBoardSide[2]._handCard[i]);
- setCursorData(5, 1, 4);
- _currentPlayerNumb--;
- _showPlayerTurn = false;
- handleNextTurn();
- return;
- } else {
- actionDisplay(1330, 127, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- found = true;
- }
- break;
- }
- }
-
- if (!found) {
- if (_discardPile.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- discardCard(&_selectedCard);
- return;
- } else if (_selectedCard._cardId == 1) {
- bool isInCardFl = false;
- int i;
- for (i = 0; i <= 7; i++) {
- if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- isInCardFl = true;
- break;
- }
- }
-
- if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 0)) {
- if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
- actionDisplay(1330, 55, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else {
- playPlatformCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
- return;
- }
- } else {
- actionDisplay(1330, 56, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else if (_selectedCard._cardId <= 9) {
- bool isInCardFl = false;
- int i;
- for (i = 0; i <= 7; i++) {
- if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- isInCardFl = true;
- break;
- }
- }
- if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 1)) {
- isInCardFl = false;
- for (int j = 0; j <= 7; j++) {
- if (_selectedCard._cardId == _gameBoardSide[2]._outpostStation[j]._cardId) {
- isInCardFl = true;
- break;
- }
- }
- if (isInCardFl) {
- // This station is already in place
- actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
- // You must eliminate your delay before you can play a station
- actionDisplay(1330, 35, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else {
- int stationCount = 0;
- for (int k = 0; k <= 7; k++) {
- if ((_gameBoardSide[2]._outpostStation[k]._cardId > 1) && (_gameBoardSide[2]._outpostStation[k]._cardId <= 9))
- ++stationCount;
- }
-
- if (stationCount == 7)
- _winnerId = 2;
-
- playStationCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
- return;
- }
- } else {
- actionDisplay(1330, 37, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else if ((_selectedCard._cardId == 26) || (_selectedCard._cardId == 30) ||(_selectedCard._cardId == 32) || (_selectedCard._cardId == 28)) {
- // Check anti-delay card
- if (_gameBoardSide[2]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- actionDisplay(1330, 42, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (checkAntiDelayCard(_gameBoardSide[2]._delayCard._cardId, _selectedCard._cardId)) {
- playAntiDelayCard(&_selectedCard, &_gameBoardSide[2]._delayCard);
- return;
- } else {
- if (_gameBoardSide[2]._delayCard._cardId != 0) {
- switch (_gameBoardSide[2]._delayCard._cardId) {
- case 11:
- actionDisplay(1330, 68, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 14:
- actionDisplay(1330, 80, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 16:
- actionDisplay(1330, 84, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 24:
- actionDisplay(1330, 96, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- } else {
- actionDisplay(1330, 41, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- }
- } else if ((getStationCardId(_selectedCard._cardId) == -1) && (isDelayCard(_selectedCard._cardId) == -1)) {
- if (_selectedCard._cardId == 13) {
- if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- for (int k = 0; k <= 7; k++) {
- if (_gameBoardSide[0]._outpostStation[k]._cardId != 0) {
- playCounterTrickCard(&_selectedCard, 0);
- return;
- }
- }
- actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- for (int k = 0; k <= 7; k++) {
- if (_gameBoardSide[3]._outpostStation[k]._cardId != 0) {
- playCounterTrickCard(&_selectedCard, 3);
- return;
- }
- }
- actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- for (int k = 0; k <= 7; k++) {
- if (_gameBoardSide[1]._outpostStation[k]._cardId == 0) {
- playCounterTrickCard(&_selectedCard, 1);
- return;
- }
- }
- actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else {
- actionDisplay(1330, 128, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else if (_selectedCard._cardId == 25) {
- if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if ( (_gameBoardSide[0]._handCard[0]._cardId != 0)
- || (_gameBoardSide[0]._handCard[1]._cardId != 0)
- || (_gameBoardSide[0]._handCard[2]._cardId != 0)
- || (_gameBoardSide[0]._handCard[3]._cardId != 0) ) {
- int k;
- for (k = 0; k <= 3; k++){
- if (_gameBoardSide[2]._handCard[k]._cardId == 0)
- break;
- }
- playThieftCard(2, &_gameBoardSide[2]._handCard[k], 0);
- return;
- } else {
- actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if ( (_gameBoardSide[1]._handCard[0]._cardId != 0)
- || (_gameBoardSide[1]._handCard[1]._cardId != 0)
- || (_gameBoardSide[1]._handCard[2]._cardId != 0)
- || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) {
- int k;
- for (k = 0; k <= 3; k++){
- if (_gameBoardSide[2]._handCard[k]._cardId == 0)
- break;
- }
- playThieftCard(2, &_gameBoardSide[2]._handCard[k], 1);
- return;
- } else {
- actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- }
-
- if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if ( (_gameBoardSide[3]._handCard[0]._cardId != 0)
- || (_gameBoardSide[3]._handCard[1]._cardId != 0)
- || (_gameBoardSide[3]._handCard[2]._cardId != 0)
- || (_gameBoardSide[3]._handCard[3]._cardId != 0) ) {
- int k;
- for (k = 0; k <= 3; k++){
- if (_gameBoardSide[2]._handCard[k]._cardId == 0)
- break;
- }
- playThieftCard(2, &_gameBoardSide[2]._handCard[k], 3);
- return;
- } else {
- actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else {
- actionDisplay(1330, 129, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else if (_selectedCard._cardId == 29) {
- // Interceptor cards are used to prevent collision
- actionDisplay(1330, 136, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (_selectedCard._cardId == 27) {
- actionDisplay(1330, 137, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else if (_gameBoardSide[0]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if (_gameBoardSide[0]._delayCard._cardId != 0) {
- actionDisplay(1330, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (!isAttackPossible(0, _selectedCard._cardId)) {
- switch (_selectedCard._cardId) {
- case 10:
- actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 12:
- actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 17:
- actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 18:
- actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 19:
- actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 21:
- actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- } else {
- playDelayCard(&_selectedCard, &_gameBoardSide[0]._delayCard);
- return;
- }
- } else if (_gameBoardSide[3]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if (_gameBoardSide[3]._delayCard._cardId != 0) {
- actionDisplay(1330, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (!isAttackPossible(3, _selectedCard._cardId)) {
- switch (_selectedCard._cardId) {
- case 10:
- actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 12:
- actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 17:
- actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 18:
- actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 19:
- actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 21:
- actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- } else {
- playDelayCard(&_selectedCard, &_gameBoardSide[3]._delayCard);
- return;
- }
- } else if (_gameBoardSide[1]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if (_gameBoardSide[1]._delayCard._cardId != 0) {
- actionDisplay(1330, 19, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (!isAttackPossible(1, _selectedCard._cardId)) {
- switch (_selectedCard._cardId) {
- case 10:
- actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 12:
- actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 17:
- actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 18:
- actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 19:
- actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 21:
- actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- } else {
- playDelayCard(&_selectedCard, &_gameBoardSide[1]._delayCard);
- return;
- }
- } else {
- actionDisplay(1330, 38, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- }
- } else {
- g_globals->_scenePalette.signalListeners();
- R2_GLOBALS._sceneObjects->draw();
- g_globals->_events.delay(g_globals->_sceneHandler->_delayTicks);
- }
-
- g_globals->_sceneObjects->recurse(SceneHandler::dispatchObject);
- }
-}
-
-void Scene1337::updateCursorId(int cursorId, bool updateFl) {
- if ((R2_GLOBALS._v57709 != 0) || (R2_GLOBALS._v5780C != 0))
- return;
-
- R2_GLOBALS._mouseCursorId = cursorId;
-
- if (updateFl) {
- R2_GLOBALS._mouseCursorId++;
-
- if (R2_GLOBALS._mouseCursorId < 1)
- R2_GLOBALS._mouseCursorId = 2;
-
- if (R2_GLOBALS._mouseCursorId > 2)
- R2_GLOBALS._mouseCursorId = 1;
- }
-
- // The original was using an intermediate function to call setCursorData.
- // It has been removed to improve readability
- if (R2_GLOBALS._mouseCursorId == 1) {
- R2_GLOBALS._v57810 = 200;
- setCursorData(5, 1, 4);
- } else if (R2_GLOBALS._mouseCursorId == 2) {
- R2_GLOBALS._v57810 = 300;
- setCursorData(5, 1, 5);
- } else {
- R2_GLOBALS._v57810 = 0;
- setCursorData(5, 0, 0);
- }
-}
-
-void Scene1337::setCursorData(int resNum, int rlbNum, int frameNum) {
- _cursorCurRes = resNum;
- _cursorCurStrip = rlbNum;
- _cursorCurFrame = frameNum;
-
- if (!frameNum) {
- // Should be a hardcoded cursor displaying only a dot.
- // FIXME: Use another cursor when possible
- R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS);
- } else {
- // TODO: The original was using some ressource caching, which was useless and complex
- // and which has been removed. This cursor behavior clearly made intensive use of this caching...
- // We now have to find a way to cache these cursor pointers and avoid loading them multiple times per seconds
- uint size;
- byte *cursor = g_resourceManager->getSubResource(resNum, rlbNum, frameNum, &size);
- // Decode the cursor
- GfxSurface s = surfaceFromRes(cursor);
-
- Graphics::Surface surface = s.lockSurface();
- const byte *cursorData = (const byte *)surface.getPixels();
- CursorMan.replaceCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColor);
- s.unlockSurface();
-
- DEALLOCATE(cursor);
- }
-}
-
-void Scene1337::subD18F5() {
- if (R2_GLOBALS._v57709 == 0)
- R2_GLOBALS._events.setCursor(CURSOR_CROSSHAIRS);
-
- ++R2_GLOBALS._v57709;
-}
-
-void Scene1337::subD1917() {
- if (R2_GLOBALS._v57709 != 0) {
- R2_GLOBALS._v57709--;
- if (R2_GLOBALS._v57709 != 0) {
- // The original was using an intermediate function to call setCursorData.
- // It has been removed to improve readability
- setCursorData(5, _cursorCurStrip, _cursorCurFrame);
- }
- }
-}
-
-void Scene1337::subD1940(bool flag) {
- if (flag)
- ++R2_GLOBALS._v5780C;
- else if (R2_GLOBALS._v5780C != 0)
- --R2_GLOBALS._v5780C;
-}
-
-void Scene1337::subD1975(int arg1, int arg2) {
- warning("STUBBED lvl2 Scene1337::subD1975()");
-}
-
-void Scene1337::OptionsDialog::show() {
- OptionsDialog *dlg = new OptionsDialog();
- dlg->draw();
-
- // Show the dialog
- GfxButton *btn = dlg->execute(NULL);
-
- // Figure out the new selected character
- if (btn == &dlg->_quitGame)
- R2_GLOBALS._sceneManager.changeScene(125);
- else if (btn == &dlg->_restartGame)
- R2_GLOBALS._sceneManager.changeScene(1330);
-
- // Remove the dialog
- dlg->remove();
- delete dlg;
-}
-
-Scene1337::OptionsDialog::OptionsDialog() {
- // Set the elements text
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
- _autoplay.setText(scene->_autoplay ? AUTO_PLAY_ON : AUTO_PLAY_OFF);
- _restartGame.setText(START_NEW_CARD_GAME);
- _quitGame.setText(QUIT_CARD_GAME);
- _continueGame.setText(CONTINUE_CARD_GAME);
-
- // Set position of the elements
- _autoplay._bounds.moveTo(5, 2);
- _restartGame._bounds.moveTo(5, _autoplay._bounds.bottom + 2);
- _quitGame._bounds.moveTo(5, _restartGame._bounds.bottom + 2);
- _continueGame._bounds.moveTo(5, _quitGame._bounds.bottom + 2);
-
- // Add the items to the dialog
- addElements(&_autoplay, &_restartGame, &_quitGame, &_continueGame, NULL);
-
- // Set the dialog size and position
- frame();
- _bounds.collapse(-6, -6);
- setCenter(160, 100);
-}
-
-GfxButton *Scene1337::OptionsDialog::execute(GfxButton *defaultButton) {
- _gfxManager.activate();
-
- // Event loop
- GfxButton *selectedButton = NULL;
-
- bool breakFlag = false;
- while (!g_vm->shouldQuit() && !breakFlag) {
- Event event;
- while (g_globals->_events.getEvent(event) && !breakFlag) {
- // Adjust mouse positions to be relative within the dialog
- event.mousePos.x -= _gfxManager._bounds.left;
- event.mousePos.y -= _gfxManager._bounds.top;
-
- for (GfxElementList::iterator i = _elements.begin(); i != _elements.end(); ++i) {
- if ((*i)->process(event))
- selectedButton = static_cast<GfxButton *>(*i);
- }
-
- if (selectedButton == &_autoplay) {
- // Toggle Autoplay
- selectedButton = NULL;
- Scene1337 *scene = (Scene1337 *)R2_GLOBALS._sceneManager._scene;
- scene->_autoplay = !scene->_autoplay;
-
- _autoplay.setText(scene->_autoplay ? AUTO_PLAY_ON : AUTO_PLAY_OFF);
- _autoplay.draw();
- } else if (selectedButton) {
- breakFlag = true;
- break;
- } else if (!event.handled) {
- if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
- selectedButton = NULL;
- breakFlag = true;
- break;
- }
- }
- }
-
- g_system->delayMillis(10);
- GLOBALS._screenSurface.updateScreen();
- }
-
- _gfxManager.deactivate();
- return selectedButton;
-}
-
-/*--------------------------------------------------------------------------
* Scene 1500 - Cutscene: Ship landing
*
*--------------------------------------------------------------------------*/
@@ -13433,1796 +7970,5 @@ void Scene1945::signal() {
R2_GLOBALS._player._canWalk = false;
}
-/*--------------------------------------------------------------------------
- * Scene 1950 - Flup Tube Corridor Maze
- *
- *--------------------------------------------------------------------------*/
-
-Scene1950::KeypadWindow::KeypadWindow() {
- _buttonIndex = 0;
-}
-
-void Scene1950::KeypadWindow::synchronize(Serializer &s) {
- SceneArea::synchronize(s);
-
- s.syncAsSint16LE(_buttonIndex);
-}
-
-Scene1950::KeypadWindow::KeypadButton::KeypadButton() {
- _buttonIndex = 0;
- _pressed = false;
- _toggled = false;
-}
-
-void Scene1950::KeypadWindow::KeypadButton::synchronize(Serializer &s) {
- SceneActor::synchronize(s);
-
- s.syncAsSint16LE(_buttonIndex);
- s.syncAsSint16LE(_pressed);
- s.syncAsSint16LE(_toggled);
-}
-
-void Scene1950::KeypadWindow::KeypadButton::init(int indx) {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _buttonIndex = indx;
- _pressed = false;
- _toggled = false;
-
- postInit();
- setup(1971, 2, 1);
- fixPriority(249);
- setPosition(Common::Point(((_buttonIndex % 4) * 22) + 127, ((_buttonIndex / 4) * 19) + 71));
- scene->_sceneAreas.push_front(this);
-}
-
-void Scene1950::KeypadWindow::KeypadButton::process(Event &event) {
- if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE)
- && (_bounds.contains(event.mousePos)) && !_pressed) {
- R2_GLOBALS._sound2.play(227);
- if (!_toggled) {
- setFrame(2);
- _toggled = true;
- } else {
- setFrame(1);
- _toggled = false;
- }
- _pressed = true;
- event.handled = true;
- }
-
- if ((event.eventType == EVENT_BUTTON_UP) && _pressed) {
- _pressed = false;
- event.handled = true;
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
- scene->doButtonPress(_buttonIndex);
- }
-}
-
-bool Scene1950::KeypadWindow::KeypadButton::startAction(CursorType action, Event &event) {
- if (action == CURSOR_USE)
- return false;
- return SceneActor::startAction(action, event);
-}
-
-void Scene1950::KeypadWindow::remove() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
- for (_buttonIndex = 0; _buttonIndex < 16; ++_buttonIndex) {
- scene->_sceneAreas.remove(&_buttons[_buttonIndex]);
- _buttons[_buttonIndex].remove();
- }
-
- ModalWindow::remove();
-
- if (!R2_GLOBALS.getFlag(37))
- R2_GLOBALS._sound2.play(278);
-
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- scene->_eastExit._enabled = true;
-
- if (!R2_GLOBALS.getFlag(37)) {
- if (R2_GLOBALS.getFlag(36)) {
- scene->_sceneMode = 1964;
- scene->setAction(&scene->_sequenceManager, scene, 1964, &R2_GLOBALS._player, NULL);
- } else {
- scene->_sceneMode = 1965;
- scene->setAction(&scene->_sequenceManager, scene, 1965, &R2_GLOBALS._player, NULL);
- }
- }
-}
-
-void Scene1950::KeypadWindow::setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY) {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- if (R2_GLOBALS._player._mover)
- R2_GLOBALS._player.addMover(NULL);
- R2_GLOBALS._player._canWalk = false;
-
- ModalWindow::setup2(visage, stripFrameNum, frameNum, posX, posY);
-
- _object1.fixPriority(248);
- scene->_eastExit._enabled = false;
- setup3(1950, 27, 28, 27);
-
- for (_buttonIndex = 0; _buttonIndex < 16; _buttonIndex++)
- _buttons[_buttonIndex].init(_buttonIndex);
-}
-
-void Scene1950::KeypadWindow::setup3(int resNum, int lookLineNum, int talkLineNum, int useLineNum) {
- // Copy of Scene1200::LaserPanel::proc13()
- _areaActor.setDetails(resNum, lookLineNum, talkLineNum, useLineNum, 2, (SceneItem *) NULL);
-}
-
-/*--------------------------------------------------------------------------*/
-
-bool Scene1950::Keypad::startAction(CursorType action, Event &event) {
- if ((action != CURSOR_USE) || (R2_GLOBALS.getFlag(37)))
- return SceneHotspot::startAction(action, event);
-
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- R2_GLOBALS._player.disableControl();
- if (R2_GLOBALS.getFlag(36)) {
- scene->_sceneMode = 1962;
- scene->setAction(&scene->_sequenceManager, scene, 1962, &R2_GLOBALS._player, NULL);
- } else {
- scene->_sceneMode = 1963;
- scene->setAction(&scene->_sequenceManager, scene, 1963, &R2_GLOBALS._player, NULL);
- }
- return true;
-}
-
-bool Scene1950::Door::startAction(CursorType action, Event &event) {
- if (action != R2_SCRITH_KEY)
- return SceneActor::startAction(action, event);
-
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- R2_GLOBALS._player.disableControl();
- R2_INVENTORY.setObjectScene(R2_SCRITH_KEY, 0);
- scene->_sceneMode = 1958;
- scene->setAction(&scene->_sequenceManager, scene, 1958, &R2_GLOBALS._player, &scene->_door, NULL);
- return true;
-}
-
-bool Scene1950::Scrolls::startAction(CursorType action, Event &event) {
- if ((action != CURSOR_USE) || (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) != 1950))
- return SceneActor::startAction(action, event);
-
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- R2_GLOBALS._player.disableControl();
- scene->_sceneMode = 1968;
- scene->setAction(&scene->_sequenceManager, scene, 1968, &R2_GLOBALS._player, NULL);
-
- return true;
-}
-
-bool Scene1950::Gem::startAction(CursorType action, Event &event) {
- if ((action != CURSOR_USE) || (!R2_GLOBALS.getFlag(37)))
- return SceneActor::startAction(action, event);
-
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- R2_GLOBALS._player.disableControl();
- scene->_sceneMode = 1967;
- scene->setAction(&scene->_sequenceManager, scene, 1967, &R2_GLOBALS._player, NULL);
-
- return true;
-}
-
-/*--------------------------------------------------------------------------*/
-
-Scene1950::Vampire::Vampire() {
- _deadPosition = Common::Point(0, 0);
- _deltaX = 0;
- _deltaY = 0;
- _vampireMode = 0;
-}
-
-void Scene1950::Vampire::synchronize(Serializer &s) {
- SceneActor::synchronize(s);
-
- s.syncAsSint16LE(_deadPosition.x);
- s.syncAsSint16LE(_deadPosition.y);
- s.syncAsSint16LE(_deltaX);
- s.syncAsSint16LE(_deltaY);
- s.syncAsSint16LE(_vampireMode);
-}
-
-void Scene1950::Vampire::signal() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- switch (_vampireMode) {
- case 19: {
- _vampireMode = 0;
- setVisage(1960);
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- setStrip(2);
- else
- setStrip(1);
-
- NpcMover *mover = new NpcMover();
- addMover(mover, &scene->_vampireDestPos, scene);
- }
- break;
- case 20: {
- // Non fatal shot
- _vampireMode = 19;
- R2_GLOBALS._player.setVisage(22);
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- R2_GLOBALS._player.setStrip(1);
- else
- R2_GLOBALS._player.setStrip(2);
- R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
- R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._shotsRequired--;
-
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- _deadPosition.x = _position.x + 10;
- else
- _deadPosition.x = _position.x - 10;
- _deadPosition.y = _position.y - 4;
-
- setVisage(1961);
-
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- setStrip(2);
- else
- setStrip(1);
-
- animate(ANIM_MODE_2, NULL);
- Common::Point pt = _deadPosition;
- PlayerMover *mover = new PlayerMover();
- addMover(mover, &pt, this);
-
- R2_GLOBALS._player.enableControl();
- }
- break;
- case 21: {
- // Fatal shot
- R2_GLOBALS._player.setVisage(22);
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- R2_GLOBALS._player.setStrip(1);
- else
- R2_GLOBALS._player.setStrip(2);
- R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
-
- setVisage(1961);
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- setStrip(4);
- else
- setStrip(3);
- setDetails(1950, 15, -1, 17, 2, (SceneItem *) NULL);
- addMover(NULL);
- _numFrames = 8;
- R2_GLOBALS._sound2.play(226);
- animate(ANIM_MODE_5, NULL);
- fixPriority(10);
-
- R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive = false;
- R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._shotsRequired--;
- R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._position = _position;
- _deltaX = (_position.x - R2_GLOBALS._player._position.x) / 2;
- _deltaY = (_position.y - R2_GLOBALS._player._position.y) / 2;
-
- byte vampireCount = 0;
- for (byte i = 0; i < 18; ++i) {
- if (!R2_GLOBALS._vampireData[i]._isAlive)
- ++vampireCount;
- }
-
- if (vampireCount == 18) {
- R2_GLOBALS.setFlag(36);
- _vampireMode = 23;
- Common::Point pt(R2_GLOBALS._player._position.x + _deltaX, R2_GLOBALS._player._position.y + _deltaY);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- } else if (vampireCount == 1) {
- _vampireMode = 22;
- Common::Point pt(R2_GLOBALS._player._position.x + _deltaX, R2_GLOBALS._player._position.y + _deltaY);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- } else {
- R2_GLOBALS._player.enableControl(CURSOR_WALK);
- }
-
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- scene->_eastExit._enabled = true;
- else
- scene->_westExit._enabled = true;
-
- scene->_vampireActive = false;
- }
- break;
- case 22:
- SceneItem::display(1950, 18, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- R2_GLOBALS._player.enableControl(CURSOR_WALK);
- break;
- case 23:
- SceneItem::display(1950, 25, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- scene->_sceneMode = R2_GLOBALS._flubMazeEntryDirection;
- scene->setAction(&scene->_sequenceManager, scene, 1960, &R2_GLOBALS._player, NULL);
- break;
- default:
- break;
- }
-}
-
-bool Scene1950::Vampire::startAction(CursorType action, Event &event) {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- if (!R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive ||
- (action != R2_PHOTON_STUNNER))
- return SceneActor::startAction(action, event);
-
- R2_GLOBALS._player.disableControl();
-
- if (R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._shotsRequired <= 1)
- _vampireMode = 21;
- else
- _vampireMode = 20;
-
- R2_GLOBALS._player.setVisage(25);
- if (R2_GLOBALS._flubMazeEntryDirection == 3)
- R2_GLOBALS._player.setStrip(2);
- else
- R2_GLOBALS._player.setStrip(1);
- R2_GLOBALS._player.animate(ANIM_MODE_5, this);
- R2_GLOBALS._sound3.play(99);
-
- return true;
-}
-
-/*--------------------------------------------------------------------------*/
-
-void Scene1950::NorthExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 1;
- scene->_sceneMode = 11;
-
- Common::Point pt(160, 127);
- PlayerMover *mover = new PlayerMover();
- R2_GLOBALS._player.addMover(mover, &pt, scene);
-}
-
-void Scene1950::UpExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 2;
- scene->_sceneMode = 12;
-
- if (!scene->_upExitStyle) {
- if (R2_GLOBALS.getFlag(36))
- scene->setAction(&scene->_sequenceManager, scene, 1953, &R2_GLOBALS._player, NULL);
- else
- scene->setAction(&scene->_sequenceManager, scene, 1970, &R2_GLOBALS._player, NULL);
- } else {
- if (R2_GLOBALS.getFlag(36))
- scene->setAction(&scene->_sequenceManager, scene, 1952, &R2_GLOBALS._player, NULL);
- else
- scene->setAction(&scene->_sequenceManager, scene, 1969, &R2_GLOBALS._player, NULL);
- }
-}
-
-void Scene1950::EastExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 3;
- scene->_sceneMode = 13;
-
- if (scene->_vampireActive)
- R2_GLOBALS._player.animate(ANIM_MODE_9);
-
- Common::Point pt(340, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, scene);
-}
-
-void Scene1950::DownExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 4;
- scene->_sceneMode = 14;
-
- if (R2_GLOBALS.getFlag(36))
- scene->setAction(&scene->_sequenceManager, scene, 1956, &R2_GLOBALS._player, NULL);
- else
- scene->setAction(&scene->_sequenceManager, scene, 1973, &R2_GLOBALS._player, NULL);
-}
-
-void Scene1950::SouthExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 5;
- scene->_sceneMode = 15;
-
- Common::Point pt(160, 213);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, scene);
-}
-
-void Scene1950::WestExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 6;
-
- if (R2_GLOBALS._flubMazeArea == 2) {
- // In the very first corridor area after the Scrith Door
- if ((R2_GLOBALS.getFlag(36)) && (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 2) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2)) {
- scene->_sceneMode = 1961;
- Common::Point pt(-20, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, scene);
- } else {
- if (!R2_GLOBALS.getFlag(36))
- SceneItem::display(1950, 33, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- if ((R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950) || (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 1950))
- SceneItem::display(1950, 34, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- scene->_sceneMode = 0;
- Common::Point pt(30, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, scene);
- }
- } else {
- if (scene->_vampireActive)
- R2_GLOBALS._player.animate(ANIM_MODE_9);
-
- scene->_sceneMode = 16;
- Common::Point pt(-20, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, scene);
- }
-}
-
-void Scene1950::ShaftExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 0;
- scene->_sceneMode = 1951;
- scene->setAction(&scene->_sequenceManager, scene, 1951, &R2_GLOBALS._player, NULL);
-}
-
-void Scene1950::DoorExit::changeScene() {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
-
- _enabled = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._flubMazeEntryDirection = 3;
- if (R2_GLOBALS._player._visage == 22) {
- scene->_sceneMode = 1975;
- scene->setAction(&scene->_sequenceManager, scene, 1975, &R2_GLOBALS._player, NULL);
- } else {
- SceneItem::display(1950, 22, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- R2_GLOBALS._flubMazeEntryDirection = 0;
- scene->_sceneMode = 0;
- Common::Point pt(250, 150);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, scene);
- _enabled = true;
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-Scene1950::Scene1950() {
- _upExitStyle = false;
- _removeFlag = false;
- _vampireActive = false;
- _vampireDestPos = Common::Point(0, 0);
- _vampireIndex = 0;
-}
-
-void Scene1950::synchronize(Serializer &s) {
- SceneExt::synchronize(s);
-
- s.syncAsSint16LE(_upExitStyle);
- s.syncAsSint16LE(_removeFlag);
- s.syncAsSint16LE(_vampireActive);
- s.syncAsSint16LE(_vampireDestPos.x);
- s.syncAsSint16LE(_vampireDestPos.y);
- s.syncAsSint16LE(_vampireIndex);
-}
-
-void Scene1950::initArea() {
- _northExit._enabled = false;
- _upExit._enabled = false;
- _eastExit._enabled = false;
- _downExit._enabled = false;
- _southExit._enabled = false;
- _westExit._enabled = false;
- _shaftExit._enabled = false;
- _doorExit._enabled = false;
- _northExit._insideArea = false;
- _upExit._insideArea = false;
- _eastExit._insideArea = false;
- _downExit._insideArea = false;
- _southExit._insideArea = false;
- _westExit._insideArea = false;
- _shaftExit._insideArea = false;
- _doorExit._insideArea = false;
- _northExit._moving = false;
- _upExit._moving = false;
- _eastExit._moving = false;
- _downExit._moving = false;
- _southExit._moving = false;
- _westExit._moving = false;
- _shaftExit._moving = false;
- _doorExit._moving = false;
- _upExitStyle = false;
-
- switch (R2_GLOBALS._flubMazeArea - 1) {
- case 0:
- loadScene(1948);
- break;
- case 1:
- // No break on purpose
- case 8:
- // No break on purpose
- case 10:
- // No break on purpose
- case 12:
- // No break on purpose
- case 16:
- // No break on purpose
- case 19:
- // No break on purpose
- case 23:
- // No break on purpose
- case 30:
- // No break on purpose
- case 44:
- // No break on purpose
- case 72:
- // No break on purpose
- case 74:
- // No break on purpose
- case 86:
- // No break on purpose
- case 96:
- // No break on purpose
- case 103:
- loadScene(1950);
- break;
- case 2:
- // No break on purpose
- case 29:
- loadScene(1965);
- break;
- case 3:
- // No break on purpose
- case 9:
- // No break on purpose
- case 11:
- // No break on purpose
- case 15:
- // No break on purpose
- case 24:
- // No break on purpose
- case 39:
- // No break on purpose
- case 45:
- // No break on purpose
- case 71:
- // No break on purpose
- case 73:
- // No break on purpose
- case 75:
- // No break on purpose
- case 79:
- // No break on purpose
- case 85:
- // No break on purpose
- case 87:
- // No break on purpose
- case 95:
- loadScene(1955);
- break;
- case 4:
- // No break on purpose
- case 6:
- // No break on purpose
- case 13:
- // No break on purpose
- case 27:
- // No break on purpose
- case 41:
- // No break on purpose
- case 48:
- // No break on purpose
- case 50:
- // No break on purpose
- case 54:
- // No break on purpose
- case 76:
- // No break on purpose
- case 80:
- // No break on purpose
- case 90:
- // No break on purpose
- case 104:
- loadScene(1975);
- break;
- case 5:
- // No break on purpose
- case 7:
- // No break on purpose
- case 14:
- // No break on purpose
- case 28:
- // No break on purpose
- case 32:
- // No break on purpose
- case 47:
- // No break on purpose
- case 53:
- loadScene(1997);
- break;
- case 17:
- // No break on purpose
- case 20:
- // No break on purpose
- case 25:
- // No break on purpose
- case 31:
- // No break on purpose
- case 33:
- // No break on purpose
- case 46:
- loadScene(1995);
- break;
- case 18:
- // No break on purpose
- case 22:
- // No break on purpose
- case 26:
- // No break on purpose
- case 36:
- // No break on purpose
- case 38:
- // No break on purpose
- case 43:
- // No break on purpose
- case 51:
- // No break on purpose
- case 70:
- // No break on purpose
- case 78:
- // No break on purpose
- case 84:
- // No break on purpose
- case 89:
- // No break on purpose
- case 101:
- loadScene(1970);
- break;
- case 21:
- // No break on purpose
- case 34:
- // No break on purpose
- case 57:
- // No break on purpose
- case 58:
- // No break on purpose
- case 59:
- // No break on purpose
- case 62:
- // No break on purpose
- case 65:
- loadScene(1980);
- break;
- case 35:
- // No break on purpose
- case 61:
- // No break on purpose
- case 77:
- // No break on purpose
- case 83:
- loadScene(1982);
- break;
- case 37:
- // No break on purpose
- case 52:
- // No break on purpose
- case 82:
- // No break on purpose
- case 88:
- // No break on purpose
- case 92:
- // No break on purpose
- case 97:
- // No break on purpose
- case 100:
- loadScene(1962);
- break;
- case 40:
- // No break on purpose
- case 102:
- loadScene(1960);
- break;
- case 42:
- // No break on purpose
- case 55:
- // No break on purpose
- case 60:
- // No break on purpose
- case 66:
- // No break on purpose
- case 68:
- // No break on purpose
- case 69:
- // No break on purpose
- case 93:
- // No break on purpose
- case 98:
- loadScene(1990);
- break;
- case 49:
- // No break on purpose
- case 81:
- // No break on purpose
- case 91:
- // No break on purpose
- case 94:
- // No break on purpose
- case 99:
- loadScene(1967);
- break;
- case 56:
- // No break on purpose
- case 63:
- // No break on purpose
- case 64:
- // No break on purpose
- case 67:
- loadScene(1985);
- _upExitStyle = true;
- break;
- default:
- break;
- }
-
- if (R2_GLOBALS._flubMazeArea != 1)
- R2_GLOBALS._walkRegions.load(1950);
-
- switch (R2_GLOBALS._flubMazeArea - 1) {
- case 0:
- _shaftExit._enabled = true;
- if ((R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0) && (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950))
- _doorExit._enabled = true;
- R2_GLOBALS._walkRegions.disableRegion(2);
- R2_GLOBALS._walkRegions.disableRegion(3);
- R2_GLOBALS._walkRegions.disableRegion(4);
- R2_GLOBALS._walkRegions.disableRegion(5);
- R2_GLOBALS._walkRegions.disableRegion(6);
- break;
- case 1:
- // No break on purpose
- case 2:
- // No break on purpose
- case 3:
- // No break on purpose
- case 8:
- // No break on purpose
- case 9:
- // No break on purpose
- case 10:
- // No break on purpose
- case 11:
- // No break on purpose
- case 12:
- // No break on purpose
- case 15:
- // No break on purpose
- case 16:
- // No break on purpose
- case 19:
- // No break on purpose
- case 23:
- // No break on purpose
- case 24:
- // No break on purpose
- case 29:
- // No break on purpose
- case 30:
- // No break on purpose
- case 39:
- // No break on purpose
- case 40:
- // No break on purpose
- case 44:
- // No break on purpose
- case 45:
- // No break on purpose
- case 71:
- // No break on purpose
- case 72:
- // No break on purpose
- case 73:
- // No break on purpose
- case 74:
- // No break on purpose
- case 75:
- // No break on purpose
- case 79:
- // No break on purpose
- case 85:
- // No break on purpose
- case 86:
- // No break on purpose
- case 87:
- // No break on purpose
- case 95:
- // No break on purpose
- case 96:
- // No break on purpose
- case 102:
- // No break on purpose
- case 103:
- _eastExit._enabled = true;
- _westExit._enabled = true;
- break;
- case 4:
- // No break on purpose
- case 6:
- // No break on purpose
- case 13:
- // No break on purpose
- case 17:
- // No break on purpose
- case 20:
- // No break on purpose
- case 25:
- // No break on purpose
- case 27:
- // No break on purpose
- case 31:
- // No break on purpose
- case 33:
- // No break on purpose
- case 37:
- // No break on purpose
- case 41:
- // No break on purpose
- case 46:
- // No break on purpose
- case 48:
- // No break on purpose
- case 50:
- // No break on purpose
- case 52:
- // No break on purpose
- case 54:
- // No break on purpose
- case 76:
- // No break on purpose
- case 80:
- // No break on purpose
- case 82:
- // No break on purpose
- case 88:
- // No break on purpose
- case 90:
- // No break on purpose
- case 92:
- // No break on purpose
- case 97:
- // No break on purpose
- case 100:
- // No break on purpose
- case 104:
- _westExit._enabled = true;
- R2_GLOBALS._walkRegions.disableRegion(6);
- R2_GLOBALS._walkRegions.disableRegion(9);
- break;
- case 5:
- // No break on purpose
- case 7:
- // No break on purpose
- case 14:
- // No break on purpose
- case 18:
- // No break on purpose
- case 22:
- // No break on purpose
- case 26:
- // No break on purpose
- case 28:
- // No break on purpose
- case 32:
- // No break on purpose
- case 36:
- // No break on purpose
- case 38:
- // No break on purpose
- case 43:
- // No break on purpose
- case 47:
- // No break on purpose
- case 49:
- // No break on purpose
- case 51:
- // No break on purpose
- case 53:
- // No break on purpose
- case 70:
- // No break on purpose
- case 78:
- // No break on purpose
- case 81:
- // No break on purpose
- case 84:
- // No break on purpose
- case 89:
- // No break on purpose
- case 91:
- // No break on purpose
- case 94:
- // No break on purpose
- case 99:
- // No break on purpose
- case 101:
- _eastExit._enabled = true;
- R2_GLOBALS._walkRegions.disableRegion(1);
- R2_GLOBALS._walkRegions.disableRegion(7);
- R2_GLOBALS._walkRegions.disableRegion(13);
- break;
- default:
- R2_GLOBALS._walkRegions.disableRegion(1);
- R2_GLOBALS._walkRegions.disableRegion(6);
- R2_GLOBALS._walkRegions.disableRegion(7);
- R2_GLOBALS._walkRegions.disableRegion(9);
- R2_GLOBALS._walkRegions.disableRegion(13);
- break;
- }
-
- _northDoorway.remove();
- _northDoorway.removeObject();
- _southDoorway.remove();
-
- switch (R2_GLOBALS._flubMazeArea - 4) {
- case 0:
- // No break on purpose
- case 3:
- // No break on purpose
- case 16:
- // No break on purpose
- case 22:
- // No break on purpose
- case 24:
- // No break on purpose
- case 32:
- // No break on purpose
- case 33:
- // No break on purpose
- case 45:
- // No break on purpose
- case 46:
- // No break on purpose
- case 48:
- // No break on purpose
- case 51:
- // No break on purpose
- case 56:
- // No break on purpose
- case 59:
- // No break on purpose
- case 67:
- // No break on purpose
- case 68:
- // No break on purpose
- case 70:
- // No break on purpose
- case 73:
- // No break on purpose
- case 82:
- // No break on purpose
- case 90:
- _northExit._enabled = true;
- _northDoorway.setup(1950, (R2_GLOBALS._flubMazeArea % 2) + 1, 1, 160, 137, 25);
- //visage,strip,frame,px,py,priority,effect
- _southDoorway.postInit();
- _southDoorway.setVisage(1950);
- _southDoorway.setStrip((((R2_GLOBALS._flubMazeArea - 1) / 35) % 2) + 1);
- _southDoorway.setFrame(2);
- _southDoorway.setPosition(Common::Point(160, 167));
- _southDoorway.fixPriority(220);
- R2_GLOBALS._walkRegions.disableRegion(3);
- R2_GLOBALS._walkRegions.disableRegion(4);
- break;
- case 7:
- // No break on purpose
- case 10:
- // No break on purpose
- case 23:
- // No break on purpose
- case 29:
- // No break on purpose
- case 31:
- // No break on purpose
- case 39:
- // No break on purpose
- case 40:
- // No break on purpose
- case 52:
- // No break on purpose
- case 53:
- // No break on purpose
- case 55:
- // No break on purpose
- case 63:
- // No break on purpose
- case 65:
- // No break on purpose
- case 66:
- // No break on purpose
- case 75:
- // No break on purpose
- case 77:
- // No break on purpose
- case 81:
- // No break on purpose
- case 87:
- // No break on purpose
- case 89:
- // No break on purpose
- case 97:
- _southExit._enabled = true;
-
- _southDoorway.postInit();
- _southDoorway.setVisage(1950);
- _southDoorway.setStrip((((R2_GLOBALS._flubMazeArea - 1) / 35) % 2) + 1);
- _southDoorway.setFrame(3);
- _southDoorway.setPosition(Common::Point(160, 167));
- _southDoorway.fixPriority(220);
- break;
- case 58:
- // No break on purpose
- case 74:
- // No break on purpose
- case 80:
- _northExit._enabled = true;
- _southExit._enabled = true;
-
- _northDoorway.setup(1950, (R2_GLOBALS._flubMazeArea % 2) + 1, 1, 160, 137, 25);
-
- _southDoorway.postInit();
- _southDoorway.setVisage(1950);
- _southDoorway.setStrip((((R2_GLOBALS._flubMazeArea - 1) / 35) % 2) + 1);
- _southDoorway.setFrame(3);
- _southDoorway.setPosition(Common::Point(160, 167));
- _southDoorway.fixPriority(220);
- R2_GLOBALS._walkRegions.disableRegion(3);
- R2_GLOBALS._walkRegions.disableRegion(4);
- break;
- default:
- _southDoorway.postInit();
- _southDoorway.setVisage(1950);
- _southDoorway.setStrip(((R2_GLOBALS._flubMazeArea - 1) / 35) % 2 + 1);
- _southDoorway.setFrame(2);
- _southDoorway.setPosition(Common::Point(160, 167));
- _southDoorway.fixPriority(220);
- break;
- }
-
- switch (R2_GLOBALS._flubMazeArea - 3) {
- case 0:
- // No break on purpose
- case 3:
- // No break on purpose
- case 5:
- // No break on purpose
- case 12:
- // No break on purpose
- case 15:
- // No break on purpose
- case 18:
- // No break on purpose
- case 19:
- // No break on purpose
- case 23:
- // No break on purpose
- case 26:
- // No break on purpose
- case 27:
- // No break on purpose
- case 29:
- // No break on purpose
- case 30:
- // No break on purpose
- case 31:
- // No break on purpose
- case 32:
- // No break on purpose
- case 44:
- // No break on purpose
- case 45:
- // No break on purpose
- case 51:
- // No break on purpose
- case 55:
- // No break on purpose
- case 56:
- // No break on purpose
- case 57:
- // No break on purpose
- case 60:
- // No break on purpose
- case 63:
- _upExit._enabled = true;
- break;
- case 54:
- // No break on purpose
- case 61:
- // No break on purpose
- case 62:
- // No break on purpose
- case 65:
- _upExit._enabled = true;
- // No break on purpose
- case 35:
- // No break on purpose
- case 38:
- // No break on purpose
- case 40:
- // No break on purpose
- case 47:
- // No break on purpose
- case 50:
- // No break on purpose
- case 53:
- // No break on purpose
- case 58:
- // No break on purpose
- case 64:
- // No break on purpose
- case 66:
- // No break on purpose
- case 67:
- // No break on purpose
- case 79:
- // No break on purpose
- case 80:
- // No break on purpose
- case 86:
- // No break on purpose
- case 89:
- // No break on purpose
- case 90:
- // No break on purpose
- case 91:
- // No break on purpose
- case 92:
- // No break on purpose
- case 95:
- // No break on purpose
- case 96:
- // No break on purpose
- case 97:
- // No break on purpose
- case 98:
- // No break on purpose
- case 100:
- _downExit._enabled = true;
- R2_GLOBALS._walkRegions.disableRegion(4);
- R2_GLOBALS._walkRegions.disableRegion(5);
- R2_GLOBALS._walkRegions.disableRegion(6);
- R2_GLOBALS._walkRegions.disableRegion(10);
- R2_GLOBALS._walkRegions.disableRegion(11);
- default:
- break;
- }
- R2_GLOBALS._uiElements.draw();
-}
-
-void Scene1950::enterArea() {
- R2_GLOBALS._player.disableControl();
- R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
-
- _vampire.remove();
- _door.remove();
- _scrolls.remove();
-
- _vampireActive = false;
- _vampireIndex = 0;
-
- // Certain areas have a vampire in them
- switch (R2_GLOBALS._flubMazeArea) {
- case 10:
- _vampireIndex = 1;
- break;
- case 13:
- _vampireIndex = 2;
- break;
- case 16:
- _vampireIndex = 3;
- break;
- case 17:
- _vampireIndex = 4;
- break;
- case 24:
- _vampireIndex = 5;
- break;
- case 25:
- _vampireIndex = 6;
- break;
- case 31:
- _vampireIndex = 7;
- break;
- case 40:
- _vampireIndex = 8;
- break;
- case 45:
- _vampireIndex = 9;
- break;
- case 46:
- _vampireIndex = 10;
- break;
- case 73:
- _vampireIndex = 11;
- break;
- case 75:
- _vampireIndex = 12;
- break;
- case 80:
- _vampireIndex = 13;
- break;
- case 87:
- _vampireIndex = 14;
- break;
- case 88:
- _vampireIndex = 15;
- break;
- case 96:
- _vampireIndex = 16;
- break;
- case 97:
- _vampireIndex = 17;
- break;
- case 104:
- _vampireIndex = 18;
- break;
- default:
- break;
- }
-
- if (_vampireIndex != 0) {
- _vampire.postInit();
- _vampire._numFrames = 6;
- _vampire._moveRate = 6;
- _vampire._moveDiff = Common::Point(3, 2);
- _vampire._effect = EFFECT_SHADED;
-
- if (!R2_GLOBALS._vampireData[_vampireIndex - 1]._isAlive) {
- // Show vampire ashes
- _vampire.setPosition(Common::Point(R2_GLOBALS._vampireData[_vampireIndex - 1]._position));
- _vampire.animate(ANIM_MODE_NONE, NULL);
- _vampire.addMover(NULL);
- _vampire.setVisage(1961);
- _vampire.setStrip(4);
- _vampire.setFrame(10);
- _vampire.fixPriority(10);
- _vampire.setDetails(1950, 15, -1, 17, 2, (SceneItem *) NULL);
- } else {
- // Start the vampire
- _vampire.setVisage(1960);
- _vampire.setPosition(Common::Point(160, 130));
- _vampire.animate(ANIM_MODE_2, NULL);
- _vampire.setDetails(1950, 12, -1, 14, 2, (SceneItem *) NULL);
- _vampireActive = true;
- }
- }
- if ((R2_GLOBALS._flubMazeArea == 1) && (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) != 0)) {
- // Show doorway at the right hand side of the very first flub corridor
- _door.postInit();
- _door.setVisage(1948);
- _door.setStrip(3);
- _door.setPosition(Common::Point(278, 155));
- _door.fixPriority(100);
- _door.setDetails(1950, 19, 20, 23, 2, (SceneItem *) NULL);
- }
-
- if (R2_GLOBALS._flubMazeArea == 102) {
- R2_GLOBALS._walkRegions.load(1951);
- R2_GLOBALS._walkRegions.disableRegion(1);
- R2_GLOBALS._walkRegions.disableRegion(5);
- R2_GLOBALS._walkRegions.disableRegion(6);
- R2_GLOBALS._walkRegions.disableRegion(7);
-
- _cube.postInit();
- _cube.setVisage(1970);
- _cube.setStrip(1);
- if (R2_GLOBALS.getFlag(37))
- _cube.setFrame(3);
- else
- _cube.setFrame(1);
- _cube.setPosition(Common::Point(193, 158));
- _cube.setDetails(1950, 3, 4, 5, 2, (SceneItem *) NULL);
-
- _pulsingLights.postInit();
- _pulsingLights.setVisage(1970);
- _pulsingLights.setStrip(3);
- _pulsingLights.animate(ANIM_MODE_2, NULL);
- _pulsingLights._numFrames = 6;
- _pulsingLights.setPosition(Common::Point(194, 158));
- _pulsingLights.fixPriority(159);
-
- _keypad.setDetails(Rect(188, 124, 199, 133), 1950, 27, 28, -1, 2, NULL);
-
- if (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950) {
- _gem.postInit();
- _gem.setVisage(1970);
- _gem.setStrip(1);
- _gem.setFrame(2);
- _gem.fixPriority(160);
- }
-
- if (R2_GLOBALS.getFlag(37)) {
- _gem.setPosition(Common::Point(192, 118));
- _gem.setDetails(1950, 9, 4, -1, 2, (SceneItem *) NULL);
- } else {
- _containmentField.postInit();
- _containmentField.setVisage(1970);
- _containmentField.setStrip(4);
- _containmentField._numFrames = 4;
- _containmentField.animate(ANIM_MODE_8, 0, NULL);
- _containmentField.setPosition(Common::Point(192, 121));
- _containmentField.fixPriority(159);
- _containmentField.setDetails(1950, 6, 7, 8, 2, (SceneItem *) NULL);
-
- _gem.setPosition(Common::Point(192, 109));
- _gem.setDetails(1950, 9, 7, 8, 2, (SceneItem *) NULL);
- }
-
- _scrolls.postInit();
- _scrolls.setVisage(1972);
- _scrolls.setStrip(1);
- _scrolls.setPosition(Common::Point(76, 94));
- _scrolls.fixPriority(25);
- _scrolls.setDetails(1950, 30, -1, -1, 2, (SceneItem *) NULL);
- if (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2)
- _scrolls.setFrame(2);
- else
- _scrolls.setFrame(1);
-
- _removeFlag = true;
- } else if (_removeFlag) {
- _cube.remove();
- _containmentField.remove();
- _gem.remove();
- _pulsingLights.remove();
- _scrolls.remove();
-
- R2_GLOBALS._sceneItems.remove(&_background);
- _background.setDetails(Rect(0, 0, 320, 200), 1950, 0, 1, 2, 2, NULL);
-
- _removeFlag = false;
- }
-
- switch (R2_GLOBALS._flubMazeEntryDirection) {
- case 0:
- _sceneMode = 1950;
- if (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0)
- // The original uses CURSOR_ARROW. CURSOR_WALK is much more coherent
- R2_GLOBALS._player.enableControl(CURSOR_WALK);
- else
- setAction(&_sequenceManager, this, 1950, &R2_GLOBALS._player, NULL);
-
- break;
- case 1: {
- _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
- R2_GLOBALS._player.setPosition(Common::Point(160, 213));
- Common::Point pt(160, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- }
- break;
- case 2:
- _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
- if (R2_GLOBALS.getFlag(36))
- setAction(&_sequenceManager, this, 1957, &R2_GLOBALS._player, NULL);
- else
- setAction(&_sequenceManager, this, 1974, &R2_GLOBALS._player, NULL);
- break;
- case 3:
- // Entering from the left
- if (!_vampireActive) {
- _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
- R2_GLOBALS._player.setPosition(Common::Point(-20, 160));
- Common::Point pt(30, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- } else {
- _sceneMode = 18;
- _eastExit._enabled = false;
- _vampireDestPos = Common::Point(60, 152);
- R2_GLOBALS._player.enableControl(CURSOR_USE);
- R2_GLOBALS._player._canWalk = false;
-
- _vampire.setStrip(2);
- NpcMover *mover = new NpcMover();
- _vampire.addMover(mover, &_vampireDestPos, this);
-
- R2_GLOBALS._player.setPosition(Common::Point(-20, 160));
- Common::Point pt2(30, 160);
- NpcMover *mover2 = new NpcMover();
- R2_GLOBALS._player.addMover(mover2, &pt2, NULL);
- }
- break;
- case 4:
- _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
- if (!_upExitStyle) {
- if (R2_GLOBALS.getFlag(36))
- setAction(&_sequenceManager, this, 1955, &R2_GLOBALS._player, NULL);
- else
- setAction(&_sequenceManager, this, 1972, &R2_GLOBALS._player, NULL);
- } else {
- if (R2_GLOBALS.getFlag(36))
- setAction(&_sequenceManager, this, 1954, &R2_GLOBALS._player, NULL);
- else
- setAction(&_sequenceManager, this, 1971, &R2_GLOBALS._player, NULL);
- }
- break;
- case 5: {
- _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
- R2_GLOBALS._player.setPosition(Common::Point(160, 127));
- Common::Point pt(160, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- }
- break;
- case 6:
- // Entering from the right
- if (!_vampireActive) {
- _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
- if (R2_GLOBALS._flubMazeArea == 1) {
- setAction(&_sequenceManager, this, 1961, &R2_GLOBALS._player, NULL);
- } else {
- R2_GLOBALS._player.setPosition(Common::Point(340, 160));
- Common::Point pt(289, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- }
- } else {
- _sceneMode = 17;
- _westExit._enabled = false;
- _vampireDestPos = Common::Point(259, 152);
-
- R2_GLOBALS._player.enableControl(CURSOR_USE);
- R2_GLOBALS._player._canWalk = false;
-
- _vampire.setStrip(1);
- NpcMover *mover = new NpcMover();
- _vampire.addMover(mover, &_vampireDestPos, this);
-
- R2_GLOBALS._player.setPosition(Common::Point(340, 160));
- Common::Point pt2(289, 160);
- NpcMover *mover2 = new NpcMover();
- R2_GLOBALS._player.addMover(mover2, &pt2, NULL);
- }
- break;
- default:
- break;
- }
-}
-
-void Scene1950::doButtonPress(int indx) {
- Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
- R2_GLOBALS._player.disableControl();
-
- int prevIndex = indx - 1;
- if ((indx / 4) == (prevIndex / 4)) {
- if (prevIndex < 0)
- prevIndex = 3;
- } else {
- prevIndex += 4;
- }
-
- assert(prevIndex >= 0 && prevIndex < 16);
- if (!_KeypadWindow._buttons[prevIndex]._toggled) {
- _KeypadWindow._buttons[prevIndex].setFrame(2);
- _KeypadWindow._buttons[prevIndex]._toggled = true;
- } else {
- _KeypadWindow._buttons[prevIndex].setFrame(1);
- _KeypadWindow._buttons[prevIndex]._toggled = false;
- }
-
- prevIndex = indx + 1;
- if ((indx / 4) == (prevIndex / 4)) {
- if (prevIndex > 15)
- prevIndex = 12;
- } else {
- prevIndex -= 4;
- }
-
- assert(prevIndex >= 0 && prevIndex < 16);
- if (!_KeypadWindow._buttons[prevIndex]._toggled) {
- _KeypadWindow._buttons[prevIndex].setFrame(2);
- _KeypadWindow._buttons[prevIndex]._toggled = true;
- } else {
- _KeypadWindow._buttons[prevIndex].setFrame(1);
- _KeypadWindow._buttons[prevIndex]._toggled = false;
- }
-
- prevIndex = indx - 4;
- if (prevIndex < 0)
- prevIndex += 16;
-
- assert(prevIndex >= 0 && prevIndex < 16);
- if (!_KeypadWindow._buttons[prevIndex]._toggled) {
- _KeypadWindow._buttons[prevIndex].setFrame(2);
- _KeypadWindow._buttons[prevIndex]._toggled = true;
- } else {
- _KeypadWindow._buttons[prevIndex].setFrame(1);
- _KeypadWindow._buttons[prevIndex]._toggled = false;
- }
-
- prevIndex = indx + 4;
- if (prevIndex > 15)
- prevIndex -= 16;
-
- assert(prevIndex >= 0 && prevIndex < 16);
- if (!_KeypadWindow._buttons[prevIndex]._toggled) {
- _KeypadWindow._buttons[prevIndex].setFrame(2);
- _KeypadWindow._buttons[prevIndex]._toggled = true;
- } else {
- _KeypadWindow._buttons[prevIndex].setFrame(1);
- _KeypadWindow._buttons[prevIndex]._toggled = false;
- }
-
- // Check whether all the buttons are highlighted
- int cpt = 0;
- for (prevIndex = 0; prevIndex < 16; prevIndex++) {
- if (_KeypadWindow._buttons[prevIndex]._toggled)
- ++cpt;
- }
-
- if (cpt != 16) {
- R2_GLOBALS._player.enableControl();
- R2_GLOBALS._player._canWalk = false;
- } else {
- R2_GLOBALS.setFlag(37);
- _sceneMode = 24;
- setAction(&_sequenceManager, scene, 1976, NULL);
- }
-}
-
-void Scene1950::postInit(SceneObjectList *OwnerList) {
- _upExitStyle = false;
- _removeFlag = false;
- _vampireActive = false;
- _vampireIndex = 0;
- if (R2_GLOBALS._sceneManager._previousScene == 300)
- R2_GLOBALS._flubMazeArea = 103;
-
- initArea();
- SceneExt::postInit();
- R2_GLOBALS._sound1.play(105);
-
- _northExit.setDetails(Rect(130, 46, 189, 135), SHADECURSOR_UP, 1950);
- _northExit.setDest(Common::Point(160, 145));
-
- _upExit.setDetails(Rect(208, 0, 255, 73), EXITCURSOR_N, 1950);
- _upExit.setDest(Common::Point(200, 151));
-
- _eastExit.setDetails(Rect(305, 95, 320, 147), EXITCURSOR_E, 1950);
- _eastExit.setDest(Common::Point(312, 160));
-
- _downExit.setDetails(Rect(208, 99, 255, 143), EXITCURSOR_S, 1950);
- _downExit.setDest(Common::Point(200, 151));
-
- _southExit.setDetails(Rect(113, 154, 206, 168), SHADECURSOR_DOWN, 1950);
- _southExit.setDest(Common::Point(160, 165));
-
- _westExit.setDetails(Rect(0, 95, 14, 147), EXITCURSOR_W, 1950);
- _westExit.setDest(Common::Point(7, 160));
-
- _shaftExit.setDetails(Rect(72, 54, 120, 128), EXITCURSOR_NW, 1950);
- _shaftExit.setDest(Common::Point(120, 140));
-
- _doorExit.setDetails(Rect(258, 60, 300, 145), EXITCURSOR_NE, 1950);
- _doorExit.setDest(Common::Point(268, 149));
-
- R2_GLOBALS._player.postInit();
- if ( (R2_INVENTORY.getObjectScene(R2_TANNER_MASK) == 0) && (R2_INVENTORY.getObjectScene(R2_PURE_GRAIN_ALCOHOL) == 0)
- && (R2_INVENTORY.getObjectScene(R2_SOAKED_FACEMASK) == 0) && (!R2_GLOBALS.getFlag(36)) )
- R2_GLOBALS._player.setVisage(22);
- else
- R2_GLOBALS._player.setVisage(20);
-
- R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
- _background.setDetails(Rect(0, 0, 320, 200), 1950, 0, 1, 2, 1, NULL);
-
- enterArea();
-}
-
-void Scene1950::remove() {
- R2_GLOBALS._sound1.stop();
- R2_GLOBALS._sound2.fadeOut2(NULL);
- SceneExt::remove();
-}
-
-void Scene1950::signal() {
- switch (_sceneMode) {
- case 11:
- R2_GLOBALS._flubMazeArea += 7;
- initArea();
- enterArea();
- break;
- case 12:
- // Moving up a ladder within the Flub maze
- R2_GLOBALS._flubMazeArea += 35;
- initArea();
- enterArea();
- break;
- case 1975:
- SceneItem::display(1950, 21, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, 1,
- SET_Y, 20, SET_EXT_BGCOLOR, 7, LIST_END);
- // No break on purpose
- case 13:
- // Moving east within the Flub maze
- ++R2_GLOBALS._flubMazeArea;
- initArea();
- enterArea();
- break;
- case 14:
- // Moving down a ladder within the Flub maze
- R2_GLOBALS._flubMazeArea -= 35;
- initArea();
- enterArea();
- break;
- case 15:
- R2_GLOBALS._flubMazeArea -= 7;
- initArea();
- enterArea();
- break;
- case 16:
- // Moving west within the Flub maze
- // No break on purpose
- case 1961:
- --R2_GLOBALS._flubMazeArea;
- initArea();
- enterArea();
- break;
- case 17: {
- _sceneMode = 13;
- R2_GLOBALS._flubMazeEntryDirection = 3;
- _vampireActive = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._player._canWalk = true;
- R2_GLOBALS._player.setVisage(22);
- R2_GLOBALS._player.animate(ANIM_MODE_9);
- Common::Point pt(340, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- Common::Point pt2(289, 160);
- NpcMover *mover2 = new NpcMover();
- _vampire.addMover(mover2, &pt2, NULL);
- }
- break;
- case 18: {
- _sceneMode = 16;
- R2_GLOBALS._flubMazeEntryDirection = 6;
- _vampireActive = false;
- R2_GLOBALS._player.disableControl(CURSOR_WALK);
- R2_GLOBALS._player._canWalk = true;
- R2_GLOBALS._player.setVisage(22);
- R2_GLOBALS._player.animate(ANIM_MODE_9);
- Common::Point pt(-20, 160);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- Common::Point pt2(30, 160);
- NpcMover *mover2 = new NpcMover();
- _vampire.addMover(mover2, &pt2, NULL);
- }
- break;
- case 24:
- _KeypadWindow.remove();
- _sceneMode = 1966;
- _cube.setFrame(3);
- setAction(&_sequenceManager, this, 1966, &_containmentField, &_gem, NULL);
- break;
- case 1951:
- R2_GLOBALS._sound1.fadeOut2(NULL);
- R2_GLOBALS._sceneManager.changeScene(1945);
- break;
- case 1958:
- SceneItem::display(1950, 24, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
- R2_GLOBALS._player.enableControl(CURSOR_WALK);
- _doorExit._enabled = true;
- break;
- case 1959:
- R2_INVENTORY.setObjectScene(R2_SOAKED_FACEMASK, 0);
- R2_GLOBALS._player.enableControl(CURSOR_WALK);
- _doorExit._enabled = true;
- break;
- case 1962:
- // No break on purpose
- case 1963:
- R2_GLOBALS._player.enableControl();
- _KeypadWindow.setup2(1971, 1, 1, 160, 135);
- break;
- case 1964:
- // No break on purpose
- case 1965:
- if (!R2_GLOBALS.getFlag(37))
- SceneItem::display(1950, 26, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
-
- R2_GLOBALS._player.enableControl();
- break;
- case 1966:
- _containmentField.remove();
- if (R2_GLOBALS.getFlag(36)) {
- _sceneMode = 1964;
- setAction(&_sequenceManager, this, 1964, &R2_GLOBALS._player, NULL);
- } else {
- _sceneMode = 1965;
- setAction(&_sequenceManager, this, 1965, &R2_GLOBALS._player, NULL);
- }
- _gem.setDetails(1950, 9, -1, -1, 2, (SceneItem *) NULL);
- break;
- case 1967: {
- _sceneMode = 0;
- R2_INVENTORY.setObjectScene(R2_SAPPHIRE_BLUE, 2);
- _gem.remove();
- if (R2_GLOBALS.getFlag(36))
- R2_GLOBALS._player.setVisage(20);
- else
- R2_GLOBALS._player.setVisage(22);
-
- R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
- // This is a hack to work around a pathfinding issue. original destination is (218, 165)
- Common::Point pt(128, 165);
- NpcMover *mover = new NpcMover();
- R2_GLOBALS._player.addMover(mover, &pt, this);
- }
- break;
- case 1968:
- R2_GLOBALS._player.enableControl();
- R2_INVENTORY.setObjectScene(R2_ANCIENT_SCROLLS, 2);
- _scrolls.setFrame(2);
- if (R2_GLOBALS.getFlag(36))
- R2_GLOBALS._player.setVisage(20);
- else
- R2_GLOBALS._player.setVisage(22);
- R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
- break;
- default:
- R2_GLOBALS._player.enableControl(CURSOR_WALK);
- break;
- }
-}
-
-void Scene1950::process(Event &event) {
- if ( (event.eventType == EVENT_BUTTON_DOWN)
- && (R2_GLOBALS._player._uiEnabled)
- && (R2_GLOBALS._events.getCursor() == R2_SOAKED_FACEMASK)
- && (R2_GLOBALS._player._bounds.contains(event.mousePos))
- && (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0)) {
- event.handled = true;
- R2_GLOBALS._player.disableControl();
- _shaftExit._enabled = false;
- _doorExit._enabled = false;
- _sceneMode = 1959;
- setAction(&_sequenceManager, this, 1959, &R2_GLOBALS._player, NULL);
- }
-
- Scene::process(event);
-}
-
} // End of namespace Ringworld2
} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h
index 91c4b88391..e6f5e0ab97 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.h
@@ -135,270 +135,6 @@ public:
virtual void saveCharacter(int characterIndex);
};
-class Scene1200 : public SceneExt {
- enum CrawlDirection { CRAWL_EAST = 1, CRAWL_WEST = 2, CRAWL_SOUTH = 3, CRAWL_NORTH = 4 };
-
- class LaserPanel: public ModalWindow {
- public:
- class Jumper : public SceneActorExt {
- public:
- void init(int state);
- virtual bool startAction(CursorType action, Event &event);
- };
-
- Jumper _jumper1;
- Jumper _jumper2;
- Jumper _jumper3;
-
- LaserPanel();
-
- virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void remove();
- };
-
-public:
- NamedHotspot _item1;
- SceneActor _actor1;
- LaserPanel _laserPanel;
- MazeUI _mazeUI;
- SequenceManager _sequenceManager;
-
- int _nextCrawlDirection;
- int _field414;
- int _field416;
- int _field418;
- int _field41A;
- bool _fixupMaze;
-
- Scene1200();
- void synchronize(Serializer &s);
-
- void startCrawling(CrawlDirection dir);
-
- virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void signal();
- virtual void process(Event &event);
- virtual void dispatch();
- virtual void saveCharacter(int characterIndex);
-};
-
-class Scene1337 : public SceneExt {
- class OptionsDialog: public GfxDialog {
- private:
- GfxButton _autoplay;
- GfxButton _restartGame;
- GfxButton _quitGame;
- GfxButton _continueGame;
-
- OptionsDialog();
- virtual ~OptionsDialog() {}
- virtual GfxButton *execute(GfxButton *defaultButton);
- public:
- static void show();
- };
-
- class Card: public SceneHotspot {
- public:
- SceneObject _card;
-
- int _cardId;
- Common::Point _stationPos;
-
- Card();
- void synchronize(Serializer &s);
- bool isIn(Common::Point pt);
- };
-
- class GameBoardSide: public SceneHotspot {
- public:
- Card _handCard[4];
- Card _outpostStation[8];
- Card _delayCard;
- Card _emptyStationPos;
-
- Common::Point _card1Pos;
- Common::Point _card2Pos;
- Common::Point _card3Pos;
- Common::Point _card4Pos;
- int _frameNum;
-
- GameBoardSide();
- void synchronize(Serializer &s);
- };
-
- class Action1337: public Action {
- public:
- void waitFrames(int32 frameCount);
- };
-
- class Action1: public Action1337 {
- public:
- void signal();
- };
- class Action2: public Action1337 {
- public:
- void signal();
- };
- class Action3: public Action1337 {
- public:
- void signal();
- };
- class Action4: public Action1337 {
- public:
- void signal();
- };
- class Action5: public Action1337 {
- public:
- void signal();
- };
- class Action6: public Action1337 {
- public:
- void signal();
- };
- class Action7: public Action1337 {
- public:
- void signal();
- };
- class Action8: public Action1337 {
- public:
- void signal();
- };
- class Action9: public Action1337 {
- public:
- void signal();
- };
- class Action10: public Action1337 {
- public:
- void signal();
- };
- class Action11: public Action1337 {
- public:
- void signal();
- };
- class Action12: public Action1337 {
- public:
- void signal();
- };
- class Action13: public Action1337 {
- public:
- void signal();
- };
-public:
- Action1 _action1;
- Action2 _action2;
- Action3 _action3;
- Action4 _action4;
- Action5 _action5;
- Action6 _action6;
- Action7 _action7;
- Action8 _action8;
- Action9 _action9;
- Action10 _action10;
- Action11 _action11;
- Action12 _action12;
- Action13 _action13;
-
- typedef void (Scene1337::*FunctionPtrType)();
- FunctionPtrType _delayedFunction;
-
- bool _autoplay;
- bool _shuffleEndedFl;
- bool _showPlayerTurn;
- bool _displayHelpFl;
- bool _instructionsDisplayedFl;
-
- // Discarded cards are put in the available cards pile, with an higher index so there no conflict
- int _currentDiscardIndex;
- int _availableCardsPile[100];
- int _cardsAvailableNumb;
- int _currentPlayerNumb;
- int _actionIdx1;
- int _actionIdx2;
- int _winnerId;
- int _instructionsWaitCount;
- int _cursorCurRes;
- int _cursorCurStrip;
- int _cursorCurFrame;
-
- ASound _aSound1;
- ASound _aSound2;
- GameBoardSide _gameBoardSide[4];
- SceneActor _helpIcon;
- SceneActor _stockPile;
- SceneItem _actionItem;
- SceneObject _currentPlayerArrow;
-
- Card *_actionCard1;
- Card *_actionCard2;
- Card *_actionCard3;
- Card _animatedCard;
- Card _shuffleAnimation;
- Card _discardedPlatformCard;
- Card _selectedCard;
- Card _discardPile;
- Card _stockCard;
-
- SceneObject _upperDisplayCard[8];
- SceneObject _lowerDisplayCard[8];
-
- Scene1337();
- virtual void synchronize(Serializer &s);
-
- void actionDisplay(int resNum, int lineNum, int x, int y, int keepOnScreen, int width, int textMode, int fontNum, int colFG, int colBGExt, int colFGExt);
- void setAnimationInfo(Card *card);
- void handleNextTurn();
- void handlePlayerTurn();
- bool isStationCard(int cardId);
- bool isStopConstructionCard(int cardId);
- int getStationId(int playerId, int handCardId);
- int findPlatformCardInHand(int playerId);
- int findCard13InHand(int playerId);
- int checkThieftCard(int playerId);
- int isDelayCard(int cardId);
- int getStationCardId(int cardId);
- void handlePlayer01Discard(int playerId);
- void playThieftCard(int playerId, Card *card, int victimId);
- int getPreventionCardId(int cardId);
- bool isAttackPossible(int victimId, int cardId);
- int getPlayerWithOutpost(int playerId);
- bool checkAntiDelayCard(int delayCardId, int cardId);
- void playStationCard(Card *station, Card *platform);
- void playDelayCard(Card *card, Card *dest);
- void playPlatformCard(Card *card, Card *dest);
- void playAntiDelayCard(Card *card, Card *dest);
- Card *getStationCard(int arg1);
- void playCounterTrickCard(Card *card, int playerId);
- int getFreeHandCard(int playerId);
- void discardCard(Card *card);
- void subC4CD2();
- void subC4CEC();
- void subC51A0(Card *subObj1, Card *subObj2);
- void displayDialog(int dialogNumb);
- void subPostInit();
- void displayInstructions();
- void suggestInstructions();
- void shuffleCards();
- void dealCards();
- void showOptionsDialog();
- void handleClick(int arg1, Common::Point pt);
- void handlePlayer0();
- void handlePlayer1();
- void handlePlayer2();
- void handlePlayer3();
- void handleAutoplayPlayer2();
- void updateCursorId(int arg1, bool arg2);
- void setCursorData(int resNum, int rlbNum, int frameNum);
- void subD18F5();
- void subD1917();
- void subD1940(bool flag);
- void subD1975(int arg1, int arg2);
-
- virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void remove();
- virtual void process(Event &event);
- virtual void dispatch();
-};
-
class Scene1500 : public SceneExt {
public:
SceneActor _starship;
@@ -1097,143 +833,6 @@ public:
virtual void signal();
};
-class Scene1950 : public SceneExt {
- /* Windows */
- class KeypadWindow: public ModalWindow {
- public:
- class KeypadButton : public SceneActor {
- public:
- int _buttonIndex;
- bool _pressed;
- bool _toggled;
-
- KeypadButton();
- void synchronize(Serializer &s);
-
- void init(int indx);
- virtual void process(Event &event);
- virtual bool startAction(CursorType action, Event &event);
- };
-
- SceneActor _areaActor;
- KeypadButton _buttons[16];
-
- int _buttonIndex;
-
- KeypadWindow();
- virtual void synchronize(Serializer &s);
- virtual void remove();
- virtual void setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY);
- virtual void setup3(int resNum, int lookLineNum, int talkLineNum, int useLineNum);
- };
-
- class Keypad : public NamedHotspot {
- public:
- virtual bool startAction(CursorType action, Event &event);
- };
-
- /* Actors */
- class Door : public SceneActor {
- public:
- virtual bool startAction(CursorType action, Event &event);
- };
- class Scrolls : public SceneActor {
- public:
- virtual bool startAction(CursorType action, Event &event);
- };
- class Gem : public SceneActor {
- public:
- virtual bool startAction(CursorType action, Event &event);
- };
- class Vampire : public SceneActor {
- public:
- Common::Point _deadPosition;
- int _deltaX;
- int _deltaY;
- int _vampireMode;
-
- Vampire();
- void synchronize(Serializer &s);
-
- virtual void signal();
- virtual bool startAction(CursorType action, Event &event);
- };
-
- /* Exits */
- class NorthExit : public SceneExit {
- public:
- virtual void changeScene();
- };
- class UpExit : public SceneExit {
- public:
- virtual void changeScene();
- };
- class EastExit : public SceneExit {
- public:
- virtual void changeScene();
- };
- class DownExit : public SceneExit {
- public:
- virtual void changeScene();
- };
- class SouthExit : public SceneExit {
- public:
- virtual void changeScene();
- };
- class WestExit : public SceneExit {
- public:
- virtual void changeScene();
- };
- class ShaftExit : public SceneExit {
- public:
- virtual void changeScene();
- };
- class DoorExit : public SceneExit {
- public:
- virtual void changeScene();
- };
-private:
- void initArea();
- void enterArea();
- void doButtonPress(int indx);
-public:
- NamedHotspot _background;
- Keypad _keypad;
- SceneActor _southDoorway;
- SceneObject _northDoorway;
- Door _door;
- Scrolls _scrolls;
- SceneActor _containmentField;
- Gem _gem;
- SceneActor _cube;
- SceneActor _pulsingLights;
- Vampire _vampire;
- KeypadWindow _KeypadWindow;
- NorthExit _northExit;
- UpExit _upExit;
- EastExit _eastExit;
- DownExit _downExit;
- SouthExit _southExit;
- WestExit _westExit;
- ShaftExit _shaftExit;
- DoorExit _doorExit;
- SequenceManager _sequenceManager;
-
- bool _upExitStyle;
- bool _removeFlag;
- bool _vampireActive;
- Common::Point _vampireDestPos;
- int _vampireIndex;
-
- Scene1950();
- void synchronize(Serializer &s);
-
- virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void remove();
- virtual void signal();
- virtual void process(Event &event);
-};
-
} // End of namespace Ringworld2
} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_vampire.cpp b/engines/tsage/ringworld2/ringworld2_vampire.cpp
new file mode 100644
index 0000000000..9d3b7f91a5
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_vampire.cpp
@@ -0,0 +1,1821 @@
+/* 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 "tsage/ringworld2/ringworld2_vampire.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+/*--------------------------------------------------------------------------
+ * Scene 1950 - Flup Tube Corridor Maze
+ *
+ *--------------------------------------------------------------------------*/
+
+Scene1950::KeypadWindow::KeypadWindow() {
+ _buttonIndex = 0;
+}
+
+void Scene1950::KeypadWindow::synchronize(Serializer &s) {
+ SceneArea::synchronize(s);
+
+ s.syncAsSint16LE(_buttonIndex);
+}
+
+Scene1950::KeypadWindow::KeypadButton::KeypadButton() {
+ _buttonIndex = 0;
+ _pressed = false;
+ _toggled = false;
+}
+
+void Scene1950::KeypadWindow::KeypadButton::synchronize(Serializer &s) {
+ SceneActor::synchronize(s);
+
+ s.syncAsSint16LE(_buttonIndex);
+ s.syncAsSint16LE(_pressed);
+ s.syncAsSint16LE(_toggled);
+}
+
+void Scene1950::KeypadWindow::KeypadButton::init(int indx) {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _buttonIndex = indx;
+ _pressed = false;
+ _toggled = false;
+
+ postInit();
+ setup(1971, 2, 1);
+ fixPriority(249);
+ setPosition(Common::Point(((_buttonIndex % 4) * 22) + 127, ((_buttonIndex / 4) * 19) + 71));
+ scene->_sceneAreas.push_front(this);
+}
+
+void Scene1950::KeypadWindow::KeypadButton::process(Event &event) {
+ if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE)
+ && (_bounds.contains(event.mousePos)) && !_pressed) {
+ R2_GLOBALS._sound2.play(227);
+ if (!_toggled) {
+ setFrame(2);
+ _toggled = true;
+ } else {
+ setFrame(1);
+ _toggled = false;
+ }
+ _pressed = true;
+ event.handled = true;
+ }
+
+ if ((event.eventType == EVENT_BUTTON_UP) && _pressed) {
+ _pressed = false;
+ event.handled = true;
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+ scene->doButtonPress(_buttonIndex);
+ }
+}
+
+bool Scene1950::KeypadWindow::KeypadButton::startAction(CursorType action, Event &event) {
+ if (action == CURSOR_USE)
+ return false;
+ return SceneActor::startAction(action, event);
+}
+
+void Scene1950::KeypadWindow::remove() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+ for (_buttonIndex = 0; _buttonIndex < 16; ++_buttonIndex) {
+ scene->_sceneAreas.remove(&_buttons[_buttonIndex]);
+ _buttons[_buttonIndex].remove();
+ }
+
+ ModalWindow::remove();
+
+ if (!R2_GLOBALS.getFlag(37))
+ R2_GLOBALS._sound2.play(278);
+
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ scene->_eastExit._enabled = true;
+
+ if (!R2_GLOBALS.getFlag(37)) {
+ if (R2_GLOBALS.getFlag(36)) {
+ scene->_sceneMode = 1964;
+ scene->setAction(&scene->_sequenceManager, scene, 1964, &R2_GLOBALS._player, NULL);
+ } else {
+ scene->_sceneMode = 1965;
+ scene->setAction(&scene->_sequenceManager, scene, 1965, &R2_GLOBALS._player, NULL);
+ }
+ }
+}
+
+void Scene1950::KeypadWindow::setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY) {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ if (R2_GLOBALS._player._mover)
+ R2_GLOBALS._player.addMover(NULL);
+ R2_GLOBALS._player._canWalk = false;
+
+ ModalWindow::setup2(visage, stripFrameNum, frameNum, posX, posY);
+
+ _object1.fixPriority(248);
+ scene->_eastExit._enabled = false;
+ setup3(1950, 27, 28, 27);
+
+ for (_buttonIndex = 0; _buttonIndex < 16; _buttonIndex++)
+ _buttons[_buttonIndex].init(_buttonIndex);
+}
+
+void Scene1950::KeypadWindow::setup3(int resNum, int lookLineNum, int talkLineNum, int useLineNum) {
+ // Copy of Scene1200::LaserPanel::proc13()
+ _areaActor.setDetails(resNum, lookLineNum, talkLineNum, useLineNum, 2, (SceneItem *) NULL);
+}
+
+/*--------------------------------------------------------------------------*/
+
+bool Scene1950::Keypad::startAction(CursorType action, Event &event) {
+ if ((action != CURSOR_USE) || (R2_GLOBALS.getFlag(37)))
+ return SceneHotspot::startAction(action, event);
+
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ R2_GLOBALS._player.disableControl();
+ if (R2_GLOBALS.getFlag(36)) {
+ scene->_sceneMode = 1962;
+ scene->setAction(&scene->_sequenceManager, scene, 1962, &R2_GLOBALS._player, NULL);
+ } else {
+ scene->_sceneMode = 1963;
+ scene->setAction(&scene->_sequenceManager, scene, 1963, &R2_GLOBALS._player, NULL);
+ }
+ return true;
+}
+
+bool Scene1950::Door::startAction(CursorType action, Event &event) {
+ if (action != R2_SCRITH_KEY)
+ return SceneActor::startAction(action, event);
+
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ R2_GLOBALS._player.disableControl();
+ R2_INVENTORY.setObjectScene(R2_SCRITH_KEY, 0);
+ scene->_sceneMode = 1958;
+ scene->setAction(&scene->_sequenceManager, scene, 1958, &R2_GLOBALS._player, &scene->_door, NULL);
+ return true;
+}
+
+bool Scene1950::Scrolls::startAction(CursorType action, Event &event) {
+ if ((action != CURSOR_USE) || (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) != 1950))
+ return SceneActor::startAction(action, event);
+
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ R2_GLOBALS._player.disableControl();
+ scene->_sceneMode = 1968;
+ scene->setAction(&scene->_sequenceManager, scene, 1968, &R2_GLOBALS._player, NULL);
+
+ return true;
+}
+
+bool Scene1950::Gem::startAction(CursorType action, Event &event) {
+ if ((action != CURSOR_USE) || (!R2_GLOBALS.getFlag(37)))
+ return SceneActor::startAction(action, event);
+
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ R2_GLOBALS._player.disableControl();
+ scene->_sceneMode = 1967;
+ scene->setAction(&scene->_sequenceManager, scene, 1967, &R2_GLOBALS._player, NULL);
+
+ return true;
+}
+
+/*--------------------------------------------------------------------------*/
+
+Scene1950::Vampire::Vampire() {
+ _deadPosition = Common::Point(0, 0);
+ _deltaX = 0;
+ _deltaY = 0;
+ _vampireMode = 0;
+}
+
+void Scene1950::Vampire::synchronize(Serializer &s) {
+ SceneActor::synchronize(s);
+
+ s.syncAsSint16LE(_deadPosition.x);
+ s.syncAsSint16LE(_deadPosition.y);
+ s.syncAsSint16LE(_deltaX);
+ s.syncAsSint16LE(_deltaY);
+ s.syncAsSint16LE(_vampireMode);
+}
+
+void Scene1950::Vampire::signal() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (_vampireMode) {
+ case 19: {
+ _vampireMode = 0;
+ setVisage(1960);
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ setStrip(2);
+ else
+ setStrip(1);
+
+ NpcMover *mover = new NpcMover();
+ addMover(mover, &scene->_vampireDestPos, scene);
+ }
+ break;
+ case 20: {
+ // Non fatal shot
+ _vampireMode = 19;
+ R2_GLOBALS._player.setVisage(22);
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ R2_GLOBALS._player.setStrip(1);
+ else
+ R2_GLOBALS._player.setStrip(2);
+ R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+ R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._shotsRequired--;
+
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ _deadPosition.x = _position.x + 10;
+ else
+ _deadPosition.x = _position.x - 10;
+ _deadPosition.y = _position.y - 4;
+
+ setVisage(1961);
+
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ setStrip(2);
+ else
+ setStrip(1);
+
+ animate(ANIM_MODE_2, NULL);
+ Common::Point pt = _deadPosition;
+ PlayerMover *mover = new PlayerMover();
+ addMover(mover, &pt, this);
+
+ R2_GLOBALS._player.enableControl();
+ }
+ break;
+ case 21: {
+ // Fatal shot
+ R2_GLOBALS._player.setVisage(22);
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ R2_GLOBALS._player.setStrip(1);
+ else
+ R2_GLOBALS._player.setStrip(2);
+ R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+
+ setVisage(1961);
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ setStrip(4);
+ else
+ setStrip(3);
+ setDetails(1950, 15, -1, 17, 2, (SceneItem *) NULL);
+ addMover(NULL);
+ _numFrames = 8;
+ R2_GLOBALS._sound2.play(226);
+ animate(ANIM_MODE_5, NULL);
+ fixPriority(10);
+
+ R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive = false;
+ R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._shotsRequired--;
+ R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._position = _position;
+ _deltaX = (_position.x - R2_GLOBALS._player._position.x) / 2;
+ _deltaY = (_position.y - R2_GLOBALS._player._position.y) / 2;
+
+ byte vampireCount = 0;
+ for (byte i = 0; i < 18; ++i) {
+ if (!R2_GLOBALS._vampireData[i]._isAlive)
+ ++vampireCount;
+ }
+
+ if (vampireCount == 18) {
+ R2_GLOBALS.setFlag(36);
+ _vampireMode = 23;
+ Common::Point pt(R2_GLOBALS._player._position.x + _deltaX, R2_GLOBALS._player._position.y + _deltaY);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ } else if (vampireCount == 1) {
+ _vampireMode = 22;
+ Common::Point pt(R2_GLOBALS._player._position.x + _deltaX, R2_GLOBALS._player._position.y + _deltaY);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ } else {
+ R2_GLOBALS._player.enableControl(CURSOR_WALK);
+ }
+
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ scene->_eastExit._enabled = true;
+ else
+ scene->_westExit._enabled = true;
+
+ scene->_vampireActive = false;
+ }
+ break;
+ case 22:
+ SceneItem::display(1950, 18, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ R2_GLOBALS._player.enableControl(CURSOR_WALK);
+ break;
+ case 23:
+ SceneItem::display(1950, 25, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ scene->_sceneMode = R2_GLOBALS._flubMazeEntryDirection;
+ scene->setAction(&scene->_sequenceManager, scene, 1960, &R2_GLOBALS._player, NULL);
+ break;
+ default:
+ break;
+ }
+}
+
+bool Scene1950::Vampire::startAction(CursorType action, Event &event) {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ if (!R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive ||
+ (action != R2_PHOTON_STUNNER))
+ return SceneActor::startAction(action, event);
+
+ R2_GLOBALS._player.disableControl();
+
+ if (R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._shotsRequired <= 1)
+ _vampireMode = 21;
+ else
+ _vampireMode = 20;
+
+ R2_GLOBALS._player.setVisage(25);
+ if (R2_GLOBALS._flubMazeEntryDirection == 3)
+ R2_GLOBALS._player.setStrip(2);
+ else
+ R2_GLOBALS._player.setStrip(1);
+ R2_GLOBALS._player.animate(ANIM_MODE_5, this);
+ R2_GLOBALS._sound3.play(99);
+
+ return true;
+}
+
+/*--------------------------------------------------------------------------*/
+
+void Scene1950::NorthExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 1;
+ scene->_sceneMode = 11;
+
+ Common::Point pt(160, 127);
+ PlayerMover *mover = new PlayerMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+}
+
+void Scene1950::UpExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 2;
+ scene->_sceneMode = 12;
+
+ if (!scene->_upExitStyle) {
+ if (R2_GLOBALS.getFlag(36))
+ scene->setAction(&scene->_sequenceManager, scene, 1953, &R2_GLOBALS._player, NULL);
+ else
+ scene->setAction(&scene->_sequenceManager, scene, 1970, &R2_GLOBALS._player, NULL);
+ } else {
+ if (R2_GLOBALS.getFlag(36))
+ scene->setAction(&scene->_sequenceManager, scene, 1952, &R2_GLOBALS._player, NULL);
+ else
+ scene->setAction(&scene->_sequenceManager, scene, 1969, &R2_GLOBALS._player, NULL);
+ }
+}
+
+void Scene1950::EastExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 3;
+ scene->_sceneMode = 13;
+
+ if (scene->_vampireActive)
+ R2_GLOBALS._player.animate(ANIM_MODE_9);
+
+ Common::Point pt(340, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+}
+
+void Scene1950::DownExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 4;
+ scene->_sceneMode = 14;
+
+ if (R2_GLOBALS.getFlag(36))
+ scene->setAction(&scene->_sequenceManager, scene, 1956, &R2_GLOBALS._player, NULL);
+ else
+ scene->setAction(&scene->_sequenceManager, scene, 1973, &R2_GLOBALS._player, NULL);
+}
+
+void Scene1950::SouthExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 5;
+ scene->_sceneMode = 15;
+
+ Common::Point pt(160, 213);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+}
+
+void Scene1950::WestExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 6;
+
+ if (R2_GLOBALS._flubMazeArea == 2) {
+ // In the very first corridor area after the Scrith Door
+ if ((R2_GLOBALS.getFlag(36)) && (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 2) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2)) {
+ scene->_sceneMode = 1961;
+ Common::Point pt(-20, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+ } else {
+ if (!R2_GLOBALS.getFlag(36))
+ SceneItem::display(1950, 33, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ if ((R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950) || (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 1950))
+ SceneItem::display(1950, 34, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ scene->_sceneMode = 0;
+ Common::Point pt(30, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+ }
+ } else {
+ if (scene->_vampireActive)
+ R2_GLOBALS._player.animate(ANIM_MODE_9);
+
+ scene->_sceneMode = 16;
+ Common::Point pt(-20, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+ }
+}
+
+void Scene1950::ShaftExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 0;
+ scene->_sceneMode = 1951;
+ scene->setAction(&scene->_sequenceManager, scene, 1951, &R2_GLOBALS._player, NULL);
+}
+
+void Scene1950::DoorExit::changeScene() {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+
+ _enabled = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._flubMazeEntryDirection = 3;
+ if (R2_GLOBALS._player._visage == 22) {
+ scene->_sceneMode = 1975;
+ scene->setAction(&scene->_sequenceManager, scene, 1975, &R2_GLOBALS._player, NULL);
+ } else {
+ SceneItem::display(1950, 22, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ R2_GLOBALS._flubMazeEntryDirection = 0;
+ scene->_sceneMode = 0;
+ Common::Point pt(250, 150);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, scene);
+ _enabled = true;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Scene1950::Scene1950() {
+ _upExitStyle = false;
+ _removeFlag = false;
+ _vampireActive = false;
+ _vampireDestPos = Common::Point(0, 0);
+ _vampireIndex = 0;
+}
+
+void Scene1950::synchronize(Serializer &s) {
+ SceneExt::synchronize(s);
+
+ s.syncAsSint16LE(_upExitStyle);
+ s.syncAsSint16LE(_removeFlag);
+ s.syncAsSint16LE(_vampireActive);
+ s.syncAsSint16LE(_vampireDestPos.x);
+ s.syncAsSint16LE(_vampireDestPos.y);
+ s.syncAsSint16LE(_vampireIndex);
+}
+
+void Scene1950::initArea() {
+ _northExit._enabled = false;
+ _upExit._enabled = false;
+ _eastExit._enabled = false;
+ _downExit._enabled = false;
+ _southExit._enabled = false;
+ _westExit._enabled = false;
+ _shaftExit._enabled = false;
+ _doorExit._enabled = false;
+ _northExit._insideArea = false;
+ _upExit._insideArea = false;
+ _eastExit._insideArea = false;
+ _downExit._insideArea = false;
+ _southExit._insideArea = false;
+ _westExit._insideArea = false;
+ _shaftExit._insideArea = false;
+ _doorExit._insideArea = false;
+ _northExit._moving = false;
+ _upExit._moving = false;
+ _eastExit._moving = false;
+ _downExit._moving = false;
+ _southExit._moving = false;
+ _westExit._moving = false;
+ _shaftExit._moving = false;
+ _doorExit._moving = false;
+ _upExitStyle = false;
+
+ switch (R2_GLOBALS._flubMazeArea - 1) {
+ case 0:
+ loadScene(1948);
+ break;
+ case 1:
+ // No break on purpose
+ case 8:
+ // No break on purpose
+ case 10:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 16:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 23:
+ // No break on purpose
+ case 30:
+ // No break on purpose
+ case 44:
+ // No break on purpose
+ case 72:
+ // No break on purpose
+ case 74:
+ // No break on purpose
+ case 86:
+ // No break on purpose
+ case 96:
+ // No break on purpose
+ case 103:
+ loadScene(1950);
+ break;
+ case 2:
+ // No break on purpose
+ case 29:
+ loadScene(1965);
+ break;
+ case 3:
+ // No break on purpose
+ case 9:
+ // No break on purpose
+ case 11:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 24:
+ // No break on purpose
+ case 39:
+ // No break on purpose
+ case 45:
+ // No break on purpose
+ case 71:
+ // No break on purpose
+ case 73:
+ // No break on purpose
+ case 75:
+ // No break on purpose
+ case 79:
+ // No break on purpose
+ case 85:
+ // No break on purpose
+ case 87:
+ // No break on purpose
+ case 95:
+ loadScene(1955);
+ break;
+ case 4:
+ // No break on purpose
+ case 6:
+ // No break on purpose
+ case 13:
+ // No break on purpose
+ case 27:
+ // No break on purpose
+ case 41:
+ // No break on purpose
+ case 48:
+ // No break on purpose
+ case 50:
+ // No break on purpose
+ case 54:
+ // No break on purpose
+ case 76:
+ // No break on purpose
+ case 80:
+ // No break on purpose
+ case 90:
+ // No break on purpose
+ case 104:
+ loadScene(1975);
+ break;
+ case 5:
+ // No break on purpose
+ case 7:
+ // No break on purpose
+ case 14:
+ // No break on purpose
+ case 28:
+ // No break on purpose
+ case 32:
+ // No break on purpose
+ case 47:
+ // No break on purpose
+ case 53:
+ loadScene(1997);
+ break;
+ case 17:
+ // No break on purpose
+ case 20:
+ // No break on purpose
+ case 25:
+ // No break on purpose
+ case 31:
+ // No break on purpose
+ case 33:
+ // No break on purpose
+ case 46:
+ loadScene(1995);
+ break;
+ case 18:
+ // No break on purpose
+ case 22:
+ // No break on purpose
+ case 26:
+ // No break on purpose
+ case 36:
+ // No break on purpose
+ case 38:
+ // No break on purpose
+ case 43:
+ // No break on purpose
+ case 51:
+ // No break on purpose
+ case 70:
+ // No break on purpose
+ case 78:
+ // No break on purpose
+ case 84:
+ // No break on purpose
+ case 89:
+ // No break on purpose
+ case 101:
+ loadScene(1970);
+ break;
+ case 21:
+ // No break on purpose
+ case 34:
+ // No break on purpose
+ case 57:
+ // No break on purpose
+ case 58:
+ // No break on purpose
+ case 59:
+ // No break on purpose
+ case 62:
+ // No break on purpose
+ case 65:
+ loadScene(1980);
+ break;
+ case 35:
+ // No break on purpose
+ case 61:
+ // No break on purpose
+ case 77:
+ // No break on purpose
+ case 83:
+ loadScene(1982);
+ break;
+ case 37:
+ // No break on purpose
+ case 52:
+ // No break on purpose
+ case 82:
+ // No break on purpose
+ case 88:
+ // No break on purpose
+ case 92:
+ // No break on purpose
+ case 97:
+ // No break on purpose
+ case 100:
+ loadScene(1962);
+ break;
+ case 40:
+ // No break on purpose
+ case 102:
+ loadScene(1960);
+ break;
+ case 42:
+ // No break on purpose
+ case 55:
+ // No break on purpose
+ case 60:
+ // No break on purpose
+ case 66:
+ // No break on purpose
+ case 68:
+ // No break on purpose
+ case 69:
+ // No break on purpose
+ case 93:
+ // No break on purpose
+ case 98:
+ loadScene(1990);
+ break;
+ case 49:
+ // No break on purpose
+ case 81:
+ // No break on purpose
+ case 91:
+ // No break on purpose
+ case 94:
+ // No break on purpose
+ case 99:
+ loadScene(1967);
+ break;
+ case 56:
+ // No break on purpose
+ case 63:
+ // No break on purpose
+ case 64:
+ // No break on purpose
+ case 67:
+ loadScene(1985);
+ _upExitStyle = true;
+ break;
+ default:
+ break;
+ }
+
+ if (R2_GLOBALS._flubMazeArea != 1)
+ R2_GLOBALS._walkRegions.load(1950);
+
+ switch (R2_GLOBALS._flubMazeArea - 1) {
+ case 0:
+ _shaftExit._enabled = true;
+ if ((R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0) && (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950))
+ _doorExit._enabled = true;
+ R2_GLOBALS._walkRegions.disableRegion(2);
+ R2_GLOBALS._walkRegions.disableRegion(3);
+ R2_GLOBALS._walkRegions.disableRegion(4);
+ R2_GLOBALS._walkRegions.disableRegion(5);
+ R2_GLOBALS._walkRegions.disableRegion(6);
+ break;
+ case 1:
+ // No break on purpose
+ case 2:
+ // No break on purpose
+ case 3:
+ // No break on purpose
+ case 8:
+ // No break on purpose
+ case 9:
+ // No break on purpose
+ case 10:
+ // No break on purpose
+ case 11:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 16:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 23:
+ // No break on purpose
+ case 24:
+ // No break on purpose
+ case 29:
+ // No break on purpose
+ case 30:
+ // No break on purpose
+ case 39:
+ // No break on purpose
+ case 40:
+ // No break on purpose
+ case 44:
+ // No break on purpose
+ case 45:
+ // No break on purpose
+ case 71:
+ // No break on purpose
+ case 72:
+ // No break on purpose
+ case 73:
+ // No break on purpose
+ case 74:
+ // No break on purpose
+ case 75:
+ // No break on purpose
+ case 79:
+ // No break on purpose
+ case 85:
+ // No break on purpose
+ case 86:
+ // No break on purpose
+ case 87:
+ // No break on purpose
+ case 95:
+ // No break on purpose
+ case 96:
+ // No break on purpose
+ case 102:
+ // No break on purpose
+ case 103:
+ _eastExit._enabled = true;
+ _westExit._enabled = true;
+ break;
+ case 4:
+ // No break on purpose
+ case 6:
+ // No break on purpose
+ case 13:
+ // No break on purpose
+ case 17:
+ // No break on purpose
+ case 20:
+ // No break on purpose
+ case 25:
+ // No break on purpose
+ case 27:
+ // No break on purpose
+ case 31:
+ // No break on purpose
+ case 33:
+ // No break on purpose
+ case 37:
+ // No break on purpose
+ case 41:
+ // No break on purpose
+ case 46:
+ // No break on purpose
+ case 48:
+ // No break on purpose
+ case 50:
+ // No break on purpose
+ case 52:
+ // No break on purpose
+ case 54:
+ // No break on purpose
+ case 76:
+ // No break on purpose
+ case 80:
+ // No break on purpose
+ case 82:
+ // No break on purpose
+ case 88:
+ // No break on purpose
+ case 90:
+ // No break on purpose
+ case 92:
+ // No break on purpose
+ case 97:
+ // No break on purpose
+ case 100:
+ // No break on purpose
+ case 104:
+ _westExit._enabled = true;
+ R2_GLOBALS._walkRegions.disableRegion(6);
+ R2_GLOBALS._walkRegions.disableRegion(9);
+ break;
+ case 5:
+ // No break on purpose
+ case 7:
+ // No break on purpose
+ case 14:
+ // No break on purpose
+ case 18:
+ // No break on purpose
+ case 22:
+ // No break on purpose
+ case 26:
+ // No break on purpose
+ case 28:
+ // No break on purpose
+ case 32:
+ // No break on purpose
+ case 36:
+ // No break on purpose
+ case 38:
+ // No break on purpose
+ case 43:
+ // No break on purpose
+ case 47:
+ // No break on purpose
+ case 49:
+ // No break on purpose
+ case 51:
+ // No break on purpose
+ case 53:
+ // No break on purpose
+ case 70:
+ // No break on purpose
+ case 78:
+ // No break on purpose
+ case 81:
+ // No break on purpose
+ case 84:
+ // No break on purpose
+ case 89:
+ // No break on purpose
+ case 91:
+ // No break on purpose
+ case 94:
+ // No break on purpose
+ case 99:
+ // No break on purpose
+ case 101:
+ _eastExit._enabled = true;
+ R2_GLOBALS._walkRegions.disableRegion(1);
+ R2_GLOBALS._walkRegions.disableRegion(7);
+ R2_GLOBALS._walkRegions.disableRegion(13);
+ break;
+ default:
+ R2_GLOBALS._walkRegions.disableRegion(1);
+ R2_GLOBALS._walkRegions.disableRegion(6);
+ R2_GLOBALS._walkRegions.disableRegion(7);
+ R2_GLOBALS._walkRegions.disableRegion(9);
+ R2_GLOBALS._walkRegions.disableRegion(13);
+ break;
+ }
+
+ _northDoorway.remove();
+ _northDoorway.removeObject();
+ _southDoorway.remove();
+
+ switch (R2_GLOBALS._flubMazeArea - 4) {
+ case 0:
+ // No break on purpose
+ case 3:
+ // No break on purpose
+ case 16:
+ // No break on purpose
+ case 22:
+ // No break on purpose
+ case 24:
+ // No break on purpose
+ case 32:
+ // No break on purpose
+ case 33:
+ // No break on purpose
+ case 45:
+ // No break on purpose
+ case 46:
+ // No break on purpose
+ case 48:
+ // No break on purpose
+ case 51:
+ // No break on purpose
+ case 56:
+ // No break on purpose
+ case 59:
+ // No break on purpose
+ case 67:
+ // No break on purpose
+ case 68:
+ // No break on purpose
+ case 70:
+ // No break on purpose
+ case 73:
+ // No break on purpose
+ case 82:
+ // No break on purpose
+ case 90:
+ _northExit._enabled = true;
+ _northDoorway.setup(1950, (R2_GLOBALS._flubMazeArea % 2) + 1, 1, 160, 137, 25);
+ //visage,strip,frame,px,py,priority,effect
+ _southDoorway.postInit();
+ _southDoorway.setVisage(1950);
+ _southDoorway.setStrip((((R2_GLOBALS._flubMazeArea - 1) / 35) % 2) + 1);
+ _southDoorway.setFrame(2);
+ _southDoorway.setPosition(Common::Point(160, 167));
+ _southDoorway.fixPriority(220);
+ R2_GLOBALS._walkRegions.disableRegion(3);
+ R2_GLOBALS._walkRegions.disableRegion(4);
+ break;
+ case 7:
+ // No break on purpose
+ case 10:
+ // No break on purpose
+ case 23:
+ // No break on purpose
+ case 29:
+ // No break on purpose
+ case 31:
+ // No break on purpose
+ case 39:
+ // No break on purpose
+ case 40:
+ // No break on purpose
+ case 52:
+ // No break on purpose
+ case 53:
+ // No break on purpose
+ case 55:
+ // No break on purpose
+ case 63:
+ // No break on purpose
+ case 65:
+ // No break on purpose
+ case 66:
+ // No break on purpose
+ case 75:
+ // No break on purpose
+ case 77:
+ // No break on purpose
+ case 81:
+ // No break on purpose
+ case 87:
+ // No break on purpose
+ case 89:
+ // No break on purpose
+ case 97:
+ _southExit._enabled = true;
+
+ _southDoorway.postInit();
+ _southDoorway.setVisage(1950);
+ _southDoorway.setStrip((((R2_GLOBALS._flubMazeArea - 1) / 35) % 2) + 1);
+ _southDoorway.setFrame(3);
+ _southDoorway.setPosition(Common::Point(160, 167));
+ _southDoorway.fixPriority(220);
+ break;
+ case 58:
+ // No break on purpose
+ case 74:
+ // No break on purpose
+ case 80:
+ _northExit._enabled = true;
+ _southExit._enabled = true;
+
+ _northDoorway.setup(1950, (R2_GLOBALS._flubMazeArea % 2) + 1, 1, 160, 137, 25);
+
+ _southDoorway.postInit();
+ _southDoorway.setVisage(1950);
+ _southDoorway.setStrip((((R2_GLOBALS._flubMazeArea - 1) / 35) % 2) + 1);
+ _southDoorway.setFrame(3);
+ _southDoorway.setPosition(Common::Point(160, 167));
+ _southDoorway.fixPriority(220);
+ R2_GLOBALS._walkRegions.disableRegion(3);
+ R2_GLOBALS._walkRegions.disableRegion(4);
+ break;
+ default:
+ _southDoorway.postInit();
+ _southDoorway.setVisage(1950);
+ _southDoorway.setStrip(((R2_GLOBALS._flubMazeArea - 1) / 35) % 2 + 1);
+ _southDoorway.setFrame(2);
+ _southDoorway.setPosition(Common::Point(160, 167));
+ _southDoorway.fixPriority(220);
+ break;
+ }
+
+ switch (R2_GLOBALS._flubMazeArea - 3) {
+ case 0:
+ // No break on purpose
+ case 3:
+ // No break on purpose
+ case 5:
+ // No break on purpose
+ case 12:
+ // No break on purpose
+ case 15:
+ // No break on purpose
+ case 18:
+ // No break on purpose
+ case 19:
+ // No break on purpose
+ case 23:
+ // No break on purpose
+ case 26:
+ // No break on purpose
+ case 27:
+ // No break on purpose
+ case 29:
+ // No break on purpose
+ case 30:
+ // No break on purpose
+ case 31:
+ // No break on purpose
+ case 32:
+ // No break on purpose
+ case 44:
+ // No break on purpose
+ case 45:
+ // No break on purpose
+ case 51:
+ // No break on purpose
+ case 55:
+ // No break on purpose
+ case 56:
+ // No break on purpose
+ case 57:
+ // No break on purpose
+ case 60:
+ // No break on purpose
+ case 63:
+ _upExit._enabled = true;
+ break;
+ case 54:
+ // No break on purpose
+ case 61:
+ // No break on purpose
+ case 62:
+ // No break on purpose
+ case 65:
+ _upExit._enabled = true;
+ // No break on purpose
+ case 35:
+ // No break on purpose
+ case 38:
+ // No break on purpose
+ case 40:
+ // No break on purpose
+ case 47:
+ // No break on purpose
+ case 50:
+ // No break on purpose
+ case 53:
+ // No break on purpose
+ case 58:
+ // No break on purpose
+ case 64:
+ // No break on purpose
+ case 66:
+ // No break on purpose
+ case 67:
+ // No break on purpose
+ case 79:
+ // No break on purpose
+ case 80:
+ // No break on purpose
+ case 86:
+ // No break on purpose
+ case 89:
+ // No break on purpose
+ case 90:
+ // No break on purpose
+ case 91:
+ // No break on purpose
+ case 92:
+ // No break on purpose
+ case 95:
+ // No break on purpose
+ case 96:
+ // No break on purpose
+ case 97:
+ // No break on purpose
+ case 98:
+ // No break on purpose
+ case 100:
+ _downExit._enabled = true;
+ R2_GLOBALS._walkRegions.disableRegion(4);
+ R2_GLOBALS._walkRegions.disableRegion(5);
+ R2_GLOBALS._walkRegions.disableRegion(6);
+ R2_GLOBALS._walkRegions.disableRegion(10);
+ R2_GLOBALS._walkRegions.disableRegion(11);
+ default:
+ break;
+ }
+ R2_GLOBALS._uiElements.draw();
+}
+
+void Scene1950::enterArea() {
+ R2_GLOBALS._player.disableControl();
+ R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+
+ _vampire.remove();
+ _door.remove();
+ _scrolls.remove();
+
+ _vampireActive = false;
+ _vampireIndex = 0;
+
+ // Certain areas have a vampire in them
+ switch (R2_GLOBALS._flubMazeArea) {
+ case 10:
+ _vampireIndex = 1;
+ break;
+ case 13:
+ _vampireIndex = 2;
+ break;
+ case 16:
+ _vampireIndex = 3;
+ break;
+ case 17:
+ _vampireIndex = 4;
+ break;
+ case 24:
+ _vampireIndex = 5;
+ break;
+ case 25:
+ _vampireIndex = 6;
+ break;
+ case 31:
+ _vampireIndex = 7;
+ break;
+ case 40:
+ _vampireIndex = 8;
+ break;
+ case 45:
+ _vampireIndex = 9;
+ break;
+ case 46:
+ _vampireIndex = 10;
+ break;
+ case 73:
+ _vampireIndex = 11;
+ break;
+ case 75:
+ _vampireIndex = 12;
+ break;
+ case 80:
+ _vampireIndex = 13;
+ break;
+ case 87:
+ _vampireIndex = 14;
+ break;
+ case 88:
+ _vampireIndex = 15;
+ break;
+ case 96:
+ _vampireIndex = 16;
+ break;
+ case 97:
+ _vampireIndex = 17;
+ break;
+ case 104:
+ _vampireIndex = 18;
+ break;
+ default:
+ break;
+ }
+
+ if (_vampireIndex != 0) {
+ _vampire.postInit();
+ _vampire._numFrames = 6;
+ _vampire._moveRate = 6;
+ _vampire._moveDiff = Common::Point(3, 2);
+ _vampire._effect = EFFECT_SHADED;
+
+ if (!R2_GLOBALS._vampireData[_vampireIndex - 1]._isAlive) {
+ // Show vampire ashes
+ _vampire.setPosition(Common::Point(R2_GLOBALS._vampireData[_vampireIndex - 1]._position));
+ _vampire.animate(ANIM_MODE_NONE, NULL);
+ _vampire.addMover(NULL);
+ _vampire.setVisage(1961);
+ _vampire.setStrip(4);
+ _vampire.setFrame(10);
+ _vampire.fixPriority(10);
+ _vampire.setDetails(1950, 15, -1, 17, 2, (SceneItem *) NULL);
+ } else {
+ // Start the vampire
+ _vampire.setVisage(1960);
+ _vampire.setPosition(Common::Point(160, 130));
+ _vampire.animate(ANIM_MODE_2, NULL);
+ _vampire.setDetails(1950, 12, -1, 14, 2, (SceneItem *) NULL);
+ _vampireActive = true;
+ }
+ }
+ if ((R2_GLOBALS._flubMazeArea == 1) && (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) != 0)) {
+ // Show doorway at the right hand side of the very first flub corridor
+ _door.postInit();
+ _door.setVisage(1948);
+ _door.setStrip(3);
+ _door.setPosition(Common::Point(278, 155));
+ _door.fixPriority(100);
+ _door.setDetails(1950, 19, 20, 23, 2, (SceneItem *) NULL);
+ }
+
+ if (R2_GLOBALS._flubMazeArea == 102) {
+ R2_GLOBALS._walkRegions.load(1951);
+ R2_GLOBALS._walkRegions.disableRegion(1);
+ R2_GLOBALS._walkRegions.disableRegion(5);
+ R2_GLOBALS._walkRegions.disableRegion(6);
+ R2_GLOBALS._walkRegions.disableRegion(7);
+
+ _cube.postInit();
+ _cube.setVisage(1970);
+ _cube.setStrip(1);
+ if (R2_GLOBALS.getFlag(37))
+ _cube.setFrame(3);
+ else
+ _cube.setFrame(1);
+ _cube.setPosition(Common::Point(193, 158));
+ _cube.setDetails(1950, 3, 4, 5, 2, (SceneItem *) NULL);
+
+ _pulsingLights.postInit();
+ _pulsingLights.setVisage(1970);
+ _pulsingLights.setStrip(3);
+ _pulsingLights.animate(ANIM_MODE_2, NULL);
+ _pulsingLights._numFrames = 6;
+ _pulsingLights.setPosition(Common::Point(194, 158));
+ _pulsingLights.fixPriority(159);
+
+ _keypad.setDetails(Rect(188, 124, 199, 133), 1950, 27, 28, -1, 2, NULL);
+
+ if (R2_INVENTORY.getObjectScene(R2_SAPPHIRE_BLUE) == 1950) {
+ _gem.postInit();
+ _gem.setVisage(1970);
+ _gem.setStrip(1);
+ _gem.setFrame(2);
+ _gem.fixPriority(160);
+ }
+
+ if (R2_GLOBALS.getFlag(37)) {
+ _gem.setPosition(Common::Point(192, 118));
+ _gem.setDetails(1950, 9, 4, -1, 2, (SceneItem *) NULL);
+ } else {
+ _containmentField.postInit();
+ _containmentField.setVisage(1970);
+ _containmentField.setStrip(4);
+ _containmentField._numFrames = 4;
+ _containmentField.animate(ANIM_MODE_8, 0, NULL);
+ _containmentField.setPosition(Common::Point(192, 121));
+ _containmentField.fixPriority(159);
+ _containmentField.setDetails(1950, 6, 7, 8, 2, (SceneItem *) NULL);
+
+ _gem.setPosition(Common::Point(192, 109));
+ _gem.setDetails(1950, 9, 7, 8, 2, (SceneItem *) NULL);
+ }
+
+ _scrolls.postInit();
+ _scrolls.setVisage(1972);
+ _scrolls.setStrip(1);
+ _scrolls.setPosition(Common::Point(76, 94));
+ _scrolls.fixPriority(25);
+ _scrolls.setDetails(1950, 30, -1, -1, 2, (SceneItem *) NULL);
+ if (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2)
+ _scrolls.setFrame(2);
+ else
+ _scrolls.setFrame(1);
+
+ _removeFlag = true;
+ } else if (_removeFlag) {
+ _cube.remove();
+ _containmentField.remove();
+ _gem.remove();
+ _pulsingLights.remove();
+ _scrolls.remove();
+
+ R2_GLOBALS._sceneItems.remove(&_background);
+ _background.setDetails(Rect(0, 0, 320, 200), 1950, 0, 1, 2, 2, NULL);
+
+ _removeFlag = false;
+ }
+
+ switch (R2_GLOBALS._flubMazeEntryDirection) {
+ case 0:
+ _sceneMode = 1950;
+ if (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0)
+ // The original uses CURSOR_ARROW. CURSOR_WALK is much more coherent
+ R2_GLOBALS._player.enableControl(CURSOR_WALK);
+ else
+ setAction(&_sequenceManager, this, 1950, &R2_GLOBALS._player, NULL);
+
+ break;
+ case 1: {
+ _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
+ R2_GLOBALS._player.setPosition(Common::Point(160, 213));
+ Common::Point pt(160, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ }
+ break;
+ case 2:
+ _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
+ if (R2_GLOBALS.getFlag(36))
+ setAction(&_sequenceManager, this, 1957, &R2_GLOBALS._player, NULL);
+ else
+ setAction(&_sequenceManager, this, 1974, &R2_GLOBALS._player, NULL);
+ break;
+ case 3:
+ // Entering from the left
+ if (!_vampireActive) {
+ _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
+ R2_GLOBALS._player.setPosition(Common::Point(-20, 160));
+ Common::Point pt(30, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ } else {
+ _sceneMode = 18;
+ _eastExit._enabled = false;
+ _vampireDestPos = Common::Point(60, 152);
+ R2_GLOBALS._player.enableControl(CURSOR_USE);
+ R2_GLOBALS._player._canWalk = false;
+
+ _vampire.setStrip(2);
+ NpcMover *mover = new NpcMover();
+ _vampire.addMover(mover, &_vampireDestPos, this);
+
+ R2_GLOBALS._player.setPosition(Common::Point(-20, 160));
+ Common::Point pt2(30, 160);
+ NpcMover *mover2 = new NpcMover();
+ R2_GLOBALS._player.addMover(mover2, &pt2, NULL);
+ }
+ break;
+ case 4:
+ _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
+ if (!_upExitStyle) {
+ if (R2_GLOBALS.getFlag(36))
+ setAction(&_sequenceManager, this, 1955, &R2_GLOBALS._player, NULL);
+ else
+ setAction(&_sequenceManager, this, 1972, &R2_GLOBALS._player, NULL);
+ } else {
+ if (R2_GLOBALS.getFlag(36))
+ setAction(&_sequenceManager, this, 1954, &R2_GLOBALS._player, NULL);
+ else
+ setAction(&_sequenceManager, this, 1971, &R2_GLOBALS._player, NULL);
+ }
+ break;
+ case 5: {
+ _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
+ R2_GLOBALS._player.setPosition(Common::Point(160, 127));
+ Common::Point pt(160, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ }
+ break;
+ case 6:
+ // Entering from the right
+ if (!_vampireActive) {
+ _sceneMode = R2_GLOBALS._flubMazeEntryDirection;
+ if (R2_GLOBALS._flubMazeArea == 1) {
+ setAction(&_sequenceManager, this, 1961, &R2_GLOBALS._player, NULL);
+ } else {
+ R2_GLOBALS._player.setPosition(Common::Point(340, 160));
+ Common::Point pt(289, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ }
+ } else {
+ _sceneMode = 17;
+ _westExit._enabled = false;
+ _vampireDestPos = Common::Point(259, 152);
+
+ R2_GLOBALS._player.enableControl(CURSOR_USE);
+ R2_GLOBALS._player._canWalk = false;
+
+ _vampire.setStrip(1);
+ NpcMover *mover = new NpcMover();
+ _vampire.addMover(mover, &_vampireDestPos, this);
+
+ R2_GLOBALS._player.setPosition(Common::Point(340, 160));
+ Common::Point pt2(289, 160);
+ NpcMover *mover2 = new NpcMover();
+ R2_GLOBALS._player.addMover(mover2, &pt2, NULL);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void Scene1950::doButtonPress(int indx) {
+ Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
+ R2_GLOBALS._player.disableControl();
+
+ int prevIndex = indx - 1;
+ if ((indx / 4) == (prevIndex / 4)) {
+ if (prevIndex < 0)
+ prevIndex = 3;
+ } else {
+ prevIndex += 4;
+ }
+
+ assert(prevIndex >= 0 && prevIndex < 16);
+ if (!_KeypadWindow._buttons[prevIndex]._toggled) {
+ _KeypadWindow._buttons[prevIndex].setFrame(2);
+ _KeypadWindow._buttons[prevIndex]._toggled = true;
+ } else {
+ _KeypadWindow._buttons[prevIndex].setFrame(1);
+ _KeypadWindow._buttons[prevIndex]._toggled = false;
+ }
+
+ prevIndex = indx + 1;
+ if ((indx / 4) == (prevIndex / 4)) {
+ if (prevIndex > 15)
+ prevIndex = 12;
+ } else {
+ prevIndex -= 4;
+ }
+
+ assert(prevIndex >= 0 && prevIndex < 16);
+ if (!_KeypadWindow._buttons[prevIndex]._toggled) {
+ _KeypadWindow._buttons[prevIndex].setFrame(2);
+ _KeypadWindow._buttons[prevIndex]._toggled = true;
+ } else {
+ _KeypadWindow._buttons[prevIndex].setFrame(1);
+ _KeypadWindow._buttons[prevIndex]._toggled = false;
+ }
+
+ prevIndex = indx - 4;
+ if (prevIndex < 0)
+ prevIndex += 16;
+
+ assert(prevIndex >= 0 && prevIndex < 16);
+ if (!_KeypadWindow._buttons[prevIndex]._toggled) {
+ _KeypadWindow._buttons[prevIndex].setFrame(2);
+ _KeypadWindow._buttons[prevIndex]._toggled = true;
+ } else {
+ _KeypadWindow._buttons[prevIndex].setFrame(1);
+ _KeypadWindow._buttons[prevIndex]._toggled = false;
+ }
+
+ prevIndex = indx + 4;
+ if (prevIndex > 15)
+ prevIndex -= 16;
+
+ assert(prevIndex >= 0 && prevIndex < 16);
+ if (!_KeypadWindow._buttons[prevIndex]._toggled) {
+ _KeypadWindow._buttons[prevIndex].setFrame(2);
+ _KeypadWindow._buttons[prevIndex]._toggled = true;
+ } else {
+ _KeypadWindow._buttons[prevIndex].setFrame(1);
+ _KeypadWindow._buttons[prevIndex]._toggled = false;
+ }
+
+ // Check whether all the buttons are highlighted
+ int cpt = 0;
+ for (prevIndex = 0; prevIndex < 16; prevIndex++) {
+ if (_KeypadWindow._buttons[prevIndex]._toggled)
+ ++cpt;
+ }
+
+ if (cpt != 16) {
+ R2_GLOBALS._player.enableControl();
+ R2_GLOBALS._player._canWalk = false;
+ } else {
+ R2_GLOBALS.setFlag(37);
+ _sceneMode = 24;
+ setAction(&_sequenceManager, scene, 1976, NULL);
+ }
+}
+
+void Scene1950::postInit(SceneObjectList *OwnerList) {
+ _upExitStyle = false;
+ _removeFlag = false;
+ _vampireActive = false;
+ _vampireIndex = 0;
+ if (R2_GLOBALS._sceneManager._previousScene == 300)
+ R2_GLOBALS._flubMazeArea = 103;
+
+ initArea();
+ SceneExt::postInit();
+ R2_GLOBALS._sound1.play(105);
+
+ _northExit.setDetails(Rect(130, 46, 189, 135), SHADECURSOR_UP, 1950);
+ _northExit.setDest(Common::Point(160, 145));
+
+ _upExit.setDetails(Rect(208, 0, 255, 73), EXITCURSOR_N, 1950);
+ _upExit.setDest(Common::Point(200, 151));
+
+ _eastExit.setDetails(Rect(305, 95, 320, 147), EXITCURSOR_E, 1950);
+ _eastExit.setDest(Common::Point(312, 160));
+
+ _downExit.setDetails(Rect(208, 99, 255, 143), EXITCURSOR_S, 1950);
+ _downExit.setDest(Common::Point(200, 151));
+
+ _southExit.setDetails(Rect(113, 154, 206, 168), SHADECURSOR_DOWN, 1950);
+ _southExit.setDest(Common::Point(160, 165));
+
+ _westExit.setDetails(Rect(0, 95, 14, 147), EXITCURSOR_W, 1950);
+ _westExit.setDest(Common::Point(7, 160));
+
+ _shaftExit.setDetails(Rect(72, 54, 120, 128), EXITCURSOR_NW, 1950);
+ _shaftExit.setDest(Common::Point(120, 140));
+
+ _doorExit.setDetails(Rect(258, 60, 300, 145), EXITCURSOR_NE, 1950);
+ _doorExit.setDest(Common::Point(268, 149));
+
+ R2_GLOBALS._player.postInit();
+ if ( (R2_INVENTORY.getObjectScene(R2_TANNER_MASK) == 0) && (R2_INVENTORY.getObjectScene(R2_PURE_GRAIN_ALCOHOL) == 0)
+ && (R2_INVENTORY.getObjectScene(R2_SOAKED_FACEMASK) == 0) && (!R2_GLOBALS.getFlag(36)) )
+ R2_GLOBALS._player.setVisage(22);
+ else
+ R2_GLOBALS._player.setVisage(20);
+
+ R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
+ _background.setDetails(Rect(0, 0, 320, 200), 1950, 0, 1, 2, 1, NULL);
+
+ enterArea();
+}
+
+void Scene1950::remove() {
+ R2_GLOBALS._sound1.stop();
+ R2_GLOBALS._sound2.fadeOut2(NULL);
+ SceneExt::remove();
+}
+
+void Scene1950::signal() {
+ switch (_sceneMode) {
+ case 11:
+ R2_GLOBALS._flubMazeArea += 7;
+ initArea();
+ enterArea();
+ break;
+ case 12:
+ // Moving up a ladder within the Flub maze
+ R2_GLOBALS._flubMazeArea += 35;
+ initArea();
+ enterArea();
+ break;
+ case 1975:
+ SceneItem::display(1950, 21, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, 1,
+ SET_Y, 20, SET_EXT_BGCOLOR, 7, LIST_END);
+ // No break on purpose
+ case 13:
+ // Moving east within the Flub maze
+ ++R2_GLOBALS._flubMazeArea;
+ initArea();
+ enterArea();
+ break;
+ case 14:
+ // Moving down a ladder within the Flub maze
+ R2_GLOBALS._flubMazeArea -= 35;
+ initArea();
+ enterArea();
+ break;
+ case 15:
+ R2_GLOBALS._flubMazeArea -= 7;
+ initArea();
+ enterArea();
+ break;
+ case 16:
+ // Moving west within the Flub maze
+ // No break on purpose
+ case 1961:
+ --R2_GLOBALS._flubMazeArea;
+ initArea();
+ enterArea();
+ break;
+ case 17: {
+ _sceneMode = 13;
+ R2_GLOBALS._flubMazeEntryDirection = 3;
+ _vampireActive = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._player._canWalk = true;
+ R2_GLOBALS._player.setVisage(22);
+ R2_GLOBALS._player.animate(ANIM_MODE_9);
+ Common::Point pt(340, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ Common::Point pt2(289, 160);
+ NpcMover *mover2 = new NpcMover();
+ _vampire.addMover(mover2, &pt2, NULL);
+ }
+ break;
+ case 18: {
+ _sceneMode = 16;
+ R2_GLOBALS._flubMazeEntryDirection = 6;
+ _vampireActive = false;
+ R2_GLOBALS._player.disableControl(CURSOR_WALK);
+ R2_GLOBALS._player._canWalk = true;
+ R2_GLOBALS._player.setVisage(22);
+ R2_GLOBALS._player.animate(ANIM_MODE_9);
+ Common::Point pt(-20, 160);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ Common::Point pt2(30, 160);
+ NpcMover *mover2 = new NpcMover();
+ _vampire.addMover(mover2, &pt2, NULL);
+ }
+ break;
+ case 24:
+ _KeypadWindow.remove();
+ _sceneMode = 1966;
+ _cube.setFrame(3);
+ setAction(&_sequenceManager, this, 1966, &_containmentField, &_gem, NULL);
+ break;
+ case 1951:
+ R2_GLOBALS._sound1.fadeOut2(NULL);
+ R2_GLOBALS._sceneManager.changeScene(1945);
+ break;
+ case 1958:
+ SceneItem::display(1950, 24, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+ R2_GLOBALS._player.enableControl(CURSOR_WALK);
+ _doorExit._enabled = true;
+ break;
+ case 1959:
+ R2_INVENTORY.setObjectScene(R2_SOAKED_FACEMASK, 0);
+ R2_GLOBALS._player.enableControl(CURSOR_WALK);
+ _doorExit._enabled = true;
+ break;
+ case 1962:
+ // No break on purpose
+ case 1963:
+ R2_GLOBALS._player.enableControl();
+ _KeypadWindow.setup2(1971, 1, 1, 160, 135);
+ break;
+ case 1964:
+ // No break on purpose
+ case 1965:
+ if (!R2_GLOBALS.getFlag(37))
+ SceneItem::display(1950, 26, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
+
+ R2_GLOBALS._player.enableControl();
+ break;
+ case 1966:
+ _containmentField.remove();
+ if (R2_GLOBALS.getFlag(36)) {
+ _sceneMode = 1964;
+ setAction(&_sequenceManager, this, 1964, &R2_GLOBALS._player, NULL);
+ } else {
+ _sceneMode = 1965;
+ setAction(&_sequenceManager, this, 1965, &R2_GLOBALS._player, NULL);
+ }
+ _gem.setDetails(1950, 9, -1, -1, 2, (SceneItem *) NULL);
+ break;
+ case 1967: {
+ _sceneMode = 0;
+ R2_INVENTORY.setObjectScene(R2_SAPPHIRE_BLUE, 2);
+ _gem.remove();
+ if (R2_GLOBALS.getFlag(36))
+ R2_GLOBALS._player.setVisage(20);
+ else
+ R2_GLOBALS._player.setVisage(22);
+
+ R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+ // This is a hack to work around a pathfinding issue. original destination is (218, 165)
+ Common::Point pt(128, 165);
+ NpcMover *mover = new NpcMover();
+ R2_GLOBALS._player.addMover(mover, &pt, this);
+ }
+ break;
+ case 1968:
+ R2_GLOBALS._player.enableControl();
+ R2_INVENTORY.setObjectScene(R2_ANCIENT_SCROLLS, 2);
+ _scrolls.setFrame(2);
+ if (R2_GLOBALS.getFlag(36))
+ R2_GLOBALS._player.setVisage(20);
+ else
+ R2_GLOBALS._player.setVisage(22);
+ R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+ break;
+ default:
+ R2_GLOBALS._player.enableControl(CURSOR_WALK);
+ break;
+ }
+}
+
+void Scene1950::process(Event &event) {
+ if ( (event.eventType == EVENT_BUTTON_DOWN)
+ && (R2_GLOBALS._player._uiEnabled)
+ && (R2_GLOBALS._events.getCursor() == R2_SOAKED_FACEMASK)
+ && (R2_GLOBALS._player._bounds.contains(event.mousePos))
+ && (R2_INVENTORY.getObjectScene(R2_SCRITH_KEY) == 0)) {
+ event.handled = true;
+ R2_GLOBALS._player.disableControl();
+ _shaftExit._enabled = false;
+ _doorExit._enabled = false;
+ _sceneMode = 1959;
+ setAction(&_sequenceManager, this, 1959, &R2_GLOBALS._player, NULL);
+ }
+
+ Scene::process(event);
+}
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
diff --git a/engines/tsage/ringworld2/ringworld2_vampire.h b/engines/tsage/ringworld2/ringworld2_vampire.h
new file mode 100644
index 0000000000..ca7aa34544
--- /dev/null
+++ b/engines/tsage/ringworld2/ringworld2_vampire.h
@@ -0,0 +1,179 @@
+/* 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.
+ *
+ */
+
+#ifndef TSAGE_RINGWORLD2_VAMPIRE_H
+#define TSAGE_RINGWORLD2_VAMPIRE_H
+
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+#include "tsage/sound.h"
+#include "tsage/ringworld2/ringworld2_logic.h"
+
+namespace TsAGE {
+
+namespace Ringworld2 {
+
+using namespace TsAGE;
+
+class Scene1950 : public SceneExt {
+ /* Windows */
+ class KeypadWindow: public ModalWindow {
+ public:
+ class KeypadButton : public SceneActor {
+ public:
+ int _buttonIndex;
+ bool _pressed;
+ bool _toggled;
+
+ KeypadButton();
+ void synchronize(Serializer &s);
+
+ void init(int indx);
+ virtual void process(Event &event);
+ virtual bool startAction(CursorType action, Event &event);
+ };
+
+ SceneActor _areaActor;
+ KeypadButton _buttons[16];
+
+ int _buttonIndex;
+
+ KeypadWindow();
+ virtual void synchronize(Serializer &s);
+ virtual void remove();
+ virtual void setup2(int visage, int stripFrameNum, int frameNum, int posX, int posY);
+ virtual void setup3(int resNum, int lookLineNum, int talkLineNum, int useLineNum);
+ };
+
+ class Keypad : public NamedHotspot {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
+
+ /* Actors */
+ class Door : public SceneActor {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
+ class Scrolls : public SceneActor {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
+ class Gem : public SceneActor {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
+ class Vampire : public SceneActor {
+ public:
+ Common::Point _deadPosition;
+ int _deltaX;
+ int _deltaY;
+ int _vampireMode;
+
+ Vampire();
+ void synchronize(Serializer &s);
+
+ virtual void signal();
+ virtual bool startAction(CursorType action, Event &event);
+ };
+
+ /* Exits */
+ class NorthExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+ class UpExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+ class EastExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+ class DownExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+ class SouthExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+ class WestExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+ class ShaftExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+ class DoorExit : public SceneExit {
+ public:
+ virtual void changeScene();
+ };
+private:
+ void initArea();
+ void enterArea();
+ void doButtonPress(int indx);
+public:
+ NamedHotspot _background;
+ Keypad _keypad;
+ SceneActor _southDoorway;
+ SceneObject _northDoorway;
+ Door _door;
+ Scrolls _scrolls;
+ SceneActor _containmentField;
+ Gem _gem;
+ SceneActor _cube;
+ SceneActor _pulsingLights;
+ Vampire _vampire;
+ KeypadWindow _KeypadWindow;
+ NorthExit _northExit;
+ UpExit _upExit;
+ EastExit _eastExit;
+ DownExit _downExit;
+ SouthExit _southExit;
+ WestExit _westExit;
+ ShaftExit _shaftExit;
+ DoorExit _doorExit;
+ SequenceManager _sequenceManager;
+
+ bool _upExitStyle;
+ bool _removeFlag;
+ bool _vampireActive;
+ Common::Point _vampireDestPos;
+ int _vampireIndex;
+
+ Scene1950();
+ void synchronize(Serializer &s);
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void remove();
+ virtual void signal();
+ virtual void process(Event &event);
+};
+
+} // End of namespace Ringworld2
+} // End of namespace TsAGE
+
+#endif
diff --git a/engines/wintermute/POTFILES b/engines/wintermute/POTFILES
new file mode 100644
index 0000000000..e9422415b2
--- /dev/null
+++ b/engines/wintermute/POTFILES
@@ -0,0 +1 @@
+engines/wintermute/detection.cpp
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp
index fa452cc0d6..b5b12d55f9 100644
--- a/engines/wintermute/base/sound/base_sound.cpp
+++ b/engines/wintermute/base/sound/base_sound.cpp
@@ -89,7 +89,7 @@ bool BaseSound::setSoundSimple() {
_sound->setLooping(_soundLooping);
_sound->setPrivateVolume(_soundPrivateVolume);
_sound->setLoopStart(_soundLoopStart);
- _sound->_freezePaused = _soundFreezePaused;
+ _sound->setFreezePaused(_soundFreezePaused);
if (_soundPlaying) {
return _sound->resume();
} else {
@@ -130,7 +130,7 @@ bool BaseSound::pause(bool freezePaused) {
if (_sound) {
_soundPaused = true;
if (freezePaused) {
- _sound->_freezePaused = true;
+ _sound->setFreezePaused(true);
}
return _sound->pause();
} else {
@@ -150,13 +150,13 @@ bool BaseSound::resume() {
bool BaseSound::persist(BasePersistenceManager *persistMgr) {
if (persistMgr->getIsSaving() && _sound) {
_soundPlaying = _sound->isPlaying();
- _soundLooping = _sound->_looping;
- _soundPrivateVolume = _sound->_privateVolume;
+ _soundLooping = _sound->isLooping();
+ _soundPrivateVolume = _sound->getPrivateVolume();
if (_soundPlaying) {
_soundPosition = _sound->getPosition();
}
- _soundLoopStart = _sound->_loopStart;
- _soundFreezePaused = _sound->_freezePaused;
+ _soundLoopStart = _sound->getLoopStart();
+ _soundFreezePaused = _sound->isFreezePaused();
}
if (persistMgr->getIsSaving()) {
@@ -232,7 +232,7 @@ bool BaseSound::setPrivateVolume(int volume) {
if (!_sound) {
return STATUS_FAILED;
} else {
- _sound->_privateVolume = volume;
+ _sound->setPrivateVolume(volume);
return STATUS_OK;
}
}
@@ -241,7 +241,7 @@ int BaseSound::getVolumePercent() {
if (!_sound) {
return 0;
} else {
- return _sound->_privateVolume * 100 / 255;
+ return _sound->getPrivateVolume() * 100 / 255;
}
}
@@ -249,7 +249,7 @@ int BaseSound::getVolume() {
if (!_sound) {
return 0;
} else {
- return _sound->_privateVolume;
+ return _sound->getPrivateVolume();
}
}
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp
index 7ec68ea752..5fdac12cef 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.cpp
+++ b/engines/wintermute/base/sound/base_sound_buffer.cpp
@@ -143,8 +143,13 @@ bool BaseSoundBuffer::play(bool looping, uint32 startSample) {
_stream->seek(startSample);
_handle = new Audio::SoundHandle;
if (_looping) {
- Audio::AudioStream *loopStream = new Audio::LoopingAudioStream(_stream, 0, DisposeAfterUse::NO);
- g_system->getMixer()->playStream(_type, _handle, loopStream, -1, _volume, _pan, DisposeAfterUse::YES);
+ if (_loopStart != 0) {
+ Audio::AudioStream *loopStream = new Audio::SubLoopingAudioStream(_stream, 0, Audio::Timestamp(_loopStart, _stream->getRate()), _stream->getLength(), DisposeAfterUse::NO);
+ g_system->getMixer()->playStream(_type, _handle, loopStream, -1, _volume, _pan, DisposeAfterUse::YES);
+ } else {
+ Audio::AudioStream *loopStream = new Audio::LoopingAudioStream(_stream, 0, DisposeAfterUse::NO);
+ g_system->getMixer()->playStream(_type, _handle, loopStream, -1, _volume, _pan, DisposeAfterUse::YES);
+ }
} else {
g_system->getMixer()->playStream(_type, _handle, _stream, -1, _volume, _pan, DisposeAfterUse::NO);
}
@@ -296,4 +301,24 @@ bool BaseSoundBuffer::applyFX(TSFXType type, float param1, float param2, float p
return STATUS_OK;
}
+int32 BaseSoundBuffer::getPrivateVolume() const {
+ return _privateVolume;
+}
+
+bool BaseSoundBuffer::isLooping() const {
+ return _looping;
+}
+
+bool BaseSoundBuffer::isFreezePaused() const {
+ return _freezePaused;
+}
+
+void BaseSoundBuffer::setFreezePaused(bool freezePaused) {
+ _freezePaused = freezePaused;
+}
+
+Audio::Mixer::SoundType BaseSoundBuffer::getType() const {
+ return _type;
+}
+
} // End of namespace Wintermute
diff --git a/engines/wintermute/base/sound/base_sound_buffer.h b/engines/wintermute/base/sound/base_sound_buffer.h
index 94bc8dc6ad..b3f3046674 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.h
+++ b/engines/wintermute/base/sound/base_sound_buffer.h
@@ -71,23 +71,26 @@ public:
void updateVolume();
void setType(Audio::Mixer::SoundType Type);
+ Audio::Mixer::SoundType getType() const;
bool loadFromFile(const Common::String &filename, bool forceReload = false);
void setStreaming(bool streamed, uint32 numBlocks = 0, uint32 blockSize = 0);
bool applyFX(TSFXType type, float param1, float param2, float param3, float param4);
-
+ int32 getPrivateVolume() const;
+ void setFreezePaused(bool freezePaused);
+ bool isFreezePaused() const;
+ bool isLooping() const;
//HSTREAM _stream;
//HSYNC _sync;
+
+private:
+ Audio::Mixer::SoundType _type;
Audio::SeekableAudioStream *_stream;
Audio::SoundHandle *_handle;
-
bool _freezePaused;
- uint32 _loopStart;
- Audio::Mixer::SoundType _type;
bool _looping;
-
int32 _privateVolume;
-private:
+ uint32 _loopStart;
uint32 _startPos;
Common::String _filename;
bool _streamed;
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index 41cfe5ea62..f1e0c3b1f9 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -254,9 +254,9 @@ byte BaseSoundMgr::getMasterVolume() {
bool BaseSoundMgr::pauseAll(bool includingMusic) {
for (uint32 i = 0; i < _sounds.size(); i++) {
- if (_sounds[i]->isPlaying() && (_sounds[i]->_type != Audio::Mixer::kMusicSoundType || includingMusic)) {
+ if (_sounds[i]->isPlaying() && (_sounds[i]->getType() != Audio::Mixer::kMusicSoundType || includingMusic)) {
_sounds[i]->pause();
- _sounds[i]->_freezePaused = true;
+ _sounds[i]->setFreezePaused(true);
}
}
@@ -268,9 +268,9 @@ bool BaseSoundMgr::pauseAll(bool includingMusic) {
bool BaseSoundMgr::resumeAll() {
for (uint32 i = 0; i < _sounds.size(); i++) {
- if (_sounds[i]->_freezePaused) {
+ if (_sounds[i]->isFreezePaused()) {
_sounds[i]->resume();
- _sounds[i]->_freezePaused = false;
+ _sounds[i]->setFreezePaused(false);
}
}
diff --git a/engines/zvision/POTFILES b/engines/zvision/POTFILES
new file mode 100644
index 0000000000..48e2782648
--- /dev/null
+++ b/engines/zvision/POTFILES
@@ -0,0 +1 @@
+engines/zvision/detection.cpp
diff --git a/engines/zvision/fonts/truetype_font.cpp b/engines/zvision/fonts/truetype_font.cpp
index ba4d72bde8..45eaeeb2b4 100644
--- a/engines/zvision/fonts/truetype_font.cpp
+++ b/engines/zvision/fonts/truetype_font.cpp
@@ -95,6 +95,7 @@ Graphics::Surface *TruetypeFont::drawTextToSurface(const Common::String &text, u
lines.pop_back();
}
if (lines.size() == 0) {
+ delete surface;
return nullptr;
}
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 1ed67fa169..dba48249bc 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -31,9 +31,54 @@ int Font::getKerningOffset(uint32 left, uint32 right) const {
return 0;
}
+Common::Rect Font::getBoundingBox(uint32 chr) const {
+ return Common::Rect(getCharWidth(chr), getFontHeight());
+}
+
namespace {
template<class StringType>
+Common::Rect getBoundingBoxImpl(const Font &font, const StringType &str, int x, int y, int w, TextAlign align, int deltax) {
+ // We follow the logic of drawStringImpl here. The only exception is
+ // that we do allow an empty width to be specified here. This allows us
+ // to obtain the complete bounding box of a string.
+ const int leftX = x, rightX = w ? (x + w) : 0x7FFFFFFF;
+ int width = font.getStringWidth(str);
+
+ if (align == kTextAlignCenter)
+ x = x + (w - width)/2;
+ else if (align == kTextAlignRight)
+ x = x + w - width;
+ x += deltax;
+
+ bool first = true;
+ Common::Rect bbox;
+
+ typename StringType::unsigned_type last = 0;
+ for (typename StringType::const_iterator i = str.begin(), end = str.end(); i != end; ++i) {
+ const typename StringType::unsigned_type cur = *i;
+ x += font.getKerningOffset(last, cur);
+ last = cur;
+ w = font.getCharWidth(cur);
+ if (x+w > rightX)
+ break;
+ if (x+w >= leftX) {
+ Common::Rect charBox = font.getBoundingBox(cur);
+ charBox.translate(x, y);
+ if (first) {
+ bbox = charBox;
+ first = false;
+ } else {
+ bbox.extend(charBox);
+ }
+ }
+ x += w;
+ }
+
+ return bbox;
+}
+
+template<class StringType>
int getStringWidthImpl(const Font &font, const StringType &str) {
int space = 0;
typename StringType::unsigned_type last = 0;
@@ -49,6 +94,8 @@ int getStringWidthImpl(const Font &font, const StringType &str) {
template<class StringType>
void drawStringImpl(const Font &font, Surface *dst, const StringType &str, int x, int y, int w, uint32 color, TextAlign align, int deltax) {
+ // The logic in getBoundingImpl is the same as we use here. In case we
+ // ever change something here we will need to change it there too.
assert(dst != 0);
const int leftX = x, rightX = x + w;
@@ -175,6 +222,40 @@ int wordWrapTextImpl(const Font &font, const StringType &str, int maxWidth, Comm
} // End of anonymous namespace
+Common::Rect Font::getBoundingBox(const Common::String &input, int x, int y, const int w, TextAlign align, int deltax, bool useEllipsis) const {
+ // In case no width was given we cannot use ellipsis or any alignment
+ // apart from left alignment.
+ if (w == 0) {
+ if (useEllipsis) {
+ warning("Font::getBoundingBox: Requested ellipsis when no width was specified");
+ }
+
+ if (align != kTextAlignLeft) {
+ warning("Font::getBoundingBox: Requested text alignment when no width was specified");
+ }
+
+ useEllipsis = false;
+ align = kTextAlignLeft;
+ }
+
+ const Common::String str = useEllipsis ? handleEllipsis(input, w) : input;
+ return getBoundingBoxImpl(*this, str, x, y, w, align, deltax);
+}
+
+Common::Rect Font::getBoundingBox(const Common::U32String &str, int x, int y, const int w, TextAlign align) const {
+ // In case no width was given we cannot any alignment apart from left
+ // alignment.
+ if (w == 0) {
+ if (align != kTextAlignLeft) {
+ warning("Font::getBoundingBox: Requested text alignment when no width was specified");
+ }
+
+ align = kTextAlignLeft;
+ }
+
+ return getBoundingBoxImpl(*this, str, x, y, w, align, 0);
+}
+
int Font::getStringWidth(const Common::String &str) const {
return getStringWidthImpl(*this, str);
}
@@ -183,12 +264,28 @@ int Font::getStringWidth(const Common::U32String &str) const {
return getStringWidthImpl(*this, str);
}
-void Font::drawString(Surface *dst, const Common::String &sOld, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
- Common::String s = sOld;
+void Font::drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
+ Common::String renderStr = useEllipsis ? handleEllipsis(str, w) : str;
+ drawStringImpl(*this, dst, renderStr, x, y, w, color, align, deltax);
+}
+
+void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align) const {
+ drawStringImpl(*this, dst, str, x, y, w, color, align, 0);
+}
+
+int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const {
+ return wordWrapTextImpl(*this, str, maxWidth, lines);
+}
+
+int Font::wordWrapText(const Common::U32String &str, int maxWidth, Common::Array<Common::U32String> &lines) const {
+ return wordWrapTextImpl(*this, str, maxWidth, lines);
+}
+
+Common::String Font::handleEllipsis(const Common::String &input, int w) const {
+ Common::String s = input;
int width = getStringWidth(s);
- Common::String str;
- if (useEllipsis && width > w && s.hasSuffix("...")) {
+ if (width > w && s.hasSuffix("...")) {
// String is too wide. Check whether it ends in an ellipsis
// ("..."). If so, remove that and try again!
s.deleteLastChar();
@@ -197,7 +294,9 @@ void Font::drawString(Surface *dst, const Common::String &sOld, int x, int y, in
width = getStringWidth(s);
}
- if (useEllipsis && width > w) {
+ if (width > w) {
+ Common::String str;
+
// String is too wide. So we shorten it "intelligently" by
// replacing parts of the string by an ellipsis. There are
// three possibilities for this: replace the start, the end, or
@@ -212,9 +311,9 @@ void Font::drawString(Surface *dst, const Common::String &sOld, int x, int y, in
const int halfWidth = (w - ellipsisWidth) / 2;
int w2 = 0;
Common::String::unsigned_type last = 0;
- uint i;
+ uint i = 0;
- for (i = 0; i < s.size(); ++i) {
+ for (; i < s.size(); ++i) {
const Common::String::unsigned_type cur = s[i];
int charWidth = getCharWidth(cur) + getKerningOffset(last, cur);
if (w2 + charWidth > halfWidth)
@@ -247,24 +346,10 @@ void Font::drawString(Surface *dst, const Common::String &sOld, int x, int y, in
str += s[i];
}
- width = getStringWidth(str);
+ return str;
} else {
- str = s;
+ return s;
}
-
- drawStringImpl(*this, dst, str, x, y, w, color, align, deltax);
-}
-
-void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align) const {
- drawStringImpl(*this, dst, str, x, y, w, color, align, 0);
-}
-
-int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const {
- return wordWrapTextImpl(*this, str, maxWidth, lines);
-}
-
-int Font::wordWrapText(const Common::U32String &str, int maxWidth, Common::Array<Common::U32String> &lines) const {
- return wordWrapTextImpl(*this, str, maxWidth, lines);
}
} // End of namespace Graphics
diff --git a/graphics/font.h b/graphics/font.h
index f333107780..35f6792d7f 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -25,6 +25,7 @@
#include "common/str.h"
#include "common/ustr.h"
+#include "common/rect.h"
namespace Common {
template<class T> class Array;
@@ -84,10 +85,51 @@ public:
virtual int getKerningOffset(uint32 left, uint32 right) const;
/**
+ * Calculate the bounding box of a character. It is assumed that
+ * the character shall be drawn at position (0, 0).
+ *
+ * The idea here is that the character might be drawn outside the
+ * rect (0, 0) to (getCharWidth(chr), getFontHeight()) for some fonts.
+ * This is common among TTF fonts.
+ *
+ * The default implementation simply returns the rect with a width
+ * of getCharWidth(chr) and height of getFontHeight().
+ *
+ * @param chr The character to draw.
+ * @return The bounding box of the drawn glyph.
+ */
+ virtual Common::Rect getBoundingBox(uint32 chr) const;
+
+ /**
+ * Return the bounding box of a string drawn with drawString.
+ *
+ * @param x The x position where to start drawing
+ * @param y The y position where to start drawing
+ * @param w The width of the text area. This can be 0 to allow for
+ * obtaining the whole bounding box for a string. Note that this
+ * does not work with an align different from kTextAlignLeft or
+ * with useEllipsis.
+ * @param align The text alignment. This can be used to center a string
+ * in the given area or to align it to the right.
+ * @param delatx Offset to the x starting position of the string.
+ * @param useEllipsis Try to fit the string in the area by inserting an
+ * ellipsis. Be ware that the default is false for this
+ * one unlike for drawString!
+ * @return The actual area where the string is drawn.
+ */
+ Common::Rect getBoundingBox(const Common::String &str, int x = 0, int y = 0, const int w = 0, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = false) const;
+ Common::Rect getBoundingBox(const Common::U32String &str, int x = 0, int y = 0, const int w = 0, TextAlign align = kTextAlignLeft) const;
+
+ /**
* Draw a character at a specific point on a surface.
*
- * Note that the point describes the top left edge point of the
- * character's bounding box.
+ * Note that the point describes the top left edge point where to draw
+ * the character. This can be different from top left edge point of the
+ * character's bounding box! For example, TTF fonts sometimes move
+ * characters like 't' one (or more) pixels to the left to create better
+ * visual results. To query the actual bounding box of a character use
+ * getBoundingBox.
+ * @see getBoundingBox
*
* The Font implemenation should take care of not drawing outside of the
* specified surface.
@@ -106,6 +148,11 @@ public:
/**
* Compute and return the width the string str has when rendered using this font.
+ * This describes the logical width of the string when drawn at (0, 0).
+ * This can be different from the actual bounding box of the string. Use
+ * getBoundingBox when you need the bounding box of a drawn string.
+ * @see getBoundingBox
+ * @see drawChar
*/
int getStringWidth(const Common::String &str) const;
int getStringWidth(const Common::U32String &str) const;
@@ -125,6 +172,9 @@ public:
*/
int wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const;
int wordWrapText(const Common::U32String &str, int maxWidth, Common::Array<Common::U32String> &lines) const;
+
+private:
+ Common::String handleEllipsis(const Common::String &str, int w) const;
};
} // End of namespace Graphics
diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp
index 09a00672e3..ba57613601 100644
--- a/graphics/fonts/ttf.cpp
+++ b/graphics/fonts/ttf.cpp
@@ -111,6 +111,8 @@ public:
virtual int getKerningOffset(uint32 left, uint32 right) const;
+ virtual Common::Rect getBoundingBox(uint32 chr) const;
+
virtual void drawChar(Surface *dst, uint32 chr, int x, int y, uint32 color) const;
private:
bool _initialized;
@@ -309,6 +311,19 @@ int TTFFont::getKerningOffset(uint32 left, uint32 right) const {
return (kerningVector.x / 64);
}
+Common::Rect TTFFont::getBoundingBox(uint32 chr) const {
+ assureCached(chr);
+ GlyphCache::const_iterator glyphEntry = _glyphs.find(chr);
+ if (glyphEntry == _glyphs.end()) {
+ return Common::Rect();
+ } else {
+ const int xOffset = glyphEntry->_value.xOffset;
+ const int yOffset = glyphEntry->_value.yOffset;
+ const Graphics::Surface &image = glyphEntry->_value.image;
+ return Common::Rect(xOffset, yOffset, xOffset + image.w, yOffset + image.h);
+ }
+}
+
namespace {
template<typename ColorType>
@@ -439,25 +454,11 @@ bool TTFFont::cacheGlyph(Glyph &glyph, uint32 chr) const {
if (_face->glyph->format != FT_GLYPH_FORMAT_BITMAP)
return false;
- FT_Glyph_Metrics &metrics = _face->glyph->metrics;
-
glyph.xOffset = _face->glyph->bitmap_left;
- int xMax = glyph.xOffset + ftCeil26_6(metrics.width);
glyph.yOffset = _ascent - _face->glyph->bitmap_top;
glyph.advance = ftCeil26_6(_face->glyph->advance.x);
- // In case we got a negative xMin we adjust that, this might make some
- // characters make a bit odd, but it's the only way we can assure no
- // invalid memory writes with the current font API
- if (glyph.xOffset < 0) {
- xMax -= glyph.xOffset;
- glyph.xOffset = 0;
-
- if (xMax > glyph.advance)
- glyph.advance = xMax;
- }
-
const FT_Bitmap &bitmap = _face->glyph->bitmap;
glyph.image.create(bitmap.width, bitmap.rows, PixelFormat::createFormatCLUT8());
diff --git a/graphics/transform_tools.h b/graphics/transform_tools.h
index a51c8ee229..ec739f9ad0 100644
--- a/graphics/transform_tools.h
+++ b/graphics/transform_tools.h
@@ -28,7 +28,7 @@
namespace Graphics {
- static const float kEpsilon = 0.00001; // arbitrarily taken number
+ static const float kEpsilon = 0.00001f; // arbitrarily taken number
struct FloatPoint {
float x;
diff --git a/gui/credits.h b/gui/credits.h
index 4555117a89..e32a0705bf 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -564,6 +564,9 @@ static const char *credits[] = {
"C1""Danish",
"C0""Steffen Nyeland",
"",
+"C1""Dutch",
+"C0""Ben Castricum",
+"",
"C1""Finnish",
"C0""Toni Saarela",
"",
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index e40e8b1e26..c7c585654d 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index b760e15919..7e61d6820e 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -1169,9 +1169,9 @@
height = 'Globals.Line.Height'
/>
<widget name = 'HelpText'
- height = '220'
+ height = '228'
/>
- <layout type = 'horizontal' padding = '0, 0, 16, 0'>
+ <layout type = 'horizontal' padding = '0, 0, 8, 0'>
<widget name = 'Prev'
type = 'Button'
/>
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index ed215ab6f1..abd745bb2b 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/icons/scummvm_drawer.info b/icons/scummvm_drawer.info
new file mode 100644
index 0000000000..26f6a8633d
--- /dev/null
+++ b/icons/scummvm_drawer.info
Binary files differ
diff --git a/po/be_BY.po b/po/be_BY.po
index 9b76ede1d1..868ade94fb 100644
--- a/po/be_BY.po
+++ b/po/be_BY.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.7.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-02 17:22+0300\n"
"Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n"
"Language-Team: Ivan Lukyanov <greencis@mail.ru>\n"
@@ -89,7 +89,7 @@ msgstr "Паказаць клавіятуру"
msgid "Remap keys"
msgstr "Перапрызначыць клавішы"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Пераключэнне на ўвесь экран"
@@ -109,13 +109,15 @@ msgstr "Прызначыць"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -357,7 +359,7 @@ msgstr "Абярыце дырэкторыю з файламі гульні"
msgid "Select additional game directory"
msgstr "Абярыце дадатковую дырэкторыю гульні"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Абярыце дырэкторыю для захаванняў"
@@ -454,7 +456,7 @@ msgstr "Пошук:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Загрузіць гульню:"
@@ -463,7 +465,7 @@ msgstr "Загрузіць гульню:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Загрузіць"
@@ -481,6 +483,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Так"
@@ -490,6 +493,7 @@ msgstr "Так"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Не"
@@ -915,10 +919,6 @@ msgstr "Мова графічнага інтэрфейсу ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Вы павінны перазапусціць ScummVM, каб ужыць змены."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Абярыце дырэкторыю для захаванняў"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не магу пісаць у абраную дырэкторыю. Калі ласка, азначце іншую."
@@ -1029,7 +1029,7 @@ msgstr "Без графікі"
msgid "Standard Renderer"
msgstr "Стандартны растарызатар"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Стандартны"
@@ -1275,8 +1275,9 @@ msgstr "Г~а~лоўнае меню"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Захаваць гульню:"
@@ -1286,9 +1287,10 @@ msgstr "Захаваць гульню:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Захаваць"
@@ -1313,12 +1315,12 @@ msgstr ""
"дапамогу."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~О~К"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~А~дмена"
@@ -2084,30 +2086,32 @@ msgstr "Пстрычкі выключаны"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Выкарыстоўваць арыгінальныя экраны запісу/чытанні гульні"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Выкарыстоўваць арыгінальныя экраны запісу і захавання гульні замест "
"зробленых у ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Узнавіць гульню:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Узнавіць"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2118,7 +2122,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2129,7 +2133,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2145,6 +2149,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Файл застаўкі '%s' не знойдзены!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Рэжым пстрычкі"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2171,11 +2184,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Малюе графіку з выкарыстаннем яркай палітры гульні"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Не атрымалася загрузіць захаваную гульню з файла."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Не атрымалася захаваць гульню ў файл."
@@ -2195,6 +2209,14 @@ msgstr "Прайгравае відэа на павялічанай хуткасці"
msgid "Failed to save game"
msgstr "Не атрымалася захаваць гульню"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2316,6 +2338,35 @@ msgstr ""
"можа так атрымацца, што некаторыя трэкі будуць\n"
"сыграныя няправільна."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2443,6 +2494,14 @@ msgstr "Паказаць/схаваць інфаэкран"
msgid "Display/Hide Pause Menu"
msgstr "Паказаць/схаваць меню паўзы"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Альтэрнатыўны ўступ"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Выкарыстоўваць альтэрнатыўны ўступ (толькі для CD версіі гульні)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA без растру"
@@ -2585,36 +2644,36 @@ msgstr "~П~апяр"
msgid "~N~ext"
msgstr "~Н~аст"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Толькі агучка"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Агучка і субтытры"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Толькі субтытры"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Агучка і тэкст"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Абярыце ўзровень складанасці."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "За дапамогай звярніцеся да інструкцыі Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Практыкант"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Эксперт"
@@ -2672,10 +2731,6 @@ msgstr "Захаваць гульню 1-10"
msgid "Enter"
msgstr "Увод"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Пераключыць на ўвесь экран"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Гучнасць музыкі павялічыць / паменшыць"
@@ -3131,7 +3186,7 @@ msgstr "Ляцець направа"
msgid "Fly to lower right"
msgstr "Ляцець направа-ўніз"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3140,7 +3195,7 @@ msgstr ""
"Рэжым \"роднага\" MIDI патрабуе абнаўленне Roland Upgrade ад\n"
"LucasArts, але не хапае %s. Пераключаюся на AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3150,6 +3205,18 @@ msgstr ""
"ўмее. Каб згуляць, націсніце 'Новая гульня' у стартавым меню ScummVM, а "
"затым абярыце дырэкторыю Maniac у дырэкторыі з гульнёй Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3263,6 +3330,14 @@ msgstr ""
"Файл teenagent.dat зжаты, але zlib не ўключана ў гэту праграму. Калі ласка, "
"распакуйце яго"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "Знойдзены застаўкі ў фармаце MPEG-2, але ScummVM быў сабраны без "
@@ -3284,12 +3359,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Стандартны растарызатар (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Альтэрнатыўны ўступ"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Выкарыстоўваць альтэрнатыўны ўступ (толькі для CD версіі гульні)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Застаўкі ў фармаце MPEG2 больш не падтрымліваюцца"
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 222c6fca34..86f8bbed86 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2013-05-05 14:16+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@jvprat.com>\n"
"Language-Team: Catalan <scummvm-devel@lists.sf.net>\n"
@@ -86,7 +86,7 @@ msgstr "Mostra el teclat"
msgid "Remap keys"
msgstr "Assigna les tecles"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Commuta la pantalla completa"
@@ -106,13 +106,15 @@ msgstr "Assigna"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "D'acord"
@@ -354,7 +356,7 @@ msgstr "Seleccioneu el directori amb les dades del joc"
msgid "Select additional game directory"
msgstr "Seleccioneu el directori addicional del joc"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Seleccioneu el directori de les partides desades"
@@ -454,7 +456,7 @@ msgstr "Cerca:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Carrega partida:"
@@ -463,7 +465,7 @@ msgstr "Carrega partida:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Carrega"
@@ -481,6 +483,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Sэ"
@@ -490,6 +493,7 @@ msgstr "Sэ"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "No"
@@ -916,10 +920,6 @@ msgstr "Idioma de la interfэcie d'usuari de ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Heu de reiniciar ScummVM perquш tots els canvis tinguin efecte."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Seleccioneu el directori de les partides desades"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -1033,7 +1033,7 @@ msgstr "GFX desactivats"
msgid "Standard Renderer"
msgstr "Pintat estрndard (16bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estрndard"
@@ -1283,8 +1283,9 @@ msgstr "~R~etorna al Llanчador"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Desa la partida:"
@@ -1294,9 +1295,10 @@ msgstr "Desa la partida:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Desa"
@@ -1319,12 +1321,12 @@ msgstr ""
"informaciѓ bрsica i les instruccions sobre com obtenir mщs assistшncia."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~D~'acord"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~C~ancelЗla"
@@ -2089,29 +2091,31 @@ msgstr "Clicat desactivat"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Utilitza les pantalles originals de desat/cрrrega"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utilitza les pantalles originals de desat/cрrrega, en lloc de les de ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Recupera la partida:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Restaura"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2122,7 +2126,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2133,7 +2137,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2149,6 +2153,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "No s'ha trobat el fitxer d'escena '%s'!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Mode clic"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2176,11 +2189,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Mostra els grрfics utilitzant la paleta brillant del joc"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "No s'ha pogut carregar l'estat del joc del fitxer."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "No s'ha pogut desar l'estat del joc al fitxer."
@@ -2200,6 +2214,14 @@ msgstr "Reprodueix les pelЗlэcules a major velocitat"
msgid "Failed to save game"
msgstr "No s'ha pogut desar l'estat del joc"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2320,6 +2342,35 @@ msgstr ""
"Roland MT32 als de General MIDI. Щs possible\n"
"que algunes pistes no es reprodueixin correctament."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2448,6 +2499,14 @@ msgstr "Mostra/Oculta la pantalla d'informaciѓ"
msgid "Display/Hide Pause Menu"
msgstr "Mostra/Oculta el menњ de pausa"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Introducciѓ alternativa"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Utilitza una introducciѓ del joc alternativa (nomщs per la versiѓ CD)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Elimina el tramat d'EGA"
@@ -2590,36 +2649,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "~S~egќent"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Nomщs veus"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Veu i subtэtols"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Nomщs subtэtols"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Veus i sub."
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Seleccioneu el nivell de competшncia."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consulteu el manual de Loom(TM) per ajuda."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Prрctica"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2677,10 +2736,6 @@ msgstr "Desa partida 1-10"
msgid "Enter"
msgstr "Intro"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Commuta la pantalla completa"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Puja / Baixa el volum de la mњsica"
@@ -3136,7 +3191,7 @@ msgstr "Vola a la dreta"
msgid "Fly to lower right"
msgstr "Vola avall i a la dreta"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3145,7 +3200,7 @@ msgstr ""
"El suport de MIDI natiu requereix l'actualitzaciѓ Roland de LucasArts,\n"
"perђ no s'ha trobat %s. S'utilitzarр AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3155,6 +3210,18 @@ msgstr ""
"fa encara. Per jugar-hi, aneu a 'Afegir joc' al menњ principal de ScummVM i "
"seleccioneu el directori 'Maniac' de dins del directori del joc Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3271,6 +3338,14 @@ msgstr ""
"El fitxer teenagent.dat estр comprimit perђ aquest executable no contщ zlib. "
"Descomprimiu-lo, si us plau."
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#, fuzzy
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
@@ -3293,13 +3368,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Estрndard (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Introducciѓ alternativa"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr ""
-#~ "Utilitza una introducciѓ del joc alternativa (nomщs per la versiѓ CD)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Les escenes MPEG2 ja no estan suportades"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index e9b15095e7..0b5a3c88bf 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.7.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-02-27 21:43+0100\n"
"Last-Translator: Zbynьk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: \n"
@@ -90,7 +90,7 @@ msgstr "Zobrazit klсvesnici"
msgid "Remap keys"
msgstr "Pјemapovat klсvesy"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Pјepnout celou obrazovku"
@@ -110,13 +110,15 @@ msgstr "Mapovat"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -356,7 +358,7 @@ msgstr "Vyberte adresсј s daty hry"
msgid "Select additional game directory"
msgstr "Vyberte dodateшn§ adresсј hry"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vyberte adresсј pro uloОenщ hry"
@@ -453,7 +455,7 @@ msgstr "Hledat:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Nahrсt hru:"
@@ -462,7 +464,7 @@ msgstr "Nahrсt hru:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Nahrсt"
@@ -480,6 +482,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Ano"
@@ -489,6 +492,7 @@ msgstr "Ano"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Ne"
@@ -910,10 +914,6 @@ msgstr "Jazyk GUI ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Pro pouОitэ tьchto nastavenэ musэte restartovat ScummVM."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Vybrat adresсј pro uloОenщ hry"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Do zvolenщho adresсјe nelze zapisovat. Vyberte, prosэm, jin§."
@@ -1024,7 +1024,7 @@ msgstr "GFX zakсzсno"
msgid "Standard Renderer"
msgstr "Standardnэ Vykreslovaш"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standardnэ"
@@ -1271,8 +1271,9 @@ msgstr "~N~сvrat do SpouЙtьшe"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "UloОit hru:"
@@ -1282,9 +1283,10 @@ msgstr "UloОit hru:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "UloОit"
@@ -1308,12 +1310,12 @@ msgstr ""
"informace a pokyny k zэskсnэ dalЙэ podpory."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~Z~ruЙit"
@@ -2079,28 +2081,30 @@ msgstr "Kliknutэ Zakсzсno"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "PouОэt pљvodnэ obrazovky naшtenэ/uloОenэ mэsto ze ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Obnovit hru"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Obnovit"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2111,7 +2115,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2122,7 +2126,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2138,6 +2142,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Soubor videa '%s' nenalezen'"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "ReОim kliknutэ"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2165,11 +2178,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Zobrazit grafiku pomocэ jasnщ palety hry"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Nelze naшэst stav hry ze souboru."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Nelze uloОit stav hry do souboru."
@@ -2189,6 +2203,14 @@ msgstr "Pјehrсt videa se zv§Йenou rychlostэ"
msgid "Failed to save game"
msgstr "Nelze uloОit hru."
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2309,6 +2331,35 @@ msgstr ""
"ty od General MIDI. Je stсle moОnщ, Оe\n"
"nьkterщ stopy nebudou znэt sprсvnь."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2436,6 +2487,14 @@ msgstr "Zobrazit/Skr§to obrazovku informacэ"
msgid "Display/Hide Pause Menu"
msgstr "Zobrazit/Skr§t "
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Alternativnэ њvod"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "PouОэt jinou verzi њvodu (Pouze verze CD)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Nerozklсdсnэ EGA"
@@ -2573,36 +2632,36 @@ msgstr "~P~јedchozэ"
msgid "~N~ext"
msgstr "~D~alЙэ"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Pouze иeш"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "иeш a Titulky"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Pouze Titulky"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "иeш a Titulky"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vyberte њroveђ odbornosti."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Pro nсpovьdu si pјeшtьte manuсl Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Cviшenэ"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Pokroшil§"
@@ -2660,10 +2719,6 @@ msgstr "UloОit stav hry 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Zapnout celou obrazovku"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Hlasitost hudby nahoru / dolљ"
@@ -3119,7 +3174,7 @@ msgstr "Letьt doprava"
msgid "Fly to lower right"
msgstr "Letьt doprava dolљ"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3128,7 +3183,7 @@ msgstr ""
"Pјirozenс podpora MIDI vyОaduje Aktualizaci Roland od LucasArts,\n"
"ale %s chybэ. Mэsto toho je pouОit AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3138,6 +3193,18 @@ msgstr ""
"Abyste toto mohli hrсt, pјejdьte do 'Pјidat Hru' v poшсteшnэm menu ScummVM a "
"vyberte adresсј 'Maniac' uvnitј hernэho adresсјe Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3246,6 +3313,14 @@ msgstr ""
"Soubor teenagent.dat je komprimovсn a zlib nenэ souшсstэ spustitelnщho "
"souboru. Prosэm dekomprimujte ho"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr "Videa MPEG-2 nalezena, ale ScummVM byl sestaven bez MPEG-2"
@@ -3264,12 +3339,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standardnэ (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Alternativnэ њvod"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "PouОэt jinou verzi њvodu (Pouze verze CD)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Videa MPGE2 jiО nejsou podporovсna"
diff --git a/po/da_DA.po b/po/da_DA.po
index 310d6264c3..480e2005d0 100644
--- a/po/da_DA.po
+++ b/po/da_DA.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-09 17:34+0100\n"
"Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n"
@@ -88,7 +88,7 @@ msgstr "Vis tastatur"
msgid "Remap keys"
msgstr "Kortlцg taster"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Skift fuldskцrm"
@@ -108,13 +108,15 @@ msgstr "Kortlцg"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -356,7 +358,7 @@ msgstr "Vцlg bibliotek med spil data"
msgid "Select additional game directory"
msgstr "Vцlg ekstra spil bibliotek"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vцlg bibliotek til spil gemmer"
@@ -453,7 +455,7 @@ msgstr "Sјg:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Indlцs spil:"
@@ -462,7 +464,7 @@ msgstr "Indlцs spil:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Indlцs"
@@ -480,6 +482,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Ja"
@@ -489,6 +492,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nej"
@@ -909,10 +913,6 @@ msgstr "Sprog for brugerfladen i ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Du skal genstarte ScummVM fјr dine цndringer har effekt."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Vцlg bibliotek til gemmer"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Der kan ikke skrives til det valgte bibliotek. Vцlg venligst et andet."
@@ -1023,7 +1023,7 @@ msgstr "Deaktiveret GFX"
msgid "Standard Renderer"
msgstr "Standard renderer"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
@@ -1271,8 +1271,9 @@ msgstr "~R~etur til oversigt"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Gemmer:"
@@ -1282,9 +1283,10 @@ msgstr "Gemmer:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Gem"
@@ -1308,12 +1310,12 @@ msgstr ""
"oplysninger, og for at fх instruktioner om, hvordan man fхr yderligere hjцlp."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~F~ortryd"
@@ -2078,28 +2080,30 @@ msgstr "Klik deaktiveret"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Brug original gem/indlцs skцrme"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Brug de originale gem/indlцs skцrme, istedet for dem fra ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Gendan spil:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Gendan"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2110,7 +2114,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2121,7 +2125,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2137,6 +2141,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Filmsekvens fil '%s' ikke fundet!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klik tilstand"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2164,11 +2177,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Vis grafik ved hjцlp af spillets lyse palette"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Mislykkedes at indlцse spil tilstand fra fil."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Mislykkedes at gemme spil tilstand til fil."
@@ -2188,6 +2202,14 @@ msgstr "Afspil film med forhјjet hastighed"
msgid "Failed to save game"
msgstr "Mislykkedes at gemme spil"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2308,6 +2330,35 @@ msgstr ""
"dem i Generel MIDI. Trods det kan det ske\n"
"at nogle stykker ikke lyder korrekt."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2437,6 +2488,14 @@ msgstr "Vis/Skjul Info skцrm"
msgid "Display/Hide Pause Menu"
msgstr "Vis/Skjul Pause menu"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Alternativ intro"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Brug en alternativ spil intro (kun CD version)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA farveforјgelse"
@@ -2575,36 +2634,36 @@ msgstr "Fo~r~rige"
msgid "~N~ext"
msgstr "~N~цste"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Kun tale"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Tale og Undertekster"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Kun undertekster"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Tale & Tekst"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vцlg et Fцrdighedsniveau."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Se din Loom(TM) manual for hjцlp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Trцning"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspert"
@@ -2662,10 +2721,6 @@ msgstr "Gem spil tilstand 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Skift fuldskцrm"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musik lydstyrke op / ned"
@@ -3121,7 +3176,7 @@ msgstr "Flyv til hјjre"
msgid "Fly to lower right"
msgstr "Flyv nederst til hјjre"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3130,7 +3185,7 @@ msgstr ""
"Indbygget MIDI understјttelse krцver Roland opgradering fra LucasArts,\n"
"men %s mangler. Bruger AdLib i stedet."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3140,6 +3195,18 @@ msgstr ""
"endnu. For at spille det, gх til 'Tilfјj spil' i ScummVM start-menuen og "
"vцlg 'Maniac' mappen inde i Tentacle spillets mappe."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3251,6 +3318,14 @@ msgstr ""
"Teenagent.dat filen er komprimeret og zlib er ikke blevet inkluderet i dette "
"program. Udpak den venligst"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr "MPEG-2 filmsekvenser fundet, men ScummVM er bygget uden MPEG-2"
@@ -3268,12 +3343,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standard (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Alternativ intro"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Brug en alternativ spil intro (kun CD version)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "MPEG2 filmsekvenser understјttes ikke lцngere"
diff --git a/po/de_DE.po b/po/de_DE.po
index 5d2a1c03ac..c127f109bf 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-06-14 19:34+0100\n"
"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n"
"Language-Team: Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari (retired)\n"
@@ -87,7 +87,7 @@ msgstr "Tastatur anzeigen"
msgid "Remap keys"
msgstr "Tasten neu zuweisen"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Vollbild EIN/AUS"
@@ -107,13 +107,15 @@ msgstr "Zuweisen"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -355,7 +357,7 @@ msgstr "Verzeichnis mit Spieldateien auswфhlen"
msgid "Select additional game directory"
msgstr "Verzeichnis mit zusфtzlichen Dateien auswфhlen"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Verzeichnis fќr Spielstфnde auswфhlen"
@@ -454,7 +456,7 @@ msgstr "Suchen:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Spiel laden:"
@@ -463,7 +465,7 @@ msgstr "Spiel laden:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Laden"
@@ -481,6 +483,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Ja"
@@ -490,6 +493,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nein"
@@ -919,10 +923,6 @@ msgstr "Sprache der ScummVM-Oberflфche"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Sie mќssen ScummVM neu starten, damit die Фnderungen wirksam werden."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Verzeichnis fќr Spielstфnde auswфhlen"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -1037,7 +1037,7 @@ msgstr "GFX ausgeschaltet"
msgid "Standard Renderer"
msgstr "Standard-Renderer"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
@@ -1288,8 +1288,9 @@ msgstr "Zur Spiele~l~iste"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Speichern:"
@@ -1299,9 +1300,10 @@ msgstr "Speichern:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Speichern"
@@ -1324,12 +1326,12 @@ msgstr ""
"Datei fќr grundlegende Informationen und Anweisungen zu weiterer Hilfe."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~A~bbrechen"
@@ -2099,29 +2101,31 @@ msgstr "Klicken deaktiviert"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Originale Spielstand-Menќs"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Verwendet die originalen Menќs zum Speichern und Laden statt der von ScummVM."
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Spiel laden:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Laden"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2132,7 +2136,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2143,7 +2147,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2159,6 +2163,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Zwischensequenz \"%s\" nicht gefunden!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klickmodus"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2186,11 +2199,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Zeigt Grafiken ќber helle Spielpalette an."
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Konnte Spielstand aus Datei nicht laden."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Konnte Spielstand nicht in Datei speichern."
@@ -2210,6 +2224,14 @@ msgstr "Spielt Filme mit erhіhter Geschwindigkeit ab."
msgid "Failed to save game"
msgstr "Konnte Spielstand nicht speichern."
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2332,6 +2354,35 @@ msgstr ""
"mіglich, dass ein paar Musikstќcke nicht\n"
"richtig abgespielt werden."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2463,6 +2514,14 @@ msgstr "Info-Bildschirm anzeigen/verbergen"
msgid "Display/Hide Pause Menu"
msgstr "Pause-Menќ anzeigen/verbergen"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Alternativer Vorspann"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Verwendet einen alternativen Vorspann (nur bei CD-Version)."
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Antifehlerdiffusion fќr EGA"
@@ -2604,36 +2663,36 @@ msgstr "~Z~urќck"
msgid "~N~ext"
msgstr "~W~eiter"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Nur Sprachausgabe"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Sprachausgabe und Untertitel"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Nur Untertitel"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Sprache & Text"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Wфhle einen Schwierigkeitsgrad."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Fќr Hilfe schaue ins Loom-Handbuch."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Anfфnger"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Experte"
@@ -2691,10 +2750,6 @@ msgstr "Spielstand 1-10 speichern"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Vollbild-/Fenster-Modus"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musiklautstфrke hіher/niedriger"
@@ -3150,7 +3205,7 @@ msgstr "Nach rechts fliegen"
msgid "Fly to lower right"
msgstr "Nach unten rechts fliegen"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3160,7 +3215,7 @@ msgstr ""
"Roland-Upgrade von LucasArts, aber %s\n"
"fehlt. Stattdessen wird AdLib verwendet."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3171,6 +3226,18 @@ msgstr ""
"im Startmenќ von ScummVM und wфhlen das Verzeichnis \"Maniac\" im "
"Verzeichnis dieses Spiels aus."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3290,6 +3357,14 @@ msgstr ""
"Die Datei teenagent.dat ist gepackt und zlib zum Entpacken wurde in dieser "
"ausfќhrbaren Datei nicht miteingebunden. Bitte entpacken Sie die Datei."
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "MPEG-2-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstќtzung "
@@ -3311,12 +3386,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standard (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Alternativer Vorspann"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Verwendet einen alternativen Vorspann (nur bei CD-Version)."
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "MPEG2-Zwischensequenzen werden nicht mehr unterstќtzt."
diff --git a/po/es_ES.po b/po/es_ES.po
index 4ed7cbf64a..479747bb20 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-06 20:39+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -87,7 +87,7 @@ msgstr "Mostrar el teclado"
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Activar/Desactivar pantalla completa"
@@ -107,13 +107,15 @@ msgstr "Asignar"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "Aceptar"
@@ -355,7 +357,7 @@ msgstr "Selecciona el directorio del juego"
msgid "Select additional game directory"
msgstr "Selecciona el directorio adicional"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Selecciona el directorio para partidas guardadas"
@@ -452,7 +454,7 @@ msgstr "Buscar:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Cargar juego:"
@@ -461,7 +463,7 @@ msgstr "Cargar juego:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Cargar"
@@ -479,6 +481,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Sэ"
@@ -488,6 +491,7 @@ msgstr "Sэ"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "No"
@@ -915,10 +919,6 @@ msgstr "Idioma de la interfaz de ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Tienes que reiniciar ScummVM para aplicar los cambios."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Selecciona el directorio de guardado"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -1030,7 +1030,7 @@ msgstr "Grсf. desactivados"
msgid "Standard Renderer"
msgstr "Estсndar"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estсndar"
@@ -1277,8 +1277,9 @@ msgstr "~V~olver al lanzador"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Guardar partida"
@@ -1288,9 +1289,10 @@ msgstr "Guardar partida"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Guardar"
@@ -1315,12 +1317,12 @@ msgstr ""
"obtener mсs ayuda."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~S~э"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -2086,29 +2088,31 @@ msgstr "Clic desactivado"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Usar pantallas de guardar/cargar originales"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utilizar las pantallas de guardar/cargar originales, en vez de las de ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Cargar partida:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Cargar"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2119,7 +2123,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2130,7 +2134,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2146,6 +2150,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "No se ha encontrado el vэdeo '%s'"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Modo clic"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2173,11 +2186,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Utilizar los niveles de brillo originales del juego"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Fallo al cargar el estado del juego desde el archivo."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Fallo al guardar el estado del juego en el archivo."
@@ -2197,6 +2211,14 @@ msgstr "Reproducir vэdeos a mayor velocidad"
msgid "Failed to save game"
msgstr "Fallo al guardar la partida"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2317,6 +2339,35 @@ msgstr ""
"a los de General MIDI, pero es posible que algunas\n"
"de las pistas no suenen correctamente."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2446,6 +2497,15 @@ msgstr "Mostrar/Ocultar pantalla de informaciѓn"
msgid "Display/Hide Pause Menu"
msgstr "Mostrar/Ocultar menњ de pausa"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Introducciѓn alternativa"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr ""
+"Usa una introducciѓn alternativa para el juego (solo para la versiѓn CD)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Difuminado EGA"
@@ -2585,36 +2645,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "Si~g~uiente"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Solo voces"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voces y subtэtulos"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Solo subtэtulos"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voces y sub."
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Selecciona un nivel de dificultad."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consulta el manual para obtener mсs informaciѓn."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Prсctica"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Experto"
@@ -2672,10 +2732,6 @@ msgstr "Guardar partida 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Activar/Desactivar pantalla completa"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Subir / Bajar el volumen de la mњsica"
@@ -3131,7 +3187,7 @@ msgstr "Volar a la derecha"
msgid "Fly to lower right"
msgstr "Volar abajo y a la derecha"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3140,7 +3196,7 @@ msgstr ""
"El soporte MIDI nativo requiere la actualizaciѓn Roland de LucasArts,\n"
"pero %s no estс disponible. Se usarс AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3150,6 +3206,18 @@ msgstr ""
"permite. Para jugar, ve a 'Aёadir juego' en el menњ de inicio de ScummVM y "
"selecciona el directorio 'Maniac', dentro del directorio de DOTT."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3267,6 +3335,14 @@ msgstr ""
"El archivo teenagent.dat estс comprimido y este ejecutable no incluye zlib. "
"Por favor, descomprэmelo"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "Se han encontrado vэdeos MPEG-2, pero se ha compilado ScummVM sin MPEG-2"
@@ -3286,13 +3362,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Estсndar (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Introducciѓn alternativa"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr ""
-#~ "Usa una introducciѓn alternativa para el juego (solo para la versiѓn CD)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Los vэdeos MPEG2 ya no son compatibles"
diff --git a/po/eu.po b/po/eu.po
index 80e8f29e16..7babff50b6 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2011-12-15 14:53+0100\n"
"Last-Translator: Mikel Iturbe Urretxa <mikel@hamahiru.org>\n"
"Language-Team: Librezale <librezale@librezale.org>\n"
@@ -87,7 +87,7 @@ msgstr "Teklatua erakutsi"
msgid "Remap keys"
msgstr "Teklak esleitu"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Txandakatu pantaila osoa"
@@ -107,13 +107,15 @@ msgstr "Esleitu"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "Ados"
@@ -355,7 +357,7 @@ msgstr "Jokoaren direktorioa aukeratu"
msgid "Select additional game directory"
msgstr "Direktorio gehigarria aukeratu"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Partida gordeen direktorioa aukeratu"
@@ -452,7 +454,7 @@ msgstr "Bilatu:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Jokoa kargatu:"
@@ -461,7 +463,7 @@ msgstr "Jokoa kargatu:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Kargatu"
@@ -479,6 +481,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Bai"
@@ -488,6 +491,7 @@ msgstr "Bai"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Ez"
@@ -916,10 +920,6 @@ msgstr "ScummVM interfazearen hizkuntza"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "ScummVM berrabiarazi behar duzu aldaketak indarrean jartzeko"
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Gordetako partiden direktorioa aukeratu"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Aukeraturiko direktorioan ezin da idatzi. Mesedez, aukeratu beste bat."
@@ -1034,7 +1034,7 @@ msgstr "GFX desgaituta"
msgid "Standard Renderer"
msgstr "Estandarra (16bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estandarra"
@@ -1285,8 +1285,9 @@ msgstr "It~z~uli abiarazlera"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Gorde jokoa:"
@@ -1296,9 +1297,10 @@ msgstr "Gorde jokoa:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Gorde"
@@ -1321,12 +1323,12 @@ msgstr ""
"informaziorako eta laguntza gehiago nola jaso jakiteko."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~A~dos"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~U~tzi"
@@ -2093,28 +2095,30 @@ msgstr "Klikatzea desgaituta"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr ""
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Jokoa kargatu:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Kargatu"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2125,7 +2129,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2136,7 +2140,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2152,6 +2156,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "'%s' bideo fitxategia ez da aurkitu!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klikatzeko modua"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
#, fuzzy
msgid ""
@@ -2181,11 +2194,12 @@ msgid "Display graphics using the game's bright palette"
msgstr ""
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Ezin izan da fitxategitik jokoa kargatu."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Ezin izan da jokoa fitxategira gorde."
@@ -2206,6 +2220,14 @@ msgstr ""
msgid "Failed to save game"
msgstr "Ezin izan da jokoa gorde"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2329,6 +2351,35 @@ msgstr ""
"General MIDIkoetara egokitzen saiatuko gara,\n"
"baina posible da pista batzuk egoki ez entzutea."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2458,6 +2509,14 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr ""
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr ""
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA lausotzea"
@@ -2596,36 +2655,36 @@ msgstr "~A~urrekoa"
msgid "~N~ext"
msgstr "~H~urrengoa"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Ahotsak bakarrik"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Ahotsak eta azpitituluak"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Azpitituluak bakarrik"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Ahotsak & azpit."
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Zailtasuna aukeratu."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Loom(TM)-ko eskuliburura jo ezazu laguntza lortzeko."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Entrenamendua"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Aditua"
@@ -2683,10 +2742,6 @@ msgstr "1-10 partida gorde"
msgid "Enter"
msgstr "Sartu"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Pantaila osoa jarri / kendu"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikaren bolumena gora / behera"
@@ -3142,7 +3197,7 @@ msgstr "Eskuinera hegan egin"
msgid "Fly to lower right"
msgstr "Behera eta eskuinera hegan egin"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3151,7 +3206,7 @@ msgstr ""
"MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n"
"baina %s ez dago eskuragarri. AdLib erabiliko da."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3161,6 +3216,18 @@ msgstr ""
"baimentzen oraindik. Jolasteko , joan 'Jokoa gehitu' hasierako menura eta "
"aukeratu 'Maniac' direktorioa Tentacle-ren joko-direktorioaren barruan."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3272,6 +3339,14 @@ msgid ""
"executable. Please decompress it"
msgstr ""
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#, fuzzy
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
diff --git a/po/fi_FI.po b/po/fi_FI.po
index fa9bc28c38..1958be3139 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2012-12-01 19:37+0200\n"
"Last-Translator: Toni Saarela <saarela@gmail.com>\n"
"Language-Team: Finnish\n"
@@ -88,7 +88,7 @@ msgstr "Nфytф nфppфimistі"
msgid "Remap keys"
msgstr "Mффritф nфppфimet uudelleen"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Kokoruututilan vaihto"
@@ -108,13 +108,15 @@ msgstr "Nфppфinkartta"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "Tallenna"
@@ -356,7 +358,7 @@ msgstr "Valitse pelin kansio"
msgid "Select additional game directory"
msgstr "Valitse lisфkansio pelille"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Valitse kansio pelitallennuksille"
@@ -453,7 +455,7 @@ msgstr "Etsi:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Lataa peli:"
@@ -462,7 +464,7 @@ msgstr "Lataa peli:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Lataa"
@@ -480,6 +482,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Kyllф"
@@ -489,6 +492,7 @@ msgstr "Kyllф"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Ei"
@@ -917,10 +921,6 @@ msgstr "ScummVM kфyttіliittymфn kieli"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "ScummVM pitфф kфynnistфф uudelleen jotta muutokset tulevat voimaan."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Valitse hakemisto pelitallennuksille."
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Valittuun hakemistoon ei voi kirjoittaa. Valitse toinen hakemisto."
@@ -1032,7 +1032,7 @@ msgstr "Disabloitu GFX"
msgid "Standard Renderer"
msgstr "Standardirenderіijф (16 bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standardi"
@@ -1285,8 +1285,9 @@ msgstr "Palaa p~e~livalitsimeen"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Tallenna peli:"
@@ -1296,9 +1297,10 @@ msgstr "Tallenna peli:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Tallenna"
@@ -1321,12 +1323,12 @@ msgstr ""
"lisфtietoa."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~H~yvфksy"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~P~eruuta"
@@ -2094,28 +2096,30 @@ msgstr "Klikkaus pois pффltф"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Kфytф alkuperфisiф tallenna/lataa valikkoja, ScummVM valikoiden sijaan"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Lataa pelitallenne:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Lataa tallenne"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2126,7 +2130,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2137,7 +2141,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2153,6 +2157,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Videotiedostoa '%s' ei lіytynyt!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klikkaus moodi"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
#, fuzzy
msgid ""
@@ -2179,11 +2192,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Nфytф grafiikat kфyttфen pelin kirkasta palettia"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Pelitallenteen lataaminen tiedostosta epфonnistui."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Pelin tallentaminen tiedostoon epфonnistui."
@@ -2204,6 +2218,14 @@ msgstr ""
msgid "Failed to save game"
msgstr "Pelin tallentaminen epфonnistui."
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2322,6 +2344,35 @@ msgstr ""
"tukee vain Roland MT-32:sta. Jotkut ффniraidat\n"
"eivфt ehkф kuulosta siltф miltф niiden pitфisi."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2449,6 +2500,14 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Vaihtoehtoinen intro"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Kфytф vaihtoehtoista pelin introa (vain CD versiossa)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA unditterіinti"
@@ -2587,36 +2646,36 @@ msgstr "E~d~ellinen"
msgid "~N~ext"
msgstr "Se~u~raava"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Vain puhe"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Puhe ja Tekstitys"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Vain tekstitys"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Puhe & teksti"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Valitse taitotasosi."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Lue Loom(TM) ohjekirjaa saadaksesi ohjeita."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Harjoitus"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspertti"
@@ -2674,10 +2733,6 @@ msgstr "Tallenna pelitila 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Kytke kokoruututila pффlle tai pois"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musiikin ффnenvoimakkuus ylіs / alas"
@@ -3133,7 +3188,7 @@ msgstr "Lennф oikealle"
msgid "Fly to lower right"
msgstr "Lennф alas oikealle"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3142,7 +3197,7 @@ msgstr ""
"Suora MIDI tuki vaatii Roland pфivityksen LucasArtsilta, mutta\n"
"%s puuttuu. Kфytetффn AdLibia sen sijaan."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3152,6 +3207,18 @@ msgstr ""
"Pelataksesi Maniac Mansionia, mene ScummVM:n pффvalikkoon ja paina 'Lisфф "
"peli'. Valitse 'Maniac' hakemisto Tentacle hakemiston sisфltф."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3263,6 +3330,14 @@ msgstr ""
"Tiedosto teenagent.dat on pakattu, mutta zlib-kirjastoa ei ole kффnnetty "
"ScummVM:ффn. Pura teenagent.dat."
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#, fuzzy
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr "PSX videoita lіydetty, mutta ScummVM on kффnnetty ilman RGB tukea"
@@ -3281,12 +3356,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standardi (16 bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Vaihtoehtoinen intro"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Kфytф vaihtoehtoista pelin introa (vain CD versiossa)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "MPEG2 videotiedostoja ei enфф tueta"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index b5f3172fff..6e47183fe3 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-05 13:49-0000\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
"Language-Team: French <scummvm-devel@lists.sf.net>\n"
@@ -88,7 +88,7 @@ msgstr "Afficher le clavier"
msgid "Remap keys"
msgstr "Changer l'affectation des touches"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Basculer en plein щcran"
@@ -108,13 +108,15 @@ msgstr "Affecter"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -356,7 +358,7 @@ msgstr "Sщlectionner le rщpertoire contenant les donnщes du jeu"
msgid "Select additional game directory"
msgstr "Sщlectionner un rщpertoire supplщmentaire"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Sщlectionner le rщpertoire pour les sauvegardes"
@@ -454,7 +456,7 @@ msgstr "Filtre:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Charger le jeu:"
@@ -463,7 +465,7 @@ msgstr "Charger le jeu:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Charger"
@@ -481,6 +483,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Oui"
@@ -490,6 +493,7 @@ msgstr "Oui"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Non"
@@ -920,10 +924,6 @@ msgid "You have to restart ScummVM before your changes will take effect."
msgstr ""
"Vous devez relancer ScummVM pour que le changement soit pris en compte."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Sщlectionner le rщpertoire pour les sauvegardes"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -1036,7 +1036,7 @@ msgstr "GFX dщsactivщ"
msgid "Standard Renderer"
msgstr "Rendu Standard"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Normal"
@@ -1284,8 +1284,9 @@ msgstr "Retour au ~L~anceur"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Sauvegarde:"
@@ -1295,9 +1296,10 @@ msgstr "Sauvegarde:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Sauver"
@@ -1321,12 +1323,12 @@ msgstr ""
"de base et les instructions pour obtenir de l'aide supplщmentaire."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~A~nnuler"
@@ -2092,30 +2094,32 @@ msgstr "Clic Dщsactivщ"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Dialogues sauvegarde/chargement d'origine"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Utiliser les dialogues sauvegarde/chargement d'origine plutєt que ceux de "
"ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Charger le jeu:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Charger"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2126,7 +2130,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2137,7 +2141,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2153,6 +2157,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Fichier de sщquence '%s' non trouvщ!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Mode Clic"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2180,11 +2193,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Utiliser la palette lumineuse du jeu pour l'affichage"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Щchec du chargement de l'щtat du jeu depuis le disque."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Щchec de l'enregistrement de l'щtat du jeu sur le disque."
@@ -2204,6 +2218,14 @@ msgstr "Joue les vidщos plus rapidement"
msgid "Failed to save game"
msgstr "Щchec de la sauvegarde."
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2324,6 +2346,35 @@ msgstr ""
"MIDI. Cependant il est possible que quelques pistes ne soient\n"
" pas jouщes correctement."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2453,6 +2504,14 @@ msgstr "Montrer/Cacher l'Щcran d'Info"
msgid "Display/Hide Pause Menu"
msgstr "Montrer/Cacher le Menu de Pause"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Intro alternative"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Utiliser une intro alternative (version CD uniquement)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Dщtramage EGA"
@@ -2594,36 +2653,36 @@ msgstr "~P~rщcщdent"
msgid "~N~ext"
msgstr "~S~uivant"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Voix"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voix et Sous-titres"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Sous-titres"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voix & ST"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Sщlectionnez un niveau de compщtence."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Reportez-vous р votre manuel d'instruction."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Essai"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2681,10 +2740,6 @@ msgstr "Щcrire sauvegarde 1-10:"
msgid "Enter"
msgstr "Entrer"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Basculer en plein щcran"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Augmenter / Diminuer volume musique"
@@ -3140,7 +3195,7 @@ msgstr "Voler vers la droite"
msgid "Fly to lower right"
msgstr "Voler vers la bas р droite"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3149,7 +3204,7 @@ msgstr ""
"Support MIDI natif requiшre la mise р jour Roland de LucasArt,\n"
"mais %s manque. Utilise AdLib р la place."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3160,6 +3215,18 @@ msgstr ""
"choisissez 'Ajouter...' dans le Lanceur de ScummVM et sщlectionnez le "
"rщpertoire 'Maniac Mansion' dans le rщpertoire du jeu Day Of The Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3277,6 +3344,14 @@ msgstr ""
"Le fichier teenagent.dat est compressщ et cet exщcutable n'inclus pas zlib. "
"Veuillez le dщcompresser."
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "Scшnes cinщmatiques MPEG-2 dщtectщes mais ScummVM a щtщ compilщ sans le "
@@ -3296,12 +3371,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standard (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Intro alternative"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Utiliser une intro alternative (version CD uniquement)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Les sщquences MPEG2 ne sont plus supportщes"
diff --git a/po/gl_ES.po b/po/gl_ES.po
index aeaf6fce7e..cc8569d2f1 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-02 09:51+0100\n"
"Last-Translator: Santiago G. Sanz <s.sanz@uvigo.es>\n"
"Language-Team: Santiago G. Sanz <s.sanz@uvigo.es>\n"
@@ -87,7 +87,7 @@ msgstr "Mostrar teclado"
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Activar/desactivar pantalla completa"
@@ -107,13 +107,15 @@ msgstr "Asignar"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "Aceptar"
@@ -353,7 +355,7 @@ msgstr "Selecciona un directorio con datos de xogo"
msgid "Select additional game directory"
msgstr "Selecciona un directorio con datos adicionais"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Selecciona un directorio para ficheiros de gardado"
@@ -450,7 +452,7 @@ msgstr "Buscar:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Cargar partida:"
@@ -459,7 +461,7 @@ msgstr "Cargar partida:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Cargar"
@@ -477,6 +479,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Si"
@@ -486,6 +489,7 @@ msgstr "Si"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Non"
@@ -909,10 +913,6 @@ msgstr "Idioma da interfaz de ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Debes reiniciar ScummVM para que os cambios teёan efecto."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Seleccionar directorio para ficheiros de gardado"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Non щ posible escribir no directorio elixido. Selecciona outro."
@@ -1023,7 +1023,7 @@ msgstr "Efectos desactivados"
msgid "Standard Renderer"
msgstr "Procesamento estсndar"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Estсndar"
@@ -1271,8 +1271,9 @@ msgstr "~V~olver ao Iniciador"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Gardar partida:"
@@ -1282,9 +1283,10 @@ msgstr "Gardar partida:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Gardar"
@@ -1308,12 +1310,12 @@ msgstr ""
"bсsica e mсis instruciѓns para acadar asistencia adicional."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~A~ceptar"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -2077,29 +2079,31 @@ msgstr "Premer desactivado"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Empregar pantallas orixinais de gardado e carga"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Empregar as pantallas orixinais de gardado e carga, no canto das de ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Restaurar xogo:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Restaurar"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2110,7 +2114,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2121,7 +2125,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2137,6 +2141,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Non se atopou o ficheiro de secuencia %s!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Modo rato"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2164,11 +2177,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Mostrar os grсficos coa paletta intensa do xogo"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Erro ao cargar a partida do ficheiro."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Erro ao gardar a partida no ficheiro."
@@ -2188,6 +2202,14 @@ msgstr "Reproducir vэdeos a mсis velocidade"
msgid "Failed to save game"
msgstr "Erro ao gardar a partida"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2308,6 +2330,35 @@ msgstr ""
"aos de General MIDI. No entanto, existe a posibilidade\n"
"de que algunhas pistas non soen correctamente."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2436,6 +2487,14 @@ msgstr "Mostrar/Ocultar pantalla de informaciѓn"
msgid "Display/Hide Pause Menu"
msgstr "Mostrar/Ocultar menњ de pausa"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Intro alternativa"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Empregar unha introduciѓn alternativa para o xogo (sѓ versiѓn en CD)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Non interpolaciѓn EGA"
@@ -2577,36 +2636,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "~S~eguinte"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Sѓ voz"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voz e subtэtulos"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Sѓ subtэtulos"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voz e subs"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Selecciona un nivel de habilidade."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consulta o manual de Loom(TM) para obter axuda."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Prсctica"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Experto"
@@ -2664,10 +2723,6 @@ msgstr "Gardar partida 1-10"
msgid "Enter"
msgstr "INTRO"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Activar/desactivar pantalla completa"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Subir/baixar volume de mњsica"
@@ -3123,7 +3178,7 @@ msgstr "Voar с dereita"
msgid "Fly to lower right"
msgstr "Voar с dereita abaixo"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3132,7 +3187,7 @@ msgstr ""
"A compatibilidade nativa con MIDI precisa a actualizaciѓn de Roland\n"
"de LucasArts, mais falla %s. Empregarase AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3142,6 +3197,18 @@ msgstr ""
"facelo. Para xogar, vai a Engadir xogo no menњ de inicio de ScummVM e "
"selecciona o directorio Maniac que estс dentro do directorio Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3257,6 +3324,14 @@ msgstr ""
"O ficheiro teenagent.dat estс comprimido e zlib non foi incluэdo neste "
"executable. Descomprime o ficheiro"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr "Atopсronse secuencias MPEG-2, mais ScummVM foi compilado sen MPEG-2"
@@ -3274,13 +3349,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Estсndar (16 bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Intro alternativa"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr ""
-#~ "Empregar unha introduciѓn alternativa para o xogo (sѓ versiѓn en CD)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Xa non hai compatibilidade coas secuencias en MPEG2"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 018fce0f5a..ef3507be98 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-02-18 06:30+0100\n"
"Last-Translator: George Kormendi <grubycza@hotmail.com>\n"
"Language-Team: Hungarian\n"
@@ -89,7 +89,7 @@ msgstr "Billentyћzet beсllэtсsok"
msgid "Remap keys"
msgstr "Billentyћk сtсllэtсsa"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Teljeskщpernyѕ kapcsolѓ"
@@ -109,13 +109,15 @@ msgstr "Kiosztсs"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -355,7 +357,7 @@ msgstr "Jсtщkok helyщnek kivсlasztсsa"
msgid "Select additional game directory"
msgstr "Vсlassz mappсt a jсtщk kiegщszэtѕkhіz"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vсlaszz jсtщkmentщseknek mappсt"
@@ -452,7 +454,7 @@ msgstr "Keresщs:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Jсtщk betіltщse:"
@@ -461,7 +463,7 @@ msgstr "Jсtщk betіltщse:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Betіltщs"
@@ -479,6 +481,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Igen"
@@ -488,6 +491,7 @@ msgstr "Igen"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nem"
@@ -908,10 +912,6 @@ msgstr "A ScummVM GUI nyelve"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Indэtsd њjra a ScummVM-et a vсltozсsok щrvщnyesэtщsщhez."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Vсlassz jсtщkmentщs mappсt"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "A kivсlasztott mappсba nem lehet эrni, vсlassz egy mсsikat"
@@ -1022,7 +1022,7 @@ msgstr "GFX letiltva"
msgid "Standard Renderer"
msgstr "Standard lekщpezѕ"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Сtlagos"
@@ -1268,8 +1268,9 @@ msgstr "Visszatщrщs az indэtѓba"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Jсtщk mentщse:"
@@ -1279,9 +1280,10 @@ msgstr "Jсtщk mentщse:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Mentщs"
@@ -1304,12 +1306,12 @@ msgstr ""
"informсciѓkrѓl, щs hogy hogyan segэthetsz a kщsѕbbiekben."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "Mщgse"
@@ -2069,28 +2071,30 @@ msgstr "Kattintсs tiltva"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Eredeti ment/tіlt kщpernyѕk hasznсlata"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Az eredeti mentщs/betіltщs kщpernyѕ hasznсlata a ScummVM kщpek helyett"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Jсtщkmenet visszaсllэtсsa:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Visszaсllэtсs"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2101,7 +2105,7 @@ msgstr ""
"\n"
"%s fсjlbѓl nem sikerќlt"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2112,7 +2116,7 @@ msgstr ""
"\n"
"%s fсjlba nem sikerќlt"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2128,6 +2132,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "'%s' сtvezetѕ fсjl nem talсlhatѓ"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Kattintсs Mѓd"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2154,11 +2167,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Grafikus megjelenэtщsre hasznсlja a jсtщk fщnyes palettсjсt"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Jсtщkсllсs betіltщse fсjlbѓl nem sikerќlt."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Jсtщkсllсs mentщse fсjlba nem sikerќlt."
@@ -2178,6 +2192,14 @@ msgstr "Filmek lejсtszсsa nagyobb sebessщggel"
msgid "Failed to save game"
msgstr "Jсtщk mentщs nem sikerќlt"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2298,6 +2320,35 @@ msgstr ""
"General MIDIre. Tovсbbra is lehetsщges hogy\n"
"nщhсny hangsсv helytelenќl hangzik."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2426,6 +2477,14 @@ msgstr "Infѓkщpernyѕ Kщpre/Elrejt"
msgid "Display/Hide Pause Menu"
msgstr "Szќnet menќ Kщpre/Elrejt"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Alternatэv intro"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Alternatэv jсtщkintro hasznсlata (csak CD verziѓnсl)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA szinjavэtсs"
@@ -2563,36 +2622,36 @@ msgstr "Elѕzѕ"
msgid "~N~ext"
msgstr "Kіvetkezѕ"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Csak beszщd"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Beszщd щs felirat"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Csak felirat"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Beszщd & Felir"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vсlassz hozzсщrtщs szintet."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Segэtsщgщrt nщzd meg a Loom(TM) kщzikіnyvedet."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Gyakorlсs"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Szakщrtѕ"
@@ -2650,10 +2709,6 @@ msgstr "1-10 Jсtщkсllсs mentщse"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Teljeskщpernyѕ kapcsolѓ"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Zene hangerѕ fel / le"
@@ -3109,7 +3164,7 @@ msgstr "Jobbra repќlщs"
msgid "Fly to lower right"
msgstr "Jobbra le repќlщs"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3118,7 +3173,7 @@ msgstr ""
"Native MIDI tсmogatсshoz kell a Roland Upgrade a LucasArts-tѓl,\n"
"a %s hiсnyzik. AdLib-ot hasznсlok helyette."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3128,6 +3183,18 @@ msgstr ""
"jсtszani akarsz vele menj a ScummVM fѕmenќben a 'Jсtщk hozzсadсs' ra щs "
"vсlaszd a 'Maniac' mappсt a 'Tentacle' kіnyvtсrсban."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3240,6 +3307,14 @@ msgstr ""
"A teenagent.dat fсjl tіmіrэtett щs a zlib nem rщsze ennek a futtathatѓ "
"сllomсnynak. Kщrlek tіmіrэtsd ki"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "MPEG-2 сtvezetѕfilmet talсltam, de a ScummVM MPEG-2 nщlkќl van lefordэtva"
@@ -3258,12 +3333,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standard (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Alternatэv intro"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Alternatэv jсtщkintro hasznсlata (csak CD verziѓnсl)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "MPEG2 сtvezetѕk mсr nem tсmogatottak"
diff --git a/po/it_IT.po b/po/it_IT.po
index dae16d76a1..a0192b29bb 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-03 17:59-0600\n"
"Last-Translator: Matteo 'Maff' Angelino <matteo.maff at gmail dot com>\n"
"Language-Team: Italian\n"
@@ -86,7 +86,7 @@ msgstr "Mostra tastiera"
msgid "Remap keys"
msgstr "Riprogramma tasti"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Attiva / disattiva schermo intero"
@@ -106,13 +106,15 @@ msgstr "Mappa"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -353,7 +355,7 @@ msgstr "Seleziona la cartella contenente i file di gioco"
msgid "Select additional game directory"
msgstr "Seleziona la cartella di gioco aggiuntiva"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Seleziona la cartella dei salvataggi"
@@ -450,7 +452,7 @@ msgstr "Cerca:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Carica gioco:"
@@ -459,7 +461,7 @@ msgstr "Carica gioco:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Carica"
@@ -477,6 +479,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Sь"
@@ -486,6 +489,7 @@ msgstr "Sь"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "No"
@@ -913,10 +917,6 @@ msgstr "Lingua dell'interfaccia grafica di ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Devi riavviare ScummVM affinchщ le modifiche abbiano effetto."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Seleziona la cartella per i salvataggi"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "La cartella scelta ш in sola lettura. Si prega di sceglierne un'altra."
@@ -1027,7 +1027,7 @@ msgstr "Grafica disattivata"
msgid "Standard Renderer"
msgstr "Renderer standard"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Medio"
@@ -1276,8 +1276,9 @@ msgstr "~V~ai a elenco giochi"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Salva gioco:"
@@ -1287,9 +1288,10 @@ msgstr "Salva gioco:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Salva"
@@ -1314,12 +1316,12 @@ msgstr ""
"assistenza."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~A~nnulla"
@@ -2084,30 +2086,32 @@ msgstr "Clic disattivato"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Usa schermate di salvataggio originali"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Usa le schermate originali di salvataggio e caricamento, al posto di quelle "
"di ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Ripristina gioco:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Ripristina"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2118,7 +2122,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2129,7 +2133,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2145,6 +2149,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "File della scena di intermezzo '%s' non trovato!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Modalitр clic"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2172,11 +2185,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Visualizza la grafica con i colori brillanti del gioco"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Impossibile caricare il gioco dal file."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Impossibile salvare il gioco nel file."
@@ -2196,6 +2210,14 @@ msgstr "Aumenta la velocitр di riproduzione dei filmati"
msgid "Failed to save game"
msgstr "Impossibile salvare il gioco"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2316,6 +2338,35 @@ msgstr ""
"Roland MT32 in quelli General MIDI. Alcune tracce\n"
"potrebbero avere un suono non corretto."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2444,6 +2495,14 @@ msgstr "Mostra/nascondi schermana info"
msgid "Display/Hide Pause Menu"
msgstr "Mostra/nascondi menu pausa"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Intro alternativa"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Usa un'intro del gioco alternativa (solo versione CD)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Undithering EGA"
@@ -2584,36 +2643,36 @@ msgstr "~P~recedenti"
msgid "~N~ext"
msgstr "~S~uccessivi"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Solo voci"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voci e testo"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Solo testo"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voci e testo"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Selezionate un livello di difficoltр."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Consultate il manuale delle istruzioni."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Base"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2671,10 +2730,6 @@ msgstr "Salva nella posizione 1-10"
msgid "Enter"
msgstr "Invio"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Attiva / disattiva schermo intero"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Volume musica su / giљ"
@@ -3130,7 +3185,7 @@ msgstr "Vola a destra"
msgid "Fly to lower right"
msgstr "Vola in basso a destra"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3139,7 +3194,7 @@ msgstr ""
"Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n"
"ma %s non ш presente. Verrр usato AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3150,6 +3205,18 @@ msgstr ""
"principale di ScummVM e seleziona la cartella \"Maniac\" all'interno della "
"cartella di Day Of The Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3265,6 +3332,14 @@ msgstr ""
"Il file teenagent.dat ш compresso e zlib non ш stata inclusa in questo "
"eseguibile. Si prega di decomprimerlo"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "Sono state trovare scene di intermezzo MPEG-2 ma ScummVM ш stato "
@@ -3286,12 +3361,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standard (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Intro alternativa"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Usa un'intro del gioco alternativa (solo versione CD)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Le scene di intermezzo MPEG2 non sono piљ supportate"
diff --git a/po/nb_NO.po b/po/nb_NO.po
index eda53cf650..cf211a46a4 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-11 00:02+0100\n"
"Last-Translator: Einar Johan Trјan Sјmхen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
@@ -89,7 +89,7 @@ msgstr "Vis tastatur"
msgid "Remap keys"
msgstr "Omkoble taster"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Veksle fullskjerm"
@@ -109,13 +109,15 @@ msgstr "Koble"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -357,7 +359,7 @@ msgstr "Velg mappe med spilldata"
msgid "Select additional game directory"
msgstr "Velg mappe med ytterligere data"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Velg mappe for lagrede spill"
@@ -454,7 +456,7 @@ msgstr "Sјk:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Хpne spill:"
@@ -463,7 +465,7 @@ msgstr "Хpne spill:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Хpne"
@@ -481,6 +483,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Ja"
@@ -490,6 +493,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nei"
@@ -910,10 +914,6 @@ msgstr "Sprхk i ScummVM-GUIet"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Du mх starte ScummVM pх nytt for at endringene skal tre i kraft. "
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Velg mappe for lagrede spill"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Den valgte mappen kan ikke skrives til. Vennligst velg en annen."
@@ -1024,7 +1024,7 @@ msgstr "Deaktivert GFX"
msgid "Standard Renderer"
msgstr "Standard tegner"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
@@ -1271,8 +1271,9 @@ msgstr "~T~ilbake til oppstarter"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Lagret spill:"
@@ -1282,9 +1283,10 @@ msgstr "Lagret spill:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Lagre"
@@ -1308,12 +1310,12 @@ msgstr ""
"grunnleggende informasjon og instruksjon om hvordan du fхr ytterligere hjelp."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~A~vbryt"
@@ -2078,28 +2080,30 @@ msgstr "Klikking deaktivert"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Bruk originale lagre/laste-skjermer"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Gjennopprett spill:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Gjenopprett"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2110,7 +2114,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2121,7 +2125,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2137,6 +2141,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Fant ikke cutscenefil '%s'!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klikkmodus"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2164,11 +2177,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Vis grafikk med spillets lyse palett"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Klarte ikke хpne spilltilstand fra fil."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Klarte ikke lagre spilltilstand fra fil."
@@ -2188,6 +2202,14 @@ msgstr "Spill filmer med јkt hastighet"
msgid "Failed to save game"
msgstr "Klarte ikke х lagre spill."
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2309,6 +2331,35 @@ msgstr ""
"General MIDI-instrumentene. Allikevel, kan det\n"
"skje at enkelte spor ikke vil spilles riktig."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2437,6 +2488,14 @@ msgstr "Vis/Skjul Infoskjerm"
msgid "Display/Hide Pause Menu"
msgstr "Vis/Skjul Pausemeny"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Alternativ intro"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Bruk en alternativ intro (Kun for CD-versjon)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA av-dithering"
@@ -2575,36 +2634,36 @@ msgstr "~F~orrige"
msgid "~N~ext"
msgstr "~N~este"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Kun tale"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Tale og undertekster"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Kun undertekster"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Tekst & Tale"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Velg ferdighetsnivх"
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Referer til Loom(TM)-hхndboka di for hjelp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Trening"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspert"
@@ -2662,10 +2721,6 @@ msgstr "Lagre spilltilstand 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Veksle fullskjerm"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikkvolum opp/ned"
@@ -3121,7 +3176,7 @@ msgstr "Fly til hјyre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјyre"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3130,7 +3185,7 @@ msgstr ""
"Ekte MIDI-stјtte krever ЋRoland UpgradeЛ fra LucasArts,\n"
"men %s mangler. Bruker AdLib istedet."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3140,6 +3195,18 @@ msgstr ""
"ennх. Sх, for х spille Maniac Mansion, gх til 'Legg til spill' i ScummVM-"
"hovedmenyen og velg 'Maniac'-undermappa i Tentacle-mappa."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3248,6 +3315,14 @@ msgstr ""
"teenagent.dat-fila er komprimert og zlib har ikke blitt inkludert i denne "
"programfilen. Vennligst pakk den ut"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr "MPEG2-cutscener funnet men ScummVM er bygd uten MPEG2-stјtte"
@@ -3265,12 +3340,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standard (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Alternativ intro"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Bruk en alternativ intro (Kun for CD-versjon)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "MPEG2-cutscener stјttes ikke lengre"
diff --git a/po/nl_NL.po b/po/nl_NL.po
new file mode 100644
index 0000000000..43ac274ac5
--- /dev/null
+++ b/po/nl_NL.po
@@ -0,0 +1,3353 @@
+# LANGUAGE translation for ScummVM.
+# Copyright (C) YEAR ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.8.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
+"PO-Revision-Date: 2014-09-03 07:42+0100\n"
+"Last-Translator: Ben Castricum <scummvm@bencastricum.nl>\n"
+"Language-Team: Ben Castricum <scummvm@bencastricum.nl>\n"
+"Language: Nederlands\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.3\n"
+"X-Poedit-SourceCharset: iso-8859-1\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: gui/about.cpp:94
+#, c-format
+msgid "(built on %s)"
+msgstr "(gebouwd op %s)"
+
+#: gui/about.cpp:101
+msgid "Features compiled in:"
+msgstr "Features meegecompileerd:"
+
+#: gui/about.cpp:110
+msgid "Available engines:"
+msgstr "Beschikbare engines:"
+
+#: gui/browser.cpp:68
+msgid "Show hidden files"
+msgstr "Verborgen bestanden weergeven"
+
+#: gui/browser.cpp:68
+msgid "Show files marked with the hidden attribute"
+msgstr "Toon de bestanden die met het verborgen kenmerk hebben."
+
+#: gui/browser.cpp:72
+msgid "Go up"
+msgstr "Ga omhoog"
+
+#: gui/browser.cpp:72 gui/browser.cpp:74
+msgid "Go to previous directory level"
+msgstr "Ga naar bovenliggende map"
+
+#: gui/browser.cpp:74
+msgctxt "lowres"
+msgid "Go up"
+msgstr "Ga omhoog"
+
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/KeysDialog.cpp:43
+#: gui/launcher.cpp:351 gui/massadd.cpp:95 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:216 gui/saveload-dialog.cpp:276
+#: gui/saveload-dialog.cpp:547 gui/saveload-dialog.cpp:922
+#: gui/themebrowser.cpp:55 gui/fluidsynth-dialog.cpp:152
+#: engines/engine.cpp:452 backends/platform/wii/options.cpp:48
+#: backends/events/default/default-events.cpp:196
+#: backends/events/default/default-events.cpp:218
+#: engines/drascula/saveload.cpp:49 engines/parallaction/saveload.cpp:274
+#: engines/scumm/dialogs.cpp:191 engines/sword1/control.cpp:865
+msgid "Cancel"
+msgstr "Annuleren"
+
+#: gui/browser.cpp:76 gui/chooser.cpp:47 gui/themebrowser.cpp:56
+msgid "Choose"
+msgstr "Selecteer"
+
+#: gui/gui-manager.cpp:117 backends/keymapper/remap-dialog.cpp:53
+#: engines/scumm/help.cpp:125 engines/scumm/help.cpp:140
+#: engines/scumm/help.cpp:165 engines/scumm/help.cpp:191
+#: engines/scumm/help.cpp:209
+msgid "Close"
+msgstr "Sluiten"
+
+#: gui/gui-manager.cpp:120
+msgid "Mouse click"
+msgstr "Muisklik"
+
+#: gui/gui-manager.cpp:124 base/main.cpp:319
+msgid "Display keyboard"
+msgstr "Toon toetsenbord"
+
+#: gui/gui-manager.cpp:128 base/main.cpp:323
+msgid "Remap keys"
+msgstr "Toetsen opnieuw koppelen"
+
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
+msgstr "Volledig scherm in-/uitschakelen"
+
+#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
+msgid "Choose an action to map"
+msgstr "Selecteer een actie om te koppelen"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "Koppel"
+
+#: gui/KeysDialog.cpp:42 gui/launcher.cpp:352 gui/launcher.cpp:1048
+#: gui/launcher.cpp:1052 gui/massadd.cpp:92 gui/options.cpp:1240
+#: gui/saveload-dialog.cpp:923 gui/fluidsynth-dialog.cpp:153
+#: engines/engine.cpp:371 engines/engine.cpp:382
+#: backends/platform/wii/options.cpp:47
+#: backends/platform/wince/CELauncherDialog.cpp:54
+#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
+#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
+msgid "OK"
+msgstr "OK"
+
+#: gui/KeysDialog.cpp:49
+msgid "Select an action and click 'Map'"
+msgstr "Selecteer een actie en klik 'Koppel'"
+
+#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
+#, c-format
+msgid "Associated key : %s"
+msgstr "geassocieerde toets : %s"
+
+#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
+#, c-format
+msgid "Associated key : none"
+msgstr "geassocieerde toets : geen"
+
+#: gui/KeysDialog.cpp:90
+msgid "Please select an action"
+msgstr "Selecteer een actie a.u.b."
+
+#: gui/KeysDialog.cpp:106
+msgid "Press the key to associate"
+msgstr "Druk op de te associыren toets"
+
+#: gui/launcher.cpp:193
+msgid "Game"
+msgstr "Spel"
+
+#: gui/launcher.cpp:197
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
+msgid ""
+"Short game identifier used for referring to saved games and running the game "
+"from the command line"
+msgstr ""
+"Korte identifier die gebruikt wordt voor opgeslagen spellen en voor het "
+"starten van een spel vanaf de opdrachtprompt."
+
+#: gui/launcher.cpp:199
+msgctxt "lowres"
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:204
+msgid "Name:"
+msgstr "Naam:"
+
+#: gui/launcher.cpp:204 gui/launcher.cpp:206 gui/launcher.cpp:207
+msgid "Full title of the game"
+msgstr "Volledige titel van het spel"
+
+#: gui/launcher.cpp:206
+msgctxt "lowres"
+msgid "Name:"
+msgstr "Naam:"
+
+#: gui/launcher.cpp:210
+msgid "Language:"
+msgstr "Taal:"
+
+#: gui/launcher.cpp:210 gui/launcher.cpp:211
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"De taal van het spel. Dit verandert een Engels spel niet naar een "
+"Nederlandse."
+
+#: gui/launcher.cpp:212 gui/launcher.cpp:226 gui/options.cpp:87
+#: gui/options.cpp:737 gui/options.cpp:750 gui/options.cpp:1210
+#: audio/null.cpp:41
+msgid "<default>"
+msgstr "<standaard>"
+
+#: gui/launcher.cpp:222
+msgid "Platform:"
+msgstr "Platform:"
+
+#: gui/launcher.cpp:222 gui/launcher.cpp:224 gui/launcher.cpp:225
+msgid "Platform the game was originally designed for"
+msgstr "Het platform waar het spel oorspronkelijk voor ontworpen was."
+
+#: gui/launcher.cpp:224
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "Platform:"
+
+#: gui/launcher.cpp:237
+msgid "Engine"
+msgstr "Engine"
+
+#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090
+msgid "Graphics"
+msgstr "Grafisch"
+
+#: gui/launcher.cpp:245 gui/options.cpp:1073 gui/options.cpp:1090
+msgid "GFX"
+msgstr "GFX"
+
+#: gui/launcher.cpp:248
+msgid "Override global graphic settings"
+msgstr "Negeer algemene grafische instellingen"
+
+#: gui/launcher.cpp:250
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "Negeer algemene grafische instellingen"
+
+#: gui/launcher.cpp:257 gui/options.cpp:1096
+msgid "Audio"
+msgstr "Audio"
+
+#: gui/launcher.cpp:260
+msgid "Override global audio settings"
+msgstr "Negeer algemene audio instellingen"
+
+#: gui/launcher.cpp:262
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "Negeer algemene audio instellingen"
+
+#: gui/launcher.cpp:271 gui/options.cpp:1101
+msgid "Volume"
+msgstr "Volume"
+
+#: gui/launcher.cpp:273 gui/options.cpp:1103
+msgctxt "lowres"
+msgid "Volume"
+msgstr "Volume"
+
+#: gui/launcher.cpp:276
+msgid "Override global volume settings"
+msgstr "Negeer algemene volume instellingen"
+
+#: gui/launcher.cpp:278
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "Negeer algemene volume instellingen"
+
+#: gui/launcher.cpp:286 gui/options.cpp:1111
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/launcher.cpp:289
+msgid "Override global MIDI settings"
+msgstr "Negeer algemene MIDI instellingen"
+
+#: gui/launcher.cpp:291
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "Negeer algemene MIDI instellingen"
+
+#: gui/launcher.cpp:300 gui/options.cpp:1117
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/launcher.cpp:303
+msgid "Override global MT-32 settings"
+msgstr "Negeer algemene MT-32 instellingen"
+
+#: gui/launcher.cpp:305
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "Negeer algemene MT-32 instellingen"
+
+#: gui/launcher.cpp:314 gui/options.cpp:1124
+msgid "Paths"
+msgstr "Paden"
+
+#: gui/launcher.cpp:316 gui/options.cpp:1126
+msgctxt "lowres"
+msgid "Paths"
+msgstr "Paden"
+
+#: gui/launcher.cpp:323
+msgid "Game Path:"
+msgstr "Spel Pad:"
+
+#: gui/launcher.cpp:325
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "Spel Pad:"
+
+#: gui/launcher.cpp:330 gui/options.cpp:1150
+msgid "Extra Path:"
+msgstr "Extra Pad:"
+
+#: gui/launcher.cpp:330 gui/launcher.cpp:332 gui/launcher.cpp:333
+msgid "Specifies path to additional data used by the game"
+msgstr "Specificeer pad naar additionele data voor het spel"
+
+#: gui/launcher.cpp:332 gui/options.cpp:1152
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "Extra Pad:"
+
+#: gui/launcher.cpp:339 gui/options.cpp:1134
+msgid "Save Path:"
+msgstr "Save Pad:"
+
+#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
+#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
+msgid "Specifies where your saved games are put"
+msgstr "Bepaalt waar opgeslagen spellen worden bewaard."
+
+#: gui/launcher.cpp:341 gui/options.cpp:1136
+msgctxt "lowres"
+msgid "Save Path:"
+msgstr "Save Pad:"
+
+#: gui/launcher.cpp:360 gui/launcher.cpp:459 gui/launcher.cpp:517
+#: gui/launcher.cpp:571 gui/options.cpp:1145 gui/options.cpp:1153
+#: gui/options.cpp:1162 gui/options.cpp:1277 gui/options.cpp:1283
+#: gui/options.cpp:1291 gui/options.cpp:1321 gui/options.cpp:1327
+#: gui/options.cpp:1334 gui/options.cpp:1427 gui/options.cpp:1430
+#: gui/options.cpp:1442
+msgctxt "path"
+msgid "None"
+msgstr "Geen"
+
+#: gui/launcher.cpp:365 gui/launcher.cpp:465 gui/launcher.cpp:575
+#: gui/options.cpp:1271 gui/options.cpp:1315 gui/options.cpp:1433
+#: backends/platform/wii/options.cpp:56
+msgid "Default"
+msgstr "Standaard"
+
+#: gui/launcher.cpp:510 gui/options.cpp:1436
+msgid "Select SoundFont"
+msgstr "Selecteer SoundFont"
+
+#: gui/launcher.cpp:529 gui/launcher.cpp:682
+msgid "Select directory with game data"
+msgstr "Selecteer map met speldata"
+
+#: gui/launcher.cpp:547
+msgid "Select additional game directory"
+msgstr "Selecteer additionele speldatamap"
+
+#: gui/launcher.cpp:559 gui/options.cpp:1379
+msgid "Select directory for saved games"
+msgstr "Selecteer map voor opgeslagen spellen"
+
+#: gui/launcher.cpp:586
+msgid "This game ID is already taken. Please choose another one."
+msgstr "Dit spel-ID is al in gebruik. Kies a.u.b. een andere."
+
+#: gui/launcher.cpp:626 engines/dialogs.cpp:111
+msgid "~Q~uit"
+msgstr "~S~toppen"
+
+#: gui/launcher.cpp:626 backends/platform/sdl/macosx/appmenu_osx.mm:95
+msgid "Quit ScummVM"
+msgstr "Hiermee verlaat u ScummVM."
+
+#: gui/launcher.cpp:627
+msgid "A~b~out..."
+msgstr "O~v~er..."
+
+#: gui/launcher.cpp:627 backends/platform/sdl/macosx/appmenu_osx.mm:69
+msgid "About ScummVM"
+msgstr "Geeft informatie over ScummVM."
+
+#: gui/launcher.cpp:628
+msgid "~O~ptions..."
+msgstr "~O~pties..."
+
+#: gui/launcher.cpp:628
+msgid "Change global ScummVM options"
+msgstr "Algemene ScummVM opties"
+
+#: gui/launcher.cpp:630
+msgid "~S~tart"
+msgstr "~S~tarten"
+
+#: gui/launcher.cpp:630
+msgid "Start selected game"
+msgstr "Start het geselecteerde spel."
+
+#: gui/launcher.cpp:633
+msgid "~L~oad..."
+msgstr "~L~aad Spel..."
+
+#: gui/launcher.cpp:633
+msgid "Load saved game for selected game"
+msgstr "Laad een eerder opgeslagen spel voor het geselecteerde spel."
+
+#: gui/launcher.cpp:638
+msgid "~A~dd Game..."
+msgstr "Spel ~T~oevoegen"
+
+#: gui/launcher.cpp:638 gui/launcher.cpp:645
+msgid "Hold Shift for Mass Add"
+msgstr ""
+"Houd Shift ingedrukt voor het toevoegen van grote hoeveelheden spellen."
+
+#: gui/launcher.cpp:640
+msgid "~E~dit Game..."
+msgstr "Spel ~B~ewerken"
+
+#: gui/launcher.cpp:640 gui/launcher.cpp:647
+msgid "Change game options"
+msgstr "Verander spel opties"
+
+#: gui/launcher.cpp:642
+msgid "~R~emove Game"
+msgstr "Spel ~V~erwijderen"
+
+#: gui/launcher.cpp:642 gui/launcher.cpp:649
+msgid "Remove game from the list. The game data files stay intact"
+msgstr ""
+"Verwijder dit spel uit de lijst. De spel data bestanden blijven intact."
+
+#: gui/launcher.cpp:645
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "~T~oevoegen..."
+
+#: gui/launcher.cpp:647
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "~B~ewerken..."
+
+#: gui/launcher.cpp:649
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "~V~erwijderen"
+
+#: gui/launcher.cpp:657
+msgid "Search in game list"
+msgstr "Zoek in lijst met spellen"
+
+#: gui/launcher.cpp:661 gui/launcher.cpp:1222
+msgid "Search:"
+msgstr "Zoeken:"
+
+#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
+#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
+msgid "Load game:"
+msgstr "Laad spel:"
+
+#: gui/launcher.cpp:685 engines/dialogs.cpp:115
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
+#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
+msgid "Load"
+msgstr "Laden"
+
+#: gui/launcher.cpp:792
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"Wilt u echt de mass game detector draaien? Dit voegt potentieel een groot "
+"aantal spellen toe."
+
+#: gui/launcher.cpp:793 gui/launcher.cpp:941 gui/launcher.cpp:1000
+#: gui/fluidsynth-dialog.cpp:217
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
+msgid "Yes"
+msgstr "Ja"
+
+#: gui/launcher.cpp:793 gui/launcher.cpp:941 gui/launcher.cpp:1000
+#: gui/fluidsynth-dialog.cpp:217
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
+msgid "No"
+msgstr "Nee"
+
+#: gui/launcher.cpp:841
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "ScummVM kon de opgegeven map niet openen!"
+
+#: gui/launcher.cpp:853
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr "ScummVM kon geen enkel spel vinden in de opgegeven map!"
+
+#: gui/launcher.cpp:867
+msgid "Pick the game:"
+msgstr "Kies het spel:"
+
+#: gui/launcher.cpp:941
+msgid "Do you really want to remove this game configuration?"
+msgstr "Wilt u echt deze spelconfiguratie verwijderen?"
+
+#: gui/launcher.cpp:999
+msgid "Do you want to load saved game?"
+msgstr "Wilt u het opgeslagen spel laden?"
+
+#: gui/launcher.cpp:1048
+msgid "This game does not support loading games from the launcher."
+msgstr "Dit spel ondersteunt het laden van spelen vanaf het startmenu niet."
+
+#: gui/launcher.cpp:1052
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr ""
+"ScummVM heeft geen engine gevonden die in staat was het geselecteerde spel "
+"te spelen!"
+
+#: gui/massadd.cpp:79 gui/massadd.cpp:82
+msgid "... progress ..."
+msgstr "... voortgang ..."
+
+#: gui/massadd.cpp:259
+msgid "Scan complete!"
+msgstr "Klaar met zoeken!"
+
+#: gui/massadd.cpp:262
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr ""
+"%d nieuwe spellen ontdekt, %d spellen die al eerder waren toegevoegd "
+"genegeerd."
+
+#: gui/massadd.cpp:266
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "%d directories doorgezocht..."
+
+#: gui/massadd.cpp:269
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr ""
+"%d nieuwe spellen ontdekt, %d spellen die al eerder waren toegevoegd "
+"genegeerd ..."
+
+#: gui/options.cpp:85
+msgid "Never"
+msgstr "Nooit"
+
+#: gui/options.cpp:85
+msgid "every 5 mins"
+msgstr "elke 5 minuten"
+
+#: gui/options.cpp:85
+msgid "every 10 mins"
+msgstr "elke 10 minuten"
+
+#: gui/options.cpp:85
+msgid "every 15 mins"
+msgstr "elke 15 minuten"
+
+#: gui/options.cpp:85
+msgid "every 30 mins"
+msgstr "elke 30 minuten"
+
+#: gui/options.cpp:87
+msgid "8 kHz"
+msgstr "8 kHz"
+
+#: gui/options.cpp:87
+msgid "11 kHz"
+msgstr "11 kHz"
+
+#: gui/options.cpp:87
+msgid "22 kHz"
+msgstr "22 kHz"
+
+#: gui/options.cpp:87
+msgid "44 kHz"
+msgstr "44 kHz"
+
+#: gui/options.cpp:87
+msgid "48 kHz"
+msgstr "48 kHz"
+
+#: gui/options.cpp:255 gui/options.cpp:481 gui/options.cpp:582
+#: gui/options.cpp:651 gui/options.cpp:859
+msgctxt "soundfont"
+msgid "None"
+msgstr "Geen"
+
+#: gui/options.cpp:389
+msgid "Failed to apply some of the graphic options changes:"
+msgstr ""
+"Het is niet gelukt om enkele veranderingen in grafische opties toe te passen:"
+
+#: gui/options.cpp:401
+msgid "the video mode could not be changed."
+msgstr "de videomodus kon niet veranderd worden."
+
+#: gui/options.cpp:407
+msgid "the fullscreen setting could not be changed"
+msgstr "de volledig-scherminstelling kon niet veranderd worden"
+
+#: gui/options.cpp:413
+msgid "the aspect ratio setting could not be changed"
+msgstr "de pixelverhoudinginstelling kon niet veranderd worden"
+
+#: gui/options.cpp:734
+msgid "Graphics mode:"
+msgstr "Grafische modus:"
+
+#: gui/options.cpp:748
+msgid "Render mode:"
+msgstr "Render modus:"
+
+#: gui/options.cpp:748 gui/options.cpp:749
+msgid "Special dithering modes supported by some games"
+msgstr "Speciale ditheringmodi die door sommige games ondersteund worden."
+
+#: gui/options.cpp:760
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2249
+msgid "Fullscreen mode"
+msgstr "Volledig-scherm modus"
+
+#: gui/options.cpp:763
+msgid "Aspect ratio correction"
+msgstr "Pixelverhoudingcorrectie"
+
+#: gui/options.cpp:763
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "Corrigeer de pixelverhouding voor 320x200 spellen."
+
+#: gui/options.cpp:771
+msgid "Preferred Device:"
+msgstr "Voorkeursapparaat:"
+
+#: gui/options.cpp:771
+msgid "Music Device:"
+msgstr "Muziekapparaat:"
+
+#: gui/options.cpp:771 gui/options.cpp:773
+msgid "Specifies preferred sound device or sound card emulator"
+msgstr "Specificeert het voorkeurs geluidsapparaat of geluidskaartemulator"
+
+#: gui/options.cpp:771 gui/options.cpp:773 gui/options.cpp:774
+msgid "Specifies output sound device or sound card emulator"
+msgstr "Specificeert geluidsapparaat of geluidskaartemulator"
+
+#: gui/options.cpp:773
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr "Voorkeursapparaat:"
+
+#: gui/options.cpp:773
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr "Muziekapparaat:"
+
+#: gui/options.cpp:800
+msgid "AdLib emulator:"
+msgstr "AdLib emulator:"
+
+#: gui/options.cpp:800 gui/options.cpp:801
+msgid "AdLib is used for music in many games"
+msgstr "AdLib word in vele spelen voor muziek gebruikt"
+
+#: gui/options.cpp:811
+msgid "Output rate:"
+msgstr "Output snelheid:"
+
+#: gui/options.cpp:811 gui/options.cpp:812
+msgid ""
+"Higher value specifies better sound quality but may be not supported by your "
+"soundcard"
+msgstr ""
+"Hogere waarden geven betere geluidskwaliteit maar worden mogelijk niet "
+"ondersteund door uw geluidskaart."
+
+#: gui/options.cpp:822
+msgid "GM Device:"
+msgstr "GM Apparaat:"
+
+#: gui/options.cpp:822
+msgid "Specifies default sound device for General MIDI output"
+msgstr "Specificeert het standaard geluidsapparaat voor General MIDI"
+
+#: gui/options.cpp:833
+msgid "Don't use General MIDI music"
+msgstr "Geen General MIDI muziek gebruiken"
+
+#: gui/options.cpp:844 gui/options.cpp:910
+msgid "Use first available device"
+msgstr "Gebruik eerst beschikbare apparaat"
+
+#: gui/options.cpp:856
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:856 gui/options.cpp:858 gui/options.cpp:859
+msgid "SoundFont is supported by some audio cards, FluidSynth and Timidity"
+msgstr ""
+"SoundFont wordt ondersteund door FluidSynth en Timidity en sommige "
+"geluidskaarten."
+
+#: gui/options.cpp:858
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:864
+msgid "Mixed AdLib/MIDI mode"
+msgstr "Gemengde AdLib/MIDI modus"
+
+#: gui/options.cpp:864
+msgid "Use both MIDI and AdLib sound generation"
+msgstr "Gebruik zowel MIDI als AdLib geluid"
+
+#: gui/options.cpp:867
+msgid "MIDI gain:"
+msgstr "MIDI gain:"
+
+#: gui/options.cpp:874
+msgid "FluidSynth Settings"
+msgstr "FluidSynth Instellingen"
+
+#: gui/options.cpp:881
+msgid "MT-32 Device:"
+msgstr "MT-32 Apparaat:"
+
+#: gui/options.cpp:881
+msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
+msgstr ""
+"Specificeert het standaard geluidsapparaat voor Roland MT-32/LAPC1/CM32l/CM64"
+
+#: gui/options.cpp:886
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr "Waarheidsgetrouwe Roland MT-32 (GM emulatie uitschakelen)"
+
+#: gui/options.cpp:886 gui/options.cpp:888
+msgid ""
+"Check if you want to use your real hardware Roland-compatible sound device "
+"connected to your computer"
+msgstr ""
+"Selecteer als u een hardware Roland-compatible geluidsapparaat gekoppeld aan "
+"uw computer wilt gebruiken"
+
+#: gui/options.cpp:888
+msgctxt "lowres"
+msgid "True Roland MT-32 (no GM emulation)"
+msgstr "Echte Roland MT-32 (geen GM emulatie)"
+
+#: gui/options.cpp:891
+msgid "Roland GS Device (enable MT-32 mappings)"
+msgstr "Roland GS Device (met MT-32 mappings)"
+
+#: gui/options.cpp:891
+msgid ""
+"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
+"GS device"
+msgstr ""
+"Selecteer dit als u patchmappings wilt om een MT-32 op een Roland GS "
+"apparaat te emuleren."
+
+#: gui/options.cpp:900
+msgid "Don't use Roland MT-32 music"
+msgstr "Geen Roland MT-32 muziek gebruiken"
+
+#: gui/options.cpp:927
+msgid "Text and Speech:"
+msgstr "Spraak en/of ondertitels:"
+
+#: gui/options.cpp:931 gui/options.cpp:941
+msgid "Speech"
+msgstr "Spraak"
+
+#: gui/options.cpp:932 gui/options.cpp:942
+msgid "Subtitles"
+msgstr "Ondertitels"
+
+#: gui/options.cpp:933
+msgid "Both"
+msgstr "Beide"
+
+#: gui/options.cpp:935
+msgid "Subtitle speed:"
+msgstr "Snelheid ondertitels:"
+
+#: gui/options.cpp:937
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr "Spraak en/of text:"
+
+#: gui/options.cpp:941
+msgid "Spch"
+msgstr "Sprk"
+
+#: gui/options.cpp:942
+msgid "Subs"
+msgstr "Text"
+
+#: gui/options.cpp:943
+msgctxt "lowres"
+msgid "Both"
+msgstr "Beide"
+
+#: gui/options.cpp:943
+msgid "Show subtitles and play speech"
+msgstr "Toon ondertitels en speel spraak af"
+
+#: gui/options.cpp:945
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr "Snelheid text:"
+
+#: gui/options.cpp:961
+msgid "Music volume:"
+msgstr "Muziek volume:"
+
+#: gui/options.cpp:963
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr "Muziek volume:"
+
+#: gui/options.cpp:970
+msgid "Mute All"
+msgstr "Alles Dempen"
+
+#: gui/options.cpp:973
+msgid "SFX volume:"
+msgstr "SFX volume:"
+
+#: gui/options.cpp:973 gui/options.cpp:975 gui/options.cpp:976
+msgid "Special sound effects volume"
+msgstr "Volume voor speciale geluidseffecten"
+
+#: gui/options.cpp:975
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr "SFX volume:"
+
+#: gui/options.cpp:983
+msgid "Speech volume:"
+msgstr "Spraak volume:"
+
+#: gui/options.cpp:985
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr "Spraak volume:"
+
+#: gui/options.cpp:1142
+msgid "Theme Path:"
+msgstr "Thema Pad:"
+
+#: gui/options.cpp:1144
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr "Thema Pad:"
+
+#: gui/options.cpp:1150 gui/options.cpp:1152 gui/options.cpp:1153
+msgid "Specifies path to additional data used by all games or ScummVM"
+msgstr ""
+"Specificeert het pad for aanvullende data voor ScummVM zelf of de spellen."
+
+#: gui/options.cpp:1159
+msgid "Plugins Path:"
+msgstr "Plugins Pad:"
+
+#: gui/options.cpp:1161
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr "Plugins Pad:"
+
+#: gui/options.cpp:1170 gui/fluidsynth-dialog.cpp:138
+msgid "Misc"
+msgstr "Misc"
+
+#: gui/options.cpp:1172
+msgctxt "lowres"
+msgid "Misc"
+msgstr "Misc"
+
+#: gui/options.cpp:1174
+msgid "Theme:"
+msgstr "Thema:"
+
+#: gui/options.cpp:1178
+msgid "GUI Renderer:"
+msgstr "GUI Renderer:"
+
+#: gui/options.cpp:1190
+msgid "Autosave:"
+msgstr "Autosave:"
+
+#: gui/options.cpp:1192
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr "Autosave:"
+
+#: gui/options.cpp:1200
+msgid "Keys"
+msgstr "Toetsen"
+
+#: gui/options.cpp:1207
+msgid "GUI Language:"
+msgstr "GUI Taal:"
+
+#: gui/options.cpp:1207
+msgid "Language of ScummVM GUI"
+msgstr "Taal van de ScummVM GUI"
+
+#: gui/options.cpp:1366
+msgid "You have to restart ScummVM before your changes will take effect."
+msgstr "U dient ScummVM opnieuw op te starten om de wijzigingen te activeren."
+
+#: gui/options.cpp:1386
+msgid "The chosen directory cannot be written to. Please select another one."
+msgstr ""
+"Er kan niet worden geschreven in de gekozen map. Selecteer a.u.b. een andere."
+
+#: gui/options.cpp:1395
+msgid "Select directory for GUI themes"
+msgstr "Selecteer map voor GUI themas"
+
+#: gui/options.cpp:1405
+msgid "Select directory for extra files"
+msgstr "Selecteer map voor extra bestanden"
+
+#: gui/options.cpp:1416
+msgid "Select directory for plugins"
+msgstr "Selecteer map voor plugins"
+
+#: gui/options.cpp:1469
+msgid ""
+"The theme you selected does not support your current language. If you want "
+"to use this theme you need to switch to another language first."
+msgstr ""
+"De thema die u heeft geselecteerd ondersteund uw gekozen taal niet. Als u "
+"dit thema wilt gebruiken dient u eerst een andere taal te selecteren."
+
+#: gui/saveload-dialog.cpp:167
+msgid "List view"
+msgstr "Lijstopmaak"
+
+#: gui/saveload-dialog.cpp:168
+msgid "Grid view"
+msgstr "Rasterbeeld"
+
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:360
+msgid "No date saved"
+msgstr "Gaan datum opgeslagen"
+
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:361
+msgid "No time saved"
+msgstr "Geen tijd opgeslagen"
+
+#: gui/saveload-dialog.cpp:213 gui/saveload-dialog.cpp:362
+msgid "No playtime saved"
+msgstr "Geen speeltijd opgeslagen"
+
+#: gui/saveload-dialog.cpp:220 gui/saveload-dialog.cpp:276
+msgid "Delete"
+msgstr "Verwijderen"
+
+#: gui/saveload-dialog.cpp:275
+msgid "Do you really want to delete this saved game?"
+msgstr "Wilt u dit opgeslagen spel echt verwijderen?"
+
+#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
+msgid "Date: "
+msgstr "Datum: "
+
+#: gui/saveload-dialog.cpp:389 gui/saveload-dialog.cpp:881
+msgid "Time: "
+msgstr "Tijd: "
+
+#: gui/saveload-dialog.cpp:395 gui/saveload-dialog.cpp:889
+msgid "Playtime: "
+msgstr "Speeltijd: "
+
+#: gui/saveload-dialog.cpp:408 gui/saveload-dialog.cpp:496
+msgid "Untitled savestate"
+msgstr "Naamloos opgeslagen spel"
+
+#: gui/saveload-dialog.cpp:548
+msgid "Next"
+msgstr "Volgende"
+
+#: gui/saveload-dialog.cpp:551
+msgid "Prev"
+msgstr "Vorig"
+
+#: gui/saveload-dialog.cpp:739
+msgid "New Save"
+msgstr "Nieuw spel opslaan"
+
+#: gui/saveload-dialog.cpp:739
+msgid "Create a new save game"
+msgstr "Nieuw spel opslaan"
+
+#: gui/saveload-dialog.cpp:868
+msgid "Name: "
+msgstr "Naam: "
+
+#: gui/saveload-dialog.cpp:940
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr "Geef een omschrijving voor slot %d:"
+
+#: gui/themebrowser.cpp:45
+msgid "Select a Theme"
+msgstr "Selecteer een thema"
+
+#: gui/ThemeEngine.cpp:347
+msgid "Disabled GFX"
+msgstr "GFX uitgeschakeld"
+
+#: gui/ThemeEngine.cpp:347
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr "GFX uitgeschakeld"
+
+#: gui/ThemeEngine.cpp:348
+msgid "Standard Renderer"
+msgstr "Standaard Renderer"
+
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
+msgid "Standard"
+msgstr "Standaard"
+
+#: gui/ThemeEngine.cpp:350
+msgid "Antialiased Renderer"
+msgstr "Antialiased Renderer"
+
+#: gui/ThemeEngine.cpp:350
+msgid "Antialiased"
+msgstr "Antialiased"
+
+#: gui/widget.cpp:323 gui/widget.cpp:325 gui/widget.cpp:331 gui/widget.cpp:333
+msgid "Clear value"
+msgstr "Veld leegmaken"
+
+#: gui/fluidsynth-dialog.cpp:68
+msgid "Reverb"
+msgstr "Reverb"
+
+#: gui/fluidsynth-dialog.cpp:70 gui/fluidsynth-dialog.cpp:102
+msgid "Active"
+msgstr "Actief"
+
+#: gui/fluidsynth-dialog.cpp:72
+msgid "Room:"
+msgstr "Kamer:"
+
+#: gui/fluidsynth-dialog.cpp:79
+msgid "Damp:"
+msgstr "Damp:"
+
+#: gui/fluidsynth-dialog.cpp:86
+msgid "Width:"
+msgstr "Breedte:"
+
+#: gui/fluidsynth-dialog.cpp:93 gui/fluidsynth-dialog.cpp:111
+msgid "Level:"
+msgstr "Level:"
+
+#: gui/fluidsynth-dialog.cpp:100
+msgid "Chorus"
+msgstr "Koor"
+
+#: gui/fluidsynth-dialog.cpp:104
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:118
+msgid "Speed:"
+msgstr "Snelheid:"
+
+#: gui/fluidsynth-dialog.cpp:125
+msgid "Depth:"
+msgstr "Diepte:"
+
+#: gui/fluidsynth-dialog.cpp:132
+msgid "Type:"
+msgstr "Type:"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:136
+msgid "Triangle"
+msgstr "Driehoek"
+
+#: gui/fluidsynth-dialog.cpp:140
+msgid "Interpolation:"
+msgstr "Interpolatie:"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "None (fastest)"
+msgstr "Geen (snelst)"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Linear"
+msgstr "Lineair"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Fourth-order"
+msgstr "Vierde-order"
+
+#: gui/fluidsynth-dialog.cpp:146
+msgid "Seventh-order"
+msgstr "Zevende-order"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset"
+msgstr "Reset"
+
+#: gui/fluidsynth-dialog.cpp:150
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Alle FluidSynth instellingen terugzetten naar de standaard waarden."
+
+#: gui/fluidsynth-dialog.cpp:217
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Wilt u echt alle FluidSynth instellingen terugzetten naar de standaard "
+"waarden?"
+
+#: base/main.cpp:228
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr "Engine ondersteunt debug level '%s' niet"
+
+#: base/main.cpp:306
+msgid "Menu"
+msgstr "Menu"
+
+#: base/main.cpp:309 backends/platform/symbian/src/SymbianActions.cpp:45
+#: backends/platform/wince/CEActionsPocket.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:46
+msgid "Skip"
+msgstr "Overslaan"
+
+#: base/main.cpp:312 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr "Pauze"
+
+#: base/main.cpp:315
+msgid "Skip line"
+msgstr "Regel overslaan"
+
+#: base/main.cpp:507
+msgid "Error running game:"
+msgstr "Fout tijdens het starten van spel:"
+
+#: base/main.cpp:536
+msgid "Could not find any engine capable of running the selected game"
+msgstr ""
+"Kon geen engine vinden die in staat was het geselecteerde spel te spelen"
+
+#: common/error.cpp:38
+msgid "No error"
+msgstr "Geen fout"
+
+#: common/error.cpp:40
+msgid "Game data not found"
+msgstr "Speldata niet gevonden"
+
+#: common/error.cpp:42
+msgid "Game id not supported"
+msgstr "Spel-ID niet ondersteund"
+
+#: common/error.cpp:44
+msgid "Unsupported color mode"
+msgstr "Niet ondersteunde kleurmodus"
+
+#: common/error.cpp:47
+msgid "Read permission denied"
+msgstr "Leesrechten geweigerd"
+
+#: common/error.cpp:49
+msgid "Write permission denied"
+msgstr "Schrijfrechten geweigerd"
+
+#: common/error.cpp:52
+msgid "Path does not exist"
+msgstr "Pad bestaat niet"
+
+#: common/error.cpp:54
+msgid "Path not a directory"
+msgstr "Pad is geen map"
+
+#: common/error.cpp:56
+msgid "Path not a file"
+msgstr "Pad is geen bestand"
+
+#: common/error.cpp:59
+msgid "Cannot create file"
+msgstr "Kan bestand niet aanmaken"
+
+#: common/error.cpp:61
+msgid "Reading data failed"
+msgstr "Data lezen mislukt"
+
+#: common/error.cpp:63
+msgid "Writing data failed"
+msgstr "Data wegschrijven mislukt"
+
+#: common/error.cpp:66
+msgid "Could not find suitable engine plugin"
+msgstr "Kon geen geschikte engine plugin vinden"
+
+#: common/error.cpp:68
+msgid "Engine plugin does not support save states"
+msgstr "Engine plugin ondersteunt opgeslagen spellen niet"
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Gebruiker annuleerde"
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr "Onbekende fout"
+
+#: engines/advancedDetector.cpp:317
+#, c-format
+msgid "The game in '%s' seems to be unknown."
+msgstr "Het spel in '%s' lijkt onbekend te zijn."
+
+#: engines/advancedDetector.cpp:318
+msgid "Please, report the following data to the ScummVM team along with name"
+msgstr ""
+"Raporteer a.u.b. de volgende gegevens aan het ScummVM team samen met de naam"
+
+#: engines/advancedDetector.cpp:320
+msgid "of the game you tried to add and its version/language/etc.:"
+msgstr "van het spel die u probeerde toe te voegen, en haar versie/taal/etc.:"
+
+#: engines/dialogs.cpp:85
+msgid "~R~esume"
+msgstr "~H~ervatten"
+
+#: engines/dialogs.cpp:87
+msgid "~L~oad"
+msgstr "~L~aden"
+
+#: engines/dialogs.cpp:91
+msgid "~S~ave"
+msgstr "Op~s~laan"
+
+#: engines/dialogs.cpp:95
+msgid "~O~ptions"
+msgstr "~O~pties"
+
+#: engines/dialogs.cpp:100
+msgid "~H~elp"
+msgstr "~H~elp"
+
+#: engines/dialogs.cpp:102
+msgid "~A~bout"
+msgstr "O~v~er"
+
+#: engines/dialogs.cpp:105 engines/dialogs.cpp:181
+msgid "~R~eturn to Launcher"
+msgstr "~T~erug naar het startmenu"
+
+#: engines/dialogs.cpp:107 engines/dialogs.cpp:183
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr "~T~erug naar startmenu"
+
+#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
+#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
+msgid "Save game:"
+msgstr "Spel opslaan:"
+
+#: engines/dialogs.cpp:116 backends/platform/symbian/src/SymbianActions.cpp:44
+#: backends/platform/wince/CEActionsPocket.cpp:43
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
+msgid "Save"
+msgstr "Opslaan"
+
+#: engines/dialogs.cpp:145
+msgid ""
+"Sorry, this engine does not currently provide in-game help. Please consult "
+"the README for basic information, and for instructions on how to obtain "
+"further assistance."
+msgstr ""
+"Sorry, deze engine heeft momenteel geen in-game help. Raadpleeg a.u.b. de "
+"README voor basisinformatie, en voor instructies voor het verkrijgen van "
+"verdere assistentie."
+
+#: engines/dialogs.cpp:234 engines/pegasus/pegasus.cpp:393
+#, c-format
+msgid ""
+"Gamestate save failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Opslaan van spel is niet gelukt (%s)! Raadpleeg a.u.b. de README voor "
+"basisinformatie, en voor instructies voor het verkrijgen van verdere "
+"assistentie."
+
+#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
+msgid "~O~K"
+msgstr "~O~K"
+
+#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
+msgid "~C~ancel"
+msgstr "~A~nnuleer"
+
+#: engines/dialogs.cpp:311
+msgid "~K~eys"
+msgstr "~T~oetsen"
+
+#: engines/engine.cpp:245
+msgid "Could not initialize color format."
+msgstr "Kon kleurformaat niet initialiseren."
+
+# can this be changed into "Could not switch to video mode '%s'"?
+#: engines/engine.cpp:253
+msgid "Could not switch to video mode: '"
+msgstr "Kon niet schakelen naar videomodus: '"
+
+#: engines/engine.cpp:262
+msgid "Could not apply aspect ratio setting."
+msgstr "Pixelverhoudinginstelling kon niet toegepast worden."
+
+#: engines/engine.cpp:267
+msgid "Could not apply fullscreen setting."
+msgstr "Kon volledig-scherminstelling niet toepassen."
+
+#: engines/engine.cpp:367
+msgid ""
+"You appear to be playing this game directly\n"
+"from the CD. This is known to cause problems,\n"
+"and it is therefore recommended that you copy\n"
+"the data files to your hard disk instead.\n"
+"See the README file for details."
+msgstr ""
+"U lijkt het spel direct van CD the spelen.\n"
+"Hiervan is bekend dat dit problemen veroorzaakt.\n"
+"Het wordt daarom aangeraden om de data\n"
+"bestanden naar uw harddisk te kopieren.\n"
+"Voor details kijk in de README."
+
+#: engines/engine.cpp:378
+msgid ""
+"This game has audio tracks in its disk. These\n"
+"tracks need to be ripped from the disk using\n"
+"an appropriate CD audio extracting tool in\n"
+"order to listen to the game's music.\n"
+"See the README file for details."
+msgstr ""
+"Dit spel heeft audio sporen op zijn disk. Deze\n"
+"dienen eerst geripped te worden met een audio\n"
+"CD rip programma om te kunnen luisteren naar\n"
+"het spelmuziek. Voor details kijk in de README."
+
+#: engines/engine.cpp:436
+#, c-format
+msgid ""
+"Gamestate load failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Laden van opgeslagen spel is niet gelukt (%s)! Raadpleeg a.u.b. de README "
+"voor basisinformatie, en voor instructies voor het verkrijgen van verdere "
+"assistentie."
+
+#: engines/engine.cpp:449
+msgid ""
+"WARNING: The game you are about to start is not yet fully supported by "
+"ScummVM. As such, it is likely to be unstable, and any saves you make might "
+"not work in future versions of ScummVM."
+msgstr ""
+"WAARSCHUWING: Het spel dat u wilt gaan spelen is nog niet volledig "
+"ondersteund door ScummVM. Om die reden is het waarschijnlijk dat het spel "
+"instabiel is, en opgeslagen spellen zullen mogelijk niet werken in "
+"toekomstige versies van ScummVM."
+
+#: engines/engine.cpp:452
+msgid "Start anyway"
+msgstr "Evengoed starten"
+
+#: audio/fmopl.cpp:50
+msgid "MAME OPL emulator"
+msgstr "MAME OPL emulator"
+
+#: audio/fmopl.cpp:52
+msgid "DOSBox OPL emulator"
+msgstr "DOSBox OPL emulator"
+
+#: audio/mididrv.cpp:209
+#, c-format
+msgid ""
+"The selected audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Het geselecteerde audioapparaat '%s' was niet gevonden (staat misschien uit "
+"of is losgekoppeld)."
+
+#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257
+#: audio/mididrv.cpp:272
+msgid "Attempting to fall back to the next available device..."
+msgstr "Poging om terug te vallen op het volgende beschikbare apparaat..."
+
+#: audio/mididrv.cpp:221
+#, c-format
+msgid ""
+"The selected audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Het geselecteerde audioapparaat '%s' kan niet gebruikt worden. Zie het log "
+"bestand voor meer informatie."
+
+#: audio/mididrv.cpp:257
+#, c-format
+msgid ""
+"The preferred audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Het voorkeursaudioapparaat '%s' was niet gevonden (staat misschien uit of is "
+"losgekoppeld)."
+
+#: audio/mididrv.cpp:272
+#, c-format
+msgid ""
+"The preferred audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Het voorkeursaudioapparaat '%s' kan niet gebruikt worden. Zie het logbestand "
+"voor meer informatie."
+
+#: audio/null.h:44
+msgid "No music"
+msgstr "Geen muziek"
+
+#: audio/mods/paula.cpp:196
+msgid "Amiga Audio Emulator"
+msgstr "Amiga Audio Emulator"
+
+#: audio/softsynth/adlib.cpp:2285
+msgid "AdLib Emulator"
+msgstr "AdLib Emulator"
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr "Apple II GS Emulator (NIET GEЯMPLEMENTEERD)"
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr "C64 Audio Emulator"
+
+#: audio/softsynth/mt32.cpp:200
+msgid "Initializing MT-32 Emulator"
+msgstr "MT-32 Emulator initialiseren"
+
+#: audio/softsynth/mt32.cpp:426
+msgid "MT-32 Emulator"
+msgstr "MT-32 Emulator"
+
+#: audio/softsynth/pcspk.cpp:139
+msgid "PC Speaker Emulator"
+msgstr "PC Speaker Emulator"
+
+#: audio/softsynth/pcspk.cpp:158
+msgid "IBM PCjr Emulator"
+msgstr "IBM PCjr Emulator"
+
+#: backends/keymapper/remap-dialog.cpp:48
+msgid "Keymap:"
+msgstr "Toetskoppeling:"
+
+#: backends/keymapper/remap-dialog.cpp:67
+msgid " (Effective)"
+msgstr " (Effectief)"
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Active)"
+msgstr " (Actief)"
+
+#: backends/keymapper/remap-dialog.cpp:107
+msgid " (Blocked)"
+msgstr " (Geblokkeerd)"
+
+#: backends/keymapper/remap-dialog.cpp:120
+msgid " (Global)"
+msgstr " (Globaal)"
+
+#: backends/keymapper/remap-dialog.cpp:128
+msgid " (Game)"
+msgstr " (Spel)"
+
+#: backends/midi/windows.cpp:165
+msgid "Windows MIDI"
+msgstr "Windows MIDI"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+#: engines/scumm/dialogs.cpp:291
+msgid "~C~lose"
+msgstr "~S~luiten"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:57
+msgid "ScummVM Main Menu"
+msgstr "ScummVM Hoofdmenu"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:63
+msgid "~L~eft handed mode"
+msgstr "~L~inkshandige modus"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:64
+msgid "~I~ndy fight controls"
+msgstr "~I~ndy vecht besturing"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:65
+msgid "Show mouse cursor"
+msgstr "Toon muis wijzer"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:66
+msgid "Snap to edges"
+msgstr "Klik vast aan randen"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:68
+msgid "Touch X Offset"
+msgstr "Raak X Offset"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr "Raak Y Offset"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:87
+msgid "Use laptop trackpad-style cursor control"
+msgstr "Gebruik laptop trackpad-stijl wijzeraansturing"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:88
+msgid "Tap for left click, double tap right click"
+msgstr "Tap voor linker klik, dubbele tap voor rechter klik"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:90
+msgid "Sensitivity"
+msgstr "Gevoeligheid"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:99
+msgid "Initial top screen scale:"
+msgstr "Initiele top schermschaal:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:105
+msgid "Main screen scaling:"
+msgstr "Hoofdschermschaal:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:107
+msgid "Hardware scale (fast, but low quality)"
+msgstr "Hardware schalen (snel, maar slechte kwaliteit)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:108
+msgid "Software scale (good quality, but slower)"
+msgstr "Software schalen (langzamer, maar goede kwaliteit)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:109
+msgid "Unscaled (you must scroll left and right)"
+msgstr "Niet geschaald (U moet naar link en naar rechts scrollen)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:111
+msgid "Brightness:"
+msgstr "Helderheid:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:121
+msgid "High quality audio (slower) (reboot)"
+msgstr "Hoge kwaliteit audio (langzamer) (opnieuw opstarten)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:122
+msgid "Disable power off"
+msgstr "Power-off uitschakelen"
+
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr "Muis-klik-en-sleepmodus aangezet."
+
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr "Muis-klik-en-sleepmodus uitgezet."
+
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr "Touchpadmodus ingeschakeld."
+
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr "Touchpadmodus uitgeschakeld."
+
+#: backends/platform/maemo/maemo.cpp:209
+msgid "Click Mode"
+msgstr "Klik Modus"
+
+#: backends/platform/maemo/maemo.cpp:215
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+#: backends/platform/tizen/form.cpp:275
+msgid "Left Click"
+msgstr "Linker Klik"
+
+#: backends/platform/maemo/maemo.cpp:218
+msgid "Middle Click"
+msgstr "Middelste Klik"
+
+#: backends/platform/maemo/maemo.cpp:221
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+#: backends/platform/tizen/form.cpp:267
+msgid "Right Click"
+msgstr "Rechter klik"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
+msgid "Hide ScummVM"
+msgstr "Verberg ScummVM"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
+msgid "Hide Others"
+msgstr "Verberg Anderen"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
+msgid "Show All"
+msgstr "Toon Alles"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
+msgid "Window"
+msgstr "Venster"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
+msgid "Minimize"
+msgstr "Minimaliseer"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:46
+msgid "Normal (no scaling)"
+msgstr "Normaal (niet schalen)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:65
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr "Normaal (niet schalen)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2148
+msgid "Enabled aspect ratio correction"
+msgstr "Pixelverhoudingcorrectie ingeschakeld"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2154
+msgid "Disabled aspect ratio correction"
+msgstr "Pixelverhoudingcorrectie uitgeschakeld"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2209
+msgid "Active graphics filter:"
+msgstr "Actieve grafische filter:"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2251
+msgid "Windowed mode"
+msgstr "Venstermodus"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:118
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:119
+msgid "OpenGL (No filtering)"
+msgstr "OpenGL (geen filters)"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:38
+#: backends/platform/wince/CEActionsSmartphone.cpp:39
+msgid "Up"
+msgstr "Omhoog"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:39
+#: backends/platform/wince/CEActionsSmartphone.cpp:40
+msgid "Down"
+msgstr "Omlaag"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:40
+#: backends/platform/wince/CEActionsSmartphone.cpp:41
+msgid "Left"
+msgstr "Links"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:41
+#: backends/platform/wince/CEActionsSmartphone.cpp:42
+msgid "Right"
+msgstr "Rechts"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:46
+#: backends/platform/wince/CEActionsSmartphone.cpp:47
+msgid "Zone"
+msgstr "Zone"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:47
+#: backends/platform/wince/CEActionsPocket.cpp:54
+#: backends/platform/wince/CEActionsSmartphone.cpp:48
+msgid "Multi Function"
+msgstr "Meerdere Functies"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:48
+msgid "Swap character"
+msgstr "Verwissel karakter"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:49
+msgid "Skip text"
+msgstr "Text overslaan"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:51
+msgid "Fast mode"
+msgstr "Snelle modus"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: backends/events/default/default-events.cpp:218
+#: engines/scumm/dialogs.cpp:192 engines/scumm/help.cpp:82
+#: engines/scumm/help.cpp:84
+msgid "Quit"
+msgstr "Stoppen"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:53
+msgid "Debugger"
+msgstr "Debugger"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:54
+msgid "Global menu"
+msgstr "Globale menu"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:55
+msgid "Virtual keyboard"
+msgstr "Virtueel toetsenbord"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:56
+msgid "Key mapper"
+msgstr "Toets koppeltool"
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+msgid "Do you want to quit ?"
+msgstr "Wilt u stoppen?"
+
+#: backends/platform/wii/options.cpp:51
+msgid "Video"
+msgstr "Video"
+
+#: backends/platform/wii/options.cpp:54
+msgid "Current video mode:"
+msgstr "Huidige video modus:"
+
+#: backends/platform/wii/options.cpp:56
+msgid "Double-strike"
+msgstr "Dubbele-slag"
+
+#: backends/platform/wii/options.cpp:60
+msgid "Horizontal underscan:"
+msgstr "Horizontale underscan:"
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr "Verticale underscan:"
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr "Invoer"
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr "GC Pad gevoeligheid:"
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr "GC Pad versnelling:"
+
+#: backends/platform/wii/options.cpp:86
+msgid "DVD"
+msgstr "DVD"
+
+#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101
+msgid "Status:"
+msgstr "Status:"
+
+#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102
+msgid "Unknown"
+msgstr "Onbekend"
+
+#: backends/platform/wii/options.cpp:93
+msgid "Mount DVD"
+msgstr "Mount DVD"
+
+#: backends/platform/wii/options.cpp:94
+msgid "Unmount DVD"
+msgstr "Unmount DVD"
+
+#: backends/platform/wii/options.cpp:98
+msgid "SMB"
+msgstr "SMB"
+
+#: backends/platform/wii/options.cpp:106
+msgid "Server:"
+msgstr "Server:"
+
+#: backends/platform/wii/options.cpp:110
+msgid "Share:"
+msgstr "Share:"
+
+#: backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr "Gebruikersnaam:"
+
+#: backends/platform/wii/options.cpp:118
+msgid "Password:"
+msgstr "Wachtwoord:"
+
+#: backends/platform/wii/options.cpp:121
+msgid "Init network"
+msgstr "Init netwerk"
+
+#: backends/platform/wii/options.cpp:123
+msgid "Mount SMB"
+msgstr "Mount SMB"
+
+#: backends/platform/wii/options.cpp:124
+msgid "Unmount SMB"
+msgstr "Unmount SMB"
+
+#: backends/platform/wii/options.cpp:143
+msgid "DVD Mounted successfully"
+msgstr "DVD succesvol gemount"
+
+#: backends/platform/wii/options.cpp:146
+msgid "Error while mounting the DVD"
+msgstr "Fout tijdens het mounten van de DVD"
+
+#: backends/platform/wii/options.cpp:148
+msgid "DVD not mounted"
+msgstr "DVD niet gemount"
+
+#: backends/platform/wii/options.cpp:161
+msgid "Network up, share mounted"
+msgstr "Network up, share gemount"
+
+#: backends/platform/wii/options.cpp:163
+msgid "Network up"
+msgstr "Netwerk up"
+
+#: backends/platform/wii/options.cpp:166
+msgid ", error while mounting the share"
+msgstr ", fout tijdens het mounten van de share"
+
+#: backends/platform/wii/options.cpp:168
+msgid ", share not mounted"
+msgstr ", share niet gemount"
+
+#: backends/platform/wii/options.cpp:174
+msgid "Network down"
+msgstr "Netwerk down"
+
+#: backends/platform/wii/options.cpp:178
+msgid "Initializing network"
+msgstr "Network initialiseren"
+
+#: backends/platform/wii/options.cpp:182
+msgid "Timeout while initializing network"
+msgstr "Timeout tijdens netwerkinitialisatie "
+
+#: backends/platform/wii/options.cpp:186
+#, c-format
+msgid "Network not initialized (%d)"
+msgstr "Netwerk niet geяnitialiseerd (%d)"
+
+#: backends/platform/wince/CEActionsPocket.cpp:46
+msgid "Hide Toolbar"
+msgstr "Verberg werkbalk"
+
+#: backends/platform/wince/CEActionsPocket.cpp:47
+msgid "Show Keyboard"
+msgstr "Toon Toetsenbord"
+
+#: backends/platform/wince/CEActionsPocket.cpp:48
+msgid "Sound on/off"
+msgstr "Geluid aan/uit"
+
+#: backends/platform/wince/CEActionsPocket.cpp:49
+msgid "Right click"
+msgstr "Rechter klik"
+
+#: backends/platform/wince/CEActionsPocket.cpp:50
+msgid "Show/Hide Cursor"
+msgstr "Toon/Verberg Wijzer"
+
+#: backends/platform/wince/CEActionsPocket.cpp:51
+msgid "Free look"
+msgstr "Vrij kijken"
+
+#: backends/platform/wince/CEActionsPocket.cpp:52
+msgid "Zoom up"
+msgstr "Zoom omhoog"
+
+#: backends/platform/wince/CEActionsPocket.cpp:53
+msgid "Zoom down"
+msgstr "Zoom omlaag"
+
+#: backends/platform/wince/CEActionsPocket.cpp:55
+#: backends/platform/wince/CEActionsSmartphone.cpp:49
+msgid "Bind Keys"
+msgstr "Koppel Toetsen"
+
+#: backends/platform/wince/CEActionsPocket.cpp:56
+msgid "Cursor Up"
+msgstr "Cursor Omhoog"
+
+#: backends/platform/wince/CEActionsPocket.cpp:57
+msgid "Cursor Down"
+msgstr "Cursor Omlaag"
+
+#: backends/platform/wince/CEActionsPocket.cpp:58
+msgid "Cursor Left"
+msgstr "Cursor naar Links"
+
+#: backends/platform/wince/CEActionsPocket.cpp:59
+msgid "Cursor Right"
+msgstr "Cursor naar Rechts"
+
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Do you want to load or save the game?"
+msgstr "Wilt u het spel laden of opslaan?"
+
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+msgid " Are you sure you want to quit ? "
+msgstr "Weet u zeker dat u wilt stoppen?"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:50
+msgid "Keyboard"
+msgstr "Toetsenbord"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:51
+msgid "Rotate"
+msgstr "Roteer"
+
+#: backends/platform/wince/CELauncherDialog.cpp:56
+msgid "Using SDL driver "
+msgstr "Gebruik SDL stuurprogramma"
+
+#: backends/platform/wince/CELauncherDialog.cpp:60
+msgid "Display "
+msgstr "Scherm"
+
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Do you want to perform an automatic scan ?"
+msgstr "Wilt u een automatische scan uitvoeren?"
+
+#: backends/platform/wince/wince-sdl.cpp:516
+msgid "Map right click action"
+msgstr "Koppel 'Rechter klik' actie"
+
+#: backends/platform/wince/wince-sdl.cpp:520
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+"U moet een toets koppelen aan de 'Rechter klik' actie om dit spel te kunnen "
+"spelen."
+
+#: backends/platform/wince/wince-sdl.cpp:529
+msgid "Map hide toolbar action"
+msgstr "Koppel 'Verberg werkbalk' actie"
+
+#: backends/platform/wince/wince-sdl.cpp:533
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+"U moet een toets koppelen aan de 'Verberg werkbalk' actie om dit spel te "
+"kunnen spelen."
+
+#: backends/platform/wince/wince-sdl.cpp:542
+msgid "Map Zoom Up action (optional)"
+msgstr "Koppel 'Zoom naar boven' actie (optioneel)"
+
+#: backends/platform/wince/wince-sdl.cpp:545
+msgid "Map Zoom Down action (optional)"
+msgstr "Koppel 'Zoom naar beneden' actie (optioneel)"
+
+#: backends/platform/wince/wince-sdl.cpp:553
+msgid ""
+"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
+msgstr ""
+"Vergeet niet de 'Verberg werkbalk' te koppelen aan een toets om de hele "
+"inventaris te zien."
+
+#: backends/events/default/default-events.cpp:196
+msgid "Do you really want to return to the Launcher?"
+msgstr "Wilt u echt terug naar het startmenu?"
+
+#: backends/events/default/default-events.cpp:196
+msgid "Launcher"
+msgstr "Startmenu"
+
+#: backends/events/default/default-events.cpp:218
+msgid "Do you really want to quit?"
+msgstr "Wilt u echt stoppen?"
+
+#: backends/events/gph/gph-events.cpp:385
+#: backends/events/gph/gph-events.cpp:428
+#: backends/events/openpandora/op-events.cpp:168
+msgid "Touchscreen 'Tap Mode' - Left Click"
+msgstr "Touchscreen 'Tap Modus' - Linker klik"
+
+#: backends/events/gph/gph-events.cpp:387
+#: backends/events/gph/gph-events.cpp:430
+#: backends/events/openpandora/op-events.cpp:170
+msgid "Touchscreen 'Tap Mode' - Right Click"
+msgstr "Touchscreen 'Tap Modus' - Rechter Klik"
+
+#: backends/events/gph/gph-events.cpp:389
+#: backends/events/gph/gph-events.cpp:432
+#: backends/events/openpandora/op-events.cpp:172
+msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
+msgstr "Touchscreen 'Tap Modus' - Zweven (Geen Klik)"
+
+#: backends/events/gph/gph-events.cpp:409
+msgid "Maximum Volume"
+msgstr "Maximale Volume"
+
+#: backends/events/gph/gph-events.cpp:411
+msgid "Increasing Volume"
+msgstr "Volume omhoog"
+
+#: backends/events/gph/gph-events.cpp:417
+msgid "Minimal Volume"
+msgstr "Minimale Volume"
+
+#: backends/events/gph/gph-events.cpp:419
+msgid "Decreasing Volume"
+msgstr "Volume omlaag"
+
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Modus' - Zweven (DPad Klik)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
+msgid "Check for Updates..."
+msgstr "Controleren op updates..."
+
+#: backends/platform/tizen/form.cpp:263
+msgid "Right Click Once"
+msgstr "Rechter klik eenmalig"
+
+#: backends/platform/tizen/form.cpp:271
+msgid "Move Only"
+msgstr "Alleen Verplaatsen"
+
+#: backends/platform/tizen/form.cpp:294
+msgid "Escape Key"
+msgstr "Escape Toets"
+
+#: backends/platform/tizen/form.cpp:299
+msgid "Game Menu"
+msgstr "Spel Menu"
+
+#: backends/platform/tizen/form.cpp:304
+msgid "Show Keypad"
+msgstr "Toon Toetsenblok"
+
+#: backends/platform/tizen/form.cpp:309
+msgid "Control Mouse"
+msgstr "Muis Besturing"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Enabled"
+msgstr "Klikken Aangezet"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:180
+msgid "Clicking Disabled"
+msgstr "Klikken Uitgeschakeld"
+
+#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
+#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
+msgid "Use original save/load screens"
+msgstr "Gebruik originele opslaan/laad schermen"
+
+#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
+#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
+msgid "Use the original save/load screens, instead of the ScummVM ones"
+msgstr ""
+"Gebruik de originele opslaan/laden schermen, in plaats van die van ScummVM"
+
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
+msgid "Restore game:"
+msgstr "Laad opgeslagen spel:"
+
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
+msgid "Restore"
+msgstr "Laad"
+
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
+#, c-format
+msgid ""
+"Failed to load game state from file:\n"
+"\n"
+"%s"
+msgstr ""
+"Fout tijdens laden van opgeslagen spel in bestand:\n"
+"\n"
+"%s"
+
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
+#, c-format
+msgid ""
+"Failed to save game state to file:\n"
+"\n"
+"%s"
+msgstr ""
+"Fout tijdens opslaan van spel in bestand:\n"
+"\n"
+"%s"
+
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
+#, c-format
+msgid ""
+"Successfully saved game state in file:\n"
+"\n"
+"%s"
+msgstr ""
+"Spel succesvol opgeslagen in bestand:\n"
+"\n"
+"%s"
+
+#: engines/agos/animation.cpp:557
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr "Cutscene bestand '%s' niet gevonden!"
+
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klik Modus"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
+#: engines/drascula/saveload.cpp:47
+msgid ""
+"ScummVM found that you have old savefiles for Drascula that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"ScummVM heeft geconstateerd dat u oude opgeslagen spellen voor Drascula "
+"heeft die geconverteerd zouden moeten worden.\n"
+"Het oude formaat wordt niet meer ondersteund, dus u zult uw opgeslagen "
+"spellen niet meer kunnen laden als u ze niet converteerd.\n"
+"\n"
+"Klik OK om ze nu te converteren, anders zult u de volgende keer als u het "
+"spel start dit weer gevraagd worden.\n"
+
+#: engines/dreamweb/detection.cpp:57
+msgid "Use bright palette mode"
+msgstr "Gebruik heldere palet modus"
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Display graphics using the game's bright palette"
+msgstr "Gebruik het heldere palet van het spel voor grafische zaken."
+
+#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
+msgid "Failed to load game state from file."
+msgstr "Laden van opgeslagen spel mislukt."
+
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
+msgid "Failed to save game state to file."
+msgstr "Opslaan van spel in bestand is mislukt."
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr "Bestand verwijderen niet gelukt."
+
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Film snel afspelen"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Speel films sneller af"
+
+#: engines/groovie/script.cpp:399
+msgid "Failed to save game"
+msgstr "Opslaan van spel mislukt."
+
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
+#. I18N: Studio audience adds an applause and cheering sounds whenever
+#. Malcolm makes a joke.
+#: engines/kyra/detection.cpp:62
+msgid "Studio audience"
+msgstr "Publiek"
+
+#: engines/kyra/detection.cpp:63
+msgid "Enable studio audience"
+msgstr "Publiek inschakelen"
+
+#. I18N: This option allows the user to skip text and cutscenes.
+#: engines/kyra/detection.cpp:73
+msgid "Skip support"
+msgstr "Support overslaan"
+
+#: engines/kyra/detection.cpp:74
+msgid "Allow text and cutscenes to be skipped"
+msgstr "Toestaan om tekst en cutscenes over te slaan"
+
+#. I18N: Helium mode makes people sound like they've inhaled Helium.
+#: engines/kyra/detection.cpp:84
+msgid "Helium mode"
+msgstr "Helium-modus"
+
+#: engines/kyra/detection.cpp:85
+msgid "Enable helium mode"
+msgstr "Helium-modus aangezet"
+
+#. I18N: When enabled, this option makes scrolling smoother when
+#. changing from one screen to another.
+#: engines/kyra/detection.cpp:99
+msgid "Smooth scrolling"
+msgstr "Vloeiend scrollen"
+
+#: engines/kyra/detection.cpp:100
+msgid "Enable smooth scrolling when walking"
+msgstr "Schakelt vloeiend scrollen in als er gelopen word"
+
+#. I18N: When enabled, this option changes the cursor when it floats to the
+#. edge of the screen to a directional arrow. The player can then click to
+#. walk towards that direction.
+#: engines/kyra/detection.cpp:112
+msgid "Floating cursors"
+msgstr "Zwevend wijzers"
+
+#: engines/kyra/detection.cpp:113
+msgid "Enable floating cursors"
+msgstr "Zwevende wijzers inschakelen"
+
+#. I18N: HP stands for Hit Points
+#: engines/kyra/detection.cpp:127
+msgid "HP bar graphs"
+msgstr "HP balk grafieken"
+
+#: engines/kyra/detection.cpp:128
+msgid "Enable hit point bar graphs"
+msgstr "Hitpoints balkgrafieken inschakelen"
+
+#: engines/kyra/lol.cpp:478
+msgid "Attack 1"
+msgstr "Aanval 1"
+
+#: engines/kyra/lol.cpp:479
+msgid "Attack 2"
+msgstr "Aanval 2"
+
+#: engines/kyra/lol.cpp:480
+msgid "Attack 3"
+msgstr "Aanval 3"
+
+#: engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr "Beweeg Vooruit"
+
+#: engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr "Beweeg Terug"
+
+#: engines/kyra/lol.cpp:483
+msgid "Slide Left"
+msgstr "Schuif Links"
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide Right"
+msgstr "Schuif Rechts"
+
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2509
+msgid "Turn Left"
+msgstr "Draai Linksom"
+
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2510
+msgid "Turn Right"
+msgstr "Draai Rechtsom"
+
+#: engines/kyra/lol.cpp:487
+msgid "Rest"
+msgstr "Rust"
+
+#: engines/kyra/lol.cpp:488
+msgid "Options"
+msgstr "Opties"
+
+#: engines/kyra/lol.cpp:489
+msgid "Choose Spell"
+msgstr "Kies Spreuk"
+
+#: engines/kyra/sound_midi.cpp:477
+msgid ""
+"You appear to be using a General MIDI device,\n"
+"but your game only supports Roland MT32 MIDI.\n"
+"We try to map the Roland MT32 instruments to\n"
+"General MIDI ones. It is still possible that\n"
+"some tracks sound incorrect."
+msgstr ""
+"Het lijkt erop dat u een General MIDI apparaat gebruikt,\n"
+"maar het spel ondersteunt alleen Roland MT32 MIDI.\n"
+"We zullen proberen te Roland MT32 instrumenten te vertalen naar General MIDI "
+"instrumenten. Het is mogelijk dat somige tracks niet goed klinken."
+
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
+msgid "~Z~ip Mode Activated"
+msgstr "~Z~ip Modus Aangezet"
+
+#: engines/mohawk/dialogs.cpp:93
+msgid "~T~ransitions Enabled"
+msgstr "~O~vergangen Aangezet"
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:95
+msgid "~D~rop Page"
+msgstr "Laat Pagina ~V~allen"
+
+#: engines/mohawk/dialogs.cpp:99
+msgid "~S~how Map"
+msgstr "~T~oon Map"
+
+#: engines/mohawk/dialogs.cpp:105
+msgid "~M~ain Menu"
+msgstr "~H~oofdmenu"
+
+#: engines/mohawk/dialogs.cpp:168
+msgid "~W~ater Effect Enabled"
+msgstr "~W~ater Effect Aangezet"
+
+#: engines/neverhood/detection.cpp:167
+msgid "Skip the Hall of Records storyboard scenes"
+msgstr "Sla de Hall of Records verhaallijnscenes over"
+
+#: engines/neverhood/detection.cpp:168
+msgid "Allows the player to skip past the Hall of Records storyboard scenes"
+msgstr ""
+"Maakt het voor de speler mogelijk om de Hall of Records verhaallijnscenes "
+"over te slaan"
+
+#: engines/neverhood/detection.cpp:174
+msgid "Scale the making of videos to full screen"
+msgstr "Schaal het maken van videos naar het volledige scherm"
+
+#: engines/neverhood/detection.cpp:175
+msgid "Scale the making of videos, so that they use the whole screen"
+msgstr "Schaal het maken van videos zodat ze het volledige scherm gebruiken"
+
+#: engines/parallaction/saveload.cpp:133
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+"Spel opslaan in slot %i mislukt\n"
+"\n"
+
+#: engines/parallaction/saveload.cpp:204
+msgid "Loading game..."
+msgstr "Laden spel..."
+
+#: engines/parallaction/saveload.cpp:219
+msgid "Saving game..."
+msgstr "Spel opslaan..."
+
+#: engines/parallaction/saveload.cpp:272
+msgid ""
+"ScummVM found that you have old savefiles for Nippon Safes that should be "
+"renamed.\n"
+"The old names are no longer supported, so you will not be able to load your "
+"games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked next time.\n"
+msgstr ""
+"ScummVM heeft geconstateerd dat u oude opgeslagen spellen voor Nippon Safes "
+"heeft die van naam veranderd zouden moeten worden.\n"
+"De oude namen worden niet meer ondersteund, dus u zult uw opgeslagen spellen "
+"niet meer kunnen laden als u ze niet converteerd.\n"
+"\n"
+"Klik OK om ze nu te converteren, anders zult u de volgende keer als u het "
+"spel start dit weer gevraagd worden.\n"
+
+#: engines/parallaction/saveload.cpp:319
+msgid "ScummVM successfully converted all your savefiles."
+msgstr "ScummVM heeft al uw opgeslagen spellen succesvol geconverteerd."
+
+#: engines/parallaction/saveload.cpp:321
+msgid ""
+"ScummVM printed some warnings in your console window and can't guarantee all "
+"your files have been converted.\n"
+"\n"
+"Please report to the team."
+msgstr ""
+"ScummVM heeft enkele waarschuwing in uw consolewindow geprint en kan niet "
+"garanderen dat al uw files zijn geconverteerd.\n"
+"\n"
+"Meld dit a.u.b. bij de ontwikkelaars."
+
+#: engines/pegasus/pegasus.cpp:714
+msgid "Invalid save file name"
+msgstr "ongeldige bewaarbestandsnaam"
+
+#: engines/pegasus/pegasus.cpp:2507
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Omhoog/Zoom In/Ga Vooruit/Open Deuren"
+
+#: engines/pegasus/pegasus.cpp:2508
+msgid "Down/Zoom Out"
+msgstr "Naar beneden/Uitzoomen"
+
+#: engines/pegasus/pegasus.cpp:2511
+msgid "Display/Hide Inventory Tray"
+msgstr "Toon/Verberg Inventaris Blad"
+
+#: engines/pegasus/pegasus.cpp:2512
+msgid "Display/Hide Biochip Tray"
+msgstr "Toon/Verberg Bioschip Blad"
+
+#: engines/pegasus/pegasus.cpp:2513
+msgid "Action/Select"
+msgstr "Actie/Selecteer"
+
+#: engines/pegasus/pegasus.cpp:2514
+msgid "Toggle Center Data Display"
+msgstr "Aan-/Uitzetten centreren van Datascherm"
+
+#: engines/pegasus/pegasus.cpp:2515
+msgid "Display/Hide Info Screen"
+msgstr "Toon/Verberg Infoscherm"
+
+#: engines/pegasus/pegasus.cpp:2516
+msgid "Display/Hide Pause Menu"
+msgstr "Toon/Verberg Pauze-Menu"
+
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr ""
+
+#: engines/queen/detection.cpp:57
+#, fuzzy
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Gebruik de floppy versie van de intro (alleen voor de CD versie)"
+
+#: engines/sci/detection.cpp:374
+msgid "EGA undithering"
+msgstr "EGA undithering"
+
+#: engines/sci/detection.cpp:375
+msgid "Enable undithering in EGA games"
+msgstr "Undithering inschakelen in EGA spellen"
+
+#: engines/sci/detection.cpp:384
+msgid "Prefer digital sound effects"
+msgstr "Geef de voorkeur aan digitale geluidseffecten"
+
+#: engines/sci/detection.cpp:385
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr "Geef de voorkeur aan digitale geluidseffecten boven gesynthetiseerde"
+
+#: engines/sci/detection.cpp:404
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr "Gebruik IMF/Yamaha FB-01 voor MIDI"
+
+#: engines/sci/detection.cpp:405
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+"Gebruik een IBM Music Feature kaart of eem Yamaha FB-01 FM synth module voor "
+"MIDI"
+
+#: engines/sci/detection.cpp:415
+msgid "Use CD audio"
+msgstr "Gebruik CD audio"
+
+#: engines/sci/detection.cpp:416
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr "Gebruik CD audio in plaats van in-game audio, als dat beschikbaar is."
+
+#: engines/sci/detection.cpp:426
+msgid "Use Windows cursors"
+msgstr "Gebruik Windows muisaanwijzers"
+
+#: engines/sci/detection.cpp:427
+msgid ""
+"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
+msgstr ""
+"Gebruik Windows muisaanwijzers (kleiner en monochrome) in plaats van de DOS "
+"muisaanwijzers"
+
+#: engines/sci/detection.cpp:437
+msgid "Use silver cursors"
+msgstr "Gebruik zilveren muisaanwijzers"
+
+#: engines/sci/detection.cpp:438
+msgid ""
+"Use the alternate set of silver cursors, instead of the normal golden ones"
+msgstr ""
+"Gebruik de alternative set van zilveren cursors, in plaats van de normale "
+"gouden"
+
+#: engines/scumm/dialogs.cpp:176
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr "Plaats disk %c en druk knop om verder te gaan."
+
+#: engines/scumm/dialogs.cpp:177
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr "Kan %s niet vinden, (%c%d) Druk op de knop."
+
+#: engines/scumm/dialogs.cpp:178
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr "Fout tijdens lezen van disk %c, (%c%d) Druk op de knop."
+
+#: engines/scumm/dialogs.cpp:179
+msgid "Game Paused. Press SPACE to Continue."
+msgstr "Spel is gepauzeerd. Druk op de spatiebalk om verder te gaan."
+
+#. I18N: You may specify 'Yes' symbol at the end of the line, like this:
+#. "Moechten Sie wirklich neu starten? (J/N)J"
+#. Will react to J as 'Yes'
+#: engines/scumm/dialogs.cpp:183
+msgid "Are you sure you want to restart? (Y/N)"
+msgstr "Weet u zeker dat u opnieuw wilt beginnen? (J/N)J"
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:185
+msgid "Are you sure you want to quit? (Y/N)"
+msgstr "Weet u zeker dat u wilt stoppen? (J/N)J"
+
+#: engines/scumm/dialogs.cpp:190
+msgid "Play"
+msgstr "Spelen"
+
+#: engines/scumm/dialogs.cpp:194
+msgid "Insert save/load game disk"
+msgstr "Plaats bewaar/laad speldisk"
+
+#: engines/scumm/dialogs.cpp:195
+msgid "You must enter a name"
+msgstr "U moet een naam invoeren"
+
+#: engines/scumm/dialogs.cpp:196
+msgid "The game was NOT saved (disk full?)"
+msgstr "Het spel was NIET opgeslagen (disk vol?)"
+
+#: engines/scumm/dialogs.cpp:197
+msgid "The game was NOT loaded"
+msgstr "Het spel was NIET geladen"
+
+#: engines/scumm/dialogs.cpp:198
+#, c-format
+msgid "Saving '%s'"
+msgstr "Opslaan '%s'"
+
+#: engines/scumm/dialogs.cpp:199
+#, c-format
+msgid "Loading '%s'"
+msgstr "Laden '%s'"
+
+#: engines/scumm/dialogs.cpp:200
+msgid "Name your SAVE game"
+msgstr "Geef uw spel een naam"
+
+#: engines/scumm/dialogs.cpp:201
+msgid "Select a game to LOAD"
+msgstr "Selecteer welk opgeslagen spel u wilt laden."
+
+#: engines/scumm/dialogs.cpp:202
+msgid "Game title)"
+msgstr "Spel titel)"
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:288
+msgid "~P~revious"
+msgstr "~V~orige"
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:290
+msgid "~N~ext"
+msgstr "~V~olgende"
+
+#: engines/scumm/dialogs.cpp:600
+msgid "Speech Only"
+msgstr "Alleen Spraak"
+
+#: engines/scumm/dialogs.cpp:601
+msgid "Speech and Subtitles"
+msgstr "Spraak and Subtitels"
+
+#: engines/scumm/dialogs.cpp:602
+msgid "Subtitles Only"
+msgstr "Alleen subtitels"
+
+#: engines/scumm/dialogs.cpp:610
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr "Tekst en Spraak"
+
+#: engines/scumm/dialogs.cpp:656
+msgid "Select a Proficiency Level."
+msgstr "Selecteer een vakkundigheidsniveau."
+
+#: engines/scumm/dialogs.cpp:658
+msgid "Refer to your Loom(TM) manual for help."
+msgstr "Raadpleeg uw Loom(TM) handleiding voor hulp."
+
+#: engines/scumm/dialogs.cpp:662
+msgid "Practice"
+msgstr "Oefenen"
+
+#: engines/scumm/dialogs.cpp:663
+msgid "Expert"
+msgstr "Expert"
+
+#: engines/scumm/help.cpp:73
+msgid "Common keyboard commands:"
+msgstr "Gebruikelijke toetsenbord commandos:"
+
+#: engines/scumm/help.cpp:74
+msgid "Save / Load dialog"
+msgstr "Opslaan / Laden dialoog"
+
+#: engines/scumm/help.cpp:76
+msgid "Skip line of text"
+msgstr "Regel text overslaan"
+
+#: engines/scumm/help.cpp:77
+msgid "Esc"
+msgstr "Esc"
+
+#: engines/scumm/help.cpp:77
+msgid "Skip cutscene"
+msgstr "Cutscene overslaan"
+
+#: engines/scumm/help.cpp:78
+msgid "Space"
+msgstr "Spatie"
+
+#: engines/scumm/help.cpp:78
+msgid "Pause game"
+msgstr "Spel pauzeren"
+
+#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96
+#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98
+#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Ctrl"
+msgstr "Ctrl"
+
+#: engines/scumm/help.cpp:79
+msgid "Load game state 1-10"
+msgstr "Laad opgeslagen spel 1-10"
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Alt"
+msgstr "Alt"
+
+#: engines/scumm/help.cpp:80
+msgid "Save game state 1-10"
+msgstr "Spel opslaan 1-10"
+
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89
+msgid "Enter"
+msgstr "Enter"
+
+#: engines/scumm/help.cpp:87
+msgid "Music volume up / down"
+msgstr "Muziek volume omhoog / omlaag"
+
+#: engines/scumm/help.cpp:88
+msgid "Text speed slower / faster"
+msgstr "Tekst langzamer / sneller"
+
+#: engines/scumm/help.cpp:89
+msgid "Simulate left mouse button"
+msgstr "Simuleer linkermuisknop"
+
+#: engines/scumm/help.cpp:90
+msgid "Tab"
+msgstr "Tab"
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate right mouse button"
+msgstr "Simuleer rechtermuisknop"
+
+#: engines/scumm/help.cpp:93
+msgid "Special keyboard commands:"
+msgstr "Speciale toetsenbord commando's:"
+
+#: engines/scumm/help.cpp:94
+msgid "Show / Hide console"
+msgstr "Toon / Verberg console"
+
+#: engines/scumm/help.cpp:95
+msgid "Start the debugger"
+msgstr "Start de debugger"
+
+#: engines/scumm/help.cpp:96
+msgid "Show memory consumption"
+msgstr "Toon geheugen gebruik"
+
+#: engines/scumm/help.cpp:97
+msgid "Run in fast mode (*)"
+msgstr "Draai in snelle modus (*)"
+
+#: engines/scumm/help.cpp:98
+msgid "Run in really fast mode (*)"
+msgstr "Draai in zeer snelle modus (*)"
+
+#: engines/scumm/help.cpp:99
+msgid "Toggle mouse capture"
+msgstr "Mousecapture In-/Uitschakelen"
+
+#: engines/scumm/help.cpp:100
+msgid "Switch between graphics filters"
+msgstr "Schakel tussen grafische filters"
+
+#: engines/scumm/help.cpp:101
+msgid "Increase / Decrease scale factor"
+msgstr "Verhoog / Verlaag schalingsfactor"
+
+#: engines/scumm/help.cpp:102
+msgid "Toggle aspect-ratio correction"
+msgstr "Schakel pixelverhoudingcorrectie aan/uit"
+
+#: engines/scumm/help.cpp:107
+msgid "* Note that using ctrl-f and"
+msgstr "* Het gebruik van Ctrl-F en"
+
+#: engines/scumm/help.cpp:108
+msgid " ctrl-g are not recommended"
+msgstr " Ctrl-G wordt niet aanbevolen"
+
+#: engines/scumm/help.cpp:109
+msgid " since they may cause crashes"
+msgstr " omdat dit crashes of andere"
+
+#: engines/scumm/help.cpp:110
+msgid " or incorrect game behavior."
+msgstr " effecten in het spel kan veroorzaken."
+
+#: engines/scumm/help.cpp:114
+msgid "Spinning drafts on the keyboard:"
+msgstr "Garen spinnen op het toetsenbord:"
+
+#: engines/scumm/help.cpp:116
+msgid "Main game controls:"
+msgstr "Hoofd spel besturing:"
+
+#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136
+#: engines/scumm/help.cpp:161
+msgid "Push"
+msgstr "Duw"
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Pull"
+msgstr "Trek"
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197
+#: engines/scumm/help.cpp:207
+msgid "Give"
+msgstr "Geef"
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190
+#: engines/scumm/help.cpp:208
+msgid "Open"
+msgstr "Open"
+
+#: engines/scumm/help.cpp:126
+msgid "Go to"
+msgstr "Ga naar"
+
+#: engines/scumm/help.cpp:127
+msgid "Get"
+msgstr "Pak"
+
+#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152
+#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224
+#: engines/scumm/help.cpp:250
+msgid "Use"
+msgstr "Gebruik"
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141
+msgid "Read"
+msgstr "Lees"
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147
+msgid "New kid"
+msgstr "Nieuw kind"
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171
+msgid "Turn on"
+msgstr "Zet aan"
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn off"
+msgstr "Zet uit"
+
+#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167
+#: engines/scumm/help.cpp:194
+msgid "Walk to"
+msgstr "Loop naar"
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210
+#: engines/scumm/help.cpp:227
+msgid "Pick up"
+msgstr "Pak op"
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+msgid "What is"
+msgstr "Wat is"
+
+#: engines/scumm/help.cpp:146
+msgid "Unlock"
+msgstr "Maak open"
+
+#: engines/scumm/help.cpp:149
+msgid "Put on"
+msgstr "Zet op"
+
+#: engines/scumm/help.cpp:150
+msgid "Take off"
+msgstr "Doe af"
+
+#: engines/scumm/help.cpp:156
+msgid "Fix"
+msgstr "Repareer"
+
+#: engines/scumm/help.cpp:158
+msgid "Switch"
+msgstr "Schakel"
+
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228
+msgid "Look"
+msgstr "Kijk"
+
+#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223
+msgid "Talk"
+msgstr "Praat"
+
+#: engines/scumm/help.cpp:174
+msgid "Travel"
+msgstr "Reis"
+
+#: engines/scumm/help.cpp:175
+msgid "To Henry / To Indy"
+msgstr "Naar Henry / Naar Indy"
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:179
+msgid "play C minor on distaff"
+msgstr "speel C mineur op spinrok"
+
+#: engines/scumm/help.cpp:180
+msgid "play D on distaff"
+msgstr "speel D op spinrok"
+
+#: engines/scumm/help.cpp:181
+msgid "play E on distaff"
+msgstr "speel E op spinrok"
+
+#: engines/scumm/help.cpp:182
+msgid "play F on distaff"
+msgstr "speel F op spinrok"
+
+#: engines/scumm/help.cpp:183
+msgid "play G on distaff"
+msgstr "speel G op spinrok"
+
+#: engines/scumm/help.cpp:184
+msgid "play A on distaff"
+msgstr "speel A op spinrok"
+
+#: engines/scumm/help.cpp:185
+msgid "play B on distaff"
+msgstr "speel B op spinrok"
+
+#: engines/scumm/help.cpp:186
+msgid "play C major on distaff"
+msgstr "speel C majeur op spinrok"
+
+#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214
+msgid "puSh"
+msgstr "Duw"
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "pull (Yank)"
+msgstr "Trek"
+
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212
+#: engines/scumm/help.cpp:248
+msgid "Talk to"
+msgstr "Praat met"
+
+#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211
+msgid "Look at"
+msgstr "Kijk naar"
+
+#: engines/scumm/help.cpp:200
+msgid "turn oN"
+msgstr "zet aaN"
+
+#: engines/scumm/help.cpp:201
+msgid "turn oFf"
+msgstr "zet uit"
+
+#: engines/scumm/help.cpp:217
+msgid "KeyUp"
+msgstr "ToetsOmhoog"
+
+#: engines/scumm/help.cpp:217
+msgid "Highlight prev dialogue"
+msgstr "Vorig dialoog oplichten"
+
+#: engines/scumm/help.cpp:218
+msgid "KeyDown"
+msgstr "ToetsOmlaag"
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight next dialogue"
+msgstr "Volgend dialoog oplichten"
+
+#: engines/scumm/help.cpp:222
+msgid "Walk"
+msgstr "Loop"
+
+#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234
+#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249
+msgid "Inventory"
+msgstr "Inventaris"
+
+#: engines/scumm/help.cpp:226
+msgid "Object"
+msgstr "Object"
+
+#: engines/scumm/help.cpp:229
+msgid "Black and White / Color"
+msgstr "Zwart-Wit / Kleur"
+
+#: engines/scumm/help.cpp:232
+msgid "Eyes"
+msgstr "Ogen"
+
+#: engines/scumm/help.cpp:233
+msgid "Tongue"
+msgstr "Tong"
+
+#: engines/scumm/help.cpp:235
+msgid "Punch"
+msgstr "Stoot"
+
+#: engines/scumm/help.cpp:236
+msgid "Kick"
+msgstr "Schop"
+
+#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247
+msgid "Examine"
+msgstr "Onderzoek"
+
+#: engines/scumm/help.cpp:240
+msgid "Regular cursor"
+msgstr "Normale cursor"
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:243
+msgid "Comm"
+msgstr "Comm"
+
+#: engines/scumm/help.cpp:246
+msgid "Save / Load / Options"
+msgstr "Opslaan / Laden / Opties"
+
+#: engines/scumm/help.cpp:255
+msgid "Other game controls:"
+msgstr "Andere spel besturing:"
+
+#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267
+msgid "Inventory:"
+msgstr "Inventaris:"
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274
+msgid "Scroll list up"
+msgstr "Scroll lijst omhoog"
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list down"
+msgstr "Scroll lijst naar beneden"
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268
+msgid "Upper left item"
+msgstr "Linker bovenste voorwerp"
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270
+msgid "Lower left item"
+msgstr "Linker beneden voorwerp"
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Upper right item"
+msgstr "Rechter bovenste voorwerp"
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273
+msgid "Lower right item"
+msgstr "Rechter beneden voorwerp"
+
+#: engines/scumm/help.cpp:269
+msgid "Middle left item"
+msgstr "Linker middelste voorwerp"
+
+#: engines/scumm/help.cpp:272
+msgid "Middle right item"
+msgstr "Rechter middelste voorwerp"
+
+#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284
+msgid "Switching characters:"
+msgstr "Verwissel karakters:"
+
+#: engines/scumm/help.cpp:281
+msgid "Second kid"
+msgstr "Tweede kind"
+
+#: engines/scumm/help.cpp:282
+msgid "Third kid"
+msgstr "Derde kind"
+
+#: engines/scumm/help.cpp:294
+msgid "Fighting controls (numpad):"
+msgstr "Gevechtbesturing (numeriek toetsenblok):"
+
+#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296
+#: engines/scumm/help.cpp:297
+msgid "Step back"
+msgstr "Stap terug"
+
+#: engines/scumm/help.cpp:298
+msgid "Block high"
+msgstr "Blokker hoog"
+
+#: engines/scumm/help.cpp:299
+msgid "Block middle"
+msgstr "Blokkeer midden"
+
+#: engines/scumm/help.cpp:300
+msgid "Block low"
+msgstr "Blokkeer laag"
+
+#: engines/scumm/help.cpp:301
+msgid "Punch high"
+msgstr "Stoot hoog"
+
+#: engines/scumm/help.cpp:302
+msgid "Punch middle"
+msgstr "Stoot in het midden"
+
+#: engines/scumm/help.cpp:303
+msgid "Punch low"
+msgstr "Stoot laag"
+
+#: engines/scumm/help.cpp:306
+msgid "These are for Indy on left."
+msgstr "Deze zijn voor Indy op links."
+
+#: engines/scumm/help.cpp:307
+msgid "When Indy is on the right,"
+msgstr "Wanneer Indy rechts staat,"
+
+#: engines/scumm/help.cpp:308
+msgid "7, 4, and 1 are switched with"
+msgstr "7, 4 en 1 zijn verwisseld met"
+
+#: engines/scumm/help.cpp:309
+msgid "9, 6, and 3, respectively."
+msgstr "9, 6 en 3 respectievelijk."
+
+#: engines/scumm/help.cpp:316
+msgid "Biplane controls (numpad):"
+msgstr "Tweedekkerbesturing (numeriek toetsenbord):"
+
+#: engines/scumm/help.cpp:317
+msgid "Fly to upper left"
+msgstr "Vlieg naar links omhoog"
+
+#: engines/scumm/help.cpp:318
+msgid "Fly to left"
+msgstr "Vlieg naar links"
+
+#: engines/scumm/help.cpp:319
+msgid "Fly to lower left"
+msgstr "Vlieg naar links omlaag"
+
+#: engines/scumm/help.cpp:320
+msgid "Fly upwards"
+msgstr "Vlieg omhoog"
+
+#: engines/scumm/help.cpp:321
+msgid "Fly straight"
+msgstr "Vlieg recht"
+
+#: engines/scumm/help.cpp:322
+msgid "Fly down"
+msgstr "Vlieg omlaag"
+
+#: engines/scumm/help.cpp:323
+msgid "Fly to upper right"
+msgstr "Vlieg naar rechts omhoog"
+
+#: engines/scumm/help.cpp:324
+msgid "Fly to right"
+msgstr "Vlieg naar rechts"
+
+#: engines/scumm/help.cpp:325
+msgid "Fly to lower right"
+msgstr "Vlieg naar rechts omlaag"
+
+#: engines/scumm/scumm.cpp:1823
+#, c-format
+msgid ""
+"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
+"but %s is missing. Using AdLib instead."
+msgstr ""
+"Voor MIDI support is de Roland Upgrade van Lucasarts vereist,\n"
+"maar %s ontbreekt. Er wordt nu AdLib gebruikt."
+
+#: engines/scumm/scumm.cpp:2594
+msgid ""
+"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
+"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
+"directory inside the Tentacle game directory."
+msgstr ""
+"Normaal gesproken zou Maniac Mansion nu starten. Maar ScummVM doet dat nog "
+"niet. Om het te spelen, ga naar \"Spel Toevoegen\" in het ScummVM start menu "
+"en selecteer de map 'Maniac' in de Tentacle map."
+
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/sky/compact.cpp:130
+msgid ""
+"Unable to find \"sky.cpt\" file!\n"
+"Please download it from www.scummvm.org"
+msgstr ""
+"Het bestand \"sky.cpt\" is niet gevonden.\n"
+"Download a.u.b. het bestand van www.scummvm.org"
+
+#: engines/sky/compact.cpp:141
+msgid ""
+"The \"sky.cpt\" file has an incorrect size.\n"
+"Please (re)download it from www.scummvm.org"
+msgstr ""
+"Het \"sky.cpt\" bestand heeft een incorrecte groote.\n"
+"Download a.u.b. het bestand (opnieuw) van www.scummvm.org"
+
+#: engines/sky/detection.cpp:44
+msgid "Floppy intro"
+msgstr "Floppy intro"
+
+#: engines/sky/detection.cpp:45
+msgid "Use the floppy version's intro (CD version only)"
+msgstr "Gebruik de floppy versie van de intro (alleen voor de CD versie)"
+
+#: engines/sword1/animation.cpp:524
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr "PSX stream cutscene '%s' kan niet in paletted modus afgespeeld worden"
+
+#: engines/sword1/animation.cpp:545 engines/sword2/animation.cpp:445
+msgid "DXA cutscenes found but ScummVM has been built without zlib"
+msgstr "DXA cutscenes gevonden maar ScummVM is gebouwd zonder zlib"
+
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
+msgid ""
+"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
+msgstr ""
+"MPEG-2 cutscenes gevonden maar ScummVM is gebouwd zonder MPEG-2 ondersteuning"
+
+#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr "Cutscene '%s' niet gevonden"
+
+#: engines/sword1/control.cpp:863
+msgid ""
+"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"ScummVM heeft geconstateerd dat u oude opgeslagen spellen voor Broken Sword "
+"1 heeft die geconverteerd zouden moeten worden.\n"
+"Het oude formaat wordt niet meer ondersteund, dus u zult uw opgeslagen "
+"spellen niet meer kunnen laden als u ze niet converteerd.\n"
+"\n"
+"Klik OK om ze nu te converteren, anders zult u de volgende keer als u het "
+"spel start dit weer gevraagd worden.\n"
+
+#: engines/sword1/control.cpp:1232
+#, c-format
+msgid ""
+"Target new save game already exists!\n"
+"Would you like to keep the old save game (%s) or the new one (%s)?\n"
+msgstr ""
+"Bestand voor het nieuwe opgeslagen spel bestaat al!\n"
+"Wilt u het oude opgeslagen spel (%s) of de nieuwe (%s) behouden?\n"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the old one"
+msgstr "Houd de oude"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the new one"
+msgstr "Houd de nieuwe"
+
+#: engines/sword1/logic.cpp:1633
+msgid "This is the end of the Broken Sword 1 Demo"
+msgstr "Dit is het einde van de Broken Sword 1 Demo"
+
+#: engines/sword2/animation.cpp:425
+msgid ""
+"PSX cutscenes found but ScummVM has been built without RGB color support"
+msgstr ""
+"PSX cutscenes gevonden maar ScummVM is gebouwd zonder RGB kleuren "
+"ondersteuning"
+
+#: engines/sword2/sword2.cpp:79
+msgid "Show object labels"
+msgstr "Toon objectnamen"
+
+#: engines/sword2/sword2.cpp:80
+msgid "Show labels for objects on mouse hover"
+msgstr "Toon labels voor objecten als de muis er over zweeft"
+
+#: engines/teenagent/resources.cpp:95
+msgid ""
+"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+msgstr ""
+"Het 'teenagent.dat' bestand ontbreekt. U kunt die vinden op de ScummVM "
+"website."
+
+#: engines/teenagent/resources.cpp:116
+msgid ""
+"The teenagent.dat file is compressed and zlib hasn't been included in this "
+"executable. Please decompress it"
+msgstr ""
+"Het \"teenagent.dat\" bestand is gecomprimeerd en zlib is niet meegenomen in "
+"deze versie van ScummVM. Decomprimeer a.u.b. het bestand."
+
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 7d219bf5df..de5698e61d 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-11 00:04+0100\n"
"Last-Translator: Einar Johan Trјan Sјmхen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
@@ -89,7 +89,7 @@ msgstr "Syn Tastatur"
msgid "Remap keys"
msgstr "Omkople tastar"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Veksle fullskjerm"
@@ -109,13 +109,15 @@ msgstr "Kople"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -358,7 +360,7 @@ msgstr "Vel mappe med speldata"
msgid "Select additional game directory"
msgstr "Vel mappe med speldata"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vel mappe for lagra spel"
@@ -455,7 +457,7 @@ msgstr "Sјk:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Хpne spel:"
@@ -464,7 +466,7 @@ msgstr "Хpne spel:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Хpne"
@@ -480,6 +482,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Ja"
@@ -489,6 +492,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nei"
@@ -909,10 +913,6 @@ msgstr "Sprхk i ScummVM-GUIet"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Du mх starte ScummVM pх nytt for at endringane skal tre i kraft."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Vel mappe for lagra spel"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Den velde mappa kan ikkje skrivast til. Vennlegst vel ein annan."
@@ -1023,7 +1023,7 @@ msgstr "Deaktivert GFX"
msgid "Standard Renderer"
msgstr "Standardteiknar"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
@@ -1270,8 +1270,9 @@ msgstr "Tilbake til Oppsta~r~tar"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Lagra spel:"
@@ -1281,9 +1282,10 @@ msgstr "Lagra spel:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Lagre"
@@ -1302,12 +1304,12 @@ msgid ""
msgstr ""
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~A~vbryt"
@@ -2072,28 +2074,30 @@ msgstr "Klikking Deaktivert"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Nytt opprinnelege skjermar for lagring/lasting"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Gjenopprett spel:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Gjenopprett"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2101,7 +2105,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2109,7 +2113,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2122,6 +2126,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr ""
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klikkmodus"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2143,11 +2156,12 @@ msgid "Display graphics using the game's bright palette"
msgstr ""
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Kunne ikkje laste lagra spel frх fil."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Klarte ikkje lagre speltilstand til fil."
@@ -2169,6 +2183,14 @@ msgstr "Spel filmar med auka hastighet"
msgid "Failed to save game"
msgstr "Lagra spel:"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2297,6 +2319,35 @@ msgid ""
"some tracks sound incorrect."
msgstr ""
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2417,6 +2468,15 @@ msgstr "Skjul/Vis infoskjerm"
msgid "Display/Hide Pause Menu"
msgstr "Skjul/Vis pausemeny"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr ""
+
+#: engines/queen/detection.cpp:57
+#, fuzzy
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Nytt diskettversjonens хpning (Kun CD-versjon)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr ""
@@ -2554,37 +2614,37 @@ msgstr "~F~orrige"
msgid "~N~ext"
msgstr "~N~este"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Berre Tale"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Tale og undertekstar"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Berre undertekstar"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Tekst & Tale"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
#, fuzzy
msgid "Select a Proficiency Level."
msgstr "Gх til forrige mappenivх"
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Sjх i Loom(TM)-manualen for hjelp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr ""
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspert"
@@ -2642,10 +2702,6 @@ msgstr "Lagre speltilstand 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Veksle fullskjerm"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikkvolum opp / ned"
@@ -3102,14 +3158,14 @@ msgstr "Fly til hјgre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјgre"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
msgstr ""
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3119,6 +3175,18 @@ msgstr ""
"det enno. For х spele Maniac Mansion, gх til 'Legg til spel' i ScummVM-"
"menyen og vel 'Maniac'-undermappa i 'Tentacle'-mappa."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3215,6 +3283,14 @@ msgid ""
"executable. Please decompress it"
msgstr ""
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Legg til fleire..."
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 27fff67bc1..83df595da5 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-02 12:28+0100\n"
"Last-Translator: MichaГ ZiБbkowski <mziab@o2.pl>\n"
"Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n"
@@ -90,7 +90,7 @@ msgstr "WyЖwietl klawiaturъ"
msgid "Remap keys"
msgstr "Dostosuj klawisze"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "WГБcz/wyГБcz peГny ekran"
@@ -110,13 +110,15 @@ msgstr "Przypisz"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -356,7 +358,7 @@ msgstr "Wybierz katalog z plikami gry"
msgid "Select additional game directory"
msgstr "Wybierz dodatkowy katalog gry"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Wybierz katalog dla zapisѓw"
@@ -453,7 +455,7 @@ msgstr "Szukaj"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Wczytaj grъ:"
@@ -462,7 +464,7 @@ msgstr "Wczytaj grъ:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Wczytaj"
@@ -479,6 +481,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Tak"
@@ -488,6 +491,7 @@ msgstr "Tak"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nie"
@@ -910,10 +914,6 @@ msgstr "Jъzyk interfejsu ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Musisz zrestartowaц ScummVM, by zmiany zostaГy uwzglъdnione."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Wybierz katalog zapisѓw"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Ten katalog jest zabezpieczony przed zapisem. Wybierz inny."
@@ -1024,7 +1024,7 @@ msgstr "WyГБczona grafika"
msgid "Standard Renderer"
msgstr "Standardowy renderer"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standardowy"
@@ -1270,8 +1270,9 @@ msgstr "~P~owrѓt do launchera"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Zapis:"
@@ -1281,9 +1282,10 @@ msgstr "Zapis:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Zapisz"
@@ -1307,12 +1309,12 @@ msgstr ""
"dowiedzieц jak szukaц dalszej pomocy, sprawdМ plik README."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~A~nuluj"
@@ -2070,28 +2072,30 @@ msgstr "Klikanie wyГБczone"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "UПyj oryginalnych ekranѓw odczytu/zapisu zamiast tych ze ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Wznѓw grъ:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Wznѓw"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2102,7 +2106,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2113,7 +2117,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2129,6 +2133,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Nie znaleziono pliku przerywnika '%s'!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Tryb klikania"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2155,11 +2168,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "WyЖwietlaj grafikъ za pomocБ jasnej palety gry"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Nie udaГo siъ wczytaц stanu gry z pliku."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Nie udaГo siъ zapisaц stanu gry do pliku."
@@ -2179,6 +2193,14 @@ msgstr "Odtwarzaj filmy ze zwiъkszonБ prъdkoЖciБ"
msgid "Failed to save game"
msgstr "Nie udaГo siъ zapisaц stanu gry"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2298,6 +2320,35 @@ msgstr ""
"Prѓbujemy przypisaц instrumenty Rolanda MT32 do instrumentѓw General MIDI. "
"Niektѓre utwory mogБ byц Мle odtwarzane."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2425,6 +2476,14 @@ msgstr "PokaП/schowaj ekran informacji"
msgid "Display/Hide Pause Menu"
msgstr "PokaП/schowaj menu pauzy"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Alternatywne intro"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "UПyj alternatywnego intra (tylko dla wersji CD)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "Anty-dithering EGA"
@@ -2564,36 +2623,36 @@ msgstr "~P~oprzednia"
msgid "~N~ext"
msgstr "~N~astъpna"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Tylko mowa"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Mowa i napisy"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Tylko napisy"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Mowa i napisy"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Wybierz poziom umiejъtnoЖci."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Pomocy szukaj w instrukcji doГБczonej do Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Trening"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Ekspert"
@@ -2651,10 +2710,6 @@ msgstr "Zapisz stan gry 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "WГБcz/wyГБcz peГny ekran"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Zwiъksz/zmniejsz gГoЖnoЖц muzyki"
@@ -3110,7 +3165,7 @@ msgstr "Leц w prawo"
msgid "Fly to lower right"
msgstr "Leц w dѓГ, w prawo"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3119,7 +3174,7 @@ msgstr ""
"Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n"
"ale brakuje %s. PrzeГБczam na tryb AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3129,6 +3184,18 @@ msgstr ""
"tego nie obsГuguje. Aby zagraц, uПyj \"Dodaj grъ...\" z menu startowego "
"ScummVM i wybierz podkatalog \"Maniac\" z katalogu gry Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3245,6 +3312,14 @@ msgstr ""
"Plik teenagent.dat jest skompresowany, a ScummVM nie zawiera obsГugi zlib. "
"Rozpakuj plik."
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "Znaleziono przerywniki w formacie MPEG-2, ale ScummVM jest skompilowany "
@@ -3265,12 +3340,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standardowy (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Alternatywne intro"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "UПyj alternatywnego intra (tylko dla wersji CD)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Przerywniki w formacie MPEG2 nie sБ juП obsГugiwane"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 438629d58d..71161bde14 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2011-10-21 21:30-0300\n"
"Last-Translator: Saulo Benigno <saulobenigno@gmail.com>\n"
"Language-Team: ScummBR (www.scummbr.com) <scummbr@yahoo.com.br>\n"
@@ -91,7 +91,7 @@ msgstr "Mostrar teclado"
msgid "Remap keys"
msgstr "Remapear teclas"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
#, fuzzy
msgid "Toggle fullscreen"
msgstr "Habilita Tela Cheia"
@@ -112,13 +112,15 @@ msgstr "Mapear"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -359,7 +361,7 @@ msgstr "Selecione a pasta com os arquivos do jogo"
msgid "Select additional game directory"
msgstr "Selecione a pasta adicional do jogo"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Selecione a pasta para os jogos salvos"
@@ -457,7 +459,7 @@ msgstr "Pesquisar:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Carregar jogo:"
@@ -466,7 +468,7 @@ msgstr "Carregar jogo:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Carregar"
@@ -484,6 +486,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Sim"
@@ -493,6 +496,7 @@ msgstr "Sim"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nуo"
@@ -922,10 +926,6 @@ msgstr "Linguagem do ScummVM GUI"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Vocъ tem que reiniciar o ScummVM para funcionar."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Selecione a pasta para o jogos salvos"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "O diretѓrio escolhido nуo pode ser usado. Por favor, selecione outro."
@@ -1040,7 +1040,7 @@ msgstr "GFX desabilitado"
msgid "Standard Renderer"
msgstr "Renderizador padrуo (16bpp)"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
#, fuzzy
msgid "Standard"
msgstr "Padrуo (16bpp)"
@@ -1295,8 +1295,9 @@ msgstr "~V~oltar ao menu"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Salvar jogo:"
@@ -1306,9 +1307,10 @@ msgstr "Salvar jogo:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Salvar"
@@ -1333,12 +1335,12 @@ msgstr ""
"instruчѕes sobre como obter assistъncia adicional."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -2108,28 +2110,30 @@ msgstr "Clicando Desabilitado"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr ""
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Restaurar jogo:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Restaurar"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2140,7 +2144,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2151,7 +2155,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2167,6 +2171,14 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Arquivo de vэdeo '%s' nуo encontrado!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+msgid "Color Blind Mode"
+msgstr ""
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
#, fuzzy
msgid ""
@@ -2196,14 +2208,15 @@ msgid "Display graphics using the game's bright palette"
msgstr ""
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr ""
"Falha ao carregar o estado do jogo a partir do arquivo:\n"
"\n"
"%s"
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr ""
"Falha ao salvar o estado do jogo para o arquivo:\n"
@@ -2227,6 +2240,14 @@ msgstr ""
msgid "Failed to save game"
msgstr "Falha ao salvar o jogo"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2356,6 +2377,35 @@ msgstr ""
"o modelo General MIDI. Talvez possa acontecer\n"
"que algumas faixas nуo sejam corretamente tocadas."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2485,6 +2535,14 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr ""
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr ""
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA sem dithering"
@@ -2623,36 +2681,36 @@ msgstr "~A~nterior"
msgid "~N~ext"
msgstr "~P~rѓximo"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Somente Voz"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Voz e Legendas"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Somente Legendas"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Voz e Legendas"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr ""
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr ""
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr ""
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr ""
@@ -2710,10 +2768,6 @@ msgstr "Salvar estado do jogo 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Habilita Tela Cheia"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Volume da mњsica"
@@ -3169,7 +3223,7 @@ msgstr "Voar para direita"
msgid "Fly to lower right"
msgstr "Voar para direita inferior"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3179,7 +3233,7 @@ msgstr ""
"LucasArts,\n"
"mas %s estс faltando. Utilizando AdLib ao invщs."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3190,6 +3244,18 @@ msgstr ""
"adicione o jogo normalmente no ScummVM. Ele se encontra em um diretѓrio "
"dentro da pasta do jogo Day of the Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3304,6 +3370,14 @@ msgid ""
"executable. Please decompress it"
msgstr ""
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#, fuzzy
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 23ed5be1fc..89ee15e7ce 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-02 17:20+0300\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Russian\n"
@@ -89,7 +89,7 @@ msgstr "Показать клавиатуру"
msgid "Remap keys"
msgstr "Переназначить клавиши"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Переключение на весь экран"
@@ -109,13 +109,15 @@ msgstr "Назначить"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -356,7 +358,7 @@ msgstr "Выберите директорию с файлами игры"
msgid "Select additional game directory"
msgstr "Выберите дополнительную директорию игры"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Выберите директорию для сохранений"
@@ -453,7 +455,7 @@ msgstr "Поиск:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Загрузить игру:"
@@ -462,7 +464,7 @@ msgstr "Загрузить игру:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Загрузить"
@@ -480,6 +482,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Да"
@@ -489,6 +492,7 @@ msgstr "Да"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Нет"
@@ -915,10 +919,6 @@ msgstr "Язык графического интерфейса ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Вы должны перезапустить ScummVM, чтобы применить изменения."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Выберите директорию для сохранений"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не могу писать в выбранную директорию. Пожалуйста, укажите другую."
@@ -1029,7 +1029,7 @@ msgstr "Без графики"
msgid "Standard Renderer"
msgstr "Стандартный растеризатор"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Стандартный"
@@ -1277,8 +1277,9 @@ msgstr "~В~ главное меню"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Сохранить игру:"
@@ -1288,9 +1289,10 @@ msgstr "Сохранить игру:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Сохранить"
@@ -1315,12 +1317,12 @@ msgstr ""
"помощь."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "О~т~мена"
@@ -2084,30 +2086,32 @@ msgstr "Щелчки выключены"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Использовать оригинальные экраны записи/чтения игры"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Использовать оригинальные экраны записи и сохранения игры вместо сделанных в "
"ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Восстановить игру:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Восстановить"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2118,7 +2122,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2129,7 +2133,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2145,6 +2149,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Файл заставки '%s' не найден!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Режим щелчка"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2172,11 +2185,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Рисует графику с использованием яркой палитры игры"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Не удалось загрузить сохранённую игру из файла."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Не удалось сохранить игру в файл."
@@ -2196,6 +2210,14 @@ msgstr "Воспроизводит видеоролики с увеличенной скоростью"
msgid "Failed to save game"
msgstr "Не удалось сохранить игру"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2317,6 +2339,35 @@ msgstr ""
"может так получиться, что некоторые треки будут\n"
"сыграны неверно."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2444,6 +2495,14 @@ msgstr "Показать/Спрятать инфоэкран"
msgid "Display/Hide Pause Menu"
msgstr "Показать/Спрятать меню паузы"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Альтернативное вступление"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Использовать альтернативное вступление (только для CD версии игры)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA без растра"
@@ -2587,36 +2646,36 @@ msgstr "~П~ред"
msgid "~N~ext"
msgstr "~С~лед"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Только озвучка"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Озвучка и субтитры"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Только субтитры"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Озвучка и текст"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Выберите уровень сложности."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "За помощью обратитесь к инстукции Loom(TM)"
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Практикант"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Эксперт"
@@ -2674,10 +2733,6 @@ msgstr "Сохранить игру 1-10"
msgid "Enter"
msgstr "Ввод"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Переключить на весь экран"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Громкость музыки увеличить / уменьшить"
@@ -3133,7 +3188,7 @@ msgstr "Лететь вправо"
msgid "Fly to lower right"
msgstr "Лететь вправо-вниз"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3142,7 +3197,7 @@ msgstr ""
"Режим \"родного\" MIDI требует обновление Roland Upgrade от\n"
"LucasArts, но не хватает %s. Переключаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3152,6 +3207,18 @@ msgstr ""
"умеет. Чтобы сыграть, нажмите 'Новая игра' в стартовом меню ScummVM, а затем "
"выберите директорию Maniac внутри директории с игрой Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3264,6 +3331,14 @@ msgstr ""
"Файл teenagent.dat сжат, но zlib не включено в эту программу. Пожалуйста, "
"распакуйте его"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr ""
#~ "Найдены заставки в формате MPEG-2, но ScummVM был собран без поддержки "
@@ -3285,12 +3360,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Стандартный растеризатор (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Альтернативное вступление"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Использовать альтернативное вступление (только для CD версии игры)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Заставки в формате MPEG2 больше не поддерживаются"
diff --git a/po/scummvm.pot b/po/scummvm.pot
index 0fc2712693..72600ff994 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.8.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -87,7 +87,7 @@ msgstr ""
msgid "Remap keys"
msgstr ""
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr ""
@@ -107,13 +107,15 @@ msgstr ""
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr ""
@@ -149,7 +151,7 @@ msgstr ""
#: gui/launcher.cpp:197 gui/launcher.cpp:199 gui/launcher.cpp:200
msgid ""
-"Short game identifier used for referring to savegames and running the game "
+"Short game identifier used for referring to saved games and running the game "
"from the command line"
msgstr ""
@@ -315,7 +317,7 @@ msgstr ""
#: gui/launcher.cpp:339 gui/launcher.cpp:341 gui/launcher.cpp:342
#: gui/options.cpp:1134 gui/options.cpp:1136 gui/options.cpp:1137
-msgid "Specifies where your savegames are put"
+msgid "Specifies where your saved games are put"
msgstr ""
#: gui/launcher.cpp:341 gui/options.cpp:1136
@@ -351,7 +353,7 @@ msgstr ""
msgid "Select additional game directory"
msgstr ""
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr ""
@@ -396,7 +398,7 @@ msgid "~L~oad..."
msgstr ""
#: gui/launcher.cpp:633
-msgid "Load savegame for selected game"
+msgid "Load saved game for selected game"
msgstr ""
#: gui/launcher.cpp:638
@@ -448,7 +450,7 @@ msgstr ""
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr ""
@@ -457,7 +459,7 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr ""
@@ -473,6 +475,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr ""
@@ -482,6 +485,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr ""
@@ -502,7 +506,7 @@ msgid "Do you really want to remove this game configuration?"
msgstr ""
#: gui/launcher.cpp:999
-msgid "Do you want to load savegame?"
+msgid "Do you want to load saved game?"
msgstr ""
#: gui/launcher.cpp:1048
@@ -895,10 +899,6 @@ msgstr ""
msgid "You have to restart ScummVM before your changes will take effect."
msgstr ""
-#: gui/options.cpp:1379
-msgid "Select directory for savegames"
-msgstr ""
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -946,7 +946,7 @@ msgid "Delete"
msgstr ""
#: gui/saveload-dialog.cpp:275
-msgid "Do you really want to delete this savegame?"
+msgid "Do you really want to delete this saved game?"
msgstr ""
#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:875
@@ -1007,7 +1007,7 @@ msgstr ""
msgid "Standard Renderer"
msgstr ""
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr ""
@@ -1252,8 +1252,9 @@ msgstr ""
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr ""
@@ -1263,9 +1264,10 @@ msgstr ""
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr ""
@@ -1284,12 +1286,12 @@ msgid ""
msgstr ""
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr ""
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr ""
@@ -2026,28 +2028,30 @@ msgstr ""
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr ""
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr ""
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr ""
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2055,7 +2059,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2063,7 +2067,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2076,6 +2080,14 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr ""
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+msgid "Color Blind Mode"
+msgstr ""
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2096,11 +2108,12 @@ msgid "Display graphics using the game's bright palette"
msgstr ""
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr ""
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr ""
@@ -2120,6 +2133,14 @@ msgstr ""
msgid "Failed to save game"
msgstr ""
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2235,6 +2256,35 @@ msgid ""
"some tracks sound incorrect."
msgstr ""
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2350,6 +2400,14 @@ msgstr ""
msgid "Display/Hide Pause Menu"
msgstr ""
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr ""
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr ""
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr ""
@@ -2485,36 +2543,36 @@ msgstr ""
msgid "~N~ext"
msgstr ""
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr ""
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr ""
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr ""
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr ""
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr ""
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr ""
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr ""
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr ""
@@ -2572,10 +2630,6 @@ msgstr ""
msgid "Enter"
msgstr ""
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr ""
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr ""
@@ -3031,20 +3085,32 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
msgstr ""
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
"directory inside the Tentacle game directory."
msgstr ""
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3137,3 +3203,11 @@ msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
diff --git a/po/se_SE.po b/po/se_SE.po
index 22119e582e..d08f6962c9 100644
--- a/po/se_SE.po
+++ b/po/se_SE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-08-16 12:47+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-02 16:30+0100\n"
"Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n"
"Language-Team: \n"
@@ -89,7 +89,7 @@ msgstr "Visa tangentbord"
msgid "Remap keys"
msgstr "Stфll in tangenter"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Fullskфrmslфge"
@@ -109,13 +109,15 @@ msgstr "Stфll in"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1823
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -357,7 +359,7 @@ msgstr "Vфlj katalog med speldata"
msgid "Select additional game directory"
msgstr "Vфlj en ytterligare spelkatalog"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Vфlj katalog fіr spardata"
@@ -454,7 +456,7 @@ msgstr "Sіk:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Ladda spel:"
@@ -463,7 +465,7 @@ msgstr "Ladda spel:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Ladda"
@@ -481,6 +483,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Ja"
@@ -490,6 +493,7 @@ msgstr "Ja"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Nej"
@@ -912,10 +916,6 @@ msgstr "Sprхk fіr ScummVM:s anvфndargrфnssnitt"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Du mхste starta om ScummVM fіr att фndringarna ska fх effekt."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Vфlj katalog fіr spardata"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
@@ -1027,7 +1027,7 @@ msgstr "Inaktiverad GFX"
msgid "Standard Renderer"
msgstr "Standard rendering"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Standard"
@@ -1276,8 +1276,9 @@ msgstr "Хte~r~vфnd till launcher"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Spara spelet:"
@@ -1287,9 +1288,10 @@ msgstr "Spara spelet:"
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Spara"
@@ -1313,12 +1315,12 @@ msgstr ""
"information och instruktioner fіr hur du kan fх mer hjфlp."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "A~v~bryt"
@@ -2083,28 +2085,30 @@ msgstr "Klickning deaktiverad"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Anvфnd originalskфrmar fіr spara/ladda"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr "Anvфnder originalskфrmarna fіr spara/ladda istфllet fіr ScummVM:s"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Хterstфll spel:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Хterstфll"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2365
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2115,7 +2119,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2358
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2126,7 +2130,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2376
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2142,6 +2146,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Filmscensfilen '%s' hittades ej!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Klicklфge"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2169,11 +2182,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Visa grafik med spelets ljusa palett"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Kunde inte lфsa spardata frхn filen"
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Kunde inte skriva spardata till filen."
@@ -2193,6 +2207,14 @@ msgstr "Spela filmer i hіgre hastighet"
msgid "Failed to save game"
msgstr "Kunde inte spara spelet."
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2313,6 +2335,35 @@ msgstr ""
"General MIDI-instrument. Det kan trots allt hфnda\n"
"att ett fхtal ljudspхr inte spelas korrekt."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2441,6 +2492,14 @@ msgstr "Visa/dіlj informationsskфrm"
msgid "Display/Hide Pause Menu"
msgstr "Visa/dіlj pausmeny"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Alternativt intro"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Anvфnd alternativt spelintro (endast CD-version)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA anti-gitter"
@@ -2580,36 +2639,36 @@ msgstr "~F~іregхende"
msgid "~N~ext"
msgstr "~N~фsta"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Endast tal"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Tal och undertexter"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Endast undertexter"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Tal & text"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Vфlj en skicklighetsnivх."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "Hфnvisa till din Loom(TM)-manual fіr hjфlp."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "жvning"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Expert"
@@ -2667,10 +2726,6 @@ msgstr "Spara speldata 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Fullskфrmslфge"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Musikvolym hіj / sфnk"
@@ -3126,7 +3181,7 @@ msgstr "Flyg хt hіger"
msgid "Fly to lower right"
msgstr "Flyg хt nedre hіger"
-#: engines/scumm/scumm.cpp:1821
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3135,7 +3190,7 @@ msgstr ""
"Stіd fіr Native MIDI krфver Roland-uppdateringen frхn LucasArts,\n"
"men %s saknas. Anvфnder AdLib istфllet."
-#: engines/scumm/scumm.cpp:2591
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3145,6 +3200,18 @@ msgstr ""
"фn. Fіr att spela spelet, gх till \"Lфgg till spel\" i ScummVM:s huvudmeny "
"och vфlj \"Maniac\"-katalogen inuti \"Tentacle\" katalogen."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3253,6 +3320,14 @@ msgstr ""
"Teenagent.dat-filen фr komprimerad och zlib har inte inkluderats i det hфr "
"programmet. Var god dekomprimera den"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
#~ msgstr "MPEG-2-filmscener hittades men ScummVM har byggts utan MPEG-2"
@@ -3271,12 +3346,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Standard (16 bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Alternativt intro"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Anvфnd alternativt spelintro (endast CD-version)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "MPEG2 filmscener stіds inte lфngre"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index 09dcbc38ab..5a7554189e 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2014-06-07 23:06+0100\n"
+"POT-Creation-Date: 2014-10-04 00:58+0100\n"
"PO-Revision-Date: 2014-07-01 02:34+0300\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Ukrainian\n"
@@ -89,7 +89,7 @@ msgstr "Показати клавіатуру"
msgid "Remap keys"
msgstr "Перепризначити клавіші"
-#: gui/gui-manager.cpp:131 base/main.cpp:326
+#: gui/gui-manager.cpp:131 base/main.cpp:326 engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
msgstr "Перемкнути повноекранний режим"
@@ -109,13 +109,15 @@ msgstr "Призначити"
#: backends/platform/wince/CELauncherDialog.cpp:54
#: engines/agos/animation.cpp:558 engines/drascula/saveload.cpp:49
#: engines/groovie/script.cpp:399 engines/parallaction/saveload.cpp:274
-#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1779
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:524 engines/sword1/animation.cpp:545
-#: engines/sword1/animation.cpp:561 engines/sword1/animation.cpp:569
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/sword2/animation.cpp:425 engines/sword2/animation.cpp:445
-#: engines/sword2/animation.cpp:461 engines/sword2/animation.cpp:471
+#: engines/scumm/dialogs.cpp:193 engines/scumm/scumm.cpp:1825
+#: engines/scumm/players/player_v3m.cpp:130
+#: engines/scumm/players/player_v5m.cpp:108 engines/sky/compact.cpp:131
+#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:524
+#: engines/sword1/animation.cpp:545 engines/sword1/animation.cpp:561
+#: engines/sword1/animation.cpp:569 engines/sword1/control.cpp:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:425
+#: engines/sword2/animation.cpp:445 engines/sword2/animation.cpp:461
+#: engines/sword2/animation.cpp:471
msgid "OK"
msgstr "OK"
@@ -357,7 +359,7 @@ msgstr "Виберіть папку з файлами гри"
msgid "Select additional game directory"
msgstr "Виберіть додаткову папку гри"
-#: gui/launcher.cpp:559
+#: gui/launcher.cpp:559 gui/options.cpp:1379
msgid "Select directory for saved games"
msgstr "Виберіть папку для збережень"
@@ -454,7 +456,7 @@ msgstr "Пошук:"
#: gui/launcher.cpp:685 engines/dialogs.cpp:115 engines/cruise/menu.cpp:214
#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:718
-#: engines/pegasus/pegasus.cpp:353
+#: engines/pegasus/pegasus.cpp:353 engines/tsage/scenes.cpp:600
msgid "Load game:"
msgstr "Завантажити гру:"
@@ -463,7 +465,7 @@ msgstr "Завантажити гру:"
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/cruise/menu.cpp:214 engines/mohawk/myst.cpp:245
#: engines/mohawk/riven.cpp:718 engines/pegasus/pegasus.cpp:353
-#: engines/scumm/dialogs.cpp:189
+#: engines/scumm/dialogs.cpp:189 engines/tsage/scenes.cpp:600
msgid "Load"
msgstr "Завантажити"
@@ -481,6 +483,7 @@ msgstr ""
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "Yes"
msgstr "Так"
@@ -490,6 +493,7 @@ msgstr "Так"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
#: backends/platform/wince/CELauncherDialog.cpp:83
+#: engines/kyra/saveload_eob.cpp:557 engines/kyra/saveload_eob.cpp:590
msgid "No"
msgstr "Ні"
@@ -760,7 +764,8 @@ msgid ""
"Check if you want to enable patch mappings to emulate an MT-32 on a Roland "
"GS device"
msgstr ""
-"Відмітьте, якщо хочете включити латки для іструментів для емуляції MT-32 на Roland"
+"Відмітьте, якщо хочете включити латки для іструментів для емуляції MT-32 на "
+"Roland"
#: gui/options.cpp:900
msgid "Don't use Roland MT-32 music"
@@ -914,10 +919,6 @@ msgstr "Мова графічного інтерфейсу ScummVM"
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "Ви повинні перезапустити ScummVM щоб застосувати зміни."
-#: gui/options.cpp:1379
-msgid "Select directory for saved games"
-msgstr "Виберіть папку для збережень"
-
#: gui/options.cpp:1386
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не можу писати у вибрану папку. Будь ласка, вкажіть іншу."
@@ -1028,7 +1029,7 @@ msgstr "Без графіки"
msgid "Standard Renderer"
msgstr "Стандартний растеризатор"
-#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:659
+#: gui/ThemeEngine.cpp:348 engines/scumm/dialogs.cpp:661
msgid "Standard"
msgstr "Стандартний"
@@ -1275,8 +1276,9 @@ msgstr "~П~овер.в головне меню"
#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:803
#: engines/cruise/menu.cpp:212 engines/drascula/saveload.cpp:336
-#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
-#: engines/sci/engine/kfile.cpp:758 engines/toltecs/menu.cpp:281
+#: engines/dreamweb/saveload.cpp:261 engines/neverhood/menumodule.cpp:873
+#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save game:"
msgstr "Зберегти гру: "
@@ -1286,9 +1288,10 @@ msgstr "Зберегти гру: "
#: backends/platform/wince/CEActionsSmartphone.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:231
#: engines/agi/saveload.cpp:803 engines/cruise/menu.cpp:212
-#: engines/drascula/saveload.cpp:336 engines/neverhood/menumodule.cpp:873
-#: engines/pegasus/pegasus.cpp:377 engines/sci/engine/kfile.cpp:758
-#: engines/scumm/dialogs.cpp:188 engines/toltecs/menu.cpp:281
+#: engines/drascula/saveload.cpp:336 engines/dreamweb/saveload.cpp:261
+#: engines/neverhood/menumodule.cpp:873 engines/pegasus/pegasus.cpp:377
+#: engines/sci/engine/kfile.cpp:758 engines/scumm/dialogs.cpp:188
+#: engines/toltecs/menu.cpp:281 engines/tsage/scenes.cpp:598
msgid "Save"
msgstr "Записати"
@@ -1312,12 +1315,12 @@ msgstr ""
"основної інормації, а також інструкцій, як отримати подальшу допомогу."
#: engines/dialogs.cpp:307 engines/mohawk/dialogs.cpp:109
-#: engines/mohawk/dialogs.cpp:170
+#: engines/mohawk/dialogs.cpp:170 engines/tsage/dialogs.cpp:106
msgid "~O~K"
msgstr "~O~K"
#: engines/dialogs.cpp:308 engines/mohawk/dialogs.cpp:110
-#: engines/mohawk/dialogs.cpp:171
+#: engines/mohawk/dialogs.cpp:171 engines/tsage/dialogs.cpp:107
msgid "~C~ancel"
msgstr "Ві~д~міна"
@@ -2004,37 +2007,37 @@ msgstr "Головне меню"
msgid "Do you really want to quit?"
msgstr "Ви дійсно хочете вийти?"
-#: backends/events/gph/gph-events.cpp:386
-#: backends/events/gph/gph-events.cpp:429
+#: backends/events/gph/gph-events.cpp:385
+#: backends/events/gph/gph-events.cpp:428
#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Режим дотику у тачскріні - Лівий клік"
-#: backends/events/gph/gph-events.cpp:388
-#: backends/events/gph/gph-events.cpp:431
+#: backends/events/gph/gph-events.cpp:387
+#: backends/events/gph/gph-events.cpp:430
#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Режим дотику у тачскріні - Правий клік"
-#: backends/events/gph/gph-events.cpp:390
-#: backends/events/gph/gph-events.cpp:433
+#: backends/events/gph/gph-events.cpp:389
+#: backends/events/gph/gph-events.cpp:432
#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Режим дотику у тачскріні - Проліт (без кліку)"
-#: backends/events/gph/gph-events.cpp:410
+#: backends/events/gph/gph-events.cpp:409
msgid "Maximum Volume"
msgstr "Максимальна Гучність"
-#: backends/events/gph/gph-events.cpp:412
+#: backends/events/gph/gph-events.cpp:411
msgid "Increasing Volume"
msgstr "Підвищення гучності"
-#: backends/events/gph/gph-events.cpp:418
+#: backends/events/gph/gph-events.cpp:417
msgid "Minimal Volume"
msgstr "Мінімальна Гучність"
-#: backends/events/gph/gph-events.cpp:420
+#: backends/events/gph/gph-events.cpp:419
msgid "Decreasing Volume"
msgstr "Пониження гучності"
@@ -2070,40 +2073,42 @@ msgstr "Показати клавіатуру"
msgid "Control Mouse"
msgstr "Управління мишею"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Enabled"
msgstr "Кліки увімкнено"
-#: backends/events/maemosdl/maemosdl-events.cpp:192
+#: backends/events/maemosdl/maemosdl-events.cpp:180
msgid "Clicking Disabled"
msgstr "Кліки вимкнено"
#: engines/agi/detection.cpp:142 engines/drascula/detection.cpp:302
#: engines/dreamweb/detection.cpp:47 engines/neverhood/detection.cpp:160
-#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:186
+#: engines/sci/detection.cpp:394 engines/toltecs/detection.cpp:200
+#: engines/zvision/detection.cpp:103
msgid "Use original save/load screens"
msgstr "Використовувати ориг. збереження/завантаження екрани"
#: engines/agi/detection.cpp:143 engines/drascula/detection.cpp:303
#: engines/dreamweb/detection.cpp:48 engines/neverhood/detection.cpp:161
-#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:187
+#: engines/sci/detection.cpp:395 engines/toltecs/detection.cpp:201
+#: engines/zvision/detection.cpp:104
msgid "Use the original save/load screens, instead of the ScummVM ones"
msgstr ""
"Використовувати оригінальні збереження/завантаження екрани, замість ScummVM"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore game:"
msgstr "Відновити гру:"
#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:349
-#: engines/neverhood/menumodule.cpp:886 engines/sci/engine/kfile.cpp:857
-#: engines/toltecs/menu.cpp:256
+#: engines/dreamweb/saveload.cpp:169 engines/neverhood/menumodule.cpp:886
+#: engines/sci/engine/kfile.cpp:857 engines/toltecs/menu.cpp:256
msgid "Restore"
msgstr "Відновити"
-#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2321
+#: engines/agos/saveload.cpp:160 engines/scumm/scumm.cpp:2368
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -2114,7 +2119,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2314
+#: engines/agos/saveload.cpp:195 engines/scumm/scumm.cpp:2361
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2125,7 +2130,7 @@ msgstr ""
"\n"
"%s"
-#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2332
+#: engines/agos/saveload.cpp:203 engines/scumm/scumm.cpp:2379
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -2141,6 +2146,15 @@ msgstr ""
msgid "Cutscene file '%s' not found!"
msgstr "Файл ролику '%s' не знайдено!"
+#: engines/cge/detection.cpp:105 engines/cge2/detection.cpp:81
+#, fuzzy
+msgid "Color Blind Mode"
+msgstr "Режим кліків"
+
+#: engines/cge/detection.cpp:106 engines/cge2/detection.cpp:82
+msgid "Enable Color Blind Mode by default"
+msgstr ""
+
#: engines/drascula/saveload.cpp:47
msgid ""
"ScummVM found that you have old savefiles for Drascula that should be "
@@ -2167,11 +2181,12 @@ msgid "Display graphics using the game's bright palette"
msgstr "Відображення графіки з використанням яскравої палітри ігр"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1470
-#: engines/tinsel/saveload.cpp:532
+#: engines/gob/inter_geisha.cpp:232 engines/tinsel/saveload.cpp:532
msgid "Failed to load game state from file."
msgstr "Не вдалося завантажити стан гри з файлу."
-#: engines/gob/inter_v2.cpp:1540 engines/tinsel/saveload.cpp:545
+#: engines/gob/inter_v2.cpp:1540 engines/gob/inter_geisha.cpp:263
+#: engines/tinsel/saveload.cpp:545
msgid "Failed to save game state to file."
msgstr "Не вдалося зберегти стан гри у файл."
@@ -2191,6 +2206,14 @@ msgstr "Програвати відео з підвищенною швидкістю"
msgid "Failed to save game"
msgstr "Не вдалося записати гру"
+#: engines/hopkins/detection.cpp:76 engines/hopkins/detection.cpp:86
+msgid "Gore Mode"
+msgstr ""
+
+#: engines/hopkins/detection.cpp:77 engines/hopkins/detection.cpp:87
+msgid "Enable Gore Mode when available"
+msgstr ""
+
#. I18N: Studio audience adds an applause and cheering sounds whenever
#. Malcolm makes a joke.
#: engines/kyra/detection.cpp:62
@@ -2311,6 +2334,35 @@ msgstr ""
"MT32 на General MIDI. Але в результаті може\n"
"статися, що деякі треки будуть грати неправильно."
+#: engines/kyra/saveload_eob.cpp:557
+#, c-format
+msgid ""
+"The following original save game file has been found in your game path:\n"
+"\n"
+"%s %s\n"
+"\n"
+"Do you wish to use this save game file with ScummVM?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:590
+#, c-format
+msgid ""
+"A save game file was found in the specified slot %d. Overwrite?\n"
+"\n"
+msgstr ""
+
+#: engines/kyra/saveload_eob.cpp:623
+#, c-format
+msgid ""
+"%d original save game files have been successfully imported into\n"
+"ScummVM. If you want to manually import original save game files later you "
+"will\n"
+"need to open the ScummVM debug console and use the command "
+"'import_savefile'.\n"
+"\n"
+msgstr ""
+
#. I18N: Option for fast scene switching
#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
msgid "~Z~ip Mode Activated"
@@ -2438,6 +2490,14 @@ msgstr "Показати/Сховати інфоекран"
msgid "Display/Hide Pause Menu"
msgstr "Показувати/Сховати меню паузи"
+#: engines/queen/detection.cpp:56
+msgid "Alternative intro"
+msgstr "Алтернативний вступ"
+
+#: engines/queen/detection.cpp:57
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Використовувати альтернативний вступ гри (тільки CD версія)"
+
#: engines/sci/detection.cpp:374
msgid "EGA undithering"
msgstr "EGA без растрування"
@@ -2577,36 +2637,36 @@ msgstr "~П~опер"
msgid "~N~ext"
msgstr "~Н~аст"
-#: engines/scumm/dialogs.cpp:598
+#: engines/scumm/dialogs.cpp:600
msgid "Speech Only"
msgstr "Тільки озвучка"
-#: engines/scumm/dialogs.cpp:599
+#: engines/scumm/dialogs.cpp:601
msgid "Speech and Subtitles"
msgstr "Озвучка та субтитри"
-#: engines/scumm/dialogs.cpp:600
+#: engines/scumm/dialogs.cpp:602
msgid "Subtitles Only"
msgstr "Тільки субтитри"
-#: engines/scumm/dialogs.cpp:608
+#: engines/scumm/dialogs.cpp:610
msgctxt "lowres"
msgid "Speech & Subs"
msgstr "Озвучка та текст"
-#: engines/scumm/dialogs.cpp:654
+#: engines/scumm/dialogs.cpp:656
msgid "Select a Proficiency Level."
msgstr "Оберіть режим складності."
-#: engines/scumm/dialogs.cpp:656
+#: engines/scumm/dialogs.cpp:658
msgid "Refer to your Loom(TM) manual for help."
msgstr "За допомогою звертайтеся до інструкції Loom(TM)."
-#: engines/scumm/dialogs.cpp:660
+#: engines/scumm/dialogs.cpp:662
msgid "Practice"
msgstr "Практика"
-#: engines/scumm/dialogs.cpp:661
+#: engines/scumm/dialogs.cpp:663
msgid "Expert"
msgstr "Експерт"
@@ -2664,10 +2724,6 @@ msgstr "Зберегти стан гри 1-10"
msgid "Enter"
msgstr "Enter"
-#: engines/scumm/help.cpp:86
-msgid "Toggle fullscreen"
-msgstr "Увімкнути повноекранний режим"
-
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
msgstr "Гучність музики вище / нижче"
@@ -3123,7 +3179,7 @@ msgstr "Летіти направо"
msgid "Fly to lower right"
msgstr "Летіти донизу направо"
-#: engines/scumm/scumm.cpp:1777
+#: engines/scumm/scumm.cpp:1823
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -3132,7 +3188,7 @@ msgstr ""
"Режим \"рідного\" MIDI потребує поновлення Roland Upgrade від\n"
"LucasArts, проте %s відсутній. Перемикаюсь на AdLib."
-#: engines/scumm/scumm.cpp:2547
+#: engines/scumm/scumm.cpp:2594
msgid ""
"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
@@ -3142,6 +3198,18 @@ msgstr ""
"вміє. Щоб грати у нього, оберіть 'Додати гру' у початковому меню ScummVM, і "
"виберіть папку Maniac всередені пвпки з грою Tentacle."
+#: engines/scumm/players/player_v3m.cpp:129
+msgid ""
+"Could not find the 'Loom' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
+#: engines/scumm/players/player_v5m.cpp:107
+msgid ""
+"Could not find the 'Monkey Island' Macintosh executable to read the\n"
+"instruments from. Music will be disabled."
+msgstr ""
+
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
@@ -3175,9 +3243,11 @@ msgstr " ролик PSX потоку '%s' не можуть бути відтворені у режимі палітри"
msgid "DXA cutscenes found but ScummVM has been built without zlib"
msgstr "Знайдено ролики DXA, але ScummVM був побудований без підтримки zlib"
-#: engines/sword1/animation.cpp:561
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
-msgstr "Знайдені ролики MPEG-2, але ScummVM був зібраний без підтримки MPEG-2"
+#: engines/sword1/animation.cpp:561 engines/sword2/animation.cpp:461
+msgid ""
+"MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
+msgstr ""
+"Знайдено ролики MPEG-2, але ScummVM був побудований без підтримки MPEG-2"
#: engines/sword1/animation.cpp:568 engines/sword2/animation.cpp:470
#, c-format
@@ -3225,11 +3295,8 @@ msgstr "На цьому закінчується демо Broken Sword 1"
#: engines/sword2/animation.cpp:425
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
-msgstr "Знайдені PSX ролики, але ScummVM був зібраний без підтримки RGB кольорів"
-
-#: engines/sword2/animation.cpp:461
-msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2 support"
-msgstr "Знайдено ролики MPEG-2, але ScummVM був побудований без підтримки MPEG-2"
+msgstr ""
+"Знайдені PSX ролики, але ScummVM був зібраний без підтримки RGB кольорів"
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
@@ -3253,6 +3320,18 @@ msgstr ""
"Файл teenagent.dat запаковано, але zlib не було включено в цю программу.Будь-"
"ласка розпакуйте його"
+#: engines/wintermute/detection.cpp:58
+msgid "Show FPS-counter"
+msgstr ""
+
+#: engines/wintermute/detection.cpp:59
+msgid "Show the current number of frames per second in the upper left corner"
+msgstr ""
+
+#~ msgid "MPEG-2 cutscenes found but ScummVM has been built without MPEG-2"
+#~ msgstr ""
+#~ "Знайдені ролики MPEG-2, але ScummVM був зібраний без підтримки MPEG-2"
+
#~ msgctxt "lowres"
#~ msgid "Mass Add..."
#~ msgstr "Дод. багато..."
@@ -3268,12 +3347,6 @@ msgstr ""
#~ msgid "Standard (16bpp)"
#~ msgstr "Стандартний растеризатор (16bpp)"
-#~ msgid "Alternative intro"
-#~ msgstr "Алтернативний вступ"
-
-#~ msgid "Use an alternative game intro (CD version only)"
-#~ msgstr "Використовувати альтернативний вступ гри (тільки CD версія)"
-
#~ msgid "MPEG2 cutscenes are no longer supported"
#~ msgstr "Ролики MPEG2 більше не підтримуються"
diff --git a/ports.mk b/ports.mk
index 97b43fe92e..fdab7e23af 100644
--- a/ports.mk
+++ b/ports.mk
@@ -12,6 +12,8 @@ install:
$(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(mandir)/man6/scummvm.6"
$(INSTALL) -d "$(DESTDIR)$(datarootdir)/pixmaps/"
$(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.xpm" "$(DESTDIR)$(datarootdir)/pixmaps/scummvm.xpm"
+ $(INSTALL) -d "$(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/"
+ $(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.svg" "$(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/scummvm.svg"
$(INSTALL) -d "$(DESTDIR)$(docdir)"
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(docdir)"
$(INSTALL) -d "$(DESTDIR)$(datadir)"
@@ -28,6 +30,8 @@ install-strip:
$(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(mandir)/man6/scummvm.6"
$(INSTALL) -d "$(DESTDIR)$(datarootdir)/pixmaps/"
$(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.xpm" "$(DESTDIR)$(datarootdir)/pixmaps/scummvm.xpm"
+ $(INSTALL) -d "$(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/"
+ $(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.svg" "$(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/scummvm.svg"
$(INSTALL) -d "$(DESTDIR)$(docdir)"
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(docdir)"
$(INSTALL) -d "$(DESTDIR)$(datadir)"
@@ -41,6 +45,7 @@ uninstall:
rm -f "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
rm -f "$(DESTDIR)$(mandir)/man6/scummvm.6"
rm -f "$(DESTDIR)$(datarootdir)/pixmaps/scummvm.xpm"
+ rm -f "$(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/scummvm.svg"
rm -rf "$(DESTDIR)$(docdir)"
rm -rf "$(DESTDIR)$(datadir)"
ifdef DYNAMIC_MODULES
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 39deaea204..d9761e1c38 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -528,7 +528,10 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) {
// Recreate the audio stream
audioTrack->resetStream();
- uint framesNeeded = _header.initialFrames;
+ uint framesNeeded = _header.initialFrames;
+ if (framesNeeded == 0)
+ framesNeeded = 1;
+
uint startAudioChunk = 0;
int startAudioSearch = (lastRecord < 0) ? (frameIndex - 1) : (lastRecord - 1);