aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wii
diff options
context:
space:
mode:
authorVicent Marti2008-08-16 00:08:12 +0000
committerVicent Marti2008-08-16 00:08:12 +0000
commit146be8e16b0abd43f87274a305d9d65b594d1d7f (patch)
tree8c019cf6c35345de29946d681102cd036876b425 /backends/platform/wii
parent2ae7dc0e32342a0b770bc67883f9b5b77967cb71 (diff)
parentf2111eeb45dc8c41afb3e63bf3b86a09bf9a3532 (diff)
downloadscummvm-rg350-146be8e16b0abd43f87274a305d9d65b594d1d7f.tar.gz
scummvm-rg350-146be8e16b0abd43f87274a305d9d65b594d1d7f.tar.bz2
scummvm-rg350-146be8e16b0abd43f87274a305d9d65b594d1d7f.zip
Merged revisions 33490,33492,33495-33496,33509-33512,33518-33519,33522-33527,33529-33530,33537,33541,33544,33546,33550,33552-33554,33556,33558,33561-33562,33565,33568,33570,33574,33576,33578-33581,33584-33587,33590,33596,33604-33611,33614-33615,33617-33618,33620-33621,33623,33626-33627,33632-33633,33635,33637,33639-33640,33642-33645,33648,33654-33655,33664,33667-33670,33673-33674,33678,33682,33686-33691,33693,33696,33698,33700,33703,33708,33710,33712-33714,33716,33719,33721-33723,33725-33727,33729-33730,33733,33736,33742,33754,33756,33758,33761,33763,33766,33777,33781-33788,33790,33792-33793,33795,33797,33805,33807-33812,33815-33817,33819,33822,33826,33829,33837,33839,33844,33847,33858-33861,33864,33871-33873,33875,33877-33879,33886,33889-33892,33894,33896,33900,33902-33903,33919 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r33490 | thebluegr | 2008-08-01 16:03:20 +0200 (Fri, 01 Aug 2008) | 2 lines Added load confirmation dialog for IHNM, like in the original. Fixes bug #1971699 - "IHNM: No Load Game Confirmation" ........ r33492 | thebluegr | 2008-08-01 16:27:40 +0200 (Fri, 01 Aug 2008) | 1 line Fixed crash on exit from commit #32742 - the memory leak was only in IHNM, not ITE (in ITE, the 4 sprite lists are actually one) ........ r33495 | fingolfin | 2008-08-01 18:31:40 +0200 (Fri, 01 Aug 2008) | 1 line Print a warning if unsupported XMIDI controllers are used ........ r33496 | fingolfin | 2008-08-01 18:33:22 +0200 (Fri, 01 Aug 2008) | 1 line Moved Ludde & yaz0r to a new credits section, retired project leaders ........ r33509 | peres001 | 2008-08-02 04:24:36 +0200 (Sat, 02 Aug 2008) | 2 lines * Added a preprocessor to deal with the crappy location scripts in BRA. * Added some comments on how the parser and related code should be changed to make things smoother. ........ r33510 | peres001 | 2008-08-02 04:26:09 +0200 (Sat, 02 Aug 2008) | 1 line Removed debug code I forgot a long time ago ;) ........ r33511 | peres001 | 2008-08-02 04:43:05 +0200 (Sat, 02 Aug 2008) | 1 line Fixed issues detected by DrMcCoy's obnoxious compiler. ;) ........ r33512 | peres001 | 2008-08-02 05:19:45 +0200 (Sat, 02 Aug 2008) | 2 lines * Increasing max number of allowed token on one line. * Increasing buffer size to match old parser. ........ r33518 | lordhoto | 2008-08-02 13:40:09 +0200 (Sat, 02 Aug 2008) | 2 lines Fix for bug #2035459 "KYRA1: long savegame names cause garbage". ........ r33519 | lordhoto | 2008-08-02 13:57:06 +0200 (Sat, 02 Aug 2008) | 2 lines Proper fix for bug #2035459 "KYRA1: long savegame names cause garbage". ........ r33522 | lordhoto | 2008-08-02 16:32:05 +0200 (Sat, 02 Aug 2008) | 2 lines Fixed regressions in kyra1 amiga. ........ r33523 | athrxx | 2008-08-02 16:35:38 +0200 (Sat, 02 Aug 2008) | 1 line HOF: bug fix for FM-Towns music when using output rates other than 22050 khz ........ r33524 | lordhoto | 2008-08-02 16:35:43 +0200 (Sat, 02 Aug 2008) | 2 lines Add warning when a voc file is not found. ........ r33525 | Kirben | 2008-08-02 16:37:10 +0200 (Sat, 02 Aug 2008) | 1 line Detect both HOF non-interactive demos. ........ r33526 | lordhoto | 2008-08-02 16:42:44 +0200 (Sat, 02 Aug 2008) | 2 lines Fixed yet another crash in kyra1 amiga. ........ r33527 | lordhoto | 2008-08-02 17:05:19 +0200 (Sat, 02 Aug 2008) | 2 lines Added a member function loadSoundFile to Sound which accepts a filename string instead of a filename list id. ........ r33529 | buddha_ | 2008-08-02 17:47:25 +0200 (Sat, 02 Aug 2008) | 7 lines - Combined loadAbs and loadResource into one function. - Made resource loading functions (loadSpl, loadMsk etc) return the number of the animDataTable entry right after the loaded data. - Made resource loading functions always load multiframe data into directly sequential animDataTable entries (Hopefully this won't break anything). ........ r33530 | buddha_ | 2008-08-02 17:59:38 +0200 (Sat, 02 Aug 2008) | 3 lines Made loadResourcesFromSave internally use the loadResource-function. Fixes Operation Stealth savegame loading! HURRAH! FINALLY! ........ r33537 | sev | 2008-08-02 23:05:46 +0200 (Sat, 02 Aug 2008) | 2 lines Fix crash when drascula.dat file is missing ........ r33541 | sev | 2008-08-02 23:22:05 +0200 (Sat, 02 Aug 2008) | 2 lines Fix bug #2007170: "DRASCULA: No Spaces in SaveGames Names" ........ r33544 | sev | 2008-08-02 23:36:08 +0200 (Sat, 02 Aug 2008) | 2 lines Fix bug #2023727: "MONKEY2: Misplaced Text" ........ r33546 | sev | 2008-08-02 23:57:35 +0200 (Sat, 02 Aug 2008) | 2 lines Fix bug #1879606: "MANIACNES: Crash when game ends" ........ r33550 | fingolfin | 2008-08-03 00:32:32 +0200 (Sun, 03 Aug 2008) | 1 line Fix for bug #1972625 'ALL: On-the-fly targets are written to the config file' ........ r33552 | sev | 2008-08-03 00:51:53 +0200 (Sun, 03 Aug 2008) | 3 lines Fix for bug #1945335: "SCUMM: Invalid charset id can be stored". Regressions possible. ........ r33553 | fingolfin | 2008-08-03 01:01:14 +0200 (Sun, 03 Aug 2008) | 1 line Renamed Tinsel v1->v0 (used in the demo only), and v2->v1, to avoid confusion with DW2 ........ r33554 | sev | 2008-08-03 01:05:38 +0200 (Sun, 03 Aug 2008) | 2 lines Fix bug #2035390: "GUI: setting game id to "scummvm" messes up list" ........ r33556 | athrxx | 2008-08-03 01:11:31 +0200 (Sun, 03 Aug 2008) | 1 line add non-interactive lol demo ........ r33558 | eriktorbjorn | 2008-08-03 09:40:04 +0200 (Sun, 03 Aug 2008) | 3 lines Fixed #2021902 ("DRASCULA: Can't adjust the volume inside the game"). I can't verify that this matches the original behaviour, but at least it's better now. ........ r33561 | buddha_ | 2008-08-03 10:01:11 +0200 (Sun, 03 Aug 2008) | 1 line Shut up MSVC warning about mgY being an unreferenced local variable. ........ r33562 | fingolfin | 2008-08-03 10:05:19 +0200 (Sun, 03 Aug 2008) | 1 line Proper fix for bug #2035390: Check for ConfigManager::kApplicationDomain, and also forbid targets starting with an underscore ........ r33565 | eriktorbjorn | 2008-08-03 11:41:10 +0200 (Sun, 03 Aug 2008) | 4 lines Fixed bug that prevented upper-case letters from being used in savegame names. Apparently, strchr(..., 0) will find the string terminator - at least for me - and when that's added to the name, it will terminate the string. ........ r33568 | eriktorbjorn | 2008-08-03 11:51:13 +0200 (Sun, 03 Aug 2008) | 2 lines Fixed bug #1995022 ("BASS: wrong displayed 2 line text"). ........ r33570 | eriktorbjorn | 2008-08-03 12:16:17 +0200 (Sun, 03 Aug 2008) | 5 lines Fixed bug #1995033 ("BASS: BG Sound stopped on opening item list"). Apparently the sound is supposed to be paused and then unpaused, but the pause function is called many more times than the unpause function. In the original, this presumably didn't matter. In ScummVM's mixer, it does. ........ r33574 | sev | 2008-08-03 13:42:05 +0200 (Sun, 03 Aug 2008) | 2 lines Fix bug #2017432: "DRASCULA: Typing is slow when you save a game" ........ r33576 | sev | 2008-08-03 14:02:09 +0200 (Sun, 03 Aug 2008) | 2 lines Fix bug #2011470: "DRASCULA: slowdown when you hold mouse buttons" ........ r33578 | athrxx | 2008-08-03 14:09:48 +0200 (Sun, 03 Aug 2008) | 1 line add support for HOF Italian fan translation to kyra.dat ........ r33579 | lordhoto | 2008-08-03 14:16:53 +0200 (Sun, 03 Aug 2008) | 2 lines Added detection entries for kyra2 cd italian fan translation (see fr#2003504 "KYRA: add support for Italian version of Kyrandia 2&3"). (totally untested!) ........ r33580 | athrxx | 2008-08-03 14:50:56 +0200 (Sun, 03 Aug 2008) | 1 line fix last commit (invalid kyra.dat game features for HOFCD) ........ r33581 | lordhoto | 2008-08-03 14:53:12 +0200 (Sun, 03 Aug 2008) | 2 lines Removed comment. ........ r33584 | fingolfin | 2008-08-03 18:54:18 +0200 (Sun, 03 Aug 2008) | 1 line New OSystem API for loading/storing default config file ........ r33585 | fingolfin | 2008-08-03 19:05:01 +0200 (Sun, 03 Aug 2008) | 1 line OSYSTEM: Pushed some SDL/Symbian specific code to the respective backends; made openConfigFileForReading/openConfigFileForWriting return 0 if they failed to open a file ........ r33586 | fingolfin | 2008-08-03 20:11:27 +0200 (Sun, 03 Aug 2008) | 1 line Implemented DumpFile::open(FSNode) ........ r33587 | fingolfin | 2008-08-03 20:29:37 +0200 (Sun, 03 Aug 2008) | 1 line cleanup ........ r33590 | fingolfin | 2008-08-03 20:35:51 +0200 (Sun, 03 Aug 2008) | 1 line FilesystemNode code: some comment cleanup; added FilesystemNode::openForReading() and openForWriting() methods (for now these are simple wrappers around Common::File) ........ r33596 | Kirben | 2008-08-04 03:57:50 +0200 (Mon, 04 Aug 2008) | 1 line Remove debug left over. ........ r33604 | fingolfin | 2008-08-04 13:30:47 +0200 (Mon, 04 Aug 2008) | 1 line Moved the OutSaveFile::finalize method to WriteStream; implemented DumpFile::flush() ........ r33605 | fingolfin | 2008-08-04 13:32:42 +0200 (Mon, 04 Aug 2008) | 1 line Removed join_paths from default save manager, and use FSNode API instead (may lead to regressions, watch out) ........ r33606 | fingolfin | 2008-08-04 13:38:25 +0200 (Mon, 04 Aug 2008) | 1 line Turned InSaveFile & OutSaveFile into simple typedefs ........ r33607 | fingolfin | 2008-08-04 13:46:52 +0200 (Mon, 04 Aug 2008) | 1 line SCUMM: Only try to load savefile metadata from slots >= 0 ........ r33608 | fingolfin | 2008-08-04 13:48:33 +0200 (Mon, 04 Aug 2008) | 1 line DefaultSaveFileManager: Killed class StdioSaveFile, used FilesystemNode::openForReading()/openForWriting() instead (may cause regressions, watch out) ........ r33609 | fingolfin | 2008-08-04 15:25:30 +0200 (Mon, 04 Aug 2008) | 1 line Modified DumpFile::open to accept non-existing nodes, and to actually open files in write mode -- d'oh ........ r33610 | thebluegr | 2008-08-04 17:01:41 +0200 (Mon, 04 Aug 2008) | 1 line Fixing compilation under MSVC ........ r33611 | thebluegr | 2008-08-04 17:23:08 +0200 (Mon, 04 Aug 2008) | 1 line Added Italian translation for the load confirmation window in IHNM ........ r33614 | fingolfin | 2008-08-04 19:17:37 +0200 (Mon, 04 Aug 2008) | 1 line Moved ConfMan.registerDefault calls for savepath to DefaultSaveFileManager (eventually, should be pushed into backends/platform/ code) ........ r33615 | fingolfin | 2008-08-04 19:41:07 +0200 (Mon, 04 Aug 2008) | 1 line Modified DefaultSaveFileManager::checkPath to perform at least basic checks on non-UNIX, non-Symbian systems ........ r33617 | fingolfin | 2008-08-04 19:46:22 +0200 (Mon, 04 Aug 2008) | 1 line Remove some code which was rendered obsolete by md5's commit r33610 ........ r33618 | anotherguest | 2008-08-04 20:14:17 +0200 (Mon, 04 Aug 2008) | 3 lines List the correct engines in about, updated actions with Lure (from WinCE). Increased min heap size to 5MB ........ r33620 | buddha_ | 2008-08-04 21:32:52 +0200 (Mon, 04 Aug 2008) | 7 lines Fix for misplaced objects in mouse object selection (Operation Stealth specific). - Implemented Operation Stealth specific part of getObjectUnderCursor which handles negative frame values. - Fixed a test case (Should test for ydif <= 0 although tested for ydif < 0). - Made part-value be anded with 0x0F in a test case to comply with disassembly. - Added comment about a test case which isn't present in the disassembly. Removing it makes things crash sometimes so letting it be. ........ r33621 | fingolfin | 2008-08-04 21:38:28 +0200 (Mon, 04 Aug 2008) | 1 line Pushed some port specific code from DefaultSaveFileManager out to port specific code in backends/platform/ ........ r33623 | anotherguest | 2008-08-04 22:00:56 +0200 (Mon, 04 Aug 2008) | 1 line Symbian build package should now contain drascula.dat also ........ r33626 | Kirben | 2008-08-05 02:21:46 +0200 (Tue, 05 Aug 2008) | 1 line Fix win32 compile. ........ r33627 | Kirben | 2008-08-05 02:27:25 +0200 (Tue, 05 Aug 2008) | 1 line Removed unneeded #includes. ........ r33632 | lordhoto | 2008-08-05 13:32:16 +0200 (Tue, 05 Aug 2008) | 2 lines Changed implementation parameters/return values to match definition. ........ r33633 | Kirben | 2008-08-05 13:42:04 +0200 (Tue, 05 Aug 2008) | 1 line Remove file attribute check, since getChild() can be called on file path that doesn'r exist. ........ r33635 | lordhoto | 2008-08-05 14:13:01 +0200 (Tue, 05 Aug 2008) | 2 lines Output errors on (some) missing files. ........ r33637 | buddha_ | 2008-08-05 14:58:23 +0200 (Tue, 05 Aug 2008) | 7 lines Fix prompt updating regression introduced in r32257: Previously prompt didn't get updated all the time, like e.g. when selecting EXAMINE and moving the cursor over to DOOR and then moving the cursor to a place where there was no selectable object. The prompt would've still shown "EXAMINE DOOR", now it shows just "EXAMINE" which is correct AFAIK. ........ r33639 | fingolfin | 2008-08-05 15:08:07 +0200 (Tue, 05 Aug 2008) | 1 line SCUMM: Don't try to load metadata for slot -1 (i.e. don't try to load metadata if nothing is selected) ........ r33640 | fingolfin | 2008-08-05 15:11:22 +0200 (Tue, 05 Aug 2008) | 1 line SCUMM: cleanup SaveLoadChooser::updateInfos code ........ r33642 | buddha_ | 2008-08-05 20:17:55 +0200 (Tue, 05 Aug 2008) | 1 line Add detection entry for a previously unrecognized 16 color PC version of Operation Stealth (The John Glames variant). ........ r33643 | buddha_ | 2008-08-05 21:30:16 +0200 (Tue, 05 Aug 2008) | 5 lines Made rest of resource loading functions used in loadResource return -1 on error. This fixed a crash in Operation Stealth when walking out of the airport (Some file couldn't be opened and the game crashed because of that. Now it doesn't crash but handles the missing file gracefully). ........ r33644 | buddha_ | 2008-08-05 23:20:11 +0200 (Tue, 05 Aug 2008) | 1 line Workaround for missing player character animation when exiting the airport in Santa Paragua in at least the 256 color PC version of Operation Stealth. ........ r33645 | fingolfin | 2008-08-05 23:26:04 +0200 (Tue, 05 Aug 2008) | 1 line Patch #2014663: Do not mark stack as executable in HQx scaler ........ r33648 | eriktorbjorn | 2008-08-05 23:43:10 +0200 (Tue, 05 Aug 2008) | 4 lines Committed my patch #2026097 ("ALSA: Try both 65:0 and 17:0 by default"), with a slight modification to the README changes. (I don't know how to interpret all the output from aconnect, so I'm only documenting "the most important bit".) ........ r33654 | fingolfin | 2008-08-06 11:13:57 +0200 (Wed, 06 Aug 2008) | 1 line SCUMM: Renamed inventoryScript -> inventoryScriptIndy3Mac ........ r33655 | fingolfin | 2008-08-06 12:32:20 +0200 (Wed, 06 Aug 2008) | 1 line Workaround for bug #2016521 (DOTT: Bernard impersonating LaVerne) ........ r33664 | fingolfin | 2008-08-06 18:03:06 +0200 (Wed, 06 Aug 2008) | 1 line Do not query savestates which obviously do not exist (to shut up bogus console warnings) ........ r33667 | buddha_ | 2008-08-06 22:41:53 +0200 (Wed, 06 Aug 2008) | 5 lines HACK: Force oxygen to maximum during Operation Stealth's first arcade sequence. This way the arcade sequence is completable now. This hack should be removed later and the first arcade sequence be made properly playable! ........ r33668 | buddha_ | 2008-08-06 22:47:59 +0200 (Wed, 06 Aug 2008) | 5 lines Add 320x200 screen bounds checking to Operation Stealth's checkCollision function. Fixes teleporting bug when getting out of the water after first arcade sequence. The player previously got teleported to the beach near the hotel. Now it doesn't happen. The player is still caught motionless and can't move after this fix though... ........ r33669 | buddha_ | 2008-08-06 22:54:38 +0200 (Wed, 06 Aug 2008) | 1 line Renamed page3Raw to collisionPage so it's more apparent what it does. ........ r33670 | buddha_ | 2008-08-06 22:58:02 +0200 (Wed, 06 Aug 2008) | 1 line Tiny comment update to loadCt-opcodes: Load collision table data. ........ r33673 | buddha_ | 2008-08-07 01:12:25 +0200 (Thu, 07 Aug 2008) | 4 lines HACK: In Operation Stealth after the first arcade sequence jump player's position to avoid getting stuck. The player's position is changed only by *one* pixel but it helps and makes it possible to carry on with the game (Previously the player was totally stuck). ........ r33674 | knakos | 2008-08-07 11:10:42 +0200 (Thu, 07 Aug 2008) | 1 line smartphone-specific code not needed anymore ........ r33678 | eriktorbjorn | 2008-08-07 15:36:02 +0200 (Thu, 07 Aug 2008) | 3 lines Initialise the _sound object. Otherwise, ScummVM crashes for me if I use a native MIDI driver instead of Adlib. ........ r33682 | knakos | 2008-08-07 20:36:12 +0200 (Thu, 07 Aug 2008) | 1 line setup interface for later kyra games ........ r33686 | buddha_ | 2008-08-07 21:04:19 +0200 (Thu, 07 Aug 2008) | 7 lines Fix for popup boxes sometimes blocking animation when they shouldn't in Operation Stealth: - Made waitForPlayerClick updating more like in the original. - Moved removeMessages to after the frame drawing in main loop hoping to be more like the original. - Added an additional test to Operation Stealth's implementation of overlay type 2 drawing. - Added an additional parameter incrementing and testing to Operation Stealth's removeMessages. Hopefully this won't cause any regressions in Future Wars! ........ r33687 | buddha_ | 2008-08-07 21:31:12 +0200 (Thu, 07 Aug 2008) | 1 line Made drawPlainBox handle border cases so it won't corrupt memory so easily. This may help with some memory corruption issues when for an example trying to draw the player's command string out of screen. ........ r33688 | buddha_ | 2008-08-07 21:46:06 +0200 (Thu, 07 Aug 2008) | 1 line Added precautionary tests to background scrolling function in Operation Stealth to avoid possible memory corruptions. ........ r33689 | buddha_ | 2008-08-07 23:46:56 +0200 (Thu, 07 Aug 2008) | 1 line Implemented game speed changing by pressing - or + to e.g. ease testing. ........ r33690 | cyx | 2008-08-07 23:49:55 +0200 (Thu, 07 Aug 2008) | 1 line fix for bug #2040311: TOUCHE: Missing characters in the spanish version ........ r33691 | cyx | 2008-08-07 23:50:12 +0200 (Thu, 07 Aug 2008) | 1 line fix for bug #2040484: TOUCHE: Graphic glitch with long answer options ........ r33693 | Kirben | 2008-08-08 04:18:17 +0200 (Fri, 08 Aug 2008) | 1 line Hopefully allow quiting at any stage AGOS engines games again. ........ r33696 | Kirben | 2008-08-08 04:49:51 +0200 (Fri, 08 Aug 2008) | 1 line Remove debug leftover. ........ r33698 | buddha_ | 2008-08-08 15:30:01 +0200 (Fri, 08 Aug 2008) | 9 lines Added basic moving using keyboard (Only works in Operation Stealth at the moment): - Should make it possible to complete the first arcade sequence legitimately Renamed input variables (Their names were mixed up between Future Wars and Operation Stealth): - Future Wars's inputVar1 -> egoMovedWithKeyboard - Future Wars's inputVar2 -> xMoveKeyb - Future Wars's inputVar3 -> yMoveKeyb - Operation Stealth's inputVar0 -> xMoveKeyb - Operation Stealth's inputVar1 -> yMoveKeyb ........ r33700 | buddha_ | 2008-08-08 16:46:19 +0200 (Fri, 08 Aug 2008) | 1 line Partially fix Adlib volume setting in Cine (Now uses music volume for Adlib volume, previously always played with full volume. Doesn't differentiate between playing sound effects and music!). ........ r33703 | buddha_ | 2008-08-08 20:28:13 +0200 (Fri, 08 Aug 2008) | 4 lines Added detection entry for the Sony published CD version of Future Wars. Also added decrypting of the crypted AUTO00.PRC for this particular version. Now this version should work but no CD audio support for it yet though. ........ r33708 | buddha_ | 2008-08-09 12:44:12 +0200 (Sat, 09 Aug 2008) | 1 line Small cleanup: Renamed rol to rolByte and made it handle all cases. ........ r33710 | buddha_ | 2008-08-09 12:52:48 +0200 (Sat, 09 Aug 2008) | 1 line Removing moving with keys qweasdzxc for now because they messed with savegame name typing. One can move with the cursor keys anyway. ........ r33712 | buddha_ | 2008-08-09 17:17:32 +0200 (Sat, 09 Aug 2008) | 1 line Added updating of global variable var5 to Operation Stealth's renderOverlay function's type 20 overlay case (Previously var5 wasn't updated anywhere!). Also added a lower bound for var5's value into a comparison (Previously only the upper bound was tested for). ........ r33713 | buddha_ | 2008-08-09 18:07:08 +0200 (Sat, 09 Aug 2008) | 1 line Added preliminary version of drawing type 22 overlays (Such overlays are added with opcode 0xA4 (o2_loadMask22) and removed with opcode 0xA5 (o2_unloadMask22)). Things might be wrong so needs testing! WIP! ........ r33714 | knakos | 2008-08-09 20:09:24 +0200 (Sat, 09 Aug 2008) | 1 line fix MR on ce: allocate large buffer on the heap instead and of the stack, and improve the workaround ........ r33716 | knakos | 2008-08-09 20:12:43 +0200 (Sat, 09 Aug 2008) | 1 line hotfix around drascula mem leak problems. see also bug report ........ r33719 | dhewg | 2008-08-09 20:37:18 +0200 (Sat, 09 Aug 2008) | 1 line Updates to the recent OSystem API changes ........ r33721 | buddha_ | 2008-08-09 21:47:05 +0200 (Sat, 09 Aug 2008) | 7 lines Made drawPlainBox's effective width and height always at least one. - Makes oxygen gauge during first arcade sequence visible as it gave drawPlainBox a height of zero. Made type 21 overlays be drawn as type 22 (Filled rectangle). - For an example the oxygen gauge during the first arcade sequence is a type 21 overlay. Flipped type 21 & 22 overlays as it looks correct for the oxygen gauge. These features are quite WIP, they need testing to see if they're correct. ........ r33722 | buddha_ | 2008-08-09 21:57:46 +0200 (Sat, 09 Aug 2008) | 1 line Made type 21 & 22 overlays not be flipped (The oxygen gauge looks actually better when it reaches zero this way although in its fully charged state it still does look a bit off. Disassembly seems to agree with not flipping the overlays so I'm going with this one for now). ........ r33723 | dhewg | 2008-08-09 22:02:56 +0200 (Sat, 09 Aug 2008) | 3 lines Updated the Makefile to the new build system. Introduced a Makefile variable to build a gamecube version. ........ r33725 | buddha_ | 2008-08-09 22:50:10 +0200 (Sat, 09 Aug 2008) | 1 line Converted objectTable from a plain array to a Common::Array. Should help to catch out of bounds access errors that may cause memory corruption. ........ r33726 | buddha_ | 2008-08-09 22:55:01 +0200 (Sat, 09 Aug 2008) | 1 line Converted animDataTable from a plain array to a Common::Array. Should help to catch out of bounds access errors which may cause memory corruption. ........ r33727 | buddha_ | 2008-08-10 00:38:03 +0200 (Sun, 10 Aug 2008) | 1 line Converted zoneData and zoneQuery tables from plain array types to Common::Array. Should help catch out of bounds access errors that may cause memory corruption. ........ r33729 | fingolfin | 2008-08-10 00:42:03 +0200 (Sun, 10 Aug 2008) | 1 line If no default config file is present, just don't load it, instead of crashing ........ r33730 | fingolfin | 2008-08-10 01:07:32 +0200 (Sun, 10 Aug 2008) | 1 line Use FSNode API in default OSystem::openConfigFileForReading & OSystem::openConfigFileForWriting method implementations ........ r33733 | lordhoto | 2008-08-10 02:17:56 +0200 (Sun, 10 Aug 2008) | 2 lines Fixed crash in KyraEngine_HoF::pauseEngineIntern. ........ r33736 | lordhoto | 2008-08-10 02:36:46 +0200 (Sun, 10 Aug 2008) | 2 lines Fixed kyra to support properly support restarting of engine (for GSoC RTL, based on a patch from Chris Page). ........ r33742 | lordhoto | 2008-08-10 03:28:00 +0200 (Sun, 10 Aug 2008) | 2 lines Added fallback to text only mode when voice files are not found. ........ r33754 | knakos | 2008-08-10 19:10:09 +0200 (Sun, 10 Aug 2008) | 1 line add support for drascula engine ........ r33756 | knakos | 2008-08-10 19:13:24 +0200 (Sun, 10 Aug 2008) | 1 line hint the backend to show the VK ........ r33758 | knakos | 2008-08-10 19:15:30 +0200 (Sun, 10 Aug 2008) | 1 line address the ignored events and bad inventory screen handling 'features' ........ r33761 | sev | 2008-08-10 19:35:42 +0200 (Sun, 10 Aug 2008) | 2 lines Add checksums for ScummVM repacked Italian and Spanish versions. ........ r33763 | eriktorbjorn | 2008-08-10 19:59:42 +0200 (Sun, 10 Aug 2008) | 5 lines Committed my patch #2040074 ("XMIDI callback control events"). At the moment, I'm not aware of any game that actually uses this XMIDI feature, so its primary function right now is to silence lots of warnings while running the DOS version of Simon the Sorcerer 2. ........ r33766 | eriktorbjorn | 2008-08-10 20:44:00 +0200 (Sun, 10 Aug 2008) | 5 lines Fixed a bunch of Valgrind warnings (mostly uninitialised variables, but also an invalid free()), so that I can start and quit the game without any unexpected warnings. (The obvious next step, of course, would be to actually *play* the game for a bit...) ........ r33777 | athrxx | 2008-08-11 16:47:50 +0200 (Mon, 11 Aug 2008) | 2 lines LOL: add support for floppy installer files (startup will fail nonethelesse since we have different pak file names) ........ r33781 | buddha_ | 2008-08-11 22:09:03 +0200 (Mon, 11 Aug 2008) | 1 line Changed readBundleFile to unpack data in-place and added debugging messages to the function. ........ r33782 | buddha_ | 2008-08-11 22:18:33 +0200 (Mon, 11 Aug 2008) | 1 line Added a safeguard to readBundleFile so it shouldn't corrupt memory even if the input says the data's unpacked size is less than its packed size (This shouldn't ever happen with non-corrupted data). ........ r33783 | buddha_ | 2008-08-11 22:41:13 +0200 (Mon, 11 Aug 2008) | 1 line Changed partBuffer from a pointer to a Common::Array. Removed numElementInPart variable as it's now equivalent with partBuffer.size(). ........ r33784 | buddha_ | 2008-08-11 23:26:41 +0200 (Mon, 11 Aug 2008) | 1 line Removed textDataPtr pointer as it's not used beyond the loadTextData function. Reworked loadTextData a bit so there are no two loops for the same thing (Also renamed some of the local variables). ........ r33785 | buddha_ | 2008-08-11 23:45:47 +0200 (Mon, 11 Aug 2008) | 1 line Changed palPtr from a pointer to a Common::Array named palArray. Removed palEntriesCount variable as it's now equivalent to palArray.size(). ........ r33786 | buddha_ | 2008-08-12 00:26:25 +0200 (Tue, 12 Aug 2008) | 1 line Moved fontParamTable inside TextHandler struct and made it a constant size as that's what it is (No need for using malloc & free anymore). Previously we would've tried to free an array that wasn't heap-allocated in freePoldatDat (Freeing fontParamTable_standard or fontParamTable_alt), that's fixed. ........ r33787 | dhewg | 2008-08-12 00:43:00 +0200 (Tue, 12 Aug 2008) | 7 lines video mode polishing: * proper fullscreen video mode * multiple graphic modes with different overscan values * "fullscreen mode" stretches the picture on 16:9 displays * fixed broken sword 1/2 gfx garbage * support for setShakePos() ........ r33788 | dhewg | 2008-08-12 00:44:29 +0200 (Tue, 12 Aug 2008) | 1 line build a wii binary per default ........ r33790 | buddha_ | 2008-08-12 01:01:32 +0200 (Tue, 12 Aug 2008) | 1 line Implemented drawMessage changes for Operation Stealth's timed cutscenes (Negative colors are used for timed text boxes that are totally transparent, only the text is drawn). ........ r33792 | buddha_ | 2008-08-12 01:20:10 +0200 (Tue, 12 Aug 2008) | 1 line Made Operation Stealth's action failure messages use a background color set by the opcode 0x49 'o1_setDefaultMenuBgColor'. Should fix the 'text hard to read' problems. ........ r33793 | buddha_ | 2008-08-12 02:13:27 +0200 (Tue, 12 Aug 2008) | 1 line Changed commandBuffer from a char[80] to Common::String and made FWRenderer::setCommand use a Common::String. Hopefully this might help with the command buffer overflow stuff, although this isn't a fix for the problem behind it, just a bandaid. ........ r33795 | buddha_ | 2008-08-12 16:44:44 +0200 (Tue, 12 Aug 2008) | 1 line Implemented Operation Stealth specific parts of processInventory and added another mouse button waiting loop into the function's end (It's in both Future Wars and Operation Stealth). Fixes inventory showing in Operation Stealth. ........ r33797 | aquadran | 2008-08-12 16:52:44 +0200 (Tue, 12 Aug 2008) | 1 line added few ignores for build dirs ........ r33805 | buddha_ | 2008-08-12 21:33:17 +0200 (Tue, 12 Aug 2008) | 1 line Implemented Operation Stealth's makeCommandLine. ........ r33807 | buddha_ | 2008-08-12 22:27:49 +0200 (Tue, 12 Aug 2008) | 1 line Tiny comment fix. ........ r33808 | buddha_ | 2008-08-12 22:58:26 +0200 (Tue, 12 Aug 2008) | 1 line Fix for GCC warning in OSRenderer::renderOverlay: declaration of 'len' shadows a previous local. ........ r33809 | joostp | 2008-08-12 23:23:40 +0200 (Tue, 12 Aug 2008) | 2 lines fix typo 'baclup' -> 'backup' ........ r33810 | buddha_ | 2008-08-13 00:45:38 +0200 (Wed, 13 Aug 2008) | 1 line Added possibility to get the read resource's size from readBundleFile. Made loadMsg handle input data that has empty strings residing just beyond the input buffer (Thanks Valgrind :-)). ........ r33811 | buddha_ | 2008-08-13 01:44:39 +0200 (Wed, 13 Aug 2008) | 1 line Fixed drawPlainBox's boundary checking (It wrote outside the screen occasionally). Now using the Common::Rect for clipping, yay! It's good. ........ r33812 | buddha_ | 2008-08-13 01:56:13 +0200 (Wed, 13 Aug 2008) | 1 line Hopefully fixes 'Conditional jump or move depends on uninitialised value(s)' Valgrind warning at sound.cpp:611. ........ r33815 | buddha_ | 2008-08-13 03:02:00 +0200 (Wed, 13 Aug 2008) | 1 line Changed Agi::SoundMgr's sound buffer to a member array of size BUFFER_SIZE. Also added initialization of _playing to false in SoundMgr's constructor. Hopefully helps with the occasional crashes in the sound code when starting the first sound in an AGI game. ........ r33816 | buddha_ | 2008-08-13 03:10:03 +0200 (Wed, 13 Aug 2008) | 1 line Shutting up Valgrind about using uninitialised values from array _chn in function stopNote. ........ r33817 | fingolfin | 2008-08-13 12:13:22 +0200 (Wed, 13 Aug 2008) | 1 line Clarify SCUMM MD5 message: We do not want reports on fanmade translations ........ r33819 | buddha_ | 2008-08-13 13:36:45 +0200 (Wed, 13 Aug 2008) | 1 line Reverted r33815 (But not r33816). ........ r33822 | buddha_ | 2008-08-13 13:57:48 +0200 (Wed, 13 Aug 2008) | 1 line Fixed initialization of some SoundMgr-class's member variables. Moved _sndBuffer's allocation to SoundMgr's constructor and its deallocation to the destructor. Made fillAudio SoundMgr's method and removed a superfluous global static variable 'int16 *buffer'. Should help with the occasional crashes when starting the first sound in an AGI game. ........ r33826 | buddha_ | 2008-08-13 15:40:28 +0200 (Wed, 13 Aug 2008) | 1 line Type 21 overlay comment update (Found the drawing routine in the disassembly and checked the original for how the oxygen gauge during the first arcade sequence looks like. They're some kind of sprites most likely and not just simply filled rectangles). ........ r33829 | knakos | 2008-08-13 17:16:38 +0200 (Wed, 13 Aug 2008) | 1 line fix bug #2038992 by saving and restoring channel volumes ........ r33837 | lordhoto | 2008-08-13 21:10:31 +0200 (Wed, 13 Aug 2008) | 2 lines Added detection entries for kyra3 Mac. ........ r33839 | knakos | 2008-08-13 21:13:53 +0200 (Wed, 13 Aug 2008) | 1 line fix bug #1910057: FT multifunction ........ r33844 | knakos | 2008-08-13 21:32:25 +0200 (Wed, 13 Aug 2008) | 1 line fix a small bug in the quit dialog ........ r33847 | fingolfin | 2008-08-13 22:37:54 +0200 (Wed, 13 Aug 2008) | 1 line cleanup ........ r33858 | peres001 | 2008-08-14 09:10:42 +0200 (Thu, 14 Aug 2008) | 1 line Removed cross-references between the general parser and the text formatter. To achieve this, I have rewritten the latter for both NS and BRA. ........ r33859 | peres001 | 2008-08-14 09:14:34 +0200 (Thu, 14 Aug 2008) | 1 line Finally moved parseNextToken to Script, where it belongs! ........ r33860 | peres001 | 2008-08-14 12:04:43 +0200 (Thu, 14 Aug 2008) | 1 line Cleanup. ........ r33861 | peres001 | 2008-08-14 12:24:39 +0200 (Thu, 14 Aug 2008) | 1 line More cleanup. ........ r33864 | peres001 | 2008-08-14 15:45:32 +0200 (Thu, 14 Aug 2008) | 1 line Some variable renamed to make more sense. ........ r33871 | buddha_ | 2008-08-14 22:18:13 +0200 (Thu, 14 Aug 2008) | 1 line Added debug showing of the collision page when pressing the Alt key. Alt isn't used for anything else so one might as well use it for this. ........ r33872 | buddha_ | 2008-08-14 22:49:34 +0200 (Thu, 14 Aug 2008) | 1 line Fix for bugging moving at the bottom of the ocean when trying to free the girl from the ropes and swimming to the surface. Some global variables related to mouse position weren't being updated in executePlayerInput, now they are and things seem to work. Also enables moving in the labyrinth arcade sequence at the palace. ........ r33873 | athrxx | 2008-08-14 23:21:04 +0200 (Thu, 14 Aug 2008) | 1 line - HOF: another Italian fan translation ........ r33875 | athrxx | 2008-08-14 23:34:29 +0200 (Thu, 14 Aug 2008) | 1 line - HOF: forgot french and german entries in last commit ........ r33877 | buddha_ | 2008-08-15 00:01:56 +0200 (Fri, 15 Aug 2008) | 1 line Moved showing of the collision page from Alt-key to F11-key because Alt conflicted with taking screenshots using Alt-s. Great. Hopefully F11 doesn't conflict with anything useful. ........ r33878 | lordhoto | 2008-08-15 00:09:36 +0200 (Fri, 15 Aug 2008) | 2 lines Improved version of my resource loading patch from -devel (check also r33876). ........ r33879 | lordhoto | 2008-08-15 00:11:56 +0200 (Fri, 15 Aug 2008) | 2 lines Formatting. ........ r33886 | athrxx | 2008-08-15 01:46:37 +0200 (Fri, 15 Aug 2008) | 1 line lol: new detection entry (german floppy extracted) ........ r33889 | peres001 | 2008-08-15 04:52:42 +0200 (Fri, 15 Aug 2008) | 2 lines Simplified handling of script variables (especially locals). ........ r33890 | peres001 | 2008-08-15 05:36:01 +0200 (Fri, 15 Aug 2008) | 1 line Disabled lip syncing code in BRA, since I couldn't find any scripts actually using it. Some warnings have been added as a sentinel. ........ r33891 | peres001 | 2008-08-15 05:59:45 +0200 (Fri, 15 Aug 2008) | 1 line Made scripts access Animation fields via accessors and mutators, instead of using raw pointers. ........ r33892 | peres001 | 2008-08-15 06:30:45 +0200 (Fri, 15 Aug 2008) | 1 line Made coordinates and frame number protected into Zone and Animation, and changed client code to use get/set. This will allow various simplifications (e.g. when calculating Z), and is a step towards correct handling of interactive zones of Zone/Animation in BRA. ........ r33894 | peres001 | 2008-08-15 10:44:41 +0200 (Fri, 15 Aug 2008) | 1 line Updated layer calculation: animations are now hidden properly by background elements (but not items yet). ........ r33896 | drmccoy | 2008-08-15 12:47:42 +0200 (Fri, 15 Aug 2008) | 2 lines Fixing a segfault in the Bargon Attack menu ........ r33900 | peres001 | 2008-08-15 16:25:43 +0200 (Fri, 15 Aug 2008) | 1 line Added routines to load and handle item masks: animation are now correctly hidden when they are behind any object. The masks of items that are not explicitly activated (even if visible) still are handled (e.g. the crown in the museum is not visible in the foreground). ........ r33902 | anotherguest | 2008-08-15 16:38:25 +0200 (Fri, 15 Aug 2008) | 2 lines UpdUpdated actions and Readme for Symbian OS port! ........ r33903 | peres001 | 2008-08-15 17:08:08 +0200 (Fri, 15 Aug 2008) | 1 line Implemented raster operation for masks and postponed blitting of zones after everything in the location has been loaded. This fixes the remaining problems with animations not being masked by items. ........ r33919 | fingolfin | 2008-08-16 00:06:15 +0200 (Sat, 16 Aug 2008) | 1 line SCUMM: Made some potentially ambiguous (to the reader, at least) checks slightly less ambiguous ........ svn-id: r33920
Diffstat (limited to 'backends/platform/wii')
-rw-r--r--backends/platform/wii/Makefile99
-rw-r--r--backends/platform/wii/gx_supp.cpp47
-rw-r--r--backends/platform/wii/gx_supp.h7
-rw-r--r--backends/platform/wii/main.cpp4
-rw-r--r--backends/platform/wii/osystem.cpp34
-rw-r--r--backends/platform/wii/osystem.h7
-rw-r--r--backends/platform/wii/osystem_gfx.cpp75
7 files changed, 199 insertions, 74 deletions
diff --git a/backends/platform/wii/Makefile b/backends/platform/wii/Makefile
index a52ceb1774..90ebcccb66 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
@@ -138,19 +155,27 @@ distclean-wii:
@-$(RM) dist
upload:
+ifeq ($(GAMECUBE),1)
+ $(DEVKITPPC)/bin/geckoupload $(TARGET).dol
+else
$(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/
+endif
+ $(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/
diff --git a/backends/platform/wii/gx_supp.cpp b/backends/platform/wii/gx_supp.cpp
index 4c7b8ed58a..436deddbb8 100644
--- a/backends/platform/wii/gx_supp.cpp
+++ b/backends/platform/wii/gx_supp.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
* Generic GX Support for Emulators
* softdev 2007
+* dhewg 2008
*
* 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
@@ -21,12 +22,13 @@
* These are pretty standard functions to setup and use GX scaling.
****************************************************************************/
-#include <gccore.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
+#include "gx_supp.h"
+
#define DEFAULT_FIFO_SIZE (256 * 1024)
#define HASPECT 320
@@ -39,18 +41,19 @@ extern "C" {
/*** 2D ***/
static u32 whichfb;
static u32 *xfb[2];
-static GXRModeObj *vmode;
+GXRModeObj *vmode = NULL;
/*** 3D GX ***/
static u8 *gp_fifo;
/*** Texture memory ***/
-static u8 *texturemem;
+static u8 *texturemem = NULL;
static u32 texturesize;
-GXTexObj texobj;
+static GXTexObj texobj;
static Mtx view;
static u16 vwidth, vheight, oldvwidth, oldvheight;
+static float tex_xT = 0.0f, tex_yT = 0.0f;
/* New texture based scaler */
typedef struct tagcamera {
@@ -74,6 +77,10 @@ static camera cam = {
void GX_InitVideo() {
vmode = VIDEO_GetPreferredMode(NULL);
+
+ vmode->viWidth = 678;
+ vmode->viXOrigin = (VI_MAX_WIDTH_PAL - 678) / 2;
+
VIDEO_Configure(vmode);
xfb[0] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer(vmode));
@@ -93,6 +100,15 @@ void GX_InitVideo() {
VIDEO_WaitVSync();
}
+void GX_SetTexTrans(float xT, float yT) {
+ tex_xT = xT;
+ tex_yT = yT;
+}
+
+void GX_SetCamPosZ(float f) {
+ cam.pos.z = f;
+}
+
/****************************************************************************
* Scaler Support Functions
****************************************************************************/
@@ -128,7 +144,7 @@ static void draw_square(Mtx v) {
Mtx mv;
guMtxIdentity(m);
- guMtxTransApply(m, m, 0, 0, -100);
+ guMtxTransApply(m, m, tex_xT, tex_yT, -100);
guMtxConcat(v, m, mv);
GX_LoadPosMtxImm(mv, GX_PNMTX0);
@@ -144,9 +160,9 @@ static void draw_square(Mtx v) {
* StartGX
****************************************************************************/
void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect) {
+ static bool inited = false;
Mtx p;
-
- GX_AbortFrame();
+ GXColor gxbackground = { 0, 0, 0, 0xff };
/*** Set new aspect ***/
square[0] = square[9] = -haspect;
@@ -156,9 +172,20 @@ void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect) {
/*** Allocate 32byte aligned texture memory ***/
texturesize = (width * height) * 2;
+
+ if (texturemem)
+ free(texturemem);
+
texturemem = (u8 *) memalign(32, texturesize);
+ memset(texturemem, 0, texturesize);
- GXColor gxbackground = { 0, 0, 0, 0xff };
+ /*** Setup for first call to scaler ***/
+ oldvwidth = oldvheight = -1;
+
+ if (inited)
+ return;
+
+ inited = true;
/*** Clear out FIFO area ***/
memset(gp_fifo, 0, DEFAULT_FIFO_SIZE);
@@ -184,12 +211,8 @@ void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect) {
guPerspective(p, 60, 1.33f, 10.0f, 1000.0f);
GX_LoadProjectionMtx(p, GX_PERSPECTIVE);
- memset(texturemem, 0, texturesize);
GX_Flush();
-
- /*** Setup for first call to scaler ***/
- vwidth = vheight = -1;
}
/****************************************************************************
diff --git a/backends/platform/wii/gx_supp.h b/backends/platform/wii/gx_supp.h
index 9393e93a26..108a94f0e7 100644
--- a/backends/platform/wii/gx_supp.h
+++ b/backends/platform/wii/gx_supp.h
@@ -1,6 +1,7 @@
/****************************************************************************
* Generic GX Scaler
* softdev 2007
+* dhewg 2008
*
* 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
@@ -23,11 +24,17 @@
#ifndef _WII_GX_SUPP_H_
#define _WII_GX_SUPP_H_
+#include <gccore.h>
+
#ifdef __cplusplus
extern "C" {
#endif
+extern GXRModeObj *vmode;
+
void GX_InitVideo();
+void GX_SetTexTrans(float xT, float yT);
+void GX_SetCamPosZ(float f);
void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect);
void GX_Render(u16 width, u16 height, u8 *buffer, u16 pitch);
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..505f93c820 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -19,8 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "osystem.h"
#include "backends/fs/wii/wii-fs-factory.h"
+#include "common/config-manager.h"
+
+#include "osystem.h"
#include <unistd.h>
@@ -51,7 +53,9 @@ OSystem_Wii::OSystem_Wii() :
_currentHeight(0),
_supportedGraphicsModes(NULL),
- _activeGraphicsMode(-1),
+ _activeGraphicsMode(0),
+
+ _fullscreen(false),
_mouseVisible(false),
_mouseX(0),
@@ -89,11 +93,17 @@ 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();
+ _fullscreen = ConfMan.getBool("fullscreen");
+
initGfx();
initSfx();
initEvents();
@@ -108,14 +118,28 @@ void OSystem_Wii::quit() {
}
bool OSystem_Wii::hasFeature(Feature f) {
- return f == kFeatureCursorHasPalette;
+ return (f == kFeatureFullscreenMode) ||
+ (f == kFeatureCursorHasPalette);
}
void OSystem_Wii::setFeatureState(Feature f, bool enable) {
+ switch (f) {
+ case kFeatureFullscreenMode:
+ _fullscreen = enable;
+ setGraphicsMode(_activeGraphicsMode);
+ break;
+ default:
+ break;
+ }
}
bool OSystem_Wii::getFeatureState(Feature f) {
- return false;
+ switch (f) {
+ case kFeatureFullscreenMode:
+ return _fullscreen;
+ default:
+ return false;
+ }
}
uint32 OSystem_Wii::getMillis() {
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 7fbc560b1a..94c0fa76b3 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"
@@ -73,6 +73,8 @@ private:
OSystem::GraphicsMode *_supportedGraphicsModes;
s32 _activeGraphicsMode;
+ bool _fullscreen;
+
bool _mouseVisible;
s32 _mouseX, _mouseY;
u32 _mouseWidth, _mouseHeight;
@@ -110,7 +112,6 @@ public:
virtual bool getFeatureState(Feature f);
virtual const GraphicsMode *getSupportedGraphicsModes() const;
virtual int getDefaultGraphicsMode() const;
- bool setGraphicsMode(const char *name);
virtual bool setGraphicsMode(int mode);
virtual int getGraphicsMode() const;
virtual void initSize(uint width, uint height);
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 1e54233c93..faad41d5f0 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -27,7 +27,12 @@
#define MAX_FPS 30
enum GraphicModeID {
- GM_DEFAULT
+ GM_DEFAULT = 0,
+ GM_OVERSCAN1,
+ GM_OVERSCAN2,
+ GM_OVERSCAN3,
+ GM_OVERSCAN4,
+ GM_OVERSCAN5
};
void OSystem_Wii::initGfx() {
@@ -42,6 +47,11 @@ void OSystem_Wii::initGfx() {
_overlayWidth = 640;
_overlayHeight = 480;
+#ifndef GAMECUBE
+ if (CONF_GetAspectRatio() && _fullscreen)
+ _overlayHeight = 360;
+#endif
+
_overlaySize = _overlayWidth * _overlayHeight * 2;
_overlayPixels = (OverlayColor *) memalign(32, _overlaySize);
@@ -51,17 +61,32 @@ void OSystem_Wii::initGfx() {
_cursorPalette = (u16 *) memalign(32, 256 * 2);
memset(_cursorPalette, 0, 256 * 2);
- _supportedGraphicsModes = new OSystem::GraphicsMode[2];
- _supportedGraphicsModes[0].name = strdup("gx");
- _supportedGraphicsModes[0].description = strdup("wii hardware scaler");
+ _supportedGraphicsModes = new OSystem::GraphicsMode[7];
+ _supportedGraphicsModes[0].name = strdup("standard");
+ _supportedGraphicsModes[0].description = strdup("standard");
_supportedGraphicsModes[0].id = GM_DEFAULT;
- _supportedGraphicsModes[1].name = 0;
- _supportedGraphicsModes[1].description = 0;
- _supportedGraphicsModes[1].id = 0;
-
- _texture = (u16 *) memalign(32, _overlaySize);
-
- GX_Start(_overlayWidth, _overlayHeight, 320, 240);
+ _supportedGraphicsModes[1].name = strdup("overscan1");
+ _supportedGraphicsModes[1].description = strdup("overscan 1");
+ _supportedGraphicsModes[1].id = GM_OVERSCAN1;
+ _supportedGraphicsModes[2].name = strdup("overscan2");
+ _supportedGraphicsModes[2].description = strdup("overscan 2");
+ _supportedGraphicsModes[2].id = GM_OVERSCAN2;
+ _supportedGraphicsModes[3].name = strdup("overscan3");
+ _supportedGraphicsModes[3].description = strdup("overscan 3");
+ _supportedGraphicsModes[3].id = GM_OVERSCAN3;
+ _supportedGraphicsModes[4].name = strdup("overscan4");
+ _supportedGraphicsModes[4].description = strdup("overscan 4");
+ _supportedGraphicsModes[4].id = GM_OVERSCAN4;
+ _supportedGraphicsModes[5].name = strdup("overscan5");
+ _supportedGraphicsModes[5].description = strdup("overscan 5");
+ _supportedGraphicsModes[5].id = GM_OVERSCAN5;
+ _supportedGraphicsModes[6].name = 0;
+ _supportedGraphicsModes[6].description = 0;
+ _supportedGraphicsModes[6].id = 0;
+
+ _texture = (u16 *) memalign(32, 640 * 480 * 2);
+
+ setGraphicsMode(_activeGraphicsMode);
}
void OSystem_Wii::deinitGfx() {
@@ -111,13 +136,24 @@ int OSystem_Wii::getDefaultGraphicsMode() const {
return GM_DEFAULT;
}
-bool OSystem_Wii::setGraphicsMode(const char *mode) {
- setGraphicsMode(GM_DEFAULT);
+bool OSystem_Wii::setGraphicsMode(int mode) {
+ s16 xar, yar;
- return true;
-}
+ printf("setGraphicsMode %d\n", mode);
+
+ xar = vmode->viWidth / 2;
+ yar = vmode->xfbHeight / 2;
+
+#ifndef GAMECUBE
+ if (CONF_GetAspectRatio() && !_fullscreen)
+ xar /= 1.33f;
+#endif
+
+ GX_SetCamPosZ(400 - mode * 10);
+ GX_Start(640, 480, xar, yar);
+
+ _activeGraphicsMode = mode;
-bool OSystem_Wii::setGraphicsMode(int mode) {
return true;
}
@@ -129,6 +165,8 @@ void OSystem_Wii::initSize(uint width, uint height) {
if (_gameWidth != width || _gameHeight != height) {
printf("initSize %u %u\n", width, height);
+ assert((width <= 640) && (height <= 480));
+
_gameWidth = width;
_gameHeight = height;
@@ -136,12 +174,15 @@ void OSystem_Wii::initSize(uint width, uint height) {
free(_gamePixels);
_gamePixels = (u8 *) memalign(32, _gameWidth * _gameHeight);
+ memset(_gamePixels, 0, _gameWidth * _gameHeight);
if (!_overlayVisible) {
_currentWidth = _gameWidth;
_currentHeight = _gameHeight;
updateEventScreenResolution();
}
+
+ setGraphicsMode(_activeGraphicsMode);
}
}
@@ -320,6 +361,8 @@ void OSystem_Wii::unlockScreen() {
}
void OSystem_Wii::setShakePos(int shakeOffset) {
+ GX_SetTexTrans(0, (float) -shakeOffset * ((float) vmode->efbHeight /
+ (float) _currentHeight));
}
void OSystem_Wii::showOverlay() {