* Implement Robin Hood hashing
This replaces the previous separate chaining implementation. This
approach is more memory-efficient, cache-friendly, and puts much less
stress on the memory allocator.
* Replace crc32 with fnva1
Also attempt to make the compiler pre-hash as much stuff as possible at
build time.
* wip font rendering stuff; hashtable monstrosity is temporary
* various text rendering fixes/improvements
* HashTables™ 3.0
* Add some comments to aid navigating the hashtable macro maze
* overhaul text rendering API; add default and example shaders
* text: implement text_render for spellcard effect; misc fixes
* README: update dependencies
Bye SDL_ttf, hello freetype2.
* text_draw: fix resolution/scale-dependent bugs
* make text_draw fallback to the current shader, fix hud and stagetext
* repair the bgm loading
* fix spell practice mode
* fix walloftext
forgot one site of text_draw earlier
* fix wrapped text rendering
* fix and simplify the hud text shader
* dynamic glyph cache
* implement font size change on window resize/quality setting change/etc.
* rename text shaders for consistency
* preloads for fonts and text shaders
* make the stagetext shader look somewhat better
* text_render: attempt to normalize height
* small improvement for stagetext
* Add a general purpose multi-threaded task manager (worker pool) for background tasks
Reimplemented screenshots off-loading using the new task manager.
* Largerly rewrite resource loading internals
They use the new task manager API now and should be generally more
robust.
* Made the game playable without threads again
* wait for resource async load task instead of intermediate state change
* remove dead code
* taskmgr: if creating a worker thread fails, try to make sure the others terminate
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)
Still, this is a ton better than mixing different styles all over the
place, especially within the same file.
* There's no distinction between "temp" and "perm" nodes anymore.
All nodes are allocated with 1 reference belonging to the
vfs_alloc() caller.
* VFSNode pointers retrieved by any API that returns one (most
notably vfs_locate) are guaranteed to have exactly one reference
belonging to the caller. What this means is that you must always
decref them when you're done using them.
If you're implementing such an API (e.g. a custom locate), remember
to incref any persistent nodes you return.
* Passing a VFSNode* to anything that successfully consumes one (for
example, vfs_mount) transfers ownership of the reference to the
consumer. In other words, consumers do not incref your nodes, but
they will decref them once they don't need them anymore. If you want
to keep the node around, then you must incref it first.
* Bunch of other stuff.
"Ownership" is an abstract concept in this context. Basically it just
means "cleanup responsibility".
well, it actually still exists, but the chance should be much lower and
i don't know how to fix this better without locking on every read.
fwiw, i never had it actually break even before this fix.