Bill Lash [Wed, 2 Oct 2019 23:42:24 +0000 (18:42 -0500)]
Cap the maximum indexes into image
Make sure not to index past the right and/or bottom edge of the
image while scaling.
Bill Lash [Wed, 2 Oct 2019 02:56:47 +0000 (21:56 -0500)]
Make sure to round up the scaling
Use ceil to make sure to round up the scaling increment to get all
of the picture
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
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.
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.
David Griffith [Sat, 28 Sep 2019 02:58:10 +0000 (19:58 -0700)]
Specify sfrotz colors with a name rather than number.
David Griffith [Thu, 26 Sep 2019 20:44:16 +0000 (13:44 -0700)]
Move stuff from os_init_setup() to init_setup().
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.
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.
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.
David Griffith [Tue, 24 Sep 2019 20:48:15 +0000 (13:48 -0700)]
Accidentally highlighted too much.
David Griffith [Tue, 24 Sep 2019 07:41:21 +0000 (00:41 -0700)]
Remove dead code file sf_aiffwav.c.
David Griffith [Tue, 24 Sep 2019 07:30:08 +0000 (00:30 -0700)]
Remove more dead code and debugging printf()s.
David Griffith [Tue, 24 Sep 2019 07:27:39 +0000 (00:27 -0700)]
Remove superfluous mystrdup() code.
David Griffith [Tue, 24 Sep 2019 02:32:25 +0000 (19:32 -0700)]
Remove superfluous getopt() implementations and move to core.
David Griffith [Tue, 24 Sep 2019 01:31:43 +0000 (18:31 -0700)]
Remove commented-out old code and debugging printf()s.
David Griffith [Tue, 24 Sep 2019 00:57:15 +0000 (17:57 -0700)]
Remove dead code file.
David Griffith [Mon, 23 Sep 2019 21:29:34 +0000 (14:29 -0700)]
Convert blorblow.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.
David Griffith [Mon, 23 Sep 2019 21:26:24 +0000 (14:26 -0700)]
Convert bctext.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.
David Griffith [Mon, 23 Sep 2019 21:12:45 +0000 (14:12 -0700)]
Convert bcsample.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.
David Griffith [Mon, 23 Sep 2019 20:38:11 +0000 (13:38 -0700)]
Convert bcmouse.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.
David Griffith [Mon, 23 Sep 2019 19:48:00 +0000 (12:48 -0700)]
Convert bcinit.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.
David Griffith [Mon, 23 Sep 2019 19:24:51 +0000 (12:24 -0700)]
Convert sf_video.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.
David Griffith [Mon, 23 Sep 2019 19:05:15 +0000 (12:05 -0700)]
Convert sf_sound.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.
David Griffith [Tue, 24 Sep 2019 01:02:45 +0000 (18:02 -0700)]
Convert sf_resource.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.
David Griffith [Mon, 23 Sep 2019 18:58:01 +0000 (11:58 -0700)]
Convert sf_osfdlg.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.
David Griffith [Mon, 23 Sep 2019 18:47:54 +0000 (11:47 -0700)]
Convert sf_images.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.
David Griffith [Mon, 23 Sep 2019 18:36:05 +0000 (11:36 -0700)]
Convert sf_frotz.h 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.
David Griffith [Sun, 22 Sep 2019 03:24:32 +0000 (20:24 -0700)]
Convert sf_font3.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.
David Griffith [Sun, 22 Sep 2019 03:16:03 +0000 (20:16 -0700)]
Convert samplerate.h to K&R style.
David Griffith [Sun, 22 Sep 2019 03:11:44 +0000 (20:11 -0700)]
Convert generic.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.
David Griffith [Sun, 22 Sep 2019 02:24:09 +0000 (19:24 -0700)]
Convert text.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.
David Griffith [Sun, 22 Sep 2019 02:06:36 +0000 (19:06 -0700)]
Convert stream.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.
David Griffith [Sun, 22 Sep 2019 01:57:54 +0000 (18:57 -0700)]
Convert setup.h to K&R style.
David Griffith [Sun, 22 Sep 2019 01:54:53 +0000 (18:54 -0700)]
Convert screen.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.
David Griffith [Sun, 22 Sep 2019 01:16:06 +0000 (18:16 -0700)]
Convert random.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.
David Griffith [Sun, 22 Sep 2019 00:53:32 +0000 (17:53 -0700)]
Convert process.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.
David Griffith [Sat, 21 Sep 2019 23:59:53 +0000 (16:59 -0700)]
Convert math.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.
David Griffith [Sat, 21 Sep 2019 23:22:21 +0000 (16:22 -0700)]
Convert input.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.
David Griffith [Sat, 21 Sep 2019 22:52:39 +0000 (15:52 -0700)]
Convert getopt.c to K&R style.
David Griffith [Sat, 21 Sep 2019 22:34:32 +0000 (15:34 -0700)]
Convert frotz.h to K&R style.
David Griffith [Sat, 21 Sep 2019 22:28:23 +0000 (15:28 -0700)]
Convert files.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.
David Griffith [Sat, 21 Sep 2019 01:52:24 +0000 (18:52 -0700)]
Convert err.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.
David Griffith [Sat, 21 Sep 2019 01:31:57 +0000 (18:31 -0700)]
Convert ux_text.c 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.
David Griffith [Fri, 20 Sep 2019 02:21:57 +0000 (19:21 -0700)]
Convert ux_sema.h 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.
David Griffith [Fri, 20 Sep 2019 02:01:20 +0000 (19:01 -0700)]
Convert ux_resource.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.
David Griffith [Thu, 19 Sep 2019 23:10:08 +0000 (16:10 -0700)]
Convert ux_input.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.
David Griffith [Thu, 19 Sep 2019 06:09:40 +0000 (23:09 -0700)]
Convert ux_blorb.h 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.
David Griffith [Thu, 19 Sep 2019 06:01:14 +0000 (23:01 -0700)]
Convert ux_audio_oss.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.
David Griffith [Thu, 19 Sep 2019 05:44:10 +0000 (22:44 -0700)]
Convert ux_audio.h 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.
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.
David Griffith [Wed, 18 Sep 2019 21:50:40 +0000 (14:50 -0700)]
Convert dumb_output.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.
David Griffith [Wed, 18 Sep 2019 06:42:59 +0000 (23:42 -0700)]
Convert dumb_init.c 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.
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.
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.
David Griffith [Wed, 18 Sep 2019 05:50:05 +0000 (22:50 -0700)]
Added -H option to sfrotz for showing extended options.
David Griffith [Wed, 18 Sep 2019 05:33:01 +0000 (22:33 -0700)]
Hopefully partial rebuilds are finally fixed.
David Griffith [Tue, 17 Sep 2019 22:17:14 +0000 (15:17 -0700)]
Add some talk about color in curses.
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.
David Griffith [Mon, 16 Sep 2019 02:00:03 +0000 (19:00 -0700)]
Reword ncurses notes.
David Griffith [Mon, 16 Sep 2019 01:46:12 +0000 (01:46 +0000)]
Mention the need for NetBSD users to install libao-sun.
David Griffith [Fri, 13 Sep 2019 20:41:06 +0000 (13:41 -0700)]
Add some defines and ifndefs to omit headers missing from 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.
David Griffith [Fri, 13 Sep 2019 18:18:23 +0000 (11:18 -0700)]
Adding OS-specific section for OpenBSD.
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.
David Griffith [Sat, 14 Sep 2019 20:50:28 +0000 (13:50 -0700)]
Update INSTALL with curses discussion and OpenBSD library nomenclature.
David Griffith [Sat, 14 Sep 2019 00:48:37 +0000 (17:48 -0700)]
Delete a.out when distcleaning.
David Griffith [Fri, 13 Sep 2019 20:05:00 +0000 (13:05 -0700)]
Mention Paul Gilbert in AUTHORS.
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.