Closed Philip-The-Developer closed 9 years ago
Your code is very vertically condensed which makes it harder to read. Try to add line breaks between e.g. declaration blocks and logic and between logically coherent pieces of your code.
I also get a few type mismatch warnings from Clion. Please fix them.
Converting between two different character sets is a kind of non-trivial task. I think your code should generally contain more comments, not only at the places where I added comments.
Added a link to the documentation to the convertStringToZSCII method and commented the code.
Added method to convert ASCII string into Z-character String as described in http://inform-fiction.org/zmachine/standards/z1point1/sect03.html. See section 3.5.3 for default Z-character to ZSCII translation Table. We will use version 8, that means we have to set the word $34 (see 3.5.5) in the header to 0. Otherwhise we have to define our own Translation-Table. The function testAsciiToZscii shows, how to use the implemented method.