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 (9fea480)
This commit is contained in:
+4
-2
@@ -504,8 +504,10 @@ RemoveCriticalTimelimits=0
|
||||
NPCStage6Fix=0
|
||||
|
||||
;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
|
||||
;MainMenuFontColour=0x0600003c
|
||||
;It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option
|
||||
;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
|
||||
;0 - Fallout 2 original behaviour
|
||||
|
||||
@@ -22,7 +22,7 @@ WRAP_WATCOM_FFUNC3(void, display_inventory, long, inventoryOffset, long, visible
|
||||
WRAP_WATCOM_FFUNC4(void, display_target_inventory, long, inventoryOffset, long, visibleOffset, DWORD*, targetInventory, long, mode)
|
||||
WRAP_WATCOM_FFUNC3(FrmFrameData*, frame_ptr, FrmHeaderData*, frm, long, frame, long, direction)
|
||||
WRAP_WATCOM_FFUNC7(void, make_straight_path_func, GameObject*, objFrom, DWORD, tileFrom, DWORD, tileTo, void*, rotationPtr, DWORD*, result, long, flags, void*, func)
|
||||
WRAP_WATCOM_FFUNC3(long, obj_blocking_at, GameObject*, object, long, tile, long, elevation)
|
||||
WRAP_WATCOM_FFUNC3(GameObject*, obj_blocking_at, GameObject*, object, long, tile, long, elevation)
|
||||
WRAP_WATCOM_FFUNC3(long, object_under_mouse, long, crSwitch, long, inclDude, long, elevation)
|
||||
WRAP_WATCOM_FFUNC3(long, scr_get_local_var, long, sid, long, varId, long*, value)
|
||||
WRAP_WATCOM_FFUNC3(long, scr_set_local_var, long, sid, long, varId, long, value)
|
||||
|
||||
@@ -322,8 +322,8 @@ void AnimationsAtOnce::init() {
|
||||
// Fix crash when the critter goes through a door with animation trigger
|
||||
MakeJump(0x41755E, object_move_hack);
|
||||
|
||||
// Fix player's direction after leaving a map via ladder/stairs
|
||||
SafeWriteBatch<BYTE>(25, {0x49C972, 0x49CA16, 0x49CABA});
|
||||
// Fix player's direction after ladder climbing animation
|
||||
SafeWrite16(0x49CA14, 0xB190); // mov cl, 26 (skip setting the direction)
|
||||
}
|
||||
|
||||
void AnimationsAtOnce::exit() {
|
||||
|
||||
@@ -34,7 +34,7 @@ static const char* VerString1 = "SFALL " VERSION_STRING " Debug Build";
|
||||
static DWORD MainMenuYOffset;
|
||||
static DWORD MainMenuTextOffset;
|
||||
|
||||
static long OverrideColour;
|
||||
static long OverrideColour, OverrideColour2;
|
||||
|
||||
static const DWORD MainMenuButtonYHookRet = 0x48184A;
|
||||
static void __declspec(naked) MainMenuButtonYHook() {
|
||||
@@ -55,8 +55,8 @@ static void __declspec(naked) MainMenuTextYHook() {
|
||||
|
||||
static void __declspec(naked) FontColour() {
|
||||
__asm {
|
||||
cmp OverrideColour, 0;
|
||||
jg override;
|
||||
test OverrideColour, 0xFF;
|
||||
jnz override;
|
||||
movzx eax, byte ptr ds:[0x6A8B33];
|
||||
or eax, 0x6000000;
|
||||
retn;
|
||||
@@ -121,11 +121,15 @@ void MainMenu::init() {
|
||||
}
|
||||
|
||||
MakeJump(0x4817AB, MainMenuTextHook);
|
||||
|
||||
OverrideColour = GetConfigInt("Misc", "MainMenuFontColour", 0);
|
||||
if (OverrideColour > 0) {
|
||||
OverrideColour |= 0x6000000;
|
||||
if (OverrideColour & 0xFF) {
|
||||
OverrideColour &= 0x00FF00FF;
|
||||
OverrideColour |= 0x06000000;
|
||||
SafeWrite32(0x481748, (DWORD)&OverrideColour);
|
||||
}
|
||||
OverrideColour2 = GetConfigInt("Misc", "MainMenuBigFontColour", 0) & 0xFF;
|
||||
if (OverrideColour2) SafeWrite32(0x481906, (DWORD)&OverrideColour2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user