1 /* 2 * ux_frotz.h 3 * 4 * Unix interface, declarations, definitions, and defaults 5 * 6 */ 7 8 #ifndef UX_FROTZ_H 9 #define UX_FROTZ_H 10 11 #include <signal.h> 12 13 #include "../common/frotz.h" 14 #include "../blorb/blorb.h" 15 #include "../blorb/blorblow.h" 16 #include "ux_setup.h" 17 18 #define MASTER_CONFIG "frotz.conf" 19 #define USER_CONFIG ".frotzrc" 20 #define ASCII_DEF 1 21 #define ATTRIB_ASSIG_DEF 0 22 #define ATTRIB_TEST_DEF 0 23 #define COLOR_DEF 1 24 #define ERROR_HALT_DEF 0 25 #define EXPAND_DEF 0 26 #define PIRACY_DEF 0 27 #define TANDY_DEF 0 28 #define OBJ_MOVE_DEF 0 29 #define OBJ_LOC_DEF 0 30 #define BACKGROUND_DEF BLACK_COLOUR 31 #define FOREGROUND_DEF WHITE_COLOUR 32 #define HEIGHT_DEF -1 /* let curses figure it out */ 33 #define CONTEXTLINES_DEF 0 34 #define WIDTH_DEF 80 35 #define TWIDTH_DEF 80 36 #define SEED_DEF -1 37 #define SLOTS_DEF MAX_UNDO_SLOTS 38 #define LMARGIN_DEF 0 39 #define RMARGIN_DEF 0 40 #define ERR_REPORT_DEF ERR_REPORT_ONCE 41 #define QUETZAL_DEF 1 42 #define SAVEDIR_DEF "if-saves" 43 #define ZCODEPATH_DEF "/usr/games/zcode:/usr/local/games/zcode" 44 45 46 #define LINELEN 256 /* for getconfig() */ 47 #define COMMENT '#' /* for config files */ 48 #define PATHSEP ':' /* for pathopen() */ 49 #define DIRSEP '/' /* for pathopen() */ 50 51 #define EDITMODE_EMACS 0 52 #define EDITMODE_VI 1 53 54 #define PIC_NUMBER 0 55 #define PIC_WIDTH 2 56 #define PIC_HEIGHT 4 57 #define PIC_FLAGS 6 58 #define PIC_DATA 8 59 #define PIC_COLOUR 11 60 61 62 /* Paths where z-files may be found */ 63 #define PATH1 "ZCODE_PATH" 64 #define PATH2 "INFOCOM_PATH" 65 66 #define MAX(x,y) ((x)>(y)) ? (x) : (y) 67 #define MIN(x,y) ((x)<(y)) ? (x) : (y) 68 69 /* Some regular curses (not ncurses) libraries don't do this correctly. */ 70 #ifndef getmaxyx 71 #define getmaxyx(w, y, x) (y) = getmaxy(w), (x) = getmaxx(w) 72 #endif 73 74 extern bool color_enabled; /* ux_text */ 75 76 extern char stripped_story_name[FILENAME_MAX+1]; 77 extern char semi_stripped_story_name[FILENAME_MAX+1]; 78 extern char *progname; 79 extern char *gamepath; /* use to find sound files */ 80 81 extern f_setup_t f_setup; 82 extern u_setup_t u_setup; 83 84 extern volatile sig_atomic_t terminal_resized; 85 86 /*** Functions specific to the Unix port of Frotz ***/ 87 88 bool unix_init_pictures(void); /* ux_pic.c */ 89 // void unix_init_scrollback(void); /* ux_screen.c */ 90 // void unix_save_screen(int); /* ux_screen.c */ 91 // void unix_do_scrollback(void); /* ux_screen.c */ 92 void unix_resize_display(void); /* ux_screen.c */ 93 void unix_suspend_program(void); /* ux_screen.c */ 94 void unix_get_terminal_size(void); /* ux_init.c */ 95 96 FILE *os_path_open(const char *, const char *); 97 98 #ifdef NO_STRRCHR 99 char *my_strrchr(const char *, int); 100 #define strrchr my_strrchr 101 #endif 102 103 #endif /* UX_FROTZ_H */ 104