Closed everlastingwonder closed 6 years ago
The 255 column limitation comes from the fact that the Z-machine stores the terminal width as an 8-bit value. I addressed this in #34 wherein the question was whether to have Frotz complain and exit or return 255 if the terminal has more than 255 columns. I'm not sure why I chose to have Frotz complain and exit. Maybe I should switch to the other option and omit the compile-time configuration.
What do you think?
If the plan is to get resize working, terminal width may then change in the middle of a game. Complaining and exiting will not be acceptable.
I reworked these changes such that Frotz will always return a width of 255 when the window is more than 255. See 2ca9e0059af86f1eb9aae90bdb4f7e0f8b3770ff for that and 77e487572e9d9845c9b72eae8d054b7f0a077cee for removal of duplicate function prototypes.
I personally like to have my terminal window set to fullscreen; unfortunately, my monitor is wide enough that the fullscreen terminal is more than 255 characters wide (which ncurses apparently doesn't like). This meant that when I first compiled frotz and ran a game, the entire thing was squashed into a column about 10 characters wide on the left-hand side of the screen. These commits add an option to compile frotz such that if it is invoked with a width greater than 255, it will simply set the width to 255, rather than giving ncurses a bad value; this was the workaround I used, and I thought other people might benefit from it as well.