diff options
author | Travis Howell | 2009-08-05 02:26:51 +0000 |
---|---|---|
committer | Travis Howell | 2009-08-05 02:26:51 +0000 |
commit | baa31cd83dd021a8842e7778c0b0892768553ae0 (patch) | |
tree | 2bdb122d9d7f23998b4c3b93e042082887f7e591 /backends/platform | |
parent | a565441f0cce65b6a3bee713c1e88f2ad7c67c76 (diff) | |
parent | 4af0cfbdbdc9feafca2728cee8deca7ae9b472b1 (diff) | |
download | scummvm-rg350-baa31cd83dd021a8842e7778c0b0892768553ae0.tar.gz scummvm-rg350-baa31cd83dd021a8842e7778c0b0892768553ae0.tar.bz2 scummvm-rg350-baa31cd83dd021a8842e7778c0b0892768553ae0.zip |
Merged revisions 42578,42587-42593,42596-42599,42606,42608-42611,42614-42615,42619,42623-42626,42632-42642,42645,42654-42656,42658-42664,42668,42671-42677,42679,42681,42685,42690,42693,42695-42697,42699,42701,42704-42729,42736-42740,42742-42744,42746-42748,42751-42753,42755,42757,42759,42761,42765-42768,42771,42773,42776,42780,42782-42783,42785,42787,42790-42793,42795,42798-42799,42801,42807,42809,42812-42826,42842-42845,42847,42849,42851,42856-42859,42861,42863,42866,42868,42870,42880-42881,42886-42887,42889-42890,42892,42894-42895,42898,42900,42904,42907,42910-42912,42918,42920,42922-42924,42926,42929,42932,42934-42935,42937-42941,42943,42946-42947,42950-42953,42955,42958-42959,42964-42965,42973-42974,42995-42996,42999,43001,43003,43005,43007-43008,43010-43011,43013,43020,43023,43025,43027,43029,43033,43035,43037,43039,43041-43043,43048,43056 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r42578 | dreammaster | 2009-07-18 11:22:43 +1000 (Sat, 18 Jul 2009) | 1 line
Minor tweak to prevent mouse clicks that close a user wait message also being further interpreted as a user walk destination
........
r42587 | wjpalenstijn | 2009-07-18 22:51:12 +1000 (Sat, 18 Jul 2009) | 1 line
SCI: Fix stepping in debugger
........
r42588 | drmccoy | 2009-07-18 23:05:36 +1000 (Sat, 18 Jul 2009) | 1 line
Adding a workaround for the guard house card game "game over" screen in Woodruff
........
r42589 | wjpalenstijn | 2009-07-18 23:05:39 +1000 (Sat, 18 Jul 2009) | 1 line
SCI: don't leave debugger after bt
........
r42590 | Kirben | 2009-07-18 23:39:21 +1000 (Sat, 18 Jul 2009) | 1 line
Add workaround for bug #1668393 - ZAK FM-TOWNS: Crash when entering Hostel from outside.
........
r42591 | fingolfin | 2009-07-19 01:11:19 +1000 (Sun, 19 Jul 2009) | 1 line
AGOS: Fixed backspace under OS X in Personal Nightmare
........
r42592 | fingolfin | 2009-07-19 01:12:54 +1000 (Sun, 19 Jul 2009) | 1 line
AGOS: Get rid of one setjmp in PN code (needs testing)
........
r42593 | fingolfin | 2009-07-19 01:15:26 +1000 (Sun, 19 Jul 2009) | 1 line
AGOS: Removed second setjmp in PN code (untested!)
........
r42596 | cyx | 2009-07-19 07:26:44 +1000 (Sun, 19 Jul 2009) | 2 lines
add "-IQ" suffix test to SO_LOAD_STRING (same as SO_SAVE_STRING) ; fixes french version of atlantis
........
r42597 | wjpalenstijn | 2009-07-19 08:17:56 +1000 (Sun, 19 Jul 2009) | 1 line
Fix crash in tab completion if one command is a prefix of another.
........
r42598 | wjpalenstijn | 2009-07-19 08:19:07 +1000 (Sun, 19 Jul 2009) | 1 line
SCI: Fix disasm_addr option parsing
........
r42599 | wjpalenstijn | 2009-07-19 08:46:07 +1000 (Sun, 19 Jul 2009) | 1 line
SCI: Fix breakpoints
........
r42606 | Kirben | 2009-07-19 19:09:56 +1000 (Sun, 19 Jul 2009) | 1 line
Add patch #2823590 - Fix music crashes in Waxworks (PC).
........
r42608 | Kirben | 2009-07-19 19:13:17 +1000 (Sun, 19 Jul 2009) | 1 line
Update Waxworks.
........
r42609 | wjpalenstijn | 2009-07-19 20:50:14 +1000 (Sun, 19 Jul 2009) | 1 line
SCI: check shouldQuit() in main loop
........
r42610 | cyx | 2009-07-19 21:07:17 +1000 (Sun, 19 Jul 2009) | 2 lines
fix bug #2597980 - TUCKER: Sprite glitch
........
r42611 | dreammaster | 2009-07-19 22:52:19 +1000 (Sun, 19 Jul 2009) | 1 line
Added the GUIO_NOSFX and GUIO_NOMUSIC flags to the first Discworld 1 demo entry
........
r42614 | Kirben | 2009-07-20 00:03:35 +1000 (Mon, 20 Jul 2009) | 1 line
Change generic save game name.
........
r42615 | knakos | 2009-07-20 00:46:11 +1000 (Mon, 20 Jul 2009) | 1 line
remove dead code leftover
........
r42619 | knakos | 2009-07-20 02:10:55 +1000 (Mon, 20 Jul 2009) | 1 line
whoops, fix non-arm build (why? :-) )
........
r42623 | wjpalenstijn | 2009-07-20 07:06:25 +1000 (Mon, 20 Jul 2009) | 1 line
Fix compilation with USE_CONSOLE = 0
........
r42624 | fingolfin | 2009-07-20 15:02:17 +1000 (Mon, 20 Jul 2009) | 1 line
AGOS: Fixed badload(); some whitespace cleanup
........
r42625 | sev | 2009-07-20 18:31:40 +1000 (Mon, 20 Jul 2009) | 3 lines
Moved new ports section to more appropriate place. And force buildbot to
recompile :)
........
r42626 | dreammaster | 2009-07-20 19:19:27 +1000 (Mon, 20 Jul 2009) | 1 line
Bugfix for hangs on scene changes in Discworld 1 after having loaded a savegame from the GMM when the title screens are displayed
........
r42632 | wjpalenstijn | 2009-07-21 06:55:28 +1000 (Tue, 21 Jul 2009) | 4 lines
Make ScummFile::eos() consistent with Stream::eos().
Remove usage of ioFailed from SCUMM engine.
Fix reading up to the end of a SCUMM SubFile.
This hopefully fixes #2820957.
........
r42633 | mthreepwood | 2009-07-21 06:59:35 +1000 (Tue, 21 Jul 2009) | 1 line
Fixing bug #2823854: Mickey's space adventure crash. There's one too many space characters in a string which causes it to be drawn off the screen.
........
r42634 | sev | 2009-07-21 08:15:37 +1000 (Tue, 21 Jul 2009) | 2 lines
Proper implementation of microscope puzzle.
........
r42635 | lordhoto | 2009-07-21 08:26:41 +1000 (Tue, 21 Jul 2009) | 2 lines
Fix gcc warning (hopefully this is correct).
........
r42636 | Kirben | 2009-07-21 17:02:18 +1000 (Tue, 21 Jul 2009) | 1 line
Update GUI flags for AGOS game engine.
........
r42637 | wjpalenstijn | 2009-07-21 19:39:58 +1000 (Tue, 21 Jul 2009) | 1 line
Use a BufferedReadStream to buffer ArjFile's input to reduce memory usage
........
r42638 | Kirben | 2009-07-21 20:37:58 +1000 (Tue, 21 Jul 2009) | 1 line
Fix fade effects in Waxworks.
........
r42639 | Kirben | 2009-07-21 20:48:32 +1000 (Tue, 21 Jul 2009) | 1 line
Fix bug #2823818 - GUI: unable to select subtitles and speech for Simon 2.
........
r42640 | drmccoy | 2009-07-21 21:26:31 +1000 (Tue, 21 Jul 2009) | 1 line
Making some static const uint32s public, older GCC versions don't seem to like nested classes to access their parents' protected members
........
r42641 | drmccoy | 2009-07-21 21:58:58 +1000 (Tue, 21 Jul 2009) | 1 line
Fixing "Game "hangs" after first level" (bug #2824414)
........
r42642 | drmccoy | 2009-07-21 22:14:36 +1000 (Tue, 21 Jul 2009) | 1 line
Fixing the text input in Gob1 (the loading code wasn't printed as you typed anymore)
........
r42645 | robinwatts | 2009-07-22 05:39:24 +1000 (Wed, 22 Jul 2009) | 4 lines
Add ARM code implementation of Scaler2x, and enable it for the WinCE
port.
........
r42654 | Kirben | 2009-07-22 19:52:44 +1000 (Wed, 22 Jul 2009) | 1 line
Simplify fade code.
........
r42655 | Kirben | 2009-07-22 20:23:58 +1000 (Wed, 22 Jul 2009) | 1 line
Change the default target to CD version, for games which offer floppy and CD versions. So all GUI options are still available in fan translations.
........
r42656 | Kirben | 2009-07-22 20:32:35 +1000 (Wed, 22 Jul 2009) | 1 line
Update video script debug table for Waxworks.
........
r42658 | sev | 2009-07-22 21:48:51 +1000 (Wed, 22 Jul 2009) | 2 lines
Fix bug #2823762: "AGI: PQ1 All function keys are broken after restart"
........
r42659 | sev | 2009-07-22 22:24:55 +1000 (Wed, 22 Jul 2009) | 2 lines
Fix bug #2823759: "AGI: PQ1 help not showing the first time you press F1"
........
r42660 | sev | 2009-07-22 22:36:08 +1000 (Wed, 22 Jul 2009) | 2 lines
Mention microscope puzzle improvement in T7G
........
r42661 | lordhoto | 2009-07-22 22:38:34 +1000 (Wed, 22 Jul 2009) | 1 line
Since Kyra PC98 version is japanese only don't mention it explicitly.
........
r42662 | sev | 2009-07-23 01:55:33 +1000 (Thu, 23 Jul 2009) | 2 lines
Move functions from agi.cpp to more appropriate files.
........
r42663 | sev | 2009-07-23 02:26:53 +1000 (Thu, 23 Jul 2009) | 2 lines
Fix bug #2798797: "AGI: larry 1 doesn't restart after dying"
........
r42664 | sev | 2009-07-23 05:25:53 +1000 (Thu, 23 Jul 2009) | 7 lines
Fix bug #1745396: "MI: Saved game from the credits sequence fails to load".
Now we specifically disallow saves in room 0 for all v4+ games. Original
has exactly this check in all versions, and such games are impossible to load.
Still the problem is not resolved for v0-v3 and HE games.
........
r42668 | sev | 2009-07-23 06:37:48 +1000 (Thu, 23 Jul 2009) | 2 lines
Fix bug #2825252: "GUI: Low Res Bugs"
........
r42671 | Kirben | 2009-07-23 15:48:20 +1000 (Thu, 23 Jul 2009) | 1 line
Simplify the code to check whether loading or saving a game is possible.
........
r42672 | Kirben | 2009-07-23 15:57:00 +1000 (Thu, 23 Jul 2009) | 1 line
Simplify the code to check whether loading or saving a game is possible.
........
r42673 | Kirben | 2009-07-23 17:49:28 +1000 (Thu, 23 Jul 2009) | 1 line
Correct error in revision 26678.
........
r42674 | Kirben | 2009-07-23 20:31:06 +1000 (Thu, 23 Jul 2009) | 1 line
Remove keyboard support for mouse buttons, since it interferes with load/save scripts in HE games and input scripts in others games (COMI, FT). It isn't much use anyway, since we dropped support for cursor movement via keyboard long ago.
........
r42675 | Kirben | 2009-07-23 20:33:13 +1000 (Thu, 23 Jul 2009) | 1 line
Fix bug #1726909 - HE Games: Glitches after loading saved games, by restircting HE games to their original load/save interface.
........
r42676 | dreammaster | 2009-07-23 20:49:30 +1000 (Thu, 23 Jul 2009) | 1 line
Bugfix for player blocking room entrance causing NPCs trying to enter getting an excessive number of action entries
........
r42677 | Kirben | 2009-07-23 20:54:12 +1000 (Thu, 23 Jul 2009) | 1 line
Only autosave in supported scenes.
........
r42679 | drmccoy | 2009-07-24 05:50:13 +1000 (Fri, 24 Jul 2009) | 1 line
Fixing a bug in the V4 save file handler, produced by a "neat" feature in Woodruff: The saves remember their position within the list and use that information to load the "correct" screen properties, making it impossible to load reordered saves correctly -.-
........
r42681 | Kirben | 2009-07-24 14:59:21 +1000 (Fri, 24 Jul 2009) | 1 line
Bear Stormin' is the full mini game, and not a demo.
........
r42685 | Kirben | 2009-07-24 15:20:44 +1000 (Fri, 24 Jul 2009) | 1 line
Fix cursor position, when entering a save game name in HE games.
........
r42690 | drmccoy | 2009-07-24 20:45:25 +1000 (Fri, 24 Jul 2009) | 1 line
Adding transparency for VMD video block type 2, fixing bug #2037158 ("n-Game animation shifted(?)"). The problem was that the animation in question has an one pixel wide transparent bar on the left
........
r42693 | Kirben | 2009-07-24 22:28:53 +1000 (Fri, 24 Jul 2009) | 1 line
Add workaround for bug #2826144 - SAM: Game hangs when talking to bigfoot guard.
........
r42695 | Kirben | 2009-07-24 23:30:26 +1000 (Fri, 24 Jul 2009) | 1 line
Adjust workaround for bug #2826144, to use hard coded offset, that should be safe in all language versions.
........
r42696 | wjpalenstijn | 2009-07-25 04:58:15 +1000 (Sat, 25 Jul 2009) | 3 lines
SAGA: Instead of trying to detect duplicate glyphs,
simply generate duplicate outline glyphs.
This should fix #2826697.
........
r42697 | eriktorbjorn | 2009-07-25 05:24:15 +1000 (Sat, 25 Jul 2009) | 2 lines
Removed unused variable.
........
r42699 | sev | 2009-07-25 05:56:46 +1000 (Sat, 25 Jul 2009) | 2 lines
This is 1.1.0svn
........
r42701 | sev | 2009-07-25 06:21:49 +1000 (Sat, 25 Jul 2009) | 2 lines
re-enable SCI engine
........
r42704 | drmccoy | 2009-07-25 07:29:41 +1000 (Sat, 25 Jul 2009) | 1 line
Adding support for ADPCM sound data (yet another IMA ADPCM variant). What we've called ADPCM before is more like DPCM
........
r42705 | drmccoy | 2009-07-25 07:31:00 +1000 (Sat, 25 Jul 2009) | 1 line
Adding subtitle support to Woodruff
........
r42706 | drmccoy | 2009-07-25 07:31:58 +1000 (Sat, 25 Jul 2009) | 1 line
Caching the subtitle font and color, because some don't assign those
........
r42707 | drmccoy | 2009-07-25 07:32:45 +1000 (Sat, 25 Jul 2009) | 1 line
Calculating the number of data bytes per initial sound slice, because relying on the standard amount doesn't work for some videos
........
r42708 | drmccoy | 2009-07-25 07:33:22 +1000 (Sat, 25 Jul 2009) | 1 line
Properly reading the video codec fourcc, in case we need other codecs in the future
........
r42709 | drmccoy | 2009-07-25 07:33:55 +1000 (Sat, 25 Jul 2009) | 1 line
Adding ADL playback to the demoplayer
........
r42710 | drmccoy | 2009-07-25 07:34:17 +1000 (Sat, 25 Jul 2009) | 1 line
Adding stubs for newer VMDs found in Addy 5
........
r42711 | drmccoy | 2009-07-25 07:34:43 +1000 (Sat, 25 Jul 2009) | 1 line
Added a method to easily dump resources to file
........
r42712 | drmccoy | 2009-07-25 07:35:06 +1000 (Sat, 25 Jul 2009) | 1 line
Fixing bytes per pixel detection
........
r42713 | drmccoy | 2009-07-25 07:35:57 +1000 (Sat, 25 Jul 2009) | 1 line
Renaming getAnchor() to getFrameCoords()
........
r42714 | drmccoy | 2009-07-25 07:36:16 +1000 (Sat, 25 Jul 2009) | 1 line
Moving all implementations into the cpp
........
r42715 | drmccoy | 2009-07-25 07:36:42 +1000 (Sat, 25 Jul 2009) | 1 line
CoktelVideo cleanup: Splitting up some IMD methods and removing the obsolete notifyPaused()
........
r42716 | drmccoy | 2009-07-25 07:36:59 +1000 (Sat, 25 Jul 2009) | 1 line
Merging Map_v4 into Map_v2
........
r42717 | lordhoto | 2009-07-25 10:58:44 +1000 (Sat, 25 Jul 2009) | 1 line
Add new event dispatching API.
........
r42718 | lordhoto | 2009-07-25 10:59:03 +1000 (Sat, 25 Jul 2009) | 1 line
Replace "EventProvider" class of the DefaultEventManager implementation with "Common::EventSource".
........
r42719 | lordhoto | 2009-07-25 10:59:18 +1000 (Sat, 25 Jul 2009) | 1 line
Got rid of EventManger::artificialEventQueue.
........
r42720 | lordhoto | 2009-07-25 10:59:30 +1000 (Sat, 25 Jul 2009) | 1 line
Add function "allowMapping" to EventSource, for testing whether the event source allows mapping (via the Keymapper for example.)
........
r42721 | lordhoto | 2009-07-25 10:59:39 +1000 (Sat, 25 Jul 2009) | 1 line
Prevent EventMapper events from being mapped.
........
r42722 | lordhoto | 2009-07-25 10:59:53 +1000 (Sat, 25 Jul 2009) | 1 line
Replaced "_artificialEventQueue" by an EventSource.
........
r42723 | lordhoto | 2009-07-25 11:00:12 +1000 (Sat, 25 Jul 2009) | 1 line
Made DefaultEventManager a subclass of EventObserver.
........
r42724 | lordhoto | 2009-07-25 11:00:24 +1000 (Sat, 25 Jul 2009) | 2 lines
- Add marco to easily access the EventDispatcher instance.
- Add events.cpp to module.mk
........
r42725 | lordhoto | 2009-07-25 11:00:37 +1000 (Sat, 25 Jul 2009) | 1 line
Change DefaultEventManager to use EventDispatcher.
........
r42726 | lordhoto | 2009-07-25 11:00:47 +1000 (Sat, 25 Jul 2009) | 1 line
Moved ArtificialEventSource to common/events.h.
........
r42727 | lordhoto | 2009-07-25 11:01:05 +1000 (Sat, 25 Jul 2009) | 2 lines
- Adapt DefaultEventManager to use Common::ArtificialEventSource
- Adapt Keymapper to implement EventMapper interface
........
r42728 | lordhoto | 2009-07-25 11:01:22 +1000 (Sat, 25 Jul 2009) | 2 lines
- EventDispatcher is no longer a singleton.
- Add "getEventDispatcher" method to EventManager.
........
r42729 | lordhoto | 2009-07-25 11:01:41 +1000 (Sat, 25 Jul 2009) | 1 line
Add enum which marks global priorites of the EventManager event dispatcher.
........
r42736 | Kirben | 2009-07-25 15:39:57 +1000 (Sat, 25 Jul 2009) | 1 line
Add patch #2816140 - MM C64 Costume Animation.
........
r42737 | Kirben | 2009-07-25 16:27:41 +1000 (Sat, 25 Jul 2009) | 1 line
Add patch #2821100 - MM C64 Objects / Verb fixes, with minor clean up applied.
........
r42738 | Kirben | 2009-07-25 16:36:41 +1000 (Sat, 25 Jul 2009) | 1 line
Update credits.
........
r42739 | eriktorbjorn | 2009-07-25 16:55:28 +1000 (Sat, 25 Jul 2009) | 2 lines
Fixed GCC warnings.
........
r42740 | Kirben | 2009-07-25 17:17:37 +1000 (Sat, 25 Jul 2009) | 1 line
Whitespace changes.
........
r42742 | fingolfin | 2009-07-25 19:36:16 +1000 (Sat, 25 Jul 2009) | 1 line
Whitespace fixes
........
r42743 | wjpalenstijn | 2009-07-25 20:25:57 +1000 (Sat, 25 Jul 2009) | 1 line
Add Common::String::printf to format a string
........
r42744 | wjpalenstijn | 2009-07-25 20:26:17 +1000 (Sat, 25 Jul 2009) | 1 line
Use new Common::String::printf
........
r42746 | sev | 2009-07-25 20:37:20 +1000 (Sat, 25 Jul 2009) | 2 lines
Formatting
........
r42747 | joostp | 2009-07-25 22:28:45 +1000 (Sat, 25 Jul 2009) | 1 line
fix unaligned writes
........
r42748 | joostp | 2009-07-25 22:41:46 +1000 (Sat, 25 Jul 2009) | 1 line
remove implicit SoundDigital::Sound ctor call, which is redundant because the required initialisation is done below -- this fixes a linker error with mipspro
........
r42751 | lordhoto | 2009-07-25 22:59:46 +1000 (Sat, 25 Jul 2009) | 1 line
Move the event recorder to its own class (EventRecoder inside common/EventRecorder.[h/cpp]).
........
r42752 | lordhoto | 2009-07-25 23:00:09 +1000 (Sat, 25 Jul 2009) | 1 line
Strip trailing whitespaces.
........
r42753 | joostp | 2009-07-25 23:07:17 +1000 (Sat, 25 Jul 2009) | 1 line
fix another aligned write
........
r42755 | eriktorbjorn | 2009-07-25 23:07:50 +1000 (Sat, 25 Jul 2009) | 2 lines
Added word-wrapping to Drascula's conversation options. Fixes bug #2826607.
........
r42757 | eriktorbjorn | 2009-07-25 23:17:31 +1000 (Sat, 25 Jul 2009) | 2 lines
Don't hog the CPU while waiting for the player to pick a conversation option.
........
r42759 | lordhoto | 2009-07-25 23:23:51 +1000 (Sat, 25 Jul 2009) | 1 line
Fix gp2x port building.
........
r42761 | lordhoto | 2009-07-26 00:09:58 +1000 (Sun, 26 Jul 2009) | 1 line
Yet another fix for the GP2x backend.
........
r42765 | lordhoto | 2009-07-26 01:31:11 +1000 (Sun, 26 Jul 2009) | 1 line
Adept savegame name creation code to use Common::String::printf.
........
r42766 | drmccoy | 2009-07-26 02:07:29 +1000 (Sun, 26 Jul 2009) | 1 line
Added a workaround to fix the Last Dynasty video greenness for now
........
r42767 | drmccoy | 2009-07-26 02:08:31 +1000 (Sun, 26 Jul 2009) | 1 line
Moved the decision whether subtitles should be displayed, so that the broken subtitles in The Last Dynasty aren't shown
........
r42768 | drmccoy | 2009-07-26 02:09:19 +1000 (Sun, 26 Jul 2009) | 1 line
Fixing Woodruff videos again after enabling block type 2 transparency
........
r42771 | lordhoto | 2009-07-26 02:34:01 +1000 (Sun, 26 Jul 2009) | 1 line
Fix palette regression in Kyra2.
........
r42773 | lordhoto | 2009-07-26 02:37:25 +1000 (Sun, 26 Jul 2009) | 1 line
Implement missing bits in KyraEngine_HoF::setCauldronState.
........
r42776 | eriktorbjorn | 2009-07-26 03:48:51 +1000 (Sun, 26 Jul 2009) | 5 lines
Make sure that "buf" is properly terminated. Actually, we could probably get
rid of "buf" completely, and replace it with face = syncChar[p] - '0', assuming
that syncChar only contains digits. But for now, let's make a minimal change.
This might fix bug #2826611 ("DRASCULA: Crash when smashing church window").
........
r42780 | joostp | 2009-07-26 04:35:27 +1000 (Sun, 26 Jul 2009) | 2 lines
use READ_UINT16 macro
........
r42782 | drmccoy | 2009-07-26 04:44:06 +1000 (Sun, 26 Jul 2009) | 1 line
Adding support for (new-style) stereo in DPCM audio
........
r42783 | drmccoy | 2009-07-26 04:44:24 +1000 (Sun, 26 Jul 2009) | 1 line
Adding more sanity checks to Vmd::renderFrame()
........
r42785 | djwillis | 2009-07-26 05:07:28 +1000 (Sun, 26 Jul 2009) | 1 line
GP2X Backend: Volume control code cleanup.
........
r42787 | wjpalenstijn | 2009-07-26 09:36:24 +1000 (Sun, 26 Jul 2009) | 2 lines
Add optional readline support to the text debugger console.
Make text/graphical console selectable with an option to configure.
........
r42790 | dreammaster | 2009-07-26 10:27:32 +1000 (Sun, 26 Jul 2009) | 1 line
Changed the events.cpp file to EventDispatcher.cpp, to avoid MSVC name clashes with sdl/events.cpp
........
r42791 | dreammaster | 2009-07-26 10:31:28 +1000 (Sun, 26 Jul 2009) | 1 line
Fixed compilation from file changes to common and gob engine
........
r42792 | lordhoto | 2009-07-26 17:07:35 +1000 (Sun, 26 Jul 2009) | 1 line
Formatting.
........
r42793 | peres001 | 2009-07-26 18:37:03 +1000 (Sun, 26 Jul 2009) | 1 line
Moved parser functions arrays to file scope, as they were tripping up the obsolete gcc used for the BeOS/Haiku port. If anybody can work out a better solution please apply it, because this makes me sick.
........
r42795 | dreammaster | 2009-07-26 19:09:07 +1000 (Sun, 26 Jul 2009) | 1 line
Added a delay to the in-game menu loop to prevent 100% CPU usage
........
r42798 | dreammaster | 2009-07-26 19:40:35 +1000 (Sun, 26 Jul 2009) | 1 line
Bugfix for mouse button clicks getting counted multiple times
........
r42799 | dreammaster | 2009-07-26 19:48:52 +1000 (Sun, 26 Jul 2009) | 1 line
Added a debug line to allow tracking of script execution
........
r42801 | eriktorbjorn | 2009-07-26 20:10:08 +1000 (Sun, 26 Jul 2009) | 4 lines
78 bytes isn't enough for some of the longer conversation options. 128 might
not be enough either, but at least it fixes bug #2827170 ("DRASCULA:
Conversation error").
........
r42807 | djwillis | 2009-07-26 22:58:22 +1000 (Sun, 26 Jul 2009) | 2 lines
Virtual Keyboard: Update default keyboard pack using slightly tweaked versions of the graphics very kindly provided by Carl Mitchell. Also update xml file to make best use of the keyboard graphics and add the 'delete' event in addition the passing backspace back to the calling textarea.
........
r42809 | drmccoy | 2009-07-26 23:50:18 +1000 (Sun, 26 Jul 2009) | 1 line
Reverting my fix for bug #2037158 ("In-Game animation shifted(?)"), because it breaks Woodruff's intro
........
r42812 | lordhoto | 2009-07-27 00:16:51 +1000 (Mon, 27 Jul 2009) | 1 line
Create base class FontSJIS16x16 for our own SJIS font.
........
r42813 | lordhoto | 2009-07-27 00:17:06 +1000 (Mon, 27 Jul 2009) | 1 line
Add support for our custom SJIS font.
........
r42814 | lordhoto | 2009-07-27 00:17:21 +1000 (Mon, 27 Jul 2009) | 1 line
Change KYRA to use our SJIS font, when it's available.
........
r42815 | lordhoto | 2009-07-27 00:17:40 +1000 (Mon, 27 Jul 2009) | 1 line
Change the way the font data for SJIS fonts is load.
........
r42816 | lordhoto | 2009-07-27 00:17:54 +1000 (Mon, 27 Jul 2009) | 1 line
Add a factory method, which tries to open different SJIS fonts/ROMs and returns a font for the first present data.
........
r42817 | lordhoto | 2009-07-27 00:18:06 +1000 (Mon, 27 Jul 2009) | 1 line
Print warning, when client code does try to draw an unsupported SJIS char.
........
r42818 | lordhoto | 2009-07-27 00:18:21 +1000 (Mon, 27 Jul 2009) | 1 line
Specify that the chars passed to FontSJIS::drawChar should be little endian.
........
r42819 | lordhoto | 2009-07-27 00:18:34 +1000 (Mon, 27 Jul 2009) | 1 line
Add way to overwrite default SJIS font.
........
r42820 | lordhoto | 2009-07-27 00:18:49 +1000 (Mon, 27 Jul 2009) | 1 line
Simplify KYRA's SJIS font loading code.
........
r42821 | lordhoto | 2009-07-27 00:19:02 +1000 (Mon, 27 Jul 2009) | 1 line
Reflect code to test the magic bytes in the sjis.fnt header.
........
r42822 | lordhoto | 2009-07-27 00:24:45 +1000 (Mon, 27 Jul 2009) | 1 line
Add NEWS entry about new SJIS code.
........
r42823 | lordhoto | 2009-07-27 00:40:03 +1000 (Mon, 27 Jul 2009) | 1 line
Instead of only printing a warning, when no SJIS char data is present, just return to the caller.
........
r42824 | lordhoto | 2009-07-27 00:40:44 +1000 (Mon, 27 Jul 2009) | 1 line
Add a todo to FontSJIS::drawChar taking an Graphics::Surface.
........
r42825 | marcus_c | 2009-07-27 06:41:33 +1000 (Mon, 27 Jul 2009) | 1 line
Create IP.BIN.
........
r42826 | joostp | 2009-07-27 07:06:53 +1000 (Mon, 27 Jul 2009) | 1 line
fix/workaround for cruise crash on OSX
........
r42842 | wjpalenstijn | 2009-07-28 02:04:35 +1000 (Tue, 28 Jul 2009) | 2 lines
Fix format string issues (and compiler warnings).
Patch by salty-horse.
........
r42843 | robinwatts | 2009-07-28 02:29:36 +1000 (Tue, 28 Jul 2009) | 7 lines
Add ARM code version of Normal2x scaler.
Add ARM only aspect ratio correcting version of Normal2x scaler.
Make WinCE port use Normal2x by default if the screen is large enough.
Make WinCE port use aspect ratio correcting version if panel is hidden.
........
r42844 | lordhoto | 2009-07-28 03:04:06 +1000 (Tue, 28 Jul 2009) | 1 line
Formatting.
........
r42845 | lordhoto | 2009-07-28 03:48:40 +1000 (Tue, 28 Jul 2009) | 1 line
Fix bug #2827459 "ITE: Ingame GUI does not list slots 96-99", by defining in SagaMetaEngine that the last valid save slot for SAGA is slot 95.
........
r42847 | djwillis | 2009-07-28 04:05:16 +1000 (Tue, 28 Jul 2009) | 1 line
GP2XWiz: Update GP2X Wiz bundle.sh to copy libraries into the distribution file from the tool chain where the libraries are broken on the device. Also add LD_LIBRARY_PATH 'hack' to launch script to ensure bundled libraries are used over system ones.
........
r42849 | lordhoto | 2009-07-28 04:19:16 +1000 (Tue, 28 Jul 2009) | 1 line
Oops enabled HACK to prevent multiple OPL instances again.
........
r42851 | drmccoy | 2009-07-28 05:01:17 +1000 (Tue, 28 Jul 2009) | 1 line
Abstracting off the block types from Imd::renderFrame() and Vmd::renderFrame()
........
r42856 | drmccoy | 2009-07-29 01:05:44 +1000 (Wed, 29 Jul 2009) | 1 line
Silencing two "empty loop body" warnings
........
r42857 | drmccoy | 2009-07-29 01:19:55 +1000 (Wed, 29 Jul 2009) | 1 line
Changing stuff around a bit so alignment requirements won't increase
........
r42858 | drmccoy | 2009-07-29 02:28:32 +1000 (Wed, 29 Jul 2009) | 1 line
More alignment-related changes
........
r42859 | eriktorbjorn | 2009-07-29 03:19:33 +1000 (Wed, 29 Jul 2009) | 3 lines
Fixed drawing subtitles for cutscenes that are narrower than the screen, and
erase the subtitles manually if they are drawn outside the frame.
........
r42861 | eriktorbjorn | 2009-07-29 03:53:59 +1000 (Wed, 29 Jul 2009) | 3 lines
Broken Sword 2, unsurprisingly, had the same subtitle drawing glitch for small
cutscenes that Broken Sword 1 had. And a memory leak. This should fix both.
........
r42863 | djwillis | 2009-07-29 06:22:38 +1000 (Wed, 29 Jul 2009) | 1 line
GP2XWiz: Add downscale support to the backend using the PocketPCHalfARM scaler from the WinCE backend (Maybe this should be moved into /graphics/scalers at some point?). Also enable all the ARM optemised routines in this and the GP2X backend.
........
r42866 | fingolfin | 2009-07-29 08:28:40 +1000 (Wed, 29 Jul 2009) | 1 line
SCI: Avoid using perror (it's not portable)
........
r42868 | fingolfin | 2009-07-29 08:42:08 +1000 (Wed, 29 Jul 2009) | 1 line
Patch #2828644: Support for mingw32ce 0.5.1 toolchain in configure script
........
r42870 | fingolfin | 2009-07-29 09:19:33 +1000 (Wed, 29 Jul 2009) | 2 lines
SCUMM: Moved _inventoryOffset to ScummEngine_v2 and save it.
Fixes bug #2828417: Zak V2: inventory position isn't reset when loading.
........
r42880 | fingolfin | 2009-07-29 18:55:04 +1000 (Wed, 29 Jul 2009) | 1 line
SCUMM: cleanup
........
r42881 | fingolfin | 2009-07-29 18:55:17 +1000 (Wed, 29 Jul 2009) | 1 line
GUI: When clicking in a scrollbar to page up/down, don't scroll a full page; rather scroll a full page minus one line (see FR #2821508). This matches the behavior of the page up/down keys
........
r42886 | fingolfin | 2009-07-29 19:19:56 +1000 (Wed, 29 Jul 2009) | 1 line
Sort audio output rates numerically (see FR #2821525)
........
r42887 | drmccoy | 2009-07-29 20:17:44 +1000 (Wed, 29 Jul 2009) | 1 line
Adding a SoundType parameter to SmackerDecoder, defaulting to kSFXSoundType
........
r42889 | fingolfin | 2009-07-29 21:48:20 +1000 (Wed, 29 Jul 2009) | 1 line
SCUMM: Rewrote ScummEngine::inventoryScriptIndy3Mac for clarity
........
r42890 | lordhoto | 2009-07-30 00:54:27 +1000 (Thu, 30 Jul 2009) | 1 line
Fix animation script sound effect opcode implementation in Kyra3.
........
r42892 | lordhoto | 2009-07-30 01:31:23 +1000 (Thu, 30 Jul 2009) | 1 line
Fix saving of item in hand in HoF and MR.
........
r42894 | drmccoy | 2009-07-30 01:57:50 +1000 (Thu, 30 Jul 2009) | 1 line
Oops, fixing a regression I created with the Map_v4/Map_v2-merge
........
r42895 | lordhoto | 2009-07-30 02:24:07 +1000 (Thu, 30 Jul 2009) | 1 line
Fix a little bug in KyraEngine_MR::showBadConscience, which prevented Gunther's mouse shapes from showing up.
........
r42898 | fingolfin | 2009-07-30 04:35:34 +1000 (Thu, 30 Jul 2009) | 1 line
SCUMM: Enable looping in Indy3Mac sound effects
........
r42900 | lordhoto | 2009-07-30 05:39:03 +1000 (Thu, 30 Jul 2009) | 1 line
Fix regression, which prevented saving in COMI.
........
r42904 | lordhoto | 2009-07-30 06:03:46 +1000 (Thu, 30 Jul 2009) | 1 line
Fix typo, which made our "floorf" macro use "floorf" instead of "floor" on systems without "floorf".
........
r42907 | fingolfin | 2009-07-30 06:35:50 +1000 (Thu, 30 Jul 2009) | 1 line
SCUMM: Fix verb/sentence handling in Indy3 mac (there, a double click must be used to trigger a verb/sentence)
........
r42910 | fingolfin | 2009-07-30 07:39:00 +1000 (Thu, 30 Jul 2009) | 1 line
Removed last traces of clearIOFailed. Yay :)
........
r42911 | fingolfin | 2009-07-30 07:39:16 +1000 (Thu, 30 Jul 2009) | 1 line
Removed redundant File::ioFailed() implementation; also turned ReadStream::ioFailed from a virtual into an inline method
........
r42912 | fingolfin | 2009-07-30 07:39:34 +1000 (Thu, 30 Jul 2009) | 1 line
SWORD1 & SWORD2: Replaced ioFailed by err+eos
........
r42918 | fingolfin | 2009-07-30 19:36:50 +1000 (Thu, 30 Jul 2009) | 1 line
Patch #2818501: enable scale2x mmx on x86_64
........
r42920 | dreammaster | 2009-07-30 21:03:16 +1000 (Thu, 30 Jul 2009) | 1 line
Added the character lookup table for the Spanish font
........
r42922 | peres001 | 2009-07-30 23:41:22 +1000 (Thu, 30 Jul 2009) | 1 line
Use SaveFileMan::listSaveFiles() to build list of old savegames for Nippon Safes.
........
r42923 | peres001 | 2009-07-30 23:42:08 +1000 (Thu, 30 Jul 2009) | 1 line
Fixed typo in user message.
........
r42924 | peres001 | 2009-07-30 23:44:50 +1000 (Thu, 30 Jul 2009) | 1 line
Cleanup the header file as I removed one function in r42922.
........
r42926 | lordhoto | 2009-07-31 00:24:23 +1000 (Fri, 31 Jul 2009) | 1 line
Fix bug which caused the mouse cursor not to update in some cases.
........
r42929 | lordhoto | 2009-07-31 01:12:42 +1000 (Fri, 31 Jul 2009) | 1 line
Add tanoku to our GUI credits section.
........
r42932 | lordhoto | 2009-07-31 01:19:15 +1000 (Fri, 31 Jul 2009) | 1 line
Prevent our "credits" make target updating Credits.rtf, which in fact is not present in SVN anymore, and the outdated docbook.
........
r42934 | lordhoto | 2009-07-31 02:43:25 +1000 (Fri, 31 Jul 2009) | 1 line
Fix bug #2829737: "GUI: Wrong background colours on dialog screens (IRIX)".
........
r42935 | lordhoto | 2009-07-31 02:51:53 +1000 (Fri, 31 Jul 2009) | 1 line
Fixed missing clearing of the low bit of the alpha mask in the "dim" screen shading function.
........
r42937 | fingolfin | 2009-07-31 03:48:03 +1000 (Fri, 31 Jul 2009) | 1 line
NDS: Changed jtypes.h to ndstypes.h (this 'newer' name has been in effect even in the older versions of DevKitPro used for compiling ScummVM...)
........
r42938 | fingolfin | 2009-07-31 03:52:44 +1000 (Fri, 31 Jul 2009) | 1 line
minor cleanup to scale2x, to avoid confusing the compiler about potential pointer aliasing (only the tip of the iceberg, of course... ;)
........
r42939 | fingolfin | 2009-07-31 04:27:50 +1000 (Fri, 31 Jul 2009) | 1 line
DS: Started work on a new build system for the Nintendo DS port, based on configure (and thus suitable for buildbot). Currently only the ARM7 part is 'done'
........
r42940 | lordhoto | 2009-07-31 05:43:36 +1000 (Fri, 31 Jul 2009) | 1 line
Change code to use our fractional utilities.
........
r42941 | lordhoto | 2009-07-31 05:43:53 +1000 (Fri, 31 Jul 2009) | 1 line
Fix Browser dialog name.
........
r42943 | fingolfin | 2009-07-31 06:46:43 +1000 (Fri, 31 Jul 2009) | 1 line
Overhauled the credits: Retired members are now (partially) back to their old sections, to make sure people really see all people who contribute to an engine/backend. Also added&fixed some entries, and moved the FreeSCI section
........
r42946 | fingolfin | 2009-07-31 06:58:32 +1000 (Fri, 31 Jul 2009) | 1 line
Changed 10rdH070's nick back to LordHoto, and added Hkz to the credits
........
r42947 | fingolfin | 2009-07-31 07:04:46 +1000 (Fri, 31 Jul 2009) | 1 line
Added Strangerke to credits, and moved wjp from Gob to SCI on his request
........
r42950 | fingolfin | 2009-07-31 07:45:09 +1000 (Fri, 31 Jul 2009) | 1 line
Patch #2828669: CRUISE: Fix cruise compilation with mingw32ce toolchain
........
r42951 | fingolfin | 2009-07-31 07:56:04 +1000 (Fri, 31 Jul 2009) | 1 line
SCUMM: Properly detect & distinguish the three FM-TOWNS double-demos
........
r42952 | fingolfin | 2009-07-31 07:56:18 +1000 (Fri, 31 Jul 2009) | 1 line
cleanup
........
r42953 | tanoku | 2009-07-31 09:42:12 +1000 (Fri, 31 Jul 2009) | 2 lines
Fixed corrupted theme files.
........
r42955 | tanoku | 2009-07-31 10:22:46 +1000 (Fri, 31 Jul 2009) | 2 lines
Prevent high-resolution layouts to be loaded on low resolutions.
........
r42958 | peres001 | 2009-07-31 22:39:31 +1000 (Fri, 31 Jul 2009) | 1 line
When renaming old savefiles for Nippon Safes, don't assert if a file that matches the pattern game.* and is not a savefile is found in the savepath.
........
r42959 | djwillis | 2009-07-31 23:01:28 +1000 (Fri, 31 Jul 2009) | 1 line
GP2X: Clean up README-GP2X and remove HTML version of it from SVN (no one ever reads it and the WiKi is more upto date).
........
r42964 | djwillis | 2009-08-01 03:10:20 +1000 (Sat, 01 Aug 2009) | 1 line
GP2XWiz: Small cleanup of render code to slave as much of loadGFXMode() code back to the OSystem_SDL::loadGFXMode(). version. Also update README-GP2XWIZ.
........
r42965 | dreammaster | 2009-08-01 09:27:19 +1000 (Sat, 01 Aug 2009) | 1 line
Fix bug with the event loop that was discarding pending events rather than leaving them to be processed in the following frame
........
r42973 | buddha_ | 2009-08-01 19:53:21 +1000 (Sat, 01 Aug 2009) | 1 line
Remove obsolete comment from Cine::Palette::saturatedAddColor.
........
r42974 | eriktorbjorn | 2009-08-02 01:42:42 +1000 (Sun, 02 Aug 2009) | 4 lines
Added some more information to the "Compressed sound ... invalid" error. Maybe
this will help in determining what's causing bug #2830364. (It sounds like a
bad data file, but who knows...)
........
r42995 | drmccoy | 2009-08-02 20:40:27 +1000 (Sun, 02 Aug 2009) | 1 line
When ESCing videos, seek to the last frame that was meant to be played. Fixes graphical glitches (bug #2830985) and crashes (bug #2830988)
........
r42996 | drmccoy | 2009-08-02 20:40:48 +1000 (Sun, 02 Aug 2009) | 1 line
Removing _frameWaitLag. It broke normal animation speed in pre-v4 games and didn't even do what it was supposed to in v4+ games anyway. (bug #2830985)
........
r42999 | eriktorbjorn | 2009-08-02 22:49:57 +1000 (Sun, 02 Aug 2009) | 2 lines
Show a message if saving or loading a game fails.
........
r43001 | drmccoy | 2009-08-02 23:54:06 +1000 (Sun, 02 Aug 2009) | 1 line
Show a message if saving or loading a game fails.
........
r43003 | knakos | 2009-08-03 03:34:57 +1000 (Mon, 03 Aug 2009) | 1 line
rework mixer (re)init. fixes bug #2694722
........
r43005 | joostp | 2009-08-03 03:58:48 +1000 (Mon, 03 Aug 2009) | 1 line
align memory handles to sizeof(void*) instead of 4 (which is just good enough for 32-bit) - this fixes DW2 on 64-bit systems that require alignment
........
r43007 | djwillis | 2009-08-03 05:46:18 +1000 (Mon, 03 Aug 2009) | 1 line
GP2XWiz: More cleanup of render code and fix silly screen update bug when reverting to a 320*2xx game from a 640*4xx game. Dirty rect code for downscaled images still needs work.
........
r43008 | knakos | 2009-08-03 05:50:24 +1000 (Mon, 03 Aug 2009) | 1 line
clean up and fix vga aspect scaler routines
........
r43010 | djwillis | 2009-08-03 07:18:25 +1000 (Mon, 03 Aug 2009) | 1 line
GP2XWiz/SDL: Fix 2 small typos.
........
r43011 | joostp | 2009-08-03 07:22:46 +1000 (Mon, 03 Aug 2009) | 1 line
Fix AGI crashes on 64-bit systems that require alignment
........
r43013 | joostp | 2009-08-03 07:44:21 +1000 (Mon, 03 Aug 2009) | 1 line
Make MemoryReAlloc() 64-bit alignment safe
........
r43020 | scott_t | 2009-08-03 11:19:36 +1000 (Mon, 03 Aug 2009) | 1 line
T7G: Fix bug #2831046 where save names not shown after loading a save from launcher
........
r43023 | dreammaster | 2009-08-03 19:28:06 +1000 (Mon, 03 Aug 2009) | 1 line
Bugfix to correctly reset the music tempo when loading a savegame
........
r43025 | buddha_ | 2009-08-04 03:18:18 +1000 (Tue, 04 Aug 2009) | 6 lines
Fix for bug #2828333 (AGI: KQ1: Greensleeves always plays):
- Made all savegame loading in AGI do the same pre-load and post-load stuff.
- Moved load/saveGameState from AgiBase to AgiEngine
- Added rudimentary error handling to load/saveGameState
- Incidentally also fixes the hanging note from bug #2798797.
........
r43027 | buddha_ | 2009-08-04 03:52:07 +1000 (Tue, 04 Aug 2009) | 8 lines
Fix for #2824798 (FW: crash when clicking "load" in the GUI):
- Fixed CineMetaEngine::listSaves(const char *target) which was broken.
- Also added explicit initialization of savegame descriptions to
empty strings for safety reasons (e.g. arrays on stack aren't
initialized to zero).
- Added explicit trailing zero setting to savegame descriptions
(Previously using GMM you could write a description of length >= 20
that had no trailing zero when written to description file (e.g. fw.dir)).
........
r43029 | djwillis | 2009-08-04 04:38:46 +1000 (Tue, 04 Aug 2009) | 1 line
GP2XWiz: Fix bug with downscaled cursors.
........
r43033 | knakos | 2009-08-04 22:02:07 +1000 (Tue, 04 Aug 2009) | 1 line
add bindings for cruise engine
........
r43035 | knakos | 2009-08-04 22:19:30 +1000 (Tue, 04 Aug 2009) | 1 line
support made engine
........
r43037 | knakos | 2009-08-04 22:39:33 +1000 (Tue, 04 Aug 2009) | 1 line
update Makefile
........
r43039 | knakos | 2009-08-04 22:51:17 +1000 (Tue, 04 Aug 2009) | 1 line
update readme (draft)
........
r43041 | knakos | 2009-08-04 23:17:33 +1000 (Tue, 04 Aug 2009) | 1 line
commit slightly modified patch #2828646: WINCE: Integrate Windows CE with the master build system
........
r43042 | thebluegr | 2009-08-05 00:20:38 +1000 (Wed, 05 Aug 2009) | 1 line
Cleaned up the MSVC project files of the gob engine
........
r43043 | knakos | 2009-08-05 00:53:43 +1000 (Wed, 05 Aug 2009) | 1 line
got rid of superfluous semicolons
........
r43048 | thebluegr | 2009-08-05 03:22:18 +1000 (Wed, 05 Aug 2009) | 1 line
Removed the superfluous VGA buffer, replacing it with direct writes to the video buffer
........
r43056 | thebluegr | 2009-08-05 07:56:59 +1000 (Wed, 05 Aug 2009) | 1 line
Cleanup
........
svn-id: r43062
Diffstat (limited to 'backends/platform')
41 files changed, 1011 insertions, 590 deletions
diff --git a/backends/platform/dc/dreamcast.mk b/backends/platform/dc/dreamcast.mk index c33867b7f4..cd0d4748bd 100644 --- a/backends/platform/dc/dreamcast.mk +++ b/backends/platform/dc/dreamcast.mk @@ -6,8 +6,7 @@ ronindir = /usr/local/ronin CC := $(CXX) ASFLAGS := $(CXXFLAGS) - -dist : SCUMMVM.BIN plugin_dist +dist : SCUMMVM.BIN IP.BIN plugin_dist plugin_dist : plugins @[ -z "$(PLUGINS)" ] || for p in $(or $(PLUGINS),none); do \ @@ -24,4 +23,12 @@ SCUMMVM.BIN : scummvm.bin scummvm.bin : scummvm.elf sh-elf-objcopy -S -R .stack -O binary $< $@ +IP.BIN : ip.txt + makeip $< $@ + +ip.txt : $(srcdir)/backends/platform/dc/ip.txt.in + if [ x"$(VER_EXTRA)" = xsvn ]; then \ + if [ -z "$(VER_SVNREV)" ]; then ver="SVN"; else ver="r$(VER_SVNREV)"; fi; \ + else ver="V$(VERSION)"; fi; \ + sed -e 's/[@]VERSION[@]/'"$$ver"/ -e 's/[@]DATE[@]/$(shell date '+%Y%m%d')/' < $< > $@ diff --git a/backends/platform/dc/ip.txt.in b/backends/platform/dc/ip.txt.in new file mode 100644 index 0000000000..23424e0950 --- /dev/null +++ b/backends/platform/dc/ip.txt.in @@ -0,0 +1,11 @@ +Hardware ID : SEGA SEGAKATANA +Maker ID : SEGA ENTERPRISES +Device Info : 0000 CD-ROM1/1 +Area Symbols : JUE +Peripherals : E000F10 +Product No : T0000 +Version : @VERSION@ +Release Date : @DATE@ +Boot Filename : SCUMMVM.BIN +SW Maker Name : The ScummVM team +Game Title : ScummVM diff --git a/backends/platform/ds/arm9/source/fat/disc_io.h b/backends/platform/ds/arm9/source/fat/disc_io.h index d9a3c67353..0fc83a7493 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.h +++ b/backends/platform/ds/arm9/source/fat/disc_io.h @@ -64,7 +64,7 @@ #endif #ifdef NDS - #include <nds/jtypes.h> + #include <nds/ndstypes.h> #else #include "gba_types.h" #endif diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.h b/backends/platform/ds/arm9/source/fat/gba_nds_fat.h index f9746560e0..dd5c8ba85f 100644 --- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.h +++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.h @@ -47,7 +47,7 @@ #endif #ifdef NDS - #include <nds/jtypes.h> + #include <nds/ndstypes.h> #else #include "gba_types.h" #endif diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h index 7f22709206..560bd8ab4b 100644 --- a/backends/platform/ds/arm9/source/portdefs.h +++ b/backends/platform/ds/arm9/source/portdefs.h @@ -36,7 +36,7 @@ typedef unsigned int u32; typedef signed int s32; */ -#include "nds/jtypes.h" +#include "nds/ndstypes.h" // Somebody removed these from scummsys.h, but they're still required, so I'm adding them here diff --git a/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h b/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h index 743d158d34..9344be68f9 100644 --- a/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h +++ b/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h @@ -27,7 +27,7 @@ ////////////////////////////////////////////////////////////////////// -#include <nds/jtypes.h> +#include <nds/ndstypes.h> #include <nds/ipc.h> ////////////////////////////////////////////////////////////////////// diff --git a/backends/platform/ds/ds.mk b/backends/platform/ds/ds.mk new file mode 100644 index 0000000000..aeba1820c6 --- /dev/null +++ b/backends/platform/ds/ds.mk @@ -0,0 +1,111 @@ +# Repeat "all" target here, to make sure it is the first target +# Currently disabled, so only arm7.bin gets build +#all: + + + +# Files in this list will be optimisied for speed, otherwise they will be optimised for space +OPTLIST := actor.cpp ds_main.cpp osystem_ds.cpp blitters.cpp fmopl.cpp rate.cpp isomap.cpp image.cpp gfx.cpp sprite.cpp actor_path.cpp actor_walk.cpp +#OPTLIST := + +# Compiler options for files which should be optimised for speed +OPT_SPEED := -O3 + +# Compiler options for files which should be optimised for space +OPT_SIZE := -Os -mthumb + + +#-mthumb -fno-gcse -fno-schedule-insns2 + + +OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) + + +# TODO: Handle files in OPTLIST. +# For this, the list should be made explicit. So, replace actor.cpp by path/to/actor.cpp -- +# in fact, there are several actor.cpp files, and right now all are "optimized", but +# I think Neil only had the SAGA one in mind. Same for gfx.cpp + + + + + + +############################################################################# +############################################################################# +############################################################################# + + +#ndsdir = $(srcdir)/backends/platform/ds +ndsdir = backends/platform/ds + +############################################################################# +# +# ARM7 rules. +# For ARM7 files, we need different compiler flags, which leads to the +# extra rules for .o files below +# +############################################################################# + +$(ndsdir)/arm7/arm7.bin: $(ndsdir)/arm7/arm7.elf + +$(ndsdir)/arm7/arm7.elf: \ + $(ndsdir)/arm7/source/libcartreset/cartreset.o \ + $(ndsdir)/arm7/source/main.o + +# HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX +# as soon as possible. +CC := $(DEVKITARM)/bin/arm-eabi-gcc + +# HACK/TODO: Pointer to objcopy. This should really be set by configure +OBJCOPY := $(DEVKITARM)/bin/arm-eabi-objcopy + +# +# Set various flags +# +ARM7_ARCH := -mthumb-interwork + +# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD +# *insists* it has a FPU or VFP, and it won't take no for an answer! +ARM7_CFLAGS := -g -Wall -O2\ + -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer\ + -ffast-math \ + $(ARM7_ARCH) \ + -I$(srcdir)/$(ndsdir)/arm7/source/libcartreset \ + -I$(srcdir)/$(ndsdir)/commoninclude \ + -I$(DEVKITPRO)/libnds/include \ + -I$(DEVKITPRO)/libnds/include/nds \ + -DARM7 + +ARM7_CXXFLAGS := $(ARM7_CFLAGS) -fno-exceptions -fno-rtti + +ARM7_LDFLAGS := -g $(ARM7_ARCH) -mno-fpu + +# HACK/FIXME: Define a custom build rule for cartreset.c. +# We do this because it is a .c file, not a .cpp file and so is outside our +# regular build system anyway. But this is *bad*. It should be changed into a +# .cpp file and this rule be removed. +%.o: %.c + $(MKDIR) $(*D)/$(DEPDIR) + $(CC) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + + +# Set custom build flags for cartreset.o +$(ndsdir)/arm7/source/libcartreset/cartreset.o: CXXFLAGS=$(ARM7_CFLAGS) +$(ndsdir)/arm7/source/libcartreset/cartreset.o: CPPFLAGS= + +# Set custom build flags for main.o +$(ndsdir)/arm7/source/main.o: CXXFLAGS=$(ARM7_CXXFLAGS) +$(ndsdir)/arm7/source/main.o: CPPFLAGS= + +# Rule for creating ARM7 .bin files from .elf files +%.bin: %.elf + @echo ------ + @echo Building $@... + $(OBJCOPY) -O binary $< $@ + +# Rule for creating ARM7 .elf files by linking .o files together with a special linker script +%.elf: + @echo ------ + @echo Building $@... + $(CXX) $(ARM7_LDFLAGS) -specs=ds_arm7.specs $+ -L/opt/devkitPro/libnds/lib -lnds7 -o $@ diff --git a/backends/platform/ds/module.mk b/backends/platform/ds/module.mk new file mode 100644 index 0000000000..16630dc070 --- /dev/null +++ b/backends/platform/ds/module.mk @@ -0,0 +1,71 @@ +MODULE := backends/platform/ds + +ARM7_MODULE_OBJS := \ + arm7/source/main.o \ + arm7/source/libcartreset/cartreset.o \ + +PORT_OBJS := \ + arm9/source/blitters_arm.o \ + arm9/source/cdaudio.o \ + arm9/source/dsmain.o \ + ../../fs/ds/ds-fs.o \ + arm9/source/gbampsave.o \ + arm9/source/scummhelp.o \ + arm9/source/osystem_ds.o \ + arm9/source/portdefs.o \ + arm9/source/ramsave.o \ + arm9/source/touchkeyboard.o \ + arm9/source/zipreader.o \ + arm9/source/dsoptions.o \ + arm9/source/keys.o \ + arm9/source/wordcompletion.o \ + arm9/source/interrupt.o + +ifdef USE_PROFILER + PORT_OBJS += arm9/source/profiler/cyg-profile.o +endif + +DATA_OBJS := \ + arm9/data/icons.o \ + arm9/data/keyboard.o \ + arm9/data/keyboard_pal.o \ + arm9/data/default_font.o \ + arm9/data/8x8font_tga.o + +COMPRESSOR_OBJS := #arm9/source/compressor/lz.o + +FAT_OBJS := arm9/source/fat/disc_io.o arm9/source/fat/gba_nds_fat.o\ + arm9/source/fat/io_fcsr.o \ + arm9/source/fat/io_m3cf.o \ + arm9/source/fat/io_mpcf.o \ + arm9/source/fat/io_sccf.o \ + arm9/source/fat/io_m3sd.o \ + arm9/source/fat/io_nmmc.o \ + arm9/source/fat/io_scsd.o \ + arm9/source/fat/io_scsd_asm.o \ + arm9/source/fat/io_njsd.o \ + arm9/source/fat/io_mmcf.o \ + arm9/source/fat/io_sd_common.o \ + arm9/source/fat/io_m3_common.o \ + arm9/source/fat/io_dldi.o \ + arm9/source/fat/m3sd.o + + +# arm9/source/fat/io_cf_common.o arm9/source/fat/io_m3_common.o\ +# arm9/source/fat/io_sd_common.o arm9/source/fat/io_scsd_s.o \ +# arm9/source/fat/io_sc_common.o arm9/source/fat/io_sd_common.o + +LIBCARTRESET_OBJS := + #arm9/source/libcartreset/cartreset.o + + +MODULE_OBJS := + + + +# TODO: Should add more dirs to MODULE_DIRS so that "make distclean" can remove .deps dirs. +MODULE_DIRS += \ + backends/platform/ds/ + +# We don't use the rules.mk here on purpose +OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS) diff --git a/backends/platform/gp2x/build/README-GP2X b/backends/platform/gp2x/build/README-GP2X index 7e10fc484e..f95a974230 100644 --- a/backends/platform/gp2x/build/README-GP2X +++ b/backends/platform/gp2x/build/README-GP2X @@ -12,10 +12,19 @@ Contents: * How to save <#How_to_save> * Controller mappings <#Controller_mappings> * Know issues <#Know_issues> - * Major TODO's <#Major_TODOs> + * TODO's <#Major_TODOs> * Additional resources/links <#Additional_resourceslinks> * Credits <#Credits> +------------------------------------------------------------------------ + +Please refer to the: + +GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14> +WiKi: <http://wiki.scummvm.org/index.php/GP2X> + +for the most current information on the port and any updates to this +documentation. ------------------------------------------------------------------------ About the backend/port @@ -58,22 +67,6 @@ Included engines Just because an engine is included does not mean any/all of its games are supported. Please check game compatability for more infomation. - * Scumm - (All games supported by ScummVM should work to some - extent, using the hardware scalar if needed) - * AGOS (AKA Simon) - (Simon the Sorcerer one and two). - * Sky - (Beneath a Steel Sky) - * Sword - (Broken Sword 1) - This engine uses the hardware scalar to - downsize the graphics to fix on the GP2X. It is NOT very nice to - look at. - * Sword2 - (Broken Sword 2) - This engine uses the hardware scalar - to downsize the graphics to fix on the GP2X. It is NOT very nice - to look at. - * Gob - (Goblins one) - * Queen - (Flight of the Amazon Queen) - * Kyra - (The Legend of Kyrandia) - -All other game engines are disabled in this release. - ------------------------------------------------------------------------ Supported audio options @@ -169,16 +162,10 @@ It happens very infrequently, both times it was in the DOTT CD intro. Saving often is never a bad idea anyhow. ------------------------------------------------------------------------ -Major TODO's +TODO's Fix save support when using the Sky engine (Beneath a Steel Sky) - You CAN'T save at the moment but auto save works. -Look into inconsistencies with AGOS engine and map Y key to a button -combination to allow clean quitting (Simon 1/2). -Add splash-screen and pre-ScummVM config menu (CPU speed, LCD timings -etc.) - Partly done. -Fix TV out, maybe make it an option in the pre-ScummVM config menu. -Any help appreciated :). ------------------------------------------------------------------------ Additional resources/links @@ -186,7 +173,7 @@ Additional resources/links * ScummVM WiKi GP2X page <http://wiki.scummvm.org/index.php/GP2X> * ScummVM forums GP2X forum <http://forums.scummvm.org/viewforum.php?f=14> - * My own ScummVM page <http://www.distant-earth.com/scummvm> (for + * My own ScummVM page <http://scummvm.distant-earth.com/> (for SVN/test builds) * Main ScummVM site <http://www.scummvm.org> (for official supported release builds) @@ -197,4 +184,3 @@ Credits Core ScummVM code (c) The ScummVM Team Portions of the GP2X backend (c) John Willis Detailed (c) information can be found within the source code - diff --git a/backends/platform/gp2x/build/README-GP2X.html b/backends/platform/gp2x/build/README-GP2X.html deleted file mode 100644 index 1b5f1a4173..0000000000 --- a/backends/platform/gp2x/build/README-GP2X.html +++ /dev/null @@ -1,369 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>ScummVM - GP2X SPECIFIC README</title> - - -</head> - - -<body> - -<span style="font-weight: bold;">ScummVM - -GP2X SPECIFIC README - HEAD SVN<br> - -</span> -<hr style="width: 100%; height: 2px;"><br> - -<span style="font-weight: bold;">Contents:</span><br> - -<ul> - - <li><a href="#About_the_backendport">About the -backend/port</a></li> - - <li><a href="#Game_compatibility">Game -compatability</a></li> - - <li><a href="#Included_engines">Included engines</a></li> - - <li><a href="#Supported_audio_options">Supported -audio options</a></li> - - <li><a href="#Supported_cut-scene_options">Supported -cut-scene options</a></li> - - <li><a href="#Recent_changes">Recent changes</a></li> - - <li><a href="#How_to_save">How to save</a></li> - - <li><a href="#Controller_mappings">Controller -mappings</a></li> - - <li><a href="#Know_issues">Know issues</a></li> - - <li><a href="#Major_TODOs">Major TODO's</a></li> - - <li><a href="#Additional_resourceslinks">Additional -resources/links</a></li> - - <li><a href="#Credits">Credits</a></li> - -</ul> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="About_the_backendport"></a><span style="font-weight: bold;">About the backend/port</span><br> - -<br> - -This is the readme for the offficial GP2X ScummVM backend (also known -as the GP2X port).<br> - -<br> - -This is an SVN test release of ScummVM for the GP2X, it would be -appreciated -if this SVN test distribution was not mirrored and that people be -directed to <a href="http://www.distant-earth.com/scummvm">http://www.distant-earth.com/scummvm</a> -instead for updated SVN builds.<br> - -<br> - -Full supported official releases of the GP2X ScummVM backend are made -in line with main official releases and are avalalble from the <a href="http://www.scummvm.org/downloads.php">ScummVM -downloads page</a>.<br> - -<br> - -This build is in an active state of development and as such no -‘expected’ behavior can be guaranteed ;).<br> - -<br> - -SVN builds are quickly tested with firmware 2.0.0 for reference.<br> - -<br> - -Please refer to the <a href="http://forums.scummvm.org/viewforum.php?f=14">GP2X -ScummVM forum</a> and <a href="http://wiki.scummvm.org/index.php/GP2X">WiKi</a> -for the latest information on the port.<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Game_compatibility"></a><span style="font-weight: bold;">Game compatibility</span><br> - -<br> - -For information on the compatability of a specific game please refer to -the <a href="http://wiki.scummvm.org/index.php/GP2X#Compatibility_List">GP2X -compatability section of the ScummVM WiKi</a>.<br> - -<br> - -Please note the version and date of the ScummVM build you are running -when reviewing the above list.<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Included_engines"></a><span style="font-weight: bold;">Included engines</span><br> - -<br> - -Just because an engine is included does not mean any/all of its games -are supported. Please check game compatability for more infomation.<br> - -<ul> - - <li>Scumm - (All games supported by ScummVM should work to some -extent, using the hardware scalar if needed)</li> - - <li>AGOS (AKA Simon) - (Simon the Sorcerer one and two).</li> - - <li>Sky - (Beneath a Steel Sky)</li> - - <li>Sword - (Broken Sword 1) - This engine uses the hardware -scalar to -downsize the graphics to fix on the GP2X. It is NOT very nice to look -at.</li> - - <li>Sword2 - (Broken Sword 2) - This engine uses the hardware -scalar to downsize the graphics to fix on the GP2X. It is NOT very nice -to look at.</li> - - <li>Gob - (Goblins one)</li> - - <li>Queen - (Flight of the Amazon Queen)</li> - - <li>Kyra - (The Legend of Kyrandia)</li> - -</ul> - -All other game engines are disabled in this release.<br> - -<br style="font-weight: bold;"> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Supported_audio_options"></a><span style="font-weight: bold;">Supported audio options</span><br> - -<br> - -Raw audio.<br> - -MP3 audio.<br> - -OGG Vorbis audio.<br> - -<br> - -FLAC audio is currently unsupported.<br> - -<br> - -For best results use uncompressed audio in games.<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Supported_cut-scene_options"></a><span style="font-weight: bold;">Supported cut-scene options</span><br> - -<br> - -No cut scene compression options are currently supported. <br> - -<br> - -DXA video support will be added as soon as it is stable.<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Recent_changes"></a><span style="font-weight: bold;">Recent changes<br> - -<br> - -</span>Refined audio hacks to reduce audio delay a little more.<br> - -Enabled hardware scalar code.<br> - -Now built using SDL 1.2.9 for the parts of the port that use SDL (some -parts now hit the hardware directly).<br> - -Enabled new launcher - (Ensure defaulttheme.zip is in the same folder -as the executable).<br> - -Aspect Ratio Correction can now be disabled ‘per -game’. When adding a game you can find this option on the GFX -tab. <br> - -Note: This will cause the game to run with a black border at the bottom -as it will be rendered to a 320*200 frame.<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="How_to_save"></a><span style="font-weight: bold;">How to save</span><br> - -<br> - -<span style="font-weight: bold;">NOTE:</span> -Everything is saved to the SD card, saves are stored in the <span style="font-weight: bold;">saves</span> folder under -your main ScummVM executable unless you set another save location.<br> - -<br> - -The configiration file for ScummVM (.scummvmrc) is stored in the -same place as the ScummVM executable.<br> - -<br> - -The save process below is for Scumm engine games but the -principle is the same for all.<br> - -<br> - -In Game.<br> - -<br> - -1. Right Trigger<br> - -2. Select SAVE with B<br> - -3. Select a position with B<br> - -4. Right trigger puts ? in the name box for some text.<br> - -5. Press B to save<br> - -<br> - -Basically the emulated keys you can use are equivelent to the values -buttons are mapped to, <br> - -<br> - -I have a virtual keyboard like the GP32 one (left/right on the stick to -pick chars) to add in at some point ;-)<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Controller_mappings"></a><span style="font-weight: bold;">Controller mappings</span><br> - -<br> - -<span style="font-weight: bold;">Mouse emulation:</span><br> - -<br> - -Stick: Move Pointer<br> - -Stick Click: ‘light’ Left Click<br> - -B: Left click<br> - -X: Right click<br> - -<br> - -<span style="font-weight: bold;">Keyboard emulation:</span><br> - -<br> - -Start: Return<br> - -Select: Escape<br> - -Y: Space Bar (Pause)<br> - -Right Trigger: Game Menu (Save, Load, Quit etc.)<br> - -Volume Buttons: Increase and Decrease volume (5% per press)<br> - -<br> - -<span style="font-weight: bold;">Fancy button combos:</span><br> - -<br> - -NOTE: To use button combos press and hold the Left Trigger then...<br> - -<br> - -Y: Toggle "zoom" mode - Try it in larger games like Broken Sword.<br> - -Volume Buttons: Increase and Decrease subtitle speed (In SCUMM games)<br> - -Right Trigger: 0 (For skipping the copy protection in Monkey Island 2)<br> - -Select: Exit ScummVM completely (and gracefully)<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Know_issues"></a><span style="font-weight: bold;">Know issues</span><br> - -<br> - -Possible random crash (well SegFault). I have had this happen twice and -have not tracked down the cause. <br> - -It happens very infrequently, both times it was in the DOTT CD intro. -Saving often is never a bad idea anyhow.<br> - -<br> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Major_TODOs"></a><span style="font-weight: bold;">Major TODO's</span><br> - -<br> - -Fix save support when using the Sky engine (Beneath a Steel Sky) - You -CAN'T save at the moment but auto save works.<br> - -Look into inconsistencies with AGOS engine and map Y key to a button -combination to allow clean quitting (Simon 1/2).<br> - -Add splash-screen and pre-ScummVM config menu (CPU speed, LCD timings -etc.) - Partly done.<br> - -Fix TV out, maybe make it an option in the pre-ScummVM config menu.<br> - -Any help appreciated :).<br> - -<br style="font-weight: bold;"> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Additional_resourceslinks"></a><span style="font-weight: bold;">Additional resources/links<br> - -<br> - -</span><span style="font-weight: bold;">Note:</span> -When providing feedback, -requests, forum posts, bug reports or anything like that always include -a mention of the version of ScummVM you are using (the build version, -date and time can be seen in the main game launcher window).<br> - -<ul> - - <li><a href="http://wiki.scummvm.org/index.php/GP2X">ScummVM -WiKi GP2X page</a></li> - - <li><a href="http://forums.scummvm.org/viewforum.php?f=14">ScummVM -forums GP2X forum</a></li> - - <li><a href="http://www.distant-earth.com/scummvm">My -own ScummVM page</a> (for SVN/test builds)</li> - - <li><a href="http://www.scummvm.org">Main ScummVM -site</a> (for official supported release builds)</li> - -</ul> - -<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Credits"></a><span style="font-weight: bold;">Credits</span><br> - -<br> - -Core ScummVM code (c) The ScummVM Team<br> - -Portions of the GP2X backend (c) John Willis<br> - -Detailed (c) information can be found within the source code<br> - -<br> - -</body> -</html> diff --git a/backends/platform/gp2x/build/bundle.sh b/backends/platform/gp2x/build/bundle.sh index 560f096ed4..c68c62191b 100755 --- a/backends/platform/gp2x/build/bundle.sh +++ b/backends/platform/gp2x/build/bundle.sh @@ -19,7 +19,6 @@ echo "Please put your save games in this dir" >> "scummvm-gp2x-`date '+%Y-%m-%d' cp ./scummvm.gpe ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ./scummvm.png ./scummvm-gp2x-`date '+%Y-%m-%d'`/ -cp ./README-GP2X.html ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ./README-GP2X ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ./mmuhack.o ./scummvm-gp2x-`date '+%Y-%m-%d'`/ cp ../../../../scummvm.gp2x ./scummvm-gp2x-`date '+%Y-%m-%d'`/ diff --git a/backends/platform/gp2x/build/config-alleng.sh b/backends/platform/gp2x/build/config-alleng.sh index 5724f39dc5..4a3526d50c 100755 --- a/backends/platform/gp2x/build/config-alleng.sh +++ b/backends/platform/gp2x/build/config-alleng.sh @@ -18,6 +18,6 @@ export DEFINES=-DNDEBUG # Edit the configure line to suit. cd ../../../.. ./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-all-engines --enable-vkeybd -# --enable-plugins --default-dynamic +#--enable-plugins --default-dynamic echo Generating config for GP2X complete. Check for errors. diff --git a/backends/platform/gp2x/build/config.sh b/backends/platform/gp2x/build/config.sh index 55954d6231..2bc49564f7 100755 --- a/backends/platform/gp2x/build/config.sh +++ b/backends/platform/gp2x/build/config.sh @@ -18,6 +18,6 @@ export DEFINES=-DNDEBUG # Edit the configure line to suit. cd ../../../.. ./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd -# --enable-plugins --default-dynamic +#--enable-plugins --default-dynamic echo Generating config for GP2X complete. Check for errors. diff --git a/backends/platform/gp2x/events.cpp b/backends/platform/gp2x/events.cpp index 9a9a59765d..8cd034d2d5 100644 --- a/backends/platform/gp2x/events.cpp +++ b/backends/platform/gp2x/events.cpp @@ -35,7 +35,7 @@ #include "common/events.h" // FIXME move joystick defines out and replace with confile file options -// we should really allow users to map any key to a joystick button +// we should really allow users to map any key to a joystick button using the keymapper. #define JOY_DEADZONE 2200 #define JOY_XAXIS 0 @@ -273,7 +273,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { Combos: - GP2X_BUTTON_VOLUP & GP2X_BUTTON_VOLDOWN 0 (For Monkey 2 CP) + GP2X_BUTTON_VOLUP & GP2X_BUTTON_VOLDOWN 0 (For Monkey 2 CP) or Virtual Keyboard if enabled GP2X_BUTTON_L & GP2X_BUTTON_SELECT Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed) GP2X_BUTTON_L & GP2X_BUTTON_Y Toggles setZoomOnMouse() for larger then 320*240 games to scale to the point + raduis. GP2X_BUTTON_L & GP2X_BUTTON_START Common::EVENT_MAINMENU (ScummVM Global Main Menu) @@ -434,29 +434,22 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { } break; case GP2X_BUTTON_VOLUP: - //if (GP2X_BUTTON_STATE_L == TRUE) { - // displayMessageOnOSD("Setting CPU Speed at 230MHz"); - // GP2X_setCpuspeed(200); - //event.kbd.keycode = Common::KEYCODE_PLUS; - //event.kbd.ascii = mapKey(SDLK_PLUS, ev.key.keysym.mod, 0); - //} else { - GP2X_mixer_move_volume(1); + GP2X_HW::mixerMoveVolume(2); + if (GP2X_HW::volumeLevel == 100) { + displayMessageOnOSD("Maximum Volume"); + } else { displayMessageOnOSD("Increasing Volume"); - //} + } break; case GP2X_BUTTON_VOLDOWN: - //if (GP2X_BUTTON_STATE_L == TRUE) { - // displayMessageOnOSD("Setting CPU Speed at 60MHz"); - // GP2X_setCpuspeed(60); - //event.kbd.keycode = Common::KEYCODE_MINUS; - //event.kbd.ascii = mapKey(SDLK_MINUS, ev.key.keysym.mod, 0); - //} else { - GP2X_mixer_move_volume(0); + GP2X_HW::mixerMoveVolume(1); + if (GP2X_HW::volumeLevel == 0) { + displayMessageOnOSD("Minimal Volume"); + } else { displayMessageOnOSD("Decreasing Volume"); - //} + } break; - } } return true; diff --git a/backends/platform/gp2x/gp2x-hw.cpp b/backends/platform/gp2x/gp2x-hw.cpp index fe02e029f7..38799ea7ad 100644 --- a/backends/platform/gp2x/gp2x-hw.cpp +++ b/backends/platform/gp2x/gp2x-hw.cpp @@ -48,6 +48,20 @@ #include <sys/time.h> #include <unistd.h> +namespace GP2X_HW { + +enum { + VOLUME_NOCHG = 0, + VOLUME_DOWN = 1, + VOLUME_UP = 2, + VOLUME_CHANGE_RATE = 8, + VOLUME_MIN = 0, + VOLUME_INITIAL = 70, + VOLUME_MAX = 100 +}; + +int volumeLevel = VOLUME_INITIAL; + /* system registers */ static struct { @@ -61,14 +75,14 @@ static volatile unsigned short *MEM_REG; #define SYS_CLK_FREQ 7372800 -void GP2X_device_init() { +void deviceInit() { // Open devices if (!gp2x_dev[0]) gp2x_dev[0] = open("/dev/mixer", O_RDWR); if (!gp2x_dev[1]) gp2x_dev[1] = open("/dev/batt", O_RDONLY); if (!gp2x_dev[2]) gp2x_dev[2] = open("/dev/mem", O_RDWR); } -void GP2X_device_deinit() { +void deviceDeinit() { // Close devices { int i; @@ -92,68 +106,35 @@ void GP2X_device_deinit() { unpatchMMU(); } -// Vairous mixer level fudges. -// TODO: Clean up and merge quick hacks. - -void GP2X_mixer_set_volume(int L /*0..100*/, int R /*0..100*/) { - - /* Set an arbitrary percentage value for the hardware mixer volume. - - Parameters: - L (0..100) - volume percentage for the left channel - R (0..100) - volume percentage for the right channel - - Note: - - A higher percentage than 100 will distort your sound. - */ - - unsigned char temp[4]; - - if (L < 0) L = 0; - if (L > GP2X_MAXVOL) L = GP2X_MAXVOL; - if (R < 0) R = 0; - if (R > GP2X_MAXVOL) R = GP2X_MAXVOL; - - temp[0]=(unsigned char)L; - temp[1]=(unsigned char)R; - temp[2]=temp[3]=0; - - //warning("GP2X_mixer_set_volume is about to set %d %d", L, R); - ioctl(gp2x_dev[0], SOUND_MIXER_WRITE_PCM, temp); -} - -int GP2X_mixer_get_volume() { - int vol; - ioctl(gp2x_dev[0], SOUND_MIXER_READ_PCM, &vol); - //warning("GP2X_mixer_get_volume returned %d %d", (int)((vol & 0xff)), (int)((vol >> 8) & 0xff)); - return (int)((vol & 0xff)); +void mixerMoveVolume(int direction) { + if (volumeLevel <= 10) { + if (direction == VOLUME_UP) volumeLevel += VOLUME_CHANGE_RATE/2; + if (direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE/2; + } else { + if(direction == VOLUME_UP) volumeLevel += VOLUME_CHANGE_RATE; + if(direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE; + } + + if (volumeLevel < VOLUME_MIN) volumeLevel = VOLUME_MIN; + if (volumeLevel > VOLUME_MAX) volumeLevel = VOLUME_MAX; + + unsigned long soundDev = open("/dev/mixer", O_RDWR); + + if(soundDev) { + int vol = ((volumeLevel << 8) | volumeLevel); + ioctl(soundDev, SOUND_MIXER_WRITE_PCM, &vol); + close(soundDev); + } } -void GP2X_mixer_move_volume(int UpDown) { - // Raise volume 5% if 1 passed, lower 5% if 0. - int curvol, newvol; - ioctl(gp2x_dev[0], SOUND_MIXER_READ_PCM, &curvol); - curvol = ((int)((curvol & 0xff))); - newvol = ((int)((curvol & 0xff))); - //warning("GP2X_mixer_move_volume got current volume @ %d", curvol); - if (UpDown == 1) { - newvol = (curvol + 5); - } else if (UpDown == 0) { - newvol = (curvol - 5); - } - //warning("GP2X_mixer_move_volume is about to set volume @ %d", newvol); - GP2X_mixer_set_volume(newvol, newvol); - return; -} - -void GP2X_setCpuspeed(unsigned int mhz) +void setCpuspeed(unsigned int mhz) { set_FCLK(mhz); set_DCLK_Div(0); set_920_Div(0); } -int GP2X_getBattLevel() { +int getBattLevel() { int devbatt; unsigned short currentval=0; devbatt = open("/dev/batt", O_RDONLY); @@ -213,3 +194,6 @@ void gp2x_video_wait_vsync(void) MEM_REG[0x2846>>1]=(MEM_REG[0x2846>>1] | 0x20) & ~2; while (!(MEM_REG[0x2846>>1] & 2)); } + +} /* namespace GP2X_HW */ + diff --git a/backends/platform/gp2x/gp2x-hw.h b/backends/platform/gp2x/gp2x-hw.h index 89ad1093e4..7e72812cc4 100644 --- a/backends/platform/gp2x/gp2x-hw.h +++ b/backends/platform/gp2x/gp2x-hw.h @@ -31,16 +31,18 @@ #ifndef GP2X_HW_H #define GP2X_HW_H +namespace GP2X_HW { + #define GP2X_MAXVOL 100 // Highest level permitted by GP2X's mixer #define SYS_CLK_FREQ 7372800 // Clock Frequency -extern void GP2X_device_init(); -extern void GP2X_device_deinit(); -extern void GP2X_mixer_set_volume(int, int); -extern int GP2X_mixer_get_volume(); -extern void GP2X_mixer_move_volume(int); -extern void GP2X_setCpuspeed(unsigned int cpuspeed); -extern int GP2X_getBattLevel(); +extern int volumeLevel; + +extern void deviceInit(); +extern void deviceDeinit(); +extern void mixerMoveVolume(int); +extern void setCpuspeed(unsigned int cpuspeed); +extern int getBattLevel(); extern void save_system_regs(void); /* save some registers */ extern void set_display_clock_div(unsigned div); @@ -50,4 +52,6 @@ extern void set_DCLK_Div(unsigned short div); /* 0 to 7 divider (freq=FCLK/(1+di extern void Disable_940(void); /* 940t down */ extern void gp2x_video_wait_vsync(void); +} /* namespace GP2X_HW */ + #endif //GP2X_HW_H diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp index 15b5e19e5d..3d416f8415 100644 --- a/backends/platform/gp2x/gp2x.cpp +++ b/backends/platform/gp2x/gp2x.cpp @@ -34,6 +34,7 @@ #include "common/archive.h" #include "common/config-manager.h" #include "common/debug.h" +#include "common/EventRecorder.h" #include "common/events.h" #include "common/util.h" @@ -232,15 +233,16 @@ void OSystem_GP2X::initBackend() { // switch. Still, it's a potential future change to keep in mind. _timer = new DefaultTimerManager(); _timerID = SDL_AddTimer(10, &timer_handler, _timer); + } + + /* Initialise any GP2X specific stuff we may want (Batt Status, scaler etc.) */ + GP2X_HW::deviceInit(); - // Initialise any GP2X specific stuff we may want (Volume, Batt Status etc.) - GP2X_device_init(); + /* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */ + GP2X_HW::mixerMoveVolume(0); // Set Default hardware mixer volume to a plesent level. // This is done to 'reset' volume level if set by other apps. - GP2X_mixer_set_volume(70, 70); - - } //if (SDL_GP2X_MouseType() == 0) { // // No mouse, F100 default state. @@ -318,7 +320,7 @@ OSystem_GP2X::~OSystem_GP2X() { uint32 OSystem_GP2X::getMillis() { uint32 millis = SDL_GetTicks(); - getEventManager()->processMillis(millis); + g_eventRec.processMillis(millis); return millis; } @@ -446,8 +448,7 @@ void OSystem_GP2X::quit() { if (_joystick) SDL_JoystickClose(_joystick); - //CloseRam(); - GP2X_device_deinit(); + GP2X_HW::deviceDeinit(); SDL_RemoveTimer(_timerID); closeMixer(); diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp index 775c3afb73..a77afd88b7 100644 --- a/backends/platform/gp2x/graphics.cpp +++ b/backends/platform/gp2x/graphics.cpp @@ -30,6 +30,7 @@ #include "backends/platform/gp2x/gp2x-common.h" #include "common/util.h" +#include "common/mutex.h" #include "graphics/font.h" #include "graphics/fontman.h" #include "graphics/scaler.h" diff --git a/backends/platform/gp2xwiz/build/README-GP2XWIZ b/backends/platform/gp2xwiz/build/README-GP2XWIZ index 95ac844a2c..ec8142a6f3 100644 --- a/backends/platform/gp2xwiz/build/README-GP2XWIZ +++ b/backends/platform/gp2xwiz/build/README-GP2XWIZ @@ -11,19 +11,27 @@ Contents: * Recent changes <#Recent_changes> * How to save <#How_to_save> * Controller mappings <#Controller_mappings> - * Know issues <#Know_issues> - * Major TODO's <#Major_TODOs> + * Known issues <#Knonw_issues> * Additional resources/links <#Additional_resourceslinks> * Credits <#Credits> +------------------------------------------------------------------------ + +Please refer to the: + +GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14> +WiKi: <http://wiki.scummvm.org/index.php/GP2XWiz> + +for the most current information on the port and any updates to this +documentation. ------------------------------------------------------------------------ About the backend/port -This is the readme for the offficial GP2X WIZ ScummVM backend (also known as -the GP2X WIZ port). +This is the readme for the official GP2XWiz ScummVM backend (also known as +the GP2XWiz port). -This is an SVN test release of ScummVM for the GP2X WIZ, it would be +This is an SVN test release of ScummVM for the GP2XWiz, it would be appreciated if this SVN test distribution was not mirrored and that people be directed to http://scummvm.distant-earth.com/ instead for updated SVN builds. @@ -35,19 +43,12 @@ downloads page <http://www.scummvm.org/downloads.php>. This build is in an active state of development and as such no "expected" behavior can be guaranteed ;). -SVN builds are quickly tested with firmware 1.0.0 for reference. - -Please refer to the GP2X/GP2X WIZ ScummVM forum -<http://forums.scummvm.org/viewforum.php?f=14> and WiKi -<http://wiki.scummvm.org/index.php/GP2X> for the latest information on -the port. - ------------------------------------------------------------------------ Game compatibility For information on the compatability of a specific game please refer to -the GP2X compatability section of the ScummVM WiKi -<http://wiki.scummvm.org/index.php/GP2X#Compatibility_List>. +the GP2XWiz compatability section of the ScummVM WiKi +<http://wiki.scummvm.org/index.php/GP2XWiz#Compatibility_List>. Please note the version and date of the ScummVM build you are running when reviewing the above list. @@ -105,22 +106,20 @@ Right Trigger: Return Select: Escape Y: Space Bar (Pause) Menu: Game Menu (Save, Load, Quit etc.) -Volume Buttons: Increase and Decrease volume (5% per press) +Volume Buttons: Increase and Decrease volume Fancy button combos: NOTE: To use button combos press and hold the Left Trigger then... -Right Trigger: 0 (For skipping the copy protection in Monkey Island 2) +Right Trigger: Display Virtual Keyboard Menu: Bring up the Global main menu for ScummVM Select: Exit ScummVM completely (and gracefully) ------------------------------------------------------------------------ -Know issues +Known issues -Possible random crash (well SegFault). I have had this happen twice and -have not tracked down the cause. -It happens very infrequently, both times it was in the DOTT CD intro. +No major known issues ------------------------------------------------------------------------ Additional resources/links @@ -128,7 +127,7 @@ Additional resources/links * ScummVM WiKi GP2X page <http://wiki.scummvm.org/index.php/GP2X> * ScummVM forums GP2X forum <http://forums.scummvm.org/viewforum.php?f=14> - * My own ScummVM page <http://www.distant-earth.com/scummvm> (for + * My own ScummVM page <http://scummvm.distant-earth.com/> (for SVN/test builds) * Main ScummVM site <http://www.scummvm.org> (for official supported release builds) diff --git a/backends/platform/gp2xwiz/build/bundle.sh b/backends/platform/gp2xwiz/build/bundle.sh index 506dfcb742..492ba9e1c6 100755 --- a/backends/platform/gp2xwiz/build/bundle.sh +++ b/backends/platform/gp2xwiz/build/bundle.sh @@ -8,6 +8,8 @@ mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm" mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves" mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins" mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data" +mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/lib" + echo "Please put your save games in this dir" >> "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves/PUT_SAVES_IN_THIS_DIR" @@ -27,6 +29,13 @@ cp ../../../../dists/pred.dic ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/ cp ../../../../dists/engine-data/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data cp ../../../../plugins/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins +# Copy over dynamic libs needed by the app (as the ones in the default filesystem are broken). +f=`which arm-open2x-linux-g++` +loc=`dirname "$f"` +cp $loc/../lib/libz.so.1.2.3 ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/lib/libz.so.1 +cp $loc/../lib/libvorbisidec.so.1.0.2 ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/lib/libvorbisidec.so.1 + + echo Making Stripped exe. arm-open2x-linux-strip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/scummvm.wiz diff --git a/backends/platform/gp2xwiz/build/scummvm.gpe b/backends/platform/gp2xwiz/build/scummvm.gpe index 037b81d937..42cc00a22a 100755 --- a/backends/platform/gp2xwiz/build/scummvm.gpe +++ b/backends/platform/gp2xwiz/build/scummvm.gpe @@ -1,5 +1,9 @@ #!/bin/sh +# Export the location of any libs ScummVM depends on +# (to avoid installing to the NAND and overwriting the broken ones there). +export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH + # Run ScummVM, important this bit. ./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc diff --git a/backends/platform/gp2xwiz/gp2xwiz-events.cpp b/backends/platform/gp2xwiz/gp2xwiz-events.cpp index dfb36742dc..48c9af00ff 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-events.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-events.cpp @@ -81,8 +81,13 @@ static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) { } void OSystem_GP2XWIZ::fillMouseEvent(Common::Event &event, int x, int y) { - event.mouse.x = x; - event.mouse.y = y; + if(_videoMode.mode == GFX_HALF && !_overlayVisible){ + event.mouse.x = x*2; + event.mouse.y = y*2; + } else { + event.mouse.x = x; + event.mouse.y = y; + } // Update the "keyboard mouse" coords _km.x = x; @@ -203,7 +208,7 @@ bool OSystem_GP2XWIZ::pollEvent(Common::Event &event) { Combos: - GP2X_BUTTON_VOLUP & GP2X_BUTTON_VOLDOWN 0 (For Monkey 2 CP) + GP2X_BUTTON_VOLUP & GP2X_BUTTON_VOLDOWN 0 (For Monkey 2 CP) or Virtual Keyboard if enabled GP2X_BUTTON_L & GP2X_BUTTON_SELECT Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed) GP2X_BUTTON_L & GP2X_BUTTON_MENU Common::EVENT_MAINMENU (ScummVM Global Main Menu) GP2X_BUTTON_L & GP2X_BUTTON_A Common::EVENT_PREDICTIVE_DIALOG for predictive text entry box (AGI games) diff --git a/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp b/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp index 2482051286..90f2c821aa 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp @@ -24,10 +24,433 @@ */ #include "backends/platform/gp2xwiz/gp2xwiz-sdl.h" +#include "backends/platform/gp2xwiz/gp2xwiz-scaler.h" // TODO: Make GFX_HALF/HalfScale generic. +#include "common/mutex.h" +#include "graphics/font.h" +#include "graphics/fontman.h" +#include "graphics/scaler.h" +#include "graphics/scaler/intern.h" +#include "graphics/surface.h" -/* TODO: Add code to ensure that overlay is always 320*240 and maybe invoke some custom scale code. */ +static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { + {"1x", "Fullscreen", GFX_NORMAL}, +// {"½x", "Downscale", GFX_HALF}, + {0, 0, 0} +}; + + +const OSystem::GraphicsMode *OSystem_GP2XWIZ::getSupportedGraphicsModes() const { + return s_supportedGraphicsModes; +} + +int OSystem_GP2XWIZ::getDefaultGraphicsMode() const { + return GFX_NORMAL; +} + +bool OSystem_GP2XWIZ::setGraphicsMode(int mode) { + Common::StackLock lock(_graphicsMutex); + + assert(_transactionMode == kTransactionActive); + + if (_oldVideoMode.setup && _oldVideoMode.mode == mode) + return true; + + int newScaleFactor = 1; + + switch(mode) { + case GFX_NORMAL: + newScaleFactor = 1; + break; + case GFX_HALF: + newScaleFactor = 1; + break; + default: + warning("unknown gfx mode %d", mode); + return false; + } + + _transactionDetails.normal1xScaler = (mode == GFX_NORMAL); + if (_oldVideoMode.setup && _oldVideoMode.scaleFactor != newScaleFactor) + _transactionDetails.needHotswap = true; + + _transactionDetails.needUpdatescreen = true; + + _videoMode.mode = mode; + _videoMode.scaleFactor = newScaleFactor; + + return true; +} + +void OSystem_GP2XWIZ::setGraphicsModeIntern() { + Common::StackLock lock(_graphicsMutex); + ScalerProc *newScalerProc = 0; + + switch (_videoMode.mode) { + case GFX_NORMAL: + newScalerProc = Normal1x; + break; + case GFX_HALF: + newScalerProc = HalfScale; + break; + + default: + error("Unknown gfx mode %d", _videoMode.mode); + } + + _scalerProc = newScalerProc; + + if (!_screen || !_hwscreen) + return; + + // Blit everything to the screen + _forceFull = true; + + // Even if the old and new scale factors are the same, we may have a + // different scaler for the cursor now. + blitCursor(); +} + + +void OSystem_GP2XWIZ::initSize(uint w, uint h) { + assert(_transactionMode == kTransactionActive); + + // Avoid redundant res changes + if ((int)w == _videoMode.screenWidth && (int)h == _videoMode.screenHeight) + return; + + _videoMode.screenWidth = w; + _videoMode.screenHeight = h; + if(w > 320 || h > 240){ + setGraphicsMode(GFX_HALF); + setGraphicsModeIntern(); + toggleMouseGrab(); + } + + _cksumNum = (w * h / (8 * 8)); + + _transactionDetails.sizeChanged = true; + + free(_dirtyChecksums); + _dirtyChecksums = (uint32 *)calloc(_cksumNum * 2, sizeof(uint32)); +} bool OSystem_GP2XWIZ::loadGFXMode() { + _videoMode.overlayWidth = 320; + _videoMode.overlayHeight = 240; + _videoMode.fullscreen = true; + + if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400) + _videoMode.aspectRatioCorrection = false; + OSystem_SDL::loadGFXMode(); } + +void OSystem_GP2XWIZ::drawMouse() { + if (!_mouseVisible || !_mouseSurface) { + _mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0; + return; + } + + SDL_Rect dst; + int scale; + int width, height; + int hotX, hotY; + + if(_videoMode.mode == GFX_HALF && !_overlayVisible){ + dst.x = _mouseCurState.x/2; + dst.y = _mouseCurState.y/2; + } else { + dst.x = _mouseCurState.x; + dst.y = _mouseCurState.y; + } + + if (!_overlayVisible) { + scale = _videoMode.scaleFactor; + width = _videoMode.screenWidth; + height = _videoMode.screenHeight; + dst.w = _mouseCurState.vW; + dst.h = _mouseCurState.vH; + hotX = _mouseCurState.vHotX; + hotY = _mouseCurState.vHotY; + } else { + scale = 1; + width = _videoMode.overlayWidth; + height = _videoMode.overlayHeight; + dst.w = _mouseCurState.rW; + dst.h = _mouseCurState.rH; + hotX = _mouseCurState.rHotX; + hotY = _mouseCurState.rHotY; + } + + // The mouse is undrawn using virtual coordinates, i.e. they may be + // scaled and aspect-ratio corrected. + + _mouseBackup.x = dst.x - hotX; + _mouseBackup.y = dst.y - hotY; + _mouseBackup.w = dst.w; + _mouseBackup.h = dst.h; + + // We draw the pre-scaled cursor image, so now we need to adjust for + // scaling, shake position and aspect ratio correction manually. + + if (!_overlayVisible) { + dst.y += _currentShakePos; + } + + if (_videoMode.aspectRatioCorrection && !_overlayVisible) + dst.y = real2Aspect(dst.y); + + dst.x = scale * dst.x - _mouseCurState.rHotX; + dst.y = scale * dst.y - _mouseCurState.rHotY; + dst.w = _mouseCurState.rW; + dst.h = _mouseCurState.rH; + + // Note that SDL_BlitSurface() and addDirtyRect() will both perform any + // clipping necessary + + if (SDL_BlitSurface(_mouseSurface, NULL, _hwscreen, &dst) != 0) + error("SDL_BlitSurface failed: %s", SDL_GetError()); + + // The screen will be updated using real surface coordinates, i.e. + // they will not be scaled or aspect-ratio corrected. + addDirtyRect(dst.x, dst.y, dst.w, dst.h, true); +} + +void OSystem_GP2XWIZ::undrawMouse() { + const int x = _mouseBackup.x; + const int y = _mouseBackup.y; + + // When we switch bigger overlay off mouse jumps. Argh! + // This is intended to prevent undrawing offscreen mouse + if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight)) + return; + + if (_mouseBackup.w != 0 && _mouseBackup.h != 0){ + if(_videoMode.mode == GFX_HALF && !_overlayVisible){ + addDirtyRect(x*2, y*2, _mouseBackup.w*2, _mouseBackup.h*2); + } else { + addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h); + } + } +} + +void OSystem_GP2XWIZ::internUpdateScreen() { + SDL_Surface *srcSurf, *origSurf; + int height, width; + ScalerProc *scalerProc; + int scale1; + +#if defined (DEBUG) && ! defined(_WIN32_WCE) // definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?) + assert(_hwscreen != NULL); + assert(_hwscreen->map->sw_data != NULL); +#endif + + // If the shake position changed, fill the dirty area with blackness + if (_currentShakePos != _newShakePos) { + SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor}; + + if (_videoMode.aspectRatioCorrection && !_overlayVisible) + blackrect.h = real2Aspect(blackrect.h - 1) + 1; + + SDL_FillRect(_hwscreen, &blackrect, 0); + + _currentShakePos = _newShakePos; + + _forceFull = true; + } + + // Check whether the palette was changed in the meantime and update the + // screen surface accordingly. + if (_screen && _paletteDirtyEnd != 0) { + SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart, + _paletteDirtyStart, + _paletteDirtyEnd - _paletteDirtyStart); + + _paletteDirtyEnd = 0; + + _forceFull = true; + } + +#ifdef USE_OSD + // OSD visible (i.e. non-transparent)? + if (_osdAlpha != SDL_ALPHA_TRANSPARENT) { + // Updated alpha value + const int diff = SDL_GetTicks() - _osdFadeStartTime; + if (diff > 0) { + if (diff >= kOSDFadeOutDuration) { + // Back to full transparency + _osdAlpha = SDL_ALPHA_TRANSPARENT; + } else { + // Do a linear fade out... + const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100; + _osdAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration; + } + SDL_SetAlpha(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdAlpha); + _forceFull = true; + } + } +#endif + + if (!_overlayVisible) { + origSurf = _screen; + srcSurf = _tmpscreen; + width = _videoMode.screenWidth; + height = _videoMode.screenHeight; + scalerProc = _scalerProc; + scale1 = _videoMode.scaleFactor; + } else { + origSurf = _overlayscreen; + srcSurf = _tmpscreen2; + width = _videoMode.overlayWidth; + height = _videoMode.overlayHeight; + scalerProc = Normal1x; + + scale1 = 1; + } + + // Add the area covered by the mouse cursor to the list of dirty rects if + // we have to redraw the mouse. + if (_mouseNeedsRedraw) + undrawMouse(); + + // Force a full redraw if requested + if (_forceFull) { + _numDirtyRects = 1; + _dirtyRectList[0].x = 0; + _dirtyRectList[0].y = 0; + _dirtyRectList[0].w = width; + _dirtyRectList[0].h = height; + } + + // Only draw anything if necessary + if (_numDirtyRects > 0 || _mouseNeedsRedraw) { + SDL_Rect *r; + SDL_Rect dst; + uint32 srcPitch, dstPitch; + SDL_Rect *lastRect = _dirtyRectList + _numDirtyRects; + + for (r = _dirtyRectList; r != lastRect; ++r) { + dst = *r; + dst.x++; // Shift rect by one since 2xSai needs to access the data around + dst.y++; // any pixel to scale it, and we want to avoid mem access crashes. + + if (SDL_BlitSurface(origSurf, r, srcSurf, &dst) != 0) + error("SDL_BlitSurface failed: %s", SDL_GetError()); + } + + SDL_LockSurface(srcSurf); + SDL_LockSurface(_hwscreen); + + srcPitch = srcSurf->pitch; + dstPitch = _hwscreen->pitch; + + for (r = _dirtyRectList; r != lastRect; ++r) { + register int dst_y = r->y + _currentShakePos; + register int dst_h = 0; + register int dst_w = r->w; + register int orig_dst_y = 0; + register int dst_x = r->x; + register int src_y; + register int src_x; + + if (dst_y < height) { + dst_h = r->h; + if (dst_h > height - dst_y) + dst_h = height - dst_y; + + orig_dst_y = dst_y; + src_x = dst_x; + src_y = dst_y; + + if (_videoMode.aspectRatioCorrection && !_overlayVisible) + dst_y = real2Aspect(dst_y); + + assert(scalerProc != NULL); + + if(_videoMode.mode == GFX_HALF && scalerProc == HalfScale){ + if(dst_x%2==1){ + dst_x--; + dst_w++; + } + if(dst_y%2==1){ + dst_y--; + dst_h++; + } + src_x = dst_x; + src_y = dst_y; + dst_x = dst_x / 2; + dst_y = dst_y / 2; + } + scalerProc((byte *)srcSurf->pixels + (src_x * 2 + 2) + (src_y + 1) * srcPitch, srcPitch, + (byte *)_hwscreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h); + } + + if(_videoMode.mode == GFX_HALF && scalerProc == HalfScale){ + r->w = r->w / 2; + r->h = dst_h / 2; + } else { + r->w = r->w; + r->h = dst_h; + } + + r->x = dst_x; + r->y = dst_y; + + +#ifndef DISABLE_SCALERS + if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible) + r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1); +#endif + } + SDL_UnlockSurface(srcSurf); + SDL_UnlockSurface(_hwscreen); + + // Readjust the dirty rect list in case we are doing a full update. + // This is necessary if shaking is active. + if (_forceFull) { + _dirtyRectList[0].y = 0; + _dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? effectiveScreenHeight()/2 : effectiveScreenHeight(); + } + + drawMouse(); + +#ifdef USE_OSD + if (_osdAlpha != SDL_ALPHA_TRANSPARENT) { + SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0); + } +#endif + // Finally, blit all our changes to the screen + SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList); + } + + _numDirtyRects = 0; + _forceFull = false; + _mouseNeedsRedraw = false; +} + +void OSystem_GP2XWIZ::showOverlay() { + if(_videoMode.mode == GFX_HALF){ + _mouseCurState.x = _mouseCurState.x / 2; + _mouseCurState.y = _mouseCurState.y / 2; + } + OSystem_SDL::showOverlay(); +} + +void OSystem_GP2XWIZ::hideOverlay() { + if(_videoMode.mode == GFX_HALF){ + _mouseCurState.x = _mouseCurState.x * 2; + _mouseCurState.y = _mouseCurState.y * 2; + } + OSystem_SDL::hideOverlay(); +} + +void OSystem_GP2XWIZ::warpMouse(int x, int y) { + if (_mouseCurState.x != x || _mouseCurState.y != y) { + if(_videoMode.mode == GFX_HALF && !_overlayVisible){ + x = x / 2; + y = y / 2; + } + } + OSystem_SDL::warpMouse(x, y); +} diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp index 4d69915e27..4a86443aa7 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp @@ -48,7 +48,7 @@ enum { VOLUME_UP = 2, VOLUME_CHANGE_RATE = 8, VOLUME_MIN = 0, - VOLUME_INITIAL = 70, + VOLUME_INITIAL = 60, VOLUME_MAX = 100 }; diff --git a/backends/platform/gp2xwiz/gp2xwiz-main.cpp b/backends/platform/gp2xwiz/gp2xwiz-main.cpp index 4bd3f98211..394c3090c3 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-main.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-main.cpp @@ -148,9 +148,9 @@ void OSystem_GP2XWIZ::initBackend() { WIZ_HW::mixerMoveVolume(0); /* Up default volume values as we use a seperate system level volume anyway. */ - ConfMan.registerDefault("music_volume", 220); - ConfMan.registerDefault("sfx_volume", 220); - ConfMan.registerDefault("speech_volume", 220); + ConfMan.registerDefault("music_volume", 192); + ConfMan.registerDefault("sfx_volume", 192); + ConfMan.registerDefault("speech_volume", 192); /* Trigger autosave every 4 minutes - On low batts 5 mins is about your warning time. */ ConfMan.registerDefault("autosave_period", 4 * 60); diff --git a/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp b/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp new file mode 100644 index 0000000000..3a95280eab --- /dev/null +++ b/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp @@ -0,0 +1,40 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * 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 the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ +#include "graphics/scaler/intern.h" +#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h" + +SDL_PixelFormat *screenPixelFormat; + +extern "C" { + void PocketPCHalfARM(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int mask, int round); + // Rounding constants and masks used for different pixel formats + int roundingconstants[] = { 0x00200802, 0x00201002 }; + int redbluegreenMasks[] = { 0x03E07C1F, 0x07E0F81F }; +} + +void HalfScale(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { + int maskUsed = (gBitFormat == 565); + PocketPCHalfARM(srcPtr, srcPitch, dstPtr, dstPitch, width, height, redbluegreenMasks[maskUsed],roundingconstants[maskUsed]); +} diff --git a/backends/platform/gp2xwiz/gp2xwiz-scaler.h b/backends/platform/gp2xwiz/gp2xwiz-scaler.h new file mode 100644 index 0000000000..5867693dfb --- /dev/null +++ b/backends/platform/gp2xwiz/gp2xwiz-scaler.h @@ -0,0 +1,42 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * 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 the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GP2XWIZ_SCALER_H +#define GP2XWIZ_SCALER_H + +#include "common/scummsys.h" +#include "common/system.h" +#include "graphics/scaler.h" +#include "graphics/scaler/intern.h" + +// FIXME: For now keep hacks in this header to save polluting the SDL backend. +enum { + GFX_HALF = 12 +}; + +// TODO/FIXME: Move this platform specific scaler into /graphics/scaler and properly merge with the WinCE PocketPCHalf that it is based on. +DECLARE_SCALER(HalfScale); + +#endif diff --git a/backends/platform/gp2xwiz/gp2xwiz-sdl.h b/backends/platform/gp2xwiz/gp2xwiz-sdl.h index 8811f86edf..1f67624d5c 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-sdl.h +++ b/backends/platform/gp2xwiz/gp2xwiz-sdl.h @@ -27,6 +27,7 @@ #define GP2XWIZ_SDL_H #include "backends/platform/sdl/sdl.h" +#include "backends/platform/gp2xwiz/gp2xwiz-scaler.h" #include <SDL.h> @@ -42,12 +43,24 @@ public: OSystem_GP2XWIZ() {} /* Graphics */ - bool loadGFXMode(); + void initSize(uint w, uint h); + void setGraphicsModeIntern(); + bool setGraphicsMode(int mode); + void internUpdateScreen(); + const OSystem::GraphicsMode *getSupportedGraphicsModes() const; + bool setGraphicsMode(const char *name); + int getDefaultGraphicsMode() const; + bool loadGFXMode(); + void drawMouse(); + void undrawMouse(); + void showOverlay(); + void hideOverlay(); /* Event Stuff */ bool pollEvent(Common::Event &event); void moveStick(); void fillMouseEvent(Common::Event&, int, int); + void warpMouse(int, int); bool remapKey(SDL_Event&, Common::Event&); /* Platform Setup Stuff */ diff --git a/backends/platform/gp2xwiz/module.mk b/backends/platform/gp2xwiz/module.mk index 03241f7b60..f2e27a7cce 100644 --- a/backends/platform/gp2xwiz/module.mk +++ b/backends/platform/gp2xwiz/module.mk @@ -1,6 +1,8 @@ MODULE := backends/platform/gp2xwiz MODULE_OBJS := \ + gp2xwiz-scaler.o \ + ../wince/ARMscaler.o \ gp2xwiz-graphics.o \ gp2xwiz-events.o \ gp2xwiz-hw.o \ diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 6d9f3fc6eb..8768dd90d4 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -481,7 +481,7 @@ bool OSystem_SDL::loadGFXMode() { int hwW, hwH; -#ifndef __MAEMO__ +#if !defined(__MAEMO__) && !defined(GP2XWIZ) _videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor; _videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor; @@ -804,7 +804,7 @@ void OSystem_SDL::internUpdateScreen() { for (r = _dirtyRectList; r != lastRect; ++r) { dst = *r; - dst.x++; // Shift rect by one since 2xSai needs to acces the data around + dst.x++; // Shift rect by one since 2xSai needs to access the data around dst.y++; // any pixel to scale it, and we want to avoid mem access crashes. if (SDL_BlitSurface(origSurf, r, srcSurf, &dst) != 0) diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 105206ec07..5abeff3902 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -33,7 +33,7 @@ #include "common/archive.h" #include "common/config-manager.h" #include "common/debug.h" -#include "common/events.h" +#include "common/EventRecorder.h" #include "common/util.h" #ifdef UNIX @@ -261,7 +261,7 @@ OSystem_SDL::~OSystem_SDL() { uint32 OSystem_SDL::getMillis() { uint32 millis = SDL_GetTicks(); - getEventManager()->processMillis(millis); + g_eventRec.processMillis(millis); return millis; } diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index 1f6eeb3770..45dbad12cc 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -133,12 +133,14 @@ void CEActionsPocket::initInstanceGame() { bool is_tucker = (gameid == "tucker"); bool is_groovie = (gameid == "groovie"); bool is_tinsel = (gameid == "tinsel"); + bool is_cruise = (gameid == "cruise"); + bool is_made = (gameid == "made"); 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_tinsel || - is_samnmax || is_cine || is_touche || is_parallaction || is_drascula) + is_samnmax || is_cine || is_touche || is_parallaction || is_drascula || is_cruise) _right_click_needed = true; // See if a "hide toolbar" mapping could be needed @@ -158,10 +160,10 @@ void CEActionsPocket::initInstanceGame() { } else if (is_sky) { _action_enabled[POCKET_ACTION_SAVE] = true; _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); - } else if (is_cine || is_drascula) { + } else if (is_cine || is_drascula || is_cruise) { _action_enabled[POCKET_ACTION_SAVE] = true; _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); // F10 - } else if (is_agi) { + } else if (is_agi || is_made) { _action_enabled[POCKET_ACTION_SAVE] = true; _key_action[POCKET_ACTION_SAVE].setKey(Common::ASCII_ESCAPE, SDLK_ESCAPE); } else if (is_parallaction) { @@ -177,7 +179,7 @@ void CEActionsPocket::initInstanceGame() { // Quit _action_enabled[POCKET_ACTION_QUIT] = true; // Skip - if (!is_cine && !is_parallaction && !is_groovie) + if (!is_cine && !is_parallaction && !is_groovie && !is_cruise && !is_made) _action_enabled[POCKET_ACTION_SKIP] = true; if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_tinsel || is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula || is_tucker) @@ -214,6 +216,12 @@ void CEActionsPocket::initInstanceGame() { _key_action[POCKET_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V // Key bind method _action_enabled[POCKET_ACTION_BINDKEYS] = true; + // Disable double-tap right-click for convenience + if (is_tinsel || is_cruise) + if (!ConfMan.hasKey("no_doubletap_rightclick")) { + ConfMan.setBool("no_doubletap_rightclick", true); + ConfMan.flushToDisk(); + } } diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 99f73bf37d..47733ae317 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -123,12 +123,14 @@ void CEActionsSmartphone::initInstanceGame() { bool is_tucker = (gameid == "tucker"); bool is_groovie = (gameid == "groovie"); bool is_tinsel = (gameid == "tinsel"); + bool is_cruise = (gameid == "cruise"); + bool is_made = (gameid == "made"); 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_tinsel || - is_samnmax || is_cine || is_touche || is_parallaction || is_drascula) + is_samnmax || is_cine || is_touche || is_parallaction || is_drascula || is_cruise) _right_click_needed = true; // Initialize keys for different actions @@ -141,10 +143,10 @@ void CEActionsSmartphone::initInstanceGame() { } else if (is_sky) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); - } else if (is_cine || is_drascula) { + } else if (is_cine || is_drascula || is_cruise) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); //F10 - } else if (is_agi) { + } else if (is_agi || is_made) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_ESCAPE, SDLK_ESCAPE); } else if (is_parallaction) { @@ -160,7 +162,8 @@ void CEActionsSmartphone::initInstanceGame() { // Skip _action_enabled[SMARTPHONE_ACTION_SKIP] = true; if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_tinsel || - is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula || is_tucker || is_groovie) + is_saga || is_kyra || is_touche || is_lure || is_feeble || is_drascula || is_tucker || + is_groovie || is_cruise || is_made) _key_action[SMARTPHONE_ACTION_SKIP].setKey(VK_ESCAPE); else _key_action[SMARTPHONE_ACTION_SKIP].setKey(KEY_ALL_SKIP); @@ -178,6 +181,12 @@ void CEActionsSmartphone::initInstanceGame() { _key_action[SMARTPHONE_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V // Bind keys _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true; + // Disable double-tap right-click for convenience + if (is_tinsel || is_cruise) + if (!ConfMan.hasKey("no_doubletap_rightclick")) { + ConfMan.setBool("no_doubletap_rightclick", true); + ConfMan.flushToDisk(); + } } diff --git a/backends/platform/wince/CEScaler.cpp b/backends/platform/wince/CEScaler.cpp index bfdb74319d..d26db3190f 100644 --- a/backends/platform/wince/CEScaler.cpp +++ b/backends/platform/wince/CEScaler.cpp @@ -53,15 +53,6 @@ void PocketPCPortraitTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPt } MAKE_WRAPPER(PocketPCPortrait) -void PocketPCRawPortrait(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { - - while (height--) { - memcpy(dstPtr, srcPtr, width*sizeof(uint16_t)); - srcPtr += srcPitch; - dstPtr += dstPitch; - } -} - // Our version of an aspect scaler. Main difference is the out-of-place // operation, omitting a straight blit step the sdl backend does. Also, // tests show unaligned access errors with the stock aspect scaler. @@ -234,8 +225,8 @@ void SmartphoneLandscape(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, ui SmartphoneLandscapeARM(srcPtr, srcPitch, dstPtr, dstPitch, width, height, redbluegreenMasks[maskUsed]); #else if (gBitFormat == 565) - SmartphoneLandscape<565>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); + SmartphoneLandscapeTemplate<565>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); else - SmartphoneLandscape<555>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); + SmartphoneLandscapeTemplate<555>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); #endif } diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.cpp b/backends/platform/wince/CEgui/SDL_ImageResource.cpp index e1a9d911de..ce6ebd6382 100644 --- a/backends/platform/wince/CEgui/SDL_ImageResource.cpp +++ b/backends/platform/wince/CEgui/SDL_ImageResource.cpp @@ -60,7 +60,7 @@ namespace CEGUI { _surface = SDL_LoadBMP_RW(surfaceData, 1); return _surface; - }; + } SDL_Surface* SDL_ImageResource::get() { return _surface; diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile index 1846029469..acade8ac9a 100644 --- a/backends/platform/wince/Makefile +++ b/backends/platform/wince/Makefile @@ -39,12 +39,12 @@ ENABLE_PARALLACTION = STATIC_PLUGIN ENABLE_DRASCULA = STATIC_PLUGIN ENABLE_GROOVIE = STATIC_PLUGIN ENABLE_TUCKER = STATIC_PLUGIN +ENABLE_TINSEL = STATIC_PLUGIN +ENABLE_CRUISE = STATIC_PLUGIN +ENABLE_MADE = STATIC_PLUGIN #ENABLE_SCI = STATIC_PLUGIN -#ENABLE_TINSEL = STATIC_PLUGIN -#ENABLE_CRUISE = STATIC_PLUGIN #ENABLE_IGOR = STATIC_PLUGIN #ENABLE_M4 = STATIC_PLUGIN -#ENABLE_MADE = STATIC_PLUGIN ######################################################################## ## Pick which libraries you want to use here @@ -76,6 +76,7 @@ USE_ARM_SOUND_ASM = 1 USE_ARM_SMUSH_ASM = 1 USE_ARM_GFX_ASM = 1 USE_ARM_COSTUME_ASM = 1 +USE_ARM_SCALER_ASM = 1 ######################################################################## ## Hopefully you shouldn't need to change anything below here. ## @@ -167,6 +168,10 @@ ifdef USE_ARM_COSTUME_ASM DEFINES += -DUSE_ARM_COSTUME_ASM endif +ifdef USE_ARM_SCALER_ASM +DEFINES += -DUSE_ARM_SCALER_ASM +endif + ######################################################################## # Targets follow here diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt index 6a289766a2..5b3215e34e 100644 --- a/backends/platform/wince/README-WinCE.txt +++ b/backends/platform/wince/README-WinCE.txt @@ -6,26 +6,19 @@ Release version: 0.13.0 New in this version ------------------- -0.13.0: -Important: Two builds for ScummVM CE +1.0.0rc1: +This version features optimized ARM assembly versions for the Smartphone, +Normal2x and Normal2xAspect scalers, courtesy of Robin Watts. There should +be a speed improvement when using these scalers. -For this release, two binaries (executables) are provided. The first, -with file name scummvm1.exe, includes support for the following engines: - - scumm, sword1, sword2, queen, sky, lure, agi, touche -while the second, with file name scummvm2.exe: - - gob, cine, saga, kyra, agos, parallaction, drascula, groovie, tucker -The user must make sure to execute the correct file for a game. All -previously detected games will be shown in the launcher. Trying to launch -a gob engine game with scummvm1.exe will not work. -Detection also works as implied: scummvm1.exe will detect only the games -for which it has support; the same holds for scummvm2.exe. -This change has been done so users with less free memory can play more -memory hungry games. - -Also noted are problems with flac support. Your mileage may vary. Please -consider using ogg or mp3 for those games (smaller sizes are better for -handheld devices too!) +Also new is the aspect 2x upscaling mode, which is auto detected and used +when the scaler is set to (normal) 2x mode and the panel is hidden. Hence, +a 320x200 game running on a VGA or higher resolution device will be +aspect scaled to fill the 640x480 screen. +Be aware that Discworld 2 tries to allocate a big chunk of memory (10 MB) +and this will fail on many devices (file under the not enough memory +category). ------------------------------------------------------------------------ @@ -590,6 +583,20 @@ By default, the double tap to right click action is disabled in this game as this interferes with the game's controls. This setting can be overridden (see 'no_doubletap_rightclick' parameter above). +----------------- +-- Discworld 2 -- +----------------- + +Crashes at startup of this game are usually due to the high memory +requirements of this game. + +------------------------- +-- Cruise for a Corpse -- +------------------------- + +As with Discworld, the double-tap-to-right-click action interferes and will +be disabled by default. + ------------------------------------------------------------------------ Support @@ -637,6 +644,27 @@ http://www.scummvm.org/ Old news follow ... ------------------------------------------------------------------------ +0.13.0: +Important: Two builds for ScummVM CE + +For this release, two binaries (executables) are provided. The first, +with file name scummvm1.exe, includes support for the following engines: + - scumm, sword1, sword2, queen, sky, lure, agi, touche +while the second, with file name scummvm2.exe: + - gob, cine, saga, kyra, agos, parallaction, drascula, groovie, tucker +The user must make sure to execute the correct file for a game. All +previously detected games will be shown in the launcher. Trying to launch +a gob engine game with scummvm1.exe will not work. +Detection also works as implied: scummvm1.exe will detect only the games +for which it has support; the same holds for scummvm2.exe. +This change has been done so users with less free memory can play more +memory hungry games. + +Also noted are problems with flac support. Your mileage may vary. Please +consider using ogg or mp3 for those games (smaller sizes are better for +handheld devices too!) + + 0.12.0: - Improved SMUSH support (deprecated 'Smush_force_redraw' option) No skipped frames in Full Throttle action sequences. The 'Smush_force_redraw' diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp index f63ad72298..ac93e8f714 100644 --- a/backends/platform/wince/missing/missing.cpp +++ b/backends/platform/wince/missing/missing.cpp @@ -135,7 +135,7 @@ EXT_C char *getcwd(char *buffer, int maxlen) { #endif EXT_C void GetCurrentDirectory(int len, char *buf) { getcwd(buf,len); -}; +} /* Windows CE fopen has non-standard behavior -- not diff --git a/backends/platform/wince/module.mk b/backends/platform/wince/module.mk new file mode 100644 index 0000000000..5fefe08d79 --- /dev/null +++ b/backends/platform/wince/module.mk @@ -0,0 +1,21 @@ +MODULE := backends/platform/wince + +MODULE_OBJS := \ + CEActionsPocket.o CEDevice.o CEScaler.o \ + CEActionsSmartphone.o CELauncherDialog.o wince-sdl.o \ + CEgui/GUIElement.o CEgui/Panel.o CEgui/SDL_ImageResource.o \ + CEgui/ItemAction.o CEgui/PanelItem.o CEgui/Toolbar.o \ + CEgui/ItemSwitch.o CEgui/PanelKeyboard.o CEgui/ToolbarHandler.o \ + CEkeys/EventsBuffer.o \ + ../../../gui/Actions.o ../../../gui/Key.o ../../../gui/KeysDialog.o \ + ../sdl/sdl.o ../sdl/graphics.o ../sdl/events.o ../sdl/hardwarekeys.o \ + missing/missing.o \ + PocketSCUMM.o \ + ARMscaler.o \ + smartLandScale.o + +MODULE_DIRS += \ + backends/platform/wince/ + +# We don't use the rules.mk here on purpose +OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS) diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 8b2e0848f8..5d75b76805 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -403,9 +403,8 @@ static Uint32 timer_handler_wrapper(Uint32 interval) { void OSystem_WINCE3::initBackend() { // Instantiate our own sound mixer - // mixer init is postponed until a game engine is selected. - if (_mixer == 0) - _mixer = new Audio::MixerImpl(this); + // mixer init is rerun when a game engine is selected. + setupMixer(); // Create the timer. CE SDL does not support multiple timers (SDL_AddTimer). // We work around this by using the SetTimer function, since we only use @@ -792,11 +791,15 @@ void OSystem_WINCE3::setupMixer() { SDL_AudioSpec desired; int thread_priority; + compute_sample_rate(); if (_sampleRate == 0) warning("setSoundCallback called with 0 _sampleRate. Audio will not work."); + else if (_mixer && _mixer->getOutputRate() == _sampleRate) { + debug(1, "Skipping sound mixer re-init: samplerate is good"); + return; + } memset(&desired, 0, sizeof(desired)); - desired.freq = _sampleRate; desired.format = AUDIO_S16SYS; desired.channels = 2; @@ -913,7 +916,6 @@ void OSystem_WINCE3::engineInit() { //update_game_settings(); // finalize mixer init - compute_sample_rate(); setupMixer(); } @@ -1080,13 +1082,6 @@ void OSystem_WINCE3::update_game_settings() { if (ConfMan.hasKey("no_doubletap_rightclick")) _noDoubleTapRMB = ConfMan.getBool("no_doubletap_rightclick"); - else if (gameid == "tinsel") { - _noDoubleTapRMB = true; - ConfMan.setBool("no_doubletap_rightclick", true); - ConfMan.flushToDisk(); - } - - compute_sample_rate(); } void OSystem_WINCE3::initSize(uint w, uint h) { @@ -1147,13 +1142,13 @@ void OSystem_WINCE3::setGraphicsModeIntern() { } bool OSystem_WINCE3::update_scalers() { - if (_videoMode.mode != GFX_NORMAL) - return false; - _videoMode.aspectRatioCorrection = false; if (CEDevice::hasPocketPCResolution()) { - if ( (!_orientationLandscape && (_videoMode.screenWidth == 320 || !_videoMode.screenWidth)) + if (_videoMode.mode != GFX_NORMAL) + return false; + + if ((!_orientationLandscape && (_videoMode.screenWidth == 320 || !_videoMode.screenWidth)) || CEDevice::hasSquareQVGAResolution() ) { if (getScreenWidth() != 320) { _scaleFactorXm = 3; @@ -1204,9 +1199,32 @@ bool OSystem_WINCE3::update_scalers() { } return true; - } + } else if (CEDevice::hasWideResolution()) { +#ifdef USE_ARM_SCALER_ASM + if ( _videoMode.mode == GFX_DOUBLESIZE && (_videoMode.screenWidth == 320 || !_videoMode.screenWidth) ) { + if ( !_panelVisible && !_overlayVisible && _canBeAspectScaled ) { + _scaleFactorXm = 2; + _scaleFactorXd = 1; + _scaleFactorYm = 12; + _scaleFactorYd = 5; + _scalerProc = Normal2xAspect; + _modeFlags = 0; + _videoMode.aspectRatioCorrection = true; + } else if ( (_panelVisible || _overlayVisible) && _canBeAspectScaled ) { + _scaleFactorXm = 2; + _scaleFactorXd = 1; + _scaleFactorYm = 2; + _scaleFactorYd = 1; + _scalerProc = Normal2x; + _modeFlags = 0; + } + return true; + } +#endif + } else if (CEDevice::hasSmartphoneResolution()) { + if (_videoMode.mode != GFX_NORMAL) + return false; - if (CEDevice::hasSmartphoneResolution()) { if (_videoMode.screenWidth > 320) error("Game resolution not supported on Smartphone"); #ifdef ARM @@ -1373,8 +1391,8 @@ bool OSystem_WINCE3::loadGFXMode() { displayWidth = _videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd; displayHeight = _videoMode.screenHeight * _scaleFactorYm / _scaleFactorYd; } else { - displayWidth = _videoMode.screenWidth; - displayHeight = _videoMode.screenHeight; + displayWidth = _videoMode.screenWidth * _videoMode.scaleFactor; + displayHeight = _videoMode.screenHeight* _videoMode.scaleFactor; } switch (_orientationLandscape) { diff --git a/backends/platform/wince/wince.mk b/backends/platform/wince/wince.mk new file mode 100644 index 0000000000..5551b27289 --- /dev/null +++ b/backends/platform/wince/wince.mk @@ -0,0 +1,5 @@ +all: PocketSCUMM.o + +PocketSCUMM.o: $(srcdir)/backends/platform/wince/PocketSCUMM.rc + mkdir -p backends/platform/wince + $(WINDRES) -I$(srcdir)/backends/platform/wince $(srcdir)/backends/platform/wince/PocketSCUMM.rc backends/platform/wince/PocketSCUMM.o |