[Scummvm-cvs-logs] SF.net SVN: scummvm: [32505] scummvm/branches/gsoc2008-rtl

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Mon Jun 2 23:36:46 CEST 2008


Revision: 32505
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32505&view=rev
Author:   cpage88
Date:     2008-06-02 14:36:45 -0700 (Mon, 02 Jun 2008)

Log Message:
-----------
Merged revisions 32348-32349,32351-32356,32358-32411,32413-32441,32443-32445,32449,32453-32454,32456-32457,32459-32462,32464-32465,32467-32492,32494-32503 via svnmerge from 
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/README
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/Makefile
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/source/main.cpp
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/buildkeyboard.bat
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/lib/readme.txt
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/makefile
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/cdaudio.cpp
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/compressor/lz.h
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/dsmain.cpp
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/disc_io.h
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/io_efa2.h
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.cpp
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.h
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/mad/readme.txt
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/osystem_ds.cpp
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.cpp
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.h
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/wordcompletion.h
    scummvm/branches/gsoc2008-rtl/backends/platform/ds/makefile
    scummvm/branches/gsoc2008-rtl/base/plugins.h
    scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp
    scummvm/branches/gsoc2008-rtl/common/advancedDetector.h
    scummvm/branches/gsoc2008-rtl/common/module.mk
    scummvm/branches/gsoc2008-rtl/configure
    scummvm/branches/gsoc2008-rtl/dists/msvc7/drascula.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc7/gob.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc7/scummvm.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc71/drascula.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc71/gob.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc71/scummvm.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc8/drascula.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc8/gob.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc8/scummvm.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc9/drascula.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc9/gob.vcproj
    scummvm/branches/gsoc2008-rtl/dists/msvc9/scummvm.vcproj
    scummvm/branches/gsoc2008-rtl/engines/cine/anim.cpp
    scummvm/branches/gsoc2008-rtl/engines/cine/gfx.cpp
    scummvm/branches/gsoc2008-rtl/engines/cine/object.cpp
    scummvm/branches/gsoc2008-rtl/engines/cine/script.h
    scummvm/branches/gsoc2008-rtl/engines/cine/script_fw.cpp
    scummvm/branches/gsoc2008-rtl/engines/cine/script_os.cpp
    scummvm/branches/gsoc2008-rtl/engines/drascula/animation.cpp
    scummvm/branches/gsoc2008-rtl/engines/drascula/detection.cpp
    scummvm/branches/gsoc2008-rtl/engines/drascula/drascula.cpp
    scummvm/branches/gsoc2008-rtl/engines/drascula/drascula.h
    scummvm/branches/gsoc2008-rtl/engines/drascula/module.mk
    scummvm/branches/gsoc2008-rtl/engines/drascula/rooms.cpp
    scummvm/branches/gsoc2008-rtl/engines/drascula/talk.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/draw_v1.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/draw_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/game.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/game.h
    scummvm/branches/gsoc2008-rtl/engines/gob/game_v1.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/game_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/global.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/global.h
    scummvm/branches/gsoc2008-rtl/engines/gob/gob.h
    scummvm/branches/gsoc2008-rtl/engines/gob/goblin.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/goblin_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/goblin_v4.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/init.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter.h
    scummvm/branches/gsoc2008-rtl/engines/gob/inter_v1.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter_v4.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/map_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/map_v4.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/module.mk
    scummvm/branches/gsoc2008-rtl/engines/gob/mult.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/parse.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/parse_v1.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/parse_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/saveload.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/saveload.h
    scummvm/branches/gsoc2008-rtl/engines/gob/saveload_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/saveload_v3.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/saveload_v4.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/sound/sound.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/videoplayer.cpp
    scummvm/branches/gsoc2008-rtl/engines/kyra/detection.cpp
    scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_hof.cpp
    scummvm/branches/gsoc2008-rtl/engines/kyra/resource.cpp
    scummvm/branches/gsoc2008-rtl/engines/kyra/resource.h
    scummvm/branches/gsoc2008-rtl/engines/kyra/script_tim.cpp
    scummvm/branches/gsoc2008-rtl/engines/kyra/script_tim.h
    scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_hof.cpp
    scummvm/branches/gsoc2008-rtl/engines/made/database.cpp
    scummvm/branches/gsoc2008-rtl/engines/made/database.h
    scummvm/branches/gsoc2008-rtl/engines/made/made.cpp
    scummvm/branches/gsoc2008-rtl/engines/made/made.h
    scummvm/branches/gsoc2008-rtl/engines/made/screen.cpp
    scummvm/branches/gsoc2008-rtl/engines/made/screen.h
    scummvm/branches/gsoc2008-rtl/engines/made/screenfx.cpp
    scummvm/branches/gsoc2008-rtl/engines/made/screenfx.h
    scummvm/branches/gsoc2008-rtl/engines/made/scriptfuncs.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_br.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parser.h
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parser_br.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parser_ns.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/staticres.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/detection_tables.h
    scummvm/branches/gsoc2008-rtl/engines/scumm/scumm-md5.h
    scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.h
    scummvm/branches/gsoc2008-rtl/engines/scumm/string.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/verbs.cpp
    scummvm/branches/gsoc2008-rtl/engines/sword1/control.cpp
    scummvm/branches/gsoc2008-rtl/engines/sword2/palette.cpp
    scummvm/branches/gsoc2008-rtl/engines/sword2/screen.cpp
    scummvm/branches/gsoc2008-rtl/engines/sword2/screen.h
    scummvm/branches/gsoc2008-rtl/engines/sword2/sword2.cpp
    scummvm/branches/gsoc2008-rtl/engines/sword2/sword2.h
    scummvm/branches/gsoc2008-rtl/sound/audiostream.cpp
    scummvm/branches/gsoc2008-rtl/tools/scumm-md5.txt

Added Paths:
-----------
    scummvm/branches/gsoc2008-rtl/common/unarj.cpp
    scummvm/branches/gsoc2008-rtl/common/unarj.h
    scummvm/branches/gsoc2008-rtl/engines/drascula/staticdata.h
    scummvm/branches/gsoc2008-rtl/engines/gob/variables.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/variables.h

Removed Paths:
-------------
    scummvm/branches/gsoc2008-rtl/engines/drascula/texts.cpp

Property Changed:
----------------
    scummvm/branches/gsoc2008-rtl/


Property changes on: scummvm/branches/gsoc2008-rtl
___________________________________________________________________
Name: svnmerge-integrated
   - /scummvm/branches/gsoc2008-gui:1-31703 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/trunk:1-32347
   + /scummvm/branches/gsoc2008-gui:1-31703 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/trunk:1-32504

Modified: scummvm/branches/gsoc2008-rtl/README
===================================================================
--- scummvm/branches/gsoc2008-rtl/README	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/README	2008-06-02 21:36:45 UTC (rev 32505)
@@ -245,7 +245,8 @@
 
      Backyard Baseball                           [baseball]
      Backyard Soccer                             [soccer]
-     Blue's ABC Time                             [BluesABCTime]
+     Blue's 123 Time Activities                  [Blues123Time]
+     Blue's ABC Time Activities                  [BluesABCTime]
      Blue's Birthday Adventure                   [BluesBirthday]
      SPY Fox 3: Operation Ozone                  [spyozon]
 

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/Makefile
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/Makefile	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/Makefile	2008-06-02 21:36:45 UTC (rev 32505)
@@ -68,7 +68,8 @@
 # list of directories containing libraries, this must be the top level containing
 # include and lib
 #---------------------------------------------------------------------------------
-LIBDIRS	:=	/home/neil/devkitpror21/libnds home/neil/devkitpror21/libnds/nds
+#LIBDIRS	:=	/home/neil/devkitpror21/libnds home/neil/devkitpror21/libnds/nds
+LIBDIRS	:=	$(DEVKITPRO)/libnds
 
 
 #---------------------------------------------------------------------------------
@@ -127,7 +128,11 @@
 	@echo clean ...$(TARGET)
 	@rm -fr $(BUILD) *.bin
 
+#---------------------------------------------------------------------------------
+semiclean:
+	@echo semiclean ...$(TARGET)
 
+
 #---------------------------------------------------------------------------------
 else
 

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/source/main.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/source/main.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm7/source/main.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -36,7 +36,7 @@
 #include <arm7/clock.h>
 #include <stdlib.h>
 #include <string.h>
-#include <registers_alt.h>
+//#include <registers_alt.h>	// not needed in current libnds
 #include <NDS/scummvm_ipc.h>
 //////////////////////////////////////////////////////////////////////
 #ifdef USE_DEBUGGER
@@ -261,6 +261,9 @@
   REG_SPICNT = SPI_ENABLE | SPI_BAUD_1MHz;
   REG_SPIDATA = enable? (result | data): (result & ~data);
   SerialWaitBusy();
+  
+  // FIXME: This function should either return something, or have a comment
+  // explaining why it is valid for it to not return something. :-)
 }
 
 /*

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/buildkeyboard.bat
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/buildkeyboard.bat	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/buildkeyboard.bat	2008-06-02 21:36:45 UTC (rev 32505)
@@ -2,7 +2,3 @@
 ..\tools\gfx2gba -c16 -t8 -M -pkeyboard_pal.raw ..\keyboard.bmp
 del keyboard.map
 pause
-cd data
-..\tools\gfx2gba -c16 -t8 -M -pkeyboard_pal.raw ..\keyboard.bmp
-del keyboard.map
-pause
\ No newline at end of file

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/lib/readme.txt
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/lib/readme.txt	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/lib/readme.txt	2008-06-02 21:36:45 UTC (rev 32505)
@@ -1,2 +1 @@
 If building with MAD enabled, put libmad.a in here.
-If building with MAD enabled, put libmad.a in here.
\ No newline at end of file

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/makefile
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/makefile	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/makefile	2008-06-02 21:36:45 UTC (rev 32505)
@@ -1,47 +1,39 @@
+srcdir      ?= .
+DEPDIR      := .deps
+
 #DYNAMIC_MODULES = 1
-#libndsdir = $(DEVKITPRO)/libnds
-libndsdir = /home/neil/devkitpror21/libnds
+libndsdir = $(DEVKITPRO)/libnds
+#libndsdir = /home/neil/devkitpror21/libnds
 
-# Select the build you want by uncommenting one of the following lines:
+# Select the build by setting SCUMM_BUILD to a,b,c,d,e,f or g.
+# Anything else gets build a.
 
-
-
-ifeq ($(SCUMM_BUILD),a)
-        DS_BUILD_A = 1
-endif
-
-ifeq ($(SCUMM_BUILD),b)
-        DS_BUILD_B = 1
-endif
-
-ifeq ($(SCUMM_BUILD),c)
-        DS_BUILD_C = 1
-endif
-
-ifeq ($(SCUMM_BUILD),d)
-        DS_BUILD_D = 1
-endif
-
-ifeq ($(SCUMM_BUILD),e)
-        DS_BUILD_E = 1
-endif
-
-ifeq ($(SCUMM_BUILD),f)
-        DS_BUILD_F = 1
-endif
-
 ifeq ($(SCUMM_BUILD),g)
         DS_BUILD_G = 1
+else
+ ifeq ($(SCUMM_BUILD),f)
+        DS_BUILD_F = 1
+ else
+  ifeq ($(SCUMM_BUILD),e)
+        DS_BUILD_E = 1
+  else
+   ifeq ($(SCUMM_BUILD),d)
+        DS_BUILD_D = 1
+   else
+    ifeq ($(SCUMM_BUILD),c)
+        DS_BUILD_C = 1
+    else
+     ifeq ($(SCUMM_BUILD),b)
+        DS_BUILD_B = 1
+     else
+        DS_BUILD_A = 1
+     endif
+    endif
+   endif
+  endif
+ endif
 endif
 
-DS_BUILD_A = 1
-#DS_BUILD_B = 1
-#DS_BUILD_C = 1
-#DS_BUILD_D = 1		
-#DS_BUILD_E = 1
-#DS_BUILD_F = 1
-#DS_BUILD_G = 1
-
 # To do:
 # - FAT cache?
 
@@ -79,6 +71,9 @@
 
 # Command to build libmad is:
 # ./configure --host=arm-elf --enable-speed --enable-sso -enable-fpm=arm CFLAGS='-specs=ds_arm9.specs -mthumb-interwork'
+#
+# I actually had to use
+# ./configure --host=arm-elf --enable-speed --enable-sso -enable-fpm=arm CFLAGS='-specs=ds_arm9.specs -mthumb-interwork' LDFLAGS='C:/Progra~1/devkitpro/libnds/lib/libnds9.a' --disable-shared --disable-debugging
 
 USE_ARM_SOUND_ASM = 1
 ARM = 1
@@ -164,7 +159,7 @@
 	DEFINES += -DUSE_PROFILER
 endif
 
-CXXFLAGS=	$(CFLAGS) -Wno-non-virtual-dtor	 -Wno-non-virtual-dtor \
+CXXFLAGS=	$(CFLAGS) -Wno-non-virtual-dtor -Wno-unknown-pragmas -Wno-reorder  \
 		-fno-exceptions -fno-rtti -mthumb-interwork
 
 #		-mthumb
@@ -187,9 +182,9 @@
 
 LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -Wl,--wrap,time -mno-fpu -Wl,-Map,map.txt
 
-INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source -I$(portdir)/source/compressor -I$(portdir)/source/fat \
-			-I$(srcdir)/backends/fs  -I$(srcdir)/backends/fs/ds -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\
-			-I$(srcdir)/scumm -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\
+INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source -I$(portdir)/source/fat \
+			-I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\
+			-I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\
 			-I$(portdir)/source/libcartreset -include $(srcdir)/common/scummsys.h
 
 
@@ -273,9 +268,7 @@
 #-mthumb -fno-gcse -fno-schedule-insns2
 
 
-			
-OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) 
-		
+OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS)
 
 
 
@@ -287,6 +280,9 @@
 
 include $(srcdir)/Makefile.common
 
+semiclean:
+	$(RM) $(portdir)/source/dsoptions.o $(portdir)/source/dsmain.o $(FAT_OBJS) $(DATA_OBJS) $(portdir)/source/wordcompletion.o
+
 clean:
 	$(RM) $(OBJS) $(EXECUTABLE)
 	rm -fr $(BUILD)
@@ -365,8 +361,7 @@
 #	echo !!!!!!!! $(OPTFLAG)
 
 	$(MKDIR) $(*D)/$(DEPDIR)
-	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-	$(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o 
 endif
 
 

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/cdaudio.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/cdaudio.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/cdaudio.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -21,8 +21,8 @@
  */
  
 #include "cdaudio.h"
-#include "ds-fs.h"
-#include "config-manager.h"
+#include "backends/fs/ds/ds-fs.h"
+#include "common/config-manager.h"
 #include "dsmain.h"
 #include "NDS/scummvm_ipc.h"
 #include "console2.h"

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/compressor/lz.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/compressor/lz.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/compressor/lz.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -48,53 +48,3 @@
 
 
 #endif /* _lz_h_ */
-/*************************************************************************
-* Name:        lz.h
-* Author:      Marcus Geelnard
-* Description: LZ77 coder/decoder interface.
-* Reentrant:   Yes
-* $Id$
-*-------------------------------------------------------------------------
-* Copyright (c) 2003-2004 Marcus Geelnard
-*
-* This software is provided 'as-is', without any express or implied
-* warranty. In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would
-*    be appreciated but is not required.
-*
-* 2. Altered source versions must be plainly marked as such, and must not
-*    be misrepresented as being the original software.
-*
-* 3. This notice may not be removed or altered from any source
-*    distribution.
-*
-* Marcus Geelnard
-* marcus.geelnard at home.se
-*************************************************************************/
-
-#ifndef _lz_h_
-#define _lz_h_
-
-
-
-/*************************************************************************
-* Function prototypes
-*************************************************************************/
-
-int LZ_Compress( unsigned char *in, unsigned char *out,
-                 unsigned int insize );
-int LZ_CompressFast( unsigned char *in, unsigned char *out,
-                     unsigned int insize, unsigned int *work );
-void LZ_Uncompress( unsigned char *in, unsigned char *out,
-                    unsigned int insize );
-
-
-#endif /* _lz_h_ */

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/dsmain.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/dsmain.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -71,12 +71,11 @@
 #include <stdlib.h>
 #include "dsmain.h"
 #include "string.h"
-#include "system.h"
 #include "osystem_ds.h"
 #include "icons_raw.h"
-#include "gba_nds_fat.h"
-#include "disc_io.h"
-#include "config-manager.h"
+#include "fat/gba_nds_fat.h"
+#include "fat/disc_io.h"
+#include "common/config-manager.h"
 #include "engines/scumm/scumm.h"
 #include "keyboard_raw.h"
 #include "keyboard_pal_raw.h"
@@ -89,14 +88,13 @@
 #include "user_debugger.h"
 #endif
 #include "ramsave.h"
-#include "disc_io.h"
 #include "blitters.h"
 #include "cartreset_nolibfat.h"
 #include "keys.h"
 #ifdef USE_PROFILER
 #include "profiler/cyg-profile.h"
 #endif
-#include "ds-fs.h"
+#include "backends/fs/ds/ds-fs.h"
 
 namespace DS {
 
@@ -360,14 +358,14 @@
 	   sprites[i].attribute[0] = ATTR0_DISABLED;
 	   sprites[i].attribute[1] = 0;
 	   sprites[i].attribute[2] = 0;
-	   sprites[i].attribute[3] = 0;
+	   sprites[i].filler = 0;
     }
 	
 	for (int i = 0; i < 128; i++) {
 	   spritesMain[i].attribute[0] = ATTR0_DISABLED;
 	   spritesMain[i].attribute[1] = 0;
 	   spritesMain[i].attribute[2] = 0;
-	   spritesMain[i].attribute[3] = 0;
+	   spritesMain[i].filler = 0;
     }
 	
 	updateOAM();
@@ -749,7 +747,7 @@
 
 
 	if (displayModeIs8Bit) {
-		static int test = 0;
+//		static int test = 0;
 //		consolePrintf("saving buffer... %d\n", test++);
 		saveGameBackBuffer();
 		for (int r = 0; r < 32 * 32; r++) {
@@ -1612,7 +1610,7 @@
 //		spritesMain[0].attribute[0] = ATTR0_DISABLED;
 //		spritesMain[0].attribute[1] = 0;
 //		spritesMain[0].attribute[2] = 0;
-//		spritesMain[0].attribute[3] = 0;
+//		spritesMain[0].filler = 0;
 		setIconMain(0, 0, 0, 0, 0, false);
 	}
 
@@ -2431,7 +2429,7 @@
 
 void* fastRamAlloc(int size) {
 //	return malloc(size);
-	void* result = fastRamPointer;
+	void* result = (void *) fastRamPointer;
 	fastRamPointer += size;
 	if(fastRamPointer > fastRamData + FAST_RAM_SIZE) {
 		consolePrintf("FastRam (ITCM) allocation failed!\n");
@@ -2825,33 +2823,25 @@
 	//printf("'%s'", Common::ConfigManager::kApplicationDomain.c_str());
 
 #if defined(DS_BUILD_A)
-	char* argv[2] = {"/scummvmds", "--config=scummvm.ini"};
+	const char *argv[] = {"/scummvmds"};
 #elif defined(DS_BUILD_B)
-	char* argv[2] = {"/scummvmds", "--config=scummvmb.ini"};
+	const char *argv[] = {"/scummvmds", "--config=scummvmb.ini"};
 #elif defined(DS_BUILD_C)
-	char* argv[2] = {"/scummvmds", "--config=scummvmc.ini"};
+	const char *argv[] = {"/scummvmds", "--config=scummvmc.ini"};
 #elif defined(DS_BUILD_D)
-	char* argv[3] = {"/scummvmds", "--config=scummvmd.ini"};
+	const char *argv[] = {"/scummvmds", "--config=scummvmd.ini"};
 #elif defined(DS_BUILD_E)
-	char* argv[3] = {"/scummvmds", "--config=scummvme.ini"};
+	const char *argv[] = {"/scummvmds", "--config=scummvme.ini"};
 #elif defined(DS_BUILD_F)
-	char* argv[3] = {"/scummvmds", "--config=scummvmf.ini"};
+	const char *argv[] = {"/scummvmds", "--config=scummvmf.ini"};
 #elif defined(DS_BUILD_G)
-	char* argv[3] = {"/scummvmds", "--config=scummvmg.ini"};
+	const char *argv[] = {"/scummvmds", "--config=scummvmg.ini"};
 #endif
 
-#ifdef DS_NON_SCUMM_BUILD	
-
 	while (1) {
-		scummvm_main(2, (char **) &argv);
+		scummvm_main(ARRAYSIZE(argv), (char **) &argv);
 		powerOff();
 	}
-#else
-	while (1) {
-		scummvm_main(1, (char **) &argv);
-		powerOff();
-	}
-#endif
 
 	return 0;
 }

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/disc_io.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/disc_io.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/disc_io.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -53,7 +53,7 @@
 //----------------------------------------------------------------------
 
 #if defined _CF_USE_DMA && defined _CF_ALLOW_UNALIGNED
- #error You can't use both DMA and unaligned memory
+ #error You can not use both DMA and unaligned memory
 #endif
 
 // When compiling for NDS, make sure NDS is defined

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/io_efa2.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/io_efa2.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/fat/io_efa2.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -26,31 +26,3 @@
 extern LPIO_INTERFACE EFA2_GetInterface(void);
 
 #endif	// define IO_EFA2_H
-/*
-  io_efa2.h by CyteX
-
-  Based on io_mpfc.h by chishm (Michael Chisholm)
-
-  Hardware Routines for reading the NAND flash located on
-  EFA2 flash carts
-
-  This software is completely free. No warranty is provided.
-  If you use it, please give me credit and email me about your
-  project at cytex <at> gmx <dot> de and do not forget to also
-  drop chishm <at> hotmail <dot> com a line
-
-  See gba_nds_fat.txt for help and license details.
-*/
-
-#ifndef IO_EFA2_H
-#define IO_EFA2_H
-
-// 'EFA2'
-#define DEVICE_TYPE_EFA2 0x32414645
-
-#include "disc_io.h"
-
-// export interface
-extern LPIO_INTERFACE EFA2_GetInterface(void);
-
-#endif	// define IO_EFA2_H

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -21,9 +21,9 @@
  */
 
 #include "gbampsave.h"
-#include "gba_nds_fat.h"
-#include "ds-fs.h"
-#include "config-manager.h"
+#include "fat/gba_nds_fat.h"
+#include "backends/fs/ds/ds-fs.h"
+#include "common/config-manager.h"
 
 /////////////////////////
 // GBAMP Save File

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/gbampsave.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -23,8 +23,8 @@
 #ifndef _GBAMPSAVE_H_
 #define _GBAMPSAVE_H_
 
-#include "system.h"
-#include "ds-fs.h"
+#include "common/system.h"
+#include "backends/fs/ds/ds-fs.h"
 
 #define SAVE_BUFFER_SIZE 100000
 

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/mad/readme.txt
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/mad/readme.txt	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/mad/readme.txt	2008-06-02 21:36:45 UTC (rev 32505)
@@ -1,2 +1 @@
 Put mad.h here if you are compiling with Madlib support enabled.
-Put mad.h here if you are compiling with Madlib support enabled.
\ No newline at end of file

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/osystem_ds.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/osystem_ds.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/osystem_ds.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -22,7 +22,6 @@
 
 #include "common/scummsys.h"
 #include "common/system.h"
-#include "system.h"
 
 #include "common/util.h"
 #include "common/rect.h"
@@ -32,12 +31,12 @@
 #include "nds.h"
 #include "dsmain.h"
 #include "nds/registers_alt.h"
-#include "config-manager.h"
+#include "common/config-manager.h"
 #include "common/str.h"
 #include "cdaudio.h"
 #include "graphics/surface.h"
 #include "touchkeyboard.h"
-#include "ds-fs-factory.h"
+#include "backends/fs/ds/ds-fs-factory.h"
 
 OSystem_DS* OSystem_DS::_instance = NULL;
 

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -20,7 +20,6 @@
  * 
  */
  // Save in order 1,2,3,4,larger 2,5
-#include "system.h"
 #include "ramsave.h"
 #include "nds.h"
 #include "compressor/lz.h"

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/ramsave.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -23,8 +23,8 @@
 #ifndef _RAMSAVE_H_
 #define _RAMSAVE_H_
 
-#include "system.h"
-#include "savefile.h"
+#include "common/system.h"
+#include "common/savefile.h"
 
 // SaveFileManager class
 

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/wordcompletion.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/wordcompletion.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/arm9/source/wordcompletion.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -1,10 +1,7 @@
-
-
-
 namespace DS {
 
 extern bool findWordCompletions(char* input);
 extern void addAutoCompleteLine(char* line);
 extern void sortAutoCompleteWordList();
 
-}
\ No newline at end of file
+}

Modified: scummvm/branches/gsoc2008-rtl/backends/platform/ds/makefile
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/ds/makefile	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/ds/makefile	2008-06-02 21:36:45 UTC (rev 32505)
@@ -15,6 +15,24 @@
 	@for i in $(SUBDIRS); do if test -d $$i; then make -C $$i; fi; done;
 clean:
 	@for i in $(SUBDIRS); do if test -d $$i; then make -C $$i clean; fi; done;
+semiclean:
+	@for i in $(SUBDIRS); do if test -d $$i; then make -C $$i semiclean; fi; done;
 
 export:
 	@for i in $(SUBDIRS); do if test -d $$i; then make -C $$i export; fi; done;
+
+allbuilds:
+	make semiclean
+	make all       SCUMM_BUILD=a
+	make semiclean
+	make all       SCUMM_BUILD=b
+	make semiclean
+	make all       SCUMM_BUILD=c
+	make semiclean
+	make all       SCUMM_BUILD=d
+	make semiclean
+	make all       SCUMM_BUILD=e
+	make semiclean
+	make all       SCUMM_BUILD=f
+	make semiclean
+	make all       SCUMM_BUILD=g

Modified: scummvm/branches/gsoc2008-rtl/base/plugins.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/base/plugins.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/base/plugins.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -81,6 +81,12 @@
 #define STATIC_PLUGIN 1
 #define DYNAMIC_PLUGIN 2
 
+// Note: The spaces around ENABLE_##ID have been added on purpose for
+// MSVC. For some reason, MSVC tries to add the parenthesis after
+// ENABLE_##ID to the check, thus making it false all the time.
+// Please do NOT remove them, otherwise no engine plugins will be
+// registered under MSVC
+
 #define PLUGIN_ENABLED_STATIC(ID) \
 	(defined( ENABLE_##ID ) && !PLUGIN_ENABLED_DYNAMIC(ID))
 

Modified: scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -428,7 +428,13 @@
 			if (curFilesMatched > maxFilesMatched) {
 				debug(2, " ... new best match, removing all previous candidates");
 				maxFilesMatched = curFilesMatched;
-				matched.clear();
+
+				for (uint j = 0; j < matched.size();) {
+					if (matched[j]->flags & ADGF_KEEPMATCH)
+						 ++j;
+					else
+						matched.remove_at(j);
+				}
 				matched.push_back(g);
 			} else if (curFilesMatched == maxFilesMatched) {
 				matched.push_back(g);

Modified: scummvm/branches/gsoc2008-rtl/common/advancedDetector.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/advancedDetector.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/common/advancedDetector.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -46,6 +46,8 @@
 
 enum ADGameFlags {
 	ADGF_NO_FLAGS = 0,
+	ADGF_KEEPMATCH = (1 << 27), // this entry is kept even when there are matched
+								// entries with more files
 	ADGF_DROPLANGUAGE = (1 << 28), // don't add language to gameid
 	ADGF_CD = (1 << 29),    // add "-cd" to gameid
 	ADGF_DEMO = (1 << 30)   // add "-demo" to gameid

Modified: scummvm/branches/gsoc2008-rtl/common/module.mk
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/module.mk	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/common/module.mk	2008-06-02 21:36:45 UTC (rev 32505)
@@ -14,6 +14,7 @@
 	stream.o \
 	util.o \
 	system.o \
+	unarj.o \
 	unzip.o \
 	zlib.o
 

Copied: scummvm/branches/gsoc2008-rtl/common/unarj.cpp (from rev 32503, scummvm/trunk/common/unarj.cpp)
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/unarj.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2008-rtl/common/unarj.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -0,0 +1,698 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+// Heavily based on Unarj 2.65
+
+/* UNARJ.C, UNARJ, R JUNG, 06/05/02
+ * Main Extractor routine
+ * Copyright (c) 1991-2002 by ARJ Software, Inc.  All rights reserved.
+ *
+ *   This code may be freely used in programs that are NOT ARJ archivers
+ *   (both compress and extract ARJ archives).
+ *
+ *   If you wish to distribute a modified version of this program, you
+ *   MUST indicate that it is a modified version both in the program and
+ *   source code.
+ *
+ *   We are holding the copyright on the source code, so please do not
+ *   delete our name from the program files or from the documentation.
+ *
+ *   We wish to give credit to Haruhiko Okumura for providing the
+ *   basic ideas for ARJ and UNARJ in his program AR.  Please note
+ *   that UNARJ is significantly different from AR from an archive
+ *   structural point of view.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "common/util.h"
+#include "common/unarj.h"
+
+namespace Common {
+
+static uint32 CRCtable[256];
+
+static void	InitCRC(void) {
+	const uint32 poly = 0xEDB88320;
+	int i, j;
+	uint32 n;
+
+	for (i = 0; i < 256; i++) {
+		n = i;
+		for (j = 0; j < 8; j++)
+			n = (n & 1) ? ((n >> 1) ^ poly) : (n >> 1);
+		CRCtable[i] = n;
+	}
+}
+
+static uint32 GetCRC(byte *data, int len) {
+	uint32 CRC = 0xFFFFFFFF;
+	int i;
+	for (i = 0; i < len; i++)
+		CRC = (CRC >> 8) ^ CRCtable[(CRC ^ data[i]) & 0xFF];
+	return CRC ^ 0xFFFFFFFF;
+}
+
+ArjFile::ArjFile() {
+	InitCRC();
+	_isOpen = false;
+	_fallBack = false;
+}
+
+ArjFile::~ArjFile() {
+	close();
+
+	for (uint i = 0; i < _headers.size(); i++)
+		delete _headers[i];
+
+	_headers.clear();
+	_fileMap.clear();
+	_archMap.clear();
+}
+
+void ArjFile::registerArchive(const String &filename) {
+	int32 first_hdr_pos;
+	ArjHeader *header;
+
+	if (!_currArchive.open(filename))
+		return;
+
+	first_hdr_pos = findHeader();
+
+	if (first_hdr_pos < 0) {
+		warning("ArjFile::registerArchive(): Could not find a valid header");
+		return;
+	}
+
+	_currArchive.seek(first_hdr_pos, SEEK_SET);
+	if (readHeader() == NULL)
+		return;
+
+	while ((header = readHeader()) != NULL) {
+		_headers.push_back(header);
+
+		_currArchive.seek(header->compSize, SEEK_CUR);
+
+		_fileMap[header->filename] = _headers.size() - 1;
+		_archMap[header->filename] = filename;
+	}
+
+	_currArchive.close();
+
+	debug(0, "ArjFile::registerArchive(%s): Located %d files", filename.c_str(), _headers.size());
+}
+
+int32 ArjFile::findHeader(void) {
+	long arcpos, lastpos;
+	int c;
+	byte header[HEADERSIZE_MAX];
+	uint32 crc;
+	uint16 headersize;
+
+	arcpos = _currArchive.pos();
+	_currArchive.seek(0L, SEEK_END);
+	lastpos = _currArchive.pos() - 2;
+	if (lastpos > MAXSFX)
+		lastpos = MAXSFX;
+
+	for ( ; arcpos < lastpos; arcpos++) {
+		_currArchive.seek(arcpos, SEEK_SET);
+		c = _currArchive.readByte();
+		while (arcpos < lastpos) {
+			if (c != HEADER_ID_LO)  // low order first
+				c = _currArchive.readByte();
+			else if ((c = _currArchive.readByte()) == HEADER_ID_HI)
+				break;
+			arcpos++;
+		}
+		if (arcpos >= lastpos)
+			break;
+		if ((headersize = _currArchive.readUint16LE()) <= HEADERSIZE_MAX) {
+			_currArchive.read(header, headersize);
+			crc = GetCRC(header, headersize);
+			if (crc == _currArchive.readUint32LE()) {
+				_currArchive.seek(arcpos, SEEK_SET);
+				return arcpos;
+			}
+		}
+	}
+	return -1;		  // could not find a valid header
+}
+
+ArjHeader *ArjFile::readHeader() {
+	ArjHeader header;
+	ArjHeader *head;
+	byte headData[HEADERSIZE_MAX];
+
+	header.id = _currArchive.readUint16LE();
+	if (header.id != HEADER_ID) {
+		warning("ArjFile::readHeader(): Bad header ID (%x)", header.id);
+
+		return NULL;
+	}
+
+	header.headerSize = _currArchive.readUint16LE();
+	if (header.headerSize == 0)
+		return NULL;			// end of archive
+	if (header.headerSize > HEADERSIZE_MAX) {
+		warning("ArjFile::readHeader(): Bad header");
+
+		return NULL;
+	}
+
+	int rSize = _currArchive.read(headData, header.headerSize);
+
+	MemoryReadStream readS(headData, rSize);
+
+	header.headerCrc = _currArchive.readUint32LE();
+	if (GetCRC(headData, header.headerSize) != header.headerCrc) {
+		warning("ArjFile::readHeader(): Bad header CRC");
+		return NULL;
+	}
+
+	header.firstHdrSize = readS.readByte();
+	header.nbr = readS.readByte();
+	header.xNbr = readS.readByte();
+	header.hostOs = readS.readByte();
+	header.flags = readS.readByte();
+	header.method = readS.readByte();
+	header.fileType = readS.readByte();
+	(void)readS.readByte();
+	header.timeStamp = readS.readUint32LE();
+	header.compSize = readS.readSint32LE();
+	header.origSize = readS.readSint32LE();
+	header.fileCRC = readS.readUint32LE();
+	header.entryPos = readS.readUint16LE();
+	header.fileMode = readS.readUint16LE();
+	header.hostData = readS.readUint16LE();
+
+	if (header.origSize < 0 || header.compSize < 0) {
+		warning("ArjFile::readHeader(): Wrong file size");
+		return NULL;
+	}
+
+	strncpy(header.filename, (const char *)&headData[header.firstHdrSize], FNAME_MAX);
+
+	strncpy(header.comment, (const char *)&headData[header.firstHdrSize + strlen(header.filename) + 1], COMMENT_MAX);
+
+	/* if extheadersize == 0 then no CRC */
+	/* otherwise read extheader data and read 4 bytes for CRC */
+
+	while ((header.extHeaderSize = _currArchive.readUint16LE()) != 0)
+		_currArchive.seek((long)(header.extHeaderSize + 4), SEEK_CUR);
+
+	header.pos = _currArchive.pos();
+
+	head = new ArjHeader(header);
+
+	return head;
+}
+
+
+bool ArjFile::open(const Common::String &filename, AccessMode mode) {
+	if (_isOpen)
+		error("Attempt to open another instance of archive");
+
+	_isOpen = false;
+
+	if (_fallBack) {
+		_currArchive.open(filename);
+		if (_currArchive.isOpen()) {
+			_isOpen = true;
+			_uncompressed = &_currArchive;
+			return true;
+		}
+	}
+
+	if (!_fileMap.contains(filename))
+		return false;
+
+	_isOpen = true;
+
+	ArjHeader *hdr = _headers[_fileMap[filename]];
+
+	_compsize = hdr->compSize;
+	_origsize = hdr->origSize;
+
+	_uncompressedData = (byte *)malloc(_origsize);
+	_outstream = new MemoryWriteStream(_uncompressedData, _origsize);
+
+	_currArchive.open(_archMap[filename]);
+	_currArchive.seek(hdr->pos, SEEK_SET);
+
+	if (hdr->method == 0) { // store
+        _currArchive.read(_uncompressedData, _origsize);
+	} else {
+		_compressedData = (byte *)malloc(_compsize);
+		_currArchive.read(_compressedData, _compsize);
+
+		_compressed = new MemoryReadStream(_compressedData, _compsize);
+
+		if (hdr->method == 1 || hdr->method == 2 || hdr->method == 3)
+			decode();
+		else if (hdr->method == 4)
+			decode_f();
+
+		delete _compressed;
+		free(_compressedData);
+	}
+
+	_currArchive.close();
+	delete _outstream;
+	_outstream = NULL;
+
+	_uncompressed = new MemoryReadStream(_uncompressedData, _origsize);
+
+	return true;
+}
+
+void ArjFile::close() {
+	_isOpen = false;
+
+	if (_fallBack) {
+		_currArchive.close();
+		return;
+	} else {
+		delete _uncompressed;
+	}
+
+	_uncompressed = NULL;
+
+	free(_uncompressedData);
+	_uncompressedData = NULL;
+}
+
+uint32 ArjFile::read(void *dataPtr, uint32 dataSize) {
+	return _uncompressed->read(dataPtr, dataSize);
+}
+
+bool ArjFile::eos() {
+	return _uncompressed->eos();
+}
+
+uint32 ArjFile::pos() {
+	return _uncompressed->pos();
+}
+
+uint32 ArjFile::size() {
+	return _uncompressed->size();
+}
+
+void ArjFile::seek(int32 offset, int whence) {
+	_uncompressed->seek(offset, whence);
+}
+
+void ArjFile::init_getbits() {
+	_bitbuf = 0;
+	_subbitbuf = 0;
+	_bitcount = 0;
+	fillbuf(2 * CHAR_BIT);
+}
+
+void ArjFile::fillbuf(int n) {    // Shift bitbuf n bits left, read n bits
+	_bitbuf = (_bitbuf << n) & 0xFFFF;  /* lose the first n bits */
+	while (n > _bitcount) {
+		_bitbuf |= _subbitbuf << (n -= _bitcount);
+		if (_compsize != 0) {
+			_compsize--;
+			_subbitbuf = _compressed->readByte();
+		} else
+			_subbitbuf = 0;
+		_bitcount = CHAR_BIT;
+	}
+	_bitbuf |= _subbitbuf >> (_bitcount -= n);
+}
+
+uint16 ArjFile::getbits(int n) {
+	uint16 x;
+
+	x = _bitbuf >> (2 * CHAR_BIT - n);
+	fillbuf(n);
+	return x;
+}
+
+
+
+/* Huffman decode routines */
+
+void ArjFile::make_table(int nchar, byte *bitlen, int tablebits, uint16 *table, int tablesize) {
+	uint16 count[17], weight[17], start[18], *p;
+	uint i, k, len, ch, jutbits, avail, nextcode, mask;
+
+	for (i = 1; i <= 16; i++)
+		count[i] = 0;
+	for (i = 0; (int)i < nchar; i++)
+		count[bitlen[i]]++;
+
+	start[1] = 0;
+	for (i = 1; i <= 16; i++)
+		start[i + 1] = start[i] + (count[i] << (16 - i));
+	if (start[17] != (uint16) (1 << 16))
+		error("ArjFile::make_table(): bad file data");
+
+	jutbits = 16 - tablebits;
+	for (i = 1; (int)i <= tablebits; i++) {
+		start[i] >>= jutbits;
+		weight[i] = 1 << (tablebits - i);
+	}
+	while (i <= 16) {
+		weight[i] = 1 << (16 - i);
+		i++;
+	}
+
+	i = start[tablebits + 1] >> jutbits;
+	if (i != (uint16) (1 << 16)) {
+		k = 1 << tablebits;
+		while (i != k)
+			table[i++] = 0;
+	}
+
+	avail = nchar;
+	mask = 1 << (15 - tablebits);
+	for (ch = 0; (int)ch < nchar; ch++) {
+		if ((len = bitlen[ch]) == 0)
+			continue;
+		k = start[len];
+		nextcode = k + weight[len];
+		if ((int)len <= tablebits) {
+			if (nextcode > (uint)tablesize)
+				error("ArjFile::make_table(): bad file data");
+			for (i = start[len]; i < nextcode; i++)
+				table[i] = ch;
+		} else {
+			p = &table[k >> jutbits];
+			i = len - tablebits;
+			while (i != 0) {
+				if (*p == 0) {
+					_right[avail] = _left[avail] = 0;
+					*p = avail++;
+				}
+				if (k & mask)
+					p = &_right[*p];
+				else
+					p = &_left[*p];
+				k <<= 1;
+				i--;
+			}
+			*p = ch;
+		}
+		start[len] = nextcode;
+	}
+}
+
+void ArjFile::read_pt_len(int nn, int nbit, int i_special) {
+	int i, n;
+	int16 c;
+	uint16 mask;
+
+	n = getbits(nbit);
+	if (n == 0) {
+		c = getbits(nbit);
+		for (i = 0; i < nn; i++)
+			_pt_len[i] = 0;
+		for (i = 0; i < 256; i++)
+			_pt_table[i] = c;
+	} else {
+		i = 0;
+		while (i < n) {
+			c = _bitbuf >> (13);
+			if (c == 7) {
+				mask = 1 << (12);
+				while (mask & _bitbuf) {
+					mask >>= 1;
+					c++;
+				}
+			}
+			fillbuf((c < 7) ? 3 : (int)(c - 3));
+			_pt_len[i++] = (byte)c;
+			if (i == i_special) {
+				c = getbits(2);
+				while (--c >= 0)
+					_pt_len[i++] = 0;
+			}
+		}
+		while (i < nn)
+			_pt_len[i++] = 0;
+		make_table(nn, _pt_len, 8, _pt_table, PTABLESIZE);  // replaced sizeof
+	}
+}
+
+void ArjFile::read_c_len() {
+	int16 i, c, n;
+	uint16 mask;
+
+	n = getbits(CBIT);
+	if (n == 0) {
+		c = getbits(CBIT);
+		for (i = 0; i < NC; i++)
+			_c_len[i] = 0;
+		for (i = 0; i < CTABLESIZE; i++)
+			_c_table[i] = c;
+	} else {
+		i = 0;
+		while (i < n) {
+			c = _pt_table[_bitbuf >> (8)];
+			if (c >= NT) {
+				mask = 1 << (7);
+				do {
+					if (_bitbuf & mask)
+						c = _right[c];
+					else
+						c = _left[c];
+					mask >>= 1;
+				} while (c >= NT);
+			}
+			fillbuf((int)(_pt_len[c]));
+			if (c <= 2) {
+				if (c == 0)
+					c = 1;
+				else if (c == 1)
+					c = getbits(4) + 3;
+				else
+					c = getbits(CBIT) + 20;
+				while (--c >= 0)
+					_c_len[i++] = 0;
+			}
+			else
+				_c_len[i++] = (byte)(c - 2);
+		}
+		while (i < NC)
+			_c_len[i++] = 0;
+		make_table(NC, _c_len, 12, _c_table, CTABLESIZE);  // replaced sizeof
+	}
+}
+
+uint16 ArjFile::decode_c() {
+	uint16 j, mask;
+
+	if (_blocksize == 0) {
+		_blocksize = getbits(16);
+		read_pt_len(NT, TBIT, 3);
+		read_c_len();
+		read_pt_len(NP, PBIT, -1);
+	}
+	_blocksize--;
+	j = _c_table[_bitbuf >> 4];
+	if (j >= NC) {
+		mask = 1 << (3);
+		do {
+			if (_bitbuf & mask)
+				j = _right[j];
+			else
+				j = _left[j];
+			mask >>= 1;
+		} while (j >= NC);
+	}
+	fillbuf((int)(_c_len[j]));
+	return j;
+}
+
+uint16 ArjFile::decode_p() {
+	uint16 j, mask;
+
+	j = _pt_table[_bitbuf >> (8)];
+	if (j >= NP) {
+		mask = 1 << (7);
+		do {
+			if (_bitbuf & mask)
+				j = _right[j];
+			else
+				j = _left[j];
+			mask >>= 1;
+		} while (j >= NP);
+	}
+	fillbuf((int)(_pt_len[j]));
+	if (j != 0) {
+		j--;
+		j = (1 << j) + getbits((int)j);
+	}
+	return j;
+}
+
+void ArjFile::decode_start() {
+	_blocksize = 0;
+	init_getbits();
+}
+
+void ArjFile::decode() {
+	int16 i;
+	int16 j;
+	int16 c;
+	int16 r;
+	int32 count;
+
+	decode_start();
+	count = 0;
+	r = 0;
+
+	while (count < _origsize) {
+		if ((c = decode_c()) <= ARJ_UCHAR_MAX) {
+			_text[r] = (byte) c;
+			count++;
+			if (++r >= DDICSIZ) {
+				r = 0;
+				_outstream->write(_text, DDICSIZ);
+			}
+		} else {
+			j = c - (ARJ_UCHAR_MAX + 1 - THRESHOLD);
+			count += j;
+			i = decode_p();
+			if ((i = r - i - 1) < 0)
+				i += DDICSIZ;
+			if (r > i && r < DDICSIZ - MAXMATCH - 1) {
+				while (--j >= 0)
+					_text[r++] = _text[i++];
+			} else {
+				while (--j >= 0) {
+					_text[r] = _text[i];
+					if (++r >= DDICSIZ) {
+						r = 0;
+						_outstream->write(_text, DDICSIZ);
+					}
+					if (++i >= DDICSIZ)
+						i = 0;
+				}
+			}
+		}
+	}
+	if (r != 0)
+		_outstream->write(_text, r);
+}
+
+/* Macros */
+
+#define BFIL {_getbuf|=_bitbuf>>_getlen;fillbuf(CODE_BIT-_getlen);_getlen=CODE_BIT;}
+#define GETBIT(c) {if(_getlen<=0)BFIL c=(_getbuf&0x8000)!=0;_getbuf<<=1;_getlen--;}
+#define BPUL(l) {_getbuf<<=l;_getlen-=l;}
+#define GETBITS(c,l) {if(_getlen<l)BFIL c=(uint16)_getbuf>>(CODE_BIT-l);BPUL(l)}
+
+int16 ArjFile::decode_ptr() {
+	int16 c = 0;
+	int16 width;
+	int16 plus;
+	int16 pwr;
+
+	plus = 0;
+	pwr = 1 << (STRTP);
+	for (width = (STRTP); width < (STOPP); width++) {
+		GETBIT(c);
+		if (c == 0)
+			break;
+		plus += pwr;
+		pwr <<= 1;
+	}
+	if (width != 0)
+		GETBITS(c, width);
+	c += plus;
+	return c;
+}
+
+int16 ArjFile::decode_len() {
+	int16 c = 0;
+	int16 width;
+	int16 plus;
+	int16 pwr;
+
+	plus = 0;
+	pwr = 1 << (STRTL);
+	for (width = (STRTL); width < (STOPL); width++) {
+		GETBIT(c);
+		if (c == 0)
+			break;
+		plus += pwr;
+		pwr <<= 1;
+	}
+	if (width != 0)
+		GETBITS(c, width);
+	c += plus;
+	return c;
+}
+
+void ArjFile::decode_f() {
+	int16 i;
+	int16 j;
+	int16 c;
+	int16 r;
+	int16 pos1;
+	int32 count;
+
+	init_getbits();
+	_getlen = _getbuf = 0;
+	count = 0;
+	r = 0;
+
+	while (count < _origsize) {
+		c = decode_len();
+		if (c == 0) {
+			GETBITS(c, CHAR_BIT);
+			_text[r] = (byte)c;
+			count++;
+			if (++r >= DDICSIZ) {
+				r = 0;
+				_outstream->write(_text, DDICSIZ);
+			}
+		} else {
+			j = c - 1 + THRESHOLD;
+			count += j;
+			pos1 = decode_ptr();
+			if ((i = r - pos1 - 1) < 0)
+				i += DDICSIZ;
+			while (j-- > 0) {
+				_text[r] = _text[i];
+				if (++r >= DDICSIZ) {
+					r = 0;
+					_outstream->write(_text, DDICSIZ);
+				}
+				if (++i >= DDICSIZ)
+					i = 0;
+			}
+		}
+	}
+	if (r != 0)
+		_outstream->write(_text, r);
+}
+
+
+} // End of namespace Common

Copied: scummvm/branches/gsoc2008-rtl/common/unarj.h (from rev 32503, scummvm/trunk/common/unarj.h)
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/unarj.h	                        (rev 0)
+++ scummvm/branches/gsoc2008-rtl/common/unarj.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -0,0 +1,185 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef COMMON_UNARJ_H
+#define COMMON_UNARJ_H
+
+#include "common/file.h"
+#include "common/hash-str.h"
+
+namespace Common {
+
+#define HEADER_ID     0xEA60
+#define HEADER_ID_HI    0xEA
+#define HEADER_ID_LO    0x60
+#define FIRST_HDR_SIZE    30
+#define FIRST_HDR_SIZE_V  34
+#define COMMENT_MAX     2048
+#define FNAME_MAX           512
+#define HEADERSIZE_MAX   (FIRST_HDR_SIZE + 10 + FNAME_MAX + COMMENT_MAX)
+#define CRC_MASK        0xFFFFFFFFL
+#define MAXSFX              25000L
+
+#define CODE_BIT    16
+#define CHAR_BIT  8
+#define ARJ_UCHAR_MAX 255		// UCHAR_MAX is defined in limits.h in MSVC
+#define THRESHOLD	3
+#define DDICSIZ	  26624
+#define MAXDICBIT   16
+#define MATCHBIT	 8
+#define MAXMATCH   256
+#define NC		  (ARJ_UCHAR_MAX + MAXMATCH + 2 - THRESHOLD)
+#define NP		  (MAXDICBIT + 1)
+#define CBIT		 9
+#define NT		  (CODE_BIT + 3)
+#define PBIT		 5
+#define TBIT		 5
+
+#if NT > NP
+#define NPT NT
+#else
+#define NPT NP
+#endif
+
+#define CTABLESIZE  4096
+#define PTABLESIZE   256
+
+#define STRTP		  9
+#define STOPP		 13
+
+#define STRTL		  0
+#define STOPL		  7
+
+struct ArjHeader {
+	int32 pos;
+	uint16 id;
+	uint16 headerSize;
+	//
+	byte firstHdrSize;
+	byte nbr;
+	byte xNbr;
+	byte hostOs;
+	byte flags;
+	byte method;
+	byte fileType;
+	byte pad;
+	uint32 timeStamp;
+	int32 compSize;
+	int32 origSize;
+	uint32 fileCRC;
+	uint16 entryPos;
+	uint16 fileMode;
+	uint16 hostData;
+	char   filename[FNAME_MAX];
+	char   comment[COMMENT_MAX];
+	uint16 extHeaderSize;
+
+	uint32 headerCrc;
+};
+
+typedef HashMap<String, int, IgnoreCase_Hash, IgnoreCase_EqualTo> ArjFilesMap;
+
+class ArjFile : public File {
+public:
+	ArjFile();
+	~ArjFile();
+
+	void enableFallback(bool val) { _fallBack = val; }
+
+	void registerArchive(const String &filename);
+
+	bool open(const Common::String &filename, AccessMode mode = kFileReadMode);
+	void close();
+
+	uint32 read(void *dataPtr, uint32 dataSize);
+	bool eos();
+	uint32 pos();
+	uint32 size();
+	void seek(int32 offset, int whence = SEEK_SET);
+	bool isOpen() { return _isOpen; }
+
+private:
+	bool _fallBack;
+
+	File _currArchive;
+	Array<ArjHeader *> _headers;
+	ArjFilesMap _fileMap;
+	StringMap _archMap;
+	ReadStream *_stream;
+	byte *_uncompressedData;
+	byte *_compressedData;
+	MemoryWriteStream *_outstream;
+	MemoryReadStream *_compressed;
+	SeekableReadStream *_uncompressed;
+
+	bool _isOpen;
+
+	int32 findHeader(void);
+	ArjHeader *readHeader();
+
+	void decode();
+	void decode_f();
+
+	uint16 _bitbuf;
+	int32 _compsize;
+	int32 _origsize;
+	byte _subbitbuf;
+	int _bitcount;
+
+	void init_getbits();
+	void fillbuf(int n);
+	uint16 getbits(int n);
+	
+
+	void make_table(int nchar, byte *bitlen, int tablebits, uint16 *table, int tablesize);
+	void read_pt_len(int nn, int nbit, int i_special);
+	void read_c_len(void);
+	uint16 decode_c(void);
+	uint16 decode_p(void);
+	void decode_start(void);
+	int16 decode_ptr(void);
+	int16 decode_len(void);
+
+private:
+	byte  _text[DDICSIZ];
+
+	int16  _getlen;
+	int16  _getbuf;
+
+	uint16 _left[2 * NC - 1];
+	uint16 _right[2 * NC - 1];
+	byte  _c_len[NC];
+	byte  _pt_len[NPT];
+
+	uint16 _c_table[CTABLESIZE];
+	uint16 _pt_table[PTABLESIZE];
+	uint16 _blocksize;
+
+
+};
+
+} // End of namespace Common
+
+#endif

Modified: scummvm/branches/gsoc2008-rtl/configure
===================================================================
--- scummvm/branches/gsoc2008-rtl/configure	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/configure	2008-06-02 21:36:45 UTC (rev 32505)
@@ -1307,7 +1307,7 @@
 PLUGIN_SUFFIX		:= .dll
 PLUGIN_EXTRA_DEPS	= $(EXECUTABLE)
 CXXFLAGS			+= -DDYNAMIC_MODULES
-PLUGIN_LDFLAGS		:= -shared ./libscummvm.a
+PLUGIN_LDFLAGS		:= -Wl,--enable-auto-import -shared ./libscummvm.a
 PRE_OBJS_FLAGS		:= -Wl,--whole-archive
 POST_OBJS_FLAGS		:= -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a
 '

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc7/drascula.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc7/drascula.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc7/drascula.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -112,10 +112,10 @@
 			RelativePath="..\..\engines\drascula\rooms.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\talk.cpp">
+			RelativePath="..\..\engines\drascula\staticdata.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\texts.cpp">
+			RelativePath="..\..\engines\drascula\talk.cpp">
 		</File>
 	</Files>
 	<Globals>

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc7/gob.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc7/gob.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc7/gob.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -346,6 +346,12 @@
 			RelativePath="..\..\engines\gob\util.h">
 		</File>
 		<File
+			RelativePath="..\..\engines\gob\variables.cpp">
+		</File>
+		<File
+			RelativePath="..\..\engines\gob\variables.h">
+		</File>
+		<File
 			RelativePath="..\..\engines\gob\video.cpp">
 		</File>
 		<File

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc7/scummvm.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc7/scummvm.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc7/scummvm.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -50,6 +50,8 @@
 			<Tool
 				Name="VCMIDLTool"/>
 			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
 				Name="VCPostBuildEventTool"/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -105,6 +107,8 @@
 			<Tool
 				Name="VCMIDLTool"/>
 			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
 				Name="VCPostBuildEventTool"/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -291,6 +295,12 @@
 				RelativePath="..\..\common\timer.h">
 			</File>
 			<File
+				RelativePath="..\..\common\unarj.cpp">
+			</File>
+			<File
+				RelativePath="..\..\common\unarj.h">
+			</File>
+			<File
 				RelativePath="..\..\common\unzip.cpp">
 			</File>
 			<File

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc71/drascula.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc71/drascula.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc71/drascula.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -126,10 +126,10 @@
 			RelativePath="..\..\engines\drascula\rooms.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\talk.cpp">
+			RelativePath="..\..\engines\drascula\staticdata.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\texts.cpp">
+			RelativePath="..\..\engines\drascula\talk.cpp">
 		</File>
 	</Files>
 	<Globals>

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc71/gob.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc71/gob.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc71/gob.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -360,6 +360,12 @@
 			RelativePath="..\..\engines\gob\util.h">
 		</File>
 		<File
+			RelativePath="..\..\engines\gob\variables.cpp">
+		</File>
+		<File
+			RelativePath="..\..\engines\gob\variables.h">
+		</File>
+		<File
 			RelativePath="..\..\engines\gob\video.cpp">
 		</File>
 		<File

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc71/scummvm.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc71/scummvm.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc71/scummvm.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -50,6 +50,8 @@
 			<Tool
 				Name="VCMIDLTool"/>
 			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
 				Name="VCPostBuildEventTool"/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -111,6 +113,8 @@
 			<Tool
 				Name="VCMIDLTool"/>
 			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
 				Name="VCPostBuildEventTool"/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -305,6 +309,12 @@
 				RelativePath="..\..\common\timer.h">
 			</File>
 			<File
+				RelativePath="..\..\common\unarj.cpp">
+			</File>
+			<File
+				RelativePath="..\..\common\unarj.h">
+			</File>
+			<File
 				RelativePath="..\..\common\unzip.cpp">
 			</File>
 			<File

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc8/drascula.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc8/drascula.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc8/drascula.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -181,11 +181,11 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\talk.cpp"
+			RelativePath="..\..\engines\drascula\staticdata.h"
 			>
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\texts.cpp"
+			RelativePath="..\..\engines\drascula\talk.cpp"
 			>
 		</File>
 	</Files>

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc8/gob.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc8/gob.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc8/gob.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -493,6 +493,14 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\engines\gob\variables.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\engines\gob\variables.h"
+			>
+		</File>
+		<File
 			RelativePath="..\..\engines\gob\video.cpp"
 			>
 		</File>

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc8/scummvm.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc8/scummvm.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc8/scummvm.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -97,6 +97,9 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -186,6 +189,9 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -425,6 +431,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\common\unarj.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\common\unarj.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\common\unzip.cpp"
 				>
 			</File>

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc9/drascula.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc9/drascula.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc9/drascula.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -182,11 +182,11 @@
 			>
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\talk.cpp"
+			RelativePath="..\..\engines\drascula\staticdata.h"
 			>
 		</File>
 		<File
-			RelativePath="..\..\engines\drascula\texts.cpp"
+			RelativePath="..\..\engines\drascula\talk.cpp"
 			>
 		</File>
 	</Files>

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc9/gob.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc9/gob.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc9/gob.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -494,6 +494,14 @@
 			>
 		</File>
 		<File
+			RelativePath="..\..\engines\gob\variables.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\engines\gob\variables.h"
+			>
+		</File>
+		<File
 			RelativePath="..\..\engines\gob\video.cpp"
 			>
 		</File>

Modified: scummvm/branches/gsoc2008-rtl/dists/msvc9/scummvm.vcproj
===================================================================
--- scummvm/branches/gsoc2008-rtl/dists/msvc9/scummvm.vcproj	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/dists/msvc9/scummvm.vcproj	2008-06-02 21:36:45 UTC (rev 32505)
@@ -100,6 +100,9 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -191,6 +194,9 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -430,6 +436,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\common\unarj.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\common\unarj.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\common\unzip.cpp"
 				>
 			</File>

Modified: scummvm/branches/gsoc2008-rtl/engines/cine/anim.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/cine/anim.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/engines/cine/anim.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -730,7 +730,7 @@
 	} else if (strstr(resourceName, ".SEQ")) {
 		loadSeq(resourceName, -1);
 		return;
-	} else if (strstr(resourceName, "ECHEC")) {
+	} else if (strstr(resourceName, "ECHEC")) { // Echec (French) means failure
 		exitEngine = 1;
 		return;
 	}

Modified: scummvm/branches/gsoc2008-rtl/engines/cine/gfx.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/cine/gfx.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/engines/cine/gfx.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -795,6 +795,14 @@
 /*! \brief Fade to black
  */
 void FWRenderer::fadeToBlack() {
+	// FIXME: _activeLowPal is invalid when starting Operation Stealth
+	// Adding this sanity check fixes a crash when the game
+	// starts, but I'm not sure if this is the best place to check it
+	if (!_activeLowPal) {
+		warning("_activeLowPal is invalid");
+		return;
+	}
+
 	assert(_activeLowPal);
 
 	for (int i = 0; i < 8; i++) {

Modified: scummvm/branches/gsoc2008-rtl/engines/cine/object.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/cine/object.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/engines/cine/object.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -185,37 +185,37 @@
 }
 
 void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) {
-	paramIdx--;
+	// Operation Stealth checks object index range, Future Wars doesn't.
+	if (g_cine->getGameType() == Cine::GType_OS && objIdx >= NUM_MAX_OBJECT)
+		return;
 
-	assert(paramIdx <= 5);
-
 	switch (paramIdx) {
-	case 0:
+	case 1:
 		objectTable[objIdx].x = newValue;
 		break;
-	case 1:
+	case 2:
 		objectTable[objIdx].y = newValue;
 		break;
-	case 2:
+	case 3:
 		objectTable[objIdx].mask = newValue;
 
+		// TODO: Check this part against disassembly
 		if (removeOverlay(objIdx, 0)) {
 			addOverlay(objIdx, 0);
 		}
 		break;
-	case 3:
+	case 4:
 		objectTable[objIdx].frame = newValue;
 		break;
-	case 4:
-		// is it really in Future Wars? it breaks the newspaper machine
-		// on the airport in Operation Stealth
-		if (newValue == -1 && g_cine->getGameType() != Cine::GType_OS) {
+	case 5:
+		// TODO: Test if this really breaks the newspaper machine on the airport in Operation Stealth.
+		if (g_cine->getGameType() == Cine::GType_FW && newValue == -1) {
 			objectTable[objIdx].costume = globalVars[0];
 		} else {
 			objectTable[objIdx].costume = newValue;
 		}
 		break;
-	case 5:
+	case 6:
 		objectTable[objIdx].part = newValue;
 		break;
 	}

Modified: scummvm/branches/gsoc2008-rtl/engines/cine/script.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/cine/script.h	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/engines/cine/script.h	2008-06-02 21:36:45 UTC (rev 32505)
@@ -155,8 +155,8 @@
 	int o1_getObjectParam();
 	int o1_addObjectParam();
 	int o1_subObjectParam();
-	int o1_add2ObjectParam();
-	int o1_sub2ObjectParam();
+	int o1_mulObjectParam();
+	int o1_divObjectParam();
 	int o1_compareObjectParam();
 	int o1_setupObject();
 	int o1_checkCollision();

Modified: scummvm/branches/gsoc2008-rtl/engines/cine/script_fw.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/cine/script_fw.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/engines/cine/script_fw.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -49,8 +49,8 @@
 	{ &FWScript::o1_addObjectParam, "bbw" },
 	{ &FWScript::o1_subObjectParam, "bbw" },
 	/* 04 */
-	{ &FWScript::o1_add2ObjectParam, "bbw" },
-	{ &FWScript::o1_sub2ObjectParam, "bbw" },
+	{ &FWScript::o1_mulObjectParam, "bbw" },
+	{ &FWScript::o1_divObjectParam, "bbw" },
 	{ &FWScript::o1_compareObjectParam, "bbw" },
 	{ &FWScript::o1_setupObject, "bwwww" },
 	/* 08 */
@@ -803,23 +803,32 @@
 	return 0;
 }
 
-/*! \todo Implement this instruction
- */
-int FWScript::o1_add2ObjectParam() {
-	uint16 a = getNextByte();
-	uint16 b = getNextByte();
-	uint16 c = getNextWord();
-	warning("STUB: o1_add2ObjectParam(%x, %x, %x)", a, b, c);
+int FWScript::o1_mulObjectParam() {
+	byte objIdx = getNextByte();
+	byte paramIdx = getNextByte();
+	int16 newValue = getNextWord();
+
+	debugC(5, kCineDebugScript, "Line: %d: mulObjectParam(objIdx:%d,paramIdx:%d,newValue:%d)", _line, objIdx, paramIdx, newValue);
+
+	// FIXME? In PC versions of Future Wars and Operation Stealth the multiplication is done unsigned.
+	// (16b x 16b -> 32b, taking only 16 LSBs). The question is, does it really matter?
+	int16 currentValue = getObjectParam(objIdx, paramIdx);
+	modifyObjectParam(objIdx, paramIdx, currentValue * newValue);
 	return 0;
 }
 
-/*! \todo Implement this instruction
- */
-int FWScript::o1_sub2ObjectParam() {
-	uint16 a = getNextByte();
-	uint16 b = getNextByte();
-	uint16 c = getNextWord();
-	warning("STUB: o1_sub2ObjectParam(%x, %x, %x)", a, b, c);
+int FWScript::o1_divObjectParam() {
+	byte objIdx = getNextByte();
+	byte paramIdx = getNextByte();
+	int16 newValue = getNextWord();
+
+	debugC(5, kCineDebugScript, "Line: %d: divObjectParam(objIdx:%d,paramIdx:%d,newValue:%d)", _line, objIdx, paramIdx, newValue);
+
+	// In PC versions of Future Wars and Operation Stealth the division is done signed.
+	// Dividend is first sign extended from 16 bits to 32 bits and then divided by the
+	// 16 bit divider using signed division. Only 16 LSBs of the quotient are saved.
+	int16 currentValue = getObjectParam(objIdx, paramIdx);
+	modifyObjectParam(objIdx, paramIdx, currentValue / newValue);
 	return 0;
 }
 
@@ -1600,7 +1609,8 @@
 	return 0;
 }
 
-/*! \todo Implement this instruction
+/*! \todo Implement this instruction's Amiga part (PC part already done)
+ * In PC versions of Future Wars and Operation Stealth this instruction does nothing else but read the parameters.
  */
 int FWScript::o1_op71() {
 	byte a = getNextByte();
@@ -1609,7 +1619,8 @@
 	return 0;
 }
 
-/*! \todo Implement this instruction
+/*! \todo Implement this instruction's Amiga part (PC part already done)
+ * In PC versions of Future Wars and Operation Stealth this instruction does nothing else but read the parameters.
  */
 int FWScript::o1_op72() {
 	uint16 a = getNextWord();
@@ -1619,7 +1630,8 @@
 	return 0;
 }
 
-/*! \todo Implement this instruction
+/*! \todo Implement this instruction's Amiga part (PC part already done)
+ * In PC versions of Future Wars and Operation Stealth this instruction does nothing else but read the parameters.
  */
 int FWScript::o1_op73() {
 	// I believe this opcode is identical to o1_op72(). In fact, Operation
@@ -1627,7 +1639,7 @@
 	uint16 a = getNextWord();
 	byte b = getNextByte();
 	uint16 c = getNextWord();
-	warning("STUB: o1_op72(%x, %x, %x)", a, b, c);
+	warning("STUB: o1_op73(%x, %x, %x)", a, b, c);
 	return 0;
 }
 

Modified: scummvm/branches/gsoc2008-rtl/engines/cine/script_os.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/cine/script_os.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/engines/cine/script_os.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -45,8 +45,8 @@
 	{ &FWScript::o1_addObjectParam, "bbw" },
 	{ &FWScript::o1_subObjectParam, "bbw" },
 	/* 04 */
-	{ &FWScript::o1_add2ObjectParam, "bbw" },
-	{ &FWScript::o1_sub2ObjectParam, "bbw" },
+	{ &FWScript::o1_mulObjectParam, "bbw" },
+	{ &FWScript::o1_divObjectParam, "bbw" },
 	{ &FWScript::o1_compareObjectParam, "bbw" },
 	{ &FWScript::o1_setupObject, "bwwww" },
 	/* 08 */

Modified: scummvm/branches/gsoc2008-rtl/engines/drascula/animation.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/drascula/animation.cpp	2008-06-02 21:08:49 UTC (rev 32504)
+++ scummvm/branches/gsoc2008-rtl/engines/drascula/animation.cpp	2008-06-02 21:36:45 UTC (rev 32505)
@@ -27,123 +27,139 @@
 
 namespace Drascula {
 
-static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 };
-static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 };
+void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal) {
+	int x = 0;
 
+	for (int n = 0; n < count; n++){
+		x++;
+		copyBackground(x, y, destX, destY, width, height, src, screenSurface);
+		updateScreen(destX, destY, destX, destY, width, height, screenSurface);
+		x += width;
+		pause(delayVal);
+	}
+}
+
+void DrasculaEngine::updateAnim2(int y, int px, int py, int width, int height, int count, byte* src) {
+	int x = 0;
+
+	for (int n = 0; n < count; n++) {
+		x++;
+		copyBackground(px, py, px, py, width, height, drawSurface1, screenSurface);
+		copyRect(x, y, px, py, width, height, src, screenSurface);
+		updateScreen(px, py, px, py, width, height, screenSurface);
+		x = x + width;
+		pause(3);
+	}
+}
+
 void DrasculaEngine::animation_1_1() {
 	int l, l2, p;
-	int pos_pixel[6];
+	int pixelPos[6];
 
 	while (term_int == 0) {
 		playMusic(29);
 		fliplay("logoddm.bin", 9);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		delay(600);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
 		delay(340);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		playMusic(26);
 		delay(500);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		fliplay("logoalc.bin", 8);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
-		loadPic("cielo.alg");
-		decompressPic(dir_zona_pantalla, 256);
+		loadPic("cielo.alg", screenSurface, COMPLETE_PAL);
 		black();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		FundeDelNegro(2);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		updateScreen();
+		fadeFromBlack(2);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		delay(900);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		color_abc(RED);
-		centra_texto(_textmisc[_lang][1], 160, 100);
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		color_abc(kColorRed);
+		centerText(_textmisc[_lang][1], 160, 100);
+		updateScreen();
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		delay(1000);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		delay(1200);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
 		fliplay("scrollb.bin", 9);
 
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
-		playSound("s5.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		playSound(5);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("scr2.bin", 17))
+		if (animate("scr2.bin", 17))
 			break;
-		stopSound_corte();
-		if (anima("scr3.bin", 17))
+		stopSound();
+		if (animate("scr3.bin", 17))
 			break;
-		loadPic("cielo2.alg");
-		decompressPic(dir_zona_pantalla, 256);
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("cielo2.alg", screenSurface, COMPLETE_PAL);
+		updateScreen();
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		FundeAlNegro(1);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		fadeToBlack(1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
 
-		loadPic("96.alg");
-		decompressPic(dir_hare_frente, COMPLETE_PAL);
-		loadPic("103.alg");
-		decompressPic(dir_dibujo1, HALF_PAL);
-		loadPic("104.alg");
-		decompressPic(dir_dibujo3, 1);
-		loadPic("aux104.alg");
-		decompressPic(dir_dibujo2, 1);
+		loadPic("96.alg", frontSurface, COMPLETE_PAL);
+		loadPic("103.alg", drawSurface1, HALF_PAL);
+		loadPic("104.alg", drawSurface3, 1);
+		loadPic("aux104.alg", drawSurface2, 1);
 
 		playMusic(4);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		delay(400);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
 		for (l2 = 0; l2 < 3; l2++)
 			for (l = 0; l < 7; l++) {
-				copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-				copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, dir_dibujo2, dir_zona_pantalla);
-				updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-				if (getscan() == Common::KEYCODE_ESCAPE) {
+				copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+				copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, drawSurface2, screenSurface);
+				updateScreen();
+				if (getScan() == Common::KEYCODE_ESCAPE) {
 					term_int = 1;
 					break;
 				}
 				pause(3);
 			}
-			if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+			if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 				break;
 
 		l2 = 0; p = 0;
-		pos_pixel[3] = 45;
-		pos_pixel[4] = 63;
-		pos_pixel[5] = 31;
+		pixelPos[3] = 45;
+		pixelPos[4] = 63;
+		pixelPos[5] = 31;
 
 		for (l = 0; l < 180; l++) {
-			copyBackground(0, 0, 320 - l, 0, l, 200, dir_dibujo3, dir_zona_pantalla);
-			copyBackground(l, 0, 0, 0, 320 - l, 200, dir_dibujo1, dir_zona_pantalla);
+			copyBackground(0, 0, 320 - l, 0, l, 200, drawSurface3, screenSurface);
+			copyBackground(l, 0, 0, 0, 320 - l, 200, drawSurface1, screenSurface);
 
-			pos_pixel[0] = interf_x[l2];
-			pos_pixel[1] = interf_y[l2];
-			pos_pixel[2] = 156 - l;
+			pixelPos[0] = interf_x[l2];
+			pixelPos[1] = interf_y[l2];
+			pixelPos[2] = 156 - l;
 
-			copyRectClip(pos_pixel, dir_dibujo2, dir_zona_pantalla);
-			updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+			copyRectClip(pixelPos, drawSurface2, screenSurface);
+			updateScreen();
 			p++;
 			if (p == 6) {
 				p = 0;
@@ -151,216 +167,207 @@
 			}
 			if (l2 == 7)
 				l2 = 0;
-			if (getscan() == Common::KEYCODE_ESCAPE) {
+			if (getScan() == Common::KEYCODE_ESCAPE) {
 				term_int = 1;
 				break;
 			}
 		}
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_zona_pantalla, dir_dibujo1);
+		copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1);
 
-		talk_dr_grande(_textd[_lang][1], "D1.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_dr_grande(1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
 		clearRoom();
 
-		loadPic("100.alg");
-		decompressPic(dir_dibujo1, HALF_PAL);
-		loadPic("auxigor.alg");
-		decompressPic(dir_hare_frente, 1);
-		loadPic("auxdr.alg");
-		decompressPic(dir_hare_fondo, 1);
+		loadPic("100.alg", drawSurface1, HALF_PAL);
+		loadPic("auxigor.alg", frontSurface, 1);
+		loadPic("auxdr.alg", backSurface, 1);
 		sentido_dr = 0;
 		x_dr = 129;
 		y_dr = 95;
 		sentido_igor = 1;
-		x_igor = 66;
-		y_igor = 97;
+		igorX = 66;
+		igorY = 97;
 
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		talk_igor_dch(_texti[_lang][8], "I8.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
+		talk_igor(8, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		talk_dr_izq(_textd[_lang][2], "d2.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
+		talk_drascula(2);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_dr_izq(_textd[_lang][3], "d3.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(3);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("lib.bin", 16))
+		if (animate("lib.bin", 16))
 			break;
-		if (anima("lib2.bin", 16))
+		if (animate("lib2.bin", 16))
 			break;
 		clearRoom();
-		color_solo = RED;
-		loadPic("plan1.alg");
-		decompressPic(dir_zona_pantalla, HALF_PAL);
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		color_solo = kColorRed;
+		loadPic("plan1.alg", screenSurface, HALF_PAL);
+		updateScreen();
 		pause(10);
 		talk_solo(_textd[_lang][4],"d4.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		loadPic("plan1.alg");
-		decompressPic(dir_zona_pantalla, HALF_PAL);
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		loadPic("plan1.alg", screenSurface, HALF_PAL);
+		updateScreen();
 		talk_solo(_textd[_lang][5], "d5.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("lib2.bin", 16))
+		if (animate("lib2.bin", 16))
 			break;
 		clearRoom();
-		loadPic("plan2.alg");
-		decompressPic(dir_zona_pantalla, HALF_PAL);
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		loadPic("plan2.alg", screenSurface, HALF_PAL);
+		updateScreen();
 		pause(20);
 		talk_solo(_textd[_lang][6], "d6.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("lib2.bin", 16))
+		if (animate("lib2.bin", 16))
 			break;
 		clearRoom();
-		loadPic("plan3.alg");
-		decompressPic(dir_zona_pantalla, HALF_PAL);
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		loadPic("plan3.alg", screenSurface, HALF_PAL);
+		updateScreen();
 		pause(20);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		talk_solo(_textd[_lang][7], "d7.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		loadPic("plan3.alg");
-		decompressPic(dir_zona_pantalla, HALF_PAL);
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		loadPic("plan3.alg", screenSurface, HALF_PAL);
+		updateScreen();
 		talk_solo(_textd[_lang][8], "d8.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
-		loadPic("100.alg");
-		decompressPic(dir_dibujo1, HALF_PAL);
+		loadPic("100.alg", drawSurface1, HALF_PAL);
 		MusicFadeout();
 		stopMusic();
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_igor_dch(_texti[_lang][9], "I9.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_igor(9, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_dr_izq(_textd[_lang][9], "d9.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(9);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_igor_dch(_texti[_lang][10], "I10.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_igor(10, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		playMusic(11);
-		talk_dr_izq(_textd[_lang][10], "d10.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(10);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("rayo1.bin", 16))
+		if (animate("rayo1.bin", 16))
 			break;
-		playSound("s5.als");
-		if (anima("rayo2.bin", 15))
+		playSound(5);
+		if (animate("rayo2.bin", 15))
 			break;
-		if (anima("frel2.bin", 16))
+		if (animate("frel2.bin", 16))
 			break;
-		if (anima("frel.bin", 16))
+		if (animate("frel.bin", 16))
 			break;
-		if (anima("frel.bin", 16))
+		if (animate("frel.bin", 16))
 			break;
-		stopSound_corte();
+		stopSound();
 		clearRoom();
 		black();
 		playMusic(23);
-		FundeDelNegro(0);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		fadeFromBlack(0);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		sentido_dr = 1;
-		talk_igor_dch(_texti[_lang][1], "I1.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_igor(1, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_dr_dch(_textd[_lang][11], "d11.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(11, 1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		sentido_dr = 3;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
 		pause(1);
 		sentido_dr = 0;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		talk_dr_izq(_textd[_lang][12], "d12.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
+		talk_drascula(12);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		sentido_dr = 3;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
 		pause(1);
 		sentido_dr = 1;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		talk_igor_dch(_texti[_lang][2], "I2.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
+		talk_igor(2, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		pause(13);
-		talk_dr_dch(_textd[_lang][13],"d13.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(13, 1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		sentido_dr = 3;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
 		pause(1);
 		sentido_dr = 0;
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-		pon_igor();
-		pon_dr();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		talk_dr_izq(_textd[_lang][14], "d14.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+		placeIgor();
+		placeDrascula();
+		updateScreen();
+		talk_drascula(14);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_igor_dch(_texti[_lang][3], "I3.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_igor(3, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_dr_izq(_textd[_lang][15], "d15.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(15);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_igor_dch(_texti[_lang][4], "I4.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_igor(4, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_dr_izq(_textd[_lang][16], "d16.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(16);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_igor_dch(_texti[_lang][5], "I5.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_igor(5, kIgorDch);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		sentido_igor = 3;
-		talk_dr_izq(_textd[_lang][17], "d17.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_drascula(17);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		pause(18);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		talk_igor_frente(_texti[_lang][6], "I6.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_igor(6, kIgorFront);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		FundeAlNegro(0);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		fadeToBlack(0);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
 
@@ -370,69 +377,10 @@
 		term_int = 1;
 	}
 	clearRoom();
-	loadPic("96.alg");
-	decompressPic(dir_hare_frente, COMPLETE_PAL);
-	loadPic("99.alg");
-	decompressPic(dir_hare_fondo, 1);
+	loadPic("96.alg", frontSurface, COMPLETE_PAL);
+	loadPic("99.alg", backSurface, 1);
 }
 
-void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) {
-	int x_talk[4] = {47, 93, 139, 185};
-	int cara;
-	int l = 0;
-	int length = strlen(said);
-
-	_rnd->setSeed((unsigned int)_system->getMillis() / 2);
-
-	color_abc(RED);
-
-	if (hay_sb == 1) {
-		sku = new Common::File;
-		sku->open(filename);
-		if (!sku->isOpen()) {
-			error("no puedo abrir archivo de voz");
-		}
-		ctvd_init(2);
-		ctvd_speaker(1);
-		ctvd_output(sku);
-	}
-
-bucless:
-
-	cara = _rnd->getRandomNumber(3);
-	copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-	copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, dir_dibujo2, dir_zona_pantalla);
-	copyBackground(x_talk[cara], 1, 171, 68, 45, 48, dir_dibujo2, dir_zona_pantalla);
-	l++;
-	if (l == 7)
-		l = 0;
-
-	if (withVoices == 0)
-		centra_texto(said, 191, 69);
-
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-
-	pause(3);
-
-	byte key = getscan();
-	if (key == Common::KEYCODE_ESCAPE)
-		term_int = 1;
-
-	if (key != 0)
-		ctvd_stop();
-	if (hay_sb == 1) {
-		if (LookForFree() != 0)
-			goto bucless;
-		delete sku;
-		sku = NULL;
-		ctvd_terminate();
-	} else {
-		length -= 2;
-		if (length > 0)
-			goto bucless;
-	}
-}
-
 void DrasculaEngine::animation_2_1() {
 	int l;
 
@@ -442,79 +390,74 @@
 	term_int = 0;
 
 	for (;;) {
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
-		if (anima("ag.bin", 14))
+		if (animate("ag.bin", 14))
 			break;
 
 		if (_lang == kSpanish)
-			dir_texto = dir_hare_frente;
+			textSurface = frontSurface;
 
-		loadPic("an11y13.alg");
-		decompressPic(dir_hare_dch, 1);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("an11y13.alg", extraSurface, 1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
-		talk_tabernero(_textt[_lang][22], "T22.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		talk_bartender(22);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
 		if (_lang == kSpanish)
-			dir_texto = dir_hare_dch;
+			textSurface = extraSurface;
 
-		loadPic("97.alg");
-		decompressPic(dir_hare_dch, 1);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("97.alg", extraSurface, 1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
 		pause(4);
-		playSound("s1.als");
-		hipo(18);
-		stopSound();
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		playSound(1);
+		hiccup(18);
+		finishSound();
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
 		clearRoom();
 		stopMusic();
-		corta_musica = 1;
-		memset(dir_zona_pantalla, 0, 64000);
-		color_solo = WHITE;
+		musicStopped = 1;
+		memset(screenSurface, 0, 64000);
+		color_solo = kColorWhite;
 		pause(80);
 
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		talk_solo(_textbj[_lang][1], "BJ1.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
-		loadPic("bj.alg");
-		decompressPic(dir_zona_pantalla, HALF_PAL);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("bj.alg", screenSurface, HALF_PAL);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		black();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		FundeDelNegro(1);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		updateScreen();
+		fadeFromBlack(1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		color_solo = YELLOW;
+		color_solo = kColorYellow;
 		talk_solo(_text[_lang][214], "214.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
 
-		loadPic("16.alg");
-		decompressPic(dir_dibujo1, HALF_PAL);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("16.alg", drawSurface1, HALF_PAL);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		loadPic("auxbj.alg");
-		decompressPic(dir_dibujo3, 1);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("auxbj.alg", drawSurface3, 1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
 		roomNumber = 16;
 
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		for (l = 0; l < 200; l++)
 			factor_red[l] = 99;
@@ -525,19 +468,18 @@
 		hare_y = 95;
 		sentido_hare = 1;
 		hare_se_ve = 1;
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
-		loadPic("97g.alg");
-		decompressPic(dir_hare_dch, 1);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("97g.alg", extraSurface, 1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
-		if (anima("lev.bin", 15))
+		if (animate("lev.bin", 15))
 			break;
 
 		lleva_al_hare(100 + ancho_hare / 2, 99 + alto_hare);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		sentido_hare = 1;
 		hare_x = 100;
@@ -560,60 +502,57 @@
 		talk(221);
 		talk_bj(10);
 		talk(222);
-		if (anima("gaf.bin", 15))
+		if (animate("gaf.bin", 15))
 			break;
-		if (anima("bjb.bin", 14))
+		if (animate("bjb.bin", 14))
 			break;
 		playMusic(9);
-		loadPic("97.alg");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		loadPic("97.alg", extraSurface, 1);
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		decompressPic(dir_hare_dch, 1);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
-			break;
 		updateRoom();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		updateScreen();
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		pause(120);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		talk_solo(_text[_lang][223], "223.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		color_solo = WHITE;
+		color_solo = kColorWhite;
 		updateRoom();
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		updateScreen();
 		pause(110);
 		talk_solo(_textbj[_lang][11], "BJ11.als");
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		updateRoom();
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		updateScreen();
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		pause(118);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		lleva_al_hare(132, 97 + alto_hare);
 		pause(60);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		talk(224);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		talk_bj(12);
 		lleva_al_hare(157, 98 + alto_hare);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("bes.bin", 16))
+		if (animate("bes.bin", 16))
 			break;
 		playMusic(11);
-		if (anima("rap.bin", 16))
+		if (animate("rap.bin", 16))
 			break;
 		sentido_hare = 3;
 		// The room number was originally changed here to "no_bj.alg",
@@ -625,111 +564,107 @@
 		// Also check animation_9_6(), where the same hack was used by
 		// the original
 		roomNumber = -1;
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		pause(8);
 		updateRoom();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		updateScreen();
 		talk(225);
 		pause(76);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		sentido_hare = 1;
 		updateRoom();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		updateScreen();
 		talk(226);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		updateRoom();
-		updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+		updateScreen();
 		pause(30);
-		if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
+		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		talk(227);
-		FundeAlNegro(0);
+		fadeToBlack(0);
 		break;
 	}
 }
 
 void DrasculaEngine::animation_3_1() {
 	if (_lang == kSpanish)
-		dir_texto = dir_hare_frente;
+		textSurface = frontSurface;
 
-	loadPic("an11y13.alg");
-	decompressPic(dir_hare_dch, 1);
+	loadPic("an11y13.alg", extraSurface, 1);
 
-	talk(_text[_lang][192], "192.als");
-	talk_tabernero(_textt[_lang][1], "t1.als");
-	talk(_text[_lang][193], "193.als");
-	talk_tabernero(_textt[_lang][2], "t2.als");
-	talk(_text[_lang][194], "194.als");
-	talk_tabernero(_textt[_lang][3], "t3.als");
-	talk(_text[_lang][195], "195.als");
-	talk_tabernero(_textt[_lang][4], "t4.als");
-	talk(_text[_lang][196], "196.als");
-	talk_tabernero(_textt[_lang][5], "t5.als");
-	talk_tabernero(_textt[_lang][6], "t6.als");
-	talk(_text[_lang][197], "197.als");
-	talk_tabernero(_textt[_lang][7], "t7.als");
-	talk(_text[_lang][198], "198.als");
-	talk_tabernero(_textt[_lang][8], "t8.als");
-	talk(_text[_lang][199], "199.als");
-	talk_tabernero(_textt[_lang][9], "t9.als");
-	talk(_text[_lang][200], "200.als");
-	talk(_text[_lang][201], "201.als");
-	talk(_text[_lang][202], "202.als");
+	talk(192);
+	talk_bartender(1);
+	talk(193);
+	talk_bartender(2);
+	talk(194);
+	talk_bartender(3);
+	talk(195);
+	talk_bartender(4);
+	talk(196);
+	talk_bartender(5);
+	talk_bartender(6);
+	talk(197);
+	talk_bartender(7);
+	talk(198);
+	talk_bartender(8);
+	talk(199);
+	talk_bartender(9);
+	talk(200);
+	talk(201);
+	talk(202);
 
 	flags[0] = 1;
 
 	if (_lang == kSpanish)
-		dir_texto = dir_hare_dch;
+		textSurface = extraSurface;
 
-	loadPic("97.alg");
-	decompressPic(dir_hare_dch, 1);
+	loadPic("97.alg", extraSurface, 1);
 }
 
 void DrasculaEngine::animation_4_1() {
 	if (_lang == kSpanish)
-		dir_texto = dir_hare_frente;
+		textSurface = frontSurface;
 
-	loadPic("an12.alg");
-	decompressPic(dir_hare_dch, 1);
+	loadPic("an12.alg", extraSurface, 1);
 
-	talk(_text[_lang][205],"205.als");
+	talk(205);
 
 	updateRefresh_pre();
 
-	copyBackground(1, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla);
-	updateScreen(228,112, 228,112, 47,60, dir_zona_pantalla);
+	copyBackground(1, 139, 228, 112, 47, 60, extraSurface, screenSurface);
+	updateScreen(228,112, 228,112, 47,60, screenSurface);
 
 	pause(3);
 
 	updateRefresh_pre();
 
-	copyBackground(49, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla);
+	copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface);
 	pon_hare();
 
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+	updateScreen();
 
 	pause(3);
 	stopMusic();
 	flags[11] = 1;
 
-	talk_pianista(_textp[_lang][1], "p1.als");
-	talk(_text[_lang][206], "206.als");
-	talk_pianista(_textp[_lang][2], "p2.als");
-	talk(_text[_lang][207], "207.als");
-	talk_pianista(_textp[_lang][3], "p3.als");
-	talk(_text[_lang][208], "208.als");
-	talk_pianista(_textp[_lang][4], "p4.als");
-	talk(_text[_lang][209], "209.als");
+	talk_pianist(1);
+	talk(206);
+	talk_pianist(2);
+	talk(207);
+	talk_pianist(3);
+	talk(208);
+	talk_pianist(4);
+	talk(209);
 
 	if (_lang == kSpanish)
-		dir_texto = dir_hare_dch;
+		textSurface = extraSurface;
 
 	flags[11] = 0;
-	loadPic("97.alg");
-	decompressPic(dir_hare_dch, 1);
+	loadPic("97.alg", extraSurface, 1);
 }
 
 void DrasculaEngine::animation_1_2() {
@@ -738,89 +673,38 @@
 }
 
 void DrasculaEngine::animation_2_2() {
-	int n, x=0;
-
 	sentido_hare = 0;
-	copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
+	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
 	pon_hare();
 	updateRefresh();
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-	loadPic("an2_1.alg");
-	decompressPic(dir_hare_frente, 1);
-	loadPic("an2_2.alg");
-	decompressPic(dir_hare_dch, 1);
+	updateScreen();
+	loadPic("an2_1.alg", frontSurface, 1);
+	loadPic("an2_2.alg", extraSurface, 1);
 
-	copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-	copyBackground(1, 1, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla);
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-	for (n = 0; n < 6; n++) {
-		x++;
-		copyBackground(x, 1, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla);
-		updateScreen(201,87, 201,87, 50,52, dir_zona_pantalla);
-		x = x + 50;
-		pause(3);
-	}
+	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+	copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface);
+	updateScreen();
 
-	x = 0;
+	updateAnim(1, 201, 87, 50, 52, 6, frontSurface);
+	updateAnim(55, 201, 87, 50, 52, 6, frontSurface);
+	updateAnim(109, 201, 87, 50, 52, 6, frontSurface);
 
-	for (n = 0; n < 6; n++) {
-		x++;
-		copyBackground(x, 55, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla);
-		updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla);
-		x = x + 50;
-		pause(3);
-	}
+	playSound(2);
 
-	x = 0;
+	updateAnim(1, 201, 87, 50, 52, 6, extraSurface);
+	updateAnim(55, 201, 87, 50, 52, 6, extraSurface);
+	updateAnim(109, 201, 87, 50, 52, 2, extraSurface);
 
-	for (n = 0; n < 6; n++){
-		x++;
-		copyBackground(x, 109, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla);
-		updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla);
-		x = x + 50;
-		pause(3);
-	}
+	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+	updateScreen();
 
-	x = 0;
-	playSound("s2.als");
+	finishSound();
 
-	for (n = 0; n < 6; n++) {
-		x++;
-		copyBackground(x, 1, 201, 87, 50, 52, dir_hare_dch, dir_zona_pantalla);
-		updateScreen(201,87, 201,87, 50,52, dir_zona_pantalla);
-		x = x + 50;
-		pause(3);
-	}
-
-	x = 0;
-
-	for (n = 0; n < 6; n++) {
-		x++;
-		copyBackground(x, 55, 201, 87, 50, 52, dir_hare_dch, dir_zona_pantalla);
-		updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla);
-		x = x + 50;
-		pause(3);
-	}
-	x = 0;
-
-	for (n = 0; n < 2; n++) {
-		x++;
-		copyBackground(x, 109, 201, 87, 50, 52, dir_hare_dch, dir_zona_pantalla);
-		updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla);
-		x = x + 50;
-		pause(3);
-	}
-
-	copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-
-	stopSound();
-
 	pause (4);
 
-	playSound("s1.als");
+	playSound(1);
 	hipo_sin_nadie(12);
-	stopSound();
+	finishSound();
 }
 
 void DrasculaEngine::animation_3_2() {
@@ -834,114 +718,102 @@
 	flags[9] = 1;
 
 	pause(12);
-	talk(_textd[_lang][56], "d56.als");
+	talk(56);
 	pause(8);
 
 	clearRoom();
-	loadPic("ciego1.alg");
-	decompressPic(dir_dibujo1, HALF_PAL);
-	loadPic("ciego2.alg");
-	decompressPic(dir_dibujo3, 1);
-	loadPic("ciego3.alg");
-	decompressPic(dir_hare_dch, 1);
-	loadPic("ciego4.alg");
-	decompressPic(dir_hare_fondo, 1);
-	loadPic("ciego5.alg");
-	decompressPic(dir_hare_frente, 1);
+	loadPic("ciego1.alg", drawSurface1, HALF_PAL);	// ciego = blind
+	loadPic("ciego2.alg", drawSurface3, 1);
+	loadPic("ciego3.alg", extraSurface, 1);
+	loadPic("ciego4.alg", backSurface, 1);
+	loadPic("ciego5.alg", frontSurface, 1);
 
 	if (_lang == kSpanish)
-		dir_texto = dir_hare_frente;
+		textSurface = frontSurface;
 
-	copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+	updateScreen();
 
 	pause(10);
 
-	talk_ciego(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]);
+	talk_blind(1);
 	pause(5);
 	talk_hacker(_textd[_lang][57], "d57.als");
 	pause(6);
-	talk_ciego(_textd[_lang][69],"d69.als", _textd1[_lang][69 - TEXTD_START]);
+	talk_blind(2);
 	pause(4);
 	talk_hacker(_textd[_lang][58],"d58.als");
-	talk_ciego(_textd[_lang][70],"d70.als", _textd1[_lang][70 - TEXTD_START]);
+	talk_blind(3);
 	delay(14);
 	talk_hacker(_textd[_lang][59],"d59.als");
-	talk_ciego(_textd[_lang][71],"d71.als", _textd1[_lang][71 - TEXTD_START]);
+	talk_blind(4);
 	talk_hacker(_textd[_lang][60],"d60.als");
-	talk_ciego(_textd[_lang][72],"d72.als", _textd1[_lang][72 - TEXTD_START]);
+	talk_blind(5);
 	talk_hacker(_textd[_lang][61],"d61.als");
-	talk_ciego(_textd[_lang][73],"d73.als", _textd1[_lang][73 - TEXTD_START]);
+	talk_blind(6);
 	talk_hacker(_textd[_lang][62],"d62.als");
-	talk_ciego(_textd[_lang][74],"d74.als", _textd1[_lang][74 - TEXTD_START]);
+	talk_blind(7);
 	talk_hacker(_textd[_lang][63],"d63.als");
-	talk_ciego(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]);
-	copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+	talk_blind(8);
+	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+	updateScreen();
 	_system->delayMillis(1000);
 	talk_hacker(_textd[_lang][64], "d64.als");
-	talk_ciego(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]);
+	talk_blind(9);
 
-	copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
-	updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
+	updateScreen();
 
 	pause(14);
 
 	clearRoom();
 
 	playMusic(roomMusic);
-	loadPic("9.alg");
-	decompressPic(dir_dibujo1, HALF_PAL);
-	loadPic("aux9.alg");
-	decompressPic(dir_dibujo3, 1);
-	loadPic("96.alg");
-	decompressPic(dir_hare_frente, 1);
-	loadPic("97.alg");
-	decompressPic(dir_hare_dch, 1);
-	loadPic("99.alg");
-	decompressPic(dir_hare_fondo, 1);
+	loadPic("9.alg", drawSurface1, HALF_PAL);
+	loadPic("aux9.alg", drawSurface3, 1);
+	loadPic("96.alg", frontSurface, 1);
+	loadPic("97.alg", extraSurface, 1);
+	loadPic("99.alg", backSurface, 1);
 	withoutVerb();
 
 	if (_lang == kSpanish)
-		dir_texto = dir_hare_dch;
+		textSurface = extraSurface;
 
 	flags[9] = 0;
 	flags[4] = 1;
 }
 
 void DrasculaEngine::animation_8_2() {
-	talk_pianista(_textp[_lang][6], "P6.als");
-	talk(_text[_lang][358], "358.als");
-	talk_pianista(_textp[_lang][7], "P7.als");
-	talk_pianista(_textp[_lang][8], "P8.als");
+	talk_pianist(6);
+	talk(358);
+	talk_pianist(7);
+	talk_pianist(8);
 }
 
 void DrasculaEngine::animation_9_2() {
-	talk_pianista(_textp[_lang][9], "P9.als");
-	talk_pianista(_textp[_lang][10], "P10.als");
-	talk_pianista(_textp[_lang][11], "P11.als");
+	talk_pianist(9);
+	talk_pianist(10);
+	talk_pianist(11);
 }
 
 void DrasculaEngine::animation_10_2() {
-	talk_pianista(_textp[_lang][12], "P12.als");
-	talk(_text[_lang][361], "361.als");
+	talk_pianist(12);
+	talk(361);
 	pause(40);
-	talk_pianista(_textp[_lang][13], "P13.als");
-	talk(_text[_lang][362], "362.als");
-	talk_pianista(_textp[_lang][14], "P14.als");
-	talk(_text[_lang][363], "363.als");
-	talk_pianista(_textp[_lang][15], "P15.als");
-	talk(_text[_lang][364], "364.als");
-	talk_pianista(_textp[_lang][16], "P16.als");
+	talk_pianist(13);
+	talk(362);
+	talk_pianist(14);
+	talk(363);
+	talk_pianist(15);
+	talk(364);
+	talk_pianist(16);
 }
 
 void DrasculaEngine::animation_14_2() {
 	int n, pos_cabina[6];
 	int l = 0;
 
-	loadPic("an14_2.alg");
-	decompressPic(dir_hare_fondo, 1);
-	loadPic("an14_1.alg");
+	loadPic("an14_2.alg", backSurface, 1);
 
 	pos_cabina[0] = 150;
 	pos_cabina[1] = 6;
@@ -951,43 +823,42 @@
 	pos_cabina[5] = 161;
 
 	for (n = -160; n <= 0; n = n + 5 + l) {
-		copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
+		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
 		updateRefresh_pre();
 		pon_hare();
 		pon_vb();
 		pos_cabina[3] = n;

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list