[Scummvm-cvs-logs] SF.net SVN: scummvm:[51963] scummvm/branches/gsoc2010-plugins

toneman1138 at users.sourceforge.net toneman1138 at users.sourceforge.net
Wed Aug 11 02:54:35 CEST 2010


Revision: 51963
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51963&view=rev
Author:   toneman1138
Date:     2010-08-11 00:54:34 +0000 (Wed, 11 Aug 2010)

Log Message:
-----------
manually merged base, graphics, common, sound, and gui as I am quite skilled at somehow messing up svn merge :-)

Modified Paths:
--------------
    scummvm/branches/gsoc2010-plugins/base/commandLine.cpp
    scummvm/branches/gsoc2010-plugins/base/commandLine.h
    scummvm/branches/gsoc2010-plugins/base/main.cpp
    scummvm/branches/gsoc2010-plugins/common/error.h
    scummvm/branches/gsoc2010-plugins/common/macresman.cpp
    scummvm/branches/gsoc2010-plugins/common/str.h
    scummvm/branches/gsoc2010-plugins/common/stream.h
    scummvm/branches/gsoc2010-plugins/common/unzip.cpp
    scummvm/branches/gsoc2010-plugins/configure
    scummvm/branches/gsoc2010-plugins/gui/about.cpp
    scummvm/branches/gsoc2010-plugins/gui/editable.cpp
    scummvm/branches/gsoc2010-plugins/gui/options.cpp
    scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout.stx
    scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout_lowres.stx
    scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout.stx
    scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout_lowres.stx
    scummvm/branches/gsoc2010-plugins/ports.mk
    scummvm/branches/gsoc2010-plugins/sound/decoders/adpcm.cpp
    scummvm/branches/gsoc2010-plugins/sound/mods/rjp1.cpp

Removed Paths:
-------------
    scummvm/branches/gsoc2010-plugins/Makefile.wiz
    scummvm/branches/gsoc2010-plugins/graphics/video/coktelvideo/

Deleted: scummvm/branches/gsoc2010-plugins/Makefile.wiz
===================================================================
--- scummvm/branches/gsoc2010-plugins/Makefile.wiz	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/Makefile.wiz	2010-08-11 00:54:34 UTC (rev 51963)
@@ -1,179 +0,0 @@
-srcdir      ?= .
-
-DEFINES     := -DHAVE_CONFIG_H
-LDFLAGS     :=
-INCLUDES    := -I. -I$(srcdir) -I$(srcdir)/engines
-LIBS        :=
-OBJS        :=
-DEPDIR      := .deps
-
-CXX := arm-open2x-linux-g++
-CXXFLAGS := -mcpu=arm926ej-s -mtune=arm926ej-s -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include -g -mcpu=arm926ej-s -mtune=arm926ej-s -mcpu=arm926ej-s -mtune=arm926ej-s -ansi -W -Wno-unused-parameter -Wconversion -pedantic
-LD := arm-open2x-linux-g++
-LIBS +=  -L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lvorbisidec -L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lmad -L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lz -L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -Wl,-rpath,/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lSDL -lpthread
-RANLIB := arm-open2x-linux-ranlib
-STRIP := arm-open2x-linux-strip
-AR := arm-open2x-linux-ar cru
-AS := arm-open2x-linux-as
-ASFLAGS :=  -mfloat-abi=soft
-WINDRES := arm-open2x-linux-windres
-WINDRESFLAGS := 
-WIN32PATH=C:/scummvm
-AOS4PATH=Games:ScummVM
-STATICLIBPATH=/sw
-
-BACKEND := gp2xwiz
-MODULES +=  backends/platform/gp2xwiz
-MODULE_DIRS += 
-EXEEXT := .wiz
-NASM := 
-NASMFLAGS := 
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-bindir = ${exec_prefix}/bin
-datarootdir = ${prefix}/share
-datadir = ${datarootdir}/scummvm
-docdir = ${datarootdir}/doc/scummvm
-libdir = ${exec_prefix}/lib
-mandir = ${datarootdir}/man
-
-HAVE_GCC = 1
-USE_ARM_SOUND_ASM = 1
-USE_ARM_SMUSH_ASM = 1
-USE_ARM_GFX_ASM = 1
-USE_ARM_COSTUME_ASM = 1
-USE_ARM_SCALER_ASM = 1
-# VERBOSE_BUILD = 1
-# USE_MT32EMU = 1
-# USE_RGB_COLOR = 1
-USE_SCALERS = 1
-# USE_HQ_SCALERS = 1
-USE_INDEO3 = 1
-# USE_VORBIS = 1
-USE_TREMOR = 1
-# USE_FLAC = 1
-USE_MAD = 1
-USE_ZLIB = 1
-# USE_MPEG2 = 1
-# USE_NASM = 1
-HAVE_GCC3 = 1
-CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP
-
-DYNAMIC_MODULES := 1
-VERBOSE_BUILD := 1
-
-ifeq ($(DYNAMIC_MODULES),1)
-ENABLED = DYNAMIC_PLUGIN
-PLUGIN_PREFIX :=
-PLUGIN_SUFFIX := .plugin
-PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
-CXXFLAGS        += -DDYNAMIC_MODULES
-PLUGIN_LDFLAGS  += --nostartfiles -Wl,-q,--just-symbols,scummvm.wiz,-Tbackends/platform/gp2xwiz/plugin.ld,--retain-symbols-file,backends/platform/gp2xwiz/plugin.syms -lstdc++ -lc
-PRE_OBJS_FLAGS  := -Wl,-whole-archive
-POST_OBJS_FLAGS := -Wl,-no-whole-archive
-#LIBS           += -ldl
-else
-ENABLED = STATIC_PLUGIN
-endif
-
-ENABLE_SCUMM = $(ENABLED)
-ENABLE_SCUMM_7_8 = $(ENABLED)
-ENABLE_HE = $(ENABLED)
-ENABLE_AGI = $(ENABLED)
-ENABLE_AGOS = $(ENABLED)
-ENABLE_AGOS2 = $(ENABLED)
-ENABLE_CINE = $(ENABLED)
-ENABLE_CRUISE = $(ENABLED)
-ENABLE_DRACI = $(ENABLED)
-ENABLE_DRASCULA = $(ENABLED)
-ENABLE_GOB = $(ENABLED)
-ENABLE_GROOVIE = $(ENABLED)
-ENABLE_GROOVIE2 = $(ENABLED)
-ENABLE_KYRA = $(ENABLED)
-ENABLE_LOL = $(ENABLED)
-ENABLE_LURE = $(ENABLED)
-ENABLE_M4 = $(ENABLED)
-ENABLE_MADE = $(ENABLED)
-ENABLE_MOHAWK = $(ENABLED)
-ENABLE_PARALLACTION = $(ENABLED)
-ENABLE_QUEEN = $(ENABLED)
-ENABLE_SAGA = $(ENABLED)
-ENABLE_IHNM = $(ENABLED)
-ENABLE_SAGA2 = $(ENABLED)
-ENABLE_SCI = $(ENABLED)
-ENABLE_SCI32 = $(ENABLED)
-ENABLE_SKY = $(ENABLED)
-ENABLE_SWORD1 = $(ENABLED)
-ENABLE_SWORD2 = $(ENABLED)
-ENABLE_TEENAGENT = $(ENABLED)
-ENABLE_TINSEL = $(ENABLED)
-ENABLE_TOUCHE = $(ENABLED)
-ENABLE_TUCKER = $(ENABLED)
-
-INCLUDES +=  -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
-OBJS += 
-DEFINES += -DNDEBUG -DUNIX -DUNIX -DGP2XWIZ -DNDEBUG -DENABLE_VKEYBD -DDATA_PATH=\"${datarootdir}/scummvm\" -DPLUGIN_DIRECTORY=\"${exec_prefix}/lib/scummvm\"
-LDFLAGS += -L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -lm
-
-port_mk = ports.mk 
-
-ifeq "$(HAVE_GCC)" "1"
-	CXXFLAGS:= -Wall $(CXXFLAGS)
-	# Turn off some annoying and not-so-useful warnings
-	CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
-	# Enable even more warnings...
-	CXXFLAGS+= -Wpointer-arith -Wcast-qual -Wcast-align
-	CXXFLAGS+= -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings
-
-	# Currently we disable this gcc flag, since it will also warn in cases,
-	# where using GCC_PRINTF (means: __attribute__((format(printf, x, y))))
-	# is not possible, thus it would fail compiliation with -Werror without
-	# being helpful.
-	#CXXFLAGS+= -Wmissing-format-attribute
-
-	# Disable RTTI and exceptions, and enable checking of pointers returned by "new"
-	CXXFLAGS+= -fno-rtti -fno-exceptions -fcheck-new
-endif
-
-ifeq "$(HAVE_CLANG)" "1"
-	CXXFLAGS+= -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants
-endif
-
-#######################################################################
-# Default commands - put the necessary replacements in config.mk      #
-#######################################################################
-
-CAT     ?= cat
-CP      ?= cp
-ECHO    ?= printf
-INSTALL ?= install
-MKDIR   ?= mkdir -p
-RM      ?= rm -f
-RM_REC  ?= $(RM) -r
-ZIP     ?= zip -q
-
-#######################################################################
-# Misc stuff - you should never have to edit this                     #
-#######################################################################
-
-EXECUTABLE  := scummvm$(EXEEXT)
-
-include $(srcdir)/Makefile.common
-
-# check if configure has been run or has been changed since last run
-config.h config.mk: $(srcdir)/configure
-ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
-	@echo "Running $(srcdir)/configure with the last specified parameters"
-	@sleep 2
-	LDFLAGS="$(SAVED_LDFLAGS)" CXX="$(SAVED_CXX)" \
-			CXXFLAGS="$(SAVED_CXXFLAGS)" CPPFLAGS="$(SAVED_CPPFLAGS)" \
-			ASFLAGS="$(SAVED_ASFLAGS)" WINDRESFLAGS="$(SAVED_WINDRESFLAGS)" \
-			$(srcdir)/configure $(SAVED_CONFIGFLAGS)
-else
-	$(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
-endif
-
-ifneq ($(origin port_mk), undefined)
-include $(srcdir)/$(port_mk)
-endif

Modified: scummvm/branches/gsoc2010-plugins/base/commandLine.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/base/commandLine.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/base/commandLine.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -598,7 +598,9 @@
 }
 
 /** List all saves states for the given target. */
-static void listSaves(const char *target) {
+static Common::Error listSaves(const char *target) {
+	Common::Error result = Common::kNoError;
+
 	// FIXME HACK
 	g_system->initBackend();
 
@@ -623,13 +625,14 @@
 	GameDescriptor game = EngineMan.findGame(gameid, &plugin);
 
 	if (!plugin) {
-		error("Could not find any plugin to handle target '%s' (gameid '%s')", target, gameid.c_str());
-		return;
+		warning("Could not find any plugin to handle target '%s' (gameid '%s')", target, gameid.c_str());
+		return Common::kPluginNotFound;
 	}
 
 	if (!(*plugin)->hasFeature(MetaEngine::kSupportsListSaves)) {
 		// TODO: Include more info about the target (desc, engine name, ...) ???
 		printf("ScummVM does not support listing save states for target '%s' (gameid '%s') .\n", target, gameid.c_str());
+		result = Common::kPluginNotSupportSaves;
 	} else {
 		// Query the plugin for a list of savegames
 		SaveStateList saveList = (*plugin)->listSaves(target);
@@ -639,6 +642,9 @@
 		printf("  Slot Description                                           \n"
 		       "  ---- ------------------------------------------------------\n");
 
+		if (saveList.size() == 0)
+			result = Common::kNoSavesError;
+
 		for (SaveStateList::const_iterator x = saveList.begin(); x != saveList.end(); ++x) {
 			printf("  %-4s %s\n", x->save_slot().c_str(), x->description().c_str());
 			// TODO: Could also iterate over the full hashmap, printing all key-value pairs
@@ -647,6 +653,8 @@
 
 	// Revert to the old active domain
 	ConfMan.setActiveDomain(oldDomain);
+
+	return result;
 }
 
 /** Lists all usable themes */
@@ -859,7 +867,7 @@
 #endif // DISABLE_COMMAND_LINE
 
 
-bool processSettings(Common::String &command, Common::StringMap &settings) {
+Common::Error processSettings(Common::String &command, Common::StringMap &settings) {
 
 #ifndef DISABLE_COMMAND_LINE
 
@@ -868,34 +876,33 @@
 	// have been loaded.
 	if (command == "list-targets") {
 		listTargets();
-		return false;
+		return Common::kNoError;
 	} else if (command == "list-games") {
 		listGames();
-		return false;
+		return Common::kNoError;
 	} else if (command == "list-saves") {
-		listSaves(settings["list-saves"].c_str());
-		return false;
+		return listSaves(settings["list-saves"].c_str());
 	} else if (command == "list-themes") {
 		listThemes();
-		return false;
+		return Common::kNoError;
 	} else if (command == "version") {
 		printf("%s\n", gScummVMFullVersion);
 		printf("Features compiled in: %s\n", gScummVMFeatures);
-		return false;
+		return Common::kNoError;
 	} else if (command == "help") {
 		printf(HELP_STRING, s_appName);
-		return false;
+		return Common::kNoError;
 	}
 #ifdef DETECTOR_TESTING_HACK
 	else if (command == "test-detector") {
 		runDetectorTest();
-		return false;
+		return Common::kNoError;
 	}
 #endif
 #ifdef UPGRADE_ALL_TARGETS_HACK
 	else if (command == "upgrade-targets") {
 		upgradeTargets();
-		return false;
+		return Common::kNoError;
 	}
 #endif
 
@@ -967,7 +974,7 @@
 		ConfMan.set(key, value, Common::ConfigManager::kTransientDomain);
 	}
 
-	return true;
+	return Common::kArgumentNotProcessed;
 }
 
 } // End of namespace Base

Modified: scummvm/branches/gsoc2010-plugins/base/commandLine.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/base/commandLine.h	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/base/commandLine.h	2010-08-11 00:54:34 UTC (rev 51963)
@@ -33,7 +33,7 @@
 
 void registerDefaults();
 Common::String parseCommandLine(Common::StringMap &settings, int argc, const char * const *argv);
-bool processSettings(Common::String &command, Common::StringMap &settings);
+Common::Error processSettings(Common::String &command, Common::StringMap &settings);
 
 } // End of namespace Base
 

Modified: scummvm/branches/gsoc2010-plugins/base/main.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/base/main.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/base/main.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -109,9 +109,9 @@
 #if defined(NEW_PLUGIN_DESIGN_FIRST_REFINEMENT) && defined(DYNAMIC_MODULES)
 	GameDescriptor game = EngineMan.findGameOnePlugAtATime(gameid, &plugin);
 #else
-	GameDescriptor game = EngineMan.findGame(gameid, &plugin);
+ 	GameDescriptor game = EngineMan.findGame(gameid, &plugin);
 #endif
-	
+
 	if (plugin == 0) {
 		printf("failed\n");
 		warning("%s is an invalid gameid. Use the --list-games option to list supported gameid", gameid.c_str());
@@ -347,8 +347,8 @@
 #if defined(NEW_PLUGIN_DESIGN_FIRST_REFINEMENT) && defined(DYNAMIC_MODULES) //note: I'm going to refactor this name later :P
 	// Don't load the plugins initially in this case.
 #else
-	// Load the plugins.
-	PluginManager::instance().loadPlugins();
+ 	// Load the plugins.
+ 	PluginManager::instance().loadPlugins();
 #endif
 
 	// If we received an invalid music parameter via command line we check this here.
@@ -363,9 +363,11 @@
 
 	// Process the remaining command line settings. Must be done after the
 	// config file and the plugins have been loaded.
-	if (!Base::processSettings(command, settings))
-		return 0;
+	Common::Error res;
 
+	if ((res = Base::processSettings(command, settings)) != Common::kArgumentNotProcessed)
+		return res;
+
 	// Init the backend. Must take place after all config data (including
 	// the command line params) was read.
 	system.initBackend();
@@ -390,7 +392,7 @@
 	// Unless a game was specified, show the launcher dialog
 	if (0 == ConfMan.getActiveDomain())
 		launcherDialog();
-		
+
 	// FIXME: We're now looping the launcher. This, of course, doesn't
 	// work as well as it should. In theory everything should be destroyed
 	// cleanly, so this is now enabled to encourage people to fix bits :)

Modified: scummvm/branches/gsoc2010-plugins/common/error.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/common/error.h	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/common/error.h	2010-08-11 00:54:34 UTC (rev 51963)
@@ -59,10 +59,16 @@
 	kPathNotDirectory,			///< The specified path does not point to a directory
 	kPathNotFile,				///< The specified path does not point to a file
 
-	kCreatingFileFailed,
-	kReadingFailed,				///< Failed creating a (savestate) file
+	kCreatingFileFailed,		///< Failed creating a (savestate) file
+	kReadingFailed,				///< Failed to read a file (permission denied?)
 	kWritingFailed,				///< Failure to write data -- disk full?
 
+	// The following are used by --list-saves
+	kPluginNotFound,			///< Failed to find plugin to handle tager
+	kPluginNotSupportSaves,		///< Failed if plugin does not support saves
+	kNoSavesError,				///< There are no saves to show
+
+	kArgumentNotProcessed,		///< Used in command line parsing
 	kUnknownError				///< Catch-all error, used if no other error code matches
 };
 

Modified: scummvm/branches/gsoc2010-plugins/common/macresman.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/common/macresman.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/common/macresman.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -439,6 +439,11 @@
 
 	_stream->seek(_dataOffset + _resLists[typeNum][resNum].dataOffset);
 	uint32 len = _stream->readUint32BE();
+
+	// Ignore resources with 0 length
+	if (!len)
+		return 0;
+
 	return _stream->readStream(len);
 }
 
@@ -448,6 +453,11 @@
 			if (_resLists[i][j].nameOffset != -1 && filename.equalsIgnoreCase(_resLists[i][j].name)) {
 				_stream->seek(_dataOffset + _resLists[i][j].dataOffset);
 				uint32 len = _stream->readUint32BE();
+
+				// Ignore resources with 0 length
+				if (!len)
+					return 0;
+
 				return _stream->readStream(len);
 			}
 		}

Modified: scummvm/branches/gsoc2010-plugins/common/str.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/common/str.h	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/common/str.h	2010-08-11 00:54:34 UTC (rev 51963)
@@ -225,6 +225,12 @@
 	typedef const char *  const_iterator;
 
 	iterator begin() {
+		// Since the user could potentially
+		// change the string via the returned
+		// iterator we have to assure we are
+		// pointing to a unique storage.
+		makeUnique();
+
 		return _str;
 	}
 

Modified: scummvm/branches/gsoc2010-plugins/common/stream.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/common/stream.h	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/common/stream.h	2010-08-11 00:54:34 UTC (rev 51963)
@@ -156,7 +156,7 @@
 class ReadStream : virtual public Stream {
 public:
 	/**
-	 * Returns true if a read failed because the stream has been reached.
+	 * Returns true if a read failed because the stream end has been reached.
 	 * This flag is cleared by clearErr().
 	 * For a SeekableReadStream, it is also cleared by a successful seek.
 	 */

Modified: scummvm/branches/gsoc2010-plugins/common/unzip.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/common/unzip.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/common/unzip.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -1472,11 +1472,11 @@
 	unz_file_info fileInfo;
 	unzOpenCurrentFile(_zipFile);
 	unzGetCurrentFileInfo(_zipFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0);
-	byte *buffer = (byte *)calloc(fileInfo.uncompressed_size+1, 1);
+	byte *buffer = (byte *)malloc(fileInfo.uncompressed_size);
 	assert(buffer);
 	unzReadCurrentFile(_zipFile, buffer, fileInfo.uncompressed_size);
 	unzCloseCurrentFile(_zipFile);
-	return new Common::MemoryReadStream(buffer, fileInfo.uncompressed_size+1, DisposeAfterUse::YES);
+	return new Common::MemoryReadStream(buffer, fileInfo.uncompressed_size, DisposeAfterUse::YES);
 
 	// FIXME: instead of reading all into a memory stream, we could
 	// instead create a new ZipStream class. But then we have to be

Modified: scummvm/branches/gsoc2010-plugins/configure
===================================================================
--- scummvm/branches/gsoc2010-plugins/configure	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/configure	2010-08-11 00:54:34 UTC (rev 51963)
@@ -1628,6 +1628,10 @@
 			_ar="$_host-ar cru"
 			_ranlib=$_host-ranlib
 			;;
+		mips-sgi*)
+			_endian=big
+			_need_memalign=yes
+			;;
 		motoezx)
 			DEFINES="$DEFINES -DMOTOEZX"
 			ASFLAGS="$ASFLAGS -mfpu=vfp"
@@ -1992,23 +1996,6 @@
 POST_OBJS_FLAGS		:= -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a
 '
 		;;
-		ps2)
-_def_plugin='
-#define PLUGIN_PREFIX	""
-#define PLUGIN_SUFFIX	".plg"
-'
-_mak_plugins='
-DYNAMIC_MODULES		:= 1
-PLUGIN_PREFIX		:=
-PLUGIN_SUFFIX		:= .plg
-PLUGIN_EXTRA_DEPS	= $(EXECUTABLE)
-CXXFLAGS		+= -DDYNAMIC_MODULES
-LDFLAGS			+= -Wl,-T$(srcdir)/backends/platform/ps2/main_prog.ld
-PLUGIN_LDFLAGS		= -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/ps2/plugin.syms,-T$(srcdir)/backends/platform/ps2/plugin.ld -lstdc++ -lc -lm -Wl,-Map,mapfile.txt
-PRE_OBJS_FLAGS		:= -Wl,--whole-archive
-POST_OBJS_FLAGS		:= -Wl,--no-whole-archive
-'
-		;;
 	psp)
 _def_plugin='
 #define PLUGIN_PREFIX	""

Modified: scummvm/branches/gsoc2010-plugins/gui/about.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/gui/about.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/gui/about.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -82,31 +82,10 @@
 	: Dialog(10, 20, 300, 174),
 	_scrollPos(0), _scrollTime(0), _willClose(false) {
 
+	reflowLayout();
+
 	int i;
 
-	const int screenW = g_system->getOverlayWidth();
-	const int screenH = g_system->getOverlayHeight();
-
-	_xOff = g_gui.xmlEval()->getVar("Globals.About.XOffset", 5);
-	_yOff = g_gui.xmlEval()->getVar("Globals.About.YOffset", 5);
-	int outerBorder = g_gui.xmlEval()->getVar("Globals.About.OuterBorder");
-
-	_w = screenW - 2 * outerBorder;
-	_h = screenH - 2 * outerBorder;
-
-	_lineHeight = g_gui.getFontHeight() + 3;
-
-	// Heuristic to compute 'optimal' dialog width
-	int maxW = _w - 2*_xOff;
-	_w = 0;
-	for (i = 0; i < ARRAYSIZE(credits); i++) {
-		int tmp = g_gui.getStringWidth(credits[i] + 5);
-		if (_w < tmp && tmp <= maxW) {
-			_w = tmp;
-		}
-	}
-	_w += 2*_xOff;
-
 	for (i = 0; i < 1; i++)
 		_lines.push_back("");
 
@@ -155,10 +134,6 @@
 
 	for (i = 0; i < ARRAYSIZE(credits); i++)
 		addLine(credits[i]);
-
-	// Center the dialog
-	_x = (screenW - _w) / 2;
-	_y = (screenH - _h) / 2;
 }
 
 void AboutDialog::addLine(const char *str) {
@@ -298,6 +273,7 @@
 
 void AboutDialog::reflowLayout() {
 	Dialog::reflowLayout();
+	int i;
 	const int screenW = g_system->getOverlayWidth();
 	const int screenH = g_system->getOverlayHeight();
 
@@ -313,7 +289,7 @@
 	// Heuristic to compute 'optimal' dialog width
 	int maxW = _w - 2*_xOff;
 	_w = 0;
-	for (int i = 0; i < ARRAYSIZE(credits); i++) {
+	for (i = 0; i < ARRAYSIZE(credits); i++) {
 		int tmp = g_gui.getStringWidth(credits[i] + 5);
 		if (_w < tmp && tmp <= maxW) {
 			_w = tmp;
@@ -321,8 +297,7 @@
 	}
 	_w += 2*_xOff;
 
-	_lineHeight = g_gui.getFontHeight() + 3;
-
+	// Center the dialog
 	_x = (screenW - _w) / 2;
 	_y = (screenH - _h) / 2;
 }

Modified: scummvm/branches/gsoc2010-plugins/gui/editable.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/gui/editable.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/gui/editable.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -65,7 +65,7 @@
 	// TODO: We probably should filter the input string here,
 	// e.g. using tryInsertChar.
 	_editString = str;
-	_caretPos = _editString.size();
+	_caretPos = 0;
 }
 
 bool EditableWidget::tryInsertChar(byte c, int pos) {

Modified: scummvm/branches/gsoc2010-plugins/gui/options.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/gui/options.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/gui/options.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -770,7 +770,7 @@
 		_mt32DevicePopUp->setEnabled(false);
 	}
 
-	_enableMIDISettings = true;
+	_enableMT32Settings = true;
 }
 
 // The function has an extra slider range parameter, since both the launcher and SCUMM engine

Modified: scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout.stx
===================================================================
--- scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout.stx	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout.stx	2010-08-11 00:54:34 UTC (rev 51963)
@@ -635,6 +635,10 @@
 					width = '150'
 					height = 'Globals.Button.Height'
 			/>
+			<widget name = 'Help'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
 			<widget name = 'About'
 					width = '150'
 					height = 'Globals.Button.Height'
@@ -651,37 +655,8 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'ScummMain' overlays = 'screen_center'>
+	<dialog name = 'GlobalConfig' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<widget name = 'Resume'
-					type = 'Button'
-			/>
-			<space size = '15'/>
-			<widget name = 'Load'
-					type = 'Button'
-			/>
-			<widget name = 'Save'
-					type = 'Button'
-			/>
-			<space size = '15'/>
-			<widget name = 'Options'
-					type = 'Button'
-			/>
-			<widget name = 'Help'
-					type = 'Button'
-			/>
-			<widget name = 'About'
-					type = 'Button'
-			/>
-			<space size = '15'/>
-			<widget name = 'Quit'
-					type = 'Button'
-			/>
-		</layout>
-	</dialog>
-
-	<dialog name = 'ScummConfig' overlays = 'screen_center'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0'>
 				<layout type = 'vertical' padding = '0, 0, 0, 0' center = 'true'>
 					<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '8'>

Modified: scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout_lowres.stx
===================================================================
--- scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout_lowres.stx	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/gui/themes/scummclassic/classic_layout_lowres.stx	2010-08-11 00:54:34 UTC (rev 51963)
@@ -620,7 +620,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
-		<layout type = 'vertical' padding = '8, 8, 4, 6' center = 'true'>
+		<layout type = 'vertical' padding = '2, 2, 4, 6' center = 'true' spacing='6'>
 			<widget name = 'Title'
 					width = '160'
 					height = '4'
@@ -643,6 +643,10 @@
 					width = '120'
 					height = '12'
 			/>
+			<widget name = 'Help'
+					width = '120'
+					height = '12'
+			/>
 			<widget name = 'About'
 					width = '120'
 					height = '12'
@@ -663,44 +667,8 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'ScummMain' overlays = 'screen_center'>
+	<dialog name = 'GlobalConfig' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<widget name = 'Resume'
-					width = 'Globals.Button.Width'
-					height = '14'
-			/>
-			<space size = '2'/>
-			<widget name = 'Load'
-					width = 'Globals.Button.Width'
-					height = '14'
-			/>
-			<widget name = 'Save'
-					width = 'Globals.Button.Width'
-					height = '14'
-			/>
-			<space size = '2'/>
-			<widget name = 'Options'
-					width = 'Globals.Button.Width'
-					height = '14'
-			/>
-			<widget name = 'Help'
-					width = 'Globals.Button.Width'
-					height = '14'
-			/>
-			<widget name = 'About'
-					width = 'Globals.Button.Width'
-					height = '14'
-			/>
-			<space size = '2'/>
-			<widget name = 'Quit'
-					width = 'Globals.Button.Width'
-					height = '14'
-			/>
-		</layout>
-	</dialog>
-
-	<dialog name = 'ScummConfig' overlays = 'screen_center'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
 				<widget name = 'vcMusicText'
 						type = 'OptionsLabel'

Modified: scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout.stx
===================================================================
--- scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout.stx	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout.stx	2010-08-11 00:54:34 UTC (rev 51963)
@@ -650,6 +650,10 @@
 					width = '150'
 					height = 'Globals.Button.Height'
 			/>
+			<widget name = 'Help'
+					width = '150'
+					height = 'Globals.Button.Height'
+			/>
 			<widget name = 'About'
 					width = '150'
 					height = 'Globals.Button.Height'
@@ -666,36 +670,7 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'ScummMain' overlays = 'screen_center'>
-		<layout type = 'vertical' padding = '8, 8, 8, 8'>
-			<widget name = 'Resume'
-					type = 'Button'
-			/>
-			<space size = '15'/>
-			<widget name = 'Load'
-					type = 'Button'
-			/>
-			<widget name = 'Save'
-					type = 'Button'
-			/>
-			<space size = '15'/>
-			<widget name = 'Options'
-					type = 'Button'
-			/>
-			<widget name = 'Help'
-					type = 'Button'
-			/>
-			<widget name = 'About'
-					type = 'Button'
-			/>
-			<space size = '15'/>
-			<widget name = 'Quit'
-					type = 'Button'
-			/>
-		</layout>
-	</dialog>
-
-	<dialog name = 'ScummConfig' overlays = 'screen_center'>
+	<dialog name = 'GlobalConfig' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8' spacing = '8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0'>
 				<layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '8' center = 'true'>

Modified: scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout_lowres.stx
===================================================================
--- scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout_lowres.stx	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/gui/themes/scummmodern/scummmodern_layout_lowres.stx	2010-08-11 00:54:34 UTC (rev 51963)
@@ -618,7 +618,7 @@
 	</dialog>
 
 	<dialog name = 'GlobalMenu' overlays = 'screen_center'>
-		<layout type = 'vertical' padding = '4, 4, 4, 4' center = 'true'>
+		<layout type = 'vertical' padding = '4, 4, 4, 4' center = 'true' spacing='2'>
 			<widget name = 'Title'
 					width = '160'
 					height = 'Globals.Line.Height'
@@ -641,6 +641,10 @@
 					width = '120'
 					height = 'Globals.Button.Height'
 			/>
+			<widget name = 'Help'
+					width = '120'
+					height = 'Globals.Button.Height'
+			/>
 			<widget name = 'About'
 					width = '120'
 					height = 'Globals.Button.Height'
@@ -661,36 +665,7 @@
 		</layout>
 	</dialog>
 
-	<dialog name = 'ScummMain' overlays = 'screen_center'>
-		<layout type = 'vertical' padding = '4, 4, 4, 4'>
-			<widget name = 'Resume'
-					type = 'Button'
-			/>
-			<space size = '8'/>
-			<widget name = 'Load'
-					type = 'Button'
-			/>
-			<widget name = 'Save'
-					type = 'Button'
-			/>
-			<space size = '8'/>
-			<widget name = 'Options'
-					type = 'Button'
-			/>
-			<widget name = 'Help'
-					type = 'Button'
-			/>
-			<widget name = 'About'
-					type = 'Button'
-			/>
-			<space size = '8'/>
-			<widget name = 'Quit'
-					type = 'Button'
-			/>
-		</layout>
-	</dialog>
-
-	<dialog name = 'ScummConfig' overlays = 'screen_center'>
+	<dialog name = 'GlobalConfig' overlays = 'screen_center'>
 		<layout type = 'vertical' padding = '8, 8, 8, 8'>
 			<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
 				<widget name = 'vcMusicText'

Modified: scummvm/branches/gsoc2010-plugins/ports.mk
===================================================================
--- scummvm/branches/gsoc2010-plugins/ports.mk	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/ports.mk	2010-08-11 00:54:34 UTC (rev 51963)
@@ -44,7 +44,9 @@
 	cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/
 	cp $(DIST_FILES_DOCS) $(bundle_name)/
 	cp $(DIST_FILES_THEMES) $(bundle_name)/Contents/Resources/
+ifdef DIST_FILES_ENGINEDATA
 	cp $(DIST_FILES_ENGINEDATA) $(bundle_name)/Contents/Resources/
+endif
 	$(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
 	chmod 644 $(bundle_name)/Contents/Resources/*
 	cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
@@ -56,7 +58,9 @@
 	cp $(srcdir)/dists/iphone/Info.plist $(bundle_name)/
 	cp $(DIST_FILES_DOCS) $(bundle_name)/
 	cp $(DIST_FILES_THEMES) $(bundle_name)/
+ifdef DIST_FILES_ENGINEDATA
 	cp $(DIST_FILES_ENGINEDATA) $(bundle_name)/
+endif
 	$(STRIP) scummvm
 	ldid -S scummvm
 	chmod 755 scummvm
@@ -157,7 +161,9 @@
 	mkdir -p $(WIN32PATH)
 	$(STRIP) $(EXECUTABLE) -o $(WIN32PATH)/$(EXECUTABLE)
 	cp $(DIST_FILES_THEMES) $(WIN32PATH)
+ifdef DIST_FILES_ENGINEDATA
 	cp $(DIST_FILES_ENGINEDATA) $(WIN32PATH)
+endif
 	cp $(srcdir)/AUTHORS $(WIN32PATH)/AUTHORS.txt
 	cp $(srcdir)/COPYING $(WIN32PATH)/COPYING.txt
 	cp $(srcdir)/COPYING.LGPL $(WIN32PATH)/COPYING.LGPL.txt
@@ -178,7 +184,9 @@
 	$(STRIP) $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)
 	cp icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE).info
 	cp $(DIST_FILES_THEMES) $(AOS4PATH)/themes/
+ifdef DIST_FILES_ENGINEDATA
 	cp $(DIST_FILES_ENGINEDATA) $(AOS4PATH)/extras/
+endif
 	cp $(srcdir)/AUTHORS $(AOS4PATH)/AUTHORS.txt
 	cp $(srcdir)/COPYING $(AOS4PATH)/COPYING.txt
 	cp $(srcdir)/COPYING.LGPL $(AOS4PATH)/COPYING.LGPL.txt

Modified: scummvm/branches/gsoc2010-plugins/sound/decoders/adpcm.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/sound/decoders/adpcm.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/sound/decoders/adpcm.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -724,6 +724,10 @@
 }
 
 RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
+	// If size is 0, report the entire size of the stream
+	if (!size)
+		size = stream->size();
+
 	switch (type) {
 	case kADPCMOki:
 		return new Oki_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign);

Modified: scummvm/branches/gsoc2010-plugins/sound/mods/rjp1.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/sound/mods/rjp1.cpp	2010-08-10 23:57:25 UTC (rev 51962)
+++ scummvm/branches/gsoc2010-plugins/sound/mods/rjp1.cpp	2010-08-11 00:54:34 UTC (rev 51963)
@@ -422,7 +422,7 @@
 		channel->envelopeMode = 4;
 		channel->data = channel->waveData;
 		channel->pos = READ_BE_UINT16(note + 16);
-		channel->len = READ_BE_UINT16(note + 18);
+		channel->len = channel->pos + READ_BE_UINT16(note + 18);
 		channel->setupNewNote = true;
 	}
 }


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