Commit Graph

901 Commits

Author SHA1 Message Date
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
Ori Avtalion
cd6ee0589d JANITORIAL: Format forward declarations to follow convention 2011-04-28 12:20:34 +03:00
Eugene Sandulenko
52c05acd95 AGI: Fix bug #3087825: AGI: Code analysis warnings 2011-04-24 12:28:22 +03:00
Max Horn
73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +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
Max Horn
b188e60f44 AGI: Avoid global constructors (due to global refs) 2011-04-04 09:53:26 +02:00
md5
101d4b66e2 AGI: Added the Spanish version of SQ2 (bug report #3260349) 2011-04-03 19:11:49 +03: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
f4b30ecf6e AGI: Change SoundGenMIDI to derive from Audio::MidiPlayer
As a side effect, this fixes the incorrect handling of 'All Note Off'
in SoundGenMIDI::send.
2011-03-24 16:46:46 +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
a3efe915d3 PREAGI: Cleanup volume levels initialization 2011-03-19 15:32:35 +01:00
dhewg
454bad69e9 AGI: Remove newlines from debug() 2011-03-16 20:58:57 +01:00
dhewg
69a026192e AGI: Kill the timer based counter
Using the timer mechanism for just a simple counter is not just
overkill, its also inaccurate. When using a call frequency of x,
and waiting for y callbacks, the passed time will not be x*y.
The problem amplifies on slower platforms and/or fair thread
schedulers.
Use absolute times instead. Most notably, the walking speed of
the avatar is now smooth on android, but probably on all other
handhelds we support too.
2011-03-05 11:00:37 +01:00
Matthew Hoops
06e88662d9 AGI: Add detection for the 'AGI Combat' fan game 2011-02-28 22:22:19 -05:00
Johannes Schickel
bb2daae936 AGI: Remove leftover RGBA reference in comments. 2011-02-20 21:39:29 +01:00
Johannes Schickel
021ecca3b0 AGI: Adapt to setPalette RGBA->RGB change. 2011-02-14 17:08:31 +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
Max Horn
4b2f92b5e5 AGI: Rewrote predictive code matcher
The new code is simpler, avoids a potential buffer overrun
(by avoiding to to use a buffer in the first place), and
hopefully has slightly more sane matching properties.

svn-id: r55135
2011-01-06 21:11:24 +00:00
Max Horn
0a8189fd41 AGI: cleanup
svn-id: r55124
2011-01-05 13:04:08 +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
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Max Horn
a0df86955f ALL: Push down deps on stream.h from .h to .cpp files
svn-id: r54358
2010-11-19 01:37:04 +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
a7248a0601 ENGINES: Replace many printfs by warning/debug/debugN
svn-id: r54031
2010-11-01 21:37:47 +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
415f9a1b0b AGI: Add note about AgiEngine::parseFeatures
svn-id: r53872
2010-10-27 09:47:18 +00:00
Max Horn
2c99caa795 AGI: Fix memory leak in AgiEngine::parseFeatures()
svn-id: r53869
2010-10-26 22:35:37 +00:00
Max Horn
7c2323bdc3 AGI: Replace report() macro by debug() / warning()
This makes AGI quite a bit less noisy by default.

svn-id: r53868
2010-10-26 22:33:49 +00:00
Max Horn
3534cff8ef ALL: Fix indention (whitespaces -> tabs)
svn-id: r53738
2010-10-23 15:46:50 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Eugene Sandulenko
764eaa554c AGI: Fix some code analysis warnings (bug #3087825)
svn-id: r53470
2010-10-15 08:49:20 +00:00
Eugene Sandulenko
77e70a7187 AGI: Fix bug #3017908 with MIDI music
Bug #3017908: "AGI: No music with the new MIDI patch"
Thanks to Raziel^ for pinpointing the bug.

svn-id: r53166
2010-10-12 19:44:40 +00:00
Torbjörn Andersson
54b2a8c98d JANITORIAL: Cleanup (mostly whitespace)
svn-id: r53161
2010-10-12 04:19:58 +00:00
Willem Jan Palenstijn
0fd6b7608e AGI: Fix one more strncpy/strncat issue
svn-id: r53148
2010-10-11 17:52:44 +00:00
Johannes Schickel
cc0afa92b3 AGI: Fix possible buffer overflow.
This is based on patch #3085298 "overflows in agi and parallaction".

svn-id: r53147
2010-10-11 17:07:53 +00:00
Torbjörn Andersson
8d297f065a AGI: Properly detect the autosave slot in the save dialog
Forward-ported from branch. Let's do this the easy way for now, even
if I'm not sure why the save dialog shows the autosave slot anyway.

svn-id: r52997
2010-10-03 18:38:38 +00:00
Torbjörn Andersson
4543855eca AGI: Fix bug in cmd_cancel_line()
We have to update cursor position, not just terminate the input
buffer. This makes Ctrl-C work as intended, which fixes one half of
bug #3054184 ("SQ1 AGI: keyboard special keys are not functioning
properly"). I'm not sure if the second half actually is a bug. 

svn-id: r52899
2010-09-26 11:20:55 +00:00
Matthew Hoops
d4504a3f3a AGI: Fix C64 AGI pictures
The initial screen color needs to be 0 and not 0xf for these. Winnie C64/Apple II should be completable now, with some graphical glitches and palette problems.

svn-id: r52881
2010-09-25 14:28:48 +00:00
David Turner
4b7a9b29fe AGI: Fix for Bug #3067263 "SQ2: ScummVM hanging on the inventory screen"
This was due to a loop in AgiEngine::selectItems(int n), which lacked a check
that the engine was quitting or restarting.

svn-id: r52856
2010-09-22 20:05:10 +00:00
Torbjörn Andersson
f994deb4ee AGI: Deconfusify the AGI music driver
(After a brief discussion with sev.) AdLib is now the old Sarien sound,
PCjr is the new PCjr emulation. PCjr is still the default; we don't
need to ask getMusicType() how to get there.

svn-id: r52838
2010-09-21 06:05:27 +00:00
Eugene Sandulenko
d43ff54a08 AGI: Changed meaning of pcjr sound device. Now it is Sarien emu
Music drivers:
default: proper Tandy/PCJr
adlib: proper Tandy/PCJr
pcjr: old Sarien emu
amiga: old Sarien emu in Amiga mode
pcspk: Sarien emu in PCSpk mode (quite wrong)
midi: 4 channel MIDI

svn-id: r52836
2010-09-21 05:36:51 +00:00
Eugene Sandulenko
763c089d06 AGI: Fix bug #3061578: AGI: PCjr Mode Not Default for DOS Games
svn-id: r52831
2010-09-20 21:17:49 +00:00