mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Release 4.3.7
This commit is contained in:
@@ -10,4 +10,4 @@
|
||||
;in the proto for other items, so AI will use them for healing in combat as well
|
||||
STIMPAK=40
|
||||
SUPER_STIMPAK=144
|
||||
HEALING_POWDER=237
|
||||
HEALING_POWDER=273
|
||||
|
||||
@@ -72,7 +72,7 @@ Power=16777349
|
||||
[5]
|
||||
PID=16777720
|
||||
WeaponAnims=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
||||
Default=16777353
|
||||
Default=16777346
|
||||
Jacket=16777346
|
||||
Leather=16777347
|
||||
Metal=16777348
|
||||
|
||||
+8
-7
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.3.6
|
||||
;v4.3.7
|
||||
|
||||
[Main]
|
||||
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
|
||||
@@ -132,14 +132,14 @@ WorldMapTerrainInfo=0
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Sound]
|
||||
;Sets the number of allowed simultaneous sound effects
|
||||
;Set to 0 to leave the default unchanged (i.e. 4). The maximum is 32
|
||||
NumSoundBuffers=0
|
||||
;Set to 0 to leave the default unchanged (i.e. 8). The maximum is 32
|
||||
NumSoundBuffers=8
|
||||
|
||||
;Set to 1 to allow attaching sound files to combat float messages
|
||||
AllowSoundForFloats=0
|
||||
|
||||
;Set to 1 to automatically search for alternative formats (mp3/wma/wav) when Fallout tries to play an ACM
|
||||
;Set to 2 to play alternative music files even if original ACM files are not present in the music folder
|
||||
;Alternative music files will play even if original ACM files are not present in the music folder
|
||||
;This does not effect the play_sfall_sound and stop_sfall_sound script functions
|
||||
AllowDShowSound=0
|
||||
|
||||
@@ -453,7 +453,8 @@ NPCsTryToSpendExtraAP=0
|
||||
AllowLargeTiles=0
|
||||
|
||||
;Set to 1 to boost the maximum number of tile FRMs from 4096 to 16383
|
||||
MoreTiles=0
|
||||
;This option is always enabled in 4.3.7/3.8.37 or later. The information is left for reference only
|
||||
MoreTiles=1
|
||||
|
||||
;Change the Skilldex cursor FRM numbers
|
||||
;Default is 293 for all skills
|
||||
@@ -513,7 +514,7 @@ SpeedInterfaceCounterAnims=0
|
||||
ScienceOnCritters=0
|
||||
|
||||
;Modify this value to change the player's speed of rotation on the inventory and character screens
|
||||
;Default is 166
|
||||
;Default is 166 (lower - faster; valid range: 0..1000)
|
||||
SpeedInventoryPCRotation=166
|
||||
|
||||
;Modify the number of the extra interface boxes available to modders. (Default is 5, and the maximum is 95)
|
||||
@@ -530,7 +531,7 @@ BonusHtHDamageFix=1
|
||||
DisplayBonusDamage=0
|
||||
|
||||
;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127)
|
||||
AnimationsAtOnceLimit=120
|
||||
AnimationsAtOnceLimit=64
|
||||
|
||||
;Set to 1 to remove the limits that stop the player rolling critical successes/misses in the first few days of game time
|
||||
RemoveCriticalTimelimits=0
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
version 1.2
|
||||
version 1.3
|
||||
|
||||
*/
|
||||
|
||||
@@ -56,11 +56,20 @@ procedure CombatTurn_Handler begin
|
||||
|
||||
pid := obj_pid(critter);
|
||||
if (pid == PID_PLAYER and inControl == false) then return;
|
||||
if (pid != PID_PLAYER and controlMode != 1 and AllowControl(pid) == false) then return;
|
||||
|
||||
if (pid != PID_PLAYER and controlMode != 1 and AllowControl(pid) == false) then begin
|
||||
if (npcControl) then begin
|
||||
npcControl := 0;
|
||||
call SetLight(dude_obj, dudeLightInt, dudeLightDist); // restore dude light
|
||||
//move_to(dude_obj, dude_tile, dude_elevation);
|
||||
intface_redraw;
|
||||
end
|
||||
//display_msg("Skip control.");
|
||||
return;
|
||||
end
|
||||
|
||||
if (status == 1) then begin
|
||||
set_dude_obj(critter);
|
||||
intface_redraw;
|
||||
//display_msg("Take control of: " + obj_name(critter));
|
||||
|
||||
if (critter != real_dude_obj) then begin
|
||||
@@ -79,12 +88,14 @@ procedure CombatTurn_Handler begin
|
||||
level := has_trait(TRAIT_PERK, real_dude_obj, perkID);
|
||||
if (level) then critter_add_trait(critter, TRAIT_PERK, perkID, level);
|
||||
end
|
||||
intface_redraw;
|
||||
|
||||
obj_set_light_level(critter, 100, 4);
|
||||
inControl := true;
|
||||
end else if (npcControl) then begin
|
||||
call SetLight(dude_obj, dudeLightInt, dudeLightDist); // restore dude light
|
||||
npcControl := 0; // dude control
|
||||
npcControl := 0; // for dude control
|
||||
intface_redraw;
|
||||
end
|
||||
|
||||
if (inControl) then begin
|
||||
@@ -116,13 +127,13 @@ procedure CombatTurn_Handler begin
|
||||
if (level) then critter_rm_trait(critter, TRAIT_PERK, perkID, level);
|
||||
end
|
||||
|
||||
set_dude_obj(0); // w/o redraw interface bar
|
||||
if (status == 0) then set_dude_obj(0); // w/o redraw interface bar (otherwise it flickers when switching from the player to NPCs)
|
||||
//display_msg("Return control to real dude!");
|
||||
end
|
||||
|
||||
if (status < 0) then begin
|
||||
set_dude_obj(real_dude_obj);
|
||||
call SetLight(dude_obj, dudeLightInt, dudeLightDist); //obj_set_light_level(dude_obj, 100, 4);
|
||||
call SetLight(dude_obj, dudeLightInt, dudeLightDist);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -79,7 +79,7 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
|
||||
- Conditional expressions (Python-inspired), also known as ternary operator:
|
||||
- new:
|
||||
```
|
||||
X := value1 if condition else value2
|
||||
X := value1 if (condition) else value2
|
||||
```
|
||||
- old:
|
||||
```
|
||||
@@ -234,12 +234,12 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
|
||||
- old:
|
||||
```
|
||||
callbackVar := "Node000";
|
||||
callbackVar();
|
||||
call callbackVar;
|
||||
```
|
||||
- new:
|
||||
```
|
||||
callbackVar := @Node000;
|
||||
callbackVar();
|
||||
call callbackVar;
|
||||
```
|
||||
Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this:
|
||||
- optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`)
|
||||
|
||||
@@ -880,7 +880,7 @@
|
||||
opcode: 0x8177
|
||||
- name: set_pipboy_available
|
||||
detail: void set_pipboy_available(int available)
|
||||
doc: Will only accept 0 or 1 as an argument. Using any other value will cause the function to have no effect. Use 0 to disable the pipboy, and 1 to enable it.
|
||||
doc: Sets the availability of the pipboy in the game. Use 0 to disable the pipboy, and 1 or 2 to enable it (value 2 does not mark the `VSUIT_MOVIE` movie as "played").
|
||||
opcode: 0x818b
|
||||
- name: get_kill_counter
|
||||
detail: int get_kill_counter(int critterType)
|
||||
@@ -1845,7 +1845,7 @@
|
||||
opcode: 0x81f3
|
||||
doc: Accepts a pointer to an object and will remove the script from that object.
|
||||
- name: set_script
|
||||
detail: void set_script(ObjectPtr, int scriptid)
|
||||
detail: void set_script(ObjectPtr, int scriptID)
|
||||
opcode: 0x81f4
|
||||
doc: Accepts a pointer to an object and scriptID, and applies the given script to an object (scriptID accept the same values as `create_object_sid `from sfall 3.6). If used on an object that is already scripted, it will remove the existing script first; you cannot have multiple scripts attached to a single object. Calling `set_script` on `self_obj` will have all sorts of wacky side effects, and should be avoided. If you add 0x80000000 to the sid when calling `set_script`, `map_enter_p_proc` will be SKIPPED. The `start` proc will always be run.
|
||||
- name: get_script
|
||||
|
||||
@@ -121,9 +121,12 @@
|
||||
#define MSGBOX_YESNO (0x10) // use YES/NO buttons instead of DONE
|
||||
#define MSGBOX_CLEAN (0x20) // no buttons
|
||||
|
||||
// remove inven obj defines for the 4th argument to HOOK_REMOVEINVOBJ
|
||||
// Some possible defines for the 4th argument to HOOK_REMOVEINVOBJ
|
||||
#define RMOBJ_DROP 4831349 // If the object is dropped manually by the player from the inventory screen
|
||||
#define RMOBJ_TRADE 4683293 // If the object is offered up as a trade
|
||||
#define RMOBJ_DROPMULTI 4571599 // When dropping a part of a stack (RMOBJ_DROP occurs first)
|
||||
#define RMOBJ_CONSUME_DRUG 4666772 // (inven_action_cursor_)
|
||||
#define RMOBJ_CONTAINER 4683293 // same as RMOBJ_TRADE (item_move_func_)
|
||||
//#define RMOBJ_CONTAINER 4683293 // same as RMOBJ_TRADE (item_move_func_)
|
||||
#define RMOBJ_USE_OBJ 4666865 // (inven_action_cursor_)
|
||||
#define RMOBJ_EQUIP_ARMOR 4658121 // (inven_pickup_)
|
||||
#define RMOBJ_EQUIP_WEAPON 4658675 // (switch_hand_)
|
||||
@@ -134,16 +137,20 @@
|
||||
//#define RMOBJ_DROP_DYNAMITE 4666865 // same as RMOBJ_USE_OBJ
|
||||
#define RMOBJ_ITEM_DESTROYED 4543215 // (op_destroy_object_)
|
||||
#define RMOBJ_ITEM_REMOVED 4548572 // (op_rm_obj_from_inven_)
|
||||
#define RMOBJ_ARMOR_EQUIPED 4651961 // (setup_inventory_)
|
||||
#define RMOBJ_LEFT_HAND_EQUIPED 4651899 // (setup_inventory_)
|
||||
#define RMOBJ_RIGHT_HAND_EQUIPED 4651934 // (setup_inventory_)
|
||||
#define RMOBJ_ARMOR_EQUIPED 4651961 // removing armor from the player's slot when entering INVENTORY/LOOT/BARTER/USE inventory
|
||||
#define RMOBJ_LEFT_HAND_EQUIPED 4651899 // removing item from the player's left slot when entering INVENTORY/LOOT/BARTER/USE inventory
|
||||
#define RMOBJ_RIGHT_HAND_EQUIPED 4651934 // removing item from the player's right slot when entering INVENTORY/LOOT/BARTER/USE inventory
|
||||
#define RMOBJ_RM_MULT_OBJS 4563866 // (op_rm_mult_objs_from_inven_)
|
||||
#define RMOBJ_REPLACE_WEAPON 4658526 // (switch_hand_)
|
||||
#define RMOBJ_THROW 4266040 // (action_ranged_)
|
||||
#define RMOBJ_SUB_CONTAINER 4683191 // search and remove the item from nested containers in the inventory (item_remove_mult_)
|
||||
#define RMOBJ_AI_USE_DRUG_ON 4359920 // remove before AI uses the drug in combat (ai_check_drugs_)
|
||||
#define RMOBJ_SUB_CONTAINER 4683191 // search and remove the item from nested containers in the inventory
|
||||
#define RMOBJ_AI_USE_DRUG_ON 4359920 // removing before AI uses the drug in combat
|
||||
//#define RMOBJ_AI_USE_DRUG_ON_1 4359639 // same as RMOBJ_AI_USE_DRUG_ON (obsolete, use only for sfall before 4.3.1/3.8.31)
|
||||
//#define RMOBJ_AI_USE_DRUG_ON_2 4360176 // same as RMOBJ_AI_USE_DRUG_ON (obsolete, use only for sfall before 4.3.1/3.8.31)
|
||||
#define RMOBJ_BARTER_ARMOR 4675656 // removing armor from NPC's slot before entering the barter screen
|
||||
#define RMOBJ_BARTER_WEAPON 4675722 // removing weapon from NPC's slot before entering the barter screen
|
||||
#define RMOBJ_INVEN_DROP_CAPS 4667295 // if money/caps are dropped manually by the player from the inventory screen
|
||||
#define RMOBJ_DROP_INTO_CONTAINER 4678833 // when dropping items into a container item (bag/backpack)
|
||||
|
||||
// common prototype offsets for get/set_proto_data
|
||||
#define PROTO_PID (1)
|
||||
|
||||
@@ -125,11 +125,6 @@
|
||||
#define ATKTYPE_HOOKKICK (18)
|
||||
#define ATKTYPE_PIERCINGKICK (19)
|
||||
|
||||
// Some possible values for the 4th argument to hs_removeinvobj
|
||||
#define RMOBJ_DROP (0x49B875) // If the object is dropped manually by the player from the inventory screen
|
||||
#define RMOBJ_TRADE (0x47761D) // If the object is offered up as a trade
|
||||
#define RMOBJ_DROPMULTI (0x45C1CF) // When dropping a part of a stack (RMOBJ_DROP occurs first)
|
||||
|
||||
// Return values for "typeof"
|
||||
#define VALTYPE_NONE (0) // not used yet
|
||||
#define VALTYPE_INT (1)
|
||||
@@ -212,6 +207,7 @@
|
||||
#define GAME_MSG_STAT (17)
|
||||
#define GAME_MSG_TRAIT (18)
|
||||
#define GAME_MSG_WORLDMAP (19)
|
||||
#define GAME_MSG_EDITOR (20)
|
||||
#define GAME_MSG_PRO_ITEM (0x1000)
|
||||
#define GAME_MSG_PRO_CRIT (0x1001)
|
||||
#define GAME_MSG_PRO_SCEN (0x1002)
|
||||
@@ -257,6 +253,7 @@
|
||||
#define mstr_stat(x) (message_str_game(GAME_MSG_STAT, x))
|
||||
#define mstr_trait(x) (message_str_game(GAME_MSG_TRAIT, x))
|
||||
#define mstr_worldmap(x) (message_str_game(GAME_MSG_WORLDMAP, x))
|
||||
#define mstr_character(x) (message_str_game(GAME_MSG_EDITOR, x))
|
||||
|
||||
|
||||
#define BLOCKING_TYPE_BLOCK (0)
|
||||
|
||||
@@ -36,8 +36,6 @@ The `force_graphics_refresh` forces the screen to redraw at times when it normal
|
||||
|
||||
The mapper manual lists the functions `world_map_x_pos` and `world_map_y_pos`, which supposedly return the player's x and y positions on the world map. The `get_world_map_x_pos` and `get_world_map_y_pos` are included here anyway, because I was unable to get those original functions to work, or even to find any evidence that they existed in game.
|
||||
|
||||
The `set_pipboy_available` will only accept 0 or 1 as an argument. Using any other value will cause the function to have no effect. Use 0 to disable the pipboy, and 1 to enable it.
|
||||
|
||||
The `get_critter_current_ap` and `set_critter_current_ap` functions should only be used during the target critters turn while in combat. Calling them outside of combat typically returns the critters max AP, but don't rely on that behaviour. (Specifically, if the critter has never before entered combat, it will probably return the critters base AP ignoring any extra bonuses from perks etc.)
|
||||
|
||||
The **type** value in the weapon knockback functions can be 0 or 1. If 0, the value becomes an absolute distance that targets will be knocked back. If 1, the value is multiplied by the distance they would normally have been knocked back. Weapon knockback modifiers are applied in the order `weapon -> attacker -> target`, so a x2 weapon wielded by an abs 6 attacker hitting a /2 target will knock the target back 3 squares. The knockback functions will not override the stonewall perk or knockdowns resulting from criticals. knockback values set on weapons or critters are not saved, and must be reset each time the player reloads.
|
||||
@@ -104,6 +102,10 @@ FUNCTION REFERENCE
|
||||
##### `int game_loaded()`
|
||||
- Returns 1 the first time it is called after a new game or game load, and 0 any time after. It works on an individual basis for each script, so one script wont interfere with others. Its primary use is for global scripts, so that they know when to call `set_global_script_repeat`, but it can be called from normal scripts too.
|
||||
|
||||
-----
|
||||
##### `void set_pipboy_available(int available)`
|
||||
- Sets the availability of the pipboy in the game. Use 0 to disable the pipboy, and 1 or 2 to enable it (value 2 does not mark the `VSUIT_MOVIE` movie as "played").
|
||||
|
||||
-----
|
||||
##### `void inc_npc_level(int pid/string name)`
|
||||
- Takes a party member PID or an NPC name (deprecated, for compatibility with sfall 4.1.5/3.8.15 or earlier) as an argument. The NPC must be in your party.
|
||||
@@ -170,7 +172,7 @@ FUNCTION REFERENCE
|
||||
- Accepts a pointer to an object and will remove the script from that object.
|
||||
|
||||
-----
|
||||
##### `void set_script(object, int scriptid)`
|
||||
##### `void set_script(object, int scriptID)`
|
||||
- Accepts a pointer to an object and **scriptID**, and applies the given script to an object (scriptID accepts the same values as `create_object_sid`)
|
||||
- If used on an object that is already scripted, it will remove the existing script first; you cannot have multiple scripts attached to a single object. Calling `set_script` on `self_obj` will have all sorts of wacky side effects, and should be avoided.
|
||||
- If you add `0x80000000` to the SID when calling `set_script`, `map_enter_p_proc` will be SKIPPED. The `start` proc will always be run.
|
||||
|
||||
+3
-3
@@ -87,7 +87,7 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
|
||||
- Conditional expressions (Python-inspired), also known as ternary operator:
|
||||
- new:
|
||||
```
|
||||
X := value1 if condition else value2
|
||||
X := value1 if (condition) else value2
|
||||
```
|
||||
- old:
|
||||
```
|
||||
@@ -242,12 +242,12 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
|
||||
- old:
|
||||
```
|
||||
callbackVar := "Node000";
|
||||
callbackVar();
|
||||
call callbackVar;
|
||||
```
|
||||
- new:
|
||||
```
|
||||
callbackVar := @Node000;
|
||||
callbackVar();
|
||||
call callbackVar;
|
||||
```
|
||||
Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this:
|
||||
- optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`)
|
||||
|
||||
@@ -303,7 +303,7 @@ void __fastcall window_trans_cscale(long i_width, long i_height, long s_width, l
|
||||
}
|
||||
}
|
||||
|
||||
// buf_to_buf_ function with pure MMX implementation
|
||||
// buf_to_buf_ function with pure SSE implementation
|
||||
void __cdecl buf_to_buf(BYTE* src, long width, long height, long src_width, BYTE* dst, long dst_width) {
|
||||
if (height <= 0 || width <= 0) return;
|
||||
|
||||
@@ -320,27 +320,19 @@ void __cdecl buf_to_buf(BYTE* src, long width, long height, long src_width, BYTE
|
||||
mov esi, src;
|
||||
mov edi, dst;
|
||||
mov eax, height;
|
||||
startLoop:
|
||||
startLoop:
|
||||
mov ecx, blockCount;
|
||||
test ecx, ecx;
|
||||
jz copySmall;
|
||||
copyBlock: // copies block of 64 bytes
|
||||
movq mm0, [esi]; // movups xmm0, [esi]; // SSE implementation
|
||||
movq mm1, [esi + 8];
|
||||
movq mm2, [esi + 16]; // movups xmm1, [esi + 16];
|
||||
movq mm3, [esi + 24];
|
||||
movq mm4, [esi + 32]; // movups xmm2, [esi + 32];
|
||||
movq mm5, [esi + 40];
|
||||
movq mm6, [esi + 48]; // movups xmm3, [esi + 48];
|
||||
movq mm7, [esi + 56];
|
||||
movq [edi], mm0; // movups [edi], xmm0;
|
||||
movq [edi + 8], mm1;
|
||||
movq [edi + 16], mm2; // movups [edi + 16], xmm1;
|
||||
movq [edi + 24], mm3;
|
||||
movq [edi + 32], mm4; // movups xmm2, [esi + 32];
|
||||
movq [edi + 40], mm5;
|
||||
movq [edi + 48], mm6; // movups xmm3, [esi + 48];
|
||||
movq [edi + 56], mm7;
|
||||
copyBlock: // copies block of 64 bytes
|
||||
movups xmm0, [esi];
|
||||
movups xmm1, [esi + 16];
|
||||
movups xmm2, [esi + 32];
|
||||
movups xmm3, [esi + 48];
|
||||
movups [edi], xmm0;
|
||||
movups [edi + 16], xmm1;
|
||||
movups [edi + 32], xmm2;
|
||||
movups [edi + 48], xmm3;
|
||||
add esi, 64;
|
||||
lea edi, [edi + 64];
|
||||
dec ecx; // blockCount
|
||||
@@ -354,9 +346,8 @@ void __cdecl buf_to_buf(BYTE* src, long width, long height, long src_width, BYTE
|
||||
add edi, edx; // d_pitch
|
||||
dec eax; // height
|
||||
jnz startLoop;
|
||||
emms;
|
||||
jmp end;
|
||||
copySmall: // copies the small size data
|
||||
copySmall: // copies the small size data
|
||||
mov ecx, sizeD;
|
||||
rep movsd;
|
||||
mov ecx, sizeB;
|
||||
|
||||
@@ -78,7 +78,7 @@ void __fastcall displayInWindow(long w_here, long width, long height, void* data
|
||||
// draws an image to the buffer of the active script window
|
||||
void __fastcall window_trans_cscale(long i_width, long i_height, long s_width, long s_height, long xy_shift, long w_width, void* data);
|
||||
|
||||
// buf_to_buf_ function with pure MMX implementation
|
||||
// buf_to_buf_ function with pure SSE implementation
|
||||
void __cdecl buf_to_buf(BYTE* src, long width, long height, long src_width, BYTE* dst, long dst_width);
|
||||
|
||||
// trans_buf_to_buf_ function implementation
|
||||
|
||||
@@ -176,7 +176,7 @@ static __declspec(naked) void GNW_win_refresh_hack() {
|
||||
}
|
||||
|
||||
void Render::init() {
|
||||
// Replace the srcCopy_ function with a pure MMX implementation
|
||||
// Replace the srcCopy_ function with a pure SSE implementation
|
||||
sf::MakeJump(fo::funcoffs::buf_to_buf_, fo::func::buf_to_buf); // 0x4D36D4
|
||||
// Replace the transSrcCopy_ function
|
||||
sf::MakeJump(fo::funcoffs::trans_buf_to_buf_, fo::func::trans_buf_to_buf); // 0x4D3704
|
||||
|
||||
@@ -569,6 +569,10 @@ static void __declspec(naked) invenWieldFunc_item_get_type_hook() {
|
||||
mov cl, byte ptr [edi + 0x27];
|
||||
and cl, 0x3;
|
||||
xchg edx, eax; // eax = who, edx = item
|
||||
push eax;
|
||||
push -2;
|
||||
call SetRemoveObjectType; // call addr for HOOK_REMOVEINVENOBJ
|
||||
pop eax;
|
||||
call fo::funcoffs::item_remove_mult_;
|
||||
xchg ebx, eax;
|
||||
mov eax, esi;
|
||||
@@ -883,6 +887,10 @@ foundItem:
|
||||
inc esi; // No, need to change from_slot
|
||||
skip:
|
||||
mov edx, ebp;
|
||||
push eax;
|
||||
push 0x47659D;
|
||||
call SetRemoveObjectType; // call addr for HOOK_REMOVEINVENOBJ
|
||||
pop eax;
|
||||
call fo::funcoffs::item_remove_mult_;
|
||||
test eax, eax; // Have weapon been deleted from inventory?
|
||||
jnz end; // No
|
||||
@@ -1419,6 +1427,10 @@ static void __declspec(naked) switch_hand_hack() {
|
||||
xor ebx, ebx;
|
||||
inc ebx;
|
||||
mov edx, ebp;
|
||||
push eax;
|
||||
push 0x4715F3;
|
||||
call SetRemoveObjectType; // call addr for HOOK_REMOVEINVENOBJ
|
||||
pop eax;
|
||||
call fo::funcoffs::item_remove_mult_;
|
||||
skip:
|
||||
pop edx; // _inven_dude
|
||||
@@ -4043,6 +4055,9 @@ void BugFixes::init() {
|
||||
|
||||
// Fix for float_msg function not setting the purple or black text color correctly (was always grey)
|
||||
MakeCall(0x459415, op_float_msg_hack, 2);
|
||||
|
||||
// Corrects the language path for loading art files
|
||||
SafeWriteBatch<DWORD>((DWORD)&"art\\%s%s", {0x419B00, 0x419C06}); // art_data_size_, art_data_load_
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ static void __declspec(naked) RemoveObjHook() {
|
||||
cmp rmObjType, -1;
|
||||
cmovne ecx, rmObjType;
|
||||
mov rmObjType, -1;
|
||||
cmp ecx, -2;
|
||||
je skipHook;
|
||||
HookBegin;
|
||||
mov args[0], eax; // source
|
||||
mov args[4], edx; // item
|
||||
@@ -51,8 +53,6 @@ static void __declspec(naked) RemoveObjHook() {
|
||||
xor ecx, 0x47761D; // from item_move_func_
|
||||
cmovz esi, ebp; // target
|
||||
mov args[16], esi;
|
||||
push edi;
|
||||
push ebp;
|
||||
push eax;
|
||||
push edx;
|
||||
}
|
||||
@@ -62,10 +62,13 @@ static void __declspec(naked) RemoveObjHook() {
|
||||
EndHook();
|
||||
|
||||
__asm {
|
||||
pop edx;
|
||||
pop eax;
|
||||
sub esp, 0x0C;
|
||||
jmp RemoveObjHookRet;
|
||||
pop edx;
|
||||
pop eax;
|
||||
skipHook:
|
||||
push edi;
|
||||
push ebp;
|
||||
sub esp, 0x0C;
|
||||
jmp RemoveObjHookRet;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,8 +235,14 @@ skipHook:
|
||||
capsMultiDrop:
|
||||
if (dropResult == -1) {
|
||||
nextHookDropSkip = 1;
|
||||
__asm call fo::funcoffs::item_remove_mult_;
|
||||
__asm retn;
|
||||
__asm {
|
||||
push eax;
|
||||
push 0x47379F;
|
||||
call SetRemoveObjectType; // call addr for HOOK_REMOVEINVENOBJ
|
||||
pop eax;
|
||||
call fo::funcoffs::item_remove_mult_;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
__asm add esp, 4;
|
||||
__asm jmp InvenActionObjDropRet; // no caps drop
|
||||
|
||||
@@ -1071,12 +1071,7 @@ static void InterfaceWindowPatch() {
|
||||
}
|
||||
|
||||
static void InventoryCharacterRotationSpeedPatch() {
|
||||
long setting = IniReader::GetConfigInt("Misc", "SpeedInventoryPCRotation", 166);
|
||||
if (setting != 166 && setting <= 1000) {
|
||||
dlog("Applying SpeedInventoryPCRotation patch.", DL_INIT);
|
||||
SafeWrite32(0x47066B, setting);
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
SimplePatch<DWORD>(0x47066B, "Misc", "SpeedInventoryPCRotation", 166, 0, 1000);
|
||||
}
|
||||
|
||||
static void UIAnimationSpeedPatch() {
|
||||
|
||||
@@ -50,7 +50,8 @@ const fo::MessageList* Message::gameMsgFiles[] = {
|
||||
CASTMSG(MSG_FILE_SKILLDEX),
|
||||
CASTMSG(MSG_FILE_STAT),
|
||||
CASTMSG(MSG_FILE_TRAIT),
|
||||
CASTMSG(MSG_FILE_WORLDMAP)
|
||||
CASTMSG(MSG_FILE_WORLDMAP),
|
||||
CASTMSG(MSG_FILE_EDITOR)
|
||||
};
|
||||
#undef CASTMSG
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ namespace sfall
|
||||
#define MSG_FILE_STAT (0x66817C)
|
||||
#define MSG_FILE_TRAIT (0x66BE38)
|
||||
#define MSG_FILE_WORLDMAP (0x672FB0)
|
||||
#define MSG_FILE_EDITOR (0x56FCA8)
|
||||
|
||||
typedef std::unordered_map<int, std::unique_ptr<fo::MessageList>> ExtraGameMessageListsMap;
|
||||
|
||||
|
||||
@@ -44,16 +44,29 @@ void __declspec(naked) op_input_funcs_available() {
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) op_set_pipboy_available() {
|
||||
__asm {
|
||||
_GET_ARG_INT(end);
|
||||
cmp eax, 0;
|
||||
jl end;
|
||||
cmp eax, 1;
|
||||
jg end;
|
||||
mov byte ptr ds:[FO_VAR_gmovie_played_list][0x3], al;
|
||||
end:
|
||||
retn;
|
||||
static BYTE pipboyMovieCheck = 0;
|
||||
|
||||
void PipboyAvailableRestore() {
|
||||
if (pipboyMovieCheck) {
|
||||
SafeWrite8(0x497011, pipboyMovieCheck);
|
||||
pipboyMovieCheck = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void op_set_pipboy_available(OpcodeContext& ctx) {
|
||||
if (!pipboyMovieCheck) pipboyMovieCheck = *(BYTE*)0x497011; // should be either jnz or jmp(short)
|
||||
|
||||
switch (ctx.arg(0).rawValue()) {
|
||||
case 0:
|
||||
fo::var::gmovie_played_list[3] = false;
|
||||
SafeWrite8(0x497011, CodeType::JumpNZ); // restore the vault suit movie check
|
||||
break;
|
||||
case 1:
|
||||
fo::var::gmovie_played_list[3] = true;
|
||||
break;
|
||||
case 2:
|
||||
SafeWrite8(0x497011, CodeType::JumpShort); // skip the vault suit movie check
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user