mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added an additional mode to SpeedInterfaceCounterAnims (from Mr.Stalin)
This commit is contained in:
@@ -424,6 +424,7 @@ AutoQuickSavePage=0
|
|||||||
|
|
||||||
;Set to 1 to speed up the HP/AC counter animations
|
;Set to 1 to speed up the HP/AC counter animations
|
||||||
;Set to 2 to update the HP/AC counters instantly
|
;Set to 2 to update the HP/AC counters instantly
|
||||||
|
;Set to 3 to update the AC counter instantly when switching to other controlled critters in combat
|
||||||
SpeedInterfaceCounterAnims=0
|
SpeedInterfaceCounterAnims=0
|
||||||
|
|
||||||
;These lines allow you to control the karma FRMs displayed on the character screen
|
;These lines allow you to control the karma FRMs displayed on the character screen
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ c15:
|
|||||||
jmp fo::funcoffs::art_get_code_;
|
jmp fo::funcoffs::art_get_code_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __declspec(naked) intface_rotate_numbers_hack() {
|
static void __declspec(naked) intface_rotate_numbers_hack() {
|
||||||
__asm {
|
__asm {
|
||||||
push edi
|
push edi
|
||||||
@@ -580,7 +581,7 @@ void SpeedInterfaceCounterAnimsPatch() {
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
dlog("Applying SpeedInterfaceCounterAnims patch. (Instant)", DL_INIT);
|
dlog("Applying SpeedInterfaceCounterAnims patch. (Instant)", DL_INIT);
|
||||||
SafeWrite32(0x460BB6, 0x90DB3190);
|
SafeWrite32(0x460BB6, 0x90DB3190); // xor ebx, ebx
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace sfall
|
|||||||
{
|
{
|
||||||
|
|
||||||
bool isControllingNPC = false;
|
bool isControllingNPC = false;
|
||||||
|
bool skipCounterAnim = false;
|
||||||
|
|
||||||
static DWORD controlMode;
|
static DWORD controlMode;
|
||||||
static std::vector<WORD> allowedCritterPids;
|
static std::vector<WORD> allowedCritterPids;
|
||||||
@@ -76,6 +77,8 @@ static void SaveRealDudeState() {
|
|||||||
//real_map_elevation = fo::var::map_elevation;
|
//real_map_elevation = fo::var::map_elevation;
|
||||||
realDude.sneak_working = fo::var::sneak_working;
|
realDude.sneak_working = fo::var::sneak_working;
|
||||||
fo::SkillGetTags(realDude.tag_skill, 4);
|
fo::SkillGetTags(realDude.tag_skill, 4);
|
||||||
|
|
||||||
|
if (skipCounterAnim) SafeWriteBatch<BYTE>(0, {0x422BDE, 0x4229EC}); // no animate
|
||||||
}
|
}
|
||||||
|
|
||||||
// take control of the NPC
|
// take control of the NPC
|
||||||
@@ -157,6 +160,7 @@ static void RestoreRealDudeState() {
|
|||||||
fo::func::stat_pc_add_experience(delayedExperience);
|
fo::func::stat_pc_add_experience(delayedExperience);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (skipCounterAnim) SafeWriteBatch<BYTE>(1, {0x422BDE, 0x4229EC}); // restore
|
||||||
fo::func::intface_redraw();
|
fo::func::intface_redraw();
|
||||||
|
|
||||||
isControllingNPC = false;
|
isControllingNPC = false;
|
||||||
@@ -281,6 +285,8 @@ void PartyControl::init() {
|
|||||||
HookCall(0x454218, stat_pc_add_experience_hook); // call inside op_give_exp_points_hook
|
HookCall(0x454218, stat_pc_add_experience_hook); // call inside op_give_exp_points_hook
|
||||||
HookCalls(pc_flag_toggle_hook, { 0x4124F1, 0x41279A });
|
HookCalls(pc_flag_toggle_hook, { 0x4124F1, 0x41279A });
|
||||||
|
|
||||||
|
skipCounterAnim = (GetConfigInt("Misc", "SpeedInterfaceCounterAnims", 0) == 3);
|
||||||
|
|
||||||
// display party member's current level & AC & addict flag
|
// display party member's current level & AC & addict flag
|
||||||
if (GetConfigInt("Misc", "PartyMemberExtraInfo", 0)) {
|
if (GetConfigInt("Misc", "PartyMemberExtraInfo", 0)) {
|
||||||
dlog("Applying display NPC extra info patch.", DL_INIT);
|
dlog("Applying display NPC extra info patch.", DL_INIT);
|
||||||
|
|||||||
Reference in New Issue
Block a user