Commit Graph

2220 Commits

Author SHA1 Message Date
Max Horn
059944e59c COMMON: Push #include audiocd.h in system.h out to .cpp files
svn-id: r54148
2010-11-08 23:07:42 +00:00
Max Horn
82e473bc3b BACKENDS: Partial merge of gsoc2010-opengl: Audio CD changes only
This commit contains the AudioCDManager changes from the gsoc2010-opengl
branch. The other changes in that branch are restricted to the backends
directory only (plus configure).

The Nintendo DS and Dreamcast ports still need to be ported over to
the new Audio CD system, but that should be fairly easy to do.

svn-id: r54147
2010-11-08 22:53:36 +00:00
Max Horn
4d3a07b494 COMMON: Rename and tweak MD5 functions
* names now comply to our naming conventions
* the function computeStreamMD5AsString which computes the MD5
  as a hex string now returns it as a Common::String
* add doxygen comments

svn-id: r54121
2010-11-07 17:16:59 +00:00
Florian Kagerer
206971d16b SCUMM/FM-TOWNS JAPANESE: fix out of bounds text drawing
(could cause invalid memory access in MI1)

svn-id: r54079
2010-11-05 00:36:23 +00:00
Max Horn
a7248a0601 ENGINES: Replace many printfs by warning/debug/debugN
svn-id: r54031
2010-11-01 21:37:47 +00:00
Max Horn
e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Max Horn
a1dd7a07a1 ENGINES: Remove some 'using' statements
svn-id: r54001
2010-11-01 16:00:17 +00:00
Johannes Schickel
447ca7ea69 SCUMM: Switch to the new SaveStateDescriptor::setPlayTime.
svn-id: r53923
2010-10-29 16:41:49 +00:00
Johannes Schickel
dac9493069 ENGINE: Rename resetTotalPlayTime to setTotalPlayTime.
I also extended the comment for it to show two possible use cases.

svn-id: r53895
2010-10-27 22:52:02 +00:00
Johannes Schickel
2ad28b8cd5 ENGINE: Generalize SCUMM play time counting and move it into Engine.
This implements Max's idea on -devel
("Re: [Scummvm-devel] ATTN Engine authors: Advanced engine features") from
27.10.2010 on 11:12PM CEST.

Unlike the SCUMM implementation it stores the play time as ms instead of s.

The SCUMM engine was adapted to use this instead to reduce code duplication.

svn-id: r53892
2010-10-27 22:37:51 +00:00
Travis Howell
2f254a3531 SCUMM: Add alternative version of patch #3094717 - MMC64: save actor state.
svn-id: r53842
2010-10-26 04:20:20 +00:00
Max Horn
075919756f SCUMM: Move shared code of Player_V2 & Player_V2CMS to new common base class
svn-id: r53830
2010-10-25 16:42:24 +00:00
Max Horn
d2a7a840c7 SCUMM: Move class Player_V2CMS to its own header file
svn-id: r53829
2010-10-25 16:41:39 +00:00
Travis Howell
57b571ecd0 SCUMM: Add patch #3094711 - MMC64: Correct position of plant actor.
svn-id: r53814
2010-10-25 10:35:52 +00:00
Travis Howell
f158688c33 SCUMM: Add patch #3089936 - MMC64: Parcel/Tombstone/Verb Fix.
svn-id: r53807
2010-10-25 08:26:21 +00:00
Travis Howell
4f0cc6a435 SCUMM: Add patch #3093541 - MMC64: Actor Walk / Object Fix.
svn-id: r53806
2010-10-25 08:03:55 +00:00
Travis Howell
f228c76b35 SCUMM: Add patch #3093061 - MMC64: sentence highlighting.
svn-id: r53805
2010-10-25 07:53:02 +00:00
Travis Howell
5942382ad4 SCUMM: Add patch #3093051 - MMC64: Ladder facing patch.
svn-id: r53799
2010-10-25 07:07:23 +00:00
Travis Howell
8e10c5bc3b SCUMM: Add patch #3093048 - MMC64: German actor names.
svn-id: r53796
2010-10-25 05:26:16 +00:00
Travis Howell
b2e8daa2d7 SCUMM: Add patch #3093057 - MMC64: sentence/inventory color.
svn-id: r53785
2010-10-25 03:21:49 +00:00
Max Horn
b446a7dcc2 ALL: code formatting fixes
svn-id: r53764
2010-10-24 13:09:56 +00:00
Max Horn
5fbca853aa SCUMM: Turn global g_cmsEmu into a member var of Player_V2CMS
svn-id: r53763
2010-10-24 13:05:03 +00:00
Max Horn
c975ed11a1 ALL: Fix various typos (patch #3093266)
svn-id: r53762
2010-10-24 13:04:33 +00:00
Max Horn
0d54400806 SCUMM: Skip endian conversion on little endian systems (instead of assigning values back to themselves)
svn-id: r53739
2010-10-23 15:47:23 +00:00
Max Horn
3534cff8ef ALL: Fix indention (whitespaces -> tabs)
svn-id: r53738
2010-10-23 15:46:50 +00:00
Travis Howell
3f4655c03f SCUMM: Disable multiplayer option in Backyard Baseball 2001.
svn-id: r53731
2010-10-23 13:39:04 +00:00
Travis Howell
402fac9ed4 SCUMM: Add workaround to allow saved games to be shared between Macintosh and Windows versions of Backyard Baseball 2001.
svn-id: r53729
2010-10-23 06:27:16 +00:00
Travis Howell
afd677c2c7 SCUMM: Fix buffer overflow, that was causing crashes when saving in Backyard Baseball 2001/2003.
svn-id: r53726
2010-10-23 02:18:08 +00:00
Florian Kagerer
a82b0435a2 SCUMM/FM-TOWNS JAPANESE: fix font drawing in MI1 intro
svn-id: r53725
2010-10-23 00:30:21 +00:00
Florian Kagerer
031e0167e4 SCUMM/FM-TOWNS JAPANESE: fix another font spacing issue
(fixes MI1 character talk text)

svn-id: r53704
2010-10-22 19:28:12 +00:00
Max Horn
89fc06d878 SCUMM: Remove redundant call to checkArrayLimits
svn-id: r53672
2010-10-21 09:32:00 +00:00
Max Horn
66fabfa049 SCUMM: Document ScummEngine_v90he::sortArray
svn-id: r53671
2010-10-21 09:31:42 +00:00
Travis Howell
cca5504b6c SCUMM: Fix bug #2984000 - SPYFOX3 (French): Crash when using fingernail machine.
svn-id: r53669
2010-10-21 08:51:10 +00:00
Travis Howell
e5c3b67ddb SCUMM: Correct a copy and paste error in compareByteArray/compareByteArrayReverse code.
Thanks to clone2727 for noticng this error.

svn-id: r53663
2010-10-21 05:17:16 +00:00
Travis Howell
01ea6f86bd SCUMM: Revert revision 45302, which caused regressions when random team is selected in Backyard Football.
svn-id: r53662
2010-10-21 05:13:32 +00:00
Florian Kagerer
64c0d2a1d1 SCUMM/FM-TOWNS: minor graphics fix
This fixes a graphics glitch that occured when leaving the Scumm Bar in MI1 for the first time (before the cut scene with LeChuck).

svn-id: r53645
2010-10-20 15:39:08 +00:00
Matthew Hoops
21a29d3b45 SCUMM: Have o6_getRandomNumber() use the absolute value of the argument
The Backyard Baseball series calls the function with negative numbers, but expects a positive result. The games are now actually playable.

Thanks to Kirben for assistance in tracking this bug down.

svn-id: r53630
2010-10-20 03:01:03 +00:00
Florian Kagerer
f6a43d980a SCUMM/FM-TOWNS JAPANESE: minor fix in last commit
svn-id: r53617
2010-10-19 17:03:36 +00:00
Florian Kagerer
1d87f434a2 SCUMM/FM-TOWNS JAPANESE: implement flipped text
(used in the MI1 circus scene after Guybrush gets shot out of the cannon)

svn-id: r53616
2010-10-19 16:58:27 +00:00
Florian Kagerer
f05110f3f6 SCUMM/FM-TOWNS JAPANESE: fix font spacing issues
(improves MI1 intro)

svn-id: r53597
2010-10-18 23:54:35 +00:00
Max Horn
ceae152531 SCUMM: Silence MSVC 2010 code analysis warning
svn-id: r53582
2010-10-18 19:29:56 +00:00
Eugene Sandulenko
dd7a2f75c0 SCUMM: INSANE: fix a long standing bug discovered by static code analysis
svn-id: r53581
2010-10-18 19:19:28 +00:00
Max Horn
277113f600 SCUMM: Fix out of bound access (discovered by Code Analysis in MS VS2010; thanks to aquadran for helping verify the fix)
svn-id: r53575
2010-10-18 19:03:24 +00:00
Max Horn
cda2c950d6 SCUMM: Simplify SO_LOAD_STRING code
svn-id: r53574
2010-10-18 18:56:40 +00:00
Max Horn
32f1a9ad8b SCUMM: Add paranoia check
svn-id: r53573
2010-10-18 18:56:20 +00:00
Max Horn
6175c2bb19 SCUMM: Fix potential bug in ScummEngine::resStrLen.
In particular, it might happen that ScummEngine::resStrLen is called
while the _scriptPointer is stale. In that case, it would be working
with the stale pointer. If the code calling it then uses fetchScript*()
methods to read the string whose length was just computed, then it would
read potentially *different* data (e.g. copyScriptString or
loadPtrToResource could have been affected).

I am not sure if this actually could have caused bugs somewhere; it might
even be provable that a script relocation cannot happen in all places
that invoke resStrLen. But for now it's much easier to make the code
safe than to verify that theory ;).

Also simplified some related code.

svn-id: r53572
2010-10-18 18:55:24 +00:00
Max Horn
d69a63c145 SCUMM: Move common code from ScummEngine::fetchScript* to new method.
The new method is called refreshScriptPointer(). Also renamed
getScriptEntryPoint() to resetScriptPointer() in an attempt to highlight
both the similarity and difference between the two.

svn-id: r53571
2010-10-18 18:43:13 +00:00
Max Horn
3b21db1618 SCUMM: Fix parts of bug #3087898 (SCUMM: Code analysis warnings)
svn-id: r53567
2010-10-18 16:00:07 +00:00
Travis Howell
ada933c2ad SCUMM: Check the sound channel is valid, before checking the sound channel.
svn-id: r53562
2010-10-18 04:25:53 +00:00
Travis Howell
34ff826918 SCUMM: Check the sound channel is valid, before checking the sound channel.
svn-id: r53561
2010-10-18 04:23:30 +00:00
Travis Howell
f40e427ab0 SCUMM: Correct incorrect demo entry for Backyard Football 2002.
svn-id: r53560
2010-10-18 00:43:49 +00:00
Florian Kagerer
1d60fc45f2 SCUMM/FM-TOWNS: more improvements to japanese font drawing
(MI1 intro is still not right)

svn-id: r53558
2010-10-17 23:52:33 +00:00
Travis Howell
3dc498c5ec SCUMM: Fix Macintosh demo of Putt-Putt Joins the Parade.
svn-id: r53557
2010-10-17 23:45:57 +00:00
Florian Kagerer
c841c3fb7c SCUMM/FM-TOWNS: more improvements to japanese font drawing
- made use of LordHotos graphics/sjis code to reduce code duplication
- japanese mode for version 3 and 5 works fine now with few exceptions (some line spacing glitches in MI1 intro etc.)

svn-id: r53554
2010-10-17 13:08:00 +00:00
Travis Howell
728a231d7b SCUMM: Fix bug #2952298 - HE (16Bit): Inventory items (Cursors) have wrong color.
svn-id: r53552
2010-10-17 12:44:56 +00:00
Florian Kagerer
63c30e959f SCUMM/FM-TOWNS: fix regression in non Japanese SCUMM 3 games
svn-id: r53523
2010-10-15 23:28:09 +00:00
Florian Kagerer
af52d3a7f6 SCUMM/FM-TOWNS: fix display of dialogue options in Indy 4 Japanese
svn-id: r53519
2010-10-15 21:48:46 +00:00
Florian Kagerer
87b5598720 SCUMM/FM-TOWNS: fix up/down inventory arrows in Indy 4 Japanese
svn-id: r53518
2010-10-15 21:26:05 +00:00
Florian Kagerer
b184d7bbdb SCUMM/FM-TOWNS: improve japanese font drawing in SCUMM 3 games
svn-id: r53510
2010-10-15 19:10:18 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Travis Howell
42f2a13155 Reverted revision 53456, as requested.
svn-id: r53483
2010-10-15 12:41:11 +00:00
Eugene Sandulenko
ea5bf685fc SCUMM: Fix bug #2952298 with 16-bit HE cursors on Amiga
Bug #2952298: "HE (16Bit): Inventory items (Cursors) have wrong color"
This appeared to be generic BE bug. Thanks to jvprat for nailing it down
and providing the patch.

svn-id: r53456
2010-10-14 18:19:51 +00:00
Johannes Schickel
75e8452b6e OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.

Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.

svn-id: r53399
2010-10-13 03:57:44 +00:00
Florian Kagerer
2f86c7a45c SCUMM/FM-TOWNS: start fixing japanese font drawing
svn-id: r53196
2010-10-12 22:17:00 +00:00
Florian Kagerer
2c691e1168 LOOM PC-Engine: fix mouse cursor
svn-id: r53117
2010-10-10 14:22:10 +00:00
Florian Kagerer
8e6ce812d1 LOOM PC-Engine: fix regression
svn-id: r53113
2010-10-10 10:26:49 +00:00
Florian Kagerer
89fd5b31c1 SCUMM/FM-TOWNS: minor fix for sfx code
svn-id: r53103
2010-10-09 16:39:56 +00:00
Florian Kagerer
88416b870d SCUMM/FM-TOWNS: cleanup sfx code
svn-id: r53095
2010-10-09 01:36:38 +00:00
Florian Kagerer
b58bbd719c SCUMM/FM-TOWNS: fixed threading issue in sfx code
svn-id: r53074
2010-10-08 16:31:08 +00:00
Florian Kagerer
4ad65e5179 SCUMM/FM-TOWNS: fixed possible invalid mem access in sfx code
svn-id: r53073
2010-10-08 13:50:11 +00:00
Florian Kagerer
a214e08c0d SCUMM/FM-TOWNS: minor change in sfx code
svn-id: r53061
2010-10-07 22:20:22 +00:00
Filippos Karapetis
7f6fa7e030 SCUMM: Silenced signed/unsigned warnings, removed unused variable
svn-id: r53055
2010-10-07 20:18:33 +00:00
Florian Kagerer
cf9c948433 SCUMM/FM-TOWNS: cleanup
svn-id: r53053
2010-10-07 19:27:11 +00:00
Florian Kagerer
01c9b17068 SCUMM/FM-TOWNS: improved sfx support for indy4 and monkey2
svn-id: r53052
2010-10-07 19:23:49 +00:00
Florian Kagerer
5af782c5d2 SCUMM/FM-TOWNS: disable new graphics code in DS port
svn-id: r53033
2010-10-05 19:04:52 +00:00
Florian Kagerer
3185b9df42 SCUMM/FM-TOWNS: cleanup
svn-id: r53016
2010-10-04 17:03:38 +00:00
Florian Kagerer
0596971dec SCUMM/FM-TOWNS: cleanup
svn-id: r53000
2010-10-03 20:44:58 +00:00
Florian Kagerer
5d7ce32fbd SCUMM/FM-TOWNS: fix mouse cursor colors
svn-id: r52999
2010-10-03 20:29:22 +00:00
Florian Kagerer
c9713bef7c SCUMM/FM-TOWNS: improve merging of graphics layers
svn-id: r52995
2010-10-03 17:25:38 +00:00
Florian Kagerer
6ca15d0888 SCUMM/FM-TOWNS: fix drawBox()
svn-id: r52991
2010-10-03 14:32:09 +00:00
Florian Kagerer
77fe52bbd7 INDY3/FM-TOWNS: fix intro graphics bug
svn-id: r52987
2010-10-02 23:18:15 +00:00
Florian Kagerer
5d1ab85874 SCUMM: update scumm-md5.txt
svn-id: r52981
2010-10-02 15:01:51 +00:00
Florian Kagerer
74681b81b3 SCUMM/FM-Towns: limit SCUMM 5 games to 16 bit graphics mode
8 bit mode makes no sense for these games since colors will be too messed up.
SCUMM 3 games (Indy 3, Loom, Zak) are still supported in 8bit mode.

svn-id: r52977
2010-10-02 13:25:50 +00:00
Florian Kagerer
0d8f4a22ae SCUMM/FM-TOWNS: fix palette and other graphics issues
This commit should fix at least the following bugs/feature requests: #1032859, #1252088, #1055391, #1315968, #1315938, #1742106, #812891.
The FM-Towns version of Scumm games use a mixed graphics mode with 2 layers (one with 32767 colors and one with 16 colors). Among other things I have added a screen output class which emulates this  dual layer approach which allows specific hardware effects like enabling and disabling layers (e.g. in the voodoo priestess scene in MI1).

Old savegames (saved before this update) will load, but you’ll encounter palette glitches in the verb/inventory screen, since the 16 color palette for layer 2 is not contained in your savegame. This will be true at least for version 5 games. Certain scene change actions (which require the verb/inventory part to be redrawn) might correct this (e.g. try looking at the treasure map in MI1 and closing it). Version 3 games should be okay, since they use a static text palette which is never changed and which will be reset after loading a savegame.

This update requires a USE_RGB_COLORS setting for proper operation. 8 bit users will get a warning that they’ll have to expect palette glitches . Apart from that the engine in 8 bit mode should not only still work okay, but also benefit from some of the other (non palette related) improvements (e.g. bug #1032859 should be fixed even in 8 bit mode).

Japanese font drawing hasn’t been improved much yet. This will be a separate task.

svn-id: r52966
2010-10-01 19:24:52 +00:00
Eugene Sandulenko
f965616552 SCUMM: Fix bug #3052804 by reverting NES-specific screen width hack
svn-id: r52891
2010-09-25 20:50:13 +00:00
Travis Howell
6537cb6463 SCUMM: Remove unused code, which was replaced by ScummEngine_v0::runObject in revision 42737.
svn-id: r52798
2010-09-18 14:31:21 +00:00
Travis Howell
ae3b6f0aa3 SCUMM: Fix bug #3070077 - MMC64: No music when Syd plays the piano.
svn-id: r52796
2010-09-18 14:18:48 +00:00
Florian Kagerer
a48e19eaef SCUMM: minor cleanup
svn-id: r52792
2010-09-18 11:26:10 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Johannes Schickel
cc764cb8ec SOUND: Move CMS emulator to sound/softsynth.
svn-id: r52778
2010-09-17 20:02:03 +00:00
Thierry Crozat
057056b8d3 I18N: Add translation for load/save success or failure messages
Also improve and update the french translation.

svn-id: r52740
2010-09-15 23:25:46 +00:00
Johannes Schickel
70245181f1 SCUMM: Fix for bug #3064655 "Restart with F8 key not working properly".
svn-id: r52715
2010-09-13 23:35:55 +00:00
Eugene Sandulenko
3972091734 SCUMM: Patch #3059327
Patch #3059327: "Remove untrue "not yet implemented" from inventory controls"

svn-id: r52530
2010-09-04 18:03:35 +00:00
Eugene Sandulenko
3e4f6b4a24 SCUMM: Fix bug #3039004
Bug #3039004: "MANIACNES: Ed does not appear at doorway."
Actually whole thing is a gross hack on top of SCUMM v1.5 hack
with extra wide screen. It all calls for review and writing
specified methods.

svn-id: r52375
2010-08-25 07:41:54 +00:00
Eugene Sandulenko
c4299cc0c7 SCUMM: Fix bug #3032758: "SCUMM: Mute setting does not work"
svn-id: r52372
2010-08-25 07:40:52 +00:00
Eugene Sandulenko
503cfd304b SCUMM: Fix bug #3049323
Bug #3049323: "SCUMM: Detects games in wrong places".
I must admit: A seriously stupid bug.

svn-id: r52370
2010-08-25 07:40:13 +00:00
Eugene Sandulenko
540cff87dc SCUMM: Implement keyboard-driven inventory scrolling in v2
Bug #2828383: "ZAK V2: no inventory keyboard shortcuts".

svn-id: r52366
2010-08-25 07:27:17 +00:00
Travis Howell
4c215fc9a0 SCUMM: Fix bug #2702847 - PUTTZOO: Graphic glitches on dancing penguin.
svn-id: r52363
2010-08-25 06:02:18 +00:00
Eugene Sandulenko
066174ad75 SCUMM: Change palette for C64 games.
Based on bugreport #2847001: "SCUMM v0: Wrong palette colors". Old
palette is #ifdef'ed for reference.

svn-id: r52330
2010-08-24 12:24:23 +00:00
Max Horn
7a125f85fe SCUMM: cleanup
svn-id: r52295
2010-08-23 10:00:19 +00:00