77
88; sizeof(DifficultyClass) == 80
99section .bss
10+ UltimatelyEasyDifficultyData RESB 80
1011 ExtremelyEasyDifficultyData RESB 80
1112 VeryEasyDifficultyData RESB 80
1213 AINormalDifficultyData RESB 80
1314
15+ sstring str_UltimatelyEasy , "UltimatelyEasy"
1416sstring str_ExtremelyEasy , "ExtremelyEasy"
1517sstring str_VeryEasy , "VeryEasy"
1618sstring str_AINormal , "AINormal"
1719sstring str_Easy , "Easy"
1820
1921
20- ; Hack RulesClass::Difficulty to read in the new difficulty setting
22+ ; Hack RulesClass::Difficulty to read in the new difficulty settings
2123hack 0x005CE198
24+ push str_UltimatelyEasy
25+ mov ecx , edi ; CCINIClass pointer
26+ mov edx , UltimatelyEasyDifficultyData
27+ call 0x005CE1E0 ; Difficulty_Get(CCINIClass & ini, DifficultyClass & diff, char const * section)
28+
2229 push str_ExtremelyEasy
2330 mov ecx , edi ; CCINIClass pointer
2431 mov edx , ExtremelyEasyDifficultyData
@@ -186,7 +193,9 @@ hack 0x004BB479
186193
187194 ; Check if the requested difficulty type matches any the difficulty
188195 ; values that we should process
189- ; (4 = Extremely Easy, 3 = Very Easy, 1 = AINormal only if the house is an AI house)
196+ ; (5 = Ultimately Easy, 4 = Extremely Easy, 3 = Very Easy, 1 = AINormal only if the house is an AI house)
197+ cmp edi , 5
198+ je .Ultimately_Easy_Diff
190199 cmp edi , 4
191200 je .Extremely_Easy_Diff
192201 cmp edi , 3
@@ -195,6 +204,17 @@ hack 0x004BB479
195204 je .AINormal_Diff
196205 jmp .Normal_Code ; if not, jump to original code
197206
207+ .Ultimately_Easy_Diff:
208+ ; Set the 'difficulty index' of the house to 0 (Hard AI)
209+ mov dword [ ecx + 58h ], 0
210+
211+ ; This difficulty level can only show up in MP
212+ Set_Difficulty_Modifiers_Multiplayer UltimatelyEasyDifficultyData
213+
214+ mov eax , [ 0x0074C488 ] ; RulesClass pointer
215+ mov edi , 0 ; Hard difficulty
216+ jmp 0x004BB654 ; let the original game code handle the rest
217+
198218.Extremely_Easy_Diff:
199219 ; Set the 'difficulty index' of the house to 0 (Hard AI)
200220 mov dword [ ecx + 58h ], 0
0 commit comments