Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/thpatch/thcrap

Touhou Community Reliant Automatic Patcher
https://github.com/thpatch/thcrap

textdisp: Correctly explain CreateFont()'s fallback font selection.

It's been almost two years since I started doing Windows Touhou patching, it's about time I actu...

b7c03aabd822c1465215898d12e828c508def652 authored over 10 years ago by nmlgc <[email protected]>
textdisp: Split the CreateFont() detour to make use of detour promotion.

8d54854d20063244dab6dbac633ed547e477aa65 authored over 10 years ago by nmlgc <[email protected]>
Add function level promotion detours for the CreateFont() family.

Yeah, I suck at inventing new terminology. Just read the comment, it should make more sense then.

ee2741c189f6b20ee7e658fe5f7c9ff5fe5a0ef1 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Export function level promotion for the CreateFont() family.

Yeah, it feels sort of weird to export these as part of win32_utf8, but hey, thcrap needs that f...

552dc1f1446744c313c30b98a61097ed220e3ce4 authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Fix an off-by-one error in layout_match().

181555e03333871184b8380aab803d6d8f8ab7d6 authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Use custom callback functions to render substrings.

... or none at all. For now, this is mainly to get rid of the unnecessary TextOut() calls when c...

e23a26f5ba0e752cbe4203f4d0ecf6e7bb1a5fdf authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Consolidate the parameters to layout_textout_raw().

59d2dd3254be6b7f71b1044e5ca9dce03f662004 authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Perform full text layout in GetTextExtent().

Again, thanks to Kill-o-matic for convincing me to ultimately get this done. I really managed to...

75c4baec6a08fbc2e24b6fdb73ed378554ec9df1 authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Recognize 'l' as a tab command.

9f736d6e5c80d8532555b0072cb4be579cee22c3 authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Refactor layout processing into its own function.

Yup, we're finally about to address that old TODO.

3d2990a9d45729862464eedaf9f23268c542580e authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Don't increment the tab counter if no tab commands were used.

Any tab alignment in tokens that only use font commands is confusing and unintuitive, so let's g...

e255d7426133572254c05329e7a024c3d62e86b0 authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Refactor tab command parsing into its own function.

Introducing, at last, a state structure! Well, we had to take this step one day...

322179c5ba59d47d6c312a6f4cf301f1d1b63355 authored over 10 years ago by nmlgc <[email protected]>
TSA: ANM: Correctly shift the alpha value when blending 16-bit sprites.

Seems like we've never had a test case for this, until we've encountered th07 and std6txt.anm.
T...

2df16421c32c225785b29a00d805e3111beb1d74 authored over 10 years ago by nmlgc <[email protected]>
TSA: Layout: Only add the original X offset in the final rendering call.

1afe68450db235485c1281ac65ecbe51d83335cf authored over 10 years ago by nmlgc <[email protected]>
Cleanup.

With all the progress we've made and th143 introducing a new font, that font replacement comment...

bc6c15a0536cb82b2418a0151167ee4082c20054 authored over 10 years ago by nmlgc <[email protected]>
Revise detour chaining to use a system similar to MS-DOS interrupt chaining.

It's just another normal day of development. Today, a new set of detours are on the agenda. Ever...

86e652d855f37962eed0096a409f96610c14aaa6 authored over 10 years ago by nmlgc <[email protected]>
detour_cache_add(): Use a setinel NULL to pass the number of arguments.

c551831f0be64b27ba28973322887384ca26ee2c authored over 10 years ago by nmlgc <[email protected]>
Restore the exports of the LoadLibrary injection detours.

We do need those to ensure locale independence in DLL injection chaining after all. As a result,...

ccc87a59d2745cddf97a0b56cff0dab293ca6825 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add CreateFontIndirect() and CreateFontIndirectEx().

e7425b8f9015a53c43e4f859ef06b7b6878fcc50 authored over 10 years ago by nmlgc <[email protected]>
Bump version number to 2014-05-28.

d131efa2b23e80873066dcfdb4dc68a053f99a1e authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Fix patch removal to work with absolute dependencies.

1139a1c309aa2ef6883e3818a38ecdb96f5d775f authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Refactor selector matching into its own function.

100c26aa747fd4511fa081e77fd6dd971282da5e authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Use selection objects in IsSelected().

61ee658f26bddfb0141a128fd47b3c67baf5fd4f authored over 10 years ago by nmlgc <[email protected]>
json_object_merge(): Allow to overwrite the old object with non-object types.

Turns out that a certain modder needs to wipe everything below his patch.
Really though, this sh...

cfca3a61d24335bc3ee960242948f0291372a92d authored over 10 years ago by nmlgc <[email protected]>
Cleanup.

Yeah, haven't had one of *those* in a while.

90a4fd1a09632296fd002cb8f5b896d10cde4816 authored over 10 years ago by nmlgc <[email protected]>
Remove the file_size_patch breakpoint.

68f18ef174323bfc679a7279bcecea283c14fc3b authored over 10 years ago by nmlgc <[email protected]>
Revise file size handling in file breakpoints.

After changing the variable names to better reflect their actual usage and removing unnecessary ...

f6fa4cbe652b9248f4324ed626a7effa70fa3d1d authored over 10 years ago by nmlgc <[email protected]>
Move UTF-8 BOM skip on JSON loading to json_loadb_report().

bfcd6a47e8f1e9d8b0dec3ab1d0c659a01b13eac authored over 10 years ago by nmlgc <[email protected]>
BP_ruby_offset(): Use TSA font block IDs for the font parameters.

ae71c15467ff61357beb927f7e2e7151cd9b974c authored over 10 years ago by nmlgc <[email protected]>
Don't pass the run configuration to thcrap_plugin_init().

... yeah, why?

300fdc169c7de4151babce1be60d81616089c8f0 authored over 10 years ago by nmlgc <[email protected]>
fr_tls_free(): Take the file_rep_t object as a parameter.

Even less duplication! \o/

5de150152e6e6bbe1da0006181fb4dc57a0f1c34 authored over 10 years ago by nmlgc <[email protected]>
bp_file: Refactor the patchhooks_run() call into its own function.

5 parameters, one of them wrong... OK, too much duplication.

1dae72573eea000a08c6cd1c62c169bc27ff4ec0 authored over 10 years ago by nmlgc <[email protected]>
Don't include run_cfg among the parameters for a patch hook.

Come on, this thing is global anyway.

be3669a1cbe44e60ff14c3ae50495506e648b616 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add EnumFontFamiliesEx().

4fcda3ad374d3101f7a6a2b438117df911d4b3b3 authored over 10 years ago by nmlgc <[email protected]>
scripts: Filter out Thumbs.db when enumerating the files of a patch.

7969b5dc9a1f25626fefd5394452a5aeb7576434 authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Use the correct stack patch ID when removing dependencies.

Also renaming the variables since it hasn't been obvious enough.

51915f53fa3b96faeeb51fe1fd5d785419db713c authored over 10 years ago by nmlgc <[email protected]>
thcrap_tsa: Add a function to fetch HFONT pointers from a predefined block.

dcac3371f76686a0a4e18f36e244411e29af2176 authored over 10 years ago by nmlgc <[email protected]>
json_object_merge(): Only recurse if both source and destination are objects.

Turns out that we might like to completely overwrite objects with other data types.

5f31a8f026308bebc80484943913b43b779315de authored over 10 years ago by nmlgc <[email protected]>
repatch: Use NextEntryOffset to advance the buffer and to fix a crash on Wine.

Eh...?!? Apparently, the "DWORD-aligned" part in MSDN's documentation of ReadDirectoryChangesW()...

cca89be35c303a96ae072e19e471cd2c1147703b authored over 10 years ago by nmlgc <[email protected]>
Bump version number to 2014-05-12.

e21a1cae8801486f9f63e373d586d85a2e5bdea6 authored over 10 years ago by nmlgc <[email protected]>
thcrap_tsa: Register the th143 dialog file name pattern.

934e554641ad669e7e1f9e370b83341d541866ee authored over 10 years ago by nmlgc <[email protected]>
thcrap_loader: Remove an unnecessary goto call after a CreateProcess() failure.

Ah, the old, ancient pearls you find by just randomly reading in your code.

ae00223899c31d24f724c4c978b9bbb42b3c3660 authored over 10 years ago by nmlgc <[email protected]>
Bump version number to 2014-05-08.

20ae2999282c3ecb77fb16354d64f30a65ecbaa8 authored over 10 years ago by nmlgc <[email protected]>
Move the global function list out of the run configuration.

9d4a6ee3bb0698091e9199c23b504058b8c0e145 authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Ask to search in another directory if no games were found.

cef7bc67a1298b41e4ed2bb61b1546c76a5b6de5 authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Add an error case if no games were found at all.

5e22082dfb68d85be2f290353842448222976825 authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Use SHBrowseForFolder() to select the root game path.

Yes, I totally did not have this idea earlier. :/

07ff6da98519f80e94c8705c101eea60089db948 authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add SHGetPathFromIDList().

93434c9985b2a7a0e3ed3d12ed6791aa3c2b21e5 authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Fix a logic error with read-only repository files.

989c14bf778f3066f4d793c0635304435b79605d authored over 10 years ago by nmlgc <[email protected]>
repo_update.py: Catch the error thrown if files.js doesn't exist.

... and just when you thought you had a rock-solid build, the one main thing you wanted to focus...

8281756975d26670dc254f55cfc6aa751333ef4b authored over 10 years ago by nmlgc <[email protected]>
Bump version number to 2014-05-06.

09ecfea51a9508c1e21c08407e23bb8112841114 authored over 10 years ago by nmlgc <[email protected]>
scripts: json_store: Don't try to create directories with empty names.

6ee318c418e57693439733afd98d08097e685c26 authored over 10 years ago by nmlgc <[email protected]>
repo_update.py: Ensure Unix line endings for JSON input.

Apparently, raw.githubusercontent.com automatically does this. As a result, the checksums create...

c1d71bb15fbc28af600e49250e9f6358fdbf8e05 authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Mention the artwork offer.

e862453e6c59091f619c49b73ef4c49919bafbab authored over 10 years ago by nmlgc <[email protected]>
thcrap_configure: Default to the Nmlgc repository.

fb1b9ed2361377572a87c243de661883c2268e84 authored over 10 years ago by nmlgc <[email protected]>
Add release archive signatures to .gitignore.

42aa75737ec38b593ff9d6ca69daef5b3557bf70 authored over 10 years ago by nmlgc <[email protected]>
thcrap_update: Add digitally signed automatic updates of thcrap itself.

I spare you the long, drawn-out history of how this came to be. After months of research, fighti...

210ccee275646b406c1ed172a9673a3750185eb9 authored over 10 years ago by nmlgc <[email protected]>
Add a function to replace substrings inside persistent strings.

Who would have thought that basic string templating would be that trivial?

Apart from needing i...

7496e7edc6f749376d3b683ded18d7ac47a622b5 authored over 10 years ago by nmlgc <[email protected]>
scripts: Enforce Unix newlines when writing JSON files.

6f1dc606b4c4f2702e0a5b48338488ac2eec197c authored over 10 years ago by nmlgc <[email protected]>
Store the thcrap directory in the run configuration.

d1bfc7d2c33daa0abda56a3671bbd07bf140245d authored over 10 years ago by nmlgc <[email protected]>
Allow deletion of unmodified patch files by using JSON nulls in files.js.

8419e11fa157580f650977924f7a5d32a81831d2 authored over 10 years ago by nmlgc <[email protected]>
Add patch_file_delete().

5511a7368f035cff2483ce5831290a8523cf0244 authored over 10 years ago by nmlgc <[email protected]>
Add a script to digitally sign a release archive.

a32097d48294c315c2e67b143db6c5392070d27f authored over 10 years ago by nmlgc <[email protected]>
zip: Add support for archive comments.

e5e4649fe18394e5147260823eb03b3c606bcb79 authored over 10 years ago by nmlgc <[email protected]>
zip: Support NTFS timestamps from a file's extra data.

37952301ec918c1666f1d616ad92ab46e57b0a99 authored over 10 years ago by nmlgc <[email protected]>
zip: Add a function to unzip files to disk while preserving their timestamp.

46821a49bf745c8b2d1397dfc428112f6798e022 authored over 10 years ago by nmlgc <[email protected]>
Add basic zip file reading support.

Seriously, *this* had to become the industry standard container format for Deflate? Why.

21a375f3c277bed46454f5b9036c468416ce5dc2 authored over 10 years ago by nmlgc <[email protected]>
Ensure that detours are cleaned up after everything else.

f75654681e596e6258a41b1afd29e32903bcdcd7 authored over 10 years ago by nmlgc <[email protected]>
thcrap_ExitProcess(): detour_next() doesn't make any sense here.

e8ad3693578a3ab825fe74a1d5939b54faef3ff6 authored over 10 years ago by nmlgc <[email protected]>
json_object_get_create(): Fail if the containing object is NULL.

... because json_object_set_new() dereferences the new value if the containing object doesn't ex...

c3a74aebc0d415dae2a92437123cc52ae14ff727 authored over 10 years ago by nmlgc <[email protected]>
Add a wrapper macro for the typical Win32 return value pattern.

Yeah, it also took me a while to wrap my head around the concept of returning zero (= 1 value) f...

bf3b6c6ce7cb36570b0c1a458f8d2413d56cc490 authored over 10 years ago by nmlgc <[email protected]>
Move update notifications for thcrap and the game itself to thcrap_update.

5f6dd9d28d0d441bb9dcbc22d6968e28fd133eb8 authored over 10 years ago by nmlgc <[email protected]>
Don't expose the plugin list in the run configuration.

d016d316fb32468d98112c9bd6e5ab77cc09bf91 authored over 10 years ago by nmlgc <[email protected]>
Directly initialize plug-in modules after loading their DLL.

The first step to a saner init system. This guarantees that every core module (especially string...

f90e36e728a9c56ce0e63e12b6fbb42bab0e4743 authored over 10 years ago by nmlgc <[email protected]>
Don't export detours.

With detour chaining, this practice is not exactly conducive to good style.

8e4210826152bf84bdca4ab7b753c883a89f9316 authored over 10 years ago by nmlgc <[email protected]>
Sort exported functions alphabetically in order of their source files.

Gosh, this was *so* aggravating.

d538e0487ebff055ab0e7b5ac622b8e286ad93c7 authored over 10 years ago by nmlgc <[email protected]>
Add runconfig_title_get().

9945b0bbd5a2af6e44ba504b5d7d544db883bbfd authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add DeleteFile().

b807e9b26d91adf41c4722e584d6d34ead45b409 authored over 10 years ago by nmlgc <[email protected]>
Document the implementation of the jsondata module.

b865eaf0144751e3f7783969e95f8d781b45e73c authored over 10 years ago by nmlgc <[email protected]>
Add a macro to print a message with the name of the function it appears in.

I've come to like this format quite a bit.

5cd65da2a2b45d136330e5e1d39804e6ae822b6b authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add RemoveDirectory().

236178551a3192a75ce974cf0a779ee3a9d2dd2d authored over 10 years ago by nmlgc <[email protected]>
Add png_image_clear().

86399ad9796c58e670fe6522fb6c151fc014cc05 authored over 10 years ago by nmlgc <[email protected]>
bounds_init(): Clear the image in any case.

Whoops, forgot this part during the refactoring. This actually caused crashes when dumping the s...

0b46806359fdc3fa954b545e77522e7a937c0438 authored over 10 years ago by nmlgc <[email protected]>
sprite_patch_set(): Verify the destination sprite coordinates.

Fixes a bug introduced with advanced image patching in 2014-01-03. ANM entries can define sprite...

1c2b4ead1575e46e54984e72c32cf78adb7f8f00 authored over 10 years ago by nmlgc <[email protected]>
Refactor format specifications into a dedicated module.

One more repatchable file, and one less instance of hardcoded initialization in thcrap_init().

83648e7fc5a7b6a95ed980b4d35390fa569e5c55 authored over 10 years ago by nmlgc <[email protected]>
TSA layout engine: Only use the rightmost tab cell for the last token on a line.

Previously, this effectively did not render any token beyond the first one that didn't provide a...

2cd72e48d70941cba87063f12735bed38bf09ee5 authored over 10 years ago by nmlgc <[email protected]>
Add a module to watch for changes to the patch files.

In conjunction with the jsondata module, this implements hot-repatching (issue #5) for global data.

57f1c540cbece34db219939174356c4b25109649 authored over 10 years ago by nmlgc <[email protected]>
sha256: Use compiler intrinsics for byte swapping.

Makes the code clearer, is marginally faster, and gets rid of some warnings.

c1412253c0570478778b8ccfddc6772b080a6020 authored over 10 years ago by nmlgc <[email protected]>
Add a module for global JSON data storage.

This also temporarily removes spell repatching.

0638c7b9d83fb28f2416879ba93d34092e2f8e23 authored over 10 years ago by nmlgc <[email protected]>
sha256: Adapt to the general coding style and fix whitespace errors.

c4995201c7850a198872607fd38c10beef97d355 authored over 10 years ago by nmlgc <[email protected]>
thcrap_init(): Initialize patches before accessing any of their data.

c109b867cfeb46681304e4764aea1491e427972b authored over 10 years ago by nmlgc <[email protected]>
detour_next(): Run the chain from the beginning when caller is NULL.

This allows us to run a full detour chain outside of its own execution, which will be necessary ...

0a2fab7776db08cfb792b26ca7b7b667ecce273d authored over 10 years ago by nmlgc <[email protected]>
Add a UTF-8-compatible wrapper for writing PNG files.

Well, turns out that png_image_write_to_file() internally uses fopen(), which in turn internally...

7ea0276c1ecdd7f50465cb3715ae82dcf7a17dc8 authored over 10 years ago by nmlgc <[email protected]>
Remove strings_get_value().

No point having this in the API when JSON strings are almost always a better alternative to a pl...

a84bacba7fd33e228946ba88e9f64859ed5b968c authored over 10 years ago by nmlgc <[email protected]>
png_image_resize: Correctly handle realloc() failure.

cd4ebaf957376ee5c9e89898afdd34bb11cdbec5 authored over 10 years ago by nmlgc <[email protected]>
Move sprite boundary PNG resizing to the libpng extensions.

That has been a generic image resizer all along.

1444a12272d50e9c697f43a77fed62bfbf74ffdf authored over 10 years ago by nmlgc <[email protected]>
Refactor new PNG image allocation into its own function.

We'll be needing that functionality over at the PC-98 side.

Also, who needs return values anyway.

13c486934dabe3d6c9d39ae784188be2fceacb9a authored over 10 years ago by nmlgc <[email protected]>
detour_next(): Store the original function pointer at the end of the chain.

089830757cc633ca352631f8aaf064041e32882f authored over 10 years ago by nmlgc <[email protected]>
win32_utf8: Add fopen().

Well, we had to enter CRT territory at one point.

14d309bcd4e53de877831414f6e1a856a0ce5233 authored over 10 years ago by nmlgc <[email protected]>
detour_cache_add(): Don't add duplicate function pointers.

Very important, detour_next() would otherwise loop infinitely.

6b31af678cc0ade42af9648162399eaa2a9f2de4 authored over 10 years ago by nmlgc <[email protected]>