aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/scripts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/scripts.cpp')
-rw-r--r--engines/xeen/scripts.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 0bf1792b26..1393c6eccf 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -224,13 +224,13 @@ int Scripts::checkEvents() {
} else {
Window &w = screen._windows[38];
w.open();
- w.writeString(NOTHING_HERE);
+ w.writeString(Res.NOTHING_HERE);
w.update();
do {
intf.draw3d(true);
events.updateGameCounter();
- events.wait(1, true);
+ events.wait(1);
} while (!events.isKeyMousePressed());
events.clearEvents();
@@ -874,7 +874,7 @@ void Scripts::cmdConfirmWord(Common::Array<byte> &params) {
} else if (params[3]) {
msg2 = "";
} else {
- msg2 = WHATS_THE_PASSWORD;
+ msg2 = Res.WHATS_THE_PASSWORD;
}
int result = StringInput::show(_vm, params[0], msg1, msg2,_event->_opcode);
@@ -1095,9 +1095,8 @@ void Scripts::cmdSeatTextSml(Common::Array<byte> &params) {
void Scripts::cmdPlayEventVoc(Common::Array<byte> &params) {
Sound &sound = *_vm->_sound;
- sound.playSample(nullptr, 0);
- File f(EVENT_SAMPLES[params[0]]);
- sound.playSample(&f, 1);
+ sound.stopSound();
+ sound.playSound(Res.EVENT_SAMPLES[params[0]], 1);
cmdNoAction(params);
}
@@ -1435,7 +1434,7 @@ bool Scripts::ifProc(int action, uint32 mask, int mode, int charIndex) {
// Check if the character class can cast the particular spell
for (int idx = 0; idx < 39; ++idx) {
- if (SPELLS_ALLOWED[category][idx] == mask) {
+ if (Res.SPELLS_ALLOWED[category][idx] == mask) {
// Can cast it. Check if the player has it in their spellbook
if (ps._spells[idx])
v = mask;
@@ -1760,7 +1759,7 @@ void Scripts::display(bool justifyFlag, int var46) {
events.updateGameCounter();
intf.draw3d(true);
- events.wait(1, true);
+ events.wait(1);
} while (!_vm->shouldQuit() && !events.isKeyMousePressed());
w.writeString(justifyFlag ? "\r" : "\r\x3""c");