OK, forget about the Hermes and cygwin include directories stuff, that was
only for the 0.3.2a release, not the snapshot. Sorry I got mixed up. But
still problems... this is a long e-mail, but you can skim through most of
it! Let me tell you exactly what I'm doing...

Grabbing the 20010704 snapshot from http://sci.helllabs.org/daily/. Grab the
SDL 1.2.1 Win32 devel release: SDL-devel-1.2.1-VC6.zip. Unzip so that my
directory structure is:
\src\freesci
\src\SDL-1.2.1

Load up the freesci workspace. Set active config to sciv debug. Need to
change the path for SDL under the C/C++ tab of Project Settings for sciv.
Please note that (without any changes) the complete project options are:

/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\..\SDL-1.2.0\include" /I
"..\include" /I "..\include\win32" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D
"_MBCS" /D PACKAGE=\"freesci\" /D VERSION=\"0.3.0\" /D "HAVE_DDRAW" /D
"HAVE_STRING_H" /D "HAVE_OBSTACK_H" /D "HAVE_GETOPT_H" /D
"HAVE_READLINE_READLINE_H" /D "HAVE_READLINE_HISTORY_H" /D "HAVE_LIBPNG"
/Fp"sciv_Debug/sciv.pch" /YX /Fo"sciv_Debug/" /Fd"sciv_Debug/" /FD /GZ /c

You will see the readline stuff there, as well as obstack (but I managed to
find that header file somewhere). I take out have_ddraw, have_obstack, and
the two have_readline directives (as main.c wants them otherwise), and add
have_sdl. I also change warning level back to Level 1 since I don't want 900
warnings. I don't alter anything on the link tab. I then do an OK on that
(if you change to look at a different configuration's settings, it loses
your current setup).

So then I go back into Project / Settings and look at the setup for the
freesci debug config. Under the C/C++ tab, it's compile options (before
changes) are:

/nologo /MDd /W3 /GX /Zi /I "..\..\..\SDL-1.2.0\include" /I "..\include" /I
"..\include\win32" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D
PACKAGE=\"FreeSCI\" /D VERSION=__TIMESTAMP__ /D "HAVE_DDRAW" /D
"HAVE_STRING_H" /D "FREESCI_EXPORTS" /D "X_DISPLAY_MISSING" /D "HAVE_SDL"
/FR"freesci_Debug/" /Fp"freesci_Debug/freesci.pch" /YX /Fo"freesci_Debug/"
/Fd"freesci_Debug/" /FD /GZ /c

So I take out have_ddraw again and change the SDL path to point to 1.2.1.
Under the Link tab, I again change the path for SDL so that it
reads..\..\..\SDL-1.2.1\lib\SDL.lib.

The first build error I get is in midiout_win32mci.c where I change
MOD_WAVETABLE to MOD_SQSYNTH. Then scriptdebug.c has an unresolved symbol
for sleep so I add this to the top of that file:

#ifdef _MSC_VER // ALX
# include <windows.h> // ALX
# define sleep Sleep // ALX
#endif // ALX

So everything compiles and links with only a few warnings. I copy the SQ3
resource files into the win32 folder so Freesci can find them. I previously
deleted my .freesci folder with the config files in it, so Freesci has to
recreate them. Here's what I mean:

Loading resources...
No patches found.
SCI resources loaded.
Mapping instruments to General Midi
MIDI mapping magic: 96 MT-32 Patches detected
MIDI mapping magic: 42 MT-32 Memory Timbres
FreeSCI, version 0.3.0
Warning: Kernel function InspectObj[58] unmapped
Warning: Kernel function ShowSends[59] unmapped
Warning: Kernel function ShowObjs[5a] unmapped
Warning: Kernel function ShowFree[5b] unmapped
Warning: Kernel function StackUsage[5d] unmapped
Warning: Kernel function Profiler[5e] unmapped
Mapped 108 of 114 kernel functions.
Initializing vocabulary
Unexpected class mask-*  class mask = ff4
Unexpected class mask-about  class mask = 008
Unexpected class mask-and  class mask = 004
Unexpected class mask-any  class mask = ff4
Unexpected class mask-anyword  class mask = ff4
Unexpected class mask-but  class mask = 004
Unexpected class mask-for  class mask = 008
Unexpected class mask-if  class mask = 004
Unexpected class mask-nor  class mask = 004
Unexpected class mask-or  class mask = 004
Unexpected class mask-until  class mask = 008
Unexpected class mask-while  class mask = 008
Unexpected class mask-with  class mask = 008
Unexpected class mask-without  class mask = 008
Engine initialized
 Script 0 at 03ea
 Game designation is "SQ3"
Initializing directories...
No configuration file found; using defaults.
Using primary SDL surface of 640,400 @32 bpp (834290)
00ff0000 0000ff00 000000ff 00000000 16/0=8 8/0=16 0/0=24 0/8=32
Initializing graphics
Opened null sound device
Sound server initialized
Sound server reports polyphony 32
console.c: open_console_file(): NULL passed for parameter filename

At this point, I get an ASSERT failure in fopen as it is passed a NULL
pointer for its first parameter. The call stack is:

_fsopen(const char * 0x00000000, const char * 0x100b2270, int 64) line 53 +
35 bytes
fopen(const char * 0x00000000, const char * 0x100b2270) line 104 + 15 bytes
open_console_file(char * 0x00000000) line 550 + 17 bytes
main(int 1, char * * 0x00860d30) line 1037 + 15 bytes
mainCRTStartup() line 206 + 25 bytes
KERNEL32! 77e97d08()

And the call to fopen is in open_console_file at the point indicated by the
>>> symbols, and the filename pointer is null:

void
open_console_file (char *filename)
{
  if (con_file != NULL)
    fclose (con_file);

  if (NULL == filename)
  {
    fprintf(stderr, "console.c: open_console_file(): NULL passed for
parameter filename\r\n");
  }
#ifdef WIN32
>>>  con_file = fopen (filename, "wt");
#else
  con_file = fopen (filename, "w");
#endif
}

My attempt at a quick hack of wrapping an else around the last five lines
fixes the problem.

I then try with sound using the -Owin32mci option and everything is shit
like it used to be (until you put the new code into the CVS :) :) ).

I'll be away for a few days, and probably won't be able to check e-mail, but
hopefully this will allow you to make some minor fixes.

Good luck with the job hunting too Matt!

Cheers,
Alex.



Reply via email to