Commit Graph

82 Commits

Author SHA1 Message Date
Christoph Oelckers d338ca3ec1 - scriptified the sector actions. 2017-01-13 13:51:47 +01:00
Christoph Oelckers cf39af0642 - consolidated the sector action classes.
This can be done with a lot less overhead by using one of the object's properties to store the activation flag, so that all the nearly redundant trigger methods can be folded into one.
2017-01-13 01:06:37 +01:00
Christoph Oelckers 85a84b5e94 - scriptified FastProjectile. 2017-01-13 00:35:56 +01:00
Christoph Oelckers cc58f13e4e - scriptified the sector silencer. 2017-01-12 23:35:24 +01:00
Christoph Oelckers 3d73919092 - scriptified CustomBridge.OnDestroy. 2017-01-12 22:56:06 +01:00
Christoph Oelckers 0b94d4e0a3 - scriptified the bridge things, except the Destroy method which still requires work to allow virtually calling this. 2017-01-12 19:55:25 +01:00
Christoph Oelckers 3f94a15cfe - added a virtual PostSpawn method to RandomSpawner, this will get called when the actor has been spawned so that the spawner can do some special setup with it. 2017-01-10 20:14:48 +01:00
Christoph Oelckers 3696d34806 - added IF_NOSCREENBLINK flag, see http://mantis.zdoom.org/view.php?id=9 2017-01-10 19:57:51 +01:00
Christoph Oelckers 7a5171a2e9 - fixed: The check for virtual function overrides was never done if the overriding function had no qualifier at all.
- fixed several occurences where an 'override' qualifier was missing.
2017-01-08 19:07:26 +01:00
Christoph Oelckers b132782c49 - scriptified PowerBuddha and PowerFrightener. 2017-01-03 21:03:05 +01:00
Christoph Oelckers 15f30886cd - scriptified the TimeFreezer powerup. 2017-01-03 20:06:20 +01:00
Christoph Oelckers 9948189193 - scriptified PowerProtection and PowerDamage.
- made ModifyDamage calls iterative instead of recursive. With going through the VM they'd be too costly otherwise.
- small optimization: Detect empty VM functions right when entering the VM and shortcut them. This is to reduce the overhead of virtual placeholders, which in a few cases (e.g. CanCollideWith and ModifyDamage) can be called quite frequently.
2017-01-01 23:11:48 +01:00
Christoph Oelckers 66cc68606f - scriptified the methods of APowerMorph.
- made some changes to PowerMorph to better deal with recursive calls from UndoPlayerMorph. The flag hackery was only needed because the 'alternative' pointers were cleared far too late.
2017-01-01 19:23:43 +01:00
Christoph Oelckers 267b1842b4 - scriptified a few more of the simpler powerups. 2016-12-31 01:08:09 +01:00
Christoph Oelckers 3b524cbed4 - scriptified PowerInfiniteAmmo to test the exported functions. 2016-12-31 00:20:02 +01:00
Christoph Oelckers fe0f19e1e0 - exported Powerup.InitEffect and EndEffect to scripting. 2016-12-30 23:32:43 +01:00
Christoph Oelckers f5883d3f86 - fixed: DynamicLight needs a render radius of -1 so that it gets excluded from the touching_renderlist. 2016-12-26 12:04:03 +01:00
Christoph Oelckers 19856d6ccb Merge branch 'master' of https://github.com/rheit/zdoom 2016-12-25 22:56:35 +01:00
Christoph Oelckers 89b7cf4262 - fixed: RenderRadius needs to be serialized.
- fixed: CustomBridge can be visible so it shouldn't be completely excluded from the render lists.
2016-12-25 14:35:35 +01:00
ZZYZX 38cb7aeaaa Invisible and Custom bridges now have RenderRadius -1 to prevent excessive linking 2016-12-25 13:43:32 +02:00
Christoph Oelckers 287974968a - renamed A_FireCustomMissile and added a deprecated compatibility wrapper to deal with the inverted pitch this function used. 2016-12-24 16:34:45 +01:00
Christoph Oelckers 1e950d75bd - made dynamic light attenuation completely opt-in. This can be done either by setting a MAPINFO option for lights that do not automatically specify it and with a light property. The light property will always take precedence, if set. 2016-12-07 23:17:18 +01:00
Christoph Oelckers fbc8d0e83c Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
# Conflicts:
#	wadsrc/static/zscript.txt
2016-12-03 18:51:10 +01:00
Christoph Oelckers fbf8084999 - corrected the export signatures of several script exports to contain the correct classes, so that the fudging in FindFunction could be removed.
- fixed PARAM_ACTION_PROLOGUE to assign correct types to the implicit pointers. It gave the actual class to the wrong one, which until now did not matter because all functions were using 'Actor', regardless of actual class association.
- fixed the definition of IceChunk and removed some redundant code here. Since A_FreezeDeathChunks already calls SetState, which in turn calls the state's action function, there is no need to call it again explicitly.
2016-12-02 18:52:58 +01:00
Christoph Oelckers c927aca2a0 Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
# Conflicts:
#	wadsrc/static/zscript.txt
2016-11-30 18:46:23 +01:00
Christoph Oelckers 47884f8a71 - fixed a few bad declarations. 2016-11-30 16:19:13 +01:00
Christoph Oelckers 8a50004f55 - cleanup of the virtual function definitions for inventory items. Let's better use 'virtual' and 'override' everywhere to make sure that nothing gets overlooked.
- added call wrappers and script hooks for all relevant virtuals in AInventory.
- made GetSpeedFactor and GetNoTeleportFreeze entirely scripted because they are too trivial - also do them iteratively, just like HandlePickup, because it's just a better way to do this stuff.
2016-11-30 15:54:01 +01:00
Christoph Oelckers b0f3121bec - split up zscript/shared/inventory.txt.
- moved health items to their own file.
- scriptified ScoreItem and MapRevealer whose entire functionality was a small TryPickup method.
- fixed: bit fields in global variables were not correctly written.

This should conclude the inventory cleanup. It is now possible again to find things in there.
2016-11-30 13:36:13 +01:00
Christoph Oelckers 0cd6cec531 - scriptified the SectorFlagSetter. 2016-11-30 01:49:36 +01:00
Christoph Oelckers bbf62132d8 - added a larger batch of function exports.
- cleaned up the virtual function interface of APlayerPawn which still had many virtual declarations from old times when class properties were handled through virtual overrides. None of this makes sense these days anymore.
2016-11-30 01:25:51 +01:00
Christoph Oelckers 9193466572 - scriptified ASecurityCamera and AAimingCamera.
This concludes this round of script converesions of internal classes.
2016-11-29 20:16:14 +01:00
Christoph Oelckers a13e23dbe6 - scriptified some trivial stuff from g_shared. 2016-11-29 19:50:34 +01:00
Christoph Oelckers 5beebb83b7 - scriptified Strife's assault gun and missile launcher. 2016-11-29 13:28:43 +01:00
Christoph Oelckers 3af9232fca - scriptified a_strifeitems.cpp and a_debris.cpp.
- Changed the glass shards so that they do not have to override FloorBounceMissile. It was the only place where this was virtually overridden and provided little usefulness.
- made 'out' variables work.
- fixed virtual call handling for HandlePickup.
2016-11-29 12:17:05 +01:00
Christoph Oelckers edd8e51a69 - scriptified most of a_strifestuff.cpp. 2016-11-28 23:30:14 +01:00
Christoph Oelckers 9064a5b0ac - scriptified Strife's coins.
- added a String class to allow attaching methods to the builtin string type. This works by checking if the left side of the member accessor is a string and just replacing the tyoe in this one place, all the rest is automatic.
2016-11-28 18:15:18 +01:00
Christoph Oelckers d2ce78fae7 - changed the return value of PickupMessage to an FString so that it can interface with scripts.
- use standard convention of prefacing localizable strings with "$" for C_MidPrint.
2016-11-28 16:19:01 +01:00
Christoph Oelckers 8551a4f6e1 - scriptified the Sigil. This isn't fully tested yet. 2016-11-28 14:39:25 +01:00
Christoph Oelckers 7ea9f60464 - scriptified the Acolyte. 2016-11-28 10:41:36 +01:00
Christoph Oelckers 3dd323ac0d - scriptified the Flechette. Not fully tested yet.
- fixed issues with the refactoring of the recent commits. This one starts again.
- added builtins for TextureID.

Note about builtins: Currently they are just hacked into the compiler backend. They really should be made part of the respective types to keep matters clean and allow more widespread use of builtins to create more efficient code.
2016-11-27 16:24:33 +01:00
Christoph Oelckers 36f559ecb7 - fixed bad definition of struct grammar which tried to resolve from right to left, creating large amounts of recursion and strange problems with PlayerInfo.
- added a command line option to generate a parser trace file.
- fixed a syntax error in player.txt.
2016-11-27 16:24:32 +01:00
Christoph Oelckers b10ffb5133 - exported a few more functions.
- refactored the ModifyDamage interface to be more scripting friendly.

In general it should be avoided having to call directly into chained inventory functions because they are very problematic and prone to errors. So this got wrapped into a single handler (on AActor, not AInventory!) which will later make it easier to refactor the parameters of ModifyDamage to work better for scripting and avoid the chaining.
2016-11-27 16:24:32 +01:00
Christoph Oelckers 69d4d36429 - scriptified ArtiHealingRadius.
- allow switch/case with names.
- fixed break jump target handling for switch/case. This only worked when the break was in the outermost compound statement, those in inner ones were missed.
2016-11-27 00:18:07 +01:00
Christoph Oelckers 178db4bb09 - scriptified the fighter's hammer. 2016-11-26 21:39:20 +01:00
Christoph Oelckers e541c27622 - scriptified the weapon's state getter methods - as preparation for the fighter axe. 2016-11-26 19:48:30 +01:00
Christoph Oelckers 997e4a2ac4 - scriptified the remaining Cleric weapons. 2016-11-26 19:23:22 +01:00
Christoph Oelckers 177aa6ec42 - converted half of ClericHoly. (Making a commit before starting on the more complex stuff.)
- added a 'constructor' for color values.
2016-11-26 13:18:48 +01:00
Christoph Oelckers 0d6f37835f - completed Heretic scriptification with the two remaining artifacts. 2016-11-25 18:41:00 +01:00
Christoph Oelckers 4f370ba181 - scriptified the Phoenix Rod, completing the Heretic weapons. 2016-11-25 18:13:08 +01:00
Christoph Oelckers 9ae272d753 - scriptified Heretic's blaster.
- scriptified all Effect functions of Fastprojectile's children
- implemented access to class meta data.
- added a VM instruction to retrieve the class metadata, to eliminate the overhead of the function call that would otherwise be needed.
- made GetClass() a builtin so that it can use the new instruction

Important note about this commit: Scriptifying CFlameMissile::Effect revealed a problem with the virtual function interface: In order to work, this needs to be explicitly enabled for each single native class that may be used as a base for a scripted class. Needless to say, this will end up way too much work, as there are over 100 native classes, excluding those which will be scriptified. But in order to fix the problem this partially broken state needs to be committed first.
2016-11-24 20:02:44 +01:00