liskon_frotz.git
5 years agoShould exit successfully when printing version and usage info.
David Griffith [Tue, 22 Oct 2019 10:29:08 +0000 (03:29 -0700)]
Should exit successfully when printing version and usage info.

5 years agoAdd some names to AUTHORS.
David Griffith [Thu, 17 Oct 2019 07:18:23 +0000 (00:18 -0700)]
Add some names to AUTHORS.

5 years agoForgot to update this file for beta 2.
David Griffith [Thu, 17 Oct 2019 07:05:39 +0000 (00:05 -0700)]
Forgot to update this file for beta 2.

5 years agoMention fixing the DOS crash problem.
David Griffith [Thu, 17 Oct 2019 06:56:07 +0000 (23:56 -0700)]
Mention fixing the DOS crash problem.

5 years agoBump version to 2.50b2 for second beta test.
David Griffith [Thu, 17 Oct 2019 06:33:11 +0000 (23:33 -0700)]
Bump version to 2.50b2 for second beta test.

5 years agoAllow .sfrotzrc to have fontdir specified relative to $HOME.
David Griffith [Thu, 17 Oct 2019 06:30:11 +0000 (23:30 -0700)]
Allow .sfrotzrc to have fontdir specified relative to $HOME.

5 years agoMerge branch 'new_dos' into 'master'
David Griffith [Thu, 17 Oct 2019 04:48:00 +0000 (04:48 +0000)]
Merge branch 'new_dos' into 'master'

Make sure not to overflow 16bit int

See merge request DavidGriffith/frotz!127
See also commentary at DavidGriffith/frotz#163 (Potential trouble in DOS with strange malloc()s) for a detailed account of this.

5 years agoMake sure not to overflow 16bit int
Bill Lash [Wed, 16 Oct 2019 01:43:58 +0000 (20:43 -0500)]
Make sure not to overflow 16bit int

In turbo c ints are 16 bits.  When mallocing memory for the undo_diff
it was possible to overflow the the 16 bits, and malloc much less
than needed.

5 years agoAdd mention of compile-time options for the DOS interface.
David Griffith [Mon, 14 Oct 2019 01:11:32 +0000 (18:11 -0700)]
Add mention of compile-time options for the DOS interface.

Disabling sound and/or Blorb support should be necessary only with
8088/8086 machines with very limited memory.  A maxed-out IBM PC or XT
should not need these to be disabled.

5 years agoThe main Makefile should only make git_hash.h for DOS.
David Griffith [Mon, 14 Oct 2019 01:06:42 +0000 (18:06 -0700)]
The main Makefile should only make git_hash.h for DOS.

5 years agoBump version in Makefile.tc and add a commented-out NO_BLORB.
David Griffith [Mon, 14 Oct 2019 01:05:58 +0000 (18:05 -0700)]
Bump version in Makefile.tc and add a commented-out NO_BLORB.

5 years agoMove os_init_sound() to make sure it always is there.
David Griffith [Mon, 14 Oct 2019 00:50:54 +0000 (17:50 -0700)]
Move os_init_sound() to make sure it always is there.

Here, os_init_sound() is a dummy for the benefit of the core whether or
not sound is enabled.

5 years agoAdd support for NO_BLORB for DOS interface.
David Griffith [Mon, 14 Oct 2019 00:39:40 +0000 (17:39 -0700)]
Add support for NO_BLORB for DOS interface.

5 years agoAdd descriptive comments to the tops of SDL source files.
David Griffith [Mon, 14 Oct 2019 00:30:26 +0000 (17:30 -0700)]
Add descriptive comments to the tops of SDL source files.

5 years agosamplerate.h no longer used in SDL interface.
David Griffith [Mon, 14 Oct 2019 00:24:16 +0000 (17:24 -0700)]
samplerate.h no longer used in SDL interface.

5 years agoMerge branch 'dos_issue8' into 'master'
David Griffith [Sun, 13 Oct 2019 22:39:23 +0000 (22:39 +0000)]
Merge branch 'dos_issue8' into 'master'

Use smaller mallocs to support dos

See merge request DavidGriffith/frotz!126

5 years agoUse smaller mallocs to support dos
Bill Lash [Sun, 13 Oct 2019 01:09:31 +0000 (20:09 -0500)]
Use smaller mallocs to support dos

The DOS version has trouble with the large malloc in the undo
system that mallocs 2.5 times the dynamic memory.  This is used
as 1.5 times the dynamic memory for the diff part, and space to
save the dynamic memory.  When memory beyond the 64k barrier was
accessed, there was a crash (at least that seems like what was
happening).  Instead of mallocing all the memory at once and and
setting the pointer to the diff part to after the dynamic memory
part, I changed it to seperately malloc both parts.

It still may be that at 1.5 the dynamic memory size, that the diff
could go past 64k.  Might want to check for that and handle it.

5 years agoMerge branch 'macos_fixmake' into 'master'
David Griffith [Sat, 12 Oct 2019 04:01:49 +0000 (04:01 +0000)]
Merge branch 'macos_fixmake' into 'master'

A few minor tweaks for building on MAC

See merge request DavidGriffith/frotz!125

5 years agoA few minor tweaks for building on MAC
Bill Lash [Fri, 11 Oct 2019 21:43:37 +0000 (16:43 -0500)]
A few minor tweaks for building on MAC

5 years agoAvoid segfault for Alt-U undo when no more moves left.
David Griffith [Wed, 9 Oct 2019 18:54:19 +0000 (11:54 -0700)]
Avoid segfault for Alt-U undo when no more moves left.

5 years agoStupid typo.
David Griffith [Tue, 8 Oct 2019 08:01:18 +0000 (01:01 -0700)]
Stupid typo.

5 years agoREADMEs weren't synched with index.html.
David Griffith [Tue, 8 Oct 2019 07:52:52 +0000 (00:52 -0700)]
READMEs weren't synched with index.html.

5 years agoBump remaining stuff to version 2.50b1 for first beta test.
David Griffith [Tue, 8 Oct 2019 06:49:05 +0000 (23:49 -0700)]
Bump remaining stuff to version 2.50b1 for first beta test.

5 years agoUpdate READMEs.
David Griffith [Tue, 8 Oct 2019 06:42:44 +0000 (23:42 -0700)]
Update READMEs.

5 years agoRemove superfluous extra parens.
David Griffith [Tue, 8 Oct 2019 06:31:54 +0000 (23:31 -0700)]
Remove superfluous extra parens.

5 years agoRearranging Makefile.
David Griffith [Tue, 8 Oct 2019 05:37:50 +0000 (22:37 -0700)]
Rearranging Makefile.

5 years agoUpdate ChangeLog and INSTALL.
David Griffith [Tue, 8 Oct 2019 05:23:48 +0000 (22:23 -0700)]
Update ChangeLog and INSTALL.

5 years agoUpdate Frotz webpage.
David Griffith [Tue, 8 Oct 2019 04:14:41 +0000 (21:14 -0700)]
Update Frotz webpage.

5 years agoUpdate README.1st and TODO.
David Griffith [Tue, 8 Oct 2019 03:44:35 +0000 (20:44 -0700)]
Update README.1st and TODO.

5 years agoAdded compile-time constants to Makefile.
David Griffith [Tue, 8 Oct 2019 03:13:05 +0000 (20:13 -0700)]
Added compile-time constants to Makefile.

5 years agoClean up more Turbo C droppings.
David Griffith [Tue, 8 Oct 2019 02:09:43 +0000 (19:09 -0700)]
Clean up more Turbo C droppings.

5 years agoAdd instructions for DOS Frotz.
David Griffith [Tue, 8 Oct 2019 01:27:01 +0000 (18:27 -0700)]
Add instructions for DOS Frotz.

5 years agoNotes on DOS compilation.
David Griffith [Tue, 8 Oct 2019 00:54:26 +0000 (17:54 -0700)]
Notes on DOS compilation.

5 years agoAdd some commentary about usage of pseudoregisters with Turbo C.
David Griffith [Sun, 6 Oct 2019 12:38:57 +0000 (05:38 -0700)]
Add some commentary about usage of pseudoregisters with Turbo C.

5 years agoMerge branch 'sdl_scale' into 'master'
David Griffith [Sun, 6 Oct 2019 01:29:26 +0000 (01:29 +0000)]
Merge branch 'sdl_scale' into 'master'

Use independent width and height scaling

See merge request DavidGriffith/frotz!124

5 years agoMerge branch 'sdl_scale' of gitlab.com:welash/frotz into sdl_scale
Bill Lash [Sat, 5 Oct 2019 23:01:37 +0000 (18:01 -0500)]
Merge branch 'sdl_scale' of gitlab.com:welash/frotz into sdl_scale

5 years agoMake sure to round up the width and height of image
Bill Lash [Sat, 5 Oct 2019 22:56:44 +0000 (17:56 -0500)]
Make sure to round up the width and height of image

When scaling, make sure to round the width and height of images up
to match the scaling code.

5 years agoCap the maximum indexes into image
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.

5 years agoMake sure to round up the 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

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 agoUsing "_AX = (v);" in place of "mov ax,v;" to fix "ambiguous member" problem.
David Griffith [Sat, 5 Oct 2019 03:40:04 +0000 (20:40 -0700)]
Using "_AX = (v);" in place of "mov ax,v;" to fix "ambiguous member" problem.

This was suggested in
https://sourceforge.net/p/freedos/mailman/message/36778205/

5 years agoApplied experimental patch from @welash. Now we can do at least Zork 1.
David Griffith [Sat, 5 Oct 2019 03:07:28 +0000 (20:07 -0700)]
Applied experimental patch from @welash.  Now we can do at least Zork 1.

Two things were done here.

1.  Commented out assembly macros of SET_WORD and LOW_WORD, temporarily
using the Unix versions.  I'm examinging some ways of cleanly allowing
for a structure member to be passed into an assembly macro.  Turbo C /
Turbno Assembler has a problem doing a.flags when there also exists
b.flags.  It can't tell the difference and so will throw an error about
an ambiguous member name.  This happened with z_header.flags.

2.  Turbo C doesn't like seeing things like `z_header_t z_header;` in
multiple source files.  These were marked `extern` in all but one of
them.

5 years agoCap the maximum indexes into image
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.

5 years agoUpdate Makefiles to better deal with git_hash.h for DOS compilation.
David Griffith [Wed, 2 Oct 2019 23:22:35 +0000 (16:22 -0700)]
Update Makefiles to better deal with git_hash.h for DOS compilation.

5 years agoConvert DOS interface to use z_header structure.
David Griffith [Wed, 2 Oct 2019 20:55:01 +0000 (13:55 -0700)]
Convert DOS interface to use z_header structure.

There is currently a problem with compiling with Turbo C 3.00

src\common\fastmem.c
Error src\common\fastmem.c 160: Ambiguous member name 'flags' in function
restart_header
Error src\common\fastmem.c 435: Ambiguous member name 'flags' in function
init_memory
*** 2 errors in Compile ***

        Available memory 4059444

** error 1 ** deleting src\common\fastmem.o
C:\FROTZ>

5 years agoRewrite Blorb file loading to allow for more robust file handling.
David Griffith [Tue, 1 Oct 2019 08:33:30 +0000 (01:33 -0700)]
Rewrite Blorb file loading to allow for more robust file handling.

Previously, the way Blorb files were opened was a bit haphazard.  This
led to segfault problems when trying to load a naked Zcode file that has
an acompanying Blorb file.  Typically the Blorb file is found in the
same directory as the Zcode file.  The segfault would occur because the
path for the Zcode file was not prepended to the generated Blorb
filename.  When I wrote Blorb support for the curses interface, I didn't
have/cause this problem.

5 years agoMake sure to round up the 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

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 agoMention Mark McCurry in AUTHORS for his work on the libao audio subsystem.
David Griffith [Tue, 1 Oct 2019 22:31:47 +0000 (15:31 -0700)]
Mention Mark McCurry in AUTHORS for his work on the libao audio subsystem.

5 years agoLet's keep a consistent way of addressing Z-machine versions.
David Griffith [Tue, 1 Oct 2019 08:27:41 +0000 (01:27 -0700)]
Let's keep a consistent way of addressing Z-machine versions.

5 years agoMake sure to call bb_destroy_map() and set the map to NULL.
David Griffith [Tue, 1 Oct 2019 07:57:19 +0000 (00:57 -0700)]
Make sure to call bb_destroy_map() and set the map to NULL.

5 years agoAdd check for explicitly-set blorb filename.
David Griffith [Tue, 1 Oct 2019 07:00:35 +0000 (00:00 -0700)]
Add check for explicitly-set blorb filename.

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.