chunk->children[1].tex.tx += chunk->children[1].tex.tw;
chunk->children[2].tex.ty += chunk->children[2].tex.th;
chunk->children[3].tex.tx += chunk->children[3].tex.tw;
chunk->children[4].tex.ty += chunk->children[4].tex.th;
I don't know why the [4] on the last line didn't throw an array OB access violation, or even why I wrote that. Changing it to [3] pushed that quadrant down where it needed to be. Hooray!
I think there are still a couple more bugs, like switching between texture pages and stuff (I think it'll only use the next texture in the stack if the current one is marked as "full", rather, it should use the next one if the current's maximum available slot is less than the needed space.)
Oh, and I have to code in the stuff to deallocate textures. I actually am not sure how my partitioning algorithm will fare up against fragmentation at this point, but we'll see. I have high hopes :)
Hur hur hur!