David Griffith [Mon, 24 Jun 2019 00:11:45 +0000 (17:11 -0700)]
Fix problem of os_fatal() trying to write to SDL window when SDL not active.
If we have a showstopping problem right from the start, like trying to
load a file that's not a Zcode file or Blorb file that lacks a Zcode
chunk, then Frotz will call os_fatal() to complain about it and then
exit. But sfrotz's version of os_fatal doesn't check if SDL is active
or not before calling functions that depend on SDL. The first of these
is os_set_text_style(). This leads to a segfault when a call of
current.font->getglyph(current.font,c,1); dereferences getglyph, which
does not exist because current is not properly initialized yet.
David Griffith [Sun, 23 Jun 2019 21:11:47 +0000 (21:11 +0000)]
Merge branch 'transcript-spelling-fix' into 'master'
Fix typo: transcript
See merge request DavidGriffith/frotz!103
Chris Bracken [Sun, 23 Jun 2019 19:40:21 +0000 (12:40 -0700)]
Fix typo: transcript
Fix a typo (transscript -> transcript) in the docs/man pages.
David Griffith [Sun, 23 Jun 2019 01:52:14 +0000 (01:52 +0000)]
Merge branch 'macosfixes' into 'master'
Macosfixes
See merge request DavidGriffith/frotz!102
Bill Lash [Sat, 22 Jun 2019 20:59:11 +0000 (15:59 -0500)]
Add auto detection of MAC OS X
Bill Lash [Sat, 22 Jun 2019 04:41:32 +0000 (23:41 -0500)]
Clean up makefile for MACOS
Bill Lash [Sat, 22 Jun 2019 04:39:22 +0000 (23:39 -0500)]
Fix sdl build on MACOS
Need to include sf_frotz.h before system headers for MACOS build
Bill Lash [Sat, 22 Jun 2019 04:36:12 +0000 (23:36 -0500)]
Fix dfrotz compile on MACOS
Need to include dumb_frotz.h before system headers on MACOS
Bill Lash [Sat, 22 Jun 2019 04:33:56 +0000 (23:33 -0500)]
Add override for CFLAG += for MACOS
For some reason, on MACOSX, adding the flags for SDL didn't work
without adding the override directive.
Bill Lash [Sat, 22 Jun 2019 01:53:14 +0000 (20:53 -0500)]
Some changes for MACOSX
Fix Makefile generation of defs.h move inclusion of frotz.h before
first system includes.
David Griffith [Wed, 19 Jun 2019 08:27:55 +0000 (01:27 -0700)]
Add code to check for Infocom games that use bleeps, but don't set SOUND_FLAG.
This may be useful later on when os_beep() is rewritten to make high and low
noises. Right now this code does nothing.
David Griffith [Wed, 19 Jun 2019 08:15:03 +0000 (01:15 -0700)]
Move os_beep() call to beginning of z_sound_effect(). In curses it calls beep().
David Griffith [Wed, 19 Jun 2019 08:09:57 +0000 (01:09 -0700)]
OLD_SOUND_FLAG is valid only for V3 games. For V5+, the game wants to use UNDO.
David Griffith [Wed, 19 Jun 2019 07:38:50 +0000 (00:38 -0700)]
Reenable compiling with no sound.
David Griffith [Tue, 18 Jun 2019 07:37:21 +0000 (00:37 -0700)]
Partial fix of #120. Subsequent hoofbeats block until another key is pressed.
end_of_sound() must be called at the end of every sound played so that
the next sound can be played. Otherwise only one sound is played per
turn. os_tick() seems to be the correct place for end_of_sound() to be
called, but I'm not sure about the sem_post(&sound_done) call. Why does
process_engine() block until the next key is pressed?
David Griffith [Tue, 18 Jun 2019 02:51:14 +0000 (19:51 -0700)]
Adding some MacOS compilation fixes.
David Griffith [Fri, 14 Jun 2019 23:41:24 +0000 (23:41 +0000)]
Merge branch 'issue118' into 'master'
sdl render glyphs only when needed
See merge request DavidGriffith/frotz!101
borg323 [Fri, 14 Jun 2019 13:59:04 +0000 (16:59 +0300)]
sdl render glyphs only when needed
David Griffith [Wed, 12 Jun 2019 20:55:59 +0000 (20:55 +0000)]
Merge branch 'issue118' into 'master'
utf8 changes for issue 118
See merge request DavidGriffith/frotz!100
borg323 [Mon, 10 Jun 2019 19:07:38 +0000 (22:07 +0300)]
first effort to use all unicode chars from ttf font
borg323 [Mon, 10 Jun 2019 19:02:58 +0000 (22:02 +0300)]
use os_check_unicode()
borg323 [Mon, 10 Jun 2019 16:37:40 +0000 (19:37 +0300)]
dumb: allow utf8 output
borg323 [Mon, 10 Jun 2019 16:31:56 +0000 (19:31 +0300)]
dumb: covert char input buffer to zchar
David Griffith [Fri, 7 Jun 2019 01:45:32 +0000 (18:45 -0700)]
Adding names of contributors to the manpage and new file CONTRIBUTORS.
David Griffith [Fri, 7 Jun 2019 00:39:12 +0000 (17:39 -0700)]
Fix cast in call to read_string().
David Griffith [Fri, 7 Jun 2019 00:14:35 +0000 (00:14 +0000)]
Merge branch 'no_sound_fix' into 'master'
ux_audio cleanup
See merge request DavidGriffith/frotz!99
borg323 [Thu, 6 Jun 2019 07:34:29 +0000 (10:34 +0300)]
Merge branch 'master' into no_sound_fix
borg323 [Wed, 5 Jun 2019 19:04:09 +0000 (22:04 +0300)]
fix build with SOUND=none
David Griffith [Wed, 5 Jun 2019 08:36:39 +0000 (01:36 -0700)]
Don't activate sound subsystem if SOUND_FLAG or OLD_SOUND_FLAG is not set.
David Griffith [Tue, 4 Jun 2019 07:37:43 +0000 (07:37 +0000)]
Merge branch 'audio_rewrite' into 'master'
Rewrite Frotz audio system core
See merge request DavidGriffith/frotz!98
fundamental [Tue, 4 Jun 2019 01:00:20 +0000 (21:00 -0400)]
Avoid loading OGG segments into memory
Uses the virtual IO interface for sndfile providing pread() as the
mechanism for loading data from the file handle. pread() makes it
possible to read bytes from the file without impacting the offset
which would be altered with normal fread()/fseek() or
dup()+fread()/fseek() calls.
By avoiding changing the shared offset values, pread() makes it
possible to avoid multi-threaded data races while avoiding the
modest memory usage of loading a single audio track to memory.
fundamental [Wed, 29 May 2019 01:58:23 +0000 (21:58 -0400)]
Fix Mod file stereo/mono bug
fundamental [Tue, 28 May 2019 00:01:45 +0000 (20:01 -0400)]
Rewrite Frotz audio system core
Introduce an audio manager which works on audio streams which are loaded into
one of several audio voices. These streams are loaded into memory in the
interperter thread and then incrementally translated to samples in the audio
thread. Multiple concurrent voices is normal during operation and should not
cause issues. Overhead when no voices are playing should be low, though as the
audio thread will be running in the background after it has been initialized,
the overhead will be non-zero.
The provided work is C89 compliant (according to GCC), is available under a
dual GPLv2+ and MIT license, and as a result of the stream loaded approach
removes the libvorbis dependency as libsndfile handles in-memory OGG files.
David Griffith [Mon, 27 May 2019 07:37:20 +0000 (00:37 -0700)]
Ensure only the current branch appears in GIT_BRANCH.
David Griffith [Mon, 27 May 2019 04:46:15 +0000 (21:46 -0700)]
Merge branch 'cyrillic'
David Griffith [Mon, 27 May 2019 00:19:49 +0000 (17:19 -0700)]
Added gitignores for .blb, .blorb, and .zblorb.
David Griffith [Mon, 27 May 2019 00:15:34 +0000 (17:15 -0700)]
Added an error directive about UTF-8 not being supported under DOS
Given the limitations of the MS/PC DOS platform, it doesn't look like
supporting UTF-8 will be possible.
David Griffith [Sun, 26 May 2019 05:05:52 +0000 (22:05 -0700)]
Fix behavior caused by commit
225d8d38
Manually copied this over from master because Git somehow lost its place.
David Griffith [Thu, 23 May 2019 06:18:18 +0000 (23:18 -0700)]
Spacing between functions.
David Griffith [Thu, 23 May 2019 04:07:37 +0000 (21:07 -0700)]
Add some casts to quiet compile time warnings.
Bill Lash [Thu, 23 May 2019 03:01:15 +0000 (22:01 -0500)]
If not using utf8 print "?" for values above 255
Bill Lash [Thu, 23 May 2019 02:06:40 +0000 (21:06 -0500)]
Updating completion for cyrillic branch
borg323 [Wed, 22 May 2019 21:07:26 +0000 (00:07 +0300)]
remove HANDLE_OE_DIPTHONG
borg323 [Wed, 22 May 2019 21:06:18 +0000 (00:06 +0300)]
improve z_check_unicode
borg323 [Wed, 22 May 2019 15:48:17 +0000 (18:48 +0300)]
Makefile change
borg323 [Tue, 21 May 2019 23:45:55 +0000 (02:45 +0300)]
fix printing of default filename
borg323 [Tue, 21 May 2019 15:51:36 +0000 (18:51 +0300)]
enable filename input
borg323 [Tue, 21 May 2019 15:00:56 +0000 (18:00 +0300)]
cleanup
borg323 [Mon, 20 May 2019 23:53:19 +0000 (02:53 +0300)]
allow input of chars > ZC_LATIN1_MAX
borg323 [Mon, 20 May 2019 22:03:46 +0000 (01:03 +0300)]
os_display_string is not taking char *
borg323 [Mon, 20 May 2019 21:41:21 +0000 (00:41 +0300)]
some ux_input.c fixes
borg323 [Mon, 20 May 2019 18:25:03 +0000 (21:25 +0300)]
malloc size fix
borg323 [Mon, 20 May 2019 14:16:19 +0000 (17:16 +0300)]
zchar alternative
David Griffith [Sun, 19 May 2019 05:15:01 +0000 (22:15 -0700)]
Removing useless endian stuff that's pointless for DOS.
David Griffith [Sun, 19 May 2019 04:52:20 +0000 (21:52 -0700)]
DOS port now compiles and works. Issues #8 and #58 need revisiting.
Loading an executable in a Blorb file works, but very slowly. Audio and
graphics support through Blorb are not yet attempted, though sometimes
old-style works. For instance, in Sherlock, blowing the sound of a cab
approaching is heard (blow the whistle on the first move). However,
playing the violin after you go upstairs is not.
David Griffith [Sun, 19 May 2019 04:27:21 +0000 (21:27 -0700)]
Reorder cleanup stuff.
David Griffith [Sun, 19 May 2019 04:26:19 +0000 (21:26 -0700)]
Clean up stuff left by a DOS build.
David Griffith [Sun, 19 May 2019 03:55:01 +0000 (20:55 -0700)]
Turbo C doesn't like this way of doing macros.
David Griffith [Sun, 26 May 2019 05:08:17 +0000 (22:08 -0700)]
Adjust curly bracket position.
David Griffith [Sun, 26 May 2019 03:31:06 +0000 (03:31 +0000)]
Merge branch 'eurofix' into 'master'
Fix behavior cuased by commit
225d8d38
See merge request DavidGriffith/frotz!95
Bill Lash [Sun, 26 May 2019 01:56:44 +0000 (20:56 -0500)]
Fix behavior cuased by commit
225d8d38
David Griffith [Wed, 22 May 2019 05:25:12 +0000 (22:25 -0700)]
Beginning of stuff to compile for DOS using Open Watcom from Unix.
Bill Lash [Mon, 20 May 2019 04:40:03 +0000 (23:40 -0500)]
Changes to the curses input routines for non latin unicode
This change still needs much work. Since the strings being passed
into the zmachine are now zword * types, there are a lot of things
that have to change, and you can no longer use things like strlen,
strncpy. This affects the history mechanism (which I think I have
worked out by creating zword equivalents of strlen strncpy and
strncmp), the completion (which I am pretty sure I broke) and some
other functions.
Bill Lash [Mon, 20 May 2019 04:35:36 +0000 (23:35 -0500)]
Changes to common code for non latin unicode
Note that this changes signatures for several os_ functions which
means nothing outside of common will compile.
Also added changes for 2 of the 3 needed curses files that I feel
fairly confident in. The ux_input.c is left out of this commit
because it is much more problematic.
David Griffith [Sun, 19 May 2019 05:15:01 +0000 (22:15 -0700)]
Removing useless endian stuff that's pointless for DOS.
David Griffith [Sun, 19 May 2019 04:52:20 +0000 (21:52 -0700)]
DOS port now compiles and works. Issues #8 and #58 need revisiting.
Loading an executable in a Blorb file works, but very slowly. Audio and
graphics support through Blorb are not yet attempted, though sometimes
old-style works. For instance, in Sherlock, blowing the sound of a cab
approaching is heard (blow the whistle on the first move). However,
playing the violin after you go upstairs is not.
David Griffith [Sun, 19 May 2019 04:27:21 +0000 (21:27 -0700)]
Reorder cleanup stuff.
David Griffith [Sun, 19 May 2019 04:26:19 +0000 (21:26 -0700)]
Clean up stuff left by a DOS build.
David Griffith [Sun, 19 May 2019 03:55:01 +0000 (20:55 -0700)]
Turbo C doesn't like this way of doing macros.
David Griffith [Sat, 18 May 2019 05:50:06 +0000 (22:50 -0700)]
Removed mention of a PORTING file, now deleted.
David Griffith [Sat, 18 May 2019 03:13:47 +0000 (20:13 -0700)]
Fix for #114: unneccesary newline printed every time a "direct call" made.
My fix for #84 (
cfec4f1ed81a8e733effbaa93acd917e7f6bded0) neglected to
take into account the fact that interpret() would be called before the
game ends under certain rare circumstances. Therefore, I've added a
reset_screen() to main() which contains the final call to new_line().
David Griffith [Fri, 17 May 2019 11:10:46 +0000 (04:10 -0700)]
Typo in ChangeLog.
David Griffith [Sun, 5 May 2019 00:51:54 +0000 (17:51 -0700)]
Updated ChangeLog with mention of some new features.
David Griffith [Sun, 5 May 2019 00:43:23 +0000 (17:43 -0700)]
Merge branch 'welash/frotz-utf8'
David Griffith [Sun, 5 May 2019 00:42:17 +0000 (17:42 -0700)]
Fix signedness problem for get_wch().
David Griffith [Fri, 3 May 2019 04:07:30 +0000 (21:07 -0700)]
Refining Makefiles. Needs work with implicit declarations and signed/unsigned.
Bill Lash [Sun, 28 Apr 2019 02:24:03 +0000 (21:24 -0500)]
Add utf-8 output to script file
David Griffith [Wed, 24 Apr 2019 12:06:53 +0000 (05:06 -0700)]
Fix remaining strcat() in dumb interface.
David Griffith [Sat, 20 Apr 2019 03:22:33 +0000 (20:22 -0700)]
Added new chunk types from the latest blorb spec (2.0.4).
David Griffith [Sat, 20 Apr 2019 03:07:27 +0000 (20:07 -0700)]
Clean up bb_ID defines.
David Griffith [Sat, 20 Apr 2019 03:05:31 +0000 (20:05 -0700)]
Move low-level bb_ID defines from blorblow.h to blorb.h.
David Griffith [Sat, 20 Apr 2019 03:00:14 +0000 (20:00 -0700)]
Move the remaining bb_make_id() things to the blorb library.
David Griffith [Sat, 20 Apr 2019 00:12:44 +0000 (17:12 -0700)]
Move some bb_make_id() things to the blorb library.
David Griffith [Tue, 16 Apr 2019 07:54:01 +0000 (00:54 -0700)]
Add install_sdl and uninstall_sdl target aliases.
David Griffith [Wed, 10 Apr 2019 08:59:26 +0000 (01:59 -0700)]
Remove needless blank lines.
David Griffith [Wed, 10 Apr 2019 08:58:22 +0000 (01:58 -0700)]
Add dependencies to allow "make sdl_lib" et al work alone.
David Griffith [Thu, 2 May 2019 11:46:00 +0000 (04:46 -0700)]
Add SDL_Quit() in two places to ensure sfrotz really quits.
David Griffith [Thu, 2 May 2019 03:01:48 +0000 (20:01 -0700)]
Refining SDL interface os_fatal() to more resemble the curses interface.
David Griffith [Tue, 30 Apr 2019 10:00:55 +0000 (03:00 -0700)]
Implementing f_setup.ignore_errors for the SDL interface.
David Griffith [Tue, 30 Apr 2019 09:33:39 +0000 (02:33 -0700)]
Implementing f_setup.ignore_errors for the curses interface.
This has interesting consequences when the otherwise fatal error has to
do with an attempt to print at an illegal address. Balances.z5 release 5
(http://ifarchive.org/if-archive/games/zcode/Balances.z5) will produce a
cascade of "Fatal error: Illegal object" messages followed by a
"Fatal error: Print at illegal address" message before Frotz crashes
with a segfault. The printing of the final error message is corrupted in
random ways depending on the size of the terminal at the time. Usually
the message is printed with newlines missing before Frotz segfaults.
Sometimes garbage is printed and Frotz manages to keep going.
David Griffith [Tue, 30 Apr 2019 03:22:01 +0000 (20:22 -0700)]
Implementing f_setup.ignore_errors for the dumb interface. This works.
David Griffith [Tue, 30 Apr 2019 02:57:02 +0000 (19:57 -0700)]
Remove f_setup.ignore_errors from the core.
I've decided that ignoring fatal errors should be the perogative of the
interface code. This will allow all of the error message to be
displayed before a crash occurs.
David Griffith [Sat, 27 Apr 2019 21:29:48 +0000 (14:29 -0700)]
Forgot to put back the -Z flag into the help info for dumb interface.
David Griffith [Wed, 24 Apr 2019 12:06:53 +0000 (05:06 -0700)]
Fix remaining strcat() in dumb interface.
David Griffith [Sat, 20 Apr 2019 03:22:33 +0000 (20:22 -0700)]
Added new chunk types from the latest blorb spec (2.0.4).
David Griffith [Sat, 20 Apr 2019 03:07:27 +0000 (20:07 -0700)]
Clean up bb_ID defines.
David Griffith [Sat, 20 Apr 2019 03:05:31 +0000 (20:05 -0700)]
Move low-level bb_ID defines from blorblow.h to blorb.h.
David Griffith [Sat, 20 Apr 2019 03:00:14 +0000 (20:00 -0700)]
Move the remaining bb_make_id() things to the blorb library.
David Griffith [Sat, 20 Apr 2019 00:12:44 +0000 (17:12 -0700)]
Move some bb_make_id() things to the blorb library.
David Griffith [Tue, 16 Apr 2019 07:54:01 +0000 (00:54 -0700)]
Add install_sdl and uninstall_sdl target aliases.