Commit Graph

533 Commits

Author SHA1 Message Date
Oystein Eftevaag
05ee5cf2bd Extends seq_drinkPotionAnim() so that the color of the flask Brandon
drinks will be correct. Also fixes a bug where an animation
(Brandon ringing the bells) would play too quickly.

svn-id: r21354
2006-03-18 04:41:34 +00:00
Paul Gilbert
dcf029e947 Further work on disassembling player tick/movement handler
svn-id: r21349
2006-03-17 21:59:29 +00:00
Johannes Schickel
0ebebb1176 Fixes animations when brandon turns inivisible/visible.
svn-id: r21348
2006-03-17 20:49:12 +00:00
Johannes Schickel
41b4a6aa7c Fixes bug #1401337 ("KYRA: Platform with pegasi graphics glitch")
svn-id: r21347
2006-03-17 19:39:46 +00:00
Johannes Schickel
bbd1725598 - Fixes bug #1401432 ("KYRA: Brandon graphics glitch when exiting castle catacombs")
- Fixes some sprite redraw bugs introduced with my last commits
- Fixes wsa drawing bug in the cave too

svn-id: r21346
2006-03-17 14:19:18 +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
Travis Howell
9ecd855c2b Fix endian issue in akos costume code
svn-id: r21343
2006-03-17 01:55:43 +00:00
Travis Howell
a908cbed32 Fix endian issues in akos costume code
svn-id: r21342
2006-03-17 01:46:36 +00:00
Travis Howell
87d74563dd Add another German version of puttzoo demo
svn-id: r21341
2006-03-17 00:30:58 +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
Gregory Montoir
61a5fb7064 - added defines to handle the different mouse cursors
- revised the way NUM_MAX_PARTDATA and NUM_MAX_ANIMDATA are used
- renamed some variables
- constify'ed function arguments
- minor cleanup

svn-id: r21338
2006-03-16 20:29:07 +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
Johannes Schickel
fa38b770af Oops. removes some unneeded shifts and fixes now the feather bug.
svn-id: r21334
2006-03-16 17:37:34 +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
Johannes Schickel
f1c9cd5726 - Fixes some gfx glitches (the falling feather and the falling leaf now have correct restored background)
- Fixes brandon width value after loading (removes gfx glitch while talking with the tree)

svn-id: r21332
2006-03-16 16:35:46 +00:00
Travis Howell
79b5c11ee2 Minor cleanup
svn-id: r21331
2006-03-16 12:12:05 +00:00
Travis Howell
60b66f31df Update comment, to make sense
svn-id: r21330
2006-03-16 12:08:25 +00:00
Travis Howell
1880843744 Add comment about future saveLoad changes C64 maniac
svn-id: r21329
2006-03-16 12:04:52 +00:00
Travis Howell
479a1b24c3 Cleanup
svn-id: r21328
2006-03-16 10:30:59 +00:00
Travis Howell
008b681dac Cleanup
svn-id: r21327
2006-03-16 07:08:05 +00:00
Travis Howell
ec05842572 Remove duplicate fcs field
svn-id: r21326
2006-03-16 05:41:39 +00:00
Travis Howell
5b3b3b21e3 Rename get draw buffer functions
svn-id: r21325
2006-03-16 04:10:34 +00:00
Travis Howell
0843260c29 Rename flags used for drawing images
svn-id: r21324
2006-03-16 03:48:42 +00:00
Travis Howell
c821b20400 Remove unused unlock draw surface functions
svn-id: r21323
2006-03-16 03:19:55 +00:00
Travis Howell
0ce2110306 Add scaling code stub for FF
svn-id: r21322
2006-03-16 03:15:05 +00:00
Gregory Montoir
8f38cb6ff3 added mouse cursors
svn-id: r21321
2006-03-15 22:34:46 +00:00
Johannes Schickel
b46236ed71 - removes a wrong space in debugC calls in screen.cpp
- implements cmd_brandonToStoneSequence and cmd_pauseMusicSeconds

svn-id: r21320
2006-03-15 21:59:07 +00:00
Torbjörn Andersson
056fbe4855 Fixed typo in debug message.
svn-id: r21317
2006-03-15 15:46:25 +00:00
Torbjörn Andersson
dc2143e6cf This is a bit of a hack: Before showing the mouse cursor, take care of any
pending events so that the it won't have to do a little dance, catching up,
every time you enter a room.

svn-id: r21316
2006-03-15 15:37:42 +00:00
Torbjörn Andersson
5d0ac7d57c On second thought, that comment is probably not necessary.
svn-id: r21315
2006-03-15 15:35:52 +00:00
Torbjörn Andersson
286434c88d Added mouse wheel scrolling to save/restore dialogs.
svn-id: r21314
2006-03-15 13:32:35 +00:00
Torbjörn Andersson
c473ded022 Revert previous change. I'm told some backends don't draw the mouse cursor
automatically, for some reason.

svn-id: r21312
2006-03-15 12:44:41 +00:00
Torbjörn Andersson
52b3c957fe The backend handled cursor drawing -- no need to update the screen manually.
svn-id: r21311
2006-03-15 12:32:07 +00:00
Paul Gilbert
15d4593412 In progress work on disassembling player tick/actions handler method
svn-id: r21310
2006-03-15 11:37:12 +00:00
Travis Howell
34b89a3258 Correct VAR_OVERRIDE settings in override opcodes
svn-id: r21307
2006-03-15 06:29:28 +00:00
Travis Howell
cc8796248d Minor cleanup
svn-id: r21306
2006-03-15 05:59:30 +00:00
Torbjörn Andersson
1f603fdd98 Cleanup.
svn-id: r21304
2006-03-14 23:39:42 +00:00
Torbjörn Andersson
408b9a41ee Gave the loadBitmap debug message its old debug level back. (I.e. made it less
noisy.)

svn-id: r21303
2006-03-14 23:29:29 +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
Johannes Schickel
c12a5a35be - Deletes wrong spaces in debugC calls in resource.cpp
- Adds support for amiga .pak files (and a filelist)

svn-id: r21299
2006-03-14 19:48:08 +00:00
Torbjörn Andersson
ee6f7626bf Fix typo in comment.
svn-id: r21298
2006-03-14 19:08:09 +00:00
Max Horn
e6f329e3fc To the best of my knowledge, it's really 'C64' and not 'C-64'
svn-id: r21296
2006-03-14 15:36:04 +00:00
Max Horn
f319865837 Merged two consecutive 'if's with identical condition
svn-id: r21295
2006-03-14 15:25:29 +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
a68e8c2db9 Fixes wrong sound then showing the death screen.
svn-id: r21290
2006-03-14 14:25:13 +00:00
Travis Howell
68bc8ea52e Update comment about use of procC64 by C-64 version
svn-id: r21289
2006-03-14 14:10:33 +00:00
Max Horn
0cc41c7cbb Renamed & documented the LIGHTMODE flags
svn-id: r21288
2006-03-14 14:06:44 +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
Max Horn
ee087df293 Enhance the new getCurrentLights to work for V6+ games, too, making it possible to remove several special cases throughout the code
svn-id: r21286
2006-03-14 13:36:13 +00:00
Max Horn
ab1694aef9 Compute the full game title when detecting games & creating engine instances, and also use that for savegames (all for debugging)
svn-id: r21285
2006-03-14 13:28:28 +00:00
Max Horn
d68b64184e Add a virtual destructor to class SoundDriver of the CINE engine (fixes a warning)
svn-id: r21284
2006-03-14 13:26:06 +00:00
Travis Howell
4f10a71b98 An actor is completely reset by showActor() in SCUMM1-2 games. Fixes bug #902391
svn-id: r21283
2006-03-14 13:16:11 +00:00
Travis Howell
4b1e03f37a Remove unused var, to prevent compiler warning
svn-id: r21281
2006-03-14 12:19:17 +00:00
Travis Howell
c822f49676 Remove unused vars, to prevent compiler warnings
svn-id: r21279
2006-03-14 12:13:27 +00:00
Travis Howell
3d0e69a495 Adjust one last spot, for previous VAR_CURRENT_LIGHTS changes
svn-id: r21278
2006-03-14 12:11:16 +00:00
Travis Howell
be7a28f65e Avoid all scumm var conflicts in C64 maniac
svn-id: r21277
2006-03-14 12:06:37 +00:00
Travis Howell
806ee522d1 Move unused scumm vars in C64 maniac to safe position, to prevent conflicts for now
svn-id: r21276
2006-03-14 10:35:01 +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
Travis Howell
f6d69c6d45 Camera scrolling only effects subtitles in SCUMM4-6 games. Fixes bug #1329482.
svn-id: r21274
2006-03-14 09:33:37 +00:00
Travis Howell
c196543572 Fix regression in C64 zak, script 5 was not been run when room changed
svn-id: r21273
2006-03-14 07:45:46 +00:00
Eugene Sandulenko
a483083f35 Tweaked a little scumm main dialog and scumm save/load dialog. Still plenty
to do.

svn-id: r21271
2006-03-14 03:52:29 +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
Torbjörn Andersson
221263e275 Cleaned up the comments in unkOutput2(), and added a big note about the bug
where low-frequent noises are playing at the beginning of some new sounds.

svn-id: r21265
2006-03-13 23:05:11 +00:00
Lars Persson
d66d7ff76b Changed type for samplesleft in order for MIN macro to work properly on all platforms
svn-id: r21264
2006-03-13 21:38:20 +00:00
Johannes Schickel
ccd0a09f7a - Fixed regression when moving waitTicks to delay (removes wrongly drawn shapes and wrongly call of the kyragame fading in the outro)
- Removes a new line from a warning in seqplayer.cpp

svn-id: r21263
2006-03-13 17:19:19 +00:00
Torbjörn Andersson
9399a2b58e Things continue to fall into place. In other words, more renamings:
unk3  -> spacing1
unk7  -> spacing2
unk12 -> fractionalSpacing

updateCallback4()  -> update_setNoteSpacing()
updateCallback9()  -> update_stopChannel()
updateCallback15() -> update_stopOtherChannel()
updateCallback17() -> update_setupInstrument()
updateCallback28() -> update_setFractionalNoteSpacing()
updateCallback43() -> update_nop1()
updateCallback47() -> update_nop2()

svn-id: r21261
2006-03-13 13:56:19 +00:00
Travis Howell
71a7754a37 Fix a valgrind warning
svn-id: r21260
2006-03-13 11:58:01 +00:00
Torbjörn Andersson
480aee83aa I was going to hold off on this until the "Pool of Sorrow" music had been fixed
but it seems that it drifts out of sync after a few repeats even with the
original interpreter. It's a feature!

This cleanup clears up some of the more confusing break/continues in the
callbackProcess() function, and gets rid of _continueFlag.

svn-id: r21259
2006-03-13 11:57:09 +00:00
Travis Howell
b8cf88622b Fix a few valgrind warnings
svn-id: r21258
2006-03-13 11:52:16 +00:00
Paul Gilbert
c5d90e026f Fix to remove warning on validating frame offsets in animation decoder
svn-id: r21257
2006-03-13 11:40:40 +00:00
Paul Gilbert
c44069fdfc Added further disassembly of animation decoder routine
svn-id: r21256
2006-03-13 11:33:17 +00:00
Paul Gilbert
3c303c0dfd Add proper handling for animations with frame offset tables during decoding
svn-id: r21255
2006-03-13 11:20:58 +00:00
Paul Gilbert
92eb7b7aa5 Changed temp variable from byte to word to fix decoding of some animation resources
svn-id: r21254
2006-03-13 11:18:18 +00:00
Travis Howell
c6082389a2 Confirmed it is safe to remove workaround for Macintosh HE99 version of water.
svn-id: r21253
2006-03-13 10:00:10 +00:00
Travis Howell
8f8d7b6e07 Add opcode difference in setObjectName opcode for C64 maniac
svn-id: r21251
2006-03-13 07:46:54 +00:00
Travis Howell
06dddefe90 Add masking support for C64 maniac, not perfect
svn-id: r21250
2006-03-13 06:06:51 +00:00
Travis Howell
833e343059 Fix object glitches in C64 maniac
svn-id: r21249
2006-03-13 03:52:26 +00:00
Travis Howell
d0f834ee40 Update and restore old debug code for masking
svn-id: r21248
2006-03-13 02:22:22 +00:00
Torbjörn Andersson
1d439592dd Until now, we have confusingly used the terms "state" or "table" where we
really mean "channel". Fixed that:

OutputState     -> Channel
_curTable       -> _curChannel
_outputTables[] -> _channels[]

The biggest change was modifying all the "state" and "table" local variables
and function parameters.

Ahd, at no extra charge:

_outputTable[]  -> _regOffset[]

svn-id: r21247
2006-03-12 23:21:01 +00:00
Torbjörn Andersson
2ab85f9ea6 Renamed callback1 to primaryEffect and callback2 to secondaryEffect.
svn-id: r21246
2006-03-12 22:47:51 +00:00
Torbjörn Andersson
9f941a18cf Cleaned up comment and did some more renaming:
unk4 -> position   (measured on a very short ruler :-)
unk5 -> duration

svn-id: r21245
2006-03-12 22:33:24 +00:00
Johannes Schickel
e19d079d2b - Renames some functions:
updateCallback31 -> update_setChannelTempo
updateCallback42 -> update_resetToGlobalTempo
updateCallback55 -> update_setTempoReset
- Renames some vars:
unk1 -> tempo
unk6 -> tempoReset
- Fixes tempo bugs

svn-id: r21244
2006-03-12 21:54:06 +00:00
Torbjörn Andersson
165265166b Updated for Jamieson630's latest iMUSE changes.
svn-id: r21242
2006-03-12 18:46:33 +00:00
Jamieson Christian
4d5a3e4c45 IMuse SysEx processing now handled by client-specified callbacks. This removes all game-specific references from the Player class. Bloodshed Dev-C++ project file updated.
svn-id: r21241
2006-03-12 18:06:22 +00:00
Johannes Schickel
20095d8e93 - Changes usage of regBx to regAx in primaryEffect2 (seems to be a bug introduced when renaming).
- Changes unk41 and unk32 to signed.
- Fixes wrong sound when dropping items (that was also a little bug in primaryEffect2)

svn-id: r21240
2006-03-12 17:58:04 +00:00
Torbjörn Andersson
63245b8eba Compensate for rounding errors in _samplesPerCallback by having readBuffer()
generate "leap samples". I doubt this will make any noticeable difference, but
at least now we can probably rule out timer inaccuracies from the list of
possible suspects for the remaining bugs.

Also removed unnecessary mutex locking/unlocking from readBuffer(), spotted by
LordHoto.

svn-id: r21239
2006-03-12 17:50:36 +00:00
Johannes Schickel
9d3136fb71 Corrects former commit which deleted sound file loading after the scene with malcolm and kallak.
Also corrects callback50() which seem to improve the sound a bit in the kallak writing scene.

svn-id: r21238
2006-03-12 17:08:46 +00:00
Torbjörn Andersson
72d2ef7221 After several days, telling LordHoto over and over that "no, I don't think the
timer inaccuracies can cause that kind of problems, or we'd have noticed it in
the other game engines as well", guess what? The other game engines do not
necessary use a timer for their Adlib music. So now Kyra doesn't either.

Fortunately for my dignity, the music is still a bit uneven at times, but the
situation does seem to have improved a bit, and the sound effects sound better
to me now.

svn-id: r21237
2006-03-12 17:05:59 +00:00
Johannes Schickel
cb085df0f5 Fixes non looping tracks and a fading bug, which silenced the music, with mt-32.
svn-id: r21236
2006-03-12 15:38:59 +00:00
Johannes Schickel
cd28f28d32 Music in the last two intro scenes plays now again with adlib.
Cleaned up the sound code a bit (removed some unneeded functions).

svn-id: r21234
2006-03-12 14:22:27 +00:00
Torbjörn Andersson
c8347b23b1 Added debug message for the standard "note on" opcodes as well.
svn-id: r21233
2006-03-12 12:55:16 +00:00
Torbjörn Andersson
84af303787 And now, for a change, some more renamings:
update1()          -> setupDuration()
updateAndOutput1() -> setupNote()
setInstrument()    -> setupInstrument()  (just for the symmetry)
updateAndOutput3() -> noteOn()

That made the following two renamings seem natural:

updateCallback10() -> update_playRest()
updateCallback27() -> update_playNote()

I decided to number the secondary effects, even though there's only one:

update_setupSecondaryEffect()  -> update_setupSecondaryEffect1()
update_removeSecondaryEffect() -> update_removeSecondaryEffect1()

And finally, I renamed the effects callbacks:

stateCallback1_1() -> primaryEffect1()
stateCallback1_2() -> primaryEffect2()
stateCallback2_1() -> secondaryEffect1()

svn-id: r21232
2006-03-12 12:40:14 +00:00
Travis Howell
230a68755e Unfortunately the workaround for Macintosh version of water is still required.
svn-id: r21231
2006-03-12 10:56:14 +00:00
Torbjörn Andersson
d57e2e88c0 Added a block of comments about command parsing and timing. Perhaps it will be
of use in tracking down the tempo bugs.

svn-id: r21230
2006-03-12 10:47:20 +00:00
Travis Howell
fd389260f8 Adjust basename array setting in HE99+ games, for filename substitution
svn-id: r21229
2006-03-12 10:44:42 +00:00
Travis Howell
e94aa88ece Adjust version setting for Macintosh versions of HE80+ games, which is checked by water
svn-id: r21228
2006-03-12 09:51:24 +00:00
Travis Howell
66730f3b6b Use script support for Macintosh versions of HE80+ games
svn-id: r21227
2006-03-12 09:27:56 +00:00
Travis Howell
8602fe7432 Revert mistaken commit of local debug code
svn-id: r21222
2006-03-12 04:19:03 +00:00
Travis Howell
3e72b26adc Revert mistaken commit of local debug code
svn-id: r21220
2006-03-12 01:06:23 +00:00
Travis Howell
f9797f3ac3 Correct mistake in md5 tables for Simon the Sorcerer 2 (DOS Floppy)
svn-id: r21219
2006-03-12 00:53:30 +00:00
Torbjörn Andersson
5bd5cef6cf Some more renaming:
updateCallback18() -> update_setupPrimaryEffect1()
updateCallback19() -> update_removePrimaryEffect1()
updateCallback21() -> update_setupPrimaryEffect2()
updateCallback40() -> update_removePrimaryEffect2()
updateCallback14() -> update_setupSecondaryEffect()
updateCallback30() -> update_removeSecondaryEffect()
updateCallback37() -> update_changeExtraLevel1()
updateCallback34() -> update_changeExtraLevel2()

svn-id: r21217
2006-03-11 17:25:12 +00:00
Travis Howell
beb0c9e297 Fix endian issue in getArrayDim()
svn-id: r21216
2006-03-11 09:43:00 +00:00
Torbjörn Andersson
985ab14c79 Removed inclusion of non-existing imuse_sysex.h to make ScummVM compile again.
svn-id: r21214
2006-03-11 07:37:09 +00:00
Jamieson Christian
2708fe34f3 Another ScummEngine reference in IMuse bites the dust.
svn-id: r21213
2006-03-11 01:06:30 +00:00
Travis Howell
d5066f3741 Remove unused case in o5_actorOps, which is never triggered by any game scripts
svn-id: r21212
2006-03-10 23:15:05 +00:00
Travis Howell
f52e1709bf o6_setObjectName is never used by HE72+ games
svn-id: r21211
2006-03-10 23:09:27 +00:00
Eugene Sandulenko
3521d35085 Add Russian puttrace and pajama3
svn-id: r21209
2006-03-10 19:35:35 +00:00
Torbjörn Andersson
47589ec06f More comments, and some very minor cleanup.
svn-id: r21208
2006-03-10 15:30:22 +00:00
Torbjörn Andersson
b07e6f6eed Added comment detailing what I believe I know about the remaining "unk"
variables in OutputState.

svn-id: r21207
2006-03-10 14:53:48 +00:00
Torbjörn Andersson
f670d2b2b7 Further guesswork: 'unk2' appears to be the priority of a sound, since the
callbackOutput() and updateCallback3() functions won't change the channel data
pointer unless the new sound has a higher unk2 and the current one.

Since it's set to 0 when the data pointer is nulled, I've changed the priority
to be unsigned.

The updateCallback22() function is now update_setPriority().

svn-id: r21206
2006-03-10 14:22:27 +00:00
Torbjörn Andersson
b294175eb6 Fleshed out some guesswork comments.
svn-id: r21205
2006-03-10 13:29:34 +00:00
Torbjörn Andersson
6f2f70d071 Renamed _unkOutputByte1 _curRegOffset. It doesn't always correspond to the
_curTable channel, but it probably does so whenever both of them are used
together.

svn-id: r21204
2006-03-10 11:26:32 +00:00
Torbjörn Andersson
a4ba0066bc Added guesswork comments for stateCallback2_1() and its related functions and
variables, and cleaned it up slightly. (Some of its variables are now signed.)

svn-id: r21203
2006-03-10 11:18:40 +00:00
Torbjörn Andersson
ac997a2493 Added guesswork comments for stateCallback1_1() and its related functions and
variables.

svn-id: r21202
2006-03-10 10:55:36 +00:00
Torbjörn Andersson
0b7f7f66ea Fixed some obvious errors in the comments I added before.
svn-id: r21201
2006-03-10 10:30:31 +00:00
Torbjörn Andersson
69b18f1744 Added some guesswork comments about stateCallback1_2() and related functions
and variables.

svn-id: r21200
2006-03-10 10:18:05 +00:00
Torbjörn Andersson
95196056bd The calculateLowByte1() and 2() functions are used for calculating the "total
level", which I believe is the individual channel volume. (The functions also
return the "scaling level" bits, but they are preserved, not calculated.) I
have renamed these functions calculateOpLevel1() and 2().

The unk25 and unk26 variables have been renamed opLevel1 and opLevel2. These
are called oplvl_1 and oplvl_2 in our MidiDriver_ADLIB class.

The unk26, unk27 and unk28 variables are potentially added to both operator
levels, and have been renamed opExtraLevel1, opExtralevel2 and opExtraLevel3.

The updateCallback25() function has been remamed update_setExtraLevel1().
The updateCallback33() function has been renamed update_setExtraLevel2().
The updateCallback32() function has been renamed update_setExtraLevel3().

Note that these callbacks aren't quite as similar as their names would seem to
indicate: They differ in whether or not the volume is updated and/or how the
parameters are passed.

svn-id: r21199
2006-03-10 09:24:50 +00:00
Torbjörn Andersson
8a9286ce53 Renamed "algorithm" "twoChan" to be more consistent with our MidiDriver_ADLIB
class, where the corresponding variable is called _twochan.

svn-id: r21198
2006-03-10 08:55:19 +00:00
Torbjörn Andersson
37b5e3bcca Since updateAndOutput2() is the only function that sets up wave forms and
stuff, it pretty much has to be our "set instrument" function. Also, while I'm
not entirely sure of the implications, "unk23" is the Algorithm bit for the
Feedback / Algorithm register, so I've renamed it "algorithm".

svn-id: r21197
2006-03-10 08:19:53 +00:00
Torbjörn Andersson
19aba0e88f Some more/updated comments.
svn-id: r21196
2006-03-10 07:56:22 +00:00
Travis Howell
259e3cf301 Adjust talk sound check in CHARSET_1(), since processSfxQueues() doesn't exist in HE games. Fixes glitch when time machine is used in putttime.
svn-id: r21195
2006-03-10 06:05:49 +00:00
Travis Howell
de1cd95927 Revert that mistaken change to English verb table for C64 maniac
svn-id: r21191
2006-03-10 00:53:09 +00:00
Travis Howell
e0a4add194 Update German verbs for C64 maniac, to match original
svn-id: r21190
2006-03-10 00:39:37 +00:00
Gregory Montoir
8476b7a94f minor cleanup.
svn-id: r21189
2006-03-09 23:02:29 +00:00
Gregory Montoir
2cf5859404 oo'ified sound code and added basic support for OS adlib music.
svn-id: r21186
2006-03-09 22:37:19 +00:00
Johannes Schickel
f0106cd59c - Removes deleted waitTicks prototype in KyraEngine
- Adds sound fading support to the adlib player
- Adds support for stopping running tracks

- Changes baseFreq type back to uint8
- corrects octave handling in updateAndOutput1
(Thanks to eriktorbjorn for doing that)

svn-id: r21185
2006-03-09 20:50:19 +00:00
Torbjörn Andersson
a5e0c392ba As LordHoto pointed out to me, updateCallback41() was slightly different after
all: it adjusts the frequency even when state.unk16 is zero. Fixed that, and
added some comments to hopefully explain the differences between the cleaned up
code and the original disassembly.

svn-id: r21184
2006-03-09 18:42:05 +00:00
Torbjörn Andersson
c571026a20 More cleanups and renamings:
* Rewrote updateCallback41() in terms of updateAndOutput1(), since they were
  almost identical to begin with.
* Rewrote updateAndOutput1() for better readability.
* Made unk10 signed, and renamed it baseOctave.
* Made unk14 signed, and renamed it baseNote.
* Made unk15 signed, and renamed it baseFreq.
* Renamed unk17 regAx. It appears to be a cache for that register.
* Renamed unkOutputValue1 regBx. It appears to be a cache for that register.
* Renamed updateCallback8() update_setBaseOctave().
* Renamed updateCallback13() update_setBaseNote().
* Renamed updateCallback20() update_setBaseFreq().

Which still leaves the mystery of unk16 and _unkTables[]. Perhaps *this* is the
pitch bend?

svn-id: r21183
2006-03-09 17:04:00 +00:00
Max Horn
6db0289f30 Moved SAGA plugin interface code from saga.cpp to game.cpp
svn-id: r21181
2006-03-09 14:33:07 +00:00
Max Horn
6b988a51bd Moved SIMON plugin interface code from simon.cpp to game.cpp
svn-id: r21180
2006-03-09 14:30:43 +00:00
Lars Persson
04151343a7 Compile fixes for VC6
svn-id: r21179
2006-03-09 13:54:36 +00:00
Max Horn
1d14d18893 Modified SIMON engine to use DetectedGame::updateDesc
svn-id: r21176
2006-03-09 13:29:45 +00:00
Max Horn
aad520026c Modified SAGA engine to use DetectedGame::updateDesc (note: there is a new TODO in the saveload code now)
svn-id: r21171
2006-03-09 13:22:30 +00:00
Max Horn
783264fe28 Made sure the generic ITE description matches the 'special' ones in game.cpp
svn-id: r21169
2006-03-09 13:03:23 +00:00
Max Horn
de295c562d Replaced GF_ENGLISH in LureGameSettings by a proper Common::Language member variable; added (commented out) entries for the german and french lure
svn-id: r21168
2006-03-09 12:59:46 +00:00
Max Horn
6b19677e1d Make use of DetectedGame::updateDesc in the kyra & lure engines
svn-id: r21167
2006-03-09 12:52:54 +00:00
Max Horn
46ee5c8f26 Added new method DetectedGame::updateDesc, to ease generation of uniform description strings
svn-id: r21166
2006-03-09 12:52:10 +00:00
Torbjörn Andersson
671450fcb8 Set down in comments what I know about _outputTable[], and what I suspect about
_unkTable[]. Investigating the latter further might help unravelling several of
the "unk" variables. (Right now, I'm suspecting that unk15 is the pitch bend.)

svn-id: r21164
2006-03-09 12:36:11 +00:00
Torbjörn Andersson
9d19f7d32e Corrected a few comments where I had mistaken the note on/off bit for one of
the octave bits.

The unkOuput1() function always turns off the note, so I've renamed it
noteOff(). I've added some comments to unkOuput2() as well, but I'm still not
quite sure what its purpose is. It seems unlikely that it's simply a "note on"
function, given the many things it will clear for the channel. It does end by
turning the note on, though. Strange.

svn-id: r21162
2006-03-09 12:04:41 +00:00
Eugene Sandulenko
8a5f44d797 Converted last dialogs to new scheme. Now it seems to be everything. Please,
test throghoutly.

svn-id: r21157
2006-03-09 05:18:00 +00:00
Jamieson Christian
effed85448 Implemented SysEx command 1 for non-S&M SCUMM games, per the latest comment on Bug 1088045.
svn-id: r21156
2006-03-09 03:29:12 +00:00
Max Horn
ea26ccea4a Add the known 'extra' info to the description string; and removed the old hack which added this information during launch (which really was a bad hack)
svn-id: r21155
2006-03-09 03:21:23 +00:00
Max Horn
e53e0e5885 - Removed the code from the launcher that adds language/platform to the
game descriptions. Doing this now is the responsibility of the engines.
- Adapted the SCUMM engine to add lang/platform to the desc string if 
  necessary. Other engines still have to be adapted (but many do not seem to
  need this at all, since they either are lang/platform agnostic, or already
  include this information in their MD5 tables).

svn-id: r21154
2006-03-09 03:09:21 +00:00
Max Horn
12755197f2 Tiny code simplification
svn-id: r21152
2006-03-09 03:01:28 +00:00
Eugene Sandulenko
51495fb199 Moved keys mapping dialog to new scheme. Made it generic. Fixed several
compilation errors associated with it.

svn-id: r21151
2006-03-09 02:54:02 +00:00
Max Horn
86565fcca5 - Renamed GameSettings to PlainGameDescriptor
- Added new GameDescriptor struct (similar to PlainGameDescriptor but with
  Common::String members instead of const char * ones)
- Changed DetectedGame to subclass GameDescriptor
- Removed toGameSettings() in favor of new (template) constructors in
  DetectedGame and GameDescriptor
- Fixed a bug in the obsolete gameid handling in the SCUMM & SIMON engines

svn-id: r21150
2006-03-09 02:52:51 +00:00