Commit Graph

330 Commits

Author SHA1 Message Date
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Eugene Sandulenko
0dafa7f80f ALL: Reduce audio/ header dependency 2011-08-06 11:30:42 +01:00
Paul Gilbert
7356b83faf M4: Fix identified assert calls that had file reads inside them 2011-08-04 22:37:30 +10:00
Littleboy
b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Tarek Soliman
94334f66b3 M4: flag all WIP games with ADGF_UNSTABLE
all
2011-06-16 13:37:57 -05:00
Max Horn
7c992d6598 DETECTOR: Merge ADParams into AdvancedMetaEngine 2011-06-14 18:17:01 +02:00
Thierry Crozat
06bbb57ad7 I18N: Make many more GUI MessageDialog strings translatable 2011-06-13 22:19:18 +01:00
Max Horn
dec7df0f16 M4: Switch to alternate AdvancedMetaEngine, avoid ADParams 2011-06-10 22:15:43 +02:00
Max Horn
4827cc914a ENGINES: Change incorrect use of 'target' to 'gameid' 2011-06-10 22:15:40 +02:00
D G Turner
263ef45499 M4: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
2011-06-02 04:52:34 +01:00
Paul Gilbert
ed20f18d29 TSAGE: General cleanup of object class 2011-05-30 20:29:13 +10:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Max Horn
587811d852 M4: Attempt to fix the broken Rails code
I am not sure how this code could have ever worked without lots of
crashing, but maybe I am missing something... Still, casting an
arbitrary integer value to an int *pointer* and then later dereferencing
it does not seem like a good idea :).

Changed the code to do what I *guess* it was meant to do. But somebody
who actually knows M4 and its games should double check.
2011-05-25 16:42:16 +02:00
Max Horn
2149edbe5d M4: Fix leak in Console::cmdDumpFile 2011-05-17 15:04:07 +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
Paul Gilbert
0bcfbd3cbd M4: Replaced the trouble variable data map code with direct statements.
Since there aren't expected to be all that many engine variables needed, this seems a cleaner overall implementation.
2011-05-15 09:23:02 +10:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Matthew Hoops
3e1b3baaac M4: Fix a typo; cleanup 2011-05-06 23:16:10 -04:00
Matthew Hoops
58d318d389 M4: Fix the title of riddle 2011-05-06 23:12:19 -04:00
Matthew Hoops
daa2732bee M4: Allow Riddle to be run using the original directory structure
Not that the game starts up or anything :P
2011-05-06 23:12:19 -04: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
Johannes Schickel
da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel
663bb3e1e5 M4: Properly setup format in M4Surface constructor. 2011-04-17 20:58:07 +02:00
Johannes Schickel
7b9b568148 M4: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:29:11 +02:00
Max Horn
8aa6d25c77 ALL: centerd -> centered 2011-04-14 14:42:21 +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
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
dhewg
d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
dhewg
8c70f2a584 M4: Fix twisted assignment
Thanks to -Wunused-but-set-variable
2011-03-29 21:57:43 +02:00
Max Horn
8c931fd1e8 AUDIO: Add Audio::MidiPlayer::createDriver(), let some engines use it 2011-03-28 18:06:36 +02:00
Paul Gilbert
110f6b9be7 M4: Corrected incorrect case in cheat key handler 2011-03-28 20:57:01 +11: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
e76a8a8eb6 M4: Change MidiPlayer to derive from Audio::MidiPlayer
Also fix the _driver double delete regression I recently introduced
2011-03-24 16:46:47 +01:00
Max Horn
088bd7a70b ENGINES: Remove unused MIDI pass-through code 2011-03-23 17:07: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
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
dhewg
dc6c88f350 M4: Init volume levels on startup 2011-03-19 16:04:53 +01:00
D G Turner
10e2cec6b9 M4: Updated for OSystem Palette RGBA->RGB Change. 2011-02-20 03:20:06 +00:00
Ori Avtalion
84a8bdc86b JANITORIAL: Remove duplicate #include's
svn-id: r55889
2011-02-12 10:00:52 +00:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Paul Gilbert
e00c17712c M4: Removed redundant colour index recalculation in palette manager
svn-id: r55098
2011-01-03 11:36:39 +00:00
Max Horn
2cae2fc4d0 M4: Remove unnecessary reference to file.h
svn-id: r54563
2010-11-28 23:39:02 +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
d6592aaba6 M4: Do not use Common::SubReadStream where ReadStream suffices
svn-id: r54342
2010-11-18 19:27:01 +00:00