Commit Graph

490 Commits

Author SHA1 Message Date
Thierry Crozat
06bbb57ad7 I18N: Make many more GUI MessageDialog strings translatable 2011-06-13 22:19:18 +01:00
Max Horn
ce1a857669 TINSEL: Switch to alternate AdvancedMetaEngine, avoid ADParams 2011-06-10 22:15:45 +02:00
Max Horn
4827cc914a ENGINES: Change incorrect use of 'target' to 'gameid' 2011-06-10 22:15:40 +02:00
Max Horn
477d6233c3 ENGINES: Change 2nd param of Engine::saveGameState to Common::String 2011-06-02 18:31:59 +02:00
D G Turner
c9156d369f TINSEL: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
2011-06-02 03:58:27 +01:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Matthew Hoops
1277975c66 ALL: neighbour -> neighbor 2011-05-25 10:50:46 -04:00
eriktorbjorn
9205b8eb05 TINSEL: Fix bug #3306020, DW2: Crash On Entering Sewers
This is a simpler fix than the one I committed to the 1.3 branch,
but since it carries a theoretical risk of regressions it's so
much more macho.
2011-05-23 23:36:54 +02:00
Christoph Mallon
5813ac1bcf TINSEL: Remove declarations for non-existent functions FindObject() and GetNextObject().
Signed-off-by: Max Horn <max@quendi.de>
2011-05-18 15:30:33 +02:00
Christoph Mallon
f143668db4 TINSEL: Correctly handle the pDispList OBJECT linked lists, i.e. use OBJECT** for a pointer to the head.
Signed-off-by: Max Horn <max@quendi.de>
2011-05-18 15:30:23 +02:00
Max Horn
9c01c38512 TINSEL: Document pDispList OBJECT linked list 'trick' 2011-05-18 14:06:56 +02:00
Max Horn
d85700bb94 TINSEL: Revert commit 43ca9c86ab to fix bug #3303799
Commit 43ca9c86ab causes segfaults when trying to start a game in tinsel.

However, the code in question still should be investigated, as it
casts OBJECT** pointers to OBJECT*. Very fishy.
2011-05-18 13:47:41 +02:00
Max Horn
4cbe4ede66 COMMON: Registers RandomSources in constructor with the event recorder
This also removes the dependency of engines on the event recorder header
and API, and will make it easier to RandomSources that are not properly
registered.
2011-05-17 12:17:26 +02:00
Thierry Crozat
3c59e37035 ENGINES: Unify engine names
This unifies the engine names in MetaEngine::getName() and the
credits. In particular drop "Engine" or "engine" from the names when
it was present and use expanded names in credits when the
MetaEngine uses it (e.g. "Beneath a Steel Sky" instead of "BASS").
2011-05-16 00:11:32 +01:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
b8d858a00b TINSEL: Cleanup reel saving code 2011-05-10 14:43:54 +02:00
Max Horn
43ca9c86ab TINSEL: Remove unnecessary casts 2011-05-10 14:43:53 +02:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Paul Gilbert
4924c12b85 TINSEL: Fixed code analysis warnings in bug #3087863 2011-04-28 21:02:35 +10:00
Ori Avtalion
cd6ee0589d JANITORIAL: Format forward declarations to follow convention 2011-04-28 12:20:34 +03:00
Max Horn
73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +02:00
Johannes Schickel
7b4a4d9fa6 Merge pull request "New mixer mute handling."
See https://github.com/scummvm/scummvm/pull/12 for more information.
2011-04-18 15:59:34 +02:00
Johannes Schickel
933c4f93f5 TINSEL: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:33:50 +02:00
Max Horn
2e095e25f2 ALL: centre -> center 2011-04-14 14:34:28 +02:00
Max Horn
84184aabc0 ALL: colour -> color 2011-04-14 14:12:35 +02:00
md5
3d1dcefd46 TINSEL: Removed an unused global variable 2011-04-14 01:56:47 +03:00
Johannes Schickel
507dd88f9c TINSEL: Clean up code a bit, since we now handle digital audio muting differently. 2011-04-13 23:48:51 +02:00
Max Horn
7607e351cc TINSEL: Move custom ADPCM decoders to tinsel engine 2011-04-13 12:48:57 +02:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
Max Horn
f5ff6e9e18 TINSEL: cleanup 2011-04-12 16:06:39 +02:00
Johannes Schickel
e8be5ba95b TINSEL: Make the cdFlags array in drives.cpp static again. 2011-04-10 19:22:06 +02:00
md5
cd085b1ae8 TINSEL: Removed some unused global static variables 2011-04-10 17:27:48 +03:00
md5
c89f2276d1 TINSEL: Merged NewName() inside DoSave() in order to remove a static var 2011-04-10 14:27:50 +03:00
md5
d1c4b56223 TINSEL: Cleanup - removed obsolete defines 2011-04-10 14:27:49 +03:00
md5
b31f39e6c6 TINSEL: Changed cdFlags to be non-static and constant 2011-04-10 14:27:48 +03:00
md5
69ec4fbf1b TINSEL: Removed the dummy ForceEntireRedraw() function 2011-04-10 14:27:47 +03:00
md5
3fde0306a4 TINSEL: Removed the useless LookAtBuffers() function 2011-04-10 14:27:46 +03:00
Paul Gilbert
88b3fc7c66 TINSEL: Added numeric key mappings for function keys 2011-04-08 20:43:41 +10:00
Max Horn
7b47bf4638 TINSEL: Remove dead variables 2011-03-30 00:07:16 +02:00
Max Horn
8c931fd1e8 AUDIO: Add Audio::MidiPlayer::createDriver(), let some engines use it 2011-03-28 18:06:36 +02:00
Max Horn
7949d7c6de AUDIO: Move more common code to Audio::MidiPlayer
This also should fix some regressions from the previous
commits, related to MidiParser's either being leaked,
or being deleted and then used again (i.e., crashing).

I tested as many games as I had available, but further
testing of all affected engines is called for anyway.
2011-03-25 14:15:53 +01:00
Max Horn
f333d93fe8 TINSEL: Remove unused TinselEngine::_musicVolume member 2011-03-25 14:15:52 +01:00
Max Horn
47e347b922 TINSEL: Change MidiMusicPlayer to derive from Audio::MidiPlayer 2011-03-24 16:46:48 +01:00
Max Horn
e70fd59b35 ENGINES: Further simplify pseudo MidiDrivers; fix some regressions
The regression affected AGOS and maybe some others; specifically,
the real MidiDriver would have been deleted twice -- I previously
missed that the Engine instances takes care of freeing the real
MidiDriver, not the MidiPlayer wrapping it.

This commit should clarify the ownership of the real MidiDriver for
most pseudo MidiDrivers.
2011-03-23 16:49:41 +01:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
Many engines follow the advice in audio/midiparser.h and create a
"pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny
subset of the MidiDriver capabilities, namely those found in
MidiDriver_BASE. So we try to subclass from that whenever possible; this
allows us to remove many stub methods, and enables further future
simplifications.
2011-03-23 15:25:47 +01:00
Max Horn
99dbecf3b4 TINSEL: Make MidiMusicPlayer::_parser and _mutex protected 2011-03-23 15:25:46 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
md5
a796f7843d TINSEL: Added enhanced music support for the German CD "Neon Edition" re-release of DW1 (bug #2827022) 2011-02-24 14:54:12 +02:00
Johannes Schickel
01d511bf1b TINSEL: Adapt to setPalette RGBA->RGB change.
This is done by converting the internal RGBA palette data to RGB before
calling setPalette. This might not be the best solution, but looking a bit
into the engine it seems like changing all the code to work with RGB instead
of RGBA might require some bit of work.
2011-02-15 23:32:41 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
2d1c8a3533 ALL: Fix whitespaces / indention
svn-id: r55818
2011-02-07 23:01:06 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Filippos Karapetis
9b8c04045b MIDI: Fix for bug #3170988 - "MONKEY2: Messed up MT-32 music"
This is a regression from r55256. Apparently, SCUMM has issues when sending a sustain
off on a notes off event. Thus, this has been turned into a feature, which is disabled
by default. Since MADE, SAGA and tinsel all share the same music code and play regular
MIDI files, and this feature fixes hanging notes for them, it has been enabled for them.
Also, applied a patch for a bug regarding the notes off event in MADE and tinsel,
which has been applied in SAGA already

svn-id: r55746
2011-02-02 23:27:59 +00:00
David Turner
9573b1d2f5 TINSEL: Memory Leak Fix in Coroutines.
This fixes the leak from the COR0_BEGIN_CODE macro's CoroContextTag allocation.
Setting the _sleep value to negative values prevented the deallocation of these.
Have tested for obvious regressions, but a full DW/DW2 playtest should be done to confirm that this doesn't cause any issues.
Thanks to fingolfin for indicating this solution.

svn-id: r55671
2011-01-30 23:21:40 +00:00
Arnaud Boutonné
d063b074cd JANITORIAL: Suppress some useless includes
svn-id: r55091
2011-01-02 14:06:42 +00:00
Max Horn
6edc86a19b DEBUG: Let GUI::Debugger::preEnter and postEnter (un)pause the engine
svn-id: r54815
2010-12-07 18:54:21 +00:00
Max Horn
9a0c20a45f TINSEL: Improve support for DW mac demo (see bug #3110936)
svn-id: r54811
2010-12-07 18:00:18 +00:00
Max Horn
a914b97559 TINSEL: Fix support for file names with a trailing dot
When copying data files with 8.3 names from a CD, they sometimes end up
with a trailing dot, e.g. "INDEX." instead of "INDEX". Comon::File
supports this, but in r54392 Tinsel stopped using Common::File.

This commit also removes the useless SeekableSubReadStream wrapper
around the actual file stream.

svn-id: r54446
2010-11-23 22:33:26 +00:00
Max Horn
b485d0ee49 TINSEL: Turn TinselFile into a SeekableReadStream
svn-id: r54439
2010-11-23 22:26:43 +00:00
Max Horn
c9fdaa7417 TINSEL: Restrict use of memstream.h & substream.h
svn-id: r54437
2010-11-23 22:26:09 +00:00
Paul Gilbert
a2367d26f9 TINSEL: Preliminary functionality for reading BE data files
svn-id: r54392
2010-11-20 03:14:03 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Max Horn
5ceb54d088 TINSEL: Get rid of some global variables
These were actually all "harmless" (i.e. where no obstructions
to RTL support). Still good to get rid of 'em!

svn-id: r54286
2010-11-17 12:13:23 +00:00
Filippos Karapetis
144ed3e22d TINSEL: Fixed compilation with MSVC
svn-id: r54271
2010-11-16 22:09:46 +00:00
Max Horn
c734fc2b3e TINSEL: Remove unnecessary 'static'
svn-id: r54263
2010-11-16 09:54:11 +00:00
Max Horn
1dbf8d73d5 TINSEL: Mark all (?) global vars with a FIXME comment
Use of global vars is what prevents RTL from working in Tinsel (and
probably in other engines). More specifically, the fact that many
global vars are not explicitly inited when the engine is (re)launched.

svn-id: r54262
2010-11-16 09:53:55 +00:00
Max Horn
ada9c9af60 TINSEL: Removed unnecessary 'static'
svn-id: r54261
2010-11-16 09:53:08 +00:00
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
Max Horn
c5598664ce DETECTOR: Get rid of ADGF_KEEPMATCH
Also fix some typos, and minor tweaks

svn-id: r54118
2010-11-07 17:15:27 +00:00
Max Horn
cba30ee716 TINSEL: Correcting my previous commit, oops
svn-id: r54030
2010-11-01 21:36:39 +00:00
Max Horn
9cadcf4c5b TINSEL: Fix a leak in DW2, and a potential OOB in NextTaggedActor
svn-id: r54029
2010-11-01 21:06:04 +00:00
Filippos Karapetis
7f1a9699fa TINSEL: Fixed two places that weren't reset when exiting to the launcher and reentering the game. There could be (and most likely are) others as well
svn-id: r54028
2010-11-01 20:59:17 +00:00
Max Horn
ff01247526 TINSEL: Explain why exactly RTL is disabled
The very same issue probably affects more engines, possibly even some
which have RTL enabled.

svn-id: r54027
2010-11-01 20:49:55 +00:00
Max Horn
9a350f4398 ENGINES: Get rid of some (f)printfs
svn-id: r54011
2010-11-01 16:04:47 +00:00
Max Horn
a984fb17c2 GUI: Add GCC_PRINTF to GUI::Debugger::DebugPrintf & fix resulting warnings
svn-id: r54007
2010-11-01 16:03:35 +00:00
Ori Avtalion
ed8bfb00b9 TINSEL: Reintroduce DUMMY variable removed in r53932
This placates compilers that complain about the semicolon in
"CORO_BEGIN_CONTEXT;"

svn-id: r53992
2010-10-31 22:33:13 +00:00
Max Horn
5c49ae8a9c TINSEL: cleanup
svn-id: r53991
2010-10-31 21:50:48 +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
Paul Gilbert
fe06b7d151 TINSEL: Fix for #3091314 - Added extra detection entries for Multi-lingual DW1
This adds in German, Italian, and Spanish as detection entries, so a user can immediately select what language to run the game in.

svn-id: r53724
2010-10-22 23:39:29 +00:00
Paul Gilbert
b8ff3eb491 TINSEL: Ignore SV_SPEECHDELAY in DW2 Demo
This stops the long delays at the start of playing each sample

svn-id: r53717
2010-10-22 22:09:59 +00:00
Paul Gilbert
610c5eb336 TINSEL: Load samples file for DW2 Demo
svn-id: r53714
2010-10-22 21:49:21 +00:00
Paul Gilbert
d771d98a92 TINSEL: Fix incorrectly mapped opcode in DW2 Demo
svn-id: r53712
2010-10-22 21:33:31 +00:00
Paul Gilbert
a88d7b2905 TINSEL: Remove unused function
svn-id: r53711
2010-10-22 21:23:44 +00:00
Paul Gilbert
ffa8b9d61a TINSEL: Compilation fix
svn-id: r53709
2010-10-22 21:17:54 +00:00
Paul Gilbert
96723838c6 TINSEL: Added new opcode set for the DW2 Demo
svn-id: r53708
2010-10-22 21:08:27 +00:00
Paul Gilbert
9e9739c074 TINSEL: Added detection entry for DW2 Demo
svn-id: r53707
2010-10-22 21:07:28 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Paul Gilbert
168670acb2 TINSEL: Fix for #3087863 - Code analysis warnings
svn-id: r53471
2010-10-15 08:52:22 +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
Max Horn
2db927c223 TINSEL: Remove redundant '_Windows' check
svn-id: r52932
2010-09-28 19:06:03 +00:00
Johannes Schickel
6588398ce6 MIDI: Send a reset MIDI device signal on startup.
This is currently done in the engine code. I adapted AGI, AGOS, DRACI,
GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset
device on startup. The sound output still works fine (started up a game
from every engine), so this should hopefully not introduce any regressions.

As far as I can tell it seems that SCUMM does send a proper device reset, so
I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am
not sure about SCI though.

This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI".

svn-id: r52736
2010-09-15 22:00:20 +00:00
Eugene Sandulenko
f7f5a561eb TINSEL: Remove unused variable
svn-id: r52684
2010-09-12 14:18:40 +00:00
Paul Gilbert
70fed746df TINSEL: Fix for #3032780 - Mute not respected in DW1
svn-id: r52674
2010-09-11 05:28:54 +00:00