From ae31469a9aa7163c4ed42414fbb2c6c95e2d7e8a Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 30 May 2012 04:23:34 +0100 Subject: DREAMWEB: Replaced vsync() function with waitForVSync(). As a call to waitForVSync() was the only contents of vsync(), there should be no functional change. --- engines/dreamweb/dreamweb.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/dreamweb/dreamweb.h') diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 6744b53ebc..468a1f58a8 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -1135,7 +1135,6 @@ public: void frameOutBh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); void frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); void doShake(); - void vSync(); void setMode(); void showPCX(const Common::String &suffix); void showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, uint8 effectsFlag, uint8 width, uint8 height); -- cgit v1.2.3 From 628cfa3d47fb7ebad8dd26cb59f485e5c70dacb5 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 31 May 2012 05:16:10 +0100 Subject: DREAMWEB: Objectify Sound functions & data into DreamWebSound class. This change should have no functional change, but makes the sound code more decoupled, modular and readable, prior to attempting a fix for bug #3528164 - "DREAMWEB: missing sound effects/music cues during main title". --- engines/dreamweb/dreamweb.h | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) (limited to 'engines/dreamweb/dreamweb.h') diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 468a1f58a8..48d44c0380 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -99,10 +99,12 @@ enum { }; struct DreamWebGameDescription; +class DreamWebSound; class DreamWebEngine : public Engine { private: DreamWebConsole *_console; + DreamWebSound *_sound; bool _vSyncInterrupt; protected: @@ -142,7 +144,6 @@ public: void quit(); - void loadSounds(uint bank, const Common::String &suffix); bool loadSpeech(const Common::String &filename); void enableSavingOrLoading(bool enable = true) { _enableSavingOrLoading = enable; } @@ -151,15 +152,12 @@ public: uint8 modifyChar(uint8 c) const; Common::String modifyFileName(const char *); - void stopSound(uint8 channel); - const Common::String& getDatafilePrefix() { return _datafilePrefix; }; + const Common::String& getSpeechDirName() { return _speechDirName; }; private: void keyPressed(uint16 ascii); void setSpeed(uint speed); - void soundHandler(); - void playSound(uint8 channel, uint8 id, uint8 loops); const DreamWebGameDescription *_gameDescription; Common::RandomSource _rnd; @@ -171,22 +169,6 @@ private: uint _oldMouseState; bool _enableSavingOrLoading; - struct Sample { - uint offset; - uint size; - Sample(): offset(), size() {} - }; - - struct SoundData { - Common::Array samples; - Common::Array data; - }; - SoundData _soundData[2]; - Common::Array _speechData; - - Audio::SoundHandle _channelHandle[2]; - uint8 _channel0, _channel1; - protected: GameVars _vars; // saved variables @@ -327,16 +309,6 @@ public: // sound related uint8 _roomsSample; - uint8 _currentSample; - uint8 _channel0Playing; - uint8 _channel0Repeat; - uint8 _channel1Playing; - - uint8 _volume; - uint8 _volumeTo; - int8 _volumeDirection; - uint8 _volumeCount; - bool _speechLoaded; // misc variables @@ -715,15 +687,6 @@ public: void showSaveOps(); void showLoadOps(); - // from sound.cpp - bool loadSpeech(byte type1, int idx1, byte type2, int idx2); - void volumeAdjust(); - void cancelCh0(); - void cancelCh1(); - void loadRoomsSample(); - void playChannel0(uint8 index, uint8 repeat); - void playChannel1(uint8 index); - // from sprite.cpp void printSprites(); void printASprite(const Sprite *sprite); -- cgit v1.2.3