FREESCAPE: inverted ifrvis and ifrinvis opcodes

This commit is contained in:
neuromancer 2022-09-04 20:37:22 +02:00 committed by Eugene Sandulenko
parent 7d08f4249b
commit 085af6ef83
No known key found for this signature in database
GPG key ID: 014D387312D34F08

View file

@ -235,13 +235,13 @@ Common::String *detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition
break;
case 32: // end condition if an object is visible in another area
detokenisedStream += "IF RVIS? ";
detokenisedStream += Common::String::format("(%d), (%d)", (int)tokenisedCondition[bytePointer], (int)tokenisedCondition[bytePointer + 1]);
detokenisedStream += "IF RINVIS? ";
detokenisedStream += Common::String::format("(%d, %d)", (int)tokenisedCondition[bytePointer], (int)tokenisedCondition[bytePointer + 1]);
detokenisedStream += "THEN END ENDIF";
currentInstruction = FCLInstruction(Token::INVISQ);
currentInstruction.setSource(tokenisedCondition[bytePointer]);
currentInstruction.setAdditional(tokenisedCondition[bytePointer + 1]);
currentInstruction.setDestination(false); // visible
currentInstruction.setDestination(true); // invisible
conditionalInstructions->push_back(currentInstruction);
currentInstruction = FCLInstruction(Token::UNKNOWN);
bytePointer += 2;
@ -249,13 +249,13 @@ Common::String *detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition
break;
case 33: // end condition if an object is invisible in another area
detokenisedStream += "IF RINVIS? ";
detokenisedStream += Common::String::format("(%d), (%d)", (int)tokenisedCondition[bytePointer], (int)tokenisedCondition[bytePointer + 1]);
detokenisedStream += "IF RVIS? ";
detokenisedStream += Common::String::format("(%d, %d)", (int)tokenisedCondition[bytePointer], (int)tokenisedCondition[bytePointer + 1]);
detokenisedStream += "THEN END ENDIF";
currentInstruction = FCLInstruction(Token::INVISQ);
currentInstruction.setSource(tokenisedCondition[bytePointer]);
currentInstruction.setAdditional(tokenisedCondition[bytePointer + 1]);
currentInstruction.setDestination(true); // invisible
currentInstruction.setDestination(false); // visible
conditionalInstructions->push_back(currentInstruction);
currentInstruction = FCLInstruction(Token::UNKNOWN);
bytePointer += 2;