Releases: thpatch/thcrap
2014-01-26
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
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 detourLoadLibraryW()
.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 ofpatch.js
for updating.
win32_utf8
- Add
SetDlgItemText()
.
2013-10-25
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()
andLoadLibrary()
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
Win32 dialog patching, and a couple of smaller fixes for bigger problems.
thcrap
- Win32 dialog patching (f3ebea3, eff1907, 1fc959f, 89ccf7f)
strings_lookup()
forMessageBox
andCreateWindowEx
. (07e0df4)
thcrap_tsa
- Fix window placement bugs in the original games. (71c1dca)
- Do string lookup in
GetTextExtent()
, not inGetTextExtentBase()
. (cc018b3) - Add the
custom.exe
bug fix for Western systems. (b1f8031)
thcrap_configure
- Maximize the height of the console window. (af3f982)
win32_utf8
2013-08-20
Music Room and proper ruby. 'nuff said.
thcrap
- stack_game_file_resolve(): Fix build-specific files to actually work as expected. (75889b5)
thcrap_tsa
2013-08-15
2013-08-12
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
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
2013-07-29
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)