Changed the option name of grave containers fix

Edited the code of tile_num function wrapper.
Reorganized the options in ddraw.ini.
This commit is contained in:
NovaRain
2021-11-09 10:06:13 +08:00
parent df983e0d25
commit a5f57d400b
5 changed files with 70 additions and 67 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ TagSkillBonus=20
;Set to 3 to use both modes ;Set to 3 to use both modes
TagSkillMode=0 TagSkillMode=0
;Set to 1 to base skill costs on spent points instead of current level ;Set to 1 to base skill costs on the number of additional points in a skill instead of the current level
BasedOnPoints=0 BasedOnPoints=0
;Examples ;Examples
+63 -59
View File
@@ -378,7 +378,7 @@ SaveInCombatFix=1
;Player's level is capped once the highest specified level is reached ;Player's level is capped once the highest specified level is reached
;XPTable=50,100,200 ;XPTable=50,100,200
;Set to 1 to enable additional weapon animation codes from o to t ;Set to 1 to enable additional weapon animation codes from 'o' to 't'
;The 4 byte value at 0x39 of weapon protos may range from 0 to 15 rather than 0 to 10 ;The 4 byte value at 0x39 of weapon protos may range from 0 to 15 rather than 0 to 10
;Since the letters 'n' and 'r' are in use for other animations, an animation code of 11 corresponds to 's' and 15 to 't' ;Since the letters 'n' and 'r' are in use for other animations, an animation code of 11 corresponds to 's' and 15 to 't'
AdditionalWeaponAnims=1 AdditionalWeaponAnims=1
@@ -437,16 +437,6 @@ SkipOpeningMovies=0
;Set to 0 to disable ;Set to 0 to disable
NPCsTryToSpendExtraAP=0 NPCsTryToSpendExtraAP=0
;Set to 1 to fix the priority score calculation for choosing the best weapon for NPCs
;Note that enabling this option can affect the weapon of choice for some NPCs
AIBestWeaponFix=1
;Set to 1 to fix NPCs not taking chem_primary_desire in AI.txt as a preference list when using drugs in their inventory
;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder)
;Note: chem_primary_desire w/o fixes prevents the specified item PID from being consumed if all three values in the list are the same PID
;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground
AIDrugUsePerfFix=0
;Allows the use of tiles over 80x36 in size. sfall will just split and resave them to art\tiles\zzz####.frm at startup ;Allows the use of tiles over 80x36 in size. sfall will just split and resave them to art\tiles\zzz####.frm at startup
;Set to 1 to check all tiles on started (slow, but can also be useful for checking the correct size of your new tiles) ;Set to 1 to check all tiles on started (slow, but can also be useful for checking the correct size of your new tiles)
;Set to 2 if you provide a XLtiles.lst file in art\tiles\ containing a list of the tile indexes that need checking ;Set to 2 if you provide a XLtiles.lst file in art\tiles\ containing a list of the tile indexes that need checking
@@ -563,7 +553,7 @@ BoostScriptDialogLimit=0
;Add 4 to the mode to limit the weight check to used items only ;Add 4 to the mode to limit the weight check to used items only
;You can use message number 542/543 in proto.msg and message number 35 in inventry.msg to set up custom messages for item size ;You can use message number 542/543 in proto.msg and message number 35 in inventry.msg to set up custom messages for item size
CritterInvSizeLimitMode=0 CritterInvSizeLimitMode=0
CritterInvSizeLimit=100 CritterInvSizeLimit=200
;Some bit flags to alter behaviour of the motion sensor ;Some bit flags to alter behaviour of the motion sensor
;1 - Allow sensor use on automap when motion sensor is in pack rather than hands ;1 - Allow sensor use on automap when motion sensor is in pack rather than hands
@@ -593,37 +583,6 @@ SuperStimExploitFix=0
InventoryApCost=4 InventoryApCost=4
QuickPocketsApCostReduction=2 QuickPocketsApCostReduction=2
;Set to 1 to fix obj_can_see_obj script function to allow critters to see through objects with 'ShootThru' flag set and other critters in front of them
;Note that enabling this option can cause unexpected NPC behavior in some cases, e.g. initiating combat or dialogue when the player is behind certain obstacles
ObjCanSeeObj_ShootThru_Fix=0
;Set to 1 to fix the broken obj_can_hear_obj script function
ObjCanHearObjFix=0
;Set to 1 to enable the 'mood' argument of start_gdialog script function for talking heads
;If the argument value is -1, the mood will be determined by the local variable 0 of the script (vanilla behavior)
StartGDialogFix=0
;Set to 1 to fix attacker_results/target_results arguments and repurpose the unused called_shot/num_attacks arguments of attack_complex script function
;New behavior of the arguments:
;called_shot - additional damage when hitting the target
;num_attacks - the number of free action points on the first turn only
AttackComplexFix=0
;Set to 1 to make the create_object_sid script function run the 'start' procedure of attached script upon object creation
;By default, the 'start' procedure of attached script is executed after the current script procedure is finished
;Note that enabling this option may cause unexpected results with some existing game scripts
CreateObjectSidFix=0
;Set to 1 to fix the execution of the 'use_p_proc' procedure for grave type containers when they are in the open state
;By default, using open graves does not run the 'use_p_proc' procedure of attached script like other containers
;Note that enabling this option will cause problems for existing grave scripts
GraveUseProcFix=0
;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
;Note: To perform the unsigned integer division, use the new 'div' operator
DivisionOperatorFix=1
;Set to 1 to enable the balanced bullet distribution formula for burst attacks ;Set to 1 to enable the balanced bullet distribution formula for burst attacks
ComputeSprayMod=0 ComputeSprayMod=0
@@ -697,7 +656,7 @@ EnableMusicInDialogue=0
DontTurnOffSneakIfYouRun=0 DontTurnOffSneakIfYouRun=0
;Changes the distance at which the player will switch to walking when trying to use objects (valid range: 0..3) ;Changes the distance at which the player will switch to walking when trying to use objects (valid range: 0..3)
;Set to 0 to disable switching. (Default is 3) ;Default is 3. Set to 0 to disable switching
UseWalkDistance=3 UseWalkDistance=3
;Changes the displayed message when you recover from the negative effects of radiation exposure ;Changes the displayed message when you recover from the negative effects of radiation exposure
@@ -710,14 +669,6 @@ ActiveGeigerMsgs=1
;Set to 1 to fix the bug of being unable to sell used geiger counters or stealth boys ;Set to 1 to fix the bug of being unable to sell used geiger counters or stealth boys
CanSellUsedGeiger=1 CanSellUsedGeiger=1
;Set to 1 to fix the issue with being able to charge the car by using cells on other scenery/critters
;Set to 0 if another mod you're using has custom vehicles
CarChargingFix=1
;Set to 1 to prevent the car from being lost when entering a location via the Town/World button and then leaving on foot
;Note that the global variable 633 (GVAR_CAR_PLACED_TILE) will be set to -1 when the player leaves a location
CarPlacedTileFix=1
;Set to 1 to skip weapon equip/unequip animations when performing various actions ;Set to 1 to skip weapon equip/unequip animations when performing various actions
InstantWeaponEquip=0 InstantWeaponEquip=0
@@ -751,6 +702,66 @@ PartyMemberExtraInfo=0
;Set to 2 to also skip loading the game/combat difficulty settings ;Set to 2 to also skip loading the game/combat difficulty settings
SkipLoadingGameSettings=0 SkipLoadingGameSettings=0
;Changes the base value of the duration of the knockout effect (valid range: 35..100; default is 35)
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
KnockoutTime=35
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Critical modding options - the following options should be changed with caution
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;Set to 1 to fix the issue with being able to charge the car by using cells on other scenery/critters
;Set to 0 if another mod you're using has custom vehicles
CarChargingFix=1
;Set to 1 to prevent the car from being lost when entering a location via the Town/World button and then leaving on foot
;Note that the global variable 633 (GVAR_CAR_PLACED_TILE) will be set to -1 when the player leaves a location
CarPlacedTileFix=1
;Set to 1 to fix obj_can_see_obj script function to allow critters to see through objects with 'ShootThru' flag set and other critters in front of them
;Note that enabling this option can cause unexpected NPC behavior in some cases, e.g. initiating combat or dialogue when the player is behind certain obstacles
ObjCanSeeObj_ShootThru_Fix=0
;Set to 1 to fix the broken obj_can_hear_obj script function
ObjCanHearObjFix=0
;Set to 1 to enable the 'mood' argument of start_gdialog script function for talking heads
;If the argument value is -1, the mood will be determined by the local variable 0 of the script (vanilla behavior)
StartGDialogFix=0
;Set to 1 to fix attacker_results/target_results arguments and repurpose the unused called_shot/num_attacks arguments of attack_complex script function
;New behavior of the arguments:
;called_shot - additional damage when hitting the target
;num_attacks - the number of free action points on the first turn only
AttackComplexFix=0
;Set to 1 to make the create_object_sid script function run the 'start' procedure of attached script upon object creation
;By default, the 'start' procedure of attached script is executed after the current script procedure is finished
;Note that enabling this option may cause unexpected results with some existing game scripts
CreateObjectSidFix=0
;Set to 1 to fix the execution of the 'use_p_proc' procedure for grave type containers when they are in the open state
;By default, using open graves does not run the 'use_p_proc' procedure of attached script like other containers
;Note that enabling this option will cause problems for existing grave scripts
GraveContainersFix=0
;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
;Note: To perform the unsigned integer division, use the new 'div' operator
DivisionOperatorFix=1
;Set to 1 to fix the priority score calculation for choosing the best weapon for NPCs
;Note that enabling this option can affect the weapon of choice for some NPCs
AIBestWeaponFix=1
;Set to 1 to fix NPCs not taking chem_primary_desire in AI.txt as a preference list when using drugs in their inventory
;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder)
;Note: chem_primary_desire w/o fixes prevents the specified item PID from being consumed if all three values in the list are the same PID
;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground
AIDrugUsePerfFix=0
;Overrides the global variable number used to show the special death message of the Modoc toilet explosion ;Overrides the global variable number used to show the special death message of the Modoc toilet explosion
;Set to -1 to disable the special death message when the global variable is set ;Set to -1 to disable the special death message when the global variable is set
SpecialDeathGVAR=491 SpecialDeathGVAR=491
@@ -764,13 +775,6 @@ DisableSpecialMapIDs=0
;Note that enabling this option will break the location change of the 'Fake Vault 13' in Fallout 2 ;Note that enabling this option will break the location change of the 'Fake Vault 13' in Fallout 2
DisableSpecialAreas=0 DisableSpecialAreas=0
;Changes the base value of the duration of the knockout effect (valid range: 35..100; default is 35)
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
KnockoutTime=35
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Configuration ini files ; Configuration ini files
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+3 -4
View File
@@ -137,10 +137,9 @@ void __declspec(naked) interpretError(const char* fmt, ...) {
__asm jmp fo::funcoffs::interpretError_; __asm jmp fo::funcoffs::interpretError_;
} }
long __stdcall tile_num(long x, long y) { long __fastcall tile_num(long x, long y) {
__asm push ebx; // don't delete (bug in tile_num_) __asm xor ebx, ebx; // don't delete (bug in tile_num_)
WRAP_WATCOM_CALL2(tile_num_, x, y); WRAP_WATCOM_FCALL2(tile_num_, x, y);
__asm pop ebx;
} }
GameObject* __fastcall obj_blocking_at_wrapper(GameObject* obj, DWORD tile, DWORD elevation, void* func) { GameObject* __fastcall obj_blocking_at_wrapper(GameObject* obj, DWORD tile, DWORD elevation, void* func) {
+1 -1
View File
@@ -50,7 +50,7 @@ void __stdcall interpretReturnValue(Program* scriptPtr, DWORD val, DWORD valType
// USE WITH CAUTION // USE WITH CAUTION
void __declspec() interpretError(const char* fmt, ...); void __declspec() interpretError(const char* fmt, ...);
long __stdcall tile_num(long x, long y); long __fastcall tile_num(long x, long y);
GameObject* __fastcall obj_blocking_at_wrapper(GameObject* obj, DWORD tile, DWORD elevation, void* func); GameObject* __fastcall obj_blocking_at_wrapper(GameObject* obj, DWORD tile, DWORD elevation, void* func);
+2 -2
View File
@@ -610,8 +610,8 @@ void Animations_Init() {
MakeCall(0x419A17, art_alias_fid_hack); MakeCall(0x419A17, art_alias_fid_hack);
// Fix for grave type containers in the open state not executing the use_p_proc procedure // Fix for grave type containers in the open state not executing the use_p_proc procedure
if (GetConfigInt("Misc", "GraveUseProcFix", 0) != 0) { if (GetConfigInt("Misc", "GraveContainersFix", 0)) {
dlog("Applying use_p_proc fix for grave type containers.", DL_INIT); dlog("Applying grave type containers fix.", DL_INIT);
HookCall(0x49CFAC, obj_use_container_hook); HookCall(0x49CFAC, obj_use_container_hook);
SafeWrite16(0x4122D9, 0x9090); // action_get_an_object_ SafeWrite16(0x4122D9, 0x9090); // action_get_an_object_
dlogr(" Done", DL_INIT); dlogr(" Done", DL_INIT);