Uru - Ages Beyond Myst Demo works good enough to play completely in wine-1.3.20 but loses some of it's functionality and can't be completed in both wine-1.3.21 and wine-1.7.5. Disabling sound at the beginning of the game allows the game to be played completely in both wine-1.3.21 and wine-1.7.5.
The problem is in /dlls/msvcrt/file.c.
In wine-1.3.20 this is the line used to define the allowable number of open files.
static MSVCRT_FILE* MSVCRT_fstreams[2048];
In wine-1.3.21 and wine-1.7.5 these lines are used for the same purpose.
#define MSVCRT_MAX_FILES 2048
#define MSVCRT_FD_BLOCK_SIZE 32
static file_crit* MSVCRT_fstream[MSVCRT_MAX_FILES/MSVCRT_FD_BLOCK_SIZE];
static int MSVCRT_max_streams = 512, MSVCRT_stream_idx;
Changing the last to lines to the following will fix the problem.
static file_crit* MSVCRT_fstream[MSVCRT_MAX_FILES];
static int MSVCRT_max_streams = MSVCRT_MAX_FILES, MSVCRT_stream_idx;
The above mentioned program needed the values to be at least 1022 to play to completion
Bug or Not ?
Re: Bug or Not ?
Could be related to http://bugs.winehq.org/show_bug.cgi?id=17403.
Re: Bug or Not ?
Thanks for the link but no, sound seems to be correct. The ogg and wave files sound the same except for the ones which are split into left and right files.
The issue is one of available resources. Just changing the two values from 1022 to 1021 allows the game to be played to the end but not completed. At the end the linking book on the pedestal has a gateway image but the closeup of the book doesn't.
The code as given has the maximum value for the index (512) larger than the size of the array (64).
This doesn't work unless this a dynamically allocated structure.
The issue is one of available resources. Just changing the two values from 1022 to 1021 allows the game to be played to the end but not completed. At the end the linking book on the pedestal has a gateway image but the closeup of the book doesn't.
The code as given has the maximum value for the index (512) larger than the size of the array (64).
This doesn't work unless this a dynamically allocated structure.
Re: Bug or Not ?
After corresponding with Piotr Caban, I changed only " static int MSVCRT_max_streams = 512, MSVCRT_stream_idx;" to "static int MSVCRT_max_streams = 1022, MSVCRT_stream_idx;" and the program worked properly.