diff options
303 files changed, 5546 insertions, 5403 deletions
diff --git a/backends/fs/ps2/ps2-fs-factory.cpp b/backends/fs/ps2/ps2-fs-factory.cpp index 8d3c22d2d0..05c18c8a7f 100644 --- a/backends/fs/ps2/ps2-fs-factory.cpp +++ b/backends/fs/ps2/ps2-fs-factory.cpp @@ -23,6 +23,10 @@ */ #if defined(__PLAYSTATION2__) + +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "backends/fs/ps2/ps2-fs-factory.h" #include "backends/fs/ps2/ps2-fs.cpp" diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index db8e41af48..bf9fc1d826 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -1,13 +1,10 @@ srcdir ?= . DEPDIR := .deps -VERBOSE_BUILD = 0 -DYNAMIC_MODULES = 1 +#DYNAMIC_MODULES = 1 libndsdir = $(DEVKITPRO)/libnds #libndsdir = /home/neil/devkitpror21/libnds -ENABLED = DYNAMIC_PLUGIN - # Select the build by setting SCUMM_BUILD to a,b,c,d,e,f or g. # Anything else gets build a. @@ -15,7 +12,7 @@ ifeq ($(SCUMM_BUILD),k) DS_BUILD_K = 1 else ifeq ($(SCUMM_BUILD),j) - DS_BUILD_J = 1 + DS_BUILD_J = 1 else ifeq ($(SCUMM_BUILD),i) DS_BUILD_I = 1 @@ -67,7 +64,7 @@ ifdef DS_BUILD_F else ifdef DS_BUILD_E # TODO: Inherit the earth uses so much RAM that I have removed libmad in order to - # claw some back. + # claw some back. @@ -78,7 +75,7 @@ else ifdef DS_BUILD_K else - #USE_MAD = 1 + # USE_MAD = 1 endif endif endif @@ -115,7 +112,7 @@ USE_ARM_COSTUME_ASM = 1 ifdef DS_BUILD_A DEFINES = -DDS_BUILD_A -DUSE_ARM_GFX_ASM -DUSE_ARM_COSTUME_ASM LOGO = logoa.bmp - ENABLE_SCUMM = $(ENABLED) + ENABLE_SCUMM = STATIC_PLUGIN USE_ARM_GFX_ASM = 1 BUILD=scummvm-A endif @@ -123,66 +120,66 @@ endif ifdef DS_BUILD_B DEFINES = -DDS_BUILD_B LOGO = logob.bmp - ENABLE_SKY = $(ENABLED) - ENABLE_QUEEN = $(ENABLED) + ENABLE_SKY = STATIC_PLUGIN + ENABLE_QUEEN = STATIC_PLUGIN BUILD=scummvm-B endif ifdef DS_BUILD_C DEFINES = -DDS_BUILD_C LOGO = logoc.bmp - ENABLE_AGOS = $(ENABLED) + ENABLE_AGOS = STATIC_PLUGIN BUILD=scummvm-C endif ifdef DS_BUILD_D DEFINES = -DDS_BUILD_D LOGO = logod.bmp - ENABLE_GOB = $(ENABLED) - ENABLE_CINE = $(ENABLED) - ENABLE_AGI = $(ENABLED) + ENABLE_GOB = STATIC_PLUGIN + ENABLE_CINE = STATIC_PLUGIN + ENABLE_AGI = STATIC_PLUGIN BUILD=scummvm-D endif ifdef DS_BUILD_E DEFINES = -DDS_BUILD_E LOGO = logoe.bmp - ENABLE_SAGA = $(ENABLED) + ENABLE_SAGA = STATIC_PLUGIN BUILD=scummvm-E endif ifdef DS_BUILD_F DEFINES = -DDS_BUILD_F LOGO = logof.bmp - ENABLE_KYRA = $(ENABLED) + ENABLE_KYRA = STATIC_PLUGIN BUILD=scummvm-F endif ifdef DS_BUILD_G DEFINES = -DDS_BUILD_G LOGO = logog.bmp - ENABLE_LURE = $(ENABLED) + ENABLE_LURE = STATIC_PLUGIN BUILD=scummvm-G endif ifdef DS_BUILD_H DEFINES = -DDS_BUILD_H LOGO = logoh.bmp - ENABLE_PARALLACTION = $(ENABLED) + ENABLE_PARALLACTION = STATIC_PLUGIN BUILD=scummvm-H endif ifdef DS_BUILD_I DEFINES = -DDS_BUILD_I LOGO = logoi.bmp - ENABLE_MADE = $(ENABLED) + ENABLE_MADE = STATIC_PLUGIN BUILD=scummvm-I endif ifdef DS_BUILD_K DEFINES = -DDS_BUILD_K LOGO = logok.bmp - ENABLE_CRUISE = $(ENABLED) + ENABLE_CRUISE = STATIC_PLUGIN BUILD=scummvm-K endif @@ -190,18 +187,18 @@ endif #ifdef DS_BUILD_L # DEFINES = -DDS_BUILD_L # LOGO = logog.bmp -# ENABLE_DRASCULA = $(ENABLED) +# ENABLE_DRASCULA = STATIC_PLUGIN # BUILD=scummvm-K #endif #ifdef DS_BUILD_M # DEFINES = -DDS_BUILD_M # LOGO = logog.bmp -# ENABLE_TUCKER = $(ENABLED) +# ENABLE_TUCKER = STATIC_PLUGIN # BUILD=scummvm-K #endif -ARM7BIN := -7 $(CURDIR)/../arm7/arm7.bin +ARM7BIN := -7 $(CURDIR)/../../arm7/arm7.bin CC = arm-eabi-gcc CXX = arm-eabi-g++ @@ -239,14 +236,14 @@ CXXFLAGS= $(CFLAGS) -Wno-non-virtual-dtor -Wno-unknown-pragmas -Wno-reorder \ ASFLAGS = -mcpu=arm9tdmi -mthumb-interwork -DEFINES += -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555 -DDISABLE_DOSBOX_OPL -DDISABLE_DEFAULT_SAVEFILEMANAGER -DUSE_ELF_LOADER -DARM -DARM_TARGET -DONE_PLUGIN_AT_A_TIME +DEFINES += -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555 -DDISABLE_DOSBOX_OPL -DDISABLE_DEFAULT_SAVEFILEMANAGER -DARM ifdef USE_MAD DEFINES += -DUSE_MAD endif DEFINES += -DREDUCE_MEMORY_USAGE -LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,--target1-abs,-Map,map.txt#-Wl,--gc-sections +LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections ifdef WRAP_MALLOC LDFLAGS += -Wl,--wrap,malloc @@ -255,11 +252,12 @@ endif BACKEND := ds -INCLUDES= -I$(portdir) -I$(srcdir) -I$(srcdir)/engines \ +INCLUDES= -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/engines \ -I$(portdir)/data -I$(portdir)/../commoninclude \ -I$(portdir)/source -I$(portdir)/source/mad \ -I$(libndsdir)/include -include $(srcdir)/common/scummsys.h + LIBS = -lm -L$(libndsdir)/lib -L$(portdir)/lib -lnds9 ifdef USE_MAD LIBS += -lmad @@ -268,19 +266,7 @@ ifdef USE_DEBUGGER LIBS += -ldsdebugger -ldswifi9 endif -ifeq ($(DYNAMIC_MODULES),1) -DEFINES += -DDYNAMIC_MODULES -PRE_OBJS_FLAGS = -Wl,--whole-archive -POST_OBJS_FLAGS = -Wl,--no-whole-archive -endif - EXECUTABLE = scummvm.elf - -PLUGIN_PREFIX = -PLUGIN_SUFFIX = .plg -PLUGIN_EXTRA_DEPS = $(srcdir)/backends/plugins/ds/plugin.ld $(srcdir)/backends/plugins/elf/plugin.syms $(EXECUTABLE) -PLUGIN_LDFLAGS += -nostartfiles -Wl,-q,--target1-abs,--just-symbols,$(EXECUTABLE),-T$(srcdir)/backends/plugins/ds/plugin.ld,--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms -lstdc++ -lc -mthumb-interwork -mno-fpu#-Wl,--gc-sections -mno-crt0 $(DEVKITPRO)/devkitARM/arm-eabi/lib/ds_arm9_crt0.o - MKDIR = mkdir -p RM = rm -f RM_REC = rm -rf @@ -354,22 +340,25 @@ OPT_SIZE := -Os -mthumb OBJS := $(DATA_OBJS) $(PORT_OBJS) $(FAT_OBJS) + MODULE_DIRS += . -ndsall: plugins - make -f makefile scummvm.nds scummvm.ds.gba +ndsall: + @[ -d $(BUILD) ] || mkdir -p $(BUILD) + make -C ./$(BUILD) -f ../makefile scummvm.nds scummvm.ds.gba include $(srcdir)/Makefile.common semiclean: $(RM) $(portdir)/source/dsoptions.o $(portdir)/source/dsmain.o $(FAT_OBJS) $(DATA_OBJS) $(portdir)/source/wordcompletion.o $(portdir)/source/dsoptions.o -clean: #TODO: Manual removal of engine, plugins, etc. isn't very elegant! +clean: $(RM) $(OBJS) $(EXECUTABLE) - rm -rf *.h engines plugins graphics gui common sound backends base map.txt scummvm.nds scummvm.ds.gba + rm -fr $(BUILD) dist : SCUMMVM.BIN plugins plugin_dist + #--------------------------------------------------------------------------------- # canned command sequence for binary data #--------------------------------------------------------------------------------- @@ -411,14 +400,13 @@ endef #--------------------------------------------------------------------------------- %.nds: %.bin - ndstool -c $@ -9 $< $(ARM7BIN) -b ../$(LOGO) "$(@F);ScummVM $(VERSION);DS Port" + ndstool -c $@ -9 $< $(ARM7BIN) -b ../../$(LOGO) "$(@F);ScummVM $(VERSION);DS Port" %.ds.gba: %.nds dsbuild $< -o $@ -l $(portdir)/ndsloader.bin padbin 16 $@ #--------------------------------------------------------------------------------- - %.bin: %.elf $(OBJCOPY) -S -O binary $< $@ diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 3e33b168ee..a9dc05b89c 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -3229,15 +3229,11 @@ int main(void) { } // End of namespace DS -#ifndef DISABLE_TEXT_CONSOLE -extern int gDebugLevel; -#endif int main() { #ifndef DISABLE_TEXT_CONSOLE consoleDebugInit(DebugDevice_NOCASH); nocashMessage("startup\n"); - gDebugLevel = 2; #endif DS::main(); } diff --git a/backends/platform/gp2x/gp2x-hw.cpp b/backends/platform/gp2x/gp2x-hw.cpp index 6f544258ec..8818ff9fe9 100644 --- a/backends/platform/gp2x/gp2x-hw.cpp +++ b/backends/platform/gp2x/gp2x-hw.cpp @@ -51,6 +51,10 @@ #include <sys/time.h> #include <unistd.h> +extern "C" { +static unsigned long gp2x_dev[8]={0,0,0,0,0,0,0,0};//, gp2x_ticks_per_second; +} + namespace GP2X_HW { enum { diff --git a/backends/platform/gp2x/gp2x-mem.cpp b/backends/platform/gp2x/gp2x-mem.cpp index 4a1802f311..0968087cfd 100644 --- a/backends/platform/gp2x/gp2x-mem.cpp +++ b/backends/platform/gp2x/gp2x-mem.cpp @@ -42,8 +42,11 @@ #include "backends/platform/gp2x/gp2x-mem.h" -void SetClock (unsigned c) -{ +extern "C" { +static volatile unsigned short *gp2x_memregs; +} + +void SetClock (unsigned c) { unsigned v; unsigned mdiv,pdiv=3,scale=0; @@ -57,8 +60,7 @@ void SetClock (unsigned c) gp2x_memregs[0x910>>1] = v; } -void patchMMU (void) -{ +void patchMMU (void) { //volatile unsigned int *secbuf = (unsigned int *)malloc (204800); printf ("Reconfiguring cached memory regions...\n"); @@ -71,19 +73,15 @@ void patchMMU (void) int mmufd = open("/dev/mmuhack", O_RDWR); - if(mmufd < 0) - { + if(mmufd < 0) { printf ("Upper memory uncached (attempt failed, access to upper memory will be slower)...\n"); - } - else - { + } else { printf ("Upper memory cached...\n"); close(mmufd); } } -void unpatchMMU (void) -{ +void unpatchMMU (void) { printf ("Restoreing cached memory regions...\n"); system("/sbin/rmmod mmuhack"); } diff --git a/backends/platform/gp2x/gp2x-mem.h b/backends/platform/gp2x/gp2x-mem.h index 24b2a3f569..aa49444164 100644 --- a/backends/platform/gp2x/gp2x-mem.h +++ b/backends/platform/gp2x/gp2x-mem.h @@ -47,9 +47,6 @@ extern void unpatchMMU (void); #define SYS_CLK_FREQ 7372800 -static unsigned long gp2x_dev[8]={0,0,0,0,0,0,0,0};//, gp2x_ticks_per_second; -static volatile unsigned short *gp2x_ram, *gp2x_memregs; - #ifdef __cplusplus } #endif diff --git a/backends/platform/openpandora/op-main.cpp b/backends/platform/openpandora/op-main.cpp index 4febd404c3..3f4208a95a 100755 --- a/backends/platform/openpandora/op-main.cpp +++ b/backends/platform/openpandora/op-main.cpp @@ -23,6 +23,9 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/scummsys.h" #include <SDL/SDL.h> diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index d525a35b7d..1b3ae6ba47 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -26,6 +26,9 @@ // Disable symbol overrides so that we can use system headers. #define FORBIDDEN_SYMBOL_ALLOW_ALL +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include <kernel.h> #include <stdio.h> #include <stdlib.h> @@ -344,7 +347,6 @@ OSystem_PS2::OSystem_PS2(const char *elfPath) { } void OSystem_PS2::init(void) { - //msgPrintf(FOREVER, "got to init! Now restart your console... %d\n", res); sioprintf("Timer...\n"); _scummTimerManager = new DefaultTimerManager(); _scummMixer = new Audio::MixerImpl(this, 48000); diff --git a/backends/platform/psp/audio.cpp b/backends/platform/psp/audio.cpp index b5a72dccd0..d7487b0c1a 100644 --- a/backends/platform/psp/audio.cpp +++ b/backends/platform/psp/audio.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.cpp $ + * $Id: osys_psp.cpp 46126 2009-11-24 14:18:46Z fingolfin $ * */ diff --git a/backends/platform/psp/audio.h b/backends/platform/psp/audio.h index f5179028dc..ec9801185f 100644 --- a/backends/platform/psp/audio.h +++ b/backends/platform/psp/audio.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.cpp $ + * $Id: osys_psp.cpp 46126 2009-11-24 14:18:46Z fingolfin $ * */ diff --git a/backends/platform/psp/cursor.cpp b/backends/platform/psp/cursor.cpp index cf879e095a..ae3b8f0050 100644 --- a/backends/platform/psp/cursor.cpp +++ b/backends/platform/psp/cursor.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.h $ + * $Id: osys_psp.h 46120 2009-11-24 10:33:30Z Bluddy $ * */ diff --git a/backends/platform/psp/default_display_client.h b/backends/platform/psp/default_display_client.h index 2e33632eb1..716e6fcc35 100644 --- a/backends/platform/psp/default_display_client.h +++ b/backends/platform/psp/default_display_client.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/trace.h $ + * $Id: trace.h 44276 2009-09-23 16:11:23Z joostp $ * */ diff --git a/backends/platform/psp/display_client.cpp b/backends/platform/psp/display_client.cpp index 4310b195dd..9d4f573e28 100644 --- a/backends/platform/psp/display_client.cpp +++ b/backends/platform/psp/display_client.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.cpp $ + * $Id: osys_psp.cpp 46126 2009-11-24 14:18:46Z fingolfin $ * */ diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp index 7454211da6..2c94882a63 100644 --- a/backends/platform/psp/display_manager.cpp +++ b/backends/platform/psp/display_manager.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.cpp $ + * $Id: osys_psp.cpp 47541 2010-01-25 01:39:44Z lordhoto $ * */ diff --git a/backends/platform/psp/display_manager.h b/backends/platform/psp/display_manager.h index 5c7d4c799a..4537af0096 100644 --- a/backends/platform/psp/display_manager.h +++ b/backends/platform/psp/display_manager.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.cpp $ + * $Id: osys_psp.cpp 47541 2010-01-25 01:39:44Z lordhoto $ * */ diff --git a/backends/platform/psp/input.cpp b/backends/platform/psp/input.cpp index 665f41504f..0dad31e5ae 100644 --- a/backends/platform/psp/input.cpp +++ b/backends/platform/psp/input.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.cpp $ + * $Id: osys_psp.cpp 43618 2009-08-21 22:44:49Z joostp $ * */ diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp index 019f6c12d1..d24c614e33 100644 --- a/backends/platform/psp/psp_main.cpp +++ b/backends/platform/psp/psp_main.cpp @@ -37,6 +37,7 @@ #include <common/system.h> #include <engines/engine.h> #include <base/main.h> +#include <base/plugins.h> #include "backends/platform/psp/powerman.h" #include "backends/platform/psp/thread.h" diff --git a/backends/platform/psp/thread.cpp b/backends/platform/psp/thread.cpp index 3e1303a4e6..f9e497a342 100644 --- a/backends/platform/psp/thread.cpp +++ b/backends/platform/psp/thread.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/osys_psp.h $ + * $Id: osys_psp.h 49173 2010-05-24 03:05:17Z bluddy $ * */ diff --git a/backends/platform/psp/thread.h b/backends/platform/psp/thread.h index 1ca6ef5c42..bbad2a9ead 100644 --- a/backends/platform/psp/thread.h +++ b/backends/platform/psp/thread.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ + * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/psp/portdefs.h $ + * $Id: portdefs.h 38687 2009-02-21 12:08:52Z joostp $ * */ diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h index 2a26771a0a..6868faaa89 100644 --- a/backends/platform/symbian/src/portdefs.h +++ b/backends/platform/symbian/src/portdefs.h @@ -45,6 +45,13 @@ // and we _really_ don't wanna link with any other windows LIBC library! #if defined(__GCC32__) + FIXME: If the following macros are ever used, then this will lead + to serious errors, e.g. an almost guaranteed buffer overflow + in Common::String::format(). Do *NOT* re-#define vsnprintf to + vsprintf, it will lead to disaster! + This shouldn't be necessary anyway, since we have + backends/platform/symbian/src/vsnprintf.h + #define snprintf(buf,len,args...) sprintf(buf,args) #define vsnprintf(buf,len,format,valist) vsprintf(buf,format,valist) diff --git a/backends/platform/wii/options.cpp b/backends/platform/wii/options.cpp index 2a47958e3b..ffabc5ae97 100644 --- a/backends/platform/wii/options.cpp +++ b/backends/platform/wii/options.cpp @@ -183,7 +183,7 @@ void WiiOptionsDialog::handleTickle() { break; default: - label = String::printf(_("Network not initialised (%d)"), status); + label = String::format(_("Network not initialised (%d)"), status); break; } diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index 64abd0be3e..99d0be2bdc 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -23,21 +23,25 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include "backends/platform/wince/wince-sdl.h" #include "CEActionsPocket.h" #include "EventsBuffer.h" #include "gui/message.h" -#include "scumm/scumm.h" #include "common/config-manager.h" #include "gui/KeysDialog.h" #include "common/translation.h" + #ifdef _WIN32_WCE #define KEY_ALL_SKIP 3457 #endif -const String pocketActionNames[] = { +const Common::String pocketActionNames[] = { _s("Pause"), _s("Save"), _s("Quit"), @@ -64,7 +68,7 @@ void CEActionsPocket::init() { } -String CEActionsPocket::actionName(GUI::ActionType action) { +Common::String CEActionsPocket::actionName(GUI::ActionType action) { return _(pocketActionNames[action]); } @@ -72,7 +76,7 @@ int CEActionsPocket::size() { return POCKET_ACTION_LAST; } -String CEActionsPocket::domain() { +Common::String CEActionsPocket::domain() { return ConfMan.kApplicationDomain; } @@ -81,8 +85,7 @@ int CEActionsPocket::version() { } CEActionsPocket::CEActionsPocket(const Common::String &gameid) : -GUI::Actions() -{ +GUI::Actions() { int i; _right_click_needed = false; @@ -114,7 +117,7 @@ void CEActionsPocket::initInstanceMain(OSystem *mainSystem) { } void CEActionsPocket::initInstanceGame() { - String gameid(ConfMan.get("gameid")); + Common::String gameid(ConfMan.get("gameid")); bool is_simon = (strncmp(gameid.c_str(), "simon", 5) == 0); bool is_sword1 = (gameid == "sword1"); bool is_sword2 = (strcmp(gameid.c_str(), "sword2") == 0); diff --git a/backends/platform/wince/CEActionsPocket.h b/backends/platform/wince/CEActionsPocket.h index 0fe29a9e86..72a2064fbf 100644 --- a/backends/platform/wince/CEActionsPocket.h +++ b/backends/platform/wince/CEActionsPocket.h @@ -28,7 +28,7 @@ #include "common/scummsys.h" #include "common/system.h" -#include "wince-sdl.h" +#include "common/str.h" #include "gui/Key.h" #include "gui/Actions.h" @@ -58,33 +58,35 @@ enum pocketActionType { POCKET_ACTION_LAST }; +class OSystem_WINCE3; + class CEActionsPocket : public GUI::Actions { - public: - // Actions - bool perform(GUI::ActionType action, bool pushed = true); - String actionName(GUI::ActionType action); - int size(); +public: + // Actions + bool perform(GUI::ActionType action, bool pushed = true); + Common::String actionName(GUI::ActionType action); + int size(); - static void init(); - void initInstanceMain(OSystem *mainSystem); - void initInstanceGame(); + static void init(); + void initInstanceMain(OSystem *mainSystem); + void initInstanceGame(); - // Action domain - String domain(); - int version(); + // Action domain + Common::String domain(); + int version(); - // Utility - bool needsRightClickMapping(); - bool needsHideToolbarMapping(); - bool needsZoomMapping(); + // Utility + bool needsRightClickMapping(); + bool needsHideToolbarMapping(); + bool needsZoomMapping(); - ~CEActionsPocket(); - private: - CEActionsPocket(const Common::String &gameid); - bool _right_click_needed; - bool _hide_toolbar_needed; - bool _zoom_needed; - OSystem_WINCE3 *_CESystem; - }; + ~CEActionsPocket(); +private: + CEActionsPocket(const Common::String &gameid); + bool _right_click_needed; + bool _hide_toolbar_needed; + bool _zoom_needed; + OSystem_WINCE3 *_CESystem; +}; #endif diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index af80bd2908..5c7feb4950 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -23,10 +23,14 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include "backends/platform/wince/wince-sdl.h" + #include "CEActionsSmartphone.h" #include "EventsBuffer.h" #include "gui/message.h" -#include "scumm/scumm.h" #include "common/config-manager.h" #include "gui/KeysDialog.h" diff --git a/backends/platform/wince/CEActionsSmartphone.h b/backends/platform/wince/CEActionsSmartphone.h index 36797cd2c8..29156bb152 100644 --- a/backends/platform/wince/CEActionsSmartphone.h +++ b/backends/platform/wince/CEActionsSmartphone.h @@ -28,7 +28,7 @@ #include "common/scummsys.h" #include "common/system.h" -#include "wince-sdl.h" +#include "common/str.h" #include "gui/Key.h" #include "gui/Actions.h" @@ -55,24 +55,24 @@ enum smartphoneActionType { class CEActionsSmartphone : public GUI::Actions { - public: - // Actions - bool perform(GUI::ActionType action, bool pushed = true); - String actionName(GUI::ActionType action); - int size(); - static void init(); - void initInstanceMain(OSystem *mainSystem); - void initInstanceGame(); +public: + // Actions + bool perform(GUI::ActionType action, bool pushed = true); + Common::String actionName(GUI::ActionType action); + int size(); + static void init(); + void initInstanceMain(OSystem *mainSystem); + void initInstanceGame(); - // Action domain - String domain(); - int version(); + // Action domain + Common::String domain(); + int version(); - ~CEActionsSmartphone(); - private: - CEActionsSmartphone(); - bool _right_click_needed; - OSystem_WINCE3 *_CESystem; - }; + ~CEActionsSmartphone(); +private: + CEActionsSmartphone(); + bool _right_click_needed; + OSystem_WINCE3 *_CESystem; +}; #endif diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp index 98a8fb95f6..08acbbbfcd 100644 --- a/backends/platform/wince/CEDevice.cpp +++ b/backends/platform/wince/CEDevice.cpp @@ -23,11 +23,14 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "CEDevice.h" #include <SDL.h> -#include "wince-sdl.h" +#include "backends/platform/wince/wince-sdl.h" static void (WINAPI* _SHIdleTimerReset)(void) = NULL; static HANDLE (WINAPI* _SetPowerRequirement)(PVOID,int,ULONG,PVOID,ULONG) = NULL; diff --git a/backends/platform/wince/CEDevice.h b/backends/platform/wince/CEDevice.h index ca2f908c6d..b2b20d05ce 100644 --- a/backends/platform/wince/CEDevice.h +++ b/backends/platform/wince/CEDevice.h @@ -31,20 +31,20 @@ #include "common/str.h" class CEDevice { - public: - static void init(); - static void end(); - static void wakeUp(); - static bool hasPocketPCResolution(); - static bool hasSquareQVGAResolution(); - static bool hasDesktopResolution(); - static bool hasWideResolution(); - static bool hasSmartphoneResolution(); - static bool isSmartphone(); +public: + static void init(); + static void end(); + static void wakeUp(); + static bool hasPocketPCResolution(); + static bool hasSquareQVGAResolution(); + static bool hasDesktopResolution(); + static bool hasWideResolution(); + static bool hasSmartphoneResolution(); + static bool isSmartphone(); - private: - static DWORD reg_access(TCHAR *key, TCHAR *val, DWORD data); - static void backlight_xchg(); +private: + static DWORD reg_access(TCHAR *key, TCHAR *val, DWORD data); + static void backlight_xchg(); }; #endif diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp index 11e4900c2d..66a691f51b 100644 --- a/backends/platform/wince/CELauncherDialog.cpp +++ b/backends/platform/wince/CELauncherDialog.cpp @@ -23,8 +23,10 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL -#include "wince-sdl.h" +#include "backends/platform/wince/wince-sdl.h" #include "CELauncherDialog.h" diff --git a/backends/platform/wince/CEScaler.cpp b/backends/platform/wince/CEScaler.cpp index fd47635e05..182a7e0c94 100644 --- a/backends/platform/wince/CEScaler.cpp +++ b/backends/platform/wince/CEScaler.cpp @@ -22,6 +22,7 @@ * $Id$ * */ + #include "graphics/scaler/intern.h" #include "CEScaler.h" diff --git a/backends/platform/wince/CEgui/GUIElement.cpp b/backends/platform/wince/CEgui/GUIElement.cpp index 23e7843de1..7689837e3d 100644 --- a/backends/platform/wince/CEgui/GUIElement.cpp +++ b/backends/platform/wince/CEgui/GUIElement.cpp @@ -23,104 +23,108 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include <SDL.h> + #include "Toolbar.h" #include "SDL_ImageResource.h" namespace CEGUI { - GUIElement::GUIElement(int x, int y, int width, int height) : - _background(0), _drawn(false), _visible(true), _x(x), _y(y), _width(width), _height(height) - { - } +GUIElement::GUIElement(int x, int y, int width, int height) : +_background(0), _drawn(false), _visible(true), _x(x), _y(y), _width(width), _height(height) { +} - bool GUIElement::setBackground(WORD backgroundReference) { - _background = new SDL_ImageResource(); - if (!_background->load(backgroundReference)) { - delete _background; - _background = NULL; - return false; - } - if (!_height && !_width) { - _height = _background->height(); - _width = _background->width(); - } - else - if (_background->height() != _height || _background->width() != _width) { - delete _background; - _background = NULL; - return false; - } - return true; +bool GUIElement::setBackground(WORD backgroundReference) { + _background = new SDL_ImageResource(); + if (!_background->load(backgroundReference)) { + delete _background; + _background = NULL; + return false; } - - void GUIElement::move(int x, int y) { - _x = x; - _y = y; + if (!_height && !_width) { + _height = _background->height(); + _width = _background->width(); } + else + if (_background->height() != _height || _background->width() != _width) { + delete _background; + _background = NULL; + return false; + } + return true; +} - bool GUIElement::draw(SDL_Surface *surface) { - if (_background && !_drawn && _visible) { - SDL_Rect rect; - - rect.x = _x; - rect.y = _y; - rect.w = _width; - rect.h = _height; +void GUIElement::move(int x, int y) { + _x = x; + _y = y; +} - SDL_BlitSurface(_background->get(), NULL, surface, &rect); +bool GUIElement::draw(SDL_Surface *surface) { + if (_background && !_drawn && _visible) { + SDL_Rect rect; - _drawn = true; + rect.x = _x; + rect.y = _y; + rect.w = _width; + rect.h = _height; - return true; - } - else - return false; - } + SDL_BlitSurface(_background->get(), NULL, surface, &rect); - bool GUIElement::checkInside(int x, int y) { - if (x >= _x && x <= _x + _width && y >= _y && y <= _y + _height) - return true; - else - return false; - } + _drawn = true; - void GUIElement::setVisible(bool visibility) { - if (visibility && !_visible) - _drawn = false; - _visible = visibility; + return true; } + else + return false; +} - bool GUIElement::visible() { - return _visible; - } +bool GUIElement::checkInside(int x, int y) { + if (x >= _x && x <= _x + _width && y >= _y && y <= _y + _height) + return true; + else + return false; +} - void GUIElement::forceRedraw() { +void GUIElement::setVisible(bool visibility) { + if (visibility && !_visible) _drawn = false; - } + _visible = visibility; +} - bool GUIElement::drawn() { - return _drawn; - } +bool GUIElement::visible() { + return _visible; +} - int GUIElement::x() { - return _x; - } +void GUIElement::forceRedraw() { + _drawn = false; +} - int GUIElement::y() { - return _y; - } +bool GUIElement::drawn() { + return _drawn; +} - int GUIElement::width() { - return _width; - } +int GUIElement::x() { + return _x; +} - int GUIElement::height() { - return _height; - } +int GUIElement::y() { + return _y; +} - GUIElement::~GUIElement() { - delete _background; - } +int GUIElement::width() { + return _width; +} + +int GUIElement::height() { + return _height; +} +GUIElement::~GUIElement() { + delete _background; } + +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/GUIElement.h b/backends/platform/wince/CEgui/GUIElement.h index 7e4572d377..c599ebe9b5 100644 --- a/backends/platform/wince/CEgui/GUIElement.h +++ b/backends/platform/wince/CEgui/GUIElement.h @@ -29,39 +29,40 @@ #include "common/scummsys.h" #include "common/system.h" -#include "SDL.h" - -#include "SDL_ImageResource.h" +struct SDL_Surface; namespace CEGUI { - class GUIElement { - public: - bool setBackground(WORD backgroundReference); - void setVisible(bool visibility); - virtual void forceRedraw(); - virtual bool draw(SDL_Surface *surface); - virtual ~GUIElement(); - void move(int x, int y); - int width(); - int height(); - int x(); - int y(); - virtual bool action(int x, int y, bool pushed) = 0; - bool visible(); - bool drawn(); - protected: - GUIElement(int x = 0, int y = 0, int width = 0, int height = 0); - bool checkInside(int x, int y); - bool _visible; - SDL_ImageResource *_background; - int _x; - int _y; - bool _drawn; - private: - int _width; - int _height; - }; -} +class SDL_ImageResource; + +class GUIElement { +public: + bool setBackground(WORD backgroundReference); + void setVisible(bool visibility); + virtual void forceRedraw(); + virtual bool draw(SDL_Surface *surface); + virtual ~GUIElement(); + void move(int x, int y); + int width(); + int height(); + int x(); + int y(); + virtual bool action(int x, int y, bool pushed) = 0; + bool visible(); + bool drawn(); +protected: + GUIElement(int x = 0, int y = 0, int width = 0, int height = 0); + bool checkInside(int x, int y); + bool _visible; + SDL_ImageResource *_background; + int _x; + int _y; + bool _drawn; +private: + int _width; + int _height; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/ItemAction.cpp b/backends/platform/wince/CEgui/ItemAction.cpp index 3808622b2e..55805744e6 100644 --- a/backends/platform/wince/CEgui/ItemAction.cpp +++ b/backends/platform/wince/CEgui/ItemAction.cpp @@ -27,25 +27,25 @@ namespace CEGUI { - ItemAction::ItemAction(WORD reference, GUI::ActionType action) : - PanelItem(reference) { - _action = action; - if (!GUI::Actions::Instance()->isEnabled(_action)) - _visible = false; - } - - - ItemAction::~ItemAction() { - } - - bool ItemAction::action(int x, int y, bool pushed) { - - if (checkInside(x, y) && _visible && pushed) { - GUI::Actions::Instance()->perform(_action, true); - GUI::Actions::Instance()->perform(_action, false); - return true; - } - else - return false; - } +ItemAction::ItemAction(WORD reference, GUI::ActionType action) : +PanelItem(reference) { + _action = action; + if (!GUI::Actions::Instance()->isEnabled(_action)) + _visible = false; } + + +ItemAction::~ItemAction() { +} + +bool ItemAction::action(int x, int y, bool pushed) { + + if (checkInside(x, y) && _visible && pushed) { + GUI::Actions::Instance()->perform(_action, true); + GUI::Actions::Instance()->perform(_action, false); + return true; + } else + return false; +} + +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/ItemAction.h b/backends/platform/wince/CEgui/ItemAction.h index 74ed6bec4d..4f35b3090d 100644 --- a/backends/platform/wince/CEgui/ItemAction.h +++ b/backends/platform/wince/CEgui/ItemAction.h @@ -31,16 +31,18 @@ #include "gui/Actions.h" #include "CEgui/PanelItem.h" + namespace CEGUI { - class ItemAction : public PanelItem { - public: - ItemAction(WORD reference, GUI::ActionType action); - virtual ~ItemAction(); - virtual bool action(int x, int y, bool pushed); - private: - GUI::ActionType _action; - }; -} +class ItemAction : public PanelItem { +public: + ItemAction(WORD reference, GUI::ActionType action); + virtual ~ItemAction(); + virtual bool action(int x, int y, bool pushed); +private: + GUI::ActionType _action; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/ItemSwitch.cpp b/backends/platform/wince/CEgui/ItemSwitch.cpp index 8e0121f7c4..d4648f7556 100644 --- a/backends/platform/wince/CEgui/ItemSwitch.cpp +++ b/backends/platform/wince/CEgui/ItemSwitch.cpp @@ -24,71 +24,73 @@ */ #include "ItemSwitch.h" +#include "SDL_ImageResource.h" namespace CEGUI { - void ItemSwitch::init(WORD referenceTrue, WORD referenceFalse) { - _backgroundTrue = _background; - _backgroundFalse = new SDL_ImageResource(); - if (!_backgroundFalse->load(referenceFalse)) { - delete _backgroundFalse; - delete _background; - _background = NULL; - _backgroundFalse = NULL; - } +void ItemSwitch::init(WORD referenceTrue, WORD referenceFalse) { + _backgroundTrue = _background; + _backgroundFalse = new SDL_ImageResource(); + if (!_backgroundFalse->load(referenceFalse)) { + delete _backgroundFalse; + delete _background; + _background = NULL; + _backgroundFalse = NULL; } +} - ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item) : - PanelItem(referenceTrue) { - init(referenceTrue, referenceFalse); - _item = item; - _itemmax = -1; - if (!*_item) - _background = _backgroundFalse; - } +ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item) : +PanelItem(referenceTrue) { + init(referenceTrue, referenceFalse); + _item = item; + _itemmax = -1; + if (!*_item) + _background = _backgroundFalse; +} - ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max) : - PanelItem(referenceTrue) { - init(referenceTrue, referenceFalse); - _itemmultiple = item; - _itemmax = max; - if (!*item) - _background = _backgroundFalse; - } +ItemSwitch::ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max) : +PanelItem(referenceTrue) { + init(referenceTrue, referenceFalse); + _itemmultiple = item; + _itemmax = max; + if (!*item) + _background = _backgroundFalse; +} - ItemSwitch::~ItemSwitch() { - delete _backgroundFalse; - } +ItemSwitch::~ItemSwitch() { + delete _backgroundFalse; +} - bool ItemSwitch::action(int x, int y, bool pushed) { +bool ItemSwitch::action(int x, int y, bool pushed) { - if (checkInside(x, y) && _visible && pushed) { - if (_itemmax <= 0) { - *_item = !*_item; - if (*_item) - _background = _backgroundTrue; - else - _background = _backgroundFalse; + if (checkInside(x, y) && _visible && pushed) { + if (_itemmax <= 0) { + *_item = !*_item; + if (*_item) + _background = _backgroundTrue; + else + _background = _backgroundFalse; - if (_panel) - _panel->forceRedraw(); + if (_panel) + _panel->forceRedraw(); - return true; - } else { - *_itemmultiple = *_itemmultiple + 1; - if (*_itemmultiple > _itemmax) - *_itemmultiple = 0; - if (*_itemmultiple) - _background = _backgroundTrue; - else - _background = _backgroundFalse; + return true; + } else { + *_itemmultiple = *_itemmultiple + 1; + if (*_itemmultiple > _itemmax) + *_itemmultiple = 0; + if (*_itemmultiple) + _background = _backgroundTrue; + else + _background = _backgroundFalse; - if (_panel) - _panel->forceRedraw(); + if (_panel) + _panel->forceRedraw(); - return true; - } - } else - return false; - } + return true; + } + } else + return false; } + +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/ItemSwitch.h b/backends/platform/wince/CEgui/ItemSwitch.h index 8d03ee77cb..1ca6f3c288 100644 --- a/backends/platform/wince/CEgui/ItemSwitch.h +++ b/backends/platform/wince/CEgui/ItemSwitch.h @@ -36,20 +36,23 @@ using GUI::Key; namespace CEGUI { - class ItemSwitch : public PanelItem { - public: - ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item); - ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max); - virtual ~ItemSwitch(); - virtual bool action(int x, int y, bool pushed); - private: - void init(WORD referenceTrue, WORD referenceFalse); - bool *_item; - static bool _itemdummy; - int *_itemmultiple, _itemmax; - SDL_ImageResource *_backgroundTrue; - SDL_ImageResource *_backgroundFalse; - }; -} +class SDL_ImageResource; + +class ItemSwitch : public PanelItem { +public: + ItemSwitch(WORD referenceTrue, WORD referenceFalse, bool *item); + ItemSwitch(WORD referenceTrue, WORD referenceFalse, int *item, int max); + virtual ~ItemSwitch(); + virtual bool action(int x, int y, bool pushed); +private: + void init(WORD referenceTrue, WORD referenceFalse); + bool *_item; + static bool _itemdummy; + int *_itemmultiple, _itemmax; + SDL_ImageResource *_backgroundTrue; + SDL_ImageResource *_backgroundFalse; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/Panel.cpp b/backends/platform/wince/CEgui/Panel.cpp index a2d965ca78..dfdd6526be 100644 --- a/backends/platform/wince/CEgui/Panel.cpp +++ b/backends/platform/wince/CEgui/Panel.cpp @@ -27,59 +27,58 @@ namespace CEGUI { - Panel::Panel(int interleave_first, int interleave) : Toolbar() - { - _interleave = interleave; - _currentItem = interleave_first; - } +Panel::Panel(int interleave_first, int interleave) : Toolbar() { + _interleave = interleave; + _currentItem = interleave_first; +} - bool Panel::add(const String &name, const PanelItem *item) { - _itemsMap[name] = (PanelItem*)item; - _itemsMap[name]->move(_currentItem, _y + 10); - _itemsMap[name]->setPanel(this); - _currentItem += _interleave; +bool Panel::add(const String &name, const PanelItem *item) { + _itemsMap[name] = (PanelItem*)item; + _itemsMap[name]->move(_currentItem, _y + 10); + _itemsMap[name]->setPanel(this); + _currentItem += _interleave; - return true; - } + return true; +} - bool Panel::draw(SDL_Surface *surface) { - ItemMap::const_iterator iterator; - if (!_drawn && _visible) { - GUIElement::draw(surface); - for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator) { - ((GUIElement*)(iterator->_value))->draw(surface); - } - return true; +bool Panel::draw(SDL_Surface *surface) { + ItemMap::const_iterator iterator; + if (!_drawn && _visible) { + GUIElement::draw(surface); + for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator) { + ((GUIElement*)(iterator->_value))->draw(surface); } - else - return false; + return true; } + else + return false; +} - void Panel::forceRedraw() { - ItemMap::const_iterator iterator; - GUIElement::forceRedraw(); - for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator) - ((GUIElement*)(iterator->_value))->forceRedraw(); - } +void Panel::forceRedraw() { + ItemMap::const_iterator iterator; + GUIElement::forceRedraw(); + for (iterator = _itemsMap.begin(); iterator != _itemsMap.end(); ++iterator) + ((GUIElement*)(iterator->_value))->forceRedraw(); +} - bool Panel::action(int x, int y, bool pushed) { - ItemMap::const_iterator iterator; - bool result = false; - if (!_visible || !checkInside(x, y)) - return false; +bool Panel::action(int x, int y, bool pushed) { + ItemMap::const_iterator iterator; + bool result = false; + if (!_visible || !checkInside(x, y)) + return false; - for (iterator = _itemsMap.begin(); !result && iterator != _itemsMap.end(); ++iterator) - result = ((GUIElement*)(iterator->_value))->action(x, y, pushed); - return result; - } + for (iterator = _itemsMap.begin(); !result && iterator != _itemsMap.end(); ++iterator) + result = ((GUIElement*)(iterator->_value))->action(x, y, pushed); + return result; +} - void Panel::clear() { - _itemsMap.clear(); - } +void Panel::clear() { + _itemsMap.clear(); +} - Panel::~Panel() { - _itemsMap.clear(); - } +Panel::~Panel() { + _itemsMap.clear(); } +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/Panel.h b/backends/platform/wince/CEgui/Panel.h index 6626e41866..e6b693360d 100644 --- a/backends/platform/wince/CEgui/Panel.h +++ b/backends/platform/wince/CEgui/Panel.h @@ -40,23 +40,24 @@ using Common::HashMap; namespace CEGUI { - class Panel : public Toolbar { - public: - Panel(int interleave_first, int interleave); - virtual bool draw(SDL_Surface *surface); - virtual ~Panel(); - bool add(const String &name, const PanelItem *item); - void clear(); - virtual void forceRedraw(); - virtual bool action(int x, int y, bool pushed); - private: - - typedef HashMap<String, PanelItem*, Common::IgnoreCase_Hash , Common::IgnoreCase_EqualTo> ItemMap; - - ItemMap _itemsMap; - int _interleave; - int _currentItem; - }; -} +class Panel : public Toolbar { +public: + Panel(int interleave_first, int interleave); + virtual bool draw(SDL_Surface *surface); + virtual ~Panel(); + bool add(const String &name, const PanelItem *item); + void clear(); + virtual void forceRedraw(); + virtual bool action(int x, int y, bool pushed); +private: + + typedef HashMap<String, PanelItem*, Common::IgnoreCase_Hash , Common::IgnoreCase_EqualTo> ItemMap; + + ItemMap _itemsMap; + int _interleave; + int _currentItem; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/PanelItem.cpp b/backends/platform/wince/CEgui/PanelItem.cpp index 0898839c5d..8c68c79784 100644 --- a/backends/platform/wince/CEgui/PanelItem.cpp +++ b/backends/platform/wince/CEgui/PanelItem.cpp @@ -27,21 +27,21 @@ namespace CEGUI { - PanelItem::PanelItem(WORD reference) : GUIElement() { - setBackground(reference); - _panel = NULL; - } +PanelItem::PanelItem(WORD reference) : GUIElement() { + setBackground(reference); + _panel = NULL; +} - PanelItem::~PanelItem() { - } +PanelItem::~PanelItem() { +} - bool PanelItem::action(int x, int y, bool pushed) { - return false; - } +bool PanelItem::action(int x, int y, bool pushed) { + return false; +} - void PanelItem::setPanel(Panel *panel) { - _panel = panel; - } +void PanelItem::setPanel(Panel *panel) { + _panel = panel; } +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/PanelItem.h b/backends/platform/wince/CEgui/PanelItem.h index 55920c304a..14b62f0f20 100644 --- a/backends/platform/wince/CEgui/PanelItem.h +++ b/backends/platform/wince/CEgui/PanelItem.h @@ -33,18 +33,19 @@ namespace CEGUI { - class Panel; - - class PanelItem : public GUIElement { - friend class Panel; - public: - PanelItem(WORD reference); - virtual ~PanelItem(); - virtual bool action(int x, int y, bool pushed); - protected: - void setPanel(Panel *panel); - Panel *_panel; - }; -} +class Panel; + +class PanelItem : public GUIElement { +friend class Panel; +public: + PanelItem(WORD reference); + virtual ~PanelItem(); + virtual bool action(int x, int y, bool pushed); +protected: + void setPanel(Panel *panel); + Panel *_panel; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/PanelKeyboard.cpp b/backends/platform/wince/CEgui/PanelKeyboard.cpp index 369a75cae1..1b2a478746 100644 --- a/backends/platform/wince/CEgui/PanelKeyboard.cpp +++ b/backends/platform/wince/CEgui/PanelKeyboard.cpp @@ -23,77 +23,81 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include <SDL.h> + #include "PanelKeyboard.h" namespace CEGUI { - const char KEYBOARD_MAPPING_ALPHA[][14] = { {"abcdefghijklm"}, {"nopqrstuvwxyz"} }; - const char KEYBOARD_MAPPING_NUMERIC[][6] = { {"12345"}, {"67890"} }; - const int KEYBOARD_MAPPING_SPECIAL[][3][2] = { { {1,SDLK_ESCAPE}, {224,SDLK_UP}, {32,SDLK_SPACE} }, - { {224,SDLK_LEFT}, {224,SDLK_DOWN}, {224,SDLK_RIGHT} } }; +const char KEYBOARD_MAPPING_ALPHA[][14] = { {"abcdefghijklm"}, {"nopqrstuvwxyz"} }; +const char KEYBOARD_MAPPING_NUMERIC[][6] = { {"12345"}, {"67890"} }; +const int KEYBOARD_MAPPING_SPECIAL[][3][2] = { { {1,SDLK_ESCAPE}, {224,SDLK_UP}, {32,SDLK_SPACE} }, + { {224,SDLK_LEFT}, {224,SDLK_DOWN}, {224,SDLK_RIGHT} } }; - PanelKeyboard::PanelKeyboard(WORD reference) : Toolbar() { - setBackground(reference); - _state = false; - _lastKey.setKey(0); - } - - - PanelKeyboard::~PanelKeyboard() { - } - - bool PanelKeyboard::action(int x, int y, bool pushed) { - Key key; - - if (checkInside(x, y)) { - int keyAscii = 0; - int keyCode = 0; - if (x < 185) { - // Alpha selection - keyCode = keyAscii = KEYBOARD_MAPPING_ALPHA[y >= _y+20][((x + 10) / 14) - 1]; - } else if (x >= 186 && x <= 255) { - // Numeric selection - keyCode = keyAscii = KEYBOARD_MAPPING_NUMERIC[y >= _y+20][((x - 187 + 10) / 14) - 1]; - } else if (x >= 258 && x <= 300) { - // Special keys - keyAscii = KEYBOARD_MAPPING_SPECIAL[y >= _y+20][((x - 259 + 10) / 14) - 1][0]; - keyCode = KEYBOARD_MAPPING_SPECIAL[y >= _y+20][((x - 259 + 10) / 14) - 1][1]; - } else if (x >= 302 && x <= 316) { - if (y < _y +20) { - // Backspace - keyAscii = VK_BACK; keyCode = keyAscii; - } else { - // Enter - keyAscii = 13; keyCode = 13; - } - } +PanelKeyboard::PanelKeyboard(WORD reference) : Toolbar() { + setBackground(reference); + _state = false; + _lastKey.setKey(0); +} + + +PanelKeyboard::~PanelKeyboard() { +} - if (keyAscii != 0) { - if (_state && pushed && keyCode != _lastKey.keycode()) // if cursor is still down and off the current key - return false; - else if (_state && !pushed && keyCode != _lastKey.keycode()) { // cursor is up but off the current key - keyAscii = _lastKey.ascii(); - keyCode = _lastKey.keycode(); - } - _state = pushed; - _lastKey.setKey(keyAscii, tolower(keyCode)); - - key.setKey(keyAscii, tolower(keyCode)); - return EventsBuffer::simulateKey(&key, pushed); +bool PanelKeyboard::action(int x, int y, bool pushed) { + Key key; + + if (checkInside(x, y)) { + int keyAscii = 0; + int keyCode = 0; + if (x < 185) { + // Alpha selection + keyCode = keyAscii = KEYBOARD_MAPPING_ALPHA[y >= _y+20][((x + 10) / 14) - 1]; + } else if (x >= 186 && x <= 255) { + // Numeric selection + keyCode = keyAscii = KEYBOARD_MAPPING_NUMERIC[y >= _y+20][((x - 187 + 10) / 14) - 1]; + } else if (x >= 258 && x <= 300) { + // Special keys + keyAscii = KEYBOARD_MAPPING_SPECIAL[y >= _y+20][((x - 259 + 10) / 14) - 1][0]; + keyCode = KEYBOARD_MAPPING_SPECIAL[y >= _y+20][((x - 259 + 10) / 14) - 1][1]; + } else if (x >= 302 && x <= 316) { + if (y < _y +20) { + // Backspace + keyAscii = VK_BACK; keyCode = keyAscii; + } else { + // Enter + keyAscii = 13; keyCode = 13; } - else if (_state && !pushed) { // cursor is in some forbidden region and is up - _state = false; - key = _lastKey; - return EventsBuffer::simulateKey(&key, false); - } else - return false; } - else if (_state && !pushed) { // cursor left the keyboard area and is up + + if (keyAscii != 0) { + if (_state && pushed && keyCode != _lastKey.keycode()) // if cursor is still down and off the current key + return false; + else if (_state && !pushed && keyCode != _lastKey.keycode()) { // cursor is up but off the current key + keyAscii = _lastKey.ascii(); + keyCode = _lastKey.keycode(); + } + _state = pushed; + _lastKey.setKey(keyAscii, tolower(keyCode)); + + key.setKey(keyAscii, tolower(keyCode)); + return EventsBuffer::simulateKey(&key, pushed); + } else if (_state && !pushed) { // cursor is in some forbidden region and is up _state = false; key = _lastKey; return EventsBuffer::simulateKey(&key, false); } else return false; - } + } else if (_state && !pushed) { // cursor left the keyboard area and is up + _state = false; + key = _lastKey; + return EventsBuffer::simulateKey(&key, false); + } else + return false; } +} // End of namespace CEGUI + diff --git a/backends/platform/wince/CEgui/PanelKeyboard.h b/backends/platform/wince/CEgui/PanelKeyboard.h index f441e14771..b98e6ff3a8 100644 --- a/backends/platform/wince/CEgui/PanelKeyboard.h +++ b/backends/platform/wince/CEgui/PanelKeyboard.h @@ -37,15 +37,16 @@ using CEKEYS::EventsBuffer; namespace CEGUI { - class PanelKeyboard : public Toolbar { - public: - PanelKeyboard(WORD reference); - virtual ~PanelKeyboard(); - virtual bool action(int x, int y, bool pushed); - private: - bool _state; - Key _lastKey; - }; -} +class PanelKeyboard : public Toolbar { +public: + PanelKeyboard(WORD reference); + virtual ~PanelKeyboard(); + virtual bool action(int x, int y, bool pushed); +private: + bool _state; + Key _lastKey; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.cpp b/backends/platform/wince/CEgui/SDL_ImageResource.cpp index ce6ebd6382..567013b5ff 100644 --- a/backends/platform/wince/CEgui/SDL_ImageResource.cpp +++ b/backends/platform/wince/CEgui/SDL_ImageResource.cpp @@ -23,63 +23,67 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include "SDL.h" #include "SDL_ImageResource.h" namespace CEGUI { - SDL_ImageResource::SDL_ImageResource() : - _surface(0) - { - } +SDL_ImageResource::SDL_ImageResource() : + _surface(0) { +} - SDL_Surface* SDL_ImageResource::load(WORD resourceID) { - HRSRC resource; - HGLOBAL resourceGlobal; - LPVOID resourcePointer; - DWORD resourceSize; - SDL_RWops *surfaceData; - HMODULE moduleHandle; +SDL_Surface* SDL_ImageResource::load(WORD resourceID) { + HRSRC resource; + HGLOBAL resourceGlobal; + LPVOID resourcePointer; + DWORD resourceSize; + SDL_RWops *surfaceData; + HMODULE moduleHandle; - moduleHandle = GetModuleHandle(NULL); - resource = FindResource(moduleHandle, MAKEINTRESOURCE(resourceID), TEXT("BINARY")); - if (!resource) - return NULL; - resourceSize = SizeofResource(moduleHandle, resource); - if (!resourceSize) - return NULL; - resourceGlobal = LoadResource(moduleHandle, resource); - if (!resourceGlobal) - return NULL; - resourcePointer = LockResource(resourceGlobal); - if (!resourcePointer) - return NULL; + moduleHandle = GetModuleHandle(NULL); + resource = FindResource(moduleHandle, MAKEINTRESOURCE(resourceID), TEXT("BINARY")); + if (!resource) + return NULL; + resourceSize = SizeofResource(moduleHandle, resource); + if (!resourceSize) + return NULL; + resourceGlobal = LoadResource(moduleHandle, resource); + if (!resourceGlobal) + return NULL; + resourcePointer = LockResource(resourceGlobal); + if (!resourcePointer) + return NULL; - surfaceData = SDL_RWFromMem(resourcePointer, resourceSize); - if (!surfaceData) - return NULL; - _surface = SDL_LoadBMP_RW(surfaceData, 1); + surfaceData = SDL_RWFromMem(resourcePointer, resourceSize); + if (!surfaceData) + return NULL; + _surface = SDL_LoadBMP_RW(surfaceData, 1); - return _surface; - } + return _surface; +} - SDL_Surface* SDL_ImageResource::get() { - return _surface; - } +SDL_Surface* SDL_ImageResource::get() { + return _surface; +} - int SDL_ImageResource::height() { - if (_surface) - return _surface->h; - return 0; - } +int SDL_ImageResource::height() { + if (_surface) + return _surface->h; + return 0; +} - int SDL_ImageResource::width() { - if (_surface) - return _surface->w; - return 0; - } +int SDL_ImageResource::width() { + if (_surface) + return _surface->w; + return 0; +} - SDL_ImageResource::~SDL_ImageResource() { - if (_surface) - SDL_FreeSurface(_surface); - } +SDL_ImageResource::~SDL_ImageResource() { + if (_surface) + SDL_FreeSurface(_surface); } + +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.h b/backends/platform/wince/CEgui/SDL_ImageResource.h index 454237dd15..5affd5c33c 100644 --- a/backends/platform/wince/CEgui/SDL_ImageResource.h +++ b/backends/platform/wince/CEgui/SDL_ImageResource.h @@ -29,20 +29,22 @@ #include "common/scummsys.h" #include "common/system.h" -#include "SDL.h" +struct SDL_Surface; namespace CEGUI { - class SDL_ImageResource { - public: - SDL_ImageResource(); - SDL_Surface* load(WORD resourceID); - SDL_Surface* get(); - int height(); - int width(); - virtual ~SDL_ImageResource(); - private: - SDL_Surface *_surface; - }; -} + +class SDL_ImageResource { +public: + SDL_ImageResource(); + SDL_Surface* load(WORD resourceID); + SDL_Surface* get(); + int height(); + int width(); + virtual ~SDL_ImageResource(); +private: + SDL_Surface *_surface; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/Toolbar.cpp b/backends/platform/wince/CEgui/Toolbar.cpp index 0501249de9..c41a30cb43 100644 --- a/backends/platform/wince/CEgui/Toolbar.cpp +++ b/backends/platform/wince/CEgui/Toolbar.cpp @@ -27,12 +27,12 @@ namespace CEGUI { - // Not to be drawn on game screen ! - Toolbar::Toolbar() : GUIElement(0, 0, 320, 40) - { - } +// Not to be drawn on game screen ! +Toolbar::Toolbar() : GUIElement(0, 0, 320, 40) { +} - Toolbar::~Toolbar() { - } +Toolbar::~Toolbar() { } + +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/Toolbar.h b/backends/platform/wince/CEgui/Toolbar.h index 3c48e6188a..9fdf05ab3f 100644 --- a/backends/platform/wince/CEgui/Toolbar.h +++ b/backends/platform/wince/CEgui/Toolbar.h @@ -27,25 +27,20 @@ #define CEGUI_TOOLBAR_H #include "common/scummsys.h" -#include "common/system.h" - -//#include "common/map.h" -#include "common/str.h" #include "GUIElement.h" - - namespace CEGUI { - class Toolbar : public GUIElement { - public: - virtual ~Toolbar(); - virtual bool action(int x, int y, bool pushed) = 0; - protected: - Toolbar(); +class Toolbar : public GUIElement { +public: + virtual ~Toolbar(); + virtual bool action(int x, int y, bool pushed) = 0; +protected: + Toolbar(); + +}; - }; -} +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEgui/ToolbarHandler.cpp b/backends/platform/wince/CEgui/ToolbarHandler.cpp index 3f93a4720d..f74d24ad25 100644 --- a/backends/platform/wince/CEgui/ToolbarHandler.cpp +++ b/backends/platform/wince/CEgui/ToolbarHandler.cpp @@ -23,106 +23,111 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include <SDL.h> + #include "ToolbarHandler.h" namespace CEGUI { - ToolbarHandler::ToolbarHandler(): - _current(""), _active(NULL) { - } - +ToolbarHandler::ToolbarHandler(): +_current(""), _active(NULL) { +} - bool ToolbarHandler::add(const String &name, const Toolbar &toolbar) { - _toolbarMap[name] = (Toolbar*)&toolbar; - if (!_active) { - _active = &((Toolbar&)toolbar); - _current = name; - } +bool ToolbarHandler::add(const String &name, const Toolbar &toolbar) { + _toolbarMap[name] = (Toolbar*)&toolbar; - return true; + if (!_active) { + _active = &((Toolbar&)toolbar); + _current = name; } - String ToolbarHandler::activeName() { - return _current; - } + return true; +} - bool ToolbarHandler::setActive(const String &name) { - if (!_toolbarMap.contains(name)) - return false; - if (_current == name) - return true; - _active->action(0, 0, false); // make sure any items are unpushed when changing toolbars (e.g. forced VK->main panel) - _current = name; - _active = _toolbarMap[name]; - _active->forceRedraw(); +String ToolbarHandler::activeName() { + return _current; +} + +bool ToolbarHandler::setActive(const String &name) { + if (!_toolbarMap.contains(name)) + return false; + if (_current == name) return true; - } + _active->action(0, 0, false); // make sure any items are unpushed when changing toolbars (e.g. forced VK->main panel) + _current = name; + _active = _toolbarMap[name]; + _active->forceRedraw(); + return true; +} - bool ToolbarHandler::action(int x, int y, bool pushed) { - if (_active && _active->visible()) { - // FIXME ! - if (_offset > 240) - return _active->action(x / 2, (y - _offset) / 2, pushed); - else - return _active->action(x, y - _offset, pushed); - } +bool ToolbarHandler::action(int x, int y, bool pushed) { + if (_active && _active->visible()) { + // FIXME ! + if (_offset > 240) + return _active->action(x / 2, (y - _offset) / 2, pushed); else - return false; + return _active->action(x, y - _offset, pushed); } + else + return false; +} - void ToolbarHandler::setVisible(bool visible) { - if (_active) - _active->setVisible(visible); - } +void ToolbarHandler::setVisible(bool visible) { + if (_active) + _active->setVisible(visible); +} - bool ToolbarHandler::visible() { - if (_active) - return _active->visible(); - else - return false; - } +bool ToolbarHandler::visible() { + if (_active) + return _active->visible(); + else + return false; +} - void ToolbarHandler::forceRedraw() { - if (_active) - _active->forceRedraw(); - } +void ToolbarHandler::forceRedraw() { + if (_active) + _active->forceRedraw(); +} - bool ToolbarHandler::drawn() { - if (_active) - return _active->drawn(); - else - return false; - } +bool ToolbarHandler::drawn() { + if (_active) + return _active->drawn(); + else + return false; +} - bool ToolbarHandler::draw(SDL_Surface *surface, SDL_Rect *rect) { - if (_active) { - bool result = _active->draw(surface); - if (result) { - rect->x = _active->x(); - rect->y = _active->y(); - rect->w = _active->width(); - rect->h = _active->height(); - } - return result; +bool ToolbarHandler::draw(SDL_Surface *surface, SDL_Rect *rect) { + if (_active) { + bool result = _active->draw(surface); + if (result) { + rect->x = _active->x(); + rect->y = _active->y(); + rect->w = _active->width(); + rect->h = _active->height(); } - else - return false; - } + return result; + } else + return false; +} - void ToolbarHandler::setOffset(int offset) { - _offset = offset; - } +void ToolbarHandler::setOffset(int offset) { + _offset = offset; +} - int ToolbarHandler::getOffset() { - return _offset; - } +int ToolbarHandler::getOffset() { + return _offset; +} - Toolbar* ToolbarHandler::active() { - return _active; - } +Toolbar* ToolbarHandler::active() { + return _active; +} - ToolbarHandler::~ToolbarHandler() { - _toolbarMap.clear(); - } +ToolbarHandler::~ToolbarHandler() { + _toolbarMap.clear(); } + +} // End of namespace CEGUI diff --git a/backends/platform/wince/CEgui/ToolbarHandler.h b/backends/platform/wince/CEgui/ToolbarHandler.h index 4a79ed1609..e3bf590768 100644 --- a/backends/platform/wince/CEgui/ToolbarHandler.h +++ b/backends/platform/wince/CEgui/ToolbarHandler.h @@ -39,29 +39,30 @@ using Common::HashMap; namespace CEGUI { - class ToolbarHandler { - public: - ToolbarHandler(); - bool add(const String &name, const Toolbar &toolbar); - bool setActive(const String &name); - bool action(int x, int y, bool pushed); - void setVisible(bool visible); - bool visible(); - String activeName(); - void forceRedraw(); - void setOffset(int offset); - int getOffset(); - bool draw(SDL_Surface *surface, SDL_Rect *rect); - bool drawn(); - Toolbar *active(); - virtual ~ToolbarHandler(); - private: +class ToolbarHandler { +public: + ToolbarHandler(); + bool add(const String &name, const Toolbar &toolbar); + bool setActive(const String &name); + bool action(int x, int y, bool pushed); + void setVisible(bool visible); + bool visible(); + String activeName(); + void forceRedraw(); + void setOffset(int offset); + int getOffset(); + bool draw(SDL_Surface *surface, SDL_Rect *rect); + bool drawn(); + Toolbar *active(); + virtual ~ToolbarHandler(); +private: - HashMap<String, Toolbar*, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _toolbarMap; - String _current; - Toolbar *_active; - int _offset; - }; -} + HashMap<String, Toolbar*, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _toolbarMap; + String _current; + Toolbar *_active; + int _offset; +}; + +} // End of namespace CEGUI #endif diff --git a/backends/platform/wince/CEkeys/EventsBuffer.cpp b/backends/platform/wince/CEkeys/EventsBuffer.cpp index f31a77570f..3cdcb44173 100644 --- a/backends/platform/wince/CEkeys/EventsBuffer.cpp +++ b/backends/platform/wince/CEkeys/EventsBuffer.cpp @@ -23,6 +23,11 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include <SDL.h> + #include "EventsBuffer.h" namespace CEKEYS { diff --git a/backends/platform/wince/CEkeys/EventsBuffer.h b/backends/platform/wince/CEkeys/EventsBuffer.h index 44e1c66e47..22590db03c 100644 --- a/backends/platform/wince/CEkeys/EventsBuffer.h +++ b/backends/platform/wince/CEkeys/EventsBuffer.h @@ -30,8 +30,6 @@ #include "common/system.h" #include "common/list.h" -#include <SDL.h> - #include "gui/Key.h" namespace CEKEYS { diff --git a/backends/platform/wince/missing/assert.h b/backends/platform/wince/missing/assert.h index 0a9dc23bb8..734b8f9482 100644 --- a/backends/platform/wince/missing/assert.h +++ b/backends/platform/wince/missing/assert.h @@ -3,7 +3,7 @@ // defined in common/util.h void CDECL _declspec(noreturn) error(const char *s, ...); -#define assert(e) ((e) ? 0 : (::error("Assertion failed " #e " (%s, %d)", __FILE__, __LINE__))) +#define assert(e) ((e) ? 0 : (::error("Assertion failed %s (%s, %d)", #e, __FILE__, __LINE__))) #define abort() ::error("Abort (%s, %d)", __FILE__, __LINE__) diff --git a/backends/platform/wince/missing/gcc/assert.h b/backends/platform/wince/missing/gcc/assert.h index 06742532ac..d52adb8c2c 100644 --- a/backends/platform/wince/missing/gcc/assert.h +++ b/backends/platform/wince/missing/gcc/assert.h @@ -3,7 +3,7 @@ // defined in common/util.h void CDECL _declspec(noreturn) error(const char *s, ...); -#define assert(e) ((e) ? (void) 0 : (::error("Assertion failed " #e " (%s, %d)", __FILE__, __LINE__))) +#define assert(e) ((e) ? (void) 0 : (::error("Assertion failed %s (%s, %d)", #e, __FILE__, __LINE__))) #define abort() ::error("Abort (%s, %d)", __FILE__, __LINE__) diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp index 532f1d2e89..3233a04aa1 100644 --- a/backends/platform/wince/missing/missing.cpp +++ b/backends/platform/wince/missing/missing.cpp @@ -29,6 +29,8 @@ * by Vasyl Tsvirkunov */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL #include <windows.h> #include <tchar.h> diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index ac9be5df48..3f64cb7d5d 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -23,6 +23,9 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "backends/platform/wince/wince-sdl.h" #include "common/config-manager.h" @@ -970,8 +973,9 @@ bool OSystem_WINCE3::getFeatureState(Feature f) { return false; case kFeatureVirtualKeyboard: return (_panelStateForced); + default: + return OSystem_SDL::getFeatureState(f); } - return OSystem_SDL::getFeatureState(f); } void OSystem_WINCE3::check_mappings() { @@ -2053,7 +2057,7 @@ void OSystem_WINCE3::undrawMouse() { if (SDL_LockSurface(_overlayVisible ? _overlayscreen : _screen) == -1) error("SDL_LockSurface failed: %s", SDL_GetError()); - int x, y; + int y; if (!_overlayVisible) { byte *dst, *bak = _mouseBackupOld; @@ -2242,14 +2246,15 @@ static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode, bool unfilter) { if (unfilter) { switch (key) { - case SDLK_ESCAPE: - return SDLK_BACKSPACE; - case SDLK_F8: - return SDLK_ASTERISK; - case SDLK_F9: - return SDLK_HASH; + case SDLK_ESCAPE: + return SDLK_BACKSPACE; + case SDLK_F8: + return SDLK_ASTERISK; + case SDLK_F9: + return SDLK_HASH; + default: + return key; } - return key; } if (key >= SDLK_KP0 && key <= SDLK_KP9) { @@ -2265,7 +2270,6 @@ static int mapKeyCE(SDLKey key, SDLMod mod, Uint16 unicode, bool unfilter) { bool OSystem_WINCE3::pollEvent(Common::Event &event) { SDL_Event ev; ev.type = SDL_NOEVENT; - byte b = 0; DWORD currentTime; bool keyEvent = false; int deltaX, deltaY; diff --git a/backends/plugins/dynamic-plugin.h b/backends/plugins/dynamic-plugin.h index 0c6a797947..ec051c4ed7 100644 --- a/backends/plugins/dynamic-plugin.h +++ b/backends/plugins/dynamic-plugin.h @@ -28,6 +28,7 @@ #include "base/plugins.h" + class DynamicPlugin : public Plugin { protected: typedef int32 (*IntFunc)(); @@ -44,7 +45,6 @@ public: unloadPlugin(); return false; } - if (verFunc() != PLUGIN_VERSION) { warning("Plugin uses a different API version (you have: '%d', needed is: '%d')", verFunc(), PLUGIN_VERSION); unloadPlugin(); @@ -57,7 +57,6 @@ public: unloadPlugin(); return false; } - _type = (PluginType)typeFunc(); if (_type >= PLUGIN_TYPE_MAX) { warning("Plugin type unknown: %d", _type); @@ -71,7 +70,6 @@ public: unloadPlugin(); return false; } - if (typeVerFunc() != pluginTypeVersions[_type]) { warning("Plugin uses a different type API version (you have: '%d', needed is: '%d')", typeVerFunc(), pluginTypeVersions[_type]); unloadPlugin(); diff --git a/backends/plugins/elf/shorts-segment-manager.cpp b/backends/plugins/elf/shorts-segment-manager.cpp index 17fe650c31..99a765287b 100644 --- a/backends/plugins/elf/shorts-segment-manager.cpp +++ b/backends/plugins/elf/shorts-segment-manager.cpp @@ -30,6 +30,7 @@ #include "backends/plugins/elf/shorts-segment-manager.h" #include "common/debug.h" +#include "common/textconsole.h" extern char __plugin_hole_start; // Indicates start of hole in program file for shorts extern char __plugin_hole_end; // Indicates end of hole in program file diff --git a/base/commandLine.cpp b/base/commandLine.cpp index cf59ae6dfd..6ee3ef382d 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -613,7 +613,7 @@ static void listTargets() { description = g.description(); } - targets.push_back(Common::String::printf("%-20s %s", name.c_str(), description.c_str())); + targets.push_back(Common::String::format("%-20s %s", name.c_str(), description.c_str())); } Common::sort(targets.begin(), targets.end()); diff --git a/base/main.cpp b/base/main.cpp index 37e100b49f..8928396642 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -455,9 +455,10 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { } PluginManager::instance().unloadPlugins(); PluginManager::destroy(); + GUI::GuiManager::destroy(); Common::ConfigManager::destroy(); Common::SearchManager::destroy(); - GUI::GuiManager::destroy(); + Common::TranslationManager::destroy(); return 0; } diff --git a/build-ds.sh b/build-ds.sh index d56af5a092..3906ee3ce1 100755 --- a/build-ds.sh +++ b/build-ds.sh @@ -1,26 +1,26 @@ -#!/bin/sh -# -# build-ds.sh -- script for building a ds build with every usable dynamic engine plugin - -make clean - -#Set up a static build with only engines usable by DS enabled -./configure --host=ds --disable-debug --disable-all-engines --enable-scumm --enable-sky --enable-queen --enable-agos --enable-gob --enable-cine --enable-agi --enable-kyra --enable-lure --enable-parallaction --enable-made --enable-cruise - -make clean - -make - -#Dump all symbols used in this garbage-collected static build into a file -rm -f ds.syms -arm-eabi-objdump -t scummvm.elf > ds.syms - -make clean - -#Set up a dynamic build with only engines usable by the DS enabled -./configure --host=ds --enable-plugins --default-dynamic --disable-debug --disable-all-engines --enable-scumm --enable-sky --enable-queen --enable-gob --enable-cine --enable-agos --enable-agi --enable-kyra --enable-lure --enable-parallaction --enable-made --enable-cruise - -make clean - -#Make this final build, which is selectively stripped with the assistance of the ds.syms file that was generated earlier -make +#!/bin/sh
+#
+# build-ds.sh -- script for building a ds build with every usable dynamic engine plugin
+
+make clean
+
+#Set up a static build with only engines usable by DS enabled
+./configure --host=ds --disable-debug --disable-all-engines --enable-scumm --enable-sky --enable-queen --enable-agos --enable-gob --enable-cine --enable-agi --enable-kyra --enable-lure --enable-parallaction --enable-made --enable-cruise
+
+make clean
+
+make
+
+#Dump all symbols used in this garbage-collected static build into a file
+rm -f ds.syms
+arm-eabi-objdump -t scummvm.elf > ds.syms
+
+make clean
+
+#Set up a dynamic build with only engines usable by the DS enabled
+./configure --host=ds --enable-plugins --default-dynamic --disable-debug --disable-all-engines --enable-scumm --enable-sky --enable-queen --enable-gob --enable-cine --enable-agos --enable-agi --enable-kyra --enable-lure --enable-parallaction --enable-made --enable-cruise
+
+make clean
+
+#Make this final build, which is selectively stripped with the assistance of the ds.syms file that was generated earlier
+make
diff --git a/common/config-manager.cpp b/common/config-manager.cpp index 554a99ea95..ec9fcaee6a 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -69,7 +69,7 @@ void ConfigManager::loadDefaultConfigFile() { } else { // No config file -> create new one! - printf("Default configuration file missing, creating a new one\n"); + debug("Default configuration file missing, creating a new one"); flushToDisk(); } @@ -81,9 +81,9 @@ void ConfigManager::loadConfigFile(const String &filename) { FSNode node(filename); File cfg_file; if (!cfg_file.open(node)) { - printf("Creating configuration file: %s\n", filename.c_str()); + debug("Creating configuration file: %s\n", filename.c_str()); } else { - printf("Using configuration file: %s\n", _filename.c_str()); + debug("Using configuration file: %s\n", _filename.c_str()); loadFromStream(cfg_file); } } @@ -508,9 +508,7 @@ void ConfigManager::set(const String &key, const String &value, const String &do } void ConfigManager::setInt(const String &key, int value, const String &domName) { - char tmp[128]; - snprintf(tmp, sizeof(tmp), "%i", value); - set(key, String(tmp), domName); + set(key, String::format("%i", value), domName); } void ConfigManager::setBool(const String &key, bool value, const String &domName) { @@ -530,9 +528,7 @@ void ConfigManager::registerDefault(const String &key, const char *value) { } void ConfigManager::registerDefault(const String &key, int value) { - char tmp[128]; - snprintf(tmp, sizeof(tmp), "%i", value); - registerDefault(key, tmp); + registerDefault(key, String::format("%i", value)); } void ConfigManager::registerDefault(const String &key, bool value) { diff --git a/common/debug.cpp b/common/debug.cpp index 116c0d0d56..46f8e8b829 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -22,6 +22,10 @@ * $Id$ */ +// Disable symbol overrides so that we can use system headers. +// FIXME: Necessary for the PS2 port, should get rid of this eventually. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/debug.h" #include "common/debug-channels.h" #include "common/util.h" @@ -119,31 +123,15 @@ bool DebugManager::isDebugChannelEnabled(uint32 channel) { return (gDebugChannelsEnabled & channel) != 0; } - - -static OutputFormatter s_debugOutputFormatter = 0; - -void setDebugOutputFormatter(OutputFormatter f) { - s_debugOutputFormatter = f; -} - } // End of namespace Common #ifndef DISABLE_TEXT_CONSOLE static void debugHelper(const char *s, va_list va, bool caret = true) { - char in_buf[STRINGBUFLEN]; char buf[STRINGBUFLEN]; - vsnprintf(in_buf, STRINGBUFLEN, s, va); - // Next, give the active engine (if any) a chance to augment the message, - // but only if not used from debugN. - if (caret && Common::s_debugOutputFormatter) { - (*Common::s_debugOutputFormatter)(buf, in_buf, STRINGBUFLEN); - } else { - strncpy(buf, in_buf, STRINGBUFLEN); - } + vsnprintf(buf, STRINGBUFLEN, s, va); buf[STRINGBUFLEN-1] = '\0'; if (caret) { @@ -186,6 +174,14 @@ void debug(int level, const char *s, ...) { } +void debugN(const char *s, ...) { + va_list va; + + va_start(va, s); + debugHelper(s, va, false); + va_end(va); +} + void debugN(int level, const char *s, ...) { va_list va; diff --git a/common/debug.h b/common/debug.h index 2068a1314a..03de7f4f77 100644 --- a/common/debug.h +++ b/common/debug.h @@ -26,23 +26,12 @@ #define COMMON_DEBUG_H #include "common/scummsys.h" -#include "common/textconsole.h" - -namespace Common { - -/** - * Set the output formatter used by debug() and related functions. - */ -void setDebugOutputFormatter(OutputFormatter f); - - -} // End of namespace Common - #ifdef DISABLE_TEXT_CONSOLE inline void debug(const char *s, ...) {} inline void debug(int level, const char *s, ...) {} +inline void debugN(const char *s, ...) {} inline void debugN(int level, const char *s, ...) {} inline void debugC(int level, uint32 engineChannel, const char *s, ...) {} inline void debugC(uint32 engineChannel, const char *s, ...) {} @@ -68,6 +57,12 @@ void debug(const char *s, ...) GCC_PRINTF(1, 2); void debug(int level, const char *s, ...) GCC_PRINTF(2, 3); /** + * Print a debug message to the text console (stdout). + * Does not append a newline. + */ +void debugN(const char *s, ...) GCC_PRINTF(1, 2); + +/** * Print a debug message to the text console (stdout), but only if * the gDebugLevel equals at least the specified level. * As a rule of thumb, the more important the message, the lower the level. diff --git a/common/forbidden.h b/common/forbidden.h index cc71c36711..92e662ccc6 100644 --- a/common/forbidden.h +++ b/common/forbidden.h @@ -26,15 +26,29 @@ #ifndef COMMON_FORBIDDEN_H #define COMMON_FORBIDDEN_H - -// -// Backend files may #define FORBIDDEN_SYMBOL_ALLOW_ALL if they -// have to access functions like fopen, fread etc. -// Regular code, esp. code in engines/, should never do that. -// +/** + * @file + * This header file is meant to help ensure that engines and + * infrastructure code do not make use of certain "forbidden" APIs, such + * as fopen(), setjmp(), etc. + * This is achieved by re-#defining various symbols to a "garbage" + * string which then trigers a compiler error. + * + * Backend files may #define FORBIDDEN_SYMBOL_ALLOW_ALL if they + * have to access functions like fopen, fread etc. + * Regular code, esp. code in engines/, should never do that. + */ #ifndef FORBIDDEN_SYMBOL_ALLOW_ALL +/** + * The garbage string to use as replacement for forbidden symbols. + * + * The reason for this particular string is the following: + * By including a space and "!" we try to ensure a compiler error. + * By using the words "forbidden symbol" we try to make it a bit + * clearer what is causing the error. + */ #define FORBIDDEN_SYMBOL_REPLACEMENT FORBIDDEN SYMBOL! diff --git a/common/hashmap.cpp b/common/hashmap.cpp index d8b84f61a5..5fe18f33ee 100644 --- a/common/hashmap.cpp +++ b/common/hashmap.cpp @@ -89,7 +89,7 @@ void updateHashCollisionStats(int collisions, int dummyHits, int lookups, int ar g_max_capacity = MAX(g_max_capacity, arrsize); g_max_size = MAX(g_max_size, nele); - fprintf(stdout, "%d hashmaps: colls %.1f; dummies hit %.1f, lookups %.1f; ratio %.3f%%; size %f (max: %d); capacity %f (max: %d)\n", + debug("%d hashmaps: colls %.1f; dummies hit %.1f, lookups %.1f; ratio %.3f%%; size %f (max: %d); capacity %f (max: %d)", g_totalHashmaps, g_collisions / g_totalHashmaps, g_dummyHits / g_totalHashmaps, @@ -97,7 +97,7 @@ void updateHashCollisionStats(int collisions, int dummyHits, int lookups, int ar 100 * g_collPerLook / g_totalHashmaps, g_size / g_totalHashmaps, g_max_size, g_capacity / g_totalHashmaps, g_max_capacity); - fprintf(stdout, " %d less than %d; %d less than %d; %d less than %d; %d less than %d\n", + debug(" %d less than %d; %d less than %d; %d less than %d; %d less than %d", g_stats[0], 2*8/3, g_stats[1],2*16/3, g_stats[2],2*32/3, diff --git a/common/hashmap.h b/common/hashmap.h index 45192256a9..81a136f671 100644 --- a/common/hashmap.h +++ b/common/hashmap.h @@ -29,15 +29,37 @@ #ifndef COMMON_HASHMAP_H #define COMMON_HASHMAP_H +/** + * @def DEBUG_HASH_COLLISIONS + * Enable the following #define if you want to check how many collisions the + * code produces (many collisions indicate either a bad hash function, or a + * hash table that is too small). + */ +//#define DEBUG_HASH_COLLISIONS + +/** + * @def USE_HASHMAP_MEMORY_POOL + * Enable the following define to let HashMaps use a memory pool for the + nodes they contain. * This increases memory usage, but also can improve + speed quite a bit. + */ +#define USE_HASHMAP_MEMORY_POOL + + #include "common/func.h" #include "common/str.h" #include "common/util.h" -#define USE_HASHMAP_MEMORY_POOL +#ifdef DEBUG_HASH_COLLISIONS +#include "common/debug.h" +#endif + #ifdef USE_HASHMAP_MEMORY_POOL #include "common/memorypool.h" #endif + + namespace Common { // The sgi IRIX MIPSpro Compiler has difficulties with nested templates. @@ -47,11 +69,6 @@ namespace Common { template<class T> class IteratorImpl; #endif -// Enable the following #define if you want to check how many collisions the -// code produces (many collisions indicate either a bad hash function, or a -// hash table that is too small). -//#define DEBUG_HASH_COLLISIONS - /** * HashMap<Key,Val> maps objects of type Key to objects of type Val. @@ -460,7 +477,7 @@ int HashMap<Key, Val, HashFunc, EqualFunc>::lookup(const Key &key) const { #ifdef DEBUG_HASH_COLLISIONS _lookups++; - fprintf(stderr, "collisions %d, dummies hit %d, lookups %d, ratio %f in HashMap %p; size %d num elements %d\n", + debug("collisions %d, dummies hit %d, lookups %d, ratio %f in HashMap %p; size %d num elements %d", _collisions, _dummyHits, _lookups, ((double) _collisions / (double)_lookups), (const void *)this, _mask+1, _size); #endif @@ -498,7 +515,7 @@ int HashMap<Key, Val, HashFunc, EqualFunc>::lookupAndCreateIfMissing(const Key & #ifdef DEBUG_HASH_COLLISIONS _lookups++; - fprintf(stderr, "collisions %d, dummies hit %d, lookups %d, ratio %f in HashMap %p; size %d num elements %d\n", + debug("collisions %d, dummies hit %d, lookups %d, ratio %f in HashMap %p; size %d num elements %d", _collisions, _dummyHits, _lookups, ((double) _collisions / (double)_lookups), (const void *)this, _mask+1, _size); #endif diff --git a/common/memorypool.cpp b/common/memorypool.cpp index c677c45ff4..c4dbb5fbbd 100644 --- a/common/memorypool.cpp +++ b/common/memorypool.cpp @@ -161,7 +161,7 @@ void MemoryPool::freeUnusedPages() { } } -// printf("freed %d pages out of %d\n", (int)freedPagesCount, (int)_pages.size()); +// debug("freed %d pages out of %d", (int)freedPagesCount, (int)_pages.size()); // Remove all now unused pages size_t newSize = 0; diff --git a/common/ptr.h b/common/ptr.h index 524879652c..383b3ee15d 100644 --- a/common/ptr.h +++ b/common/ptr.h @@ -235,7 +235,6 @@ public: ReferenceType operator*() const { return *_pointer; } PointerType operator->() const { return _pointer; } operator PointerType() const { return _pointer; } - /** * Implicit conversion operator to bool for convenience, to make @@ -277,7 +276,7 @@ public: } protected: - PointerType _pointer; + PointerType _pointer; }; template<typename T> diff --git a/common/str.cpp b/common/str.cpp index c3c19adfe6..c21e4412db 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -430,7 +430,7 @@ uint String::hash() const { } // static -String String::printf(const char *fmt, ...) { +String String::format(const char *fmt, ...) { String output; assert(output.isStorageIntern()); diff --git a/common/str.h b/common/str.h index e3dec6cdc2..56feaacf1b 100644 --- a/common/str.h +++ b/common/str.h @@ -218,7 +218,7 @@ public: /** * Printf-like function. Returns a formatted String. */ - static Common::String printf(const char *fmt, ...) GCC_PRINTF(1,2); + static Common::String format(const char *fmt, ...) GCC_PRINTF(1,2); public: typedef char * iterator; diff --git a/common/textconsole.cpp b/common/textconsole.cpp index 0d0b0aead9..246a9a1fe1 100644 --- a/common/textconsole.cpp +++ b/common/textconsole.cpp @@ -22,14 +22,13 @@ * $Id$ */ +// Disable symbol overrides so that we can use system headers. +// FIXME: Necessary for the PS2 port, should get rid of this eventually. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/textconsole.h" #include "common/system.h" -#ifdef _WIN32_WCE -// This is required for the debugger attachment -extern bool isSmartphone(); -#endif - #ifdef __PLAYSTATION2__ // for those replaced fopen/fread/etc functions #include "backends/platform/ps2/fileio.h" diff --git a/common/util.cpp b/common/util.cpp index 2fffdca8a6..533795ca9e 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -38,20 +38,20 @@ void hexdump(const byte *data, int len, int bytesPerLine, int startOffset) { byte c; int offset = startOffset; while (len >= bytesPerLine) { - printf("%06x: ", offset); + debugN("%06x: ", offset); for (i = 0; i < bytesPerLine; i++) { - printf("%02x ", data[i]); + debugN("%02x ", data[i]); if (i % 4 == 3) - printf(" "); + debugN(" "); } - printf(" |"); + debugN(" |"); for (i = 0; i < bytesPerLine; i++) { c = data[i]; if (c < 32 || c >= 127) c = '.'; - printf("%c", c); + debugN("%c", c); } - printf("|\n"); + debugN("|\n"); data += bytesPerLine; len -= bytesPerLine; offset += bytesPerLine; @@ -60,25 +60,25 @@ void hexdump(const byte *data, int len, int bytesPerLine, int startOffset) { if (len <= 0) return; - printf("%06x: ", offset); + debugN("%06x: ", offset); for (i = 0; i < bytesPerLine; i++) { if (i < len) - printf("%02x ", data[i]); + debugN("%02x ", data[i]); else - printf(" "); + debugN(" "); if (i % 4 == 3) - printf(" "); + debugN(" "); } - printf(" |"); + debugN(" |"); for (i = 0; i < len; i++) { c = data[i]; if (c < 32 || c >= 127) c = '.'; - printf("%c", c); + debugN("%c", c); } for (; i < bytesPerLine; i++) - printf(" "); - printf("|\n"); + debugN(" "); + debugN("|\n"); } @@ -1577,7 +1577,6 @@ case $_host_os in ;; psp) CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include -D_PSP_FW_VERSION=150" - CXXFLAGS="$CXXFLAGS" ;; solaris*) DEFINES="$DEFINES -DSOLARIS -DSYSTEM_NOT_SUPPORTING_D_TYPE" diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp index 54b40d66b2..8780e1dab8 100644 --- a/engines/agi/loader_v2.cpp +++ b/engines/agi/loader_v2.cpp @@ -158,7 +158,6 @@ uint8 *AgiLoader_v2::loadVolRes(struct AgiDir *agid) { } } else { warning("AgiLoader_v2::loadVolRes: bad signature %04x", sig); - // fprintf (stderr, "ACK! BAD RESOURCE!!!\n"); return 0; } fp.close(); diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp index f145140768..18ea4cae7d 100644 --- a/engines/agi/loader_v3.cpp +++ b/engines/agi/loader_v3.cpp @@ -121,7 +121,7 @@ int AgiLoader_v3::init() { } if (!fp.open(path)) { - printf("Failed to open \"%s\"\n", path.c_str()); + warning("Failed to open '%s'", path.c_str()); return errBadFileOpen; } // build offset table for v3 directory format diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp index 8de36f24e1..d942a2b538 100644 --- a/engines/agi/objects.cpp +++ b/engines/agi/objects.cpp @@ -74,8 +74,7 @@ int AgiEngine::decodeObjects(uint8 *mem, uint32 flen) { if ((uint) offset < flen) { (_objects + i)->name = (char *)strdup((const char *)mem + offset); } else { - printf("ERROR: object %i name beyond object filesize! " - "(%04x > %04x)\n", i, offset, flen); + warning("object %i name beyond object filesize (%04x > %04x)", i, offset, flen); (_objects + i)->name = strdup(""); } } diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp index 414477a381..250ac1df22 100644 --- a/engines/agi/predictive.cpp +++ b/engines/agi/predictive.cpp @@ -546,7 +546,7 @@ void AgiEngine::loadDict() { #endif uint32 time3 = _system->getMillis(); - printf("Time to parse pred.dic: %d, total: %d\n", time3-time2, time3-time1); + debug("Time to parse pred.dic: %d, total: %d", time3-time2, time3-time1); } bool AgiEngine::matchWord() { diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 10b6416c61..a51536381e 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -43,8 +43,6 @@ #include "sound/mods/protracker.h" #include "sound/audiocd.h" -using Common::File; - namespace AGOS { static const GameSpecificSettings simon1_settings = { diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index af85c50114..4fe8f8e6bc 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -250,7 +250,7 @@ bool MoviePlayerDXA::load() { } } - Common::String videoName = Common::String::printf("%s.dxa", baseName); + Common::String videoName = Common::String::format("%s.dxa", baseName); if (!loadFile(videoName)) error("Failed to load video file %s", videoName.c_str()); @@ -410,7 +410,7 @@ MoviePlayerSMK::MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name) } bool MoviePlayerSMK::load() { - Common::String videoName = Common::String::printf("%s.smk", baseName); + Common::String videoName = Common::String::format("%s.smk", baseName); if (!loadFile(videoName)) error("Failed to load video file %s", videoName.c_str()); diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp index 519dfc344c..cb11d65218 100644 --- a/engines/agos/debug.cpp +++ b/engines/agos/debug.cpp @@ -76,30 +76,30 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { while (*st != '|') st++; - printf("%s ", st + 1); + debugN("%s ", st + 1); for (;;) { switch (*s++) { case 'x': - printf("\n"); + debugN("\n"); return NULL; case '|': - printf("\n"); + debugN("\n"); return p; case 'B':{ byte b = *p++; if (b == 255) - printf("[%d] ", *p++); + debugN("[%d] ", *p++); else - printf("%d ", b); + debugN("%d ", b); break; } case 'V':{ byte b = *p++; if (b == 255) - printf("[[%d]] ", *p++); + debugN("[[%d]] ", *p++); else - printf("[%d] ", b); + debugN("[%d] ", b); break; } @@ -108,15 +108,15 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { p += 2; if (getGameType() == GType_PP) { if (n >= 60000 && n < 62048) - printf("[%d] ", n - 60000); + debugN("[%d] ", n - 60000); else - printf("%d ", n); + debugN("%d ", n); } else { if (n >= 30000 && n < 30512) - printf("[%d] ", n - 30000); + debugN("[%d] ", n - 30000); else - printf("%d ", n); + debugN("%d ", n); } break; } @@ -124,7 +124,7 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { case 'w':{ int n = (int16)READ_BE_UINT16(p); p += 2; - printf("%d ", n); + debugN("%d ", n); break; } @@ -132,22 +132,22 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { int n = (int16)READ_BE_UINT16(p); p += 2; if (n == -1) - printf("SUBJECT_ITEM "); + debugN("SUBJECT_ITEM "); else if (n == -3) - printf("OBJECT_ITEM "); + debugN("OBJECT_ITEM "); else if (n == -5) - printf("ME_ITEM "); + debugN("ME_ITEM "); else if (n == -7) - printf("ACTOR_ITEM "); + debugN("ACTOR_ITEM "); else if (n == -9) - printf("ITEM_A_PARENT "); + debugN("ITEM_A_PARENT "); else - printf("<%d> ", n); + debugN("<%d> ", n); break; } case 'J':{ - printf("-> "); + debugN("-> "); } break; @@ -155,9 +155,9 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { uint n = READ_BE_UINT16(p); p += 2; if (n != 0xFFFF) - printf("\"%s\"(%d) ", getStringPtrByID(n), n); + debugN("\"%s\"(%d) ", getStringPtrByID(n), n); else - printf("NULL_STRING "); + debugN("NULL_STRING "); } break; } @@ -167,11 +167,11 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { void AGOSEngine::dumpSubroutineLine(SubroutineLine *sl, Subroutine *sub) { const byte *p; - printf("; ****\n"); + debugN("; ****\n"); p = (byte *)sl + SUBROUTINE_LINE_SMALL_SIZE; if (sub->id == 0) { - printf("; verb=%d, noun1=%d, noun2=%d\n", sl->verb, sl->noun1, sl->noun2); + debugN("; verb=%d, noun1=%d, noun2=%d\n", sl->verb, sl->noun1, sl->noun2); p = (byte *)sl + SUBROUTINE_LINE_BIG_SIZE; } @@ -185,12 +185,12 @@ void AGOSEngine::dumpSubroutineLine(SubroutineLine *sl, Subroutine *sub) { void AGOSEngine::dumpSubroutine(Subroutine *sub) { SubroutineLine *sl; - printf("\n******************************************\n;Subroutine, ID=%d:\nSUB_%d:\n", sub->id, sub->id); + debugN("\n******************************************\n;Subroutine, ID=%d:\nSUB_%d:\n", sub->id, sub->id); sl = (SubroutineLine *)((byte *)sub + sub->first); for (; (byte *)sl != (byte *)sub; sl = (SubroutineLine *)((byte *)sub + sl->next)) { dumpSubroutineLine(sl, sub); } - printf("\nEND ******************************************\n"); + debugN("\nEND ******************************************\n"); } void AGOSEngine::dumpSubroutines() { @@ -245,35 +245,35 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { while (*strn != '|') strn++; - printf("%.2d: %s ", opcode, strn + 1); + debugN("%.2d: %s ", opcode, strn + 1); int end = (getGameType() == GType_FF || getGameType() == GType_PP) ? 9999 : 999; for (; *str != '|'; str++) { switch (*str) { case 'x': - printf("\n"); + debugN("\n"); return; case 'b': - printf("%d ", *src++); + debugN("%d ", *src++); break; case 'd': - printf("%d ", (int16)readUint16Wrapper(src)); + debugN("%d ", (int16)readUint16Wrapper(src)); src += 2; break; case 'v': - printf("[%d] ", readUint16Wrapper(src)); + debugN("[%d] ", readUint16Wrapper(src)); src += 2; break; case 'i': - printf("%d ", (int16)readUint16Wrapper(src)); + debugN("%d ", (int16)readUint16Wrapper(src)); src += 2; break; case 'j': - printf("-> "); + debugN("-> "); break; case 'q': while (readUint16Wrapper(src) != end) { - printf("(%d,%d) ", readUint16Wrapper(src), + debugN("(%d,%d) ", readUint16Wrapper(src), readUint16Wrapper(src + 2)); src += 4; } @@ -284,7 +284,7 @@ void AGOSEngine::dumpVideoScript(const byte *src, bool singeOpcode) { } } - printf("\n"); + debugN("\n"); } while (!singeOpcode); } @@ -293,10 +293,10 @@ void AGOSEngine::dumpVgaScript(const byte *ptr, uint16 res, uint16 id) { } void AGOSEngine::dumpVgaScriptAlways(const byte *ptr, uint16 res, uint16 id) { - printf("; address=%x, vgafile=%d vgasprite=%d\n", + debugN("; address=%x, vgafile=%d vgasprite=%d\n", (unsigned int)(ptr - _vgaBufferPointers[res].vgaFile1), res, id); dumpVideoScript(ptr, false); - printf("; end\n"); + debugN("; end\n"); } void AGOSEngine::dumpAllVgaImageFiles() { diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp index df837a5e16..5629a1dca6 100644 --- a/engines/agos/menus.cpp +++ b/engines/agos/menus.cpp @@ -33,8 +33,6 @@ #include "agos/agos.h" #include "agos/intern.h" -using Common::File; - namespace AGOS { void AGOSEngine::loadMenuFile() { diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp index 858307685c..fe2d1cd25b 100644 --- a/engines/agos/midi.cpp +++ b/engines/agos/midi.cpp @@ -226,7 +226,7 @@ void MidiPlayer::startTrack(int track) { parser->setMidiDriver(this); parser->setTimerRate(_driver->getBaseTempo()); if (!parser->loadMusic(_music.songs[track], _music.song_sizes[track])) { - printf ("Error reading track!\n"); + warning("Error reading track %d", track); delete parser; parser = 0; } @@ -455,7 +455,7 @@ void MidiPlayer::loadSMF(Common::File *in, int song, bool sfx) { parser->setMidiDriver(this); parser->setTimerRate(timerRate); if (!parser->loadMusic(p->data, size)) { - printf("Error reading track!\n"); + warning("Error reading track"); delete parser; parser = 0; } @@ -484,7 +484,7 @@ void MidiPlayer::loadMultipleSMF(Common::File *in, bool sfx) { p->num_songs = in->readByte(); if (p->num_songs > 16) { - printf ("playMultipleSMF: %d is too many songs to keep track of!\n", (int)p->num_songs); + warning("playMultipleSMF: %d is too many songs to keep track of", (int)p->num_songs); return; } @@ -496,7 +496,7 @@ void MidiPlayer::loadMultipleSMF(Common::File *in, bool sfx) { // Make sure there's a MThd in->read(buf, 4); if (memcmp(buf, "MThd", 4)) { - printf("Expected MThd but found '%c%c%c%c' instead!\n", buf[0], buf[1], buf[2], buf[3]); + warning("Expected MThd but found '%c%c%c%c' instead", buf[0], buf[1], buf[2], buf[3]); return; } in->seek(in->readUint32BE(), SEEK_CUR); diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp index cb48e5e50b..5775e71a7a 100644 --- a/engines/agos/res.cpp +++ b/engines/agos/res.cpp @@ -35,8 +35,6 @@ #include "common/zlib.h" -using Common::File; - namespace AGOS { #ifdef ENABLE_AGOS2 @@ -67,7 +65,7 @@ uint32 AGOSEngine::readUint32Wrapper(const void *src) { void AGOSEngine::decompressData(const char *srcName, byte *dst, uint32 offset, uint32 srcSize, uint32 dstSize) { #ifdef USE_ZLIB - File in; + Common::File in; in.open(srcName); if (in.isOpen() == false) error("decompressData: Can't load %s", srcName); @@ -548,7 +546,7 @@ uint fileReadItemID(Common::SeekableReadStream *in) { } void AGOSEngine::openGameFile() { - _gameFile = new File(); + _gameFile = new Common::File(); _gameFile->open(getFileName(GAME_GMEFILE)); if (!_gameFile->isOpen()) @@ -783,7 +781,7 @@ void AGOSEngine::loadVGABeardFile(uint16 id) { uint32 offs, size; if (getFeatures() & GF_OLD_BUNDLE) { - File in; + Common::File in; char filename[15]; if (id == 23) id = 112; @@ -824,7 +822,7 @@ void AGOSEngine::loadVGABeardFile(uint16 id) { } void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) { - File in; + Common::File in; char filename[15]; byte *dst; uint32 file, offs, srcSize, dstSize; diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp index 6e54d926c4..b4c1455c10 100644 --- a/engines/agos/res_snd.cpp +++ b/engines/agos/res_snd.cpp @@ -35,8 +35,6 @@ #include "sound/mididrv.h" #include "sound/mods/protracker.h" -using Common::File; - namespace AGOS { void AGOSEngine_Simon1::playSpeech(uint16 speech_id, uint16 vgaSpriteId) { @@ -175,7 +173,7 @@ static const ModuleOffs amigaWaxworksOffs[20] = { void AGOSEngine::playModule(uint16 music) { char filename[15]; - File f; + Common::File f; uint32 offs = 0; if (getPlatform() == Common::kPlatformAmiga && getGameType() == GType_WW) { @@ -262,7 +260,7 @@ void AGOSEngine_Simon1::playMusic(uint16 music, uint16 track) { // TODO: Add support for Desktop Tracker format in Acorn disk version } else { char filename[15]; - File f; + Common::File f; sprintf(filename, "MOD%d.MUS", music); f.open(filename); if (f.isOpen() == false) @@ -291,7 +289,7 @@ void AGOSEngine::playMusic(uint16 music, uint16 track) { _midi.setLoop(true); // Must do this BEFORE loading music. char filename[15]; - File f; + Common::File f; sprintf(filename, "MOD%d.MUS", music); f.open(filename); if (f.isOpen() == false) @@ -316,7 +314,7 @@ void AGOSEngine::playSting(uint16 soundId) { char filename[15]; - File mus_file; + Common::File mus_file; uint16 mus_offset; sprintf(filename, "STINGS%i.MUS", _soundFileId); @@ -347,7 +345,7 @@ static const byte elvira1_soundTable[100] = { }; bool AGOSEngine::loadVGASoundFile(uint16 id, uint8 type) { - File in; + Common::File in; char filename[15]; byte *dst; uint32 srcSize, dstSize; @@ -452,7 +450,7 @@ static const char *dimpSoundList[32] = { void AGOSEngine::loadSoundFile(const char* filename) { - File in; + Common::File in; in.open(filename); if (in.isOpen() == false) @@ -471,7 +469,7 @@ void AGOSEngine::loadSound(uint16 sound, int16 pan, int16 vol, uint16 type) { byte *dst; if (getGameId() == GID_DIMP) { - File in; + Common::File in; char filename[15]; assert(sound >= 1 && sound <= 32); diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp index 91c8a53681..a2eff06fcc 100644 --- a/engines/agos/rooms.cpp +++ b/engines/agos/rooms.cpp @@ -30,24 +30,22 @@ #include "agos/agos.h" #include "agos/intern.h" -using Common::File; - namespace AGOS { uint16 AGOSEngine::getBackExit(int n) { switch (n) { - case 0: - return 2; - case 1: - return 3; - case 2: - return 0; - case 3: - return 1; - case 4: - return 5; - case 5: - return 4; + case 0: + return 2; + case 1: + return 3; + case 2: + return 0; + case 3: + return 1; + case 4: + return 5; + case 5: + return 4; } return 0; @@ -205,13 +203,13 @@ void AGOSEngine_Elvira2::moveDirn(Item *i, uint x) { if (n == 1) { sr = (SubSuperRoom *)findChildOfType(p, kSuperRoomType); switch (x) { - case 0: a = -(sr->roomX); break; - case 1: a = 1; break; - case 2: a = sr->roomX; break; - case 3: a = 0xFFFF; break; - case 4: a = -(sr->roomX * sr->roomY); break; - case 5: a = (sr->roomX * sr->roomY); break; - default: return; + case 0: a = -(sr->roomX); break; + case 1: a = 1; break; + case 2: a = sr->roomX; break; + case 3: a = 0xFFFF; break; + case 4: a = -(sr->roomX * sr->roomY); break; + case 5: a = (sr->roomX * sr->roomY); break; + default: return; } _superRoomNumber += a; } @@ -366,7 +364,7 @@ bool AGOSEngine::loadRoomItems(uint16 room) { byte *p; uint i, minNum, maxNum; char filename[30]; - File in; + Common::File in; Item *item, *itemTmp; if (_roomsList == NULL) diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index ffa95506c5..eefa2460ec 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -154,7 +154,7 @@ void AGOSEngine::quickLoadOrSave() { Subroutine *sub; success = loadGame(genSaveName(_saveLoadSlot)); if (!success) { - buf = Common::String::printf(_("Failed to load game state from file:\n\n%s"), filename); + buf = Common::String::format(_("Failed to load game state from file:\n\n%s"), filename); } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { drawIconArray(2, me(), 0, 0); setBitFlag(97, true); @@ -189,7 +189,7 @@ void AGOSEngine::quickLoadOrSave() { } else { success = saveGame(_saveLoadSlot, _saveLoadName); if (!success) - buf = Common::String::printf(_("Failed to save game state to file:\n\n%s"), filename); + buf = Common::String::format(_("Failed to save game state to file:\n\n%s"), filename); } if (!success) { @@ -197,7 +197,7 @@ void AGOSEngine::quickLoadOrSave() { dialog.runModal(); } else if (_saveLoadType == 1) { - buf = Common::String::printf(_("Successfully saved game state in file:\n\n%s"), filename); + buf = Common::String::format(_("Successfully saved game state in file:\n\n%s"), filename); GUI::TimedMessageDialog dialog(buf, 1500); dialog.runModal(); diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index 6ec72814fa..8914470370 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -38,23 +38,21 @@ #include "sound/decoders/vorbis.h" #include "sound/decoders/wave.h" -using Common::File; - namespace AGOS { #define SOUND_BIG_ENDIAN true class BaseSound : Common::NonCopyable { protected: - File *_file; + Common::File *_file; uint32 *_offsets; Audio::Mixer *_mixer; bool _freeOffsets; DisposeAfterUse::Flag _disposeFile; public: - BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES); - BaseSound(Audio::Mixer *mixer, File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES); + BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES); + BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES); virtual ~BaseSound(); void playSound(uint sound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0) { @@ -64,7 +62,7 @@ public: virtual Audio::AudioStream *makeAudioStream(uint sound) = 0; }; -BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse) +BaseSound::BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 base, bool bigEndian, DisposeAfterUse::Flag disposeFileAfterUse) : _mixer(mixer), _file(file), _disposeFile(disposeFileAfterUse) { uint res = 0; @@ -98,7 +96,7 @@ BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 base, bool bigEndia _offsets[res] = _file->size(); } -BaseSound::BaseSound(Audio::Mixer *mixer, File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse) +BaseSound::BaseSound(Audio::Mixer *mixer, Common::File *file, uint32 *offsets, DisposeAfterUse::Flag disposeFileAfterUse) : _mixer(mixer), _file(file), _disposeFile(disposeFileAfterUse) { _offsets = offsets; @@ -225,9 +223,9 @@ static void convertPan(int &pan) { class WavSound : public BaseSound { public: - WavSound(Audio::Mixer *mixer, File *file, uint32 base = 0, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES) + WavSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES) : BaseSound(mixer, file, base, false, disposeFileAfterUse) {} - WavSound(Audio::Mixer *mixer, File *file, uint32 *offsets) : BaseSound(mixer, file, offsets) {} + WavSound(Audio::Mixer *mixer, Common::File *file, uint32 *offsets) : BaseSound(mixer, file, offsets) {} Audio::AudioStream *makeAudioStream(uint sound); void playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0); }; @@ -251,7 +249,7 @@ void WavSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ class VocSound : public BaseSound { const byte _flags; public: - VocSound(Audio::Mixer *mixer, File *file, bool isUnsigned, uint32 base = 0, bool bigEndian = false, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES) + VocSound(Audio::Mixer *mixer, Common::File *file, bool isUnsigned, uint32 base = 0, bool bigEndian = false, DisposeAfterUse::Flag disposeFileAfterUse = DisposeAfterUse::YES) : BaseSound(mixer, file, base, bigEndian, disposeFileAfterUse), _flags(isUnsigned ? Audio::FLAG_UNSIGNED : 0) {} Audio::AudioStream *makeAudioStream(uint sound); void playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0); @@ -275,7 +273,7 @@ void VocSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ class RawSound : public BaseSound { const byte _flags; public: - RawSound(Audio::Mixer *mixer, File *file, bool isUnsigned) + RawSound(Audio::Mixer *mixer, Common::File *file, bool isUnsigned) : BaseSound(mixer, file, 0, SOUND_BIG_ENDIAN), _flags(isUnsigned ? Audio::FLAG_UNSIGNED : 0) {} Audio::AudioStream *makeAudioStream(uint sound); void playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0); @@ -305,7 +303,7 @@ void RawSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ class CompressedSound : public BaseSound { public: - CompressedSound(Audio::Mixer *mixer, File *file, uint32 base) : BaseSound(mixer, file, base, false) {} + CompressedSound(Audio::Mixer *mixer, Common::File *file, uint32 base) : BaseSound(mixer, file, base, false) {} Common::MemoryReadStream *loadStream(uint sound) const { if (_offsets == NULL) @@ -334,7 +332,7 @@ public: #ifdef USE_MAD class MP3Sound : public CompressedSound { public: - MP3Sound(Audio::Mixer *mixer, File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {} + MP3Sound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {} Audio::AudioStream *makeAudioStream(uint sound) { Common::MemoryReadStream *tmp = loadStream(sound); if (!tmp) @@ -350,7 +348,7 @@ public: #ifdef USE_VORBIS class VorbisSound : public CompressedSound { public: - VorbisSound(Audio::Mixer *mixer, File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {} + VorbisSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {} Audio::AudioStream *makeAudioStream(uint sound) { Common::MemoryReadStream *tmp = loadStream(sound); if (!tmp) @@ -366,7 +364,7 @@ public: #ifdef USE_FLAC class FLACSound : public CompressedSound { public: - FLACSound(Audio::Mixer *mixer, File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {} + FLACSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {} Audio::AudioStream *makeAudioStream(uint sound) { Common::MemoryReadStream *tmp = loadStream(sound); if (!tmp) @@ -379,7 +377,7 @@ public: /////////////////////////////////////////////////////////////////////////////// #pragma mark - -static CompressedSound *makeCompressedSound(Audio::Mixer *mixer, File *file, const Common::String &basename) { +static CompressedSound *makeCompressedSound(Audio::Mixer *mixer, Common::File *file, const Common::String &basename) { #ifdef USE_FLAC file->open(basename + ".fla"); if (file->isOpen()) { @@ -451,7 +449,7 @@ void Sound::loadVoiceFile(const GameSpecificSettings *gss) { char filename[16]; - File *file = new File(); + Common::File *file = new Common::File(); if (!_hasVoiceFile) { _voice = makeCompressedSound(_mixer, file, gss->speech_filename); @@ -506,7 +504,7 @@ void Sound::loadVoiceFile(const GameSpecificSettings *gss) { void Sound::loadSfxFile(const GameSpecificSettings *gss) { char filename[16]; - File *file = new File(); + Common::File *file = new Common::File(); if (!_hasEffectsFile) { _effects = makeCompressedSound(_mixer, file, gss->effects_filename); @@ -540,7 +538,7 @@ void Sound::readSfxFile(const Common::String &filename) { _mixer->stopHandle(_effectsHandle); - File *file = new File(); + Common::File *file = new Common::File(); file->open(filename); if (file->isOpen() == false) { @@ -557,7 +555,7 @@ void Sound::readSfxFile(const Common::String &filename) { } // This method is only used by Simon2 -void Sound::loadSfxTable(File *gameFile, uint32 base) { +void Sound::loadSfxTable(Common::File *gameFile, uint32 base) { stopAll(); delete _effects; @@ -572,7 +570,7 @@ void Sound::loadSfxTable(File *gameFile, uint32 base) { void Sound::readVoiceFile(const Common::String &filename) { _mixer->stopHandle(_voiceHandle); - File *file = new File(); + Common::File *file = new Common::File(); file->open(filename); if (file->isOpen() == false) @@ -592,7 +590,7 @@ void Sound::playVoice(uint sound) { char filename[16]; _lastVoiceFile = _filenums[sound]; sprintf(filename, "voices%d.dat", _filenums[sound]); - File *file = new File(); + Common::File *file = new Common::File(); file->open(filename); if (file->isOpen() == false) error("playVoice: Can't load voice file %s", filename); @@ -801,7 +799,7 @@ void Sound::switchVoiceFile(const GameSpecificSettings *gss, uint disc) { _lastVoiceFile = disc; char filename[16]; - File *file = new File(); + Common::File *file = new Common::File(); if (!_hasVoiceFile) { sprintf(filename, "%s%d", gss->speech_filename, disc); diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index 40506e4874..84f5f3792e 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -30,8 +30,6 @@ #include "agos/agos.h" #include "agos/intern.h" -using Common::File; - namespace AGOS { void AGOSEngine::uncompressText(byte *ptr) { @@ -265,7 +263,7 @@ uint AGOSEngine::loadTextFile(const char *filename, byte *dst) { } uint AGOSEngine::loadTextFile_simon1(const char *filename, byte *dst) { - File fo; + Common::File fo; fo.open(filename); uint32 size; diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp index 8dccded958..733d40e52d 100644 --- a/engines/agos/subroutine.cpp +++ b/engines/agos/subroutine.cpp @@ -30,8 +30,6 @@ #include "agos/agos.h" #include "agos/intern.h" -using Common::File; - namespace AGOS { // Script opcodes to load into memory @@ -262,22 +260,22 @@ void AGOSEngine::endCutscene() { _runScriptReturn1 = true; } -File *AGOSEngine::openTablesFile(const char *filename) { +Common::File *AGOSEngine::openTablesFile(const char *filename) { if (getFeatures() & GF_OLD_BUNDLE) return openTablesFile_simon1(filename); else return openTablesFile_gme(filename); } -File *AGOSEngine::openTablesFile_simon1(const char *filename) { - File *fo = new File(); +Common::File *AGOSEngine::openTablesFile_simon1(const char *filename) { + Common::File *fo = new Common::File(); fo->open(filename); if (fo->isOpen() == false) error("openTablesFile: Can't open '%s'", filename); return fo; } -File *AGOSEngine::openTablesFile_gme(const char *filename) { +Common::File *AGOSEngine::openTablesFile_gme(const char *filename) { uint res; uint32 offs; @@ -291,7 +289,7 @@ File *AGOSEngine::openTablesFile_gme(const char *filename) { bool AGOSEngine::loadTablesIntoMem(uint16 subrId) { byte *p; uint16 min_num, max_num, file_num; - File *in; + Common::File *in; char filename[30]; if (_tblList == NULL) @@ -340,7 +338,7 @@ bool AGOSEngine::loadTablesIntoMem(uint16 subrId) { bool AGOSEngine_Waxworks::loadTablesIntoMem(uint16 subrId) { byte *p; uint min_num, max_num; - File *in; + Common::File *in; p = _tblList; if (p == NULL) @@ -407,7 +405,7 @@ bool AGOSEngine::loadXTablesIntoMem(uint16 subrId) { int i; uint min_num, max_num; char filename[30]; - File *in; + Common::File *in; p = _xtblList; if (p == NULL) @@ -457,7 +455,7 @@ bool AGOSEngine::loadXTablesIntoMem(uint16 subrId) { return 0; } -void AGOSEngine::closeTablesFile(File *in) { +void AGOSEngine::closeTablesFile(Common::File *in) { if (getFeatures() & GF_OLD_BUNDLE) { in->close(); delete in; @@ -572,7 +570,7 @@ restart: _codePtr += 8; if (_dumpOpcodes) - printf("; %d\n", sub->id); + debug("; %d", sub->id); result = runScript(); if (result != 0) { break; diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index dd2df79c07..8b8b16c9bb 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -155,7 +155,7 @@ void AGOSEngine::runVgaScript() { if (_dumpVgaOpcodes) { if (_vcPtr != (const byte *)&_vcGetOutOfCode) { - printf("%.5d %.5X: %5d %4d ", _vgaTickCounter, (unsigned int)(_vcPtr - _curVgaFile1), _vgaCurSpriteId, _vgaCurZoneNum); + debugN("%.5d %.5X: %5d %4d ", _vgaTickCounter, (unsigned int)(_vcPtr - _curVgaFile1), _vgaCurSpriteId, _vgaCurZoneNum); dumpVideoScript(_vcPtr, true); } } @@ -383,7 +383,7 @@ void AGOSEngine::vcSkipNextInstruction() { } if (_dumpVgaOpcodes) - printf("; skipped\n"); + debugN("; skipped\n"); } // VGA Script commands diff --git a/engines/agos/vga_ff.cpp b/engines/agos/vga_ff.cpp index 0a6458ac11..38a3479292 100644 --- a/engines/agos/vga_ff.cpp +++ b/engines/agos/vga_ff.cpp @@ -405,9 +405,9 @@ void AGOSEngine_PuzzlePack::vc63_fastFadeIn() { if (getBitFlag(100)) { startOverlayAnims(); } else if (getBitFlag(103)) { - printf("NameAndTime\n"); + debug("vc63_fastFadeIn: NameAndTime"); } else if (getBitFlag(104)) { - printf("HiScoreTable\n"); + debug("vc63_fastFadeIn: HiScoreTable"); } } diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 6b0f4d3b39..a8f9327152 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -49,9 +49,6 @@ #include "gui/KeysDialog.h" #endif -using GUI::CommandSender; -using GUI::StaticTextWidget; - class ConfigDialog : public GUI::OptionsDialog { protected: #ifdef SMALL_SCREEN_DEVICE @@ -76,15 +73,15 @@ MainMenuDialog::MainMenuDialog(Engine *engine) _logo->useThemeTransparency(true); _logo->setGfx(g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall)); } else { - StaticTextWidget *title = new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM"); + GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM"); title->setAlign(Graphics::kTextAlignCenter); } #else - StaticTextWidget *title = new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM"); + GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM"); title->setAlign(Graphics::kTextAlignCenter); #endif - StaticTextWidget *version = new StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate); + GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate); version->setAlign(Graphics::kTextAlignCenter); new GUI::ButtonWidget(this, "GlobalMenu.Resume", _("~R~esume"), 0, kPlayCmd, 'P'); @@ -130,7 +127,7 @@ MainMenuDialog::~MainMenuDialog() { delete _saveDialog; } -void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +void MainMenuDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kPlayCmd: close(); @@ -187,16 +184,16 @@ void MainMenuDialog::reflowLayout() { _logo->useThemeTransparency(true); _logo->setGfx(g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall)); - GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title"); + GUI::StaticTextWidget *title = (GUI::StaticTextWidget *)findWidget("GlobalMenu.Title"); if (title) { removeWidget(title); title->setNext(0); delete title; } } else { - GUI::StaticTextWidget *title = (StaticTextWidget *)findWidget("GlobalMenu.Title"); + GUI::StaticTextWidget *title = (GUI::StaticTextWidget *)findWidget("GlobalMenu.Title"); if (!title) { - title = new StaticTextWidget(this, "GlobalMenu.Title", "ScummVM"); + title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM"); title->setAlign(Graphics::kTextAlignCenter); } @@ -321,7 +318,7 @@ ConfigDialog::~ConfigDialog() { #endif } -void ConfigDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +void ConfigDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kKeysCmd: diff --git a/engines/engine.cpp b/engines/engine.cpp index 0af01f72c9..4176d003f1 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -99,7 +99,6 @@ Engine::Engine(OSystem *syst) _mainMenuDialog(NULL) { g_engine = this; - Common::setDebugOutputFormatter(defaultOutputFormatter); Common::setErrorOutputFormatter(defaultOutputFormatter); Common::setErrorHandler(defaultErrorHandler); diff --git a/engines/gob/console.cpp b/engines/gob/console.cpp index 247911402f..b6b481f611 100644 --- a/engines/gob/console.cpp +++ b/engines/gob/console.cpp @@ -26,15 +26,17 @@ #include "gob/console.h" #include "gob/gob.h" #include "gob/inter.h" +#include "gob/dataio.h" namespace Gob { GobConsole::GobConsole(GobEngine *vm) : GUI::Debugger(), _vm(vm) { - DCmd_Register("varSize", WRAP_METHOD(GobConsole, cmd_varSize)); - DCmd_Register("var8", WRAP_METHOD(GobConsole, cmd_var8)); - DCmd_Register("var16", WRAP_METHOD(GobConsole, cmd_var16)); - DCmd_Register("var32", WRAP_METHOD(GobConsole, cmd_var32)); - DCmd_Register("varString", WRAP_METHOD(GobConsole, cmd_varString)); + DCmd_Register("varSize", WRAP_METHOD(GobConsole, cmd_varSize)); + DCmd_Register("var8", WRAP_METHOD(GobConsole, cmd_var8)); + DCmd_Register("var16", WRAP_METHOD(GobConsole, cmd_var16)); + DCmd_Register("var32", WRAP_METHOD(GobConsole, cmd_var32)); + DCmd_Register("varString", WRAP_METHOD(GobConsole, cmd_varString)); + DCmd_Register("listArchives", WRAP_METHOD(GobConsole, cmd_listArchives)); } GobConsole::~GobConsole() { @@ -144,4 +146,18 @@ bool GobConsole::cmd_varString(int argc, const char **argv) { return true; } +bool GobConsole::cmd_listArchives(int argc, const char **argv) { + Common::Array<ArchiveInfo> info; + + _vm->_dataIO->getArchiveInfo(info); + + DebugPrintf(" Archive | Base | FileCount\n"); + DebugPrintf("--------------------------------\n"); + for (Common::Array<ArchiveInfo>::const_iterator it = info.begin(); it != info.end(); ++it) + if (!it->name.empty()) + DebugPrintf("%13s | %d | %d\n", it->name.c_str(), it->base, it->fileCount); + + return true; +} + } // End of namespace Gob diff --git a/engines/gob/console.h b/engines/gob/console.h index 5dc6096062..f51d74be86 100644 --- a/engines/gob/console.h +++ b/engines/gob/console.h @@ -49,6 +49,8 @@ private: bool cmd_var16(int argc, const char **argv); bool cmd_var32(int argc, const char **argv); bool cmd_varString(int argc, const char **argv); + + bool cmd_listArchives(int argc, const char **argv); }; } // End of namespace Mohawk diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp index 55ca3350af..e409025fc3 100644 --- a/engines/gob/dataio.cpp +++ b/engines/gob/dataio.cpp @@ -24,7 +24,8 @@ */ #include "common/endian.h" -#include "common/str.h" +#include "common/types.h" +#include "common/stream.h" #include "gob/gob.h" #include "gob/dataio.h" @@ -33,198 +34,104 @@ namespace Gob { -DataStream::DataStream(DataIO &io, int16 handle, uint32 dSize, bool dispose) { - _io = &io; - - _handle = handle; - _size = dSize; - _dispose = dispose; - - _data = 0; - _stream = 0; +DataIO::File::File() : size(0), offset(0), packed(false), archive(0) { } -DataStream::DataStream(byte *buf, uint32 dSize, bool dispose) { - _data = buf; - _size = dSize; - _stream = new Common::MemoryReadStream(_data, _size); - _dispose = dispose; - - _io = 0; - _handle = -1; +DataIO::File::File(const Common::String &n, uint32 s, uint32 o, bool p, Archive &a) : + name(n), size(s), offset(o), packed(p), archive(&a) { } -DataStream::~DataStream() { - delete _stream; - if (_dispose) { - delete[] _data; - if ((_handle >= 0) && _io) - _io->closeData(_handle); - } +DataIO::DataIO() { + // Reserve memory for the standard max amount of archives + _archives.reserve(kMaxArchives); + for (int i = 0; i < kMaxArchives; i++) + _archives.push_back(0); } -int32 DataStream::pos() const { - if (_stream) - return _stream->pos(); - - int32 resPos = _io->getChunkPos(_handle); - if (resPos != -1) - return resPos; - - return _io->file_getHandle(_handle)->pos(); -} - -int32 DataStream::size() const { - if (_stream) - return _stream->size(); - - return _size; -} +DataIO::~DataIO() { + // Close all archives + for (Common::Array<Archive *>::iterator it = _archives.begin(); it != _archives.end(); ++it) { + if (!*it) + continue; -bool DataStream::seek(int32 offset, int whence) { - if (_stream) - return _stream->seek(offset, whence); - else if (!_io->isDataFileChunk(_handle)) - return _io->file_getHandle(_handle)->seek(offset, whence); - else { - _io->seekChunk(_handle, offset, whence); - return true; + closeArchive(**it); + delete *it; } } -bool DataStream::eos() const { - if (_stream) - return _stream->eos(); - - return pos() >= size(); // FIXME (eos definition change) -} - -uint32 DataStream::read(void *dataPtr, uint32 dataSize) { - if (_stream) - return _stream->read(dataPtr, dataSize); - - if (!_io->isDataFileChunk(_handle)) - return _io->file_getHandle(_handle)->read((byte *)dataPtr, dataSize); - - byte *data = (byte *)dataPtr; - uint32 haveRead = 0; - while (dataSize > 0x3FFF) { - _io->readChunk(_handle, (byte *)data, 0x3FFF); - dataSize -= 0x3FFF; - data += 0x3FFF; - haveRead += 0x3FFF; - } - _io->readChunk(_handle, (byte *)data, dataSize); - - return haveRead + dataSize; -} +void DataIO::getArchiveInfo(Common::Array<ArchiveInfo> &info) const { + info.resize(_archives.size()); -DataIO::DataIO(GobEngine *vm) : _vm(vm) { - for (int i = 0; i < MAX_DATA_FILES; i++) { - _dataFiles[i] = 0; - _numDataChunks[i] = 0; - _dataFileHandles[i] = -1; - } -} + for (uint i = 0; i < _archives.size(); i++) { + if (!_archives[i]) + continue; -DataIO::~DataIO() { - for (int i = 0; i < MAX_DATA_FILES; i++) { - if (_dataFiles[i]) - file_getHandle(_dataFileHandles[i])->close(); - delete[] _dataFiles[i]; + info[i].name = _archives[i]->name; + info[i].base = _archives[i]->base; + info[i].fileCount = _archives[i]->files.size(); } } -bool DataIO::isDataFileChunk(int16 handle) const { - return (handle >= 50) && (handle < 128); -} - -bool DataIO::isPacked(int16 handle) const { - if (!isDataFileChunk(handle)) - return false; - - return _chunk[getIndex(handle)]->packed != 0; -} - -int DataIO::getFile(int16 handle) const { - if (!isDataFileChunk(handle)) - return -1; +byte *DataIO::unpack(const byte *src, uint32 srcSize, int32 &size) { + size = READ_LE_UINT32(src); - return (handle - 50) / 10; -} + byte *data = new byte[size]; -int DataIO::getSlot(int16 handle) const { - if (!isDataFileChunk(handle)) - return -1; - - return (handle - 50) % 10; + Common::MemoryReadStream srcStream(src + 4, srcSize - 4); + unpack(srcStream, data, size); + return data; } -int DataIO::getIndex(int16 handle) const { - if (!isDataFileChunk(handle)) - return -1; - - return getIndex(getFile(handle), getSlot(handle)); -} +Common::SeekableReadStream *DataIO::unpack(Common::SeekableReadStream &src) { + uint32 size = src.readUint32LE(); -int DataIO::getIndex(int file, int slot) const { - return file * MAX_SLOT_COUNT + slot; -} + byte *data = (byte *) malloc(size); -int16 DataIO::getHandle(int file, int slot) const { - return file * 10 + slot + 50; + unpack(src, data, size); + return new Common::MemoryReadStream(data, size, DisposeAfterUse::YES); } -int32 DataIO::unpackData(byte *src, byte *dest) { - uint32 realSize; - uint32 counter; - uint16 cmd; - byte *tmpBuf; - int16 off; - byte len; - uint16 tmpIndex; - - tmpBuf = new byte[4114]; +void DataIO::unpack(Common::SeekableReadStream &src, byte *dest, uint32 size) { + byte *tmpBuf = new byte[4114]; assert(tmpBuf); - counter = realSize = READ_LE_UINT32(src); + uint32 counter = size; for (int i = 0; i < 4078; i++) tmpBuf[i] = 0x20; - tmpIndex = 4078; + uint16 tmpIndex = 4078; - src += 4; - - cmd = 0; + uint16 cmd = 0; while (1) { cmd >>= 1; - if ((cmd & 0x0100) == 0) { - cmd = *src | 0xFF00; - src++; - } + if ((cmd & 0x0100) == 0) + cmd = src.readByte() | 0xFF00; + if ((cmd & 1) != 0) { /* copy */ - *dest++ = *src; - tmpBuf[tmpIndex] = *src; - src++; + byte tmp = src.readByte(); + + *dest++ = tmp; + tmpBuf[tmpIndex] = tmp; + tmpIndex++; tmpIndex %= 4096; counter--; if (counter == 0) break; } else { /* copy string */ + byte tmp1 = src.readByte(); + byte tmp2 = src.readByte(); - off = *src++; - off |= (*src & 0xF0) << 4; - len = (*src & 0x0F) + 3; - src++; + int16 off = tmp1 | ((tmp2 & 0xF0) << 4); + byte len = (tmp2 & 0x0F) + 3; for (int i = 0; i < len; i++) { *dest++ = tmpBuf[(off + i) % 4096]; counter--; if (counter == 0) { delete[] tmpBuf; - return realSize; + return; } tmpBuf[tmpIndex] = tmpBuf[(off + i) % 4096]; tmpIndex++; @@ -233,390 +140,251 @@ int32 DataIO::unpackData(byte *src, byte *dest) { } } - delete[] tmpBuf; - return realSize; -} - -Common::File *DataIO::file_getHandle(int16 handle) { - return &_filesHandles[handle]; -} -const Common::File *DataIO::file_getHandle(int16 handle) const { - return &_filesHandles[handle]; + delete[] tmpBuf; } -int16 DataIO::file_open(const char *path) { - int16 i; - - for (i = 0; i < MAX_FILES; i++) { - if (!file_getHandle(i)->isOpen()) +bool DataIO::openArchive(Common::String name, bool base) { + // Look for a free archive slot + Archive **archive = 0; + int i = 0; + for (Common::Array<Archive *>::iterator it = _archives.begin(); it != _archives.end(); ++it, i++) { + if (!*it) { + archive = &*it; break; + } } - if (i == MAX_FILES) - return -1; - - if (file_getHandle(i)->open(path)) - return i; - - return -1; -} -int16 DataIO::getChunk(const char *chunkName) { - for (int16 file = 0; file < MAX_DATA_FILES; file++) { - if (_dataFiles[file] == 0) - return -1; + if (!archive) { + // No free slot, create a new one - int16 slot; - for (slot = 0; slot < MAX_SLOT_COUNT; slot++) - if (_chunkPos[file * MAX_SLOT_COUNT + slot] == -1) - break; + warning("DataIO::openArchive(): Need to increase archive count to %d", _archives.size() + 1); + _archives.push_back(0); - if (slot == MAX_SLOT_COUNT) { - warning("Chunk slots full"); - return -1; - } - - ChunkDesc *dataDesc = _dataFiles[file]; - for (uint16 chunk = 0; chunk < _numDataChunks[file]; chunk++, dataDesc++) { - if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0) - continue; + Common::Array<Archive *>::iterator it = _archives.end(); + archive = &*(--it); + } - int index = getIndex(file, slot); + // Add extension if necessary + if (!name.contains('.')) + name += ".stk"; - _isCurrentSlot[index] = false; - _chunk [index] = dataDesc; - _chunkPos [index] = 0; + // Try to open + *archive = openArchive(name); + if (!*archive) + return false; - return getHandle(file, slot); - } - } - return -1; + (*archive)->base = base; + return true; } -char DataIO::freeChunk(int16 handle) { - if (isDataFileChunk(handle)) { - _chunkPos[getIndex(handle)] = -1; +DataIO::Archive *DataIO::openArchive(const Common::String &name) { + Archive *archive = new Archive; + if (!archive->file.open(name)) { + delete archive; return 0; } - return 1; -} - -int32 DataIO::readChunk(int16 handle, byte *buf, uint16 size) { - if (!isDataFileChunk(handle)) - return -2; - - int file = getFile(handle); - int slot = getSlot(handle); - int index = getIndex(file, slot); - - _chunkPos[index] = CLIP<int32>(_chunkPos[index], 0, _chunk[index]->size); - - if (!_isCurrentSlot[index]) { - for (int16 i = 0; i < MAX_SLOT_COUNT; i++) - _isCurrentSlot[file * MAX_SLOT_COUNT + i] = false; - int32 offset = _chunk[index]->offset + _chunkPos[index]; + archive->name = name; - debugC(7, kDebugFileIO, "seek: %d, %d", _chunk[index]->offset, _chunkPos[index]); + uint16 fileCount = archive->file.readUint16LE(); + for (uint16 i = 0; i < fileCount; i++) { + File file; - file_getHandle(_dataFileHandles[file])->seek(offset, SEEK_SET); - } - - _isCurrentSlot[index] = true; - if ((_chunkPos[index] + size) > (int32) (_chunk[index]->size)) - size = _chunk[index]->size - _chunkPos[index]; - - file_getHandle(_dataFileHandles[file])->read(buf, size); - _chunkPos[index] += size; - return size; -} + char fileName[14]; -int16 DataIO::seekChunk(int16 handle, int32 pos, int16 from) { - if (!isDataFileChunk(handle)) - return -1; + archive->file.read(fileName, 13); + fileName[13] = '\0'; - int file = getFile(handle); - int slot = getSlot(handle); - int index = getIndex(file, slot); + file.size = archive->file.readUint32LE(); + file.offset = archive->file.readUint32LE(); + file.packed = archive->file.readByte() != 0; - _isCurrentSlot[index] = false; - if (from == SEEK_SET) - _chunkPos[index] = pos; - else if (from == SEEK_CUR) - _chunkPos[index] += pos; - else if (from == SEEK_END) - _chunkPos[index] = _chunk[index]->size - pos; + // Replacing cyrillic characters + Util::replaceChar(fileName, (char) 0x85, 'E'); + Util::replaceChar(fileName, (char) 0x8A, 'K'); + Util::replaceChar(fileName, (char) 0x8E, 'O'); + Util::replaceChar(fileName, (char) 0x91, 'C'); + Util::replaceChar(fileName, (char) 0x92, 'T'); - return _chunkPos[index]; -} + file.name = fileName; -uint32 DataIO::getChunkPos(int16 handle) const { - if (!isDataFileChunk(handle)) - return 0xFFFFFFFF; + // Geisha use 0ot files, which are compressed TOT files without the packed byte set. + if (file.name.hasSuffix(".0OT")) { + file.name.setChar(file.name.size() - 3, 'T'); + file.packed = true; + } - int file = getFile(handle); - int slot = getSlot(handle); + file.archive = archive; + archive->files.setVal(file.name, file); + } - return _chunkPos[file * MAX_SLOT_COUNT + slot]; + return archive; } -int32 DataIO::getChunkSize(const char *chunkName, int32 &packSize) { - packSize = -1; - - for (int file = 0; file < MAX_DATA_FILES; file++) { - if (_dataFiles[file] == 0) - return -1; - - ChunkDesc *dataDesc = _dataFiles[file]; - for (uint16 chunk = 0; chunk < _numDataChunks[file]; chunk++, dataDesc++) { - if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0) - continue; - - if (dataDesc->packed == 0) - return dataDesc->size; +bool DataIO::closeArchive(bool base) { + // Look for a matching archive and close it + for (int archive = _archives.size() - 1; archive >= 0; archive--) { + if (_archives[archive] && (_archives[archive]->base == base)) { + closeArchive(*_archives[archive]); + delete _archives[archive]; + _archives[archive] = 0; - for (int16 slot = 0; slot < MAX_SLOT_COUNT; slot++) - _isCurrentSlot[slot] = false; - - int32 realSize; - - file_getHandle(_dataFileHandles[file])->seek(dataDesc->offset, SEEK_SET); - realSize = file_getHandle(_dataFileHandles[file])->readUint32LE(); - packSize = dataDesc->size; - - return realSize; + return true; } } - return -1; -} - -void DataIO::openDataFile(const char *src, bool itk) { - char path[128]; - - Common::strlcpy(path, src, 128); - if (!strchr(path, '.')) { - path[123] = 0; - strcat(path, ".stk"); - } - - int16 file; - for (file = 0; file < MAX_DATA_FILES; file++) - if (_dataFiles[file] == 0) - break; - if (file == MAX_DATA_FILES) - error("DataIO::openDataFile(): Data file slots are full"); - - _dataFileHandles[file] = file_open(path); + return false; +} - if (_dataFileHandles[file] == -1) - error("DataIO::openDataFile(): Can't open data file \"%s\"", path); +bool DataIO::closeArchive(Archive &archive) { + archive.file.close(); - _dataFileItk [file] = itk; - _numDataChunks[file] = file_getHandle(_dataFileHandles[file])->readUint16LE(); + return true; +} - debugC(7, kDebugFileIO, "DataChunks: %d [for %s]", _numDataChunks[file], path); +bool DataIO::hasFile(const Common::String &name){ + // Look up the files in the opened archives + if (findFile(name)) + return true; - ChunkDesc *dataDesc = new ChunkDesc[_numDataChunks[file]]; - _dataFiles[file] = dataDesc; + // Else, look if a plain file that matches exists + return Common::File::exists(name); +} - for (int i = 0; i < _numDataChunks[file]; i++) { - file_getHandle(_dataFileHandles[file])->read(dataDesc[i].chunkName, 13); - dataDesc[i].size = file_getHandle(_dataFileHandles[file])->readUint32LE(); - dataDesc[i].offset = file_getHandle(_dataFileHandles[file])->readUint32LE(); - dataDesc[i].packed = file_getHandle(_dataFileHandles[file])->readByte(); +int32 DataIO::fileSize(const Common::String &name) { + // Try to find the file in the archives + File *file = findFile(name); + if (file) { + if (!file->packed) + return file->size; - // Replacing cyrillic characters - Util::replaceChar(dataDesc[i].chunkName, (char) 0x85, 'E'); - Util::replaceChar(dataDesc[i].chunkName, (char) 0x8A, 'K'); - Util::replaceChar(dataDesc[i].chunkName, (char) 0x8E, 'O'); - Util::replaceChar(dataDesc[i].chunkName, (char) 0x91, 'C'); - Util::replaceChar(dataDesc[i].chunkName, (char) 0x92, 'T'); + // Sanity checks + assert(file->size >= 4); + assert(file->archive); + assert(file->archive->file.isOpen()); - // Geisha use 0ot files, which are compressed TOT files without the packed byte set. - char *fakeTotPtr = strstr(dataDesc[i].chunkName, "0OT"); - if (fakeTotPtr != 0) { - strncpy(fakeTotPtr, "TOT", 3); - dataDesc[i].packed = 1; - } + // Read the full, unpacked size + file->archive->file.seek(file->offset); + return file->archive->file.readUint32LE(); } - for (int i = 0; i < _numDataChunks[file]; i++) - debugC(7, kDebugFileIO, "%d: %s %d", i, dataDesc[i].chunkName, dataDesc[i].size); + // Else, try to find a matching plain file + Common::File f; + if (!f.open(name)) + return -1; - for (int i = 0; i < MAX_SLOT_COUNT; i++) - _chunkPos[file * MAX_SLOT_COUNT + i] = -1; + return f.size(); } -void DataIO::closeDataFile(bool itk) { - for (int file = MAX_DATA_FILES - 1; file >= 0; file--) { - if (_dataFiles[file] && (_dataFileItk[file] == itk)) { - delete[] _dataFiles[file]; - _dataFiles[file] = 0; - file_getHandle(_dataFileHandles[file])->close(); - return; - } +Common::SeekableReadStream *DataIO::getFile(const Common::String &name) { + // Try to open the file in the archives + File *file = findFile(name); + if (file) { + Common::SeekableReadStream *data = getFile(*file); + if (data) + return data; } -} - -byte *DataIO::getUnpackedData(const char *name) { - int32 realSize; - int32 packSize = -1; - - realSize = getChunkSize(name, packSize); - if ((packSize == -1) || (realSize == -1)) + // Else, try to open a matching plain file + Common::File f; + if (!f.open(name)) return 0; - int16 chunk = getChunk(name); - if (chunk == -1) - return 0; - - byte *unpackBuf = new byte[realSize]; - assert(unpackBuf); - - byte *packBuf = new byte[packSize]; - assert(packBuf); - - int32 sizeLeft = packSize; - byte *ptr = packBuf; - while (sizeLeft > 0x4000) { - readChunk(chunk, ptr, 0x4000); - sizeLeft -= 0x4000; - ptr += 0x4000; - } - readChunk(chunk, ptr, sizeLeft); - freeChunk(chunk); - unpackData(packBuf, unpackBuf); - - delete[] packBuf; - return unpackBuf; + return f.readStream(f.size()); } -void DataIO::closeData(int16 handle) { - if (freeChunk(handle) != 0) - file_getHandle(handle)->close(); -} - -int16 DataIO::openData(const char *path) { - int16 handle = getChunk(path); - if (handle >= 0) - return handle; - - return file_open(path); -} - -bool DataIO::existData(const char *path) { - if (!path || (path[0] == '\0')) - return false; +byte *DataIO::getFile(const Common::String &name, int32 &size) { + // Try to open the file in the archives + File *file = findFile(name); + if (file) { + byte *data = getFile(*file, size); + if (data) + return data; + } - int16 handle = openData(path); - if (handle < 0) - return false; + // Else, try to open a matching plain file + Common::File f; + if (!f.open(name)) + return 0; - closeData(handle); - return true; -} + size = f.size(); -DataStream *DataIO::openAsStream(int16 handle, bool dispose) { - uint32 curPos = getPos(handle); - seekData(handle, 0, SEEK_END); - uint32 size = getPos(handle); - seekData(handle, curPos, SEEK_SET); + byte *data = new byte[size]; + if (f.read(data, size) != ((uint32) size)) { + delete[] data; + return 0; + } - return new DataStream(*this, handle, size, dispose); + return 0; } -uint32 DataIO::getPos(int16 handle) { - uint32 resPos = getChunkPos(handle); - if (resPos != 0xFFFFFFFF) - return resPos; - - return file_getHandle(handle)->pos(); -} +DataIO::File *DataIO::findFile(const Common::String &name) { + for (int i = _archives.size() - 1; i >= 0; i--) { + Archive *archive = _archives[i]; + if (!archive) + // Empty slot + continue; -void DataIO::seekData(int16 handle, int32 pos, int16 from) { - int32 resPos = seekChunk(handle, pos, from); - if (resPos != -1) - return; + // Look up the file in the file map + FileMap::iterator file = archive->files.find(name); + if (file != archive->files.end()) + return &file->_value; + } - file_getHandle(handle)->seek(pos, from); + return 0; } -int32 DataIO::readData(int16 handle, byte *buf, uint16 size) { - int16 res = readChunk(handle, buf, size); - if (res >= 0) - return res; +Common::SeekableReadStream *DataIO::getFile(File &file) { + if (!file.archive) + return 0; - return file_getHandle(handle)->read(buf, size); -} + if (!file.archive->file.isOpen()) + return 0; -int32 DataIO::getDataSize(const char *name) { - char buf[128]; - int32 chunkSize; - int32 packSize = -1; + if (!file.archive->file.seek(file.offset)) + return 0; - Common::strlcpy(buf, name, 128); + Common::SeekableReadStream *rawData = file.archive->file.readStream(file.size); + if (!rawData) + return 0; - chunkSize = getChunkSize(buf, packSize); - if (chunkSize >= 0) - return chunkSize; + if (!file.packed) + return rawData; - Common::File file; - if (!file.open(buf)) - error("DataIO::getDataSize(): Can't find data \"%s\"", name); + Common::SeekableReadStream *unpackedData = unpack(*rawData); - chunkSize = file.size(); - file.close(); + delete rawData; - return chunkSize; + return unpackedData; } -byte *DataIO::getData(const char *path) { - byte *data = getUnpackedData(path); - if (data) - return data; - - int32 size = getDataSize(path); - - data = new byte[size]; - assert(data); +byte *DataIO::getFile(File &file, int32 &size) { + if (!file.archive) + return 0; - int16 handle = openData(path); + if (!file.archive->file.isOpen()) + return 0; - byte *ptr = data; - while (size > 0x4000) { - readData(handle, ptr, 0x4000); - size -= 0x4000; - ptr += 0x4000; - } - readData(handle, ptr, size); - closeData(handle); - return data; -} + if (!file.archive->file.seek(file.offset)) + return 0; -DataStream *DataIO::getDataStream(const char *path) { - if (!existData(path)) - return 0; + size = file.size; - int16 handle = openData(path); - if (handle < 0) + byte *rawData = new byte[file.size]; + if (file.archive->file.read(rawData, file.size) != file.size) { + delete[] rawData; return 0; + } - if (isDataFileChunk(handle) && isPacked(handle)) { - // It's a packed chunk in the data files, packed, - // so we have to read it in completely and unpack it - - closeData(handle); + if (!file.packed) + return rawData; - uint32 size = getDataSize(path); - byte *data = getData(path); + byte *unpackedData = unpack(rawData, file.size, size); - return new DataStream(data, size); + delete[] rawData; - } else - // Otherwise, we can just return a stream - return openAsStream(handle, true); + return unpackedData; } } // End of namespace Gob diff --git a/engines/gob/dataio.h b/engines/gob/dataio.h index 6a86667e1b..6e12d15af8 100644 --- a/engines/gob/dataio.h +++ b/engines/gob/dataio.h @@ -27,113 +27,82 @@ #define GOB_DATAIO_H #include "common/endian.h" +#include "common/str.h" +#include "common/hashmap.h" +#include "common/array.h" #include "common/file.h" -namespace Gob { - -#define MAX_FILES 30 -#define MAX_DATA_FILES 8 -#define MAX_SLOT_COUNT 8 - -class DataIO; - -class DataStream : public Common::SeekableReadStream { -public: - DataStream(DataIO &io, int16 handle, uint32 dSize, bool dispose = false); - DataStream(byte *buf, uint32 dSize, bool dispose = true); - virtual ~DataStream(); - - virtual int32 pos() const; - virtual int32 size() const; +namespace Common { + class SeekableReadStream; +} - virtual bool seek(int32 offset, int whence = SEEK_SET); - - virtual bool eos() const; - - virtual uint32 read(void *dataPtr, uint32 dataSize); +namespace Gob { -private: - DataIO *_io; - int16 _handle; - uint32 _size; - byte *_data; - bool _dispose; - Common::MemoryReadStream *_stream; +struct ArchiveInfo { + Common::String name; + bool base; + uint32 fileCount; }; class DataIO { public: - struct ChunkDesc { - char chunkName[13]; - uint32 size; - uint32 offset; - byte packed; - ChunkDesc() : size(0), offset(0), packed(0) { chunkName[0] = 0; } - }; - - int32 unpackData(byte *src, byte *dest); + DataIO(); + ~DataIO(); - void openDataFile(const char *src, bool itk = 0); - void closeDataFile(bool itk = 0); + void getArchiveInfo(Common::Array<ArchiveInfo> &info) const; - byte *getUnpackedData(const char *name); + bool openArchive(Common::String name, bool base); + bool closeArchive(bool base); - void closeData(int16 handle); - int16 openData(const char *path); - bool existData(const char *path); + bool hasFile(const Common::String &name); - DataStream *openAsStream(int16 handle, bool dispose = false); + int32 fileSize(const Common::String &name); - int32 getDataSize(const char *name); - byte *getData(const char *path); - DataStream *getDataStream(const char *path); + Common::SeekableReadStream *getFile(const Common::String &name); + byte *getFile(const Common::String &name, int32 &size); - DataIO(class GobEngine *vm); - ~DataIO(); + static byte *unpack(const byte *src, uint32 srcSize, int32 &size); + static Common::SeekableReadStream *unpack(Common::SeekableReadStream &src); -protected: - Common::File _filesHandles[MAX_FILES]; +private: + static const int kMaxArchives = 8; - ChunkDesc *_dataFiles [MAX_DATA_FILES]; - uint16 _numDataChunks [MAX_DATA_FILES]; - int16 _dataFileHandles[MAX_DATA_FILES]; - bool _dataFileItk [MAX_DATA_FILES]; + struct Archive; - ChunkDesc *_chunk [MAX_SLOT_COUNT * MAX_DATA_FILES]; - int32 _chunkPos [MAX_SLOT_COUNT * MAX_DATA_FILES]; - bool _isCurrentSlot[MAX_SLOT_COUNT * MAX_DATA_FILES]; + struct File { + Common::String name; + uint32 size; + uint32 offset; + bool packed; - class GobEngine *_vm; + Archive *archive; - bool isDataFileChunk(int16 handle) const; - bool isPacked (int16 handle) const; + File(); + File(const Common::String &n, uint32 s, uint32 o, bool p, Archive &a); + }; - int getFile (int16 handle) const; - int getSlot (int16 handle) const; - int getIndex(int16 handle) const; + typedef Common::HashMap<Common::String, File, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> FileMap; - int getIndex (int file, int slot) const; - int16 getHandle(int file, int slot) const; + struct Archive { + Common::String name; + Common::File file; - int16 file_open(const char *path); - Common::File *file_getHandle(int16 handle); - const Common::File *file_getHandle(int16 handle) const; + FileMap files; - int16 getChunk(const char *chunkName); - char freeChunk(int16 handle); - int32 readChunk(int16 handle, byte *buf, uint16 size); - int16 seekChunk(int16 handle, int32 pos, int16 from); + bool base; + }; - uint32 getChunkPos(int16 handle) const; + Common::Array<Archive *> _archives; - int32 getChunkSize(const char *chunkName, int32 &packSize); + Archive *openArchive(const Common::String &name); + bool closeArchive(Archive &archive); - uint32 getPos(int16 handle); - void seekData(int16 handle, int32 pos, int16 from); + File *findFile(const Common::String &name); - int32 readData(int16 handle, byte *buf, uint16 size); + Common::SeekableReadStream *getFile(File &file); + byte *getFile(File &file, int32 &size); - friend class DataStream; + static void unpack(Common::SeekableReadStream &src, byte *dest, uint32 size); }; } // End of namespace Gob diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index bb357168b7..ae1bbd4e8e 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -639,10 +639,11 @@ void Draw::wobble(Surface &surfDesc) { } Font *Draw::loadFont(const char *path) const { - if (!_vm->_dataIO->existData(path)) + if (!_vm->_dataIO->hasFile(path)) return 0; - byte *data = _vm->_dataIO->getData(path); + int32 size; + byte *data = _vm->_dataIO->getFile(path, size); return new Font(data); } diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index a1d3b1a61d..4906b8f117 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -370,7 +370,7 @@ bool GobEngine::initGameParts() { _global = new Global(this); _util = new Util(this); - _dataIO = new DataIO(this); + _dataIO = new DataIO(); _palAnim = new PalAnim(this); _vidPlayer = new VideoPlayer(this); _sound = new Sound(this); diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp index 88827e7fcf..402b33d5fd 100644 --- a/engines/gob/goblin.cpp +++ b/engines/gob/goblin.cpp @@ -1816,7 +1816,7 @@ void Goblin::move(int16 destX, int16 destY, int16 objIndex) { byte passType = _vm->_map->getPass(obj->gobDestX, obj->gobDestY); - // Prevent continous walking on wide stairs + // Prevent continuous walking on wide stairs if (passType == 11) { if (_vm->_map->getScreenWidth() == 640) { obj->gobDestY++; diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp index 5c59a5692f..fa209c317f 100644 --- a/engines/gob/init.cpp +++ b/engines/gob/init.cpp @@ -57,7 +57,7 @@ void Init::cleanup() { _vm->_sound->speakerOff(); _vm->_sound->blasterStop(0); - _vm->_dataIO->closeDataFile(); + _vm->_dataIO->closeArchive(true); } void Init::doDemo() { @@ -81,17 +81,12 @@ void Init::doDemo() { } void Init::initGame() { - byte *infBuf; - char *infPtr; - char *infEnd; - char buffer[128]; - initVideo(); updateConfig(); if (!_vm->isDemo()) { - if (_vm->_dataIO->existData(_vm->_startStk.c_str())) - _vm->_dataIO->openDataFile(_vm->_startStk.c_str()); + if (_vm->_dataIO->hasFile(_vm->_startStk)) + _vm->_dataIO->openArchive(_vm->_startStk, true); } _vm->_util->initInput(); @@ -126,37 +121,31 @@ void Init::initGame() { return; } - if (!_vm->_dataIO->existData("intro.inf")) { + Common::SeekableReadStream *infFile = _vm->_dataIO->getFile("intro.inf"); + if (!infFile) { for (int i = 0; i < 4; i++) _vm->_draw->loadFont(i, _fontNames[i]); } else { - infBuf = _vm->_dataIO->getData("intro.inf"); - infPtr = (char *)infBuf; - - infEnd = (char *)(infBuf + _vm->_dataIO->getDataSize("intro.inf")); - - for (int i = 0; i < 8; i++, infPtr++) { - int j; - - for (j = 0; infPtr < infEnd && *infPtr >= ' '; j++, infPtr++) - buffer[j] = *infPtr; - buffer[j] = 0; - strcat(buffer, ".let"); - - _vm->_draw->loadFont(i, buffer); + for (int i = 0; i < 8; i++) { + if (infFile->eos()) + break; - if ((infPtr + 1) >= infEnd) + Common::String font = infFile->readLine(); + if (infFile->eos() && font.empty()) break; - infPtr++; + font += ".let"; + + _vm->_draw->loadFont(i, font.c_str()); } - delete[] infBuf; + + delete infFile; } - if (_vm->_dataIO->existData(_vm->_startTot.c_str())) { + if (_vm->_dataIO->hasFile(_vm->_startTot)) { _vm->_inter->allocateVars(Script::getVariablesCount(_vm->_startTot.c_str(), _vm)); strcpy(_vm->_game->_curTotFile, _vm->_startTot.c_str()); @@ -165,7 +154,7 @@ void Init::initGame() { _vm->_sound->cdLoadLIC("gob.lic"); // Search for a Coktel logo animation or image to display - if (_vm->_dataIO->existData("coktel.imd")) { + if (_vm->_dataIO->hasFile("coktel.imd")) { _vm->_draw->initScreen(); _vm->_draw->_cursorIndex = -1; @@ -179,26 +168,28 @@ void Init::initGame() { } _vm->_draw->closeScreen(); - } else if (_vm->_dataIO->existData("coktel.clt")) { - _vm->_draw->initScreen(); - _vm->_util->clearPalette(); - - DataStream *stream = _vm->_dataIO->getDataStream("coktel.clt"); - stream->read((byte *)_vm->_draw->_vgaPalette, 768); - delete stream; - - if (_vm->_dataIO->existData("coktel.ims")) { - byte *sprBuf; - - sprBuf = _vm->_dataIO->getData("coktel.ims"); - _vm->_video->drawPackedSprite(sprBuf, 320, 200, 0, 0, 0, - *_vm->_draw->_frontSurface); - _vm->_palAnim->fade(_palDesc, 0, 0); - _vm->_util->delay(500); - - delete[] sprBuf; + } else if (_vm->_dataIO->hasFile("coktel.clt")) { + Common::SeekableReadStream *stream = _vm->_dataIO->getFile("coktel.clt"); + if (stream) { + _vm->_draw->initScreen(); + _vm->_util->clearPalette(); + + stream->read((byte *)_vm->_draw->_vgaPalette, 768); + delete stream; + + int32 size; + byte *sprite = _vm->_dataIO->getFile("coktel.ims", size); + if (sprite) { + _vm->_video->drawPackedSprite(sprite, 320, 200, 0, 0, 0, + *_vm->_draw->_frontSurface); + _vm->_palAnim->fade(_palDesc, 0, 0); + _vm->_util->delay(500); + + delete[] sprite; + } + + _vm->_draw->closeScreen(); } - _vm->_draw->closeScreen(); } _vm->_game->start(); @@ -209,7 +200,7 @@ void Init::initGame() { } delete _palDesc; - _vm->_dataIO->closeDataFile(); + _vm->_dataIO->closeArchive(true); _vm->_video->initPrimary(-1); cleanup(); } diff --git a/engines/gob/inter_bargon.cpp b/engines/gob/inter_bargon.cpp index 3afb70d6c0..5ed24c614e 100644 --- a/engines/gob/inter_bargon.cpp +++ b/engines/gob/inter_bargon.cpp @@ -175,10 +175,12 @@ void Inter_Bargon::oBargon_intro3(OpGobParams ¶ms) { static const char *sndFiles[] = {"1INTROIV.snd", "2INTROIV.snd"}; static const char *palFiles[] = {"2ou2.clt", "2ou3.clt", "2ou4.clt", "2ou5.clt"}; + int32 size; + for (int i = 0; i < 2; i++) _vm->_sound->sampleLoad(&samples[i], SOUND_SND, sndFiles[i]); for (int i = 0; i < 4; i++) - palettes[i] = _vm->_dataIO->getData(palFiles[i]); + palettes[i] = _vm->_dataIO->getFile(palFiles[i], size); palBak = _vm->_global->_pPaletteDesc->vgaPal; _vm->_sound->blasterPlayComposition(comp, 0, samples, 2); diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index 050bbce132..05032d712c 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -246,10 +246,10 @@ bool Inter_Playtoons::oPlaytoons_checkData(OpFuncParams ¶ms) { mode = _vm->_saveLoad->getSaveMode(file); if (mode == SaveLoad::kSaveModeNone) { - if (_vm->_dataIO->existData(file)) - size = _vm->_dataIO->getDataSize(file); - else + size = _vm->_dataIO->fileSize(file); + if (size == -1) warning("File \"%s\" not found", file); + } else if (mode == SaveLoad::kSaveModeSave) size = _vm->_saveLoad->getSize(file); else if (mode == SaveLoad::kSaveModeExists) @@ -272,7 +272,6 @@ bool Inter_Playtoons::oPlaytoons_readData(OpFuncParams ¶ms) { int32 size; int32 offset; uint16 dataVar; - int16 handle; byte *buf; SaveLoad::SaveMode mode; @@ -329,13 +328,10 @@ bool Inter_Playtoons::oPlaytoons_readData(OpFuncParams ¶ms) { } WRITE_VAR(1, 1); - handle = _vm->_dataIO->openData(file); - - if (handle < 0) + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(file); + if (!stream) return false; - DataStream *stream = _vm->_dataIO->openAsStream(handle, true); - _vm->_draw->animateCursor(4); if (offset < 0) stream->seek(offset + 1, SEEK_END); @@ -435,9 +431,9 @@ void Inter_Playtoons::oPlaytoons_openItk() { // Workaround for Bambou : In the script, the path is hardcoded (!!) if ((backSlash = strrchr(fileName, '\\'))) { debugC(2, kDebugFileIO, "Opening ITK file \"%s\" instead of \"%s\"", backSlash + 1, fileName); - _vm->_dataIO->openDataFile(backSlash + 1, true); + _vm->_dataIO->openArchive(backSlash + 1, false); } else - _vm->_dataIO->openDataFile(fileName, true); + _vm->_dataIO->openArchive(fileName, false); // All the other checks are meant to verify (if not found at the first try) // if the file is present on the CD or not. As everything is supposed to // be copied, those checks are skipped diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 6dab8161d0..1671e8e11d 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1630,18 +1630,17 @@ bool Inter_v1::o1_getFreeMem(OpFuncParams ¶ms) { } bool Inter_v1::o1_checkData(OpFuncParams ¶ms) { - int16 handle; int16 varOff; _vm->_game->_script->evalExpr(0); varOff = _vm->_game->_script->readVarIndex(); - handle = _vm->_dataIO->openData(_vm->_game->_script->getResultStr()); - WRITE_VAR_OFFSET(varOff, handle); - if (handle >= 0) - _vm->_dataIO->closeData(handle); - else + if (!_vm->_dataIO->hasFile(_vm->_game->_script->getResultStr())) { warning("File \"%s\" not found", _vm->_game->_script->getResultStr()); + WRITE_VAR_OFFSET(varOff, (uint32) -1); + } else + WRITE_VAR_OFFSET(varOff, 50); // "handle" between 50 and 128 = in archive + return false; } @@ -1767,7 +1766,6 @@ bool Inter_v1::o1_readData(OpFuncParams ¶ms) { int16 size; int16 dataVar; int16 offset; - int16 handle; _vm->_game->_script->evalExpr(0); dataVar = _vm->_game->_script->readVarIndex(); @@ -1776,26 +1774,26 @@ bool Inter_v1::o1_readData(OpFuncParams ¶ms) { retSize = 0; WRITE_VAR(1, 1); - handle = _vm->_dataIO->openData(_vm->_game->_script->getResultStr()); - if (handle >= 0) { - DataStream *stream = _vm->_dataIO->openAsStream(handle, true); - _vm->_draw->animateCursor(4); - if (offset < 0) - stream->seek(offset + 1, SEEK_END); - else - stream->seek(offset); + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(_vm->_game->_script->getResultStr()); + if (!stream) + return false; - if (((dataVar >> 2) == 59) && (size == 4)) - WRITE_VAR(59, stream->readUint32LE()); - else - retSize = stream->read((byte *)_variables->getAddressOff8(dataVar), size); + _vm->_draw->animateCursor(4); + if (offset < 0) + stream->seek(offset + 1, SEEK_END); + else + stream->seek(offset); - if (retSize == size) - WRITE_VAR(1, 0); + if (((dataVar >> 2) == 59) && (size == 4)) + WRITE_VAR(59, stream->readUint32LE()); + else + retSize = stream->read((byte *)_variables->getAddressOff8(dataVar), size); - delete stream; - } + if (retSize == size) + WRITE_VAR(1, 0); + + delete stream; return false; } @@ -1824,9 +1822,9 @@ bool Inter_v1::o1_manageDataFile(OpFuncParams ¶ms) { _vm->_game->_script->evalExpr(0); if (_vm->_game->_script->getResultStr()[0] != 0) - _vm->_dataIO->openDataFile(_vm->_game->_script->getResultStr()); + _vm->_dataIO->openArchive(_vm->_game->_script->getResultStr(), true); else - _vm->_dataIO->closeDataFile(); + _vm->_dataIO->closeArchive(true); return false; } diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 2cb430ff9b..d8d36d7a41 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1035,11 +1035,11 @@ void Inter_v2::o2_openItk() { if (!strchr(fileName, '.')) strcat(fileName, ".ITK"); - _vm->_dataIO->openDataFile(fileName, true); + _vm->_dataIO->openArchive(fileName, false); } void Inter_v2::o2_closeItk() { - _vm->_dataIO->closeDataFile(true); + _vm->_dataIO->closeArchive(false); } void Inter_v2::o2_setImdFrontSurf() { @@ -1292,7 +1292,6 @@ bool Inter_v2::o2_getFreeMem(OpFuncParams ¶ms) { } bool Inter_v2::o2_checkData(OpFuncParams ¶ms) { - int16 handle; int16 varOff; int32 size; SaveLoad::SaveMode mode; @@ -1301,7 +1300,6 @@ bool Inter_v2::o2_checkData(OpFuncParams ¶ms) { varOff = _vm->_game->_script->readVarIndex(); size = -1; - handle = 1; char *file = _vm->_game->_script->getResultStr(); @@ -1313,9 +1311,8 @@ bool Inter_v2::o2_checkData(OpFuncParams ¶ms) { mode = _vm->_saveLoad->getSaveMode(file); if (mode == SaveLoad::kSaveModeNone) { - if (_vm->_dataIO->existData(file)) - size = _vm->_dataIO->getDataSize(file); - else + size = _vm->_dataIO->fileSize(file); + if (size == -1) warning("File \"%s\" not found", file); } else if (mode == SaveLoad::kSaveModeSave) @@ -1323,13 +1320,10 @@ bool Inter_v2::o2_checkData(OpFuncParams ¶ms) { else if (mode == SaveLoad::kSaveModeExists) size = 23; - if (size == -1) - handle = -1; - debugC(2, kDebugFileIO, "Requested size of file \"%s\": %d", file, size); - WRITE_VAR_OFFSET(varOff, handle); + WRITE_VAR_OFFSET(varOff, (size == -1) ? -1 : 50); WRITE_VAR(16, (uint32) size); return false; @@ -1340,7 +1334,6 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) { int32 size; int32 offset; int16 dataVar; - int16 handle; byte *buf; SaveLoad::SaveMode mode; @@ -1391,13 +1384,10 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) { } WRITE_VAR(1, 1); - handle = _vm->_dataIO->openData(file); - - if (handle < 0) + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(file); + if (!file) return false; - DataStream *stream = _vm->_dataIO->openAsStream(handle, true); - _vm->_draw->animateCursor(4); if (offset < 0) stream->seek(offset + 1, SEEK_END); @@ -1512,16 +1502,13 @@ void Inter_v2::o2_handleGoblins(OpGobParams ¶ms) { } int16 Inter_v2::loadSound(int16 search) { - byte *dataPtr; int16 id; int16 slot; uint16 slotIdMask; - uint32 dataSize; SoundType type; type = SOUND_SND; slotIdMask = 0; - dataSize = 0; if (!search) { slot = _vm->_game->_script->readValExpr(); @@ -1567,8 +1554,8 @@ int16 Inter_v2::loadSound(int16 search) { else strcat(sndfile, ".SND"); - dataPtr = _vm->_dataIO->getData(sndfile); - dataSize = _vm->_dataIO->getDataSize(sndfile); + int32 dataSize; + byte *dataPtr = _vm->_dataIO->getFile(sndfile, dataSize); if (!dataPtr) return 0; diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index e1eff279b5..b6884c6fbe 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -191,16 +191,16 @@ void Inter_v6::o6_openItk() { if (!strchr(fileName, '.')) strcat(fileName, ".ITK"); - _vm->_dataIO->openDataFile(fileName, true); + _vm->_dataIO->openArchive(fileName, false); // WORKAROUND: The CD number detection in Urban Runner is quite daft // (it checks CD1.ITK - CD4.ITK and the first that's found determines // the CD number), while its NO_CD modus wants everything in CD1.ITK. // So we just open the other ITKs, too. if (_vm->_global->_noCd && !scumm_stricmp(fileName, "CD1.ITK")) { - _vm->_dataIO->openDataFile("CD2.ITK", true); - _vm->_dataIO->openDataFile("CD3.ITK", true); - _vm->_dataIO->openDataFile("CD4.ITK", true); + _vm->_dataIO->openArchive("CD2.ITK", false); + _vm->_dataIO->openArchive("CD3.ITK", false); + _vm->_dataIO->openArchive("CD4.ITK", false); } } @@ -439,7 +439,7 @@ void Inter_v6::probe16bitMusic(char *fileName) { fileName[len - 1] = 'V'; - if (_vm->_dataIO->existData(fileName)) + if (_vm->_dataIO->hasFile(fileName)) return; fileName[len - 1] = '8'; diff --git a/engines/gob/map_v1.cpp b/engines/gob/map_v1.cpp index aa6603fd55..3df1cb8512 100644 --- a/engines/gob/map_v1.cpp +++ b/engines/gob/map_v1.cpp @@ -75,13 +75,13 @@ void Map_v1::loadMapObjects(const char *avjFile) { strcpy(avoName, _sourceFile); strcat(avoName, ".avo"); - if (_vm->_dataIO->existData(avoName)) { - _loadFromAvo = true; - dataBuf = _vm->_dataIO->getData(avoName); - } else { + int32 size; + dataBuf = _vm->_dataIO->getFile(avoName, size); + if (!dataBuf) { + dataBuf = _vm->_dataIO->getFile(avjFile, size); _loadFromAvo = false; - dataBuf = _vm->_dataIO->getData(avjFile); - } + } else + _loadFromAvo = true; Common::MemoryReadStream mapData(dataBuf, 4294967295U); @@ -165,7 +165,7 @@ void Map_v1::loadSounds(Common::SeekableReadStream &data) { _vm->_sound->sampleLoad(&_vm->_goblin->_soundData[14], SOUND_SND, "diamant1.snd"); for (int i = 0; i < count; i++) { - if (!_vm->_dataIO->existData(sndNames[i])) + if (!_vm->_dataIO->hasFile(sndNames[i])) continue; _vm->_sound->sampleLoad(&_vm->_goblin->_soundData[i], SOUND_SND, sndNames[i]); diff --git a/engines/gob/map_v2.cpp b/engines/gob/map_v2.cpp index 15bc709411..f81d3e6002 100644 --- a/engines/gob/map_v2.cpp +++ b/engines/gob/map_v2.cpp @@ -266,7 +266,7 @@ void Map_v2::optimizePoints(Mult::Mult_Object *obj, int16 x, int16 y) { } else { - for (int i = obj->nearestWayPoint; i >= obj->nearestDest; i++) { + for (int i = obj->nearestWayPoint; i >= obj->nearestDest; i--) { if (_wayPoints[i].notWalkable == 1) break; diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp index 8241821039..b5b3d7aaa2 100644 --- a/engines/gob/resources.cpp +++ b/engines/gob/resources.cpp @@ -293,7 +293,7 @@ bool Resources::loadTOTResourceTable() { bool Resources::loadEXTResourceTable() { _extResourceTable = new EXTResourceTable; - DataStream *stream = _vm->_dataIO->getDataStream(_extFile.c_str()); + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(_extFile); if (!stream) return false; @@ -396,7 +396,7 @@ bool Resources::loadIMFile() { imFile += num; - DataStream *stream = _vm->_dataIO->getDataStream(imFile.c_str()); + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(imFile); if (!stream) return true; @@ -431,7 +431,7 @@ bool Resources::loadEXFile() { _exFile = "commun.ex"; _exFile += totProps.exFileNumber + '0'; - if (!_vm->_dataIO->existData(_exFile.c_str())) { + if (!_vm->_dataIO->hasFile(_exFile)) { _exFile.clear(); return true; } @@ -473,7 +473,7 @@ Common::String Resources::getLocTextFile(const Common::String &fileBase, break; } - if (!_vm->_dataIO->existData(locTextFile.c_str())) + if (!_vm->_dataIO->hasFile(locTextFile)) locTextFile.clear(); return locTextFile; @@ -525,8 +525,7 @@ byte *Resources::loadTOTLocTexts(const Common::String &fileBase, int32 &size) { if (locTextFile.empty()) return 0; - size = _vm->_dataIO->getDataSize(locTextFile.c_str()); - return _vm->_dataIO->getData(locTextFile.c_str()); + return _vm->_dataIO->getFile(locTextFile, size); } Resource *Resources::getResource(uint16 id, int16 *width, int16 *height) const { @@ -682,10 +681,10 @@ Resource *Resources::getEXTResource(uint16 id) const { if (extItem.packed) { byte *packedData = data; - size = READ_LE_UINT32(packedData); - data = new byte[size]; + int32 unpackSize; + data = _vm->_dataIO->unpack(packedData, size, unpackSize); - _vm->_dataIO->unpackData(packedData, data); + size = unpackSize; delete[] packedData; } @@ -724,7 +723,7 @@ byte *Resources::getIMData(TOTResourceItem &totItem) const { } byte *Resources::getEXTData(EXTResourceItem &extItem, uint32 size) const { - DataStream *stream = _vm->_dataIO->getDataStream(_extFile.c_str()); + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(_extFile); if (!stream) return 0; @@ -745,7 +744,7 @@ byte *Resources::getEXTData(EXTResourceItem &extItem, uint32 size) const { } byte *Resources::getEXData(EXTResourceItem &extItem, uint32 size) const { - DataStream *stream = _vm->_dataIO->getDataStream(_exFile.c_str()); + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(_exFile); if (!stream) return 0; diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp index 339199c9b1..0b0fcd4cda 100644 --- a/engines/gob/script.cpp +++ b/engines/gob/script.cpp @@ -43,7 +43,7 @@ Script::Script(GobEngine *vm) : _vm(vm) { _totPtr = 0; _totSize = 0; - _lomHandle = -1; + _lom = 0; memset(&_totProperties, 0, sizeof(TOTFile::Properties)); } @@ -380,20 +380,16 @@ bool Script::loadTOT(const Common::String &fileName) { bool Script::loadLOM(const Common::String &fileName) { warning("Stub: Script::loadLOM(%s)", _totFile.c_str()); - _lomHandle = _vm->_dataIO->openData(_totFile.c_str()); - if (_lomHandle < 0) + _lom = _vm->_dataIO->getFile(_totFile); + if (!_lom) return false; - DataStream *stream = _vm->_dataIO->openAsStream(_lomHandle); - - stream->seek(48); - _totSize = stream->readUint32LE(); - stream->seek(0); + _lom->seek(48); + _totSize = _lom->readUint32LE(); + _lom->seek(0); _totData = new byte[_totSize]; - stream->read(_totData, _totSize); - - delete stream; + _lom->read(_totData, _totSize); return false; } @@ -403,8 +399,8 @@ void Script::unload() { } void Script::unloadTOT() { - if (_lomHandle >= 0) - _vm->_dataIO->closeData(_lomHandle); + delete _lom; + _lom = 0; // Unwind the call stack while (!_callStack.empty()) @@ -415,7 +411,6 @@ void Script::unloadTOT() { _totData = 0; _totSize = 0; _totPtr = 0; - _lomHandle = -1; _totFile.clear(); _finished = true; @@ -518,7 +513,7 @@ uint16 Script::getFunctionOffset(uint8 function) const { } uint32 Script::getVariablesCount(const char *fileName, GobEngine *vm) { - DataStream *stream = vm->_dataIO->getDataStream(fileName); + Common::SeekableReadStream *stream = vm->_dataIO->getFile(fileName); if (!stream) return 0; diff --git a/engines/gob/script.h b/engines/gob/script.h index 84daeaf1af..cf9eb246ce 100644 --- a/engines/gob/script.h +++ b/engines/gob/script.h @@ -150,7 +150,7 @@ private: byte *_totPtr; uint32 _totSize; - int16 _lomHandle; + Common::SeekableReadStream *_lom; TOTFile::Properties _totProperties; diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp index 2e1673b12a..cfd26e6bed 100644 --- a/engines/gob/sound/cdrom.cpp +++ b/engines/gob/sound/cdrom.cpp @@ -49,7 +49,7 @@ CDROM::~CDROM() { stop(); } -void CDROM::readLIC(DataStream &stream) { +void CDROM::readLIC(Common::SeekableReadStream &stream) { uint16 version, startChunk, pos; freeLICBuffer(); diff --git a/engines/gob/sound/cdrom.h b/engines/gob/sound/cdrom.h index 6f01e6f90a..894744ca15 100644 --- a/engines/gob/sound/cdrom.h +++ b/engines/gob/sound/cdrom.h @@ -28,14 +28,12 @@ namespace Gob { -class DataStream; - class CDROM { public: CDROM(); ~CDROM(); - void readLIC(DataStream &stream); + void readLIC(Common::SeekableReadStream &stream); void freeLICBuffer(); void startTrack(const char *trackName); diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index bc4495fafd..dc80699ce0 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -114,19 +114,13 @@ bool Sound::sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName, debugC(2, kDebugSound, "Loading sample \"%s\"", fileName); - if (!_vm->_dataIO->existData(fileName)) { + int32 size; + byte *data = _vm->_dataIO->getFile(fileName, size); + if (!data) { warning("Can't open sample file \"%s\"", fileName); return false; } - byte *data; - uint32 size; - - data = (byte *)_vm->_dataIO->getData(fileName); - if (!data) - return false; - - size = _vm->_dataIO->getDataSize(fileName); return sndDesc->load(type, data, size); } @@ -279,13 +273,12 @@ bool Sound::adlibLoadMDY(const char *fileName) { debugC(1, kDebugSound, "AdLib: Loading MDY data (\"%s\")", fileName); - if (!_vm->_dataIO->existData(fileName)) { + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fileName); + if (!stream) { warning("Can't open MDY file \"%s\"", fileName); return false; } - DataStream *stream = _vm->_dataIO->getDataStream(fileName); - bool loaded = _mdyPlayer->loadMDY(*stream); delete stream; @@ -300,15 +293,14 @@ bool Sound::adlibLoadTBR(const char *fileName) { if (!_mdyPlayer) _mdyPlayer = new MDYPlayer(*_vm->_mixer); - if (!_vm->_dataIO->existData(fileName)) { + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fileName); + if (!stream) { warning("Can't open TBR file \"%s\"", fileName); return false; } debugC(1, kDebugSound, "AdLib: Loading MDY instruments (\"%s\")", fileName); - DataStream *stream = _vm->_dataIO->getDataStream(fileName); - bool loaded = _mdyPlayer->loadTBR(*stream); delete stream; @@ -522,13 +514,10 @@ void Sound::cdLoadLIC(const char *fname) { debugC(1, kDebugSound, "CDROM: Loading LIC \"%s\"", fname); - if (!_vm->_dataIO->existData(fname)) + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fname); + if (!stream) return; - _vm->_dataIO->getUnpackedData(fname); - - DataStream *stream = _vm->_dataIO->getDataStream(fname); - _cdrom->readLIC(*stream); delete stream; diff --git a/engines/gob/totfile.cpp b/engines/gob/totfile.cpp index 178deeaf58..82dd0c38c0 100644 --- a/engines/gob/totfile.cpp +++ b/engines/gob/totfile.cpp @@ -45,11 +45,11 @@ TOTFile::~TOTFile() { bool TOTFile::load(const Common::String &fileName) { // Trying to open normally - _stream = _vm->_dataIO->getDataStream(fileName.c_str()); + _stream = _vm->_dataIO->getFile(fileName); if (!_stream) // Trying to open from video - _stream = _vm->_vidPlayer->getEmbeddedFile(fileName.c_str()); + _stream = _vm->_vidPlayer->getEmbeddedFile(fileName); if (!_stream) return false; diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index ee73f14dfa..91e3737832 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -331,9 +331,9 @@ void Video::drawPackedSprite(byte *sprBuf, int16 width, int16 height, } void Video::drawPackedSprite(const char *path, Surface &dest, int width) { - byte *data; + int32 size; + byte *data = _vm->_dataIO->getFile(path, size); - data = _vm->_dataIO->getData(path); drawPackedSprite(data, width, dest.getHeight(), 0, 0, 0, dest); delete[] data; } diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 020c72d0c1..917bdc66c5 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -686,7 +686,7 @@ Common::String VideoPlayer::findFile(const Common::String &file, Properties &pro if ((properties.type == kVideoTypeTry) || (properties.type == ((Type) i))) { fileName = base + "." + _extensions[i]; - if (_vm->_dataIO->existData(fileName.c_str())) { + if (_vm->_dataIO->hasFile(fileName)) { properties.type = (Type) i; break; } @@ -707,7 +707,7 @@ Graphics::CoktelDecoder *VideoPlayer::openVideo(const Common::String &file, Prop if (fileName.empty()) return 0; - Common::SeekableReadStream *stream = _vm->_dataIO->getDataStream(fileName.c_str()); + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fileName); if (!stream) return 0; diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 9fd7fa7d63..4abfff74f2 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -214,7 +214,7 @@ void Script::directGameLoad(int slot) { void Script::step() { // Prepare the base debug string - _debugString = _scriptFile + Common::String::printf("@0x%04X: ", _currentInstruction); + _debugString = _scriptFile + Common::String::format("@0x%04X: ", _currentInstruction); // Get the current opcode byte opcode = readScript8bits(); @@ -222,7 +222,7 @@ void Script::step() { opcode = opcode & 0x7F; // Show the opcode debug string - _debugString += Common::String::printf("op 0x%02X: ", opcode); + _debugString += Common::String::format("op 0x%02X: ", opcode); // Only output if we're not re-doing the previous instruction if (_currentInstruction != _oldInstruction) { diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 2380ab9f30..b368ce9357 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -61,13 +61,17 @@ void Screen::createPal() { g_system->setPalette(_vm->_palette, 0, NUM_COLORS); } +/** +* Create logical palette +*/ void Screen::initDisplay() { debugC(1, kDebugDisplay, "initDisplay"); - // Create logical palette createPal(); } -// Move an image from source to destination +/** +* Move an image from source to destination +*/ void Screen::moveImage(image_pt srcImage, uint16 x1, uint16 y1, uint16 dx, uint16 dy, uint16 width1, image_pt dstImage, uint16 x2, uint16 y2, uint16 width2) { debugC(3, kDebugDisplay, "moveImage(srcImage, %d, %d, %d, %d, %d, dstImage, %d, %d, %d)", x1, y1, dx, dy, width1, x2, y2, width2); @@ -91,15 +95,19 @@ void Screen::displayBackground() { g_system->copyRectToScreen(_frontBuffer, 320, 0, 0, 320, 200); } -// Blit the supplied rectangle from _frontBuffer to the screen +/** +* Blit the supplied rectangle from _frontBuffer to the screen +*/ void Screen::displayRect(int16 x, int16 y, int16 dx, int16 dy) { debugC(3, kDebugDisplay, "displayRect(%d, %d, %d, %d)", x, y, dx, dy); g_system->copyRectToScreen(&_frontBuffer[x + y * 320], 320, x, y, dx, dy); } +/** +* Change a color by remapping supplied palette index with new index +*/ void Screen::remapPal(uint16 oldIndex, uint16 newIndex) { -// Change a color by remapping supplied palette index with new index debugC(1, kDebugDisplay, "Remap_pal(%d, %d)", oldIndex, newIndex); warning("STUB: Remap_pal()"); @@ -121,16 +129,20 @@ void Screen::restorePal(Common::SeekableReadStream *f) { } -// Set the new background color +/** +* Set the new background color +*/ void Screen::setBackgroundColor(long color) { debugC(1, kDebugDisplay, "setBackgroundColor(%ld)", color); // How??? Translate existing pixels in dib before objects rendered? } -// Return the overlay state (Foreground/Background) of the currently -// processed object by looking down the current column for an overlay -// base bit set (in which case the object is foreground). +/** +* Return the overlay state (Foreground/Background) of the currently +* processed object by looking down the current column for an overlay +* base bit set (in which case the object is foreground). +*/ overlayState_t Screen::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { debugC(4, kDebugDisplay, "findOvl"); @@ -144,8 +156,10 @@ overlayState_t Screen::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { return BG; // No bits set, must be background } -// Merge an object frame into _frontBuffer at sx, sy and update rectangle list. -// If fore TRUE, force object above any overlay +/** +* Merge an object frame into _frontBuffer at sx, sy and update rectangle list. +* If fore TRUE, force object above any overlay +*/ void Screen::displayFrame(int sx, int sy, seq_t *seq, bool foreFl) { debugC(3, kDebugDisplay, "displayFrame(%d, %d, seq, %d)", sx, sy, (foreFl) ? 1 : 0); @@ -180,7 +194,9 @@ void Screen::displayFrame(int sx, int sy, seq_t *seq, bool foreFl) { displayList(D_ADD, sx, sy, seq->x2 + 1, seq->lines); } -// Merge rectangles A,B leaving result in B +/** +* Merge rectangles A,B leaving result in B +*/ void Screen::merge(rect_t *rectA, rect_t *rectB) { debugC(6, kDebugDisplay, "merge"); @@ -195,10 +211,12 @@ void Screen::merge(rect_t *rectA, rect_t *rectB) { rectB->dy = MAX(ya, yb) - rectB->y; } -// Coalesce the rectangles in the restore/add list into one unified -// blist. len is the sizes of alist or rlist. blen is current length -// of blist. bmax is the max size of the blist. Note that blist can -// have holes, in which case dx = 0. Returns used length of blist. +/** +* Coalesce the rectangles in the restore/add list into one unified +* blist. len is the sizes of alist or rlist. blen is current length +* of blist. bmax is the max size of the blist. Note that blist can +* have holes, in which case dx = 0. Returns used length of blist. +*/ int16 Screen::mergeLists(rect_t *list, rect_t *blist, int16 len, int16 blen, int16 bmax) { debugC(4, kDebugDisplay, "mergeLists"); @@ -233,8 +251,10 @@ int16 Screen::mergeLists(rect_t *list, rect_t *blist, int16 len, int16 blen, int return blen; } -// Process the display list -// Trailing args are int16 x,y,dx,dy for the D_ADD operation +/** +* Process the display list +* Trailing args are int16 x,y,dx,dy for the D_ADD operation +*/ void Screen::displayList(dupdate_t update, ...) { debugC(6, kDebugDisplay, "displayList"); @@ -253,7 +273,7 @@ void Screen::displayList(dupdate_t update, ...) { break; case D_ADD: // Add a rectangle to list if (addIndex >= DMAX) { - Utils::Warn("%s", "Display list exceeded"); + warning("Display list exceeded"); return; } va_start(marker, update); // Initialize variable arguments @@ -295,13 +315,14 @@ void Screen::displayList(dupdate_t update, ...) { } } +/** +* Write supplied character (font data) at sx,sy in supplied color +* Font data as follows: +* *(fontdata+1) = Font Height (pixels) +* *(fontdata+1) = Font Width (pixels) +* *(fontdata+x) = Font Bitmap (monochrome) +*/ void Screen::writeChr(int sx, int sy, byte color, char *local_fontdata) { -// Write supplied character (font data) at sx,sy in supplied color -// Font data as follows: -// -// *(fontdata+1) = Font Height (pixels) -// *(fontdata+1) = Font Width (pixels) -// *(fontdata+x) = Font Bitmap (monochrome) debugC(2, kDebugDisplay, "writeChr(%d, %d, %d, %d)", sx, sy, color, local_fontdata[0]); byte height = local_fontdata[0]; @@ -320,7 +341,9 @@ void Screen::writeChr(int sx, int sy, byte color, char *local_fontdata) { } } -// Returns height of characters in current font +/** +* Returns height of characters in current font +*/ int16 Screen::fontHeight() { debugC(2, kDebugDisplay, "fontHeight"); @@ -328,8 +351,9 @@ int16 Screen::fontHeight() { return height[_fnt - FIRST_FONT]; } - -// Returns length of supplied string in pixels +/** +* Returns length of supplied string in pixels +*/ int16 Screen::stringLength(const char *s) { debugC(2, kDebugDisplay, "stringLength(%s)", s); @@ -341,15 +365,19 @@ int16 Screen::stringLength(const char *s) { return sum; } -// Return x which would center supplied string +/** +* Return x which would center supplied string +*/ int16 Screen::center(const char *s) { debugC(1, kDebugDisplay, "center(%s)", s); return (int16)((XPIX - stringLength(s)) >> 1); } -// Write string at sx,sy in supplied color in current font -// If sx == CENTER, center it +/** +* Write string at sx,sy in supplied color in current font +* If sx == CENTER, center it +*/ void Screen::writeStr(int16 sx, int16 sy, const char *s, byte color) { debugC(2, kDebugDisplay, "writeStr(%d, %d, %s, %d)", sx, sy, s, color); @@ -363,7 +391,9 @@ void Screen::writeStr(int16 sx, int16 sy, const char *s, byte color) { } } -// Shadowed version of writestr +/** +* Shadowed version of writestr +*/ void Screen::shadowStr(int16 sx, int16 sy, const char *s, byte color) { debugC(1, kDebugDisplay, "shadowStr(%d, %d, %s, %d)", sx, sy, s, color); @@ -374,9 +404,10 @@ void Screen::shadowStr(int16 sx, int16 sy, const char *s, byte color) { writeStr(sx, sy, s, color); } +/** Introduce user to the game +* DOS versions Only +*/ void Screen::userHelp() { -// Introduce user to the game -// DOS versions Only Utils::Box(BOX_ANY , "%s", "F1 - Press F1 again\n" " for instructions\n" @@ -440,7 +471,9 @@ void Screen::drawRectangle(bool filledFl, uint16 x1, uint16 y1, uint16 x2, uint1 } } -// Initialize screen components and display results +/** +* Initialize screen components and display results +*/ void Screen::initNewScreenDisplay() { displayList(D_INIT); setBackgroundColor(_TBLACK); diff --git a/engines/hugo/display_v1d.cpp b/engines/hugo/display_v1d.cpp index a46f5a8bec..df5ea636c6 100644 --- a/engines/hugo/display_v1d.cpp +++ b/engines/hugo/display_v1d.cpp @@ -46,9 +46,11 @@ Screen_v1d::Screen_v1d(HugoEngine *vm) : Screen(vm) { Screen_v1d::~Screen_v1d() { } -// Load font file, construct font ptrs and reverse data bytes -// TODO: This uses hardcoded fonts in hugo.dat, it should be replaced -// by a proper implementation of .FON files +/** +* Load font file, construct font ptrs and reverse data bytes +* TODO: This uses hardcoded fonts in hugo.dat, it should be replaced +* by a proper implementation of .FON files +*/ void Screen_v1d::loadFont(int16 fontId) { debugC(2, kDebugDisplay, "loadFont(%d)", fontId); diff --git a/engines/hugo/display_v1w.cpp b/engines/hugo/display_v1w.cpp index 3dd8328c43..773d592731 100644 --- a/engines/hugo/display_v1w.cpp +++ b/engines/hugo/display_v1w.cpp @@ -47,7 +47,9 @@ Screen_v1w::Screen_v1w(HugoEngine *vm) : Screen(vm) { Screen_v1w::~Screen_v1w() { } -// Load font file, construct font ptrs and reverse data bytes +/** +* Load font file, construct font ptrs and reverse data bytes +*/ void Screen_v1w::loadFont(int16 fontId) { debugC(2, kDebugDisplay, "loadFont(%d)", fontId); diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index ebda0e9035..c3e59b19c9 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -48,9 +48,11 @@ FileManager::FileManager(HugoEngine *vm) : _vm(vm) { FileManager::~FileManager() { } +/** +* Convert 4 planes (RGBI) data to 8-bit DIB format +* Return original plane data ptr +*/ byte *FileManager::convertPCC(byte *p, uint16 y, uint16 bpl, image_pt dataPtr) { -// Convert 4 planes (RGBI) data to 8-bit DIB format -// Return original plane data ptr debugC(2, kDebugFile, "convertPCC(byte *p, %d, %d, image_pt data_p)", y, bpl); dataPtr += y * bpl * 8; // Point to correct DIB line @@ -65,10 +67,12 @@ byte *FileManager::convertPCC(byte *p, uint16 y, uint16 bpl, image_pt dataPtr) { return p; } +/** +* Read a pcx file of length len. Use supplied seq_p and image_p or +* allocate space if NULL. Name used for errors. Returns address of seq_p +* Set first TRUE to initialize b_index (i.e. not reading a sequential image in file). +*/ seq_t *FileManager::readPCX(Common::File &f, seq_t *seqPtr, byte *imagePtr, bool firstFl, const char *name) { -// Read a pcx file of length len. Use supplied seq_p and image_p or -// allocate space if NULL. Name used for errors. Returns address of seq_p -// Set first TRUE to initialize b_index (i.e. not reading a sequential image in file). debugC(1, kDebugFile, "readPCX(..., %s)", name); // Read in the PCC header and check consistency @@ -137,8 +141,10 @@ seq_t *FileManager::readPCX(Common::File &f, seq_t *seqPtr, byte *imagePtr, bool return seqPtr; } +/** +* Read object file of PCC images into object supplied +*/ void FileManager::readImage(int objNum, object_t *objPtr) { -// Read object file of PCC images into object supplied debugC(1, kDebugFile, "readImage(%d, object_t *objPtr)", objNum); if (!objPtr->seqNumb) // This object has no images @@ -227,9 +233,11 @@ void FileManager::readImage(int objNum, object_t *objPtr) { _objectsArchive.close(); } +/** +* Read sound (or music) file data. Call with SILENCE to free-up +* any allocated memory. Also returns size of data +*/ sound_pt FileManager::getSound(int16 sound, uint16 *size) { -// Read sound (or music) file data. Call with SILENCE to free-up -// any allocated memory. Also returns size of data debugC(1, kDebugFile, "getSound(%d, %d)", sound, *size); // No more to do if SILENCE (called for cleanup purposes) @@ -260,7 +268,7 @@ sound_pt FileManager::getSound(int16 sound, uint16 *size) { // Allocate memory for sound or music, if possible sound_pt soundPtr = (byte *)malloc(s_hdr[sound].size); // Ptr to sound data if (soundPtr == 0) { - Utils::Warn("%s", "Low on memory"); + warning("Low on memory"); return 0; } @@ -274,8 +282,10 @@ sound_pt FileManager::getSound(int16 sound, uint16 *size) { return soundPtr; } +/** +* Return whether file exists or not +*/ bool FileManager::fileExists(char *filename) { -// Return whether file exists or not Common::File f; if (f.open(filename)) { f.close(); @@ -284,8 +294,10 @@ bool FileManager::fileExists(char *filename) { return false; } +/** +* Save game to supplied slot (-1 is INITFILE) +*/ void FileManager::saveGame(int16 slot, const char *descrip) { -// Save game to supplied slot (-1 is INITFILE) debugC(1, kDebugFile, "saveGame(%d, %s)", slot, descrip); // Get full path of saved game file - note test for INITFILE @@ -294,7 +306,7 @@ void FileManager::saveGame(int16 slot, const char *descrip) { if (slot == -1) path = _vm->_initFilename; else - path = Common::String::printf(_vm->_saveFilename.c_str(), slot); + path = Common::String::format(_vm->_saveFilename.c_str(), slot); Common::WriteStream *out = _vm->getSaveFileManager()->openForSaving(path); if (!out) { @@ -353,8 +365,10 @@ void FileManager::saveGame(int16 slot, const char *descrip) { delete out; } +/** +* Restore game from supplied slot number (-1 is INITFILE) +*/ void FileManager::restoreGame(int16 slot) { -// Restore game from supplied slot number (-1 is INITFILE) debugC(1, kDebugFile, "restoreGame(%d)", slot); // Initialize new-game status @@ -366,7 +380,7 @@ void FileManager::restoreGame(int16 slot) { if (slot == -1) path = _vm->_initFilename; else - path = Common::String::printf(_vm->_saveFilename.c_str(), slot); + path = Common::String::format(_vm->_saveFilename.c_str(), slot); Common::SeekableReadStream *in = _vm->getSaveFileManager()->openForLoading(path); if (!in) @@ -437,13 +451,15 @@ void FileManager::restoreGame(int16 slot) { delete in; } +/** +* Initialize the size of a saved game (from the fixed initial game). +* If status.initsave is TRUE, or the initial saved game is not found, +* force a save to create one. Normally the game will be shipped with +* the initial game file but useful to force a write during development +* when the size is changeable. +* The net result is a valid INITFILE, with status.savesize initialized. +*/ void FileManager::initSavedGame() { -// Initialize the size of a saved game (from the fixed initial game). -// If status.initsave is TRUE, or the initial saved game is not found, -// force a save to create one. Normally the game will be shipped with -// the initial game file but useful to force a write during development -// when the size is changeable. -// The net result is a valid INITFILE, with status.savesize initialized. debugC(1, kDebugFile, "initSavedGame"); // Force save of initial game @@ -470,26 +486,10 @@ void FileManager::initSavedGame() { Utils::Error(WRITE_ERR, "%s", _vm->_initFilename.c_str()); } -void FileManager::openPlaybackFile(bool playbackFl, bool recordFl) { - debugC(1, kDebugFile, "openPlaybackFile(%d, %d)", (playbackFl) ? 1 : 0, (recordFl) ? 1 : 0); - -/* - if (playbackFl) { - if (!(fpb = fopen(PBFILE, "r+b"))) - Utils::Error(FILE_ERR, "%s", PBFILE); - } else if (recordFl) { - fpb = fopen(PBFILE, "wb"); - } +/** +* Read the encrypted text from the boot file and print it */ - pbdata.time = 0; // Say no key available -} - -void FileManager::closePlaybackFile() { -// fclose(fpb); -} - void FileManager::printBootText() { -// Read the encrypted text from the boot file and print it debugC(1, kDebugFile, "printBootText"); Common::File ofp; @@ -526,9 +526,11 @@ void FileManager::printBootText() { ofp.close(); } +/** +* Reads boot file for program environment. Fatal error if not there or +* file checksum is bad. De-crypts structure while checking checksum +*/ void FileManager::readBootFile() { -// Reads boot file for program environment. Fatal error if not there or -// file checksum is bad. De-crypts structure while checking checksum debugC(1, kDebugFile, "readBootFile"); Common::File ofp; @@ -564,8 +566,10 @@ void FileManager::readBootFile() { Utils::Error(GEN_ERR, "%s", "Program startup file invalid"); } +/** +* Returns address of uif_hdr[id], reading it in if first call +*/ uif_hdr_t *FileManager::getUIFHeader(uif_t id) { -// Returns address of uif_hdr[id], reading it in if first call debugC(1, kDebugFile, "getUIFHeader(%d)", id); static bool firstFl = true; @@ -592,8 +596,10 @@ uif_hdr_t *FileManager::getUIFHeader(uif_t id) { return &UIFHeader[id]; } +/** +* Read uif item into supplied buffer. +*/ void FileManager::readUIFItem(int16 id, byte *buf) { -// Read uif item into supplied buffer. debugC(1, kDebugFile, "readUIFItem(%d, ...)", id); // Open uif file to read data @@ -620,10 +626,11 @@ void FileManager::readUIFItem(int16 id, byte *buf) { ip.close(); } +/** +* Simple instructions given when F1 pressed twice in a row +* Only in DOS versions +*/ void FileManager::instructions() { -// Simple instructions given when F1 pressed twice in a row -// Only in DOS versions - Common::File f; if (!f.open(HELPFILE)) { warning("help.dat not found"); @@ -647,7 +654,9 @@ void FileManager::instructions() { f.close(); } -// Read the uif image file (inventory icons) +/** +* Read the uif image file (inventory icons) +*/ void FileManager::readUIFImages() { debugC(1, kDebugFile, "readUIFImages"); diff --git a/engines/hugo/file.h b/engines/hugo/file.h index 881cf3c4d7..47a5235ca8 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -47,12 +47,6 @@ struct PCC_header_t { // Structure of PCX file hea byte fill2[60]; }; // Header of a PCC file -// Record and playback handling stuff: -struct pbdata_t { -// int key; // Character - uint32 time; // Time at which character was pressed -}; - namespace Hugo { class FileManager { @@ -64,7 +58,6 @@ public: bool fileExists(char *filename); sound_pt getSound(short sound, uint16 *size); - void closePlaybackFile(); void initSavedGame(); void instructions(); void readBootFile(); @@ -95,14 +88,8 @@ private: byte *convertPCC(byte *p, uint16 y, uint16 bpl, image_pt data_p); uif_hdr_t *getUIFHeader(uif_t id); - pbdata_t pbdata; -// FILE *fpb; - //Strangerke : Not used? - void openPlaybackFile(bool playbackFl, bool recordFl); void printBootText(); -// bool pkkey(); -// char pbget(); }; class FileManager_v1d : public FileManager { diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp index 115a691ffc..059f1a25b7 100644 --- a/engines/hugo/file_v1d.cpp +++ b/engines/hugo/file_v1d.cpp @@ -52,8 +52,10 @@ void FileManager_v1d::closeDatabaseFiles() { debugC(1, kDebugFile, "closeDatabaseFiles"); } +/** +* Open and read in an overlay file, close file +*/ void FileManager_v1d::readOverlay(int screenNum, image_pt image, ovl_t overlayType) { -// Open and read in an overlay file, close file debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); const char *ovl_ext[] = {".b", ".o", ".ob"}; @@ -76,8 +78,10 @@ void FileManager_v1d::readOverlay(int screenNum, image_pt image, ovl_t overlayTy _sceneryArchive1.close(); } +/** +* Read a PCX image into dib_a +*/ void FileManager_v1d::readBackground(int screenIndex) { -// Read a PCX image into dib_a debugC(1, kDebugFile, "readBackground(%d)", screenIndex); char *buf = (char *) malloc(2048 + 1); // Buffer for file access diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp index 5218876caf..9e9d380200 100644 --- a/engines/hugo/file_v1w.cpp +++ b/engines/hugo/file_v1w.cpp @@ -43,8 +43,10 @@ FileManager_v1w::FileManager_v1w(HugoEngine *vm) : FileManager_v2d(vm) { FileManager_v1w::~FileManager_v1w() { } +/** +* Open and read in an overlay file, close file +*/ void FileManager_v1w::readOverlay(int screenNum, image_pt image, ovl_t overlayType) { -// Open and read in an overlay file, close file debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); image_pt tmpImage = image; // temp ptr to overlay file diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp index c4b17b3e65..a6f2ec6bb0 100644 --- a/engines/hugo/file_v2d.cpp +++ b/engines/hugo/file_v2d.cpp @@ -46,6 +46,9 @@ FileManager_v2d::FileManager_v2d(HugoEngine *vm) : FileManager(vm) { FileManager_v2d::~FileManager_v2d() { } +/** +* Open "database" file (packed files) +*/ void FileManager_v2d::openDatabaseFiles() { debugC(1, kDebugFile, "openDatabaseFiles"); @@ -57,6 +60,9 @@ void FileManager_v2d::openDatabaseFiles() { Utils::Error(FILE_ERR, "%s", OBJECTS_FILE); } +/** +* Close "Database" files +*/ void FileManager_v2d::closeDatabaseFiles() { debugC(1, kDebugFile, "closeDatabaseFiles"); @@ -65,8 +71,10 @@ void FileManager_v2d::closeDatabaseFiles() { _objectsArchive.close(); } +/** +* Read a PCX image into dib_a +*/ void FileManager_v2d::readBackground(int screenIndex) { -// Read a PCX image into dib_a debugC(1, kDebugFile, "readBackground(%d)", screenIndex); _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); @@ -88,8 +96,10 @@ void FileManager_v2d::readBackground(int screenIndex) { readPCX(_sceneryArchive1, &dummySeq, _vm->_screen->getFrontBuffer(), true, _vm->_screenNames[screenIndex]); } +/** +* Open and read in an overlay file, close file +*/ void FileManager_v2d::readOverlay(int screenNum, image_pt image, ovl_t overlayType) { -// Open and read in an overlay file, close file debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); image_pt tmpImage = image; // temp ptr to overlay file @@ -147,8 +157,10 @@ void FileManager_v2d::readOverlay(int screenNum, image_pt image, ovl_t overlayTy } while (k < OVL_SIZE); } +/** +* Fetch string from file, decode and return ptr to string in memory +*/ char *FileManager_v2d::fetchString(int index) { -// Fetch string from file, decode and return ptr to string in memory debugC(1, kDebugFile, "fetchString(%d)", index); // Get offset to string[index] (and next for length calculation) diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp index f1e4bf0a15..e7af41b93f 100644 --- a/engines/hugo/file_v3d.cpp +++ b/engines/hugo/file_v3d.cpp @@ -45,8 +45,10 @@ FileManager_v3d::FileManager_v3d(HugoEngine *vm) : FileManager_v2d(vm) { FileManager_v3d::~FileManager_v3d() { } +/** +* Read a PCX image into dib_a +*/ void FileManager_v3d::readBackground(int screenIndex) { -// Read a PCX image into dib_a debugC(1, kDebugFile, "readBackground(%d)", screenIndex); _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); @@ -73,6 +75,9 @@ void FileManager_v3d::readBackground(int screenIndex) { } } +/** +* Open "database" file (packed files) +*/ void FileManager_v3d::openDatabaseFiles() { debugC(1, kDebugFile, "openDatabaseFiles"); @@ -86,6 +91,9 @@ void FileManager_v3d::openDatabaseFiles() { Utils::Error(FILE_ERR, "%s", OBJECTS_FILE); } +/** +* Close "Database" files +*/ void FileManager_v3d::closeDatabaseFiles() { debugC(1, kDebugFile, "closeDatabaseFiles"); @@ -95,8 +103,10 @@ void FileManager_v3d::closeDatabaseFiles() { _objectsArchive.close(); } +/** +* Open and read in an overlay file, close file +*/ void FileManager_v3d::readOverlay(int screenNum, image_pt image, ovl_t overlayType) { -// Open and read in an overlay file, close file debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); image_pt tmpImage = image; // temp ptr to overlay file diff --git a/engines/hugo/game.h b/engines/hugo/game.h index 869aa1baa4..05d752e0fa 100644 --- a/engines/hugo/game.h +++ b/engines/hugo/game.h @@ -123,28 +123,42 @@ enum TEXTCOLORS { enum uif_t {U_FONT5, U_FONT6, U_FONT8, UIF_IMAGES, NUM_UIF_ITEMS}; -// Enumerate overlay file types +/** +* Enumerate overlay file types +*/ enum ovl_t {BOUNDARY, OVERLAY, OVLBASE}; -// Enumerate error types +/** +* Enumerate error types +*/ enum { GEN_ERR, FILE_ERR, WRITE_ERR, PCCH_ERR, HEAP_ERR, EVNT_ERR, SOUND_ERR //MOUSE_ERR, VID_ERR, FONT_ERR, ARG_ERR, CHK_ERR, TIMER_ERR, VBX_ERR }; -// Enumerate ways of cycling a sequence of frames +/** +* Enumerate ways of cycling a sequence of frames +*/ enum cycle_t {INVISIBLE, ALMOST_INVISIBLE, NOT_CYCLING, CYCLE_FORWARD, CYCLE_BACKWARD}; -// Enumerate sequence index matching direction of travel +/** +* Enumerate sequence index matching direction of travel +*/ enum {RIGHT, LEFT, DOWN, _UP}; -// Channel requirement during sound effect +/** +* Channel requirement during sound effect +*/ enum stereo_t {BOTH_CHANNELS, RIGHT_CHANNEL, LEFT_CHANNEL}; -// Priority for sound effect +/** +* Priority for sound effect +*/ enum priority_t {LOW_PRI, MED_PRI, HIGH_PRI}; -// Enumerate the different path types for an object +/** +* Enumerate the different path types for an object +*/ enum path_t { USER, // User has control of object via cursor keys AUTO, // Computer has control, controlled by action lists @@ -155,42 +169,62 @@ enum path_t { WANDER2 // Same as WANDER, except keeps cycling when stationary }; -// Enumerate whether object is foreground, background or 'floating' -// If floating, HERO can collide with it and fore/back ground is determined -// by relative y-coord of object base. This is the general case. -// If fore or background, no collisions can take place and object is either -// behind or in front of all others, although can still be hidden by the -// the overlay plane. OVEROVL means the object is FLOATING (to other -// objects) but is never hidden by the overlay plane +/** +* Enumerate whether object is foreground, background or 'floating' +* If floating, HERO can collide with it and fore/back ground is determined +* by relative y-coord of object base. This is the general case. +* If fore or background, no collisions can take place and object is either +* behind or in front of all others, although can still be hidden by the +* the overlay plane. OVEROVL means the object is FLOATING (to other +* objects) but is never hidden by the overlay plane +*/ enum {FOREGROUND, BACKGROUND, FLOATING, OVEROVL}; -// Game view state machine +/** +* Game view state machine +*/ enum vstate_t {V_IDLE, V_INTROINIT, V_INTRO, V_PLAY, V_INVENT, V_EXIT}; enum font_t {LARGE_ROMAN, MED_ROMAN, NUM_GDI_FONTS, INIT_FONTS, DEL_FONTS}; -// Ways to dismiss a text/prompt box +/** +* Ways to dismiss a text/prompt box +*/ enum box_t {BOX_ANY, BOX_OK, BOX_PROMPT, BOX_YESNO}; -// Standard viewport sizes +/** +* Standard viewport sizes +*/ enum wsize_t {SIZE_DEF, SIZE_1, SIZE_2, SIZE_3}; -// Display list functions +/** +* Display list functions +*/ enum dupdate_t {D_INIT, D_ADD, D_DISPLAY, D_RESTORE}; -// General device installation commands +/** +* General device installation commands +*/ enum inst_t {INSTALL, RESTORE, RESET}; -// Inventory icon bar states +/** +* Inventory icon bar states +*/ enum istate_t {I_OFF, I_UP, I_DOWN, I_ACTIVE}; -// Actions for Process_inventory() +/** +* Actions for Process_inventory() +*/ enum invact_t {INV_INIT, INV_LEFT, INV_RIGHT, INV_GET}; -// Purpose of an automatic route +/** +* Purpose of an automatic route +*/ enum go_t {GO_SPACE, GO_EXIT, GO_LOOK, GO_GET}; -// Following defines the action types and action list +/** +* Following defines the action types and action list +*/ enum action_t { // Parameters: ANULL = 0xff, // Special NOP used to 'delete' events in DEL_EVENTS ASCHEDULE = 0, // 0 - Ptr to action list to be rescheduled @@ -259,17 +293,23 @@ struct uif_hdr_t { // UIF font/image look up uint32 offset; // Offset of item in file }; -// Game specific type definitions +/** +* Game specific type definitions +*/ typedef byte *image_pt; // ptr to an object image (sprite) typedef byte *sound_pt; // ptr to sound (or music) data -// Following are points for achieving certain actions. +/** +* Following are points for achieving certain actions. +*/ struct point_t { byte score; // The value of the point bool scoredFl; // Whether scored yet }; -// Structure for initializing maze processing +/** +* Structure for initializing maze processing +*/ struct maze_t { bool enabledFl; // TRUE when maze processing enabled byte size; // Size of (square) maze matrix @@ -684,7 +724,9 @@ union act { act49 a49; }; -// The following determines how a verb is acted on, for an object +/** +* The following determines how a verb is acted on, for an object +*/ struct cmd { uint16 verbIndex; // the verb uint16 reqIndex; // ptr to list of required objects @@ -696,8 +738,10 @@ struct cmd { uint16 actIndex; // Ptr to action list if verb done }; -// The following is a linked list of images in an animation sequence -// The image data is in 8-bit DIB format, i.e. 1 byte = 1 pixel +/** +* The following is a linked list of images in an animation sequence +* The image data is in 8-bit DIB format, i.e. 1 byte = 1 pixel +*/ struct seq_t { // Linked list of images byte *imagePtr; // ptr to image uint16 bytesPerLine8; // bytes per line (8bits) @@ -706,13 +750,17 @@ struct seq_t { // Linked list of images seq_t *nextSeqPtr; // ptr to next record }; -// The following is an array of structures of above sequences +/** +* The following is an array of structures of above sequences +*/ struct seqList_t { uint16 imageNbr; // Number of images in sequence seq_t *seqPtr; // Ptr to sequence structure }; -// Following is definition of object attributes +/** +* Following is definition of object attributes +*/ struct object_t { uint16 nounIndex; // String identifying object uint16 dataIndex; // String describing the object @@ -747,10 +795,12 @@ struct object_t { int8 oldvy; // Previous vy }; -// Following is structure of verbs and nouns for 'background' objects -// These are objects that appear in the various screens, but nothing -// interesting ever happens with them. Rather than just be dumb and say -// "don't understand" we produce an interesting msg to keep user sane. +/** +* Following is structure of verbs and nouns for 'background' objects +* These are objects that appear in the various screens, but nothing +* interesting ever happens with them. Rather than just be dumb and say +* "don't understand" we produce an interesting msg to keep user sane. +*/ struct background_t { uint16 verbIndex; uint16 nounIndex; @@ -769,7 +819,9 @@ typedef byte icondib_t[XPIX *INV_DY]; // Icon bar dib typedef char command_t[MAX_CHARS + 8]; // Command line (+spare for prompt,cursor) typedef char fpath_t[MAX_FPATH]; // File path -// Structure to define an EXIT or other collision-activated hotspot +/** +* Structure to define an EXIT or other collision-activated hotspot +*/ struct hotspot_t { int screenIndex; // Screen in which hotspot appears int x1, y1, x2, y2; // Bounding box of hotspot @@ -842,7 +894,9 @@ extern hugo_boot_t _boot; // Boot info structure extern char _textBoxBuffer[]; // Useful box text buffer extern command_t _line; // Line of user text input -// Structure of scenery file lookup entry +/** +* Structure of scenery file lookup entry +*/ struct sceneBlock_t { uint32 scene_off; uint32 scene_len; @@ -854,7 +908,9 @@ struct sceneBlock_t { uint32 ob_len; }; -// Structure of object file lookup entry +/** +* Structure of object file lookup entry +*/ struct objBlock_t { uint32 objOffset; uint32 objLength; diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 2a4dd61487..daa4df66bc 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -62,11 +62,11 @@ char _textBoxBuffer[MAX_BOX]; // Buffer for text box command_t _line; // Line of user text input HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(syst), _gameDescription(gd), _mouseX(0), _mouseY(0), - _textData(0), _stringtData(0), _screenNames(0), _textEngine(0), _textIntro(0), _textMouse(0), _textParser(0), _textSchedule(0), _textUtil(0), - _arrayNouns(0), _arrayVerbs(0), _arrayReqs(0), _hotspots(0), _invent(0), _uses(0), _catchallList(0), _backgroundObjects(0), - _points(0), _cmdList(0), _screenActs(0), _actListArr(0), _heroImage(0), _defltTunes(0), _palette(0), _introX(0), _introY(0), - _maxInvent(0), _numBonuses(0), _numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0), _screenStates(0), _numObj(0), - _score(0), _maxscore(0), _backgroundObjectsSize(0), _screenActsSize(0), _actListArrSize(0), _usesSize(0) + _textData(0), _stringtData(0), _screenNames(0), _textEngine(0), _textIntro(0), _textMouse(0), _textParser(0), _textSchedule(0), + _textUtil(0), _arrayNouns(0), _arrayVerbs(0), _arrayReqs(0), _hotspots(0), _invent(0), _uses(0), _catchallList(0), + _backgroundObjects(0), _points(0), _cmdList(0), _screenActs(0), _heroImage(0), _defltTunes(0), _palette(0), _introX(0), + _introY(0), _maxInvent(0), _numBonuses(0), _numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0), _screenStates(0), + _numObj(0), _score(0), _maxscore(0), _backgroundObjectsSize(0), _screenActsSize(0), _usesSize(0) { DebugMan.addDebugChannel(kDebugSchedule, "Schedule", "Script Schedule debug level"); @@ -130,10 +130,7 @@ HugoEngine::~HugoEngine() { free(_screenActs); _object->freeObjectArr(); - - for (int i = 0; i < _actListArrSize; i++) - free(_actListArr[i]); - free(_actListArr); + _scheduler->freeActListArr(); free(_defltTunes); free(_screenStates); @@ -287,6 +284,7 @@ Common::Error HugoEngine::run() { break; } } + _status.doQuitFl = shouldQuit(); // update game quit flag } return Common::kNoError; } @@ -301,8 +299,10 @@ void HugoEngine::initMachine() { _file->readUIFImages(); // Read all uif images (only in Win versions) } +/** +* Hugo game state machine - called during onIdle +*/ void HugoEngine::runMachine() { -// Hugo game state machine - called during onIdle static uint32 lastTime; status_t &gameStatus = getGameStatus(); @@ -355,6 +355,9 @@ void HugoEngine::runMachine() { } } +/** +* Loads Hugo.dat file, which contains all the hardcoded data in the original executables +*/ bool HugoEngine::loadHugoDat() { Common::File in; in.open("hugo.dat"); @@ -484,7 +487,7 @@ bool HugoEngine::loadHugoDat() { } } - int numElem, numSubElem, numSubAct; + int numElem, numSubElem; //Read _invent for (int varnt = 0; varnt < _numVariant; varnt++) { numElem = in.readUint16BE(); @@ -639,8 +642,8 @@ bool HugoEngine::loadHugoDat() { } } -// TODO: For Hugo2 and Hugo3, if not in story mode, increment _screenActs[0][0] (ex: kALcrashStory + 1 == kALcrashNoStory) // Read _screenActs + // TODO: For Hugo2 and Hugo3, if not in story mode, increment _screenActs[0][0] (ex: kALcrashStory + 1 == kALcrashNoStory) for (int varnt = 0; varnt < _numVariant; varnt++) { numElem = in.readUint16BE(); if (varnt == _gameVariant) { @@ -666,584 +669,22 @@ bool HugoEngine::loadHugoDat() { } _object->loadObjectArr(in); -//#define HERO 0 - _hero = &_object->_objects[HERO]; // This always points to hero - _screen_p = &(_object->_objects[HERO].screenIndex); // Current screen is hero's + + _hero = &_object->_objects[HERO]; // This always points to hero + _screen_p = &(_object->_objects[HERO].screenIndex); // Current screen is hero's _heroImage = HERO; // Current in use hero image -//read _actListArr - for (int varnt = 0; varnt < _numVariant; varnt++) { - numElem = in.readUint16BE(); - if (varnt == _gameVariant) { - _actListArrSize = numElem; - _actListArr = (act **)malloc(sizeof(act *) * _actListArrSize); - for (int i = 0; i < _actListArrSize; i++) { - numSubElem = in.readUint16BE(); - _actListArr[i] = (act *) malloc(sizeof(act) * (numSubElem + 1)); - for (int j = 0; j < numSubElem; j++) { - _actListArr[i][j].a0.actType = (action_t) in.readByte(); - switch (_actListArr[i][j].a0.actType) { - case ANULL: // -1 - break; - case ASCHEDULE: // 0 - _actListArr[i][j].a0.timer = in.readSint16BE(); - _actListArr[i][j].a0.actIndex = in.readUint16BE(); - break; - case START_OBJ: // 1 - _actListArr[i][j].a1.timer = in.readSint16BE(); - _actListArr[i][j].a1.objNumb = in.readSint16BE(); - _actListArr[i][j].a1.cycleNumb = in.readSint16BE(); - _actListArr[i][j].a1.cycle = (cycle_t) in.readByte(); - break; - case INIT_OBJXY: // 2 - _actListArr[i][j].a2.timer = in.readSint16BE(); - _actListArr[i][j].a2.objNumb = in.readSint16BE(); - _actListArr[i][j].a2.x = in.readSint16BE(); - _actListArr[i][j].a2.y = in.readSint16BE(); - break; - case PROMPT: // 3 - _actListArr[i][j].a3.timer = in.readSint16BE(); - _actListArr[i][j].a3.promptIndex = in.readSint16BE(); - numSubAct = in.readUint16BE(); - _actListArr[i][j].a3.responsePtr = (int *) malloc(sizeof(int) * numSubAct); - for (int k = 0; k < numSubAct; k++) - _actListArr[i][j].a3.responsePtr[k] = in.readSint16BE(); - _actListArr[i][j].a3.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a3.actFailIndex = in.readUint16BE(); - _actListArr[i][j].a3.encodedFl = (in.readByte() == 1) ? true : false; - break; - case BKGD_COLOR: // 4 - _actListArr[i][j].a4.timer = in.readSint16BE(); - _actListArr[i][j].a4.newBackgroundColor = in.readUint32BE(); - break; - case INIT_OBJVXY: // 5 - _actListArr[i][j].a5.timer = in.readSint16BE(); - _actListArr[i][j].a5.objNumb = in.readSint16BE(); - _actListArr[i][j].a5.vx = in.readSint16BE(); - _actListArr[i][j].a5.vy = in.readSint16BE(); - break; - case INIT_CARRY: // 6 - _actListArr[i][j].a6.timer = in.readSint16BE(); - _actListArr[i][j].a6.objNumb = in.readSint16BE(); - _actListArr[i][j].a6.carriedFl = (in.readByte() == 1) ? true : false; - break; - case INIT_HF_COORD: // 7 - _actListArr[i][j].a7.timer = in.readSint16BE(); - _actListArr[i][j].a7.objNumb = in.readSint16BE(); - break; - case NEW_SCREEN: // 8 - _actListArr[i][j].a8.timer = in.readSint16BE(); - _actListArr[i][j].a8.screenIndex = in.readSint16BE(); - break; - case INIT_OBJSTATE: // 9 - _actListArr[i][j].a9.timer = in.readSint16BE(); - _actListArr[i][j].a9.objNumb = in.readSint16BE(); - _actListArr[i][j].a9.newState = in.readByte(); - break; - case INIT_PATH: // 10 - _actListArr[i][j].a10.timer = in.readSint16BE(); - _actListArr[i][j].a10.objNumb = in.readSint16BE(); - _actListArr[i][j].a10.newPathType = in.readSint16BE(); - _actListArr[i][j].a10.vxPath = in.readByte(); - _actListArr[i][j].a10.vyPath = in.readByte(); - break; - case COND_R: // 11 - _actListArr[i][j].a11.timer = in.readSint16BE(); - _actListArr[i][j].a11.objNumb = in.readSint16BE(); - _actListArr[i][j].a11.stateReq = in.readByte(); - _actListArr[i][j].a11.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a11.actFailIndex = in.readUint16BE(); - break; - case TEXT: // 12 - _actListArr[i][j].a12.timer = in.readSint16BE(); - _actListArr[i][j].a12.stringIndex = in.readSint16BE(); - break; - case SWAP_IMAGES: // 13 - _actListArr[i][j].a13.timer = in.readSint16BE(); - _actListArr[i][j].a13.obj1 = in.readSint16BE(); - _actListArr[i][j].a13.obj2 = in.readSint16BE(); - break; - case COND_SCR: // 14 - _actListArr[i][j].a14.timer = in.readSint16BE(); - _actListArr[i][j].a14.objNumb = in.readSint16BE(); - _actListArr[i][j].a14.screenReq = in.readSint16BE(); - _actListArr[i][j].a14.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a14.actFailIndex = in.readUint16BE(); - break; - case AUTOPILOT: // 15 - _actListArr[i][j].a15.timer = in.readSint16BE(); - _actListArr[i][j].a15.obj1 = in.readSint16BE(); - _actListArr[i][j].a15.obj2 = in.readSint16BE(); - _actListArr[i][j].a15.dx = in.readByte(); - _actListArr[i][j].a15.dy = in.readByte(); - break; - case INIT_OBJ_SEQ: // 16 - _actListArr[i][j].a16.timer = in.readSint16BE(); - _actListArr[i][j].a16.objNumb = in.readSint16BE(); - _actListArr[i][j].a16.seqIndex = in.readSint16BE(); - break; - case SET_STATE_BITS: // 17 - _actListArr[i][j].a17.timer = in.readSint16BE(); - _actListArr[i][j].a17.objNumb = in.readSint16BE(); - _actListArr[i][j].a17.stateMask = in.readSint16BE(); - break; - case CLEAR_STATE_BITS: // 18 - _actListArr[i][j].a18.timer = in.readSint16BE(); - _actListArr[i][j].a18.objNumb = in.readSint16BE(); - _actListArr[i][j].a18.stateMask = in.readSint16BE(); - break; - case TEST_STATE_BITS: // 19 - _actListArr[i][j].a19.timer = in.readSint16BE(); - _actListArr[i][j].a19.objNumb = in.readSint16BE(); - _actListArr[i][j].a19.stateMask = in.readSint16BE(); - _actListArr[i][j].a19.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a19.actFailIndex = in.readUint16BE(); - break; - case DEL_EVENTS: // 20 - _actListArr[i][j].a20.timer = in.readSint16BE(); - _actListArr[i][j].a20.actTypeDel = (action_t) in.readByte(); - break; - case GAMEOVER: // 21 - _actListArr[i][j].a21.timer = in.readSint16BE(); - break; - case INIT_HH_COORD: // 22 - _actListArr[i][j].a22.timer = in.readSint16BE(); - _actListArr[i][j].a22.objNumb = in.readSint16BE(); - break; - case EXIT: // 23 - _actListArr[i][j].a23.timer = in.readSint16BE(); - break; - case BONUS: // 24 - _actListArr[i][j].a24.timer = in.readSint16BE(); - _actListArr[i][j].a24.pointIndex = in.readSint16BE(); - break; - case COND_BOX: // 25 - _actListArr[i][j].a25.timer = in.readSint16BE(); - _actListArr[i][j].a25.objNumb = in.readSint16BE(); - _actListArr[i][j].a25.x1 = in.readSint16BE(); - _actListArr[i][j].a25.y1 = in.readSint16BE(); - _actListArr[i][j].a25.x2 = in.readSint16BE(); - _actListArr[i][j].a25.y2 = in.readSint16BE(); - _actListArr[i][j].a25.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a25.actFailIndex = in.readUint16BE(); - break; - case SOUND: // 26 - _actListArr[i][j].a26.timer = in.readSint16BE(); - _actListArr[i][j].a26.soundIndex = in.readSint16BE(); - break; - case ADD_SCORE: // 27 - _actListArr[i][j].a27.timer = in.readSint16BE(); - _actListArr[i][j].a27.objNumb = in.readSint16BE(); - break; - case SUB_SCORE: // 28 - _actListArr[i][j].a28.timer = in.readSint16BE(); - _actListArr[i][j].a28.objNumb = in.readSint16BE(); - break; - case COND_CARRY: // 29 - _actListArr[i][j].a29.timer = in.readSint16BE(); - _actListArr[i][j].a29.objNumb = in.readSint16BE(); - _actListArr[i][j].a29.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a29.actFailIndex = in.readUint16BE(); - break; - case INIT_MAZE: // 30 - _actListArr[i][j].a30.timer = in.readSint16BE(); - _actListArr[i][j].a30.mazeSize = in.readByte(); - _actListArr[i][j].a30.x1 = in.readSint16BE(); - _actListArr[i][j].a30.y1 = in.readSint16BE(); - _actListArr[i][j].a30.x2 = in.readSint16BE(); - _actListArr[i][j].a30.y2 = in.readSint16BE(); - _actListArr[i][j].a30.x3 = in.readSint16BE(); - _actListArr[i][j].a30.x4 = in.readSint16BE(); - _actListArr[i][j].a30.firstScreenIndex = in.readByte(); - break; - case EXIT_MAZE: // 31 - _actListArr[i][j].a31.timer = in.readSint16BE(); - break; - case INIT_PRIORITY: // 32 - _actListArr[i][j].a32.timer = in.readSint16BE(); - _actListArr[i][j].a32.objNumb = in.readSint16BE(); - _actListArr[i][j].a32.priority = in.readByte(); - break; - case INIT_SCREEN: // 33 - _actListArr[i][j].a33.timer = in.readSint16BE(); - _actListArr[i][j].a33.objNumb = in.readSint16BE(); - _actListArr[i][j].a33.screenIndex = in.readSint16BE(); - break; - case AGSCHEDULE: // 34 - _actListArr[i][j].a34.timer = in.readSint16BE(); - _actListArr[i][j].a34.actIndex = in.readUint16BE(); - break; - case REMAPPAL: // 35 - _actListArr[i][j].a35.timer = in.readSint16BE(); - _actListArr[i][j].a35.oldColorIndex = in.readSint16BE(); - _actListArr[i][j].a35.newColorIndex = in.readSint16BE(); - break; - case COND_NOUN: // 36 - _actListArr[i][j].a36.timer = in.readSint16BE(); - _actListArr[i][j].a36.nounIndex = in.readUint16BE(); - _actListArr[i][j].a36.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a36.actFailIndex = in.readUint16BE(); - break; - case SCREEN_STATE: // 37 - _actListArr[i][j].a37.timer = in.readSint16BE(); - _actListArr[i][j].a37.screenIndex = in.readSint16BE(); - _actListArr[i][j].a37.newState = in.readByte(); - break; - case INIT_LIPS: // 38 - _actListArr[i][j].a38.timer = in.readSint16BE(); - _actListArr[i][j].a38.lipsObjNumb = in.readSint16BE(); - _actListArr[i][j].a38.objNumb = in.readSint16BE(); - _actListArr[i][j].a38.dxLips = in.readByte(); - _actListArr[i][j].a38.dyLips = in.readByte(); - break; - case INIT_STORY_MODE: // 39 - _actListArr[i][j].a39.timer = in.readSint16BE(); - _actListArr[i][j].a39.storyModeFl = (in.readByte() == 1); - break; - case WARN: // 40 - _actListArr[i][j].a40.timer = in.readSint16BE(); - _actListArr[i][j].a40.stringIndex = in.readSint16BE(); - break; - case COND_BONUS: // 41 - _actListArr[i][j].a41.timer = in.readSint16BE(); - _actListArr[i][j].a41.BonusIndex = in.readSint16BE(); - _actListArr[i][j].a41.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a41.actFailIndex = in.readUint16BE(); - break; - case TEXT_TAKE: // 42 - _actListArr[i][j].a42.timer = in.readSint16BE(); - _actListArr[i][j].a42.objNumb = in.readSint16BE(); - break; - case YESNO: // 43 - _actListArr[i][j].a43.timer = in.readSint16BE(); - _actListArr[i][j].a43.promptIndex = in.readSint16BE(); - _actListArr[i][j].a43.actYesIndex = in.readUint16BE(); - _actListArr[i][j].a43.actNoIndex = in.readUint16BE(); - break; - case STOP_ROUTE: // 44 - _actListArr[i][j].a44.timer = in.readSint16BE(); - break; - case COND_ROUTE: // 45 - _actListArr[i][j].a45.timer = in.readSint16BE(); - _actListArr[i][j].a45.routeIndex = in.readSint16BE(); - _actListArr[i][j].a45.actPassIndex = in.readUint16BE(); - _actListArr[i][j].a45.actFailIndex = in.readUint16BE(); - break; - case INIT_JUMPEXIT: // 46 - _actListArr[i][j].a46.timer = in.readSint16BE(); - _actListArr[i][j].a46.jumpExitFl = (in.readByte() == 1); - break; - case INIT_VIEW: // 47 - _actListArr[i][j].a47.timer = in.readSint16BE(); - _actListArr[i][j].a47.objNumb = in.readSint16BE(); - _actListArr[i][j].a47.viewx = in.readSint16BE(); - _actListArr[i][j].a47.viewy = in.readSint16BE(); - _actListArr[i][j].a47.direction = in.readSint16BE(); - break; - case INIT_OBJ_FRAME: // 48 - _actListArr[i][j].a48.timer = in.readSint16BE(); - _actListArr[i][j].a48.objNumb = in.readSint16BE(); - _actListArr[i][j].a48.seqIndex = in.readSint16BE(); - _actListArr[i][j].a48.frameIndex = in.readSint16BE(); - break; - case OLD_SONG: //49 - _actListArr[i][j].a49.timer = in.readSint16BE(); - _actListArr[i][j].a49.soundIndex = in.readUint16BE(); - break; - default: - error("Engine - Unknown action type encountered: %d", _actListArr[i][j].a0.actType); - } - } - _actListArr[i][numSubElem].a0.actType = ANULL; - } - } else { - for (int i = 0; i < numElem; i++) { - numSubElem = in.readUint16BE(); - for (int j = 0; j < numSubElem; j++) { - numSubAct = in.readByte(); - switch (numSubAct) { - case ANULL: // -1 - break; - case ASCHEDULE: // 0 - in.readSint16BE(); - in.readUint16BE(); - break; - case START_OBJ: // 1 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - break; - case INIT_OBJXY: // 2 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case PROMPT: // 3 - in.readSint16BE(); - in.readSint16BE(); - numSubAct = in.readUint16BE(); - for (int k = 0; k < numSubAct; k++) - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readByte(); - break; - case BKGD_COLOR: // 4 - in.readSint16BE(); - in.readUint32BE(); - break; - case INIT_OBJVXY: // 5 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case INIT_CARRY: // 6 - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - break; - case INIT_HF_COORD: // 7 - in.readSint16BE(); - in.readSint16BE(); - break; - case NEW_SCREEN: // 8 - in.readSint16BE(); - in.readSint16BE(); - break; - case INIT_OBJSTATE: // 9 - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - break; - case INIT_PATH: // 10 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - in.readByte(); - break; - case COND_R: // 11 - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - in.readUint16BE(); - in.readUint16BE(); - break; - case TEXT: // 12 - in.readSint16BE(); - in.readSint16BE(); - break; - case SWAP_IMAGES: // 13 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case COND_SCR: // 14 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case AUTOPILOT: // 15 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - in.readByte(); - break; - case INIT_OBJ_SEQ: // 16 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case SET_STATE_BITS: // 17 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case CLEAR_STATE_BITS: // 18 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case TEST_STATE_BITS: // 19 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case DEL_EVENTS: // 20 - in.readSint16BE(); - in.readByte(); - break; - case GAMEOVER: // 21 - in.readSint16BE(); - break; - case INIT_HH_COORD: // 22 - in.readSint16BE(); - in.readSint16BE(); - break; - case EXIT: // 23 - in.readSint16BE(); - break; - case BONUS: // 24 - in.readSint16BE(); - in.readSint16BE(); - break; - case COND_BOX: // 25 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case SOUND: // 26 - in.readSint16BE(); - in.readSint16BE(); - break; - case ADD_SCORE: // 27 - in.readSint16BE(); - in.readSint16BE(); - break; - case SUB_SCORE: // 28 - in.readSint16BE(); - in.readSint16BE(); - break; - case COND_CARRY: // 29 - in.readSint16BE(); - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case INIT_MAZE: // 30 - in.readSint16BE(); - in.readByte(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - break; - case EXIT_MAZE: // 31 - in.readSint16BE(); - break; - case INIT_PRIORITY: // 32 - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - break; - case INIT_SCREEN: // 33 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case AGSCHEDULE: // 34 - in.readSint16BE(); - in.readUint16BE(); - break; - case REMAPPAL: // 35 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case COND_NOUN: // 36 - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case SCREEN_STATE: // 37 - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - break; - case INIT_LIPS: // 38 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readByte(); - in.readByte(); - break; - case INIT_STORY_MODE: // 39 - in.readSint16BE(); - in.readByte(); - break; - case WARN: // 40 - in.readSint16BE(); - in.readSint16BE(); - break; - case COND_BONUS: // 41 - in.readSint16BE(); - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case TEXT_TAKE: // 42 - in.readSint16BE(); - in.readSint16BE(); - break; - case YESNO: // 43 - in.readSint16BE(); - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case STOP_ROUTE: // 44 - in.readSint16BE(); - break; - case COND_ROUTE: // 45 - in.readSint16BE(); - in.readSint16BE(); - in.readUint16BE(); - in.readUint16BE(); - break; - case INIT_JUMPEXIT: // 46 - in.readSint16BE(); - in.readByte(); - break; - case INIT_VIEW: // 47 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case INIT_OBJ_FRAME: // 48 - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - in.readSint16BE(); - break; - case OLD_SONG: //49 - in.readSint16BE(); - in.readUint16BE(); - break; - default: - error("Engine - Unknown action type encountered %d - variante %d pos %d.%d", numSubAct, varnt, i, j); - } - } - } - } - } + _scheduler->loadActListArr(in); + for (int varnt = 0; varnt < _numVariant; varnt++) { if (varnt == _gameVariant) { - _tunesNbr = in.readByte(); - _soundSilence = in.readByte(); - _soundTest = in.readByte(); + _tunesNbr = in.readSByte(); + _soundSilence = in.readSByte(); + _soundTest = in.readSByte(); } else { - in.readByte(); - in.readByte(); - in.readByte(); + in.readSByte(); + in.readSByte(); + in.readSByte(); } } @@ -1291,12 +732,7 @@ bool HugoEngine::loadHugoDat() { _numObj = numElem; } - //Read kALnewscr used by maze (Hugo 2) - for (int varnt = 0; varnt < _numVariant; varnt++) { - numElem = in.readUint16BE(); - if (varnt == _gameVariant) - _alNewscrIndex = numElem; - } + _scheduler->loadAlNewscrIndex(in); if (_gameVariant > 2) { _arrayFontSize[0] = in.readUint16BE(); @@ -1464,7 +900,9 @@ void HugoEngine::freeTexts(char **ptr) { free(ptr); } -// Sets the playlist to be the default tune selection +/** +* Sets the playlist to be the default tune selection +*/ void HugoEngine::initPlaylist(bool playlist[MAX_TUNES]) { debugC(1, kDebugEngine, "initPlaylist"); @@ -1474,7 +912,9 @@ void HugoEngine::initPlaylist(bool playlist[MAX_TUNES]) { playlist[_defltTunes[i]] = true; } -// Initialize the dynamic game status +/** +* Initialize the dynamic game status +*/ void HugoEngine::initStatus() { debugC(1, kDebugEngine, "initStatus"); _status.initSaveFl = true; // Force initial save @@ -1511,8 +951,10 @@ void HugoEngine::initStatus() { _status.go_id = -1; // Hero not walking to anything } -// Initialize default config values. Must be done before Initialize(). -// Reset needed to save config.cx,cy which get splatted during OnFileNew() +/** +* Initialize default config values. Must be done before Initialize(). +* Reset needed to save config.cx,cy which get splatted during OnFileNew() +*/ void HugoEngine::initConfig(inst_t action) { debugC(1, kDebugEngine, "initConfig(%d)", action); @@ -1580,13 +1022,13 @@ void HugoEngine::initialize() { } } -// Restore all resources before termination +/** +* Restore all resources before termination +*/ void HugoEngine::shutdown() { debugC(1, kDebugEngine, "shutdown"); _file->closeDatabaseFiles(); - if (_status.recordFl || _status.playbackFl) - _file->closePlaybackFile(); _object->freeObjects(); } @@ -1597,7 +1039,9 @@ void HugoEngine::readObjectImages() { _file->readImage(i, &_object->_objects[i]); } -// Read scenery, overlay files for given screen number +/** +* Read scenery, overlay files for given screen number +*/ void HugoEngine::readScreenFiles(int screenNum) { debugC(1, kDebugEngine, "readScreenFiles(%d)", screenNum); @@ -1608,8 +1052,10 @@ void HugoEngine::readScreenFiles(int screenNum) { _file->readOverlay(screenNum, _ovlBase, OVLBASE); // Overlay base file } -// Return maximum allowed movement (from zero to vx) such that object does -// not cross a boundary (either background or another object) +/** +* Return maximum allowed movement (from zero to vx) such that object does +* not cross a boundary (either background or another object) +*/ int HugoEngine::deltaX(int x1, int x2, int vx, int y) { // Explanation of algorithm: The boundaries are drawn as contiguous // lines 1 pixel wide. Since DX,DY are not necessarily 1, we must @@ -1658,9 +1104,11 @@ int HugoEngine::deltaX(int x1, int x2, int vx, int y) { return vx; } -// Similar to Delta_x, but for movement in y direction. Special case of -// bytes at end of line segment; must only count boundary bits falling on -// line segment. +/** +* Similar to Delta_x, but for movement in y direction. Special case of +* bytes at end of line segment; must only count boundary bits falling on +* line segment. +*/ int HugoEngine::deltaY(int x1, int x2, int vy, int y) { debugC(3, kDebugEngine, "deltaY(%d, %d, %d, %d)", x1, x2, vy, y); @@ -1685,7 +1133,9 @@ int HugoEngine::deltaY(int x1, int x2, int vy, int y) { return vy; } -// Store a horizontal line segment in the object boundary file +/** +* Store a horizontal line segment in the object boundary file +*/ void HugoEngine::storeBoundary(int x1, int x2, int y) { debugC(5, kDebugEngine, "storeBoundary(%d, %d, %d)", x1, x2, y); @@ -1700,7 +1150,9 @@ void HugoEngine::storeBoundary(int x1, int x2, int y) { } } -// Clear a horizontal line segment in the object boundary file +/** +* Clear a horizontal line segment in the object boundary file +*/ void HugoEngine::clearBoundary(int x1, int x2, int y) { debugC(5, kDebugEngine, "clearBoundary(%d, %d, %d)", x1, x2, y); @@ -1715,52 +1167,10 @@ void HugoEngine::clearBoundary(int x1, int x2, int y) { } } -// Maze mode is enabled. Check to see whether hero has crossed the maze -// bounding box, if so, go to the next room */ -void HugoEngine::processMaze() { - debugC(1, kDebugEngine, "processMaze"); - - seq_t *currImage = _hero->currImagePtr; // Get ptr to current image - - // hero coordinates - int x1 = _hero->x + currImage->x1; // Left edge of object - int x2 = _hero->x + currImage->x2; // Right edge - int y1 = _hero->y + currImage->y1; // Top edge - int y2 = _hero->y + currImage->y2; // Bottom edge - - if (x1 < _maze.x1) { - // Exit west - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_screen_p - 1; - _actListArr[_alNewscrIndex][0].a2.x = _maze.x2 - SHIFT - (x2 - x1); - _actListArr[_alNewscrIndex][0].a2.y = _hero->y; - _status.routeIndex = -1; - _scheduler->insertActionList(_alNewscrIndex); - } else if (x2 > _maze.x2) { - // Exit east - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_screen_p + 1; - _actListArr[_alNewscrIndex][0].a2.x = _maze.x1 + SHIFT; - _actListArr[_alNewscrIndex][0].a2.y = _hero->y; - _status.routeIndex = -1; - _scheduler->insertActionList(_alNewscrIndex); - } else if (y1 < _maze.y1 - SHIFT) { - // Exit north - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_screen_p - _maze.size; - _actListArr[_alNewscrIndex][0].a2.x = _maze.x3; - _actListArr[_alNewscrIndex][0].a2.y = _maze.y2 - SHIFT - (y2 - y1); - _status.routeIndex = -1; - _scheduler->insertActionList(_alNewscrIndex); - } else if (y2 > _maze.y2 - SHIFT / 2) { - // Exit south - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_screen_p + _maze.size; - _actListArr[_alNewscrIndex][0].a2.x = _maze.x4; - _actListArr[_alNewscrIndex][0].a2.y = _maze.y1 + SHIFT; - _status.routeIndex = -1; - _scheduler->insertActionList(_alNewscrIndex); - } -} - -// Search background command list for this screen for supplied object. -// Return first associated verb (not "look") or 0 if none found. +/** +* Search background command list for this screen for supplied object. +* Return first associated verb (not "look") or 0 if none found. +*/ char *HugoEngine::useBG(char *name) { debugC(1, kDebugEngine, "useBG(%s)", name); @@ -1775,7 +1185,9 @@ char *HugoEngine::useBG(char *name) { return 0; } -// Add action lists for this screen to event queue +/** +* Add action lists for this screen to event queue +*/ void HugoEngine::screenActions(int screenNum) { debugC(1, kDebugEngine, "screenActions(%d)", screenNum); @@ -1786,18 +1198,22 @@ void HugoEngine::screenActions(int screenNum) { } } -// Set the new screen number into the hero object and any carried objects +/** +* Set the new screen number into the hero object and any carried objects +*/ void HugoEngine::setNewScreen(int screenNum) { debugC(1, kDebugEngine, "setNewScreen(%d)", screenNum); - *_screen_p = screenNum; // HERO object - for (int i = HERO + 1; i < _numObj; i++) { // Any others - if (_object->isCarried(i)) // being carried + *_screen_p = screenNum; // HERO object + for (int i = HERO + 1; i < _numObj; i++) { // Any others + if (_object->isCarried(i)) // being carried _object->_objects[i].screenIndex = screenNum; } } -// An object has collided with a boundary. See if any actions are required +/** +* An object has collided with a boundary. See if any actions are required +*/ void HugoEngine::boundaryCollision(object_t *obj) { debugC(1, kDebugEngine, "boundaryCollision"); @@ -1831,7 +1247,9 @@ void HugoEngine::boundaryCollision(object_t *obj) { } } -// Add up all the object values and all the bonus points +/** +* Add up all the object values and all the bonus points +*/ void HugoEngine::calcMaxScore() { debugC(1, kDebugEngine, "calcMaxScore"); @@ -1842,7 +1260,9 @@ void HugoEngine::calcMaxScore() { _maxscore += _points[i].score; } -// Exit game, advertise trilogy, show copyright +/** +* Exit game, advertise trilogy, show copyright +*/ void HugoEngine::endGame() { debugC(1, kDebugEngine, "endGame"); diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 0964029cab..3e80ced2d5 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -114,9 +114,9 @@ public: byte _gameVariant; byte _maxInvent; byte _numBonuses; - byte _soundSilence; - byte _soundTest; - byte _tunesNbr; + int8 _soundSilence; + int8 _soundTest; + int8 _tunesNbr; uint16 _numScreens; object_t *_hero; @@ -153,14 +153,11 @@ public: uint16 _cmdListSize; uint16 **_screenActs; uint16 _screenActsSize; - act **_actListArr; - uint16 _actListArrSize; int16 *_defltTunes; uint16 _look; uint16 _take; uint16 _drop; uint16 _numObj; - uint16 _alNewscrIndex; Common::RandomSource *_rnd; @@ -200,7 +197,6 @@ public: void clearBoundary(int x1, int x2, int y); void endGame(); void initStatus(); - void processMaze(); void readObjectImages(); void readScreenFiles(int screen); void screenActions(int screen); diff --git a/engines/hugo/intro_v1w.cpp b/engines/hugo/intro_v1w.cpp index 74efc4ff8c..bdea2837b1 100644 --- a/engines/hugo/intro_v1w.cpp +++ b/engines/hugo/intro_v1w.cpp @@ -45,8 +45,10 @@ intro_v1w::intro_v1w(HugoEngine *vm) : IntroHandler(vm) { intro_v1w::~intro_v1w() { } +/** +* Auto-start a new game +*/ void intro_v1w::preNewGame() { - // Auto-start a new game _vm->_file->restoreGame(-1); _vm->getGameStatus().viewState = V_INTROINIT; } diff --git a/engines/hugo/intro_v3d.cpp b/engines/hugo/intro_v3d.cpp index 8e0c0cc22c..87dca946f5 100644 --- a/engines/hugo/intro_v3d.cpp +++ b/engines/hugo/intro_v3d.cpp @@ -75,11 +75,13 @@ void intro_v3d::introInit() { introTicks = 0; } +/** +* Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. +* Called every tick. Returns TRUE when complete +*/ bool intro_v3d::introPlay() { byte introSize = _vm->getIntroSize(); -// Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. -// Called every tick. Returns TRUE when complete //TODO : Add proper check of story mode //#if STORY if (introTicks < introSize) { diff --git a/engines/hugo/intro_v3w.cpp b/engines/hugo/intro_v3w.cpp index a0bc624760..06fe1814fe 100644 --- a/engines/hugo/intro_v3w.cpp +++ b/engines/hugo/intro_v3w.cpp @@ -49,8 +49,10 @@ intro_v3w::~intro_v3w() { void intro_v3w::preNewGame() { } +/** +* Hugo 3 - show map and set up for introPlay() +*/ void intro_v3w::introInit() { -// Hugo 3 - show map and set up for introPlay() //#if STORY _vm->_file->readBackground(22); // display screen MAP_3w _vm->_screen->displayBackground(); @@ -59,11 +61,13 @@ void intro_v3w::introInit() { //#endif } +/** +* Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. +* Called every tick. Returns TRUE when complete +*/ bool intro_v3w::introPlay() { byte introSize = _vm->getIntroSize(); -// Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. -// Called every tick. Returns TRUE when complete //TODO : Add proper check of story mode //#if STORY if (introTicks < introSize) { diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp index ad0d5cbce9..74ab32c34f 100644 --- a/engines/hugo/inventory.cpp +++ b/engines/hugo/inventory.cpp @@ -49,11 +49,13 @@ namespace Hugo { InventoryHandler::InventoryHandler(HugoEngine *vm) : _vm(vm) { } -// Construct the inventory scrollbar in dib_i -// imageTotNumb is total number of inventory icons -// displayNumb is number requested for display -// scrollFl is TRUE if scroll arrows required -// firstObjId is index of first (scrolled) inventory object to display +/** +* Construct the inventory scrollbar in dib_i +* imageTotNumb is total number of inventory icons +* displayNumb is number requested for display +* scrollFl is TRUE if scroll arrows required +* firstObjId is index of first (scrolled) inventory object to display +*/ void InventoryHandler::constructInventory(int16 imageTotNumb, int displayNumb, bool scrollFl, int16 firstObjId) { debugC(1, kDebugInventory, "constructInventory(%d, %d, %d, %d)", imageTotNumb, displayNumb, (scrollFl) ? 0 : 1, firstObjId); @@ -81,7 +83,7 @@ void InventoryHandler::constructInventory(int16 imageTotNumb, int displayNumb, b // Compute dest coordinates in dib_i int16 ix = ((scrollFl) ? displayed + 1 : displayed) * INV_DX; - displayed++; // Count number displayed + displayed++; // Count number displayed // Copy the icon _vm->_screen->moveImage(_vm->_screen->getGUIBuffer(), ux, uy, INV_DX, INV_DY, XPIX, _vm->_screen->getIconBuffer(), ix, 0, XPIX); @@ -91,8 +93,10 @@ void InventoryHandler::constructInventory(int16 imageTotNumb, int displayNumb, b } } -// Process required action for inventory -// Returns objId under cursor (or -1) for INV_GET +/** +* Process required action for inventory +* Returns objId under cursor (or -1) for INV_GET +*/ int16 InventoryHandler::processInventory(invact_t action, ...) { debugC(1, kDebugInventory, "processInventory(invact_t action, ...)"); @@ -110,7 +114,7 @@ int16 InventoryHandler::processInventory(invact_t action, ...) { bool scrollFl = displayNumb > MAX_DISP; va_list marker; // Args used for D_ADD operation int16 cursorx, cursory; // Current cursor position - int16 objId = -1; // Return objid under cursor + int16 objId = -1; // Return objid under cursor switch (action) { case INV_INIT: // Initialize inventory display @@ -159,15 +163,17 @@ int16 InventoryHandler::processInventory(invact_t action, ...) { } break; } - return objId; // For the INV_GET action + return objId; // For the INV_GET action } +/** +* Process inventory state machine +*/ void InventoryHandler::runInventory() { status_t &gameStatus = _vm->getGameStatus(); debugC(1, kDebugInventory, "runInventory"); -// Process inventory state machine switch (gameStatus.inventoryState) { case I_OFF: // Icon bar off screen break; @@ -195,9 +201,9 @@ void InventoryHandler::runInventory() { // and get any icon/text out of _frontBuffer if (gameStatus.inventoryHeight == 0) { processInventory(INV_INIT); // Initialize dib_i - _vm->_screen->displayList(D_RESTORE); // Restore _frontBuffer - _vm->_object->updateImages(); // Rebuild _frontBuffer without icons/text - _vm->_screen->displayList(D_DISPLAY); // Blit display list to screen + _vm->_screen->displayList(D_RESTORE); // Restore _frontBuffer + _vm->_object->updateImages(); // Rebuild _frontBuffer without icons/text + _vm->_screen->displayList(D_DISPLAY); // Blit display list to screen } gameStatus.inventoryHeight += STEP_DY; // Move the icon bar down @@ -221,10 +227,10 @@ void InventoryHandler::runInventory() { } break; case I_ACTIVE: // Inventory active - _vm->_parser->charHandler(); // Still allow commands - _vm->_screen->displayList(D_RESTORE); // Restore previous background - _vm->_mouse->mouseHandler(); // Mouse activity - adds to display list - _vm->_screen->displayList(D_DISPLAY); // Blit the display list to screen + _vm->_parser->charHandler(); // Still allow commands + _vm->_screen->displayList(D_RESTORE); // Restore previous background + _vm->_mouse->mouseHandler(); // Mouse activity - adds to display list + _vm->_screen->displayList(D_DISPLAY); // Blit the display list to screen break; } } diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 9fc8a33373..385dce2703 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -63,7 +63,9 @@ enum seqTextMouse { MouseHandler::MouseHandler(HugoEngine *vm) : _vm(vm) { } -// Shadow-blit supplied string into dib_a at cx,cy and add to display list +/** +* Shadow-blit supplied string into dib_a at cx,cy and add to display list +*/ void MouseHandler::cursorText(char *buffer, int16 cx, int16 cy, uif_t fontId, int16 color) { debugC(1, kDebugMouse, "cursorText(%s, %d, %d, %d, %d)", buffer, cx, cy, fontId, color); @@ -80,8 +82,10 @@ void MouseHandler::cursorText(char *buffer, int16 cx, int16 cy, uif_t fontId, in _vm->_screen->displayList(D_ADD, sx, sy, sdx, sdy); } -// Find the exit hotspot containing cx, cy. -// Return hotspot index or -1 if not found. +/** +* Find the exit hotspot containing cx, cy. +* Return hotspot index or -1 if not found. +*/ int16 MouseHandler::findExit(int16 cx, int16 cy) { debugC(2, kDebugMouse, "findExit(%d, %d)", cx, cy); @@ -95,7 +99,9 @@ int16 MouseHandler::findExit(int16 cx, int16 cy) { return -1; } -// Process a mouse right click at coord cx, cy over object objid +/** +* Process a mouse right click at coord cx, cy over object objid +*/ void MouseHandler::processRightClick(int16 objId, int16 cx, int16 cy) { debugC(1, kDebugMouse, "Process_rclick(%d, %d, %d)", objId, cx, cy); @@ -138,12 +144,13 @@ void MouseHandler::processRightClick(int16 objId, int16 cx, int16 cy) { } } -// Process a left mouse click over: -// 1. An icon - show description -// 2. An object - walk to and show description -// 3. An icon scroll arrow - scroll the iconbar -// 4. Nothing - attempt to walk there -// 5. Exit - walk to exit hotspot +/** Process a left mouse click over: +* 1. An icon - show description +* 2. An object - walk to and show description +* 3. An icon scroll arrow - scroll the iconbar +* 4. Nothing - attempt to walk there +* 5. Exit - walk to exit hotspot +*/ void MouseHandler::processLeftClick(int16 objId, int16 cx, int16 cy) { debugC(1, kDebugMouse, "Process_lclick(%d, %d, %d)", objId, cx, cy); @@ -223,7 +230,9 @@ void MouseHandler::processLeftClick(int16 objId, int16 cx, int16 cy) { } } -// Process mouse activity +/** +* Process mouse activity +*/ void MouseHandler::mouseHandler() { debugC(2, kDebugMouse, "mouseHandler"); diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp index 77a25ca343..e54bf2f342 100644 --- a/engines/hugo/object.cpp +++ b/engines/hugo/object.cpp @@ -42,6 +42,7 @@ #include "hugo/route.h" #include "hugo/util.h" #include "hugo/parser.h" +#include "hugo/schedule.h" namespace Hugo { @@ -51,8 +52,10 @@ ObjectHandler::ObjectHandler(HugoEngine *vm) : _vm(vm) { ObjectHandler::~ObjectHandler() { } +/** +* Save sequence number and image number in given object +*/ void ObjectHandler::saveSeq(object_t *obj) { -// Save sequence number and image number in given object debugC(1, kDebugObject, "saveSeq"); bool found = false; @@ -70,8 +73,10 @@ void ObjectHandler::saveSeq(object_t *obj) { } } +/** +* Set up cur_seq_p from stored sequence and image number in object +*/ void ObjectHandler::restoreSeq(object_t *obj) { -// Set up cur_seq_p from stored sequence and image number in object debugC(1, kDebugObject, "restoreSeq"); seq_t *q = obj->seqList[obj->curSeqNum].seqPtr; @@ -80,8 +85,10 @@ void ObjectHandler::restoreSeq(object_t *obj) { obj->currImagePtr = q; } -// If status.objid = -1, pick up objid, else use status.objid on objid, -// if objid can't be picked up, use it directly +/** +* If status.objid = -1, pick up objid, else use status.objid on objid, +* if objid can't be picked up, use it directly +*/ void ObjectHandler::useObject(int16 objId) { debugC(1, kDebugObject, "useObject(%d)", objId); @@ -139,8 +146,10 @@ void ObjectHandler::useObject(int16 objId) { _vm->_parser->lineHandler(); // and process command } -// Return object index of the topmost object under the cursor, or -1 if none -// Objects are filtered if not "useful" +/** +* Return object index of the topmost object under the cursor, or -1 if none +* Objects are filtered if not "useful" +*/ int16 ObjectHandler::findObject(uint16 x, uint16 y) { debugC(3, kDebugObject, "findObject(%d, %d)", x, y); @@ -180,8 +189,10 @@ int16 ObjectHandler::findObject(uint16 x, uint16 y) { return objIndex; } -// Issue "Look at <object>" command -// Note special case of swapped hero image +/** +* Issue "Look at <object>" command +* Note special case of swapped hero image +*/ void ObjectHandler::lookObject(object_t *obj) { debugC(1, kDebugObject, "lookObject"); @@ -192,7 +203,9 @@ void ObjectHandler::lookObject(object_t *obj) { _vm->_parser->command("%s %s", _vm->_arrayVerbs[_vm->_look][0], _vm->_arrayNouns[obj->nounIndex][0]); } -// Free all object images +/** +* Free all object images +*/ void ObjectHandler::freeObjects() { debugC(1, kDebugObject, "freeObjects"); @@ -216,14 +229,14 @@ void ObjectHandler::freeObjects() { } } -// Compare function for the quicksort. The sort is to order the objects in -// increasing vertical position, using y+y2 as the baseline -// Returns -1 if ay2 < by2 else 1 if ay2 > by2 else 0 +/** +* Compare function for the quicksort. The sort is to order the objects in +* increasing vertical position, using y+y2 as the baseline +* Returns -1 if ay2 < by2 else 1 if ay2 > by2 else 0 +*/ int ObjectHandler::y2comp(const void *a, const void *b) { debugC(6, kDebugObject, "y2comp"); -// const object_t *p1 = &s_Engine->_objects[*(const byte *)a]; -// const object_t *p2 = &s_Engine->_objects[*(const byte *)b]; const object_t *p1 = &HugoEngine::get()._object->_objects[*(const byte *)a]; const object_t *p2 = &HugoEngine::get()._object->_objects[*(const byte *)b]; @@ -249,7 +262,9 @@ int ObjectHandler::y2comp(const void *a, const void *b) { return ay2 - by2; } -// Return TRUE if object being carried by hero +/** +* Return TRUE if object being carried by hero +*/ bool ObjectHandler::isCarrying(uint16 wordIndex) { debugC(1, kDebugObject, "isCarrying(%d)", wordIndex); @@ -260,7 +275,9 @@ bool ObjectHandler::isCarrying(uint16 wordIndex) { return false; } -// Describe any takeable objects visible in this screen +/** +* Describe any takeable objects visible in this screen +*/ void ObjectHandler::showTakeables() { debugC(1, kDebugObject, "showTakeables"); @@ -274,7 +291,9 @@ void ObjectHandler::showTakeables() { } } -// Find a clear space around supplied object that hero can walk to +/** +* Find a clear space around supplied object that hero can walk to +*/ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { debugC(1, kDebugObject, "findObjectSpace(obj, %d, %d)", *destx, *desty); @@ -317,10 +336,16 @@ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { return foundFl; } +/** +* Free ObjectArr (before exiting) +*/ void ObjectHandler::freeObjectArr() { free(_objects); } +/** +* Load ObjectArr from Hugo.dat +*/ void ObjectHandler::loadObjectArr(Common::File &in) { debugC(6, kDebugObject, "loadObject(&in)"); diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp index b2801d14c1..6c929f75fd 100644 --- a/engines/hugo/object_v1d.cpp +++ b/engines/hugo/object_v1d.cpp @@ -52,10 +52,12 @@ ObjectHandler_v1d::ObjectHandler_v1d(HugoEngine *vm) : ObjectHandler(vm) { ObjectHandler_v1d::~ObjectHandler_v1d() { } -// Draw all objects on screen as follows: -// 1. Sort 'FLOATING' objects in order of y2 (base of object) -// 2. Display new object frames/positions in dib -// Finally, cycle any animating objects to next frame +/** +* Draw all objects on screen as follows: +* 1. Sort 'FLOATING' objects in order of y2 (base of object) +* 2. Display new object frames/positions in dib +* Finally, cycle any animating objects to next frame +*/ void ObjectHandler_v1d::updateImages() { debugC(5, kDebugObject, "updateImages"); @@ -169,8 +171,10 @@ void ObjectHandler_v1d::updateImages() { } } -// Update all object positions. Process object 'local' events -// including boundary events and collisions +/** +* Update all object positions. Process object 'local' events +* including boundary events and collisions +*/ void ObjectHandler_v1d::moveObjects() { debugC(4, kDebugObject, "moveObjects"); @@ -334,14 +338,24 @@ void ObjectHandler_v1d::moveObjects() { } // If maze mode is enabled, do special maze processing - if (_maze.enabledFl) - _vm->processMaze(); + if (_maze.enabledFl) { + seq_t *currImage = _vm->_hero->currImagePtr; // Get ptr to current image + // hero coordinates + int x1 = _vm->_hero->x + currImage->x1; // Left edge of object + int x2 = _vm->_hero->x + currImage->x2; // Right edge + int y1 = _vm->_hero->y + currImage->y1; // Top edge + int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + + _vm->_scheduler->processMaze(x1, x2, y1, y2); + } } +/** +* Swap all the images of one object with another. Set hero_image (we make +* the assumption for now that the first obj is always the HERO) to the object +* number of the swapped image +*/ void ObjectHandler_v1d::swapImages(int objNumb1, int objNumb2) { -// Swap all the images of one object with another. Set hero_image (we make -// the assumption for now that the first obj is always the HERO) to the object -// number of the swapped image debugC(1, kDebugObject, "swapImages(%d, %d)", objNumb1, objNumb2); seqList_t tmpSeqList[MAX_SEQUENCES]; diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index 05fa4bd35c..48d921f2be 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -42,6 +42,7 @@ #include "hugo/route.h" #include "hugo/util.h" #include "hugo/parser.h" +#include "hugo/schedule.h" namespace Hugo { @@ -51,10 +52,12 @@ ObjectHandler_v1w::ObjectHandler_v1w(HugoEngine *vm) : ObjectHandler(vm) { ObjectHandler_v1w::~ObjectHandler_v1w() { } -// Draw all objects on screen as follows: -// 1. Sort 'FLOATING' objects in order of y2 (base of object) -// 2. Display new object frames/positions in dib -// Finally, cycle any animating objects to next frame +/** +* Draw all objects on screen as follows: +* 1. Sort 'FLOATING' objects in order of y2 (base of object) +* 2. Display new object frames/positions in dib +* Finally, cycle any animating objects to next frame +*/ void ObjectHandler_v1w::updateImages() { debugC(5, kDebugObject, "updateImages"); @@ -166,8 +169,10 @@ void ObjectHandler_v1w::updateImages() { } } -// Update all object positions. Process object 'local' events -// including boundary events and collisions +/** +* Update all object positions. Process object 'local' events +* including boundary events and collisions +*/ void ObjectHandler_v1w::moveObjects() { debugC(4, kDebugObject, "moveObjects"); @@ -341,14 +346,24 @@ void ObjectHandler_v1w::moveObjects() { } // If maze mode is enabled, do special maze processing - if (_maze.enabledFl) - _vm->processMaze(); + if (_maze.enabledFl) { + seq_t *currImage = _vm->_hero->currImagePtr; // Get ptr to current image + // hero coordinates + int x1 = _vm->_hero->x + currImage->x1; // Left edge of object + int x2 = _vm->_hero->x + currImage->x2; // Right edge + int y1 = _vm->_hero->y + currImage->y1; // Top edge + int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + + _vm->_scheduler->processMaze(x1, x2, y1, y2); + } } +/** +* Swap all the images of one object with another. Set hero_image (we make +* the assumption for now that the first obj is always the HERO) to the object +* number of the swapped image +*/ void ObjectHandler_v1w::swapImages(int objNumb1, int objNumb2) { -// Swap all the images of one object with another. Set hero_image (we make -// the assumption for now that the first obj is always the HERO) to the object -// number of the swapped image debugC(1, kDebugObject, "swapImages(%d, %d)", objNumb1, objNumb2); saveSeq(&_objects[objNumb1]); diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp index 3a0e367261..9d35edd882 100644 --- a/engines/hugo/object_v2d.cpp +++ b/engines/hugo/object_v2d.cpp @@ -52,10 +52,12 @@ ObjectHandler_v2d::ObjectHandler_v2d(HugoEngine *vm) : ObjectHandler_v1d(vm) { ObjectHandler_v2d::~ObjectHandler_v2d() { } -// Draw all objects on screen as follows: -// 1. Sort 'FLOATING' objects in order of y2 (base of object) -// 2. Display new object frames/positions in dib -// Finally, cycle any animating objects to next frame +/** +* Draw all objects on screen as follows: +* 1. Sort 'FLOATING' objects in order of y2 (base of object) +* 2. Display new object frames/positions in dib +* Finally, cycle any animating objects to next frame +*/ void ObjectHandler_v2d::updateImages() { debugC(5, kDebugObject, "updateImages"); @@ -169,8 +171,10 @@ void ObjectHandler_v2d::updateImages() { } } -// Update all object positions. Process object 'local' events -// including boundary events and collisions +/** +* Update all object positions. Process object 'local' events +* including boundary events and collisions +*/ void ObjectHandler_v2d::moveObjects() { debugC(4, kDebugObject, "moveObjects"); @@ -345,8 +349,16 @@ void ObjectHandler_v2d::moveObjects() { } // If maze mode is enabled, do special maze processing - if (_maze.enabledFl) - _vm->processMaze(); + if (_maze.enabledFl) { + seq_t *currImage = _vm->_hero->currImagePtr; // Get ptr to current image + // hero coordinates + int x1 = _vm->_hero->x + currImage->x1; // Left edge of object + int x2 = _vm->_hero->x + currImage->x2; // Right edge + int y1 = _vm->_hero->y + currImage->y1; // Top edge + int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + + _vm->_scheduler->processMaze(x1, x2, y1, y2); + } } } // End of namespace Hugo diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp index 42476ce379..485522bb12 100644 --- a/engines/hugo/object_v3d.cpp +++ b/engines/hugo/object_v3d.cpp @@ -42,6 +42,7 @@ #include "hugo/route.h" #include "hugo/util.h" #include "hugo/parser.h" +#include "hugo/schedule.h" namespace Hugo { @@ -51,8 +52,10 @@ ObjectHandler_v3d::ObjectHandler_v3d(HugoEngine *vm) : ObjectHandler_v2d(vm) { ObjectHandler_v3d::~ObjectHandler_v3d() { } -// Update all object positions. Process object 'local' events -// including boundary events and collisions +/** +* Update all object positions. Process object 'local' events +* including boundary events and collisions +*/ void ObjectHandler_v3d::moveObjects() { debugC(4, kDebugObject, "moveObjects"); @@ -227,14 +230,24 @@ void ObjectHandler_v3d::moveObjects() { } // If maze mode is enabled, do special maze processing - if (_maze.enabledFl) - _vm->processMaze(); + if (_maze.enabledFl) { + seq_t *currImage = _vm->_hero->currImagePtr;// Get ptr to current image + // hero coordinates + int x1 = _vm->_hero->x + currImage->x1; // Left edge of object + int x2 = _vm->_hero->x + currImage->x2; // Right edge + int y1 = _vm->_hero->y + currImage->y1; // Top edge + int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + + _vm->_scheduler->processMaze(x1, x2, y1, y2); + } } +/** +* Swap all the images of one object with another. Set hero_image (we make +* the assumption for now that the first obj is always the HERO) to the object +* number of the swapped image +*/ void ObjectHandler_v3d::swapImages(int objNumb1, int objNumb2) { -// Swap all the images of one object with another. Set hero_image (we make -// the assumption for now that the first obj is always the HERO) to the object -// number of the swapped image debugC(1, kDebugObject, "swapImages(%d, %d)", objNumb1, objNumb2); saveSeq(&_objects[objNumb1]); diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index a1f493706e..22f1102b08 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -106,7 +106,6 @@ void Parser::keyHandler(uint16 nChar, uint16 nFlags) { default: // Any other key if (!gameStatus.storyModeFl) { // Keyboard disabled // Add printable keys to ring buffer - uint16 bnext = _putIndex + 1; if (bnext >= sizeof(_ringBuffer)) bnext = 0; @@ -121,8 +120,10 @@ void Parser::keyHandler(uint16 nChar, uint16 nFlags) { _checkDoubleF1Fl = false; } -// Add any new chars to line buffer and display them. -// If CR pressed, pass line to LineHandler() +/** +* Add any new chars to line buffer and display them. +* If CR pressed, pass line to LineHandler() +*/ void Parser::charHandler() { debugC(4, kDebugParser, "charHandler"); @@ -187,8 +188,10 @@ void Parser::charHandler() { } } -// Perform an immediate command. Takes parameters a la sprintf -// Assumes final string will not overrun line[] length +/** +* Perform an immediate command. Takes parameters a la sprintf +* Assumes final string will not overrun line[] length +*/ void Parser::command(const char *format, ...) { debugC(1, kDebugParser, "Command(%s, ...)", format); @@ -200,7 +203,9 @@ void Parser::command(const char *format, ...) { lineHandler(); } -// Locate any member of object name list appearing in command line +/** +* Locate any member of object name list appearing in command line +*/ bool Parser::isWordPresent(char **wordArr) { debugC(1, kDebugParser, "isWordPresent(%s)", wordArr[0]); @@ -213,7 +218,9 @@ bool Parser::isWordPresent(char **wordArr) { return false; } -// Locate word in list of nouns and return ptr to first string in noun list +/** +* Locate word in list of nouns and return ptr to first string in noun list +*/ char *Parser::findNoun() { debugC(1, kDebugParser, "findNoun()"); @@ -226,7 +233,9 @@ char *Parser::findNoun() { return 0; } -// Locate word in list of verbs and return ptr to first string in verb list +/** +* Locate word in list of verbs and return ptr to first string in verb list +*/ char *Parser::findVerb() { debugC(1, kDebugParser, "findVerb()"); @@ -239,13 +248,15 @@ char *Parser::findVerb() { return 0; } -// Show user all objects being carried in a variable width 2 column format +/** +* Show user all objects being carried in a variable width 2 column format +*/ void Parser::showDosInventory() { debugC(1, kDebugParser, "showDosInventory()"); static const char *blanks = " "; uint16 index = 0, len1 = 0, len2 = 0; - for (int i = 0; i < _vm->_numObj; i++) { // Find widths of 2 columns + for (int i = 0; i < _vm->_numObj; i++) { // Find widths of 2 columns if (_vm->_object->isCarried(i)) { uint16 len = strlen(_vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][1]); if (index++ & 1) // Right hand column @@ -263,7 +274,7 @@ void Parser::showDosInventory() { strncat(buffer, blanks, (len1 + len2 - strlen(_vm->_textParser[kTBIntro])) / 2); strcat(strcat(buffer, _vm->_textParser[kTBIntro]), "\n"); index = 0; - for (int i = 0; i < _vm->_numObj; i++) { // Assign strings + for (int i = 0; i < _vm->_numObj; i++) { // Assign strings if (_vm->_object->isCarried(i)) { if (index++ & 1) strcat(strcat(buffer, _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][1]), "\n"); diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp index dcdc2c74ac..216ab8386c 100644 --- a/engines/hugo/parser_v1d.cpp +++ b/engines/hugo/parser_v1d.cpp @@ -49,8 +49,10 @@ Parser_v1d::Parser_v1d(HugoEngine *vm) : Parser(vm) { Parser_v1d::~Parser_v1d() { } -// Locate word in list of nouns and return ptr to string in noun list -// If n is NULL, start at beginning of list, else with n +/** +* Locate word in list of nouns and return ptr to string in noun list +* If n is NULL, start at beginning of list, else with n +*/ char *Parser_v1d::findNextNoun(char *noun) { debugC(1, kDebugParser, "findNextNoun(%s)", noun); @@ -70,10 +72,12 @@ char *Parser_v1d::findNextNoun(char *noun) { return 0; } -// Test whether hero is close to object. Return TRUE or FALSE -// If no noun specified, check context flag in object before other tests. -// If object not near, return suitable string; may be similar object closer -// If radius is -1, treat radius as infinity +/** +* Test whether hero is close to object. Return TRUE or FALSE +* If no noun specified, check context flag in object before other tests. +* If object not near, return suitable string; may be similar object closer +* If radius is -1, treat radius as infinity +*/ bool Parser_v1d::isNear(char *verb, char *noun, object_t *obj, char *comment) { debugC(1, kDebugParser, "isNear(%s, %s, obj, %s)", verb, noun, comment); @@ -131,9 +135,11 @@ bool Parser_v1d::isNear(char *verb, char *noun, object_t *obj, char *comment) { return true; } -// Test whether supplied verb is one of the common variety for this object -// say_ok needed for special case of take/drop which may be handled not only -// here but also in a cmd_list with a donestr string simultaneously +/** +* Test whether supplied verb is one of the common variety for this object +* say_ok needed for special case of take/drop which may be handled not only +* here but also in a cmd_list with a donestr string simultaneously +*/ bool Parser_v1d::isGenericVerb(char *word, object_t *obj) { debugC(1, kDebugParser, "isGenericVerb(%s, object_t *obj)", word); @@ -169,10 +175,12 @@ bool Parser_v1d::isGenericVerb(char *word, object_t *obj) { return true; } -// Test whether supplied verb is included in the list of allowed verbs for -// this object. If it is, then perform the tests on it from the cmd list -// and if it passes, perform the actions in the action list. If the verb -// is catered for, return TRUE +/** +* Test whether supplied verb is included in the list of allowed verbs for +* this object. If it is, then perform the tests on it from the cmd list +* and if it passes, perform the actions in the action list. If the verb +* is catered for, return TRUE +*/ bool Parser_v1d::isObjectVerb(char *word, object_t *obj) { debugC(1, kDebugParser, "isObjectVerb(%s, object_t *obj)", word); @@ -219,8 +227,10 @@ bool Parser_v1d::isObjectVerb(char *word, object_t *obj) { return true; } -// Print text for possible background object. Return TRUE if match found -// Only match if both verb and noun found. Test_ca will match verb-only +/** +* Print text for possible background object. Return TRUE if match found +* Only match if both verb and noun found. Test_ca will match verb-only +*/ bool Parser_v1d::isBackgroundWord(char *noun, char *verb, objectList_t obj) { debugC(1, kDebugParser, "isBackgroundWord(%s, %s, object_list_t obj)", noun, verb); @@ -236,7 +246,9 @@ bool Parser_v1d::isBackgroundWord(char *noun, char *verb, objectList_t obj) { return false; } -// Do all things necessary to carry an object +/** +* Do all things necessary to carry an object +*/ void Parser_v1d::takeObject(object_t *obj) { debugC(1, kDebugParser, "takeObject(object_t *obj)"); @@ -249,7 +261,9 @@ void Parser_v1d::takeObject(object_t *obj) { Utils::Box(BOX_ANY, TAKE_TEXT, _vm->_arrayNouns[obj->nounIndex][TAKE_NAME]); } -// Do all necessary things to drop an object +/** +* Do all necessary things to drop an object +*/ void Parser_v1d::dropObject(object_t *obj) { debugC(1, kDebugParser, "dropObject(object_t *obj)"); @@ -263,8 +277,10 @@ void Parser_v1d::dropObject(object_t *obj) { Utils::Box(BOX_ANY, "%s", _vm->_textParser[kTBOk]); } -// Print text for possible background object. Return TRUE if match found -// If test_noun TRUE, must have a noun given +/** +* Print text for possible background object. Return TRUE if match found +* If test_noun TRUE, must have a noun given +*/ bool Parser_v1d::isCatchallVerb(bool testNounFl, char *noun, char *verb, objectList_t obj) { debugC(1, kDebugParser, "isCatchallVerb(%d, %s, %s, object_list_t obj)", (testNounFl) ? 1 : 0, noun, verb); @@ -280,7 +296,9 @@ bool Parser_v1d::isCatchallVerb(bool testNounFl, char *noun, char *verb, objectL return false; } -// Parse the user's line of text input. Generate events as necessary +/** +* Parse the user's line of text input. Generate events as necessary +*/ void Parser_v1d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); @@ -349,7 +367,7 @@ void Parser_v1d::lineHandler() { Utils::Box(BOX_ANY, "%s", farComment); else if (!isCatchallVerb(true, noun, verb, _vm->_catchallList) && !isCatchallVerb(false, noun, verb, _vm->_backgroundObjects[*_vm->_screen_p]) && - !isCatchallVerb(false, noun, verb, _vm->_catchallList)) + !isCatchallVerb(false, noun, verb, _vm->_catchallList)) Utils::Box(BOX_ANY, "%s", _vm->_textParser[kTBEh_1d]); } diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp index 5021db4c6e..96442e4fcd 100644 --- a/engines/hugo/parser_v1w.cpp +++ b/engines/hugo/parser_v1w.cpp @@ -49,9 +49,11 @@ Parser_v1w::Parser_v1w(HugoEngine *vm) : Parser(vm) { Parser_v1w::~Parser_v1w() { } -// Test whether command line contains a verb allowed by this object. -// If it does, and the object is near and passes the tests in the command -// list then carry out the actions in the action list and return TRUE +/** +* Test whether command line contains a verb allowed by this object. +* If it does, and the object is near and passes the tests in the command +* list then carry out the actions in the action list and return TRUE +*/ bool Parser_v1w::isObjectVerb(object_t *obj, char *comment) { debugC(1, kDebugParser, "isObjectVerb(object_t *obj, %s)", comment); @@ -104,7 +106,9 @@ bool Parser_v1w::isObjectVerb(object_t *obj, char *comment) { return true; } -// Test whether command line contains one of the generic actions +/** +* Test whether command line contains one of the generic actions +*/ bool Parser_v1w::isGenericVerb(object_t *obj, char *comment) { debugC(1, kDebugParser, "isGenericVerb(object_t *obj, %s)", comment); @@ -154,10 +158,12 @@ bool Parser_v1w::isGenericVerb(object_t *obj, char *comment) { return true; } -// Test whether hero is close to object. Return TRUE or FALSE -// If object not near, return suitable comment; may be another object close -// If radius is -1, treat radius as infinity -// Verb is included to determine correct comment if not near +/** +* Test whether hero is close to object. Return TRUE or FALSE +* If object not near, return suitable comment; may be another object close +* If radius is -1, treat radius as infinity +* Verb is included to determine correct comment if not near +*/ bool Parser_v1w::isNear(object_t *obj, char *verb, char *comment) { debugC(1, kDebugParser, "isNear(object_t *obj, %s, %s)", verb, comment); @@ -210,7 +216,9 @@ bool Parser_v1w::isNear(object_t *obj, char *verb, char *comment) { return true; } -// Do all things necessary to carry an object +/** +* Do all things necessary to carry an object +*/ void Parser_v1w::takeObject(object_t *obj) { debugC(1, kDebugParser, "takeObject(object_t *obj)"); @@ -225,7 +233,9 @@ void Parser_v1w::takeObject(object_t *obj) { Utils::Box(BOX_ANY, TAKE_TEXT, _vm->_arrayNouns[obj->nounIndex][TAKE_NAME]); } -// Do all necessary things to drop an object +/** +* Do all necessary things to drop an object +*/ void Parser_v1w::dropObject(object_t *obj) { debugC(1, kDebugParser, "dropObject(object_t *obj)"); @@ -242,10 +252,12 @@ void Parser_v1w::dropObject(object_t *obj) { Utils::Box(BOX_ANY, "%s", _vm->_textParser[kTBOk]); } -// Search for matching verbs in background command list. -// Noun is not required. Return TRUE if match found -// Note that if the background command list has match set TRUE then do not -// print text if there are any recognizable nouns in the command line +/** +* Search for matching verbs in background command list. +* Noun is not required. Return TRUE if match found +* Note that if the background command list has match set TRUE then do not +* print text if there are any recognizable nouns in the command line +*/ bool Parser_v1w::isCatchallVerb(objectList_t obj) { debugC(1, kDebugParser, "isCatchallVerb(object_list_t obj)"); @@ -267,8 +279,10 @@ bool Parser_v1w::isCatchallVerb(objectList_t obj) { return false; } -// Search for matching verb/noun pairs in background command list -// Print text for possible background object. Return TRUE if match found +/** +* Search for matching verb/noun pairs in background command list +* Print text for possible background object. Return TRUE if match found +*/ bool Parser_v1w::isBackgroundWord(objectList_t obj) { debugC(1, kDebugParser, "isBackgroundWord(object_list_t obj)"); @@ -285,7 +299,9 @@ bool Parser_v1w::isBackgroundWord(objectList_t obj) { return false; } -// Parse the user's line of text input. Generate events as necessary +/** +* Parse the user's line of text input. Generate events as necessary +*/ void Parser_v1w::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp index 99fcf63a4e..fc82412962 100644 --- a/engines/hugo/parser_v2d.cpp +++ b/engines/hugo/parser_v2d.cpp @@ -47,7 +47,9 @@ Parser_v2d::Parser_v2d(HugoEngine *vm) : Parser_v1d(vm) { Parser_v2d::~Parser_v2d() { } -// Parse the user's line of text input. Generate events as necessary +/** +* Parse the user's line of text input. Generate events as necessary +*/ void Parser_v2d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp index 49c9ec2c08..7c0b9adedf 100644 --- a/engines/hugo/parser_v3d.cpp +++ b/engines/hugo/parser_v3d.cpp @@ -49,7 +49,9 @@ Parser_v3d::Parser_v3d(HugoEngine *vm) : Parser_v1w(vm) { Parser_v3d::~Parser_v3d() { } -// Parse the user's line of text input. Generate events as necessary +/** +* Parse the user's line of text input. Generate events as necessary +*/ void Parser_v3d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 9e068171a2..962adab45d 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -44,11 +44,13 @@ namespace Hugo { Route::Route(HugoEngine *vm) : _vm(vm) { } -// Face hero in new direction, based on cursor key input by user. +/** +* Face hero in new direction, based on cursor key input by user. +*/ void Route::setDirection(uint16 keyCode) { debugC(1, kDebugRoute, "setDirection(%d)", keyCode); - object_t *obj = _vm->_hero; // Pointer to hero object + object_t *obj = _vm->_hero; // Pointer to hero object // Set first image in sequence switch (keyCode) { @@ -79,15 +81,17 @@ void Route::setDirection(uint16 keyCode) { } } -// Set hero walking, based on cursor key input by user. -// Hitting same key twice will stop hero. +/** +* Set hero walking, based on cursor key input by user. +* Hitting same key twice will stop hero. +*/ void Route::setWalk(uint16 direction) { debugC(1, kDebugRoute, "setWalk(%d)", direction); static uint16 oldDirection = 0; // Last direction char - object_t *obj = _vm->_hero; // Pointer to hero object + object_t *obj = _vm->_hero; // Pointer to hero object - if (_vm->getGameStatus().storyModeFl || obj->pathType != USER) // Make sure user has control + if (_vm->getGameStatus().storyModeFl || obj->pathType != USER) // Make sure user has control return; if (!obj->vx && !obj->vy) @@ -142,20 +146,22 @@ void Route::setWalk(uint16 direction) { } } -// Recursive algorithm! Searches from hero to dest_x, dest_y -// Find horizontal line segment about supplied point and recursively -// find line segments for each point above and below that segment. -// When destination point found in segment, start surfacing and leave -// a trail in segment[] from destination back to hero. -// -// Note: there is a bug which allows a route through a 1-pixel high -// narrow gap if between 2 segments wide enough for hero. To work -// around this, make sure any narrow gaps are 2 or more pixels high. -// An example of this was the blocking guard in Hugo1/Dead-End. +/** +* Recursive algorithm! Searches from hero to dest_x, dest_y +* Find horizontal line segment about supplied point and recursively +* find line segments for each point above and below that segment. +* When destination point found in segment, start surfacing and leave +* a trail in segment[] from destination back to hero. +* +* Note: there is a bug which allows a route through a 1-pixel high +* narrow gap if between 2 segments wide enough for hero. To work +* around this, make sure any narrow gaps are 2 or more pixels high. +* An example of this was the blocking guard in Hugo1/Dead-End. +*/ void Route::segment(int16 x, int16 y) { debugC(1, kDebugRoute, "segment(%d, %d)", x, y); -// Note use of static - can't waste stack + // Note: use of static - can't waste stack static image_pt p; // Ptr to _boundaryMap[y] static segment_t *seg_p; // Ptr to segment @@ -262,8 +268,10 @@ void Route::segment(int16 x, int16 y) { } } -// Create and return ptr to new node. Initialize with previous node. -// Returns 0 if MAX_NODES exceeded +/** +* Create and return ptr to new node. Initialize with previous node. +* Returns 0 if MAX_NODES exceeded +*/ Point *Route::newNode() { debugC(1, kDebugRoute, "newNode"); @@ -274,10 +282,12 @@ Point *Route::newNode() { return &_route[_routeListIndex]; } -// Construct route to cx, cy. Return TRUE if successful. -// 1. Copy boundary bitmap to local byte map (include object bases) -// 2. Construct list of segments segment[] from hero to destination -// 3. Compress to shortest route in route[] +/** +* Construct route to cx, cy. Return TRUE if successful. +* 1. Copy boundary bitmap to local byte map (include object bases) +* 2. Construct list of segments segment[] from hero to destination +* 3. Compress to shortest route in route[] +*/ bool Route::findRoute(int16 cx, int16 cy) { debugC(1, kDebugRoute, "findRoute(%d, %d)", cx, cy); @@ -383,7 +393,9 @@ bool Route::findRoute(int16 cx, int16 cy) { return true; } -// Process hero in route mode - called from Move_objects() +/** +* Process hero in route mode - called from Move_objects() +*/ void Route::processRoute() { debugC(1, kDebugRoute, "processRoute"); @@ -454,9 +466,11 @@ void Route::processRoute() { } } -// Start a new route from hero to cx, cy -// go_for is the purpose, id indexes the exit or object to walk to -// Returns FALSE if route not found +/** +* Start a new route from hero to cx, cy +* go_for is the purpose, id indexes the exit or object to walk to +* Returns FALSE if route not found +*/ bool Route::startRoute(go_t go_for, int16 id, int16 cx, int16 cy) { debugC(1, kDebugRoute, "startRoute(%d, %d, %d, %d)", go_for, id, cx, cy); diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index a72b337ffe..ad48513c90 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -48,7 +48,9 @@ Scheduler::Scheduler(HugoEngine *vm) : _vm(vm) { Scheduler::~Scheduler() { } -// Initialise the timer event queue +/** +* Initialise the timer event queue +*/ void Scheduler::initEventQueue() { debugC(1, kDebugSchedule, "initEventQueue"); @@ -66,7 +68,9 @@ void Scheduler::initEventQueue() { _freeEvent = _events; // Free list is full } -// Return a ptr to an event structure from the free list +/** +* Return a ptr to an event structure from the free list +*/ event_t *Scheduler::getQueue() { debugC(4, kDebugSchedule, "getQueue"); @@ -78,17 +82,21 @@ event_t *Scheduler::getQueue() { return resEvent; } -// Call Insert_action for each action in the list supplied +/** +* Call Insert_action for each action in the list supplied +*/ void Scheduler::insertActionList(uint16 actIndex) { debugC(1, kDebugSchedule, "insertActionList(%d)", actIndex); - if (_vm->_actListArr[actIndex]) { - for (int i = 0; _vm->_actListArr[actIndex][i].a0.actType != ANULL; i++) - insertAction(&_vm->_actListArr[actIndex][i]); + if (_actListArr[actIndex]) { + for (int i = 0; _actListArr[actIndex][i].a0.actType != ANULL; i++) + insertAction(&_actListArr[actIndex][i]); } } -// Decode a string +/** +* Decode a string +*/ void Scheduler::decodeString(char *line) { debugC(1, kDebugSchedule, "decodeString(%s)", line); @@ -99,17 +107,21 @@ void Scheduler::decodeString(char *line) { debugC(1, kDebugSchedule, "result : %s", line); } -// Return system time in ticks. A tick is 1/TICKS_PER_SEC mS +/** +* Return system time in ticks. A tick is 1/TICKS_PER_SEC mS +*/ uint32 Scheduler::getWinTicks() { debugC(3, kDebugSchedule, "getTicks"); return _vm->getGameStatus().tick; } -// Return system time in ticks. A tick is 1/TICKS_PER_SEC mS -// If update FALSE, simply return last known time -// Note that this is real time unless a processing cycle takes longer than -// a real tick, in which case the system tick is simply incremented +/** +* Return system time in ticks. A tick is 1/TICKS_PER_SEC mS +* If update FALSE, simply return last known time +* Note that this is real time unless a processing cycle takes longer than +* a real tick, in which case the system tick is simply incremented +*/ uint32 Scheduler::getDosTicks(bool updateFl) { debugC(5, kDebugSchedule, "getTicks"); @@ -133,7 +145,9 @@ uint32 Scheduler::getDosTicks(bool updateFl) { return(tick); } -// Add indecated bonus to score if not added already +/** +* Add indecated bonus to score if not added already +*/ void Scheduler::processBonus(int bonusIndex) { debugC(1, kDebugSchedule, "processBonus(%d)", bonusIndex); @@ -143,12 +157,14 @@ void Scheduler::processBonus(int bonusIndex) { } } -// Transition to a new screen as follows: -// 1. Clear out all non-global events from event list. -// 2. Set the new screen (in the hero object and any carried objects) -// 3. Read in the screen files for the new screen -// 4. Schedule action list for new screen -// 5. Initialise prompt line and status line +/** +* Transition to a new screen as follows: +* 1. Clear out all non-global events from event list. +* 2. Set the new screen (in the hero object and any carried objects) +* 3. Read in the screen files for the new screen +* 4. Schedule action list for new screen +* 5. Initialise prompt line and status line +*/ void Scheduler::newScreen(int screenIndex) { debugC(1, kDebugSchedule, "newScreen(%d)", screenIndex); @@ -185,10 +201,12 @@ void Scheduler::newScreen(int screenIndex) { _vm->_screen->initNewScreenDisplay(); } -// Transition to a new screen as follows: -// 1. Set the new screen (in the hero object and any carried objects) -// 2. Read in the screen files for the new screen -// 3. Initialise prompt line and status line +/** +* Transition to a new screen as follows: +* 1. Set the new screen (in the hero object and any carried objects) +* 2. Read in the screen files for the new screen +* 3. Initialise prompt line and status line +*/ void Scheduler::restoreScreen(int screenIndex) { debugC(1, kDebugSchedule, "restoreScreen(%d)", screenIndex); @@ -202,10 +220,12 @@ void Scheduler::restoreScreen(int screenIndex) { _vm->_screen->initNewScreenDisplay(); } -// Wait (if necessary) for next synchronizing tick -// Slow machines won't make it by the end of tick, so will just plod on -// at their own speed, not waiting here, but free running. -// Note: DOS Versions only +/** +* Wait (if necessary) for next synchronizing tick +* Slow machines won't make it by the end of tick, so will just plod on +* at their own speed, not waiting here, but free running. +* Note: DOS Versions only +*/ void Scheduler::waitForRefresh(void) { debugC(1, kDebugSchedule, "waitForRefresh()"); @@ -220,4 +240,638 @@ void Scheduler::waitForRefresh(void) { timeout = ++t; } +/** +* Read kALnewscr used by maze (Hugo 2) +*/ +void Scheduler::loadAlNewscrIndex(Common::File &in) { + debugC(6, kDebugSchedule, "loadAlNewscrIndex(&in)"); + + int numElem; + for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { + numElem = in.readUint16BE(); + if (varnt == _vm->_gameVariant) + _alNewscrIndex = numElem; + } +} + +/** +* Load actListArr from Hugo.dat +*/ +void Scheduler::loadActListArr(Common::File &in) { + debugC(6, kDebugSchedule, "loadActListArr(&in)"); + + int numElem, numSubElem, numSubAct; + for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { + numElem = in.readUint16BE(); + if (varnt == _vm->_gameVariant) { + _actListArrSize = numElem; + _actListArr = (act **)malloc(sizeof(act *) * _actListArrSize); + for (int i = 0; i < _actListArrSize; i++) { + numSubElem = in.readUint16BE(); + _actListArr[i] = (act *) malloc(sizeof(act) * (numSubElem + 1)); + for (int j = 0; j < numSubElem; j++) { + _actListArr[i][j].a0.actType = (action_t) in.readByte(); + switch (_actListArr[i][j].a0.actType) { + case ANULL: // -1 + break; + case ASCHEDULE: // 0 + _actListArr[i][j].a0.timer = in.readSint16BE(); + _actListArr[i][j].a0.actIndex = in.readUint16BE(); + break; + case START_OBJ: // 1 + _actListArr[i][j].a1.timer = in.readSint16BE(); + _actListArr[i][j].a1.objNumb = in.readSint16BE(); + _actListArr[i][j].a1.cycleNumb = in.readSint16BE(); + _actListArr[i][j].a1.cycle = (cycle_t) in.readByte(); + break; + case INIT_OBJXY: // 2 + _actListArr[i][j].a2.timer = in.readSint16BE(); + _actListArr[i][j].a2.objNumb = in.readSint16BE(); + _actListArr[i][j].a2.x = in.readSint16BE(); + _actListArr[i][j].a2.y = in.readSint16BE(); + break; + case PROMPT: // 3 + _actListArr[i][j].a3.timer = in.readSint16BE(); + _actListArr[i][j].a3.promptIndex = in.readSint16BE(); + numSubAct = in.readUint16BE(); + _actListArr[i][j].a3.responsePtr = (int *) malloc(sizeof(int) * numSubAct); + for (int k = 0; k < numSubAct; k++) + _actListArr[i][j].a3.responsePtr[k] = in.readSint16BE(); + _actListArr[i][j].a3.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a3.actFailIndex = in.readUint16BE(); + _actListArr[i][j].a3.encodedFl = (in.readByte() == 1) ? true : false; + break; + case BKGD_COLOR: // 4 + _actListArr[i][j].a4.timer = in.readSint16BE(); + _actListArr[i][j].a4.newBackgroundColor = in.readUint32BE(); + break; + case INIT_OBJVXY: // 5 + _actListArr[i][j].a5.timer = in.readSint16BE(); + _actListArr[i][j].a5.objNumb = in.readSint16BE(); + _actListArr[i][j].a5.vx = in.readSint16BE(); + _actListArr[i][j].a5.vy = in.readSint16BE(); + break; + case INIT_CARRY: // 6 + _actListArr[i][j].a6.timer = in.readSint16BE(); + _actListArr[i][j].a6.objNumb = in.readSint16BE(); + _actListArr[i][j].a6.carriedFl = (in.readByte() == 1) ? true : false; + break; + case INIT_HF_COORD: // 7 + _actListArr[i][j].a7.timer = in.readSint16BE(); + _actListArr[i][j].a7.objNumb = in.readSint16BE(); + break; + case NEW_SCREEN: // 8 + _actListArr[i][j].a8.timer = in.readSint16BE(); + _actListArr[i][j].a8.screenIndex = in.readSint16BE(); + break; + case INIT_OBJSTATE: // 9 + _actListArr[i][j].a9.timer = in.readSint16BE(); + _actListArr[i][j].a9.objNumb = in.readSint16BE(); + _actListArr[i][j].a9.newState = in.readByte(); + break; + case INIT_PATH: // 10 + _actListArr[i][j].a10.timer = in.readSint16BE(); + _actListArr[i][j].a10.objNumb = in.readSint16BE(); + _actListArr[i][j].a10.newPathType = in.readSint16BE(); + _actListArr[i][j].a10.vxPath = in.readByte(); + _actListArr[i][j].a10.vyPath = in.readByte(); + break; + case COND_R: // 11 + _actListArr[i][j].a11.timer = in.readSint16BE(); + _actListArr[i][j].a11.objNumb = in.readSint16BE(); + _actListArr[i][j].a11.stateReq = in.readByte(); + _actListArr[i][j].a11.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a11.actFailIndex = in.readUint16BE(); + break; + case TEXT: // 12 + _actListArr[i][j].a12.timer = in.readSint16BE(); + _actListArr[i][j].a12.stringIndex = in.readSint16BE(); + break; + case SWAP_IMAGES: // 13 + _actListArr[i][j].a13.timer = in.readSint16BE(); + _actListArr[i][j].a13.obj1 = in.readSint16BE(); + _actListArr[i][j].a13.obj2 = in.readSint16BE(); + break; + case COND_SCR: // 14 + _actListArr[i][j].a14.timer = in.readSint16BE(); + _actListArr[i][j].a14.objNumb = in.readSint16BE(); + _actListArr[i][j].a14.screenReq = in.readSint16BE(); + _actListArr[i][j].a14.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a14.actFailIndex = in.readUint16BE(); + break; + case AUTOPILOT: // 15 + _actListArr[i][j].a15.timer = in.readSint16BE(); + _actListArr[i][j].a15.obj1 = in.readSint16BE(); + _actListArr[i][j].a15.obj2 = in.readSint16BE(); + _actListArr[i][j].a15.dx = in.readByte(); + _actListArr[i][j].a15.dy = in.readByte(); + break; + case INIT_OBJ_SEQ: // 16 + _actListArr[i][j].a16.timer = in.readSint16BE(); + _actListArr[i][j].a16.objNumb = in.readSint16BE(); + _actListArr[i][j].a16.seqIndex = in.readSint16BE(); + break; + case SET_STATE_BITS: // 17 + _actListArr[i][j].a17.timer = in.readSint16BE(); + _actListArr[i][j].a17.objNumb = in.readSint16BE(); + _actListArr[i][j].a17.stateMask = in.readSint16BE(); + break; + case CLEAR_STATE_BITS: // 18 + _actListArr[i][j].a18.timer = in.readSint16BE(); + _actListArr[i][j].a18.objNumb = in.readSint16BE(); + _actListArr[i][j].a18.stateMask = in.readSint16BE(); + break; + case TEST_STATE_BITS: // 19 + _actListArr[i][j].a19.timer = in.readSint16BE(); + _actListArr[i][j].a19.objNumb = in.readSint16BE(); + _actListArr[i][j].a19.stateMask = in.readSint16BE(); + _actListArr[i][j].a19.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a19.actFailIndex = in.readUint16BE(); + break; + case DEL_EVENTS: // 20 + _actListArr[i][j].a20.timer = in.readSint16BE(); + _actListArr[i][j].a20.actTypeDel = (action_t) in.readByte(); + break; + case GAMEOVER: // 21 + _actListArr[i][j].a21.timer = in.readSint16BE(); + break; + case INIT_HH_COORD: // 22 + _actListArr[i][j].a22.timer = in.readSint16BE(); + _actListArr[i][j].a22.objNumb = in.readSint16BE(); + break; + case EXIT: // 23 + _actListArr[i][j].a23.timer = in.readSint16BE(); + break; + case BONUS: // 24 + _actListArr[i][j].a24.timer = in.readSint16BE(); + _actListArr[i][j].a24.pointIndex = in.readSint16BE(); + break; + case COND_BOX: // 25 + _actListArr[i][j].a25.timer = in.readSint16BE(); + _actListArr[i][j].a25.objNumb = in.readSint16BE(); + _actListArr[i][j].a25.x1 = in.readSint16BE(); + _actListArr[i][j].a25.y1 = in.readSint16BE(); + _actListArr[i][j].a25.x2 = in.readSint16BE(); + _actListArr[i][j].a25.y2 = in.readSint16BE(); + _actListArr[i][j].a25.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a25.actFailIndex = in.readUint16BE(); + break; + case SOUND: // 26 + _actListArr[i][j].a26.timer = in.readSint16BE(); + _actListArr[i][j].a26.soundIndex = in.readSint16BE(); + break; + case ADD_SCORE: // 27 + _actListArr[i][j].a27.timer = in.readSint16BE(); + _actListArr[i][j].a27.objNumb = in.readSint16BE(); + break; + case SUB_SCORE: // 28 + _actListArr[i][j].a28.timer = in.readSint16BE(); + _actListArr[i][j].a28.objNumb = in.readSint16BE(); + break; + case COND_CARRY: // 29 + _actListArr[i][j].a29.timer = in.readSint16BE(); + _actListArr[i][j].a29.objNumb = in.readSint16BE(); + _actListArr[i][j].a29.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a29.actFailIndex = in.readUint16BE(); + break; + case INIT_MAZE: // 30 + _actListArr[i][j].a30.timer = in.readSint16BE(); + _actListArr[i][j].a30.mazeSize = in.readByte(); + _actListArr[i][j].a30.x1 = in.readSint16BE(); + _actListArr[i][j].a30.y1 = in.readSint16BE(); + _actListArr[i][j].a30.x2 = in.readSint16BE(); + _actListArr[i][j].a30.y2 = in.readSint16BE(); + _actListArr[i][j].a30.x3 = in.readSint16BE(); + _actListArr[i][j].a30.x4 = in.readSint16BE(); + _actListArr[i][j].a30.firstScreenIndex = in.readByte(); + break; + case EXIT_MAZE: // 31 + _actListArr[i][j].a31.timer = in.readSint16BE(); + break; + case INIT_PRIORITY: // 32 + _actListArr[i][j].a32.timer = in.readSint16BE(); + _actListArr[i][j].a32.objNumb = in.readSint16BE(); + _actListArr[i][j].a32.priority = in.readByte(); + break; + case INIT_SCREEN: // 33 + _actListArr[i][j].a33.timer = in.readSint16BE(); + _actListArr[i][j].a33.objNumb = in.readSint16BE(); + _actListArr[i][j].a33.screenIndex = in.readSint16BE(); + break; + case AGSCHEDULE: // 34 + _actListArr[i][j].a34.timer = in.readSint16BE(); + _actListArr[i][j].a34.actIndex = in.readUint16BE(); + break; + case REMAPPAL: // 35 + _actListArr[i][j].a35.timer = in.readSint16BE(); + _actListArr[i][j].a35.oldColorIndex = in.readSint16BE(); + _actListArr[i][j].a35.newColorIndex = in.readSint16BE(); + break; + case COND_NOUN: // 36 + _actListArr[i][j].a36.timer = in.readSint16BE(); + _actListArr[i][j].a36.nounIndex = in.readUint16BE(); + _actListArr[i][j].a36.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a36.actFailIndex = in.readUint16BE(); + break; + case SCREEN_STATE: // 37 + _actListArr[i][j].a37.timer = in.readSint16BE(); + _actListArr[i][j].a37.screenIndex = in.readSint16BE(); + _actListArr[i][j].a37.newState = in.readByte(); + break; + case INIT_LIPS: // 38 + _actListArr[i][j].a38.timer = in.readSint16BE(); + _actListArr[i][j].a38.lipsObjNumb = in.readSint16BE(); + _actListArr[i][j].a38.objNumb = in.readSint16BE(); + _actListArr[i][j].a38.dxLips = in.readByte(); + _actListArr[i][j].a38.dyLips = in.readByte(); + break; + case INIT_STORY_MODE: // 39 + _actListArr[i][j].a39.timer = in.readSint16BE(); + _actListArr[i][j].a39.storyModeFl = (in.readByte() == 1); + break; + case WARN: // 40 + _actListArr[i][j].a40.timer = in.readSint16BE(); + _actListArr[i][j].a40.stringIndex = in.readSint16BE(); + break; + case COND_BONUS: // 41 + _actListArr[i][j].a41.timer = in.readSint16BE(); + _actListArr[i][j].a41.BonusIndex = in.readSint16BE(); + _actListArr[i][j].a41.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a41.actFailIndex = in.readUint16BE(); + break; + case TEXT_TAKE: // 42 + _actListArr[i][j].a42.timer = in.readSint16BE(); + _actListArr[i][j].a42.objNumb = in.readSint16BE(); + break; + case YESNO: // 43 + _actListArr[i][j].a43.timer = in.readSint16BE(); + _actListArr[i][j].a43.promptIndex = in.readSint16BE(); + _actListArr[i][j].a43.actYesIndex = in.readUint16BE(); + _actListArr[i][j].a43.actNoIndex = in.readUint16BE(); + break; + case STOP_ROUTE: // 44 + _actListArr[i][j].a44.timer = in.readSint16BE(); + break; + case COND_ROUTE: // 45 + _actListArr[i][j].a45.timer = in.readSint16BE(); + _actListArr[i][j].a45.routeIndex = in.readSint16BE(); + _actListArr[i][j].a45.actPassIndex = in.readUint16BE(); + _actListArr[i][j].a45.actFailIndex = in.readUint16BE(); + break; + case INIT_JUMPEXIT: // 46 + _actListArr[i][j].a46.timer = in.readSint16BE(); + _actListArr[i][j].a46.jumpExitFl = (in.readByte() == 1); + break; + case INIT_VIEW: // 47 + _actListArr[i][j].a47.timer = in.readSint16BE(); + _actListArr[i][j].a47.objNumb = in.readSint16BE(); + _actListArr[i][j].a47.viewx = in.readSint16BE(); + _actListArr[i][j].a47.viewy = in.readSint16BE(); + _actListArr[i][j].a47.direction = in.readSint16BE(); + break; + case INIT_OBJ_FRAME: // 48 + _actListArr[i][j].a48.timer = in.readSint16BE(); + _actListArr[i][j].a48.objNumb = in.readSint16BE(); + _actListArr[i][j].a48.seqIndex = in.readSint16BE(); + _actListArr[i][j].a48.frameIndex = in.readSint16BE(); + break; + case OLD_SONG: //49 + _actListArr[i][j].a49.timer = in.readSint16BE(); + _actListArr[i][j].a49.soundIndex = in.readUint16BE(); + break; + default: + error("Engine - Unknown action type encountered: %d", _actListArr[i][j].a0.actType); + } + } + _actListArr[i][numSubElem].a0.actType = ANULL; + } + } else { + for (int i = 0; i < numElem; i++) { + numSubElem = in.readUint16BE(); + for (int j = 0; j < numSubElem; j++) { + numSubAct = in.readByte(); + switch (numSubAct) { + case ANULL: // -1 + break; + case ASCHEDULE: // 0 + in.readSint16BE(); + in.readUint16BE(); + break; + case START_OBJ: // 1 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + break; + case INIT_OBJXY: // 2 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case PROMPT: // 3 + in.readSint16BE(); + in.readSint16BE(); + numSubAct = in.readUint16BE(); + for (int k = 0; k < numSubAct; k++) + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readByte(); + break; + case BKGD_COLOR: // 4 + in.readSint16BE(); + in.readUint32BE(); + break; + case INIT_OBJVXY: // 5 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case INIT_CARRY: // 6 + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + break; + case INIT_HF_COORD: // 7 + in.readSint16BE(); + in.readSint16BE(); + break; + case NEW_SCREEN: // 8 + in.readSint16BE(); + in.readSint16BE(); + break; + case INIT_OBJSTATE: // 9 + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + break; + case INIT_PATH: // 10 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + in.readByte(); + break; + case COND_R: // 11 + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + in.readUint16BE(); + in.readUint16BE(); + break; + case TEXT: // 12 + in.readSint16BE(); + in.readSint16BE(); + break; + case SWAP_IMAGES: // 13 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case COND_SCR: // 14 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case AUTOPILOT: // 15 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + in.readByte(); + break; + case INIT_OBJ_SEQ: // 16 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case SET_STATE_BITS: // 17 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case CLEAR_STATE_BITS: // 18 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case TEST_STATE_BITS: // 19 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case DEL_EVENTS: // 20 + in.readSint16BE(); + in.readByte(); + break; + case GAMEOVER: // 21 + in.readSint16BE(); + break; + case INIT_HH_COORD: // 22 + in.readSint16BE(); + in.readSint16BE(); + break; + case EXIT: // 23 + in.readSint16BE(); + break; + case BONUS: // 24 + in.readSint16BE(); + in.readSint16BE(); + break; + case COND_BOX: // 25 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case SOUND: // 26 + in.readSint16BE(); + in.readSint16BE(); + break; + case ADD_SCORE: // 27 + in.readSint16BE(); + in.readSint16BE(); + break; + case SUB_SCORE: // 28 + in.readSint16BE(); + in.readSint16BE(); + break; + case COND_CARRY: // 29 + in.readSint16BE(); + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case INIT_MAZE: // 30 + in.readSint16BE(); + in.readByte(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + break; + case EXIT_MAZE: // 31 + in.readSint16BE(); + break; + case INIT_PRIORITY: // 32 + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + break; + case INIT_SCREEN: // 33 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case AGSCHEDULE: // 34 + in.readSint16BE(); + in.readUint16BE(); + break; + case REMAPPAL: // 35 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case COND_NOUN: // 36 + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case SCREEN_STATE: // 37 + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + break; + case INIT_LIPS: // 38 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readByte(); + in.readByte(); + break; + case INIT_STORY_MODE: // 39 + in.readSint16BE(); + in.readByte(); + break; + case WARN: // 40 + in.readSint16BE(); + in.readSint16BE(); + break; + case COND_BONUS: // 41 + in.readSint16BE(); + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case TEXT_TAKE: // 42 + in.readSint16BE(); + in.readSint16BE(); + break; + case YESNO: // 43 + in.readSint16BE(); + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case STOP_ROUTE: // 44 + in.readSint16BE(); + break; + case COND_ROUTE: // 45 + in.readSint16BE(); + in.readSint16BE(); + in.readUint16BE(); + in.readUint16BE(); + break; + case INIT_JUMPEXIT: // 46 + in.readSint16BE(); + in.readByte(); + break; + case INIT_VIEW: // 47 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case INIT_OBJ_FRAME: // 48 + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + in.readSint16BE(); + break; + case OLD_SONG: //49 + in.readSint16BE(); + in.readUint16BE(); + break; + default: + error("Engine - Unknown action type encountered %d - variante %d pos %d.%d", numSubAct, varnt, i, j); + } + } + } + } + } +} + +void Scheduler::freeActListArr() { + debugC(6, kDebugSchedule, "freeActListArr()"); + + for (int i = 0; i < _actListArrSize; i++) + free(_actListArr[i]); + free(_actListArr); +} + +/** +* Maze mode is enabled. Check to see whether hero has crossed the maze +* bounding box, if so, go to the next room +*/ +void Scheduler::processMaze(int x1, int x2, int y1, int y2) { + debugC(1, kDebugSchedule, "processMaze"); + + status_t &gameStatus = _vm->getGameStatus(); + + if (x1 < _maze.x1) { + // Exit west + _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p - 1; + _actListArr[_alNewscrIndex][0].a2.x = _maze.x2 - SHIFT - (x2 - x1); + _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->y; + gameStatus.routeIndex = -1; + insertActionList(_alNewscrIndex); + } else if (x2 > _maze.x2) { + // Exit east + _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p + 1; + _actListArr[_alNewscrIndex][0].a2.x = _maze.x1 + SHIFT; + _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->y; + gameStatus.routeIndex = -1; + insertActionList(_alNewscrIndex); + } else if (y1 < _maze.y1 - SHIFT) { + // Exit north + _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p - _maze.size; + _actListArr[_alNewscrIndex][0].a2.x = _maze.x3; + _actListArr[_alNewscrIndex][0].a2.y = _maze.y2 - SHIFT - (y2 - y1); + gameStatus.routeIndex = -1; + insertActionList(_alNewscrIndex); + } else if (y2 > _maze.y2 - SHIFT / 2) { + // Exit south + _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p + _maze.size; + _actListArr[_alNewscrIndex][0].a2.x = _maze.x4; + _actListArr[_alNewscrIndex][0].a2.y = _maze.y1 + SHIFT; + gameStatus.routeIndex = -1; + insertActionList(_alNewscrIndex); + } +} + } // End of namespace Hugo diff --git a/engines/hugo/schedule.h b/engines/hugo/schedule.h index e6eb5d7947..d0824674c6 100644 --- a/engines/hugo/schedule.h +++ b/engines/hugo/schedule.h @@ -33,6 +33,8 @@ #ifndef HUGO_SCHEDULE_H #define HUGO_SCHEDULE_H +#include "common/file.h" + namespace Hugo { #define SIGN(X) ((X < 0) ? -1 : 1) @@ -51,20 +53,21 @@ public: Scheduler(HugoEngine *vm); virtual ~Scheduler(); - virtual void insertAction(act *action) = 0; virtual void restoreEvents(Common::SeekableReadStream *f) = 0; virtual void runScheduler() = 0; virtual void saveEvents(Common::WriteStream *f) = 0; + void decodeString(char *line); + void freeActListArr(); void initEventQueue(); void insertActionList(uint16 actIndex); - void decodeString(char *line); - uint32 getWinTicks(); - uint32 getDosTicks(bool updateFl); - void waitForRefresh(void); - void processBonus(int bonusIndex); + void loadActListArr(Common::File &in); + void loadAlNewscrIndex(Common::File &in); void newScreen(int screenIndex); + void processBonus(int bonusIndex); + void processMaze(int x1, int x2, int y1, int y2); void restoreScreen(int screenIndex); + void waitForRefresh(void); protected: HugoEngine *_vm; @@ -74,16 +77,26 @@ protected: kSsBadSaveGame = 1 }; + uint16 _actListArrSize; + uint16 _alNewscrIndex; + event_t *_freeEvent; // Free list of event structures event_t *_headEvent; // Head of list (earliest time) event_t *_tailEvent; // Tail of list (latest time) - event_t _events[kMaxEvents]; // Statically declare event structures + event_t _events[kMaxEvents]; // Statically declare event structures + + act **_actListArr; virtual const char *getCypher() = 0; - virtual void delQueue(event_t *curEvent) = 0; virtual event_t *doAction(event_t *curEvent) = 0; + virtual void delQueue(event_t *curEvent) = 0; + virtual void insertAction(act *action) = 0; event_t *getQueue(); + + uint32 getDosTicks(bool updateFl); + uint32 getWinTicks(); + }; class Scheduler_v1d : public Scheduler { @@ -106,6 +119,7 @@ public: Scheduler_v2d(HugoEngine *vm); virtual ~Scheduler_v2d(); + virtual const char *getCypher(); virtual void insertAction(act *action); protected: virtual void delQueue(event_t *curEvent); diff --git a/engines/hugo/schedule_v1d.cpp b/engines/hugo/schedule_v1d.cpp index 09bfc2294b..b7ce263a27 100644 --- a/engines/hugo/schedule_v1d.cpp +++ b/engines/hugo/schedule_v1d.cpp @@ -53,13 +53,15 @@ Scheduler_v1d::~Scheduler_v1d() { } const char *Scheduler_v1d::getCypher() { - return "Copyright 1991, Gray Design Associates"; + return "Copyright (c) 1990, Gray Design Associates"; } -// Delete an event structure (i.e. return it to the free list) -// Note that event is assumed at head of queue (i.e. earliest). To delete -// an event from the middle of the queue, merely overwrite its action type -// to be ANULL +/** +* Delete an event structure (i.e. return it to the free list) +* Note that event is assumed at head of queue (i.e. earliest). To delete +* an event from the middle of the queue, merely overwrite its action type +* to be ANULL +*/ void Scheduler_v1d::delQueue(event_t *curEvent) { debugC(4, kDebugSchedule, "delQueue()"); @@ -77,8 +79,10 @@ void Scheduler_v1d::delQueue(event_t *curEvent) { _freeEvent = curEvent; } -// Insert the action pointed to by p into the timer event queue -// The queue goes from head (earliest) to tail (latest) timewise +/** +* Insert the action pointed to by p into the timer event queue +* The queue goes from head (earliest) to tail (latest) timewise +*/ void Scheduler_v1d::insertAction(act *action) { debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->a0.actType); @@ -121,10 +125,12 @@ void Scheduler_v1d::insertAction(act *action) { } } +/** +* This function performs the action in the event structure pointed to by p +* It dequeues the event and returns it to the free list. It returns a ptr +* to the next action in the list, except special case of NEW_SCREEN +*/ event_t *Scheduler_v1d::doAction(event_t *curEvent) { -// This function performs the action in the event structure pointed to by p -// It dequeues the event and returns it to the free list. It returns a ptr -// to the next action in the list, except special case of NEW_SCREEN debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->action->a0.actType); status_t &gameStatus = _vm->getGameStatus(); @@ -134,7 +140,6 @@ event_t *Scheduler_v1d::doAction(event_t *curEvent) { object_t *obj2; int dx, dy; event_t *wrkEvent; // Save ev_p->next_p for return -// event_t *saveEvent; // Used in DEL_EVENTS switch (action->a0.actType) { case ANULL: // Big NOP from DEL_EVENTS @@ -321,10 +326,12 @@ event_t *Scheduler_v1d::doAction(event_t *curEvent) { } } -// Write the event queue to the file with handle f -// Note that we convert all the event structure ptrs to indexes -// using -1 for NULL. We can't convert the action ptrs to indexes -// so we save address of first dummy action ptr to compare on restore. +/** +* Write the event queue to the file with handle f +* Note that we convert all the event structure ptrs to indexes +* using -1 for NULL. We can't convert the action ptrs to indexes +* so we save address of first dummy action ptr to compare on restore. +*/ void Scheduler_v1d::saveEvents(Common::WriteStream *f) { debugC(1, kDebugSchedule, "saveEvents()"); @@ -350,7 +357,9 @@ void Scheduler_v1d::saveEvents(Common::WriteStream *f) { f->write(saveEventArr, sizeof(saveEventArr)); } -// Restore the event list from file with handle f +/** +* Restore the event list from file with handle f +*/ void Scheduler_v1d::restoreEvents(Common::SeekableReadStream *f) { debugC(1, kDebugSchedule, "restoreEvents"); @@ -387,9 +396,11 @@ void Scheduler_v1d::restoreEvents(Common::SeekableReadStream *f) { } } -// This is the scheduler which runs every tick. It examines the event queue -// for any events whose time has come. It dequeues these events and performs -// the action associated with the event, returning it to the free queue +/** +* This is the scheduler which runs every tick. It examines the event queue +* for any events whose time has come. It dequeues these events and performs +* the action associated with the event, returning it to the free queue +*/ void Scheduler_v1d::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); diff --git a/engines/hugo/schedule_v1w.cpp b/engines/hugo/schedule_v1w.cpp index 34eff0447f..128d0687a7 100644 --- a/engines/hugo/schedule_v1w.cpp +++ b/engines/hugo/schedule_v1w.cpp @@ -53,10 +53,12 @@ Scheduler_v1w::Scheduler_v1w(HugoEngine *vm) : Scheduler_v3d(vm) { Scheduler_v1w::~Scheduler_v1w() { } +/** +* This function performs the action in the event structure pointed to by p +* It dequeues the event and returns it to the free list. It returns a ptr +* to the next action in the list, except special case of NEW_SCREEN +*/ event_t *Scheduler_v1w::doAction(event_t *curEvent) { -// This function performs the action in the event structure pointed to by p -// It dequeues the event and returns it to the free list. It returns a ptr -// to the next action in the list, except special case of NEW_SCREEN debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->action->a0.actType); status_t &gameStatus = _vm->getGameStatus(); @@ -351,10 +353,12 @@ event_t *Scheduler_v1w::doAction(event_t *curEvent) { } } -// Write the event queue to the file with handle f -// Note that we convert all the event structure ptrs to indexes -// using -1 for NULL. We can't convert the action ptrs to indexes -// so we save address of first dummy action ptr to compare on restore. +/** +* Write the event queue to the file with handle f +* Note that we convert all the event structure ptrs to indexes +* using -1 for NULL. We can't convert the action ptrs to indexes +* so we save address of first dummy action ptr to compare on restore. +*/ void Scheduler_v1w::saveEvents(Common::WriteStream *f) { debugC(1, kDebugSchedule, "saveEvents()"); @@ -380,7 +384,9 @@ void Scheduler_v1w::saveEvents(Common::WriteStream *f) { f->write(saveEventArr, sizeof(saveEventArr)); } -// Restore the event list from file with handle f +/** +* Restore the event list from file with handle f +*/ void Scheduler_v1w::restoreEvents(Common::SeekableReadStream *f) { debugC(1, kDebugSchedule, "restoreEvents"); @@ -417,6 +423,10 @@ void Scheduler_v1w::restoreEvents(Common::SeekableReadStream *f) { } } +/** +* Insert the action pointed to by p into the timer event queue +* The queue goes from head (earliest) to tail (latest) timewise +*/ void Scheduler_v1w::insertAction(act *action) { debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->a0.actType); @@ -465,9 +475,11 @@ void Scheduler_v1w::insertAction(act *action) { } } -// This is the scheduler which runs every tick. It examines the event queue -// for any events whose time has come. It dequeues these events and performs -// the action associated with the event, returning it to the free queue +/** +* This is the scheduler which runs every tick. It examines the event queue +* for any events whose time has come. It dequeues these events and performs +* the action associated with the event, returning it to the free queue +*/ void Scheduler_v1w::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); diff --git a/engines/hugo/schedule_v2d.cpp b/engines/hugo/schedule_v2d.cpp index 2735bc4cf4..22a79356bf 100644 --- a/engines/hugo/schedule_v2d.cpp +++ b/engines/hugo/schedule_v2d.cpp @@ -53,13 +53,19 @@ Scheduler_v2d::Scheduler_v2d(HugoEngine *vm) : Scheduler_v1d(vm) { Scheduler_v2d::~Scheduler_v2d() { } -// Delete an event structure (i.e. return it to the free list) -// Historical note: Originally event p was assumed to be at head of queue -// (i.e. earliest) since all events were deleted in order when proceeding to -// a new screen. To delete an event from the middle of the queue, the action -// was overwritten to be ANULL. With the advent of GLOBAL events, delQueue -// was modified to allow deletes anywhere in the list, and the DEL_EVENT -// action was modified to perform the actual delete. +const char *Scheduler_v2d::getCypher() { + return "Copyright 1991, Gray Design Associates"; +} + +/** +* Delete an event structure (i.e. return it to the free list) +* Historical note: Originally event p was assumed to be at head of queue +* (i.e. earliest) since all events were deleted in order when proceeding to +* a new screen. To delete an event from the middle of the queue, the action +* was overwritten to be ANULL. With the advent of GLOBAL events, delQueue +* was modified to allow deletes anywhere in the list, and the DEL_EVENT +* action was modified to perform the actual delete. +*/ void Scheduler_v2d::delQueue(event_t *curEvent) { debugC(4, kDebugSchedule, "delQueue()"); @@ -84,8 +90,10 @@ void Scheduler_v2d::delQueue(event_t *curEvent) { _freeEvent = curEvent; } -// Insert the action pointed to by p into the timer event queue -// The queue goes from head (earliest) to tail (latest) timewise +/** +* Insert the action pointed to by p into the timer event queue +* The queue goes from head (earliest) to tail (latest) timewise +*/ void Scheduler_v2d::insertAction(act *action) { debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->a0.actType); @@ -134,9 +142,11 @@ void Scheduler_v2d::insertAction(act *action) { } } -// This function performs the action in the event structure pointed to by p -// It dequeues the event and returns it to the free list. It returns a ptr -// to the next action in the list, except special case of NEW_SCREEN +/** +* This function performs the action in the event structure pointed to by p +* It dequeues the event and returns it to the free list. It returns a ptr +* to the next action in the list, except special case of NEW_SCREEN +*/ event_t *Scheduler_v2d::doAction(event_t *curEvent) { debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->action->a0.actType); diff --git a/engines/hugo/schedule_v3d.cpp b/engines/hugo/schedule_v3d.cpp index cc449ba8c4..fc37bd8b83 100644 --- a/engines/hugo/schedule_v3d.cpp +++ b/engines/hugo/schedule_v3d.cpp @@ -57,9 +57,11 @@ const char *Scheduler_v3d::getCypher() { return "Copyright 1992, Gray Design Associates"; } -// This function performs the action in the event structure pointed to by p -// It dequeues the event and returns it to the free list. It returns a ptr -// to the next action in the list, except special case of NEW_SCREEN +/** +* This function performs the action in the event structure pointed to by p +* It dequeues the event and returns it to the free list. It returns a ptr +* to the next action in the list, except special case of NEW_SCREEN +*/ event_t *Scheduler_v3d::doAction(event_t *curEvent) { debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->action->a0.actType); diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp index 2def4a4dba..a3e778e228 100644 --- a/engines/hugo/util.cpp +++ b/engines/hugo/util.cpp @@ -40,8 +40,10 @@ namespace Hugo { +/** + * Returns index (0 to 7) of first 1 in supplied byte, or 8 if not found + */ int Utils::firstBit(byte data) { -// Returns index (0 to 7) of first 1 in supplied byte, or 8 if not found if (!data) return 8; @@ -54,8 +56,10 @@ int Utils::firstBit(byte data) { return i; } +/** + * Returns index (0 to 7) of last 1 in supplied byte, or 8 if not found + */ int Utils::lastBit(byte data) { -// Returns index (0 to 7) of last 1 in supplied byte, or 8 if not found if (!data) return 8; @@ -68,8 +72,10 @@ int Utils::lastBit(byte data) { return i; } +/** + * Reverse the bit order in supplied byte + */ void Utils::reverseByte(byte *data) { -// Reverse the bit order in supplied byte byte maskIn = 0x80; byte maskOut = 0x01; byte result = 0; @@ -92,7 +98,7 @@ char *Utils::Box(box_t dismiss, const char *s, ...) { return 0; if (strlen(s) > MAX_STRLEN - 100) { // Test length - Warn("String too big:\n%s", s); + warning("String too big: '%s'", s); return 0; } @@ -129,20 +135,11 @@ char *Utils::Box(box_t dismiss, const char *s, ...) { return buffer; } -void Utils::Warn(const char *format, ...) { -// Warning handler. Print supplied message and continue -// Arguments are same as printf - char buffer[WARNLEN]; - va_list marker; - va_start(marker, format); - vsnprintf(buffer, WARNLEN, format, marker); - va_end(marker); - warning("Hugo warning: %s", buffer); -} - +/** + * Fatal error handler. Reset environment, print error and exit + * Arguments are same as printf + */ void Utils::Error(int error_type, const char *format, ...) { -// Fatal error handler. Reset environment, print error and exit -// Arguments are same as printf char buffer[ERRLEN + 1]; bool fatal = true; // Fatal error, else continue @@ -183,8 +180,10 @@ void Utils::Error(int error_type, const char *format, ...) { exit(1); } +/** + * Print options for user when dead + */ void Utils::gameOverMsg(void) { - // Print options for user when dead //MessageBox(hwnd, gameoverstring, "Be more careful next time!", MB_OK | MB_ICONINFORMATION); warning("STUB: Gameover_msg(): %s", HugoEngine::get()._textUtil[kGameOver]); } @@ -201,5 +200,4 @@ char *Utils::strlwr(char *buffer) { return result; } - } // End of namespace Hugo diff --git a/engines/hugo/util.h b/engines/hugo/util.h index 69428fb3bb..a3e206dba9 100644 --- a/engines/hugo/util.h +++ b/engines/hugo/util.h @@ -55,7 +55,6 @@ int lastBit(byte data); void gameOverMsg(); void reverseByte(byte *data); void Error(int code, const char *format, ...) GCC_PRINTF(2, 3); -void Warn(const char *format, ...) GCC_PRINTF(1, 2); char *Box(box_t, const char *, ...) GCC_PRINTF(2, 3); char *strlwr(char *buffer); diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index fc509700d7..d58494303c 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -53,6 +53,16 @@ Debugger::Debugger(KyraEngine_v1 *vm) DCmd_Register("settimercountdown", WRAP_METHOD(Debugger, cmd_setTimerCountdown)); } +void Debugger::preEnter() { + _vm->pauseEngine(true); + ::GUI::Debugger::preEnter(); +} + +void Debugger::postEnter() { + ::GUI::Debugger::postEnter(); + _vm->pauseEngine(false); +} + bool Debugger::cmd_setScreenDebug(int argc, const char **argv) { if (argc > 1) { if (scumm_stricmp(argv[1], "enable") == 0) @@ -201,14 +211,6 @@ Debugger_LoK::Debugger_LoK(KyraEngine_LoK *vm) DCmd_Register("birthstones", WRAP_METHOD(Debugger_LoK, cmd_listBirthstones)); } -void Debugger_LoK::preEnter() { - //_vm->midi.pause(1); -} - -void Debugger_LoK::postEnter() { - //_vm->midi.pause(0); -} - bool Debugger_LoK::cmd_enterRoom(int argc, const char **argv) { uint direction = 0; if (argc > 1) { @@ -331,7 +333,7 @@ bool Debugger_v2::cmd_enterScene(int argc, const char **argv) { return false; } - DebugPrintf("Syntax: %d <scenenum> <direction>\n", argv[0]); + DebugPrintf("Syntax: %s <scenenum> <direction>\n", argv[0]); return true; } diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h index c9cf6dba2a..dfc2a26aa2 100644 --- a/engines/kyra/debugger.h +++ b/engines/kyra/debugger.h @@ -41,6 +41,9 @@ public: virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ protected: + virtual void preEnter(); + virtual void postEnter(); + KyraEngine_v1 *_vm; bool cmd_setScreenDebug(int argc, const char **argv); @@ -62,9 +65,6 @@ public: protected: KyraEngine_LoK *_vm; - virtual void preEnter(); - virtual void postEnter(); - bool cmd_enterRoom(int argc, const char **argv); bool cmd_listScenes(int argc, const char **argv); bool cmd_giveItem(int argc, const char **argv); diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp index 445ea579a0..dff8759d55 100644 --- a/engines/kyra/resource_intern.cpp +++ b/engines/kyra/resource_intern.cpp @@ -102,7 +102,7 @@ int TlkArchive::listMembers(Common::ArchiveMemberList &list) { uint count = 0; for (; count < _entryCount; ++count) { - const Common::String name = Common::String::printf("%08u.AUD", _fileEntries[count * 2 + 0]); + const Common::String name = Common::String::format("%08u.AUD", _fileEntries[count * 2 + 0]); list.push_back(Common::ArchiveMemberList::value_type(new Common::GenericArchiveMember(name, this))); } diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index c9450e3f27..c5658c0445 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -230,7 +230,7 @@ const char *KyraEngine_v1::getSavegameFilename(int num) { Common::String KyraEngine_v1::getSavegameFilename(const Common::String &target, int num) { assert(num >= 0 && num <= 999); - return target + Common::String::printf(".%03d", num); + return target + Common::String::format(".%03d", num); } bool KyraEngine_v1::saveFileLoadable(int slot) { diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index edfa61e5b4..cf270942bf 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -209,7 +209,7 @@ bool StaticResource::tryKyraDatLoad() { return false; // load the ID map for our game - const Common::String filenamePattern = Common::String::printf("0%01X%01X%01X000%01X", game, platform, special, lang); + const Common::String filenamePattern = Common::String::format("0%01X%01X%01X000%01X", game, platform, special, lang); Common::SeekableReadStream *idMap = _vm->resource()->createReadStream(filenamePattern); if (!idMap) return false; @@ -328,7 +328,7 @@ bool StaticResource::prefetchId(int id) { ResData data; data.id = id; data.type = dDesc->_value.type; - Common::SeekableReadStream *fileStream = _vm->resource()->createReadStream(Common::String::printf("%08X", dDesc->_value.filename)); + Common::SeekableReadStream *fileStream = _vm->resource()->createReadStream(Common::String::format("%08X", dDesc->_value.filename)); if (!fileStream) return false; diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp index 4c8cb9bd17..8e90d93828 100644 --- a/engines/lastexpress/data/scene.cpp +++ b/engines/lastexpress/data/scene.cpp @@ -79,7 +79,7 @@ SceneHotspot *SceneHotspot::load(Common::SeekableReadStream *stream) { Common::String SceneHotspot::toString() const { Common::String output = ""; - output += Common::String::printf(" hotspot: scene=%d location=%02d action=%d param1=%02d param2=%02d param3=%02d cursor=%02d rect=(%d, %d)x(%d, %d)", + output += Common::String::format(" hotspot: scene=%d location=%02d action=%d param1=%02d param2=%02d param3=%02d cursor=%02d rect=(%d, %d)x(%d, %d)", scene, location, action, param1, param2, param3, cursor, rect.left, rect.top, rect.right, rect.bottom); return output; @@ -209,9 +209,9 @@ Common::Rect Scene::draw(Graphics::Surface *surface) { Common::String Scene::toString() { Common::String output = ""; - output += Common::String::printf("Scene: name=%s, sig=%02d, entityPosition=%d, location=%d\n", _name, _sig, entityPosition, location); - output += Common::String::printf(" car=%02d, position=%02d, type=%02d, param1=%02d\n", car, position, type, param1); - output += Common::String::printf(" param2=%02d, param3=%02d, hotspot=%d\n", param2, param3, _hotspot); + output += Common::String::format("Scene: name=%s, sig=%02d, entityPosition=%d, location=%d\n", _name, _sig, entityPosition, location); + output += Common::String::format(" car=%02d, position=%02d, type=%02d, param1=%02d\n", car, position, type, param1); + output += Common::String::format(" param2=%02d, param3=%02d, hotspot=%d\n", param2, param3, _hotspot); // Hotspots if (_hotspots.size() != 0) { diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index 35a87cf14b..50f0109a3f 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -343,7 +343,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) { AnimFrame *frame = sequence.getFrame((uint16)getNumber(argv[2])); if (!frame) { - DebugPrintf("Invalid frame index: %i\n", filename.c_str()); + DebugPrintf("Invalid frame index '%s'\n", argv[2]); resetCommand(); return true; } @@ -1012,7 +1012,7 @@ bool Debugger::cmdShow(int argc, const char **argv) { #define OUTPUT_DUMP(name, text) \ DebugPrintf(#name "\n"); \ DebugPrintf("--------------------------------------------------------------------\n\n"); \ - DebugPrintf(text); \ + DebugPrintf("%s", text); \ DebugPrintf("\n"); if (argc == 2) { @@ -1071,7 +1071,7 @@ bool Debugger::cmdEntity(int argc, const char **argv) { DebugPrintf("Entity %s\n", ENTITY_NAME(index)); DebugPrintf("--------------------------------------------------------------------\n\n"); - DebugPrintf(getEntities()->getData(index)->toString().c_str()); + DebugPrintf("%s", getEntities()->getData(index)->toString().c_str()); // The Player entity does not have any callback data if (index != kEntityPlayer) { diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 36d8ed4fe4..e9aff248e4 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -455,11 +455,11 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool) } if (params->param1) { - strcpy((char *)¶meters->seq2, Common::String::printf("%s%s", (char *)¶meters->seq1, "Gc").c_str()); + strcpy((char *)¶meters->seq2, Common::String::format("%s%s", (char *)¶meters->seq1, "Gc").c_str()); getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocation1, kCursorKeepValue, kCursorKeepValue); } else { - strcpy((char *)¶meters->seq2, Common::String::printf("%s%s", (char *)¶meters->seq1, "Ec").c_str()); + strcpy((char *)¶meters->seq2, Common::String::format("%s%s", (char *)¶meters->seq1, "Ec").c_str()); } setCallback(1); @@ -474,7 +474,7 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool) case 1: { getData()->location = kLocationOutsideCompartment; - Common::String sequence2 = Common::String::printf("%s%s", (char *)¶meters->seq2, "Pc"); + Common::String sequence2 = Common::String::format("%s%s", (char *)¶meters->seq2, "Pc"); strcpy((char *)¶meters->seq2, (char *)¶meters->seq1); getEntities()->drawSequenceLeft(kEntityAugust, sequence2.c_str()); @@ -493,7 +493,7 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool) case 2: case 3: getSavePoints()->push(kEntityAugust, kEntityMertens, kAction269436673); - strcpy((char *)¶meters->seq2, Common::String::printf("%s%s", (char *)¶meters->seq1, "Qc").c_str()); + strcpy((char *)¶meters->seq2, Common::String::format("%s%s", (char *)¶meters->seq1, "Qc").c_str()); getEntities()->drawSequenceLeft(kEntityAugust, (char *)¶meters->seq2); break; diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 3e12df8612..33ca244c5e 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -79,7 +79,7 @@ public: } Common::String toString() { - return Common::String::printf("IIII: %d %d %d %d %d %d %d %d\n", param1, param2, param3, param4, param5, param6, param7, param8); + return Common::String::format("IIII: %d %d %d %d %d %d %d %d\n", param1, param2, param3, param4, param5, param6, param7, param8); } void update(uint32 index) { @@ -128,7 +128,7 @@ public: } Common::String toString() { - return Common::String::printf("SIII: %s %d %d %d %d %d\n", seq, param4, param5, param6, param7, param8); + return Common::String::format("SIII: %s %d %d %d %d %d\n", seq, param4, param5, param6, param7, param8); } void update(uint32 index) { @@ -168,7 +168,7 @@ public: } Common::String toString() { - return Common::String::printf("SIIS: %s %d %d %s\n", seq1, param4, param5, seq2); + return Common::String::format("SIIS: %s %d %d %s\n", seq1, param4, param5, seq2); } void update(uint32 index) { @@ -203,7 +203,7 @@ public: } Common::String toString() { - return Common::String::printf("ISSI: %d %s %s %d\n", param1, seq1, seq2, param8); + return Common::String::format("ISSI: %d %s %s %d\n", param1, seq1, seq2, param8); } void update(uint32 index) { @@ -242,7 +242,7 @@ public: } Common::String toString() { - return Common::String::printf("ISII: %d %s %d %d %d %d\n", param1, seq, param5, param6, param7, param8); + return Common::String::format("ISII: %d %s %d %d %d %d\n", param1, seq, param5, param6, param7, param8); } void update(uint32 index) { @@ -282,7 +282,7 @@ public: } Common::String toString() { - return Common::String::printf("SSII: %s %s %d %d\n", seq1, seq2, param7, param8); + return Common::String::format("SSII: %s %s %d %d\n", seq1, seq2, param7, param8); } void update(uint32 index) { @@ -315,7 +315,7 @@ public: } Common::String toString() { - return Common::String::printf("SSS: %s %s %s\n", seq1, seq2, seq3); + return Common::String::format("SSS: %s %s %s\n", seq1, seq2, seq3); } void update(uint32) { @@ -343,7 +343,7 @@ public: } Common::String toString() { - return Common::String::printf("IISS: %d %d %s %s\n", param1, param2, seq1, seq2); + return Common::String::format("IISS: %d %d %s %s\n", param1, param2, seq1, seq2); } void update(uint32 index) { @@ -382,7 +382,7 @@ public: } Common::String toString() { - return Common::String::printf("IISI: %d %d %s %d %d %d\n", param1, param2, seq, param6, param7, param8); + return Common::String::format("IISI: %d %d %s %d %d %d\n", param1, param2, seq, param6, param7, param8); } void update(uint32 index) { @@ -426,7 +426,7 @@ public: } Common::String toString() { - return Common::String::printf("IIIS: %d %d %d %s %d %d\n", param1, param2, param3, seq, param7, param8); + return Common::String::format("IIIS: %d %d %d %s %d %d\n", param1, param2, param3, seq, param7, param8); } void update(uint32 index) { @@ -579,20 +579,20 @@ public: Common::String toString() { Common::String str = ""; - str += Common::String::printf("Entity position: %d - Location: %d - Car: %d\n", entityPosition, location, car); - str += Common::String::printf("Entity: %d - Item: %d - Direction: %d\n", entity, inventoryItem, direction); - str += Common::String::printf("Clothes: %d - Position: %d - Direction switch: %d\n", clothes, position, directionSwitch); + str += Common::String::format("Entity position: %d - Location: %d - Car: %d\n", entityPosition, location, car); + str += Common::String::format("Entity: %d - Item: %d - Direction: %d\n", entity, inventoryItem, direction); + str += Common::String::format("Clothes: %d - Position: %d - Direction switch: %d\n", clothes, position, directionSwitch); str += "\n"; - str += Common::String::printf("field_497: %02d - field_49B: %i - field_4A1: %i\n", field_497, field_49B, field_4A1); - str += Common::String::printf("field_4A9: %02d - field_4AA: %i - Car 2: %d\n", field_4A9, field_4AA, car2); + str += Common::String::format("field_497: %02d - field_49B: %i - field_4A1: %i\n", field_497, field_49B, field_4A1); + str += Common::String::format("field_4A9: %02d - field_4AA: %i - Car 2: %d\n", field_4A9, field_4AA, car2); str += "\n"; str += "Sequence: " + sequenceName + " - Sequence 2: " + sequenceName2 + "\n"; str += "Sequence prefix: " + sequenceNamePrefix + " - Sequence copy: " + sequenceNameCopy + "\n"; - str += Common::String::printf("Current frame: %i - Current frame 2: %i - Process entity: %d\n", currentFrame, currentFrame2, doProcessEntity); + str += Common::String::format("Current frame: %i - Current frame 2: %i - Process entity: %d\n", currentFrame, currentFrame2, doProcessEntity); str += "\n"; - str += Common::String::printf("Current call: %d\n", currentCall); - str += Common::String::printf("Functions: %d %d %d %d %d %d %d %d\n", callbacks[0], callbacks[1], callbacks[2], callbacks[3], callbacks[4], callbacks[5], callbacks[6], callbacks[7]); - str += Common::String::printf("Callbacks: %d %d %d %d %d %d %d %d\n", callbacks[8], callbacks[9], callbacks[10], callbacks[11], callbacks[12], callbacks[13], callbacks[14], callbacks[15]); + str += Common::String::format("Current call: %d\n", currentCall); + str += Common::String::format("Functions: %d %d %d %d %d %d %d %d\n", callbacks[0], callbacks[1], callbacks[2], callbacks[3], callbacks[4], callbacks[5], callbacks[6], callbacks[7]); + str += Common::String::format("Callbacks: %d %d %d %d %d %d %d %d\n", callbacks[8], callbacks[9], callbacks[10], callbacks[11], callbacks[12], callbacks[13], callbacks[14], callbacks[15]); return str; } diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 84f406931d..8058d22f05 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -454,7 +454,7 @@ IMPLEMENT_ACTION(savePoint) IMPLEMENT_ACTION(playSound) // Check that the file is not already buffered - if (hotspot.param2 || !getSound()->isBuffered(Common::String::printf("LIB%03d", hotspot.param1), true)) + if (hotspot.param2 || !getSound()->isBuffered(Common::String::format("LIB%03d", hotspot.param1), true)) getSound()->playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2); return kSceneInvalid; @@ -464,7 +464,7 @@ IMPLEMENT_ACTION(playSound) // Action 4 IMPLEMENT_ACTION(playMusic) // Check that the file is not already buffered - Common::String filename = Common::String::printf("MUS%03d", hotspot.param1); + Common::String filename = Common::String::format("MUS%03d", hotspot.param1); if (!getSound()->isBuffered(filename) && (hotspot.param1 != 50 || getProgress().chapter == kChapter5)) getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault, hotspot.param2); @@ -1182,7 +1182,7 @@ IMPLEMENT_ACTION(29) getProgress().field_C = 1; getSound()->playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2); - Common::String filename = Common::String::printf("MUS%03d", hotspot.param3); + Common::String filename = Common::String::format("MUS%03d", hotspot.param3); if (!getSound()->isBuffered(filename)) getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault); @@ -1407,7 +1407,7 @@ IMPLEMENT_ACTION(playMusicChapter) } if (id) { - Common::String filename = Common::String::printf("MUS%03d", id); + Common::String filename = Common::String::format("MUS%03d", id); if (!getSound()->isBuffered(filename)) getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault); @@ -1439,7 +1439,7 @@ IMPLEMENT_ACTION(playMusicChapterSetupTrain) break; } - Common::String filename = Common::String::printf("MUS%03d", hotspot.param1); + Common::String filename = Common::String::format("MUS%03d", hotspot.param1); if (!getSound()->isBuffered(filename) && hotspot.param3 & id) { getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault); diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 40fae3ae9b..adba0f1b4c 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -1532,7 +1532,7 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com case 1: if (data->entityPosition < kPosition_2587) - sequence1 = Common::String::printf("%02d%01d-01u.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-01u.seq", index, data->clothes); break; case 2: @@ -1554,22 +1554,22 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com break; if (data->entityPosition >= kPosition_8513) { - sequence1 = Common::String::printf("%02d%01d-%02deu.seq", index, data->clothes, position); + sequence1 = Common::String::format("%02d%01d-%02deu.seq", index, data->clothes, position); } else { - sequence1 = Common::String::printf("%02d%01d-03u.seq", index, data->clothes); - sequence2 = Common::String::printf("%02d%01d-%02deu.seq", index, data->clothes, position); + sequence1 = Common::String::format("%02d%01d-03u.seq", index, data->clothes); + sequence2 = Common::String::format("%02d%01d-%02deu.seq", index, data->clothes, position); data->field_4A9 = true; } break; case 18: if (data->entityPosition < kPosition_9270) - sequence1 = Common::String::printf("%02d%01d-18u.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-18u.seq", index, data->clothes); break; case 22: if (getData(kEntityPlayer)->entityPosition > data->entityPosition) - sequence1 = Common::String::printf("%02d%01d-22u.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-22u.seq", index, data->clothes); break; case 23: @@ -1592,18 +1592,18 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com break; if (data->entityPosition >= kPosition_2087) { - sequence1 = Common::String::printf("%02d%01d-38u.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-38u.seq", index, data->clothes); data->field_4A9 = true; } else { - sequence1 = Common::String::printf("%02d%01d-%02deu.seq", index, data->clothes, position); - sequence2 = Common::String::printf("%02d%01d-38u.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-%02deu.seq", index, data->clothes, position); + sequence2 = Common::String::format("%02d%01d-38u.seq", index, data->clothes); data->field_4AA = true; } break; case 40: if (getData(kEntityPlayer)->entityPosition > data->entityPosition) - sequence1 = Common::String::printf("%02d%01d-40u.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-40u.seq", index, data->clothes); break; } break; @@ -1615,7 +1615,7 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com case 1: if (getData(kEntityPlayer)->entityPosition < data->entityPosition) - sequence1 = Common::String::printf("%02d%01d-01d.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-01d.seq", index, data->clothes); break; case 2: @@ -1637,23 +1637,23 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com break; if (data->entityPosition <= kPosition_8513) { - sequence1 = Common::String::printf("%02d%01d-03d.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-03d.seq", index, data->clothes); data->field_4A9 = true; } else { - sequence1 = Common::String::printf("%02d%01d-%02ded.seq", index, data->clothes, position); - sequence2 = Common::String::printf("%02d%01d-03d.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-%02ded.seq", index, data->clothes, position); + sequence2 = Common::String::format("%02d%01d-03d.seq", index, data->clothes); data->field_4AA = true; } break; case 18: if (getData(kEntityPlayer)->entityPosition < data->entityPosition) - sequence1 = Common::String::printf("%02d%01d-18d.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-18d.seq", index, data->clothes); break; case 22: if (data->entityPosition > kPosition_850) - sequence1 = Common::String::printf("%02d%01d-22d.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-22d.seq", index, data->clothes); break; case 23: @@ -1676,17 +1676,17 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com break; if (data->entityPosition <= kPosition_2087) { - sequence1 = Common::String::printf("%02d%01d-%02ded.seq", index, data->clothes, position); + sequence1 = Common::String::format("%02d%01d-%02ded.seq", index, data->clothes, position); } else { - sequence1 = Common::String::printf("%02d%01d-38d.seq", index, data->clothes); - sequence2 = Common::String::printf("%02d%01d-%02ded.seq", index, data->clothes, position); + sequence1 = Common::String::format("%02d%01d-38d.seq", index, data->clothes); + sequence2 = Common::String::format("%02d%01d-%02ded.seq", index, data->clothes, position); data->field_4A9 = true; } break; case 40: if (getData(kEntityPlayer)->entityPosition > kPosition_8013) - sequence1 = Common::String::printf("%02d%01d-40d.seq", index, data->clothes); + sequence1 = Common::String::format("%02d%01d-40d.seq", index, data->clothes); break; } break; @@ -1694,7 +1694,7 @@ void Entities::getSequenceName(EntityIndex index, EntityDirection direction, Com // First part of sequence is already set case kDirectionLeft: case kDirectionRight: - sequence1 = Common::String::printf("%s%02d.seq", data->sequenceNamePrefix.c_str(), position); + sequence1 = Common::String::format("%s%02d.seq", data->sequenceNamePrefix.c_str(), position); break; } } diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index 0223176cb6..ae9aca56b6 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -422,7 +422,7 @@ Common::String Inventory::toString() { Common::String ret = ""; for (int i = 0; i < kPortraitOriginal; i++) - ret += Common::String::printf("%d : %s\n", i, _entries[i].toString().c_str()); + ret += Common::String::format("%d : %s\n", i, _entries[i].toString().c_str()); return ret; } diff --git a/engines/lastexpress/game/inventory.h b/engines/lastexpress/game/inventory.h index af3478bfae..bae6c8d261 100644 --- a/engines/lastexpress/game/inventory.h +++ b/engines/lastexpress/game/inventory.h @@ -76,7 +76,7 @@ public: } Common::String toString() { - return Common::String::printf("{ %d - %d - %d - %d - %d - %d - %d }", cursor, scene, field_2, isSelectable, isPresent, manualSelect, location); + return Common::String::format("{ %d - %d - %d - %d - %d - %d - %d }", cursor, scene, field_2, isSelectable, isPresent, manualSelect, location); } void saveLoadWithSerializer(Common::Serializer &s) { diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp index f0e81781b6..4f296debcb 100644 --- a/engines/lastexpress/game/object.cpp +++ b/engines/lastexpress/game/object.cpp @@ -35,7 +35,7 @@ namespace LastExpress { Common::String Objects::Object::toString() { - return Common::String::printf("{ %s - %d - %d - %d - %d }", ENTITY_NAME(entity), location, cursor, cursor2, location2); + return Common::String::format("{ %s - %d - %d - %d - %d }", ENTITY_NAME(entity), location, cursor, cursor2, location2); } Objects::Objects(LastExpressEngine *engine) : _engine(engine) {} @@ -101,7 +101,7 @@ Common::String Objects::toString() { Common::String ret = ""; for (int i = 0; i < ARRAYSIZE(_objects); i++) - ret += Common::String::printf("%d : %s\n", i, _objects[i].toString().c_str()); + ret += Common::String::format("%d : %s\n", i, _objects[i].toString().c_str()); return ret; } diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h index 6b2c12751d..ca507ab8ab 100644 --- a/engines/lastexpress/game/savepoint.h +++ b/engines/lastexpress/game/savepoint.h @@ -73,7 +73,7 @@ struct SavePoint { } Common::String toString() { - return Common::String::printf("{ %s - %d - %s - %s }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param.charValue); + return Common::String::format("{ %s - %d - %s - %s }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param.charValue); } }; @@ -97,7 +97,7 @@ public: } Common::String toString() { - return Common::String::printf(" { %s - %d - %s - %d }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param); + return Common::String::format(" { %s - %d - %s - %d }", ENTITY_NAME(entity1), action, ENTITY_NAME(entity2), param); } }; diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp index 7fd0a3f0ac..cf50d3e425 100644 --- a/engines/lastexpress/game/scenes.cpp +++ b/engines/lastexpress/game/scenes.cpp @@ -78,7 +78,7 @@ void SceneManager::loadSceneDataFile(ArchiveIndex archive) { case kArchiveCd1: case kArchiveCd2: case kArchiveCd3: - if (!_sceneLoader->load(getArchive(Common::String::printf("CD%iTRAIN.DAT", archive)))) + if (!_sceneLoader->load(getArchive(Common::String::format("CD%iTRAIN.DAT", archive)))) error("SceneManager::loadSceneDataFile: cannot load data file CD%iTRAIN.DAT", archive); break; @@ -586,7 +586,7 @@ void SceneManager::updateDoorsAndClock() { // Load door sequence Scene *scene = getScenes()->get(getState()->scene); - Common::String name = Common::String::printf("633X%c-%02d.seq", (index - firstIndex) + 65, scene->position); + Common::String name = Common::String::format("633X%c-%02d.seq", (index - firstIndex) + 65, scene->position); Sequence *sequence = loadSequence1(name, 255); // If the sequence doesn't exists, skip diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h index 135ee6bb4e..da81794ce1 100644 --- a/engines/lastexpress/game/state.h +++ b/engines/lastexpress/game/state.h @@ -466,7 +466,7 @@ public: for (uint i = 0; i < 128; i++) { Common::String name = ""; uint val = getValueName(i, &name); - ret += Common::String::printf("(%03d) %s = %d\n", i, name.c_str(), val); + ret += Common::String::format("(%03d) %s = %d\n", i, name.c_str(), val); } return ret; @@ -527,9 +527,9 @@ public: uint8 minutes = 0; getHourMinutes(time, &hours, &minutes); - ret += Common::String::printf("Time: %d (%d:%d) - Time delta: %d - Ticks: %d\n", time, hours, minutes, timeDelta, timeTicks); - ret += Common::String::printf("Brightness: %d - Volume: %d - UseBackup: %d\n", brightness, volume, sceneUseBackup); - ret += Common::String::printf("Scene: %d - Scene backup: %d - Scene backup 2: %d\n", scene, sceneBackup, sceneBackup2); + ret += Common::String::format("Time: %d (%d:%d) - Time delta: %d - Ticks: %d\n", time, hours, minutes, timeDelta, timeTicks); + ret += Common::String::format("Brightness: %d - Volume: %d - UseBackup: %d\n", brightness, volume, sceneUseBackup); + ret += Common::String::format("Scene: %d - Scene backup: %d - Scene backup 2: %d\n", scene, sceneBackup, sceneBackup2); return ret; } @@ -598,11 +598,11 @@ public: Common::String toString() { Common::String ret = ""; - ret += Common::String::printf("Unknown: 0:%02d - 3:%02d - 4:%02d - 5:%02d\n", flag_0, flag_3, flag_4, flag_5); - ret += Common::String::printf("FrameInterval: %02d - ShouldRedraw:%02d - ShouldDrawEggOrHourGlass:%02d\n", frameInterval, shouldRedraw, shouldDrawEggOrHourGlass); - ret += Common::String::printf("IsGameRunning: %02d\n", isGameRunning); - ret += Common::String::printf("Mouse: RightClick:%02d - LeftClick:%02d\n", mouseRightClick, mouseLeftClick); - ret += Common::String::printf("Entities: 0:%02d - 1:%02d\n", flag_entities_0, flag_entities_1); + ret += Common::String::format("Unknown: 0:%02d - 3:%02d - 4:%02d - 5:%02d\n", flag_0, flag_3, flag_4, flag_5); + ret += Common::String::format("FrameInterval: %02d - ShouldRedraw:%02d - ShouldDrawEggOrHourGlass:%02d\n", frameInterval, shouldRedraw, shouldDrawEggOrHourGlass); + ret += Common::String::format("IsGameRunning: %02d\n", isGameRunning); + ret += Common::String::format("Mouse: RightClick:%02d - LeftClick:%02d\n", mouseRightClick, mouseLeftClick); + ret += Common::String::format("Entities: 0:%02d - 1:%02d\n", flag_entities_0, flag_entities_1); return ret; } diff --git a/engines/lastexpress/helpers.h b/engines/lastexpress/helpers.h index eb54a1a3ce..fa8eeb25e5 100644 --- a/engines/lastexpress/helpers.h +++ b/engines/lastexpress/helpers.h @@ -94,7 +94,7 @@ extern const char *g_actionNames[]; extern const char *g_directionNames[]; extern const char *g_entityNames[]; -#define ACTION_NAME(action) (action > 18 ? Common::String::printf("%d", action).c_str() : g_actionNames[action]) +#define ACTION_NAME(action) (action > 18 ? Common::String::format("%d", action).c_str() : g_actionNames[action]) #define DIRECTION_NAME(direction) (direction >= 6 ? "INVALID" : g_directionNames[direction]) #define ENTITY_NAME(index) (index >= 40 ? "INVALID" : g_entityNames[index]) diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp index 5fbe124919..9ce6331db9 100644 --- a/engines/lure/debugger.cpp +++ b/engines/lure/debugger.cpp @@ -23,7 +23,6 @@ * */ - #include "common/config-manager.h" #include "common/endian.h" #include "lure/luredefs.h" diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 4342a1d6ad..90c2b67b85 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -33,8 +33,6 @@ namespace Lure { -using namespace Common; - static Resources *int_resources = NULL; Resources &Resources::getReference() { diff --git a/engines/m4/assets.cpp b/engines/m4/assets.cpp index 23122eb960..07cbff5bf1 100644 --- a/engines/m4/assets.cpp +++ b/engines/m4/assets.cpp @@ -147,9 +147,9 @@ void SpriteAsset::loadM4SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream uint32 header = _stream->readUint32LE(); if (header == HEAD_M4SS) { - printf("LE-encoded sprite\n"); + debugC(kDebugGraphics, "LE-encoded sprite\n"); } else { - printf("BE-encoded sprite\n"); + debugC(kDebugGraphics, "BE-encoded sprite\n"); isBigEndian = true; } @@ -163,7 +163,7 @@ void SpriteAsset::loadM4SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream _stream->skip(6 * 4); _frameCount = (!isBigEndian) ? _stream->readUint32LE() : _stream->readUint32BE(); - printf("SpriteAsset::SpriteAsset() srcSize = %d; frameRate = %04X; pixelSpeed = %04X; maxWidth = %d; maxHeight = %d; frameCount = %d\n", _srcSize, _frameRate, _pixelSpeed, _maxWidth, _maxHeight, _frameCount); + debugC(kDebugGraphics, "SpriteAsset::SpriteAsset() srcSize = %d; frameRate = %04X; pixelSpeed = %04X; maxWidth = %d; maxHeight = %d; frameCount = %d\n", _srcSize, _frameRate, _pixelSpeed, _maxWidth, _maxHeight, _frameCount); for (int curFrame = 0; curFrame < _frameCount; curFrame++) { frameOffset = (!isBigEndian) ? _stream->readUint32LE() : _stream->readUint32BE(); @@ -345,7 +345,7 @@ int32 SpriteAsset::parseSprite(bool isBigEndian) { if (chunkType == CELS___SS) { chunkSize = (!isBigEndian) ? _stream->readUint32LE() : _stream->readUint32BE(); } else { - warning("SpriteAsset::parseSprite() Expected chunk type %08X, got %08X", CELS___SS, chunkType); + debugC(kDebugGraphics, "SpriteAsset::parseSprite() Expected chunk type %08X, got %08X", CELS___SS, chunkType); } return chunkSize; @@ -362,14 +362,14 @@ void SpriteAsset::loadFrameHeader(SpriteAssetFrame &frameHeader, bool isBigEndia frameHeader.comp = (!isBigEndian) ? _stream->readUint32LE() : _stream->readUint32BE(); frameHeader.frame = NULL; _stream->seek(8 * 4, SEEK_CUR); - //printf("SpriteAsset::loadFrameHeader() stream = %d; x = %d; y = %d; w = %d; h = %d; comp = %d\n", frameHeader.stream, frameHeader.x, frameHeader.y, frameHeader.w, frameHeader.h, frameHeader.comp); + //debugC(kDebugGraphics, "SpriteAsset::loadFrameHeader() stream = %d; x = %d; y = %d; w = %d; h = %d; comp = %d\n", frameHeader.stream, frameHeader.x, frameHeader.y, frameHeader.w, frameHeader.h, frameHeader.comp); } M4Sprite *SpriteAsset::getFrame(int frameIndex) { if ((uint)frameIndex < _frames.size()) { return _frames[frameIndex].frame; } else { - warning("SpriteAsset::getFrame: Invalid frame %d, out of %d", frameIndex, _frames.size()); + debugC(kDebugGraphics, "SpriteAsset::getFrame: Invalid frame %d, out of %d", frameIndex, _frames.size()); return _frames[_frames.size() - 1].frame; } } @@ -486,7 +486,7 @@ bool AssetManager::clearAssets(AssetType assetType, int32 minHash, int32 maxHash bool AssetManager::loadAsset(const char *assetName, RGB8 *palette) { - printf("AssetManager::loadAsset() %s\n", assetName); + debugC(kDebugGraphics, "AssetManager::loadAsset() %s\n", assetName); // TODO, better use MemoryReadStreamEndian? //convertAssetToLE(assetData, assetSize); @@ -500,34 +500,34 @@ bool AssetManager::loadAsset(const char *assetName, RGB8 *palette) { chunkSize = assetS->readUint32LE() - 12; // sub 12 for the chunk header chunkHash = assetS->readUint32LE(); - printf("hash = %d\n", chunkHash); + debugC(kDebugGraphics, "hash = %d\n", chunkHash); // Until loading code is complete, so that chunks not fully read are skipped correctly uint32 nextOfs = assetS->pos() + chunkSize; switch (chunkType) { case CHUNK_MACH: - printf("MACH\n"); + debugC(kDebugGraphics, "MACH\n"); clearAssets(kAssetTypeMACH, chunkHash, chunkHash); _MACH[chunkHash] = new MachineAsset(_vm, assetS, chunkSize, assetName); break; case CHUNK_SEQU: - printf("SEQU\n"); + debugC(kDebugGraphics, "SEQU\n"); clearAssets(kAssetTypeSEQU, chunkHash, chunkHash); _SEQU[chunkHash] = new SequenceAsset(_vm, assetS, chunkSize, assetName); break; case CHUNK_DATA: - printf("DATA\n"); + debugC(kDebugGraphics, "DATA\n"); clearAssets(kAssetTypeDATA, chunkHash, chunkHash); _DATA[chunkHash] = new DataAsset(_vm, assetS, chunkSize, assetName); break; case CHUNK_CELS: - printf("CELS\n"); + debugC(kDebugGraphics, "CELS\n"); clearAssets(kAssetTypeCELS, chunkHash, chunkHash); _CELS[chunkHash] = new SpriteAsset(_vm, assetS, chunkSize, assetName); break; default: - printf("AssetManager::loadAsset() Unknown chunk type %08X\n", chunkType); + debugC(kDebugGraphics, "AssetManager::loadAsset() Unknown chunk type %08X\n", chunkType); } // Until loading code is complete (see above) @@ -568,7 +568,7 @@ int32 AssetManager::addSpriteAsset(const char *assetName, int32 hash, RGB8 *pale if (!alreadyLoaded) { - printf("AssetManager::addSpriteAsset() asset %s not loaded, loading into %d\n", assetName, hash); + debugC(kDebugGraphics, "AssetManager::addSpriteAsset() asset %s not loaded, loading into %d\n", assetName, hash); clearAssets(kAssetTypeCELS, hash, hash); @@ -578,7 +578,7 @@ int32 AssetManager::addSpriteAsset(const char *assetName, int32 hash, RGB8 *pale } else { - printf("AssetManager::addSpriteAsset() asset %s already loaded in %d\n", assetName, hash); + debugC(kDebugGraphics, "AssetManager::addSpriteAsset() asset %s already loaded in %d\n", assetName, hash); /* TODO/FIXME if (_CELS[hash].palOffset >= 0 && palette) diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp index 32ccdab787..88b4240901 100644 --- a/engines/m4/console.cpp +++ b/engines/m4/console.cpp @@ -123,7 +123,7 @@ bool Console::cmdPlaySound(int argc, const char **argv) { bool Console::cmdPlayDSRSound(int argc, const char **argv) { if (argc != 2 && argc != 3) { DebugPrintf("Usage: %s <sound index> <DSR file>\n", argv[0]); - DebugPrintf("The DSR file parameter is optional, and specifies which DSR to load\n", argv[0]); + DebugPrintf("The DSR file parameter is optional, and specifies which DSR to load\n"); } else { if (argc == 3) _vm->_sound->loadDSRFile(argv[2]); diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp index 6a11c328ff..0e10e5e89d 100644 --- a/engines/m4/converse.cpp +++ b/engines/m4/converse.cpp @@ -118,7 +118,7 @@ void ConversationView::setNode(int32 nodeIndex) { _activeItems.push_back(node->entries[i]); if (node->entries[i]->autoSelect || strlen(node->entries[i]->text) == 0) { - //printf("Auto selecting entry %i of node %i\n", i, nodeIndex); + //warning(kDebugConversations, "Auto selecting entry %i of node %i\n", i, nodeIndex); selectEntry(i); return; } @@ -134,11 +134,11 @@ void ConversationView::setNode(int32 nodeIndex) { // Fallthrough if (node->fallthroughMinEntries >= 0 && node->fallthroughOffset >= 0) { - //printf("Current node falls through node at offset %i when entries are less or equal than %i\n", + //warning(kDebugConversations, "Current node falls through node at offset %i when entries are less or equal than %i\n", // node->fallthroughOffset, node->fallthroughMinEntries); if (_activeItems.size() <= (uint32)node->fallthroughMinEntries) { const EntryInfo *entryInfo = _m4Vm->_converse->getEntryInfo(node->fallthroughOffset); - //printf("Entries are less than or equal to %i, falling through to node at offset %i, index %i\n", + //warning(kDebugConversations, "Entries are less than or equal to %i, falling through to node at offset %i, index %i\n", // node->fallthroughMinEntries, node->fallthroughOffset, entryInfo->nodeIndex); setNode(entryInfo->nodeIndex); return; @@ -227,10 +227,10 @@ void ConversationView::selectEntry(int entryIndex) { // Hide selected entry, unless it has a persistent flag set if (!(_activeItems[entryIndex]->flags & kEntryPersists)) { - //printf("Hiding selected entry\n"); + //debugCN(kDebugConversations, "Hiding selected entry\n"); _m4Vm->_converse->getNode(_currentNodeIndex)->entries[entryIndex]->visible = false; } else { - //printf("Selected entry is persistent, not hiding it\n"); + //debugCN(kDebugConversations, "Selected entry is persistent, not hiding it\n"); } } @@ -286,7 +286,7 @@ void ConversationView::playNextReply() { } } else { int selectedWeight = _vm->_random->getRandomNumber(currentEntry->totalWeight - 1) + 1; - //printf("Selected weight: %i\n", selectedWeight); + //debugCN(kDebugConversations, "Selected weight: %i\n", selectedWeight); int previousWeight = 1; int currentWeight = 0; @@ -313,7 +313,7 @@ void ConversationView::playNextReply() { // If we reached here, there are no more replies, so perform the active entry's actions - //printf("Current selection does %i actions\n", _activeItems[entryIndex]->actions.size()); + //debugCN(kDebugConversations, "Current selection does %i actions\n", _activeItems[entryIndex]->actions.size()); for (uint32 i = 0; i < _activeItems[_highlightedIndex]->actions.size(); i++) { if (!_m4Vm->_converse->performAction(_activeItems[_highlightedIndex]->actions[i])) break; @@ -399,30 +399,30 @@ void Converse::loadConversation(const char *convName) { return; } size = convS->readUint32LE(); // is this used at all? - if (debugFlag) printf("Conv chunk size (external header): %i\n", size); + if (debugFlag) debugCN(kDebugConversations, "Conv chunk size (external header): %i\n", size); // Conversation name, which is the conversation file's name // without the extension convS->read(buffer, 8); - if (debugFlag) printf("Conversation name: %s\n", buffer); + if (debugFlag) debugCN(kDebugConversations, "Conversation name: %s\n", buffer); while (true) { chunkPos = convS->pos(); chunk = convS->readUint32LE(); // read chunk if (convS->eos()) break; - if (debugFlag) printf("***** Pos: %i -> ", chunkPos); + if (debugFlag) debugC(kDebugConversations, "***** Pos: %i -> ", chunkPos); switch (chunk) { case CHUNK_DECL: // Declare - if (debugFlag) printf("DECL chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "DECL chunk\n"); data = convS->readUint32LE(); - if (debugFlag) printf("Tag: %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "Tag: %i\n", data); if (data > 0) warning("Tag > 0 in DECL chunk, value is: %i", data); // TODO val = convS->readUint32LE(); - if (debugFlag) printf("Value: %i\n", val); + if (debugFlag) debugCN(kDebugConversations, "Value: %i\n", val); data = convS->readUint32LE(); - if (debugFlag) printf("Flags: %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "Flags: %i\n", data); if (data > 0) warning("Flags != 0 in DECL chunk, value is %i", data); // TODO setValue(chunkPos, val); @@ -437,23 +437,23 @@ void Converse::loadConversation(const char *convName) { curEntry->fallthroughMinEntries = -1; curEntry->fallthroughOffset = -1; if (chunk == CHUNK_NODE) { - if (debugFlag) printf("NODE chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "NODE chunk\n"); } else { - if (debugFlag) printf("LNOD chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "LNOD chunk\n"); } curNode = convS->readUint32LE(); - if (debugFlag) printf("Node number: %i\n", curNode); + if (debugFlag) debugCN(kDebugConversations, "Node number: %i\n", curNode); data = convS->readUint32LE(); - if (debugFlag) printf("Tag: %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "Tag: %i\n", data); if (chunk == CHUNK_LNOD) { autoSelectIndex = convS->readUint32LE(); - if (debugFlag) printf("Autoselect entry number: %i\n", autoSelectIndex); + if (debugFlag) debugCN(kDebugConversations, "Autoselect entry number: %i\n", autoSelectIndex); } size = convS->readUint32LE(); - if (debugFlag) printf("Number of entries: %i\n", size); + if (debugFlag) debugCN(kDebugConversations, "Number of entries: %i\n", size); for (i = 0; i < size; i++) { data = convS->readUint32LE(); - if (debugFlag) printf("Entry %i: %i\n", i + 1, data); + if (debugFlag) debugCN(kDebugConversations, "Entry %i: %i\n", i + 1, data); } _convNodes.push_back(curEntry); setEntryInfo(curEntry->offset, curEntry->entryType, curNode, -1); @@ -465,14 +465,14 @@ void Converse::loadConversation(const char *convName) { curEntry->entryType = kEntry; strcpy(curEntry->voiceFile, ""); strcpy(curEntry->text, ""); - if (debugFlag) printf("ETRY chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "ETRY chunk\n"); data = convS->readUint32LE(); - if (debugFlag) printf("Unknown (attributes perhaps?): %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "Unknown (attributes perhaps?): %i\n", data); data = convS->readUint32LE(); - if (debugFlag) printf("Entry flags: "); - if (debugFlag) if (data & kEntryInitial) printf ("Initial "); - if (debugFlag) if (data & kEntryPersists) printf ("Persists "); - if (debugFlag) printf("\n"); + if (debugFlag) debugCN(kDebugConversations, "Entry flags: "); + if (debugFlag) if (data & kEntryInitial) debugCN(kDebugConversations, "Initial "); + if (debugFlag) if (data & kEntryPersists) debugCN(kDebugConversations, "Persists "); + if (debugFlag) debugCN(kDebugConversations, "\n"); curEntry->flags = data; curEntry->visible = (curEntry->flags & kEntryInitial) ? true : false; if (autoSelectIndex >= 0) { @@ -517,28 +517,28 @@ void Converse::loadConversation(const char *convName) { if (chunk == CHUNK_WPRL || chunk == CHUNK_WRPL) { replyEntry->entryType = kWeightedReply; replyEntry->totalWeight = 0; - if (debugFlag) printf("WRPL chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "WRPL chunk\n"); size = convS->readUint32LE(); - if (debugFlag) printf("Weighted reply %i - %i entries:\n", i, size); + if (debugFlag) debugCN(kDebugConversations, "Weighted reply %i - %i entries:\n", i, size); for (i = 0; i < size; i++) { weightedEntry = new ConvEntry(); weightedEntry->offset = chunkPos; strcpy(weightedEntry->voiceFile, ""); weightedEntry->entryType = kWeightedReply; data = convS->readUint32LE(); - if (debugFlag) printf("- Weight: %i ", data); + if (debugFlag) debugCN(kDebugConversations, "- Weight: %i ", data); weightedEntry->weight = data; replyEntry->totalWeight += weightedEntry->weight; data = convS->readUint32LE(); - if (debugFlag) printf("offset: %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "offset: %i\n", data); replyEntry->entries.push_back(weightedEntry); } currentWeightedEntry = 0; } else { replyEntry->entryType = kReply; - if (debugFlag) printf("RPLY chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "RPLY chunk\n"); data = convS->readUint32LE(); - if (debugFlag) printf("Reply data offset: %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "Reply data offset: %i\n", data); } if (!curEntry) @@ -563,9 +563,9 @@ void Converse::loadConversation(const char *convName) { { ConvEntry* parentEntry = NULL; if (chunk == CHUNK_TEXT) { - if (debugFlag) printf("TEXT chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "TEXT chunk\n"); } else { - if (debugFlag) printf("MESG chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "MESG chunk\n"); } if (replyEntry == NULL) { @@ -580,22 +580,22 @@ void Converse::loadConversation(const char *convName) { } size = convS->readUint32LE(); - if (debugFlag) printf("Entry data size: %i\n", size); + if (debugFlag) debugCN(kDebugConversations, "Entry data size: %i\n", size); convS->read(buffer, 8); size -= 8; // subtract maximum length of voice file name // If the file name is 8 characters, it will not be 0-terminated, so use strncpy strncpy(parentEntry->voiceFile, buffer, 8); parentEntry->voiceFile[8] = '\0'; - if (debugFlag) printf("Voice file: %s\n", parentEntry->voiceFile); + if (debugFlag) debugCN(kDebugConversations, "Voice file: %s\n", parentEntry->voiceFile); if (chunk == CHUNK_TEXT) { convS->read(buffer, size); - if (debugFlag) printf("Text: %s\n", buffer); + if (debugFlag) debugCN(kDebugConversations, "Text: %s\n", buffer); sprintf(parentEntry->text, "%s", buffer); } else { while (size > 0) { data = convS->readUint32LE(); - if (debugFlag) printf("Unknown: %i\n", data); // TODO + if (debugFlag) debugCN(kDebugConversations, "Unknown: %i\n", data); // TODO size -= 4; } } @@ -612,7 +612,7 @@ void Converse::loadConversation(const char *convName) { case CHUNK_CASN: // Conditional assign case CHUNK_ASGN: // Assign curAction = new EntryAction(); - if (debugFlag) printf("ASGN chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "ASGN chunk\n"); curAction->actionType = kAssignValue; // Conditional part @@ -655,32 +655,32 @@ void Converse::loadConversation(const char *convName) { if (chunk == CHUNK_GOTO || chunk == CHUNK_CCGO) { curAction->actionType = kGotoEntry; - if (debugFlag) printf("GOTO chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "GOTO chunk\n"); } else if (chunk == CHUNK_HIDE || chunk == CHUNK_CHDE) { curAction->actionType = kHideEntry; - if (debugFlag) printf("HIDE chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "HIDE chunk\n"); } else if (chunk == CHUNK_UHID || chunk == CHUNK_CUHD) { curAction->actionType = kUnhideEntry; - if (debugFlag) printf("UHID chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "UHID chunk\n"); } else if (chunk == CHUNK_DSTR || chunk == CHUNK_CDST) { curAction->actionType = kDestroyEntry; - if (debugFlag) printf("DSTR chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "DSTR chunk\n"); } else if (chunk == CHUNK_EXIT || chunk == CHUNK_CEGO) { curAction->actionType = kExitConv; - if (debugFlag) printf("EXIT chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "EXIT chunk\n"); } data = convS->readUint32LE(); - if (debugFlag) printf("Offset: %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "Offset: %i\n", data); curAction->targetOffset = data; curEntry->actions.push_back(curAction); break; case CHUNK_FALL: // Fallthrough - if (debugFlag) printf("FALL chunk\n"); + if (debugFlag) debugCN(kDebugConversations, "FALL chunk\n"); size = convS->readUint32LE(); - if (debugFlag) printf("Minimum nodes: %i\n", size); + if (debugFlag) debugCN(kDebugConversations, "Minimum nodes: %i\n", size); _convNodes[curNode]->fallthroughMinEntries = size; data = convS->readUint32LE(); - if (debugFlag) printf("Offset: %i\n", data); + if (debugFlag) debugCN(kDebugConversations, "Offset: %i\n", data); _convNodes[curNode]->fallthroughOffset = data; break; // ---------------------------------------------------------------------------- @@ -718,35 +718,35 @@ void Converse::loadConversationMads(const char *convName) { // ------------------------------------------------------------ // Chunk 0 convS = convDataD.getItemStream(0); - printf("Chunk 0\n"); - printf("Conv stream size: %i\n", convS->size()); + debugCN(kDebugConversations, "Chunk 0\n"); + debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); while (!convS->eos()) { // FIXME (eos changed) - printf("%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); } - printf("\n"); + debugCN(kDebugConversations, "\n"); // ------------------------------------------------------------ // Chunk 1 convS = convDataD.getItemStream(1); - printf("Chunk 1\n"); - printf("Conv stream size: %i\n", convS->size()); + debugCN(kDebugConversations, "Chunk 1\n"); + debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); while (!convS->eos()) { // FIXME (eos changed) - printf("%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); } - printf("\n"); + debugCN(kDebugConversations, "\n"); // ------------------------------------------------------------ // Chunk 2 convS = convDataD.getItemStream(2); - printf("Chunk 2\n"); - printf("Conv stream size: %i\n", convS->size()); + debugCN(kDebugConversations, "Chunk 2\n"); + debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); while (!convS->eos()) { // FIXME (eos changed) - printf("%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); } - printf("\n"); + debugCN(kDebugConversations, "\n"); // ------------------------------------------------------------ // CNV file @@ -769,46 +769,46 @@ void Converse::loadConversationMads(const char *convName) { // TODO: finish this // Chunk 0 convS = convData.getItemStream(0); - printf("Chunk 0\n"); - printf("Conv stream size: %i\n", convS->size()); - printf("%i ", convS->readUint16LE()); - printf("%i ", convS->readUint16LE()); - printf("%i ", convS->readUint16LE()); - printf("%i ", convS->readUint16LE()); - printf("%i ", convS->readUint16LE()); - printf("%i ", convS->readUint16LE()); - printf("\n"); + debugCN(kDebugConversations, "Chunk 0\n"); + debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); + debugCN(kDebugConversations, "%i ", convS->readUint16LE()); + debugCN(kDebugConversations, "%i ", convS->readUint16LE()); + debugCN(kDebugConversations, "%i ", convS->readUint16LE()); + debugCN(kDebugConversations, "%i ", convS->readUint16LE()); + debugCN(kDebugConversations, "%i ", convS->readUint16LE()); + debugCN(kDebugConversations, "%i ", convS->readUint16LE()); + debugCN(kDebugConversations, "\n"); count = convS->readUint16LE(); // conversation face count (usually 2) - printf("Conversation faces: %i\n", count); + debugCN(kDebugConversations, "Conversation faces: %i\n", count); for (i = 0; i < 5; i++) { convS->read(buffer, 16); - printf("Face %i: %s ", i + 1, buffer); + debugCN(kDebugConversations, "Face %i: %s ", i + 1, buffer); } - printf("\n"); + debugCN(kDebugConversations, "\n"); // 5 face slots // 1 = face slot has a face (with the filename specified above) // 0 = face slot doesn't contain face data for (i = 0; i < 5; i++) { - printf("%i ", convS->readUint16LE()); + debugCN(kDebugConversations, "%i ", convS->readUint16LE()); } - printf("\n"); + debugCN(kDebugConversations, "\n"); convS->read(buffer, 14); // speech file - printf("Speech file: %s\n", buffer); + debugCN(kDebugConversations, "Speech file: %s\n", buffer); while (!convS->eos()) { // FIXME: eos changed - printf("%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); } - printf("\n"); + debugCN(kDebugConversations, "\n"); delete convS; // ------------------------------------------------------------ // Chunk 1: Conversation nodes convS = convData.getItemStream(1); - printf("Chunk 1: conversation nodes\n"); - printf("Conv stream size: %i\n", convS->size()); + debugCN(kDebugConversations, "Chunk 1: conversation nodes\n"); + debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); while (true) { uint16 id = convS->readUint16LE(); @@ -828,12 +828,12 @@ void Converse::loadConversationMads(const char *convName) { unk = convS->readUint16LE(); assert (unk == 65535); _convNodes.push_back(curEntry); - printf("Node %i, ID %i, entries %i\n", _convNodes.size(), curEntry->id, curEntry->entryCount); + debugCN(kDebugConversations, "Node %i, ID %i, entries %i\n", _convNodes.size(), curEntry->id, curEntry->entryCount); // flags = 0: node has more than 1 entry // flags = 65535: node has 1 entry } - printf("Conversation has %i nodes\n", _convNodes.size()); - printf("\n"); + debugCN(kDebugConversations, "Conversation has %i nodes\n", _convNodes.size()); + debugCN(kDebugConversations, "\n"); delete convS; @@ -844,14 +844,14 @@ void Converse::loadConversationMads(const char *convName) { // ------------------------------------------------------------ // Chunk 5 contains the conversation strings convS = convData.getItemStream(5); - //printf("Chunk 5: conversation strings\n"); - //printf("Conv stream size: %i\n", convS->size()); + //debugCN(kDebugConversations, "Chunk 5: conversation strings\n"); + //debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); *buffer = 0; while (true) { //if (curPos == 0) - // printf("%i: Offset %i: ", _convStrings.size(), convS->pos()); + // debugCN(kDebugConversations, "%i: Offset %i: ", _convStrings.size(), convS->pos()); uint8 b = convS->readByte(); if (convS->eos()) break; @@ -862,7 +862,7 @@ void Converse::loadConversationMads(const char *convName) { } if (buffer[curPos - 1] == '\0') { // end of string - //printf("%s\n", buffer); + //debugCN(kDebugConversations, "%s\n", buffer); buf = new char[strlen(buffer) + 1]; strcpy(buf, buffer); _convStrings.push_back(buf); @@ -876,8 +876,8 @@ void Converse::loadConversationMads(const char *convName) { // ------------------------------------------------------------ // Chunk 2: entry data convS = convData.getItemStream(2); - //printf("Chunk 2 - entry data\n"); - //printf("Conv stream size: %i\n", convS->size()); + //debugCN(kDebugConversations, "Chunk 2 - entry data\n"); + //debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); for (i = 0; i < _convNodes.size(); i++) { for (j = 0; j < _convNodes[i]->entryCount; j++) { @@ -892,7 +892,7 @@ void Converse::loadConversationMads(const char *convName) { curEntry->size = convS->readUint16LE(); _convNodes[i]->entries.push_back(curEntry); - //printf("Node %i, entry %i, id %i, offset %i, size %i, text: %s\n", + //debugCN(kDebugConversations, "Node %i, entry %i, id %i, offset %i, size %i, text: %s\n", // i, j, curEntry->id, curEntry->offset, curEntry->size, curEntry->text); } } @@ -902,8 +902,8 @@ void Converse::loadConversationMads(const char *convName) { // ------------------------------------------------------------ // Chunk 3: message (MESG) chunks, created from the strings of chunk 5 convS = convData.getItemStream(3); - //printf("Chunk 3 - MESG chunk data\n"); - //printf("Conv stream size: %i\n", convS->size()); + //debugCN(kDebugConversations, "Chunk 3 - MESG chunk data\n"); + //debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); while (true) { uint16 index = convS->readUint16LE(); @@ -913,15 +913,15 @@ void Converse::loadConversationMads(const char *convName) { stringIndex = index; stringCount = convS->readUint16LE(); *buffer = 0; - //printf("Message: %i\n", _madsMessageList.size()); + //debugCN(kDebugConversations, "Message: %i\n", _madsMessageList.size()); for (i = stringIndex; i < stringIndex + stringCount; i++) { - //printf("%i: %s\n", i, _convStrings[i]); + //debugCN(kDebugConversations, "%i: %s\n", i, _convStrings[i]); curMessage->messageStrings.push_back(_convStrings[i]); } _madsMessageList.push_back(curMessage); - //printf("----------\n"); + //debugCN(kDebugConversations, "----------\n"); } - //printf("\n"); + //debugCN(kDebugConversations, "\n"); delete convS; @@ -929,31 +929,31 @@ void Converse::loadConversationMads(const char *convName) { // TODO: finish this // Chunk 6: conversation script convS = convData.getItemStream(6); - printf("Chunk 6\n"); - printf("Conv stream size: %i\n", convS->size()); + debugCN(kDebugConversations, "Chunk 6\n"); + debugCN(kDebugConversations, "Conv stream size: %i\n", convS->size()); /*while (!convS->eos()) { // FIXME (eos changed) - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("%i ", convS->readByte()); - printf("\n"); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "%i ", convS->readByte()); + debugCN(kDebugConversations, "\n"); } return;*/ for (i = 0; i < _convNodes.size(); i++) { for (j = 0; j < _convNodes[i]->entryCount; j++) { - printf("*** Node %i entry %i data size %i\n", i, j, _convNodes[i]->entries[j]->size); - printf("Entry ID %i, text %s\n", _convNodes[i]->entries[j]->id, _convNodes[i]->entries[j]->text); + debugCN(kDebugConversations, "*** Node %i entry %i data size %i\n", i, j, _convNodes[i]->entries[j]->size); + debugCN(kDebugConversations, "Entry ID %i, text %s\n", _convNodes[i]->entries[j]->id, _convNodes[i]->entries[j]->text); Common::SubReadStream *entryStream = new Common::SubReadStream(convS, _convNodes[i]->entries[j]->size); readConvEntryActions(entryStream, _convNodes[i]->entries[j]); delete entryStream; - printf("--------------------\n"); + debugCN(kDebugConversations, "--------------------\n"); } } @@ -978,50 +978,50 @@ void Converse::readConvEntryActions(Common::SubReadStream *convS, ConvEntry *cur switch (chunk) { case 1: - printf("TODO: chunk type %i\n", chunk); + debugCN(kDebugConversations, "TODO: chunk type %i\n", chunk); break; case 2: - printf("HIDE\n"); + debugCN(kDebugConversations, "HIDE\n"); convS->readByte(); count = convS->readByte(); - printf("%i entries: ", count); + debugCN(kDebugConversations, "%i entries: ", count); for (int i = 0; i < count; i++) - printf("%i %d", i, convS->readUint16LE()); - printf("\n"); + debugCN(kDebugConversations, "%i %d", i, convS->readUint16LE()); + debugCN(kDebugConversations, "\n"); break; case 3: - printf("UNHIDE\n"); + debugCN(kDebugConversations, "UNHIDE\n"); convS->readByte(); count = convS->readByte(); - printf("%i entries: ", count); + debugCN(kDebugConversations, "%i entries: ", count); for (int i = 0; i < count; i++) - printf("%i %d", i, convS->readUint16LE()); - printf("\n"); + debugCN(kDebugConversations, "%i %d", i, convS->readUint16LE()); + debugCN(kDebugConversations, "\n"); break; case 4: // MESSAGE - printf("MESSAGE\n"); + debugCN(kDebugConversations, "MESSAGE\n"); if (type == 255) { - //printf("unconditional\n"); + //debugCN(kDebugConversations, "unconditional\n"); } else if (type == 11) { - //printf("conditional\n"); + //debugCN(kDebugConversations, "conditional\n"); } else { - printf("unknown type: %i\n", type); + debugCN(kDebugConversations, "unknown type: %i\n", type); } // Conditional part if (type == 11) { unk = convS->readUint16LE(); // 1 if (unk != 1) - printf("Message: unk != 1 (it's %i)\n", unk); + debugCN(kDebugConversations, "Message: unk != 1 (it's %i)\n", unk); var = convS->readUint16LE(); val = convS->readUint16LE(); - printf("Var %i == %i\n", var, val); + debugCN(kDebugConversations, "Var %i == %i\n", var, val); } unk = convS->readUint16LE(); // 256 if (unk != 256) - printf("Message: unk != 256 (it's %i)\n", unk); + debugCN(kDebugConversations, "Message: unk != 256 (it's %i)\n", unk); // it seems that the first text entry is set when the message // chunk is supposed to be shown unconditionally, whereas the second text @@ -1031,74 +1031,74 @@ void Converse::readConvEntryActions(Common::SubReadStream *convS, ConvEntry *cur if (hasText1 == 1) { messageIndex = convS->readUint16LE(); - printf("Message 1 index: %i, text:\n", messageIndex); + debugCN(kDebugConversations, "Message 1 index: %i, text:\n", messageIndex); for (uint32 i = 0; i < _madsMessageList[messageIndex]->messageStrings.size(); i++) { - printf("%s\n", _madsMessageList[messageIndex]->messageStrings[i]); + debugCN(kDebugConversations, "%s\n", _madsMessageList[messageIndex]->messageStrings[i]); } } if (hasText2 == 1) { messageIndex = convS->readUint16LE(); if (hasText1 == 0) { - printf("Message 2 index: %i, text:\n", messageIndex); + debugCN(kDebugConversations, "Message 2 index: %i, text:\n", messageIndex); for (uint32 i = 0; i < _madsMessageList[messageIndex]->messageStrings.size(); i++) { - printf("%s\n", _madsMessageList[messageIndex]->messageStrings[i]); + debugCN(kDebugConversations, "%s\n", _madsMessageList[messageIndex]->messageStrings[i]); } } } break; case 5: // AUTO - printf("AUTO\n"); + debugCN(kDebugConversations, "AUTO\n"); for (int k = 0; k < 4; k++) convS->readByte(); messageIndex = convS->readUint16LE(); - printf("Message index: %i, text:\n", messageIndex); + debugCN(kDebugConversations, "Message index: %i, text:\n", messageIndex); for (uint32 i = 0; i < _madsMessageList[messageIndex]->messageStrings.size(); i++) { - printf("%s\n", _madsMessageList[messageIndex]->messageStrings[i]); + debugCN(kDebugConversations, "%s\n", _madsMessageList[messageIndex]->messageStrings[i]); } convS->readUint16LE(); break; case 6: - printf("TODO: chunk type %i\n", chunk); + debugCN(kDebugConversations, "TODO: chunk type %i\n", chunk); break; case 7: // GOTO unk = convS->readUint32LE(); // 0 if (unk != 0 && unk != 1) - printf("Goto: unk != 0 or 1 (it's %i)\n", unk); + debugCN(kDebugConversations, "Goto: unk != 0 or 1 (it's %i)\n", unk); target = convS->readUint16LE(); convS->readUint16LE(); // 255 if (unk != 0) - printf("Goto: unk != 0 (it's %i)\n", unk); + debugCN(kDebugConversations, "Goto: unk != 0 (it's %i)\n", unk); if (target != 65535) - printf("GOTO node %i\n", target); + debugCN(kDebugConversations, "GOTO node %i\n", target); else - printf("GOTO exit\n"); + debugCN(kDebugConversations, "GOTO exit\n"); break; case 8: - printf("TODO: chunk type %i\n", chunk); + debugCN(kDebugConversations, "TODO: chunk type %i\n", chunk); break; case 9: // ASSIGN - //printf("ASSIGN\n"); + //debugCN(kDebugConversations, "ASSIGN\n"); unk = convS->readUint32LE(); // 0 if (unk != 0) - printf("Assign: unk != 0 (it's %i)\n", unk); + debugCN(kDebugConversations, "Assign: unk != 0 (it's %i)\n", unk); val = convS->readUint16LE(); var = convS->readUint16LE(); - //printf("Var %i = %i\n", var, val); + //debugCN(kDebugConversations, "Var %i = %i\n", var, val); break; default: - printf ("Unknown chunk type! (%i)\n", chunk); + debugCN(kDebugConversations, "Unknown chunk type! (%i)\n", chunk); break; } } - printf("\n"); + debugCN(kDebugConversations, "\n"); } void Converse::setEntryInfo(int32 offset, EntryType type, int32 nodeIndex, int32 entryIndex) { @@ -1109,7 +1109,7 @@ void Converse::setEntryInfo(int32 offset, EntryType type, int32 nodeIndex, int32 info.nodeIndex = nodeIndex; info.entryIndex = entryIndex; _offsetMap[hashOffset] = info; - //printf("Set entry info: offset %i, type %i, node %i, entry %i\n", offset, type, nodeIndex, entryIndex); + //debugCN(kDebugConversations, "Set entry info: offset %i, type %i, node %i, entry %i\n", offset, type, nodeIndex, entryIndex); } const EntryInfo* Converse::getEntryInfo(int32 offset) { @@ -1172,7 +1172,7 @@ bool Converse::performAction(EntryAction *action) { } if (action->actionType == kAssignValue) { - //printf("Assigning variable at offset %i to value %i\n", + //debugCN(kDebugConversations, "Assigning variable at offset %i to value %i\n", // action->targetOffset, action->value); setValue(action->targetOffset, action->value); return true; // nothing else to do in an assignment action @@ -1190,24 +1190,24 @@ bool Converse::performAction(EntryAction *action) { switch (action->actionType) { case kGotoEntry: - //printf("Goto entry at offset %i. Associated node is %i, entry %i\n", + //debugCN(kDebugConversations, "Goto entry at offset %i. Associated node is %i, entry %i\n", // action->targetOffset, entryInfo->nodeIndex, entryInfo->entryIndex); _vm->_conversationView->setNode(entryInfo->nodeIndex); if (entryInfo->entryIndex >= 0) _vm->_conversationView->selectEntry(entryInfo->entryIndex); return false; case kHideEntry: - //printf("Hide entry at offset %i. Associated node is %i, entry %i\n", + //debugCN(kDebugConversations, "Hide entry at offset %i. Associated node is %i, entry %i\n", // targetEntry->offset, entryInfo->nodeIndex, entryInfo->entryIndex); targetEntry->visible = false; return true; case kUnhideEntry: - //printf("Show entry at offset %i. Associated node is %i, entry %i\n", + //debugCN(kDebugConversations, "Show entry at offset %i. Associated node is %i, entry %i\n", // targetEntry->offset, entryInfo->nodeIndex, entryInfo->entryIndex); targetEntry->visible = true; return true; case kDestroyEntry: - //printf("Destroy entry at offset %i. Associated node is %i, entry %i\n", + //debugCN(kDebugConversations, "Destroy entry at offset %i. Associated node is %i, entry %i\n", // targetEntry->offset, entryInfo->nodeIndex, entryInfo->entryIndex); if (entryInfo->entryIndex >= 0) getNode(entryInfo->nodeIndex)->entries.remove_at(entryInfo->entryIndex); @@ -1216,7 +1216,7 @@ bool Converse::performAction(EntryAction *action) { targetEntry->visible = true; return true; case kExitConv: - //printf("Exit conversation\n"); + //debugCN(kDebugConversations, "Exit conversation\n"); endConversation(); return false; default: diff --git a/engines/m4/events.cpp b/engines/m4/events.cpp index c66609844a..29b243aceb 100644 --- a/engines/m4/events.cpp +++ b/engines/m4/events.cpp @@ -235,7 +235,7 @@ bool Mouse::init(const char *seriesName, RGB8 *palette) { cursorPalette = _cursorSprites->getPalette(); _vm->_palette->setPalette(cursorPalette, 0, colorCount); - //printf("Cursor count: %d\n", _cursorSprites->getCount()); + //debugCN(kDebugCore, "Cursor count: %d\n", _cursorSprites->getCount()); _vm->res()->toss(seriesName); diff --git a/engines/m4/font.cpp b/engines/m4/font.cpp index b5965732e5..cba32c2225 100644 --- a/engines/m4/font.cpp +++ b/engines/m4/font.cpp @@ -82,7 +82,7 @@ void Font::setFontM4(const char *filename) { Common::SeekableReadStream *fontFile = _vm->res()->openFile(filename); if (fontFile->readUint32LE() != MKID_BE('FONT')) { - printf("Font::Font: FONT tag expected\n"); + debugCN(kDebugGraphics, "Font::Font: FONT tag expected\n"); return; } @@ -90,10 +90,10 @@ void Font::setFontM4(const char *filename) { _maxWidth = fontFile->readByte(); uint32 fontSize = fontFile->readUint32LE(); - //printf("Font::Font: _maxWidth = %d, _maxHeight = %d, fontSize = %d\n", _maxWidth, _maxHeight, fontSize); + //debugCN(kDebugGraphics, "Font::Font: _maxWidth = %d, _maxHeight = %d, fontSize = %d\n", _maxWidth, _maxHeight, fontSize); if (fontFile->readUint32LE() != MKID_BE('WIDT')) { - printf("Font::Font: WIDT tag expected\n"); + debugCN(kDebugGraphics, "Font::Font: WIDT tag expected\n"); return; } @@ -101,7 +101,7 @@ void Font::setFontM4(const char *filename) { fontFile->read(_charWidths, 256); if (fontFile->readUint32LE() != MKID_BE('OFFS')) { - printf("Font::Font: OFFS tag expected\n"); + debugCN(kDebugGraphics, "Font::Font: OFFS tag expected\n"); return; } @@ -111,7 +111,7 @@ void Font::setFontM4(const char *filename) { _charOffs[i] = fontFile->readUint16LE(); if (fontFile->readUint32LE() != MKID_BE('PIXS')) { - printf("Font::Font: PIXS tag expected\n"); + debugCN(kDebugGraphics, "Font::Font: PIXS tag expected\n"); return; } diff --git a/engines/m4/globals.cpp b/engines/m4/globals.cpp index a96229a0b3..d982ecad0e 100644 --- a/engines/m4/globals.cpp +++ b/engines/m4/globals.cpp @@ -75,7 +75,7 @@ bool Kernel::sendTrigger(int32 triggerNum) { bool Kernel::handleTrigger(int32 triggerNum) { - printf("betweenRooms = %d; triggerNum = %08X\n", betweenRooms, (uint)triggerNum); + debugCN(kDebugScript, "betweenRooms = %d; triggerNum = %08X\n", betweenRooms, (uint)triggerNum); if (betweenRooms) return true; @@ -89,10 +89,10 @@ bool Kernel::handleTrigger(int32 triggerNum) { int room = (triggerNum >> 16) & 0xFFF; - printf("room = %d; currentRoom = %d\n", room, currentRoom); fflush(stdout); + debugCN(kDebugScript, "room = %d; currentRoom = %d\n", room, currentRoom); if (room != currentRoom) { - printf("Kernel::handleTrigger() Trigger from another room\n"); + debugCN(kDebugScript, "Kernel::handleTrigger() Trigger from another room\n"); return false; } @@ -123,8 +123,7 @@ bool Kernel::handleTrigger(int32 triggerNum) { break; case KT_DAEMON: - printf("KT_DAEMON\n"); - fflush(stdout); + debugCN(kDebugScript, "KT_DAEMON\n"); triggerMode = KT_DAEMON; daemonTriggerAvailable = false; roomDaemon(); @@ -140,7 +139,7 @@ bool Kernel::handleTrigger(int32 triggerNum) { break; default: - printf("Kernel::handleTrigger() Unknown trigger mode %d\n", mode); + debugCN(kDebugScript, "Kernel::handleTrigger() Unknown trigger mode %d\n", mode); } @@ -181,7 +180,7 @@ void Kernel::globalDaemon() { if (_globalDaemonFn) _vm->_script->runFunction(_globalDaemonFn); else { - printf("Kernel::globalDaemon() _globalDaemonFn is NULL\n"); + debugCN(kDebugScript, "Kernel::globalDaemon() _globalDaemonFn is NULL\n"); } } @@ -189,7 +188,7 @@ void Kernel::globalParser() { if (_globalParserFn) _vm->_script->runFunction(_globalParserFn); else { - printf("Kernel::globalParser() _globalParserFn is NULL\n"); + debugCN(kDebugScript, "Kernel::globalParser() _globalParserFn is NULL\n"); } } @@ -197,7 +196,7 @@ void Kernel::sectionInit() { if (_sectionInitFn) _vm->_script->runFunction(_sectionInitFn); else { - printf("Kernel::sectionInit() _sectionInitFn is NULL\n"); + debugCN(kDebugScript, "Kernel::sectionInit() _sectionInitFn is NULL\n"); } } @@ -205,7 +204,7 @@ void Kernel::sectionDaemon() { if (_sectionDaemonFn) _vm->_script->runFunction(_sectionDaemonFn); else { - printf("Kernel::sectionDaemon() _sectionDaemonFn is NULL\n"); + debugCN(kDebugScript, "Kernel::sectionDaemon() _sectionDaemonFn is NULL\n"); } } @@ -213,7 +212,7 @@ void Kernel::sectionParser() { if (_sectionParserFn) _vm->_script->runFunction(_sectionParserFn); else { - printf("Kernel::sectionParser() _sectionParserFn is NULL\n"); + debugCN(kDebugScript, "Kernel::sectionParser() _sectionParserFn is NULL\n"); } } @@ -221,7 +220,7 @@ void Kernel::roomInit() { if (_roomInitFn) _vm->_script->runFunction(_roomInitFn); else { - printf("Kernel::roomInit() _roomInitFn is NULL\n"); + debugCN(kDebugScript, "Kernel::roomInit() _roomInitFn is NULL\n"); } } @@ -229,7 +228,7 @@ void Kernel::roomDaemon() { if (_roomDaemonFn) _vm->_script->runFunction(_roomDaemonFn); else { - printf("Kernel::roomDaemon() _roomDaemonFn is NULL\n"); + debugCN(kDebugScript, "Kernel::roomDaemon() _roomDaemonFn is NULL\n"); } } @@ -237,7 +236,7 @@ void Kernel::roomPreParser() { if (_roomPreParserFn) _vm->_script->runFunction(_roomPreParserFn); else { - printf("Kernel::roomPreParser() _roomPreParserFn is NULL\n"); + debugCN(kDebugScript, "Kernel::roomPreParser() _roomPreParserFn is NULL\n"); } } @@ -245,7 +244,7 @@ void Kernel::roomParser() { if (_roomParserFn) _vm->_script->runFunction(_roomParserFn); else { - printf("Kernel::roomParser() _roomParserFn is NULL\n"); + debugCN(kDebugScript, "Kernel::roomParser() _roomParserFn is NULL\n"); } } @@ -351,7 +350,7 @@ void MadsGlobals::loadMadsMessagesInfo() { Common::SeekableReadStream *messageS = _vm->res()->get("messages.dat"); int16 count = messageS->readUint16LE(); - //printf("%i messages\n", count); + //debugCN(kDebugScript, "%i messages\n", count); for (int i = 0; i < count; i++) { MessageItem curMessage; @@ -365,7 +364,7 @@ void MadsGlobals::loadMadsMessagesInfo() { if (i == count - 1) curMessage.compSize = messageS->size() - curMessage.offset; - //printf("id: %i, offset: %i, uncomp size: %i\n", curMessage->id, curMessage->offset, curMessage->uncompSize); + //debugCN(kDebugScript, "id: %i, offset: %i, uncomp size: %i\n", curMessage->id, curMessage->offset, curMessage->uncompSize); _madsMessages.push_back(curMessage); } diff --git a/engines/m4/globals.h b/engines/m4/globals.h index 67dcfc2b94..117769ee8e 100644 --- a/engines/m4/globals.h +++ b/engines/m4/globals.h @@ -229,15 +229,18 @@ struct MadsConfigData { #define SET_GLOBAL(x,y) _madsVm->globals()->_globals[x] = y #define SET_GLOBAL32(x,y) { _madsVm->globals()->_globals[x] = (y) & 0xffff; _madsVm->globals()->_globals[(x) + 1] = (y) >> 16; } +typedef int (*IntFunctionPtr)(); + union DataMapEntry { bool *boolValue; uint16 *uint16Value; int *intValue; + IntFunctionPtr fnPtr; }; typedef Common::HashMap<uint16, uint16> DataMapHash; -enum DataMapType {BOOL, UINT16, INT}; +enum DataMapType {BOOL, UINT16, INT, INT_FN}; class DataMapWrapper { friend class DataMap; @@ -249,16 +252,18 @@ public: DataMapWrapper(uint16 *v) { _value.uint16Value = v; _type = UINT16; } DataMapWrapper(int16 *v) { _value.uint16Value = (uint16 *)v; _type = UINT16; } DataMapWrapper(int *v) { _value.intValue = v; _type = INT; } + DataMapWrapper(IntFunctionPtr v) { _value.fnPtr = v; _type = INT_FN; } uint16 getIntValue() { if (_type == BOOL) return *_value.boolValue ? 0xffff : 0; else if (_type == UINT16) return *_value.uint16Value; - else return *_value.intValue; + else if (_type == INT) return *_value.intValue; + else return _value.fnPtr(); } void setIntValue(uint16 v) { if (_type == BOOL) *_value.boolValue = v != 0; else if (_type == UINT16) *_value.uint16Value = v; - else *_value.intValue = v; + else if (_type == INT) *_value.intValue = v; } }; diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp index 423dda5e7e..6d01db50bd 100644 --- a/engines/m4/graphics.cpp +++ b/engines/m4/graphics.cpp @@ -213,8 +213,8 @@ void M4Surface::drawSprite(int x, int y, SpriteInfo &info, const Common::Rect &c int scaledHeight = scaleValue(info.height, info.scaleY, errY); /* - printf("M4Surface::drawSprite() info.width = %d; info.scaleX = %d; info.height = %d; info.scaleY = %d; scaledWidth = %d; scaledHeight = %d\n", - info.width, info.scaleX, info.height, info.scaleY, scaledWidth, scaledHeight); fflush(stdout); + debugCN(kDebugGraphics, "M4Surface::drawSprite() info.width = %d; info.scaleX = %d; info.height = %d; info.scaleY = %d; scaledWidth = %d; scaledHeight = %d\n", + info.width, info.scaleX, info.height, info.scaleY, scaledWidth, scaledHeight); */ int clipX = 0, clipY = 0; @@ -233,7 +233,7 @@ void M4Surface::drawSprite(int x, int y, SpriteInfo &info, const Common::Rect &c scaledHeight = y + scaledHeight; } - //printf("M4Surface::drawSprite() width = %d; height = %d; scaledWidth = %d; scaledHeight = %d\n", info.width, info.height, scaledWidth, scaledHeight); fflush(stdout); + //debugCN(kDebugGraphics, "M4Surface::drawSprite() width = %d; height = %d; scaledWidth = %d; scaledHeight = %d\n", info.width, info.height, scaledWidth, scaledHeight); // Check if sprite is inside the screen. If it's not, there's no need to draw it if (scaledWidth + x <= 0 || scaledHeight + y <= 0) // check left and top (in case x,y are negative) @@ -703,7 +703,7 @@ void M4Surface::madsLoadBackground(int roomNumber, RGBList **palData) { else compressedTileDataSize = tileDataUncomp->readUint32LE() - tileOfs; - //printf("Tile: %i, compressed size: %i\n", i, compressedTileDataSize); + //debugCN(kDebugGraphics, "Tile: %i, compressed size: %i\n", i, compressedTileDataSize); newTile->clear(); @@ -787,7 +787,7 @@ void M4Surface::m4LoadBackground(Common::SeekableReadStream *source) { uint8 blackIndex = 0; // Debug - //printf("loadBackground(): %dx%d picture (%d bytes) - %dx%d tiles of size %dx%d\n", + //debugCN(kDebugGraphics, "loadBackground(): %dx%d picture (%d bytes) - %dx%d tiles of size %dx%d\n", // widthVal, heightVal, size, tilesX, tilesY, tileWidth, tileHeight); // BGR data, which is converted to RGB8 @@ -807,7 +807,7 @@ void M4Surface::m4LoadBackground(Common::SeekableReadStream *source) { // note that the height of the scene in game scenes is smaller than 480, as the bottom part of the // screen is the inventory assert(width() == (int)widthVal); - //printf("width(): %d, widthVal: %d, height(): %d, heightVal: %d\n", width(), widthVal, height(), heightVal); + //debugCN(kDebugGraphics, "width(): %d, widthVal: %d, height(): %d, heightVal: %d\n", width(), widthVal, height(), heightVal); tileBuffer->create(tileWidth, tileHeight, 1); diff --git a/engines/m4/hotspot.cpp b/engines/m4/hotspot.cpp index 27180c5eb8..500464dc09 100644 --- a/engines/m4/hotspot.cpp +++ b/engines/m4/hotspot.cpp @@ -227,7 +227,7 @@ void HotSpotList::loadHotSpots(Common::SeekableReadStream* hotspotStream, int ho // This looks to be some sort of bitmask. Perhaps it signifies // the valid verbs for this hotspot index = hotspotStream->readUint16LE(); // unknown - //printf("%i ", index); + //debugC(kDebugCore, "%i ", index); } if (_vm->isM4()) diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp index 34fcef7c88..93490a0821 100644 --- a/engines/m4/m4.cpp +++ b/engines/m4/m4.cpp @@ -121,6 +121,8 @@ MadsM4Engine::MadsM4Engine(OSystem *syst, const M4GameDescription *gameDesc) : DebugMan.addDebugChannel(kDebugScript, "script", "Script debug level"); DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics debug level"); DebugMan.addDebugChannel(kDebugConversations, "conversations", "Conversations debugging"); + DebugMan.addDebugChannel(kDebugSound, "sound", "Sounds debug level"); + DebugMan.addDebugChannel(kDebugCore, "core", "Core debug level"); _resourceManager = NULL; _globals = NULL; @@ -266,39 +268,41 @@ void MadsM4Engine::loadMenu(MenuType menuType, bool loadSaveFromHotkey, bool cal _viewManager->moveToFront(view); } +#define DUMP_BUFFER_SIZE 1024 + void MadsM4Engine::dumpFile(const char* filename, bool uncompress) { -#if 0 - // FIXME: The following code is not portable and hence has been disabled. - // Try replacing FILE by Common::DumpFile. + Common::DumpFile f; + byte buffer[DUMP_BUFFER_SIZE]; Common::SeekableReadStream *fileS = res()->get(filename); - byte buffer[256]; - FILE *destFile = fopen(filename, "wb"); + + if (!f.open(filename)) + error("Could not open '%s' for writing", filename); + int bytesRead = 0; - printf("Dumping %s, size: %i\n", filename, fileS->size()); + warning("Dumping %s, size: %i\n", filename, fileS->size()); if (!uncompress) { while (!fileS->eos()) { - bytesRead = fileS->read(buffer, 256); - fwrite(buffer, bytesRead, 1, destFile); + bytesRead = fileS->read(buffer, DUMP_BUFFER_SIZE); + f.write(buffer, bytesRead); } } else { MadsPack packData(fileS); Common::MemoryReadStream *sourceUnc; for (int i = 0; i < packData.getCount(); i++) { sourceUnc = packData.getItemStream(i); - printf("Dumping compressed chunk %i of %i, size is %i\n", i + 1, packData.getCount(), sourceUnc->size()); + debugCN(kDebugCore, "Dumping compressed chunk %i of %i, size is %i\n", i + 1, packData.getCount(), sourceUnc->size()); while (!sourceUnc->eos()) { - bytesRead = sourceUnc->read(buffer, 256); - fwrite(buffer, bytesRead, 1, destFile); + bytesRead = sourceUnc->read(buffer, DUMP_BUFFER_SIZE); + f.write(buffer, bytesRead); } delete sourceUnc; } } - fclose(destFile); + f.close(); res()->toss(filename); res()->purge(); -#endif } /*--------------------------------------------------------------------------*/ @@ -342,8 +346,7 @@ Common::Error M4Engine::run() { for (int i = 1; i < 58; i++) { _vm->_kernel->trigger = i; _script->runFunction(func); - printf("=================================\n"); - fflush(stdout); + debugCN(kDebugCore, "=================================\n"); } #endif @@ -539,7 +542,7 @@ Common::Error MadsEngine::run() { // Test code to dump all messages to the console //for (int i = 0; i < _globals->getMessagesSize(); i++) - //printf("%s\n----------\n", _globals->loadMessage(i)); + //debugCN(kDebugCore, "%s\n----------\n", _globals->loadMessage(i)); if (getGameType() == GType_RexNebular) { MadsGameLogic::initialiseGlobals(); diff --git a/engines/m4/m4.h b/engines/m4/m4.h index 8dfae754ef..8069c960f1 100644 --- a/engines/m4/m4.h +++ b/engines/m4/m4.h @@ -116,7 +116,9 @@ enum { enum { kDebugScript = 1 << 0, kDebugConversations = 1 << 1, - kDebugGraphics = 1 << 2 + kDebugGraphics = 1 << 2, + kDebugSound = 1 << 3, + kDebugCore = 1 << 4 }; #define MESSAGE_BASIC 1 diff --git a/engines/m4/m4_scene.cpp b/engines/m4/m4_scene.cpp index 475fdba653..738f414add 100644 --- a/engines/m4/m4_scene.cpp +++ b/engines/m4/m4_scene.cpp @@ -61,7 +61,7 @@ void M4Scene::loadSceneSprites(int sceneNumber) { _sceneSprites = new SpriteAsset(_vm, sceneS, sceneS->size(), filename); _vm->res()->toss(filename); - printf("Scene has %d sprites, each one having %d colors\n", _sceneSprites->getCount(), _sceneSprites->getColorCount()); + debugCN(kDebugGraphics, "Scene has %d sprites, each one having %d colors\n", _sceneSprites->getCount(), _sceneSprites->getColorCount()); } void M4Scene::loadSceneResources(int sceneNumber) { @@ -136,7 +136,7 @@ void M4Scene::loadSceneSpriteCodes(int sceneNumber) { // RGB8* spritePalette = _sceneSpriteCodes->getPalette(); //_vm->_palette->setPalette(spritePalette, 0, colorCount); - printf("Scene has %d sprite codes, each one having %d colors\n", _sceneSpriteCodes->getCount(), colorCount); + debugCN(kDebugGraphics, "Scene has %d sprite codes, each one having %d colors\n", _sceneSpriteCodes->getCount(), colorCount); // Note that toss() deletes the MemoryReadStream _vm->res()->toss(filename); @@ -252,7 +252,7 @@ void M4Scene::leftClick(int x, int y) { */ // Player said.... (for scene scripts) - printf("Player said: %s %s\n", currentHotSpot->getVerb(), currentHotSpot->getVocab()); + debugCN(kDebugGraphics, "Player said: %s %s\n", currentHotSpot->getVerb(), currentHotSpot->getVocab()); // FIXME: This should be moved somewhere else, and is incomplete if (_m4Vm->scene()->getInterface()->_inventory.getSelectedIndex() == -1) { @@ -268,7 +268,7 @@ void M4Scene::leftClick(int x, int y) { strcpy(_vm->_player->object, ""); _vm->_player->commandReady = true; - printf("## Player said: %s %s\n", _vm->_player->verb, _vm->_player->noun); + debugCN(kDebugGraphics, "## Player said: %s %s\n", _vm->_player->verb, _vm->_player->noun); } } diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp index ca53bdca75..1d15cbbaf7 100644 --- a/engines/m4/mads_anim.cpp +++ b/engines/m4/mads_anim.cpp @@ -721,21 +721,21 @@ void AnimviewView::processCommand() { case 'O': param = param + 2; - //printf("O:%i ", atoi(param)); + //warning(kDebugGraphics, "O:%i ", atoi(param)); _transition = atoi(param); break; case 'R': param = param + 2; - //printf("R:%s ", param); + //warning(kDebugGraphics, "R:%s ", param); break; case 'W': - //printf("W "); + //warning(kDebugGraphics, "W "); break; case 'X': - //printf("X "); + //warning(kDebugGraphics, "X "); break; default: diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp index 2d4a581abe..878e86c573 100644 --- a/engines/m4/mads_logic.cpp +++ b/engines/m4/mads_logic.cpp @@ -182,7 +182,9 @@ void MadsSceneLogic::initialiseDataMap() { MAP_DATA(&_madsVm->_player._playerPos.y); MAP_DATA(&_madsVm->_player._direction); MAP_DATA(&_madsVm->_player._visible); - MAP_DATA(&_madsVm->scene()->_animActive); + MAP_DATA(&getActiveAnimationBool); + MAP_DATA(&getAnimationCurrentFrame); + } DataMap &MadsSceneLogic::dataMap() { diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp index 7e2e6f500b..91db7d343a 100644 --- a/engines/m4/mads_menus.cpp +++ b/engines/m4/mads_menus.cpp @@ -546,7 +546,7 @@ int DragonMainMenuView::getHighlightedItem(int x, int y) { M4Sprite *spr = _menuItem->getFrame(0); if ((x >= pt.x - 25) && (y >= pt.y - spr->height()) && (x < (pt.x - 25 + spr->width())) && (y < (pt.y))) { - printf("x = %d, y = %d, index = %d\n", x, y, index); + debugCN(kDebugGraphics, "x = %d, y = %d, index = %d\n", x, y, index); return index; } } diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp index 641ee756e3..e88a21eb4e 100644 --- a/engines/m4/mads_scene.cpp +++ b/engines/m4/mads_scene.cpp @@ -62,7 +62,6 @@ void SceneNode::load(Common::SeekableReadStream *stream) { MadsScene::MadsScene(MadsEngine *vm): _sceneResources(), Scene(vm, &_sceneResources), MadsView(this) { _vm = vm; _activeAnimation = NULL; - _animActive = false; MadsView::_bgSurface = Scene::_backgroundSurface; MadsView::_depthSurface = Scene::_walkSurface; @@ -217,7 +216,6 @@ void MadsScene::leaveScene() { if (_activeAnimation) { delete _activeAnimation; _activeAnimation = NULL; - _animActive = false; } Scene::leaveScene(); @@ -386,7 +384,6 @@ void MadsScene::updateState() { if (((MadsAnimation *) _activeAnimation)->freeFlag() || freeFlag) { delete _activeAnimation; _activeAnimation = NULL; - _animActive = false; } } @@ -458,7 +455,6 @@ void MadsScene::freeAnimation() { delete _activeAnimation; _activeAnimation = NULL; - _animActive = false; } @@ -578,7 +574,6 @@ void MadsScene::loadAnimation(const Common::String &animName, int abortTimers) { MadsAnimation *anim = new MadsAnimation(_vm, this); anim->load(animName.c_str(), abortTimers); _activeAnimation = anim; - _animActive = true; } bool MadsScene::getDepthHighBit(const Common::Point &pt) { @@ -1244,4 +1239,16 @@ void MadsInterfaceView::leaveScene() { _madsVm->_viewManager->deleteView(view); } +//-------------------------------------------------------------------------- + +int getActiveAnimationBool() { + return (_madsVm->scene()->activeAnimation()) ? 1 : 0; +} + +int getAnimationCurrentFrame() { + Animation *anim = _madsVm->scene()->activeAnimation(); + return anim ? anim->getCurrentFrame() : 0; +} + + } // End of namespace M4 diff --git a/engines/m4/mads_scene.h b/engines/m4/mads_scene.h index a029c63a4b..743719d954 100644 --- a/engines/m4/mads_scene.h +++ b/engines/m4/mads_scene.h @@ -108,7 +108,6 @@ public: Common::Point _destPos; int _destFacing; Common::Point _customDest; - bool _animActive; public: MadsScene(MadsEngine *vm); virtual ~MadsScene(); @@ -192,6 +191,9 @@ public: bool onEvent(M4EventType eventType, int32 param1, int x, int y, bool &captureEvents); }; +extern int getActiveAnimationBool(); +extern int getAnimationCurrentFrame(); + } // End of namespace M4 #endif diff --git a/engines/m4/rails.cpp b/engines/m4/rails.cpp index 11b9bcdbb9..ff18d645e7 100644 --- a/engines/m4/rails.cpp +++ b/engines/m4/rails.cpp @@ -233,7 +233,7 @@ void Rails::createEdge(int32 node1, int32 node2) { valid = isLineWalkable(_nodes[node1]->x, _nodes[node1]->y, _nodes[node2]->x, _nodes[node2]->y); - printf("test code says: %d\n", valid); + debugCN(kDebugCore, "test code says: %d\n", valid); // Check if the line passes through a forbidden rectangle if (valid) { @@ -255,7 +255,7 @@ void Rails::createEdge(int32 node1, int32 node2) { _edges.insert_at(index, (int16*)(distance >> 16)); } - printf("node1 = %d, node2 = %d, valid = %d\n", node1, node2, valid); + debugCN(kDebugCore, "node1 = %d, node2 = %d, valid = %d\n", node1, node2, valid); } diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp index eee1214e7f..fd54d439a6 100644 --- a/engines/m4/resource.cpp +++ b/engines/m4/resource.cpp @@ -43,12 +43,12 @@ FileSystem::FileSystem(const char *hashFilename) { hashFile.open(hashFilename); if (!hashFile.isOpen()) { - printf("FileSystem::FileSystem: error opening hash %s\n", hashFilename); + debugCN(kDebugCore, "FileSystem::FileSystem: error opening hash %s\n", hashFilename); } hashSize = hashFile.readUint32LE(); - //printf("FileSystem::FileSystem: hashSize = %d\n", hashSize); + //debugCN(kDebugCore, "FileSystem::FileSystem: hashSize = %d\n", hashSize); /* load file records and add them to the hash list */ for (uint i = 0; i < hashSize; i++) { @@ -63,12 +63,12 @@ FileSystem::FileSystem(const char *hashFilename) { if (entry.filename[0]) { /* - printf(" filename: %s\n", entry.filename); - printf(" hagfile: %d\n", entry.hagfile); - printf(" disks: %d\n", entry.disks); - printf(" offset: %08X\n", entry.offset); - printf(" size: %d\n", entry.size); - printf(" next: %08X\n", entry.next); + debugCN(kDebugCore, " filename: %s\n", entry.filename); + debugCN(kDebugCore, " hagfile: %d\n", entry.hagfile); + debugCN(kDebugCore, " disks: %d\n", entry.disks); + debugCN(kDebugCore, " offset: %08X\n", entry.offset); + debugCN(kDebugCore, " size: %d\n", entry.size); + debugCN(kDebugCore, " next: %08X\n", entry.next); */ _fileEntries[entry.filename] = entry; } @@ -90,7 +90,7 @@ FileSystem::FileSystem(const char *hashFilename) { _hagEntries[entry.fileIndex].hagFile->open(_hagEntries[entry.fileIndex].filename); if (!_hagEntries[entry.fileIndex].hagFile->isOpen()) { - printf("FileSystem::FileSystem: error opening hag %s\n", _hagEntries[entry.fileIndex].filename); + debugCN(kDebugCore, "FileSystem::FileSystem: error opening hag %s\n", _hagEntries[entry.fileIndex].filename); } } @@ -113,7 +113,7 @@ Common::SeekableReadStream *FileSystem::loadFile(const char *resourceName, bool Common::SeekableReadStream *result = NULL; if (hfe) { - //printf("FileSystem::loadFile() success opening %s\n", filename); + //debugCN(kDebugCore, "FileSystem::loadFile() success opening %s\n", filename); HashHagEntry *hagEntry = &_hagEntries[hfe->hagfile]; if (preloadFlag) { @@ -128,7 +128,7 @@ Common::SeekableReadStream *FileSystem::loadFile(const char *resourceName, bool hfe->offset + hfe->size); } else { - printf("FileSystem::loadFile() error opening %s\n", resourceName); + debugCN(kDebugCore, "FileSystem::loadFile() error opening %s\n", resourceName); } return result; @@ -207,7 +207,7 @@ void ResourceManager::toss(const char *resourceName) { if (!strcmp(r->name, resourceName)) { r->flags |= kResourcePurge; - //printf("M4ResourceManager::toss: mark resource %s to be purged\n", resourceName); + //debugCN(kDebugCore, "M4ResourceManager::toss: mark resource %s to be purged\n", resourceName); } } } @@ -510,7 +510,7 @@ M4ResourceManager::~M4ResourceManager() { } Common::SeekableReadStream *M4ResourceManager::loadResource(const char *resourceName, bool preloadFlag) { - //printf("M4ResourceManager::loadResource() loading resource %s\n", resourceName); + //debugCN(kDebugCore, "M4ResourceManager::loadResource() loading resource %s\n", resourceName); Common::SeekableReadStream* result = NULL; if (_hfs) { // actually load the resource diff --git a/engines/m4/script.cpp b/engines/m4/script.cpp index 412707d95e..42d55c6dc7 100644 --- a/engines/m4/script.cpp +++ b/engines/m4/script.cpp @@ -121,7 +121,7 @@ SeriesStreamBreakList::~SeriesStreamBreakList() { void SeriesStreamBreakList::load(Common::File *fd) { uint32 count = fd->readUint32LE(); - printf("SeriesStreamBreakList::load() count = %d\n", count); + debugCN(kDebugScript, "SeriesStreamBreakList::load() count = %d\n", count); for (uint32 i = 0; i < count; i++) { SeriesStreamBreakItem *item = new SeriesStreamBreakItem(); item->frameNum = fd->readUint32LE(); @@ -135,7 +135,7 @@ void SeriesStreamBreakList::load(Common::File *fd) { item->value = fd->readUint32LE(); _items.push_back(item); - printf("%02d: frameNum = %d; digiName = %s; digiChannel = %d; digiVolume = %d; trigger = %d; flags = %d; variable = %d; value = %d\n", + debugCN(kDebugScript, "%02d: frameNum = %d; digiName = %s; digiChannel = %d; digiVolume = %d; trigger = %d; flags = %d; variable = %d; value = %d\n", i, item->frameNum, item->digiName, item->digiChannel, item->digiVolume, item->trigger, item->flags, item->variable.value, item->value); } @@ -146,7 +146,7 @@ SaidArray::~SaidArray() { void SaidArray::load(Common::File *fd) { uint32 count = fd->readUint32LE(); - printf("SaidArray::load() count = %d\n", count); + debugCN(kDebugScript, "SaidArray::load() count = %d\n", count); for (uint32 i = 0; i < count; i++) { SaidArrayItem *item = new SaidArrayItem(); item->itemName = _inter->loadGlobalString(fd); @@ -155,7 +155,7 @@ void SaidArray::load(Common::File *fd) { item->digiNameGear = _inter->loadGlobalString(fd); _items.push_back(item); - printf("itemName = %s; digiNameLook = %s; digiNameTake = %s; digiNameGear = %s\n", + debugCN(kDebugScript, "itemName = %s; digiNameLook = %s; digiNameTake = %s; digiNameGear = %s\n", item->itemName, item->digiNameLook, item->digiNameTake, item->digiNameGear); } @@ -166,7 +166,7 @@ ParserArray::~ParserArray() { void ParserArray::load(Common::File *fd) { uint32 count = fd->readUint32LE(); - printf("ParserArray::load() count = %d\n", count); + debugCN(kDebugScript, "ParserArray::load() count = %d\n", count); for (uint32 i = 0; i < count; i++) { ParserArrayItem *item = new ParserArrayItem(); item->w0 = _inter->loadGlobalString(fd); @@ -180,7 +180,7 @@ void ParserArray::load(Common::File *fd) { item->value = fd->readUint32LE(); _items.push_back(item); - printf("w0 = %s; w1 = %s; trigger = %d; testVariable = %d; testValue = %d; variable = %d; value = %d\n", + debugCN(kDebugScript, "w0 = %s; w1 = %s; trigger = %d; testVariable = %d; testValue = %d; variable = %d; value = %d\n", item->w0, item->w1, item->trigger, item->testVariable.value, item->testValue, item->variable.value, item->value); } @@ -194,9 +194,9 @@ ScriptFunction::~ScriptFunction() { } void ScriptFunction::load(Common::File *fd) { - printf("ScriptFunction::load()\n"); + debugCN(kDebugScript, "ScriptFunction::load()\n"); uint32 size = fd->readUint32LE(); - printf("ScriptFunction::load() size = %d\n", size); + debugCN(kDebugScript, "ScriptFunction::load() size = %d\n", size); _code = fd->readStream(size); } @@ -243,16 +243,16 @@ void ScriptInterpreter::open(const char *filename) { } int functionCount = _scriptFile->readUint32LE(); - printf("functionCount = %d\n", functionCount); + debugCN(kDebugScript, "functionCount = %d\n", functionCount); for (int i = 0; i < functionCount; i++) { uint32 offset = _scriptFile->readUint32LE(); - printf("func(%d) offset = %08X\n", i, offset); + debugCN(kDebugScript, "func(%d) offset = %08X\n", i, offset); uint32 len = _scriptFile->readUint32LE(); if (len > 0) { char *funcName = new char[len + 1]; _scriptFile->read(funcName, len); funcName[len] = '\0'; - printf("func(%d) name = %s\n", i, funcName); + debugCN(kDebugScript, "func(%d) name = %s\n", i, funcName); _functionNames[Common::String(funcName)] = _functions.size(); // DEBUG _scriptFunctionNames.push_back(Common::String(funcName)); @@ -262,16 +262,16 @@ void ScriptInterpreter::open(const char *filename) { } int dataCount = _scriptFile->readUint32LE(); - printf("dataCount = %d\n", dataCount); + debugCN(kDebugScript, "dataCount = %d\n", dataCount); for (int i = 0; i < dataCount; i++) { uint32 offset = _scriptFile->readUint32LE(); ScriptDataType type = (ScriptDataType)_scriptFile->readUint32LE(); - printf("data(%d) offset = %08X; type = %d\n", i, offset, type); + debugCN(kDebugScript, "data(%d) offset = %08X; type = %d\n", i, offset, type); _data.push_back(new ScriptDataEntry(offset, type)); } _globalVarCount = _scriptFile->readUint32LE(); - printf("_globalVarCount = %d\n", _globalVarCount); + debugCN(kDebugScript, "_globalVarCount = %d\n", _globalVarCount); uint32 stringOfs = _scriptFile->readUint32LE(); _scriptFile->seek(stringOfs); @@ -324,11 +324,11 @@ ScriptFunction *ScriptInterpreter::loadFunction(uint32 index) { ScriptFunction *ScriptInterpreter::loadFunction(const Common::String &name) { FunctionNameMap::iterator iter = _functionNames.find(name); if (iter == _functionNames.end()) { - printf("ScriptInterpreter::loadFunction() Function '%s' not found!\n", name.c_str()); + debugCN(kDebugScript, "ScriptInterpreter::loadFunction() Function '%s' not found!\n", name.c_str()); return NULL; } uint32 funcIndex = (*iter)._value; - printf("ScriptInterpreter::loadFunction() index('%s') = %d\n", name.c_str(), funcIndex); + debugCN(kDebugScript, "ScriptInterpreter::loadFunction() index('%s') = %d\n", name.c_str(), funcIndex); return loadFunction(funcIndex); } @@ -354,7 +354,6 @@ int ScriptInterpreter::runFunction(ScriptFunction *scriptFunction) { while (!done) { byte opcode = _runningFunction->readByte(); done = !execOpcode(opcode); - fflush(stdout); } _localStackPtr = oldLocalStackPtr; @@ -376,24 +375,24 @@ void ScriptInterpreter::pop(ScriptValue &value) { } void ScriptInterpreter::dumpStack() { - printf("ScriptInterpreter::dumpStack()\n"); + debugCN(kDebugScript, "ScriptInterpreter::dumpStack()\n"); for (int i = 0; i < _stackPtr; i++) { - printf("%03d. type = %02d; value = %d\n", i, _stack[i].type, _stack[i].value); + debugCN(kDebugScript, "%03d. type = %02d; value = %d\n", i, _stack[i].type, _stack[i].value); } } void ScriptInterpreter::dumpRegisters() { - printf("ScriptInterpreter::dumpRegisters()\n"); + debugCN(kDebugScript, "ScriptInterpreter::dumpRegisters()\n"); for (int i = 0; i < ARRAYSIZE(_registers); i++) { - printf("%03d. type = %02d; value = %d\n", i, _registers[i].type, _registers[i].value); + debugCN(kDebugScript, "%03d. type = %02d; value = %d\n", i, _registers[i].type, _registers[i].value); } } void ScriptInterpreter::dumpGlobalVars() { - printf("ScriptInterpreter::dumpGlobalVars()\n"); + debugCN(kDebugScript, "ScriptInterpreter::dumpGlobalVars()\n"); for (int i = 0; i < ARRAYSIZE(_globalVars); i++) { if (_globalVars[i].type != -1) - printf("%03d. type = %02d; value = %d\n", i, _globalVars[i].type, _globalVars[i].value); + debugCN(kDebugScript, "%03d. type = %02d; value = %d\n", i, _globalVars[i].type, _globalVars[i].value); } } @@ -405,7 +404,7 @@ int ScriptInterpreter::toInteger(const ScriptValue &value) { return value.value; default: - printf("ScriptInterpreter::toInteger() Invalid type %d!\n", value.type); + debugCN(kDebugScript, "ScriptInterpreter::toInteger() Invalid type %d!\n", value.type); return 0; } @@ -423,7 +422,7 @@ const char *ScriptInterpreter::toString(const ScriptValue &value) { return _constStrings[value.value]; default: - printf("ScriptInterpreter::toString() Invalid type %d!\n", value.type); + debugCN(kDebugScript, "ScriptInterpreter::toString() Invalid type %d!\n", value.type); return NULL; } @@ -462,7 +461,7 @@ void ScriptInterpreter::loadValue(ScriptValue &value) { break; default: - printf("ScriptInterpreter::loadValue() Invalid value type %d!\n", value.type); + debugCN(kDebugScript, "ScriptInterpreter::loadValue() Invalid value type %d!\n", value.type); } @@ -471,7 +470,7 @@ void ScriptInterpreter::loadValue(ScriptValue &value) { void ScriptInterpreter::copyValue(ScriptValue &destValue, ScriptValue &sourceValue) { if (sourceValue.type == -1) { - printf("ScriptInterpreter::copyValue() Trying to read uninitialized value!\n"); + debugCN(kDebugScript, "ScriptInterpreter::copyValue() Trying to read uninitialized value!\n"); } switch (destValue.type) { @@ -489,7 +488,7 @@ void ScriptInterpreter::copyValue(ScriptValue &destValue, ScriptValue &sourceVal if (sourceValue.type == kInteger) { _logicGlobals[destValue.value] = sourceValue.value; } else { - printf("ScriptInterpreter::copyValue() Invalid source value type %d!\n", sourceValue.type); + debugCN(kDebugScript, "ScriptInterpreter::copyValue() Invalid source value type %d!\n", sourceValue.type); } break; @@ -498,7 +497,7 @@ void ScriptInterpreter::copyValue(ScriptValue &destValue, ScriptValue &sourceVal break; default: - printf("ScriptInterpreter::copyValue() Invalid dest value type %d!\n", destValue.type); + debugCN(kDebugScript, "ScriptInterpreter::copyValue() Invalid dest value type %d!\n", destValue.type); } @@ -533,7 +532,7 @@ void ScriptInterpreter::derefValue(ScriptValue &value) { break; default: - printf("ScriptInterpreter::derefValue() Invalid value type %d!\n", value.type); + debugCN(kDebugScript, "ScriptInterpreter::derefValue() Invalid value type %d!\n", value.type); } @@ -541,21 +540,21 @@ void ScriptInterpreter::derefValue(ScriptValue &value) { void ScriptInterpreter::callKernelFunction(uint32 index) { - printf("ScriptInterpreter::callKernelFunction() index = %d\n", index); + debugCN(kDebugScript, "ScriptInterpreter::callKernelFunction() index = %d\n", index); if (index > _kernelFunctionsMax) { - printf("ScriptInterpreter::callKernelFunction() Invalid kernel functionindex (%d)\n", index); + debugCN(kDebugScript, "ScriptInterpreter::callKernelFunction() Invalid kernel functionindex (%d)\n", index); return; } - printf("ScriptInterpreter::callKernelFunction() name = %s\n", _kernelFunctions[index].desc); + debugCN(kDebugScript, "ScriptInterpreter::callKernelFunction() name = %s\n", _kernelFunctions[index].desc); int args = (this->*(_kernelFunctions[index].proc))(); // Now remove values from the stack if the function used any if (args > 4) _stackPtr -= args - 4; - printf("-------------\n"); + debugCN(kDebugScript, "-------------\n"); } @@ -569,30 +568,29 @@ ScriptValue ScriptInterpreter::getArg(uint32 index) { } void ScriptInterpreter::dumpArgs(uint32 count) { - printf("ScriptInterpreter::dumpArgs() "); + debugCN(kDebugScript, "ScriptInterpreter::dumpArgs() "); for (uint32 i = 0; i < count; i++) { ScriptValue argValue = getArg(i); if (argValue.type == kConstString) { - printf("'%s'", toString(argValue)); + debugCN(kDebugScript, "'%s'", toString(argValue)); } else { - printf("%d", argValue.value); + debugCN(kDebugScript, "%d", argValue.value); } if (i + 1 < count) - printf(", "); + debugCN(kDebugScript, ", "); } - printf("\n"); + debugCN(kDebugScript, "\n"); } void ScriptInterpreter::callFunction(uint32 index) { // NOTE: This is a temporary hack for script functions not yet in the m4.dat if (index == 0xFFFFFFFF) return; - printf("ScriptInterpreter::callFunction() index = %d [%s]\n", index, _scriptFunctionNames[index].c_str()); - fflush(stdout); + debugCN(kDebugScript, "ScriptInterpreter::callFunction() index = %d [%s]\n", index, _scriptFunctionNames[index].c_str()); ScriptFunction *subFunction = loadFunction(index); if (!subFunction) { // This *should* never happen since the linker checks this - printf("ScriptInterpreter::callFunction() Function %d could not be loaded!\n", index); + debugCN(kDebugScript, "ScriptInterpreter::callFunction() Function %d could not be loaded!\n", index); return; } runFunction(subFunction); @@ -600,7 +598,7 @@ void ScriptInterpreter::callFunction(uint32 index) { bool ScriptInterpreter::execOpcode(byte opcode) { - printf("opcode = %d (%s)\n", opcode, opcodeNames[opcode]); + debugCN(kDebugScript, "opcode = %d (%s)\n", opcode, opcodeNames[opcode]); ScriptValue value1, value2, value3; uint32 temp; @@ -649,14 +647,14 @@ bool ScriptInterpreter::execOpcode(byte opcode) { case opJmp: temp = _runningFunction->readUint32(); - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); return true; case opJl: temp = _runningFunction->readUint32(); if (_cmpFlags < 0) { - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); } return true; @@ -664,7 +662,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) { case opJle: temp = _runningFunction->readUint32(); if (_cmpFlags <= 0) { - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); } return true; @@ -672,7 +670,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) { case opJg: temp = _runningFunction->readUint32(); if (_cmpFlags > 0) { - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); } return true; @@ -680,7 +678,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) { case opJge: temp = _runningFunction->readUint32(); if (_cmpFlags >= 0) { - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); } return true; @@ -688,7 +686,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) { case opJz: temp = _runningFunction->readUint32(); if (_cmpFlags == 0) { - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); } return true; @@ -696,17 +694,17 @@ bool ScriptInterpreter::execOpcode(byte opcode) { case opJnz: temp = _runningFunction->readUint32(); if (_cmpFlags != 0) { - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); } return true; case opJmpByTable: temp = _runningFunction->readUint32(); - printf("-> index = %d\n", _registers[0].value); + debugCN(kDebugScript, "-> index = %d\n", _registers[0].value); _runningFunction->jumpRelative(_registers[0].value * 4); temp = _runningFunction->readUint32(); - printf("-> ofs = %08X\n", temp); + debugCN(kDebugScript, "-> ofs = %08X\n", temp); _runningFunction->jumpAbsolute(temp); return true; @@ -718,8 +716,8 @@ bool ScriptInterpreter::execOpcode(byte opcode) { if (value1.type != kInteger || value2.type != kInteger) warning("ScriptInterpreter::execOpcode() Trying to compare non-integer values (%d, %d, line %d)", value1.type, value2.type, _lineNum); _cmpFlags = value1.value - value2.value; - printf("-> cmp %d, %d\n", value1.value, value2.value); - printf("-> _cmpFlags = %d\n", _cmpFlags); + debugCN(kDebugScript, "-> cmp %d, %d\n", value1.value, value2.value); + debugCN(kDebugScript, "-> _cmpFlags = %d\n", _cmpFlags); return true; case opCall: @@ -773,7 +771,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) { return true; default: - printf("Invalid opcode %d!\n", opcode); + debugCN(kDebugScript, "Invalid opcode %d!\n", opcode); return false; } @@ -922,14 +920,14 @@ int ScriptInterpreter::o1_wilburFinishedTalking() { int ScriptInterpreter::o1_preloadSound() { const char *name = STRING(0); int room = INTEGER(1); - printf("name = %s; room = %d\n", name, room); + debugCN(kDebugScript, "name = %s; room = %d\n", name, room); return 2; } int ScriptInterpreter::o1_unloadSound() { const char *name = STRING(0); int room = INTEGER(1); - printf("name = %s; room = %d\n", name, room); + debugCN(kDebugScript, "name = %s; room = %d\n", name, room); return 2; } @@ -939,7 +937,7 @@ int ScriptInterpreter::o1_playSound() { int volume = INTEGER(2); int trigger = INTEGER(3); int room = INTEGER(4); - printf("name = %s; channel = %d; volume = %d; trigger = %d; room = %d\n", + debugCN(kDebugScript, "name = %s; channel = %d; volume = %d; trigger = %d; room = %d\n", name, channel, volume, trigger, room); Common::String soundName = Common::String(name) + ".raw"; @@ -957,7 +955,7 @@ int ScriptInterpreter::o1_playLoopingSound() { int volume = INTEGER(2); int trigger = INTEGER(3); int room = INTEGER(4); - printf("name = %s; channel = %d; volume = %d; trigger = %d; room = %d\n", + debugCN(kDebugScript, "name = %s; channel = %d; volume = %d; trigger = %d; room = %d\n", name, channel, volume, trigger, room); // HACK until fixed @@ -968,14 +966,14 @@ int ScriptInterpreter::o1_playLoopingSound() { int ScriptInterpreter::o1_stopSound() { int channel = INTEGER(0); - printf("channel = %d\n", channel); + debugCN(kDebugScript, "channel = %d\n", channel); return 1; } int ScriptInterpreter::o1_fadeSetStart() { // skip arg 0: palette ptr int percent = INTEGER(1); - printf("percent = %d\n", percent); + debugCN(kDebugScript, "percent = %d\n", percent); return 2; } @@ -986,7 +984,7 @@ int ScriptInterpreter::o1_fadeInit() { int percent = INTEGER(3); int ticks = INTEGER(4); int trigger = INTEGER(5); - printf("first = %d; last = %d; percent = %d; ticks = %d; trigger = %d\n", + debugCN(kDebugScript, "first = %d; last = %d; percent = %d; ticks = %d; trigger = %d\n", first, last, percent, ticks, trigger); // HACK until palette fading is implemented @@ -1005,7 +1003,7 @@ int ScriptInterpreter::o1_initPaletteCycle() { int delay = INTEGER(2); int ticks = INTEGER(3); int trigger = INTEGER(4); - printf("first = %d; last = %d; delay = %d; ticks = %d; trigger = %d\n", + debugCN(kDebugScript, "first = %d; last = %d; delay = %d; ticks = %d; trigger = %d\n", first, last, delay, ticks, trigger); // HACK until palette cycling is implemented @@ -1022,12 +1020,11 @@ int ScriptInterpreter::o1_hasPlayerSaid() { const char *words[3]; for (int i = 0; i < 3; i++) words[i] = STRING(i); - printf("'%s', '%s', '%s'\n", words[0], words[1], words[2]); + debugCN(kDebugScript, "'%s', '%s', '%s'\n", words[0], words[1], words[2]); int result = _vm->_player->said(words[0], words[1], words[2]); - printf(" -> '%d'\n", result); - fflush(stdout); + debugCN(kDebugScript, " -> '%d'\n", result); RETURN(result); return 3; @@ -1038,12 +1035,11 @@ int ScriptInterpreter::o1_hasPlayerSaidAny() { for (int i = 0; i < 10; i++) words[i] = STRING(i); - printf("'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'\n", + debugCN(kDebugScript, "'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'\n", words[0], words[1], words[2], words[3], words[4], words[5], words[6], words[7], words[8], words[9]); int result = _vm->_player->saidAny(words[0], words[1], words[2], words[3], words[4], words[5], words[6], words[7], words[8], words[9]); - printf(" -> '%d'\n", result); - fflush(stdout); + debugCN(kDebugScript, " -> '%d'\n", result); RETURN(result); return 10; @@ -1059,13 +1055,13 @@ int ScriptInterpreter::o1_playerHotspotWalkOverride() { int y1 = INTEGER(1); int x2 = INTEGER(2); int y2 = INTEGER(3); - printf("(%d, %d); (%d, %d)\n", x1, y1, x2, y2); + debugCN(kDebugScript, "(%d, %d); (%d, %d)\n", x1, y1, x2, y2); return 4; } int ScriptInterpreter::o1_playerHasItem() { const char *name = STRING(0); - printf("item = '%s'\n", name); + debugCN(kDebugScript, "item = '%s'\n", name); // TODO RETURN(0); return 1; @@ -1075,14 +1071,14 @@ int ScriptInterpreter::o1_setWalkerLocation() { // skip arg 0: walker int x = INTEGER(1); int y = INTEGER(2); - printf("x = %d; y = %d\n", x, y); + debugCN(kDebugScript, "x = %d; y = %d\n", x, y); return 3; } int ScriptInterpreter::o1_setWalkerFacing() { // skip arg 0: walker int facing = INTEGER(1); - printf("facing = %d\n", facing); + debugCN(kDebugScript, "facing = %d\n", facing); return 2; } @@ -1090,7 +1086,7 @@ int ScriptInterpreter::o1_setHotspot() { // skip arg 0: hotspot list const char *name = STRING(1); int value = INTEGER(2); - printf("name = '%s' -> %d\n", name, value); + debugCN(kDebugScript, "name = '%s' -> %d\n", name, value); _vm->_scene->getSceneResources().hotspots->setActive(name, (value != 0)); @@ -1121,9 +1117,8 @@ int ScriptInterpreter::o1_playSeries() { int firstFrame = INTEGER(9); int lastFrame = INTEGER(10); - printf("name = %s; layer = %04X; flags = %08X; trigger = %d; frameRate = %d; loopCount = %d; scale = %d; x = %d; y = %d: firstFrame = %d; lastFrame = %d\n", + debugCN(kDebugScript, "name = %s; layer = %04X; flags = %08X; trigger = %d; frameRate = %d; loopCount = %d; scale = %d; x = %d; y = %d: firstFrame = %d; lastFrame = %d\n", name, layer, flags, trigger, frameRate, loopCount, scale, x, y, firstFrame, lastFrame); - fflush(stdout); // TODO: Return the machine to the script _vm->_ws->playSeries(name, layer, flags, trigger, frameRate, loopCount, scale, x, y, firstFrame, lastFrame); @@ -1142,9 +1137,8 @@ int ScriptInterpreter::o1_showSeries() { int x = INTEGER(7); int y = INTEGER(8); - printf("name = %s; layer = %04X; flags = %08X; trigger = %d; duration = %d; frameIndex = %d; scale = %d; x = %d; y = %d\n", + debugCN(kDebugScript, "name = %s; layer = %04X; flags = %08X; trigger = %d; duration = %d; frameIndex = %d; scale = %d; x = %d; y = %d\n", name, layer, flags, trigger, duration, frameIndex, scale, x, y); - fflush(stdout); // TODO: Return the machine to the script _vm->_ws->showSeries(name, layer, flags, trigger, duration, frameIndex, scale, x, y); @@ -1157,8 +1151,7 @@ int ScriptInterpreter::o1_loadSeries() { int hash = INTEGER(1); // skip arg 3: palette ptr - printf("name = %s; hash = %d\n", name, hash); - fflush(stdout); + debugCN(kDebugScript, "name = %s; hash = %d\n", name, hash); int result = _vm->_ws->loadSeries(name, hash, NULL); @@ -1189,7 +1182,7 @@ int ScriptInterpreter::o1_globalTriggerProc() { int value1 = INTEGER(0); int value2 = INTEGER(1); int value3 = INTEGER(2); - printf("%d; %d; %d\n", value1, value2, value3); + debugCN(kDebugScript, "%d; %d; %d\n", value1, value2, value3); return 3; } @@ -1197,13 +1190,13 @@ int ScriptInterpreter::o1_triggerTimerProc() { int value1 = INTEGER(0); int value2 = INTEGER(1); int value3 = INTEGER(2); - printf("%d; %d; %d\n", value1, value2, value3); + debugCN(kDebugScript, "%d; %d; %d\n", value1, value2, value3); return 3; } int ScriptInterpreter::o1_dispatchTrigger() { int trigger = INTEGER(0); - printf("trigger = %d\n", trigger); + debugCN(kDebugScript, "trigger = %d\n", trigger); _vm->_kernel->sendTrigger(trigger); //g_system->delayMillis(5000); @@ -1229,7 +1222,7 @@ int ScriptInterpreter::o1_wilburSaid() { SaidArrayItem *item = saidArray[i]; if (_vm->_player->said("LOOK AT", item->itemName) && item->digiNameLook) { - printf(" -> LOOK AT: '%s'\n", item->digiNameLook); + debugCN(kDebugScript, " -> LOOK AT: '%s'\n", item->digiNameLook); Common::String soundName = Common::String(item->digiNameLook) + ".raw"; _vm->_sound->playVoice(soundName.c_str(), 100); result = 1; @@ -1237,7 +1230,7 @@ int ScriptInterpreter::o1_wilburSaid() { } if (_vm->_player->said("TAKE", item->itemName) && item->digiNameTake) { - printf(" -> TAKE: '%s'\n", item->digiNameTake); + debugCN(kDebugScript, " -> TAKE: '%s'\n", item->digiNameTake); Common::String soundName = Common::String(item->digiNameTake) + ".raw"; _vm->_sound->playVoice(soundName.c_str(), 100); result = 1; @@ -1245,7 +1238,7 @@ int ScriptInterpreter::o1_wilburSaid() { } if (_vm->_player->said("GEAR", item->itemName) && item->digiNameGear) { - printf(" -> GEAR: '%s'\n", item->digiNameGear); + debugCN(kDebugScript, " -> GEAR: '%s'\n", item->digiNameGear); Common::String soundName = Common::String(item->digiNameGear) + ".raw"; _vm->_sound->playVoice(soundName.c_str(), 100); result = 1; @@ -1253,12 +1246,11 @@ int ScriptInterpreter::o1_wilburSaid() { } /* - printf("##### itemName = '%s'; digiNameLook = %s; digiNameTake = %s; digiNameGear = %s\n", + debugCN(kDebugScript, "##### itemName = '%s'; digiNameLook = %s; digiNameTake = %s; digiNameGear = %s\n", item->itemName, item->digiNameLook, item->digiNameTake, item->digiNameGear); */ } - printf(" -> '%d'\n", result); - fflush(stdout); + debugCN(kDebugScript, " -> '%d'\n", result); RETURN(result); return 1; @@ -1278,8 +1270,7 @@ int ScriptInterpreter::o1_wilburSpeech() { int volume = INTEGER(4); int slot = INTEGER(5); - printf("%s; %d; %d; %d; %d; %d\n", name, trigger, room, flag, volume, slot); - fflush(stdout); + debugCN(kDebugScript, "%s; %d; %d; %d; %d; %d\n", name, trigger, room, flag, volume, slot); //g_system->delayMillis(5000); KernelTriggerType oldTriggerMode = _vm->_kernel->triggerMode; @@ -1297,14 +1288,14 @@ int ScriptInterpreter::o1_wilburSpeech() { void ScriptInterpreter::getKernelVar(int index, ScriptValue &value) { - printf("ScriptInterpreter::getKernelVar() index = %d\n", index); + debugCN(kDebugScript, "ScriptInterpreter::getKernelVar() index = %d\n", index); if (index > _kernelVarsMax) { - printf("ScriptInterpreter::getKernelVar() Invalid kernel var index %d!\n", index); + debugCN(kDebugScript, "ScriptInterpreter::getKernelVar() Invalid kernel var index %d!\n", index); return; } - printf("ScriptInterpreter::getKernelVar() name = %s\n", _kernelVars[index].desc); + debugCN(kDebugScript, "ScriptInterpreter::getKernelVar() name = %s\n", _kernelVars[index].desc); ScriptKernelVariable var = _kernelVars[index].var; @@ -1342,7 +1333,7 @@ void ScriptInterpreter::getKernelVar(int index, ScriptValue &value) { break; default: - printf("ScriptInterpreter::getKernelVar() Invalid kernel var %d!\n", var); + debugCN(kDebugScript, "ScriptInterpreter::getKernelVar() Invalid kernel var %d!\n", var); //g_system->delayMillis(2000); } @@ -1351,14 +1342,14 @@ void ScriptInterpreter::getKernelVar(int index, ScriptValue &value) { void ScriptInterpreter::setKernelVar(int index, const ScriptValue &value) { - printf("ScriptInterpreter::setKernelVar() index = %d\n", index); + debugCN(kDebugScript, "ScriptInterpreter::setKernelVar() index = %d\n", index); if (index > _kernelVarsMax) { - printf("ScriptInterpreter::setKernelVar() Invalid kernel var index %d!\n", index); + debugCN(kDebugScript, "ScriptInterpreter::setKernelVar() Invalid kernel var index %d!\n", index); return; } - printf("ScriptInterpreter::setKernelVar() name = %s\n", _kernelVars[index].desc); + debugCN(kDebugScript, "ScriptInterpreter::setKernelVar() name = %s\n", _kernelVars[index].desc); ScriptKernelVariable var = _kernelVars[index].var; @@ -1366,31 +1357,31 @@ void ScriptInterpreter::setKernelVar(int index, const ScriptValue &value) { case kKernelTrigger: _vm->_kernel->trigger = toInteger(value); - printf("kKernelTrigger -> %d\n", toInteger(value)); + debugCN(kDebugScript, "kKernelTrigger -> %d\n", toInteger(value)); break; case kKernelTriggerMode: _vm->_kernel->triggerMode = (KernelTriggerType)toInteger(value); - printf("kKernelTrigger -> %d\n", toInteger(value)); + debugCN(kDebugScript, "kKernelTrigger -> %d\n", toInteger(value)); break; case kKernelContinueHandlingTrigger: _vm->_kernel->daemonTriggerAvailable = (toInteger(value) != 0); - printf("kKernelContinueHandlingTrigger -> %d\n", toInteger(value)); + debugCN(kDebugScript, "kKernelContinueHandlingTrigger -> %d\n", toInteger(value)); break; case kGameNewRoom: _vm->_kernel->newRoom = toInteger(value); - printf("kGameNewRoom -> %d\n", toInteger(value)); + debugCN(kDebugScript, "kGameNewRoom -> %d\n", toInteger(value)); break; case kPlayerCommandReady: // TODO - printf("kPlayerCommandReady -> %d\n", toInteger(value)); + debugCN(kDebugScript, "kPlayerCommandReady -> %d\n", toInteger(value)); break; default: - printf("ScriptInterpreter::setKernelVar() Invalid kernel var %d!\n", var); + debugCN(kDebugScript, "ScriptInterpreter::setKernelVar() Invalid kernel var %d!\n", var); //g_system->delayMillis(2000); } diff --git a/engines/m4/script.h b/engines/m4/script.h index 7382c05b67..2012926330 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -305,7 +305,7 @@ public: // Is this ok? template<class T> const T& toData(const ScriptValue &value) { - printf("ScriptInterpreter::toData() index = %d; type = %d; max = %d\n", value.value, _data[value.value]->type, _data.size()); + debugCN(kDebugScript, "ScriptInterpreter::toData() index = %d; type = %d; max = %d\n", value.value, _data[value.value]->type, _data.size()); assert((uint32)value.value < _data.size()); T *result = 0; _dataCache->load(_scriptFile, _data[value.value]->offset, result); diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp index e0fbd2f7a9..76f0cded46 100644 --- a/engines/m4/sound.cpp +++ b/engines/m4/sound.cpp @@ -194,7 +194,7 @@ void Sound::loadDSRFile(const char *fileName) { // Read header _dsrFile.entryCount = fileStream->readUint16LE(); - //printf("DSR has %i entries\n", _dsrFile.entryCount); + //warning(kDebugSound, "DSR has %i entries\n", _dsrFile.entryCount); for (int i = 0; i < _dsrFile.entryCount; i++) { DSREntry newEntry; @@ -206,13 +206,13 @@ void Sound::loadDSRFile(const char *fileName) { _dsrFile.dsrEntries.push_back(newEntry); /* - printf("%i: ", i); - printf("frequency: %i ", newEntry->frequency); - printf("channels: %i ", newEntry->channels); - printf("comp: %i ", newEntry.compSize); - printf("uncomp: %i ", newEntry.uncompSize); - printf("offset: %i ", newEntry->offset); - printf("\n"); + warning(kDebugSound, "%i: ", i); + warning(kDebugSound, "frequency: %i ", newEntry->frequency); + warning(kDebugSound, "channels: %i ", newEntry->channels); + warning(kDebugSound, "comp: %i ", newEntry.compSize); + warning(kDebugSound, "uncomp: %i ", newEntry.uncompSize); + warning(kDebugSound, "offset: %i ", newEntry->offset); + warning(kDebugSound, "\n"); */ } diff --git a/engines/m4/woodscript.cpp b/engines/m4/woodscript.cpp index 3ce0fa0f2f..ccd3401d3c 100644 --- a/engines/m4/woodscript.cpp +++ b/engines/m4/woodscript.cpp @@ -46,7 +46,7 @@ Bytecode::~Bytecode() { int Bytecode::loadInstruction(Instruction &instruction) { - //printf("Bytecode::loadInstruction() ip = %08X\n", _code->pos()); + //debugCN(kDebugScript, "Bytecode::loadInstruction() ip = %08X\n", _code->pos()); int32 format, data; uint32 code, code2; @@ -90,7 +90,7 @@ int Bytecode::loadInstruction(Instruction &instruction) { void Bytecode::jumpAbsolute(int32 ofs) { _code->seek(ofs * 4); - //printf("Bytecode::jumpAbsolute() ofs = %08X\n", _code->pos()); + //debugCN(kDebugScript, "Bytecode::jumpAbsolute() ofs = %08X\n", _code->pos()); } void Bytecode::jumpRelative(int32 ofs) { @@ -200,7 +200,7 @@ void WoodScript::runTimerSequenceRequests() { Machine *WoodScript::createMachine(int32 machineHash, Sequence *parentSeq, int32 dataHash, int32 dataRowIndex, int callbackHandler, const char *machineName) { - //printf("WoodScript::createMachine(%d)\n", machineHash); fflush(stdout); + //debugCN(kDebugScript, "WoodScript::createMachine(%d)\n", machineHash); Machine *machine = new Machine(this, machineHash, parentSeq, dataHash, dataRowIndex, callbackHandler, machineName, _machineId); _machineId++; @@ -228,7 +228,7 @@ Machine *WoodScript::playSeries(const char *seriesName, long layer, uint32 flags int32 frameRate, int32 loopCount, int32 s, int32 x, int32 y, int32 firstFrame, int32 lastFrame) { - //printf("WoodScript::playSeries(%s)\n", seriesName); + //debugCN(kDebugScript, "WoodScript::playSeries(%s)\n", seriesName); RGB8 *palette = NULL; if (flags & SERIES_LOAD_PALETTE) @@ -282,7 +282,7 @@ Machine *WoodScript::showSeries(const char *seriesName, long layer, uint32 flags } Machine *WoodScript::streamSeries(const char *seriesName, int32 frameRate, long layer, int32 triggerNum) { - //printf("WoodScript::streamSeries(%s)\n", seriesName); + //debugCN(kDebugScript, "WoodScript::streamSeries(%s)\n", seriesName); _globals[kGlobTemp1] = frameRate << 16; /* FIXME: Single frames from a stream series will be decompressed on-the-fly, contrary to "normal" sprite series, to save some memory, and since no random access to single diff --git a/engines/m4/ws_machine.cpp b/engines/m4/ws_machine.cpp index cb791026c9..3a25e3c622 100644 --- a/engines/m4/ws_machine.cpp +++ b/engines/m4/ws_machine.cpp @@ -147,7 +147,7 @@ void Machine::enterState() { int32 Machine::execInstruction() { - //printf("Machine::execInstruction()\n"); fflush(stdout); + //debugCN(kDebugScript, "Machine::execInstruction()\n"); bool done = false; Instruction instruction; @@ -160,12 +160,16 @@ int32 Machine::execInstruction() { if (machineConditionalsTable[instruction.instr - 64] != 0) (this->*machineConditionalsTable[instruction.instr - 64])(instruction); /* The next line is to yield on unimplemented opcodes */ - else { fflush(stdout); g_system->delayMillis(5000); } + else { + g_system->delayMillis(5000); + } } else if (instruction.instr > 0) { if (machineCommandsTable[instruction.instr] != 0) done = !(this->*machineCommandsTable[instruction.instr])(instruction); /* The next line is to yield on unimplemented opcodes */ - else { fflush(stdout); g_system->delayMillis(5000); } + else { + g_system->delayMillis(5000); + } if (done) { if (_id == machID) { //TODO: Cancel all requests @@ -199,7 +203,7 @@ void Machine::execBlock(int32 offset, int32 count) { int32 instruction = -1; - //printf("---------------------------------------\n"); fflush(stdout); + //debugCN(kDebugScript, "---------------------------------------\n"); while (instruction && instruction != 4 && _id == oldId && _recursionLevel == oldRecursionLevel && _code->pos() >= (uint32)startOffset && _code->pos() < (uint32)endOffset) { @@ -208,7 +212,7 @@ void Machine::execBlock(int32 offset, int32 count) { //g_system->delayMillis(500); } - //printf("---------------------------------------\n"); fflush(stdout); + //debugCN(kDebugScript, "---------------------------------------\n"); if (instruction == 3) { execInstruction(); @@ -221,7 +225,7 @@ void Machine::execBlock(int32 offset, int32 count) { } bool Machine::m1_gotoState(Instruction &instruction) { - //printf("Machine::m1_gotoState() state = %d\n", (int32)instruction.argv[0] >> 16); + //debugCN(kDebugScript, "Machine::m1_gotoState() state = %d\n", (int32)instruction.argv[0] >> 16); _currentState = (int32)instruction.argv[0] >> 16; _recursionLevel = 0; @@ -229,14 +233,14 @@ bool Machine::m1_gotoState(Instruction &instruction) { } bool Machine::m1_jump(Instruction &instruction) { - //printf("Machine::m1_jump() ofs = %08X\n", (int32)instruction.argv[0] >> 16); + //debugCN(kDebugScript, "Machine::m1_jump() ofs = %08X\n", (int32)instruction.argv[0] >> 16); _code->jumpRelative((int32)instruction.argv[0] >> 16); return true; } bool Machine::m1_terminate(Instruction &instruction) { - //printf("Machine::m1_terminate()\n"); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_terminate()\n"); _currentState = -1; _recursionLevel = 0; @@ -244,15 +248,15 @@ bool Machine::m1_terminate(Instruction &instruction) { } bool Machine::m1_startSequence(Instruction &instruction) { - //printf("Machine::m1_startSequence() sequence hash = %d\n", (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_startSequence() sequence hash = %d\n", (uint32)instruction.argv[0] >> 16); int32 sequenceHash = instruction.argv[0] >> 16; if (_sequence == NULL) { - //printf("Machine::m1_startSequence() creating new sequence\n"); + //debugCN(kDebugScript, "Machine::m1_startSequence() creating new sequence\n"); _sequence = _ws->createSequence(this, sequenceHash); _code->setSequence(_sequence); } else { - //printf("Machine::m1_startSequence() using existing sequence\n"); + //debugCN(kDebugScript, "Machine::m1_startSequence() using existing sequence\n"); _sequence->changeProgram(sequenceHash); //_code->setSequence(_sequence); } @@ -260,28 +264,28 @@ bool Machine::m1_startSequence(Instruction &instruction) { } bool Machine::m1_pauseSequence(Instruction &instruction) { - //printf("Machine::m1_pauseSequence()\n"); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_pauseSequence()\n"); _sequence->pause(); return true; } bool Machine::m1_resumeSequence(Instruction &instruction) { - //printf("Machine::m1_resumeSequence()\n"); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_resumeSequence()\n"); _sequence->resume(); return true; } bool Machine::m1_storeValue(Instruction &instruction) { - //printf("Machine::m1_storeValue() %p = %d (%08X)\n", (void*)instruction.argp[0], (uint32)instruction.argv[1], (uint32)instruction.argv[1]); + //debugCN(kDebugScript, "Machine::m1_storeValue() %p = %d (%08X)\n", (void*)instruction.argp[0], (uint32)instruction.argv[1], (uint32)instruction.argv[1]); *instruction.argp[0] = instruction.getValue(); return true; } bool Machine::m1_sendMessage(Instruction &instruction) { - //printf("Machine::m1_sendMessage() %p = %d (%08X)\n", (void*)instruction.argp[0], (uint32)instruction.argv[1], (uint32)instruction.argv[1]); + //debugCN(kDebugScript, "Machine::m1_sendMessage() %p = %d (%08X)\n", (void*)instruction.argp[0], (uint32)instruction.argv[1], (uint32)instruction.argv[1]); #if 0 //TODO @@ -300,7 +304,7 @@ bool Machine::m1_sendMessage(Instruction &instruction) { } bool Machine::m1_broadcastMessage(Instruction &instruction) { - //printf("Machine::m1_broadcastMessage() %p = %d (%08X)\n", (void*)instruction.argp[0], (uint32)instruction.argv[1], (uint32)instruction.argv[1]); + //debugCN(kDebugScript, "Machine::m1_broadcastMessage() %p = %d (%08X)\n", (void*)instruction.argp[0], (uint32)instruction.argv[1], (uint32)instruction.argv[1]); #if 0 //TODO @@ -317,7 +321,7 @@ bool Machine::m1_broadcastMessage(Instruction &instruction) { } bool Machine::m1_replyMessage(Instruction &instruction) { - //printf("Machine::m1_replyMessage() messageHash = %d; messageValue = %d\n", (uint32)instruction.argv[0], (uint32)instruction.argv[1]); + //debugCN(kDebugScript, "Machine::m1_replyMessage() messageHash = %d; messageValue = %d\n", (uint32)instruction.argv[0], (uint32)instruction.argv[1]); #if 0 if (myArg2) { msgValue = *myArg2; @@ -331,28 +335,28 @@ bool Machine::m1_replyMessage(Instruction &instruction) { } bool Machine::m1_sendSystemMessage(Instruction &instruction) { - //printf("Machine::m1_sendSystemMessage() messageValue = %d\n", (uint32)instruction.argv[0]); + //debugCN(kDebugScript, "Machine::m1_sendSystemMessage() messageValue = %d\n", (uint32)instruction.argv[0]); #if 0 #endif return true; } bool Machine::m1_createMachine(Instruction &instruction) { - //printf("Machine::m1_createMachine()\n"); + //debugCN(kDebugScript, "Machine::m1_createMachine()\n"); #if 0 #endif return true; } bool Machine::m1_createMachineEx(Instruction &instruction) { - //printf("Machine::m1_createMachineEx()\n"); + //debugCN(kDebugScript, "Machine::m1_createMachineEx()\n"); #if 0 #endif return true; } bool Machine::m1_clearVars(Instruction &instruction) { - //printf("Machine::m1_clearVars()\n"); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_clearVars()\n"); _sequence->clearVars(); return true; @@ -360,7 +364,7 @@ bool Machine::m1_clearVars(Instruction &instruction) { void Machine::m1_onEndSequence(Instruction &instruction) { - //printf("Machine::m1_onEndSequence() count = %08X\n", (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_onEndSequence() count = %08X\n", (uint32)instruction.argv[0] >> 16); int32 count = instruction.argv[0] >> 16; _sequence->issueEndOfSequenceRequest(_code->pos(), count); @@ -368,7 +372,7 @@ void Machine::m1_onEndSequence(Instruction &instruction) { } void Machine::m1_onMessage(Instruction &instruction) { - //printf("Machine::m1_onEndSequence() count = %08X\n", (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_onEndSequence() count = %08X\n", (uint32)instruction.argv[0] >> 16); // TODO: Add message to list @@ -378,42 +382,42 @@ void Machine::m1_onMessage(Instruction &instruction) { } void Machine::m1_switchLt(Instruction &instruction) { - //printf("Machine::m1_switchLt() %d < %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_switchLt() %d < %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); if (instruction.argv[1] >= instruction.argv[2]) _code->jumpRelative(instruction.argv[0] >> 16); } void Machine::m1_switchLe(Instruction &instruction) { - //printf("Machine::m1_switchLe() %d <= %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_switchLe() %d <= %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); if (instruction.argv[1] > instruction.argv[2]) _code->jumpRelative(instruction.argv[0] >> 16); } void Machine::m1_switchEq(Instruction &instruction) { - //printf("Machine::m1_switchEq() %d == %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_switchEq() %d == %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); if (instruction.argv[1] != instruction.argv[2]) _code->jumpRelative(instruction.argv[0] >> 16); } void Machine::m1_switchNe(Instruction &instruction) { - //printf("Machine::m1_switchNe() %d != %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_switchNe() %d != %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); if (instruction.argv[1] == instruction.argv[2]) _code->jumpRelative(instruction.argv[0] >> 16); } void Machine::m1_switchGe(Instruction &instruction) { - //printf("Machine::m1_switchGe() %d >= %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_switchGe() %d >= %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); if (instruction.argv[1] < instruction.argv[2]) _code->jumpRelative(instruction.argv[0] >> 16); } void Machine::m1_switchGt(Instruction &instruction) { - //printf("Machine::m1_switchGt() %d > %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); fflush(stdout); + //debugCN(kDebugScript, "Machine::m1_switchGt() %d > %d -> %08X\n", (uint32)instruction.argv[1], (uint32)instruction.argv[2], (uint32)instruction.argv[0] >> 16); if (instruction.argv[1] <= instruction.argv[2]) _code->jumpRelative(instruction.argv[0] >> 16); diff --git a/engines/m4/ws_sequence.cpp b/engines/m4/ws_sequence.cpp index 79869a81d0..bb6230d041 100644 --- a/engines/m4/ws_sequence.cpp +++ b/engines/m4/ws_sequence.cpp @@ -201,7 +201,7 @@ void Sequence::resume() { void Sequence::issueEndOfSequenceRequest(int32 codeOffset, int32 count) { - //printf("Sequence::issueEndOfSequenceRequest(%04X, %04X)\n", codeOffset, count); fflush(stdout); + //debugCN(kDebugScript, "Sequence::issueEndOfSequenceRequest(%04X, %04X)\n", codeOffset, count); //g_system->delayMillis(5000); _endOfSequenceRequest.codeOffset = codeOffset; @@ -216,7 +216,7 @@ bool Sequence::runProgram() { bool done = true; - //printf("_ws->getGlobal(kGlobTime) = %ld, _switchTime = %d\n", _ws->getGlobal(kGlobTime), _switchTime); + //debugCN(kDebugScript, "_ws->getGlobal(kGlobTime) = %ld, _switchTime = %d\n", _ws->getGlobal(kGlobTime), _switchTime); if (_switchTime >= 0 && _ws->getGlobal(kGlobTime) >= _switchTime) done = false; @@ -228,7 +228,9 @@ bool Sequence::runProgram() { _code->loadInstruction(instruction); if (sequenceCommandsTable[instruction.instr] != 0) done = !(this->*sequenceCommandsTable[instruction.instr])(instruction); - else { fflush(stdout); /*g_system->delayMillis(1000);*/ } + else { + //g_system->delayMillis(1000); + } } return _terminated; @@ -246,7 +248,7 @@ bool Sequence::changeProgram(int32 sequenceHash) { SequenceAsset *sequenceAsset = _ws->assets()->getSequence(sequenceHash); if (sequenceAsset->localVarCount() > _localVarCount) { - //printf("Sequence::changeProgram(%d) sequenceAsset->localVarCount() > _localVarCount\n", sequenceHash); + //debugCN(kDebugScript, "Sequence::changeProgram(%d) sequenceAsset->localVarCount() > _localVarCount\n", sequenceHash); return false; } @@ -301,14 +303,14 @@ void Sequence::draw(M4Surface *surface, const Common::Rect &clipRect, Common::Re } bool Sequence::s1_end(Instruction &instruction) { - //printf("Sequence::s1_end()\n"); + //debugCN(kDebugScript, "Sequence::s1_end()\n"); _terminated = true; return false; } bool Sequence::s1_clearVars(Instruction &instruction) { - //printf("Sequence::s1_clearVars()\n"); + //debugCN(kDebugScript, "Sequence::s1_clearVars()\n"); clearVars(); _vars[kSeqVarMachineID] = _machine->getId(); @@ -316,14 +318,14 @@ bool Sequence::s1_clearVars(Instruction &instruction) { } bool Sequence::s1_set(Instruction &instruction) { - //printf("Sequence::s1_set()\n"); + //debugCN(kDebugScript, "Sequence::s1_set()\n"); *instruction.argp[0] = instruction.getValue(); return true; } bool Sequence::s1_compare(Instruction &instruction) { - //printf("Sequence::s1_compare()\n"); + //debugCN(kDebugScript, "Sequence::s1_compare()\n"); long value = instruction.getValue(); if (instruction.argv[0] < value) @@ -336,28 +338,28 @@ bool Sequence::s1_compare(Instruction &instruction) { } bool Sequence::s1_add(Instruction &instruction) { - //printf("Sequence::s1_add()\n"); + //debugCN(kDebugScript, "Sequence::s1_add()\n"); *instruction.argp[0] += instruction.getValue(); return true; } bool Sequence::s1_sub(Instruction &instruction) { - //printf("Sequence::s1_sub()\n"); + //debugCN(kDebugScript, "Sequence::s1_sub()\n"); *instruction.argp[0] -= instruction.getValue(); return true; } bool Sequence::s1_mul(Instruction &instruction) { - //printf("Sequence::s1_mul()\n"); + //debugCN(kDebugScript, "Sequence::s1_mul()\n"); *instruction.argp[0] = FixedMul(instruction.argv[0], instruction.getValue()); return true; } bool Sequence::s1_div(Instruction &instruction) { - //printf("Sequence::s1_div()\n"); + //debugCN(kDebugScript, "Sequence::s1_div()\n"); // TODO: Catch divisor = 0 in FixedDiv *instruction.argp[0] = FixedDiv(instruction.argv[0], instruction.getValue()); @@ -365,7 +367,7 @@ bool Sequence::s1_div(Instruction &instruction) { } bool Sequence::s1_and(Instruction &instruction) { - //printf("Sequence::s1_and()\n"); + //debugCN(kDebugScript, "Sequence::s1_and()\n"); *instruction.argp[0] = instruction.argv[0] & instruction.getValue(); if (*instruction.argp[0]) @@ -376,7 +378,7 @@ bool Sequence::s1_and(Instruction &instruction) { } bool Sequence::s1_or(Instruction &instruction) { - //printf("Sequence::s1_or()\n"); + //debugCN(kDebugScript, "Sequence::s1_or()\n"); *instruction.argp[0] = instruction.argv[0] | instruction.getValue(); if (*instruction.argp[0]) @@ -387,7 +389,7 @@ bool Sequence::s1_or(Instruction &instruction) { } bool Sequence::s1_not(Instruction &instruction) { - //printf("Sequence::s1_not()\n"); + //debugCN(kDebugScript, "Sequence::s1_not()\n"); if (instruction.argv[0] == 0) { *instruction.argp[0] = 0x10000; @@ -400,7 +402,7 @@ bool Sequence::s1_not(Instruction &instruction) { } bool Sequence::s1_sin(Instruction &instruction) { - //printf("Sequence::s1_sin()\n"); + //debugCN(kDebugScript, "Sequence::s1_sin()\n"); int32 tempAngle = *instruction.argp[1] >> 16; if (tempAngle < 0) @@ -417,7 +419,7 @@ bool Sequence::s1_sin(Instruction &instruction) { } bool Sequence::s1_cos(Instruction &instruction) { - //printf("Sequence::s1_cos()\n"); + //debugCN(kDebugScript, "Sequence::s1_cos()\n"); int32 tempAngle = *instruction.argp[1] >> 16; if (tempAngle < 0) @@ -434,42 +436,42 @@ bool Sequence::s1_cos(Instruction &instruction) { } bool Sequence::s1_abs(Instruction &instruction) { - //printf("Sequence::s1_abs()\n"); + //debugCN(kDebugScript, "Sequence::s1_abs()\n"); *instruction.argp[0] = ABS(instruction.argv[1]); return true; } bool Sequence::s1_min(Instruction &instruction) { - //printf("Sequence::s1_min()\n"); + //debugCN(kDebugScript, "Sequence::s1_min()\n"); *instruction.argp[0] = MIN(instruction.argv[1], instruction.argv[2]); return true; } bool Sequence::s1_max(Instruction &instruction) { - //printf("Sequence::s1_max()\n"); + //debugCN(kDebugScript, "Sequence::s1_max()\n"); *instruction.argp[0] = MAX(instruction.argv[1], instruction.argv[2]); return true; } bool Sequence::s1_mod(Instruction &instruction) { - //printf("Sequence::s1_mod()\n"); + //debugCN(kDebugScript, "Sequence::s1_mod()\n"); *instruction.argp[0] = instruction.argv[0] % instruction.getValue(); return true; } bool Sequence::s1_floor(Instruction &instruction) { - //printf("Sequence::s1_floor()\n"); + //debugCN(kDebugScript, "Sequence::s1_floor()\n"); *instruction.argp[0] = instruction.getValue() & 0xffff0000; return true; } bool Sequence::s1_round(Instruction &instruction) { - //printf("Sequence::s1_round()\n"); + //debugCN(kDebugScript, "Sequence::s1_round()\n"); if ((*instruction.argp[1] & 0xffff) >= 0x8000) *instruction.argp[0] = (*instruction.argp[1] + 0x10000) & 0xffff0000; @@ -479,7 +481,7 @@ bool Sequence::s1_round(Instruction &instruction) { } bool Sequence::s1_ceil(Instruction &instruction) { - //printf("Sequence::s1_ceil()\n"); + //debugCN(kDebugScript, "Sequence::s1_ceil()\n"); if ((*instruction.argp[1] & 0xffff) >= 0) *instruction.argp[0] = (*instruction.argp[1] + 0x10000) & 0xffff0000; @@ -489,19 +491,19 @@ bool Sequence::s1_ceil(Instruction &instruction) { } bool Sequence::s1_point(Instruction &instruction) { - printf("Sequence::s1_point()\n"); + debugCN(kDebugScript, "Sequence::s1_point()\n"); // TODO return true; } bool Sequence::s1_dist2d(Instruction &instruction) { - printf("Sequence::s1_dist2d()\n"); + debugCN(kDebugScript, "Sequence::s1_dist2d()\n"); // TODO return true; } bool Sequence::s1_crunch(Instruction &instruction) { - //printf("Sequence::s1_crunch()\n"); + //debugCN(kDebugScript, "Sequence::s1_crunch()\n"); long deltaTime; @@ -515,12 +517,12 @@ bool Sequence::s1_crunch(Instruction &instruction) { _startTime = _ws->getGlobal(kGlobTime); - //printf("deltaTime = %ld\n", deltaTime >> 16); fflush(stdout); + //debugCN(kDebugScript, "deltaTime = %ld\n", deltaTime >> 16); //g_system->delayMillis(5000); if (deltaTime >= 0) { _switchTime = _ws->getGlobal(kGlobTime) + (deltaTime >> 16); - //printf("_ws->getGlobal(kGlobTime) = %ld\n", _ws->getGlobal(kGlobTime)); fflush(stdout); + //debugCN(kDebugScript, "_ws->getGlobal(kGlobTime) = %ld\n", _ws->getGlobal(kGlobTime)); //g_system->delayMillis(5000); } else { _switchTime = -1; @@ -532,7 +534,7 @@ bool Sequence::s1_crunch(Instruction &instruction) { } bool Sequence::s1_branch(Instruction &instruction) { - //printf("Sequence::s1_branch()\n"); + //debugCN(kDebugScript, "Sequence::s1_branch()\n"); uint32 ofs = instruction.argv[1] >> 16; switch (instruction.argv[0] >> 16) { @@ -569,7 +571,7 @@ bool Sequence::s1_branch(Instruction &instruction) { } bool Sequence::s1_setFrame(Instruction &instruction) { - //printf("Sequence::s1_setFrame()\n"); + //debugCN(kDebugScript, "Sequence::s1_setFrame()\n"); int32 frameIndex; if (instruction.argc == 3) { @@ -580,8 +582,8 @@ bool Sequence::s1_setFrame(Instruction &instruction) { frameIndex = (instruction.argv[0] & 0xFF0000) >> 16; } - //printf("Sequence::s1_setFrame() spriteHash = %d\n", (uint32)instruction.argv[0] >> 24); - //printf("Sequence::s1_setFrame() frameIndex = %d\n", frameIndex); + //debugCN(kDebugScript, "Sequence::s1_setFrame() spriteHash = %d\n", (uint32)instruction.argv[0] >> 24); + //debugCN(kDebugScript, "Sequence::s1_setFrame() frameIndex = %d\n", frameIndex); SpriteAsset *spriteAsset = _ws->assets()->getSprite((uint32)instruction.argv[0] >> 24); _curFrame = spriteAsset->getFrame(frameIndex); @@ -590,25 +592,25 @@ bool Sequence::s1_setFrame(Instruction &instruction) { } bool Sequence::s1_sendMessage(Instruction &instruction) { - printf("Sequence::s1_sendMessage()\n"); + debugCN(kDebugScript, "Sequence::s1_sendMessage()\n"); // TODO return true; } bool Sequence::s1_push(Instruction &instruction) { - printf("Sequence::s1_push()\n"); + debugCN(kDebugScript, "Sequence::s1_push()\n"); // TODO return true; } bool Sequence::s1_pop(Instruction &instruction) { - printf("Sequence::s1_pop()\n"); + debugCN(kDebugScript, "Sequence::s1_pop()\n"); // TODO return true; } bool Sequence::s1_jumpSub(Instruction &instruction) { - //printf("Sequence::s1_jumpSub()\n"); + //debugCN(kDebugScript, "Sequence::s1_jumpSub()\n"); _returnHashes[_returnStackIndex] = _sequenceHash; _returnOffsets[_returnStackIndex] = _code->pos(); @@ -628,7 +630,7 @@ bool Sequence::s1_jumpSub(Instruction &instruction) { } bool Sequence::s1_return(Instruction &instruction) { - //printf("Sequence::s1_return()\n"); + //debugCN(kDebugScript, "Sequence::s1_return()\n"); if (_returnStackIndex <= 0) return s1_end(instruction); @@ -652,7 +654,7 @@ bool Sequence::s1_return(Instruction &instruction) { } bool Sequence::s1_getFrameCount(Instruction &instruction) { - //printf("Sequence::s1_getFrameCount()\n"); + //debugCN(kDebugScript, "Sequence::s1_getFrameCount()\n"); SpriteAsset *spriteAsset = _ws->assets()->getSprite(instruction.argv[1] >> 24); *instruction.argp[0] = spriteAsset->getCount() << 16; @@ -660,7 +662,7 @@ bool Sequence::s1_getFrameCount(Instruction &instruction) { } bool Sequence::s1_getFrameRate(Instruction &instruction) { - //printf("Sequence::s1_getFrameRate()\n"); + //debugCN(kDebugScript, "Sequence::s1_getFrameRate()\n"); SpriteAsset *spriteAsset = _ws->assets()->getSprite(instruction.argv[1] >> 24); *instruction.argp[0] = spriteAsset->getFrameRate(); @@ -668,37 +670,37 @@ bool Sequence::s1_getFrameRate(Instruction &instruction) { } bool Sequence::s1_getCelsPixSpeed(Instruction &instruction) { - printf("Sequence::s1_getCelsPixSpeed()\n"); + debugCN(kDebugScript, "Sequence::s1_getCelsPixSpeed()\n"); // TODO return true; } bool Sequence::s1_setIndex(Instruction &instruction) { - printf("Sequence::s1_setIndex()\n"); + debugCN(kDebugScript, "Sequence::s1_setIndex()\n"); // TODO return true; } bool Sequence::s1_setLayer(Instruction &instruction) { - printf("Sequence::s1_setLayer()\n"); + debugCN(kDebugScript, "Sequence::s1_setLayer()\n"); //TODO return true; } bool Sequence::s1_setDepth(Instruction &instruction) { - printf("Sequence::s1_setDepth()\n"); + debugCN(kDebugScript, "Sequence::s1_setDepth()\n"); //TODO return true; } bool Sequence::s1_setData(Instruction &instruction) { - printf("Sequence::s1_setData()\n"); + debugCN(kDebugScript, "Sequence::s1_setData()\n"); //TODO return true; } bool Sequence::s1_openStream(Instruction &instruction) { - //printf("Sequence::s1_openStream()\n"); + //debugCN(kDebugScript, "Sequence::s1_openStream()\n"); _stream = _vm->res()->openFile(_machine->name().c_str()); streamOpen(); @@ -706,14 +708,14 @@ bool Sequence::s1_openStream(Instruction &instruction) { } bool Sequence::s1_streamNextFrame(Instruction &instruction) { - //printf("Sequence::s1_streamNextFrame()\n"); + //debugCN(kDebugScript, "Sequence::s1_streamNextFrame()\n"); streamNextFrame(); return true; } bool Sequence::s1_closeStream(Instruction &instruction) { - printf("Sequence::s1_closeStream()\n"); + debugCN(kDebugScript, "Sequence::s1_closeStream()\n"); //TODO return true; } @@ -726,8 +728,7 @@ bool Sequence::streamOpen() { _vars[kSeqVarSpriteFrameCount] = _streamSpriteAsset->getCount() << 16; _vars[kSeqVarSpriteFrameRate] = _streamSpriteAsset->getFrameRate() << 16; - //printf("Sequence::streamOpen() frames = %d; max = %d x %d\n", _streamSpriteAsset->getCount(), _streamSpriteAsset->getMaxFrameWidth(), _streamSpriteAsset->getMaxFrameHeight()); - //fflush(stdout); + //debugCN(kDebugScript, "Sequence::streamOpen() frames = %d; max = %d x %d\n", _streamSpriteAsset->getCount(), _streamSpriteAsset->getMaxFrameWidth(), _streamSpriteAsset->getMaxFrameHeight()); _curFrame = new M4Sprite(_vm, _streamSpriteAsset->getMaxFrameWidth(), _streamSpriteAsset->getMaxFrameHeight()); streamNextFrame(); diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index cdcb49f9f9..ecc2378f15 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -295,7 +295,6 @@ void MenuResource::load(byte *source, int size) { _strings.push_back(string); debug(2, "%02d: %s\n", i, string); } - fflush(stdout); delete sourceS; } diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp index e00a087923..f67a77aa21 100644 --- a/engines/parallaction/detection.cpp +++ b/engines/parallaction/detection.cpp @@ -325,7 +325,7 @@ int ParallactionMetaEngine::getMaximumSaveSlot() const { return 99; } void ParallactionMetaEngine::removeSaveState(const char *target, int slot) const { Common::String filename = ConfMan.getDomain(target)->getVal("gameid"); - filename += Common::String::printf(".0%02d", slot); + filename += Common::String::format(".0%02d", slot); g_system->getSavefileManager()->removeSavefile(filename); } diff --git a/engines/parallaction/font.cpp b/engines/parallaction/font.cpp index d1c67f1338..bf2bf6d419 100644 --- a/engines/parallaction/font.cpp +++ b/engines/parallaction/font.cpp @@ -574,7 +574,7 @@ void AmigaFont::blitData(byte c) { } uint16 AmigaFont::width(byte c) { -// printf("kern(%i) = %i, space(%i) = %i\t", c, getKerning(c), c, getSpacing(c)); +// debug("kern(%i) = %i, space(%i) = %i\t", c, getKerning(c), c, getSpacing(c)); return getKerning(c) + getSpacing(c); } @@ -642,7 +642,7 @@ Font *AmigaDisk_ns::createFont(const char *name, Common::SeekableReadStream &str } Font *DosDisk_br::createFont(const char *name, Common::ReadStream &stream) { -// printf("DosDisk_br::createFont(%s)\n", name); +// debug("DosDisk_br::createFont(%s)", name); Font *font; if (_vm->getFeatures() & GF_DEMO) { diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index ff24a06ceb..994cfa46fb 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -23,7 +23,6 @@ * */ - #include "parallaction/parallaction.h" #include "parallaction/parser.h" #include "parallaction/sound.h" @@ -1284,7 +1283,7 @@ DECLARE_ZONE_PARSER(commands) { DECLARE_ZONE_PARSER(label) { debugC(7, kDebugParser, "ZONE_PARSER(label) "); -// printf("label: %s", _tokens[1]); +// debug("label: %s", _tokens[1]); ctxt.z->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]); ctxt.z->_flags &= ~kFlagsNoName; } diff --git a/engines/queen/debug.cpp b/engines/queen/debug.cpp index 1abb2415d2..f4d7cf3b2e 100644 --- a/engines/queen/debug.cpp +++ b/engines/queen/debug.cpp @@ -149,12 +149,12 @@ bool Debugger::Cmd_Items(int argc, const char **argv) { bool Debugger::Cmd_PrintBobs(int argc, const char**argv) { int i; BobSlot *bob = _vm->graphics()->bob(0); - DebugPrintf("+--------------------------------+\n"); - DebugPrintf("|# | x| y|f|scl|frm|a|m| ex| ey|\n"); - DebugPrintf("+--+---+---+-+---+---+-+-+---+---+\n"); + DebugPrintf("+------------------------------------+\n"); + DebugPrintf("|# | x| y|f|scl|frm|a|m|spd| ex| ey|\n"); + DebugPrintf("+--+---+---+-+---+---+-+-+---+---+---+\n"); for (i = 0; i < Graphics::MAX_BOBS_NUMBER; ++i, ++bob) { if (bob->active) { - DebugPrintf("|%2d|%3d|%3d|%1d|%3d|%3d|%1d|%1d|%3d|%3d|\n", + DebugPrintf("|%2d|%3d|%3d|%1d|%3d|%3d|%1d|%1d|%3d|%3d|%3d|\n", i, bob->x, bob->y, bob->xflip, bob->scale, bob->frameNum, bob->animating, bob->moving, bob->speed, bob->endx, bob->endy); } diff --git a/engines/queen/logic.cpp b/engines/queen/logic.cpp index 053312c584..de254300b6 100644 --- a/engines/queen/logic.cpp +++ b/engines/queen/logic.cpp @@ -1550,7 +1550,7 @@ void Logic::asmEndGame() { while (n--) { _vm->update(); } -// printf("Game completed."); +// debug("Game completed."); _vm->quitGame(); } @@ -2004,7 +2004,7 @@ void Logic::asmPanLeftToBomb() { } void Logic::asmEndDemo() { -// printf("Flight of the Amazon Queen, released January 95."); +// debug("Flight of the Amazon Queen, released January 95."); _vm->quitGame(); } @@ -2049,7 +2049,7 @@ void Logic::asmInterviewIntro() { } void Logic::asmEndInterview() { -// printf("Interactive Interview copyright (c) 1995, IBI."); +// debug("Interactive Interview copyright (c) 1995, IBI."); _vm->quitGame(); } diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index deab3dadd8..42b1d06e11 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -761,7 +761,7 @@ bool Console::cmdHexgrep(int argc, const char **argv) { if (argc < 4) { DebugPrintf("Searches some resources for a particular sequence of bytes, represented as hexadecimal numbers.\n"); DebugPrintf("Usage: %s <resource type> <resource number> <search string>\n", argv[0]); - DebugPrintf("<resource number> can be a specific resource number, or \"all\" for all of the resources of the specified type\n", argv[0]); + DebugPrintf("<resource number> can be a specific resource number, or \"all\" for all of the resources of the specified type\n"); DebugPrintf("EXAMPLES:\n hexgrep script all e8 03 c8 00\n hexgrep pic 042 fe"); cmdResourceTypes(argc, argv); return true; @@ -1383,9 +1383,9 @@ bool Console::cmdSaid(int argc, const char **argv) { } spec[len++] = 0xFF; - printf("Matching '%s' against:", string); + debugN("Matching '%s' against:", string); _engine->getVocabulary()->debugDecipherSaidBlock(spec); - printf("\n"); + debugN("\n"); ResultWordListList words; bool res = _engine->getVocabulary()->tokenizeString(words, string, &error); @@ -3154,24 +3154,24 @@ static void midi_hexdump(byte *data, int size, int notational_offset) { int blanks = 0; offset += offset_mod; - printf(" [%04x] %d\t", + debugN(" [%04x] %d\t", old_offset + notational_offset, time); cmd = data[offset]; if (!(cmd & 0x80)) { cmd = prev; if (prev < 0x80) { - printf("Track broken at %x after" + debugN("Track broken at %x after" " offset mod of %d\n", offset + notational_offset, offset_mod); Common::hexdump(data, size, 16, notational_offset); return; } - printf("(rs %02x) ", cmd); + debugN("(rs %02x) ", cmd); blanks += 8; } else { ++offset; - printf("%02x ", cmd); + debugN("%02x ", cmd); blanks += 3; } prev = cmd; @@ -3183,37 +3183,37 @@ static void midi_hexdump(byte *data, int size, int notational_offset) { for (i = 0; i < pleft; i++) { if (i == 0) firstarg = data[offset]; - printf("%02x ", data[offset++]); + debugN("%02x ", data[offset++]); blanks += 3; } while (blanks < 16) { blanks += 4; - printf(" "); + debugN(" "); } while (blanks < 20) { ++blanks; - printf(" "); + debugN(" "); } if (cmd == SCI_MIDI_EOT) - printf(";; EOT"); + debugN(";; EOT"); else if (cmd == SCI_MIDI_SET_SIGNAL) { if (firstarg == SCI_MIDI_SET_SIGNAL_LOOP) - printf(";; LOOP point"); + debugN(";; LOOP point"); else - printf(";; CUE (%d)", firstarg); + debugN(";; CUE (%d)", firstarg); } else if (SCI_MIDI_CONTROLLER(cmd)) { if (firstarg == SCI_MIDI_CUMULATIVE_CUE) - printf(";; CUE (cumulative)"); + debugN(";; CUE (cumulative)"); else if (firstarg == SCI_MIDI_RESET_ON_SUSPEND) - printf(";; RESET-ON-SUSPEND flag"); + debugN(";; RESET-ON-SUSPEND flag"); } - printf("\n"); + debugN("\n"); if (old_offset >= offset) { - printf("-- Not moving forward anymore," + debugN("-- Not moving forward anymore," " aborting (%x/%x)\n", offset, old_offset); return; } @@ -3692,22 +3692,22 @@ void Console::hexDumpReg(const reg_t *data, int len, int regsPerLine, int startO byte c; int offset = startOffset; while (len >= regsPerLine) { - printf("%06x: ", offset); + debugN("%06x: ", offset); for (i = 0; i < regsPerLine; i++) { - printf("%04x:%04x ", PRINT_REG(data[i])); + debugN("%04x:%04x ", PRINT_REG(data[i])); } - printf(" |"); + debugN(" |"); for (i = 0; i < regsPerLine; i++) { c = data[i].toUint16() & 0xff; if (c < 32 || c >= 127) c = '.'; - printf("%c", c); + debugN("%c", c); c = data[i].toUint16() >> 8; if (c < 32 || c >= 127) c = '.'; - printf("%c", c); + debugN("%c", c); } - printf("|\n"); + debugN("|\n"); data += regsPerLine; len -= regsPerLine; offset += regsPerLine * (isArray ? 1 : 2); @@ -3716,27 +3716,27 @@ void Console::hexDumpReg(const reg_t *data, int len, int regsPerLine, int startO if (len <= 0) return; - printf("%06x: ", offset); + debugN("%06x: ", offset); for (i = 0; i < regsPerLine; i++) { if (i < len) - printf("%04x:%04x ", PRINT_REG(data[i])); + debugN("%04x:%04x ", PRINT_REG(data[i])); else - printf(" "); + debugN(" "); } - printf(" |"); + debugN(" |"); for (i = 0; i < len; i++) { c = data[i].toUint16() & 0xff; if (c < 32 || c >= 127) c = '.'; - printf("%c", c); + debugN("%c", c); c = data[i].toUint16() >> 8; if (c < 32 || c >= 127) c = '.'; - printf("%c", c); + debugN("%c", c); } for (; i < regsPerLine; i++) - printf(" "); - printf("|\n"); + debugN(" "); + debugN("|\n"); } } // End of namespace Sci diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 2292692ac1..80da7b1375 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -676,7 +676,7 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const { } SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int slot) const { - Common::String fileName = Common::String::printf("%s.%03d", target, slot); + Common::String fileName = Common::String::format("%s.%03d", target, slot); Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName); if (in) { @@ -727,12 +727,12 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl int SciMetaEngine::getMaximumSaveSlot() const { return 99; } void SciMetaEngine::removeSaveState(const char *target, int slot) const { - Common::String fileName = Common::String::printf("%s.%03d", target, slot); + Common::String fileName = Common::String::format("%s.%03d", target, slot); g_system->getSavefileManager()->removeSavefile(fileName); } Common::Error SciEngine::loadGameState(int slot) { - Common::String fileName = Common::String::printf("%s.%03d", _targetName.c_str(), slot); + Common::String fileName = Common::String::format("%s.%03d", _targetName.c_str(), slot); Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager(); Common::SeekableReadStream *in = saveFileMan->openForLoading(fileName); @@ -751,7 +751,7 @@ Common::Error SciEngine::loadGameState(int slot) { } Common::Error SciEngine::saveGameState(int slot, const char *desc) { - Common::String fileName = Common::String::printf("%s.%03d", _targetName.c_str(), slot); + Common::String fileName = Common::String::format("%s.%03d", _targetName.c_str(), slot); Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager(); Common::OutSaveFile *out = saveFileMan->openForSaving(fileName); const char *version = ""; diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index b1ee6abaff..408dc5f150 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -66,12 +66,12 @@ const Common::String &Kernel::getSelectorName(uint selector) { // We need this for proper workaround tables // TODO: maybe check, if there is a fixed selector-table and error() out in that case for (uint loopSelector = _selectorNames.size(); loopSelector <= selector; ++loopSelector) - _selectorNames.push_back(Common::String::printf("<noname%d>", loopSelector)); + _selectorNames.push_back(Common::String::format("<noname%d>", loopSelector)); } // Ensure that the selector has a name if (_selectorNames[selector].empty()) - _selectorNames[selector] = Common::String::printf("<noname%d>", selector); + _selectorNames[selector] = Common::String::format("<noname%d>", selector); return _selectorNames[selector]; } @@ -138,7 +138,7 @@ void Kernel::loadSelectorNames() { Common::String tmp((const char *)r->data + offset + 2, len); _selectorNames.push_back(tmp); - //printf("%s\n", tmp.c_str()); // debug + //debug("%s", tmp.c_str()); // Early SCI versions used the LSB in the selector ID as a read/write // toggle. To compensate for that, we add every selector name twice. @@ -430,8 +430,8 @@ static void kernelSignatureDebugType(const uint16 type) { while (list->typeCheck) { if (type & list->typeCheck) { if (!firstPrint) - printf(", "); - printf("%s", list->text); + debugN(", "); + debugN("%s", list->text); firstPrint = false; } list++; @@ -442,38 +442,38 @@ static void kernelSignatureDebugType(const uint16 type) { void Kernel::signatureDebug(const uint16 *sig, int argc, const reg_t *argv) { int argnr = 0; while (*sig || argc) { - printf("parameter %d: ", argnr++); + debugN("parameter %d: ", argnr++); if (argc) { reg_t parameter = *argv; - printf("%04x:%04x (", PRINT_REG(parameter)); + debugN("%04x:%04x (", PRINT_REG(parameter)); int regType = findRegType(parameter); if (regType) kernelSignatureDebugType(regType); else - printf("unknown type of %04x:%04x", PRINT_REG(parameter)); - printf(")"); + debugN("unknown type of %04x:%04x", PRINT_REG(parameter)); + debugN(")"); argv++; argc--; } else { - printf("not passed"); + debugN("not passed"); } if (*sig) { const uint16 signature = *sig; if ((signature & SIG_MAYBE_ANY) == SIG_MAYBE_ANY) { - printf(", may be any"); + debugN(", may be any"); } else { - printf(", should be "); + debugN(", should be "); kernelSignatureDebugType(signature); } if (signature & SIG_IS_OPTIONAL) - printf(" (optional)"); + debugN(" (optional)"); if (signature & SIG_NEEDS_MORE) - printf(" (needs more)"); + debugN(" (needs more)"); if (signature & SIG_MORE_MAY_FOLLOW) - printf(" (more may follow)"); + debugN(" (more may follow)"); sig++; } - printf("\n"); + debugN("\n"); } } diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 724ceee878..7aed908c5e 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -437,7 +437,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(StrCmp), SIG_EVERYWHERE, "rr(i)", NULL, NULL }, { MAP_CALL(StrCpy), SIG_EVERYWHERE, "r[r0](i)", NULL, NULL }, { MAP_CALL(StrEnd), SIG_EVERYWHERE, "r", NULL, NULL }, - { MAP_CALL(StrLen), SIG_EVERYWHERE, "[r0]", NULL, NULL }, + { MAP_CALL(StrLen), SIG_EVERYWHERE, "[r0]", NULL, kStrLen_workarounds }, { MAP_CALL(StrSplit), SIG_EVERYWHERE, "rr[r0]", NULL, NULL }, { MAP_CALL(TextColors), SIG_EVERYWHERE, "(i*)", NULL, NULL }, { MAP_CALL(TextFonts), SIG_EVERYWHERE, "(i*)", NULL, NULL }, diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 3b41c851e1..324cb642d4 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -584,7 +584,7 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { g_system->getTimeAndDate(curTime); curTime.tm_year += 1900; // fixup year curTime.tm_mon++; // fixup month - game_description = Common::String::printf("%02d.%02d.%04d / %02d:%02d:%02d", curTime.tm_mday, curTime.tm_mon, curTime.tm_year, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); + game_description = Common::String::format("%02d.%02d.%04d / %02d:%02d:%02d", curTime.tm_mday, curTime.tm_mon, curTime.tm_year, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); } delete dialog; g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save) diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index 792181b832..f90a5b4353 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -126,14 +126,14 @@ reg_t kTimesSin(EngineState *s, int argc, reg_t *argv) { int angle = argv[0].toSint16(); int factor = argv[1].toSint16(); - return make_reg(0, (int)(factor * sin(angle * PI / 180.0))); + return make_reg(0, (int16)(factor * sin(angle * PI / 180.0))); } reg_t kTimesCos(EngineState *s, int argc, reg_t *argv) { int angle = argv[0].toSint16(); int factor = argv[1].toSint16(); - return make_reg(0, (int)(factor * cos(angle * PI / 180.0))); + return make_reg(0, (int16)(factor * cos(angle * PI / 180.0))); } reg_t kCosDiv(EngineState *s, int argc, reg_t *argv) { diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 6d3cd78586..a92a7a2645 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -164,7 +164,7 @@ reg_t kFlushResources(EngineState *s, int argc, reg_t *argv) { } reg_t kSetDebug(EngineState *s, int argc, reg_t *argv) { - printf("Debug mode activated\n"); + debug("Debug mode activated"); g_sci->_debugState.seeking = kDebugSeekNothing; g_sci->_debugState.runningStep = 0; @@ -424,12 +424,12 @@ reg_t kStub(EngineState *s, int argc, reg_t *argv) { } Common::String warningMsg = "Dummy function k" + kernel->getKernelName(kernelCallNr) + - Common::String::printf("[%x]", kernelCallNr) + + Common::String::format("[%x]", kernelCallNr) + " invoked. Params: " + - Common::String::printf("%d", argc) + " ("; + Common::String::format("%d", argc) + " ("; for (int i = 0; i < argc; i++) { - warningMsg += Common::String::printf("%04x:%04x", PRINT_REG(argv[i])); + warningMsg += Common::String::format("%04x:%04x", PRINT_REG(argv[i])); warningMsg += (i == argc - 1 ? ")" : ", "); } diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp index 6a052a582d..0b55c0fce7 100644 --- a/engines/sci/engine/kparse.cpp +++ b/engines/sci/engine/kparse.cpp @@ -62,7 +62,7 @@ reg_t kSaid(EngineState *s, int argc, reg_t *argv) { } #ifdef DEBUG_PARSER - printf("Said block: "); + debugN("Said block: "); g_sci->getVocabulary()->debugDecipherSaidBlock(said_block); #endif @@ -74,7 +74,7 @@ reg_t kSaid(EngineState *s, int argc, reg_t *argv) { if (new_lastmatch != SAID_NO_MATCH) { /* Build and possibly display a parse tree */ #ifdef DEBUG_PARSER - printf("kSaid: Match.\n"); + debugN("kSaid: Match.\n"); #endif s->r_acc = make_reg(0, 1); diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index e97ae38702..f52068bc8b 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -287,10 +287,10 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { // Looks to be setting the video size and position. Called with 4 extra integer // parameters (e.g. 86, 41, 235, 106) default: - warningMsg = Common::String::printf("PlayVMD - unsupported subop %d. Params: %d (", operation, argc); + warningMsg = Common::String::format("PlayVMD - unsupported subop %d. Params: %d (", operation, argc); for (int i = 0; i < argc; i++) { - warningMsg += Common::String::printf("%04x:%04x", PRINT_REG(argv[i])); + warningMsg += Common::String::format("%04x:%04x", PRINT_REG(argv[i])); warningMsg += (i == argc - 1 ? ")" : ", "); } diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index 6e1b326c4f..046ed4e500 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -218,7 +218,7 @@ int MessageState::nextMessage(reg_t buf) { return record.talker; } else { MessageTuple &t = _cursorStack.top(); - outputString(buf, Common::String::printf("Msg %d: %d %d %d %d not found", _cursorStack.getModule(), t.noun, t.verb, t.cond, t.seq)); + outputString(buf, Common::String::format("Msg %d: %d %d %d %d not found", _cursorStack.getModule(), t.noun, t.verb, t.cond, t.seq)); return 0; } } else { diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 4d55febbf9..d0dcbd2993 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -40,6 +40,7 @@ #include "sci/engine/selector.h" #include "sci/engine/vm_types.h" #include "sci/engine/script.h" // for SCI_OBJ_EXPORTS and SCI_OBJ_SYNONYMS +#include "sci/graphics/helpers.h" #include "sci/graphics/palette.h" #include "sci/graphics/ports.h" #include "sci/sound/audio.h" @@ -175,9 +176,6 @@ void syncWithSerializer(Common::Serializer &s, Class &obj) { } static void sync_SavegameMetadata(Common::Serializer &s, SavegameMetadata &obj) { - // TODO: It would be a good idea to store a magic number & a header size here, - // so that we can implement backward compatibility if the savegame format changes. - s.syncString(obj.name); s.syncVersion(CURRENT_SAVEGAME_VERSION); obj.version = s.getVersion(); @@ -530,7 +528,7 @@ void SoundCommandParser::syncPlayList(Common::Serializer &s) { _music->saveLoadWithSerializer(s); } -void SoundCommandParser::reconstructPlayList(int version) { +void SoundCommandParser::reconstructPlayList() { Common::StackLock lock(_music->_mutex); const MusicList::iterator end = _music->getPlayListEnd(); @@ -605,6 +603,64 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) { } } +void GfxPorts::saveLoadWithSerializer(Common::Serializer &s) { + if (s.isLoading()) + reset(); // remove all script generated windows + + if (s.getVersion() >= 27) { + uint windowCount = 0; + uint id = PORTS_FIRSTSCRIPTWINDOWID; + if (s.isSaving()) { + while (id < _windowsById.size()) { + if (_windowsById[id]) + windowCount++; + id++; + } + } + // Save/Restore window count + s.syncAsUint32LE(windowCount); + + if (s.isSaving()) { + id = PORTS_FIRSTSCRIPTWINDOWID; + while (id < _windowsById.size()) { + if (_windowsById[id]) { + Window *window = (Window *)_windowsById[id]; + window->saveLoadWithSerializer(s); + } + id++; + } + } else { + id = PORTS_FIRSTSCRIPTWINDOWID; + while (windowCount) { + Window *window = new Window(0); + window->saveLoadWithSerializer(s); + + // add enough entries inside _windowsById as needed + while (id <= window->id) { + _windowsById.push_back(0); + id++; + } + _windowsById[window->id] = window; + // _windowList may not be 100% correct using that way of restoring + // saving/restoring ports won't work perfectly anyway, because the contents + // of the window can only get repainted by the scripts and they dont do that + // so we will get empty, transparent windows instead. So perfect window order + // shouldn't really matter + if (window->counterTillFree) { + _freeCounter++; + } else { + if (window->wndStyle & SCI_WINDOWMGR_STYLE_TOPMOST) + _windowList.push_front(window); + else + _windowList.push_back(window); + } + + windowCount--; + } + } + } +} + void SegManager::reconstructStack(EngineState *s) { DataStack *stack = (DataStack *)(_heap[findSegmentByType(SEG_TYPE_STACK)]); s->stack_base = stack->_entries; @@ -711,6 +767,8 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const char* savenam sync_SavegameMetadata(ser, meta); Graphics::saveThumbnail(*fh); s->saveLoadWithSerializer(ser); // FIXME: Error handling? + if (g_sci->_gfxPorts) + g_sci->_gfxPorts->saveLoadWithSerializer(ser); return true; } @@ -761,6 +819,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { s->reset(true); s->saveLoadWithSerializer(ser); // FIXME: Error handling? + // Now copy all current state information s->_segMan->reconstructStack(s); @@ -775,9 +834,8 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { g_engine->setTotalPlayTime(meta.playTime * 1000); if (g_sci->_gfxPorts) - g_sci->_gfxPorts->reset(); - - g_sci->_soundCmd->reconstructPlayList(meta.version); + g_sci->_gfxPorts->saveLoadWithSerializer(ser); + g_sci->_soundCmd->reconstructPlayList(); // Message state: delete s->_msgState; diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 7ab28e126b..0a228063af 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -36,7 +36,7 @@ namespace Sci { struct EngineState; enum { - CURRENT_SAVEGAME_VERSION = 26, + CURRENT_SAVEGAME_VERSION = 27, MINIMUM_SAVEGAME_VERSION = 14 }; diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 9c08526fbb..d587db26b4 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -95,7 +95,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod opsize &= 1; // byte if true, word if false - printf("%04x:%04x: ", PRINT_REG(pos)); + debugN("%04x:%04x: ", PRINT_REG(pos)); if (print_bytecode) { if (pos.offset + bytecount > scr_size) { @@ -104,16 +104,16 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod } for (i = 0; i < bytecount; i++) - printf("%02x ", scr[pos.offset + i]); + debugN("%02x ", scr[pos.offset + i]); for (i = bytecount; i < 5; i++) - printf(" "); + debugN(" "); } if (print_bw_tag) - printf("[%c] ", opsize ? 'B' : 'W'); + debugN("[%c] ", opsize ? 'B' : 'W'); - printf("%s", opcodeNames[opcode]); + debugN("%s", opcodeNames[opcode]); i = 0; while (g_opcode_formats[opcode][i]) { @@ -124,12 +124,12 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod case Script_SByte: case Script_Byte: - printf(" %02x", scr[retval.offset++]); + debugN(" %02x", scr[retval.offset++]); break; case Script_Word: case Script_SWord: - printf(" %04x", READ_SCI11ENDIAN_UINT16(&scr[retval.offset])); + debugN(" %04x", READ_SCI11ENDIAN_UINT16(&scr[retval.offset])); retval.offset += 2; break; @@ -148,11 +148,11 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod } if (opcode == op_callk) - printf(" %s[%x]", (param_value < kernel->_kernelFuncs.size()) ? + debugN(" %s[%x]", (param_value < kernel->_kernelFuncs.size()) ? ((param_value < kernel->getKernelNamesSize()) ? kernel->getKernelName(param_value).c_str() : "[Unknown(postulated)]") : "<invalid>", param_value); else - printf(opsize ? " %02x" : " %04x", param_value); + debugN(opsize ? " %02x" : " %04x", param_value); break; @@ -163,7 +163,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]); retval.offset += 2; } - printf(opsize ? " %02x" : " %04x", param_value); + debugN(opsize ? " %02x" : " %04x", param_value); break; case Script_SRelative: @@ -173,7 +173,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]); retval.offset += 2; } - printf(opsize ? " %02x [%04x]" : " %04x [%04x]", param_value, (0xffff) & (retval.offset + param_value)); + debugN(opsize ? " %02x [%04x]" : " %04x [%04x]", param_value, (0xffff) & (retval.offset + param_value)); break; case Script_End: @@ -193,11 +193,11 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod if (!obj) warning("Attempted to reference on non-object at %04x:%04x", PRINT_REG(s->xs->objp)); else - printf(" (%s)", g_sci->getKernel()->getSelectorName(obj->propertyOffsetToId(s->_segMan, scr[pos.offset + 1])).c_str()); + debugN(" (%s)", g_sci->getKernel()->getSelectorName(obj->propertyOffsetToId(s->_segMan, scr[pos.offset + 1])).c_str()); } } - printf("\n"); + debugN("\n"); if (pos == s->xs->addr.pc) { // Extra information if debugging the current opcode if (opcode == op_callk) { @@ -208,14 +208,14 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod if (!oldScriptHeader) argc += (s->restAdjust); - printf(" Kernel params: ("); + debugN(" Kernel params: ("); for (int j = 0; j < argc; j++) { - printf("%04x:%04x", PRINT_REG((s->xs->sp)[j - stackframe])); + debugN("%04x:%04x", PRINT_REG((s->xs->sp)[j - stackframe])); if (j + 1 < argc) - printf(", "); + debugN(", "); } - printf(")\n"); + debugN(")\n"); } else if ((opcode == op_send) || (opcode == op_self)) { int restmod = s->restAdjust; int stackframe = (scr[pos.offset + 1] >> 1) + restmod; @@ -240,32 +240,32 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod if (!name) name = "<invalid>"; - printf(" %s::%s[", name, g_sci->getKernel()->getSelectorName(selector).c_str()); + debugN(" %s::%s[", name, g_sci->getKernel()->getSelectorName(selector).c_str()); switch (lookupSelector(s->_segMan, called_obj_addr, selector, 0, &fun_ref)) { case kSelectorMethod: - printf("FUNCT"); + debugN("FUNCT"); argc += restmod; restmod = 0; break; case kSelectorVariable: - printf("VAR"); + debugN("VAR"); break; case kSelectorNone: - printf("INVALID"); + debugN("INVALID"); break; } - printf("]("); + debugN("]("); while (argc--) { - printf("%04x:%04x", PRINT_REG(sb[- stackframe + 2])); + debugN("%04x:%04x", PRINT_REG(sb[- stackframe + 2])); if (argc) - printf(", "); + debugN(", "); stackframe--; } - printf(")\n"); + debugN(")\n"); stackframe -= 2; } // while (stackframe > 0) } // Send-like opcodes @@ -334,7 +334,7 @@ void SciEngine::scriptDebug() { // OK, found whatever we were looking for } - printf("Step #%d\n", s->scriptStepCounter); + debugN("Step #%d\n", s->scriptStepCounter); disassemble(s, s->xs->addr.pc, 0, 1); if (_debugState.runningStep) { @@ -354,27 +354,27 @@ void Kernel::dumpScriptObject(char *data, int seeker, int objsize) { int namepos = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + 14 + seeker); int i = 0; - printf("Object\n"); + debugN("Object\n"); Common::hexdump((unsigned char *) data + seeker, objsize - 4, 16, seeker); //-4 because the size includes the two-word header - printf("Name: %s\n", namepos ? ((char *)(data + namepos)) : "<unknown>"); - printf("Superclass: %x\n", superclass); - printf("Species: %x\n", species); - printf("-info-:%x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + 12 + seeker) & 0xffff); + debugN("Name: %s\n", namepos ? ((char *)(data + namepos)) : "<unknown>"); + debugN("Superclass: %x\n", superclass); + debugN("Species: %x\n", species); + debugN("-info-:%x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + 12 + seeker) & 0xffff); - printf("Function area offset: %x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + seeker + 4)); - printf("Selectors [%x]:\n", selectors = (selectorsize = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + seeker + 6))); + debugN("Function area offset: %x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + seeker + 4)); + debugN("Selectors [%x]:\n", selectors = (selectorsize = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + seeker + 6))); seeker += 8; while (selectors--) { - printf(" [#%03x] = 0x%x\n", i++, (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker) & 0xffff); + debugN(" [#%03x] = 0x%x\n", i++, (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker) & 0xffff); seeker += 2; } - printf("Overridden functions: %x\n", selectors = overloads = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker)); + debugN("Overridden functions: %x\n", selectors = overloads = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker)); seeker += 2; @@ -382,8 +382,8 @@ void Kernel::dumpScriptObject(char *data, int seeker, int objsize) { while (overloads--) { int selector = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + (seeker)); - printf(" [%03x] %s: @", selector & 0xffff, (selector >= 0 && selector < (int)_selectorNames.size()) ? _selectorNames[selector].c_str() : "<?>"); - printf("%04x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + selectors*2 + 2) & 0xffff); + debugN(" [%03x] %s: @", selector & 0xffff, (selector >= 0 && selector < (int)_selectorNames.size()) ? _selectorNames[selector].c_str() : "<?>"); + debugN("%04x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + selectors*2 + 2) & 0xffff); seeker += 2; } @@ -395,17 +395,17 @@ void Kernel::dumpScriptClass(char *data, int seeker, int objsize) { int superclass = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + 10 + seeker); int namepos = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + 14 + seeker); - printf("Class\n"); + debugN("Class\n"); Common::hexdump((unsigned char *) data + seeker, objsize - 4, 16, seeker); - printf("Name: %s\n", namepos ? ((char *)data + namepos) : "<unknown>"); - printf("Superclass: %x\n", superclass); - printf("Species: %x\n", species); - printf("-info-:%x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + 12 + seeker) & 0xffff); + debugN("Name: %s\n", namepos ? ((char *)data + namepos) : "<unknown>"); + debugN("Superclass: %x\n", superclass); + debugN("Species: %x\n", species); + debugN("-info-:%x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + 12 + seeker) & 0xffff); - printf("Function area offset: %x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + 4)); - printf("Selectors [%x]:\n", selectors = (selectorsize = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + 6))); + debugN("Function area offset: %x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + 4)); + debugN("Selectors [%x]:\n", selectors = (selectorsize = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + 6))); seeker += 8; selectorsize <<= 1; @@ -413,7 +413,7 @@ void Kernel::dumpScriptClass(char *data, int seeker, int objsize) { while (selectors--) { int selector = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *) data + (seeker) + selectorsize); - printf(" [%03x] %s = 0x%x\n", 0xffff & selector, (selector >= 0 && selector < (int)_selectorNames.size()) ? _selectorNames[selector].c_str() : "<?>", + debugN(" [%03x] %s = 0x%x\n", 0xffff & selector, (selector >= 0 && selector < (int)_selectorNames.size()) ? _selectorNames[selector].c_str() : "<?>", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker) & 0xffff); seeker += 2; @@ -421,16 +421,16 @@ void Kernel::dumpScriptClass(char *data, int seeker, int objsize) { seeker += selectorsize; - printf("Overloaded functions: %x\n", selectors = overloads = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker)); + debugN("Overloaded functions: %x\n", selectors = overloads = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker)); seeker += 2; while (overloads--) { int selector = (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + (seeker)); - fprintf(stderr, "selector=%d; selectorNames.size() =%d\n", selector, _selectorNames.size()); - printf(" [%03x] %s: @", selector & 0xffff, (selector >= 0 && selector < (int)_selectorNames.size()) ? + debugN("selector=%d; selectorNames.size() =%d\n", selector, _selectorNames.size()); + debugN(" [%03x] %s: @", selector & 0xffff, (selector >= 0 && selector < (int)_selectorNames.size()) ? _selectorNames[selector].c_str() : "<?>"); - printf("%04x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + selectors * 2 + 2) & 0xffff); + debugN("%04x\n", (int16)READ_SCI11ENDIAN_UINT16((unsigned char *)data + seeker + selectors * 2 + 2) & 0xffff); seeker += 2; } @@ -452,17 +452,17 @@ void Kernel::dissectScript(int scriptNumber, Vocabulary *vocab) { unsigned int seeker = _seeker + 4; if (!objType) { - printf("End of script object (#0) encountered.\n"); - printf("Classes: %i, Objects: %i, Export: %i,\n Var: %i (all base 10)", + debugN("End of script object (#0) encountered.\n"); + debugN("Classes: %i, Objects: %i, Export: %i,\n Var: %i (all base 10)", objectctr[6], objectctr[1], objectctr[7], objectctr[10]); return; } - printf("\n"); + debugN("\n"); objsize = (int16)READ_SCI11ENDIAN_UINT16(script->data + _seeker + 2); - printf("Obj type #%x, size 0x%x: ", objType, objsize); + debugN("Obj type #%x, size 0x%x: ", objType, objsize); _seeker += objsize; @@ -474,28 +474,28 @@ void Kernel::dissectScript(int scriptNumber, Vocabulary *vocab) { break; case SCI_OBJ_CODE: - printf("Code\n"); + debugN("Code\n"); Common::hexdump(script->data + seeker, objsize - 4, 16, seeker); break; case 3: - printf("<unknown>\n"); + debugN("<unknown>\n"); Common::hexdump(script->data + seeker, objsize - 4, 16, seeker); break; case SCI_OBJ_SAID: - printf("Said\n"); + debugN("Said\n"); Common::hexdump(script->data + seeker, objsize - 4, 16, seeker); - printf("%04x: ", seeker); + debugN("%04x: ", seeker); vocab->debugDecipherSaidBlock(script->data + seeker); - printf("\n"); + debugN("\n"); break; case SCI_OBJ_STRINGS: - printf("Strings\n"); + debugN("Strings\n"); while (script->data [seeker]) { - printf("%04x: %s\n", seeker, script->data + seeker); + debugN("%04x: %s\n", seeker, script->data + seeker); seeker += strlen((char *)script->data + seeker) + 1; } seeker++; // the ending zero byte @@ -506,33 +506,33 @@ void Kernel::dissectScript(int scriptNumber, Vocabulary *vocab) { break; case SCI_OBJ_EXPORTS: - printf("Exports\n"); + debugN("Exports\n"); Common::hexdump((unsigned char *)script->data + seeker, objsize - 4, 16, seeker); break; case SCI_OBJ_POINTERS: - printf("Pointers\n"); + debugN("Pointers\n"); Common::hexdump(script->data + seeker, objsize - 4, 16, seeker); break; case 9: - printf("<unknown>\n"); + debugN("<unknown>\n"); Common::hexdump(script->data + seeker, objsize - 4, 16, seeker); break; case SCI_OBJ_LOCALVARS: - printf("Local vars\n"); + debugN("Local vars\n"); Common::hexdump(script->data + seeker, objsize - 4, 16, seeker); break; default: - printf("Unsupported!\n"); + debugN("Unsupported!\n"); return; } } - printf("Script ends without terminator\n"); + debugN("Script ends without terminator\n"); } } // End of namespace Sci diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 1cbe9a56f4..d509046a15 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -301,9 +301,9 @@ reg_t SegManager::findObjectByName(const Common::String &name, int index) { return NULL_REG; if (result.size() > 1 && index < 0) { - printf("Ambiguous:\n"); + debug("findObjectByName(%s): multiple matches:", name.c_str()); for (i = 0; i < result.size(); i++) - printf(" %3x: [%04x:%04x] %s\n", i, PRINT_REG(result[i]), name.c_str()); + debug(" %3x: [%04x:%04x]", i, PRINT_REG(result[i])); return NULL_REG; // Ambiguous } diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index b16dd5a5e5..8ae063c629 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -318,10 +318,8 @@ reg_t DataStack::findCanonicAddress(SegManager *segMan, reg_t addr) const { Common::Array<reg_t> DataStack::listAllOutgoingReferences(reg_t object) const { Common::Array<reg_t> tmp; - fprintf(stderr, "Emitting %d stack entries\n", _capacity); for (int i = 0; i < _capacity; i++) tmp.push_back(_entries[i]); - fprintf(stderr, "DONE"); return tmp; } diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp index b31f52aa13..798dbf529c 100644 --- a/engines/sci/engine/selector.cpp +++ b/engines/sci/engine/selector.cpp @@ -40,10 +40,10 @@ namespace Sci { // The defines below can be used to construct static selector tables for games which don't have // a vocab.997 resource, by dumping the selector table from other similar versions or games #define FIND_SELECTOR(_slc_) _selectorCache._slc_ = findSelector(#_slc_); \ - printf("\t{ \"%s\", %d },\n", #_slc_, _selectorCache._slc_) + debugN("\t{ \"%s\", %d },\n", #_slc_, _selectorCache._slc_) #define FIND_SELECTOR2(_slc_, _slcstr_) _selectorCache._slc_ = findSelector(_slcstr_); \ - printf("\t{ \"%s\", %d },\n", _slcstr_, _selectorCache._slc_) + debugN("\t{ \"%s\", %d },\n", _slcstr_, _selectorCache._slc_) #endif diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 7342f8ca7b..cefb228c13 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -144,13 +144,13 @@ static bool validate_variable(reg_t *r, reg_t *stack_base, int type, int max, in const char *names[4] = {"global", "local", "temp", "param"}; if (index < 0 || index >= max) { - Common::String txt = Common::String::printf( + Common::String txt = Common::String::format( "[VM] Attempt to use invalid %s variable %04x ", names[type], index); if (max == 0) txt += "(variable type invalid)"; else - txt += Common::String::printf("(out of range [%d..%d])", 0, max - 1); + txt += Common::String::format("(out of range [%d..%d])", 0, max - 1); if (type == VAR_PARAM || type == VAR_TEMP) { int total_offset = r - stack_base; @@ -423,7 +423,7 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt } #ifdef VM_DEBUG_SEND - printf("Send to %04x:%04x (%s), selector %04x (%s):", PRINT_REG(send_obj), + debugN("Send to %04x:%04x (%s), selector %04x (%s):", PRINT_REG(send_obj), s->_segMan->getObjectName(send_obj), selector, g_sci->getKernel()->getSelectorName(selector).c_str()); #endif // VM_DEBUG_SEND @@ -438,9 +438,9 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt #ifdef VM_DEBUG_SEND if (argc) - printf("Varselector: Write %04x:%04x\n", PRINT_REG(argp[1])); + debugN("Varselector: Write %04x:%04x\n", PRINT_REG(argp[1])); else - printf("Varselector: Read\n"); + debugN("Varselector: Read\n"); #endif // VM_DEBUG_SEND // argc == 0: read selector @@ -496,39 +496,39 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt #ifndef VM_DEBUG_SEND if (activeBreakpointTypes & BREAK_SELECTOREXEC) { if (g_sci->checkSelectorBreakpoint(BREAK_SELECTOREXEC, send_obj, selector)) { - printf("[execute selector]"); + debugN("[execute selector]"); int displaySize = 0; for (int argNr = 1; argNr <= argc; argNr++) { if (argNr == 1) - printf(" - "); + debugN(" - "); reg_t curParam = argp[argNr]; if (curParam.segment) { - printf("[%04x:%04x] ", PRINT_REG(curParam)); + debugN("[%04x:%04x] ", PRINT_REG(curParam)); displaySize += 12; } else { - printf("[%04x] ", curParam.offset); + debugN("[%04x] ", curParam.offset); displaySize += 7; } if (displaySize > 50) { if (argNr < argc) - printf("..."); + debugN("..."); break; } } - printf("\n"); + debugN("\n"); } } #else // VM_DEBUG_SEND if (activeBreakpointTypes & BREAK_SELECTOREXEC) g_sci->checkSelectorBreakpoint(BREAK_SELECTOREXEC, send_obj, selector); - printf("Funcselector("); + debugN("Funcselector("); for (int i = 0; i < argc; i++) { - printf("%04x:%04x", PRINT_REG(argp[i+1])); + debugN("%04x:%04x", PRINT_REG(argp[i+1])); if (i + 1 < argc) - printf(", "); + debugN(", "); } - printf(") at %04x:%04x\n", PRINT_REG(funcp)); + debugN(") at %04x:%04x\n", PRINT_REG(funcp)); #endif // VM_DEBUG_SEND { @@ -583,7 +583,7 @@ static ExecStack *add_exec_stack_entry(Common::List<ExecStack> &execStack, reg_t // Returns new TOS element for the execution stack // _localsSegment may be -1 if derived from the called object - //printf("Exec stack: [%d/%d], origin %d, at %p\n", s->execution_stack_pos, s->_executionStack.size(), origin, s->execution_stack); + //debug("Exec stack: [%d/%d], origin %d, at %p", s->execution_stack_pos, s->_executionStack.size(), origin, s->execution_stack); ExecStack xstack; @@ -655,46 +655,46 @@ static void addKernelCallToExecStack(EngineState *s, int kernelCallNr, int argc, static void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *kernelSubCall, EngineState *s, int argc, reg_t *argv, reg_t result) { Kernel *kernel = g_sci->getKernel(); if (!kernelSubCall) { - printf("k%s: ", kernelCall->name); + debugN("k%s: ", kernelCall->name); } else { int callNameLen = strlen(kernelCall->name); if (strncmp(kernelCall->name, kernelSubCall->name, callNameLen) == 0) { const char *subCallName = kernelSubCall->name + callNameLen; - printf("k%s(%s): ", kernelCall->name, subCallName); + debugN("k%s(%s): ", kernelCall->name, subCallName); } else { - printf("k%s(%s): ", kernelCall->name, kernelSubCall->name); + debugN("k%s(%s): ", kernelCall->name, kernelSubCall->name); } } for (int parmNr = 0; parmNr < argc; parmNr++) { if (parmNr) - printf(", "); + debugN(", "); uint16 regType = kernel->findRegType(argv[parmNr]); if (regType & SIG_TYPE_NULL) - printf("0"); + debugN("0"); else if (regType & SIG_TYPE_UNINITIALIZED) - printf("UNINIT"); + debugN("UNINIT"); else if (regType & SIG_IS_INVALID) - printf("INVALID"); + debugN("INVALID"); else if (regType & SIG_TYPE_INTEGER) - printf("%d", argv[parmNr].offset); + debugN("%d", argv[parmNr].offset); else { - printf("%04x:%04x", PRINT_REG(argv[parmNr])); + debugN("%04x:%04x", PRINT_REG(argv[parmNr])); switch (regType) { case SIG_TYPE_OBJECT: - printf(" (%s)", s->_segMan->getObjectName(argv[parmNr])); + debugN(" (%s)", s->_segMan->getObjectName(argv[parmNr])); break; case SIG_TYPE_REFERENCE: if (kernelCall->function == kSaid) { SegmentRef saidSpec = s->_segMan->dereference(argv[parmNr]); if (saidSpec.isRaw) { - printf(" ('"); + debugN(" ('"); g_sci->getVocabulary()->debugDecipherSaidBlock(saidSpec.raw); - printf("')"); + debugN("')"); } else { - printf(" (non-raw said-spec)"); + debugN(" (non-raw said-spec)"); } } else { - printf(" ('%s')", s->_segMan->getString(argv[parmNr]).c_str()); + debugN(" ('%s')", s->_segMan->getString(argv[parmNr]).c_str()); } default: break; @@ -702,9 +702,9 @@ static void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunct } } if (result.segment) - printf(" = %04x:%04x\n", PRINT_REG(result)); + debugN(" = %04x:%04x\n", PRINT_REG(result)); else - printf(" = %d\n", result.offset); + debugN(" = %d\n", result.offset); } static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { @@ -749,7 +749,7 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { if (kernelCall.debugLogging) logKernelCall(&kernelCall, NULL, s, argc, argv, s->r_acc); if (kernelCall.debugBreakpoint) { - printf("Break on k%s\n", kernelCall.name); + debugN("Break on k%s\n", kernelCall.name); g_sci->_debugState.debugging = true; g_sci->_debugState.breakpointWasHit = true; } @@ -804,7 +804,7 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) { if (kernelSubCall.debugLogging) logKernelCall(&kernelCall, &kernelSubCall, s, argc, argv, s->r_acc); if (kernelSubCall.debugBreakpoint) { - printf("Break on k%s\n", kernelSubCall.name); + debugN("Break on k%s\n", kernelSubCall.name); g_sci->_debugState.debugging = true; g_sci->_debugState.breakpointWasHit = true; } @@ -830,7 +830,7 @@ int readPMachineInstruction(const byte *src, byte &extOpcode, int16 opparams[4]) memset(opparams, 0, sizeof(opparams)); for (int i = 0; g_opcode_formats[opcode][i]; ++i) { - //printf("Opcode: 0x%x, Opnumber: 0x%x, temp: %d\n", opcode, opcode, temp); + //debugN("Opcode: 0x%x, Opnumber: 0x%x, temp: %d\n", opcode, opcode, temp); assert(i < 3); switch (g_opcode_formats[opcode][i]) { diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index d4bab2c671..23a6b24fd4 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -406,6 +406,12 @@ const SciWorkaroundEntry kStrCat_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, call,index, workaround +const SciWorkaroundEntry kStrLen_workarounds[] = { + { GID_QFG2, 210, 2, 0, "", "export 21", 0xdeb, 0, { WORKAROUND_FAKE, 0 } }, // When saying something incorrect at the WIT, an integer is passed instead of a reference - bug #3100292 + SCI_WORKAROUNDENTRY_TERMINATOR +}; + +// gameID, room,script,lvl, object-name, method-name, call,index, workaround const SciWorkaroundEntry kUnLoad_workarounds[] = { { GID_CAMELOT, 921, 921, 1, "Script", "changeState", 0x36, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: While showing Camelot (and other places), the reference is invalid - bug #3035000 { GID_CAMELOT, 921, 921, 1, "Script", "init", 0x36, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When being attacked by the boar (and other places), the reference is invalid - bug #3035000 @@ -457,7 +463,7 @@ SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroun curMethodName = g_sci->getKernel()->getSelectorName(lastCall->debugSelector); } else if (lastCall->debugExportId != -1) { curObjectName = ""; - curMethodName = curMethodName.printf("export %d", lastCall->debugExportId); + curMethodName = Common::String::format("export %d", lastCall->debugExportId); } } diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index bf1ac3a445..7d68d9c4a5 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -104,6 +104,7 @@ extern const SciWorkaroundEntry kSetCursor_workarounds[]; extern const SciWorkaroundEntry kSetPort_workarounds[]; extern const SciWorkaroundEntry kStrAt_workarounds[]; extern const SciWorkaroundEntry kStrCat_workarounds[]; +extern const SciWorkaroundEntry kStrLen_workarounds[]; extern const SciWorkaroundEntry kUnLoad_workarounds[]; extern SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroundEntry *workaroundList, SciTrackOriginReply *trackOrigin); diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h index 4b4cd673b4..f6cb214a2b 100644 --- a/engines/sci/graphics/helpers.h +++ b/engines/sci/graphics/helpers.h @@ -64,7 +64,7 @@ struct Port { } }; -struct Window : public Port { +struct Window : public Port, public Common::Serializable { Common::Rect dims; // client area of window Common::Rect restoreRect; // total area of window including borders uint16 wndStyle; @@ -79,6 +79,40 @@ struct Window : public Port { hSaved1(NULL_REG), hSaved2(NULL_REG), bDrawn(false) { } + + void syncRect(Common::Serializer &ser, Common::Rect &targetRect) { + ser.syncAsSint16LE(targetRect.top); + ser.syncAsSint16LE(targetRect.left); + ser.syncAsSint16LE(targetRect.bottom); + ser.syncAsSint16LE(targetRect.right); + } + + virtual void saveLoadWithSerializer(Common::Serializer &ser) { + ser.syncAsUint16LE(id); + ser.syncAsSint16LE(top); + ser.syncAsSint16LE(left); + syncRect(ser, rect); + ser.syncAsSint16LE(curTop); + ser.syncAsSint16LE(curLeft); + ser.syncAsSint16LE(fontHeight); + ser.syncAsSint32LE(fontId); + ser.syncAsByte(greyedOutput); + ser.syncAsSint16LE(penClr); + ser.syncAsSint16LE(backClr); + ser.syncAsSint16LE(penMode); + ser.syncAsUint16LE(counterTillFree); + syncRect(ser, dims); + syncRect(ser, restoreRect); + ser.syncAsUint16LE(wndStyle); + ser.syncAsUint16LE(saveScreenMask); + if (ser.isLoading()) { + // The hunk table isn't saved, so we just set both pointers to NULL + hSaved1 = NULL_REG; + hSaved2 = NULL_REG; + } + ser.syncString(title); + ser.syncAsByte(bDrawn); + } }; struct Color { diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index 06470bc560..92644db037 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -296,7 +296,7 @@ void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeI itemEntry->keyPress = tolower(value.offset); itemEntry->keyModifier = 0; // TODO: Find out how modifier is handled - printf("setAttr keypress %X %X\n", value.segment, value.offset); + debug("setAttr keypress %X %X", value.segment, value.offset); break; case SCI_MENU_ATTRIBUTE_TAG: itemEntry->tag = value.offset; diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index e7f319a25c..ef57e4014f 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -38,15 +38,6 @@ namespace Sci { -// window styles -enum { - SCI_WINDOWMGR_STYLE_TRANSPARENT = (1 << 0), - SCI_WINDOWMGR_STYLE_NOFRAME = (1 << 1), - SCI_WINDOWMGR_STYLE_TITLE = (1 << 2), - SCI_WINDOWMGR_STYLE_TOPMOST = (1 << 3), - SCI_WINDOWMGR_STYLE_USER = (1 << 7) -}; - GfxPorts::GfxPorts(SegManager *segMan, GfxScreen *screen) : _segMan(segMan), _screen(screen) { } diff --git a/engines/sci/graphics/ports.h b/engines/sci/graphics/ports.h index 453cb50986..21c6d31ebd 100644 --- a/engines/sci/graphics/ports.h +++ b/engines/sci/graphics/ports.h @@ -26,6 +26,7 @@ #ifndef SCI_GRAPHICS_PORTS_H #define SCI_GRAPHICS_PORTS_H +#include "common/serializer.h" #include "common/list.h" #include "common/array.h" @@ -39,11 +40,20 @@ class GfxText16; #define PORTS_FIRSTWINDOWID 2 #define PORTS_FIRSTSCRIPTWINDOWID 3 +// window styles +enum { + SCI_WINDOWMGR_STYLE_TRANSPARENT = (1 << 0), + SCI_WINDOWMGR_STYLE_NOFRAME = (1 << 1), + SCI_WINDOWMGR_STYLE_TITLE = (1 << 2), + SCI_WINDOWMGR_STYLE_TOPMOST = (1 << 3), + SCI_WINDOWMGR_STYLE_USER = (1 << 7) +}; + /** * Ports class, includes all port managment for SCI0->SCI1.1 games. Ports are some sort of windows in SCI * this class also handles adjusting coordinates to a specific port */ -class GfxPorts { +class GfxPorts : public Common::Serializable { public: GfxPorts(SegManager *segMan, GfxScreen *screen); ~GfxPorts(); @@ -103,6 +113,8 @@ public: Common::Rect _menuLine; Port *_curPort; + virtual void saveLoadWithSerializer(Common::Serializer &ser); + private: typedef Common::List<Port *> PortList; diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp index 03e9d29660..8a6cd2dd4d 100644 --- a/engines/sci/parser/grammar.cpp +++ b/engines/sci/parser/grammar.cpp @@ -93,49 +93,49 @@ static void vocab_print_rule(ParseRule *rule) { return; } - printf("[%03x] -> ", rule->_id); + debugN("[%03x] -> ", rule->_id); if (rule->_data.empty()) - printf("e"); + debugN("e"); for (uint i = 0; i < rule->_data.size(); i++) { uint token = rule->_data[i]; if (token == TOKEN_OPAREN) { if (i == rule->_firstSpecial) - printf("_"); + debugN("_"); - printf("("); + debugN("("); wspace = 0; } else if (token == TOKEN_CPAREN) { if (i == rule->_firstSpecial) - printf("_"); + debugN("_"); - printf(")"); + debugN(")"); wspace = 0; } else { if (wspace) - printf(" "); + debugN(" "); if (i == rule->_firstSpecial) - printf("_"); + debugN("_"); if (token & TOKEN_TERMINAL_CLASS) - printf("C(%04x)", token & 0xffff); + debugN("C(%04x)", token & 0xffff); else if (token & TOKEN_TERMINAL_GROUP) - printf("G(%04x)", token & 0xffff); + debugN("G(%04x)", token & 0xffff); else if (token & TOKEN_STUFFING_LEAF) - printf("%03x", token & 0xffff); + debugN("%03x", token & 0xffff); else if (token & TOKEN_STUFFING_WORD) - printf("{%03x}", token & 0xffff); + debugN("{%03x}", token & 0xffff); else - printf("[%03x]", token); /* non-terminal */ + debugN("[%03x]", token); /* non-terminal */ wspace = 1; } if (i == rule->_firstSpecial) - printf("_"); + debugN("_"); } - printf(" [%d specials]", rule->_numSpecials); + debugN(" [%d specials]", rule->_numSpecials); } static ParseRule *_vdup(ParseRule *a) { @@ -321,13 +321,13 @@ void ParseRuleList::print() const { const ParseRuleList *list = this; int pos = 0; while (list) { - printf("R%03d: ", pos); + debugN("R%03d: ", pos); vocab_print_rule(list->rule); - printf("\n"); + debugN("\n"); list = list->next; pos++; } - printf("%d rules total.\n", pos); + debugN("%d rules total.\n", pos); } static ParseRuleList *_vocab_split_rule_list(ParseRuleList *list) { @@ -524,9 +524,9 @@ static int _vbpt_write_subexpression(ParseTreeNode *nodes, int *pos, ParseRule * else writepos = _vbpt_append_word(nodes, pos, writepos, token & 0xffff); } else { - printf("\nError in parser (grammar.cpp, _vbpt_write_subexpression()): Rule data broken in rule "); + warning("\nError in parser (grammar.cpp, _vbpt_write_subexpression()): Rule data broken in rule "); vocab_print_rule(rule); - printf(", at token position %d\n", *pos); + debugN(", at token position %d\n", *pos); return rulepos; } } diff --git a/engines/sci/parser/said.cpp b/engines/sci/parser/said.cpp index 7393874856..e9c6d9847f 100644 --- a/engines/sci/parser/said.cpp +++ b/engines/sci/parser/said.cpp @@ -39,7 +39,7 @@ namespace Sci { #ifdef SCI_DEBUG_PARSE_TREE_AUGMENTATION -#define scidprintf printf +#define scidprintf debugN #else void print_nothing(...) { } #define scidprintf print_nothing diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp index f9989b22a8..b1f928cdd9 100644 --- a/engines/sci/parser/vocabulary.cpp +++ b/engines/sci/parser/vocabulary.cpp @@ -458,44 +458,44 @@ void Vocabulary::debugDecipherSaidBlock(const byte *addr) { nextItem = *addr++; if (nextItem != 0xff) { if ((!first) && (nextItem != 0xf0)) - printf(" "); + debugN(" "); first = false; if (nextItem < 0xf0) { nextItem = nextItem << 8 | *addr++; - printf("%s{%03x}", getAnyWordFromGroup(nextItem), nextItem); + debugN("%s{%03x}", getAnyWordFromGroup(nextItem), nextItem); nextItem = 0; // Make sure that group 0xff doesn't abort } else switch (nextItem) { case 0xf0: - printf(","); + debugN(","); break; case 0xf1: - printf("&"); + debugN("&"); break; case 0xf2: - printf("/"); + debugN("/"); break; case 0xf3: - printf("("); + debugN("("); break; case 0xf4: - printf(")"); + debugN(")"); break; case 0xf5: - printf("["); + debugN("["); break; case 0xf6: - printf("]"); + debugN("]"); break; case 0xf7: - printf("#"); + debugN("#"); break; case 0xf8: - printf("<"); + debugN("<"); break; case 0xf9: - printf(">"); + debugN(">"); break; case 0xff: break; @@ -611,48 +611,48 @@ void _vocab_recursive_ptree_dump(ParseTreeNode *tree, int blanks) { int i; if (tree->type == kParseTreeLeafNode) { - printf("vocab_dump_parse_tree: Error: consp is nil\n"); + debugN("vocab_dump_parse_tree: Error: consp is nil\n"); return; } if (lbranch) { if (lbranch->type == kParseTreeBranchNode) { - printf("\n"); + debugN("\n"); for (i = 0; i < blanks; i++) - printf(" "); - printf("("); + debugN(" "); + debugN("("); _vocab_recursive_ptree_dump(lbranch, blanks + 1); - printf(")\n"); + debugN(")\n"); for (i = 0; i < blanks; i++) - printf(" "); + debugN(" "); } else - printf("%x", lbranch->value); - printf(" "); - }/* else printf ("nil");*/ + debugN("%x", lbranch->value); + debugN(" "); + }/* else debugN ("nil");*/ if (rbranch) { if (rbranch->type == kParseTreeBranchNode) _vocab_recursive_ptree_dump(rbranch, blanks); else { - printf("%x", rbranch->value); + debugN("%x", rbranch->value); while (rbranch->right) { rbranch = rbranch->right; - printf("/%x", rbranch->value); + debugN("/%x", rbranch->value); } } - }/* else printf("nil");*/ + }/* else debugN("nil");*/ } void vocab_dump_parse_tree(const char *tree_name, ParseTreeNode *nodes) { - printf("(setq %s \n'(", tree_name); + debugN("(setq %s \n'(", tree_name); _vocab_recursive_ptree_dump(nodes, 1); - printf("))\n"); + debugN("))\n"); } void Vocabulary::dumpParseTree() { - printf("(setq parse-tree \n'("); + debugN("(setq parse-tree \n'("); _vocab_recursive_ptree_dump(_parserNodes, 1); - printf("))\n"); + debugN("))\n"); } void Vocabulary::synonymizeTokens(ResultWordListList &words) { @@ -673,9 +673,15 @@ void Vocabulary::printParserNodes(int num) { con->DebugPrintf(" Node %03x: ", i); if (_parserNodes[i].type == kParseTreeLeafNode) con->DebugPrintf("Leaf: %04x\n", _parserNodes[i].value); - else - con->DebugPrintf("Branch: ->%04x, ->%04x\n", _parserNodes[i].left, - _parserNodes[i].right); + else { + // FIXME: Do we really want to print the *addresses* + // of the left & right child? + // Note that one or both may be zero pointers, so we can't just + // print their values. + con->DebugPrintf("Branch: ->%p, ->%p\n", + (const void *)_parserNodes[i].left, + (const void *)_parserNodes[i].right); + } } } diff --git a/engines/sci/parser/vocabulary.h b/engines/sci/parser/vocabulary.h index 620d50c09d..baf30a03d7 100644 --- a/engines/sci/parser/vocabulary.h +++ b/engines/sci/parser/vocabulary.h @@ -243,7 +243,7 @@ public: ParseRuleList *buildGNF(bool verbose = false); /** - * Deciphers a said block and dumps its content via printf. + * Deciphers a said block and dumps its content via debugN. * For debugging only. * @param pos pointer to the data to dump */ diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 9809f10576..c94df13ead 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -779,7 +779,7 @@ void ChunkResourceSource::loadResource(ResourceManager *resMan, Resource *res) { } void ResourceManager::addResourcesFromChunk(uint16 id) { - addSource(new ChunkResourceSource(Common::String::printf("Chunk %d", id), id)); + addSource(new ChunkResourceSource(Common::String::format("Chunk %d", id), id)); scanNewSources(); } @@ -940,7 +940,7 @@ void ResourceManager::freeOldResources() { removeFromLRU(goner); goner->unalloc(); #ifdef SCI_VERBOSE_RESMAN - printf("resMan-debug: LRU: Freeing %s.%03d (%d bytes)\n", getResourceTypeName(goner->type), goner->number, goner->size); + debug("resMan-debug: LRU: Freeing %s.%03d (%d bytes)", getResourceTypeName(goner->type), goner->number, goner->size); #endif } } @@ -1583,10 +1583,12 @@ int ResourceManager::readResourceMapSCI1(ResourceSource *map) { return 0; } -struct { +struct MacResTag { uint32 tag; ResourceType type; -} static const macResTagMap[] = { +}; + +static const MacResTag macResTagMap[] = { { MKID_BE('V56 '), kResourceTypeView }, { MKID_BE('P56 '), kResourceTypePic }, { MKID_BE('SCR '), kResourceTypeScript }, diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index f8d25efe73..0df75d53fb 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -743,7 +743,7 @@ bool SciEngine::hasMacIconBar() const { } Common::String SciEngine::getSavegameName(int nr) const { - return _targetName + Common::String::printf(".%03d", nr); + return _targetName + Common::String::format(".%03d", nr); } Common::String SciEngine::getSavegamePattern() const { diff --git a/engines/sci/sound/drivers/amigamac.cpp b/engines/sci/sound/drivers/amigamac.cpp index 4b591eb609..07c0582124 100644 --- a/engines/sci/sound/drivers/amigamac.cpp +++ b/engines/sci/sound/drivers/amigamac.cpp @@ -288,7 +288,7 @@ void MidiDriver_AmigaMac::playInstrument(int16 *dest, Voice *channel, int count) void MidiDriver_AmigaMac::changeInstrument(int channel, int instrument) { #ifdef DEBUG if (_bank.instruments[instrument][0]) - printf("[sfx:seq:amiga] Setting channel %i to \"%s\" (%i)\n", channel, _bank.instruments[instrument]->name, instrument); + debugN("[sfx:seq:amiga] Setting channel %i to \"%s\" (%i)\n", channel, _bank.instruments[instrument]->name, instrument); else warning("[sfx:seq:amiga] instrument %i does not exist (channel %i)", instrument, channel); #endif @@ -488,13 +488,13 @@ MidiDriver_AmigaMac::InstrumentSample *MidiDriver_AmigaMac::readInstrumentSCI0(C instrument->name[29] = 0; #ifdef DEBUG - printf("[sfx:seq:amiga] Reading instrument %i: \"%s\" (%i bytes)\n", + debugN("[sfx:seq:amiga] Reading instrument %i: \"%s\" (%i bytes)\n", *id, instrument->name, size); - printf(" Mode: %02x\n", instrument->mode); - printf(" Looping: %s\n", instrument->mode & kModeLoop ? "on" : "off"); - printf(" Pitch changes: %s\n", instrument->mode & kModePitch ? "on" : "off"); - printf(" Segment sizes: %i %i %i\n", seg_size[0], seg_size[1], seg_size[2]); - printf(" Segment offsets: 0 %i %i\n", loop_offset, read_int32(header + 43)); + debugN(" Mode: %02x\n", instrument->mode); + debugN(" Looping: %s\n", instrument->mode & kModeLoop ? "on" : "off"); + debugN(" Pitch changes: %s\n", instrument->mode & kModePitch ? "on" : "off"); + debugN(" Segment sizes: %i %i %i\n", seg_size[0], seg_size[1], seg_size[2]); + debugN(" Segment offsets: 0 %i %i\n", loop_offset, read_int32(header + 43)); #endif instrument->samples = (int8 *) malloc(size + 1); @@ -745,7 +745,7 @@ bool MidiDriver_AmigaMac::loadInstrumentsSCI0(Common::File &file) { strncpy(_bank.name, (char *) header + 8, 29); _bank.name[29] = 0; #ifdef DEBUG - printf("[sfx:seq:amiga] Reading %i instruments from bank \"%s\"\n", _bank.size, _bank.name); + debugN("[sfx:seq:amiga] Reading %i instruments from bank \"%s\"\n", _bank.size, _bank.name); #endif for (uint i = 0; i < _bank.size; i++) { @@ -784,7 +784,7 @@ bool MidiDriver_AmigaMac::loadInstrumentsSCI0Mac(Common::SeekableReadStream &fil strncpy(_bank.name, (char *) header + 8, 29); _bank.name[29] = 0; #ifdef DEBUG - printf("[sfx:seq:amiga] Reading %i instruments from bank \"%s\"\n", _bank.size, _bank.name); + debugN("[sfx:seq:amiga] Reading %i instruments from bank \"%s\"\n", _bank.size, _bank.name); #endif Common::Array<uint32> instrumentOffsets; diff --git a/engines/sci/sound/soundcmd.h b/engines/sci/sound/soundcmd.h index 61371d903f..b457ad4618 100644 --- a/engines/sci/sound/soundcmd.h +++ b/engines/sci/sound/soundcmd.h @@ -53,7 +53,7 @@ public: // Functions used for game state loading void clearPlayList(); void syncPlayList(Common::Serializer &s); - void reconstructPlayList(int savegame_version); + void reconstructPlayList(); // Functions used for the ScummVM menus void setMasterVolume(int vol); diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp index fb8e128415..15d5f04ed5 100644 --- a/engines/scumm/boxes.cpp +++ b/engines/scumm/boxes.cpp @@ -921,32 +921,32 @@ bool Actor::findPathTowards(byte box1nr, byte box2nr, byte box3nr, Common::Point static void printMatrix(byte *boxm, int num) { int i; for (i = 0; i < num; i++) { - printf("%d: ", i); + debugN("%d: ", i); while (*boxm != 0xFF) { - printf("%d, ", *boxm); + debug("%d, ", *boxm); boxm++; } boxm++; - printf("\n"); + debug("\n"); } } static void printMatrix2(byte *matrix, int num) { int i, j; - printf(" "); + debug(" "); for (i = 0; i < num; i++) - printf("%2d ", i); - printf("\n"); + debug("%2d ", i); + debug("\n"); for (i = 0; i < num; i++) { - printf("%2d: ", i); + debug("%2d: ", i); for (j = 0; j < num; j++) { int val = matrix[i * num + j]; if (val == Actor::kInvalidBox) - printf(" ? "); + debug(" ? "); else - printf("%2d ", val); + debug("%2d ", val); } - printf("\n"); + debug("\n"); } } #endif @@ -1053,9 +1053,9 @@ void ScummEngine::createBoxMatrix() { #if BOX_DEBUG - printf("Itinerary matrix:\n"); + debug("Itinerary matrix:\n"); printMatrix2(itineraryMatrix, num); - printf("compressed matrix:\n"); + debug("compressed matrix:\n"); printMatrix(getBoxMatrixBaseAddr(), num); #endif diff --git a/engines/scumm/charset-fontdata.cpp b/engines/scumm/charset-fontdata.cpp index 904e40d9ea..378e8e9d8d 100644 --- a/engines/scumm/charset-fontdata.cpp +++ b/engines/scumm/charset-fontdata.cpp @@ -589,20 +589,20 @@ CharsetRendererV2::CharsetRendererV2(ScummEngine *vm, Common::Language language) b = data[offset+3]; len = data[offset+4]; while (len--) { - printf("0x%02x, ", b); + debugN("0x%02x, ", b); count++; if (count % 8 == 0) - printf("\n"); + debugN("\n"); } offset += 6; } else { - printf("0x%02x, ", data[offset]); + debugN("0x%02x, ", data[offset]); count++; if (count % 8 == 0) - printf("\n"); + debugN("\n"); } } - printf("\n"); + debugN("\n"); _vm->_system->quit(); #endif } diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index d0d8eb2240..cd366fcfd4 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -648,7 +648,7 @@ void ClassicCostumeRenderer::procPCEngine(Codec1 &v1) { } } if (index != 128) { - printf("%d\n", index); + warning("ClassicCostumeRenderer::procPCEngine: index %d != 128\n", index); } for (int row = 0; row < 16; ++row) { diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 093a103cc8..1cdc9e3ff0 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -57,8 +57,6 @@ #include "gui/KeysDialog.h" #endif -using GUI::CommandSender; -using GUI::StaticTextWidget; using Graphics::kTextAlignCenter; using Graphics::kTextAlignLeft; using GUI::WIDGET_ENABLED; @@ -257,7 +255,7 @@ ScummMenuDialog::~ScummMenuDialog() { delete _helpDialog; } -void ScummMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +void ScummMenuDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kHelpCmd: _helpDialog->runModal(); @@ -276,7 +274,7 @@ enum { HelpDialog::HelpDialog(const GameSettings &game) : ScummDialog("ScummHelp"), _game(game) { - _title = new StaticTextWidget(this, "ScummHelp.Title", ""); + _title = new GUI::StaticTextWidget(this, "ScummHelp.Title", ""); _page = 1; _backgroundType = GUI::ThemeEngine::kDialogBackgroundDefault; @@ -292,8 +290,8 @@ HelpDialog::HelpDialog(const GameSettings &game) // Dummy entries for (int i = 0; i < HELP_NUM_LINES; i++) { - _key[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignRight); - _dsc[i] = new StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignLeft); + _key[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignRight); + _dsc[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignLeft); } } @@ -345,7 +343,7 @@ void HelpDialog::displayKeyBindings() { delete[] dscStr; } -void HelpDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +void HelpDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kNextCmd: @@ -385,7 +383,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, int res) _message = queryResString(res); // Width and height are dummy - _text = new StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter); + _text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter); } InfoDialog::InfoDialog(ScummEngine *scumm, const String& message) @@ -394,7 +392,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, const String& message) _message = message; // Width and height are dummy - _text = new StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter); + _text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter); } void InfoDialog::setInfoText(const String& message) { diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp index 0081720d03..08feb7ffd5 100644 --- a/engines/scumm/file.cpp +++ b/engines/scumm/file.cpp @@ -27,8 +27,6 @@ #include "scumm/scumm.h" -using Common::File; - namespace Scumm { #pragma mark - diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp index cd761db81a..bfd45d8005 100644 --- a/engines/scumm/file_nes.cpp +++ b/engines/scumm/file_nes.cpp @@ -28,8 +28,6 @@ #include "common/endian.h" #include "common/md5.h" -using Common::File; - namespace Scumm { #pragma mark - diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index 36aeaf4a3c..ed92c33105 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -77,11 +77,11 @@ int32 LogicHE::dispatch(int op, int numArgs, int32 *args) { #if 1 Common::String str; - str = Common::String::printf("LogicHE::dispatch(%d, %d, [", op, numArgs); + str = Common::String::format("LogicHE::dispatch(%d, %d, [", op, numArgs); if (numArgs > 0) - str += Common::String::printf("%d", args[0]); + str += Common::String::format("%d", args[0]); for (int i = 1; i < numArgs; i++) { - str += Common::String::printf(", %d", args[i]); + str += Common::String::format(", %d", args[i]); } str += "])"; diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index b42441ceaf..f7a7d3a567 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -358,7 +358,7 @@ byte *Win32ResExtractor::extract_group_icon_cursor_resource(WinLibrary *fi, WinR WinResource *fwr; RETURN_IF_BAD_POINTER(NULL, icondir->entries[c]); - /*printf("%d. bytes_in_res=%d width=%d height=%d planes=%d bit_count=%d\n", c, + /*debug("%d. bytes_in_res=%d width=%d height=%d planes=%d bit_count=%d", c, FROM_LE_32(icondir->entries[c].bytes_in_res), (is_icon ? icondir->entries[c].res_info.icon.width : FROM_LE_16(icondir->entries[c].res_info.cursor.width)), (is_icon ? icondir->entries[c].res_info.icon.height : FROM_LE_16(icondir->entries[c].res_info.cursor.height)), diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index 3a672d57b5..8cccbc227a 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -700,9 +700,9 @@ int32 IMuseInternal::doCommand_internal(int numargs, int a[]) { { Common::String string = "doCommand - "; - string += Common::String::printf("%d (%d/%d)", a[0], (int)param, (int)cmd); + string += Common::String::format("%d (%d/%d)", a[0], (int)param, (int)cmd); for (i = 1; i < numargs; ++i) - string += Common::String::printf(", %d", a[i]); + string += Common::String::format(", %d", a[i]); debugC(DEBUG_IMUSE, "%s", string.c_str()); } diff --git a/engines/scumm/resource_v2.cpp b/engines/scumm/resource_v2.cpp index e469c721b1..3dc3b4d14e 100644 --- a/engines/scumm/resource_v2.cpp +++ b/engines/scumm/resource_v2.cpp @@ -23,8 +23,6 @@ * */ - - #include "scumm/file.h" #include "scumm/scumm_v2.h" #include "scumm/resource.h" @@ -175,24 +173,24 @@ void ScummEngine_v2::readIndexFile() { switch (magic) { case 0x0100: - printf("Enhanced V2 game detected\n"); + debug("Enhanced V2 game detected"); assert(_game.version == 2); readEnhancedIndexFile(); break; case 0x0A31: - printf("Classic V1 game detected\n"); + debug("Classic V1 game detected"); assert(_game.version == 1); readClassicIndexFile(); break; case 0x4643: if (!(_game.platform == Common::kPlatformNES)) error("Use maniac target"); - printf("NES V1 game detected\n"); + debug("NES V1 game detected"); assert(_game.version == 1); readClassicIndexFile(); break; case 0x132: - printf("C64 V1 game detected\n"); + debug("C64 V1 game detected"); if (_game.id == GID_MANIAC) { assert(_game.version == 0); } else { @@ -201,7 +199,7 @@ void ScummEngine_v2::readIndexFile() { readClassicIndexFile(); break; case 0x032: - printf("Apple II V1 game detected\n"); + debug("Apple II V1 game detected"); assert(_game.version == 0); readClassicIndexFile(); break; diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index b6058d4d9a..eac2061560 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -467,11 +467,11 @@ void ScummEngine::executeScript() { while (_currentScript != 0xFF) { if (_showStack == 1) { - printf("Stack:"); + debugN("Stack:"); for (c = 0; c < _scummStackPos; c++) { - printf(" %d", _vmStack[c]); + debugN(" %d", _vmStack[c]); } - printf("\n"); + debugN("\n"); } _opcode = fetchScriptByte(); if (_game.version > 2) // V0-V2 games didn't use the didexec flag @@ -483,9 +483,9 @@ void ScummEngine::executeScript() { getOpcodeDesc(_opcode)); if (_hexdumpScripts == true) { for (c = -1; c < 15; c++) { - printf(" %02x", *(_scriptPointer + c)); + debugN(" %02x", *(_scriptPointer + c)); } - printf("\n"); + debugN("\n"); } executeOpcode(_opcode); diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index 4d552a9429..f2addff19f 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -766,7 +766,6 @@ void ScummEngine_v8::o8_actorOps() { if (subOp == 0x7A) { _curActor = pop(); - //printf("Setting current actor to %d\n", _curActor); return; } @@ -937,7 +936,6 @@ void ScummEngine_v8::o8_verbOps() { _curVerb = pop(); _curVerbSlot = getVerbSlot(_curVerb, 0); assertRange(0, _curVerbSlot, _numVerbs - 1, "new verb slot"); - //printf("Setting current actor to %d\n", _curActor); return; } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 42be33fff3..405c81f91b 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -485,7 +485,8 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) if (ConfMan.getBool("demo_mode")) _game.features |= GF_DEMO; if (ConfMan.hasKey("nosubtitles")) { - printf("Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead\n"); + // We replaced nosubtitles *ages* ago. Just convert it silently + debug("Configuration key 'nosubtitles' is deprecated. Converting to 'subtitles'"); if (!ConfMan.hasKey("subtitles")) ConfMan.setBool("subtitles", !ConfMan.getBool("nosubtitles")); } diff --git a/engines/sky/disk.cpp b/engines/sky/disk.cpp index 90b55133ed..5ad0c3eb19 100644 --- a/engines/sky/disk.cpp +++ b/engines/sky/disk.cpp @@ -59,7 +59,7 @@ Disk::Disk() { if (!_dataDiskHandle->isOpen()) error("Error opening %s", dataFilename); - printf("Found BASS version v0.0%d (%d dnr entries)\n", determineGameVersion(), _dinnerTableEntries); + debug("Found BASS version v0.0%d (%d dnr entries)", determineGameVersion(), _dinnerTableEntries); memset(_buildList, 0, 60 * 2); memset(_loadedFilesList, 0, 60 * 4); diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp index e19cbb27e8..1c1e2c9682 100644 --- a/engines/sky/logic.cpp +++ b/engines/sky/logic.cpp @@ -2510,7 +2510,7 @@ bool Logic::fnUnPauseFx(uint32 a, uint32 b, uint32 c) { } bool Logic::fnPrintf(uint32 a, uint32 b, uint32 c) { - printf("fnPrintf: %d\n", a); + debug("fnPrintf(%d, %d, %d)", a, b, c); return true; } diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 10895b2ec1..f664e784d5 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -398,10 +398,4 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s return NULL; } -void MoviePlayer::pauseMovie(bool pause) { - if (_bgSoundHandle) { - _snd->pauseHandle(*_bgSoundHandle, pause); - } -} - } // End of namespace Sword2 diff --git a/engines/sword2/animation.h b/engines/sword2/animation.h index ee32b1d5f2..4796d39097 100644 --- a/engines/sword2/animation.h +++ b/engines/sword2/animation.h @@ -76,7 +76,6 @@ public: bool load(const char *name); void play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadIn, uint32 leadOut); - void pauseMovie(bool pause); protected: Sword2Engine *_vm; diff --git a/engines/sword2/console.cpp b/engines/sword2/console.cpp index 4bf7c0da19..20fd79bc38 100644 --- a/engines/sword2/console.cpp +++ b/engines/sword2/console.cpp @@ -237,13 +237,15 @@ bool Debugger::Cmd_Mem(int argc, const char **argv) { break; } - DebugPrintf("%9ld %-3d %-4d %-20s %s\n", blocks[i]->size, blocks[i]->id, blocks[i]->uid, type, _vm->_resman->fetchName(blocks[i]->ptr)); + DebugPrintf("%9d %-3d %-4d %-20s %s\n", + blocks[i]->size, blocks[i]->id, blocks[i]->uid, + type, _vm->_resman->fetchName(blocks[i]->ptr)); } free(blocks); DebugPrintf("---------------------------------------------------------------------------\n"); - DebugPrintf("%9ld\n", _vm->_memory->getTotAlloc()); + DebugPrintf("%9d\n", _vm->_memory->getTotAlloc()); return true; } diff --git a/engines/sword2/debug.cpp b/engines/sword2/debug.cpp index 8f9f54ad5c..cb3c3b6a30 100644 --- a/engines/sword2/debug.cpp +++ b/engines/sword2/debug.cpp @@ -120,15 +120,6 @@ void Debugger::buildDebugText() { makeDebugTextBlock(buf, 0, 105); } -#ifdef SWORD2_DEBUG - // speed-up indicator - - if (_vm->_renderSkip) { // see sword2.cpp - sprintf(buf, "SKIPPING FRAMES FOR SPEED-UP!"); - makeDebugTextBlock(buf, 0, 120); - } -#endif - // debug info at top of screen - enabled/disabled as one complete unit if (_displayTime) { diff --git a/engines/sword2/logic.cpp b/engines/sword2/logic.cpp index 394bf7ddc8..511561c55a 100644 --- a/engines/sword2/logic.cpp +++ b/engines/sword2/logic.cpp @@ -278,16 +278,6 @@ void Logic::resetKillList() { } /** - * Pause or unpause the currently playing cutscene movie, if any. - * @param pause true if pausing, false if unpausing - */ - -void Logic::pauseMovie(bool pause) { - if (_moviePlayer) - _moviePlayer->pauseMovie(pause); -} - -/** * Read current location number from script vars */ diff --git a/engines/sword2/logic.h b/engines/sword2/logic.h index 8c49225df2..793f87d037 100644 --- a/engines/sword2/logic.h +++ b/engines/sword2/logic.h @@ -317,8 +317,6 @@ public: void logicOne(uint32 new_script); void resetKillList(); - void pauseMovie(bool pause); - // Read location number from script vars uint32 getLocationNum(); }; diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp index 84ebd142ca..dd1a2ba877 100644 --- a/engines/sword2/palette.cpp +++ b/engines/sword2/palette.cpp @@ -171,6 +171,9 @@ void Screen::setPalette(int16 startEntry, int16 noEntries, byte *colourTable, ui } void Screen::dimPalette(bool dim) { + if (getFadeStatus() != RDFADE_NONE) + return; + if (dim != _dimPalette) { _dimPalette = dim; setSystemPalette(_palette, 0, 256); diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp index e36c946eba..b1d0dee81b 100644 --- a/engines/sword2/sound.cpp +++ b/engines/sword2/sound.cpp @@ -393,18 +393,6 @@ int32 Sound::stopFx(int32 i) { return RD_OK; } -void Sound::pauseAllSound() { - pauseMusic(); - pauseSpeech(); - pauseFx(); -} - -void Sound::unpauseAllSound() { - unpauseMusic(); - unpauseSpeech(); - unpauseFx(); -} - void Sound::printFxQueue() { int freeSlots = 0; diff --git a/engines/sword2/sound.h b/engines/sword2/sound.h index 29bbdf22ca..5acc39179f 100644 --- a/engines/sword2/sound.h +++ b/engines/sword2/sound.h @@ -262,9 +262,6 @@ public: void pauseMusic(); void unpauseMusic(); - void pauseAllSound(); - void unpauseAllSound(); - void playMovieSound(int32 res, int type); void stopMovieSounds(); diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index b3b688771a..9c67fcdf25 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -290,13 +290,6 @@ Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) { _wantSfxDebug = false; -#ifdef SWORD2_DEBUG - _stepOneCycle = false; - _renderSkip = false; -#endif - - _gamePaused = false; - _gameCycle = 0; _gameSpeed = 1; @@ -481,13 +474,6 @@ Common::Error Sword2Engine::run() { while (1) { _debugger->onFrame(); -#ifdef SWORD2_DEBUG - if (_stepOneCycle) { - pauseEngine(true); - _stepOneCycle = false; - } -#endif - // Handle GMM Loading if (_gmmLoadSlot != -1) { @@ -516,10 +502,13 @@ Common::Error Sword2Engine::run() { } else if (ke->kbd.hasFlags(0) || ke->kbd.hasFlags(Common::KBD_SHIFT)) { switch (ke->kbd.keycode) { case Common::KEYCODE_p: - if (_gamePaused) + if (isPaused()) { + _screen->dimPalette(false); pauseEngine(false); - else + } else { pauseEngine(true); + _screen->dimPalette(true); + } break; #if 0 // Disabled because of strange rumors about the @@ -533,17 +522,6 @@ Common::Error Sword2Engine::run() { } break; #endif -#ifdef SWORD2_DEBUG - case Common::KEYCODE_SPACE: - if (_gamePaused) { - _stepOneCycle = true; - pauseEngine(false); - } - break; - case Common::KEYCODE_s: - _renderSkip = !_renderSkip; - break; -#endif default: break; } @@ -551,7 +529,7 @@ Common::Error Sword2Engine::run() { } // skip GameCycle if we're paused - if (!_gamePaused) { + if (!isPaused()) { _gameCycle++; gameCycle(); } @@ -566,15 +544,7 @@ Common::Error Sword2Engine::run() { // creates the debug text blocks _debugger->buildDebugText(); -#ifdef SWORD2_DEBUG - // if not in console & '_renderSkip' is set, only render - // display once every 4 game-cycles - - if (!_renderSkip || (_gameCycle % 4) == 0) - _screen->buildDisplay(); -#else _screen->buildDisplay(); -#endif } return Common::kNoError; @@ -798,49 +768,13 @@ void Sword2Engine::sleepUntil(uint32 time) { } } -void Sword2Engine::pauseEngine(bool pause) { - if (pause == _gamePaused) - return; - - // We don't need to hide the cursor for outside pausing. Not as long - // as it replaces the cursor with the GUI cursor, at least. - - _mouse->pauseEngine(pause); - pauseEngineIntern(pause); - - if (pause) { -#ifdef SWORD2_DEBUG - // Don't dim it if we're single-stepping through frames - // dim the palette during the pause - - if (!_stepOneCycle) - _screen->dimPalette(true); -#else - _screen->dimPalette(true); -#endif - } else { - _screen->dimPalette(false); - - // If mouse is about or we're in a chooser menu - if (!_mouse->getMouseStatus() || _mouse->isChoosing()) - _mouse->setMouse(NORMAL_MOUSE_ID); - } -} - void Sword2Engine::pauseEngineIntern(bool pause) { - if (pause == _gamePaused) - return; + Engine::pauseEngineIntern(pause); if (pause) { - _sound->pauseAllSound(); - _logic->pauseMovie(true); _screen->pauseScreen(true); - _gamePaused = true; } else { - _logic->pauseMovie(false); _screen->pauseScreen(false); - _sound->unpauseAllSound(); - _gamePaused = false; } } diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index 4fb856804b..302627b635 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -155,8 +155,6 @@ public: Sword2Engine(OSystem *syst); ~Sword2Engine(); - void pauseEngine(bool pause); - int getFramesPerSecond(); void registerDefaultSettings(); @@ -204,11 +202,6 @@ public: int32 _gameCycle; -#ifdef SWORD2_DEBUG - bool _renderSkip; - bool _stepOneCycle; -#endif - #if RIGHT_CLICK_CLEARS_LUGGAGE bool heldIsInInventory(); #endif @@ -237,8 +230,6 @@ public: char *getSaveFileName(uint16 slotNo); uint32 findBufferSize(); - bool _gamePaused; - void startGame(); void gameCycle(); void restartGame(); diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp index d211136614..d6c2544fe5 100644 --- a/engines/sword25/fmv/theora_decoder.cpp +++ b/engines/sword25/fmv/theora_decoder.cpp @@ -244,10 +244,12 @@ bool TheoraDecoder::load(Common::SeekableReadStream *stream) { if (_theoraComment.user_comments[i]) { int len = _theoraComment.comment_lengths[i]; char *value = (char *)malloc(len + 1); - memcpy(value, _theoraComment.user_comments[i], len); - value[len] = '\0'; - debug(1, "\t%s", value); - free(value); + if (value) { + memcpy(value, _theoraComment.user_comments[i], len); + value[len] = '\0'; + debug(1, "\t%s", value); + free(value); + } } } } diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp index f629993abf..44b9932de1 100644 --- a/engines/sword25/gfx/graphicengine.cpp +++ b/engines/sword25/gfx/graphicengine.cpp @@ -309,7 +309,8 @@ Resource *GraphicEngine::loadResource(const Common::String &filename) { // Datei laden byte *pFileData; uint fileSize; - if (!(pFileData = static_cast<byte *>(pPackage->getFile(filename, &fileSize)))) { + pFileData = pPackage->getFile(filename, &fileSize); + if (!pFileData) { BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str()); return 0; } diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp index 064ca333e7..d30460901d 100644 --- a/engines/sword25/gfx/image/art.cpp +++ b/engines/sword25/gfx/image/art.cpp @@ -34,40 +34,13 @@ /* Various utility functions RLL finds useful. */ +#include "common/textconsole.h" + #include "sword25/gfx/image/art.h" namespace Sword25 { /** - * art_die: Print the error message to stderr and exit with a return code of 1. - * @fmt: The printf-style format for the error message. - * - * Used for dealing with severe errors. - **/ -void art_die(const char *fmt, ...) { - va_list ap; - - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - exit(1); -} - -/** - * art_warn: Print the warning message to stderr. - * @fmt: The printf-style format for the warning message. - * - * Used for generating warnings. - **/ -void art_warn(const char *fmt, ...) { - va_list ap; - - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); -} - -/** * art_svp_free: Free an #ArtSVP structure. * @svp: #ArtSVP to free. * @@ -1172,7 +1145,7 @@ static int art_svp_writer_rewind_add_segment(ArtSvpWriter *self, int wind_left, right_filled = (wind_right > 0); break; default: - art_die("Unknown wind rule %d\n", swr->rule); + error("Unknown wind rule %d", swr->rule); } if (left_filled == right_filled) { /* discard segment now */ @@ -1386,7 +1359,7 @@ static void art_svp_intersect_add_horiz(ArtIntersectCtx *ctx, ArtActiveSeg *seg) ArtActiveSeg *place_right = NULL; if (seg->flags & ART_ACTIVE_FLAGS_IN_HORIZ) { - art_warn("*** attempt to put segment in horiz list twice\n"); + warning("attempt to put segment in horiz list twice"); return; } seg->flags |= ART_ACTIVE_FLAGS_IN_HORIZ; @@ -1563,7 +1536,7 @@ static ArtActiveSeg *art_svp_intersect_add_point(ArtIntersectCtx *ctx, double x, break; new_x = x_test; if (new_x < x_test) { - art_warn("art_svp_intersect_add_point: non-ascending x\n"); + warning("art_svp_intersect_add_point: non-ascending x"); } x_test = new_x; } diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index 9392eca044..fb82f893c6 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -64,7 +64,8 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) : // Datei laden byte *pFileData; uint fileSize; - if (!(pFileData = (byte *)pPackage->getFile(filename, &fileSize))) { + pFileData = pPackage->getFile(filename, &fileSize); + if (!pFileData) { BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str()); return; } diff --git a/engines/sword25/gfx/image/swimage.cpp b/engines/sword25/gfx/image/swimage.cpp index f0a8899bb6..84aa35b0f4 100644 --- a/engines/sword25/gfx/image/swimage.cpp +++ b/engines/sword25/gfx/image/swimage.cpp @@ -53,7 +53,8 @@ SWImage::SWImage(const Common::String &filename, bool &result) : // Datei laden byte *pFileData; uint fileSize; - if (!(pFileData = (byte *)pPackage->getFile(filename, &fileSize))) { + pFileData = pPackage->getFile(filename, &fileSize); + if (!pFileData) { BS_LOG_ERRORLN("File \"%s\" could not be loaded.", filename.c_str()); return; } diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp index 43ac8683ac..7587aab4e5 100644 --- a/engines/sword25/gfx/image/vectorimagerenderer.cpp +++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp @@ -329,17 +329,17 @@ void drawBez(ArtBpath *bez1, ArtBpath *bez2, art_u8 *buffer, int width, int heig #if 0 const char *codes[] = {"ART_MOVETO", "ART_MOVETO_OPEN", "ART_CURVETO", "ART_LINETO", "ART_END"}; for (int i = 0;; i++) { - printf(" bez[%d].code = %s;\n", i, codes[bez[i].code]); + debugN(" bez[%d].code = %s;\n", i, codes[bez[i].code]); if (bez[i].code == ART_END) break; if (bez[i].code == ART_CURVETO) { - printf(" bez[%d].x1 = %f; bez[%d].y1 = %f;\n", i, bez[i].x1, i, bez[i].y1); - printf(" bez[%d].x2 = %f; bez[%d].y2 = %f;\n", i, bez[i].x2, i, bez[i].y2); + debugN(" bez[%d].x1 = %f; bez[%d].y1 = %f;\n", i, bez[i].x1, i, bez[i].y1); + debugN(" bez[%d].x2 = %f; bez[%d].y2 = %f;\n", i, bez[i].x2, i, bez[i].y2); } - printf(" bez[%d].x3 = %f; bez[%d].y3 = %f;\n", i, bez[i].x3, i, bez[i].y3); + debugN(" bez[%d].x3 = %f; bez[%d].y3 = %f;\n", i, bez[i].x3, i, bez[i].y3); } - printf(" drawBez(bez, buffer, 1.0, 1.0, %f, 0x%08x);\n", penWidth, color); + debugN(" drawBez(bez, buffer, 1.0, 1.0, %f, 0x%08x);\n", penWidth, color); #endif // HACK: Some frames have green bounding boxes drawn. diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp index a2dab9658d..0bdf35a37d 100644 --- a/engines/teenagent/detection.cpp +++ b/engines/teenagent/detection.cpp @@ -137,7 +137,7 @@ public: // } static Common::String generateGameStateFileName(const char *target, int slot) { - return Common::String::printf("%s.%02d", target, slot); + return Common::String::format("%s.%02d", target, slot); } virtual SaveStateList listSaves(const char *target) const { diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index c30809eef4..4d300ff7fd 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -197,9 +197,9 @@ void TeenAgentEngine::deinit() { Common::Error TeenAgentEngine::loadGameState(int slot) { debug(0, "loading from slot %d", slot); Common::ScopedPtr<Common::InSaveFile> - in(_saveFileMan->openForLoading(Common::String::printf("teenagent.%02d", slot))); + in(_saveFileMan->openForLoading(Common::String::format("teenagent.%02d", slot))); if (!in) - in.reset(_saveFileMan->openForLoading(Common::String::printf("teenagent.%d", slot))); + in.reset(_saveFileMan->openForLoading(Common::String::format("teenagent.%d", slot))); if (!in) return Common::kReadPermissionDenied; @@ -232,7 +232,7 @@ Common::Error TeenAgentEngine::loadGameState(int slot) { Common::Error TeenAgentEngine::saveGameState(int slot, const char *desc) { debug(0, "saving to slot %d", slot); - Common::ScopedPtr<Common::OutSaveFile> out(_saveFileMan->openForSaving(Common::String::printf("teenagent.%02d", slot))); + Common::ScopedPtr<Common::OutSaveFile> out(_saveFileMan->openForSaving(Common::String::format("teenagent.%02d", slot))); if (!out) return Common::kWritingFailed; diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index 086db21c67..079239c920 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -769,7 +769,7 @@ TestExitStatus GFXtests::scaledCursors() { // Switch Graphics mode // FIXME: Crashes with "3x" mode now.: - info = Common::String::printf("Testing : Scaled cursors with GFX Mode %s\n", gfxMode->name); + info = Common::String::format("Testing : Scaled cursors with GFX Mode %s\n", gfxMode->name); if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) { Testsuite::logPrintf("\tInfo! Skipping sub-test : Scaled Cursors :: GFX Mode %s\n", gfxMode->name); gfxMode++; @@ -1104,7 +1104,7 @@ TestExitStatus GFXtests::pixelFormats() { Common::Point pt(0, 170); Common::String msg; - msg = Common::String::printf("Testing Pixel Formats, %d of %d", numFormatsTested, pfList.size()); + msg = Common::String::format("Testing Pixel Formats, %d of %d", numFormatsTested, pfList.size()); Testsuite::writeOnScreen(msg, pt, true); // CopyRectToScreen could have been used, but that may involve writing code which diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp index 2159974c51..36687f570e 100644 --- a/engines/testbed/misc.cpp +++ b/engines/testbed/misc.cpp @@ -28,7 +28,7 @@ namespace Testbed { Common::String MiscTests::getHumanReadableFormat(TimeDate &td) { - return Common::String::printf("%d:%d:%d on %d/%d/%d (dd/mm/yyyy)", td.tm_hour, td.tm_min, td.tm_sec, td.tm_mday, td.tm_mon + 1, td.tm_year + 1900); + return Common::String::format("%d:%d:%d on %d/%d/%d (dd/mm/yyyy)", td.tm_hour, td.tm_min, td.tm_sec, td.tm_mday, td.tm_mon + 1, td.tm_year + 1900); } void MiscTests::timerCallback(void *arg) { diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp index e256621553..615793da74 100644 --- a/engines/testbed/sound.cpp +++ b/engines/testbed/sound.cpp @@ -193,7 +193,7 @@ TestExitStatus SoundSubsystem::audiocdOutput() { AudioCD.play(i, 1, 0, 0); while (AudioCD.isPlaying()) { g_system->delayMillis(500); - Testsuite::writeOnScreen(Common::String::printf("Playing Now: track%02d", i), pt); + Testsuite::writeOnScreen(Common::String::format("Playing Now: track%02d", i), pt); } g_system->delayMillis(500); } @@ -234,19 +234,19 @@ TestExitStatus SoundSubsystem::sampleRates() { Common::Point pt(0, 100); mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, s1); - Testsuite::writeOnScreen(Common::String::printf("Playing at smaple rate: %d", s1->getRate()), pt); + Testsuite::writeOnScreen(Common::String::format("Playing at smaple rate: %d", s1->getRate()), pt); g_system->delayMillis(1000); mixer->stopHandle(handle); g_system->delayMillis(1000); mixer->playStream(Audio::Mixer::kSpeechSoundType, &handle, s2); - Testsuite::writeOnScreen(Common::String::printf("Playing at sample rate : %d", s2->getRate()), pt); + Testsuite::writeOnScreen(Common::String::format("Playing at sample rate : %d", s2->getRate()), pt); g_system->delayMillis(1000); mixer->stopHandle(handle); g_system->delayMillis(1000); mixer->playStream(Audio::Mixer::kSFXSoundType, &handle, s3); - Testsuite::writeOnScreen(Common::String::printf("Playing at sample rate : %d", s3->getRate()), pt); + Testsuite::writeOnScreen(Common::String::format("Playing at sample rate : %d", s3->getRate()), pt); g_system->delayMillis(1000); mixer->stopHandle(handle); g_system->delayMillis(1000); diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp index 071fba8c2c..1ceecb8ebf 100644 --- a/engines/testbed/testbed.cpp +++ b/engines/testbed/testbed.cpp @@ -48,10 +48,10 @@ void TestbedExitDialog::init() { GUI::ListWidget::ColorList colors; for (Common::Array<Testsuite *>::const_iterator i = _testsuiteList.begin(); i != _testsuiteList.end(); ++i) { - strArray.push_back(Common::String::printf("%s :", (*i)->getDescription())); + strArray.push_back(Common::String::format("%s :", (*i)->getDescription())); colors.push_back(GUI::ThemeEngine::kFontColorNormal); if ((*i)->isEnabled()) { - strArray.push_back(Common::String::printf("Passed: %d Failed: %d Skipped: %d", (*i)->getNumTestsPassed(), (*i)->getNumTestsFailed(), (*i)->getNumTestsSkipped())); + strArray.push_back(Common::String::format("Passed: %d Failed: %d Skipped: %d", (*i)->getNumTestsPassed(), (*i)->getNumTestsFailed(), (*i)->getNumTestsSkipped())); } else { strArray.push_back("Skipped"); } diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp index 8cb9ffe309..fa8764e869 100644 --- a/engines/testbed/testsuite.cpp +++ b/engines/testbed/testsuite.cpp @@ -233,7 +233,7 @@ uint Testsuite::parseEvents() { } void Testsuite::updateStats(const char *prefix, const char *info, uint testNum, uint numTests, Common::Point pt) { - Common::String text = Common::String::printf(" Running %s: %s (%d of %d) ", prefix, info, testNum, numTests); + Common::String text = Common::String::format(" Running %s: %s (%d of %d) ", prefix, info, testNum, numTests); writeOnScreen(text, pt); uint barColor = kColorSpecial; // below the text a rectangle denoting the progress in the testsuite can be drawn. diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp index 3577f4e0cc..27cb62f2f2 100644 --- a/engines/tinsel/actors.cpp +++ b/engines/tinsel/actors.cpp @@ -199,6 +199,10 @@ void RegisterActors(int num) { void FreeActors() { free(actorInfo); actorInfo = NULL; + if (TinselV2) { + free(zFactors); + zFactors = NULL; + } } /** @@ -625,7 +629,7 @@ int NextTaggedActor() { PMOVER pActor; bool hid; - do { + while (ti < NumActors) { if (actorInfo[ti].tagged) { pActor = GetMover(ti+1); if (pActor) @@ -637,7 +641,8 @@ int NextTaggedActor() { return ++ti; } } - } while (++ti < NumActors); + ++ti; + } return 0; } diff --git a/engines/tinsel/coroutine.cpp b/engines/tinsel/coroutine.cpp index a1871f90b0..72f39bb21e 100644 --- a/engines/tinsel/coroutine.cpp +++ b/engines/tinsel/coroutine.cpp @@ -47,7 +47,7 @@ static void changeCoroStats(const char *func, int change) { } static void displayCoroStats() { - printf("%d active coros\n", s_coroCount); + debug("%d active coros", s_coroCount); // Loop over s_coroFuncs and print info about active coros if (!s_coroFuncs) @@ -55,7 +55,7 @@ static void displayCoroStats() { for (CoroHashMap::const_iterator it = s_coroFuncs->begin(); it != s_coroFuncs->end(); ++it) { if (it->_value != 0) - printf(" %3d x %s\n", it->_value, it->_key.c_str()); + debug(" %3d x %s", it->_value, it->_key.c_str()); } } @@ -75,7 +75,7 @@ CoroBaseContext::~CoroBaseContext() { #if COROUTINE_DEBUG s_coroCount--; changeCoroStats(_funcName, -1); - printf("Deleting coro in %s at %p (subctx %p)\n ", + debug("Deleting coro in %s at %p (subctx %p)", _funcName, (void *)this, (void *)_subctx); displayCoroStats(); #endif diff --git a/engines/tinsel/coroutine.h b/engines/tinsel/coroutine.h index c8b220b212..82bc2c4cca 100644 --- a/engines/tinsel/coroutine.h +++ b/engines/tinsel/coroutine.h @@ -129,10 +129,14 @@ public: * _ctx->var = 0; * * @see CORO_END_CONTEXT + * + * @note We declare a variable 'DUMMY' to allow the user to specify an 'empty' + * context, and so compilers won't complain about ";" following the macro. */ #define CORO_BEGIN_CONTEXT \ struct CoroContextTag : CoroBaseContext { \ CoroContextTag() : CoroBaseContext(SCUMMVM_CURRENT_FUNCTION) {} \ + int DUMMY /** * End the declaration of a coroutine context. diff --git a/engines/tinsel/debugger.cpp b/engines/tinsel/debugger.cpp index 5d8b22116d..ed877587c7 100644 --- a/engines/tinsel/debugger.cpp +++ b/engines/tinsel/debugger.cpp @@ -117,7 +117,7 @@ bool Console::cmd_music(int argc, const char **argv) { int param = strToInt(argv[1]); if (param == 0) { - DebugPrintf("Track number/offset can't be 0!\n", argv[0]); + DebugPrintf("Track number/offset can't be 0!\n"); } else if (param > 0) { // Track provided PlayMidiSequence(GetTrackOffset(param - 1), false); diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index d6bdad6032..b32e742e6d 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -133,7 +133,14 @@ bool TinselMetaEngine::hasFeature(MetaEngineFeature f) const { bool Tinsel::TinselEngine::hasFeature(EngineFeature f) const { return #if 0 - // FIXME: tinsel does not exit cleanly yet + // FIXME: It is possible to return to the launcher from tinsel. + // But then any attempt to re-enter the engine will lead to + // a crash or at least seriously broken behavior. + // + // This is because the Tinsel engine makes use of tons of + // global variables (static and non-static) which are never + // explicitly re-initialized when the engine is started + // for a second time. (f == kSupportsRTL) || #endif (f == kSupportsLoadingDuringRuntime); diff --git a/engines/tinsel/heapmem.cpp b/engines/tinsel/heapmem.cpp index fa05c3717b..83bbf6affa 100644 --- a/engines/tinsel/heapmem.cpp +++ b/engines/tinsel/heapmem.cpp @@ -94,7 +94,7 @@ static void MemoryStats() { } } - printf("%d nodes used, %d alloced, %d locked; %d bytes locked, %d used\n", + debug("%d nodes used, %d alloced, %d locked; %d bytes locked, %d used", usedNodes, allocedNodes, lockedNodes, lockedSize, totalSize); } #endif diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 9560624e05..f21c41a843 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -382,7 +382,7 @@ void OpenMidiFiles() { assert(curTrack < ARRAYSIZE(midiOffsets)); midiOffsets[curTrack] = curOffset + (4 * curTrack); - //printf("%d: %d\n", curTrack, midiOffsets[curTrack]); + //debug("%d: %d", curTrack, midiOffsets[curTrack]); songLength = midiStream.readUint32LE(); curOffset += songLength; diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp index 7a93a0b30a..b67d20fa93 100644 --- a/engines/tinsel/object.cpp +++ b/engines/tinsel/object.cpp @@ -94,7 +94,7 @@ void KillAllObjects() { */ void ObjectStats() { - printf("%i objects of %i used.\n", maxObj, NUM_OBJECTS); + debug("%i objects of %i used", maxObj, NUM_OBJECTS); } #endif diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp index ec518d9e68..528adcd048 100644 --- a/engines/tinsel/palette.cpp +++ b/engines/tinsel/palette.cpp @@ -198,8 +198,8 @@ void ResetPalAllocator() { * Shows the maximum number of palettes used at once. */ void PaletteStats() { - printf("%i palettes of %i used.\n", maxPals, NUM_PALETTES); - printf("%i DAC queue entries of %i used.\n", maxDACQ, VDACQLENGTH); + debug("%i palettes of %i used", maxPals, NUM_PALETTES); + debug("%i DAC queue entries of %i used", maxDACQ, VDACQLENGTH); } #endif diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index b010ad1fcb..bb77c962a2 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -106,6 +106,18 @@ enum { #define SAVEGAME_ID (TinselV2 ? (uint32)DW2_SAVEGAME_ID : (uint32)DW1_SAVEGAME_ID) +enum { + // FIXME: Save file names in ScummVM can be longer than 8.3, overflowing the + // name field in savedFiles. Raising it to 256 as a preliminary fix. + FNAMELEN = 256 // 8.3 +}; + +struct SFILES { + char name[FNAMELEN]; + char desc[SG_DESC_LEN + 2]; + TimeDate dateTime; +}; + //----------------- LOCAL GLOBAL DATA -------------------- static int numSfiles = 0; @@ -318,9 +330,9 @@ static int cmpTimeDate(const TimeDate &a, const TimeDate &b) { } /** - * Interrogate the current DOS directory for saved game files. + * Compute a list of all available saved game files. * Store the file details, ordered by time, in savedFiles[] and return - * the number of files found). + * the number of files found. */ int getList(Common::SaveFileManager *saveFileMan, const Common::String &target) { // No change since last call? diff --git a/engines/tinsel/savescn.h b/engines/tinsel/savescn.h index f0927baae3..271cdd5eb1 100644 --- a/engines/tinsel/savescn.h +++ b/engines/tinsel/savescn.h @@ -40,17 +40,7 @@ namespace Tinsel { enum { SG_DESC_LEN = 40, // Max. saved game description length - MAX_SAVED_FILES = 100, - - // FIXME: Save file names in ScummVM can be longer than 8.3, overflowing the - // name field in savedFiles. Raising it to 256 as a preliminary fix. - FNAMELEN = 256 // 8.3 -}; - -struct SFILES { - char name[FNAMELEN]; - char desc[SG_DESC_LEN + 2]; - TimeDate dateTime; + MAX_SAVED_FILES = 100 }; struct SAVED_DATA { diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp index 97e41e2a7d..d90312d271 100644 --- a/engines/tinsel/sched.cpp +++ b/engines/tinsel/sched.cpp @@ -132,7 +132,7 @@ void Scheduler::reset() { * Shows the maximum number of process used at once. */ void Scheduler::printStats() { - printf("%i process of %i used.\n", maxProcs, NUM_PROCESS); + debug("%i process of %i used", maxProcs, NUM_PROCESS); } #endif @@ -760,6 +760,7 @@ void GlobalProcesses(uint32 numProcess, byte *pProcess) { */ void FreeGlobalProcesses() { delete[] pGlobalProcess; + pGlobalProcess = 0; numGlobalProcess = 0; } diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index bb6ed99138..049870a20e 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -80,6 +80,7 @@ namespace Tinsel { // In BG.CPP extern void SetDoFadeIn(bool tf); extern void DropBackground(); +extern BACKGND *pCurBgnd; // In CURSOR.CPP extern void CursorProcess(CORO_PARAM, const void *); @@ -1033,6 +1034,9 @@ Common::Error TinselEngine::run() { // Write configuration _vm->_config->writeToDisk(); + EndScene(); + pCurBgnd = NULL; + return Common::kNoError; } diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp index 4381dad6f7..90f2e3ae34 100644 --- a/engines/toon/audio.cpp +++ b/engines/toon/audio.cpp @@ -98,7 +98,7 @@ void AudioManager::playMusic(Common::String dir, Common::String music) { debugC(1, kDebugAudio, "playMusic(%s, %s)", dir.c_str(), music.c_str()); // two musics can be played at same time - Common::String path = Common::String::printf("act%d/%s/%s.mus", _vm->state()->_currentChapter, dir.c_str(), music.c_str()); + Common::String path = Common::String::format("act%d/%s/%s.mus", _vm->state()->_currentChapter, dir.c_str(), music.c_str()); if (_currentMusicName == music) return; diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index f6e244a064..e4cb48050e 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -443,11 +443,11 @@ void Character::update(int32 timeIncrement) { #if 0 if (_id == 0) - printf(" drew animation name %s / flag %d / frame %d \n", _specialAnim->_name, _animFlags, nextFrame); + debug(" drew animation name %s / flag %d / frame %d", _specialAnim->_name, _animFlags, nextFrame); if (_id == 1) - debugC(0, 0xfff, " flux animation flag %d / frame %d", _animFlags, nextFrame); + debug(" flux animation flag %d / frame %d", _animFlags, nextFrame); if (_id == 7) - debugC(0, 0xfff, " footman animation flag %d / frame %d", _animFlags, nextFrame); + debug(" footman animation flag %d / frame %d", _animFlags, nextFrame); #endif _time = nextTime; diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp index e9649b1560..4b8c987d1e 100644 --- a/engines/toon/detection.cpp +++ b/engines/toon/detection.cpp @@ -159,7 +159,7 @@ bool ToonMetaEngine::hasFeature(MetaEngineFeature f) const { } void ToonMetaEngine::removeSaveState(const char *target, int slot) const { - Common::String fileName = Common::String::printf("%s.%03d", target, slot); + Common::String fileName = Common::String::format("%s.%03d", target, slot); g_system->getSavefileManager()->removeSavefile(fileName); } @@ -209,7 +209,7 @@ SaveStateList ToonMetaEngine::listSaves(const char *target) const { } SaveStateDescriptor ToonMetaEngine::querySaveMetaInfos(const char *target, int slot) const { - Common::String fileName = Common::String::printf("%s.%03d", target, slot); + Common::String fileName = Common::String::format("%s.%03d", target, slot); Common::InSaveFile *file = g_system->getSavefileManager()->openForLoading(fileName); if (file) { diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp index f571f324ef..c62211a1ae 100644 --- a/engines/toon/script_func.cpp +++ b/engines/toon/script_func.cpp @@ -1072,25 +1072,25 @@ int32 ScriptFunc::sys_Cmd_Play_Sfx(EMCState *state) { } int32 ScriptFunc::sys_Cmd_Set_Ambient_Sfx(EMCState *state) { - //printf("Ambient Sfx : %d %d %d %d\n", stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + //debug("Ambient Sfx : %d %d %d %d", stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _vm->getAudioManager()->startAmbientSFX(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); return 0; } int32 ScriptFunc::sys_Cmd_Kill_Ambient_Sfx(EMCState *state) { - //printf("Kill Sfx : %d \n", stackPos(0)); + //debug("Kill Sfx : %d", stackPos(0)); _vm->getAudioManager()->killAmbientSFX(stackPos(0)); return 0; } int32 ScriptFunc::sys_Cmd_Set_Ambient_Sfx_Plus(EMCState *state) { - //printf("Ambient Sfx Plus: %d %d %d %d %d %d %d %d\n", stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7)); + //debug("Ambient Sfx Plus: %d %d %d %d %d %d %d %d", stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7)); _vm->getAudioManager()->startAmbientSFX(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); return 0; } int32 ScriptFunc::sys_Cmd_Set_Ambient_Volume(EMCState *state) { - //printf("Ambient Volume : %d %d \n", stackPos(0), stackPos(1)); + //debug("Ambient Volume : %d %d", stackPos(0), stackPos(1)); _vm->getAudioManager()->setAmbientSFXVolume(stackPos(0), stackPos(1)); return 0; } diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 7a6a2fc87a..3f8d0b2b5f 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -948,7 +948,7 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) { // load package - strcpy(temp, createRoomFilename(Common::String::printf("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str()); + strcpy(temp, createRoomFilename(Common::String::format("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str()); resources()->openPackage(temp, true); strcpy(temp, state()->_locations[SceneId]._name); @@ -993,7 +993,7 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) { strcpy(temp, state()->_locations[SceneId]._name); strcat(temp, ".svi"); - strcpy(temp2, createRoomFilename(Common::String::printf("%s.svl", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str()); + strcpy(temp2, createRoomFilename(Common::String::format("%s.svl", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str()); _audioManager->loadAudioPack(1, temp, temp2); strcpy(temp, state()->_locations[SceneId]._name); strcpy(temp2, state()->_locations[SceneId]._name); @@ -1580,7 +1580,7 @@ void ToonEngine::exitScene() { _currentTextLineCharacterId = 0; char temp[256]; - strcpy(temp, createRoomFilename(Common::String::printf("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str()); + strcpy(temp, createRoomFilename(Common::String::format("%s.pak", _gameState->_locations[_gameState->_currentScene]._name).c_str()).c_str()); resources()->closePackage(temp); @@ -2808,7 +2808,7 @@ bool ToonEngine::canLoadGameStateCurrently() { } Common::String ToonEngine::getSavegameName(int nr) { - return _targetName + Common::String::printf(".%03d", nr); + return _targetName + Common::String::format(".%03d", nr); } bool ToonEngine::saveGame(int32 slot, Common::String saveGameDesc) { @@ -2828,7 +2828,7 @@ bool ToonEngine::saveGame(int32 slot, Common::String saveGameDesc) { if (!saveGameDesc.empty()) { savegameDescription = saveGameDesc; } else { - savegameDescription = Common::String::printf("Quick save #%d", slot); + savegameDescription = Common::String::format("Quick save #%d", slot); } } @@ -4329,7 +4329,7 @@ int32 ToonEngine::pauseSceneAnimationScript(int32 animScriptId, int32 tickToWait } Common::String ToonEngine::createRoomFilename(Common::String name) { - Common::String file = Common::String::printf("ACT%d/%s/%s", _gameState->_currentChapter, _gameState->_locations[_gameState->_currentScene]._name, name.c_str()); + Common::String file = Common::String::format("ACT%d/%s/%s", _gameState->_currentChapter, _gameState->_locations[_gameState->_currentScene]._name, name.c_str()); return file; } diff --git a/gui/Actions.cpp b/gui/Actions.cpp index 809188dfef..f44479a5a8 100644 --- a/gui/Actions.cpp +++ b/gui/Actions.cpp @@ -25,12 +25,12 @@ #include "gui/Actions.h" #include "gui/message.h" -#include "scumm/scumm.h" #include "common/config-manager.h" #ifdef _WIN32_WCE #include "backends/platform/wince/CEActionsPocket.h" #include "backends/platform/wince/CEActionsSmartphone.h" + #include "backends/platform/wince/CEDevice.h" #elif defined(__SYMBIAN32__) #include "backends/platform/symbian/src/SymbianActions.h" #endif @@ -42,8 +42,7 @@ Actions* Actions::Instance() { } Actions::Actions() : - _mapping_active(false), _initialized(false) -{ + _mapping_active(false), _initialized(false) { } @@ -95,7 +94,7 @@ bool Actions::mappingActive() { bool Actions::performMapped(unsigned int keyCode, bool pushed) { int i; - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { if (_action_mapping[i] == keyCode && _action_enabled[i]) return perform((ActionType)i, pushed); } @@ -112,7 +111,7 @@ bool Actions::loadMapping() { return false; tempo = ConfMan.get("action_mapping", domain()).c_str(); if (tempo && strlen(tempo)) { - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { char x[7]; int j; memset(x, 0, sizeof(x)); @@ -121,8 +120,7 @@ bool Actions::loadMapping() { _action_mapping[i] = j; } return true; - } - else + } else return false; } @@ -131,7 +129,7 @@ bool Actions::saveMapping() { int i; tempo[0] = '\0'; ConfMan.setInt("action_mapping_version", version(), domain()); - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { char x[10]; sprintf(x, "%.4x ", _action_mapping[i]); strcat(tempo, x); @@ -149,7 +147,7 @@ unsigned int Actions::getMapping(ActionType action) { void Actions::setMapping(ActionType action, unsigned int keyCode) { int i; - for (i=0; i<size(); i++) { + for (i = 0; i < size(); ++i) { if (_action_mapping[i] == keyCode) _action_mapping[i] = 0; } @@ -157,8 +155,7 @@ void Actions::setMapping(ActionType action, unsigned int keyCode) { _action_mapping[action] = keyCode; } -Key& Actions::getKeyAction(ActionType action) -{ +Key& Actions::getKeyAction(ActionType action) { return _key_action[action]; } diff --git a/gui/about.cpp b/gui/about.cpp index 3caab084ca..86d28b4f61 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -93,7 +93,7 @@ AboutDialog::AboutDialog() version += gScummVMVersion; _lines.push_back(version); - Common::String date = Common::String::printf(_("(built on %s)"), gScummVMBuildDate); + Common::String date = Common::String::format(_("(built on %s)"), gScummVMBuildDate); _lines.push_back("C2" + date); for (i = 0; i < ARRAYSIZE(copyright_text); i++) diff --git a/gui/console.cpp b/gui/console.cpp index a53e97888b..ca3726c857 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -487,7 +487,7 @@ void ConsoleDialog::defaultKeyDownHandler(Common::KeyState &state) { for (int i = _promptEndPos - 1; i >= _currentPos; i--) buffer(i + 1) = buffer(i); _promptEndPos++; - putchar((byte)state.ascii); + printChar((byte)state.ascii); scrollToCurrent(); } } @@ -498,7 +498,7 @@ void ConsoleDialog::insertIntoPrompt(const char* str) { buffer(i + l) = buffer(i); for (unsigned int j = 0; j < l; ++j) { _promptEndPos++; - putcharIntern(str[j]); + printCharIntern(str[j]); } } @@ -620,7 +620,7 @@ void ConsoleDialog::historyScroll(int direction) { else idx = _historyIndex; for (int i = 0; i < kLineBufferSize && _history[idx][i] != '\0'; i++) - putcharIntern(_history[idx][i]); + printCharIntern(_history[idx][i]); _promptEndPos = _currentPos; // Ensure once more the caret is visible (in case of very long history entries) @@ -659,38 +659,33 @@ void ConsoleDialog::updateScrollBuffer() { _scrollBar->recalc(); } -int ConsoleDialog::printf(const char *format, ...) { +int ConsoleDialog::printFormat(int dummy, const char *format, ...) { va_list argptr; va_start(argptr, format); - int count = this->vprintf(format, argptr); + int count = this->vprintFormat(dummy, format, argptr); va_end (argptr); return count; } -int ConsoleDialog::vprintf(const char *format, va_list argptr) { +int ConsoleDialog::vprintFormat(int dummy, const char *format, va_list argptr) { char buf[2048]; -#if defined(WIN32) - int count = _vsnprintf(buf, sizeof(buf), format, argptr); -#elif defined(__SYMBIAN32__) - int count = vsprintf(buf, format, argptr); -#else int count = vsnprintf(buf, sizeof(buf), format, argptr); -#endif + buf[sizeof(buf)-1] = 0; // ensure termination print(buf); return count; } -void ConsoleDialog::putchar(int c) { +void ConsoleDialog::printChar(int c) { if (_caretVisible) drawCaret(true); - putcharIntern(c); + printCharIntern(c); drawLine(pos2line(_currentPos)); } -void ConsoleDialog::putcharIntern(int c) { +void ConsoleDialog::printCharIntern(int c) { if (c == '\n') nextLine(); else { @@ -708,7 +703,7 @@ void ConsoleDialog::print(const char *str) { drawCaret(true); while (*str) - putcharIntern(*str++); + printCharIntern(*str++); draw(); } diff --git a/gui/console.h b/gui/console.h index bf44bdbe17..52762b065f 100644 --- a/gui/console.h +++ b/gui/console.h @@ -143,10 +143,10 @@ public: void handleKeyDown(Common::KeyState state); void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); - int printf(const char *format, ...) GCC_PRINTF(2, 3); - int vprintf(const char *format, va_list argptr); -#undef putchar - void putchar(int c); + int printFormat(int dummy, const char *format, ...) GCC_PRINTF(3, 4); + int vprintFormat(int dummy, const char *format, va_list argptr); + + void printChar(int c); void setInputCallback(InputCallbackProc proc, void *refCon) { _callbackProc = proc; @@ -172,7 +172,7 @@ protected: void drawLine(int line, bool restoreBg = true); void drawCaret(bool erase); - void putcharIntern(int c); + void printCharIntern(int c); void insertIntoPrompt(const char *str); void print(const char *str); void updateScrollBuffer(); diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 9bd3b35915..b9d2c4a9b0 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -78,7 +78,7 @@ int Debugger::DebugPrintf(const char *format, ...) { va_start(argptr, format); int count; #ifndef USE_TEXT_CONSOLE - count = _debuggerDialog->vprintf(format, argptr); + count = _debuggerDialog->vprintFormat(1, format, argptr); #else count = ::vprintf(format, argptr); #endif diff --git a/gui/debugger.h b/gui/debugger.h index 6f06befdf1..4bac2e1f03 100644 --- a/gui/debugger.h +++ b/gui/debugger.h @@ -41,7 +41,7 @@ public: Debugger(); virtual ~Debugger(); - int DebugPrintf(const char *format, ...); + int DebugPrintf(const char *format, ...) GCC_PRINTF(2, 3); /** * The onFrame() method should be invoked by the engine at regular diff --git a/gui/launcher.cpp b/gui/launcher.cpp index b3d08267f0..2592eecd97 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -781,7 +781,7 @@ void LauncherDialog::addGame() { // ...so let's determine a list of candidates, games that // could be contained in the specified directory. GameList candidates(EngineMan.detectGames(files)); - + int idx; if (candidates.empty()) { // No game was found in the specified directory diff --git a/sound/decoders/wave.cpp b/sound/decoders/wave.cpp index eeab026ae5..fcaace5301 100644 --- a/sound/decoders/wave.cpp +++ b/sound/decoders/wave.cpp @@ -90,15 +90,15 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate, if (blockAlign_ != 0) *blockAlign_ = blockAlign; #if 0 - printf("WAVE information:\n"); - printf(" total size: %d\n", wavLength); - printf(" fmt size: %d\n", fmtLength); - printf(" type: %d\n", type); - printf(" numChannels: %d\n", numChannels); - printf(" samplesPerSec: %d\n", samplesPerSec); - printf(" avgBytesPerSec: %d\n", avgBytesPerSec); - printf(" blockAlign: %d\n", blockAlign); - printf(" bitsPerSample: %d\n", bitsPerSample); + debug("WAVE information:"); + debug(" total size: %d", wavLength); + debug(" fmt size: %d", fmtLength); + debug(" type: %d", type); + debug(" numChannels: %d", numChannels); + debug(" samplesPerSec: %d", samplesPerSec); + debug(" avgBytesPerSec: %d", avgBytesPerSec); + debug(" blockAlign: %d", blockAlign); + debug(" bitsPerSample: %d", bitsPerSample); #endif if (type != 1 && type != 2 && type != 17) { @@ -152,7 +152,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate, offset = stream.readUint32LE(); #if 0 - printf(" found a '%s' tag of size %d\n", buf, offset); + debug(" found a '%s' tag of size %d", buf, offset); #endif } while (memcmp(buf, "data", 4) != 0); diff --git a/sound/rate_arm.cpp b/sound/rate_arm.cpp index 5bab6ca59d..63008fcb87 100644 --- a/sound/rate_arm.cpp +++ b/sound/rate_arm.cpp @@ -168,18 +168,16 @@ extern "C" int SimpleRate_readFudge(Audio::AudioStream &input, int16 *a, int b) { #ifdef DEBUG_RATECONV - fprintf(stderr, "Reading ptr=%x n%d\n", a, b); - fflush(stderr); + debug("Reading ptr=%x n%d", a, b); #endif - return input.readBuffer(a, b); + return input.readBuffer(a, b); } template<bool stereo, bool reverseStereo> int SimpleRateConverter<stereo, reverseStereo>::flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) { #ifdef DEBUG_RATECONV -fprintf(stderr, "Simple st=%d rev=%d\n", stereo, reverseStereo); -fflush(stderr); + debug("Simple st=%d rev=%d", stereo, reverseStereo); #endif st_sample_t *ostart = obuf; @@ -318,8 +316,7 @@ template<bool stereo, bool reverseStereo> int LinearRateConverter<stereo, reverseStereo>::flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) { #ifdef DEBUG_RATECONV -fprintf(stderr, "Linear st=%d rev=%d\n", stereo, reverseStereo); -fflush(stderr); + debug("Linear st=%d rev=%d", stereo, reverseStereo); #endif st_sample_t *ostart = obuf; @@ -393,8 +390,7 @@ public: assert(input.isStereo() == stereo); #ifdef DEBUG_RATECONV -fprintf(stderr, "Copy st=%d rev=%d\n", stereo, reverseStereo); -fflush(stderr); + debug("Copy st=%d rev=%d", stereo, reverseStereo); #endif st_size_t len; st_sample_t *ostart = obuf; diff --git a/test/common/str.h b/test/common/str.h index 0908b21c1e..5d9fe29af9 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -316,12 +316,12 @@ class StringTestSuite : public CxxTest::TestSuite } void test_string_printf() { - TS_ASSERT_EQUALS( Common::String::printf(""), "" ); - TS_ASSERT_EQUALS( Common::String::printf("%s", "test"), "test" ); - TS_ASSERT_EQUALS( Common::String::printf("%s.s%.02d", "monkey", 1), "monkey.s01" ); - TS_ASSERT_EQUALS( Common::String::printf("Some %s to make this string longer than the default built-in %s %d", "text", "capacity", 123456), "Some text to make this string longer than the default built-in capacity 123456" ); + TS_ASSERT_EQUALS( Common::String::format(""), "" ); + TS_ASSERT_EQUALS( Common::String::format("%s", "test"), "test" ); + TS_ASSERT_EQUALS( Common::String::format("%s.s%.02d", "monkey", 1), "monkey.s01" ); + TS_ASSERT_EQUALS( Common::String::format("Some %s to make this string longer than the default built-in %s %d", "text", "capacity", 123456), "Some text to make this string longer than the default built-in capacity 123456" ); - Common::String s = Common::String::printf("%s%X", "test", 1234); + Common::String s = Common::String::format("%s%X", "test", 1234); TS_ASSERT_EQUALS(s, "test4D2"); TS_ASSERT_EQUALS(s.size(), 7U); } diff --git a/tools/create_hugo/create_hugo.cpp b/tools/create_hugo/create_hugo.cpp index 031804f8e1..921d09d7ef 100644 --- a/tools/create_hugo/create_hugo.cpp +++ b/tools/create_hugo/create_hugo.cpp @@ -58,6 +58,10 @@ static void writeByte(FILE *fp, uint8 b) { fwrite(&b, 1, 1, fp); } +static void writeSByte(FILE *fp, int8 b) { + fwrite(&b, 1, 1, fp); +} + static void writeUint16BE(FILE *fp, uint16 value) { writeByte(fp, (uint8)(value >> 8)); writeByte(fp, (uint8)(value & 0xFF)); @@ -703,29 +707,29 @@ int main(int argc, char *argv[]) { nbrElem = sizeof(actListArr_3d) / sizeof(actList); writeActListArray(outFile, actListArr_3d, nbrElem); - writeByte(outFile, NUM_TUNES_1w); - writeByte(outFile, SILENCE_1w); - writeByte(outFile, TEST_SOUND_1w); + writeSByte(outFile, NUM_TUNES_1w); + writeSByte(outFile, SILENCE_1w); + writeSByte(outFile, TEST_SOUND_1w); - writeByte(outFile, NUM_TUNES_2w); - writeByte(outFile, SILENCE_2w); - writeByte(outFile, TEST_SOUND_2w); + writeSByte(outFile, NUM_TUNES_2w); + writeSByte(outFile, SILENCE_2w); + writeSByte(outFile, TEST_SOUND_2w); - writeByte(outFile, NUM_TUNES_3w); - writeByte(outFile, SILENCE_3w); - writeByte(outFile, TEST_SOUND_3w); + writeSByte(outFile, NUM_TUNES_3w); + writeSByte(outFile, SILENCE_3w); + writeSByte(outFile, TEST_SOUND_3w); - writeByte(outFile, NUM_TUNES_1d); - writeByte(outFile, SILENCE_1d); - writeByte(outFile, TEST_SOUND_1d); + writeSByte(outFile, NUM_TUNES_1d); + writeSByte(outFile, SILENCE_1d); + writeSByte(outFile, TEST_SOUND_1d); - writeByte(outFile, NUM_TUNES_2d); - writeByte(outFile, SILENCE_2d); - writeByte(outFile, TEST_SOUND_2d); + writeSByte(outFile, NUM_TUNES_2d); + writeSByte(outFile, SILENCE_2d); + writeSByte(outFile, TEST_SOUND_2d); - writeByte(outFile, NUM_TUNES_3d); - writeByte(outFile, SILENCE_3d); - writeByte(outFile, TEST_SOUND_3d); + writeSByte(outFile, NUM_TUNES_3d); + writeSByte(outFile, SILENCE_3d); + writeSByte(outFile, TEST_SOUND_3d); // def_tunes_1w nbrElem = sizeof(def_tunes_1w) / sizeof(int16); diff --git a/tools/create_hugo/staticdata.h b/tools/create_hugo/staticdata.h index 55945c899e..bd312bf705 100644 --- a/tools/create_hugo/staticdata.h +++ b/tools/create_hugo/staticdata.h @@ -2245,33 +2245,33 @@ uses_t uses_3d[] = { }; background_t catchall_1w[] = { // Generally applicable phrases - {kVJump_1w, 0, kSTnojump_1w, false, 0, 0}, - {kVGo_1w, 0, kSTtrywalk_1w, false, 0, 0}, - {kVEnter_1w, 0, kSTtrywalk_1w, false, 0, 0}, - {kVClimb_1w, 0, kSTnoclimb_1w, false, 0, 0}, - {kVShout_1w, 0, kSTnothing_1w, false, 0, 0}, - {kVTalk_1w, 0, kSTnotalk_1w, false, 0, 0}, - {kVSwitch_1w, 0, kSTenopurps_1w, false, 0, 0}, - {kVThrowit_1w, 0, kSTenopurps_1w, false, 0, 0}, - {kVAttack_1w, 0, kSTnoattack_1w, false, 0, 0}, - {kVBreak_1w, 0, kSTnobreak_1w, false, 0, 0}, - {kVListen_1w, 0, kSTnonoise_1w, false, 0, 0}, - {kVSmell_1w, 0, kSTnosmell_1w, false, 0, 0}, - {kVQuery_1w, 0, kSTnoidea_1w, false, 0, 0}, + {kVJump_1w, 0, kSTnojump_1w, false, 0, 0}, + {kVGo_1w, 0, kSTtrywalk_1w, false, 0, 0}, + {kVEnter_1w, 0, kSTtrywalk_1w, false, 0, 0}, + {kVClimb_1w, 0, kSTnoclimb_1w, false, 0, 0}, + {kVShout_1w, 0, kSTnothing_1w, false, 0, 0}, + {kVTalk_1w, 0, kSTnotalk_1w, false, 0, 0}, + {kVSwitch_1w, 0, kSTenopurps_1w, false, 0, 0}, + {kVThrowit_1w, 0, kSTenopurps_1w, false, 0, 0}, + {kVAttack_1w, 0, kSTnoattack_1w, false, 0, 0}, + {kVBreak_1w, 0, kSTnobreak_1w, false, 0, 0}, + {kVListen_1w, 0, kSTnonoise_1w, false, 0, 0}, + {kVSmell_1w, 0, kSTnosmell_1w, false, 0, 0}, + {kVQuery_1w, 0, kSTnoidea_1w, false, 0, 0}, {kVLook_1w, kNSky_1w, kSTlooksky_1w, false, 0, 0}, {kVLook_1w, kNWall_1w, kSTedull_1w, false, 0, 0}, {kVLook_1w, kNGround_1w, kSTedull_1w, false, 0, 0}, - {kVHelp_1w, 0, kSTaskhelp_1w, false, 0, 0}, - {kVMagic_1w, 0, kSTabracadabra_1w, false, 0, 0}, - {kVDig_1w, 0, kSTnodig_1w, false, 0, 0}, - {kVRude_1w, 0, kSTnorude_1w, false, 0, 0}, - {kVKnock_1w, 0, kSTnoanswer_1w, false, 0, 0}, + {kVHelp_1w, 0, kSTaskhelp_1w, false, 0, 0}, + {kVMagic_1w, 0, kSTabracadabra_1w, false, 0, 0}, + {kVDig_1w, 0, kSTnodig_1w, false, 0, 0}, + {kVRude_1w, 0, kSTnorude_1w, false, 0, 0}, + {kVKnock_1w, 0, kSTnoanswer_1w, false, 0, 0}, {kVTake_1w, kNPicture_1w, kSTenopurps_1w, false, 0, 0}, {kVHero, kNCut_1w, kSTCutHero_1w, false, 0, 0}, {kVHero, kNOil_1w, kSTOilHero_1w, false, 0, 0}, {kVMakeUseOf_1w, kNGold_1w, kSTGoldHero_1w, false, 0, 0}, {kVLook_1w, kNMonkey_1w, kSTLookMonkey_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen0_desc_1w[] = { // Outside house @@ -2286,8 +2286,8 @@ background_t screen0_desc_1w[] = { // Outside house {kVClimb_1w, kNFence_1w, kSTclimbfence_1w, false, 0, 0}, {kVEat_1w, kNPkin_1w, kSTeatpumpkin_1w, false, 0, 0}, {kVUnder_1w, kNCarpet_1w, kSTundermat_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen0_1w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVLook_1w, 0, kSTlookscreen0_1w, true, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen1_desc_1w[] = { // Hall @@ -2297,9 +2297,9 @@ background_t screen1_desc_1w[] = { // Hall {kVLook_1w, kNCarpet_1w, kSTedull_1w, false, 0, 0}, {kVLook_1w, kNStairs_1w, kSTlookupstairs_1w, false, 0, 0}, {kVLook_1w, kNLight_1w, kSTlooklight_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen1_1w, true, 0, 0}, - {kVListen_1w, 0, kSTlistenhall_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVLook_1w, 0, kSTlookscreen1_1w, true, 0, 0}, + {kVListen_1w, 0, kSTlistenhall_1w, false, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen2_desc_1w[] = { // Bedroom 1 @@ -2312,8 +2312,8 @@ background_t screen2_desc_1w[] = { // Bedroom 1 {kVLook_1w, kNWindow_1w, kSTlookbed1win_1w, false, 0, 0}, {kVLook_1w, kNLight_1w, kSTedull_1w, false, 0, 0}, {kVLook_1w, kNFace_1w, kSTlookface_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen2_1w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVLook_1w, 0, kSTlookscreen2_1w, true, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen3_desc_1w[] = { // Dining room @@ -2327,17 +2327,17 @@ background_t screen3_desc_1w[] = { // Dining room {kVLook_1w, kNMan_1w, kSTlookdiningman_1w, false, 0, 0}, {kVLook_1w, kNCupb_1w, kSTedull_1w, false, 0, 0}, {kVLook_1w, kNWoman_1w, kSTlookwoman_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen3_1w, true, 0, 0}, - {kVSit_1w, 0, kSTsitdown_1w, false, 0, 0}, + {kVLook_1w, 0, kSTlookscreen3_1w, true, 0, 0}, + {kVSit_1w, 0, kSTsitdown_1w, false, 0, 0}, {kVTake_1w, kNFood_1w, kSTtakefood_1w, false, 0, 0}, - {kVEat_1w, 0, kSTtakefood_1w, false, 0, 0}, + {kVEat_1w, 0, kSTtakefood_1w, false, 0, 0}, {kVTalk_1w, kNMan_1w, kSTtalkdiningman_1w, false, 0, 0}, {kVTalk_1w, kNWoman_1w, kSTtalkdiningwoman_1w, false, 0, 0}, {kVTalk_1w, kNButler_1w, kSTtalkbutler_1w, false, 0, 0}, - {kVKiss_1w, 0, kSTskiss_1w, false, 0, 0}, - {kVListen_1w, 0, kSTlistendining_1w, false, 0, 0}, - {kVDrink_1w, 0, kSTdrinkdining_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVKiss_1w, 0, kSTskiss_1w, false, 0, 0}, + {kVListen_1w, 0, kSTlistendining_1w, false, 0, 0}, + {kVDrink_1w, 0, kSTdrinkdining_1w, false, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen4_desc_1w[] = { // Bathroom @@ -2347,15 +2347,15 @@ background_t screen4_desc_1w[] = { // Bathroom {kVLook_1w, kNToilet_1w, kSTlooktoilet_1w, false, 0, 0}, {kVLook_1w, kNBath_1w, kSTlooktub_1w, false, 0, 0}, {kVLook_1w, kNSink_1w, kSTedull_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen4_1w, true, 0, 0}, - {kVCrap_1w, 0, kSTdopoo_1w, false, 0, 0}, + {kVLook_1w, 0, kSTlookscreen4_1w, true, 0, 0}, + {kVCrap_1w, 0, kSTdopoo_1w, false, 0, 0}, {kVSit_1w, kNToilet_1w, kSTdowee_1w, false, 0, 0}, {kVRide_1w, kNToilet_1w, kSTdowee_1w, false, 0, 0}, {kVInto_1w, kNBath_1w, kSTusetub_1w, false, 0, 0}, {kVTake_1w, kNBath_1w, kSTusetub_1w, false, 0, 0}, - {kVSit_1w, 0, kSTsittoilet_1w, false, 0, 0}, + {kVSit_1w, 0, kSTsittoilet_1w, false, 0, 0}, {kVWash_1w, kNHands_1w, kSTwashhands_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen5_desc_1w[] = { // Kitchen @@ -2366,10 +2366,10 @@ background_t screen5_desc_1w[] = { // Kitchen {kVLook_1w, kNBroom_1w, kSTlookbroom_1w, false, 0, 0}, {kVTake_1w, kNBroom_1w, kSTtakebroom_1w, false, 0, 0}, {kVRide_1w, kNBroom_1w, kSTridebroom_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen5_1w, true, 0, 0}, - {kVSweep_1w, 0, kSTsweepbroom_1w, false, 0, 0}, - {kVListen_1w, 0, kSTlistenkitchen_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVLook_1w, 0, kSTlookscreen5_1w, true, 0, 0}, + {kVSweep_1w, 0, kSTsweepbroom_1w, false, 0, 0}, + {kVListen_1w, 0, kSTlistenkitchen_1w, false, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen6_desc_1w[] = { // Garden @@ -2378,8 +2378,8 @@ background_t screen6_desc_1w[] = { // Garden {kVLook_1w, kNTree_1w, kSTlooktree_1w, false, 0, 0}, {kVClimb_1w, kNTree_1w, kSTclimbtree_1w, false, 0, 0}, {kVLook_1w, kNGardenbits_1w, kSTlookgarden_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen6_1w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVLook_1w, 0, kSTlookscreen6_1w, true, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen7_desc_1w[] = { // Store room @@ -2392,8 +2392,8 @@ background_t screen7_desc_1w[] = { // Store room {kVStroke_1w, kNDog_1w, kSTStrokeDog_1w, false, 0, 0}, {kVGive_1w, kNChop_1w, kSTchop1_1w, false, 0, 0}, {kVFeed_1w, kNDog_1w, kSTchop1_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen7_1w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVLook_1w, 0, kSTlookscreen7_1w, true, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen8_desc_1w[] = { // Basement @@ -2413,23 +2413,23 @@ background_t screen8_desc_1w[] = { // Basement {kVKnock_1w, kNDoor_1w, kSTknockbasedoor_1w, false, 0, 0}, {kVTalk_1w, kNPenelope_1w, kSTtalkpenelope_1w, false, 0, 0}, {kVShout_1w, kNPenelope_1w, kSTtalkpenelope_1w, false, 0, 0}, - {kVListen_1w, 0, kSTlistenbase_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen8_1w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVListen_1w, 0, kSTlistenbase_1w, false, 0, 0}, + {kVLook_1w, 0, kSTlookscreen8_1w, true, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen9_desc_1w[] = { // Bat cave - {kVLook_1w, 0, kSTlookscreen9_1w, true, 0, 0}, + {kVLook_1w, 0, kSTlookscreen9_1w, true, 0, 0}, {kVLook_1w, kNRock_1w, kSTlookrock_1w, false, 0, 0}, {kVPush_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVLift_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVMove_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVUnder_1w, kNRock_1w, kSTnounder_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen10_desc_1w[] = { // Mummy room - {kVLook_1w, 0, kSTlookscreen10_1w, true, 0, 0}, + {kVLook_1w, 0, kSTlookscreen10_1w, true, 0, 0}, {kVLook_1w, kNRock_1w, kSTlookrock_1w, false, 0, 0}, {kVPush_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVLift_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, @@ -2438,7 +2438,7 @@ background_t screen10_desc_1w[] = { // Mummy room {kVLook_1w, kNTomb_1w, kSTlooktomb_1w, false, 0, 0}, {kVLook_1w, kNMummy_1w, kSTLookMummy_1w, false, 0, 0}, {kVTalk_1w, kNMummy_1w, kSTTalkMummy_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen11_desc_1w[] = { // Lake room @@ -2447,12 +2447,12 @@ background_t screen11_desc_1w[] = { // Lake room {kVLift_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVMove_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVUnder_1w, kNRock_1w, kSTnounder_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen11_1w, true, 0, 0}, - {kVLakeverbs_1w, 0, kSTsuggestboat_1w, false, 0, 0}, - {kVDrink_1w, 0, kSTnotthirsty_1w, false, 0, 0}, - {kVPlug_1w, 0, kSTqueryplug_1w, false, 0, 0}, + {kVLook_1w, 0, kSTlookscreen11_1w, true, 0, 0}, + {kVLakeverbs_1w, 0, kSTsuggestboat_1w, false, 0, 0}, + {kVDrink_1w, 0, kSTnotthirsty_1w, false, 0, 0}, + {kVPlug_1w, 0, kSTqueryplug_1w, false, 0, 0}, {kVMakeUseOf_1w, kNBoat_1w, kSTsShutup_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen12_desc_1w[] = { // Dead end @@ -2461,9 +2461,9 @@ background_t screen12_desc_1w[] = { // Dead end {kVLift_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVMove_1w, kNRock_1w, kSTnowayhose_1w, false, 0, 0}, {kVUnder_1w, kNRock_1w, kSTnounder_1w, false, 0, 0}, - {kVLook_1w, 0, kSTlookscreen12_1w, true, 0, 0}, + {kVLook_1w, 0, kSTlookscreen12_1w, true, 0, 0}, {kVTalk_1w, kNGuard_1w, kSTtalkguard_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen13_desc_1w[] = { // Jail @@ -2475,7 +2475,7 @@ background_t screen14_desc_1w[] = { // The end }; background_t screen15_desc_1w[] = { // Laboratory - {kVLook_1w, 0, kSTlookscreen15_1w, true, 0, 0}, + {kVLook_1w, 0, kSTlookscreen15_1w, true, 0, 0}, {kVTalk_1w, kNIgor_1w, kSTtalkigor_1w, false, 0, 0}, {kVTalk_1w, kNProf_1w, kSTtalkprof_1w, false, 0, 0}, {kVLook_1w, kNMachinebits_1w, kSTlookmachine_1w, false, 0, 0}, @@ -2485,7 +2485,7 @@ background_t screen15_desc_1w[] = { // Laboratory {kVOpen_1w, kNDoor_1w, kSTuseboxdoor_1w, false, 0, 0}, {kVLook_1w, kNLight_1w, kSTlooklights_1w, false, 0, 0}, {kVLook_1w, kNBooth_1w, kSTlookbooth_1w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; @@ -2510,56 +2510,56 @@ background_t catchall_2w[] = { // Generally applicable phrases {kVLook_2w, kNPicture_2w, kSTSpicture_2w, false, DONT_CARE, 0}, {kVLook_2w, kNMirror_2w, kSTDull_2w, false, DONT_CARE, 0}, {kVLook_2w, kNTable_2w, kSTNo_on_2w, false, DONT_CARE, 0}, - {kVJump_2w, 0, kSTSjump_2w, false, DONT_CARE, 0}, - {kVGo_2w, 0, kSTTrywalk_2w, false, DONT_CARE, 0}, - {kVInto_2w, 0, kSTTrywalk_2w, false, DONT_CARE, 0}, - {kVClimb_2w, 0, kSTSclimb_2w, false, DONT_CARE, 0}, - {kVShout_2w, 0, kSTNothing_2w, false, DONT_CARE, 0}, - {kVTalk_2w, 0, kSTStalk_2w, false, DONT_CARE, 0}, - {kVSwitch_2w, 0, kSTMorespecific_2w, false, DONT_CARE, 0}, - {kVThrowit_2w, 0, kSTNopurps_2w, false, DONT_CARE, 0}, - {kVAttack_2w, 0, kSTSattack_2w, false, DONT_CARE, 0}, - {kVBreak_2w, 0, kSTSbreak_2w, false, DONT_CARE, 0}, - {kVListen_2w, 0, kSTQuiet_2w, false, DONT_CARE, 0}, - {kVSmell_2w, 0, kSTAroma_2w, false, DONT_CARE, 0}, - {kVQuery_2w, 0, kSTNoidea_2w, false, DONT_CARE, 0}, + {kVJump_2w, 0, kSTSjump_2w, false, DONT_CARE, 0}, + {kVGo_2w, 0, kSTTrywalk_2w, false, DONT_CARE, 0}, + {kVInto_2w, 0, kSTTrywalk_2w, false, DONT_CARE, 0}, + {kVClimb_2w, 0, kSTSclimb_2w, false, DONT_CARE, 0}, + {kVShout_2w, 0, kSTNothing_2w, false, DONT_CARE, 0}, + {kVTalk_2w, 0, kSTStalk_2w, false, DONT_CARE, 0}, + {kVSwitch_2w, 0, kSTMorespecific_2w, false, DONT_CARE, 0}, + {kVThrowit_2w, 0, kSTNopurps_2w, false, DONT_CARE, 0}, + {kVAttack_2w, 0, kSTSattack_2w, false, DONT_CARE, 0}, + {kVBreak_2w, 0, kSTSbreak_2w, false, DONT_CARE, 0}, + {kVListen_2w, 0, kSTQuiet_2w, false, DONT_CARE, 0}, + {kVSmell_2w, 0, kSTAroma_2w, false, DONT_CARE, 0}, + {kVQuery_2w, 0, kSTNoidea_2w, false, DONT_CARE, 0}, {kVLook_2w, kNSky_2w, kSTFalling_2w, false, DONT_CARE, 0}, {kVLook_2w, kNWall_2w, kSTDull_2w, false, DONT_CARE, 0}, {kVLook_2w, kNGround_2w, kSTDull_2w, false, DONT_CARE, 0}, - {kVHelp_2w, 0, kSTShelp_2w, false, DONT_CARE, 0}, - {kVMagic_2w, 0, kSTSmagic_2w, false, DONT_CARE, 0}, - {kVWish_2w, 0, kSTSmagic_2w, false, DONT_CARE, 0}, - {kVDig_2w, 0, kSTSdig_2w, false, DONT_CARE, 0}, - {kVRude_2w, 0, kSTSrude_2w, false, DONT_CARE, 0}, - {kVKnock_2w, 0, kSTNoanswer_2w, false, DONT_CARE, 0}, + {kVHelp_2w, 0, kSTShelp_2w, false, DONT_CARE, 0}, + {kVMagic_2w, 0, kSTSmagic_2w, false, DONT_CARE, 0}, + {kVWish_2w, 0, kSTSmagic_2w, false, DONT_CARE, 0}, + {kVDig_2w, 0, kSTSdig_2w, false, DONT_CARE, 0}, + {kVRude_2w, 0, kSTSrude_2w, false, DONT_CARE, 0}, + {kVKnock_2w, 0, kSTNoanswer_2w, false, DONT_CARE, 0}, {kVOpen_2w, kNDoor_2w, kSTWontopen_2w, false, DONT_CARE, 0}, {kVUnlock_2w, kNDoor_2w, kSTCantunlock_2w, false, DONT_CARE, 0}, {kVLook_2w, kNDoor_2w, kSTDull_2w, false, DONT_CARE, 0}, {kVLook_2w, kNLight_2w, kSTDull_2w, false, DONT_CARE, 0}, - {kVHello_2w, 0, kSTHi_2w, false, DONT_CARE, 0}, + {kVHello_2w, 0, kSTHi_2w, false, DONT_CARE, 0}, {kVLook_2w, kNFence_2w, kSTLookover_2w, false, DONT_CARE, 0}, {kVLook_2w, kNWall_2w, kSTLookover_2w, false, DONT_CARE, 0}, {kVLook_2w, kNGardenbits_2w, kSTDull_2w, false, DONT_CARE, 0}, - {kVGive_2w, 0, kSTNothanks_2w, false, DONT_CARE, 0}, + {kVGive_2w, 0, kSTNothanks_2w, false, DONT_CARE, 0}, {kVLook_2w, kNTree_2w, kSTDull2_2w, false, DONT_CARE, 0}, - {kVFire_2w, 0, kSTFire2_2w, false, DONT_CARE, 0}, - {kVShout_2w, 0, kSTNoanswer_2w, false, DONT_CARE, 0}, - {kVHerring_2w, 0, kSTSherring_2w, false, DONT_CARE, 0}, - {kVUndress_2w, 0, kSTSundress_2w, false, DONT_CARE, 0}, - {kVSit_2w, 0, kSTStired_2w, false, DONT_CARE, 0}, - {kVFeed_2w, 0, kSTNothanks_2w, false, DONT_CARE, 0}, + {kVFire_2w, 0, kSTFire2_2w, false, DONT_CARE, 0}, + {kVShout_2w, 0, kSTNoanswer_2w, false, DONT_CARE, 0}, + {kVHerring_2w, 0, kSTSherring_2w, false, DONT_CARE, 0}, + {kVUndress_2w, 0, kSTSundress_2w, false, DONT_CARE, 0}, + {kVSit_2w, 0, kSTStired_2w, false, DONT_CARE, 0}, + {kVFeed_2w, 0, kSTNothanks_2w, false, DONT_CARE, 0}, {kVRub_2w, kNCatnip_2w, kSTRubcatnip1_2w, false, DONT_CARE, 0}, {kVMakeUseOf_2w, kNScrew_2w, kSTLookScrew_2w, false, DONT_CARE, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen0_desc_2w[] = { // Outside house {kVLook_2w, 0, kSTWelcome_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen1_desc_2w[] = { // Hall - {kVLook_2w, 0, kSTLookhall_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookhall_2w, true, 0, 0}, {kVLook_2w, kNMaid_2w, kSTTmaid_2w, false, 0, 0}, {kVTalk_2w, kNMaid_2w, kSTChatmaid1_2w, false, 0, 0}, {kVTalk_2w, kNPenny_2w, kSTChatmaid2_2w, false, 0, 0}, @@ -2568,11 +2568,11 @@ background_t screen1_desc_2w[] = { // Hall {kVOpen_2w, kNDoor_2w, kSTTmaiddoor_2w, false, 0, 0}, {kVUnlock_2w, kNDoor_2w, kSTTmaiddoor_2w, false, 0, 0}, {kVLook_2w, kNDoor_2w, kSTSdoor_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen2_desc_2w[] = { // Bed1 - {kVLook_2w, 0, kSTLookbed1_2w, true, DONT_CARE, 0}, + {kVLook_2w, 0, kSTLookbed1_2w, true, DONT_CARE, 0}, {kVLook_2w, kNBed_2w, kSTLookbed_2w, false, DONT_CARE, 0}, {kVInto_2w, kNBed_2w, kSTS2bed_2w, false, 0, 0}, {kVRide_2w, kNBed_2w, kSTS2bed_2w, false, 0, 0}, @@ -2586,11 +2586,11 @@ background_t screen2_desc_2w[] = { // Bed1 {kVRest_2w, kNBed_2w, kSTNopurps_2w, false, 1, 0}, {kVUnder_2w, kNBed_2w, kSTSsearch_2w, false, DONT_CARE, 0}, {kVRead_2w, kNBook_2w, kSTNocarry_2w, false, DONT_CARE, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen3_desc_2w[] = { // Bed2 - {kVLook_2w, 0, kSTLookbed2_2w, true , 0, 0}, + {kVLook_2w, 0, kSTLookbed2_2w, true , 0, 0}, {kVLook_2w, kNBird_2w, kSTParrot_2w, false, 0, 0}, {kVLook_2w, kNPenny_2w, kSTLookpen_2w, false, 0, 0}, // since following cage has synonym "pen" {kVLook_2w, kNCage_2w, kSTDull_2w, false, 0, 0}, @@ -2608,66 +2608,66 @@ background_t screen3_desc_2w[] = { // Bed2 {kVLook_2w, kNButton_2w, kSTSbutton_2w, false, 0, 0}, {kVPush_2w, kNButton_2w, kSTS3dumb_2w, false, 0, 0}, {kVPush_2w, kNSwitch_2w, kSTS3dumb_2w, false, 0, 0}, - {kVDial_2w, 0, kSTS3phone_2w, false, 0, 4}, + {kVDial_2w, 0, kSTS3phone_2w, false, 0, 4}, {kVTake_2w, kNPhone_2w, kSTS3phone_2w, false, 0, 4}, {kVUse_2w, kNPhone_2w, kSTS3phone_2w, false, 0, 4}, {kVLift_2w, kNPhone_2w, kSTS3phone_2w, false, 0, 4}, {kVTalk_2w, kNBird_2w, kSTS3bird_2w, false, 0, 5}, - {kVInto_2w, 0, kSTSinto_2w, true, 0, 0}, + {kVInto_2w, 0, kSTSinto_2w, true, 0, 0}, {kVUnder_2w, kNCupb_2w, kSTSsearch_2w, false, 0, 0}, {kVFeed_2w, kNBird_2w, kSTBirdfull_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen4_desc_2w[] = { // Keyhole {kVLook_2w, 0, kSTLooklook_2w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen5_desc_2w[] = { // Bed3 - {kVLook_2w, 0, kSTLookbed3_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookbed3_2w, true, 0, 0}, {kVLook_2w, kNBlock_2w, kSTLookblocks_2w, false, 0, 0}, {kVPlay_2w, kNBlock_2w, kSTSblock_2w, false, 0, 0}, - {kVBlock_2w, 0, kSTSblock_2w, false, 0, 0}, + {kVBlock_2w, 0, kSTSblock_2w, false, 0, 0}, {kVLook_2w, kNCage_2w, kSTLookplaypen_2w, false, 0, 0}, {kVInto_2w, kNCage_2w, kSTStoobigtofit_2w, false, 0, 0}, {kVLook_2w, kNWindow_2w, kSTS6garden_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen6_desc_2w[] = { // Kitchen - {kVLook_2w, 0, kSTLookkitchen_2w, true, DONT_CARE, 0}, + {kVLook_2w, 0, kSTLookkitchen_2w, true, DONT_CARE, 0}, {kVLook_2w, kNButton_2w, kSTSbutton_2w, false, DONT_CARE, 0}, {kVPush_2w, kNButton_2w, kSTS3dumb_2w, false, DONT_CARE, 0}, {kVLook_2w, kNWindow_2w, kSTS6garden_2w, false, DONT_CARE, 0}, {kVLook_2w, kNUnits_2w, kSTS6dull_2w, false, DONT_CARE, 0}, {kVOpen_2w, kNUnits_2w, kSTS6dull_2w, false, DONT_CARE, 0}, - {kVInto_2w, 0, kSTSinto_2w, true, DONT_CARE, 0}, + {kVInto_2w, 0, kSTSinto_2w, true, DONT_CARE, 0}, {kVOpen_2w, kNDoor_2w, kSTMorespecific_2w, false, DONT_CARE, 0}, {kVLook_2w, kNDoor_2w, kSTMorespecific_2w, false, DONT_CARE, 0}, {kVTalk_2w, kNCook_2w, kSTTalkcook_2w, false, 1, 0}, {kVLook_2w, kNCook_2w, kSTLookcook_2w, false, 1, 0}, {kVLook_2w, kNKnife_2w, kSTLookknife_2w, false, 1, 0}, {kVTake_2w, kNKnife_2w, kSTTakeknife_2w, false, 1, 0}, - {kVListen_2w, 0, kSTListenkitchen_2w, false, 1, 0}, - {0, 0, 0, false, 0, 0} + {kVListen_2w, 0, kSTListenkitchen_2w, false, 1, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen7_desc_2w[] = { // Backdoor - {kVLook_2w, 0, kSTLookback_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookback_2w, true, 0, 0}, {kVLook_2w, kNWindow_2w, kSTLookwin_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen8_desc_2w[] = { // Shed - {kVLook_2w, 0, kSTLookshed_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookshed_2w, true, 0, 0}, {kVLook_2w, kNWindow_2w, kSTLookwin_2w, false, 0, 0}, {kVLook_2w, kNShed_2w, kSTLookatshed_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen9_desc_2w[] = { // In shed - {kVLook_2w, 0, kSTLookinshed_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookinshed_2w, true, 0, 0}, {kVLook_2w, kNWall_2w, kSTS9tools1_2w, false, 0, 0}, {kVLook_2w, kNTools_2w, kSTS9tools1_2w, false, 0, 0}, {kVTake_2w, kNTools_2w, kSTS9tools2_2w, false, 0, 0}, @@ -2678,63 +2678,63 @@ background_t screen9_desc_2w[] = { // In shed {kVRude_2w, kNGardner_2w, kSTRudeshed_2w, false, 0, 0}, {kVTalk_2w, kNGardner_2w, kSTIgnore_2w, false, 0, 0}, {kVClose_2w, kNDoor_2w, kSTShedclose_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen10_desc_2w[] = { // Venus fly traps - {kVLook_2w, 0, kSTLookvenus_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookvenus_2w, true, 0, 0}, {kVTake_2w, kNMirror_2w, kSTNotmirror_2w, false, 0, 0}, {kVLook_2w, kNFly_2w, kSTLookFly_2w, false, 0, 0}, {kVLook_2w, kNLeaf_2w, kSTLookTrap_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen11_desc_2w[] = { // Gates open - {kVLook_2w, 0, kSTS11look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS11look_2w, true, 0, 0}, {kVClose_2w, kNDoor_2w, kSTNopurps_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen12_desc_2w[] = { // Gates closed - {kVLook_2w, 0, kSTS12look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS12look_2w, true, 0, 0}, {kVLook_2w, kNDoor_2w, kSTGates1_2w, false, 0, 0}, {kVOpen_2w, kNDoor_2w, kSTGates1_2w, false, 0, 0}, {kVBreak_2w, kNDoor_2w, kSTGates2_2w, false, 0, 0}, {kVAttack_2w, kNDoor_2w, kSTGates2_2w, false, 0, 0}, {kVUnlock_2w, kNDoor_2w, kSTGates3_2w, false, 0, 0}, {kVUnlock_2w, kNGate_2w, kSTGates3_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen13_desc_2w[] = { // Stream - {kVLook_2w, 0, kSTS13look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS13look_2w, true, 0, 0}, {kVLook_2w, kNBridge_2w, kSTNospecial_2w, false, 0, 0}, {kVUnder_2w, kNBridge_2w, kSTSsearch_2w, false, 0, 0}, {kVLook_2w, kNWater_2w, kSTDull_2w, false, 0, 0}, {kVThrowit_2w, kNMatches_2w, kSTThrowmatch_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen14_desc_2w[] = { // Zapper - {kVLook_2w, 0, kSTS14look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS14look_2w, true, 0, 0}, {kVSwitch_2w, kNZapper_2w, kSTNoswitch_2w, false, 0, 0}, {kVWind_2w, kNZapper_2w, kSTNoswitch_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen15_desc_2w[] = { // Mushroom - {kVLook_2w, 0, kSTS15look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS15look_2w, true, 0, 0}, {kVUse_2w, kNOldman_2w, kSTS15wand2_2w, false, 0, 0}, {kVTalk_2w, kNOldman_2w, kSTNoreply_2w, false, 0, 0}, {kVLook_2w, kNWand_2w, kSTS15wand1_2w, false, 0, 0}, {kVTake_2w, kNWand_2w, kSTS15wand2_2w, false, 0, 0}, {kVSearch_2w, kNOldman_2w, kSTSsearch_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen16_desc_2w[] = { // Well - {kVLook_2w, 0, kSTS16look_2w, true, 0, 0}, - {kVClimb_2w, 0, kSTTryrope_2w, false, 0, 0}, + {kVLook_2w, 0, kSTS16look_2w, true, 0, 0}, + {kVClimb_2w, 0, kSTTryrope_2w, false, 0, 0}, {kVGo_2w, kNWell_2w, kSTTryrope_2w, false, 0, 0}, {kVWind_2w, kNRope_2w, kSTWindwell_2w, false, 0, 0}, {kVTie_2w, kNRope_2w, kSTNopurps_2w, false, 0, 0}, @@ -2745,103 +2745,103 @@ background_t screen16_desc_2w[] = { // Well {kVWind_2w, kNHandle_2w, kSTWindwell_2w, false, 0, 0}, {kVInto_2w, kNBucket_2w, kSTNosee_2w, false, 0, 0}, {kVInto_2w, kNWell_2w, kSTIntowell_2w, false, 0, 0}, - {kVWish_2w, 0, kSTGetonwithit_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVWish_2w, 0, kSTGetonwithit_2w, false, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen17_desc_2w[] = { // Snakepit - {kVLook_2w, 0, kSTS17look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS17look_2w, true, 0, 0}, {kVAttack_2w, kNSnake_2w, kSTS17kill_2w, false, 0, 0}, {kVBreak_2w, kNSnake_2w, kSTS17kill_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen18_desc_2w[] = { // Phonebox - {kVLook_2w, 0, kSTS18look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS18look_2w, true, 0, 0}, {kVLook_2w, kNPhone_2w, kSTS18look_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen19_desc_2w[] = { // Street - {kVLook_2w, 0, kSTS19look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS19look_2w, true, 0, 0}, {kVLook_2w, kNWall_2w, kSTSgraf_2w, false, 0, 0}, {kVRead_2w, kNWall_2w, kSTSgraf_2w, false, 0, 0}, {kVLook_2w, kNGraf_2w, kSTSgraf_2w, false, 0, 0}, {kVRead_2w, kNGraf_2w, kSTSgraf_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen20_desc_2w[] = { // Kennel - {kVLook_2w, 0, kSTS20look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS20look_2w, true, 0, 0}, {kVLook_2w, kNWindow_2w, kSTMorespecific_2w, false, 0, 0}, {kVThrowit_2w, kNStick_2w, kSTDonthaveone_2w, false, 0, 0}, {kVStroke_2w, kNDog_2w, kSTStrokedog_2w, false, 0, 0}, {kVTalk_2w, kNDog_2w, kSTStrokedog_2w, false, 0, 0}, - {kVInto_2w, 0, kSTStoobigtofit_2w, false, 0, 0}, + {kVInto_2w, 0, kSTStoobigtofit_2w, false, 0, 0}, {kVTake_2w, kNStick_2w, kSTThrown_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen21_desc_2w[] = { // Rockroom - {kVLook_2w, 0, kSTS21look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS21look_2w, true, 0, 0}, {kVClimb_2w, kNRope_2w, kSTNotclose_2w, false, 0, 0}, {kVMove_2w, kNRock_2w, kSTTooheavy_2w, false, 0, 0}, {kVUnder_2w, kNRock_2w, kSTNounder_2w, false, 0, 0}, {kVLift_2w, kNRock_2w, kSTNowayhose_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTDull_2w, false, 0, 0}, {kVTake_2w, kNRock_2w, kSTNowayhose_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen22_desc_2w[] = { // Rockgone - {kVLook_2w, 0, kSTS22look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS22look_2w, true, 0, 0}, {kVClimb_2w, kNRope_2w, kSTNotclose_2w, false, 0, 0}, {kVLift_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTDull_2w, false, 0, 0}, {kVTake_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, {kVUnder_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen23_desc_2w[] = { // Threeway - {kVLook_2w, 0, kSTS23look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS23look_2w, true, 0, 0}, {kVLift_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTDull_2w, false, 0, 0}, {kVUnder_2w, kNRock_2w, kSTDull2_2w, false, 0, 0}, {kVTake_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen24_desc_2w[] = { // Lampcave - {kVLook_2w, 0, kSTS24look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS24look_2w, true, 0, 0}, {kVLift_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTNospecial_2w, false, 0, 0}, {kVUnder_2w, kNRock_2w, kSTDull2_2w, false, 0, 0}, {kVTake_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen25_desc_2w[] = { // Chasm - {kVLook_2w, 0, kSTS25look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS25look_2w, true, 0, 0}, {kVUnder_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, {kVLift_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTDull_2w, false, 0, 0}, {kVTake_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, - {kVJump_2w, 0, kSTSnojump_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVJump_2w, 0, kSTSnojump_2w, false, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen26_desc_2w[] = { // Passage - {kVLook_2w, 0, kSTS26look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS26look_2w, true, 0, 0}, {kVUnder_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, {kVLift_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTDull_2w, false, 0, 0}, {kVTake_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen27_desc_2w[] = { // genie - {kVLook_2w, 0, kSTS27look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS27look_2w, true, 0, 0}, {kVUnder_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, {kVLift_2w, kNRock_2w, kSTSsearch_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTDull_2w, false, 0, 0}, @@ -2855,57 +2855,57 @@ background_t screen27_desc_2w[] = { // genie {kVKiss_2w, kNGenie_2w, kSTRudeshed_2w, false, 0, 0}, {kVGive_2w, kNBanana_2w, kSTNobanana_2w, false, 0, 0}, {kVClimb_2w, kNStairs_2w, kSTTrywalk_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen28_desc_2w[] = { // traproom - {kVLook_2w, 0, kSTS28look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS28look_2w, true, 0, 0}, {kVBreak_2w, kNSafe_2w, kSTNowayhose_2w, false, 0, 0}, {kVLook_2w, kNHole_2w, kSTS28hole_2w, false, 0, 28}, {kVTake_2w, kNMouse_2w, kSTS28mouse_2w, false, 0, 0}, {kVTake_2w, kNMousehole_2w, kSTS28mouse_2w, false, 0, 0}, {kVTake_2w, kNDroppings_2w, kSTSdroppings_2w, false, 0, 0}, {kVUnscrew_2w, kNSafe_2w, kSTMorespecific_2w, false, 0, 0}, - {kVOpen_2w, 0, kSTUnlocksafe_2w, false, 0, 0}, + {kVOpen_2w, 0, kSTUnlocksafe_2w, false, 0, 0}, {kVUnlock_2w, kNSafe_2w, kSTUnlocksafe_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen29_desc_2w[] = { // Hall 2 {kVLook_2w, 0, kSTLookhall_2w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen30_desc_2w[] = { // Lounge - {kVLook_2w, 0, kSTS30look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS30look_2w, true, 0, 0}, {kVLook_2w, kNWindow_2w, kSTS6garden_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen31_desc_2w[] = { // parlor - {kVLook_2w, 0, kSTS31look_2w, true, 0, 0}, - {kVListen_2w, 0, kSTBlah_2w, false, 0, 0}, + {kVLook_2w, 0, kSTS31look_2w, true, 0, 0}, + {kVListen_2w, 0, kSTBlah_2w, false, 0, 0}, {kVOpen_2w, kNDoor_2w, kSTMorespecific_2w, false, 0, 0}, {kVLook_2w, kNDoor_2w, kSTMorespecific_2w, false, 0, 0}, {kVLook_2w, kNMaid_2w, kSTLookPMaid_2w, false, 0, 0}, {kVTalk_2w, kNMaid_2w, kSTTalkPMaid_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen32_desc_2w[] = { // catroom - {kVLook_2w, 0, kSTS32look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS32look_2w, true, 0, 0}, {kVStroke_2w, kNCat_2w, kSTSstrokecat_2w, false, 0, 0}, {kVPlay_2w, kNCat_2w, kSTSplaycat_2w, false, 0, 0}, {kVTalk_2w, kNCat_2w, kSTStalkcat_2w, false, 0, 0}, {kVLook_2w, kNPost_2w, kSTSlookpost_2w, false, 0, 0}, - {kVGive_2w, 0, kSTSgivecat_2w, false, 0, 0}, + {kVGive_2w, 0, kSTSgivecat_2w, false, 0, 0}, {kVLook_2w, kNWindow_2w, kSTS6garden_2w, false, 0, 0}, {kVRub_2w, kNCatnip_2w, kSTRubcatnip2_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen33_desc_2w[] = { // Boxroom - {kVLook_2w, 0, kSTS33look_2w, true, 0, 0}, + {kVLook_2w, 0, kSTS33look_2w, true, 0, 0}, {kVLook_2w, kNDoor_2w, kSTLookboxdoor_2w, false, 0, 0}, {kVOpen_2w, kNDoor_2w, kSTWontopen_2w, false, 0, 0}, {kVRead_2w, kNPaper_2w, kSTReadpaper_2w, false, 0, 29}, @@ -2920,27 +2920,27 @@ background_t screen33_desc_2w[] = { // Boxroom {kVPush_2w, kNKey_2w, kSTMorespecific_2w, false, 0, 0}, {kVMakeUseOf_2w, kNPencil_2w, kSTUsePencil_2w, false, 0, 0}, {kVScribble_2w, kNPencil_2w, kSTDoCrossword_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen34_desc_2w[] = { // hall3 - {kVLook_2w, 0, kSTLookhall_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookhall_2w, true, 0, 0}, {kVLook_2w, kNMirror_2w, kSTLookMirror_2w, false, 0, 0}, {kVTake_2w, kNMirror_2w, kSTNouse_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen35_desc_2w[] = { // Organ - {kVLook_2w, 0, kSTS35look_2w, true, DONT_CARE, 0}, + {kVLook_2w, 0, kSTS35look_2w, true, DONT_CARE, 0}, {kVLook_2w, kNOrgan_2w, kSTLookOrgan_2w, false, DONT_CARE, 0}, {kVPlay_2w, kNOrgan_2w, kSTPlayorgan_2w, false, DONT_CARE, 0}, - {kVListen_2w, 0, kSTHearorgan_2w, false, 0, 0}, - {kVListen_2w, 0, kSTHearlaugh_2w, false, 1, 0}, - {0, 0, 0, false, 0, 0} + {kVListen_2w, 0, kSTHearorgan_2w, false, 0, 0}, + {kVListen_2w, 0, kSTHearlaugh_2w, false, 1, 0}, + {0, 0, 0, false, 0, 0} }; background_t screen36_desc_2w[] = { // Hestroom - {kVLook_2w, 0, kSTLookhest_2w, true, 0, 0}, + {kVLook_2w, 0, kSTLookhest_2w, true, 0, 0}, {kVTake_2w, kNBook_2w, kSTS36book_2w, false, 0, 0}, {kVTake_2w, kNBookcase_2w, kSTS36book_2w, false, 0, 0}, {kVRead_2w, kNBook_2w, kSTS36book_2w, false, 0, 0}, @@ -2948,23 +2948,23 @@ background_t screen36_desc_2w[] = { // Hestroom {kVLook_2w, kNTable_2w, kSTS36table_2w, false, 0, 0}, {kVTalk_2w, kNHester_2w, kSTTalkhester_2w, false, 0, 0}, {kVLook_2w, kNWindow_2w, kSTS6garden_2w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen37_desc_2w[] = { // Retupmoc // Screen states: 0: default, 1: Got screwdriver - {kVLook_2w, 0, kSTS37look_2w, true, DONT_CARE, 0}, + {kVLook_2w, 0, kSTS37look_2w, true, DONT_CARE, 0}, {kVLift_2w, kNRock_2w, kSTNopurps_2w, false, 0, 0}, {kVLook_2w, kNRock_2w, kSTNospecial_2w, false, 0, 0}, {kVUnder_2w, kNRock_2w, kSTDull2_2w, false, 0, 0}, {kVTalk_2w, kNDoctor_2w, kSTComeHere_2w, false, 0, 0}, {kVTalk_2w, kNDoctor_2w, kSTPleasego_2w, false, 1, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen38_desc_2w[] = { // hall1 {kVLook_2w, 0, kSTS38look_2w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; // Array of ptrs to object_list_t @@ -2987,138 +2987,138 @@ background_t catchall_3w[] = { // Generally applicable phrases {kVNaughty_3w, kNPenny_3w, kSTHeadache_3w, false, DONT_CARE, 0}, {kVInto_3w, kNWindow_3w, kSTThruwindow_3w, false, DONT_CARE, 0}, {kVOutof_3w, kNWindow_3w, kSTThruwindow_3w, false, DONT_CARE, 0}, - {kVJump_3w, 0, kSTSjump_3w, false, DONT_CARE, 0}, - {kVGo_3w, 0, kSTTrywalk_3w, false, DONT_CARE, 0}, - {kVInto_3w, 0, kSTTrywalk_3w, false, DONT_CARE, 0}, - {kVClimb_3w, 0, kSTSclimb_3w, false, DONT_CARE, 0}, - {kVShout_3w, 0, kSTNothing_3w, false, DONT_CARE, 0}, - {kVTalk_3w, 0, kSTStalk_3w, false, DONT_CARE, 0}, - {kVSwitch_3w, 0, kSTMorespecific_3w, false, DONT_CARE, 0}, - {kVUse_3w, 0, kSTMorespecific_3w, false, DONT_CARE, 0}, - {kVThrowit_3w, 0, kSTNopurps_3w, false, DONT_CARE, 0}, - {kVRude_3w, 0, kSTSrude_3w, false, DONT_CARE, 0}, - {kVAttack_3w, 0, kSTSattack_3w, false, DONT_CARE, 0}, - {kVBreak_3w, 0, kSTSbreak_3w, false, DONT_CARE, 0}, - {kVListen_3w, 0, kSTQuiet_3w, false, DONT_CARE, 0}, - {kVSmell_3w, 0, kSTAroma_3w, false, DONT_CARE, 0}, - {kVQuery_3w, 0, kSTNoidea_3w, false, DONT_CARE, 0}, + {kVJump_3w, 0, kSTSjump_3w, false, DONT_CARE, 0}, + {kVGo_3w, 0, kSTTrywalk_3w, false, DONT_CARE, 0}, + {kVInto_3w, 0, kSTTrywalk_3w, false, DONT_CARE, 0}, + {kVClimb_3w, 0, kSTSclimb_3w, false, DONT_CARE, 0}, + {kVShout_3w, 0, kSTNothing_3w, false, DONT_CARE, 0}, + {kVTalk_3w, 0, kSTStalk_3w, false, DONT_CARE, 0}, + {kVSwitch_3w, 0, kSTMorespecific_3w, false, DONT_CARE, 0}, + {kVUse_3w, 0, kSTMorespecific_3w, false, DONT_CARE, 0}, + {kVThrowit_3w, 0, kSTNopurps_3w, false, DONT_CARE, 0}, + {kVRude_3w, 0, kSTSrude_3w, false, DONT_CARE, 0}, + {kVAttack_3w, 0, kSTSattack_3w, false, DONT_CARE, 0}, + {kVBreak_3w, 0, kSTSbreak_3w, false, DONT_CARE, 0}, + {kVListen_3w, 0, kSTQuiet_3w, false, DONT_CARE, 0}, + {kVSmell_3w, 0, kSTAroma_3w, false, DONT_CARE, 0}, + {kVQuery_3w, 0, kSTNoidea_3w, false, DONT_CARE, 0}, {kVLook_3w, kNSky_3w, kSTFalling_3w, false, DONT_CARE, 0}, {kVLook_3w, kNWall_3w, kSTDull_3w, false, DONT_CARE, 0}, {kVLook_3w, kNGround_3w, kSTDull_3w, false, DONT_CARE, 0}, - {kVHelp_3w, 0, kSTShelp_3w, false, DONT_CARE, 0}, - {kVMagic_3w, 0, kSTSmagic_3w, false, DONT_CARE, 0}, - {kVWish_3w, 0, kSTSmagic_3w, false, DONT_CARE, 0}, - {kVDig_3w, 0, kSTSdig_3w, false, DONT_CARE, 0}, - {kVNaughty_3w, 0, kSTSnaughty_3w, false, DONT_CARE, 0}, - {kVKnock_3w, 0, kSTNoanswer_3w, false, DONT_CARE, 0}, + {kVHelp_3w, 0, kSTShelp_3w, false, DONT_CARE, 0}, + {kVMagic_3w, 0, kSTSmagic_3w, false, DONT_CARE, 0}, + {kVWish_3w, 0, kSTSmagic_3w, false, DONT_CARE, 0}, + {kVDig_3w, 0, kSTSdig_3w, false, DONT_CARE, 0}, + {kVNaughty_3w, 0, kSTSnaughty_3w, false, DONT_CARE, 0}, + {kVKnock_3w, 0, kSTNoanswer_3w, false, DONT_CARE, 0}, {kVOpen_3w, kNDoor_3w, kSTWontopen_3w, false, DONT_CARE, 0}, {kVUnlock_3w, kNDoor_3w, kSTCantunlock_3w, false, DONT_CARE, 0}, {kVLook_3w, kNDoor_3w, kSTDull_3w, false, DONT_CARE, 0}, - {kVHello_3w, 0, kSTHi_3w, false, DONT_CARE, 0}, - {kVGive_3w, 0, kSTNothanks_3w, false, DONT_CARE, 0}, - {kVShout_3w, 0, kSTNoanswer_3w, false, DONT_CARE, 0}, - {kVUndress_3w, 0, kSTSundress_3w, false, DONT_CARE, 0}, - {kVSit_3w, 0, kSTStired_3w, false, DONT_CARE, 0}, - {kVFeed_3w, 0, kSTNothanks_3w, false, DONT_CARE, 0}, + {kVHello_3w, 0, kSTHi_3w, false, DONT_CARE, 0}, + {kVGive_3w, 0, kSTNothanks_3w, false, DONT_CARE, 0}, + {kVShout_3w, 0, kSTNoanswer_3w, false, DONT_CARE, 0}, + {kVUndress_3w, 0, kSTSundress_3w, false, DONT_CARE, 0}, + {kVSit_3w, 0, kSTStired_3w, false, DONT_CARE, 0}, + {kVFeed_3w, 0, kSTNothanks_3w, false, DONT_CARE, 0}, {kVTake_3w, kNVine_3w, kSTNopurps_3w, false, DONT_CARE, 0}, {kVClimb_3w, kNJungle_3w, kSTNopurps_3w, false, DONT_CARE, 0}, {kVLook_3w, kNJungle_3w, kSTLookjungle_3w, false, DONT_CARE, 0}, {kVPut_3w, kNFire_3w, kSTNopurps_3w, false, DONT_CARE, 0}, - {kVSwim_3w, 0, kSTCantswim_3w, false, DONT_CARE, 0}, + {kVSwim_3w, 0, kSTCantswim_3w, false, DONT_CARE, 0}, {kVTake_3w, kNMouse_3w, kSTCantcatch_3w, false, DONT_CARE, 0}, {kVLook_3w, kNMouse_3w, kSTNospecial_3w, false, DONT_CARE, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t crash_desc_3w[] = { // At the crash site - {kVLook_3w, 0, kSTLookcrash_3w, false, 0, 0}, + {kVLook_3w, 0, kSTLookcrash_3w, false, 0, 0}, {kVRepair_3w, kNPlane_3w, kSTNopurps_3w, false, 0, 0}, {kVFly_3w, kNPlane_3w, kSTNopurps_3w, false, 0, 0}, - {kVInto_3w, 0, kSTMorespecific_3w, true , 0, 0}, + {kVInto_3w, 0, kSTMorespecific_3w, true , 0, 0}, {kVOpen_3w, kNDoor_3w, kSTOpenplanedoor_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t plane_desc_3w[] = { // Inside the plane {kVLook_3w, 0, kSTLookplane_3w, true , 0, 0}, {kVSearch_3w, 0, kSTSaylook_3w, false, 0, 0}, {kVInto_3w, 0, kSTYouarein_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t web_desc_3w[] = { // At the spider's web - {kVLook_3w, 0, kSTLookweb_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookweb_3w, true, 0, 0}, {kVTake_3w, kNNative_3w, kSTTakegirl_3w, false, 0, 0}, {kVLook_3w, kNWeb_3w, kSTLookatweb_3w, false, 0, 0}, {kVTake_3w, kNPenny_3w, kSTTakepenny_3w, false, 0, 0}, {kVTalk_3w, kNPenny_3w, kSTTalkpenny_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t wfall_desc_3w[] = { // Waterfall and stream - {kVLook_3w, 0, kSTLookwfall_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookwfall_3w, true, 0, 0}, {kVLook_3w, kNWater_3w, kSTLookwfall_3w, false, 0, 0}, {kVCross_3w, kNWater_3w, kSTCantcross_3w, false, 0, 0}, - {kVListen_3w, 0, kSTListenfall_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {kVListen_3w, 0, kSTListenfall_3w, false, 0, 0}, + {0, 0, 0, false, 0, 0} }; background_t wfall_b_desc_3w[] = { // Same as above but no water - {kVLook_3w, 0, kSTLookwfall_b_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookwfall_b_3w, true, 0, 0}, {kVLook_3w, kNWater_3w, kSTLookwfall_b_3w, false, 0, 0}, {kVCross_3w, kNWater_3w, kSTToomuddy_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t wbase_desc_3w[] = { // Base of waterfall - {kVLook_3w, 0, kSTLookwbase_3w, true , 0, 0}, + {kVLook_3w, 0, kSTLookwbase_3w, true , 0, 0}, {kVLook_3w, kNWater_3w, kSTLookwbase_3w, false, 0, 0}, {kVCross_3w, kNWater_3w, kSTToomuddy_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t path_ul_desc_3w[] = { // Path at left of spider's web {kVLook_3w, 0, kSTLookpath_ul_3w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t bridge_desc_3w[] = { // At the bridge - {kVLook_3w, 0, kSTLookbridge1_3w, true, 0, 0}, - {kVSwing_3w, 0, kSTSwingbridge_3w, false, 0, 0}, + {kVLook_3w, 0, kSTLookbridge1_3w, true, 0, 0}, + {kVSwing_3w, 0, kSTSwingbridge_3w, false, 0, 0}, {kVTake_3w, kNVine_3w, kSTGetbridgevines_3w, false, 0, 0}, {kVTie_3w, kNThem_3w, kSTMorespecific_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t bridge2_desc_3w[] = { // At the bridge {kVLook_3w, 0, kSTLookbridge2_3w, true, 0, 0}, {kVSwing_3w, 0, kSTSwingbridge_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t stream_desc_3w[] = { // stream with vines crossing {kVLook_3w, 0, kSTLookstream1_3w, true, 0, 0}, {kVSwing_3w, 0, kSTMorespecific_3w, false, 0, 0}, {kVCross_3w, 0, kSTStep1_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t stream2_desc_3w[] = { // Stream with elephant sitting in it - {kVLook_3w, 0, kSTLookstream2_3w, true, 0, 0}, - {kVSwing_3w, 0, kSTCantswing_3w, false, 0, 0}, + {kVLook_3w, 0, kSTLookstream2_3w, true, 0, 0}, + {kVSwing_3w, 0, kSTCantswing_3w, false, 0, 0}, {kVLook_3w, kNElephant_3w, kSTLookele2_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t village_desc_3w[] = { // Long shot of village - {kVLook_3w, 0, kSTLookvillage_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookvillage_3w, true, 0, 0}, {kVTake_3w, kNFood_3w, kSTTakething_3w, false, 0, 0}, {kVLook_3w, kNFood_3w, kSTTakething_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t hut_out_desc_3w[] = { // Outside witch doctor's hut - {kVLook_3w, 0, kSTLookhut_out_3w, false, 0, 0}, + {kVLook_3w, 0, kSTLookhut_out_3w, false, 0, 0}, {kVLook_3w, kNDocbits_3w, kSTLookdocbits_3w, false, 0, 0}, {kVTake_3w, kNDocbits_3w, kSTTakedocbits_3w, false, 0, 0}, {kVLook_3w, kNFire_3w, kSTLookdocbits_3w, false, 0, 0}, @@ -3130,15 +3130,15 @@ background_t hut_out_desc_3w[] = { // Outside witch doctor's hut {kVSearch_3w, kNWindow_3w, kSTLookinhut_3w, false, 0, 0}, {kVLook_3w, kNWindow_3w, kSTLookinhut_3w, false, 0, 0}, {kVSearch_3w, kNHut_3w, kSTLookinhut_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t hut_in_desc_3w[] = { // Inside hut // States: 0 imprisoned, 1 doctor incapacitated - {kVLook_3w, 0, kSTLookhut_in_3w, true, 0, 0}, - {kVLook_3w, 0, kSTLookhut_in2_3w, true, 1, 0}, + {kVLook_3w, 0, kSTLookhut_in_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookhut_in2_3w, true, 1, 0}, {kVLook_3w, kNDoctor_3w, kSTLookhut_in2_3w, false, 1, 0}, - {kVTake_3w, 0, kSTTakeincage_3w, false, 0, 0}, + {kVTake_3w, 0, kSTTakeincage_3w, false, 0, 0}, {kVTake_3w, kNDoctor_3w, kSTTakedoctor0_3w, false, 0, 0}, {kVTake_3w, kNDoctor_3w, kSTTakedoctor1_3w, false, 1, 0}, {kVLook_3w, kNDocbits_3w, kSTLookdocbits_3w, false, DONT_CARE, 0}, @@ -3156,7 +3156,7 @@ background_t hut_in_desc_3w[] = { // Inside hut {kVLook_3w, kNBottles_3w, kSTLookshelfbits2_3w, false, 1, 0}, {kVTake_3w, kNBottles_3w, kSTTakeshelfbits_3w, false, 1, 0}, {kVDrink_3w, kNBottles_3w, kSTTakeshelfbits_3w, false, 1, 0}, - {kVSearch_3w, 0, kSTCantlookin_3w, false, 0, 0}, + {kVSearch_3w, 0, kSTCantlookin_3w, false, 0, 0}, {kVInto_3w, kNFire_3w, kSTGetinpot_3w, false, 1, 0}, {kVSearch_3w, kNFire_3w, kSTLookinfire_3w, false, 1, 0}, {kVLook_3w, kNFire_3w, kSTLookfire_3w, false, DONT_CARE, 0}, @@ -3173,35 +3173,35 @@ background_t hut_in_desc_3w[] = { // Inside hut {kVBlow_3w, kNDoctor_3w, kSTMissed_3w, false, DONT_CARE, 0}, {kVUse_3w, kNPipe_3w, kSTMissed_3w, false, DONT_CARE, 0}, {kVClose_3w, kNCdoor_3w, kSTNotclose_3w, false, DONT_CARE, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t garden_desc_3w[] = { // The secret garden - {kVLook_3w, 0, kSTLookgarden_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookgarden_3w, true, 0, 0}, {kVLook_3w, kNOrchid_3w, kSTLookorchid_3w, false, 0, 0}, {kVTake_3w, kNOrchid_3w, kSTTakeorchid_3w, false, 0, 0}, - {kVCross_3w, 0, kSTCrossgarden_3w, false, 0, 0}, + {kVCross_3w, 0, kSTCrossgarden_3w, false, 0, 0}, {kVLook_3w, kNWater_3w, kSTLookgarden_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t clifftop_desc_3w[] = { // Top of cliff path {kVLook_3w, 0, kSTLookclifftop_3w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t oldman_desc_3w[] = { // Old man inside cave {kVLook_3w, 0, kSTLookoldman_3w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t cliff_desc_3w[] = { // Lower cliff path {kVLook_3w, 0, kSTLookcliff_3w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t camp_desc_3w[] = { // Camp scene in village - {kVLook_3w, 0, kSTLookcamp_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookcamp_3w, true, 0, 0}, {kVLook_3w, kNFire_3w, kSTLookhyena_3w, false, 0, 0}, {kVLook_3w, kNPole_3w, kSTLookpole_3w, false, 0, 0}, {kVBehind_3w, kNHut_3w, kSTBehindhut_3w, false, 0, 0},// Must come before look hut @@ -3209,48 +3209,48 @@ background_t camp_desc_3w[] = { // Camp scene in village {kVSearch_3w, kNHut_3w, kSTLookintohut_3w, false, 0, 0}, {kVLook_3w, kNHut_3w, kSTLookhut_3w, false, 0, 0}, {kVLook_3w, kNWindow_3w, kSTLookintohut_3w, false, 0, 0}, - {kVEat_3w, 0, kSTEatroast_3w, false, 0, 0}, + {kVEat_3w, 0, kSTEatroast_3w, false, 0, 0}, {kVTake_3w, kNFood_3w, kSTEatroast_3w, false, 0, 0}, {kVInto_3w, kNFire_3w, kSTIntofire_3w, false, 0, 0}, {kVTake_3w, kNFire_3w, kSTIntofire_3w, false, 0, 0}, {kVTake_3w, kNNative_3w, kSTTakenative_3w, false, 0, 0}, {kVTake_3w, kNPipe_3w, kSTMakeoffer_3w, false, 0, 0}, {kVGive_3w, kNBouillon_3w, kSTNonecarried_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t turn_desc_3w[] = { // Turnaround path - {kVLook_3w, 0, kSTLookturn_3w, true, DONT_CARE, 0}, + {kVLook_3w, 0, kSTLookturn_3w, true, DONT_CARE, 0}, {kVUnder_3w, kNRock_3w, kSTUnderrock_3w, false, 0, 0}, {kVLook_3w, kNRock_3w, kSTLookrock_3w, false, 0, 0}, {kVRide_3w, kNRock_3w, kSTOntorock_3w, false, 0, 0}, {kVClimb_3w, kNRock_3w, kSTOntorock_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t slope_desc_3w[] = { // Slope between cliff and stream {kVLook_3w, 0, kSTLookslope_3w, true, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t path_desc_3w[] = { // Path containing elephant // States: 0 Elephant present, 1 - Elephant not present - {kVLook_3w, 0, kSTLookpath2_1_3w, true, 0, 0}, - {kVLook_3w, 0, kSTLookpath2_2_3w, true, 1, 0}, + {kVLook_3w, 0, kSTLookpath2_1_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookpath2_2_3w, true, 1, 0}, {kVRide_3w, kNElephant_3w, kSTRideelephant_3w, false, 0, 0}, {kVTake_3w, kNElephant_3w, kSTGetelephant_3w, false, 0, 0}, {kVShow_3w, kNMouse_3w, kSTShowmouse_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t cave_desc_3w[] = { // Cave mouth - {kVLook_3w, 0, kSTLookcave1_3w, true, 0, 0}, - {kVLook_3w, 0, kSTLookcave2_3w, true, 1, 0}, + {kVLook_3w, 0, kSTLookcave1_3w, true, 0, 0}, + {kVLook_3w, 0, kSTLookcave2_3w, true, 1, 0}, {kVAttack_3w, kNGhost_3w, kSTAttackghost_3w, false, 0, 0}, {kVBreak_3w, kNGhost_3w, kSTAttackghost_3w, false, 0, 0}, {kVShoot_3w, kNGhost_3w, kSTAttackghost_3w, false, 0, 0}, {kVTake_3w, kNGhost_3w, kSTTakeghost_3w, false, 0, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t bgDummy[] = { @@ -3268,208 +3268,208 @@ objectList_t backgroundList_3w[] = { }; background_t catchall_1d[] = { // Generally applicable phrases - {kVJump_1d, 0, kSTnojump_1d, false, 0, 0}, - {kVGo_1d, 0, kSTtrywalk_1d, false, 0, 0}, - {kVEnter_1d, 0, kSTtrywalk_1d, false, 0, 0}, - {kVClimb_1d, 0, kSTnoclimb_1d, false, 0, 0}, - {kVShout_1d, 0, kSTnothing_1d, false, 0, 0}, - {kVTalk_1d, 0, kSTnotalk_1d, false, 0, 0}, - {kVSwitch_1d, 0, kSTnopurps_1d, false, 0, 0}, - {kVThrow_1d, 0, kSTnopurps_1d, false, 0, 0}, + {kVJump_1d, 0, kSTnojump_1d, false, 0, 0}, + {kVGo_1d, 0, kSTtrywalk_1d, false, 0, 0}, + {kVEnter_1d, 0, kSTtrywalk_1d, false, 0, 0}, + {kVClimb_1d, 0, kSTnoclimb_1d, false, 0, 0}, + {kVShout_1d, 0, kSTnothing_1d, false, 0, 0}, + {kVTalk_1d, 0, kSTnotalk_1d, false, 0, 0}, + {kVSwitch_1d, 0, kSTnopurps_1d, false, 0, 0}, + {kVThrow_1d, 0, kSTnopurps_1d, false, 0, 0}, {kVAttack_1d, 0, kSTnoattack_1d, false, 0, 0}, - {kVBreak_1d, 0, kSTnobreak_1d, false, 0, 0}, + {kVBreak_1d, 0, kSTnobreak_1d, false, 0, 0}, {kVListen_1d, 0, kSTnolisten_1d, false, 0, 0}, - {kVSmell_1d, 0, kSTnosmell_1d, false, 0, 0}, - {kVQuery_1d, 0, kSTnoidea_1d, false, 0, 0}, - {kVLook_1d, kNSky_1d, kSTnolook_1d, false, 0, 0}, - {kVLook_1d, kNWall_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNGround_1d, kSTdull_1d, false, 0, 0}, - {kVHelp_1d, 0, kSTnohelp_1d, false, 0, 0}, - {kVMagic_1d, 0, kSTnomagic_1d, false, 0, 0}, - {kVDig_1d, 0, kSTnodig_1d, false, 0, 0}, - {kVRude_1d, 0, kSTnorude_1d, false, 0, 0}, - {kVKnock_1d, 0, kSTnoknock_1d, false, 0, 0}, - {kVTake_1d, kNPicture_1d, kSTnopurps_1d, false, 0, 0}, + {kVSmell_1d, 0, kSTnosmell_1d, false, 0, 0}, + {kVQuery_1d, 0, kSTnoidea_1d, false, 0, 0}, + {kVLook_1d, kNSky_1d, kSTnolook_1d, false, 0, 0}, + {kVLook_1d, kNWall_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNGround_1d, kSTdull_1d, false, 0, 0}, + {kVHelp_1d, 0, kSTnohelp_1d, false, 0, 0}, + {kVMagic_1d, 0, kSTnomagic_1d, false, 0, 0}, + {kVDig_1d, 0, kSTnodig_1d, false, 0, 0}, + {kVRude_1d, 0, kSTnorude_1d, false, 0, 0}, + {kVKnock_1d, 0, kSTnoknock_1d, false, 0, 0}, + {kVTake_1d, kNPicture_1d, kSTnopurps_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen0_desc_1d[] = { // Outside house - {kVLook_1d, kNTree_1d, kSTlooks0tree_1d, false, 0, 0}, - {kVLook_1d, kNFence_1d, kSTlooks0fence_1d, false, 0, 0}, - {kVLook_1d, kNHouse_1d, kSTlooks0house_1d, false, 0, 0}, - {kVLook_1d, kNWindow_1d, kSTlooks0window_1d, false, 0, 0}, - {kVLook_1d, kNRoof_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNMoon_1d, kSTlooks0moon_1d, false, 0, 0}, - {kVEat_1d, kNPkin_1d, kSTeats0pkin_1d, false, 0, 0}, + {kVLook_1d, kNTree_1d, kSTlooks0tree_1d, false, 0, 0}, + {kVLook_1d, kNFence_1d, kSTlooks0fence_1d, false, 0, 0}, + {kVLook_1d, kNHouse_1d, kSTlooks0house_1d, false, 0, 0}, + {kVLook_1d, kNWindow_1d, kSTlooks0window_1d, false, 0, 0}, + {kVLook_1d, kNRoof_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNMoon_1d, kSTlooks0moon_1d, false, 0, 0}, + {kVEat_1d, kNPkin_1d, kSTeats0pkin_1d, false, 0, 0}, {kVUnder_1d, kNCarpet_1d, kSTunders0carpet_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks0_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks0_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen1_desc_1d[] = { // Hall - {kVLook_1d, kNBat_1d, kSTlooks1bat_1d, false, 0, 0}, + {kVLook_1d, kNBat_1d, kSTlooks1bat_1d, false, 0, 0}, {kVLook_1d, kNPicture_1d, kSTlooks1picture_1d, false, 0, 0}, - {kVLook_1d, kNTable_1d, kSTlooks1table_1d, false, 0, 0}, - {kVLook_1d, kNCarpet_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNStairs_1d, kSTlooks1stairs_1d, false, 0, 0}, - {kVLook_1d, kNLight_1d, kSTlooks1light_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks1_1d, false, 0, 0}, - {kVListen_1d, 0, kSTlistens1_1d, false, 0, 0}, + {kVLook_1d, kNTable_1d, kSTlooks1table_1d, false, 0, 0}, + {kVLook_1d, kNCarpet_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNStairs_1d, kSTlooks1stairs_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTlooks1light_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks1_1d, false, 0, 0}, + {kVListen_1d, 0, kSTlistens1_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen2_desc_1d[] = { // Bedroom 1 - {kVLook_1d, kNBed_1d, kSTlooks2bed_1d, false, 0, 0}, - {kVUnder_1d, kNBed_1d, kSTlooks2bed_1d, false, 0, 0}, - {kVRide_1d, kNBed_1d, kSTrides2bed_1d, false, 0, 0}, - {kVInto_1d, kNBed_1d, kSTrides2bed_1d, false, 0, 0}, - {kVLook_1d, kNWard_1d, kSTlooks2ward_1d, false, 0, 0}, - {kVLook_1d, kNCupb_1d, kSTlooks2cupb_1d, false, 0, 0}, + {kVLook_1d, kNBed_1d, kSTlooks2bed_1d, false, 0, 0}, + {kVUnder_1d, kNBed_1d, kSTlooks2bed_1d, false, 0, 0}, + {kVRide_1d, kNBed_1d, kSTrides2bed_1d, false, 0, 0}, + {kVInto_1d, kNBed_1d, kSTrides2bed_1d, false, 0, 0}, + {kVLook_1d, kNWard_1d, kSTlooks2ward_1d, false, 0, 0}, + {kVLook_1d, kNCupb_1d, kSTlooks2cupb_1d, false, 0, 0}, {kVLook_1d, kNWindow_1d, kSTlooks2window_1d, false, 0, 0}, - {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNFace_1d, kSTlooks2face_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks2_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNFace_1d, kSTlooks2face_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks2_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen3_desc_1d[] = { // Dining room - {kVLook_1d, kNTable_1d, kSTlooks3table_1d, false, 0, 0}, + {kVLook_1d, kNTable_1d, kSTlooks3table_1d, false, 0, 0}, {kVLook_1d, kNButler_1d, kSTlooks3butler_1d, false, 0, 0}, - {kVLook_1d, kNPlant_1d, kSTlooks3plant_1d, false, 0, 0}, - {kVLook_1d, kNPicture_1d, kSTlooks3witch_1d, false, 0, 0}, - {kVLook_1d, kNWitch_1d, kSTlooks3witch_1d, false, 0, 0}, + {kVLook_1d, kNPlant_1d, kSTlooks3plant_1d, false, 0, 0}, + {kVLook_1d, kNPicture_1d, kSTlooks3witch_1d, false, 0, 0}, + {kVLook_1d, kNWitch_1d, kSTlooks3witch_1d, false, 0, 0}, {kVLook_1d, kNWindow_1d, kSTlooks3window_1d, false, 0, 0}, - {kVLook_1d, kNFood_1d, kSTlooks3food_1d, false, 0, 0}, - {kVLook_1d, kNMan_1d, kSTlooks3man_1d, false, 0, 0}, - {kVLook_1d, kNCupb_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNWoman_1d, kSTlooks3woman_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks3_1d, false, 0, 0}, - {kVSit_1d, 0, kSTsits3_1d, false, 0, 0}, - {kVTake_1d, kNFood_1d, kSTtakes3food_1d, false, 0, 0}, - {kVEat_1d, 0, kSTtakes3food_1d, false, 0, 0}, - {kVTalk_1d, kNMan_1d, kSTtalks3man_1d, false, 0, 0}, - {kVTalk_1d, kNWoman_1d, kSTtalks3woman_1d, false, 0, 0}, + {kVLook_1d, kNFood_1d, kSTlooks3food_1d, false, 0, 0}, + {kVLook_1d, kNMan_1d, kSTlooks3man_1d, false, 0, 0}, + {kVLook_1d, kNCupb_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNWoman_1d, kSTlooks3woman_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks3_1d, false, 0, 0}, + {kVSit_1d, 0, kSTsits3_1d, false, 0, 0}, + {kVTake_1d, kNFood_1d, kSTtakes3food_1d, false, 0, 0}, + {kVEat_1d, 0, kSTtakes3food_1d, false, 0, 0}, + {kVTalk_1d, kNMan_1d, kSTtalks3man_1d, false, 0, 0}, + {kVTalk_1d, kNWoman_1d, kSTtalks3woman_1d, false, 0, 0}, {kVTalk_1d, kNButler_1d, kSTtalkS3butler_1d, false, 0, 0}, - {kVKiss_1d, 0, kSTkisss3_1d, false, 0, 0}, - {kVListen_1d, 0, kSTlistens3_1d, false, 0, 0}, - {kVDrink_1d, 0, kSTdrinks3_1d, false, 0, 0}, + {kVKiss_1d, 0, kSTkisss3_1d, false, 0, 0}, + {kVListen_1d, 0, kSTlistens3_1d, false, 0, 0}, + {kVDrink_1d, 0, kSTdrinks3_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen4_desc_1d[] = { // Bathroom {kVLook_1d, kNWindow_1d, kSTlooks2window_1d, false, 0, 0}, - {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, {kVLook_1d, kNMirror_1d, kSTlooks4mirror_1d, false, 0, 0}, {kVLook_1d, kNToilet_1d, kSTlooks4toilet_1d, false, 0, 0}, - {kVLook_1d, kNBath_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNSink_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks4_1d, false, 0, 0}, - {kVCrap_1d, 0, kSTcraps4_1d, false, 0, 0}, - {kVSit_1d, 0, kSTsits4_1d, false, 0, 0}, - {kVWash_1d, kNHands_1d, kSTwashs4hands_1d, false, 0, 0}, + {kVLook_1d, kNBath_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNSink_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks4_1d, false, 0, 0}, + {kVCrap_1d, 0, kSTcraps4_1d, false, 0, 0}, + {kVSit_1d, 0, kSTsits4_1d, false, 0, 0}, + {kVWash_1d, kNHands_1d, kSTwashs4hands_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen5_desc_1d[] = { // Kitchen - {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNUnits_1d, kSTlooks5units_1d, false, 0, 0}, - {kVOpen_1d, kNUnits_1d, kSTempty_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNUnits_1d, kSTlooks5units_1d, false, 0, 0}, + {kVOpen_1d, kNUnits_1d, kSTempty_1d, false, 0, 0}, {kVLook_1d, kNWindow_1d, kSTlooks5window_1d, false, 0, 0}, - {kVLook_1d, kNBroom_1d, kSTlooks5broom_1d, false, 0, 0}, - {kVTake_1d, kNBroom_1d, kSTtakes5broom_1d, false, 0, 0}, - {kVRide_1d, kNBroom_1d, kSTrides5broom_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks5_1d, false, 0, 0}, - {kVSweep_1d, 0, kSTsweeps5_1d, false, 0, 0}, - {kVListen_1d, 0, kSTlistens1_1d, false, 0, 0}, + {kVLook_1d, kNBroom_1d, kSTlooks5broom_1d, false, 0, 0}, + {kVTake_1d, kNBroom_1d, kSTtakes5broom_1d, false, 0, 0}, + {kVRide_1d, kNBroom_1d, kSTrides5broom_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks5_1d, false, 0, 0}, + {kVSweep_1d, 0, kSTsweeps5_1d, false, 0, 0}, + {kVListen_1d, 0, kSTlistens1_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen6_desc_1d[] = { // Garden - {kVLook_1d, kNShed_1d, kSTlooks6sched_1d, false, 0, 0}, - {kVLook_1d, kNMoon_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNTree_1d, kSTlooks0tree_1d, false, 0, 0}, - {kVClimb_1d, kNTree_1d, kSTclimbs6tree_1d, false, 0, 0}, + {kVLook_1d, kNShed_1d, kSTlooks6sched_1d, false, 0, 0}, + {kVLook_1d, kNMoon_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNTree_1d, kSTlooks0tree_1d, false, 0, 0}, + {kVClimb_1d, kNTree_1d, kSTclimbs6tree_1d, false, 0, 0}, {kVLook_1d, kNGardenbits_1d, kSTlooks6gardenbits_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks6_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks6_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen7_desc_1d[] = { // Store room - {kVLook_1d, kNCarpet_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, - {kVUnbolt_1d, kNTrap_1d, kSTunbolts7trap_1d, false, 0, 0}, + {kVLook_1d, kNCarpet_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, + {kVUnbolt_1d, kNTrap_1d, kSTunbolts7trap_1d, false, 0, 0}, {kVLook_1d, kNMousehole_1d, kSTlooks7mousehole_1d, false, 0, 0}, {kVTake_1d, kNDroppings_1d, kSTtakes7droppings_1d, false, 0, 0}, - {kVGive_1d, kNChop_1d, kSTchop1_1d, false, 0, 0}, - {kVFeed_1d, kNDog_1d, kSTchop1_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks7_1d, false, 0, 0}, + {kVGive_1d, kNChop_1d, kSTchop1_1d, false, 0, 0}, + {kVFeed_1d, kNDog_1d, kSTchop1_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks7_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen8_desc_1d[] = { // Basement - {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, - {kVLook_1d, kNDoor_1d, kSTlooks8door_1d, false, 0, 0}, - {kVOil_1d, kNDoor_1d, kSToils8door_1d, false, 0, 0}, - {kVPush_1d, kNDoor_1d, kSTpushs8door_1d, false, 0, 0}, - {kVLook_1d, kNRock_1d, kSTlooks8rock_1d, false, 0, 0}, - {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, - {kVAttack_1d, kNDoor_1d, kSTbreaks8door_1d, false, 0, 0}, - {kVBreak_1d, kNDoor_1d, kSTbreaks8door_1d, false, 0, 0}, - {kVOpen_1d, kNDoor_1d, kSTopens8door_1d, false, 0, 0}, - {kVUnlock_1d, kNDoor_1d, kSTunlocks8door_1d, false, 0, 0}, - {kVKnock_1d, kNDoor_1d, kSTknocks8door_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTdull_1d, false, 0, 0}, + {kVLook_1d, kNDoor_1d, kSTlooks8door_1d, false, 0, 0}, + {kVOil_1d, kNDoor_1d, kSToils8door_1d, false, 0, 0}, + {kVPush_1d, kNDoor_1d, kSTpushs8door_1d, false, 0, 0}, + {kVLook_1d, kNRock_1d, kSTlooks8rock_1d, false, 0, 0}, + {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, + {kVAttack_1d, kNDoor_1d, kSTbreaks8door_1d, false, 0, 0}, + {kVBreak_1d, kNDoor_1d, kSTbreaks8door_1d, false, 0, 0}, + {kVOpen_1d, kNDoor_1d, kSTopens8door_1d, false, 0, 0}, + {kVUnlock_1d, kNDoor_1d, kSTunlocks8door_1d, false, 0, 0}, + {kVKnock_1d, kNDoor_1d, kSTknocks8door_1d, false, 0, 0}, {kVTalk_1d, kNPenelope_1d, kSTtalks8penelope_1d, false, 0, 0}, {kVShout_1d, kNPenelope_1d, kSTtalks8penelope_1d, false, 0, 0}, - {kVListen_1d, 0, kSTlistens8_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks8_1d, false, 0, 0}, + {kVListen_1d, 0, kSTlistens8_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks8_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen9_desc_1d[] = { // Bat cave - {kVLook_1d, 0, kSTlooks9_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks9_1d, false, 0, 0}, {kVLook_1d, kNRock_1d, kSTlooks9rock_1d, false, 0, 0}, - {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, + {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen10_desc_1d[] = { // Mummy room - {kVLook_1d, 0, kSTlooks10_1d, false, 0, 0}, - {kVLook_1d, kNRock_1d, kSTlooks9rock_1d, false, 0, 0}, - {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks10_1d, false, 0, 0}, + {kVLook_1d, kNRock_1d, kSTlooks9rock_1d, false, 0, 0}, + {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, {kVLook_1d, kNTomb_1d, kSTlooks10tomb_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen11_desc_1d[] = { // Lake room - {kVLook_1d, kNRock_1d, kSTlooks9rock_1d, false, 0, 0}, - {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks11_1d, false, 0, 0}, - {kVLakeverbs_1d, 0, kSTlakeverbss11_1d, false, 0, 0}, - {kVDrink_1d, 0, kSTdrinks3_1d, false, 0, 0}, - {kVPlug_1d, 0, kSTplugs11_1d, false, 0, 0}, + {kVLook_1d, kNRock_1d, kSTlooks9rock_1d, false, 0, 0}, + {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks11_1d, false, 0, 0}, + {kVLakeverbs_1d, 0, kSTlakeverbss11_1d, false, 0, 0}, + {kVDrink_1d, 0, kSTdrinks3_1d, false, 0, 0}, + {kVPlug_1d, 0, kSTplugs11_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen12_desc_1d[] = { // Dead end - {kVLook_1d, kNRock_1d, kSTlooks9rock_1d, false, 0, 0}, - {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, - {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, - {kVLook_1d, 0, kSTlooks12_1d, false, 0, 0}, + {kVLook_1d, kNRock_1d, kSTlooks9rock_1d, false, 0, 0}, + {kVPush_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVLift_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVMove_1d, kNRock_1d, kSTnowayhose_1d, false, 0, 0}, + {kVUnder_1d, kNRock_1d, kSTnounder_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks12_1d, false, 0, 0}, {kVTalk_1d, kNGuard_1d, kSTtalks12guard_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -3483,15 +3483,15 @@ background_t screen14_desc_1d[] = { // The end }; background_t screen15_desc_1d[] = { // Laboratory - {kVLook_1d, 0, kSTlooks15_1d, false, 0, 0}, - {kVTalk_1d, kNIgor_1d, kSTtalks15igor_1d, false, 0, 0}, - {kVTalk_1d, kNProf_1d, kSTtalks15prof_1d, false, 0, 0}, + {kVLook_1d, 0, kSTlooks15_1d, false, 0, 0}, + {kVTalk_1d, kNIgor_1d, kSTtalks15igor_1d, false, 0, 0}, + {kVTalk_1d, kNProf_1d, kSTtalks15prof_1d, false, 0, 0}, {kVLook_1d, kNMachinebits_1d, kSTlooks15machinebits_1d, false, 0, 0}, {kVPush_1d, kNMachinebits_1d, kSTpushs15machinebits_1d, false, 0, 0}, - {kVLook_1d, kNTable_1d, kSTlooks15table_1d, false, 0, 0}, - {kVClose_1d, kNDoor_1d, kSTopens15door_1d, false, 0, 0}, - {kVOpen_1d, kNDoor_1d, kSTopens15door_1d, false, 0, 0}, - {kVLook_1d, kNLight_1d, kSTlooks15light_1d, false, 0, 0}, + {kVLook_1d, kNTable_1d, kSTlooks15table_1d, false, 0, 0}, + {kVClose_1d, kNDoor_1d, kSTopens15door_1d, false, 0, 0}, + {kVOpen_1d, kNDoor_1d, kSTopens15door_1d, false, 0, 0}, + {kVLook_1d, kNLight_1d, kSTlooks15light_1d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -3514,46 +3514,46 @@ background_t catchall_2d[] = { // Generally applicable phrases {kVLook_2d, kNPicture_2d, kSTSpicture_2d, false, DONT_CARE, 0}, {kVLook_2d, kNMirror_2d, kSTDull_2d, false, DONT_CARE, 0}, {kVLook_2d, kNTable_2d, kSTNo_on_2d, false, DONT_CARE, 0}, - {kVJump_2d, 0, kSTSjump_2d, false, DONT_CARE, 0}, - {kVGo_2d, 0, kSTTrywalk_2d, false, DONT_CARE, 0}, - {kVInto_2d, 0, kSTTrywalk_2d, false, DONT_CARE, 0}, - {kVClimb_2d, 0, kSTSclimb_2d, false, DONT_CARE, 0}, - {kVShout_2d, 0, kSTNothing_2d, false, DONT_CARE, 0}, - {kVTalk_2d, 0, kSTStalk_2d, false, DONT_CARE, 0}, - {kVSwitch_2d, 0, kSTMorespecific_2d, false, DONT_CARE, 0}, - {kVThrow_2d, 0, kSTNopurps_2d, false, DONT_CARE, 0}, - {kVAttack_2d, 0, kSTSattack_2d, false, DONT_CARE, 0}, - {kVBreak_2d, 0, kSTSbreak_2d, false, DONT_CARE, 0}, - {kVListen_2d, 0, kSTQuiet_2d, false, DONT_CARE, 0}, - {kVSmell_2d, 0, kSTAroma_2d, false, DONT_CARE, 0}, - {kVQuery_2d, 0, kSTNoidea_2d, false, DONT_CARE, 0}, + {kVJump_2d, 0, kSTSjump_2d, false, DONT_CARE, 0}, + {kVGo_2d, 0, kSTTrywalk_2d, false, DONT_CARE, 0}, + {kVInto_2d, 0, kSTTrywalk_2d, false, DONT_CARE, 0}, + {kVClimb_2d, 0, kSTSclimb_2d, false, DONT_CARE, 0}, + {kVShout_2d, 0, kSTNothing_2d, false, DONT_CARE, 0}, + {kVTalk_2d, 0, kSTStalk_2d, false, DONT_CARE, 0}, + {kVSwitch_2d, 0, kSTMorespecific_2d, false, DONT_CARE, 0}, + {kVThrow_2d, 0, kSTNopurps_2d, false, DONT_CARE, 0}, + {kVAttack_2d, 0, kSTSattack_2d, false, DONT_CARE, 0}, + {kVBreak_2d, 0, kSTSbreak_2d, false, DONT_CARE, 0}, + {kVListen_2d, 0, kSTQuiet_2d, false, DONT_CARE, 0}, + {kVSmell_2d, 0, kSTAroma_2d, false, DONT_CARE, 0}, + {kVQuery_2d, 0, kSTNoidea_2d, false, DONT_CARE, 0}, {kVLook_2d, kNSky_2d, kSTFalling_2d, false, DONT_CARE, 0}, {kVLook_2d, kNWall_2d, kSTDull_2d, false, DONT_CARE, 0}, {kVLook_2d, kNGround_2d, kSTDull_2d, false, DONT_CARE, 0}, - {kVHelp_2d, 0, kSTShelp_2d, false, DONT_CARE, 0}, - {kVMagic_2d, 0, kSTSmagic_2d, false, DONT_CARE, 0}, - {kVWish_2d, 0, kSTSmagic_2d, false, DONT_CARE, 0}, - {kVDig_2d, 0, kSTSdig_2d, false, DONT_CARE, 0}, - {kVRude_2d, 0, kSTSrude_2d, false, DONT_CARE, 0}, - {kVKnock_2d, 0, kSTNoanswer_2d, false, DONT_CARE, 0}, + {kVHelp_2d, 0, kSTShelp_2d, false, DONT_CARE, 0}, + {kVMagic_2d, 0, kSTSmagic_2d, false, DONT_CARE, 0}, + {kVWish_2d, 0, kSTSmagic_2d, false, DONT_CARE, 0}, + {kVDig_2d, 0, kSTSdig_2d, false, DONT_CARE, 0}, + {kVRude_2d, 0, kSTSrude_2d, false, DONT_CARE, 0}, + {kVKnock_2d, 0, kSTNoanswer_2d, false, DONT_CARE, 0}, {kVOpen_2d, kNDoor_2d, kSTWontopen_2d, false, DONT_CARE, 0}, {kVUnlock_2d, kNDoor_2d, kSTCantunlock_2d, false, DONT_CARE, 0}, {kVLook_2d, kNDoor_2d, kSTDull_2d, false, DONT_CARE, 0}, {kVLook_2d, kNLight_2d, kSTDull_2d, false, DONT_CARE, 0}, - {kVHello_2d, 0, kSTHi_2d, false, DONT_CARE, 0}, + {kVHello_2d, 0, kSTHi_2d, false, DONT_CARE, 0}, {kVLook_2d, kNFence_2d, kSTLookover_2d, false, DONT_CARE, 0}, {kVLook_2d, kNWall_2d, kSTLookover_2d, false, DONT_CARE, 0}, {kVLook_2d, kNGardenbits_2d, kSTDull_2d, false, DONT_CARE, 0}, - {kVGive_2d, 0, kSTNothanks_2d, false, DONT_CARE, 0}, + {kVGive_2d, 0, kSTNothanks_2d, false, DONT_CARE, 0}, {kVLook_2d, kNTree_2d, kSTDull2_2d, false, DONT_CARE, 0}, - {kVFire_2d, 0, kSTFire2_2d, false, DONT_CARE, 0}, - {kVShout_2d, 0, kSTNoanswer_2d, false, DONT_CARE, 0}, - {kVHerring_2d, 0, kSTSherring_2d, false, DONT_CARE, 0}, - {kVUndress_2d, 0, kSTSundress_2d, false, DONT_CARE, 0}, - {kVSit_2d, 0, kSTStired_2d, false, DONT_CARE, 0}, - {kVFeed_2d, 0, kSTNothanks_2d, false, DONT_CARE, 0}, + {kVFire_2d, 0, kSTFire2_2d, false, DONT_CARE, 0}, + {kVShout_2d, 0, kSTNoanswer_2d, false, DONT_CARE, 0}, + {kVHerring_2d, 0, kSTSherring_2d, false, DONT_CARE, 0}, + {kVUndress_2d, 0, kSTSundress_2d, false, DONT_CARE, 0}, + {kVSit_2d, 0, kSTStired_2d, false, DONT_CARE, 0}, + {kVFeed_2d, 0, kSTNothanks_2d, false, DONT_CARE, 0}, {kVRub_2d, kNCatnip_2d, kSTRubcatnip1_2d, false, DONT_CARE, 0}, - {0, 0, 0, false, 0, 0} + {0, 0, 0, false, 0, 0} }; background_t screen0_desc_2d[] = { // Outside house @@ -3562,57 +3562,57 @@ background_t screen0_desc_2d[] = { // Outside house }; background_t screen1_desc_2d[] = { // Hall - {kVLook_2d, 0, kSTLookhall_2d, true, 0, 0}, - {kVLook_2d, kNMaid_2d, kSTTmaid_2d, false, 0, 0}, + {kVLook_2d, 0, kSTLookhall_2d, true, 0, 0}, + {kVLook_2d, kNMaid_2d, kSTTmaid_2d, false, 0, 0}, {kVTalk_2d, kNMaid_2d, kSTChatmaid1_2d, false, 0, 0}, {kVTalk_2d, kNPenny_2d, kSTChatmaid2_2d, false, 0, 0}, {kVKiss_2d, kNMaid_2d, kSTChatmaid3_2d, false, 0, 0}, - {kVRude_2d, kNMaid_2d, kSTRudemaid_2d, false, 0, 0}, + {kVRude_2d, kNMaid_2d, kSTRudemaid_2d, false, 0, 0}, {kVOpen_2d, kNDoor_2d, kSTTmaiddoor_2d, false, 0, 0}, {kVUnlock_2d, kNDoor_2d, kSTTmaiddoor_2d, false, 0, 0}, - {kVLook_2d, kNDoor_2d, kSTSdoor_2d, false, 0, 0}, + {kVLook_2d, kNDoor_2d, kSTSdoor_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen2_desc_2d[] = { // Bed1 - {kVLook_2d, 0, kSTLookbed1_2d, true, DONT_CARE, 0}, + {kVLook_2d, 0, kSTLookbed1_2d, true, DONT_CARE, 0}, {kVLook_2d, kNBed_2d, kSTLookbed_2d, false, DONT_CARE, 0}, - {kVInto_2d, kNBed_2d, kSTS2bed_2d, false, 0, 0}, - {kVRide_2d, kNBed_2d, kSTS2bed_2d, false, 0, 0}, - {kVRest_2d, kNBed_2d, kSTS2bed_2d, false, 0, 0}, - {kVRide_2d, kNPenny_2d, kSTS2bed_2d, false, 0, 0}, - {kVTalk_2d, kNPenny_2d, kSTZzzz_2d, false, 0, 0}, - {kVInto_2d, kNBed_2d, kSTNopurps_2d, false, 1, 0}, - {kVRide_2d, kNBed_2d, kSTNopurps_2d, false, 1, 0}, - {kVRest_2d, kNBed_2d, kSTNopurps_2d, false, 1, 0}, + {kVInto_2d, kNBed_2d, kSTS2bed_2d, false, 0, 0}, + {kVRide_2d, kNBed_2d, kSTS2bed_2d, false, 0, 0}, + {kVRest_2d, kNBed_2d, kSTS2bed_2d, false, 0, 0}, + {kVRide_2d, kNPenny_2d, kSTS2bed_2d, false, 0, 0}, + {kVTalk_2d, kNPenny_2d, kSTZzzz_2d, false, 0, 0}, + {kVInto_2d, kNBed_2d, kSTNopurps_2d, false, 1, 0}, + {kVRide_2d, kNBed_2d, kSTNopurps_2d, false, 1, 0}, + {kVRest_2d, kNBed_2d, kSTNopurps_2d, false, 1, 0}, {kVUnder_2d, kNBed_2d, kSTSsearch_2d, false, DONT_CARE, 0}, {kVRead_2d, kNBook_2d, kSTNocarry_2d, false, DONT_CARE, 0}, {0, 0, 0, false, 0, 0} }; background_t screen3_desc_2d[] = { // Bed2 - {kVLook_2d, 0, kSTLookbed2_2d, true, 0, 0}, - {kVLook_2d, kNBird_2d, kSTParrot_2d, false, 0, 0}, - {kVLook_2d, kNCage_2d, kSTDull_2d, false, 0, 0}, - {kVLook_2d, kNPencil_2d, kSTDull_2d, false, 0, 0}, - {kVLook_2d, kNPhone_2d, kSTDull_2d, false, 0, 0}, - {kVLook_2d, kNPaper_2d, kSTBlotter_2d, false, 0, 0}, - {kVRead_2d, kNPaper_2d, kSTBlotter_2d, false, 0, 0}, - {kVLook_2d, kNChair_2d, kSTDull_2d, false, 0, 0}, - {kVTake_2d, kNPencil_2d, kSTNouse_2d, false, 0, 0}, - {kVTake_2d, kNPaper_2d, kSTNouse_2d, false, 0, 0}, - {kVLook_2d, kNHole_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, 0, kSTLookbed2_2d, true, 0, 0}, + {kVLook_2d, kNBird_2d, kSTParrot_2d, false, 0, 0}, + {kVLook_2d, kNCage_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, kNPencil_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, kNPhone_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, kNPaper_2d, kSTBlotter_2d, false, 0, 0}, + {kVRead_2d, kNPaper_2d, kSTBlotter_2d, false, 0, 0}, + {kVLook_2d, kNChair_2d, kSTDull_2d, false, 0, 0}, + {kVTake_2d, kNPencil_2d, kSTNouse_2d, false, 0, 0}, + {kVTake_2d, kNPaper_2d, kSTNouse_2d, false, 0, 0}, + {kVLook_2d, kNHole_2d, kSTDull_2d, false, 0, 0}, {kVLook_2d, kNWall_2d, kSTDumbwaiter_2d, false, 0, 0}, - {kVLook_2d, kNButton_2d, kSTSbutton_2d, false, 0, 0}, - {kVPush_2d, kNButton_2d, kSTS3dumb_2d, false, 0, 0}, - {kVDial_2d, 0, kSTS3phone_2d, false, 0, 4}, + {kVLook_2d, kNButton_2d, kSTSbutton_2d, false, 0, 0}, + {kVPush_2d, kNButton_2d, kSTS3dumb_2d, false, 0, 0}, + {kVDial_2d, 0, kSTS3phone_2d, false, 0, 4}, {kVTake_2d, kNPhone_2d, kSTS3phone_2d, false, 0, 4}, {kVUse_2d, kNPhone_2d, kSTS3phone_2d, false, 0, 4}, {kVLift_2d, kNPhone_2d, kSTS3phone_2d, false, 0, 4}, {kVTalk_2d, kNBird_2d, kSTS3bird_2d, false, 0, 5}, - {kVInto_2d, 0, kSTSinto_2d, true, 0, 0}, - {kVUnder_2d, kNCupb_2d, kSTSsearch_2d, false, 0, 0}, - {kVFeed_2d, kNBird_2d, kSTBirdfull_2d, false, 0, 0}, + {kVInto_2d, 0, kSTSinto_2d, true, 0, 0}, + {kVUnder_2d, kNCupb_2d, kSTSsearch_2d, false, 0, 0}, + {kVFeed_2d, kNBird_2d, kSTBirdfull_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -3623,241 +3623,241 @@ background_t screen4_desc_2d[] = { // Keyhole }; background_t screen5_desc_2d[] = { // Bed3 - {kVLook_2d, 0, kSTLookbed3_2d, true, 0, 0}, - {kVBlock_2d, 0, kSTSblock_2d, false, 0, 0}, + {kVLook_2d, 0, kSTLookbed3_2d, true, 0, 0}, + {kVBlock_2d, 0, kSTSblock_2d, false, 0, 0}, {kVInto_2d, kNCage_2d, kSTStoobigtofit_2d, false, 0, 0}, - {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, 0, 0}, + {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen6_desc_2d[] = { // Kitchen - {kVLook_2d, 0, kSTLookkitchen_2d, true, DONT_CARE, 0}, + {kVLook_2d, 0, kSTLookkitchen_2d, true, DONT_CARE, 0}, {kVLook_2d, kNButton_2d, kSTSbutton_2d, false, DONT_CARE, 0}, {kVPush_2d, kNButton_2d, kSTS3dumb_2d, false, DONT_CARE, 0}, {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, DONT_CARE, 0}, {kVLook_2d, kNUnits_2d, kSTS6dull_2d, false, DONT_CARE, 0}, {kVOpen_2d, kNUnits_2d, kSTS6dull_2d, false, DONT_CARE, 0}, - {kVInto_2d, 0, kSTSinto_2d, true, DONT_CARE, 0}, + {kVInto_2d, 0, kSTSinto_2d, true, DONT_CARE, 0}, {kVOpen_2d, kNDoor_2d, kSTMorespecific_2d, false, DONT_CARE, 0}, {kVLook_2d, kNDoor_2d, kSTMorespecific_2d, false, DONT_CARE, 0}, - {kVTalk_2d, kNCook_2d, kSTTalkcook_2d, false, 1, 0}, - {kVLook_2d, kNCook_2d, kSTLookcook_2d, false, 1, 0}, - {kVLook_2d, kNKnife_2d, kSTLookknife_2d, false, 1, 0}, - {kVTake_2d, kNKnife_2d, kSTTakeknife_2d, false, 1, 0}, - {kVListen_2d, 0, kSTListenkitchen_2d, false, 1, 0}, + {kVTalk_2d, kNCook_2d, kSTTalkcook_2d, false, 1, 0}, + {kVLook_2d, kNCook_2d, kSTLookcook_2d, false, 1, 0}, + {kVLook_2d, kNKnife_2d, kSTLookknife_2d, false, 1, 0}, + {kVTake_2d, kNKnife_2d, kSTTakeknife_2d, false, 1, 0}, + {kVListen_2d, 0, kSTListenkitchen_2d, false, 1, 0}, {0, 0, 0, false, 0, 0} }; background_t screen7_desc_2d[] = { // Backdoor - {kVLook_2d, 0, kSTLookback_2d, true, 0, 0}, + {kVLook_2d, 0, kSTLookback_2d, true, 0, 0}, {kVLook_2d, kNWindow_2d, kSTLookwin_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen8_desc_2d[] = { // Shed - {kVLook_2d, 0, kSTLookshed_2d, true, 0, 0}, - {kVLook_2d, kNWindow_2d, kSTLookwin_2d, false, 0, 0}, + {kVLook_2d, 0, kSTLookshed_2d, true, 0, 0}, + {kVLook_2d, kNWindow_2d, kSTLookwin_2d, false, 0, 0}, {kVLook_2d, kNShed_2d, kSTLookatshed_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen9_desc_2d[] = { // In shed - {kVLook_2d, 0, kSTLookinshed_2d, true, 0, 0}, - {kVLook_2d, kNWall_2d, kSTS9tools1_2d, false, 0, 0}, - {kVLook_2d, kNTools_2d, kSTS9tools1_2d, false, 0, 0}, - {kVTake_2d, kNTools_2d, kSTS9tools2_2d, false, 0, 0}, - {kVLook_2d, kNBroom_2d, kSTDull_2d, false, 0, 0}, - {kVTake_2d, kNBroom_2d, kSTNouse_2d, false, 0, 0}, + {kVLook_2d, 0, kSTLookinshed_2d, true, 0, 0}, + {kVLook_2d, kNWall_2d, kSTS9tools1_2d, false, 0, 0}, + {kVLook_2d, kNTools_2d, kSTS9tools1_2d, false, 0, 0}, + {kVTake_2d, kNTools_2d, kSTS9tools2_2d, false, 0, 0}, + {kVLook_2d, kNBroom_2d, kSTDull_2d, false, 0, 0}, + {kVTake_2d, kNBroom_2d, kSTNouse_2d, false, 0, 0}, {kVLook_2d, kNTable_2d, kSTSomebuttons_2d, false, 0, 0}, - {kVKiss_2d, kNGardner_2d, kSTMore_2d, false, 0, 0}, - {kVRude_2d, kNGardner_2d, kSTRudeshed_2d, false, 0, 0}, - {kVTalk_2d, kNGardner_2d, kSTIgnore_2d, false, 0, 0}, - {kVClose_2d, kNDoor_2d, kSTShedclose_2d, false, 0, 0}, + {kVKiss_2d, kNGardner_2d, kSTMore_2d, false, 0, 0}, + {kVRude_2d, kNGardner_2d, kSTRudeshed_2d, false, 0, 0}, + {kVTalk_2d, kNGardner_2d, kSTIgnore_2d, false, 0, 0}, + {kVClose_2d, kNDoor_2d, kSTShedclose_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen10_desc_2d[] = { // Venus fly traps - {kVLook_2d, 0, kSTLookvenus_2d, true, 0, 0}, + {kVLook_2d, 0, kSTLookvenus_2d, true, 0, 0}, {kVTake_2d, kNMirror_2d, kSTNotmirror_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen11_desc_2d[] = { // Gates kVOpen_2d, - {kVLook_2d, 0, kSTS11look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS11look_2d, true, 0, 0}, {kVClose_2d, kNDoor_2d, kSTNopurps_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen12_desc_2d[] = { // Gates closed - {kVLook_2d, 0, kSTS12look_2d, true, 0, 0}, - {kVOpen_2d, kNDoor_2d, kSTGates1_2d, false, 0, 0}, - {kVBreak_2d, kNDoor_2d, kSTGates2_2d, false, 0, 0}, - {kVAttack_2d, kNDoor_2d, kSTGates2_2d, false, 0, 0}, - {kVUnlock_2d, kNDoor_2d, kSTGates3_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS12look_2d, true, 0, 0}, + {kVOpen_2d, kNDoor_2d, kSTGates1_2d, false, 0, 0}, + {kVBreak_2d, kNDoor_2d, kSTGates2_2d, false, 0, 0}, + {kVAttack_2d, kNDoor_2d, kSTGates2_2d, false, 0, 0}, + {kVUnlock_2d, kNDoor_2d, kSTGates3_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen13_desc_2d[] = { // Stream - {kVLook_2d, 0, kSTS13look_2d, true, 0, 0}, - {kVLook_2d, kNBridge_2d, kSTNospecial_2d, false, 0, 0}, - {kVUnder_2d, kNBridge_2d, kSTSsearch_2d, false, 0, 0}, - {kVLook_2d, kNWater_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS13look_2d, true, 0, 0}, + {kVLook_2d, kNBridge_2d, kSTNospecial_2d, false, 0, 0}, + {kVUnder_2d, kNBridge_2d, kSTSsearch_2d, false, 0, 0}, + {kVLook_2d, kNWater_2d, kSTDull_2d, false, 0, 0}, {kVThrow_2d, kNMatches_2d, kSTThrowmatch_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen14_desc_2d[] = { // Zapper - {kVLook_2d, 0, kSTS14look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS14look_2d, true, 0, 0}, {kVSwitch_2d, kNZapper_2d, kSTNoswitch_2d, false, 0, 0}, {kVWind_2d, kNZapper_2d, kSTNoswitch_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen15_desc_2d[] = { // Mushroom - {kVLook_2d, 0, kSTS15look_2d, true, 0, 0}, - {kVTalk_2d, kNMan_2d, kSTNoreply_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS15look_2d, true, 0, 0}, + {kVTalk_2d, kNMan_2d, kSTNoreply_2d, false, 0, 0}, {kVLook_2d, kNWand_2d, kSTS15wand1_2d, false, 0, 0}, {kVTake_2d, kNWand_2d, kSTS15wand2_2d, false, 0, 0}, - {kVSearch_2d, kNMan_2d, kSTSsearch_2d, false, 0, 0}, + {kVSearch_2d, kNMan_2d, kSTSsearch_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen16_desc_2d[] = { // Well - {kVLook_2d, 0, kSTS16look_2d, true, 0, 0}, - {kVClimb_2d, 0, kSTTryrope_2d, false, 0, 0}, - {kVGo_2d, kNWell_2d, kSTTryrope_2d, false, 0, 0}, - {kVWind_2d, kNRope_2d, kSTWindwell_2d, false, 0, 0}, - {kVTie_2d, kNRope_2d, kSTNopurps_2d, false, 0, 0}, - {kVTake_2d, kNBucket_2d, kSTNosee_2d, false, 0, 0}, - {kVLook_2d, kNBucket_2d, kSTNosee_2d, false, 0, 0}, - {kVWind_2d, kNBucket_2d, kSTWindwell_2d, false, 0, 0}, - {kVTake_2d, kNWater_2d, kSTNosee_2d, false, 0, 0}, - {kVWind_2d, kNHandle_2d, kSTWindwell_2d, false, 0, 0}, - {kVInto_2d, kNBucket_2d, kSTNosee_2d, false, 0, 0}, - {kVInto_2d, kNWell_2d, kSTIntowell_2d, false, 0, 0}, - {kVWish_2d, 0, kSTGetonwithit_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS16look_2d, true, 0, 0}, + {kVClimb_2d, 0, kSTTryrope_2d, false, 0, 0}, + {kVGo_2d, kNWell_2d, kSTTryrope_2d, false, 0, 0}, + {kVWind_2d, kNRope_2d, kSTWindwell_2d, false, 0, 0}, + {kVTie_2d, kNRope_2d, kSTNopurps_2d, false, 0, 0}, + {kVTake_2d, kNBucket_2d, kSTNosee_2d, false, 0, 0}, + {kVLook_2d, kNBucket_2d, kSTNosee_2d, false, 0, 0}, + {kVWind_2d, kNBucket_2d, kSTWindwell_2d, false, 0, 0}, + {kVTake_2d, kNWater_2d, kSTNosee_2d, false, 0, 0}, + {kVWind_2d, kNHandle_2d, kSTWindwell_2d, false, 0, 0}, + {kVInto_2d, kNBucket_2d, kSTNosee_2d, false, 0, 0}, + {kVInto_2d, kNWell_2d, kSTIntowell_2d, false, 0, 0}, + {kVWish_2d, 0, kSTGetonwithit_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen17_desc_2d[] = { // Snakepit - {kVLook_2d, 0, kSTS17look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS17look_2d, true, 0, 0}, {kVAttack_2d, kNSnake_2d, kSTS17kill_2d, false, 0, 0}, {kVBreak_2d, kNSnake_2d, kSTS17kill_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen18_desc_2d[] = { // Phonebox - {kVLook_2d, 0, kSTS18look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS18look_2d, true, 0, 0}, {kVLook_2d, kNPhone_2d, kSTS18look_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen19_desc_2d[] = { // Street - {kVLook_2d, 0, kSTS19look_2d, true, 0, 0}, - {kVLook_2d, kNWall_2d, kSTSgraf_2d, false, 0, 0}, - {kVRead_2d, kNWall_2d, kSTSgraf_2d, false, 0, 0}, - {kVLook_2d, kNGraf_2d, kSTSgraf_2d, false, 0, 0}, - {kVRead_2d, kNGraf_2d, kSTSgraf_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS19look_2d, true, 0, 0}, + {kVLook_2d, kNWall_2d, kSTSgraf_2d, false, 0, 0}, + {kVRead_2d, kNWall_2d, kSTSgraf_2d, false, 0, 0}, + {kVLook_2d, kNGraf_2d, kSTSgraf_2d, false, 0, 0}, + {kVRead_2d, kNGraf_2d, kSTSgraf_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen20_desc_2d[] = { // Kennel - {kVLook_2d, 0, kSTS20look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS20look_2d, true, 0, 0}, {kVLook_2d, kNWindow_2d, kSTMorespecific_2d, false, 0, 0}, - {kVThrow_2d, kNStick_2d, kSTDonthaveone_2d, false, 0, 0}, - {kVStroke_2d, kNDog_2d, kSTStrokedog_2d, false, 0, 0}, - {kVTalk_2d, kNDog_2d, kSTStrokedog_2d, false, 0, 0}, - {kVInto_2d, 0, kSTStoobigtofit_2d, false, 0, 0}, + {kVThrow_2d, kNStick_2d, kSTDonthaveone_2d, false, 0, 0}, + {kVStroke_2d, kNDog_2d, kSTStrokedog_2d, false, 0, 0}, + {kVTalk_2d, kNDog_2d, kSTStrokedog_2d, false, 0, 0}, + {kVInto_2d, 0, kSTStoobigtofit_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen21_desc_2d[] = { // Rockroom - {kVLook_2d, 0, kSTS21look_2d, true, 0, 0}, - {kVClimb_2d, kNRope_2d, kSTNotclose_2d, false, 0, 0}, - {kVUnder_2d, kNRock_2d, kSTNounder_2d, false, 0, 0}, - {kVMove_2d, kNRock_2d, kSTTooheavy_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS21look_2d, true, 0, 0}, + {kVClimb_2d, kNRope_2d, kSTNotclose_2d, false, 0, 0}, + {kVUnder_2d, kNRock_2d, kSTNounder_2d, false, 0, 0}, + {kVMove_2d, kNRock_2d, kSTTooheavy_2d, false, 0, 0}, {kVLift_2d, kNRock_2d, kSTNowayhose_2d, false, 0, 0}, - {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, {kVTake_2d, kNRock_2d, kSTNowayhose_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen22_desc_2d[] = { // Rockgone - {kVLook_2d, 0, kSTS22look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS22look_2d, true, 0, 0}, {kVClimb_2d, kNRope_2d, kSTNotclose_2d, false, 0, 0}, - {kVLift_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, - {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, - {kVTake_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, - {kVUnder_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, + {kVLift_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, + {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, + {kVTake_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, + {kVUnder_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen23_desc_2d[] = { // Threeway - {kVLook_2d, 0, kSTS23look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS23look_2d, true, 0, 0}, {kVLift_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, - {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, - {kVUnder_2d, kNRock_2d, kSTDull2_2d, false, 0, 0}, + {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, + {kVUnder_2d, kNRock_2d, kSTDull2_2d, false, 0, 0}, {kVTake_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen24_desc_2d[] = { // Lampcave - {kVLook_2d, 0, kSTS24look_2d, true, 0, 0}, - {kVLift_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS24look_2d, true, 0, 0}, + {kVLift_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, {kVLook_2d, kNRock_2d, kSTNospecial_2d, false, 0, 0}, - {kVUnder_2d, kNRock_2d, kSTDull2_2d, false, 0, 0}, - {kVTake_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, + {kVUnder_2d, kNRock_2d, kSTDull2_2d, false, 0, 0}, + {kVTake_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen25_desc_2d[] = { // Chasm - {kVLook_2d, 0, kSTS25look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS25look_2d, true, 0, 0}, {kVUnder_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, {kVLift_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, - {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, {kVTake_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, - {kVJump_2d, 0, kSTSnojump_2d, false, 0, 0}, + {kVJump_2d, 0, kSTSnojump_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen26_desc_2d[] = { // Passage - {kVLook_2d, 0, kSTS26look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS26look_2d, true, 0, 0}, {kVUnder_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, {kVLift_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, - {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, {kVTake_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen27_desc_2d[] = { // genie - {kVLook_2d, 0, kSTS27look_2d, true, 0, 0}, - {kVUnder_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, - {kVLift_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, - {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, - {kVLook_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, - {kVOpen_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, - {kVUnscrew_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, - {kVUnlock_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, - {kVPush_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS27look_2d, true, 0, 0}, + {kVUnder_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, + {kVLift_2d, kNRock_2d, kSTSsearch_2d, false, 0, 0}, + {kVLook_2d, kNRock_2d, kSTDull_2d, false, 0, 0}, + {kVLook_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, + {kVOpen_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, + {kVUnscrew_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, + {kVUnlock_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, + {kVPush_2d, kNTrap_2d, kSTBudge_2d, false, 0, 0}, {kVTalk_2d, kNGenie_2d, kSTTalkgenie_2d, false, 0, 0}, - {kVRude_2d, kNGenie_2d, kSTRudeshed_2d, false, 0, 0}, - {kVKiss_2d, kNGenie_2d, kSTRudeshed_2d, false, 0, 0}, - {kVGive_2d, kNBanana_2d, kSTNobanana_2d, false, 0, 0}, - {kVClimb_2d, kNStairs_2d, kSTTrywalk_2d, false, 0, 0}, + {kVRude_2d, kNGenie_2d, kSTRudeshed_2d, false, 0, 0}, + {kVKiss_2d, kNGenie_2d, kSTRudeshed_2d, false, 0, 0}, + {kVGive_2d, kNBanana_2d, kSTNobanana_2d, false, 0, 0}, + {kVClimb_2d, kNStairs_2d, kSTTrywalk_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen28_desc_2d[] = { // traproom - {kVLook_2d, 0, kSTS28look_2d, true, 0, 0}, - {kVBreak_2d, kNSafe_2d, kSTNowayhose_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS28look_2d, true, 0, 0}, + {kVBreak_2d, kNSafe_2d, kSTNowayhose_2d, false, 0, 0}, {kVLook_2d, kNHole_2d, kSTS28hole_2d, false, 0, 28}, - {kVTake_2d, kNMouse_2d, kSTS28mouse_2d, false, 0, 0}, - {kVTake_2d, kNDroppings_2d, kSTSdroppings_2d, false, 0, 0}, + {kVTake_2d, kNMouse_2d, kSTS28mouse_2d, false, 0, 0}, + {kVTake_2d, kNDroppings_2d, kSTSdroppings_2d, false, 0, 0}, {kVUnscrew_2d, kNSafe_2d, kSTMorespecific_2d, false, 0, 0}, - {kVOpen_2d, 0, kSTUnlocksafe_2d, false, 0, 0}, - {kVUnlock_2d, kNSafe_2d, kSTUnlocksafe_2d, false, 0, 0}, + {kVOpen_2d, 0, kSTUnlocksafe_2d, false, 0, 0}, + {kVUnlock_2d, kNSafe_2d, kSTUnlocksafe_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -3867,78 +3867,78 @@ background_t screen29_desc_2d[] = { // Hall 2 }; background_t screen30_desc_2d[] = { // Lounge - {kVLook_2d, 0, kSTS30look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS30look_2d, true, 0, 0}, {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen31_desc_2d[] = { // parlor - {kVLook_2d, 0, kSTS31look_2d, true, 0, 0}, - {kVListen_2d, 0, kSTBlah_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS31look_2d, true, 0, 0}, + {kVListen_2d, 0, kSTBlah_2d, false, 0, 0}, {kVOpen_2d, kNDoor_2d, kSTMorespecific_2d, false, 0, 0}, {kVLook_2d, kNDoor_2d, kSTMorespecific_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen32_desc_2d[] = { // catroom - {kVLook_2d, 0, kSTS32look_2d, true, 0, 0}, + {kVLook_2d, 0, kSTS32look_2d, true, 0, 0}, {kVStroke_2d, kNCat_2d, kSTSstrokecat_2d, false, 0, 0}, - {kVPlay_2d, kNCat_2d, kSTSplaycat_2d, false, 0, 0}, - {kVTalk_2d, kNCat_2d, kSTStalkcat_2d, false, 0, 0}, - {kVLook_2d, kNPost_2d, kSTSlookpost_2d, false, 0, 0}, - {kVGive_2d, 0, kSTSgivecat_2d, false, 0, 0}, - {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, 0, 0}, + {kVPlay_2d, kNCat_2d, kSTSplaycat_2d, false, 0, 0}, + {kVTalk_2d, kNCat_2d, kSTStalkcat_2d, false, 0, 0}, + {kVLook_2d, kNPost_2d, kSTSlookpost_2d, false, 0, 0}, + {kVGive_2d, 0, kSTSgivecat_2d, false, 0, 0}, + {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, 0, 0}, {kVRub_2d, kNCatnip_2d, kSTRubcatnip2_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen33_desc_2d[] = { // Boxroom - {kVLook_2d, 0, kSTS33look_2d, true, 0, 0}, - {kVLook_2d, kNDoor_2d, kSTLookboxdoor_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS33look_2d, true, 0, 0}, + {kVLook_2d, kNDoor_2d, kSTLookboxdoor_2d, false, 0, 0}, {kVRead_2d, kNPaper_2d, kSTReadpaper_2d, false, 0, 29}, {kVLook_2d, kNPaper_2d, kSTReadpaper_2d, false, 0, 29}, - {kVLook_2d, kNCrate_2d, kSTSlookbox_2d, false, 0, 0}, - {kVInto_2d, kNCrate_2d, kSTSgetinbox_2d, false, 0, 0}, - {kVLook_2d, kNChute_2d, kSTLookchute_2d, false, 0, 0}, - {kVLook_2d, kNHole_2d, kSTLookchute_2d, false, 0, 0}, - {kVClimb_2d, kNChute_2d, kSTUpchute_2d, false, 0, 0}, - {kVLook_2d, kNWall_2d, kSTLookchute_2d, false, 0, 0}, + {kVLook_2d, kNCrate_2d, kSTSlookbox_2d, false, 0, 0}, + {kVInto_2d, kNCrate_2d, kSTSgetinbox_2d, false, 0, 0}, + {kVLook_2d, kNChute_2d, kSTLookchute_2d, false, 0, 0}, + {kVLook_2d, kNHole_2d, kSTLookchute_2d, false, 0, 0}, + {kVClimb_2d, kNChute_2d, kSTUpchute_2d, false, 0, 0}, + {kVLook_2d, kNWall_2d, kSTLookchute_2d, false, 0, 0}, {kVInto_2d, kNDoor_2d, kSTMorespecific_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen34_desc_2d[] = { // hall3 - {kVLook_2d, 0, kSTLookhall_2d, true, 0, 0}, + {kVLook_2d, 0, kSTLookhall_2d, true, 0, 0}, {kVLook_2d, kNMirror_2d, kSTNospecial_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen35_desc_2d[] = { // Organ - {kVLook_2d, 0, kSTS35look_2d, true, DONT_CARE, 0}, + {kVLook_2d, 0, kSTS35look_2d, true, DONT_CARE, 0}, {kVLook_2d, kNOrgan_2d, kSTNospecial_2d, false, DONT_CARE, 0}, {kVPlay_2d, kNOrgan_2d, kSTPlayorgan_2d, false, DONT_CARE, 0}, - {kVListen_2d, 0, kSTHearorgan_2d, false, 0, 0}, - {kVListen_2d, 0, kSTHearlaugh_2d, false, 1, 0}, + {kVListen_2d, 0, kSTHearorgan_2d, false, 0, 0}, + {kVListen_2d, 0, kSTHearlaugh_2d, false, 1, 0}, {0, 0, 0, false, 0, 0} }; background_t screen36_desc_2d[] = { // Hestroom - {kVLook_2d, 0, kSTLookhest_2d, true, 0, 0}, - {kVTake_2d, kNBook_2d, kSTS36book_2d, false, 0, 0}, - {kVRead_2d, kNBook_2d, kSTS36book_2d, false, 0, 0}, - {kVLook_2d, kNBook_2d, kSTS36book_2d, false, 0, 0}, - {kVLook_2d, kNTable_2d, kSTS36table_2d, false, 0, 0}, + {kVLook_2d, 0, kSTLookhest_2d, true, 0, 0}, + {kVTake_2d, kNBook_2d, kSTS36book_2d, false, 0, 0}, + {kVRead_2d, kNBook_2d, kSTS36book_2d, false, 0, 0}, + {kVLook_2d, kNBook_2d, kSTS36book_2d, false, 0, 0}, + {kVLook_2d, kNTable_2d, kSTS36table_2d, false, 0, 0}, {kVTalk_2d, kNHester_2d, kSTTalkhester_2d, false, 0, 0}, - {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, 0, 0}, + {kVLook_2d, kNWindow_2d, kSTS6garden_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t screen37_desc_2d[] = { // Retupmoc - {kVLook_2d, 0, kSTS37look_2d, true, 0, 0}, - {kVLift_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, + {kVLook_2d, 0, kSTS37look_2d, true, 0, 0}, + {kVLift_2d, kNRock_2d, kSTNopurps_2d, false, 0, 0}, {kVLook_2d, kNRock_2d, kSTNospecial_2d, false, 0, 0}, - {kVUnder_2d, kNRock_2d, kSTDull2_2d, false, 0, 0}, - {kVTalk_2d, kNDoctor_2d, kSTPleasego_2d, false, 0, 0}, + {kVUnder_2d, kNRock_2d, kSTDull2_2d, false, 0, 0}, + {kVTalk_2d, kNDoctor_2d, kSTPleasego_2d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -3965,68 +3965,68 @@ background_t catchall_3d[] = { // Generally applicable phrases {kVNaughty_3d, kNPenny_3d, kSTHeadache_3d, false, DONT_CARE, 0}, {kVInto_3d, kNWindow_3d, kSTThruwindow_3d, false, DONT_CARE, 0}, {kVOutof_3d, kNWindow_3d, kSTThruwindow_3d, false, DONT_CARE, 0}, - {kVJump_3d, 0, kSTSjump_3d, false, DONT_CARE, 0}, - {kVGo_3d, 0, kSTTrywalk_3d, false, DONT_CARE, 0}, - {kVInto_3d, 0, kSTTrywalk_3d, false, DONT_CARE, 0}, - {kVClimb_3d, 0, kSTSclimb_3d, false, DONT_CARE, 0}, - {kVShout_3d, 0, kSTNothing_3d, false, DONT_CARE, 0}, - {kVTalk_3d, 0, kSTStalk_3d, false, DONT_CARE, 0}, - {kVSwitch_3d, 0, kSTMorespecific_3d, false, DONT_CARE, 0}, - {kVUse_3d, 0, kSTMorespecific_3d, false, DONT_CARE, 0}, - {kVThrow_3d, 0, kSTNopurps_3d, false, DONT_CARE, 0}, - {kVRude_3d, 0, kSTSrude_3d, false, DONT_CARE, 0}, - {kVAttack_3d, 0, kSTSattack_3d, false, DONT_CARE, 0}, - {kVBreak_3d, 0, kSTSbreak_3d, false, DONT_CARE, 0}, - {kVListen_3d, 0, kSTQuiet_3d, false, DONT_CARE, 0}, - {kVSmell_3d, 0, kSTAroma_3d, false, DONT_CARE, 0}, - {kVQuery_3d, 0, kSTNoidea_3d, false, DONT_CARE, 0}, + {kVJump_3d, 0, kSTSjump_3d, false, DONT_CARE, 0}, + {kVGo_3d, 0, kSTTrywalk_3d, false, DONT_CARE, 0}, + {kVInto_3d, 0, kSTTrywalk_3d, false, DONT_CARE, 0}, + {kVClimb_3d, 0, kSTSclimb_3d, false, DONT_CARE, 0}, + {kVShout_3d, 0, kSTNothing_3d, false, DONT_CARE, 0}, + {kVTalk_3d, 0, kSTStalk_3d, false, DONT_CARE, 0}, + {kVSwitch_3d, 0, kSTMorespecific_3d, false, DONT_CARE, 0}, + {kVUse_3d, 0, kSTMorespecific_3d, false, DONT_CARE, 0}, + {kVThrow_3d, 0, kSTNopurps_3d, false, DONT_CARE, 0}, + {kVRude_3d, 0, kSTSrude_3d, false, DONT_CARE, 0}, + {kVAttack_3d, 0, kSTSattack_3d, false, DONT_CARE, 0}, + {kVBreak_3d, 0, kSTSbreak_3d, false, DONT_CARE, 0}, + {kVListen_3d, 0, kSTQuiet_3d, false, DONT_CARE, 0}, + {kVSmell_3d, 0, kSTAroma_3d, false, DONT_CARE, 0}, + {kVQuery_3d, 0, kSTNoidea_3d, false, DONT_CARE, 0}, {kVLook_3d, kNSky_3d, kSTFalling_3d, false, DONT_CARE, 0}, {kVLook_3d, kNWall_3d, kSTDull_3d, false, DONT_CARE, 0}, {kVLook_3d, kNGround_3d, kSTDull_3d, false, DONT_CARE, 0}, - {kVHelp_3d, 0, kSTShelp_3d, false, DONT_CARE, 0}, - {kVMagic_3d, 0, kSTSmagic_3d, false, DONT_CARE, 0}, - {kVWish_3d, 0, kSTSmagic_3d, false, DONT_CARE, 0}, - {kVDig_3d, 0, kSTSdig_3d, false, DONT_CARE, 0}, - {kVNaughty_3d, 0, kSTSnaughty_3d, false, DONT_CARE, 0}, - {kVKnock_3d, 0, kSTNoanswer_3d, false, DONT_CARE, 0}, + {kVHelp_3d, 0, kSTShelp_3d, false, DONT_CARE, 0}, + {kVMagic_3d, 0, kSTSmagic_3d, false, DONT_CARE, 0}, + {kVWish_3d, 0, kSTSmagic_3d, false, DONT_CARE, 0}, + {kVDig_3d, 0, kSTSdig_3d, false, DONT_CARE, 0}, + {kVNaughty_3d, 0, kSTSnaughty_3d, false, DONT_CARE, 0}, + {kVKnock_3d, 0, kSTNoanswer_3d, false, DONT_CARE, 0}, {kVOpen_3d, kNDoor_3d, kSTWontopen_3d, false, DONT_CARE, 0}, {kVUnlock_3d, kNDoor_3d, kSTCantunlock_3d, false, DONT_CARE, 0}, {kVLook_3d, kNDoor_3d, kSTDull_3d, false, DONT_CARE, 0}, - {kVHello_3d, 0, kSTHi_3d, false, DONT_CARE, 0}, - {kVGive_3d, 0, kSTNothanks_3d, false, DONT_CARE, 0}, - {kVShout_3d, 0, kSTNoanswer_3d, false, DONT_CARE, 0}, - {kVUndress_3d, 0, kSTSundress_3d, false, DONT_CARE, 0}, - {kVSit_3d, 0, kSTStired_3d, false, DONT_CARE, 0}, - {kVFeed_3d, 0, kSTNothanks_3d, false, DONT_CARE, 0}, + {kVHello_3d, 0, kSTHi_3d, false, DONT_CARE, 0}, + {kVGive_3d, 0, kSTNothanks_3d, false, DONT_CARE, 0}, + {kVShout_3d, 0, kSTNoanswer_3d, false, DONT_CARE, 0}, + {kVUndress_3d, 0, kSTSundress_3d, false, DONT_CARE, 0}, + {kVSit_3d, 0, kSTStired_3d, false, DONT_CARE, 0}, + {kVFeed_3d, 0, kSTNothanks_3d, false, DONT_CARE, 0}, {kVTake_3d, kNVine_3d, kSTNopurps_3d, false, DONT_CARE, 0}, {kVClimb_3d, kNJungle_3d, kSTNopurps_3d, false, DONT_CARE, 0}, {kVLook_3d, kNJungle_3d, kSTLookjungle_3d, false, DONT_CARE, 0}, {kVPut_3d, kNFire_3d, kSTNopurps_3d, false, DONT_CARE, 0}, - {kVSwim_3d, 0, kSTCantswim_3d, false, DONT_CARE, 0}, + {kVSwim_3d, 0, kSTCantswim_3d, false, DONT_CARE, 0}, {kVTake_3d, kNMouse_3d, kSTCantcatch_3d, false, DONT_CARE, 0}, {kVLook_3d, kNMouse_3d, kSTNospecial_3d, false, DONT_CARE, 0}, {0, 0, 0, false, 0, 0} }; background_t crash_desc_3d[] = { // At the crash site - {kVLook_3d, 0, kSTLookcrash_3d, false, 0, 0}, - {kVRepair_3d, kNPlane_3d, kSTNopurps_3d, false, 0, 0}, - {kVFly_3d, kNPlane_3d, kSTNopurps_3d, false, 0, 0}, - {kVInto_3d, 0, kSTMorespecific_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookcrash_3d, false, 0, 0}, + {kVRepair_3d, kNPlane_3d, kSTNopurps_3d, false, 0, 0}, + {kVFly_3d, kNPlane_3d, kSTNopurps_3d, false, 0, 0}, + {kVInto_3d, 0, kSTMorespecific_3d, true, 0, 0}, {kVOpen_3d, kNDoor_3d, kSTOpenplanedoor_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t plane_desc_3d[] = { // Inside the plane - {kVLook_3d, 0, kSTLookplane_3d, true, 0, 0}, - {kVSearch_3d, 0, kSTSaylook_3d, false, 0, 0}, - {kVInto_3d, 0, kSTYouarein_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookplane_3d, true, 0, 0}, + {kVSearch_3d, 0, kSTSaylook_3d, false, 0, 0}, + {kVInto_3d, 0, kSTYouarein_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t web_desc_3d[] = { // At the spider's web - {kVLook_3d, 0, kSTLookweb_3d, true, 0, 0}, - {kVTake_3d, kNNative_3d, kSTTakegirl_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookweb_3d, true, 0, 0}, + {kVTake_3d, kNNative_3d, kSTTakegirl_3d, false, 0, 0}, {kVLook_3d, kNWeb_3d, kSTLookatweb_3d, false, 0, 0}, {kVTake_3d, kNPenny_3d, kSTTakepenny_3d, false, 0, 0}, {kVTalk_3d, kNPenny_3d, kSTTalkpenny_3d, false, 0, 0}, @@ -4034,24 +4034,24 @@ background_t web_desc_3d[] = { // At the spider's web }; background_t wfall_desc_3d[] = { // Waterfall and stream - {kVLook_3d, 0, kSTLookwfall_3d, true, 0, 0}, - {kVLook_3d, kNWater_3d, kSTLookwfall_3d, false, 0, 0}, - {kVCross_3d, kNWater_3d, kSTCantcross_3d, false, 0, 0}, - {kVListen_3d, 0, kSTListenfall_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookwfall_3d, true, 0, 0}, + {kVLook_3d, kNWater_3d, kSTLookwfall_3d, false, 0, 0}, + {kVCross_3d, kNWater_3d, kSTCantcross_3d, false, 0, 0}, + {kVListen_3d, 0, kSTListenfall_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t wfall_b_desc_3d[] = { // Same as above but no water - {kVLook_3d, 0, kSTLookwfall_b_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookwfall_b_3d, true, 0, 0}, {kVLook_3d, kNWater_3d, kSTLookwfall_b_3d, false, 0, 0}, - {kVCross_3d, kNWater_3d, kSTToomuddy_3d, false, 0, 0}, + {kVCross_3d, kNWater_3d, kSTToomuddy_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t wbase_desc_3d[] = { // Base of waterfall - {kVLook_3d, 0, kSTLookwbase_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookwbase_3d, true, 0, 0}, {kVLook_3d, kNWater_3d, kSTLookwbase_3d, false, 0, 0}, - {kVCross_3d, kNWater_3d, kSTToomuddy_3d, false, 0, 0}, + {kVCross_3d, kNWater_3d, kSTToomuddy_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -4061,62 +4061,62 @@ background_t path_ul_desc_3d[] = { // Path at left of spider's web }; background_t bridge_desc_3d[] = { // At the bridge - {kVLook_3d, 0, kSTLookbridge1_3d, true, 0, 0}, - {kVSwing_3d, 0, kSTSwingbridge_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookbridge1_3d, true, 0, 0}, + {kVSwing_3d, 0, kSTSwingbridge_3d, false, 0, 0}, {kVTake_3d, kNVine_3d, kSTGetbridgevines_3d, false, 0, 0}, - {kVTie_3d, kNThem_3d, kSTMorespecific_3d, false, 0, 0}, + {kVTie_3d, kNThem_3d, kSTMorespecific_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t bridge2_desc_3d[] = { // At the bridge - {kVLook_3d, 0, kSTLookbridge2_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookbridge2_3d, true, 0, 0}, {kVSwing_3d, 0, kSTSwingbridge_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t stream_desc_3d[] = { // stream with vines crossing - {kVLook_3d, 0, kSTLookstream1_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookstream1_3d, true, 0, 0}, {kVSwing_3d, 0, kSTMorespecific_3d, false, 0, 0}, - {kVCross_3d, 0, kSTStep1_3d, false, 0, 0}, + {kVCross_3d, 0, kSTStep1_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t stream2_desc_3d[] = { // Stream with elephant sitting in it - {kVLook_3d, 0, kSTLookstream2_3d, true, 0, 0}, - {kVSwing_3d, 0, kSTCantswing_3d, false, 0, 0}, - {kVLook_3d, kNElephant_3d, kSTLookele2_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookstream2_3d, true, 0, 0}, + {kVSwing_3d, 0, kSTCantswing_3d, false, 0, 0}, + {kVLook_3d, kNElephant_3d, kSTLookele2_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t village_desc_3d[] = { // Long shot of village - {kVLook_3d, 0, kSTLookvillage_3d, true, 0, 0}, - {kVTake_3d, kNFood_3d, kSTTakething_3d, false, 0, 0}, - {kVLook_3d, kNFood_3d, kSTTakething_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookvillage_3d, true, 0, 0}, + {kVTake_3d, kNFood_3d, kSTTakething_3d, false, 0, 0}, + {kVLook_3d, kNFood_3d, kSTTakething_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t hut_out_desc_3d[] = { // Outside witch doctor's hut - {kVLook_3d, 0, kSTLookhut_out_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookhut_out_3d, false, 0, 0}, {kVLook_3d, kNDocbits_3d, kSTLookdocbits_3d, false, 0, 0}, {kVTake_3d, kNDocbits_3d, kSTTakedocbits_3d, false, 0, 0}, - {kVLook_3d, kNSpider_3d, kSTLookspider_3d, false, 0, 0}, - {kVTake_3d, kNSpider_3d, kSTTakespider_3d, false, 0, 0}, - {kVLook_3d, kNSnake_3d, kSTLooksnake_3d, false, 0, 0}, - {kVTake_3d, kNSnake_3d, kSTTakesnake_3d, false, 0, 0}, - {kVSearch_3d, kNWindow_3d, kSTLookinhut_3d, false, 0, 0}, - {kVLook_3d, kNWindow_3d, kSTLookinhut_3d, false, 0, 0}, - {kVSearch_3d, kNHut_3d, kSTLookinhut_3d, false, 0, 0}, + {kVLook_3d, kNSpider_3d, kSTLookspider_3d, false, 0, 0}, + {kVTake_3d, kNSpider_3d, kSTTakespider_3d, false, 0, 0}, + {kVLook_3d, kNSnake_3d, kSTLooksnake_3d, false, 0, 0}, + {kVTake_3d, kNSnake_3d, kSTTakesnake_3d, false, 0, 0}, + {kVSearch_3d, kNWindow_3d, kSTLookinhut_3d, false, 0, 0}, + {kVLook_3d, kNWindow_3d, kSTLookinhut_3d, false, 0, 0}, + {kVSearch_3d, kNHut_3d, kSTLookinhut_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t hut_in_desc_3d[] = { // Inside hut // States: 0 imprisoned_3d, 1 doctor incapacitated - {kVLook_3d, 0, kSTLookhut_in_3d, true, 0, 0}, - {kVLook_3d, 0, kSTLookhut_in2_3d, true, 1, 0}, - {kVLook_3d, kNDoctor_3d, kSTLookhut_in2_3d, false, 1, 0}, - {kVTake_3d, 0, kSTTakeincage_3d, false, 0, 0}, - {kVTake_3d, kNDoctor_3d, kSTTakedoctor0_3d, false, 0, 0}, - {kVTake_3d, kNDoctor_3d, kSTTakedoctor1_3d, false, 1, 0}, + {kVLook_3d, 0, kSTLookhut_in_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookhut_in2_3d, true, 1, 0}, + {kVLook_3d, kNDoctor_3d, kSTLookhut_in2_3d, false, 1, 0}, + {kVTake_3d, 0, kSTTakeincage_3d, false, 0, 0}, + {kVTake_3d, kNDoctor_3d, kSTTakedoctor0_3d, false, 0, 0}, + {kVTake_3d, kNDoctor_3d, kSTTakedoctor1_3d, false, 1, 0}, {kVLook_3d, kNDocbits_3d, kSTLookdocbits_3d, false, DONT_CARE, 0}, {kVTake_3d, kNDocbits_3d, kSTTakedocbits_3d, false, DONT_CARE, 0}, {kVLook_3d, kNSpider_3d, kSTLookspider_3d, false, DONT_CARE, 0}, @@ -4124,27 +4124,27 @@ background_t hut_in_desc_3d[] = { // Inside hut {kVLook_3d, kNSnake_3d, kSTLooksnake_3d, false, DONT_CARE, 0}, {kVTake_3d, kNSnake_3d, kSTTakesnake_3d, false, DONT_CARE, 0}, {kVLook_3d, kNWindow_3d, kSTLookouthut_3d, false, DONT_CARE, 0}, - {kVLook_3d, kNShelfbits_3d, kSTLookshelfbits_3d, false, 0, 0}, - {kVLook_3d, kNShelfbits_3d, kSTLookshelfbits2_3d, false, 1, 0}, - {kVTake_3d, kNShelfbits_3d, kSTTakeshelfbits_3d, false, 1, 0}, - {kVDrink_3d, kNShelfbits_3d, kSTTakeshelfbits_3d, false, 1, 0}, - {kVLook_3d, kNBottles_3d, kSTLookshelfbits_3d, false, 0, 0}, - {kVLook_3d, kNBottles_3d, kSTLookshelfbits2_3d, false, 1, 0}, - {kVTake_3d, kNBottles_3d, kSTTakeshelfbits_3d, false, 1, 0}, - {kVDrink_3d, kNBottles_3d, kSTTakeshelfbits_3d, false, 1, 0}, - {kVSearch_3d, 0, kSTCantlookin_3d, false, 0, 0}, - {kVSearch_3d, kNFire_3d, kSTLookinfire_3d, false, 1, 0}, + {kVLook_3d, kNShelfbits_3d, kSTLookshelfbits_3d, false, 0, 0}, + {kVLook_3d, kNShelfbits_3d, kSTLookshelfbits2_3d, false, 1, 0}, + {kVTake_3d, kNShelfbits_3d, kSTTakeshelfbits_3d, false, 1, 0}, + {kVDrink_3d, kNShelfbits_3d, kSTTakeshelfbits_3d, false, 1, 0}, + {kVLook_3d, kNBottles_3d, kSTLookshelfbits_3d, false, 0, 0}, + {kVLook_3d, kNBottles_3d, kSTLookshelfbits2_3d, false, 1, 0}, + {kVTake_3d, kNBottles_3d, kSTTakeshelfbits_3d, false, 1, 0}, + {kVDrink_3d, kNBottles_3d, kSTTakeshelfbits_3d, false, 1, 0}, + {kVSearch_3d, 0, kSTCantlookin_3d, false, 0, 0}, + {kVSearch_3d, kNFire_3d, kSTLookinfire_3d, false, 1, 0}, {kVLook_3d, kNFire_3d, kSTLookfire_3d, false, DONT_CARE, 0}, - {kVTalk_3d, kNDoctor_3d, kSTTalkdoc_3d, false, 0, 0}, - {kVTalk_3d, kNDoctor_3d, kSTTalkdoc2_3d, false, 1, 0}, + {kVTalk_3d, kNDoctor_3d, kSTTalkdoc_3d, false, 0, 0}, + {kVTalk_3d, kNDoctor_3d, kSTTalkdoc2_3d, false, 1, 0}, {kVSearch_3d, kNMouse_3d, kSTLookinhole_3d, false, DONT_CARE, 0}, {kVTalk_3d, kNMouse_3d, kSTTalkmouse_3d, false, DONT_CARE, 0}, - {kVUnlock_3d, kNCdoor_3d, kSTPicklock_3d, false, 0, 0}, - {kVTake_3d, kNDoorlock_3d, kSTPicklock_3d, false, 0, 0}, + {kVUnlock_3d, kNCdoor_3d, kSTPicklock_3d, false, 0, 0}, + {kVTake_3d, kNDoorlock_3d, kSTPicklock_3d, false, 0, 0}, {kVGive_3d, kNMouse_3d, kSTGivemouse_3d, false, DONT_CARE, 0}, {kVThrow_3d, kNCheese_3d, kSTGivemouse_3d, false, DONT_CARE, 0}, - {kVInto_3d, kNFire_3d, kSTGetinpot_3d, false, 1, 0}, - {kVTake_3d, kNNative_3d, kSTTakenative_3d, false, 0, 0}, + {kVInto_3d, kNFire_3d, kSTGetinpot_3d, false, 1, 0}, + {kVTake_3d, kNNative_3d, kSTTakenative_3d, false, 0, 0}, {kVShoot_3d, kNDoctor_3d, kSTMissed_3d, false, DONT_CARE, 0}, {kVBlow_3d, kNDoctor_3d, kSTMissed_3d, false, DONT_CARE, 0}, {kVUse_3d, kNPipe_3d, kSTMissed_3d, false, DONT_CARE, 0}, @@ -4153,11 +4153,11 @@ background_t hut_in_desc_3d[] = { // Inside hut }; background_t garden_desc_3d[] = { // The secret garden - {kVLook_3d, 0, kSTLookgarden_3d, true, 0, 0}, - {kVLook_3d, kNOrchid_3d, kSTLookorchid_3d, false, 0, 0}, - {kVTake_3d, kNOrchid_3d, kSTTakeorchid_3d, false, 0, 0}, - {kVCross_3d, 0, kSTCrossgarden_3d, false, 0, 0}, - {kVLook_3d, kNWater_3d, kSTLookgarden_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookgarden_3d, true, 0, 0}, + {kVLook_3d, kNOrchid_3d, kSTLookorchid_3d, false, 0, 0}, + {kVTake_3d, kNOrchid_3d, kSTTakeorchid_3d, false, 0, 0}, + {kVCross_3d, 0, kSTCrossgarden_3d, false, 0, 0}, + {kVLook_3d, kNWater_3d, kSTLookgarden_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -4177,30 +4177,30 @@ background_t cliff_desc_3d[] = { // Lower cliff path }; background_t camp_desc_3d[] = { // Camp scene in village - {kVLook_3d, 0, kSTLookcamp_3d, true, 0, 0}, - {kVLook_3d, kNFire_3d, kSTLookhyena_3d, false, 0, 0}, - {kVLook_3d, kNPole_3d, kSTLookpole_3d, false, 0, 0}, - {kVBehind_3d, kNHut_3d, kSTBehindhut_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookcamp_3d, true, 0, 0}, + {kVLook_3d, kNFire_3d, kSTLookhyena_3d, false, 0, 0}, + {kVLook_3d, kNPole_3d, kSTLookpole_3d, false, 0, 0}, + {kVBehind_3d, kNHut_3d, kSTBehindhut_3d, false, 0, 0}, {kVSearch_3d, kNWindow_3d, kSTLookintohut_3d, false, 0, 0}, {kVSearch_3d, kNHut_3d, kSTLookintohut_3d, false, 0, 0}, - {kVLook_3d, kNHut_3d, kSTLookhut_3d, false, 0, 0}, + {kVLook_3d, kNHut_3d, kSTLookhut_3d, false, 0, 0}, {kVLook_3d, kNWindow_3d, kSTLookintohut_3d, false, 0, 0}, - {kVEat_3d, 0, kSTEatroast_3d, false, 0, 0}, - {kVTake_3d, kNFood_3d, kSTEatroast_3d, false, 0, 0}, - {kVInto_3d, kNFire_3d, kSTIntofire_3d, false, 0, 0}, - {kVTake_3d, kNFire_3d, kSTIntofire_3d, false, 0, 0}, - {kVTake_3d, kNNative_3d, kSTTakenative_3d, false, 0, 0}, - {kVTake_3d, kNPipe_3d, kSTMakeoffer_3d, false, 0, 0}, + {kVEat_3d, 0, kSTEatroast_3d, false, 0, 0}, + {kVTake_3d, kNFood_3d, kSTEatroast_3d, false, 0, 0}, + {kVInto_3d, kNFire_3d, kSTIntofire_3d, false, 0, 0}, + {kVTake_3d, kNFire_3d, kSTIntofire_3d, false, 0, 0}, + {kVTake_3d, kNNative_3d, kSTTakenative_3d, false, 0, 0}, + {kVTake_3d, kNPipe_3d, kSTMakeoffer_3d, false, 0, 0}, {kVGive_3d, kNBouillon_3d, kSTNonecarried_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; background_t turn_desc_3d[] = { // Turnaround path - {kVLook_3d, 0, kSTLookturn_3d, true, DONT_CARE, 0}, - {kVUnder_3d, kNRock_3d, kSTUnderrock_3d, false, 0, 0}, - {kVLook_3d, kNRock_3d, kSTLookrock_3d, false, 0, 0}, - {kVRide_3d, kNRock_3d, kSTOntorock_3d, false, 0, 0}, - {kVClimb_3d, kNRock_3d, kSTOntorock_3d, false, 0, 0}, + {kVLook_3d, 0, kSTLookturn_3d, true, DONT_CARE, 0}, + {kVUnder_3d, kNRock_3d, kSTUnderrock_3d, false, 0, 0}, + {kVLook_3d, kNRock_3d, kSTLookrock_3d, false, 0, 0}, + {kVRide_3d, kNRock_3d, kSTOntorock_3d, false, 0, 0}, + {kVClimb_3d, kNRock_3d, kSTOntorock_3d, false, 0, 0}, {0, 0, 0, false, 0, 0} }; @@ -4211,8 +4211,8 @@ background_t slope_desc_3d[] = { // Slope between cliff and stream background_t path_desc_3d[] = { // Path containing elephant // States: 0 Elephant present_3d, 1 - Elephant not present - {kVLook_3d, 0, kSTLookpath2_1_3d, true, 0, 0}, - {kVLook_3d, 0, kSTLookpath2_2_3d, true, 1, 0}, + {kVLook_3d, 0, kSTLookpath2_1_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookpath2_2_3d, true, 1, 0}, {kVRide_3d, kNElephant_3d, kSTRideelephant_3d, false, 0, 0}, {kVTake_3d, kNElephant_3d, kSTGetelephant_3d, false, 0, 0}, {kVShow_3d, kNMouse_3d, kSTShowmouse_3d, false, 0, 0}, @@ -4220,8 +4220,8 @@ background_t path_desc_3d[] = { // Path containing elephant }; background_t cave_desc_3d[] = { // Cave mouth - {kVLook_3d, 0, kSTLookcave1_3d, true, 0, 0}, - {kVLook_3d, 0, kSTLookcave2_3d, true, 1, 0}, + {kVLook_3d, 0, kSTLookcave1_3d, true, 0, 0}, + {kVLook_3d, 0, kSTLookcave2_3d, true, 1, 0}, {kVAttack_3d, kNGhost_3d, kSTAttackghost_3d, false, 0, 0}, {kVBreak_3d, kNGhost_3d, kSTAttackghost_3d, false, 0, 0}, {kVShoot_3d, kNGhost_3d, kSTAttackghost_3d, false, 0, 0}, @@ -4282,66 +4282,66 @@ byte points_3d[] = { 12, 2 }; -#define blowdw_1w {kVBlow_1w, 0, kDTnull, 0, 0, kDTnull, kDTokblow_1w, kALblowdw_1w} -#define breakpkin_1w {kVBreak_1w, 0, kDTnull, 0, 1, kDTnull, kDTokgen_1w, kALpkin_1w} -#define brkrope_1w {kVBreak_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsrbreak_1w, 0} -#define closebolt_1w {kVClose_1w, 0, kDTnull, 2, 1, kDTsclosed_1w, kDTsclosebolt_1w, 0} -#define closedoor1_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosedoor1_1w} -#define closedoor2_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, 0} -#define closedoor3_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, 0} -#define closedoor4_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosedoor4_1w} -#define closetrap_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosetrap_1w} -#define closewdoors_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosewdoors_1w} +#define blowdw_1w {kVBlow_1w, 0, kDTnull, 0, 0, kDTnull, kDTokblow_1w, kALblowdw_1w} +#define breakpkin_1w {kVBreak_1w, 0, kDTnull, 0, 1, kDTnull, kDTokgen_1w, kALpkin_1w} +#define brkrope_1w {kVBreak_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsrbreak_1w, 0} +#define closebolt_1w {kVClose_1w, 0, kDTnull, 2, 1, kDTsclosed_1w, kDTsclosebolt_1w, 0} +#define closedoor1_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosedoor1_1w} +#define closedoor2_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, 0} +#define closedoor3_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, 0} +#define closedoor4_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosedoor4_1w} +#define closetrap_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosetrap_1w} +#define closewdoors_1w {kVClose_1w, 0, kDTnull, 1, 0, kDTsclosed_1w, kDTnull, kALclosewdoors_1w} #define cutrope_1w {kVCut_1w, kRknife_1w, kDTrnoknife_1w, 0, 1, kDTsnocut_1w, kDTscut_1w, kALcutrope_1w} -#define dropmask_1w {kVDrop_1w, 0, kDTnull, 0, 0, kDTsworn3_1w, kDTnull, kALdropmask_1w} +#define dropmask_1w {kVDrop_1w, 0, kDTnull, 0, 0, kDTsworn3_1w, kDTnull, kALdropmask_1w} #define droppkin_1w {kVDrop_1w, kRpkin_1w, kDTnocgen_1w, 0, 1, kDTnull, kDTnull, kALpkin_1w} -#define eatchop_1w {kVEat_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALeatchop2_1w} -#define getchop_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALgetchop_1w} -#define getdw_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALcupbdw_1w} -#define getinboat_1w {kVInto_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetinboat_1w} -#define getknife_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALcupbpk_1w} -#define getoilcan_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALshedoil_1w} -#define getoutboat_1w {kVOutof_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetoutboat_1w} -#define givegold_1w {kVGive_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALgold_1w} -#define hiderock_1w {kVHide_1w, 0, kDTnull, 0, 1, kDTsrock_1w, kDTnull, kALrock_1w} -#define kickpkin_1w {kVAttack_1w, 0, kDTnull, 0, 1, kDTnull, kDTokgen_1w, kALpkin_1w} -#define knock_1w {kVKnock_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsNobody_1w, 0} -#define lockbolt_1w {kVLock_1w, 0, kDTnull, 2, 1, kDTsclosed_1w, kDTsclosebolt_1w, 0} +#define eatchop_1w {kVEat_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALeatchop2_1w} +#define getchop_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALgetchop_1w} +#define getdw_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALcupbdw_1w} +#define getinboat_1w {kVInto_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetinboat_1w} +#define getknife_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALcupbpk_1w} +#define getoilcan_1w {kVTake_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALshedoil_1w} +#define getoutboat_1w {kVOutof_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetoutboat_1w} +#define givegold_1w {kVGive_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALgold_1w} +#define hiderock_1w {kVHide_1w, 0, kDTnull, 0, 1, kDTsrock_1w, kDTnull, kALrock_1w} +#define kickpkin_1w {kVAttack_1w, 0, kDTnull, 0, 1, kDTnull, kDTokgen_1w, kALpkin_1w} +#define knock_1w {kVKnock_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsNobody_1w, 0} +#define lockbolt_1w {kVLock_1w, 0, kDTnull, 2, 1, kDTsclosed_1w, kDTsclosebolt_1w, 0} #define lockdoor_1w {kVLock_1w, kRkey_1w, kDTnockey_1w, 1, 0, kDTslock_1w, kDTokgen_1w, kALclosedoor1_1w} #define lookcupb_1w {kVLook_1w, kRcandle_1w, kDTnoccandle_1w, DONT_CARE, 0, kDTnull, kDTnull, kALlookcupb_1w} #define lookshed_1w {kVLook_1w, kRcandle_1w, kDTnoccandle_1w, 0, 0, kDTsnoseeoil_1w, kDTsseeoil_1w, kALshedoil_1w} -#define movecarp1_1w {kVMove_1w, 0, kDTnull, 0, 0, kDTnull, kDTsrollrug_1w, kALmovecarp_1w} -#define movecarp2_1w {kVLift_1w, 0, kDTnull, 0, 0, kDTnull, kDTsrollrug_1w, kALmovecarp_1w} -#define movecarp3_1w {kVUnder_1w, 0, kDTnull, 0, 0, kDTnull, kDTsrollrug_1w, kALmovecarp_1w} -#define offmask_1w {kVOff_1w, 0, kDTnull, 1, 0, kDTsworn2_1w, kDTokgen_1w, kALswapmask_1w} +#define movecarp1_1w {kVMove_1w, 0, kDTnull, 0, 0, kDTnull, kDTsrollrug_1w, kALmovecarp_1w} +#define movecarp2_1w {kVLift_1w, 0, kDTnull, 0, 0, kDTnull, kDTsrollrug_1w, kALmovecarp_1w} +#define movecarp3_1w {kVUnder_1w, 0, kDTnull, 0, 0, kDTnull, kDTsrollrug_1w, kALmovecarp_1w} +#define offmask_1w {kVOff_1w, 0, kDTnull, 1, 0, kDTsworn2_1w, kDTokgen_1w, kALswapmask_1w} #define oilbolt_1w {kVOil_1w, kRoil_1w, kDTrnooil_1w, 0, 1, kDTsoiled_1w, kDTsoilbolt_1w, 0} -#define omattack_1w {kVAttack_1w, 0, kDTnull, 0, 0, kDTnull, kDTsomattack_1w, 0} -#define ombreak_1w {kVBreak_1w, 0, kDTnull, 0, 0, kDTnull, kDTsomattack_1w, 0} -#define omtalk_1w {kVTalk_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALoldman_1w} -#define openbolt_1w {kVOpen_1w, 0, kDTnull, 1, 2, kDTsstuck_1w, kDTsopenbolt_1w, 0} +#define omattack_1w {kVAttack_1w, 0, kDTnull, 0, 0, kDTnull, kDTsomattack_1w, 0} +#define ombreak_1w {kVBreak_1w, 0, kDTnull, 0, 0, kDTnull, kDTsomattack_1w, 0} +#define omtalk_1w {kVTalk_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALoldman_1w} +#define openbolt_1w {kVOpen_1w, 0, kDTnull, 1, 2, kDTsstuck_1w, kDTsopenbolt_1w, 0} #define opendoor1_1w {kVOpen_1w, kRkey_1w, kDTslocked_1w, 0, 1, kDTsopen_1w, kDTsunlock_1w, kALopendoor1_1w} -#define opendoor2_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTsopen_1w, kDTnull, kALopendoor2_1w} -#define opendoor3_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTsopen_1w, kDTnull, kALopendoor3_1w} -#define opendoor4_1w {kVOpen_1w, 0, kDTnull, 0, 0, kDTsopen_1w, kDTnull, kALopendoor4_1w} -#define openpkin_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTnull, kDTsopenpkin_1w, kALpkin_1w} -#define opentrap_1w {kVOpen_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALopentrap_1w} -#define openwdoors_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTsopen_1w, kDTnull, kALopenwdoors_1w} +#define opendoor2_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTsopen_1w, kDTnull, kALopendoor2_1w} +#define opendoor3_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTsopen_1w, kDTnull, kALopendoor3_1w} +#define opendoor4_1w {kVOpen_1w, 0, kDTnull, 0, 0, kDTsopen_1w, kDTnull, kALopendoor4_1w} +#define openpkin_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTnull, kDTsopenpkin_1w, kALpkin_1w} +#define opentrap_1w {kVOpen_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALopentrap_1w} +#define openwdoors_1w {kVOpen_1w, 0, kDTnull, 0, 1, kDTsopen_1w, kDTnull, kALopenwdoors_1w} #define plugbung_1w {kVPlug_1w, kRbung_1w, kDTnocgen_1w, 0, 1, kDTnull, kDTsplug_1w, kALplugbung_1w} -#define pushboat_1w {kVPush_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALpushboat_1w} -#define pushigor_1w {kVPush_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALigor_1w} -#define ruboilcan_1w {kVRub_1w, 0, kDTnull, 0, 0, kDTnull, kDTsruboil_1w, 0} -#define talkdrac_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkdrac_1w} -#define talkfrank_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkfrank_1w} -#define talkgwen_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkgwen_1w} -#define talkhood_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkhood_1w} -#define talkpeahd_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkpeahd_1w} -#define talkslime_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkslime_1w} -#define throwchop_1w {kVThrowit_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALthrowchop_1w} +#define pushboat_1w {kVPush_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALpushboat_1w} +#define pushigor_1w {kVPush_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALigor_1w} +#define ruboilcan_1w {kVRub_1w, 0, kDTnull, 0, 0, kDTnull, kDTsruboil_1w, 0} +#define talkdrac_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkdrac_1w} +#define talkfrank_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkfrank_1w} +#define talkgwen_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkgwen_1w} +#define talkhood_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkhood_1w} +#define talkpeahd_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkpeahd_1w} +#define talkslime_1w {kVTalk_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALtalkslime_1w} +#define throwchop_1w {kVThrowit_1w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALthrowchop_1w} #define unlkdoor_1w {kVUnlock_1w, kRkey_1w, kDTnockey_1w, 0, 1, kDTsunlocked_1w, kDTsunlock_1w, kALopendoor1_1w} -#define unlock_1w {kVUnlock_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsUnlocked_1w, 0} -#define unlockbolt_1w {kVUnlock_1w, 0, kDTnull, 1, 2, kDTsstuck_1w, kDTsopenbolt_1w, 0} -#define untierope_1w {kVUntie_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsuntie_1w, 0} -#define useboat_1w {kVMakeUseOf_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALuseboat_1w} +#define unlock_1w {kVUnlock_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsUnlocked_1w, 0} +#define unlockbolt_1w {kVUnlock_1w, 0, kDTnull, 1, 2, kDTsstuck_1w, kDTsopenbolt_1w, 0} +#define untierope_1w {kVUntie_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsuntie_1w, 0} +#define useboat_1w {kVMakeUseOf_1w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALuseboat_1w} #define usemask_1w {kVMakeUseOf_1w, kRmask_1w, kDTnocgen_1w, DONT_CARE, 0, kDTnull, kDTnull, kALusemask_1w} #define wearmask_1w {kVWear_1w, kRmask_1w, kDTnocgen_1w, 0, 1, kDTsworn1_1w, kDTokgen_1w, kALswapmask_1w} @@ -4388,72 +4388,72 @@ const cmd *cmdList_1w[] = { shed_1w, slime_1w, trap_1w, ward_1w, whistle_1w }; -#define climbdumb_2w {kVClimb_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALdumb_2w} -#define climbrope_2w {kVClimb_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALclimbrope_2w} -#define climbwell_2w {kVClimb_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALclimbwell_2w} -#define closedoor1_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTnull, 0} -#define closedoor2_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTnull, 0} -#define closedoor3_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTnull, 0} -#define closesafe_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTokgen_2w, 0} -#define dialphone_2w {kVDial_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphone_2w} +#define climbdumb_2w {kVClimb_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALdumb_2w} +#define climbrope_2w {kVClimb_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALclimbrope_2w} +#define climbwell_2w {kVClimb_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALclimbwell_2w} +#define closedoor1_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTnull, 0} +#define closedoor2_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTnull, 0} +#define closedoor3_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTnull, 0} +#define closesafe_2w {kVClose_2w, 0, kDTnull, 1, 0, kDTsclose_2w, kDTokgen_2w, 0} +#define dialphone_2w {kVDial_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphone_2w} #define doorpencil_2w {kVMakeUseOf_2w, kRpencil_2w, kDTnocgen_2w, 0, 1, kDTspencil_2w, kDTnull, kALchkpap1_2w} #define dropdynamite_2w {kVDrop_2w, kRdyn_2w, kDTnocgen_2w, DONT_CARE, 0, kDTnull, kDTnull, kALdropdynamite_2w} #define eatbanana_2w {kVEat_2w, kRbanana_2w, kDTnocgen_2w, 0, 0, kDTnull, kDTnull, kALeatbanana_2w} #define eatcatnip_2w {kVEat_2w, kRcatnip_2w, kDTnocgen_2w, 0, 0, kDTnopurps_2w, kDTseatnip_2w, 0} #define eatgarlic_2w {kVEat_2w, kRgarlic_2w, kDTnocgen_2w, DONT_CARE, 0, kDTnull, kDTnull, kALgarlic_2w} #define firegun_2w {kVFire_2w, kRgun_2w, kDTnogun_2w, 0, 1, kDTsempty_2w, kDTnull, kALgun_2w} -#define gard1_2w {kVTalk_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtalkgard_2w} -#define gard2_2w {kVLook_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALlookgard_2w} -#define getballoon_2w {kVTake_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALballoon_2w} -#define getbook_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetbook_2w} -#define getdynamite_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetdynamite_2w} -#define getletter_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsgetlet_2w, 0} +#define gard1_2w {kVTalk_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtalkgard_2w} +#define gard2_2w {kVLook_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALlookgard_2w} +#define getballoon_2w {kVTake_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALballoon_2w} +#define getbook_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetbook_2w} +#define getdynamite_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgetdynamite_2w} +#define getletter_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsgetlet_2w, 0} #define givebanana_2w {kVGive_2w, kRbanana_2w, kDTnocgen_2w, 0, 0, kDTnull, kDTnull, kALbanana_2w} #define givebell_2w {kVGive_2w, kRbell_2w, kDTnocgen_2w, DONT_CARE, 0, kDTnull, kDTnull, kALgivebel_2w} #define givecatnip_2w {kVGive_2w, kRcatnip_2w, kDTnocgen_2w, 0, 0, kDTnopurps_2w, kDTscatnip_2w, 0} -#define intodumb_2w {kVInto_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALdumb_2w} -#define knock_2w {kVKnock_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsNobody_2w, 0} +#define intodumb_2w {kVInto_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALdumb_2w} +#define knock_2w {kVKnock_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsNobody_2w, 0} #define lightdynamite_2w {kVStrike_2w, kRmatch_2w, kDTnomatch_2w, DONT_CARE, 0, kDTnull, kDTnull, kALlightdynamite_2w} -#define lookcubp_2w {kVLook_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphoto_2w} -#define lookgarlic_2w {kVLook_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindClove_2w, kALgetgarlic_2w} -#define lookhole_2w {kVLook_2w, 0, kDTnull, 0, 0, kDTsDarkHole_2w, kDTnull, kALkeyhole_2w} -#define lookkennel_2w {kVLook_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALlookkennel_2w} -#define lookmat_2w {kVLook_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindMatch_2w, kALgetmatch_2w} -#define opencubp_2w {kVOpen_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphoto_2w} -#define opendoor1_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTsopen1_2w, kDTnull, kALopendoor1_2w} -#define opendoor2_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTsopen1_2w, kDTnull, kALopendoor2_2w} -#define opendoor3_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTsopen1_2w, kDTnull, kALopendoor3_2w} -#define opendum_2w {kVOpen_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsopendum_2w, 0} -#define opengarlic_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindClove_2w, kALgetgarlic_2w} -#define openkdoor_2w {kVOpen_2w, 0, kDTnull, 0, 0, kDTnull, kDTwontopen_2w, 0} +#define lookcubp_2w {kVLook_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphoto_2w} +#define lookgarlic_2w {kVLook_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindClove_2w, kALgetgarlic_2w} +#define lookhole_2w {kVLook_2w, 0, kDTnull, 0, 0, kDTsDarkHole_2w, kDTnull, kALkeyhole_2w} +#define lookkennel_2w {kVLook_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALlookkennel_2w} +#define lookmat_2w {kVLook_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindMatch_2w, kALgetmatch_2w} +#define opencubp_2w {kVOpen_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphoto_2w} +#define opendoor1_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTsopen1_2w, kDTnull, kALopendoor1_2w} +#define opendoor2_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTsopen1_2w, kDTnull, kALopendoor2_2w} +#define opendoor3_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTsopen1_2w, kDTnull, kALopendoor3_2w} +#define opendum_2w {kVOpen_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsopendum_2w, 0} +#define opengarlic_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindClove_2w, kALgetgarlic_2w} +#define openkdoor_2w {kVOpen_2w, 0, kDTnull, 0, 0, kDTnull, kDTwontopen_2w, 0} #define openlamp_2w {kVOpen_2w, kRlamp_2w, kDTnocgen_2w, DONT_CARE, 0, kDTnull, kDTempty_2w, 0} -#define openmat_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindMatch_2w, kALgetmatch_2w} -#define openpdoor_2w {kVOpen_2w, 0, kDTnull, 0, 0, kDTnull, kDTspdoor_2w, 0} -#define opensafe_2w {kVOpen_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALsafe_2w} -#define popballoon_2w {kVBreak_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALballoon_2w} -#define pushblue_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALworkgates_2w} -#define pushbutton_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsWhichColor_2w, 0} -#define pushgreen_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALbugzapper_2w} +#define openmat_2w {kVOpen_2w, 0, kDTnull, 0, 1, kDTempty_2w, kDTsFindMatch_2w, kALgetmatch_2w} +#define openpdoor_2w {kVOpen_2w, 0, kDTnull, 0, 0, kDTnull, kDTspdoor_2w, 0} +#define opensafe_2w {kVOpen_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALsafe_2w} +#define popballoon_2w {kVBreak_2w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALballoon_2w} +#define pushblue_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALworkgates_2w} +#define pushbutton_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsWhichColor_2w, 0} +#define pushgreen_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALbugzapper_2w} #define pushpaper_2w {kVPush_2w, kRpaper_2w, kDTnocgen_2w, 0, 1, kDTsnopaper_2w, kDTspaper_2w, kALpushpaper_2w} #define pushpencil_2w {kVPush_2w, kRpencil_2w, kDTnocgen_2w, 0, 0, kDTspencil_2w, kDTnull, kALpushpencil_2w} -#define pushred_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALshedlight_2w} -#define pushyellow_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgatelight_2w} -#define readalbum_2w {kVRead_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTtalbum_2w, 0} -#define readletter_2w {kVRead_2w, 0, kDTnull, 3, 3, kDTsnoread_2w, kDTsread_2w, kALreadlet_2w} +#define pushred_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALshedlight_2w} +#define pushyellow_2w {kVPush_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgatelight_2w} +#define readalbum_2w {kVRead_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTtalbum_2w, 0} +#define readletter_2w {kVRead_2w, 0, kDTnull, 3, 3, kDTsnoread_2w, kDTsread_2w, kALreadlet_2w} #define readwill_2w {kVRead_2w, kRwill_2w, kDTnocgen_2w, 1, 1, kDTnull, kDTnull, kALwill_2w} #define ringbell_2w {kVRing_2w, kRbell_2w, kDTnocgen_2w, DONT_CARE, 0, kDTnull, kDTnull, kALbell_2w} #define rubcatnip_2w {kVRub_2w, kRcatnip_2w, kDTnocgen_2w, 0, 0, kDTnopurps_2w, kDTnull, kALcatnip_2w} #define rublamp_2w {kVRub_2w, kRlamp_2w, kDTnocgen_2w, 0, 0, kDTnopurps_2w, kDTnull, kALlamp_2w} #define serum_2w {kVDrink_2w, kRserum_2w, kDTnocgen_2w, 0, 1, kDTsnoserum_2w, kDTnull, kALbottle_2w} #define strikematch_2w {kVStrike_2w, kRmatch_2w, kDTnocgen_2w, DONT_CARE, 0, kDTnull, kDTnull, kALstrikematch_2w} -#define takepaper_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtakepaper_2w} -#define takephone_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphone_2w} -#define talkharry_2w {kVTalk_2w, 0, kDTnull, 0, 1, kDTsharry_2w, kDTnull, kALharry_2w} +#define takepaper_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtakepaper_2w} +#define takephone_2w {kVTake_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALphone_2w} +#define talkharry_2w {kVTalk_2w, 0, kDTnull, 0, 1, kDTsharry_2w, kDTnull, kALharry_2w} #define throwstick_2w {kVThrowit_2w, kRstick_2w, kDTnocgen_2w, 0, 1, kDTnull, kDTnull, kALthrowstick_2w} -#define unlock_2w {kVUnlock_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsUnlocked_2w, 0} -#define unlockdum_2w {kVUnlock_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsunlockdum_2w, 0} +#define unlock_2w {kVUnlock_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsUnlocked_2w, 0} +#define unlockdum_2w {kVUnlock_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsunlockdum_2w, 0} #define usedynamite_2w {kVMakeUseOf_2w, kRmatch_2w, kDTnomatch_2w, DONT_CARE, 0, kDTnull, kDTnull, kALlightdynamite_2w} -#define userobot_2w {kVMakeUseOf_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, 0} +#define userobot_2w {kVMakeUseOf_2w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, 0} cmd album_2w[] = {readalbum_2w, emptyCmd}; cmd balloon_2w[] = {popballoon_2w, getballoon_2w, emptyCmd}; @@ -4513,55 +4513,55 @@ const cmd *cmdList_2w[] = { #define blow_3w {kVBlow_3w, kRpipe_3w, kDTnogun_3w, DONT_CARE, 0, kDTnull, kDTnull, kALdart_3w} #define blowdoc_3w {kVShoot_3w, kRpipe_3w, kDTnogun_3w, DONT_CARE, 0, kDTnull, kDTsblowdoc_3w, 0} #define book_3w {kVRead_3w, kRbook_3w, kDTnocgen_3w, DONT_CARE, 0, kDTnull, kDTnull, kALreadbook_3w} -#define cage1_3w {kVOpen_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALopencage_3w} -#define cage2_3w {kVClose_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, 0} -#define cage3_3w {kVTake_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtakecage_3w} -#define cageuse_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALusecage_3w} -#define candle1_3w {kVStrike_3w, 0, kDTnull, 0, 1, kDTslit_3w, kDTokgen_3w, 0} -#define candle2_3w {kVDouse_3w, 0, kDTnull, 1, 0, kDTsunlit_3w, kDTokgen_3w, 0} -#define cdoor1_3w {kVOpen_3w, 0, kDTnull, 0, 0, kDTsopen1_3w, kDTnull, kALopendoor_3w} -#define cdoor2_3w {kVClose_3w, 0, kDTnull, 1, 0, kDTsclose_3w, kDTokgen_3w, kALclosedoor_3w} -#define cdrinkpool_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTspool_3w, 0} -#define cdrinkstream_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsstream_3w, 0} -#define cexit1_3w {kVOutof_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALexit_3w} -#define cexit2_3w {kVClimb_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALexit_3w} -#define cflask1_3w {kVFill_3w, 0, kDTnull, 0, 1, kDTsfull_3w, kDTnull, kALfill_3w} -#define cflask2_3w {kVPut_3w, 0, kDTnull, 0, 1, kDTsfull_3w, kDTnull, kALfill_3w} -#define cflask3_3w {kVEmpty_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALempty2_3w} -#define cflask4_3w {kVDrink_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALdrink_3w} -#define cflask5_3w {kVGive_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALflask_3w} +#define cage1_3w {kVOpen_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALopencage_3w} +#define cage2_3w {kVClose_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, 0} +#define cage3_3w {kVTake_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtakecage_3w} +#define cageuse_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALusecage_3w} +#define candle1_3w {kVStrike_3w, 0, kDTnull, 0, 1, kDTslit_3w, kDTokgen_3w, 0} +#define candle2_3w {kVDouse_3w, 0, kDTnull, 1, 0, kDTsunlit_3w, kDTokgen_3w, 0} +#define cdoor1_3w {kVOpen_3w, 0, kDTnull, 0, 0, kDTsopen1_3w, kDTnull, kALopendoor_3w} +#define cdoor2_3w {kVClose_3w, 0, kDTnull, 1, 0, kDTsclose_3w, kDTokgen_3w, kALclosedoor_3w} +#define cdrinkpool_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTspool_3w, 0} +#define cdrinkstream_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsstream_3w, 0} +#define cexit1_3w {kVOutof_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALexit_3w} +#define cexit2_3w {kVClimb_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALexit_3w} +#define cflask1_3w {kVFill_3w, 0, kDTnull, 0, 1, kDTsfull_3w, kDTnull, kALfill_3w} +#define cflask2_3w {kVPut_3w, 0, kDTnull, 0, 1, kDTsfull_3w, kDTnull, kALfill_3w} +#define cflask3_3w {kVEmpty_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALempty2_3w} +#define cflask4_3w {kVDrink_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALdrink_3w} +#define cflask5_3w {kVGive_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALflask_3w} #define cheese1_3w {kVEat_3w, kRcheese_3w, kDTnocgen_3w, 0, 0, kDTnull, kDTnull, kALeatcheese_3w} -#define cheese2_3w {kVDrop_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALdropcheese_3w} -#define cheese3_3w {kVPut_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALdropcheese_3w} -#define cheese4_3w {kVTake_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtakecheese_3w} -#define cmake1_3w {kVMake_3w, 0, kDTnull, 0, 0, kDTsmade_3w, kDTnull, kALmakeclay_3w} +#define cheese2_3w {kVDrop_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALdropcheese_3w} +#define cheese3_3w {kVPut_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALdropcheese_3w} +#define cheese4_3w {kVTake_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtakecheese_3w} +#define cmake1_3w {kVMake_3w, 0, kDTnull, 0, 0, kDTsmade_3w, kDTnull, kALmakeclay_3w} #define cmake2_3w {kVStick_3w, kRpins_3w, kDTnopins_3w, DONT_CARE, 0, kDTnull, kDTnull, kALstick_3w} -#define cplane1_3w {kVClimb_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALplane_3w} -#define cplane2_3w {kVInto_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALplane_3w} -#define cplane3_3w {kVSearch_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALplane_3w} +#define cplane1_3w {kVClimb_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALplane_3w} +#define cplane2_3w {kVInto_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALplane_3w} +#define cplane3_3w {kVSearch_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTokgen_3w, kALplane_3w} #define crystal_3w {kVRub_3w, kRcrystal_3w, kDTnocgen_3w, DONT_CARE, 0, kDTnull, kDTnull, kALcrystal_3w} -#define csteps1_3w {kVMakeUseOf_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALsteps_3w} -#define cstick1_3w {kVStick_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALstick_3w} -#define cswing1_3w {kVSwing_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTswinger_3w, kALswing_3w} -#define ctalknat_3w {kVTalk_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtalknat_3w} -#define cube1_3w {kVGive_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgiveb_3w} -#define cvine1_3w {kVMakeUseOf_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALvine_3w} -#define cvine2_3w {kVUntie_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALuntie_vine_3w} -#define cvine3_3w {kVTie_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALvine_3w} -#define cwaterfall_3w {kVLook_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALlookwfall_3w} -#define cwaterpool_3w {kVLook_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTswater_3w, 0} -#define cwaterstream_3w {kVLook_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTswater_3w, 0} +#define csteps1_3w {kVMakeUseOf_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALsteps_3w} +#define cstick1_3w {kVStick_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALstick_3w} +#define cswing1_3w {kVSwing_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTswinger_3w, kALswing_3w} +#define ctalknat_3w {kVTalk_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtalknat_3w} +#define cube1_3w {kVGive_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALgiveb_3w} +#define cvine1_3w {kVMakeUseOf_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALvine_3w} +#define cvine2_3w {kVUntie_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALuntie_vine_3w} +#define cvine3_3w {kVTie_3w, 0, kDTnull, 0, 0, kDTnull, kDTnull, kALvine_3w} +#define cwaterfall_3w {kVLook_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALlookwfall_3w} +#define cwaterpool_3w {kVLook_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTswater_3w, 0} +#define cwaterstream_3w {kVLook_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTswater_3w, 0} #define dart_3w {kVShoot_3w, kRpipe_3w, kDTnogun_3w, DONT_CARE, 0, kDTnull, kDTnull, kALdart_3w} -#define elephant_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTuelephant_3w, 0} -#define ghost1_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTughost_3w, 0} +#define elephant_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTuelephant_3w, 0} +#define ghost1_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTughost_3w, 0} #define ghost2_3w {kVExorcise_3w, kRexor_3w, kDTnocex_3w, DONT_CARE, 0, kDTnull, kDTnull, kALexorcise_3w} -#define knock_3w {kVKnock_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsNobody_3w, 0} -#define lookrush_3w {kVBehind_3w, 0, kDTnull, 0, 1, kDTsfoundb_3w, kDTnull, kALfindbook_3w} -#define readit_3w {kVRead_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsread_3w, 0} -#define rock1_3w {kVBehind_3w, 0, kDTnull, 0, 1, kDTsfoundc_3w, kDTsfindc_3w, kALfindcrystal_3w} -#define swingc_3w {kVSwing_3w, 0, kDTnull, 0, 1, kDTsnoswing_3w, kDTswingcave_3w, 0} -#define unlock_3w {kVUnlock_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsUnlocked_3w, 0} -#define usedoc_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtalkdoc_3w} +#define knock_3w {kVKnock_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsNobody_3w, 0} +#define lookrush_3w {kVBehind_3w, 0, kDTnull, 0, 1, kDTsfoundb_3w, kDTnull, kALfindbook_3w} +#define readit_3w {kVRead_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsread_3w, 0} +#define rock1_3w {kVBehind_3w, 0, kDTnull, 0, 1, kDTsfoundc_3w, kDTsfindc_3w, kALfindcrystal_3w} +#define swingc_3w {kVSwing_3w, 0, kDTnull, 0, 1, kDTsnoswing_3w, kDTswingcave_3w, 0} +#define unlock_3w {kVUnlock_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTsUnlocked_3w, 0} +#define usedoc_3w {kVMakeUseOf_3w, 0, kDTnull, DONT_CARE, 0, kDTnull, kDTnull, kALtalkdoc_3w} cmd cbell_3w[] = {bell_3w, emptyCmd}; cmd cbook_3w[] = {book_3w, emptyCmd}; @@ -4601,57 +4601,57 @@ const cmd *cmdList_3w[] = { cvine_3w, cwfall_3w, cwpool_3w, cwstream_3w }; -#define blowdw_1d {kVBlow_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALblowdw_1d} -#define breakpkin_1d {kVBreak_1d, 0, 0, 0, 1, 0, kDTokgen_1d, kALpkin_1d} -#define brkrope_1d {kVBreak_1d, 0, 0, DONT_CARE, 0, 0, kDTsrbreak_1d, 0} -#define closebolt_1d {kVClose_1d, 0, 0, 2, 1, kDTsclose_1d, kDTokgen_1d, 0} -#define closedoor1_1d {kVClose_1d, 0, 0, 2, 0, kDTsclose_1d, 0, kALclosedoor1_1d} -#define closedoor2_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, 0} -#define closedoor3_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, 0} -#define closedoor4_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, kALclosedoor4_1d} -#define closetrap_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, kDTokgen_1d, kALclosetrap_1d} -#define closewdoors_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, kALclosewdoors_1d} +#define blowdw_1d {kVBlow_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALblowdw_1d} +#define breakpkin_1d {kVBreak_1d, 0, 0, 0, 1, 0, kDTokgen_1d, kALpkin_1d} +#define brkrope_1d {kVBreak_1d, 0, 0, DONT_CARE, 0, 0, kDTsrbreak_1d, 0} +#define closebolt_1d {kVClose_1d, 0, 0, 2, 1, kDTsclose_1d, kDTokgen_1d, 0} +#define closedoor1_1d {kVClose_1d, 0, 0, 2, 0, kDTsclose_1d, 0, kALclosedoor1_1d} +#define closedoor2_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, 0} +#define closedoor3_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, 0} +#define closedoor4_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, kALclosedoor4_1d} +#define closetrap_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, kDTokgen_1d, kALclosetrap_1d} +#define closewdoors_1d {kVClose_1d, 0, 0, 1, 0, kDTsclose_1d, 0, kALclosewdoors_1d} #define cutrope_1d {kVCut_1d, kRknife_1d, kDTrnoknife_1d, 0, 1, kDTsnocut_1d, kDTscut_1d, kALcutrope_1d} -#define dropmask_1d {kVDrop_1d, 0, 0, 0, 0, kDTsworn3_1d, 0, kALdropmask_1d} -#define droppkin_1d {kVDrop_1d, kRpkin_1d, kDTnocgen_1d, 0, 1, 0, 0, kALpkin_1d} -#define eatchop_1d {kVEat_1d, 0, 0, 0, 0, 0, 0, kALeatchop_1d} -#define getdw_1d {kVTake_1d, 0, 0, 0, 0, 0, 0, kALcupbdw_1d} -#define getinboat_1d {kVInto_1d, 0, 0, DONT_CARE, 0, 0, 0, kALgetinboat_1d} -#define getknife_1d {kVTake_1d, 0, 0, 0, 0, 0, 0, kALcupbpk_1d} -#define getoilcan_1d {kVTake_1d, 0, 0, 0, 0, 0, 0, kALshedoil_1d} -#define getoutboat_1d {kVOutof_1d, 0, 0, DONT_CARE, 0, 0, 0, kALgetoutboat_1d} -#define givegold_1d {kVGive_1d, 0, 0, 0, 0, 0, 0, kALgold_1d} -#define kickpkin_1d {kVAttack_1d, 0, 0, 0, 1, 0, kDTokgen_1d, kALpkin_1d} -#define knock_1d {kVKnock_1d, 0, 0, DONT_CARE, 0, 0, kDTsknock_1d, 0} -#define lockbolt_1d {kVLock_1d, 0, 0, 2, 1, kDTsclose_1d, kDTokgen_1d, 0} +#define dropmask_1d {kVDrop_1d, 0, 0, 0, 0, kDTsworn3_1d, 0, kALdropmask_1d} +#define droppkin_1d {kVDrop_1d, kRpkin_1d, kDTnocgen_1d, 0, 1, 0, 0, kALpkin_1d} +#define eatchop_1d {kVEat_1d, 0, 0, 0, 0, 0, 0, kALeatchop_1d} +#define getdw_1d {kVTake_1d, 0, 0, 0, 0, 0, 0, kALcupbdw_1d} +#define getinboat_1d {kVInto_1d, 0, 0, DONT_CARE, 0, 0, 0, kALgetinboat_1d} +#define getknife_1d {kVTake_1d, 0, 0, 0, 0, 0, 0, kALcupbpk_1d} +#define getoilcan_1d {kVTake_1d, 0, 0, 0, 0, 0, 0, kALshedoil_1d} +#define getoutboat_1d {kVOutof_1d, 0, 0, DONT_CARE, 0, 0, 0, kALgetoutboat_1d} +#define givegold_1d {kVGive_1d, 0, 0, 0, 0, 0, 0, kALgold_1d} +#define kickpkin_1d {kVAttack_1d, 0, 0, 0, 1, 0, kDTokgen_1d, kALpkin_1d} +#define knock_1d {kVKnock_1d, 0, 0, DONT_CARE, 0, 0, kDTsknock_1d, 0} +#define lockbolt_1d {kVLock_1d, 0, 0, 2, 1, kDTsclose_1d, kDTokgen_1d, 0} #define lockdoor_1d {kVLock_1d, kRkey_1d, kDTnockey_1d, 2, 0, kDTslock_1d, kDTokgen_1d, 0} -#define lookcupb_1d {kVLook_1d, kRcandle_1d, kDTnoccandle_1d, DONT_CARE, 0, 0, 0, kALlookcupb_1d} +#define lookcupb_1d {kVLook_1d, kRcandle_1d, kDTnoccandle_1d, DONT_CARE, 0, 0, 0, kALlookcupb_1d} #define lookshed_1d {kVLook_1d, kRcandle_1d, kDTnoccandle_1d, 0, 0, kDTsnosee_1d, kDTsseeoil_1d, 0} -#define movecarp1_1d {kVMove_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALmovecarp_1d} -#define movecarp2_1d {kVLift_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALmovecarp_1d} -#define movecarp3_1d {kVUnder_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALmovecarp_1d} -#define offmask_1d {kVOff_1d, 0, 0, 1, 0, kDTsworn2_1d, kDTokgen_1d, kALswapmask_1d} +#define movecarp1_1d {kVMove_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALmovecarp_1d} +#define movecarp2_1d {kVLift_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALmovecarp_1d} +#define movecarp3_1d {kVUnder_1d, 0, 0, 0, 0, 0, kDTokgen_1d, kALmovecarp_1d} +#define offmask_1d {kVOff_1d, 0, 0, 1, 0, kDTsworn2_1d, kDTokgen_1d, kALswapmask_1d} #define oilbolt_1d {kVOil_1d, kRoil_1d, kDTrnooil_1d, 0, 1, kDTsoiled_1d, kDTokgen_1d, 0} -#define omattack_1d {kVAttack_1d, 0, 0, 0, 0, 0, kDTsomattack_1d, 0} -#define ombreak_1d {kVBreak_1d, 0, 0, 0, 0, 0, kDTsomattack_1d, 0} -#define omtalk_1d {kVTalk_1d, 0, 0, DONT_CARE, 0, 0, 0, kALoldman_1d} -#define openbolt_1d {kVOpen_1d, 0, 0, 1, 2, kDTsstuck_1d, kDTokgen_1d, 0} -#define opendoor1_1d {kVOpen_1d, 0, 0, 1, 2, kDTsopen_1d, 0, kALopendoor1_1d} -#define opendoor2_1d {kVOpen_1d, 0, 0, 0, 1, kDTsopen2_1d, 0, kALopendoor2_1d} -#define opendoor3_1d {kVOpen_1d, 0, 0, 0, 1, kDTsopen2_1d, 0, kALopendoor3_1d} -#define opendoor4_1d {kVOpen_1d, 0, 0, 0, 0, kDTsopen2_1d, 0, kALopendoor4_1d} -#define openpkin_1d {kVOpen_1d, 0, 0, 0, 1, 0, kDTokgen_1d, kALpkin_1d} -#define opentrap_1d {kVOpen_1d, 0, 0, 0, 0, 0, 0, kALopentrap_1d} -#define openwdoors_1d {kVOpen_1d, 0, 0, 0, 1, kDTsopen2_1d, 0, kALopenwdoors_1d} -#define plugbung_1d {kVPlug_1d, kRbung_1d, kDTnocgen_1d, 0, 1, 0, kDTokgen_1d, kALplugbung_1d} -#define pushboat_1d {kVPush_1d, 0, 0, DONT_CARE, 0, 0, 0, kALpushboat_1d} -#define pushigor_1d {kVPush_1d, 0, 0, 0, 0, 0, 0, kALigor_1d} -#define ruboilcan_1d {kVRub_1d, 0, 0, 0, 0, 0, kDTsruboil_1d, 0} -#define throwchop_1d {kVThrow_1d, 0, 0, 0, 0, 0, 0, kALthrowchop_1d} +#define omattack_1d {kVAttack_1d, 0, 0, 0, 0, 0, kDTsomattack_1d, 0} +#define ombreak_1d {kVBreak_1d, 0, 0, 0, 0, 0, kDTsomattack_1d, 0} +#define omtalk_1d {kVTalk_1d, 0, 0, DONT_CARE, 0, 0, 0, kALoldman_1d} +#define openbolt_1d {kVOpen_1d, 0, 0, 1, 2, kDTsstuck_1d, kDTokgen_1d, 0} +#define opendoor1_1d {kVOpen_1d, 0, 0, 1, 2, kDTsopen_1d, 0, kALopendoor1_1d} +#define opendoor2_1d {kVOpen_1d, 0, 0, 0, 1, kDTsopen2_1d, 0, kALopendoor2_1d} +#define opendoor3_1d {kVOpen_1d, 0, 0, 0, 1, kDTsopen2_1d, 0, kALopendoor3_1d} +#define opendoor4_1d {kVOpen_1d, 0, 0, 0, 0, kDTsopen2_1d, 0, kALopendoor4_1d} +#define openpkin_1d {kVOpen_1d, 0, 0, 0, 1, 0, kDTokgen_1d, kALpkin_1d} +#define opentrap_1d {kVOpen_1d, 0, 0, 0, 0, 0, 0, kALopentrap_1d} +#define openwdoors_1d {kVOpen_1d, 0, 0, 0, 1, kDTsopen2_1d, 0, kALopenwdoors_1d} +#define plugbung_1d {kVPlug_1d, kRbung_1d, kDTnocgen_1d, 0, 1, 0, kDTokgen_1d, kALplugbung_1d} +#define pushboat_1d {kVPush_1d, 0, 0, DONT_CARE, 0, 0, 0, kALpushboat_1d} +#define pushigor_1d {kVPush_1d, 0, 0, 0, 0, 0, 0, kALigor_1d} +#define ruboilcan_1d {kVRub_1d, 0, 0, 0, 0, 0, kDTsruboil_1d, 0} +#define throwchop_1d {kVThrow_1d, 0, 0, 0, 0, 0, 0, kALthrowchop_1d} #define unlkdoor_1d {kVUnlock_1d, kRkey_1d, kDTnockey_1d, 0, 1, kDTsunlock_1d, kDTokgen_1d, 0} -#define unlock_1d {kVUnlock_1d, 0, 0, DONT_CARE, 0, 0, kDTsunlock_1d, 0} -#define unlockbolt_1d {kVUnlock_1d, 0, 0, 1, 2, kDTsstuck_1d, kDTokgen_1d, 0} -#define untierope_1d {kVUntie_1d, 0, 0, DONT_CARE, 0, 0, kDTsuntie_1d, 0} +#define unlock_1d {kVUnlock_1d, 0, 0, DONT_CARE, 0, 0, kDTsunlock_1d, 0} +#define unlockbolt_1d {kVUnlock_1d, 0, 0, 1, 2, kDTsstuck_1d, kDTokgen_1d, 0} +#define untierope_1d {kVUntie_1d, 0, 0, DONT_CARE, 0, 0, kDTsuntie_1d, 0} #define wearmask_1d {kVWear_1d, kRmask_1d, kDTnocgen_1d, 0, 1, kDTsworn1_1d, kDTokgen_1d, kALswapmask_1d} cmd boat_1d[] = {getinboat_1d, getoutboat_1d, pushboat_1d, emptyCmd}; @@ -4686,62 +4686,62 @@ const cmd *cmdList_1d[] = { ward_1d, whistle_1d }; -#define climbdumb_2d {kVClimb_2d, 0, 0, 0, 0, 0, 0, kALdumb_2d} -#define climbrope_2d {kVClimb_2d, 0, 0, DONT_CARE, 0, 0, 0, kALclimbrope_2d} -#define climbwell_2d {kVClimb_2d, 0, 0, DONT_CARE, 0, 0, 0, kALclimbwell_2d} -#define closedoor1_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, 0, 0} -#define closedoor2_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, 0, 0} -#define closedoor3_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, 0, 0} -#define closesafe_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, kDTokgen_2d, 0} -#define dialphone_2d {kVDial_2d, 0, 0, 1, 1, kDTsdialed_2d, 0, kALphone_2d} -#define dropdynamite_2d {kVDrop_2d, kRdyn_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALdropdynamite_2d} -#define eatbanana_2d {kVEat_2d, kRbanana_2d, kDTnocgen_2d, 0, 0, 0, 0, kALeatbanana_2d} -#define eatgarlic_2d {kVEat_2d, kRgarlic_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALgarlic_2d} -#define firegun_2d {kVFire_2d, kRgun_2d, kDTnogun_2d, 0, 1, kDTsempty_2d, 0, kALgun_2d} -#define getballoon_2d {kVTake_2d, 0, 0, 0, 0, 0, 0, kALballoon_2d} -#define getbook_2d {kVTake_2d, 0, 0, DONT_CARE, 0, 0, 0, kALgetbook_2d} -#define getdynamite_2d {kVTake_2d, 0, 0, DONT_CARE, 0, 0, 0, kALgetdynamite_2d} -#define getletter_2d {kVTake_2d, 0, 0, DONT_CARE, 0, kDTsgetlet_2d, 0, 0} -#define givebanana_2d {kVGive_2d, kRbanana_2d, kDTnocgen_2d, 0, 0, 0, 0, kALbanana_2d} -#define givebell_2d {kVGive_2d, kRbell_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALgivebel_2d} +#define climbdumb_2d {kVClimb_2d, 0, 0, 0, 0, 0, 0, kALdumb_2d} +#define climbrope_2d {kVClimb_2d, 0, 0, DONT_CARE, 0, 0, 0, kALclimbrope_2d} +#define climbwell_2d {kVClimb_2d, 0, 0, DONT_CARE, 0, 0, 0, kALclimbwell_2d} +#define closedoor1_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, 0, 0} +#define closedoor2_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, 0, 0} +#define closedoor3_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, 0, 0} +#define closesafe_2d {kVClose_2d, 0, 0, 1, 0, kDTsclose_2d, kDTokgen_2d, 0} +#define dialphone_2d {kVDial_2d, 0, 0, 1, 1, kDTsdialed_2d, 0, kALphone_2d} +#define dropdynamite_2d {kVDrop_2d, kRdyn_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALdropdynamite_2d} +#define eatbanana_2d {kVEat_2d, kRbanana_2d, kDTnocgen_2d, 0, 0, 0, 0, kALeatbanana_2d} +#define eatgarlic_2d {kVEat_2d, kRgarlic_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALgarlic_2d} +#define firegun_2d {kVFire_2d, kRgun_2d, kDTnogun_2d, 0, 1, kDTsempty_2d, 0, kALgun_2d} +#define getballoon_2d {kVTake_2d, 0, 0, 0, 0, 0, 0, kALballoon_2d} +#define getbook_2d {kVTake_2d, 0, 0, DONT_CARE, 0, 0, 0, kALgetbook_2d} +#define getdynamite_2d {kVTake_2d, 0, 0, DONT_CARE, 0, 0, 0, kALgetdynamite_2d} +#define getletter_2d {kVTake_2d, 0, 0, DONT_CARE, 0, kDTsgetlet_2d, 0, 0} +#define givebanana_2d {kVGive_2d, kRbanana_2d, kDTnocgen_2d, 0, 0, 0, 0, kALbanana_2d} +#define givebell_2d {kVGive_2d, kRbell_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALgivebel_2d} #define givecatnip_2d {kVGive_2d, kRcatnip_2d, kDTnocgen_2d, 0, 0, kDTnopurps_2d, kDTscatnip_2d, 0} -#define intodumb_2d {kVInto_2d, 0, 0, 0, 0, 0, 0, kALdumb_2d} -#define knock_2d {kVKnock_2d, 0, 0, DONT_CARE, 0, 0, kDTtnoknock_2d, 0} -#define lightdynamite_2d {kVStrike_2d, kRmatch_2d, kDTnomatch_2d, DONT_CARE, 0, 0, 0, kALlightdynamite_2d} -#define lookcubp_2d {kVLook_2d, 0, 0, DONT_CARE, 0, 0, 0, kALphoto_2d} -#define lookgarlic_2d {kVLook_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindclove_2d, kALgetgarlic_2d} -#define lookhole_2d {kVLook_2d, 0, 0, 0, 0, kDTdarkhole_2d, 0, kALkeyhole_2d} -#define lookkennel_2d {kVLook_2d, 0, 0, 0, 0, 0, 0, kALlookkennel_2d} -#define lookmat_2d {kVLook_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindmatch_2d, kALgetmatch_2d} -#define lookmatch_2d {kVLook_2d, 0, 0, DONT_CARE, 0, 0, 0, kALlookmatch_2d} -#define opencubp_2d {kVOpen_2d, 0, 0, DONT_CARE, 0, 0, 0, kALphoto_2d} -#define opendoor1_2d {kVOpen_2d, 0, 0, 0, 1, kDTsopen1_2d, 0, kALopendoor1_2d} -#define opendoor2_2d {kVOpen_2d, 0, 0, 0, 1, kDTsopen1_2d, 0, kALopendoor2_2d} -#define opendoor3_2d {kVOpen_2d, 0, 0, 0, 1, kDTsopen1_2d, 0, kALopendoor3_2d} -#define opengarlic_2d {kVOpen_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindclove_2d, kALgetgarlic_2d} -#define openkdoor_2d {kVOpen_2d, 0, 0, 0, 0, 0, kDTwontopen_2d, 0} -#define openlamp_2d {kVOpen_2d, kRlamp_2d, kDTnocgen_2d, DONT_CARE, 0, 0, kDTempty_2d, 0} -#define openmat_2d {kVOpen_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindmatch_2d, kALgetmatch_2d} -#define openpdoor_2d {kVOpen_2d, 0, 0, 0, 0, 0, kDTspdoor_2d, 0} -#define opensafe_2d {kVOpen_2d, 0, 0, DONT_CARE, 0, 0, 0, kALsafe_2d} -#define popballoon_2d {kVBreak_2d, 0, 0, 0, 0, 0, 0, kALballoon_2d} -#define pushblue_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALworkgates_2d} -#define pushbutton_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, kDTtnopushbutton_2d, 0} -#define pushgreen_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALbugzapper_2d} -#define pushpaper_2d {kVPush_2d, kRpaper_2d, kDTnocgen_2d, 0, 1, 0, kDTokgen_2d, kALpushpaper_2d} -#define pushpencil_2d {kVPush_2d, kRpencil_2d, kDTnocgen_2d, 0, 0, 0, 0, kALpushpencil_2d} -#define pushred_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALshedlight_2d} -#define pushyellow_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALgatelight_2d} -#define readletter_2d {kVRead_2d, 0, 0, 3, 3, kDTsnoread_2d, kDTsread_2d, kALreadlet_2d} -#define readwill_2d {kVRead_2d, kRwill_2d, kDTnocgen_2d, 1, 1, 0, 0, kALwill_2d} -#define ringbell_2d {kVRing_2d, kRbell_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALbell_2d} -#define rubcatnip_2d {kVRub_2d, kRcatnip_2d, kDTnocgen_2d, 0, 0, kDTnopurps_2d, 0, kALcatnip_2d} -#define rublamp_2d {kVRub_2d, kRlamp_2d, kDTnocgen_2d, 0, 0, kDTnopurps_2d, 0, kALlamp_2d} -#define serum_2d {kVDrink_2d, kRserum_2d, kDTnocgen_2d, 0, 1, kDTsnosee_2d, 0, kALbottle_2d} -#define strikematch_2d {kVStrike_2d, kRmatch_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALstrikematch_2d} -#define talkharry_2d {kVTalk_2d, 0, 0, 0, 1, kDTsharry_2d, 0, kALharry_2d} -#define throwstick_2d {kVThrow_2d, kRstick_2d, kDTnocgen_2d, 0, 1, 0, 0, kALthrowstick_2d} -#define unlock_2d {kVUnlock_2d, 0, 0, DONT_CARE, 0, 0, kDTtnounlock_2d, 0} +#define intodumb_2d {kVInto_2d, 0, 0, 0, 0, 0, 0, kALdumb_2d} +#define knock_2d {kVKnock_2d, 0, 0, DONT_CARE, 0, 0, kDTtnoknock_2d, 0} +#define lightdynamite_2d {kVStrike_2d, kRmatch_2d, kDTnomatch_2d, DONT_CARE, 0, 0, 0, kALlightdynamite_2d} +#define lookcubp_2d {kVLook_2d, 0, 0, DONT_CARE, 0, 0, 0, kALphoto_2d} +#define lookgarlic_2d {kVLook_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindclove_2d, kALgetgarlic_2d} +#define lookhole_2d {kVLook_2d, 0, 0, 0, 0, kDTdarkhole_2d, 0, kALkeyhole_2d} +#define lookkennel_2d {kVLook_2d, 0, 0, 0, 0, 0, 0, kALlookkennel_2d} +#define lookmat_2d {kVLook_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindmatch_2d, kALgetmatch_2d} +#define lookmatch_2d {kVLook_2d, 0, 0, DONT_CARE, 0, 0, 0, kALlookmatch_2d} +#define opencubp_2d {kVOpen_2d, 0, 0, DONT_CARE, 0, 0, 0, kALphoto_2d} +#define opendoor1_2d {kVOpen_2d, 0, 0, 0, 1, kDTsopen1_2d, 0, kALopendoor1_2d} +#define opendoor2_2d {kVOpen_2d, 0, 0, 0, 1, kDTsopen1_2d, 0, kALopendoor2_2d} +#define opendoor3_2d {kVOpen_2d, 0, 0, 0, 1, kDTsopen1_2d, 0, kALopendoor3_2d} +#define opengarlic_2d {kVOpen_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindclove_2d, kALgetgarlic_2d} +#define openkdoor_2d {kVOpen_2d, 0, 0, 0, 0, 0, kDTwontopen_2d, 0} +#define openlamp_2d {kVOpen_2d, kRlamp_2d, kDTnocgen_2d, DONT_CARE, 0, 0, kDTempty_2d, 0} +#define openmat_2d {kVOpen_2d, 0, 0, 0, 1, kDTempty_2d, kDTfindmatch_2d, kALgetmatch_2d} +#define openpdoor_2d {kVOpen_2d, 0, 0, 0, 0, 0, kDTspdoor_2d, 0} +#define opensafe_2d {kVOpen_2d, 0, 0, DONT_CARE, 0, 0, 0, kALsafe_2d} +#define popballoon_2d {kVBreak_2d, 0, 0, 0, 0, 0, 0, kALballoon_2d} +#define pushblue_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALworkgates_2d} +#define pushbutton_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, kDTtnopushbutton_2d, 0} +#define pushgreen_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALbugzapper_2d} +#define pushpaper_2d {kVPush_2d, kRpaper_2d, kDTnocgen_2d, 0, 1, 0, kDTokgen_2d, kALpushpaper_2d} +#define pushpencil_2d {kVPush_2d, kRpencil_2d, kDTnocgen_2d, 0, 0, 0, 0, kALpushpencil_2d} +#define pushred_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALshedlight_2d} +#define pushyellow_2d {kVPush_2d, 0, 0, DONT_CARE, 0, 0, 0, kALgatelight_2d} +#define readletter_2d {kVRead_2d, 0, 0, 3, 3, kDTsnoread_2d, kDTsread_2d, kALreadlet_2d} +#define readwill_2d {kVRead_2d, kRwill_2d, kDTnocgen_2d, 1, 1, 0, 0, kALwill_2d} +#define ringbell_2d {kVRing_2d, kRbell_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALbell_2d} +#define rubcatnip_2d {kVRub_2d, kRcatnip_2d, kDTnocgen_2d, 0, 0, kDTnopurps_2d, 0, kALcatnip_2d} +#define rublamp_2d {kVRub_2d, kRlamp_2d, kDTnocgen_2d, 0, 0, kDTnopurps_2d, 0, kALlamp_2d} +#define serum_2d {kVDrink_2d, kRserum_2d, kDTnocgen_2d, 0, 1, kDTsnosee_2d, 0, kALbottle_2d} +#define strikematch_2d {kVStrike_2d, kRmatch_2d, kDTnocgen_2d, DONT_CARE, 0, 0, 0, kALstrikematch_2d} +#define talkharry_2d {kVTalk_2d, 0, 0, 0, 1, kDTsharry_2d, 0, kALharry_2d} +#define throwstick_2d {kVThrow_2d, kRstick_2d, kDTnocgen_2d, 0, 1, 0, 0, kALthrowstick_2d} +#define unlock_2d {kVUnlock_2d, 0, 0, DONT_CARE, 0, 0, kDTtnounlock_2d, 0} cmd balloon_2d[] = {popballoon_2d, getballoon_2d, emptyCmd}; cmd banana_2d[] = {givebanana_2d, eatbanana_2d, emptyCmd}; @@ -4792,49 +4792,49 @@ const cmd *cmdList_2d[] = { well_2d, will_2d, yellow_2d }; -#define bell_3d {kVRing_3d, kRbell_3d, kDTnocgen_3d, DONT_CARE, 0, 0, kDTokbell_3d, 0} -#define blow_3d {kVBlow_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdart_3d} -#define book_3d {kVRead_3d, kRbook_3d, kDTnocgen_3d, DONT_CARE, 0, 0, 0, kALreadbook_3d} -#define cage1_3d {kVOpen_3d, 0, 0, DONT_CARE, 0, 0, 0, kALopencage_3d} -#define cage2_3d {kVClose_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, 0} -#define cage3_3d {kVTake_3d, 0, 0, DONT_CARE, 0, 0, 0, kALtakecage_3d} -#define candle1_3d {kVDouse_3d, 0, 0, 1, 0, kDTsunlit_3d, kDTokgen_3d, 0} -#define candle2_3d {kVStrike_3d, 0, 0, 0, 1, kDTslit_3d, kDTokgen_3d, 0} -#define cdoor1_3d {kVOpen_3d, 0, 0, 0, 0, kDTsopen1_3d, 0, kALopendoor_3d} -#define cdoor2_3d {kVClose_3d, 0, 0, 1, 0, kDTsclose_3d, kDTokgen_3d, kALclosedoor_3d} -#define cexit1_3d {kVOutof_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALexit_3d} -#define cexit2_3d {kVClimb_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALexit_3d} -#define cflask1_3d {kVFill_3d, 0, 0, 0, 1, kDTsfull_3d, 0, kALfill_3d} -#define cflask2_3d {kVPut_3d, 0, 0, 0, 1, kDTsfull_3d, 0, kALfill_3d} -#define cflask3_3d {kVEmpty_3d, 0, 0, DONT_CARE, 0, 0, 0, kALempty_3d} -#define cflask4_3d {kVDrink_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdrink_3d} -#define cflask5_3d {kVGive_3d, 0, 0, DONT_CARE, 0, 0, 0, kALflask_3d} -#define cheese1_3d {kVEat_3d, kRcheese_3d, kDTnocgen_3d, 0, 0, 0, 0, kALeatcheese_3d} -#define cheese2_3d {kVDrop_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdropcheese_3d} -#define cheese3_3d {kVPut_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdropcheese_3d} -#define cheese4_3d {kVTake_3d, 0, 0, DONT_CARE, 0, 0, 0, kALtakecheese_3d} -#define cmake1_3d {kVMake_3d, 0, 0, 0, 0, kDTsmade_3d, 0, kALmakeclay_3d} -#define cmake2_3d {kVStick_3d, kRpins_3d, kDTnopins_3d, DONT_CARE, 0, 0, 0, kALstick_3d} -#define cplane1_3d {kVClimb_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALplane_3d} -#define cplane2_3d {kVInto_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALplane_3d} -#define cplane3_3d {kVSearch_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALplane_3d} -#define crystal_3d {kVRub_3d, kRcrystal_3d, kDTnocgen_3d, DONT_CARE, 0, 0, 0, kALcrystal_3d} -#define cstick1_3d {kVStick_3d, 0, 0, 0, 0, 0, 0, kALstick_3d} -#define cswing1_3d {kVSwing_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALswing_3d} -#define ctalknat_3d {kVTalk_3d, 0, 0, DONT_CARE, 0, 0, 0, kALtalknat_3d} -#define cube1_3d {kVGive_3d, 0, 0, DONT_CARE, 0, 0, 0, kALgiveb_3d} -#define cvine1_3d {kVUntie_3d, 0, 0, 0, 0, 0, 0, kALuntie_vine_3d} -#define cvine2_3d {kVTie_3d, 0, 0, 0, 0, 0, 0, kALvine_3d} -#define cwaterfall_3d {kVLook_3d, 0, 0, DONT_CARE, 0, 0, 0, kALlookwfall_3d} -#define cwaterpool_3d {kVLook_3d, 0, 0, DONT_CARE, 0, 0, kDTdull_3d, 0} -#define cwaterstream_3d {kVLook_3d, 0, 0, DONT_CARE, 0, 0, kDTdull_3d, 0} -#define dart_3d {kVShoot_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdart_3d} -#define ghost_3d {kVExorcise_3d, kRexor_3d, kDTnocex_3d, DONT_CARE, 0, 0, 0, kALexorcise_3d} -#define knock_3d {kVKnock_3d, 0, 0, DONT_CARE, 0, 0, kDTsNobody_3d, 0} -#define readit_3d {kVRead_3d, 0, 0, DONT_CARE, 0, 0, kDTsread_3d, 0} -#define rock1_3d {kVBehind_3d, 0, 0, 0, 1, kDTsfoundc_3d, kDTsfindc_3d, kALfindcrystal_3d} -#define swingc_3d {kVSwing_3d, 0, 0, DONT_CARE, 0, 0, kDTswingcave_3d, 0} -#define unlock_3d {kVUnlock_3d, 0, 0, DONT_CARE, 0, 0, kDTsUnlocked_3d, 0} +#define bell_3d {kVRing_3d, kRbell_3d, kDTnocgen_3d, DONT_CARE, 0, 0, kDTokbell_3d, 0} +#define blow_3d {kVBlow_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdart_3d} +#define book_3d {kVRead_3d, kRbook_3d, kDTnocgen_3d, DONT_CARE, 0, 0, 0, kALreadbook_3d} +#define cage1_3d {kVOpen_3d, 0, 0, DONT_CARE, 0, 0, 0, kALopencage_3d} +#define cage2_3d {kVClose_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, 0} +#define cage3_3d {kVTake_3d, 0, 0, DONT_CARE, 0, 0, 0, kALtakecage_3d} +#define candle1_3d {kVDouse_3d, 0, 0, 1, 0, kDTsunlit_3d, kDTokgen_3d, 0} +#define candle2_3d {kVStrike_3d, 0, 0, 0, 1, kDTslit_3d, kDTokgen_3d, 0} +#define cdoor1_3d {kVOpen_3d, 0, 0, 0, 0, kDTsopen1_3d, 0, kALopendoor_3d} +#define cdoor2_3d {kVClose_3d, 0, 0, 1, 0, kDTsclose_3d, kDTokgen_3d, kALclosedoor_3d} +#define cexit1_3d {kVOutof_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALexit_3d} +#define cexit2_3d {kVClimb_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALexit_3d} +#define cflask1_3d {kVFill_3d, 0, 0, 0, 1, kDTsfull_3d, 0, kALfill_3d} +#define cflask2_3d {kVPut_3d, 0, 0, 0, 1, kDTsfull_3d, 0, kALfill_3d} +#define cflask3_3d {kVEmpty_3d, 0, 0, DONT_CARE, 0, 0, 0, kALempty_3d} +#define cflask4_3d {kVDrink_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdrink_3d} +#define cflask5_3d {kVGive_3d, 0, 0, DONT_CARE, 0, 0, 0, kALflask_3d} +#define cheese1_3d {kVEat_3d, kRcheese_3d, kDTnocgen_3d, 0, 0, 0, 0, kALeatcheese_3d} +#define cheese2_3d {kVDrop_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdropcheese_3d} +#define cheese3_3d {kVPut_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdropcheese_3d} +#define cheese4_3d {kVTake_3d, 0, 0, DONT_CARE, 0, 0, 0, kALtakecheese_3d} +#define cmake1_3d {kVMake_3d, 0, 0, 0, 0, kDTsmade_3d, 0, kALmakeclay_3d} +#define cmake2_3d {kVStick_3d, kRpins_3d, kDTnopins_3d, DONT_CARE, 0, 0, 0, kALstick_3d} +#define cplane1_3d {kVClimb_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALplane_3d} +#define cplane2_3d {kVInto_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALplane_3d} +#define cplane3_3d {kVSearch_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALplane_3d} +#define crystal_3d {kVRub_3d, kRcrystal_3d, kDTnocgen_3d, DONT_CARE, 0, 0, 0, kALcrystal_3d} +#define cstick1_3d {kVStick_3d, 0, 0, 0, 0, 0, 0, kALstick_3d} +#define cswing1_3d {kVSwing_3d, 0, 0, DONT_CARE, 0, 0, kDTokgen_3d, kALswing_3d} +#define ctalknat_3d {kVTalk_3d, 0, 0, DONT_CARE, 0, 0, 0, kALtalknat_3d} +#define cube1_3d {kVGive_3d, 0, 0, DONT_CARE, 0, 0, 0, kALgiveb_3d} +#define cvine1_3d {kVUntie_3d, 0, 0, 0, 0, 0, 0, kALuntie_vine_3d} +#define cvine2_3d {kVTie_3d, 0, 0, 0, 0, 0, 0, kALvine_3d} +#define cwaterfall_3d {kVLook_3d, 0, 0, DONT_CARE, 0, 0, 0, kALlookwfall_3d} +#define cwaterpool_3d {kVLook_3d, 0, 0, DONT_CARE, 0, 0, kDTdull_3d, 0} +#define cwaterstream_3d {kVLook_3d, 0, 0, DONT_CARE, 0, 0, kDTdull_3d, 0} +#define dart_3d {kVShoot_3d, 0, 0, DONT_CARE, 0, 0, 0, kALdart_3d} +#define ghost_3d {kVExorcise_3d, kRexor_3d, kDTnocex_3d, DONT_CARE, 0, 0, 0, kALexorcise_3d} +#define knock_3d {kVKnock_3d, 0, 0, DONT_CARE, 0, 0, kDTsNobody_3d, 0} +#define readit_3d {kVRead_3d, 0, 0, DONT_CARE, 0, 0, kDTsread_3d, 0} +#define rock1_3d {kVBehind_3d, 0, 0, 0, 1, kDTsfoundc_3d, kDTsfindc_3d, kALfindcrystal_3d} +#define swingc_3d {kVSwing_3d, 0, 0, DONT_CARE, 0, 0, kDTswingcave_3d, 0} +#define unlock_3d {kVUnlock_3d, 0, 0, DONT_CARE, 0, 0, kDTsUnlocked_3d, 0} cmd cbell_3d[] = {bell_3d, emptyCmd}; cmd cbook_3d[] = {book_3d, emptyCmd}; @@ -5049,108 +5049,108 @@ const uint16 *screenActs_3d[] = { object_t objects_1w[] = { //name, description, description_s,path, dx, dy, aptr, seq,seqp, cyc, n,frm,rad,scr,x,y , oldxy,vxy,val,g,cmnd, c, s,ctx,fgb -{kNHero_1w, kDTthero_1w, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 229, 144, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHero_1w, kDTthero_1w, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 229, 144, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 0: (Outside house) -{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, INVISIBLE, 1, 4, 4, 16, 0, 26, 131, 90, 90, 0, 0, 0, 1, kCMDdoor1_1w, 0, 0, 0, FLOATING, 29, 175, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 80, 148, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 72, 175, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 59, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 72, 175, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 95, 55, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNPkin_1w, kDTtpkin_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 10, 0, 20, 168, 90, 90, 0, 0, 2, 7, kCMDpkin_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNKey_1w, kDTtkey_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 5, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFence_1w, 0, 0, AUTO, 193, 37, 0, THING0, INVISIBLE, 0, 0, 0, 30, 0, 69, 161, 127, 145, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 225, 183, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNTree_1w, 0, 0, AUTO, 25, 52, 0, THING0, INVISIBLE, 0, 0, 0, 30, 0, 69, 161, 186, 93, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 190, 183, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, INVISIBLE, 1, 4, 4, 16, 0, 26, 131, 90, 90, 0, 0, 0, 1, kCMDdoor1_1w, 0, 0, 0, FLOATING, 29, 175, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 80, 148, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 72, 175, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 59, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 72, 175, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 95, 55, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNPkin_1w, kDTtpkin_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 10, 0, 20, 168, 90, 90, 0, 0, 2, 7, kCMDpkin_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNKey_1w, kDTtkey_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 5, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFence_1w, 0, 0, AUTO, 193, 37, 0, THING0, INVISIBLE, 0, 0, 0, 30, 0, 69, 161, 127, 145, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 225, 183, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNTree_1w, 0, 0, AUTO, 25, 52, 0, THING0, INVISIBLE, 0, 0, 0, 30, 0, 69, 161, 186, 93, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 190, 183, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 1: (Hall) -{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 125, 56, 90, 90, 0, 0, 0, 1, kCMDdoor2_1w, 0, 0, 0, FLOATING, 127, 98, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 208, 56, 90, 90, 0, 0, 0, 1, kCMDdoor3_1w, 0, 0, 0, FLOATING, 210, 98, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 23, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 48, 98, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 7, 93, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 32, 140, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNBatpic_1w, 0, 0, AUTO, 46, 30, 0, THING0, INVISIBLE, 0, 0, 0, 30, 1, 69, 161, 113, 108, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 110, 160, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNCandle_1w, kDTtcandle_1w, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 30, 1, 176, 131, 90, 90, 0, 0, 3, 7, 0, 0, 0, 0, FLOATING, 164, 165, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNCupb_1w, 0, 0, AUTO, 9, 25, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 67, 140, 0, 0, 0, 1, kCMDcupb_1w, 0, 0, 1, FLOATING, 81, 168, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNKnife_1w, kDTtknife_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, 1, 69, 169, 90, 90, 0, 0, 6, 7, kCMDknife_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWhistle_1w, kDTtwhistle_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, 1, 79, 171, 90, 90, 0, 0, 6, 7, kCMDwhistle_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 125, 56, 90, 90, 0, 0, 0, 1, kCMDdoor2_1w, 0, 0, 0, FLOATING, 127, 98, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 208, 56, 90, 90, 0, 0, 0, 1, kCMDdoor3_1w, 0, 0, 0, FLOATING, 210, 98, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 23, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 48, 98, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNEyes_1w, kDTteyes_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 7, 93, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, 32, 140, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNBatpic_1w, 0, 0, AUTO, 46, 30, 0, THING0, INVISIBLE, 0, 0, 0, 30, 1, 69, 161, 113, 108, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 110, 160, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNCandle_1w, kDTtcandle_1w, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 30, 1, 176, 131, 90, 90, 0, 0, 3, 7, 0, 0, 0, 0, FLOATING, 164, 165, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNCupb_1w, 0, 0, AUTO, 9, 25, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 67, 140, 0, 0, 0, 1, kCMDcupb_1w, 0, 0, 1, FLOATING, 81, 168, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNKnife_1w, kDTtknife_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, 1, 69, 169, 90, 90, 0, 0, 6, 7, kCMDknife_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWhistle_1w, kDTtwhistle_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, 1, 79, 171, 90, 90, 0, 0, 6, 7, kCMDwhistle_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 2: (Bedroom 1) -{kNWard_1w, kDTtward_1w, 0, AUTO, 46, 51, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 150, 58, 0, 0, 0, 1, kCMDward_1w, 0, 0, 0, FLOATING, 168, 117, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNWdoorl_1w, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 150, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWdoorr_1w, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 174, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMask_1w, kDTtmask_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 2, 155, 100, 90, 90, 0, 0, 4, 7, kCMDmask_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMonkey_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 2, 229, 144, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWindow_1w, 0, 0, AUTO, 29, 22, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 117, 57, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 136, 116, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBed_1w, 0, 0, AUTO, 60, 36, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 78, 92, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 127, 130, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNWard_1w, kDTtward_1w, 0, AUTO, 46, 51, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 150, 58, 0, 0, 0, 1, kCMDward_1w, 0, 0, 0, FLOATING, 168, 117, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNWdoorl_1w, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 150, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWdoorr_1w, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 174, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMask_1w, kDTtmask_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 2, 155, 100, 90, 90, 0, 0, 4, 7, kCMDmask_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMonkey_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 2, 229, 144, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWindow_1w, 0, 0, AUTO, 29, 22, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 117, 57, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 136, 116, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBed_1w, 0, 0, AUTO, 60, 36, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 78, 92, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 127, 130, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // Screen 3: (Dining room) -{kNButler_1w, kDTtbutler_1w, 0, AUTO, 0, 0, kALbutler_1w, PERSON, NOT_CYCLING, 0, 0, 0, 20, 3, 70, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNChop_1w, kDTtchop_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 20, 3, 69, 161, 90, 90, 0, 0, 0, 7, kCMDchop_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNRedeyes_1w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, 3, 212, 108, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNLips_1w, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 1, 1, 0, 3, 113, 105, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNArm_1w, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 5, 5, 0, 3, 166, 122, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNHdlshero_1w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPicture_1w, 0, 0, AUTO, 74, 41, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 122, 52, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 169, 120, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNWindow_1w, 0, 0, AUTO, 41, 50, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 265, 64, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 269, 139, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNCupb_1w, 0, 0, AUTO, 44, 29, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 65, 69, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 78, 124, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNFrank_1w, kDTtfrank_1w, 0, AUTO, 23, 28, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 90, 110, 104, 97, 0, 0, 0, 1, kCMDfrank_1w, 0, 0, 0, FLOATING, 90, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNDracula_1w, kDTtdrac_1w, 0, AUTO, 28, 18, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 130, 110, 135, 107, 0, 0, 0, 1, kCMDdrac_1w, 0, 0, 0, FLOATING, 130, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNGwen_1w, kDTtlady_1w, 0, AUTO, 17, 23, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 160, 110, 174, 97, 0, 0, 0, 1, kCMDgwen_1w, 0, 0, 0, FLOATING, 162, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNHood_1w, kDTthood_1w, 0, AUTO, 35, 26, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 195, 110, 205, 101, 0, 0, 0, 1, kCMDhood_1w, 0, 0, 0, FLOATING, 195, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNSlime_1w, kDTtslime_1w, 0, AUTO, 21, 24, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 75, 140, 88, 113, 0, 0, 0, 1, kCMDslime_1w, 0, 0, 0, FLOATING, 74, 160, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNPeahead_1w, kDTtpeahd_1w, 0, AUTO, 20, 15, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 164, 140, 172, 121, 0, 0, 0, 1, kCMDpeahd_1w, 0, 0, 0, FLOATING, 152, 162, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNFood_1w, 0, 0, AUTO, 19, 10, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 130, 140, 149, 127, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 138, 162, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNPlant_1w, 0, 0, AUTO, 11, 21, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 239, 74, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 230, 125, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNButler_1w, kDTtbutler_1w, 0, AUTO, 0, 0, kALbutler_1w, PERSON, NOT_CYCLING, 0, 0, 0, 20, 3, 70, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNChop_1w, kDTtchop_1w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 20, 3, 69, 161, 90, 90, 0, 0, 0, 7, kCMDchop_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRedeyes_1w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, 3, 212, 108, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNLips_1w, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 1, 1, 0, 3, 113, 105, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNArm_1w, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 5, 5, 0, 3, 166, 122, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHdlshero_1w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPicture_1w, 0, 0, AUTO, 74, 41, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 122, 52, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 169, 120, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNWindow_1w, 0, 0, AUTO, 41, 50, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 265, 64, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 269, 139, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNCupb_1w, 0, 0, AUTO, 44, 29, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 65, 69, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 78, 124, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNFrank_1w, kDTtfrank_1w, 0, AUTO, 23, 28, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 90, 110, 104, 97, 0, 0, 0, 1, kCMDfrank_1w, 0, 0, 0, FLOATING, 90, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNDracula_1w, kDTtdrac_1w, 0, AUTO, 28, 18, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 130, 110, 135, 107, 0, 0, 0, 1, kCMDdrac_1w, 0, 0, 0, FLOATING, 130, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNGwen_1w, kDTtlady_1w, 0, AUTO, 17, 23, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 160, 110, 174, 97, 0, 0, 0, 1, kCMDgwen_1w, 0, 0, 0, FLOATING, 162, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNHood_1w, kDTthood_1w, 0, AUTO, 35, 26, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 195, 110, 205, 101, 0, 0, 0, 1, kCMDhood_1w, 0, 0, 0, FLOATING, 195, 134, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNSlime_1w, kDTtslime_1w, 0, AUTO, 21, 24, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 75, 140, 88, 113, 0, 0, 0, 1, kCMDslime_1w, 0, 0, 0, FLOATING, 74, 160, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNPeahead_1w, kDTtpeahd_1w, 0, AUTO, 20, 15, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 164, 140, 172, 121, 0, 0, 0, 1, kCMDpeahd_1w, 0, 0, 0, FLOATING, 152, 162, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNFood_1w, 0, 0, AUTO, 19, 10, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 130, 140, 149, 127, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 138, 162, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPlant_1w, 0, 0, AUTO, 11, 21, 0, THING0, INVISIBLE, 1, 4, 4, 30, 3, 172, 113, 239, 74, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 230, 125, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Screen 4: (bathroom) -{kNWindow_1w, 0, 0, AUTO, 31, 27, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 153, 61, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 157, 114, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNToilet_1w, 0, 0, AUTO, 32, 17, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 101, 113, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 122, 122, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNBath_1w, 0, 0, AUTO, 47, 36, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 73, 125, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 119, 156, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNMirror_1w, 0, 0, AUTO, 12, 24, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 207, 71, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 180, 127, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNWindow_1w, 0, 0, AUTO, 31, 27, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 153, 61, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 157, 114, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNToilet_1w, 0, 0, AUTO, 32, 17, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 101, 113, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 122, 122, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNBath_1w, 0, 0, AUTO, 47, 36, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 73, 125, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 119, 156, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNMirror_1w, 0, 0, AUTO, 12, 24, 0, THING0, INVISIBLE, 1, 4, 4, 30, 4, 172, 113, 207, 71, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 180, 127, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Screen 5: (kitchen) -{kNWindow_1w, 0, 0, AUTO, 66, 35, 0, THING0, INVISIBLE, 1, 4, 4, 30, 5, 172, 113, 107, 76, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 124, 143, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBroom_1w, 0, 0, AUTO, 19, 51, 0, THING0, INVISIBLE, 1, 4, 4, 30, 5, 172, 113, 280, 114, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 276, 166, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNCupb_1w, 0, 0, AUTO, 159, 29, 0, THING0, INVISIBLE, 1, 4, 4, 30, 5, 172, 113, 50, 112, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 0, 0, 0, 0, 0, 0, 0}, +{kNWindow_1w, 0, 0, AUTO, 66, 35, 0, THING0, INVISIBLE, 1, 4, 4, 30, 5, 172, 113, 107, 76, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 124, 143, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBroom_1w, 0, 0, AUTO, 19, 51, 0, THING0, INVISIBLE, 1, 4, 4, 30, 5, 172, 113, 280, 114, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 276, 166, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNCupb_1w, 0, 0, AUTO, 159, 29, 0, THING0, INVISIBLE, 1, 4, 4, 30, 5, 172, 113, 50, 112, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 0, 0, 0, 0, 0, 0, 0}, // Screen 6: (Garden) -{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 6, 226, 58, 90, 90, 0, 0, 0, 1, kCMDdoor4_1w, 0, 0, 0, FLOATING, 224, 104, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNShed_1w, 0, 0, AUTO, 106, 60, 0, THING0, INVISIBLE, 0, 0, 0, 60, 6, 277, 39, 214, 37, 0, 0, 0, 1, kCMDshed_1w, 0, 0, 1, FLOATING, 213, 103, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNOilcan_1w, kDTtoilcan_1w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 40, 6, 240, 65, 90, 90, 0, 0, 4, 1, kCMDoilcan_1w, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNTree_1w, 0, 0, AUTO, 30, 120, 0, THING0, INVISIBLE, 1, 4, 4, 30, 6, 172, 113, 161, 17, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 163, 148, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNShed_1w, 0, 0, AUTO, 25, 40, 0, THING0, INVISIBLE, 1, 4, 4, 30, 6, 172, 113, 226, 58, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 285, 99, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNDoor_1w, kDTtdoor_1w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 6, 226, 58, 90, 90, 0, 0, 0, 1, kCMDdoor4_1w, 0, 0, 0, FLOATING, 224, 104, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNShed_1w, 0, 0, AUTO, 106, 60, 0, THING0, INVISIBLE, 0, 0, 0, 60, 6, 277, 39, 214, 37, 0, 0, 0, 1, kCMDshed_1w, 0, 0, 1, FLOATING, 213, 103, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNOilcan_1w, kDTtoilcan_1w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 40, 6, 240, 65, 90, 90, 0, 0, 4, 1, kCMDoilcan_1w, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNTree_1w, 0, 0, AUTO, 30, 120, 0, THING0, INVISIBLE, 1, 4, 4, 30, 6, 172, 113, 161, 17, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 163, 148, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNShed_1w, 0, 0, AUTO, 25, 40, 0, THING0, INVISIBLE, 1, 4, 4, 30, 6, 172, 113, 226, 58, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 285, 99, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Screen 7: (Store room) -{kNDog_1w, kDTtdog_1w, 0, AUTO, 0, 0, kALdoggy_1w, ANIMAL, NOT_CYCLING, 0, 0, 0, -1, 7, 105, 119, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCarpet_1w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 7, 191, 142, 90, 90, 0, 0, 0, 0, kCMDcarpet_1w, 0, 0, 0, BACKGROUND, 234, 153, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNTrap_1w, kDTttrap_1w, 0, AUTO, 0, 0, 0, THING4, INVISIBLE, 0, 2, 2, 20, 7, 216, 140, 90, 90, 0, 0, 0, 1, kCMDtrap_1w, 0, 0, 0, BACKGROUND, 240, 152, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNBolt_1w, kDTtbolt_1w, 0, AUTO, 7, 5, 0, THING0, INVISIBLE, 0, 0, 0, 20, 7, 220, 145, 237, 151, 0, 0, 0, 1, kCMDbolt_1w, 0, 0, 0, BACKGROUND, 240, 152, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNHerodead_1w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMousehole_1w, 0, 0, AUTO, 7, 8, 0, THING0, INVISIBLE, 1, 4, 4, 30, 7, 172, 113, 52, 148, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 65, 158, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNDog_1w, kDTtdog_1w, 0, AUTO, 0, 0, kALdoggy_1w, ANIMAL, NOT_CYCLING, 0, 0, 0, -1, 7, 105, 119, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCarpet_1w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 7, 191, 142, 90, 90, 0, 0, 0, 0, kCMDcarpet_1w, 0, 0, 0, BACKGROUND, 234, 153, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNTrap_1w, kDTttrap_1w, 0, AUTO, 0, 0, 0, THING4, INVISIBLE, 0, 2, 2, 20, 7, 216, 140, 90, 90, 0, 0, 0, 1, kCMDtrap_1w, 0, 0, 0, BACKGROUND, 240, 152, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNBolt_1w, kDTtbolt_1w, 0, AUTO, 7, 5, 0, THING0, INVISIBLE, 0, 0, 0, 20, 7, 220, 145, 237, 151, 0, 0, 0, 1, kCMDbolt_1w, 0, 0, 0, BACKGROUND, 240, 152, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNHerodead_1w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMousehole_1w, 0, 0, AUTO, 7, 8, 0, THING0, INVISIBLE, 1, 4, 4, 30, 7, 172, 113, 52, 148, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 65, 158, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // Screen 8: (Basement) -{kNRock_1w, 0, 0, AUTO, 66, 53, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 132, 88, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 123, 149, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNRock_1w, 0, 0, AUTO, 56, 60, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 257, 125, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 270, 187, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNRock_1w, 0, 0, AUTO, 25, 91, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 0, 102, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 20, 187, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNDoor_1w, 0, 0, AUTO, 30, 57, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 207, 84, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 210, 142, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNRock_1w, 0, 0, AUTO, 66, 53, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 132, 88, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 123, 149, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNRock_1w, 0, 0, AUTO, 56, 60, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 257, 125, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 270, 187, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNRock_1w, 0, 0, AUTO, 25, 91, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 0, 102, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 20, 187, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNDoor_1w, 0, 0, AUTO, 30, 57, 0, THING0, INVISIBLE, 1, 4, 4, 30, 8, 172, 113, 207, 84, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 210, 142, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 9: (Batcave) -{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 65, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 130, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 65, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1w, kDTtbat_1w, 0, AUTO, 0, 0, kALbats_1w, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 130, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 10: (Mummy room) -{kNMummy_1w, 0, 0, AUTO, 0, 0, kALmummy_1w, PERSON, NOT_CYCLING, 0, 0, 0, DX, 10, 256, 77, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMdoor, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 10, 258, 55, 90, 90, 0, 0, 0, 1, kCMDdoor4_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGold_1w, kDTtgold_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 208, 152, 90, 90, 0, 0, 10, 7, kCMDgold_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNRock_1w, 0, 0, AUTO, 54, 34, 0, THING0, INVISIBLE, 1, 4, 4, -1, 10, 172, 113, 127, 109, 0, 0, 0, 1, kCMDrock_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMummy_1w, 0, 0, AUTO, 0, 0, kALmummy_1w, PERSON, NOT_CYCLING, 0, 0, 0, DX, 10, 256, 77, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMdoor, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 10, 258, 55, 90, 90, 0, 0, 0, 1, kCMDdoor4_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGold_1w, kDTtgold_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 208, 152, 90, 90, 0, 0, 10, 7, kCMDgold_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRock_1w, 0, 0, AUTO, 54, 34, 0, THING0, INVISIBLE, 1, 4, 4, -1, 10, 172, 113, 127, 109, 0, 0, 0, 1, kCMDrock_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 11: (Lakeroom) -{kNBoat_1w, kDTtboat_1w, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 230, 118, 90, 90, 0, 0, 0, 1, kCMDboat_1w, 0, 0, 1, FLOATING, 250, 150, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNRope_1w, kDTtrope_1w, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 220, 132, 90, 90, 0, 0, 0, 1, kCMDrope_1w, 0, 0, 0, FLOATING, 209, 153, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNOldman_1w, kDTtoldman_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 11, 160, 38, 90, 90, 0, 0, 0, 1, kCMDoldman_1w, 0, 0, 0, FLOATING, 150, 54, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNWhero_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 11, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBoat_1w, kDTtboat_1w, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 230, 118, 90, 90, 0, 0, 0, 1, kCMDboat_1w, 0, 0, 1, FLOATING, 250, 150, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNRope_1w, kDTtrope_1w, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 220, 132, 90, 90, 0, 0, 0, 1, kCMDrope_1w, 0, 0, 0, FLOATING, 209, 153, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNOldman_1w, kDTtoldman_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 11, 160, 38, 90, 90, 0, 0, 0, 1, kCMDoldman_1w, 0, 0, 0, FLOATING, 150, 54, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNWhero_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 11, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 12: (Dead end) -{kNGuard_1w, kDTtguard_1w, 0, AUTO, 0, 0, 0, THING2d, NOT_CYCLING, 0, 0, 0, -1, 12, 147, 38, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 133, 91, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNGuard_1w, kDTtguard_1w, 0, AUTO, 0, 0, 0, THING2d, NOT_CYCLING, 0, 0, 0, -1, 12, 147, 38, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 133, 91, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 15: (Laboratory) -{kNProf_1w, kDTtprof_1w, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 1, 150, 55, 90, 90, DX, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNIgor_1w, kDTtigor_1w, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 15, 180, 122, 90, 90, DX, 0, 0, 1, kCMDigor_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBung_1w, kDTtbung_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 14, 15, 75, 145, 90, 90, 0, 0, 11, 7, kCMDbung_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGdoor_1w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 15, 59, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNSpachero_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFuzyhero_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNSpark_1w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, 15, 106, 74, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBooth_1w, 0, 0, AUTO, 38, 64, 0, THING0, INVISIBLE, 1, 4, 4, -1, 15, 172, 113, 108, 99, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 124, 154, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNMachinebits_1w, 0, 0, AUTO, 41, 7, 0, THING0, INVISIBLE, 1, 4, 4, 0, 15, 172, 113, 184, 118, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 191, 168, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNMachine_1w, 0, 0, AUTO, 103, 34, 0, THING0, INVISIBLE, 1, 4, 4, 0, 15, 172, 113, 177, 130, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 240, 168, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNTable_1w, 0, 0, AUTO, 44, 11, 0, THING0, INVISIBLE, 1, 4, 4, 0, 15, 172, 113, 49, 137, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 64, 162, Common::KEYCODE_UP, 0, 0, 0, 0} +{kNProf_1w, kDTtprof_1w, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 1, 150, 55, 90, 90, DX, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNIgor_1w, kDTtigor_1w, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 15, 180, 122, 90, 90, DX, 0, 0, 1, kCMDigor_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBung_1w, kDTtbung_1w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 14, 15, 75, 145, 90, 90, 0, 0, 11, 7, kCMDbung_1w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGdoor_1w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 15, 59, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSpachero_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFuzyhero_1w, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSpark_1w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, 15, 106, 74, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBooth_1w, 0, 0, AUTO, 38, 64, 0, THING0, INVISIBLE, 1, 4, 4, -1, 15, 172, 113, 108, 99, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 124, 154, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNMachinebits_1w, 0, 0, AUTO, 41, 7, 0, THING0, INVISIBLE, 1, 4, 4, 0, 15, 172, 113, 184, 118, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 191, 168, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNMachine_1w, 0, 0, AUTO, 103, 34, 0, THING0, INVISIBLE, 1, 4, 4, 0, 15, 172, 113, 177, 130, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 240, 168, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNTable_1w, 0, 0, AUTO, 44, 11, 0, THING0, INVISIBLE, 1, 4, 4, 0, 15, 172, 113, 49, 137, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 64, 162, Common::KEYCODE_UP, 0, 0, 0, 0} }; uint16 tmatch_2w[] = {kDTtmatch1_2w, kDTtmatch2_2w, 0}; @@ -5162,174 +5162,174 @@ object_t objects_2w[] = { // and use dx <> 0 to allow point & click interface to access them. // viewx: -1 Walk to object, 0 immediate use, else walk to viewx,viewy. // name,description,description_s,path,dx,dy,aptr,seq,seqp, cyc,n,frm,rad,scr,x,y ,oldxy,vxy,val,g,cmnd,c,s,ctx,fgb -{kNHero_2w, kDTthero_2w, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 319, 199, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPenny_2w, kDTtpenny_2w, 0, AUTO, 0, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, 1, 109, 140, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHero_2w, kDTthero_2w, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 319, 199, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPenny_2w, kDTtpenny_2w, 0, AUTO, 0, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, 1, 109, 140, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 0: (Outside house) -{kNSmoke_2w, 0, 0, AUTO, 0, 0, 0, THING3, CYCLE_FORWARD, 0, 2, 0, 0, 0, 233, 20, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSmoke_2w, 0, 0, AUTO, 0, 0, 0, THING3, CYCLE_FORWARD, 0, 2, 0, 0, 0, 233, 20, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 1: (Hall) -{kNDoor_2w, kDTtdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 50, 1, 238, 40, 90, 90, 0, 0, 0, 1, kCMDdoor1_2w, 0, 0, 0, FLOATING, 239, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 1, 80, 40, 80, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 82, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 1, 160, 40, 160, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 162, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNLips_2w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 1, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNMaid_2w, kDTtmaid_2w, 0, AUTO, 0, 0, 0, PERSON4, NOT_CYCLING, 0, 0, 0, 8, 1, 149, 135, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNHallgo_2w, kDTthallgo_2w, 0, AUTO, 189, 72, 0, THING0, INVISIBLE, 0, 0, 0, -1, 1, 0, 0, 116, 106, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 218, 181, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 50, 1, 238, 40, 90, 90, 0, 0, 0, 1, kCMDdoor1_2w, 0, 0, 0, FLOATING, 239, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 1, 80, 40, 80, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 82, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 1, 160, 40, 160, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 162, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNLips_2w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 1, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNMaid_2w, kDTtmaid_2w, 0, AUTO, 0, 0, 0, PERSON4, NOT_CYCLING, 0, 0, 0, 8, 1, 149, 135, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHallgo_2w, kDTthallgo_2w, 0, AUTO, 189, 72, 0, THING0, INVISIBLE, 0, 0, 0, -1, 1, 0, 0, 116, 106, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 218, 181, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 2: (Bedroom 1) -{kNPennylie_2w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, -{kNPenfall_2w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBookcase_2w, kDTtbookcase_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 2, 70, 81, 90, 90, 0, 0, 0, 1, kCMDbook_2w, 0, 0, 0, FLOATING, 90, 138, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBook_2w, kDTtbook_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 90, 140, 90, 90, 0, 0, 0, 1, kCMDbook_2w, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNKeyhole_2w, 0, 0, AUTO, 7, 9, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 28, 166, 26, 129, 0, 0, 0, 0, kCMDkeyhole_2w, 0, 0, 0, FLOATING, 35, 166, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNBed_2w, kDTtbed_2w, 0, AUTO, 109, 27, 0, THING0, INVISIBLE, 0, 0, 0, 0, 2, 160, 40, 174, 135, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 214, 136, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNPennylie_2w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, +{kNPenfall_2w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBookcase_2w, kDTtbookcase_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 2, 70, 81, 90, 90, 0, 0, 0, 1, kCMDbook_2w, 0, 0, 0, FLOATING, 90, 138, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBook_2w, kDTtbook_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 90, 140, 90, 90, 0, 0, 0, 1, kCMDbook_2w, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNKeyhole_2w, 0, 0, AUTO, 7, 9, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 28, 166, 26, 129, 0, 0, 0, 0, kCMDkeyhole_2w, 0, 0, 0, FLOATING, 35, 166, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNBed_2w, kDTtbed_2w, 0, AUTO, 109, 27, 0, THING0, INVISIBLE, 0, 0, 0, 0, 2, 160, 40, 174, 135, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 214, 136, Common::KEYCODE_DOWN, 0, 0, 0, 0}, // Screen 3: (Bedroom 2) -{kNPanel_2w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 3, 189, 91, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNCupb_2w, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 3, 135, 142, 90, 90, 0, 0, 0, 0, kCMDlookdesk_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBird_2w, kDTtbird_2w, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, -1, 3, 186, 100, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FOREGROUND, 192, 157, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNMatches_2w, 0, tmatch_2w, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 30, 255, 78, 30, 90, 90, 0, 0, 5, 15, kCMDmatches_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDumb_2w, kDTtdumb_2w, 0, AUTO, 32, 26, 0, THING0, INVISIBLE, 0, 0, 0, 30, 3, 72, 138, 55, 91, 0, 0, 0, 1, kCMDdumb_2w, 0, 0, 0, FLOATING, 66, 140, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNPhone_2w, 0, 0, AUTO, 16, 7, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 102, 120, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 78, 148, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNBlotpad_2w, 0, 0, AUTO, 41, 10, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 116, 122, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 132, 160, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDrawer_2w, 0, 0, AUTO, 38, 9, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 127, 133, 0, 0, 0, 1, kCMDlookdesk_2w, 0, 0, 0, FLOATING, 139, 158, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNSwitch_2w, 0, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 89, 104, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 74, 141, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNKeyhole_2w, 0, 0, AUTO, 7, 11, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 282, 134, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 260, 170, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNPanel_2w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 3, 189, 91, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNCupb_2w, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 3, 135, 142, 90, 90, 0, 0, 0, 0, kCMDlookdesk_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBird_2w, kDTtbird_2w, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, -1, 3, 186, 100, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FOREGROUND, 192, 157, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNMatches_2w, 0, tmatch_2w, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 30, 255, 78, 30, 90, 90, 0, 0, 5, 15, kCMDmatches_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDumb_2w, kDTtdumb_2w, 0, AUTO, 32, 26, 0, THING0, INVISIBLE, 0, 0, 0, 30, 3, 72, 138, 55, 91, 0, 0, 0, 1, kCMDdumb_2w, 0, 0, 0, FLOATING, 66, 140, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPhone_2w, 0, 0, AUTO, 16, 7, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 102, 120, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 78, 148, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNBlotpad_2w, 0, 0, AUTO, 41, 10, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 116, 122, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 132, 160, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDrawer_2w, 0, 0, AUTO, 38, 9, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 127, 133, 0, 0, 0, 1, kCMDlookdesk_2w, 0, 0, 0, FLOATING, 139, 158, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNSwitch_2w, 0, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 89, 104, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 74, 141, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNKeyhole_2w, 0, 0, AUTO, 7, 11, 0, THING0, INVISIBLE, 0, 0, 0, 0, 3, 0, 0, 282, 134, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 260, 170, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Screen 4: (Keyhole) -{kNMurder_2w, 0, 0, AUTO, 0, 0, 0, THING2e, CYCLE_FORWARD, 1, 2, 16, -1, 4, 141, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMurder_2w, 0, 0, AUTO, 0, 0, 0, THING2e, CYCLE_FORWARD, 1, 2, 16, -1, 4, 141, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 5: (Bed3) -{kNBalloon_2w, kDTtballoon_2w, 0, WANDER, DX/2, DY/2, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 5, 180, 40, 90, 90, 0, 0, 0, 1, kCMDballoon_2w, 0, 0, 0, FLOATING, 146, 130, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBlock_2w, 0, 0, AUTO, 18, 10, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 175, 131, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 176, 135, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNCage_2w, 0, 0, AUTO, 46, 23, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 93, 123, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 96, 150, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 15, 26, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 83, 88, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 106, 133, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 31, 21, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 133, 85, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 149, 133, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBalloon_2w, kDTtballoon_2w, 0, WANDER, DX/2, DY/2, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 5, 180, 40, 90, 90, 0, 0, 0, 1, kCMDballoon_2w, 0, 0, 0, FLOATING, 146, 130, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBlock_2w, 0, 0, AUTO, 18, 10, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 175, 131, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 176, 135, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNCage_2w, 0, 0, AUTO, 46, 23, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 93, 123, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 96, 150, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 15, 26, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 83, 88, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 106, 133, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 31, 21, 0, THING0, INVISIBLE, 0, 0, 0, 0, 5, 0, 0, 133, 85, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 149, 133, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 6: (Kitchen) -{kNDumb_2w, kDTtdumb_2w, 0, AUTO, 21, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 6, 35, 152, 26, 99, 0, 0, 0, 1, kCMDdumb_2w, 0, 0, 0, FLOATING, 40, 153, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNCupb_2w, 0, 0, AUTO, 61, 23, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 135, 142, 90, 118, 0, 0, 0, 0, kCMDlookcupb_2w, 0, 0, 0, FLOATING, 112, 143, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNGarlic_2w, kDTtgarlic_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 255, 78, 30, 90, 90, 0, 0, 5, 7, kCMDgarlic_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoor_2w, kDTdull_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 290, 196, 90, 90, 0, 0, 0, 0, kCMDkdoor_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 67, 29, 0, THING0, INVISIBLE, 0, 0, 0, 0, 6, 0, 0, 106, 75, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 139, 143, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDumb_2w, kDTtdumb_2w, 0, AUTO, 21, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 6, 35, 152, 26, 99, 0, 0, 0, 1, kCMDdumb_2w, 0, 0, 0, FLOATING, 40, 153, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNCupb_2w, 0, 0, AUTO, 61, 23, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 135, 142, 90, 118, 0, 0, 0, 0, kCMDlookcupb_2w, 0, 0, 0, FLOATING, 112, 143, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNGarlic_2w, kDTtgarlic_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 255, 78, 30, 90, 90, 0, 0, 5, 7, kCMDgarlic_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_2w, kDTdull_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 290, 196, 90, 90, 0, 0, 0, 0, kCMDkdoor_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 67, 29, 0, THING0, INVISIBLE, 0, 0, 0, 0, 6, 0, 0, 106, 75, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 139, 143, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 8: (Shed) -{kNGardner_2w, 0, 0, WANDER, DX, DY, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 8, 250, 90, 90, 90, 0, 0, 0, 1, kCMDlookgard_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGardner_2w, 0, 0, WANDER, DX, DY, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 8, 250, 90, 90, 90, 0, 0, 0, 1, kCMDlookgard_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 9: In shed -{kNRed_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 177, 99, 0, 0, 0, 1, kCMDred_2w, 0, 0, 0, FLOATING, 188, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNYellow_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 189, 99, 0, 0, 0, 1, kCMDyellow_2w, 0, 0, 0, FLOATING, 172, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNGreen_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 201, 99, 0, 0, 0, 1, kCMDgreen_2w, 0, 0, 0, FLOATING, 184, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBlue_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 215, 99, 0, 0, 0, 1, kCMDblue_2w, 0, 0, 0, FLOATING, 198, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNButton_2w, kDTtbutton_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDbutton_2w, 0, 1, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNShedlight_2w, kDTtslight_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 9, 161, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNTools_2w, 0, 0, AUTO, 33, 21, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 127, 79, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 136, 127, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNRed_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 177, 99, 0, 0, 0, 1, kCMDred_2w, 0, 0, 0, FLOATING, 188, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNYellow_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 189, 99, 0, 0, 0, 1, kCMDyellow_2w, 0, 0, 0, FLOATING, 172, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNGreen_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 201, 99, 0, 0, 0, 1, kCMDgreen_2w, 0, 0, 0, FLOATING, 184, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBlue_2w, kDTtbutton_2w, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 215, 99, 0, 0, 0, 1, kCMDblue_2w, 0, 0, 0, FLOATING, 198, 137, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNButton_2w, kDTtbutton_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDbutton_2w, 0, 1, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNShedlight_2w, kDTtslight_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 9, 161, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNTools_2w, 0, 0, AUTO, 33, 21, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 127, 79, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 136, 127, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 10: Venus fly traps -{kNMagnify_2w, kDTtmagnify_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 95, 96, 90, 90, 0, 0, 15, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFly_2w, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 48, 60, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFly_2w, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 58, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFly_2w, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 268, 90, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 48, 86, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 41, 103, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 40, 10, 79, 104, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 69, 121, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 71, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 68, 153, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 3, 0, 40, 10, 116, 113, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 99, 132, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 1, 40, 10, 164, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 184, 136, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 40, 10, 185, 83, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 167, 101, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 232, 96, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 223, 116, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 273, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 251, 156, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNMagnify_2w, kDTtmagnify_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 95, 96, 90, 90, 0, 0, 15, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFly_2w, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 48, 60, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFly_2w, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 58, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFly_2w, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 268, 90, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 48, 86, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 41, 103, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 40, 10, 79, 104, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 69, 121, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 71, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 68, 153, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 3, 0, 40, 10, 116, 113, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 99, 132, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 1, 40, 10, 164, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 184, 136, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 40, 10, 185, 83, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 167, 101, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 232, 96, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 223, 116, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNLeaf_2w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 40, 10, 273, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 251, 156, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Screen 11/12: Gates -{kNGatelight_2w, kDTtglight_2w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 1, 0, 0, -1, 11, 90, 72, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGate_2w, 0, 0, AUTO, 83, 56, 0, THING0, INVISIBLE, 0, 0, 0, -1, 12, 190, 137, 118, 99, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 152, 157, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNGatelight_2w, kDTtglight_2w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 1, 0, 0, -1, 11, 90, 72, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGate_2w, 0, 0, AUTO, 83, 56, 0, THING0, INVISIBLE, 0, 0, 0, -1, 12, 190, 137, 118, 99, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 152, 157, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 13: Stream -{kNCatnip_2w, kDTtcatnip_2w, 0, AUTO, 54, 8, 0, THING0, INVISIBLE, 0, 0, 0, -1, 13, 211, 136, 29, 114, 0, 0, 5, 3, kCMDcatnip_2w, 0, 0, 0, FLOATING, 49, 130, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBridge_2w, kDTtbridge_2w, 0, AUTO, 61, 25, 0, THING0, INVISIBLE, 0, 0, 0, -1, 13, 211, 136, 162, 116, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 218, 124, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNCatnip_2w, kDTtcatnip_2w, 0, AUTO, 54, 8, 0, THING0, INVISIBLE, 0, 0, 0, -1, 13, 211, 136, 29, 114, 0, 0, 5, 3, kCMDcatnip_2w, 0, 0, 0, FLOATING, 49, 130, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBridge_2w, kDTtbridge_2w, 0, AUTO, 61, 25, 0, THING0, INVISIBLE, 0, 0, 0, -1, 13, 211, 136, 162, 116, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 218, 124, Common::KEYCODE_DOWN, 0, 0, 0, 0}, // Screen 14: Zapper -{kNZapper_2w, kDTtzapper_2w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 1, 0, 0, -1, 14, 134, 46, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNZapper_2w, kDTtzapper_2w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 1, 0, 0, -1, 14, 134, 46, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2w, kDTtbug_2w, 0, AUTO, 0, 0, kALbugs_2w, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 15: Mushroom -{kNOldman_2w, kDTtoldman_2w, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 1, 0, 0, -1, 15, 126, 77, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNOldman_2w, kDTtoldman_2w, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 1, 0, 0, -1, 15, 126, 77, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 16: Well -{kNWell_2w, kDTtwell_2w, 0, AUTO, 53, 55, 0, THING0, INVISIBLE, 0, 0, 0, 30, 16, 211, 136, 184, 85, 0, 0, 0, 1, kCMDwell_2w, 0, 0, 0, FLOATING, 242, 131, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNWell_2w, kDTtwell_2w, 0, AUTO, 53, 55, 0, THING0, INVISIBLE, 0, 0, 0, 30, 16, 211, 136, 184, 85, 0, 0, 0, 1, kCMDwell_2w, 0, 0, 0, FLOATING, 242, 131, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // Screen 17: Snakepit -{kNSnake_2w, kDTtsnake_2w, 0, CHASE2, DX, DY, kALsnake_2w, PERSON2, CYCLE_FORWARD, 0, 0, 0, 25, 17, 165, 95, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSnake_2w, kDTtsnake_2w, 0, CHASE2, DX, DY, kALsnake_2w, PERSON2, CYCLE_FORWARD, 0, 0, 0, 25, 17, 165, 95, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 18: Phonebox -{kNTardis_2w, kDTttardis_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 18, 21, 74, 90, 90, 0, 0, 0, 1, kCMDtardis_2w, 0, 0, 1, FLOATING, 50, 126, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNTardis_2w, kDTttardis_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 18, 21, 74, 90, 90, 0, 0, 0, 1, kCMDtardis_2w, 0, 0, 1, FLOATING, 50, 126, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // Screen 19: Street -{kNGraf_2w, 0, 0, AUTO, 34, 14, 0, THING0, INVISIBLE, 0, 0, 0, 50, 19, 21, 74, 134, 102, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 143, 134, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNGraf_2w, 0, 0, AUTO, 34, 14, 0, THING0, INVISIBLE, 0, 0, 0, 50, 19, 21, 74, 134, 102, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 143, 134, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 20: Kennel -{kNStick_2w, kDTdull_2w, 0, AUTO, 29, 11, 0, THING0, INVISIBLE, 0, 0, 0, 30, 20, 89, 120, 83, 116, 0, 0, 5, 3, kCMDstick_2w, 0, 0, 0, FLOATING, 88, 132, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDynamite_2w, kDTtdynamite_2w, 0, AUTO, 0, 0, 0, THING2a, INVISIBLE, 0, 0, 0, 40, 20, 195, 111, 90, 90, 0, 0, 0, 7, kCMDdynamite_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNKennel_2w, 0, 0, AUTO, 97, 40, 0, THING0, INVISIBLE, 0, 0, 0, 50, 20, 195, 114, 173, 73, 0, 0, 0, 0, kCMDkennel_2w, 0, 0, 0, FLOATING, 160, 113, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNDog_2w, kDTtdog_2w, 0, AUTO, 0, 0, 0, THING2f, CYCLE_FORWARD, 0, 2, 0, 30, 20, 184, 80, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 200, 117, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNStick_2w, kDTdull_2w, 0, AUTO, 29, 11, 0, THING0, INVISIBLE, 0, 0, 0, 30, 20, 89, 120, 83, 116, 0, 0, 5, 3, kCMDstick_2w, 0, 0, 0, FLOATING, 88, 132, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDynamite_2w, kDTtdynamite_2w, 0, AUTO, 0, 0, 0, THING2a, INVISIBLE, 0, 0, 0, 40, 20, 195, 111, 90, 90, 0, 0, 0, 7, kCMDdynamite_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNKennel_2w, 0, 0, AUTO, 97, 40, 0, THING0, INVISIBLE, 0, 0, 0, 50, 20, 195, 114, 173, 73, 0, 0, 0, 0, kCMDkennel_2w, 0, 0, 0, FLOATING, 160, 113, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNDog_2w, kDTtdog_2w, 0, AUTO, 0, 0, 0, THING2f, CYCLE_FORWARD, 0, 2, 0, 30, 20, 184, 80, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 200, 117, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // Screen 21: (Rockroom) -{kNRock_2w, 0, 0, AUTO, 60, 36, 0, THING0, INVISIBLE, 0, 0, 0, 30, 21, 89, 120, 216, 63, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 254, 102, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNRope_2w, kDTtrope_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 21, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRock_2w, 0, 0, AUTO, 60, 36, 0, THING0, INVISIBLE, 0, 0, 0, 30, 21, 89, 120, 216, 63, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 254, 102, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNRope_2w, kDTtrope_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 21, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 22: (Rockgone) -{kNRope_2w, kDTtrope_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 22, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRope_2w, kDTtrope_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 22, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 24: (Lampcave) -{kNLamp_2w, kDTtlamp_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 24, 78, 115, 90, 90, 0, 0, 10, 7, kCMDlamp_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLamp_2w, kDTtlamp_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 24, 78, 115, 90, 90, 0, 0, 10, 7, kCMDlamp_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 25: (Chasm) -{kNBanana_2w, kDTtbanana_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 25, 254, 107, 90, 90, 0, 0, 5, 7, kCMDbanana_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNHole_2w, 0, 0, AUTO, 40, 80, 0, THING0, INVISIBLE, 0, 0, 0, 20, 25, 254, 107, 183, 92, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 187, 123, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNBanana_2w, kDTtbanana_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 25, 254, 107, 90, 90, 0, 0, 5, 7, kCMDbanana_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHole_2w, 0, 0, AUTO, 40, 80, 0, THING0, INVISIBLE, 0, 0, 0, 20, 25, 254, 107, 183, 92, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 187, 123, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Screen 27: (Ladder) -{kNGenie_2w, kDTtgenie_2w, 0, AUTO, 0, 0, 0, PERSON3, INVISIBLE, 0, 0, 0, 40, 27, 138, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGenie_2w, kDTtgenie_2w, 0, AUTO, 0, 0, 0, PERSON3, INVISIBLE, 0, 0, 0, 40, 27, 138, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 28: (Traproom) -{kNSafe_2w, kDTtsafe_2w, 0, AUTO, 37, 34, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 104, 110, 0, 0, 0, 1, kCMDsafe_2w, 0, 0, 0, FLOATING, 106, 145, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNWill_2w, kDTtwill_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 90, 90, 0, 0, 5, 7, kCMDwill_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMousehole_2w, 0, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 164, 132, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 153, 146, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 15, 30, 0, THING0, INVISIBLE, 0, 0, 0, -1, 28, 122, 144, 250, 89, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 222, 141, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNSafe_2w, kDTtsafe_2w, 0, AUTO, 37, 34, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 104, 110, 0, 0, 0, 1, kCMDsafe_2w, 0, 0, 0, FLOATING, 106, 145, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNWill_2w, kDTtwill_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 90, 90, 0, 0, 5, 7, kCMDwill_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMousehole_2w, 0, 0, AUTO, 5, 5, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 164, 132, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 153, 146, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 15, 30, 0, THING0, INVISIBLE, 0, 0, 0, -1, 28, 122, 144, 250, 89, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 222, 141, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Screen 30: (Lounge) -{kNPicture_2w, 0, 0, AUTO, 35, 31, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 262, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 55, 55, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 163, 86, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 186, 144, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 52, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 89, 86, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 93, 142, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 55, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 23, 89, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 60, 150, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNPlant_2w, 0, 0, AUTO, 19, 51, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 57, 93, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 70, 146, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPicture_2w, 0, 0, AUTO, 35, 31, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 262, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 55, 55, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 163, 86, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 186, 144, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 52, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 89, 86, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 93, 142, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 55, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 23, 89, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 60, 150, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNPlant_2w, 0, 0, AUTO, 19, 51, 0, THING0, INVISIBLE, 0, 0, 0, 20, 30, 122, 144, 57, 93, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 70, 146, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 31: (Parlor) -{kNCupb_2w, 0, 0, AUTO, 64, 28, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 212, 142, 182, 113, 0, 0, 0, 0, kCMDcupbp_2w, 0, 0, 0, FLOATING, 200, 150, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_2w, kDTdull_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 28, 154, 90, 90, 0, 0, 0, 0, kCMDpdoor_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNAlbum_2w, kDTtalbum_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 255, 212, 142, 90, 90, 0, 0, 5, 1, kCMDalbum_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCupb_2w, 0, 0, AUTO, 64, 28, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 212, 142, 182, 113, 0, 0, 0, 0, kCMDcupbp_2w, 0, 0, 0, FLOATING, 200, 150, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTdull_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 28, 154, 90, 90, 0, 0, 0, 0, kCMDpdoor_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNAlbum_2w, kDTtalbum_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 255, 212, 142, 90, 90, 0, 0, 5, 1, kCMDalbum_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 32: (Catroom) -{kNCat_2w, kDTtcat_2w, 0, AUTO, 0, 0, 0, THING2b, CYCLE_FORWARD, 0, 2, 0, 40, 32, 189, 69, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 171, 117, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 27, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 32, 122, 144, 106, 68, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 113, 118, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 26, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 32, 122, 144, 179, 68, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 189, 118, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNPost_2w, 0, 0, AUTO, 29, 32, 0, THING0, INVISIBLE, 0, 0, 0, 20, 32, 122, 144, 195, 100, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 195, 128, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNCat_2w, kDTtcat_2w, 0, AUTO, 0, 0, 0, THING2b, CYCLE_FORWARD, 0, 2, 0, 40, 32, 189, 69, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 171, 117, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 27, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 32, 122, 144, 106, 68, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 113, 118, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 26, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 32, 122, 144, 179, 68, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 189, 118, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPost_2w, 0, 0, AUTO, 29, 32, 0, THING0, INVISIBLE, 0, 0, 0, 20, 32, 122, 144, 195, 100, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 195, 128, Common::KEYCODE_DOWN, 0, 0, 0, 0}, // Screen 33: (Boxroom) -{kNDoor_2w, kDTtbdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 33, 137, 97, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 140, 142, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNPaper_2w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 80, 33, 205, 147, 90, 90, 0, 0, 5, 7, kCMDpaper_2w, 0, 0, 0, BACKGROUND, 188, 159, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNPencil_2w, kDTtpencil_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 40, 33, 205, 163, 90, 90, 0, 0, 5, 7, kCMDpencil_2w, 0, 0, 0, FLOATING, 188, 168, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNChute_2w, 0, 0, AUTO, 12, 21, 0, THING0, INVISIBLE, 0, 0, 0, 20, 33, 122, 144, 73, 107, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 114, 149, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNCrate_2w, 0, 0, AUTO, 48, 28, 0, THING0, INVISIBLE, 0, 0, 0, 20, 33, 122, 144, 68, 133, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 114, 149, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNDoor_2w, kDTtbdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 33, 137, 97, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 140, 142, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPaper_2w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 80, 33, 205, 147, 90, 90, 0, 0, 5, 7, kCMDpaper_2w, 0, 0, 0, BACKGROUND, 188, 159, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNPencil_2w, kDTtpencil_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 40, 33, 205, 163, 90, 90, 0, 0, 5, 7, kCMDpencil_2w, 0, 0, 0, FLOATING, 188, 168, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNChute_2w, 0, 0, AUTO, 12, 21, 0, THING0, INVISIBLE, 0, 0, 0, 20, 33, 122, 144, 73, 107, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 114, 149, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNCrate_2w, 0, 0, AUTO, 48, 28, 0, THING0, INVISIBLE, 0, 0, 0, 20, 33, 122, 144, 68, 133, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 114, 149, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // Screen 34: (Hall3) -{kNDoor_2w, kDTtdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 234, 73, 90, 90, 0, 0, 0, 1, kCMDdoor2_2w, 0, 0, 0, FLOATING, 240, 121, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_2w, kDTtdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 103, 73, 90, 90, 0, 0, 0, 1, kCMDdoor3_2w, 0, 0, 0, FLOATING, 107, 121, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 16, 56, 0, THING0, INVISIBLE, 0, 0, 0, 50, 34, 80, 40, 73, 92, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 90, 148, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNMirror_2w, 0, 0, AUTO, 20, 33, 0, THING0, INVISIBLE, 0, 0, 0, 20, 34, 122, 144, 172, 75, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 175, 125, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 234, 73, 90, 90, 0, 0, 0, 1, kCMDdoor2_2w, 0, 0, 0, FLOATING, 240, 121, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoor_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 103, 73, 90, 90, 0, 0, 0, 1, kCMDdoor3_2w, 0, 0, 0, FLOATING, 107, 121, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 16, 56, 0, THING0, INVISIBLE, 0, 0, 0, 50, 34, 80, 40, 73, 92, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 90, 148, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNMirror_2w, 0, 0, AUTO, 20, 33, 0, THING0, INVISIBLE, 0, 0, 0, 20, 34, 122, 144, 172, 75, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 175, 125, Common::KEYCODE_UP, 0, 0, 0, 0}, // Screen 35: (Organ) -{kNHarry_2w, kDTtharry_2w, 0, AUTO, DX, DY, 0, THING2f, CYCLE_FORWARD, 0, 2, 0, -1, 35, 188, 84, 90, 90, 0, 0, 0, 1, kCMDharry_2w, 0, 0, 0, FLOATING, 216, 132, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 33, 33, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 248, 72, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 251, 134, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNPicture_2w, 0, 0, AUTO, 33, 21, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 95, 78, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant_2w, 0, 0, AUTO, 23, 57, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 52, 83, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 83, 138, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNOrgan_2w, 0, 0, AUTO, 65, 66, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 162, 62, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHarry_2w, kDTtharry_2w, 0, AUTO, DX, DY, 0, THING2f, CYCLE_FORWARD, 0, 2, 0, -1, 35, 188, 84, 90, 90, 0, 0, 0, 1, kCMDharry_2w, 0, 0, 0, FLOATING, 216, 132, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 33, 33, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 248, 72, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 251, 134, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNPicture_2w, 0, 0, AUTO, 33, 21, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 95, 78, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant_2w, 0, 0, AUTO, 23, 57, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 52, 83, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 83, 138, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNOrgan_2w, 0, 0, AUTO, 65, 66, 0, THING0, INVISIBLE, 0, 0, 0, 20, 35, 122, 144, 162, 62, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 36: (Hestroom) -{kNHester_2w, kDTthester_2w, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 30, 36, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 70, 150, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNLetter_2w, kDTtletter_2w, 0, AUTO, 19, 6, 0, THING0, INVISIBLE, 0, 0, 0, 30, 36, 110, 150, 106, 132, 0, 0, 0, 1, kCMDletter_2w, 0, 0, 0, FLOATING, 98, 151, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNBookcase_2w, 0, 0, AUTO, 69, 62, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 179, 81, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 201, 146, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNPicture_2w, 0, 0, AUTO, 23, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 271, 91, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 237, 145, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNPlant_2w, 0, 0, AUTO, 12, 21, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 263, 111, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 237, 145, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNWindow_2w, 0, 0, AUTO, 24, 23, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 25, 94, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 40, 154, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNHester_2w, kDTthester_2w, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 30, 36, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 70, 150, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNLetter_2w, kDTtletter_2w, 0, AUTO, 19, 6, 0, THING0, INVISIBLE, 0, 0, 0, 30, 36, 110, 150, 106, 132, 0, 0, 0, 1, kCMDletter_2w, 0, 0, 0, FLOATING, 98, 151, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBookcase_2w, 0, 0, AUTO, 69, 62, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 179, 81, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 201, 146, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPicture_2w, 0, 0, AUTO, 23, 24, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 271, 91, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 237, 145, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNPlant_2w, 0, 0, AUTO, 12, 21, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 263, 111, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 237, 145, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNWindow_2w, 0, 0, AUTO, 24, 23, 0, THING0, INVISIBLE, 0, 0, 0, 20, 36, 122, 144, 25, 94, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 40, 154, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // Screen 37: (Retupmoc) -{kNDoctor_2w, kDTtdoctor_2w, 0, WANDER, DX, DY, kALdoctor_2w, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNRobot_2w, 0, trobots_2w, CHASE2, DX, DY, kALrobot_2w, PERSON5, NOT_CYCLING, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 9, kCMDrobot_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNScrew_2w, kDTtscrew_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 37, 100, 123, 90, 90, 0, 0, 15, 3, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoctor_2w, kDTtdoctor_2w, 0, WANDER, DX, DY, kALdoctor_2w, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRobot_2w, 0, trobots_2w, CHASE2, DX, DY, kALrobot_2w, PERSON5, NOT_CYCLING, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 9, kCMDrobot_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNScrew_2w, kDTtscrew_2w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 37, 100, 123, 90, 90, 0, 0, 15, 3, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 38: (Hall1 revisited) -{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 50, 38, 238, 40, 90, 90, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 239, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 38, 80, 40, 80, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 82, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 38, 160, 40, 160, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 162, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNPicture_2w, 0, 0, AUTO, 32, 18, 0, THING0, INVISIBLE, 0, 0, 0, 20, 38, 122, 144, 187, 113, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 200, 158, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNPlant_2w, 0, 0, AUTO, 25, 43, 0, THING0, INVISIBLE, 0, 0, 0, 20, 38, 122, 144, 239, 111, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 219, 157, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 50, 38, 238, 40, 90, 90, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 239, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 38, 80, 40, 80, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 82, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoor_2w, kDTtdoordum_2w, 0, AUTO, 26, 42, 0, THING0, INVISIBLE, 0, 0, 0, 50, 38, 160, 40, 160, 40, 0, 0, 0, 1, kCMDdoordum_2w, 0, 0, 0, FLOATING, 162, 82, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPicture_2w, 0, 0, AUTO, 32, 18, 0, THING0, INVISIBLE, 0, 0, 0, 20, 38, 122, 144, 187, 113, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 200, 158, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNPlant_2w, 0, 0, AUTO, 25, 43, 0, THING0, INVISIBLE, 0, 0, 0, 20, 38, 122, 144, 239, 111, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 219, 157, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // Misc: -{kNCook_2w, kDTtcook_2w, 0, AUTO, DX, DY, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 06, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCookb_2w, kDTtcook_2w, 0, AUTO, 0, 0, 0, THING4, CYCLE_FORWARD, 0, 0, 0, 30, 255, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCop_2w, kDTtcop_2w, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 30, 29, 180, 47, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNHorace_2w, kDTthorace_2w, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 34, 215, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBell_2w, kDTtbell_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 15, 149, 109, 90, 90, 0, 0, 5, 7, kCMDbell_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGun_2w, 0, tguns_2w, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 26, 149, 109, 90, 90, 0, 0, 10, 15, kCMDgun_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBottle_2w, kDTtbottle_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 27, 149, 109, 90, 90, 0, 0, 15, 7, kCMDbottle_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCook_2w, kDTtcook_2w, 0, AUTO, DX, DY, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 06, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCookb_2w, kDTtcook_2w, 0, AUTO, 0, 0, 0, THING4, CYCLE_FORWARD, 0, 0, 0, 30, 255, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCop_2w, kDTtcop_2w, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 30, 29, 180, 47, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHorace_2w, kDTthorace_2w, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 34, 215, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBell_2w, kDTtbell_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 15, 149, 109, 90, 90, 0, 0, 5, 7, kCMDbell_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGun_2w, 0, tguns_2w, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 26, 149, 109, 90, 90, 0, 0, 10, 15, kCMDgun_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBottle_2w, kDTtbottle_2w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 27, 149, 109, 90, 90, 0, 0, 15, 7, kCMDbottle_2w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, }; uint16 tflask_3w[] = {kDTtflask1_3w, kDTtflask2_3w, kDTtflask3_3w, 0};// Descriptions depend on flask state @@ -5341,365 +5341,365 @@ uint16 tcage_3w[] = {kDTtcage1_3w, kDTtcage2_3w, 0}; object_t objects_3w[] = { //name,description,description_s,path,dx,dy,aptr,SPRITE, cyc, n,frm,rad, scr,x,y ,oldxy,vxy,val,g,cmnd,c,s,ctx,fgb, viewx,viewy,dir // Common objects // Set Penny state to 3 to avoid story -{kNHero_3w, kDTthero_3w, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 161, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWhero_3w, kDTthero_3w, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 219, 133, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHero_3w, kDTthero_3w, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 161, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWhero_3w, kDTthero_3w, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 219, 133, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, //#if STORY -{kNPenny_3w, kDTtpenny_3w, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPenny_3w, kDTtpenny_3w, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, //#else -//{kNPenny_3w, kDTtpenny_3w, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 3, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +//{kNPenny_3w, kDTtpenny_3w, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 3, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, //#endif -{kNPennylie_3w, kDTtplie_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, -1, WEB_3w, 75, 156, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLips_3w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 0, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNPennylie_3w, kDTtplie_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, -1, WEB_3w, 75, 156, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLips_3w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 0, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, // CRASH site -{kNPlane_3w, kDTtplane_3w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, CRASH_3w, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcplane_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoor_3w, kDTdull_3w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 80, CRASH_3w, 184, 136, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant1_3w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 0, CRASH_3w, 132, 165, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, +{kNPlane_3w, kDTtplane_3w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, CRASH_3w, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcplane_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_3w, kDTdull_3w, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 80, CRASH_3w, 184, 136, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant1_3w, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 0, CRASH_3w, 132, 165, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, // INPLANE -{kNPlane_3w, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, PLANE_3w, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcexit_3w, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3w, kDTtwwater_3w, 0, AUTO, 195, 10, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_3w, 184, 136, 0, 155, 0, 0, 0, 0, kCMDcwfall_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWaterfall_3w, kDTtwwater_3w, 0, AUTO, 57, 131, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_3w, 184, 136, 239, 22, 0, 0, 0, 0, kCMDcwfall_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3w, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_B_3w, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwfall_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3w, kDTtswater_3w, 0, AUTO, 106, 19, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 102, 150, 0, 0, 0, 0, kCMDcwstream_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3w, kDTtswater_3w, 0, AUTO, 195, 9, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 55, 183, 0, 0, 0, 0, kCMDcwstream_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPool_3w, kDTtmwater_3w, 0, AUTO, 87, 34, 0, THING0, INVISIBLE, 0, 0, 0, -1, GARDEN_3w, 184, 136, 112, 129, 0, 0, 0, 0, kCMDcwpool_3w, 0, 0, 0, FLOATING, 155, 170, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNClay_3w, kDTtclay_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 162, 96, 90, 90, 0, 0, 5, 7, kCMDcclay_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNNeedles_3w, kDTtneedles_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 172, 90, 90, 90, 0, 0, 5, 7, kCMDcpins_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNFlask_3w, 0, tflask_3w, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 190, 90, 90, 90, 0, 0, 5, 11, kCMDcflask_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNBouillon_3w, kDTtbouillon_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 185, 94, 90, 90, 0, 0, 5, 7, kCMDcbouillon_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNCheese_3w, kDTtcheese_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 185, 100, 90, 90, 0, 0, 5, 1, kCMDccheese_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNPlane_3w, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, PLANE_3w, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcexit_3w, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3w, kDTtwwater_3w, 0, AUTO, 195, 10, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_3w, 184, 136, 0, 155, 0, 0, 0, 0, kCMDcwfall_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWaterfall_3w, kDTtwwater_3w, 0, AUTO, 57, 131, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_3w, 184, 136, 239, 22, 0, 0, 0, 0, kCMDcwfall_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3w, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_B_3w, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwfall_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3w, kDTtswater_3w, 0, AUTO, 106, 19, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 102, 150, 0, 0, 0, 0, kCMDcwstream_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3w, kDTtswater_3w, 0, AUTO, 195, 9, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 55, 183, 0, 0, 0, 0, kCMDcwstream_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPool_3w, kDTtmwater_3w, 0, AUTO, 87, 34, 0, THING0, INVISIBLE, 0, 0, 0, -1, GARDEN_3w, 184, 136, 112, 129, 0, 0, 0, 0, kCMDcwpool_3w, 0, 0, 0, FLOATING, 155, 170, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNClay_3w, kDTtclay_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 162, 96, 90, 90, 0, 0, 5, 7, kCMDcclay_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNNeedles_3w, kDTtneedles_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 172, 90, 90, 90, 0, 0, 5, 7, kCMDcpins_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNFlask_3w, 0, tflask_3w, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 190, 90, 90, 90, 0, 0, 5, 11, kCMDcflask_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNBouillon_3w, kDTtbouillon_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 185, 94, 90, 90, 0, 0, 5, 7, kCMDcbouillon_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNCheese_3w, kDTtcheese_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3w, 185, 100, 90, 90, 0, 0, 5, 1, kCMDccheese_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, // WEB -{kNSpider_3w, kDTtspider_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, WEB_3w, 77, 50, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant3_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3w, 245, 117, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant4_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3w, 285, 90, 91, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSpider_3w, kDTtspider_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, WEB_3w, 77, 50, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant3_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3w, 245, 117, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant4_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3w, 285, 90, 91, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // BRIDGE -{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 132, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 134, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNVine_3w, kDTtvine_3w, 0, AUTO, 8, 76, 0, THING0, INVISIBLE, 0, 0, 0, -1, BRIDGE_3w, 184, 136, 228, 24, 0, 0, 0, 1, kCMDcvine_3w, 0, 0, 0, FLOATING, 237, 131, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 132, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 134, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBlock_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3w, 225, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNVine_3w, kDTtvine_3w, 0, AUTO, 8, 76, 0, THING0, INVISIBLE, 0, 0, 0, -1, BRIDGE_3w, 184, 136, 228, 24, 0, 0, 0, 1, kCMDcvine_3w, 0, 0, 0, FLOATING, 237, 131, Common::KEYCODE_UP, 0, 0, 0, 0}, // STREAM -{kNVine_3w, kDTtvine_3w, 0, AUTO, 6, 50, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 101, 96, 0, 0, 0, 1, kCMDcswing_3w, 0, 0, 0, FLOATING, 50, 172, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, -{kNVine_3w, kDTtvine_3w, 0, AUTO, 6, 50, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 203, 96, 0, 0, 0, 1, kCMDcswing_3w, 0, 0, 0, FLOATING, 233, 170, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNSwinger_3w, 0, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 0, STREAM_3w, 219, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNSteps_3w, kDTtsteps_3w, 0, AUTO, 153, 15, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 79, 168, 0, 0, 0, 1, kCMDcsteps_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNVine_3w, kDTtvine_3w, 0, AUTO, 6, 50, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 101, 96, 0, 0, 0, 1, kCMDcswing_3w, 0, 0, 0, FLOATING, 50, 172, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNVine_3w, kDTtvine_3w, 0, AUTO, 6, 50, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 203, 96, 0, 0, 0, 1, kCMDcswing_3w, 0, 0, 0, FLOATING, 233, 170, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNSwinger_3w, 0, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 0, STREAM_3w, 219, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSteps_3w, kDTtsteps_3w, 0, AUTO, 153, 15, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3w, 184, 136, 79, 168, 0, 0, 0, 1, kCMDcsteps_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // HUT_IN -{kNDoctor_3w, kDTtdoctor_3w, 0, WANDER, DX, DY, kALdocgot_3w, PERSON3, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3w, 273, 83, 90, 90, 0, 0, 0, 1, kCMDcdoctor_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoclie_3w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 30, HUT_IN_3w, 239, 103, 90, 90, 0, 0, 0, 1, kCMDcdoctor_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCdoor_3w, kDTdull_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 40, HUT_IN_3w, 239, 103, 90, 90, 0, 0, 0, 1, kCMDcdoor_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNMouse_3w, kDTtmouse_3w, 0, AUTO, 0, 0, 0, THING2b, INVISIBLE, 0, 0, 0, 30, HUT_IN_3w, 186, 170, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMoushole_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3w, 203, 122, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCage_3w, 0, tcage_3w, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3w, 156, 121, 90, 90, 0, 0, 1, 13, kCMDccage_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNFire_1_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3w, 127, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_1_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3w, 172, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_2_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_IN_3w, 30, 145, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_3_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, CAMP_3w, 120, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_3w, 0, 0, AUTO, 42, 54, 0, THING0, INVISIBLE, 0, 0, 0, 50, HUT_IN_3w, 50, 136, 30, 121, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 44, 153, Common::KEYCODE_LEFT, 0, 0, 0, 0}, -{kNWindow_3w, 0, 0, AUTO, 39, 32, 0, THING0, INVISIBLE, 0, 0, 0, 50, HUT_IN_3w, 184, 136, 101, 72, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 111, 148, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNDoctor_3w, kDTtdoctor_3w, 0, WANDER, DX, DY, kALdocgot_3w, PERSON3, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3w, 273, 83, 90, 90, 0, 0, 0, 1, kCMDcdoctor_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoclie_3w, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 30, HUT_IN_3w, 239, 103, 90, 90, 0, 0, 0, 1, kCMDcdoctor_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCdoor_3w, kDTdull_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 40, HUT_IN_3w, 239, 103, 90, 90, 0, 0, 0, 1, kCMDcdoor_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNMouse_3w, kDTtmouse_3w, 0, AUTO, 0, 0, 0, THING2b, INVISIBLE, 0, 0, 0, 30, HUT_IN_3w, 186, 170, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMoushole_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3w, 203, 122, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCage_3w, 0, tcage_3w, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3w, 156, 121, 90, 90, 0, 0, 1, 13, kCMDccage_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNFire_1_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3w, 127, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_1_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3w, 172, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_2_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_IN_3w, 30, 145, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_3_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, CAMP_3w, 120, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_3w, 0, 0, AUTO, 42, 54, 0, THING0, INVISIBLE, 0, 0, 0, 50, HUT_IN_3w, 50, 136, 30, 121, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 44, 153, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNWindow_3w, 0, 0, AUTO, 39, 32, 0, THING0, INVISIBLE, 0, 0, 0, 50, HUT_IN_3w, 184, 136, 101, 72, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 111, 148, Common::KEYCODE_UP, 0, 0, 0, 0}, // CAMP -{kNNat1_3w, kDTtnative_3w, 0, WANDER, DX, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, CAMP_3w, 130, 105, 90, 90, 0, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNat2_3w, kDTtnative_3w, 0, AUTO, DX, DY, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3w, 17, 97, 90, 90, 4, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNat3_3w, kDTtnative_3w, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 16, 0, -1, CAMP_3w, 96, 40, 90, 90, 0, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNatb_3w, kDTtnative_3w, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 20, 0, -1, CAMP_3w, 72, 51, 90, 90, 0, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNatg_3w, kDTtnatgirl_3w, 0, AUTO, DX, DY, kALnative_3w, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3w, 28, 101, 90, 90, 3, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPipe_3w, kDTtpipe_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, CAMP_3w, 225, 135, 90, 90, 0, 0, 0, 7, kCMDcdart_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNHut_3w, 0, 0, AUTO, 47, 64, 0, THING0, INVISIBLE, 0, 0, 0, 50, CAMP_3w, 184, 136, 0, 42, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 42, 92, Common::KEYCODE_LEFT, 0, 0, 0, 0}, +{kNNat1_3w, kDTtnative_3w, 0, WANDER, DX, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, CAMP_3w, 130, 105, 90, 90, 0, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNat2_3w, kDTtnative_3w, 0, AUTO, DX, DY, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3w, 17, 97, 90, 90, 4, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNat3_3w, kDTtnative_3w, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 16, 0, -1, CAMP_3w, 96, 40, 90, 90, 0, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNatb_3w, kDTtnative_3w, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 20, 0, -1, CAMP_3w, 72, 51, 90, 90, 0, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNatg_3w, kDTtnatgirl_3w, 0, AUTO, DX, DY, kALnative_3w, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3w, 28, 101, 90, 90, 3, 0, 0, 1, kCMDcnative_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPipe_3w, kDTtpipe_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, CAMP_3w, 225, 135, 90, 90, 0, 0, 0, 7, kCMDcdart_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNHut_3w, 0, 0, AUTO, 47, 64, 0, THING0, INVISIBLE, 0, 0, 0, 50, CAMP_3w, 184, 136, 0, 42, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, 42, 92, Common::KEYCODE_LEFT, 0, 0, 0, 0}, // PATH_2 -{kNElephant_3w, kDTtelephant_3w, 0, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 4, 0, -1, PATH_3w, 163, 85, 90, 90, 0, 0, 0, 1, kCMDcelephant_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNE_eyes_3w, 0, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, PATH_3w, 194, 102, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNElephant_3w, kDTtelephant_3w, 0, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 4, 0, -1, PATH_3w, 163, 85, 90, 90, 0, 0, 0, 1, kCMDcelephant_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNE_eyes_3w, 0, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, PATH_3w, 194, 102, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, // Misc -{kNHero_old_3w, 0, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 161, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNAircraft_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, SUNSET_3w, 250, 116, 90, 90, -2, -1, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNScroll_3w, kDTtscroll_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFFTOP_3w, 75, 116, 90, 90, 0, 0, 3, 7, kCMDcscroll_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNCrystal_3w, kDTtcrystal_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, TURN_3w, 275, 116, 90, 90, 0, 0, 9, 7, kCMDccrystal_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNRock_3w, kDTtrock_3w, 0, AUTO, 93, 55, 0, THING0, INVISIBLE, 0, 0, 0, -1, TURN_3w, 100, 100, 220, 120, 0, 0, 0, 0, kCMDcrock_3w, 0, 0, 0, FLOATING, 220, 169, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, +{kNHero_old_3w, 0, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 161, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNAircraft_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, SUNSET_3w, 250, 116, 90, 90, -2, -1, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNScroll_3w, kDTtscroll_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFFTOP_3w, 75, 116, 90, 90, 0, 0, 3, 7, kCMDcscroll_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNCrystal_3w, kDTtcrystal_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, TURN_3w, 275, 116, 90, 90, 0, 0, 9, 7, kCMDccrystal_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNRock_3w, kDTtrock_3w, 0, AUTO, 93, 55, 0, THING0, INVISIBLE, 0, 0, 0, -1, TURN_3w, 100, 100, 220, 120, 0, 0, 0, 0, kCMDcrock_3w, 0, 0, 0, FLOATING, 220, 169, Common::KEYCODE_RIGHT, 0, 0, 0, 0}, // CAVE etc. -{kNPlant2_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAVE_3w, 27, 160, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, -{kNGhost_3w, kDTtghost_3w, 0, CHASE, DX, DY, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, CAVE_3w, 121, 86, 90, 90, 0, 0, 0, 1, kCMDcghost_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBell_3w, kDTtbell_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFF_3w, 202, 152, 90, 90, 0, 0, 2, 7, kCMDcbell_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNBook_3w, kDTtbook_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, STREAM_3w, 275, 116, 90, 90, 0, 0, 10, 7, kCMDcbook_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNCandle_3w, kDTtcandle_3w, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 20, 0, 30, HUT_IN_3w, 77, 134, 90, 90, 0, 0, 3, 7, kCMDccandle_3w, 0, 1, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, -{kNVine_3w, kDTtvine_3w, 0, AUTO, 5, 53, 0, THING0, INVISIBLE, 0, 0, 0, -1, CAVE_3w, 184, 136, 116, 80, 0, 0, 0, 1, kCMDcswingc_3w, 0, 0, 0, FLOATING, 114, 139, Common::KEYCODE_UP, 0, 0, 0, 0}, -{kNRush_3w, kDTtrush_3w, 0, AUTO, 40, 18, 0, THING0, INVISIBLE, 0, 0, 0, 60, STREAM_3w, 240, 160, 231, 144, 0, 0, 0, 1, kCMDcrush_3w, 0, 0, 0, FLOATING, 240, 160, Common::KEYCODE_DOWN, 0, 0, 0, 0}, -{kNRush_3w, kDTtrush_3w, 0, AUTO, 40, 18, 0, THING0, INVISIBLE, 0, 0, 0, 60, STREAM2_3w, 240, 160, 231, 144, 0, 0, 0, 1, kCMDcrush_3w, 0, 0, 0, FLOATING, 240, 160, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNPlant2_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAVE_3w, 27, 160, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, +{kNGhost_3w, kDTtghost_3w, 0, CHASE, DX, DY, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, CAVE_3w, 121, 86, 90, 90, 0, 0, 0, 1, kCMDcghost_3w, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBell_3w, kDTtbell_3w, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFF_3w, 202, 152, 90, 90, 0, 0, 2, 7, kCMDcbell_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNBook_3w, kDTtbook_3w, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, STREAM_3w, 275, 116, 90, 90, 0, 0, 10, 7, kCMDcbook_3w, 0, 0, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNCandle_3w, kDTtcandle_3w, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 20, 0, 30, HUT_IN_3w, 77, 134, 90, 90, 0, 0, 3, 7, kCMDccandle_3w, 0, 1, 0, FLOATING, GO_OBJ, -1, -1, 0, 0, 0, 0}, +{kNVine_3w, kDTtvine_3w, 0, AUTO, 5, 53, 0, THING0, INVISIBLE, 0, 0, 0, -1, CAVE_3w, 184, 136, 116, 80, 0, 0, 0, 1, kCMDcswingc_3w, 0, 0, 0, FLOATING, 114, 139, Common::KEYCODE_UP, 0, 0, 0, 0}, +{kNRush_3w, kDTtrush_3w, 0, AUTO, 40, 18, 0, THING0, INVISIBLE, 0, 0, 0, 60, STREAM_3w, 240, 160, 231, 144, 0, 0, 0, 1, kCMDcrush_3w, 0, 0, 0, FLOATING, 240, 160, Common::KEYCODE_DOWN, 0, 0, 0, 0}, +{kNRush_3w, kDTtrush_3w, 0, AUTO, 40, 18, 0, THING0, INVISIBLE, 0, 0, 0, 60, STREAM2_3w, 240, 160, 231, 144, 0, 0, 0, 1, kCMDcrush_3w, 0, 0, 0, FLOATING, 240, 160, Common::KEYCODE_DOWN, 0, 0, 0, 0}, // OLDMAN (inside cave) -{kNO_eye_3w, 0, 0, AUTO, 0, 0, 0, THING3, INVISIBLE, 0, 0, 0, 0, OLDMAN_3w, 237, 77, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_4_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, OLDMAN_3w, 65, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMouth_3w, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 0, 0, 0, OLDMAN_3w, 191, 128, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPole_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAMP_3w, 126, 35, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant5_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, TURN_3w, 65, 139, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNO_eye_3w, 0, 0, AUTO, 0, 0, 0, THING3, INVISIBLE, 0, 0, 0, 0, OLDMAN_3w, 237, 77, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_4_3w, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, OLDMAN_3w, 65, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMouth_3w, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 0, 0, 0, OLDMAN_3w, 191, 128, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPole_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAMP_3w, 126, 35, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant5_3w, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, TURN_3w, 65, 139, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, }; object_t objects_1d[] = { //name, description, path, dx, dy, aptr, seq, seqp, cyc, n, frm, rad, scr, x, y , oldxy, vxy, val, g, cmnd, c, s, ctx, fgb -{kNHero_1d, kDTthero_1d, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 229, 144, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHero_1d, kDTthero_1d, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 229, 144, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 0: (Outside house) -{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 0, 26, 131, 90, 90, 0, 0, 0, 1, kCMDdoor1_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 80, 148, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 59, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 95, 55, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNPkin_1d, kDTtpkin_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 10, 0, 20, 168, 90, 90, 0, 0, 2, 7, kCMDpkin_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNKey_1d, kDTtkey_1d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 5, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 0, 26, 131, 90, 90, 0, 0, 0, 1, kCMDdoor1_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 80, 148, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 59, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 0, 95, 55, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNPkin_1d, kDTtpkin_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 10, 0, 20, 168, 90, 90, 0, 0, 2, 7, kCMDpkin_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNKey_1d, kDTtkey_1d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 5, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 1: (Hall) -{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 125, 56, 90, 90, 0, 0, 0, 1, kCMDdoor2_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 208, 56, 90, 90, 0, 0, 0, 1, kCMDdoor3_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 23, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 7, 93, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNCandle_1d, kDTtcandle_1d, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 20, 1, 176, 131, 90, 90, 0, 0, 3, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCupb_1d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 90, 90, 0, 0, 0, 1, kCMDcupb_1d, 0, 0, 1, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNKnife_1d, kDTtknife_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 90, 90, 0, 0, 6, 3, kCMDknife_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNWhistle_1d, kDTtwhistle_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 90, 90, 0, 0, 6, 3, kCMDwhistle_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 125, 56, 90, 90, 0, 0, 0, 1, kCMDdoor2_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 208, 56, 90, 90, 0, 0, 0, 1, kCMDdoor3_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 23, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNEyes_1d, kDTteyes_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, 1, 7, 93, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNCandle_1d, kDTtcandle_1d, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 20, 1, 176, 131, 90, 90, 0, 0, 3, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCupb_1d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 90, 90, 0, 0, 0, 1, kCMDcupb_1d, 0, 0, 1, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNKnife_1d, kDTtknife_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 90, 90, 0, 0, 6, 3, kCMDknife_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNWhistle_1d, kDTtwhistle_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 1, 69, 161, 90, 90, 0, 0, 6, 3, kCMDwhistle_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, // Screen 2: (Bedroom 1) // Note how wardrobe doors are catered for: The wardrobe has a name but no images, // the right and left doors have no reference but are cycled by the wardrobe action list -{kNWard_1d, kDTtward_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 90, 90, 0, 0, 0, 1, kCMDward_1d, 0, 0, 1, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNWdoorl_1d, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 150, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWdoorr_1d, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 174, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMask_1d, kDTtmask_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 10, 2, 155, 100, 90, 90, 0, 0, 4, 7, kCMDmask_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMonkey_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 2, 229, 144, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWard_1d, kDTtward_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 1, 4, 4, 30, 2, 172, 113, 90, 90, 0, 0, 0, 1, kCMDward_1d, 0, 0, 1, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNWdoorl_1d, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 150, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWdoorr_1d, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 2, 174, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMask_1d, kDTtmask_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 10, 2, 155, 100, 90, 90, 0, 0, 4, 7, kCMDmask_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMonkey_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 2, 229, 144, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 3: (Dining room) -{kNButler_1d, kDTtbutler_1d, 0, AUTO, 0, 0, kALbutler_1d, PERSON, NOT_CYCLING, 0, 0, 0, DX, 3, 70, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNChop_1d, kDTtchop_1d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 20, 3, 69, 161, 90, 90, 0, 0, 8, 7, kCMDchop_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNRedeyes_1d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, 3, 212, 108, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNLips_1d, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 1, 1, 0, 3, 113, 105, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNArm_1d, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 5, 5, 0, 3, 166, 122, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNHdlshero_1d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNButler_1d, kDTtbutler_1d, 0, AUTO, 0, 0, kALbutler_1d, PERSON, NOT_CYCLING, 0, 0, 0, DX, 3, 70, 78, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNChop_1d, kDTtchop_1d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 20, 3, 69, 161, 90, 90, 0, 0, 8, 7, kCMDchop_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRedeyes_1d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, 3, 212, 108, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNLips_1d, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 1, 1, 0, 3, 113, 105, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNArm_1d, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 5, 5, 0, 3, 166, 122, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHdlshero_1d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 6: (Garden) -{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 6, 226, 58, 90, 90, 0, 0, 0, 1, kCMDdoor4_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNShed_1d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 60, 6, 277, 39, 90, 90, 0, 0, 0, 1, kCMDshed_1d, 0, 0, 1, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNOilcan_1d, kDTtoilcan_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 40, 6, 240, 65, 90, 90, 0, 0, 4, 3, kCMDoilcan_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_1d, kDTtdoor_1d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 6, 226, 58, 90, 90, 0, 0, 0, 1, kCMDdoor4_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNShed_1d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 60, 6, 277, 39, 90, 90, 0, 0, 0, 1, kCMDshed_1d, 0, 0, 1, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNOilcan_1d, kDTtoilcan_1d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 40, 6, 240, 65, 90, 90, 0, 0, 4, 3, kCMDoilcan_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, // Screen 7: (Store room) -{kNDog_1d, kDTtdog_1d, 0, AUTO, 0, 0, kALdoggy_1d, ANIMAL, NOT_CYCLING, 0, 0, 0, 20, 7, 105, 119, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCarpet_1d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 7, 191, 142, 90, 90, 0, 0, 0, 0, kCMDcarpet_1d, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNTrap_1d, 0, 0, AUTO, 0, 0, 0, THING4, INVISIBLE, 0, 2, 2, 20, 7, 216, 140, 90, 90, 0, 0, 0, 1, kCMDtrap_1d, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNBolt_1d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 7, 220, 145, 90, 90, 0, 0, 0, 1, kCMDbolt_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNHerodead_1d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDog_1d, kDTtdog_1d, 0, AUTO, 0, 0, kALdoggy_1d, ANIMAL, NOT_CYCLING, 0, 0, 0, 20, 7, 105, 119, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCarpet_1d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 7, 191, 142, 90, 90, 0, 0, 0, 0, kCMDcarpet_1d, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNTrap_1d, 0, 0, AUTO, 0, 0, 0, THING4, INVISIBLE, 0, 2, 2, 20, 7, 216, 140, 90, 90, 0, 0, 0, 1, kCMDtrap_1d, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNBolt_1d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 7, 220, 145, 90, 90, 0, 0, 0, 1, kCMDbolt_1d, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNHerodead_1d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 0, 24, 177, 90, 90, 0, 0, 0, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 9: (Batcave) -{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 65, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 130, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 65, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBat_1d, kDTtbat_1d, 0, AUTO, 0, 0, kALbats_1d, THING1, NOT_CYCLING, 0, 0, 0, 16, 9, 55, 130, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 10: (Mummy room) -{kNMummy_1d, 0, 0, AUTO, 0, 0, kALmummy_1d, PERSON, NOT_CYCLING, 0, 0, 0, DX, 10, 256, 77, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMdoor_1d, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 10, 258, 55, 90, 90, 0, 0, 0, 1, kCMDdoor4_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGold_1d, kDTtgold_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 208, 152, 90, 90, 0, 0, 10, 7, kCMDgold_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMummy_1d, 0, 0, AUTO, 0, 0, kALmummy_1d, PERSON, NOT_CYCLING, 0, 0, 0, DX, 10, 256, 77, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMdoor_1d, 0, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 0, 10, 258, 55, 90, 90, 0, 0, 0, 1, kCMDdoor4_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGold_1d, kDTtgold_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 208, 152, 90, 90, 0, 0, 10, 7, kCMDgold_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 11: (Lakeroom) -{kNBoat_1d, kDTtboat_1d, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 230, 118, 90, 90, 0, 0, 0, 1, kCMDboat_1d, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNRope_1d, kDTtrope_1d, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 220, 132, 90, 90, 0, 0, 0, 1, kCMDrope_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNOldman_1d, kDTtoldman_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 11, 160, 38, 90, 90, 0, 0, 0, 1, kCMDoldman_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWhero_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 11, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBoat_1d, kDTtboat_1d, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 230, 118, 90, 90, 0, 0, 0, 1, kCMDboat_1d, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRope_1d, kDTtrope_1d, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, 30, 11, 220, 132, 90, 90, 0, 0, 0, 1, kCMDrope_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNOldman_1d, kDTtoldman_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 11, 160, 38, 90, 90, 0, 0, 0, 1, kCMDoldman_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWhero_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 11, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 12: (Dead end) -{kNGuard_1d, kDTtguard_1d, 0, AUTO, 0, 0, 0, THING2d, NOT_CYCLING, 0, 0, 0, -1, 12, 147, 39, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGuard_1d, kDTtguard_1d, 0, AUTO, 0, 0, 0, THING2d, NOT_CYCLING, 0, 0, 0, -1, 12, 147, 39, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 15: (Laboratory) -{kNProf_1d, kDTtprof_1d, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 1, 150, 55, 90, 90, DX, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNIgor_1d, kDTtigor_1d, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 15, 180, 122, 90, 90, DX, 0, 0, 1, kCMDigor_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBung_1d, kDTtbung_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 14, 15, 75, 145, 90, 90, 0, 0, 11, 7, kCMDbung_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGdoor_1d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 15, 59, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNSpachero_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFuzyhero_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNArc_1d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, 15, 106, 74, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0} +{kNProf_1d, kDTtprof_1d, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 1, 150, 55, 90, 90, DX, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNIgor_1d, kDTtigor_1d, 0, AUTO, 0, 0, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 15, 180, 122, 90, 90, DX, 0, 0, 1, kCMDigor_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBung_1d, kDTtbung_1d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 14, 15, 75, 145, 90, 90, 0, 0, 11, 7, kCMDbung_1d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGdoor_1d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 15, 59, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSpachero_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFuzyhero_1d, 0, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 15, 100, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNArc_1d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, 15, 106, 74, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0} }; object_t objects_2d[] = { //name,description, path,dx,dy,aptr,seq,seqp, cyc,n,frm,rad,scr,x,y ,oldxy,vxy,val,g,cmnd,c,s,ctx,fgb -{kNHero_2d, kDTthero_2d, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 319, 199, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPenny_2d, kDTtpenny_2d, 0, AUTO, 0, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, 1, 109, 140, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHero_2d, kDTthero_2d, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 319, 199, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPenny_2d, kDTtpenny_2d, 0, AUTO, 0, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, 1, 109, 140, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 0: (Outside house) -{kNSmoke_2d, 0, 0, AUTO, 0, 0, 0, THING3, CYCLE_FORWARD, 0, 2, 0, 0, 0, 233, 20, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSmoke_2d, 0, 0, AUTO, 0, 0, 0, THING3, CYCLE_FORWARD, 0, 2, 0, 0, 0, 233, 20, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 1: (Hall) -{kNDoor_2d, kDTtdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 238, 40, 90, 90, 0, 0, 0, 1, kCMDdoor1_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLips_2d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 1, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNMaid_2d, kDTtmaid_2d, 0, AUTO, 0, 0, 0, PERSON4, NOT_CYCLING, 0, 0, 0, 8, 1, 149, 135, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_2d, kDTtdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 1, 238, 40, 90, 90, 0, 0, 0, 1, kCMDdoor1_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLips_2d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 1, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNMaid_2d, kDTtmaid_2d, 0, AUTO, 0, 0, 0, PERSON4, NOT_CYCLING, 0, 0, 0, 8, 1, 149, 135, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 2: (Bedroom 1) -{kNPennylie_2d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, -{kNPenfall_2d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBookcase_2d, kDTtbookcase_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 2, 70, 81, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBook_2d, kDTtbook_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 90, 140, 90, 90, 0, 0, 0, 1, kCMDbook_2d, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNKeyhole_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 28, 166, 90, 90, 0, 0, 0, 0, kCMDkeyhole_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPennylie_2d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, +{kNPenfall_2d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 10, 2, 24, 177, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBookcase_2d, kDTtbookcase_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 2, 70, 81, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBook_2d, kDTtbook_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 90, 140, 90, 90, 0, 0, 0, 1, kCMDbook_2d, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNKeyhole_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 10, 2, 28, 166, 90, 90, 0, 0, 0, 0, kCMDkeyhole_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 3: (Bedroom 2) -{kNPanel_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 3, 189, 91, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNCupb_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 3, 135, 142, 90, 90, 0, 0, 0, 0, kCMDlookdesk_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBird_2d, kDTtbird_2d, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, -1, 3, 186, 100, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNMatches_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 20, -1, 78, 30, 90, 90, 0, 0, 5, 7, kCMDmatches_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDumb_2d, kDTtdumb_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 3, 72, 138, 90, 90, 0, 0, 0, 1, kCMDdumb_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPanel_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 3, 189, 91, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNCupb_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 3, 135, 142, 90, 90, 0, 0, 0, 0, kCMDlookdesk_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBird_2d, kDTtbird_2d, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, -1, 3, 186, 100, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNMatches_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 20, 255, 78, 30, 90, 90, 0, 0, 5, 7, kCMDmatches_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDumb_2d, kDTtdumb_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 3, 72, 138, 90, 90, 0, 0, 0, 1, kCMDdumb_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 4: (Keyhole) -{kNMurder_2d, 0, 0, AUTO, 0, 0, 0, THING2e, CYCLE_FORWARD, 1, 2, 16, -1, 4, 141, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMurder_2d, 0, 0, AUTO, 0, 0, 0, THING2e, CYCLE_FORWARD, 1, 2, 16, -1, 4, 141, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 5: (Bed3) -{kNBalloon_2d, kDTtballoon_2d, 0, WANDER, DX/2, DY/2, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 5, 180, 40, 90, 90, 0, 0, 0, 1, kCMDballoon_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBalloon_2d, kDTtballoon_2d, 0, WANDER, DX/2, DY/2, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 5, 180, 40, 90, 90, 0, 0, 0, 1, kCMDballoon_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 6: (Kitchen) -{kNDumb_2d, kDTtdumb_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 6, 35, 152, 90, 90, 0, 0, 0, 1, kCMDdumb_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCupb_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 135, 142, 90, 90, 0, 0, 0, 0, kCMDlookcupb_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGarlic_2d, kDTtgarlic_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, -1, 78, 30, 90, 90, 0, 0, 5, 7, kCMDgarlic_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoor_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 290, 196, 90, 90, 0, 0, 0, 0, kCMDkdoor_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDumb_2d, kDTtdumb_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 6, 35, 152, 90, 90, 0, 0, 0, 1, kCMDdumb_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCupb_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 135, 142, 90, 90, 0, 0, 0, 0, kCMDlookcupb_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGarlic_2d, kDTtgarlic_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 255, 78, 30, 90, 90, 0, 0, 5, 7, kCMDgarlic_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 6, 290, 196, 90, 90, 0, 0, 0, 0, kCMDkdoor_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 8: (Shed) -{kNGardner_2d, kDTtgardner_2d, 0, WANDER, DX, DY, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 8, 250, 90, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGardner_2d, kDTtgardner_2d, 0, WANDER, DX, DY, 0, PERSON2, CYCLE_FORWARD, 0, 0, 0, -1, 8, 250, 90, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 9: In shed -{kNButton_2d, kDTtbutton_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDbutton_2d, 0, 1, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNRed_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDred_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNYellow_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDyellow_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGreen_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDgreen_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBlue_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDblue_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNShedlight_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 9, 161, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNButton_2d, kDTtbutton_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDbutton_2d, 0, 1, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRed_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDred_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNYellow_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDyellow_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGreen_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDgreen_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBlue_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 9, 190, 137, 90, 90, 0, 0, 0, 1, kCMDblue_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNShedlight_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, -1, 9, 161, 48, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 10: Venus fly traps -{kNMagnify_2d, kDTtmagnify_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 95, 96, 90, 90, 0, 0, 15, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFly_2d, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 48, 60, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFly_2d, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 58, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFly_2d, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 268, 90, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 48, 86, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 20, 10, 79, 104, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 71, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 3, 0, 20, 10, 116, 113, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 1, 20, 10, 164, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 20, 10, 185, 83, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 232, 96, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 273, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMagnify_2d, kDTtmagnify_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 10, 95, 96, 90, 90, 0, 0, 15, 7, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFly_2d, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 48, 60, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFly_2d, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 58, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFly_2d, 0, 0, WANDER2, DX, DY, 0, THING2, NOT_CYCLING, 0, 1, 0, 20, 10, 268, 90, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 48, 86, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 20, 10, 79, 104, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 71, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 3, 0, 20, 10, 116, 113, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 1, 20, 10, 164, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 2, 0, 20, 10, 185, 83, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 232, 96, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLeaf_2d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 1, 0, 20, 10, 273, 141, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 11: Gates -{kNGatelight_2d, 0, 0, AUTO, 0, 0, 0, THING1, ALMOST_INVISIBLE, 1, 0, 0, -1, 11, 90, 72, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGatelight_2d, 0, 0, AUTO, 0, 0, 0, THING1, ALMOST_INVISIBLE, 1, 0, 0, -1, 11, 90, 72, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 13: Stream -{kNCatnip_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, 13, 211, 136, 90, 90, 0, 0, 5, 3, kCMDcatnip_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCatnip_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, 13, 211, 136, 90, 90, 0, 0, 5, 3, kCMDcatnip_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 14: Zapper -{kNZapper_2d, kDTtzapper_2d, 0, AUTO, 0, 0, 0, THING1, ALMOST_INVISIBLE, 1, 0, 0, -1, 14, 134, 46, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNZapper_2d, kDTtzapper_2d, 0, AUTO, 0, 0, 0, THING1, ALMOST_INVISIBLE, 1, 0, 0, -1, 14, 134, 46, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBug_2d, kDTtbug_2d, 0, AUTO, 0, 0, kALbugs_2d, THING2, CYCLE_FORWARD, 0, 0, 0, 16, 14, 65, 25, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 15: Mushroom -{kNOldman_2d, kDTtoldman_2d, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 1, 0, 0, -1, 15, 126, 77, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNOldman_2d, kDTtoldman_2d, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 1, 0, 0, -1, 15, 126, 77, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 16: Well -{kNWell_2d, kDTtwell_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 16, 211, 136, 90, 90, 0, 0, 0, 1, kCMDwell_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWell_2d, kDTtwell_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 16, 211, 136, 90, 90, 0, 0, 0, 1, kCMDwell_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 17: Snakepit -{kNSnake_2d, kDTtsnake_2d, 0, CHASE2, DX, DY, kALsnake_2d, PERSON2, CYCLE_FORWARD, 0, 0, 0, 16, 17, 165, 95, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSnake_2d, kDTtsnake_2d, 0, CHASE2, DX, DY, kALsnake_2d, PERSON2, CYCLE_FORWARD, 0, 0, 0, 16, 17, 165, 95, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 18: Phonebox -{kNTardis_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 18, 21, 74, 90, 90, 0, 0, 0, 0, kCMDtardis_2d, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNTardis_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 50, 18, 21, 74, 90, 90, 0, 0, 0, 0, kCMDtardis_2d, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 20: Kennel -{kNStick_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 20, 89, 120, 90, 90, 0, 0, 5, 3, kCMDstick_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDynamite_2d, kDTtdynamite_2d, 0, AUTO, 0, 0, 0, THING2a, INVISIBLE, 0, 0, 0, 30, 20, 200, 100, 90, 90, 0, 0, 0, 7, kCMDdynamite_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNKennel_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 20, 195, 114, 90, 90, 0, 0, 0, 0, kCMDkennel_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDog_2d, kDTtdog_2d, 0, AUTO, 0, 0, 0, THING2f, CYCLE_FORWARD, 0, 2, 0, 30, 20, 184, 80, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNStick_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 20, 89, 120, 90, 90, 0, 0, 5, 3, kCMDstick_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDynamite_2d, kDTtdynamite_2d, 0, AUTO, 0, 0, 0, THING2a, INVISIBLE, 0, 0, 0, 30, 20, 200, 100, 90, 90, 0, 0, 0, 7, kCMDdynamite_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNKennel_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 20, 195, 114, 90, 90, 0, 0, 0, 0, kCMDkennel_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDog_2d, kDTtdog_2d, 0, AUTO, 0, 0, 0, THING2f, CYCLE_FORWARD, 0, 2, 0, 30, 20, 184, 80, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 21: (Rockroom) -{kNRope_2d, kDTtrope_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 21, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRope_2d, kDTtrope_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 21, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 22: (Rockgone) -{kNRope_2d, kDTtrope_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 22, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRope_2d, kDTtrope_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 60, 22, 78, 30, 90, 90, 0, 0, 0, 1, kCMDrope_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 24: (Lampcave) -{kNLamp_2d, kDTtlamp_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 24, 78, 114, 90, 90, 0, 0, 10, 7, kCMDlamp_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLamp_2d, kDTtlamp_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, 24, 78, 114, 90, 90, 0, 0, 10, 7, kCMDlamp_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 25: (Chasm) -{kNBanana_2d, kDTtbanana_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 25, 254, 107, 90, 90, 0, 0, 5, 7, kCMDbanana_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBanana_2d, kDTtbanana_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 20, 25, 254, 107, 90, 90, 0, 0, 5, 7, kCMDbanana_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 27: (Ladder) -{kNGenie_2d, kDTtgenie_2d, 0, AUTO, 0, 0, 0, PERSON3, INVISIBLE, 0, 0, 0, 30, 27, 138, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGenie_2d, kDTtgenie_2d, 0, AUTO, 0, 0, 0, PERSON3, INVISIBLE, 0, 0, 0, 30, 27, 138, 70, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 28: (Traproom) -{kNSafe_2d, kDTtsafe_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 90, 90, 0, 0, 0, 1, kCMDsafe_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWill_2d, kDTtwill_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 90, 90, 0, 0, 5, 7, kCMDwill_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSafe_2d, kDTtsafe_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 90, 90, 0, 0, 0, 1, kCMDsafe_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWill_2d, kDTtwill_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 28, 122, 144, 90, 90, 0, 0, 5, 7, kCMDwill_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 31: (Parlor) -{kNCupb_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 212, 142, 90, 90, 0, 0, 0, 0, kCMDcupbp_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoor_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 28, 154, 90, 90, 0, 0, 0, 0, kCMDpdoor_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNAlbum_2d, kDTtalbum_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, -1, 212, 142, 90, 90, 0, 0, 5, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCupb_2d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 212, 142, 90, 90, 0, 0, 0, 0, kCMDcupbp_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 31, 28, 154, 90, 90, 0, 0, 0, 0, kCMDpdoor_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNAlbum_2d, kDTtalbum_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 55, 255, 212, 142, 90, 90, 0, 0, 5, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 32: (Catroom) -{kNCat_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING2b, CYCLE_FORWARD, 0, 2, 0, 40, 32, 189, 69, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCat_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING2b, CYCLE_FORWARD, 0, 2, 0, 40, 32, 189, 69, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 33: (Boxroom) -{kNDoor_2d, kDTtbdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 33, 137, 97, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPaper_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 20, 33, 205, 147, 90, 90, 0, 0, 5, 7, kCMDpaper_2d, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, -{kNPencil_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 20, 33, 205, 163, 90, 90, 0, 0, 5, 7, kCMDpencil_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_2d, kDTtbdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 33, 137, 97, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPaper_2d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 20, 33, 205, 147, 90, 90, 0, 0, 5, 7, kCMDpaper_2d, 0, 0, 0, BACKGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNPencil_2d, kDTdull_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 1, 0, 0, 20, 33, 205, 163, 90, 90, 0, 0, 5, 7, kCMDpencil_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 34: (Hall3) -{kNDoor_2d, kDTtdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 234, 73, 90, 90, 0, 0, 0, 1, kCMDdoor2_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoor_2d, kDTtdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 103, 73, 90, 90, 0, 0, 0, 1, kCMDdoor3_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_2d, kDTtdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 234, 73, 90, 90, 0, 0, 0, 1, kCMDdoor2_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_2d, kDTtdoor_2d, 0, AUTO, 0, 0, 0, THING4, NOT_CYCLING, 1, 4, 4, 16, 34, 103, 73, 90, 90, 0, 0, 0, 1, kCMDdoor3_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 35: (Organ) -{kNHarry_2d, kDTtharry_2d, 0, AUTO, DX, DY, 0, THING2g, CYCLE_FORWARD, 0, 2, 0, -1, 35, 188, 84, 90, 90, 0, 0, 0, 1, kCMDharry_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHarry_2d, kDTtharry_2d, 0, AUTO, DX, DY, 0, THING2g, CYCLE_FORWARD, 0, 2, 0, -1, 35, 188, 84, 90, 90, 0, 0, 0, 1, kCMDharry_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 36: (Hestroom) -{kNHester_2d, kDTthester_2d, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 30, 36, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLetter_2d, kDTtletter_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 36, 110, 150, 90, 90, 0, 0, 0, 1, kCMDletter_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHester_2d, kDTthester_2d, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 30, 36, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLetter_2d, kDTtletter_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 30, 36, 110, 150, 90, 90, 0, 0, 0, 1, kCMDletter_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Screen 37: (Retupmoc) -{kNDoctor_2d, kDTtdoctor_2d, 0, WANDER, DX, DY, kALdoctor_2d, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDalek_2d, kDTtdalek_2d, 0, CHASE2, DX, DY, kALdalek_2d, PERSON5, NOT_CYCLING, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 1, kCMDgun_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNScrew_2d, kDTtscrew_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 37, 100, 123, 90, 90, 0, 0, 15, 3, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoctor_2d, kDTtdoctor_2d, 0, WANDER, DX, DY, kALdoctor_2d, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDalek_2d, kDTtdalek_2d, 0, CHASE2, DX, DY, kALdalek_2d, PERSON5, NOT_CYCLING, 0, 0, 0, -1, 37, 78, 114, 90, 90, 0, 0, 0, 1, kCMDgun_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNScrew_2d, kDTtscrew_2d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 20, 37, 100, 123, 90, 90, 0, 0, 15, 3, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // Misc: -{kNCook_2d, kDTtcook_2d, 0, AUTO, DX, DY, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 06, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCookb_2d, kDTtcook_2d, 0, AUTO, 0, 0, 0, THING4, CYCLE_FORWARD, 0, 0, 0, 30, -1, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCop_2d, kDTtcop_2d, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 30, 29, 180, 47, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNHorace_2d, kDTthorace_2d, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 34, 215, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBell_2d, kDTtbell_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 15, 149, 109, 90, 90, 0, 0, 5, 7, kCMDbell_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNGun_2d, kDTtgun_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 26, 149, 109, 90, 90, 0, 0, 10, 7, kCMDgun_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBottle_2d, kDTtbottle_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 27, 149, 109, 90, 90, 0, 0, 15, 7, kCMDbottle_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCook_2d, kDTtcook_2d, 0, AUTO, DX, DY, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 06, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCookb_2d, kDTtcook_2d, 0, AUTO, 0, 0, 0, THING4, CYCLE_FORWARD, 0, 0, 0, 30, 255, 98, 98, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCop_2d, kDTtcop_2d, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 30, 29, 180, 47, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHorace_2d, kDTthorace_2d, 0, AUTO, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 30, 34, 215, 76, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBell_2d, kDTtbell_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 15, 149, 109, 90, 90, 0, 0, 5, 7, kCMDbell_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNGun_2d, kDTtgun_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 26, 149, 109, 90, 90, 0, 0, 10, 7, kCMDgun_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBottle_2d, kDTtbottle_2d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, MAZE_SCREEN + 27, 149, 109, 90, 90, 0, 0, 15, 7, kCMDbottle_2d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, }; object_t objects_3d[] = { //name,description,path,dx,dy,aptr,SPRITE, cyc, n,frm,rad, scr,x,y ,oldxy,vxy,val,g,cmnd,c,s,ctx,fgb // Common objects // Set Penny state to 3 to avoid story -{kNHero_3d, kDTthero_3d, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 161, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWhero_3d, kDTthero_3d, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 219, 133, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHero_3d, kDTthero_3d, 0, USER, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, 0, 0, 161, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWhero_3d, kDTthero_3d, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 219, 133, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, //#if NO_STORY -//{kNPenny_3d, kDTtpenny_3d, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 3, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +//{kNPenny_3d, kDTtpenny_3d, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 3, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, //#else -{kNPenny_3d, kDTtpenny_3d, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPenny_3d, kDTtpenny_3d, 0, AUTO, 0, 0, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, 0, 109, 110, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, //#endif -{kNPennylie_3d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, -1, WEB_3d, 75, 156, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNLips_3d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 0, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNPennylie_3d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, -1, WEB_3d, 75, 156, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNLips_3d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 0, 0, 186, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, // CRASH site -{kNPlane_3d, kDTtplane_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, CRASH_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcplane_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoor_3d, kDTdull_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 80, CRASH_3d, 184, 136, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant1_3d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 0, CRASH_3d, 132, 165, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, +{kNPlane_3d, kDTtplane_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, CRASH_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcplane_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoor_3d, kDTdull_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, 80, CRASH_3d, 184, 136, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant1_3d, 0, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 0, CRASH_3d, 132, 165, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, // INPLANE -{kNPlane_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, PLANE_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcexit_3d, 0, 0, 1,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwfall_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_B_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwfall_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwstream_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, GARDEN_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwpool_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNClay_3d, kDTtclay_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 162, 96, 90, 90, 0, 0, 5, 7, kCMDcclay_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNeedles_3d, kDTtneedles_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 172, 90, 90, 90, 0, 0, 5, 7, kCMDcpins_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFlask_3d, kDTtflask_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 190, 90, 90, 90, 0, 0, 5, 7, kCMDcflask_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBouillon_3d, kDTtbouillon_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 185, 94, 90, 90, 0, 0, 5, 7, kCMDcbouillon_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCheese_3d, kDTtcheese_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 185, 100, 90, 90, 0, 0, 5, 1, kCMDccheese_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlane_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, PLANE_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcexit_3d, 0, 0, 1, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwfall_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, WFALL_B_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwfall_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwstream_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNWater_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, GARDEN_3d, 184, 136, 90, 90, 0, 0, 0, 0, kCMDcwpool_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNClay_3d, kDTtclay_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 162, 96, 90, 90, 0, 0, 5, 7, kCMDcclay_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNeedles_3d, kDTtneedles_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 172, 90, 90, 90, 0, 0, 5, 7, kCMDcpins_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFlask_3d, kDTtflask_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 190, 90, 90, 90, 0, 0, 5, 7, kCMDcflask_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBouillon_3d, kDTtbouillon_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 185, 94, 90, 90, 0, 0, 5, 7, kCMDcbouillon_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCheese_3d, kDTtcheese_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, PLANE_3d, 185, 100, 90, 90, 0, 0, 5, 1, kCMDccheese_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // WEB -{kNSpider_3d, kDTtspider_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, WEB_3d, 77, 50, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant3_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3d, 245, 117, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant4_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3d, 285, 90, 91, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSpider_3d, kDTtspider_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, WEB_3d, 77, 50, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant3_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3d, 245, 117, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant4_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, WEB_3d, 285, 90, 91, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // BRIDGE -{kNBlock_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3d, 225, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBlock_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3d, 225, 134, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBlock_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3d, 225, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNVine_3d, kDTtvine_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, BRIDGE_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcvine_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBlock_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3d, 225, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBlock_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3d, 225, 134, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBlock_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, BRIDGE_3d, 225, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNVine_3d, kDTtvine_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, BRIDGE_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcvine_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // STREAM -{kNVine_3d, kDTtvine_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcswing_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNSwinger_3d, 0, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 0, STREAM_3d, 219, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNVine_3d, kDTtvine_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, STREAM_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcswing_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNSwinger_3d, 0, 0, AUTO, 0, 0, 0, PERSON2, INVISIBLE, 0, 0, 0, 0, STREAM_3d, 219, 133, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // HUT_IN -{kNDoctor_3d, kDTtdoctor_3d, 0, WANDER, DX, DY, kALdocgot_3d, PERSON3, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3d, 273, 83, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNDoclie_3d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 30, HUT_IN_3d, 239, 103, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCdoor_3d, kDTdull_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 40, HUT_IN_3d, 239, 103, 90, 90, 0, 0, 0, 1, kCMDcdoor_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMouse_3d, kDTtmouse_3d, 0, AUTO, 0, 0, 0, THING2b, INVISIBLE, 0, 0, 0, 30, HUT_IN_3d, 186, 170, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMoushole_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3d, 203, 122, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCage_3d, kDTtcage_3d, 0, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3d, 156, 121, 90, 90, 0, 0, 1, 5, kCMDccage_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_1_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3d, 127, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_1_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3d, 172, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_2_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_IN_3d, 30, 145, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_3_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, CAMP_3d, 120, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoctor_3d, kDTtdoctor_3d, 0, WANDER, DX, DY, kALdocgot_3d, PERSON3, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3d, 273, 83, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNDoclie_3d, 0, 0, AUTO, 0, 0, 0, THING2, INVISIBLE, 0, 0, 0, 30, HUT_IN_3d, 239, 103, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCdoor_3d, kDTdull_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 40, HUT_IN_3d, 239, 103, 90, 90, 0, 0, 0, 1, kCMDcdoor_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMouse_3d, kDTtmouse_3d, 0, AUTO, 0, 0, 0, THING2b, INVISIBLE, 0, 0, 0, 30, HUT_IN_3d, 186, 170, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMoushole_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3d, 203, 122, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCage_3d, kDTtcage_3d, 0, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 0, 0, 30, HUT_IN_3d, 156, 121, 90, 90, 0, 0, 1, 5, kCMDccage_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_1_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3d, 127, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_1_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_OUT_3d, 172, 100, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_2_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, HUT_IN_3d, 30, 145, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_3_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, CAMP_3d, 120, 135, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // CAMP -{kNNat1_3d, kDTtnative_3d, 0, WANDER, DX, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, CAMP_3d, 130, 105, 90, 90, 0, 0, 0, 1, kCMDcnative_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNat2_3d, kDTtnative_3d, 0, AUTO, DX, DY, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3d, 17, 97, 90, 90, 4, 0, 0, 1, kCMDcnative_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNat3_3d, kDTtnative_3d, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 16, 0, -1, CAMP_3d, 96, 40, 90, 90, 0, 0, 0, 1, kCMDcnative_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNatb_3d, kDTtnative_3d, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 20, 0, -1, CAMP_3d, 72, 51, 90, 90, 0, 0, 0, 1, kCMDcnative_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNNatg_3d, kDTtnatgirl_3d, 0, AUTO, DX, DY, kALnative_3d, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3d, 28, 101, 90, 90, 3, 0, 0, 1, kCMDcnative_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPipe_3d, kDTtpipe_3d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, CAMP_3d, 225, 135, 90, 90, 0, 0, 0, 7, kCMDcdart_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNat1_3d, kDTtnative_3d, 0, WANDER, DX, 0, 0, PERSON, NOT_CYCLING, 0, 0, 0, -1, CAMP_3d, 130, 105, 90, 90, 0, 0, 0, 1, kCMDcnative_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNat2_3d, kDTtnative_3d, 0, AUTO, DX, DY, 0, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3d, 17, 97, 90, 90, 4, 0, 0, 1, kCMDcnative_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNat3_3d, kDTtnative_3d, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 16, 0, -1, CAMP_3d, 96, 40, 90, 90, 0, 0, 0, 1, kCMDcnative_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNatb_3d, kDTtnative_3d, 0, AUTO, DX, DY, 0, THING2, CYCLE_FORWARD, 0, 20, 0, -1, CAMP_3d, 72, 51, 90, 90, 0, 0, 0, 1, kCMDcnative_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNNatg_3d, kDTtnatgirl_3d, 0, AUTO, DX, DY, kALnative_3d, PERSON, CYCLE_FORWARD, 0, 0, 0, -1, CAMP_3d, 28, 101, 90, 90, 3, 0, 0, 1, kCMDcnative_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPipe_3d, kDTtpipe_3d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, CAMP_3d, 225, 135, 90, 90, 0, 0, 0, 7, kCMDcdart_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // PATH_2 -{kNElephant_3d, kDTtelephant_3d, 0, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 4, 0, -1, PATH_3d, 163, 85, 90, 90, 0, 0, 0, 1, kCMDcdart_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNE_eyes_3d, 0, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, PATH_3d, 194, 102, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, +{kNElephant_3d, kDTtelephant_3d, 0, AUTO, 0, 0, 0, THING2a, NOT_CYCLING, 0, 4, 0, -1, PATH_3d, 163, 85, 90, 90, 0, 0, 0, 1, kCMDcdart_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNE_eyes_3d, 0, 0, AUTO, 0, 0, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, PATH_3d, 194, 102, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FOREGROUND, -1, -1, -1, 0, 0, 0, 0}, // Misc -{kNHero_old_3d, 0, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 161, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNAircraft_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, SUNSET_3d, 275, 116, 90, 90, -2, -1, 0, 1, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNScroll_3d, kDTtscroll_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFFTOP_3d, 75, 116, 90, 90, 0, 0, 3, 7, kCMDcscroll_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCrystal_3d, kDTtcrystal_3d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, TURN_3d, 275, 116, 90, 90, 0, 0, 9, 7, kCMDccrystal_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNRock_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, TURN_3d, 100, 100, 90, 90, 0, 0, 0, 0, kCMDcrock_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNHero_old_3d, 0, 0, USER, 0, 0, 0, PERSON, INVISIBLE, 0, 0, 0, 0, 0, 161, 120, 90, 90, 0, 0, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNAircraft_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, -1, SUNSET_3d, 275, 116, 90, 90, -2, -1, 0, 1, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNScroll_3d, kDTtscroll_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFFTOP_3d, 75, 116, 90, 90, 0, 0, 3, 7, kCMDcscroll_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCrystal_3d, kDTtcrystal_3d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, TURN_3d, 275, 116, 90, 90, 0, 0, 9, 7, kCMDccrystal_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNRock_3d, 0, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, TURN_3d, 100, 100, 90, 90, 0, 0, 0, 0, kCMDcrock_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // CAVE etc. -{kNPlant2_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAVE_3d, 27, 160, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,OVEROVL, -1, -1, -1, 0, 0, 0, 0}, -{kNGhost_3d, kDTtghost_3d, 0, CHASE, DX, DY, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, CAVE_3d, 121, 86, 90, 90, 0, 0, 0, 1, kCMDcghost_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBell_3d, kDTtbell_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFF_3d, 202, 152, 90, 90, 0, 0, 2, 7, kCMDcbell_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNBook_3d, kDTtbook_3d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, STREAM_3d, 275, 116, 90, 90, 0, 0, 10, 7, kCMDcbook_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNCandle_3d, kDTtcandle_3d, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 20, 0, 30, HUT_IN_3d, 77, 134, 90, 90, 0, 0, 3, 7, kCMDccandle_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNVine_3d, kDTtvine_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, CAVE_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcswingc_3d, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant2_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAVE_3d, 27, 160, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, OVEROVL, -1, -1, -1, 0, 0, 0, 0}, +{kNGhost_3d, kDTtghost_3d, 0, CHASE, DX, DY, 0, THING2c, NOT_CYCLING, 0, 0, 0, -1, CAVE_3d, 121, 86, 90, 90, 0, 0, 0, 1, kCMDcghost_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBell_3d, kDTtbell_3d, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 30, CLIFF_3d, 202, 152, 90, 90, 0, 0, 2, 7, kCMDcbell_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNBook_3d, kDTtbook_3d, 0, AUTO, 0, 0, 0, THING1, INVISIBLE, 0, 0, 0, 30, STREAM_3d, 275, 116, 90, 90, 0, 0, 10, 7, kCMDcbook_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNCandle_3d, kDTtcandle_3d, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 20, 0, 30, HUT_IN_3d, 77, 134, 90, 90, 0, 0, 3, 7, kCMDccandle_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNVine_3d, kDTtvine_3d, 0, AUTO, 0, 0, 0, THING0, INVISIBLE, 0, 0, 0, -1, CAVE_3d, 184, 136, 90, 90, 0, 0, 0, 1, kCMDcswingc_3d, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, // OLDMAN (inside cave) -{kNO_eye_3d, 0, 0, AUTO, 0, 0, 0, THING3, INVISIBLE, 0, 0, 0, 0, OLDMAN_3d, 237, 77, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNFire_4_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, OLDMAN_3d, 65, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNMouth_3d, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 0, 0, 0, OLDMAN_3d, 191, 128, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPole_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAMP_3d, 126, 35, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, -{kNPlant5_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, TURN_3d, 65, 139, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0,FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNO_eye_3d, 0, 0, AUTO, 0, 0, 0, THING3, INVISIBLE, 0, 0, 0, 0, OLDMAN_3d, 237, 77, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNFire_4_3d, 0, 0, AUTO, 0, 0, 0, THING2, CYCLE_FORWARD, 0, 0, 0, 0, OLDMAN_3d, 65, 56, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNMouth_3d, 0, 0, AUTO, 0, 0, 0, THING2, NOT_CYCLING, 0, 0, 0, 0, OLDMAN_3d, 191, 128, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPole_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, CAMP_3d, 126, 35, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, +{kNPlant5_3d, 0, 0, AUTO, 0, 0, 0, THING1, NOT_CYCLING, 0, 0, 0, 0, TURN_3d, 65, 139, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, FLOATING, -1, -1, -1, 0, 0, 0, 0}, }; // Hugo 1 Win |