Commit Graph

106 Commits

Author SHA1 Message Date
Christoph Oelckers 745b96beec - made the status screen a class and scriptified a few more functions. 2017-03-18 15:45:36 +01:00
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 44a087554f - moved the OpenGL fog properties to FLevelLocals to simplify their handling.
- added access to the glow properties for ZSCript and ACS.
2017-03-14 13:54:24 +01:00
Christoph Oelckers 6db355a947 - added a callback to menu items for when a new menu gets created.
- added a StartSlideshow ACS and ZScript command and extended the functionality to specify the slideshow's name when starting it.

This is for triggering any kind of intermission definition in the middle of a level - keep in mind that this may not be set up to loop!
2017-03-14 10:41:13 +01:00
Christoph Oelckers cd392e50e9 - added a dummy struct named '_' to define global variables. This can only be used internally.
This method was chosen because it avoids adding variable declarations to the global namespace which would have required a lot more work while polluting the grammar.
This way the global variables can be handled by a small bit of special coding in the struct generator.
2017-03-13 14:42:14 +01:00
Christoph Oelckers 5fd86cf98c - added some syntactic help to the ZScript parser to allow defining the arrays with native structs on the script side instead of having to define them internally. 2017-03-13 12:51:09 +01:00
Christoph Oelckers ef3421eee5 - moved dynamic lights out of the GL code into the common game code.
Since the true color software renderer also handles them there is no point keeping them on the GL side.
This also optimized how they are stored, because we no longer need to be aware of a base engine which doesn't have them.
2017-03-12 19:57:06 +01:00
Christoph Oelckers 3113faedcf - fixed bad syntax. 2017-03-09 17:42:25 +01:00
Christoph Oelckers 420f71fc4f - added a BlockLinesIterator script class. 2017-03-09 16:45:48 +01:00
Christoph Oelckers 9d6b5f7015 - switched the menu code over to the data types of the event system.
Note that this will require adjustment of all menu code which overrides the Responder method!
2017-03-06 22:27:51 +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 5551f3a8c5 - declared the sectorplanes in Sector as read only and marked all relevant functions in the planes themselves const.
This is to block modification of the planes directly. For future-proofness with renderer changes everything that alters these values should go through he function interface.
2017-03-04 11:48:36 +01:00
ZZYZX 723f9770a4 Merge remote-tracking branch 'gz/master' into gz_master2 2017-03-03 23:33:02 +02:00
Christoph Oelckers 851984efe0 - made GetDeathHeight a virtual scripted function.
- made GetGibHealth a virtual scripted function.
- removed a few more native meta properties.
2017-02-28 13:40:46 +01:00
Christoph Oelckers b2a1e03d7e - fprgot to commit the script-side definition of STAT_STATIC. 2017-02-25 17:14:03 +01:00
Christoph Oelckers 47ff6ec33f - converted the intermission stat screen into a class so that its contents can be better exposed to ZScript. 2017-02-22 23:52:25 +01:00
Christoph Oelckers 9089beb110 - scriptified most of the remaining parts of DMenu. Only the engine interface remains native now. 2017-02-19 15:23:33 +01:00
Christoph Oelckers e05242e44d - scriptified the remaining parts of the conversationmenu.
- do not resolve the backdrop texture to a texture ID at load time. This will allow custom menu classes to use this info differently.
- added a new ZSDF userstring property to dialog pages to give mods more means for customization.
- allow overriding the conversation menu class both globally through MAPINFO and per conversation in ZSDF.
2017-02-19 14:21:49 +01:00
Christoph Oelckers d85b9cdd71 - scriptified the input methods of DConversationMenu.
- fixed handling of DimAllowed.
2017-02-19 13:07:49 +01:00
Christoph Oelckers 2440951811 -scriptified the ReadThis screen. 2017-02-19 00:08:30 +01:00
Christoph Oelckers e46571c192 - DMessageBoxMenu is fully scriptified. 2017-02-18 23:39:02 +01:00
Christoph Oelckers f5a0f6b3bf - almost done with TextEnterMenu. 2017-02-18 21:18:23 +01:00
Christoph Oelckers 0c41a9dee7 - scriptified DTextEnterMenu::Drawer. 2017-02-18 20:12:06 +01:00
Christoph Oelckers 872969eb14 - scriptified the LoadMenu class and exported the entire interface to handle the LoadSaveMenu. 2017-02-18 14:08:16 +01:00
ZZYZX afc9050a43 Marked Thinker play. Marked OnDestroy and Destroy virtualscope. It compiles :D 2017-02-18 06:56:00 +02:00
ZZYZX b5ab011bb9 Static virtualscope checking. This is possible, because virtualscope can't produce false positives (data readable for everyone), only false negatives (which are handled at runtime later) 2017-02-18 04:07:12 +02:00
Christoph Oelckers 49a07180c0 - scriptified ClassChanged. 2017-02-17 23:56:22 +01:00
ZZYZX 338e676e73 Allow calling const methods on readonly structs 2017-02-17 19:25:29 +02:00
Christoph Oelckers 4df2a221a8 - fixed: The special called by the InterpolationSpecial actor must have no activator.
This required splitting A_CallSpecial into a direct wrapper around P_ExecuteSpecial and implementing itself as a script function calling ExecuteSpecial so that this special case can use a version of the function that can be used without an activator.
2017-02-15 22:49:13 +01:00
Christoph Oelckers 6fef653aa1 - exported GetUDMF methods to scripting. 2017-02-15 01:03:47 +01:00
Christoph Oelckers 6e2b0bc961 - renamed the internal InpuEvent to deconflict from the version in the event system. 2017-02-14 19:32:44 +01:00
Christoph Oelckers 6525e04118 - added restrictions to CVAR and CCMD access functions for the menus. CVAR changes are only allowed when the menu is open or for mod-CVARs. The CCMD execution function is now private to the control requiring it and heavily guarded against improper access from the outside so that abuse is mostly impossible.
This also means that the remaining scriptification of the menu is on hold. The player menu would require even more access to critical game data, which is a no-go, and the other remaining menus offer little benefit from getting scriptified.
2017-02-13 19:18:45 +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 dbf3530696 - the keybinding control works again, this time fully scripted. 2017-02-12 18:38:23 +01:00
Christoph Oelckers 2e9c1ec3f3 - fixed translation setup for player backdrop.
- fixed return value of GetAction method of menu controls.
2017-02-12 16:48:29 +01:00
Christoph Oelckers 03283de4e8 - fixed issues with option menu items.
- fixed the octal parser in strbin.
- remove 'new' token because it gets in the way.
2017-02-12 16:02:55 +01:00
Christoph Oelckers 4562695854 - fixed stringtable access in menus. 2017-02-12 14:28:38 +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 8c780ab7ff - exported the drawer function of the colorpicker menu. 2017-02-10 13:21:35 +01:00
Christoph Oelckers be9b2b38fc - ColorpickerMenu.MouseEvent exported. 2017-02-10 11:44:46 +01:00
Christoph Oelckers 07ba75762b - the first menu function has been scriptified. 2017-02-10 00:25:50 +01:00
Christoph Oelckers 4e1300ecbe - added a script export for ACS's ReplaceTextures function. 2017-02-09 12:02:07 +01:00
Christoph Oelckers 8277299135 - Turned DropItem into a plain struct again like it was before the scripting branch got merged.
Making this an object had little to no advantage, except being able to remove the deleter code. Now, with some of the class data already being allocated in a memory arena so that freeing it is easier, this can also be used for the drop item lists which makes it unnecessary to subject them to the GC. This also merges the memory arenas for VM functions and flat pointers because both get deleted at the same time so they can share the same one.
2017-02-08 20:37:22 +01:00
ZZYZX 124d025131 More string methods 2017-02-06 12:35:21 +01:00
Christoph Oelckers 72810c969d - added ChangeCamera script function. 2017-02-05 18:07:12 +01:00
Christoph Oelckers 9e038b75fa - exported DrawChar and DrawText. 2017-02-05 16:47:33 +01:00
Christoph Oelckers 52bec33c0d - exported BrokenLines to scripting as a new class.
- removed the hard limit of 128 lines for V_BreakLines.
2017-02-05 16:18:41 +01:00
Christoph Oelckers d8a1ce88b0 - a few more exports from FFont. 2017-02-05 13:55:38 +01:00
Christoph Oelckers b570d0819b - streamlined font handling for scripts a bit.
- moved the two 'you raised the alarm' messages for Strife to the string table
2017-02-05 13:14:22 +01:00