liskon_frotz.git
7 years agoHandle expose events.
Timo Korvola [Wed, 28 Mar 2018 18:37:51 +0000 (21:37 +0300)]
Handle expose events.

Expose events are handled even in os_tick.

7 years agoFix indentation messed up by merging.
Timo Korvola [Wed, 28 Mar 2018 11:15:10 +0000 (14:15 +0300)]
Fix indentation messed up by merging.

Most of the code remains formatted in the original author's rather
original style.  I have reformatted some functions that I have been
working with to K & R style.

7 years agoSet SDL_HINT_IME_INTERNAL_EDITING.
Timo Korvola [Mon, 26 Mar 2018 23:19:56 +0000 (02:19 +0300)]
Set SDL_HINT_IME_INTERNAL_EDITING.

7 years agoTry to use text input where appropriate.
Timo Korvola [Mon, 26 Mar 2018 22:57:47 +0000 (01:57 +0300)]
Try to use text input where appropriate.

os_read_key uses text input because it may be called from Z-code,
which expects to be able to read characters.  More prompts etc.
do not use text input.

7 years agoHandle SDL_TEXTINPUT events.
Timo Korvola [Mon, 26 Mar 2018 22:03:29 +0000 (01:03 +0300)]
Handle SDL_TEXTINPUT events.

Currently text input is enabled only for os_read_line.  SDL_TEXTEDITING
events are not handled.

7 years agoFullscreen mouse.
Timo Korvola [Mon, 26 Mar 2018 17:13:42 +0000 (20:13 +0300)]
Fullscreen mouse.

Apparently there is almost nothing to do here: just make sure to set
the logical size whenever in fullscreen, and SDL maps mouse events
to logical coordinates.

7 years agoFirst take on switching to SDL 2.
Timo Korvola [Sun, 25 Mar 2018 19:31:50 +0000 (22:31 +0300)]
First take on switching to SDL 2.

Compiles and somewhat works.  Mouse positions are not properly
mapped in fullscreen mode (window mode seems to work).
SDL_TEXTINPUT events are not yet handled; only lower-case ASCII
keyboard input for now.

7 years agoFix 8-bit characters in dialogs.
Timo Korvola [Wed, 28 Mar 2018 16:32:41 +0000 (19:32 +0300)]
Fix 8-bit characters in dialogs.

We don't handle file name encoding though, and that is a mess in the OS
world as well.  Thus only Latin-1 encoded file names are likely to work.

7 years agoIgnore generated version.c.
Timo Korvola [Wed, 28 Mar 2018 16:17:45 +0000 (19:17 +0300)]
Ignore generated version.c.

7 years agoMerge pull request #74 from tkorvola/misc
David Griffith [Wed, 28 Mar 2018 11:09:44 +0000 (04:09 -0700)]
Merge pull request #74 from tkorvola/misc

More build & sfrotz fixes

7 years agoDon't leak curses sound options elsewhere.
Timo Korvola [Tue, 27 Mar 2018 20:19:12 +0000 (23:19 +0300)]
Don't leak curses sound options elsewhere.

7 years agosfrotz requires -lm.
Timo Korvola [Tue, 27 Mar 2018 20:05:34 +0000 (23:05 +0300)]
sfrotz requires -lm.

7 years agoGet rid of common/defines.h.
Timo Korvola [Tue, 27 Mar 2018 19:32:39 +0000 (22:32 +0300)]
Get rid of common/defines.h.

Version info is now in common/version.c, the only file that needs
to be recompiled every time.  Global constants, not defines.
The declarations are in frotz.h.

7 years agoImproved dependency management.
Timo Korvola [Tue, 27 Mar 2018 18:07:28 +0000 (21:07 +0300)]
Improved dependency management.

Adapted (simplified) from
http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/

7 years agoRemove getexepath.
Timo Korvola [Tue, 27 Mar 2018 14:16:57 +0000 (17:16 +0300)]
Remove getexepath.

getexepath was unportable but fortunately unused.

7 years agoConvert DOS-style line endings to Unix-style.
David Griffith [Tue, 27 Mar 2018 17:46:02 +0000 (10:46 -0700)]
Convert DOS-style line endings to Unix-style.

7 years agoCleanup in Makefile.
David Griffith [Tue, 27 Mar 2018 17:44:04 +0000 (10:44 -0700)]
Cleanup in Makefile.

7 years agoGive the core its own Makefile.
David Griffith [Tue, 27 Mar 2018 17:42:14 +0000 (10:42 -0700)]
Give the core its own Makefile.

7 years agoGive the curses interface its own Makefile.
David Griffith [Tue, 27 Mar 2018 17:24:16 +0000 (10:24 -0700)]
Give the curses interface its own Makefile.

7 years agoFixed weird problems with "make clean" trying to compile stuff.
David Griffith [Tue, 27 Mar 2018 17:01:16 +0000 (10:01 -0700)]
Fixed weird problems with "make clean" trying to compile stuff.

7 years agoGive blorblib it's own Makefile.
David Griffith [Tue, 27 Mar 2018 15:44:06 +0000 (08:44 -0700)]
Give blorblib it's own Makefile.

7 years agoGive dfrotz its own Makefile. Need to figure out how to not link to libpthread.
David Griffith [Tue, 27 Mar 2018 15:19:34 +0000 (08:19 -0700)]
Give dfrotz its own Makefile.  Need to figure out how to not link to libpthread.

7 years agoMerge branch 'tkorvola-misc'
David Griffith [Tue, 27 Mar 2018 10:52:31 +0000 (03:52 -0700)]
Merge branch 'tkorvola-misc'

7 years agoChange sfrotz over to using common/defines.h for version and build date info.
David Griffith [Tue, 27 Mar 2018 10:51:08 +0000 (03:51 -0700)]
Change sfrotz over to using common/defines.h for version and build date info.

7 years agoMerge branch 'misc' of https://github.com/tkorvola/frotz into tkorvola-misc
David Griffith [Tue, 27 Mar 2018 10:21:29 +0000 (03:21 -0700)]
Merge branch 'misc' of https://github.com/tkorvola/frotz into tkorvola-misc

7 years agoMerge pull request #69 from escondida/quetzal
David Griffith [Tue, 27 Mar 2018 09:10:43 +0000 (02:10 -0700)]
Merge pull request #69 from escondida/quetzal

src/common/quetzal.c: Do not implicitly fall through in case statement

7 years agoFix cursor positioning.
Timo Korvola [Mon, 26 Mar 2018 23:44:50 +0000 (02:44 +0300)]
Fix cursor positioning.

Input text width was computed incorrectly.

7 years agoRemove the distclean target.
Timo Korvola [Sun, 25 Mar 2018 19:00:36 +0000 (22:00 +0300)]
Remove the distclean target.

The dependency files are now removed by clean.

Also fix bad package name.  It is just a default though: normally
SDL_PKGS comes from the top Makefile.

7 years agoReduce pointless recompilation.
Timo Korvola [Wed, 21 Mar 2018 19:50:40 +0000 (21:50 +0200)]
Reduce pointless recompilation.

Do not include common/defines.h unless actually needed.  It
contains nothing but version information.  It is updated at every
build to put in the current date.

7 years agoMiscellaneous portability fixes.
Timo Korvola [Tue, 20 Mar 2018 22:20:56 +0000 (00:20 +0200)]
Miscellaneous portability fixes.

7 years agoFix eternal loop in sf_GetProfileString.
Timo Korvola [Sun, 11 Mar 2018 20:25:46 +0000 (22:25 +0200)]
Fix eternal loop in sf_GetProfileString.

7 years agoMerge pull request #70 from escondida/end_no_strrchr
David Griffith [Thu, 22 Mar 2018 04:09:50 +0000 (21:09 -0700)]
Merge pull request #70 from escondida/end_no_strrchr

src/curses/ux_init.c: End homebrewed strrchr function
Whoops!

7 years agosrc/curses/ux_init.c: End homebrewed strrchr function
Ivy Foster [Wed, 21 Mar 2018 18:41:28 +0000 (13:41 -0500)]
src/curses/ux_init.c: End homebrewed strrchr function

At present, it is sort of ended by the #endif following it.

7 years agosrc/common/quetzal.c: Do not implicitly fall through in case statement
Ivy Foster [Wed, 21 Mar 2018 17:26:06 +0000 (12:26 -0500)]
src/common/quetzal.c: Do not implicitly fall through in case statement

7 years agoChange append redirection to create redirection to avoid garbage.
David Griffith [Sun, 11 Mar 2018 13:33:57 +0000 (06:33 -0700)]
Change append redirection to create redirection to avoid garbage.

7 years agoFix typo with GIT_BRANCH in Makefile.
David Griffith [Sun, 11 Mar 2018 13:29:50 +0000 (06:29 -0700)]
Fix typo with GIT_BRANCH in Makefile.

7 years agoAdd BUILD_DATE_TIME to src/common/defines.h.
David Griffith [Sun, 11 Mar 2018 13:27:12 +0000 (06:27 -0700)]
Add BUILD_DATE_TIME to src/common/defines.h.

7 years agoMerge branch 'tkorvola-sdl'
David Griffith [Sun, 11 Mar 2018 11:50:32 +0000 (04:50 -0700)]
Merge branch 'tkorvola-sdl'

7 years agoRemove duplicate -lz.
Timo Korvola [Sat, 10 Mar 2018 17:18:03 +0000 (19:18 +0200)]
Remove duplicate -lz.

7 years agoClean up compiler warnings.
Timo Korvola [Sat, 10 Mar 2018 17:10:22 +0000 (19:10 +0200)]
Clean up compiler warnings.

7 years agoMore useful CFLAGS.
Timo Korvola [Fri, 9 Mar 2018 21:51:09 +0000 (23:51 +0200)]
More useful CFLAGS.

Comment away -Wextra: it produces too many false positives for
regular use.  Aim for ISO C instead of GNU (still 99 vintage).
strdup is just too handy though: bring it in from POSIX 2008.
Curses sound uses pthreads, compile accordingly.

7 years agoFix some technical blunders.
Timo Korvola [Fri, 9 Mar 2018 21:43:49 +0000 (23:43 +0200)]
Fix some technical blunders.

Font height is not ascent + descent.  Ascent + descent = em size, but
height may be more if there is extra line spacing (height is from
baseline to baseline).  Also, off by one in yof computation.

7 years agoUpdate font_height & _width whenever they are used.
Timo Korvola [Fri, 9 Mar 2018 21:38:16 +0000 (23:38 +0200)]
Update font_height & _width whenever they are used.

Call os_data(0, &font_height, &font_width) to update.  On those
front ends where it does nothing (curses) it does not matter.

7 years agoSupport for querying current font size.
Timo Korvola [Fri, 9 Mar 2018 21:23:19 +0000 (23:23 +0200)]
Support for querying current font size.

os_font_data(0, &h, &w) stores the current font height and width
into h and w, also accounting for style (with a non-zero font
os_font_data returns dimensions for Roman style as before).
Currently properly implemented only in SDL where the call returns true.
On other front ends it returns false and either does not touch h & w
(curses) or sets them correctly anyway (dos).

7 years agoSupport for loading a scalable graphics font.
Timo Korvola [Thu, 8 Mar 2018 20:43:35 +0000 (22:43 +0200)]
Support for loading a scalable graphics font.

A graphics font can be specified with the "graphics" option
(Fonts section) of .sfrotzrc.  The font is assumed to have fixed width
equal to height and em size (no line gap).  It is scaled to match the
width and height of the fixed width text font (not usually equal,
so the graphics font gets stretched).  Any size specification in the
option is ignored.

Now someone just needs to draw that font.  I made a quick autotrace
in Fontforge but it is rather hideous.

7 years agoAdjust graphics font.
Timo Korvola [Tue, 6 Mar 2018 18:56:11 +0000 (20:56 +0200)]
Adjust graphics font.

Set double height graphics font ascent to 14 and descent to 2
(was (12, 4)).  The new values match those of the built-in text font.
Set the y offset of all glyphs to -2 for both single and double
height graphics font, which now have the same descent
(yof was erroneously 0).  Beyond Zork now looks about right with the
built-in fonts.  It still looks awful with custom fonts because the
graphics font should be scaled to the size of the fixed width text
font.

7 years agoFix the file dialog filters.
Timo Korvola [Mon, 5 Mar 2018 22:28:42 +0000 (00:28 +0200)]
Fix the file dialog filters.

Use the extension definitions from frotz.h.

7 years agoReally show Beyond Zork's title screen.
Timo Korvola [Mon, 5 Mar 2018 22:02:33 +0000 (00:02 +0200)]
Really show Beyond Zork's title screen.

Drawing doesn't work before RESTART_END because windows aren't
properly set up.  No, RESTART_WPROP_SET is not enough.

You'll need a blorb with the title graphics.  That is the only
resource of the game - you don't need the blorb to play.

7 years agoSafer ar rules.
Timo Korvola [Mon, 5 Mar 2018 18:53:50 +0000 (20:53 +0200)]
Safer ar rules.

This should be safe for make -j.  The default rules are not.

7 years agoMore special keys.
Timo Korvola [Sun, 4 Mar 2018 20:52:45 +0000 (22:52 +0200)]
More special keys.

Esc clears the input line.  Page up/down are passed as cursor up/down
to the game (Beyond Zork needs them).  This resembles more and more
the curses version.

7 years agoLose non-standard GCC attributes.
Timo Korvola [Sun, 4 Mar 2018 20:37:21 +0000 (22:37 +0200)]
Lose non-standard GCC attributes.

Call init routines explicitly instead of relying on an obscure
GCC extension.

7 years agoFix os_string_width.
Timo Korvola [Sun, 4 Mar 2018 19:53:38 +0000 (21:53 +0200)]
Fix os_string_width.

Width was computed wrong for strings with more than one style or font
change.

7 years agoMinor improvements
Timo Korvola [Sun, 4 Mar 2018 15:49:26 +0000 (17:49 +0200)]
Minor improvements

7 years agoFix history by borrowing from curses.
Timo Korvola [Sat, 3 Mar 2018 22:04:40 +0000 (00:04 +0200)]
Fix history by borrowing from curses.

7 years agoFix recursive SDL make.
Timo Korvola [Sat, 3 Mar 2018 22:02:46 +0000 (00:02 +0200)]
Fix recursive SDL make.

7 years agoend_of_sound now maybe works.
Timo Korvola [Sat, 3 Mar 2018 18:59:22 +0000 (20:59 +0200)]
end_of_sound now maybe works.

Went back to end_of_sound taking no args, so sound.c got reverted.
Should be easier on DOS frotz, which I never attempted to fix.  Made
interpret call os_tick, as SDL front end expects (WinFrotz also has
os_tick).  os_tick calls end_of_sound as appropriate.  Added os_tick
to the other front ends.  In dumb it does nothing, in curses it
handles resizes.

7 years agoUseless use of dup.
Timo Korvola [Sat, 3 Mar 2018 15:40:35 +0000 (17:40 +0200)]
Useless use of dup.

7 years agoDrastically simplify getaiff.
Timo Korvola [Sat, 3 Mar 2018 12:54:30 +0000 (14:54 +0200)]
Drastically simplify getaiff.

Axe all conversion code (which was complicated and likely buggy)
and let SDL_mixer take care of everything.

7 years agoDrop an unused source file from compilation.
Timo Korvola [Sat, 3 Mar 2018 11:52:22 +0000 (13:52 +0200)]
Drop an unused source file from compilation.

7 years agoremove dfrotz build dependencies
Sean Fitzgerald [Mon, 26 Feb 2018 07:19:03 +0000 (23:19 -0800)]
remove dfrotz build dependencies

As the intention of dfrotz is be dependency free, make it so at build time as well.

7 years agoLose remaining traces of rindex.
Timo Korvola [Fri, 2 Mar 2018 20:19:11 +0000 (22:19 +0200)]
Lose remaining traces of rindex.

rindex never was but POSIX and is deprecated even there.  strrchr
does the same and is C89.

7 years agoAdd declarations.
Timo Korvola [Fri, 2 Mar 2018 19:34:37 +0000 (21:34 +0200)]
Add declarations.

Add enough function prototypes to get rid of warnings.  Fix errors
caused by calls actually not matching definitions.

7 years agoFix dirname / basename problems.
Timo Korvola [Thu, 1 Mar 2018 20:58:13 +0000 (22:58 +0200)]
Fix dirname / basename problems.

It is annoying how vaguely POSIX dirname and basename are defined,
so make our own versions with well-defined behaviour.

Now actually loads a story and starts.

7 years agosfrotz now links.
Timo Korvola [Thu, 1 Mar 2018 20:05:36 +0000 (22:05 +0200)]
sfrotz now links.

Dies of SEGV though.

7 years agoAdd generic.c and generic.h.
Timo Korvola [Sat, 3 Mar 2018 10:24:48 +0000 (12:24 +0200)]
Add generic.c and generic.h.

The functions here are identical or nearly so in most ports.  They should
really be put somewhere so that they can be shared.  For now, this.

7 years agoFix external link problems.
Timo Korvola [Wed, 28 Feb 2018 22:55:12 +0000 (00:55 +0200)]
Fix external link problems.

Now it is just that lots of os_whatever functions are missing from
the SDL front end.  Many of them (e.g., file I/O) could probably be
shared.

7 years agoFix SDL stuff to compile.
Timo Korvola [Wed, 28 Feb 2018 22:02:20 +0000 (00:02 +0200)]
Fix SDL stuff to compile.

Add a minimal GNU Makefile.  A large part of os_process_arguments
was replaced from the curses version.  Other fixes were minimal.

Compiles (with warnings) but haven't tried linking.

7 years agoMerge pull request #66 from clusterfudge/patch-1
David Griffith [Tue, 27 Feb 2018 00:33:15 +0000 (16:33 -0800)]
Merge pull request #66 from clusterfudge/patch-1

remove dfrotz build dependencies

7 years agoremove dfrotz build dependencies
Sean Fitzgerald [Mon, 26 Feb 2018 07:19:03 +0000 (23:19 -0800)]
remove dfrotz build dependencies

As the intention of dfrotz is be dependency free, make it so at build time as well.

7 years agoFix resource Blorb opening.
Timo Korvola [Mon, 19 Feb 2018 21:02:53 +0000 (23:02 +0200)]
Fix resource Blorb opening.

ux_blorb_init may have worked for story Blorbs but handling of
separate resource Blorbs (accompanying a plain story file) was quite
broken.

dumb_blorb.c is basically a copy of ux_blorb.c.  Can't be bothered
to copy this fix there.  dfrotz should use the same code instead of
a copy.

7 years agoMinor tweaks.
Timo Korvola [Sun, 18 Feb 2018 21:32:15 +0000 (23:32 +0200)]
Minor tweaks.

RTFM: ao_initialize must be called from the main thread.

7 years agoMerge pull request #65 from tkorvola/resize
David Griffith [Fri, 23 Feb 2018 05:25:57 +0000 (21:25 -0800)]
Merge pull request #65 from tkorvola/resize

Terminal resizing.  Still needs some work vis-a-vis reformatting text when shrinking or expanding horizontally.  That'll require implementing a history buffer, which will be implemented later.  In the meantime, we have resize code that actually works (just not ideally).

7 years agoEliminate compiler warnings.
Timo Korvola [Thu, 22 Feb 2018 20:07:15 +0000 (22:07 +0200)]
Eliminate compiler warnings.

Some of this is rather silly.

7 years agoSmall Makefile tweaks.
Timo Korvola [Thu, 22 Feb 2018 19:17:36 +0000 (21:17 +0200)]
Small Makefile tweaks.

Build all by default (frotz and dfrotz).
Don't use find ... -delete.  Dangerous.  Was broken anyway.
Clean up whitespace.

7 years agoSuspend on ^Z.
Timo Korvola [Tue, 20 Feb 2018 21:33:42 +0000 (23:33 +0200)]
Suspend on ^Z.

In raw mode ^Z is just another character.  It is easier to
handle than in cbreak because it can be done in normal execution
without having to replace the curses SIGTSTP handler.

7 years agoMerge branch 'master' into resize
Timo Korvola [Tue, 20 Feb 2018 16:56:07 +0000 (18:56 +0200)]
Merge branch 'master' into resize

7 years agoos_repaint_window: return true for zero size area.
Timo Korvola [Tue, 20 Feb 2018 16:51:09 +0000 (18:51 +0200)]
os_repaint_window: return true for zero size area.

7 years agoAdd a dummy os_repaint_window to DOS version.
Timo Korvola [Tue, 20 Feb 2018 16:47:28 +0000 (18:47 +0200)]
Add a dummy os_repaint_window to DOS version.

Untested, as I don't have the compiler for it.

7 years agoMerge branch 'tschmidty69-move_ldflags'
David Griffith [Tue, 20 Feb 2018 12:52:01 +0000 (04:52 -0800)]
Merge branch 'tschmidty69-move_ldflags'

7 years agoMerge branch 'move_ldflags' of https://github.com/tschmidty69/frotz into tschmidty69...
David Griffith [Tue, 20 Feb 2018 12:50:25 +0000 (04:50 -0800)]
Merge branch 'move_ldflags' of https://github.com/tschmidty69/frotz into tschmidty69-move_ldflags

7 years agoMerge pull request #62 from escondida/makefile_tiny_tweak
David Griffith [Tue, 20 Feb 2018 12:42:07 +0000 (04:42 -0800)]
Merge pull request #62 from escondida/makefile_tiny_tweak

Makefile: make -llibs LDFLAGS

7 years agoRevert "Merge branch 'escondida-quetzal'"
David Griffith [Tue, 20 Feb 2018 12:30:59 +0000 (04:30 -0800)]
Revert "Merge branch 'escondida-quetzal'"

This reverts commit a35ecc2eebbb6e6de6d314af5da2363f25b3e3cd, reversing
changes made to 92c121a4e36291f4836f852a573c549736104ec1.

Workaround for compilers lacking a fallthrough attribute failed.

7 years agoMerge branch 'escondida-quetzal'
David Griffith [Tue, 20 Feb 2018 11:40:27 +0000 (03:40 -0800)]
Merge branch 'escondida-quetzal'

7 years agoAdd workarounds for compilers that lack the fallthrough attribute.
David Griffith [Tue, 20 Feb 2018 11:37:50 +0000 (03:37 -0800)]
Add workarounds for compilers that lack the fallthrough attribute.

7 years agoMerge branch 'quetzal' of https://github.com/escondida/frotz into escondida-quetzal
David Griffith [Tue, 20 Feb 2018 11:10:53 +0000 (03:10 -0800)]
Merge branch 'quetzal' of https://github.com/escondida/frotz into escondida-quetzal

7 years agoMerge branch 'escondida-clear_line'
David Griffith [Tue, 20 Feb 2018 10:56:56 +0000 (02:56 -0800)]
Merge branch 'escondida-clear_line'

7 years agoAdded os_quit() and ^Q command to cause Frotz to immediately and cleanly exit.
David Griffith [Tue, 20 Feb 2018 10:54:05 +0000 (02:54 -0800)]
Added os_quit() and ^Q command to cause Frotz to immediately and cleanly exit.

7 years agoChange curses from cbreak mode to raw mode to allow for ^C to clear the line.
David Griffith [Tue, 20 Feb 2018 10:30:41 +0000 (02:30 -0800)]
Change curses from cbreak mode to raw mode to allow for ^C to clear the line.

7 years agoEnsure window 0 has at least one line.
Timo Korvola [Mon, 19 Feb 2018 23:08:50 +0000 (01:08 +0200)]
Ensure window 0 has at least one line.

No other window heights are adjusted, so they may be out of bounds
and overlap with window 0.

7 years agoKeep cursor within bounds in os_read_line.
Timo Korvola [Mon, 19 Feb 2018 21:41:49 +0000 (23:41 +0200)]
Keep cursor within bounds in os_read_line.

Maximum scrpos is width - 1 even if len == width.  Then the cursor
will stay on the last character because there is no room to the right
of it.

#42: Handle terminal resizing

7 years agoStay in os_read_line on resize.
Timo Korvola [Sun, 18 Feb 2018 18:24:46 +0000 (20:24 +0200)]
Stay in os_read_line on resize.

The callers of os_read_line weren't taking a return value of ZC_BAD
too well.  So just chop input to fit and keep editing.

Document that width is adjusted according to terminal width.

#42: Handle terminal resizing

7 years agoClean up a bit.
Timo Korvola [Sun, 18 Feb 2018 14:36:08 +0000 (16:36 +0200)]
Clean up a bit.

Add resize_screen to frotz.h.  Remove its declarations from .c files.
Also remove an unused declaration.

#42: Handle terminal resizing

7 years agoForgot to update dfrotz after interface change.
Timo Korvola [Sun, 18 Feb 2018 14:28:02 +0000 (16:28 +0200)]
Forgot to update dfrotz after interface change.

dfrotz is not built by default, so it is easy to miss errors there.

7 years agoHave resize_screen repaint window 0.
Timo Korvola [Sat, 17 Feb 2018 21:00:12 +0000 (23:00 +0200)]
Have resize_screen repaint window 0.

resize_screen decides which part of the window it wants to keep,
adjusts the window properties and calls a new front end function
os_repaint_window to repaint the required part.  Only window 0 currently
has this special handling - for the others it seems to suffice that
curses repaints the screen from the top left.  Resizing now
works pretty well in Beyond Zork as long as the width is not resized
and the height is enough for the upper window.

Also have resize_screen ask V6 games to redraw.  This used to be in
the front end but I can't see how any front end could do anything else
because the interpreter does not know what kind of window layout the
game wants.  So it may as well be in the common code.

#42: Handle terminal resizing

7 years agoUse a pad for storing the old screen during resize.
Timo Korvola [Sat, 17 Feb 2018 18:36:21 +0000 (20:36 +0200)]
Use a pad for storing the old screen during resize.

Why bother reinventing the wheel when curses does the job?

#42: Handle terminal resizing

7 years agoMoved ldflags to end of cc line
tschmidty69 [Sat, 17 Feb 2018 15:05:43 +0000 (10:05 -0500)]
Moved ldflags to end of cc line

7 years agoMoved ldflags to end of cc line
tschmidty69 [Sat, 17 Feb 2018 15:05:13 +0000 (10:05 -0500)]
Moved ldflags to end of cc line

7 years agoMoved ldflags to end of cc line
tschmidty69 [Sat, 17 Feb 2018 15:04:31 +0000 (10:04 -0500)]
Moved ldflags to end of cc line

7 years agosrc/common/quetzal.c: make fallthrough explicit
Ivy Foster [Fri, 16 Feb 2018 21:55:27 +0000 (15:55 -0600)]
src/common/quetzal.c: make fallthrough explicit

This silences compiler warnings about this deliberate decision, so in
future it will be easier to spot compiler warnings about mistakes;
also, it should now be possible to compile with -Wall -Wextra -Werror.

7 years agoMakefile: make -llibs LDFLAGS
Ivy Foster [Fri, 16 Feb 2018 21:49:34 +0000 (15:49 -0600)]
Makefile: make -llibs LDFLAGS