Commit Graph

884 Commits

Author SHA1 Message Date
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
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Torbjörn Andersson
df91686a36 AGI: Initialise PCjr emulator channels on creation
Because chanGen() gets called very early, and sometimes it crashes
ScummVM as soon as the game starts. Actually, it's probably enough to
initialise a couple of fields in _tchannel[], but I figured it
couldn't hurt to clear all of _channel[] and _tchannel[].

svn-id: r52741
2010-09-16 04:43:49 +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
Travis Howell
f7fa335a1b AGI: Fix compilation.
svn-id: r52719
2010-09-14 00:47:26 +00:00
Johannes Schickel
efc13c42b2 AGI: Improve support for MT-32 in the MIDI output.
Formerly the AGI MIDI code did not setup the channel mask properly, in case
"native_mt32" was set. This resulted in one missing channel (i.e. channel 0),
since the MT-32 only responds to data for channels 1-9.

svn-id: r52718
2010-09-14 00:44:41 +00:00
Eugene Sandulenko
fcdb349fa2 AGI: Respect mute setting
svn-id: r52373
2010-08-25 07:41:14 +00:00
Eugene Sandulenko
349b89adce AGI: Fix bug #3034370
Bug #3034370: "Manhunter: New York keyboard unresponsive". Actually
the keyboard was made responsive after June implementation of set.key,
still the game speed was increasing. Fixed that too.

svn-id: r52369
2010-08-25 07:39:50 +00:00
Eugene Sandulenko
30d8dda867 AGI: Reset controllers on game restart
svn-id: r52368
2010-08-25 07:39:31 +00:00
Eugene Sandulenko
663a606602 AGI: Fix bug #3017908: "AGI: No music with the new MIDI patch"
Fixed by performing proper MIDI initialization.

svn-id: r52332
2010-08-24 12:41:56 +00:00
Eugene Sandulenko
756d5e2847 AGI: Fix valgrind warning
svn-id: r51312
2010-07-26 14:22:16 +00:00
Eugene Sandulenko
e4bc0c3a18 AGI: Fix crash on exit thanks to valgrind
svn-id: r51311
2010-07-26 14:21:59 +00:00
Eugene Sandulenko
aea09cb3a0 AGI: Fix spelling and formatting
svn-id: r51310
2010-07-26 14:21:18 +00:00
Eugene Sandulenko
afc872cba8 AGI: Fix bug #3017911
Bug #3017911: "AGI (Fan): SQ0 - Ego flickering". It is a regression from r49745,
as it appeared, some of the screen updates were too much.

svn-id: r51223
2010-07-23 21:11:56 +00:00
Max Horn
1d4c82885d DEBUGGER: Simplify how our console debugger works / is used
* Remove _isAttached member var and isAttached method
* Engines now always call the onFrame method; whether it does
  something is decided by the debugger class resp. its subclasses
* Make detach() protected instead of private, so that subclasses
  can invoke it
* Remove _detach_now member var (call detach() instead).
* Rename _frame_countdown to _frameCountdown and properly
  document it.
* Add more doxygen comments
* Cleanup

svn-id: r50963
2010-07-17 18:38:42 +00:00
Johannes Schickel
e75eee21e3 Use "true" instead of "1" in if statements to make clang a bit more happier with -Werror.
svn-id: r50943
2010-07-16 21:50:12 +00:00
Torbjörn Andersson
bde1cbd785 Cleanup.
svn-id: r50928
2010-07-16 03:34:25 +00:00
Matthew Hoops
6c22d599ec Fix non-PCSPK sound types in AGI.
svn-id: r50891
2010-07-14 17:04:53 +00:00