diff options
Diffstat (limited to 'backends')
73 files changed, 535 insertions, 272 deletions
diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h index a4aeb41e74..92b7598cb5 100644 --- a/backends/audiocd/audiocd.h +++ b/backends/audiocd/audiocd.h @@ -108,7 +108,7 @@ public: //@{ /** - * Initialise the specified CD drive for audio playback. + * Initialize the specified CD drive for audio playback. * @param drive the drive id * @return true if the CD drive was inited succesfully */ diff --git a/backends/base-backend.cpp b/backends/base-backend.cpp index 68ec5efe62..40e702495a 100644 --- a/backends/base-backend.cpp +++ b/backends/base-backend.cpp @@ -18,6 +18,9 @@ * 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$ + * */ #include "backends/base-backend.h" @@ -57,15 +60,11 @@ void BaseBackend::fillScreen(uint32 col) { */ -#if defined(UNIX) -#if defined(SAMSUNGTV) -#define DEFAULT_CONFIG_FILE "/dtv/usb/sda1/.scummvmrc" -#else +#if defined(POSIX) #define DEFAULT_CONFIG_FILE ".scummvmrc" #endif -#endif -#if !defined(UNIX) +#if !defined(POSIX) #define DEFAULT_CONFIG_FILE "scummvm.ini" #endif diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp index cadb10a954..835d98e718 100644 --- a/backends/events/sdl/sdl-events.cpp +++ b/backends/events/sdl/sdl-events.cpp @@ -279,7 +279,7 @@ bool SdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) { event.type = Common::EVENT_QUIT; return true; } -#elif defined(UNIX) +#elif defined(POSIX) // On other *nix systems, Control-Q quits if ((ev.key.keysym.mod & KMOD_CTRL) && ev.key.keysym.sym == 'q') { event.type = Common::EVENT_QUIT; @@ -323,7 +323,7 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) { if (ev.key.keysym.sym == 'm' || // Ctrl-m toggles mouse capture #if defined(MACOSX) // Meta - Q, handled below -#elif defined(UNIX) +#elif defined(POSIX) ev.key.keysym.sym == 'q' || // On other *nix systems, Control-Q quits #else ev.key.keysym.sym == 'z' || // Ctrl-z quit @@ -336,7 +336,7 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) { #if defined(MACOSX) if ((mod & KMOD_META) && ev.key.keysym.sym == 'q') return false; // On Macintosh, Cmd-Q quits -#elif defined(UNIX) +#elif defined(POSIX) // Control Q has already been handled above #else if ((mod & KMOD_ALT) && ev.key.keysym.sym == 'x') diff --git a/backends/fs/posix/posix-fs-factory.cpp b/backends/fs/posix/posix-fs-factory.cpp index c94e90ccde..ccff8a8b42 100644 --- a/backends/fs/posix/posix-fs-factory.cpp +++ b/backends/fs/posix/posix-fs-factory.cpp @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if defined(UNIX) +#if defined(POSIX) // Re-enable some forbidden symbols to avoid clashes with stat.h and unistd.h. // Also with clock() in sys/time.h in some Mac OS X SDKs. diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp index 4d69a51a03..08a7601c17 100644 --- a/backends/fs/posix/posix-fs.cpp +++ b/backends/fs/posix/posix-fs.cpp @@ -19,13 +19,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if defined(UNIX) +#if defined(POSIX) // Re-enable some forbidden symbols to avoid clashes with stat.h and unistd.h. // Also with clock() in sys/time.h in some Mac OS X SDKs. #define FORBIDDEN_SYMBOL_EXCEPTION_time_h #define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h #define FORBIDDEN_SYMBOL_EXCEPTION_mkdir +#define FORBIDDEN_SYMBOL_EXCEPTION_getenv #include "backends/fs/posix/posix-fs.h" #include "backends/fs/stdiostream.h" @@ -248,4 +249,4 @@ Common::WriteStream *POSIXFilesystemNode::createWriteStream() { return StdioStream::makeFromPath(getPath(), true); } -#endif //#if defined(UNIX) +#endif //#if defined(POSIX) diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h index 63d5e3a733..f0cd7aed56 100644 --- a/backends/graphics/opengl/gltexture.h +++ b/backends/graphics/opengl/gltexture.h @@ -20,6 +20,8 @@ * */ +#include "common/scummsys.h" + #ifdef WIN32 #if defined(ARRAYSIZE) && !defined(_WINDOWS_) #undef ARRAYSIZE diff --git a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp new file mode 100644 index 0000000000..18629d949a --- /dev/null +++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp @@ -0,0 +1,60 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/scummsys.h" + +#if defined(SAMSUNGTV) + +#include "backends/platform/samsungtv/samsungtv.h" +#include "backends/events/samsungtvsdl/samsungtvsdl-events.h" +#include "backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h" + +SamsungTVSdlGraphicsManager::SamsungTVSdlGraphicsManager(SdlEventSource *sdlEventSource) + : SdlGraphicsManager(sdlEventSource) { +} + +bool SamsungTVSdlGraphicsManager::hasFeature(OSystem::Feature f) { + return + (f == OSystem::kFeatureAspectRatioCorrection) || + (f == OSystem::kFeatureCursorHasPalette); +} + +void SamsungTVSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) { + switch (f) { + case OSystem::kFeatureAspectRatioCorrection: + SdlGraphicsManager::setFeatureState(f, enable); + break; + default: + break; + } +} + +bool SamsungTVSdlGraphicsManager::getFeatureState(OSystem::Feature f) { + switch (f) { + case OSystem::kFeatureAspectRatioCorrection: + return SdlGraphicsManager::getFeatureState(f); + default: + return false; + } +} + +#endif diff --git a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h new file mode 100644 index 0000000000..dc65c3a696 --- /dev/null +++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h @@ -0,0 +1,41 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef BACKENDS_GRAPHICS_SAMSUNGTV_H +#define BACKENDS_GRAPHICS_SAMSUNGTV_H + +#if defined(SAMSUNGTV) + +#include "backends/graphics/sdl/sdl-graphics.h" + +class SamsungTVSdlGraphicsManager : public SdlGraphicsManager { +public: + SamsungTVSdlGraphicsManager(SdlEventSource *sdlEventSource); + + bool hasFeature(OSystem::Feature f); + void setFeatureState(OSystem::Feature f, bool enable); + bool getFeatureState(OSystem::Feature f); +}; + +#endif + +#endif diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 28e44b445a..c006b6b6bf 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -164,7 +164,7 @@ int MidiDriver_ALSA::open() { } printf("Connected to Alsa sequencer client [%d:%d]\n", seq_client, seq_port); - printf("ALSA client initialised [%d:0]\n", my_client); + printf("ALSA client initialized [%d:0]\n", my_client); return 0; } @@ -382,7 +382,7 @@ MusicDevices AlsaMusicPlugin::getDevices() const { AlsaDevices alsaDevices = getAlsaDevices(); - // Since the default behaviour is to use the first device in the list, + // Since the default behavior is to use the first device in the list, // try to put something sensible there. We used to have 17:0 and 65:0 // as defaults. diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp index 61e7f051e5..16e7f22db5 100644 --- a/backends/mixer/sdl/sdl-mixer.cpp +++ b/backends/mixer/sdl/sdl-mixer.cpp @@ -20,6 +20,8 @@ * */ +#include "common/scummsys.h" + #if defined(SDL_BACKEND) #include "backends/mixer/sdl/sdl-mixer.h" diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp index fe3991af65..c5f147ffe1 100644 --- a/backends/modular-backend.cpp +++ b/backends/modular-backend.cpp @@ -20,6 +20,8 @@ * */ +#define FORBIDDEN_SYMBOL_EXCEPTION_exit + #include "backends/modular-backend.h" #include "backends/fs/fs-factory.h" @@ -277,3 +279,7 @@ FilesystemFactory *ModularBackend::getFilesystemFactory() { assert(_fsFactory); return _fsFactory; } + +void ModularBackend::quit() { + exit(0); +} diff --git a/backends/modular-backend.h b/backends/modular-backend.h index 43148b6e4a..e46fbfdd21 100644 --- a/backends/modular-backend.h +++ b/backends/modular-backend.h @@ -148,8 +148,7 @@ public: virtual Common::SaveFileManager *getSavefileManager(); virtual FilesystemFactory *getFilesystemFactory(); - virtual void quit() { exit(0); } - virtual void setWindowCaption(const char *caption) {} + virtual void quit(); virtual void displayMessageOnOSD(const char *msg); //@} diff --git a/backends/module.mk b/backends/module.mk index 15af3ab763..27058bef88 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -7,20 +7,19 @@ MODULE_OBJS := \ events/default/default-events.o \ fs/abstract-fs.o \ fs/stdiostream.o \ - graphics/opengl/glerrorcheck.o \ - graphics/opengl/gltexture.o \ - graphics/opengl/opengl-graphics.o \ - graphics/openglsdl/openglsdl-graphics.o \ - keymapper/action.o \ - keymapper/keymap.o \ - keymapper/keymapper.o \ - keymapper/remap-dialog.o \ log/log.o \ midi/alsa.o \ midi/dmedia.o \ midi/seq.o \ midi/stmidi.o \ midi/timidity.o \ + saves/savefile.o \ + saves/default/default-saves.o \ + timer/default/default-timer.o + + +ifdef USE_ELF_LOADER +MODULE_OBJS += \ plugins/elf/arm-loader.o \ plugins/elf/elf-loader.o \ plugins/elf/elf-provider.o \ @@ -28,23 +27,38 @@ MODULE_OBJS := \ plugins/elf/mips-loader.o \ plugins/elf/ppc-loader.o \ plugins/elf/shorts-segment-manager.o \ - plugins/elf/version.o \ - saves/savefile.o \ - saves/default/default-saves.o \ - timer/default/default-timer.o \ + plugins/elf/version.o +endif + +ifdef ENABLE_KEYMAPPER +MODULE_OBJS += \ + keymapper/action.o \ + keymapper/keymap.o \ + keymapper/keymapper.o \ + keymapper/remap-dialog.o +endif + +ifdef USE_OPENGL +MODULE_OBJS += \ + graphics/opengl/glerrorcheck.o \ + graphics/opengl/gltexture.o \ + graphics/opengl/opengl-graphics.o \ + graphics/openglsdl/openglsdl-graphics.o +endif + +ifdef ENABLE_VKEYBD +MODULE_OBJS += \ vkeybd/image-map.o \ vkeybd/polygon.o \ vkeybd/virtual-keyboard.o \ vkeybd/virtual-keyboard-gui.o \ vkeybd/virtual-keyboard-parser.o +endif # SDL specific source files. # We cannot just check $BACKEND = sdl, as various other backends # derive from the SDL backend, and they all need the following files. -# TODO: Add SDL_BACKEND to config.mk; this would match the fact that -# we also add -DSDL_BACKEND to the DEFINES. -# However, the latter is only done for *most* SDL based stuff, not always -# so we really should unify the relevant code in configure. +ifdef SDL_BACKEND MODULE_OBJS += \ audiocd/sdl/sdl-audiocd.o \ events/sdl/sdl-events.o \ @@ -54,8 +68,9 @@ MODULE_OBJS += \ mutex/sdl/sdl-mutex.o \ plugins/sdl/sdl-provider.o \ timer/sdl/sdl-timer.o +endif -ifdef UNIX +ifdef POSIX MODULE_OBJS += \ fs/posix/posix-fs.o \ fs/posix/posix-fs-factory.o \ @@ -147,9 +162,10 @@ MODULE_OBJS += \ timer/psp/timer.o endif -ifeq ($(BACKEND),samsungstv) +ifeq ($(BACKEND),samsungtv) MODULE_OBJS += \ - events/samsungtvsdl/samsungtvsdl-events.o + events/samsungtvsdl/samsungtvsdl-events.o \ + graphics/samsungtvsdl/samsungtvsdl-graphics.o endif ifeq ($(BACKEND),webos) diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 62226eb8b1..89e918a34e 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -179,7 +179,7 @@ void OSystem_Android::initSurface() { JNI::initSurface(); - // Initialise OpenGLES context. + // Initialize OpenGLES context. GLESTexture::initGLExtensions(); if (_game_texture) diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java index c4de6d62f8..ef9f4cc1e0 100644 --- a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java +++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java @@ -260,7 +260,7 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable { if (_audio_track.getState() != AudioTrack.STATE_INITIALIZED) throw new Exception( - String.format("Error initialising AudioTrack: %d", + String.format("Error initializing AudioTrack: %d", _audio_track.getState())); } diff --git a/backends/platform/dc/Makefile b/backends/platform/dc/Makefile index 0133ffd9e9..6da32a9049 100644 --- a/backends/platform/dc/Makefile +++ b/backends/platform/dc/Makefile @@ -11,9 +11,13 @@ CXX = sh-elf-g++ -ml -m4-single-only LD = $(CXX) CXXFLAGS= -O3 -Wno-multichar -funroll-loops -fschedule-insns2 -fomit-frame-pointer -fdelete-null-pointer-checks -fno-exceptions DEFINES = -D__DC__ -DNONSTANDARD_PORT -DUSE_MAD -DUSE_ZLIB -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DUSE_RGB_COLOR +# For release builds: +#DEFINES += -DNOSERIAL LDFLAGS = -Wl,-Ttext,0x8c010000 -nostartfiles $(ronindir)/lib/crt0.o INCLUDES= -I./ -I$(srcdir) -I$(ronindir)/include/ -I$(srcdir)/engines LIBS = -L$(ronindir)/lib -lmad -lronin -lz -lm +# For release builds: +#LIBS = -L$(ronindir)/lib -lmad -lronin-noserial -lz -lm EXECUTABLE = scummvm.elf DEPDIR = .deps CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 81f93a077e..e31b817d7c 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -53,7 +53,7 @@ class DCHardware { }; class DCCDManager : public DefaultAudioCDManager { - // Initialise the specified CD drive for audio playback. + // Initialize the specified CD drive for audio playback. bool openCD(int drive); // Poll cdrom status diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp index 17bc317407..7054ad196e 100644 --- a/backends/platform/dc/input.cpp +++ b/backends/platform/dc/input.cpp @@ -20,6 +20,8 @@ * */ +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #define RONIN_TIMER_ACCESS #include <common/scummsys.h> diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp index 5c349923fc..859f2a40ed 100644 --- a/backends/platform/dc/selector.cpp +++ b/backends/platform/dc/selector.cpp @@ -20,7 +20,7 @@ * */ -#define FORBIDDEN_SYMBOL_EXCEPTION_chdir +#define FORBIDDEN_SYMBOL_ALLOW_ALL #include <common/scummsys.h> #include <engines/engine.h> diff --git a/backends/platform/dingux/module.mk b/backends/platform/dingux/module.mk index 2247625a04..b924fec1cf 100644 --- a/backends/platform/dingux/module.mk +++ b/backends/platform/dingux/module.mk @@ -4,8 +4,10 @@ MODULE_OBJS := \ main.o \ dingux.o -MODULE_DIRS += \ - backends/platform/dingux/ +# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS. +MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) +OBJS := $(MODULE_OBJS) $(OBJS) +MODULE_DIRS += $(sort $(dir $(MODULE_OBJS))) -# We don't use the rules.mk here on purpose -OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS) +# Hack to ensure the SDL backend is built so we can use OSystem_SDL. +-include $(srcdir)/backends/platform/sdl/module.mk diff --git a/backends/platform/ds/arm9/dist/readme_ds.txt b/backends/platform/ds/arm9/dist/readme_ds.txt index ee1db719f4..24c85ad556 100644 --- a/backends/platform/ds/arm9/dist/readme_ds.txt +++ b/backends/platform/ds/arm9/dist/readme_ds.txt @@ -679,7 +679,7 @@ not supported. Cdex can do the conversion very well and I recommend using it to convert your audio files, although any CD ripping software can be used, so feel -free to use your favourite program. The format you need to use is +free to use your favorite program. The format you need to use is IMA-ADPCM 4-bit Mono. You may use any sample rate. All other formats will be rejected, including uncompressed WAV files. diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index 781738265c..1b21b41a9b 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -75,7 +75,7 @@ else ifdef DS_BUILD_K else - # USE_MAD = 1 + USE_MAD = 1 endif endif endif @@ -245,7 +245,9 @@ ifdef USE_MAD DEFINES += -DUSE_MAD endif -DEFINES += -DREDUCE_MEMORY_USAGE -DDISABLE_DEBUGGER -DUSE_TEXT_CONSOLE -DDISABLE_MASS_ADD -DDISABLE_NES_APU +DEFINES += -DREDUCE_MEMORY_USAGE -DDISABLE_DEBUGGER -DUSE_TEXT_CONSOLE_FOR_DEBUGGER -DDISABLE_MASS_ADD -DDISABLE_NES_APU +# for release builds: +#DEFINES += -DNDEBUG LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections @@ -259,7 +261,7 @@ BACKEND := ds INCLUDES= -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/engines \ -I$(portdir)/data -I$(portdir)/../commoninclude \ -I$(portdir)/source -I$(portdir)/source/mad \ - -I$(libndsdir)/include -include $(srcdir)/common/scummsys.h + -I$(libndsdir)/include -include $(portdir)/source/portdefs.h LIBS = -lm -L$(libndsdir)/lib -L$(portdir)/lib -lnds9 diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 3fa4a0283a..dfd906d816 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -68,8 +68,7 @@ // - Try discworld? -// Disable symbol overrides for FILE -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE +#define FORBIDDEN_SYMBOL_ALLOW_ALL @@ -576,7 +575,7 @@ void initGame() { for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) { if (!stricmp(gameName, gameList[r].gameId)) { s_currentGame = &gameList[r]; - // consolePrintf("Game list num: %d\n", s_currentGame); + // consolePrintf("Game list num: %d\n", r); } } } @@ -1669,8 +1668,7 @@ void addEventsToQueue() { if (!keyboardEnable) { - - if ((isScrollingWithDPad() || (indyFightState)) && (displayModeIs8Bit)) { + if ((!isScrollingWithDPad() || (indyFightState)) && (displayModeIs8Bit)) { // Controls specific to the control method if (s_currentGame->control == CONT_SKY) { diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c index 698590418c..76508a1664 100644 --- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c +++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c @@ -1010,7 +1010,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) dir.name[0] = FILE_FREE; // default to no file found dir.attrib = 0x00; - // Check if fat has been initialised + // Check if fat has been initialized if (filesysBytePerSec == 0) { return (dir); diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h index 580eb680eb..f512ce3ea2 100644 --- a/backends/platform/ds/arm9/source/portdefs.h +++ b/backends/platform/ds/arm9/source/portdefs.h @@ -26,8 +26,11 @@ // Include ndstypes.h for uint16 etc. typedefs #include "nds/ndstypes.h" -// Somebody removed these from scummsys.h, but they're still required, so I'm -// adding them here in the hope that they'll stay. +// Define SCUMMVM_DONT_DEFINE_TYPES to prevent scummsys.h from trying to +// re-define those data types. +#define SCUMMVM_DONT_DEFINE_TYPES + +// Include required headers #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp index 392a186e79..49552a86b2 100644 --- a/backends/platform/ds/arm9/source/zipreader.cpp +++ b/backends/platform/ds/arm9/source/zipreader.cpp @@ -20,6 +20,7 @@ * */ +#define FORBIDDEN_SYMBOL_ALLOW_ALL #include "common/scummsys.h" #include "zipreader.h" diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp index 4cdb4cd0d5..0e28a6b738 100644 --- a/backends/platform/gp2x/gp2x.cpp +++ b/backends/platform/gp2x/gp2x.cpp @@ -125,7 +125,7 @@ void OSystem_GP2X::initBackend() { ConfMan.setBool("FM_low_quality", true); - /* Initialise any GP2X specific stuff we may want (Batt Status, scaler etc.) */ + /* Initialize any GP2X specific stuff we may want (Batt Status, scaler etc.) */ GP2X_HW::deviceInit(); /* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */ diff --git a/backends/platform/gp2x/module.mk b/backends/platform/gp2x/module.mk index 837ad99d7b..4846f162cb 100644 --- a/backends/platform/gp2x/module.mk +++ b/backends/platform/gp2x/module.mk @@ -10,3 +10,6 @@ MODULE_OBJS := \ MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) OBJS := $(MODULE_OBJS) $(OBJS) MODULE_DIRS += $(sort $(dir $(MODULE_OBJS))) + +# Hack to ensure the SDL backend is built so we can use OSystem_SDL. +-include $(srcdir)/backends/platform/sdl/module.mk diff --git a/backends/platform/gph/build/caanoo-config-alleng.sh b/backends/platform/gph/build/caanoo-config-alleng.sh index 97fed942fa..b7836508ed 100644 --- a/backends/platform/gph/build/caanoo-config-alleng.sh +++ b/backends/platform/gph/build/caanoo-config-alleng.sh @@ -8,10 +8,10 @@ echo and let all the build work be done from the backend/build folder. # Edit the configure line to suit. cd ../../../.. -./configure --backend=caanoo --disable-mt32emu --host=caanoo --disable-alsa --disable-flac \ +./configure --backend=caanoo --disable-mt32emu --host=caanoo \ + --disable-alsa --disable-flac \ --disable-nasm --disable-vorbis --disable-hq-scalers \ --with-sdl-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr/bin \ - --with-mpeg2-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ --enable-tremor --with-tremor-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ --enable-zlib --with-zlib-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ --enable-mad --with-mad-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ diff --git a/backends/platform/gph/build/caanoo-config.sh b/backends/platform/gph/build/caanoo-config.sh index 11d597481a..fe191647e6 100644 --- a/backends/platform/gph/build/caanoo-config.sh +++ b/backends/platform/gph/build/caanoo-config.sh @@ -8,10 +8,10 @@ echo and let all the build work be done from the backend/build folder. # Edit the configure line to suit. cd ../../../.. -./configure --backend=caanoo --disable-mt32emu --host=caanoo --disable-alsa --disable-flac \ +./configure --backend=caanoo --disable-mt32emu --host=caanoo \ + --disable-alsa --disable-flac \ --disable-nasm --disable-vorbis --disable-hq-scalers \ --with-sdl-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr/bin \ - --with-mpeg2-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ --enable-tremor --with-tremor-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ --enable-zlib --with-zlib-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ --enable-mad --with-mad-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr \ diff --git a/backends/platform/gph/build/gp2x-config-alleng.sh b/backends/platform/gph/build/gp2x-config-alleng.sh index 4a3526d50c..83a4fe2046 100644 --- a/backends/platform/gph/build/gp2x-config-alleng.sh +++ b/backends/platform/gph/build/gp2x-config-alleng.sh @@ -17,7 +17,13 @@ export DEFINES=-DNDEBUG # Edit the configure line to suit. cd ../../../.. -./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-all-engines --enable-vkeybd +./configure --backend=gp2x --disable-mt32emu --host=gp2x \ + --disable-flac --disable-nasm --disable-hq-scalers \ + --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin \ + --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ + --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ + --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ + --enable-all-engines --enable-vkeybd #--enable-plugins --default-dynamic echo Generating config for GP2X complete. Check for errors. diff --git a/backends/platform/gph/build/gp2x-config.sh b/backends/platform/gph/build/gp2x-config.sh index 9092b0b1ea..f474c4d0d4 100644 --- a/backends/platform/gph/build/gp2x-config.sh +++ b/backends/platform/gph/build/gp2x-config.sh @@ -17,7 +17,13 @@ export DEFINES=-DNDEBUG # Edit the configure line to suit. cd ../../../.. -./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd --enable-plugins --default-dynamic +./configure --backend=gp2x --disable-mt32emu --host=gp2x \ + --disable-flac --disable-nasm --disable-hq-scalers \ + --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin \ + --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ + --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ + --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ + --enable-vkeybd --enable-plugins --default-dynamic # --disable-release --enable-debug # --enable-plugins --default-dynamic diff --git a/backends/platform/gph/build/gp2xwiz-config-alleng.sh b/backends/platform/gph/build/gp2xwiz-config-alleng.sh index 9ec8a09cd2..ff905d0585 100644 --- a/backends/platform/gph/build/gp2xwiz-config-alleng.sh +++ b/backends/platform/gph/build/gp2xwiz-config-alleng.sh @@ -16,8 +16,9 @@ export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib # Edit the configure line to suit. cd ../../../.. -./configure --backend=gph --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers \ - --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ +./configure --backend=gph --disable-mt32emu --host=gp2xwiz \ + --disable-flac --disable-nasm --disable-hq-scalers \ + --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin \ --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ diff --git a/backends/platform/gph/build/gp2xwiz-config.sh b/backends/platform/gph/build/gp2xwiz-config.sh index ac7c34ad12..7be103602b 100644 --- a/backends/platform/gph/build/gp2xwiz-config.sh +++ b/backends/platform/gph/build/gp2xwiz-config.sh @@ -16,8 +16,9 @@ export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib # Edit the configure line to suit. cd ../../../.. -./configure --backend=gph --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers \ - --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ +./configure --backend=gph --disable-mt32emu --host=gp2xwiz \ + --disable-flac --disable-nasm --disable-hq-scalers \ + --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin \ --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 \ diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp index 375ee37378..cb52da441d 100644 --- a/backends/platform/gph/gph-backend.cpp +++ b/backends/platform/gph/gph-backend.cpp @@ -141,7 +141,7 @@ void OSystem_GPH::initBackend() { printf("%s\n", "Debug: STDOUT and STDERR redirected to text files."); #endif /* DUMP_STDOUT */ - /* Initialise any GP2X Wiz specific stuff we may want (Batt Status, scaler etc.) */ + /* Initialize any GP2X Wiz specific stuff we may want (Batt Status, scaler etc.) */ WIZ_HW::deviceInit(); /* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */ diff --git a/backends/platform/gph/module.mk b/backends/platform/gph/module.mk index a9951494d1..d8a1a6cd8d 100644 --- a/backends/platform/gph/module.mk +++ b/backends/platform/gph/module.mk @@ -11,4 +11,4 @@ OBJS := $(MODULE_OBJS) $(OBJS) MODULE_DIRS += $(sort $(dir $(MODULE_OBJS))) # Hack to ensure the SDL backend is built so we can use OSystem_SDL. --include $(srcdir)/backends/platform/sdl/module.mk
\ No newline at end of file +-include $(srcdir)/backends/platform/sdl/module.mk diff --git a/backends/platform/linuxmoto/module.mk b/backends/platform/linuxmoto/module.mk index c604d69da1..4c81aac3f2 100644 --- a/backends/platform/linuxmoto/module.mk +++ b/backends/platform/linuxmoto/module.mk @@ -10,5 +10,5 @@ MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) OBJS := $(MODULE_OBJS) $(OBJS) MODULE_DIRS += $(sort $(dir $(MODULE_OBJS))) -# HACK: The linuxmoto backend is based on the SDL one, so we load that, too. -include $(srcdir)/backends/platform/sdl/module.mk +# Hack to ensure the SDL backend is built so we can use OSystem_SDL. +-include $(srcdir)/backends/platform/sdl/module.mk diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index fb3b1dbd93..094bb839d3 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -20,6 +20,8 @@ * */ +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include <romfs.h> #include <malloc.h> // Required for memalign diff --git a/backends/platform/n64/portdefs.h b/backends/platform/n64/portdefs.h index e62551355d..35ef3c71db 100644 --- a/backends/platform/n64/portdefs.h +++ b/backends/platform/n64/portdefs.h @@ -35,5 +35,18 @@ #undef assert #define assert(x) ((x) ? 0 : (print_error("ASSERT TRIGGERED:\n\n("#x")\n%s\nline: %d", __FILE__, __LINE__))) +// Typedef basic data types in a way that is compatible with the N64 SDK. +typedef unsigned char byte; +typedef unsigned char uint8; +typedef signed char int8; +typedef unsigned short int uint16; +typedef signed short int int16; +typedef unsigned int uint32; +typedef signed int int32; + +// Define SCUMMVM_DONT_DEFINE_TYPES to prevent scummsys.h from trying to +// re-define those data types. +#define SCUMMVM_DONT_DEFINE_TYPES + #endif diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp index 7dd127fefa..b9e901bb5a 100644 --- a/backends/platform/null/null.cpp +++ b/backends/platform/null/null.cpp @@ -34,7 +34,7 @@ */ #if defined(__amigaos4__) #include "backends/fs/amigaos4/amigaos4-fs-factory.h" -#elif defined(UNIX) +#elif defined(POSIX) #include "backends/fs/posix/posix-fs-factory.h" #elif defined(WIN32) #include "backends/fs/windows/windows-fs-factory.h" @@ -60,7 +60,7 @@ public: OSystem_NULL::OSystem_NULL() { #if defined(__amigaos4__) _fsFactory = new AmigaOSFilesystemFactory(); - #elif defined(UNIX) + #elif defined(POSIX) _fsFactory = new POSIXFilesystemFactory(); #elif defined(WIN32) _fsFactory = new WindowsFilesystemFactory(); diff --git a/backends/platform/openpandora/build/config-alleng.sh b/backends/platform/openpandora/build/config-alleng.sh index f3fa1a0f94..4028f5f4de 100755 --- a/backends/platform/openpandora/build/config-alleng.sh +++ b/backends/platform/openpandora/build/config-alleng.sh @@ -19,7 +19,6 @@ export DEFINES=-DNDEBUG cd ../../../.. ./configure --backend=openpandora --host=openpandora --disable-nasm \ --with-sdl-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/bin \ - --with-mpeg2-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ --disable-vorbis --enable-tremor --with-tremor-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ --enable-zlib --with-zlib-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ --enable-mad --with-mad-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ diff --git a/backends/platform/openpandora/build/config.sh b/backends/platform/openpandora/build/config.sh index 9bc52a9bc4..92476c5525 100755 --- a/backends/platform/openpandora/build/config.sh +++ b/backends/platform/openpandora/build/config.sh @@ -19,7 +19,6 @@ export DEFINES=-DNDEBUG cd ../../../.. ./configure --backend=openpandora --host=openpandora --disable-nasm \ --with-sdl-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/bin \ - --with-mpeg2-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ --disable-vorbis --enable-tremor --with-tremor-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ --enable-zlib --with-zlib-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ --enable-mad --with-mad-prefix=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr \ diff --git a/backends/platform/openpandora/module.mk b/backends/platform/openpandora/module.mk index 8e60b87aa6..5bd568e1c4 100755 --- a/backends/platform/openpandora/module.mk +++ b/backends/platform/openpandora/module.mk @@ -5,11 +5,10 @@ MODULE_OBJS := \ op-backend.o \ op-main.o -MODULE_DIRS += \ - backends/platform/openpandora/ - -# We don't use the rules.mk here on purpose -OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS) +# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS. +MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) +OBJS := $(MODULE_OBJS) $(OBJS) +MODULE_DIRS += $(sort $(dir $(MODULE_OBJS))) # Hack to ensure the SDL backend is built so we can use OSystem_SDL. -include $(srcdir)/backends/platform/sdl/module.mk diff --git a/backends/platform/ps2/Makefile.gdb b/backends/platform/ps2/Makefile.gdb index 48dcebc1d4..1e2510d3f4 100644 --- a/backends/platform/ps2/Makefile.gdb +++ b/backends/platform/ps2/Makefile.gdb @@ -1,7 +1,7 @@ # $Header: Exp $ include $(PS2SDK)/Defs.make -PS2_EXTRA = /media/disk/nw8240/extras/scummvm/ports +PS2_EXTRA = /works/devel/ps2/sdk-extra PS2_EXTRA_INCS = /zlib/include /libmad/ee/include /SjPcm/ee/src /tremor PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /tremor/tremor @@ -9,31 +9,44 @@ ENABLED=STATIC_PLUGIN ENABLE_SCUMM = $(ENABLED) ENABLE_SCUMM_7_8 = $(ENABLED) -#ENABLE_HE = $(ENABLED) -#ENABLE_AGI = $(ENABLED) -#ENABLE_AGOS = $(ENABLED) -#ENABLE_CINE = $(ENABLED) -#ENABLE_CRUISE = $(ENABLED) -#ENABLE_DRASCULA = $(ENABLED) -#ENABLE_GOB = $(ENABLED) -#ENABLE_KYRA = $(ENABLED) -#ENABLE_LURE = $(ENABLED) - # ENABLE_M4 = $(ENABLED) -#ENABLE_MADE = $(ENABLED) -#ENABLE_PARALLACTION = $(ENABLED) -#ENABLE_QUEEN = $(ENABLED) -#ENABLE_SAGA = $(ENABLED) -#ENABLE_SAGA2 = $(ENABLED) -#ENABLE_IHNM = $(ENABLED) -#ENABLE_SKY = $(ENABLED) -#ENABLE_SWORD1 = $(ENABLED) -#ENABLE_SWORD2 = $(ENABLED) - # ENABLE_TINSEL = $(ENABLED) -#ENABLE_TOUCHE = $(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_HUGO = $(ENABLED) +# ENABLE_IHNM = $(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_SAGA2 = $(ENABLED) +# ENABLE_SCI = $(ENABLED) +## ENABLE_SCI32 = $(ENABLED) +# ENABLE_SKY = $(ENABLED) +# ENABLE_SWORD1 = $(ENABLED) +# ENABLE_SWORD2 = $(ENABLED) +# ENABLE_TEENAGENT = $(ENABLED) +# ENABLE_TINSEL = $(ENABLED) +# ENABLE_TOON = $(ENABLED) +# ENABLE_TOUCHE = $(ENABLED) +# ENABLE_TUCKER = $(ENABLED) + HAVE_GCC3 = true -CC = ee-gcc +CC = ee-gcc CXX = ee-g++ AS = ee-gcc LD = ee-gcc @@ -48,35 +61,36 @@ VPATH = $(srcdir) INCDIR = ../../../ # DEPDIR = .deps -DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -D__PS2_DEBUG__ -g -Wall -Wno-multichar - +DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -DDISABLE_SAVEGAME_SORTING -D_EE -D__PLAYSTATION2__ -D__PS2_DEBUG__ -g -Wall -Wno-multichar -fno-rtti -fno-exceptions # -DNO_ADAPTOR +# for release builds: +#DEFINES += -DRELEASE_BUILD INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) INCLUDES += -I $(PS2GDB)/ee -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines +CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP + TARGET = elf/scummvm.elf -OBJS := backends/platform/ps2/DmaPipe.o \ - backends/platform/ps2/Gs2dScreen.o \ - backends/platform/ps2/irxboot.o \ - backends/platform/ps2/ps2input.o \ - backends/platform/ps2/ps2pad.o \ - backends/platform/ps2/savefilemgr.o \ - backends/platform/ps2/fileio.o \ - backends/platform/ps2/asyncfio.o \ - backends/platform/ps2/icon.o \ - backends/platform/ps2/cd.o \ - backends/platform/ps2/eecodyvdfs.o \ - backends/platform/ps2/rpckbd.o \ - backends/platform/ps2/systemps2.o \ - backends/platform/ps2/ps2mutex.o \ - backends/platform/ps2/ps2time.o \ - backends/platform/ps2/ps2debug.o +OBJS := $(srcdir)/backends/platform/ps2/DmaPipe.o \ + $(srcdir)/backends/platform/ps2/Gs2dScreen.o \ + $(srcdir)/backends/platform/ps2/irxboot.o \ + $(srcdir)/backends/platform/ps2/ps2input.o \ + $(srcdir)/backends/platform/ps2/ps2pad.o \ + $(srcdir)/backends/platform/ps2/savefilemgr.o \ + $(srcdir)/backends/platform/ps2/fileio.o \ + $(srcdir)/backends/platform/ps2/asyncfio.o \ + $(srcdir)/backends/platform/ps2/icon.o \ + $(srcdir)/backends/platform/ps2/cd.o \ + $(srcdir)/backends/platform/ps2/eecodyvdfs.o \ + $(srcdir)/backends/platform/ps2/rpckbd.o \ + $(srcdir)/backends/platform/ps2/systemps2.o \ + $(srcdir)/backends/platform/ps2/ps2mutex.o \ + $(srcdir)/backends/platform/ps2/ps2time.o \ + $(srcdir)/backends/platform/ps2/ps2debug.o MODULE_DIRS += . -BACKEND := ps2 - include $(srcdir)/Makefile.common LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2 index 472ba5ec3a..77cc735c5f 100644 --- a/backends/platform/ps2/Makefile.ps2 +++ b/backends/platform/ps2/Makefile.ps2 @@ -12,28 +12,41 @@ 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_HUGO = $(ENABLED) +ENABLE_IHNM = $(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_SAGA2 = $(ENABLED) -ENABLE_IHNM = $(ENABLED) +# ENABLE_SAGA2 = $(ENABLED) +ENABLE_SCI = $(ENABLED) +# ENABLE_SCI32 = $(ENABLED) ENABLE_SKY = $(ENABLED) ENABLE_SWORD1 = $(ENABLED) ENABLE_SWORD2 = $(ENABLED) -# ENABLE_TINSEL = $(ENABLED) +ENABLE_TEENAGENT = $(ENABLED) +ENABLE_TINSEL = $(ENABLED) +ENABLE_TOON = $(ENABLED) ENABLE_TOUCHE = $(ENABLED) +ENABLE_TUCKER = $(ENABLED) + HAVE_GCC3 = true -CC = ee-gcc +CC = ee-gcc CXX = ee-g++ AS = ee-gcc LD = ee-gcc @@ -48,30 +61,33 @@ VPATH = $(srcdir) INCDIR = ../../../ # DEPDIR = .deps -DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar - +DEFINES = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -DDISABLE_SAVEGAME_SORTING -D_EE -D__PLAYSTATION2__ -G2 -O2 -Wall -Wno-multichar -fno-rtti -fno-exceptions # -DNO_ADAPTOR +# for release builds: +#DEFINES += -DRELEASE_BUILD INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines +CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP + TARGET = elf/scummvm.elf -OBJS := backends/platform/ps2/DmaPipe.o \ - backends/platform/ps2/Gs2dScreen.o \ - backends/platform/ps2/irxboot.o \ - backends/platform/ps2/ps2input.o \ - backends/platform/ps2/ps2pad.o \ - backends/platform/ps2/savefilemgr.o \ - backends/platform/ps2/fileio.o \ - backends/platform/ps2/asyncfio.o \ - backends/platform/ps2/icon.o \ - backends/platform/ps2/cd.o \ - backends/platform/ps2/eecodyvdfs.o \ - backends/platform/ps2/rpckbd.o \ - backends/platform/ps2/systemps2.o \ - backends/platform/ps2/ps2mutex.o \ - backends/platform/ps2/ps2time.o \ - backends/platform/ps2/ps2debug.o +OBJS := $(srcdir)/backends/platform/ps2/DmaPipe.o \ + $(srcdir)/backends/platform/ps2/Gs2dScreen.o \ + $(srcdir)/backends/platform/ps2/irxboot.o \ + $(srcdir)/backends/platform/ps2/ps2input.o \ + $(srcdir)/backends/platform/ps2/ps2pad.o \ + $(srcdir)/backends/platform/ps2/savefilemgr.o \ + $(srcdir)/backends/platform/ps2/fileio.o \ + $(srcdir)/backends/platform/ps2/asyncfio.o \ + $(srcdir)/backends/platform/ps2/icon.o \ + $(srcdir)/backends/platform/ps2/cd.o \ + $(srcdir)/backends/platform/ps2/eecodyvdfs.o \ + $(srcdir)/backends/platform/ps2/rpckbd.o \ + $(srcdir)/backends/platform/ps2/systemps2.o \ + $(srcdir)/backends/platform/ps2/ps2mutex.o \ + $(srcdir)/backends/platform/ps2/ps2time.o \ + $(srcdir)/backends/platform/ps2/ps2debug.o MODULE_DIRS += . diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp index d6e982cd8f..899b79727f 100644 --- a/backends/platform/psp/display_manager.cpp +++ b/backends/platform/psp/display_manager.cpp @@ -20,6 +20,8 @@ * */ +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include <pspgu.h> #include <pspdisplay.h> #include <pspthreadman.h> diff --git a/backends/platform/samsungtv/main.cpp b/backends/platform/samsungtv/main.cpp index a3253c12f1..8274bb00a2 100644 --- a/backends/platform/samsungtv/main.cpp +++ b/backends/platform/samsungtv/main.cpp @@ -22,12 +22,14 @@ #define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h +#include "common/scummsys.h" + +#if defined(SAMSUNGTV) + #include "backends/platform/samsungtv/samsungtv.h" #include "backends/plugins/sdl/sdl-provider.h" #include "base/main.h" -#if defined(SAMSUNGTV) - #include <unistd.h> extern "C" int Game_Main(char *path, char *) { @@ -38,7 +40,7 @@ extern "C" int Game_Main(char *path, char *) { assert(g_system); // Pre initialize the backend - ((OSystem_SDL_SamsungTV *)g_system)->init(); + ((OSystem_POSIX *)g_system)->init(); #ifdef DYNAMIC_MODULES PluginManager::instance().addPluginProvider(new SDLPluginProvider()); @@ -48,7 +50,7 @@ extern "C" int Game_Main(char *path, char *) { int res = scummvm_main(0, 0); // Free OSystem - delete g_system; + delete (OSystem_SDL_SamsungTV *)g_system; return res; } diff --git a/backends/platform/samsungtv/module.mk b/backends/platform/samsungtv/module.mk index 36ad75da6d..cba09db74c 100644 --- a/backends/platform/samsungtv/module.mk +++ b/backends/platform/samsungtv/module.mk @@ -8,3 +8,6 @@ MODULE_OBJS := \ MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) OBJS := $(MODULE_OBJS) $(OBJS) MODULE_DIRS += $(sort $(dir $(MODULE_OBJS))) + +# Hack to ensure the SDL backend is built so we can use OSystem_SDL. +-include $(srcdir)/backends/platform/sdl/module.mk diff --git a/backends/platform/samsungtv/samsungtv.cpp b/backends/platform/samsungtv/samsungtv.cpp index 2cc520e6fa..9718eed1fe 100644 --- a/backends/platform/samsungtv/samsungtv.cpp +++ b/backends/platform/samsungtv/samsungtv.cpp @@ -20,20 +20,18 @@ * */ -#include "backends/platform/samsungtv/samsungtv.h" -#include "backends/events/samsungtvsdl/samsungtvsdl-events.h" +#include "common/scummsys.h" #if defined(SAMSUNGTV) +#include "backends/platform/samsungtv/samsungtv.h" +#include "backends/events/samsungtvsdl/samsungtvsdl-events.h" +#include "backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h" +#include "common/textconsole.h" + OSystem_SDL_SamsungTV::OSystem_SDL_SamsungTV() : - OSystem_POSIX("/dtv/usb/sda1/.scummvmrc") { -} - -bool OSystem_SDL_SamsungTV::hasFeature(Feature f) { - return - (f == OSystem::kFeatureAspectRatioCorrection) || - (f == OSystem::kFeatureCursorHasPalette); + OSystem_POSIX("/mtd_rwarea/.scummvmrc") { } void OSystem_SDL_SamsungTV::initBackend() { @@ -41,27 +39,22 @@ void OSystem_SDL_SamsungTV::initBackend() { if (_eventSource == 0) _eventSource = new SamsungTVSdlEventSource(); + if (_graphicsManager == 0) + _graphicsManager = new SamsungTVSdlGraphicsManager(_eventSource); + // Call parent implementation of this method - OSystem_SDL::initBackend(); + OSystem_POSIX::initBackend(); } -void OSystem_SDL_SamsungTV::setFeatureState(Feature f, bool enable) { - switch (f) { - case OSystem::kFeatureAspectRatioCorrection: - _graphicsManager->setFeatureState(f, enable); - break; - default: - break; - } +void OSystem_SDL_SamsungTV::quit() { + delete this; } -bool OSystem_SDL_SamsungTV::getFeatureState(Feature f) { - switch (f) { - case OSystem::kFeatureAspectRatioCorrection: - return _graphicsManager->getFeatureState(f); - default: - return false; - } +void OSystem_SDL_SamsungTV::fatalError() { + delete this; + // FIXME + warning("fatal error"); + for (;;) {} } #endif diff --git a/backends/platform/samsungtv/samsungtv.h b/backends/platform/samsungtv/samsungtv.h index 22a96495b7..b7a78a96cd 100644 --- a/backends/platform/samsungtv/samsungtv.h +++ b/backends/platform/samsungtv/samsungtv.h @@ -23,6 +23,8 @@ #ifndef PLATFORM_SDL_SAMSUNGTV_H #define PLATFORM_SDL_SAMSUNGTV_H +#if defined(SAMSUNGTV) + #include "backends/platform/sdl/posix/posix.h" class OSystem_SDL_SamsungTV : public OSystem_POSIX { @@ -30,10 +32,10 @@ public: OSystem_SDL_SamsungTV(); virtual void initBackend(); - - virtual bool hasFeature(Feature f); - virtual void setFeatureState(Feature f, bool enable); - virtual bool getFeatureState(Feature f); + virtual void quit(); + virtual void fatalError(); }; #endif + +#endif diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp index e8bb9210c3..1992bdd3f2 100644 --- a/backends/platform/sdl/main.cpp +++ b/backends/platform/sdl/main.cpp @@ -24,7 +24,7 @@ // Several SDL based ports use a custom main, and hence do not want to compile // of this file. The following "#if" ensures that. -#if !defined(UNIX) && \ +#if !defined(POSIX) && \ !defined(WIN32) && \ !defined(__MAEMO__) && \ !defined(__SYMBIAN32__) && \ @@ -33,6 +33,7 @@ !defined(DINGUX) && \ !defined(CAANOO) && \ !defined(LINUXMOTO) && \ + !defined(SAMSUNGTV) && \ !defined(OPENPANDORA) #include "backends/platform/sdl/sdl.h" diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk index 87a0e3d658..efc5168d5b 100644 --- a/backends/platform/sdl/module.mk +++ b/backends/platform/sdl/module.mk @@ -5,7 +5,7 @@ MODULE_OBJS := \ main.o \ sdl.o -ifdef UNIX +ifdef POSIX MODULE_OBJS += \ posix/posix-main.o \ posix/posix.o diff --git a/backends/platform/sdl/posix/posix-main.cpp b/backends/platform/sdl/posix/posix-main.cpp index ffc28b354c..f78e001398 100644 --- a/backends/platform/sdl/posix/posix-main.cpp +++ b/backends/platform/sdl/posix/posix-main.cpp @@ -22,7 +22,7 @@ #include "common/scummsys.h" -#if defined(UNIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) +#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) #include "backends/platform/sdl/posix/posix.h" #include "backends/plugins/sdl/sdl-provider.h" diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp index 1122e9b20a..21ad7b9e35 100644 --- a/backends/platform/sdl/posix/posix.cpp +++ b/backends/platform/sdl/posix/posix.cpp @@ -20,12 +20,13 @@ * */ +#define FORBIDDEN_SYMBOL_EXCEPTION_getenv #define FORBIDDEN_SYMBOL_EXCEPTION_mkdir #define FORBIDDEN_SYMBOL_EXCEPTION_time_h //On IRIX, sys/stat.h includes sys/time.h #include "common/scummsys.h" -#ifdef UNIX +#ifdef POSIX #include "backends/platform/sdl/posix/posix.h" #include "backends/saves/posix/posix-saves.h" @@ -60,7 +61,7 @@ void OSystem_POSIX::initBackend() { Common::String OSystem_POSIX::getDefaultConfigFileName() { char configFile[MAXPATHLEN]; - // On UNIX type systems, by default we store the config file inside + // On POSIX type systems, by default we store the config file inside // to the HOME directory of the user. const char *home = getenv("HOME"); if (home != NULL && strlen(home) < MAXPATHLEN) @@ -82,6 +83,9 @@ Common::WriteStream *OSystem_POSIX::createLogFile() { #else logFile += "/.scummvm"; #endif +#ifdef SAMSUNGTV + logFile = "/mtd_ram"; +#endif struct stat sb; diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 5cb409794b..a3fb719ca4 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -21,6 +21,7 @@ */ #define FORBIDDEN_SYMBOL_EXCEPTION_time_h +#define FORBIDDEN_SYMBOL_EXCEPTION_exit #ifdef WIN32 #define WIN32_LEAN_AND_MEAN diff --git a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl index cb1c508fa1..82c15ec3db 100644 --- a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl +++ b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl @@ -104,9 +104,6 @@ #$SDK_LibraryDirs{'S90'}{'esdl.lib'} = "$SdlBase\\S90"; #$SDK_LibraryDirs{'UIQ2'}{'esdl.lib'} = "$SdlBase\\UIQ2" #$SDK_LibraryDirs{'UIQ3'}{'esdl.lib'} = "$SdlBase\\UIQ3"; - - ## HardlySupported(TM) :P - #$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "$DevBase\\mpeg2dec-0.4.0\\epoc"; } # now you can add $VariationSets only built on this PC below this line :) @@ -145,7 +142,6 @@ # $SDK_LibraryDirs{'S60v1'}{'esdl.lib'} = $SDK_LibraryDirs{'S60v2'}{'esdl.lib'} = $SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\S60"; # $SDK_LibraryDirs{'S80'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\S80"; # $SDK_LibraryDirs{'S90'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\S90"; - #$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "C:\\S\\mpeg2dec-0.4.0\\epoc"; } # now you can add $VariationSets only built on this PC below this line :) @@ -183,7 +179,6 @@ $SDK_LibraryDirs{'S90'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\S90"; $SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\S60\\S60V3"; $SDK_LibraryDirs{'UIQ3'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\UIQ\\UIQ3"; - #$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "C:\\S\\mpeg2dec-0.4.0\\epoc"; } # now you can add $VariationSets only built on this PC below this line :) @@ -221,7 +216,6 @@ $SDK_LibraryDirs{'S90'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\S90"; $SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\S60\\S60V3"; $SDK_LibraryDirs{'UIQ3'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\UIQ\\UIQ3"; - #$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "C:\\S\\mpeg2dec-0.4.0\\epoc"; } # now you can add $VariationSets only built on this PC below this line :) @@ -259,7 +253,6 @@ $SDK_LibraryDirs{'S90'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\S90"; $SDK_LibraryDirs{'S60v3'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\S60\\S60V3"; $SDK_LibraryDirs{'UIQ3'}{'esdl.lib'} = "E:\\WICKED\\ESDL\\epoc\\UIQ\\UIQ3"; - #$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "C:\\S\\mpeg2dec-0.4.0\\epoc"; } # now you can add $VariationSets only built on this PC below this line :) diff --git a/backends/platform/symbian/README b/backends/platform/symbian/README index 140f442fb6..1f49c52f02 100644 --- a/backends/platform/symbian/README +++ b/backends/platform/symbian/README @@ -114,9 +114,6 @@ Building ScummVM - flac, the Free Lossless Audio Codec http://flac.sourceforge.net/ - - libmpeg2, a free MPEG-2 video stream decoder - http://libmpeg2.sourceforge.net - Compiling ScummVM ----------------- diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h index ebcd273659..86460e65c5 100644 --- a/backends/platform/symbian/src/portdefs.h +++ b/backends/platform/symbian/src/portdefs.h @@ -18,8 +18,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + #ifndef SYMBIAN_PORTDEFS_H #define SYMBIAN_PORTDEFS_H + #include <assert.h> #include <stdarg.h> #include <string.h> @@ -37,6 +39,26 @@ #define M_PI 3.14159265358979323846 #endif /* M_PI */ + +// Enable Symbians own datatypes +// This is done for two reasons +// a) uint is already defined by Symbians libc component +// b) Symbian is using its "own" datatyping, and the Scummvm port +// should follow this to ensure the best compability possible. +typedef unsigned char byte; +typedef unsigned char uint8; +typedef signed char int8; +typedef unsigned short int uint16; +typedef signed short int int16; +typedef unsigned long int uint32; +typedef signed long int int32; + +// Define SCUMMVM_DONT_DEFINE_TYPES to prevent scummsys.h from trying to +// re-define those data types. +#define SCUMMVM_DONT_DEFINE_TYPES + +#define SMALL_SCREEN_DEVICE + #define DISABLE_COMMAND_LINE #if defined(USE_TREMOR) && !defined(USE_VORBIS) diff --git a/backends/platform/wii/options.cpp b/backends/platform/wii/options.cpp index ffabc5ae97..8c12ad9b81 100644 --- a/backends/platform/wii/options.cpp +++ b/backends/platform/wii/options.cpp @@ -175,15 +175,15 @@ void WiiOptionsDialog::handleTickle() { break; case -EBUSY: - label = _("Initialising network"); + label = _("Initializing network"); break; case -ETIMEDOUT: - label = _("Timeout while initialising network"); + label = _("Timeout while initializing network"); break; default: - label = String::format(_("Network not initialised (%d)"), status); + label = String::format(_("Network not initialized (%d)"), status); break; } diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile index a9741f396f..7f8d45b3de 100644 --- a/backends/platform/wince/Makefile +++ b/backends/platform/wince/Makefile @@ -47,7 +47,6 @@ ENABLE_MADE = STATIC_PLUGIN ## Pick which libraries you want to use here USE_MAD = 1 -#USE_MPEG2 = 1 #USE_TREMOR = 1 USE_TREMOLO = 1 #USE_FLAC = 1 @@ -133,11 +132,6 @@ DEFINES += -DUSE_MAD LIBS += -lmad endif -ifdef USE_MPEG2 -DEFINES += -DUSE_MPEG2 -LIBS += -lmpeg2 -endif - ifdef USE_TREMOR DEFINES += -DUSE_TREMOR -DUSE_VORBIS LIBS += -ltremorce diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt index 69abd66e69..c48d9ca998 100644 --- a/backends/platform/wince/README-WinCE.txt +++ b/backends/platform/wince/README-WinCE.txt @@ -1,15 +1,49 @@ ScummVM Windows CE FAQ -Last updated: $Date$ -Release version: 1.1.0 +Last updated: 2011-05-27 +Release version: 1.3.0 ------------------------------------------------------------------------ New in this version ------------------- -1.1.1 +1.3.0: +This is the first official Windows CE release since 1.1.1. + +The following new engines are now included (changes since last WinCE release): + - Draci Engine (Dragon History) + - Hugo Engine (Hugo Trilogy) + - Mohawk Engine (Myst, Riven, Living Book games & Where in Time is Carmen + Sandiego?) + - SCI Engine (Sierra SCI games, see main README for a list of supported games) + - Toon Engine (Toonstruck) + +Also, there are now 4 binaries in this distribution, a single executable +which contains all engines (for devices with enough memory) and 3 smaller +binaries which contain only some of the engines. The following lists all +executables and the engines they contain: + +scummvm.exe: + - all supported engines +scummvm1.exe: + - scumm, agi, cruise, draci, lure, queen, sky, sword1, tinsel, touche +scummvm2.exe: + - agos, cine, drascula, gob, groovie, kyra, made, parallaction, saga, + teenagent, tucker +scummvm3.exe: + - hugo, mohawk, sci, sword2, toon + +There are no other port specific changes. + +1.2.1: +(Note: No official 1.2.1 release) + +1.2.0: +(Note: No official 1.2.0 release) + +1.1.1: Fix to the Normal2xAspect scaler that was causing crashes. -1.1.0 +1.1.0: The TeenAgent engine is now included, but there are no other port specific changes since 1.0.0. diff --git a/backends/platform/wince/missing/io.h b/backends/platform/wince/missing/io.h index 96bc6a9ea1..de492cac68 100644 --- a/backends/platform/wince/missing/io.h +++ b/backends/platform/wince/missing/io.h @@ -1,7 +1,6 @@ /* Header is not present in Windows CE SDK */ /* This stuff will live here until port configuration file is in place */ -#define stricmp _stricmp #define strdup _strdup #ifndef _FILE_DEFINED diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h index 1f8b9bb3ca..93df6cd39e 100644 --- a/backends/platform/wince/portdefs.h +++ b/backends/platform/wince/portdefs.h @@ -20,44 +20,47 @@ * */ -// Missing string/stdlib/assert declarations for WinCE 2.xx +#ifndef WINCE_PORTDEFS_H +#define WINCE_PORTDEFS_H + +#ifndef _WIN32_WCE +#error For use on WinCE only +#endif +// Missing string/stdlib/assert declarations for WinCE 2.xx #if _WIN32_WCE < 300 -void *calloc(size_t n, size_t s); -int isalnum(int c); -int isdigit(int c); -int isprint(int c); -int isspace(int c); -char *strrchr(const char *s, int c); -char *strdup(const char *s); -int _stricmp(const char *string1, const char *string2); -int stricmp(const char *string1, const char *string2); -void assert(void *expression); -void assert(int expression); -long int strtol(const char *nptr, char **endptr, int base); -char *_strdup(const char *s); -char *strpbrk(const char *s, const char *accept); + #define SMALL_SCREEN_DEVICE + + void *calloc(size_t n, size_t s); + int isalnum(int c); + int isdigit(int c); + int isprint(int c); + int isspace(int c); + char *strrchr(const char *s, int c); + char *strdup(const char *s); + void assert(void *expression); + void assert(int expression); + long int strtol(const char *nptr, char **endptr, int base); + char *_strdup(const char *s); + char *strpbrk(const char *s, const char *accept); #endif -#ifdef _WIN32_WCE #ifndef __GNUC__ -void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); -char *getcwd(char *buf, int size); -typedef int ptrdiff_t; -void GetCurrentDirectory(int len, char *buf); -#define INVALID_FILE_ATTRIBUTES 0xffffffff + void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); + char *getcwd(char *buf, int size); + typedef int ptrdiff_t; + void GetCurrentDirectory(int len, char *buf); + #define INVALID_FILE_ATTRIBUTES 0xffffffff #else -#include <math.h> -#undef GetCurrentDirectory -extern "C" void GetCurrentDirectory(int len, char *buf); -#define stricmp _stricmp -#define strnicmp _strnicmp -#define snprintf _snprintf -#define strdup _strdup -#define fopen wce_fopen + #include <math.h> + #undef GetCurrentDirectory + extern "C" void GetCurrentDirectory(int len, char *buf); + #define snprintf _snprintf + #define strdup _strdup + #define fopen wce_fopen #endif #include <windows.h> @@ -72,7 +75,7 @@ extern "C" void GetCurrentDirectory(int len, char *buf); //#include <direct.h> #ifdef __MINGW32CE__ -void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); + void *bsearch(const void *, const void *, size_t, size_t, int (*x)(const void *, const void *)); #endif int remove(const char *path); int _access(const char *path, int mode); @@ -81,4 +84,5 @@ void drawError(char *); #define vsnprintf _vsnprintf + #endif diff --git a/backends/plugins/posix/posix-provider.cpp b/backends/plugins/posix/posix-provider.cpp index 39ed247436..a68a792fa4 100644 --- a/backends/plugins/posix/posix-provider.cpp +++ b/backends/plugins/posix/posix-provider.cpp @@ -22,7 +22,7 @@ #include "common/scummsys.h" -#if defined(DYNAMIC_MODULES) && defined(UNIX) +#if defined(DYNAMIC_MODULES) && defined(POSIX) #include "backends/plugins/posix/posix-provider.h" #include "backends/plugins/dynamic-plugin.h" @@ -77,9 +77,9 @@ public: }; -Plugin* POSIXPluginProvider::createPlugin(const Common::FSNode &node) const { +Plugin *POSIXPluginProvider::createPlugin(const Common::FSNode &node) const { return new POSIXPlugin(node.getPath()); } -#endif // defined(DYNAMIC_MODULES) && defined(UNIX) +#endif // defined(DYNAMIC_MODULES) && defined(POSIX) diff --git a/backends/plugins/posix/posix-provider.h b/backends/plugins/posix/posix-provider.h index 7d6d6ada4d..b1186ccf3f 100644 --- a/backends/plugins/posix/posix-provider.h +++ b/backends/plugins/posix/posix-provider.h @@ -25,13 +25,13 @@ #include "base/plugins.h" -#if defined(DYNAMIC_MODULES) && defined(UNIX) +#if defined(DYNAMIC_MODULES) && defined(POSIX) class POSIXPluginProvider : public FilePluginProvider { protected: - Plugin* createPlugin(const Common::FSNode &node) const; + Plugin *createPlugin(const Common::FSNode &node) const; }; -#endif // defined(DYNAMIC_MODULES) && defined(UNIX) +#endif // defined(DYNAMIC_MODULES) && defined(POSIX) #endif diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp index bcbc6bde9e..0a08e48e6f 100644 --- a/backends/plugins/win32/win32-provider.cpp +++ b/backends/plugins/win32/win32-provider.cpp @@ -67,19 +67,11 @@ public: bool loadPlugin() { assert(!_dlHandle); - #ifndef _WIN32_WCE +#ifndef _WIN32_WCE _dlHandle = LoadLibrary(_filename.c_str()); - #else - if (!_filename.hasSuffix("scummvm.dll") && - !_filename.hasSuffix("libstdc++-6.dll") && - !_filename.hasSuffix("libgcc_s_sjlj-1.dll")) { - // skip loading the core scummvm module and runtime dlls - _dlHandle = LoadLibrary(toUnicode(_filename.c_str())); - } else { - // do not generate misleading error message - return false; - } - #endif +#else + _dlHandle = LoadLibrary(toUnicode(_filename.c_str())); +#endif if (!_dlHandle) { debug("Failed loading plugin '%s' (error code %d)", _filename.c_str(), (int32) GetLastError()); @@ -111,7 +103,11 @@ Plugin* Win32PluginProvider::createPlugin(const Common::FSNode &node) const { bool Win32PluginProvider::isPluginFilename(const Common::FSNode &node) const { // Check the plugin suffix Common::String filename = node.getName(); +#ifndef _WIN32_WCE if (!filename.hasSuffix(".dll")) +#else + if (!filename.hasSuffix(".plugin")) +#endif return false; return true; diff --git a/backends/saves/posix/posix-saves.cpp b/backends/saves/posix/posix-saves.cpp index 5145a03c11..e04609be5b 100644 --- a/backends/saves/posix/posix-saves.cpp +++ b/backends/saves/posix/posix-saves.cpp @@ -21,13 +21,14 @@ */ -// Enable mkdir +// Enable getenv, mkdir and time.h stuff +#define FORBIDDEN_SYMBOL_EXCEPTION_getenv #define FORBIDDEN_SYMBOL_EXCEPTION_mkdir #define FORBIDDEN_SYMBOL_EXCEPTION_time_h //On IRIX, sys/stat.h includes sys/time.h #include "common/scummsys.h" -#if defined(UNIX) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) +#if defined(POSIX) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) #include "backends/saves/posix/posix-saves.h" @@ -50,7 +51,7 @@ POSIXSaveFileManager::POSIXSaveFileManager() { // Register default savepath based on HOME #if defined(SAMSUNGTV) - ConfMan.registerDefault("savepath", "/dtv/usb/sda1/.scummvm"); + ConfMan.registerDefault("savepath", "/mtd_wiselink/scummvm savegames"); #else Common::String savePath; const char *home = getenv("HOME"); @@ -59,15 +60,30 @@ POSIXSaveFileManager::POSIXSaveFileManager() { savePath += "/" DEFAULT_SAVE_PATH; ConfMan.registerDefault("savepath", savePath); } + + // The user can override the savepath with the SCUMMVM_SAVEPATH + // environment variable. This is weaker than a --savepath on the + // command line, but overrides the default savepath. + // + // To ensure that the command line option (if given) has precedence, + // we only set the value in the transient domain if it is not + // yet present there. + if (!ConfMan.hasKey("savepath", Common::ConfigManager::kTransientDomain)) { + const char *dir = getenv("SCUMMVM_SAVEPATH"); + if (dir && *dir && strlen(dir) < MAXPATHLEN) { + Common::FSNode saveDir(dir); + if (!saveDir.exists()) { + warning("Ignoring non-existent SCUMMVM_SAVEPATH '%s'", dir); + } else if (!saveDir.isWritable()) { + warning("Ignoring non-writable SCUMMVM_SAVEPATH '%s'", dir); + } else { + ConfMan.set("savepath", dir, Common::ConfigManager::kTransientDomain); + } + } + } #endif } -/* -POSIXSaveFileManager::POSIXSaveFileManager(const Common::String &defaultSavepath) - : DefaultSaveFileManager(defaultSavepath) { -} -*/ -#if defined(UNIX) void POSIXSaveFileManager::checkPath(const Common::FSNode &dir) { const Common::String path = dir.getPath(); clearError(); @@ -132,6 +148,5 @@ void POSIXSaveFileManager::checkPath(const Common::FSNode &dir) { } } } -#endif #endif diff --git a/backends/saves/posix/posix-saves.h b/backends/saves/posix/posix-saves.h index b7ee7ff5b8..160075d3db 100644 --- a/backends/saves/posix/posix-saves.h +++ b/backends/saves/posix/posix-saves.h @@ -25,7 +25,7 @@ #include "backends/saves/default/default-saves.h" -#if defined(UNIX) +#if defined(POSIX) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) /** * Customization of the DefaultSaveFileManager for POSIX platforms. * The only two differences are that the default constructor sets @@ -35,7 +35,6 @@ class POSIXSaveFileManager : public DefaultSaveFileManager { public: POSIXSaveFileManager(); -// POSIXSaveFileManager(const Common::String &defaultSavepath); protected: /** diff --git a/backends/vkeybd/image-map.h b/backends/vkeybd/image-map.h index 020bf70c67..3bd8cfa0db 100644 --- a/backends/vkeybd/image-map.h +++ b/backends/vkeybd/image-map.h @@ -23,9 +23,10 @@ #ifndef COMMON_IMAGEMAP_H #define COMMON_IMAGEMAP_H +#include "common/scummsys.h" + #ifdef ENABLE_VKEYBD -#include "common/scummsys.h" #include "common/hashmap.h" #include "common/hash-str.h" diff --git a/backends/vkeybd/polygon.h b/backends/vkeybd/polygon.h index bc76dfb4d7..19a12a0409 100644 --- a/backends/vkeybd/polygon.h +++ b/backends/vkeybd/polygon.h @@ -23,9 +23,10 @@ #ifndef COMMON_POLYGON_H #define COMMON_POLYGON_H +#include "common/scummsys.h" + #ifdef ENABLE_VKEYBD -#include "common/scummsys.h" #include "common/array.h" #include "common/rect.h" diff --git a/backends/vkeybd/virtual-keyboard-gui.h b/backends/vkeybd/virtual-keyboard-gui.h index e3798569fb..da80ef2223 100644 --- a/backends/vkeybd/virtual-keyboard-gui.h +++ b/backends/vkeybd/virtual-keyboard-gui.h @@ -23,10 +23,11 @@ #ifndef COMMON_VIRTUAL_KEYBOARD_GUI_H #define COMMON_VIRTUAL_KEYBOARD_GUI_H +#include "common/scummsys.h" + #ifdef ENABLE_VKEYBD #include "backends/vkeybd/virtual-keyboard.h" -#include "common/scummsys.h" #include "common/rect.h" #include "common/system.h" #include "graphics/font.h" diff --git a/backends/vkeybd/virtual-keyboard-parser.h b/backends/vkeybd/virtual-keyboard-parser.h index a5d0e0e4f1..eb25ebe6fd 100644 --- a/backends/vkeybd/virtual-keyboard-parser.h +++ b/backends/vkeybd/virtual-keyboard-parser.h @@ -23,9 +23,10 @@ #ifndef COMMON_VIRTUAL_KEYBOARD_PARSER_H #define COMMON_VIRTUAL_KEYBOARD_PARSER_H +#include "common/scummsys.h" + #ifdef ENABLE_VKEYBD -#include "common/scummsys.h" #include "common/xmlparser.h" #include "backends/vkeybd/virtual-keyboard.h" diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h index 4936275e23..21db5a47da 100644 --- a/backends/vkeybd/virtual-keyboard.h +++ b/backends/vkeybd/virtual-keyboard.h @@ -23,11 +23,12 @@ #ifndef COMMON_VIRTUAL_KEYBOARD_H #define COMMON_VIRTUAL_KEYBOARD_H +#include "common/scummsys.h" + #ifdef ENABLE_VKEYBD class OSystem; -#include "common/scummsys.h" #include "common/events.h" #include "common/hashmap.h" #include "common/hash-str.h" |