Hi,
>
> Regarding fixing this:
> * Preserved CWD string buffer during restart (a)
>
> where the directory was not found on starting FreeSCI - that is now fixed.
> However, when trying to save I get:
>
> Finished all writing.
> Memtesting savegame.cfsml: line 1027
> Memtest succeeded!
> Memtesting savegame.cfsml: line 1029
> Memtest succeeded!
> _findfirst errno = ENOENT: no match
sci_find_first() for Win32 is defined in tools.c; please have a look at
it and the way it's called- maybe we're using '/' for path separation
somewhere, or something like this. On UNIX, ENOENT is used in opendir(dir)
iff dir = "" or dir does not exist in the global directory hierarchy.
> And the Change Directory button does not change directories at all!
I've never tried to use that one here because of a different problem: The
'change directory' text window is much too small to display the entire
directory path on my box (on UNIX, this is /home/<user>/.freesci/<game> by
default, except on systems that set $HOME differently, of course).
Allowing EditControl to edit strings of arbitrary length in general is not
an option, of course, since we can't be sure about the amount of memory
reserved for the string to edit. However, it should be possible to make a
special exception for the CWD string, which we can detect easily, after
all...
Sorry, got distracted to a different topic there. WRT ChangeDirectory not
changing directories:
There is no ChDir() kernel function, at least AFAIK, so I assume that
Sierra expects the interpreter to chdir() into the savegame directory by
default, which we don't do (yet). This is another bug which affects the
following kernel functions:
SaveGame()
RestoreGame()
GetSaveFiles()
CheckSaveGame()
Suggested solution: Do appropriate chdir()ing at start and end of
functions.
llap,
Christoph