From 5f82d500da015fda00284516385f3b840ce92705 Mon Sep 17 00:00:00 2001 From: "C.S. Melis" Date: Thu, 14 Dec 2023 23:31:44 +0100 Subject: [PATCH] v0.2 --- README.md | 4 ++-- rc/main.rc | 8 ++++---- src/main.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8df703e..34cc93c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Config-based patching plugin for Freelancer. ## Installation instructions Download the latest `FLPatch.dll` from [Releases](https://github.com/BC46/FLPatch/releases). Extract the `dll` to the `EXE` folder of your Freelancer installation. -Next, open the `dacom.ini` file and append `FLPatch.dll` to the `[Libraries]` section. +Next, open the `dacom.ini` and `dacomsrv.ini` files and append `FLPatch.dll` to both `[Libraries]` sections. ## Usage instructions In the `EXE` folder of your Freelancer installation, create a new file called `patches.ini`. FLPatch will apply all patches specified in this file. Example patch: @@ -21,7 +21,7 @@ This will patch file offset `1234AB` in `common.dll` and set the float value `42 ### Patch parameters documentation | Name | Required / optional | Data type | Description | | -------- | --------- | --------- | --------- | -| module | Required | String | Name of the binary file in which the patch should be applied. E.g. `common.dll`, `freelancer.exe`. The file name extension may be omitted, so e.g. `freelancer` is also fine. | +| module | Required | String | Name of the binary file in which the patch should be applied. E.g. `common.dll`, `freelancer.exe`. For `.dll` files, the extension may be omitted, so e.g. `common` is also fine. | | offset | Required | String in hex-format | The file offset in hex-format; the patch location within the given `module`. Example: `1234AB`. | | type | Optional | String | FLPatch supports the following value types: Hexadecimal, 32-bit signed integer, signed byte, float, double. It suffices to specify these value types using `h`, `i`, `b`, `f`, `d`, respectively. Though it is also fine to e.g. specify signed byte by entering `byte`, or `BytE` (with upper case letters) as long as the string starts with one of the previously mentioned characters. The default value for type is Hexadecimal. | | value | Required | Depends on `type` | Depending on the chosen `type`, a value of the corresponding type will be expected here.

For Hexadecimal, a string should be given in hexadecimal format, e.g. `EB 07 12`, `c9aee0`. Spaces between the bytes are optional and both upper case and lower case-letters are recognized.

For a 32-bit signed integer, an integer should be given which fits in the supported range.

For signed bytes, values should be given between -128 and 127 (inclusive).

For floats, a float value is expected (4 bytes).

**NOTE:** Double values are retrieved as floats (4 bytes) and later converted to doubles (8 bytes). Hence more elaborate double values may lose their precision. | diff --git a/rc/main.rc b/rc/main.rc index 467f45c..4f146d2 100644 --- a/rc/main.rc +++ b/rc/main.rc @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 0,1,0,0 -PRODUCTVERSION 0,1,0,0 +FILEVERSION 0,2,0,0 +PRODUCTVERSION 0,2,0,0 FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL { @@ -12,12 +12,12 @@ FILETYPE VFT_DLL { VALUE "CompanyName", "BC46" VALUE "FileDescription", "FLPatch" - VALUE "FileVersion", "0.1" + VALUE "FileVersion", "0.2" VALUE "InternalName", "FLPatch" VALUE "LegalCopyright", "Copyright 2023 BC46" VALUE "OriginalFilename", "FLPatch.dll" VALUE "ProductName", "Freelancer" - VALUE "ProductVersion", "1, 0, 0, 0" + VALUE "ProductVersion", "0, 2, 0, 0" } } diff --git a/src/main.cpp b/src/main.cpp index 636a2e3..360035c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -172,7 +172,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) UNREFERENCED_PARAMETER(hinstDLL); UNREFERENCED_PARAMETER(lpReserved); - // TODO: Support FLServer + // TODO: // Call set value functions common.dll // Split up into multiple files // Define hard coded addresses