From 61b4a83db5ac66bbe847d2be9947b556da9666c0 Mon Sep 17 00:00:00 2001 From: David Griffith Date: Tue, 10 Jan 2012 01:58:15 -0800 Subject: [PATCH] Begining re-adding 2.44 code (this time cleanly for DOS) --- Makefile | 68 +++++++++++++++++++++++++++++++++------- src/blorb/blorblib.o | Bin 7276 -> 0 bytes src/common/buffer.c | 1 + src/common/fastmem.c | 1 + src/common/frotz.h | 13 +++++++- src/common/input.c | 10 ++++-- src/common/setup.h | 71 ++++++++++++++++++++++-------------------- src/curses/ux_frotz.h | 19 +++++++++-- src/curses/ux_init.c | 70 ++++++++++++++++++++++++++++++++++------- src/curses/ux_setup.h | 5 +++ src/dos/bcfrotz.h | 4 +-- src/dos/bcinit.c | 2 +- src/dos/bcsample.c | 6 ++-- src/sdl/sf_frotz.h | 4 +-- 14 files changed, 203 insertions(+), 71 deletions(-) delete mode 100644 src/blorb/blorblib.o diff --git a/Makefile b/Makefile index 64b4d96..28e871c 100644 --- a/Makefile +++ b/Makefile @@ -150,29 +150,56 @@ DUMB_OBJECT = $(DUMB_DIR)/dumb_init.o \ $(DUMB_DIR)/dumb_output.o \ $(DUMB_DIR)/dumb_pic.o -TARGETS = $(COMMON_TARGET) $(CURSES_TARGET) +SDL_DIR = $(SRCDIR)/sdl +SDL_TARGET = $(SRCDIR)/frotz_sdl.a +SDL_OBJECT = $(SDL_DIR)/sf_aiffwav.o \ + $(SDL_DIR)/sf_deffont.o \ + $(SDL_DIR)/sf_font3.o \ + $(SDL_DIR)/sf_fonts.o \ + $(SDL_DIR)/sf_ftype.o \ + $(SDL_DIR)/sf_images.o \ + $(SDL_DIR)/sf_msg_en.o \ + $(SDL_DIR)/sf_osfdlg.o \ + $(SDL_DIR)/sf_resample.o \ + $(SDL_DIR)/sf_resource.o \ + $(SDL_DIR)/sf_sig.o \ + $(SDL_DIR)/sf_sound.o \ + $(SDL_DIR)/sf_util.o \ + $(SDL_DIR)/sf_video.o + +# Blorb file handling +# +BLORB_DIR = $(SRCDIR)/blorb +BLORB_TARGET = $(SRCDIR)/blorblib.a +BLORB_OBJECT = $(BLORB_DIR)/blorblib.o + + +TARGETS = $(COMMON_TARGET) $(CURSES_TARGET) $(BLORB_TARGET) OPT_DEFS = -DCONFIG_DIR="\"$(CONFIG_DIR)\"" $(CURSES_DEF) \ - -DVERSION="\"$(VERSION)\"" -DSOUND_DEV="\"$(SOUND_DEV)\"" + -DVERSION="\"$(VERSION)\"" -COMP_DEFS = $(OPT_DEFS) $(COLOR_DEFS) $(SOUND_DEFS) $(SOUNDCARD) \ +CURSES_DEFS = $(OPT_DEFS) $(COLOR_DEFS) $(SOUND_DEFS) $(SOUNDCARD) \ $(MEMMOVE_DEF) -FLAGS = $(OPTS) $(COMP_DEFS) $(INCL) +FLAGS = $(OPTS) $(CURSES_DEFS) $(INCL) $(NAME): $(NAME)-curses - -$(NAME)-curses: soundcard.h $(COMMON_TARGET) $(CURSES_TARGET) - $(CC) -o $(BINNAME)$(EXTENSION) $(TARGETS) $(LIB) $(CURSES) \ - $(SOUND_LIB) +curses: $(NAME)-curses +$(NAME)-curses: soundcard.h $(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) - $(CC) -o d$(BINNAME)$(EXTENSION) $(COMMON_TARGET) \ - $(DUMB_TARGET) $(LIB) + $(CC) -o d$(BINNAME)$(EXTENSION) $(COMMON_TARGET) $(DUMB_TARGET) $(LIB) + +sdl: $(NAME)-sdl +s$(NAME): $(NAME)-sdl +$(NAME)-sdl: $(COMMON_TARGET) $(SDL_TARGET) + $(CC) -o s$(BINNAME) $(COMMON_TARGET) $(SDL_TARGET) $(SDL_LIBS) .SUFFIXES: .SUFFIXES: .c .o .h @@ -207,6 +234,23 @@ $(DUMB_TARGET): $(DUMB_OBJECT) ranlib $(DUMB_TARGET) @echo +sdl_lib: $(SDL_TARGET) +$(SDL_TARGET): $(SDL_OBJECT) + @echo + @echo "Archiving SDL interface code..." + ar rc $(SDL_TARGET) $(SDL_OBJECT) + ranlib $(SDL_TARGET) + @echo + +blorb_lib: $(BLORB_TARGET) +$(BLORB_TARGET): $(BLORB_OBJECT) + @echo + @echo "Archiving Blorb file handling code..." + ar rc $(BLORB_TARGET) $(BLORB_OBJECT) + ranlib $(BLORB_TARGET) + @echo + + soundcard.h: @if [ ! -f $(SRCDIR)/soundcard.h ] ; then \ sh $(SRCDIR)/misc/findsound.sh $(SRCDIR); \ @@ -257,10 +301,10 @@ dist: distclean clean: rm -f $(SRCDIR)/*.h $(SRCDIR)/*.a - rm -f $(COMMON_DIR)/*.o $(CURSES_DIR)/*.o $(DUMB_DIR)/*.o + rm -f $(COMMON_DIR)/*.o $(CURSES_DIR)/*.o $(DUMB_DIR)/*.o $(BLORB_DIR)/*.o $(SDL_DIR)/*.o distclean: clean - rm -f $(BINNAME)$(EXTENSION) d$(BINNAME)$(EXTENSION) + rm -f $(BINNAME)$(EXTENSION) d$(BINNAME)$(EXTENSION) s$(BINNAME) rm -f $(BINNAME).exe $(BINNAME).bak $(BINNAME).lib rm -f *core $(SRCDIR)/*core -rm -rf $(distdir) diff --git a/src/blorb/blorblib.o b/src/blorb/blorblib.o deleted file mode 100644 index 4dfc2c957edc902555df847fec9151ea7a4e76c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7276 zcmb7Ie^6Z4b$$yg>0z(@R$&!wToP}SjZ9=23k^=SB5L`ehhs~NF|d}V)&?!GL`1+U z%UcP>T1E2PO}M?@;~RJH%v3VYxD4TG;@lWkQjoJkgR{S z^3W>o{5u*Bk7k};FXq|X4cLIoTy=5x@EjVyGw`{%d}uYVbly|td<>%6dTE$8dMw;G zI=#AYaf5xk9&ONPuwLe27yr6D{Y&Kse-B|^;VHdQdeKm?(>{heL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zBZ~1$M1fH*GC@ufeF>D#y&0fDv=)^1d7LQr z`4WJR^qnV)@ehe&{M$Ht-k(d-KN7|KIpjC#F9uK&AF$|dfMy!HELavr5 #include "frotz.h" extern void stream_char (zchar); diff --git a/src/common/fastmem.c b/src/common/fastmem.c index 12ab84b..694c421 100644 --- a/src/common/fastmem.c +++ b/src/common/fastmem.c @@ -58,6 +58,7 @@ extern void script_open (void); extern void script_close (void); extern FILE *os_path_open (const char *, const char *); +extern FILE *os_load_story (void); extern zword save_quetzal (FILE *, FILE *); extern zword restore_quetzal (FILE *, FILE *); diff --git a/src/common/frotz.h b/src/common/frotz.h index debcbe4..a1c1a41 100644 --- a/src/common/frotz.h +++ b/src/common/frotz.h @@ -65,6 +65,14 @@ typedef unsigned char zchar; #define STACK_SIZE 1024 #endif +/* Assorted filename extensions */ + +#define EXT_SAVE ".qzl" +#define EXT_SCRIPT ".scr" +#define EXT_BLORB ".blb" +#define EXT_COMMAND ".rec" +#define EXT_AUX ".aux" + #ifndef DEFAULT_SAVE_NAME #define DEFAULT_SAVE_NAME "story.sav" #endif @@ -371,7 +379,6 @@ extern zbyte *zmp; /*** Story file header data ***/ - extern zbyte h_version; extern zbyte h_config; extern zword h_release; @@ -631,6 +638,10 @@ void runtime_error (int); #define ERR_DEFAULT_REPORT_MODE ERR_REPORT_ONCE +/*** Assorted initialization functions ***/ +void init_buffer (void); +void init_process (void); +void init_sound (void); /*** Various global functions ***/ diff --git a/src/common/input.c b/src/common/input.c index 370d554..ae65d03 100644 --- a/src/common/input.c +++ b/src/common/input.c @@ -294,8 +294,14 @@ void z_read_char (void) /* Store key */ - store (translate_to_zscii (key)); - + /* For timeouts, make sure translate_to_zscii() won't try to convert + * 0x00. We should instead return 0x00 as is. + * Thanks to Peter Seebach. + */ + if (key == 0) + store(key); + else + store (translate_to_zscii (key)); }/* z_read_char */ /* diff --git a/src/common/setup.h b/src/common/setup.h index a9b9360..28e0d25 100644 --- a/src/common/setup.h +++ b/src/common/setup.h @@ -24,44 +24,47 @@ typedef struct frotz_setup_struct { extern f_setup_t f_setup; - +/*** Story file header data ***/ +/* typedef struct zcode_header_struct { - zbyte h_version; - zbyte h_config; - zword h_release; - zword h_resident_size; - zword h_start_pc; - zword h_dictionary; - zword h_objects; - zword h_globals; - zword h_dynamic_size; - zword h_flags; - zbyte h_serial[6]; - zword h_abbreviations; - zword h_file_size; - zword h_checksum; - zbyte h_interpreter_number; - zbyte h_interpreter_version; - zbyte h_screen_rows; - zbyte h_screen_cols; - zword h_screen_width; - zword h_screen_height; - zbyte h_font_height; - zbyte h_font_width; - zword h_functions_offset; - zword h_strings_offset; - zbyte h_default_background; - zbyte h_default_foreground; - zword h_terminating_keys; - zword h_line_width; - zbyte h_standard_high; - zbyte h_standard_low; - zword h_alphabet; - zword h_extension_table; - zbyte h_user_name[8]; + zbyte version; + zbyte config; + zword release; + zword resident_size; + zword start_pc; + zword dictionary; + zword objects; + zword globals; + zword dynamic_size; + zword flags; + zbyte serial[6]; + zword abbreviations; + zword file_size; + zword checksum; + zbyte interpreter_number; + zbyte interpreter_version; + zbyte screen_rows; + zbyte screen_cols; + zword screen_width; + zword screen_height; + zbyte font_height; + zbyte font_width; + zword functions_offset; + zword strings_offset; + zbyte default_background; + zbyte default_foreground; + zword terminating_keys; + zword line_width; + zbyte standard_high; + zbyte standard_low; + zword alphabet; + zword extension_table; + zbyte user_name[8]; zword hx_table_size; zword hx_mouse_x; zword hx_mouse_y; zword hx_unicode_table; } z_header_t; +extern z_header_t z_header; +*/ diff --git a/src/curses/ux_frotz.h b/src/curses/ux_frotz.h index f055b73..19855eb 100644 --- a/src/curses/ux_frotz.h +++ b/src/curses/ux_frotz.h @@ -6,6 +6,7 @@ */ #include "../common/frotz.h" +#include "../blorb/blorb.h" #include "ux_setup.h" #define MASTER_CONFIG "frotz.conf" @@ -78,15 +79,29 @@ extern f_setup_t f_setup; extern u_setup_t u_setup; +/*** Blorb related stuff ***/ +bb_err_t blorb_err; +bb_map_t *blorb_map; +bb_result_t blorb_res; + + /*** Functions specific to the Unix port of Frotz ***/ -bool unix_init_pictures(void); /* ux_pic */ +bool unix_init_pictures(void); /* ux_pic.c */ +bool unix_init_pictures(void); /* ux_pic.c */ +void unix_init_scrollback(void); /* ux_screen.c */ +void unix_save_screen(int); /* ux_screen.c */ +void unix_do_scrollback(void); /* ux_screen.c */ + + + int getconfig(char *); int geterrmode(char *); int getcolor(char *); int getbool(char *); FILE *pathopen(const char *, const char *, const char *, char *); -void sig_winch_handler(int); +void sigwinch_handler(int); +void sigint_handler(int); void redraw(void); diff --git a/src/curses/ux_init.c b/src/curses/ux_init.c index 9f5b12f..95cd6f7 100644 --- a/src/curses/ux_init.c +++ b/src/curses/ux_init.c @@ -30,6 +30,7 @@ #include #include +#include /* We will use our own private getopt functions. */ #include "getopt.h" @@ -55,9 +56,9 @@ Syntax: frotz [options] story-file\n\ -a watch attribute setting \t -O watch object locating\n\ -A watch attribute testing \t -p plain ASCII output only\n\ -b # background color \t -P alter piracy opcode\n\ - -c # context lines \t -r # right margin\n\ - -d disable color \t -q quiet (disable sound effects)\n\ - -e enable sound \t -Q use old-style save format\n\ + -c # context lines \t -q quiet (disable sound effects)\n\ + -d disable color \t -Q use old-style save format\n\ + -e enable sound \t -r # right margin\n\ -f # foreground color \t -s # random number seed value\n\ -F Force color mode \t -S # transscript width\n\ -h # screen height \t -t set Tandy bit\n\ @@ -161,9 +162,12 @@ void os_process_arguments (int argc, char *argv[]) /* if (signal(SIGWINCH, SIG_IGN) != SIG_IGN) - signal(SIGWINCH, sig_winch_handler); + signal(SIGWINCH, sigwinch_handler); */ + if (signal(SIGINT, SIG_IGN) != SIG_IGN) + signal(SIGINT, sigint_handler); + /* First check for a "$HOME/.frotzrc". */ /* If not found, look for CONFIG_DIR/frotz.conf */ /* $HOME/.frotzrc overrides CONFIG_DIR/frotz.conf */ @@ -188,6 +192,8 @@ void os_process_arguments (int argc, char *argv[]) case 'A': f_setup.attribute_testing = 1; break; case 'b': u_setup.background_color = atoi(optarg); + u_setup.force_color = 1; + u_setup.disable_color = 0; if ((u_setup.background_color < 2) || (u_setup.background_color > 9)) u_setup.background_color = -1; @@ -195,11 +201,15 @@ void os_process_arguments (int argc, char *argv[]) case 'c': f_setup.context_lines = atoi(optarg); break; case 'd': u_setup.disable_color = 1; break; case 'e': f_setup.sound = 1; break; - case 'f': u_setup.foreground_color = atoi(optarg); + case 'f': u_setup.foreground_color = getcolor(optarg); + u_setup.force_color = 1; + u_setup.disable_color = 0; if ((u_setup.foreground_color < 2) || (u_setup.foreground_color > 9)) - u_setup.foreground_color = -1; + u_setup.foreground_color = -1; break; + + case 'F': u_setup.force_color = 1; u_setup.disable_color = 0; break; @@ -529,6 +539,33 @@ FILE *os_path_open(const char *name, const char *mode) return NULL; /* give up */ } /* os_path_open() */ +/* + * os_load_story + * + * This is different from os_path_open() because we need to see if the + * story file is actually a chunk inside a blorb file. Right now we're + * looking only at the exact path we're given on the command line. + * + * Open a file in the current directory. If this fails, then search the + * directories in the ZCODE_PATH environmental variable. If that's not + * defined, search INFOCOM_PATH. + * + */ +FILE *os_load_story(void) +{ + FILE *fp; + + /* Did we build a valid blorb map? */ + if (u_setup.exec_in_blorb) { + fp = fopen(u_setup.blorb_file, "rb"); + fseek(fp, blorb_res.data.startpos, SEEK_SET); + } else { + fp = fopen(story_name, "rb"); + } + return fp; +} + + /* * pathopen * @@ -826,14 +863,14 @@ int geterrmode(char *value) /* - * sig_winch_handler + * sigwinch_handler * * Called whenever Frotz recieves a SIGWINCH signal to make curses * cleanly resize the window. * */ -void sig_winch_handler(int sig) +void sigwinch_handler(int sig) { /* There are some significant problems involved in getting resizes to work @@ -843,13 +880,22 @@ explaination for this. Because of this trouble, this function currently does nothing. */ +} + /* - signal(sig, SIG_DFL); - signal(sig, SIG_IGN); + * sigint_handler + * Sometimes the screen will be left in a weird state if the following + * is not done. + * + */ +void sigint_handler(int dummy) +{ + signal(SIGINT, sigint_handler); + scrollok(stdscr, TRUE); scroll(stdscr); + refresh(); endwin(); - signal(SIGWINCH, sig_winch_handler); -*/ + exit(1); } void redraw(void) diff --git a/src/curses/ux_setup.h b/src/curses/ux_setup.h index 1a16770..a332919 100644 --- a/src/curses/ux_setup.h +++ b/src/curses/ux_setup.h @@ -13,6 +13,11 @@ typedef struct unix_setup_struct { int current_color; /* ux_text.c ux_screen.c */ bool color_enabled; /* ux_init.c ux_pic.c ux_text.c */ + char *blorb_name; + char *blorb_file; + bool use_blorb; + bool exec_in_blorb; + int interpreter; /* see frotz.h */ } u_setup_t; diff --git a/src/dos/bcfrotz.h b/src/dos/bcfrotz.h index fe5f00e..26c642c 100644 --- a/src/dos/bcfrotz.h +++ b/src/dos/bcfrotz.h @@ -92,8 +92,8 @@ extern volatile int end_of_sound_flag; /* BCpic */ void reset_pictures (void); #ifdef SOUND_SUPPORT -/* BCsmpl */ bool init_sound (void); -/* BCsmpl */ void reset_sound (void); +/* BCsmpl */ bool dos_init_sound (void); +/* BCsmpl */ void dos_reset_sound (void); #endif /* BCtext */ void switch_scrn_attr (bool); /* BCtext */ void load_fonts (void); diff --git a/src/dos/bcinit.c b/src/dos/bcinit.c index 817708f..8136ba3 100644 --- a/src/dos/bcinit.c +++ b/src/dos/bcinit.c @@ -169,7 +169,7 @@ static void cleanup (void) { #ifdef SOUND_SUPPORT - reset_sound (); + dos_reset_sound (); #endif reset_pictures (); diff --git a/src/dos/bcsample.c b/src/dos/bcsample.c index fd1c44f..33c41a4 100644 --- a/src/dos/bcsample.c +++ b/src/dos/bcsample.c @@ -198,13 +198,13 @@ bool dos_init_sound (void) }/* init_sound */ /* - * reset_sound + * dos_reset_sound * * Free resources allocated for playing samples. * */ -void reset_sound (void) +void dos_reset_sound (void) { os_stop_sample (); @@ -218,7 +218,7 @@ void reset_sound (void) sound_adr = 0; } -}/* reset_sound */ +}/* dos_reset_sound */ #endif /* SOUND_SUPPORT */ diff --git a/src/sdl/sf_frotz.h b/src/sdl/sf_frotz.h index d1b9d71..393d697 100644 --- a/src/sdl/sf_frotz.h +++ b/src/sdl/sf_frotz.h @@ -1,8 +1,8 @@ #ifndef _SF_FROTZ_H #define _SF_FROTZ_H -#include "frotz.h" -#include "blorb.h" +#include "../common/frotz.h" +#include "../blorb/blorb.h" // version info #define SFROTZ_MAJOR 0 -- 2.34.1