Commit Graph

41779 Commits

Author SHA1 Message Date
Max Horn
44393b2dc8 ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.

If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.

Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.

svn-id: r53961
2010-10-30 21:27:42 +00:00
Max Horn
ff34a77831 GUI: Don't #include Mac OS X sys header here
svn-id: r53960
2010-10-30 21:26:32 +00:00
Max Horn
334173d333 M4: Remove unused getter method MadsM4Engine::system()
svn-id: r53959
2010-10-30 21:26:13 +00:00
Max Horn
c07e58ba06 M4: Disable code using FILE, fopen, etc. and add explantory FIXME
svn-id: r53958
2010-10-30 21:25:52 +00:00
Max Horn
9995c7bd98 HUGO: Comment out all occurrences of FILE *fpb
These are not portable, and (at least in the current code)
do nothing useful either: a file is opened, and closed again,
in write mode. At most this may create / delete the file.
But since the method containing this code is never called...

svn-id: r53957
2010-10-30 21:25:30 +00:00
Arnaud Boutonné
6c702094a8 HUGO: Free some more memory before exiting
- suppress two useless variables
- initialize some variables

svn-id: r53956
2010-10-30 20:48:54 +00:00
Andrew Kurushin
f1ed9c9a6f SCI: add Russian SQ4 & SQ5
svn-id: r53955
2010-10-30 19:51:17 +00:00
Florian Kagerer
a04b4e6517 LOL: workaround for bug #3098935
(Vaelan's Cube can be duplicated at Scotia's Barrier)
This is a bug in the game data of early unpatched floppy versions.
This can also be fixed by applying the official patch (ftp://ftp.westwood.com/pub/lands1/updates/lolus123.exe).

svn-id: r53954
2010-10-30 18:37:15 +00:00
Sven Hesse
14d8d589e2 GOB: Make Map::getItem()/setItem() nonvirtual
svn-id: r53953
2010-10-30 17:28:54 +00:00
Sven Hesse
0f3ed50cfc GOB: Make some more map properties protected
svn-id: r53952
2010-10-30 17:28:27 +00:00
Sven Hesse
8a7d0cc249 GOB: Remove the "ugly" reading of Map::_itemPoses
Removing the need to pack that struct

svn-id: r53951
2010-10-30 17:27:53 +00:00
Sven Hesse
0f536e28f9 GOB: Rename Map::_widthByte to _mapVersion
svn-id: r53950
2010-10-30 17:27:23 +00:00
Sven Hesse
bfa88a05a1 GOB: Make Map::_wayPoints protected
Only allow const access through Map::getWayPoint()

svn-id: r53949
2010-10-30 17:26:49 +00:00
Sven Hesse
4c23f3e163 GOB: Make Map::_passMap protected and group some vars
svn-id: r53948
2010-10-30 17:26:06 +00:00
Sven Hesse
1612a96285 GOB: Unify Map_v1::/Map_v2::getPass()/setPass()
svn-id: r53947
2010-10-30 17:25:29 +00:00
Sven Hesse
31dd8026dc GOB: Minor map cleanup
- Move enum Direction out of class Map
- Convert kLeft et al into a proper enum RelativeDirection

svn-id: r53946
2010-10-30 17:24:52 +00:00
Arnaud Boutonné
724a702fdf HUGO: Free memory on exit
svn-id: r53945
2010-10-30 16:04:43 +00:00
Filippos Karapetis
bf44b0e545 SCI: Fixed script bug #3098353 - "ECOQUEST1 German: Crash at the blackboard in the dolphin room"
svn-id: r53941
2010-10-30 11:21:28 +00:00
Filippos Karapetis
ef7cc2d506 SCI: Fixed detection of fan made script patches for LSL1
svn-id: r53940
2010-10-30 11:07:44 +00:00
Torbjörn Andersson
71e08336c0 SWORD25: Play the cutscene audio
Once the audio buffer has been queued in the audio stream, the Theora
decoder is no longer responsible for it. It has to allocate a new
audio buffer for the next set of audio data.

Of course, at the moment the audio is pretty useless because the
playback speed is all wrong.

svn-id: r53939
2010-10-30 09:17:21 +00:00
Torbjörn Andersson
09c678e363 SWORD25: Fix hanging cutscene video
Even though our video player does not (yet) support audio, we need to
adjust the values of _audiobufFill and _audiobufReady as if it did, or
it will never realize it has reached the end of the cutscene.

Also fixes what looks like a typo in audio data clipping.

svn-id: r53938
2010-10-30 08:21:10 +00:00
Paul Gilbert
919d79f091 SWORD25: Added a hack to allow the new English voice pack to be detected
svn-id: r53937
2010-10-30 04:30:42 +00:00
Max Horn
a487da3c19 TINSEL: Remove redundant if()
svn-id: r53936
2010-10-30 00:34:41 +00:00
Max Horn
36d17c74d1 TINSEL: Remove unnecessary CORO_PARAM from ObjectTextOut
As a nice side effect, this gets rid of 25 out of 64 occurrences
of nullContext in the TINSEL code.

svn-id: r53935
2010-10-30 00:34:21 +00:00
Max Horn
ac94cf2742 TINSEL: Fix subtle leak in coroutine code, some minor tweaks
* Fix a bug which caused coroutines invoked with nullContext to
  leak their state.
  Sadly, nullContext is underdocumented, yet very delicate and
  full of subtleties... ./
* Move nullContext decl from sched.cpp to coroutine.cpp
* Enhance a few doxygen comments

svn-id: r53934
2010-10-30 00:33:54 +00:00
Max Horn
afb5986c9e TINSEL: Dispose state of active coroutines in Scheduler destructor
This fixes some leaks that occurred when exiting the game resp.
returning to launcher. Note that we still leak some coroutines when
exiting after loading a savegame.

svn-id: r53933
2010-10-30 00:33:31 +00:00
Max Horn
55a8bd9e35 TINSEL: Add COROUTINE_DEBUG macro to ease debugging coroutine code
svn-id: r53932
2010-10-30 00:33:11 +00:00
Max Horn
c0063a6d50 COMMON: Add SCUMMVM_CURRENT_FUNCTION macro (useful for debugging)
svn-id: r53931
2010-10-30 00:32:45 +00:00
Sylvain Dupont
ecd3e29fe0 TOON: Stops all Sfx/voice when exiting a room
Caused crashs when exiting when a sfx or voice was still playing
Bug found by Thomas

svn-id: r53928
2010-10-29 22:00:31 +00:00
Florian Kagerer
c9442e26ad KYRA: match music settings with latest launcher code changes.
(Last commit got trunkated somehow)

svn-id: r53927
2010-10-29 19:00:37 +00:00
Florian Kagerer
67566890bd KYRA: match music settings with latest launcher code changes.
(Users will get AdLib music at default unless they have specified a MIDI device in the launcher (MT-32 for KYRA, GM for HOF and LOL.)

svn-id: r53926
2010-10-29 18:57:19 +00:00
Johannes Schickel
1ed0051fce DRACI: Switch to the new play time counting of the Engine class.
svn-id: r53925
2010-10-29 16:54:10 +00:00
Johannes Schickel
a5c28de26b SWORD1: Switch to the new play time counting of the Engine class.
svn-id: r53924
2010-10-29 16:53:46 +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
1b2952e3ff ENGINE: Add a setPlayTime to SaveStateDescriptor taking an ms value.
svn-id: r53922
2010-10-29 16:41:30 +00:00
Johannes Schickel
6aec3882a4 SCI: Remove unused variable + some formatting fixes.
svn-id: r53921
2010-10-29 16:28:22 +00:00
Filippos Karapetis
5cfb461b5b SCI: Added detection of some fan made script patches.
When such a script patch is found, a dialog pops up at the beginning
of the game, asking the user to remove it. The issues that these
script patches fix have already been fixed in ScummVM, thus these
patches aren't necessary, plus they can lead to crashes, freezes, buggy
behavior and/or unexpected errors, thus it is better if they aren't
used at all, if possible

svn-id: r53920
2010-10-29 10:58:54 +00:00
Filippos Karapetis
509f79990d SCI: Updated kSetShowStyle signature for SCI2.1. SQ6 starts again
svn-id: r53919
2010-10-29 10:28:20 +00:00
Yotam Barnoy
547e028b93 PSP: Improved image viewer movement
Before the limit was arbitrary. Now we check the proper location on screen and move in increments relative to the size on screen.

svn-id: r53918
2010-10-29 07:55:18 +00:00
Yotam Barnoy
082d9a4465 PSP: corrected png loader to use bit depth rather than palette size
Sometimes we can have an 8bit file for example that has a palette of 16 colors or less, so we need to go by the bit depth rather than inferring the bit depth from the palette size.

svn-id: r53917
2010-10-29 07:08:24 +00:00
Johannes Schickel
62c5f4f8e5 MT32: Remove useless cast.
svn-id: r53916
2010-10-29 00:40:57 +00:00
Johannes Schickel
07e9c6a035 KYRA: Minor formatting cleanup.
svn-id: r53915
2010-10-29 00:40:35 +00:00
Filippos Karapetis
88ad2d3991 SCI: Fixed a detection entry of Hoyle 1 (bug report #3090841)
svn-id: r53913
2010-10-28 23:59:37 +00:00
Johannes Schickel
32338876f8 KYRA: Rename KyraEngine::saveGameState to KyraEngine::saveGameStateIntern.
This is to avoid name similarity between KyraEngine::saveGameState(Intern)
and Engine::saveGameState.

svn-id: r53912
2010-10-28 23:57:24 +00:00
Johannes Schickel
607920c869 KYRA: Fix some code errors reported by ICC (i.e. subclasses not overwriting methods by missing a const.)
svn-id: r53911
2010-10-28 23:56:36 +00:00
Filippos Karapetis
d7f8fc108e SCI: Updated help page on the new console command "map_instrument"
svn-id: r53910
2010-10-28 22:58:39 +00:00
Johannes Schickel
2c042c263b SWORD25: Comment out unused static variable.
svn-id: r53909
2010-10-28 22:45:15 +00:00
Sylvain Dupont
ec08328f0c TOON: Fixed some animation glitches for small sprites
Fixed problems when the uncompressed is smaller than compressed size
Bug fix sent by Thomas
It also fixes Bug fix #3086004 : "TOON: Lights above WACME doors incorrect"

svn-id: r53908
2010-10-28 21:39:46 +00:00
Filippos Karapetis
b3e42b94c9 SCI: Added some missing GM mappings for MT-32 instruments:
- MT-32 Castanets -> GM Claves
- MT-32 OneNoteJam -> GM Celesta
- MT-32 JungleTune -> GM Pan Flute
For PQ3 (from rev #53902, not in the commit description):
- MT-32 Warm Pad -> GM Pad 2 (warm)

Thanks to digitall and waltervn for their help with these

svn-id: r53907
2010-10-28 18:45:11 +00:00
Filippos Karapetis
27c52434ba SCI: Split the GM related names out of map-mt32-to-gm.h and into a separate header file
svn-id: r53906
2010-10-28 16:26:04 +00:00