Skip to content

Commit 2c0c6ab

Browse files
committed
Removed duplicate executed code for the intface_redraw_ engine function.
Added additional resource files for the English and Russian versions. Update mod party control script.
1 parent 08d44aa commit 2c0c6ab

9 files changed

+20
-15
lines changed

artifacts/ddraw.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ AIDrugUsePerfFix=0
716716

717717
;Set to 1 to disables loading of all configuration settings of the game from the saved game, except the difficulty settings
718718
;Set to 2 also disables load the game/combat difficulty settings
719-
SkipLoadingGameSetting=1
719+
SkipLoadingGameSettings=1
720720

721721
;Set to 1 to displays the electric stats of the armor in the player's inventory
722722
;Set to 2 will replace the name of the player's character in the inventory by the health points
@@ -793,7 +793,7 @@ GlobalScriptPaths=scripts\gl*.int,scripts\sfall\gl*.int
793793
;The maximum length of the specified path is 61 characters
794794
;IniConfigFolder=IniConfig
795795

796-
;Set to 1 for the hooks registration backward compatibility mode of the register_hook function, used in pre-4.2/3.8.20 versions
796+
;Set to 1 for the hooks registration backward compatibility mode of the register_hook function, used in pre-4.2 versions
797797
BackwardHooksRegistration=0;
798798

799799
;Set to 1 to enable the new arrays behavior

artifacts/mods/gl_partycontrol.ssl

+7-8
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ procedure CombaTurn_Handler begin
7171
if (critter != real_dude_obj) then begin
7272
if not(npcControl) then obj_set_light_level(real_dude_obj, 0, 0); // dude off light
7373
npcControl := critter;
74-
// set perks (worked on 4.1.8/3.8.18)
74+
// set perks (worked on 4.1.8)
7575
foreach (perkID in perksList) begin
7676
level := has_trait(TRAIT_PERK, real_dude_obj, perkID);
7777
if (level) then begin
7878
critter_add_trait(critter, TRAIT_PERK, perkID, level);
7979
end
8080
end
81+
intface_redraw;
8182
lightDist := get_object_data(critter, OBJ_DATA_LIGHT_DISTANCE);
8283
lightInt := get_object_data(critter, OBJ_DATA_LIGHT_INTENSITY);
8384
obj_set_light_level(critter, 100, 4);
@@ -88,7 +89,8 @@ procedure CombaTurn_Handler begin
8889
npcControl := 0; // dude control
8990
end
9091
if inControl then begin
91-
/*if (isOutline) then*/ set_outline(critter, OUTLINE_GREY);
92+
// check preference setting _combat_highlight
93+
if (read_byte(0x56D38C)) then set_outline(critter, OUTLINE_GREY);
9294
// center the screen on the controlled critter/dude and remove roof tiles
9395
move_to(dude_obj, dude_tile, dude_elevation);
9496
if (displayName and critter != real_dude_obj) then begin
@@ -115,10 +117,6 @@ procedure CombaTurn_Handler begin
115117
end
116118

117119
procedure GameModeChange_Handler begin
118-
119-
// if (inControl == false and toggleControl and get_game_mode == COMBAT) then begin
120-
// //isOutline := (get_light_level > 32768);
121-
// end
122120
if (inControl and not(get_game_mode BWAND COMBAT)) then begin
123121
inControl := false;
124122
npcControl := 0;
@@ -158,7 +156,7 @@ procedure start begin
158156
displayName := GetConfig("CombatControl", "DisplayName", 0);
159157

160158
if (displayName) then begin
161-
variable nameTag := sfall_func0("add_iface_tag");
159+
variable nameTag := add_iface_tag;
162160
debug_msg("NPC control - added new box: " + nameTag);
163161
if (nameTag <= 0) then begin // box added ?
164162
variable maxBoxCount := get_ini_setting("ddraw.ini|Misc|BoxBarCount");
@@ -227,4 +225,5 @@ procedure SetGlobalVar_Handler begin
227225
set_sfall_return(value);
228226
end
229227
end
230-
end
228+
end
229+

artifacts/mods/gl_sfall-mods.ssl

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ procedure KeyPressHandler begin
146146
else if (keyDX == DIK_Z and (mode bwand PIPBOY)) then begin
147147
tap_key(DIK_ESCAPE);
148148
end
149-
if (mode == (BARTER + DIALOG) and (keyDX == DIK_SPACE or keyDX == DIK_RETURN)) then begin
149+
if ((mode bwand BARTER) and (keyDX == DIK_SPACE or keyDX == DIK_RETURN)) then begin
150150
tap_key(DIK_M);
151151
end
152152
else if (keyDX == pickupKey and (mode == 0)) then begin

artifacts/scripting/hookscripts.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,10 @@ int ret2 - overrides the duration time for the current check
637637

638638
HOOK_STDPROCEDURE (hs_stdprocedure.int)
639639

640-
Runs every time before executed the standard procedure (handler) in script of an object.
640+
Runs before Fallout executes a standard procedure (handler) in script of objects.
641+
NOTE: this hook will not be executed for "start", critter_p_proc, timed_event_p_proc, and map_update_p_proc procedures.
641642

642-
int arg1 - number of the standard script handler (see define.h, except: start, map_update_p_proc, timed_event_proc and critter_p_proc)
643+
int arg1 - number of the standard script handler (see define.h)
643644
Obj arg2 - the object that owns the executed handler
644645
Obj arg3 - the object that called this handler (can be 0)
645646

artifacts/scripting/sfall function notes.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ Some utility/math functions are available:
319319
- see "hookscripts.txt" for more details
320320

321321
> void register_hook_proc_spec(int hook, procedure proc)
322-
- works just like "register_hook_proc", but allows to register a script at the end of the hook script execution chain (i.e. the hook will be executed after all previously registered hook scripts).
322+
- works just like "register_hook_proc", but allows to register a script at the end of the hook script execution chain (i.e. the hook will be executed after all previously registered hook scripts for the same hook, including the hs_*.int script).
323+
- to unregister hook script from current global script, use the register_hook_proc function
323324

324325
> string message_str_game(int fileId, int messageId)
325326
- works exactly the same as message_str, except you get messages from files in "text\<current_lang>\game\" folder

artifacts/sfall.dat

142 Bytes
Binary file not shown.

artifacts/sfall_ru.dat

154 KB
Binary file not shown.

sfall/Modules/BugFixes.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -2940,6 +2940,9 @@ void BugFixes::init()
29402940

29412941
// Place the player on a nearby empty tile if the entrance tile is blocked by another object when entering a map
29422942
HookCall(0x4836F8, map_check_state_hook);
2943+
2944+
// Remove dublicate code for intface_redraw_ function
2945+
BlockCall(0x45EBBF);
29432946
}
29442947

29452948
}

sfall/Modules/MiscPatches.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,8 @@ void PartyMemberSkillPatch() {
804804
}
805805

806806
void SkipLoadingGameSettingsPatch() {
807-
int skipLoading = GetConfigInt("Misc", "SkipLoadingGameSetting", 0);
807+
int skipLoading = GetConfigInt("Misc", "SkipLoadingGameSettings", -1);
808+
if (skipLoading == -1) GetConfigInt("Misc", "SkipLoadingGameSetting", 0); // TODO: delete
808809
if (skipLoading) {
809810
dlog("Applying skip loading game settings from a saved game patch.", DL_INIT);
810811
BlockCall(0x493421);

0 commit comments

Comments
 (0)