First step of changing "screen height|width" to "text height|width".
authorDavid Griffith <dave@661.org>
Sun, 29 Sep 2019 23:51:55 +0000 (16:51 -0700)
committerDavid Griffith <dave@661.org>
Sun, 29 Sep 2019 23:51:55 +0000 (16:51 -0700)
The purpose of this is to distinguish between text dimensions and screen
dimensions.  This stems from a problem with specifying the dimensions
for sfrotz which results in graphics in a V6 game not being properly
scaled to the window dimensions.  For sfrotz, we will have -w and -h
specifying the dimensions of the text as is with the dumb and curses
interfaces.  To this we will add -W and -H flags to specify the window
dimensions.  That pair of parameters will alter whatever is being
altered when the sfrotz is manually resized.

doc/dfrotz.6
doc/frotz.6
doc/sfrotz.6
src/curses/ux_init.c
src/curses/ux_params.txt
src/dumb/dumb_init.c
src/sdl/sf_util.c

index ad9779880789f94b3327fafea7f3b4a6d2ab9181..3fe07daa65291ec8522fb25a0dd259fe030e901b 100644 (file)
@@ -64,7 +64,7 @@ value, the test and the result will be reported.
 
 .TP
 .B \-h N
-Screen height.  Every N lines, a MORE prompt will be printed.  Use of
+Text height.  Every N lines, a MORE prompt will be printed.  Use of
 the
 .B \-m
 option renders this option moot.
@@ -150,7 +150,7 @@ key Alt\-S does not really help).
 .TP
 .B \-S N
 Set the transcript width.  By default your transcript files are formatted
-to a width of 80 columns per line, regardless of the current screen width.
+to a width of 80 columns per line, regardless of the current text width.
 This switch allows you to change this setting. In particular, use \-S 0
 to deactivate automatic line splitting in transcript files.
 
@@ -171,7 +171,7 @@ with limited memory.
 
 .TP
 .B \-w N
-Manually sets the screen width.  This should not be necessary except in
+Manually sets the text width.  This should not be necessary except in
 special circumstances.
 
 .TP
@@ -502,7 +502,7 @@ repositories.
 .SH CAVEATS
 .PP
 The Z Machine itself has trouble with the concept of resizing a terminal.
-It assumes that once the screen height and width are set, they will never
+It assumes that once the text height and width are set, they will never
 change; even across saves.  This made sense when 24x80 terminals were the
 norm and graphical user interfaces were mostly unknown.  I'm fairly sure
 there's a way around this problem, but for now, don't resize an xterm in
index 5b8a981723a8649f76d957be172fbda3946084fa..29801285444e4cb59c06377d2cb5348a49ef80d1 100644 (file)
@@ -102,7 +102,7 @@ Frotz to display colors, use this.
 
 .TP
 .B \-h N
-Manually sets the screen height.  Though most curses libraries are intelligent
+Manually sets the text height.  Though most curses libraries are intelligent
 enough to determine the current width from the terminal, it may sometimes
 be necessary to use this option to override the default.
 
@@ -191,7 +191,7 @@ key Alt\-S does not really help).
 .TP
 .B \-S N
 Set the transcript width.  By default your transcript files are formatted
-to a width of 80 columns per line, regardless of the current screen width.
+to a width of 80 columns per line, regardless of the current text width.
 This switch allows you to change this setting. In particular, use \-S 0
 to deactivate automatic line splitting in transcript files.
 
@@ -212,7 +212,7 @@ with limited memory.
 
 .TP
 .B \-w N
-Manually sets the screen width.  Again, this should not be necessary
+Manually sets the text width.  Again, this should not be necessary
 except in special circumstances.
 
 .TP
@@ -499,18 +499,18 @@ Set the right margin.  This is for those who might have special formatting
 needs.
 
 .PP
-.BR screen_height
+.BR text_height
 \ \ <integer>
 .br
-Manually set screen height.  Most curses libraries are intelligent enough
+Manually set text height.  Most curses libraries are intelligent enough
 to determine the current width of the terminal.  You may need to use this
 option to override the default.
 
 .PP
-.BR screen_width
+.BR text_width
 \ \ <integer>
 .br
-Manually set screen width.  Again, this should not be necessary except in
+Manually set text width.  Again, this should not be necessary except in
 special circumstances.
 
 .PP
@@ -518,7 +518,7 @@ special circumstances.
 \ \ <integer>
 .br
 Set the transcript width.  Default is 80 columns per line, regardless of
-the current screen width.  This switch allows you to change this setting.
+the current text width.  This switch allows you to change this setting.
 You may set this to "0" to deactivate automatic line-splitting in
 transcript files.
 
@@ -670,7 +670,7 @@ repositories.
 .SH CAVEATS
 .PP
 The Z Machine itself has trouble with the concept of resizing a terminal.
-It assumes that once the screen height and width are set, they will never
+It assumes that once the text height and width are set, they will never
 change; even across saves.  This made sense when 24x80 terminals were the
 norm and graphical user interfaces were mostly unknown.  I'm fairly sure
 there's a way around this problem, but for now, don't resize an xterm in
index ae1d71d0a0f977a3c700e7deed927e0564948868..8bcd7d7a899edd9fc337d6f3c986c7aaac39014d 100644 (file)
@@ -94,7 +94,7 @@ option does nothing.
 
 .TP
 .B \-h N
-Manually sets the screen height.
+Manually sets the text height.
 
 .TP
 .B \-i
@@ -153,7 +153,7 @@ key Alt\-S does not really help).
 .TP
 .B \-S N
 Set the transcript width.  By default your transcript files are formatted
-to a width of 80 columns per line, regardless of the current screen width.
+to a width of 80 columns per line, regardless of the current text width.
 This switch allows you to change this setting. In particular, use \-S 0
 to deactivate automatic line splitting in transcript files.
 
@@ -175,7 +175,7 @@ dangerous on machines with limited memory.
 
 .TP
 .B \-w N
-Manually sets the screen width.  Again, this should not be necessary
+Manually sets the text width.  Again, this should not be necessary
 except in special circumstances.
 
 .TP
index 7d7fb13e09ad151c3106c3cf037088a0403bde5f..8f24964471ab9951c82c0ff03ab1046edd16ad6b 100644 (file)
@@ -70,10 +70,10 @@ Syntax: frotz [options] story-file\n\
   -e   enable sound               \t -R <path> restricted read/write\n\
   -f <colorname> foreground color \t -s # random number seed value\n\
   -F   Force color mode           \t -S # transcript width\n\
-  -h # screen height              \t -t   set Tandy bit\n\
+  -h # text height                \t -t   set Tandy bit\n\
   -i   ignore fatal errors        \t -u # slots for multiple undo\n\
   -I # interpreter number         \t -v   show version information\n\
-  -l # left margin                \t -w # screen width\n\
+  -l # left margin                \t -w # text width\n\
   -L <file> load this save file   \t -x   expand abbreviations g/x/z\n\
   -o   watch object movement      \t -Z # error checking (see below)\n"
 
index c8a96b418f6d0746e9904057c720fc585d46a5a1..fc9d1e4b4f71570774d18705bbe4001eff072650 100644 (file)
@@ -6,7 +6,7 @@
 -e   enable sound
 -f <colorname> foreground color
 -F   Force color mode
--h # screen height
+-h # text height
 -i   ignore fatal errors
 -I # interpreter number
 -l # left margin
@@ -23,6 +23,6 @@
 -t   set Tandy bit
 -u # slots for multiple undo
 -v   show version information
--w # screen width
+-w # text width
 -x   expand abbreviations g/x/z
 -Z # error checking (see below)
index e7188505c010ab5edfcb70677aa8310d4f76ef42..e8c982beedd5cf25f53cfcac8209cd1ad8aff127 100644 (file)
@@ -34,12 +34,12 @@ An interpreter for all Infocom and other Z-Machine games.\n\
 Syntax: dfrotz [options] story-file\n\
   -a   watch attribute setting    \t -P   alter piracy opcode\n\
   -A   watch attribute testing    \t -R <path> restricted read/write\n\
-  -h # screen height              \t -s # random number seed value\n\
+  -h # text height                \t -s # random number seed value\n\
   -i   ignore fatal errors        \t -S # transcript width\n\
   -I # interpreter number         \t -t   set Tandy bit\n\
   -o   watch object movement      \t -u # slots for multiple undo\n\
   -O   watch object locating      \t -v   show version information\n\
-  -L <file> load this save file   \t -w # screen width\n\
+  -L <file> load this save file   \t -w # text width\n\
   -m   turn off MORE prompts      \t -x   expand abbreviations g/x/z\n\
   -p   plain ASCII output only    \t -Z # error checking (see below)\n"
 
@@ -49,8 +49,8 @@ For more options and explanations, please read the manual page.\n\n\
 While running, enter \"\\help\" to list the runtime escape sequences.\n"
 
 
-static int user_screen_width = 75;
-static int user_screen_height = 24;
+static int user_text_width = 75;
+static int user_text_height = 24;
 static int user_random_seed = -1;
 static int user_tandy_bit = 0;
 static bool plain_ascii = FALSE;
@@ -82,7 +82,7 @@ void os_process_arguments(int argc, char *argv[])
                        f_setup.attribute_testing = 1;
                        break;
                case 'h':
-                       user_screen_height = atoi(zoptarg);
+                       user_text_height = atoi(zoptarg);
                        break;
                case 'i':
                        f_setup.ignore_errors = 1;
@@ -132,7 +132,7 @@ void os_process_arguments(int argc, char *argv[])
                        exit(2);
                        break;
                case 'w':
-                       user_screen_width = atoi(zoptarg);
+                       user_text_width = atoi(zoptarg);
                        break;
                case 'x':
                        f_setup.expand_abbreviations = 1;
@@ -210,8 +210,8 @@ void os_init_screen(void)
        if (z_header.version >= V5 && f_setup.undo_slots == 0)
                z_header.flags &= ~UNDO_FLAG;
 
-       z_header.screen_rows = user_screen_height;
-       z_header.screen_cols = user_screen_width;
+       z_header.screen_rows = user_text_height;
+       z_header.screen_cols = user_text_width;
 
        /* Use the ms-dos interpreter number for v6, because that's the
         * kind of graphics files we understand.  Otherwise, use DEC.  */
index 6ec04dc4fe33c12deb014893e09e05a71ffd29fa..bc0b511424e0d90c576d1625098da31bbc74eb95 100644 (file)
@@ -121,8 +121,7 @@ static char *info[] = {
        "-c # context lines",
        "-f <colorname> foreground colour",
        "-F   fullscreen mode",
-       "-h # screen height",
-       "-H   show extended options",
+       "-H # screen height",
        "-i   ignore runtime errors",
        "-I # interpreter number",
        "-l # left margin",
@@ -136,8 +135,9 @@ static char *info[] = {
        "-S # transcript width",
        "-t   set Tandy bit",
        "-u # slots for multiple undo",
-       "-w # screen width",
+       "-W # screen width",
        "-x   expand abbreviations g/x/z",
+       "-X   show extended options",
        "-v   show version information",
        "-Z # error checking (see below)",
        NULL
@@ -222,7 +222,7 @@ extern int optind;
 
 extern int m_timerinterval;
 
-static char *options = "@:%aAb:B:c:f:Fh:HiI:l:L:m:N:oOPqr:s:S:tTu:vVw:xZ:";
+static char *options = "@:%aAb:B:c:f:FH:iI:l:L:m:N:oOPqr:s:S:tTu:vVW:xXZ:";
 
 static int limit(int v, int m, int M)
 {
@@ -270,12 +270,8 @@ static void parse_options(int argc, char **argv)
                        user_foreground = getcolor(zoptarg);
                if (c == 'F')
                        m_fullscreen = 1;
-               if (c == 'h')
+               if (c == 'H')
                        user_screen_height = num;
-               if (c == 'H') {
-                       usage(USAGE_EXTENDED);
-                       exit(EXIT_FAILURE);
-               }
                if (c == 'i')
                        f_setup.ignore_errors = 1;
                if (c == 'I')
@@ -310,10 +306,14 @@ static void parse_options(int argc, char **argv)
                        print_version();
                if (c == 'V')
                        m_vga_fonts = 1;
-               if (c == 'w')
+               if (c == 'W')
                        user_screen_width = num;
                if (c == 'x')
                        f_setup.expand_abbreviations = 1;
+               if (c == 'X') {
+                       usage(USAGE_EXTENDED);
+                       exit(EXIT_FAILURE);
+               }
                if (c == 'Z')
                        if (num >= ERR_REPORT_NEVER && num <= ERR_REPORT_FATAL)
                                f_setup.err_report_mode = num;