Skip to content

Commit 1e9a1ca

Browse files
committed
1.2.0 release
1 parent 34ccc69 commit 1e9a1ca

File tree

11 files changed

+88
-98
lines changed

11 files changed

+88
-98
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
### 1.2.0 - June 18, 2023
2+
3+
- add support for GTA The Trilogy - The Definitive Edition v1.0.17.39540 (Epic Games Store)
4+
- fix an issue when constructor commands for derived classes returned incorrect values (`Heli.Create`, `Boat.Create`, etc.)
5+
- fix an issue when the library could not read the host version if the path to the executable contained non-ASCII characters
6+
- improve log for objects: now it gets serialized with all properties, not just `[object Object]`
7+
8+
**INSTALLER**
9+
10+
- update references to Ultimate ASI Loader files to match their new names on GitHub
11+
- append `Gameface\Binary\Win64` if a root directory of GTA The Trilogy - The Definitive Edition is selected
12+
13+
**SDK AND PLUGINS**
14+
15+
- Events 1.1: add support for latest version of GTA The Trilogy - The Definitive Edition (v1.0.17.39540), all launchers
16+
17+
**BREAKING CHANGES**
18+
19+
- bumped minimum required versions of [command definitions](https://re.cleo.li/docs/en/definitions.html)
20+
121
### 1.1.3 - February 21, 2023
222

323
- add support for GTA The Trilogy - The Definitive Edition v1.0.17.39540 (Rockstar Games Launcher)

docs/en/definitions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ At start CLEO validates that a definition file is present and correct and if not
66

77
| Game | File | Minimum Required Version |
88
| ----------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------ |
9-
| GTA III, re3 | [gta3.json](https://github.com/sannybuilder/library/blob/master/gta3/gta3.json) | `0.262` |
10-
| GTA VC, reVC | [vc.json](https://github.com/sannybuilder/library/blob/master/vc/vc.json) | `0.268` |
11-
| GTA San Andreas (Classic) 1.0 | [sa.json](https://github.com/sannybuilder/library/blob/master/sa/sa.json) | `0.313` |
9+
| GTA III, re3 | [gta3.json](https://github.com/sannybuilder/library/blob/master/gta3/gta3.json) | `0.265` |
10+
| GTA VC, reVC | [vc.json](https://github.com/sannybuilder/library/blob/master/vc/vc.json) | `0.271` |
11+
| GTA San Andreas (Classic) 1.0 | [sa.json](https://github.com/sannybuilder/library/blob/master/sa/sa.json) | `0.316` |
1212
| GTA III: The Definitive Edition | [gta3_unreal.json](https://github.com/sannybuilder/library/blob/master/gta3_unreal/gta3_unreal.json) | `0.227` |
1313
| Vice City: The Definitive Edition | [vc_unreal.json](https://github.com/sannybuilder/library/blob/master/vc_unreal/vc_unreal.json) | `0.233` |
1414
| San Andreas: The Definitive Edition | [sa_unreal.json](https://github.com/sannybuilder/library/blob/master/sa_unreal/sa_unreal.json) | `0.262` |
1515
| GTA IV | [gta_iv.json](https://github.com/sannybuilder/library/blob/master/gta_iv/gta_iv.json) | `0.78` |
16-
| Unknown (32-bit) | [unknown_x86.json](https://github.com/sannybuilder/library/blob/master/unknown_x86/unknown_x86.json) | `0.223` |
17-
| Unknown (64-bit) | [unknown_x64.json](https://github.com/sannybuilder/library/blob/master/unknown_x64/unknown_x64.json) | `0.226` |
16+
| Unknown (32-bit) | [unknown_x86.json](https://github.com/sannybuilder/library/blob/master/unknown_x86/unknown_x86.json) | `0.225` |
17+
| Unknown (64-bit) | [unknown_x64.json](https://github.com/sannybuilder/library/blob/master/unknown_x64/unknown_x64.json) | `0.228` |
1818
| Bully: Scholarship Edition | [bully.json](https://github.com/sannybuilder/library/blob/master/bully/bully.json) | `0.41` |
1919

2020
CLEO Redux uses compound definitions (a combination of the primary JSON file for the current game and a JSON file for the Unknown host). It lets SDK commands to work in JS scripts regardless of them being defined or not in the primary JSON file. You should notice that during updates CLEO downloads both `<game>.json` and `unknown.json` as well as the accompanying `enums.js` files. It should not affect any existing scripts.

docs/en/events.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ cancel(); // the event callback won't be called anymore
5151

5252
Triggered after the game creates a new vehicle of any type in the world. An event's `data` object contains the address of the vehicle structure.
5353

54-
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.8.11827)`, `GTA VC: DE (1.0.8.11827)`, `GTA SA: DE (1.0.8.11827)`
54+
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.17.39540)`, `GTA VC: DE (1.0.17.39540)`, `GTA SA: DE (1.0.17.39540)`
5555

5656
```ts
5757
interface OnVehicleCreateEvent {
@@ -74,7 +74,7 @@ addEventListener("OnVehicleCreate", (event: OnVehicleCreateEvent) => {
7474

7575
Triggered after the game creates a new ped of any type in the world. An event's `data` object contains the address of the ped structure.
7676

77-
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.8.11827)`, `GTA VC: DE (1.0.8.11827)`, `GTA SA: DE (1.0.8.11827)`
77+
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.17.39540)`, `GTA VC: DE (1.0.17.39540)`, `GTA SA: DE (1.0.17.39540)`
7878

7979
```ts
8080
interface OnPedCreateEvent {
@@ -97,7 +97,7 @@ addEventListener("OnPedCreate", (event: OnPedCreateEvent) => {
9797

9898
Triggered after the game creates a new object of any type in the world. An event's `data` object contains the address of the object structure.
9999

100-
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.8.11827)`, `GTA VC: DE (1.0.8.11827)`, `GTA SA: DE (1.0.8.11827)`
100+
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.17.39540)`, `GTA VC: DE (1.0.17.39540)`, `GTA SA: DE (1.0.17.39540)`
101101

102102
```ts
103103
interface OnObjectCreateEvent {
@@ -120,7 +120,7 @@ addEventListener("OnObjectCreate", (event: OnObjectCreateEvent) => {
120120

121121
Triggered _before_ the game deletes a vehicle from the world. An event's `data` object contains the address of the vehicle structure.
122122

123-
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.8.11827)`, `GTA VC: DE (1.0.8.11827)`, `GTA SA: DE (1.0.8.11827)`
123+
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.17.39540)`, `GTA VC: DE (1.0.17.39540)`, `GTA SA: DE (1.0.17.39540)`
124124

125125
```ts
126126
interface OnVehicleDeleteEvent {
@@ -143,7 +143,7 @@ addEventListener("OnVehicleDelete", (event: OnVehicleDeleteEvent) => {
143143

144144
Triggered _before_ the game deletes a ped from the world. An event's `data` object contains the address of the ped structure.
145145

146-
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.8.11827)`, `GTA VC: DE (1.0.8.11827)`, `GTA SA: DE (1.0.8.11827)`
146+
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.17.39540)`, `GTA VC: DE (1.0.17.39540)`, `GTA SA: DE (1.0.17.39540)`
147147

148148
```ts
149149
interface OnPedDeleteEvent {
@@ -166,7 +166,7 @@ addEventListener("OnPedDelete", (event: OnPedDeleteEvent) => {
166166

167167
Triggered _before_ the game deletes an object from the world. An event's `data` object contains the address of the object structure.
168168

169-
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.8.11827)`, `GTA VC: DE (1.0.8.11827)`, `GTA SA: DE (1.0.8.11827)`
169+
Supported in: `re3`, `reVC`, `GTA III`, `GTA VC`, `GTA SA`, `GTA III: DE (1.0.17.39540)`, `GTA VC: DE (1.0.17.39540)`, `GTA SA: DE (1.0.17.39540)`
170170

171171
```ts
172172
interface OnObjectDeleteEvent {

installer/cleo_redux.iss

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define AppName "CLEO Redux"
2-
#define AppVersion "1.1.3"
2+
#define AppVersion "1.2.0"
33
#define AppPublisher "Seemann"
44
#define AppURL "https://re.cleo.li"
55
#define SourceDir "..\"
@@ -63,7 +63,7 @@ Name: "plugins/imgui/SilentPatch"; Description: "SilentPatch - needed for the mo
6363
Name: "plugins/memops"; Description: "MemoryOperations (by ThirteenAG)"; Types: full
6464
Name: "plugins/input"; Description: "Input 1.3"; Types: full
6565
Name: "plugins/frontend"; Description: "Frontend 1.1"; Types: full
66-
Name: "plugins/events"; Description: "Events 1.0"; Types: full
66+
Name: "plugins/events"; Description: "Events 1.1"; Types: full
6767
Name: "loaders"; Description: "File Loaders"; Types: full
6868
Name: "loaders/text"; Description: "*.txt, *.text (Text files)"; Types: full
6969
Name: "loaders/ide"; Description: "*.ide (Item Definition files)"; Types: full
@@ -531,14 +531,15 @@ begin
531531
WizardForm.ComponentsList.Checked[14] := False;
532532
end;
533533
534-
// ImGuiRedux is bugged on re3
535-
if isRe then
534+
// ImGuiRedux is bugged on re3/DE
535+
if isRe or Is3Master() or IsVCMaster() or IsSAMaster() then
536536
begin
537537
// ImGuiRedux
538538
WizardForm.ComponentsList.Checked[5] := False;
539539
540540
// D3 Wrapper
541541
WizardForm.ComponentsList.Checked[6] := False;
542+
WizardForm.ComponentsList.ItemEnabled[6] := False;
542543
end;
543544
544545
// MSS lib is an ASI loader
@@ -569,6 +570,11 @@ begin
569570
570571
if (CurPageID = wpSelectDir) and (WizardDirValue <> '') then
571572
begin
573+
if ((DirExists(WizardDirValue + '\Gameface\Binaries\Win64')) and (
574+
FileExists(WizardDirValue + '\PlayGTA3.exe') or
575+
FileExists(WizardDirValue + '\PlayGTAViceCity.exe') or
576+
FileExists(WizardDirValue + '\PlayGTASanAndreas.exe'))) then
577+
WizardForm.DirEdit.Text := WizardDirValue + '\Gameface\Binaries\Win64';
572578
FGameId := IdentifyGame(WizardDirValue);
573579
end;
574580
@@ -594,14 +600,14 @@ begin
594600
begin
595601
if IsX64() then
596602
if isRe then
597-
DownloadPage.Add('{#UAL64}/d3d9.zip', 'd3d9.zip', '')
603+
DownloadPage.Add('{#UAL64}/d3d9-x64.zip', 'd3d9.zip', '')
598604
else
599-
DownloadPage.Add('{#UAL64}/version.zip', 'version.zip', '');
605+
DownloadPage.Add('{#UAL64}/version-x64.zip', 'version.zip', '');
600606
if IsX86() then
601607
if IsGta3 or IsVC or IsIV then
602-
DownloadPage.Add('{#UAL32}/dinput8.zip', 'dinput8.zip', '')
608+
DownloadPage.Add('{#UAL32}/dinput8-Win32.zip', 'dinput8.zip', '')
603609
else
604-
DownloadPage.Add('{#UAL32}/vorbisFile.zip', 'vorbisFile.zip', '');
610+
DownloadPage.Add('{#UAL32}/vorbisFile-Win32.zip', 'vorbisFile.zip', '');
605611
end;
606612
607613
if FDlMemOpsPlugin then

plugins/Events/Cargo.lock

Lines changed: 18 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/Events/Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "events"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
edition = "2021"
55
authors = ["Seemann <[email protected]>"]
66

@@ -12,10 +12,7 @@ crate-type = ["cdylib"]
1212
cleo_redux_sdk = "*"
1313
ctor = "0.1.21"
1414
null_fn = "0.1.1"
15-
detour = {git = "https://github.com/x87/detour-rs.git"}
15+
retour = "0.1.0"
1616
serde = {version = "1.0.144", features = ["derive"]}
1717
serde_json = {version = "1.0.85", features = ["preserve_order"]}
18-
lazy_static = "1.4.0"
19-
version_info = "*"
20-
[target.'cfg(windows)'.dependencies]
21-
winapi = { version = "0.3", features = ["libloaderapi"] }
18+
lazy_static = "1.4.0"

plugins/Events/src/gta_classic/cworld_add.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,20 @@ static mut CWORLD_ADD: extern "C" fn(*const u8) = std::ptr::null();
1515

1616
lazy_static! {
1717
static ref CWORLD_ADD_ADDR: Option<usize> = {
18-
use crate::utils::{get_exe_version, IMAGE_BASE};
1918
use cleo_redux_sdk::HostId;
2019

2120
match cleo_redux_sdk::get_host_id() {
22-
HostId::RE3 | HostId::REVC => match cleo_redux_sdk::get_symbol_address("CWorld::Add") {
21+
HostId::RE3
22+
| HostId::REVC
23+
| HostId::GTA3
24+
| HostId::VC
25+
| HostId::SA
26+
| HostId::GTA3_UNREAL
27+
| HostId::VC_UNREAL
28+
| HostId::SA_UNREAL => match cleo_redux_sdk::get_symbol_address("CWorld::Add") {
2329
0 => None,
2430
x => Some(x),
2531
},
26-
HostId::GTA3 => Some(0x004AE930),
27-
HostId::VC => Some(0x004DB3F0),
28-
HostId::SA => Some(0x00563220),
29-
HostId::GTA3_UNREAL if get_exe_version("LibertyCity.exe") == Some((1, 0, 8, 11827)) => {
30-
Some(*IMAGE_BASE + 0xF34DB0)
31-
}
32-
HostId::VC_UNREAL if get_exe_version("ViceCity.exe") == Some((1, 0, 8, 11827)) => {
33-
Some(*IMAGE_BASE + 0xF569F0)
34-
}
35-
HostId::SA_UNREAL if get_exe_version("SanAndreas.exe") == Some((1, 0, 8, 11827)) => {
36-
Some(*IMAGE_BASE + 0x100AF70)
37-
}
3832
_ => None,
3933
}
4034
};

plugins/Events/src/gta_classic/cworld_remove.rs

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,20 @@ static mut CWORLD_REMOVE: extern "C" fn(*const u8) = std::ptr::null();
1616

1717
lazy_static! {
1818
static ref CWORLD_REMOVE_ADDR: Option<usize> = {
19-
use crate::utils::{get_exe_version, IMAGE_BASE};
2019
use cleo_redux_sdk::HostId;
2120

2221
match cleo_redux_sdk::get_host_id() {
23-
HostId::RE3 | HostId::REVC => {
24-
match cleo_redux_sdk::get_symbol_address("CWorld::Remove") {
25-
0 => None,
26-
x => Some(x),
27-
}
28-
}
29-
HostId::GTA3 => Some(0x004AE9D0),
30-
HostId::VC => Some(0x004DB310),
31-
HostId::SA => Some(0x00563280),
32-
HostId::GTA3_UNREAL if get_exe_version("LibertyCity.exe") == Some((1, 0, 8, 11827)) => {
33-
Some(*IMAGE_BASE + 0xF34E90)
34-
}
35-
HostId::VC_UNREAL if get_exe_version("ViceCity.exe") == Some((1, 0, 8, 11827)) => {
36-
Some(*IMAGE_BASE + 0xF56AE0)
37-
}
38-
HostId::SA_UNREAL if get_exe_version("SanAndreas.exe") == Some((1, 0, 8, 11827)) => {
39-
Some(*IMAGE_BASE + 0x100AFB0)
40-
}
22+
HostId::RE3
23+
| HostId::REVC
24+
| HostId::GTA3
25+
| HostId::VC
26+
| HostId::SA
27+
| HostId::GTA3_UNREAL
28+
| HostId::VC_UNREAL
29+
| HostId::SA_UNREAL => match cleo_redux_sdk::get_symbol_address("CWorld::Remove") {
30+
0 => None,
31+
x => Some(x),
32+
},
4133
_ => None,
4234
}
4335
};

plugins/Events/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ extern "C" {}
1111

1212
#[ctor]
1313
fn init() {
14-
cleo_redux_sdk::log("Events plugin 1.0");
14+
cleo_redux_sdk::log("Events plugin 1.1");
1515
gta_classic::register_hooks();
1616
}

plugins/Events/src/utils.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
use version_info;
2-
lazy_static! {
3-
pub static ref IMAGE_BASE: usize =
4-
unsafe { winapi::um::libloaderapi::GetModuleHandleA(std::ptr::null()) as usize };
5-
}
61

72
#[macro_export]
83
macro_rules! detour {
94
( $addr: expr => $cb: expr ) => {{
10-
let hook = detour::RawDetour::new($addr as *const (), $cb as *const ()).unwrap();
5+
let hook = retour::RawDetour::new($addr as *const (), $cb as *const ()).unwrap();
116
hook.enable().unwrap();
127
let result = std::mem::transmute(hook.trampoline());
138
std::mem::forget(hook);
149
result
1510
}};
1611
}
17-
18-
pub fn get_exe_version(exe_name: &str) -> Option<(u32, u32, u32, u32)> {
19-
version_info::get_file_version(exe_name)
20-
}

0 commit comments

Comments
 (0)