Commit Graph
1310 Commits
Author SHA1 Message Date
Matthew Hoops 8dd17a2ae1 AGI: Replace Winnie macros with functions
From patch #3298149
2011-05-07 15:25:55 -04:00
Max Horn 59e77ed667 ALL: Mark printf and various other symbols as forbidden
Right now, a few places in the frontend code still use printf and
consorts. We mark the affected files with a FIXME for now, and
add a dedicated exception for each. To be fixed!

Also tweak FORBIDDEN_SYMBOL_REPLACEMENT to hopefully really always
enforce a compiler error
2011-05-02 16:31:31 +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
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
Jussi Pitkanen 40b0d468e3 AGI: More formatting changes... 2011-04-12 18:40:43 +03:00
Jussi Pitkanen 40394431dc AGI: Use delete[] instead of delete for arrays 2011-04-12 18:22:24 +03:00
Jussi Pitkanen 506f3bdc10 AGI: Formatting 2011-04-12 18:07:35 +03: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
Jussi Pitkanen d099ad3a48 AGI: Detect swap mode correctly for Apple IIGS instruments.
Also add comments describing which instruments use swap mode or vibrato,
plus print debug messages when those instruments are actually being played.
2011-04-10 17:27:07 +03:00
Jussi Pitkanen 4b3f081ee0 AGI: Cleanup sound_2gs.* 2011-04-09 19:11:25 +03:00
Jussi Pitkanen fbb2d4d6cc AGI: Let games start playing a new sound even if another one is still playing. 2011-04-09 19:09:29 +03:00
Jussi Pitkanen d660b7f78d AGI: Refactor and fix Apple IIGS sound generator
Make the player be centered on a fixed number of "generators" instead of
MIDI channels that arbitrarily allocate generators for notes.

Make the audio stream to be stereo and for sample rate use _sampleRate.
Rewrite the synthesis core:
  * Make generators use both oscillators
  * Implement swap mode for oscillators
  * Fix envelope update frequency
2011-04-09 00:48:26 +03: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