aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sky')
-rw-r--r--engines/sky/control.cpp2
-rw-r--r--engines/sky/logic.cpp3
-rw-r--r--engines/sky/sound.cpp15
-rw-r--r--engines/sky/sound.h2
4 files changed, 16 insertions, 6 deletions
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index 53169402e1..9d6b58704d 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -986,7 +986,7 @@ void Control::handleKeyPress(Common::KeyState kbd, Common::String &textBuf) {
if (kbd.keycode == Common::KEYCODE_BACKSPACE) { // backspace
if (textBuf.size() > 0)
textBuf.deleteLastChar();
- } else {
+ } else if (kbd.ascii) {
// Cannot enter text wider than the save/load panel
if (_enteredTextWidth >= PAN_LINE_WIDTH - 10)
return;
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index ed7e419f64..c6c6c34c4d 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -1774,6 +1774,7 @@ bool Logic::fnChooser(uint32 a, uint32 b, uint32 c) {
uint32 size = ((dataFileHeader *)data)->s_height * ((dataFileHeader *)data)->s_width;
uint32 index = 0;
uint32 width = ((dataFileHeader *)data)->s_width;
+ uint32 height = ((dataFileHeader *)data)->s_height;
data += sizeof(dataFileHeader);
@@ -1794,7 +1795,7 @@ bool Logic::fnChooser(uint32 a, uint32 b, uint32 c) {
textCompact->xcood = TOP_LEFT_X; // set coordinates
textCompact->ycood = ycood;
- ycood += 12;
+ ycood += height;
}
if (p == _scriptVariables + TEXT1)
diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp
index 928221a9a5..f15038c0b6 100644
--- a/engines/sky/sound.cpp
+++ b/engines/sky/sound.cpp
@@ -1025,6 +1025,7 @@ Sound::Sound(Audio::Mixer *mixer, Disk *pDisk, uint8 pVolume) {
_mixer = mixer;
_saveSounds[0] = _saveSounds[1] = 0xFFFF;
_mainSfxVolume = pVolume;
+ _isPaused = false;
}
Sound::~Sound(void) {
@@ -1254,14 +1255,20 @@ bool Sound::startSpeech(uint16 textNum) {
void Sound::fnPauseFx(void) {
- _mixer->pauseID(SOUND_CH0, true);
- _mixer->pauseID(SOUND_CH1, true);
+ if (!_isPaused) {
+ _isPaused = true;
+ _mixer->pauseID(SOUND_CH0, true);
+ _mixer->pauseID(SOUND_CH1, true);
+ }
}
void Sound::fnUnPauseFx(void) {
- _mixer->pauseID(SOUND_CH0, false);
- _mixer->pauseID(SOUND_CH1, false);
+ if (_isPaused) {
+ _isPaused = false;
+ _mixer->pauseID(SOUND_CH0, false);
+ _mixer->pauseID(SOUND_CH1, false);
+ }
}
} // End of namespace Sky
diff --git a/engines/sky/sound.h b/engines/sky/sound.h
index 28e2e8c88a..0ad509700e 100644
--- a/engines/sky/sound.h
+++ b/engines/sky/sound.h
@@ -89,6 +89,8 @@ private:
uint8 *_sampleRates, *_sfxInfo;
uint8 _mainSfxVolume;
+ bool _isPaused;
+
static uint16 _speechConvertTable[8];
static SfxQueue _sfxQueue[MAX_QUEUED_FX];
};