Monday, August 11, 2008

Visual Studio 2008 - The Horror Lives On

There's definitely something bizarre happening with either the compiler, the linker or the CRT. A new bug has now surfaced, causing a "map" command to crash the engine when issued during the startup demo loop. At this stage I consider it a waste of my time to work any further in this version; I'm reverting back to 2003 (where even using the very same project options doesn't have any trouble at all).

Now that I'm back on track with a development platform that can at least be relied on to behave in a predictable manner, I've dug in and done some serious debugging on a few items; mostly in the save/load menu. There were some issues there that had mounted up over a while, so I've finally fixed them. These include:

  • Mapshots not working right on Intel - it turned out that Intel cards used a non-standard page flipping policy, meaning that the previous framebuffer was actually used. The simplest solution was to flip buffers twice (also works fine on non-Intel). I'll probably revisit this, as there's a flicker while the shot is being taken which I want to get rid of.
  • Save Enter/Delete key crashing - I was missing a return!
  • Delete key from the load menu returning you to the save menu - just a mixed up pointer.
  • Added save time to the menus (yyyy-mm-dd hh:mm - there wasn't room for seconds).
The surface refresh is also fixed. Fortunately I didn't have to rewrite it! It turned out that duplicate textures (i.e. same texture data but a different name) in certain maps were the cause here, which when coupled with my using a texture list built at loadtime (rather than cl.worldmodel->textures) in my texture chains caused some texture_t structs to not have texturechains built for them. Just a simple matter of switching back to cl.worldmodel->textures.

0 comments: