Pretty much all the code I had before is now version 4 compliant. All the opcodes that deal with objects and their properties are now fully v1-8 compliant. What I’m mostly doing now is dealing with the screen manipulation that is common to version 4 and higher z-machines. Earlier games were written to pretty much print to the screen in a continuous fashion, whereas 4 and above could split the screen into two windows, print in column/row format, adjust height, font style, etc.
Implementing Multiple Windows
I’ve beefed up the output buffer quite a lot – instead of just being a place to dump text that’s shown on the screen, its now sectioned into multiple areas, such as the status bar for v1-3 games, or windows 0-7 for v4+ games. Each buffer has a raw area the game writes to, and a render area that combines the raw text with CSS code derived from style data from the game to be shown on the browser.
Gruepal can now handle screen differentiation between v1-3 and 4, handle multiple windows on the screen (both splitting and joining), clearing certain windows, and space-based positioning (which a lot of games use). A Mind Forever Voyaging is looking better and better, the next two steps are keeping track of where the screen goes into reverse mode and rendering that via css, then taking care of positioning when position opcodes are used.
Leave a Reply