diff options
author | Travis Howell | 2009-07-18 00:53:31 +0000 |
---|---|---|
committer | Travis Howell | 2009-07-18 00:53:31 +0000 |
commit | aa98f944fe87e21870f375581541926913a4ac82 (patch) | |
tree | b9b8d19a94f4683ad699c6b590e9e8583241c014 /engines/kyra | |
parent | cdf751accda346f5d96e3fdfa2fd4a1b92ed4d19 (diff) | |
parent | 025702ba4084dcad8dbe65c07a718f086320c19c (diff) | |
download | scummvm-rg350-aa98f944fe87e21870f375581541926913a4ac82.tar.gz scummvm-rg350-aa98f944fe87e21870f375581541926913a4ac82.tar.bz2 scummvm-rg350-aa98f944fe87e21870f375581541926913a4ac82.zip |
Merged revisions 42463,42468-42484,42486-42488,42490-42495,42498-42507,42510-42513,42516-42518,42521-42525,42527-42531,42533,42536-42540,42543,42545,42548,42551-42552,42558-42561,42563-42565,42570,42572 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r42463 | drmccoy | 2009-07-14 09:42:37 +1000 (Tue, 14 Jul 2009) | 1 line
Allow resource loading from EXT even if the TOT has none again
........
r42468 | fingolfin | 2009-07-14 18:36:06 +1000 (Tue, 14 Jul 2009) | 1 line
TINSEL: Don't use ioFailed to check if a file was opened succesfuly
........
r42469 | drmccoy | 2009-07-14 18:57:55 +1000 (Tue, 14 Jul 2009) | 1 line
Removing ioFailed() usage and fixing a leak in case of error
........
r42470 | joostp | 2009-07-14 19:44:56 +1000 (Tue, 14 Jul 2009) | 2 lines
commit peres' patch for #2813472: BASS: "showgrid" enabled triggers an assert
........
r42471 | dreammaster | 2009-07-14 20:26:56 +1000 (Tue, 14 Jul 2009) | 1 line
Bugfix for player being able to walk through some objects against room walls
........
r42472 | dreammaster | 2009-07-14 20:55:51 +1000 (Tue, 14 Jul 2009) | 1 line
Bugfix to cursor updates - it previously required that both X and Y positions had changed before a cursor change could occur
........
r42473 | joostp | 2009-07-14 21:15:21 +1000 (Tue, 14 Jul 2009) | 2 lines
add workaround for #2687172: BASS: Occasional loss of speech
........
r42474 | Kirben | 2009-07-14 22:34:42 +1000 (Tue, 14 Jul 2009) | 1 line
Add workaround for bug #1538873 - SIMON1 (French): Text wrongly displayed.
........
r42475 | vinterstum | 2009-07-14 22:55:54 +1000 (Tue, 14 Jul 2009) | 1 line
Updated xcode project
........
r42476 | strangerke | 2009-07-14 23:25:38 +1000 (Tue, 14 Jul 2009) | 1 line
Add detection for Playtoons CK 3 (FR)
........
r42477 | buddha_ | 2009-07-14 23:48:31 +1000 (Tue, 14 Jul 2009) | 1 line
Fix some typos and grammar in sword1's Sound::checkSpeechFileEndianness-function's comments.
........
r42478 | Kirben | 2009-07-14 23:50:17 +1000 (Tue, 14 Jul 2009) | 1 line
Change key combination to dump all script, due to conflict.
........
r42479 | vinterstum | 2009-07-14 23:52:11 +1000 (Tue, 14 Jul 2009) | 1 line
Split the iPhone OSystem class up into several files
........
r42480 | Kirben | 2009-07-14 23:53:54 +1000 (Tue, 14 Jul 2009) | 1 line
Update workaround for bug #1538873, which effects the Polish version of Simon the Sorcerer 2 too.
........
r42481 | Kirben | 2009-07-14 23:55:10 +1000 (Tue, 14 Jul 2009) | 1 line
Remove last ioFailed() usage in AGOS game engine.
........
r42482 | buddha_ | 2009-07-15 01:02:17 +1000 (Wed, 15 Jul 2009) | 1 line
Partially fix automatic restarting of AGI games (Addresses bug #2798797 ('AGI: larry 1 doesn't restart after dying') but doesn't fully fix it. There seems to be more to the problem still. Automatic restarting after dying of an STD doesn't take away the STD-condition and Larry continues to die in a loop).
........
r42483 | strangerke | 2009-07-15 01:48:05 +1000 (Wed, 15 Jul 2009) | 1 line
Add detection for Playtoons 4 EN_ANY as supplied by goodoldgeorg in bug #2820006
........
r42484 | eriktorbjorn | 2009-07-15 02:45:18 +1000 (Wed, 15 Jul 2009) | 3 lines
Got rid of ioFailed(). I haven't actually tested it, but we don't use the MPEG
decoder at the moment, and it was only used in the BACKEND_8BIT case anyway.
........
r42486 | lordhoto | 2009-07-15 04:14:20 +1000 (Wed, 15 Jul 2009) | 1 line
Got rid of ioFailed in font code, also added another check for err() when loading bdf fonts from text files.
........
r42487 | lordhoto | 2009-07-15 04:15:07 +1000 (Wed, 15 Jul 2009) | 1 line
Fix possible memory leak.
........
r42488 | fingolfin | 2009-07-15 04:24:20 +1000 (Wed, 15 Jul 2009) | 1 line
Got rid of some more ioFailed uses (also fixed a potential leak in graphics/font.cpp, and handle eos correctly in the FLAC code)
........
r42490 | lordhoto | 2009-07-15 05:32:25 +1000 (Wed, 15 Jul 2009) | 2 lines
Replaced char usage by int8, since char is unsigned on Linux/PPC by default.
........
r42491 | fingolfin | 2009-07-15 07:46:23 +1000 (Wed, 15 Jul 2009) | 1 line
AGOS: Cleanup PN code a bit, trying to make sense out of it
........
r42492 | fingolfin | 2009-07-15 07:50:22 +1000 (Wed, 15 Jul 2009) | 1 line
AGOS: Fixed potential OOBA crash in AGOSEngine_PN::opn_opcode26
........
r42493 | lordhoto | 2009-07-15 08:47:33 +1000 (Wed, 15 Jul 2009) | 1 line
Fix graphics glitch in LoL PC98 intro.
........
r42494 | fingolfin | 2009-07-15 09:03:25 +1000 (Wed, 15 Jul 2009) | 1 line
AGOS: Some more cleanup and added some comments to the PN code
........
r42495 | buddha_ | 2009-07-15 09:03:40 +1000 (Wed, 15 Jul 2009) | 1 line
Remove ioFailed() usage from AGI engine.
........
r42498 | Kirben | 2009-07-15 12:06:26 +1000 (Wed, 15 Jul 2009) | 1 line
Fix bug #2821215 - DIG: Skipping planetarium animation disables F5 menu.
........
r42499 | Kirben | 2009-07-15 15:00:59 +1000 (Wed, 15 Jul 2009) | 1 line
Hack is no longer required, due to revision 42498.
........
r42500 | dreammaster | 2009-07-15 18:55:12 +1000 (Wed, 15 Jul 2009) | 1 line
Created a system for inserting arbitrary code fragments into game scripts, and added an initial fragment to fix the bug of being stuck in the past in the DW1 SCN version
........
r42501 | fingolfin | 2009-07-15 20:04:50 +1000 (Wed, 15 Jul 2009) | 1 line
Got rid of two more ioFailed uses
........
r42502 | buddha_ | 2009-07-15 23:04:17 +1000 (Wed, 15 Jul 2009) | 1 line
Remove ioFailed() usage from Cine engine.
........
r42503 | buddha_ | 2009-07-15 23:10:29 +1000 (Wed, 15 Jul 2009) | 1 line
Fix some typos in TransactionError-enumeration's comments.
........
r42504 | Kirben | 2009-07-15 23:19:49 +1000 (Wed, 15 Jul 2009) | 1 line
Fix recent PN regression in vc32_saveScreen().
........
r42505 | Kirben | 2009-07-15 23:53:18 +1000 (Wed, 15 Jul 2009) | 1 line
Add Discworld 1/2.
........
r42506 | Kirben | 2009-07-15 23:58:23 +1000 (Wed, 15 Jul 2009) | 1 line
Add Cruise for a Corpse and games from MADE engine.
........
r42507 | lordhoto | 2009-07-16 01:51:47 +1000 (Thu, 16 Jul 2009) | 1 line
Bugfix: Disallow GMM Save/Load while in kyragem scene.
........
r42510 | lordhoto | 2009-07-16 03:07:45 +1000 (Thu, 16 Jul 2009) | 1 line
Fix "search" filter being settings lost in launcher, when using the "Edit Game..." menu for example.
........
r42511 | lordhoto | 2009-07-16 03:23:27 +1000 (Thu, 16 Jul 2009) | 1 line
Fix bug, which caused the ListWidget to draw a widget background around the selected item, when the ListWidget had no focus.
........
r42512 | lordhoto | 2009-07-16 04:05:37 +1000 (Thu, 16 Jul 2009) | 1 line
For a smoother user experience, use different colors for inverted text of the ListWidget, depending on whether the widget has focus or not.
........
r42513 | lordhoto | 2009-07-16 04:08:54 +1000 (Thu, 16 Jul 2009) | 1 line
Fix formatting of some switch statements.
........
r42516 | robinwatts | 2009-07-16 06:51:31 +1000 (Thu, 16 Jul 2009) | 4 lines
New ARM code blending Smartphone landscale scaler for WinCE port. Seems to work
in my mockup - I don't have a smartphone resolution device to test it.
........
r42517 | lordhoto | 2009-07-16 08:19:16 +1000 (Thu, 16 Jul 2009) | 1 line
Fix ugly spacing between tabs in classic theme (as reported by sunmax on -devel).
........
r42518 | lordhoto | 2009-07-16 08:19:31 +1000 (Thu, 16 Jul 2009) | 1 line
Slightly brighten up the active tab color in the modern theme.
........
r42521 | dreammaster | 2009-07-16 12:27:26 +1000 (Thu, 16 Jul 2009) | 1 line
Game script fix for bug #2525010 - in the GRA version, the luggage blocked Rincewind's exit from the Inn, leaving him in a non-walkable area
........
r42522 | dreammaster | 2009-07-16 14:06:35 +1000 (Thu, 16 Jul 2009) | 1 line
Added no blocking fix for Present Outside Inn scene as well
........
r42523 | thebluegr | 2009-07-16 18:13:08 +1000 (Thu, 16 Jul 2009) | 1 line
Added a detection entry for Pepper's Adventures in Time, and fixed an issue with _gfxop_set_pic(), which was causing crashes in that game
........
r42524 | thebluegr | 2009-07-16 18:17:38 +1000 (Thu, 16 Jul 2009) | 1 line
Added the French version of KQ5 floppy (bug report #2812611)
........
r42525 | thebluegr | 2009-07-16 18:21:06 +1000 (Thu, 16 Jul 2009) | 1 line
Added missing information for the newly-added version of Pepper
........
r42527 | dreammaster | 2009-07-16 19:31:31 +1000 (Thu, 16 Jul 2009) | 1 line
Added game script fix for bug #2680397 - game hang when using the brochure on the Beekeeper
........
r42528 | dreammaster | 2009-07-16 19:53:19 +1000 (Thu, 16 Jul 2009) | 1 line
Prior script fix also fixes bug #2820788, with stealing wizard's mallets
........
r42529 | tanoku | 2009-07-16 21:37:36 +1000 (Thu, 16 Jul 2009) | 2 lines
Fixed issue with beveled shapes being drawn outside their shapes. Possible regressions.
........
r42530 | lordhoto | 2009-07-16 21:41:45 +1000 (Thu, 16 Jul 2009) | 1 line
Formatting.
........
r42531 | lordhoto | 2009-07-16 21:42:07 +1000 (Thu, 16 Jul 2009) | 1 line
Update classic and builtin theme after r42529.
........
r42533 | thebluegr | 2009-07-16 22:43:42 +1000 (Thu, 16 Jul 2009) | 1 line
Added a proper fix for Pepper (the previous one caused regressions in KQ6)
........
r42536 | eriktorbjorn | 2009-07-17 03:26:44 +1000 (Fri, 17 Jul 2009) | 2 lines
Fixed GCC warning.
........
r42537 | tanoku | 2009-07-17 03:29:31 +1000 (Fri, 17 Jul 2009) | 2 lines
Fixed bug 2820514 ("Help dialog causes crash")
........
r42538 | lordhoto | 2009-07-17 03:39:16 +1000 (Fri, 17 Jul 2009) | 1 line
Formatting fixes.
........
r42539 | lordhoto | 2009-07-17 03:44:05 +1000 (Fri, 17 Jul 2009) | 1 line
This commit is just for DrMcCoy. (forgot to fix two usages of whitespaces instead of tabs for indentation -.-)
........
r42540 | tanoku | 2009-07-17 03:51:12 +1000 (Fri, 17 Jul 2009) | 2 lines
Fixed bug: In-game console doesn't stay centered when switching resolutions on the fly.
........
r42543 | lordhoto | 2009-07-17 07:47:57 +1000 (Fri, 17 Jul 2009) | 1 line
Fix bug in "KyraEngine_v2::runSceneScript6", fixes text line Zanthia says, when picking up the spellbook page in the town.
........
r42545 | Kirben | 2009-07-17 10:10:10 +1000 (Fri, 17 Jul 2009) | 1 line
Fix using subtitles only setting in The Dig.
........
r42548 | Kirben | 2009-07-17 10:25:27 +1000 (Fri, 17 Jul 2009) | 1 line
Fix bug #2821986 - COMI: setting to 'subtitles only' does not disable speech.
........
r42551 | drmccoy | 2009-07-17 10:55:42 +1000 (Fri, 17 Jul 2009) | 1 line
Added some more debug warnings when resources can't be loaded
........
r42552 | drmccoy | 2009-07-17 10:55:56 +1000 (Fri, 17 Jul 2009) | 1 line
Making TOTResourceItem::size unsigned, fixing a graphics bug that crept in
........
r42558 | dreammaster | 2009-07-17 15:10:24 +1000 (Fri, 17 Jul 2009) | 1 line
Added an explicit break out of the event processing loop for mouse buttons and/or key-presses - this should allow stylus-based systems to properly process 'mouse down' events before the 'mouse up' is processed
........
r42559 | Kirben | 2009-07-17 16:26:37 +1000 (Fri, 17 Jul 2009) | 1 line
Fix input glitch regression, after pausing in PN.
........
r42560 | Kirben | 2009-07-17 19:56:03 +1000 (Fri, 17 Jul 2009) | 1 line
Fix bug #2822956 - ELVIRA2: Crash at the beginning (regression).
........
r42561 | Kirben | 2009-07-17 20:48:30 +1000 (Fri, 17 Jul 2009) | 1 line
Correct error in saveBackGround.
........
r42563 | lordhoto | 2009-07-17 23:35:56 +1000 (Fri, 17 Jul 2009) | 1 line
Replace LGPL header by GPL header.
........
r42564 | lordhoto | 2009-07-17 23:50:59 +1000 (Fri, 17 Jul 2009) | 3 lines
- Moved SoundAdlibPC definition to new header file sound_adlib.h
- Made the future versions of sound.h GPL only
- sound_adlib.h is dual licensed under GPL and LGPL (so AdPlug can still benefit from future changes)
........
r42565 | lordhoto | 2009-07-18 00:05:22 +1000 (Sat, 18 Jul 2009) | 1 line
Cleanup.
........
r42570 | drmccoy | 2009-07-18 05:22:12 +1000 (Sat, 18 Jul 2009) | 1 line
Adding a workaround for the vanishing Coh Cott bug (#1972466), which is actually an error in that video file
........
r42572 | drmccoy | 2009-07-18 06:03:41 +1000 (Sat, 18 Jul 2009) | 1 line
/Finally/ fixing the longstanding flicker bug in Woodruff. I was completely mistaken about its cause, too
........
svn-id: r42576
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra_lok.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 5 | ||||
-rw-r--r-- | engines/kyra/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/scene_v2.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/script_lol.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/script_tim.cpp | 10 | ||||
-rw-r--r-- | engines/kyra/sequences_lol.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/sound.h | 20 | ||||
-rw-r--r-- | engines/kyra/sound_adlib.h | 113 | ||||
-rw-r--r-- | engines/kyra/sound_intern.h | 65 | ||||
-rw-r--r-- | engines/kyra/sound_pcspk.cpp | 31 |
11 files changed, 148 insertions, 108 deletions
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index e5ca52abcc..a3a249de18 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -434,7 +434,7 @@ void KyraEngine_LoK::mainLoop() { // FIXME: Why is this here? _screen->showMouse(); - int inputFlag = checkInput(_buttonList, true); + int inputFlag = checkInput(_buttonList, _currentCharacter->sceneId != 210); removeInputTop(); updateMousePointer(); diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 80872877d5..258d0c402f 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -115,7 +115,6 @@ Common::Error KyraEngine_v1::init() { _sound = new SoundTownsPC98_v2(this, _mixer); } else if (midiDriver == MD_ADLIB) { _sound = new SoundAdlibPC(this, _mixer); - assert(_sound); } else { Sound::kType type; @@ -126,7 +125,6 @@ Common::Error KyraEngine_v1::init() { else type = Sound::kMidiGM; - MidiDriver *driver = 0; if (midiDriver == MD_PCSPK) { @@ -151,9 +149,10 @@ Common::Error KyraEngine_v1::init() { assert(adlib); _sound = new MixedSoundDriver(this, _mixer, soundMidiPc, adlib); - assert(_sound); } } + + assert(_sound); } if (_sound) diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index a1aaf77d51..83230d6e3b 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -126,7 +126,7 @@ KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::Seekab } } - return (in->ioFailed() ? kRSHEIoError : kRSHENoError); + return ((in->err() || in->eos()) ? kRSHEIoError : kRSHENoError); } Common::SeekableReadStream *KyraEngine_v1::openSaveForReading(const char *filename, SaveHeader &header) { diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp index 9ffaf5515d..3def71a076 100644 --- a/engines/kyra/scene_v2.cpp +++ b/engines/kyra/scene_v2.cpp @@ -73,7 +73,7 @@ void KyraEngine_v2::runSceneScript6() { _sceneScriptState.regs[0] = _mainCharacter.sceneId; _sceneScriptState.regs[1] = _mouseX; _sceneScriptState.regs[2] = _mouseY; - _sceneScriptState.regs[3] = _itemInHand; + _sceneScriptState.regs[4] = _itemInHand; _emc->start(&_sceneScriptState, 6); while (_emc->isValid(&_sceneScriptState)) diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index 611ad8f9ef..e4b77f6a07 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -2345,8 +2345,8 @@ int LoLEngine::tlol_processWsaFrame(const TIM *tim, const uint16 *param) { int h2 = (h1 * factor) / 100; anim->wsa->displayFrame(frame, 2, x1, y1, anim->wsaCopyParams & 0xF0FF, 0, 0); - _screen->wsaFrameAnimationStep(x1, y1, x2, y2, w1, h1, w2, h2, 2, _flags.isDemo ? 0 : 8, 0); - if (!_flags.isDemo) + _screen->wsaFrameAnimationStep(x1, y1, x2, y2, w1, h1, w2, h2, 2, _flags.isDemo && _flags.platform != Common::kPlatformPC98 ? 0 : 8, 0); + if (!_flags.isDemo && _flags.platform != Common::kPlatformPC98) _screen->checkedPageUpdate(8, 4); _screen->updateScreen(); diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index bc62e5bd6a..731b8d206f 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -98,7 +98,10 @@ TIMInterpreter::TIMInterpreter(KyraEngine_v1 *engine, Screen_v2 *screen_v2, OSys _textDisplayed = false; _textAreaBuffer = new uint8[320*40]; assert(_textAreaBuffer); - _drawPage2 = (_vm->gameFlags().isDemo && _vm->gameFlags().gameID == GI_LOL) ? 0 : 8; + if ((_vm->gameFlags().platform == Common::kPlatformPC98 || _vm->gameFlags().isDemo) && _vm->gameFlags().gameID == GI_LOL) + _drawPage2 = 0; + else + _drawPage2 = 8; _palDelayInc = _palDiff = _palDelayAcc = 0; _abortFlag = 0; @@ -461,7 +464,10 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char anim->wsaCopyParams = wsaFlags; const bool isLoLDemo = _vm->gameFlags().isDemo && _vm->gameFlags().gameID == GI_LOL; - _drawPage2 = (isLoLDemo || _currentTim->isLoLOutro) ? 0 : 8; + if (isLoLDemo || _vm->gameFlags().platform == Common::kPlatformPC98 || _currentTim->isLoLOutro) + _drawPage2 = 0; + else + _drawPage2 = 8; uint16 wsaOpenFlags = 0; if (isLoLDemo) { diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp index beea129f66..5826b2b09e 100644 --- a/engines/kyra/sequences_lol.cpp +++ b/engines/kyra/sequences_lol.cpp @@ -224,7 +224,7 @@ void LoLEngine::showIntro() { while (!_tim->finished() && !shouldQuit() && !skipFlag()) { updateInput(); _tim->exec(intro, false); - if (!_flags.isDemo) + if (!_flags.isDemo && _flags.platform != Common::kPlatformPC98) _screen->checkedPageUpdate(8, 4); if (_tim->_palDiff) { diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index f393ae15ba..263cd586f7 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -8,32 +8,16 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * LGPL License - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * * $URL$ * $Id$ * diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h new file mode 100644 index 0000000000..f384113af7 --- /dev/null +++ b/engines/kyra/sound_adlib.h @@ -0,0 +1,113 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * LGPL License + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * $URL$ + * $Id$ + * + */ + +#ifndef KYRA_SOUND_ADLIB_H +#define KYRA_SOUND_ADLIB_H + +#include "kyra/sound.h" + +#include "common/mutex.h" + +namespace Kyra { +class AdlibDriver; + +/** + * AdLib implementation of the sound output device. + * + * It uses a special sound file format special to + * Dune II, Kyrandia 1 and 2. While Dune II and + * Kyrandia 1 are using exact the same format, the + * one of Kyrandia 2 slightly differs. + * + * See AdlibDriver for more information. + * @see AdlibDriver + */ +class SoundAdlibPC : public Sound { +public: + SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer); + ~SoundAdlibPC(); + + kType getMusicType() const { return kAdlib; } + + bool init(); + void process(); + + void loadSoundFile(uint file); + void loadSoundFile(Common::String file); + + void playTrack(uint8 track); + void haltTrack(); + bool isPlaying(); + + void playSoundEffect(uint8 track); + + void beginFadeOut(); +private: + void internalLoadFile(Common::String file); + + void play(uint8 track); + + void unk1(); + void unk2(); + + AdlibDriver *_driver; + + bool _v2; + uint8 _trackEntries[500]; + uint8 *_soundDataPtr; + int _sfxPlayingSound; + + Common::String _soundFileLoaded; + + uint8 _sfxPriority; + uint8 _sfxFourthByteOfSong; + + int _numSoundTriggers; + const int *_soundTriggers; + + static const int _kyra1NumSoundTriggers; + static const int _kyra1SoundTriggers[]; +}; + +} // end of namespace Kyra + +#endif + diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h index 8792c14815..975672b76a 100644 --- a/engines/kyra/sound_intern.h +++ b/engines/kyra/sound_intern.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -27,6 +27,7 @@ #define KYRA_SOUND_INTERN_H #include "kyra/sound.h" +#include "kyra/sound_adlib.h" #include "common/mutex.h" @@ -39,66 +40,6 @@ class PCSpeaker; } // end of namespace Audio namespace Kyra { -class AdlibDriver; - -/** - * AdLib implementation of the sound output device. - * - * It uses a special sound file format special to - * Dune II, Kyrandia 1 and 2. While Dune II and - * Kyrandia 1 are using exact the same format, the - * one of Kyrandia 2 slightly differs. - * - * See AdlibDriver for more information. - * @see AdlibDriver - */ -class SoundAdlibPC : public Sound { -public: - SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer); - ~SoundAdlibPC(); - - kType getMusicType() const { return kAdlib; } - - bool init(); - void process(); - - void loadSoundFile(uint file); - void loadSoundFile(Common::String file); - - void playTrack(uint8 track); - void haltTrack(); - bool isPlaying(); - - void playSoundEffect(uint8 track); - - void beginFadeOut(); -private: - void internalLoadFile(Common::String file); - - void play(uint8 track); - - void unk1(); - void unk2(); - - AdlibDriver *_driver; - - bool _v2; - uint8 _trackEntries[500]; - uint8 *_soundDataPtr; - int _sfxPlayingSound; - - Common::String _soundFileLoaded; - - uint8 _sfxPriority; - uint8 _sfxFourthByteOfSong; - - int _numSoundTriggers; - const int *_soundTriggers; - - static const int _kyra1NumSoundTriggers; - static const int _kyra1SoundTriggers[]; -}; - class MidiOutput; /** diff --git a/engines/kyra/sound_pcspk.cpp b/engines/kyra/sound_pcspk.cpp index 22c24bf56c..2afed22a80 100644 --- a/engines/kyra/sound_pcspk.cpp +++ b/engines/kyra/sound_pcspk.cpp @@ -1,25 +1,22 @@ -/* - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/* ScummVM - Graphic Adventure Engine * - * LGPL License + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. - * This library is distributed in the hope that it will be useful, + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $URL$ * $Id$ |