I haven't updated for a while because I haven't done any work for a while, but today I knuckled down and started in again on a few things.
First up was a minor rewrite of my MDL texture coord generation. What on EARTH was I THINKING when I wrote the original version of this? Quite an idiotic approach, so I fixed it.
Next I looked at my external textures, thinking that I might move them to a binary search. I generally like using built-in API/CRT functions rather than rolling my own where possible (although in some cases I do roll my own) as they are tested, debugged and working code.
Normally I don't run with external textures as I prefer the classic look, and previous tests of this code just used one or two replacements (like the conback), but this time out I dropped in a full set just for the hell of it. The upshot is that external texture loading in 1.8.3 is kinda broken. Only about half of the textures load, and it's alphabetical order based, so those that come later in alphabetical order are the ones that don't load.
Now, the problem is that when initially enumerating external textures I decided to reuse my "scratch" memory buffer as a temporary holding area. This is a 256K buffer, giving room for over 65,000 external textures (an array of pointers), but being a little on the cautious side here I thought "what if someone actually does have that amount of external textures?", so I imposed a max. And when calculating the max, what did I use?
SCRATCHBUF_SIZE / sizeof (d3d_externaltexture_t);Yup, forgot a pesky "*".
So instead of the correct maximum of 65536 an incorrect maximum of 512 was used.
The really odd thing here is the lack of bug reports. I guess it confirms my general theory that most people who download DirectQ are just regular people who want to play Quake rather than hardcore community members who care about this kind of thing.
What this means anyway for 1.8.4 is that it's going to be released sooner rather than later. There were a handful more things I wanted to do, but thankfully hadn't yet gotten to the stage of disrupting the code overmuch for them, so the current plan is to bring what I have together and release it.
The option of a 1.8.3d did occur to me, but for the sake of one bugfix it's not worth it, and I'm unwilling to take the 1.8.3 line any further by rolling in some more updates.
So watch this space sometime over the next week or so!
1 comments:
This problem with the external texture loading, would this explain why not all luma textures (maybe other textures too but I haven't noticed) are loading when i'm using my external texture set? (i think i'm using the fuhquake textures if that makes a difference). It's not a big issue, I just noticed medikits and some bits of scenery didn't have the luma textures. If that is the problem, is it being fixed for version 1.8.4? Oh, and by the way, just wanted to say awesome engine, full of nice little touches. It runs superbly on my integrated graphics laptop, much better than opengl based engines which always gave me problems with multitexture setting. Keep up the good work. Can't wait for the next release!
Post a Comment