Skip to content

Releases: thpatch/thcrap

2014-01-26

26 Jan 02:13
Compare
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
Compare
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
Compare
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().

2013-08-25

25 Aug 21:19
Compare
Choose a tag to compare

Win32 dialog patching, and a couple of smaller fixes for bigger problems.

thcrap
thcrap_tsa
  • Fix window placement bugs in the original games. (71c1dca)
  • Do string lookup in GetTextExtent(), not in GetTextExtentBase(). (cc018b3)
  • Add the custom.exe bug fix for Western systems. (b1f8031)
thcrap_configure
  • Maximize the height of the console window. (af3f982)
win32_utf8
  • Add CreateDialogParam and DialogBoxParam. (609e844)
  • Add DrawText. (78d562c)

2013-08-20

20 Aug 08:21
Compare
Choose a tag to compare

Music Room and proper ruby. 'nuff said.

thcrap
  • stack_game_file_resolve(): Fix build-specific files to actually work as expected. (75889b5)
thcrap_tsa
  • Add ruby layout. (ac3e47b)
  • GetTextExtent: Take layout markup into account. (089896a)
  • Add Music Room comment patching. (324159a, d73613d)
  • Add Music Room title patching. (cc50311)

2013-08-15

15 Aug 14:30
Compare
Choose a tag to compare

Another three small things: two in the updater, and one in the build configuration.

thcrap_update
  • Don't download 0-byte files. (cbaa123)
  • Ignore Internet Explorer's "work offline" setting. (84aeb66)
Build configuration
  • Include zlib in the libpng DLL... apparently, this is necessary on some systems.

2013-08-12

12 Aug 04:44
Compare
Choose a tag to compare

Three small things - one of that actually being a rather important improvement - before th14 comes out. Nothing relevant.

thcrap_configure
  • Well, it's the th14 full version release and still no GUI... (cb49224)
  • Disable console by default in new run configurations. (9b27784)
thcrap_update
  • Actually verify the CRC32 of downloaded files. (25759eb)

2013-08-08

08 Aug 14:19
Compare
Choose a tag to compare

Hardcoded string translation... and comparatively many bug fixes.

thcrap
  • Use thread-local storage for the global file_rep_t object. (File patching is thread-safe now.) (35e8c1d)
  • IsLatestBuild: Fix a crash if latest is neither array nor string.(8facb6a)
  • Include build-specific files in the patch stack resolving functions. (1e07240)
  • Add basic translation of hardcoded strings via dictionary lookup. (e51a8e1)
  • Add a safe and persistent vsprintf handler. (06089df)
  • CreateFontA: Check hardcoded strings for a replacement font. (9de60fc)
thcrap_tsa
  • Layout command 't': Choose the longest string out of all given parameters. (Fixes a logic flaw in ending text alignment.) (e874005)
win32_utf8
  • Add GetEnvironmentVariable. (Necessary to run th125 and later with user names that contain non-ASCII characters.) (afa4a21)

2013-08-05

05 Aug 03:36
Compare
Choose a tag to compare

A text layout parser, and bug fixes in the UTF-8 wrappers.

Changelog:

win32_utf8
  • StringToUTF16: Actually observe input and output widths correctly. (c230ad4)
  • TextOutU/GetTextExtentPoint32U: Clear out the wchar_t buffer before writing. (dd0712e)
thcrap_tsa

2013-07-29

29 Jul 20:23
Compare
Choose a tag to compare

Images! (and probably Endings!, too)

thcrap
  • Remove the th11 English patch assist font width kludge. (f869d73)
  • Fix the infinite loop on failed plug-in loading. (64915c6)
  • Move logging for file breakpoint down to the resolving functions. (09db994)
thcrap_update
  • Fix the server number comparison. (3db5748)
thcrap_tsa
  • Add basic ANM patching for all formats. (4257d53, 7cce33e, fd056c7, cd4905b)
  • Add patching support for multiple textures in one image, starting at custom positions (d231f3a)
  • Add ANM sprite boundary dumping, invoked by dat_dump. (276c8f4b0b1c1cba94be909ce31b4d668fc51495)