Skip to content

Commit f32a086

Browse files
committed
update for 2.3, fix float slider handle
1 parent f532d77 commit f32a086

File tree

11 files changed

+182
-179
lines changed

11 files changed

+182
-179
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,3 +378,4 @@ red4ext/deps/*
378378
*.zip
379379
build/mods/ModSettings/archives/ModSettings.archive
380380
build/mods/ModSettings/info.json
381+
call_stack.txt

compile_commands.json

Lines changed: 79 additions & 79 deletions
Large diffs are not rendered by default.

mod_settings.code-workspace

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/red4ext/Hooks/ApplyOverrides.hpp

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,47 @@ struct Overridable {
1919
uint32_t m_hash;
2020
};
2121

22+
struct ContextManager;
23+
24+
struct UserMappingAxis {
25+
struct RealAxisInput {
26+
uint16_t key;
27+
uint16_t unk02;
28+
uint32_t unk04;
29+
};
30+
31+
struct Unknown {
32+
uint32_t unk00;
33+
uint32_t unk04;
34+
uint32_t unk08;
35+
};
36+
RED4EXT_ASSERT_SIZE(Unknown, 0xC);
37+
38+
struct Axis {
39+
DynArray<RealAxisInput> realAxisInput;
40+
DynArray<Unknown> unk10;
41+
uint8_t invert;
42+
uint8_t unk21;
43+
uint64_t unk28;
44+
};
45+
RED4EXT_ASSERT_SIZE(Axis, 0x30);
46+
47+
struct Pair {
48+
CName name1;
49+
CName name2;
50+
CName name3;
51+
void * axis;
52+
uint64_t unk20;
53+
CName name4;
54+
float unk30;
55+
uint32_t unk34;
56+
};
57+
58+
HashMap<CName, Axis> axes;
59+
HashMap<CName, float> floats;
60+
DynArray<Pair *> pairs;
61+
};
62+
2263
struct UserMapping {
2364
struct Mapping {
2465
uint8_t type;
@@ -45,8 +86,36 @@ struct UserMapping {
4586
uint8_t needs_update;
4687
};
4788

89+
struct MappingPreset {
90+
CName name;
91+
uint8_t axis;
92+
uint8_t fakeAxis;
93+
uint8_t relativeAxis;
94+
};
95+
4896
RawMappingCollection * GetMappingCollection(CName);
4997
void ClearRuntimeDataOnRawMappings();
98+
99+
DynArray<void*> unk00; // 00
100+
uint8_t sorted; // 10
101+
DynArray<void*> unk18; // 18
102+
CString invalid_str; // 28
103+
ContextManager * contextManager; // 48
104+
void * buttons; // 50
105+
void * buttonGroups; // 58
106+
UserMappingAxis * axes; // 60
107+
void * relativeAxes; // 68
108+
Map<uint16_t, MappingCollection> keyMap; // 70
109+
Map<CName, RawMappingCollection> rawMappings; // 98
110+
HashMap<CString, EInputKey> stringToKey; // C0
111+
HashMap<CString, EInputKey> inputKeyMap_F0; // F0
112+
HashMap<EInputKey, CString> unk120; // 120
113+
uint64_t unk150[4];
114+
DynArray<MappingPreset*> mappingPresets;
115+
uint8_t unk180;
116+
uint8_t unk181;
117+
uint64_t unk188;
118+
uint64_t listener_id;
50119

51120
};
52121

@@ -84,12 +153,30 @@ struct ContextManager {
84153

85154
void *__vftable;
86155
UserMapping * userMapping;
87-
uint64_t unk10[3];
156+
DynArray<void*> deferredListenerActions;
157+
uint64_t deferredListenerActionsMutex;
88158
Map<CName, Action*> actions;
89-
uint64_t un50[22];
159+
uint32_t unk4C;
160+
Map<CName, void*> mappingGroups;
161+
uint32_t unk74;
162+
Map<CName, void*> actionGroups;
163+
uint32_t unk9C;
164+
Map<CName, void*> unkA0;
165+
uint64_t mappingGroup;
166+
uint64_t unkD0[6];
90167
DynArray<CName> contexts;
91168
DynArray<void*> unk110;
92169
DynArray<void*> unk120;
170+
DynArray<void*> unk130;
171+
uint8_t unk140[8];
172+
void *contextTransition;
173+
uint8_t unk148[152];
174+
CString unk14;
175+
CName LeftStick;
176+
CName RightStick;
177+
uint64_t unk218;
178+
uint64_t unk220;
179+
uint8_t inputDeviceRelatedNot12;
93180
};
94181

95182
struct OverridableMapping {

src/redscript/mod_settings/ModSettingsMainGameController.reds

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ public class ModStngsMainGameController extends gameuiSettingsMenuGameController
545545
let currentSettingsItemType: ConfigVarType;
546546
let size: Int32 = ArraySize(options);
547547
let i: Int32 = 0;
548+
//LogChannel(n"DEBUG", "Populating Options");
548549
while i < size {
549550
currentSettingsItem = options[i];
550551
if IsDefined(currentSettingsItem) {
@@ -576,15 +577,17 @@ public class ModStngsMainGameController extends gameuiSettingsMenuGameController
576577
currentItem = this.SpawnFromLocal(inkWidgetRef.Get(this.m_settingsOptionsList), n"settingsSelectorNameList").GetController() as SettingsSelectorController;
577578
break;
578579
default:
579-
// LogUIWarning("Cannot create UI settings drawer for " + NameToString(currentSettingsItem.GetDisplayName()));
580+
// LogChannel(n"DEBUG", "Cannot create UI settings drawer for " + ToString(currentSettingsItemType));
580581
};
581582
if IsDefined(currentItem) {
582583
currentItem.Setup(currentSettingsItem, this.m_isPreGame);
583584
currentItem.RegisterToCallback(n"OnHoverOver", this, n"OnSettingHoverOver");
584585
currentItem.RegisterToCallback(n"OnHoverOut", this, n"OnSettingHoverOut");
585586
// currentItem.Refresh();
586587
ArrayPush(this.m_settingsElements, currentItem);
587-
};
588+
} else {
589+
// LogChannel(n"DEBUG", "currentItem undefined: " + NameToString(currentSettingsItem.GetDisplayName()));
590+
}
588591
};
589592
};
590593
i += 1;

src/wolvenkit/ModSettings.cpmodproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,10 @@
55
<Author />
66
<Email />
77
<Version />
8+
<OpenProjectFiles>base\gameplay\gui\fullscreen\settings\mod_settings_main.inkwidget</OpenProjectFiles>
9+
<OpenProjectFiles>base\gameplay\gui\fullscreen\settings\settings_main.inkwidget</OpenProjectFiles>
10+
<OpenProjectFiles>base\gameplay\gui\fullscreen\menu.inkmenu</OpenProjectFiles>
11+
<OpenProjectFiles>base\gameplay\gui\fullscreen\main_menu\pregame_menu.inkmenu</OpenProjectFiles>
12+
<OpenProjectFiles>base\gameplay\gui\fullscreen\menu.inkmenu</OpenProjectFiles>
13+
<OpenProjectFiles>base\gameplay\gui\fullscreen\main_menu\pregame_menu.inkmenu</OpenProjectFiles>
814
</CP77Mod>

src/wolvenkit/layout.xml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-8 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)