Commit graph

458 commits

Author SHA1 Message Date
Christoph Oelckers
8be788a9b3 - moved portal data into FLevelLocals. 2018-04-01 20:17:39 +02:00
Christoph Oelckers
65e7b6dfaa - moved the code in gl_data.cpp to better fitting places
* the MAPINFO options now get handled in g_mapinfo.cpp and g_level.cpp, just like the rest of them as members of level_info_t and FLevelLocals.
* RecalcVertexHeights has been made a member of vertex_t and been moved to p_sectors.cpp.
* the dumpgeometry CCMD has been moved to p_setup.cpp
2018-04-01 18:45:27 +02:00
Christoph Oelckers
e89a598b31 - renamed FTexture's UseType flags and gave them a dedicated type.
This was done mainly to reduce the amount of occurences of the word FTexture but it immediately helped detect two small and mostly harmless bugs that were found due to the stricter type checks.
2018-03-25 20:26:16 +02:00
Christoph Oelckers
da74b9df95 - serialize the temporary music volume that can be set through ACS. 2018-03-24 13:07:18 +01:00
alexey.lysiuk
af7648a151 Made PlayerRespawn skill definition consistent
Now it works the same as AllowRespawn map definition in MAPINFO
2018-02-03 16:26:49 +02:00
Marisa Kirisame
92547028f3 Exports sky textures to ZScript (readonly, needs setter function due to the setup required) and speeds, along with a ChangeSky function for setting the textures. 2018-01-26 21:00:44 +01:00
Christoph Oelckers
2720e36a2c - marked a few more CCMDs unsafe. 2018-01-20 09:11:28 +01:00
alexey.lysiuk
f25a5ea2bc Marked a few commands as unsafe
This process of finding unsafe commands is not complete!
2018-01-07 15:03:49 +02:00
Major Cooke
c3c1e76e8a Added vector diff functions to ZScript LevelLocals class
Vec2Diff() and Vec3Diff() work like Actor’s Vec2To() and Vec3To() but use arbitrary points
2018-01-02 14:18:59 +02:00
alexey.lysiuk
996bddd602 Exposed pixel stretch to ZScript as member variable instead of function
https://forum.zdoom.org/viewtopic.php?t=58539
2017-12-29 09:42:03 +02:00
Major Cooke
1e7df5505e Added GetPixelStretch to LevelLocals struct. 2017-12-27 17:50:39 -05:00
Rachael Alexanderson
e867d75712 Merge remote-tracking branch 'origin/master' into newtimercode4 2017-11-15 22:33:27 -05:00
alexey.lysiuk
285834ae5b Fixed return state of player entered event
https://forum.zdoom.org/viewtopic.php?t=58433
2017-11-12 11:03:08 +02:00
Christoph Oelckers
6bd76d6b5a - fixed compilation in debug mode.
- moved timer definitions into their own header/source files. d_main is not the right place for this.
- removed some leftover cruft from the old timer code.
2017-11-12 09:06:40 +01:00
Magnus Norddahl
307d8931d8 - Switch to C++11 steady clock
- Move the C++11 implementation to d_main
- Remove the platform specific timer implementations
2017-11-12 03:12:22 +01:00
Christoph Oelckers
49b77f3a17 - added per-level exit texts independent of the current cluster.
This is mainly to support UMAPINFO which does not have clusters but has been extended to define separate exit texts for each target map that can be reached from a given map.
Special names 'normal' and 'secret' can be used to define texts specific to the default exits.

New MAPINFO properties:

* exittext = mapname, "text"...
* textmusic = mapname, "musicname", order
* textflat = mapname, flatname
* textpic = mapname, picname

textflat and textpic are like 'flat' and 'pic' for clusters, one defines a tiled background, the other a fullscreen image.
Setting an empty exittext will disable a cluster-based text screen that may apply to the given map.
2017-07-30 22:50:27 +02:00
Christoph Oelckers
abee2805cb - the last scriptified bits of P_PlayerThink. 2017-05-01 00:27:58 +02:00
Christoph Oelckers
6e25c34fda - more player code exported 2017-04-30 22:17:51 +02:00
alexey.lysiuk
9a7aa7a7b4 Fixed map name in demos recorded with * argument
https://mantis.zdoom.org/view.php?id=642
2017-04-30 16:35:28 +03:00
Christoph Oelckers
ec1aeaf384 - allow changing to the current map by using "*" as argument. Implemented for 'map', 'changemap' and 'recordmap'. 2017-04-28 11:39:47 +02:00
Christoph Oelckers
f866e0f02f - saved the wrong version. 2017-04-25 21:05:36 +02:00
Christoph Oelckers
cd180d29c7 - block direct use of 'new' for DObjects.
This is to ensure that the Class pointer can be set right on creation. ZDoom had always depended on handling this lazily which poses some problems for the VM.
So now there is a variadic Create<classtype> function taking care of that, but to ensure that it gets used, direct access to the new operator has been blocked.

This also neccessitated making DArgs a regular object because they get created before the type system is up. Since the few uses of DArgs are easily controllable this wasn't a big issue.

- did a bit of optimization on the bots' decision making whether to pick up a health item or not.
2017-04-14 13:31:58 +02:00
Christoph Oelckers
6599e2c425 - moved the VM types into their own file and only include it where really needed. 2017-04-13 01:12:04 +02:00
Christoph Oelckers
6870efe134 - added a GetCVarString ZScript/DECORATE function.
- fixed: loading a savegame triggered PlayerEntered events.
2017-03-28 21:37:43 +02:00
Christoph Oelckers
3e67a8bafa - let hud_scale act like an override to uiscale, just like con_scale does.
- better handling of ForceScale for the fullscreen HUD that doesn't mess around with CVARs.
- moved the mug shot into the status bar, because this is global state that needs to be shared between different pieces of code which want to display a mug shot.
- SBARINFO should work off the current status bar settings instead of the ones stored in its script object
2017-03-25 18:32:47 +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
1423d5f42a - scriptified the SBARINFO wrapper.
This serves no purpose in itself but it removes a native side class from the status bar class hierarchy which allows for better editing options later.
2017-03-22 17:29:13 +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
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
921bc763fb - separated the software-renderer-specific parts of colormap processing from the common parts.
- moved testcolor and test fades into SWRenderer files.

These CCMDs work by hacking the default colormap and were never implemented for hardware rendering because they require many checks throughout the code.
2017-03-15 22:04:59 +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
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
Rachael Alexanderson
0f61197bae - Forbade return scripts from triggering on save load. 2017-03-12 00:22:59 +01:00
Christoph Oelckers
921abc404d - fixed GCC warnings and errors
(Is there anyway to tone down GCC's warning level? It outputs too many false positives for potentially uninitialized variables in which the genuine errors get drowned.)
2017-03-11 19:02:35 +01:00
Rachael Alexanderson
7ef8ed5867 Merge https://github.com/coelckers/gzdoom 2017-03-05 18:40:44 -05:00
Rachael Alexanderson
b4079b9915 - implemented "hazardcolor" and "hazardflash" properties. This affects strife's sector damage type that passively builds up over time. setting "hazardcolor" changes the gradual blend that is used when palette flash is disabled. setting "hazardflash" changes the flashing blend that is used when palette flash is turned on. 2017-03-05 22:48:46 +01:00
Rachael Alexanderson
5aec906031 Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/version.h
2017-02-28 04:46:23 -05:00
Christoph Oelckers
cc598dfdde - fixed: To get the final error handling from the serializer, Close must be called before the destructor gets invoked.
- added line feeds to all error messages in the serializer.
2017-02-27 15:16:03 +01:00
Rachael Alexanderson
404b326812 Merge https://github.com/coelckers/gzdoom 2017-02-25 18:32:06 -05:00
Christoph Oelckers
d39ee1daf3 - added a new thinker statnum STAT_STATIC which do not get deleted between levels. 2017-02-25 16:56:49 +01:00
Rachael Alexanderson
05b092a8a1 Merge https://github.com/coelckers/gzdoom 2017-02-25 01:24:45 -05:00
Christoph Oelckers
43c5fa93f9 - fixed handling of PlayerEntered event.
This was done in P_SpawnPlayer where it would be called not only on voodoo dolls but also on temporary player pawns. The second case was attempted to avoid, but this would break intra-hub travels to unvisited levels.
Moved the handling to G_DoLoadLevel for all cases where we have a clear and unambiguous situation with all players being set up and no voodoo dolls that might trigger an event.
2017-02-24 21:45:53 +01:00
Rachael Alexanderson
e35be9c0a3 Merge https://github.com/coelckers/gzdoom 2017-02-23 22:07:40 -05:00
Christoph Oelckers
58be506a73 - made intermission screen more scripting friendly. 2017-02-24 00:28:33 +01:00
Rachael Alexanderson
80d3fd58ff Merge https://github.com/coelckers/gzdoom 2017-02-23 15:00:09 -05:00
Christoph Oelckers
4bae6e81db - turned the texture pointers in wbstartstruct_t into scripting compatible texture IDs. 2017-02-23 18:33:49 +01:00
Rachael Alexanderson
11d6f46e2d Merge https://github.com/coelckers/gzdoom 2017-02-19 13:05:32 -05:00