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:
NovaRain
2016-10-07 10:31:46 +08:00
parent 295a5d1437
commit c880ae93a9
3 changed files with 10 additions and 23 deletions
+3 -3
View File
@@ -940,10 +940,10 @@ void BugsInit()
//if (GetPrivateProfileInt("Misc", "ImportedProcedureFix", 0, ini)) {
dlog("Applying imported procedure patch.", DL_INIT);
// 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);
SafeWrite8(0x46DBF1, 0xeb); // Disable warnings
SafeWrite8(0x46DDC4, 0xeb); // Disable warnings
SafeWrite8(0x46DBF1, 0xEB); // Disable warnings
SafeWrite8(0x46DDC4, 0xEB); // Disable warnings
SafeWrite8(0x4415CC, 0x00); // Prevent crashes when re-exporting
dlogr(" Done", DL_INIT);
//}
+5 -18
View File
@@ -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 {
pushad
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 {
pushad
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() {
__asm {
call obj_remove_outline_
@@ -911,7 +898,7 @@ static void __declspec(naked) obj_remove_outline_hook() {
cmp highlightingToggled, 1
jne end
mov ds:[_outlined_object], eax
call obj_outline_all_items_on_
call obj_outline_all_items_on
end:
retn
}
@@ -1476,11 +1463,11 @@ static void RunGlobalScripts1() {
DisplayConsoleMessage(HighlightFail1);
}
} else highlightingToggled = 1;
if (highlightingToggled) obj_outline_all_items_on_();
if (highlightingToggled) obj_outline_all_items_on();
else highlightingToggled = 2;
}
} else if(highlightingToggled) {
if (highlightingToggled == 1) obj_outline_all_items_off_();
if (highlightingToggled == 1) obj_outline_all_items_off();
highlightingToggled=0;
}
}
+2 -2
View File
@@ -1208,7 +1208,7 @@ static void DllMain2() {
CritInit();
if (GetPrivateProfileInt("Misc", "MultiPatches", 0, ini)) {
if (GetPrivateProfileIntA("Misc", "MultiPatches", 0, ini)) {
dlog("Applying load multiple patches patch.", DL_INIT);
SafeWrite8(0x444338, 0x90); // Change step from 2 to 1
SafeWrite32(0x444363, 0xEB909090); // Disable check
@@ -1505,7 +1505,7 @@ static void DllMain2() {
if (GetPrivateProfileIntA("Misc", "EnableMusicInDialogue", 0, ini)) {
dlog("Applying music in dialogue patch.", DL_INIT);
SafeWrite8(0x44525B, 0x00);
SafeWrite8(0x44525B, 0x0);
//BlockCall(0x450627);
dlogr(" Done", DL_INIT);
}