mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added MainMenuBigFontColour option to change button text color
Changed the fix for player's direction after climbing ladder (61aa11)
This commit is contained in:
+4
-2
@@ -478,8 +478,10 @@ RemoveCriticalTimelimits=0
|
|||||||
NPCStage6Fix=0
|
NPCStage6Fix=0
|
||||||
|
|
||||||
;Change the colour of the font used on the main menu for the Fallout/sfall version number and copyright text
|
;Change the colour of the font used on the main menu for the Fallout/sfall version number and copyright text
|
||||||
;It's the last byte ('3c' by default) that picks the colour used. The first byte supplies additional flags
|
;It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option
|
||||||
;MainMenuFontColour=0x0600003c
|
;MainMenuFontColour=0x00003C
|
||||||
|
;Change the colour of the font used on the main menu for the button text
|
||||||
|
;MainMenuBigFontColour=0x3C
|
||||||
|
|
||||||
;Two alternate fixes to the interaction between HtH attacks and the fast shot trait
|
;Two alternate fixes to the interaction between HtH attacks and the fast shot trait
|
||||||
;0 - Fallout 2 original behaviour
|
;0 - Fallout 2 original behaviour
|
||||||
|
|||||||
@@ -149,10 +149,6 @@ static const DWORD sad_28[] = {
|
|||||||
0x4173CE, 0x4174C1, 0x4175F1, 0x417730,
|
0x4173CE, 0x4174C1, 0x4175F1, 0x417730,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const DWORD use_ladder_stairs[] = {
|
|
||||||
0x49C972, 0x49CA16, 0x49CABA,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void __declspec(naked) anim_set_end_hack() {
|
static void __declspec(naked) anim_set_end_hack() {
|
||||||
__asm {
|
__asm {
|
||||||
mov edi, _anim_set;
|
mov edi, _anim_set;
|
||||||
@@ -365,10 +361,8 @@ void AnimationsAtOnceInit() {
|
|||||||
// Fix crash when the critter goes through a door with animation trigger
|
// Fix crash when the critter goes through a door with animation trigger
|
||||||
MakeJump(0x41755E, object_move_hack);
|
MakeJump(0x41755E, object_move_hack);
|
||||||
|
|
||||||
// Fix player's direction after leaving a map via ladder/stairs
|
// Fix player's direction after ladder climbing animation
|
||||||
for (int i = 0; i < sizeof(use_ladder_stairs) / 4; i++) {
|
SafeWrite16(0x49CA14, 0xB190); // mov cl, 26 (skip setting the direction)
|
||||||
SafeWrite8(use_ladder_stairs[i], 25);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationsAtOnceExit() {
|
void AnimationsAtOnceExit() {
|
||||||
|
|||||||
@@ -1102,7 +1102,7 @@ void __stdcall MapDirErase(const char* folder, const char* ext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long __fastcall ObjBlockingAt(TGameObj* object, long tile, long elevation) {
|
TGameObj* __fastcall ObjBlockingAt(TGameObj* object, long tile, long elevation) {
|
||||||
__asm {
|
__asm {
|
||||||
mov ebx, elevation;
|
mov ebx, elevation;
|
||||||
mov eax, ecx;
|
mov eax, ecx;
|
||||||
|
|||||||
@@ -1069,7 +1069,7 @@ FrmFrameData* __fastcall FramePtr(FrmHeaderData* frm, long frame, long direction
|
|||||||
|
|
||||||
void __stdcall MapDirErase(const char* folder, const char* ext);
|
void __stdcall MapDirErase(const char* folder, const char* ext);
|
||||||
|
|
||||||
long __fastcall ObjBlockingAt(TGameObj* object, long tile, long elevation);
|
TGameObj* __fastcall ObjBlockingAt(TGameObj* object, long tile, long elevation);
|
||||||
|
|
||||||
long __fastcall TileNumInDirection(long tile, long rotation, long distance);
|
long __fastcall TileNumInDirection(long tile, long rotation, long distance);
|
||||||
|
|
||||||
|
|||||||
+11
-7
@@ -30,7 +30,7 @@ static const char* VerString1 = "SFALL " VERSION_STRING " Debug Build";
|
|||||||
static DWORD MainMenuYOffset;
|
static DWORD MainMenuYOffset;
|
||||||
static DWORD MainMenuTextOffset;
|
static DWORD MainMenuTextOffset;
|
||||||
|
|
||||||
static long OverrideColour;
|
static long OverrideColour, OverrideColour2;
|
||||||
|
|
||||||
static const DWORD MainMenuButtonYHookRet = 0x48184A;
|
static const DWORD MainMenuButtonYHookRet = 0x48184A;
|
||||||
static void __declspec(naked) MainMenuButtonYHook() {
|
static void __declspec(naked) MainMenuButtonYHook() {
|
||||||
@@ -51,13 +51,13 @@ static void __declspec(naked) MainMenuTextYHook() {
|
|||||||
|
|
||||||
static void __declspec(naked) FontColour() {
|
static void __declspec(naked) FontColour() {
|
||||||
__asm {
|
__asm {
|
||||||
cmp OverrideColour, 0;
|
test OverrideColour, 0xFF;
|
||||||
jg override;
|
jnz override;
|
||||||
movzx eax, byte ptr ds:[0x6A8B33];
|
movzx eax, byte ptr ds:[0x6A8B33];
|
||||||
or eax, 0x6000000;
|
or eax, 0x6000000;
|
||||||
retn;
|
retn;
|
||||||
override:
|
override:
|
||||||
mov eax, OverrideColour;
|
mov eax, OverrideColour;
|
||||||
retn;
|
retn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -117,9 +117,13 @@ void MainMenuInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MakeJump(0x4817AB, MainMenuTextHook);
|
MakeJump(0x4817AB, MainMenuTextHook);
|
||||||
|
|
||||||
OverrideColour = GetPrivateProfileInt("Misc", "MainMenuFontColour", 0, ini);
|
OverrideColour = GetPrivateProfileInt("Misc", "MainMenuFontColour", 0, ini);
|
||||||
if (OverrideColour > 0) {
|
if (OverrideColour & 0xFF) {
|
||||||
OverrideColour |= 0x6000000;
|
OverrideColour &= 0x00FF00FF;
|
||||||
|
OverrideColour |= 0x06000000;
|
||||||
SafeWrite32(0x481748, (DWORD)&OverrideColour);
|
SafeWrite32(0x481748, (DWORD)&OverrideColour);
|
||||||
}
|
}
|
||||||
|
OverrideColour2 = GetPrivateProfileInt("Misc", "MainMenuBigFontColour", 0, ini) & 0xFF;
|
||||||
|
if (OverrideColour2) SafeWrite32(0x481906, (DWORD)&OverrideColour2);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user