Commit graph

120 commits

Author SHA1 Message Date
alexey.lysiuk
ca4888eb3d Added CVar.GetCVar() function to do player-dependent console variables lookup 2017-04-06 10:51:36 +03:00
alexey.lysiuk
26e4b74261 Restored initial behavior of CVar.FindCVar()
https://mantis.zdoom.org/view.php?id=537
2017-04-06 10:50:40 +03:00
Christoph Oelckers
3a1228bf95 - exported the clipping rectangle to scripting and added a statusbar scaling wrapper for it.
- fixed: BaseStatusBar.Fill did not pass its flags parameter to the native function.
2017-03-30 12:13:28 +02:00
Christoph Oelckers
7ba6860102 - scriptified the automap HUD and made it obey hud_scale instead of always being fully scaled. 2017-03-29 14:20:22 +02:00
Christoph Oelckers
b9485d4edf - ported the Hexen status bar to zscript.
Note that DrawBar with a background texture does not work yet because the clipping rectangle is not done yet.
2017-03-28 11:00:05 +02:00
Christoph Oelckers
08b3c38304 - simplified the parameters of the HUD draw functions by moving all booleans into one flags word and ordering them so that the less likely ones to be used can be made optional.
- got rid of the image list in the Doom status bar. The cost of the texture lookup is mostly irrelevant here so clearer and shorter code is preferrable.
- moved the box fitting code from DrawTexture into the native function to have all coordinate calculations in one place which is necessary to implement proper alignment default handling. Without higher level functions altering positioning the default can be set to automatic alignment determination, i.e. the value's sign decides where something is placed. Of course for special cases this can be overridden.
- use ANIMDEFS to animate the inventory arrow,
2017-03-26 18:41:24 +02:00
Christoph Oelckers
b17b8d32ad completely redid the active powerup drawer for the HUD
- replaced Inventory.DrawPowerup with a GetPowerupIcon method so that the calling code can handle the drawing and apply its own rules. This was a major design flaw of allowing the inventory items to handle the drawing themselves, because they were unable to adjust to different HUD frontends. Note that any mod that overrides DrawPowerup will not draw any icon that expects to be handled that way!
- the alternative HUD now has its own, separate drawer that obeys the AltHUD's rules, and not the ones of the normal fullscreen HUD.
- the standard drawer has been scriptified as a virtual function.
- Both drawers now handle positioning of the icon inside its assigned box themselves instead of trusting the powerup item to do it correctly.
- DTA_HUDRules and Screen.DrawHUDTexture are to be considered deprecated because both do not integrate into the redesigned HUD code.
2017-03-24 22:58:16 +01:00
Christoph Oelckers
617934e1c2 - added a few exports for game strings which the SBARINFO string drawer can access and which should also be available by ZScript.
- merged BaseStatusBar and CustomStatusBar back together.

Since the low level draw functions are better done in native code for both performance and debuggability the split has become pointless.
2017-03-24 02:12:36 +01:00
Christoph Oelckers
31ea33bfc4 - rewrote the condition nodes from SBARINFO in ZScript. This compiles but hasn't been tested yet. 2017-03-23 00:25:26 +01:00
Christoph Oelckers
4c51a4fc59 - reimplemented the health bar for Strife's status bar. 2017-03-22 14:59:12 +01:00
Christoph Oelckers
9bffe4ee50 - scriptified the main statusbar interface and the Strife status bar.
Note that the Strife status bar does not draw the health bars yet. I tried to replace the hacky custom texture with a single fill operation but had to find out that all the coordinate mangling for the status bar is being done deep in the video code. This needs to be fixed before this can be made to work.

Currently this is not usable in mods because they cannot initialize custom status bars yet.
2017-03-22 00:32:52 +01:00
Christoph Oelckers
fb48a1b776 - resotred proper time calculations for status screen. 2017-03-20 19:04:17 +01:00
Christoph Oelckers
0cfdd699ad - exported the base thinker class for sector lighting effects to ZScript. 2017-03-19 13:15:38 +01:00
Christoph Oelckers
a2f2be17ef - status screen fully scriptified but not active yet. 2017-03-18 19:35:26 +01:00
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