Skip to content

Commit 5c38c34

Browse files
committed
Version 0.7.3.776 support
1 parent 5ad005e commit 5c38c34

File tree

4 files changed

+68
-25
lines changed

4 files changed

+68
-25
lines changed

Code/Hooks/offsets.hpp

+21-17
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
#pragma once
22

3-
#define GAME_VERSION 072775
3+
#define GAME_VERSION 073776
44

55
#if !defined(GAME_VERSION)
66
#error GAME_VERSION must be defined!
77
#endif
88

9-
#if GAME_VERSION == 072775
10-
#define OFF_LOAD_SHAPESETS_FUNCTION 0x5991A0
11-
#define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x34DA90
12-
#define OFF_INIT_LUA_MANAGER_FUNCTION 0x54A870
9+
#if GAME_VERSION == 073776
10+
# define OFF_LOAD_SHAPESETS_FUNCTION 0x599120
11+
# define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x34DA10
12+
# define OFF_INIT_LUA_MANAGER_FUNCTION 0x54A7F0
13+
#elif GAME_VERSION == 072775
14+
# define OFF_LOAD_SHAPESETS_FUNCTION 0x5991A0
15+
# define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x34DA90
16+
# define OFF_INIT_LUA_MANAGER_FUNCTION 0x54A870
1317
#elif GAME_VERSION == 071772
14-
#define OFF_LOAD_SHAPESETS_FUNCTION 0x599180
15-
#define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x34DA90
16-
#define OFF_INIT_LUA_MANAGER_FUNCTION 0x54A850
18+
# define OFF_LOAD_SHAPESETS_FUNCTION 0x599180
19+
# define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x34DA90
20+
# define OFF_INIT_LUA_MANAGER_FUNCTION 0x54A850
1721
#elif GAME_VERSION == 070771
18-
#define OFF_LOAD_SHAPESETS_FUNCTION 0x599180
19-
#define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x34DA90
20-
#define OFF_INIT_LUA_MANAGER_FUNCTION 0x54A850
22+
# define OFF_LOAD_SHAPESETS_FUNCTION 0x599180
23+
# define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x34DA90
24+
# define OFF_INIT_LUA_MANAGER_FUNCTION 0x54A850
2125
#elif GAME_VERSION == 066
22-
#define OFF_LOAD_SHAPESETS_FUNCTION 0x5A6A60
23-
#define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x359490
24-
#define OFF_INIT_LUA_MANAGER_FUNCTION 0x55A640
26+
# define OFF_LOAD_SHAPESETS_FUNCTION 0x5A6A60
27+
# define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x359490
28+
# define OFF_INIT_LUA_MANAGER_FUNCTION 0x55A640
2529
#elif GAME_VERSION == 065
26-
#define OFF_LOAD_SHAPESETS_FUNCTION 0x5C4250
27-
#define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x378170
28-
#define OFF_INIT_LUA_MANAGER_FUNCTION 0x5784D0
30+
# define OFF_LOAD_SHAPESETS_FUNCTION 0x5C4250
31+
# define OFF_INIT_SHAPESET_MANAGER_FUNCTION 0x378170
32+
# define OFF_INIT_LUA_MANAGER_FUNCTION 0x5784D0
2933
#endif

Code/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ static bool g_mhAttached = false;
3939

4040
void dll_attach()
4141
{
42-
if (!SmSdk::CheckTimestamp(_SM_TIMESTAMP_072_775))
42+
if (!SmSdk::CheckTimestamp(_SM_TIMESTAMP_073_776))
4343
{
4444
MessageBoxA(
4545
NULL,
46-
"Your game version is not supported by Custom Audio Extension. The current version of the mod has been built for Scrap Mechanic 0.7.2.775\n\nPress OK to continue loading without the mod.",
46+
"Your game version is not supported by Custom Audio Extension. The current version of the mod has been built for Scrap Mechanic 0.7.3.776\n\nPress OK to continue loading without the mod.",
4747
"Unsupported Version",
4848
MB_ICONWARNING);
4949
return;

Dependencies/SmSdk/include/SmSdk/TimestampCheck.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define _SM_TIMESTAMP_070_771 1733399248
66
#define _SM_TIMESTAMP_071_772 1733491522
77
#define _SM_TIMESTAMP_072_775 1733754961
8+
#define _SM_TIMESTAMP_073_776 1733837301
89

910
namespace SmSdk
1011
{

Dependencies/SmSdk/include/SmSdk/offsets.hpp

+44-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
#pragma once
22

3-
#define _SM_VERSION_NUM 072775
3+
#define _SM_VERSION_NUM 073776
44

55
///////STATIC VALUE OFFSETS
66

7-
#if _SM_VERSION_NUM == 071772 || _SM_VERSION_NUM == 072775
7+
#if _SM_VERSION_NUM == 073776
8+
# define SM_CURRENT_GAME_STATE_OFFSET 1267598
9+
# define SM_IN_GAME_GUI_MANAGER_OFFSET 0x1267570
10+
# define SM_GUI_SYSTEM_MANAGER_OFFSET 0x12676E8
11+
# define SM_CHARACTER_MANAGER_OFFSET 0x1267738
12+
# define SM_PLAYER_MANAGER_OFFSET 0x12677D8
13+
# define SM_AUDIO_MANAGER_OFFSET 0x1267648
14+
# define SM_INPUT_MANAGER_OFFSET 0x1267800
15+
# define SM_MY_PLAYER_OFFSET 0x12675A8
16+
# define SM_GAME_SETTINGS_OFFSET 0x1267760
17+
# define SM_CONTAINER_MANAGER_OFFSET 0x1267798
18+
# define SM_PORTAL_MANAGER_OFFSET 0x1267690
19+
# define SM_PATHFINDER_MANAGER_OFFSET 0x12676B0
20+
# define SM_AREA_TRIGGER_MANAGER_OFFSET 0x1267668
21+
# define SM_HARVESTABLE_MANAGER_OFFSET 0x1267718
22+
# define SM_DIRECTORY_MANAGER_OFFSET 0x1267810
23+
# define SM_CREATION_MANAGER_OFFSET 0x1267740
24+
# define SM_NET_OBJ_MANAGER_OFFSET 0x12677D0
25+
# define SM_PHYSICS_OFFSET 0x1267590
26+
#elif _SM_VERSION_NUM == 071772 || _SM_VERSION_NUM == 072775
827
# define SM_CURRENT_GAME_STATE_OFFSET 0x1267518
928
# define SM_IN_GAME_GUI_MANAGER_OFFSET 0x12674F0
1029
# define SM_GUI_SYSTEM_MANAGER_OFFSET 0x1267668
@@ -65,7 +84,13 @@
6584

6685
//////VFTABLE OFFSETS
6786

68-
#if _SM_VERSION_NUM == 071772 || _SM_VERSION_NUM == 072775
87+
#if _SM_VERSION_NUM == 073776
88+
# define SM_VTBL_GAME_STATE_OFFSET 0xF88A70
89+
# define SM_VTBL_OPTIONS_MENU_OFFSET 0xF82558
90+
# define SM_VTBL_GAMEPLAY_OPTIONS_MENU_OFFSET 0xF824F8
91+
# define SM_VTBL_AUDIO_OPTIONS_MENU_OFFSET 0xF31370
92+
# define SM_VTBL_OPTIONS_SUB_MENU_BASE_OFFSET 0xF6A698
93+
#elif _SM_VERSION_NUM == 071772 || _SM_VERSION_NUM == 072775
6994
# define SM_VTBL_GAME_STATE_OFFSET 0xF889B0
7095
# define SM_VTBL_OPTIONS_MENU_OFFSET 0xF82498
7196
# define SM_VTBL_GAMEPLAY_OPTIONS_MENU_OFFSET 0xF82438
@@ -87,7 +112,15 @@
87112

88113
//////CONSTRUCTOR OFFSETS
89114

90-
#if _SM_VERSION_NUM == 072775
115+
#if _SM_VERSION_NUM == 073776
116+
# define SM_CONSTRUCTOR_OPTIONS_SUB_MENU_BASE_OFFSET 0x3BF890
117+
# define SM_CONSTRUCTOR_CONTROL_OPTIONS_MENU_OFFSET 0x328620
118+
# define SM_CONSTRUCTOR_DISPLAY_OPTIONS_MENU_OFFSET 0x337FC0
119+
# define SM_CONSTRUCTOR_GRAPHICS_OPTIONS_MENU_OFFSET 0x351D20
120+
# define SM_CONSTRUCTOR_COMPOUND_BUTTON_OFFSET 0x644A70
121+
# define SM_CONSTRUCTOR_RADIO_BUTTON_SET_OFFSET 0x28C6B0
122+
# define SM_CONSTRUCTOR_OPTIONS_ITEM_SLIDER_OFFSET 0x3BBE20
123+
#elif _SM_VERSION_NUM == 072775
91124
# define SM_CONSTRUCTOR_OPTIONS_SUB_MENU_BASE_OFFSET 0x3BF910
92125
# define SM_CONSTRUCTOR_CONTROL_OPTIONS_MENU_OFFSET 0x3286A0
93126
# define SM_CONSTRUCTOR_DISPLAY_OPTIONS_MENU_OFFSET 0x338040
@@ -123,7 +156,9 @@
123156

124157
/////FUNCTIONS
125158

126-
#if _SM_VERSION_NUM == 072775
159+
#if _SM_VERSION_NUM == 073776
160+
# define SM_FUNC_VERTICAL_STACK_BOX_ADD_NEW_ITEM_OFFSET 0x5270E0
161+
#elif _SM_VERSION_NUM == 072775
127162
# define SM_FUNC_VERTICAL_STACK_BOX_ADD_NEW_ITEM_OFFSET 0x527160
128163
#elif _SM_VERSION_NUM == 071772
129164
# define SM_FUNC_VERTICAL_STACK_BOX_ADD_NEW_ITEM_OFFSET 0x527140
@@ -135,7 +170,10 @@
135170

136171
/////VARIABLES
137172

138-
#if _SM_VERSION_NUM == 072775
173+
#if _SM_VERSION_NUM == 073776
174+
# define SM_VAR_PAINT_DRAG_LIMITER 0x3E0DBB
175+
# define SM_VAR_PAINT_ERASE_LIMITER 0x2AD4BD
176+
#elif _SM_VERSION_NUM == 072775
139177
# define SM_VAR_PAINT_DRAG_LIMITER 0x3E0E3B
140178
# define SM_VAR_PAINT_ERASE_LIMITER 0x2AD53D
141179
#elif _SM_VERSION_NUM == 071772

0 commit comments

Comments
 (0)