liskon_frotz.git
5 years agoUse independent width and height scaling
Bill Lash [Wed, 2 Oct 2019 01:25:08 +0000 (20:25 -0500)]
Use independent width and height scaling

Calculate independent width and height scaling by a floating point
value based on the -W and -H options in sdl interface

5 years agoDelete references to special circumstances for setting text width.
David Griffith [Mon, 30 Sep 2019 00:30:39 +0000 (17:30 -0700)]
Delete references to special circumstances for setting text width.

Particularly with "again", which referenced something long since
deleted.  For the SDL interface, manually setting the text width could
be a very useful setting.  For the dumb and curses interfaces, one
generally wants the width to the be the same as the terminal.  Frotz has
always been able to automatically deal with the width of the terminal.

5 years agoFirst step of changing "screen height|width" to "text height|width".
David Griffith [Sun, 29 Sep 2019 23:51:55 +0000 (16:51 -0700)]
First step of changing "screen height|width" to "text height|width".

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.

5 years agoSpecify sfrotz colors with a name rather than number.
David Griffith [Sat, 28 Sep 2019 02:58:10 +0000 (19:58 -0700)]
Specify sfrotz colors with a name rather than number.

5 years agoMove stuff from os_init_setup() to init_setup().
David Griffith [Thu, 26 Sep 2019 20:44:16 +0000 (13:44 -0700)]
Move stuff from os_init_setup() to init_setup().

5 years agoSwitch over to using the z_header structure instead of a bunch of naked globals.
David Griffith [Tue, 24 Sep 2019 22:47:18 +0000 (15:47 -0700)]
Switch over to using the z_header structure instead of a bunch of naked globals.

5 years agoRemove duplicate -I flag from sfrotz.
David Griffith [Thu, 26 Sep 2019 20:03:09 +0000 (13:03 -0700)]
Remove duplicate -I flag from sfrotz.

Sfrotz was using this as an undocumented way to specify an alterate
setup file (alternate .sfrotz file).  Having a duplicate -I flag meant
that it was impossible to set the interpreter number.

5 years agoAdd tip on how to make sure the cursor color matches the foreground in Xterm.
David Griffith [Tue, 24 Sep 2019 21:00:33 +0000 (14:00 -0700)]
Add tip on how to make sure the cursor color matches the foreground in Xterm.

5 years agoAccidentally highlighted too much.
David Griffith [Tue, 24 Sep 2019 20:48:15 +0000 (13:48 -0700)]
Accidentally highlighted too much.

5 years agoRemove dead code file sf_aiffwav.c.
David Griffith [Tue, 24 Sep 2019 07:41:21 +0000 (00:41 -0700)]
Remove dead code file sf_aiffwav.c.

5 years agoRemove more dead code and debugging printf()s.
David Griffith [Tue, 24 Sep 2019 07:30:08 +0000 (00:30 -0700)]
Remove more dead code and debugging printf()s.

5 years agoRemove superfluous mystrdup() code.
David Griffith [Tue, 24 Sep 2019 07:27:39 +0000 (00:27 -0700)]
Remove superfluous mystrdup() code.

5 years agoRemove superfluous getopt() implementations and move to core.
David Griffith [Tue, 24 Sep 2019 02:32:25 +0000 (19:32 -0700)]
Remove superfluous getopt() implementations and move to core.

5 years agoRemove commented-out old code and debugging printf()s.
David Griffith [Tue, 24 Sep 2019 01:31:43 +0000 (18:31 -0700)]
Remove commented-out old code and debugging printf()s.

5 years agoRemove dead code file.
David Griffith [Tue, 24 Sep 2019 00:57:15 +0000 (17:57 -0700)]
Remove dead code file.

5 years agoConvert blorblow.h to K&R style.
David Griffith [Mon, 23 Sep 2019 21:29:34 +0000 (14:29 -0700)]
Convert blorblow.h to K&R style.

5 years agoConvert blorb.h to K&R style.
David Griffith [Mon, 23 Sep 2019 21:28:21 +0000 (14:28 -0700)]
Convert blorb.h to K&R style.

5 years agoConvert bctext.c to K&R style.
David Griffith [Mon, 23 Sep 2019 21:26:24 +0000 (14:26 -0700)]
Convert bctext.c to K&R style.

5 years agoConvert bcscreen.c to K&R style.
David Griffith [Mon, 23 Sep 2019 21:17:40 +0000 (14:17 -0700)]
Convert bcscreen.c to K&R style.

5 years agoConvert bcsample.c to K&R style.
David Griffith [Mon, 23 Sep 2019 21:12:45 +0000 (14:12 -0700)]
Convert bcsample.c to K&R style.

5 years agoConvert bcpic.c to K&R style.
David Griffith [Mon, 23 Sep 2019 21:08:36 +0000 (14:08 -0700)]
Convert bcpic.c to K&R style.

5 years agoConvert bcmouse.c to K&R style.
David Griffith [Mon, 23 Sep 2019 20:38:11 +0000 (13:38 -0700)]
Convert bcmouse.c to K&R style.

5 years agoConvert bcinput.c to K&R style.
David Griffith [Mon, 23 Sep 2019 20:10:07 +0000 (13:10 -0700)]
Convert bcinput.c to K&R style.

There may be trouble down the line.  When I tried to apply
"indent -linux" on this file, I got these error messages:
    indent: bcinput.c:324: Error:Stmt nesting error.
    indent: bcinput.c:1047: Error:Unexpected end of file
I then did the reindentation by hand.

5 years agoConvert bcinit.c to K&R style.
David Griffith [Mon, 23 Sep 2019 19:48:00 +0000 (12:48 -0700)]
Convert bcinit.c to K&R style.

5 years agoConvert bcblorb.c to K&R style.
David Griffith [Mon, 23 Sep 2019 19:31:43 +0000 (12:31 -0700)]
Convert bcblorb.c to K&R style.

DOS interface code post conversion is untested.

5 years agoConvert sf_video.c to K&R style.
David Griffith [Mon, 23 Sep 2019 19:24:51 +0000 (12:24 -0700)]
Convert sf_video.c to K&R style.

5 years agoConvert sf_util.c to K&R style.
David Griffith [Mon, 23 Sep 2019 19:11:27 +0000 (12:11 -0700)]
Convert sf_util.c to K&R style.

5 years agoConvert sf_sound.c to K&R style.
David Griffith [Mon, 23 Sep 2019 19:05:15 +0000 (12:05 -0700)]
Convert sf_sound.c to K&R style.

5 years agoConvert sf_sig.c to K&R style.
David Griffith [Mon, 23 Sep 2019 19:01:43 +0000 (12:01 -0700)]
Convert sf_sig.c to K&R style.

5 years agoConvert sf_resource.c to K&R style.
David Griffith [Tue, 24 Sep 2019 01:02:45 +0000 (18:02 -0700)]
Convert sf_resource.c to K&R style.

5 years agoConvert sf_resample.c to K&R style.
David Griffith [Mon, 23 Sep 2019 18:59:49 +0000 (11:59 -0700)]
Convert sf_resample.c to K&R style.

5 years agoConvert sf_osfdlg.c to K&R style.
David Griffith [Mon, 23 Sep 2019 18:58:01 +0000 (11:58 -0700)]
Convert sf_osfdlg.c to K&R style.

5 years agoConvert sf_msg_en.c to K&R style.
David Griffith [Mon, 23 Sep 2019 18:50:16 +0000 (11:50 -0700)]
Convert sf_msg_en.c to K&R style.

5 years agoConvert sf_images.c to K&R style.
David Griffith [Mon, 23 Sep 2019 18:47:54 +0000 (11:47 -0700)]
Convert sf_images.c to K&R style.

5 years agoConvert sf_ftype.c to K&R style.
David Griffith [Mon, 23 Sep 2019 18:42:01 +0000 (11:42 -0700)]
Convert sf_ftype.c to K&R style.

5 years agoConvert sf_frotz.h to K&R style.
David Griffith [Mon, 23 Sep 2019 18:36:05 +0000 (11:36 -0700)]
Convert sf_frotz.h to K&R style.

5 years agoConvert sf_fonts.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:37:32 +0000 (20:37 -0700)]
Convert sf_fonts.c to K&R style.

5 years agoConvert sf_font3.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:24:32 +0000 (20:24 -0700)]
Convert sf_font3.c to K&R style.

5 years agoConvert sf_aiffwav.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:18:30 +0000 (20:18 -0700)]
Convert sf_aiffwav.c to K&R style.

5 years agoConvert samplerate.h to K&R style.
David Griffith [Sun, 22 Sep 2019 03:16:03 +0000 (20:16 -0700)]
Convert samplerate.h to K&R style.

5 years agoConvert generic.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:11:44 +0000 (20:11 -0700)]
Convert generic.c to K&R style.

5 years agoConvert variable.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:06:36 +0000 (20:06 -0700)]
Convert variable.c to K&R style.

5 years agoConvert text.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:24:09 +0000 (19:24 -0700)]
Convert text.c to K&R style.

5 years agoConvert table.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:09:27 +0000 (19:09 -0700)]
Convert table.c to K&R style.

5 years agoConvert stream.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:06:36 +0000 (19:06 -0700)]
Convert stream.c to K&R style.

5 years agoConvert sound.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:02:30 +0000 (19:02 -0700)]
Convert sound.c to K&R style.

5 years agoConvert setup.h to K&R style.
David Griffith [Sun, 22 Sep 2019 01:57:54 +0000 (18:57 -0700)]
Convert setup.h to K&R style.

5 years agoConvert screen.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:54:53 +0000 (18:54 -0700)]
Convert screen.c to K&R style.

5 years agoConvert redirect.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:22:36 +0000 (18:22 -0700)]
Convert redirect.c to K&R style.

5 years agoConvert random.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:16:06 +0000 (18:16 -0700)]
Convert random.c to K&R style.

5 years agoConvert quetzal.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:12:52 +0000 (18:12 -0700)]
Convert quetzal.c to K&R style.

5 years agoConvert process.c to K&R style.
David Griffith [Sun, 22 Sep 2019 00:53:32 +0000 (17:53 -0700)]
Convert process.c to K&R style.

5 years agoConvert object.c to K&R style.
David Griffith [Sun, 22 Sep 2019 00:28:54 +0000 (17:28 -0700)]
Convert object.c to K&R style.

5 years agoConvert math.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:59:53 +0000 (16:59 -0700)]
Convert math.c to K&R style.

5 years agoConvert main.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:54:34 +0000 (16:54 -0700)]
Convert main.c to K&R style.

5 years agoConvert input.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:22:21 +0000 (16:22 -0700)]
Convert input.c to K&R style.

5 years agoConvert hotkey.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:02:57 +0000 (16:02 -0700)]
Convert hotkey.c to K&R style.

5 years agoConvert getopt.c to K&R style.
David Griffith [Sat, 21 Sep 2019 22:52:39 +0000 (15:52 -0700)]
Convert getopt.c to K&R style.

5 years agoConvert frotz.h to K&R style.
David Griffith [Sat, 21 Sep 2019 22:34:32 +0000 (15:34 -0700)]
Convert frotz.h to K&R style.

5 years agoConvert files.c to K&R style.
David Griffith [Sat, 21 Sep 2019 22:28:23 +0000 (15:28 -0700)]
Convert files.c to K&R style.

5 years agoConvert fastmem.c to K&R style.
David Griffith [Sat, 21 Sep 2019 02:22:55 +0000 (19:22 -0700)]
Convert fastmem.c to K&R style.

5 years agoConvert err.c to K&R style.
David Griffith [Sat, 21 Sep 2019 01:52:24 +0000 (18:52 -0700)]
Convert err.c to K&R style.

5 years agoConvert buffer.c to K&R style.
David Griffith [Sat, 21 Sep 2019 01:45:36 +0000 (18:45 -0700)]
Convert buffer.c to K&R style.

5 years agoConvert ux_text.c to K&R style.
David Griffith [Sat, 21 Sep 2019 01:31:57 +0000 (18:31 -0700)]
Convert ux_text.c to K&R style.

5 years agoConvert ux_setup.h to K&R style.
David Griffith [Fri, 20 Sep 2019 02:24:23 +0000 (19:24 -0700)]
Convert ux_setup.h to K&R style.

5 years agoConvert ux_sema.h to K&R style.
David Griffith [Fri, 20 Sep 2019 02:21:57 +0000 (19:21 -0700)]
Convert ux_sema.h to K&R style.

5 years agoConvert ux_screen.c to K&R style.
David Griffith [Fri, 20 Sep 2019 02:17:19 +0000 (19:17 -0700)]
Convert ux_screen.c to K&R style.

5 years agoConvert ux_resource.c to K&R style.
David Griffith [Fri, 20 Sep 2019 02:01:20 +0000 (19:01 -0700)]
Convert ux_resource.c to K&R style.

5 years agoConvert ux_pic.c to K&R style.
David Griffith [Fri, 20 Sep 2019 01:29:24 +0000 (18:29 -0700)]
Convert ux_pic.c to K&R style.

5 years agoConvert ux_input.c to K&R style.
David Griffith [Thu, 19 Sep 2019 23:10:08 +0000 (16:10 -0700)]
Convert ux_input.c to K&R style.

5 years agoConvert ux_init.c to K&R style.
David Griffith [Thu, 19 Sep 2019 22:10:12 +0000 (15:10 -0700)]
Convert ux_init.c to K&R style.

5 years agoConvert ux_blorb.h to K&R style.
David Griffith [Thu, 19 Sep 2019 06:09:40 +0000 (23:09 -0700)]
Convert ux_blorb.h to K&R style.

5 years agoConvert ux_blorb.c to K&R style.
David Griffith [Thu, 19 Sep 2019 06:08:19 +0000 (23:08 -0700)]
Convert ux_blorb.c to K&R style.

5 years agoConvert ux_audio_oss.c to K&R style.
David Griffith [Thu, 19 Sep 2019 06:01:14 +0000 (23:01 -0700)]
Convert ux_audio_oss.c to K&R style.

5 years agoConvert ux_audio_none.c to K&R style.
David Griffith [Thu, 19 Sep 2019 05:46:55 +0000 (22:46 -0700)]
Convert ux_audio_none.c to K&R style.

5 years agoConvert ux_audio.h to K&R style.
David Griffith [Thu, 19 Sep 2019 05:44:10 +0000 (22:44 -0700)]
Convert ux_audio.h to K&R style.

5 years agoConvert ux_audio.c to K&R style.
David Griffith [Thu, 19 Sep 2019 05:10:40 +0000 (22:10 -0700)]
Convert ux_audio.c to K&R style.

5 years agoConvert dumb_pic.c to K&R style.
David Griffith [Thu, 19 Sep 2019 04:37:18 +0000 (21:37 -0700)]
Convert dumb_pic.c to K&R style.

K&R style conversion for the dumb interface is now complete.

5 years agoConvert dumb_output.c to K&R style.
David Griffith [Wed, 18 Sep 2019 21:50:40 +0000 (14:50 -0700)]
Convert dumb_output.c to K&R style.

5 years agoConvert dumb_input.c to K&R style.
David Griffith [Wed, 18 Sep 2019 07:24:09 +0000 (00:24 -0700)]
Convert dumb_input.c to K&R style.

5 years agoConvert dumb_init.c to K&R style.
David Griffith [Wed, 18 Sep 2019 06:42:59 +0000 (23:42 -0700)]
Convert dumb_init.c to K&R style.

5 years agoConvert dumb_blorb.h to K&R style.
David Griffith [Wed, 18 Sep 2019 06:22:23 +0000 (23:22 -0700)]
Convert dumb_blorb.h to K&R style.

5 years agoConvert dumb_blorb.c to K&R style.
David Griffith [Wed, 18 Sep 2019 06:19:57 +0000 (23:19 -0700)]
Convert dumb_blorb.c to K&R style.

Here begins the process of converting the Frotz codebase to adhere to
the K&R coding style.  I'm doing one commit per file just in case
there's a problem later on.

5 years agoBuild common_defines and hash for DOS. No cross-compiling yet.
David Griffith [Wed, 18 Sep 2019 05:58:31 +0000 (22:58 -0700)]
Build common_defines and hash for DOS.  No cross-compiling yet.

What I'd like to do with this is to cross-compile for 16-bit DOS using
Watcom C executed under Unix.  That'll have to wait for another release.

5 years agoAdded -H option to sfrotz for showing extended options.
David Griffith [Wed, 18 Sep 2019 05:50:05 +0000 (22:50 -0700)]
Added -H option to sfrotz for showing extended options.

5 years agoHopefully partial rebuilds are finally fixed.
David Griffith [Wed, 18 Sep 2019 05:33:01 +0000 (22:33 -0700)]
Hopefully partial rebuilds are finally fixed.

5 years agoAdd some talk about color in curses.
David Griffith [Tue, 17 Sep 2019 22:17:14 +0000 (15:17 -0700)]
Add some talk about color in curses.

5 years agoFix problem with building on *BSD of mentions of blorblib when nothing to build.
David Griffith [Mon, 16 Sep 2019 02:00:41 +0000 (02:00 +0000)]
Fix problem with building on *BSD of mentions of blorblib when nothing to build.

5 years agoReword ncurses notes.
David Griffith [Mon, 16 Sep 2019 02:00:03 +0000 (19:00 -0700)]
Reword ncurses notes.

5 years agoMention the need for NetBSD users to install libao-sun.
David Griffith [Mon, 16 Sep 2019 01:46:12 +0000 (01:46 +0000)]
Mention the need for NetBSD users to install libao-sun.

5 years agoAdd some defines and ifndefs to omit headers missing from OpenBSD.
David Griffith [Fri, 13 Sep 2019 20:41:06 +0000 (13:41 -0700)]
Add some defines and ifndefs to omit headers missing from OpenBSD.

5 years agoDisable Immintrin (Intel Intrinsics Emulation) for OpenBSD
David Griffith [Fri, 13 Sep 2019 18:34:28 +0000 (11:34 -0700)]
Disable Immintrin (Intel Intrinsics Emulation) for OpenBSD

It's not like that will do much good for what Frotz does anyhow.

5 years agoAdding OS-specific section for OpenBSD.
David Griffith [Fri, 13 Sep 2019 18:18:23 +0000 (11:18 -0700)]
Adding OS-specific section for OpenBSD.

5 years agoTalk about locale for getting proper UTF-8 support in curses and dumb.
David Griffith [Sat, 14 Sep 2019 20:51:02 +0000 (13:51 -0700)]
Talk about locale for getting proper UTF-8 support in curses and dumb.

5 years agoUpdate INSTALL with curses discussion and OpenBSD library nomenclature.
David Griffith [Sat, 14 Sep 2019 20:50:28 +0000 (13:50 -0700)]
Update INSTALL with curses discussion and OpenBSD library nomenclature.

5 years agoDelete a.out when distcleaning.
David Griffith [Sat, 14 Sep 2019 00:48:37 +0000 (17:48 -0700)]
Delete a.out when distcleaning.

5 years agoMention Paul Gilbert in AUTHORS.
David Griffith [Fri, 13 Sep 2019 20:05:00 +0000 (13:05 -0700)]
Mention Paul Gilbert in AUTHORS.

5 years agoEdit colors on images with adaptive palettes.
Paul Gilbert [Fri, 13 Sep 2019 19:15:20 +0000 (12:15 -0700)]
Edit colors on images with adaptive palettes.

In Zork Zero and Arthur, some images have no palettes of their own.
These change their colors according to images plotted before.  Kevin
Bracy called these "adaptive palette pictures".  To deal with them, he
proposed an extension to the Blorb standard to add an "APal" chunk which
lists the images that have adaptive palettes.  The changes in this
commit make sfrotz read that chunk and then rewrite the palettes of
listed images when they are loaded.

This is described in much greater detail in
http://ifarchive.org/if-archive/programming/blorb/blorb-infocom-extension.txt

The work to correctly implement processing of adaptive palettes was done by Paul
Gilbert <dreammaster@scummvm.org>.  I, David Griffith, condensed what would have been
an irritatingly messy merge into a single commit and did general cleanup before
committing Paul's changes using his name.

5 years agoTypo zlip --> zlib
David Griffith [Fri, 13 Sep 2019 04:44:56 +0000 (04:44 +0000)]
Typo zlip --> zlib

5 years agoAdd a.out to .gitignore for NetBSD.
David Griffith [Fri, 13 Sep 2019 04:06:28 +0000 (04:06 +0000)]
Add a.out to .gitignore for NetBSD.