diff options
Diffstat (limited to 'backends/platform/wii')
-rw-r--r-- | backends/platform/wii/main.cpp | 8 | ||||
-rw-r--r-- | backends/platform/wii/options.cpp | 2 | ||||
-rw-r--r-- | backends/platform/wii/options.h | 2 | ||||
-rw-r--r-- | backends/platform/wii/osystem.cpp | 7 | ||||
-rw-r--r-- | backends/platform/wii/osystem.h | 7 | ||||
-rw-r--r-- | backends/platform/wii/osystem_events.cpp | 147 | ||||
-rw-r--r-- | backends/platform/wii/osystem_gfx.cpp | 20 | ||||
-rw-r--r-- | backends/platform/wii/osystem_sfx.cpp | 5 | ||||
-rw-r--r-- | backends/platform/wii/wii.mk | 5 |
9 files changed, 104 insertions, 99 deletions
diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp index affe053b6a..35d800a527 100644 --- a/backends/platform/wii/main.cpp +++ b/backends/platform/wii/main.cpp @@ -8,15 +8,16 @@ * 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. + * */ #define FORBIDDEN_SYMBOL_EXCEPTION_chdir @@ -225,7 +226,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/options.cpp b/backends/platform/wii/options.cpp index ede81343ca..731e979ec0 100644 --- a/backends/platform/wii/options.cpp +++ b/backends/platform/wii/options.cpp @@ -16,7 +16,7 @@ * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ diff --git a/backends/platform/wii/options.h b/backends/platform/wii/options.h index 9b500ef29f..1fa4acd50e 100644 --- a/backends/platform/wii/options.h +++ b/backends/platform/wii/options.h @@ -16,7 +16,7 @@ * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 22a6495f8f..ab2f2c6f0f 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -8,15 +8,16 @@ * 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. + * */ #define FORBIDDEN_SYMBOL_ALLOW_ALL @@ -203,7 +204,7 @@ bool OSystem_Wii::getFeatureState(Feature f) { } } -uint32 OSystem_Wii::getMillis() { +uint32 OSystem_Wii::getMillis(bool skipRecord) { return ticks_to_millisecs(diff_ticks(_startup_time, gettime())); } diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index 5d6998d0b6..f1591614bf 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -8,15 +8,16 @@ * 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 _WII_OSYSTEM_H_ @@ -193,7 +194,7 @@ public: const Graphics::PixelFormat *format); virtual bool pollEvent(Common::Event &event); - virtual uint32 getMillis(); + virtual uint32 getMillis(bool skipRecord = false); virtual void delayMillis(uint msecs); virtual MutexRef createMutex(); diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp index 3ba66aed89..13f5d1fbe0 100644 --- a/backends/platform/wii/osystem_events.cpp +++ b/backends/platform/wii/osystem_events.cpp @@ -8,15 +8,16 @@ * 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. + * */ #define FORBIDDEN_SYMBOL_EXCEPTION_printf @@ -69,73 +70,73 @@ #endif #ifdef USE_WII_KBD -static int keymap[][2] = { - { KS_Return, Common::KEYCODE_RETURN }, - { KS_Up, Common::KEYCODE_UP }, - { KS_Down, Common::KEYCODE_DOWN }, - { KS_Left, Common::KEYCODE_LEFT }, - { KS_Right, Common::KEYCODE_RIGHT }, - { KS_Shift_L, Common::KEYCODE_LSHIFT }, - { KS_Shift_R, Common::KEYCODE_RSHIFT }, - { KS_Control_L, Common::KEYCODE_LCTRL }, - { KS_Control_R, Common::KEYCODE_RCTRL }, - { KS_Alt_L, Common::KEYCODE_LALT }, - { KS_Alt_R, Common::KEYCODE_RALT }, - { KS_Meta_L, Common::KEYCODE_LMETA }, - { KS_Meta_R, Common::KEYCODE_RMETA }, - { KS_KP_0, Common::KEYCODE_KP0 }, - { KS_KP_1, Common::KEYCODE_KP1 }, - { KS_KP_2, Common::KEYCODE_KP2 }, - { KS_KP_3, Common::KEYCODE_KP3 }, - { KS_KP_4, Common::KEYCODE_KP4 }, - { KS_KP_5, Common::KEYCODE_KP5 }, - { KS_KP_6, Common::KEYCODE_KP6 }, - { KS_KP_7, Common::KEYCODE_KP7 }, - { KS_KP_8, Common::KEYCODE_KP8 }, - { KS_KP_9, Common::KEYCODE_KP9 }, - { KS_Home, Common::KEYCODE_HOME }, - { KS_Insert, Common::KEYCODE_INSERT }, - { KS_End, Common::KEYCODE_END }, - { KS_Prior, Common::KEYCODE_PAGEUP }, - { KS_Next, Common::KEYCODE_PAGEDOWN }, - { KS_f1, Common::KEYCODE_F1 }, - { KS_f2, Common::KEYCODE_F2 }, - { KS_f3, Common::KEYCODE_F3 }, - { KS_f4, Common::KEYCODE_F4 }, - { KS_f5, Common::KEYCODE_F5 }, - { KS_f6, Common::KEYCODE_F6 }, - { KS_f7, Common::KEYCODE_F7 }, - { KS_f8, Common::KEYCODE_F8 }, - { KS_f9, Common::KEYCODE_F9 }, - { KS_f10, Common::KEYCODE_F10 }, - { KS_f11, Common::KEYCODE_F11 }, - { KS_f12, Common::KEYCODE_F12 }, - { KS_f13, Common::KEYCODE_F13 }, - { KS_f14, Common::KEYCODE_F14 }, - { KS_f15, Common::KEYCODE_F15 }, - { KS_F1, Common::KEYCODE_F1 }, - { KS_F2, Common::KEYCODE_F2 }, - { KS_F3, Common::KEYCODE_F3 }, - { KS_F4, Common::KEYCODE_F4 }, - { KS_F5, Common::KEYCODE_F5 }, - { KS_F6, Common::KEYCODE_F6 }, - { KS_F7, Common::KEYCODE_F7 }, - { KS_F8, Common::KEYCODE_F8 }, - { KS_F9, Common::KEYCODE_F9 }, - { KS_F10, Common::KEYCODE_F10 }, - { KS_F11, Common::KEYCODE_F11 }, - { KS_F12, Common::KEYCODE_F12 }, - { KS_F13, Common::KEYCODE_F13 }, - { KS_F14, Common::KEYCODE_F14 }, - { KS_F15, Common::KEYCODE_F15 }, - { KS_KP_Separator, Common::KEYCODE_KP_PERIOD }, - { KS_KP_Subtract, Common::KEYCODE_KP_DIVIDE }, - { KS_KP_Multiply, Common::KEYCODE_KP_MULTIPLY }, - { KS_KP_Add, Common::KEYCODE_KP_PLUS }, - { KS_KP_Subtract, Common::KEYCODE_KP_MINUS }, - { KS_KP_Equal, Common::KEYCODE_KP_EQUALS }, - { KS_KP_Enter, Common::KEYCODE_KP_ENTER }, - { 0, 0 } +static int keymap[][3] = { + { KS_Return, Common::KEYCODE_RETURN, Common::ASCII_RETURN }, + { KS_Up, Common::KEYCODE_UP, 0 }, + { KS_Down, Common::KEYCODE_DOWN, 0 }, + { KS_Left, Common::KEYCODE_LEFT, 0 }, + { KS_Right, Common::KEYCODE_RIGHT, 0 }, + { KS_Shift_L, Common::KEYCODE_LSHIFT, 0 }, + { KS_Shift_R, Common::KEYCODE_RSHIFT, 0 }, + { KS_Control_L, Common::KEYCODE_LCTRL, 0 }, + { KS_Control_R, Common::KEYCODE_RCTRL, 0 }, + { KS_Alt_L, Common::KEYCODE_LALT, 0 }, + { KS_Alt_R, Common::KEYCODE_RALT, 0 }, + { KS_Meta_L, Common::KEYCODE_LMETA, 0 }, + { KS_Meta_R, Common::KEYCODE_RMETA, 0 }, + { KS_KP_0, Common::KEYCODE_KP0, '0' }, + { KS_KP_1, Common::KEYCODE_KP1, '1' }, + { KS_KP_2, Common::KEYCODE_KP2, '2' }, + { KS_KP_3, Common::KEYCODE_KP3, '3' }, + { KS_KP_4, Common::KEYCODE_KP4, '4' }, + { KS_KP_5, Common::KEYCODE_KP5, '5' }, + { KS_KP_6, Common::KEYCODE_KP6, '6' }, + { KS_KP_7, Common::KEYCODE_KP7, '7' }, + { KS_KP_8, Common::KEYCODE_KP8, '8' }, + { KS_KP_9, Common::KEYCODE_KP9, '9' }, + { KS_Home, Common::KEYCODE_HOME, 0 }, + { KS_Insert, Common::KEYCODE_INSERT, 0 }, + { KS_End, Common::KEYCODE_END, 0 }, + { KS_Prior, Common::KEYCODE_PAGEUP, 0 }, + { KS_Next, Common::KEYCODE_PAGEDOWN, 0 }, + { KS_f1, Common::KEYCODE_F1, Common::ASCII_F1 }, + { KS_f2, Common::KEYCODE_F2, Common::ASCII_F2 }, + { KS_f3, Common::KEYCODE_F3, Common::ASCII_F3 }, + { KS_f4, Common::KEYCODE_F4, Common::ASCII_F4 }, + { KS_f5, Common::KEYCODE_F5, Common::ASCII_F5 }, + { KS_f6, Common::KEYCODE_F6, Common::ASCII_F6 }, + { KS_f7, Common::KEYCODE_F7, Common::ASCII_F7 }, + { KS_f8, Common::KEYCODE_F8, Common::ASCII_F8 }, + { KS_f9, Common::KEYCODE_F9, Common::ASCII_F9 }, + { KS_f10, Common::KEYCODE_F10, Common::ASCII_F10 }, + { KS_f11, Common::KEYCODE_F11, Common::ASCII_F11 }, + { KS_f12, Common::KEYCODE_F12, Common::ASCII_F12 }, + { KS_f13, Common::KEYCODE_F13, 0 }, + { KS_f14, Common::KEYCODE_F14, 0 }, + { KS_f15, Common::KEYCODE_F15, 0 }, + { KS_F1, Common::KEYCODE_F1, Common::ASCII_F1 }, + { KS_F2, Common::KEYCODE_F2, Common::ASCII_F2 }, + { KS_F3, Common::KEYCODE_F3, Common::ASCII_F3 }, + { KS_F4, Common::KEYCODE_F4, Common::ASCII_F4 }, + { KS_F5, Common::KEYCODE_F5, Common::ASCII_F5 }, + { KS_F6, Common::KEYCODE_F6, Common::ASCII_F6 }, + { KS_F7, Common::KEYCODE_F7, Common::ASCII_F7 }, + { KS_F8, Common::KEYCODE_F8, Common::ASCII_F8 }, + { KS_F9, Common::KEYCODE_F9, Common::ASCII_F9 }, + { KS_F10, Common::KEYCODE_F10, Common::ASCII_F10 }, + { KS_F11, Common::KEYCODE_F11, Common::ASCII_F11 }, + { KS_F12, Common::KEYCODE_F12, Common::ASCII_F12 }, + { KS_F13, Common::KEYCODE_F13, 0 }, + { KS_F14, Common::KEYCODE_F14, 0 }, + { KS_F15, Common::KEYCODE_F15, 0 }, + { KS_KP_Separator, Common::KEYCODE_KP_PERIOD, '.' }, + { KS_KP_Divide, Common::KEYCODE_KP_DIVIDE, '/' }, + { KS_KP_Multiply, Common::KEYCODE_KP_MULTIPLY, '*' }, + { KS_KP_Add, Common::KEYCODE_KP_PLUS, '+' }, + { KS_KP_Subtract, Common::KEYCODE_KP_MINUS, '-' }, + { KS_KP_Equal, Common::KEYCODE_KP_EQUALS, '=' }, + { KS_KP_Enter, Common::KEYCODE_KP_ENTER, Common::ASCII_RETURN }, + { 0, 0, 0 } }; #endif @@ -188,7 +189,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 } @@ -261,7 +262,7 @@ bool OSystem_Wii::pollKeyboard(Common::Event &event) { while (keymap[i][0] != 0) { if (keymap[i][0] == kbdEvent.symbol) { event.kbd.keycode = static_cast<Common::KeyCode>(keymap[i][1]); - event.kbd.ascii = 0; + event.kbd.ascii = keymap[i][2]; return true; } @@ -356,8 +357,8 @@ bool OSystem_Wii::pollEvent(Common::Event &event) { PAD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.', flags); PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, flags); PAD_EVENT(PADS_UP, Common::KEYCODE_LSHIFT, 0, flags); - PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, flags); - //PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, 0); + PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, Common::KBD_CTRL); + //PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, Common::KBD_CTRL); if ((bd | bu) & (PADS_A | PADS_B)) { if (bd & PADS_A) diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index a9bcdbb8d1..bb91242f98 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -8,15 +8,16 @@ * 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. + * */ #define FORBIDDEN_SYMBOL_EXCEPTION_printf @@ -528,16 +529,13 @@ void OSystem_Wii::updateScreen() { } Graphics::Surface *OSystem_Wii::lockScreen() { - _surface.pixels = _gamePixels; - _surface.w = _gameWidth; - _surface.h = _gameHeight; + _surface.init(_gameWidth, _gameHeight, #ifdef USE_RGB_COLOR - _surface.pitch = _gameWidth * _pfGame.bytesPerPixel; - _surface.format = _pfGame; + _gameWidth * _pfGame.bytesPerPixel, _gamePixels, _pfGame #else - _surface.pitch = _gameWidth; - _surface.format = Graphics::PixelFormat::createFormatCLUT8(); + _gameWidth, _gamePixels, Graphics::PixelFormat::createFormatCLUT8() #endif + ); return &_surface; } @@ -719,8 +717,8 @@ void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, u16 *d = (u16 *) tmp; for (u16 y = 0; y < h; ++y) { for (u16 x = 0; x < w; ++x) { - if (*s++ != _mouseKeyColor) - *d++ |= 7 << 12; + if (*s++ == _mouseKeyColor) + *d++ &= ~(7 << 12); else d++; } diff --git a/backends/platform/wii/osystem_sfx.cpp b/backends/platform/wii/osystem_sfx.cpp index 2e658e47aa..70a440a600 100644 --- a/backends/platform/wii/osystem_sfx.cpp +++ b/backends/platform/wii/osystem_sfx.cpp @@ -8,15 +8,16 @@ * 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. + * */ #define FORBIDDEN_SYMBOL_EXCEPTION_printf diff --git a/backends/platform/wii/wii.mk b/backends/platform/wii/wii.mk index 7d2db68b4e..62a8900d9a 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 @@ -43,6 +43,7 @@ ifneq ($(DIST_FILES_ENGINEDATA),) $(CP) $(DIST_FILES_ENGINEDATA) wiidist/scummvm/ endif $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip wiidist/scummvm/ + $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip wiidist/scummvm/ wiiloaddist: wiidist cd wiidist && zip -9r scummvm.zip scummvm/ |