josh at iswifter.net
Thu Oct 27 18:30:59 CDT 2011
On Oct 27, 2011, at 12:35 AM, Piotr Caban wrote:
> On 10/27/11 2:01 AM, Josh Juran wrote:
>> On Oct 26, 2011, at 11:59 AM, Josh Juran wrote:
>>> I'm ready to begin work on a basic_ifstream implementation for Wine, which is needed for the game Vampire Secrets among others.
> In order to implement it correctly lots of functions/classes needs to be implemented first. I've started stubbing some of them but there's still lots to be done.
>>> Well, it turns out that the game creates an ifstream for its intro movie and then uses a completely different mechanism to read from it. Defining a (nearly) empty constructor and destructor for basic_ifstream<char> was sufficient to make things work.
> It may happen because of inlining some functions.
I don't understand this explanation.
Most games don't have this issue. It looks like the developer was originally using ifstream to read the file and then switched to something else, but forgot to remove the ifstream object definition.
> The game may also use created streams later.
Possible in theory, but unlikely.
> It's not good to add an incomplete structure. We'll end having lots of bugs that will need to be debugged to find where the problem is. Especially adding uninitialized vtable pointer is not a good idea.
I agree that this patch should not go into Wine as is.
> I think it should be implemented by adding all fstream class dependencies first. Thanks to it it will be possible to create a complete basic_ifstream_char structure.
I appreciate your (and others') willingness to provide feedback. Unfortunately, my job in this case is to make certain apps work (by hack or by crack) and move on.
More information about the wine-devel