diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreambase.h | 5 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 6 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 48 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 5 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 4 | ||||
-rw-r--r-- | engines/dreamweb/print.cpp | 6 | ||||
-rw-r--r-- | engines/dreamweb/sound.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 4 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/talk.cpp | 8 | ||||
-rw-r--r-- | engines/dreamweb/titles.cpp | 26 |
11 files changed, 75 insertions, 71 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 07afc167c9..47f0cec24f 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -181,6 +181,11 @@ public: uint8 _channel0Repeat; uint8 _channel1Playing; + uint8 _volume; + uint8 _volumeTo; + int8 _volumeDirection; + uint8 _volumeCount; + bool _speechLoaded; // from backdrop.cpp diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 53d814eb46..239725c263 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -63,11 +63,9 @@ void DreamGenContext::__start() { //0x00f0: .... .... .... .... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x0100: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, //0x0110: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - //0x0120: .... .... .... .... - 0x00, }; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; ds.assign(src, src + sizeof(src)); dreamweb(); } diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index f1f5f96a44..fa13b47c2d 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -240,32 +240,28 @@ static const uint16 kAddtogreen = 264; static const uint16 kAddtored = 265; static const uint16 kAddtoblue = 266; static const uint16 kLastsoundreel = 267; -static const uint16 kVolume = 269; -static const uint16 kVolumeto = 270; -static const uint16 kVolumedirection = 271; -static const uint16 kVolumecount = 272; -static const uint16 kLasthardkey = 273; -static const uint16 kBufferin = 274; -static const uint16 kBufferout = 276; -static const uint16 kWorkspace = 278; -static const uint16 kMainsprites = 280; -static const uint16 kBackdrop = 282; -static const uint16 kRecordspace = 284; -static const uint16 kBlinkframe = 286; -static const uint16 kBlinkcount = 287; -static const uint16 kReasseschanges = 288; -static const uint16 kPointerspath = 289; -static const uint16 kManspath = 290; -static const uint16 kPointerfirstpath = 291; -static const uint16 kFinaldest = 292; -static const uint16 kDestination = 293; -static const uint16 kLinestartx = 294; -static const uint16 kLinestarty = 296; -static const uint16 kLineendx = 298; -static const uint16 kLineendy = 300; -static const uint16 kLinepointer = 302; -static const uint16 kLinedirection = 303; -static const uint16 kLinelength = 304; +static const uint16 kLasthardkey = 269; +static const uint16 kBufferin = 270; +static const uint16 kBufferout = 272; +static const uint16 kWorkspace = 274; +static const uint16 kMainsprites = 276; +static const uint16 kBackdrop = 278; +static const uint16 kRecordspace = 280; +static const uint16 kBlinkframe = 282; +static const uint16 kBlinkcount = 283; +static const uint16 kReasseschanges = 284; +static const uint16 kPointerspath = 285; +static const uint16 kManspath = 286; +static const uint16 kPointerfirstpath = 287; +static const uint16 kFinaldest = 288; +static const uint16 kDestination = 289; +static const uint16 kLinestartx = 290; +static const uint16 kLinestarty = 292; +static const uint16 kLineendx = 294; +static const uint16 kLineendy = 296; +static const uint16 kLinepointer = 298; +static const uint16 kLinedirection = 299; +static const uint16 kLinelength = 300; static const uint16 kBlocktextdat = (0); static const uint16 kPersonframes = (0); static const uint16 kDebuglevel1 = (0); diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index c89da250aa..de6a48170d 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -419,6 +419,11 @@ DreamBase::DreamBase(DreamWeb::DreamWebEngine *en) : _channel0Repeat = 0; _channel1Playing = 0xff; + _volume = 0; + _volumeTo = 0; + _volumeDirection = 0; + _volumeCount = 0; + _speechLoaded = false; _backdropBlocks = 0; diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 0e18303926..5b04e5be60 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -1016,8 +1016,8 @@ void DreamBase::endGameSeq(ReelRoutine &routine) { fadeScreenDownHalf(); } else if (nextReelPointer == 324) { fadeScreenDowns(); - data.byte(kVolumeto) = 7; - data.byte(kVolumedirection) = 1; + _volumeTo = 7; + _volumeDirection = 1; } if (nextReelPointer == 340) diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index b20726dc44..9bdebc1e14 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -247,9 +247,9 @@ const char *DreamBase::monPrint(const char *string) { void DreamBase::rollEndCreditsGameWon() { playChannel0(16, 255); - data.byte(kVolume) = 7; - data.byte(kVolumeto) = 0; - data.byte(kVolumedirection) = (byte)-1; + _volume = 7; + _volumeTo = 0; + _volumeDirection = -1; multiGet(_mapStore, 75, 20, 160, 160); diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 8985950d68..774f22a0b9 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -43,15 +43,15 @@ bool DreamBase::loadSpeech(byte type1, int idx1, byte type2, int idx2) { void DreamBase::volumeAdjust() { - if (data.byte(kVolumedirection) == 0) + if (_volumeDirection == 0) return; - if (data.byte(kVolume) != data.byte(kVolumeto)) { - data.byte(kVolumecount) += 64; + if (_volume != _volumeTo) { + _volumeCount += 64; // Only modify the volume every 256/64 = 4th time around - if (data.byte(kVolumecount) == 0) - data.byte(kVolume) += data.byte(kVolumedirection); + if (_volumeCount == 0) + _volume += _volumeDirection; } else { - data.byte(kVolumedirection) = 0; + _volumeDirection = 0; } } @@ -194,7 +194,7 @@ void DreamWebEngine::soundHandler() { _base._subtitles = ConfMan.getBool("subtitles"); _base.volumeAdjust(); - uint volume = _base.data.byte(DreamGen::kVolume); + uint volume = _base._volume; //.vol file loaded into soundbuf:0x4000 //volume table at (volume * 0x100 + 0x3f00) //volume value could be from 1 to 7 diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index cc7631439a..83a05b9bb0 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -786,8 +786,8 @@ void DreamBase::textForMonk() { else if (data.byte(kIntrocount) == 53) { fadeScreenDowns(); if (isCD()) { - data.byte(kVolumeto) = 7; - data.byte(kVolumedirection) = 1; + _volumeTo = 7; + _volumeDirection = 1; } } } diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 44c5decd70..0c7877f8e4 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -563,7 +563,7 @@ void DreamBase::dreamweb() { data.byte(kLocation) = 255; data.byte(kRoomafterdream) = 1; data.byte(kNewlocation) = 35; - data.byte(kVolume) = 7; + _volume = 7; loadRoom(); clearSprites(); initMan(); @@ -573,8 +573,8 @@ void DreamBase::dreamweb() { initialInv(); data.byte(kLastflag) = 32; startup1(); - data.byte(kVolumeto) = 0; - data.byte(kVolumedirection) = (byte)-1; + _volumeTo = 0; + _volumeDirection = -1; data.byte(kCommandtype) = 255; } @@ -2565,21 +2565,21 @@ void DreamBase::atmospheres() { // I'm interpreting this as if the cmp reallocation is below the jz if (data.byte(kMapy) == 0) { - data.byte(kVolume) = 0; // "fullvol" + _volume = 0; // "fullvol" return; } if (data.byte(kReallocation) == 2 && data.byte(kMapx) == 22 && data.byte(kMapy) == 10) - data.byte(kVolume) = 5; // "louisvol" + _volume = 5; // "louisvol" if (isCD() && data.byte(kReallocation) == 14) { if (data.byte(kMapx) == 33) { - data.byte(kVolume) = 0; // "ismad2" + _volume = 0; // "ismad2" return; } if (data.byte(kMapx) == 22) { - data.byte(kVolume) = 5; + _volume = 5; return; } @@ -2588,12 +2588,12 @@ void DreamBase::atmospheres() { if (data.byte(kReallocation) == 2) { if (data.byte(kMapx) == 22) { - data.byte(kVolume) = 5; // "louisvol" + _volume = 5; // "louisvol" return; } if (data.byte(kMapx) == 11) { - data.byte(kVolume) = 0; // "fullvol" + _volume = 0; // "fullvol" return; } } @@ -3162,7 +3162,7 @@ void DreamBase::showGun() { hangOn(200); _roomsSample = 34; loadRoomsSample(); - data.byte(kVolume) = 0; + _volume = 0; loadIntoTemp("DREAMWEB.G13"); createPanel2(); showFrame(_tempGraphics, 100, 4, 0, 0); diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index ed52e76bd7..5478a0f1f2 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -68,8 +68,8 @@ void DreamBase::talk() { workToScreenM(); if (_speechLoaded) { cancelCh1(); - data.byte(kVolumedirection) = (byte)-1; - data.byte(kVolumeto) = 0; + _volumeDirection = -1; + _volumeTo = 0; } } @@ -101,8 +101,8 @@ void DreamBase::startTalk() { _speechLoaded = false; loadSpeech('R', data.byte(kReallocation), 'C', 64*(data.byte(kCharacter) & 0x7F)); if (_speechLoaded) { - data.byte(kVolumedirection) = 1; - data.byte(kVolumeto) = 6; + _volumeDirection = 1; + _volumeTo = 6; playChannel1(50 + 12); } } diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp index f30283e45a..529f400ff6 100644 --- a/engines/dreamweb/titles.cpp +++ b/engines/dreamweb/titles.cpp @@ -30,8 +30,8 @@ void DreamBase::endGame() { monkSpeaking(); gettingShot(); getRidOfTempText(); - data.byte(kVolumeto) = 7; - data.byte(kVolumedirection) = 1; + _volumeTo = 7; + _volumeDirection = 1; hangOn(200); } @@ -44,9 +44,9 @@ void DreamBase::monkSpeaking() { clearWork(); showFrame(_tempGraphics, 160, 72, 0, 128); // show monk workToScreen(); - data.byte(kVolume) = 7; - data.byte(kVolumedirection) = (byte)-1; - data.byte(kVolumeto) = 5; + _volume = 7; + _volumeDirection = -1; + _volumeTo = 5; playChannel0(12, 255); fadeScreenUps(); hangOn(300); @@ -61,8 +61,8 @@ void DreamBase::monkSpeaking() { } while (_channel1Playing != 255); } - data.byte(kVolumedirection) = 1; - data.byte(kVolumeto) = 7; + _volumeDirection = 1; + _volumeTo = 7; fadeScreenDowns(); hangOn(300); getRidOfTemp(); @@ -73,8 +73,8 @@ void DreamBase::gettingShot() { clearPalette(); loadIntroRoom(); fadeScreenUps(); - data.byte(kVolumeto) = 0; - data.byte(kVolumedirection) = (byte)-1; + _volumeTo = 0; + _volumeDirection = -1; runEndSeq(); clearBeforeLoad(); } @@ -125,9 +125,9 @@ void DreamBase::intro() { data.byte(kNewlocation) = 50; clearPalette(); loadIntroRoom(); - data.byte(kVolume) = 7; - data.byte(kVolumedirection) = (byte)-1; - data.byte(kVolumeto) = 4; + _volume = 7; + _volumeDirection = -1; + _volumeTo = 4; playChannel0(12, 255); fadeScreenUps(); runIntroSeq(); @@ -265,7 +265,7 @@ void DreamBase::set16ColPalette() { void DreamBase::realCredits() { _roomsSample = 33; loadRoomsSample(); - data.byte(kVolume) = 0; + _volume = 0; initGraphics(640, 480, true); hangOn(35); |