aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/fs/wii/wii-fs-factory.cpp6
-rw-r--r--backends/fs/wii/wii-fs.cpp44
-rw-r--r--backends/fs/wii/wii-fs.h2
-rw-r--r--backends/platform/wii/main.cpp3
-rw-r--r--backends/platform/wii/osystem_events.cpp2
-rw-r--r--backends/platform/wii/wii.mk4
-rwxr-xr-xconfigure3
-rw-r--r--engines/fullpipe/constants.h22
-rw-r--r--engines/fullpipe/scenes/scene38.cpp4
9 files changed, 62 insertions, 28 deletions
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp
index 760e5316e7..987e7f56bf 100644
--- a/backends/fs/wii/wii-fs-factory.cpp
+++ b/backends/fs/wii/wii-fs-factory.cpp
@@ -125,6 +125,8 @@ bool WiiFilesystemFactory::failedToMount(FileSystemType type) {
return false;
}
+const DISC_INTERFACE* dvd = &__io_wiidvd;
+
void WiiFilesystemFactory::mount(FileSystemType type) {
switch (type) {
case kDVD:
@@ -133,7 +135,7 @@ void WiiFilesystemFactory::mount(FileSystemType type) {
break;
printf("mount dvd\n");
- if (ISO9660_Mount()) {
+ if (ISO9660_Mount("dvd", dvd)) {
_dvdMounted = true;
_dvdError = false;
printf("ISO9660 mounted\n");
@@ -179,7 +181,7 @@ void WiiFilesystemFactory::umount(FileSystemType type) {
printf("umount dvd\n");
- ISO9660_Unmount();
+ ISO9660_Unmount("dvd:");
_dvdMounted = false;
_dvdError = false;
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index 4a19e18240..43f4f592b7 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -80,9 +80,9 @@ void WiiFilesystemNode::clearFlags() {
void WiiFilesystemNode::setFlags(const struct stat *st) {
_exists = true;
- _isDirectory = S_ISDIR(st->st_mode);
- _isReadable = (st->st_mode & S_IRUSR) > 0;
- _isWritable = (st->st_mode & S_IWUSR) > 0;
+ _isDirectory = ( (st->st_mode & S_IFDIR) != 0 );
+ _isReadable = ( (st->st_mode & S_IRUSR) != 0 );
+ _isWritable = ( (st->st_mode & S_IWUSR) != 0 );
}
WiiFilesystemNode::WiiFilesystemNode() {
@@ -106,7 +106,7 @@ WiiFilesystemNode::WiiFilesystemNode(const Common::String &p) {
_displayName = lastPathComponent(_path, '/');
struct stat st;
- if (!stat(_path.c_str(), &st))
+ if(stat(_path.c_str(), &st) != -1)
setFlags(&st);
else
clearFlags();
@@ -152,33 +152,45 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
if (_path.empty())
return getDevopChildren(list, mode, hidden);
- DIR_ITER* dp = diropen (_path.c_str());
+ DIR* dp = opendir (_path.c_str());
+ DIR* tmpdir;
if (dp == NULL)
return false;
- char filename[MAXPATHLEN];
- struct stat st;
+ struct dirent *pent;
- while (dirnext(dp, filename, &st) == 0) {
- if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0)
+ while ((pent = readdir(dp)) != NULL) {
+ if (strcmp(pent->d_name, ".") == 0 || strcmp(pent->d_name, "..") == 0)
continue;
Common::String newPath(_path);
if (newPath.lastChar() != '/')
- newPath += '/';
- newPath += filename;
-
- bool isDir = S_ISDIR(st.st_mode);
-
+ newPath += '/';
+ newPath += pent->d_name;
+
+ bool isDir = false;
+ tmpdir = opendir(newPath.c_str());
+ if(tmpdir)
+ {
+ isDir = true;
+ closedir(tmpdir);
+ }
+
if ((mode == Common::FSNode::kListFilesOnly && isDir) ||
(mode == Common::FSNode::kListDirectoriesOnly && !isDir))
continue;
-
+
+ struct stat st;
+ st.st_mode = 0;
+ st.st_mode |= ( isDir ? S_IFDIR : 0 );
+ st.st_mode |= S_IRUSR;
+ st.st_mode |= S_IWUSR;
+
list.push_back(new WiiFilesystemNode(newPath, &st));
}
- dirclose(dp);
+ closedir(dp);
return true;
}
diff --git a/backends/fs/wii/wii-fs.h b/backends/fs/wii/wii-fs.h
index 11679d0c36..f785101099 100644
--- a/backends/fs/wii/wii-fs.h
+++ b/backends/fs/wii/wii-fs.h
@@ -51,7 +51,7 @@ public:
*
* @param path Common::String with the path the new node should point to.
*/
- WiiFilesystemNode(const Common::String &path);
+ WiiFilesystemNode(const Common::String &p);
WiiFilesystemNode(const Common::String &p, const struct stat *st);
virtual bool exists() const;
diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp
index affe053b6a..ec6231522e 100644
--- a/backends/platform/wii/main.cpp
+++ b/backends/platform/wii/main.cpp
@@ -225,7 +225,8 @@ int main(int argc, char *argv[]) {
printf("shutdown\n");
SYS_UnregisterResetFunc(&resetinfo);
- fatUnmountDefault();
+ fatUnmount("usb:/");
+ fatUnmount("sd:/");
if (res)
show_console(res);
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index 3ba66aed89..aa63c8aa22 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -188,7 +188,7 @@ void OSystem_Wii::initEvents() {
_padAcceleration = 9 - ConfMan.getInt("wii_pad_acceleration");
#ifdef USE_WII_KBD
- _kbd_active = KEYBOARD_Init() >= 0;
+ _kbd_active = KEYBOARD_Init(NULL) >= 0;
#endif
}
diff --git a/backends/platform/wii/wii.mk b/backends/platform/wii/wii.mk
index 7d2db68b4e..99ef46338c 100644
--- a/backends/platform/wii/wii.mk
+++ b/backends/platform/wii/wii.mk
@@ -17,10 +17,10 @@ geckoupload: $(WII_EXE_STRIPPED)
$(DEVKITPPC)/bin/geckoupload $<
wiigdb:
- $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(EXECUTABLE)
+ $(DEVKITPPC)/bin/powerpc-eabi-gdb -n $(EXECUTABLE)
wiidebug:
- $(DEVKITPPC)/bin/powerpc-gekko-gdb -n $(EXECUTABLE) -x $(srcdir)/backends/platform/wii/gdb.txt
+ $(DEVKITPPC)/bin/powerpc-eabi-gdb -n $(EXECUTABLE) -x $(srcdir)/backends/platform/wii/gdb.txt
# target to create a Wii snapshot
wiidist: all
diff --git a/configure b/configure
index d47a460622..ae4e36cfb0 100755
--- a/configure
+++ b/configure
@@ -1428,7 +1428,7 @@ webos)
wii)
_host_os=wii
_host_cpu=ppc
- _host_alias=powerpc-gekko
+ _host_alias=powerpc-eabi
;;
wince)
_host_os=wince
@@ -2707,6 +2707,7 @@ if test -n "$_host"; then
_backend="wii"
_build_scalers=no
_vkeybd=yes
+ _taskbar=no
_port_mk="backends/platform/wii/wii.mk"
add_line_to_config_mk 'GAMECUBE = 0'
add_line_to_config_h '#define AUDIO_REVERSE_STEREO'
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 1d1dbeece8..9e79b1c732 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -1314,14 +1314,36 @@ namespace Fullpipe {
#define MV_DMS_FOUR 3322
#define MV_DMS_THREE 3321
#define MV_GLV_LOOKMAN 2167
+#define ST_BTL38_FULL 3172
+#define ST_DMN38_6 2288
+#define ST_DMN38_NORM3 2251
+#define ST_DMN38_NORM4 2253
#define ST_DMS_3 3319
#define ST_DMS_4 3320
#define ST_GLV_HAMMER 2156
#define ST_GLV_NOHAMMER 2159
+#define ST_GLV_SLEEP2 2166
#define ST_MLS_LEFT2 2291
+#define ST_MLS_RIGHT2 3323
+#define QU_DLD_BLINK 2216
#define QU_DLD_DENY 2218
+#define QU_DLD_GLOT 2217
+#define QU_DLD_ICK 2219
+#define QU_DLD_TAKE1 2214
+#define QU_DLD_TAKE2 2215
+#define QU_GLV_DRINK 2210
+#define QU_GLV_DRINKBOTTLE 2286
+#define QU_GLV_DRINK_NOHMR 2211
+#define QU_GLV_HMRKICK 2207
+#define QU_GLV_PROPOSE 2280
+#define QU_GLV_PROPOSE_NOHMR 2281
+#define QU_GLV_TAKEDOMINO 2170
+#define QU_GLV_TAKEDOMINO_NOHMR 3182
#define QU_GLV_TOSMALL 2208
#define QU_GLV_TOSMALL_NOHMR 2209
+#define QU_MLS_BLINK 2222
+#define QU_MLS_HAND 2223
+#define QU_MLS_TURNL 2220
#define QU_MLS_TURNR 2221
#define QU_SC38_SHOWBOTTLE 2199
#define QU_SC38_SHOWBOTTLE_ONTABLE 2838
diff --git a/engines/fullpipe/scenes/scene38.cpp b/engines/fullpipe/scenes/scene38.cpp
index 22ae370391..e6f9f6fa8c 100644
--- a/engines/fullpipe/scenes/scene38.cpp
+++ b/engines/fullpipe/scenes/scene38.cpp
@@ -163,9 +163,6 @@ void sceneHandler38_drink() {
}
void sceneHandler38_animateAlcoholics() {
- warning("STUB: sceneHandler38_animateAlcoholics()");
-
-#if 0
MessageQueue *mq;
if (g_vars->scene38_boss->_movement || !(g_vars->scene38_boss->_flags & 4) || (g_vars->scene38_boss->_flags & 2)) {
@@ -323,7 +320,6 @@ void sceneHandler38_animateAlcoholics() {
g_vars->scene38_var11 = 0;
}
-#endif
}
int sceneHandler38(ExCommand *cmd) {