Closed BroadcastGames closed 7 years ago
Confirmed for the ao-curses branch.
The terminal width is stored as an unsigned short (see https://github.com/DavidGriffith/frotz/blob/master/src/common/frotz.h). Therefore it has a maximum value of 255 before rolling over to 0. There are a lot of other things about the Z-machine stored as unsigned shorts. Altering this to allow for terminals wider than 255 characters seems would be a big task for a very small payoff. Therefore I will make Frotz complain about the too-wide terminal and then terminate rather than continue and return an obviously bogus width.
Going to 0 is the real problem. Can't you add logic that if > 255 just set to 255?
I'm working on it now. I seem to have uncovered a problem with the os_fatal()
function that causes it to append garbage to the error message. But just with this complaint -- not any of the other calls to os_fatal()
.
Fixed. See also a7b6e8f7fc85298707d448d2848ffce714fb47e1 for a weird problem that caused garbage to be printed if print_string()
is called when the Z-machine is not running.
Thank you.
Reopening to add to "Pre-2.45 cleanup" milestone
If I resize the Terminal window to 256 characters the game reports that it has zero. 255 width works fine. You can see this with the opening error in the game zracer.z5 http://ifdb.tads.org/viewgame?id=tnljfhvnzvybysqt Thank you and Merry Christmas!