Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BC46 committed Dec 14, 2023
1 parent 4f55067 commit 5f82d50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.<br /><br />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.<br /><br />For a 32-bit signed integer, an integer should be given which fits in the supported range.<br /><br />For signed bytes, values should be given between -128 and 127 (inclusive).<br /><br />For floats, a float value is expected (4 bytes). <br /><br />**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. |
Expand Down
8 changes: 4 additions & 4 deletions rc/main.rc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <winver.h>

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
{
Expand All @@ -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"
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f82d50

Please sign in to comment.