Skip to content

Commit 6702696

Browse files
committed
0.7.2.775 support
1 parent a7e5bb2 commit 6702696

File tree

4 files changed

+33
-13
lines changed

4 files changed

+33
-13
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_071_772))
19+
if (!SmSdk::CheckTimestamp(_SM_TIMESTAMP_072_775))
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.1.772\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.2.775\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 == 071772
5+
#if _SM_VERSION_NUM == 072775
6+
# define DYNAMIC_SUN_UPDATE_FUNC_ADDR 0x915440
7+
# define DYNAMIC_SUN_CREATE_WIDGETS_ADDR 0x3C03B0
8+
# define DYNAMIC_SUN_GRAPHICS_OPTIONS_MENU_VFTABLE 0xF7AD78
9+
# define DYNAMIC_SUN_DIRECTION_OFFSET 0x11D5CB0
10+
# define DYNAMIC_SUN_GAME_INSTANCE_PTR 0x1267738
11+
#elif _SM_VERSION_NUM == 071772
612
# define DYNAMIC_SUN_UPDATE_FUNC_ADDR 0x915420
713
# define DYNAMIC_SUN_CREATE_WIDGETS_ADDR 0x3C0390
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
@@ -4,6 +4,7 @@
44

55
#define _SM_TIMESTAMP_070_771 1733399248
66
#define _SM_TIMESTAMP_071_772 1733491522
7+
#define _SM_TIMESTAMP_072_775 1733754961
78

89
namespace SmSdk
910
{

Dependencies/SmSdk/include/SmSdk/offsets.hpp

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#pragma once
22

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

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

7-
#if _SM_VERSION_NUM == 071772
7+
#if _SM_VERSION_NUM == 071772 || _SM_VERSION_NUM == 072775
88
# define SM_CURRENT_GAME_STATE_OFFSET 0x1267518
99
# define SM_IN_GAME_GUI_MANAGER_OFFSET 0x12674F0
1010
# define SM_GUI_SYSTEM_MANAGER_OFFSET 0x1267668
@@ -65,7 +65,7 @@
6565

6666
//////VFTABLE OFFSETS
6767

68-
#if _SM_VERSION_NUM == 071772
68+
#if _SM_VERSION_NUM == 071772 || _SM_VERSION_NUM == 072775
6969
# define SM_VTBL_GAME_STATE_OFFSET 0xF889B0
7070
# define SM_VTBL_OPTIONS_MENU_OFFSET 0xF82498
7171
# define SM_VTBL_GAMEPLAY_OPTIONS_MENU_OFFSET 0xF82438
@@ -87,7 +87,15 @@
8787

8888
//////CONSTRUCTOR OFFSETS
8989

90-
#if _SM_VERSION_NUM == 071772
90+
#if _SM_VERSION_NUM == 072775
91+
# define SM_CONSTRUCTOR_OPTIONS_SUB_MENU_BASE_OFFSET 0x3BF910
92+
# define SM_CONSTRUCTOR_CONTROL_OPTIONS_MENU_OFFSET 0x3286A0
93+
# define SM_CONSTRUCTOR_DISPLAY_OPTIONS_MENU_OFFSET 0x338040
94+
# define SM_CONSTRUCTOR_GRAPHICS_OPTIONS_MENU_OFFSET 0x351DA0
95+
# define SM_CONSTRUCTOR_COMPOUND_BUTTON_OFFSET 0x644AF0
96+
# define SM_CONSTRUCTOR_RADIO_BUTTON_SET_OFFSET 0x28C730
97+
# define SM_CONSTRUCTOR_OPTIONS_ITEM_SLIDER_OFFSET 0x3BBEA0
98+
#elif _SM_VERSION_NUM == 071772
9199
# define SM_CONSTRUCTOR_OPTIONS_SUB_MENU_BASE_OFFSET 0x3BF8F0
92100
# define SM_CONSTRUCTOR_CONTROL_OPTIONS_MENU_OFFSET 0x3286A0
93101
# define SM_CONSTRUCTOR_DISPLAY_OPTIONS_MENU_OFFSET 0x338040
@@ -115,7 +123,9 @@
115123

116124
/////FUNCTIONS
117125

118-
#if _SM_VERSION_NUM == 071772
126+
#if _SM_VERSION_NUM == 072775
127+
# define SM_FUNC_VERTICAL_STACK_BOX_ADD_NEW_ITEM_OFFSET 0x527160
128+
#elif _SM_VERSION_NUM == 071772
119129
# define SM_FUNC_VERTICAL_STACK_BOX_ADD_NEW_ITEM_OFFSET 0x527140
120130
#elif _SM_VERSION_NUM == 070771
121131
# define SM_FUNC_VERTICAL_STACK_BOX_ADD_NEW_ITEM_OFFSET 0x527140
@@ -125,10 +135,13 @@
125135

126136
/////VARIABLES
127137

128-
#if _SM_VERSION_NUM == 071772
129-
#define SM_VAR_PAINT_DRAG_LIMITER 0x3E0E1B
130-
#define SM_VAR_PAINT_ERASE_LIMITER 0x2AD53D
138+
#if _SM_VERSION_NUM == 072775
139+
# define SM_VAR_PAINT_DRAG_LIMITER 0x3E0E3B
140+
# define SM_VAR_PAINT_ERASE_LIMITER 0x2AD53D
141+
#elif _SM_VERSION_NUM == 071772
142+
# define SM_VAR_PAINT_DRAG_LIMITER 0x3E0E1B
143+
# define SM_VAR_PAINT_ERASE_LIMITER 0x2AD53D
131144
#else
132-
#define SM_VAR_PAINT_DRAG_LIMITER 0x3F060D
133-
#define SM_VAR_PAINT_ERASE_LIMITER 0x3F0D9B
145+
# define SM_VAR_PAINT_DRAG_LIMITER 0x3F060D
146+
# define SM_VAR_PAINT_ERASE_LIMITER 0x3F0D9B
134147
#endif

0 commit comments

Comments
 (0)