Commit Graph

110 Commits

Author SHA1 Message Date
Johannes Schickel
6eab0dcc6e Preliminary support for loading via GMM for KYRA engine.
svn-id: r34885
2008-11-03 19:51:34 +00:00
Johannes Schickel
64fe71fed3 Added a member function loadSoundFile to Sound which accepts a filename string instead of a filename list id.
svn-id: r33527
2008-08-02 15:05:19 +00:00
Johannes Schickel
5e0df8ad8e Committed slightly modified patch #2029395 "KYRA: Lands of Lore Intro + Character selection".
svn-id: r33463
2008-07-31 10:47:15 +00:00
Johannes Schickel
bb03596744 - Renamed KyraEngine to KyraEngine_v1
- kyra.* -> kyra_v1.*
- scene.cpp -> scene_v1.cpp

svn-id: r32044
2008-05-11 23:16:50 +00:00
Johannes Schickel
a83d79bafd Fixed typos.
svn-id: r31965
2008-05-09 13:33:31 +00:00
Johannes Schickel
3d9ea59616 Changed kyra to use delete[] instead of delete [].
svn-id: r31925
2008-05-07 14:20:37 +00:00
Filippos Karapetis
9c59043664 Silenced MSVC warning
svn-id: r31434
2008-04-06 15:23:18 +00:00
Johannes Schickel
a2e355d671 Implemented fadeout waiting in KyraEngine_v2::enterNewScene for AdLib.
svn-id: r31424
2008-04-06 13:57:28 +00:00
Johannes Schickel
82c2f1203e Cleaned up volume settings managment.
svn-id: r31385
2008-04-04 18:09:19 +00:00
Johannes Schickel
f919b26875 - fixed multiple voices playing at once (see bug #1926547 "HoF: Right mouse button messes up gameplay").
- fixed crash while uninitializing AdLib driver

svn-id: r31252
2008-03-26 21:39:44 +00:00
Johannes Schickel
58f0d4e632 Committed slightly modified patch #1862758 "KYRA: audio data assignment patch".
svn-id: r30198
2008-01-03 14:42:49 +00:00
Johannes Schickel
e946eff205 Added a hack to allow adjustment of Adlib volume. (see bug #1497961 "KYRA1: music/sfx volume settings not working")
svn-id: r29808
2007-12-09 23:55:57 +00:00
Nicola Mettifogo
258901bab9 Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
2007-09-19 08:40:12 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Johannes Schickel
21b2c7bceb Formatting/Cleanup.
svn-id: r26511
2007-04-15 16:41:20 +00:00
Johannes Schickel
397c10f059 made _vm/_engine usage consistent. (_engine -> _vm all over the place now).
svn-id: r26342
2007-04-01 13:10:50 +00:00
Max Horn
227a080e5b Patch #1663933 (Kill premix channel) with a few tiny additional tweaks by me
svn-id: r25752
2007-02-20 18:50:17 +00:00
Torbjörn Andersson
546758a086 Only set up the Kyra 1 triggers for Kyra 1, not Kyra 2.
svn-id: r25650
2007-02-17 08:06:21 +00:00
Johannes Schickel
940e89d00e Added support for Kyrandia 2 ADL files.
svn-id: r25634
2007-02-16 16:57:59 +00:00
Johannes Schickel
1bbad356ef - adds support for FM-Towns SFX (thanks to Florian Kagerer for his source)
- gets rid of GameFlags::hasAudioCD

svn-id: r25258
2007-01-29 18:15:14 +00:00
Johannes Schickel
4cf1c3565b little parameter reodering.
svn-id: r25201
2007-01-26 13:09:48 +00:00
Johannes Schickel
7d0435f23c - adding LPGL headers to adlib sound specific files
- stating about dual license of adlib sound specific files

svn-id: r23708
2006-08-15 18:04:01 +00:00
Torbjörn Andersson
44dd6a386e Committed my own patch #1533833 (minus one line that was left over from an
earlier experimental version) after discussing it with LordHoto. This works
around a bug in the "Pool of Sorrow" Adlib data which caused the channels to
drift more and more out of sync for each time the music looped. The patch
forces the channels involved to jump in sync. As with all such workarounds, it
may cause regressions. But it shouldn't.

svn-id: r23659
2006-08-03 13:11:16 +00:00
Torbjörn Andersson
ec6a9b0071 Removed unnecessary #include
svn-id: r23598
2006-07-26 06:36:58 +00:00
Johannes Schickel
6ac60c9c7b Fix for bug # 1497961 ("KYRA1: in-game "Music" option not working").
svn-id: r22844
2006-06-02 22:57:02 +00:00
Johannes Schickel
1750be5b5a - makes Screen::getPagePtr private
- introduces Screen::getCPagePtr and Screen::getPageRect (which should ease the introduction of dirty rect handling)
- moves KyraEngine::loadBitmap to Screen

svn-id: r22716
2006-05-28 12:19:45 +00:00
Johannes Schickel
727f66de39 Commits Chriliths patch for fixing Kyra on PalmOS.
svn-id: r22708
2006-05-28 11:43:04 +00:00
Johannes Schickel
a5b4fb7f18 - little cleanups
- adds kyra3 dummies

svn-id: r22425
2006-05-12 23:57:53 +00:00
Max Horn
27307acd7c Moved the AudioCDManager as well as class AudioStream and its (standard) subclasses to namespace Audio
svn-id: r22231
2006-04-29 22:33:31 +00:00
Max Horn
cf202049ff Fixing mismatch between format strings and data on some systems
svn-id: r21827
2006-04-12 14:54:12 +00:00
Jonathan Gray
eb3ae7d726 sizeof(void *) != sizeof(int) for a large number of systems.
Fix a lot of debug/error statements that were using %d/%x
for the result of pointer arithmetic.

As C++ apparently has no format string for ptrdiff_t use
%lu/%lx as appropriate.

svn-id: r21824
2006-04-12 10:01:41 +00:00
Torbjörn Andersson
23c692f09f Cleaned up update_playRhythmSection(). It's almost possible to understand what
it's intended to do now.

Renamed _unkOutputByte2 to _vibratoAndAMDepthBits. It's a pretty terrible name,
but that's what it is: the two most significant bits of the Adlib BD register.

Renamed _rhythmSection to _rhythmSectionBits for consistency: It's the five
least significant bits of the Adlib BD register.

(The remaining bit is the rhythm on/off bit. I don't think we store that one in
any variable.)

svn-id: r21463
2006-03-26 22:11:40 +00:00
Torbjörn Andersson
737c52590b I believe that the purpose of updateCallback45() is to add a signed value to a
channel's unsigned tempo. Rewrote the function to make this clearer, and
renamed it update_changeChannelTempo().

svn-id: r21448
2006-03-25 10:11:38 +00:00
Torbjörn Andersson
2c279848d8 More renamings:
unk11 -> durationRandomness

updateCallback12() -> update_setupNoteAndDuration()
updateCallback26() -> update_setupDuration()
updateCallback44() -> update_setDurationRandomness()

svn-id: r21447
2006-03-25 09:55:28 +00:00
Torbjörn Andersson
0c0c41d495 Implemented "sound triggers" so that the music does not stop shortly after
entering the castle. I hope this is a fair approximation of how the original
worked. Of course, this led to a couple of more renamings:

_unk5              -> _soundTrigger
updateCallback54() -> update_setSoundTrigger()
snd_setUnk5()      -> snd_getSoundTrigger()      (yes, "get")

At the moment, the only known sound triggers are the ones in the castle. If an
unknown trigger is set, the debugging messages will be really, really noisy. I
don't know if I should consider this a bug or an extremely annoying feature.

svn-id: r21396
2006-03-21 17:17:24 +00:00
Torbjörn Andersson
4df16b71b8 Oops, I never meant to remove *that* line! Put it back again. (This fixes the
flute sound, and probably other regressions as well.)

svn-id: r21345
2006-03-17 13:13:31 +00:00
Torbjörn Andersson
e36edb1b35 The opcode functions are not allowed to modify their own channel.dataptr
directly. If they want a new data pointer, they have to use the dataptr
parameter. This fixes a subtle bug that would cause the wrong music to play
when getting the quill in Kyra 1.

svn-id: r21344
2006-03-17 12:03:24 +00:00
Torbjörn Andersson
05e0542452 More cleanups and renamings: _sfxSecondByteOfSong -> _sfxPriority
Added some comments on the strange but probably harmless things going on in
playSoundEffect()

svn-id: r21340
2006-03-16 23:22:23 +00:00
Torbjörn Andersson
1d8e206333 Went through callbacks 51, 52 and 53, comparing them to LordHoto's annotated
disassembly. I think they're correct now, and a bit easier to read. My old
comments were wrong, too.

I think they are for manipulating the Adlib rhythm section volumes. I'm not
sure the Kyra music ever uses the Adlib rhythm section.

svn-id: r21339
2006-03-16 20:52:36 +00:00
Torbjörn Andersson
99c34b0377 We have several functions where we need to find the pointer to a program or an
instrument. These are found using the lookup tables in _soundData on offsets 0
and 500 respectively. Added helper functions for that, which makes the code a
lot tidier. Particularly in update_setupRhythmSection(), where it's now much
clearer where it's getting all those "unk" values from.

Use the checkValue() function (which limits the "total level" to its valid
range) for the calculateOpLevel1() and 2() functions as well.

Renamed updateCallback16() to update_waitForEndOfProgram().

svn-id: r21337
2006-03-16 18:53:02 +00:00
Torbjörn Andersson
0182b46679 More renamings:
callbackOutput()   -> setupPrograms()
callbackProcess()  -> executePrograms()
updateCallback3()  -> update_setupProgram()

_unk4              -> _rhythmSection
updateCallback48() -> update_setupRhythmSection()
updateCallback49() -> update_playRhythmSection()
updateCallback50() -> update_removeRhythmSection()

svn-id: r21336
2006-03-16 18:01:14 +00:00
Torbjörn Andersson
8fcb38648d I don't know if it's our bug, or a bug in the original Kyra music driver, but
updateCallback3() would call unkOutput2(9) in at least one case. This is
obviously wrong because it a) reads outside _regOffsets[], and b) writes to
invalid Adlib registers.

Now unkOutput2() has the same safeguards as noteOff() already had, making
callbackOutput() and updateCallback3() even more similar.

svn-id: r21335
2006-03-16 17:39:23 +00:00
Torbjörn Andersson
f040ea1e82 Fixed some comments and made a couple of cleanups to make it a bit more clear
just how similar callbackOutput() and updateCallback3() are.

svn-id: r21333
2006-03-16 17:27:52 +00:00
Torbjörn Andersson
1f603fdd98 Cleanup.
svn-id: r21304
2006-03-14 23:39:42 +00:00
Torbjörn Andersson
839b5d3e86 Added workaround in FMOPL for the pathological case where a note was turned off
while still at the very beginning of the "attack" phase. This is the very
lowest point on the attack curve, yet it would continue from the beginning of
the release curve, i.e. its very highest point. This is what caused Kyra to
often play low-frequency notes at the very beginning of a new song. (That, and
a truly bizarre function for initialising the channels.)

The proper fix would be to locate the correct point on the release curve and
continue from there. For now, though, only handle the trivial case.

svn-id: r21302
2006-03-14 23:01:44 +00:00
Torbjörn Andersson
ee6f7626bf Fix typo in comment.
svn-id: r21298
2006-03-14 19:08:09 +00:00
Johannes Schickel
fa4471fae4 - Fixes a bug in update_primaryEffect (wrong sound from the birds outside brandons home is fixed with this)
- Changes _tempo, tempo, position, unk41, unk32, unk18, unk19, _unkValue3 to unsigned (should be correct this time)

svn-id: r21293
2006-03-14 15:15:04 +00:00
Johannes Schickel
9673573bec Fixes _unkTables, I made a mistake while extracting those last time it seems.
svn-id: r21287
2006-03-14 13:37:15 +00:00
Torbjörn Andersson
660c23ba3f Updated comment with more circumstantial evidence that the low-frequency note
bug is a bug in our fmopl.cpp. Ken Silverman's Adlib emulator doesn't seem to
exhibit the bug either. (But is apparently less feature complete than MAME's.)

svn-id: r21275
2006-03-14 09:55:41 +00:00
Torbjörn Andersson
784728bf8d Further clarifications to the comment about the "low-frequency notes at
beginning of music" bugs. As an experiment, I tried hooking up ScummVM with the
most recent version of the FMOPL code, and the bug went away.

Unfortunately, I believe we are stuck with the ancient version for license (and
performance?) reasons.

svn-id: r21267
2006-03-13 23:53:15 +00:00