mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Rename the option from previous commit to FullItemDescInBarter and added it to ddraw.ini.
Edited info about HOOK_DESCRIPTIONOBJ and the new return value of HOOK_BARTERPRICE to documents. Minor edits to ddraw.ini to avoid misunderstanding.
This commit is contained in:
@@ -578,6 +578,9 @@ WorldMapFontPatch=0
|
|||||||
;Set to 1 to keep the selected attack mode when moving the weapon between active item slots
|
;Set to 1 to keep the selected attack mode when moving the weapon between active item slots
|
||||||
KeepWeaponSelectMode=1
|
KeepWeaponSelectMode=1
|
||||||
|
|
||||||
|
;Set to 1 to display full item description for weapon/ammo in barter screen
|
||||||
|
FullItemDescInBarter=0
|
||||||
|
|
||||||
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
|
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
|
||||||
CreditsAtBottom=0
|
CreditsAtBottom=0
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ critter arg7 - table of offered goods (being sold to NPC)
|
|||||||
int arg8 - the total cost of the goods offered by the player
|
int arg8 - the total cost of the goods offered by the player
|
||||||
int arg9 - set 1 if the "offers" button was pressed (not for a party member), otherwise 0
|
int arg9 - set 1 if the "offers" button was pressed (not for a party member), otherwise 0
|
||||||
|
|
||||||
int ret1 - the modified value of all of the goods, pass -1 for modify only offered goods
|
int ret1 - the modified value of all of the goods (pass -1 if you just want to modify offered goods)
|
||||||
int ret2 - the modified value of all offered goods
|
int ret2 - the modified value of all offered goods
|
||||||
|
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
@@ -537,9 +537,9 @@ int ret2 - overrides the result of engine calculation: 0/1 - failure, 2/3 -
|
|||||||
|
|
||||||
HOOK_DESCRIPTIONOBJ (hs_descriptionobj)
|
HOOK_DESCRIPTIONOBJ (hs_descriptionobj)
|
||||||
|
|
||||||
Runs while using the item description icon in the player's inventory, or trade window.
|
Runs when using the examine action icon to display item description. You can override the description of the item.
|
||||||
Allows to override the description of the item (for example: add additional parameters to the description).
|
An example usage would be to add additional parameters to the description.
|
||||||
|
|
||||||
Obj arg1 - the item
|
Obj arg1 - the item
|
||||||
|
|
||||||
int ret1 - a pointer to the new "text" received using the macro function 'get_string_pointer' from FuncX functions
|
int ret1 - a pointer to the new text received by using "get_string_pointer" function
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ Some utility/math functions are available:
|
|||||||
- returns a pointer to a string variable or to a text
|
- returns a pointer to a string variable or to a text
|
||||||
|
|
||||||
> void sfall_func1("dialog_message", string text)
|
> void sfall_func1("dialog_message", string text)
|
||||||
- displays a message in the NPC response window in dialog or trade mode
|
- displays a message in the NPC response window in dialog or barter screen
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
------ MORE INFO -------
|
------ MORE INFO -------
|
||||||
|
|||||||
@@ -1548,19 +1548,24 @@ void BugFixes::init()
|
|||||||
MakeJump(0x424BA2, compute_damage_hack);
|
MakeJump(0x424BA2, compute_damage_hack);
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|
||||||
// Fix descriptions info items weapon/ammo in barter
|
// Fix missing AC/DR mod stats when examining ammo in barter screen
|
||||||
dlog("Applying barter item description fix.", DL_INIT);
|
dlog("Applying fix for displaying ammo stats in barter screen.", DL_INIT);
|
||||||
MakeCalls(obj_examine_func_hack_ammo0, {0x49B4AD, 0x49B504});
|
MakeCalls(obj_examine_func_hack_ammo0, {0x49B4AD, 0x49B504});
|
||||||
SafeWrite16(0x49B4B2, 0x9090);
|
SafeWrite16(0x49B4B2, 0x9090);
|
||||||
SafeWrite16(0x49B509, 0x9090);
|
SafeWrite16(0x49B509, 0x9090);
|
||||||
MakeCall(0x49B563, obj_examine_func_hack_ammo1);
|
MakeCall(0x49B563, obj_examine_func_hack_ammo1);
|
||||||
SafeWrite16(0x49B568, 0x9090);
|
SafeWrite16(0x49B568, 0x9090);
|
||||||
showItemDescription = (GetConfigInt("Misc", "BarterItemDescriptions", 1) != 0);
|
|
||||||
if (showItemDescription) {
|
|
||||||
HookCall(0x49B452, obj_examine_func_hack_weapon); // it's jump
|
|
||||||
}
|
|
||||||
dlogr(" Done", DL_INIT);
|
dlogr(" Done", DL_INIT);
|
||||||
|
|
||||||
|
// Display full item description for weapon/ammo in barter screen
|
||||||
|
showItemDescription = (GetConfigInt("Misc", "FullItemDescInBarter", 0) != 0);
|
||||||
|
if (showItemDescription) {
|
||||||
|
dlog("Applying full item description in barter patch.", DL_INIT);
|
||||||
|
HookCall(0x49B452, obj_examine_func_hack_weapon); // it's jump
|
||||||
|
dlogr(" Done", DL_INIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user