Fixed inconsistent types in src/sdl and fixed to src/common/frotz.h
authorDavid Griffith <dave@661.org>
Thu, 20 Apr 2023 05:44:42 +0000 (22:44 -0700)
committerDavid Griffith <dave@661.org>
Thu, 27 Apr 2023 18:47:20 +0000 (11:47 -0700)
commitf57b22be435641518f65a5d92c87a5fd3c6ad74d
treea734e49cb8d0d20dffc048831b54c74561b2a4c4
parent116503611314d495a99db3618e2b42ca9d0ab89c
Fixed inconsistent types in src/sdl and fixed to src/common/frotz.h

Since before the SDL interface was integrated with this Frotz package,
it has been inconsistent with its delaration and use of three unsigned
variables for communicating with the Frotz Core.  These are zbyte
(8-bit), zword (16-bit), and zlong (32-bit).  Somehow the SDL interface
worked fine with GCC versions 10 and earlier, but no longer.  I probably
should have fixed these when doing the integrating.

At first the changes post GCC 10 manifested in a build failure.  I made
a couple changes to src/sdl/sf_frotz.h from line 15 to 18 to get it to
compile.  I don't remember what they were.  This resulted in a black
column being inserted after every column in the sfrotz window.  After
someone pointed out to me that I was attempting to do 32-bit operations
in a 64-bit variable, the problem and solution became clear.

Now the byte, word, and ulong usage in the SDL interface has been
replaced with zbyte, zword, and zlong as defined in src/common/frotz.h.
src/common/frotz.h
src/sdl/sf_font3.c
src/sdl/sf_fonts.c
src/sdl/sf_frotz.h
src/sdl/sf_ftype.c
src/sdl/sf_images.c
src/sdl/sf_osfdlg.c
src/sdl/sf_resource.c
src/sdl/sf_sound.c
src/sdl/sf_util.c
src/sdl/sf_video.c