mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Merged two Glovz's fix functions and reorganized Glovz's/YAAM code layout a bit.
Fixed a bug in Stats.cpp that caused critical hits to ignore critical table roll value and only have the lowest level effect. Minor edits to MainMenu.cpp.
This commit is contained in:
+80
-261
File diff suppressed because it is too large
Load Diff
+15
-12
@@ -56,6 +56,7 @@ skip:
|
|||||||
retn;
|
retn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __declspec(naked) MainMenuTextHook() {
|
static void __declspec(naked) MainMenuTextHook() {
|
||||||
__asm {
|
__asm {
|
||||||
mov edi, [esp];
|
mov edi, [esp];
|
||||||
@@ -82,21 +83,21 @@ static void __declspec(naked) MainMenuTextHook() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainMenuInit() {
|
void MainMenuInit() {
|
||||||
int tmp;
|
int offset;
|
||||||
|
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuCreditsOffsetX", 0, ini)) {
|
if (offset = GetPrivateProfileIntA("Misc", "MainMenuCreditsOffsetX", 0, ini)) {
|
||||||
SafeWrite32(0x481753, 0xf+tmp);
|
SafeWrite32(0x481753, 15 + offset);
|
||||||
}
|
}
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuCreditsOffsetY", 0, ini)) {
|
if (offset = GetPrivateProfileIntA("Misc", "MainMenuCreditsOffsetY", 0, ini)) {
|
||||||
SafeWrite32(0x48175C, 0x1cc+tmp);
|
SafeWrite32(0x48175C, 460 + offset);
|
||||||
}
|
}
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuOffsetX", 0, ini)) {
|
if (offset = GetPrivateProfileIntA("Misc", "MainMenuOffsetX", 0, ini)) {
|
||||||
SafeWrite32(0x48187C, 0x1e+tmp);
|
SafeWrite32(0x48187C, 30 + offset);
|
||||||
MainMenuTextOffset=tmp;
|
MainMenuTextOffset = offset;
|
||||||
}
|
}
|
||||||
if(tmp=GetPrivateProfileIntA("Misc", "MainMenuOffsetY", 0, ini)) {
|
if (offset = GetPrivateProfileIntA("Misc", "MainMenuOffsetY", 0, ini)) {
|
||||||
MainMenuYOffset=tmp;
|
MainMenuYOffset = offset;
|
||||||
MainMenuTextOffset+=tmp*640;
|
MainMenuTextOffset += offset * 640;
|
||||||
MakeJump(0x481844, MainMenuButtonYHook);
|
MakeJump(0x481844, MainMenuButtonYHook);
|
||||||
}
|
}
|
||||||
if (MainMenuTextOffset) {
|
if (MainMenuTextOffset) {
|
||||||
@@ -106,5 +107,7 @@ void MainMenuInit() {
|
|||||||
|
|
||||||
MakeJump(0x4817AB, MainMenuTextHook);
|
MakeJump(0x4817AB, MainMenuTextHook);
|
||||||
OverrideColour = GetPrivateProfileInt("Misc", "MainMenuFontColour", 0, ini);
|
OverrideColour = GetPrivateProfileInt("Misc", "MainMenuFontColour", 0, ini);
|
||||||
if(OverrideColour) MakeCall(0x48174C, FontColour);
|
if (OverrideColour) {
|
||||||
|
MakeCall(0x48174C, FontColour);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -49,8 +49,8 @@ static void __declspec(naked) stat_level_hack() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD __fastcall check_stat_level(register DWORD value, DWORD stat) {
|
static int __fastcall check_stat_level(register int value, int stat) {
|
||||||
DWORD valLimit;
|
int valLimit;
|
||||||
if (cCritter == *ptr_obj_dude) {
|
if (cCritter == *ptr_obj_dude) {
|
||||||
valLimit = StatMinimumsPC[stat];
|
valLimit = StatMinimumsPC[stat];
|
||||||
if (value < valLimit) return valLimit;
|
if (value < valLimit) return valLimit;
|
||||||
|
|||||||
Reference in New Issue
Block a user