Commit graph

82 commits

Author SHA1 Message Date
Christoph Oelckers
1e9ef2b1df - started scriptifying the level intermission screen. This compiles but is not active yet.
- allow treatment as one-character string constants as character constants. This became necessary because name constants already use single quotes and are much harder to repurpose due to a higher degree of ambiguity.
- fixed: protected methods in structs were not usable.
2017-03-18 12:18:15 +01:00
Christoph Oelckers
7df698dad8 - implemented the parser basics of a ZScript versioning system.
Note that this completely disables the newly added keywords 'play' and 'ui' for unversioned code to allow using them as identifiers as I have found at least one mod that uses a variable named 'play' that would have been rendered broken otherwise.
This also disables many ZScript only keywords for other parsing jobs.
2017-03-05 14:13:00 +01:00
Christoph Oelckers
58be506a73 - made intermission screen more scripting friendly. 2017-02-24 00:28:33 +01:00
Christoph Oelckers
3c8a5fdbe7 - scriptified the drawer functions of the conversation menu. 2017-02-19 12:28:05 +01:00
Christoph Oelckers
2440951811 -scriptified the ReadThis screen. 2017-02-19 00:08:30 +01:00
Christoph Oelckers
aabcc1f92e - scriptified the input functions of DMessageBoxMenu. 2017-02-18 23:05:01 +01:00
Christoph Oelckers
128dfdeee6 - made some of the load/save menu's data a bit more scripting friendly, this mostly means removal of static string buffers. 2017-02-18 12:36:31 +01:00
Christoph Oelckers
416911587e - scriptified PlayerMenu.Drawer 2017-02-17 16:53:36 +01:00
Christoph Oelckers
2234d36c7a Merge branch 'thereisnospoon' of https://github.com/jewalky/gzdoom
# Conflicts:
#	src/dobject.h
2017-02-14 19:10:02 +01:00
Christoph Oelckers
7b2ec1f737 - removed obsolete include for zscript. 2017-02-13 20:01:56 +01:00
Christoph Oelckers
c403fc5635 - renamed a file. 2017-02-13 18:30:03 +01:00
Christoph Oelckers
7877bcbdcb - exported more parts of the joystick menus and also exported all strings for them to the string table.
- exported the skeleton definition for list menus.
2017-02-13 17:45:03 +01:00
Christoph Oelckers
12db190f41 - scriptified the CVar printers for the gameplay and compatibility menus. 2017-02-12 23:17:05 +01:00
Christoph Oelckers
2b977f70e6 - scriptified the video mode menu (only the part that extends the actual menu class, the entire thing is basically non-modifiable but this code would otherwise stand in the way of properly handling the rest of the menus.) 2017-02-12 23:05:39 +01:00
Christoph Oelckers
b6ad14a614 - made adjustments to text input menu to work with scripts. 2017-02-12 21:45:37 +01:00
Christoph Oelckers
f0e925c5a7 - scripted color picker fully working. 2017-02-12 20:20:47 +01:00
Christoph Oelckers
947b625c50 - all menu items scriptified, but not yet active. 2017-02-11 16:11:48 +01:00
Christoph Oelckers
f91d91d6e8 - all optionmenu items scriptified, but not integrated yet. 2017-02-11 00:36:53 +01:00
Christoph Oelckers
07ba75762b - the first menu function has been scriptified. 2017-02-10 00:25:50 +01:00
Christoph Oelckers
7efa9cd70d - made the menu descriptors garbage collectable and started exporting some fields as preparation for script work on the menu. 2017-02-09 20:18:53 +01:00
ZZYZX
e4970189b6 Tactical merge 2017-02-05 19:14:56 +02:00
Christoph Oelckers
d5b908186c - some work on the base classes for menus. None of this is being used yet. 2017-02-04 00:19:25 +01:00
ZZYZX
ce616f9c06 Added: prototype event system 2017-01-23 20:48:57 +02:00
Christoph Oelckers
42f3ccc602 - scriptified a few parts of p_pspr.cpp.
- added a speed parameter to A_Lower and A_Raise in the process.
2017-01-19 13:26:46 +01:00
Christoph Oelckers
30a8541a15 - scriptified the weapon piece functions.
- fixed: ClearInventory did not process depleted items properly.
- changed HexenArmor from UNDROPPABLE to UNTOSSABLE because this allowed to remove some special handling in ClearInventory. The only other place which checks this flag also checks UNTOSSABLE.
2017-01-18 17:26:12 +01:00
Christoph Oelckers
14f2c39e58 - scriptified cht_Give and cht_Take and made them virtual function of PlayerPawn so that this can be better configured for mods that want other options in here.
- improved the class pointer to string cast to print the actual type it describes and not the class pointer's own type.
- fixed: The 'is' operator created non-working code when checking the inheritance of a class pointer, it only worked for objects.
2017-01-17 17:34:39 +01:00
Christoph Oelckers
9f9cea4b4a - scriptified the health items. 2017-01-15 01:02:38 +01:00
Christoph Oelckers
a597979738 - scriptified ammo.
- moved inventory stuff into its own directory.
2017-01-14 21:27:31 +01:00
Christoph Oelckers
f83444f3cc - exported the sound sequence interface to scripting.
- split out the map data definitions from base.txt into their own file.
2017-01-14 13:02:08 +01: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
Christoph Oelckers
de4153ceaf some groundwork for the implementation of dynamic arrays
- created script exports for all relevant functions with all integral types.
- created script side definitions for the underlying data types.
- added a void pointer type so that the prototype for the pointer array can use a generic type every pointer can be assigned to.
2017-01-11 00:57:31 +01:00
Christoph Oelckers
19856d6ccb Merge branch 'master' of https://github.com/rheit/zdoom 2016-12-25 22:56:35 +01: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
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
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
0da233a664 changed ZScript include mechanism.
* It will now use #include, just like most other definition formats and can be mixed with regular definitions. However, due to how the Lemon-generated parser works this will not recursively pull in all files, but store them in a list and process them sequentially. Functionally this shouldn't make a difference, because ZScript is mostly order-independent - the only thing where order is important is native classes, but these are completely internal to zdoom.pk3 where proper order is observed.
2016-12-03 13:16:09 +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
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
e01f680b72 - scriptified the Mauler, completing Strife. 2016-11-29 14:32:49 +01:00
Christoph Oelckers
b625156df6 - scriptified Strife's flamethrower and grenade launcher. 2016-11-29 14:12:39 +01:00
Christoph Oelckers
5beebb83b7 - scriptified Strife's assault gun and missile launcher. 2016-11-29 13:28:43 +01:00
Christoph Oelckers
be5ba70ed2 - scriptified Strife's dagger and crossbow. 2016-11-29 13:00:07 +01:00
Christoph Oelckers
edd8e51a69 - scriptified most of a_strifestuff.cpp. 2016-11-28 23:30:14 +01:00
Christoph Oelckers
4f370ba181 - scriptified the Phoenix Rod, completing the Heretic weapons. 2016-11-25 18:13:08 +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
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
Christoph Oelckers
3f5bf88d69 - scriptified Heretic's mace.
- fixed: FxAssignSelf did not the correct number of registers for vector operations.
- fixed a few asserts in vector2 instructions.
- turned the virtual AActor::HitFloor method into a flag MF7_SMASHABLE. The only use of this function was to kill Hexen's pottery when they hit the floor, and this looks like something that can be exposed to modders less clumsily.
2016-11-24 13:45:43 +01:00
Christoph Oelckers
677d7579d4 - scriptified Heretic's crossbow and gauntlets. 2016-11-24 11:29:51 +01:00
Christoph Oelckers
2ece9b6172 - scriptified Heretic's staff and wand. 2016-11-24 10:39:16 +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