Skip to content

Commit

Permalink
Removed SpeedInterfaceCounterAnims=3 (now default behavior)
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaRain committed Apr 1, 2024
1 parent 0044af0 commit 6e8f2c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
1 change: 0 additions & 1 deletion artifacts/ddraw.ini
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ AutoQuickSavePage=1

;Set to 1 to speed up the HP/AC counter animations
;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

;These lines allow you to control the karma FRMs displayed on the character screen
Expand Down
20 changes: 9 additions & 11 deletions sfall/Modules/PartyControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bool npcAutoLevelEnabled;
bool npcEngineLevelUp = true;

static bool isControllingNPC = false;
static char skipCounterAnim;
static bool skipCounterAnim = false;

static int delayedExperience;

Expand Down Expand Up @@ -158,8 +158,8 @@ static void SaveRealDudeState() {

realDude.isSaved = true;

if (skipCounterAnim == 1) {
skipCounterAnim++;
if (!skipCounterAnim) {
skipCounterAnim = true;
SafeWrite8(0x422BDE, 0); // no animate
}
if (isDebug) fo::func::debug_printf("\n[SFALL] Save dude state.");
Expand Down Expand Up @@ -324,8 +324,8 @@ static void RestoreRealDudeState(bool redraw = true) {
if (realDude.extendAddictGvar) RestoreAddictGvarState();

if (redraw) {
if (skipCounterAnim == 2) {
skipCounterAnim--;
if (skipCounterAnim) {
skipCounterAnim = false;
SafeWrite8(0x422BDE, 1); // restore
}
fo::func::intface_redraw();
Expand Down Expand Up @@ -463,8 +463,8 @@ static void __declspec(naked) proto_name_hook() {
static void PartyControlReset() {
if (realDude.obj_dude != nullptr && isControllingNPC) {
RestoreRealDudeState(false);
if (skipCounterAnim == 2) {
skipCounterAnim = 1; // skipCounterAnim--;
if (skipCounterAnim) {
skipCounterAnim = false;
SafeWrite8(0x422BDE, 1); // restore
}
}
Expand Down Expand Up @@ -537,8 +537,8 @@ static void NPCWeaponTweak() {

void PartyControl::SwitchToCritter(fo::GameObject* critter) {
static bool onlyOnce = false;
if (skipCounterAnim == 2 && critter && critter == realDude.obj_dude) {
skipCounterAnim--;
if (skipCounterAnim && critter && critter == realDude.obj_dude) {
skipCounterAnim = false;
SafeWrite8(0x422BDE, 1); // restore
}

Expand Down Expand Up @@ -866,8 +866,6 @@ void PartyControl::init() {

NpcAutoLevelPatch();

skipCounterAnim = (IniReader::GetConfigInt("Misc", "SpeedInterfaceCounterAnims", 0) == 3) ? 1 : 0;

// Display party member's current level & AC & addict flag
if (IniReader::GetConfigInt("Misc", "PartyMemberExtraInfo", 0)) {
dlogr("Applying display extra info patch for party members.", DL_INIT);
Expand Down

0 comments on commit 6e8f2c6

Please sign in to comment.