Commit Graph

60 Commits

Author SHA1 Message Date
Major Cooke a111c59286 Added PSPF_MIRROR.
- Flips the sprite's drawing and position over entirely. Automatically implies PSPF_FLIP.
2017-05-25 19:46:36 -05:00
Major Cooke 65f13b0927 - Added a Z offsetting parameter to the ZScript LineAttack function.
- Added LAF_OVERRIDEZ flag to LineAttack. Disregards all internal offsetting aside the actor's Z position before adding the offset parameter.
2017-05-17 23:03:22 +02:00
Rachael Alexanderson 625fc73f28 - Missed a few CF_POWERBUDDHA references. 2017-05-16 04:13:25 -04:00
Major Cooke 795f8f0578 - Added a separate cheat flag to handle buddha powerups. Currently, Buddha powerups could interfere and disable the actual player cheat unintentionally, when the player may not want their actual cheat to be turned off.
- Set some overlooked 1000000 damage points to TELEFRAG_DAMAGE inside the falling damage code.
2017-05-14 17:22:46 +02:00
Christoph Oelckers 1c8d698121 - added WeaponState enum for ZScript. 2017-04-13 02:42:31 +02:00
Rachael Alexanderson b3a69e1df8 Merge https://github.com/coelckers/gzdoom 2017-03-02 18:13:33 -05:00
Christoph Oelckers e64f1e645d - exported constants for SetGlobalFogParameter to ZScript. 2017-03-02 13:14:55 +01:00
Rachael Alexanderson 2a847ca570 Merge https://github.com/coelckers/gzdoom 2017-02-27 01:06:00 -05:00
Christoph Oelckers 51b5b327ef - fixed constant names. 2017-02-26 21:38:08 +01:00
Christoph Oelckers 24a505ed36 - fixed: The internal and scripted morph flags did not match. 2017-02-26 21:10:53 +01:00
Rachael Alexanderson 7a5df2bc28 Merge commit 'b0eb19b' 2017-02-26 13:41:02 -05:00
Christoph Oelckers c4b546404a - added a 'nocheck' parameter to A_Raise* and Thing_Raise. 2017-02-26 17:50:48 +01:00
Christoph Oelckers e6b31dde27 - added some flexibility to some Skulltag powerups.
- handle these powerups by actual item checks instead of cheat flags. (The same should also be done for the Frightener and Buddha but those are a bit more complex because they are also real cheats.)
2017-02-26 16:23:22 +01:00
Rachael Alexanderson 80d3fd58ff Merge https://github.com/coelckers/gzdoom 2017-02-23 15:00:09 -05:00
Christoph Oelckers fc101049c6 - exported gamestate variable and forced it to 32 bit internally.
- forced gameaction_t to 32 bit to avoid problems with undefined size issues.
2017-02-23 19:29:43 +01:00
Rachael Alexanderson 5dad292c56 Merge remote-tracking branch 'remotes/gzdoom/master' 2017-02-15 05:43:15 -05:00
Christoph Oelckers c5204f34ca - fixed: The code to play the mage lightning's attack sound was converted wrong, because it used the same structure as looping sounds normally so, but doesn't actually loop. 2017-02-14 22:51:53 +01:00
Rachael Alexanderson 8c176575c8 Merge https://github.com/coelckers/gzdoom 2017-02-12 21:39:20 -05:00
Christoph Oelckers 947b625c50 - all menu items scriptified, but not yet active. 2017-02-11 16:11:48 +01:00
Magnus Norddahl 545ae678e8 Merge remote-tracking branch 'gzdoom/master' into qzdoom 2017-01-20 00:22:29 +01:00
Christoph Oelckers 3c30b59bab more inventory scriptification
* completely scriptified DehackedPickup and FakeInventory.
* scriptified all remaining virtual functions of Inventory, so that its inheritance is now 100% script-side.
* scriptified CallTryPickup and most of the code called by that.

- fixed: Passing local variables by reference did not work in the VM.
2017-01-19 23:42:12 +01:00
Rachael Alexanderson d707f1c22e Merge https://github.com/coelckers/gzdoom 2017-01-14 00:38:26 -05:00
Christoph Oelckers 40e7fa5be2 - scriptified the RandomSpawner.
- fixed: String constants were not processed by the compiler backend.
- added an explicit name cast for class types.
2017-01-14 02:05:52 +01:00
Rachael Alexanderson 8954efd33c Merge https://github.com/coelckers/gzdoom 2016-12-30 19:21:51 -05:00
Christoph Oelckers 3b524cbed4 - scriptified PowerInfiniteAmmo to test the exported functions. 2016-12-31 00:20:02 +01:00
Major Cooke ff3487d389 Merge branch 'OverlayAlpha' into OverlayExtension9
# Conflicts:
#	src/p_pspr.cpp
#	src/r_draw.cpp
#	wadsrc/static/actors/actor.txt
#	wadsrc/static/actors/constants.txt
2016-12-26 14:37:22 -06:00
Christoph Oelckers d4c0ee9e43 - address bad use of pitch in A_CustomMissile.
This function calculated everything correctly but ultimately set the vertical velocity wrong. Most importantly this meant that the actual velocity vector and actor pitch - if CMF_SAVEPITCH was used - did not match.
Since this bug has been present since the pitch parameter was added, this deprecates A_CustomMissile and replaces it with a properly implemented A_SpawnProjectile function and handling the compatibility case with a new flag and a scripted wrapper function.
All internal uses of A_CustomMissile have been replaced as well.
2016-12-24 14:46:34 +01:00
Christoph Oelckers 952e47cfe4 - renamed internal MELEERANGE constant to deconflict with Actor's MeleeRange member. 2016-12-10 16:36:19 +01:00
Christoph Oelckers a4d2468d34 - disable weapon interpolation for offset changes.
This has been causing far too many problems so now it will only be done if a A_Weaponoffset is either used with WOF_ADD or WOF_INTERPOLATE.
2016-12-08 17:52:59 +01:00
Christoph Oelckers b2d1b0d7a6 - fixed: FTranslatedLineTarget::angleFromSource returned the attack angle, not the angle between actors when returned from P_LineAttack.
For most attack functions this is wrong, it's only the Hexen fighter attack needing this particular value, so it has been split up into two return values now.
2016-12-06 11:04:54 +01:00
Christoph Oelckers 17d9a152e7 - added missing THINGSPEC constants 2016-12-02 00:31:52 +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 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 7385cd70c0 - scriptified the Minotaur.
Interesting tidbit: The damage calculation in P_MinotaurSlam had been incorrect for the Heretic version since the friendly Hexen Dark Servant was added, but nobody ever noticed in 14 years...
2016-11-26 01:14:47 +01:00
Christoph Oelckers 6e1c6c4b33 - scriptified ArtiTeleport.
- shortened ArtiEgg and ArtiPork's use state to a single function.
2016-11-25 19:52:35 +01:00
Christoph Oelckers 8dba322775 - scriptified Heretic's Skull Rod.
- Took the opportunity and fixed the logic for the Skull Rod's rain spawner. The old code which was part of the 3D floor submission was unable to work with portals at all. The new approach no longer tries to hide the dead projectile in the ceiling, it leaves it where it is and changes a few flags, so that its z-position can be used as reference to get the actual ceiling. This works for line portals, but for sector portals still requires some changes to sector_t::NextHighestCeilingAt to work, but at least this can be made to work unlike the old code.
- added names for the player-related translations to A_SetTranslation.
- fixed: Failure to resolve a function argument was checked for, too late.
- made the parameter for A_SetTranslation a name instead of a string, because it is more efficient. We do not need full strings here.
2016-11-25 16:05:03 +01:00
Christoph Oelckers 099b9970ef - added proper definitions for all exported native fields.
- synthesize native fields for all declared flags, not just for AActor.
2016-11-22 23:43:32 +01:00
Christoph Oelckers bbb0778fd4 - scriptified Chicken and Pig - not tested yet, because other things have priority. 2016-11-22 12:21:55 +01:00
Christoph Oelckers bb25c5faaa - scriptified the remaining Doom weapon code.
- implemented method calls from struct instances.
- optimized disassembly of VM call instructions to print the function's name at the end where it is more visible and does not need to be truncated. Also use the printable name for script functions here.
2016-11-20 12:27:26 +01:00
Christoph Oelckers d50da34664 - scriptified the pistol to test if struct member functions work.
- made APlayerPawn::PlayAttacking(2) virtual script functions so that mods have better control over player animations. Note that these have no native base so they skip the templated interface for managing virtual functions.
2016-11-19 13:56:29 +01:00
Christoph Oelckers 3ce699bf9b - implemented pass-by-reference arguments - so far only for memory based variables.
- changed Dehacked weapon function lookup to check the symbol table instead of directly referencing the VM functions. Once scriptified these pointers will no longer be available.
- removed all special ATAGs from the VM. While well intentioned any pointer tagged with them is basically unusable because it'd trigger asserts all over the place.
- scriptified A_Punch for testing pass-by-reference parameters and stack variables.
2016-11-19 01:23:56 +01:00
Christoph Oelckers 7ff5069617 - added all missing things to enable the scriptified version of A_BrainSpit.
This uses a global function, this has been placed into DObject for now because the scripting interface does not allow non-class-owned functions yet.
2016-11-18 22:12:53 +01:00
Christoph Oelckers 633da6e5d8 - scriptified two of the Acolyte's functions.
- added a DActorIterator class.
- fixed: It was not possible to have functions of the same name in two different classes because the name they were searched for was not qualified by the class. Changed so that the class name is included now, but to avoid renaming several hundreds of functions all at once, if the search fails, it will repeat with 'Actor' as class name.

This commit contains preparations for scriptifying Hexen's Dragon, but that doesn't work yet so it's not included.
2016-11-16 01:36:21 +01:00
Christoph Oelckers 199e2e2f9c - fixed CheckRange return value.
- removed the error message for multiple state blocks in DECORATE.
- added some constants for state types.
2016-11-14 17:50:09 +01:00
Christoph Oelckers 14a9c13113 - scriptified Heretic's wizard. 2016-11-11 23:32:13 +01:00
Christoph Oelckers 2857fac338 - scriptified a_archvile.cpp.
- fixed the type checks for the conditional operator.
2016-10-30 18:41:39 +01:00
Christoph Oelckers f8ccda2dc8 - scriptified A_Mushroom to test something a bit more complex.
- fixed: FxMinusSign trashed local variables that were used with negation.
- fixed: FxConditional only handled ints and floats, but not pointers and strings.
- fixed: A 'no states in non-actors' error was triggered, even for classes without any states.
2016-10-30 14:00:11 +01:00
Christoph Oelckers c7347608a4 - scriptified A_FatAttack*.
- swapped parameters of two-parameter VelToAngle method, so that internal and script version are in line.
- fixed parameter asserts to handle NULL pointers properly.
2016-10-27 17:47:46 +02:00
Christoph Oelckers 823c52aeb2 - scriptified the functions in a_possessed.cpp and added the needed exports and constants.
- fixed: Script functions did not receive the function name when being created.
- relaxed the asserts for PARAM_STATE, because the VM knows nothing about ATAG_STATE. Any state variable's content (e.g. Actor.SeeState) will receive ATAG_GENERIC, rather than ATAG_STATE.
- added a 'NeedResult' flag so that certain operations can create shorter code if the result of the expression is not needed. So far only used for postdecrement/increment statements on local variables (which is the most frequent case where this matters.)
- fixed postincrement and decrement for local variables. Due to the result preservation semantics it created faulty code.
2016-10-26 11:30:30 +02:00