aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/simon/items.cpp82
-rw-r--r--engines/simon/vga.cpp30
2 files changed, 56 insertions, 56 deletions
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp
index 0334cbb79b..210b85dab1 100644
--- a/engines/simon/items.cpp
+++ b/engines/simon/items.cpp
@@ -1402,47 +1402,6 @@ void SimonEngine::o_unlockZones() {
_vgaMemBase = _vgaFrozenBase;
}
-void SimonEngine::o1_screenTextPObj() {
- // 177: inventory descriptions
- uint vgaSpriteId = getVarOrByte();
- uint color = getVarOrByte();
-
- SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2);
- if (getFeatures() & GF_TALKIE) {
- if (subObject != NULL && subObject->objectFlags & kOFVoice) {
- uint offs = getOffsetOfChild2Param(subObject, kOFVoice);
- playSpeech(subObject->objectFlagValue[offs], vgaSpriteId);
- } else if (subObject != NULL && subObject->objectFlags & kOFNumber) {
- uint offs = getOffsetOfChild2Param(subObject, kOFNumber);
- playSpeech(subObject->objectFlagValue[offs] + 3550, vgaSpriteId);
- }
- }
-
- if (subObject != NULL && subObject->objectFlags & kOFText && _subtitles) {
- const char *stringPtr = (const char *)getStringPtrByID(subObject->objectFlagValue[0]);
- TextLocation *tl = getTextLocation(vgaSpriteId);
- char buf[256];
- int j, k;
-
- if (subObject->objectFlags & kOFNumber) {
- if (_language == Common::HB_ISR) {
- j = subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)];
- k = (j % 10) * 10;
- k += j / 10;
- if (!(j % 10))
- sprintf(buf,"0%d%s", k, stringPtr);
- else
- sprintf(buf,"%d%s", k, stringPtr);
- } else {
- sprintf(buf,"%d%s", subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)], stringPtr);
- }
- stringPtr = buf;
- }
- if (stringPtr != NULL)
- printScreenText(vgaSpriteId, color, stringPtr, tl->x, tl->y, tl->width);
- }
-}
-
void SimonEngine::o_getPathPosn() {
// 178: path find
uint x = getVarOrWord();
@@ -1588,6 +1547,47 @@ void SimonEngine::o1_playTune() {
}
}
+void SimonEngine::o1_screenTextPObj() {
+ // 177: inventory descriptions
+ uint vgaSpriteId = getVarOrByte();
+ uint color = getVarOrByte();
+
+ SubObject *subObject = (SubObject *)findChildOfType(getNextItemPtr(), 2);
+ if (getFeatures() & GF_TALKIE) {
+ if (subObject != NULL && subObject->objectFlags & kOFVoice) {
+ uint offs = getOffsetOfChild2Param(subObject, kOFVoice);
+ playSpeech(subObject->objectFlagValue[offs], vgaSpriteId);
+ } else if (subObject != NULL && subObject->objectFlags & kOFNumber) {
+ uint offs = getOffsetOfChild2Param(subObject, kOFNumber);
+ playSpeech(subObject->objectFlagValue[offs] + 3550, vgaSpriteId);
+ }
+ }
+
+ if (subObject != NULL && subObject->objectFlags & kOFText && _subtitles) {
+ const char *stringPtr = (const char *)getStringPtrByID(subObject->objectFlagValue[0]);
+ TextLocation *tl = getTextLocation(vgaSpriteId);
+ char buf[256];
+ int j, k;
+
+ if (subObject->objectFlags & kOFNumber) {
+ if (_language == Common::HB_ISR) {
+ j = subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)];
+ k = (j % 10) * 10;
+ k += j / 10;
+ if (!(j % 10))
+ sprintf(buf,"0%d%s", k, stringPtr);
+ else
+ sprintf(buf,"%d%s", k, stringPtr);
+ } else {
+ sprintf(buf,"%d%s", subObject->objectFlagValue[getOffsetOfChild2Param(subObject, kOFNumber)], stringPtr);
+ }
+ stringPtr = buf;
+ }
+ if (stringPtr != NULL)
+ printScreenText(vgaSpriteId, color, stringPtr, tl->x, tl->y, tl->width);
+ }
+}
+
void SimonEngine::o1_mouseOff() {
// 181: force mouseOff
scriptMouseOff();
diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp
index 79946ec309..d9fcddb36c 100644
--- a/engines/simon/vga.cpp
+++ b/engines/simon/vga.cpp
@@ -2042,19 +2042,8 @@ void SimonEngine::vc56_delay() {
_vcPtr = (byte *)&_vc_get_out_of_code;
}
-void SimonEngine::vc59() {
- if (getGameType() == GType_SIMON1) {
- if (!_sound->isVoiceActive())
- vcSkipNextInstruction();
- } else {
- uint16 file = vcReadNextWord();
- uint16 start = vcReadNextWord();
- uint16 end = vcReadNextWord() + 1;
-
- do {
- vc_kill_sprite(file, start);
- } while (++start != end);
- }
+void SimonEngine::vc57_no_op() {
+ /* unused */
}
void SimonEngine::vc58() {
@@ -2077,8 +2066,19 @@ void SimonEngine::vc58() {
_vgaCurZoneNum = file;
}
-void SimonEngine::vc57_no_op() {
- /* unused */
+void SimonEngine::vc59() {
+ if (getGameType() == GType_SIMON1) {
+ if (!_sound->isVoiceActive())
+ vcSkipNextInstruction();
+ } else {
+ uint16 file = vcReadNextWord();
+ uint16 start = vcReadNextWord();
+ uint16 end = vcReadNextWord() + 1;
+
+ do {
+ vc_kill_sprite(file, start);
+ } while (++start != end);
+ }
}
void SimonEngine::vc_kill_sprite(uint file, uint sprite) {