eglaysher / rlvm

RealLive clone for Linux and OSX
http://rlvm.net
GNU General Public License v3.0
152 stars 26 forks source link

Named character lines skipped due to corrupted save data #35

Closed eglaysher closed 11 years ago

eglaysher commented 11 years ago

This usually manifests silently in game, though an exception is printed on the console.

This is usually caused by a shiftjis string being interpreted as UTF8. These shiftjis strings either come from an original Gameexe.ini that wasn't replaced when an English patch was installed OR they come from the user running an unpatched Japanese version and then the patched English version (the Japanese strings are then written to global memory which persists).

Checking for this isn't trivial; because of how Haeleth wrote rlBabel, we'll need to scan all of the headers of the individual seens for an rlbabel header. If we find one, we can attempt interpreting each #NAME variable as a UTF-8 string, and if it fails, we know we're in the error condition.

If the user didn't install the patch correctly and there isn't global memory, we can direct the user to install the patch's Gameexe.ini.

If the user ran the unpatched Japanese version and then the English version on top of it, we'll have to prompt the user to either [Exit] or [Delete all save data] because we can't trust any of it.