UCyborg wrote:It was renamed to "ReportFakeDepthMask".
But wait - shouldn't the new setting name appear in Arokh.ini the first time Drakan is started after applying the new AiO patch?
I'm still on AiO 153 as of right now, BTW.
I'll be releasing the new CP build (with the newest AiO version) around Xmas.
UCyborg wrote:I messed around on Volcano level for over an hour, just reloading the save when necessary, gathering all those dragons with lightning attack to attack me for as long as possible. No lag spikes occurred.
Actually I think the real cause wasn't the bone dragons, but those blasted "Dark Knights" who throw the lightning attack thing. It branches out a lot, and results in a lot of separate flares (at least a dozen instances) showing on the screen at the same time.
Maybe it's something specific to my hardware setup; I don't know.
Also, perhaps you misunderstood what I meant - it wasn't just a regular case of lag spikes occuring when the lens flares are visible: IIRC it was noticeably laggy all the time, even when no new lens flares were being generated (eg. after going back to the starting area of the level, which has long since been cleared out of all enemies).
UCyborg wrote:Nothing random about config file loading code. The paths are determined using standard WIN32 API calls; first the location of dgVoodoo's DDraw.dll, then the location of game's executable
In this case, those 2 paths are one and the same: DDraw.dll is in the same folder as Drakan.exe; the .conf file is also there.
UCyborg wrote:and finally "%appdata%\dgVoodoo". First existent dgVoodoo.conf in the searched paths is used.
I have the exact same .conf file in %appdata%\dgVoodoo, so it couldn't have been loading it from there, either.
UCyborg wrote:Failure in loading due to any reason results in defaults being used.
Yes - but why does it fail to load an existing, perfectly accessible file from 2 completely different, unrelated locations?
That's the "random" part I was referring to.
I wouldn't be surprised if that was another strange bug in the WINAPI; not after seeing KERNEL32.GetProcAddress mysteriously fail for no reason at all - yet in a perfectly consistent, repeatable fashion.
Incidentally, this settings loading issue happened to another Drakan player just yesterday. Again, overwriting the dgVoodoo .dll files with the newest version "fixed" the problem... for now.
Next time it happens to me, I'm attaching a debugger and seeing where the file load fails. I've had enough of this configuration loading fail nonsense by now.
If I can't track it down, then the next obvious course of action will be to add some code to my patch that patches dgVoodoo's hardcoded fallback defaults with the correct settings at runtime.
No, I am not easily deterred.
Really, in that case, I would rather just edit the binaries directly - but I'm pretty sure that this would run afoul of dgVoodoo's license, or some other legal stuff. So I'll just patch the memory image of the files at runtime, to avoid any such issues.
EDIT: I poked around a bit in the code, and I did not like what I saw there:
Using dgVoodoo 2.55 with the dgVoodoo.conf from 2.55.3 seems to replicate the symptoms of the issue quite reliably; that was my first clue that something is very wrong.
As it turns out, the dgVoodoo.conf parser appears to be quite poorly written - in that encountering any setting names it does not understand seems to cause the entire file parsing attempt to fail.
In this case, one of the cuplrits was the "Environment" value in "GeneralExt", since dgVoodoo 2.55 does not recognize that as a valid setting.
Even worse - when the file parsing attempt fails, it fails silently - leaving the user with no indication whatsoever that there is any problem to begin with!
The only sign of trouble is that the dgVoodoo watermark inexplicably shows up, even though it has been disabled by the user - but what the user does not know, is that ALL of their remaining dgVoodoo settings are also getting ignored!
Now, that itself reeks of poor design and looks like a flashing red warning light at the end of a dead-end tunnel, as far as deployment is concerned - but it doesn't really get me any closer to the root of the problem.
The problem lies somewhere much deeper; since I know for a fact that this "settings loading bug" tends to happen even to players who have not been messing around with the dgVoodoo.conf file at all (outside of using the supplied control panel, which should be perfectly fine and not break things!).
So in the end, once again I've wasted a lot of time with nothing useful to show for my efforts.
The only "good" thing is that I've got a pretty good understanding of how the file parsing works now, and where the "hardcoded defaults" are stored in the DDraw.dll.
UCyborg wrote:
It was quite a while ago, and I don't remember what was happening there exactly.
Also you'll have to excuse me for not being able to provide any proper support for Linux, since I don't even know anything about it to begin with. In the case of my patch, it's a strictly "You're on your own here, buddy" kind of thing.
It is very possible that what you described was the case there, though.
Incidentally - if I understand this right, it should be "safe" to have my patch installer add those registry entries at install time, even on Windows machines?
Since to the best of my understanding, Windows will just ignore those registry values entirely.