Skip to content

Commit 1a8800c

Browse files
committed
Support for 1.45
1 parent 03096ca commit 1a8800c

File tree

6 files changed

+75
-63
lines changed

6 files changed

+75
-63
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.45
2+
- Updated to support 1.45
3+
14
## 1.44
25
- Updated to support 1.44
36

dist/ts-fmod-plugin.dll

280 KB
Binary file not shown.

ts-fmod-plugin/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ SCSAPI_RESULT scs_telemetry_init(const scs_u32_t version, const scs_telemetry_in
232232

233233
scs_log = version_params->common.log;
234234

235-
scs_log(0, "[ts-fmod-plugin V1.44] Searching for economy offset... If this is one of the last messages in the log after a crash, try disabling this plugin.");
235+
scs_log(0, "[ts-fmod-plugin V1.45] Searching for economy offset... If this is one of the last messages in the log after a crash, try disabling this plugin.");
236236

237237
auto addr = pattern::scan("48 8B 05 ? ? ? ? 48 8B D9 8B 90 ? ? ? ? 48 8B 80 ? ? ? ? 48 8B 88 ? ? ? ? E8", game_base, image_size);
238238
economy_base_offset = addr + *reinterpret_cast<uint32_t*>(addr + 3) + 7 - 0x48;

ts-fmod-plugin/memory_structure.h

Lines changed: 66 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -18,71 +18,74 @@ struct vec3s_t
1818
class some_truck_telem_data_t
1919
{
2020
char pad_0000[240]; //0x0000
21-
int32_t current_camera; //0x00F0 ?? 2 = int, 1 = chase, 7 = top, 5 = roof, 4 = side_back, 3 = hood, 6 = side_front, 9 = cinematic, 0 = dev
21+
//0x00F0 2 = int, 1 = chase, 7 = top, 5 = roof, 4 = side_back, 3 = hood, 6 = side_front, 9 = cinematic, 0 = dev
22+
int32_t current_camera;
2223
char pad_00F4[8]; //0x00F4
2324
uint32_t engine_state; //0x00FC 0 = engine off, 1 = starting, 2 = running, 3 = shutting down
24-
char pad_0100[128]; //0x0100
25-
uint16_t light_state; //0x0180 6 = parking, 8 = low, 7 = high, 5 = beacons
26-
char pad_0182[2]; //0x0182
27-
uint16_t additional_illumination; //0x0184 3 = front, 4 = roof
28-
char pad_0186[6]; //0x0186
29-
float N000009E5; //0x018C
30-
char pad_0190[4]; //0x0190
31-
float wipers_intermittent_time; //0x0194 Countdown before wipers move again when in intermittent setting
32-
float wipers_position; //0x0198 ?? 0 = down start, 1 = down end ???
33-
float rpm; //0x019C
34-
float air_pressure; //0x01A0
35-
float brake_pressure; //0x01A4
36-
float max_air_pressure; //0x01A8
37-
char pad_01AC[8]; //0x01AC
38-
float oil_temp; //0x01B4
39-
char pad_01B8[4]; //0x01B8
40-
float water_temp; //0x01BC
41-
char pad_01C0[4]; //0x01C0
42-
float battery_voltage; //0x01C4
43-
char pad_01C8[8]; //0x01C8
44-
float turbo_pressure; //0x01D0
45-
char pad_01D4[12]; //0x01D4
46-
float light_switch; //0x01E0 0 = off, 0.5 = parking, 1 = low beam
47-
float light_switch_state; //0x01E4 0 = off, 0.5 = parking, 1 = low beam (instant)
48-
float high_beam_stick; //0x01E8 1 = on, 0 = off
49-
float high_beam; //0x01EC 1 = on, 0 = off (instant)
50-
float light_horn_stick; //0x01F0 0 = off, 1 = on
51-
float light_horn_state; //0x01F4 0 = off, 1 = on (instant)
52-
float indicator_stick; //0x01F8 0 = left indicator, 0.5 = none, 1 = right
53-
float indicator; //0x01FC 0 = left indicator, 0.5 = none, 1 = right (instant)
54-
float hazard_warning_btn; //0x0200 1 = on, 0 = off
55-
float hazard_warning_state; //0x0204 1 = on, 0 = off (instant)
56-
float beacon_switch; //0x0208 0 = off, 1 = on
57-
float beacon_state; //0x020C 0 = off, 1 = on (instant)
58-
char pad_0210[8]; //0x0210
59-
float handbrake_handle; //0x0218 1 = handbrake on, 0 = off
60-
float handbrake; //0x021C 1 = handbrake on, 0 = off (instant)
61-
char pad_0220[8]; //0x0220
62-
float engine_brake_stick; //0x0228 0 = off, 1 = full; steps dependant on engine data
63-
float engine_brake; //0x022C 0 = off, 1 = full (instant); steps dependant on engine data
64-
char pad_0230[20]; //0x0230
65-
float wipers_stick_state; //0x0244 0 = off, 0.333 = intermittent, 0.666 = slow, 1 = fast
66-
float wipers_state; //0x0248 0 = off, 0.333 = intermittent, 0.666 = slow, 1 = fast (instant)
67-
char pad_024C[1928]; //0x024C
68-
float turbo_pressure2; //0x09D4
69-
char pad_09D8[16]; //0x09D8
70-
float effective_brake; //0x09E8 0 = none, 1 = max
71-
char pad_09EC[8]; //0x09EC
72-
float effective_steering; //0x09F4 1 = left, -1 = right
73-
char pad_09F8[64]; //0x09F8
74-
uint32_t steering_wheel; //0x0A38 0 = steering wheel = left, 512 = center, 1023 = right
25+
char pad_0100[152]; //0x0100
26+
uint16_t light_state; //0x0198 6 = parking, 8 = low, 7 = high, 5 = beacons
27+
char pad_019A[2]; //0x019A
28+
uint16_t additional_illumination; //0x019C 3 = front, 4 = roof
29+
char pad_019E[6]; //0x019E
30+
float N000009E5; //0x01A4
31+
char pad_01A8[4]; //0x01A8
32+
float wipers_intermittent_time; //0x01AC Countdown before wipers move again when in intermittent setting
33+
float wipers_position; //0x01B0 ?? 0 = down start, 1 = down end ???
34+
float rpm; //0x01B4
35+
float air_pressure; //0x01B8
36+
float brake_pressure; //0x01BC
37+
float max_air_pressure; //0x01C0
38+
char pad_01C4[8]; //0x01C4
39+
float oil_temp; //0x01CC
40+
char pad_01D0[4]; //0x01D0
41+
float water_temp; //0x01D4
42+
char pad_01D8[4]; //0x01D8
43+
float battery_voltage; //0x01DC
44+
char pad_01E0[8]; //0x01E0
45+
float turbo_pressure; //0x01E8
46+
char pad_01EC[12]; //0x01EC
47+
float light_switch; //0x01F8 0 = off, 0.5 = parking, 1 = low beam
48+
float light_switch_state; //0x01FC 0 = off, 0.5 = parking, 1 = low beam (instant)
49+
float high_beam_stick; //0x0200 1 = on, 0 = off
50+
float high_beam; //0x0204 1 = on, 0 = off (instant)
51+
float light_horn_stick; //0x0208 0 = off, 1 = on
52+
float light_horn_state; //0x020C 0 = off, 1 = on (instant)
53+
float indicator_stick; //0x0210 0 = left indicator, 0.5 = none, 1 = right
54+
float indicator; //0x0214 0 = left indicator, 0.5 = none, 1 = right (instant)
55+
float hazard_warning_btn; //0x0218 1 = on, 0 = off
56+
float hazard_warning_state; //0x021C 1 = on, 0 = off (instant)
57+
float beacon_switch; //0x0220 0 = off, 1 = on
58+
float beacon_state; //0x0224 0 = off, 1 = on (instant)
59+
char pad_0228[8]; //0x0228
60+
float handbrake_handle; //0x0230 1 = handbrake on, 0 = off
61+
float handbrake; //0x0234 1 = handbrake on, 0 = off (instant)
62+
char pad_0238[8]; //0x0238
63+
float engine_brake_stick; //0x0240 0 = off, 1 = full; steps dependent on engine data
64+
float engine_brake; //0x0244 0 = off, 1 = full (instant); steps dependent on engine data
65+
char pad_0248[20]; //0x0248
66+
float wipers_stick_state; //0x025C 0 = off, 0.333 = intermittent, 0.666 = slow, 1 = fast
67+
float wipers_state; //0x0260 0 = off, 0.333 = intermittent, 0.666 = slow, 1 = fast (instant)
68+
char pad_0264[1940]; //0x0264
69+
float turbo_pressure_old; //0x09F8
70+
char pad_09FC[12]; //0x09FC
71+
float effective_brake; //0x0A08 0 = none, 1 = max
72+
char pad_0A0C[8]; //0x0A0C
73+
float effective_steering; //0x0A14 1 = left, -1 = right
74+
char pad_0A18[64]; //0x0A18
75+
uint32_t steering_wheel; //0x0A58 0 = steering wheel = left, 512 = center, 1023 = right
7576

7677

7778
public:
7879
float get_light_switch_state() const
7980
{
8081
return light_switch_state;
8182
}
83+
8284
float get_light_horn_state() const
8385
{
8486
return light_horn_state;
8587
}
88+
8689
float get_hazard_warning_state() const
8790
{
8891
return hazard_warning_state;
@@ -97,6 +100,7 @@ class some_truck_telem_data_t
97100
{
98101
return turbo_pressure;
99102
}
103+
100104
uint32_t get_engine_state() const
101105
{
102106
return engine_state;
@@ -106,6 +110,7 @@ class some_truck_telem_data_t
106110
{
107111
return wipers_position;
108112
}
113+
109114
float get_engine_brake_state() const
110115
{
111116
return engine_brake;
@@ -147,6 +152,7 @@ class unk_interior // still need to figure out what this actually is
147152
{
148153
return should_have_echo;
149154
}
155+
150156
vec2s_t get_window_state() const
151157
{
152158
return window_state;
@@ -166,6 +172,7 @@ class unk_interior // still need to figure out what this actually is
166172
{
167173
return camera_rotation_in_cabin;
168174
}
175+
169176
unk_cabin_t* get_unk_cabin() const
170177
{
171178
return unk_cabin_ptr;
@@ -175,9 +182,10 @@ class unk_interior // still need to figure out what this actually is
175182
class truck_telem_data_parent_t
176183
{
177184
char pad_0000[176]; //0x0000
178-
char *current_timezone; //0x00B0
179-
char pad_00B8[4112]; //0x00B8
180-
some_truck_telem_data_t *some_truck_telem_data; //0x10C8
185+
char* current_timezone; //0x00B0
186+
char pad_00B8[4120]; //0x00B8
187+
some_truck_telem_data_t* some_truck_telem_data; //0x10D0
188+
181189
public:
182190
some_truck_telem_data_t* get_truck_telem_data() const
183191
{
@@ -188,17 +196,17 @@ class truck_telem_data_parent_t
188196

189197
class economy_base_t
190198
{
191-
unk_interior *unk_interior_parent; //0x0000
192-
truck_telem_data_parent_t *truck_telem_data_parent_ptr; //0x0008
199+
unk_interior* unk_interior_parent; //0x0000
200+
truck_telem_data_parent_t* truck_telem_data_parent_ptr; //0x0008
193201

194202
public:
195203
unk_interior* get_unk_interior_parent() const
196204
{
197205
return unk_interior_parent;
198206
}
207+
199208
truck_telem_data_parent_t* get_truck_telem_parent() const
200209
{
201210
return truck_telem_data_parent_ptr;
202211
}
203212
};
204-

ts-fmod-plugin/ts-fmod-plugin.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ END
5151
//
5252

5353
VS_VERSION_INFO VERSIONINFO
54-
FILEVERSION 1,44,0,0
55-
PRODUCTVERSION 1,44,0,0
54+
FILEVERSION 1,45,0,0
55+
PRODUCTVERSION 1,45,0,0
5656
FILEFLAGSMASK 0x3fL
5757
#ifdef _DEBUG
5858
FILEFLAGS 0x1L
@@ -69,12 +69,12 @@ BEGIN
6969
BEGIN
7070
VALUE "CompanyName", "Dario Wouters"
7171
VALUE "FileDescription", "Sound Plugin for ATS/ETS2"
72-
VALUE "FileVersion", "1.44.0.0"
72+
VALUE "FileVersion", "1.45.0.0"
7373
VALUE "InternalName", "ts-fmod-plugin.dll"
7474
VALUE "LegalCopyright", "Copyright (C) 2022"
7575
VALUE "OriginalFilename", "ts-fmod-plugin.dll"
7676
VALUE "ProductName", "Sound Plugin for ATS/ETS2"
77-
VALUE "ProductVersion", "1.44.0.0"
77+
VALUE "ProductVersion", "1.45.0.0"
7878
END
7979
END
8080
BLOCK "VarFileInfo"

ts-fmod-plugin/ts-fmod-plugin.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
155155
<AdditionalIncludeDirectories>$(solutiondir)inc</AdditionalIncludeDirectories>
156156
<LanguageStandard>stdcpp17</LanguageStandard>
157+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
157158
</ClCompile>
158159
<Link>
159160
<SubSystem>Windows</SubSystem>

0 commit comments

Comments
 (0)