Add a macro for VLA conversions to UTF-16.
win32_utf8: Add SetDlgItemText().

Necessary for the pad input check in the custom.exe of th06 (... and later games, if only it actually worked there).
patch_update(): Always use local server URLs.

That's the only drawback to the new updating system, which treats patch.js just like a normal file.

Oh well, at least it removes some ambiguity from the code.
patch_update(): Move local file hash list to files.js.

This will cause everyone to redownload everything...
patch_update(): Load file hash list from files.js.
Eliminate potential VLA memory leaks.

Whoops.
thcrap_configure: Mention that the shortcuts work from anywhere.
Do string table lookups for string parameters in variable argument lists.
Refactor persistent string allocation into its own function.

There will be more than just sprintf.
Use length-prefixed strings for persistent string storage.

It doesn't really give any significant boost in performance, but hey, it makes for a much cleaner implementation - especially if you take into account what's to follow.
Add strings_strclr().
Add strings_strcat().
thcrap_init(): Write the "game" key in any case.

Turns out that we not only can have games with no dedicated main JSON file, but also games that do have one, well, without a "game" key.
layout_match(): Correctly parse nested layout markup.
Load dialog resource replacements from external binary files.

When translating resources using a tool like Resource Hacker, the location of a resource inside the executable is very likely to change. That makes the initial plan of using binary hacks for complete modifications of the resource script completely unreliable.

However, this introduces a much nicer system: Now, we can just directly supply that blob as a separate file, using the same file name scheme as for the JSON dialog descriptors. Elegant, native, understandable, and with just a few lines of additional code to pull it off.
thcrap_init(): Turn relative archive paths into absolute ones.

Wow. I have dreaded relative paths for so long, and then it turned out to be so easy.
thcrap_configure: Write relative paths.

Closes #7.
Fix intermediate build directories.

This should also get rid of the the race conditions during compiling.
runconfig_set(): Increment the run configuration's reference counter.

Fixes bug #41 (https://bitbucket.org/nmlgc/thpatch-bugs/issue/41).
thcrap_tsa: Set window title to translated game title and identified build.