diff options
Diffstat (limited to 'backends')
35 files changed, 140 insertions, 404 deletions
diff --git a/backends/platform/PalmOS/Src/modules.cpp b/backends/platform/PalmOS/Src/modules.cpp index f66d7d6ae6..b16e2cf7d5 100644 --- a/backends/platform/PalmOS/Src/modules.cpp +++ b/backends/platform/PalmOS/Src/modules.cpp @@ -87,9 +87,9 @@ static UInt32 ModulesPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) #ifdef PALMOS_NATIVE result = GET_MODEARM; #else -# if !defined(DISABLE_SCUMM) || \ - !defined(DISABLE_AGOS) || \ - !defined(DISABLE_SWORD1) +# if defined(ENABLE_SCUMM) || \ + defined(ENABLE_AGOS) || \ + defined(ENABLE_SWORD1) result = GET_DATACOMMON|GET_DATAENGINE|GET_MODE68K; # else result = GET_DATACOMMON|GET_MODE68K; diff --git a/backends/platform/PalmOS/Src/prefixes/compile.h b/backends/platform/PalmOS/Src/prefixes/compile.h index 40485a5927..c2bb51385a 100644 --- a/backends/platform/PalmOS/Src/prefixes/compile.h +++ b/backends/platform/PalmOS/Src/prefixes/compile.h @@ -26,27 +26,27 @@ #ifndef __COMPILE_H__ #define __COMPILE_H__ -#define DISABLE_SCUMM -#define DISABLE_SCUMM_7_8 -#define DISABLE_HE +#undef ENABLE_SCUMM +#undef ENABLE_SCUMM_7_8 +#undef ENABLE_HE -#define DISABLE_AGOS -#define DISABLE_SKY -#define DISABLE_SWORD1 -#define DISABLE_SWORD2 -#define DISABLE_QUEEN -#define DISABLE_SAGA -#define DISABLE_KYRA -#define DISABLE_AWE -#define DISABLE_GOB -#define DISABLE_LURE -#define DISABLE_CINE -#define DISABLE_AGI -#define DISABLE_TOUCHE -#define DISABLE_PARALLACTION -#define DISABLE_CRUISE -#define DISABLE_DRASCULA -#define DISABLE_IGOR +#undef ENABLE_AGOS +#undef ENABLE_SKY +#undef ENABLE_SWORD1 +#undef ENABLE_SWORD2 +#undef ENABLE_QUEEN +#undef ENABLE_SAGA +#undef ENABLE_KYRA +#undef ENABLE_AWE +#undef ENABLE_GOB +#undef ENABLE_LURE +#undef ENABLE_CINE +#undef ENABLE_AGI +#undef ENABLE_TOUCHE +#undef ENABLE_PARALLACTION +#undef ENABLE_CRUISE +#undef ENABLE_DRASCULA +#undef ENABLE_IGOR // ScummVM #define DISABLE_HQ_SCALERS diff --git a/backends/platform/PalmOS/Src/prefixes/native_agi.h b/backends/platform/PalmOS/Src/prefixes/native_agi.h index 790f108efa..f3feee8c70 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_agi.h +++ b/backends/platform/PalmOS/Src/prefixes/native_agi.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_AGI +#define ENABLE_AGI STATIC_PLUGIN #undef USE_MAD #undef USE_VORBIS diff --git a/backends/platform/PalmOS/Src/prefixes/native_agos.h b/backends/platform/PalmOS/Src/prefixes/native_agos.h index f3b3476262..8a804e3116 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_agos.h +++ b/backends/platform/PalmOS/Src/prefixes/native_agos.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_AGOS +#define ENABLE_AGOS STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_cine.h b/backends/platform/PalmOS/Src/prefixes/native_cine.h index bacdfa2047..3d19d9c557 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_cine.h +++ b/backends/platform/PalmOS/Src/prefixes/native_cine.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_CINE +#define ENABLE_CINE STATIC_PLUGIN #define _DEBUG #undef USE_MAD diff --git a/backends/platform/PalmOS/Src/prefixes/native_cruise.h b/backends/platform/PalmOS/Src/prefixes/native_cruise.h index 9bc0cdac13..89e6e65a70 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_cruise.h +++ b/backends/platform/PalmOS/Src/prefixes/native_cruise.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_CRUISE +#define ENABLE_CRUISE STATIC_PLUGIN #undef USE_MAD #undef USE_VORBIS diff --git a/backends/platform/PalmOS/Src/prefixes/native_drascula.h b/backends/platform/PalmOS/Src/prefixes/native_drascula.h index 3904cc98ba..35bc381af4 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_drascula.h +++ b/backends/platform/PalmOS/Src/prefixes/native_drascula.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_DRASCULA +#define ENABLE_DRASCULA STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_gob.h b/backends/platform/PalmOS/Src/prefixes/native_gob.h index 16863cd5b6..9cb34099d0 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_gob.h +++ b/backends/platform/PalmOS/Src/prefixes/native_gob.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_GOB +#define ENABLE_GOB STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_igor.h b/backends/platform/PalmOS/Src/prefixes/native_igor.h index 749be9daaf..2808dd2331 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_igor.h +++ b/backends/platform/PalmOS/Src/prefixes/native_igor.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_IGOR +#define ENABLE_IGOR STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_kyra.h b/backends/platform/PalmOS/Src/prefixes/native_kyra.h index 7f6dd57565..c89b0a5b93 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_kyra.h +++ b/backends/platform/PalmOS/Src/prefixes/native_kyra.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_KYRA +#define ENABLE_KYRA #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_lure.h b/backends/platform/PalmOS/Src/prefixes/native_lure.h index b017c46fe6..71835ee644 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_lure.h +++ b/backends/platform/PalmOS/Src/prefixes/native_lure.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_LURE +#define ENABLE_LURE STATIC_PLUGIN #undef USE_MAD #undef USE_VORBIS diff --git a/backends/platform/PalmOS/Src/prefixes/native_parallaction.h b/backends/platform/PalmOS/Src/prefixes/native_parallaction.h index 545cdd36fd..e8d46cc382 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_parallaction.h +++ b/backends/platform/PalmOS/Src/prefixes/native_parallaction.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_PARALLACTION +#define ENABLE_PARALLACTION STATIC_PLUGIN #undef USE_MAD #undef USE_VORBIS diff --git a/backends/platform/PalmOS/Src/prefixes/native_queen.h b/backends/platform/PalmOS/Src/prefixes/native_queen.h index d2a1b44ef8..85bb5a0a04 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_queen.h +++ b/backends/platform/PalmOS/Src/prefixes/native_queen.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_QUEEN +#define ENABLE_QUEEN STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_saga.h b/backends/platform/PalmOS/Src/prefixes/native_saga.h index 1a728e6bcb..19db05b633 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_saga.h +++ b/backends/platform/PalmOS/Src/prefixes/native_saga.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_SAGA +#define ENABLE_SAGA STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_scumm.h b/backends/platform/PalmOS/Src/prefixes/native_scumm.h index 5014a8d5ff..b8433a3fa8 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_scumm.h +++ b/backends/platform/PalmOS/Src/prefixes/native_scumm.h @@ -2,9 +2,9 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_SCUMM -#undef DISABLE_SCUMM_7_8 -#undef DISABLE_HE +#define ENABLE_SCUMM STATIC_PLUGIN +#define ENABLE_SCUMM_7_8 +#define ENABLE_HE #define USE_ARM_GFX_ASM #define USE_ARM_SMUSH_ASM diff --git a/backends/platform/PalmOS/Src/prefixes/native_sky.h b/backends/platform/PalmOS/Src/prefixes/native_sky.h index 193c57e87d..49b157471f 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_sky.h +++ b/backends/platform/PalmOS/Src/prefixes/native_sky.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_SKY +#define ENABLE_SKY STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_sword1.h b/backends/platform/PalmOS/Src/prefixes/native_sword1.h index 8e52a978a8..aaae4c9b86 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_sword1.h +++ b/backends/platform/PalmOS/Src/prefixes/native_sword1.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_SWORD1 +#define ENABLE_SWORD1 #define USE_MPEG2 #define USE_VORBIS diff --git a/backends/platform/PalmOS/Src/prefixes/native_sword2.h b/backends/platform/PalmOS/Src/prefixes/native_sword2.h index f74a8bcc9a..5e9c45b047 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_sword2.h +++ b/backends/platform/PalmOS/Src/prefixes/native_sword2.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_SWORD2 +#define ENABLE_SWORD2 STATIC_PLUGIN #undef _DEBUG #define USE_MPEG2 #define USE_VORBIS diff --git a/backends/platform/PalmOS/Src/prefixes/native_touche.h b/backends/platform/PalmOS/Src/prefixes/native_touche.h index 486630b799..acf50e2787 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_touche.h +++ b/backends/platform/PalmOS/Src/prefixes/native_touche.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#undef DISABLE_TOUCHE +#define ENABLE_TOUCHE STATIC_PLUGIN #endif diff --git a/backends/platform/dc/Makefile b/backends/platform/dc/Makefile index db56035b7b..0a048c45e9 100644 --- a/backends/platform/dc/Makefile +++ b/backends/platform/dc/Makefile @@ -3,7 +3,7 @@ ronindir = /usr/local/ronin -BUILD_PLUGINS = 1 +DYNAMIC_MODULES = 1 srcdir = ../../.. VPATH = $(srcdir) @@ -28,7 +28,7 @@ RANLIB = sh-elf-ranlib HAVE_GCC3 = true DISABLE_SCALERS = true -ifdef BUILD_PLUGINS +ifdef DYNAMIC_MODULES DEFINES += -DDYNAMIC_MODULES PRE_OBJS_FLAGS = -Wl,--whole-archive POST_OBJS_FLAGS = -Wl,--no-whole-archive diff --git a/backends/platform/dc/README b/backends/platform/dc/README index 56579b74db..e4ebda840e 100644 --- a/backends/platform/dc/README +++ b/backends/platform/dc/README @@ -21,6 +21,6 @@ Edit the Makefile to contain the path to libronin if you installed it somewhere other than /usr/local/ronin, then run `make dist', and you should get a scrambled binary SCUMMVM.BIN and some plugins *.PLG. -For serial/IP upload, remove the "BUILD_PLUGINS" line and just run `make', +For serial/IP upload, remove the "DYNAMIC_MODULES" line and just run `make', to get a static binary with the name `scummvm.elf'. diff --git a/backends/platform/dc/plugin.syms b/backends/platform/dc/plugin.syms index c8022d663a..2cab08c9c7 100644 --- a/backends/platform/dc/plugin.syms +++ b/backends/platform/dc/plugin.syms @@ -1,9 +1,7 @@ -_PLUGIN_copyright -_PLUGIN_createEngine -_PLUGIN_detectGames -_PLUGIN_gameIDList -_PLUGIN_findGameID -_PLUGIN_name +_PLUGIN_getVersion +_PLUGIN_getType +_PLUGIN_getTypeVersion +_PLUGIN_getObject ___plugin_ctors ___plugin_ctors_end ___plugin_dtors diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index 116d75b191..ea98402d4e 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -1,4 +1,4 @@ -#BUILD_PLUGINS = 1 +#DYNAMIC_MODULES = 1 #libndsdir = $(DEVKITPRO)/libnds libndsdir = /home/neil/devkitpror21/libnds @@ -86,184 +86,54 @@ ARM = 1 ifdef DS_BUILD_A DEFINES = -DDS_SCUMM_BUILD -DDS_BUILD_A -DUSE_ARM_GFX_ASM LOGO = logoa.bmp - DISABLE_HE = 1 - #DISABLE_SCUMM = 1 - DISABLE_SCUMM_7_8 = 1 - DISABLE_AGOS = 1 - DISABLE_SKY = 1 - DISABLE_SWORD1 = 1 - DISABLE_SWORD2 = 1 - DISABLE_QUEEN = 1 - DISABLE_SAGA = 1 - DISABLE_KYRA = 1 - DISABLE_GOB = 1 - DISABLE_LURE = 1 - DISABLE_CINE = 1 - DISABLE_AGI = 1 - DISABLE_TOUCHE = 1 - DISABLE_PARALLACTION = 1 - DISABLE_CRUISE = 1 + ENABLE_SCUMM = STATIC_PLUGIN USE_ARM_GFX_ASM = 1 - DISABLE_CRUISE = 1 - DISABLE_DRASCULA = 1 - DISABLE_IGOR = 1 BUILD=scummvm-A endif ifdef DS_BUILD_B DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_B LOGO = logob.bmp - DISABLE_HE = 1 - DISABLE_SCUMM = 1 - DISABLE_SCUMM_7_8 = 1 - DISABLE_AGOS = 1 - #DISABLE_SKY = 1# - DISABLE_SWORD1 = 1 - DISABLE_SWORD2 = 1 - #DISABLE_QUEEN = 1# - DISABLE_SAGA = 1 - DISABLE_KYRA = 1 - DISABLE_GOB = 1 - DISABLE_LURE = 1 - DISABLE_CINE = 1 - DISABLE_AGI = 1 - DISABLE_TOUCHE = 1 - DISABLE_PARALLACTION = 1 - DISABLE_CRUISE = 1 - DISABLE_DRASCULA = 1 - DISABLE_IGOR = 1 + ENABLE_SKY = STATIC_PLUGIN + ENABLE_QUEEN = STATIC_PLUGIN BUILD=scummvm-B endif ifdef DS_BUILD_C DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_C LOGO = logoc.bmp - DISABLE_HE = 1 - DISABLE_SCUMM = 1 - DISABLE_SCUMM_7_8 = 1 - #DISABLE_AGOS = 1 - DISABLE_SKY = 1 - DISABLE_SWORD1 = 1 - DISABLE_SWORD2 = 1 - DISABLE_QUEEN = 1 - DISABLE_SAGA = 1 - DISABLE_KYRA = 1 - DISABLE_GOB = 1 - DISABLE_LURE = 1 - DISABLE_CINE = 1 - DISABLE_AGI = 1 - DISABLE_TOUCHE = 1 - DISABLE_PARALLACTION = 1 - DISABLE_CRUISE = 1 - DISABLE_DRASCULA = 1 - DISABLE_IGOR = 1 + ENABLE_AGOS = STATIC_PLUGIN BUILD=scummvm-C endif ifdef DS_BUILD_D DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_D LOGO = logod.bmp - DISABLE_HE = 1 - DISABLE_SCUMM = 1 - DISABLE_SCUMM_7_8 = 1 - DISABLE_AGOS = 1 - DISABLE_SKY = 1 - DISABLE_SWORD1 = 1 - DISABLE_SWORD2 = 1 - DISABLE_QUEEN = 1 - DISABLE_SAGA = 1 - DISABLE_KYRA = 1 - #DISABLE_GOB = 1 - DISABLE_LURE = 1 - #DISABLE_CINE = 1 - #DISABLE_AGI = 1 - DISABLE_TOUCHE = 1 - DISABLE_PARALLACTION = 1 - DISABLE_CRUISE = 1 - DISABLE_DRASCULA = 1 - DISABLE_IGOR = 1 + ENABLE_GOB = STATIC_PLUGIN + ENABLE_CINE = STATIC_PLUGIN + ENABLE_AGI = STATIC_PLUGIN BUILD=scummvm-D endif - ifdef DS_BUILD_E DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_E LOGO = logoe.bmp - DISABLE_HE = 1 - DISABLE_SCUMM = 1 - DISABLE_SCUMM_7_8 = 1 - DISABLE_AGOS = 1 - DISABLE_SKY = 1 - DISABLE_SWORD1 = 1 - DISABLE_SWORD2 = 1 - DISABLE_QUEEN = 1 - #DISABLE_SAGA = 1 - DISABLE_KYRA = 1 - DISABLE_GOB = 1 - DISABLE_LURE = 1 - DISABLE_CINE = 1 - DISABLE_AGI = 1 - DISABLE_TOUCHE = 1 - DISABLE_PARALLACTION = 1 - DISABLE_CRUISE = 1 - DISABLE_DRASCULA = 1 - DISABLE_IGOR = 1 + ENABLE_SAGA = STATIC_PLUGIN BUILD=scummvm-E endif - ifdef DS_BUILD_F DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_F LOGO = logof.bmp - DISABLE_HE = 1 - DISABLE_SCUMM = 1 - DISABLE_SCUMM_7_8 = 1 - DISABLE_AGOS = 1 - DISABLE_SKY = 1 - DISABLE_SWORD1 = 1 - DISABLE_SWORD2 = 1 - DISABLE_QUEEN = 1 - DISABLE_SAGA = 1 - #DISABLE_KYRA = 1 - DISABLE_GOB = 1 - DISABLE_LURE = 1 - DISABLE_CINE = 1 - DISABLE_AGI = 1 - DISABLE_TOUCHE = 1 - DISABLE_PARALLACTION = 1 - DISABLE_CRUISE = 1 - DISABLE_DRASCULA = 1 - DISABLE_IGOR = 1 + ENABLE_KYRA = STATIC_PLUGIN BUILD=scummvm-F - endif - - ifdef DS_BUILD_G DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_G LOGO = logog.bmp - DISABLE_HE = 1 - DISABLE_SCUMM = 1 - DISABLE_SCUMM_7_8 = 1 - DISABLE_AGOS = 1 - DISABLE_SKY = 1 - DISABLE_SWORD1 = 1 - DISABLE_SWORD2 = 1 - DISABLE_QUEEN = 1 - DISABLE_SAGA = 1 - DISABLE_KYRA = 1 - DISABLE_GOB = 1 - #DISABLE_LURE = 1 - DISABLE_CINE = 1 - DISABLE_AGI = 1 - DISABLE_TOUCHE = 1 - DISABLE_PARALLACTION = 1 - DISABLE_CRUISE = 1 - DISABLE_DRASCULA = 1 - DISABLE_IGOR = 1 + ENABLE_LURE = STATIC_PLUGIN BUILD=scummvm-G - endif @@ -341,7 +211,7 @@ AS = arm-eabi-as HAVE_GCC3 = true DISABLE_SCALERS = true -ifdef BUILD_PLUGINS +ifdef DYNAMIC_MODULES DEFINES += -DDYNAMIC_MODULES PRE_OBJS_FLAGS = -Wl,--whole-archive POST_OBJS_FLAGS = -Wl,--no-whole-archive diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 0aed095244..d11e4e6f75 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -359,7 +359,7 @@ void initSprites() { void saveGameBackBuffer() { -#ifdef DISABLE_SCUMM +#ifndef ENABLE_SCUMM if (savedBuffer == NULL) savedBuffer = new u8[gameWidth * gameHeight]; for (int r = 0; r < gameHeight; r++) { @@ -375,7 +375,7 @@ void saveGameBackBuffer() { } void restoreGameBackBuffer() { -#ifdef DISABLE_SCUMM +#ifndef ENABLE_SCUMM if (savedBuffer) { for (int r = 0; r < gameHeight; r++) { diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp index b5bebddb54..bf4ce7c909 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.cpp +++ b/backends/platform/ds/arm9/source/wordcompletion.cpp @@ -2,7 +2,7 @@ #include "engines/agi/agi.h" #include "osystem_ds.h" -#ifndef DISABLE_AGI +#ifdef ENABLE_AGI namespace DS { // Default dictionary is about 64Kb, so 128Kb should be enough for future expansion diff --git a/backends/platform/gp32/Makefile b/backends/platform/gp32/Makefile index 327bee9d10..f7145bf860 100644 --- a/backends/platform/gp32/Makefile +++ b/backends/platform/gp32/Makefile @@ -153,26 +153,26 @@ HAVE_GCC3 = 1 DISABLE_SCALERS = 1 DISABLE_HQ_SCALERS = 1 -#DISABLE_SCUMM = 1 +ENABLE_SCUMM = STATIC_PLUGIN # We can play The Dig with GP32 -- without any movies/musics/voices. But who would do that? -DISABLE_SCUMM_7_8 = 1 -DISABLE_HE = 1 - -#DISABLE_AGOS = 1 -#DISABLE_SKY = 1 -#DISABLE_QUEEN = 1 -#DISABLE_GOB = 1 -#DISABLE_LURE = 1 -#DISABLE_CINE = 1 -#DISABLE_SAGA = 1 -#DISABLE_KYRA = 1 -#DISABLE_AGI = 1 +#ENABLE_SCUMM_7_8 = 1 +#ENABLE_HE = 1 + +ENABLE_AGOS = STATIC_PLUGIN +ENABLE_SKY = STATIC_PLUGIN +ENABLE_QUEEN = STATIC_PLUGIN +ENABLE_GOB = STATIC_PLUGIN +ENABLE_LURE = STATIC_PLUGIN +ENABLE_CINE = STATIC_PLUGIN +ENABLE_SAGA = STATIC_PLUGIN +ENABLE_KYRA = STATIC_PLUGIN +ENABLE_AGI = STATIC_PLUGIN # The engines below are not supported on the GP32 port so there is # no point compiling support into the binary. -DISABLE_SWORD1 = 1 -DISABLE_SWORD2 = 1 +#ENABLE_SWORD1 = STATIC_PLUGIN +#ENABLE_SWORD2 = STATIC_PLUGIN ####################################################################### # Misc stuff - you should normally never have to edit this # diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile index 51ff9d0a81..734bf82eaa 100644 --- a/backends/platform/wince/Makefile +++ b/backends/platform/wince/Makefile @@ -12,28 +12,29 @@ ######################################################################## ## Do you want a build using plugins? -#BUILD_PLUGINS = 1 +#DYNAMIC_MODULES = 1 +# TODO: You'll need to change STATIC_PLUGIN to DYNAMIC_PLUGIN below ######################################################################## -## Disable whichever engines you want here - -#DISABLE_SCUMM = 1 -#DISABLE_SKY = 1 -#DISABLE_QUEEN = 1 -#DISABLE_GOB = 1 -#DISABLE_LURE = 1 -#DISABLE_CINE = 1 -#DISABLE_SAGA = 1 -#DISABLE_KYRA = 1 -#DISABLE_AGI = 1 -#DISABLE_AGOS = 1 -#DISABLE_SWORD1 = 1 -#DISABLE_SWORD2 = 1 -#DISABLE_TOUCHE = 1 -#DISABLE_PARALLACTION = 1 -DISABLE_CRUISE = 1 -DISABLE_DRASCULA = 1 -DISABLE_IGOR = 1 +## Enable whichever engines you want here + +ENABLE_SCUMM = STATIC_PLUGIN +ENABLE_SKY = STATIC_PLUGIN +ENABLE_QUEEN = STATIC_PLUGIN +ENABLE_GOB = STATIC_PLUGIN +ENABLE_LURE = STATIC_PLUGIN +ENABLE_CINE = STATIC_PLUGIN +ENABLE_SAGA = STATIC_PLUGIN +ENABLE_KYRA = STATIC_PLUGIN +ENABLE_AGI = STATIC_PLUGIN +ENABLE_AGOS = STATIC_PLUGIN +ENABLE_SWORD1 = STATIC_PLUGIN +ENABLE_SWORD2 = STATIC_PLUGIN +ENABLE_TOUCHE = STATIC_PLUGIN +ENABLE_PARALLACTION = STATIC_PLUGIN +#ENABLE_CRUISE = STATIC_PLUGIN +#ENABLE_DRASCULA = STATIC_PLUGIN +#ENABLE_IGOR = STATIC_PLUGIN ######################################################################## ## Pick which libraries you want to use here @@ -174,11 +175,11 @@ OBJS += $(srcdir)/gui/Actions.o $(srcdir)/gui/Key.o $(srcdir)/gui/KeysDialog.o OBJS += ../sdl/sdl.o ../sdl/graphics.o ../sdl/events.o OBJS += missing/missing.o OBJS += ARMscaler.o -ifndef BUILD_PLUGINS +ifndef DYNAMIC_MODULES OBJS += PocketSCUMM.o endif -ifdef BUILD_PLUGINS +ifdef DYNAMIC_MODULES EXECUTABLE = scummvm.dll PLUGIN_PREFIX := PLUGIN_SUFFIX := .dll @@ -194,7 +195,7 @@ include $(srcdir)/Makefile.common ######################################################################## ## Our top level target, and what we deploy depends on whether we are ## building the plugin version or not... -ifdef BUILD_PLUGINS +ifdef DYNAMIC_MODULES all: dist-plugins diff --git a/backends/plugins/dc/dc-provider.cpp b/backends/plugins/dc/dc-provider.cpp index 6ca524150b..1cae4bbd32 100644 --- a/backends/plugins/dc/dc-provider.cpp +++ b/backends/plugins/dc/dc-provider.cpp @@ -27,12 +27,8 @@ #include "backends/plugins/dc/dc-provider.h" #include "backends/plugins/dynamic-plugin.h" -#include "common/fs.h" #include "dcloader.h" -#define PLUGIN_DIRECTORY "/" -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".PLG" class DCPlugin : public DynamicPlugin { @@ -75,6 +71,7 @@ public: return ret; } + void unloadPlugin() { DynamicPlugin::unloadPlugin(); if (_dlHandle) { @@ -86,42 +83,8 @@ public: }; -PluginList DCPluginProvider::getPlugins() { - PluginList pl; - - - // Load dynamic plugins - // TODO... this is right now just a nasty hack. - // This should search one or multiple directories for all plugins it can - // find (to this end, we maybe should use a special prefix/suffix; e.g. - // instead of libscumm.so, use scumm.engine or scumm.plugin etc.). - // - // The list of directories to search could be e.g.: - // User specified (via config file), ".", "./plugins", "$(prefix)/lib". - // - // We also need to add code which ensures what we are looking at is - // a) a ScummVM engine and b) matches the version of the executable. - // Hence one more symbol should be exported by plugins which returns - // the "ABI" version the plugin was built for, and we can compare that - // to the ABI version of the executable. - - // Load all plugins. - // Scan for all plugins in this directory - FilesystemNode dir(PLUGIN_DIRECTORY); - FSList files; - if (!dir.getChildren(files, FilesystemNode::kListFilesOnly)) { - error("Couldn't open plugin directory '%s'", PLUGIN_DIRECTORY); - } - - for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) { - Common::String name(i->getName()); - if (name.hasPrefix(PLUGIN_PREFIX) && name.hasSuffix(PLUGIN_SUFFIX)) { - pl.push_back(new DCPlugin(i->getPath())); - } - } - - - return pl; +Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const { + return new DCPlugin(filename); } diff --git a/backends/plugins/dc/dc-provider.h b/backends/plugins/dc/dc-provider.h index f13bdf0636..1b96f55d4d 100644 --- a/backends/plugins/dc/dc-provider.h +++ b/backends/plugins/dc/dc-provider.h @@ -30,9 +30,16 @@ #if defined(DYNAMIC_MODULES) && defined(__DC__) -class DCPluginProvider : public PluginProvider { -public: - virtual PluginList getPlugins(); +class DCPluginProvider : public FilePluginProvider { +protected: + Plugin* createPlugin(const Common::String &filename) const; + + virtual const char* getPrefix() const { return ""; } + virtual const char* getSuffix() const { return ".PLG"; } + + virtual void addCustomDirectories(Common::StringList &dirs) const { + dirs.push_back("/"); + } }; #endif // defined(DYNAMIC_MODULES) && defined(__DC__) diff --git a/backends/plugins/posix/posix-provider.cpp b/backends/plugins/posix/posix-provider.cpp index a268aa36e1..39847e53bf 100644 --- a/backends/plugins/posix/posix-provider.cpp +++ b/backends/plugins/posix/posix-provider.cpp @@ -27,10 +27,8 @@ #include "backends/plugins/posix/posix-provider.h" #include "backends/plugins/dynamic-plugin.h" -#include "common/fs.h" #include <dlfcn.h> -#define PLUGIN_DIRECTORY "plugins/" class POSIXPlugin : public DynamicPlugin { @@ -68,6 +66,7 @@ public: return DynamicPlugin::loadPlugin(); } + void unloadPlugin() { DynamicPlugin::unloadPlugin(); if (_dlHandle) { @@ -79,42 +78,8 @@ public: }; -PluginList POSIXPluginProvider::getPlugins() { - PluginList pl; - - - // Load dynamic plugins - // TODO... this is right now just a nasty hack. - // This should search one or multiple directories for all plugins it can - // find (to this end, we maybe should use a special prefix/suffix; e.g. - // instead of libscumm.so, use scumm.engine or scumm.plugin etc.). - // - // The list of directories to search could be e.g.: - // User specified (via config file), ".", "./plugins", "$(prefix)/lib". - // - // We also need to add code which ensures what we are looking at is - // a) a ScummVM engine and b) matches the version of the executable. - // Hence one more symbol should be exported by plugins which returns - // the "ABI" version the plugin was built for, and we can compare that - // to the ABI version of the executable. - - // Load all plugins. - // Scan for all plugins in this directory - FilesystemNode dir(PLUGIN_DIRECTORY); - FSList files; - if (!dir.getChildren(files, FilesystemNode::kListFilesOnly)) { - error("Couldn't open plugin directory '%s'", PLUGIN_DIRECTORY); - } - - for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) { - Common::String name(i->getName()); - if (name.hasPrefix(PLUGIN_PREFIX) && name.hasSuffix(PLUGIN_SUFFIX)) { - pl.push_back(new POSIXPlugin(i->getPath())); - } - } - - - return pl; +Plugin* POSIXPluginProvider::createPlugin(const Common::String &filename) const { + return new POSIXPlugin(filename); } diff --git a/backends/plugins/posix/posix-provider.h b/backends/plugins/posix/posix-provider.h index 7a7b780fbe..40c16b3e11 100644 --- a/backends/plugins/posix/posix-provider.h +++ b/backends/plugins/posix/posix-provider.h @@ -30,9 +30,9 @@ #if defined(DYNAMIC_MODULES) && defined(UNIX) -class POSIXPluginProvider : public PluginProvider { -public: - virtual PluginList getPlugins(); +class POSIXPluginProvider : public FilePluginProvider { +protected: + Plugin* createPlugin(const Common::String &filename) const; }; #endif // defined(DYNAMIC_MODULES) && defined(UNIX) diff --git a/backends/plugins/sdl/sdl-provider.cpp b/backends/plugins/sdl/sdl-provider.cpp index 5cdc7223a5..6df1dec680 100644 --- a/backends/plugins/sdl/sdl-provider.cpp +++ b/backends/plugins/sdl/sdl-provider.cpp @@ -27,11 +27,9 @@ #include "backends/plugins/sdl/sdl-provider.h" #include "backends/plugins/dynamic-plugin.h" -#include "common/fs.h" #include "SDL.h" #include "SDL_loadso.h" -#define PLUGIN_DIRECTORY "plugins/" class SDLPlugin : public DynamicPlugin { @@ -69,6 +67,7 @@ public: return DynamicPlugin::loadPlugin(); } + void unloadPlugin() { DynamicPlugin::unloadPlugin(); if (_dlHandle) { @@ -79,43 +78,9 @@ public: }; -PluginList SDLPluginProvider::getPlugins() { - PluginList pl; - - - // Load dynamic plugins - // TODO... this is right now just a nasty hack. - // This should search one or multiple directories for all plugins it can - // find (to this end, we maybe should use a special prefix/suffix; e.g. - // instead of libscumm.so, use scumm.engine or scumm.plugin etc.). - // - // The list of directories to search could be e.g.: - // User specified (via config file), ".", "./plugins", "$(prefix)/lib". - // - // We also need to add code which ensures what we are looking at is - // a) a ScummVM engine and b) matches the version of the executable. - // Hence one more symbol should be exported by plugins which returns - // the "ABI" version the plugin was built for, and we can compare that - // to the ABI version of the executable. - - // Load all plugins. - // Scan for all plugins in this directory - FilesystemNode dir(PLUGIN_DIRECTORY); - FSList files; - if (!dir.getChildren(files, FilesystemNode::kListFilesOnly)) { - error("Couldn't open plugin directory '%s'", PLUGIN_DIRECTORY); - } - - for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) { - Common::String name(i->getName()); - if (name.hasPrefix(PLUGIN_PREFIX) && name.hasSuffix(PLUGIN_SUFFIX)) { - pl.push_back(new SDLPlugin(i->getPath())); - } - } - - - return pl; +Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const { + return new SDLPlugin(filename); } -#endif // defined(DYNAMIC_MODULES) && defined(UNIX) +#endif // defined(DYNAMIC_MODULES) && defined(SDL_BACKEND) diff --git a/backends/plugins/sdl/sdl-provider.h b/backends/plugins/sdl/sdl-provider.h index 7e03a4ec57..a9ec657e33 100644 --- a/backends/plugins/sdl/sdl-provider.h +++ b/backends/plugins/sdl/sdl-provider.h @@ -30,9 +30,9 @@ #if defined(DYNAMIC_MODULES) && defined(SDL_BACKEND) -class SDLPluginProvider : public PluginProvider { -public: - virtual PluginList getPlugins(); +class SDLPluginProvider : public FilePluginProvider { +protected: + Plugin* createPlugin(const Common::String &filename) const; }; #endif // defined(DYNAMIC_MODULES) && defined(UNIX) diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp index 8cb9a762b2..0592638140 100644 --- a/backends/plugins/win32/win32-provider.cpp +++ b/backends/plugins/win32/win32-provider.cpp @@ -27,14 +27,9 @@ #include "backends/plugins/win32/win32-provider.h" #include "backends/plugins/dynamic-plugin.h" -#include "common/fs.h" #include <windows.h> -#define PLUGIN_DIRECTORY "" -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".dll" - class Win32Plugin : public DynamicPlugin { private: @@ -94,6 +89,7 @@ public: return DynamicPlugin::loadPlugin(); } + void unloadPlugin() { DynamicPlugin::unloadPlugin(); if (_dlHandle) { @@ -107,42 +103,8 @@ public: }; -PluginList Win32PluginProvider::getPlugins() { - PluginList pl; - - - // Load dynamic plugins - // TODO... this is right now just a nasty hack. - // This should search one or multiple directories for all plugins it can - // find (to this end, we maybe should use a special prefix/suffix; e.g. - // instead of libscumm.so, use scumm.engine or scumm.plugin etc.). - // - // The list of directories to search could be e.g.: - // User specified (via config file), ".", "./plugins", "$(prefix)/lib". - // - // We also need to add code which ensures what we are looking at is - // a) a ScummVM engine and b) matches the version of the executable. - // Hence one more symbol should be exported by plugins which returns - // the "ABI" version the plugin was built for, and we can compare that - // to the ABI version of the executable. - - // Load all plugins. - // Scan for all plugins in this directory - FilesystemNode dir(PLUGIN_DIRECTORY); - FSList files; - if (!dir.getChildren(files, FilesystemNode::kListFilesOnly)) { - error("Couldn't open plugin directory '%s'", PLUGIN_DIRECTORY); - } - - for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) { - Common::String name(i->getName()); - if (name.hasPrefix(PLUGIN_PREFIX) && name.hasSuffix(PLUGIN_SUFFIX)) { - pl.push_back(new Win32Plugin(i->getPath())); - } - } - - - return pl; +Plugin* Win32PluginProvider::createPlugin(const Common::String &filename) const { + return new Win32Plugin(filename); } diff --git a/backends/plugins/win32/win32-provider.h b/backends/plugins/win32/win32-provider.h index e80e77521d..e4b0be7395 100644 --- a/backends/plugins/win32/win32-provider.h +++ b/backends/plugins/win32/win32-provider.h @@ -30,9 +30,14 @@ #if defined(DYNAMIC_MODULES) && defined(_WIN32) -class Win32PluginProvider : public PluginProvider { -public: - virtual PluginList getPlugins(); +class Win32PluginProvider : public FilePluginProvider { +protected: + Plugin* createPlugin(const Common::String &filename) const; + + virtual const char* getPrefix() const { return ""; } + virtual const char* getSuffix() const { return ".dll"; } + + virtual void addCustomDirectories(Common::StringList &dirs) const {} }; #endif // defined(DYNAMIC_MODULES) && defined(_WIN32) |
