aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorChristopher Page2008-08-10 21:58:18 +0000
committerChristopher Page2008-08-10 21:58:18 +0000
commitfcc00f20b93d719c9f7bce848ed7c3600be982b9 (patch)
tree48b9fd1c842cb376985a91592ef7b062fed0cfa7 /backends
parentce3d1e1a7d9ec9860d3fc42d8127a1634051d950 (diff)
parent9d0b0523cf119fdc400bf477c2f9d6f4f37ddce6 (diff)
downloadscummvm-rg350-fcc00f20b93d719c9f7bce848ed7c3600be982b9.tar.gz
scummvm-rg350-fcc00f20b93d719c9f7bce848ed7c3600be982b9.tar.bz2
scummvm-rg350-fcc00f20b93d719c9f7bce848ed7c3600be982b9.zip
Merged revisions 33719,33721-33723,33725-33727,33729-33730,33733,33736,33742,33754,33756,33758,33761,33763,33766 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk svn-id: r33769
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/wii/Makefile97
-rw-r--r--backends/platform/wii/main.cpp4
-rw-r--r--backends/platform/wii/osystem.cpp6
-rw-r--r--backends/platform/wii/osystem.h4
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp9
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp9
-rw-r--r--backends/platform/wince/Makefile4
7 files changed, 85 insertions, 48 deletions
diff --git a/backends/platform/wii/Makefile b/backends/platform/wii/Makefile
index a52ceb1774..d17a7cb41e 100644
--- a/backends/platform/wii/Makefile
+++ b/backends/platform/wii/Makefile
@@ -1,26 +1,32 @@
+# this enables port specific debug messages and redirects stdout/err over
+# usbgecko in memcard slot b
DEBUG_WII = 1
-ENABLE_SCUMM = 1
-ENABLE_SCUMM_7_8 = 1
-ENABLE_HE = 1
-# ENABLE_AGI = 1
-ENABLE_AGOS = 1
-ENABLE_CINE = 1
-ENABLE_CRUISE = 1
-ENABLE_DRASCULA = 1
-ENABLE_GOB = 1
-ENABLE_IGOR = 1
-ENABLE_KYRA = 1
-ENABLE_LURE = 1
-ENABLE_M4 = 1
-ENABLE_MADE = 1
-ENABLE_PARALLACTION = 1
-ENABLE_QUEEN = 1
-ENABLE_SAGA = 1
-ENABLE_SKY = 1
-ENABLE_SWORD1 = 1
-ENABLE_SWORD2 = 1
-ENABLE_TOUCHE = 1
+# builds a gamecube version. cleanup object files before flipping this
+GAMECUBE = 0
+
+ENABLE_SCUMM = STATIC_PLUGIN
+ENABLE_SCUMM_7_8 = STATIC_PLUGIN
+ENABLE_HE = STATIC_PLUGIN
+# ENABLE_AGI = STATIC_PLUGIN
+ENABLE_AGOS = STATIC_PLUGIN
+ENABLE_CINE = STATIC_PLUGIN
+ENABLE_CRUISE = STATIC_PLUGIN
+ENABLE_DRASCULA = STATIC_PLUGIN
+ENABLE_GOB = STATIC_PLUGIN
+ENABLE_IGOR = STATIC_PLUGIN
+ENABLE_KYRA = STATIC_PLUGIN
+ENABLE_LURE = STATIC_PLUGIN
+ENABLE_M4 = STATIC_PLUGIN
+ENABLE_MADE = STATIC_PLUGIN
+ENABLE_PARALLACTION = STATIC_PLUGIN
+ENABLE_QUEEN = STATIC_PLUGIN
+ENABLE_SAGA = STATIC_PLUGIN
+ENABLE_SKY = STATIC_PLUGIN
+ENABLE_SWORD1 = STATIC_PLUGIN
+ENABLE_SWORD2 = STATIC_PLUGIN
+ENABLE_TINSEL = STATIC_PLUGIN
+ENABLE_TOUCHE = STATIC_PLUGIN
DISABLE_HQ_SCALERS = 1
DISABLE_SCALERS = 1
@@ -30,7 +36,11 @@ USE_MAD = 1
USE_TREMOR = 1
USE_FLAC = 1
USE_MPEG2 = 1
+ifeq ($(GAMECUBE),1)
+USE_MT32EMU = 0
+else
USE_MT32EMU = 1
+endif
srcdir = ../../..
VPATH = $(srcdir)
@@ -54,21 +64,28 @@ MKDIR = mkdir -p
RM = rm -f
CP = cp -f
+ifeq ($(GAMECUBE),1)
+TARGET = scummvm-gc
+MACHDEP = -DGEKKO -DGAMECUBE -mogc -mcpu=750 -meabi -mhard-float \
+ -ffunction-sections -fdata-sections -fmodulo-sched
+LIBDIR = $(DEVKITPRO)/libogc/lib/cube
+LIBS = -lstdc++ -lfat -logc -lm
+else
TARGET = scummvm-wii
-
MACHDEP = -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float \
-ffunction-sections -fdata-sections -fmodulo-sched
+LIBDIR = $(DEVKITPRO)/libogc/lib/wii
+LIBS = -lstdc++ -lfat -lwiiuse -lbte -logc -lm
+endif
INCDIR = $(srcdir) . $(srcdir)/engines/ $(DEVKITPRO)/libogc/include
-LIBDIR = $(DEVKITPRO)/libogc/lib/wii
CXXFLAGS = -g -Os -Wall $(MACHDEP) -D__WII__ -Wno-multichar -Wno-long-long \
- -Wno-unknown-pragmas -Wno-reorder -fno-exceptions -fno-rtti
+ -Wno-unknown-pragmas -Wno-reorder -fno-exceptions -fno-rtti
CXXFLAGS += $(addprefix -I,$(INCDIR))
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(TARGET).elf.map
LDFLAGS += $(addprefix -L,$(LIBDIR))
-LIBS = -lstdc++ -lfat -lwiiuse -lbte -logc -lm
CXXFLAGS += -I$(DEVKITPRO)/3rd/wii/include
LDFLAGS += -L$(DEVKITPRO)/3rd/wii/lib
@@ -137,20 +154,26 @@ distclean: distclean-wii
distclean-wii:
@-$(RM) dist
+ifeq ($(GAMECUBE),1)
upload:
$(DEVKITPPC)/bin/wiiload $(TARGET).dol
+endif
dist:
- $(MKDIR) dist/apps/scummvm
- $(CP) $(TARGET).dol dist/apps/scummvm/boot.dol
- $(CP) $(DISTPATH)/meta.xml dist/apps/scummvm/
- $(CP) $(DISTPATH)/icon.png dist/apps/scummvm/
- $(CP) $(DISTPATH)/READMII dist/apps/scummvm/
- $(CP) $(srcdir)/AUTHORS dist/apps/scummvm/
- $(CP) $(srcdir)/COPYING dist/apps/scummvm/
- $(CP) $(srcdir)/COPYRIGHT dist/apps/scummvm/
- $(CP) $(srcdir)/NEWS dist/apps/scummvm/
- $(CP) $(srcdir)/README dist/apps/scummvm/
- $(CP) $(DIST_FILES_THEMES) dist/apps/scummvm/
- $(CP) $(DIST_FILES_ENGINEDATA) dist/apps/scummvm/
+ $(MKDIR) dist/scummvm
+ifeq ($(GAMECUBE),1)
+ $(CP) $(TARGET).dol dist/scummvm/
+else
+ $(CP) $(TARGET).dol dist/scummvm/boot.dol
+ $(CP) $(DISTPATH)/meta.xml dist/scummvm/
+ $(CP) $(DISTPATH)/icon.png dist/scummvm/
+ $(CP) $(DISTPATH)/READMII dist/scummvm/
+ $(CP) $(srcdir)/AUTHORS dist/scummvm/
+ $(CP) $(srcdir)/COPYING dist/scummvm/
+ $(CP) $(srcdir)/COPYRIGHT dist/scummvm/
+ $(CP) $(srcdir)/NEWS dist/scummvm/
+ $(CP) $(srcdir)/README dist/scummvm/
+ $(CP) $(DIST_FILES_THEMES) dist/scummvm/
+ $(CP) $(DIST_FILES_ENGINEDATA) dist/scummvm/
+endif
diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp
index 5753ecefe4..8bb1bff904 100644
--- a/backends/platform/wii/main.cpp
+++ b/backends/platform/wii/main.cpp
@@ -62,7 +62,9 @@ int main(int argc, char *argv[]) {
printf("startup\n");
SYS_SetResetCallback(reset_cb);
+#ifndef GAMECUBE
SYS_SetPowerCallback(power_cb);
+#endif
if (!fatInitDefault()) {
printf("fatInitDefault failed\n");
@@ -75,7 +77,7 @@ int main(int argc, char *argv[]) {
if (!strcmp(buf, "fat:/"))
chdir("/apps/scummvm");
- //fatEnableReadAhead(PI_DEFAULT, 32, 128);
+ fatEnableReadAhead(PI_DEFAULT, 32, 128);
}
g_system = new OSystem_Wii();
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp
index 9e708345c5..3ec32126f0 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -89,8 +89,12 @@ OSystem_Wii::~OSystem_Wii() {
void OSystem_Wii::initBackend() {
_startup_time = gettime();
+
+ char buf[MAXPATHLEN];
+ if (!getcwd(buf, MAXPATHLEN))
+ strcpy(buf, "/");
- _savefile = new DefaultSaveFileManager();
+ _savefile = new DefaultSaveFileManager(buf);
_mixer = new Audio::MixerImpl(this);
_timer = new DefaultTimerManager();
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 7fbc560b1a..71bf9bce2e 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -22,9 +22,9 @@
#ifndef _WII_OSYSTEM_H_
#define _WII_OSYSTEM_H_
-#include "common/system.h"
#include "base/main.h"
-
+#include "common/system.h"
+#include "common/fs.h"
#include "common/rect.h"
#include "common/events.h"
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index 932599004d..95047ecf5c 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -129,11 +129,13 @@ void CEActionsPocket::initInstanceGame() {
bool is_parallaction = (gameid == "parallaction");
bool is_lure = (gameid == "lure");
bool is_feeble = (gameid == "feeble");
+ bool is_drascula = (strncmp(gameid.c_str(), "drascula",8) == 0);
GUI_Actions::initInstanceGame();
// See if a right click mapping could be needed
- if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche || is_parallaction)
+ if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob ||
+ is_samnmax || is_cine || is_touche || is_parallaction || is_drascula)
_right_click_needed = true;
// See if a "hide toolbar" mapping could be needed
@@ -153,7 +155,7 @@ void CEActionsPocket::initInstanceGame() {
} else if (is_sky) {
_action_enabled[POCKET_ACTION_SAVE] = true;
_key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5);
- } else if (is_cine) {
+ } else if (is_cine || is_drascula) {
_action_enabled[POCKET_ACTION_SAVE] = true;
_key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); // F10
} else if (is_agi) {
@@ -171,7 +173,8 @@ void CEActionsPocket::initInstanceGame() {
// Skip
if (!is_cine && !is_parallaction)
_action_enabled[POCKET_ACTION_SKIP] = true;
- if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche || is_lure || is_feeble)
+ if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob ||
+ is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula)
_key_action[POCKET_ACTION_SKIP].setKey(VK_ESCAPE);
else
_key_action[POCKET_ACTION_SKIP].setKey(KEY_ALL_SKIP);
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index 6877c343e3..dbcddac98c 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -119,11 +119,13 @@ void CEActionsSmartphone::initInstanceGame() {
bool is_parallaction = (gameid == "parallaction");
bool is_lure = (gameid == "lure");
bool is_feeble = (gameid == "feeble");
+ bool is_drascula = (strncmp(gameid.c_str(), "drascula",8) == 0);
GUI_Actions::initInstanceGame();
// See if a right click mapping could be needed
- if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche || is_parallaction)
+ if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob ||
+ is_samnmax || is_cine || is_touche || is_parallaction || is_drascula)
_right_click_needed = true;
// Initialize keys for different actions
@@ -136,7 +138,7 @@ void CEActionsSmartphone::initInstanceGame() {
} else if (is_sky) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
_key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5);
- } else if (is_cine) {
+ } else if (is_cine || is_drascula) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
_key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); //F10
} else if (is_agi) {
@@ -151,7 +153,8 @@ void CEActionsSmartphone::initInstanceGame() {
}
// Skip
_action_enabled[SMARTPHONE_ACTION_SKIP] = true;
- if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche || is_lure || is_feeble)
+ if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob ||
+ is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula)
_key_action[SMARTPHONE_ACTION_SKIP].setKey(VK_ESCAPE);
else
_key_action[SMARTPHONE_ACTION_SKIP].setKey(KEY_ALL_SKIP);
diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile
index 176971067e..4400d50e3a 100644
--- a/backends/platform/wince/Makefile
+++ b/backends/platform/wince/Makefile
@@ -34,9 +34,11 @@ ENABLE_SWORD1 = STATIC_PLUGIN
ENABLE_SWORD2 = STATIC_PLUGIN
ENABLE_TOUCHE = STATIC_PLUGIN
ENABLE_PARALLACTION = STATIC_PLUGIN
+ENABLE_DRASCULA = STATIC_PLUGIN
#ENABLE_CRUISE = STATIC_PLUGIN
-#ENABLE_DRASCULA = STATIC_PLUGIN
#ENABLE_IGOR = STATIC_PLUGIN
+#ENABLE_M4 = STATIC_PLUGIN
+#ENABLE_MADE = STATIC_PLUGIN
########################################################################
## Pick which libraries you want to use here