This replaces v_str* functions with new svar_* functions.
The new svar_* functions use 1-based string variable index, so that
callers don't have to decrement string numbers from SCO.
This adds "Unicode mode", in which scenarios can be written in any
language. xsys35c 1.2.0 and later can produce Unicode scenarios.
- nact->encoding represents the current scenario encoding. The initial
value is SJIS, and ZU command changes it to UTF8.
- Use conversion macros that switch the behavior by the scenario
encoding. For example, toUTF8() calls sjis2utf() if the scenario
encoding is SJIS, and calls strdup() if it is UTF8.
- Fix various string processing functions to work with UTF8.
- strVar is now allocated as a vector of indefinite length buffers
rather than a single contiguous buffer.
- Strings can be any length, but truncated to (strvar_len * 2) bytes
when saved to a file, for backward compatibility.
- Now string commands treat 1-byte characters in the same way as System
3.9. This potentially fixes bugs in English translated games.
Implement the patched version of the MP command, which appends a number
of spaces to a string rather than truncating. This is only used in the
English translations of Rance III and Rance IV.