mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
Minor cleanup, to re-order functions
svn-id: r23928
This commit is contained in:
parent
ace4a02125
commit
99016886ba
@ -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();
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user