Christoph Oelckers
47b1fa774d
Merge branch 'asmjit' into weapon_scriptification
...
# Conflicts:
# src/gi.cpp
# wadsrc/static/zscript/base.txt
2018-11-26 00:14:44 +01:00
Christoph Oelckers
90d79865a5
Merge branch 'master' into asmjit
2018-11-25 23:33:23 +01:00
Christoph Oelckers
182d43ae70
- fixed: Any direct native function may not use struct values as parameters, not even something as simple as an FName.
2018-11-25 23:33:15 +01:00
Christoph Oelckers
bef5b953b2
- free everything.
2018-11-25 23:33:15 +01:00
Christoph Oelckers
34a1c8e545
- delete JIT data when shutting down.
2018-11-25 23:33:14 +01:00
Magnus Norddahl
c164b3c3b0
- fix: float constants got their move instructions inserted after the call instruction
2018-11-25 22:26:38 +01:00
Christoph Oelckers
d79ef939e9
- fixed: The serializer must treat object that were already destroyed or are declared transient like a null pointer and not ignore them.
...
This caused FraggleScript's SpawnedThings array to go out of sync.
2018-11-25 22:13:14 +01:00
Christoph Oelckers
9475bfe4f1
- declare builtins as static.
2018-11-25 21:47:28 +01:00
Christoph Oelckers
176da5de68
- added a direct native variant for A_PlaySound because this function is relatively easy to test.
2018-11-25 18:41:27 +01:00
Magnus Norddahl
61b91f9814
- fix macro expansion error on gcc and clang
2018-11-25 18:37:26 +01:00
Magnus Norddahl
d30bf44dcc
- use SSE for the normal walls
2018-11-25 17:11:05 +01:00
Christoph Oelckers
2b960aa28f
- finished adding direct native functions to vmthunks.cpp.
2018-11-25 16:12:15 +01:00
Magnus Norddahl
53175c49a7
- change DrawSpanOpt32 to render a scanline in multiple steps as the speed is about the same and it will make it easier to use SSE for each of the steps
2018-11-25 15:49:15 +01:00
Christoph Oelckers
03364a8c3e
- all sector exports done.
2018-11-25 15:14:48 +01:00
Christoph Oelckers
8e8ee732f4
- another batch of direct native functions.
2018-11-25 14:19:19 +01:00
Christoph Oelckers
6628b34f4a
- continued work on adding direct native support.
2018-11-25 13:35:32 +01:00
Christoph Oelckers
dc16c1d44e
- 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.
2018-11-25 11:34:50 +01:00
Christoph Oelckers
a501a22b28
- 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.
2018-11-25 11:41:29 +01:00
Christoph Oelckers
43d434b071
- 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.
2018-11-25 10:09:06 +01:00
Christoph Oelckers
f4789bdefc
- fixed handling of dummy flags.
2018-11-25 10:06:00 +01:00
Christoph Oelckers
d6b781312c
- removed all remaining native components of the weapon class.
2018-11-25 10:00:55 +01:00
Christoph Oelckers
70d3c31551
- allow defining flags in the script declaration of a class and do that for Weapon.
2018-11-25 09:29:12 +01:00
Christoph Oelckers
b5c4ab8c47
- 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.
2018-11-25 08:17:37 +01:00
Christoph Oelckers
00a48b09e5
- 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.
2018-11-25 08:16:18 +01:00
Christoph Oelckers
7012179904
- moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
2018-11-25 07:43:05 +01:00
Christoph Oelckers
8fa16b6c30
- some cleanup on the weapon slot interface.
...
This really shouldn't make any decisions from directly reading weapon class defaults.
2018-11-25 07:21:02 +01:00
Christoph Oelckers
f218e95c4d
- scriptified cht_Takeweaps.
2018-11-25 01:26:19 +01:00
Christoph Oelckers
bc86ec4c51
- removed the less-parameters versions of P_SpawnPlayerMissile, because there was only one native call left to them.
2018-11-25 01:14:50 +01:00
Christoph Oelckers
460c400315
- scriptified ApplyKickback.
2018-11-25 01:12:45 +01:00
Christoph Oelckers
e856e3c830
- 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.
2018-11-25 01:01:34 +01:00
Christoph Oelckers
ae27acb944
- scriptified A_WeaponReady and its subfunctions.
2018-11-25 00:54:13 +01:00
Christoph Oelckers
5fcc96a0f2
- fixed: When extracting a MiniBSP for polyobject rendering, the parent subsector must copy all its relevant properties to the children.
...
The sections pointer was not copied here.
2018-11-25 00:38:04 +01:00
Christoph Oelckers
34b7e5f435
- scriptified P_BobWeapon as a virtual function on PlayerPawn.
2018-11-25 00:23:03 +01:00
Christoph Oelckers
b75ee1027a
- 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.
2018-11-24 23:51:09 +01:00
Christoph Oelckers
8eb4697fbd
- 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.
2018-11-24 23:48:23 +01:00
Christoph Oelckers
ead28db007
- consolidated the 3 nearly identical code fragments handling the weapon's YAdjust for the different renderers into a utility function in DPSprite.
2018-11-24 22:40:14 +01:00
Christoph Oelckers
4392b4e96d
- exported the blood spawning part of P_LineAttack as a virtual ZScript function.
2018-11-24 22:35:50 +01:00
Christoph Oelckers
f260709e73
- moved the weapon selection logic to PlayerPawn as overridable virtual functions.
2018-11-24 22:22:36 +01:00
Christoph Oelckers
51ee623b3b
- 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.
2018-11-24 22:03:56 +01:00
Christoph Oelckers
b6d0d5008e
- change teleport freeze handling to a player property plus virtual override on PlayerPawn for increased configurability.
2018-11-24 21:37:00 +01:00
Christoph Oelckers
337750b874
- scriptified BecomeItem and BecomePickup
2018-11-24 21:25:26 +01:00
Christoph Oelckers
3d892d3970
- scriptified FilterCoopRespawnInventory.
2018-11-24 20:58:33 +01:00
Christoph Oelckers
c14b7f58d3
- scriptified some simple sound functions.
2018-11-24 20:33:00 +01:00
Christoph Oelckers
fb91982da2
- scriptified APlayerPawn::Die and fixed a few things I encountered while doing it.
2018-11-24 20:32:12 +01:00
Christoph Oelckers
cf9cd58310
- scriptified ModifyDropAmount as a virtual function hierarchy for Inventory and children.
2018-11-24 19:59:24 +01:00
Christoph Oelckers
652606f70b
- scriptified A_Explode and relatives.
2018-11-24 19:29:52 +01:00
Christoph Oelckers
44d51a6de9
- scriptified GetDefaultInventory.
2018-11-24 19:03:33 +01:00
Christoph Oelckers
be100fa5d3
- 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.
2018-11-24 18:42:10 +01:00
Christoph Oelckers
814af66864
- exported one FraggleScript function for testing.
2018-11-24 18:33:42 +01:00
Christoph Oelckers
595208f2fd
- exported a few more weapon handling functions so that the native GetDownState stub could be removed.
2018-11-24 18:21:40 +01:00