Skip to content

Releases: thpatch/thcrap

2015-10-29

01 Nov 19:41

Choose a tag to compare

A release after 17 months of more or less active development.

thcrap
  • Restore the exports of the LoadLibrary injection detours.
    (ccc87a5)
  • detour_cache_add(): Use a setinel NULL to pass the number
    of arguments. (c551831)
  • Revise detour chaining to use a system similar to MS-DOS
    interrupt chaining. (86e652d)
  • Add function level promotion detours for the CreateFont()
    family. (ee2741c)
  • textdisp: Split the CreateFont() detour to make use of
    detour promotion. (8d54854)
  • textdisp: Correctly explain CreateFont()'s fallback font selection.
    (b7c03aa)
  • textdisp: Introduce a consistent string representation for
    LOGFONT structures. (e075680)
  • textdisp: Add a rule-based font replacement system.
    (2325832)
  • Standardize the handling of the "cave_exec" breakpoint parameter.
    (c22be49)
  • Add json_flex_array_get_string_safe().
    (55b31a8)
  • Introduce a module hook to be called on thread detach events.
    (3efc0fe)
  • plugin: Optimize module hooks by caching the functions called
    for each. (705a8da)
  • bp_file: Add a thread_exit hook to eliminate memory leaks.
    (805273f)
  • Move the last piece of high-level injection code from the loader to
    the core. (4d15493)
  • Move printf format specifier parsing to win32_utf8.
    (7513037)
thcrap_update
  • Prepare a separate list of files to download in advance.
    (3d949d4)
  • Filter the files to be downloaded using an optional
    callback function. (085e03f)
  • Only download necessary patch data during configuration and updates.
    (add1b88)
  • Self-updater: Delete local files whose updated versions would be
    0-byte files. (88cec5b)
thcrap_tsa
  • Layout: Only add the original X offset in the final rendering call.
    (1afe684)
  • ANM: Correctly shift the alpha value when blending 16-bit sprites.
    (2df1642)
  • Layout: Don't increment the tab counter if no tab commands
    were used. (e255d74)
  • Layout: Recognize 'l' as a tab command.
    (9f736d6)
  • Layout: Refactor layout processing into its own function.
    (3d2990a)
  • Layout: Consolidate the parameters to layout_textout_raw().
    (59d2dd3)
  • Layout: Perform full text layout in GetTextExtent().
    (75c4bae)
  • Layout: Use custom callback functions to render substrings.
    (e23a26f)
  • Layout: Fix an off-by-one error in layout_match().
    (181555e)
  • Add a module for translation of generic plaintext formats.
    (498eafe)
  • ANM: Create a local copy of all sprite coordinates.
    (292bcbf)
  • png_ex: Use a consistent return value for png_image_new().
    (34ddd37)
  • MSG: Cut off replacement strings at the last Unicode code point.
    (b2ce22e)
thcrap_loader
  • Move the last piece of high-level injection code from the loader to
    the core. (4d15493)
  • Give "exe" precedence over "game" in the run configuration.
    (43fe482)
  • Improve the help messages about passing the target executable.
    (e249470)
  • Don't show two messages on a run configuration syntax error.
    (d3c1389)
  • Show a more helpful error if a game ID wasn't found in games.js.
    (5f58856)
scripts
  • repo_update.py: Don't count deleted files towards the file count of
    a patch. (b80b135)
win32_utf8

2015-10-27

15 Jun 08:08

Choose a tag to compare

2015-10-27 Pre-release
Pre-release

Old release for a clean upgrade path. Re-hosted on GitHub.

2014-05-28

28 May 22:43

Choose a tag to compare

When ZUN releases a game outside your vacations for a change, RL swamps you with work and your hardware starts failing, it's just going to take a while for 14.3 support to get done. Therefore, this is merely an intermediate release, focusing on fixes for bugs pointed out by our new members in the patch network, but also adding a bit of the functionality required for th143.

thcrap
  • Fix random crashes in the hot-repatching module on Wine. (cca89be)
  • Always skip the UTF-8 byte order mark on JSON loading. (bfcd6a4)
  • Revise file size handling in file breakpoints. (f6fa4cb, 68f18ef)
  • Allow to overwrite JSON objects with other types. (5f31a8f, cfca3a6)
thcrap_configure
  • Fix patch removal to work with absolute dependencies. (51915f5, 1139a1c)
scripts
  • Filter out Thumbs.db when enumerating the files of a patch. (7969b5d)
win32_utf8
  • Add EnumFontFamiliesEx(). (4fcda3a)

2014-05-12

12 May 04:53

Choose a tag to compare

Just a one-line change to register the th143 dialog file name pattern in order to make translations show up.

thcrap_tsa
  • Register the th143 dialog file name pattern. (934e554)

2014-05-08

08 May 03:33

Choose a tag to compare

... and just when you thought you had a rock-solid build, you notice a bug in the one main thing you wanted to focus on. Oh well, at least we do have the option to ship updates on a daily basis now.

thcrap_configure
  • Fix a logic error with read-only repository files. (989c14b)
  • Use SHBrowseForFolder() to select the root game path. (93434c9, 07ff6da)
  • Ask to search in another directory if no games were found at all. (5e22082, cef7bc6)
scripts
  • repo_update.py: Catch the error thrown if files.js doesn't exist. (8281756)

2014-05-06

06 May 12:56

Choose a tag to compare

Over three months of development, resulting in digitally signed automatic updates of thcrap itself... as well as lots of features nobody has asked for, and which will only matter a few years from now.

thcrap
  • Use a custom resolving chain for global.js and the game's main JSON files.
  • Move thcrap updating information from patch.js to the run configuration.
  • Check for a valid file name pointer when dumping a data file.
  • Optionally check a binary hack against an expected sequence of bytes.
  • Detour ExitProcess() to properly shut down any thcrap worker threads.
  • textdisp_CreateFontA(): Only override iCharSet if a face name is given.
  • Implement detour chaining.
  • Add a module to watch for and apply changes to the patch files.
  • json_object_get_create(): Fail if the containing object is NULL.
  • Zip file reading support.
thcrap_configure
  • Use the flexible array loop for dependencies.
  • Default to the Nmlgc repository.
  • Mention the artwork offer.
thcrap_update
  • Link to the default zlib1.dll instead of zlibwapi.dll.
  • Allow deletion of unmodified patch files by using JSON nulls in files.js.
  • Move update notifications for thcrap and the game itself to thcrap_update.
  • Add digitally signed automatic updates of thcrap itself.
thcrap_tsa
  • MSG patching: Increment the line counter correctly to repair hard line patching.
  • Remove the <f$> ruby layout parser introduced in 2013-08-20.
  • BP_ruby_offset(): Fix a crash if "font_dialog" or "font_ruby" are not given.
  • Layout: Don't overwrite the current width when defining a tabstop.
  • Layout: Parse font-related commands before anything else.
  • sprite_patch_set(): Verify the destination sprite coordinates.
  • Layout: Only use the rightmost tab cell for the last token on a line.
scripts
  • repo_update.py: Dump JSON with Git-compatible whitespace.
  • repo_update.py: Explicitly set UTF-8 encoding for text I/O.
  • Add a script to digitally sign a release archive.
  • Don't try to create directories with empty names when writing JSON files.
  • Enforce Unix line endings for JSON files.
win32_utf8
  • Add MoveFile(), MoveFileEx() and MoveFileWithProgress().
  • Add GetTempPath().
  • Add GetFileAttributes() and GetFileAttributesEx().
  • Add LoadString().
  • Add WideCharToMultiByte() and MultiByteToWideChar().
  • Add InsertMenuItem().
  • Add fopen().
  • Add RemoveDirectory().
  • Add DeleteFile().

2014-01-27

26 Jan 04:27

Choose a tag to compare

Hotfix to repair update notifications, which have been broken since 2014-01-03.

thcrap
  • Fix a reference counting issue that broke update notifications in 2014-01-03. (6c02237)

2014-01-26

26 Jan 02:13

Choose a tag to compare

8 bugfixes of varying intensity, multi-address breakpoints, the most proper Ruby annotation patching we will ever have, and finally, a script to create your own custom patch server! Global Touhou Patch Network, here we come!

scripts
  • Add a script to build and update a patch repository.
thcrap
  • Support breakpoints with multiple addresses.
  • Eliminate crashes when an "archive" object is no string.
  • Tell the user to download KB2533623 if DLL injection failed.
  • Only use the LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR flag if KB2533623 is installed.
  • Fall back to IAT detouring by pointer if OriginalFirstThunk is not available.
  • Introduce a global run configuration file at the bottom of the hierarchy.
  • binhacks_apply(): Fix a logic flaw in the log counting.
  • thcrap_detour(): Show the name of the module the detours are applied to.
thcrap_configure
  • Display a repository's contact e-mail address.
thcrap_tsa
  • Fix a potential buffer overflow when determining the .msg.jdiff slot key.
  • MSG patching: Don't patch in invalid TSA ruby syntax due to utter plebbery.
  • Music Room patching: Don't print "@" for untranslated music titles.
  • Add a breakpoint to calculate the X offset for variable-width Ruby annotations.
thcrap_update
  • ServerDownloadFile(): Fix potential memory leaks.
  • Ensure graceful termination while an update is in progress.
win32_utf8
  • Add IsDBCSLeadByteFB().

2014-01-03

03 Jan 13:57

Choose a tag to compare

Finally, advanced image patching, patch dependencies, another bunch of small things... and a New Year's Resolution of never taking as long with releasing a new build ever again during active development.

thcrap
  • Do string table lookups for string parameters in variable argument lists.
  • Persistent string concatenation
  • Support relative paths in the run configuration by turning them into absolute ones internally.
  • Fix some memory leaks.
  • inject_CreateRemoteThread(): Catch and detour LoadLibraryW().
  • thcrap_init(): Don't log exported functions.
  • Use LoadLibraryEx() in the injection payload to guarantee the correct DLL path.
thcrap_configure
  • Write relative paths.
  • Hardcode srv.thpatch.net as the default patch server.
  • Mention that the shortcuts work from anywhere.
  • Rename the patch list "server" concept to "repository".
  • Add recursive patch repository discovery.
  • Display all locally available repositories in the patch selection.
  • Move the list of selected patches to the bottom.
  • Truncate long patch IDs.
  • Patch dependency resolution
  • Use a new method for naming run configurations.
  • Ask for a custom run configuration file name.
  • Ask if existing run configuration files should be overwritten.
  • Require the selection of at least one patch.
  • Print errors if writing failed, and ask the user to continue.
  • Reword the patch selection.
  • Set a sufficiently large console screen buffer to hold the patch list on Wine.
thcrap_tsa
  • Correctly parse nested layout markup.
  • Set window title to translated game title and identified build.
  • Advanced image patching:
    • Alpha-based patching on sprite level.
    • Perform alpha blending for opaque originals.
    • Walk the patch stack.
  • Fix a logic flaw in ANM sprite boundary resizing.
thcrap_update
  • Use the new files.js file instead of patch.js for updating.
win32_utf8
  • Add SetDlgItemText().

2013-10-25

25 Oct 21:19

Choose a tag to compare

The result of two months worth of painstaking detail work. DLL injection chaining (read: vpatch) support, a number of smaller bug fixes, and quite a lot of general quality improvements throughout the code base.

thcrap
  • Actually call strings_patch(). -.-
  • Eliminate directory creation confusion and patch CreateDirectoryA().
  • Patch Win32 dialog font sizes.
  • Correctly determine the size of patched Win32 dialog items, once and for all.
  • strings_vsprintf(): Rewrite to work independently of string encoding.
  • Introduce a "Rx" syntax for hexadecimal addresses relative to the game's base address.
  • Use three methods to determine the entry point of the game process.
  • Detour CreateProcess() and LoadLibrary() for DLL injection chaining.
  • Detour CreateRemoteThread() to apply the thcrap detours to newly injected DLLs.
  • Add inject_CreateProcessW().
  • Add a basic custom exception handler.
  • log_nprint(): Check if the console was opened.
thcrap_tsa
  • tsa_CreateWindowExA(): Observe CW_USEDEFAULT.
win32_utf8
  • Add GetModuleFileNameEx().
  • Redirect GetWindowLong and SetWindowLong to their W equivalents.
  • Add GetPrivateProfileInt().