mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed the code for "display_stats" script function
Minor edit to Perks.cpp.
This commit is contained in:
@@ -858,11 +858,6 @@ static void PerkEngineInit() {
|
|||||||
// perk_owed hooks
|
// perk_owed hooks
|
||||||
MakeCall(0x4AFB2F, LevelUpHack, 1); // replaces 'mov edx, ds:[PlayerLevel]'
|
MakeCall(0x4AFB2F, LevelUpHack, 1); // replaces 'mov edx, ds:[PlayerLevel]'
|
||||||
SafeWrite8(0x43C2EC, 0xEB); // skip the block of code which checks if the player has gained a perk (now handled in level up code)
|
SafeWrite8(0x43C2EC, 0xEB); // skip the block of code which checks if the player has gained a perk (now handled in level up code)
|
||||||
|
|
||||||
// Disable losing unused perks
|
|
||||||
SafeWrite16(0x43C369, 0x0DFE); // mov ds:[_free_perk], dh > dec ds:[_free_perk]
|
|
||||||
// If there are unused perks, then call the perk selection window
|
|
||||||
SafeWrite8(0x43C370, 0xB1); // jmp 0x43C322
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PerkSetup() {
|
static void PerkSetup() {
|
||||||
@@ -1465,6 +1460,11 @@ void Perks::init() {
|
|||||||
|
|
||||||
FastShotTraitFix();
|
FastShotTraitFix();
|
||||||
|
|
||||||
|
// Disable losing unused perks
|
||||||
|
SafeWrite16(0x43C369, 0x0DFE); // mov ds:[_free_perk], dh > dec ds:[_free_perk]
|
||||||
|
// If there are unused perks, then call the perk selection window
|
||||||
|
SafeWrite8(0x43C370, 0xB1); // jmp 0x43C322
|
||||||
|
|
||||||
// Don't show an empty perk selection window
|
// Don't show an empty perk selection window
|
||||||
HookCall(0x43C80B, perks_dialog_hook);
|
HookCall(0x43C80B, perks_dialog_hook);
|
||||||
|
|
||||||
|
|||||||
@@ -299,9 +299,9 @@ void mf_display_stats(OpcodeContext& ctx) {
|
|||||||
__asm {
|
__asm {
|
||||||
mov eax, ds:[FO_VAR_obj_dude];
|
mov eax, ds:[FO_VAR_obj_dude];
|
||||||
call fo::funcoffs::stat_recalc_derived_;
|
call fo::funcoffs::stat_recalc_derived_;
|
||||||
|
xor edx, edx;
|
||||||
mov eax, ds:[FO_VAR_obj_dude];
|
mov eax, ds:[FO_VAR_obj_dude];
|
||||||
call fo::funcoffs::critter_adjust_hits_;
|
call fo::funcoffs::critter_adjust_hits_;
|
||||||
push edx;
|
|
||||||
push ebx;
|
push ebx;
|
||||||
mov eax, 7;
|
mov eax, 7;
|
||||||
call fo::funcoffs::PrintBasicStat_;
|
call fo::funcoffs::PrintBasicStat_;
|
||||||
@@ -310,7 +310,6 @@ void mf_display_stats(OpcodeContext& ctx) {
|
|||||||
call fo::funcoffs::PrintLevelWin_;
|
call fo::funcoffs::PrintLevelWin_;
|
||||||
call fo::funcoffs::ListDrvdStats_;
|
call fo::funcoffs::ListDrvdStats_;
|
||||||
pop ebx;
|
pop ebx;
|
||||||
pop edx;
|
|
||||||
}
|
}
|
||||||
fo::func::win_draw(fo::var::edit_win);
|
fo::func::win_draw(fo::var::edit_win);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user