mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc875291d1 | ||
|
|
9e28f8bdfd | ||
|
|
b2894268f6 | ||
|
|
b3e2b8b5b8 | ||
|
|
3227966767 | ||
|
|
9475b8c482 | ||
|
|
8b356b1213 | ||
|
|
90485a205a | ||
|
|
d5be2fdc9b | ||
|
|
a705341e02 | ||
|
|
ca3f59ad1e | ||
|
|
4d0c056e72 | ||
|
|
d388a5c3bb | ||
|
|
9b808cd008 | ||
|
|
fd91be7ea2 | ||
|
|
4fdd1d3cd8 | ||
|
|
9cb2d3df3e | ||
|
|
08242d77d5 | ||
|
|
68d0a3e894 | ||
|
|
16ff0e9ca6 | ||
|
|
218ba3004c | ||
|
|
8473ce5210 | ||
|
|
38a3dba476 | ||
|
|
9c1d439153 | ||
|
|
bc38a02508 |
@@ -5,10 +5,10 @@
|
||||
Key=42
|
||||
|
||||
; Set to 1 to also highlight containers
|
||||
Containers=1
|
||||
Containers=0
|
||||
|
||||
; Set to 1 to also highlight corpses
|
||||
Corpses=1
|
||||
; Set to 1 to also highlight lootable corpses
|
||||
Corpses=0
|
||||
|
||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
||||
CheckLOS=0
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.0.1
|
||||
;v4.0.3
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
@@ -72,7 +72,7 @@ Use32BitHeadGraphics=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Input]
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through your inventory
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through inventory, barter, and loot screens
|
||||
UseScrollWheel=1
|
||||
|
||||
;The mouse Z position is divided by this modifier to calculate the number of inventory
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
|
||||
Auto Doors mod for Fallout 2 by Mr.Stalin
|
||||
-----------------------------------------
|
||||
|
||||
- allows the player to automatically open/walk through unlocked doors when not in combat
|
||||
|
||||
Requires sfall 3.7b or higher
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
|
||||
procedure start;
|
||||
procedure map_enter_p_proc;
|
||||
procedure set_door_flag(variable state);
|
||||
procedure combatturn_handler;
|
||||
|
||||
#define PORTAL (0)
|
||||
#define DOOR_FLAGS (0x24)
|
||||
|
||||
variable only_once := 0;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
if (sfall_ver_major >= 4) then
|
||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
||||
else
|
||||
set_global_script_repeat(60);
|
||||
call map_enter_p_proc;
|
||||
end else begin
|
||||
if (only_once == 1 and combat_is_initialized) then begin
|
||||
only_once := 2;
|
||||
call set_door_flag(false);
|
||||
end else if (only_once == 2 and not(combat_is_initialized)) then begin
|
||||
only_once := 1;
|
||||
if (sfall_ver_major >= 4) then
|
||||
set_global_script_repeat(0);
|
||||
call set_door_flag(FLAG_WALKTHRU);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
procedure map_enter_p_proc begin
|
||||
only_once := 1;
|
||||
call set_door_flag(FLAG_WALKTHRU);
|
||||
end
|
||||
|
||||
procedure set_door_flag(variable state) begin
|
||||
variable objectMap, obj, objPid, arrayPid, i;
|
||||
|
||||
objectMap := list_as_array(LIST_SCENERY);
|
||||
arrayPid := temp_array(1, 0);
|
||||
|
||||
foreach (obj in objectMap) begin
|
||||
objPid := obj_pid(obj);
|
||||
|
||||
if (proto_data(objPid, sc_type) != PORTAL) or is_in_array(objPid, arrayPid) then
|
||||
continue;
|
||||
|
||||
arrayPid[i] := objPid;
|
||||
i++;
|
||||
resize_array(arrayPid, i + 1);
|
||||
set_proto_data(objPid, DOOR_FLAGS, state);
|
||||
end
|
||||
end
|
||||
|
||||
procedure combatturn_handler begin
|
||||
if (only_once == 1) then
|
||||
set_global_script_repeat(60);
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
Auto Doors mod for Fallout 2 by Mr.Stalin
|
||||
-----------------------------------------
|
||||
|
||||
- allows the player to automatically open/walk through unlocked doors when not in combat
|
||||
|
||||
|
||||
Requires sfall 3.7b or higher.
|
||||
|
||||
To use, copy gl_autodoors.int to your scripts folder.
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
|
||||
Previously was part of sfall itself, now a separate mod.
|
||||
Features:
|
||||
- highlighting items, containers (optional) and dead bodies (optional) on the ground
|
||||
- highlighting items, containers (optional) and lootable corpses (optional) on the ground
|
||||
- configurable hotkey is used to trigger highlight
|
||||
- only objects in direct line-of-sight of player are highlighted (optional)
|
||||
- motion scanner is required to enable highlight (optional)
|
||||
@@ -23,6 +23,7 @@
|
||||
#define CRITTER_IS_DEAD (1)
|
||||
#define PID_MOTION_SENSOR (59)
|
||||
#define NO_HIGHLIGHT(obj) (get_flags(obj) bwand FLAG_NOHIGHLIGHT)
|
||||
#define NO_STEAL(obj) (get_proto_data(obj_pid(obj), PROTO_CR_FLAGS) bwand CFLG_NOSTEAL)
|
||||
|
||||
variable configSection := "Highlighting";
|
||||
variable highlightKey;
|
||||
@@ -52,7 +53,7 @@ procedure ToggleHighlight(variable enable) begin
|
||||
end
|
||||
if (alsoCorpse) then begin
|
||||
foreach obj in list_as_array(LIST_CRITTERS) begin
|
||||
if critter_state(obj) == CRITTER_IS_DEAD then begin
|
||||
if critter_state(obj) == CRITTER_IS_DEAD and not NO_STEAL(obj) then begin
|
||||
call ToggleHighlightObject(obj, enable);
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -42,6 +42,7 @@ end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
set_perk_ranks(PERK_gecko_skinning_perk, 1);
|
||||
controlMode := GetConfig("CombatControl", "Mode", 0);
|
||||
if (controlMode > 2) then controlMode := 0;
|
||||
if (controlMode > 0) then begin
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
#define PROTO_WP_ANIM (36)
|
||||
#define PROTO_WP_DMG_MIN (40)
|
||||
#define PROTO_WP_DMG_MAX (44)
|
||||
#define PROTO_WP_DMG_TYPE (48)
|
||||
#define PROTO_WP_RANGE_1 (52)
|
||||
#define PROTO_WP_RANGE_2 (56)
|
||||
#define PROTO_WP_PROJ_PID (60)
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
|
||||
#define car_gas_amount sfall_func0("car_gas_amount")
|
||||
#define critter_inven_obj2(obj, type) sfall_func2("critter_inven_obj2", obj, type)
|
||||
#define display_stats sfall_func0("display_stats")
|
||||
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
||||
#define get_cursor_mode sfall_func0("get_cursor_mode")
|
||||
#define get_flags(obj) sfall_func1("get_flags", obj)
|
||||
|
||||
@@ -309,7 +309,7 @@ Runs when retriving the damage rating of the players used weapon. (Which may be
|
||||
|
||||
int arg1 - The default min damage
|
||||
int arg2 - The default max damage
|
||||
Item arg3 - The weapin used. (0 if unarmed)
|
||||
Item arg3 - The weapon used. (0 if unarmed)
|
||||
Critter arg4 - The critter doing the attacking
|
||||
int arg5 - The type of attack
|
||||
int arg6 - non zero if this is an attack using a melee weapon
|
||||
|
||||
@@ -299,8 +299,8 @@ Some utility/math functions are available:
|
||||
- Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.)
|
||||
|
||||
> int sneak_success
|
||||
- returns 1 if last sneak attempt (roll against skill) was successful, 0 otherwise
|
||||
- this is an internal engine variable wich is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION)
|
||||
- returns 1 if the player is currently sneaking, and last sneak attempt (roll against skill) was successful; 0 otherwise
|
||||
- this calls an internal engine function which is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION)
|
||||
|
||||
> int tile_light(int elevation, int tileNum)
|
||||
- returns light intensity at the given tile in range from 0 to 65535
|
||||
@@ -425,6 +425,10 @@ Some utility/math functions are available:
|
||||
> void sfall_func1("set_cursor_mode", int mode)
|
||||
- sets the current cursor mode
|
||||
|
||||
> void sfall_func0("display_stats")
|
||||
- displays player stats in the inventory screen display window
|
||||
- works only in opened inventory
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
@@ -319,6 +319,7 @@
|
||||
|
||||
0x8248 - object get_last_target(object critter)
|
||||
0x8249 - object get_last_attacker(object critter)
|
||||
0x824a - void block_combat(int enable)
|
||||
|
||||
0x824b - int tile_under_cursor
|
||||
0x824c - int gdialog_get_barter_mod
|
||||
|
||||
@@ -41,6 +41,7 @@ WRAP_WATCOM_FUNC1(Window*, GNW_find, long, winRef)
|
||||
WRAP_WATCOM_FUNC0(long, intface_is_item_right_hand)
|
||||
WRAP_WATCOM_FUNC0(void, intface_toggle_item_state)
|
||||
WRAP_WATCOM_FUNC0(void, intface_use_item)
|
||||
WRAP_WATCOM_FUNC0(long, is_pc_sneak_working)
|
||||
WRAP_WATCOM_FUNC1(long, item_w_max_ammo, GameObject*, item)
|
||||
WRAP_WATCOM_FUNC1(long, item_w_curr_ammo, GameObject*, item)
|
||||
WRAP_WATCOM_FUNC1(long, item_weight, GameObject*, item)
|
||||
|
||||
+31
-18
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "main.h"
|
||||
#include "Logging.h"
|
||||
#include "FalloutEngine\Fallout2.h"
|
||||
#include "Modules\Graphics.h"
|
||||
|
||||
#include "InputFuncs.h"
|
||||
@@ -30,7 +31,7 @@
|
||||
namespace sfall
|
||||
{
|
||||
|
||||
static bool useScrollWheel;
|
||||
bool useScrollWheel = true;
|
||||
static DWORD wheelMod;
|
||||
|
||||
static bool reverseMouse;
|
||||
@@ -131,21 +132,21 @@ void _stdcall TapKey(DWORD key) {
|
||||
|
||||
class FakeDirectInputDevice : public IDirectInputDeviceA {
|
||||
private:
|
||||
IDirectInputDeviceA* RealDevice;
|
||||
DWORD DeviceType;
|
||||
IDirectInputDeviceA* RealDevice;
|
||||
DWORD DeviceType;
|
||||
ULONG Refs;
|
||||
bool formatLock;
|
||||
DIDATAFORMAT oldFormat;
|
||||
|
||||
public:
|
||||
/*** Constructor and misc functions ***/
|
||||
FakeDirectInputDevice(IDirectInputDevice* device,DWORD type) {
|
||||
RealDevice=device;
|
||||
DeviceType=type;
|
||||
Refs=1;
|
||||
/*** Constructor and misc functions ***/
|
||||
FakeDirectInputDevice(IDirectInputDevice* device,DWORD type) {
|
||||
RealDevice = device;
|
||||
DeviceType = type;
|
||||
Refs = 1;
|
||||
formatLock = false;
|
||||
oldFormat.dwDataSize=0;
|
||||
}
|
||||
oldFormat.dwDataSize = 0;
|
||||
}
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
HRESULT _stdcall QueryInterface(REFIID riid, LPVOID * ppvObj) {
|
||||
@@ -220,13 +221,25 @@ public:
|
||||
if (useScrollWheel) {
|
||||
int count = 1;
|
||||
if (MouseState.lZ > 0) {
|
||||
if (wheelMod) count = MouseState.lZ / wheelMod;
|
||||
if (count < 1) count = 1;
|
||||
while (count--) TapKey(DIK_UP);
|
||||
if (fo::var::gmouse_current_cursor == 2 || fo::var::gmouse_current_cursor == 3) {
|
||||
__asm {
|
||||
call fo::funcoffs::display_scroll_up_;
|
||||
}
|
||||
} else {
|
||||
if (wheelMod) count = MouseState.lZ / wheelMod;
|
||||
if (count < 1) count = 1;
|
||||
while (count--) TapKey(DIK_UP);
|
||||
}
|
||||
} else if (MouseState.lZ < 0) {
|
||||
if (wheelMod) count = (-MouseState.lZ) / wheelMod;
|
||||
if (count < 1) count = 1;
|
||||
while (count--) TapKey(DIK_DOWN);
|
||||
if (fo::var::gmouse_current_cursor == 2 || fo::var::gmouse_current_cursor == 3) {
|
||||
__asm {
|
||||
call fo::funcoffs::display_scroll_down_;
|
||||
}
|
||||
} else {
|
||||
if (wheelMod) count = (-MouseState.lZ) / wheelMod;
|
||||
if (count < 1) count = 1;
|
||||
while (count--) TapKey(DIK_DOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (middleMouseKey&&MouseState.rgbButtons[2]) {
|
||||
@@ -323,7 +336,7 @@ public:
|
||||
RealInput = Real; Refs = 1;
|
||||
}
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
/*** IUnknown methods ***/
|
||||
HRESULT _stdcall QueryInterface(REFIID riid, LPVOID* ppvObj) {
|
||||
return RealInput->QueryInterface(riid, ppvObj);
|
||||
}
|
||||
@@ -347,7 +360,7 @@ public:
|
||||
GUID GUID_SysMouse = { 0x6F1D2B60, 0xD5A0, 0x11CF, { 0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00} };
|
||||
GUID GUID_SysKeyboard = { 0x6F1D2B61, 0xD5A0, 0x11CF, { 0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00} };
|
||||
|
||||
if (r != GUID_SysKeyboard&&r != GUID_SysMouse) {
|
||||
if (r != GUID_SysKeyboard && r != GUID_SysMouse) {
|
||||
return RealInput->CreateDevice(r, device, unused);
|
||||
} else {
|
||||
DWORD d;
|
||||
|
||||
+8
-1
@@ -25,6 +25,8 @@
|
||||
namespace sfall
|
||||
{
|
||||
|
||||
extern bool useScrollWheel;
|
||||
|
||||
void SetMDown(bool down, bool right);
|
||||
void SetMPos(int x, int y);
|
||||
|
||||
@@ -135,7 +137,7 @@ void GetMouse(int* x, int* y);
|
||||
#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
|
||||
#define DIK_YEN 0x7D /* (Japanese keyboard) */
|
||||
#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
|
||||
//#define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
|
||||
#define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
|
||||
#define DIK_AT 0x91 /* (NEC PC98) */
|
||||
#define DIK_COLON 0x92 /* (NEC PC98) */
|
||||
#define DIK_UNDERLINE 0x93 /* (NEC PC98) */
|
||||
@@ -182,6 +184,11 @@ void GetMouse(int* x, int* y);
|
||||
#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
|
||||
#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
|
||||
|
||||
/*
|
||||
* Alternate names for keys originally not used on US keyboards.
|
||||
*/
|
||||
#define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */
|
||||
|
||||
void _stdcall ForceGraphicsRefresh(DWORD);
|
||||
|
||||
}
|
||||
|
||||
@@ -1389,6 +1389,9 @@ void BugFixes::init()
|
||||
|
||||
// Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt
|
||||
MakeJump(0x495FF6, partyMemberGetCurLevel_hack);
|
||||
|
||||
// Fix for add_mult_objs_to_inven only adding 500 of an object when the value of "count" argument is over 99999
|
||||
SafeWrite32(0x45A2A0, 0x1869F); // 99999
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ static const char* ExtraLines[] = {
|
||||
"#SFALL " VERSION_STRING,
|
||||
"",
|
||||
"sfall is free software, licensed under the GPL",
|
||||
"Copyright 2008-2017 The sfall team",
|
||||
"Copyright 2008-2018 The sfall team",
|
||||
"",
|
||||
"@Author",
|
||||
"Timeslip",
|
||||
|
||||
@@ -915,8 +915,8 @@ public:
|
||||
};
|
||||
|
||||
HRESULT _stdcall FakeDirectDrawCreate2_graphics(void*, IDirectDraw** b, void*) {
|
||||
ResWidth = *(DWORD*)0x004CAD6B;
|
||||
ResHeight = *(DWORD*)0x004CAD66;
|
||||
ResWidth = *(DWORD*)0x4CAD6B;
|
||||
ResHeight = *(DWORD*)0x4CAD66;
|
||||
|
||||
if (!d3d9) {
|
||||
d3d9 = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
@@ -995,14 +995,14 @@ void Graphics::init() {
|
||||
} else {
|
||||
FreeLibrary(h);
|
||||
}
|
||||
SafeWrite8(0x0050FB6B, '2');
|
||||
SafeWrite8(0x50FB6B, '2');
|
||||
dlogr(" Done", DL_INIT);
|
||||
#undef _DLL_NAME
|
||||
}
|
||||
fadeMulti = GetConfigInt("Graphics", "FadeMultiplier", 100);
|
||||
if (fadeMulti != 100) {
|
||||
dlog("Applying fade patch.", DL_INIT);
|
||||
SafeWrite32(0x00493B17, ((DWORD)&FadeHook) - 0x00493B1b);
|
||||
HookCall(0x493B16, &FadeHook);
|
||||
fadeMulti = ((double)fadeMulti) / 100.0;
|
||||
dlogr(" Done", DL_INIT);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user