[Scummvm-cvs-logs] SF.net SVN: scummvm:[33920] scummvm/branches/gsoc2008-gui

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Sat Aug 16 02:08:20 CEST 2008


Revision: 33920
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33920&view=rev
Author:   Tanoku
Date:     2008-08-16 00:08:12 +0000 (Sat, 16 Aug 2008)

Log Message:
-----------
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
........

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/AUTHORS
    scummvm/branches/gsoc2008-gui/README
    scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h
    scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp
    scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp
    scummvm/branches/gsoc2008-gui/backends/midi/alsa.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/PalmOS/Src/be_base.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/gp2x/gp2x.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.h
    scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.h
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/README
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianActions.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.h
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/main_features.inl
    scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/portdefs.h
    scummvm/branches/gsoc2008-gui/backends/platform/wii/Makefile
    scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.h
    scummvm/branches/gsoc2008-gui/backends/platform/wii/main.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.h
    scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem_gfx.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsPocket.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsSmartphone.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wince/CEkeys/EventsBuffer.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wince/Makefile
    scummvm/branches/gsoc2008-gui/backends/platform/wince/missing/missing.cpp
    scummvm/branches/gsoc2008-gui/backends/platform/wince/wince-sdl.cpp
    scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp
    scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h
    scummvm/branches/gsoc2008-gui/base/commandLine.cpp
    scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp
    scummvm/branches/gsoc2008-gui/common/config-manager.cpp
    scummvm/branches/gsoc2008-gui/common/config-manager.h
    scummvm/branches/gsoc2008-gui/common/file.cpp
    scummvm/branches/gsoc2008-gui/common/file.h
    scummvm/branches/gsoc2008-gui/common/fs.cpp
    scummvm/branches/gsoc2008-gui/common/fs.h
    scummvm/branches/gsoc2008-gui/common/hashmap.h
    scummvm/branches/gsoc2008-gui/common/savefile.h
    scummvm/branches/gsoc2008-gui/common/stream.h
    scummvm/branches/gsoc2008-gui/common/system.cpp
    scummvm/branches/gsoc2008-gui/common/system.h
    scummvm/branches/gsoc2008-gui/common/unarj.cpp
    scummvm/branches/gsoc2008-gui/dists/engine-data/kyra.dat
    scummvm/branches/gsoc2008-gui/dists/wii/READMII
    scummvm/branches/gsoc2008-gui/engines/agi/sound.cpp
    scummvm/branches/gsoc2008-gui/engines/agi/sound.h
    scummvm/branches/gsoc2008-gui/engines/agos/animation.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/input.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/midi.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/oracle.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/saveload.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/script.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/script_e1.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/script_e2.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/script_s1.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/script_ww.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/verb.cpp
    scummvm/branches/gsoc2008-gui/engines/agos/window.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/anim.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/anim.h
    scummvm/branches/gsoc2008-gui/engines/cine/bg.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/cine.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/cine.h
    scummvm/branches/gsoc2008-gui/engines/cine/detection.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/gfx.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/gfx.h
    scummvm/branches/gsoc2008-gui/engines/cine/main_loop.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/main_loop.h
    scummvm/branches/gsoc2008-gui/engines/cine/msg.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/object.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/object.h
    scummvm/branches/gsoc2008-gui/engines/cine/pal.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/pal.h
    scummvm/branches/gsoc2008-gui/engines/cine/part.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/part.h
    scummvm/branches/gsoc2008-gui/engines/cine/prc.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/script_fw.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/script_os.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/sound.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/texte.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/texte.h
    scummvm/branches/gsoc2008-gui/engines/cine/various.cpp
    scummvm/branches/gsoc2008-gui/engines/cine/various.h
    scummvm/branches/gsoc2008-gui/engines/drascula/detection.cpp
    scummvm/branches/gsoc2008-gui/engines/drascula/drascula.cpp
    scummvm/branches/gsoc2008-gui/engines/drascula/interface.cpp
    scummvm/branches/gsoc2008-gui/engines/drascula/saveload.cpp
    scummvm/branches/gsoc2008-gui/engines/drascula/sound.cpp
    scummvm/branches/gsoc2008-gui/engines/gob/mult_v2.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/detection.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/gui_lok.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/gui_lok.h
    scummvm/branches/gsoc2008-gui/engines/kyra/gui_v2.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/gui_v2.h
    scummvm/branches/gsoc2008-gui/engines/kyra/kyra_hof.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/kyra_hof.h
    scummvm/branches/gsoc2008-gui/engines/kyra/kyra_lok.h
    scummvm/branches/gsoc2008-gui/engines/kyra/kyra_mr.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/kyra_v1.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/kyra_v1.h
    scummvm/branches/gsoc2008-gui/engines/kyra/lol.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/resource.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/saveload.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/scene_mr.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/screen.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/script_tim.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/sequences_hof.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/sound.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/sound.h
    scummvm/branches/gsoc2008-gui/engines/kyra/sound_adlib.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/sound_towns.cpp
    scummvm/branches/gsoc2008-gui/engines/kyra/staticres.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/balloons.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/callables_br.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/callables_ns.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/debug.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/dialogue.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/disk.h
    scummvm/branches/gsoc2008-gui/engines/parallaction/disk_br.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/exec.h
    scummvm/branches/gsoc2008-gui/engines/parallaction/exec_br.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/exec_ns.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/graphics.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/graphics.h
    scummvm/branches/gsoc2008-gui/engines/parallaction/objects.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/objects.h
    scummvm/branches/gsoc2008-gui/engines/parallaction/parallaction.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/parallaction.h
    scummvm/branches/gsoc2008-gui/engines/parallaction/parallaction_br.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/parallaction_ns.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/parser.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/parser.h
    scummvm/branches/gsoc2008-gui/engines/parallaction/parser_br.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/parser_ns.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/saveload.cpp
    scummvm/branches/gsoc2008-gui/engines/parallaction/walk.cpp
    scummvm/branches/gsoc2008-gui/engines/queen/queen.h
    scummvm/branches/gsoc2008-gui/engines/saga/displayinfo.h
    scummvm/branches/gsoc2008-gui/engines/saga/interface.cpp
    scummvm/branches/gsoc2008-gui/engines/saga/itedata.cpp
    scummvm/branches/gsoc2008-gui/engines/saga/itedata.h
    scummvm/branches/gsoc2008-gui/engines/saga/saga.h
    scummvm/branches/gsoc2008-gui/engines/saga/sprite.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/boxes.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/charset.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/charset.h
    scummvm/branches/gsoc2008-gui/engines/scumm/detection.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/gfx.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/saveload.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/saveload.h
    scummvm/branches/gsoc2008-gui/engines/scumm/script.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/script_v5.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/script_v6.cpp
    scummvm/branches/gsoc2008-gui/engines/scumm/scumm.h
    scummvm/branches/gsoc2008-gui/engines/scumm/string.cpp
    scummvm/branches/gsoc2008-gui/engines/sky/control.cpp
    scummvm/branches/gsoc2008-gui/engines/sky/logic.cpp
    scummvm/branches/gsoc2008-gui/engines/sky/sound.cpp
    scummvm/branches/gsoc2008-gui/engines/sky/sound.h
    scummvm/branches/gsoc2008-gui/engines/tinsel/detection.cpp
    scummvm/branches/gsoc2008-gui/engines/tinsel/scn.cpp
    scummvm/branches/gsoc2008-gui/engines/tinsel/tinsel.h
    scummvm/branches/gsoc2008-gui/engines/touche/graphics.cpp
    scummvm/branches/gsoc2008-gui/engines/touche/graphics.h
    scummvm/branches/gsoc2008-gui/engines/touche/staticres.cpp
    scummvm/branches/gsoc2008-gui/engines/touche/touche.cpp
    scummvm/branches/gsoc2008-gui/engines/touche/touche.h
    scummvm/branches/gsoc2008-gui/graphics/scaler/hq2x_i386.asm
    scummvm/branches/gsoc2008-gui/graphics/scaler/hq3x_i386.asm
    scummvm/branches/gsoc2008-gui/gui/credits.h
    scummvm/branches/gsoc2008-gui/gui/launcher.cpp
    scummvm/branches/gsoc2008-gui/sound/midiparser.h
    scummvm/branches/gsoc2008-gui/sound/midiparser_xmidi.cpp
    scummvm/branches/gsoc2008-gui/tools/create_kyradat/create_kyradat.cpp
    scummvm/branches/gsoc2008-gui/tools/create_kyradat/create_kyradat.h
    scummvm/branches/gsoc2008-gui/tools/create_kyradat/hof_cd.h
    scummvm/branches/gsoc2008-gui/tools/create_kyradat/hof_demo.h
    scummvm/branches/gsoc2008-gui/tools/create_kyradat/misc.h
    scummvm/branches/gsoc2008-gui/tools/credits.pl

Added Paths:
-----------
    scummvm/branches/gsoc2008-gui/tools/create_kyradat/lol_demo.h

Property Changed:
----------------
    scummvm/branches/gsoc2008-gui/
    scummvm/branches/gsoc2008-gui/dists/
    scummvm/branches/gsoc2008-gui/dists/msvc7/
    scummvm/branches/gsoc2008-gui/dists/msvc71/
    scummvm/branches/gsoc2008-gui/dists/msvc8/
    scummvm/branches/gsoc2008-gui/dists/msvc9/


Property changes on: scummvm/branches/gsoc2008-gui
___________________________________________________________________
Modified: svnmerge-integrated
   - /scummvm/trunk:1-33481
   + /scummvm/trunk:1-33919

Modified: scummvm/branches/gsoc2008-gui/AUTHORS
===================================================================
--- scummvm/branches/gsoc2008-gui/AUTHORS	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/AUTHORS	2008-08-16 00:08:12 UTC (rev 33920)
@@ -6,6 +6,11 @@
      Max Horn             
      Eugene Sandulenko    
 
+  Retired Project Leaders
+  -----------------------
+     Vincent Hamm          - ScummVM co-founder, Original Cruise/CinE author
+     Ludvig Strigeus       - Original ScummVM and SimonVM author
+
   Engine Teams
   ------------
     SCUMM:
@@ -185,12 +190,10 @@
      Ralph Brorsen         - Help with GUI implementation
      Jamieson Christian    - iMUSE, MIDI, all things musical
      Ruediger Hanke        - Port: MorphOS
-     Vincent Hamm          - ScummVM co-founder, Original Cruise/CinE author
      Felix Jakschitsch     - Zak256 reverse engineering
      Mutwin Kraus          - Original MacOS porter
      Peter Moraliyski      - Port: GP32
      Jeremy Newman         - Former webmaster
-     Ludvig Strigeus       - Original ScummVM and SimonVM author
      Lionel Ulmer          - Port: X11
      Won Star              - Former GP32 porter
 

Modified: scummvm/branches/gsoc2008-gui/README
===================================================================
--- scummvm/branches/gsoc2008-gui/README	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/README	2008-08-16 00:08:12 UTC (rev 33920)
@@ -1322,34 +1322,39 @@
 
 7.6.1) Playing sound with ALSA sequencer:                        [UNIX ONLY]
 ------ ----------------------------------
-If you have installed the ALSA driver with the sequencer support, then
-set the environment variable SCUMMVM_PORT or the config file parameter
-alsa_port to your sequencer port. The default is "65:0".
+If you have installed the ALSA driver with the sequencer support, then set the
+environment variable SCUMMVM_PORT or the config file parameter alsa_port to
+your sequencer port. The default is to try both "65:0" and "17:0".
 
 Here is a little howto on how to use the ALSA sequencer with your soundcard.
 In all cases, to have a list of all the sequencer ports you have, try the
 command "aconnect -o -l". This should give output similar to:
-client 64: 'External MIDI 0' [type=kernel]
-    0 'MIDI 0-0        '
-client 65: 'Emu10k1 WaveTable' [type=kernel]
+
+client 14: 'Midi Through' [type=kernel]
+    0 'Midi Through Port-0'
+client 16: 'SBLive! Value [CT4832]' [type=kernel]
+    0 'EMU10K1 MPU-401 (UART)'
+client 17: 'Emu10k1 WaveTable' [type=kernel]
     0 'Emu10k1 Port 0  '
     1 'Emu10k1 Port 1  '
     2 'Emu10k1 Port 2  '
     3 'Emu10k1 Port 3  '
-client 128: 'Client-128' [type=user]
+client 128: 'TiMidity' [type=user]
     0 'TiMidity port 0 '
     1 'TiMidity port 1 '
+    2 'TiMidity port 2 '
+    3 'TiMidity port 3 '
 
-This means the external MIDI output of the sound card is located on the
-port 64:0, four WaveTable MIDI outputs in 65:0, 65:1, 65:2
-and 65:3, and two TiMidity ports, located at 128:0 and 128:1.
+The most important bit here is that there are four WaveTable MIDI outputs
+located at 17:0, 17:1, 17:2 and 17:3, and four TiMidity ports located at 128:0,
+128:1, 128:2 and 128:3.
 
 If you have a FM-chip on your card, like the SB16, then you have to load
 the SoundFonts using the sbiload software. Example:
-  sbiload -p 65:0 /etc/std.o3 /etc/drums.o3
+  sbiload -p 17:0 /etc/std.o3 /etc/drums.o3
 
 If you have a WaveTable capable sound card, you have to load a sbk or sf2
-SoundFont using the sfxload software. Example:
+SoundFont using the sfxload or asfxload software. Example:
   sfxload /path/to/8mbgmsfx.sf2
 
 If you don't have a MIDI capable soundcard, there are two options: FluidSynth

Modified: scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -64,7 +64,7 @@
 	 *
 	 * @param name String containing the name of the child to create a new node.
 	 */
-	virtual AbstractFilesystemNode *getChild(const String &name) const = 0;
+	virtual AbstractFilesystemNode *getChild(const Common::String &name) const = 0;
 
 	/**
 	 * The parent node of this directory.
@@ -100,7 +100,7 @@
 	 *
 	 * @note By default, this method returns the value of getName().
 	 */
-	virtual String getDisplayName() const { return getName(); }
+	virtual Common::String getDisplayName() const { return getName(); }
 
 	/**
 	 * Returns the last component of the path pointed by this FilesystemNode.
@@ -111,12 +111,12 @@
 	 *
 	 * @note This method is very architecture dependent, please check the concrete implementation for more information.
 	 */
-	virtual String getName() const = 0;
+	virtual Common::String getName() const = 0;
 
 	/**
 	 * Returns the 'path' of the current node, usable in fopen().
 	 */
-	virtual String getPath() const = 0;
+	virtual Common::String getPath() const = 0;
 
 	/**
 	 * Indicates whether this path refers to a directory or not.

Modified: scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -42,8 +42,8 @@
  */
 class POSIXFilesystemNode : public AbstractFilesystemNode {
 protected:
-	String _displayName;
-	String _path;
+	Common::String _displayName;
+	Common::String _path;
 	bool _isDirectory;
 	bool _isValid;
 
@@ -59,17 +59,17 @@
 	 * @param path String with the path the new node should point to.
 	 * @param verify true if the isValid and isDirectory flags should be verified during the construction.
 	 */
-	POSIXFilesystemNode(const String &path, bool verify);
+	POSIXFilesystemNode(const Common::String &path, bool verify);
 
 	virtual bool exists() const { return access(_path.c_str(), F_OK) == 0; }
-	virtual String getDisplayName() const { return _displayName; }
-	virtual String getName() const { return _displayName; }
-	virtual String getPath() const { return _path; }
+	virtual Common::String getDisplayName() const { return _displayName; }
+	virtual Common::String getName() const { return _displayName; }
+	virtual Common::String getPath() const { return _path; }
 	virtual bool isDirectory() const { return _isDirectory; }
 	virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; }
 	virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; }
 
-	virtual AbstractFilesystemNode *getChild(const String &n) const;
+	virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
 	virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
 	virtual AbstractFilesystemNode *getParent() const;
 
@@ -119,7 +119,7 @@
 	_isDirectory = true;
 }
 
-POSIXFilesystemNode::POSIXFilesystemNode(const String &p, bool verify) {
+POSIXFilesystemNode::POSIXFilesystemNode(const Common::String &p, bool verify) {
 	assert(p.size() > 0);
 
 	// Expand "~/" to the value of the HOME env variable
@@ -142,12 +142,12 @@
 	}
 }
 
-AbstractFilesystemNode *POSIXFilesystemNode::getChild(const String &n) const {
+AbstractFilesystemNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
 	// FIXME: Pretty lame implementation! We do no error checking to speak
 	// of, do not check if this is a special node, etc.
 	assert(_isDirectory);
 
-	String newPath(_path);
+	Common::String newPath(_path);
 	if (_path.lastChar() != '/')
 		newPath += '/';
 	newPath += n;
@@ -175,7 +175,7 @@
 			continue;
 		}
 
-		String newPath(_path);
+		Common::String newPath(_path);
 		if (newPath.lastChar() != '/')
 			newPath += '/';
 		newPath += dp->d_name;
@@ -236,7 +236,7 @@
 	const char *start = _path.c_str();
 	const char *end = lastPathComponent(_path);
 
-	return new POSIXFilesystemNode(String(start, end - start), true);
+	return new POSIXFilesystemNode(Common::String(start, end - start), true);
 }
 
 #endif //#if defined(UNIX)

Modified: scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -227,8 +227,7 @@
 		char path[MAX_PATH];
 		GetCurrentDirectory(MAX_PATH, path);
 		_path = path;
-	}
-	else {
+	} else {
 		assert(p.size() > 0);
 		_path = p;
 	}
@@ -260,11 +259,6 @@
 		newPath += '\\';
 	newPath += n;
 
-	// Check whether the directory actually exists
-	DWORD fileAttribs = GetFileAttributes(toUnicode(newPath.c_str()));
-	if (fileAttribs == INVALID_FILE_ATTRIBUTES)
-		return 0;
-
 	return new WindowsFilesystemNode(newPath, false);
 }
 

Modified: scummvm/branches/gsoc2008-gui/backends/midi/alsa.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/midi/alsa.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/midi/alsa.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -79,24 +79,22 @@
 }
 
 int MidiDriver_ALSA::open() {
-	const char *var;
+	const char *var = NULL;
 
 	if (_isOpen)
 		return MERR_ALREADY_OPEN;
 	_isOpen = true;
 
-	if (!(var = getenv("SCUMMVM_PORT"))) {
-		// use config option if no var specified
+	var = getenv("SCUMMVM_PORT");
+	if (!var && ConfMan.hasKey("alsa_port")) {
 		var = ConfMan.get("alsa_port").c_str();
+	}
+
+	if (var) {
 		if (parse_addr(var, &seq_client, &seq_port) < 0) {
 			error("Invalid port %s", var);
 			return -1;
 		}
-	} else {
-		if (parse_addr(var, &seq_client, &seq_port) < 0) {
-			error("Invalid port %s", var);
-			return -1;
-		}
 	}
 
 	if (my_snd_seq_open(&seq_handle) < 0) {
@@ -120,14 +118,32 @@
 		return -1;
 	}
 
-	if (seq_client != SND_SEQ_ADDRESS_SUBSCRIBERS) {
-		/* subscribe to MIDI port */
-		if (snd_seq_connect_to(seq_handle, my_port, seq_client, seq_port) < 0) {
-			error("Can't subscribe to MIDI port (%d:%d) see README for help", seq_client, seq_port);
+	if (var) {
+		if (seq_client != SND_SEQ_ADDRESS_SUBSCRIBERS) {
+			// subscribe to MIDI port
+			if (snd_seq_connect_to(seq_handle, my_port, seq_client, seq_port) < 0) {
+				error("Can't subscribe to MIDI port (%d:%d) see README for help", seq_client, seq_port);
+			}
 		}
-		else printf("Connected to Alsa sequencer client [%d:%d]\n", seq_client, seq_port);
+	} else {
+		int defaultPorts[] = {
+			65, 0,
+			17, 0
+		};
+		int i;
+
+		for (i = 0; i < ARRAYSIZE(defaultPorts); i += 2) {
+			seq_client = defaultPorts[i];
+			seq_port = defaultPorts[i + 1];
+			if (snd_seq_connect_to(seq_handle, my_port, seq_client, seq_port) >= 0)
+				break;
+		}
+
+		if (i >= ARRAYSIZE(defaultPorts))
+			error("Can't subscribe to MIDI port (65:0) or (17:0)");
 	}
 
+	printf("Connected to Alsa sequencer client [%d:%d]\n", seq_client, seq_port);
 	printf("ALSA client initialised [%d:0]\n", my_client);
 
 	return 0;

Modified: scummvm/branches/gsoc2008-gui/backends/platform/PalmOS/Src/be_base.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/PalmOS/Src/be_base.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/PalmOS/Src/be_base.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -30,6 +30,9 @@
 #include "backends/timer/default/default-timer.h"
 #include "sound/mixer.h"
 
+#define DEFAULT_SAVE_PATH "/PALM/Programs/ScummVM/Saved"
+
+
 OSystem_PalmBase::OSystem_PalmBase() {
 	_overlayVisible = false;
 
@@ -100,7 +103,7 @@
 	// Create the savefile manager, if none exists yet (we check for this to
 	// allow subclasses to provide their own).
 	if (_saveMgr == 0) {
-		_saveMgr = new DefaultSaveFileManager();
+		_saveMgr = new DefaultSaveFileManager(DEFAULT_SAVE_PATH);
 	}
 
 	// Create and hook up the mixer, if none exists yet (we check for this to

Modified: scummvm/branches/gsoc2008-gui/backends/platform/gp2x/gp2x.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/gp2x/gp2x.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/gp2x/gp2x.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -219,7 +219,7 @@
 	// Create the savefile manager, if none exists yet (we check for this to
 	// allow subclasses to provide their own).
 	if (_savefile == 0) {
-		_savefile = new DefaultSaveFileManager();
+		_savefile = new DefaultSaveFileManager(savePath);
 	}
 
 	// Create and hook up the mixer, if none exists yet (we check for this to

Modified: scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -88,7 +88,7 @@
 }
 
 void OSystem_IPHONE::initBackend() {
-	_savefile = new DefaultSaveFileManager();
+	_savefile = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
 	_timer = new DefaultTimerManager();
 
 	gettimeofday(&_startTime, NULL);
@@ -1196,10 +1196,6 @@
 	return SCUMMVM_PREFS_PATH;
 }
 
-const char* OSystem_IPHONE::getSavePath() {
-	return SCUMMVM_SAVE_PATH;
-}
-
 void OSystem_IPHONE::migrateApp() {
 	// Migrate to the new 1.1.3 directory structure, if needed.
 	

Modified: scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/iphone/osys_iphone.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -172,7 +172,6 @@
 
 	static void migrateApp();
 	static const char* getConfigPath();
-	static const char* getSavePath();	
 
 protected:
 	inline void addDirtyRect(int16 x1, int16 y1, int16 w, int16 h);

Modified: scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -23,9 +23,18 @@
  *
  */
 
+#if defined(WIN32)
+#include <windows.h>
+#if defined(ARRAYSIZE)
+// winnt.h defines ARRAYSIZE, but we want our own one... - this is needed before including util.h
+#undef ARRAYSIZE
+#endif
+#endif
+
 #include "backends/platform/sdl/sdl.h"
 #include "common/config-manager.h"
 #include "common/events.h"
+#include "common/file.h"
 #include "common/util.h"
 
 #include "backends/saves/default/default-saves.h"
@@ -40,6 +49,7 @@
 #define SAMPLES_PER_SEC 22050
 //#define SAMPLES_PER_SEC 44100
 
+
 /*
  * Include header files needed for the getFilesystemFactory() method.
  */
@@ -52,6 +62,18 @@
 #endif
 
 
+#if defined(UNIX)
+#ifdef MACOSX
+#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
+#else
+#define DEFAULT_CONFIG_FILE ".scummvmrc"
+#endif
+#else
+#define DEFAULT_CONFIG_FILE "scummvm.ini"
+#endif
+
+
+
 static Uint32 timer_handler(Uint32 interval, void *param) {
 	((DefaultTimerManager *)param)->handler();
 	return interval;
@@ -245,6 +267,92 @@
 	#endif
 }
 
+static Common::String getDefaultConfigFileName() {
+	char configFile[MAXPATHLEN];
+#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+	OSVERSIONINFO win32OsVersion;
+	ZeroMemory(&win32OsVersion, sizeof(OSVERSIONINFO));
+	win32OsVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+	GetVersionEx(&win32OsVersion);
+	// Check for non-9X version of Windows.
+	if (win32OsVersion.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
+		// Use the Application Data directory of the user profile.
+		if (win32OsVersion.dwMajorVersion >= 5) {
+			if (!GetEnvironmentVariable("APPDATA", configFile, sizeof(configFile)))
+				error("Unable to access application data directory");
+		} else {
+			if (!GetEnvironmentVariable("USERPROFILE", configFile, sizeof(configFile)))
+				error("Unable to access user profile directory");
+
+			strcat(configFile, "\\Application Data");
+			CreateDirectory(configFile, NULL);
+		}
+
+		strcat(configFile, "\\ScummVM");
+		CreateDirectory(configFile, NULL);
+		strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
+
+		if (fopen(configFile, "r") == NULL) {
+			// Check windows directory
+			char oldConfigFile[MAXPATHLEN];
+			GetWindowsDirectory(oldConfigFile, MAXPATHLEN);
+			strcat(oldConfigFile, "\\" DEFAULT_CONFIG_FILE);
+			if (fopen(oldConfigFile, "r")) {
+				printf("The default location of the config file (scummvm.ini) in ScummVM has changed,\n");
+				printf("under Windows NT4/2000/XP/Vista. You may want to consider moving your config\n");
+				printf("file from the old default location:\n");
+				printf("%s\n", oldConfigFile);
+				printf("to the new default location:\n");
+				printf("%s\n\n", configFile);
+				strcpy(configFile, oldConfigFile);
+			}
+		}
+	} else {
+		// Check windows directory
+		GetWindowsDirectory(configFile, MAXPATHLEN);
+		strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
+	}
+#elif defined(UNIX)
+	// On UNIX type systems, by default we store the config file inside
+	// to the HOME directory of the user.
+	//
+	// GP2X is Linux based but Home dir can be read only so do not use
+	// it and put the config in the executable dir.
+	//
+	// On the iPhone, the home dir of the user when you launch the app
+	// from the Springboard, is /. Which we don't want.
+	const char *home = getenv("HOME");
+	if (home != NULL && strlen(home) < MAXPATHLEN)
+		snprintf(configFile, MAXPATHLEN, "%s/%s", home, DEFAULT_CONFIG_FILE);
+	else
+		strcpy(configFile, DEFAULT_CONFIG_FILE);
+#else
+	strcpy(configFile, DEFAULT_CONFIG_FILE);
+#endif
+
+	return configFile;
+}
+
+Common::SeekableReadStream *OSystem_SDL::openConfigFileForReading() {
+	Common::File *confFile = new Common::File();
+	assert(confFile);
+	if (!confFile->open(getDefaultConfigFileName())) {
+		delete confFile;
+		confFile = 0;
+	}
+	return confFile;
+}
+
+Common::WriteStream *OSystem_SDL::openConfigFileForWriting() {
+	Common::DumpFile *confFile = new Common::DumpFile();
+	assert(confFile);
+	if (!confFile->open(getDefaultConfigFileName())) {
+		delete confFile;
+		confFile = 0;
+	}
+	return confFile;
+}
+
 void OSystem_SDL::setWindowCaption(const char *caption) {
 	SDL_WM_SetCaption(caption, caption);
 }

Modified: scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -210,6 +210,9 @@
 	virtual Common::SaveFileManager *getSavefileManager();
 	virtual FilesystemFactory *getFilesystemFactory();
 
+	virtual Common::SeekableReadStream *openConfigFileForReading();
+	virtual Common::WriteStream *openConfigFileForWriting();
+
 protected:
 	bool _inited;
 

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/README
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/README	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/README	2008-08-16 00:08:12 UTC (rev 33920)
@@ -1,11 +1,11 @@
 
  ScummVM - ScummVM ported to EPOC/SymbianOS
 
- Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson
- Copyright (C) 2007 Lars 'AnotherGuest' Persson
- Copyright (C) 2007 Jurgen 'SumthinWicked' Braam
- Copyright (C) 2007 ScummVM Team
+ Copyright (C) 2008 ScummVM Team
+ Copyright (C) 2003-2008 Lars 'AnotherGuest' Persson
+ Copyright (C) 2002008 Jurgen 'SumthinWicked' Braam
 
+ Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson
  $Id$
 
 
@@ -13,22 +13,22 @@
 --------------
 	The original ports (uptil 0.7.1) were made by Andreas Karlsson and Lars Persson.
 	The main transition to 0.8.0CVS and all relevant changes were done by Jurgen Braam.
-	Jurgen and Lars have successfully transfered all needed changes into CVS, with additional helpful tools for Symbian OS
+	Jurgen and Lars have successfully transfered all needed changes into CVS/SVN, with additional helpful tools for Symbian OS
 
-	Release version: 0.10.0
+	Release version: 0.12.0
 	* This version is only supported on Symbian OS 9 devices due to compiler constraints for older devices. (That means UIQ3 and S60V3 devices)
-	* Updated to SDL version 1.2.11 (previous version used was 1.2.8)
+	* Updated to SDL version 1.2.13 (previous version used was 1.2.2)
 	* Information about S60 devices can be found here http://wiki.scummvm.org/index.php/SymbianOS_S60
 	* Information about UIQ devices can be found here http://wiki.scummvm.org/index.php/SymbianOS_UIQ
 	* Best source of general information is the ScummVM forum, http://forums.scummvm.org
-	* SVN builds (not frequently updated) can be found at http://anotherguest.k0.se
+	* SVN builds (not frequently updated) can be found at http://www.anotherguest.se
 
 
 Games supported
 ---------------
 	The Symbian port of ScummVM supports all but Sword1 & 2 games. Some games might not run properly due to screenresolution or memory constraints.
+	Minimum free memory requirement is about 12MB to be able to start and run ScummVM, this is enough for most older games, but newer more resource hungry games, might require more.
 
-
 Building ScummVM
 ---------------------
 
@@ -38,7 +38,7 @@
 	Lets just say the framework needs quite some time to set up and takes a while
 	to get used to. If you choose to continue you will need the following items:
 
-	- UIQ 3.0 SDK (To build for UIQ3 devices)
+	- UIQ 3.x SDK (To build for UIQ3 devices)(Build scripts in SDK need tweaking in order to build scummvm since Symbian OS GCCE never builds as large projects as ScummVM before)
 	- UIQ 2.1 SDK (To build for UIQ2 devices);
 	  http://www.symbian.com/developer/sdks_uiq.asp
 
@@ -72,9 +72,8 @@
 	  http://flac.sourceforge.net/
 
 	- libmpeg2, a free MPEG-2 video stream decoder
-	  http://libmpeg2.sourceforge.net/
+	  http://libmpeg2.sourceforge.net
 
-
 	Compiling ScummVM
 	-----------------
 
@@ -89,7 +88,7 @@
 	PETRAN.EXE will be the executable that is started.
 
 
-	SDL: the latest version of SDL at this point in time is 1.2.12. This version
+	SDL: the latest version of SDL at this point in time is 1.2.13. This version
 	works great for compiling on other platforms.
 
 	zlib: the zlib-x.x.x.tar.gz does not come with UIQ .mpp build files, that's why

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg	2008-08-16 00:08:12 UTC (rev 33920)
@@ -52,6 +52,7 @@
 "..\..\..\..\dists\engine-data\sky.cpt"-"!:\system\apps\scummvm\sky.cpt"
 "..\..\..\..\dists\engine-data\igor.tbl"-"!:\system\apps\scummvm\igor.tbl"
 "..\..\..\..\dists\engine-data\lure.dat"-"!:\system\apps\scummvm\lure.dat"
+"..\..\..\..\dists\engine-data\drascula.dat"-"!:\system\apps\scummvm\drascula.dat"
 
 ; Config/log files: 'empty' will automagically be removed on uninstall
 ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in	2008-08-16 00:08:12 UTC (rev 33920)
@@ -50,7 +50,7 @@
 END
 
 EPOCSTACKSIZE	80000
-EPOCHEAPSIZE	3000000 64000000
+EPOCHEAPSIZE	5000000 64000000
 
 START BITMAP    ScummVM.mbm
 TARGETPATH              \Resource\Apps

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg	2008-08-16 00:08:12 UTC (rev 33920)
@@ -16,7 +16,7 @@
 ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ;
 ; $URL:$
-; $Id:$
+; $Id$
 ;
 ;
 
@@ -63,6 +63,7 @@
 "..\..\..\..\dists\engine-data\sky.cpt"-"c:\data\scummvm\sky.cpt"
 "..\..\..\..\dists\engine-data\igor.tbl"-"c:\data\scummvm\igor.tbl"
 "..\..\..\..\dists\engine-data\lure.dat"-"c:\data\scummvm\lure.dat"
+"..\..\..\..\dists\engine-data\drascula.dat"-"c:\data\drascula.dat"
 
 ; Config/log files: 'empty' will automagically be removed on uninstall
 ""-"c:\data\scummvm\scummvm.ini",FILENULL

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg	2008-08-16 00:08:12 UTC (rev 33920)
@@ -53,6 +53,7 @@
 "..\..\..\..\dists\engine-data\sky.cpt"-"!:\system\apps\scummvm\sky.cpt"
 "..\..\..\..\dists\engine-data\igor.tbl"-"!:\system\apps\scummvm\igor.tbl"
 "..\..\..\..\dists\engine-data\lure.dat"-"!:\system\apps\scummvm\lure.dat"
+"..\..\..\..\dists\engine-data\drascula.dat"-"!:\system\apps\scummvm\drascula.dat"
 
 ; Config/log files: 'empty' will automagically be removed on uninstall
 ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg	2008-08-16 00:08:12 UTC (rev 33920)
@@ -53,6 +53,7 @@
 "..\..\..\..\dists\engine-data\sky.cpt"-"!:\system\apps\scummvm\sky.cpt"
 "..\..\..\..\dists\engine-data\igor.tbl"-"!:\system\apps\scummvm\igor.tbl"
 "..\..\..\..\dists\engine-data\lure.dat"-"!:\system\apps\scummvm\lure.dat"
+"..\..\..\..\dists\engine-data\drascula.dat"-"!:\system\apps\scummvm\drascula.dat"
 
 ; Config/log files: 'empty' will automagically be removed on uninstall
 ""-"!:\system\apps\ScummVM\scummvm.ini",FILENULL

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in	2008-08-16 00:08:12 UTC (rev 33920)
@@ -51,7 +51,7 @@
 END
 
 EPOCSTACKSIZE	80000
-EPOCHEAPSIZE	3000000 64000000
+EPOCHEAPSIZE	5000000 64000000
 
 START BITMAP    ScummVM.mbm
 TARGETPATH              \Resource\Apps

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg	2008-08-16 00:08:12 UTC (rev 33920)
@@ -16,7 +16,7 @@
 ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ;
 ; $URL:$
-; $Id:$
+; $Id$
 ;
 ;
 
@@ -61,6 +61,7 @@
 "..\..\..\..\dists\engine-data\sky.cpt"-"c:\shared\scummvm\sky.cpt"
 "..\..\..\..\dists\engine-data\igor.tbl"-"c:\shared\scummvm\igor.tbl"
 "..\..\..\..\dists\engine-data\lure.dat"-"c:\shared\scummvm\lure.dat"
+"..\..\..\..\dists\engine-data\drascula.dat"-"c:\shared\scummvm\drascula.dat"
 
 ; Config/log files: 'empty' will automagically be removed on uninstall
 ""-"c:\shared\scummvm\scummvm.ini",FILENULL

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianActions.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianActions.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianActions.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -129,17 +129,20 @@
 	bool is_simon = (strncmp(gameid.c_str(), "simon", 5) == 0);
 	bool is_sword1 = (gameid == "sword1");
 	bool is_sword2 = (strcmp(gameid.c_str(), "sword2") == 0);
-	bool is_sky = (strncmp(gameid.c_str(), "sky", 3) == 0);
-	bool is_saga = (gameid == "saga");
+	bool is_queen = (gameid == "queen");
+	bool is_sky = (gameid == "sky");
 	bool is_comi = (strncmp(gameid.c_str(), "comi", 4) == 0);
-	bool is_queen = (strncmp(gameid.c_str(), "queen", 5) == 0);
 	bool is_gob = (strncmp(gameid.c_str(), "gob", 3) == 0);
-	bool is_kyra = (gameid == "kyra1");
+	bool is_saga = (gameid == "saga");
+	bool is_kyra = (strncmp(gameid.c_str(), "kyra",4) == 0);
 	bool is_samnmax = (gameid == "samnmax");
 	bool is_cine = (gameid == "cine");
 	bool is_touche = (gameid == "touche");
 	bool is_agi = (gameid == "agi");
 	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);
 
 	Actions::initInstanceGame();
 
@@ -150,16 +153,16 @@
 
 
 	// Save
-	if (is_simon || is_sword2 || is_gob || is_kyra || is_touche)
+	if (is_simon || is_sword2 || is_gob || is_kyra || is_touche || is_feeble)
 		_action_enabled[ACTION_SAVE] = false;
 	else {
 		_action_enabled[ACTION_SAVE] = true;
 
 		if (is_queen) {
-			_key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); // F1 key for FOTAQ
+			_key_action[ACTION_SAVE].setKey(Common::ASCII_F1, Common::KEYCODE_F1); // F1 key for FOTAQ
 		} else if (is_sky) {
 			_key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5);
-		} else if (is_cine) {
+		} else if (is_cine || is_drascula) {
 			_key_action[ACTION_SAVE].setKey(Common::ASCII_F10, Common::KEYCODE_F10); // F10
 		} else if (is_agi) {
 			_key_action[ACTION_SAVE].setKey(Common::ASCII_ESCAPE, Common::KEYCODE_ESCAPE);
@@ -175,7 +178,8 @@
 	// Skip text
 	if (!is_cine && !is_parallaction)
 		_action_enabled[ACTION_SKIP_TEXT] = true;
-	if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche)
+	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[ACTION_SKIP_TEXT].setKey(Common::KEYCODE_ESCAPE, Common::KEYCODE_ESCAPE); // Escape key
 	else {
 		_key_action[ACTION_SKIP_TEXT].setKey(SDLK_PERIOD);

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -30,6 +30,7 @@
 #include "backends/platform/symbian/src/SymbianActions.h"
 #include "common/config-manager.h"
 #include "common/events.h"
+#include "common/file.h"
 #include "gui/Actions.h"
 #include "gui/Key.h"
 #include "gui/message.h"
@@ -42,6 +43,10 @@
   #define SAMPLES_PER_SEC 16000
 #endif
 
+
+#define DEFAULT_CONFIG_FILE "scummvm.ini"
+
+
 #define KInputBufferLength 128
 // Symbian libc file functionality in order to provide shared file handles
 struct TSymbianFileEntry {
@@ -122,6 +127,34 @@
 	return &SymbianFilesystemFactory::instance();
 }
 
+static Common::String getDefaultConfigFileName() {
+	char configFile[MAXPATHLEN];
+	strcpy(configFile, Symbian::GetExecutablePath());
+	strcat(configFile, DEFAULT_CONFIG_FILE);
+	return configFile;
+}
+
+Common::SeekableReadStream *OSystem_SDL_Symbian::openConfigFileForReading() {
+	Common::File *confFile = new Common::File();
+	assert(confFile);
+	if (!confFile->open(getDefaultConfigFileName())) {
+		delete confFile;
+		confFile = 0;
+	}
+	return confFile;
+}
+
+Common::WriteStream *OSystem_SDL_Symbian::openConfigFileForWriting() {
+	Common::DumpFile *confFile = new Common::DumpFile();
+	assert(confFile);
+	if (!confFile->open(getDefaultConfigFileName())) {
+		delete confFile;
+		confFile = 0;
+	}
+	return confFile;
+}
+
+
 OSystem_SDL_Symbian::zoneDesc OSystem_SDL_Symbian::_zones[TOTAL_ZONES] = {
         { 0, 0, 320, 145 },
         { 0, 145, 150, 55 },

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -71,6 +71,9 @@
 	static void symbianMixCallback(void *s, byte *samples, int len);
 
 	virtual FilesystemFactory *getFilesystemFactory();
+
+	virtual Common::SeekableReadStream *openConfigFileForReading();
+	virtual Common::WriteStream *openConfigFileForWriting();
 public:
 	// vibration support
 #ifdef USE_VIBRA_SE_PXXX

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/main_features.inl
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/main_features.inl	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/main_features.inl	2008-08-16 00:08:12 UTC (rev 33920)
@@ -27,62 +27,61 @@
 
 // we want a list of supported engines visible in the program,
 // because we also release special builds with only one engine
-#ifndef DISABLE_SCUMM
+#ifdef ENABLE_SCUMM
 	"SCUMM "
 #endif
-#ifndef DISABLE_AGOS
+#ifdef ENABLE_AGOS
 	"AGOS "
 #endif
-#ifndef DISABLE_SKY
+#ifdef ENABLE_SKY
 	"Sky "
 #endif
-#ifndef DISABLE_QUEEN
+#ifdef ENABLE_QUEEN
 	"Queen "
 #endif
-#ifndef DISABLE_GOB
+#ifdef ENABLE_GOB
 	"Gob "
 #endif
-#ifndef DISABLE_SAGA
+#ifdef ENABLE_SAGA
 	"Saga "
 #endif
-#ifndef DISABLE_KYRA
+#ifdef ENABLE_KYRA
 	"Kyra "
 #endif
-#ifndef DISABLE_SWORD1
+#ifdef ENABLE_SWORD1
 	"Sword1 "
 #endif
-#ifndef DISABLE_SWORD2
+#ifdef ENABLE_SWORD2
 	"Sword2 "
 #endif
-#ifndef DISABLE_CINE
+#ifdef ENABLE_CINE
 	"Cine "
 #endif
-#ifndef DISABLE_LURE
+#ifdef ENABLE_LURE
 	"Lure "
 #endif
-#ifndef DISABLE_AGI
+#ifdef ENABLE_AGI
 	"AGI "
 #endif
-#ifndef DISABLE_TOUCHE
+#ifdef ENABLE_TOUCHE
 	"Touche "
 #endif
-#ifndef DISABLE_DRASCULA
+#ifdef ENABLE_DRASCULA
 	"Drascula "
 #endif
-#ifndef DISABLE_IGOR
+#ifdef ENABLE_IGOR
 	"Igor "
 #endif
-#ifndef DISABLE_PARALLACTION
+#ifdef ENABLE_PARALLACTION
 	"Parallaction "
 #endif
-#ifndef DISABLE_CRUISE
+#ifdef ENABLE_CRUISE
 	"Cruise "
 #endif
-#ifndef DISABLE_MADE
+#ifdef ENABLE_MADE
 	"MADE "
 #endif
-
-#ifndef DISABLE_M4
+#ifdef ENABLE_M4
 	"M4 "
 #endif
 

Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/portdefs.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/portdefs.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/portdefs.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -157,5 +157,6 @@
 namespace Symbian {
 extern void FatalError(const char *msg);
 extern char* GetExecutablePath();
+#define DYNAMIC_MODULES 1
 }
 #endif

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wii/Makefile
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wii/Makefile	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wii/Makefile	2008-08-16 00:08:12 UTC (rev 33920)
@@ -1,27 +1,33 @@
+# 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_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 @@
 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 @@
 	@-$(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/
 

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -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 @@
 /*** 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 @@
 
 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 @@
 		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 @@
 	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,10 +160,10 @@
  * StartGX
  ****************************************************************************/
 void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect) {
+	static bool inited = false;
 	Mtx p;
+	GXColor gxbackground = { 0, 0, 0, 0xff };
 
-	GX_AbortFrame();
-
 	/*** Set new aspect ***/
 	square[0] = square[9] = -haspect;
 	square[3] = square[6] = haspect;
@@ -156,10 +172,21 @@
 
 	/*** 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 @@
 
 	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;
 }
 
 /****************************************************************************

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wii/gx_supp.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -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);

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wii/main.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wii/main.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wii/main.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -62,7 +62,9 @@
 	printf("startup\n");
 
 	SYS_SetResetCallback(reset_cb);
+#ifndef GAMECUBE
 	SYS_SetPowerCallback(power_cb);
+#endif
 
 	if (!fatInitDefault()) {
 		printf("fatInitDefault failed\n");
@@ -75,7 +77,7 @@
 		if (!strcmp(buf, "fat:/"))
 			chdir("/apps/scummvm");
 
-		//fatEnableReadAhead(PI_DEFAULT, 32, 128);
+		fatEnableReadAhead(PI_DEFAULT, 32, 128);
 	}
 
 	g_system = new OSystem_Wii();

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -19,9 +19,11 @@
  * 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>
 
 #include <ogc/mutex.h>
@@ -51,8 +53,10 @@
 	_currentHeight(0),
 
 	_supportedGraphicsModes(NULL),
-	_activeGraphicsMode(-1),
+	_activeGraphicsMode(0),
 
+	_fullscreen(false),
+
 	_mouseVisible(false),
 	_mouseX(0),
 	_mouseY(0),
@@ -89,11 +93,17 @@
 
 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 @@
 }
 
 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() {

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -22,9 +22,9 @@
 #ifndef _WII_OSYSTEM_H_
 #define _WII_OSYSTEM_H_
 
+#include "base/main.h"
 #include "common/system.h"
-#include "base/main.h"
-
+#include "common/fs.h"
 #include "common/rect.h"
 #include "common/events.h"
 
@@ -73,6 +73,8 @@
 	OSystem::GraphicsMode *_supportedGraphicsModes;
 	s32 _activeGraphicsMode;
 
+	bool _fullscreen;
+
 	bool _mouseVisible;
 	s32 _mouseX, _mouseY;
 	u32 _mouseWidth, _mouseHeight;
@@ -110,7 +112,6 @@
 	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);

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem_gfx.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem_gfx.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wii/osystem_gfx.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -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 @@
 	_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 @@
 	_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;
+	_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, _overlaySize);
+	_texture = (u16 *) memalign(32, 640 * 480 * 2);
 
-	GX_Start(_overlayWidth, _overlayHeight, 320, 240);
+	setGraphicsMode(_activeGraphicsMode);
 }
 
 void OSystem_Wii::deinitGfx() {
@@ -111,13 +136,24 @@
 	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);
 
-bool OSystem_Wii::setGraphicsMode(int 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;
+
 	return true;
 }
 
@@ -129,6 +165,8 @@
 	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 @@
 			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::setShakePos(int shakeOffset) {
+	GX_SetTexTrans(0, (float) -shakeOffset * ((float) vmode->efbHeight /
+												(float) _currentHeight));
 }
 
 void OSystem_Wii::showOverlay() {

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsPocket.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsPocket.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsPocket.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -121,7 +121,7 @@
 	bool is_comi = (strncmp(gameid.c_str(), "comi", 4) == 0);
 	bool is_gob = (strncmp(gameid.c_str(), "gob", 3) == 0);
 	bool is_saga = (gameid == "saga");
-	bool is_kyra = (gameid == "kyra1");
+	bool is_kyra = (strncmp(gameid.c_str(), "kyra",4) == 0);
 	bool is_samnmax = (gameid == "samnmax");
 	bool is_cine = (gameid == "cine");
 	bool is_touche = (gameid == "touche");
@@ -129,11 +129,13 @@
 	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 @@
 	} 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 @@
 	// 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);
@@ -212,7 +215,7 @@
 }
 
 bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
-	static bool keydialogrunning = false;
+	static bool keydialogrunning = false, quitdialog = false;
 
 	if (!pushed) {
 		switch(action) {
@@ -289,12 +292,14 @@
 			_CESystem->move_cursor_right();
 			return true;
 		case POCKET_ACTION_QUIT:
-			{
+			if (!quitdialog) {
+				quitdialog = true;
 				GUI::MessageDialog alert("   Are you sure you want to quit ?   ", "Yes", "No");
 				if (alert.runModal() == GUI::kMessageOK)
 					_mainSystem->quit();
-				return true;
+				quitdialog = false;
 			}
+			return true;
 		case POCKET_ACTION_BINDKEYS:
 			if (!keydialogrunning) {
 				keydialogrunning = true;

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsSmartphone.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsSmartphone.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/CEActionsSmartphone.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -111,7 +111,7 @@
 	bool is_comi = (strncmp(gameid.c_str(), "comi", 4) == 0);
 	bool is_gob = (strncmp(gameid.c_str(), "gob", 3) == 0);
 	bool is_saga = (gameid == "saga");
-	bool is_kyra = (gameid == "kyra1");
+	bool is_kyra = (strncmp(gameid.c_str(), "kyra",4) == 0);
 	bool is_samnmax = (gameid == "samnmax");
 	bool is_cine = (gameid == "cine");
 	bool is_touche = (gameid == "touche");
@@ -119,11 +119,13 @@
 	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 @@
 	} 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 @@
 	}
 	// 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);
@@ -176,7 +179,7 @@
 }
 
 bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
-	static bool keydialogrunning = false;
+	static bool keydialogrunning = false, quitdialog = false;
 
 	if (!pushed) {
 		switch (action) {
@@ -247,12 +250,14 @@
 			_CESystem->smartphone_rotate_display();
 			return true;
 		case SMARTPHONE_ACTION_QUIT:
-			{
+			if (!quitdialog) {
+				quitdialog = true;
 				GUI::MessageDialog alert("   Are you sure you want to quit ?   ", "Yes", "No");
 				if (alert.runModal() == GUI::kMessageOK)
 					_mainSystem->quit();
-				return true;
+				quitdialog = false;
 			}
+			return true;
 	}
 
 	return false;

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/CEkeys/EventsBuffer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/CEkeys/EventsBuffer.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/CEkeys/EventsBuffer.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -36,9 +36,8 @@
 			key->setKey(key->keycode());
 
 		ev.type = (pushed ? SDL_KEYDOWN : SDL_KEYUP);
-		ev.key.keysym.mod = (SDLMod)key->flags();
+		ev.key.keysym.unicode = (SDLMod)key->flags();	// HACK: put the flags into the unused unicode field
 		ev.key.keysym.sym = (SDLKey)key->keycode();
-		ev.key.keysym.unicode = key->keycode();
 		ev.key.keysym.mod = KMOD_RESERVED;
 		return (SDL_PushEvent(&ev) == 0);
 	}

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/Makefile
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/Makefile	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/Makefile	2008-08-16 00:08:12 UTC (rev 33920)
@@ -34,9 +34,11 @@
 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

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/missing/missing.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/missing/missing.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/missing/missing.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -171,7 +171,7 @@
 	MultiByteToWideChar(CP_ACP, 0, path, -1, fname, sizeof(fname)/sizeof(TCHAR));
 
 	WIN32_FIND_DATA ffd;
-	HANDLE h=FindFirstFile(fname, &ffd);
+	HANDLE h = FindFirstFile(fname, &ffd);
 	FindClose(h);
 
 	if (h == INVALID_HANDLE_VALUE)
@@ -179,12 +179,17 @@
 
 	if (ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) {
 		// WORKAROUND: WinCE (or the emulator) sometimes returns bogus direcotry
-		// hits for files that don't exist. Checking for the same fname twice
+		// hits for files that don't exist. TRIPLE checking for the same fname
 		// seems to weed out those false positives.
-		HANDLE h=FindFirstFile(fname, &ffd);
+		// Exhibited in kyra engine.
+		HANDLE h = FindFirstFile(fname, &ffd);
 		FindClose(h);
 		if (h == INVALID_HANDLE_VALUE)
 			return -1;  //Can't find file
+		h = FindFirstFile(fname, &ffd);
+		FindClose(h);
+		if (h == INVALID_HANDLE_VALUE)
+			return -1;  //Can't find file
 
 		return 0; //Always return success if target is directory and exists
 	}

Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/wince-sdl.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/wince-sdl.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -805,8 +805,16 @@
 		debug(1, "Sound opened OK, mixing at %d Hz", _sampleRate);
 
 		// Re-create mixer to match the output rate
+		int vol1 = _mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType);
+		int vol2 = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType);
+		int vol3 = _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType);
+		int vol4 = _mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType);
 		delete(_mixer);
 		_mixer = new Audio::MixerImpl(this);
+		_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, vol1);
+		_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol2);
+		_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, vol3);
+		_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, vol4);
 		_mixer->setOutputRate(_sampleRate);
 		_mixer->setReady(true);
 		SDL_PauseAudio(0);
@@ -2254,15 +2262,18 @@
 				_lastKeyPressed = 0;
 				event.type = Common::EVENT_PREDICTIVE_DIALOG;
 				return true;
-			}
-
-			event.type = Common::EVENT_KEYDOWN;
+			} 			event.type = Common::EVENT_KEYDOWN;
 			if (!_unfilteredkeys)
 				event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
 			else
 				event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
 			event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
 
+			if (ev.key.keysym.mod == KMOD_RESERVED && ev.key.keysym.unicode == KMOD_SHIFT) {
+				event.kbd.ascii ^= 0x20;
+				event.kbd.flags = Common::KBD_SHIFT;
+			}
+
 			return true;
 
 		case SDL_KEYUP:
@@ -2290,6 +2301,11 @@
 				event.kbd.keycode = (Common::KeyCode)mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
 			event.kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode, _unfilteredkeys);
 
+			if (ev.key.keysym.mod == KMOD_RESERVED && ev.key.keysym.unicode == KMOD_SHIFT) {
+				event.kbd.ascii ^= 0x20;
+				event.kbd.flags = Common::KBD_SHIFT;
+			}
+
 			return true;
 
 		case SDL_MOUSEMOTION:

Modified: scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -41,79 +41,42 @@
 #include <sys/stat.h>
 #endif
 
-
-class StdioSaveFile : public Common::InSaveFile, public Common::OutSaveFile {
-private:
-	FILE *fh;
-public:
-	StdioSaveFile(const char *filename, bool saveOrLoad) {
-		fh = ::fopen(filename, (saveOrLoad? "wb" : "rb"));
-	}
-	~StdioSaveFile() {
-		if (fh)
-			::fclose(fh);
-	}
-
-	bool eos() const { return feof(fh) != 0; }
-	bool ioFailed() const { return ferror(fh) != 0; }
-	void clearIOFailed() { clearerr(fh); }
-
-	bool isOpen() const { return fh != 0; }
-
-	uint32 read(void *dataPtr, uint32 dataSize) {
-		assert(fh);
-		return fread(dataPtr, 1, dataSize, fh);
-	}
-	uint32 write(const void *dataPtr, uint32 dataSize) {
-		assert(fh);
-		return fwrite(dataPtr, 1, dataSize, fh);
-	}
-
-	uint32 pos() const {
-		assert(fh);
-		return ftell(fh);
-	}
-	uint32 size() const {
-		assert(fh);
-		uint32 oldPos = ftell(fh);
-		fseek(fh, 0, SEEK_END);
-		uint32 length = ftell(fh);
-		fseek(fh, oldPos, SEEK_SET);
-		return length;
-	}
-
-	void seek(int32 offs, int whence = SEEK_SET) {
-		assert(fh);
-		fseek(fh, offs, whence);
-	}
-};
-
-static void join_paths(const char *filename, const char *directory,
-								 char *buf, int bufsize) {
-	buf[bufsize-1] = '\0';
-	strncpy(buf, directory, bufsize-1);
-
-#ifdef WIN32
-	// Fix for Win98 issue related with game directory pointing to root drive ex. "c:\"
-	if ((buf[0] != 0) && (buf[1] == ':') && (buf[2] == '\\') && (buf[3] == 0)) {
-		buf[2] = 0;
-	}
+#ifdef UNIX
+#ifdef MACOSX
+#define DEFAULT_SAVE_PATH "Documents/ScummVM Savegames"
+#else
+#define DEFAULT_SAVE_PATH ".scummvm"
 #endif
-
-	const int dirLen = strlen(buf);
-
-	if (dirLen > 0) {
-#if defined(__MORPHOS__) || defined(__amigaos4__)
-		if (buf[dirLen-1] != ':' && buf[dirLen-1] != '/')
+#elif defined(__SYMBIAN32__)
+#define DEFAULT_SAVE_PATH "Savegames"
 #endif
 
-#if !defined(__GP32__)
-		strncat(buf, "/", bufsize-1);	// prevent double /
-#endif
+DefaultSaveFileManager::DefaultSaveFileManager() {
+	// Register default savepath
+	// TODO: Remove this code here, and instead leave setting the
+	// default savepath to the ports using this class.
+#ifdef DEFAULT_SAVE_PATH
+	Common::String savePath;
+#if defined(UNIX) && !defined(IPHONE)
+	const char *home = getenv("HOME");
+	if (home && *home && strlen(home) < MAXPATHLEN) {
+		savePath = home;
+		savePath += "/" DEFAULT_SAVE_PATH;
+		ConfMan.registerDefault("savepath", savePath);
 	}
-	strncat(buf, filename, bufsize-1);
+#elif defined(__SYMBIAN32__)
+	savePath = Symbian::GetExecutablePath();
+	savePath += DEFAULT_SAVE_PATH "\\";
+	ConfMan.registerDefault("savepath", savePath);
+#endif
+#endif // #ifdef DEFAULT_SAVE_PATH
 }
 
+DefaultSaveFileManager::DefaultSaveFileManager(const Common::String &defaultSavepath) {
+	ConfMan.registerDefault("savepath", defaultSavepath);
+}
+
+
 Common::StringList DefaultSaveFileManager::listSavefiles(const char *pattern) {
 	FilesystemNode savePath(getSavePath());
 	FSList savefiles;
@@ -129,7 +92,8 @@
 	return results;
 }
 
-void DefaultSaveFileManager::checkPath(const Common::String &path) {
+void DefaultSaveFileManager::checkPath(const FilesystemNode &dir) {
+	const Common::String path = dir.getPath();
 	clearError();
 
 #if defined(UNIX) || defined(__SYMBIAN32__)
@@ -196,23 +160,27 @@
 			setError(SFM_DIR_NOTDIR, "The given savepath is not a directory: "+path);
 		}
 	}
+#else
+	if (!dir.exists()) {
+		// TODO: We could try to mkdir the directory here; or rather, we could
+		// add a mkdir method to FilesystemNode and invoke that here.
+		setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+path);
+	} else if (!dir.isDirectory()) {
+		setError(SFM_DIR_NOTDIR, "The given savepath is not a directory: "+path);
+	}
 #endif
 }
 
 Common::InSaveFile *DefaultSaveFileManager::openForLoading(const char *filename) {
 	// Ensure that the savepath is valid. If not, generate an appropriate error.
-	char buf[256];
-	Common::String savePath = getSavePath();
+	FilesystemNode savePath(getSavePath());
 	checkPath(savePath);
 
 	if (getError() == SFM_NO_ERROR) {
-		join_paths(filename, savePath.c_str(), buf, sizeof(buf));
-		StdioSaveFile *sf = new StdioSaveFile(buf, false);
+		FilesystemNode file = savePath.getChild(filename);
 
-		if (!sf->isOpen()) {
-			delete sf;
-			sf = 0;
-		}
+		// Open the file for reading
+		Common::SeekableReadStream *sf = file.openForReading();
 
 		return wrapInSaveFile(sf);
 	} else {
@@ -222,18 +190,14 @@
 
 Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) {
 	// Ensure that the savepath is valid. If not, generate an appropriate error.
-	char buf[256];
-	Common::String savePath = getSavePath();
+	FilesystemNode savePath(getSavePath());
 	checkPath(savePath);
 
 	if (getError() == SFM_NO_ERROR) {
-		join_paths(filename, savePath.c_str(), buf, sizeof(buf));
-		StdioSaveFile *sf = new StdioSaveFile(buf, true);
+		FilesystemNode file = savePath.getChild(filename);
 
-		if (!sf->isOpen()) {
-			delete sf;
-			sf = 0;
-		}
+		// Open the file for saving
+		Common::WriteStream *sf = file.openForWriting();
 
 		return wrapOutSaveFile(sf);
 	} else {
@@ -242,18 +206,19 @@
 }
 
 bool DefaultSaveFileManager::removeSavefile(const char *filename) {
-	char buf[256];
 	clearError();
-	Common::String filenameStr;
-	join_paths(filename, getSavePath().c_str(), buf, sizeof(buf));
 
-	if (remove(buf) != 0) {
+	FilesystemNode savePath(getSavePath());
+	FilesystemNode file = savePath.getChild(filename);
+
+	// TODO: Add new method FilesystemNode::remove()
+	if (remove(file.getPath().c_str()) != 0) {
 #ifndef _WIN32_WCE
 		if (errno == EACCES)
-			setError(SFM_DIR_ACCESS, "Search or write permission denied: "+filenameStr);
+			setError(SFM_DIR_ACCESS, "Search or write permission denied: "+file.getName());
 
 		if (errno == ENOENT)
-			setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+filenameStr);
+			setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+file.getName());
 #endif
 		return false;
 	} else {

Modified: scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -34,6 +34,9 @@
  */
 class DefaultSaveFileManager : public Common::SaveFileManager {
 public:
+	DefaultSaveFileManager();
+	DefaultSaveFileManager(const Common::String &defaultSavepath);
+
 	virtual Common::StringList listSavefiles(const char *pattern);
 	virtual Common::InSaveFile *openForLoading(const char *filename);
 	virtual Common::OutSaveFile *openForSaving(const char *filename);
@@ -51,7 +54,7 @@
 	 * Checks the given path for read access, existence, etc.
 	 * Sets the internal error and error message accordingly.
 	 */
-	void checkPath(const Common::String &path);
+	void checkPath(const FilesystemNode &dir);
 };
 
 #endif

Modified: scummvm/branches/gsoc2008-gui/base/commandLine.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/base/commandLine.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/base/commandLine.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -34,22 +34,6 @@
 
 #include "sound/mididrv.h"
 
-#ifdef IPHONE
-#include "backends/platform/iphone/osys_iphone.h"
-#endif
-
-#ifdef UNIX
-#ifdef MACOSX
-#define DEFAULT_SAVE_PATH "Documents/ScummVM Savegames"
-#else
-#define DEFAULT_SAVE_PATH ".scummvm"
-#endif
-#elif defined(__SYMBIAN32__)
-#define DEFAULT_SAVE_PATH "Savegames"
-#elif defined(PALMOS_MODE)
-#define DEFAULT_SAVE_PATH "/PALM/Programs/ScummVM/Saved"
-#endif
-
 #define DETECTOR_TESTING_HACK
 
 namespace Base {
@@ -181,9 +165,6 @@
 
 	// Game specific
 	ConfMan.registerDefault("path", "");
-	ConfMan.registerDefault("savepath", "");
-
-//	ConfMan.registerDefault("amiga", false);
 	ConfMan.registerDefault("platform", Common::kPlatformPC);
 	ConfMan.registerDefault("language", "en");
 	ConfMan.registerDefault("subtitles", false);
@@ -212,32 +193,7 @@
 	ConfMan.registerDefault("joystick_num", -1);
 	ConfMan.registerDefault("confirm_exit", false);
 	ConfMan.registerDefault("disable_sdl_parachute", false);
-#ifdef USE_ALSA
-	ConfMan.registerDefault("alsa_port", "65:0");
-#endif
 
-	// Register default savepath
-#ifdef DEFAULT_SAVE_PATH
-	char savePath[MAXPATHLEN];
-#if defined(UNIX) && !defined(IPHONE)
-	const char *home = getenv("HOME");
-	if (home && *home && strlen(home) < MAXPATHLEN) {
-		snprintf(savePath, MAXPATHLEN, "%s/%s", home, DEFAULT_SAVE_PATH);
-		ConfMan.registerDefault("savepath", savePath);
-	}
-#elif defined(__SYMBIAN32__)
-	strcpy(savePath, Symbian::GetExecutablePath());
-	strcat(savePath, DEFAULT_SAVE_PATH);
-	strcat(savePath, "\\");
-	ConfMan.registerDefault("savepath", savePath);
-#elif defined (IPHONE)
-	ConfMan.registerDefault("savepath", OSystem_IPHONE::getSavePath());
-
-#elif defined(PALMOS_MODE)
-	ConfMan.registerDefault("savepath", DEFAULT_SAVE_PATH);
-#endif
-#endif // #ifdef DEFAULT_SAVE_PATH
-
 	ConfMan.registerDefault("record_mode", "none");
 	ConfMan.registerDefault("record_file_name", "record.bin");
 	ConfMan.registerDefault("record_temp_file_name", "record.tmp");

Modified: scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -94,6 +94,8 @@
 
 			warning("Target upgraded from %s to %s", o->from, o->to);
 
+			// WORKAROUND: Fix for bug #1719463: "DETECTOR: Launching
+			// undefined target adds launcher entry"
 			if (ConfMan.hasKey("id_came_from_command_line")) {
 				warning("Target came from command line. Skipping save");
 			} else {

Modified: scummvm/branches/gsoc2008-gui/common/config-manager.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/config-manager.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/config-manager.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -23,38 +23,13 @@
  *
  */
 
-#if defined(WIN32)
-#include <windows.h>
-// winnt.h defines ARRAYSIZE, but we want our own one...
-#undef ARRAYSIZE
-#endif
-
 #include "common/config-manager.h"
 #include "common/file.h"
 #include "common/util.h"
+#include "common/system.h"
 
 DECLARE_SINGLETON(Common::ConfigManager);
 
-#ifdef __PLAYSTATION2__
-#include "backends/platform/ps2/systemps2.h"
-#endif
-
-#ifdef IPHONE
-#include "backends/platform/iphone/osys_iphone.h"
-#endif
-
-#if defined(UNIX)
-#ifdef MACOSX
-#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
-#else
-#define DEFAULT_CONFIG_FILE ".scummvmrc"
-#endif
-#else
-#define DEFAULT_CONFIG_FILE "scummvm.ini"
-#endif
-
-#define MAXLINELEN 256
-
 static bool isValidDomainName(const Common::String &domName) {
 	const char *p = domName.c_str();
 	while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
@@ -85,238 +60,180 @@
 
 
 void ConfigManager::loadDefaultConfigFile() {
-	char configFile[MAXPATHLEN];
-	// GP2X is Linux based but Home dir can be read only so do not use it and put the config in the executable dir.
-	// On the iPhone, the home dir of the user when you launch the app from the Springboard, is /. Which we don't want.
-#if defined(UNIX) && !defined(GP2X) && !defined(IPHONE)
-	const char *home = getenv("HOME");
-	if (home != NULL && strlen(home) < MAXPATHLEN)
-		snprintf(configFile, MAXPATHLEN, "%s/%s", home, DEFAULT_CONFIG_FILE);
-	else
-		strcpy(configFile, DEFAULT_CONFIG_FILE);
-#else
-	#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
-		OSVERSIONINFO win32OsVersion;
-		ZeroMemory(&win32OsVersion, sizeof(OSVERSIONINFO));
-		win32OsVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-		GetVersionEx(&win32OsVersion);
-		// Check for non-9X version of Windows.
-		if (win32OsVersion.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
-			// Use the Application Data directory of the user profile.
-			if (win32OsVersion.dwMajorVersion >= 5) {
-				if (!GetEnvironmentVariable("APPDATA", configFile, sizeof(configFile)))
-					error("Unable to access application data directory");
-			} else {
-				if (!GetEnvironmentVariable("USERPROFILE", configFile, sizeof(configFile)))
-					error("Unable to access user profile directory");
+	// Open the default config file
+	SeekableReadStream *stream = g_system->openConfigFileForReading();
+	_filename.clear();	// clear the filename to indicate that we are using the default config file
 
-				strcat(configFile, "\\Application Data");
-				CreateDirectory(configFile, NULL);
-			}
+	// ... load it, if available ...
+	if (stream)
+		loadFromStream(*stream);
+	
+	// ... and close it again.
+	delete stream;
 
-			strcat(configFile, "\\ScummVM");
-			CreateDirectory(configFile, NULL);
-			strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
-
-			if (fopen(configFile, "r") == NULL) {
-				// Check windows directory
-				char oldConfigFile[MAXPATHLEN];
-				GetWindowsDirectory(oldConfigFile, MAXPATHLEN);
-				strcat(oldConfigFile, "\\" DEFAULT_CONFIG_FILE);
-				if (fopen(oldConfigFile, "r")) {
-					printf("The default location of the config file (scummvm.ini) in ScummVM has changed,\n");
-					printf("under Windows NT4/2000/XP/Vista. You may want to consider moving your config\n");
-					printf("file from the old default location:\n");
-					printf("%s\n", oldConfigFile);
-					printf("to the new default location:\n");
-					printf("%s\n\n", configFile);
-					strcpy(configFile, oldConfigFile);
-				}
-			}
-		} else {
-			// Check windows directory
-			GetWindowsDirectory(configFile, MAXPATHLEN);
-			strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
-		}
-
-	#elif defined(PALMOS_MODE)
-		strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE);
-	#elif defined(IPHONE)
-		strcpy(configFile, OSystem_IPHONE::getConfigPath());	
-	#elif defined(__PLAYSTATION2__)
-		((OSystem_PS2*)g_system)->makeConfigPath(configFile);
-	#elif defined(__PSP__)
-		strcpy(configFile, "ms0:/" DEFAULT_CONFIG_FILE);
-	#elif defined (__SYMBIAN32__)
-		strcpy(configFile, Symbian::GetExecutablePath());
-		strcat(configFile, DEFAULT_CONFIG_FILE);
-	#else
-		strcpy(configFile, DEFAULT_CONFIG_FILE);
-	#endif
-#endif
-
-	loadConfigFile(configFile);
 	flushToDisk();
 }
 
 void ConfigManager::loadConfigFile(const String &filename) {
-	_appDomain.clear();
-	_gameDomains.clear();
-	_transientDomain.clear();
-
 	_filename = filename;
-	_domainSaveOrder.clear();
-	loadFile(_filename);
-	printf("Using configuration file: %s\n", _filename.c_str());
-}
 
-void ConfigManager::loadFile(const String &filename) {
 	File cfg_file;
-
 	if (!cfg_file.open(filename)) {
 		printf("Creating configuration file: %s\n", filename.c_str());
 	} else {
-		String domain;
-		String comment;
-		int lineno = 0;
+		printf("Using configuration file: %s\n", _filename.c_str());
+		loadFromStream(cfg_file);
+	}
+}
 
-		// TODO: Detect if a domain occurs multiple times (or likewise, if
-		// a key occurs multiple times inside one domain).
+void ConfigManager::loadFromStream(SeekableReadStream &stream) {
+	String domain;
+	String comment;
+	int lineno = 0;
 
-		while (!cfg_file.eof() && !cfg_file.ioFailed()) {
-			lineno++;
+	_appDomain.clear();
+	_gameDomains.clear();
+	_transientDomain.clear();
+	_domainSaveOrder.clear();
 
-			// Read a line
-			String line;
-			while (line.lastChar() != '\n') {
-				char buf[MAXLINELEN];
-				if (!cfg_file.readLine_NEW(buf, MAXLINELEN))
-					break;
-				line += buf;
-			}
+	// TODO: Detect if a domain occurs multiple times (or likewise, if
+	// a key occurs multiple times inside one domain).
 
-			if (line.size() == 0) {
-				// Do nothing
-			} else if (line[0] == '#') {
-				// Accumulate comments here. Once we encounter either the start
-				// of a new domain, or a key-value-pair, we associate the value
-				// of the 'comment' variable with that entity.
-				comment += line;
-			} else if (line[0] == '[') {
-				// It's a new domain which begins here.
-				const char *p = line.c_str() + 1;
-				// Get the domain name, and check whether it's valid (that
-				// is, verify that it only consists of alphanumerics,
-				// dashes and underscores).
-				while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
-					p++;
+	while (!stream.eos() && !stream.ioFailed()) {
+		lineno++;
 
-				switch (*p) {
-				case '\0':
-					error("Config file buggy: missing ] in line %d", lineno);
-					break;
-				case ']':
-					domain = String(line.c_str() + 1, p - (line.c_str() + 1));
-					//domain = String(line.c_str() + 1, p);	// TODO: Pending Common::String changes
-					break;
-				default:
-					error("Config file buggy: Invalid character '%c' occured in domain name in line %d", *p, lineno);
-				}
+		// Read a line
+		String line;
+		while (line.lastChar() != '\n') {
+			char buf[256];
+			if (!stream.readLine_NEW(buf, 256))
+				break;
+			line += buf;
+		}
 
-				// Store domain comment
-				if (domain == kApplicationDomain) {
-					_appDomain.setDomainComment(comment);
-				} else {
-					_gameDomains[domain].setDomainComment(comment);
-				}
-				comment.clear();
+		if (line.size() == 0) {
+			// Do nothing
+		} else if (line[0] == '#') {
+			// Accumulate comments here. Once we encounter either the start
+			// of a new domain, or a key-value-pair, we associate the value
+			// of the 'comment' variable with that entity.
+			comment += line;
+		} else if (line[0] == '[') {
+			// It's a new domain which begins here.
+			const char *p = line.c_str() + 1;
+			// Get the domain name, and check whether it's valid (that
+			// is, verify that it only consists of alphanumerics,
+			// dashes and underscores).
+			while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
+				p++;
 
-				_domainSaveOrder.push_back(domain);
-			} else {
-				// This line should be a line with a 'key=value' pair, or an empty one.
-				
-				// Skip leading whitespaces
-				const char *t = line.c_str();
-				while (isspace(*t))
-					t++;
+			if (*p == '\0')
+				error("Config file buggy: missing ] in line %d", lineno);
+			else if (*p != ']')
+				error("Config file buggy: Invalid character '%c' occured in section name in line %d", *p, lineno);
 
-				// Skip empty lines / lines with only whitespace
-				if (*t == 0)
-					continue;
+			domain = String(line.c_str() + 1, p);
 
-				// If no domain has been set, this config file is invalid!
-				if (domain.empty()) {
-					error("Config file buggy: Key/value pair found outside a domain in line %d", lineno);
-				}
+			// Store domain comment
+			if (domain == kApplicationDomain) {
+				_appDomain.setDomainComment(comment);
+			} else {
+				_gameDomains[domain].setDomainComment(comment);
+			}
+			comment.clear();
 
-				// Split string at '=' into 'key' and 'value'. First, find the "=" delimeter.
-				const char *p = strchr(t, '=');
-				if (!p)
-					error("Config file buggy: Junk found in line line %d: '%s'", lineno, t);
+			_domainSaveOrder.push_back(domain);
+		} else {
+			// This line should be a line with a 'key=value' pair, or an empty one.
+			
+			// Skip leading whitespaces
+			const char *t = line.c_str();
+			while (isspace(*t))
+				t++;
 
-				// Trim spaces before the '=' to obtain the key
-				const char *p2 = p;
-				while (p2 > t && isspace(*(p2-1)))
-					p2--;
-				String key(t, p2 - t);
-				
-				// Skip spaces after the '='
-				t = p + 1;
-				while (isspace(*t))
-					t++;
+			// Skip empty lines / lines with only whitespace
+			if (*t == 0)
+				continue;
 
-				// Trim trailing spaces
-				p2 = t + strlen(t);
-				while (p2 > t && isspace(*(p2-1)))
-					p2--;
+			// If no domain has been set, this config file is invalid!
+			if (domain.empty()) {
+				error("Config file buggy: Key/value pair found outside a domain in line %d", lineno);
+			}
 
-				String value(t, p2 - t);
+			// Split string at '=' into 'key' and 'value'. First, find the "=" delimeter.
+			const char *p = strchr(t, '=');
+			if (!p)
+				error("Config file buggy: Junk found in line line %d: '%s'", lineno, t);
 
-				// Finally, store the key/value pair in the active domain
-				set(key, value, domain);
+			// Extract the key/value pair
+			String key(t, p);
+			String value(p + 1);
+			
+			// Trim of spaces
+			key.trim();
+			value.trim();
 
-				// Store comment
-				if (domain == kApplicationDomain) {
-					_appDomain.setKVComment(key, comment);
-				} else {
-					_gameDomains[domain].setKVComment(key, comment);
-				}
-				comment.clear();
+			// Finally, store the key/value pair in the active domain
+			set(key, value, domain);
+
+			// Store comment
+			if (domain == kApplicationDomain) {
+				_appDomain.setKVComment(key, comment);
+			} else {
+				_gameDomains[domain].setKVComment(key, comment);
 			}
+			comment.clear();
 		}
 	}
 }
 
 void ConfigManager::flushToDisk() {
 #ifndef __DC__
-	DumpFile cfg_file;
+	WriteStream *stream;
 
-	if (!cfg_file.open(_filename)) {
-		warning("Unable to write configuration file: %s", _filename.c_str());
+	if (_filename.empty()) {
+		// Write to the default config file
+		stream = g_system->openConfigFileForWriting();
+		if (!stream)	// If writing to the config file is not possible, do nothing
+			return;
 	} else {
-		// First write the domains in _domainSaveOrder, in that order.
-		// Note: It's possible for _domainSaveOrder to list domains which
-		// are not present anymore.
-		StringList::const_iterator i;
-		for (i = _domainSaveOrder.begin(); i != _domainSaveOrder.end(); ++i) {
-			if (kApplicationDomain == *i) {
-				writeDomain(cfg_file, *i, _appDomain);
-			} else if (_gameDomains.contains(*i)) {
-				writeDomain(cfg_file, *i, _gameDomains[*i]);
-			}
+		DumpFile *dump = new DumpFile();
+		assert(dump);
+
+		if (!dump->open(_filename)) {
+			warning("Unable to write configuration file: %s", _filename.c_str());
+			delete dump;
+			return;
 		}
+		
+		stream = dump;
+	}
 
-		DomainMap::const_iterator d;
+	// First write the domains in _domainSaveOrder, in that order.
+	// Note: It's possible for _domainSaveOrder to list domains which
+	// are not present anymore.
+	StringList::const_iterator i;
+	for (i = _domainSaveOrder.begin(); i != _domainSaveOrder.end(); ++i) {
+		if (kApplicationDomain == *i) {
+			writeDomain(*stream, *i, _appDomain);
+		} else if (_gameDomains.contains(*i)) {
+			writeDomain(*stream, *i, _gameDomains[*i]);
+		}
+	}
 
+	DomainMap::const_iterator d;
 
-		// Now write the domains which haven't been written yet
-		if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), kApplicationDomain) == _domainSaveOrder.end())
-			writeDomain(cfg_file, kApplicationDomain, _appDomain);
-		for (d = _gameDomains.begin(); d != _gameDomains.end(); ++d) {
-			if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), d->_key) == _domainSaveOrder.end())
-				writeDomain(cfg_file, d->_key, d->_value);
-		}
+
+	// Now write the domains which haven't been written yet
+	if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), kApplicationDomain) == _domainSaveOrder.end())
+		writeDomain(*stream, kApplicationDomain, _appDomain);
+	for (d = _gameDomains.begin(); d != _gameDomains.end(); ++d) {
+		if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), d->_key) == _domainSaveOrder.end())
+			writeDomain(*stream, d->_key, d->_value);
 	}
+
+	delete stream;
+
 #endif // !__DC__
 }
 
@@ -324,6 +241,12 @@
 	if (domain.empty())
 		return;		// Don't bother writing empty domains.
 
+	// WORKAROUND: Fix for bug #1972625 "ALL: On-the-fly targets are
+	// written to the config file": Do not save domains that came from
+	// the command line
+	if (domain.contains("id_came_from_command_line"))
+		return;
+
 	String comment;
 
 	// Write domain comment (if any)

Modified: scummvm/branches/gsoc2008-gui/common/config-manager.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/config-manager.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/config-manager.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -36,8 +36,8 @@
 namespace Common {
 
 class WriteStream;
+class SeekableReadStream;
 
-
 /**
  * The (singleton) configuration manager, used to query & set configuration
  * values using string keys.
@@ -144,19 +144,11 @@
 	bool				hasGameDomain(const String &domName) const;
 	const DomainMap &	getGameDomains() const { return _gameDomains; }
 
-/*
-	TODO: Callback/change notification system
-	typedef void (*ConfigCallback)(const ConstString &key, void *refCon);
-
-	void   registerCallback(ConfigCallback cfgc, void *refCon, const ConstString &key = String::emptyString)
-	void unregisterCallback(ConfigCallback cfgc, const ConstString &key = String::emptyString)
-*/
-
 private:
 	friend class Singleton<SingletonBaseType>;
 	ConfigManager();
 
-	void			loadFile(const String &filename);
+	void			loadFromStream(SeekableReadStream &stream);
 	void			writeDomain(WriteStream &stream, const String &name, const Domain &domain);
 
 	Domain			_transientDomain;

Modified: scummvm/branches/gsoc2008-gui/common/file.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/file.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/file.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -494,6 +494,28 @@
 	return _handle != NULL;
 }
 
+bool DumpFile::open(const FilesystemNode &node) {
+	assert(!_handle);
+
+	if (node.isDirectory()) {
+		warning("File::open: Trying to open a FilesystemNode which is a directory");
+		return false;
+	} /*else if (!node.isReadable() && mode == kFileReadMode) {
+		warning("File::open: Trying to open an unreadable FilesystemNode object for reading");
+		return false;
+	} else if (!node.isWritable() && mode == kFileWriteMode) {
+		warning("File::open: Trying to open an unwritable FilesystemNode object for writing");
+		return false;
+	}*/
+
+	_handle = fopen(node.getPath().c_str(), "wb");
+
+	if (_handle == NULL)
+		debug(2, "File %s not found", node.getName().c_str());
+
+	return _handle != NULL;
+}
+
 void DumpFile::close() {
 	if (_handle)
 		fclose((FILE *)_handle);
@@ -528,5 +550,12 @@
 	return (uint32)fwrite(ptr, 1, len, (FILE *)_handle);
 }
 
+void DumpFile::flush() {
+	assert(_handle);
+	// TODO: Should check the return value of fflush, and if it is non-zero,
+	// check errno and set an error flag.
+	fflush((FILE *)_handle);
+}
 
+
 }	// End of namespace Common

Modified: scummvm/branches/gsoc2008-gui/common/file.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/file.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/file.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -125,7 +125,7 @@
 	virtual ~DumpFile();
 
 	virtual bool open(const String &filename);
-	//virtual bool open(const FilesystemNode &node);
+	virtual bool open(const FilesystemNode &node);
 
 	virtual void close();
 
@@ -148,7 +148,9 @@
 	 */
 	virtual bool eof() const;
 
-	uint32 write(const void *dataPtr, uint32 dataSize);
+	virtual uint32 write(const void *dataPtr, uint32 dataSize);
+
+	virtual void flush();
 };
 
 

Modified: scummvm/branches/gsoc2008-gui/common/fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/fs.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/fs.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -23,10 +23,13 @@
  */
 
 #include "common/util.h"
+#include "common/file.h"
 #include "common/system.h"
 #include "backends/fs/abstract-fs.h"
 #include "backends/fs/fs-factory.h"
 
+//namespace Common {
+
 FilesystemNode::FilesystemNode() {
 }
 
@@ -170,3 +173,41 @@
 
 	return !results.empty();
 }
+
+Common::SeekableReadStream *FilesystemNode::openForReading() {
+	if (_realNode == 0)
+		return 0;
+#if 0
+	return _realNode->openForReading();
+#else
+	// FIXME: Until we support openForReading in AbstractFilesystemNode,
+	// we just use Common::File.
+	Common::File *confFile = new Common::File();
+	assert(confFile);
+	if (!confFile->open(*this)) {
+		delete confFile;
+		confFile = 0;
+	}
+	return confFile;
+#endif
+}
+
+Common::WriteStream *FilesystemNode::openForWriting() {
+	if (_realNode == 0)
+		return 0;
+#if 0
+	return _realNode->openForWriting();
+#else
+	// FIXME: Until we support openForWriting in AbstractFilesystemNode,
+	// we just use Common::DumpFile.
+	Common::DumpFile *confFile = new Common::DumpFile();
+	assert(confFile);
+	if (!confFile->open(*this)) {
+		delete confFile;
+		confFile = 0;
+	}
+	return confFile;
+#endif
+}
+
+//}	// End of namespace Common

Modified: scummvm/branches/gsoc2008-gui/common/fs.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/fs.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/fs.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -29,10 +29,18 @@
 #include "common/ptr.h"
 #include "common/str.h"
 
+class AbstractFilesystemNode;
+
+namespace Common {
+	class SeekableReadStream;
+	class WriteStream;
+}
+
 //namespace Common {
 
 class FilesystemNode;
-class AbstractFilesystemNode;
+//class SeekableReadStream;
+//class WriteStream;
 
 /**
  * List of multiple file system nodes. E.g. the contents of a given directory.
@@ -49,22 +57,6 @@
  * To this end, we abstract away from paths; implementations can be based on
  * paths (and it's left to them whether / or \ or : is the path separator :-);
  * but it is also possible to use inodes or vrefs (MacOS 9) or anything else.
- *
- * NOTE: Backends still have to provide a way to extract a path from a FSIntern
- *
- * You may ask now: "isn't this cheating? Why do we go through all this when we use
- * a path in the end anyway?!?".
- * Well, for once as long as we don't provide our own file open/read/write API, we
- * still have to use fopen(). Since all our targets already support fopen(), it should
- * be possible to get a fopen() compatible string for any file system node.
- *
- * Secondly, with this abstraction layer, we still avoid a lot of complications based on
- * differences in FS roots, different path separators, or even systems with no real
- * paths (MacOS 9 doesn't even have the notion of a "current directory").
- * And if we ever want to support devices with no FS in the classical sense (Palm...),
- * we can build upon this.
- *
- * This class acts as a wrapper around the AbstractFilesystemNode class defined in backends/fs.
  */
 class FilesystemNode {
 private:
@@ -108,9 +100,9 @@
 	bool operator<(const FilesystemNode& node) const;
 
 	/**
-	 * Indicates whether the object referred by this path exists in the filesystem or not.
+	 * Indicates whether the object referred by this node exists in the filesystem or not.
 	 *
-	 * @return bool true if the path exists, false otherwise.
+	 * @return bool true if the node exists, false otherwise.
 	 */
 	virtual bool exists() const;
 
@@ -168,7 +160,7 @@
 	FilesystemNode getParent() const;
 
 	/**
-	 * Indicates whether the path refers to a directory or not.
+	 * Indicates whether the node refers to a directory or not.
 	 *
 	 * @todo Currently we assume that a node that is not a directory
 	 * automatically is a file (ignoring things like symlinks or pipes).
@@ -179,28 +171,28 @@
 	virtual bool isDirectory() const;
 
 	/**
-	 * Indicates whether the object referred by this path can be read from or not.
+	 * Indicates whether the object referred by this node can be read from or not.
 	 *
-	 * If the path refers to a directory, readability implies being able to read
+	 * If the node refers to a directory, readability implies being able to read
 	 * and list the directory entries.
 	 *
-	 * If the path refers to a file, readability implies being able to read the
+	 * If the node refers to a file, readability implies being able to read the
 	 * contents of the file.
 	 *
-	 * @return bool true if the object can be read, false otherwise.
+	 * @return true if the object can be read, false otherwise.
 	 */
 	virtual bool isReadable() const;
 
 	/**
-	 * Indicates whether the object referred by this path can be written to or not.
+	 * Indicates whether the object referred by this node can be written to or not.
 	 *
-	 * If the path refers to a directory, writability implies being able to modify
+	 * If the node refers to a directory, writability implies being able to modify
 	 * the directory entry (i.e. rename the directory, remove it or write files inside of it).
 	 *
-	 * If the path refers to a file, writability implies being able to write data
+	 * If the node refers to a file, writability implies being able to write data
 	 * to the file.
 	 *
-	 * @return bool true if the object can be written to, false otherwise.
+	 * @return true if the object can be written to, false otherwise.
 	 */
 	virtual bool isWritable() const;
 
@@ -221,6 +213,25 @@
 	 * @return true if matches could be found, false otherwise.
 	 */
 	virtual bool lookupFile(FSList &results, const Common::String &pattern, bool hidden, bool exhaustive, int depth = -1) const;
+	
+	
+	/**
+	 * Creates a SeekableReadStream instance corresponding to the file
+	 * referred by this node. This assumes that the node actually refers
+	 * to a readable file. If this is not the case, 0 is returned.
+	 *
+	 * @return pointer to the stream object, 0 in case of a failure
+	 */
+	virtual Common::SeekableReadStream *openForReading();
+
+	/**
+	 * Creates a WriteStream instance corresponding to the file
+	 * referred by this node. This assumes that the node actually refers
+	 * to a readable file. If this is not the case, 0 is returned.
+	 *
+	 * @return pointer to the stream object, 0 in case of a failure
+	 */
+	virtual Common::WriteStream *openForWriting();
 };
 
 //} // End of namespace Common

Modified: scummvm/branches/gsoc2008-gui/common/hashmap.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/hashmap.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/hashmap.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -58,21 +58,19 @@
 #include "common/str.h"
 #include "common/util.h"
 
-// FIXME: Since this define is very system dependant, 
-// it should be moved to the appropriate H file instead.
-// Portdefs might be a good location for example
-#if !defined(__SYMBIAN32__)
 #define USE_HASHMAP_MEMORY_POOL
-#endif
-
 #ifdef USE_HASHMAP_MEMORY_POOL
 #include "common/memorypool.h"
 // FIXME: we sadly can't assume standard C++ to be present
 // on every system we support, so we should get rid of this.
 // The solution should be to write a simple placement new
 // on our own.
+
+// Symbian does not have <new> but the new operator 
+#if !defined(__SYMBIAN32__) 
 #include <new>
 #endif
+#endif
 
 namespace Common {
 

Modified: scummvm/branches/gsoc2008-gui/common/savefile.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/savefile.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/savefile.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -39,27 +39,14 @@
  * That typically means "save games", but also includes things like the
  * IQ points in Indy3.
  */
-class InSaveFile : public SeekableReadStream {};
+typedef SeekableReadStream InSaveFile;
 
 /**
  * A class which allows game engines to save game state data.
  * That typically means "save games", but also includes things like the
  * IQ points in Indy3.
  */
-class OutSaveFile : public WriteStream {
-public:
-	/**
-	 * Close this savefile, to be called right before destruction of this
-	 * savefile. The idea is that this ways, I/O errors that occur
-	 * during closing/flushing of the file can still be handled by the
-	 * game engine.
-	 *
-	 * By default, this just flushes the stream.
-	 */
-	virtual void finalize() {
-		flush();
-	}
-};
+typedef WriteStream OutSaveFile;
 
 
 /**

Modified: scummvm/branches/gsoc2008-gui/common/stream.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/stream.h	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/stream.h	2008-08-16 00:08:12 UTC (rev 33920)
@@ -78,6 +78,22 @@
 	 */
 	virtual void flush() {}
 
+	/**
+	 * Finalize and close this stream. To be called right before this
+	 * stream instance is deleted. The goal here is to enable calling
+	 * code to detect and handle I/O errors which might occur when
+	 * closing (and this flushing, if buffered) the stream.
+	 *
+	 * After this method has been called, no further writes may be
+	 * peformed on the stream. Calling ioFailed() is allowed.
+	 *
+	 * By default, this just flushes the stream.
+	 */
+	virtual void finalize() {
+		flush();
+	}
+
+
 	// The remaining methods all have default implementations; subclasses
 	// need not (and should not) overload them.
 

Modified: scummvm/branches/gsoc2008-gui/common/system.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/system.cpp	2008-08-15 22:06:15 UTC (rev 33919)
+++ scummvm/branches/gsoc2008-gui/common/system.cpp	2008-08-16 00:08:12 UTC (rev 33920)
@@ -28,12 +28,9 @@
 
 #include "common/config-manager.h"
 #include "common/system.h"
-#include "common/timer.h"
-#include "common/util.h"
 
 #include "graphics/colormasks.h"
 #include "gui/message.h"
-#include "sound/mixer.h"
 
 OSystem *g_system = 0;
 
@@ -121,3 +118,60 @@
 	memset(screen->pixels, 0, screen->h * screen->pitch);
 	unlockScreen();
 }
+
+
+/*

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list