mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Removed unused code in ScriptExtender.cpp and rename obj_outline_all_items_* functions slightly to prevent using the same names as game engine functions.
Minor edits on main.cpp and Bugs.cpp.
This commit is contained in:
+3
-3
@@ -940,10 +940,10 @@ void BugsInit()
|
|||||||
//if (GetPrivateProfileInt("Misc", "ImportedProcedureFix", 0, ini)) {
|
//if (GetPrivateProfileInt("Misc", "ImportedProcedureFix", 0, ini)) {
|
||||||
dlog("Applying imported procedure patch.", DL_INIT);
|
dlog("Applying imported procedure patch.", DL_INIT);
|
||||||
// http://teamx.ru/site_arc/smf/index.php-topic=398.0.htm
|
// http://teamx.ru/site_arc/smf/index.php-topic=398.0.htm
|
||||||
SafeWrite16(0x46B35B, 0x1c60); // Fix problems with the temporary stack
|
SafeWrite16(0x46B35B, 0x1C60); // Fix problems with the temporary stack
|
||||||
SafeWrite32(0x46B35D, 0x90909090);
|
SafeWrite32(0x46B35D, 0x90909090);
|
||||||
SafeWrite8(0x46DBF1, 0xeb); // Disable warnings
|
SafeWrite8(0x46DBF1, 0xEB); // Disable warnings
|
||||||
SafeWrite8(0x46DDC4, 0xeb); // Disable warnings
|
SafeWrite8(0x46DDC4, 0xEB); // Disable warnings
|
||||||
SafeWrite8(0x4415CC, 0x00); // Prevent crashes when re-exporting
|
SafeWrite8(0x4415CC, 0x00); // Prevent crashes when re-exporting
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
//}
|
//}
|
||||||
|
|||||||
@@ -823,7 +823,7 @@ static void __declspec(naked) FreeProgramHook() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __declspec(naked) obj_outline_all_items_on_() {
|
static void __declspec(naked) obj_outline_all_items_on() {
|
||||||
__asm {
|
__asm {
|
||||||
pushad
|
pushad
|
||||||
mov eax, dword ptr ds:[_map_elevation]
|
mov eax, dword ptr ds:[_map_elevation]
|
||||||
@@ -861,7 +861,7 @@ end:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __declspec(naked) obj_outline_all_items_off_() {
|
static void __declspec(naked) obj_outline_all_items_off() {
|
||||||
__asm {
|
__asm {
|
||||||
pushad
|
pushad
|
||||||
mov eax, dword ptr ds:[_map_elevation]
|
mov eax, dword ptr ds:[_map_elevation]
|
||||||
@@ -890,19 +890,6 @@ end:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static void __declspec(naked) gmouse_bk_process_hook() { // NR: for changing mouseover highlight color. do we really need such fancy stuff?
|
|
||||||
__asm {
|
|
||||||
test eax, eax
|
|
||||||
jz end
|
|
||||||
test byte ptr [eax+0x25], 0x10 // NoHighlight_
|
|
||||||
jnz end
|
|
||||||
mov dword ptr [eax+0x74], 0
|
|
||||||
end:
|
|
||||||
mov edx, 0x40
|
|
||||||
jmp obj_outline_object_
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
static void __declspec(naked) obj_remove_outline_hook() {
|
static void __declspec(naked) obj_remove_outline_hook() {
|
||||||
__asm {
|
__asm {
|
||||||
call obj_remove_outline_
|
call obj_remove_outline_
|
||||||
@@ -911,7 +898,7 @@ static void __declspec(naked) obj_remove_outline_hook() {
|
|||||||
cmp highlightingToggled, 1
|
cmp highlightingToggled, 1
|
||||||
jne end
|
jne end
|
||||||
mov ds:[_outlined_object], eax
|
mov ds:[_outlined_object], eax
|
||||||
call obj_outline_all_items_on_
|
call obj_outline_all_items_on
|
||||||
end:
|
end:
|
||||||
retn
|
retn
|
||||||
}
|
}
|
||||||
@@ -1476,11 +1463,11 @@ static void RunGlobalScripts1() {
|
|||||||
DisplayConsoleMessage(HighlightFail1);
|
DisplayConsoleMessage(HighlightFail1);
|
||||||
}
|
}
|
||||||
} else highlightingToggled = 1;
|
} else highlightingToggled = 1;
|
||||||
if (highlightingToggled) obj_outline_all_items_on_();
|
if (highlightingToggled) obj_outline_all_items_on();
|
||||||
else highlightingToggled = 2;
|
else highlightingToggled = 2;
|
||||||
}
|
}
|
||||||
} else if(highlightingToggled) {
|
} else if(highlightingToggled) {
|
||||||
if (highlightingToggled == 1) obj_outline_all_items_off_();
|
if (highlightingToggled == 1) obj_outline_all_items_off();
|
||||||
highlightingToggled=0;
|
highlightingToggled=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1208,7 +1208,7 @@ static void DllMain2() {
|
|||||||
|
|
||||||
CritInit();
|
CritInit();
|
||||||
|
|
||||||
if (GetPrivateProfileInt("Misc", "MultiPatches", 0, ini)) {
|
if (GetPrivateProfileIntA("Misc", "MultiPatches", 0, ini)) {
|
||||||
dlog("Applying load multiple patches patch.", DL_INIT);
|
dlog("Applying load multiple patches patch.", DL_INIT);
|
||||||
SafeWrite8(0x444338, 0x90); // Change step from 2 to 1
|
SafeWrite8(0x444338, 0x90); // Change step from 2 to 1
|
||||||
SafeWrite32(0x444363, 0xEB909090); // Disable check
|
SafeWrite32(0x444363, 0xEB909090); // Disable check
|
||||||
@@ -1505,7 +1505,7 @@ static void DllMain2() {
|
|||||||
|
|
||||||
if (GetPrivateProfileIntA("Misc", "EnableMusicInDialogue", 0, ini)) {
|
if (GetPrivateProfileIntA("Misc", "EnableMusicInDialogue", 0, ini)) {
|
||||||
dlog("Applying music in dialogue patch.", DL_INIT);
|
dlog("Applying music in dialogue patch.", DL_INIT);
|
||||||
SafeWrite8(0x44525B, 0x00);
|
SafeWrite8(0x44525B, 0x0);
|
||||||
//BlockCall(0x450627);
|
//BlockCall(0x450627);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user