Commit graph

1277 commits

Author SHA1 Message Date
Christoph Oelckers
14a9c13113 - scriptified Heretic's wizard. 2016-11-11 23:32:13 +01:00
Christoph Oelckers
a5f9eb5be1 - Scriptified Heretic's knight. 2016-11-11 22:14:29 +01:00
Christoph Oelckers
72e77a6c65 - implemented handling for virtual function.
Syntax-wise I chose to make it as strict as possible to reduce the chance of errors: Virtual base functions must be declared with the 'virtual' keyword, and overrides in child classes with the 'override' keyword. This way any mismatch in parameters that otherwise would cause silent failure will outright produce a compile error.
2016-11-11 20:05:07 +01:00
Christoph Oelckers
6529931281 fixed and completed the special field init code. Strings can now be used as class members, and so can structs which contain strings.
- made 'DamageMultiply' an actor property and moved the initialization of ConversationRoot to the property handler for the compiler to get this stuff out of the type classes.
- consolidate default initialization into one function which performs all the required setup. The original implementation did this when adding the fields but that cannot work because at that time no defaults have been created yet.
- fixed: When deriving a class the child class's defaults also must initialize the copied parent fields with special initialization. This part was completely missing.
- removed DECORATE code for parsing native classes because it's no longer needed.
2016-11-11 14:40:32 +01:00
nashmuhandes
fd31c84745 Added a slider to control the intensity of underwater screen blending. 2016-11-11 17:18:39 +08:00
Christoph Oelckers
cf9cdeb480 - scriptified the Revenant's code. 2016-11-07 23:16:25 +01:00
Christoph Oelckers
75c20ebaa6 - typo in Lostsoul definition. 2016-11-07 21:30:08 +01:00
Christoph Oelckers
e3bee84860 - fixed: Hexen's serpent was still using "None" for 'no state', which in ZScript is done with null. 2016-11-07 20:12:06 +01:00
Christoph Oelckers
5e8c819a33 - fixed checks in Powerup.Type property to properly deal with the differences between DECORATE and ZScript.
- properly initialize Baggage everywhere it gets used.
- fixed a few items with incorrect Powerup.Type settings that got flagged by the above changes.
2016-11-07 11:53:49 +01:00
Christoph Oelckers
062574b726 - fixed damage handling in A_BetaSkullAttack. For unknown reasons this completely bypassed the normal damage function semantics and even multiplied that with a random value.
- made some tests about calling script code from native functions.

 * scriptified A_SkullAttack to have something to test
 * changed the A_SkullAttack call in A_PainShootSkull.
 * use a macro to declare the function pointer. Using local static variable init directly results in hideous code for the need of being thread-safe (which, even if the engine was made multithreaded is not needed here.)
 * Importsnt node here: Apparently passing an actor pointer to the VMValue constructor results in the void * version being called, not the DObject * version.
2016-11-06 11:36:12 +01:00
Christoph Oelckers
c3ae560289 - scriptified two more trivial functions. 2016-11-06 09:22:03 +01:00
Christoph Oelckers
98fa3d2d93 - added an accessor to the actor defaults. This might have been possible with less work using a function but that would have necessitated some type casts when using it on subclasses.
- scriptified A_BarrelDestroy to test the above.
2016-11-05 17:14:16 +01:00
Christoph Oelckers
24925c88a8 - added readonly pointers. They need to be defined with 'readonly<classtype>'. These are significantly different from declaring a field readonly in that they do not disallow modification of the variable itself but what it points to. For the actor defaults this is necessary to prevent accidental modification. A readonly pointer is actually a different type than a regular pointer.
- fixed code generation for dynamic cast. It was missing the jump instruction after the compare.
2016-11-05 13:51:46 +01:00
Christoph Oelckers
010fd038be - scriptified A_KeenDie.
- added an 'exact' parameter to FThinkerIterator's Next function. This is mainly for scripting which allows to do a lot more checks natively when running the iterator while looking for one specific class.
2016-11-05 01:19:41 +01:00
Christoph Oelckers
8305005125 - remove debug message. 2016-11-03 13:39:51 +01:00
Christoph Oelckers
a45523fb63 - scriptified A_SpawnFly.
- added support for global variables to the code generator - not the compiler, though. For the handful of entries this is needed for it may just as well be done manually. So far FLevelLocals level is the only one being exported.
- fixed: The VM disassembler truncated 64 bit pointers to 15 digits because the output buffer was too small.
- resolve entire FxSequences instead of aborting on the first failed entry. This allows to output all errors at once.
2016-11-03 13:38:40 +01:00
Christoph Oelckers
570572fcf2 - scriptified a_hereticimp.cpp.
- fixed the comparison against 0 simplification which did not negate the result for '=='.
2016-11-02 11:44:48 +01:00
Christoph Oelckers
8b21719068 Merge branch 'zscript' of https://github.com/rheit/zdoom into zscript 2016-11-02 11:43:23 +01:00
Christoph Oelckers
f940216c17 Merge branch 'master' into zscript
# Conflicts:
#	src/p_actionfunctions.cpp
#	wadsrc/static/actors/actor.txt
2016-11-02 11:08:51 +01:00
Christoph Oelckers
5e76d3af18 - fixed BrainishExplosion and removed some unnecessary checks, the state to be set is being defined in the same file, after all... 2016-11-02 00:14:08 +01:00
Christoph Oelckers
88fd47247d - scriptified several trivial functions from a_action.cpp. 2016-11-01 16:32:47 +01:00
nashmuhandes
b420347bab Added "local" parameters to A_PlaySound and ACS PlaySound 2016-11-01 15:14:06 +01:00
Christoph Oelckers
6e0defdc69 - fixed numeric output precision for a few sliders. 2016-11-01 13:48:56 +01:00
Christoph Oelckers
e620c9bd7d - scriptified parts of a_bossbrain.cpp. Some things cannot be done yet, the script code is there but commented out.
- exported thinker iterator and drop item chain to scripting. Unlike its native counterpart the script-side iterator is wrapped into a DObject to allow proper handling for memory management.
- fixed: The VMFunctionBuilder only distinguished between member and action functions but failed on static ones.
- fixed: FxAssign did not add all needed type casts. Except for purely numeric types it will now wrap the expression in an FxTypeCast. Numeric handling remains unchanged for both performance reasons and not altering semantics for DECORATE.
- exported all internal flags as variables to scripting. They still cannot be used in an actor definition.
- make ATAG_STATE the same as ATAG_GENERIC. Since state pointers exist as actual variables they can take both values which on occasion can trigger some asserts.
- gave PClass a bExported flag, so that scripts cannot see purely internal classes. Especially the types like PInt can cause problems.

Todo: we need readonly references to safely expose the actor defaults. Right now some badly behaving code could overwrite them.
2016-10-31 17:03:26 +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
853c6f6684 - fixed initialization of local variables with other local variables.
- fixed several occurenced where vectors were treated as floats. NOTE: The entire codegen.cpp file needs to be carefully reviewed for bad use of the REGT_ constants, there's probably more places where using them has broken some type checks.
- fixed: committed test version of zscript.txt instead of changed actor.txt by accident.

Initialization and assignment for strings is working with this commit.
2016-10-29 16:49:21 +02:00
Christoph Oelckers
f5d1b1a491 - added vector builtins Length() and Unit().
This should complete the vector type except for use as function parameter.
2016-10-29 10:43:22 +02:00
Christoph Oelckers
286f9510d4 - got rid of all default parameter redundancies.
- scriptified a few more functions.
2016-10-28 00:32:52 +02: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
948ef62fcd - use the function defaults from the script instead of explicitly setting them again in the code. This is a needless cause of potential errors and since the values are readily available now it's better to use them in the functions.
- fixed: ZCCCompiler did not process array access nodes.
- fixed: Function argument names were not placed in the destination list by the compiler.
- scriptified several trivial functions from p_actionfunctions.cpp.
2016-10-27 15:53:53 +02:00
Christoph Oelckers
66b1f36e56 - actually evaluate the default parameters and store them in the VMFunction.
- disabled the assert in PType::GetRegType. This assert blocks any use to check for types that are incompatible with function parameters.
- pass the default parameter constants to the native functions. At the moment this is not used yet.
- use the function defaults to complete argument lists to script functions.
- fixed all default values that got flagged by the expression evaluator as non-constant. Most were state labels and colors which were defaulted to "". The proper value is null for states and 0 for colors.
- also replaced all "" defaults for names with "none".
2016-10-27 01:30:34 +02:00
Christoph Oelckers
d32d52c0b9 - scriptified a_spidermaster.cpp.
- fixed bad assert in XOR_RK instruction.
2016-10-26 17:21:25 +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
Christoph Oelckers
6d0dad3b38 - scriptified the code for the Demon and DoomImp. 2016-10-25 14:41:58 +02:00
Christoph Oelckers
449dfc3cdc - removed test file from zscript.txt. 2016-10-25 13:30:22 +02:00
Christoph Oelckers
e39bf9eaeb - made the bounce flags accessible after verifying that the code works for 16 bit variables.
- fixed a deprecation warning with the Heresiarch by replacing A_ChangeFlag.
2016-10-25 11:38:02 +02:00
Christoph Oelckers
656b8cb16e - added explicit setter functions for the count and link flags so that A_ChangeFlag and A_SetFlag can be deprecated. 2016-10-25 10:15:24 +02:00
Christoph Oelckers
3f1673f34f - scriptified A_HeadAttack, A_CyberAttack and A_Hoof. 2016-10-24 00:50:28 +02:00
Christoph Oelckers
9f8a5dae21 - scriptified A_BruisAttack.
- removed 'self' as a dedicated token. Internally this gets handled as a normal but implicitly named variable so the token just gets in the way of proper processing.
- removed P_ prefix from SpawnMissile export.
- fixed a crash with misnamed function exports.
2016-10-23 17:15:24 +02:00
Christoph Oelckers
5b952b116a - named class functions are working. Yay!!
- converted A_BspiAttack and A_BabyMetal to script functions to test the implementation.
2016-10-23 14:26:33 +02:00
Christoph Oelckers
46c7f1151f - restored zscript.txt. 2016-10-23 12:58:03 +02:00
Christoph Oelckers
a2116fc7bf - created an export for P_SpawnMissile so that I can do some tests with functions.
- allow class extensions.

These are separate blocks in different files that get concatenated to one class body for processing. The reason is to allow spreading the many functions in Actor over multiple files, so that they remain manageable. For example, all the Doom action functions should be in their respective files, but their symbols need to be in Actor. To extend a class, both files need to be in the same translation unit, so it won't allow user-side extension of internal classes.
2016-10-23 12:57:21 +02:00
Christoph Oelckers
f9cd2c9af7 - added switch/case processing. Right now it is just a sequence of test/jmp instructions. It may make sense to add a special opcode that can perform the comparisons natively but that's an option for later.
- added a TESTN instruction. This is like TEST but negates the operand. This was added to avoid flooding the constant table with too many case labels. With TEST and TESTN combined, all numbers between -65535 and 65535 can be kept entirely inside the instruction. Numbers outside this range still use a BEQ instruction.
2016-10-23 12:00:25 +02:00
Christoph Oelckers
371712c53a - turned everything I could into non-action functions.
- fixed emission of the self pointer in FxVMFunctionCall. I did not realize that the self expression only sets up a register for the value, not pushing it onto the stack.
2016-10-22 17:49:08 +02:00
Christoph Oelckers
32ac1a8ad7 - moved the special weapon functions from Inventory to StateProvider.
This will restrict them to the only classes that may use them: Weapon and CustomInventory.
Note: Should a mod surface which uses them improperly the better solution would be a warning message and NULLing the bogus code pointer instead of leaving them in Inventory.
2016-10-22 16:46:47 +02:00
Christoph Oelckers
3b0b0baf05 Merge branch 'master' of https://github.com/rheit/zdoom into zscript
# Conflicts:
#	wadsrc/static/actors/shared/player.txt
2016-10-21 19:31:08 +02:00
raa-eruanna
e0efdd97b3 - Added: PlayerPawn property "Player.ViewBob" which acts as a MoveBob/StillBob multiplier. 2016-10-21 19:24:39 +02:00
raa-eruanna
513f8312b3 - Renamed menu option for r_fullbrightignoresectorcolor 2016-10-21 08:36:20 -04:00
raa-eruanna
c76431414a - Implemented r_fullbrightignoresectorcolor from QZDoom 2016-10-21 07:06:24 -04:00
Christoph Oelckers
2fd4fa9660 Merge branch 'master' of https://github.com/rheit/zdoom into zscript
# Conflicts:
#	wadsrc/static/actors/doom/doomimp.txt
2016-10-20 10:44:53 +02:00
Magnus Norddahl
2fe545a4fd Merge r_stretchsky and r_capsky into r_skymode 2016-10-20 00:59:51 +02:00
Magnus Norddahl
5de8112578 Add support for capping sky with a solid color 2016-10-19 23:52:09 +02:00
Christoph Oelckers
f6b3cdc23d - converted the Chex Quest actors, completing the DECORATE conversion. 2016-10-18 23:22:41 +02:00
Christoph Oelckers
5643831ccc - converted all Strife actors. 2016-10-18 23:05:58 +02:00
Christoph Oelckers
1bdc1ccb6c - converted the remaining Hexen actors. 2016-10-18 18:11:13 +02:00
Christoph Oelckers
2c1d9a7a96 - another bunch of Hexen actors converted. 2016-10-18 15:15:06 +02:00
Christoph Oelckers
61cc7dbb29 - another batch of Hexen items converted.
- fixed parsing of named damage types and pain chances.
2016-10-18 10:09:02 +02:00
Marisa Heit
d2a9f7ac6f Fix Raise definition for DoomImp 2016-10-17 21:45:06 -05:00
Christoph Oelckers
4aecc4f565 - more Hexen conversions. 2016-10-18 00:49:13 +02:00
Christoph Oelckers
d66631478a - converted some Hexen stuff. 2016-10-17 23:27:34 +02:00
Christoph Oelckers
552f094ec1 - converted the rest of Heretic's actors.
- fixed: Boolean constants were not properly handled.
2016-10-17 12:58:23 +02:00
Christoph Oelckers
c13916ea18 - converted more Heretic actors. 2016-10-17 10:07:12 +02:00
Christoph Oelckers
c623539d2d Merge branch 'master' of https://github.com/rheit/zdoom into zscript 2016-10-17 00:33:28 +02:00
Christoph Oelckers
76f1b9d3f8 - converted the raven actors. 2016-10-17 00:21:52 +02:00
Christoph Oelckers
6650e2bbfb - converted some Heretic stuff to ZScript for testing.
- added type casts to the arguments of function calls.
- added string constant to state conversion to FxTypeCast.
2016-10-16 22:32:52 +02:00
Christoph Oelckers
afd9347087 - changed order of script files to match the old DECORATE list for easy comparison of the disassembly.
- added a descriptive name to all types for error messages.
- added a generic type cast node to the code generator.
- added a few more cast operations to the 'cast' VM instruction.
- extended FxClassTypeCast to handle all possible input that can be cast to a class pointer, not just names.
2016-10-16 19:42:22 +02:00
Marisa Heit
e4281454ce Split ANIMATED into three parts, filtered by game that uses them
- ANIMATED contained definitions for Doom, Heretic, and Strife, all
  crammed into a single file. This meant that animations from one game
  could erroneously make their way into maps for another game that
  provided custom textures with names that matched textures that animated
  in the other game. There are now three separate ANIMATED lumps with only
  the animations defined for the original game and no others. The one
  that gets loaded depends on the game being played.
- Added documentation for the ANIMATED file format to the comment for
  FTextureManager::InitAnimated(), since I had to figure it out from the
  code.
2016-10-15 21:40:24 -05:00
Christoph Oelckers
091da92819 - Added AStateProvider class which is used to define the special action function behavior of weapons and custom inventorys. The class itself does not do anything, but the compiler will use it to set up the action function prototypes differently which in turn will be used to do type checking during code generation. 2016-10-15 15:10:48 +02:00
Christoph Oelckers
784f7ed671 - converted all of Doom's actors.
- fixed a few problems that were encountered during conversion:
 * action specials as action functions were not recognized by the parser.
 * Player.StartItem could not be parsed.
 * disabled the naming hack for PowerupType. ZScript, unlike DECORATE will never prepend 'Power' to the power's name, it always needs to specified by its full name.
 * states and defaults were not checked for empty bodies.
 * the scope qualifier for goto labels was not properly converted to a string, because it is an ENamedName, not an FName.
2016-10-14 20:08:41 +02:00
Christoph Oelckers
9e2830a3db - converted the rest of actors/shared.
- moved damagetype definitions to MAPINFO. These were in DECORATE which is not correct. The old code is left for compatibility.
2016-10-14 10:46:15 +02:00
Christoph Oelckers
905e44713f - deprecated A_SetUserVar family for ZSCRIPT due to its muddled semantics. Better use direct variable access which is a lot safer and also provides better error checking. 2016-10-14 09:32:45 +02:00
Christoph Oelckers
7de683f9f5 - converted a few more DECORATE files.
- started with the AST converter. So far it only deals with direct function calls with simple constants as parameters.
- added an error condition for the defaults block to get rid of some asserts.
2016-10-14 00:40:20 +02:00
Christoph Oelckers
433bf46010 - removed token 'mode' because it isn't used anywhere and clashed with some actor properties.
- fixed uninitialized counter variable in DECORATE parser.
- allow dottable_id of xxx.color so that the property parser can parse 'powerup.color'.
- fixed crash with actor replacement in script compiler.
- add the lump number to tree nodes because parts of the property parser need that to make decisions.
- removed test stuff.
- converted inventory.txt, player.txt and specialspot.txt to ZSCRIPT. These were the minimal files required to allow actor.txt to parse successfully.
- removed the converted files from the DECORATE include list so that these are entirely handled by ZSCRIPT now.
2016-10-13 20:45:52 +02:00
Christoph Oelckers
59ed26c0b6 - resorted some of thingdef.cpp's contents into more appropriate files.
- split FinishActor into several functions. While DECORATE can, ZSCRIPT cannot do all this in one go.
- split the state finalization into several class-specific virtual functions.
2016-10-12 20:42:41 +02:00
Christoph Oelckers
900644e465 Merge branch 'master' of https://github.com/rheit/zdoom into zscript 2016-10-12 12:43:56 +02:00
Major Cooke
3de83b8943 Added PSPF_FLIP.
Flips the overlay on the X axis.
2016-10-11 17:20:58 -05:00
Major Cooke
5dc94a10c3 Added A_SetInventory.
- Sets the absolute amount of an inventory actor.
- Limits itself to the range [0, MaxAmount]. Setting beyondMax to true disregards the MaxAmount. Default is false.
2016-10-11 14:44:31 -05:00
Christoph Oelckers
d8c689d874 - initialize function symbols. At the moment all it does is process the existing native functions. Any further processing will be done once the base classes of the engine can be parsed from the scripting files.
- switched the types of the internal 'self' and 'stateowner' parameters so that they get assigned correctly. I can't tell if this will error out if fields get accessed from the caller with the wrong class, but for actual scripting to work these must be correct.

The committed 'actor.txt' can be parsed successfully, with the exception of a few subclass references that cannot be resolved yet.
2016-10-11 18:53:10 +02:00
Christoph Oelckers
6989b81688 - extended the grammar so that the DECORATE function declaration list can almost be used as-is, with the sole exception of requiring any action function to declare a return type, even if it is void.
This adds:
 * builtin types color, state and sound.
 * ending a parameter list with an ellipsis to declare a varargs list. (A_Jump uses this.)
 * allowing to declare optional arguments by giving them a default value.
 * adding an 'action' qualifier for function declarations.
2016-10-11 13:11:40 +02:00
Christoph Oelckers
acec2e5b07 Merge branch 'master' of https://github.com/rheit/zdoom into zscript 2016-10-11 00:57:31 +02:00
Major Cooke
31ca5a1900 Added OverlayX/Y(int layer)
- Retrieves the X/Y positions of an overlay.
- A_OverlayFlags and A_OverlayOffset now interpret a layer of 0 to mean 'use this calling layer'.
2016-10-10 10:48:50 +02:00
Christoph Oelckers
ad43f2bc7e - parse the list of class/struct fields and add the PField entries to their type.
- fixed a few issues with trying to access a class's Type before it got initialized.
2016-10-09 21:54:23 +02:00
Christoph Oelckers
49f18c0a19 - renamed the symbol tables holding the tree nodes so that the code becomes clearer to read. Necessary because the unclear naming caused:
- fixed: The tree nodes for classes and struct members were stored in the global tree nodes table.
- sort variable declarations into their own list for processing.
2016-10-09 09:09:17 +02:00
Christoph Oelckers
6bad4809c1 - uncommendted constants.txt after finishing work on the constants creation code. 2016-10-08 22:20:38 +02:00
Christoph Oelckers
08f313d011 - implemented complete resolving of constants - both global and class-local.
This uses a different algorithm as the old implementation - instead of recursively resolving unknown symbols it will first collect all constants from all scopes and then process them in one operation, doing multiple passes over the list until no more constants can be resolved anymore.
2016-10-08 22:16:10 +02:00
Christoph Oelckers
04d4bda262 - converted all constants to enums and gave the enums names. 2016-10-07 18:09:28 +02:00
Christoph Oelckers
6487681736 - started porting constants.txt 2016-10-07 17:49:00 +02:00
Christoph Oelckers
ee66d22034 Revert "- added an option to disable the pickup screen flash."
This reverts commit 2d320a2e86.

The feature has been superseded by pickup_fade_scalar and is no longer needed.
2016-10-07 08:46:06 +02:00
raa-eruanna
3ccc85876c - Forgot to add language entries. 2016-10-06 20:05:30 -04:00
raa-eruanna
02f66fa34e - Backported blood_fade_scalar from Skulltag
- Added new pickup_fade_scalar which works the same way for pickups
- Default for blood_fade_scalar is 1.0 instead of 0.5 from Skulltag.
2016-10-06 20:01:20 -04:00
Christoph Oelckers
5b350dcdd5 - gave Boom's point pusher and puller things the NOCLIP flag so that they won't get moved around by scrollers. 2016-10-05 16:27:12 +02:00
Christoph Oelckers
2d320a2e86 - added an option to disable the pickup screen flash. 2016-10-05 09:59:19 +02:00
Major Cooke
201ae3c60f Added OverlayID() for retrieving psprite layer numbers. 2016-10-03 00:44:06 +02:00
Christoph Oelckers
0bce6e3925 - added ACS and DECORATE setter functions for named translations. 2016-10-02 14:09:45 +02:00
Christoph Oelckers
51ffd6d9c6 - fixed some warnings.
- A_SetRenderStyle should not default to STYLE_None.
2016-10-02 01:00:07 +02:00
Christoph Oelckers
80f2f5829f - added A_SetRenderStyle function which replaces A_SetTranslucent. A_SetTranslucent had to be deprecated due to obsolete semantics of the renderstyle argument. 2016-10-02 00:43:05 +02:00
Marisa Heit
59e52b3e9b Fixed: Heretic platforms make a mid-move sound, unlike Doom's 2016-09-27 18:40:36 -05:00
Major Cooke
dfa4f38c8f Updated to new save game code. 2016-09-24 09:17:18 +02:00
Christoph Oelckers
d28d02839e - fixed: An actor's default stencil color should be set in DECORATE instead of doing some hackery elsewhere to compensate for the lack of initialization. 2016-09-23 19:19:26 +02:00
raa-eruanna
780d672b25 Adds user-definable weapon bob speed 2016-09-22 08:42:59 +02:00
Christoph Oelckers
3eb1af6957 - added a GetMissileDamage function to DECORATE which can be used to properly retrieve an actor's damage value.
The damage property should be considered deprecated inside expressions from now on.
2016-09-19 03:45:22 +02:00
Magnus Norddahl
e794e59cd2 Add con_scale for scaling just the console 2016-09-08 00:39:52 +02:00
Magnus Norddahl
6414e01354 Add uiscale slider controlling what scale the On setting uses for hud_scale, hud_althudscale and con_scaletext 2016-09-08 00:39:51 +02:00
Christoph Oelckers
da5cf760b0 - forgot to save this one... 2016-08-28 10:10:32 +02:00
Christoph Oelckers
e04055dbb2 - added multiple message levels for 'developer' CVAR so that the important stuff won't get drowned in pointless notification spam that's of no use to anyone.
- made 'developer' CVAR persist across launches and added some menu entries for it.
- added checks for 'developer' to ACS's CheckInventory function.
2016-08-28 09:55:04 +02:00
Christoph Oelckers
ca8ef7f3f3 - moved bobbing menu strings into the correct file. 2016-08-16 11:20:22 +02:00
Christoph Oelckers
04c4147052 - renamed flag to be more descriptive. 2016-08-16 09:02:23 +02:00
Major Cooke
aa2ca77412 Added damagetype parameter and XF_NOACTORTYPE to A_Explode.
- By default, A_Explode will refer to the actor's damagetype if using none. The flag forces the function's type if used regardless of type.
2016-08-16 08:59:27 +02:00
Major Cooke
ec14dd94a7 A_Explode now returns the number of actors damaged and can be used in expressions.
- Enemies that do not take damage in any way are not counted.
2016-08-12 09:17:20 +02:00
Christoph Oelckers
b4e712ab01 - made disabling the push window check a real compatibility option.
No idea why this was a hidden one, this one definitely needs to be in the menu.

- set some required compatibility options for Super Sonic Doom.
2016-08-09 20:15:13 +02:00
Christoph Oelckers
ab837b608d - compatibility optioned triggering sector actions by indirectly initiated teleports
There's several old maps depending on this not happening.

- Set the option for Hell's Twisted Influence Part 1.
2016-08-07 22:04:16 +02:00
Magnus Norddahl
a893013dbb Adds HUD quadruple scale and a scale slider for the crosshair 2016-08-05 12:20:34 +02:00
Christoph Oelckers
2c38e20352 - update xlat/eternity.txt for reference. 2016-08-03 13:16:14 +02:00
Leonard2
8068792f4b Fixed: A_RadiusGive had an incorrect definition 2016-07-31 09:06:14 +02:00
Xaser Acheron
a1a0da1f13 added SWF_SELECTPRIORITY flag to A_SelectWeapon 2016-07-29 18:48:54 -05:00
Major Cooke
13fa06fe7a Renamed GetProximity to CountProximity.
# Conflicts:
#	wadsrc/static/actors/actor.txt
2016-07-30 00:27:12 +02:00
Major Cooke
167cb28563 Added GetProximity(classname, distance, flags, ptr).
- Behaves similarly to A_CheckProximity but returns the count of classname instead of true/false.

# Conflicts:
#	wadsrc/static/actors/actor.txt
2016-07-30 00:26:55 +02:00
Major Cooke
dfed6ac1fb Added SpriteAngle and SpriteRotation properties.
- Includes four functions, A_SetSprite(Angle/Rotation) and GetSprite(Angle/Rotation).
- SpriteRotation offsets the angle of the sprite, allowing for actors to move backwards or sideways for example.
- SpriteAngle requires +SPRITEANGLE and sets the actor's sprite to the absolute rotation found at that angle. Overrides SpriteRotation once the flag is on.
2016-07-30 00:26:40 +02:00
MajorCooke
3d9591229e Added A_CopySpriteFrame(from, to, flags)..
- Copies a sprite/frame from one actor pointer to another. Sprite and/or frame copying can be disabled with flags CPSF_NO<SPRITE/FRAME>.
2016-07-28 08:39:32 +02:00
Blue-Shadow
69a00ddabb Added TRANSFERTRANSLATION morph flag 2016-07-24 00:56:57 +02:00
yqco
4d6532d303 Added RGF_NORANDOMPUFFZ flag for A_CustomRailgun and A_RailAttack 2016-07-22 02:46:41 -06:00
Blue-Shadow
c428e376cd Added INFLICTORDMGTYPE flag to A_Damage* action functions
It forces the use of the inflictor's damagetype instead of whatever is
passed to the functions.
2016-07-19 08:34:55 +02:00
MajorCooke
35c30ab62f Fixed missing constants. 2016-07-16 20:28:43 -05:00
MajorCooke
3c7e1e0528 - Added the tracer actor spawning for A_FireBullets and A_CustomBulletAttack.
The projectiles spawning conditions rely upon the puff successfully spawning.

# Conflicts:
#	wadsrc/static/actors/actor.txt
2016-07-16 17:34:15 +02:00
alexey.lysiuk
da9f4cc1dd Added 'ammo display order' item to options menu 2016-07-16 16:15:59 +02:00
MajorCooke
b121284fc0 Added GAF_SWITCH to GetAngle, inverting the function to get the caller's angle on the pointer instead. 2016-07-14 17:14:17 +02:00
m-x-d
1cf51791de Adds //%Title property to all locks to make parsing LOCKDEFS by map editors more feasible.
Fixes: Strife Base key Message now uses LANGUAGE string.
2016-07-12 23:52:04 +02:00
Christoph Oelckers
522b2f4706 - updated xlat/eternity.txt for reference. 2016-07-12 23:50:45 +02:00
Christoph Oelckers
0b93e9b897 Merge branch 'roll' of https://github.com/MajorCooke/zdoom 2016-07-04 00:43:16 +02:00
Christoph Oelckers
148de414e0 - fixed: Checking for quest item 0 should not print an error message but silently fail. 2016-07-03 13:32:40 +02:00
Christoph Oelckers
593e2f7641 - fixed spelling. 2016-06-29 13:03:39 +02:00
jayman2000
43e62c4236 Added sliders in the display options menu to control movebob and stillbob. 2016-06-29 13:02:55 +02:00
Christoph Oelckers
ce0c2863b0 - set 'maskedmidtex' compatibility option for Caverns of Darkness MAP07. 2016-06-21 10:31:25 +02:00
MajorCooke
26408a5043 Switched the pointer to AAPTR_DEFAULT. 2016-06-20 09:11:38 -05:00
MajorCooke
85a34bbb88 Added GetPlayerInput(int numinput, int ptr = AAPTR_PLAYER1).
- Works exactly like the ACS version, but with pointers instead. The pointer can be anything, so long as it can be identified as a player.
2016-06-20 08:49:57 -05:00
MajorCooke
630dc8c8cd Fixed execution prevention. 2016-06-19 22:18:43 -05:00
MajorCooke
dd410876cf Added A_ClearOverlays(int start, int stop, bool safety).
- Clears a set of overlays in ranges [start,stop]. If unspecified, wipes all non-hardcoded layers. Safety determines whether to affect core layers or not (i.e. weapon). Returns the number of layers cleared.

Added no override boolean to A_Overlay and a boolean return type.

- If true, and a layer already has an active layer, the function returns false. Otherwise, sets the layer and returns true.
2016-06-20 01:15:49 +02:00
Christoph Oelckers
7ccdbf9b62 Merge branch 'PSprites' 2016-06-16 16:16:16 +02:00
Xaser Acheron
de0301a704 split bfg self-damage code into its own function, A_RadiusDamageSelf 2016-06-16 00:43:07 +02:00
Xaser Acheron
481ef7a5b5 added SMMU-BFG11k-style 'damrad' property to A_BFGSpray 2016-06-16 00:43:07 +02:00
Xaser Acheron
8e8248284a added BFGF_HURTSOURCE and BFGF_MISSILEORIGIN to A_BFGSpray 2016-06-16 00:43:06 +02:00
MajorCooke
2d4eb8dde4 - Added limit parameter to A_RailAttack and A_CustomRailgun. 2016-06-14 18:20:43 -05:00
MajorCooke
fb286d1737 - Changed endsize to sizestep. Endsize affected more things than I thought it would. 2016-06-11 08:05:29 -05:00
Leonard2
ebe3f23677 Added GetCVar(string name)
Works like ACS's GetCVar
2016-06-11 10:15:49 +02:00
MajorCooke
f787056198 - Added endsize parameter and SPF_NOTIMEFREEZE for A_SpawnParticle.
SPF_NOTIMEFREEZE processes particles with this flag regardless of time freeze. The endsize parameter changes the scale of the particle to that size throughout its lifetime linearly.
2016-06-11 10:00:50 +02:00
Leonard2
afa708c138 Allow psprite layers to be manipulated directly from the player's own body 2016-06-03 19:18:58 +02:00
Leonard2
543414d31f Added 2 new layer flags: PSPF_CVARFAST and PSPF_POWDOUBLE
These flags allowed to easily restore a lost part of the targeter layers
behavior
2016-06-03 00:50:11 +02:00
Christoph Oelckers
9cf1d96698 - added identification for delaweare.wad to the list of supported IWADs. 2016-06-02 12:04:35 +02:00
MajorCooke
bb91723174 - Added GetCrouchFactor(ptr).
Gets the crouch factor of a player. Can be set to target/master/tracer, as long as it's a player. Defaults to the first player.
2016-05-29 12:43:46 +02:00
MajorCooke
2719905ade - Added source and inflictor parameters to all A_Damage/Kill functions.
- Source is the actor to blame for the cause of damage (monster infighting for example). For missiles, modders should consider setting to AAPTR_TARGET.
- Inflictor is the actor doing the damage itself. Note that by changing this, it will take into account the flags on the pointed actor.
2016-05-29 12:40:17 +02:00
Roadcrosser
334962da2c Corrected death message not being gender neutral. 2016-05-29 12:38:36 +02:00
Leonard2
2f5ae3b51e Changed the default layer indices and renamed them
Note that this doesn't compile yet
2016-05-28 01:19:41 +02:00
Leonard2
c82620129c Added A_OverlayFlags
Allows psprites to follow the weapon and/or the player's bobbing
2016-05-28 01:19:40 +02:00
MajorCooke
1b1195df6a - Added limit parameter to A_RadiusGive.
- The function ends operation if the number of successfully given actors reaches this count.
2016-05-23 21:11:26 -05:00
Leonard2
8c205ebac3 Added A_OverlayOffset
Like A_WeaponOffset except it can access any psprites
2016-05-20 17:04:45 +02:00
Leonard2
1ecfb5897b Added A_Overlay 2016-05-20 17:04:45 +02:00
Christoph Oelckers
f22adcc398 - be more thorough with Eternal Doom MAP03. The compatibility option does not seem to fully solve the problem, so let's just clear the tags in the bogus stair sectors. 2016-05-18 21:06:07 +02:00
Christoph Oelckers
ae3f50d1b2 - set a compatibility option to build the stairs in Eternal Doom MAP03 correctly. 2016-05-18 13:11:31 +02:00
MajorCooke
cd3a3d4472 Not like this makes a difference. 2016-05-18 11:19:24 +02:00
MajorCooke
115dbd0b58 - Added A_WeaponOffset(x = 0, y = 32, flags).
- Places the weapon offset by the defined x and y. Both are floats. This stacks with weapon bobbing.
- WOF_KEEPX: Don't change the X offset.
- WOF_KEEPY: Don't change the Y offset.
- WOF_ADD: Add onto instead of replacing the coordinates.
2016-05-18 11:19:24 +02:00
MajorCooke
2ba26693d1 - Added 3D Floor + Portal awareness, along with flags to turn off detection of both features. 2016-05-12 22:15:06 +02:00
MajorCooke
b91ed5dc5d Added GetZAt DECORATE function.
- float GetZAt(x, y, angle, flags, pick_pointer);
- Gets the floor z  at x distance ahead and y distance to the side in relative form from the calling actor pointer. Flags are as follows (GZF_ prefix):
- CEILING: Returns the ceiling z instead of floor.
- ABSOLUTEPOS: x and y are absolute positions.
- ABSOLUTEANG: angle parameter does not add the pointer's angle to the angle parameter.
2016-05-12 22:15:05 +02:00
MajorCooke
39f64383cb Changed RTF_THRUSTZ to match RADF_THRUSTZ's bitmap. 2016-05-11 19:41:33 +02:00
MajorCooke
952219a018 Added RTF_THRUSTZ for A_RadiusThrust.
- Allows thrusting with Z velocity.
2016-05-11 19:41:33 +02:00
MajorCooke
0bf7c3e362 - Removed FlatAngle. This will come back hopefully in another commit sometime in the future. 2016-05-01 17:19:39 -05:00
MajorCooke
f41dcc75d1 FlatAngle can now be defined directly via properties. 2016-05-01 16:33:00 -05:00
MajorCooke
a8248433e9 - Updated <pitch>/flat/roll/wall sprites submission to 2.9+. (ZDoom compatibility submission. )
- FLATSPRITE: An actor becomes flat as if they were a decal on the floor.
- PITCHFLATSPRITE: A flat sprite tilts up and down based on pitch.
- WALLSPRITE: Similar to a Y billboarded sprite. The degree of the flattening is determined by the FlatAngle property.
- ROLLSPRITE: The sprite of the actor is affected by the Roll property.
2016-05-01 08:45:50 -05:00
Christoph Oelckers
4a72c7d2f1 - fixed: Decals may not be serialized before thinkers.
Since decals may have thinkers attached this will crash when such a savegame gets loaded, because the thinker lists get reset in P_SerializeThinkers, deleting any thinker that already was processed.
I also added an error message that immediately aborts the save process if such an out-of-sequence thinker is attempted to be written out.
This obviously breaks savegame compatibility again...
2016-04-29 11:44:17 +02:00
MajorCooke
6f11a65893 - Converted rollIntensity from int to double.
- It was already a double in the save version serialization so nothing had to be changed there.
2016-04-27 12:58:18 -05:00
MajorCooke
c972caa9f3 - Added rollIntensity and rollWave to A_QuakeEx.
- Instead of moving the camera around, it rolls the camera.
- This only has an effect in GZDoom.
2016-04-27 13:42:15 +02:00
Christoph Oelckers
f5afa30ee6 - added GetAngle(bool relative, int target) DECORATE function. 2016-04-27 11:52:52 +02:00
Christoph Oelckers
61b165ccc4 - fixed the camera height setting for the camera actors.
The scripting branch changed camera semantics to default to an actor's center - which for monsters and decorations makes sense - but not for simple mapspots that get used as camera. For those the CameraHeight must be explicitly set to 0.
2016-04-27 11:38:54 +02:00
Christoph Oelckers
172290224b - make modes 2 and 3 of Teleport_NoFog compatible with Eternity by defaulting to mode 1 when no line is available. 2016-04-25 01:01:28 +02:00
Randy Heit
593f6c29ad Use 2 decimal places for volume sliders, since they move in 0.05 increments 2016-04-23 22:38:55 -05:00
Christoph Oelckers
f420ccd287 - made Teleport_NoFog compatible with Hexen and Eternity.
ZDoom defaulted to Boom's (buggy) angle adjustment.
Changed it so that
 * Mode 0 is like Hexen, performing no adjustment at all. This still should match all known maps using this special.
 * Mode 1 remains unchanged.
 * Mode 2 replicates Boom's broken angle adjustment and is used in the xlat file.
 * Mode 3 implements the correct angle adjustment that Boom originally intended.

 (Note: Should some map require something different it should be handled with compatibility.txt instead of reverting this back to the broken way it was before.)
2016-04-23 21:32:40 +02:00
Christoph Oelckers
ed070cfe06 - updated xlat/eternity.txt. 2016-04-21 13:01:57 +02:00
Randy Heit
074bce643a Fixed: A_SetAngle had accidentally had the "action" specifier removed 2016-04-20 20:03:05 -05:00
Christoph Oelckers
082042818b - refactored sector portal data so that it does not rely on actors.
This is necessary because otherwise the level data cannot be serialized before the actors.
2016-04-20 19:20:11 +02:00
Randy Heit
60966f472f Revert "Revert "Remove "action" from Actor functions that don't actually need it""
- This reverts commit 06216d733e.
- I don't know what I was thinking. Since stateowner is always available
  to the wrapper function, and this code is only generated for the wrapper
  function, it's a nonissue. The state is already located before calling
  any function that uses it.
2016-04-19 21:09:15 -05:00
Randy Heit
06216d733e Revert "Remove "action" from Actor functions that don't actually need it"
- This reverts commit 39df62b20e.
- Anything that needs to lookup a state also needs stateowner. See
  FxMultiNameState::Emit(). I will need to be more selective when
  de-actionifying functions.
2016-04-19 20:56:43 -05:00
Randy Heit
5d3e413d42 Make A_Stop an action function again
- A_Stop takes no parameters, so it should be an action function to avoid
  creating the wrapper when called.
2016-04-19 20:46:30 -05:00
Randy Heit
39df62b20e Remove "action" from Actor functions that don't actually need it
- An actor function really only needs to be an action function if:
  1. It can be called with no parameters specified, either because it takes
     none or because all its parameters are optional. This lets SetState()
     call it directly without creating a wrapper function for it.
  2. It wants access to the callingstate or stateowner parameters. Most
     functions don't care about them, so passing them is superfluous.
2016-04-19 20:28:49 -05:00
Randy Heit
c795f29cc4 Reduce calling overhead for A_SetUser* functions by making them non-action functions 2016-04-18 23:18:34 -05:00
Christoph Oelckers
30a530b178 - fixed: TAG_BLASTERP was on the wrong actor. 2016-04-19 02:06:36 +02:00
Christoph Oelckers
e48c4d3e44 - added tag strings for Heretic's powered weapon versions. 2016-04-19 01:00:09 +02:00
Christoph Oelckers
fd27c8db9e Merge branch 'master' into floatcvt
# Conflicts:
#	src/dobjtype.cpp
#	src/dobjtype.h
#	src/version.h
2016-04-04 01:21:24 +02:00
Randy Heit
0cc2705b99 Added A_LogFloat 2016-04-03 16:12:35 -05:00
Christoph Oelckers
0eb35d6c6e Merge branch 'master' into floatcvt
# Conflicts:
#	src/dobjtype.cpp
#	src/dobjtype.h
2016-03-30 09:47:25 +02:00
Randy Heit
b6e3358b1c Add A_SetUserVarFloat and A_SetUserArrayFloat 2016-03-29 22:41:37 -05:00
Christoph Oelckers
70d87f94f2 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_acs.cpp
#	src/r_utility.cpp
#	src/thingdef/thingdef_codeptr.cpp
#	src/version.h
2016-03-23 14:15:24 +01:00
MajorCooke
b16e696157 - Added offset and angle parameters to A_CheckBlock.
- Includes 2 flags, affixed by CBF_: AbsolutePos, and AbsoluteAngle.
- AbsolutePos: Absolute position of where to check.
- AbsoluteAngle: Angle parameter is used as is, not added onto the actor's current angle.
2016-03-23 14:05:31 +01:00
Christoph Oelckers
0d1fbcf65f - flattened the following commits by Major Cooke:
* Added falloff parameter to A_QuakeEx.
- Treated just like A_Explode's 'fullradiusdamage' parameter, where the quake will fall off from this distance on out to the edge. Default is 0, which means no falloff.
- Credits to MaxED and Michaelis for helping.

* - Added HighPoint parameter to QuakeEx.
- Allows fine tuning of where the quake's maximum or minimum occurs, in tics. This must be a range between [1, duration).
- For up or down scaling quakes, this sets the quake to reach maximum sooner or start minimizing later.
- For both, this indicates when the strongest will occur. Default is 0, or in the middle.

The original commits were nearly impossible to find in the convoluted commit tree, so I think it's preferable to have one clean commit instead.
2016-03-23 14:03:10 +01:00
Christoph Oelckers
f60eac8dc0 - floatified FMapThing, dropoffz and GetBobOffset 2016-03-23 12:21:52 +01:00
Christoph Oelckers
af427b80bd - did some cleanup and consolidation on damage factor code while converting it all to floating point.
- made armor properties floating point.
2016-03-22 16:35:41 +01:00
Christoph Oelckers
cf79e1cb6d - fixed some leftover fixed point remnants in g_hexen.
- made the full-coordinate version of P_SpawnPlayerMissile use float coordinates.
2016-03-22 00:30:56 +01:00
Christoph Oelckers
51b05d331d - replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed.

Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
2016-03-20 00:54:18 +01:00
Christoph Oelckers
51ab60178a - added portal overlays to automap. 2016-03-13 12:33:58 +01:00
j-palomo
0269aeea80 Fixed: MNU_COLORPICKER defined twice in language.eng 2016-03-13 02:56:20 +01:00
alexey.lysiuk
c7c2beee2c Fixed A_Blast parameter type and default values
Default values for strength and speed parameter are fixed type, not integers
Also strength parameter needs to have floating point type
2016-03-12 13:11:46 +02:00