Magnus Norddahl
6289e0ad3d
- fix macro expansion error on gcc and clang
2019-04-16 12:41:21 +02:00
Christoph Oelckers
5efa21ad31
- finished adding direct native functions to vmthunks.cpp.
2019-04-16 12:40:48 +02:00
Christoph Oelckers
63575d22c0
- all sector exports done.
2019-04-16 12:40:46 +02:00
Christoph Oelckers
7f4ed65123
- another batch of direct native functions.
2019-04-16 12:40:43 +02:00
Christoph Oelckers
10588add9c
- continued work on adding direct native support.
2019-04-16 12:40:40 +02:00
Christoph Oelckers
178c1a41a6
- moved VM thunks from p_sectors.cpp to a separate file and started adding direct native implementations.
...
For a few larger functions I took them out of sector_t and made them global functions to avoid creating more unnecessary stubs.
# Conflicts:
# src/p_sectors.cpp
2019-04-16 12:37:04 +02:00
Christoph Oelckers
c01981d08a
- define the built-in functions defined in codegen.cpp through the regular interface instead uf just hacking them into the symbol table with incompletely set up data.
...
- added direct native variants to these builtins and fixed problems with builtin processing.
2019-04-15 22:30:01 +02:00
Christoph Oelckers
20ec6ddce4
- removed AStateProvider from native code.
...
The only place still referencing it was CallStateChain, so this has been made a static function now instead of a class method.
2019-04-15 22:29:58 +02:00
Christoph Oelckers
376c47bef6
- fixed handling of dummy flags.
2019-04-15 22:29:55 +02:00
Christoph Oelckers
96e9dbd967
- removed all remaining native components of the weapon class.
2019-04-15 22:29:52 +02:00
Christoph Oelckers
d871072f28
- allow defining flags in the script declaration of a class and do that for Weapon.
2019-04-15 22:29:47 +02:00
Christoph Oelckers
309cc57504
- removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
...
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
2019-04-15 22:29:43 +02:00
Christoph Oelckers
ce5792242c
- moved the 'Finalize' methods back into a single function in the parser code.
...
It has been like this initially but was changed when ZDoom gained an overly complicated polymorphic class descriptor object that required a lot of support code. All these complications have long been removed but these methods remained. Since they prevent a class from being moved to the script side entirely they had to be removed.
This was the last major blocker to make Weapon a purely scripted class, the only remaining native method is Serialize which is of no concern for the coming work.
2019-04-15 22:29:39 +02:00
Christoph Oelckers
7caa6a922d
- moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 22:29:35 +02:00
Christoph Oelckers
ac754b5e96
- some cleanup on the weapon slot interface.
...
This really shouldn't make any decisions from directly reading weapon class defaults.
2019-04-15 22:29:32 +02:00
Christoph Oelckers
f9dfdace16
- scriptified cht_Takeweaps.
2019-04-15 22:29:30 +02:00
Christoph Oelckers
dadf0394c0
- removed the less-parameters versions of P_SpawnPlayerMissile, because there was only one native call left to them.
2019-04-15 22:29:28 +02:00
Christoph Oelckers
94b0338c31
- scriptified ApplyKickback.
2019-04-15 22:29:26 +02:00
Christoph Oelckers
2145db9fbd
- moved the kickback code in P_DamageMobj into a subfunction.
...
This is a first attempt to reduce the complexity of that 600+ lines monstrosity, and also a good first target for scriptification.
2019-04-15 22:29:24 +02:00
Christoph Oelckers
59bffe2f55
- scriptified A_WeaponReady and its subfunctions.
2019-04-15 22:29:22 +02:00
Christoph Oelckers
951ed466b3
- scriptified P_BobWeapon as a virtual function on PlayerPawn.
2019-04-15 22:29:19 +02:00
Christoph Oelckers
04cd432159
- a little bit of cleanup on some code that repeatedly accessed some fields in AWeapon and produced far too many search results when looking for this.
2019-04-15 22:29:17 +02:00
Christoph Oelckers
0515af2bd3
- removed the bot related properties from AWeapon.
...
This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
2019-04-15 22:29:15 +02:00
Christoph Oelckers
d31f67cb43
- consolidated the 3 nearly identical code fragments handling the weapon's YAdjust for the different renderers into a utility function in DPSprite.
...
# Conflicts:
# src/hwrenderer/scene/hw_weapon.cpp
# src/polyrenderer/scene/poly_playersprite.cpp
# src/swrenderer/things/r_playersprite.cpp
2019-04-15 22:07:45 +02:00
Christoph Oelckers
681009e1ea
- exported the blood spawning part of P_LineAttack as a virtual ZScript function.
2019-04-15 21:59:08 +02:00
Christoph Oelckers
82ffdd5e6b
- moved the weapon selection logic to PlayerPawn as overridable virtual functions.
2019-04-15 21:59:07 +02:00
Christoph Oelckers
af4c37471e
- took the weapon selection logic out of the WeaponSlots data and blocked all direct access to the weapon slots internals
...
This seriously needs to be independent from the data store and better abstracted. More work to come to move this to its proper place.
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 21:59:05 +02:00
Christoph Oelckers
27c67716df
- change teleport freeze handling to a player property plus virtual override on PlayerPawn for increased configurability.
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 21:59:03 +02:00
Christoph Oelckers
7c1416cb6f
- scriptified BecomeItem and BecomePickup
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 21:59:01 +02:00
Christoph Oelckers
08059f718b
- scriptified FilterCoopRespawnInventory.
2019-04-15 21:59:00 +02:00
Christoph Oelckers
1ecada388c
- scriptified some simple sound functions.
2019-04-15 21:58:58 +02:00
Christoph Oelckers
d123230fb1
- scriptified APlayerPawn::Die and fixed a few things I encountered while doing it.
2019-04-15 21:58:56 +02:00
Christoph Oelckers
0eec8b293a
- scriptified ModifyDropAmount as a virtual function hierarchy for Inventory and children.
2019-04-15 21:58:54 +02:00
Christoph Oelckers
f1c7815b16
- scriptified A_Explode and relatives.
2019-04-15 21:58:52 +02:00
Christoph Oelckers
e234d450aa
- scriptified GetDefaultInventory.
2019-04-15 21:58:50 +02:00
Christoph Oelckers
864796a6a2
- removed MeleeWeapon flag from the tomed PhoenixRod and the fighterhammer.
...
In both cases, having this flag on will render the monster-backing-off-check for melee attacks ineffective because it would misinterpret these weapons as close range only - which they aren't. Even for the PhoenixRod the range is longer than what gets checked here.
As a consequence, the bot's check for missile shooting melee weapons has also become pointless because no such weapon is defined anymore.
2019-04-15 21:58:48 +02:00
Christoph Oelckers
beae232f83
- exported one FraggleScript function for testing.
2019-04-15 21:58:46 +02:00
Christoph Oelckers
c326c4c521
- exported a few more weapon handling functions so that the native GetDownState stub could be removed.
2019-04-15 21:58:45 +02:00
Christoph Oelckers
53b41cf32f
- let player_t::Resurrect use P_BringUpWeapon to raise the weapon again instead of doing it directly.
...
This seems a bit safer.
2019-04-15 21:58:43 +02:00
Christoph Oelckers
c1442fae0d
- scriptified P_BringUpWeapon because this was the only native function still referencing AWeapon::GetReadyState.
2019-04-15 21:58:41 +02:00
Christoph Oelckers
8c2c888d82
- scriptified A_SpawnItem(Ex) and A_ThrowGrenade.
...
These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
2019-04-15 21:58:39 +02:00
Christoph Oelckers
1b225588d1
- scriptified 3 more functions in stateprovider.
2019-04-15 21:58:37 +02:00
Christoph Oelckers
05e8a6c62d
- scriptified A_RailAttack.
2019-04-15 21:58:35 +02:00
Christoph Oelckers
394d8e414f
- scriptified A_CustomPunch
2019-04-15 21:58:33 +02:00
Christoph Oelckers
54ba5b4829
- scriptified A_FireProjectile
2019-04-15 21:58:31 +02:00
Christoph Oelckers
d99b46c861
- scriptified A_FireBullets and A_CustomBulletAttack.
2019-04-15 21:58:30 +02:00
Christoph Oelckers
f794cab92f
- deleted redundant native ActivateMorphWeapon method.
2019-04-15 21:58:28 +02:00
Christoph Oelckers
4c7096ffac
- started with a ScriptUtil class which will allow moving function implementations for ACS and FraggleScript to zscript.txt
...
So far 3 functions for testing implemented.
# Conflicts:
# src/p_acs.cpp
2019-04-15 21:58:26 +02:00
Christoph Oelckers
1b6af10f38
- scriptified Weapon.CheckAmmo and Weapon.DepleteAmmo
2019-04-15 21:56:30 +02:00
Christoph Oelckers
9e6279ed5b
- scriptified the rest of the morph code.
2019-04-15 21:56:28 +02:00