plRegistryKeyList::Read assumed that plUoid object IDs are always
sequential. This is not the case since f664e8b resulted in all keys
getting an ID. The problem manifested itself here because there were
temporary materials that were being created and thrown away, causing
object ID gaps.
It appears that the hsTArray memory management really sucks for smart
pointers like plKey. The crash mentioned at
http://forum.guildofwriters.org/viewtopic.php?f=117&t=6291 went away
immediately after switching plKeyCollector to an std::set.
This was overlooked when the consolidation was done in 3027e0605c.
With this fix, the number of frames to be loaded is entirely defined
in a single place. This also prepares the code for a future commit
to remove the necessity of the compile-time definition entirely.
So this is interesting. If you disable Planar Reflections and visit an age with a DCM, you will crash after a few minutes. This is because plDynamicCamMap is sending the wrong plRefMsg to the plLayer. This does nothing (aside from waste time), so we keep sending the ref again and again and again and again until we get some weird heap corruption and KABLOOOOOOOOOOOEY!
Two of the big nasties, according to profiling, are the TnL enum and
creation of Direct3D objects. It turned out we were doing these things
several times (3 and 4 respectively) during the init process. So, now we
have an hsGDirect3D namespace and some smart pointers to manage them!
Remove detection for cards that are don't support at LEAST DirectX 8.
There's no way they would even be able to get past Direct3DCreate9, so we
shouldn't need to worry about them... I hope.
If you have less than 11MB VRAM or need to use the ref implementation,
then you are using a dinosaur and have no business even attempting to play
this game.
We already link against it, so that's just a waste of time. Also, cleanup
some unneeded ddraw includes. Remember that in Direct3D9, all devices can
render in windowed mode.
ONE PATCH! This commit brings us to half of the patching goal: on launch
of the client, we only show ONE "Updating..." message before we enter the
game proper. Go us!
Now we render titles above the progress bar and the status below (in the
same color as the progress bar!). Also, introduce a new info field that is
guaranteed to be right justified.