Compare commits

...
47 Commits
Author SHA1 Message Date
NovaRain 9a4f0c7505 Merge branch 'develop' 2020-05-11 09:35:28 +08:00
NovaRain c89a18522d Fixed ai_move_away_ engine function
Some minor fixes.
2020-05-10 09:56:11 +08:00
NovaRain c7ccb7f2c2 Edited the msg for SkipLoadingGameSettings a bit
Added a few more defines.
2020-05-08 10:44:37 +08:00
NovaRain b25ca683f3 Cosmetic changes to the code:
Use double underscore for stdcall and "asm" keyword.
2020-05-07 12:27:53 +08:00
NovaRain e28b3a5796 Minor code edits to Combat.cpp
Added some function defines.
2020-05-07 12:13:28 +08:00
NovaRain a9c74501df Added checking AP cost to ai_pick_hit_mode_ engine function 2020-05-07 09:47:57 +08:00
NovaRain b03b93d6fc Added a tweak for finding new targets for PMs
* before they would "forget" their current target when trying to find
new ones (only 3), now the current target is included as one of
potential targets.

Tweaked the code of MultiHexPathingFix.
2020-05-05 12:13:11 +08:00
NovaRain 1f696b9f12 Added internal implementation of engine functions with hooks:
* item_w_mp_cost_ with CALCAPCOST
* is_within_perception_ with WITHINPERCEPTION
2020-05-01 10:27:05 +08:00
NovaRain 3d2d1cdf2a Added combat rating check to "Snipe" distance preference fix 2020-05-01 08:00:49 +08:00
NovaRain 42347ac062 Added a fix to reduce friendly fire in burst attacks (experimental) 2020-04-30 16:01:57 +08:00
NovaRain 007b415740 Changed the priority of files in AutoSearchPath
* now they have higher priority than the PatchFileXX options.

Minor code edits/fixes.
2020-04-30 10:13:44 +08:00
NovaRain 35d2491bcb Added a fix for AI behavior for "Snipe" distance preference
Added a check for for the weapon range and the distance to the target
when AI is choosing weapon attack modes.
2020-04-28 10:55:56 +08:00
NovaRain ece76ee726 Changed the fix for AI target selection in commit f731de7
* NPCs will reload the weapon in the same turn (and attack if have
enough AP left) if weapon is empty while selecting targets.

Misc code edits.
2020-04-27 14:25:40 +08:00
NovaRain d6f4a23527 Fixed AllowDShowSound=2 not working
Limited NumSoundBuffers to the max of 32.
Fixed replacing Body_Torso with Body_Uncalled (from commit 7e31713)
Corrected the code in the previous commit.
2020-04-23 12:33:00 +08:00
NovaRain 045ad2f5d7 Added a tweak to the miss message in combat
* if the main target has Flat flag set, remove the message about hitting
another object.

Minor code edits to DebugEditor.cpp & MiscPatches.cpp.
2020-04-22 11:32:03 +08:00
NovaRain 13703f1a3b Improved the fix for placing PID_CORPSE_BLOOD obj on the lower layer
(didn't work correctly after re-entering the map.)

Fixed CorpseDeleteTime not setting the timer correctly.
2020-04-21 10:54:35 +08:00
NovaRain 58bb77d79f Fixed GvarID option behavior in Drugs.ini
Reverted incorrect code change of SpeedPatch.cpp in previous commit.
Some code edits to Explosions.cpp and Perks.cpp.
2020-04-19 09:58:47 +08:00
NovaRain 229371e4ab Added use_item_on_dude macro to sfall.h
Various code edits:
* Implemented more HookCalls/MakeCalls/SafeWriteBatch in code.
* Moved return/jump address consts into their respective functions.
* Changed for-loop with iterators to use pre-increment.
2020-04-18 21:19:22 +08:00
NovaRain 1884e279c7 Fixed ReloadWeaponKey for using any non-weapon item (#84) 2020-04-18 10:44:17 +08:00
NovaRain e81d79e43e Fixed "loot_obj" script function 2020-04-18 08:57:02 +08:00
NovaRain f731de7a25 Fixed AI target selection for no ammo or target out of range cases 2020-04-18 08:33:08 +08:00
NovaRain 0d6bc33279 Re-fixed automatically ending combat
Updated version number.
2020-04-18 07:28:00 +08:00
NovaRain 3377516f67 Merge branch 'develop' 2020-04-05 22:14:57 +08:00
NovaRain 359c79a854 Fixed NPCs not fully reloading a weapon sometimes
* NPCs use only one box per reload. If the weapon has more ammo
capacity than a box of ammo (e.g. miniguns and BB gun), it'll take
several tries for them to fully reload it.
2020-04-05 08:19:31 +08:00
NovaRain 41652ec459 Moved static addresses into respective funcs in BugFixes & MiscPatches 2020-04-03 23:14:23 +08:00
NovaRain ca4e506f1d Some code correction in BugFixes
Minor edits to documents.
2020-04-03 12:16:09 +08:00
NovaRain 6e05ca65fd Some code/document edits 2020-04-02 11:32:22 +08:00
NovaRain 873d9f81c2 Edited the description of RadEffectsRemovalMsg option 2020-04-01 22:09:46 +08:00
NovaRain 0978769dfc Fixed loading savegame for "NPC turns into a container" bug fix
Added RadEffectsRemovalMsg option for radiation fixes.

Some code/document correction.
2020-03-31 21:51:41 +08:00
NovaRain 29608bb51c Added ActiveGeigerMsgs option and radiation fixes
Changed "Radiated" to be highlighted in red color when the player is
under the influence of negative effects of radiation.
2020-03-30 21:06:11 +08:00
NovaRain ba911375a9 Fixed a crash when using older versions of HRP
Fixed potential crash/bug when alt-tab out of game and get back.
Edited OnDeath hook code to minimize its hook points to the engine.
Minor edits to ddraw.ini.
2020-03-26 14:06:46 +08:00
NovaRain ce5c65d37f Fixed stuttering when playing avi movies
Fixed a crash when playing mve movies without the hi-res patch.

Minor edits to ddraw.ini and function notes.txt.
2020-03-24 10:53:00 +08:00
NovaRain ffd397d9aa Added performance patches, some code moved to MiscPathes module
Minor edits to ddraw.ini.
2020-03-22 09:00:25 +08:00
NovaRain 349cffac0c Added a new "fullscreen windowed" DX9 mode
Added saving the position of the game window to ddraw.ini
2020-03-20 12:24:48 +08:00
NovaRain dfdcd86134 Refactored ASM code of script opcode handlers
Included call_offset_xx functions for AllowUnsafeScripting=2 (#288)
2020-03-19 12:55:01 +08:00
NovaRain accdeae6ad Added a new value to AllowUnsafeScripting
* for disabling the memory address check in unsafe functions (#288)
2020-03-17 13:26:02 +08:00
NovaRain 288a8fedfd Improved and fixed the playback of alternative sound files
Added a new mode to play_sfall_sound script function.

Minor code corrections.
2020-03-17 13:06:34 +08:00
NovaRain eb777e6d19 Fixed the return value of play_sfall_sound function
* before it returned a raw pointer instead of the ID number of the
played sound.
2020-03-12 11:53:45 +08:00
NovaRain dd2469b78f Moved allowDShowSound code from Movies to Sound module 2020-03-12 10:03:43 +08:00
NovaRain 8d375dd81a Refactored ASM code of script handlers in Misc.cpp
Minor code edits.
2020-03-07 14:21:12 +08:00
NovaRain 7f087d1c30 Minor code edits to AI module 2020-02-29 18:58:38 +08:00
NovaRain e7e5da866a Added a new value to the 'mark_state' arg of mark_area_known function
* 3 - uncovers locations without highlighting their sub-tiles.
(Fallout 1 behavior)
2020-02-29 08:36:30 +08:00
NovaRain ac0b0ef7ef Fixed Fill_W not uncovering all tiles to the left (#287) 2020-02-28 07:41:49 +08:00
NovaRain c2626de4fa Fixed a crash or animation glitch of the critter in combat (beta fix)
* when an explosion from explosives and the AI attack animation are
performed simultaneously.
2020-02-25 11:38:03 +08:00
NovaRain e4d395224a Minor code fix for Graphics.cpp
Added notes/correction to hookscripts.txt.
2020-02-22 15:49:13 +08:00
NovaRain 4487bbfeba Fixed the player's money not being displayed after barter (#286)
Restored TownMapHotkeysFix option.

Updated version number.
2020-02-22 15:31:17 +08:00
NovaRain e5eb5cc275 Minor code improvement in Graphics.cpp 2020-02-09 09:23:50 +08:00
120 changed files with 3081 additions and 2889 deletions
+9 -2
View File
@@ -13,18 +13,25 @@ Count=0
[1]
; drug item PID
PID=0
; set a limit on the count of first and second delayed effects when using the drug, i.e. if the queue has delayed effects from the drug,
; and their count is greater or equal to NumEffects, it is not possible to obtain new effects from using the drug
; this count is 4 for Buffout/Mentats/Psycho/Jet
; e.g. this count is 4 for Buffout/Mentats/Psycho/Jet
; set -1 to leave this parameter unchanged
NumEffects=-1
; the duration of the addiction effect in game minutes (i.e. 1440 = 24 game hours)
; set to 0 to use the default time (7 days for all drugs except Jet)
; set to 0 to use the default time of 7 days (as all drugs except Jet)
AddictTime=0
; the number of the global variable from vault13.gam responsible for displaying addiction in the character screen
; if you set GvarID with numbers: 21-26, 295, 296, or variable numbers that have already been declared in previous sections,
; the TextID and FrmID options in this section will be ignored
; set to 0 if the addiction is not required
GvarID=0
; the index number from editor.msg to display the title of the addiction (the description uses the index number of TextID + 100)
TextID=-1
; the line number (0-indexed) of the corresponding FRM in skilldex.lst
FrmID=-1
+63 -47
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.2.3
;v4.2.5
[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
@@ -18,30 +18,12 @@ UseCommandLine=0
;The greater numbers take precedence over lesser numbers
;PatchFile0=mods\RP_data
;Path to the folder in which the game will automatically search and load custom .dat files
;The data load order of the .dat files in the folder will be in reverse alphabetical order of the filenames
;The .dat files specified in the PatchFileXX options will have higher priority than others
;Path to the folder in which the game will automatically search and load custom files (by *.dat mask, including folders)
;The data load order of the files in the folder will be in reverse alphabetical order of the filenames
;The files placed in this folder will have higher priority than the PatchFileXX options
;Uncomment the option to specify a different folder path. The default path is <GameRoot>\mods\
;AutoSearchPath=mods
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Sound]
;Sets the number of allowed simultaneous sound effects
;Set to 0 to leave the default unchanged (i.e. 4)
NumSoundBuffers=0
;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
;This does not effect the play_sfall_sound and stop_sfall_sound script functions
AllowDShowSound=0
;Set to 1 to override the music path used by default (i.e. data\sound\music\) if not present in the cfg
;Set to 2 to overwrite all occurances of the music path
OverrideMusicDir=2
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Speed]
;Set to 0 to disable everything in this section
@@ -70,6 +52,7 @@ AffectPlayback=0
;Set to 0 for 8 bit fullscreen
;Set to 4 for DX9 fullscreen
;Set to 5 for DX9 windowed
;Set to 6 for DX9 fullscreen windowed (the resolution in f2_res.ini should be set to the same aspect ratio as your desktop resolution)
;A DX9 mode is required for any graphics related script extender functions to work (i.e. fullscreen shaders)
;Modes 1, 2 and 3 are no longer supported
Mode=0
@@ -80,7 +63,11 @@ Mode=0
GraphicsWidth=0
GraphicsHeight=0
;Uncomment the option to use a hardware shader (requires DX9 graphics mode 4 or 5)
;Window position data. Do not modify
;Set to 0 to reset if the window position is incorrect
WindowData=0
;Uncomment the option to use a hardware shader (requires DX9 graphics mode)
;The shader file <name>.fx must be placed in <GameRoot>\<master_patches>\shaders\ and must contain one technique with one or more passes
;GlobalShaderFile=global.fx
@@ -98,7 +85,7 @@ GPUBlt=0
Use32BitHeadGraphics=0
;Set to 1 to automatically search for alternative avi video files when Fallout tries to play the game movies
;Requires DX9 graphics mode 4 or 5
;Requires DX9 graphics mode
AllowDShowMovies=0
;Fade effect time percentage modifier
@@ -131,6 +118,24 @@ WorldMapTravelMarkers=0
;Set to 1 to display terrain types when hovering the cursor over the player's marker on the world map
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 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
;This does not effect the play_sfall_sound and stop_sfall_sound script functions
AllowDShowSound=0
;Set to 1 to override the music path used by default (i.e. data\sound\music\) if not present in the cfg
;Set to 2 to overwrite all occurances of the music path
OverrideMusicDir=1
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Input]
;Set to 1 to enable the mouse scroll wheel to scroll through the inventory, barter, and loot screens
@@ -183,12 +188,12 @@ SpeedKey7=0x00
SpeedKey8=0x00
SpeedKey9=0x00
;A key to hold down to move the window around when using graphics mode 5
;A key to hold down to move the window around when using DX9 graphics mode 5
;Set to 0 if you don't want to use a modifier key, or a DX scancode otherwise
;Set to -1 for either ctrl key, -2 for either alt key or -3 for either shift key
WindowScrollKey=0
;A key to press to reload your currently equipped weapon
;A key to press to reload your currently equipped weapon or use the active item
;Set to 0 if you don't want a reload key, or a DX scancode otherwise
ReloadWeaponKey=0
@@ -332,6 +337,9 @@ DamageFormula=0
;Prevents you from using 0 to escape from dialogue at any time.
DialogueFix=1
;Prevents you from using number keys to enter unvisited areas on a town map
TownMapHotkeysFix=1
;Set to 1 to disable the horrigan encounter
DisableHorrigan=0
@@ -353,7 +361,7 @@ SingleCore=1
OverrideArtCacheSize=0
;Prevents you from saving in combat except at the start of your turn to avoid a few bugs
;Note that even with this option enabled, it is still not advisable to save in combat at all.
;Note that even with this option enabled, it is still not advisable to save in combat at all (obsolete information)
;Set to 2 to block all saving in combat
SaveInCombatFix=1
@@ -403,7 +411,7 @@ CorpseDeleteTime=6
;Set a number of milliseconds to idle each input loop
;Set to -1 to disable
;Set to 0 to idle only if other processes are waiting for processor time (WinXP/2000: if processes have equal priority)
;Set to 1 (or some higher number if needed, the maximum is 127) to prevent 100% CPU use
;Set to 1 (or some higher number if needed) to prevent 100% CPU use. The maximum is 127
ProcessorIdle=-1
;Set to 1 if using the hero appearance mod
@@ -537,7 +545,7 @@ BoostScriptDialogLimit=0
;Set the mode to 0 to disable the size check, 1 to apply to the PC only, 2 to apply to the PC and party members, or 3 to apply to all critters
;Only the PC uses CritterInvSizeLimit. Other critters will use the unused stat (STAT_unused = 10) or have the size limit of 100 if the stat is not set
;Add 4 to the mode to limit the weight check to used items only
;You can use line number 542/543 in proto.msg and line 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
CritterInvSizeLimit=100
@@ -654,6 +662,13 @@ DontTurnOffSneakIfYouRun=0
;Set to 0 to disable switching. (Default is 3)
UseWalkDistance=3
;Changes the displayed message when you recover from the negative effects of radiation exposure
;The value is the message number in misc.msg (Default is 3003: 'You feel better')
RadEffectsRemovalMsg=3003
;Set to 1 to display messages about radiation for the active geiger counter
ActiveGeigerMsgs=1
;Set to 1 to fix the bug of being unable to sell used geiger counters or stealth boys
CanSellUsedGeiger=1
@@ -700,7 +715,7 @@ PartyMemberExtraInfo=0
;that overrides First Aid/Doctor functions has very limited usefulness
PartyMemberSkillFix=0
;Set to 1 to skip loading all game settings except the game/combat difficulty from a saved game
;Set to 1 to skip loading all game settings except the game/combat difficulty from saved games
;Set to 2 to also skip loading the game/combat difficulty settings
SkipLoadingGameSettings=0
@@ -772,10 +787,27 @@ GlobalScriptPaths=scripts\gl*.int,scripts\sfall\gl*.int
;Set to 1 to enable sfall debugging mode
Enable=0
;Set to 1 to give scripts direct access to Fallout's address space, and to make arbitrary calls into Fallout's code
;Set to 2 to also disable the memory address check in unsafe script functions
;Does not require sfall debugging mode
AllowUnsafeScripting=0
;If you're testing changes to the Fallout exe, you can override the CRC that sfall looks for here
;You can use several hex values, separated by commas
;Does not require sfall debugging mode
;ExtraCRC=0x00000000,0x00000000
;Set to 1 to skip the executable file size check
;Does not require sfall debugging mode
SkipSizeCheck=0
;Change to 1 to skip the compatibility mode check
SkipCompatModeCheck=0
;Fallout 2 Debug Patch
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both the screen and debug.log
;Does not require sfall debugging mode
;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg:
;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg
;-------
;[debug]
;mode=environment
@@ -792,26 +824,10 @@ DebugMode=0
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
HideObjIsNullMsg=0
;Change to 1 to skip the compatibility mode check
SkipCompatModeCheck=0
;Set to 1 to skip the executable file size check
;Does not require sfall debugging mode
SkipSizeCheck=0
;If you're testing changes to the Fallout exe, you can override the CRC that sfall looks for here
;You can use several hex values, separated by commas
;Does not require sfall debugging mode
;ExtraCRC=0x00000000,0x00000000
;Set to 1 to stop Fallout from deleting non read-only protos at startup
;Has pretty nasty side effects when saving/reloading, so don't use for regular gameplay
DontDeleteProtos=0
;Set to 1 to give scripts direct access to Fallout's address space, and to make arbitrary calls into Fallout's code
;Does not require sfall debugging mode
AllowUnsafeScripting=0
;Set to 1 to force sfall to inject all hooks code into the game, even if corresponding hook scripts don't exist
InjectAllGameHooks=0
+1 -1
View File
@@ -155,7 +155,7 @@ Example:
- creates permanent array (but not "saved")
- if size is >= 0, creates list with given size
- if size == -1, creates map (associative array)
- if size == -1 and flags == 2, creates a "lookup" map in which the values of existing keys are read-only and can't be updated.
- if size == -1 and flags == 2, creates a "lookup" map (associative array) in which the values of existing keys are read-only and can't be updated.
This type of array allows you to store a zero (0) key value
- NOTE: in earlier versions (up to 4.1.3/3.8.13) the second argument is not used, just use 0
- returns arrayID (valid until array is deleted)
+6
View File
@@ -266,6 +266,12 @@
#define ADD_PERK_MODE_PERK (2) // add to the player's perks
#define ADD_PERK_MODE_REMOVE (4) // remove from the list of selectable perks (after added to the player)
// instantly apply the item to dude_obj (w/o animation)
#define use_item_on_dude(item) set_self(dude_obj); \
set_self(dude_obj); \
use_obj_on_obj(item, dude_obj); \
set_self(0)
// sfall_funcX macros
#define add_extra_msg_file(name) sfall_func1("add_extra_msg_file", name)
#define add_global_timer_event(time, fixedParam) sfall_func2("add_g_timer_event", time, fixedParam)
+4 -1
View File
@@ -126,11 +126,13 @@ int ret1 - The new AP cost
HOOK_DEATHANIM1 (hs_deathanim1.int)
Runs before Fallout tries to calculate the death animation. Lets you switch out which weapon Fallout sees
Does not run for critters in the knockdown/out state.
int arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
critter arg2 - The attacker
critter arg3 - The target
int arg4 - The amount of damage
int arg5 - Unused, always -1. Use this if you are using the same procedure for HOOK_DEATHANIM1 and HOOK_DEATHANIM2 (since sfall 4.1/3.8.24)
int ret1 - The pid of an object to override the attacking weapon with
@@ -139,7 +141,8 @@ int ret1 - The pid of an object to override the attacking weapon with
HOOK_DEATHANIM2 (hs_deathanim2.int)
Runs after Fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than hs_deathanim1, but performs no validation.
When using critter_dmg function, this script will also run. In that case weapon pid will be -1 and target will point to an object with obj_art_fid == 0x20001F5.
When using critter_dmg function, this script will also run. In that case weapon pid will be -1 and attacker will point to an object with obj_art_fid == 0x20001F5.
Does not run for critters in the knockdown/out state.
item arg1 - The pid of the weapon performing the attack. (May be -1 if the attack is unarmed)
critter arg2 - The attacker
+4 -4
View File
@@ -36,7 +36,7 @@ The mapper manual lists the functions 'world_map_x_pos' and 'world_map_y_pos', w
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.
get/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.) Using set_critter_current_ap on the player will not automatically redraw the screen, so the ap bar will be incorrect until the player next clicks.
get/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.
@@ -50,7 +50,7 @@ has_fake_trait and has_fake_perk return the number of levels the player has of t
perk_add_mode, set_selectable_perk, set_perkbox_title, hide_real_perks, show_real_perks and clear_selectable_perks control the behaviour of the select a perk box. set_selectable_perk can be used to add additional items by setting the 'active' parameter to 1, and to remove them again by setting it to 0. set_perkbox_title can be used to change the title of the box, or by using "" it will be set back to the default. hide and show_real_perks can be used to prevent the dialog from displaying any of the original 119 perks. perk_add_mode modifies what happens when a fake perk is selected from the perks dialog. It is treated as a set of flags - if bit 1 is set then it is added to the player's traits, if bit 2 is set it is added to the player's perks, and if bit 3 is set it is removed from the list of selectable perks. The default is 0x2. clear_selectable_perks restores the dialog to its default state.
show_iface_tag, hide_iface_tag and is_iface_tag_active relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 3 for LEVEL and 4 for ADDICT, or the range from 5 to (4 + the value of BoxBarCount in ddraw.ini) for custom boxes. Remember to add your messages to intrface.msg and set up the font colours in ddraw.ini if you're going to use custom boxes. Starting from sfall 4.1, is_iface_tag_active can also be used to check 0 for SNEAK, 1 for POISONED, and 2 for RADIATED.
show_iface_tag, hide_iface_tag and is_iface_tag_active relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 3 for LEVEL and 4 for ADDICT, or the range from 5 to (4 + the value of BoxBarCount in ddraw.ini) for custom boxes. Remember to add your messages to intrface.msg and set up the font colours in ddraw.ini if you're going to use custom boxes. Starting from sfall 4.1/3.8.12, is_iface_tag_active can also be used to check 0 for SNEAK, 1 for POISONED, and 2 for RADIATED.
get/set_bodypart_hit_modifier alter the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id's are from 0 to 8. Changes are not saved, and will reset to the defaults (or to the values specified in ddraw.ini if they exist) at each reload.
@@ -66,7 +66,7 @@ get/set_proto_data are used to manipulate the in memory copies of the .pro files
the list_xxx functions can be used to loop over all items on a map. list_begin takes an argument telling sfall what you want to list. (Defined in sfall.h) It returns a list pointer, which you iterate through with list_next. Finally, when you've finished with the list use list_end on it. Not calling list_end will result in a memory leak. Alternatively, use list_as_array to get the whole list at once as a temp array variable, which can be looped over using len_array and which you don't need to remember to free afterwards.
play_sfall_sound and stop_sfall_sound are used to play mp3/wav/wma files. The path given is relative to the Fallout folder. Specify loop as 1 to loop the file continuously, or 0 otherwise. If you don't wish to loop, play_sfall_sound returns 0. If you do loop, it returns an id which can be passed back to stop_sfall_sound when you want to stop the effect. All sounds effects will be stopped on game reload, looping or not. These functions do not require 'AllowDShowSound' to be set to 1 in ddraw.ini.
play_sfall_sound and stop_sfall_sound are used to play mp3/wav/wma files. The path given is relative to the Fallout folder. Specify mode as 1 to loop the file continuously, 2 to replace the current background game music with playing the specified file in loop mode, or 0 to play the file once. If you don't wish to loop, play_sfall_sound returns 0. If you do loop, it returns an id which can be passed back to stop_sfall_sound when you want to stop the effect. All sounds effects will be stopped on game reload, looping or not. These functions do not require 'AllowDShowSound' to be set to 1 in ddraw.ini.
arrays are created and manipulated with the xxx_array functions. An array must first be created with create_array or temp_array, specifying how many data elements the array can hold. You can store any of ints, floats and strings in an array, and can mix all 3 in a single array. The id returned by create/temp_array can then be used with the other array functions. Arrays are shared between all scripts. (i.e. you can call create_array from one script, and then use the returned id from another script.) They are also saved across savegames. You must remember to free any arrays you create with create_array when you are done with them, or you will leak memory. arrays created with temp_array will be automatically freed at the end of the frame. These functions are safe, in that supplying a bad id or trying to access out of range elements will not crash the script. create_array is the only function that returns a permanent array, all other functions which return arrays (string_split, list_as_array etc,) all return temp arrays. You can use fix_array to make a temp array permanent.
@@ -564,7 +564,7 @@ Some utility/math functions are available:
> int sfall_func2("get_can_rest_on_map", int mapNum, int elev)
- returns the set rest value of the map after using the set_can_rest_on_map function
- returns -1 if the rest value of the map was not previously set (i.e. no data for the map in sfalldb.sav)
- the can_rest_here values in maps.txt are ignored
- the can_rest_here values from maps.txt are ignored
> object sfall_func0("dialog_obj")
- returns a pointer to the object (critter) the player is having a conversation or bartering with
+2 -2
View File
@@ -296,8 +296,8 @@
0x8228 - int get_attack_type
0x822b - int play_sfall_sound(string file, int loop)
0x822c - void stop_sfall_sound(int ptr)
0x822b - int play_sfall_sound(string file, int mode)
0x822c - void stop_sfall_sound(int soundID)
0x8235 - array string_split(string string, string split)
0x8237 - int atoi(string string)
-1
View File
@@ -10,7 +10,6 @@ namespace sfall
std::multimap<long, long> writeAddress;
static std::vector<long> excludeAddr = {
0x42A14F, 0x42A178,
0x44E949, 0x44E94A, 0x44E937, 0x4F5F40, 0x4CB850, // from movies.cpp
};
+71
View File
@@ -0,0 +1,71 @@
/*
* sfall
* Copyright (C) 2008-2020 The sfall team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*
MACROS for operators assembly code
Notes:
- DO NOT add any comments within macros
- every macro should contain __asm {} block
- every assembly line should start with __asm and should NOT have semicolon in the end!
- use this macros outside of other __asm {} blocks (obviously)
*/
/*
Gets argument from stack to eax and puts its type to edx register
eax register must contain the script_ptr
jlabel - name of the jump label in case the value type is not INT
return: eax - arg value
*/
#define _GET_ARG_INT(jlabel) __asm { \
__asm mov edx, eax \
__asm call fo::funcoffs::interpretPopShort_ \
__asm xchg eax, edx \
__asm call fo::funcoffs::interpretPopLong_ \
__asm cmp dx, VAR_TYPE_INT \
__asm jnz jlabel \
}
#define _GET_ARG(outVal, outType) __asm { \
__asm call fo::funcoffs::interpretPopShort_ \
__asm mov outType, eax \
__asm mov eax, ebx \
__asm call fo::funcoffs::interpretPopLong_ \
__asm mov outVal, eax \
}
/*
Returns the value to the script
eax and ebx register must contain the script_ptr
edx register must contain the returned value
*/
#define _RET_VAL_INT __asm { \
__asm call fo::funcoffs::interpretPushLong_ \
__asm mov edx, VAR_TYPE_INT \
__asm mov eax, ebx \
__asm call fo::funcoffs::interpretPushShort_ \
}
#define _J_RET_VAL_TYPE(type) __asm { \
__asm call fo::funcoffs::interpretPushLong_ \
__asm mov edx, type \
__asm mov eax, ebx \
__asm jmp fo::funcoffs::interpretPushShort_ \
}
+13 -3
View File
@@ -144,6 +144,16 @@ long CheckAddictByPid(fo::GameObject* critter, long pid) {
/* keyword 'return' is not needed, the compiler will do everything correctly */
}
// Checks whether the player is under the influence of negative effects of radiation
long __fastcall IsRadInfluence() {
fo::QueueRadiation* queue = (fo::QueueRadiation*)fo::func::queue_find_first(fo::var::obj_dude, fo::radiation_event);
while (queue) {
if (queue->init && queue->level >= 2) return 1;
queue = (fo::QueueRadiation*)fo::func::queue_find_next(fo::var::obj_dude, fo::radiation_event);
}
return 0;
}
void ToggleNpcFlag(fo::GameObject* npc, long flag, bool set) {
Proto* protoPtr;
if (fo::func::proto_ptr(npc->protoId, &protoPtr) != -1) {
@@ -241,7 +251,7 @@ fo::Window* GetWindow(long winType) {
}
// Returns an array of objects within the specified radius from the source tile
void GetObjectsTileRadius(std::vector<fo::GameObject*> &objs, long sourceTile, long radius, long elev, long type = -1) {
void GetObjectsTileRadius(std::vector<fo::GameObject*> &objs, long sourceTile, long radius, long elev, long type) {
for (long tile = 0; tile < 40000; tile++) {
fo::GameObject* obj = fo::func::obj_find_first_at_tile(elev, tile);
while (obj) {
@@ -299,7 +309,7 @@ void DrawToSurface(long toX, long toY, long width, long height, long toWidth, lo
// safe copy data from surface to surface with mask
void DrawToSurface(long width, long height, long fromX, long fromY, long fromWidth, BYTE* fromSurf,
long toX, long toY, long toWidth, long toHeight, BYTE* toSurf, int maskRef)
long toX, long toY, long toWidth, long toHeight, BYTE* toSurf, int maskRef)
{
BYTE* _fromSurf = fromSurf + (fromY * fromWidth + fromX);
BYTE* _toSurf = toSurf + (toY * toWidth + toX);
@@ -317,7 +327,7 @@ void DrawToSurface(long width, long height, long fromX, long fromY, long fromWid
// safe copy data from surface to surface
void DrawToSurface(long width, long height, long fromX, long fromY, long fromWidth, BYTE* fromSurf,
long toX, long toY, long toWidth, long toHeight, BYTE* toSurf)
long toX, long toY, long toWidth, long toHeight, BYTE* toSurf)
{
BYTE* _fromSurf = fromSurf + (fromY * fromWidth + fromX);
BYTE* _toSurf = toSurf + (toY * toWidth + toX);
+5 -1
View File
@@ -18,6 +18,7 @@
#pragma once
#include <string>
#include <vector>
#include "Functions.h"
@@ -66,6 +67,9 @@ bool HeroIsFemale();
long CheckAddictByPid(fo::GameObject* critter, long pid);
// Checks whether the player is under the influence of negative effects of radiation
long __fastcall IsRadInfluence();
void ToggleNpcFlag(fo::GameObject* npc, long flag, bool set);
// Returns the number of party members in the existing table (begins from 1)
@@ -80,7 +84,7 @@ long __fastcall GetTopWindowID(long xPos, long yPos);
fo::Window* GetWindow(long winType);
void GetObjectsTileRadius(std::vector<fo::GameObject*> &objs, long sourceTile, long radius, long elev, long type);
void GetObjectsTileRadius(std::vector<fo::GameObject*> &objs, long sourceTile, long radius, long elev, long type = -1);
long wmGetCurrentTerrainType();
+19 -7
View File
@@ -90,6 +90,15 @@ enum Animation : long
ANIM_called_shot_pic = 64,
};
enum AnimCommand : long
{
RB_UNRESERVED = 0x1,
RB_RESERVED = 0x2,
RB_DONTSTAND = 0x4,
RB_UNKNOWN = 0x100,
RB_END_ANIM = 0x200
};
enum CritterFlags : long
{
Sneak = 0x01, // Can sneak ?
@@ -244,7 +253,7 @@ enum ArtType : char
// Some FO2 PIDs possibly used by engine
enum ProtoId : long
{
PID_ROCK = 19,
// PID_ROCK = 19,
PID_SMALL_ENERGY_CELL = 38,
PID_MICRO_FUSION_CELL = 39,
PID_STIMPAK = 40,
@@ -256,8 +265,8 @@ enum ProtoId : long
PID_GEIGER_COUNTER = 52,
PID_MENTATS = 53,
PID_STEALTH_BOY = 54,
PID_WATER_CHIP = 55,
PID_HOLODISK = 58,
// PID_WATER_CHIP = 55,
// PID_HOLODISK = 58,
PID_MOTION_SENSOR = 59,
PID_MUTATED_FRUIT = 71,
PID_BIG_BOOK_OF_SCIENCE = 73,
@@ -268,7 +277,7 @@ enum ProtoId : long
PID_SCOUT_HANDBOOK = 86,
PID_BUFFOUT = 87,
PID_DOCTORS_BAG = 91,
PID_PUMP_PARTS = 98,
// PID_PUMP_PARTS = 98,
PID_GUNS_AND_BULLETS = 102,
PID_NUKA_COLA = 106,
PID_RAD_X = 109,
@@ -287,7 +296,8 @@ enum ProtoId : long
PID_JET = 259,
PID_JET_ANTIDOTE = 260,
PID_DECK_OF_TRAGIC_CARDS = 306,
PID_GECK = 366,
// PID_GECK = 366,
PID_SOLAR_SCORCHER = 390,
PID_CAR_TRUNK = 455,
PID_JESSE_CONTAINER = 467,
@@ -559,7 +569,7 @@ namespace Scripts {
}
#define STAT_max_derived STAT_poison_resist
#define STAT_max_stat STAT_current_hp
#define STAT_max_stat STAT_current_hp
// Script data types
#define VAR_TYPE_INT (0xC001)
@@ -688,7 +698,9 @@ enum KillType : long
KILL_TYPE_count
};
#define PLAYER_ID (18000)
enum {
PLAYER_ID = 18000
};
#define OBJFLAG_CAN_WEAR_ITEMS (0xF000000)
+3 -59
View File
@@ -15,11 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*
* FALLOUT2.EXE structs, function offsets and wrappers are included from here.
*/
* FALLOUT2.EXE structs, function offsets and wrappers are included from here.
*/
#include "Enums.h"
#include "FunctionOffsets.h"
@@ -27,60 +28,3 @@
#include "EngineUtils.h"
#include "Variables.h"
#include "Functions.h"
// TODO: move/rename these
#define MSG_FILE_COMBAT (0x56D368)
#define MSG_FILE_AI (0x56D510)
#define MSG_FILE_SCRNAME (0x56D754)
#define MSG_FILE_MISC (0x58E940)
#define MSG_FILE_CUSTOM (0x58EA98)
#define MSG_FILE_INVENTRY (0x59E814)
#define MSG_FILE_ITEM (0x59E980)
#define MSG_FILE_LSGAME (0x613D28)
#define MSG_FILE_MAP (0x631D48)
#define MSG_FILE_OPTIONS (0x6637E8)
#define MSG_FILE_PERK (0x6642D4)
#define MSG_FILE_PIPBOY (0x664348)
#define MSG_FILE_QUESTS (0x664410)
#define MSG_FILE_PROTO (0x6647FC)
#define MSG_FILE_SCRIPT (0x667724)
#define MSG_FILE_SKILL (0x668080)
#define MSG_FILE_SKILLDEX (0x6680F8)
#define MSG_FILE_STAT (0x66817C)
#define MSG_FILE_TRAIT (0x66BE38)
#define MSG_FILE_WORLDMAP (0x672FB0)
/*
Gets argument from stack to eax and puts its type to edx register
eax register must contain the script_ptr
jlabel - name of the jump label in case the value type is not INT
return: eax - arg value
*/
#define _GET_ARG_INT(jlabel) __asm { \
__asm mov edx, eax \
__asm call fo::funcoffs::interpretPopShort_ \
__asm xchg eax, edx \
__asm call fo::funcoffs::interpretPopLong_ \
__asm cmp dx, VAR_TYPE_INT \
__asm jnz jlabel \
}
/*
Returns the value to the script
eax and ebx register must contain the script_ptr
edx register must contain the returned value
*/
#define _RET_VAL_INT __asm { \
__asm call fo::funcoffs::interpretPushLong_ \
__asm mov edx, VAR_TYPE_INT \
__asm mov eax, ebx \
__asm call fo::funcoffs::interpretPushShort_ \
}
#define _J_RET_VAL_TYPE(type) __asm { \
__asm call fo::funcoffs::interpretPushLong_ \
__asm mov edx, type \
__asm mov eax, ebx \
__asm jmp fo::funcoffs::interpretPushShort_ \
}
+2 -2
View File
@@ -21,12 +21,12 @@
/*
* HOW TO USE ENGINE FUNCTIONS:
*
* in ASM code, call offsets directly, don't call wrappers as they might not be _stdcall
* in ASM code, call offsets directly, don't call wrappers as they might not be __stdcall
* in C++ code, use wrappers (add new ones if the don't exist yet, see Wrappers_def.h)
*
* Note: USE C++!
* 1) Place thin __declspec(naked) hooks, only use minimum ASM to pass values to/from C++
* 2) Call _stdcall functions from (1), write those entirely in C++ (with little ASM blocks only to call engine functions, when you are too lazy to add wrapper)
* 2) Call __stdcall functions from (1), write those entirely in C++ (with little ASM blocks only to call engine functions, when you are too lazy to add wrapper)
*/
namespace fo
+4 -4
View File
@@ -202,7 +202,7 @@ const char* __stdcall findCurrentProc(Program* program) {
WRAP_WATCOM_CALL1(findCurrentProc_, program)
}
const char* _stdcall getmsg(const MessageList* fileAddr, MessageNode* result, long messageId) {
const char* __stdcall getmsg(const MessageList* fileAddr, MessageNode* result, long messageId) {
WRAP_WATCOM_CALL3(getmsg_, fileAddr, result, messageId)
}
@@ -273,7 +273,7 @@ void __declspec(naked) interpretError(const char* fmt, ...) {
__asm jmp fo::funcoffs::interpretError_
}
long _stdcall isPartyMember(GameObject* obj) {
long __stdcall isPartyMember(GameObject* obj) {
WRAP_WATCOM_CALL1(isPartyMember_, obj)
}
@@ -358,11 +358,11 @@ GameObject* __stdcall obj_find_next_at_tile() {
WRAP_WATCOM_CALL0(obj_find_next_at_tile_)
}
long _stdcall partyMemberGetCurLevel(GameObject* obj) {
long __stdcall partyMemberGetCurLevel(GameObject* obj) {
WRAP_WATCOM_CALL1(partyMemberGetCurLevel_, obj)
}
long _stdcall perk_level(GameObject* critter, long perkId) {
long __stdcall perk_level(GameObject* critter, long perkId) {
WRAP_WATCOM_CALL2(perk_level_, critter, perkId)
}
+4 -4
View File
@@ -99,12 +99,12 @@ void executeProcedure(Program* sptr, long procNum);
long __stdcall get_input();
long _stdcall isPartyMember(GameObject* obj);
long __stdcall isPartyMember(GameObject* obj);
long __stdcall item_get_type(GameObject* item);
// searches for message ID in given message file and places result in @result
const char* _stdcall getmsg(const MessageList* fileAddr, MessageNode* result, long messageId);
const char* __stdcall getmsg(const MessageList* fileAddr, MessageNode* result, long messageId);
// plays SFX sound with given name
void __stdcall gsound_play_sfx_file(const char* name);
@@ -173,9 +173,9 @@ GameObject* __stdcall obj_find_first_at_tile(long elevation, long tileNum);
GameObject* __stdcall obj_find_next_at_tile();
long _stdcall partyMemberGetCurLevel(GameObject* obj);
long __stdcall partyMemberGetCurLevel(GameObject* obj);
long _stdcall perk_level(GameObject* critter, long perkId);
long __stdcall perk_level(GameObject* critter, long perkId);
// places pointer to a prototype structure into ptrPtr and returns 0 on success or -1 on failure
long proto_ptr(long pid, Proto* *ptrPtr);
+15 -2
View File
@@ -19,11 +19,14 @@
WRAP_WATCOM_FFUNC4(long, _word_wrap, const char*, text, int, maxWidth, DWORD*, buf, BYTE*, count)
WRAP_WATCOM_FFUNC3(void, correctFidForRemovedItem, GameObject*, critter, GameObject*, item, long, slotFlag)
WRAP_WATCOM_FFUNC7(long, createWindow, const char*, winName, DWORD, x, DWORD, y, DWORD, width, DWORD, height, long, color, long, flags)
WRAP_WATCOM_FFUNC4(long, determine_to_hit, GameObject*, source, GameObject*, target, long, bodyPart, long, hitMode)
WRAP_WATCOM_FFUNC3(void, display_inventory, long, inventoryOffset, long, visibleOffset, long, mode)
WRAP_WATCOM_FFUNC4(void, display_target_inventory, long, inventoryOffset, long, visibleOffset, DWORD*, targetInventory, long, mode)
WRAP_WATCOM_FFUNC3(FrmFrameData*, frame_ptr, FrmHeaderData*, frm, long, frame, long, direction)
WRAP_WATCOM_FFUNC3(void, intface_update_items, long, animate, long, modeLeft,long, modeRight)
WRAP_WATCOM_FFUNC3(GameObject*, inven_find_type, GameObject*, critter, long, itemType, DWORD*, buf)
WRAP_WATCOM_FFUNC3(long, item_add_force, GameObject*, critter, GameObject*, item, long, count)
WRAP_WATCOM_FFUNC3(long, item_w_mp_cost, GameObject*, source, long, hitMode, long, isCalled)
WRAP_WATCOM_FFUNC7(void, make_straight_path_func, GameObject*, objFrom, DWORD, tileFrom, DWORD, tileTo, void*, rotationPtr, DWORD*, result, long, flags, void*, func)
WRAP_WATCOM_FFUNC3(long, message_find, DWORD*, msgFile, long, msgNumber, DWORD*, outBuf)
WRAP_WATCOM_FFUNC4(long, mouse_click_in, long, x, long, y, long, x_end, long, y_end)
@@ -32,6 +35,8 @@ WRAP_WATCOM_FFUNC4(long, obj_move_to_tile, GameObject*, object, long, tile, long
WRAP_WATCOM_FFUNC3(long, obj_new_sid_inst, GameObject*, object, long, sType, long, scriptIndex)
WRAP_WATCOM_FFUNC3(long, object_under_mouse, long, crSwitch, long, inclDude, long, elevation)
WRAP_WATCOM_FFUNC4(void, register_object_call, long*, target, long*, source, void*, func, long, delay)
WRAP_WATCOM_FFUNC4(long, register_object_move_to_object, GameObject*, source, GameObject*, target, long, distance, long, delay)
WRAP_WATCOM_FFUNC4(long, register_object_run_to_object, GameObject*, source, GameObject*, target, long, distance, long, delay)
WRAP_WATCOM_FFUNC3(long, scr_get_local_var, long, sid, long, varId, long*, value)
WRAP_WATCOM_FFUNC3(long, scr_set_local_var, long, sid, long, varId, long, value)
WRAP_WATCOM_FFUNC3(long, tile_num_in_direction, long, tile, long, rotation,long, distance)
@@ -79,11 +84,14 @@ WRAP_WATCOM_FUNC0(long, intface_is_hidden)
WRAP_WATCOM_FUNC0(void, intface_redraw)
WRAP_WATCOM_FUNC0(void, intface_toggle_item_state)
WRAP_WATCOM_FUNC1(void, intface_update_ac, long, animate)
WRAP_WATCOM_FUNC2(void, intface_update_move_points, long, ap, long, freeAP)
WRAP_WATCOM_FUNC0(void, intface_use_item)
WRAP_WATCOM_FUNC2(long, inven_unwield, GameObject*, critter, long, slot)
WRAP_WATCOM_FUNC0(long, is_pc_sneak_working)
WRAP_WATCOM_FUNC2(long, is_within_perception, GameObject*, source, GameObject*, target)
WRAP_WATCOM_FUNC1(long, item_c_curr_size, GameObject*, critter)
WRAP_WATCOM_FUNC1(long, item_caps_total, GameObject*, object)
WRAP_WATCOM_FUNC2(GameObject*, item_hit_with, GameObject*, critter, long, hitMode)
WRAP_WATCOM_FUNC1(long, item_size, GameObject*, item)
WRAP_WATCOM_FUNC1(long, item_total_cost, GameObject*, object)
WRAP_WATCOM_FUNC1(long, item_total_weight, GameObject*, object)
@@ -96,7 +104,10 @@ WRAP_WATCOM_FUNC1(long, item_w_dam_div, GameObject*, item)
WRAP_WATCOM_FUNC1(long, item_w_dam_mult, GameObject*, item)
WRAP_WATCOM_FUNC1(long, item_w_dr_adjust, GameObject*, item)
WRAP_WATCOM_FUNC1(long, item_w_max_ammo, GameObject*, item)
WRAP_WATCOM_FUNC2(long, item_w_range, GameObject*, critter, long, hitMode)
WRAP_WATCOM_FUNC2(long, item_w_reload, GameObject*, weapon, GameObject*, ammo)
WRAP_WATCOM_FUNC1(long, item_w_rounds, GameObject*, item)
WRAP_WATCOM_FUNC2(long, item_w_subtype, GameObject*, item, long, hitMode)
WRAP_WATCOM_FUNC1(long, item_weight, GameObject*, item)
// returns light level at given tile
WRAP_WATCOM_FUNC2(long, light_get_tile, long, elevation, long, tileNum)
@@ -111,6 +122,7 @@ WRAP_WATCOM_FUNC0(long, new_obj_id)
// calculates bounding box (rectangle) for a given object
WRAP_WATCOM_FUNC2(void, obj_bound, GameObject*, object, BoundRect*, boundRect)
WRAP_WATCOM_FUNC1(long, obj_destroy, GameObject*, object)
WRAP_WATCOM_FUNC2(long, obj_dist, GameObject*, source, GameObject*, target)
WRAP_WATCOM_FUNC2(long, obj_erase_object, GameObject*, object, BoundRect*, boundRect)
WRAP_WATCOM_FUNC0(GameObject*, obj_find_first)
WRAP_WATCOM_FUNC0(GameObject*, obj_find_next)
@@ -127,6 +139,8 @@ WRAP_WATCOM_FUNC0(void, process_bk)
WRAP_WATCOM_FUNC0(void, proto_dude_update_gender)
WRAP_WATCOM_FUNC2(long*, queue_find_first, GameObject*, object, long, qType)
WRAP_WATCOM_FUNC2(long*, queue_find_next, GameObject*, object, long, qType)
WRAP_WATCOM_FUNC1(long, register_begin, long, regType)
WRAP_WATCOM_FUNC0(long, register_end)
WRAP_WATCOM_FUNC3(long, register_object_animate, GameObject*, object, long, anim, long, delay)
WRAP_WATCOM_FUNC3(long, register_object_animate_and_hide, GameObject*, object, long, anim, long, delay)
// WRAP_WATCOM_FUNC3(long, register_object_animate_and_move_straight_, GameObject*, object;
@@ -141,19 +155,18 @@ WRAP_WATCOM_FUNC1(long, register_object_inc_rotation, GameObject*, object)
WRAP_WATCOM_FUNC3(long, register_object_light, GameObject*, object, long, lightRadius, long, delay)
// WRAP_WATCOM_FUNC3(long, register_object_move_on_stairs_, GameObject*, object;
// WRAP_WATCOM_FUNC3(long, register_object_move_straight_to_tile_, GameObject*, object;
// WRAP_WATCOM_FUNC3(long, register_object_move_to_object_, GameObject*, object;
// WRAP_WATCOM_FUNC3(long, register_object_move_to_tile_, GameObject*, object;
// WRAP_WATCOM_FUNC3(long, register_object_must_call_, GameObject*, object;
WRAP_WATCOM_FUNC1(long, register_object_must_erase, GameObject*, object)
// WRAP_WATCOM_FUNC3(long, register_object_outline_, GameObject*, object;
// WRAP_WATCOM_FUNC3(long, register_object_play_sfx_, GameObject*, object;
// WRAP_WATCOM_FUNC3(long, register_object_run_to_object_, GameObject*, object;
// WRAP_WATCOM_FUNC3(long, register_object_run_to_tile_, GameObject*, object;
WRAP_WATCOM_FUNC3(long, register_object_take_out, GameObject*, object, long, holdFrameId, long, nothing)
WRAP_WATCOM_FUNC3(long, register_object_turn_towards, GameObject*, object, long, tileNum, long, nothing)
WRAP_WATCOM_FUNC2(long, roll_random, long, minValue, long, maxValue)
WRAP_WATCOM_FUNC2(long, scr_new, long*, scriptID, long, sType)
WRAP_WATCOM_FUNC1(long, scr_remove, long, scriptID)
WRAP_WATCOM_FUNC1(void, set_focus_func, void*, func)
WRAP_WATCOM_FUNC2(long, skill_dec_point_force, GameObject*, critter, long, skill)
WRAP_WATCOM_FUNC2(long, skill_inc_point_force, GameObject*, critter, long, skill)
WRAP_WATCOM_FUNC1(long, skill_is_tagged, long, skill)
+10 -5
View File
@@ -117,7 +117,7 @@ struct GameObject {
long damageLastTurn;
long aiPacket;
long teamNum;
long whoHitMe;
GameObject* whoHitMe;
long health;
long rads;
long poison;
@@ -373,6 +373,7 @@ struct UnlistedFrm {
}
};
//for holding a message
#pragma pack(1)
struct MessageNode {
long number;
@@ -424,8 +425,7 @@ struct CritInfo {
};
#pragma pack(1)
struct SkillInfo
{
struct SkillInfo {
const char* name;
const char* description;
long attr;
@@ -791,10 +791,15 @@ struct Queue {
DWORD time;
long type;
GameObject* object;
long data;
DWORD* data;
Queue* next;
};
struct QueueRadiation {
long level;
long init; // 1 - for removing effect
};
struct QueueDrug {
DWORD pid;
fo::Stat stat0;
@@ -806,7 +811,7 @@ struct QueueDrug {
};
struct QueueAddict {
long init; // 1 = perk is not active yet
long init; // 1 - perk is not active yet
DWORD drugPid;
fo::Perk perkId; // effect of addiction
};
+5 -1
View File
@@ -57,6 +57,7 @@
#define FO_VAR_dialogue_state 0x518714
#define FO_VAR_dialogue_switch_mode 0x518718
#define FO_VAR_dialogueBackWindow 0x518740
#define FO_VAR_dialogueWindow 0x518744
#define FO_VAR_display_win 0x631E4C
#define FO_VAR_displayMapList 0x41B560
#define FO_VAR_dropped_explosive 0x5190E0
@@ -276,11 +277,14 @@
#define FO_VAR_DARK_GREY_Color 0x6A59D8
#define FO_VAR_DarkGreenColor 0x6A3A90
#define FO_VAR_DarkGreenGreyColor 0x6A3DF1
#define FO_VAR_DarkRedColor 0x6AA8D0
#define FO_VAR_DarkYellowColor 0x6AB472
#define FO_VAR_DullPinkColor 0x6AB718
#define FO_VAR_GoodColor 0x6AB4EF
#define FO_VAR_GreenColor 0x6A3CB0
#define FO_VAR_LIGHT_GREY_Color 0x6A76BF
#define FO_VAR_LIGHT_RED_Color 0x6AB61A
#define FO_VAR_PeanutButter 0x6A82F3
#define FO_VAR_RedColor 0x6AB4D0
#define FO_VAR_WhiteColor 0x6AB8CF
#define FO_VAR_YellowColor 0x6AB8BB
#define FO_VAR_YellowColor 0x6AB8BB // Light
+4 -1
View File
@@ -10,6 +10,7 @@ VARA(art, Art, 11)
VAR_(art_name, DWORD)
VAR_(art_vault_guy_num, DWORD)
VAR_(art_vault_person_nums, DWORD)
VAR_(background_volume, DWORD)
VAR_(bckgnd, BYTE*)
VAR_(black_palette, DWORD)
VAR_(BlueColor, BYTE)
@@ -79,7 +80,7 @@ VAR_(i_lhand, GameObject*)
VAR_(i_rhand, GameObject*)
VARC(i_wid, DWORD)
VAR_(i_worn, GameObject*)
VAR_(idle_func, DWORD)
VAR_(idle_func, void*)
VAR_(In_WorldMap, DWORD) // moving on WorldMap
VAR_(info_line, DWORD)
VARC(interfaceWindow, DWORD)
@@ -110,6 +111,7 @@ VAR_(main_window, DWORD)
VAR_(map_elevation, DWORD)
VAR_(map_global_vars, long*) // array
VAR_(master_db_handle, PathNode*)
VAR_(master_volume, DWORD)
VAR_(max, DWORD)
VAR_(maxScriptNum, long)
VAR_(Meet_Frank_Horrigan, bool)
@@ -175,6 +177,7 @@ VAR_(scriptListInfo, ScriptListInfoItem*) // dynamic array
VARA(skill_data, SkillInfo, SKILL_count)
VARC(skldxwin, DWORD)
VAR_(slot_cursor, DWORD)
VAR_(sndfx_volume, DWORD)
VAR_(sneak_working, DWORD) // DWORD var
VAR_(sound_music_path1, char*)
VAR_(sound_music_path2, char*)

Some files were not shown because too many files have changed in this diff Show More