First batch of sdl-frotz changes
authorDavid Griffith <dave@661.org>
Mon, 16 Jan 2012 03:25:54 +0000 (19:25 -0800)
committerDavid Griffith <dave@661.org>
Mon, 16 Jan 2012 03:25:54 +0000 (19:25 -0800)
17 files changed:
Makefile
src/common/frotz.h
src/common/main.c
src/common/screen.c
src/curses/ux_init.c
src/curses/ux_screen.c
src/dumb/dumb_init.c
src/dumb/dumb_output.c
src/sdl/sf_font3.c
src/sdl/sf_fonts.c
src/sdl/sf_frotz.h
src/sdl/sf_images.c
src/sdl/sf_resource.c
src/sdl/sf_sound.c
src/sdl/sf_util.c
src/sdl/sf_video.c
src/sdl/sfrotzmanual.html [deleted file]

index 28e871c5431ab0092751940aceefcaa2755056dc..9abd5066e5dc4f443cd8d1f3d6c4cf7071a8e941 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -94,6 +94,12 @@ CURSES = -lcurses
 #
 #EXTENSION = .exe
 
+SDLINC = `sdl-config --cflags`
+FTCFLAGS = `freetype-config --cflags`
+FTLIBS = `freetype-config --libs`
+
+SDL_DEFS = $(SDLINC) $(FTCFLAGS) $(FTLIBS)
+SDL_LIBS = -ljpeg -lpng -lz -lSDL -lSDL_mixer
 
 #####################################################
 # Nothing under this line should need to be changed.
@@ -184,13 +190,12 @@ CURSES_DEFS = $(OPT_DEFS) $(COLOR_DEFS) $(SOUND_DEFS) $(SOUNDCARD) \
 
 FLAGS = $(OPTS) $(CURSES_DEFS) $(INCL)
 
+
 $(NAME): $(NAME)-curses
 curses:  $(NAME)-curses
-$(NAME)-curses:                soundcard.h  $(COMMON_TARGET) $(CURSES_TARGET) $(BLORB_TARGET)
+$(NAME)-curses: $(COMMON_TARGET) $(CURSES_TARGET) $(BLORB_TARGET)
        $(CC) -o $(BINNAME)$(EXTENSION) $(TARGETS) $(LIB) $(CURSES) $(SOUND_LIB)
 
-all:   $(NAME) d$(NAME)
-
 dumb:          $(NAME)-dumb
 d$(NAME):      $(NAME)-dumb
 $(NAME)-dumb:          $(COMMON_TARGET) $(DUMB_TARGET)
@@ -198,14 +203,30 @@ $(NAME)-dumb:             $(COMMON_TARGET) $(DUMB_TARGET)
 
 sdl:           $(NAME)-sdl
 s$(NAME):      $(NAME)-sdl
-$(NAME)-sdl:   $(COMMON_TARGET) $(SDL_TARGET)
-       $(CC) -o s$(BINNAME) $(COMMON_TARGET) $(SDL_TARGET) $(SDL_LIBS)
+$(NAME)-sdl:   $(COMMON_TARGET) $(SDL_TARGET) $(BLORB_TARGET)
+       $(CC) -o s$(BINNAME) $(COMMON_TARGET) $(SDL_TARGET) $(BLORB_TARGET) $(SDL_LIBS)
+
+all:   $(NAME) d$(NAME)
+
 
 .SUFFIXES:
 .SUFFIXES: .c .o .h
 
-.c.o:
-       $(CC) $(FLAGS) $(CFLAGS) -o $@ -c $<
+$(COMMON_OBJECT): %.o: %.c
+       $(CC) $(COMMON_DEFS) -o $@ -c $<
+
+$(BLORB_OBJECT): %.o: %.c
+       $(CC) -o $@ -c $<
+
+$(DUMB_OBJECT): %.o: %.c
+       $(CC) -o $@ -c $<
+
+$(CURSES_OBJECT): %.o: %.c
+       $(CC) $(CURSES_DEFS) -o $@ -c $<
+
+$(SDL_OBJECT): %.o: %.c
+       $(CC) $(SDL_DEFS) -o $@ -c $<
+
 
 # If you're going to make this target manually, you'd better know which
 # config target to make first.
index a1c1a41a738e6230c2a3c5129fd5284db9224cf0..1d078b4a188bfa61d45cfa580708222adb9b20f6 100644 (file)
@@ -45,6 +45,8 @@ enum story {
     UNKNOWN
 };
 
+#include "setup.h"
+
 typedef unsigned char zchar;
 
 /*** Constants that may be set at compile time ***/
@@ -169,6 +171,8 @@ typedef unsigned char zchar;
 #define SOUND_FLAG       0x0080 /* Game wants to use sound effects    - V5+ */
 #define MENU_FLAG        0x0100 /* Game wants to use menus            - V6  */
 
+#define TRANSPARENT_FLAG  0x0001 /* Game wants to use transparency     - V6  */
+
 #define INTERP_DEFAULT 0
 #define INTERP_DEC_20 1
 #define INTERP_APPLE_IIE 2
@@ -417,6 +421,9 @@ extern zword hx_table_size;
 extern zword hx_mouse_x;
 extern zword hx_mouse_y;
 extern zword hx_unicode_table;
+extern zword hx_flags;
+extern zword hx_fore_colour;
+extern zword hx_back_colour;
 
 /*** Various data ***/
 
@@ -445,6 +452,8 @@ extern int mwin;
 
 extern int mouse_x;
 extern int mouse_y;
+extern int menu_selected;
+extern int mouse_button;
 
 extern bool enable_wrapping;
 extern bool enable_scripting;
@@ -672,8 +681,8 @@ int         os_char_width (zchar);
 void   os_display_char (zchar);
 void   os_display_string (const zchar *);
 void   os_draw_picture (int, int, int);
-void   os_erase_area (int, int, int, int);
-void   os_fatal (const char *);
+void   os_erase_area (int, int, int, int, int);
+void   os_fatal (const char *, ...);
 void   os_finish_with_sample ();
 int    os_font_data (int, int *, int *);
 void   os_init_screen (void);
@@ -699,4 +708,3 @@ int         os_string_width (const zchar *);
 void   os_init_setup (void);
 int    os_speech_output(const zchar *);
 
-#include "setup.h"
index f9486b0a9522ca96033737e9c03bf2625687619d..84abdb0fce1dd523fe2c69588b729878786ff961 100644 (file)
@@ -37,6 +37,7 @@ extern void init_memory (void);
 extern void init_undo (void);
 extern void reset_memory (void);
 
+
 /* Story file name, id number and size */
 
 char *story_name = 0;
index 713ec2921ce9de8303375c313f3095f147dfac1e..d12ab3aaf3cb6dae16a4202cd84bca229798e9e6 100644 (file)
@@ -425,7 +425,7 @@ void screen_erase_input (const zchar *buf)
        y = cwp->y_pos + cwp->y_cursor - 1;
        x = cwp->x_pos + cwp->x_cursor - 1;
 
-       os_erase_area (y, x, y + font_height - 1, x + width - 1);
+       os_erase_area (y, x, y + font_height - 1, x + width - 1, -1);
        os_set_cursor (y, x);
 
     }
@@ -612,7 +612,8 @@ void erase_window (zword win)
     os_erase_area (y,
                   x,
                   y + wp[win].y_size - 1,
-                  x + wp[win].x_size - 1);
+                  x + wp[win].x_size - 1,
+                  win);
 
     if (h_version == V6 && win != cwin && h_interpreter_number != INTERP_AMIGA)
        os_set_colour (lo (cwp->colour), hi (cwp->colour));
@@ -683,7 +684,7 @@ static void erase_screen (zword win)
 {
     int i;
 
-    os_erase_area (1, 1, h_screen_height, h_screen_width);
+    os_erase_area (1, 1, h_screen_height, h_screen_width, -2);
 
     if ((short) win == -1) {
        split_window (0);
@@ -1002,7 +1003,7 @@ void z_erase_line (void)
     y = cwp->y_pos + cwp->y_cursor - 1;
     x = cwp->x_pos + cwp->x_cursor - 1;
 
-    os_erase_area (y, x, y + font_height - 1, x + pixels - 1);
+    os_erase_area (y, x, y + font_height - 1, x + pixels - 1, -1);
 
 }/* z_erase_line */
 
@@ -1034,7 +1035,7 @@ void z_erase_picture (void)
     y += cwp->y_pos - 1;
     x += cwp->x_pos - 1;
 
-    os_erase_area (y, x, y + height - 1, x + width - 1);
+    os_erase_area (y, x, y + height - 1, x + width - 1, -1);
 
 }/* z_erase_picture */
 
index 95cd6f71eb2c5b03054af86d4b4bb545f6f19edc..e57c1a064305066493aa1a2f0a9d2037a2794f39 100644 (file)
@@ -77,7 +77,7 @@ char semi_stripped_story_name[FILENAME_MAX+1];
  *
  */
 
-void os_fatal (const char *s)
+void os_fatal (const char *s, ...)
 {
 
     if (u_setup.curses_active) {
@@ -440,7 +440,7 @@ void os_init_screen (void)
        if (h_flags & COLOUR_FLAG) h_flags &= ~COLOUR_FLAG;
     }
     os_set_colour(h_default_foreground, h_default_background);
-    os_erase_area(1, 1, h_screen_rows, h_screen_cols);
+    os_erase_area(1, 1, h_screen_rows, h_screen_cols, 0);
 }/* os_init_screen */
 
 /*
index 1b903793eaf010da0755bfd4d8be71c4b9219694..c736e13869c95fc36b31d222804b336db313217f 100644 (file)
  * Fill a rectangular area of the screen with the current background
  * colour. Top left coordinates are (1,1). The cursor does not move.
  *
+ * The final argument gives the window being changed, -1 if only a
+ * portion of a window is being erased, or -2 if the whole screen is
+ * being erased.  This is not relevant for the curses interface.
+ *
  */
 
-void os_erase_area (int top, int left, int bottom, int right)
+void os_erase_area (int top, int left, int bottom, int right, int win)
 {
     int y, x, i, j;
 
@@ -122,7 +126,7 @@ void os_scroll_area (int top, int left, int bottom, int right, int units)
     move(y, x);
   }
   if (units > 0)
-    os_erase_area(bottom - units + 2, left + 1, bottom + 1, right + 1);
+    os_erase_area(bottom - units + 2, left + 1, bottom + 1, right + 1, 0);
   else if (units < 0)
-    os_erase_area(top + 1, left + 1, top - units, right + 1);
+    os_erase_area(top + 1, left + 1, top - units, right + 1, 0);
 }/* os_scroll_area */
index b2221a40c3d13b42f19765152ab6f46fbb231db5..81f6e4d2b1031f48e3d5a94f2ca3aa7441341968 100644 (file)
@@ -192,7 +192,7 @@ int os_random_seed (void)
 
 void os_restart_game (int stage) {}
 
-void os_fatal (const char *s)
+void os_fatal (const char *s, ...)
 {
   fprintf(stderr, "\nFatal error: %s\n", s);
   exit(1);
index d349db411b6325aa64736cbbd15c5233a39ad3f7..2460e2cf8619644b449ba6da391f3f098a9d227c 100644 (file)
@@ -157,7 +157,7 @@ void dumb_discard_old_input(int num_chars)
   if (cursor_col < 0)
     cursor_col = 0;
   os_erase_area(cursor_row + 1, cursor_col + 1,
-               cursor_row + 1, cursor_col + num_chars);
+               cursor_row + 1, cursor_col + num_chars, -1);
 }
 
 void os_display_char (zchar c)
@@ -196,7 +196,7 @@ void os_display_string (const zchar *s)
      }
 }
 
-void os_erase_area (int top, int left, int bottom, int right)
+void os_erase_area (int top, int left, int bottom, int right, int win)
 {
   int row, col;
   top--; left--; bottom--; right--;
@@ -213,12 +213,12 @@ void os_scroll_area (int top, int left, int bottom, int right, int units)
     for (row = top; row <= bottom - units; row++)
       for (col = left; col <= right; col++)
        dumb_copy_cell(row, col, row + units, col);
-    os_erase_area(bottom - units + 2, left + 1, bottom + 1, right + 1);
+    os_erase_area(bottom - units + 2, left + 1, bottom + 1, right + 1, -1 );
   } else if (units < 0) {
     for (row = bottom; row >= top - units; row--)
       for (col = left; col <= right; col++)
        dumb_copy_cell(row, col, row + units, col);
-    os_erase_area(top + 1, left + 1, top - units, right + 1);
+    os_erase_area(top + 1, left + 1, top - units, right + 1 , -1);
   }
 }
 
@@ -530,6 +530,6 @@ void dumb_init_output(void)
 
   screen_data = malloc(screen_cells * sizeof(cell));
   screen_changes = malloc(screen_cells);
-  os_erase_area(1, 1, h_screen_rows, h_screen_cols);
+  os_erase_area(1, 1, h_screen_rows, h_screen_cols, -2);
   memset(screen_changes, 0, screen_cells);
 }
index 4113b2b779d3b718627f4f69b94fee6e2317a54c..ac857e347d5a834c3599f934615147caef205929 100644 (file)
@@ -1,4 +1,5 @@
 #include "sf_frotz.h"
+#include <string.h>
 
 static byte Zfont3[] = {
 /* 32*/        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
index 139059d44c785e68997396bfff1b9477926f6988..f7bda1e11d36a25c98eafada44b4b7217b512415 100644 (file)
@@ -461,7 +461,7 @@ static int charwidth( zword c, int *oh)
  * Return the length of the character in screen units.
  *
  */
-int os_char_width(zword c)
+int os_char_width(zchar c)
   {
   int w, oh;
   w = charwidth( c, &oh);
@@ -561,7 +561,7 @@ void os_set_text_style( int new_style)
  *    ZC_NEW_FONT  - next character is a new font
  *
  */
-int os_string_width(const zword *s)
+int os_string_width(const zchar *s)
   {
   int width = 0, wacc = 0, oh = 0; zword c;
 
@@ -594,7 +594,7 @@ int os_string_width(const zword *s)
  * Pass a string of characters to os_display_char.
  *
  */
-void os_display_string(const zword *s)
+void os_display_string(const zchar *s)
   {
   zword c;
   while ((c = *s++) != 0)
@@ -619,7 +619,7 @@ void os_display_string(const zword *s)
  * be scrolled after printing to the bottom right corner.
  *
  */
-void os_display_char(zword c)
+void os_display_char(zchar c)
   {
   if (c == ZC_INDENT)
        {
index 393d697b9b605302f0970d9cb026fb9e9240689d..d0dbc77ccf4dc5d4ed77188821d9aa4172ecabdc 100644 (file)
@@ -245,3 +245,29 @@ struct CONVstruct {
 
 
 #endif
+
+
+
+/*** screen window ***/
+
+typedef struct {
+    zword y_pos;
+    zword x_pos;
+    zword y_size;
+    zword x_size;
+    zword y_cursor;
+    zword x_cursor;
+    zword left;
+    zword right;
+    zword nl_routine;
+    zword nl_countdown;
+    zword style;
+    zword colour;
+    zword font;
+    zword font_size;
+    zword attribute;
+    zword line_count;
+    zword true_fore;
+    zword true_back;
+} Zwindow;
+
index 745a547dfc1361fc6015cebc991d8eb71e130091..18b0827d034333c01d95fdc5a00669e29a5da14f 100644 (file)
@@ -11,7 +11,7 @@
 #include "png.h"
 #include <setjmp.h>
 
-#include "blorblow.h"
+#include "../blorb/blorblow.h"
 
 // static double m_gamma = DEFAULT_GAMMA;
 static byte toLinear[256];
index 712a4ff722466067bf7cfb66ac80042d3e255d99..46debc27a225dc6360ec679d783d37daac83429d 100644 (file)
@@ -5,10 +5,12 @@
 // for access()
 #include <unistd.h>
 
+#include <stdarg.h>
+
 #include "sf_frotz.h"
 
-#include "blorb.h"
-#include "blorblow.h"
+#include "../blorb/blorb.h"
+#include "../blorb/blorblow.h"
 
 // various data
 
@@ -444,12 +446,12 @@ void sf_readsettings(void)
 
 //printf("sf_readsettings\n");
   h_interpreter_number = sf_GetProfileInt("Interpreter","Number",INTERP_AMIGA);
-  err_report_mode = sf_GetProfileInt("Interpreter","Error Reporting",ERR_REPORT_ONCE);
-  option_ignore_errors = sf_GetProfileInt("Interpreter","Ignore Errors",0);
-  option_expand_abbreviations = sf_GetProfileInt("Interpreter","Expand Abbreviations",0);
+  f_setup.err_report_mode = sf_GetProfileInt("Interpreter","Error Reporting",ERR_REPORT_ONCE);
+  f_setup.ignore_errors = sf_GetProfileInt("Interpreter","Ignore Errors",0);
+  f_setup.expand_abbreviations = sf_GetProfileInt("Interpreter","Expand Abbreviations",0);
   m_tandy = sf_GetProfileInt("Interpreter","Tandy Bit",0) ? true : false;
   m_quetzal = sf_GetProfileInt("Interpreter","Quetzal Format",1) ? true : false;
-  option_script_cols = sf_GetProfileInt("Interpreter","Wrap Script Lines",1) ? 80 : 0;
+  f_setup.script_cols = sf_GetProfileInt("Interpreter","Wrap Script Lines",1) ? 80 : 0;
 
   if ((p = sf_GetProfileString("Interpreter","SaveNames",NULL)))
        m_names_format = p[0];
index 29a87881a0efc79c3a7600f3b22d8ee54e8e549b..63d19dfd6a2990f07e1413876c5e73a1cc38cc1a 100644 (file)
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include "sf_frotz.h"
-#include "blorblow.h"
+#include "../blorb/blorblow.h"
 
 #include <SDL.h>
 #include <SDL_thread.h>
index f65f62949c34336f876e95fd7f7d168b263ef74a..383b6a3a58e838320778f459e186e3a057defcf8 100644 (file)
@@ -212,15 +212,15 @@ static void parse_options (int argc, char **argv)
            }
 
        if (c == 'a')
-           option_attribute_assignment = 1;
+           f_setup.attribute_assignment = 1;
        if (c == 'A')
-           option_attribute_testing = 1;
+           f_setup.attribute_testing = 1;
        if (c == 'b')
            user_background = num;
        if (c == 'B')
            option_scrollback_buffer = num;
        if (c == 'c')
-           option_context_lines = num;
+           f_setup.context_lines = num;
        if (c == 'D')
                {
                if (copt == 'k') m_reqW = -1;
@@ -242,42 +242,42 @@ static void parse_options (int argc, char **argv)
        if (c == 'h')
            user_screen_height = num;
        if (c == 'i')
-           option_ignore_errors = 1;
+           f_setup.ignore_errors = 1;
        if (c == 'l')
-           option_left_margin = num;
+           f_setup.left_margin = num;
        if (c == 'L')
            m_localfiles = true;
        if (c == 'q')
            m_no_sound = 1;
        if (c == 'o')
-           option_object_movement = 1;
+           f_setup.object_movement = 1;
        if (c == 'O')
-           option_object_locating = 1;
+           f_setup.object_locating = 1;
        if (c == 'p')
-           option_piracy = 1;
+           f_setup.piracy = 1;
        if (c == 'r')
-           option_right_margin = num;
+           f_setup.right_margin = num;
        if (c == 'R')
-           option_save_quetzal = 0;
+           f_setup.save_quetzal = 0;
        if (c == 's')
            m_random_seed = num;
        if (c == 'S')
-           option_script_cols = num;
+           f_setup.script_cols = num;
        if (c == 't')
            user_tandy_bit = 1;
        if (c == 'T')
            sf_osdialog = NULL;
        if (c == 'u')
-           option_undo_slots = num;
+           f_setup.undo_slots = num;
        if (c == 'V')
            m_vga_fonts = 1;
        if (c == 'w')
            user_screen_width = num;
        if (c == 'x')
-           option_expand_abbreviations = 1;
+           f_setup.expand_abbreviations = 1;
        if (c == 'Z')
            if (num >= ERR_REPORT_NEVER && num <= ERR_REPORT_FATAL)
-             err_report_mode = num;
+             f_setup.err_report_mode = num;
        if (c == '?')
                optind = argc;
        } while (c != EOF && c != '?');
index 3fb86d92b60e1ce0476d1351276a890ed7da5fe2..4305eeb1ccd950cd1553fc31498aef9885a0ccbb 100644 (file)
@@ -707,7 +707,7 @@ zword sf_read_key( int timeout, int cursor, int allowed)
  * return it. Input aborts after timeout/10 seconds.\r
  *\r
  */\r
-zword os_read_key(int timeout, int cursor)\r
+zchar os_read_key(int timeout, int cursor)\r
   {\r
   return sf_read_key(timeout,cursor,0);\r
   }\r
@@ -779,7 +779,7 @@ static void addtoHistory( zword *buf)
  * to implement word completion (similar to tcsh under Unix).\r
  *\r
  */\r
-zword os_read_line(int max, zword *buf, int timeout, int width, int continued)\r
+zchar os_read_line(int max, zchar *buf, int timeout, int width, int continued)\r
   {\r
   static int prev_pos = 0;\r
   static int prev_history = -1;\r
diff --git a/src/sdl/sfrotzmanual.html b/src/sdl/sfrotzmanual.html
deleted file mode 100644 (file)
index f7afd76..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-<html>
-<head>
-</head>
-<body>
-Sfrotz manual (sort of...)
-Copyright &copy; 2011 Aldo Cumani<br>
-Comments and bug reports to &lt;sfrotz .at. writeme .dot. com&gt; (apologies for the anti-spam-munging.)<br><br>
-
-This is just a preliminary draft of a manual. It refers to sfrotz v0.02<br>
-This document is relased under the terms of the GNU Free Documentation License.
-
-
-<h1>1. Introduction</h1>
-Sfrotz is a Linux (though potentially cross-platform) port of the well-known z-code interpreter Frotz 2.40. Sfrotz uses SDL for video rendering and either SDL-mixer or MikMod for audio. While in principle Sfrotz should run on any platform supporting SDL, in practice it has only been extensively tested on Linux (Debian 5 lenny x86 and Debian 6 squeeze x64).
-
-<h2>1.1 Installation</h2>
-Sfrotz is distributed in source form. Compiling the sources requires gcc (Mingw32 on Windows also works, more or less) and GNU make. The distribution does not currently include any configuration script, so the Makefile must be adapted by hand to the target system.
-
-
-<h1>2. Features</h1>
-
-
-<h2>2.1 Blorb resources</h2>
-Sfrotz can render graphics (for V6 games) and sound effects packaged in a Blorb file (but see also the next section). As concerns pictures, Sfrotz supports both PNG and JPEG images. Regarding sound, AIFF sound effects, MOD songs and OGG music are currently supported, while SONG songs won't probably be ever supported.
-
-
-<h2>2.2 <a name="nonblorb">Non-Blorb resources</a></h2>
-Besides Blorb-packaged resources, Sfrotz can also render graphics and sound from individual files, provided the latter are either suitably named (e.g a common root with a numeric field specifying the resource number), or listed in a suitably formatted text file.<br>
-
-Note that this feature is not automatic, but must be enabled by the -L or -@ command line options. When the feature is enabled, resources found this way override those in the Blorb file, if present.<br>
-
-This feature can be useful to game designers, as it eases changing and adding resources without having to re-compile the Blorb file each time. The format of the list file used with the -@ option (see the <a href="#appendix2">Appendix</a>) is identical to that of the BLC control file used by L. Ross Raszewski's <a href="http://www.trenchcoatsoft.com/">iblorb</a> package, so one can use the same list for compiling the final Blorb file for distribution.
-
-
-<h2>2.3 Truetype fonts</h2>
-Sfrotz can display text with Truetype or Type1 <a href="#fontdir">fonts</a>,
-using the FreeType2 rendering library. 
-The location of the
-necessary font files must be specified in the setup file. Also,
-<a href="#antialias">antialiased</a> rendering of Truetype fonts can be 
-specified.
-Please note that this feature in Sfrotz is still <b>experimental</b>, 
-so don't expect
-too much (e.g., kerning is not supported).
-
-
-<h2>2.4 Default fonts</h2>
-Sfrotz needs not Truetype fonts for working; in fact it has a default 
-monospaced font, based on an 8x16 VGA font, which can be used for both
-the TEXT_FONT and the FIXED_FONT of the z-machine, with suitable
-(though not very nice) modifications for the various styles. Even if
-Truetype fonts are specified in the setup file, Sfrotz can be
-forced to use the VGA font by the <a href="#-V"><tt>-V</tt></a> command
-line switch.
-
-<h1>3. Command line options</h1>
-
-<h2>3.1 Standard Frotz options</h2>
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-a<em></em></tt></td>
-<td valign=top>For game debugging: watch attribute setting.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-A<em></em></tt></td>
-<td valign=top>For game debugging: watch attribute testing.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-b <em>colour</em></tt></td>
-<td valign=top>Set the background colour. The <em>colour</em> argument 
-is the number of a z-machine colour, in the range 2..9:</td></tr></tbody></table>
-
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-c <em>lines</em></tt></td>
-<td valign=top>Set the number of context lines.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-f <em>colour</em></tt></td>
-<td valign=top>Set the foreground colour.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-h <em>size</em></tt></td>
-<td valign=top>Set the z-machine screen height (see the <a href="#sNOTE">NOTE</a>).</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-i<em></em></tt></td>
-<td valign=top>Ignore non-fatal runtime errors.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-l <em>margin</em></tt></td>
-<td valign=top>Set the left margin.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-o<em></em></tt></td>
-<td valign=top>For game debugging: watch object movement.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-O<em></em></tt></td>
-<td valign=top>For game debugging: watch object locating.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-p<em></em></tt></td>
-<td valign=top>Alter the piracy opcode.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-r <em>margin</em></tt></td>
-<td valign=top>Set the right margin.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-R<em></em></tt></td>
-<td valign=top>Save/restore in the old Frotz format.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-s <em>seed</em></tt></td>
-<td valign=top>Set the random number seed value.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-S <em>width</em></tt></td>
-<td valign=top>Set the transcript width (in columns, default = 80).</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-t<em></em></tt></td>
-<td valign=top>Set the Tandy bit.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-u <em>number</em></tt></td>
-<td valign=top>Set the number of slots for multiple undo (default: 500).</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-w <em>size</em></tt></td>
-<td valign=top>Set the width of the z-machine screen to <em>size</em> (see the <a href="#sNOTE">NOTE</a>).</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-x<em></em></tt></td>
-<td valign=top>Expand abbreviations (g/x/z).</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-Z <em>level</em></tt></td>
-<td valign=top>Set the z-code error reporting level. Level can be:
-<table><tbody>
-<tr><td width=50 valign=top>0</td><td valign=top>don't report errors</td></tr>
-<tr><td width=50 valign=top>1</td><td valign=top>report only the first error</td></tr>
-<tr><td width=50 valign=top>2</td><td valign=top>report all errors</td></tr>
-<tr><td width=50 valign=top>3</td><td valign=top>exit after any error</td></tr>
-</tbody></table>
-</td></tr></tbody></table>
-
-
-
-<h2>3.2 Extended options</h2>
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-@<em>listfile</em></tt></td>
-<td valign=top>Use <a href="#nonblorb">resource files</a> listed in <i>listfile</i>.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-F<em></em></tt></td>
-<td valign=top>Run in fullscreen mode (see <a href="#sNOTE">NOTE</a>).</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-L<em></em></tt></td>
-<td valign=top>Use local <a href="#nonblorb">resource files</a>.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-m <em>msecs</em></tt></td>
-<td valign=top>Set the timer interrupt cycle to <em>msecs</em> milliseconds,
-instead of the default 100 (1/10 sec).</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-N <em>mode</em></tt></td>
-<td valign=top>Set the mode for creating default file names for save/script etc.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>-T<em></em></tt></td>
-<td valign=top>Use traditional in-game requests for file names, intead of on-screen
-dialogs.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt><a name="-V">-V</a><em></em></tt></td>
-<td valign=top>Force the use of default monospaced VGA font.</td></tr></tbody></table>
-
-
-
-<h1>4. Hot keys</h1>
-Sfrotz supports the same hot keys as standard Frotz, plus the Ctl-Alt-X combination for immediate
-exit, which may be used in case of emergency.<br>
-Note that these hot keys are enabled only when the z-machine is waiting for <i>line input</i> (for z-machine experts: @read opcode), whith the exception of Ctl-Alt-X which also works in <i>single character</i> input mode (@read_char opcode).<br>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-D<em></em></tt></td>
-<td valign=top>set debugging options</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-H<em></em></tt></td>
-<td valign=top>help (print the list of hot keys)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-N<em></em></tt></td>
-<td valign=top>new game (restart)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-P<em></em></tt></td>
-<td valign=top>playback on</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-R<em></em></tt></td>
-<td valign=top>recording on/off</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-S<em></em></tt></td>
-<td valign=top>set random number seed</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-U<em></em></tt></td>
-<td valign=top>undo one turn</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Alt-X<em></em></tt></td>
-<td valign=top>exit game (after confirmation)</td></tr></tbody></table>
-
-
-<table width=100%><tbody><tr><td width=120 valign=top><tt>Ctl-Alt-X<em></em></tt></td>
-<td valign=top>exit game immediately (no confirmation)</td></tr></tbody></table>
-
-
-
-<h1>5. The setup file</h1>
-
-<h2>5.1 Section <tt>[Interpreter]</tt></h2>
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Number = <em>number</em></tt></td>
-<td valign=top>Set the interpreter number (default is 4, i.e. Amiga Interpreter)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Error Reporting = <em>level</em></tt></td>
-<td valign=top>Set the error reporting level (same as the -Z option)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Ignore Errors = <em>0/1</em></tt></td>
-<td valign=top>Ignore (1) or not (0) non-fatal runtime errors.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Expand Abbreviations = <em>0/1</em></tt></td>
-<td valign=top>Set/reset expansion of g/x/z abbreviations. Expansion is useful for old v1
-games which do not understand such abbreviations. Default: 0 (the -x option can set this switch.)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Tandy Bit = <em>0/1</em></tt></td>
-<td valign=top>Set/reset the Tandy bit. Default: 0 (the -t option can set this switch.)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Quetzal Format = <em>0/1</em></tt></td>
-<td valign=top>Save/restore in Quetzal format when set, in old Frotz format when reset.
-Default: 1 (the -R option can only reset this switch.)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Wrap Script Lines = <em>nc</em></tt></td>
-<td valign=top>Set the width (number of columns) of the transcript to <i>nc</i>. Same
-as -S option.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>SaveNames = <em>mode</em></tt></td>
-<td valign=top></td></tr></tbody></table>
-
-
-<h2>5.2 Section <tt>[Window]</tt></h2>
-<a name="sNOTE"></a>
-Sfrotz has a hardwired default screen size of 640x400. The screen size can be changed by the values in this section, by the values found in the Reso chunck of a Blorb file, and finally by the -w and -h command line options (in that order). Note however that Sfrotz shall refuse to set a screen width less than 640 and/or a height less than 400.<br>
-<b>NOTE</b>: for normal (windowed) usage, the screen size should obviously be less than the PC screen resolution (taking into account also window decorations, taskbars etc.) For fullscreen usage, the size should preferably be one of those supported by the PC video driver; otherwise, SDL shall try to use the next higher available resolution, with black borders around the z-machine screen. In fullscreen mode, however, it may happen that for some strange resolutions SDL accepts the request, but the screen goes blank... In such a case, you may shut down the program by pressing Ctrl-Alt-X.<br><br>
-<table width=100%><tbody><tr><td width=250 valign=top><tt>AcWidth = <em>width</em></tt></td>
-<td valign=top>Set the screen width (default: 640)</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>AcHeight = <em>height</em></tt></td>
-<td valign=top>Set the screen height (default: 400)</td></tr></tbody></table>
-
-
-<h2>5.3 Section <tt>[Display]</tt></h2>
-This section is for future developments.
-
-<h2>5.4 Section <tt>[Fonts]</tt></h2>
-<table width=100%><tbody><tr><td width=250 valign=top><tt><a name="antialias">antialias</a> = <em>0/1</em></tt></td>
-<td valign=top>Set antialiased rendering
-of Truetype fonts off (0) or on (nonzero). Note that this option cannot
-be overridden by a command line switch.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt><a name="fontdir">fontdir</a> = <em>folder</em></tt></td>
-<td valign=top>Specify the directory containing the Truetype fonts.</td></tr></tbody></table>
-
-<p>The following eight statements specify the eight font faces used by the z-machine (not counting the
-so-called graphics font used in Beyond Zork, which is hardwired in the program), that is the normal TEXT_FONT and the monospaced FIXED_FONT, each in four styles (roman, bold, italic and bold+italic). A single face is specified by the file name (with its suffix!), optionally followed by an @ sign and a number, indicating the font size in pixels (default is 14). Multiple face files can be specified, separated by pipe (|) characters; Sfrotz shall use the first one it finds (see the example in the Appendix). This feature allows e.g. to use the same setup file on different systems.<br><br>
-<table width=100%><tbody><tr><td width=250 valign=top><tt><a name="font">textroman</a> = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for TEXT_FONT, 
-roman style</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>textbold = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for TEXT_FONT, bold style</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>textitalic = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for TEXT_FONT, italic style</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>textbolditalic = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for TEXT_FONT, bold and italic
-style</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>fixedroman = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for FIXED_FONT, roman style</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>fixedbold = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for FIXED_FONT, bold style</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>fixeditalic = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for FIXED_FONT, italic style</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>fixedbolditalic = <em>fontspec</em></tt></td>
-<td valign=top>Set the font file for FIXED_FONT, bold and
-italic style</td></tr></tbody></table>
-
-
-<h2>5.5 Section <tt>[Resources]</tt></h2>
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Dir = <em>folder</em></tt></td>
-<td valign=top>Specify the folder for individual graphics/sound resource files.</td></tr></tbody></table>
-
-<p>
-The following two statements specify the templates for the names of individual picture/sound files.
-Each template must contain exactly one C-style decimal format specifier (e.g. Pict%d) to be substituted by the resource number.
-<br><br>
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Pict = <em>template</em></tt></td>
-<td valign=top>Template for picture resource files.</td></tr></tbody></table>
-
-<table width=100%><tbody><tr><td width=250 valign=top><tt>Snd = <em>template</em></tt></td>
-<td valign=top>Template for sound resource files.</td></tr></tbody></table>
-
-
-
-<h1>6. Credits</h1>
-The original <a href="http://frotz.sourceforge.net/">Frotz</a> code was designed by Stefan Jokisch.<br>
-This port is heavily based on the <a href="http://www.davidkinder.co.uk/frotz.html">Windows port</a> by David Kinder.<br>
-The <a href="http://www.eblong.com/zarf/blorb/">Blorb</a> resource format and related software are by Andrew Plotkin.<br>
-The <a href="http://www.libsdl.org/">Simple DirectMedia Layer</a> library is the work of Sam Lantinga.<br>
-TrueType font rendering relies on the <a href="http://www.freetype.org/">freetype2</a> library.<br>
-Sound and music are rendered by the <a href="http://mikmod.raphnet.net/">MikMod</a> library.<br>
-PNG format images are decoded using <a href="http://www.libpng.org/">libpng</a> and <a href="http://www.zlib.net/">zlib</a>.<br>
-JPEG format images are decoded using the <a href="http://www.ijg.org/">IJG</a> software, whose authors kindly request us to state that<br>
-<em>"This software is based in part on the work of the Independent JPEG Group."</em>
-
-<br><br>Apologies to all those people and/or organisations who should have been mentioned, and were not :(
-<br>
-
-
-<h1>7. Appendix</h1>
-
-<h2>7.1 <a name="appendix1">Example setup file</a></h2>
-<pre><tt>
-# The # denotes the start of a comment
-# Everything after the # is ignored, up to the end of the line
-
-[Interpreter]
-SaveNames=date
-
-[Window]
-# The following entries are commented out
-# but they are the same as the hardwired defaults, anyway
-#AcWidth = 640
-#AcHeight = 400
-
-[Display]
-
-[Fonts]
-antialias=1
-fontdir=/usr/share/fonts/truetype/freefont
-textroman=arial.ttf@16|FreeSans.ttf@16
-textbold=arialbd.ttf@16|FreeSansBold.ttf@16
-textitalic=ariali.ttf@16|FreeSansOblique.ttf@16
-textbolditalic=arialbi.ttf@16|FreeSansBoldOblique.ttf@16
-fixedroman=cour.ttf@16|FreeMono.ttf@16
-fixedbold=courbd.ttf@16|FreeMonoBold.ttf@16
-fixeditalic=couri.ttf@16|FreeMonoOblique.ttf@16
-fixedbolditalic=courbi.ttf@16|FreeMonoBoldOblique.ttf@16
-
-[Resources]
-Dir=./        # the current dir
-Pict=PIC%d    # i.e. PIC1, PIC2, ...
-Snd=SND%d     # i.e. SND3, SND4, ...
-
-</tt></pre>
-
-<h2>7.2 <a name="appendix2">Example BLC file</a></h2>
-<pre><tt>
-Exec 0 ZCOD ani.z6
-
-Snd 13 FORM busyalone.au.aiff
-Snd 12 FORM s0020.au.aiff
-Snd 11 FORM s0154.au.aiff
-Snd 10 FORM s1484.au.aiff
-
-Pict 10 PNG edleft.png0.png
-Pict 11 PNG edleft.png1.png
-Pict 12 PNG edleft.png2.png
-Pict 13 PNG edleft.png3.png
-Pict 14 PNG edleft.png4.png
-Pict 15 PNG edleft.png5.png
-
-Pict 16 PNG lauhoh.png0.png
-Pict 17 PNG lauhoh.png1.png
-Pict 18 PNG lauhoh.png2.png
-
-Pict 19 PNG edfront.png0.png
-Pict 20 PNG edfront.png1.png
-Pict 21 PNG edfront.png2.png
-Pict 22 PNG edfront.png3.png
-Pict 23 PNG edfront.png4.png
-Pict 24 PNG edfront.png5.png
-
-Pict 25 PNG hoagie.png0.png
-Pict 26 PNG hoagie.png1.png
-
-Pict 30 PNG dott0.png
-</tt></pre>
-</body>
-</html>