Skip to content

Commit dbd8244

Browse files
committed
0.7.3.776 support
1 parent 6702696 commit dbd8244

File tree

4 files changed

+54
-9
lines changed

4 files changed

+54
-9
lines changed

Code/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ static bool ms_mhHooksAttached = false;
1616

1717
void process_attach()
1818
{
19-
if (!SmSdk::CheckTimestamp(_SM_TIMESTAMP_072_775))
19+
if (!SmSdk::CheckTimestamp(_SM_TIMESTAMP_073_776))
2020
{
2121
MessageBoxA(
2222
NULL,
23-
"Your game version is not supported by Dynamic Sun. 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.",
23+
"Your game version is not supported by Dynamic Sun. 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.",
2424
"Unsupported Version",
2525
MB_ICONWARNING);
2626
return;

Code/offsets.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
#include <SmSdk/offsets.hpp>
44

5-
#if _SM_VERSION_NUM == 072775
5+
#if _SM_VERSION_NUM == 073776
6+
# define DYNAMIC_SUN_UPDATE_FUNC_ADDR 0x915460
7+
# define DYNAMIC_SUN_CREATE_WIDGETS_ADDR 0x3C0330
8+
# define DYNAMIC_SUN_GRAPHICS_OPTIONS_MENU_VFTABLE 0xF7AE38
9+
# define DYNAMIC_SUN_DIRECTION_OFFSET 0x11D5CB0
10+
# define DYNAMIC_SUN_GAME_INSTANCE_PTR 0x12677B8
11+
#elif _SM_VERSION_NUM == 072775
612
# define DYNAMIC_SUN_UPDATE_FUNC_ADDR 0x915440
713
# define DYNAMIC_SUN_CREATE_WIDGETS_ADDR 0x3C03B0
814
# define DYNAMIC_SUN_GRAPHICS_OPTIONS_MENU_VFTABLE 0xF7AD78

Dependencies/SmSdk/include/SmSdk/TimestampCheck.hpp

Lines changed: 1 addition & 0 deletions
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

Lines changed: 44 additions & 6 deletions
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 0x1267598
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)