Skip to content

Commit

Permalink
Fix CLANNAD Full Voice English patches compiled with (rlc -g).
Browse files Browse the repository at this point in the history
The CLANNAD translators have recently started stripping debugging symbols
from their patched Seen.txt file and this has broken the translation
on rlvm. Specifically, the game appeared to work, but never outputted any
text to the screen.

The problem was related to the instruction pointer. rlBabel based Seen.txt
files have the following euqivalent code:

strout(??} // Somehow primes the text system
strcpy(buffer, "Text to output")
gosub (rlBabel impl)

Because strout was calling RLMachine::performTextout and performTextout
called advanceInstructionPointer(), the IP was being incremented twice and
the strcpy was never being called, leading to no text.
  • Loading branch information
eglaysher committed Jun 21, 2009
1 parent c384255 commit 6a116d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/MachineBase/RLMachine.cpp
Expand Up @@ -617,7 +617,6 @@ void RLMachine::performTextout(const std::string& cp932str) {
ptr->setNoWait();

pushLongOperation(ptr.release());
advanceInstructionPointer();
}

// -----------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/libReallive/bytecode.cpp
Expand Up @@ -361,6 +361,7 @@ TextoutElement::set_text(const char* src)
void TextoutElement::runOnMachine(RLMachine& machine) const
{
machine.performTextout(*this);
machine.advanceInstructionPointer();
}

// -----------------------------------------------------------------------
Expand Down

0 comments on commit 6a116d6

Please sign in to comment.